Modeling of Energy Demand in the Greenhouse Using PSO-GA Hybrid Algorithms

Modeling of energy demand in agricultural greenhouse is very important tomaintain optimum inside environment for plant growth and energy consumption decreasing.This paper deals with the identification parameters for physicalmodel of energy demand in the greenhouse using hybrid particle swarm optimization and genetic algorithms technique (HPSO-GA). HPSO-GA is developed to estimate the indistinct internal parameters of greenhouse energymodel, which is built based on thermal balance. Experiments were conducted to measure environment and energy parameters in a cooling greenhouse with surface water source heat pump system, which is located in mid-east China. System identification experiments identify model parameters using HPSO-GA such as inertias and heat transfer constants.The performance of HPSO-GA on the parameter estimation is better than GA and PSO.This algorithm can improve the classification accuracy while speeding up the convergence process and can avoid premature convergence. System identification results prove that HPSO-GA is reliable in solving parameter estimation problems for modeling the energy demand in the greenhouse.


Introduction
Greenhouses are used to grow crops for better quality and to protect them against natural environmental effects such as high or low temperature.The energy consumption is necessary to maintain a suitable temperature for crop production in the greenhouse.Modeling of energy demand in agricultural greenhouse is very important to maintain optimum inside environment and decrease energy consumption [1].
Greenhouse is a complex system with nonlinear, random, and strong coupling uncertain features [2].Mechanism modeling based on the physical processes uses unsteady heat and mass transfer to get the differential equations of greenhouse dynamic process [3][4][5].But some physical parameters in the model are difficult to measure or changing with the crop growth and outside weather.Black-box modeling is obtained from input/output measurements of a dynamical system, without knowledge of its inner physical and chemical laws, and it has been widely applied for various items [6].Neural networks, as the typical black-box, have been applied to model the greenhouse microclimate [7][8][9].However, in the black-box model, it is impossible to train all possible data, which can result in overfitting.
Systems identification is suitable in nonlinear systems for which a mathematical model is known and for which input/output data is available in the experiments but for which actual values of parameters in the model are unknown [10].The evolutionary algorithms are model-based recognition methods and have been applied for uncertain optimization problems [11,12].Some researchers have applied global optimization methods for calibration parameters in greenhouse microclimate model, such as genetic algorithm (GA), ant colony optimization (ACO), and particle swarm optimization (PSO) [13][14][15].Hasni et al. found that the performance of a greenhouse climate model using PSO is better than GA in terms of calculation time and accuracy of the results [16].
Yet, PSO is easy to prematurely converge and lead to the undesired local solution.GA may require a large number of redundant iterations and result in long computing times and low problem-solving efficiency [17].Algorithmic operators and parameters typically interact with one another nonlinearly; it is extremely hard to figure out the most optimal combinatorial strategy [18].And the single algorithm defect makes it not suitable for the mutative greenhouse model [19].HPSO-GA shows superiority compared with other single optimization methods, such as GA and PSO, and can overcome the disadvantages of particle swarm optimization and genetic algorithm [20].
Therefore, this paper proposes a novel method for energy consumption prediction in the greenhouse based on the HPSO-GA.The parameters for physical model of energy demand are calibrated using HPSO-GA for the profound optimization performance in the nonlinear greenhouse system with surface water source heat pumps system.

Experiment Setup.
A multispan glass greenhouse was employed in this experiment, and it was located in Jiangsu Province, China (longitude: 120 ∘ 29  east, latitude: 31 ∘ 76  north).This greenhouse is covered with a single layer of 4 mm thickness glass, 72 m length in the north-south direction, and 7.5 m height and consisted of 28 spans 4 m wide each.The outside air temperature, wind speed, and PAR were measured by a small weather station (GalCon, Eldarshany Co., Israel).The air temperatures at the height of 4 m from the ground of four positions inside were measured by sensors (HMT100, Vaisala Co., Finland).Inside air temperature was the average of 4 temperature sensors in the greenhouse.Surface water source heat pumps system was applied in the greenhouse.The energy consumption is measured by energy meter (HCM1158, Honeywell Co., Germany) according to the water flow rate and the difference of supply and return water temperatures.The data from the sensors were automatically recorded every 5 min by a data logger which we have developed.The experiment was carried out from June 2 to June 7, 2012.

