BIOE 205

Lecture 11

Reading material: Chapter 6 of CSSB

In the last lecture we discussed convolutions, impulse response of LTI systems, the relationship between the impulse response of LTI systems and convolutions, the relationship between multiplication in the frequency domain and convolutions in the time domain. We further saw code examples on how to compute the system response to a given input if we know the impulse response. In this lecture, we continue our study of systems concepts; specifically we will study the concepts of frequency response, systems spectrum, transfer functions and system diagrams.

  1. System diagrams
    1. System interconnections
    2. LTI interconnections
    3. Feedback
  2. Frequency response
    1. Example 1
    2. Example 2
    3. Example 3
  3. System Spectrum
  4. Bode form
    1. Type 1: K0(jω)nK_0(j\omega)^n
    2. Type 2: jωτ+1j\omega\tau + 1
    3. Type 2: (jωτ+1)1(j\omega\tau+1)^{-1}
    4. Type 3: (jωωn)2+2ζjωωn+1\left(\frac{j\omega}{\omega_n}\right)^2 + 2\zeta \frac{j\omega}{\omega_n} + 1
    5. Type 3: [(jωωn)2+2ζjωωn+1]1\left[\left(\frac{j\omega}{\omega_n}\right)^2 + 2\zeta \frac{j\omega}{\omega_n} + 1 \right]^{-1}
    6. Second order systems

System diagrams

Recall from from the very first lecture that we have a graphical method of representing systems and signals called system diagrams as shown below.

Now that we know about the impulse response of a system, in the following we will represent systems with the letters H,G,P\mathcal{H}, \mathcal{G}, \mathcal{P} as appropriate and generally use x(t)x(t) and y(t)y(t) to represent the input and output to systems.

We call the process by which a system H\mathcal{H} transforms the input x(t)x(t) to the output y(t)y(t) the action of H\mathcal{H} on x(t)x(t). More colloquially, y(t)y(t) is produced by H\mathcal{H} acting on x(t)x(t). We represent this mathematically as y(t)=H(x(t)))y(t) = \mathcal{H}\left(x(t))\right). Often for ease of notation, we drop the argument tt when it is understood the signals xx and yy are functions of time: y=H(x)y = \mathcal{H}(x).

System interconnections

Often it is quite useful to break down a complex system into its constituent elements or conversely, to build up a complicated system behavior by the composition of simpler constituent elements. There are two basic ways of composing systems as outlined below.

Borrowing terminology from circuit analysis, the first method of composing two systems is called a series connection. In such a composition, the output of one system element is fed in as input to the second system element.

The output y(t)y(t) in such a case can be represented as y=H2(H1(x))y = \mathcal{H}_2 \left( \mathcal{H}_1 ( x ) \right).

The second way of composing two system elements is to connect them in parallel as shown below.

The summation element (shown by a circle above) is a new feature in our systems diagram. In the parallel connection above, the input is fed separately to two subsystems and their outputs are summed together to produce the final response: y=H1(x)+H2(x)y = \mathcal{H}_1\left(x\right) + \mathcal{H}_2\left(x\right).

LTI interconnections

For LTI systems we know the output y(t)y(t) to an in input x(t)x(t) can be written in terms of the impulse response h(t)h(t) as y(t)=h(t)x(t)y(t) = h(t) \star x(t). Thus the above interconnections simplify. Indeed for the series connection we have the output ysy_s is:

ys=h2z=h2(h1x)=(h2h1)x\begin{aligned} y_{s} &= h_2 \star z = h_2 \star \left( h_1 \star x \right) \\ & = \left(h_2 \star h_1 \right) \star x \end{aligned}

Similarly for the parallel connection we have that the output is:

yp=z1+z2=(h1x)+(h2x)=(h1+h2)x\begin{aligned} y_p &= z_1 + z_2 = (h_1 \star x) + (h_2 \star x) \\ &= \left(h_1 + h_2 \right) \star x \end{aligned}

