Chapter 17: Observable and Modal Canonical Forms

Lesson 4: Transformations Between Physical and Modal Coordinates

This lesson develops the mathematical machinery for transforming a state-space model from physical coordinates to modal coordinates and back. We prove invariance of input-output behavior under similarity transformations, derive modal state equations, interpret modal participation, and implement the transformation in Python, C++, Java, MATLAB/Simulink, and Wolfram Mathematica.

1. Physical Coordinates versus Modal Coordinates

A state vector written in physical coordinates usually consists of variables with direct engineering interpretation, such as displacement, velocity, current, voltage, pressure, or temperature. A state vector written in modal coordinates consists of amplitudes of independent dynamical modes when the state matrix is diagonalizable.

Consider the continuous-time LTI system \( \dot{\mathbf{x} }=\mathbf{A}\mathbf{x}+\mathbf{B}\mathbf{u} \), \( \mathbf{y}=\mathbf{C}\mathbf{x}+\mathbf{D}\mathbf{u} \), where \( \mathbf{x}\in\mathbb{R}^{n} \). A nonsingular coordinate transformation is defined by

\[ \mathbf{x}=\mathbf{T}\mathbf{z},\qquad \mathbf{z}=\mathbf{T}^{-1}\mathbf{x},\qquad \det(\mathbf{T})\neq 0. \]

Here \( \mathbf{x} \) is the physical-coordinate state, \( \mathbf{z} \) is the transformed state, and \( \mathbf{T} \) is the change-of-basis matrix. In modal coordinates, \( \mathbf{T} \) is usually chosen as the eigenvector matrix of \( \mathbf{A} \).

flowchart TD
  X["Physical model: x_dot = A x + B u, y = C x + D u"] --> T["Choose nonsingular T"]
  T --> Z["Coordinate map: x = T z"]
  Z --> M["Modal model: z_dot = Tinv A T z + Tinv B u"]
  M --> Y["Output map: y = C T z + D u"]
  Y --> I["Input-output behavior unchanged"]
        

2. General Similarity Transformation of a State-Space Model

Substitute \( \mathbf{x}=\mathbf{T}\mathbf{z} \) into the physical-coordinate model. Since \( \mathbf{T} \) is constant,

\[ \dot{\mathbf{x} }=\mathbf{T}\dot{\mathbf{z} }. \]

Therefore,

\[ \mathbf{T}\dot{\mathbf{z} } = \mathbf{A}\mathbf{T}\mathbf{z}+\mathbf{B}\mathbf{u}. \]

Premultiplying by \( \mathbf{T}^{-1} \) gives the transformed state equation:

\[ \dot{\mathbf{z} } = \underbrace{\mathbf{T}^{-1}\mathbf{A}\mathbf{T} }_{\mathbf{A}_z} \mathbf{z} + \underbrace{\mathbf{T}^{-1}\mathbf{B} }_{\mathbf{B}_z} \mathbf{u}. \]

The output equation becomes

\[ \mathbf{y} = \mathbf{C}\mathbf{T}\mathbf{z}+\mathbf{D}\mathbf{u} = \underbrace{\mathbf{C}\mathbf{T} }_{\mathbf{C}_z}\mathbf{z} + \mathbf{D}\mathbf{u}. \]

Hence the transformed realization is

\[ (\mathbf{A},\mathbf{B},\mathbf{C},\mathbf{D}) \quad \sim \quad (\mathbf{A}_z,\mathbf{B}_z,\mathbf{C}_z,\mathbf{D}) = \left( \mathbf{T}^{-1}\mathbf{A}\mathbf{T}, \mathbf{T}^{-1}\mathbf{B}, \mathbf{C}\mathbf{T}, \mathbf{D} \right). \]

The matrix \( \mathbf{A}_z \) is similar to \( \mathbf{A} \). Therefore, the eigenvalues of the state matrix are preserved:

\[ \det(s\mathbf{I}-\mathbf{A}_z) = \det\!\left(s\mathbf{I}-\mathbf{T}^{-1}\mathbf{A}\mathbf{T}\right) = \det\!\left(\mathbf{T}^{-1}(s\mathbf{I}-\mathbf{A})\mathbf{T}\right) = \det(s\mathbf{I}-\mathbf{A}). \]

3. Modal Transformation for Distinct Eigenvalues

