PSMPC – Pulse-step model predictive controller

Block SymbolLicensing group: ADVANCED
PIC

Function Description
The PSMPC block can be used for control of hardly controllable linear time-invariant systems with manipulated value constraints (e.g. time delay or non-minimum phase systems). It is especially well suited for the case when fast transition without overshoot from one level of controlled variable to another is required. In general, the PSMPC block can be used where the PID controllers are commonly used.

PIC

The PSMPC block is a predictive controller with explicitly defined constraints on the amplitude of manipulated variable.

The prediction is based on the discrete step response g(j),j = 1,,N is used. The figure above shows how to obtain the discrete step response g(j),j = 0,1,,N and the discrete impulse response h(j),j = 0,1,,N with sampling period TS from continuous step response. Note that N must be chosen such that N TS > t95, where t95 is the time to reach 95 % of the final steady state value.

For stable, linear and t-invariant systems with monotonous step response it is also possible to use the moment model set approach [4] and describe the system by only 3 characteristic numbers κ, μ, and σ2 , which can be obtained easily from a very short and simple 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:

PIC

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 N1, N2, HC, and λ in the criterion (7.3) take the role of design parameters. Only the last parameter λ is meant for manual tuning of the controller. In the case the model in the form (7.1) or (7.2) is used, the parameters N1 and N2 are determined automatically with respect to the μ and σ2 characteristic numbers. The controller can be then effectively tuned by adjusting the characteristic numbers κ, μ and σ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.

Inputs

sp

Setpoint variable

Double (F64)

pv

Process variable

Double (F64)

tv

Tracking variable (applied control signal)

Double (F64)

hv

Manual value

Double (F64)

MAN

Manual or automatic mode

Bool

off ..

Automatic mode

on ...

Manual mode

Outputs

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

Predicted process variable based on the controlled process model

Double (F64)

iE

Error code

Long (I32)

0 ....

No error

1 ....

Incorrect FOPDT model

2 ....

Incorrect SOPDT model

3 ....

Invalid step response sequence

Parameters

nc

Control horizon length (NC)  5

Long (I32)

np1

Start of coincidence interval (N1)  1

Long (I32)

np2

End of coincidence interval (N2)  10

Long (I32)

lambda

Control signal penalization coefficient (λ)  0.05

Double (F64)

umax

Upper limit of the controller output (u+)  1.0

Double (F64)

umin

Lower limit of the controller output (u)  -1.0

Double (F64)

imtype

Controlled process model type  3

Long (I32)

1 ....

FOPDT model (7.1)

2 ....

SOPDT model (7.2)

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 (σ2)  10.0

Double (F64)

nmax

Reserved size of the sr array   10  10000 32

Long (I32)

sr

Discrete step response sequence ([g(1),,g(N)])  [0 0.2642 0.5940 0.8009 0.9084 0.9596 0.9826 0.9927 0.9970 0.9988 0.9995]

Double (F64)

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