Berkeley Notes
  • Introduction
  • EE120
    • Introduction to Signals and Systems
    • The Fourier Series
    • The Fourier Transform
    • Generalized transforms
    • Linear Time-Invariant Systems
    • Feedback Control
    • Sampling
    • Appendix
  • EE123
    • The DFT
    • Spectral Analysis
    • Sampling
    • Filtering
  • EECS126
    • Introduction to Probability
    • Random Variables and their Distributions
    • Concentration
    • Information Theory
    • Random Processes
    • Random Graphs
    • Statistical Inference
    • Estimation
  • EECS127
    • Linear Algebra
    • Fundamentals of Optimization
    • Linear Algebraic Optimization
    • Convex Optimization
    • Duality
  • EE128
    • Introduction to Control
    • Modeling Systems
    • System Performance
    • Design Tools
    • Cascade Compensation
    • State-Space Control
    • Digital Control Systems
    • Cayley-Hamilton
  • EECS225A
    • Hilbert Space Theory
    • Linear Estimation
    • Discrete Time Random Processes
    • Filtering
  • EE222
    • Real Analysis
    • Differential Geometry
    • Nonlinear System Dynamics
    • Stability of Nonlinear Systems
    • Nonlinear Feedback Control
Powered by GitBook
On this page
  • Design by Transformation
  • Observers/State Estimators
  • Integrators in State Feedback
  • Linear Quadratic Regulator

Was this helpful?

  1. EE128

State-Space Control

The basic idea behind state space control is to use the state of the system in order to set the input. Namely, if we are given

dxdt=Ax+Bu,\frac{d^{}\mathbf{x}}{dt^{}} = A\mathbf{x}+B\mathbf{u},dtdx​=Ax+Bu,

then we can let u=r−Kx\mathbf{u} = \mathbf{r} - K\mathbf{x}u=r−Kx. If we do this, then the equivalent state-evolution equation becomes

dxdt=(A−BK)x+Br.\frac{d^{}\mathbf{x}}{dt^{}} = (A-BK)\mathbf{x}+B\mathbf{r}.dtdx​=(A−BK)x+Br.

Notice that if our system is in phase variable form, then the controlled state-evolution equation is

dxdt=[0100⋯0010⋯00⋱⋱⋱00⋯01−a0−k0−a1−k1⋯−an−2−kn−2−an−1kn−1]x+Br.\frac{d^{}\mathbf{x}}{dt^{}} = \begin{bmatrix} 0 & 1 & 0 & 0 & \cdots\\ 0 & 0 & 1 & 0 & \cdots\\ 0 & 0 & \ddots & \ddots & \ddots\\ 0 & 0 & \cdots & 0 & 1\\ -a_0-k_0 & -a_1-k_1 & \cdots & -a_{n-2}-k_{n-2} & -a_{n-1}k_{n-1} \end{bmatrix}\mathbf{x} + B\mathbf{r}.dtdx​=​0000−a0​−k0​​1000−a1​−k1​​01⋱⋯⋯​00⋱0−an−2​−kn−2​​⋯⋯⋱1−an−1​kn−1​​​x+Br.

This makes it very convenient to place our poles where we want since the last row of the AAA matrix is also the coefficients of the characteristic polynomial.

Design by Transformation

Suppose we have a system

dzdt=Az+Buy=Cz\frac{d^{}\mathbf{z}}{dt^{}} = A\mathbf{z}+B\mathbf{u} \qquad \mathbf{y} = C\mathbf{z}dtdz​=Az+Buy=Cz

which is not in phase variable form. To place it into phase variable form, first assume that z=Px\mathbf{z} = P\mathbf{x}z=Px for some invertible matrix PPP.

Pdxdt=APx+Bu  ⟹  dxdt+P−1Buy=CPx.P\frac{d^{}\mathbf{x}}{dt^{}} = AP\mathbf{x}+B\mathbf{u} \implies \frac{d^{}\mathbf{x}}{dt^{}} + P^{-1}B\mathbf{u} \qquad \mathbf{y} = CP\mathbf{x}.Pdtdx​=APx+Bu⟹dtdx​+P−1Buy=CPx.