Suppose \( \mathbf{A}\in\mathbb{R}^{n\times n} \) has \( n \) linearly independent eigenvectors \( \mathbf{v}_1,\dots,\mathbf{v}_n \) with eigenvalues \( \lambda_1,\dots,\lambda_n \). Define

\[ \mathbf{T} = \begin{bmatrix} \mathbf{v}_1 & \mathbf{v}_2 & \cdots & \mathbf{v}_n \end{bmatrix}. \]

Since \( \mathbf{A}\mathbf{v}_i=\lambda_i\mathbf{v}_i \),

\[ \mathbf{A}\mathbf{T} = \begin{bmatrix} \mathbf{A}\mathbf{v}_1 & \mathbf{A}\mathbf{v}_2 & \cdots & \mathbf{A}\mathbf{v}_n \end{bmatrix} = \begin{bmatrix} \lambda_1\mathbf{v}_1 & \lambda_2\mathbf{v}_2 & \cdots & \lambda_n\mathbf{v}_n \end{bmatrix} = \mathbf{T}\boldsymbol{\Lambda}, \]

where

\[ \boldsymbol{\Lambda} = \operatorname{diag}(\lambda_1,\lambda_2,\dots,\lambda_n). \]

Premultiplying \( \mathbf{A}\mathbf{T}=\mathbf{T}\boldsymbol{\Lambda} \) by \( \mathbf{T}^{-1} \) gives

\[ \mathbf{T}^{-1}\mathbf{A}\mathbf{T} = \boldsymbol{\Lambda}. \]

Therefore, in modal coordinates,

\[ \dot{\mathbf{z} } = \boldsymbol{\Lambda}\mathbf{z} + \mathbf{B}_m\mathbf{u}, \qquad \mathbf{y} = \mathbf{C}_m\mathbf{z} + \mathbf{D}\mathbf{u}, \]

with

\[ \mathbf{B}_m=\mathbf{T}^{-1}\mathbf{B}, \qquad \mathbf{C}_m=\mathbf{C}\mathbf{T}. \]

If \( \mathbf{u}=\mathbf{0} \), then the modal states satisfy decoupled scalar equations:

\[ \dot{z}_i=\lambda_i z_i,\qquad z_i(t)=e^{\lambda_i t}z_i(0),\qquad i=1,\dots,n. \]

4. Physical Interpretation of Modal States

Modal coordinates separate a state trajectory into modal amplitudes. If \( \mathbf{x}(0)=\mathbf{x}_0 \), then

\[ \mathbf{z}(0)=\mathbf{T}^{-1}\mathbf{x}_0. \]

Let \( \mathbf{w}_i^T \) denote row \( i \) of \( \mathbf{T}^{-1} \). Then

\[ z_i(0)=\mathbf{w}_i^T\mathbf{x}_0. \]

Thus \( z_i(0) \) is the amplitude of the \( i \)-th mode in the initial condition. The homogeneous physical state is reconstructed by

\[ \mathbf{x}(t) = \mathbf{T}e^{\boldsymbol{\Lambda}t}\mathbf{z}(0) = \sum_{i=1}^{n} \mathbf{v}_i e^{\lambda_i t} z_i(0). \]

The output contribution of mode \( i \) is weighted by \( \mathbf{C}\mathbf{v}_i \). Therefore,

\[ \mathbf{y}(t) = \sum_{i=1}^{n} \mathbf{C}\mathbf{v}_i e^{\lambda_i t} z_i(0) \quad \text{for } \mathbf{u}=\mathbf{0},\; \mathbf{D}=\mathbf{0}. \]

This expression explains why a mode may exist internally but appear weak at the output: its output direction \( \mathbf{C}\mathbf{v}_i \) may be small. Conversely, an input excites mode \( i \) according to the corresponding row of \( \mathbf{T}^{-1}\mathbf{B} \).

5. Proof: Transfer Function is Invariant Under Coordinate Transformation

The transfer matrix of the physical realization is

\[ \mathbf{G}(s) = \mathbf{C}(s\mathbf{I}-\mathbf{A})^{-1}\mathbf{B} + \mathbf{D}. \]

The transfer matrix of the transformed realization is

\[ \mathbf{G}_z(s) = \mathbf{C}_z(s\mathbf{I}-\mathbf{A}_z)^{-1}\mathbf{B}_z + \mathbf{D}. \]

