Linear Controls Notes

Table of Contents

1 Linear Algebra

1.1 Determinant

\[ \left| \begin{array}{cc} x11 & x12
x21 & x22 \end{array}\right| = x11x22 - x12x21 \]

1.2 Null Space

\[ {\rm null}({\bf A})\ ≡\ \{ {\bf x}\ \arrowvert\ {\bf A}: m× n \ \land\ {\bf x} ∈ \Ren\ \land\ {\bf A} {\bf x} = 0 \} \]

1.3 Span

\[ {\rm span}({\bf v1}, {\bf v2}, …, {\bf vn})\ ≡\ % \{ {\bf x}\ \arrowvert\ % {\bf x} = c1{\bf v1} + c2{\bf v2} + … + cn {\bf vn}\ % ∀\ % \{c1, c2, …, cn\} ∈ \Re \} \]

1.4 Rank

\[ {\rm rank}({\bf A})\ ≡\ {\rm number\ of\ linearly\ independent\ colums\ of\ }{\bf A} \] \[ {\rm rank}(A) = {\rm rank}(AT) \]

1.5 Column Space

\[ \mathcal{R}({\bf A})\ ≡\ {\rm span}({\rm columns}({\bf A})) \]

1.6 Row Space

\[ {\rm row_space}({\bf A})\ ≡\ {\mathcal R}({\bf A}T)\]

1.7 Eigen

Let $λ$ be the eigenvalues of matrix $\bf A$.

\[ {\bf A}{\bf x} = λ {\bf x} \]

Characteristic Equation:

\[ \lvert {\bf A} - λ {\bf I} \rvert = 0 \]

\[ ({\bf A} - λ {\bf I}) {\bf x} = 0 \]

1.8 Cayley-Hamilton

\[ \lvert {\bf A} - {\bf A} {\bf I} \rvert = 0 \]

Thus, you can substitute $\bf A$ in it's own characteristic equation. This can be used to reduce the order of a matrix polynomial by using the characteristic equation to find the value of a high order matrix power as a linear combination of lower order powers of that matrix.

1.9 Similarity

\[ {\bf P}-1 {\bf A} {\bf P} = {\bf B}\ \iff\ {\bf P} {\bf B} {\bf P}-1= {\bf A} \]

Similarity Transform: ${\bf A} → {\bf P} {\bf B} {\bf P}-1$

1.10 Orthogonal Vectors

\[ {\bf z} ∈ {\bf x} \implies {\bf z}T{\bf x} = 0 \]

1.11 Matrix Exponential

\[ e\bf A = ∑k=0 \frac{{\bf A}k}{k!}\] \[e{\bf A} t = \mathscr{L}-1\left\{(s {\bf I} - {\bf A} )-1\right\} \]

1.12 Inverse

\[ {\bf A} {\bf A}-1 = {\bf I} \]

For matrix ${\bf A} ∈ \Re2× 2$: \begin{eqnarray} {\bf A} = \left[\begin{array}{cc} a11 & a12
a21 & a22 \end{array}\right] \nonumber
{\bf A}-1 = \frac{1}{\left|{\bf A}\right|} \left[\begin{array}{cc} a22 & -a12
-a21 & a11 \end{array}\right] \nonumber \end{eqnarray}

1.13 Higher Order Functions

Higher order functions – the derivative, integral, and Laplace transform – operate on matrices elementwise.

\begin{eqnarray} \frac{d {\bf A}}{dt} = \left[\begin{array}{cccc} \frac{ d a11}{dt} & \frac{d a12}{dt} & \cdots & \frac{d a1n}{dt}
\frac{ d a22}{dt} & \frac{d a22}{dt} & \cdots & \frac{d a2n}{dt}
\vdots & \vdots & \ddots & \frac{d a1n}{dt}
\frac{ d an1}{dt} & \frac{d an2}{dt} & \cdots & \frac{d ann}{dt}
\end{array}\right] \end{eqnarray}

1.14 Diagonalizable

