Mechatromcs Vol, 4. No. 6. pp. 607-615, 1994 ~) lq4,t Elsevier Science Ltd Printed in Great Britain. All rights re.fred. 0957-4158/94 ST.00÷O.~)
Pergamon 0957-4158 (94) E0024-K
AN EXPERT SYSTEM TO CONTROL HUMIDITY AND TEMPERATURE OF A LABORATORY SCALE GREENHOUSE O. S. TCRKAY Mechanical Engineering Department. Bogazi~i University, 80815 -Bebek. Istanbul. Turkey
(Received 16 December 1993: accepted 30 March 1994) Abstract--The humidity and temperature of a laboratory scale greenhouse are controlled using a rule-based expert system. The measured inside and outside temperatures of the greenhouse are used with a linearized set of relations of the standard psychrometricchart in order to predict the internal and external relative humidities. Then. the measured internal and external temperatures and relative humidities, respectively, are processed based upon the knowledge of an expert operator to actuate the resistor heaters, the ventilators and the humidifier of the greenhouse using on-off control actions until the internal humidity and temperature reach their reference values, in addition, this research enables the experimental validation of a humidity measurement technique based on a regression analysis of the standard psychrometricchart first proposed by Jepson.
I. INTRODUCTION Agricultural greenhouses are used to increase plant quality and productivity by controlling temperature, and occasionally humidity, of the internal air. Research greenhouses, on the other hand, are designated to control light intensity and CO2 concentration besides temperature and humidity in order to investigate their effects on plant dynamics and growth quality [1-31. Since the 1980s a number of researches have been devoted to integration of microcomputer based control systems to operate greenhouses in order to improve plant quality and growth that also lead to economic savings by efficient control of temperature and humidity [4-9]. Saffell and Marshall controlled the temperature of a greenhouse using a PDP-I1 computer [7], and Matthews and Saffell then extended their work successfully to control the humidity [8]. However, their control algorithm did not incorporate external humidity and they did not report results on simultaneous control of the coupled variables of humidity and temperature of the resulting MIMO process which can cause control and experimental problems. In their work, Davis and H o o p e r [10] showed that robust greenhouse temperature control can be achieved with the addition of heating pipe temperatures to proportional and integral feedback control of the measured internal air temperatures. Recent developments in the fields of artificial neural network theory, fuzzy control technique, H,, synthesis and expert systems provide significant research and application potentials in air conditioning research in general, in greenhouse control in particular, because these are more flexible methods than the classical three term controllers to deal with nonlinear multivariable processes [11-13]. 607
608
O.S. TI]RKAY
The objective of this research is to develop the core of an expert system to control the coupled variables of temperature and humidity of a glasshouse based on empirically derived heuristic rules of the form IF THEN
[inside and/or outside glasshouse[ [heater, fan, humidifier]
condition
actuation
To this end, the shallow knowledge of a process operator is used to formulate the core of an expert control algorithm that is experimentally implemented in this work. On the other hand. the presented algorithm can be improved with the deep knowledge of specialists on plant dynamics, on the specific actuators and on the objectives of the whole process [14. 15]. This research is a fusion of thermo-mechanical, electrical and computer control applications which constitutes a typical application of modern mechatronics engineering. In addition, this work enables the experimental validation of a humidity measurement technique based on the regression analysis of the standard psychrometric chart first proposed by Jepson [16].
2. EXPERIMENTAL SYSTEM DESIGN
2. !. Description of the system The microcomputer based expert control system is shown in Fig. 1. The laboratory scale glasshouse of dimensions 1.0 m x 0.5 m x 0.4 m is heated underneath by three resistor heaters of 390 W total power. The humidification process is realized by pumping water through a pipe with holes onto soil of the glasshouse for a specified short period. This method is cheap but it has the disadvantage of being a slow humidification technique compared to others. A mains-driven ventilator of 0.2m~s -~ flow rate is used to control cooling and dehumidification of the internal air. The effectiveness of cooling and dehumidification mechanisms are important for glasshouse control and they can cause problems as was the ease in this work and th~,t reported in [8].
r•R z
~
T xw.
Measurin8~ Electronics~ ;~. e lays I:1
~.
0 T xd ~"'~
_[~ Psychrometers
~ ' , ~ T F~
_
-
_I~ TI,
..-
~
w
I l
Itovl_ F l I
,
-
.... ,
Dimensions 1.0m x 0.5m x .4m Fig. |. M i c r o c o m p u t e r based glasshouse control system.
Expert system to control humidity and temperature
609
Since the process is a slow dynamics system an 8 MHz XT-type PC is used. A 12-bit data acquisition and control board with 8 AD and 3 DA channels is mounted into the microcomputer. Four of the AD channels of 5 V input each are utilized to digitize the measured internal and external, dry-bulb and wet-bulb temperatures. The measured temperatures are processed on-line to estimate the internal and external relative humidities using Jepson's method as explained in the next section. The three 10 V-DA output ports have been used to actuate the relays controlling the fan, the humidifier pump and the resistor heater according to the decision to be taken by the expert control algorithm.
2.2. Temperature measurement The temperature signals are measured using thermistors that are more accurate than thermocouples but suitable only for low temperature ranges. The outputs of the thermistors are conditioned through an in-house-made electronic circuit including four channels. Each channel is calibrated to a gain of 0.012V°C -t in the range of 0-100 °C. Thus, the resolution of temperature measurement becomes equal to Tr~ -
- 1-°C x 5 V - 0.1 oc unit -x. 0.012 V 12-"
2.3. Humidity measurement The internal and external humidities could have been measured using humidity transmitters. However, this research permitted the experimental validation of a humidity measurement technique first proposed by Jepson [16l and described in the next paragraph. The dry-bulb temperature, T, is simply that indicated by an ordinary bare transducer such as a thermometer or a thermistor. The wet-bulb temperature, Tw, is that indicated by the thermistor bulb covered with a wet absorbent wick and exposed to an unsaturated air-water vapor mixture moving between 2.5 and 5 m s -t. [17]. To this end, a permanent magnet D.C. motor driven fan has air continuously blown onto the thermistor bulb Covered with an absorbent wick embedded in distilled water
(Fig. 1). For air-water vapor mixtures the wet-bulb temperature and the adiabatic saturation temperature, T*, differ by only a few tenths of a degree at atmospheric pressure. Thus, T* can be substituted by T,, in psychrometric calculations. Corresponding to a given combination of a dry-bulb temperature T and a wet-bulb temperature Tw, the nonlinear psychrometric relations specify the value of relative humidity • as shown on the schematic psychrometric chart of Fig. 2. The conv.entional methods of humidity measurement rely upon the use of a large matrix table of T, T,, and ~0 calculated from the nonlinear psychrometric relations, or upon an interative procedure of these relations [18]. Jepson used the least squares regression analysis to obtain a set of linear equations approximating the standard psychrometrie chart curves under an atmospheric pressure assumption. The resulting linear equation T,, = b(#,) T + a(,t,),
(1)
610
O.S. TURKAY
Tw ~
~=0.9~
T* I
I*Ci I
"~ = 0.3 :
30 T [ °C] 80 Fig. 2. Relations of T. T* and q) of schematic psychrometric chart.
where (^) denotes "'estimate", together with the regression coefficients bop ) and a(
T,+ (measured) - 7"+ [from Eqn (i)] < 0.2 °C Output the calculated relative humidity as tile measured one.
3. EXPERT CONTROL ALGORITHM The expert system to control the temperature and humidity of the glasshouse is shown in Fig. 3. The desired ranges of internal relative humidity and temperature of the glasshouse are specified as inputs to the computer code with their minimum and maximum values. The measured internal states together with the measured external relative humidity are fed back to the rule-based expert control algorithm consisting of three levels of hierarchy. In commercial greenhouse applications the internal temperature is usually greater than the outside one. Hence. the external temperature is not included within the decision tree. However. its inclusion is straightforward and this could be done by incorporating one more level of hierarchy. Table 1. Regression coefficients of linearizcd psychrometric relation
¢~
h(~) [°F/~FI
a(~) I°FI
Corr. coeff.
0.3 0.4 0.5 O.6 O.7 0.8 0.9 1.0
0.750256 O. 18112{)2 0.858568 O.896106 0.928161 0.955fM6 0.978813 1
- I. 15645{] -2.491510 -2.911680 - 2.69237{) - 2. 6967311 - 1.561950 -0.805760 0
0.999897 0.999945 0.999973 O.999993 I.(~)
Expert system to control humidity and temperature Rel'. Inputs
[
r,-r H0=Tmin Hl=Hmax
611
Measurements1 T
P!
H : Internal Rel. Hum] Fix :External ReI.Hum]
IF
ACTUATE
I^ew,t., [Q:~ter V: F~n H: Humidir~I
~, 1
I°'.-"-- I Fig. 3. Decision tree of expert control algorithm.
In the first level of hierarchical control, the measured internal temperature T is compared with the reference range of T,,i,-Tm~x. Assume, for example, that T > Tm~ at a given sampling time. Then the algorithm goes to the second level of hierarchy to compare the measured relative humidity H with the specified H,,~,-Hm~, range. Assuming that H > H,,~x, the algorithm based on the shallow knowledge of an expert operator takes the decisions to put the heater off, the fan on and the humidifier off. Thus, the temperature and the relative humidity of the glasshouse decrease until they fall within the specified ranges.
4. RESULTS AND DISCUSSION The experiments were conducted in March during a week period when the temperature and humidity of the laboratory were around 14 °C and 70% relative humidity, respectively. The experimental temperature measurement was checked using a thermometer of 0.1 °C accuracy. The relative humidity measurement was calibrated using a commercial psychrometer. Since the process dynamics is slow the sampling period was chosen as 3 s. First, the heating dynamics of the glasshouse was investigated. To this end, at initial internal conditions of 24.1 °C and 75% RH, the desired range of temperature, [Tmi, = 25.9°C, Tm~ = 26.00C], and the uncontrolled range of relative humidity, [RHm,, = 3, RHm~ = 99], were specified as inputs. This way the temperature was controlled alone without humidity control. In Fig. 4, it is seen that the internal temperature reaches its reference range in 4 min after a time delay of approximately 1 min. Since bang-bang control is used, the recorded signal shows a limit cycle
612
O.S. TORKAY Tmax=26.0 RHmax=99] Tmin=25.9 R Hmin=30 i
27
26.5
78
'
76
26 T 25.5 ['C]
25
24.5 24 0
1
2
3
4
5
Time
6
7
8
9
[ Min. ]
Fig. 4. Heating dynamicsof the glasshouse without control of humidity. oscillation of approximately 45 s period. The temperature remained within the actual range of [T = 25.8 °C. T = 26.2 °C] with an error of 0.1 °C which is due to the overall thermal capacitance of the glasshouse. The achieved control is excellent for a glasshouse application. It is noted that while the temperature increases, the uncontrolled relative humidity decreases and finally reaches a steady-state value of 69%. A similar experiment was conducted to observe the dehumidification dynamics. At internal initial conditions of 79% RH and 19.2 °C, the reference range of relative humidity [RHm,, = 67, RH,,a~ = 69] and the uncontrolled range of temperature [Tmi, = 10°C, Tm,,x= 3 0 ° C ] were specified as the inputs. Figure 5 shows that the dehumidification process is very slow. The reference range is reached in about 10 rain. In fact, the humidification and dehumidification processes of the experimental set-up had very slow response times due to the filirness of the physical devices used for these purposes. The relative humidity measurement method proposed by Jcpson is experimentally verified also in Fig. 5. It is seen that the rchttive humidity is measured with a
rmax=ao ~ Tmin=10
24
RHmax=69 RHmin=67
85
23 22 T
[ "C]
PSV
80
~
RH
21
75 %
20
70 RH
19
18
" i
RH Range
65
17 0
1
2
3
4 Time
5 6 [ MIn. ]
7
8
9
Fig. 5. Dehumidificationdynamicsof the glasshouse without control of temperature.
Expert system to control humidity and temperature
613
resolution of 1%. The accuracy of this method is significantly dependent upon the correctness of the measurement of the wet-bulb temperature. However, this drawback is also true when a psychrometric matrix table or iterative calculations of psychrometric relations are used for humidity measurement. Hence, Jepson's method is a good alternative technique compared to the other two methods due to its memory storage advantage and possible computational speed advantage. The simultaneous control of temperature and humidity are shown in Figs 6-8. In these cases, the process becomes a MIMO control system. At initial conditions of [13.5 °C, 79% RH], a step change increase of [Tmm = 15.6 °C, T,,~., = 15.8 °C] and a step change decrease of [RHmi. = 72, RHr, a, = 74] for the desired ranges of temperature and relative humidity were specified as the inputs, respectively. The resulting curves of temperature and relative humidity together with
Tmax= 15.8 RHmax=74 ] Tm n = 15.6 RHmin = 72 16 I ,.,,~ T Range ~ 15.5 15 T 14.5 [ °C] 14 13.5 13 on ~._ off
0
[80
~
76%
te~-F-an-~ RH Flange } " --~_~__~-÷L_,__÷._r~.__ ; ;t 70
%ff ÷
on
[
2
4
6
8 Tlme
10 12 [ Min. ]
14
16
18
Fig. 6. Simultaneous control of increasing the temperature and decreasingthe relative humidity.
Tmax=18.2 RHmax=77 1 Tin!n=18.0 RHmin=75 ] 20 I ~ 19.5
""~'~.~
t
~,~..~ IU "~ ~%,%-~_~
19 t . 18.5 .~-=~C(~=j ["C]
18
~
17
-
~
~f 0
78
RH Ra~nge
1.5
T Range . . . . . . . C
~ - 7 4 [
~"-~'-~;,-~t
....
~ 3.0
÷: ÷ 4.5 6.0 7.5 Time [ Min. ]
% RH
" ~'v~.70
66 9.0
10.5
Fig. 7. Simultaneous control of decreasing the tcmlrmrature and increasing the relative humidity.
O.S. TORKAY
614
!Tmax=24.0 RHmax=72 t !Train=23.8 R H m i n = 7 0 I
27
! 76
r----"
26 RH
25 T
24
[°C]
23 22
T Range
....
.... ,
,~ _ _.-/..n,,'i,.'
=-
-
-~/~- ~ - ~ 72 ~-; ' P ~; . -_~-.-~-4~' 70
~ Heater • Fan i
%
I 66
21 2O 0
1
2
3
4 Time
5 6 [ Min. ]
7
8
9
10
Fig. 8. Simultaneouscontrol of increasingboth the temperature and the relative humidity.
the control actions of the heater and the fan are depicted in Fig. 6. The actual temperature and relative humidity reach their reference ranges in 6 and 10 min, respectively. After 14 min the internal temperature remains within the desired range, thus the heater becomes off. On the other hand, the fan switches on and off to maintain the relative humidity within the reference range. The results of a similar experiment conducted by decreasing the temperature and increasing the relative humidity from the initial values of [19.8°C, 72% RH] are displayed in Fig. 7. The desired ranges of temperature and relative humidity, [T,,i, = 18.0°C, T,,~ = 18.2 °C] and [RI-I,,,,~= 75. RH ...... = 77] are reached successfully. Note that the cooling mechanism of the glasshouse is inefficient and this renders the implementation of the expert control algorithm a more difficult task. Figure 8 displays the results obtained by increasing both the temperature and the relative humidity of the glasshouse from the initial values of [21.0 °C, 64% RH] to the reference ranges of [7",,,,, = 23.8 °C, T...... = 24.0 °C] and [RH,,,, = 70, RHm,x = 72] which are also achieved successfully in approximately 10 min. With the experimental facilities available it was not possible, however, to decrease the temperature and the relative humidity simultaneously. This was due to the ineffectiveness of the dehumidification process and to the lack of an effective cooling device which are both realized by replacing the wet air inside the glasshouse with the dry air from outside. A similar ambiguity is reported by Matthews and Saffell [8].
5. CONCLUSIONS The temperature and relative humidity of a laboratory scale greenhouse have been controlled using a rule-based expert system. The expert control decision tree has been devised upon the shallow knowledge of a process operator. The experimental results demonstrated that the expert algorithm works successfully for SISO or MIMO control of the coupled variables of temperature and relative humidity of the glasshouse. However, it was not possible to decrease temperature and humidity simultaneously. This was mainly due to the ineffectiveness of the ventilator to cool the internal air
Expert system to control humidity and temperature
615
and to decrease the humidity of the glasshouse. However, this does not shade the validity of the expert control algorithm which can be improved further with the deep knowledge of experts for specific applications. This experimental work has further validated the humidity measurement technique proposed by Jepson. The described method is applicable with sufficient accuracy for most engineering implementations as long as the wet-bulb temperature is measured accurately. This, however, is a necessity for other conventional methods such as iterative method of psychrometric relations or using psychrometric matrix tables. Thus, Jepson's method is assessed to be a good alternative to these methods. Acknowledgements--The support of the Research Fund of Bogazifi..University is acknowledged. The author would like also to thank Bogaziqi University Alumni Society (BUMED) for their financial contribution. Special thanks are due to S. Giilener and G. Aysun who initiated this research as their graduation project and to Assoc. Prof. V. Kalenderoglu for his advice.
REFERENCES I. Morimoto T., Fukuyama T. and Hashimoto Y., Growth diagnosis and optimal control of tomato plant cultivated in hydroponics. Environ. Control Biol. 27(4), 137-143 (1989). 2. Hanan J. J., Coker F. A. and Goldsberry K. L., A climate control system for greenhouse research. ltortscience 22(5). 704-708 (1987). 3. Morimoto T., Hashimoto Y. and Fukuyama T., Identification and control of hydroponic system in greenhouse. Proc. 7th IFAC Symposiunz on Identification and System Parameter Estimation 2, 1677-1681. Pergamon Press, Oxford (1985). 4. Willits D. H.. Karnoski T. K. and McClurc W. F.. A microprocessor-based control system for greenhouse research: part i hardware. Trans. Am. Soc. Agric. Engng 80. 688-692 (19811). 5. Willits D. H.. Karnoski T. K. and Wiser E., H.. A microprtv,:essor-bascd control system for greenhouse research: part ii software. Trans. Am. Soc. Agric. Engng gll. 693-698 ([t)8l)). 6. Monteith J. L., Marshall B., Saffell R. A., Clarke D.. Gallagher J. N.. Gregory P. J.. Ong C. K., Squire G. R, and Terry A.. Environmental control of a glasshouse suite for crop physiology. J. Exp. Biol. 34, 3(19-321 (1983). 7. Saffcll R. A. and Marshall B.. Computer control of air temperature in a glasshouse. J. Agric. Engng Res. 28. 469-477 (1983). 8. Matthews R. B. and Saffell R. A.. Computer control of humidity in experimental glasshouse. J. Agric. Engng Res. 33,213-221 (1986). t,~. Sangcr T. R., Measurement and control of temperature, humidity and carbon dioxide concentr:ttion in greenhouses. R. Agric. Soc. Engl. Monograph Series No. 4, Farm Electron. Comp.. pp. 269-287 ( 19851. 10. Davis P. F. and Hoopcr A. W., Improvement of greenhouse heating control, lEE Proc.-D 138(3), 249-255 ( 1991 ). 11. Guesalaga A. R. and Krophollcr H. W., Improved temperature and humidity control using !1+ synthesis, lEE Proe..D 137(6)+ 374-3811 (199111. 12. Morimoto T., Fukuyama T. and Hashimoto Y., Identification of physiological dynamics in hydroponics. Proc. 8th IFAC Symposium on hlentifieation atul System Panoneter Estimation 3, 1736-1741. Pegamon Press, Oxford (1'-)88). 13. Payne E. C. and MeArthur R. C.. Developing Expert Systems. John Wiley, New York (1991)). 14. Price C. J. and Lee M. H., Applications of deep knowledge. Artifcial h+tell. Engng 3(1), 12-17 (1988). 15. Atkinson R. M., Montakhab M. R., Pillay K. D.. Woolons D. J.. Hogan P. A., Burrows C. R. and Edge K. A.. Automated fault analysis for hydraulic systems. Part 1: fundamentals. Proc. inst. Mech. Engrs part I - J . Syst. Contr. 206(14). 207-214 (1992). 16. Jepson S. C., Approximating wet bulb, dew point temperatures. A S H R A E Jnl 30(1), 26-28 (1988). 17. Jorgensen R., Fan Engineering, 8th edn. Buffalo Forge Co. (19831. 18. Sonntag R. E. and Van Wylen G. J.. huroduction to Thermodynamics: Classk'al and Statistical, 4th edn. John Wiley. New York (19821.