Substitute \( \mathbf{A}_z=\mathbf{T}^{-1}\mathbf{A}\mathbf{T} \), \( \mathbf{B}_z=\mathbf{T}^{-1}\mathbf{B} \), and \( \mathbf{C}_z=\mathbf{C}\mathbf{T} \):

\[ \begin{aligned} \mathbf{G}_z(s) &= \mathbf{C}\mathbf{T} \left( s\mathbf{I}-\mathbf{T}^{-1}\mathbf{A}\mathbf{T} \right)^{-1} \mathbf{T}^{-1}\mathbf{B} + \mathbf{D}. \end{aligned} \]

Since \( s\mathbf{I}-\mathbf{T}^{-1}\mathbf{A}\mathbf{T} = \mathbf{T}^{-1}(s\mathbf{I}-\mathbf{A})\mathbf{T} \),

\[ \left( s\mathbf{I}-\mathbf{T}^{-1}\mathbf{A}\mathbf{T} \right)^{-1} = \mathbf{T}^{-1}(s\mathbf{I}-\mathbf{A})^{-1}\mathbf{T}. \]

Therefore,

\[ \begin{aligned} \mathbf{G}_z(s) &= \mathbf{C}\mathbf{T} \mathbf{T}^{-1}(s\mathbf{I}-\mathbf{A})^{-1} \mathbf{T}\mathbf{T}^{-1}\mathbf{B} + \mathbf{D} \\ &= \mathbf{C}(s\mathbf{I}-\mathbf{A})^{-1}\mathbf{B} + \mathbf{D} = \mathbf{G}(s). \end{aligned} \]

Thus, a similarity transformation changes the internal coordinates but not the external input-output map.

flowchart TD
  A["Physical coordinates x"] --> B["Compute T from eigenvectors or chosen basis"]
  B --> C["z = Tinv x"]
  C --> D["Az = Tinv A T"]
  D --> E["Bz = Tinv B, Cz = C T"]
  E --> F["Analyze modes in z coordinates"]
  F --> G["Recover physical state: x = T z"]
        

6. State Transition Matrix in Modal Coordinates

The physical homogeneous solution is

\[ \mathbf{x}(t)=e^{\mathbf{A}t}\mathbf{x}(0). \]

If \( \mathbf{A}=\mathbf{T}\boldsymbol{\Lambda}\mathbf{T}^{-1} \), then

\[ e^{\mathbf{A}t} = e^{\mathbf{T}\boldsymbol{\Lambda}\mathbf{T}^{-1}t} = \mathbf{T}e^{\boldsymbol{\Lambda}t}\mathbf{T}^{-1}. \]

Because \( \boldsymbol{\Lambda} \) is diagonal,

\[ e^{\boldsymbol{\Lambda}t} = \operatorname{diag} \left( e^{\lambda_1 t}, e^{\lambda_2 t}, \dots, e^{\lambda_n t} \right). \]

Therefore, modal coordinates convert matrix-exponential computation into scalar exponential computation when \( \mathbf{A} \) is diagonalizable.

\[ \mathbf{z}(t)=e^{\boldsymbol{\Lambda}t}\mathbf{z}(0), \qquad \mathbf{x}(t)=\mathbf{T}e^{\boldsymbol{\Lambda}t}\mathbf{T}^{-1}\mathbf{x}(0). \]

7. Worked Numerical Example

Consider the second-order system

\[ \dot{\mathbf{x} } = \begin{bmatrix} 0 & 1\\ -2 & -3 \end{bmatrix} \mathbf{x} + \begin{bmatrix} 0\\ 1 \end{bmatrix}u, \qquad y= \begin{bmatrix} 1 & 0 \end{bmatrix}\mathbf{x}. \]

The characteristic polynomial is

\[ \det(\lambda\mathbf{I}-\mathbf{A}) = \lambda^2+3\lambda+2 = (\lambda+1)(\lambda+2). \]

Hence \( \lambda_1=-1 \) and \( \lambda_2=-2 \). Corresponding eigenvectors may be chosen as

\[ \mathbf{v}_1= \begin{bmatrix} 1\\ -1 \end{bmatrix}, \qquad \mathbf{v}_2= \begin{bmatrix} 1\\ -2 \end{bmatrix}. \]

