1. Introduction
Nowadays, the agro-alimentary sector is incorporating new technologies due to the large production demands and the diversity, quality, and market presentation requirements. A technological renovation of the sector is being required where the control engineering plays a decisive role. Automatic control and robotics techniques are incorporated in all the agricultural production levels: planting, production, harvest, post-harvest processes, and transportation. Modern agriculture is subjected to regulations in terms of quality and environmental impact, and thus it is a field where the application of automatic control techniques has increased substantially during the last years [
1-
5].
As it is well-known, greenhouses have a very extensive surface where the climate conditions can vary at different points (spatial distributed nature). Despite of that feature, it is very common to install only one sensor for each climatic variable in a fixed point of the greenhouse as representative of the main dynamics of the system. One of the reasons is that typical greenhouse installations require a large amount of wire to distribute sensors and actuators. Therefore, the system becomes complex and expensive and the addition of new sensors or actuators at different points in the greenhouses is thus quite limited.
In the last years, Wireless Sensor Networks (WSN) are becoming an important solution to this problem [
6-
7]. WSN is a collection of sensor and actuators nodes linked by a wireless medium to perform distributed sensing and acting tasks [
8]. The sensor nodes collect data and communicate over a network environment to a computer system, which is called, a base station. Based on the information collected, the base station takes decisions and then the actuator nodes perform appropriate actions upon the environment. This process allows users to sense and control the environment from anywhere [
7]. There are many situations in which the application of the WSN is preferred, for instance, environment monitoring, product quality monitoring, and others where supervision of big areas is necessary [
9]. In this work, WSN are used in combination with event-based systems to control the inside greenhouse climate.
On the other hand, event-based systems are becoming increasingly commonplace, particularly for distributed real-time sensing and control. A characteristic application running on an event-based operating system is that where state variables will typically be updated asynchronously in time, for instance, when an event of interest is detected or because of delay in computation and/or communication [
10]. Event-based control systems are currently being presented as solutions to many control problems [
10-
13]. In event-based control systems, the proper dynamic evolution of the system variables is what decides when the next control action will be executed, whereas in a time-based control system, the autonomous progression of the time is what triggers the execution of control actions. The fundamental reason for the predominance of the time-based control systems has been based on the existence of a well established theory for control systems with a constant sampling time [
14]. However, current distributed control systems also impose restrictions on the architecture of the system that makes difficult the adoption of a paradigm based on events activated per time. For instance, in the case of closed-loop control using computer networks or buses (such as field bus, local network area, or Internet), where asynchronous communication is required. An alternative to these approaches consists of using event-based controllers that are not restricted to the synchronous occurrence of controller actions. The employment of synchronous sampling period is one of the severest conditions that control engineers follow for implementation tasks. Many examples can be found, such as mobile phones, printing devices, or PDA's. The complexity of these devices (processes), as well as the complexity of the controller, is increasing very fast. These requirements can be reduced with event-based controllers, where the control actions can be executed in an asynchronous way [
15].
Control problems in greenhouses are mainly focused on fertirrigation and climate systems. The fertirrigation control problem is usually solved providing the amount of water and fertilizers required by the crop. The climate control problem consists in keeping the greenhouse temperature and humidity in specific ranges despite of disturbances. Adaptive and feedforward controllers are commonly used for the climate control problem. Therefore, fertirrigation and climate systems can be represented as event-based control problems where control actions will be calculated and performed when required by the system, for instance, when water is required by the crop or when ventilation must be closed due to changes in outside weather conditions. Furthermore, such as discussed above, with event-based control systems a new control signal is only generated when a change is detected in the system. That is, the control signal commutations are produced only when events occur. This fact is very important for the actuator life and from an economical point of view (reducing the use of electricity or fuel), especially in greenhouses where commonly actuators are composed by mechanical devices controlled by relays.
Therefore, this paper presents the combination of WSN and event-based control systems to be applied in greenhouses. The main focus of this paper is therefore the presentation of a complex real application where using a WSN, as an emerging technology and Event-Based Control, as a new paradigm in process control, the following issues have been addressed:
the issues posed to a multivariable, interacting control system by possibly faulty communications (as in a wireless context),
the location of sensors to correctly represent, for the purpose of control, spatially distributed quantities,
the efficient use of actuators, the term “efficient” referring also to correct use and wear minimization,
the effects of event-based sampling.
As a first approximation, event-based control has been applied for temperature and humidity control issues. The main advantages of the proposed control problem in comparison with previous works is that promising performance results are reached reducing the use of wire and the changes on the control signals, what it is translated into reductions on costs and a longer actuator life. The ideas presented in this paper could be easily extrapolated, for instance, to building automation.
The work is organized as follows. Section 2 is devoted to describe the greenhouse climate control problem. Afterwards, the event-based system and WSN for the greenhouse temperature control is discussed. Simulations results are presented in section 4. Finally, some conclusions are given in Section 5.
4. Simulation Results
4.1. Material and Methods
The simulations presented in this section have been performed using the greenhouse climatic model developed by [
16] and the TrueTime MATLAB/Simulink toolbox [
26], [
27].
As commented above, the dynamic behavior of the microclimate inside the greenhouse is a combination of physical processes involving energy transfer (radiation and heat) and mass balance (water vapor fluxes and CO2 concentration). The greenhouse climate model developed in [
16] capturates this dynamic behavior and it can be summarized as:
where
X =
X(t) is a
n1-dimensional vector of greenhouse climate state variables (mainly the inside air temperature and humidity, CO
2 concentration, PAR radiation, soil surface temperature, cover temperature, and plant temperature),
U =
U(t) is a
m-dimensional vector of input variables (in this work natural vents and heating system),
D =
D(t) is an
o-dimensional vector of disturbances (outside temperature and humidity, wind speed and direction, outside radiation, and rain),
V =
V (t) is a
p-dimensional vector of system variables (related to transpiration, condensation, and other processes),
C is a
q-dimensional vector of system constants,
t is the time,
Xi are the known states at the initial time
ti, and
f =
f(t) is a nonlinear function based on mass and heat transfer balances.
The model has been developed using an object-oriented approach, so that the model hierarchy allows performing a modular parameter identification procedure. The values of the coefficients of the physical processes involved in the previous equation (which are the basis for the formulation of the nonlinear simulation models) have been obtained using both iterative search and genetic algorithms. A large set of input/output data has been used for calibration purposes covering different operating conditions obtained at the real greenhouse (data for six years).
The original data used for the model and for the simulations described in this paper were measured from a Parral greenhouse located at The Cajamar Foundation (El Ejido, Almería, South-East Spain). The covering material is a 200-micron thick PE film, laid on a galvanized steel structure. The air temperature thermoresistance sensors and the air relative humidity capacitive sensors were placed at the top of the crop. A meteorological station was installed outside at a height of 6 m for measurements of temperature, relative humidity, global and PAR radiation, rain, and wind speed and direction.
As commented above, the greenhouse climate model has been used in combination with the TrueTime toolbox. TrueTime is a tool developed to simulate the real-time systems, networked control systems, communication models, and WSN [
27]. The main feature of TrueTime is the possibility of co-simulation of the interaction between the real-world continuous dynamics and the computer architecture in the form of task execution and network communication. TrueTime computer block execute user-defined tasks and interrupt handlers representing, for instance, I/O tasks, control algorithms, and network drivers. The scheduling policy of the individual computer block is arbitrary and decided by the user. TrueTime allows simulation of context switching and task synchronization using events or monitors [
27].
Figure 5 shows the simulation scheme including the greenhouse model (in green), the wireless network (in yellow), and the controllers (in red). A real WSN based on IEEE 802.15.4 ZigBee protocol [
28] has been simulated to perform the communications between wireless devices located at the greenhouse model and the simulated computer. Notice how in the simulation blocks are not connected in order to represent wireless communication.
4.2. Climate Monitoring and Data Transmission
Climate monitoring is vitally important to the operation in greenhouses and the quality of the collected information has a great influence on the precision and accuracy of control results. Currently, the agro-alimentary market field incorporates diverse data acquisition techniques. Normally, the type of acquisition system is chosen to be optimal for the control algorithm to be used. For traditional climate monitoring and control systems, all sensors are distributed through the greenhouse and connected to the device performing the control tasks. These equipments use time-based data sampling techniques as a consequence of using time-based controllers. Nowadays, commercial systems present more flexibility in the implementation of control algorithms and sampling techniques, especially WSN, where each node of the network can be programmed with a different sampling algorithm or local control algorithm with the main goal of optimizing the overall performance.
In modern control systems, it is common to use communication networks to transmit data between different control system blocks. Large amount of data are usually transmitted, the data required by the controller in each sampling time being especially critical. The most reasonable solution from an economical point of view is to make use of existing network structure, and to share the network resources between different services, for instance, using Ethernet networks. Sometimes, this solution can produce a big network traffic burden (in a typical greenhouse control system, all data are transmitted every minute or even faster) and introduce time delays in the delivery of the data packets. When the network loads increase, the probability of data losses increases too, and this factor can be very negative for control performance. In some extreme examples, the control system needs dedicated network structure to minimize the time delay and the data losses. On the other hand, the development of network structures in places with large distances, such as in greenhouse installations, can become very expensive and with a complicated management. Wireless networks present an economic and useful solution to this problem, and more concretely, WSN for recording data and control purposes.
However, most transceivers in WSN are battery powered and the power consumption is a critical parameter. Every transmission means bigger power consumption and thus these systems present the problem of limitation in the amount of data to transmit. A solution to this problem is the use of event-based sampling, that is, the level crossing sampling technique described in previous sections. This technique allows that only the necessary data will be transmitted and thus only the necessary power will be consumed.
As commented above, in this study the viability to implement a WSN based on IEEE 802.15.4 ZigBee protocol is analyzed and its combination with level crossing sampling in the control of greenhouse climatic. Simulation results were evaluated for a full crop campaign of 120 days. In this paper, eight days have been selected as representative to show the obtained results. The limits described in
Table 1 were used for the level crossing sampling.
Table 2 presents the results obtained after simulation for the representative eight days, where the comparison of data transmission is presented for the greenhouse variables. The table compares the number of samples obtained and transmitted using level crossing sampling with a timed-based sampling where data is transmitted every minute (as usual in greenhouse control systems). As it can be observed, a considerable saving in transmission is obtained for both limits,
δ = 3 % and
δ = 5 %, obtaining transmission saving values over 90 % for most of the variables. Furthermore, it is observed that the amount of transmitted data is smaller when the
δ limit is bigger. So, it is clear that the number of samples depends on 2 factors: the limit
δ and the variable dynamics. The effects of the
δ limit can be observed in
Figure 6 where the transmission of the inside temperature signal is shown. As it can be noticed, the transmission data is smaller for
δ = 5% but proving a bigger signal destruction.
On the other hand, the variable dynamics highly affects the number of samples taken. This can be observed for variables with high-frequency component such as the wind speed and direction.
Figure 7 shows the transmission data for the wind speed. The transmission data from the sensors using level crossing sampling is shown on the top graphic, where a high transmission frequency is observed. However, in order to reduce the number of events created by this variable, the signal is filtered in the event generator before detecting and sending events to the controller. The bottom graphic shows how the number of samples-events has been considerable reduced after filtering the signal.
In conclusion, by choosing δ = 3%, it is possible to obtain a high reduction of acquired samples without relevant loss of information in the signals from a control design point of view. Therefore, this value of the δ limit will be used from now on.
4.3. Event-Based Control for Inside Temperature
This section presents the simulation results obtained for the greenhouse climatic control problem. The control system works such as described in
Figure 4, where the controller only calculates a control signal when an event happens. The event triggering is governed by an event generator which detects the possible events affecting the controller. For this simulation study, these events are represented by changes on: set-point, inside temperature, outside temperature, humidity, and wind speed.
Figure 8 shows how the events are generated from changes in the outside temperature. Red lines indicate the event triggering by changes of the variable. The control results for the event-based control are presented as sampled signals in order to show better the influence of the events.
As discussed above, eight days are shown as representative of the simulation study. The temperature set-point was set at 26 °C and 17 °C for diurnal and nocturnal periods, respectively.
Figures 9 presents the simulation results for diurnal period, with the purpose of showing up the influence of event based controller. This figure compares a time-based controller and an event-based controller with
δ = 3 %.
Figure 10 shows the comparison of the control results obtained using classic time-based control and event-based control for nocturnal period, where only nocturnal band of interest is shown. To present the influence of Level Crossing Sampling (LCS) in each figure, the inside temperature signal is shown after and before sampling. It can be seen that the time-based controller obtains better performance results but at expense of providing a major number of commutations of the control signal, such as observed in
Figure 11, where the control results for the fifth day are shown. It can be observed that the inside temperature signal is within acceptable ranges for the event based controller (errors of less than 0.2 °C). The main advantage of event-based controller is reflected in the resulting control signals, where the number of commutation is considerably smaller than in the case of the classic controller.
This fact can be better seen in
Figure 12, which presents simulation results for the nocturnal period. A clear reduction in the control signal commutations is observed even using on/off controllers. However, in this case the control of the inside temperature using event-based control presents with bigger errors. This clearly established that a compromise between
δ and the error value must be accomplished. In this sense,
δ could be used as a tuning parameter for the compromise between control performance and reduction of the control signal changes.
From the previous results, it is observed that the number of changes in the control signals is much smaller for the event-based control cases. This fact is a key issue in the actuator lifetime, especially in greenhouses where the ventilation and heating systems are composed by mechanical actuators.
Another interesting result is to study the system response to load disturbances from an event-based point of view.
Figure 13 shows two different situations where the event-based control system reacts against events produced by changes in the outside temperature and the wind speed. At
t = 3,660 min, an event is generated due to a change in the outside temperature, resulting in a reaction of the controller to produce a new control signal. Notice that at this time, the wind speed is constant. On the other hand, at
t = 3,673 min, the outside temperature is constant. However, the controller calculates a new control signal because an event comes as consequence of a change in the wind speed.
4.4. Event-Based Control for Inside Humidity
Figure 14 demonstrates the simulation results for temperature and humidity control using event-based control with
δ = 3 %. The control of humidity has been realized by the modification of the inside temperature set-point such as described in Section 2.3. In this case study, the aforementioned set-point was modified in the ranges ±2 and ±5 °C. The humidity reference was set to 80%, to be controlled with a tolerance of ±20%. For the first case, with a maximum modification of ±2 °C, it can be observed that the humidity control has a lower priority than the temperature controller. That is reflected in the humidity signal, which changed its value without reaching the set-point. The modification of the set-point allowed changing the humidity level around 10%, and it was controlled within the desired tolerance (±20%). In the second case, where the temperature set-point can be modified up to ±5 °C, the humidity controller is working with a higher priority than the temperature controller. Hence, it is observed that the inside humidity level is located near the set-point but it produces non-permissible higher errors in the control of the inside temperature.
4.5. Analysis from Numerical Results
After analyzing the results discussed above, a numerical comparative study was done based on the commutations or changes in the control signals and the control performance results.
Figure 15 shows a comparison of the changes in the control signal for the time-based control, even-based control with
δ=3 %, and event-based control with
δ=5 %. As observed, for the diurnal temperature control with ventilation, the time-based control produced 539 changes in the control signal, while 113 and 86 changes where obtained for event-based control with
δ=3 % and
δ=5 %, respectively. For the nocturnal period, 3,429 changes was obtained for the classic controller, 1410 with
δ = 3 %, and 804 with
δ = 5 %. The activation of the humidity controller increases significantly the number of changes for the diurnal periods as a consequence of the changes in the inside temperature set-point. Thus, using event-based control it is possible to reduce the number of changes in more than the 80 % just for eight days. For a full crop campaign the reduction was around 82 %. This is a very important factor for the actuator lifetime and also from an economical point of view, since the use of electricity and fuel is considerably reduced.
On the other hand, as it was observed from the simulation results, the performance on the controlled variable is deteriorated when using event-based control. Hence, the integral absolute error (IAE) has been used as measurement to compare performance quality.
Figure 16 shows the results of this comparison. As expected, the time-based controller presents better performance results, with the event-based controller giving
δ = 3 % lower IAE values than the case with δ = 5 %. However, it can be seen that the performance results for
δ = 3 % are not so far from those obtained using time-based control. Therefore, a compromise must be accomplished between performance and number of commutations. For the results presented in this paper, an event-based controller with
δ = 3 % can be selected as a good choice since it presents acceptable performance results for the greenhouse climate control problem with a very important reduction in the control signals commutation.
Finally, an interesting result is that event-based controller with δ = 3 % provides better performance results than the time-based for some specific days, for instance, for the sixth day in the control with ventilation and for the eighth day in the control with humidity. This is because the time-based controller acts even for small error values, while the event-based one only works when the error is bigger than δ, thus keeping constant the error for longer periods of time.
5. Conclusions
This work presents an event-based control technique and its combination with WSN to solve the greenhouse climate control problem. Thanks to the combination of level crossing sampling with WSN, it was possible to obtain satisfactory results in the climate monitoring data transmission part. The event-based controller has allowed a considerable decrease in the number of changes in the control action and made possible a study of the compromise between quantity of transmission and control performance. The limit of the level crossing sampling has presented a great influence on the event-based control performance where, for the greenhouse climate control problem, a value of 3% has provided promising results.
On the other hand, event-based control reduced the number of changes by more than 80 % in comparison with a traditional time-based controller. This result is a key issue for greenhouses since it allows reduction of the electricity costs and increases the actuator lifetime. Further work is planned to test these ideas using other greenhouse control algorithms, e.g. fertirrigation control, where it would be also possible to obtain promising results from an economical point of view.
Furthermore, all simulated ideas will be implemented in a real greenhouse environment with the aim of verifying the obtained results in this simulation study. Notice that the proposed solutions can be easy implemented to any kind of WSN platform due to its small computational complexity.