---
title: "Problem set 10: feedback control across the course"
heading: "Problem set 10: problems that combine modeling, classical design, frequency response, state space, estimation and digital implementation"
eyebrow: S9 · Problem set 10
type: problems
---

::: hook
These problems draw on the whole course, and most chain several ideas: a model turned into a controller, a controller checked against its margins, a continuous design converted to code, a state-feedback design paired with an observer. Work them as a review before the final.
:::

::: pool
pick: 12

::: check
kind: parts
given: K = 0.03 | 0.07; R = 1 | 2.5; b = 1e-4 | 4e-4; J = 2e-5 | 6e-5; c = 0.2 | 1

## A motor ($K_t = K_e$ = {K}, R = {R} Ω, b = {b}, J = {J}) gets proportional speed control $K_p$ = {c} V per rad/s.

::: part
answer: K/(R*b + K^2)
unit: rad/s/V
tolerance: 0.5%

### DC gain, rad/s per volt?

::: misses
- [any] $K_t/(Rb + K_tK_e)$.
:::
:::

::: part
answer: 1000*R*J/(R*b + K^2)/(1 + c*K/(R*b + K^2))
unit: ms
tolerance: 0.5%

### Closed-loop time constant?

::: misses
- [any] $\tau_m/(1 + K_pK_0)$.
:::
:::

::: part
answer: 100/(1 + c*K/(R*b + K^2))
unit: %
tolerance: 0.5%

### Steady error to a step?

::: misses
- [any] $1/(1 + K_pK_0)$.
:::
:::
:::

::: check
kind: parts
given: P = 4 | 20; t = 10 | 40; c = 1 | 3; s = 1 | 5

## PI control with $T_i$ = τ for $P = \given{P}/(\tau s + 1)$, τ = {t} ms, a {c} ms closed loop, implemented at {s} kHz by Tustin.

::: part
answer: t/(P*c)
tolerance: 0.5%

### $K_p$?

::: misses
- [any] $\tau/(K_0\tau_c)$.
:::
:::

::: part
answer: t/(P*c)*(1 + 1/(s*2*t))
tolerance: 0.5%

### Coefficient on $e_k$?

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

::: part
answer: s*c
tolerance: 0.5%

### Samples per closed-loop time constant?

::: misses
- [any] $\tau_c/T$.
:::
:::
:::

::: check
kind: parts
given: a = 1 | 3; b = 6 | 12; K = 10 | 40

## $L = \given{K}/(s(s + \given{a})(s + \given{b}))$.

::: part
answer: a*b*(a + b)
tolerance: 0.5%

### Critical gain?

::: misses
- [any] $ab(a + b)$.
:::
:::

::: part
answer: 20*log(a*b*(a + b)/K)
unit: dB
tolerance: 0.05

### Gain margin at K = {K}?

::: misses
- [any] $20\log(K_\text{crit}/K)$.
:::
:::

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

### Period of a relay-test oscillation?

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

::: check
kind: parts
given: a = 4 | 10; w = 2 | 6; R = 0.5 | 2

## $L = K/(s(s + \given{a}))$ placed at $-\given{a}/2 \pm j\given{w}$, tracking a ramp of {R} rad/s.

::: part
answer: a^2/4 + w^2
tolerance: 0.5%

### K?

::: misses
- [any] Magnitude condition.
:::
:::

::: part
answer: R*a/(a^2/4 + w^2)
unit: rad
tolerance: 0.5%

### Ramp lag?

::: misses
- [any] $R/K_v$, $K_v = K/a$.
:::
:::

::: part
answer: 100*exp(-pi*(a/2)/w)
unit: %
tolerance: 0.5%

### Overshoot?

::: misses
- [any] $e^{-\pi\sigma/\omega_d}$.
:::
:::
:::

::: check
kind: parts
given: K = 10 | 40; t = 0.1 | 0.2; w = 25 | 50; P = 45 | 55

## Frequency-domain lead for $G = \given{K}/(s(\given{t}s + 1))$ at {w} rad/s with {P}° of margin.

