rd-tr-r00035-007.pdf

6
Performance Improvement of Smith Predictor through Automatic Computation of Dead Time 25 PERFORMANCE IMPROVEMENT OF SMITH PREDICTOR THROUGH AUTOMATIC COMPUTATION OF DEAD TIME VERONESI Massimiliano *1 It is known that the classical tuning formula for typical Proportional- Integral-Derivative (PID) controllers in general provides unsatisfactory results for industrial plants where the time delay exceeds the dominant lag time. For this reason, alternative strategies have been studied in order to cope with this problem and, in this context, the most popular scheme is the Smith Predictor. In this paper the theory behind this algorithm is explained and its implementation through YS170 controller language and CENTUM CS3000 Control Drawing Builder are presented in order to verify their effectiveness in industrial environments. This approach requires a good model of the process under control. In fact, the performance of the Smith Predictor can decrease dramatically (become unstable) due to modelling errors, especially for the dead time which, contrary to what would be expected, can vary considerably depending on the working conditions (i.e. the fluid flow). In this paper a simple adaptive law for the automatic tuning of the model time delay is suggested. When this method is applied, the performance of the Smith Predictor is easily improved due to the automatically tuned model dead time and the control algorithm is capable of meeting variable working conditions. *1 Yokogawa Italia, Industrial Automation Department INTRODUCTION I n process control it is not uncommon for systems to be affected by dead times, due to material transfer times. This is evident typically in pipelines. A fluid of density ρ and flow rate w in a section of pipe A the length of d takes the amount of time τ=ρAd/w to cover the whole distance (see Figure 1). This means the controller (human or digital) can only be aware in retrospect of the effect of actions taken, and decisions must therefore be based on previous situations, typically resulting in troublesomely long oscillations around the steady state value. In this case, however, we can take some countermeasures which are not so complicated and do not stray far from the traditional and popular PID control architectures. Switching to mathematical relationships, a first order SISO (Single Input Single Output) process affected by dead time can be described by a differential equation such as ( ) ) ( ); ( ) ( τ = t u t x f t x ˙ (1) where x(t) is the measured variable at time t, u(t) is the manipulated variable and τ is the dead time. Considering the simpler and more popular linear case, (1) can Figure 1 Time Delay Due to the Fluid Transfer Time in a Pipeline d FIC = Ad/w τ ρ Manuscript received March 3, 2003 Final manuscript received April 23, 2003 Technical Report

Upload: akokhaledi

Post on 19-Aug-2015

213 views

Category:

Documents


0 download

DESCRIPTION

rd-tr-r00035-007.pdf

TRANSCRIPT

Performance Improvement of Smith Predictor through Automatic Computation of Dead Time 25PERFORMANCE I MPROVEMENT OFSMI TH PREDI CTOR THROUGHAUTOMATI C COMPUTATI ON OFDEAD TI MEVERONESI Massimiliano *1ItisknownthattheclassicaltuningformulafortypicalProportional-Integral-Derivative (PID) controllers in general provides unsatisfactory results forindustrialplantswherethetimedelayexceedsthedominantlagtime.Forthisreason, alternative strategies have been studied in order to cope with this problemand, in this context, the most popular scheme is the Smith Predictor. In this paperthe theory behind this algorithm is explained and its implementation through YS170controller language and CENTUM CS3000 Control Drawing Builder are presentedinordertoverifytheireffectivenessinindustrialenvironments.Thisapproachrequires a good model of the process under control. In fact, the performance of theSmithPredictorcandecreasedramatically(becomeunstable)duetomodellingerrors, especially for the dead time which, contrary to what would be expected, canvary considerably depending on the working conditions (i.e. the fluid flow). In thispaperasimpleadaptivelawfortheautomatictuningofthemodeltimedelayissuggested. When this method is applied, the performance of the Smith Predictor iseasilyimprovedduetotheautomaticallytunedmodeldeadtimeandthecontrolalgorithm is capable of meeting variable working conditions.*1 Yokogawa Italia, Industrial Automation DepartmentINTRODUCTIONIn process control it is not uncommon for systems to be affectedby dead times, due to material transfer times. This is evidenttypically in pipelines. A fluid of density and flow rate w in asectionofpipeAthelengthofdtakestheamountoftime=Ad/w to cover the whole distance (see Figure 1).Thismeansthecontroller(humanordigital)canonlybeaware in retrospect of the effect of actions taken, and decisionsmust therefore be based on previous situations, typically resultingin troublesomely long oscillations around the steady state value.In this case, however, we can take some countermeasures whicharenotsocomplicatedanddonotstrayfarfromthetraditionaland popular PID control architectures.Switchingtomathematicalrelationships,afirstorderSISO(Single Input Single Output) process affected by dead time can bedescribed by a differential equation such as( ) ) ( ); ( ) ( = t u t x f t x (1)wherex(t)isthemeasuredvariableattimet,u(t)isthemanipulated variable and is the dead time.Considering the simpler and more popular linear case, (1) canFigure 1Time Delay Due to the Fluid Transfer Time in aPipelinedFIC= Ad/w Manuscript received March 3, 2003Final manuscript received April 23, 2003Technical Report26 Yokogawa Technical Report English Edition, No. 35 (2003)be re-written as) ( ) ( ) ( + = t u b t x a t x (2)which,byLaplacetransformation,correspondstotheusualalgebraic relationship in the complex variable s) (1s usTex(s)s+=, where = -b/aandT = -1/a (3)Such an equation is used to describe all those processes withdynamic behaviour that are dominated by a one time constant Tand a time delay (FOPDT: First Order Plus Time Delay).Referring to the simple PID formula+ + =dtdeT edtTe K udip1(4)where u is a manipulated variable, and e is an error (given by thedifference between a setpoint value and a measured variable), thetransfer function of the PID is:+ + =dip PIDsTsTK s R11 ) ((5)From the previous equations it is clear that the control actionis computed as the sum of three terms and that, through the tuningof Kp, Ti and Td it is possible to give different weights to them inordertoachievethedesiredperformanceforaclosedloopsystem. Proportional action has exactly the same trend in error;the integral action (proportional to the sum of the past errors) isusedtoresetthesteadystateerror;andthederivativeaction(proportional to the error tendencies) can ultimately anticipate thefuture error behaviour during the transient. This last effect of thederivativeaction,however,cannotbeusefuliftheprocessisaffectedbydeadtime.Itsaction,infact,isbasedontheevaluation of something that has already started to happen. In thiscase, the process variable starts to change after seconds and sothe derivative of the error remains zero throughout the duration ofthe dead time. In other words the measured value does not containadequate information to foresee the future.The usual PID controllers are suitable for controlling stableprocess in which the /T ratio is small. In fact, if it is large, tuningthe PID parameters would be difficult, and lengthy trial-and-erroractivitiescouldcauseheavyloadsfortheplants,possiblyexposing them to danger. Moreover, disregarding this heavy load,the final results would not be adequately satisfactory.THE SMITH PREDICTORAsimplealgorithmforcontrolprocessesaffectedbydeadtime is the one proposed by Ha gglund (named Predictor-PI)(2) andbasedontheideaofdecreasingthemanipulatedvariablebyanamountequaltoallthatwascomputedinthelastseconds.However the more popular scheme for control processes affectedby time delay was proposed by O. J. M. Smith(6) and is shown inFigure 2.Let P(s)=G(s)e-s be the transfer function of the process andlets indicate the setpoint with y and a generic load disturbancewith d.This algorithm requires a minimal knowledge of the processto describe it through a transfer function (model)msm me , s G s P = ) ( ) ((6)where mmmsTs G+=1) ( isarationalfunctionofthecomplexvariables,whichshouldapproximatetheprocesswithoutdelay. The parameters of the model can be achieved by popularidentification experiences such as the one based on the open loopsystem response to a step change of the control variable.AsshowninFigure2,thefeedbackisclosednotontheprocess value y, but on the z variable, which has the same valuethat y had m seconds earlier; and therefore it is in some ways aprediction of the measure; that is why this control architectureis called Smith Predictor.So, the resulting controller transfer function is) 1 ( ) ( ) ( 1) () (msm PIDPIDe s G s Rs Rs R +=(7)The poles of the model are zeros of R(s) and so, if the model isFigure 2Equivalent Schemes for the Smith PredictoryG(s)e sModelPm (s)ifP(s)=Pm(s)duRPID(s)G(s)_yGm(s)(1e )y_yu_R(s)RPID(s)ymydP(s)esmGm(s)P(s)=G(s)esprocessducontrollerRPID(s) yz_smPerformance Improvement of Smith Predictor through Automatic Computation of Dead Time 27agoodapproximationoftherealprocess,thecontrollercanperform a zero/pole cancellation independently by the values ofthe PID parameters.Infact,beingD(s)theLaplacetransformationoftheloaddisturbance, the following transfer functions can be computed as) ( ) 1 ( ) ( ) ( 1) ( ) () () (s P R e s G s Rs P s Rs Ys YPIDsm PIDPIDm+ +=(8)) ( ) 1 ( ) ( ) ( 1) () () (s P R e s G s Rs Ps Ds YPIDsm PIDm+ +=(9)and so, if m=, sm PIDPIDes G s Rs G s Rs Ys Y+= ) ( ) ( 1) ( ) () () ((10) sm PIDes G s Rs Gs Ds Y+=) ( ) ( 1) () () ((11)Therefore, from a theoretical point of view, and with a goodmodel (Gm(s)=G(s)), the PID controller can be tuned as it wouldbe for a process without a time delay; thereby making it easy toachieve its best performance.Thanks to digital technologies, it is not so difficult to realise aSmith Predictor algorithm. Modern controllers have a rich libraryof parameters and function blocks with which it is easy to build atransferfunction;amongthemthereare,forinstance,theonescorresponding to+ sT 1 and e-s operators.In Figures 3 and 4, two examples of the Smith Predictor areshown. In the first one, the low level YS170 language was used,whileinthesecondonethealgorithmisperformedbythefunction blocks available in the CENTUM CS1000/3000 controldrawingbuilder.TheDLAY-Cblockperformsthetransferfunction ) 1 (1+msmmesT,anditsoutputisaddedtotheerrorinternally at the PID block (through the parameter VN). For thisreason the Compensation Gain (CK) of the PID block has to be setto-1.Themeaningsoftheothervariablesareexplainedinthefigures themselves. In both cases the PID algorithm is performedby a single action (BSC for the YS170 and PID for CENTUM), asdictated by the programming language.Specifically, in the PID block the INPUT COMPENSATIONoption has to be selected in the Function Block Detail Builder /Control Calculation Tab. Then the dead time is computed as theproductoftheparameterSMPL(availablebyDLAY-Ctuningwindow) and the number of sample points which has to be set byengineers in the Function Block Detail Builder / Basic Tab.Itmustbeemphasizedthatincasetheprocesshasanintegrator (that is s=0 is a pole for the transfer function G(s)), theSmithPredictorisnotabletoaccommodatealoaddisturbanceD(s) on the process input. In fact, it can be proved that in a steadystate the ratio between the process value and the load disturbanceis proportional to the model gain and time delay. This means thatthe integral of the load disturbance will not be compensated; or inother words, that the controller is not able to reset the steady stateerror.Figure 4Smith Predictor Designed with the Control Drawing Builder of CS1000/3000 Yokogawa DCSFigure 3Smith Predictor Realised through the YS170 Programming LanguageLD X1 ; measured valueLD Y1; ; control variableLD P01 ; TmLAG ; ST T01 ; LD P02 ; mDED-LD T01+ST PV ; BSC1 ; PID algorithmST Y1T01 = (1/1 + sTm)Y1PV=X1 + (1-esP02)T01DTCDLAY-CCONTRPIDOUT OUTINVNIN MV%%INPUT%%OUTPUT28 Yokogawa Technical Report English Edition, No. 35 (2003)Themosteffectiveschemeforloaddisturbancecompensation is the one proposed by Matausek, Micic(3). The ideaistoeliminateadditionalfeedbackbysubtractingfromthemanipulatedvariableanamountproportionaltothedifferencebetweentheprocessvariableanditsestimation,asprovidedbythemodel.Thatdifference,infact,isbyconstructionthebestapproximation of the load disturbance that we have after the deadtime.AUTOMATIC DETERMINATION OF THE DEADTIME VALUETheperformanceoftheSmithPredictordramaticallydecreases (become unstable) due to modelling errors, especiallyfor the dead time (m). This is very dangerous because it can varywidely depending on the working conditions (i.e. the fluid flow).Letsconsider,forinstance,asimpleFOPDTprocesswithT=1 sec. and =10T. A step change in the setpoint is applied andthen,when=100sec,aloaddisturbancewillbesimulated.InFigure5thetrendsachievedwith50%delayestimationmistakes are illustrated. The performances (achieved by re-tuningproportionalgainandintegraltime)areworsethanthatoftheideal situation in which =m. In fact, in case of under-estimation,the PID algorithm will anticipate the action generating oscillationaround the steady state value. However, on the other hand, in caseofsuper-estimation,thePIDwillbelateandtheapproachtosetpoint will therefore be slow and hesitating.Ifitisnotpossibletomeasuretheflowandtherebydynamically adapt the delay time value m in the algorithm, a filteron the modelling error (y-ym) could be a countermeasure, but itsrobustnessisadrawbacktothespeed,especiallyforloaddisturbance rejection. Therefore it can be useful to find a way toautonomouslyadjustmto.Forsuchanachievement,thefollowing adaptive law can be proposed:( )mmy y Kdtd = (K is a constant) (12)that is, starting from mo,( ) + =tmom md y y K t0) ( ) ( ) ( (13)Itisnotdifficulttounderstandthereasoningbehindthisformula.In fact, if mo y1,the model response is faster than the process one, hence ym-y > 0for the most part of the time. Therefore, m being proportional tothat difference, it will grow from the initial value mo to . On theother hand, if mo> , the model response will be slower than theprocess one and so ym-y < 0 for an extensive period. Thus, due totheproposedadaptivelaw,mwilldecrease.Ultimately,whenym=y,thederivativeofmwillbecomestable.Analogconsideration holds in the case of y2 < y1.If Gm(s)=G(s) , by indicating with y the process variable notaffected by delay, it holds that) ( ) () ( ) (om mt y t yt y t y = =(14)Looking at Figure 6, if mo> , it can be seen that( ) = = = ttt ttom momomd t yd y d yd y y d y y) ( ) ( ) ( ) ( ) ( )) ( ) ( (0 00t0(15)Then,consideringasimpleFOPDTprocess,theopenloopresponse without dead time is+ =Tte t y 1 ) ( (16)Figure 5Ideal Trend Compared to the One Achievable with 50% Delay Estimation MistakeFigure 6Graphical Representation of Equation (15)0 20 40 60 80 100 120 140 160 180 20000.10.20.30.40.50.60.70.80.911.11.21.31.41.51.6t [sec.]yDelayunder-estimationDelaysuper-estimationDelaycorrectestimationy ymttyyttmtmPerformance Improvement of Smith Predictor through Automatic Computation of Dead Time 29Therefore( )( ) + = + = + + = TtT TomTtTtomTtTtomtte e e TTe Tee T e T d yomomomom ) ( (17)This is the proof that the proposed adaptation law( )TtT Tomomtmom me e e Td y y tom + = = 0) ( ) (1) ((18)bringsmtofortfasterthemoretheyaredifferentatthebeginning.ThealgorithmworkseveniftheloopisclosedandthefeedbackallowstheuseofacoefficientK 1/inordertoaccelerateitsconvergence.InthiswaytheloopcanbeleftinAutomaticModeandthealgorithmwillautonomouslyidentifythe value of through a few simple setpoint changes.SomecountermeasureshavetobeconsideredbecausethesignofKmustagreewiththatofthesetpointchange,andtheadaptive law has to be disabled when the process variable joinsthesteadystate.Infact,afterthat,aloaddisturbancewouldbemisunderstoodasachangeofthemanipulatedvariableandsowould provide a change in m. In order to avoid these behaviours,thefollowingformula(suggestedin[Veronesi,Visioli,- 2000])(8)(9) can be used:+= ) (1) ( s YsTssign K sign(19)Inthismanner,thetimedelayisquicklyidentifiedandtherefore the proposed algorithm can improve the robustness oftheSmithPredictorincontrolprocessesaffectedbylongtimedelays.TheeffectivenessofthemethodisshowninFigure7,where some setpoint step changes are applied. It is easy to see thattheperformanceisdramaticallybetterthantheoneachievablewithout model delay adaptation and that a higher value of K canspeed up the computation of m.Theproposedtechniqueisalsorobustenoughtoaccommodate some modelling errors, such as a wrong evaluationoftheprocessdominantlagtime(atleastthesupposedcorrectestimation of process gain). In Figure 8 comparative simulationresultsareshown(referringtothecaseinwhichmo=2andK=10; analog results can be achieved if mo=/2).If the dominant lag time of the model is greater than that of0 200 400 600 800 1000891011121314151617180 200 400 600 800 100045678910estimated dead timeestimated dead timey110 200 400 600 800 1000-0.200.20.40.60.811.2(a): m = /2, K =1(b): m = 3/2, K =10t [sec.]t [sec.] t [sec.]solid linedashed liney0 200 400 600 800 1000-0.4-0.200.20.40.60.811.21.4t [sec.]solid linedashed lineFigure 7Comparison Between a Smith Predictor with Model Delay Automatic Determination (solid line)and a Simple Smith Predictor (dashed line)30 Yokogawa Technical Report English Edition, No. 35 (2003)theprocess(Tm>T),thetransportdeadtimewillbeunder-estimated (solid line, on the right side of Figure 8). This meansthatmwillconvergetoavaluelowerthanthereal.Onthecontrary,ifTm