\[ {\bf A} = \left[ \begin{array}{cccc} a1 & 0 & \cdots & 0
0 & a2 & \cdots & 0
\vdots & \vdots & \ddots & 0
0 & 0 & \cdots &an \end{array} \right] \implies e\bf A = \left[ \begin{array}{cccc} ea1 & 0 & \cdots & 0
0 & ea2 & \cdots & 0
\vdots & \vdots & \ddots & 0
0 & 0 & \cdots & ean \end{array} \right] \]

\[ {\bf A} = {\bf P}{\bf D}{\bf P}-1 \implies e\bf A = {\bf P}e\bf D{\bf P}-1 \]

1.15 Nilpotent Matrix

If matrix ${\bf A}$ is nilpotent, then

\[{\bf A}q = 0 \implies e\bf A = ∑k=0q-1 \frac{{\bf A}k}{k!}\]

2 Stability

2.1 Definitions

stable
$∀\ ε>0,\quad ∃\, δ(ε,t0)\ \arrowvert\ x(t0) = δ \land x(t) < ε ∀ t$
asymptotically stable
stable and $∃\, δ'(t0)\ \arrowvert\ x(t0) = δ' \land limt → ∞ x(t) = 0$
global asymptotically stable
$\bf x → \bf 0\ {\rm as}\ t→∞ \ ∀\ \bf x(t0) = \bf x0$

2.2 Criterion

2.2.1 Continuous

\[ \bf \dot{x} = Ax \] \[ λi = βi + \jmath ωi\]

Unstable
$∃\,βi > 0$ for simple eigenvalue OR $∃\,βi\geq 0$ for repeated eigenvalue
Stable
$∃\,βi \leq 0$ for simple eigenvalue OR $∃\,βi < 0$ for repeated eigenvalue
Asymptotically Stable
$∃\,βi < 0$ for all eigenvalues

2.2.2 Discrete

\[ {\bf x}(k+1) = {\bf A}{\bf x}(k) \]

Unstable
$∃\,\lvertλ\rverti > 1$ for simple roots OR $∃\,\lvertλ\rverti\geq 1$ for repeated roots
Stable
$∃\,\lvertλ\rverti \leq 1$ for simple roots OR $∃\,\lvertλ\rverti < 1$ for repeated roots
Asymptotically Stable
$∃\,\lvertλ\rverti < 1$ for all roots

2.3 Lyapunov's Direct Method

Employs a Lyapunov function, $V({\bf x}): \Ren \mapsto \Re$. Analogous to physical energy, but must satisfy certain mathematical considerations.

positive definite
for some region $Ω$ about ${\bf x} = {\bf 0}$, \[ \left(V({\bf 0}) = 0 \right)\ \land\ \left( V({\bf x}) > 0\ ∀\ \{{\bf x} \arrowvert {\bf x} ≠ {\bf 0} \land {\bf x} ∈ Ω \} \right)\]
positive semidefinite
for some region $Ω$ about ${\bf x} = {\bf 0}$, \[ \left(V({\bf 0}) = 0 \right)\ \land\ \left( V({\bf x}) \geq 0\ ∀\ \{{\bf x} \arrowvert {\bf x} ≠ {\bf 0} \land {\bf x} ∈ Ω \} \right)\]
negative definite
for some region $Ω$ about ${\bf x} = {\bf 0}$, \[ \left(V({\bf 0}) = 0 \right)\ \land\ \left( V({\bf x}) < 0\ ∀\ \{{\bf x} \arrowvert {\bf x} ≠ {\bf 0} \land {\bf x} ∈ Ω \} \right)\]
negative semidefinite
for some region $Ω$ about ${\bf x} = {\bf 0}$, \[ \left(V({\bf 0}) = 0 \right)\ \land\ \left( V({\bf x}) \leq 0\ ∀\ \{{\bf x} \arrowvert {\bf x} ≠ {\bf 0} \land {\bf x} ∈ Ω \} \right)\]
Stable
positive definite $V({\bf x})$ and negative semidefinite $\dot{V}({\bf x})$, system is stable about origin
Asymptotically Stable
positive definite $V({\bf x})$ and negative definite $\dot{V}({\bf x})$, system is stable about origin
GAS
\[V({\bf x}) > 0\,∀\,{\bf x}≠ 0 \quad\land\quad V(\bf 0)=0 \quad\land\quad \dot{V}(\bf x)<0\,∀\,x≠ 0 \quad\land\quad V(\bf x) → ∞\ {\rm as}\ \lVert\bf x\rVert → ∞\]