Therefore,

\[ \mathbf{T} = \begin{bmatrix} 1 & 1\\ -1 & -2 \end{bmatrix}, \qquad \mathbf{T}^{-1} = \begin{bmatrix} 2 & 1\\ -1 & -1 \end{bmatrix}. \]

The modal state matrix is

\[ \boldsymbol{\Lambda} = \mathbf{T}^{-1}\mathbf{A}\mathbf{T} = \begin{bmatrix} -1 & 0\\ 0 & -2 \end{bmatrix}. \]

Also,

\[ \mathbf{B}_m = \mathbf{T}^{-1}\mathbf{B} = \begin{bmatrix} 1\\ -1 \end{bmatrix}, \qquad \mathbf{C}_m = \mathbf{C}\mathbf{T} = \begin{bmatrix} 1 & 1 \end{bmatrix}. \]

Hence the modal equations are

\[ \begin{aligned} \dot{z}_1 &= -z_1 + u,\\ \dot{z}_2 &= -2z_2 - u,\\ y &= z_1+z_2. \end{aligned} \]

For the initial condition \( \mathbf{x}(0)=\begin{bmatrix}2 & -1\end{bmatrix}^T \),

\[ \mathbf{z}(0) = \mathbf{T}^{-1}\mathbf{x}(0) = \begin{bmatrix} 2 & 1\\ -1 & -1 \end{bmatrix} \begin{bmatrix} 2\\ -1 \end{bmatrix} = \begin{bmatrix} 3\\ -1 \end{bmatrix}. \]

With \( u=0 \), the modal solution is

\[ z_1(t)=3e^{-t}, \qquad z_2(t)=-e^{-2t}. \]

The physical state is recovered by

\[ \mathbf{x}(t) = \mathbf{T}\mathbf{z}(t) = \begin{bmatrix} 3e^{-t}-e^{-2t}\\ -3e^{-t}+2e^{-2t} \end{bmatrix}. \]

8. Real Modal Coordinates for Complex Conjugate Eigenvalues

If a real matrix \( \mathbf{A} \) has a complex pair \( \lambda,\bar{\lambda}=\alpha\pm j\beta \), then the complex modal form is diagonal over \( \mathbb{C} \). However, engineering state variables are often kept real. If \( \mathbf{v}=\mathbf{p}+j\mathbf{q} \) is a complex eigenvector, one can use the real basis \( \mathbf{p},\mathbf{q} \). The corresponding real modal block is

\[ \begin{bmatrix} \dot{z}_1\\ \dot{z}_2 \end{bmatrix} = \begin{bmatrix} \alpha & \beta\\ -\beta & \alpha \end{bmatrix} \begin{bmatrix} z_1\\ z_2 \end{bmatrix}. \]

This block represents exponentially weighted oscillation. The decay or growth rate is controlled by \( \alpha \), and the oscillation frequency is controlled by \( \beta \).

\[ e^{\alpha t} \begin{bmatrix} \cos(\beta t) & \sin(\beta t)\\ -\sin(\beta t) & \cos(\beta t) \end{bmatrix} \]

The detailed treatment of non-diagonalizable repeated eigenvalues is postponed to the next chapter, where Jordan chains are introduced.

9. Software Implementations and Library Notes

The core computational steps are: compute eigenvectors, assemble \( \mathbf{T} \), check conditioning, compute \( \mathbf{T}^{-1}\mathbf{A}\mathbf{T} \), \( \mathbf{T}^{-1}\mathbf{B} \), and \( \mathbf{C}\mathbf{T} \). Recommended libraries are:

  • Python: NumPy, SciPy, python-control, slycot.
  • C++: Eigen, Armadillo, Blaze, LAPACK/SLICOT bindings.
  • Java: EJML, Apache Commons Math, Hipparchus, ojAlgo.
  • MATLAB/Simulink: Control System Toolbox, Simulink, Symbolic Math Toolbox.
  • Wolfram Mathematica: Eigensystem, MatrixExp, StateSpaceModel, TransferFunctionModel.

Numerically, a modal transformation is reliable only when \( \mathbf{T} \) is not ill-conditioned:

\[ \kappa(\mathbf{T}) = \|\mathbf{T}\|\|\mathbf{T}^{-1}\|. \]

