Part 2 - Transfer functions

Introduction

In this part we’ll define what a transfer function is for a system, and why they are important.

Let’s firstly cover feedback again.

Feedback system

As we discussed last time we’ll encounter:

  • v(t)v(t) - Interference
  • u(t)u(t) - Control signal/Input signal
  • y(t)y(t) - Response signal/Output signal
  • r(t)r(t) - Reference value
  • e(t)e(t) - Control error

Let’s take a real world example

Example 1

Say that we have a system which controls temperature. We have an initial temperature for 19^\circa.

At the time instance, t0t_0, we change r(t)r(t) (via a knob) to be at 21^\circ.

From a time period, t1t_1 to t2t_2, we open a window which cools down the room.

From this real world example we can describe the system as:

t<t0t < t_0, the system is stable at 19^\circ

t=t0t = t_0, r(t)=21r(t) = 21^\circ. We will get a control error, e(t)>0e(t) > 0. The control device steps in and increases the temperature, which will stablize at 21^\circ.

t=t1t = t_1, The window is opened, which means we have v(t)<0v(t) < 0, or in other words, the temperature decreases. This means again that e(t)>0e(t) > 0. The control device needs to readjust to this change.

t=t2t = t_2, The window is closed, which will yield a control error, the control device will readjust to this change as well.

t>t2t > t_2, The system will remain stable at 21^\circ again.

Controllers

But how do we actually control a control error? There are many different types of controllers, but the most common are the PID variants.

  • P-controller
u(t)=Kp e(t)u(t) = K_p\ e(t)
  • I-controller
u(t)=Ki0te(τ) dτu(t) = K_i \int_0^t e(\tau)\ d\tau
  • D-controller
u(t)=Kd d e(t)dtu(t) = K_d\ \dfrac{d\ e(t)}{dt}

We also have the combinations:

  • PI-controller
u(t)=Kp e(t)+Ki0te(τ) dτu(t) = K_p\ e(t) + K_i \int_0^t e(\tau)\ d\tau
  • PD-controller
u(t)=Kp e(t)+Kd d e(t)dtu(t) = K_p\ e(t) + K_d\ \dfrac{d\ e(t)}{dt}
  • PID-controller
u(t)=Kp e(t)+Ki0te(τ) dτ+Kd d e(t)dtu(t) = K_p\ e(t) + K_i \int_0^t e(\tau)\ d\tau + K_d\ \dfrac{d\ e(t)}{dt}

Laplace transform

We’ve already covered the definition and the formality of the Laplace transform so let’s quickly recover it.

Recall (Laplace transform)F(s)=0f(t) est dtF(s) = \int_0^{\infty} f(t)\ e^{-st}\ dt

Where s=μ+jωs = \mu + j\omega

Transfer function

Let’s define the transfer function in words first.

Definition 1 (Transfer function)

The transfer function for a system is equal to the Laplace transformation of the output signal divided by the Laplace transformation of the input signal.

In other words:

G(s)=Y(s)U(s)G(s) = \dfrac{Y(s)}{U(s)}Y(s)=G(s)U(s)Y(s) = G(s) U(s)

Properties

We denote the Laplace transform as L\mathcal{L}

  • L{y˙}=sY(s)y(0)\mathcal{L} \{\dot{y}\} = sY(s) - y(0)
  • L{y¨}=s2Y(s)sy(0)y˙(0)\mathcal{L} \{\ddot{y}\} = s^2Y(s) - sy(0) - \dot{y}(0)
  • L{0ty(τ) dτ}=1sY(s)\mathcal{L} \{\int_0^t y(\tau)\ d\tau \} = \dfrac{1}{s} Y(s)
Theorem 1 (Initial value theorem)y(0)=limssY(s)y(0) = \lim_{s \to \infty} s \cdot Y(s)
Theorem 2 (Final value theorem)limty(t)=lims0sY(s)\lim_{t \to \infty} y(t) = \lim_{s \to 0} s \cdot Y(s)

Given that, limty(t)\lim_{t \to \infty} y(t) exists.

Example 2

Say that we have a car that moves, we have u(t)u(t) which is the driving force forward. y(t)y(t) is the speed of the car, and of course we have friction/air resistence which we’ll denote v(t)v(t).

Let’s find the transfer function of this system.

From Newtons second law of motion we know that:

F=maF = ma

We know from high-school physics that:

a=d y(t)dt=y˙(t)a = \dfrac{d\ y(t)}{dt} = \dot{y}(t)

Now the tricky part, v(t)v(t), let’s define a simple model which is that the air resistence is proportional to the speed with some constant:

v(t)=by(t)v(t) = b \cdot y(t)

Therefore:

u(t)by(t)=my˙(t)u(t) - b \cdot y(t) = m \cdot \dot{y}(t)my˙(t)+by(t)=u(t)m \cdot \dot{y}(t) + b \cdot y(t) = u(t)

Let’s transform into Laplace (NB: All our initial conditions are zero!).

msY(s)+bY(s)=U(s)ms \cdot Y(s) + b \cdot Y(s) = U(s)(ms+b)Y(s)=U(s)(ms + b)Y(s) = U(s)G(s)=Y(s)U(s)=1ms+bG(s) = \dfrac{Y(s)}{U(s)} = \dfrac{1}{ms + b}

Let’s introduce T=mbT = \dfrac{m}{b} and K=1bK = \dfrac{1}{b}. Therefore:

G(s)=K1+sTG(s) = \dfrac{K}{1 + sT}

Unit step function

Definition 2 (Unit step function)

In this series we’ll denote the unit step function with σ(t)\sigma(t).

The definition for the unit step is:

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

Let u(t)=σ(t)u(t) = \sigma(t) now.

U(s)=1sU(s) = \dfrac{1}{s}

This means that:

G(s)=Ks(1+sT)G(s) = \dfrac{K}{s(1 + sT)}

Using partial fraction decomposition:

G(s)=KsKT1+sTG(s) = \dfrac{K}{s} - \dfrac{KT}{1 + sT}