Recent developments in the field of electronic and wireless communications have the ability to design and manufacture sensors with low power consumption, small size, reasonable prices and various data uses. These small sensors, which have the ability to perform actions such as receiving various environmental information based on the sensor type, processing and sending it, monitoring and monitoring, etc., have led to the emergence of ideas for the creation and expansion of networks known as wireless sensor networks. A sensor network consists of a large number of sensor nodes that are widely distributed in an environment that collects information from the environment. The location of sensor nodes is necessarily predefined and not known. Such a feature allows us to release them in hazardous or inaccessible places. Another unique feature of sensor networks is the ability to collaborate and coordinate sensor nodes.