Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Copyright @ IF AC Modelling and Control in Agriculture,

Horticulture and Post-Harvest Processing, Wageningen,


The Netherlands, 2000

MODELlNG pH AND ELECTRICAL CONDUCTIVITY IN HYDROPONICS


USING ARTIFICIAL NEURAL NETWORKS

Konstantinos P. Ferentinos, Louis D. Albright, Norman R. Scott

Department ofAgricultural and Biological Engineering


Comell University
Ithaca, NY 14853, U.S.A.

Abstract: A model for predicting pH and Electrical Conductivity (EC) responses of a


deep trough hydroponic system is developed. Artificial Neural Networks are used as the
method of modeling. The Feedforward Neural Network Model has 9 inputs (pH, EC,
nutrient solution temperature, air temperature, relative humidity, light intensity, plant age,
amount of added acid and amount of added base) and two outputs (pH and EC of the next
time step). The most suitable and accurate combination of network architectures and
backpropagation training algorithms was the one-hidden-Iayer with 9 hidden nodes
architecture trained with the quasi-Newton backpropagation algorithm. During the testing
of the model using new input data, one step ahead predictions of pH were within 0.01 and
EC within 5 microS · cm-I. Copyright © 2000 IFAC

Keywords: Neural Network models, agriculture, pH, electrical conductivity.

I. INTRODUCTION one is able to collect extensive sets of data about the


process, the NN approach seems reasonable and
This paper deals with development of a Neural appropriate.
Network model of a deep trough hydroponic system
in a greenhouse (Ferentinos, 1999). The cultivated All this data was collected during the whole growing
plant is lettuce and the whole process is monitored period of the plant, i. e. the 25 days that the lettuce
and controlled in the greenhouse in order to collect plants were in the ponds of the hydroponic system.
the data necessary for the parameterization of the This information consisted of measurements of the
model. pH, the electrical conductivity (EC) and the
temperature of the nutrient solution, as well as the
Although quite interesting research has been temperature, the relative humidity and the light
completed in the area of nutrient uptake by plants and intensity inside the greenhouse. Also, additional
the dynamics of growing (Barber and Silberbush, information was given by the control signals of the
1984; Wild and Breeze, 1981; Lawlor, 1991), Neural controlled parameter, that is the pH.
Networks (NN) have not been used for mode ling
these kind of processes. They have been used in
several other systems, including a variety of 2. MA TERlALS AND METHODS
biological or environmental ones (Bhat et al., 1990;
Seginer et al., 1994; Thompson and Kramer, 1994; Artificial Neural Networks (NN) are systems or
Sridhar et al., 1996; Lin and Jang, 1998), but not in models that try to estimate or approximate a function
the specific area of plant cultivation. As the from sample data. NN structure is based on our
knowledge of the dynamics of a hydroponically present understanding of biological nervous systems
grown plant is limited, and because hydroponic (Lippmann, 1987).
systems can be monitored with a level of detail that

173
Modeling using a NN consists of three main steps: known, so the construction of a mechanistic
selection of the NN architecture, training of the NN (analytical) model of the process is extremely
and testing of the trained NN. Of course this assumes difficult and problematic. Also, hydroponics is
that the type of the NN, for example feedforward or amenable to collecting extensive sets of data about
recurrent NN , or the basic type of activation the process. As a consequence, a black-box model
functions, for example sigmoid or Radial Basis with use of neural networks was considered as the
Function (RBF) are already chosen. most appropriate, accurate and reliable way to deal
with this modeling situation.

2. 1 The Modeled System The goal was the most accurate representation of the
physical system via this NN model. So the NN model
The growing plant was lettuce (Lactuca sativa, var. had to identify the dynamics of the physical process,
Vivaldi) and the system was deep trough hydroponics i.e., the hydroponic system. More specifically, the
in a greenhouse. Information about the physical model was used mostly for prediction of state
process to be mode led was collected by measuring variables rather than simulation. As inputs, major
the most important parameters that affect its parameters that affect the dynamics of the process
dynamics. These parameters can be divided into three were considered. As outputs, the parameters that give
categories: information about the system's state and condition
were considered. This specific NN model was used as
- System variables (pH, electrical conductivity (EC) a predictor of the system's response, so the
and the temperature of the nutrient solution). parameters described before as outputs were also
Indoor Environment disturbances (air used as inputs to the network, and the outputs were
temperature, relative humidity and light intensity actually the predicted future values of these
of the greenhouse environment at plant level). parameters.
- Control signals (the pH control signals of added
acid and base). Network Design

