---
title: "Problem set 4: identification, feedforward and cascade control"
heading: "Problem set 4: models from step, sine and sampled data, SIMC tuning from fitted models, motion and disturbance feedforward, prefilters and setpoint weights, and cascade loops in motor drives and process plants"
eyebrow: S9 · Problem set 4
type: problems
---

::: hook
These problems cover lessons 6, 12, 19, 20 and 21: fitting models from step tests, sine tests and sampled data and turning them into controllers, the feedforward a motion profile or a measured disturbance calls for, prefilters and setpoint weighting, resonant and repetitive control, and the bandwidths, gains and following errors of nested loops.
:::

::: pool
pick: 12

::: check
kind: parts
given: a = 4 | 6 | 8; d = 1.5 | 3 | 6; D = 2 | 10; U = 1 | 4

## A step of {U} changes a process output by {D} in the end. The output reaches 28.3% of its change {a} s after the step, and 63.2% another {d} s later. Fit an FOPDT model and tune a SIMC PI with $\tau_c$ = θ.

::: part
answer: 1.5*d
unit: s
tolerance: 0.5%

### What is τ?

::: misses
- [any] $1.5(t_{63} - t_{28})$.
:::
:::

::: part
answer: a - 0.5*d
unit: s
tolerance: 1%

### What is θ?

::: misses
- [any] $t_{63} - \tau$.
:::
:::

::: part
answer: 1.5*d/(D/U*2*(a - 0.5*d))
tolerance: 1%

### What is $K_p$?

::: misses
- [any] $K_p = \tau/(K(\tau_c + \theta))$ with $\tau_c = \theta$.
:::
:::
:::

::: check
kind: parts
given: h = 1 | 2; a = 8 | 12; b = 2 | 4; c = 0.5 | 1; K = 0.5 | 3

## A plant $\given{K}e^{-\given{h}s}/((\given{a}s + 1)(\given{b}s + 1)(\given{c}s + 1))$ is reduced by the half rule and given a SIMC PI with $\tau_c$ = θ.

::: part
answer: h + b/2 + c
unit: s
tolerance: 0.5%

### What dead time does the reduced model have?

::: misses
- [any] $\theta_0 + \tau_2/2 + \tau_3$.
:::
:::

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

### What $K_p$ results?

::: misses
- [any] $\tau/(2K\theta)$ with τ = $\tau_1 + \tau_2/2$.
:::
:::

::: part
answer: a + b/2
unit: s
tolerance: 0.5%

### What $T_i$, the smaller of τ and 8θ?

::: misses
- [any] Here τ is the smaller.
:::
:::
:::

::: check
kind: parts
given: p = 0.8 | 0.9 | 0.95; g = 0.1 | 0.5; T = 10 | 50; c = 0.5 | 2

## Sampled every {T} ms, a plant's data fit $y_{k+1} = \given{p}y_k + \given{g}u_k$. A PI controller with $T_i$ = τ is to give a closed-loop time constant of {c} × τ.

::: part
answer: -T/ln(p)
unit: ms
tolerance: 0.5%

### What is τ?

::: misses
- [any] $-T/\ln a$.
:::
:::

::: part
answer: 1/(g/(1 - p)*c)
tolerance: 0.5%

### What $K_p$ gives that closed loop?

::: misses
- [any] With the pole cancelled, $L = K_pK/(\tau s)$, so $\tau_c = \tau/(K_pK)$.
:::
:::
:::

::: check
kind: parts
given: f = 0.5 | 2 | 10; p = 30 | 60 | 75; g = 0.3 | 1 | 3; k = 2 | 10

## A sine test at {f} Hz on a first-order plant reads a gain of {g} and a phase of −{p}°. A proportional gain $K_p$ = {k} then closes the loop.

::: part
answer: g*sqrt(1 + tan(p*pi/180)^2)
tolerance: 0.5%

### What is the plant's DC gain?

::: misses
- [any] $K = |G|\sqrt{1 + \omega^2\tau^2}$ with $\omega\tau = \tan\phi$.
:::
:::

::: part
answer: (1 + k*g*sqrt(1 + tan(p*pi/180)^2))/(tan(p*pi/180)/(2*pi*f))
unit: rad/s
tolerance: 0.5%

### Where is the closed-loop pole (as a positive rate)?

::: misses
- [any] $(1 + K_pK)/\tau$.
:::
:::
:::

::: check
kind: parts
given: M = 5 | 15 | 30; T = 0.2 | 1 | 4