3 State Transition Matrix

\begin{eqnarray} \dot{\bf x} = {\bf A}(t) {\bf x}(t) + {\bf B}(t) {\bf u}(t)
{\bf x}(t) = {\bf Φ}(t,t0) {\bf x}(t) + ∫t0t {\bf Φ}(t,s){\bf B}(s){\bf u}(s) ds \end{eqnarray}

If $\bf A$ is constant:

  • ${\bf Φ}(t,t0) = e(t-t0){\bf A}$
  • $${\bf Φ}(t,0) = \mathscr{L}-1\left\{\left({\bf I}s - {\bf A}\right)-1\right\}$$ $${\bf Φ}(t,t0) = {\bf Φ}(t-t0,0)$$

Otherwise:

  • Let ${\bf B}(t,t0) = ∫t0t{\bf A}(s)ds$.
  • If ${\bf A} {\bf B} = {\bf B} {\bf A}$, then ${\bf Φ}(t,t0) = e{\bf B}(t,t0)$
  • ${\bf A} {\bf B} = {\bf B} {\bf A}$ when $\bf A$ is constant or diagonal
  • In general, ${\bf A} = {\bf P} {\bf D} {\bf P}-1$ where $\bf D$ is diagonal, then $e\bf A = {\bf P} e\bf D P-1$.

4 Reachability and Observability

Note that complete controllability or observability allows arbitrary pole placement while there lack thereof does not necessarily mean a given set of poles are impossible to produce.

4.1 Reachability Grammian

\[ W(t0,t1) = ∫t0t1 Φ(t1,s) B(s) BT(s) ΦT(t1,s) ds \]

\[ x(t0) = x0 → x(t1) = x1 \iff xt - Φ(t1,t0)x0 ∈ {\mathcal R}(W(t0,t1)) \]

4.2 Reachability Matrix

\[ {\bf Γ} = \left[ {\bf A}0 {\bf B}\ {\bf A}1 {\bf B}\ …\ {\bf A}n-1 {\bf B} \right] \]

\[ {\rm reachable}({\bf x}) \iff {\bf x} ∈ \mathcal{R}({\bf Γ}) \] \[ {\rm controllable}({\bf x}) \iff e{\bf A}t{\bf x} ∈ \mathcal{R}({\bf Γ}) \]

\[{\rm rank}({\bf Γ}) = n \implies {\rm completely\ controllable} \]

4.3 Observability Matrix

\[ \bf Ω = \left[ \begin{array}{c} \bf C
\bf C \bf A
\bf C \bf A2
\vdots
\bf C \bf An-1 \end{array} \right] \] \[ {\rm rank}(\bf Γ) = n \implies {\rm completely\ observable} \]

5 Decomposition

5.1 Kalman Decomposition

Transformation by \[ \bf T = \left[\begin{array}{cccc} {\bf v}co & {\bf v}c\bar{o} & {\bf v}\bar{c}o & {\bf v}\bar{c}\bar{o} \end{array}\right] \]

where: \begin{eqnarray} {\bf v}co ≡ \left\{{\bf x} \arrowvert {\bf x} ∈ \mathcal{R}({\bf Γ}) ∩ \mathcal{N}({\bf Ω})\bot\right\} \nonumber
{\bf v}c\bar{o} ≡ \left\{{\bf x} \arrowvert {\bf x} ∈ \mathcal{R}({\bf Γ}) ∩ \mathcal{N}({\bf Ω})\right\} \nonumber
{\bf v}\bar{c}o ≡ \left\{{\bf x} \arrowvert {\bf x} ∈ \mathcal(R)({\bf Γ})\bot ∩ \mathcal{N}({\bf Ω})\bot\right\} \nonumber
{\bf v}\bar{c}\bar{o} ≡ \left\{{\bf x} \arrowvert {\bf x} ∈ \mathcal{R}({\bf Γ})\bot ∩ \mathcal{N}({\bf Ω})\right\} \nonumber \end{eqnarray}

