imm05.pdf

Upload: aji-brahma-nugroho

Post on 03-Apr-2018

217 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/28/2019 IMM05.pdf

    1/6

    Model Predictive Control of a Nonlinear

    System with Known Scheduling Variable

    Mahmood Mirzaei Niels Kjlstad Poulsen

    Hans Henrik Niemann

    Department of Informatics and Mathematical Modeling, TechnicalUniversity of Denmark, Denmark, (e-mail: [email protected],

    [email protected]). Department of Electrical Engineering, Technical University of

    Denmark, Denmark, (e-mail: [email protected])

    Abstract: Model predictive control (MPC) of a class of nonlinear systems is considered inthis paper. We will use Linear Parameter Varying (LPV) model of the nonlinear system.By taking the advantage of having future values of the scheduling variable, we will simplify

    state prediction. Consequently the control problem of the nonlinear system is simplified into aquadratic programming. Wind turbine is chosen as the case study and we choose wind speed asthe scheduling variable. Wind speed is measurable ahead of the turbine, therefore the schedulingvariable is known for the entire prediction horizon.

    Keywords: Model predictive control, linear parameter varying, nonlinear systems, windturbines, LIDAR measurements.

    1. INTRODUCTION

    Model predictive control (MPC) has been an active areaof research and has been successfully applied on differentapplications in the last decades (Qin and Badgwell (1996)).

    The reason for its success is its straightforward ability tohandle constraints. Moreover it can employ feedforwardmeasurements in its formulation and can easily be ex-tended to MIMO systems. However the main drawback ofMPC was its on-line computational complexity which keptits application to systems with relatively slow dynamics fora while. Fortunately with the rapid progress of fast compu-tations, better optimization algorithms, off-line computa-tions using multi-parametric programming (Baotic (2005))and dedicated algorithms and hardware, its applicationshave been extended to even very fast dynamical systemssuch as DC-DC converters (Geyer (2005)). Basically MPCuses a model of the plant to predict its future behavior inorder to compute appropriate control signals to control

    outputs/states of the plant. To do so, at each sampletime MPC uses the current measurement of outputs/statesand solves an optimization problem. The result of theoptimization problem is a sequence of control inputs ofwhich only the first element is applied to the plant andthe procedure is repeated at the next sample time withnew measurements (Maciejowski (2002)). This approach iscalled receding horizon control. Therefore basic elementsof MPC are: a model of the plant to predict its future, acost function which reflects control objectives, constraintson inputs and states/outputs, an optimization algorithmand the receding horizon principle. Depending on thetype of the model, the control problem is called linear

    MPC, hybrid MPC, nonlinear MPC etc. Nonlinear MPC This work is supported by the CASED Project funded by grantDSF-09- 063197 of the Danish Council for Strategic Research.

    is normally computationally very expensive and generallythere is no guarantee that the solution of the optimizationproblem is a global optimum. In this work we extendthe idea of linear MPC using linear parameter varying(LPV) systems to formulate a tractable predictive control

    of nonlinear systems. To do so, we use future values ofa disturbance to the system that acts as a schedulingvariable in the model. However there are some assumptionsthat restrict our solution to a specific class of problems.The scheduling variable is assumed to be known for theentire prediction horizon. And the operating point of thesystem mainly depends on the scheduling variable.

    2. PROPOSED METHOD

    Generally the nonlinear dynamics of a plant could bemodeled as the following difference equation:

    xk+1 = f(xk, uk, dk) (1)

    With xk, uk and dk as states, inputs and disturbancesrespectively. Using the nonlinear model, the nonlinearMPC problem could be formulated as:

    minu

    (xN) +N1i=0

    (xk+i|k, uk+i|k) (2)

    Subject to xk+1 = f(xk, uk, dk) (3)

    uk+i|k U (4)

    xk+i|k X (5)

    Where denotes some arbitrary norm and U and Xshow the set of acceptable inputs and states. As it wasmentioned because of the nonlinear model, this problemis computationally too expensive. One way to avoid this

    problem is to linearize around an equilibrium point of thesystem and use linearized model instead of the nonlinearmodel. However for some plants assumption of linear

    Proceedings of the 17th Nordic Process Control Workshop

    Technical University of Denmark, Kgs Lyngby, Denmark

    January 25-27, 2012

    163

  • 7/28/2019 IMM05.pdf

    2/6

    model does not hold for long prediction horizons as theplant operating point changes, for example based on somedisturbances that act as a scheduling variable. An examplecould be a wind turbine for which wind speed acts as ascheduling variable and changes the operating point of thesystem.

    2.1 Linear MPC formulation

    The problem of linear MPC could be formulated as:

    minu0,u1,...,uN1

    xNQf +

    N1i=0

    xk+i|kQ + uk+i|kR (6)

    Subject to xk+1 = Axk + Buk (7)

    uk+i|k U (8)

    xk+i|k X (9)

    Assuming that we use norms 1, 2 and the optimizationproblem becomes convex providing that the sets U and Xare convex. Convexity of the optimization problem makesit tractable and guarantees that the solution is the globaloptimum. The problem above is based on a single linearmodel of the plant around one operating point. Howeverbelow we formulate our problem using linear parametervarying systems (LPV) in which the scheduling variable isknown for the entire prediction horizon.

    2.2 Linear Parameter Varying systems

    Linear Parameter Varying (LPV) systems are a classof linear systems whose parameters change based on ascheduling variable. Study of LPV systems was motivatedby their use in gain-scheduling control of nonlinear systems(Apkarian et al. (1995)). LPV systems are able to handlechanges in the dynamics of the system by parametervarying matrices.

    Definition (LPV systems) let k Z denote discretetime. We define the following LPV systems:

    xk+1 = A(k)xk + B(k)uk (10)

    A(k) =

    nj=1

    Ajk,j B(k) =

    nj=1

    Bjk,j (11)

    Which A(k) and B(k) are functions of the schedulingvariable k. The variables xk Rnx , uk Rnu , and k Rn are the state, the control input and the scheduling

    variable respectively.

    2.3 Problem formulation

    Using the above definition, the linear parameter varying(LPV) model of the nonlinear system with disturbances isof the following form:

    xk+1 = A(k)xk + B(k)uk + Bd(k)dk (12)

    This model is formulated based on deviations from theoperating point. However we need the model to be formu-lated in absolute values of inputs, states and disturbances.Because in our problem the steady state point changes

    as a function of the scheduling variable and we need tointroduce a variable to capture its bahavior. In order torewrite the state space model in the absolute form we use:

    xk = xk xk (13)

    uk = uk uk (14)

    dk = dk dk (15)

    xk, uk and d

    k are values of states, inputs and disturbances

    at the operating point. Therefore the LPV model becomes:

    xk+1 = A(k)(xk xk) + B(k)(uk u

    k)

    + Bd(k)(dk dk) + x

    k+1

    (16)

    Which could be written as:

    xk+1 = A(k)xk + B(k)uk + Bd(k)dk + k (17)

    with

    k = xk+1 A(k)x

    k B(k)u

    k Bd(k)d

    k (18)

    Now having the LPV model of the system we proceed tocompute state predictions. In linear MPC predicted statesat step n is:

    xk+n = Anxk +

    n1

    i=0AiBuk+(n1)i

    for n = 1, 2, . . . , N

    (19)

    However in our method the predicted state is also a func-

    tion of scheduling variable n = (k+1, k+2, . . . k+n)T

    for n = 1, 2, . . . , N 1 and we assume that the schedulingvariable is known for the entire prediction. Therefore thepredicted state could be written as:

    xk+1(k) = A(k)xk + B(k)uk + Bd(k)dk + k (20)

    And for n Z, n 1:

    xk+n+1(n) =0

    i=n

    A(k+i)xk

    +n1j=0

    1i=nj

    A(k+i)

    B(k+j)uk+j

    +

    n1j=0

    1

    i=nj

    A(k+i)

    Bd(k+j)dk+j

    +n1j=0

    0

    i=nj

    A(k+i)

    k+(n1)j

    +B(k+n)uk+n + Bd(k+n)dk+n + k+n

    (21)

    Using the above formulas we write down the stackedpredicted states which becomes:

    X = ()xk +Hu()U +Hd()D + () (22)with

    X = (xk+1 xk+2 . . . xk+N)T

    (23)

    U = (uk uk+1 . . . uk+N1)T

    (24)

    D = (dk dk+1 . . . dk+N1)T

    (25)

    = (k k+1 . . . k+N1)T

    (26)

    = (k k+1 . . . k+N1)T

    (27)

    In order to summarize formulas for matrices , ,Hu andHd, we define a new function as:

    (m, n) =

    n

    i=m A(

    k+i) (28)

    Therefore the matrices become:

    Proceedings of the 17th Nordic Process Control Workshop

    Technical University of Denmark, Kgs Lyngby, Denmark

    January 25-27, 2012

    164

  • 7/28/2019 IMM05.pdf

    3/6

    () =

    (1, 1)(2, 1)(3, 1)

    ...(N, 1)

    () =

    I 0 0 . . . 0

    (1, 1) I 0 . . . 0(2, 1) (2, 2) I . . . 0...

    ......

    . . ....

    (N 1, 1) (N 1, 2) (N 1, 3) . . . I

    Hu() =

    B(k) 0 . . . 0(1, 1)B(k) B(k+1) . . . 0(2, 1)B(k) (2, 2)B(k+1) . . . 0

    .

    .....

    . . ....

    (N 1, 1)B(k) (N 1, 2)B(k+1) . . . B(N1)

    Hd() =

    Bd(k) 0 . . . 0(1, 1)Bd(k) Bd(k+1) . . . 0(2, 1)Bd(k) (2, 2)Bd(k+1) . . . 0

    ......

    . . ....

    (N 1, 1)Bd(k) (N 1, 2)Bd(k+1) . . . Bd(N1)

    After computing the state predictions as functions of

    control inputs (22), we can write down the optimizationproblem similar to a linear MPC problem as a quadraticprogram:

    minU

    XTQX+ UTRU

    Subject to: U U

    X X

    (29)

    3. CASE STUDY

    The case study here is a wind turbine. Wind turbinecontrol is a challenging problem as the dynamics of thesystem changes based on wind speed which has a stochasticnature. The method that we propose here is to use windspeed as a scheduling variable. With the advances inLIDAR technology (Harris et al. (2006)) it is possible tomeasure wind speed ahead of the turbine and this enablesus to have the scheduling variable of the plant for the entireprediction horizon.

    3.1 Modeling

    Nonlinear model For modeling purposes, the whole windturbine can be divided into 4 subsystems: Aerodynam-ics subsystem, mechanical subsystem, electrical subsys-tem and actuator subsystem. The aerodynamic subsys-tem converts wind forces into mechanical torque andthrust on the rotor. The mechanical subsystem consistsof drivetrain, tower and blades. Drivetrain transfers rotortorque to electrical generator. Tower holds the nacelle andwithstands the thrust force. And blades transform windforces into toque and thrust. The generator subsystemconverts mechanical energy to electrical energy and finallythe blade-pitch and generator-torque actuator subsystemsare part of the control system. To model the whole windturbine, models of these subsystems are obtained and at

    the end they are connected together. A wind model isobtained and augmented with the wind turbine model tobe used for wind speed estimation. Figure 1 shows the

    basic subsystems and their interactions. The dominantdynamics of the wind turbine come from its flexible struc-ture. Several degrees of freedom could be considered tomodel the flexible structure, but for control design mostlyjust a few important degrees of freedom are considered. Infigure 2 basic degrees of freedom which are normally beingconsidered in the design model are shown. However in thiswork we only consider two degrees of freedom, namelythe rotational degree of freedom (DOF) and drivetraintorsion. Nonlinearity of the wind turbines mostly comesfrom its aerodynamics. Blade element momentum (BEM)theory (Hansen (2008)) is used to numerically calculateaerodynamic torque and thrust on the wind turbine. Thistheory explains how torque and thrust are related to windspeed, blade pitch angle and rotational speed of the ro-tor. In steady state, i.e. disregarding dynamic inflow, thefollowing formulas can be used to calculate aerodynamictorque and thrust.

    Qr =1

    2

    1

    rR2v3eCp(,,ve) (30)

    Qt =1

    2R2v2eCt(,,ve) (31)

    In which Qr and Qt are aerodynamic torque and thrust, is the air density, r is the rotor rotational speed, ve is theeffective wind speed, Cp is the power coefficient and Ct isthe thrust force coefficient. The absolute angular positionof the rotor and generator are of no interest to us, thereforewe use = r g instead which is the drivetrain torsion.Having aerodynamic torque and modeling drivetrain witha simple mass-spring-damper, the whole system equationwith 2 degrees of freedom becomes:

    Jrr = Qr c(r g

    Ng) k (32)

    (NgJg)g = c(r gNg

    ) + k NgQg (33)

    = r gNg

    (34)

    Pe = Qgg (35)

    In which Jr and Jg are rotor and generator moments ofinertia, is the drivetrain torsion, c and k are the driv-etrain damping and stiffness factors respectively lumpedin the low speed side of the shaft and Pe is the generatedelectrical power. For numerical values of these parametersand other parameters given in this paper, we refer to(Jonkman et al. (2009)).

    Wind

    AerodynamicsPitch Servo Tower

    Drivetrain

    GeneratorGen. Servo

    vfw

    veFT

    vt

    Q Pout

    Qr r

    g Qg

    in

    Qin

    Fig. 1. Wind turbine subsystems

    Proceedings of the 17th Nordic Process Control Workshop

    Technical University of Denmark, Kgs Lyngby, Denmark

    January 25-27, 2012

    165

  • 7/28/2019 IMM05.pdf

    4/6

    Fig. 2. Basic degrees of freedom

    Linearized model As it was mentioned in the previous

    section, wind turbines are nonlinear systems. A basicapproach to design controllers for nonlinear systems is tolinearize them around some operating points. For a windturbine, the operating points on the quasi-steady Cp andCt curves are nonlinear functions of rotational speed r,blade pitch and wind speed v. To get a linear model ofthe system we need to linearize around these operatingpoints. Rotational speed and blade pitch are measurablewith enough accuracy, however this is not the case for theeffect of wind on the rotor. Wind speed changes along theblades and with azimuth angle (angular position) of therotor. This is because of wind shear and tower shadow andstochastic spatial distribution of the wind field. Thereforea single wind speed does not exist to be used and measured

    for finding the operating point. We bypass this problem bydefining a fictitious variable called effective wind speed (ve)which shows the effect of wind in the rotor disc on the windturbine. In our two DOFs model only the aerodynamictorque (Qr) and electric power (Pe) are nonlinear. Taylorexpansion is used to linearize them.

    Qr( , , ve) =Qra

    +Qrb1

    +Qrveb2

    ve (36)

    Pe =Peg

    Qg0g +

    PeQg

    g0Qg (37)

    For the sake of simplicity in notations we use Qr, Pe,, and ve instead of Qr, Pe, , and vearound the operating points from now on. Using thelinearized aerodynamic torque, the 2 DOFs linearizedmodel becomes:

    r =a c

    Jrr +

    c

    Jrg

    k

    Jr + b1 + b2ve (38)

    g =c

    NgJgr

    c

    N2g Jgg +

    k

    NgJg

    QgJg

    (39)

    = r gNg

    (40)

    Pe = Qg0g + g0Qg (41)

    A more detailed description of the model and linearizationis given in (Mirzaei et al. (2011)).

    LPV model Collecting all the discussed models, matricesof the state space model become:

    A() =

    a() c

    Jr

    c

    Jr

    k

    Jrc

    NgJg

    c

    N2g Jg

    k

    NgJg

    1 1 0

    C =

    1 0 00 1 00 Qg0 0

    (42)

    B() =

    b1() 0

    0 1

    Jg0 0

    D =

    0 00 00 g0

    (43)

    In which x = (r g )T

    , u = ( Qg)T

    and y =

    (r g Pe)T

    are states, inputs and outputs respectively.In the matrix B, parameter b1 is uncertain. Therefore theuncertain linear state space model becomes:

    x = A()x + B()uy = Cx + Du

    3.2 Control objectives

    The most basic control objective of a wind turbine is tomaximize captured power during the life time of the windturbine. This means trying to maximize captured powerwhen wind speed is below its rated value. This is alsocalled maximum power point tracking (MPPT). Howeverwhen wind speed is above rated, control objective becomesregulation of the outputs around their rated values whiletrying to minimize dynamic loads on the structure. Theseobjectives should be achieved against fluctuations in windspeed which acts as a disturbance to the system. In thiswork we have considered operation of the wind turbine inabove rated (full load region). Therefore we try to regulaterotational speed and generated power around their ratedvalues and remove the effect of wind speed fluctuations.

    3.3 Offset free control

    Persistent disturbances and modeling error can cause anoffset between measured outputs and desired outputs.To avoid this problem we have employed an offset free

    reference tracking approach (see Muske and Badgwell(2002) and Pannocchia and Rawlings (2003)). Our RMPCsolves the regulation problem around the operating point.However we regulate around the operating point (xk anduk) which results in offset from desired outputs. To avoidthis problem in our control algorithm we shift origin in ourregulation problem to x0k and u

    0k instead. In order to find

    new origins, we have augmented linear model of the plantwith a disturbance model that adds fictitious disturbancesto the system. The fictitious disturbances compensate thedifference between measured outputs and desired outputs.State space model of the augmented system is:

    xk+1 = Axk + Buk (44)

    yk = Cxk + Duk (45)

    in which the augmented state and matrices are:

    Proceedings of the 17th Nordic Process Control Workshop

    Technical University of Denmark, Kgs Lyngby, Denmark

    January 25-27, 2012

    166

  • 7/28/2019 IMM05.pdf

    5/6

    Table 1. Performance comparison between gainscheduling approach and linear MPC

    Parameters Proposed approach Linear MPC

    SD of r (RPM) 0.111 0.212SD of Pe (Watts) 4.686 104 8.048 104

    Mean value of Pe (Watts) 4.998 106 4.998 106

    SD of pitch (degrees) 2.67 2.95SD of shaft moment (N.M.) 256 293

    xk =

    xk+1dk+1

    pk+1

    A =

    A Bd 00 Ad 00 0 Ap

    (46)

    B = (B 0 0)T

    C = (C 0 Cp) (47)

    xk, dk and pk are system states, input/state and outputdisturbances respectively. (A,B,C,D) are matrices of thelinearized model, Bd and Cp show effect of disturbanceson states and outputs respectively. Ad and Ap showdynamics of input/state and output disturbances. Formore information and how to choose these matrices we

    refer to (Muske and Badgwell (2002)) and (Pannocchiaand Rawlings (2003)). Since the disturbances are notmeasurable, an extended Kalman filter is designed toestimate them. The estimated disturbances are used toremove any offset between desired outputs and measuredoutputs. Based on this model and estimated disturbances,x0k and u

    0k which are offset free steady state input and

    states can be calculated:A I B

    C D

    x0ku0k

    =

    BddkCppk

    (48)

    After calculating these values, we simply replace xk anduk in (18) with x

    0k and u

    0k which results in:

    k = x

    0

    k+1 A(k)x

    0

    k B(k)u

    0

    k Bd(k)d

    k (49)

    4. SIMULATIONS

    In this section simulation results for the obtained con-troller are presented. The controller is implemented inMATLAB and is tested on a full complexity FAST(Jonkman and Jr. (2005)) model of the reference windturbine (Jonkman et al. (2009)). Simulations are done withrealistic turbulent wind speed, with Kaimal model (iec(2005)) as the turbulence model and TurbSim (Jonkman(2009)) is used to generate wind profile. In order to stay inthe full load region, a realization of turbulent wind speed isused from category C of the turbulence categories of the

    IEC 61400-1 (iec (2005)) with 18m/s as the mean windspeed.

    4.1 Stochastic simulations

    In this section simulation results for a stochastic windspeed is presented. Control inputs which are pitch refer-ence in and generator reaction torque reference Qin alongwith system outputs which are rotor rotational speed rand electrical power Pe are plotted in figures 3-6 (red-dashed lines are results of linear MPC and solid blue linesshow the results of the proposed approach.) Simulationresults show good regulations of generated power and

    rotational speed. Table 1 shows a comparison of the resultsbetween the proposed approach and MPC approach basedon linearization at each sample point (Henriksen (2007)).

    As it could be seen from the table and figures, the pro-posed approach gives better regulation on rotational speedand generated power (smaller standard deviations) whilemaintaining a smaller shaft moment and pitch activity.

    time(seconds)

    0 200 40010

    15

    20

    25

    Fig. 3. Blade-pitch reference (degrees, red-dashed lineis linear MPC and solid blue line is the proposedapproach)

    time (seconds)

    0 200 40039

    40

    41

    42

    Fig. 4. Generator-torque reference (kNM, red-dashed lineis linear MPC and solid blue line is the proposedapproach)

    REFERENCES(2005). IEC 61400-1 wind turbines-part 1: Design require-

    ments..Apkarian, P., Gahinet, P., and Becker, G. (1995). Self-

    scheduled h control of linear parameter-varying sys-tems: a design example. Automatica, 31(9), 12511261.

    Baotic, M. (2005). Optimal Control of Piecewise AffineSystems a Multi-parametric Approach. Ph.D. thesis.

    Geyer, T. (2005). Low Complexity Model Predictive Con-trol in Power Electronics and Power Systems. Ph.D.thesis.

    Hansen, M.O.L. (2008). Aerodynamics of Wind Turbines.Earthscan.

    Harris, M., Hand, M., and Wright, A. (2006). LIDAR forturbine control. Technical report, National RenewableEnergy Laboratory, Golden, CO.

    Proceedings of the 17th Nordic Process Control Workshop

    Technical University of Denmark, Kgs Lyngby, Denmark

    January 25-27, 2012

    167

  • 7/28/2019 IMM05.pdf

    6/6

    time(seconds)

    0 200 40011

    12

    13

    Fig. 5. Rotor rotational speed (r, rpm, red-dashed lineis linear MPC and solid blue line is the proposedapproach)

    time(seconds)

    0 200 4004.5

    5

    5.5

    Fig. 6. Electrical power (mega watts, red-dashed lineis linear MPC and solid blue line is the proposedapproach)

    Henriksen, L.C. (2007). Model Predictive Control of aWind Turbine. Masters thesis, Technical Universityof Denmark, Informatics and Mathematical Modelling,Lyngby, Denmark.

    Jonkman, B. (2009). Turbsim users guide: Version 1.50.Technical report, National Renewable Energy Labora-tory, 1617 Cole Boulevard, Golden, Colorado 80401-3393303-275-3000.

    Jonkman, J., Butterfield, S., Musial, W., and Scott, G.(2009). Definition of a 5MW reference wind turbine foroffshore system development. Technical report, NationalRenewable Energy Laboratory, Golden, CO.

    Jonkman, J.M. and Jr., M.L.B. (2005). Fast users guide.Technical Report NREL/EL-500-38230, National Re-newable Energy Laboratory, Golden, CO.

    Maciejowski, J. (2002). Predictive control with constraints.Pearson Education Lim., Essex.

    Mirzaei, M., Niemann, H.H., and Poulsen, N.K. (2011). A-synthesis approach to robust control of a wind turbine.In the 50th IEEE Conference on Decision and Controland European Control Conference. Orlando, FL, USA.

    Muske, K.R. and Badgwell, T.A. (2002). Disturbancemodeling for offset-free linear model predictive control.Journal of Process Control, 12(5), 617632.

    Pannocchia, G. and Rawlings, J.B. (2003). Disturbancemodels for offset-free model-predictive control. AIChEJournal, 49(2), 426437.

    Qin, S.J. and Badgwell, T.A. (1996). An overview ofindustrial model predictive control technology. .

    Proceedings of the 17th Nordic Process Control Workshop

    Technical University of Denmark, Kgs Lyngby, Denmark

    January 25-27, 2012

    168