Performance Evaluation of Image Transmission over Wireless Sensor ...

2 downloads 0 Views 563KB Size Report
Jul 17, 2016 - Low cost cameras and embedded devices with high processing capabilities ... network for image transmission using a maximum data rate of ...
An ASABE Meeting Presentation DOI: 10.13031/aim.20162460971 Paper Number: 162460971 1

Performance Evaluation of Image Transmission over Wireless Sensor Network for Precision Agriculture Camilo Lozoya1, Fernando Rojas-Marta1, Cesar Rodriguez-Esqueda1, and Julian Estrada-Ortega1 1

Tecnologico de Monterrey, Campus Chihuahua Av. Heroico Colegio Militar 4700, 31300, Chihuahua, Chihuahua, México

Written for presentation at the 2016 ASABE Annual International Meeting Sponsored by ASABE Orlando, Florida July 17-20, 2016 ABSTRACT. Low cost cameras and embedded devices with high processing capabilities have increased the use of computer vision systems for precision agriculture applications. Image processing devices may serve as remote sensing nodes to measure the vegetative development for different crop areas. Therefore, these types of devices require to be included as additional elements into current wireless sensor networks (WSN) in order to acquire and transmit image data. IEEE 802.15.4 protocol has become the de facto standard for the implementation of WSN due the low-cost and low-power consumption technology. However, this protocol has been designed to communicate small amount of data, which produces a big challenge when large image files are integrated into the current network infrastructure and have to be fragmented and transmitted into small data packets. This paper evaluates the performance of static and dynamic scheduling policies for the communication of image data through a WSN, in a typical precision agriculture application such as a closed-loop irrigation system. The parameters considered on the performance evaluation include communication bandwidth, packet loss rate, and also the effects on the overall performance of the irrigation system are analyzed. Keywords. Image transmission, precision agriculture, remote sensing, wireless sensor

The authors are solely responsible for the content of this meeting presentation. The presentation does not necessarily reflect the official position of the American Society of Agricultural and Biological Engineers (ASABE), and its printing and distribution does not constitute an endorsement of views which may be expressed. Meeting presentations are not subject to the formal peer review process by ASABE editorial committees; therefore, they are not to be presented as refereed publications. Citation of this work should state that it is from an ASABE meeting paper. EXAMPLE: Author’s Last Name, Initials. 2016. Title of presentation. ASABE Paper No. ---. St. Joseph, MI.: ASABE. For information about securing permission to reprint or reproduce a meeting presentation, please contact ASABE at http://www.asabe.org/copyright (2950 Niles Road, St. Joseph, MI 49085-9659 USA).1 ASABE Annual International Meeting

2