## A loop's step response overshoots {M}% and rings with a period of {T} s.

::: part
answer: -ln(M/100)/sqrt(pi^2 + ln(M/100)^2)
tolerance: 0.5%

### What damping ratio does a second-order fit give?

::: misses
- [any] $-\ln M_p/\sqrt{\pi^2 + \ln^2M_p}$.
:::
:::

::: part
answer: 4/(-ln(M/100)/sqrt(pi^2 + ln(M/100)^2)*2*pi/T/sqrt(1 - ln(M/100)^2/(pi^2 + ln(M/100)^2)))
unit: s
tolerance: 1%

### What 2% settling time does the fit predict?

::: misses
- [any] $4/(\zeta\omega_n)$ with $\omega_n = (2\pi/T_d)/\sqrt{1 - \zeta^2}$.
:::
:::
:::

::: check
kind: parts
given: s = 0.02 | 0.1; N = 500 | 5000; P = 0.25 | 4; K = 0.5 | 2

## A plant gain near {K} is estimated by least squares from {N} samples of an input with mean square {P}, with output noise σ = {s}.

::: part
answer: s/sqrt(N*P)/K*100
unit: %
tolerance: 0.5%

### What relative standard deviation does the estimate have?

::: misses
- [any] $\sigma/\sqrt{NP}$ over K.
:::
:::
:::

::: check
kind: parts
given: J = 1e-4 | 4e-4; b = 2e-4 | 1e-3; K = 0.03 | 0.08; a = 500 | 2000; v = 100 | 400

## A motor (J = {J} kg·m², viscous friction b = {b} N·m·s, $K_t$ = {K} N·m/A) follows a trapezoidal profile: acceleration {a} rad/s² up to a cruise speed of {v} rad/s.

::: part
answer: (J*a + b*v)/K
unit: A
tolerance: 0.5%

### What feedforward current is needed just before cruise begins?

::: misses
- [J*a/K] Friction at that speed needs current too.
- [any] $(Ja + bv)/K_t$.
:::
:::

::: part
answer: b*v/K
unit: A
tolerance: 0.5%

### And during the cruise?

::: misses
- [any] Only friction: $bv/K_t$.
:::
:::
:::

::: check
kind: parts
given: p = 1 | 3; d = 0.5 | 2; e = -20 | 10 | 30; L = 5 | 20

## A static feedforward cancels a measured disturbance (gain {d}) using a model of the input gain {p} that is {e}% off; the feedback loop's low-frequency gain is {L}.

::: part
answer: abs(d - p*d/(p*(1 + e/100)))
tolerance: 1%

### How much of a unit disturbance reaches the output without feedback?

::: misses
- [any] $|P_d + PF|$ with the true P.
:::
:::

::: part
answer: abs(d - p*d/(p*(1 + e/100)))/(1 + L)
tolerance: 1%

### And with the feedback loop as well, at low frequency?

::: misses
- [any] Divide by $1 + L$.
:::
:::
:::

::: check
kind: parts
given: K = 1 | 4; t = 0.5 | 2; P = 1 | 3; I = 2 | 8

## A PI controller ($K_p$ = {P}, $K_i$ = {I}) drives $\given{K}/(\given{t}s + 1)$.

::: part
answer: -I/P
tolerance: 0.5%

### Where is the closed-loop zero?

::: misses
- [any] The numerator is $K(K_ps + K_i)$.
:::
:::

::: part
answer: sqrt(K*I/t)
unit: rad/s
tolerance: 0.5%

### What is the closed-loop $\omega_n$?

::: misses
- [any] Closed loop: $\tau s^2 + (1 + KK_p)s + KK_i$.
:::
:::

::: part
answer: (1 + K*P)/(2*sqrt(t*K*I))
tolerance: 0.5%

### And ζ?

::: misses
- [any] $(1 + KK_p)/(2\sqrt{\tau KK_i})$.
:::
:::
:::

::: check
kind: parts
given: P = 1 | 4; b = 0.2 | 0.5; I = 0.5 | 3; R = 2 | 10

## A PI controller with $K_p$ = {P}, $K_i$ = {I} and setpoint weight b = {b} sees a setpoint step of {R} with the output at rest.

::: part
answer: P*b*R
tolerance: 0.5%

### How big is its output's initial jump?

::: misses
- [P*R] Only b of the step enters the P term.
- [any] $K_pbR$.
:::
:::

::: part
answer: I*R
tolerance: 0.5%

### At what rate does its integral term then begin to rise?

