PSMPC – Pulse-step model predictive controller

Block SymbolLicensing group: ADVANCED
Qt SVG Document Exported by REXYGEN Studio sp pv tv hv MAN mv dmv de SAT pve iE PSMPC

Function Description
The PSMPC (Pulse Step Model Predictive Control) functional block is designed for the implementation of high-quality controllers for difficult-to-control linear time-invariant systems with actuator constraints (e.g., systems with transport delay or non-minimum phase). It is especially advantageous in cases where a very rapid transition from one controlled variable value to another without overshoot is required. However, the PSMPC regulator can generally be used wherever standard PID regulators are commonly deployed and high regulation quality is demanded.

image/svg+xml0 Ts 2Ts 3Ts 4Ts N Ts time y(t) g(1)g(3)g(2)g(4)g(N)h(1)h(2)h(3)h(4)

The PSMPC block is a predictive controller with explicitly defined constraints on the amplitude of manipulated variable. For prediction purposes, a model in the form of a discrete step response g(j),j = 1,,N is used. The figure above illustrates how this sequence can be obtained from a continuous step response. Note that N must be chosen large enough so that the step response is described up to the steady state (N TS > t95, where TS is the sampling period of the controller, and t95 is the time to settle to 95 % of the final value).

For stable, linear and t-invariant systems with a monotonous step response, it is alternatively possible to use a moment set model [6] and describe the system with only three characteristic numbers κ,μ and σ2, which can be determined from a simple pulse experiment. The controlled system can be approximated by first order plus dead-time system

FFOPDT (s) = K τs + 1 eDs,κ = K,μ = τ + D,σ2 = τ2 (7.1)

or second order plus dead-time system

FSOPDT (s) = K τs + 12 eDs,κ = K,μ = 2τ + D,σ2 = 2τ2 (7.2)

with the same characteristic numbers. The type of approximation is selected by the imtype parameter.

To lower the computational burden of the open-loop optimization, the family of admissible control sequences contains only sequences in the so-called pulse-step shape depicted below:

image/svg+xmlN c n 2 n 1 u u + u n 1 n 2 N c u u + u p 0 =1p 0 =0

Note that each of these sequences is uniquely defined by only four numbers n1 ,n2 0,,NC, p0 and u u,u+, where NC 0,1, is the control horizon and u,u+ stand for the given lower and upper limit of the manipulated variable. The on-line optimization (with respect to p0, n1 , n2 and u) minimizes the criterion

I = i=N1N2 ê(k + i|k)2 + λ i=0NC Δû(k + i k)2 min, (7.3)

where ê(k + i|k) is the predicted control error at time k over the coincidence interval i N1,N2, Δû(k + i|k) are the differences of the control signal over the interval i 0,NC and λ penalizes the changes in the control signal. The algorithm used for solving the optimization task (7.3) combines brute force and the least squares method. The value u is determined using the least squares method for all admissible combinations of p0 , n1 and n2 and the optimal control sequence is selected afterwards. The selected sequence in the pulse-step shape is optimal in the open-loop sense. To convert from open-loop to closed-loop control strategy, only the first element of the computed control sequence is applied and the whole optimization procedure is repeated in the next sampling instant.

The parameters of the predictive controller, in addition to the model of the controlled system and its input constraints, include the control horizon NC, the prediction horizon N1, N2, and the coefficient λ. Only the last-mentioned parameter, λ, is intended for manual fine-tuning of the control quality during routine commissioning. In the case of using the system model in the form of a transfer function (7.1) or (7.2), the parameters N1, N2 are automatically selected based on the characteristic numbers μ,σ2. The controller can then be effectively tuned "manually" by adjusting the characteristic numbers of the process κ, μ, σ2 .

Warning
It is necessary to set the sr array sufficiently large to avoid Matlab/Simulink crash when using the PSMPC block for simulation purposes. Especially when using FOPDT or SOPDT model, the sr array size must be greater than the length of the internally computed discrete step response.

This block propagates the signal quality. More information can be found in the 1.4 section.

Input

sp

Setpoint variable

Double (F64)

pv

Process variable

Double (F64)

tv

Tracking variable

Double (F64)

hv

Manual value

Double (F64)

MAN

Manual or automatic mode

Bool

off ..

Automatic mode

on ...

Manual mode

Parameter

nc

Control horizon length  5

Long (I32)

np1

Start of coincidence interval  1

Long (I32)

np2

End of coincidence interval  10

Long (I32)

lambda

Control signal penalization coefficient  0.05

Double (F64)

umax

Upper limit of the controller output  1.0

Double (F64)

umin

Lower limit of the controller output  -1.0

Double (F64)

imtype

Controlled process model type  3

Long (I32)

1 ....

FOPDT model

2 ....

SOPDT model

3 ....

Discrete step response

kappa

Static gain  1.0

Double (F64)

mu

Resident time constant  20.0

Double (F64)

sigma

Measure of the system response length  10.0

Double (F64)

nmax

Allocated size of array   10  10000 32

Long (I32)

sr

Discrete step response sequence  [0 0.2642 0.5940 0.8009 0.9084 0.9596 0.9826 0.9927 0.9970 0.9988 0.9995]

Double (F64)

Output

mv

Manipulated variable (controller output)

Double (F64)

dmv

Controller velocity output (difference)

Double (F64)

de

Deviation error

Double (F64)

SAT

Saturation flag

Bool

off ..

The controller implements a linear control law

on ...

The controller output is saturated

pve

Process variable estimation

Double (F64)

iE

Error code

Long (I32)

0 ....

No error

1 ....

Incorrect FOPDT model

2 ....

Incorrect SOPDT model

3 ....

Invalid step response sequence

2024 © REX Controls s.r.o., www.rexygen.com