Main Content

Arithmetic Operations on Matrix Signals

This example shows how to perform arithmetic operations on signals carrying matrix and vector data.

In this example, the model performs a series of matrix operations on the input matrices and vectors to transform a system with state-space representation to its controllable canonical form, also known as phase variable form. The phase variable form provides a simplified representation of the system that eases the controllability analysis and helps in model reduction.

The canonicalform model contains the following components that show different mathematical operations.

  • Input data

  • Multiplication

  • Inverse

  • Canonical Form

Open the model.


Matrix Operations.

Input Data

The Input data component represents the input matrix and vectors in state-space form.



In this example, A is 3-by-3 matrix that represents the system, B is 3-by-1 input vector, C is 3-by-1 output vector, and the model assumes D to be 0.

Input data.


The controllability matrix for the state-space system is defined as:

Q=[BABA2B.....An-1B], where n represents the number of states.

The Multiplication component computes the controllability matrix Q from the state-space system.

Multiplication operations for controllability matrix Q.

Controllable Canonical Form

The model modifies the state-space equation using the substitution x=P-1z and D=0 as:



In these equations, P=[P1P1AP1A2], where P1 is the last row of Qinv. The Inverse component computes the inverse of the controllability matrix Q and transformation matrix P.

P Matrix computation.

The equation is further simplified as:



where A0=PAP-1, B0=PB, and C0=CP-1 .

The Canonical Form component computes the canonical form of the state-space system.

Simulate the model and visualize A0, B0, C0 using Display blocks.


Inverse operations and substitutions renders the canonical form.

See Also

| | | | |

Related Topics


[1] Ramaswami, B., and K. Ramar. "Transformation to the phase-variable canonical form."IEEE Transactions on Automatic Control, vol.13, no. 6, Dec. 1968, pp.42-47. (Crossref)