Greenhouse Environment Model.
Greenhouse environment model in the physical and physiological methods that take place inside greenhouses based on mass and energy balances, including the biological behavior of plants.Mathematical models of greenhouse microclimate are influenced by several elements of the greenhouse (heat flow and conduction, vapor diffusion, etc.) and the outside boundaries (solar radiation, air temperature, etc.), which is shown in Figure 1.The thermal balance inside the greenhouse defines the rate of change of temperature, which can be transferred to calculate the energy supply requirements.Consider where   () is the energy supply over time in W,   is the air density in kgm −3 ,  is the volume of the greenhouse in m 3 , q l q w q c q p q e q s

Crop Top windows
Fan coil unit q t The net solar radiation into greenhouse   () can be described as follows according to radiation law: where   is the surface area of cover material in m 2 ,   () is outdoor global radiation over time in Wm −2 , and   is cover material absorption coefficient.
According to the nonlinear Stefan-Boltzmann law, the thermal long wave radiation exchange between interior and exterior can be written as follows: where   is the area of covering in m 2 ,  is the Stefan-Boltzmann constant of 5.67 × 10 −8 Wm −2 K −4 ,  sky () is sky temperature over time in K, and  12 is the combined emissivity between the cover and sky, which is found from the individual emission coefficients  1 and  2 : According to Aubinet [21], sky temperature related to temperature outside the greenhouse is expressed as follows: where   is actual air water vapor pressure outside in Pa,   () is temperature outside the greenhouse over time in K, and  is the sky clearness index, which is 2233 Pa and 39%, respectively, based on NASA Surface Meteorological and Solar Energy information [22].The greenhouse air exchanges energy and water vapor (condensation) with the inner surface of the cover and the cover exchanges energy with the outside air.The heat exchanged by conduction and convection between the cover and the air resulted from driving force for the exchange due to the temperature difference.The heat exchanged by internal thermal curtain and infiltration is also dependent on the inside and outside air temperature.Consider where   is the area of greenhouse cover material in m 2 ,   is the heat transfer coefficient in Wm −2 K −1 , and   is correct coefficient of internal thermal curtain and infiltration.
The transport of energy from the leaf is in general defined in the same way as the heat transfer from other surfaces.The sensible heat flux   was expressed with respect to the temperature difference between inside air and canopy: Latent heat flux due to crop transpiration in greenhouse can be described in terms of the crop canopy available energy and from the inside air saturation deficit, by means of the Penman-Monteith formula: where  is the latent heat of vaporization (2.45 kJ/kg),  V () is the canopy temperature over time in K,   is the specific heat of air at constant pressure, LAI is theplant canopy leaf area index,   is the area of ground in m 2 , () is canopy transpiration rate over time in kgm −2 s −1 ,   () is the saturated vapor pressure of the air (assumed at the leaf temperature) over time in Pa,   () is the water vapor pressure of the air over time in Pa,   and   are the leaf aerodynamic and stomatal resistances of the leaves of 150 s/m and 290 s/m, respectively [23],  is the psychometric constant of 0.0646 kPaK −1 , and Δ is the slope of the water vapor saturation curve at   in PaK −1 .Some parameters of the model are changing all the time or are not easy to measure, such as LAI,   , and   .The optimization method can be used to calibrate parameters according to root mean square error (Rmse) between the actual energy consumption and predicted values.The objective function of the algorithm estimation parameters is as follows: where  real () is real energy consumption, Max t is the maximum value in the time series, and  is estimated parameter vector [LAI     ].