Therefore the LTI series interconnection of two systems with impulse responses h1h_1 and h2h_2 results in a system with overall impulse function: h1h2h_1 \star h_2 and the parallel interconnection results in a system with overall impulse function h1+h2h_1 + h_2.

Feedback

Recall that we discussed the use of feedback to desirably modify the process or characteristics of a system when we talked about different approaches to modeling biological systems. We are now in a position to analyze with tools at our disposal the feedback interconnection diagram. Consider the feedback interconnection diagram given below:

Then we have the following relations:

Starting with the last equation we have that:

y=z1G=(xz2)G=(xyH)G=xGyHG\begin{aligned} y &= z_1 \star \mathcal{G} = \left(x - z_2 \right) \star \mathcal{G} \\ &= \left(x - y \star \mathcal{H} \right) \star \mathcal{G} \\ &= x\star \mathcal{G} - y \star \mathcal{H} \star \mathcal{G} \end{aligned}

which we can rearrange to get

y(δ+GH)=xG y\star \left( \delta + \mathcal{G} \star \mathcal{H} \right) = x \star \mathcal{G}
The above equation can and is often presented in a much cleaner format by switching representations to the frequency domain. Indeed then, the above diagram becomes:

and we get:

YX=G1+GH \dfrac{Y}{X} = \dfrac{G}{1+GH}

which is very important equation that we can use to simplify algebraically many interconnections between system elements as we will see in the examples below. The ratio in (1), the ratio of the output to the input in the frequency domain, is an important enough quantity that it gets its own name: transfer function. We will spend entire lectures talking about transfer functions, and so now is as good a time as any to understand its definition - the frequency domain[1] ratio of the output to the input.

Frequency response

The same quantity as in (1), that is the ratio of the output to the input is a very general abstraction that applies to a large class of systems. However, when specialized to simple LTI systems, it has a nom de guerre; specifically, it is called the frequency response. To see why this is an apt name, it is instructive to examine the response of an LTI system with impulse response h(t)h(t) to a (complex) sinusoidal input x(t)=ejωtx(t) = e^{j\omega t}. We have that:

y(t)=h(t)ejωt=h(τ)ejω(tτ)dτ=h(τ)ejωtejωτdτ=ejωth(τ)ejωτdτ\begin{aligned} y(t) &= h(t) \star e^{j\omega t}= \int \limits_{-\infty}^{\infty} h(\tau) e^{j\omega (t-\tau)} d\tau \\ &= \int \limits_{-\infty}^{\infty} h(\tau) e^{j \omega t} e^{-j\omega \tau} d \tau = e^{j \omega t} \int \limits_{-\infty}^{\infty} h(\tau)e^{-j\omega \tau} d \tau \end{aligned}

giving

y(t)=H(jω)ejωt y(t)=H\left(j \omega\right) e^{j\omega t}

Thus we have that the output from the system is still a complex exponential (or sinusoid) with the same frequency but now modulated by a H(jω)H(j \omega) factor in front of it.

Key point: Therefore we have that any stable LTI system with zero initial conditions responds (in steady state) to sinusoidal inputs with sinusoidal output of the same frequency; albeit with changes in amplitude and phase.

How the input sinusoids amplitude and phase are changed is a function of the complex frequency jωj \omega, as defined by the frequency response H(jω)H(j \omega).

⚠️ Note
The qualifier - "in steady state" - is required because as shown in a class activity, there can be transient portions in the system response which fade away with time. Similarly, we will deal with nonzero initial conditions when we introduce the Laplace transform and stability of a system is a topic for later lectures.

Example 1

Given an LTI system with impulse response h(t)h(t); use the above observations to calculate the system response to a sinusoid input x(t)=Acos(ωt)x(t) = A \cos(\omega t).

Solution: Using Euler's identity we have that

