Optimizing Greenhouse Lighting for Advanced Agriculture Based on Real Time Electricity Market Price

The world’s growing demand for food can bemet by agricultural technology. Use of artificial light to supplement natural sunlight in greenhouse cultivation is one of the most common techniques to increase greenhouse production of food crops. However, artificial light requires significant electrical energy, which increases the cost of greenhouse production and can reduce profit.This papermodels the increments to greenhouse productivity aswell as the increases in cost from supplemental electric lighting, in a situationwhere the greenhouse is one of the elements of a smart grid, a system where the electric energy market is dynamic and prices vary over time. We used our models to calculate the optimum values for supplemental light and the required electrical energy for HPS lamps in the greenhouse environment, using cherry tomato cultivation as a case study crop. We considered two optimization techniques: iterative search (IS) and genetic algorithm (GA). The two approaches produced similar results, although the GA method was much faster. Both approaches verify the advantages of using optimal supplemental light in terms of increasing production andhence profit.


Introduction
According to the UN Food and Agriculture Organization (FAO), providing adequate food for the increasing world population is one of the most serious challenges of the 21st century.Insufficient financial resources, limited freshwater, limited agricultural land, incompatible climate, and inadequate light for photosynthesis are some of the most important barriers to improving agricultural production.Use of industrial greenhouses can help to solve or reduce the above-mentioned problems.Industrial greenhouses allow certain crops to be grown in all seasons during the year.Greenhouses are very important for food supply and food security in many regions of the world, especially in the high latitude countries.Greenhouse climate control has led to significant improvements in the efficiency and performance of agriculture.However, greenhouse climate is a complex, nonlinear, and uncertain system, involving environmental factors like temperature, humidity, light, CO 2 concentration, and so forth [1].Thus, optimizing greenhouse climate is a key goal for today's advanced agriculture [2,3].
The single most important factor in plant growth is light.Optimal control of greenhouse lighting is one of the key techniques in digital agriculture.Nowadays, it is very prevalent to use artificial and supplemental lighting in greenhouses.Electrical lamps have been used to grow plants for nearly 150 years [4].Optimizing light to maximize production, though, may result in higher costs and lower profit overall.In the traditional power grid with constant or quasi-constant tariffs, computation of costs and benefits of using artificial lighting in greenhouse environment is not very difficult.Given the current shift from traditional power grids to "smart grids," however, the problem becomes far more complex.
The efficiency and performance improvement for greenhouse productions, for example, cherry tomato, can be considered by optimization of effective components of the crops production.The RTP in the smart grid causes more sensitivity of the greenhouse owners for electricity consumption in greenhouse crops production.Use of evolutionary algorithms such as GA can determine the optimal values of electricity consumption in production trend and it causes the efficiency improvement of the greenhouse production [5].

