Air Compressor Pressure Control System Based On Gearshift Integral PID Controller

. The application of gearshift integral PID controller to air compressor pressure control system is introduced,Its kernel is single chip microcomputer PIC16F877.The design of hardware and solfware are introduced too. Practical application shows that this system has many advantages.


Introduction
In modern industrial production ,compressed air is an indispensable power source.Compressed air, electricity, water and steam are called the four major energy sources in industry, As a compressed air generator, air compressor system is widely used in metallurgy, chemical, tobacco, machinery, medicine, food and other industries, This paper introduces the pressure control system Based Gearshift Integral PID control algorithm, with PIC16F877 as the core device.

Pressure control principle of air compressor
Shown in Figure 1, The pressure sensor senses the pressure of the compressed air and sends the signal into the single chip microcomputer.Single chip microcomputer calculates the pressure difference between the setting value and measurement value preset .

Hardware circuit of pressure control system
The hardware of the pressure closed-loop control system consists of pressure sensor transmitter, inverter, air compressor, microcontroller and related control circuit.The schematic diagram is shown in figure 2. The pressure sensor transmitter sends the pressure signal to the single chip microcomputer, and the MCU outputs the signal according to the control rules to control the output frequency of the inverter, than adjust the speed of the air compressor motor, the exhaust volume of the air compressor changes with the change of the gas consumption, so as to ensure the constant pressure of the pipe network.

Fig. 2. hardware structure of pressure control system
The pressure transmitter includes two parts: pressure detection and signal processing.YTZ-150 remote pressure gauge is used for pressure measurement.Its measuring range is 0 ~ 1.0MPa, and the output is a resistance signal.The range of resistance is 0~400 ohms.The remote pressure gauge is cheaper and the signal processing circuit design is simple, but the consistency of different pressure sensors is poor and debugging is troublesome.The pressure detection and signal processing circuit consists of operational amplifier, reference voltage source and some resistors to form constant current source.A constant current of 1mA is provided to the output resistance of the remote pressure gauge, Convert the resistance value of the pressure gauge to the DC voltage signal, After in-phase amplification by the high sensitivity integrated operational amplifier, output DC voltage signal of 0~5V is sent to A/D conversion built in single chip microcomputer.Due to the poor consistency of the remote pressure sensor, the zero and full scale of the amplifiers of different sensors must be individually adjusted.
The operating environment of air compressor is abominable,such as the electromagnetic interference caused by high power motor, AC variable frequency speed regulator , power supply voltage fluctuation is more serious.So the detection instrument and wiring should avoid the strong magnetic field as far as possible, and the sensor should be powered by high precision power supply.

Control Algorithm
PID control algorithm is simple, good applicability, widely used, But the integral gain K I is constant in the traditional PID algorithm, and remains constant in the adjustment process,so it is better to the small deviation control .When the system is disturbed and the pressure fluctuation range is relatively large, it will cause larger overshoot and longer transition time.Therefore, the requirements of the pressure control system are: When the deviation is large, the integral action should be weakened so as to avoid overshoot and even integral saturation; when the deviation is small, the integral action should be strengthened, otherwise it can not meet the requirements of accuracy.The introduction of variable speed integral PID control algorithm can make the control performance satisfied.For this reason, the coefficient f[E(k)] is set, which is a function of the deviation E(k); when [E(k)] increases, f [E(k)] decreases; otherwise, it increases.After each sampling, multiply E(k) with f[E(k)], and then accumulate: In the formula:P I (k) represents the output value of the variable integration.

The relation between f[E(k)
]and E (k) can be expressed as: P I (k) is substituted into the PID formula: According to formula (2), the Flow chart of variable speed integral PID control algorithm is worked out, as shown in figure 3.

Fig.3. Flow chart of variable speed integral PID control algorithm
In this system, a simple variable step integral PID control is adopted, taking A=10, B=2.The experimental result is better.

Optimization of PID parameters
The system uses genetic algorithm off-line to optimize PID parameters.
Genetic algorithm (GA) is an adaptive global optimization probability search algorithm that simulates the genetic and evolutionary process of organisms in the natural environment, It will be the problem to be solved into the evolution of groups made up of individuals and the operation of the group of a group of genetic operators, the whole system in accordance with the "survival of the fittest in natural selection principle, the survival of the fittest" introduced such as reproduction, crossover and mutation method, generation -Evaluation -Selectionevolution operation is repeated until the search optimal solution.

Y P(k)= P P (k)+ P I (k)+ P D (k)
This system uses GA algorithm to optimize the PID parameters K P , K I and K D in PID discretization expression, so that the performance of the system is optimal.The flow chart of the algorithm is shown in figure 4.

Master Program Design of System
Design of system software based on PIC16F877 MCU,the main program of single chip microcomputer includes initialization, display panel and other subroutine.The implementation of pressure signal acquisition, digital filtering, scale conversion, pressure display, variable speed integral PID control algorithm and other functions are completed by each subroutine.The software also includes the protection of the system.The software flow chart is shown in figure 5.

Master Program Design of System
Design of system software based on PIC16F877 MCU,the main program of single chip microcomputer includes initialization, display panel and other subroutine.The implementation of pressure signal acquisition, digital filtering, scale conversion, pressure display, variable speed integral PID control algorithm and other functions are completed by each subroutine.The software also includes the protection of the system.The software flow chart is shown in figure 5.

Experimental Results and Analysis
The pressure of the gas tank increased from 0.2Mpa to 0.5Mpa in the experiment,and maintain the pressure with the pressure value fluctuates up and down ± 0.02Mpa.When the traditional PID control algorithm is adopted ,the dynamic characteristic curve of the system is shown in figure 6,its dynamic performance is as follows: delay time t d =160s, overshoot σ =3.9℅, rise time t r =420s, regulating time t c =920s.When,

Conclusion
In the air compressor pressure control system of variable speed integral PID control algorithm, large deviation, accumulated slowly, integral effect is weak.When small deviation, the integral accumulation speed is fast, and the integral action is strong.Using genetic algorithm off-line to optimize PID parameters,then the system has the characteristics of fast dynamic response, good control steady state performance, and can quickly become stable.
changes in the range of [0，1],when| E(k)| is greater than a given interval A+B then f [E(k)] =0,and the integral coefficient is 0.When | E(k)| less than or equal to B then f [E(k)] =1, and the integral coefficient is K I .When| E(k)| in the interval [B,A+B],f [E(k)] changes with|E(k)|.

Fig. 5 .
Fig.5.software flow chart of pressure control system