Part 8 - Stability and Controller Design

Internal Stability

Consider the LTI system,

x˙=Fx+Gux(0)=x0,t0y=Hx+Ju\begin{align*} \dot{x} &= Fx + Gu \quad x(0) = x_0, t \geq 0 \newline y &= Hx + Ju \end{align*}

where FRn×nF \in \mathbb{R}^{n \times n}, GRn×1G \in \mathbb{R}^{n \times 1}, HR1×nH \in \mathbb{R}^{1 \times n}, and JR1×1J \in \mathbb{R}^{1 \times 1}.

Definition 1 (Internal stability)

The LTI system is said to be internally stable if the zero input solution approaches 0 as tt \to \infty for any x(0)x(0), or in mathematical terms,

limtx(t)=limteFtx(0)=0,x0.\lim_{t \to \infty} x(t) = \lim_{t \to \infty} e^{Ft}x(0) = 0, \quad \forall x_0.
Theorem 1 (Internal Stability Theorem)

The LTI system is said to be internally stable if and only if all the eigenvalues of FF have negative real parts.

Let’s take a look at an example.

Example 1

Consider this simple circuit with one inductor.

Simple circuit with one inductor.
Simple circuit with one inductor.

We consider the current ii as the output and the voltage source VsV_s as the input.

We know that the voltage across the inductor is given by,

V=LdidtV = L \frac{di}{dt}

From KVL, we get,

Vs=VV_s = V

Solving ii in terms of VsV_s, we get

i=i(0)+0tVsLdti = i(0) + \int_0^t \frac{V_s}{L} dt

If we assume Vs=1,t0V_s = 1, t \geq 0, then

i=i(0)+tL,t0i = i(0) + \frac{t}{L}, \quad t \geq 0

Thus, the transfer function is

I(s)Vs(s)=1Ls\frac{I(s)}{V_s(s)} = \frac{1}{Ls}

Since the poles of the system are at s=0s = 0, the system is not internally stable.

We can also see this from the time domain solution. If the time goes to infinity, the current will go to infinity.

Example 2

Let’s add a resistor before the inductor.

Circuit with resistor and inductor.
Circuit with resistor and inductor.

With KVL we know that,

Vs=Ri+LdidtV_s = Ri + L \frac{di}{dt}

Thus, the transfer function is

I(s)Vs(s)=1Ls+R\frac{I(s)}{V_s(s)} = \frac{1}{Ls + R}

The poles of the system are at s=RLs = -\frac{R}{L}. Since both RR and LL are positive, the poles are negative, and the system is internally stable.

Example 3

Now, let’s combine these two circuits and also find the state space equations for it.

Combined circuit.
Combined circuit.

From KVL, we get

L1di1dt=VsRi2+L2di2dt=Vs\begin{align*} L_1 \frac{di_1}{dt} = V_s \newline R i_2 + L_2 \frac{di_2}{dt} = V_s \end{align*}

Let x=[x1x2]=[i1i2]x = \begin{bmatrix} x_1 \newline x_2 \end{bmatrix} = \begin{bmatrix} i_1 \newline i_2 \end{bmatrix}, then the state space equations are

[x1˙x2˙]=[000RL2][x1x2]+[1L11L2]Vsy=[10][x1x2]\begin{align*} \begin{bmatrix} \dot{x_1} \newline \dot{x_2} \end{bmatrix} &= \begin{bmatrix} 0 & 0 \newline 0 & -\frac{R}{L_2} \end{bmatrix} \begin{bmatrix} x_1 \newline x_2 \end{bmatrix} + \begin{bmatrix} \frac{1}{L_1} \newline \frac{1}{L_2} \end{bmatrix} V_s \newline y &= \begin{bmatrix} 1 & 0 \end{bmatrix} \begin{bmatrix} x_1 \newline x_2 \end{bmatrix} \end{align*}

We can see that F=[000RL2]F = \begin{bmatrix} 0 & 0 \newline 0 & -\frac{R}{L_2} \end{bmatrix}.

Remember that the eigenvalues of a matrix can be found by,

det(FλI)=0det([λ00RL2λ])=0λ2+RL2λ=0λ(λ+RL2)=0λ0=0,λ1=RL2\begin{align*} \det(F - \lambda I) &= 0 \newline \det\left(\begin{bmatrix} -\lambda & 0 \newline 0 & -\frac{R}{L_2} - \lambda \end{bmatrix}\right) &= 0 \newline \lambda^2 + \frac{R}{L_2} \lambda &= 0 \newline \lambda(\lambda + \frac{R}{L_2}) &= 0 \lambda_0 = 0, \lambda_1 = -\frac{R}{L_2} \end{align*}

