Sie sind auf Seite 1von 10

398

IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 60, NO. 2, FEBRUARY 2011

A Hybrid Wired/Wireless Networking Infrastructure for Greenhouse Management


Orazio Mirabella, Senior Member, IEEE, and Michele Brischetto
AbstractIn this paper, the problems related to the management of a farm made up of several greenhouses are discussed. The management of this kind of farms requires data acquisition in each greenhouse and their transfer to a control unit which is usually located in a control room, separated from the production area. At present, the data transfer between the greenhouses and the control system is mainly provided by a suitable wired communication system, such as a eldbus. In such contexts, even though the replacement of the wired system with a fully wireless one can appear very attractive, a fully wireless system can introduce some disadvantages. A solution based on a hybrid wired/wireless network, where Controller Area Network and ZigBee protocols are used, is presented along with all the related problems that this integration involves. In particular, in order to integrate at the Data Link Layer the wireless section with the wired one, a suitable multiprotocol bridge has been implemented. Moreover, at the Application Layer, porting of Smart Distributed System services on ZigBee, called ZSDS, allows one to access the network resources independently from the network segment they are connected to. Index TermsController Area Network (CAN), greenhouse monitoring, hybrid network, Smart Distributed System (SDS), wireless sensor networks (WSNs), ZigBee.

I. I NTRODUCTION HE USE of advanced technologies, which were initially developed for industrial automation, has become common in agriculture in the last years, according to the many similarities existing between the two environments and the advantages they can introduce. In particular, greenhouses represent a peculiar kind of agricultural environment featured by the presence of several I/O devices (i.e., sensors and actuators) and control devices (e.g., programmable logic controllers). Unlike openair agriculture, where human intervention is only limited to provide some water for irrigation and fertilizers, greenhouses represent a closed environment which can be strictly controlled by humans in order to provide optimal conditions for the growth of plants. In particular, wireless sensor networks (WSNs) in agriculture have recently received great attention, and their use has been deeply investigated by several authors [1][3]. Owing

Manuscript received December 15, 2009; revised March 22, 2010; accepted March 23, 2010. Date of publication November 9, 2010; date of current version January 7, 2011. The Associate Editor coordinating the review process for this paper was Dr. Cesare Alippi. The authors are with the Computer Engineering Department, Faculty of Engineering, University of Catania, 95125 Catania, Italy (e-mail: omirabel@ diit.unict.it; mbrischetto@diit.unict.it). Color versions of one or more of the gures in this paper are available online at http://ieeexplore.ieee.org. Digital Object Identier 10.1109/TIM.2010.2084250

to the use of sensors, it is possible to monitor several environmental parameters such as air temperature, ground humidity, light, or the concentration of fertilizers. The knowledge of such parameters is of great importance since it allows the farmer to perform the most suitable operations in order to improve the growth of plants and productivity and to reduce costs. Sensors, both wired and wireless, are connected to a suitable network which allows data gathering and their use by a suitable management module. For this kind of applications, there are several advantages offered by a wireless system if compared with a wired one. They can be synthesized inside the concept of exibility. In fact, the considerable extensions of the cultivated elds and the need for periodically modifying a type of cultivation or to move it from a lot to another one make wired systems too rigid and difcult to modify. In this paper, the problems related to the management of a farm made up of several greenhouses are discussed. This kind of farms is rather common in Sicily, as favorable weather conditions make them economically convenient to use for the production of rstlings, which have a high value on the market and allow big prots. This kind of farms requires careful management of several parameters, through data acquisition in each greenhouse and their transfer to a control unit which is usually located in a control room, separated from the production area. All these data are processed by a Supervisory Control And Data Acquisition (SCADA) system which, through continuous variable monitoring, determines the actions to perform periodically in order to maintain the optimal conditions of the environment. At present, the data transfer between the greenhouses and the control system is mainly provided by suitable wired communication system, such as a eldbus. In such contexts, even though the migration from a wired system toward a fully wireless one can appear very attractive, a fully wireless network can also introduce some disadvantages, for example, the need for a periodical change of batteries, the presence of signal propagation problems which can arise on long distances, application proles that are not fully standardized, etc. Then, the use of hybrid wired/wireless technologies appears to be currently the best tradeoff solution [4], [5]. The architecture proposed in this paper is based on a hybrid approach. The wireless section is located in the indoor environment where great exibility is required, particularly in the production area inside each greenhouse. In such a way, it is possible to exploit the features related to high scalability, cheapness, simple installation, and mobility of devices whose position can be easily modied. Instead, the wired section is

0018-9456/$26.00 2010 IEEE

MIRABELLA AND BRISCHETTO: WIRED/WIRELESS NETWORKING INFRASTRUCTURE FOR GREENHOUSE MANAGEMENT

399

