---
title: Problem set 8
heading: "Problem set 8: state equations"
eyebrow: A8 · Problem set 8
type: problems
---

::: hook
These problems use lessons 36 to 38: state variables and the state matrix, solving $\dot{\mathbf{x}} = A\mathbf{x}$ with eigenvalues, and driven systems with inputs, outputs and transfer functions. The eigenvalues of $A$ are the system's natural rates; check them against the trace and determinant.
:::

::: pool
pick: 12

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

## Write $\ddot y + \given{p}\dot y + \given{q}y = 0$ in state form with $\mathbf{x} = (y, \dot y)$.

::: part
answer: -q
tolerance: 0.5%

### What is the bottom-left entry of $A$?

::: misses
- [q] Solve for $\ddot y$: it's $-qy - p\dot y$.
- [any] $\dot x_2 = -qx_1 - px_2$.
:::
:::

::: part
answer: q
tolerance: 0.5%

### What is $\det A$?

::: misses
- [-q] $\det\begin{bmatrix}0 & 1\\-q & -p\end{bmatrix} = q$.
- [any] The product of the eigenvalues.
:::
:::
:::

::: check
kind: parts
given: R = 10 | 33; L = 1 | 4.7; C = 10 | 22

## A series RLC ($R$ = {R} Ω, $L$ = {L} mH, $C$ = {C} µF) has state $(v_C, i)$.

::: part
answer: -R/(L*1e-3)
unit: s⁻¹
tolerance: 0.5%

### What is the trace of $A$?

::: misses
- [-R*L*1e-3] It's $-R/L$.
- [any] $L\dot i = -v_C - Ri$, so the bottom-right entry is $-R/L$.
:::
:::

::: part
answer: 1/(L*1e-3*C*1e-6)
unit: s⁻²
tolerance: 0.5%

### What is $\det A$?

::: misses
- [any] $\frac{1}{LC}$.
:::
:::
:::

::: check
kind: parts
given: a = 1 | 2; b = 4 | 5; x1 = 1 | 3; x2 = 2 | 5; t = 0.5 | 1

## Solve $\dot{\mathbf{x}} = \begin{bmatrix}-\given{a} & 0\\0 & -\given{b}\end{bmatrix}\mathbf{x}$ from $(\given{x1}, \given{x2})$.

::: part
answer: x1*exp(-a*t)
tolerance: 0.5%

### What is $x_1$ at $t$ = {t}?

::: misses
- [any] Each state decays at its own rate.
:::
:::

::: part
answer: x2*exp(-b*t)
tolerance: 0.5%

### What is $x_2$?

::: misses
- [any] $x_2(0)e^{-bt}$.
:::
:::
:::

::: check
kind: parts
given: s = 0.5 | 1; w = 2 | 4; t = 0.3 | 1

## $A = \begin{bmatrix}-\given{s} & -\given{w}\\\given{w} & -\given{s}\end{bmatrix}$ and $\mathbf{x}(0) = (1, 0)$.

::: part
answer: exp(-s*t)*cos(w*t)
tolerance: 0.5%

### What is $x_1$ at $t$ = {t}?

::: misses
- [cos(w*t)] Include the decay $e^{-\sigma t}$.
- [any] $e^{-st}\cos wt$.
:::
:::

::: part
answer: exp(-s*t)*sin(w*t)
tolerance: 0.5%

### What is $x_2$?

::: misses
- [any] $e^{-st}\sin wt$.
:::
:::
:::

::: check
kind: parts
given: a = 1 | 2 | 3; t = 0.5 | 2

## Solve $\dot{\mathbf{x}} = \begin{bmatrix}-\given{a} & 1\\0 & -\given{a}\end{bmatrix}\mathbf{x}$ from $(0, 1)$.

::: part
answer: t*exp(-a*t)
tolerance: 0.5%

### What is $x_1$ at $t$ = {t}?

::: misses
- [exp(-a*t)] That's $x_2$; the coupling gives $x_1$ a factor $t$.
- [any] $\dot x_1 = -ax_1 + e^{-at}$.
:::
:::
:::

::: check
kind: parts
given: a = 2 | 3; b = 2 | 4; u = 2 | 5

## $\dot{\mathbf{x}} = \begin{bmatrix}-\given{a} & 1\\0 & -\given{b}\end{bmatrix}\mathbf{x} + \begin{bmatrix}0\\1\end{bmatrix}u$ with constant $u$ = {u}.

::: part
answer: u/b
tolerance: 0.5%

### What does $x_2$ settle to?

::: misses
- [any] $0 = -bx_2 + u$.
:::
:::

::: part
answer: u/(a*b)
tolerance: 0.5%

### What does $x_1$ settle to?

::: misses
- [u/a] $x_1$ is driven by $x_2 = u/b$, not by $u$.
- [any] $0 = -ax_1 + x_2$.
:::
:::
:::

::: check
kind: parts
given: k = 2 | 5; c = 1 | 3

## $A = \begin{bmatrix}0 & 1\\-\given{k} & -\given{c}\end{bmatrix}$, $B = (0, 1)$, $C = \begin{bmatrix}1 & 0\end{bmatrix}$.

::: part
answer: 1/k
tolerance: 0.5%

