An Innovative Adaptive Control System to Regulate Microclimatic Conditions in a Greenhouse

In the recent past home automation has been expanding its objectives towards new solutions both inside the smart home and in its outdoor spaces, where several new technologies are available. This work has developed an approach to integrate intelligent microclimatic greenhouse control into integrated home automation. Microclimatic control of greenhouses is a critical issue in agricultural practices, due to often common sudden daily variation of climatic conditions, and to its potentially detrimental effect on plant growth. A greenhouse is a complex thermodynamic system where indoor temperature and relative humidity have to be closely monitored to facilitate plant growth and production. This work shows an adaptive control system tailored to regulate microclimatic conditions in a greenhouse, by using an innovative combination of soft computing applications. In particular, a neural network solution has been proposed in order to forecast the climatic behavior of greenhouse, while a parallel fuzzy scheme approach is carried out in order to adjust the air speed of fan-coil and its temperature. The proposed combined approach provides a better control of greenhouse climatic conditions due to the system’s capability to base instantaneous solutions both on real measured variables and on forecasted climatic change. Several simulation campaigns were carried out to perform accurate neural network and fuzzy schemes, aimed at obtaining respectively a minimum forecasted error value and a more appropriate fuzzification and de-fuzzification process. A Matlab/Simulink solution implemented with a combined approach and its relevant obtained performance is also shown in present study, demonstrating that through controlled parameters it will be possible to maintain a better level of indoor climatic conditions. In the present work we prove how with a forecast of outside temperature at the next time-instant and rule-based controller monitoring of cooling or heating air temperatures and air velocities of devices that regulate the indoor micro-climate inside, a better adjustment of the conditions of comfort for crops is achievable.


Introduction
A home control system (HCS) is a tool to monitor and manage the main features of a residential home to improve its general efficiency and reduce its environmental impact. HCS serves three main functions: security and safety monitoring; efficiency of space heating/cooling, water heating and lighting; and monitoring external environment and weather. An important aspect is represented by the control of outdoor environment in terms of home security, garden or sunroom management, external lighting, etc. A significant amount of literature has been produced in the field of architectural design of gardens. In particular, in cases of limited outdoor space, vertical gardens and home-grown for-food cultures have recently attracted significant attention. Meanwhile, the use of greenhouses for is needed in physical-type approaches. In addition, in a context of micro-climatic control where the unplanned conditions could cause rapid variations, an artificial neural network (ANN) used to predict climatic parameters, combined with a fuzzy logic controller (FLC) used to adjust the fan coil speed and its temperature, could be the better solution in order to meet the typical greenhouse requirements.
The ANN can be a valuable tool for the prediction of microclimate parameters, while the use of rule-based controllers (FLC) enables the implementation of multi-criteria control strategies. In fact, the use of smart setting and tuning techniques for these controllers can improve the crop production as demonstrated by authors in [23]. For this reason, the FLCs, based on linguistic rules instead of inflexible reasoning, can be the right choice to describe greenhouse systems and to increase crop production.
In any case, whatever the method used, weather and climate parameters need to be forecasted, and this can be done by a neural network that is well suited for this purpose. In these terms, it would be good to include information on the fuzzy logic control rules. Moreover, a single FLC [22] for fan coil regulation would be not sufficient to meet the greenhouse requirements in terms of crops production; a better control of inlet air speed and its temperature could improve production.
The main scope of our work is the implementation of an innovative intelligent microclimate controller for a greenhouse (small or large) by using a parallel fuzzy scheme for the calculation of the inlet air speed and temperature. The main aim is to facilitate the human greenhouse management and to obtain good results in terms of production. This work aims to prove that control of the "micro-climate" inside the greenhouse can be improved by using a pro-active and dynamic control-a control that takes into account instant forecasts of environmental parameters, in a dynamic and flexible way. A series of sensors measure the physical greenhouse environmental parameters at time t, and ANN estimates prediction also on instant t; this allows the FLC to control (at time t) the indoor micro-climate depending on the forecasted development of the system (immediate t + 1). This approach is applicable for all weather-climatic parameters that influence the behavior of the micro-climate inside the greenhouse. The present work is organized as follows. Section 2 provides an analysis of microclimatic behavior and typical control approaches found in literature are described. Subsequently, a methodology able to determine the parameters involved in the proposed approach is explained in Section 3. In Section 4 the combined approach based on a neural network model and a parallel control fuzzy scheme (PCFS) are described. Finally, an implementation of the proposed approach and its performance are shown.