x(t)=A2(ejωt+ejωt) x(t) = \dfrac{A}{2} \left( e^{j \omega t } + e^{-j \omega t } \right)
Based on (2) above we get:
y(t)=A2(H(jω)ejωt+H(jω)ejωt) y(t) = \frac{A}{2} \Big( H(j\omega)e^{j\omega t} + H(-j\omega)e^{-j\omega t} \Big)
Since H(jω)H(j\omega) is a complex function, it has a polar representation. Let M(ω)M(\omega) denote its magnitude and φ(ω)\varphi(\omega) denote its phase. Then,
H(jω)=M(ω)ejφ(ω)andH(jω)=M(ω)ejφ(ω) H(j\omega) = M(\omega)e^{j\varphi(\omega)} \qquad \textrm{and} \qquad H(-j\omega) = M(\omega)e^{-j\varphi(\omega)}
Using this to rewrite y(t)y(t) we have,

y(t)=A2M(ω)(ej(ωt+φ(ω))+ej(ωt+φ(ω)))=AM(ω)cos(ωt+φ(ω))=AM(ω)amplitudemagnificationcos(ωt+φ(ω)phaseshift).\begin{aligned} y(t) &= \frac{A}{2} M(\omega)\Big( e^{j(\omega t + \varphi(\omega))} + e^{-j(\omega t + \varphi(\omega))}\Big) \\ &= A M(\omega) \cos\big(\omega t + \varphi(\omega) \big) \\ &= A\underbrace{M(\omega)}_{\text{amplitude}\atop\text{magnification}} \cos\big(\omega t + \underbrace{\varphi(\omega)}_{\text{phase}\atop\text{shift}}\big). \end{aligned}

That is, in went a cosine with amplitude AA and no phase, but out came a cosine with amplitude scaled as H(jω)=:M(ω)| H(j \omega)| =: M(\omega) and phase φ(ω):=arg(H(jω)) \varphi(\omega) := \arg \left( H(j \omega) \right).

Example 2

Consider the system below with a sinusoidal input x(t)=0.6sin(0.3t+20)x(t) = 0.6 \sin (0.3 t + 20). What is the system response?

Solution: To use the result of Example 1 above let us convert the input to a cosine: x(t)=0.6cos(0.3t70)x(t) = 0.6 \cos(0.3t - 70). Application of (1) with the observation made for LTI series connection results in the overall transfer function given as

H(jω)=20j20ω+j H\left(j \omega \right) = \dfrac{20 j}{-20 \omega + j}
We can compute the magnitude and phase of H(jω)H(j\omega) as a function of ω\omega. Indeed,
M(ω)=20400ω2+1andφ(ω)=π/2arg(j20ω) M \left(\omega \right) = \dfrac{20}{\sqrt{400 \omega^2+1}} \qquad \textrm{and} \qquad \varphi(\omega) = \pi/2 - \arg (j - 20\omega)
Plugging in ω=0.3\omega = 0.3 we get M(3/10)=20/37M(3/10) = 20 / \sqrt{37}. Similarly, φ(3/10)=arctan(1/6)π/280.5\varphi(3/10) = \arctan(1/6) - \pi/2 \approx -80.5 ^\circ. Thus we get that the output response should be:

y(t)=M(3/10)×0.6cos(0.3t70φ(3/10))=1237cos(0.3t150.5)\begin{aligned} y(t) &= M(3/10) \times 0.6 \cos \left( 0.3t - 70 - \varphi (3/10) \right) \\ & = \dfrac{12}{\sqrt{37}} \cos \left( 0.3t - 150.5 \right) \end{aligned}
⚠️ Note

Stop now and go read Example 6.3 and 6.4 of CSSB. Can you relate the two examples with the above?

Hint: They are exactly the same except for an error in CSSB where it does the extra step of converting things to the phasor form.

Example 3

Example 6.5 in CSSB calculates the system response to an input x(t)=10cos(20t+30)x(t)= 10 \cos(20t +30) for a system with transfer function:

