Design of a RSSI Location System for Greenhouse Environment

In order to improve the location accuracy in the complicated greenhouse environment, a positioning system is designed in this paper. According to RSSI data in the greenhouse, the parameters of the path-loss model are modified. Besides, least square estimation is used to filter RSSI data to eliminate random disturbance. Based on RSSI, the blind node is positioned by triangle centroid location method. Finally, to lessen the negative influence of steel pillars in the greenhouse, a region segmentation mechanism is introduced to the system. Experiments prove that our positioning system has higher accuracy in the greenhouse.


Introduction
Modern facility agriculture control system is developing from the control over the microclimate to the control based on crops' physiology and ecology in the greenhouse [1,2]. It plays an important role in the control system that accurately monitoring of each part of crops. However, the greenhouse environment data of crops' different parts and light intensity of greenhouse's different regions have fluctuations in a day. If Wireless Sensor Network (WSN) with the fixed nodes is selected to transmit data, it will cause the problem of data redundancy, node resources wasting, and excessive energy. Thus, the mobile WSN nodes are necessary for their great flexibilities [3][4][5].
Once the mobile WSN nodes are used, the positional information of mobile nodes is essential for the monitoring system. But there are lots of factors influencing the location accuracy, such as WSN radio signal being blocked by the steel structure of greenhouse or by multipath effect in indoor environment [5,6].
In this paper, a positioning system based on Zigbee WSN which is suitable for greenhouse is developed to solve these problems. The region segmentation mechanism is also proposed to solve the problem of WSN radio signals being blocked by the steel structure of greenhouse. Experiments prove that the positioning system has higher accuracy in the greenhouse.

The System Structure Design
Generally, WSN localization algorithms include Range-Based Localization Schemes (RBLS) and Range-Free Localization Schemes (RFLS) [1][2][3]. Comparing with the RFLS, RBLS has a higher accuracy. But it requires distance or angle information between nodes. Time of Arrival (ToA), Time Difference of Arrival (TDoA), Angle of Arrival (AoA), and Received Signal Strength Indication (RSSI) are the most common approaches to obtain distance [4]. In Range-Based WSN, the accuracy of localization system depends on precise estimation of nodes distance [5][6][7][8]. Considering the cost of greenhouse construction, the low-cost RSSI method is preferred.
In this paper, the entire greenhouse is preliminarily split to 6 regions by WSN node arrangement. Then, according to RSSI, these greenhouse regions are segmented further to optimize the position system.

System
Architecture. The whole localization system can be divided into two layers: WSN layer and PC client. The system architecture is shown in Figure 1.
The WSN layer consists of the stationary beacon nodes and the mobile blind node. The network structure is a tree structure. Coordinator is the core of WSN, and its main work is building and maintaining the network. Beacon nodes collect data and upload to coordinator. Then coordinator preprocesses data and uploads RSSI data to PC by RS232.   The major jobs of PC are processing the data which is uploaded from WSN, assorting nodes and filtering RSSI. The optimized data obtained from the calculation of PC is used to calculate the location of the blind node. In our system, WSN and PC are connected with serial port.

Node Arrangement Scheme.
In this paper, the size of the greenhouse is 30 m * 25 m. Generally, the space which is used to grow crops covers 20 m * 25 m area and there are about 20 steel pillars erected in our greenhouse. To cover the crop area completely and save node resource as far as possible, Beacon nodes are supported by the steel pillars and kept at the same height to reduce error caused by height difference. Regarding the position of the beacon nodes, the entire greenhouse is divided into 6 regions. It mitigates negative effect due to RSSI by identifying which region the blind node is in. The method can improve the precision of positioning. The nodes are arranged as shown in Figure 2.

Hardware Design
In this paper, Zigbee WSN is selected as R&D platforms. The CC2530 chips are the cores of the coordinator, the beacon nodes, and the blind node. CC2591 is a 2.4 GHz RF front end with high integration and lower power consumption. The integrated power amplifier has ability to amplify output power to 22 dBm. The communication distance could be extended over 10 times. Based on CC2530, RF front end CC2591 enhances reliability of the data transmission.

Solar Power Supply System
Design. Dry cells are selected to be a conventional power system. But dry cells are unable to supply stable voltage. To eliminate the negative effect, different nodes choose different power systems. Because coordinator has no special requirement, it selects direct feeding system. Blind nodes and beacon nodes select solar power supply system. Solar power system not only saves energy but also has ability to supply stable 5 V voltage to eliminate random error which is caused by power supply. Solar power supply system consists of 3 modules, energy conversion, energy storage, and energy control. Figure 3 shows structure of the solar power supply system.

