During last years, event-based sampling and control are receiving special attention from researchers in wireless sensor networks (WSN) and networked control systems (NCS). The reason to deserve this attention is due to event-based strategies reduce the exchange of information between sensors, controllers, and actuators. This reduction of information is equivalent to extend the lifetime of battery-powered wireless sensors, to reduce the computational load in embedded devices, or to cut down the network bandwidth (Miskowicz, 2005).
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 are updated asynchronously in time, e.g., when an event of interest is detected or because of delays in the computation and/or communication tasks (Sandee, 2005). Event-based control systems are currently being presented as solutions to many control problems (Arzen, 1999); (Sandee, 2005); (Miskowicz, 2005); (Astrom, 2007); (Henningsson et al., 2008). In event-based control systems, it is the proper dynamic evolution of system variables 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 (Astrom & Wittenmark 1997). Current distributed control systems impose restrictions on the system architecture that makes difficult the adoption of a paradigm based on events activated per time. Especially, in the case of closed-loop control using computer networks or buses, as happens with field buses, local area networks, or even Internet. An alternative to these approaches consists of using event-based controllers that are not restricted to the synchronous occurrence of controller actions. The utilization of synchronous sampling period is one of the severest conditions that control engineers impose on the software implementation. As discussed above, in an event-based control system the control actions are executed in an asynchronous way, that is, the sampling period is governed by system events and it is called event-based sampling. The event-based sampling indicates that the most appropriate method of sampling consists of transmitting information only when a significant change happens in the signal that justifies the acquisition of a new sample. Researchers have demonstrated special interest on these sampling techniques (Vasyuntynskyy & Kabitzsch, 2006); (Miskowicz, 2007); (Suh, 2007) (Dormido et al., 2008). 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 or local control algorithm with the main goal of optimizing the overall performance. This kind of solution allows control engineers to distribute the control process, considering centralized supervision of all variables, thanks to the application of wireless communications. Furthermore, remote monitoring and control through data-communication networks are very popular for process supervision and control (Banatre at al., 2008). The usage of networks provides many well-known benefits, but it also presents some limitations in the amount of transmitted data. This fact is especially visible in WSN, where the bandwidth of the communication channels is limited and typically all nodes are battery-powered. Event-based sampling techniques appear as possible solutions to face this problem allowing considerably saving of network resources and reducing the power consumption. On the other hand, the control system performance is highly affected due to the event-based sampling techniques, being necessary to analyze and study a compromise between control quality and reduction in the control signal commutations.
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, harvesting and post-harvesting 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 last years (King & Sigrimis, 2000); (Sigrimis, 2001); (Farks, 2005); (Straten, 2007). As is well-known, greenhouses occupy very extensive surfaces where 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, WSN are becoming a convenient solution to this problem (Gonda & Cugnasca, 2006); (Narasimhan et al., 2007). A WSN is a collection of sensors and actuators nodes linked by a wireless medium to perform distributed sensing and acting tasks (Zhu et. al., 2006). The sensor nodes collect data and communicate over a network environment with a computer system, which is called base station. Based on the information collected, the base station takes decisions and then the actuator nodes perform the appropriate actions over the environment. This process allows users to sense and control the environment from anywhere (Gonda & Cugnasca, 2006). 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 (Feng et al., 2007). In this work, WSN are used in combination with event-based systems to control the inside greenhouse climate.
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 of keeping the greenhouse temperature and humidity in specific ranges despite of disturbances. Adaptive and feedforward controllers are commonly used for climate control problems. 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 work presents the combination of WSN and event-based control systems to be applied in greenhouses. The main focus of this chapter is therefore the presentation of a complex real application using a WSN, as an emerging technology, and an 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 advantage 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 of the control signals, which are translated into reductions of costs and a longer actuator life. The ideas presented in this chapter could be easily extrapolated, for instance, to building automation.
2. The climatic control problem in greenhouses
2.1. Description of the climatic control problem
Crop growth is mainly influenced by the surrounding environmental climatic variables and by the amount of water and fertilizers supplied by irrigation. This is the main reason why a greenhouse is ideal for cultivation, since it constitutes a closed environment in which climatic and fertirrigation variables can be controlled to allow an optimal growth and development of the crop. The climate and the fertirrigation are two independent systems with different control problems. Empirically, the requirements of water and nutrients of different crop species are known and, in fact, the first automated systems were focused to control these variables. As the problem of greenhouse crop production is a complex issue, an extended simplification consists of supposing that plants receive the amount of water and fertilizers that they require at every moment. In this way, the problem is reduced to the control of crop growth as a function of climate environmental conditions (Rodríguez, 2002); (Rodríguez, 2008).
The dynamic behaviour of the greenhouse microclimate is a combination of physical processes involving energy transfer (radiation and heat) and mass balance (water vapour fluxes and CO2 concentration). These processes depend on the external environmental conditions, structure of the greenhouse, type and state of the crop, and on the effect of the control actuators (Bot, 1983). The main ways of controlling the greenhouse climate are by using ventilation and heating to modify inside temperature and humidity conditions, shading and artificial light to change internal radiation, CO2 injection to influence photosynthesis, and fogging/misting for humidity enrichment. A deeper study about the features of the climatic control problem can be found in (Rodríguez, 2002).
The approach presented in this work is applied to the climatic conditions of the mild winter in Southern Europe (the data used for the simulations performed in this work have been collected in a greenhouse located at Southeastern Spain), where the production in greenhouses is made without CO2 enrichment and the demand of quality products is increasing every day. Considering the greenhouse structures, the commonest actuators, the crop types, and the commercial conditions of this geographical area, the main climate variables to control are the temperature and the humidity. The PAR (Photosynthetically Active Radiation with a spectral range from 400 to 700 Wm2) is used by the plants as energy source in the photosynthesis process.) and it is controlled with shade screens but its use is not much extended. So, this work is focused on the temperature control problems.
2.2. Air temperature control
Plants grow under the influence of the PAR radiation (diurnal conditions) performing the photosynthesis process. Furthermore, temperature influences the speed of sugar production by photosynthesis, and thus radiation and temperature have to be in balance in the way that a higher radiation level corresponds to a higher temperature. Hence, under diurnal conditions, it is necessary to maintain the temperature in a high level, being optimal for the photosynthesis process. In nocturnal conditions, plants are not active (the crop does not grow); therefore it is not necessary to maintain such a high temperature. For this reason, two temperature set-points are usually considered: diurnal and nocturnal (Kamp & Timmerman, 1996).
Due to the favorable climate conditions of Southeastern Spain, during the daytime the energy required to reach the optimal temperature is provided by the sun. In fact, the usual diurnal temperature control problem is the refrigeration of the greenhouse (with temperatures higher than the diurnal setpoint) using natural ventilation to reach the optimal diurnal temperature. On the other side, the nocturnal temperature control problem is the heating of the greenhouse (with temperatures lower than the nocturnal set-point) using heating systems to reach the nocturnal optimal temperature. In Southeastern Spain, forced-air heaters are commonly used as heating systems. In this work, the diurnal and nocturnal temperature control is analyzed to test the proposed event-based control. Therefore, typical temperature control systems with ventilation and heating are described in the following section.
The natural ventilation determines the air exchange and air flow in the greenhouse as a consequence of the differences between outside and inside temperatures. The relationship between vents aperture and inside temperature is not linear (Rodríguez, 2001), but instead of using a nonlinear control schema, it was decided to implement a gain-scheduling control algorithm based on linear models for each operating point (see Figure 2). Most commercial solutions include this kind of gain scheduling controllers to cope with both fast and slow changing dynamics due to disturbances.
This controller consists of a gain-scheduling PI scheme where the controller parameters are changed based on some disturbances: outside temperature and wind speed. For the nocturnal temperature control, there exist many control strategies, but for this study an on/off control with dead zone is used in forced-air heaters, which is the controller commonly used in conventional greenhouses. A full description of these algorithms can be found in (Rodríguez, 2002).
2.3. Event-based control in greenhouses with WSN
As discussed above, in an event-based control system, the control actions are executed in an asynchronous way. The event-based sampling suggests that the most appropriate method of sampling consist of transmitting information only when a significant change in the signal occurs, justifying the acquisition of a new sample. In this work, the idea is to combine WSN with event-based control (see Figure 3) such as is proposed in (Pawlowski et al., 2008).
In this scheme, the process (a greenhouse in this case) is provided with a WSN where each sensor transmits data according to a specific sampling approach. For instance, in (Pawlowski et al., 2008), this architecture is proposed and the level crossing method is used. Therefore, in that case, each sensor will transmit data if the absolute value of the difference between the current value of the variable, v(tk ), and its value in the last transmission, v(ts ), is greater than a specific limit . In a general way, an event-based controller consists of two parts (see Figure 3a): an event detector and a controller. The event detector indicates to the controller when a new control signal must be calculated due to the occurrence of an event. Figure 3b shows the event-based controller structure, where two type of events are generated based on “u ” and “e” conditions. In our application, the actuator owns a ZOH (Zero-Order Hold), so the current control action is maintained until the arrival of a new one. Since the controller owns inputs and outputs, we have considered input- and output-side events. The input-side ones are the arrival of a new value of the controlled variable “y” (as consequence of the triggering of some sensor-side event) and the introduction of a new reference; both cases force the calculation of control actions. The u-based criterion of the output-side consists on just sending the new control action u(t) if it is different enough of the previous control action u(ts).
In next sections, the effect of different sampling techniques will be evaluated in the control system.
2.4. Control Performance
Different performance measurements have been used to compare the quality of the control system regarding to different event-based sampling techniques. These measurements are the following (Vasyuntynskyy & Miskowicz, 2007):
IAE: The Integrated Absolute Error is defined as:
IAEP: It is the difference between the system response of an event-based strategy and the system response of the time-based approach:
NE: The Number of Events is a sampling efficiency measure to compare the quality of the system response:
IAD: The integrated absolute difference is the difference between the IAE of the time-based strategy and the IAE of the event-based ones:
GPI: Global Performance Index (Vasyuntynskyy & Miskowicz, 2007) shows the compromise between the control performance and the sampling efficiency in the following way:
where Wi are weighting factors.
A Global Performance Index is calculated taking into account the quality of the system response and the efficiency of the sampling. The influence of sampling techniques on the performance is represented by the following factors:
3. Greenhouse climatic control problem
This section describes the different sampling techniques evaluated in the paper. According to the error based condition used in the sensor nodes, different event-based strategies are selected (Sánchez et al., 2009):
LC - When the difference between the current value and the last acquired value is greater than
ILC - When the value of the IAE from last acquired value is greater than
LP - When the difference between a prediction of the signal value and its current value is greater than
ILP - The integral of the difference between the prediction and the current value is greater than
EN - The energy of the difference between the current value and value of last acquired value is greater than
First and second conditions do not need a detailed explanation since both are simple well-known deadband sampling strategies. Further details on these methods can be found in (Vasyuntynskyy & Kabitzsch, 2006); (Miskowicz, 2006); (Suh, 2007). The LP method, originally described in (Suh, 2007), consists of starting the calculation of future values of the signal after an event takes place. To calculate future values, a first order predictor:
is used to estimate the evolution of the signal from last time a sample was sent to the controller. When the difference between the current value and its prediction for the current time is greater than a limit , the condition becomes true and the current signal state is transmitted to the controller. The ILP is a new criterion based on the previous LP. In this case, the sample is taken and sent when the area between the signal and its prediction is greater than . The EN criterion (Miskowicz, 2005) sends a sample of the signal state when the energy of the signal from last sending exceeds a certain threshold. Depending on the error-based condition, an additional time-based expression must be included in the condition to force a sending when a time-out expires:
where hwithout represents the elapsed time from the last sending to the controller. The main reason to do that is the avoidance of the sticking, which happens when the signal derivative tends to zero (Vasyuntynskyy & Kabitzsch, 2007). So, the LC and LP criteria can reach situations where the sensor does not sent information to the controller in spite of having a high error. However, the sticking is avoided in criteria where integration is done (ILC, ILP, and EN) since the error-based condition can become true even though the error derivative is zero. Table 1 shows the individual limits for the commonest variables used for control purposes.
|Variable||Limit ( = 5%)||Limit ( = 3%)|
These limits of = 3% and = 5% were calculated based on the authors experience and after analyzing three years of data (Pawlowski et al., 2008).
The calculation of limit for each individual variable was performed studying its minimum and maximum values. The value of the change of each variable for = 3% and = 5% was determined calculating the 3% and 5% of the difference between the maximum and minimum values. Instead of choosing only one limit for each variable, these two different limits were evaluated to analyze their effects, such as presented in next section.
To compare results between event-based sampling techniques from a data transmission point of view, the following efficiency factors have been considered:
Samples: The number of samples obtained and transmitted using event-based sampling.
Saving: Percentage of saving that can be done in comparison with the timed-based sampling when data are transmitted every sampling time.
Taverage : Average time between two consecutive events, that is, between two consecutive sendings from the sensors.
4. Simulation results
The simulations presented in this section have been performed using the greenhouse climatic model developed by (Rodríguez, 2002) and the TrueTime MATLAB/Simulink toolbox. TrueTime is a tool developed for the Simulink environment and it is used to simulate real-time systems, networked control systems, communication models, and WSN (Anderson et al., 2005). 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. The TrueTime computer block (see Figure 4) executes user-defined tasks and interrupt handlers representing e.g. I/O tasks, control algorithms, or 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 (Henriksson, 2003).
TrueTime simulation environment allows us to implement a code in C++ or Matlab programming language for every simulated node. Hence it is possible to reuse this written code for direct implementation in WSN motes. This solution decreases significantly the time necessary for the implementation of simulated ideas. One of the most relevant advantages of WSN nodes is the ability/capability to remotely reprogram selected motes.
4.1. Data Transmission
Process monitoring is vitally important in companies for supervision tasks 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 different data acquisition techniques. Normally, the type of acquisition system is chosen to be optimal for the control algorithm to be used. In traditional climate monitoring and control systems, all sensors are distributed through the greenhouse and connected by wire to the device performing the control tasks.
These equipments use time-based data sampling techniques as a consequence of using time-based controllers. 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, and the data required by the controller in each sampling time are 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 load increases, 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 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 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 the event-based sampling techniques described in previous sections. These techniques allow that only the necessary data will be transmitted and thus only the necessary power will be consumed. In this study, WSN based on IEEE 802.15.4 ZigBee protocol has been simulated and its combination with event-based sampling in the greenhouse climatic control problem. Results of simulation were evaluated for a full crop campaign of 120 days. In this work, only eight days have been selected to present the obtained results. The limits described in Table 1 were used for the event-based sampling.
Table 2 presents the results obtained after simulation of the selected 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 event-based sampling techniques with a time-based sampling. Figure 5 shows how the events are generated from changes in the outside temperature for the LC technique.
On the other hand, the variable dynamics highly affects the number of taken samples-events. This can be observed for variables with high-frequency changes such as the wind speed and direction. Figure 6 shows the transmission data for the wind direction. 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 graphics of Figure 6 shows how the number of samples is substantially reduced after filtering the signal. However, in order to cut down the number of events created by these variables, the signals should be filtered in the sensor node before sending events to the controller.
As it can be seen, the number of events is smaller for = 5%. It can be observed a considerable saving in transmission is obtained for all event-based techniques for both limits, = 3% and = 5%. The average of transmission saving is over 80% for most of the variables. As an example, Figure 7 shows the original signal of the outside temperature and its sampled cases, where it can be observed how very good signal results are obtained for all event-based sampling techniques. Furthermore, it is observed that the amount of transmitted data decreases when the limit increases.
The biggest saving is obtained for the LC and LP techniques with = 5% as consequence of the low sensibility to signal changes. The effects of the limit can be observed in Figure 8 where sampled signal of the solar radiation is shown. As it can be noticed, the transmission data is smaller for = 5% but producing a bigger signal destruction (Figure 8b).
So, it is clear that the number of samples depends on two factors: the limit and the variable dynamics. The Taverage value was described in section 3 and is directly related to the transmission frequency. Lower values mean a high number of samples. All techniques with integrator part present better signal reconstruction property for signals in steady state or with low-frequency changes. For this reason, in these cases, it is not necessary to use the condition from equation (12). In conclusion, and from a control design point of view, by choosing = 3% it is possible to obtain a high reduction of the acquired samples for all event-based sampling techniques without relevant information loss.
4.2. Comparison of control performance
This section presents the simulation results obtained for the greenhouse climatic control problem. The control system works as described in Figure 3, where the controller calculates a new control signal when an event happens. The LC and LP techniques incorporate the additional condition (12) to guarantee event generation in steady state situations. The event triggering is governed by an event generator that detects the possible events affecting the controller. For this simulation study, these events are represented by changes on: set-point, inside temperature, outside temperature, and wind speed.
The events are generated when the controller node receives a data packet, and produces a new action from the PI control task. If the new value of the control signal is different from the value sent last time, a new transmission to actuator node is performed. As discussed above, only eight selected days have been used as representative of the simulation study. The temperature set-point (SP) was set at 26 oC and 17 oC for diurnal and nocturnal periods, respectively. Figure 9 and 10 presents the simulation results for a two-day diurnal period with the purpose of showing up the influence of event-based controllers. These Figures compare a time-based controller (TB) and an event-based controller (EB) for each different sampling method and with = 3%. For these specific days, event-based controllers (EB-ILC, EB-ILP, and EB- EN) present better performance that the time-based one and, at the same time, produce lesser commutations in the control signal (see Figures 9b and 10b). This effect is verified by the IAE presented in Table 3, which collects all control results for the diurnal period. Figure 11 shows all control performance indexes for diurnal period. Furthermore, the NE index confirms good results for the aforementioned techniques, especially for = 3%. The GPI weighting factors were set to 1 during calculation of this index, where large values of this index mean worst overall performance.
The results of GPI were better for event-based controllers with = 5%, and it depends on the number of samples that produce each sampling technique. The EB-EN case presents a good compromise between numbers of samples and control performance for both limits. Figures 12 and 13 show results for the nocturnal period. The results show a worst, but acceptable, performance of the event-based controllers. The important advantage of the event-based controllers is the reduction of changes in the control signal, which it is very relevant for the actuator life and the fuel/electricity consumption. In this example, saving over 50% is obtained comparing with the time-based strategy (see Figures 12b and 13b).
The lowest number of commutations is produced by the EB-LC and EB-LP cases, but their errors are bigger in comparison with the other event-based controllers. Table 4 accumulates results of control performance for nocturnal period. Figure 14 shows the full list of control performance indexes for the nocturnal period. The IAE values confirm that the control quality is worst for event-based controllers and only the EB-ILP and EB-ILC obtain magnitudes approximated to the TB one.
The consequence of this fact is the high number of transmissions between the different blocks in the control system. The analysis of the GPI index shows that EB-LC, EB-LP, and EB-EN present similar results. However, the EB-EN controller keeps reduced the transmissions without a relevant increase of the IAE in comparison to the other event-based controllers.
This paper presents a study of event-based sampling techniques and their application to the greenhouse climate control problem. It was possible to obtain important information about data transmission and control performance for all techniques. As conclusion, it was deduced that the data rate can be set up to obtain a compromise between control performance and number of transmissions, where results for different values of limit where shown. The limit of the event-based sampling techniques has presented a great influence on the event-based control performance, where for a greenhouse climate control problem, a value of 3% has provided promising results. On the other hand, the event-based controllers reduce the number of commutations to about 80% in comparison to the traditional time-based controller. This result is very important for greenhouses since it allows reducing the electricity/fuel costs and extending the actuator life.