Compute closed-loop DC gain from output disturbances to measured outputs assuming constraints are inactive at steady state
Use this function to calculate the steady state output sensitivity of the closed loop. A zero value means that the measured plant output can track the desired output reference setpoint.
returns the DC gain matrix
dcgain = cloffset(
mpcobj is the MPC
object specifying the controller for which the closed-loop gain is calculated.
Computing the Effect of Output Disturbances
Relying on the superposition of effects principle, the gain is computed by zeroing references, measured disturbances, and unmeasured input disturbances.
Calculate steady state output sensitivity of MPC in closed loop
Create a plant, a corresponding MPC object, and calculate the closed loop static gain (this is also referred to as steady state loop output sensitivity).
mpcverbosity off; % turn off mpc messaging plant=tf(1,[1 1],0.2); % create plant (0.2 seconds sampling time) mpcobj=mpc(plant,0.2); % create mpc object (0.2 second sampling time) cloffset(mpcobj) % calculate steady state output sensitivity of closed loop ans = 0 A zero gain (which is typically the result of the controller having % integrators as input or output disturbance models) means that the % measured plant output will track the desired output reference setpoint. zpk(mpcobj) % convert unconstrained MPC to zero/pole/gain form ans = From input "MO1" to output "MV1": 0.45205 z^2 (z-1.5) ----------------------------- (z-1) (z-0.02575) (z+0.02485) Sample time: 0.2 seconds Discrete-time zero/pole/gain model.
Converting the unconstrained controller to
zpk form shows that
the pole in
z=1, (resulting from the default noise model being an
integrator), causes the controller static gain to approach infinity, in turn causing the
closes loop output sensitivity to be zero at steady state (
allows the controller to successfully track the output reference signal.
dcgain — Steady state closed loop output sensitivity
The steady state closed loop output sensitivity
dcgain is an
matrix , where nym is the number of measured
dcgain(i,j) represents the gain from an additive
(constant) disturbance on output
j to measured output
i. If row
i contains all zeros, there will be no
steady-state offset on output
i, and that the controller can achieve
perfect tracking of the
ith component of an output reference setpoint
(assuming constraints are inactive at steady state).
Introduced before R2006a