Large \( \kappa(\mathbf{T}) \) means that small perturbations in physical coordinates may become large perturbations in modal coordinates.

10. Python Implementation

Chapter17_Lesson4.py


"""
Chapter17_Lesson4.py
Transformations Between Physical and Modal Coordinates
"""

import numpy as np


def modal_transform(A: np.ndarray, B: np.ndarray, C: np.ndarray, D: np.ndarray):
    eigvals, T = np.linalg.eig(A)
    if abs(np.linalg.det(T)) < 1e-10:
        raise ValueError("Eigenvector matrix is nearly singular.")
    T_inv = np.linalg.inv(T)
    Lambda = T_inv @ A @ T
    Bm = T_inv @ B
    Cm = C @ T
    return eigvals, T, T_inv, Lambda, Bm, Cm, D


def transfer_value(A, B, C, D, s: complex):
    n = A.shape[0]
    return C @ np.linalg.inv(s * np.eye(n) - A) @ B + D


def main():
    A = np.array([[0.0, 1.0], [-2.0, -3.0]])
    B = np.array([[0.0], [1.0]])
    C = np.array([[1.0, 0.0]])
    D = np.array([[0.0]])

    eigvals, T, T_inv, Lambda, Bm, Cm, Dm = modal_transform(A, B, C, D)

    print("Eigenvalues:")
    print(eigvals)
    print("\nT:")
    print(T)
    print("\nT_inv:")
    print(T_inv)
    print("\nLambda = T_inv A T:")
    print(Lambda)
    print("\nBm = T_inv B:")
    print(Bm)
    print("\nCm = C T:")
    print(Cm)

    x0 = np.array([[2.0], [-1.0]])
    z0 = T_inv @ x0
    x0_recovered = T @ z0

    print("\nx0:")
    print(x0)
    print("z0 = T_inv x0:")
    print(z0)
    print("T z0:")
    print(x0_recovered)

    s = 1.0 + 0.5j
    G_phys = transfer_value(A, B, C, D, s)
    G_modal = transfer_value(Lambda, Bm, Cm, Dm, s)

    print("\nG_phys(s):", G_phys)
    print("G_modal(s):", G_modal)
    print("difference norm:", np.linalg.norm(G_phys - G_modal))


if __name__ == "__main__":
    main()
      

11. C++ Implementation

Chapter17_Lesson4.cpp


#include <iostream>
#include <array>
#include <iomanip>

using Mat2 = std::array<std::array<double, 2>, 2>;
using Vec2 = std::array<double, 2>;

Mat2 multiply(const Mat2& A, const Mat2& B) {
    Mat2 C{};
    for (int i = 0; i < 2; ++i)
        for (int j = 0; j < 2; ++j)
            for (int k = 0; k < 2; ++k)
                C[i][j] += A[i][k] * B[k][j];
    return C;
}

Vec2 multiply(const Mat2& A, const Vec2& x) {
    Vec2 y{};
    for (int i = 0; i < 2; ++i)
        for (int k = 0; k < 2; ++k)
            y[i] += A[i][k] * x[k];
    return y;
}

Mat2 inverse2x2(const Mat2& A) {
    double det = A[0][0] * A[1][1] - A[0][1] * A[1][0];
    if (det > -1e-12 && det < 1e-12) {
        throw std::runtime_error("Matrix is singular or nearly singular.");
    }
    return Mat2{ {
        { { A[1][1] / det, -A[0][1] / det } },
        { {-A[1][0] / det,  A[0][0] / det } }
    } };
}

int main() {
    Mat2 A{ { { {0.0, 1.0} }, { {-2.0, -3.0} } } };
    Mat2 T{ { { {1.0, 1.0} }, { {-1.0, -2.0} } } };
    Mat2 Tinv = inverse2x2(T);
    Mat2 Lambda = multiply(multiply(Tinv, A), T);

    Vec2 B{0.0, 1.0};
    Vec2 Bm = multiply(Tinv, B);
    Vec2 Cm{T[0][0], T[0][1]};

    Vec2 x0{2.0, -1.0};
    Vec2 z0 = multiply(Tinv, x0);
    Vec2 x0Recovered = multiply(T, z0);

    std::cout << std::fixed << std::setprecision(5);
    std::cout << "Lambda = [[" << Lambda[0][0] << ", "
              << Lambda[0][1] << "], ["
              << Lambda[1][0] << ", "
              << Lambda[1][1] << "]]\n";
    std::cout << "Bm = [" << Bm[0] << ", " << Bm[1] << "]^T\n";
    std::cout << "Cm = [" << Cm[0] << ", " << Cm[1] << "]\n";
    std::cout << "z0 = [" << z0[0] << ", " << z0[1] << "]^T\n";
    std::cout << "T z0 = [" << x0Recovered[0] << ", "
              << x0Recovered[1] << "]^T\n";

    return 0;
}
      