HPSO-GA Algorithm.
In the present study, we propose the HPSO-GA, which could optimize the coefficients of equations with better performance.To better optimize the parameters of energy demand model in the greenhouse, an effective hybrid optimization algorithm is developed based on PSO and GA, which can fully combine the merits of these two methods without their drawbacks.A 4N population is generated for an m-dimension optimization problem.Randomly generated initial particle swarms  1 ,  2 ,  3 , . . .,  4 calculate the fitness value according to formula (9).To maintain the stability of the individuals, the better individuals are kept to speed up the convergence.The 2N individuals with better fitness values are used in PSO evolution to create a new 2N population.Further, to avoid the particle from getting stuck in the local minimum, 2N individuals with worse fitness values are subjected to GA operation to create a new 2N population.Finally, the new 2N population by PSO is combined with the new 2N individuals by GA to form a new 4N population for the next generation optimization.When the algorithm reaches the maximum generation (max n) or Rmse is less than the setting value (min r), the best fitness value and best parameters are output.The flowchart for the HPSO-GA is shown in Figure 2.
The PSO evolution consists of a swarm of particles and each particle represents a position in an -dimensional space.The status of a particle in the search space is characterized by two factors, such as the position and velocity.Each particle is associated with a velocity and a memory of personal best position () and a memory of the best position ().At each step, by using the individual  and , a new velocity for the particle is updated by Based on the updated velocity, each particle changes its position as follows: where V   is the velocity of the particle  in the th iteration,  is inertia weight,    is current position vector,    is the best previous position of this particle,   is global best previous position among all the particles in th iteration,  1 and  2 are two random variables with range [0, 1],  1 and  2 are positive constant learning rates, and the particle  ∈ (1, 4).
In order to increase the particles diversity and inhibit premature phenomenon, GA operators, crossover and mutation, are utilized in the HPSO-GA.m-dimension vector is converted into binary according to resolution ratio .The crossover and mutation operation are shown in Figures 3 and  4, respectively.
The parts of  1 and  2 between crossover site 1 and crossover site 2 are exchanged.The crossover site is generated randomly and   is the crossover probability.  is the mutation probability in GA and the bits mutate randomly depending on   .The 2N particle    is reborn by the GA operators.The velocity is assigned randomly and best previous position   is set as    for PSO evolution of the next generation.

Results and Discussion
According to formulas (1)-( 8), the physical energy model in the experimental greenhouse is built in the Matlab/Simulink.The optimization algorithm is programmed in a Matlab Mfile, which is used to calibrate estimated parameters vector  in the Simulink simulation rapidly and efficiently.The ascertained parameters in the model and the HPSO-GA parameters are shown in Table 1.
A computer with 2.35 GHz Core Duo processor and 2 GB RAM memory was used to run each optimization algorithm 10 times independently.The simulation data in Table 2 shows the average of optimization results with three optimization algorithms.According to the best parameters, the prediction curve for energy consumption can be achieved in Figure 5.
When the objective fitness value Min r was set as 2.4 × 10 5 , HPSO-GA decreases the exit generation.Computational time by HPSO-GA is 156 seconds, which is automatically recorded by the optimization software.Compared with PSO and GA, HPSO-GA saves time of 33 seconds and 521 seconds, respectively.In Figure 5 it can be observed that there is a deviation between the simulation value and actual energy consumption, particularly during the night.However the three optimization algorithms results were all fitted to actual energy consumption, which implies that three optimization algorithms are successful in estimating greenhouse model parameters.
As seen in Table 2, the HPSO-GA with better efficiency at estimating the parameters saves computational time of 21% and 77% compared with PSO and GA, respectively.When the max n is set to be less than 80, the HPSO-GA gives a better estimation of energy consumption with a 15% significant level than PSO and with an 85% significant level than GA.When the max n is more than 115, the objective fitness value optimized by HPSO-GA is similar to PSO and GA.The HPSO-GA can quickly obtain the optimal solution in the early evolution, since it speeds up the convergence process.During the optimization process of ten times, the local optimum has been resulted from PSO for more than two times, while it does not occur by HPSO-GA.Overcoming the undesired local solution, the reliability and stability of HPSO-GA are successfully approved in the parameters estimation applications of greenhouse model.

Conclusions
In this study, HPSO-GA is developed to estimate the indistinct internal parameters of greenhouse energy model, which is built based on thermal balance.Experiments were conducted to measure environment and energy parameters in a cooling greenhouse with surface water source heat pump system.Simulated energy consumption by the identified model using HPSO-GA is in agreement with the actual energy consumption, which proves that HPSO-GA can be used to predict the energy demand in the greenhouse.Compared with GA and PSO, HPSO-GA saves the optimization time of more than 21%, when the maximum generation is less than 80.The HPSO-GA shows excellent ability in solving parameter estimation problems in the greenhouse system, including the optimized speed and accuracy.

Figure 1 :
Figure 1: The thermal balance of greenhouse environment.
particle   i Crossover operator, get   i Mutation operator, get   i Set v randomly and pbest i =   i n > max n? or Rmse < min r?

Figure 5 :
Figure 5: Simulated energy demand with three optimization algorithms and actual energy consumption.

Table 1 :
The parameters in the greenhouse model and the HPSO-GA.

Table 2 :
Optimization results with three optimization algorithms.