Since we have one eigenvalue which is not negative, the system is not internally stable.

State Feedback Control

Given the LTI system,

x˙=Fx+Gux(0)=x0,t0y=Hx+Ju\begin{align*} \dot{x} &= Fx + Gu \quad x(0) = x_0, t \geq 0 \newline y &= Hx + Ju \end{align*}

where FRn×nF \in \mathbb{R}^{n \times n}, GRn×mG \in \mathbb{R}^{n \times m}, HRp×mH \in \mathbb{R}^{p \times m}, and JRp×mJ \in \mathbb{R}^{p \times m}.

The control law of the form

u=Kx+Mr,KRm×n,MRm×m,u = -Kx + Mr, K \in \mathbb{R}^{m \times n}, M \in \mathbb{R}^{m \times m},

is called a state feedback control.

If we substitute the control law into the state space equations, we get

x˙=(FGK)x+GMr=Fcx+Gcry=Hx+Ju\begin{align*} \dot{x} &= (F - GK)x + GMr = F_cx + G_c r \newline y &= Hx + Ju \end{align*}

whihc is called the closed-loop system under the state feedback control.

Remark

  1. KK and MM can modify FF and GG, thus the behavior of the entire system.
  2. KK is called the feedback gain. It can be used to stabilize the system and modify the trasnient response.
  3. MM is called the feedforward gain. It can be used for tracking and disturbance rejection and modify the steady state response.
  4. The state space equation above is called the state feedback since the state is the feedback signal.

State Feedback Stabilization

Let’s first look at this when we have r=0r = 0. In other words,

u=Kxu = -Kx

and the closed loop system becomes,

x˙=(FGK)x\dot{x} = (F - GK)x

We denote the nn eigenvalues of the matrix FGKF - GK with λI(FGK),i=1,2,,n\lambda_I(F - GK), i = 1, 2, \ldots, n.

Then, the system is said to be internally stable if and only if,

(λi(FGK))<0,i=1,2,,n,\Re(\lambda_i(F - GK)) < 0, \quad i = 1, 2, \ldots, n,

where (λi)\Re(\lambda_i) denotes the real part of the eigenvalue λi\lambda_i.

We call the problem of fidning KRm×nK \in \mathbb{R}^{m \times n} subject to the above as the state feedback stabilization problem.

Eigenvalue Placement Problem

Before we figure out how we find (and place) our eigenvalues, let us make some preparations.

  1. Let λ=x+iy\lambda = x + iy be a complex number where i=1i = \sqrt{-1}. Then the complex conjugate of λ\lambda is a complex number xiyx - iy denoted by λˉ\bar{\lambda}.
  2. As set of nn complex numbers {λd1,λd2,,λdn}\{\lambda_{d_1}, \lambda_{d_2}, \ldots, \lambda_{d_n}\} is said to be self-conjugate if and only if,
λ{λd1,λd2,,λdn}λˉ{λd1,λd2,,λdn}\lambda \in \{\lambda_{d_1}, \lambda_{d_2}, \ldots, \lambda_{d_n}\} \Rightarrow \bar{\lambda} \in \{\lambda_{d_1}, \lambda_{d_2}, \ldots, \lambda_{d_n}\}
  1. If λ\lambda is a root of a polynomial with real coefficients, so is λˉ\bar{\lambda}.

Now, for the problem.

Problem 1 (Eigenvalue placement)

Given a set of nn self-conjugate complex numbers {λd1,λd2,,λdn}\{\lambda_{d_1}, \lambda_{d_2}, \ldots, \lambda_{d_n}\}, find KRm×nK \in \mathbb{R}^{m \times n} such that,

{λi(FGK),i=1,2,,n}={λd1,λd2,,λdn}\{\lambda_i(F - GK), i = 1, 2, \ldots, n\} = \{\lambda_{d_1}, \lambda_{d_2}, \ldots, \lambda_{d_n}\}
Remark 1

If all λd1,λd2,,λdn\lambda_{d_1}, \lambda_{d_2}, \ldots, \lambda_{d_n} are chosen such that they have negative real parts, then the solution of the eigenvalue placement problem leads to the solution of the state feedback stabilization problem.

