Skip to main content

Welcome to a Grasp lesson

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

Lesson 10

Observability in State Estimation

Recommended resources

Hello! Welcome back to our journey into multivariable control.

In our last two lessons, we explored the concept of controllability. We started with the intuition—"can we steer the system anywhere we want?"—and then developed a concrete mathematical tool, the controllability matrix, to answer that question definitively. We established that controllability is the fundamental requirement for placing the system's poles and thus stabilizing it.

This brings us to a crucial practical challenge. State feedback control laws, like the ones we will design, take the form . This equation assumes we have access to the full state vector at every moment. But what if we don't? In most real-world systems, including your rotary inverted pendulum, it's often impractical or too expensive to place a sensor for every single state variable.

This leads to the dual question of controllability: "Can we know the state of the system by only looking at its outputs?" This is the question of observability. Today's lesson is dedicated to understanding this vital concept. Our goal is to define observability and explain its physical interpretation in the context of state estimation.

Why We Need State Estimation

Before we can define observability, we must first understand the problem it solves. We often have a system where we can only measure a subset of the state variables. These measurements are called the outputs, represented by the vector .

For your rotary inverted pendulum, the state vector might include the arm's angle, the pendulum's angle, and their respective angular velocities. However, you might only have encoders to measure the angles, not the velocities. In this case, how can you implement a control law that depends on the velocities?

The answer is to build a state estimator, also known as an observer. An observer is a software algorithm that runs in parallel with the real system. It takes the same control input that is sent to the physical system and uses the measured outputs to compute an estimate of the full state vector, denoted as .

The document below gives an excellent introduction to this idea.

State estimation - eCAL - University of California, Berkeley

This chapter from UC Berkeley's course on Energy Systems and Control introduces the concept of state estimation. It frames the problem perfectly by asking, 'Is it possible to determine the internal state of an energy system from a limited number of measurements?'

Please read Section 1, 'Overview' (Page 1). Pay close attention to Figure 1, which shows how a mathematical model (the estimator) runs in parallel with the physical system, using the error between the measured output and the estimated output to correct itself.

The key idea is that we "fuse" our mathematical model of the system with real-world measurements to produce the best possible estimate of the internal state. This is a cornerstone of modern control and is deeply related to concepts from signal processing like filtering and data fusion.


Defining Observability

An observer seems like a perfect solution, but it only works if the system has a specific property: observability.

Let's start building our understanding with a conceptual video.

A Conceptual Approach to Controllability and Observability | State Space, Part 3

This MATLAB video provides a clear, high-level introduction to observability, contrasting it with controllability.

Please watch from 01:30 to 02:47 and then from 03:53 to 04:59. The first segment frames control systems in terms of actuators (for controllability) and sensors (for observability). The second segment provides a clear, intuitive definition of observability.

As the video explained, observability means that all critical states can be known from the system's outputs. Let's formalize this.

Formal Definition of Observability:
A system is said to be observable if, for any unknown initial state , there exists a finite time such that the knowledge of the input and the output over the time interval is sufficient to uniquely determine the initial state .

Let's unpack this:

  • If we can figure out the state at the beginning (), and we know all the inputs applied since then, we can simulate our model forward to find the state at any time.
  • In short, observability means we can reconstruct the full state trajectory just by watching the inputs and outputs.
  • A system that is not observable has "hidden" states or modes that don't show up in the output, no matter what happens.

The following resource provides this formal definition.

State estimation - eCAL - University of California, Berkeley

Let's return to the UC Berkeley document for a formal definition.

Read the paragraph under 'Definition 2.1 (Observability)' on page 4. This gives the formal statement we are working with.


The Physical Interpretation of Observability

The formal definition is precise, but physical intuition is what makes it useful. Observability is fundamentally about the relationship between the system's internal dynamics (the matrix) and how those dynamics are reflected in the measurements (the matrix).

An Extreme Example: Driving Blind

What happens when a system is completely unobservable?

A Conceptual Approach to Controllability and Observability | State Space, Part 3

The MATLAB video uses a brilliant example to illustrate a complete lack of observability: driving a car with your eyes closed.

Watch the segment from 05:30 to 06:24. This example perfectly separates the concepts of controllability and observability. Notice that the car is still controllable (you can turn the wheel), but without sensor data, you have no idea what the state is, so you cannot perform a controlled maneuver.

This example shows that if your output matrix is all zeros, you get no information about the state. The system is completely unobservable.

