Main Content

RST Controller

Predictive control using a polynomial representation

  • RST Controller block

Libraries:
Simscape / Electrical / Control / General Control

Description

The RST Controller block implements a generalized predictive controller using a reference signal tracking polynomial representation. The diagram shows the equivalent circuit for the control algorithm.

Equations

A controlled auto-regressive integrated moving average (CARIMA) model describes the plant:

A(z1)y(k)=zdB(z1)u(k1)+e(k)C(z1)D(z1)

A(z1)=1+a1z1++anAznA

B(z1)=b0+b1z1++bnBznB

C(z1)=1

D(z1)=1z1,

where:

  • d is the system dead-time.

  • y(k) is the plant output.

  • u(k) is the controller output.

  • e(k) is white noise with a zero-mean value.

  • A(z-1) and B(z-1) are the system polynomials.

  • nA and nB are the polynomials degrees.

  • C(z-1) and D(z-1) are the disturbance polynomials for obtaining the steady-state error.

The prediction model is given as

y^(k+j|k)=Gjd(z1)D(z1)zd1u(k+j)+Hjd(z1)D(z1)C(z1)u(k1)+Fjd(z1)C(z1)y(k)

and

j=hi,hp¯

where:

  • hi is the minimum prediction.

  • hp is the prediction horizon.

The future control sequence, computed at time k, is

 u(k+j1|k),

where

 j=1,hc¯

and hc is the control horizon.

The predicted values of the output is

 y^(k+j|k).

To determine the system polynomials, Fjd(z1), Gjd(z1), and Hjd(z1), the block uses two Diophantine equations. The first Diophantine equation is

C(z1)A(z1)D(z1)=Ejd(z1)+zj+dFjd(z1)A(z1)D(z1),

where:

Ejd(z1)=1+1+e1z1++enEznE

Fjd(z1)=f0+f1z1++fnFznF

nE=jd1

nF=max(nA+nD1,nCj+d)

The second Diophantine equation is

Ejd(z1)B(z1)=C(z1)Gjd(z1)+zj+dHjd(z1),

where:

Gjd(z1)=g0+g1z1++gnGznG

Hjd(z1)=h0+h1z1++hnHznH

nG=jd1

nH=max(nC,nB+d)1

The resulting prediction model is

y^(k+j|k)=Gjd(z1)D(z1)zd1u(k+j)+y^0(k+j|k),

where

y^0(k+j|k)=Hjd(z1)D(z1)C(z1)u(k1)+Fjd(z1)C(z1)y(k)

represents the free response of the system.

Using the matrix notation, the prediction model can be written as

y^=Gud+y^0,

where:

y^=[y^(k+hi|k),y^(k+hi+1|k),,y^(k+hp|k)]T

G=[ghid1g000ghidg1g00ghc1g0ghpd1ghphc1]

ud=[D(z1)u(k),,D(z1)u(k+hc1)]T

y^0=[y^0(k+hi|k),y^0(k+hi+1|k),,y^0(k+hp|k)]T

To minimize tracking error and controller output, the block uses a cost function. To trade off between the minimization of the tracking error and the minimization of the controller output, the block uses a weighting factor, λ, such that

J=(Gud+y^0w)T(Gud+y^0w)+λudTud

for

D(z1)u(k+i)=0

and

i[hc,hpd1],

where w is the reference trajectory vector. Minimizing the cost function, yields the equation for the optimal control sequence:

ud*=(GTG+λIhc)GT[wy^0].

As γj and j=hi,hp¯ are elements in the first row of the matrix (GTG+λIhc)1GT, applying the receding horizon principle yields the control algorithm equation as

D(z1)u(k)=j=hihpγj[w(k+j|k)y^0(k+j|k)].

Substitution using y^0(k+j|k)=Hjd(z1)D(z1)C(z1)u(k1)+Fjd(z1)C(z1)y(k) yields this form of the control algorithm equation:

C(z1)D(z1)u(k)=j=hihpγjHjd(z1)D(z1)u(k1)j=hihpγjFjd(z1)y(k)+j=hihpγjC(z1)w(k+j).

The polynomial form of the control algorithm follows as

R(z1)u(k)+S(z1)y(k)=T(z1)w(k+hp),

where:

R(z1)=(C(z1)+j=hihpγjz1Hjd(z1)) D(z1),

S(z1)=j=hihpγjFjd(z1),

and

T(z1)=C(z1)j=hihpγjzhp+j.

Limitations

To obtain the R, S, and T polynomials, use the discrete-time instead of the continuous-time transfer function.

Examples

Ports

Input

expand all

Plant system reference signal.

Data Types: single | double

Plant system output signal.

Data Types: single | double

Output

expand all

Control system output signal.

Data Types: single | double

Parameters

expand all

Method for parameterizing the controller. If you know the discrete-time R, S, and T polynomial values, select Controller polynomials. Otherwise, select Generate polynomials.

Dependencies

Selecting a parameterization method enables other parameters.

Vector of the R polynomials for the RST control.

Dependencies

Selecting Controller polynomials for the Controller parameterization parameter enables this parameter.

Vector of the S polynomials for the RST control.

Dependencies

Selecting Controller polynomials for the Controller parameterization parameter enables this parameter.

Vector of the T polynomials for the RST control.

Dependencies

Selecting Controller polynomials for the Controller parameterization parameter enables this parameter.

Numerator of the system discretized transfer function. To determine the discrete transfer function, if you have a license for Control System Toolbox™, use the c2d function.

Dependencies

Selecting Generate polynomials for the Controller parameterization parameter enables this parameter.

Denominator of the system discretized transfer function. To determine the discrete transfer function, if you have a license for Control System Toolbox, use the c2d function.

Dependencies

Selecting Generate polynomials for the Controller parameterization parameter enables this parameter.

Number of samples in the control horizon.

Dependencies

Selecting Generate polynomials for the Controller parameterization parameter enables this parameter.

Weighting factor for the RST controller.

Dependencies

Selecting Generate polynomials for the Controller parameterization parameter enables this parameter.

Number of samples of the dead time.

Dependencies

Selecting Generate polynomials for the Controller parameterization parameter enables this parameter.

Time interval between samples. If the block is inside a triggered subsystem, inherit the sample time by setting this parameter to -1. If this block is in a continuous variable-step model, specify the sample time explicitly. For more information, see What Is Sample Time? and Specify Sample Time.

References

[1] Camacho, E. F. and C. Bordons. Model Predictive Control. Second Edition, London: Springer, 2007.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Version History

Introduced in R2017b