Simulation Analysis of PID Optimization of Hydraulic Pressure System Based on Genetic Algorithm

2013-06-02 06:17XUXiufen
机床与液压 2013年18期

XU Xiufen

Mechanical and Electrical Engineering Institute,Xinxiang University,Xinxiang 453003,China

1.Introduction

According to the main characteristics of modern steel rolling production,in order to meet the requirements of the tension,position,speed and pressure control in real applications,the flat machine adopts hydraulic pressure system control(APC)mode[1].The conventional Z-N[2-3]tuning PID control were feedback correction of position control system,pressure control system.Although it has the effect to control dynamic characteristics of the system,a general PID controller of proportion,integral and differential needs three parameters to tune or debug.It is difficult to determine the down time and the workload is relatively cumbersome.Limitations of PID controller will cause some difficulties to automatically adjust the parameters of APC controller.Genetic algorithm(GA)[4-5]is a kind of simulated evolutionary mechanism of random search method for global optimization,with very strong global optimization ability.Genetic algorithm is a direct search method,basically there are no restrictions on the fitness function, which does not require the function continuity and not require the function differentiable.Therefore,there are some advantages to use genetic algorithm to adjust the hydraulic pressure system of PID parameters.

2.The mathematical model of APC system

APC system is one of the main part of temper mill,and is mainly composed of electro-hydraulic servo valve,hydraulic cylinder,sensor,controller and amplifier,supply pipe,oil return pipe etc.The main function of the hydraulic pressure device is to correct the shape,improve the mechanical properties and the surface quality.Position control is one of the basic functions of APC.The actuator position control loop is hydraulic cylinder driven by hydraulic servo valve.During normal operation,the position control loop and the pressure control loop are switched automatically according to the specific circumstances.A block diagram of control system is shown in Fig.1.

Fig.1 A block diagram of control system

2.1.The transfer function of electro-hydraulic servo valve,servo amplifier and feedback device

The dynamic response of the servo valve is often much higher than that of the dynamic component of the response.Generally speaking,two order vibration links of transfer function could be written as follows:

If the natural frequency of two order vibration link for servo valve is higher than that of the power component,the transfer function can also be represented by one order inertial link and the transfer function could be expressed as:

Servo amplifier uses integrated elements with fast response speed and can simplify the proportion link.The transfer function is:

The feedback devices(i.e.,the position sensor and the pressure sensor)can be expressed as proportional representation,the transfer function is:

In the formula(1)~ (4),theKSvis the gain of servo valve,qL=KqΔxv-KcΔPcis the natural frequencies of the servo valve,qL=KqΔxv-KcΔPcis the damping ratio of servo valve,Kais proportional to gain andKfis the gain of feedback potentiometer.

2.2.Transfer function of hydraulic cylinder

1)Flow continuity equation ofhydraulic servo valve

In the formula:qLis the valve load flow;Kqis the valve flow gain,Δxvis the spool displacement,Kcis valve flow pressure coefficient,ΔPcis load pressure difference.

2)Piston flow equation

In the above formula:Apis cylinder piston area,XPis the cylinder displacement output,tis the time variable.

3)Piston force balance equation.

In the formula:miis the piston and load mass,Bpis the viscous damping coefficient for piston and load,Kis the hydraulic spring load stiffness.

Use the Laplace transform for the formula(5)~(7)and neglecte the elastic load transfer function,the transfer function of cylinder is could be obtained as follows:

3.G-A tuning principle

PID control based on genetic algorithm[6],which is a known control system strategy for:

By using the genetic algorithm of PID,all the control parameters such asKP,KiandKdcould be optimized.The optimization process is how to find the right control parameter set[Kp,Ki,Kd]to increase the performance of control system.The optimization processes are as following steps[7-8]:

Step1 The determination of parameters

First to determine the correct range of parameters,the scope is generally given by the user,and then the precision need to be determined to drive the code to run.The selection of binary represents each of the parameters,and the relationship between the parameters could be obtained.Then to connect the binary string,which consists of a length of binary string,the string for the genetic algorithm could operate on objects.

Step2 Selection of the initial population

Due to the requirements to realize the whole optimization process,the computer will randomly generate initial population and all these random numbers are uniformly distributed between 0 and 1.For all these generated numbers,if the values of number is between 0 and 0.5,these number stand for 0;and if the values of number is between 0.5 and 1,they stand for 1.At the same time,it also wants to consider the complexity of the calculation to specify the size of the population

Step3 Determination of the fitness function.

Under all these conditions,the general optimization method should satisfy the constraints and a set of satisfaction parameters could be obtained in the design parameters as one of the best ones from the group.There are three aspects to indicate a control system and they are the stability,accuracy and rapidity.For example,the rise time will reflect the rapid rise of system.The smaller the rise time,the faster the system control and the better the quality.If the simple pursuit of the dynamic characteristics of the system,the obtained parameters are likely to make the control signal too large,in practice,due to inherent in the system of the saturation characteristic,it will lead to instability for a control system.In order to prevent excessive control energy,the control quantity is one of the objective functions.In order to improve the control effect,the control quantity,error and rise time are the constraint conditions for a control system.Since the adaptive function is associated with the objective function,once it has been determined the objective function will directly adopt as a optimal function parameter.