::: part
answer: P - 90 + atan(w*t)*180/pi
unit: °
tolerance: 0.5%

### Lead needed?

::: misses
- [any] Target phase minus plant phase.
:::
:::

::: part
answer: (1 + sin((P - 90 + atan(w*t)*180/pi)*pi/180))/(1 - sin((P - 90 + atan(w*t)*180/pi)*pi/180))
tolerance: 0.5%

### α?

::: misses
- [any] $\frac{1 + \sin\phi}{1 - \sin\phi}$.
:::
:::

::: part
answer: w/sqrt((1 + sin((P - 90 + atan(w*t)*180/pi)*pi/180))/(1 - sin((P - 90 + atan(w*t)*180/pi)*pi/180)))
unit: rad/s
tolerance: 0.5%

### Lead zero?

::: misses
- [any] $\omega_c/\sqrt{\alpha}$.
:::
:::
:::

::: check
kind: parts
given: K = 2 | 8; h = 0.02 | 0.1; P = 50 | 60; f = 0.2 | 1; s = 5 | 20

## The plant $Ke^{-s\theta}/s$ (K = {K}, θ = {h} s) under proportional control; and a digital loop at {s} kHz crossing at {f} kHz.

::: part
answer: (90 - P)*pi/180/(K*h)
tolerance: 0.5%

### $K_p$ for {P}° of margin?

::: misses
- [any] $(90° - \text{PM})/(K\theta)$.
:::
:::

::: part
answer: P*pi/180/((90 - P)*pi/180/h)*1000
unit: ms
tolerance: 0.5%

### Delay margin?

::: misses
- [any] PM over $\omega_c$.
:::
:::

::: part
answer: 1.5*2*pi*f/s*180/pi
unit: °
tolerance: 0.5%

### Phase the digital loop loses to 1.5 samples?

::: misses
- [any] $1.5\omega_cT_s$.
:::
:::
:::

::: check
kind: parts
given: R = 3 | 15; D = 0.35 | 0.6; L = 10 | 22; p = 2000 | 8000

## A boost converter (L = {L} µH, R = {R} Ω, D = {D}), and a plant whose RHP zero is that one with an RHP pole at {p} rad/s.

::: part
answer: R*(1 - D)^2/(L*1e-6)
unit: rad/s
tolerance: 0.5%

### RHP zero in rad/s?

::: misses
- [any] $R(1 - D)^2/L$.
:::
:::

::: part
answer: (R*(1 - D)^2/(L*1e-6) + p)/(R*(1 - D)^2/(L*1e-6) - p)
tolerance: 0.5%

### Least $M_s$?

::: misses
- [any] $(z + p)/(z - p)$.
:::
:::
:::

::: check
kind: parts
given: a = -4 | -1; b = 1 | 2; c = 0.5 | 1.2; d = -3 | -2; e = 1 | 2; f = 1 | -1

## $A = \begin{pmatrix} \given{a} & \given{b} \\ \given{c} & \given{d} \end{pmatrix}$, $B = \begin{pmatrix} \given{e} \\ \given{f} \end{pmatrix}$.

::: part
answer: ((a + d) + sqrt((a + d)^2 - 4*(a*d - b*c)))/2
tolerance: 0.5%

### Larger eigenvalue?

::: misses
- [any] From the trace and determinant.
:::
:::

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

### $\det[B, AB]$?

::: misses
- [any] Controllability determinant.
:::
:::
:::

::: check
kind: parts
given: t = 30 | 80; K = 6 | 20; w = 30 | 60; v = 150 | 300; z = 0.7 | 0.8

## A servo $\ddot\theta = -\dot\theta/\tau + (K_0/\tau)u$ (τ = {t} ms, $K_0$ = {K}) placed at $\omega_n$ = {w}, ζ = {z}, with an observer measuring θ at $\omega_o$ = {v}, same ζ.

::: part
answer: (2*z*w - 1000/t)/(K*1000/t)
tolerance: 0.5%

