---
title: "Problem set 8: observers, optimal control, digital control and nonlinear effects"
heading: "Problem set 8: observers and separation, LQR, Kalman filtering, sampled-data control and describing functions"
eyebrow: S9 · Problem set 8
type: problems
---

::: hook
These problems cover lessons 37 to 43: observer design and the separation principle, the linear-quadratic regulator and Bryson's weights, the Kalman filter in discrete and continuous time, model predictive control, sampled plants and digital controllers, and saturation, describing functions and limit cycles.
:::

::: pool
pick: 12

::: check
kind: parts
given: w = 10 | 40 | 150; z = 0.6 | 0.9

## A double-integrator observer measuring position, error poles at $\omega_o$ = {w}, ζ = {z}.

::: part
answer: 2*z*w
tolerance: 0.5%

### $l_1$?

::: misses
- [any] $2\zeta\omega_o$.
:::
:::

::: part
answer: w^2
tolerance: 0.5%

### $l_2$?

::: misses
- [any] $\omega_o^2$.
:::
:::

::: part
answer: 4/(z*w)*1000
unit: ms
tolerance: 0.5%

### Settling time of the estimates?

::: misses
- [any] $4/\zeta\omega_o$.
:::
:::
:::

::: check
kind: parts
given: a = 8 | 40; w = 120 | 400; z = 0.7 | 0.8

## A servo $\ddot\theta = -\given{a}\dot\theta + bu$ measuring θ, observer at $\omega_o$ = {w}, ζ = {z}.

::: part
answer: 2*z*w - a
tolerance: 0.5%

### $l_1$?

::: misses
- [any] $2\zeta\omega_o - a$.
:::
:::

::: part
answer: w^2 - a*(2*z*w - a)
tolerance: 0.5%

### $l_2$?

::: misses
- [any] $\omega_o^2 - al_1$.
:::
:::
:::

::: check
kind: parts
given: a = -2 | 1; b = 1 | 3; c = 0.5 | 1.5; d = -3 | -1; e = 1 | 2; f = 1 | -1; w = 6 | 30; v = 25 | 120

## $A = \begin{pmatrix} \given{a} & \given{b} \\ \given{c} & \given{d} \end{pmatrix}$ with $C = \begin{pmatrix} \given{e} & \given{f} \end{pmatrix}$; a controller at $\omega_n$ = {w} with an observer at $\omega_o$ = {v}.

::: part
answer: e*(e*b + f*d) - f*(e*a + f*c)
tolerance: 0.5%

### $\det\begin{pmatrix} C \\ CA \end{pmatrix}$?

::: misses
- [any] Compute CA, then the determinant.
:::
:::

::: part
answer: w^2*v^2
tolerance: 0.5%

### Constant term of the closed-loop polynomial?

::: misses
- [any] Product of the two.
:::
:::
:::

::: check
kind: parts
given: a = -1 | 2; b = 1 | 3; q = 2 | 20; r = 0.2 | 2; x = 2 | 4

## LQR for $\dot{x} = \given{a}x + \given{b}u$ with q = {q}, r = {r}, from x(0) = {x}.

::: part
answer: -sqrt(a^2 + b^2*q/r)
unit: rad/s
tolerance: 0.5%

### Closed-loop pole?

::: misses
- [any] $-\sqrt{a^2 + b^2q/r}$.
:::
:::

::: part
answer: (a + sqrt(a^2 + b^2*q/r))/b
tolerance: 0.5%

### Gain?

::: misses
- [any] $bP/r$.
:::
:::

::: part
answer: r/b^2*(a + sqrt(a^2 + b^2*q/r))*x^2
tolerance: 0.5%

### Minimum cost?

::: misses
- [any] $Px_0^2$.
:::
:::
:::

::: check
kind: parts
given: q = 9 | 256 | 4096

## A double integrator's LQR with Q = diag({q}, 0), R = 1.

::: part
answer: sqrt(q)
tolerance: 0.5%

### Position gain?

::: misses
- [any] $\sqrt{q}$.
:::
:::

::: part
answer: sqrt(2*sqrt(q))
tolerance: 0.5%

### Velocity gain?

::: misses
- [any] $\sqrt{2\sqrt{q}}$.
:::
:::

::: part
answer: q^0.25
unit: rad/s
tolerance: 0.5%

### Closed-loop natural frequency?

::: misses
- [any] $q^{1/4}$.
:::
:::
:::

