The use of ON-OFF and ANN Controllers for Automated Irrigation System Model Based on Penman-Monteith Evapotranspiration

The climate change tends to be extreme condition that directly affects on decreasing agriculture production. Therefore, application of automated system in agriculture activities is the potential issue which must be considered. This paper presents ON-OFF and ANN controllers which are applied to the automated irrigation system. Controlling irrigation system used a calculated Penman-Monteith evapotranspiration and a reference of soil moisture as the compared input. Input parameters of the evapotranspiration included temperature, heat radiation, atmosphere pressure and wind speed. The use of feed forward ANN included 1 input layer with 15 neurons and 2 hidden layers with 10 and 5 neurons and 1 output layer and 1 input layer, 2 hidden layers with 96 and 1 neurons and 1 output layer, errors are 14.3% and 3.9%, respectively. Error of the ON-OFF controller with sampling time of 0.05 second is equal to the error of ANN controller. The performance of such controllers were evaluated and compared based on error of both controllers. The simulation result of ON-OFF controller was used as the reference of controller development based on ATmega 8 microcontroller. The simulation results show that the error of the ONOFF controller can be easily adjusted by setting the sampling time of the dead zone discretization.


Introduction
Uncontrollable exploitation of natural resources directly affects on natural decreasing quality and also changes the climate tends to be extreme condition.In other hand, the need of food increases proportionally with population growing, while agriculture areas extremely decreases caused by expansion of housing area.Therefore, application of automated system in agriculture activities is the potential issue which should be considered.
Various automated agriculture systems have been developed included weed control system to reduce negative impact to the environment due to excessive use of herbicides and Pesticide [1][2], automated irrigation system [3]- [5], agricultural robot [6] [7] as well as smart agriculture [8] [9].In automation of irrigation system, the initial step can be installed a water valve controller in irrigation system based on time function.However, this controller can cause difficulty in achieving the optimal growing condition.The next technology is application of soil humidity control system.Actually, this controler application was only succes on water full land condition.The high cost in investment and the difficulty of maintenance of such sensors become considerations of the reasons why these sensors were not widely applied.
In the last decade, application of soil humidity sensors spreads widely and it was correlated to the reasoning of low cost in investment and maintenance.Currently, the goal of research activities in this area are aimed particularly to reduce water consumption based on smart irrigation controller system [3]- [5].With the same reasons, smart controller system based on water conservation in irrigation area was developed.This method used rain water as a supplement of the irrigation system, so that the saving water consumption can be increased around of 67% [4].Application of automated irrigation system closely correlates to the topographic condition analysis and the water resources.Research of smart irrigation applicable for agriculture sand area was also developed in [10].The developed controller system based on evapotranspiration condition and level of water consumption was limited by the availability of  ISSN: 1693-6930 TELKOMNIKA Vol. 12, No. 3, September 2014: 741 -750 742 water resources.The key of the method is scheduling irrigation process based on the calculation of water balance of the plant [10].

Penman Monteith evapotranspiration
Theoretically, water consumption of agriculture area is proportional to the water lost caused by ground evaporation and plants transpiration on this area.This called as evapotranspiration.Evapotranspiration condition refers to the reference evapotranspiration (ETo).In the application, ETo is rarely measured, but it is commonly used in mathematical equation such as Penman-Monteith [11], in which the input parameters include temperature, radiation, atmosphere pressure and wind speed.Practically, determination of ETo is shown in Figure 1.

743
Based on the Penman-Monteith equation revised by the FAO (1999) [12], the process of evapotranspiration was simulated and the result was used as reference input of ON-OFF controller in automated irrigation system.Several successful attempts for improving the Penman-Monteith equation parameters are reported in the following study.Harrison (1963) presented that the latent heat of vaporization is given as a linear function with air temperature [14], while a correlation equation for the slope of saturation vapor pressure curve was reported by Murray [15].Several empirical equations for calculating the saturation vapor pressure in terms of air temperature were also proposed [12][16] [17].Although these equations have different algorithms, close results are obtained from them.It is noted that most of these correlations are restricted within the temperature range from 0 to 50 °C.

Artificial neural network (ANN)
Control system based on ANN has been used in many fields such as monitoring system on building damage index [18], increasing power system stability [19][20], adaptive control of space robots [21][22], etc. Principally, artificial neural network (ANN) is a method for producing the output signal from various input parameters in which its correlation is determined by activation function.The ANN method is shown in Figure 2.Each input signal (a) is given the weight function (w).The multiplication between input parameter and the weight function is summed and simulated in action function to determine the output level F(a,w).If there consists of n input parameters (it also containing n weight functions), the output function is described in Equation 2 [23]: Figure 2. ANN method [11].
In automated irrigation system, ANN controller uses computed evapotranspiration data as input parameter and the reference soil moisture as reference signal.The resulted weight function was used to build actual controller system in which the output is used to control a servo valve.

