Chapter 5 The transfer function

Recall that the transfer function of \(\dot {x}=Ax+Bu\), \(y=Cx+Du\) is given by \(G(s)=C(sI-A)^{-1}B+D\).

  • Remark 5.1. The easiest way to calculate the transfer function is often by utilizing the Laplace transform. This is especially the case when we have a higher order differential equation in which case we don’t even need to form the matrices \(A\), \(B\), \(C\) and \(D\) in order to calculate the transfer function.

  • Definition 5.2. The Laplace transform of a function \(f:[0,\infty )\to \mR ^{n_1\times n_2}\) is defined by

    \[ \mL (f)=s\mapsto \int _0^\infty \e ^{-st}f(t)\,dt. \]

    We will also use the notation \(\hat {f}\) for \(\mL (f)\).

  • Remark 5.3. If \(\int _0^\infty \e ^{-\sigma t}|f(t)|\,dt<\infty \), then the Laplace transform is a function \(\{s:\re (s)>\sigma \}\to \mC ^{n_1\times n_2}\). When Laplace transforming a function, we will always assume that such a \(\sigma \in \mR \) exists.

  • Remark 5.4. The most important property for us of the Laplace transform is how it interacts with differentiation: for \(\re (s)\) large enough

    \begin{equation} \label {eq:Laplacediff} \mL (f')(s)=s\mL (f)(s)-f(0). \end{equation}

    This can be proven though integration by parts:

    \[ \mL (f')(s) =\int _0^\infty \e ^{-st}f'(t)\,dt =\left [\e ^{-st}f(t)\right ]_{t=0}^\infty +s\int _0^\infty \e ^{-st}f(t)\,dt =-f(0)+s\mL (f)(s), \]

    where we have used that \(\lim _{t\to \infty }\e ^{-st}f(t)=0\) for \(\re (s)\) large enough.

    Applying (5.1) to \(f'\) rather than \(f\) gives \(\mL (f'')(s)=s\mL (f')-f'(0)\) and using (5.1) then gives

    \begin{equation} \label {eq:Laplacediff2} \mL (f'')(s)=s^2\mL (f)(s)-sf(0)-f'(0). \end{equation}

  • Remark 5.5. Laplace transforming (2.1) with \(x(0)=0\) gives

    \[ s\hat {x}(s)=A\hat {x}(s)+B\hat {u}(s),\qquad \hat {y}(s)=C\hat {x}(s)+D\hat {u}(s). \]

    Solving this gives

    \[ \hat {x}(s)=(sI-A)^{-1}B\hat {u}(s),\qquad \hat {y}(s)=\left (C(sI-A)^{-1}B+D\right )\hat {u}(s). \]

    We therefore see that, when the initial condition is zero, the Laplace transform of the output equals the transfer function times the Laplace transform of the input. This in fact characterizes the transfer function and therefore this relation can be used to calculate the transfer function.

5.1 Examples

  • Example 5.6. The transfer function of the first order scalar differential equation \(\dot {x}+x=u\), \(y=x\) is

    \[ G(s)=\frac {1}{s+1}. \]

    This is because Laplace transforming the differential equation (with initial condition zero) gives \(s\hat {x}+\hat {x}=\hat {u}\) and therefore \(\hat {y}=\hat {x}=\frac {1}{s+1}\hat {u}\).

  • Example 5.7. The transfer function of the second order scalar differential equation \(\ddot {q}+2\zeta \dot {q}+q=u\), \(y=q\) is

    \[ G(s)=\frac {1}{s^2+2\zeta s+1}. \]

    This is because Laplace transforming the differential equation (with initial condition zero) gives \(s^2\hat {q}+2\zeta s\hat {q}+\hat {q}=\hat {u}\) and therefore \(\hat {y}=\hat {q}=\frac {1}{s^2+2\zeta s+1}\hat {u}\).

  • Example 5.8. The transfer function of the second order scalar differential equation \(\ddot {q}+2\zeta \dot {q}+q=u\), \(y=\dot {q}\) is

    \[ G(s)=\frac {s}{s^2+2\zeta s+1}. \]

    This is because Laplace transforming the differential equation (with initial condition zero) gives \(s^2\hat {q}+2\zeta s\hat {q}+\hat {q}=\hat {u}\) and therefore \(\hat {y}=s\hat {q}=\frac {s}{s^2+2\zeta s+1}\hat {u}\).

  • Example 5.9. Consider

    \[ \dot {y}_1=y_2-u_2,\qquad \dot {y}_2+y_1=u_1. \]

    Since \(m=p=2\), the transfer function has values in \(\mC ^{2\times 2}\). Laplace transforming with zero initial conditions gives

    \begin{equation} \label {eq:help:Laplace2} s\hat {y}_1=\hat {y}_2-\hat {u}_2,\qquad s\hat {y}_2+\hat {y}_1=\hat {u}_1. \end{equation}

    Multiplying the second equation by \(s\) gives

    \[ s^2\hat {y}_2+s\hat {y}_1=s\hat {u}_1, \]

    and substituting the first equation gives

    \[ s^2\hat {y}_2+\hat {y}_2=s\hat {u}_1+\hat {u}_2. \]

    From this we conclude

    \[ \hat {y}_2=\frac {s}{s^2+1}\hat {u}_1+\frac {1}{s^2+1}\hat {u}_2, \]

    and substituting this into the first equation in (5.3) gives

    \[ \hat {y}_1=\frac {1}{s^2+1}\hat {u}_1+\frac {1}{s}\left (\frac {1}{s^2+1}-1\right )\hat {u}_2, \]

    which using that \(\frac {1}{s}\left (\frac {1}{s^2+1}-1\right )=\frac {1}{s}~\frac {-s^2}{s^2+1}=\frac {-s}{s^2+1}\) gives

    \[ \hat {y}_1=\frac {1}{s^2+1}\hat {u}_1-\frac {s}{s^2+1}\hat {u}_2. \]

    We therefore obtain

    \[ \bbm {\hat {y}_1\\\hat {y}_2}=\bbm {\frac {1}{s^2+1}&\frac {-s}{s^2+1}\\\frac {s}{s^2+1}&\frac {1}{s^2+1}}\bbm {\hat {u}_1\\\hat {u}_2}, \]

    so that the transfer function equals

    \[ G(s)=\bbm {\frac {1}{s^2+1}&\frac {-s}{s^2+1}\\\frac {s}{s^2+1}&\frac {1}{s^2+1}}. \]

    Alternatively, we can write the differential equations in the standard form \(\dot {x}=Ax+Bu\), \(y=Cx+Du\) with

    \[ A=\bbm {0&1\\-1&0},\qquad B=\bbm {0&-1\\1&0},\qquad C=\bbm {1&0\\0&1},\qquad D=\bbm {0&0\\0&0}, \]

    and calculate \(G(s)=C(sI-A)^{-1}B+D\) as

    \[ \bbm {1&0\\0&1}\bbm {s&-1\\1&s}^{-1}\bbm {0&-1\\1&0} =\bbm {1&0\\0&1}\bbm {s&1\\-1&s}\frac {1}{s^2+1}\bbm {0&-1\\1&0} =\bbm {1&-s\\s&1}\frac {1}{s^2+1}, \]

    which in this case is actually a bit easier.

5.2 Case study: control of a tape drive*

We compute the transfer function from the disturbance \(v_e\) to each of the state variables \(v_1\), \(v_2\) and \(T\). Laplace transforming the differential equations with zero initial condition (and \(u_1=0\) and \(u_2=0\)) gives

\begin{align*} M_1s\hat {v}_1+d_1\hat {v}_1-\hat {T}&=0,\\ M_2s\hat {v}_2+d_2\hat {v}_2+\hat {T}&=0,\\ s\hat {T}+k(\hat {v}_1-\hat {v}_2)&=k\hat {v}_e. \end{align*} From the first equation we obtain \(\hat {v}_1=\frac {1}{M_1s+d_1}\hat {T}\) and from the second equation we obtain \(\hat {v}_2=\frac {-1}{M_2s+d_2}\hat {T}\). Substituting this into the third equation gives

\[ \left (s+\frac {k}{M_1s+d_1}+\frac {k}{M_2s+d_2}\right )\hat {T}=k\hat {v}_e. \]

Combining the terms in brackets gives

\[ \frac {s(M_1s+d_1)(M_2s+d_2)+k(M_2s+d_2)+k(M_1s+d_1)}{(M_1s+d_1)(M_2s+d_2)}\hat {T}=k\hat {v}_e, \]

from which we deduce that

\[ \hat {T}=\frac {k(M_1s+d_1)(M_2s+d_2)}{s(M_1s+d_1)(M_2s+d_2)+k(M_2s+d_2)+k(M_1s+d_1)}\hat {v}_e, \]

so that the transfer function from \(v_e\) to \(T\) is

\[ G_{Tv_e}(s)=\frac {k(M_1s+d_1)(M_2s+d_2)}{s(M_1s+d_1)(M_2s+d_2)+k(M_2s+d_2)+k(M_1s+d_1)}. \]

Using the earlier equations \(\hat {v}_1=\frac {1}{M_1s+d_1}\hat {T}\) and \(\hat {v}_2=\frac {-1}{M_2s+d_2}\hat {T}\), we then obtain

\begin{align*} G_{v_1v_e}(s)&=\frac {k(M_2s+d_2)}{s(M_1s+d_1)(M_2s+d_2)+k(M_2s+d_2)+k(M_1s+d_1)}, \\ G_{v_2v_e}(s)&=\frac {-k(M_1s+d_1)}{s(M_1s+d_1)(M_2s+d_2)+k(M_2s+d_2)+k(M_1s+d_1)}. \end{align*} Note that in each case the denominator equals

\[ M_1M_2s^3+(d_1M_2+d_2M_1)s^2+(d_1d_2+kM_1+kM_2)s+(d_1+d_2)k, \]

which we already saw in Section 3.3.

5.3 Case study: a suspension system*

It is possible (though tedious) to compute the transfer functions of the fixed structure suspension system as given in Section 2.2.2. These are

\begin{align*} G_{\rm handling}(s)&= -r_1~\frac {m_s m_{us}s^3 + d (m_s+m_{us}) s^2 + k_s (m_s+m_{us}) s}{m_s m_{us} s^4+ d (m_s+m_{us}) s^3 + \left [k_s (m_s+m_{us}) + k_{us} m_s \right ] s^2 + d k_{us} s + k_s k_{us}}, \\ G_{\rm stroke}(s)&= -r_2~\frac {k_{us}m_ss}{m_s m_{us} s^4+ d (m_s+m_{us}) s^3 + \left [k_s (m_s+m_{us}) + k_{us} m_s \right ] s^2 + d k_{us} s + k_s k_{us}}, \\ G_{\rm comfort}(s)&= -\frac {d k_{us} s^2 + k_s k_{us} s}{m_s m_{us} s^4+ d (m_s+m_{us}) s^3 + \left [k_s (m_s+m_{us}) + k_{us} m_s \right ] s^2 + d k_{us} s + k_s k_{us}}. \end{align*} We already saw the denominator in Section 3.2.