Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Transfer functions

Let’s revisit the cruise control example from the previous section on Laplace transforms. In many practical situations, we mainly care about the relationship between the input and output of a system. In this case, the applied force fa(t)f_a(t) and velocity v(t)v(t). Although the initial velocity v0v_0 does matter, its effect is transient, meaning that it fades over time. Recall the differential equation for this system:

mv˙+bv=fa,v(0)=v0m\dot v + b v = f_a,\qquad v(0) = v_0

Let’s assume fa(t)f_a(t) is no longer constant, but rather it is some complicated function of time. Taking Laplace transforms, as before, we now obtain:

V(s)=(1ms+b)Fa(s)+(mms+b)v0V(s) = \left( \frac{1}{ms+b} \right) F_a(s) + \left( \frac{m}{ms+b}\right) v_0

This time, the two components of the response are:

The zero-input response is unchanged, and still dies out exponentially. For this reason, it is often called a transient response. When simulated for long periods of time, this transient response has little effect. We demonstrate this below by simulating the cruise control example with m=1m=1 and b=1b=1 below for a particular choice of fa(t)f_a(t).

Simulation of Eq.  with zero-state and zero-input responses plotted separately.

Figure 1:Simulation of Eq. (1) with zero-state and zero-input responses plotted separately.

The transfer function

When a system is running for a long time, it often makes sense to ignore the transient zero-input response and just focus on the zero-state response. In other words, we assume v0=0v_0=0 and Eq. (2) becomes:

V(s)=(1ms+b)Fa(s)V(s) = \left(\frac{1}{ms+b}\right) F_a(s)

Eq. (3) shows us something interesting. The ratio V(s)Fa(s)\frac{V(s)}{F_a(s)} is always equal to 1ms+b\frac{1}{ms+b}, no matter what we pick for our input fa(t)f_a(t). This is true for any LTI system, which motivates the following definition.

Since transfer function is always the same for all input-output pairs, we can use it to determine how the system will react to any input. Once we know G(s)G(s), if we apply a different input u(t)u(t) to our system, the output will satisfy

Y(s)=G(s)U(s)Y(s) = G(s)\,U(s)

so the Laplace transforms of the input and output are related via ordinary multiplication by the transfer function! We can view this diagramatically.

Diagram comparing time-domain and s-domain paths for solving a system.

Figure 2:Diagram comparing time-domain and ss-domain paths for solving a system.

As far as representing a dynamical system, a transfer function encodes the same information as a differential equation. We can use them interchangeably:

mv˙+bv=fa,    G(s)=1ms+bm\dot v + bv = f_a,\quad\iff\quad G(s) = \frac{1}{ms+b}

Why transfer functions?

Why not just use differential equations to represent systems? Several reasons.

  1. It is more convenient to manipulate and simplify transfer functions rather than differential equations because transfer functions are algebraic objects. We can add them, multiply them, factor them, etc. For example, we can simplify by canceling common factors: s+1s2+3s+2=1s+2\frac{s+1}{s^2+3s+2} = \frac{1}{s+2}. Another example is eliminating intermediate variables (see quarter-car example below). These sorts of simplification are much more difficult to perform when working with differential equations.

  2. We will link properties of a system to properties of its transfer function, so that we will be able to know how a system will perform without ever having to solve the associated differential equation. For example: “I know the system response will oscillate this much because the transfer function looks like this”.

  3. We will work with systems that consist of several interconnected components (a system, a sensor, a controller, etc.). In such cases, we can easily combine them into a single transfer function and reason about the properties of the aggregated system as a function of changes in the individual components. For example: “what happens if I change my controller in this way?”

Example: spring-mass-damper

Consider a simple spring-mass-damper system, shown below.

Standard spring-mass-damper system.

Figure 3:Standard spring-mass-damper system.

Let’s calculate the transfer function relating input force f(t)f(t) to displacement x(t)x(t). First, we start with the differential equation:

mx¨+bx˙+kx=fm \ddot x + b \dot x + k x = f

Next, we take the Laplace transform (see Table 1) using zero initial conditions. This is easy to do; derivatives simply become multiplication by ss:

ms2X(s)+bsX(s)+kX(s)=F(s)m s^2 X(s) + b s X(s) + k X(s) = F(s)

In the future, we will often omit the “(s)(s)” and just write XX or FF since we know upper-case letters are Laplace transforms and therefore functions of ss. Factoring, obtain:

(ms2+bs+k)X(s)=F(s)(ms^2 + bs + k)X(s) = F(s)

Now write the transfer function, remembering it’s the ration of “output over input”.

G(s)=X(s)F(s)=1ms2+bs+k\boxed{G(s) = \frac{X(s)}{F(s)} = \frac{1}{ms^2 + bs + k}}

We use the name G(s)G(s) because traditionally in control systems, we label transfer functions using the letters GG, HH, or KK.

We wrote out all the steps above, but it’s worth practicing going directly from Eq. (7) to Eq. (10) in your head. The Laplace transform turns the derivatives into powers of ss, so it’s a straightforward transformation. From now on, we will not write all the steps.

