Za Plastenik

  • Upload
    stokaba

  • View
    232

  • Download
    0

Embed Size (px)

Citation preview

  • 7/27/2019 Za Plastenik

    1/5

    421

    The Design of Control Node of Temperature in Greenhouse based on

    the Fuzzy Control Technology

    GAO Liang1,LI Aifeng

    2

    1 Office of Scientific and Technological Management, Agricultural University of Hebei,Baoding ,071001, P.R.China

    2 Baoding Beiheng Jibao Technology Co., Ltd. , Baoding ,071051, [email protected]

    Abstract Temperature is an important environmental parameter in greenhouse, how to control thetemperature accurately with a unified method is an important task in greenhouse automatic control

    system. This paper introduces the design of the fuzzy control node of temperature in greenhouse basedon a MCS196 Micro-computer and the component of the greenhouse control system. The fuzzy controlprinciple and method are presented. The hardware structure and the fuzzy control rules and output table

    are expatiated. The diagram of the node hardware function is also presented. By practical work in manygreenhouses, the results present it runs well, the temperature control node has many advantages, such asconvenient installation, easy debugging, and it has strong robustness. So, it has a better practicality anddeserves to have more widespread application.Keywords greenhouses, fuzzy control, temperature, micro-computer

    Environmental control in modern greenhouses is of great significance to improving economic benefitof agricultural production. It can create proper growth condition for plants and make crops obtain highyield. Temperature is an important environmental parameter in greenhouse, how to control the

    temperature accurately with a unified method is an important task in greenhouse automatic controlsystem, especially in the variant conditions of greenhouse structure and environment.

    There are two main factors affect greenhouse temperature : (1) the impact of greenhouse structure andregions, which includes greenhouses volume, wall thickness, transparent area, the heat capacity of

    heating, temperature and infiltration of outdoor environment, etc. (2) the effect of the adjustment ofother environmental parameters on the temperature in greenhouse, these parameters include humidity,light illumination, CO2, etc. So, greenhouse environment system is a multivariable, large inertia, andnonlinear system, and also has the phenomenon of time delay. Accordingly, it is difficult to set up

    accurate and unified mathematical models to solve the problem of this kind of system, also traditional ormodern control method is unable to realize the control. Whereas, fuzzy control needs not the precisemathematical model of the controlled object, the system has strong robustness, and it is suitable fornonlinear, time varying and hysteretic system control. Consequently, fuzzy control is the proper method

    to analyze the greenhouse environment system.This paper develops the fuzzy control node of parameters in greenhouse based on a MCS196 Micro-

    computer, and a more thorough research of the control rules, design and implementation of thehardware which are based on the Micro- computer fuzzy control system are made.

    1 Fuzzy control algorithm

    The node is a fuzzy control device of double-input and multi output. The input variables include thetemperature deviation in the greenhouse and its change rate; the output variables include the temperature

    controlled variables and different combinations of air-venting, air-entraining and humidification. Thecore of the control is the fuzzy controller, after the fuzzy processing of the measured environmentparameters and input variables, then is the processing of fuzzy inference and anti-fuzzy, the output offuzzy control is obtained. The principle is shown in Fig. 1.

    1.1 Fuzzification of temperature and temperature deviationTemperature deviation e is the difference between the measured temperature and its set value. The

  • 7/27/2019 Za Plastenik

    2/5

    422

    node divides the temperature control region into two parts: fuzzy control region and confirmed control

    region. For the temperature control, temperature deviation of set value is within 4 is fuzzy control

    region, the others is confirmed control region. In fuzzy control region, the fuzzy control node regulatestemperature automatically by the rules of fuzzy control; in confirmed control region, the node makes

    forced cooling or heating control, and emits alarm signal when the temperature exceeding standard. Infuzzy control region, to the convenience for the realization of single chip computer, select the domain of

    linguistic variable e and e

    x={-4,-3,-2,-1,0,1,2,3,4},here, e is the deviation between the measured

    temperature and its set value e is the change rate of e,it can be obtained by e=e(kT)-e[(k-1)T] to

    make the regulation more easy, quantization factork

    and k

    are introduced, and e ande are made to

    be dots in the domain. In this domain, the language true value set of eand e isAandBseparately, their

    domains are both {NB

    NS

    ZE

    PS

    PB},in other words, the temperature deviation, error rate of change

    and the output all can be divided into 5 fuzzy sub-status, separately is PB(positive big), PS (positivesmall),ZE (zero),NS (negative small),NB (negative big). The attribute function of e and e is shown inFig. 2.

    Fig. 1 Diagram of fuzzy control system Fig. 2 Attribute function of eand e

    1.2 The rules and decisions of fuzzy controlThe principle of fuzzy control rules is to make the dynamic and static characteristics of output

    response to be the best. For example, when the temperature deviation e is much bigger,in order toeliminate the deviation as quickly as possible, the controlled variable should change rapidly, no matterhow the temperature changes. If it is NB, in other words, the deviation of temperature in the greenhouse

    and the set value is negative biggest at the moment, the temperature decreases to the lowest, now inorder to eliminate the deviation as quickly as possible, the controlled variable should increase faster, sothe node of fuzzy control take the bigger controlled variable; if the temperature deviatione is NS or ZE,the main problem transforms to stability. In order to prevent overshoot, and to make the system stable assoon as possible, the change of the controlled variable is confirmed according to the concrete conditionsof the changed temperature, and chooses the corresponding control rules. If e is positive,it indicates

    that the change of temperature has a decrease trend, so the fuzzy control system should take the smaller

    controlled variable

    in other cases, the fuzzy control rules under different situations of the change of

    temperature can be deduced by analogy. By the analysis of various possible cases and the corresponding

    control decision in the process of control, 25 control rules can be obtained as Table 1. The control rules

    can be described as the following condition sentence:IF e=Ai ANDe=Bj THEN u=Cij

    ( i =1, 2, ,n; j=1,2,, n )Here,Aiis the language variable value of e,Bjis the language variable value of e, Cijis the language

    variable value of controlled variable u which corresponds to Ai and Bj. That is

    A1=B1=NB,A2=B2=NS,A3=B3=ZE,A4=B4=PS,A5=B5=PB Cijcan be found in Table 1, nis the number of

    language true value set A, Band C,here, n=5.According to the method of f fuzzy reasoning, the fuzzy

    condition sentence above can be described with a fuzzy relation matrixRl

    Rl=AiBjCij (l=1,2,,t)Here, t=25 is the number of fuzzy condition sentences. The membership function of each element in

    Rlis:

    K1

    K2

    Fuzzy

    Fuzzy

    FuzzyController

    K3 Object

    -

    e

    e

    u Y

  • 7/27/2019 Za Plastenik

    3/5

    423

    Table 1 Fuzzy control rulers

    ee

    NB NS ZE PS PBNB PB PB PB PS NB

    NS PB PS PS ZE NB

    ZE PB PS ZE NS NB

    PS PB ZE NS NS NB

    PB PB NS NB NB NB

    lR =

    iA

    jB

    ijC

    The fuzzy relation matrix which corresponds to the master control rule isR. when eande take fuzzy

    vectorAandBseparately, according to the combination rule of fuzzy reasoning, fuzzy subset of outputcontrolled variable can be obtained:

    U=(AB)R

    The node adopts gravity method, and by means of anti- fuzzy to U, the exact output is obtained.According to the above analysis, the off-line calculation of the values of eande are made. Then theoutput controlled variable ucorresponding to different eande are obtained, the collection of fuzzy

    control is shown in Table 2. Make this table fix in the program memory of 80C196, e and e aremultiplied by k1 and k2 separately in every period, and rounding is made after getting the results, thenthe controller obtains the value of input domain, then the domain value of controlled variable is gained

    by lookup table, and then the actual controlled variable is obtained according to the present status of thegreenhouse actuator, at last, the output controls the controlled object. As it has certain coupling betweentemperature control and humidity control, in practical control, temperature is the prime consideration

    target, because the fuzzy control has the advantage of insensitivity of the parameter perturbation andnoise, actually, it implicates the thought of decoupling when the fuzzy rules is instituted, this weakensthe influence of coupling to some extent.

    Table 2 Control results output

    ee

    -4 -3 -2 -1 0 1 2 3 4

    -4 4 4 3 2 2 3 0 0 0

    -3 3 3 3 2 2 2 0 0 0

    -2 3 3 2 2 1 1 0 -1 -1

    -1 3 2 2 1 1 0 -1 -1 -2

    0 2 2 1 1 0 -1 -1 -2 -2

    1 2 1 1 0 -1 -1 -2 -2 -3

    2 2 1 0 -1 -1 -2 -2 -3 -3

    3 0 0 0 -2 -2 -2 -3 -3 -3

    4 0 0 0 -3 -2 -2 -3 -3 -4

    2 The hardware design of the node

    The Diagram of the node hardware function is shown in Fig. 3. 80C196 micro-computer is the controlcenter of the node. The micro-computer has many characteristics, such as reliable performance, highintegrity, and its word-length, operation speed, instruction system and interruption function could satisfy

    the needs of fuzzy control. CPU peripheral chip adopts PSD311 programmable chip, it has 32kEPROMand programmable gate array inside the chip, and makes the whole system has the characteristics of

    compact structure and programming flexibility. 12 bit A/D converter with high precision andpre-multiplexer.

  • 7/27/2019 Za Plastenik

    4/5

    424

    Fig. 3 Diagram of node

    When the node works, the sensor converts the greenhouse environmental parameters to electricalsignal, then sends to conditioning circuit, after the treatment of amplification and linearization, it is

    inputted into Micro-computer by A/D converter, compares the measured temperature with its set value,the deviation and change rate is figured out, then call the program of fuzzy control algorithm, the outputof controlled variable is gained by fuzzy controller, after photoelectric isolation, the controlled

    variable drive the external equipment by driving circuit and regulates the temperature in greenhouseautomatically. Meanwhile, for the micro-computer, the data of environmental parameters and the valueof time provided by real-time clock is stored in NVRAM every 5min , and the capacity of NVRAM is32 k bytes, it can store 72h` s history data; The characteristic of NVRAM is the data will not be lostwhen power off. So, at the inner of NVRAM, besides storing the history data, it stores the set value of

    all parameters to guarantee the system still running according to the original set value when powersupply comes back. The keyboard and display constitute input and display board, and are used to realizethe real-time display of environmental parameters and the input of parameter settings.

    The output circuit adopts the serial transmission mode, the line can be saved and it is convenient forisolation. By means of photoelectric isolation, it can eliminate interference from external circuiteffectively. In order to improve the reliability, the circuit adopts optically coupled isolation, moreover,the controller takes some measures:

    (1) adopting software watchdog and hardware watchdog;(2) providing power supply for micro-computer with precision DC/DC converter;(3) adopting hybrid software digital filter to suppress periodic and pulsed interference.Humidity sensor, light intensity sensor and CO2 sensor are added in the node, and so the node of

    different parameters can be constituted. This is shown in the dashed-line frame in Fig. 3.

    3 Composition of greenhouse control system

    The structure of greenhouse control system which is

    composed of control nodes is shown inFig. 4.PC computer,as the center of monitoring and control system, can realizethe management of several greenhouse environmentalparameters: sub-sectional setting and real time monitoring forthe environmental parameters; storing, display, analyzing and

    printing the historical data; managing the equipment statue ingreenhouse and providing it to the controller; the setting ofthe control parameter of control algorithms can be made. The

    connection between PC and the controller adopts RS-485communication protocol, the range of RS-485communication protocol is more than 1km,the number of

    Monitoringmachine

    Controlling machine

    Interface circuit

    Drive interface ofoptical-electrical

    isolation

    LED display in

    small keyboard

    80C196

    Single

    chip

    mocro

    compu

    ter

    PSD

    311Temperature sensor

    A/D

    Conditioningcircuit

    Humidity sensor

    Light intensity sensor

    Fig. 4 Diagram of control system

    Monitoring center computer (PC)

    Node n

    RS-485

    Node 2Node 1

  • 7/27/2019 Za Plastenik

    5/5

    425

    nodes can reach 256, so it can administer multiple greenhouse control nodes.

    4 Conclusion

    Because of the diversity of greenhouse structure and the complexity of its surrounding environment,it is difficult to set up accurate mathematical models, therefore, the precision control can not be realizedwith traditional or modern control method. According to the practical requirement, this paper developsthe fuzzy controller based on micro-computer, the system needs not the precise mathematical model ofthe controlled object, and has strong robustness. Consequently, it is the proper method to control the

    temperature of the greenhouse environment. The temperature control node has many advantages, such asconvenient installation, easy debugging, etc. By practical work in many greenhouses, the results presentit runs well, so, it has a better practicality and deserves to have more widespread application.

    Reference

    [1] Zhang Zengke, Application of Fuzzy Mathematics to Automatic Technology[M], Beijing:Tsinghua University Press,1996

    [2]Zhang Weiguo, Yang Xiangzhong, Theory and Application of Fuzzy Mathematics [M],XiAn:Northwestern Polytechnical University Press, 2004

    [3]Ren Zhenhui, Zhang Shuguang, Xie Jingxin, Development of Intelligent Monitoring andManaging System of Environment Parameters for Solar Greenhouse [J].Transactions of the ChineseSociety of Agricultural Engineering, 2001, 17(2):101-104

    [4] Xie Songhe, Gan Yong, Design and Application Examples of Fuzzy Controlling System onSingle-chip Computer[M], Beijing: Publishing House of Electronics Industry,1999