12. Java Implementation

Chapter17_Lesson4.java


public class Chapter17_Lesson4 {
    static double[][] multiply(double[][] A, double[][] B) {
        double[][] C = new double[A.length][B[0].length];
        for (int i = 0; i < A.length; i++) {
            for (int j = 0; j < B[0].length; j++) {
                for (int k = 0; k < B.length; k++) {
                    C[i][j] += A[i][k] * B[k][j];
                }
            }
        }
        return C;
    }

    static double[] multiply(double[][] A, double[] x) {
        double[] y = new double[A.length];
        for (int i = 0; i < A.length; i++) {
            for (int k = 0; k < x.length; k++) {
                y[i] += A[i][k] * x[k];
            }
        }
        return y;
    }

    static double[][] inverse2x2(double[][] A) {
        double det = A[0][0] * A[1][1] - A[0][1] * A[1][0];
        if (Math.abs(det) < 1e-12) {
            throw new IllegalArgumentException("Matrix is singular.");
        }
        return new double[][] {
            { A[1][1] / det, -A[0][1] / det },
            {-A[1][0] / det,  A[0][0] / det }
        };
    }

    public static void main(String[] args) {
        double[][] A = { {0.0, 1.0}, {-2.0, -3.0} };
        double[][] T = { {1.0, 1.0}, {-1.0, -2.0} };

        double[][] Tinv = inverse2x2(T);
        double[][] Lambda = multiply(multiply(Tinv, A), T);

        double[] B = {0.0, 1.0};
        double[] Bm = multiply(Tinv, B);
        double[] Cm = {T[0][0], T[0][1]};

        double[] x0 = {2.0, -1.0};
        double[] z0 = multiply(Tinv, x0);
        double[] x0Recovered = multiply(T, z0);

        System.out.printf("Lambda = [[%.5f, %.5f], [%.5f, %.5f]]%n",
                Lambda[0][0], Lambda[0][1], Lambda[1][0], Lambda[1][1]);
        System.out.printf("Bm = [%.5f, %.5f]^T%n", Bm[0], Bm[1]);
        System.out.printf("Cm = [%.5f, %.5f]%n", Cm[0], Cm[1]);
        System.out.printf("z0 = [%.5f, %.5f]^T%n", z0[0], z0[1]);
        System.out.printf("T z0 = [%.5f, %.5f]^T%n", x0Recovered[0], x0Recovered[1]);
    }
}
      

13. MATLAB/Simulink Implementation

Chapter17_Lesson4.m


% Chapter17_Lesson4.m
% Transformations Between Physical and Modal Coordinates

clear; clc;

A = [0 1; -2 -3];
B = [0; 1];
C = [1 0];
D = 0;

[T, Lambda] = eig(A);
Tinv = inv(T);
Bm = Tinv * B;
Cm = C * T;

fprintf('T:'); disp(T);
fprintf('Lambda = inv(T)*A*T:'); disp(Tinv * A * T);
fprintf('Bm = inv(T)*B:'); disp(Bm);
fprintf('Cm = C*T:'); disp(Cm);

x0 = [2; -1];
z0 = Tinv * x0;
x0_recovered = T * z0;

disp('z0 = inv(T)*x0:'); disp(z0);
disp('T*z0:'); disp(x0_recovered);

s = 1 + 0.5i;
G_phys = C * inv(s*eye(size(A)) - A) * B + D;
G_modal = Cm * inv(s*eye(size(Lambda)) - Lambda) * Bm + D;

fprintf('G_phys(s)  = %.8f%+.8fi\n', real(G_phys), imag(G_phys));
fprintf('G_modal(s) = %.8f%+.8fi\n', real(G_modal), imag(G_modal));
fprintf('Difference norm = %.3e\n', norm(G_phys - G_modal));

