Skip to main content

Welcome to a Grasp lesson

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

Lesson 16

MIMO System Controllability and Observability Analysis

Recommended resources

Hello! Welcome to your next lesson on analyzing MIMO systems.

In our last session, we learned how to derive the transfer function matrix from a state-space representation. This gave us a frequency-domain view of how the system's inputs affect its outputs. We now have two powerful models for our rotary inverted pendulum.

Before we jump into designing a controller, we need to answer two fundamental questions:

  1. Is it even possible to control this system? Can our actuator (the motor) influence all the critical aspects of the pendulum's motion?
  2. Can we know what the system is doing? If we only measure certain outputs (like the arm and pendulum angles), can we figure out all the internal states (like the velocities)?

This lesson will equip you to answer these questions. Our learning outcome is to analyze the controllability and observability of a given MIMO system model. These concepts are the bedrock of modern control design, telling us what is theoretically possible before we write a single line of controller code.

Part 1: Controllability

Controllability addresses whether it's possible to steer a system from any initial state to any desired final state within a finite time, using the available control inputs.

For your inverted pendulum project, this asks: "Can we use the motor voltage to arbitrarily control the four states: arm angle , pendulum angle , and their velocities and ?" If the answer is no, then no matter how sophisticated our controller is, there will be parts of the system's behavior we simply cannot command.

The Controllability Test

To check for controllability, we construct the Controllability Matrix, often denoted as . For a system with state variables, this matrix is formed by combining the influence of the input matrix over time.

Controllability of State Space
This image defines controllability and presents the controllability matrix, \(\mathcal{P}_c\) (which we'll call \(\mathcal{C}\)). A system is controllable if this matrix has a rank equal to the number of state variables, \(n\).

The matrix is constructed as follows:

The system is controllable if and only if this matrix has full rank, meaning:

Intuitively, if the rank is less than , it means the control input cannot influence the states in certain "directions" of the state-space. The system has uncontrollable modes.

Practical Analysis with MATLAB

Calculating this matrix and its rank by hand is tedious. In practice, we use computational tools. The following video demonstrates this using the inverted pendulum on a cart, a system very similar to your own. It clearly shows how to use MATLAB to determine if the system is controllable.

Inverted Pendulum on a Cart [Control Bootcamp]

Watch this segment from the 'Control Bootcamp' series by Steve Brunton. It demonstrates how to check the controllability of the linearized inverted pendulum system in MATLAB.

Please watch from 12:23 to 13:33. Focus on the two key MATLAB commands used: ctrb to create the controllability matrix and rank to check if it's full.

As the video showed, the process in MATLAB is very direct:

% Assume A and B are your state-space matrices for the pendulum
Co = ctrb(A, B);  % 'Co' for Controllability matrix
rank_Co = rank(Co);

% If rank_Co equals the number of states (4 for our pendulum), 
% the system is controllable.

For a more detailed textual reference on this topic, the following resource is excellent. It formally defines the controllability matrix and shows the same MATLAB implementation.

Inverted Pendulum: State-Space Methods for Controller ...

Please read the section on controllability from the University of Michigan's Control Tutorials for MATLAB and Simulink (CTMS).

Read the first part of the page, stopping before the 'Observer-based control' section. This will reinforce the definition of the controllability matrix and the rank condition.


Part 2: Observability

Observability is the dual concept to controllability. It addresses whether we can determine the complete internal state vector by observing the system's outputs over a finite period.

For your project, this asks: "If our sensors can only measure the angles and , can we use that information to calculate the angular velocities and ?" If a system is not observable, some states are "hidden" from our sensors, and we cannot build a state-estimator (like an observer) to reconstruct them. This has major implications for control, as many advanced techniques require access to the full state vector.

The Observability Test

To check for observability, we construct the Observability Matrix, .

Observability of State Space
This image defines observability and the structure of the observability matrix, \(\mathcal{P}_o\) (our \(\mathcal{O}\)). A system is observable if this matrix has a rank equal to the number of states, \(n\).

The matrix is constructed as:

The system is observable if and only if this matrix has full rank:

Given your background in signal processing, you can think of this as a signal reconstruction problem. Is the output signal rich enough to uniquely reconstruct the internal state signal ? If the rank is less than , some state dynamics produce no effect on the output, making them impossible to observe.

Practical Analysis and the Importance of Sensor Choice

The choice of sensors (which defines the matrix) is critical for observability. A system might be observable with one set of measurements but unobservable with another.

The following video is an excellent practical demonstration of this. It shows how changing the output matrix for the inverted pendulum directly impacts observability.

Control Bootcamp: Observability Example in Matlab

Now watch the follow-up video from Steve Brunton's 'Control Bootcamp'. It explores how the choice of what to measure (the C matrix) determines if the system is observable.

Please watch from the beginning to 7:30. Pay close attention to the two cases presented: 1) measuring only the cart's position x, and 2) measuring only the pendulum's angle theta. Notice how the rank of the observability matrix changes and understand the physical reason provided for why measuring only the angle leads to an unobservable system.

This video provides a crucial insight: simply measuring the pendulum's angle is not enough to determine the cart's absolute position, because the system dynamics are independent of that absolute position (they are translationally invariant). This makes the state associated with the cart's position unobservable from an angle-only measurement.

The MATLAB process is, again, very straightforward:

% Assume A and C are your state-space matrices
Ob = obsv(A, C);  % 'Ob' for Observability matrix
rank_Ob = rank(Ob);

% If rank_Ob equals the number of states, the system is observable.

The CTMS page you looked at earlier also covers observability right after controllability, providing a good textual summary.

Test your understanding!

Consider a 3-state MIMO system with 2 inputs and 2 outputs, defined by the following matrices:

  1. What MATLAB commands would you use to check for controllability and observability?
  2. What is the required rank of the controllability and observability matrices for this system to be fully controllable and observable?
Show answer
  1. The MATLAB commands would be:

    • For Controllability: rank(ctrb(A, B))
    • For Observability: rank(obsv(A, C))
  2. The system has 3 states (, since is a 3x3 matrix). Therefore, for the system to be both controllable and observable, the rank of both the controllability matrix and the observability matrix must be 3.


Conclusion

In this lesson, you've learned how to perform one of the most fundamental analyses in control theory. These checks are a mandatory first step before attempting to design a state-feedback controller or a state observer.

Key Takeaways:

  • Controllability determines if the inputs can steer the system to any desired state. It is tested by checking if , where .
  • Observability determines if the internal states can be deduced from the system's outputs. It is tested by checking if , where .
  • These properties are inherent to the system model ( matrices) and are prerequisites for designing effective controllers and estimators.

Preview of the Next Lesson:
We've established that the inverted pendulum system is indeed controllable and observable (with the right sensors). Now we can proceed. In the previous lesson, you learned how to find the transfer function matrix . Our next lesson will focus on using this matrix to identify coupling between different input-output channels. This will help us understand how, for example, a command to control the arm angle might undesirably affect the pendulum angle, and vice-versa.