Skip to main content

Welcome to a Grasp lesson

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

Lesson 15

MIMO State-Space to Transfer Function Matrix

Recommended resources

Hello! Welcome to the third lesson in our module on modeling and analyzing MIMO systems.

In the previous lessons, you've successfully formulated state-space equations for MIMO systems and, most importantly, derived the complete state-space model for the rotary inverted pendulum. We now have the system defined by the matrices .

Today, we'll bridge the gap between the time-domain state-space model and the frequency-domain transfer function representation. Our learning outcome is to derive the transfer function matrix from a MIMO state-space representation. This is a critical skill that allows you to analyze a system from a different perspective, one that should be familiar given your background in signal processing.

From State-Space to Transfer Function

The state-space representation gives us a set of first-order differential equations. The transfer function, on the other hand, provides an algebraic input-output relationship in the Laplace domain. For a MIMO system, this relationship is captured by a transfer function matrix.

The derivation is a straightforward algebraic process that starts by taking the Laplace transform of the state and output equations. The following video provides a clear, step-by-step walkthrough of this derivation.

System Dynamics and Control: Module 27c - Transforming to and from State-Space Form

Watch this segment from 'System Dynamics and Control' by Rick Hill. It explains how to derive the general formula for the transfer function from the state-space equations.

Please watch the video from the beginning until 6:25. Focus on how the state vector X(s) is isolated and then substituted into the output equation. Pay attention to the matrix algebra rules, especially the use of the identity matrix I.

Summary of the Derivation

As the video explained, we start with the standard state-space equations, assuming zero initial conditions (a requirement for transfer functions):

  1. Apply the Laplace Transform:

  2. Solve the state equation for :



    Note: We must use the identity matrix so that the matrix subtraction is valid.

  3. Substitute into the output equation:

  4. Factor out to find the relationship :

This gives us the final, powerful result. The transfer function matrix (TFM), , is:


The Structure of the Transfer Function Matrix

For a system with inputs and outputs, is a matrix. Each element represents the transfer function from the -th input to the -th output.

Transfer Function Matrix for MIMO Systems
This diagram illustrates how the transfer function matrix \(G(s)\) maps multiple inputs (\(u_1, ..., u_m\)) to multiple outputs (\(y_1, ..., y_p\)). Each output \(y_i(s)\) is the sum of the responses to each input, filtered by the corresponding transfer function \(G_{ij}(s)\).

For our rotary inverted pendulum, we have one input (motor voltage ) and two outputs (arm angle and pendulum angle ). Therefore, our TFM will be a matrix:

This matrix will explicitly tell us how the motor voltage affects both angles in the frequency domain.


A Manual Calculation Example

Let's solidify this with a simple single-input, single-output (SISO) example. The process involves three main steps:

  1. Construct the matrix .
  2. Find its inverse, .
  3. Perform the matrix multiplication .

The following video section works through a full example.

System Dynamics and Control: Module 27c - Transforming to and from State-Space Form

Now, watch the next part of the same video, where a 2x2 state-space model is converted into a transfer function.

Please watch from 7:25 to 13:19. The video provides a quick reminder of how to invert a 2x2 matrix, which is a useful technique to know.

A crucial point highlighted in the video is that the denominator of the transfer function is . The roots of the equation are the poles of the system, which are also the eigenvalues of the matrix . This is a fundamental concept in control theory: the system's poles determine its stability, a topic we will explore in depth in the next module.

Test your understanding!

Consider a simple system described by the following state-space matrices:

This system represents a simple second-order differential equation. Find its transfer function .

Show answer
  1. Form :

  2. Calculate the determinant and inverse:
    The determinant is .
    The inverse is:

  3. Compute :

    First, multiply with the matrix:

    Next, multiply by :

    The final transfer function is:


Using Computational Tools for Complex Systems

As you can imagine, manually inverting a 4x4 matrix for our pendulum model would be tedious and error-prone. In practice, engineers rely on computational software like MATLAB. This is perfectly aligned with your goal of learning practical techniques efficiently.

There are two main ways to do this in MATLAB:

  1. Symbolic Toolbox: Define s as a symbolic variable and perform the matrix operations as we did manually.
  2. Control System Toolbox: Define the system as a state-space object (ss) and then convert it directly to a transfer function object (tf). This is the most common and efficient method.

The following video demonstrates both approaches.

Convert State-Space Models into Transfer Functions with MATLAB Codes

This video from Aleksandar Haber shows how to perform the conversion in MATLAB. The first part shows the symbolic method, while the second shows the much simpler Control System Toolbox function.

Please watch from 11:39 to 15:57. Notice how the tf() function automates the entire derivation for you.

For your rotary inverted pendulum model, the MATLAB code would look like this (using the matrices A, B, C, D you derived previously):

% Define the state-space matrices A, B, C, D from your pendulum model
A = [...]; % 4x4 matrix
B = [...]; % 4x1 matrix
C = [...]; % 2x4 matrix
D = [...]; % 2x1 matrix

% Create a state-space system object
pendulum_ss = ss(A, B, C, D);

% Convert to a transfer function matrix
pendulum_tf = tf(pendulum_ss);

% Display the result
pendulum_tf

This simple command will give you the 2x1 transfer function matrix, neatly presenting and .


Conclusion

In this lesson, you have learned the crucial link between the state-space and transfer function representations for MIMO systems.

Key Takeaways:

  • The formula to convert from a state-space model to a transfer function matrix is .
  • The TFM is a matrix where is the number of outputs and is the number of inputs. Each element is a transfer function from input to output .
  • The poles of the system are the eigenvalues of the matrix, found by solving .
  • For complex systems, computational tools like MATLAB are essential for performing this conversion efficiently.

Preview of the Next Lesson:
We now have two powerful representations of our pendulum: state-space and transfer function. But before we can design a controller, we must ask a fundamental question: is our system even controllable? In the next lesson, we will analyze the controllability and observability of our MIMO system model. This will tell us whether it's theoretically possible to steer the system to a desired state and whether we can deduce all internal states by just looking at the outputs.