::: check
kind: parts
given: x = 0.02 | 0.5; u = 6 | 30; a = -2 | 1; b = 1 | 4; p = 6 | 25

## Bryson's rule with $x_\max$ = {x}, $u_\max$ = {u}; and a target LQR pole at −{p} for $\dot{x} = \given{a}x + \given{b}u$.

::: part
answer: u^2/x^2
tolerance: 0.5%

### q/r by Bryson?

::: misses
- [any] $u_\max^2/x_\max^2$.
:::
:::

::: part
answer: (p^2 - a^2)/b^2
tolerance: 0.5%

### q/r for the target pole?

::: misses
- [any] $(p^2 - a^2)/b^2$.
:::
:::
:::

::: check
kind: parts
given: Q = 0.0005 | 0.02 | 0.2; R = 0.05 | 0.5

## A random walk (step variance {Q}) measured with noise variance {R}.

::: part
answer: (Q + sqrt(Q^2 + 4*Q*R))/2/((Q + sqrt(Q^2 + 4*Q*R))/2 + R)
tolerance: 0.5%

### Steady-state Kalman gain?

::: misses
- [any] $P^-/(P^- + R)$.
:::
:::

::: part
answer: sqrt((Q + sqrt(Q^2 + 4*Q*R))/2/((Q + sqrt(Q^2 + 4*Q*R))/2 + R)*R)
tolerance: 0.5%

### Estimate's standard deviation?

::: misses
- [any] $\sqrt{KR}$.
:::
:::
:::

::: check
kind: parts
given: x = 12 | 80; p = 0.05 | 1; r = 0.2 | 2; d = -4 | 1.5

## A prior {x} (variance {p}) and a measurement {d} away from it (variance {r}).

::: part
answer: x + p/(p + r)*d
tolerance: 0.1%

### Updated estimate?

::: misses
- [any] $\hat{x}^- + K(y - \hat{x}^-)$.
:::
:::

::: part
answer: p*r/(p + r)
tolerance: 0.5%

### Updated variance?

::: misses
- [any] $(1 - K)P^-$.
:::
:::
:::

::: check
kind: parts
given: a = -2 | 0.5 | 3; W = 0.5 | 20; V = 0.02 | 2

## A continuous-time Kalman filter for $\dot{x} = \given{a}x + w$, y = x + v, $R_w$ = {W}, $R_v$ = {V}.

::: part
answer: a + sqrt(a^2 + W/V)
tolerance: 0.5%

### Gain L?

::: misses
- [any] $a + \sqrt{a^2 + R_w/R_v}$.
:::
:::

::: part
answer: -sqrt(a^2 + W/V)
unit: rad/s
tolerance: 0.5%

### Error pole?

::: misses
- [any] a − L.
:::
:::
:::

::: check
kind: parts
given: t = 3 | 12; T = 0.5 | 2; K = 4 | 25; s = 60 | 250; w = 50 | 200

## A plant $\given{K}/(\tau s + 1)$, τ = {t} ms, sampled every {T} ms; and a pole pair $-\given{s} \pm j\given{w}$ sampled the same way.

::: part
answer: K*(1 - exp(-T/t))
tolerance: 0.5%

### Γ?

::: misses
- [any] $K_0(1 - e^{-T/\tau})$.
:::
:::

::: part
answer: (1 + exp(-T/t))/(K*(1 - exp(-T/t)))
tolerance: 0.5%

### Largest stable proportional gain?

::: misses
- [any] $(1 + \Phi)/\Gamma$.
:::
:::

::: part
answer: exp(-s*T/1000)
tolerance: 0.5%

### Radius of the sampled pole pair?

::: misses
- [any] $e^{-\sigma T}$.
:::
:::
:::

::: check
kind: parts
given: K = 0.3 | 2; i = 3 | 15; T = 0.5 | 2; f = 150 | 350; s = 1 | 4

## Tustin conversion of a PI ($K_p$ = {K}, $T_i$ = {i} ms) at T = {T} ms; and prewarping a {f} Hz corner at {s} kHz.

::: part
answer: K*(1 + T/(2*i))
tolerance: 0.5%

### Coefficient on $e_k$?

::: misses
- [any] $K_p(1 + T/2T_i)$.
:::
:::

::: part
answer: -K*(1 - T/(2*i))
tolerance: 0.5%

### Coefficient on $e_{k-1}$?

::: misses
- [any] $-K_p(1 - T/2T_i)$.
:::
:::

::: part
answer: tan(pi*f/(s*1000))/(pi/(s*1000))
unit: Hz
tolerance: 0.5%

