Skip to main content

Welcome to a Grasp lesson

Create a free account to keep studying and create your own study path.

Lesson 26

Full-Order State Observer: State-Space Equations

Recommended resources

Hello! Welcome to the fifth lesson in our module on state estimation.

In our last two lessons, we established the "why" and "how" of observer design. We saw why we need an observer to estimate states that aren't directly measurable, and we learned how to calculate the observer gain matrix, , to ensure the estimation error converges to zero at a desired speed.

Today, we will put these pieces together to formally construct the state-space model of the observer itself. Our goal is to derive and understand the complete set of dynamic equations that describe how the state estimate, , evolves over time. This is the crucial step that packages our design into a system we can simulate and ultimately connect to our controller.

The Structure of a Luenberger Observer

At its heart, a state observer is a clever copy of the system it's observing. It runs a simulation of the plant in real-time and uses the plant's actual output to correct its simulation, ensuring the estimate stays on track.

Let's start with our standard LTI system model:

The observer's job is to generate an estimate that converges to . The core idea is to model the dynamics of using what we know about the plant, and , and then add a correction term based on the measurement, .

The equation for the state estimate is constructed as follows:

  1. Model of Plant Dynamics: We build a copy of the plant's dynamics, but using our current estimate : .
  2. Correction Term: We compare the plant's actual measured output, , with the estimated output from our observer, . The difference, , is the output estimation error. We feed this error back, weighted by our observer gain matrix , to "nudge" the estimate in the right direction. The correction term is .

Combining these gives the fundamental equation of the Luenberger Observer:

State-Space Observer Design and Simulation in MATLAB Thumbnail
This diagram shows the structure of a Luenberger observer. It takes the plant's input `u` and output `y` to drive a copy of the plant model (`A`, `B`, `C`). The difference between the measured output `y` and the estimated output `C*x_hat` is used as a correction signal, weighted by the observer gain `L`.

The following video provides an excellent walkthrough of how this structure is developed.

Control Bootcamp: Full-State Estimation

This video from Steve Brunton's "Control Bootcamp" series clearly derives the state-space equations for a full-state estimator (which is another name for an observer). He uses the notation KF for the gain matrix, which is equivalent to our L.

Please watch the video from 0:29 to 3:27. Focus on how the observer equation is built from a copy of the system dynamics plus a correction term based on the measurement error (y - y_hat).


The Observer in Standard State-Space Form

The equation above is intuitive, but to analyze and implement the observer, we need to rearrange it into the standard state-space form, . Let's do that by gathering the terms involving and the terms involving the observer's inputs, which are and .

Starting with:

We can distribute the gain and regroup:

Finally, we can write the input part in matrix form:

This is the state-space representation of the full-order observer. Let's identify its components:

  • State Vector: The state of the observer is our estimated state vector, .
  • System Matrix: . The eigenvalues of this matrix are the observer poles that we carefully placed in the previous lessons to control the speed of convergence.
  • Input Vector: The observer is a dynamic system that requires two inputs: the original system's control input and its measured output .
  • Input Matrix: .
  • Output: The primary output of the observer is the state estimate itself, . So, the output equation is simply .

The following reading from the University of Michigan provides a concise summary and a clear block diagram of this structure.

Introduction: State-Space Methods for Controller Design

This webpage from the Control Tutorials for MATLAB and Simulink (CTMS) provides a great overview of observer design. It reinforces the equations we've just derived.

Please read the section titled 'Observer Design'. Focus on the block diagram and the observer equation (13). Note that their equation uses L for the gain, and their description correctly identifies the error dynamics as being determined by the poles of (A - L*C).


Why Does This Work? The Error Dynamics

We've constructed the observer, but let's quickly re-verify why it works. The goal is for the estimation error, defined as , to go to zero. Let's find the dynamics of this error.

Substitute the expressions for and :

The terms cancel out. Now substitute :

Factor out the common terms:

Since , we arrive at the error dynamics:

This is a beautiful result. It shows that the estimation error follows its own simple, unforced linear dynamics. The evolution of the error does not depend on the system's input . If we choose such that the matrix is stable (i.e., all its eigenvalues are in the left-half plane), then the error will exponentially decay to zero, meaning will converge to .

This confirms that our pole placement procedure from the previous lesson was precisely for this purpose: to guarantee that the error dynamics are stable and fast.

The video from Steve Brunton also provides a great derivation of these error dynamics.

Control Bootcamp: Full-State Estimation

Let's return to the same video to see the derivation of the error dynamics, which confirms why this observer structure successfully drives the estimation error to zero.

Please watch from 5:50 to 9:38. This section defines the error Epsilon = X - X_hat and derives its dynamics, showing that Epsilon_dot = (A - KF*C)*Epsilon. This directly connects the observer's stability to the pole placement design we've been studying.

Test your understanding!

Let's use the system from our previous lesson's example. The plant is described by:

We calculated an observer gain to place the observer poles at and .

Construct the state-space model for the observer in the form . What are the matrices and ?

Show answer

The observer's system matrix is , and its input matrix is .

First, let's calculate :

As a quick check, the eigenvalues of this matrix are indeed and .

Next, we assemble :

So, the complete state-space equation for the observer is:


Conclusion

In this lesson, we have formally constructed the state-space model for a full-order Luenberger observer. You can now take the system matrices () and a calculated observer gain and write the complete set of differential equations that define the observer as a standalone dynamic system.

Key Takeaways:

  • An observer is a copy of the plant model that uses measurement feedback to correct its state estimate.
  • The fundamental observer equation is .
  • In standard state-space form, the observer is described by .
  • The dynamics of the estimation error are governed by , which is why we design to make stable.

Preview of the Next Lesson:
We have now designed a controller (gain ) and an observer (gain ) in separate efforts. The final step is to integrate them. In our next lesson, we will connect the observer's output to the controller by implementing the control law . We will then formulate the dynamic equations for the complete observer-based controller system and introduce the famous Separation Principle, which justifies our approach of designing the controller and observer independently.