Software Design
Software design includes Zigbee node program design and PC program design. Node program is responsible for transmitting data. And PC program takes charge of data processing.

Node Program Design.
Using a task scheduling mechanism like Operating System, Zigbee Protocol stack achieves the basic functions, such as building and maintaining network and joining network. Beacon nodes can receive the location request from the blind node and upload RSSI to PC. The process of node software is designed as shown in Figure 4. There are 3 steps in WSN node software program.
(i) Location request: the blind node broadcasts location request with identifier.
(ii) Respond request: all of the beacon nodes receive location request with identifier. Then they analyze RSSI from the request and upload to coordinator.
(iii) Check beacon response: coordinator collects RSSI of every beacon node. If any Beacon's RSSI is lost, coordinator will broadcast location request again.

PC Program Design.
The main works of PC program are filtering and optimizing RSSI from coordinator. With the distance which is converted from RSSI, the specific location of the blind node is calculated in the system.

RSSI Ranging
Model. When radio signal transmits over short distances, RSSI is disturbed by reflection, refraction, or diffraction of environment. Due to the steel structure in the greenhouse, moving people, and other greenhouse facilities or crops, signals often have many paths to arrive to receiver. And this phenomenon may result in multipath fading effect. It means that the received signal is superposed by many signals of different paths. In indoor environment, None Line of Sight (NLoS) is effected by Rayleigh fading, while Line of Sight (LoS) is effected by Rician fading [9]. And the two fast fading have a significant impact on communication system. Therefore, to indoor radio signal transmission model, multipath fading effect is the major factor of error.
The path-loss model which is suitable for free space is inappropriate. In this paper, log normal distribution model is used to estimate radio signal loss. The following mathematical expression is PL( ) signifies RSSI after signal transmit with distance , and PL( 0 ) is RSSI after signal transmit with unit distance. 0 is unit distance, value of which is 1 m generally. 0 is random number of Gaussian distribution with mean value 0. It signifies unexpected random noise in the process of propagation, and the value range of standard deviation is 4 to 10. is attenuation factor and the value range is 2 to 4.
Equation (2) is the simplification of (1). Because RSSI value is negative, (2) selects absolute value for convenient calculation. Equation (2) is Equation (2) is the relational expression of distance and RSSI. With (2), the parameters of path loss model in greenhouse could be estimated.