A Preliminary Greenhouse Analysis
The microclimate control in a greenhouse is a complex task since it is affected by several interdependent variables [24]; this makes the application of the conventional techniques for indoor climate regulation (cooling, ventilation, heating) often difficult.
While the indoor thermal conditions of residential building depend on objective factors (type of construction) and subjective factors (individual comfort), the optimal climate conditions for the growth of a crop in a greenhouse may be considered objective because they depend exclusively on the type of crop. However, the greenhouse internal climate conditions are subject to quick variations due to unpredictable and unstable external climate parameters. For this reason, some researchers proposed the use of innovative techniques based on artificial intelligence, such as fuzzy logic and neural networks, which allow the achievement of an efficient climate regulation inside the greenhouse [25].
Fuzzy logic is quite widespread as a technique for the control and monitoring of microclimate parameters within greenhouses [2,26]. Zhang et al. [27] used fuzzy control to automatically adjust climatic parameters, such as temperature and relative humidity, according to the needs of crops growth. In [28] the authors establish a dynamic ventilation control system and study the fuzzy temperature control systems based on programmable logic controller (PLC) and industrial wireless local area network technologies.
The air temperature in protected systems depends on heat exchanges (irradiance, convection, conduction, etc.) occurring with the external environment through the walls of the greenhouse and the ground. Due to their capability to handle both numerical data and linguistic information, fuzzy logic systems are suitable to model greenhouse climate. In fact, fuzzy logic allows for making decisions regarding greenhouse management depending on online measurements of the quality parameters. By using fuzzy logics, dynamic and automatic control become feasible, owing to the system's ability for coping, for instance, with rapid temperature changes, which can occur in any moment of the year.
In the recent years some relevant aspects of greenhouse management have been formalized through mathematical models [29][30][31][32]. These studies have investigated the relationships between greenhouse air temperature and relative humidity and several outdoor parameters such as wind speed, solar radiation [17], and heat exchanges between the indoor air and various elements of the greenhouse (cover plant, soil, etc.) [32][33][34][35].
Control of the internal temperature takes place through natural ventilation, while in the presence of high outside temperatures (30-35 • C) during long periods it is necessary to use artificial cooling in order to maintain a functional microclimate for the cultivated plant species.
Nowadays, most greenhouses use traditional air conditioning systems for regulation of the inner temperature, but they often cause high electricity consumption. This is one of the reasons why research efforts have been focused on innovative efficient climate regulation, to guarantee optimal conditions for the crop, at the same time minimizing energy consumption as the literature has done in smart-home [36,37].

Methodology
In order to test the proposed approach, a greenhouse scenario need to be formalized. Several conventional designs [38,39] are reported in the literature. They are usually have five steps. The first step deals with understanding the physical system and its control requirements; subsequently it is possible to develop a model, which includes the plant, sensors and actuators. The third step is on the use of a linear control representation in order to determine a detailed version of the controller. The fourth step aims at simplifying the complex previous representation. The control system is divided in several sub-systems. The calculation proceeds with the development of different algorithms, one for each sub-system controlled. The last step deals with the simulation of the designed system including the effects of non-linearity, errors, and parameter variations. If the performance is not satisfactory then the system is remodeled, the controller re-designed, the algorithms rewritten and then tested again. In some cases, it is possible to verify each sub-system and finally to test the entire controlled system [35].
Using fuzzy logic, it is possible to rely on a more simplified procedure. It starts with understanding and characterizing the system behavior by using the knowledge and the experience of a real scenario. Subsequently it is possible to directly design the control algorithm using fuzzy rules, which describe the principles that guide the controller´s regulation in terms of the relationship between inputs and outputs. The last steps are the simulation and debugging. In case of un-satisfactory performance, some fuzzy rules can be adjusted and a new simulation can be run.
The fuzzy-logic-based design methodology simplifies the design loop which results in the following significant advantages:

•
It reduces the design development cycle, simplifying design complexity; • It improves time to market, provides a better alternative solution to non-linear control and improves control performance; • It simplifies implementation and reduces hardware costs.
An important aspect of using fuzzy control is related to the creation of membership functions and the relevant optimization techniques [40]. In [41] a new application of adaptive neuro-fuzzy inference system (ANFIS) for control of greenhouses is introduced. This approach is well-suited to the great deal of uncertainty that exists in such a system and improves its general performance using a genetic algorithm (GA). However, this approach is useful for adapting control parameters, such as the number and shape of the membership functions used.
The exclusive use of a fuzzy controller may be useful for accuracy purposes, but it has been shown in [42,43] that such control can be improved if predicted values at time 't + 1' are used as time "t" input parameters. However such an approach foresees a preprocessing of input data using an ANN assuming that the parameters affecting the micro-climate inside a greenhouse can be studied and can determine an ANN, useful for the prediction of the short-term behavior following the date of measurement where an FLC indicates their choice of control.
In most cases the greenhouse crops have a good climate condition if the temperature is between 17 • C and 27 • C. However several indoor temperature values are sometimes detected within the minimum and maximum values of 10 • C and 35 • C. An important role in these particular systems is also played by air humidity, which affects various biological and physiological processes in the plants. The causes of variation of the relative humidity in a confined environment are mainly due to evapo-transpiration of plants, the internal temperature of the greenhouse, and ventilation, both natural and artificial. The relationship between the temperature, relative humidity and absolute humidity is defined by the Mollier diagram, as explained in [39] and depends on the air temperature.
In order to validate the system proposed in this paper, we shall analyze a scenario where the FLC receives the temperature value as input. In fact our approach is applicable both to the prediction of a single parameter and to that of n parameters. In addition, the correlation between those variables has already been demonstrated in some previous studies [44]. Moreover, whilst some adaptive neuro-fuzzy methods [45,46] produce target temperature as an output, the present approach produces two parameters that allow a rapid and more effective adjustment of microclimate control: air inlet speed (hot or cold) and its temperature, defined during design phase. This approach allows an easier control of the temperature target value, since both the airflow and its temperature are controlled. The proposed approach is bound to generate energy savings compared to more traditional methods. In fact, the target temperature is maintained via a number of "soft" approaches towards the target temperature, attained also via using the value expected at time "t + 1" as an input value and therefore reducing the numbers of temperature "corrections" and overshoots typical of more traditional methods.
The data used to determine the control parameters (air temperature of cooling/heating and speed of the air fan coil) are the following: • ∆T(t) = Difference between inside greenhouse temperature and optimum temperature that must be maintained in the greenhouse (usually varying from −10 • C to 10 • C); • S(t) = Through a range from 0 to 1 values, S(t) shows incident solar radiation on the greenhouse roof (usually varying from 0 W/m 2 to 1000 W/m 2 ); • C(t) = Cloudiness, which reduces the solar radiation (usually it varies from 0% to 100%); • W(t) = Wind speed (it varies in the range from 0 m/s to about 45 m/s), here shown in a range between 0% and 100%; • E = % of sensing system error due to sensor measurement; a percentage parameter that varies randomly in the interval [−4%, +4%]. In the simulation scenario it is introduced in order to simulate the effect of measurement errors of the sensors system.
The approach can be achieved using sensors available on the market such as the Grove Sensor of temperatures and humidity or Moisture Sensor (SKU: SEN0114) for temperature only. The latter is best suited to high humidity scenarios. Both sensors are connected to an Arduino board that allows integration to ANN and FLC. The approach in present work was implemented and validated in Matlab/Simulink. Temperature measurement inside the greenhouse, was ensured by sensors placed at a point at one-third the length of the greenhouse from the front end, at the center of the greenhouse, and a point at one-third the length of the greenhouse from the rear end. The size of the greenhouse was simulated to be 6.5-m wide, 15-m long, and 3.8-m high. The temperature values were computed and recorded at 10-min intervals; a mean value was extrapolated each hour in order to allow the FLC to change the state of the cooling system or heating every six sampling intervals. The proposed approach allows to act at each measurement.

System Model
The operating principle of the proposed system is shown in Figure 1. It is based on a parallel control fuzzy scheme (PCFS).
Energies 2017, 10, 722 6 of 16 to change the state of the cooling system or heating every six sampling intervals. The proposed approach allows to act at each measurement.