Since our transformation is invertible, the controllability of the system is unchanged, so

Cx=[P−1BP−1AB⋯P−1An−1B]=P−1Cz.\mathcal{C}_x = \begin{bmatrix} P^{-1}B & P^{-1} AB \cdots P^{-1}A^{n-1}B \end{bmatrix} = P^{-1}\mathcal{C}_z.Cx​=[P−1B​P−1AB⋯P−1An−1B​]=P−1Cz​.

Assuming the system is controllable, P=CzCx−1P = \mathcal{C}_z\mathcal{C}_x^{-1}P=Cz​Cx−1​. Now we can apply state feedback to the phase variable system.

dxdt=P−1APx+P−1B(−Kx+r)=P−1(AP−BK)P−1z+Br  ⟹  Kz=KzP−1.\frac{d^{}\mathbf{x}}{dt^{}} = P^{-1}AP\mathbf{x}+P^{-1}B(-K\mathbf{x}+\mathbf{r}) = P^{-1}(AP-BK)P^{-1}\mathbb z + Br \implies K_z = K_zP^{-1}.dtdx​=P−1APx+P−1B(−Kx+r)=P−1(AP−BK)P−1z+Br⟹Kz​=Kz​P−1.

Observers/State Estimators

When doing state feedback, we often don’t have access to the states themselves because we only have access to y\mathbf{y}y. In that case, we can’t use u=r−Kx\mathbf{u}=\mathbf{r}-K\mathbf{x}u=r−Kx because we don’t know x\mathbf{x}x. One idea is to keep track of an estimated state x^\hat{\mathbf{x}}x^ and estimated output y^\hat{\mathbf{y}}y^​ which follow the same system dynamics as the actual state and the actual output and receive the same input. If AAA is a stable matrix, then lim⁡t→∞eAtx0=0\lim_{t\to\infty}e^{At}\mathbf{x}_0=0limt→∞​eAtx0​=0 where x0\mathbf{x}_0x0​ is the initial state of the system. This means that even if there is a discrepancy between the estimated state and the true state in the beginning, the estimate will match the true state after some time.

Suppose now that we want to control the error between the true state and the estimated state e=x−x^\mathbf{e} = \mathbf{x} - \hat{\mathbf{x}}e=x−x^, so we add a gain LLL to the error in the outputs y−y^\mathbf{y}-\hat{\mathbf{y}}y−y^​.

dx^dt=Ax^+Bu+L(y−y^)=Ax^+Bu+LC(x−x^)dedt=d(x−x^)dt=Ax+Bu−[Ax^+Bu+LC(x−x^)]∴dedt=(A−LC)e\begin{aligned} \frac{d^{}\hat{\mathbf{x}}}{dt^{}} &= A\hat{\mathbf{x}} + B\mathbf{u} + L(\mathbf{y}-\hat{\mathbf{y}}) = A\hat{\mathbf{x}}+B\mathbf{u}+LC(\mathbf{x}-\hat{\mathbf{x}})\\ \frac{d^{}\mathbf{e}}{dt^{}} &= \frac{d^{}(\mathbf{x}-\hat{\mathbf{x}})}{dt^{}} = A\mathbf{x}+B\mathbf{u} - \left[A\hat{\mathbf{x}}+B\mathbf{u}+LC(\mathbf{x}-\hat{\mathbf{x}})\right]\\ \therefore \frac{d^{}\mathbf{e}}{dt^{}} &= (A-LC)\mathbf{e}\end{aligned}dtdx^​dtde​∴dtde​​=Ax^+Bu+L(y−y^​)=Ax^+Bu+LC(x−x^)=dtd(x−x^)​=Ax+Bu−[Ax^+Bu+LC(x−x^)]=(A−LC)e​

Thus we can design LLL to get quick error convergence. Notice that if our system is not observable, then we will not be able to place the poles of the observer system where we want them to be.

Now, if we we do state feedback using the estimated state, then

dxdt=Ax+B(r−Kx^)=(A−BK)x+B(r−Ke).\frac{d^{}\mathbf{x}}{dt^{}} = A\mathbf{x}+B(\mathbf{r}-K\hat{\mathbf{x}}) = (A-BK)\mathbf{x}+B(\mathbf{r}-K\mathbf{e}).dtdx​=Ax+B(r−Kx^)=(A−BK)x+B(r−Ke).

