Part 7 - Bode plot

Introduction

In this part we’ll begin with the part about frequency analysis.

Test functions

Often when we want to test our system to determine the overall stability, time it takes and the response we get.

We often test with our unit step function:

σ(t)={1t00t<0\sigma(t) = \begin{cases} 1 & t \leq 0 \newline 0 & t < 0 \end{cases}

We call a system response to the unit step function for unit step response.

Given a system of form:

G(s)=K1+TsG(s) = \dfrac{K}{1 + Ts}

We get a unit step response of y(t)=K(1etτ)y(t) = K(1 - e^{-\dfrac{t}{\tau}}).

We also have our beloved impulse function, δ(t)\delta(t).

δ(t)=limϵ0{1ϵ0tϵ0t>ϵ,t<0\delta(t) = \lim_{\epsilon \to 0} \begin{cases} \dfrac{1}{\epsilon} & 0 \leq t \leq \epsilon \newline 0 & t > \epsilon, t < 0 \end{cases}

We also have the properties:

δ(t) dt=1\int_{-\infty}^{\infty} \delta(t)\ dt = 1 δ(tT)f(t) dt=f(T)\int_{-\infty}^{\infty} \delta(t - T) f(t)\ dt = f(T) L{δ(t)}=0δ(t)est dt=e0t=1\mathcal{L}\{\delta(t)\} = \int_0^{\infty} \delta(t) e^{-st} \ dt = e^{0t} = 1

Delay rate

We can “delay” a function using a unit step with a delay:

L{y(tT)σ(tT)}=eTsL{y(t)}=eTs Y(s)\mathcal{L}\{y(t -T)\sigma(t - T)\} = e^{-Ts} \cdot \mathcal{L}\{y(t)\} = e^{-Ts}\ Y(s)
Definition 1 (Stable system)

A system is stable if:

limt{Impulse response}=0\lim_{t \to \infty} \{\text{Impulse response}\} = 0

Ramp function

Another function that we’ll perform a lot of tests with is the ramp function. Which we define as:

t σ(t)t\ \sigma(t)

The Laplace transform of this is (using partial integration):

L{t σ(t)}=1s2\mathcal{L} \{t\ \sigma(t) \} = \dfrac{1}{s^2}
Example 1

Determine the long term error, when the insignal is a ramp function, t σ(t)t\ \sigma(t).

Given that:

F(s)=s+2sF(s) = \dfrac{s + 2}{s}G(s)=1s+1G(s) = \dfrac{1}{s + 1}

We know that:

E(s)=R(s)Y(s)E(s) = R(s) - Y(s)Y(s)=L(s)1+L(s)R(s)Y(s) = \dfrac{L(s)}{1 + L(s)} \cdot R(s)L(s)=F(s)G(s)=s+2s(s+1)L(s) = F(s)G(s) = \dfrac{s + 2}{s(s + 1)}

So:

E(s)=R(s)L(s)1+L(s)R(s)=R(s)(1L(s)1+L(s))=R(s)(11+L(s))=1s2(11+s+2s(s+1))=1s2(s(s+1)s(s+1)+s+2)=1s2(s(s+1)s2+2s+2)=(s+1)s(s2+2s+2)\begin{align*} E(s) & = R(s) - \dfrac{L(s)}{1 + L(s)} \cdot R(s) \newline & = R(s) \left(1 - \dfrac{L(s)}{1 + L(s)} \right) \newline & = R(s) \left(\dfrac{1}{1 + L(s)} \right) \newline & = \dfrac{1}{s^2} \left(\frac{1}{1 + \frac{s + 2}{s(s + 1)}} \right) \newline & = \dfrac{1}{s^2} \left(\frac{s(s + 1)}{s(s + 1) + s + 2} \right) \newline & = \dfrac{1}{s^2} \left(\frac{s(s + 1)}{s^2 + 2s + 2} \right) \newline & = \frac{(s + 1)}{s(s^2 + 2s + 2)} \newline \end{align*}

Using the final value theorem:

limte(t)=lims0sE(s)e()=lims0s(s+1)s(s2+2s+2)e()=lims0(s+1)(s2+2s+2)e()=12\lim_{t \to \infty} e(t) = \lim_{s \to 0} s \cdot E(s) \newline e(\infty) = \lim_{s \to 0} s \cdot \frac{(s + 1)}{s(s^2 + 2s + 2)} \newline e(\infty) = \lim_{s \to 0} \frac{(s + 1)}{(s^2 + 2s + 2)} \newline e(\infty) = \boxed{\dfrac{1}{2}}

Frequency analysis

Definition 2 (Frequency function)

The frequency function, G(jω)G(j\omega) for a system is given by:

G(jω)=G(s)s=jωG(j\omega) = G(s) \biggr\rvert_{s = j \omega}

The polar form of this function will be written as:

G(jω)=G(jω)earg(G(jω))G(j\omega) = |G(j\omega)| \cdot e^{arg(G(j\omega))}
Example 2

Let u(t)=Asin(ωt+ϕ)u(t) = A sin(\omega t + \phi) with the system, G(s)G(s) what will our y(t)y(t) be?

y(t)=G(jω)Asin(ωt+ϕ+arg(G(jω))(+eλt)y(t) = |G(j\omega)| \cdot A sin(\omega t + \phi + arg(G(j\omega)) (+ e^{-\lambda t})

That last part is called the transient part and should in reality just be zero.

Bode plot

Bode plots are plots that show the system magnitude and phase shift in a system.

Usually the magnitude can/will be in decibels.

Example 3

Where the yy-axis is either the phase (arg(G(jω))arg(G(j\omega))) or the magnitude (G(jω)|G(j \omega)|).

Remember that decibels are just:

dB=20log(G(jω))dB = 20 log(|G(j\omega)|)
Example 4

Given:

G(s)=1s(s+2)G(s) = \dfrac{1}{s(s + 2)}

This means that:

G(jω)=1jω(jω+2)G(j\omega) = \dfrac{1}{j\omega(j\omega + 2)}

The magnitude is:

G(jω)=1ωω2+22=1ω4+ω2|G(j\omega)| = \dfrac{1}{\omega \sqrt{\omega^2 + 2^2}} = \dfrac{1}{\omega \sqrt{4 + \omega^2}}

The phase is:

arg(G(jω))=arg(1jω(jω+2))=arg(1)arg(jω(jω+2))=arg(1)arg(jω(jω+2))=arg(1)(arg(jω)+arg(jω+2))=0(90+arctan(ω2))=90arctan(ω2)\begin{align*} arg(G(j\omega)) & = arg\left( \dfrac{1}{j\omega(j\omega + 2)} \right) \newline & = \dfrac{arg(1)}{arg(j\omega(j\omega + 2))} \newline & = arg(1) - arg(j\omega(j\omega + 2)) \newline & = arg(1) - (arg(j\omega) + arg(j\omega + 2)) \newline & = 0^\circ - \left(90^\circ + \arctan{\left(\dfrac{\omega}{2}\right)}\right) \newline & = -90^\circ - \arctan{\left(\dfrac{\omega}{2}\right)} \end{align*}

If we now plot these:

Type of factors

In our systems we’ll deal/want these type of factors:

s,1+sω1,eTs,s2+2ζωns+ωn2s, 1 + \dfrac{s}{\omega_1}, e^{-Ts}, s^2 + 2 \zeta \omega_n s + \omega_n^2

Also, good to remember, if ζ>1\zeta > 1, then we can split up this second-order term into first-order term(s).

Let’s do the bode plot for each term.

G(s)=sG(s) = s G(jω)=jωG(j\omega) = j\omega G(jω)=ω|G(j\omega)| = \omega arg(G(jω))=90arg(G(j\omega)) = 90^\circ

Plotting this:

Simple!

Now, for 1s\dfrac{1}{s}

G(s)=1sG(s) = \dfrac{1}{s} G(jω)=1jωG(j\omega) = \dfrac{1}{j\omega} G(jω)=1ω|G(j\omega)| = \dfrac{1}{\omega} arg(G(jω))=90arg(G(j\omega)) = -90^\circ

Plotting this:

Now for 1+sω11 + \dfrac{s}{\omega_1}

G(s)=1+sω1G(s) = 1 + \dfrac{s}{\omega_1} G(jω)=1+jωω1G(j\omega) = 1 + \dfrac{j\omega}{\omega_1}

For this we’ll need to understand some cases.

Case ωω1\omega \ll \omega_1:

G(jω)1G(j\omega) \approx 1 G(jω)=1|G(j\omega)| = 1 arg(G(jω))=0arg(G(j\omega)) = 0^\circ

Case ω=ω1\omega = \omega_1:

G(jω)=1+jG(j\omega) = 1 + j G(jω)=12+12=2|G(j\omega)| = \sqrt{1^2 + 1^2} = \sqrt{2} arg(G(jω))=45arg(G(j\omega)) = 45^\circ

Case ωω1\omega \gg \omega_1:

G(jω)jωω1G(j\omega) \approx j \dfrac{\omega}{\omega_1} G(jω)=ωω1|G(j\omega)| = \dfrac{\omega}{\omega_1} arg(G(jω))=90arg(G(j\omega)) = 90^\circ

Plotting for ω1=2\omega_1 = 2:

This is what we’ll call for low and high frequency asymptotes.

Last factor before an example

G(s)=11+sω1G(s) = \dfrac{1}{1 + \dfrac{s}{\omega_1}} G(jω)=11+jωω1G(j\omega) = \dfrac{1}{1 + \dfrac{j\omega}{\omega_1}}

Case ωω1\omega \ll \omega_1:

G(jω)1G(j\omega) \approx 1 G(jω)=1|G(j\omega)| = 1 arg(G(jω))=0arg(G(j\omega)) = 0^\circ

Case ω=ω1\omega = \omega_1:

G(jω)=11+jG(j\omega) = \dfrac{1}{1 + j} G(jω)=112+12=12|G(j\omega)| = \dfrac{1}{\sqrt{1^2 + 1^2}} = \dfrac{1}{\sqrt{2}} arg(G(jω))=45arg(G(j\omega)) = -45^\circ

Case ωω1\omega \gg \omega_1:

G(jω)1jωω1G(j\omega) \approx \dfrac{1}{j \dfrac{\omega}{\omega_1}} G(jω)=1ωω1=ω1ω|G(j\omega)| = \dfrac{1}{\dfrac{\omega}{\omega_1}} = \dfrac{\omega_1}{\omega} arg(G(jω))=90arg(G(j\omega)) = -90^\circ

Standard form

We’ll usually want to rewrite our transfer functions into these standard factor forms.

Let’s take an example to see why

Example 5G(s)=3(1+s)e0.5ss(s+2)(s+3)=3(1+s)e0.5s2s(1+s2)(s+3)=3(1+s)e0.5s6s(1+s2)(1+s3)=0.5(1+s)e0.5ss(1+s2)(1+s3)\begin{align*} G(s) & = \dfrac{3(1 + s)e^{-0.5s}}{s(s + 2)(s + 3)} \newline & = \dfrac{3(1 + s)e^{-0.5s}}{2s(1 + \frac{s}{2})(s + 3)} \newline & = \dfrac{3(1 + s)e^{-0.5s}}{6s(1 + \frac{s}{2})(1 + \frac{s}{3})} \newline & = \boxed{\dfrac{0.5(1 + s)e^{-0.5s}}{s(1 + \frac{s}{2})(1 + \frac{s}{3})}} \end{align*}

This is now in standard form.

G(jω)=0.5(1+jω)e0.5jωjω(1+jω2)(1+jω3)G(j\omega) = \boxed{\dfrac{0.5(1 + j\omega)e^{-0.5j\omega}}{j\omega(1 + \frac{j\omega}{2})(1 + \frac{j\omega}{3})}}