with: \begin{eqnarray} ˜{\bf x} = \bf T-1 \bf x \nonumber
\dot{˜{\bf x}} = \bf T-1 \bf A \bf T ˜{\bf x} + \bf T-1 \bf B \bf u \nonumber
\bf y = \bf C \bf T ˜{\bf x} \end{eqnarray}

Noting that \begin{eqnarray} \bf C \bf T = \left[\begin{array}{cccc} \bf c1 & 0 & \bf c3 & 0 \end{array}\right] \nonumber
\bf T-1 \bf B = \left[ \begin{array}{c} \bf b1
\bf b2
0
0 \end{array}\right] \nonumber
\bf T-1 \bf A \bf T = \left[ \begin{array}{cccc} A11& 0 &A12 & 0
A21& A22&A23 &A24
0 & 0 &A33 & 0
0 & 0 &A43 & A44 \end{array}\right] \nonumber \end{eqnarray}

Since:

  • Controllable states cannot affect uncontrollable states
  • Uncontrollable states may affect controllable states
  • Observable states may affect unobservable states
  • Unobservable states cannot affect observable states

5.1.1 McMillan Degree

The McMillan degree is given by the dimension of the intersection between the controllable and observable subspaces. That is, the ${\bf v}co$ portion of the Kalman Decomposition.

\[dim(\mathcal{R}({Γ}) ∩ \mathcal{N}({Ω})\bot )\]

6 Controllers

With our system

\[ \dot{{\bf x}} = {\bf A}{\bf x} + {\bf B} {\bf u}\quad {\rm and}\quad {\bf y} = {\bf C}{\bf x} \]

We assume that we will determine ${\bf u}$ based on our current state

\begin{eqnarray} \dot{{\bf x}} = {\bf A}{\bf x} + {\bf B} \left(-{\bf K} {\bf x}\right) \nonumber
\dot{{\bf x}} = \left( {\bf A} - {\bf B} {\bf K}\right) {\bf x} \end{eqnarray}

6.1 Pole Placement

The idea is to pick eigenvalues, $λ$, giving the desired behavior, then determine a gain matrix $\bf K$ that will give the controlled system those eigenvalues. This is done by solving the characteristic equation for $\bf K$. This gives you one scalar equation for each $λ$.

\[ \left| (\bf A - \bf B \bf K) - λ \bf I \right| = 0 \]

An identical but computationally easier approach is to solve this equation by matching the proper coefficients:

\[ \left| (\bf A - \bf B \bf K) - λ \bf I \right| = ∏j=1n(λ - λj) \]

6.2 Optimal Control

We define some metric that our controller must minimize. For the LQ problem, we minimize:

\[ J = ∫t0t1 ({\bf x}T{\bf Q}{\bf x} + {\bf U}T {\bf R} {\bf u})dt + {\bf x}T(t1) {\bf S} {\bf x}(t1) \]

This gives:

\[ {\bf u}(t) = -{\bf R}-1{\bf B}T{\bf P}(t){\bf x}(t) \]

Where ${\bf P}(t)$ solves the Riccati Equation:

\begin{eqnarray} \dot{\bf P} = -{\bf A}T {\bf P} - {\bf P}{\bf A} + {\bf P}{\bf B} {\bf R}-1{\bf B}T{\bf P} - {\bf Q} \nonumber
{\bf P}(t1) = {\bf S}\nonumber \end{eqnarray}

6.2.1 Infinite Horizon

At steady state, $\dot{\bf P} = 0$, so the Riccati equation becomes:

\[ 0 = -{\bf A}T {\bf P} - {\bf P}{\bf A} + {\bf P}{\bf B} {\bf R}-1{\bf B}T{\bf P} - {\bf Q} \nonumber \]

7 Observers

