Overview

Part 3 - Controllers in the Laplace domain

Introduction

In this part we’ll define controllers in the Laplace domain.

Let’s firstly cover feedback again.

NNth-Order systems

In controls, we’ll often study system which can be described with differential equations. A NNth-order system means we can describe said system with a NNth-order differential equation.

We also say that the transfer function has degree NN.

Feedback system

Let’s find the general transfer function for a feedback system, from r(t)r(t) to y(t)y(t).

  • G(s)G(s) - System/Process
  • F(s)F(s) - Controller
  • R(s)R(s) - Reference value
  • U(s)U(s) - Input signal
  • Y(s)Y(s) - Output signal
  • E(s)E(s) - Control error =R(s)−Y(s)= R(s) - Y(s)

Let Gry(s)=Y(s)R(s)G_{ry}(s) = \dfrac{Y(s)}{R(s)}

Y(s)=G(s)U(s).Y(s) = G(s) U(s).

We know that:

U(s)=F(s)E(s),E(s)=R(s)−Y(s).U(s) = F(s) E(s), \quad E(s) = R(s) - Y(s).

Therefore:

U(s)=F(s)(R(s)−Y(s))=F(s)R(s)−F(s)Y(s).\begin{align*} U(s) & = F(s)(R(s) - Y(s)) \newline & = F(s)R(s) - F(s)Y(s). \end{align*}

Therefore:

Y(s)=G(s)(F(s)R(s)−F(s)Y(s))=G(s)F(s)R(s)−G(s)F(s)Y(s)Y(s)+G(s)F(s)Y(s)=G(s)F(s)R(s)Y(s)(1+G(s)F(s))=G(s)F(s)R(s).\begin{align*} Y(s) & = G(s)(F(s)R(s) - F(s)Y(s)) \newline & = G(s)F(s)R(s) - G(s)F(s)Y(s) \newline Y(s) + G(s)F(s)Y(s) & = G(s)F(s)R(s) \newline Y(s)(1 + G(s)F(s)) & = G(s)F(s)R(s). \end{align*}

Therefore:

Gry(s)=G(s)F(s)1+G(s)F(s).G_{ry}(s) = \dfrac{G(s)F(s)}{1 + G(s)F(s)}.

Let’s denote G(s)F(s)G(s)F(s) as L(s)L(s).

Gry(s)=L(s)1+L(s).G_{ry}(s) = \dfrac{L(s)}{1 + L(s)}.

This describes the relation between r(t)r(t) and y(t)y(t) and their stability.

Feedback system

Pros:

  • y(t)y(t) can be equal to r(t)r(t) (with the right controller).
  • Can compensate for interference

Cons:

  • Can be unstable
Definition 1 (Zeros and poles)

Gry(s)G_{ry}(s) can be written as:

Gry(s)=B(s)A(s).G_{ry}(s) = \dfrac{B(s)}{A(s)}.

The zeros are given by the equation B(s)=0B(s) = 0.

The poles are given by the equation A(s)=0A(s) = 0.

We’ll see later on how zeros and the poles affect the stability of a system.

Controllers in Laplace

  • P-controller - u(t)=Kpe(t)u(t) = K_p e(t)
  • I-controller - u(t)=Ki∫0te(τ) dτu(t) = K_i \int_0^t e(\tau) \, d\tau
  • PI-controller - u(t)=Kpe(t)+Ki∫0te(τ) dτu(t) = K_p e(t) + K_i \int_0^t e(\tau) \, d\tau

In Laplace:

  • P-controller - U(s)=KpE(s)U(s) = K_p E(s)
  • I-controller - U(s)=Ki1sE(s)U(s) = K_i \dfrac{1}{s} E(s)
  • PI-controller - U(s)=KpE(s)+KisE(s)U(s) = K_p E(s) + \dfrac{K_i}{s} E(s)

Let’s rewrite the PI controller a bit:

U(s)=KpE(s)+KisE(s)=E(s)(Kp+Kis)=E(s)(Kp(1+KiKp⋅1s))=E(s)(Kp(1+1Ti⋅s))=E(s)(Kp⋅1+Ti⋅sTi⋅s).\begin{align*} U(s) & = K_p E(s) + \dfrac{K_i}{s} E(s) \newline & = E(s) \left(K_p + \dfrac{K_i}{s}\right) \newline & = E(s) \left(K_p\left(1 + \dfrac{K_i}{K_p} \cdot \dfrac{1}{s}\right)\right) \newline & = E(s) \left(K_p\left(1 + \dfrac{1}{T_i \cdot s}\right)\right) \newline & = E(s) \left(K_p \cdot \dfrac{1 + T_i \cdot s}{T_i \cdot s} \right). \end{align*}

