Documentation Center

  • Trial Software
  • Product Updates


Model and gain for observer design


M = getestim(MPCobj)
[M,A,Cm] = getestim(MPCobj)
[M,A,Cm,Bu,Bv,Dvm] = getestim(MPCobj)
[M,model,Index] = getestim(MPCobj,'sys')


M = getestim(MPCobj) extracts the estimator gain M used by the MPC controller MPCobj for observer design. The observer is based on the models specified in MPCobj.Model.Plant, in MPCobj.Model.Disturbance, by the output disturbance model (default is integrated white noise, see Output Disturbance Model), and by MPCobj.Model.Noise.

The state estimator is based on the linear model (see State Estimation)

x(k + 1) = Ax(k) + Buu(k) + Bvv(k)

ym(k) = Cmx(k) + Dvmv(k)

where v(k) are the measured disturbances, u(k) are the manipulated plant inputs, ym(k) are the measured plant outputs, and x(k) is the overall state vector collecting states of plant, unmeasured disturbance, and measurement noise models.

The estimator used in the Model Predictive Control Toolbox™ software is described in State Estimation. The estimator's equations are

Predicted Output Computation:

Measurement Update:

Time Update:

By combining these three equations, the overall state observer is

where L=AM.

[M,A,Cm] = getestim(MPCobj) also returns matrices A,Cm used for observer design. This includes the plant model, disturbance model, noise model, and offsets. The extended state is

x=[plant states; disturbance models states; noise model states]

[M,A,Cm,Bu,Bv,Dvm] = getestim(MPCobj) retrieves the whole linear system used for observer design.

[M,model,Index] = getestim(MPCobj,'sys') retrieves the overall model used for observer design (specified in the Model field of the MPC object) as an LTI state-space object, and optionally a structure Index summarizing I/O signal types.

The extended input vector of model model is

u=[manipulated vars;measured disturbances; 1; noise exciting disturbance model;noise exciting noise model]

Model model has an extra measured disturbance input v=1 used for handling possible nonequilibrium nominal values (see Offsets).

Input, output, and state names and input/output groups are defined for model model.

The structure Index has the fields detailed in the following table.

Field Name



Indices of manipulated variables within input vector


Indices of measured disturbances within input vector (not including offset=1)


Index of offset=1


Indices of white noise signals within input vector


Indices of measured outputs within output vector


Indices of unmeasured outputs within output vector

To improve the solvability of the Kalman filter design, the software adds white noise to the manipulated variables and measured disturbances, as described in State Observer. The model returned by getestim does not include this additional white noise.

See Also

| |

Was this topic helpful?