[J,sens] = sensitivity(MPCobj,PerfFunc,PerfWeights,Ns,r,v,SimOptions,utarget)
calculates the scalar performance metric, J, and its sensitivity to the
diagonal weights sens, for the controller defined by the MPC controller
object MPCobj.
-->Converting model to discrete time.
-->Assuming output disturbance added to measured output channel #1 is integrated white noise.
-->Assuming output disturbance added to measured output channel #2 is integrated white noise.
-->The "Model.Noise" property of the "mpc" object is empty. Assuming white noise on each measured output channel.
'ISE' (integral squared error) for which the performance metric
is
'IAE' (integral absolute error) for which the performance metric
is
'ITSE' (integral of time-weighted squared error) for which the
performance metric is
'ITAE' (integral of time-weighted absolute error) for which the
performance metric is
In the above expressions ny is the number
of controlled outputs and nu is the number of
manipulated variables. eyij is the difference between output j and its setpoint
(or reference) value at time interval i. euij is the difference between manipulated variable j
and its target at time interval i.
The w parameters are nonnegative performance weights defined by
the structure PerfWeights
Example: 'ITAE'
PerfWeights — Performance function weights MPCobj.Weights (default) | structure
The w parameters are nonnegative performance weights defined by
the structure PerfWeights, which contains the following
fields:
OutputVariables —
ny element row vector that contains the values
ManipulatedVariables —
nu element row vector that contains the values
ManipulatedVariablesRate —
nu element row vector that contains the values
If PerfWeights is unspecified, it defaults to the corresponding
weights in MPCobj. In general, however, the performance weights and
those used in the controller have different purposes and should be defined
accordingly.
Ns — Number of simulation steps positive integer
Number of simulation steps, specified as a positive integer.
If you omit Ns, the default value is the row size of whichever
of the following arrays has the largest row size:
The UnmeasuredDisturbance property of
SimOptions, if specified
The OutputNoise property of SimOptions,
if specified
Example: 100
r — Reference signal MPCobj.Model.Nominal.Y (default) | matrix
Reference signal, specified as an array. This array has ny
columns, where ny is the number of plant outputs.
r can have anywhere from 1 to Ns rows. If
the number of rows is less than Ns, the missing rows are set equal
to the last row.
Example: ones(100,1)
v — Measured input disturbance signal MPCobj.Model.Nominal.U (default) | matrix
Measured disturbance signal, specified as an array. This array has
nv columns, where nv is the number of measured
input disturbances. v can have anywhere from 1 to
Ns rows. If the number of rows is less than
Ns, the missing rows are set equal to the last row.
Use a simulation options objects to specify options such as noise and disturbance
signals that feed into the plant but are unknown to the controller. You can also use
this object to specify an open loop scenario, or a plant model in the loop that is
different from the one in MPCobj.Model.Plant.
utarget — Target for manipulated variables MPCobj.Model.Nominal.U (default) | vector
The optional input utarget is a vector of
nu manipulated variable targets. Their
defaults are the nominal values of the manipulated variables.
Δuij is the change in manipulated variable
j and its target at time interval i.
J — Performance metric for the given controller 'double'
Depending on the PerfFunc argument, this performance measure
can be a function of the integral (time-weighted or not) of either the square or the
absolute value or the (output and input) error. See PerfFunc for more detail.
sens — Sensitivity of the performance metric structure
This structure contains and the numerical partial derivatives of the performance
measure J with respect to its diagonal weights. These partial
derivatives, also called sensitivities, suggest weight adjustments
that should improve performance; that is, reduce J.
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.