Controllability Matrix Calculator
Test cases replayed : 4 of 4 match · Methodology · No outside source listed
Enter the state matrix A and the input vector B of a linear system x' = Ax + Bu with one input. The calculator builds the controllability matrix and applies the Kalman rank test.
Result
Is the system controllable?
Rank of the controllability matrix
- Determinant of the controllability matrix
- Controllability matrix, row 1
- Controllability matrix, row 2
- Controllability matrix, row 3
Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.
This browser did not allow copying. The sentence is in the box below, already selected: copy it with your keyboard or the menu.
How to use this calculator
Fill in the fields in this order; each step takes you to its field.
- Number of states (n): choose 2 states or 3 states.
- A row 1, column 1: enter a number.
- A row 1, column 2: enter a number.
- A row 1, column 3 (3 states only): enter a number.
- A row 2, column 1: enter a number.
- A row 2, column 2: enter a number.
- A row 2, column 3 (3 states only): enter a number.
- A row 3, column 1 (3 states only): enter a number.
- A row 3, column 2 (3 states only): enter a number.
- A row 3, column 3 (3 states only): enter a number.
- B row 1: enter a number.
- B row 2: enter a number.
- B row 3 (3 states only): enter a number.
- Read the result: Is the system controllable?; the panel also shows Rank of the controllability matrix, Determinant of the controllability matrix, Controllability matrix, row 1, Controllability matrix, row 2 and Controllability matrix, row 3.
How this calculator works
For the linear time-invariant system x' = Ax + Bu with n states, the controllability matrix is C = [B AB A²B … Aⁿ⁻¹B]. With one input, C is n × n: [B AB] for 2 states, [B AB A²B] for 3 states.
Kalman rank test (R. E. Kalman, 1960): the system is controllable exactly when C has rank n. With one input, that is when the determinant of C is not zero.
The rank is found from the determinant, the 2 × 2 minors and the entries of C. A determinant, minor or entry whose absolute value is 10⁻⁹ or less counts as zero, so enter values in a sensible scale. With 2 states, the third row and column of A and B are ignored.
Worked example
| Number of states (n) | 3 states |
|---|---|
| A row 1, column 1 | 0 |
| A row 1, column 2 | 1 |
| A row 1, column 3 (3 states only) | 0 |
| A row 2, column 1 | 0 |
| A row 2, column 2 | 0 |
| A row 2, column 3 (3 states only) | 1 |
| A row 3, column 1 (3 states only) | -6 |
| A row 3, column 2 (3 states only) | -11 |
| A row 3, column 3 (3 states only) | -6 |
| B row 1 | 0 |
| B row 2 | 0 |
| B row 3 (3 states only) | 1 |
| Is the system controllable? | Yes, controllable (full rank) |
|---|---|
| Rank of the controllability matrix | 3 |
| Determinant of the controllability matrix | -1 |
| Controllability matrix, row 1 | [ 0, 0, 1 ] |
| Controllability matrix, row 2 | [ 0, 1, -6 ] |
| Controllability matrix, row 3 | [ 1, -6, 25 ] |
Frequently asked questions
What does controllable mean?
That some input u(t) can move the state from any starting point to any final point in finite time.
What if my system has several inputs?
Then C has n rows and n × m columns, and the test is still rank n. This page handles one input; for several inputs, compute the rank of the wider matrix.
How is this related to observability?
By duality, (A, C) is observable when (Aᵀ, Cᵀ) is controllable, so the same test on the transposed matrices checks observability.