Looking at the combined system,

[dxdtdedt]=[A−BK−BK0A−LC][xe]+[B0]r.\begin{bmatrix} \frac{d^{}\mathbf{x}}{dt^{}} \\ \frac{d^{}\mathbf{e}}{dt^{}} \end{bmatrix} = \begin{bmatrix} A-BK & -BK \\ 0 & A-LC \end{bmatrix} \begin{bmatrix} \mathbf{x} \\ \mathbf{e} \end{bmatrix} + \begin{bmatrix} B \\ \boldsymbol{0} \end{bmatrix}\mathbf{r}.[dtdx​dtde​​]=[A−BK0​−BKA−LC​][xe​]+[B0​]r.

Notice that the poles of this system are just the poles of the original system and the poles of the observer system, so we can choose KKK and LLL independently.

Integrators in State Feedback

Suppose we wanted to get rid of the steady state error using state-space control. We would do this using an integrator over the error in the observed outputs.

xN=∫0t(r⃗−y⃗)dt.\mathbf{x}_N = \int_{0}^{t}(\vec{r}-\vec{y})dt.xN​=∫0t​(r−y​)dt.

If we treat this as a new state, its evolution will be

dxNdt=r−Cx.\frac{d^{}\mathbf{x}_N}{dt^{}} = r - C\mathbf{x}.dtdxN​​=r−Cx.

If our new control law is u=−Kx+KexN\mathbf{u} = -K\mathbf{x}+K_e\mathbf{x}_Nu=−Kx+Ke​xN​, then our new state-space equations are

[dxdtdxNdt]=[A0−C0][xxN]+[B0]+[0I]r.\begin{aligned} \begin{bmatrix} \frac{d^{}\mathbf{x}}{dt^{}} \\ \frac{d^{}\mathbf{x}_N}{dt^{}} \end{bmatrix} = \begin{bmatrix} A & 0 \\ -C & 0 \end{bmatrix} \begin{bmatrix} \mathbf{x} \\ \mathbf{x}_N \end{bmatrix} + \begin{bmatrix} B \\ \boldsymbol{0} \end{bmatrix} + \begin{bmatrix} \boldsymbol{0} \\ \boldsymbol{I} \end{bmatrix}\mathbf{r}.\end{aligned}[dtdx​dtdxN​​​]=[A−C​00​][xxN​​]+[B0​]+[0I​]r.​

When we apply our feedback rule, we get

[dxdtdxNdt]=[A−BKBKe−C0][xxN]+[0I]r.\begin{aligned} \begin{bmatrix} \frac{d^{}\mathbf{x}}{dt^{}} \\ \frac{d^{}\mathbf{x}_N}{dt^{}} \end{bmatrix} = \begin{bmatrix} A-BK & BK_e \\ -C & 0 \end{bmatrix} \begin{bmatrix} \mathbf{x} \\ \mathbf{x}_N \end{bmatrix} + \begin{bmatrix} \boldsymbol{0} \\ \boldsymbol{I} \end{bmatrix}\mathbf{r}.\end{aligned}[dtdx​dtdxN​​​]=[A−BK−C​BKe​0​][xxN​​]+[0I​]r.​

Linear Quadratic Regulator

Suppose we want to control our system to send the state to 0\boldsymbol{0}0 over an infinite time horizon using the input −Kx-K\mathbf{x}−Kx. We want to do this by optimizing a cost function that penalizes control effort and the state error. In particular, we want to minimize the cost function

J=∫0∞yTQy+uTRudt.J = \int_{0}^{\infty}\mathbf{y}^TQ\mathbf{y} + \mathbf{u}^TR\mathbf{u} dt.J=∫0∞​yTQy+uTRudt.

where RRR and QQQ are positve-semi-definite matrices (typically diagonal) and determine how much we penalize the error and the control effort.

PreviousCascade CompensationNextDigital Control Systems

Last updated 3 years ago

Was this helpful?

Figure 12: State Observer System