::: misses
- [any] $K_i$ times the error.
:::
:::
:::

::: check
kind: parts
given: K = 0.03 | 0.1; J = 5e-5 | 5e-4; f = 50 | 150; r = 4 | 10

## A servo motor ($K_t$ = {K} N·m/A, J = {J} kg·m²) gets a proportional speed loop crossing over at {f} Hz, around a current loop {r} times faster.

::: part
answer: 2*pi*f*J/K
unit: A/(rad/s)
tolerance: 0.5%

### What speed gain, in amperes per rad/s?

::: misses
- [any] $\omega_sJ/K_t$.
:::
:::

::: part
answer: 90 - atan(1/r)*180/pi
unit: °
tolerance: 0.5%

### What phase margin does the speed loop keep?

::: misses
- [any] $90° - \tan^{-1}(1/r)$.
:::
:::
:::

::: check
kind: parts
given: c = 1 | 3; r1 = 5 | 8; r2 = 5 | 10; v = 50 | 300

## A drive's current loop has a {c} kHz bandwidth; its speed loop is {r1} times slower and its position loop {r2} times slower than that.

::: part
answer: c*1e3/(r1*r2)
unit: Hz
tolerance: 0.5%

### What bandwidth does the position loop have?

::: misses
- [any] Divide by both ratios.
:::
:::

::: part
answer: v/(2*pi*c*1e3/(r1*r2))
unit: rad
tolerance: 0.5%

### What following error does it leave at {v} rad/s, without feedforward?

::: misses
- [any] $v/K_p$ with $K_p = 2\pi f_p$.
:::
:::
:::

::: check
kind: parts
given: o = 0.005 | 0.02 | 0.1; i = 0.5 | 2

## A temperature loop crosses over at {o} rad/s; the steam valve under it has a flow loop crossing at {i} rad/s.

::: part
answer: 20*log(o/sqrt(o^2 + i^2))
unit: dB
tolerance: 0.5%

### How much extra does the flow loop attenuate a supply-pressure upset at the temperature loop's crossover?

::: misses
- [any] $|S_i|$ at $\omega_o$.
:::
:::

::: part
answer: 90 - atan(o/i)*180/pi
unit: °
tolerance: 0.5%

### What phase margin would the temperature loop keep if its own plant were an integrator?

::: misses
- [any] $90° - \tan^{-1}(\omega_o/\omega_i)$.
:::
:::
:::

::: check
kind: parts
given: K = 0.05 | 0.2; J = 1e-4 | 1e-3; I = 3 | 10; w = 200 | 1000

## A speed loop clamps its current command at {I} A. The motor has $K_t$ = {K} N·m/A and J = {J} kg·m².

::: part
answer: w*J/(K*I)*1000
unit: ms
tolerance: 0.5%

### What's the least time to reach {w} rad/s from rest?

::: misses
- [any] $\omega J/(K_tI_\max)$.
:::
:::
:::

::: check
kind: choice

## A plant's input reaches its output after a 4 s dead time, but a measured disturbance gets there in 1 s. What can feedforward do?

- [ ] Cancel the disturbance exactly
- [x] Only part of it: an exact cancellation would have to act 3 s before the disturbance is measured, so the feedforward can at best apply the static gain as early as possible, and feedback must handle the transient
- [ ] Nothing at all
- [ ] Make the loop unstable

::: misses
- [1] That needs the input to act 3 s in advance.
- [3] A static or delayed feedforward still removes the lasting part.
- [4] Feedforward sits outside the loop; it can't destabilize it.
:::
:::

::: check
kind: parts
given: L = 5 | 20 | 50; p = -100 | -140; fs = 10 | 20; f0 = 50 | 60

## A grid inverter's current loop has gain {L} at {p}° at the line frequency {f0} Hz; it's sampled at {fs} kHz.

::: part
answer: 1/sqrt((1 + L*cos(p°))^2 + (L*sin(p°))^2)*100
tolerance: 0.5%

### What percentage tracking error does a PI controller leave at the line frequency?

::: misses
- [1/(1 + L)*100] Use the complex loop gain.
- [any] Not yet. $1/|1 + Le^{j\varphi}|$.
:::
:::

::: part
answer: fs*1e3/f0
tolerance: 0.5%

### How many samples of memory would a repetitive controller need?

::: misses
- [f0/(fs*1e3)] Samples per period: $f_s/f_0$.
- [any] Not yet. $f_s/f_0$.
:::
:::

::: right
Right. An internal model of the line frequency removes the residual error.
:::
:::
:::