Step4 The operation of genetic algorithm

First,the fitness scaling method is used to reproduce through all the adaptive fitness functions,and then each string will be used for the corresponding replication probability.Replication probability and the number of strings in each generation,the product of the string should all be replicated in the next generation number.The greater the replication probability in the next generation,the more children will be obtained,otherwise all the children will be eliminated.Second,apply to single point crossover,crossover probability for a few,just from the replication after members of the string to the probability of a few selected,component matching pool,the location of the cross is random.Finally,with a probability of PM mutation,if each generation has 15 strings and each string of 12,a total of 15 × 12=180 string,string figures expected variation is 180×0.010=2(bit).Eeach generation has two words in the string changed from 1 to 0 or from 0 to 1.Initial population through reproduction,crossover and mutation is a new generation of population,the population is being decoded offspring in adaptation function.Through the observation whether it meets the constraint condition,it will be satisfied by repeating the above operation.Constraints are determined by specific problems,as long as the objective function in the specified range,the calculation is terminated.The general procedure of genetic algorithm is shown in figure 2.

4.Simulation analysis of PID optimization of genetic algorithm

When the controlled object is the position control system,the transfer function is Fig.2.

Fig.2 genetic algorithm process map

When the controlled object is pressure control system,the transfer function is as follows:

The sampling time is 0.1 s,the input is a step signal.For the dynamic characteristics of a satisfactory(transition),the time integral of absolute value of error performance index is used as the minimum objective function of parameter choice.In order to prevent excessive control energy,the square of control input is added to the objective function.Choose the formula 12 as a parameter to select the optimal indicator:

In the above formula:e(t)is the system error,W1,W2,W3is weighting factors,u(t)is the control output,tris the rise time.

In order to avoid overshoot,penalty function is adopted,through which once an overshoot is produced the extra overshoot amount is regard as an optimal index,and it is as follows:

In the above formula:W3is a weighting factor,andw3>>w1.

The number of samples for use in genetic algorithm was 30,the crossover probability and mutation probability were:Pc=0.6,pm=0.034 0,respectively.The parametersKi,Kdare in the range of[0,1],KPis in the range of[0,10],w1=0.999,w2=0.001,w3=2.0,w4=100.

We use the real number coding,the position control system for 100 generations evolved,which won three tuning parameters.The parameters are as follows:the PID parameter setting results:KP=0.568 2,Ki=0.225 1,Kd=0.000 0.

Performance index:J=65.406 8.σp=1.006 9%,adjusting timets=0.063 00s.Optimization process of the optimal performance indexJ,the unit step response of PID control after setting is shown in Fig.3.

Fig.3 unit step response of position control system

By using real number coding,the 100 generation of evolutionary pressure control system,three optimization parameters are as follows:

PID parameter Tuning results:KP=0.339 6,Ki=0.155 3,Kd=0.000 0,

performance index:

J=53.106.σp=1.127 0%,adjusting timets=0.068 3 s.Optimization process of the optimal performance indexJ,the unit step response of PID control after setting is shown in Fig.4.

Fig.4 unit step response of pressure control system

By Z-N tuning and G-A tuning of PID simulation and optimization,the results are shown in Tab.1 and Tab.2.

Tab.1 Two kinds of algorithm optimization results of position control system

Tab.2 Two kinds of algorithm optimization results of pressure control system

5.Conclusions

By comparing Table 1 and Table 2,the merits of two algorithm can be obtained.The genetic algorithm can be adapted for the industrial automation control,which can quickly calculate the PID control parameters,accurately draw the system dynamic step response curve,fast convergence speed,small overshoot,good dynamic quality and stability;and to improve search efficiency.Therefore,the proposed algorithm could obtain better control effect than the conventional algorithm.

Reference:

[1]LIU ShunXin,ZHAO ZhiJian.Optimization of temper mill control system[J].GanSu metallurgy,2012,34(6):87-89.

[2]WEI Kexin.MATLAB language and automatic control system design[M]. Beijing: Machinery Industry Press,2004.

[3]LIU Na,HAN P U.Genetic algorithm PID parameter optimization based on genetic algorithm[J].computer simulation,2002,1(2):70-73.

[4]John MeCall.Genetic algorithms for modeling and optimization[J].Journal of Computational and Applied Mathematics,2007,184:205-222.

[5]WANG P,KWOK D P.Optimal Design of PID Process Controllers Based on Genetic Algorithms[J].Control Eng Prac,1994,2(4):641-648.

[6]ZHANG Lizhong,MA Yongxiang.Monitoring and PID parameters of the boiler water level control system tuning[J].machine tool & hydraulics,2011,24(39):93-98.

[7]HOU Yanyan,CAO Keqiang,HU liangmou.The simulation study of PID turning for hydraulic servo system based on algorithm[J].Modern manufacturing engineering,2012,380(5):74-77.

[8]GONG ChiBing,WU Haifeng,ZENG liangcai.The electro-hydraulic position servo system PID control and Simulation Research[J].Machine tool& hydraulics,2005(10):146-148.