Top Banner

of 6

mpc wirh nonlinear state space models

Apr 08, 2018

Download

Documents

stefaniesmith
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • 8/7/2019 mpc wirh nonlinear state space models

    1/6

    Model Predictive Control with NonlinearSt ate Space Models

    Martin Rau and Dierk SchroderTechnical University Munich

    Institute for Electrical Drive SystemsArcisstrafie 21 , D-80333 Munchen, Germany.

    [email protected]

    A bs t rac t : T h i s paper presen t s a m ode l pred i ct i ve con-trol sche me based on nonl inea r s tate space models . Th econsidered class of sys tem s is supposed to be separa-ble into a l inear part and a nonl inear feedback path.T here fore , t he overa l l d i sc re t e -t im e dynam ic sy s t em i snon l inear . M os t of the exis t ing model predictive controla lgor i t hm s for non l inear s y s t em s requ i re t he so lu t i onof a non-convex nonl ine ar opt imizat io n problem wi thinthe interval of one sam ple t im e s t ep . T h i s s eem s to bepractical impossible in sys t em s w i th f a s t sam ple ra t e sas t he y occur in electrical drive systems.

    I n order t o f ac i l it a t e t he pred i c t ive con tro l a lgor i t hmfo r real- time appl icat ions , the nonl inea r feedback pat his l inearized along a reference trajecto y w i thin the pre-d i c t i on hor i zon . T h i s r e su l ts in a l inear t ime-variantm ode l , w here t he , non l in ear i t y i s m apped to t he t im evariance of t he m ode l . T he t ra j ec tory f o r l i near iza t i oncan ei ther be the reference trajectory in t he pred i c ti onhorizon or mu st be generated based o n other avai lablei n f o r m a t i o n of t he s y s t em . T he pred i c ti on j steps aheadand the control law in analogy to generalized predict ivecontrol can be calculated analytically in absence of con-s t ra int s . H ow ever , t he s y s t em s non linear i t y i s t akeninto account by the l inearizat ion along a trajectory atevery integrat ion and predict ion s tep. Th e inclus ionof constraints in t he op t im i za t ion prob lem resu l ts in aquadra ti c program fo r w h ich e f f i ci en t so lu t i on m e thodsexis t . Thi s leads to a computat iona l ly more pract icalpred i c ti ve con t ro l concep t f o r non l inear s y s t em s ap-pl icable to fas t processes eve n in presence of constraints .

    1 IntroductionModel predictive control is a widely used control con-cept for over 15 years especially in the process indus-try [I , 2, 3 , 41. Applications in the field of electricaldrives are quite rare [6]. Th e core of a model predic-tive controller is a process model. Any process model,capable of predicting future output signals based on fu-ture i nput signals and initial values, can be used. Withthis process model, the future dynamic behavior of thereal plant is predicted within a prediction horizon N z .These predicted output signals are used to minimize

    Past Future/ eference value w

    ........L................... ...... . . ...... ..1 .,/4-----1eference trajectory r

    k k+N, k+N2 t l T ,prediction horizon

    Fig.1: Principle of model based predictive control.

    an open loop performance criterion (e.g. the sum ofsquared control errors within the prediction horizon)and to calculate the input signals u ( k ) within a con-trol horizon Nu. utside the control horizon, the inputsignal u ( k ) emains constant. The calculated input sig-nals are fed into the plant until a new measurementgets available. This procedure is repeated with a newprediction and control horizon and is called receedinghorizon control. The receeding horizon strategy makesa closed loop control law from the originally open loopminimization. Th e minimization step can easily includeconstraints, such that input, output or state constraintscan be taken into account already in the controller de-sign. The principle of model based predictive control(MPC) is depicted in fig. 1. The most famous rep-resentative MP C is the generalized predictive controller(GPC) of [I, 1, which is based on a linear, discrete-time

    0-7803-7479-7/02/$17.00 02002 IEEE 136 AMC 2002 - Maribor, Slovenia

    mailto:[email protected]:[email protected]
  • 8/7/2019 mpc wirh nonlinear state space models

    2/6

    transfer function model. A state-space representationof GPC can be found in [8]. Both can be used for lin-ear , time-invariant processes only. One main advantageis the analytical solution of the minimization problemin absence of constraints. In case of constraints, GPCresults in a quadratic program, for wich very efficientand fast numerical algorithms exist.

    For high precision applications, nonlinear processmodels have to be used for prediction [5]. Generally,this results in a non-convex nonlinear program, whichis difficult to solve due to th e following reasons: The'computational expense for a nonlinear program is muchhigher than that of a quadratic program. This restrictsthe applicat ion of nonlinear process models to relativelyslow processes. A second drawback is th e fact, th at non-convex nonlinear programs have several local minima.Therefore, methods for obtaining the global minimumhave to be applied (which increases the computationalexpense even more).

    This paper introduces a model predictive controlconcept, which combines the advantages of both, linearan nonlinear process models for prediction. Th e processmodel is assumed to be separable into a linear dynamicpart with a nonlinear feedback path. This type of pro-cess model is called system with isolated nonlinearity.As in all predictive control concepts, the reference tra-jectory is known within the prediction horizon. Thenonlinear feedback path is linearized along this trajec-tory. The resulting system is linear, but time-variantand is used as a prediction model. It s accuracy is bet terthan that of a linearized model around one single pointof operation, because the nonlinearity is taken into ac-count along th e whole trajectory. The computationalexpense of the linear time-variant model is almost thesame as for a linear time-invariant model. Without con-sidering constraints, the minimization problem can besolved analytically and no numerical optimization algo-rithms need to be applied. When including constraints,the resulting optimization problem is a quadratic pro-gram and can be solved with the same efficient algo-rithms as GPC. In this paper, the higher accuracy ofa nonlinear process model is combined with the abilityto apply quadratic programming techniques for onlineoptimization.

    2 Process ModelThroughout this paper, we will consider single-inputsignal-output (SISO) systems. An extension t o systemswith multiple in- or outputs is possible without an in-crease of complexity. Th e SISO system under consid-eration is described by a nonlinear discrete time statespace model of degree N with an isolated nonlinearityNL.

    ~ ( k1) = A . ~ ( k )b .A u ( ~ ) k . M ( y ( k ) ) (1)y(k) = cT .~ ( k )d . Au (k )

    Fig.2: Signal flow chart of th e considered system.

    A signal flow char t representa tion of the model is shownin fig. 2. The system matrices A, b, c , d and k areconstant and of appropri ate dimensions. T he vector kdescribes the coupling of the nonlinearity into the sys-tem. Au denotes the increment of the input signal be-tween two sampling instant s. Any state-space systemwith an input signal U (instead of Au) can be trans-formed to equation (1) by adding the additional statevariable u ( k - 1). The differende operator A is definedas A = 1- - l (z-' being the one-step backward shiftoperator). The system matrices have to be known, thestate variables are assumed to be measurable and thenonlinearity JV?Lmay be unknown. If th e nonlinearityand the state variables are not available, a combinedobserver and identificator for this class of system canbe applied [lo]. For all further calculations, we assumethat the nonlinearity is known and the observed andreal stat es are identical. I n order to take advantage ofa simplified calculation of the control law, the systemmodel in equation (1) s linearized along the known ref-erence trajectory r ( k ) of the output signal y(k). Thereference trajectory is the desired output signal of thesystem; it has to be known within t he prediction hori-zon from time st ep k to k +N2, where Nz is the upperprediction horizon. Th e linear ization of the isolatednonlinearity along the reference t rajectory T (k) gives

    = NL(r(k))- . (c' .x(k)dy y = r ( k )This approximation results in a simplified linear, buttime variant model of the system in equation (1).Thismethod differs from an ordinary linearization arounda fixed operation point by the fact, that the refer-ence trajectory (which must be known in any predictivecontroller) is the basis for linearization, and thereforethe approximation takes into account the nonlinearitywithin the prediction horizon. The resulting linear timevariant model is

    ~ ( k1)= A(k) .~ ( k )b(k) .A u ( ~ )k . ( k )(3 )

    137

  • 8/7/2019 mpc wirh nonlinear state space models

    3/6

    withA(k) = A + k c T .-b(k) = b + k . d .- (4 )( 5 )v(k) = U ( r ( k ) ) r(lc) *- ( 6 )The out put equation of (1) is not changed by the lin-earization. When driving the system along the refer-

    ence trajectory, the nonlinearity has the same effect asa time variant disturbance signal v(k). This implies,th at the controller to develop is able to drive the systemnear the reference trajectory and does not allow largedeviations. The prediction of future system states andoutput signals is performed with the model in equa-tion (3 ) , where the values of A(k), b(k) and v(k) areall known within the prediction horizon; they dependonly on the reference trajecto ry r ( k ) .3 Predictive Control LawIn th is section, we derive the predictive control laws forthe unconstrained and constrained case. The perfor-mance index of the predictive controller is a weightedsum of squared control errors and control moves [ l] . tis chosen to

    J = ( r ( k + j ) c ( k + j ) ) ? + A . C ( A ~ ( k + j ) ) ~(7)

    N z NT.

    j=N1 j= O

    Variables marked by are predicted values. In equa-tion (7), k is the current time step. The upper predic-tion horizon N2 should be chosen such, that the dom-inating time responses lie within this horizon. Withthe lower horizon NI, it is possible to allow control er-rors at the beginning of the horizon and to penalizethem between NI and Nz only. The control horizon Nuindicates the number of allowed control moves withinthe horizon. After Nu control moves, the system inputAu is zero (U is constant). This is a common measureto reduce the computational expense, although only asuboptimal solution is found [ l ,81. The weighting fac-tor X adjusts the relation between the weighting of thecontrol errors and the control moves. The higher X ischosen, the slower will be the resulting controller.

    In order to minimize the cost function ( 7 ) , futuresystem outputs are required. They are not availablebut can be predicted based on the system model inequation (3 ) . A j-step ahead predictor is derived bycontinuing equation (3 ) :ij(k + 1) = cT . (A(k ) . ( k ) b(k ) .Au(k)

    +G ( k + 3 ) =+++

    +++

    A(k + l)kv(k)+kw(k + 1))+ dAu(k + 2)A(k + 2)A(k+ l)b(k)Au(k)A(k + 2)b(k+ l)Au(k+ 1)b(k + 2)Au(k+ 2)A(k + 2)A(k + l)kv(k)A(k + 2)kw(k+ 1)+ kv(k + 2))dAu(k+ 3)

    cT (A(k+ 2)A(k+ l)A(k)x(k) (10)

    This scheme can be continued to the upper predictionhorizon Nz, i.e. y (k + N2). In order to facilitate no-tation, it is convenient to define the following vectorscontaining future signals.

    Y = [ Y(k+Nl) Y(k+N2) ] (11)AU = [ Au(k) . . . Au(k+Nu) ] (12)v = [ ~ ( k ) .. v(k+N2 -1) ] (13)r = [ r ( k + N l ) ... r (k+ Nz) ] (14)

    where v and r are known in advance, since they only de-pend on the reference trajectory. The predicted outputsignals are now expressed in matrix-vector form:

    y = F *x(k)+M A U+G .v (15)The matrices F, H and G are derived from equa-tions (8) to (10). They are formed according to thefollowing r des:

    F =

    cT fi A ( k + n )cT fi A ( k + n )n=N1-ln=N1

    cT f i A ( k + n )n=Nz-l~ N ~ - I , N ~ - I ~ N ~ - I , N ~ - N ,

    h ~ ~ - i , ~ ~ - i~ N ~ - I , N ~ - N ,H = [ i

    The elements of H are:[ cT [ i i t l A ( k + n ) b ( k + i -j ) : j > o: j = O1cTb(k+ i - ). . -2,J -: = -1: j < -1

    (18)The matrix G contains the effects of the nonlinearityand is defined by:(8)+ k . ( k ) )dAu(k + 1)

    G(k + 2) = cT (A(k+ l)A(k)x(k) (9) G =+ A(k + l)b(k)Au(k)+b(k + l)Au(k+ 1)QN1-1,Ni-1 QNi -1,NI- z

    QNz-1,NZ-1 Q N z- N z- z

    13 8

  • 8/7/2019 mpc wirh nonlinear state space models

    4/6

    Note, that the dimensions of H and G are different,since the control horizon N u has only effect on H. Theelements of G are:

    0 : j < oWith the order N of the system in equation (3) , thematrices have the following dimensions:

    (21)(22)

    F E ~ N 2 - N i + l x N H E R N Z - N I + ~ X N .G E w N ~ - N I + ~ x N ~

    The cost function of equation (7) is now rewritten inmatrix-vector notation and the minimization problemis stated. Using the notation of equations (15) to (19),the cost function is

    J = (r - F X ( ~ )- HA^ - G V ) ~ r - X ( ~ )- H A u - G v ) +XAuTAu (23)

    The solution of minimizing equation (23) gives thevector of control actions Au. The first element of A Uis used as input signal for the real process, all other el-ements are not used for control, but can serve as initialvalues for the next optimization run. The minimizationof (23) and the calculation of the necessary matricesis repeated at every integration step. The minimiza-tion procedure itself depends on whether constraintsare considered or not.3.1 Unconstrained Minimiza t ionIn absence of constraints, the minimum of J can becalculated analytically. By se tting the gradient of J tozero

    -- - 0J ( A u )aAuand solving the resulting linear equation, the optimalsolution for A u is

    A u = (HTH+ XI ) - ' HT (r - Fx(k)- Gv ) (2 5 )It can easily be shown, that the matrix HTH+XI

    (which is the quadratic term of (23)) is symmetric andpositive definite for any positive A, which implies, th atthe inverse always exists and that the optimum is aunique minimum. The first element of A U is used as theinput signal for the process. The following steps haveto be repeated at every integration step: Calculation ofthe matrices F, H and G , minimization by evaluatingequation (25) and extracting the first element of Au.The computational burden compared to linear time-invariant systems is only increased by the recalculationof the matrices F to G due to the time-variance of theprediction model.

    The controller parameters N I ,N z , Nu and X have tobe adjusted according to the dominant time constants

    of the process and th e desired speed of the closed loopdynamics. Stability is not guaranteed for every choiceof these parameters 1111; for stability for any choice ofthe controller parameters, the infinite horizon predic-tive control concept [12] may be adopted.

    3.2 Constrained Minimiza t ionWhen considering constraints on the control signalsAu(k) , u(k) nd the states x(k), he cost function (23)remains the same. This paper only deals with con-straints of the input signal U and A u , but state con-strai nts can be taken in to account in a similar way. In-put constraints are divided in two types of inequalities:one for constraints on control increments A u and onefor the resulting input signal U. Th e control incrementsmay not exceed a certain minimal and maximal valueas defined by equation (26).

    AuminI u(k + ) 5 Auma2 V j =z 0 . . N u (26)Equation (26) has to be valid for all time steps insidethe control horizon. The bounds on A u can be com-bined in t he following linear inequalities with NaU= I:

    . .N A U . A U I (27)- N A U . A U I (28)

    (29)The vectors g x , and gk,, are defined as

    TgZu = [A%" * * e A%7"]ghu = [ - A u m i n . . .- Au,inIT (30)

    In every practical application, the input signal U isalso limited due to actuator satur ation. This type ofconstraint is given by

    u,in 5 ~ ( k ) 5 U V j 0 . . .Nu (31)Since the free variable of the cost function (23) is A u ,equation (31) has to be transformed into a linear in-equality in Au. The input signal u( k + ) can be ex-pressed as

    ju(k+ ) = u( k - 1) + Au(k + ) (32)

    i=Owhere the value u ( k - 1) is known at time step IC . Theinequalities of equation (31) can be rewritten in theoptimization variable A u .

    j Au(k + ) 5 Umaz - ~ ( k1) (33)i=Oj- Au(k + ) 5 -u,in - ~ ( k1) (34)

    i= OEquations (33) and (34) have to be fulfilled in the con-trol horizon for j = 0 . . .Nu and are again transformedinto a linear system of inequalities.

    N U . A u 5 g (35)- N , . A u I t (36)

    139

  • 8/7/2019 mpc wirh nonlinear state space models

    5/6

    with the following definitions:r 1 o . . . o 1

    (37)1 ; ; ::: O ]g," = [%"-u(k - 1 ) . u,,,-u(~ - )IT (38)g,I = [-u,,,+u(k - 1 ) . .- U,h+U(k - ) ]TInequalities (27), (28), (35) and (36) can be com-

    bined into one inequality constra int , such tha t the fol-lowing quadratic program has to be solved:

    minJ with N . AU < g (39)AUN and g contain all Ni-matrices, respectively all gi -vectors. Th e quadratic program in equation (39) hasto be solved a every integration step with efficient nu-merical algorithms [13, 141.

    By linearizing the isolated nonlinearity along the ref-erence trajectory, it was possible to use a accurate, lin-ear time-variant prediction model and t o reduce the re-sulting optimization problem in presence of constraintsto a qua drati c program. This fact makes the proposedpredictive control method a useful tool for real-timecontrol of fast processes, where nonlinear programmingtechniques are no t possible.

    4 Example: Two-Mass SystemTh e following shor t example, shows some simulation re-sult s for a typical mechatronic drive system. A rotatingtwo mass system with nonlinear friction characteristicis investigated. Note, th at the emphasis is not on asophisticated friction model, but on the predictive con-trol concept itself. Results for a standard PI-controllerand the proposed predictive control concept withoutconstraints are presented to show the improved per-formance. Th e system is described by the followingcontinuous time state space equation:

    d c d_ _ -- -k = [ 1"' 0"' "'1 ] . x + [ 81 U. (40)

    d c _ _Jz J z J2Y -b

    0. 6 . 4 .arctan(10 z g )-y = [ o 0 1 I . x-

    =

    The system parameters are: J1 = 0.166 [kgm2],J z = 0.33 [kgm2], c = 400 ["/rad] and d =0.011 [Nms/rad]. The corresponding discrete time

    control result

    -1 . . . . . . : . './ . . , . . . . .. : . ? ' , L . ..0 1 2 3 4

    time [SIFig.3: Control result with a standard PI-controller

    control result1.5 1 - reference 1

    I I0 1 2 3 4

    time [SIFig.4: Control result with the model predictive con-troller.

    model in the form of equation (1) is achieved by dis-cretization with the zero-order-hold method. The non-linear ity is a simple model for a stick-slip friction char-acteristic. Its dimension is such, that the effect on theoutput signal y is significant. The reference trajectoryis a sine wave; this may be a periodic positioning proce-dure. Fig. 3 shows the reference signal and the out putsignal, when the system is controlled by a standar d PI-controller. T he negative effect of the friction torque isespecially visible when the output crosses zero (stick-slip).

    When the same system is controlled by the pro-posed model predictive control scheme without respect-ing constraints, the nonlinearity is taken into accountin the controller and therefore, the effect of the nonlin-earity is reduced significantly. Fig. 4 shows the refer-ence trajectory and the output signal,, fig. 5 shows thecorresponding unconstrained input torque. The outputsignal is very close to the reference trajectory and theaccuracy is improved by magnitudes.Now we suppose, that the input torque is limitedto f 1 0 [Nm]. This constraint is taken into account ateach integration step by solving a quadratic program.Fig. 6 shows the reference trajectory and the outputsignal, fig. 7 shows the corresponding constrained inputtorque. The outp ut signal is still very close to t he refer-ence traj ectory and th e control signal fulfills the desiredconstraint. Oth er constraints for stat e variables and/or

    140

  • 8/7/2019 mpc wirh nonlinear state space models

    6/6

    input signal U input signal UI

    0 1 2 3 4time [SIFig.5: Input signal generated by the model predictivecontroller.

    control result

    ~ ~~0 1 2 3 4time [SIFig.6: Control result with the constrained model pre-dictive controller.

    the o utput signal, e.g. overshoot constraints, could beintroduced to improve th e dynamic behavior.

    5 ConclusionThe proposed nonlinear model predictive control con-cept is able to take into account an isolated nonlinearityby linearizing along the reference trajectory in the pre-diction horizon. This is more accurate than a lineariza-tion only at each integration step. The main propertyof linear model predictive control, the quadratic opti-mization problem, is preserved. This is a great com-putational advantage when including constraints in theoptimization procedure. The motivation for this con-trol concept is the fact, th at t he isolated nonlinearity istaken into account in the controller and the optimiza-tion problem remains easy to solve (analytically or bya quadratic program). The proposed method is prac-tically relevant due to the reduced computation com-pared to nonlinear model predictive controllers.

    References[l ] Clarke, D.W., Mohtadi, C., Tuffs, P. S. : GeneralizedPredictive Control - Part I. The Basic Algorithm. Au-tomatica, Vol 23, No. 2, pp. 137-148, 1987.

    0 1 2 3 4time [SIFig.7: Input signal generated by th e constrained modelpredictive controller.

    [2] Clarke, D. W., Mohtadi, C., Tuffs, P. S. : GeneralizedPredictive Control - Part II. Extensions and Interpre-tations. Automatica, Vol 23, No. 2, pp. 149-160, 1987.[3] Garcia, C. E., Prett, D. ., Morari, M.: Model Pre-dictive Control: Theory and Practice - a Survey. Au-

    tomatica, Vol 25, No. 3, pp. 335-348, 1989.[4] Camacho, E. F., Bordons, C.: Model Predictive Con-trol. Springer Verlag, London Berlin New York, 1999.[5] Mayne, D. Q., Michalska, H.: Receding Horizon Con-trol of Nonlinear Systems. IEEE Trans. on AutomaticControl, Vol. 35, No. 7, pp. 814-824, 1990.[6] Kuntze, H., Jacubasch, A., Richalet, J.: On the Ap-plication of a New Method for Fast and Robust Posi-tion Control of Industrial Robots. IEEE Int. Conf. onRobotics and Automation, Philadelphia, 1988.[7] Chen, H . , Allgower,F.: A Quasi-Infinite Horizon Non-linear Model Predictive Control Scheme with Guamn-teed Stability. Automatica, Vol 34, No. 10, pp. 1205-1217, 1998.[8] Kraus, P., Da8, K . , Rake, H.: Model Based PredictiveController with Kal man filtering for State Estimation.In Advances in Model Based Predictive Control. OxfordUniversity Press, pp. 69-83, 1994.[9] Gracia, C. E.: Quadratic Dynamic Matrix Control ofNonlinear Processes. A n Application to a Batc h Reac-tio n Process. AIChE, Annual Meeting, San Francisco,1984.

    [ lo] Schroder, D.: Intelligent Observer and Control Designfo r Nonlinear Systems. Springer Verlag, Berlin Heidel-berg New York, 2000.

    [ll] Bitmead, R. R., Gevers, M., Wertz, V.: Adaptive O p-timal Control - The Thinking Mans GPC. PrenticeHall, New York, 1990.[12] Rawlings, J. B., Muske, K. R.: The Stability of con-

    strained receding horizon control. IEEE Trans. on Au-tomatic Control, AC-38 (lo) , pp. 1512-1516, 1993.[13] Coleman, T. F., Li, Y.: A Reflective NewtonMethod fo r Minimizing a Quadratic Function Subjectto Bounds o n some of the Variables. SIAM Journal onOptimization, Vol. 6, Number 4, pp. 1040-1058, 1996.[14] The Mathworks: Optim izatio n Toolbox - Users Guide.The Mathworks, 2000.

    141