Example: quarter-car model

The model below is a quarter-car model, which captures the vertical dynamics of a car for a single wheel. The car chassis m1m_1 and the wheel m2m_2 are treated as separate masses connected by springs and dampers. (k1,b1)(k_1,b_1) models the car’s suspension, while (k2,b2)(k_2,b_2) models the springiness of the tires. The input is r(t)r(t), the vertical position of the ground.

Quarter-car model.

Figure 4:Quarter-car model.

Our goal is to produce a differential equation relating r(t)r(t) to the position of the car x(t)x(t). We are not interested z(t)z(t), the position of the wheel. We will skip the free-body diagram and jump straight to the equations of motion for the chassis and the wheel.

m1x¨+b1(x˙z˙)+k1(xz)=0m2z¨+b2(z˙r˙)+k2(zr)b1(x˙z˙)k1(xz)=0\begin{aligned} m_1 \ddot x + b_1(\dot x - \dot z) + k_1(x - z) &= 0 \\ m_2 \ddot z + b_2(\dot z - \dot r) + k_2(z - r) - b_1(\dot x - \dot z) - k_1(x - z) &= 0 \end{aligned}

Let’s rearrange to group like terms:

(m1x¨+b1x˙+k1x)(b1z˙+k1z)=0(m2z¨+(b1+b2)z˙+(k1+k2)z)(b1x˙+k1x)=(b2r˙+k2r)\begin{aligned} (m_1 \ddot x + b_1\dot x + k_1 x) - (b_1 \dot z + k_1 z) &= 0 \\ \bigl(m_2 \ddot z + (b_1+b_2)\dot z + (k_1+k_2) z\bigr) - (b_1 \dot x + k_1 x) &= (b_2 \dot r + k_2 r) \end{aligned}

Both the input rr and its derivative r˙\dot r appear in these equations. This happens because our input is a position rather than a force, and it’s not a problem.

However, we were asked to eliminate zz and produce a single equation in terms of xx and rr. It’s not immediately apparent how one can do this. When we encountered problems like this in the past, such as springs connected in series, we could solve for zz in one equation and substitute the result into the other. But both equations in (12) contain zz and z˙\dot z. It’s not clear how to eliminate zz!

The key is to take Laplace transforms. This converts (12) from differential equations into algebraic equations and we obtain:

(m1s2+b1s+k1)X(b1s+k1)Z=0(m2s2+(b1+b2)s+(k1+k2))Z(b1s+k1)X=(b2s+k2)R\begin{aligned} (m_1 s^2 + b_1 s + k_1) X - (b_1 s + k_1)Z &= 0 \\ \bigl(m_2 s^2 + (b_1+b_2)s + (k_1+k_2)\bigr)Z - (b_1 s + k_1)X &= (b_2 s + k_2)R \end{aligned}

We can now proceed as we did with the springs in series. Solve for ZZ in one equation and plug it into the other. From the first equation, we have:

Z=m1s2+b1s+k1b1s+k1XZ = \frac{m_1 s^2 + b_1 s + k_1}{b_1 s + k_1}X

Substitute this into the second equation, and obtain:

((m2s2+(b1+b2)s+(k1+k2))(m1s2+b1s+k1)b1s+k1(b1s+k1))X=(b2s+k2)R\left( \frac{\bigl(m_2 s^2 + (b_1+b_2)s + (k_1+k_2)\bigr)\bigl(m_1 s^2 + b_1 s + k_1\bigr)}{b_1s+k_1} - (b_1s+k_1)\right)X = (b_2 s + k_2)R

This equation only involves XX and RR. We have eliminated ZZ! To convert this into a differential equation, we need both sides to look like polynomials in ss multiplying either XX or RR. This way, we can take inverse Laplace transforms. This will require a bit of algebra. Multiply both sides by (b1s+k1)(b_1s+k_1) to clear the fractions, and obtain:

[(m2s2+(b1+b2)s+(k1+k2))(m1s2+b1s+k1)(b1s+k1)2]X=(b1s+k1)(b2s+k2)R\Bigl[ \bigl(m_2 s^2 + (b_1+b_2)s + (k_1+k_2)\bigr)\bigl(m_1 s^2 + b_1 s + k_1\bigr) - (b_1s+k_1)^2\Bigr]X = (b_1s+k_1)(b_2 s + k_2)R

Now expand both sides and simplify:

(m1m2s4+(b1m1+b2m1+b1m2)s3+(k1m1+k2m1+k1m2+b1b2)s2+(b2k1+b1k2)s+k1k2)X=(b1b2s2+(b1k2+b2k1)s+k1k2)R\bigl( m_1m_2 s^4 + (b_1m_1 + b_2m_1 +b_1m_2)s^3 + (k_1m_1+k_2m_1+k_1m_2+b_1b_2)s^2 + (b_2k_1+b_1k_2)s + k_1k_2 \bigr) X = \bigl(b_1b_2 s^2 + (b_1k_2+b_2k_1)s+k_1k_2\bigr)R

