Research of Variable Application Control System Based on Fuzzy Control

The AT89C52 microcontroller and the fuzzy control algorithm is used to design the automatic control system of variable Spraying pesticides. The system adjusts automatically the electric regulating valve according to given Spraying pesticides per unit area so that the actual amount of Spraying pesticides equal to the set value. The simulation model of automatic control system of variable pesticide application was established, and the controller was simulated by MATLAB / SIMULINK software fuzzy control toolbox. The simulation results show that the structure and algorithm of the proposed automatic control system of pesticide application is feasible, The system improves greatly pesticide utilization, reduce pesticide residues and environmental pollution.


Introduction
The planting area of crops continues to increase with the development of agricultural machinery automation and intelligence, and people attach great importance to the problems of environmental pollution and pesticide residue. Conventional application of pesticides has could satisfy the needs of agricultural production. The droplet diameter can not be adjusted with operating environment changes. Variable spraying system implement variable fertilization depending on the number of pests and diseases. In this way, It not only improves the pesticide utilization, but also reduces the waste of pesticides and Adverse pesticides on the environment adverse effects. The system fully reflects its Significant economic, social and ecological benefits. Based on the principle of variable design a set of variable spraying automatic control system, and the controller was simulated by MATLAB software fuzzy control toolbox. The simulation results show that the system is stable and reliable, maneuverability is good, and can meet the requirements of agricultural production [1][2] .

system description and function implementation
In order to realize automatic control, the design based on real-time sensing technology, and use the method of inputting the amount of spraying, that set a unit area spray volume.The current value of the flow rate is measured by the flow sensor, the deviation of the current flow value and the rate of change of the deviation are taken as the input of the control system, The input quantity is fed into the AT89C52 input after isolation amplification and analog-to-digital converter processing.
It outputs the control quantity U (voltage) to control the actuator regulating valve after fuzzification, fuzzy reasoning and anti-fuzzification, so that it will chang to spray amount and the actual amount of spray equal to the set value.

System hardware design
The control system the main control unit uses 8-bit microcontroller AT89C52, Peripheral circuits include, sensor, isolation amplifier, MAX232 serial interface circuit, A / D, D / A conversion circuit, 4 × 4 keyboard and display circuit, alarm circuit etc [3] , hardware structure shown in figure 1.

SCM choice
AT89C52 microcontroller is a low voltage, high performance CMOS 8-bit microcontroller by American company production. The chip contains 8K bytes of rewritable flash ROM and 256 bytes of random data memory, fully compatible with the MCS-51 product instruction, the device is manufactured using ATMEL's high-density, non-volatile memory technology [4] .

Electric valve selection
Electric valve is used to control actuator of the system flow, by controlling the size of the opening angle of the electric valve to control the size of the system flow,The system uses the electric valve of DC0-10V standard voltage signal, The valve has a high control accuracy and fast response.The opening of the valve(0-100%) is proportional to the control signal. When the opening is 0, corresponding to 0V or 4mA ,when the opening is 100%, corresponding to 10V or 20mA. Travel time 60s, Max travel 25mm, Power voltage 24VAC [5] .

Sensor selection
Taking into account the actual operating environment of the machine, the system were selected piezoresistive pressure sensors, turbine flow meters and Hall speed sensor [6] . The three types of sensors have wide speed range, strong anti-interference ability and wide temperature adaptation range, which can meet the requirements of agricultural working environment.

Structure Design of Fuzzy Controller
The function of the fuzzy controller is to imitate the artificial control of thinking way of the human brain, to identify and decide the fuzzy phenomenon, to give precise control quantity and to control the controlled object. The design Use two-dimensional fuzzy controller according to the actual situation [7][8] . The working principle diagram was shown in Figure 2.
In the variable spraying fuzzy controller, The Spray pesticides amount per unit area is set to 0 q , measured by the flow sensor recorded as ( ) t q . Then the deviation e and deviation changes ec as follows. (2) According to the field practical experience. Determining the basic domain of Spraying pesticide deviation and deviation rate of change are [-5,5] L/hm 2 , The output is the voltage applied to the motorized valve. The design set universe of deviation and deviation change amount for{-5, -4, -3, -2, -l, 0, l, 2,3,4,5} 11 levels. Fuzzy subset is divided into { negative large, negative middle, negative small, zero, positive small, positive middle, positive large } seven levels, The system uses trigonometric functions, half-trapezoidal function and half-trapezoidal function as the membership function of the input language value and uses the pulse function as the membership function of the output language value [9] . The fuzzy control rules are determined according to several fuzzy conditional statements drawn by experienced operators in practice many times.These fuzzy statement can be expressed by the fuzzy control rules table，As shown in Table 1.  When the Spraying pesticide amount deviation E is larger and the deviation change EC is positive, Control amount should eliminate the deviation, U take Zhengda. When the deviation E is positive and the error change EC is negative. System should eliminate the deviation and the system does not produce overshoot, control amount U should take smaller [8][9] .

Fuzzy Control Computer Simulation
In order to verify the effect of the fuzzy controller, this paper uses Matlab / Simulink software to simulate the variable pesticide control system based on fuzzy controller. Simulation module shown in Figure 3. Among them, Signal is the input signal Generator, Scope is the output oscilloscope，Adjust the simulation control parameters, run the Start control button, double-click the oscilloscope module, the system can be dynamic simulation [10] . Simulation results was shown in Figure 4. It can be seen from the figure that the system does not fluctuate much at the initial time, the operation is stable, the overshoot is small, the adjustment time is short, and the steady-state error is zero during the stationary period. The control system has achieved good results through field practical application to meet the control requirements of variable application. It improves the control accuracy and stability of the system.

Fig. 4. Fuzzy control simulation curve
To contrast the superiority of the control algorithm design, Figure 5 is a simulation diagram using the traditional PID control. As can be seen from the figure, conventional PID control will have a larger overshoot, larger steady-state error and longer response time.

Conclusion
The microcomputer technology and fuzzy control are applied variable spray control system of vehicle sprayer. The simulation results of MATLAB / SIMULINK software show that the fuzzy controller has better control performance than the conventional PID controller, which can realize fast response, small overshoot, strong adaptability and antijamming ability to parameter variation, Fundamentally greatly improve the system's dynamic quality and steady-state accuracy, improve the overall performance of the system. The control system after the farm actually reached a very good control effect, easy to popularize，and has potential market application prospect.