H(jω)=11+2jω102ω2100 H \left( j \omega \right) = \dfrac{1}{1+\dfrac{2j\omega}{10} - \dfrac{2\omega^2}{100}}
Use the methods on this page to compute the system response and compare your answers.

Solution: Left as an exercise.

System Spectrum

While the spectrum of a signal tells us the how energy in a signal is distributed amongst the constituent frequencies in the signal, the spectrum of a system tells us how the system modifies an input signal - both by amplifying or attenuating its amplitude as well by modifying the phase characteristics. Thus, the magnitude spectrum of a system looks very much like the magnitude/phase spectrum plots we have seen so far. The below figure shows the spectrum of hypothetical system.

We can see that the system characterized by the above spectrum is a low pass filter with a cutoff frequency of 100 Hz. How do we know 100 Hz is the cutoff frequency? Recall that the cutoff frequency is where you get half power. In the above figure, the magnitude plot has no units (not in decibel scale). Since power directly related to amplitude squared, we would get half power when the magnitude reads 120.707\dfrac{1}{\sqrt{2}} \approx 0.707 which happens at 100 Hz.

Since reading and constructing system spectrum diagrams is a necessary skill when dealing with systems and signals, we spent the rest of this lecture on how to manually construct such diagrams given the system transfer function. The starting point is to transform any given function in to the so called Bode form.

Bode form

Definition: (Bode form) The bode form of a transfer function is a factored form where the constant term in each factor is unity:
G(jω)=K(1+jwτ1)((jωωn1)2+2ζjωωn1+1)jw(1+jwτ2)((jωωn2)2+2ζjωωn2+1) G(j \omega) = K \cdot \dfrac{(1+jw\tau_1) \left(\left(\dfrac{j\omega}{\omega_{n_1}}\right)^2 + 2\zeta \dfrac{j\omega}{\omega_{n_1}} + 1\right) \dots }{jw (1+jw\tau_2) \left(\left(\dfrac{j\omega}{\omega_{n_2}}\right)^2 + 2\zeta \dfrac{j\omega}{\omega_{n_2}} + 1\right) \dots}
(see Eq. 6.50 in CSSB)
It is necessary to examine each of these factors above and learn how they contribute to the shape of the system spectrum. We now begin this activity in earnest. The three types of factors are:

For example consider for some constant KK the transfer function,

KG(s)=Ks+3s(s2+2s+4), K \cdot G(s) = K\frac{s+\color{red}{3}}{s(s^2 + 2s + \color{blue}{4})},
where ss is the complex frequency variable jωj\omega. It can be written as
KG(s)=3K(s3+1)4s((s2)2+s2+1)s=jω=3K4jω3+1jω((jω2)2+jω2+1). \begin{align*} KG(s) =& \frac{\color{red}{3}K \left(\frac{s}{3}+1\right)}{\color{blue}{4}s \left( \big(\frac{s}{2}\big)^2 + \frac{s}{2} + 1 \right)}\Bigg|_{s=j\omega} \\ =& \frac{\color{red}{3}K}{\color{blue}{4}} \frac{\frac{j\omega}{3}+1}{j\omega \left(\big(\frac{j\omega}{2}\big)^2 + \frac{j\omega}{2} + 1\right)}. \end{align*}
It can then be expanded as:
KG(jω)=3K4jω3+1jω[(jω2)2+jω2+1]=3K4(jω)1Type 1(jω3+1)Type 2[(jω2)2+jω2+1]1Type 3. \begin{align*} KG(j\omega) &= \frac{3K}{4} \frac{\frac{j\omega}{3}+1}{j\omega \left[\Big(\frac{j\omega}{2}\Big)^2 + \frac{j\omega}{2} + 1\right]} \\ &= \underbrace{\frac{3K}{4}(j\omega)^{-1}}_{\text{Type 1}} \cdot \underbrace{\left(\frac{j\omega}{3}+1\right)}_{\text{Type 2}} \cdot \underbrace{\left[\Big(\frac{j\omega}{2}\Big)^2 + \frac{j\omega}{2} + 1\right]^{-1}}_{\text{Type 3}}. \end{align*}

