# Discrete Varying Observer Form

Discrete-time observer-form state-space model with varying matrix values

**Libraries:**

Control System Toolbox /
Linear Parameter Varying

## Description

Use this block to implement a discrete-time varying state-space model in observer
form. The system matrices *A*, *B*,
*C*, and *D* describe the plant dynamics, and the
matrices *K* and *L* specify the state-feedback and
state-observer gains, respectively. Feed the instantaneous values of these matrices to
the corresponding input ports. The observer form is given by:

$$\begin{array}{c}{x}_{k+1}=A{x}_{k}+B{u}_{k}+L{\epsilon}_{k}\\ {u}_{k}=-K{x}_{k}\\ {\epsilon}_{k}={y}_{k}-C{x}_{k}-D{u}_{k},\end{array}$$

where *u _{k}* is the plant input (control
signal),

*y*is the plant output,

_{k}*x*is the estimated state, and

_{k}*ε*is the innovation, the difference between the predicted and measured plant output. The observer form works well for gain scheduling of state-space controllers. In particular, the state

_{k}*x*tracks the plant state, and all controllers are expressed with the same state coordinates.

_{k}Use this block and the other blocks in the Linear Parameter Varying library to implement common control elements with variable parameters or coefficients. For more information, see Model Gain-Scheduled Control Systems in Simulink.

**Caution**

Avoid making the **K** matrix depend on the control signal
**u _{k}**. If you have such dependence,
the resulting equation

*u*= –

_{k}*K*(

*u*)

_{k}*x*creates an algebraic loop, because computing the block output value requires knowing the block output value. This algebraic loop is prone to instability and divergence. Instead, try expressing

_{k}**K**in terms of the time

*t*and the block input

**y**.

_{k}For similar reasons, avoid making **A**, **B**,
or **L** depend on the
**u _{k+1}** output.

## Ports

### Input

### Output

## Parameters

## Extended Capabilities

## Version History

**Introduced in R2017b**