The deep trough hydroponic system that was used The inputs of the NN consisted of the three categories
consisted of three small growing ponds (tanks). Each of measured parameters mentioned in the previous
pond had an area of approximately 1.0 m 2 and a section. In addition, there was a fourth category that
consisted of only one input. This was the plant age
volume of 0.4 m 3 and was completely independent
estimator. The dynamics of the system change with
from the others. In that way, the systems could be time because of plant growth, so the model should
monitored and controlled in parallel and so more data take into consideration the age of the plants. This
sets could be constructed. leads to an adaptive NN with the plant age estimator
being the adaptation parameter. The plant age was
The plants were transplanted to the ponds 10 days measured in 12 hours intervals. The growing period
after seeding and the growing period in the of lettuce in the hydroponic system was 25 days, so
hydroponic system was 25 days, i. e. they were the plant age estimator's values ranged from I to 50.
harvested on the 35th day after the sowing of the
seeds. A respacing of the plants took place 10 days The outputs of the NN were the predicted values of
after they were transplanted into the ponds. For the pH and EC of the nutrient solution averaged over the
nutrient solution, reverse osmosis water was used. next twenty-minute period (time step). These
variables give information of the system's condition
The monitoring and control system consists of a and response.
personal computer (PC) running LabVIEW software
(available from National Instruments), a data Thus, the NN has in total 9 inputs and 2 outputs.
acquisition board connected to the computer and Each input variable earns 1,800 elements in each 25
several meters, sensors and actuators connected to the day growing period. The networks that were tested
board. The operational features of the greenhouse for the model were one-hidden-Iayer (I-HL) and two-
section that affect the environment are monitored and hidden-layer (2-HL) networks. The activation
controlled by the central greenhouse computer. For functions that were used and tested, were either
each pond there is a metering pump used to control logistic or hyperbolic tangent functions. The output
the pH of the nutrient solution by adding acid or base. nodes were linear. The number of hidden nodes in the
I-HL networks that were tested varied from 4 to 10,
while in the 2-HL networks several combinations
2.2 Neural Network Model were tried. All network parameters (weights plus
The behavior of the system described before and the biases) can be denoted by a vector ~ EWe RP,
physical relationships that govern this behavior (such where p is the total number of parameters of the
as plant nutrient uptakes, possible chemical reactions network (Fine, 1998).
in the solution, or plant dynamics) are not well

174
accurately predicts the next time step values of pH Bhat, N.V. , P.A. Minderman, TJ. McAvoy and N.S.
and EC of the nutrient solution in normal operating Wang (1990). Modeling Chemical Process
conditions. More specifically, the following Systems via Neural Computation. IEEE Control
conclusions can be drawn: Systems Magazine, 24(4), 24-30.
Ferentinos, K.P. (1999). Artificial Neural Network
- Feedforward neural networks are suitable for Modeling of pH and Electrical Conductivity of
mode ling pH and EC dynamics of hydroponic Hydroponic Systems. MS Thesis, Comell
systems. Once the network is trained with a University, Ithaca, NY.
satisfactory amount of data, it can predict very Fine, T.L. (1998). Feedforward Neural Network
accurately the one step ahead future state of the Methodology, ELEE577 class notes, Fall '98,
system. School of Electrical Engineering, Comell
University, Ithaca, New York.
- Relatively small network architectures perform Gallant, S.1. (1993). Neural Network Learning and
better than large ones for this modeling problem. Expert Systems. The MIT Press, Cambridge,
More specifically I-HL architectures outperform 2- Massachusetts.
HL architectures. The most suitable architecture Kosko, B. (1992). Neural Networks and Fuzzy
proved to be that with 9 nodes in the one and only Systems. A Dynamical Systems Approach to
hidden layer. Machine Inte//igence. Pentice-Hall Inc.,
Englewood Cliffs, New Jersey.
Quasi-Newton multidimensional minimization Lawlor, D.W. (1991). Concepts of Nutrition in
algorithm gives the best training results when it is Relation to Cellular Processes and Environment.
used in the backpropagation training algorithm, In: Plant Growth: Interactions with Nutrition and
compared to steepest-descent and Levenberg- Environment, (J. R. Porter and D. W. Lawlor,
Marquardt algorithms. Eds.), Cambridge University Press, pp. 1-32.
Lin, J. and S. Jang (I 998). Nonlinear Dynamic
- The predicted pH and EC values are accurate Artificial Network Modeling Using an
enough that the NN model could be considered to be Information Theory Based Experimental Design
used in other systems that could use information of Approach.lnd. Eng. Chem. Res. , 37,.3640-3651.
the possible future state of a process. A good Lippmann, R.P. (I 987). An Introduction to
example of systems is a fault-detection system. A Computing with Neural Nets. IEEE ASSP
system could read the current state of the process as Magazine, 4, 4-22.
well as a prediction of its future state, and compare Rumelhart, D.E., G.E. Hinton, and RJ . Williams
them with the actual process status to detect a (1986). Learning Representations by Back-
possible malfunction. Another example is a control Propagating Errors. Nature, 323, 533-536.
system that "looks" not only into the current status of Seginer, I., T. Boulard and BJ. Bailey (1994). Neural
the process but also into its future state (provided by Network Models of the Greenhouse Climate.
the NN model) and adjusts the control actions Journal of Agricultural Engineering Research,
according to this future state too. 59, 203-216.
Sridhar, D.V., R.e. Seagrave and E.B. Bartlett
Simpler prediction methods, like linear (1996). Process Modeling Using Stack Neural
extrapolation or "lazy man" prediction, gave similar Networks. AIChE Journal, 42(9), 2529-2539.
RMS Errors through the whole testing set, but they Thompson, M.L. and M.A. Kramer. 1994. Modeling
perform poorly in situations where the control Chemical Processes Using Prior Knowledge and
parameters of the system formalize the final system's Neural Networks. AIChE Journal, 40(8), 1328-
response and produce relatively rapid changes in the 1340.
variables to be predicted. Because the predictions of a Wild, A. and V.G. Breeze (1981). Nutrient Uptake in
system like this are normally useful in on-line Relation to Growth. In: Physiological Processes
systems such as the ones described before, good Limiting Plant Productivity, (e. B. Johnson,
performance in situations like these is required. Thus, Ed.), Butterworths, Boston, pp. 331-344.
the NN model is considered to be necessary.

REFERENCES

Barber, SA and M. Silberbush (1984). Plant Root


Morphology and Nutrient Uptake. In: Roots.
Nutrient and Water Influx. and Plant Growth, (S.
A. Barber and D. R. Boulding, Eds.), Soil
Science Soc. of America, Crop Science Soc. of
America, American Soc. of Agronomy,
Madison. pp. 65-87.

178

You might also like