mainly used in the outside area as a control backbone, to interconnect the greenhouses with the control room. The location of greenhouses being stable for long periods, it is convenient to use a wired communication infrastructure which is well established for this kind of applications, offers a high bandwidth, and is more robust than a wireless one. The implementation of a wireless backbone, in fact, would have required the displacement of several intelligent nodes that are able to route data coming from different greenhouses toward the control room. Moreover, the number of these nodes would have to be high enough to provide a certain level of redundancy for both fault tolerance and performances, to allow multiple paths, and to avoid bottlenecks [6], [7]. An integrated wired/wireless solution allows one to exploit the positive aspects of both technologies by improving performances and cutting down the management problems. With reference to the wired section, a Controller Area Network (CAN)-type network [8] has been chosen on the account of its simplicity, robustness, exibility, cheapness, and good performances. For the wireless section, a ZigBee-type network has been chosen [9], [10], which represents the state of the art of WSN. CAN was initially designed for automotive applications, but afterward, it has been used also for other kinds of applications, mainly for automation. In particular, Honeywell has dened an application layer called Smart Distributed System (SDS) [11], which allows implementing, over the basic CAN protocol, several services which simplify the development of distributed control applications. SDS has been chosen because it is easy to implement on small resource devices and offers service primitives which are well suited for both the monitoring and control of greenhouses. In order to integrate the wireless section with the wired one, porting of SDS services on ZigBee, called ZSDS, has been performed. This way, the remote SCADA system has access to a uniform service set which is independent from the network used (wired or wireless), hiding the way how sensors/actuators are connected. Owing to this layer, which exposes a high-level application programming interface, it is possible to have access and control data in a simple way and to develop advanced applications which can be implemented on a personal computer. Moreover, the adoption of a userfriendly interface allows the management applications to be used by nonspecialized farm workers. The communication between CAN and ZigBee nodes required the implementation of a suitable bridge to cope with the several differences existing between the two protocols. This paper is organized as follows: In Section II, the architecture of the system is described, and the most signicant features are underlined. In Section III, CAN protocol is presented, and SDS is shortly described with the aim of pointing out the main characteristics of the protocol. In Section IV, ZigBee protocol is presented, and the implementation of ZSDS is described. In Section V, a bridge is described, and its operations are discussed. In Section VI, some implementation issues are discussed, and in Section VII, the tests performed on the system are presented in order to point out the evaluation methodology adopted for the system. Finally, in Section VIII, some conclusions are presented.

II. S YSTEM A RCHITECTURE The system to be controlled is made up of several greenhouses distributed in a eld. Each greenhouse is used for the production of several kinds of plants, which can vary according to the season and to the requests from the market. Each greenhouse is equipped with several sensors and actuators which perform all the activities requested for the correct growth of plants. Sensors are mainly used for the measurement of temperature and humidity, which represent two key parameters inside the greenhouse. Since this is a closed environment, accurate measurement and control of parameters, whose value can strongly affect the state of the system, are important. For example, the humidity of the ground is important for the correct growth of plants, and its measurement is fundamental in order to evaluate the quantity of water to distribute in the greenhouse. Moreover, air humidity plays an important role since a too high value, together with high temperature, can cause the production of mold and the rapid death of many plants. On the other hand, a too low value of air humidity can damage plants which need a tropical-like climate. Other parameters too can play an important role in the system, for example, light, whose intensity can affect the growing speed. Thus, brightness sensors can also be present in the greenhouse. At last, several onoff limit switches can be present to control some moving parts. Automatic windows or doors can be opened, for example, when the internal temperature is too high and some fresh air is needed to come inside the greenhouse. Actuators are mainly used to modify the environmental conditions through the activation of irrigation valves, air humidiers, heaters, electric fans, and motors. Actuators are put in action by commands sent by the control system which integrates all the environmental information through suitable control algorithms. The control system is a key point to consider. Whereas, in the past, control strategies in greenhouses were very simple and mainly based on the use of timers, currently, more sophisticated approaches which exploit the same techniques used in industrial automation are used. For example, the use of SCADA systems which, besides process control, provide also other functionalities that are very useful in greenhouse management. In particular, the following two functionalities are of great signicance. 1) Graphic interface. The graphic interface allows one to represent the whole system and to display the status of all or part of the eld. This allows the human operator to evaluate how the system is working and to recover quickly from anomalous conditions. 2) Historian module. The historian module allows one to record all signicant parameters and to display them as suitable graphs. This can be very useful to discover the reasons of some problems which occurred in the eld. For example, in the case a disease that arises on some plants, an analysis of the past values of some variables can be helpful to discover the cause which has triggered such a disease.

400

IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 60, NO. 2, FEBRUARY 2011

Fig. 2.

Architecture of the greenhouse farm.

Fig. 1. Layered architecture of the control system.

