HUANG Wei,WU Qian
1.Department of Automation, Chongqing Industry Polytechnic College, Chongqing 401120, China;2.School of Computer Science and Engineering, Chongqing University of Technology, Chongqing 400054, China
Fuzzy-PIDControllerofParameterBasedAuto-tuningandItsApplication
HUANG Wei1*,WU Qian2
1.DepartmentofAutomation,ChongqingIndustryPolytechnicCollege,Chongqing401120,China;2.SchoolofComputerScienceandEngineering,ChongqingUniversityofTechnology,Chongqing400054,China
AimedatbeingdifficulttomakesystemcontroleffectbeinthestateofoptimizingfrombeginningtoendbymeansofPIDcontrolparameterobtainedthroughdisposabletuning,thepaperexploredasortoffuzzy-PIDcontrollerofparameterbasedauto-tuning.CombinedfuzzylogiccontrolwithclassicalPIDcontroltechnique,bydintoffuzzyauto-tuningofPIDcontrolparameteronline,whenthesystemperformanceproducesthechangeandgoesbeyondspecifiedrange,thesystemwouldautomaticallystartthetuningprocessofPIDcontrolparameter,andmodifiedthePIDcontrolparameterinrealtime,madetheretunedPIDcontrolparameterbeableinthestateofoptimizingallthetime,andthereforeitcouldobtainbettercontroleffect.Inthepaper,ittookcentralair-conditioningcontrolofenvironmenttemperatureinproductiontechnologyofcigarettefactoryasanexample,andthetestdataofactualsystemsimulationdemonstratedthatitenhancedthecontrolprecisionandstabilitytofuzzy-PIDcontrollerofparameterbasedauto-tuning.Theresearchresultshowsthattheexploredcontrollercansatisfytheworkingconditiondemandinstrongrobustnessandhighprecisionofactualsystem.
parameterauto-tuning,fuzzycontrol,self-learning,fuzzy-PIDController
The demand of production technology in cigarette factory is very high for environment temperature, and by use of PID control it is difficult to satisfy the user requirement in aspects of precision and stability. By means of fuzzy auto-tuning of PID control parameter on line, the paper put forward to modify the control parameter in real time so as to ensure the system to be in the state of optimizing from beginning to end in the operating process.
The Fig.1 shows the control model of PID algorithm. In Fig.1,e(t) (=r(t)-y(t)),r(t),y(t),u(t) is respectively the deviation, input and output of the process, and output of the controller. The typical response is shown as in Fig.2. In which,e,ecrepresents respectively the process deviation and its change rate, and therefore it can be divided into different time section such asOA,AB,BC,CDandDE. If we investigate the dynamic characteristic of each section then it can summarizes control rule.
The incremental control algorithm of discrete PID control rule is as the following.
Δu(k) =KP[e(k)-e(k-1)]+KIe(k)+
KD[e(k)-2e(k-1)+e(k-2)]
And at the same time it has
u(k) =u(k-1)+Δu(k)
In which,KI=KPT/TI,KD=KPTD/T,T,KP,TI,TDisrespectively the integral coefficient, differential coefficient, sample period, proportional coefficient, integral time constant, differential time constant.k,u(k),e(k),e(k-1),e(k-2) is respectively the sample order number, output value of controller and deviation value of system at sample time k, as well as deviation value of system at sample timek-1 andk-2.
Fig.1 Control model
Fig.2 Typical response curve
After selecting the sample period, it can find a set of suitable parameterKP,KIandKDoff line so as to make system approach to the optimal working status basically. It generally adopts the artificial tuning method to adjust the PID control parameter, and although there are lots of methods of parameter tuning to be able for providing reference, but its method is in stage and non-automatic method. Obviously the PID control parameter obtained by disposable setting is very difficult to ensure the control system to be in the state of optimizing from beginning to end. Therefore the application of conventional PID controller comes in for restrictions and challenges.
In fact, the principal puzzle in PID control is the tuning for each control parameter, and auto-tuning system of parameter was presented by Astrom[1]. It means that when the performance of system happens in status change and goes beyond expected range, the system can automatically start the tuning process of PID parameter, and retune PID control parameter to make system obtain better control effect. Due to be high in real time demand for system control, undoubtedly it is a better method to adopt parameter auto-tuning based on fuzzy control on line. Fig.3 shows the structure of control system. The design thought is that firstly it finds the fuzzy relationship among PID control parameter and system deviation e and deviation change rate ec, and then according to the principle of incremental parameter adjustment it makes the modification for three parameters of PID controller[2-4]. Its auto-tuning organization can seen as three fuzzy controllers with double input and single output, the inputs of fuzzy system are system deviation e and its change rate ec, and the output variable is respectively ΔKP,ΔKPand ΔKD.
Fig.3 Fuzzy control system structure
The quantization factor such asKe,KcandKuhas great influence for dynamic and steady performance of fuzzy control system[5]. After determining the domain of deviation, deviation change rate and output variable as well as the domain of deviation change amount and other fuzzy variable, the quantization factor of deviation, deviation change rate and output variable is also determined. It takes respectively seven fuzzy subsets for input variablee(k),ec(k) and output variable ΔKP、ΔKIand ΔKD, and it respectively is NB,NM,NS,ZE,PS,PM and PB. All the membership functions of input fuzzy variable and output variable adopt the symmetrical triangle function[6-7]. From the above, aiming atKP,KIandKDit can obtain the fuzzy control rule table tuned respectively. Here it only takes ΔKPas an example (ΔKI,ΔKDis similar with ΔKP), and the fuzzy control rule table of ΔKPis shown as in Tab.1.
There are fourteen nine pieces of fuzzy control rules in the total number of rule. The selected membership function is a symmetrical triangle function, and therefore the deviationEand deviation change rateECcan respectively belong to two neighboring fuzzy subsets of confidence nonzero. For the rule, if e isEandecisECthen ΔKPisU, but it only uses four pieces of started using fuzzy control rule at most, namely:
Ri,j:IfeisEiandecisECjThen ΔKPisUi,j
Ri+1, j:IfeisEi+1,jandecisECjThen ΔKPisUi+1,j
Ri, j+1:IfeisEiandecisECj+1Then ΔKPisUi,j+1
Ri+1, j+1:IfeisEi+1andecisECj+1Then ΔKPisUi+1,j+1
And for any learning node (e,ec, ΔKP、ΔKI, ΔKD), it always contains the related fuzzy information of the above four pieces of rule.
Tab.1 Fuzzy control rule for Δ K P
By means of Mamdani inference method, the value of ΔKPcan be determined by the barycentre of fuzzy output. In like manner, it can obtain the output amount of ΔKIand ΔKD. The value obtained through fuzzy inference and defuzzification is multiplied by a corresponding scaling factor, and it can obtain an incremental adjustment value of PID parameter. And after adjusting formula (1), formula (2) and formula (3), it can find the control parameter.
KP=ΔKP+KP0
(1)
KI=ΔKI+KI0
(2)
KD=ΔKD+KD0
(3)
In which,KP0,KI0,KD0is respectively the initial value of controller parameter, and it can be gotten by conventional method.
In the design of self-learning node, it adopts fuzzy control algorithm based on self-learning[8-10], and Δyrepresents modification amount of controller. Assume the incremental model of controlled object is shown as in formula (4) .
Δy(k) = M[Δeu(k-τ-1)]
(4)
In which, Δy(k) is the output increment, Δeu(k) is the control amount increment, andτis the number of beats of pure lag. From the incremental model, it can compute the modification Δeu(k-τ-1) of control amount. Because the value of control amount and measure for each step is stored into the storage, so Δeu(k-τ-1) can be take out from the storage. The control amount should be modified aseu(k-τ-1)+Δeu(k-τ-1), and it would be transformed into fuzzy amountAu. Again it takes out the measure values beforeτ+1 step, and transforms them into the corresponding fuzzy amountA1,A2,…,Ak, and therefrom a piece of new rule is constituted. If it has already the same rule as the first component then it should be replaced by new rule, else the new rule should be written into the rule base. Repeating the self-learning process, the control rule would be gradually perfected until there is any rule to be needed by modification or addition. In the process of control parameter tuning in real time, considering that there is a large lag in the central air-conditioning system, if it assumes the number of beat lag to be as τ, then the characteristic of system response contained the result of control action beforeτ+1 beat. Therefore it is suitable for adopting current measure value e and ec of the sample. For evaluating the control effect, it adopts the learning algorithm of award and punishment in variable domain on line to make the modification for second component of control rule beforeτ+1 beat, and it can improve the characteristic of large lag response of system. The flowchart of algorithm is shown as in Fig.4. The factor of award and punishment is set as 1 at starting of the first time in the self-learning node.
Fig.4 flowchart of algorithm of award and punishment with self-learning
1) Variable domain
In order to overcome that when the status gets into the smaller domain range it is easy to produce the sustained oscillation if is still to adopt the original domain, it adopts the variable domain in the design of self-learning node. After control for a period of time, it finds out the maximum and minimum of deviation e for this period of time to be as the domain at the present stage so as to ensure the range of control rule to vary with working status. When the input variable gets smaller the control system adjusts the domain in real time, and it can avoid to the oscillation produced. But the output domain is still to adopt the antecedently basic domain, and it can adjust the control output according to the factor of award and punishment.
2) Evaluation function
From the response characteristic in Fig.2, it can be seen that it has the change trend toward to decrease the deviation in segment ofOA,BCandDE, and the feature is the following,e(k) > 0 &ec(k) > 0 forOA,e(k) < 0 &ec(k) < 0 for BC,e(k) > 0 &ec(k) > 0 forDE. It has the change trend toward to increase the deviation in segment ofAB,CDandEF, and the feature is the following,e(k) < 0 &ec(k) > 0 forAB,e(k) > 0 &ec(k) < 0 forCD,e(k) < 0 &ec(k) > 0 forEFTherefore it can summarizes that whene(k)·ec(k) > 0 holds the system has the trend toward to decrease the deviation, and whene(k)·ec(k) < 0 holds the system has the trend toward to increase the deviation. According the features mentioned above, the evaluation function can be expressed as formula (5).
c(k) =e(k)·ec(k)
(5)
Whenc(k) > 0, it should be rewarded for corresponding control rule, and contrary it should be punished.
3) Function of award and punishment
On the basis of that the deviation obtained on line should be approached to zero, the function of award and punishment can be expressed as formula (6).
(6)
4) Flowchart of learning algorithm
The basic steps of flowchart based on self-learning algorithm of award and punishment for variable domain are the following.
① To start self-learning node.
② To fetche(k)、ec(k) ande(k-1-τ) from Database.
③ To fetch the control outputu(k) of fuzzy controller from Database, it is respectively ΔKP, ΔKIand ΔKD, the order number ofu(k) andu(k-1-τ) is respectively num(k) and num(k-1-τ).
④ To fetch the factorω[num(k-1-τ)] of award and punishment of corresponding rule from Database according to num(k-1-τ).
⑦ Computec(k) =e(k)·ec(k), ifc(k) = 0 then go to ⑧, ifc(k) < 0 then go to ⑨, ifc(k) >0 then go to ⑩.
⑧ Assume function of award and punishmentf(k)=1, go to (11).
The parameters and transfer function is shown as in Tab.2. After e and ec is inputted into the fuzzy controller, through fuzzy inference, the control output of ΔKP,ΔKPand ΔKDcan be obtained.
The ideal output of temperature control is 23℃, steady deviation ≤ 0.5℃, maximum overshootMp≤ 4℃, rise timetr≤ 50 s, settling timets≤ 400 s, and the initial parameter is respectivelyKP0= 0.18,KI0= 0.001 58 andKDO=1. Under the condition without external interference, it can be controlled within range ±0.5℃, and basicallyMp,trandtssatisfies the demand, but the value of steady deviation is larger. Under the same condition, it has very good performance in aspects such asMp,trandts, and it has obvious superiority in steady deviation of system. When the air-conditioning room model changes fromG1(S) = 10e-23s/(60S+1) toG1(S)=13-23s/(60S+ 1) and the other parameters do not change, it getstr=570 s, and it does not satisfy the engineering demand. Under the same condition, it getsMp≤ 4℃,tr=84 s,ts= 172 s for fuzzy controller, and it accords with engineering demand. When the air-conditioning room model changes fromG1(S) = 10e-23s/(60S+1) toG1(S) = 10e-26/(50S+1) the PID control appears oscillation, and it still can not be stable within 2 000 s, but for fuzzy PID control it getsts=202, andMpandtrcan satisfy the engineering demand. The interference of outdoor air can be simulated by a inertial nodeG(S) = 1/(S+1), under the action of interference added suddenly the conventional PID control can appear divergent oscillation, and it can not satisfy the engineering demand. But for fuzzy PID controller, under the same interference condition it can appear a certain amplitude overshoot, but the overshoot amount only isMp=1.2, and after appearing the interference it can automatically be convergence within time 230 s to steady value, and therefore it satisfies the engineering demand.
Tab.2 Condition of system simulation experiment
From the above simulation experiment, it can be seen that the fuzzy controller with parameter auto-tuning is closer to the actual load demand, compared with conventional PID controller it is better in control performance, stronger in robustness, higher in control precision, faster in response time, and shorter in setting time.
The parameter auto-tuning system of fuzzy PID controller absorbs the advantages of PID controller such as being higher in control precision of conventional PID controller, and being faster in response speed for fuzzy controller and so on. All the actual tests show that the system design is rather successful.
From the above simulation comparison, it can be seen that adopting conventional PID controller is able to appear oscillation and so on, and it can not satisfy the strict demand of environment temperature in production technology of cigarette factory. The fuzzy PID controller of parameter auto-tuning based on self-learning has better adaptability, and it owns obvious advantage in robustness and steady control precision of system. Compared with conventional PID controller, it can better satisfy the working status demand of high precision control.
[1] Astron K J,Hagglund.Automatic tuning of simple regulation[C]//Proceedings of 9thIFAC World Congress.Budapest:[s.n.],1984:1867-1872.
[2] Potts A S,Freitas B T,Amaro J C.Fuzzy auto-tuning for a PID controller[C]//Industry Applications (INDUSCON),2010,9th IEEE/IAS International Conference on.[S.l.] :IEEE,2010:1-5.
[3] ZOU Zhiyun,HAN Dawei,GUI Xinjun,et al.Fuzzy auto-tuning PID control of a small electric-heating reactor[C]//Intelligent Control and Information Processing (ICICIP),2011 2nd International Conference on.[S.l.] :IEEE,2011:1045-1050.
[4] LIU Yanchang,ZHANG Jiasheng,LIU Yang,et al.Research and application of fuzzy PID controllers[C]//Fuzzy Systems and Knowledge Discovery (FSKD),2010 Seventh International Conference on.[S.l.] :IEEE,2010:283-287.4
[5] QIANG Bi.Advanced controller auto-tuning and its application in HVAC System[J].Control Engineering Practice,2000 (8):633-644.
[6] Lee C C.Fuzzy logic in control systems[J].Fuzzy logic controller systems:fuzzy logic controller-part1.IEEE Trans on SMC,1990(2):404-435.
[7] Sugeno M.An introductory survey of fuzzy control[J].Information Science,1985 (36):59-83.
[8] LI Shiyong.Fuzzy Control Neural Control and Intelligent Cybernetics[M].Harbin:Harbin Industry University Press,2003.
[9] PinYan Tsai,HuangChu Huang,YuJu Chen,et al.The model reference control by auto-tuning PID-like fuzzy controller[C]//Control Applications,2004.Proceedings of the 2004 IEEE International Conference on.[S.l.] :IEEE,2004:406-411.
[10] ChiaJu Wu,TsongLi Lee,YuYi Fu,et al.Auto-Tuning Fuzzy PID Control of a Pendubot System[C]//Mechatronics,ICM2007,4th IEEE International Conference on.[S.l.] :IEEE,2007:1-6.
基于参数自整定的模糊PID控制器及其应用
黄 伟1*,巫 茜2
1.重庆工业职业技术学院 自动化系,重庆 401120;2.重庆理工大学 计算机科学与工程学院,重庆 400054
针对一次性整定得到的PID控制参数难以保证系统控制效果始终处于优化状态的问题,探讨了一种基于参数自整定的模糊PID控制器。该控制器将模糊控制与经典PID控制技术相结合,借助对控制器参数的在线模糊自整定,在系统性能发生改变并超出了一定范围后,自动启动PID控制参数的整定过程,实时地修改PID的控制参数。重新整定的PID控制参数可以使系统始终保持在优化状态,取得良好的控制效果。以烟厂生产工艺对环境温度的中央空调控制为例进行研究。实际系统仿真测试数据说明,基于参数自整定的模糊PID控制器提高了系统的控制精度与稳定性。研究表明该控制器可满足实际系统的强鲁棒性与高精度控制的工况需求。
参数自整定;模糊控制;自学习;模糊PID控制器
TP273
2012-10-19
*HUANG Wei, Associate Professor.E-mail: huangwei051001@126.com
10.3969/j.issn.1001-3881.2013.06.016