Let,

q(s)=(sλd1)(sλdn)=sn+α1sn1++αn1s+αn\begin{align*} q(s) & = (s - \lambda_{d_1}) \ldots (s - \lambda_{d_n}) \newline & = s^n + \alpha_1 s^{n-1} + \ldots + \alpha_{n-1} s + \alpha_n \end{align*}

Then the eigenvalue placement problem is equivalent to that of finding KRm×nK \in \mathbb{R}^{m \times n} such that,

det(sI(FGK))=q(s)\det(sI - (F - GK)) = q(s)

We will only focus on single input systems, i.e., m=1m = 1.

Ackermann’s Formula

Let q(s)=sn+α1sn1++αn1s+αnq(s) = s^n + \alpha_1 s^{n-1} + \ldots + \alpha_{n-1} s + \alpha_n be the desired polynomial.

Theorem 2 (Ackermann’s Formula)

Assume [F,G][F, G] is controllable. Then,

K=[0001]C1(F,G)q(F)K = \begin{bmatrix} 0 & 0 & \ldots & 0 & 1 \end{bmatrix} C^{-1}(F, G) q(F)

where q(F)=Fn+α1Fn1++αn1F+αnIq(F) = F^n + \alpha_1 F^{n-1} + \ldots + \alpha_{n-1} F + \alpha_n I and C1(F,G)C^{-1}(F, G) is the inverse of the controllability matrix.

Example 4 (Pendulum)

Suppose you have a pendulum with frequency ω0\omega_0 described by,

x˙=[01ω020]x+[01]u\dot{x} = \begin{bmatrix} 0 & 1 \newline -\omega_0^2 & 0 \end{bmatrix} x + \begin{bmatrix} 0 \newline 1 \end{bmatrix} u

Find the control law that places the closed loop eigenvalues of the system at 2ω0-2\omega_0.

Since we have a double pole, the desired polynomial is,

q(s)=(s+2ω0)2=s2+4ω0s+4ω02q(s) = (s + 2\omega_0)^2 = s^2 + 4\omega_0 s + 4\omega_0^2
Ackermann’s Formula

Since we have a system of order two, the controllability matrix is,

C(F,G)=[GFG]C(F, G) = \begin{bmatrix} G & FG \end{bmatrix}

Firstly, let’s find FGFG,

FG=[10]FG = \begin{bmatrix} 1 \newline 0 \end{bmatrix}

Then, we can find C(F,G)C(F, G),

C(F,G)=[0110]C(F, G) = \begin{bmatrix} 0 & 1 \newline 1 & 0 \end{bmatrix}

Now, we can find the inverse of C(F,G)C(F, G),

C1(F,G)=[0110]C^{-1}(F, G) = \begin{bmatrix} 0 & 1 \newline 1 & 0 \end{bmatrix}

Now, for q(F)q(F), we need to find F2F^2,

F2=[ω0200ω02]F^2 = \begin{bmatrix} -\omega_0^2 & 0 \newline 0 & -\omega_0^2 \end{bmatrix}

Then, we can find q(F)q(F),

q(F)=F2+4ω0F+4ω02I=[ω0200ω02]+4ω0[01ω020]+4ω02I=[3ω024ω04ω033ω02]\begin{align*} q(F) &= F^2 + 4\omega_0 F + 4\omega_0^2 I \newline &= \begin{bmatrix} -\omega_0^2 & 0 \newline 0 & -\omega_0^2 \end{bmatrix} + 4\omega_0 \begin{bmatrix} 0 & 1 \newline -\omega_0^2 & 0 \end{bmatrix} + 4\omega_0^2 I \newline &= \begin{bmatrix} 3\omega_0^2 & 4\omega_0 \newline -4\omega_0^3 & 3\omega_0^2 \end{bmatrix} \end{align*}

Which finally means,

K=[01][0110][3ω024ω04ω033ω02]=[3ω024ω0]K = \begin{bmatrix} 0 & 1 \end{bmatrix} \begin{bmatrix} 0 & 1 \newline 1 & 0 \end{bmatrix} \begin{bmatrix} 3\omega_0^2 & 4\omega_0 \newline -4\omega_0^3 & 3\omega_0^2 \end{bmatrix} = \begin{bmatrix} 3\omega_0^2 & 4\omega_0 \end{bmatrix}
Direct Method