However, the most signicant part of the SCADA is the control part, which is based on closed loops and is responsible for the system evolution. The growth of a plant takes, of course, a long time, and control parameters must be continuously modied during the various phases. Moreover, controlling the growth of a plant is not an exact science; thus, several randomness can arise. This implies that the process cannot be fully automated and that an operator must interact with the system when required. The process control architecture can be organized in three different levels, as shown in Fig. 1. The rst level is the Cultivation Sequential Model. This level contains the temporal proles of the main environmental parameters, i.e., the values of temperatures, humidity, light, fertilizers, etc., inside the greenhouse. For each specic type of green, cultivation requires such parameters to change according to a model which has been obtained through past experiences. To this aim, suitable set points must be provided by the farmer, which are linked to the production of a particular kind of vegetables. The output of this module provides the daily set points which are used by the second module. It must be pointed out that this module performs a closed-loop control where the feedback is provided by the human operator according to the observation of the vegetable state. For example, the operator can lower the humidity prole if some mold appears on the leaves of the vegetables or can modify the concentration of fertilizers if the growth is too slow. The second level performs the daily control of the parameters in each greenhouse. Its task is to modify the value of all parameters during the day by using set points received by the rst level and the internal model which species how the parameters must change during the day. The module in this level is strictly connected to the modules of the third level in order to implement a multiloop control. Each output controls a single variable of the greenhouse and provides its instantaneous value. Even if the greenhouse can be considered as an isolated

environment, it is however inuenced by some external parameters, so that the control must also take into account their values. Information on the external parameters is provided by sensors E.S.1, . . ., E.S.n. The third level includes all the control modules of the greenhouse environment, which drive the actuators G.A.1, . . ., G.A.n. All variables are monitored by a set of sensors G.S1, . . ., G.S.n which provide the control feedback. The design of a multiloop controller is still a challenging task even if many authors have faced the problem [12][14] and have presented interesting solutions. This problem is however outside the scope of this paper, which instead is focused on the networking, and will not be further discussed in this paper. All devices are connected to the control system through a suitable communication structure, as shown in Fig. 2. This structure is implemented through the integration of wired and wireless networks. The wired network is a backbone which connects all the greenhouses with the control room, delivers commands to the actuators, and collects information from a set of wireless networks, each one connecting a cluster of sensors. This connection is provided by a CAN/ZigBee bridge, which solves all the problems related to the integration of the two protocols. There is a denite reason for the connection of eld devices to the wired or wireless network. The position of sensors must be easy to modify, according to the activities performed inside the greenhouse and the various cultivation types which rotate depending on the seasons. This requires moving periodically the humidity and temperature sensors, which prevents the use of a wired network, pushing toward a wireless network. In fact, the displacement of wires on the ground would hinder cultivation. Moreover, the wires would be subject to fast degradation and should be replaced periodically. On the other hand, the need to prolong the battery life in each device imposes the adoption of suitable power-saving strategies which are based on a reduced operating duty cycle. One important feature is that mobile sensors have to be localized with good precision. This allows the farmer to move a sensor from a place to another without worrying of its nal position, which will be detected automatically and displayed on the monitor of the SCADA system. This way, a map of the

MIRABELLA AND BRISCHETTO: WIRED/WIRELESS NETWORKING INFRASTRUCTURE FOR GREENHOUSE MANAGEMENT

401

Fig. 3.

Arbitration eld for the 2.0A CAN protocol.

parameters inside the greenhouse will be provided. The strategy used for localization is described in Section V. Actuators are all connected to the wired network for three main reasons. First of all, they do not need to be moved because they are rigidly connected to some device or plant infrastructure (for example, an irrigation valve is connected to a water distribution pipeline). Second, they usually need some power (e.g., in the case of a fan or a heater) which cannot be provided by a battery. Third, they must be active every time the SCADA system sends a command and cannot use a reduced operating duty cycle, thus shortening the battery life. Therefore, since they must be connected to the power line, there is no advantage to use a wireless network.

Fig. 4. Bit rate of a CAN bus versus the bus length.

III. CAN-BASED BACKBONE The CAN bus was originally designed to be used within road vehicles to solve cabling problems arising from the growing use of microprocessor-based components in vehicles. Owing to the low cost of CAN bus and its ability to support realtime communication, CAN is now widely used as an embedded control network to connect several control units, sensors, and actuators in a distributed control system. In the greenhouse application, CAN is used as a low-speed backbone for the integration of all the information present in the system. One of the reasons which justify the success of the CAN lies in the nondestructive priority-based bus arbitration mechanism it implements. Any message contention on a CAN bus is deterministically resolved on the basis of the priority of the objects exchanged, which is encoded in the identier eld of the frame. Thus, the priority of a message is the priority of the object it contains, expressed by the identier, which represents the critical part of the CAN frame shown in Fig. 3. The arbitration mechanism present in CAN requires a short length of the bus (which is typically 40 m at 1-Mb/s bit rate) in order to allow all nodes to sense the same bit. This way, the system can behave as a kind of large AND gate, with each node able to check the output of the gate. The identier with the lowest numerical value has the highest priority, and a nondestructive bitwise arbitration mechanism provides the collision resolution. The priority of a CAN message is static and systemwide unique, and it is linked to a variable. This means that each frame can carry only a variable each time, so that different variables require different frames. For this reason, each frame has a small dimension, contains only a few data bytes (8 B at maximum), and is very suitable for applications at the eld level. The maximum achievable bus line length in a CAN network is limited mainly by the delay of the bus line if compared with the bit duration: The bus length must be reduced as the bit duration decreases (i.e., the bit rate increases). The bit rate versus the bus length in a CAN network is shown in Fig. 4.