### Velocity gain $k_2$?

::: misses
- [any] $(2\zeta\omega_n - 1/\tau)/(K_0/\tau)$.
:::
:::

::: part
answer: v^2 - 1000/t*(2*z*v - 1000/t)
tolerance: 0.5%

### Observer gain $l_2$?

::: misses
- [any] $\omega_o^2 - al_1$ with $a = 1/\tau$.
:::
:::
:::

::: check
kind: parts
given: a = -2 | 1; b = 1 | 2; q = 4 | 25; r = 0.25 | 1; W = 1 | 9; V = 0.1 | 1

## $\dot{x} = \given{a}x + \given{b}u + w$, y = x + v: an LQR with weights q = {q}, r = {r}, and a Kalman filter with intensities $R_w$ = {W}, $R_v$ = {V}.

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

### LQR pole?

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

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

### Kalman error pole?

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

::: check
kind: parts
given: Q = 0.002 | 0.05; R = 0.1 | 1; x = 20 | 60; d = -1 | 2

## A random walk (Q = {Q}) measured with variance R = {R}, in steady state; the prior is {x} and a reading arrives {d} away.

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

### Steady-state gain?

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

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

### Updated estimate?

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

::: check
kind: parts
given: d = 2 | 6; a = 0.4 | 1.2; T = 3 | 10; K = 1.5 | 4; t = 8 | 40; h = 1 | 4

## A relay test (±{d}) gives amplitude {a} and period {T} s; separately, an FOPDT plant with K = {K}, τ = {t} s, θ = {h} s.

::: part
answer: 0.6*4*d/(pi*a)
tolerance: 0.5%

### Ziegler–Nichols PID $K_p$?

::: misses
- [any] $0.6 \times 4d/\pi a$.
:::
:::

::: part
answer: T/2
unit: s
tolerance: 0.5%

### Its $T_i$?

::: misses
- [any] $T_u/2$.
:::
:::

::: part
answer: t/(2*K*h)
tolerance: 0.5%

### SIMC $K_p$ for the FOPDT plant ($\tau_c$ = θ)?

::: misses
- [any] $\tau/(2K\theta)$.
:::
:::
:::

::: check
kind: parts
given: x = 4 | 15; l = 0.3 | 1

## A maglev rig at a {x} mm gap; a {l} m inverted pendulum.

::: part
answer: 2*sqrt(2*9.81/(x*1e-3))
unit: rad/s
tolerance: 0.5%

### Least crossover for the maglev loop by the 2p rule?

::: misses
- [any] Twice $\sqrt{2g/x_0}$.
:::
:::

::: part
answer: 2*sqrt(9.81/l)
unit: rad/s
tolerance: 0.5%

### Least crossover for the pendulum loop?

::: misses
- [any] Twice $\sqrt{g/l}$.
:::
:::
:::

::: check
kind: parts
given: s = 0.3 | 1; t = 0.1 | 0.5; u = 0.2 | 2

## Three independent sensors measure one quantity with σ = {s}, {t} and {u}.

::: part
answer: 1/sqrt(1/s^2 + 1/t^2 + 1/u^2)
tolerance: 0.5%

### What standard deviation does the best combination have?

::: misses
- [any] Add inverse variances.
:::
:::

::: part
answer: (1/t^2)/(1/s^2 + 1/t^2 + 1/u^2)
tolerance: 0.5%

### What weight goes to the second sensor?

::: misses
- [any] Its inverse variance over the sum.
:::
:::
:::

::: check
kind: parts
given: f = 5 | 20; v = 50 | 200; g = 0.5 | 0.8 | 0.95

## A position loop crossing at {f} Hz follows a target at {v} rad/s; a velocity feedforward supplies {g} of the needed speed command.

::: part
answer: (1 - g)*v/(2*pi*f)
unit: rad
tolerance: 0.5%

### What following error remains?

::: misses
- [v/(2*pi*f)] The feedforward removes its share.
- [any] $(1 - g)v/K_p$.
:::
:::
:::
:::