7.1 Luenberger

With our system

\[ \dot{{\bf x}} = {\bf A}{\bf x} + {\bf B} {\bf u}\quad {\rm and}\quad {\bf y} = {\bf C}{\bf x} \]

We have an observed state, $\hat{\bf x}$:

\begin{eqnarray} \hat{ \bf y } = {\bf C} \hat{\bf x}
\dot{ \hat{\bf x}} = {\bf A} \hat{\bf x} + {\bf B} {\bf u} + {\bf L} \left( {\bf y} - \hat{\bf y} \right)
\end{eqnarray}

Where ${\bf L}$ is the gain matrix for the Luenberger observer.

\begin{eqnarray} {\bf e} = {\bf x} - \hat{\bf x}
\dot{{\bf e}} = \dot{{\bf x}} - \dot{\hat{\bf x}} \nonumber
\dot{{\bf e}} = ({\bf A} - {\bf L} {\bf C}) {\bf e} \end{eqnarray}

Where ${\bf e}$ is the error. The derivation is $\dot{\bf e}$ is simple algebra. Thus, the problem of observation reduces to the problem of control. Note that the poles for ${\bf A} - {\bf L} {\bf C}$ can essentially be arbitrarily fast as the observer system only exists inside a computer. In practice, observer poles should be about 10 times faster than controller poles.

7.2 Kalman

  • ${\bf x} ∈ \Ren$ – state vector
  • ${\bf u} ∈ \Rem$ – input vector
  • ${\bf z} ∈ \Res$ – measurement vector
  • ${\bf A} ∈ \Ren × n$ – process matrix
  • ${\bf B} ∈ \Ren × m$ – input gain matrix
  • ${\bf H} ∈ \Res × n$ – state to measurement mapping matrix (${\bf z} = {\bf H} {\bf x} $)
  • ${\bf K} ∈ \Ren × s$ – Kalman gain
  • ${\bf P} ∈ \Ren × n$ – Error Covariance
  • ${\bf Q} ∈ \Ren × n$ – Process Noise Covariance
  • ${\bf R} ∈ \Res × s$ – Measurement Noise Covariance

7.2.1 Predict

\begin{eqnarray} {\hat{\bf x}^-}k = {\bf A} \hat{\bf x}k-1 + {\bf B} {\bf u}k-1
{\bf P}^-k = {\bf A}{\bf P}k-1{\bf A}T + {\bf Q} \end{eqnarray}

7.2.2 Correct

\begin{eqnarray} {\bf K}k = {\bf P}^-k {\bf H}T \left({\bf H} {\bf P}^-k {\bf H}T + R\right)-1
\hat{\bf x}k = \hat{\bf x}^-k + {\bf K}k \left({\bf z}k - {\bf H}\hat{\bf x}^-k\right)
{\bf P}k = \left({\bf I} - {\bf K}k {\bf H}\right) {\bf P}^-k \end{eqnarray}

7.3 Separation Principle

The separation principle states that one may design a feedback controller assuming real $\bf x$ and an observer to find $\hat{\bf x}$ independently, then feed $\hat{\bf x}$ to the controller and have everything still work. This is explained by:

\begin{eqnarray} \dot{\bf x} = \bf A \bf x - \bf B \bf K \hat{\bf x} = (\bf A - \bf B \bf K)\bf x + \bf B \bf K \bf e \nonumber
\dot{\bf e} = (\bf A - \bf L \bf C)\bf e \nonumber \end{eqnarray}

These equations can then be combined into the following system:

\[ \left[ \begin{array}{c} \dot{\bf x}\\ \dot{\bf e} \end{array}\right] = \left[ \begin{array}{cc} \bf A - \bf B \bf K & \bf B \bf K
0 & \bf A - \bf L \bf C \end{array}\right] \]

Because this is an upper triangular block matrix, only the diagonals determine its stability and the controller and observer design already proved those two terms are stable.

Author: Neil T. Dantam <ntd@daneel.golems.org>

Date: 2014-04-14 11:12:39 EDT

HTML generated by org-mode 6.33x in emacs 23