The short length of the bus may represent a strong limitation for applications different from the automotive ones. For example, in greenhouse control applications, the length of the bus can be up to 200 m. In order to cope with this length, the bit rate must be reduced: 250 kb/s can be considered a correct value, but in the greenhouse, the line speed has been limited to 100 kb/s in order to provide some additional noise immunity. However, a low bit rate is not a problem for the application considered here since all processes are featured by a very low dynamics and exchange only little information. Even with a high number of devices, the trafc produced is limited and does not require a large bandwidth. CAN standard specications are limited to layers 1 (Physical) and 2 (Data Link) of the International Organization for Standardization/Open System Interconnection (ISO/OSI) reference model. The third layer (the Application Layer, according to the three-layer architecture that is widely adopted for eld level communication systems) has not been specied in the standard, so that several different application layers have been proposed and adopted [15][17]. Among them, we have chosen SDS, developed by Honeywell for industrial automation applications. It is typically used for simple sensors, controllers, and switches and offers a small set of service primitives, which are easy to use and effective for simple applications. SDS provides the following service sets: 1) Read/Write: allows the user to read/write the value of a device; 2) Event: allows reporting an event in a device; 3) Action: sends a command to a device for executing an action; 4) COS ON/ COS OFF: reports an ON/OFF-type change of state (COS) in a device; 5) Write ON/Write OFF: allows the user to set/reset the state of a device; 6) Connection: used to open/close a connection with a specic logic address; 7) Channel: used in order to set up multicast or peer-to-peer communication. Even if limited to a few services, this set is able to implement all functions required for the greenhouse. Read/Write services are used to read the value of variables produced by sensors and write a value into an actuator (e.g., the speed of a fan).

402

IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 60, NO. 2, FEBRUARY 2011

COS ON/OFF services are used to indicate that a 1-b variable has changed its value (e.g., a limit switch has been pressed or a trigger circuit has red). Write ON/OFF services are used to power ON/OFF a device (e.g., to open an irrigation valve or turn on a heater). Event and Action services are used, for example, to indicate a localization request from a mobile sensor and command a beacon message to start the localization. At last, Connection and Channel services are used during the conguration of the system in order to set the logical channels between the SCADA and the eld devices. Starting from the SDS specications, these services have been implemented into the CAN devices which have been obtained by using cheap microcontrollers with embedded CAN communication capabilities. As stated in Section II, all CAN devices are used to connect the SCADA system with the actuators and CAN/ZigBee bridges. IV. Z IG B EE -BASED W IRELESS N ETWORK The need to deploy several mobile sensors in each greenhouse has pushed toward the use of WSNs. Among the different possibilities, we have chosen a ZigBee-based network on the account of several useful features it offers, such as low cost, small dimensions, suitable range, and very small power requirements. The last feature is really very attractive for a WSN, as it guarantees a long battery life and reduces the maintenance requirements. ZIGbee is based on a Carrier Sense Multiple Access with Collision Avoidance protocol and operates on three different bands. The most used is the industrial, scientic and medical (ISM) 2.4-GHz band, which provides the longest range (more than 100 m open air) and offers 16 different communication channels with a 250-kb/s bit rate. The availability of several channels allows avoiding interferences among the communications in different greenhouses, which can be organized as independent personal area networks (PANs). Two different kinds of devices are considered: full-function devices (FFDs), which can work as the master of the PAN (called PAN coordinator) or as routers, and reduced-function devices, which can only communicate with an FFD to exchange data. Different topologies are supported, including star, mesh, and cluster tree. In this application, the star topology has been used, since in each greenhouse, a CAN/ZigBee bridge operates as the PAN coordinator in order to manage the data acquisition from the sensors; thus, all the wireless devices only exchange data with it. The ZigBee architecture is based on a four-layer stack: Physical, Data Link, Network, and Application. In the greenhouse, some modications in the ZigBee stack have been introduced in order to lighten the implementation on small devices. First of all, the Network Layer has been removed, as each PAN is based on a star topology and no routing is required. Second, an SDS-like Application Layer called ZSDS has been implemented. This makes a common service set available to all plants, so that the SCADA can handle, in the same way, the data coming from both wired and wireless networks. The architecture of each wireless node is shown in Fig. 5.

Fig. 5.

Architecture of a wireless node.

Fig. 6.

Interfaces between MAC and ZSDS layers.

The application support (AS) middleware links the Application Layer directly to the Medium Access Control (MAC) sublayer and provides two main functions: 1) maintaining the tables containing the registered embedded objects which dene the functions implemented into the device; 2) performing the mapping between MAC 64-b addresses and network 16-b addresses assigned by the PAN coordinator. These functions are supported through services provided by the following two entities: 1) AS Data Entity, which provides a data transmission service required for the transport of application protocol data unit between two devices belonging to the same network, also including some mechanisms for a reliable data transport; 2) AS Management Entity, which provides the binding of the devices, maintains the AS information base database of the managed objects, and supports the mapping between the addresses in the two layers. The interface between the Application Layer and MAC is shown in Fig. 6. Since each ZigBee device can contain, as shown in Fig. 7, several embedded objects( up to 32), each one will require, in addition to the 16-b network address, other 5-b embedded object identier (ID) for its addressing. SDS denes two types of packet. 1) Short form: used for single binary devices to implement COS_ON/OFF and Write_ON/OFF services. It can also be used for Read/Write services when referred to a single variable.