Mathematical Problems in Engineering
Today, the increased use of fossil fuels resources in electrical energy production has been caused increasing of the CO 2 footprint and this issue has been created by the significant problems like the global warming, disruption of the wildlife ecosystems, drought increment, and, and so forth.The optimal electricity energy consumption in the light section of the greenhouse environment can cause reduction of CO 2 footprint in the earth's atmosphere.
Different types of the electrical lamps can be used for greenhouse electrical lighting but the most commonly used lamp types in tomato cultivation are High Pressure Sodium (HPS) and Light Emitting Diode (LED) due to their favorable (PAR/Watt) value and low failure rate, both at the beginning moments of lighting and during the lamp's life.Although the LED lamps technology is growing and developing, use of HPS lamps in industrial greenhouses is substantially considered by farmers due to some important reasons such as being of lower price, of higher available light power, and more appropriate light spectrum [6].
The control of electrical lamps light in greenhouse environment can be done by turning on and off of the lamps or lamps dimming.The on-off switch control method is a simple and affordable approach in comparison with using industrial Proportional Integral Derivative (PID) controllers which are implemented by microcontrollers.But the controllability of the PID controllers is much better than controllability of the on-off switch controllers.Moreover, use of the lamps dimming method provides the smoother and more uniform light for greenhouse environment in comparison to the on-off method [7].
A so-called smart grid delivers electricity from suppliers to consumers by predicting and responding intelligently to the behavior and actions of all electric power users.The smart grid concept incorporates many issues such as power system stability, power system reliability, self-healing, renewable energies, privacy and security, energy storage, flexibility in network topology, efficiency, sustainability, marketing, peak curtailment, price leveling, and dynamic pricing [8].The last item poses the greatest challenge to greenhouse lighting optimization.
The electricity market in a smart grid will be highly active.Electricity tariffs can be different from one moment to the next [9].Tariffs in the smart grid will be a function of market rules as well as internal and external grid conditions.The best performance and efficiency in greenhouse lighting systems can be achieved by proper control of electric energy in bulbs [10], but if varying electricity prices in the smart grid are ignored, employing the artificial lighting in greenhouse environment can be associated with financial losses [11].On the other hand, if prices are the only consideration, greenhouse performance may drop to a level lower than that achieved where artificial lighting is not used at all [12].
In this paper, we consider greenhouse lighting optimization for cherry tomato cultivation based on Real Time Pricing (RTP) of electricity in the smart grid.Maximum possible crop productivity with minimum electrical energy cost is the ultimate target.We derive a set of mathematical models to describe the use of artificial light in maintaining an industrial greenhouse environment.Our models incorporate both the productivity benefits to be gained from artificial lighting and the varying costs associated with electricity derived from a smart grid.We then explore two optimization methods, iterative search (IS) and genetic algorithm (GA), to determine the energy use and timing that result in the best overall outcomes.We use tomatoes as a test crop since this vegetable has been grown in greenhouses for nearly 100 years [13] and has been studied extensively.
Other research in this area has generally used hypothetical or stem models [14,15].Our research emphasizes the use of updated practical models in the simulation process, based on real world information about crop productivity, light source energy, and smart grid pricing.Hence we expect that our work could be immediately applied in an industrial agriculture setting.
The implementation of the proposed method can be done by use of the architecture of a versatile networking and control platform for greenhouse electrical lighting which can be based on embedded wireless and wired networking technologies.In this regard, dynamic greenhouse electrical lighting can be applied and optimized by considering objective functions like cost, the required wiring installation expenses, maintenance complexity, and so forth [16].

Modeling of Tomato Greenhouse Cultivation.
Using artificial lighting for tomato cultivation has a big influence on tomato growth process [19].Tomato is one of the most common global greenhouse crops.The growth of tomato is related to many factors and parameters.One of the most important factors is the light.Over the past century, several models have been presented for representing the relationship between photosynthesis and light [20].Some of these models are simple, while others are more sophisticated.Equations ( 1)-( 6) express some of these models.In these equations, (),   , , and   are the values of photosynthesis, maximum photosynthesis, light and light saturation constant, respectively.Among the above-mentioned models, model of ( 1) is a linear function.Equations ( 2), ( 3), ( 5), and ( 6) are nonlinear models but they are monotonic functions.These models in comparison to Steele model ( 4) are not eligible for the case study of this paper due to at least two main reasons.Firstly, the photosynthesis process of cherry tomato is a nonlinear phenomenon [21].Secondly, the indiscriminate increase of light would weaken the photosynthesis process of cherry tomato and would be harmful for the plant [22].
Therefore, the Steele model is the best model which can be selected among the above-mentioned models considering tomato cultivation as the case study in this paper.This model has more flexibility and is better adapted for the case study of this research in comparison with the other models above.Equation ( 4) can be modified as (7).The dynamics of this model are shown in Figure 1.It is worthy to notice that  opt is the value of optimal light.
In a practical research study [21], cherry tomato bushes were cultivated in the greenhouse environment from February 4 to June 4.The mean day length for place of research (Germany) was considered approximately from 8 AM to 4 PM.In this research, the mean temperature was approximately equal to 19.6 ∘ C, the relative humidity was approximately equal to 74.8%, and the CO 2 concentration was approximately equal to 391 mol.Also the plants were cultivated and fed based on the commercial best practices.Table 1 summarizes the results of this research, in terms of the relationship between light and yield.
Photosynthesis Active Radiation (PAR, measured in terms of micromole/sec where 1 mole means 6 * 10 23 photons) is essential for plant growth.Also the plant density is approximately about two plants per square meter.Cherry tomato plant density has a big influence on final yield and quality.The number of tomato plants per unit area (square meter) tends to be normally set between 2 to 4 plants per square meter [17].Some studies report more than 4 plants per square meter [23].In this paper, we use the lower bound (2 plants per square meter) to maximize of reliability margin of numerical calculations.In fact, the calculations of this paper were done based on minimum practical plant density (2 plants per square meter) in greenhouse environment.In this regard, if usage of electrical lighting for the minimum plant density is affordable, thus it would be more affordable for higher plant density (more than 2 plants per square meter).
We substituted the values from Table 2 into (7) to obtain a tomato production model based on  as the emitted light.The model is illustrated by (8) and (9).In these equations, PAR  , PAR  , and PAR  are the total values of light, natural light (sunlight), and supplemental light, respectively.

