Overview

Part 10 - Design of controllers

Introduction

In this part we’ll see how we can design different type of controllers to make a system behave as wanted.

PD-controller

G(s)=Ks(1+sT),F(s)=Kp+Kds.G(s) = \dfrac{K}{s(1 + sT)}, \quad F(s) = K_p + K_d s.

The loop transfer function is:

L(s)=F(s)G(s)=K(Kp+Kds)s(1+sT)=KT(Kp+Kds)s2+1Ts.L(s) = F(s)G(s) = \dfrac{K(K_p + K_d s)}{s(1 + sT)} = \dfrac{\frac{K}{T} (K_p + K_d s)}{s^2 + \frac{1}{T} s}. Gry(s)=L(s)1+L(s)=KT(Kp+Kds)s2+1Ts1+KT(Kp+Kds)s2+1Ts=KT(Kp+Kds)s2+1Ts+KT(Kp+Kds)=KpKT+KdKTss2+1+KdKTs+KpKT.\begin{align*} G_{ry}(s) = \dfrac{L(s)}{1 + L(s)} & = \dfrac{\dfrac{\frac{K}{T} (K_p + K_d s)}{s^2 + \frac{1}{T} s}}{1 + \dfrac{\frac{K}{T} (K_p + K_d s)}{s^2 + \frac{1}{T} s}} \newline & = \dfrac{\frac{K}{T}(K_p + K_d s)}{s^2 + \frac{1}{T} s + \frac{K}{T}(K_p + K_d s)} \newline & = \dfrac{K_p \frac{K}{T} + K_d \frac{K}{T} s}{s^2 + \frac{1 + K_d K}{T} s + K_p \frac{K}{T}}. \end{align*}

Which we can view as a second-order system where:

ωn=KpKT,ζ=1+KdK2Tωn=1+KdK2TKpKT.\omega_n = \sqrt{K_p \frac{K}{T}}, \quad \zeta = \dfrac{1 + K_d K}{2 T \omega_n} = \dfrac{1 + K_d K}{2T\sqrt{K_p \frac{K}{T}}}.

If KdK_d increases, ζ\zeta will also increase. This means that the phase margin will increase.

If KdK_d decreases, ζ\zeta will also decrease. This means that the phase margin will decrease.

Example 1 (I-controller)

In this case we have a simple I-controller.

u(t)=Ki∫0te(τ) dτ  ⟺  F(s)=Kis.u(t) = K_i \int_0^t e(\tau) \, d\tau \iff F(s) = \dfrac{K_i}{s}.

Given that our process is:

G(s)=bs+a.G(s) = \dfrac{b}{s + a}.

Our loop transfer function is:

L(s)=F(s)G(s)=Kibs(s+a).L(s) = F(s)G(s) = \dfrac{K_i b}{s(s + a)}.

What should KiK_i be if we want a phase margin of 45∘45^\circ, meaning ϕm=45∘\phi_m = 45^\circ.

L(jω)=Kibjω(jω+a).L(j\omega) = \dfrac{K_i b}{j\omega(j\omega + a)}.

We defined the phase margin as:

ϕm=arg⁡(L(jωc))+180∘.\phi_m = \arg(L(j\omega_c)) + 180^\circ.45∘=arg⁡(L(jωc))+180∘arg⁡(L(jωc))=−135∘−90∘−arctan⁡(ωca)=−135∘arctan⁡(ωca)=45∘ωca=1ωc=a.\begin{align*} 45^\circ & = \arg(L(j\omega_c)) + 180^\circ \newline \arg(L(j\omega_c)) & = -135^\circ \newline -90^\circ - \arctan\left(\dfrac{\omega_c}{a}\right) & = -135^\circ \newline \arctan\left(\dfrac{\omega_c}{a}\right) & = 45^\circ \newline \dfrac{\omega_c}{a} & = 1 \newline \omega_c & = a. \end{align*}

Using the fact that ∣L(jωc)∣=1|L(j\omega_c)| = 1:

∣L(jωc)∣=1Kibωcωc2+a2=1Kibaa2+a2=1Kiba2a2=1Kib2a2=1Kib=2a2Ki=2a2b.\begin{align*} |L(j\omega_c)| & = 1 \newline \dfrac{K_i b}{\omega_c \sqrt{\omega_c^2 + a^2}} & = 1 \newline \dfrac{K_i b}{a \sqrt{a^2 + a^2}} & = 1 \newline \dfrac{K_i b}{a \sqrt{2a^2}} & = 1 \newline \dfrac{K_i b}{\sqrt{2} a^2} & = 1 \newline K_i b & = \sqrt{2} a^2 \newline K_i & = \dfrac{\sqrt{2} a^2}{b}. \end{align*}

Let’s put this into L(s)L(s)

L(s)=2a2s(s+a).L(s) = \dfrac{\sqrt{2} a^2}{s(s + a)}.

Let’s now find Gry(s)G_{ry}(s)

Gry(s)=L(s)1+L(s)=…=2a2s(s+a)+2a2=2a2s2+as+2a2.G_{ry}(s) = \dfrac{L(s)}{1 + L(s)} = \ldots = \dfrac{\sqrt{2} a^2}{s(s + a) + \sqrt{2} a^2} = \dfrac{\sqrt{2} a^2}{s^2 + as + \sqrt{2} a^2}.

Second-order system!