MIRABELLA AND BRISCHETTO: WIRED/WIRELESS NETWORKING INFRASTRUCTURE FOR GREENHOUSE MANAGEMENT

403

Fig. 7.

Embedded objects in a device.

Fig. 8.

Main blocks in the CAN/ZigBee bridge.

2) Long form: used when a single ZigBee device is connected to more than one sensor and needs to send aggregated information or during the device conguration phase. It is also used for all the other services which are available in SDS. The availability, in the Zigbee MAC frame, of a data eld greater than that in CAN allows one to send several different information, coming from different sensors, inside a single frame. This is a great advantage from the point of view of power consumption because, when a node is awake, it can send into a single frame the information provided by several sensors instead of waking up several times. In the original SDS protocol, a long-form packet must be fragmented into several subsequent MAC frames on the account of the small payload (8 B maximum) carried by a single CAN frame. This is not necessary for ZigBee since each MAC frame can carry up to 102 B, which is several times greater than the CAN payload. Nevertheless, it must be considered that the network in the greenhouse is hybrid (CAN/ZigBee) and that the compatibility between the two protocols must be maintained. For this reason, the need to fragment frames when required has been moved into the CAN/ZigBee bridge. V. B RIDGE The bridge between the wired and wireless sections of the network is a fundamental component for the proper functioning of the system since it must allow for a correct data exchange between heterogeneous networks. Its main task is to manage the conversion between the CAN and ZigBee Physical and MAC protocols. The architecture is shown in Fig. 8. Protocol adaptation in the Physical Layer is trivial since it is performed by hardware components which deal with all the operations required. Instead, protocol conversion in the

MAC Layer requires not only suitable data encoding/decoding and encapsulation/decapsulation but also harmonization of two different behaviors. In particular, two of the main issues solved by the bridge refer to the different lengths of frames in CAN and ZigBee, and in a different way, an acknowledgment is provided. With reference to the rst issue, it must be considered that a CAN frame payload is limited to 8 B (this requires fragmentation of longer packets sent by the Application Layer), whereas a ZigBee frame can contain up to 102 B in the payload, which corresponds to several CAN frames. For this reason, fragmentation/reassembling of frames must be managed in the hybrid wired/wireless network. With reference to the second issue, in CAN, an Ack is merely sent through on the y modication of a suitable bit inside the frame being transmitted, while in Zigbee, an Ack is a specic message sent by the corresponding node after the reception of a correct frame. The two issues are correlated, since fragmentation of a frame has an impact on the way Acks are handled; thus, they require an integrated management by the bridge. In order to clarify the problem and the solution proposed here, let us consider the case when an SDS long-form packet (SDS-LFP) has to be sent from the application in a ZigBee device to the SCADA through the CAN-based infrastructure. First of all, the packet is transferred to the bridge in a single frame (assuming its length is shorter than 102 B) through a conrmed service at the Data Link Layer. This requires the ZigBee compliant section of the bridge to send an immediate Ack after the reception of the frame. However, this Ack only conrms part of the path followed by the frame, which could suffer some problems in the wired part of the network. Alternatively, if the bridge waited, before transmitting the Ack to the ZigBee sender, that all fragments of the frame would have been conrmed on the CAN side, this could entail for a too long waiting time with possible expiration of time-outs. The solution adopted for the bridge is based on a two-step acknowledgment. As soon as a ZigBee frame arrives to the bridge, an immediate Ack is sent to the sender Zigbee device. This Ack message will not be forwarded to the Application, having only the purpose to avoid unnecessary retransmission caused by time-out expiration. Then, the frame is fragmented inside the bridge and transmitted through the CAN bus. After the reception of the acknowledgments for all the fragments, the bridge will send an explicit aggregate Ack to the Zigbee sender, which will be transferred to the Sender Application as a service conrmation. This procedure is shown in Fig. 9, which shows the sequence of messages in both the wired and wireless sections of the network. A. Device State Machine Each device (both PAN coordinator device, inside the bridge, and simple devices) has been modeled as a three-state machine shown in Fig. 10, which is executed inside the main routine of the devices software. 1) STATE 0Associated action: wait_for_ack is false and Time-out is not expired. The incoming frame is

404

IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 60, NO. 2, FEBRUARY 2011