Let K=[k1k2]K = \begin{bmatrix} k_1 & k_2 \end{bmatrix}. Then,

FGK=[01ω020][01][k1k2]=[01ω02k1k2]F - GK = \begin{bmatrix} 0 & 1 \newline -\omega_0^2 & 0 \end{bmatrix} - \begin{bmatrix} 0 \newline 1 \end{bmatrix} \begin{bmatrix} k_1 & k_2 \end{bmatrix} = \begin{bmatrix} 0 & 1 \newline -\omega_0^2 - k_1 & -k_2 \end{bmatrix}

For the matrix equation sI(FGK)sI - (F - GK), we get

sI(FGK)=[s1ω02+k1s+k2]sI - (F - GK) = \begin{bmatrix} s & -1 \newline \omega_0^2 + k_1 & s + k_2 \end{bmatrix}

The determinant of this matrix is,

det(sI(FGK))=s(s+k2)(1)(ω02+k1)=s2+k2s+ω02+k1\begin{align*} \det(sI - (F - GK)) &= s(s + k_2) - (-1)(\omega_0^2 + k_1) \newline &= s^2 + k_2 s + \omega_0^2 + k_1 \end{align*}

If we compare this with the desired polynomial,

s2+4ω0s+4ω02s^2 + 4\omega_0 s + 4\omega_0^2

we can see that k1=3ω02k_1 = 3\omega_0^2 and k2=4ω0k_2 = 4\omega_0.

Remark 2
  1. For lower order systems such as n=2,3n = 2,3, the direct method is more convenient. Otherwise use built in functions if available.

  2. How to decide q(s)q(s) or desirable eigenvalues of (FGK)(F - GK)? This is an important question, the locations of the closed loop poles mainly depend on the requirements of transient response such as the rise time, overshoot, and settling time. Also, it is important to achieve a balance between a good system response and control effort.

  3. To move the poles a long way requires large gains, which is not always possible.

Asymptotic Tracking

Given a plant,

x˙=Fx+Gux(0)=x0,t0y=Hx+Ju\begin{align*} \dot{x} &= Fx + Gu \quad x(0) = x_0, t \geq 0 \newline y &= Hx + Ju \end{align*}

where FRn×nF \in \mathbb{R}^{n \times n}, GRn×mG \in \mathbb{R}^{n \times m}, HRp×nH \in \mathbb{R}^{p \times n}, and JRp×mJ \in \mathbb{R}^{p \times m}.

and a reference input rr, the control law of the form

u=Kx+Mru = -Kx + Mr

such that (FGK)(F - GK) is stable, or in other words (λi(FGK))<0,i=1,2,,n\Re(\lambda_i(F - GK)) < 0, i = 1, 2, \ldots, n. and, limt(y(t)r(t))=0lim_{t \to \infty} (y(t) - r(t)) = 0 is called an asymptotic tracking control.

Solution with rr constant

Let KR1×nK \in \mathbb{R}^{1 \times n} be such that FGKF - GK is stable, and NxRn×1andNuR1×1N_x \in \mathbb{R}^{n \times 1} and N_u \in \mathbb{R}^{1 \times 1} be given by,

[NxNu]=[FGHJ]1[0n×11]\begin{bmatrix} N_x \newline N_u \end{bmatrix} = \begin{bmatrix} F & G \newline H & J \end{bmatrix}^{-1} \begin{bmatrix} \mathbf{0}_{n \times 1} \newline 1 \end{bmatrix}

This is equivalent to,

FNx+GNu=0n×1HNx+JNu=1\begin{align*} F N_x + G N_u &= \mathbf{0}_{n \times 1} \newline H N_x + J N_u &= 1 \end{align*}

Then, the following control law solves the asymptotic tracking problem,

u=Kx+Mr,M=Nu+KNxu = -Kx + Mr, \quad M = N_u + K N_x
Proof

Under u=Kx+Mr=NurK(xNxr)u = -Kx + Mr = N_u r - K(x - N_x r), the closed loop system satisfies,

x˙=Fx+GNurGK(xNxr)=F(xNxr)+FNxr0GNurGK(xNxr)=(FGK)(xNxr)+(FNx+GNu)r=(FGK)(xNxr)\begin{align*} \dot{x} &= Fx + GN_u r - GK(x - N_x r) \newline &= F(x - N_x r) + F N_x r 0 G N_u r - GK(x - N_x r) \newline &= (F - GK)(x - N_x r) + (F N_x + G N_u) r \newline &= (F - GK)(x - N_x r) \end{align*}