% Optional Simulink model generation:
createSimulinkModel = false;
if createSimulinkModel
    model = 'Chapter17_Lesson4_Simulink';
    new_system(model); open_system(model);

    add_block('simulink/Sources/Step', [model '/Step']);
    add_block('simulink/Continuous/State-Space', [model '/Physical_State_Space']);
    add_block('simulink/Continuous/State-Space', [model '/Modal_State_Space']);

    set_param([model '/Physical_State_Space'], 'A', 'A', 'B', 'B', 'C', 'C', 'D', 'D');
    set_param([model '/Modal_State_Space'], 'A', 'Lambda', 'B', 'Bm', 'C', 'Cm', 'D', 'D');

    add_block('simulink/Sinks/Scope', [model '/Scope_Physical']);
    add_block('simulink/Sinks/Scope', [model '/Scope_Modal']);

    add_line(model, 'Step/1', 'Physical_State_Space/1');
    add_line(model, 'Step/1', 'Modal_State_Space/1');
    add_line(model, 'Physical_State_Space/1', 'Scope_Physical/1');
    add_line(model, 'Modal_State_Space/1', 'Scope_Modal/1');

    save_system(model);
end
      

14. Wolfram Mathematica Implementation

Chapter17_Lesson4.nb


ClearAll["Global`*"]

A = { {0, 1}, {-2, -3} };
B = { {0}, {1} };
Cmat = { {1, 0} };
Dmat = { {0} };

{eigVals, eigVecs} = Eigensystem[A];

T = Transpose[eigVecs];
Tinv = Inverse[T];

Lambda = Simplify[Tinv . A . T];
Bm = Simplify[Tinv . B];
Cm = Simplify[Cmat . T];

MatrixForm /@ {T, Tinv, Lambda, Bm, Cm}

x0 = { {2}, {-1} };
z0 = Simplify[Tinv . x0];
x0Recovered = Simplify[T . z0];

MatrixForm /@ {z0, x0Recovered}

s = 1 + I/2;
Gphys = Simplify[Cmat . Inverse[s IdentityMatrix[2] - A] . B + Dmat];
Gmodal = Simplify[Cm . Inverse[s IdentityMatrix[2] - Lambda] . Bm + Dmat];

{Gphys, Gmodal, FullSimplify[Gphys == Gmodal]}

stateSolutionPhysical[t_] = MatrixExp[A t] . x0;
stateSolutionModal[t_] = T . MatrixExp[Lambda t] . z0;

FullSimplify[stateSolutionPhysical[t] == stateSolutionModal[t]]
      

15. Problems and Solutions

Problem 1: Given \( \dot{\mathbf{x} }=\mathbf{A}\mathbf{x}+\mathbf{B}\mathbf{u} \) and \( \mathbf{x}=\mathbf{T}\mathbf{z} \), derive the transformed matrices \( \mathbf{A}_z \) and \( \mathbf{B}_z \).

Solution:

\[ \mathbf{T}\dot{\mathbf{z} } = \mathbf{A}\mathbf{T}\mathbf{z}+\mathbf{B}\mathbf{u}. \]

\[ \dot{\mathbf{z} } = \mathbf{T}^{-1}\mathbf{A}\mathbf{T}\mathbf{z} + \mathbf{T}^{-1}\mathbf{B}\mathbf{u}. \]

Therefore, \( \mathbf{A}_z=\mathbf{T}^{-1}\mathbf{A}\mathbf{T} \) and \( \mathbf{B}_z=\mathbf{T}^{-1}\mathbf{B} \).

Problem 2: Prove that \( \mathbf{A} \) and \( \mathbf{A}_z=\mathbf{T}^{-1}\mathbf{A}\mathbf{T} \) have the same characteristic polynomial.

Solution:

\[ \begin{aligned} \det(\lambda\mathbf{I}-\mathbf{A}_z) &= \det(\lambda\mathbf{I}-\mathbf{T}^{-1}\mathbf{A}\mathbf{T})\\ &= \det(\mathbf{T}^{-1}(\lambda\mathbf{I}-\mathbf{A})\mathbf{T})\\ &= \det(\mathbf{T}^{-1}) \det(\lambda\mathbf{I}-\mathbf{A}) \det(\mathbf{T})\\ &= \det(\lambda\mathbf{I}-\mathbf{A}). \end{aligned} \]

