Lecture 5 - Controllability and Observability, Kalman's Decomposition Theorem

Download Lecture 5 slides

The fifth lecture covers controllability and observability and state-space realisations. The topics are a bit disjointed, and we don't cover everything in the videos, so I recommend you make use of the extra material. Things also start to get quite advanced, especially in some of the proofs. Take your time, and also don't forget there are extra videos in lecture 4 that give a more basic treatment of controllability and observability.

Reading suggestion for further study: Download KJA_pp151_162.pdf

The covered material is treated in the hand-in exercises 2.2d-g

The Cayley-Hamilton Theorem

The Cayley-Hamilton theorem states that a square matrix satisfies its own characteristic polynomial. In this lecture we try to make sense of this statement, and discuss how this result can be used to 'simplify' infinite sums and find matrix inverses.

   

The Cayley Hamilton theorem can be proved using properties of the adjugate matrix Links to an external site.. We briefly go through the steps

   

A rather brief written version of this proof can be found Download here

Controllability

We can build our intuition for what can be achieved using feedback control through the concept of controllability. Here we review the basic definition.

   

We can test for controllability by checking the rank of the controllability matrix. We now use the Cayley-Hamilton theorem to understand why this is the case, and also introduce the concept of the controllability Gramian.

   

Observability

Observability is used to understand how information about the state can be deduced from the output measurements. We review the basic definitions and tests for observability.

   

Kalman Decompositions and Poles and Zeros

A state transformation can be used to represent a state-space model in a way that reveals its controllable and observable parts. This special decomposition is called the Kalman decomposition, and also has strong connections to pole zero cancellations in the transfer function associated with a state-space model.

   

Something that I forgot to discuss in the video - it is possible for the sub-matrices in the Kalman decomposition to be empty matrices (ie matrices with one or both of their dimensions equal to zero). The happens when a state-space model is controllable and/or observable (the matrices in the uncontrollable or/and unobservable parts are empty).

----------------------------------------------------------------------------------------

Extra Example - Double Inverted Pendulums

Its is surprising that the following system is controllable. Can you prove it?

Here is a design of a controller for it :

The file Download pend01.m

illustrates so called LQG-design on a system where two pendulums are mounted on a common cart that can move horizontally as illustrated in the picture

pendulums.png

Additional: If you are interested, a derivation of the dynamics is available Download in this note

(which you need some math to understand).

The task is to balance both pendulums, i.e. get  LaTeX: \theta_1 = \theta_2=0θ1=θ2=0 θ1=θ2=0, by moving the position LaTeX: x(t)x(t) x(t) of the cart. It is assumed the position of the cart and the angles of the pendulums can be measured but not the cart velocity or the angular velocities. The input is the force LaTeX: u(t)u(t) u(t) on the cart.  A so called LQG controller (you learn about this in advanced control courses) is calculated by the following lines of code in the file

Q =  C'*C;
R = 1e-4;
[K,S]=lqr(A,B,Q,R);
G = B;
H = 0*C*B;
QN = 1;
RN = diag([1e-3 1e-3 1e-3]);
syse = ss(A,[B G],C,[D H]);
[kest,L]=kalman(syse,QN,RN);
reg = -lqgreg(kest,K);

Remark:  The file pend01.m generates several additional plots, the GangOfFours. These plots illustrate the behavior of the system at different frequencies and can be used to understand the design better, such as the robustness against disturbances, measurement noise, and modeling errors.

The following movie (generated by the file Download plotit.m

) illustrates how the resulting control system handles a situation where the initial condition is close to the goal, but with the two pendulums leaning slightly in different directions ( LaTeX: \theta_1(0) = 1 \textrm{ degree}, \quad \theta_2(0) = -2 \textrm{ degrees}θ1(0)=1 degree,θ2(0)=2 degrees θ1(0)=1 degree,θ2(0)=2 degrees).

 

It is interesting to note that both pendulums can be balanced by the same cart. Using the test for controllability it can be proved that this impossible if the pendulums have the same length. And studying the controllability Gramian $W(t)$ one can see that it is  very difficult when the two lengths are close to equal. Analysis shows that states correpsonding to the two pendulums falling in different directions require quite dramatic and large control signals to recover. This corresponds to  $W$ being closed to singular, and $W^{-1}$ being large in these directions. The system will have 4 states. How many states do you think are uncontrollable when the lenghts are equal ?

----------------------------------------------------------------------------------------

A remarkable example of good control engineering is the triple inverted pendulum swing-up and stabilization by Stephan Ozana. It requires good understanding of required sensor and actuator performance already at the physical construction of the system. Cudos !