Similarly,

y=Hx+Ju=Hx+J(NurK(xNxr))=H(xNxr)+HNxr+JNurJK(xNxr)=(HJK)(xNxr)+(HNx+JNu)r=(HJK)(xNxr)+r\begin{align*} y &= Hx + Ju = Hx + J(N_u r - K(x - N_x r)) \newline &= H(x - N_x r) + H N_x r + J N_u r - JK(x - N_x r) \newline &= (H - JK)(x - N_x r) + (H N_x + J N_u) r \newline &= (H - JK)(x - N_x r) + r \end{align*}

Clearly if limt(x(t)Nxr)=0lim_{t \to \infty} (x(t) - N_x r) = 0, then limty(t)=r(t)lim_{t \to \infty} y(t) = r(t).

But let z=xNxrz = x - N_x r, then z˙=x˙0=x˙\dot{z} = \dot{x} - 0 = \dot{x}.

Which means,

z˙=(FGK)z\dot{z} = (F - GK)z

it follows from the stability of (FGK)(F - GK) that limtz(t)=0\lim_{t \to \infty} z(t) = 0.

Let xss=Nxrx_{ss} = N_x r. Then limtz(t)=0\lim_{t \to \infty} z(t) = 0 implies limtx(t)=xss\lim_{t \to \infty} x(t) = x_{ss}.

We call xssx_{ss} the steady state value of xx.

Remark

It is also possible to obtain an output feedback control law as follows,

u=Kx^+Mrx^˙=Fx^+Gu+L(yHx^)\begin{align*} u &= -K\hat{x} + Mr \newline \dot{\hat{x}} &= F\hat{x} + Gu + L(y - H\hat{x}) \end{align*}

where LL i such taht (FLH)(F -LH) is stable.

Remark

The control law can also be written as follows,

u=Kx+Mr=Kx+(Nu+KNx)r=NurK(xNxr)=ussk(xxss)\begin{align*} u &= -Kx + Mr = -Kx + (N_u + K N_x)r \newline &= N_u r - K(x - N_x r) &= u_{ss} - k(x - x_{ss}) \end{align*}

where uss=Nuru_{ss} = N_u r.

It can be seen that,

limtu(t)=uss\lim_{t \to \infty} u(t) = u_{ss}

which is the steady state input.

When r=r = , uss=0u_{ss} = 0 and xss=0x_{ss} = 0.

the control law becomes,

u=Kxu = -Kx

Thus, the stabilization problem is a special case of the asymptotic tracking.

Example 5

Given,

x˙=[01ω020]x+[01]u=Fx+Guy=[10]x=Hx\begin{align*} \dot{x} &= \begin{bmatrix} 0 & 1 \newline -\omega_0^2 & 0 \end{bmatrix} x + \begin{bmatrix} 0 \newline 1 \end{bmatrix} u = Fx + Gu \newline y &= \begin{bmatrix} 1 & 0 \end{bmatrix} x = Hx \end{align*}

Find u=Kx+Mru = -Kx + Mr such that,

det(sI(FGK))=s2+4ω0s+4ω02\det(sI - (F - GK)) = s^2 + 4\omega_0 s + 4\omega_0^2

and

limty(t)=r(t)\lim_{t \to \infty} y(t) = r(t)

Let ω0=1\omega_0 = 1.

Solution

As we previously have found KK to be,

K=[3ω024ω0]=[34]K = \begin{bmatrix} 3\omega_0^2 & 4\omega_0 \end{bmatrix} = \begin{bmatrix} 3 & 4 \end{bmatrix}

Then, we can find NxN_x and NuN_u which satisfies,

FNx+GNu=02×1F N_x + G N_u = \mathbf{0}_{2 \times 1}

and

HNx+JNu=1H N_x + J N_u = 1

By solving these equations, we get,

Nx=[10],Nu=1N_x = \begin{bmatrix} 1 \newline 0 \end{bmatrix}, N_u = 1

Then, let M=Nu+KNx=1+3=4M = N_u + K N_x = 1 + 3 = 4.

Thus, the control law is,

u=Kx+Mr=3x14x2+4ru = -Kx + Mr = -3x_1 - 4x_2 + 4r