Type 1: K0(jω)nK_0(j\omega)^n

Its magnitude is

logM=logK0(jω)n=logK0+nlogω. \begin{align*} \log M &= \log |K_0 (j\omega)^n| \\ &= \log |K_0| + n \log \omega. \end{align*}

It is a linear function of logω\log \omega; hence it gives a line of slope nn passing through the value logK0\log |K_0| at ω=1\omega = 1. This line is called a low-frequency asymptote.

In our example above, we had K0(jω)1K_0(j\omega)^{-1}. Its magnitude plot is shown in the figure below.

For Type 1 factor, its phase is

K0(jω)n=(jω)n=njω=n90. \begin{align*} \angle K_0(j\omega)^n &= \angle (j\omega)^n \\ &= n \angle j\omega \\ &= n \cdot 90^\circ. \end{align*}
The phase is therefore a constant independent of ω\omega.

In our example above, we had K0(jω)1K_0(j\omega)^{-1} . Its phase plot is shown above. In this example the phase is 90-90^\circ for all ω\omega.

Type 2: jωτ+1j\omega\tau + 1

To study jωτ+1|j\omega\tau+1| and (jωτ+1)\angle(j\omega\tau+1) as a function of ω\omega, we will look at different cases as below:

For the magnitude plot,

logMlogjωτ=logωτ=logτ+logω. \begin{align*} \log M &\approx \log |j\omega\tau| \\ &= \log \omega\tau \\ &= \log \tau + \log \omega. \end{align*}

This gives a line of slope 11 passing through the point (1/τ,1)(1/\tau,1) on a plot of log-log scale. Note these are just asymptotes; the actual value of MM at ω=1/τ\omega = 1/\tau is 2\sqrt{2} The figure below shows the magnitude slope "steps up" by 11 at the breakpoint.

As for the phase plot,

ϕ(jωτ)=90. \begin{align*} \phi &\approx \angle(j\omega\tau) \\ &= 90^\circ. \end{align*}
ϕ=(j+1)=45. \begin{align*} \phi &= \angle(j+1) \\ &= 45^\circ. \end{align*}

The figure above shows that the phase "steps up" by 9090^\circ as we go past the breakpoint.

Type 2: (jωτ+1)1(j\omega\tau+1)^{-1}

Since this type of factor is the inverse of the one we just discussed, the magnitude and phase plots are reflections of the corresponding plots for the stable real zero with respect to the horizontal axis,

Type 3: (jωωn)2+2ζjωωn+1\left(\frac{j\omega}{\omega_n}\right)^2 + 2\zeta \frac{j\omega}{\omega_n} + 1

Finally we get to the second order term. Here, we start by writing out the complex number in its Cartesian form:

(jωωn)2+2ζjωωn+1=(1(ωωn)2)real part+2ζωωnimag. partj\begin{aligned} \left(\frac{j\omega}{\omega_n}\right)^2 + 2\zeta \frac{j\omega}{\omega_n} + 1 = \underbrace{\left(1- \left(\frac{\omega}{\omega_n}\right)^2\right)}_{\text{real part}} + \underbrace{2\zeta\frac{\omega}{\omega_n}}_{\text{imag. part}}j \end{aligned}

Note that ωn\omega_n in the form of this term is what is called the "natural frequency". As before we will consider different cases: ωωn\omega \ll \omega_n and ωωn\omega \gg \omega_n.

For the magnitude plot we have the following:

Therefore, for factor of Type 3 above the magnitude slope “steps up” by 2 as we go through the breakpoint.

For the phase plot we have:

The magnitude and phase plots are shown below:

Note that the extremal value (peak or trough) does not happen at ω=ωn\omega = \omega_n but rather at a different frequency called the resonant frequency.

