---
title: "Problem set 9: integral action, discrete design, Lyapunov and multivariable control"
heading: "Problem set 9: integral state feedback, z-plane specifications and sample rates, velocity-form PI and coefficient precision, Lyapunov equations and regions of attraction, relative gains, decouplers and conditioning"
eyebrow: S9 · Problem set 9
type: problems
---

::: hook
These problems cover lessons 35, 40, 42 and 44 with the state-space and digital control labs: integral action added to state feedback, specifications and sample rates for discrete controllers, the velocity form and coefficient precision, Lyapunov functions for linear and nonlinear systems, and the relative gains, decouplers and condition numbers of multivariable plants.
:::

::: pool
pick: 12

::: check
kind: parts
given: a = -1 | 1 | 3; b = 2 | 5; w = 3 | 8 | 20; z = 0.7 | 1

## A plant $\dot x = -\given{a}x + \given{b}u$ (a negative a means it's unstable) gets integral state feedback with closed-loop poles at $\omega_n$ = {w} rad/s, ζ = {z}.

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

### What is k?

::: misses
- [any] Match $s^2 + (a + bk)s + bk_i$.
:::
:::

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

### What is $k_i$?

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

::: check
kind: parts
given: p = 3 | 10 | 30; q = 2 | 5

## A double integrator $\ddot y = \given{q}u$ gets integral state feedback with all three poles at −{p}.

::: part
answer: 3*p^2/q
tolerance: 0.5%

### What position gain $k_1$?

::: misses
- [3*p^2] The input gain divides every gain.
- [any] $3p^2/b$.
:::
:::

::: part
answer: p^3/q
tolerance: 0.5%

### What integral gain $k_i$?

::: misses
- [any] $p^3/b$.
:::
:::
:::

::: check
kind: parts
given: a = 0.5 | 2; b = 1 | 4; k = 1 | 2.5; d = 0.2 | 1; e = 20 | -25

## State feedback with reference gain was designed for $\dot x = -\given{a}x + \given{b}u$ with k = {k}. The real input gain is {e}% off, and a constant disturbance of {d} adds to u.

::: part
answer: b*(1 + e/100)*(a + b*k)/b/(a + b*(1 + e/100)*k) + b*(1 + e/100)*d/(a + b*(1 + e/100)*k)
tolerance: 0.5%

### Where does the output settle for a unit setpoint?

::: misses
- [any] $b'(k_r + d)/(a + b'k)$ with $k_r = (a + bk)/b$.
:::
:::

::: part
answer: 1
tolerance: 0.5%

### Where does it settle with a stable integral state added instead?

::: misses
- [any] $\dot z = r - y$ is zero in steady state.
:::
:::
:::

::: check
kind: parts
given: z = 0.5 | 0.7 | 0.9; w = 10 | 40; T = 2 | 10

## A design wants ζ = {z}, $\omega_n$ = {w} rad/s, sampled every {T} ms.

::: part
answer: 2*exp(-z*w*T*1e-3)*cos(w*sqrt(1 - z^2)*T*1e-3)
tolerance: 0.5%

### What is minus the z coefficient of the desired discrete polynomial?

::: misses
- [any] $2e^{-\zeta\omega_nT}\cos\omega_dT$.
:::
:::

::: part
answer: exp(-2*z*w*T*1e-3)
tolerance: 0.5%

### And its constant term?

::: misses
- [any] $e^{-2\zeta\omega_nT}$.
:::
:::
:::

::: check
kind: parts
given: w = 30 | 100 | 400; P = 5 | 15; c = 0 | 0.5 | 1

## A loop crosses over at {w} rad/s. Its hold costs half a sample and its computation {c} sample(s) more; at most {P}° may be lost.

::: part
answer: (0.5 + c)*w/(P*pi/180)/(2*pi)
unit: Hz
tolerance: 0.5%

### What is the lowest sample rate?

::: misses
- [any] Solve $(\frac12 + c)\omega_cT = $ {P}° in radians.
:::
:::
:::

::: check
kind: parts
given: K = 0.5 | 3; I = 0.02 | 0.1; u = 1 | -0.5; e = 0.5 | 2; d = -1 | 0.3

## A velocity-form PI ($K_p$ = {K}, $K_iT$ = {I} per sample) last applied {u} with error {e}; the new error is {d}.

::: part
answer: u + K*(d - e) + I*d
tolerance: 0.5%

### What does it compute before clamping?

::: misses
- [any] $u_{k-1} + K_p(e_k - e_{k-1}) + K_iTe_k$.
:::
:::
:::

::: check
kind: parts
given: t = 0.5 | 2 | 10; f = 1 | 10; B = 10 | 16 | 20

## A first-order filter with τ = {t} s at {f} kHz stores its pole with {B} fractional bits.

::: part
answer: 2^(-B - 1)/(1 - exp(-1/(t*f*1e3)))*100
unit: %
tolerance: 1%

### What is the worst relative error in τ?

::: misses
- [any] Half a step over $1 - z$.
:::
:::
:::

::: check
kind: parts
given: k = 1 | 4 | 9; c = 0.5 | 2 | 5