### Prewarped analog corner?

::: misses
- [any] $\tan(\pi fT)/(\pi T)$.
:::
:::
:::

::: check
kind: parts
given: d = 1 | 4; K = 20 | 80; a = 1 | 2; b = 5 | 8; c = 12 | 20

## A ±{d} relay drives $L = \given{K}/((s + \given{a})(s + \given{b})(s + \given{c}))$.

::: part
answer: 2*pi/sqrt(a*b + b*c + c*a)
unit: s
tolerance: 0.5%

### Predicted period?

::: misses
- [any] $2\pi/\sqrt{ab + bc + ca}$.
:::
:::

::: part
answer: 4*d/pi*K/((a + b + c)*(a*b + b*c + c*a) - a*b*c)
tolerance: 0.5%

### Predicted amplitude?

::: misses
- [any] $\frac{4d}{\pi}|L(j\omega_{180})|$.
:::
:::

::: part
answer: ((a + b + c)*(a*b + b*c + c*a) - a*b*c)/K
tolerance: 0.5%

### Ultimate gain a relay test would report?

::: misses
- [any] $4d/(\pi a)$ at that amplitude, which is $1/|L(j\omega_{180})|$.
:::
:::
:::

::: check
kind: parts
given: r = 1.4 | 3 | 6; t = 4 | 30; f = 0.5 | 0.9; a = 1 | 5; q = 2 | 6

## A saturation driven at {r} times its limit; a plant with τ = {t} ms driven flat out to {f} of its full output; $\dot{x} = -\given{a}x$ with Lyapunov weight q = {q}.

::: part
answer: 2/pi*(asin(1/r) + 1/r*sqrt(1 - 1/r^2))
tolerance: 0.5%

### Saturation's describing function?

::: misses
- [any] The saturation formula.
:::
:::

::: part
answer: -t*ln(1 - f)
unit: ms
tolerance: 0.5%

### Time to reach {f} of full output?

::: misses
- [any] $-\tau\ln(1 - f)$.
:::
:::

::: part
answer: q/(2*a)
tolerance: 0.5%

### Lyapunov P?

::: misses
- [any] $q/2a$.
:::
:::
:::

::: check
kind: parts
given: a = 0.05 | 0.2 | 1; b = 0.02 | 0.1 | 1; w = 0.5 | 2; z = 0.7 | 0.9

## A plant $\dot x = -\given{a}x + \given{b}(u + d)$ with constant unknown d gets an observer estimating x and d, with error poles at $\omega_o$ = {w}, ζ = {z}.

::: part
answer: 2*z*w - a
tolerance: 0.5%

### What is $l_1$?

::: misses
- [any] $2\zeta\omega_o - a$.
:::
:::

::: part
answer: w^2/b
tolerance: 0.5%

### What is $l_2$?

::: misses
- [any] $\omega_o^2/b$.
:::
:::
:::

::: check
kind: parts
given: D = 0.1 | 0.5; r = 1.5 | 3 | 10; let a = r*D

## A dead zone of half-width {D} is driven at amplitude {a}.

::: part
answer: 1 - 2/pi*(asin(1/r) + 1/r*sqrt(1 - 1/r^2))
tolerance: 0.5%

### What is its describing function?

::: misses
- [2/pi*(asin(1/r) + 1/r*sqrt(1 - 1/r^2))] That's the saturation's; the dead zone is one minus it.
- [any] One minus the saturation's N with limit D.
:::
:::
:::

::: check
kind: parts
given: a = 0.9 | 1.2 | 1.6; b = 0.5 | 2; r = 0.1 | 1; um = 1 | 3

## A one-step MPC controls $x^+ = \given{a}x + \given{b}u$ with weights 1 and {r}, and $|u| \le$ {um}.

::: part
answer: a*b/(r + b^2)
tolerance: 0.5%

### What gain does the unconstrained one-step MPC apply?

::: misses
- [a/b] That's deadbeat; include the input weight.
- [any] Not yet. $ab/(r + b^2)$.
:::
:::

::: part
answer: a - b*a*b/(r + b^2)
tolerance: 0.5%

### Where is the closed-loop pole without saturation?

::: misses
- [a + b*a*b/(r + b^2)] With $u = -Kx$ the pole is $a - bK$.
- [any] Not yet. $a - bK$.
:::
:::

::: right
Right. Constraints then limit how far from the origin that pole still governs the behavior.
:::
:::
:::