Problem 3: For \( \mathbf{A}=\begin{bmatrix}0 & 1\\ -6 & -5\end{bmatrix} \), find a modal transformation.

Solution: The characteristic polynomial is

\[ \lambda^2+5\lambda+6=(\lambda+2)(\lambda+3). \]

For \( \lambda_1=-2 \), choose \( \mathbf{v}_1=\begin{bmatrix}1\\-2\end{bmatrix} \). For \( \lambda_2=-3 \), choose \( \mathbf{v}_2=\begin{bmatrix}1\\-3\end{bmatrix} \). Hence

\[ \mathbf{T} = \begin{bmatrix} 1 & 1\\ -2 & -3 \end{bmatrix}, \qquad \mathbf{T}^{-1}\mathbf{A}\mathbf{T} = \begin{bmatrix} -2 & 0\\ 0 & -3 \end{bmatrix}. \]

Problem 4: Let \( \mathbf{x}(0)=\mathbf{T}\mathbf{z}(0) \). Show that the homogeneous physical-coordinate solution can be reconstructed from modal amplitudes.

Solution:

\[ \mathbf{z}(t)=e^{\boldsymbol{\Lambda}t}\mathbf{z}(0). \]

Since \( \mathbf{x}(t)=\mathbf{T}\mathbf{z}(t) \),

\[ \mathbf{x}(t) = \mathbf{T}e^{\boldsymbol{\Lambda}t}\mathbf{z}(0) = \sum_{i=1}^{n}\mathbf{v}_i e^{\lambda_i t}z_i(0). \]

Problem 5: Explain why a similarity transformation changes state variables but does not change the transfer function.

Solution: A similarity transformation is only a change of basis in the internal state space. The physical input \( \mathbf{u} \) and output \( \mathbf{y} \) remain the same. Algebraically,

\[ \mathbf{C}_z(s\mathbf{I}-\mathbf{A}_z)^{-1}\mathbf{B}_z+\mathbf{D} = \mathbf{C}(s\mathbf{I}-\mathbf{A})^{-1}\mathbf{B}+\mathbf{D}. \]

Therefore, the internal representation changes, but the input-output behavior is invariant.

16. Summary

A physical-coordinate model represents states in variables connected to the original engineering system, while a modal-coordinate model represents the same state trajectory as a combination of independent modes. The transformation \( \mathbf{x}=\mathbf{T}\mathbf{z} \) produces \( \mathbf{A}_z=\mathbf{T}^{-1}\mathbf{A}\mathbf{T} \), \( \mathbf{B}_z=\mathbf{T}^{-1}\mathbf{B} \), and \( \mathbf{C}_z=\mathbf{C}\mathbf{T} \). When \( \mathbf{T} \) is the eigenvector matrix, the state matrix becomes diagonal for distinct eigenvalues, allowing each modal coordinate to describe one independent exponential component. The eigenvalues, characteristic polynomial, transfer function, and input-output behavior are invariant under the transformation.

17. References

  1. Kalman, R.E. (1963). Mathematical description of linear dynamical systems. Journal of the Society for Industrial and Applied Mathematics, Series A: Control, 1(2), 152–192.
  2. Gilbert, E.G. (1963). Controllability and observability in multivariable control systems. Journal of the Society for Industrial and Applied Mathematics, Series A: Control, 1(2), 128–151.
  3. Luenberger, D.G. (1967). Canonical forms for linear multivariable systems. IEEE Transactions on Automatic Control, 12(3), 290–293.
  4. Rosenbrock, H.H. (1970). State-Space and Multivariable Theory. London: Nelson.
  5. Silverman, L.M. (1969). Inversion of multivariable linear systems. IEEE Transactions on Automatic Control, 14(3), 270–276.
  6. Kailath, T. (1970). The structure of linear systems. Proceedings of the IEEE, 58(2), 184–190.
  7. Popov, V.M. (1964). Hyperstability of control systems. Automation and Remote Control, 25, 937–946.
  8. Hautus, M.L.J. (1969). Controllability and observability conditions of linear autonomous systems. Nederlands Akademie van Wetenschappen, Proceedings, Series A, 72, 443–448.