State Space Analysis — Controllability, Observability & Pole Placement
Enter matrices A, B, C, D to check controllability and observability, visualize eigenvalues on the s-plane, compute Ackermann state feedback gain K, and simulate closed-loop step response.
System order & presets
System matrices
A matrix (N×N)
B matrix (N×1)
C matrix (1×N)
D (scalar)
Desired closed-loop poles (pole placement)
Poles (comma-separated)
e.g. -2,-3 or -1+2j,-1-2j (complex-conjugate pair)
State-space trajectory (phase plane)
Draws the state trajectory from the initial state in real time. Eigenvalues in the LHP spiral into the origin (stable focus), in the RHP diverge, and on the imaginary axis give closed orbits (centre). Synchronised with y(t) below.
Presets:
—
Eigenvalues (poles)
—
Stability
—
Controllable?
—
Observable?
—
Natural angular frequency ωₙ
—
Damping ratio ζ
—
Current state
—
Time t
Output y(t) (synchronised with the trajectory)
Results
—
Controllability rank
—
Observability rank
—
Open-loop stability
—
Closed-loop stability
Poles
Step response
Theory & Key Formulas
State-space fundamentals
$$\dot{x}= Ax + Bu, \quad y = Cx + Du$$
Controllability matrix: $\mathcal{C}= [B \;|\; AB \;|\; A^2B \;|\; \ldots]$
What Is State-Space, Controllability and Observability Analysis?
🙋
What are "controllability" and "observability"? I have seen them in textbooks, but I do not really get what they let you do.
🎓
Roughly speaking, they are a kind of "health check": can you move a robot or machine the way you want (controllable), and can you tell its internal state from the outside (observable)? For example, enter some A, B and C matrices in this simulator and press "Analyze", and it immediately tells you whether the system is controllable and observable.
🙋
Really? So what do you do if it says "not controllable"? Does that mean you cannot control it as it is?
🎓
That's right. But it does not end there. In practice you might extract only the modes you want to control and consider partial control. In this tool, enter the desired pole locations in the "Desired closed-loop poles" field (for example -2,-3 or -1+2j,-1-2j) and it calculates the state feedback gain K automatically with Ackermann's formula. This only works when the system is controllable, though.
🙋
I see! What is the observability check used for? Is it related to observers?
🎓
Sharp! An observer is a "state estimator" that estimates internal states you cannot measure, and observability is the condition for designing one. This tool has no observer design function, but the observability rank tells you whether all the states can be estimated from the output y. Finally, look at the closed-loop response with the placed poles in the "Step response" tab. You will see that moving the poles further left makes the response faster.
Physical Model and Key Equations
A state-space model expresses the dynamic behaviour of a system as a set of first-order simultaneous differential equations. This is the starting point of every analysis.
$$\dot{x}(t) = A x(t) + B u(t), \quad y(t) = C x(t) + D u(t)$$
Controllability and observability are determined by checking the rank (number of independent rows or columns) of the following matrices, the controllability matrix $\mathcal{C}$ and the observability matrix $\mathcal{O}$, where $n$ is the number of states.
If $\mathrm{rank}(\mathcal{C}) = n$ the system is controllable, and if $\mathrm{rank}(\mathcal{O}) = n$ it is observable. A rank deficiency means there are states that cannot be controlled or observed.
Frequently Asked Questions
First check the eigenvalues of the system matrix A and the corresponding modes in B and C. Lack of controllability or observability is caused by a mode that is not coupled to the input or output. Review the model for modelling errors or for states that physically cannot be controlled or observed.
If the system is not controllable (the controllability matrix is singular), or if complex poles are not given as conjugate pairs, the gain K is not calculated and nothing is shown. First check that the rank of the controllability matrix equals the number of states n, and enter complex poles as pairs such as -1+2j,-1-2j. If you give fewer poles than the order, the missing ones are taken as −1; extra poles are ignored.
If a placed pole is not in the left half of the complex plane (positive real part), the closed-loop system is unstable. Make sure every pole has a negative real part. Also, the step response in this tool is computed with the Euler method at a 0.02 s step, so extremely fast poles, for example to the left of −100, can diverge numerically even though the system is physically stable.
Eigenvalues near the origin correspond to very slow modes. Even with no controllability or observability problem, the settling time stays long unless pole placement moves these modes into the left half-plane. Note that this tool displays tiny values caused by rounding (absolute value below 10⁻⁹) as 0.
Real-World Applications
Robot arm control:To move several joints (states) accurately to target positions at the same time, the system must be controllable. When not every joint angle has a sensor, an observer is designed to estimate the angles, which requires observability.
Automotive active suspension:Controls the body attitude (pitch and roll) to improve ride comfort and stability. A body model obtained from FEM or similar is converted to state-space form, controllability is checked, and the optimal damper forces are computed by state feedback.
Aircraft (flight control):An aircraft's attitude (pitch and roll) involves several strongly coupled states. Control surfaces (ailerons, elevators) are arranged to satisfy controllability so that the pilot's inputs can control every attitude mode.
Process control in chemical plants:States such as reactor temperature, pressure and concentration must be controlled with a limited number of valves and heaters (inputs) and monitored with a limited number of sensors (outputs). The larger the plant, the more important controllability and observability analysis becomes as a design step.
Common Misconceptions and Points to Note
First,"controllable/observable" does not mean "good performance". It is a binary judgement of whether control or observation is possible in principle. For example, even for a controllable system, placing the poles at -1 and -2 gives a slow response, while placing them at -10 and -20 gives a fast one but may require a control input too large to realise. Performance depends on the gain design.
Next,beware of the limits of numerical computation. This tool also computes matrix ranks internally, but as the number of states grows or the matrices become ill-conditioned, a matrix that is mathematically full rank can be judged rank-deficient numerically. Be careful, for example, with systems that have two very close eigenvalues. In practice, the singular values of the controllability and observability matrices are often examined to assess "how" controllable or observable the system is (controllability and observability Gramians).
Finally,the gap between the model and reality. The A, B and C matrices you enter are a representation of the "model" you have in mind. If they do not represent the real physical system accurately, a design that is perfect in the tool will not work in practice. For example, with a robot arm model that ignores friction and backlash, the simulation may be perfect while the real machine vibrates.
How to Use
Enter the state-space matrices A, B, C and D in the input form (for a 2nd-order system, for example, A=[0 1; 0 -5], B=[0; 2])
Run the rank tests on the controllability matrix [B AB] and observability matrix [C; CA] to check whether the system is completely controllable and completely observable
Enter the target poles, separated by commas, in "Desired closed-loop poles" (for example -2+3j,-2-3j); the closed-loop feedback gain K is calculated automatically and the closed-loop eigenvalues and step response are shown
Worked Example
Third-order position-control model: with A=[0 1 0; 0 0 1; 0 −10 −5], B=[0; 0; 10], C=[1 0 0], the controllability rank is 3 and the observability rank is 3 (completely controllable and completely observable). The open-loop eigenvalues are 0 and −2.5±1.94j; because of the pole at the origin (an integrator) the system is not asymptotically stable. Entering "-3,-4+2j,-4-2j" as the desired closed-loop poles gives K=[6, 3.4, 0.6], and the closed-loop eigenvalues become −3 and −4±2j. From the slowest pole, −3, the 2% settling time of the step response is about 4/3 ≈ 1.3 s. Because the reference input is not gain-compensated, the steady-state output is not 1 but 10/60 ≈ 0.167.
Practical Notes
When the observability rank is deficient (for example a vibration mode that cannot be observed because of poor pressure-sensor placement), an observer design is required and an observer gain L must be derived as well
When the controllability rank is lower than the system order, uncontrollable modes (such as unstable poles) cannot be removed, so the system configuration has to be fundamentally reconsidered
In pole placement, putting the target poles excessively far to the left (below -50, for example) makes the gain K very large and sharply increases the risk of saturation and noise amplification in implementation
🎬 Watch it in motion
Lagrange Points | Five Balance Points in Space #Shorts