# Background

In control theory, a **system **is some mathematical relation between an input and an output. Systems are usually represented as a rectangle connecting some input function to an output function. Figure 1 depicts a SISO (single input, single output) system taking in an input function of time $u(t)$ and returning an output function of time $y(t)$.

Generally, ordinary differential equations (ODEs) are the simplest way to represent a system.

- Note: dependent variables for ODEs (usually, this is time) are generally positive real numbers

# Laplace Transform

We use the **Laplace transform **to switch between a function of real numbers (for our purposes, lets assume this is time $t$) to a function of some complex variable $s$ (Figure 2). Note that our $s$ variable turns out to denote frequency since our original function is a function of time.

Specifically, the expression for the Laplace transfrom of a single-variable function of time $f(t)$ is \begin{equation} F(s) = \mathcal{L} \left[ f(t) \right] = \int_{0}^{\infty} f(t)e^{-st} dt \end{equation}

The following equations are simplified expressions of the Laplace transform for $f(t)$ and its corresponding first and second order ODEs:

\begin{equation*} \mathcal{L} \left[ f(t) \right] = F(s) \end{equation}

\begin{equation*} \mathcal{L} \left[ f'(t) \right] = sF(s) – f(0) \end{equation}

\begin{equation*} \mathcal{L} \left[ f”(t) \right] = s^2 F(s) – sf(0) – f'(0) \end{equation}

# Transfer Function (SISOs)

The **transfer function **$H(s)$ for a dynamic SISO system relates an input $u(t)$ with an output $y(t)$ as shown in Figure 3:

# Examples

## Example 1: Mechanical System

Find the transfer function for a single translational damped mass-spring system (depicted in Figure 4)

- Aside: we can find the equation of motion for such a system using Newton’s and D’Alembert equations
- The ODE describing our mass-spring system turns out to be… \begin{equation} F(t)=m \ddot{x}(t) + c\dot{x}(t) + kx(t) \end{equation}
- Variables:
- $F(t)=$ an external force $[\mathrm{N}]$ acting on our mass $m \, [\mathrm{kg}]$
- Note: this is the input for our system

- $x(t)=$ the displacement $[\mathrm{m}]$ of our object due to $F(t)$
- Note: this is the output for our system

- $c=$ the damping coefficient $[\mathrm{Ns/m}]$
- $k=$ the spring constant (i.e., stiffness) $[\mathrm{N/m}]$

- $F(t)=$ an external force $[\mathrm{N}]$ acting on our mass $m \, [\mathrm{kg}]$

- Variables:

Assume our initial conditions are $x(0)=0$ and $\dot{x}(0)=0$

First, let’s apply the Laplace transform to each individual term in our ODE for the mass-spring system:

\begin{equation*} \mathcal{L}[\ddot{x}] = s^2 X(s) – sx(0) – \dot{x}(0) = s^2 X(s) \end{equation}

\begin{equation*} \mathcal{L}[\dot{x}] = sX(s) – x(0) = sX(s) \end{equation}

\begin{equation*} \mathcal{L}[x(t)] = X(s) \end{equation}

\begin{equation*} \mathcal{L}[F(t)] = F(s) \end{equation}

Subsituting these expressions into our ODE is equivalent to taking the Laplacian of both sides:

\begin{equation} F(s) = ms^2 X(s) + cs X(s) + k X(s) \ = X(s) (ms^2 + cs + k) \end{equation}

Rearragning our $F(s)$ equation as follows gives us our transfer function $H(s)$ for the sytem:

\begin{equation} H(s) = \frac{X(s)}{F(s)} = \frac{1}{ms^2 + cs + k} \end{equation}

Thus, we have defined our mechanical system as a second order ODE and as a transfer function. Figure 5 depicts the corresponding system diagrams in terms of the ODE and in terms of the transfer function.

# Sources

How to find the transfer function of a system

- Note: most of the content in the article originally comes from the above link