Modeling of the Light Resources.
Sunlight is the best and cheapest light resource.It provides a continuous perfect spectrum for the photosynthesis.After passing through the earth atmosphere, it reaches earth's surface in the frequency range of 250 nm to 2500 nm, which includes the visible light domain (380 nm to 720 nm) plus the invisible light domain.
The photosynthesis frequency domain of plants is between 250 nm and 750 nm.Sunlight radiation modeling is a trend based on accurate measurement.Measurement and modeling of solar radiation is important for many systems and applications [24,25].Our sunlight model was formulated by extracting the sunlight radiation values in the paper discussed above [21].We then used MATLAB software to fit a Gaussian equation to these values.The peak of sunlight radiation occurs at noon when the sun is at its greatest height above the horizon.
Based on ( 10), ( 12) can be written as follows: By combining (10) and (12), the sunlight radiation model can be expressed HPS lamps produced by some companies such as General Electric (GE) have been optimized specially for greenhouse use by improving the red portion in their output spectrum [26].This means that HPS lamps designed for the greenhouse market can use a lower light level (lumen) in the visible spectral range compared to HPS lamps designed for street lighting.Some technical data for HPS lamps which are manufactured by GE are presented in Table 3.The relationship between PAR and lamp power can be modeled by fitting a curve the data in Table 3.We fit several different models using MATLAB software (version 7.12.0).The simulation results are shown in Figures 3 and 4. In Figure 3, the  and  axes are PAR and power, respectively.
The models do not differ much, and all have relatively low error.Goodness of fit values for these models is shown in Table 4.We chose to use the quadratic model which is shown in (14) and (15) where the power is total wattage amount of HPS lamps.(15)

Modeling of Electricity
Pricing in the Smart Grid.One of the important issues in the smart grid is dynamic pricing of electricity.Various methods of electricity pricing like Critical Peak Pricing (CPP), Time-of-Use Pricing (TUP), Real Time Pricing (RTP), and so forth have been presented.RTP is reportedly one of the best methods [11].Real time electricity pricing creates a closed loop feedback between the physical layer and the market layer in the system.In fact, by dynamically changing their usage of electricity, the customers such as greenhouses can adapt their consumption to the market conditions [27].
Modeling of electricity price in smart grid is one of the key features in the smart grid.Figure 5 shows the demand levels (load) at different times of a day for a real case [21].In fact, this graph presents the Real Time Demands (RTDs) in the smart grid.Based on Figure 5, Figure 6 displays Real Time Prices (RTPs) of electricity during a period of 24 hours [18].
Although the RTP of electricity is related to many parameters, RTD is one of the most critical.As illustrated by Figures 5 and 6, the price of electricity increases with increasing electricity demand and vice versa.Moreover, although the peak demand for electricity is approximately 60% higher than  the lowest electricity demand, the peak price of electricity is approximately 600% higher than the lowest price of electricity.In other words, the RTP variations are very sensitive to the RTD variations.We extracted the key spots from the price curve above and used MATLAB to derive a mathematical model.This model shows the relationship between price of electricity and time.The result is shown in Figure 7.
We use the Fourier equation ( 16) to represent the RTP model for electricity in the smart grid.Goodness of fit values for this model is shown in Table 5.