System Model
The operating principle of the proposed system is shown in Figure 1. It is based on a parallel control fuzzy scheme (PCFS). The advantage of this model is that the fuzzy logic is characterized by linguistic rules, rather than complex mathematical formulations. Climate parameters are recorded in time steps preceding the time of forecast (t + 1); they are used in order to infer the trend of indoor temperature within the greenhouse. The outputs of the ANN are therefore the forecasted indoor temperatures, calculated by model at each time step. The coupling of ANN and two FLCs allows a more accurate design of the greenhouse, which was based on the control strategy not only on the past trend of the temperatures, but also on the forecasted ones. In this way it will operate similarly to a typical retroactive feed fuzzy system.
This work aims at proving that "micro-climate" control inside a greenhouse can be improved if a pro-active and dynamic control is in place, one that takes forecasting of environmental parameters into a dynamically and flexible control. The sensors measure physical greenhouse environmental parameters at time t, and ANN ( Figure 1) estimates a prediction at time t; this allows FLC to establish (at time t) the indoor micro-climate depending on what is forecasted for an immediate t + 1 time. This approach is applicable to all weather-climatic parameters that influence the behavior of the microclimate inside the greenhouse. Figure 2 shows an example on which the tests described are based and the relative results which validate the proposed method.  The advantage of this model is that the fuzzy logic is characterized by linguistic rules, rather than complex mathematical formulations. Climate parameters are recorded in time steps preceding the time of forecast (t + 1); they are used in order to infer the trend of indoor temperature within the greenhouse. The outputs of the ANN are therefore the forecasted indoor temperatures, calculated by model at each time step. The coupling of ANN and two FLCs allows a more accurate design of the greenhouse, which was based on the control strategy not only on the past trend of the temperatures, but also on the forecasted ones. In this way it will operate similarly to a typical retroactive feed fuzzy system.
This work aims at proving that "micro-climate" control inside a greenhouse can be improved if a pro-active and dynamic control is in place, one that takes forecasting of environmental parameters into a dynamically and flexible control. The sensors measure physical greenhouse environmental parameters at time t, and ANN ( Figure 1) estimates a prediction at time t; this allows FLC to establish (at time t) the indoor micro-climate depending on what is forecasted for an immediate t + 1 time. This approach is applicable to all weather-climatic parameters that influence the behavior of the micro-climate inside the greenhouse. Figure 2 shows an example on which the tests described are based and the relative results which validate the proposed method. to change the state of the cooling system or heating every six sampling intervals. The proposed approach allows to act at each measurement.

System Model
The operating principle of the proposed system is shown in Figure 1. It is based on a parallel control fuzzy scheme (PCFS). The advantage of this model is that the fuzzy logic is characterized by linguistic rules, rather than complex mathematical formulations. Climate parameters are recorded in time steps preceding the time of forecast (t + 1); they are used in order to infer the trend of indoor temperature within the greenhouse. The outputs of the ANN are therefore the forecasted indoor temperatures, calculated by model at each time step. The coupling of ANN and two FLCs allows a more accurate design of the greenhouse, which was based on the control strategy not only on the past trend of the temperatures, but also on the forecasted ones. In this way it will operate similarly to a typical retroactive feed fuzzy system.
This work aims at proving that "micro-climate" control inside a greenhouse can be improved if a pro-active and dynamic control is in place, one that takes forecasting of environmental parameters into a dynamically and flexible control. The sensors measure physical greenhouse environmental parameters at time t, and ANN ( Figure 1) estimates a prediction at time t; this allows FLC to establish (at time t) the indoor micro-climate depending on what is forecasted for an immediate t + 1 time. This approach is applicable to all weather-climatic parameters that influence the behavior of the microclimate inside the greenhouse. Figure 2 shows an example on which the tests described are based and the relative results which validate the proposed method.  The approach described proves that just by forecasting outside temperature at the time t + 1 (created by ANN) and by controlling internal temperature through FLC, a better control of the optimal conditions can be achieved. The approach could be easily extended to the prediction of variation and control of other typical parameters of a greenhouse, i.e., humidity.
The parameters were measured, every hour, by using a weather station installed in a farm located in the countryside close to the city of Enna, in the south of Italy.