Introduction The concept of precision agriculture refers to crop management based on observations, measurements and actions according to the agricultural site-specific conditions (Zhang, Wang, & Wang, 2002). Among the main goals of precision agriculture are the increment of water efficiency, the reduction of energy consumption and the maximization of crop productivity, by using technology such as wireless sensor networks, mobile devices, remote sensing, real-time control and information systems. Specifically, the crop productivity requires the use of sensors capable to identify the vegetative development; nowadays the low cost of digital cameras with higher resolution and processing capabilities have increased the use of computer vision systems in the precision agriculture domain. Image processing devices may serve as remote sensing nodes to measure the crop physical characteristics (size, color, leaf area, etc.) within a wireless sensor network. The IEEE 802.15.4 standard, which is the basis for the Zigbee communication protocol (Zigbee Alliance, http://www.zigbee.org), has become the de-facto standard for wireless sensor networks due low cost, low power consumption and small communication packet size (Kalaivani, Allirani, & Priya, 2011). However, this protocol has been designed to communicate small amount of data, which produces a relevant challenge when large image files are integrated into the current network infrastructure and have to be fragmented and transmitted into small data packets. Multimedia transmission over wireless sensor network has been widely analyzed from different perspectives most of them concerning about reliability and efficiency during transmissions. Proposed solutions have been focused on packet size analysis, image compression techniques, modifications in the handshake mechanism and medium access control strategies. In (Burda & Wietfeld, 2007), demonstrates that it is possible to use an IEEE 802.15.4 networks to broadcast voice messages as well as continuous sound streams, while at the same time control functions are performed with high reliability. In (Jelicic & Bilas, 2010), a study of fragmented image transmission with IEEE 802.15.4/ZigBee protocol is conducted, where files as large as 600Kbytes are transmitted in small packets, the study focused on reducing the number of exchanged messages by maximizing packet filling and disabling acknowledgment messages. In (Baseri & Motamedi, 2013), presents an optimal packet length in IEEE 802.15.4 protocol in order to enhance throughput and performance of wireless multimedia sensor network for image transmission using a maximum data rate of 250Kbps. In (Nasri & Helali, 2011), proposes an image compression technique in the application layer of a wireless sensor network to decrease the multimedia data, however compression methods alone cannot make it possible to transmit multimedia data over low bandwidth network such as the IEEE 802.15.4. In (Tao, Yang, Sun, Zhang, & Feng, 2014), proposes a modification of retransmission mechanism in traditional Zigbee protocol, in order to improve the retransmission and acknowledgment handshake, experimental results show the relationships among the total retransmission time, packet loss rate and the maximum number of retransmission. In (Xu, Andrepoulus, Xiao, & van der Schaar, 2014), proposes an optimal multiuser resource allocation framework for delayconstrained video streaming, which is based solely on statistical information about the video user’s characteristics. This paper evaluates the performance of a dynamic traffic scheduling policy for the communication of image data through a wireless sensor network, in a typical precision agriculture application such as a closed-loop irrigation system. The proposed dynamic policy uses the slack time in the network to transmit the packages, and it is compared against two static scheduling policies, the parameters considered on the performance evaluation include communication bandwidth or number of retransmissions, and packet loss rate, also the effects on the overall performance of the irrigation system are analyzed. The remainder of the paper is organized as follows. Section 2, introduces the main aspects of the IEEE 802.15.4 protocol, presents the image transmission requirements in a closed-loop irrigation system and presents the static and dynamic traffic scheduling policies for the communication of image data. Section 3, evaluates the proposed dynamic scheduling policy with the static scheduling approaches, and discusses the results. Section 4 conclude the work and offer suggestions for futures works.

Materials and Methods IEEE 802.15.4 Overview IEEE 802.15.4 / Zigbee protocol consists of 4 layers: physical (physical medium, bit stream), data link (medium access control and error detection), network (network addressing and routing) and application (message format and application interface). The application layer is not defined in the IEEE 802.15.4 standard, but it is implemented only by the Zigbee protocol. The 2.4GHz band provides the highest bit rate of 250Kbps in IEEE 802.15.4 physical layer specification. Its essential characteristics are low power consumption and short distance communication, although recent implementations may reach distance up to several kilometers. Other features causing widespread utilization of IEEE 802.15.4 are low complexity, low hardware price and low data rate. The physical layer supports transfer of only small sized packets limited to 127 bytes, due to overhead at the network, medium access control and physical layers, each packet may contain no more than 89 bytes for ASABE Annual International Meeting

Page 3

application data or payload, as depicted in Fig. 1. This leads to fragmentation of bit streams larger than 89 bytes, where the network layer does not perform any fragmentation, therefore, the fragmentation and reassembly should be handled at the application layer (Pekhteryev, Sahinoglu, Orlik, & Bhatti, 2005). Therefore, a traffic scheduling mechanism is needed to acknowledge and request retransmission of fragments and must be take place in the application layer. Typically, the services offered by the application layer include: traffic management and admission control functionalities which prevent applications from establishing data flows when the network resources needed are not available; and an application program interface which provides the possibility to perform source coding in order to meet application requirements and hardware constraints (Akyildiz, Melodia, & Chowdhury, 2007).

Figure 1. IEEE 802.15.4 data packet format

Traditionally, most deployed wireless sensor networks based on the IEEE.802.15.4 measure scalar physical phenomena like temperature, pressure, humidity, soil moisture, etc. In general, most of the applications have low bandwidth demands, and are usually delay tolerant. More recently, the availability of inexpensive hardware such as high resolutions cameras that are able to ubiquitously capture multimedia content from the environment has encourage the development of networks of wirelessly interconnected devices that allow retrieving video streams, still images, and scalar sensor data simultaneously. Closed-Loop Irrigation System A closed-loop irrigation system can be implemented in order to minimize the control signal (effective irrigation) while keeping soil moisture under specific thresholds (avoiding water stress). Figure 2 shows a feedback control loop where the control objective is to keep within certain thresholds the soil water content. Thus the process variable θ(t) is the soil moisture, r(t) is the reference value (soil moisture set-point), the error value e(t) is obtained as a result of the difference between the process value and the reference value.

Figure 2. Closed-loop irrigation system block diagram

The closed-loop irrigation system is implemented by a group of nodes distributed over an irrigation area in order to implement a networked control system where a wireless sensor network is implemented over the protocol IEEE 802.15.41. The controller node periodically is polling the sensor nodes to obtain soil moisture measurements from them, as shown in Fig. 3. Then, the controller combines the multiple simultaneous measurements in order to obtain a single representative value for the complete irrigation area by executing a data aggregated algorithm, for further details see (Lozoya, Mendoza, Medoza, Torres, & Grado, 2014). Based on this value, the controller decides to open or close the irrigation valve by sending a control message to the actuator node. The sensor nodes are capable to measure soil moisture at a specific depth level when ASABE Annual International Meeting

Page 4

a request from the controller node is received, then each node transmits the soil moisture measurement to the controller. An irrigation area usually may contain several sensor nodes in order to cover the most representative zones, in this specific implementation six sensor nodes are considered. Finally, the actuator node is capable to active the irrigation mechanism based on the control signal received from the controller node. The irrigation mechanism is implemented, in this case, for an on-off valve. The monitor node just receives information from the controller and displays the data on a personal computer.

Figure 3. Communication sequence between nodes

A single-hop network cluster with star topology that allows direct communication with the central controller node has been implemented as a wireless sensor network. Each node includes an Xbee-PRO (Digi International Inc.) radio-frequency transceiver that operates in the radio band of 2.4 GHz with a low data rate of 9.6 kbps and with extended range, in order to implement the WSN based on the IEEE 802.15.4 protocol. Low data rate is required in order to maximize communication range which is critical in order to cover large crop areas. The sensor node is implemented with a low cost board Arduino Mega based in the microcontroller ATmega328 (http://www.arduino.cc). Soil measurements are conducted by using a Decagon (Decagon Devices, http://www.decagon.com) EC-5 volumetric water content sensor. The sensor is located in a depth of 20 cm and it has a measurement range from 0% to 60% of volumetric water content with a resolution of 0.1% when calibrated. The actuator node also with a low cost board Arduino Mega, a Rain Bird irrigation valve (Rain Bird Corporation, http://www.rainbird.com) is used to activate or deactivate the field irrigation. The controller node is implemented with a Raspberry Pi 2 board (http://www.raspberrypi.org) which includes a 900Mhz quad-core ARM Cortex-A7 CPU. The control tasks are executed on the Raspbian operating system which provides to the microprocessor the capability to schedule several periodical tasks. Finally, the image node is implemented with a Raspberry Pi 2 board equipped with a 5 Megapixels camera capable of 2591 x 1944 pixels static images. Traffic Scheduling Policies As denoted in Fig. 4, the closed loop irrigation system considers a master-slave communication model, where only the master (controller) initiates the communication, using time trigger schema. In terms of IEEE 802.15.4 protocol, the controller represents the “coordinator” device and the sensors, actuator and monitor nodes represent the “end devices” elements. As already discussed on (Lozoya, Mendoza, Torres, Gallegos, & Terán, 2015) typical sampling periods, for data acquisition system used on precision irrigation, have a range from one to ten minutes; therefore, the control loop is executed periodically with message that contains scalar values (soil moisture, valve, status, temperature, etc.). In addition to this loop the irrigation system requires to capture vegetative development data from an image sensor which includes a digital camera. The image sensor takes a picture once every day and sent the big image file to the controller node, since a master slave model is used the controller will ask for the image file. The period of one day for the image node is adequate since the dynamics of the process, i.e. irrigation and vegetative development, allows such this range of time. It is expected that the image transmission takes several minutes and may interfere with the control loop. Therefore, a traffic scheduling manager is required to be implemented in the controller node.

ASABE Annual International Meeting

Page 5

Figure 3. Master-slave communication model between coordinator and end devices

Three different traffic scheduling policies have been defined in this analysis. A scheduling policy refers to a mechanism used in order to dispatch a task, and within a networked control system, this task executes a communication action in which a message is transmitted, this message can be formed by one or more data packets. The IEEE 802.15.4 protocol has a maximum data packet size of 127 bytes, which only 89 can be used for data, the remaining bytes are considered overhead and are required to stablish the communication protocol between the nodes. The proposed traffic scheduling policies are summarized in Fig. 5, and describe as follows: 1.

2.

3.

Uninterrupted block (Static): This policy considers any message as a unit that once is executed it cannot be interrupt, whether this message is a small one, e.g. scalar message (control to sensor node communication), or a large one, e.g. image file message (control to image sensor communication). This represents a naif and straightforward implementation, since it is obvious that control loop will be affected by the image file transmission. Cyclic fragments (Static): This policy, understand that large messages may monopolize the communication bandwidth, then large messages, i.e. image file messages, are fragmented in small data packets. Time-slots are allocated off-line in order to allow the transmissions of a group of packets without affecting the small scalar messages. In this way, image file transmission does not affect the control loop execution. Dynamic slack management (Dynamic): This policy, uses the idle or slack time left by the control loop to transmit the image files packets, when the control loop is executed the image file transmission is suspended, and it is resumed when control loop is over. This can be considered a dynamic mechanism, since the control loop sampling period may change anytime and the policy automatically is adjusted to the new slack time. However, this dynamic slack management requires extra handshake data in order to stablish the suspend-resume mechanism.

Figure 5. Task scheduling policies: uninterrupted block, cyclic fragments, dynamic slack management.

ASABE Annual International Meeting

Page 6

Experiments and Results Experiment Set-up The parameters considered on the performance evaluation include communication bandwidth (data transfer rate), data packet loss rate (retransmission rate), and the effects on the overall performance of the irrigation system. A closed loop irrigation control system based on soil moisture was implemented in order to evaluate the performance of the different traffic scheduling policies. An automated on-off control system was implemented, where the irrigation is activated when the soil moisture value is below a predefined low limit, and it is deactivated when soil moisture is above the high limit. The closed loop control sampling period is two minutes. The experimental field correspond to an irrigation an area where nine soil moisture sensors (Decagon EC-5) were placed in regular patterns, three sensor nodes were used acquired the soil data. The area has a regular plain surface with pecan trees where the sprinkler irrigation was used for the experiments. The image node takes a picture once a day and transmit the file to the controller node by using a specific scheduling policy. Two types of image resolutions were used during the experiments, the low resolution images (640x480 pixels) had an approximate size of 350Kbytes, meanwhile the high resolution images (1920x1080 pixels) had an average size if 1.8Mbytes. Every image file used the JPG format and were encoded from binary to ASCII format using the Base64 algorithm specified by the RFC 3548 (https://tools.ietf.org/html/rfc3548.html), in order to conduct the data transmission. The average total time uninterrupted in order to complete the complete image data file transmission was 70 minutes for the low resolution images and 370 minutes for the high resolution one. Figure 6, shows a sample low resolution image.

Figure 6. Transmitted low resolution JPG image.

The distance between the image node and the control node in the experimental field is 50 meters. Two conditions were considered during the performance evaluation an unloaded network and a loaded network. The unloaded network represents a conditions where only one controller node is coordinating the data communication and there is no other element transmitting data in the same channel. In the loaded network, and additional node is transmitting data in the same communication channel in order to provoke an intentional disturbance in the network, the node transmit one small message (30 bytes) every 3 seconds. Network Bandwidth Network bandwidth or data transfer rate, is the amount of data that can be carried from one node to another in a given time period. During this evaluation, bandwidth is expressed in bits per second (bps). As shown in Fig. 7, when the Uninterrupted Block policy is used the data transfer rate is greater since the data transmission is executed continuously, however the drawbacks of this method are reflected in the other two evaluation parameters. The minimum bandwidth is given by the Cyclic Fragment policy since this conservative approach does not uses all the available idle time for image transmission. The Dynamic Slack Management policy achieves a similar network bandwidth as the Uninterrupted policy since it uses every available time for file transmission, however since handshake messages are required the transfer rate does not reach the maximum value. ASABE Annual International Meeting

Page 7

Figure 7. Data transfer rate performance for the three scheduling policies.

Packet Losses Packet loss occurs when one or more packets of data travelling across a computer network fail to reach their destination. Packet loss is typically caused by network congestion, but in wireless communication is also caused by radio-frequency signal fading. Packet loss is measured as a percentage of packets lost with respect to packets sent, also a packet loss produces data retransmission. As observed in Fig. 8, the Uninterrupted Block policy causes the highest data packet loss ratio, since a large continuous message is more data failure prone especially when a large group of consecutive data packets are sent one after the other one. The conservative Cyclic Fragments obtains the best data packet loss ratio due small amount of data packets are sent periodically during the designated time-slots. The Dynamic Slack Management has a higher data packet loss value than the Cyclic approach, because it has a greater number of data packets transmitted consecutively.

Data Packet Losses Unloaded Network 1.6000%

Loaded Network

1.4203%

1.4000% 1.2000%

0.8330%

1.0000%

0.9259%

1.0629%

0.8000% 0.6000%

0.2791%

0.4000%

0.4449%

0.2000% 0.0000%

Uninterrupted block

Cyclic fragments

Dynamic slack management

Figure 8. Data packet losses performance for the three scheduling policies.

System Performance Irrigation performance is measured by using the accumulated quadratic error metric. The irrigation system establishes a set-point, r(t) from Fig. 2, that represents the volumetric water content that should contain the soil in order to provide an adequate amount of water to the crop. The error is the difference between the set-point and the measured volumetric water content from the soil moisture sensors. The accumulated quadratic error indicates how good the system is to maintain the soil moisture levels close to the reference value, where the lower the value the better the performance. The accumulated ASABE Annual International Meeting

Page 8

quadratic error is defined as: 𝐽𝐽𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒 = �

𝑇𝑇𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒

0

𝑒𝑒 2 (𝑡𝑡) 𝑑𝑑𝑑𝑑,

(1)

where T eval is the evaluation time for the irrigation performance, e(t) is the difference between the soil moisture reference value and the process output (current soil moisture). As denoted by Fig. 8, the Dynamic Slack Management and the Cyclic Fragments produces exactly the same irrigation performance since neither one affects the closed-loop control for the irrigation system. However, the Uninterrupted Block greatly affects the overall system performance since it may cause large interruption in the closed-loop control algorithm producing lack or excessive water in the crop soil.

Figure 9. Irrigation performance by evaluating accumulated error for the three scheduling policies.

Discussion The Dynamic Slack Management policy to stablish the traffic scheduling with in a wireless sensor network, is a relatively simple mechanism that provides a good trade-off balance between data transfer rate (bandwidth) and packet loss ratio (retransmissions), since it uses the available time left by the coordinator or controller node to transmit a large image file by fragmenting the message in small data packets. In this way, a wireless sensor network based on the IEEE 802.15.4 protocol can be used to mix small scalar messages with large multimedia information by using low data rates.

Conclusions Precision agriculture requires the use of sensors capable to identify the vegetative development, image processing devices may serve as remote sensing nodes to measure the crop development, within a wireless sensor network. The IEEE 802.15.4 protocol, which represents an adequate platform to implement a wireless sensor network has a small communication packet size, since it has been designed to communicate small amount of scalar values as data. Therefore, there is a relevant challenge for traffic scheduling, when large image files are integrated into the current network infrastructure and have to be fragmented and transmitted into small data packets. This paper presented the performance evaluation of three different types of scheduling policies for the communication of image data through a WSN, in a typical precision agriculture application such as a closed-loop irrigation system. The parameters considered on the performance evaluation include communication bandwidth, packet loss rate, also the effects on the overall performance of the irrigation system. From the three policies two uses static allocation of transmission slots and one implements a dynamic allocation mechanism. The dynamic approach identified as Dynamic Slack Management policy uses the idle or slack time left by the control loop to transmit the image files packets, when the control loop is executed the image file transmission is suspended, and it is resumed when control loop is over. This policy provides the best trade-off balance between data transfer rate (bandwidth) and packet loss ratio (retransmissions).

Referencess Akyildiz, I., Melodia, T., & Chowdhury, K. (2007). A Survey on Wireless Multimedia Sensor Networks. Computer Network, 51(4), 921-960. Baseri, M., & Motamedi, S. (2013). Simulation study of packet length for improving throughput of IEEE 802.15.4 for image transmission in WSNs. Technological Advances in Electrical, Electronics and Computer Engineering (TAEECE), 2013 International Conference on, (pp. 6-9). Konya. ASABE Annual International Meeting

Page 9

Burda, R., & Wietfeld, C. (2007). Multimedia over 802.15.4 and ZigBee Networks for Ambient Environment Control. 2007 IEEE 65th Vehicular Technology Conference - VTC2007-Spring, (pp. 179-183). Dublin, Ireland. Jelicic, V., & Bilas, V. (2010). Reducing power consumption of image transmission over IEEE 802.15.4/ZigBee sensor network. Instrumentation and Measurement Technology Conference (I2MTC), 2010 IEEE, (pp. 1211-1215). Asutin,TX, USA. Kalaivani, T., Allirani, A., & Priya, P. (2011). A survey on Zigbee based wireless sensor networks in agriculture. Trendz in Information Science and Computing (TISC) (pp. 85-89). Chennai, India: IEEE. doi:10.1109/TISC.2011.6169090 Lozoya, C., Mendoza, C., Medoza, G., Torres, V., & Grado, M. (2014). Experimental evaluation of data aggregation methods applied to soil moisture measurements. IEEE SENSORS 2014 Proceedings, (pp. 134-137). Valencia. Lozoya, C., Mendoza, C., Torres, V., Gallegos, S., & Terán, R. (2015). A Scalable Design Approach for a Precission Irrigation Data Acquisition System. ASABE Annual International Meeting. New Orleans, USA. Nasri, M., & Helali, A. (2011). Adaptive image compression technique for wireless sensor networks. Computers Networks, 37, 798-810. Pekhteryev, G., Sahinoglu, Z., Orlik, P., & Bhatti, G. (2005). Image transmission over IEEE 802.15.4 and ZigBee networks. 2005 IEEE International Symposium on Circuits and Systems, (pp. 3539-3542). Tao, D., Yang, G., Sun, H., Zhang, H., & Feng, X. (2014). Data Acquisition and Transmission Reliability for Wireless Image Sensor Networks. Intelligent Information Hiding and Multimedia Signal Processing (IIH-MSP), 2014 Tenth International Conference on, (pp. 819-822). Kitakyushu. Xu, J., Andrepoulus, Y., Xiao, Y., & van der Schaar, M. (2014, April). Non-Stationary Resource Allocation Policies for Delay-Constrained Video Streaming: Application to Video over Internet-of-Things-Enabled Networks. IEEE Journal on Selected Areas in Communication, 32(4), 782-794. Zhang, N., Wang, M., & Wang, N. (2002). Precision agriculture - a worldwide overview. Computers and Electronics in Agriculture, 36(2), 113-132. doi:10.1016/S0168-1699(02)00096-0

ASABE Annual International Meeting

Page 10