Inferring States vs. Measuring States

A crucial point is that observability does not require you to measure every state directly. It only requires that the behavior of unmeasured states has some effect on the states you do measure.

A Conceptual Approach to Controllability and Observability | State Space, Part 3

This next segment from the same video clarifies the difference between measuring and estimating states.

Watch from 07:44 to 08:45. The video explains that you can estimate velocity by differentiating position, meaning you don't need a separate sensor for velocity. This is a key insight: observability allows you to trade hardware complexity (more sensors) for computational complexity (an observer).

From your signal processing background, you know that differentiating a noisy signal is problematic. This highlights the practical trade-offs involved. While you can estimate velocity from a noisy position measurement, the estimate itself will be very noisy. Sometimes, adding a velocity sensor is the better engineering choice, even if the system is technically observable without it.

Sensor Placement Creates Blind Spots

A system can be made unobservable by poor sensor placement. If a sensor is located at a point that is unaffected by a certain internal motion (a "node"), then that motion will be invisible to the sensor, and the corresponding state will be unobservable.

Let's look at two excellent examples of this.

  1. The Flexible Beam:

A Conceptual Approach to Controllability and Observability | State Space, Part 3

The flexible beam example shows how placing a sensor at a vibration node makes that vibration mode unobservable.

Watch the final example in the video from 09:30 to 11:34. This is a fantastic physical illustration. Even if you design a perfect controller, it will fail if the mode you're trying to damp is unobservable because the system literally cannot see it.

  1. The Two-Tank System:

    This is a classic example that should resonate with your electrical engineering background. Imagine two connected water tanks. We can pump water between them (), and we can measure the difference in their water levels (). The states are the individual water levels, and .

    This figure, from the UC Berkeley resource, shows two tanks connected by a pump. The states are the individual water levels, but the measurement is only the difference between them.

    Now, ask yourself: if we start with levels and , the output is . If we start with and , the output is also . Just by looking at the output, we can't distinguish between these two initial states. The system is unobservable.

    Specifically, we can determine the difference mode (), but we can never determine the common mode (). If both tank levels increase by the exact same amount, the output doesn't change at all. This is directly analogous to differential and common-mode signals in an electrical circuit. This unobservable "common mode" is a hidden internal behavior.

    You can read the full mathematical breakdown of this example in the following text.

State estimation - eCAL - University of California, Berkeley

The UC Berkeley document formally analyzes the two-tank system.

Read 'Example 2.1 (Unobservable Tank System)' on pages 5-6. It shows how the state-space model is formulated and why it fails the observability test (which we will cover in the next lesson). Focus on the physical reasoning.

Test your understanding!

Consider a system with two states: the temperature of a room () and the temperature inside a perfectly insulated thermos placed in that room (). Your only sensor measures the room temperature (). You can control the room temperature with an AC unit ().

Is this system observable? Why or why not? What is the physical "blind spot" here?

Show answer

The system is not observable.

Here's why: The temperature inside the perfectly insulated thermos, , is completely decoupled from the room's temperature, . Changing the room temperature with the AC unit will not affect the thermos temperature.

The sensor only measures . Since has no effect on , its behavior is completely invisible to the output. We could start the system with the thermos being hot, cold, or lukewarm, and we would have no way of ever knowing its temperature by only measuring the room.

The physical "blind spot" is the state of the thermos (). It represents an unobservable part of the system dynamics.


Conclusion

Today, we've explored the crucial concept of observability, the necessary counterpart to controllability.

Key Takeaways:

  • State Estimation: When we can't measure all states, we use an observer to estimate them using a model and available sensor data.
  • Observability: A system is observable if we can determine its entire internal state by observing its inputs and outputs over a period of time. It is the fundamental property that makes state estimation possible.
  • Physical Interpretation: Observability is determined by the system's structure () and the sensor configuration (). A poor choice of sensors can create "blind spots" (unobservable modes), making it impossible to know the full state of the system.
  • Duality: Controllability is about whether inputs can affect every state. Observability is about whether every state affects the outputs.

Preview of the Next Lesson:

Just as we developed a mathematical test for controllability using the controllability matrix, there is a parallel, or "dual," test for observability. In our next lesson, we will introduce the observability matrix and learn how to use its rank to provide a definitive yes-or-no answer to the question, "Is this system observable?" This will be the next tool you'll apply to your inverted pendulum model.