Least Squares Filter.
Due to multipath effect and other random noise in the greenhouse, RSSI which location nodes receive has great error, and the accuracy of location is reduced. In this case, it is necessary to carry on filter processing to RSSI. Least squares Filter is selected in this paper. Least squares method is a classical parameter estimation method. It estimates parameters of regression model from an error fitting perspective [10]. Experiment proves highly effective. According to RSSI of one beacon node, the equations are as follows: To simplify the equations get (4) as follows: = . (4) In ( To solve (4) with least squares method, the result is Then the estimation of distance is

Triangle Centroid Location.
The three-bonier measurement and the triangulation method are common methods of RBLS. Because of the influence of multipath effect and random error, it is often the case that 3 location circles do not meet in one point. In this paper, triangle centroid location algorithm is selected to locate the blind node. The 3 location circles intersect with one another. With 3 intersections, a triangle could be found. And the centroid of the triangle is the position of the blind node. The principle of triangle centroid location is shown as Figure 5. Triangle centroid location uses RSSI from the beacon nodes to calculate the position of the blind node. This method is entirely network connectivity based and does not rely on cooperation among the beacon nodes and the blind node and which is simple to be realized. Triangle centroid location applies to the case that 3 location circles intersect with one another. That is to say, measured distance should be smaller than the actual value. But in indoor environment like greenhouse, reflection of radio signal is very common. In most cases, beacon nodes always receive RSSI which is larger than actual value. Therefore, it is frequent that 3 location circles do not intersect and lead to the inability to locate the blind node. In this case, the measured distance should be appropriately enlarged until 3 location circles intersect with one another. In this paper, if location circles do not intersect, the measured distances will be expanded by the same multiple.

Region Segmentation Mechanism.
In the greenhouse, the severe multipath fading effect is caused by glass walls of the greenhouse, crops, and other agriculture facilities. The further away from the beacon nodes the blind node is, the more strongly the RSSI fluctuates, and the more difficultly the blind node position estimates. Specifically, when steel pillars keep out radio signals between the blind node and the beacon node, severe attenuation of RSSI is caused, and the slashing of location accuracy is very large. According to this characteristic, a region segmentation mechanism is introduced to correct RSSI and reduce location error that result from obstruction from steel pillars. In the experience, the CC2591 output power of the blind node is set to 10 dBm. The first data group is obtained in the greenhouse. In the range of 7 m, RSSI is measured once every 0.2 m. The second data group is acquired in the clearing. In the range of 8 m, RSSI is measured once every 0.5 m. The two data groups are shown as Figure 6.

Region Segmentation
In the greenhouse, RSSI which is received within the range of 2 m is stable. If the blind node is more than 2 m away from the beacon node, RSSI is prone to big swing. However, in the clearing, RSSI does not fluctuate wildly within the range of 8 m. So the outdoor RSSI location model is inappropriate for greenhouse.
According to path-loss model (2), combining data of RSSI distance experiment, model parameters are calculated by fitting curve with MATLAB. In the greenhouse path-loss model, = 1.8574 and = 33.1761. This model is called GGHPL model (General Green House Path-Loss model). The fitting curve is shown as Figure 7.
If the blind node is close to the beacon node, RSSI will be stronger than general RSSI for the reason of reflection from steel pillars. And RSSI tends towards stability. According to the experiment data, a curve could be fitted by MATLAB, and, in this model, = 1.999 and = 24.6222. The model is called NBCPL model (Near Beacon Characteristic Path-Loss model). The fitting curve is shown as Figure 7.
According to the feature of RSSI, the regions of greenhouse are segmented further. In the region segmentation mechanism, RSSI threshold is 30. The beacon node which is close to the blind node is called CCB (Close Characteristic Beacon), RSSI of which is less than threshold. Two strategies are used to locate the blind node, respectively, in the two regions. The two regions are segmented as Figure 8.
Region segmentation method is based on Figure 8; different models are appropriate for different regions. In region 1, RSSI of CCB selects NBCPL model and other beacon nodes select GGHPL model, while in region 2, all beacon nodes select GGHPL model. Locating the blind node procedure is shown as Figure 9.

Optimizing Error of Steel Pillars.
Steel structural frame in the greenhouse causes multipath effect, and blocking effect of steel pillars reduces location accuracy.
To show the disturbance of steel pillars in the greenhouse, a contrast experiment is designed. Put a beacon nod from a pillar 4 meters away. Within 8 m from the beacon node, RSSI is measured every 0.5 m. One experiment is disturbed by pillar and the other without disturbance. The contrast experiment data is shown as Figure 10.
In Figure 10, when the blind node and the beacon node are both on one side of the steel pillar, radio signal is not blocked by pillar. But the steel pillar reflects radio signal and makes RSSI stronger than the actual value. In this case,  measured distance will be smaller than the actual value. If the blind node and the beacon node are positioned on either side of pillar, blocked radio signal makes RSSI weaker than the actual value. Considering node arrangement, the RSSI is disturbed by the reflection. Here the blocked RSSI come in pairs.  The blind node broadcasts location request. Then, according to RSSI, four beacon nodes are selected to locate. Among the four beacon nodes, if the two high-strength RSSI are both larger than 68 dBm and the two low-strength RSSI are both less than 42 dBm, the blind node is disturbed by a steel pillar.
As is shown in Table 1, two modification functions are designed to modify these two disturbances.

Simulation and Experiment Results
A verified experiment is designed to validate the accuracy of this system. The blind node moves in the range of 8 m * 9.6 m. The experiment data is shown in Figure 11. The track of blue spots represents the actual position of the blind node, the red spots represent the motion track which is calculated by original positioning system, and the green spots represent track which is positioned by improved positioning system. Experiment proves the improved positioning system can reduce error of steel pillars. The statistics of experiment are shown in Table 2.

Conclusion
According to the transmission characteristic of RSSI in the greenhouse, we proposed a positioning system based on RSSI partition in this paper. With the experiment data obtained from the greenhouse, two curves are fitted and two path-loss models are introduced to locate the blind node. Meanwhile a region segmentation mechanism is designed to improve the system performance. Experiments have shown that our system and algorithm have high positioning accuracy. It is appropriate to be applied in a complicated environment like the greenhouse.