VI. S OME I MPLEMENTATION N OTES A. Sensor Localization In order to visualize the position of nodes on the SCADA, a localization system has been implemented. A Global Positioning System has been excluded, both for its costs and because its precision is excessive for this application. What is needed is a simple localization system, which allows the automatic placement of the nodes on the SCADA graphical user interface (GUI), in order to monitor their movements and simplify the management of the system by the operator trough intuitive operations. For these reasons, a localization system has been implemented, which is able to use the available network infrastructure. Different techniques dealing with the problem of localization, each having their pros and cons, can be found in literature. Among the most common ones, those based on lateration and ngerprinting have been selected [18]. Lateration, in particular, can be based on different approaches used to measure the distance d between a mobile node and a set of reference nodes whose position is well known. These distances are then used to draw a circle of radius d centered at each reference point. Using three reference nodes, three circles can be drawn, which ideally intersect at the position where the mobile node is located [19]. Different ways can be used to compute the distance d, such as the time of ight and attenuation. The rst one is based on recording the time it takes for a signal to propagate from a sender to a receiver at a known speed (which depends on the kind of signal used, such as ultrasound or RF signals). This approach can be easily implemented in the case of ultrasound (which propagates at low speed) but requires specialized hardware for radio signals. The second approach is based on the fact that the intensity of the received signal in the receiver is inversely proportional to the square of the distance from the source. Thus, given the signal strength at the source, the measured signal strength can be used to estimate the distance between a node and a reference source. This approach is easy to implement, as all wireless boards implement some functionalities which allow the user to read the measured signal intensity. Since this approach possesses low precision (the intensity of the radio signal is inuenced by several unforeseeable causes), it is usually associated to other approaches. Fingerprinting instead is based on two phases: 1) a calibration phase, where, at specic reference positions within the environment of interest, the signal strength from a known source is measured and recorded in a database; 2) a localization phase, where the mobile node measures the received signal strength indication (RSSI) values, which are then compared to the RSSI signatures in the database. The location of the node is identied by the corresponding location of the closest RSSI signature. Both approaches have been used in the localization system: lateration based on attenuation and ngerprinting, trying to cover the cons present in one approach with the pros of the other one. The implementation is detailed in the next section.

Fig. 9. Example of message exchange through the hybrid network.

Fig. 10. State machine of a wireless device.

analyzed. If the frame refers to a write request, the attribute of the addressed embedded object is written. If the service invocation returns a positive Ack, an ACK is generated for the service; on the contrary, if an error code is returned, an error frame for the service is generated. Attribute evaluation, which is a scan cycle of all the attributes of the embedded objects, is performed. Timer expiration is checked rst. The timer of an embedded object is expired when the attribute cyclic timer reaches the value expressed by the COUNTER (which counts the execution number of the state machine). Time is expressed as the number of time slots, which corresponds to the FSM_PERIOD. When a timer expires, an event frame with Event_id = 3 is transmitted. Moreover, the presence of dirty bit in the input variables is checked. If an embedded object has modied the value of one attribute, an event frame with Event_id = 6 is transmitted. 2) STATE 1Associated actions: wait_for_ack is true and Time-out is not expired. The incoming frame is analyzed, and the frame identier is compared with that of the frame just transmitted. If it is ok (an Ack arrives), the machine passes to State 0. If it is a wrong frame, the machine continues with State 1. 3) STATE 2Associated actions: wait_for_ack is true and Time-out is expired. Frame retransmission: If the nth time-out, where n < 3 is expired, the unconrmed frame is sent again, and the status is not changed. If n == 3 (three expired time-outs), the error is notied, and a switching to State 0 is activated.

MIRABELLA AND BRISCHETTO: WIRED/WIRELESS NETWORKING INFRASTRUCTURE FOR GREENHOUSE MANAGEMENT

405

then
2 2 r1 (xM x1 )2 = r2 (x2 xM )2 .

Developing the last equation, it is trivial to obtain the following: xM =


Fig. 11. Localization example.
2 2 r1 r2 + x2 x2 2 1 2(x2 x1 )

(1)

and nally yM = y1 +
2 r1 (xM x1 )2 .

B. Implementation on the Xbee Platform The wireless nodes which have been used are based on the Maxstreams Xbee RF modules, which are ZigBee/IEEE 802.15.4 compliant and work in the ISM 2.4-GHz band. These devices are simple to use and cheap and allow high-reliability communications. The Physical Layer is implemented inside the Freescale radio chip MC13192 [20], while the MAC layer is implemented, along with the operating system that manages the node, inside the Freescales low-power microcontroller unit MC9S08GT60. The Physical Layer Management Entity energy detection primitive available at the PHY Management Service is used to know the receiving power. It allows a device to know the available energy in a channel (energy detection). This value is available to the upper layers; thus, it can be used for the localization algorithm. In the Xbee modules, the RSSI is computed as the average value of the received power in a time interval of 128 s (eight symbol periods). Then, this value is stored in an 8-b register. The typical values of the measured RSSI are in the range from 95 to 18 dBm, which correspond to values, in the mentioned register, from 190d (0 BE) to 33d (0 24). A precise localization requires a quite high number of reference stations (three is the minimum number which is usually adopted). On the other hand, it is necessary to limit the number of reference stations whose function is only to provide a support for the localization of mobile sensors. For this reason, the environment where the mobile nodes can move has been limited to the rst quadrant of a Cartesian coordinate system. Under this assumption, it is possible to compute the coordinates of the mobile nodes with a simplied version of the triangulation technique using only two known points as reference. As an example, the node layout shown in Fig. 11 can be considered. Here, two base stations (BSs) BS1 and BS2 , whose positions (X1 , Y1 ) and (X2 , Y1 ) are known, represent the corner of a triangle. Both BSs have the same Y coordinate (Y 1) because they must lie on the same line parallel to one of the coordinate axes of the reference system used to express the position of the nodes. Considering the mobile node as the third corner, two rectangle triangles are obtained, which have a side in common. By estimating their hypotenuses r1 and r2 , using the RSSI information, and applying the Pythagorean theorem, it is possible to compute the coordinates XM and YM . In fact, considering the two rectangle triangles, the following equations are derived:
2 (xM x1 )2 + (yM y1 )2 = r1 2 (x2 xM )2 + (yM y1 )2 = r2

