Eigenvalue placement

Overview

Apply the input

u=Kx

to the open-loop system

x˙=Ax+Bu

and you get the closed-loop system

x˙=(ABK)x.

Suppose we want to choose K to put the eigenvalues of the closed-loop system, i.e., the eigenvalues of the matrix ABK, at given locations. We will derive a formula called Ackermann’s method that allows us to do this when possible, and will show how to decide when doing so is impossible.

This entire discussion will be based on the assumption that there is exactly one input (i.e., that u is a vector of length 1, or that nu=1). Ackermann’s method, in particular, cannot be used for eigenvalue placement when there is more than one input.

However, other similar methods — for example, the method of Tits and Yang (“Globally convergent algorithms for robust pole assignment by state feedback,” IEEE Transactions on Automatic Control, 41:1432-1452, 1996), as implemented by scipy.signal.place_poles in python — can be used when there are multiple inputs. Our result about when eigenvalue placement is possible — i.e., about when a system is “controllable” — also generalizes to systems with multiple inputs, although it becomes harder to prove.

Eigenvalues are invariant to coordinate transformation

Consider the system

x˙=Ax+Bu.

Suppose we define a new state variable z so that

x=Vz

for some invertible matrix V, and so

x˙=Vz˙

by differentiation. We have called this process “coordinate transformation” — it is exactly the same process we used for diagonalization when establishing our result about asymptotic stability. Plug these two things into our original state-space model and we get

Vz˙=AVz+Bu.

Solve for z˙ and we get the equivalent state-space model

z˙=V1AVz+V1Bu.

Finding a solution z(t) to this transformed system allows us to recover a solution

x(t)=Vz(t)

to the original system. We would like to know if these two solutions “behave” the same way. In particular, we would like to know if the eigenvalues of A are the same as the eigenvalues of V1AV.

First, let’s look at the eigenvalues of A. We know that they are the roots of

det(sIA).

Second, let’s look at the eigenvalues of V1AV. We know that they are the roots of

det(sIV1AV)

We can play a trick. Notice that

V1(sI)V=sV1V=sI

and so

det(sIV1AV)=det(V1(sI)VV1AV)because of our trick=det(V1(sIA)V).

It is a fact that

det(MN)=det(M)det(N)

for any square matrices M and N. Applying this fact, we find

det(V1(sIA)V)=det(V1)det(sIA)det(V).

It is another fact that

det(M1)=(det(M))1=1det(M)

Applying this other fact, we find

det(V1)det(sIA)det(V)=det(sIA)det(V)det(V)=det(sIA)

In summary, we have established that

det(sIA)=det(sIV1AV)

and so the eigenvalues of A and V1AV are the same. The consequence is, if you design state feedback for the transformed system, you’ll recover the behavior you want for the original system. In particular, suppose you apply the input

u=Lz

to the transformed system and choose L to place the eigenvalues of V1AV in given locations. Applying the input

u=LV1x

to the original system, i.e., choosing

K=LV1,

will result in placing the eigenvalues of A at these same locations. The reason this is important is that it is often easier to choose L than to choose K. The process of diagonalization was important for a similar reason.

Controllable canonical form

In the previous section, we showed that eigenvalues are invariant to coordinate transformation. The next question is what coordinates are useful for control design. The answer to that question turns out to be something called controllable canonical form.

A system with nx states and 1 input is in controllable canonical form if it looks like

z˙=Accfz+Bccfu

where

Accf=[a1a2anx1anx100001000010]Bccf=[1000].

Notice that

  • Accf is a matrix of size nx×nx,
  • Bccf is a matrix of size nx×1,
  • z is a vector of length nx, and
  • u is a vector of length 1.

It is a fact that the characteristic equation of this system is given by

det(sIAccf)=snx+a1snx1++anx1s+anx.

It is easy to see that this formula is true for nx=2 and nx=3. In particular:

  • If nx=2, then:
det(sIAccf)=det[s+a1a21s]=(s+a1)s+a2=s2+a1s+a2.
  • If nx=3, then:
det(sIAccf)=det[s+a1a2a31s001s]=(s+a1)s2+a3(a2s)=s3+a1s2+a2s+a3.

There are a variety of ways to prove that this same formula is true in general. Applying the general formula to compute the matrix determinant, for example, we would find:

det(sIAccf)=det[s+a1a2anx1anx1s000100001s]=(s+a1)det(T1)a2det(T2)+a3det(T3)

where each matrix Ti is upper-triangular with 1 in i1 diagonal entries and s in nxi diagonal entries. Since the determinant of an upper-triangular matrix is the product of its diagonal entries, we have