## Solve $A^TP + PA = -I$ for $A = \begin{pmatrix} 0 & 1 \\ -\given{k} & -\given{c} \end{pmatrix}$.

::: part
answer: (k + 1)/(2*c) + c/(2*k)
tolerance: 0.5%

### What is $p_{11}$?

::: misses
- [any] $\frac{k + 1}{2c} + \frac{c}{2k}$.
:::
:::

::: part
answer: ((k + 1)/(2*c) + c/(2*k))*(1 + 1/k)/(2*c) - 1/(4*k^2)
tolerance: 0.5%

### What is det P?

::: misses
- [any] $p_{11}p_{22} - p_{12}^2$.
:::
:::
:::

::: check
kind: parts
given: a = 0.5 | 2 | 6; b = 0.5 | 1.5; c = 1 | 2

## The system $\dot x = -\given{a}x + \given{b}x^3$ has a Lyapunov function $V = \given{c}x^2$.

::: part
answer: sqrt(a/b)
tolerance: 0.5%

### Within what |x| does V decrease?

::: misses
- [any] $\dot V = 2cx\dot x = -2cx^2(a - bx^2)$.
:::
:::

::: part
answer: c*a/b
tolerance: 0.5%

### What is the largest level of V inside that region?

::: misses
- [any] $V = cx^2$ at $x^2 = a/b$.
:::
:::
:::

::: check
kind: parts
given: l = 0.25 | 1 | 4; t = 10 | 30 | 60

## A damped pendulum {l} m long is released at rest from {t}° off vertical.

::: part
answer: 9.81/l*(1 - cos(t*pi/180))
tolerance: 0.5%

### What is its starting energy per unit $ml^2$?

::: misses
- [any] $\frac gl(1 - \cos\theta_0)$.
:::
:::

::: part
answer: sqrt(2*9.81/l*(1 - cos(t*pi/180)))
unit: rad/s
tolerance: 0.5%

### What angular speed can it never exceed?

::: misses
- [any] All its energy kinetic: $\frac12\dot\theta^2 \le V_0$.
:::
:::
:::

::: check
kind: parts
given: a = 1 | 3; d = 1 | 2; c = 0.5 | 2; k = -1 | 0.5 | 0.9; let b = k*a*d/c

## A 2 × 2 plant has $K = \begin{pmatrix} \given{a} & \given{b} \\ \given{c} & \given{d} \end{pmatrix}$.

::: part
answer: 1/(1 - b*c/(a*d))
tolerance: 0.5%

### What is $\lambda_{11}$?

::: misses
- [any] $1/(1 - \kappa)$.
:::
:::

::: part
answer: a - b*c/d
tolerance: 1%

### What is loop 1's gain with loop 2 closed tightly?

::: misses
- [any] $k_{11}/\lambda_{11}$.
:::
:::
:::

::: check
kind: parts
given: a = 1 | 2; b = 1 | 3; c = 4 | 10; d = -4 | -10

## A static decoupler $D = K^{-1}$ is built for $K = \begin{pmatrix} \given{a} & \given{b} \\ \given{c} & \given{d} \end{pmatrix}$.

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

### What is $D_{21}$?

::: misses
- [any] $-k_{21}/\det K$.
:::
:::

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

### What is $D_{22}$?

::: misses
- [any] $k_{11}/\det K$.
:::
:::
:::

::: check
kind: parts
given: a = 1 | 2; b = 0.9 | 1.8; c = 1 | 2; d = 1 | 2

## Find the condition number of $K = \begin{pmatrix} \given{a} & \given{b} \\ \given{c} & \given{d} \end{pmatrix}$.

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

### What is $\sigma_\max/\sigma_\min$?

::: misses
- [any] From the eigenvalues of $K^TK$.
:::
:::
:::

::: check
kind: parts
given: H = 55 | 70; C = 10 | 15; h = 0.2 | 0.4; c = 0.4 | 0.8

## A mixer combines {h} kg/s of hot fluid at {H} °C with {c} kg/s at {C} °C; its outputs are total flow and temperature.

::: part
answer: (C - (H*h + C*c)/(h + c))/(h + c)
tolerance: 0.5%

### How many °C does the temperature change per extra kg/s of the cold stream?

::: misses
- [any] $(T_c - T)/(h + c)$.
:::
:::

::: part
answer: 0.5
tolerance: 0.5%

### What is the relative gain for pairing flow with the hot stream?

::: misses
- [any] The flow row is (1, 1) and the temperature row has opposite signs: κ = −1.
:::
:::
:::

::: check
kind: choice

## An integral state-feedback servo hits its actuator limit during a large step and overshoots badly afterward. Which fix addresses the cause?

- [ ] Raise the integral gain
- [x] Stop integrating, or feed back the difference between commanded and applied input into the integral state, while the actuator is saturated, so the integral doesn't wind up beyond what the actuator can deliver
- [ ] Remove the state feedback
- [ ] Sample faster

::: misses
- [1] That winds up faster.
- [3] The state feedback isn't the cause.
- [4] Windup happens at any sample rate.
:::
:::
:::