Where Ti=KpKiT_i = \dfrac{K_p}{K_i}

Example 1 (Car with engine dynamics)

Let’s add some engine dynamics:

Fd(s)=Ku1+Tu⋅s⋅U(s).F_d(s) = \dfrac{K_u}{1 + T_u \cdot s} \cdot U(s).

Car dynamic:

Gcar(s)=K1+sT=1ms+b.G_{car}(s) = \dfrac{K}{1 + sT} = \dfrac{1}{ms + b}.

From the differential equation (just like last time) we get:

Y(s)(ms+b)=Ku1+Tu⋅s⋅U(s).Y(s)(ms + b) = \dfrac{K_u}{1 + T_u \cdot s} \cdot U(s).

Let’s find transfer function from U(s)→Y(s)U(s) \to Y(s).

Guy(s)=Y(s)U(s)=Ku(ms+b)(1+Tus).G_{uy}(s) = \dfrac{Y(s)}{U(s)} = \dfrac{K_u}{(ms + b)(1 + T_u s)}.

Given some values:

  • m=103 kgm = 10^3\,\mathrm{kg}
  • b=200 Ns/mb = 200\,\mathrm{Ns/m}
  • Ku=10 kN/radK_u = 10\,\mathrm{kN/rad}
  • Tu=1 sT_u = 1\,\mathrm{s}
Guy(s)=104(103s+200)(1+s)=…=50(1+5s)(1+s).G_{uy}(s) = \dfrac{10^4}{(10^3s + 200)(1 + s)} = \ldots = \boxed{\dfrac{50}{(1 + 5s)(1 + s)}}.

P-controller

Say that our controller was a P-controller.

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

L(s)=Kp⋅Guy(s)L(s) = K_p \cdot G_{uy}(s)

L(s)=50Kp(1+5s)(1+s).L(s) = \dfrac{50K_p}{(1 + 5s)(1 + s)}. Gry(s)=50Kp(1+5s)(1+s)1+50Kp(1+5s)(1+s)=50Kp(1+5s)(1+s)+50Kp=10Kps2+65s+15+10Kp.\begin{align*} G_{ry}(s) & = \dfrac{\dfrac{50K_p}{(1 + 5s)(1 + s)}}{1 + \dfrac{50K_p}{(1 + 5s)(1 + s)}} \newline & = \dfrac{50K_p}{(1 + 5s)(1 + s) + 50K_p} \newline & = \dfrac{10K_p}{s^2 + \dfrac{6}{5}s + \dfrac{1}{5} + 10K_p}. \end{align*}

Gradually increasing reference value

Say that we have r(t)=r0⋅σ(t)r(t) = r_0 \cdot \sigma(t)

This means:

R(s)=r0s.R(s) = \dfrac{r_0}{s}.

Let’s study y(∞)y(\infty).

lim⁡t→∞y(t)=lim⁡s→0sY(s)=lim⁡s→0s⋅Gry(s)⋅R(s)=lim⁡s→0s⋅10Kps2+65s+15+10Kp⋅r0s=10Kp15+10Kp⋅r0.\begin{align*} \lim_{t \to \infty} y(t) & = \lim_{s \to 0} sY(s) \newline & = \lim_{s \to 0} s \cdot G_{ry}(s) \cdot R(s) \newline & = \lim_{s \to 0} s \cdot \dfrac{10K_p}{s^2 + \dfrac{6}{5}s + \dfrac{1}{5} + 10K_p} \cdot \dfrac{r_0}{s} \newline & = \dfrac{10K_p}{\dfrac{1}{5} + 10K_p} \cdot r_0. \end{align*}

Thus

lim⁡t→∞y(t)=10Kp15+10Kp⋅r0<r0.\lim_{t \to \infty} y(t) = \dfrac{10K_p}{\dfrac{1}{5} + 10K_p} \cdot r_0 < r_0.