ωn=2a2=214a,ζ=a2ωn=a2(214a)=12⋅214=0.42.\begin{align*} \omega_n & = \sqrt{\sqrt{2} a^2} = 2^{\frac{1}{4}} a, \newline \zeta & = \dfrac{a}{2 \omega_n} = \dfrac{a}{2(2^{\frac{1}{4}} a)} = \dfrac{1}{2 \cdot 2^{\frac{1}{4}}} = 0.42. \end{align*}
Example 2 (PI-controller)

Let’s now do a PI-controller

Given the system:

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

Design a PI-controller so that the phase margin is 50∘50^\circ, given that ωc=0.3ωπ\omega_c = 0.3 \omega_{\pi}

NB: This notation, ωc=C⋅ωπ\omega_c = C \cdot \omega_{\pi} means that ∣G(jωc)∣=1|G(j\omega_c)| = 1 and arg⁡(G(jωπ))=−180∘\arg(G(j\omega_{\pi})) = -180^\circ, not the loop transfer function. One can also denote it as ωcG\omega_{cG}

A general PI-controller is written as:

F(s)=Kp+Kis=Kp(1+1Tis)=Kp(1+TisTis).F(s) = K_p + \dfrac{K_i}{s} = K_p\left(1 + \dfrac{1}{T_i s}\right) = K_p\left(\dfrac{1 + T_i s}{T_i s}\right).

We know that:

arg⁡(G(jωπ))=−180∘,\arg(G(j\omega_{\pi})) = -180^\circ,G(jω)=1jω(jω+8)2.G(j\omega) = \dfrac{1}{j\omega(j\omega + 8)^2}.

Which means:

arg⁡(G(jω))=−90∘−2arctan⁡(ω8).\arg(G(j\omega)) = -90^\circ - 2 \arctan\left(\dfrac{\omega}{8}\right).−90∘−2arctan⁡(ωπ8)=−180∘2arctan⁡(ωπ8)=90∘arctan⁡(ωπ8)=45∘ωπ8=1ωπ=8.\begin{align*} -90^\circ - 2 \arctan\left(\dfrac{\omega_{\pi}}{8}\right) & = -180^\circ \newline 2 \arctan\left(\dfrac{\omega_{\pi}}{8}\right) & = 90^\circ \newline \arctan\left(\dfrac{\omega_{\pi}}{8}\right) & = 45^\circ \newline \dfrac{\omega_{\pi}}{8} & = 1 \newline \omega_{\pi} & = 8. \end{align*}

From our initial condition:

ωc=0.3⋅ωπ=2.4.\omega_c = 0.3 \cdot \omega_{\pi} = 2.4.

A phase margin of 50∘50^\circ means:

ϕm=50∘  ⟺  arg⁡(L(jωc))+180∘=50∘.\phi_m = 50^\circ \iff \arg(L(j\omega_c)) + 180^\circ = 50^\circ.

We actually don’t need to calculate what the loop transfer function is here, we can use the fact that L(s)=F(s)G(s)L(s) = F(s)G(s), which means arg⁡(L(jω))=arg⁡(F(jω))+arg⁡(G(jω))\arg(L(j\omega)) = \arg(F(j\omega)) + \arg(G(j\omega)).

arg⁡(G(jωc))=−90∘−2arctan⁡(2.48)=−123.4∘.\arg(G(j\omega_c)) = -90^\circ - 2 \arctan\left(\dfrac{2.4}{8}\right) = -123.4^\circ.F(jω)=Kp(1+TijωTijω),arg⁡(F(jω))=arctan⁡(Tiω)−90∘.F(j\omega) = K_p\left(\dfrac{1 + T_i j\omega}{T_i j\omega}\right), \quad \arg(F(j\omega)) = \arctan(T_i \omega) - 90^\circ.arg⁡(L(jωc))+180∘=50∘arctan⁡(Tiωc)−90∘−123.4∘+180∘=50∘arctan⁡(Tiωc)=83.4∘2.4Ti=tan⁡(83.4∘)Ti=tan⁡(83.4∘)2.4=3.6.\begin{align*} \arg(L(j\omega_c)) + 180^\circ & = 50^\circ \newline \arctan(T_i \omega_c) - 90^\circ - 123.4^\circ + 180^\circ & = 50^\circ \newline \arctan(T_i \omega_c) & = 83.4^\circ \newline 2.4 T_i & = \tan(83.4^\circ) \newline T_i & = \dfrac{\tan(83.4^\circ)}{2.4} = 3.6. \end{align*}

Now, let’s use that ∣L(jωc)∣=1|L(j\omega_c)| = 1

∣L(jωc)∣=1∣F(jωc)G(jωc)∣=1∣F(jωc)∣∣G(jωc)∣=1Kp⋅12+(ωc⋅Ti)2ωc⋅Ti⋅1ωc(ωc2+82)2=1Kp=…≈166.31.\begin{align*} |L(j\omega_c)| & = 1 \newline |F(j\omega_c)G(j\omega_c)| & = 1 \newline |F(j\omega_c)| |G(j\omega_c)| & = 1 \newline K_p \cdot \dfrac{\sqrt{1^2 + (\omega_c \cdot T_i)^2}}{\omega_c \cdot T_i} \cdot \dfrac{1}{\omega_c \left(\sqrt{\omega_c^2 + 8^2}\right)^2} & = 1 \newline K_p & = \ldots \approx 166.31. \end{align*}

Search

Essays, lecture notes, and research

Type to search the site.