Research Method
This research was performed by modeling evapotranspiration based on revised Penman-Moteith equation.The input parameters included temperature, atmosphere pressure, radiation and wind speed.Calculated evapotranspiration represents the actual soil moisture affected by weather condition which will be adjusted to the reference soil moisture.
The output data of evapotranspiration was used as input of ON-OFF controller and ANN controller.The both performances were then compared.The block diagrams describe both controllers are shown in Figure 3.

Input parameters
Calculation of evapotranspiration conditions was performed in cycle base of 24 hours using the weather data input.These data include: air temperature, radiation, wind speed and air pressure which were assumed as sinusiodal signal.Referring to the data, simulating data input is described in the following section.
Heat radiation is a major factor that determines the rate of evapotranspiration.Heat radiation is a component on plants energy balance with respect to the net radiation.In fact, infrared radiation is also a component in the net radiation.However, the balance is always negative or zero so that it can be eliminated.In this simulation, radiation was assumed as a sinusiodal signal with amplitude of 2 MJ/m 2 in range of 112 MJ/m 2 .The frequency is 2π/24 or 0.2168 rad/hour derived from 24 hours cycle.Temperature affects on alteration of the ET correlation VPD and also advection.When all other factors are equal, ET on warm conditions tends to be larger than the plant temperature.ET increases warm vegetation because less energy is required to evaporate the water.Temperature also impacts the relative effectiveness of the radiant energy and wind affects on evaporating water.Radiant energy is more effectively utilized for ET when temperatures are high.In contrast, wind has more impact on ET when temperatures are low.In this simulation, temperature is a sinusoidal signal with amplitude 5 o C in 24 hours cycle, so the frequency is 2π/24 or 0.2168 rad/hour.The temperature range (offset) is arround of 30 o C.
The wind has two major roles; firstly, it transports heat that builds up on adjacent surfaces such as dry desert or asphalt to vegetation which accelerates evaporation (a process referred to as advection).Secondly, wind serves to accelerate evaporation by enhancing turbulent transfer of water vapor from moist vegetation to the dry atmosphere.In this case, the wind constantly replaces the moist air located within and just above the plant canopy with dry air from above.Wind speed was assumed as a sinusoidal curve with amplitude of 1 km/h in range of 3.5 km/h.

Reference parameter
Output parameter of the evapotranspiration calculation represents actual soil moisture influenced by weather parameters.Soil moisture conditions should be arranged to appropriate the specific soil moisture which is determined by the cultivation plant type by adjusting water irrigation.
In real conditions, besides the type of plant, soil moisture is also influenced by age of plant and soil type.In this modeling, the reference soil moisture was assumed as a Gaussian sinusoidal signal.Reference soil moisture is assumed in a range of 35% with amplitude of 15%, while the frequency is 2π/24 following the 24 hour cycle (Figure 6).

Design of electronic device of ON-OFF controller
Assumed input signals were generated by electronic circuit which used Atmega 8 as sinusiodal signal generator.Due to the sinusiodal signals have the same frequency, the circuit only used a signal generator and each amplitude and constants was adjusted by operational amplifier LM 358.The configuration of circuit is shown in Figure 4.The use of 1 byte DAC (0832) shows that the accuracy of output signal is 19.6 mV.Before operated, each input signal is adjusted the op-amp gain to appropriate the amplitude of the input data characteristic.

Results and Analysis
Block diagram of the input parameters model and Penman-Monteith evapotranspiration using Simulink is illustrated in Figure 5.A simulated evapotranspiration signal is a sinusoidal signal where its frequency is same as the frequency of reference signal (Gaussian sinusoidal).The amplitude of evapotranpiration output signal is lower than the reference signal (Figure 6).It implies the designed ON-OFF controller as well as ANN controller must have the amplification function.

ON-OFF controller
In processing the simulated evapotranspiration signal, ON-OFF controller uses dead zone circuit and memory integration as feedback signal on the output of calculated evapotranspiration (Figure 3a).Output signal is a form of ON-OFF configuration with variation of

747
pulse width [24].When signal is high, solenoid valve will be opened so that the irrigation water will be discharged to enhance the soil humidity.Reference signal is approximated by triangular signal.Actually, the increase of soil moisture caused by discharging water is determined by the soil type, level of density and grain particle size.In the control system, the soil characteristic is integrated into a constant which is used to correct the slope of the increase of soil moisture.The occurrence of error (the ratio between maximum error and the amplitude of reference signal) of ON-OFF controller can be set by adjusting sampling time of deadzone.By assuming the constant of soil characteristic is 1 and adjusting sampling time of deadzone are 0.5 and 0.005 second, the controlled signal errors are in range of 0-10 or 28.6% and 0-5 or 14.3% (Figure 7), respectively [25].However, adjusting a very small the sampling time of deadzone can affect on the performance of control system caused by the passivity of mechanical system, such the solenoid valve.

