• Ingen resultater fundet

Unconstrained MPC for State-Space Models

In document Industrial Model Predictive Control (Sider 46-54)

In this section, the basic setup of the unconstrained MPC, based on the state-space model (5.1)-(5.4) is treated.

First the MPC objective function is defined. This can be done in different ways depending on the purpose of controlling the process. A common requirement in the industrial process industry, is to have the controlled output of the process track a reference specified by the control operator. This is described by the tracking error, which is the difference between the predicted controlled output ˆ

yk+1+j|k and the referencerk+1+j|k. Furthermore, in order not to use excessive control action a regularization term is also commonly added to the objective function. This is also the objective considered in this thesis.

Many processes are MIMO systems which means that the predicted measure-ment and control input usually are vectors, and therefore some norm is used to quantify the tracking error and the control action. Using the squared norm indicates that positive and negative deviation from the reference are equally un-desirable and furthermore by weighting the norm, the individual elements can be treated differently. The objective function is defined as

φ= 1

where the weighted norm is defined by

kxk2Q=xTQx (5.6)

The objective function expresses the sum of the weighted squared norm of differ-ence between the measurement prediction yˆk+1+j|k and the corresponding set-pointrk+1+j|kand the weighted squared norm of the rate movement∆uk+j|kfor j= 0,1, . . . , N−1. The objective function is subjected to the model dynamics described by (5.1)-(5.4).

The MPC problem can be expressed as

min

where N is the prediction horizon andQy, Su are weight matrices associated with the reference tracking and the input rate movement, respectively. These matrices are user-specified and can be regarded as tuning parameters for the MPC. How these weight matrices should be chosen is not obvious and different choices lead to different closed-loop performances. The tuning of the MPC will be considered in Chapter7.

The structure of the weight matrices is of importance. From a theoretical point of view, the MPC objective function constitutes a weighted least-squares prob-lem. This can give some indications on how the structure of the weight matrices should be chosen. In this thesis the weight matrices are assumed to be positive definite diagonal matrices.

In general the sum of the two terms in the objective function could be different.

In this case the length of the reference tracking is referred to as the prediction horizon and the one on the control as the control horizon. In this thesis, this case is not considered and the two horizons are equal.

The MPC regulation problem can be transformed into a convex Quadratic Pro-gram (QP) by performing state elimination in (5.8)-(5.11). The states can be

expressed as

by successive substitution in (5.8) and (5.10). Under the assumption that the predicted measurements yˆk+1+j|k are computed by yˆk+1+j|k =Cxˆk+1+j|k, it

The elementsHi of the matrixΓare given by

Hi=CAi1B, i= 1,2, . . . , N. (5.15) These are known as the impulse response coefficients (Markov parameters) of the system.

Defining

the measurement predictions can be expressed as

Yk =bk+ΓUk (5.18)

wherebk is

bkxk|kwk|k (5.19) The input movement rate can be expressed as

∆Uk =

using that∆uk+j|k =uk+j|k−uk+j−1|k. The expression for the input movement rate (5.20) can be reformulated as

∆Uk =ΨUk−I0uk1|k (5.21)

In (5.21), uk1|k is the control input associated with samplek−1 considered at the current sample k. This corresponds to the control input determined at

samplek−1and is therefore known at the current samplek. In order to simplify

be the weight matrices associated with the prediction horizonN, corresponding to the dimensions of (5.18) and (5.21), respectively.

The objective function (5.7) can be expressed as φ= 1 Consequently, by state elimination the MPC regulation problem can be ex-pressed as the following unconstrained convex QP

minUk

φ=1

2UTkHUk+gTkUkk (5.28)

Provided the weights matrices Qy and Su in (5.7) are chosen such that H is positive definite, the QP is convex and has a unique solution, which is given by [JHR11]

Uk=−H−1gk = ¯Lxk|k+ ¯Lwk|k+ ¯LRRk+ ¯Luuk1 (5.29) where

x=−H1ΓTx (5.30)

w=−H1ΓTw (5.31)

R=H1ΓTQ (5.32)

u=H1ΨTSI0 (5.33)

The requirement on H ensures convexity of the QP and is guaranteed if the weight matricesQy andSu are positive definite.

In the receding horizon MPC approach, only the first control input uk|k is implemented on the plant in each sample. The first control input uk|k can be expressed as

uk =uk|k=IT0Uk =Lxk|k+Lwk|k+LRRk+Luuk1 (5.34) where

Lx=IT0x=−IT0H1ΓTx (5.35) Lw=IT0w=−IT0H1ΓTw (5.36) LR=IT0R=IT0H1ΓTQ (5.37) Lu=IT0u=IT0H1ΨTSI0 (5.38) In practice(Lx,Lw,LR,Lu)are not computed explicitly by inversion ofH, but by a Cholesky factorization.

Remark 2 It should be noted that the state elimination approach used in this section, is best suited for stable systems. That is, for systems where the eigen-values of the system matrixA is strictly inside the unit disc,eig(A)<1. This is the case due to the structure of the matrices in (5.14), which can result in very small and large elements and hereby cause numerical instability [Mac02].

Remark 3 For most industrial processes it is reasonable to assume that the processes to be controlled are stable. For the case where the process is unstable, it is assumed that the process has been stabilized by some appropriate controller prior to the implementation of MPC. This could for example be done by design-ing a stabilizdesign-ing state-feedback (LQG) controller uk=Lxˆk|k [Mac02].

5.2.1 Controller State-Space for the Unconstrained MPC

In this section the expressions for the optimal control input and the stationary Kalman filter for the controller model, are combined and formulated in state-space form resulting in a controller state-state-space.

The optimal control input for the unconstrained MPC is given by

uk=uk|k =Lxk|k+Lwk|k+LRRk+Luuk−1 (5.39) and the stationary Kalman filter for the controller model is given by

ek=yk−Cˆxˆk|k1 (5.40)

First the optimal control input (5.39) is substituted into the one-step prediction of the Kalman filter (5.43)

ˆ Next the filtered state (5.41) and the filtered process-noise (5.42) are substituted into the above expression, giving

ˆ Now the innovation (5.40) is inserted

ˆ

By expanding terms in (5.46) the following is obtained the expression in (5.47) can be simplified and written as

ˆ

The optimal control input for the unconstrained MPC, can also be written in terms of the one-step prediction and the previous optimal control input. This is done by conducting the equivalent substitutions as done above. The expression for the optimal control input is given by

uk =Lxk|k+Lwk|k+LRRk+Luuk−1

Using equations (5.48) and (5.49) the expression for the optimal control input in (5.51) can be written as

uk =

Now (5.50) and (5.52) can be combined to one equation describing the evolution of the one-step prediction and optimal control input. The combined equation is given by

Define the controller state as

xck =xˆk|k1 uk1

(5.54) then the evolution of the controller model can be written in state-space form as

xck+1=Acxck+Bcyyk+BcrRk (5.55) uk =Ccxck+Dcyyk+DcrRk (5.56) where

Ac =

Aˆ + ˆBLx−ΛˆCˆ BLˆ u

Lx−ΛCˆ Lu

, Bcy= Λˆ

Λ

, Bcr= BLˆ R

LR

(5.57) and

Cc=

Lx−ΛCˆ Lu

, Dcy=Λ, Dcr=LR (5.58)

5.3 Unconstrained MPC for State-Space Models

In document Industrial Model Predictive Control (Sider 46-54)