Now we can do the step (12) \to (13) in reverse, taking inverse Laplace transforms, and we obtain a single differential equation relating x(t)x(t) to r(t)r(t):

m1m2x¨¨+(b1m1+b2m1+b1m2)x¨˙+(k1m1+k2m1+k1m2+b1b2)x¨+(b2k1+b1k2)x˙+k1k2x=b1b2r¨+(b1k2+b2k1)r˙+k1k2r\boxed{ m_1m_2 \ddot{\ddot{x}} + (b_1m_1 + b_2m_1 +b_1m_2)\dot{\ddot{x}} + (k_1m_1+k_2m_1+k_1m_2+b_1b_2)\ddot{x} + (b_2k_1+b_1k_2)\dot x + k_1k_2 x = b_1b_2\ddot{r} + (b_1k_2+b_2k_1)\dot r+k_1k_2r}

Although the solution is rather long to write out, the steps are straightforward:

  1. Take Laplace transforms of the equations of motion

  2. Eliminate the unwanted variables via substitution

  3. Take inverse Laplace transforms to recover a differential equation


Test your knowledge

Solution to Exercise 1 #

For each system, we take Laplace transforms and solve for Y/UY/U. Here are the separate solutions:

First system
(s3+a2s2+a1s+a0)Y=(b2s2+b1s+b0)U(s^3 + a_2 s^2 + a_1 s + a_0 )Y = (b_2 s^2 + b_1 s + b_0 )U

Rearrange and obtain:

YU=b2s2+b1s+b0s3+a2s2+a1s+a0\boxed{\frac{Y}{U} = \frac{b_2 s^2 + b_1 s + b_0}{s^3 + a_2 s^2 + a_1 s + a_0}}
Second system
(s3+a2s2+a1s+a0)Z=U,(b2s2+b1s+b0)Z=Y.\begin{aligned} (s^3 + a_2 s^2 + a_1 s + a_0 )Z &= U, \\ (b_2 s^2 + b_1 s + b_0)Z &= Y. \end{aligned}

Divide one equation by the other and obtain:

YU=b2s2+b1s+b0s3+a2s2+a1s+a0\boxed{\frac{Y}{U} = \frac{b_2 s^2 + b_1 s + b_0}{s^3 + a_2 s^2 + a_1 s + a_0}}
Third system
sX1=X2,sX2=X3,sX3=a2X3a1X2a0X1+U,Y=b2X3+b1X2+b0X1.\begin{aligned} s X_1 &= X_2,\\ s X_2 &= X_3,\\ s X_3 &= -a_2 X_3-a_1 X_2-a_0 X_1+U, \\ Y &= b_2 X_3 + b_1 X_2 + b_0 X_1. \end{aligned}

The first two equations tell us that X2=sX1X_2 = sX_1 and X3=s2X1X_3=s^2 X_1. Substituting this into the last two equations leads to

s3X1=a2s2X1a1sX1a0X1+U,Y=b2s2X1+b1sX1+b0X1.\begin{aligned} s^3 X_1 &= -a_2 s^2 X_1-a_1 s X_1-a_0 X_1+U, \\ Y &= b_2 s^2 X_1 + b_1 s X_1 + b_0 X_1. \end{aligned}

This looks just like the previous problem with X1X_1 instead of ZZ. Dividing one equation by the other again we obtain

YU=b2s2+b1s+b0s3+a2s2+a1s+a0\boxed{\frac{Y}{U} = \frac{b_2 s^2 + b_1 s + b_0}{s^3 + a_2 s^2 + a_1 s + a_0}}
Fourth system
sZ1=a0Z3+b0U,sZ2=Z1a1Z3+b1U,sZ3=Z2a2Z3+b2U,Y=Z3.\begin{aligned} s Z_1 &= -a_0 Z_3 + b_0 U,\\ s Z_2 &= Z_1 - a_1 Z_3 + b_1 U,\\ s Z_3 &= Z_2 - a_2 Z_3 + b_2 U, \\ Y &= Z_3. \end{aligned}

We can solve for Z1Z_1 and Z2Z_2 in terms of Z3=YZ_3=Y and UU:

Z1=a0Y+b0Us,Z2=a0Y+b0Us2a1Ys+b1Us.\begin{aligned} Z_1 &= \frac{-a_0 Y + b_0 U}{s},\\ Z_2 &= \frac{-a_0 Y + b_0 U}{s^2} - \frac{a_1 Y}{s} + \frac{b_1 U}{s}. \end{aligned}

Substituting into the third equation leads to

(s3+a2s2+a1s+a0)Y=(b2s2+b1s+b0)U,\left( s^3 + a_2 s^2 + a_1 s + a_0 \right) Y = \left( b_2 s^2 + b_1 s + b_0 \right) U,

which rearranges to

YU=b2s2+b1s+b0s3+a2s2+a1s+a0\boxed{\frac{Y}{U} = \frac{b_2 s^2 + b_1 s + b_0}{s^3 + a_2 s^2 + a_1 s + a_0}}

So amazingly, all four systems have the same transfer function. This goes to show that differential equation representations of a system are not unique.