Hardware performance of ON-OFF controller
Based on the simulation result, the ON-OFF controller was made by using ATmega 8 microcontroller.The performance is shown by displaying the input and the output signals using oscilossope.The reference signal and the calculated evapotranspiration (ETo) of the signal processing is shown in Figure 8a and 8b, respectively.The needed amplification function of the ETo signal to appropriate the reference signal is around of 3 times.It equals with the simulation result in Figure 6.Principally, ON-OFF controller is designed to transform the ETo signal into pulse width modulation signal (PWM) which is used to activate a solenoid valve.According to the modelled system in Figure 3a, ON-OFF controller was built by inputting programming function into the microcontroller memory (embedded algorithm) as the signal processing.PWM output signal which is produced by adjusting time sampling of deadzone of 10 ms is shown in Figure 9a.By this PWM signal, the reference signal is approximated by triangular signal which is shown in Figure 9b.

ANN controller
According to the block diagram in Figure 3b, the input signals of neural network controller are the calculated evapotranspiration and the reference signal.Based on these inputs signal configuration, neural network used feed forward method.Theoretically, feed-forward neural networks can approximate any nonlinear function, and thus the backpropagation algorithms are popular for training feed-forward neural networks [26].
The weight factor obtained from training procedure depended on the network architecture.As the model 1, the design of neural network architecture is described as the following: 1 input layer with 15 neurons and 2 hidden layers with 10 and 5 neurons and 1 output layer.In Matlab procedure, the network construction is expressed as the following:

jarnet=newff(minmax(P),[15 10 5 1],{'tansig' 'tansig' 'tansig' 'purelin'});
From the training procedure, the ANN controlled data is close to the reference signal (Figure 10a).The error occurs when signal direction changes extremely (up-down or down-up), while on the continuous alternation error tends to be low.Error controlled signal of ANN controller achieves in range of 0-3 or 14.3%.It equals with the controlled signal error of ON-OFF controller with setting deadzone sampling time of 0.005 second (Figure 7).
By modifying the network architecture, the error can be reduced to 3.9% (Figure 10b).Errors occurs in range of 0-0.82 which was distributed in locations where the signal direction changes.The modified network architecture is described as the following: 1 input layer, 2 hidden layers with 96 and 1 neurons and 1 output layer.Based on literature review, the error level can also be reduced by using cascade correlation artificial neural network (CANN) model with embedded Kalman learning rule [26].

Weight function of ANN
Applicable to the independent control system, the weight function should be declared in an empirical formulation or a constants if the weight function is not continue.The weight function is then used in the operating system algorithm installed in microcontroller memory as the embedded control system.
To calculate the ANN weight function, activation function is needed, in this case the choice activation function are purelin and tansig.In Matlab procedure, the calculation of weight function of ANN with network architecture of 1 input layer, 2 hidden layers with 96 and 1 neurons and 1 output layer is expressed as the following: Y(i) = purelin(tansig(input(:,i)*weight_layer1 + weight_bias1) * weight_layer2 + weight_bias2)

Conclusion
This paper presented ON-OFF and ANN controllers which are applied to the automated irrigation system.Penman-Monteith evapotranspiration and a reference of soil moisture as the compared input are used in this controlling irrigation system.The performance of such controllers were evaluated and compared based on error of both controllers.The simulation results show that the error of the ON-OFF controller can be easily adjusted by setting the sampling time of the dead zone discretization.

Figure 1 .
Figure 1.Schematic diagram of measurement of weather data to calculate reference evapotranspiration (ETo).

Figure 4 .
Figure 4. Electronic architecture of voltage sinusiodal signal assumed as input parameters.

Figure 6 .
Figure 6.Comparison between reference signal and calculated evapotranspiration signal.
The use of ON-OFF and ANN Controllers for Automated Irrigation ... (Susilo AdiWidyanto)

Figure 7 .
Figure 7. Performance of ON-OFF controller (reference signal is blue, controlled signal is red, and ON-OFF condition of solenoid valve is black) with dead zone sampling time of 0.005 second [25].

Figure 8 .
Figure 8. Oscilloscope display of a. Reference signal as Gaussian sinusiodal, b.ETo signal.

Figure 9
Figure 9. a. Pulse width modulation signal to activate solenoid valve (dead zone sampling time of 10 ms), b.Approximation of the reference signal with triangular signal as controlled signal of ON-OFF controller (dead zone sampling time of 10 ms).

Figure 10 .
Figure 10.Error of ANN controlled signal resulted by modifying network architecture, a. 1 input layer with 15 neurons and 2 hidden layers with 10 and 5 neurons and 1 output layer, b. 1 input layer, 2 hidden layers with 96 and 1 neurons and 1 output layer.