PCFS Model
The PCFS handles the switching on or off of the intelligent temperature regulation system, by using two FLC that are involved in the regulation of the inlet air speed of fan coil and its air temperature. The other climatic parameters depend mainly of temperature: by varying the temperature inside the greenhouse it is possible to determine the best conditions for the crops.
The PCFS (Figure 2) receives as inputs some physical parameters, such as indoor air temperature (Ti) and the outdoor air temperature (Ta), the relative humidity (RH), the wind speed (Ws) and the incident solar radiation (S) on a horizontal layer placed at the height of the greenhouse's roof and it adjusts the output speed of the system for cooling/heating, based on two fuzzy logic controllers. Both FLCs (1 and 2) receive an input at a given time (t) of the following parameters: S(t), C(t), W(t), E, ∆T(t). The last will be calculated by using the difference of temperature values, between the forecasted (t + 1) indoor temperature of the greenhouse T(t + 1) and Topt, the latter being the optimal temperature value that must be maintained in the greenhouse. Topt is constant and depends on the crop. The temperature T(t + 1) will be forecasted by an ANN.
The output parameters are the following: air speed of fan-coil (ASFC) at time t, named ASFC(t), and its temperature (here called air temperature, AT) at time t, named AT(t).
The controller takes as input crisp values of S(t), C(t), W(t), E, ∆T(t), which are converted into linguistic values by using a chosen set of membership functions. The use of linguistic rules and not complex mathematical formulations can be a valuable tool for adjusting thermo-hygrometric parameters in indoor environments like a greenhouse and overcome issues of nonlinear and multivariable systems [5,47].
The membership functions used for the input parameters are shown in Table 1, while the graphical representations are shown in Figures 3 and 4.   The aim of the FLCs is to elaborate on these linguistic values by using an inference mechanism based on a set of if-then rules. These rules are combined in the FLCs, which return membership functions, represented, in this work, by Gaussian functional shapes [39], following Equation (1): where fc is the center of the membership function and w determines its width. It allows determining the linguistic output, which can assume one of the above parameter values. The Gaussian model [48], used in this approach, takes inputs and produces outputs based on four steps:  mapping each of the inputs into a fuzzy variable (fuzzification);  determination of the output of each rule given its fuzzy antecedents;  determination of the aggregate output(s) of all of the fuzzy rules;  mapping of the fuzzy output(s) to crisp output(s) (defuzzification).   The aim of the FLCs is to elaborate on these linguistic values by using an inference mechanism based on a set of if-then rules. These rules are combined in the FLCs, which return membership functions, represented, in this work, by Gaussian functional shapes [39], following Equation (1): where fc is the center of the membership function and w determines its width. It allows determining the linguistic output, which can assume one of the above parameter values. The Gaussian model [48], used in this approach, takes inputs and produces outputs based on four steps:  mapping each of the inputs into a fuzzy variable (fuzzification);  determination of the output of each rule given its fuzzy antecedents;  determination of the aggregate output(s) of all of the fuzzy rules;  mapping of the fuzzy output(s) to crisp output(s) (defuzzification). The aim of the FLCs is to elaborate on these linguistic values by using an inference mechanism based on a set of if-then rules. These rules are combined in the FLCs, which return membership functions, represented, in this work, by Gaussian functional shapes [39], following Equation (1): where f c is the center of the membership function and w determines its width. It allows determining the linguistic output, which can assume one of the above parameter values. The Gaussian model [48], used in this approach, takes inputs and produces outputs based on four steps: • mapping each of the inputs into a fuzzy variable (fuzzification); • determination of the output of each rule given its fuzzy antecedents; • determination of the aggregate output(s) of all of the fuzzy rules; • mapping of the fuzzy output(s) to crisp output(s) (defuzzification).
The fuzzy output variables associated to the state of the actuators of management control parameters ( Figure 3): ASFC(t), and its temperature AT(t) that is associated to the following rules: • Zero: not activated; • Low: activated at low speed; • Medium: activated at medium speed; • High: activated at maximum speed.
While the air speed ASFC(t) can be fixed in four activating states (by using output de-fuzzification rules of FLC 1 ), the fan coil temperature (AT(t) parameter) is the best temperature value that could be used in order to increase or decrease the internal greenhouse temperature. The fan coil temperature can be determined in a range (by using de-fuzzification rules of FLC 2 ), with an established design time, and depends on specific crop. In a simulated scenario (shown in the next section) three fixed values are established, equal to 5 • C, 10 • C and 15 • C. While this is only an example, the approach can be run by using different temperature values and/or ranges. The target temperature (see Figure 1) is typical of a specific crop. The approach addresses the problem showing a generalized solution, and could be valuable for any kind of crop. The following performance section shows an example by using 25 • C as a target temperature.
Through the inference mechanism it is possible to determine the correct output according to the fuzzy inference rules presented. The fuzzy logic rules, implemented by using Matlab/Simulink, allow PCFS to set the better control decision to obtain the target temperature.

