## Documentation Center |

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

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

*x*(*k* +
1) = *A**x*(*k*)
+ *B _{u}*

*y _{m}*(

where *v*(*k*) are the measured
disturbances, *u*(*k*) are the manipulated
plant inputs, *y _{m}*(

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

By combining these three equations, the overall state observer is

where *L*=*AM*.

`[ M,A,Cm] = getestim(MPCobj)` also
returns matrices

*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

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`.

`T`he structure `Index` has
the fields detailed in the following table.

Field Name | Description |
---|---|

| 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.

Was this topic helpful?