Type 3: [(jωωn)2+2ζjωωn+1]1\left[\left(\frac{j\omega}{\omega_n}\right)^2 + 2\zeta \frac{j\omega}{\omega_n} + 1 \right]^{-1}

Similar to the type 2 case, now the phase and magnitude plots are reflected about the xx axis as shown in the plot below.

This brings us to the end of our discussion on creating phase/magnitude plots for the Bode primitives. Next lecture we will do a full fledged example but before that we wrap up the current one with a discussion of resonant frequency.

Second order systems

Systems that are of Type 3, i.e. having the form

[(jωωn)2+2ζ(jωωn)+1]1ωn2s2+2ζωns+ωn2 \left[ \left(\dfrac{j\omega}{\omega_n}\right)^2 + 2\zeta \left(\dfrac{j\omega}{\omega_n}\right) + 1 \right]^{-1} \qquad \Leftrightarrow \qquad \dfrac{\omega_n^2}{s^2+2\zeta\omega_ns + \omega_n^2}

are called second-order systems since they are associated with second order ODE's of the form

f(t)+2ζωnf(t)+ωn2f(t)=x(t) f''(t) + 2\zeta \omega_n f'(t) + \omega_n^2 f(t) = x(t)
where x(t)x(t) is the input to the system. In the above:

For a system with a G(jω)G(j\omega) as above, we can derive the magnitude response as:

M(ω)=G(jω)=ωn2ω2+2jζωnω+ωn2=11(ωωn)2+2ζωωnj=1[1(ωωn)2]2+4ζ2(ωωn)2=11+(4ζ22)(ωωn)2+(ωωn)4\begin{aligned} M(\omega) = |G(j\omega)| &= \left| \frac{\omega^2_n}{-\omega^2 + 2j\zeta\omega_n \omega + \omega^2_n}\right| = \left| \frac{1}{1 - \big(\frac{\omega}{\omega_n}\big)^2 + 2\zeta \frac{\omega}{\omega_n}j} \right| \\ &= \frac{1}{\sqrt{\left[1-\big(\frac{\omega}{\omega_n}\big)^2\right]^2 + 4\zeta^2\big(\frac{\omega}{\omega_n}\big)^2}} \\ &= \frac{1}{\sqrt{1 + (4\zeta^2-2)\big(\frac{\omega}{\omega_n}\big)^2 + \big(\frac{\omega}{\omega_n}\big)^4}} \end{aligned}

if we set z:=ωωnz:= \frac{\omega}{\omega_n} as a new variable we can examine the new function M(z)M(z). As a function of zz, the function M(z)M(z) attains a maximum when z=±12ζ2z = \pm \sqrt{1-2 \zeta ^2}.

Answer: Full derivation is left as an exercise. However, one proceeds by differentiating M(z)M(z) with respect to zz. The derivative is zero at extremal points so we can solve for zz from M(z)=0M'(z) = 0. Discarding the z=0z=0 solution for obvious reasons we get the above statement

This means ω=ωn12ζ2\omega = \omega_n \sqrt{1-2\zeta^2} since ωn\omega_n cannot be negative. Furthermore we see that there is an extremum for real valued ω\omega only for ζ[0,21/2]\zeta \in \left[0, 2^{-1/2}\right]. This ωr:=ωn12ζ2\omega_r := \omega_n \sqrt{1-2\zeta^2} is called the resonant frequency defined above - a frequency at which bad things can happen. Here, though, is a more fun video on resonance:

Finally, second order systems are bi-parametric - i.e. while the general shape of the magnitude/phase plots are as discussed above, the exact nature depends on both ωn\omega_n as well as ζ\zeta. This link allows one to change these parameters to visualize how the plots change.

[back]

[1] Later we will see that it is better defined in the Laplace domain; but that is a topic for later lectures.
CC BY-SA 4.0 Ivan Abraham. Last modified: March 22, 2023. Website built with Franklin.jl and the Julia programming language. Curious? See familiar examples.