Neural Network Model
The most important feature of ANNs is their ability to learn models through experience, expressed via sets of recorded data [43], without needing an explicit mathematical representation of the studied phenomenon [49,50].
The ANN used in the application described in this paper is a multilayer perceptron (MLP) with three layers: one input, one hidden layer and one output. The number of neurons in the hidden layer (13 neurons) was chosen through sensitivity analysis as the number of neurons that minimizes the prediction error (E) and maximizes the values of the coefficient of determination (R 2 0 ). A sigmoidal function was chosen in order to represent the transfer function (TF) for the hidden layer and a linear function was chosen for the output layer.
The considered data for learning phase were measured and recorded in a weather station located in Enna (near the greenhouse used by tests), while the indoor climate parameters were measured directly by using sensors located inside of the greenhouse. Data input are ( Figure 2):
The network output is the air Temperature forecasted: Tf(t + 1), measured inside the greenhouse, and this output will be the input of the intelligent controller described above.
Before training the ANN, the data are normalized between 0 and 1 by using Equation (2): Energies 2017, 10, 722 10 of 17 Finally, the ANN was trained using the early stopping criterion. In order to test the performance of each phase of ANN, the data were divided into three subsets: the training set (70% of data set), validation set (15% of data set) and test set (15% of data set). The accuracy of the networks predictions is evaluated by using the control indices shown in Table 2. Several tests have been carried out in order to determine the better combination in terms of hidden and input neural networks.

Performance Evaluation of the PCFS
In order to validate the proposed approach, a simulated scenario was implemented by using a coupling model (ANN-PCFS) in Matlab/Simulink. By using a fuzzy controller logic (implemented in PCFS scheme) it was possible to obtain an automatic control of heating/cooling and ventilation in a greenhouse, in order to have an accurate control taking into account the forecasted climatic parameters (i.e., the PCFS regulates the microclimatic conditions at time t taking into account the forecasted parameters at time t + 1). Thus, the PCFS regulated automatically both the air speed and the temperature of a fan coil. The implemented scenario considers real climate parameters of a greenhouse located in the center of Sicily (Italy) in a typical summer season, where the oscillations between T min (during the night) and T max (during the day) can be 10-12 • C.
Results show that PCFS dynamically manages the system during 24 h (a typical summer day, with medium values), in order to guarantee an optimal indoor temperature, which is set to 25 • C.
In order to validate the proposed approach, two different performance evaluations have been carried out. The first step consists of implementing an auto-regressive neural network with external inputs (NNARX). The aim of this step is the selection of the network with the lowest forecast error. Several NNARX models have been tried, by using the same input parameters, as described in Section 4.1, using the summer data set. The NNARX models have been created by varying both the number of input parameters and the number of hidden layer neurons, through a sensitivity analysis it was chosen the network with the best performance.
In Table 3 the simulation campaign is summarized. Each row of Table 3 shows the best performance obtained with the specified number of input neurons and number of neurons in hidden layer. The grey row shows the best performances obtained, referring to the network with 13 neuron input neurons and 35 neurons in the hidden layer.
The better solutions of the proposed ANN model are tested by using the values of a summer period, in order to compare with a complex literature approach [22], that used several multilayer feed-forward neural networks that are trained to model each subsystem in order to achieve a multiple neural control of the greenhouse. It introduces a multiple neural control for the greenhouse micro-climate which consists of the division of the greenhouse control phase in periods where a suitable controller is selected to drive the internal climate.
A good performance was achieved by using a classifier in order to extract local models from the greenhouse database and obtain a multiple neural control in order to improve the greenhouse performances by using an Elman neural network. Figure 5 shows how the proposed ANN achieves comparable results, in terms of prediction error during learning phase, by using a very simple model that could be implemented in embedded devices used in controlled greenhouses.
The approach of Fourati [22] is more complex, indeed the possible implementation is not shown in the paper, instead, usually several literature papers show the possibilities to implement simple ANN, such as the proposed model, by using (Commercial) Off-the-Shelf (COTS ) devices [51,52]. The difference between the proposed approach and Fourati approach is equal to approximately 1 × 10 −1 . This appears to be a very low error in greenhouse scenarios. Table 3. ANN performance indices-the chosen number of neurons is the one in the row with a grey background. NNARX: auto-regressive neural network with external inputs.  Table 3. ANN performance indices-the chosen number of neurons is the one in the row with a grey background. NNARX: auto-regressive neural network with external inputs.   Figure 6 shows the error obtained calculating the parameter as the difference between forecasted indoor greenhouse temperature and target temperature (specific for the crop, and in this evaluated scenario fixed to 25 °C), called in the graph "dTEMPERATURE" and referred to henceforth as ∆T.