### What is the DC gain $-CA^{-1}B$?

::: misses
- [1/c] The damping doesn't affect the steady state.
- [any] $H(s) = \frac{1}{s^2 + cs + k}$ at $s = 0$.
:::
:::

::: part
answer: c
tolerance: 0.5%

### $H(s) = \frac{1}{s^2 + ps + q}$. What is $p$?

::: misses
- [any] $\det(sI - A)$.
:::
:::
:::

::: check
kind: parts
given: t = 0.5 | 1 | 2

## Two buffered RC stages with $\tau$ = 1 s: $\dot x_1 = -x_1 + u$, $\dot x_2 = -x_2 + x_1$. A unit step is applied at $t = 0$.

::: part
answer: 1 - exp(-t)
tolerance: 0.5%

### What is $x_1$ at $t$ = {t}?

::: misses
- [any] A single RC charging curve.
:::
:::

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

### What is $x_2$?

::: misses
- [(1 - exp(-t))^2] The stages don't simply multiply in time.
- [any] Feed $x_1$ into the second stage.
:::
:::
:::

::: check
kind: parts
given: m = 1 | 2; k = 10 | 50; F = 5 | 20

## A mass-spring-damper ($m$ = {m} kg, $k$ = {k} N/m) is pushed by a constant {F} N.

::: part
answer: F/k*100
unit: cm
tolerance: 0.5%

### Where does it settle?

::: misses
- [F/m*100] The mass doesn't set the final position.
- [any] $kx = F$.
:::
:::
:::

::: check
kind: parts
given: C = 1 | 10; L = 1 | 10; v = 2 | 5; i = 10 | 50

## A series RLC's state is $v_C$ = {v} V and $i$ = {i} mA, with $C$ = {C} µF and $L$ = {L} mH.

::: part
answer: 0.5*C*1e-6*v^2*1e6
unit: µJ
tolerance: 0.5%

### How much energy is in the capacitor?

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

::: part
answer: 0.5*L*1e-3*(i*1e-3)^2*1e6
unit: µJ
tolerance: 0.5%

### And in the inductor?

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

::: check
kind: parts
given: R = 50 | 300; L = 10 | 22; C = 0.47 | 1

## Classify a series RLC with $R$ = {R} Ω, $L$ = {L} mH, $C$ = {C} µF from its state matrix.

::: part
answer: (R/(L*1e-3))^2 - 4/(L*1e-3*C*1e-6)
unit: s⁻²
tolerance: 0.5%

### What is $T^2 - 4D$?

::: misses
- [any] $T = -R/L$ and $D = \frac{1}{LC}$.
:::
:::
:::

::: check
kind: parts
given: a = 1 | 2; b = 3 | 5; t = 0.2 | 1

## Find $e^{At}$ for $A = \begin{bmatrix}-\given{a} & 0\\0 & -\given{b}\end{bmatrix}$.

::: part
answer: exp(-a*t)
tolerance: 0.5%

### What is its top-left entry at $t$ = {t}?

::: misses
- [any] $e^{-at}$.
:::
:::

::: part
answer: exp(-a*t)*exp(-b*t)
tolerance: 0.5%

### What is $\det e^{At}$?

::: misses
- [any] $e^{\text{trace}(A)t}$.
:::
:::
:::

::: check
kind: parts
given: a = 1 | 2; T = 0.3 | 0.5; u = 1 | 4

## $\dot x = -\given{a}x + u$ is stepped exactly with $T$ = {T}, holding $u$ = {u} constant over each step.

::: part
answer: exp(-a*T)
tolerance: 0.5%

### What factor multiplies $x_k$?

::: misses
- [1 - a*T] That's Euler's approximation.
- [any] $e^{-aT}$.
:::
:::

::: part
answer: u/a*(1 - exp(-a*T))
tolerance: 0.5%

### What term is added for the input?

::: misses
- [u*T] That's Euler's input term.
- [any] $\frac ua(1 - e^{-aT})$.
:::
:::
:::

::: check
kind: parts
given: p = 1 | 2; q = 3 | 6

## $\ddot y + \given{p}\dot y + \given{q}y = u$ is written in state form.

::: part
answer: -p/2
tolerance: 0.5%

### What is the real part of the eigenvalues?

::: misses
- [-p] Half the trace.
- [any] $\lambda = \frac{-p \pm \sqrt{p^2 - 4q}}{2}$.
:::
:::

::: part
answer: sqrt(q - p^2/4)
unit: rad/s
tolerance: 0.5%

### What is their imaginary part?

::: misses
- [sqrt(q)] That's $\omega_0$; damping lowers it.
- [any] $\sqrt{q - p^2/4}$.
:::
:::
:::

::: check
kind: parts
given: a = 2 | 4; b = 1 | 3

## A transfer function $H(s) = \frac{1}{(s + \given{a})(s + \given{b})}$ comes from a state matrix $A$.

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

### What is the trace of $A$?

::: misses
- [a + b] The eigenvalues are $-a$ and $-b$.
- [any] The poles of $H$ are the eigenvalues of $A$.
:::
:::

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

### What is $\det A$?

::: misses
- [any] The product of the eigenvalues.
:::
:::
:::
:::