det(Ti)={snxiwhen i is oddsnxiwhen i is even

Plug this in, and our result follows. Now, the reason that controllable canonical form is useful is that if we choose the input

u=Lz

for some choice of gains

L=[1nx]

then the “A matrix” of the closed-loop system is

AccfBccfL=[a11a22anx1nx1anxnx100001000010]

The characteristic equation of this closed-loop system, computed in the same way as for Accf, is

snx+(a1+1)snx1++(anx1+nx1)s+(anx+nx).

If you want this characteristic equation to look like

snx+r1snx1++rnx1s+rnx

then it’s obvious what gains you should choose

1=r1a12=r2a2nx=rnxanx.

So, if you have a system in controllable canonical form, then it is easy to choose gains that make the characteristic equation of the closed-loop system look like anything you want (i.e., to put the closed-loop eigenvalues anywhere you want). In other words, it is easy to do control design.

Putting a system in controllable canonical form

We have seen that controllable canonical form is useful. Now we’ll see how to put a system in this form. Suppose we have a system

x˙=Ax+Bu

and we want to choose an invertible matrix V so that if we define a new state variable z by

x=Vz

then we can rewrite the system as

z˙=Accfz+Bccfu

where

Accf=V1AVandBccf=V1B

are in controllable canonical form. The trick is to look at the so-called controllability matrix that is associated with the transformed system:

Wccf=[BccfAccfBccfAccfnx1Bccf].

We will talk more later about the controllability matrix — for now, notice that

Bccf=V1BAccfBccf=V1AVV1B=V1ABAccf2Bccf=Accf(AccfBccf)=V1AVV1AB=V1A2B=

You see the pattern here, I’m sure. The result is:

Wccf=[V1BV1ABV1Anx1B]=V1[BABAnx1B]=V1W

where

W=[BABAnx1B]

is the controllability matrix associated with the original system.

There are three things to note:

  • A and B are things that you know — you have a description of the original system, as always — so you can compute W.

  • Accf and Bccf are also things that you know — the values a1,,anx in the top row of Accf are the coefficients of the characteristic polynomial of the matrix A — so you can compute Wccf.

  • W is a square nx×nx matrix — it has nx columns B, AB, and so forth, all of which have size nx×1. So, if W has non-zero determinant, then you can find its inverse.

As a consequence, you can solve for the matrix V1:

V1=WccfW1.

Now, suppose you design a control policy for the transformed system:

u=Kccfz.

Remember, you can do this easily, because the transformed system is in controllable canonical form. We can compute the equivalent control policy, that would be applied to the original system:

u=Kccfz=KccfV1x=KccfWccfW1x.

In particular, if we choose

K=KccfWccfW1

then we get the behavior that we want. Again, we emphasize that this only works if W is invertible, and that W is only invertible if det(W)0.

A systematic process for control design

Apply the input

u=Kx

to the open-loop system

x˙=Ax+Bu

and you get the closed-loop system

x˙=(ABK)x.

Suppose we want to choose K to put the eigenvalues of the closed-loop system at

p1,,pnx.

Using the results of the previous sections, we know we can do this as follows:

  • Compute the characteristic equation that we want:

    (sp1)(spnx)=snx+r1snx1++rnx1s+rnx.
  • Compute the characteristic equation that we have:

    det(sIA)=snx+a1snx1++anx1s+anx
  • Compute the controllability matrix of the original system (and check that det(W)0):

    W=[BABAnx1B]
  • Compute the controllability matrix of the transformed system:

    Wccf=[BccfAccfBccfAccfnx1Bccf]

    where

    Accf=[a1a2an1an100001000010]Bccf=[1000]
  • Compute the gains for the transformed system:

    Kccf=[r1a1rnxanx]
  • Compute the gains for the original system:

    K=KccfWccfW1

And we’re done! This process is easy to implement, without any symbolic computation. Remember, although this method only works for systems with exactly one input (i.e., when nu=1), similar methods work for systems with multiple inputs — in python, use scipy.signal.place_poles.

How to decide when eigenvalue placement is possible

We say that a system is controllable if eigenvalue placement is possible. We have seen eigenvalue placement with Ackermann’s method (for the special case when nu=1) is only possible when the controllability matrix W is invertible. Here is a generalization of that same result to any system:

The system

x˙=Ax+Bu

is controllable if and only if the controllability matrix

W=[BABAnx1B]

is full rank, where nx is the number of states.

Let’s break this statement down.

First, suppose there is only one input, so nu=1. In that case, A has size nx×nx and B has size nx×1. Therefore, W is a square matrix of size nx×nx, so W being full rank simply means that it is invertible (i.e., that det(W)0).

Now, suppose there is more than one input, so nu>1. Then, B has size nx×nu. The matrix W then has size nx×nxnu, and W is no longer square. Although we can’t invert a non-square matrix, we can still find its rank. In particular, it is easy to find the rank of a non-square matrix in python using numpy.linalg.matrix_rank. We say that W is full rank if and only if its rank is nx.

If W is full rank, the system is controllable, and eigenvalue placement will work. If W is not full rank, the system is not controllable, and eigenvalue placement will not work.

We can actually say a little more than this. It turns out that if the controllability matrix W is not full rank, then although we cannot place all of the system’s eigenvalues, we can place some of these eigenvalues, while the others will remain in the same location no matter what gain matrix K we choose. The eigenvalues we can place are often called “controllable eigenvalues” or “controllable modes,” while the eigenvalues we can not place are often called “uncontrollable eigenvalues” or “uncontrollable modes.” If the rank of W is nx1, then we can place nx1 eigenvalues, and 1 eigenvalue is uncontrollable. If the rank of W is nx2, then we can place nx2 eigenvalues, and 2 eigenvalues are uncontrollable. And so forth.