# Input Neurons NNARX # Neurons in Hidden Layer
After the validation of the NNARX model, through the implemented scenario it was possible to show the evolution of the inlet air speed injected by the fan coils and the inside air temperature of greenhouse forecasted by the NNARX model. Figures 6 and 7 show the performance of PCFS during the management decisions in a typical summer day, exactly during every struck hour.
The shown values do not refer to the progressive behavior of 24 h, in other words the situation at given time t does not depend on the value shown in the graph at t − 1 and moreover it does not influence the value at t + 1.
The figures show what happens when a certain ΔT occurs at a given time t, calculated by using forecasted temperature at time t + 1. For example, at 1:00 p.m., if the forecasted inside temperature is 25 °C, the inlet air speed and its temperature have to be set.  Figure 6 shows the error obtained calculating the parameter as the difference between forecasted indoor greenhouse temperature and target temperature (specific for the crop, and in this evaluated scenario fixed to 25 • C), called in the graph "dTEMPERATURE" and referred to henceforth as ∆T.
After the validation of the NNARX model, through the implemented scenario it was possible to show the evolution of the inlet air speed injected by the fan coils and the inside air temperature of greenhouse forecasted by the NNARX model. Figures 6 and 7 show the performance of PCFS during the management decisions in a typical summer day, exactly during every struck hour.
The shown values do not refer to the progressive behavior of 24 h, in other words the situation at given time t does not depend on the value shown in the graph at t − 1 and moreover it does not influence the value at t + 1.
The figures show what happens when a certain ∆T occurs at a given time t, calculated by using forecasted temperature at time t + 1. For example, at 1:00 p.m., if the forecasted inside temperature is 25 • C, the inlet air speed and its temperature have to be set.   Figure 7 shows air speed and temperature as a function of the time during an evaluated summer day. At 1:00 p.m., the shown control values (inlet air speed and its temperature) do not appear to depend on the action taken at 12:00 a.m. In fact, the values appear as if the system turns on for the first time at a given hour (at 12:00 a.m.). It is necessary to underline that the inlet air speed has been set to the default value of 2 m/s, while, as shown, when ΔT (calculated by using neural network forecasts) is different to 25 °C, the PCFS (in order to obtain an adjustment of the inside climatic condition) drives the system: both air temperature (5-10-15 °C) and air velocity (1, 2, 3 m/s) of the fan coils. Figure 8 shows a simulation scenario of the greenhouse-controlled temperature during a oneweek simulation time. The temperature is kept around its target value, that is chosen equal to 25 °C as a requirement for an optimal plant growth environment. Notably, when internal temperature exceeds its target value, around midday, the system starts operating to remove hot air and push in cooler outside air. When the controller parameters exceed the target value by too much, the system runs at maximum air speed (in the simulated scenario the maximum value is set) and its temperature is very low (in the simulated scenario 5 °C) in order to keep the internal temperature to the target   Figure 7 shows air speed and temperature as a function of the time during an evaluated summer day. At 1:00 p.m., the shown control values (inlet air speed and its temperature) do not appear to depend on the action taken at 12:00 a.m. In fact, the values appear as if the system turns on for the first time at a given hour (at 12:00 a.m.). It is necessary to underline that the inlet air speed has been set to the default value of 2 m/s, while, as shown, when ΔT (calculated by using neural network forecasts) is different to 25 °C, the PCFS (in order to obtain an adjustment of the inside climatic condition) drives the system: both air temperature (5-10-15 °C) and air velocity (1, 2, 3 m/s) of the fan coils. Figure 8 shows a simulation scenario of the greenhouse-controlled temperature during a oneweek simulation time. The temperature is kept around its target value, that is chosen equal to 25 °C as a requirement for an optimal plant growth environment. Notably, when internal temperature exceeds its target value, around midday, the system starts operating to remove hot air and push in cooler outside air. When the controller parameters exceed the target value by too much, the system runs at maximum air speed (in the simulated scenario the maximum value is set) and its temperature is very low (in the simulated scenario 5 °C) in order to keep the internal temperature to the target value.  Figure 7 shows air speed and temperature as a function of the time during an evaluated summer day. At 1:00 p.m., the shown control values (inlet air speed and its temperature) do not appear to depend on the action taken at 12:00 a.m. In fact, the values appear as if the system turns on for the first time at a given hour (at 12:00 a.m.). It is necessary to underline that the inlet air speed has been set to the default value of 2 m/s, while, as shown, when ∆T (calculated by using neural network forecasts) is different to 25 • C, the PCFS (in order to obtain an adjustment of the inside climatic condition) drives the system: both air temperature (5-10-15 • C) and air velocity (1, 2, 3 m/s) of the fan coils. Figure 8 shows a simulation scenario of the greenhouse-controlled temperature during a one-week simulation time. The temperature is kept around its target value, that is chosen equal to 25 • C as a requirement for an optimal plant growth environment. Notably, when internal temperature exceeds its Energies 2017, 10, 722 13 of 17 target value, around midday, the system starts operating to remove hot air and push in cooler outside air. When the controller parameters exceed the target value by too much, the system runs at maximum air speed (in the simulated scenario the maximum value is set) and its temperature is very low (in the simulated scenario 5 • C) in order to keep the internal temperature to the target value.  Figure 8 shows also a comparison with results on [23]. Although [23] is probably the most influential literature work that addresses smart climatic control in greenhouses, that work is focused on energy management through photovoltaic energy in order to minimize the use of conventional electrical grid and to lower costs of agriculture production. However, a comparison based on climatic control is shown exclusively. The diagram shown on Figure 8 demonstrates that the proposed approach achieves better performances with respect to both method and results shown on [23] and to the "traditional" control approach, (such as a basic thermostat). The combination of ANN and parallel fuzzy scheme, allows us to dynamically respond to outdoor and indoor climatic variations.
In order to better assess the behavior of PCFS approach, Figure 9 shows the trend of temperatures during a typical winter week. In this case, the temperature inside the greenhouse is kept at around 20 °C, considered as the optimal target for plant growth.  Figure 8 shows also a comparison with results on [23]. Although [23] is probably the most influential literature work that addresses smart climatic control in greenhouses, that work is focused on energy management through photovoltaic energy in order to minimize the use of conventional electrical grid and to lower costs of agriculture production. However, a comparison based on climatic control is shown exclusively. The diagram shown on Figure 8 demonstrates that the proposed approach achieves better performances with respect to both method and results shown on [23] and to the "traditional" control approach, (such as a basic thermostat). The combination of ANN and parallel fuzzy scheme, allows us to dynamically respond to outdoor and indoor climatic variations.
In order to better assess the behavior of PCFS approach, Figure 9 shows the trend of temperatures during a typical winter week. In this case, the temperature inside the greenhouse is kept at around 20 • C, considered as the optimal target for plant growth.
In particular, if the temperature falls below this value, the system starts working by self-setting with one of three speeds and one of three hot air input temperatures, as was the case with the scenario in the summer case.
Finally the results show that the neural network model performs off-line learning in order to set up PCFS. Without the proposed approach, a traditional ON/OFF system can be used at the same air speed velocity and with a fixed air temperature of fan coils. The PCFS takes as input the values of the trained NNARX model and, through the membership functions, improves the control, managing the switching on or off of the system and adjusting the inlet air speed and its temperature. approach achieves better performances with respect to both method and results shown on [23] and to the "traditional" control approach, (such as a basic thermostat). The combination of ANN and parallel fuzzy scheme, allows us to dynamically respond to outdoor and indoor climatic variations.
In order to better assess the behavior of PCFS approach, Figure 9 shows the trend of temperatures during a typical winter week. In this case, the temperature inside the greenhouse is kept at around 20 °C, considered as the optimal target for plant growth.

Conclusions
In this paper, an application of a combined neuro-fuzzy model for dynamic and automatic control of greenhouse climatic parameters has been proposed.
The approach shows a couple of FLCs fed by a climatic temperature predictor. The temperature forecast is carried out by an NNARX model, which attained good forecasting performances. In fact, results show a low error related to data approximation. Moreover, the results of proposed approach allow us to strike a good compromise between the fan coil speed and its temperature in order to increase the crop productivity. This solution could be used for different crops as it is feasible to adapt it in different production greenhouses and allows for shaping the control mechanism of PCFS in several scenarios. The results show that the efficient and dynamical regulation of the on/off times of the air speed of fan-coil and its temperature allows us to achieve a more efficient use of energy. Some experiments in a real test-bed over several days could be realized in a follow up of this work.
Moreover, a further application of an integration in a smart home system of an improved controller, based on other characteristics which affect the crops of a garden, such as humidity, cloudiness, and different types of solar radiation, is a goal of our future research works.