Application of artificial neural networks ANNs to predict energy output for wheat production in Iran

This work is done in Ahvaz Township in Iran to estimate the amount of energy consumption for wheat production with artificial neural network. Required information is obtained randomly by completing questionnaires and face to face interviews with 90 farmers. Results show that the fertilizer, seed, and herbicide were the major energy consumers, and minor energy consumers were transportation. Energy productivity, net energy gain, and energy ratio were respectively 0.052 kg/Mj, 63.2 GJ and 1.51. Total amount of Carbon dioxide (CO2) emission in wheat production was calculated as 0.931 tonha -1 . Diesel fuel had the highest share (0.470 tonha -1 ) followed by chemical fertilizer machinery (0.231 tonha -1 ) and machinery (0.230 tonha -1 ). To estimate output energy Multilayer Perceptron (MLP), Radial Basis Function Network (RBF) and Self-Organizing Map (SOM) networks by changing in the number of hidden layers, training algorithm and number of neurons were used. Results showed that, MLP network have the maximum determination coefficient of 97% and the minimum MSE of 0.004 with topology of 6-7-7-1 and LM training. The sensitivity analysis of input parameters on output showed that total seed, fertilizer and chemical poisons had the highest and machinery had the lowest sensitivity on output energy with 52 and 5%, respectively.


INTRODUCTION
In most of developed countries, by calculation, indices of energy efficiency and evaluation of input energy per unit area for various agricultural products, experts try to make energy consumption more efficient (Peiman et al., 2005).An energy analysis is vital for proper management of scarce resources to improve agricultural production.On account of this, we will have efficient and economic production.
Moreover, determination of energy consumption in every level of production, help us to obtain which level has the minimum input energy (Chaudhary et al., 2006).
Nowadays, in addition common methods, some new methods are invented.One of these modern methods is artificial neural network.Artificial neural network is a simplified model of a real neural system and like a brain is able to learn by processing on practical data.In fact, networks learn general rules by calculating numerical data or examples; as result of that there are called intelligent systems (Mohammadi et al., 2007).Neural networks can learn from data directly and they do not need statistical properties of them, so it is an important advantage of these networks (Vakil-Baghmisheh, 2002).Neural network, without considering any initial supposition and previous knowledge of relations among *Corresponding author.E-mail: Mtaki88@ms.tabrizu.ac.ir.Tel: 09139204415.Fax: +9804113356007.
studied parameter, is able to find existed relation between input and output data to predict each output with its corresponding input (Torrecilla et al., 2004).Murat and Ceylan (2005) predicted transportation energy in Turkey by utilizing a three-layer neural network and error back propagation.They considered gross domestic product, population and the number of cars per kilometer as input of neural network.

