Homework 4

Due at March 10 at 11:59pm. Submit to https://canvas.uw.edu/courses/1862386/assignments/11194461.

Problem 1

Consider the block diagram for the following system:

Second order system

a) Compute the transfer function from the input \(r\) to the output \(y\).

b) Show the following state space system has the same transfer function, with the appropriate choice of parameters:

\[\begin{align} \frac{d}{dt} \begin{bmatrix} x_1 \\ x_2 \end{bmatrix} &= \begin{bmatrix} 0 & 1 \\ -a_2 & -a_1 \end{bmatrix} \begin{bmatrix} x_1 \\ x_2 \end{bmatrix} + \begin{bmatrix} 0 \\ 1 \end{bmatrix} r \\ y & = \begin{bmatrix} b_2 & b_1 \end{bmatrix} \begin{bmatrix} x_1 \\ x_2 \end{bmatrix}. \end{align}\]

Find the values of \(a_1,a_2,b_1,b_2\) that correspond to the transfer function you computed in (a).

c) Computer the transfer function between \(r\) and \(z\). Hint: it’s not \(1\).

Solution.

a) The tranfer function is

\[G(s) = \frac{cs+1}{s^2+as+b}\]

b) We get the same transfer function if \(a_1=a\), \(a_2=b\), \(b_1=c\) and \(b_2=1\).

c) The transfer function is

\[\frac{s^2}{s^2+as+b}\]

Problem 2

A commonly seen transfer function is the second order function:

\[P(s) = \frac{K}{s^2+b_1 s+ b_2}\]

for some positive \(K, b_1, b_2\).

a) Suppose the input to the system is a complex sinusoid, \(e^{j\omega t}\). Find the value of \(\omega\) that leads to largest ouput.

b) Now we interpret the transfer function as coming from the swing equation. The input is still \(e^{j\omega t}\). Find \(\omega\) that leads to the largest frequency excursion at the output. Hint: think about that the output of \(P(s)\) is, and how to get frequency from that.

Solution.

a) The steady-state output amplitude for input \(e^{j\omega t}\) is given by the magnitude of the frequency response:

\[\vert P(j\omega)\vert = \frac{K}{\vert(j\omega)^2 + b_1(j\omega) + b_2\vert} = \frac{K}{\sqrt{(b_2-\omega^2)^2 + b_1^2\omega^2}}\]

We want to maximize this, which is equivalent to minimizing the denominator:

\[h(\omega^2) = (b_2-\omega^2)^2 + b_1^2\omega^2\]

Let \(u = \omega^2\) and differentiate:

\[\frac{dh}{du} = -2(b_2 - u) + b_1^2 = 0 \implies u = b_2 - \frac{b_1^2}{2}\]

So the optimal frequency is:

\[\omega^* = \sqrt{b_2 - \frac{b_1^2}{2}}\]

provided \(b_2 > \frac{b_1^2}{2}\). If this condition fails (heavy damping), then \(h\) is increasing for all \(u > 0\), meaning the maximum response occurs at \(\omega^* = 0\) — the system is overdamped and doesn’t resonate.

b) Since frequency is the derivative of the angle, the transfer function is

\[P(s) = \frac{sK}{s^2+b_1 s+ b_2}\]

The steady-state output amplitude for input \(e^{j\omega t}\) is given by the magnitude of the frequency response:

\[\vert P(j\omega)\vert = \frac{K\omega}{\vert(j\omega)^2 + b_1(j\omega) + b_2\vert} = \frac{K\omega}{\sqrt{(b_2-\omega^2)^2 + b_1^2\omega^2}}\]

We want to maximize this, which is equivalent to minimizing:

\[h(\omega) = \frac{(b_2-\omega^2)^2 + b_1^2\omega^2}{\omega^2} = \frac{(b_2-\omega^2)^2}{\omega^2} + b_1^2\]

Let \(u = \omega^2\) and differentiate:

\[\frac{dh}{du} = \frac{d}{du}\frac{(b_2-u)^2}{u} = \frac{-2(b_2-u)u - (b_2-u)^2}{u^2} = \frac{(b_2-u)(-2u-(b_2-u))}{u^2} = \frac{(b_2-u)(u-b_2)- b_2(b_2-u) }{u^2}\]

Setting the numerator to zero gives \(u = b_2\), so:

\[\omega^* = \sqrt{b_2}\]

Problem 3

The PLL transfer function we derived in class has the following form:

\(G(s)= \frac{V(k_p s + k_i)}{s^2 + V k_p\,s + V k_i}\) It is more common to write it into this form \(G(s) = \frac{2\zeta\omega_n s + \omega_n^2} {s^2 + 2\zeta\omega_n s + \omega_n^2}\)

a) Find the relationships between \(k_p\), \(k_i\), \(\zeta\) and \(\omega_n\).

b) Plot what happens when the input is a unit step. That is, \(U(s)=\frac{1}{s}\). You can use a computer to find the time domain response.

c) Normally, we want \(k_p\) and \(k_i\) to take some intermediate values. What can go wrong if they are very small (small control effort)? Or very large (large control effort)? Hint: look at the step response.

Solution.

a) Matching coefficients between the two forms:

\[\frac{V(k_p s + k_i)}{s^2 + Vk_p s + Vk_i} = \frac{2\zeta\omega_n s + \omega_n^2}{s^2 + 2\zeta\omega_n s + \omega_n^2}\]

From the denominator and numerator coefficients:

\[\omega_n = \sqrt{Vk_i}, \qquad \zeta = \frac{Vk_p}{2\omega_n} = \frac{k_p}{2}\sqrt{\frac{V}{k_i}}\]

or equivalently:

\[k_i = \frac{\omega_n^2}{V}, \qquad k_p = \frac{2\zeta\omega_n}{V}\]

b) The output in the Laplace domain is \(Y(s) = G(s) \cdot \frac{1}{s}\). For a second-order system with \(\zeta < 1\) (underdamped), the time-domain step response is:

\[y(t) = 1 - e^{-\zeta\omega_n t}\left(\cos(\omega_d t) + \frac{\zeta\omega_n}{\omega_d}\sin(\omega_d t)\right), \qquad \omega_d = \omega_n\sqrt{1-\zeta^2}\]

c) Very small \(k_p\), \(k_i\) (small \(\omega_n\)):the system responds very slowly — it takes a long time to track the input phase. The loop is slow to acquire lock and will struggle to track a time-varying input frequency.

Very large \(k_p\), \(k_i\) (large \(\omega_n\)): the system responds quickly but becomes highly underdamped (\(\zeta\) small), causing large oscillations and overshoot before settling. In a PLL, this means the phase overshoots badly, and large gains amplify noise since the wide loop bandwidth admits more noise from the VCO or input signal.

The sweet spot is \(\zeta \approx \frac{1}{\sqrt{2}} \approx 0.707\), which gives the fastest settling with no overshoot — this is why it is called the optimal damping ratio.

Problem 4

a) The \(\mathcal{H}_2\) norm of a system is defined as

\(\Vert G \Vert_2=\left\{\frac{1}{2\pi} \int_{-\infty}^{\infty} G(j\omega)^* G(j\omega) d\omega\right\}^{1/2}\).

This represents how much energy a input would “gain” after it passes through the system. Find \(\Vert G \Vert^2\) for \(G(s)=\frac{1}{s+1}\).

b) We can define another norm, called \(\Vert G \Vert_\infty= \max \vert G(j\omega) \vert\). Give an interpreation of this norm.

Solution.

a) This is the integral

\(\Vert G\Vert_2^2=\frac{1}{2\pi} \int_{-\infty}^{\infty} \frac{1}{\omega^2+1} d \omega =\frac{1}{2}\).

b) This is the worst-case amplification of the system over all sinusoidal inputs:

\[\Vert G\Vert_\infty = \max_\omega \frac{\text{output amplitude}}{\text{input amplitude}}.\]

It occurs at the frequency at which the system amplifies inputs the most. In control, it quantifies (un)robustness: a large \(\Vert G\Vert_\infty\) means there exists a frequency at which disturbances are significantly amplified, which is undesirable.

Problem 5

Consider a system described by

\[\frac{dy}{dt}-y=\frac{du}{dt} - u.\]

If we try to find the transfer function, we get

\[\frac{Y(s)}{U(s)}=\frac{s-1}{s-1}=1.\]

Is this correct? Namely, does it mean \(y(t)=u(t)\)? Explain what is going on here.

Solution.

In general one cannot cancel unstable poles with unstable zeros. Let \(e(t) = y(t) - u(t)\). Then:

\[\dot{e} = e \implies e(t) = e(0)e^t\]

So the full solution is:

\[y(t) = u(t) + (y(0)-u(0))e^t\]

The claim \(y(t) = u(t)\) only holds if \(y(0) = u(0)\). For other initial condition, the difference \(y(t) - u(t)\) grows unboundedly due to the unstable mode \(e^t\).