This means that, a P-controller will never be enough for a system to get an output that is exactly the same as the reference value.

Let’s see how a PI-controller behaves.

Example 2 (PI-controller)

If we use the same system.

Gry(s)G_{ry}(s) is a 2nd order transfer function. (The denominator is a polynomial of degree 2).

The general formula for 2nd order transfer functions can be written as:

Gry(s)=Kωn2s2+2ζωns+ωn2.G_{ry}(s) = \dfrac{K \omega^2_n}{s^2 + 2 \zeta \omega_n s + \omega^2_n}.

Where:

  • ωn\omega_n - Natural frequency
  • KK- Gain
  • ζ\zeta - Damping ratio

So, in the case Gry(s)=10Kps2+65s+15+10KpG_{ry}(s) = \dfrac{10K_p}{s^2 + \dfrac{6}{5}s + \dfrac{1}{5} + 10 K_p}

We can rewrite it with:

ωn=0.2+10Kp,K=10Kp0.2+10Kp,ζ=1.220.2+10Kp.\omega_n = \sqrt{0.2 + 10 K_p}, \quad K = \dfrac{10K_p}{0.2 + 10 K_p}, \quad \zeta = \dfrac{1.2}{2 \sqrt{0.2 + 10 K_p}}.

Back to the PI-controller example.

Gry(s)=L(s)1+L(s).G_{ry}(s) = \dfrac{L(s)}{1 + L(s)}.

We know that:

L(s)=F(s)G(s).L(s) = F(s) G(s).

We know:

F(s)=Kp(1+TisTis),G(s)=50(1+5s)(1+s).F(s) = K_p \left(\dfrac{1 + T_i s}{T_i s} \right), \quad G(s) = \dfrac{50}{(1 + 5s)(1 + s)}.

From G(s)G(s) we can see that we have two poles. One pole is “fast”, T=1 sT = 1\,\mathrm{s} (1+s)(1 + s). The other “slow”, T=5 sT = 5\,\mathrm{s} (1+5s)(1 + 5s).

If we choose Ti=5 sT_i = 5\,\mathrm{s}, then:

F(s)=Kp(1+5s5s).F(s) = K_p \left(\dfrac{1 + 5s}{5s} \right).

Which means:

L(s)=Kp(1+5s5s)50(1+5s)(1+s)=50Kp(5s)(1+s).\begin{align*} L(s) & = K_p \left(\dfrac{1 + 5s}{5s} \right) \dfrac{50}{(1 + 5s)(1 + s)} \newline & = \dfrac{50 K_p}{(5s)(1 + s)}. \end{align*}

Which means:

Gry(s)=L(s)1+L(s)=50Kp(5s)(1+s)1+50Kp(5s)(1+s)=50Kp(5s)(1+s)+50Kp=10Kps2+s+10Kp.\begin{align*} G_{ry}(s) & = \dfrac{L(s)}{1 + L(s)} \newline & = \dfrac{\dfrac{50 K_p}{(5s)(1 + s)}}{1 + \dfrac{50 K_p}{(5s)(1 + s)}} \newline & = \dfrac{50 K_p}{(5s)(1 + s) + 50 K_p} \newline & = \dfrac{10 K_p}{s^2 + s + 10 K_p}. \end{align*}

If we now study:

lim⁡t→∞y(t)=lim⁡s→0s⋅Y(s)=lim⁡s→0s⋅Gry(s)R(s)=lim⁡s→0s⋅10Kps2+s+10Kp⋅r0s=lim⁡s→010Kps2+s+10Kp⋅r0=10Kp10Kp⋅r0=r0.\begin{align*} \lim_{t \to \infty} y(t) & = \lim_{s \to 0} s \cdot Y(s) \newline & = \lim_{s \to 0} s \cdot G_{ry}(s) R(s) \newline & = \lim_{s \to 0} s \cdot \dfrac{10 K_p}{s^2 + s + 10 K_p} \cdot \dfrac{r_0}{s} \newline & = \lim_{s \to 0} \dfrac{10 K_p}{s^2 + s + 10 K_p} \cdot r_0 \newline & = \dfrac{10 K_p}{10 K_p} \cdot r_0 \newline & = \boxed{r_0}. \end{align*}

So, we see that a PI-controller gets us exactly the reference value.

Search

Essays, lecture notes, and research

Type to search the site.