MATERIALS AND METHODS
This work was implement in Bavi region of Ahvaz city in Iran.Ahvaz city is in longitude of 48° and 40 min E and latitude of 31° and 20 min N from equator.It`s area is 20477 ha and it include Bavi, Elhaie, Hamidie, Gabir, Soyse, Safhe, Gamberh, and Gheyzanie regions.Irrigated wheat is one of the most major crops that have been planted in Ahvaz and planted area was 104000 ha in 2010-to 2011 that 18000 ha related to Bavi region (Anonymous, 2010).The required sample size was determined using simple random sampling method.The equation is as below (Mousavi-Avval et al., 2011): Where, n is the required sample size; N is the number of total population; N h is the number of the population in the h stratification; S h is the standard deviation in the h stratification,

S h 2
is the variance in the h stratification, D 2 is equal to z d 2 2 ; d is the precision, ( X x  ) (5%) is the permissible error and z is the reliability coefficient (1.96, which represents 95% reliability).An experimental survey is done in a small scale to obtain probable errors and to estimate approximate trait studied; as the above parameters initially have no determined trait variance.Initial sampling data was analyzed, and then data related to trait studied from the population was obtained approximately.Eventually, determined above parameters were put in the Cochran formula to obtain main sample volume.Thus, sample volume for 90 farmers of Ahvaz Township was obtained.Input energy for wheat production included, consumed energy in operations and consumed energy for manufacturing agricultural machinery, fertilizer, pesticides, seed, human power, consumed fuel, transportation and irrigation.Consuming energy was calculated, by using energy equivalent related to each unit of input or output, and multiplying it to the amount of used input or produced output.In Table 1, some of different coefficients were illustrated, which are suitable for this study and in Table 2, the share of each input in consuming energy was illustrated.
Some indices were defined and used to determine the relations between input and output energies.By using those indices, energy of different products in different farming systems can be compared.These indices are shown in Relations 2, 3, and 4 (Mohammadi et al., 2008): The amount of energy consumption for each input is multiplied to its equivalent energy of that level, to obtain energy indices.As it is illustrated in Table 3, energy productivity, energy intensity and the net energy added were calculated by using output and input energies and energy ratio indices.A neural network is formed from artificial neurons.Neuron or node is the smallest data processing unit that basically forms neural network performance (Menhaj, 2005).Each neuron receives input and after processing it, produces an output signal.Therefore, each neuron works as a center of processing and distributing information; and has its own input and output (Sadorsky, 2006).
Output of neuron is obtained from this formula: selected in a way that input and output relations of neuron have a special pattern.Generally, a neuron has more than an input.A neuron, even with much input, usually is not enough for solving different problems (Menhaj, 2005).Hence, in the most of the cases, the community of neurons is used as a layer.Similar ANNs can be organized in different ways with biological neural networks.It   (Mohammadi et al., 2007).
In this study, Multilayer perceptron (MLP), Radial basis function network (RBF) and Self-Organizing Map (SOM), networks (with various numbers of layers and neurons in each layer), and many training algorithms were used to predict output energy in wheat production.Eventually, based on number of neuron, hidden layer and training algorithm, the best state was selected among these three networks.At first, data were classified in three groups randomly; these groups included: training group which had 60% of total data, cross validation group which had 20% of total data, and testing group which had the rest of them.Of course this step can be repeated if desired result is not obtained (Zhang and Fuh, 1998).One of the ways that can normalize the data in the range of [ 1 2] is Relation 6 formula; and it is in this study that was used: In this formula X i and Zi are the normalized and desired values, Z i max and Z i min are maximum and minimum of Zi values, respectively (Menhaj et al., 2009).
As driving function for hidden layer neurons, different functions can be used like linear, hyperbolic tangent, sigmoid and so on.In this study, according to surveys and domain of input and output data, hyperbolic tangent function was used as driving function for hidden layer neurons (as shown in number 7 formula); and linear function was used as driving function for outer layer neurons (Borhani darian and Fatehi, 2008): In this formula "net" is total weighted input neuron, and "n" is the number of observation.To predict output energy in wheat production, input of neural network were included consuming fuel

Energy utilization
According to the obtained results in Table 2, fertilizer, seed, and chemical pesticide had the major part of energy consumption.After that, fuel consumption was among the major energy consumers.Transportation had the minor part of energy consumption.Table 3 shows the indices of energy consumption for wheat production in Ahvaz Township.Although greenhouse gas emission (GHG) was beyond the scope of this analysis, the corresponding amount was calculated.The diesel fuel combustion can be expressed as fossil CO 2 emissions with equivalent of 2764.2gL - (Pishgar Komleh et al., 2011).Also, the machinery and fertilizer supply terms can be expressed in terms of the fossil energy required to manufacture and transport them to the farm with CO 2 equivalents of 0.071 TgPJ -1 and 0.0058 TgPJ -1 for machinery and chemical fertilizers, respectively (Pishgar Komleh et al., 2011).Table 4 shows the CO 2 emission for wheat production.Results of this table indicated that, wheat production is mostly depending on diesel fuel sources.Diesel fuel had the highest share (0.470 tonha -1 ) followed by chemical fertilizer (0.231 tonha -1 ) and machinery (0.230 tonha -1 ).
Using ethanol and biodiesel as biofuel is essential in the 21st century to reduce the high GHG emissions.Field operations with minimum machinery use (especially tillage operation) and machinery production are needed to be considered to reduce the amount of CO 2 .Eady et al. (2012) applied the life cycle assessment modeling of complex agricultural systems with multiple food and fibre co-products.They reported that amongst the crops, estimates of emissions for the cereal grains averaged 202 kg CO 2 -e/tonne grain, canola 222 kg CO 2 -e/tonne and lupins 510 kg CO 2 -e/tonne, when modeled to include the benefits of the mixed farming system.Gunady et al. (2012) used the Life Cycle Assessment for evaluating the global warming potential of the fresh produce supply chain for strawberries, romaine/cos lettuces and button mushrooms in Western Australia.Results showed that the life cycle GHG emissions of strawberries and lettuces were higher than mushrooms due to intensive agricultural machinery operations during the on-farm stage.Mushrooms, however have significantly higher GHG emissions during pre-farm stage due to transport of peat, spawn, and compost.

Topology of the best artificial neural network
A schematic diagram of typical multilayer FFN architecture is shown in Figure 1.
As input of networks are included: consuming fuel energy, manufacturing energy and machinery depreciation, fertilizer, seed, and chemical pesticide energy, human energy, transportation and irrigation energy; so input layer in each of the networks has six neurons.Output layer has only one layer in every network, because output is just energy consumption of wheat.If there are no enough neuron in hidden layers, network will not be able to train well.The converse of that issue will cause weakness in the network generalization (Wang and Elhag, 2007).Networks were trained, according to these facts and performance factors of each of four types of networks.The ability of generalization of network is evaluated by validation data, the same time as it is trained.Eventually, network is tested by data, which did not participate in the training and validation phase, to present related output.Correlation coefficient and Mean Square Errors (MSE) were utilized for evaluating the ability of studied networks, in predicting energy consumption for sugar beet production:  In this formula "n" is the number of observations, y oi is the value of observation in the level of "i", and y pi is the value of prediction in the level of "i" (Ghanbari et al., 2009).MLP network, with topology of 6-9-9-1 and training rule of Levenberg Marquart with determination coefficient of 97% and Mean Square Error of 0.004, was the most reliable network among those three studied networks.The difference between values which were predicted by MLP network and real value of data is shown in the Figure 2.
Output energy of the product which was obtained from every network in the states of: Neurons, middle layer, identical training algorithm, were shown in Table 5.
According to the results of this table, after MLP the most reliable networks were respectively: SOM model with the topology of 6-8-8-1 and MOM training with determination coefficient of 95% and MSE of 0.009 and RBF model with topology of 6-5-5 and LM training of with determination coefficient of 94% and MSE of 0.012.Actual value ...... Predicted value Pahlavan et al. (2012) showed that the ANN model having (7-20-20-1) MLP topology with R 2 of 0.976 can predict the basil yield value with high accuracy.Zangeneh et al. (2010) reported that the ANN model with 13-4-1 configuration was the best model to estimating machinery energy ratio (MER) indicator for potato production in Iran.Rahman and Bala (2010) reported that a model consisted of an input layer with six neurons, two hidden layers with 9 and 5 neurons and one neuron in the output layer was the best model for predicting jute production in Bangladesh.

Sensitivity analysis
In order to assess the predictive ability and validity of the developed models, a sensitivity analysis was performed using the best network selected (Figure 3).The robustness of the model was determined by examining and comparing the output produced during the validation stage with the calculated values.Models was trained by withdrawing each input item one at a time while not changing any of the other items for every pattern.According to the obtained results in Figure 3, the share of each input item of developed MLP model on desired output (output energy) can be seen clearly.Sensitivity analysis provides insight into the usefulness of individual variables.With this kind of analysis it is possible to judge what parameters are the most significant and the least significant during generation of the satisfactory MLP (Zangeneh et al., 2010).It is evident that the total seeds, fertilizers and chemical poisons had the highest sensitivity on output (52%), followed by human power (14%).Also, the sensitivity of machinery was relatively low.Pahlavan et al. (2012) reported that, the chemical fertilizer energy had the highest sensitivity on output (basil production), followed by farm yard manure (FYM), diesel fuel and chemical poisons.Also, the sensitivity of electricity, human power and transportation energies was relatively low.

Conclusion
(i) According to the above information and calculation of the share of energy consumption, the major parts of energy consumption are related to seed, fertilizer and chemical pesticide, and the minor of parts of it are related to transportation.(ii) In this study the value of output energy for wheat production in Ahvaz Township of Iran was predicted by using neural network.As result of that, MLP was the best model with topology of 6-9-9-1 and LM training algorithm.Determination coefficient was 97% between predicted values and real values, and its MSE was 0.004.After MLP the most reliable networks were respectively: SOM model with the topology of 6-8-8-1 and MOM training with determination coefficient of 95% and MSE of 0.009 and RBF model with topology of 6-5-5 and LM training of with determination coefficient of 94% and MSE of 0.012.Wang YM, Elhag TMS (2007).A comparison of neural network, evidential reasoning and multiple regression analysis in modeling bridge risks.Expert Systems with Applications., 32:336-348.Zangeneh M, Omid M, Akram A (2010).Assessment of machinery energy ratio in potato production by means of artificial neural network.Afr.J. Agric.Res.5(10):993-998.Zangeneh M, Omid M, Akram A (2011).A comparative study between parametric and artificial neural networks approaches for economical assessment of potato production in Iran.Span.J. Agric.Res.9(3):661-671.Zhang YF, Fuh JYH (1998).A neural network approach for early cost estimation of packaging products.Comput.Ind. Eng.34:433-450.
5) In this formula "f" is driving (action) function; and b are respectively weight and neuron bias.w and parameters are adjustable and the f driving function is selected by designer.Adjusting and b parameters is based on selecting f and training algorithm.In fact, training means that and b has to be

Figure 2 .
Figure 2. Predicted and actual network for MLP with R 2 = 98%

Figure 3 .
Figure 3. Sensitivity analysis of input items.

Table 1 .
Energy equivalent of energy output and input in agricultural production

Table 2 .
Energy used status for wheat production in Ahvaz Township.

Table 3 .
Energy indices for wheat production in Ahvaz province.

Table 4 .
Amount of greenhouse gas emission for wheat production' Figure 1.Structure of MLP network use in this research.

Table 5 .
Result of tested Artificial Neural Network for energy prediction.