(2)

This localization system therefore requires at least two BSs, whose position is known inside the greenhouse. One BS is represented by the wireless section of the bridge, whereas the other one must be a xed wireless station which has only the task to provide a reference signal. This second station represents an additional cost for the system, but its presence is required for the localization. Every time a mobile node is moved to a new position, it requires to be localized again. In this case, the operator presses a button on the sensor board to start the localization process. During the localization process, the duty cycle of the mobile node changes. In particular, the duty cycle is increased so that the node can be easily detected by the BSs. The BSs read the RSSI of the messages sent by the mobile node and send this information to the remote controller through the wired backbone. The remote controller then estimates the distances from the known BS positions and computes the actual node position using (1) and (2). As stated before, in order to improve the localization quality, a ngerprinting approach has been used as well. To this aim, during the calibration phase, the greenhouse surface is logically divided into a square grid with an element side of 1 m. For every cross-point of this grid, a node is used to broadcast beacon messages characterized by an ID to the BSs. Each BSi , which measures the signal strength of these beacons, sends the RSSI measurements to the controller, which nally collects, organizes, and records these measurements to be used as reference values during the localization phase. The coordinates of mobile nodes are then computed both by comparing the actual measured RSSIs with the recorded values and by (1) and (2). According to this approach, the controller must store the database of the ngerprint measurements and also perform the computations needed to discover the node position. The mobile node does not require storing data or performing computations. This way, the power consumption can be reduced, and cheaper nodes can be used. VII. T EST OF THE S YSTEM The greenhouse control system is made up of several elements which have been worked out separately and then integrated. For this reason, the testing of the system has been performed according to two separate steps: 1) single-component test; 2) integration and usability test.

406

IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 60, NO. 2, FEBRUARY 2011

Fig. 12. Errors in the X coordinate.

from and send command to some devices through the hybrid communication network. The test was limited only to the use of the main fuctionalities available at the Application Layer since its aim was only to verify the possibility of integrating all components in the greenhouse application. With regard to the GUI, two different approaches were tested. The rst is based on a traditional keyboard and LCD monitor, and the second one is based on a touch-screen (TS) monitor. Even if the rst approach allowed one to dene a more detailed interface, the second approach has shown greater usability: the possibility for the farmer to interact directly with the application even through a simplied TS interface has shown to be very attractive. VIII. C ONCLUSION This paper has presented a communication system for the monitoring and control of greenhouses. This system is characterized by some attractive features, for example, the use of a hybrid wired/wireless communication infrastructure which simplies the deployment of sensors and their localization on the ground and makes the system highly scalable. Moreover, besides using two different networks (wired and wireless), the Application Layer based on SDS provides a unied service set which can be used by the application processes without the need to distinguish if a device belongs to the wired or wireless network. This way, all devices are managed as if they belong to a single network. This required the implementation of a suitable bridge that is able to hide the differences between the two protocols and make the system uniform. The system has also been shortly tested in an open-air eld, still showing its exibility and its ability to operate in different environments. R EFERENCES
[1] Y. Zhou, X. Yang, X. Guo, M. Zhou, and L. Wang, A design of greenhouse monitoring & control system based on ZigBee wireless sensor network, in Proc. Int. Conf. WiCom, Sep. 2125, 2007, pp. 25632567. [2] L. Gonda and C. E. Cugnasca, A proposal of greenhouse control using wireless sensor networks, in Proc. 4th World Congr. Conf. Comput. Agric. Nat. Resour., Orlando, FL, Jul. 2426, 2006. [3] B. van Tuijl, E. van Os, and E. van Henten, Wireless sensor networks: State of the art and future perspective, in Proc. Int. Symp. High Technol. Greenhouse Syst. Manage. (Greensys), 2007, pp. 547554. [4] G. Gaderer, P. Loschmidt, and A. Mahmood, A novel approach for exible wireless automation in real-time environments, in Proc. IEEE Int. WFCS, Dresden, Germany, May 2123, 2008, pp. 8184. [5] L. Rauchhaupt, System and device architecture of a radio based eldbusThe RFieldbus system, in Proc. 4th IEEE Int. Workshop Factory Commun. Syst., 2002, pp. 185192. [6] J. R. Gallardo, A. Gonzalez, L. Villasenor-Gonzalez, and J. Sanchez, Multipath routing using generalized load sharing for wireless sensor networks, in Proc. WOC, Montreal, QC, Canada, May 30Jun. 1, 2007. [7] R. W. N. Pazzi and A. Boukerche, Mobile data collector strategy for delay-sensitive applications over wireless sensor networks, Comput. Commun., vol. 31, no. 5, pp. 10281039, Mar. 25, 2008. [8] CAN In Automation (CIA), CAN Specication 2.0, Part A and Part B. [Online]. Available: http://www.can-cia.de/ [9] IEEE Standard for Information TechnologyTelecommunications and Information Exchange Between SystemsLocal and Metropolitan Area Networks Specic Requirements Part 15.4: Wireless Medium Access Control (MAC) and Physical Layer (PHY) Specications for Low-Rate Wireless Personal Area Networks (LR-WPANs), 802.15.4-2006, 2003. [10] Homepage of ZigBee Alliance. [Online]. Available: http://www. zigbee.org/ [11] Smart Distributed System (SDS), IEC/CENELEC Standard 62026-5, 2000.