Mathematical Problems in
The Income function can be written as ( 18)- (20).
where the amount of Tomato is specified in (9).
We used a value of 5 US$ per kg for the mean price of cherry tomatoes.This price is the average price of cherry tomato in United States market in 2013 as reported by the United States Department of Agriculture [28].We assumed a typical duration of tomato cultivation, namely, 120 days, and modeled the full 24 hours of each day.Finally, by combining ( 9) and ( 19), the Income function can be written as  The consumed power is specified in (15) and price of electricity is determined in (16).The variable (PAR  ) in (15) is specified in (13).Based on ( 9), ( 10), (13), and ( 14 Finally, based on ( 20) and ( 22 Our research attempts to maximize the profit from cherry tomato cultivation in the greenhouse environment by varying the supplemental light usage.The best solution will be the one that maximizes the objective function.In this study, we used MATLAB software version 7.12.0(R2011a).We wrote two MATLAB programs, one implementing iterative search (IS) and one implementing a genetic algorithm (GA).Both programs were designed to find the best values for supplemental light in the greenhouse environment.Pseudocode 1 shows the logic for the iterative search technique.Basically the method searches exhaustively, examining all possible combinations of hourly intervals and amount of supplemental lighting and comparing the values of the objective function obtained with each combination.
In contrast to the exhaustive search employed by IS, GA is a heuristic search method which does not necessarily examine all possible solutions.It is one of the most common used approaches for optimization [15].A genetic algorithm consists of four important steps including evaluation, selection, crossover, and mutation.In the evaluation step, GA measures the fitness of each individual solution in the population and assigns a score to it.In the selection step, the GA randomly selects individuals of the current population for development of the next generation.In the crossover step, GA combines two selected individuals at a crossover point, thereby creating two new individuals.And finally in the mutation step, GA randomly modifies the genes of an individual that is subjected to a small mutation factor and introduces further randomness into the population.This iterative process continues until one of the possible termination criteria is accepted.Figure 8 shows us a proposed GA flowchart.
Table 6 shows the parameters we used for the GA.The Number of Generations parameter indicates the stopping condition.In fact these are the default parameters for the MATLAB GA toolbox.We experimented with changing some of these parameters, but this did not produce any better solutions.According to the proposed settings, the program runs for at least 50 generations.After reaching the 50th generation, if the difference value of 10 consecutive generations is less than 10 −6 , the program will stop iterating.Otherwise the program runs for 100 generations and then stops.

Results and Discussion
As noted previously, supplemental artificial lighting in greenhouse environments can be used to increase production but finding the optimum value of required supplemental light is very important, especially when electricity pricing is done by RTP method.We calculated values for the values of optimum supplemental light and wattage of HPS lamps in the greenhouse environment using two different approaches, namely, IS and GA. Figure 9 shows the optimum supplemental light calculated by means of IS.Numerical values for optimum supplemental light and HPS lamps wattage during the hours of day and night are displayed in Table 8.In this table, results with IS and with GA are compared and evaluated.Moreover, in this table several factors related to the use of electrical lighting in greenhouse environment were calculated.Among them, profit of using electrical lighting is very important and should be considered.For this purpose, cost of electricity usage for supplemental lighting is considered based on RTP of electricity in the smart grid.Also enhancement of greenhouse revenue is calculated based on increased production of tomatoes.In fact, electrical lighting increases tomato photosynthesis and, thus, tomato production will significantly increase within the intended time period.The zeroes in the Table 7 show that using electrical lighting inside the greenhouse environment for tomato cultivation is not always practical, from an economic perspective.This depends on the price of electricity in every period.Table 8 presents the improvement of production indices in greenhouse environment considering use of electrical lighting as the supplemental lighting for tomato cultivation.This table is calculated based on an industrial greenhouse with area of 200,000 square meters and 120 days of cultivation period.
Table 8 illustrates that using the optimum electrical lighting in the greenhouse environment under study has a great influence on greenhouse production.The results, indeed, show that use of an optimal electrical lighting which is calculated based on RTP of electricity in the smart grid system will improve financial profit of the greenhouse significantly.For instance, in an industrial greenhouse with an area equal to 200,000 square meters, net profit of the greenhouse can     be improved 2,157,580.8USD using 49180.798MW electricity within 120 days of cultivation.We assume that the costs of greenhouse operation other than the electricity are approximately constant with and without using of electrical lighting.In the above case, the additional cost of electricity for supplemental lighting is 2,796,019.2USD but the profit from this electricity usage is 4,953,600 USD.Note that the cost of electrical lighting equipment other than the lamps themselves is incurred only once.Then this equipment can be used during the lifetime of the greenhouse.Also the lifetime of mentioned HPS lamps in this paper is about 30,000 hours (1250 days).Thus, the cultivation time of the case study in this paper is lesser than 10% of HPS lamps life time.Accordingly, the other costs involved in using electrical lighting for cherry tomato cultivation in a greenhouse environment are not the significant fraction of total cost in this case study and can be ignored.
Computation times for the two approaches are displayed and compared in Table 9. Obviously, the GA method is much more efficient from a computational perspective.It requires about 100 seconds to find an optimal solution.In contrast, the IS method takes almost two hours.

Conclusions
In this study, optimization of greenhouse supplemental lighting based on RTP in the electric energy market was investigated.One of the key goals in advanced agriculture is increased greenhouse efficiency.Controlling the greenhouse climate is one of the most important issues in the industrial agriculture.By controlling and tuning greenhouse parameters such as artificial light, it is possible to significantly increase the greenhouse efficiency and crop cultivation performance.Determining optimal supplemental light and then controlling the greenhouse lighting based on this result can increase the economic efficiency of greenhouses.
We derived a mathematical model for cherry tomato production based on the literature.We modeled sunlight radiation based on the measured data in the greenhouse under study, HPS lamps according to the manufacture's data (GE), and RTP of electricity in the smart grid.The objective function was obtained by combining the above models with empirical data.
Using the above models, we created an objective function that expressed the trade-off between the benefits to be derived from artificial greenhouse lighting, in terms of increased production and hence greater Income, and the costs, in terms of higher energy use.We then used two methods, iterative search and genetic algorithms, to determine the best amount and timing of artificial lighting.
The results verify that the profit in the case study in this paper can be approximately doubled by employing electrical lighting with the appropriate timing.Also the simulation results show that each of the above-mentioned approaches has some advantages and disadvantages.The main advantage of the iterative search approach is potentially higher accuracy, since it examines every possible solution.Its main disadvantage is lower computational speed.In contrast, the main advantage of the GA approach is higher computational speed, which is obtained with the possible loss of accuracy, since GA is heuristic and may miss some solutions.On the other hand, the simulation results show that, in this problem, the results of the two approaches are very similar.Hence using GA for the calculation method is justified in this situation.

Figure 9 :
Figure 9: Optimum supplemental light with IS.

Table 2 :
Sunlight at different time of the day.

Table 4 :
The goodness of fit values for the above-mentioned models (obtained models in Figures3 and 4).

Table 5 :
The goodness of fit values for the proposed model.

Table 6 :
Setting parameters of GA in MATLAB toolbox.

Table 7 :
Optimum values of supplemental light, lamp wattage, income, cost, and fitness value for cherry tomato cultivation.

Table 8 :
Comparison of production indices with and without electrical lighting for an industrial greenhouse with an area equal to 200,000 square meters and 120 days of cherry tomato cultivation.

Table 9 :
Comparison of computation times for optimization methods.