# Luenberger Observer

Discrete-time Luenberger observer

• Library:
• Simscape / Power Systems / Simscape Components / Control / Observers

## Description

The Luenberger Observer block implements a discrete time Luenberger Observer. Use this block to estimate the states of an observable system using:

• The discrete inputs and outputs of the system.

• A discrete state-space representation of the system.

The Luenberger Observer is also sometimes referred to as a state observer or simply an observer.

You can control multi-input, multi-output systems by passing the output state vector of this block to a State Feedback Controller block.

### Defining Equations

The block implements a discrete time Luenberger Observer using the backward Euler method due to its simplicity and stability.

The estimator is given by this difference equation:

where:

• $\stackrel{^}{x}\left(k\right)$ is the kth estimated state vector.

• $\stackrel{^}{y}\left(k\right)$ is the kth estimated output vector.

• u(k) is the kth input vector.

• y(k) is the kth measured output vector.

• Ad is the discretized state matrix.

• Bd is the discretized input matrix.

• Ld is the discretized observer gain matrix.

The dynamics of the estimation error are described by:

`$e\left(k+1\right)=\left({A}_{d}-{L}_{d}{C}_{d}\right)e\left(k\right),$`
where:

• e(k) is the kth error vector.

• Cd is the output matrix.

The estimation error converges to zero when Ad-LdCd has its eigenvalues inside the unit circle. Therefore, the value of Ld should be such that this goal is achieved. The block computes the observer gain by solving

`${L}_{d}^{T}=G{X}^{-1},$`
where G is an arbitrary matrix and X is obtained by solving the Sylvester equation:
`${A}_{d}^{T}X-X\Lambda ={C}_{d}^{T}G.$`
Here, Λ is a matrix with the desired eigenvalues, which are not the same as the eigenvalues of Ad. This diagram shows the basic structure of a discrete time Luenberger Observer.

### Assumptions

The system is observable, which is true if the state of the system can be determined from the input and output in a finite time. Mathematically, this means that the system observability matrix has full rank.

### Limitations

The desired eigenvalues are not the same as the eigenvalues of the open-loop model.

## Ports

### Input

expand all

Input signal to the system whose state we want to estimate, specified as a vector.

Data Types: `single` | `double`

Measured output of the system whose state we want to estimate, specified as a vector.

Data Types: `single` | `double`

### Output

expand all

Estimate of the state of the system, specified as a vector.

Data Types: `single` | `double`

## Parameters

expand all

Select the strategy for parameterizing the state-space matrices and desired poles for the observer. The block implementation is discrete regardless of this parameterization.

State matrix of the discrete-time state-space model. The A matrix must be square, with the number of rows and columns equal to the order of the system.

#### Dependencies

To enable this parameter, set State-space parameterization to `Discrete-time`.

Input matrix of the discrete-time state-space model. The B matrix must have the number of rows equal to the order of the system, and the number of columns equal to the number of system inputs.

#### Dependencies

To enable this parameter, set State-space parameterization to `Discrete-time`.

Output matrix of the discrete-time state-space model. The C matrix must have the number of rows equal the number of outputs of the system, and the number of columns equal to the order of the system.

#### Dependencies

To enable this parameter, set State-space parameterization to `Discrete-time`.

Feedthrough matrix of the discrete-time state-space model. The D matrix must have the number of rows equal to the number of system outputs, and the number of columns equal to the number of system inputs.

#### Dependencies

To enable this parameter, set State-space parameterization to `Discrete-time`.

State matrix of the continuous-time state-space model. The A matrix must be square, with the number of rows and columns equal to the order of the system.

#### Dependencies

To enable this parameter, set State-space parameterization to `Continuous-time`.

Input matrix of the continuous-time state-space model. The B matrix must have the number of rows equal to the order of the system, and the number of columns equal to the number of system inputs.

#### Dependencies

To enable this parameter, set State-space parameterization to `Continuous-time`.

Output matrix of the continuous-time state-space model. The C matrix must have the number of rows equal the number of outputs of the system, and the number of columns equal to the order of the system.

#### Dependencies

To enable this parameter, set State-space parameterization to `Continuous-time`.

Feedthrough matrix of the continuous-time state-space model. The D matrix must have the number of rows equal to the number of system outputs, and the number of columns equal to the number of system inputs.

#### Dependencies

To enable this parameter, set State-space parameterization to `Continuous-time`.

Select the strategy for parameterizing observer gain.

#### Dependencies

To enable this parameter, set State-space parameterization to `Discrete-time`.

Specify the observer gain that puts all eigenvalues of the matrix Ad-LdCd inside the unit circle. The gain matrix must have the number of rows equal to number of system inputs and the number of columns equal to the order of the system.

#### Dependencies

To enable this parameter, set:

• State-space parameterization to `Discrete-time`.

• Observer design to ```Observer gain```.

Specify the location of the eigenvalues:

• To have negative real part if State-space parameterization is set to `Continuous-time`. In this case, the eigenvalues of the continuous-time system are approximated to the discrete ones based on the Discretization sample time.

• To lie within the unit circle if State-space parameterization is set to `Discrete-time`.

The Observer gain is then calculated based on these eigenvalues. The size of the vector should be the same as the system order.

Select the initial condition of each state.

Value used to discretize the state space matrices and also approximate the discrete-time eigenvalues.

#### Dependencies

To enable this parameter, set State-space parameterization to `Continuous-time`.

Value used to simulate the dynamics of the model. Choose the same value as Discretization sample time, unless the block is placed within a triggered subsystem, in which case you must set it to -1.

## References

[1] Luenberger, D. G. "An Introduction to Observers." IEEE Transactions on Automatic Control. Vol. 16, Number 6, 1971, pp. 596-602.

[2] Alessandri, A., and P. Coletta. "Design of Luenberger observers for a class of hybrid linear systems." In International Workshop on Hybrid Systems: Computation and Control, Berlin, March 2001.

[3] Varga, A. "Robust pole assignment via Sylvester equation based state feedback parametrization." In Computer-Aided Control System Design, pp. 13-18., Anchorage, Alaska, 2000.