Fig. 13. Errors in the Y coordinate.

A. Single-Component Test In this phase, all components have been tested separately in order to detect possible problems in the implementation. Some subsystems, e.g., CAN, ZigBee, and bridge, have exhibited very satisfactory performances, as they were able to carry data correctly, working at the congured bit rate. The SCADA system has been subjected only to a functional test since it is strongly inuenced by the specic implementation of the control models inside the rst and second levels of the control architecture. These models must be dened through a strict cooperation between the farmer and the control engineer and still represent a partially open issue. A component in the localization system was subjected to a careful test, with the aim to verify the limits of the proposed approach. Several tests were performed using (1) and (2), together with the ngerprinting approach. Figs. 12 and 13 show the errors between the real X and Y coordinates and those computed by the localization system, in 50 different positions inside the greenhouse. As it is shown, the maximum error is limited to 0.5 m, which is acceptable for this application. Higher precision would require more sophisticated and expensive approaches without introducing real advantages. The measurements have shown the same accuracy under both dry and humid conditions in the greenhouse, this way demonstrating that air humidity does not affect the RSSI. Instead, if the irrigation plant is turned on, the rain can produce some unpredictable errors. B. Integration and Usability Test The integration test consisted mainly of some joint communication and control tests. The SCADA system was able to read

MIRABELLA AND BRISCHETTO: WIRED/WIRELESS NETWORKING INFRASTRUCTURE FOR GREENHOUSE MANAGEMENT

407

[12] X. Huang and B. Huang, Multi-loop decentralized PID control based on covariance control criteria: An LMI approach, ISA Trans., vol. 43, no. 1, pp. 4959, Jan. 2004. [13] J. Bao, J. F. Forbes, and P. J. McLellan, Robust multiloop PID controller design: A successive semidenite programming approach, Ind. Eng. Chem. Res., vol. 38, no. 9, pp. 34073419, Aug. 1999. [14] F. Zheng, Q. G. Wang, and T. H. Lee, On the design of multivariable PID controllers via LMI approach, Automatica, vol. 38, no. 3, pp. 517526, Mar. 2002. [15] Open DeviceNet Vendor Association, DeviceNet Specication Release 2.0. [16] CiA DS-301, V3.0: CANopen Communication Prole, Oct. 1996. [17] SDS Application Layer Protocol Specication, Version 2.0. [Online]. Available: http://content.honeywell.com/sensing/prodinfo/sds/ specications/gs052103.pdf [18] J. Hightower and G. Borriello, A Survey and Taxonomy of Location Systems for Ubiquitous Computing, Univ. Washington, Washington, DC, Tech. Rep. UW-CSE 01-08-03, Aug. 24, 2001. [19] B. Li, J. Salter, A. Dempster, and C. Rizos, Indoor Positioning Techniques Based on Wireless LAN, 2007. [20] Freescale Semicond., Austin, TX, Document Number: MC13192RM MC13192RM.pdf Reference Manual, 2008.

Michele Brischetto received the M.D. degree in computer engineering and the Ph.D. degree in computer and telecommunications engineering from the University of Catania, Catania, Italy, in 2002 and 2010, respectively. He is currently with the Computer Engineering Department, Faculty of Engineering, University of Catania. His research activity mainly focuses on wireless networks, with special interest on the use of wireless networks for automation.

Orazio Mirabella (SM09) received the M.S. degree in physics from the Science Faculty, University of Catania, Catania, Italy. He is currently a Full Professor of computer networks with the Computer Engineering Department, Faculty of Engineering, University of Catania, Catania, Italy. He coauthored more than 120 scientic papers published on international journals and conferences. His main research activities are in the areas of real-time communication systems and hard real-time process control systems. In such a context, he has studied problems related to the integration of eldbuses into process control systems, has evaluated the ability of eldbuses for supporting communications in industrial plants, and has developed some scheduling algorithms for process control. He has also studied problems related to wireless networks and their use in process control systems, with particular reference to ZigBee and WiFi. Prof. Mirabella has served as a member of the International Electrotechnical Commission (IEC) Subcommittee SC65C/WG6 since 1982, working on the denition of standard time-critical networks. He is currently a member of IEC Committee SC 65C/WG12: Functional Safety for Communications.

Das könnte Ihnen auch gefallen