PSMPC – Pulsestep model predictive controller
Block SymbolLicensing group: ADVANCED
Function Description
The PSMPC (Pulse Step Model Predictive Control) functional block is designed for the
implementation of highquality controllers for difficulttocontrol linear timeinvariant systems
with actuator constraints (e.g., systems with transport delay or nonminimum 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.
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\left(j\right),j=1,\dots ,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\cdot {T}_{S}>{t}_{95}$, where ${T}_{S}$ is the sampling period of the controller, and ${t}_{95}$ is the time to settle to 95 % of the final value).
For stable, linear and tinvariant 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 $\kappa ,\mu $ and ${\sigma}^{2}$, which can be determined from a simple pulse experiment. The controlled system can be approximated by first order plus deadtime system
$${F}_{FOPDT}\left(s\right)=\frac{K}{\tau s+1}\cdot {e}^{Ds},\phantom{\rule{1em}{0ex}}\kappa =K,\phantom{\rule{1em}{0ex}}\mu =\tau +D,\phantom{\rule{1em}{0ex}}{\sigma}^{2}={\tau}^{2}$$  (7.1) 
or second order plus deadtime system
with the same characteristic numbers. The type of approximation is selected by the imtype parameter.
To lower the computational burden of the openloop optimization, the family of admissible control sequences contains only sequences in the socalled pulsestep shape depicted below:
Note that each of these sequences is uniquely defined by only four numbers ${n}_{1},{n}_{2}\in \left\{0,\dots ,{N}_{C}\right\}$, ${p}_{0}$ and ${u}^{\infty}\in \left.\right)"\; close=">">{u}^{},{u}^{+}$, where ${N}_{C}\in \left\{0,1,\dots \right\}$ is the control horizon and ${u}^{},{u}^{+}$ stand for the given lower and upper limit of the manipulated variable. The online optimization (with respect to ${p}_{0}$, ${n}_{1}$, ${n}_{2}$ and ${u}^{\infty}$) minimizes the criterion
$$I=\sum _{i={N}_{1}}^{{N}_{2}}\xea{\left(k+ik\right)}^{2}+\lambda \sum _{i=0}^{{N}_{C}}\Delta \xfb{\left(k+i\leftk\right.\right)}^{2}\to min,$$  (7.3) 
where $\xea\left(k+ik\right)$ is the predicted control error at time $k$ over the coincidence interval $i\in \left\{{N}_{1},{N}_{2}\right\}$, $\Delta \xfb\left(k+ik\right)$ are the differences of the control signal over the interval $i\in \left\{0,{N}_{C}\right\}$ and $\lambda $ 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}^{\infty}$ is determined using the least squares method for all admissible combinations of ${p}_{0}$, ${n}_{1}$ and ${n}_{2}$ and the optimal control sequence is selected afterwards. The selected sequence in the pulsestep shape is optimal in the openloop sense. To convert from openloop to closedloop 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 ${N}_{C}$, the prediction horizon ${N}_{1}$, ${N}_{2}$, and the coefficient $\lambda $. Only the lastmentioned parameter, $\lambda $, is intended for manual finetuning 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 ${N}_{1}$, ${N}_{2}$ are automatically selected based on the characteristic numbers $\mu ,{\sigma}^{2}$. The controller can then be effectively tuned "manually" by adjusting the characteristic numbers of the process $\kappa $, $\mu $, ${\sigma}^{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 



Parameter
nc  Control horizon length $\odot $5  Long (I32) 
np1  Start of coincidence interval $\odot $1  Long (I32) 
np2  End of coincidence interval $\odot $10  Long (I32) 
lambda  Control signal penalization coefficient $\odot $0.05  Double (F64) 
umax  Upper limit of the controller output $\odot $1.0  Double (F64) 
umin  Lower limit of the controller output $\odot $1.0  Double (F64) 
imtype  Controlled process model type $\odot $3  Long (I32) 



kappa  Static gain $\odot $1.0  Double (F64) 
mu  Resident time constant $\odot $20.0  Double (F64) 
sigma  Measure of the system response length $\odot $10.0  Double (F64) 
nmax  Allocated size of array $\downarrow $10 $\uparrow $10000 $\odot $32  Long (I32) 
sr  Discrete step response sequence $\odot $[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 



pve  Process variable estimation  Double (F64) 
iE  Error code  Long (I32) 



[Previous] [Back to top] [Up] [Next]
2024 © REX Controls s.r.o., www.rexygen.com