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.

Frequency response

So far, we have analyzed system behavior in the time domain. That is, we have looked at how a system responds to “test inputs” such as steps and impulses, and analyzed the resulting time-domain response. We characterized performance in terms of metrics like settling time, overshoot, and steady-state error.

We will now shift our focus to the frequency domain. In the frequency domain, our “test inputs” are sinusoidal signals of different frequencies. Depending on the system, some input frequencies may get amplified (a phenomenon known as resonance) while others may get attenuated. How a system responds to inputs of different frequencies is called its frequency response.

Motivating examples

Frequency response is critical in applications where we have oscillatory or random disturbances. In such cases, we can shape the frequency response via careful design of the system itself or via feedback control. Here are some examples.

Definition of frequency response

The most important concept to know is summarized below:

For example, suppose:

u(t)=cos(2t)andy(t)=0.7cos(2tπ3).u(t) = \cos(2t) \quad\textsf{and}\quad y(t) = 0.7 \cos\bigl(2t - \tfrac{\pi}{3}\bigr).

Then M=0.7M = 0.7 (attenuation) and ϕ=π3\phi = -\tfrac{\pi}{3} (60° of phase lag). Here are the plots:

Comparison of input and output sinusoids. The output is attenuated (smaller amplitude) and lags behind the input (delayed in time).

Figure 1:Comparison of input and output sinusoids. The output is attenuated (smaller amplitude) and lags behind the input (delayed in time).

Derivation of frequency response

Consider a stable LTI system represented by its transfer function G(s)G(s). Let’s look at what happens if we apply a sinusoidal input to the system. We will use the same trick we used to find inverse Laplace transforms of sinusoids, which is to express the sinusoid in terms of complex exponentials using Euler’s formula. Assume the input is given by:

u(t)=ejωt=cos(ωt)+jsin(ωt).u(t) = e^{j \omega t} = \cos(\omega t) + j\sin(\omega t).

In the Laplace domain, we can write the output as:

Y(s)=G(s)U(s)=G(s)1sjω.Y(s) = G(s)U(s) = G(s)\cdot \frac{1}{s - j\omega}.

To find the time-domain response, we can take the inverse Laplace transform, which requires doing a partial fraction expansion:

Y(s)=G(s)1sjω=Asjω+i=1nrispi,\begin{aligned} Y(s) &= G(s)\cdot \frac{1}{s - j\omega} \\ &= \frac{A}{s - j\omega} + \sum_{i=1}^n \frac{r_i}{s - p_i}, \end{aligned}

where pip_i are the poles of G(s)G(s) and rir_i are the corresponding residues. Using the complex cover-up method, we see that A=G(jω)A = G(j\omega). So in the time domain, we have:

y(t)=G(jω)ejωt  +i=1nriepit.transient termsy(t) = G(j\omega)\,e^{j \omega t} \; + \underbrace{\sum_{i=1}^n r_i \, e^{p_i t}.}_{\textsf{transient terms}}

Since the system is stable, all poles pip_i have negative real parts, so the transient terms decay to zero as tt\to\infty and we are left with the sinusoidal steady-state response.

The complex number G(jω)G(j\omega) is called the frequency response of GG at frequency ω\omega. The frequency response is most naturally expressed in polar form as a function of its magnitude MM and phase ϕ\phi, which are both functions of ω\omega:

G(jω)=M(ω)ejϕ(ω).G(j\omega) = M(\omega)\, e^{j \phi(\omega)}.

Here is a diagram showing the polar and cartesian forms of the frequency response.

Complex number G(j\omega) shown in rectangular and polar forms.

Figure 2:Complex number G(jω)G(j\omega) shown in rectangular and polar forms.

If you need a refresher on complex numbers, please see the review on complex numbers from when we covered inverse Laplace transforms.

Substituting into (6), we see that the steady-state output is given by:

y(t)=M(ω)ej(ωt+ϕ(ω))=M(ω)cos(ωt+ϕ(ω))+jM(ω)sin(ωt+ϕ(ω)).\begin{aligned} y(t) &= M(\omega)\, e^{j (\omega t + \phi(\omega))} \\ &= M(\omega)\, \cos(\omega t + \phi(\omega)) + j M(\omega)\, \sin(\omega t + \phi(\omega)). \end{aligned}

Comparing the real and imaginary parts of u(t)u(t) in Eq. (3) and y(t)y(t) in Eq. (8), we see that:

u(t)=sin(ωt)    y(t)=M(ω)sin(ωt+ϕ(ω)),u(t) = \sin(\omega t) \quad\implies\quad y(t) = M(\omega)\, \sin(\omega t + \phi(\omega)),

So the magnitude and angle of the frequency response G(jω)G(j\omega) tells us how much an input sinusoid at frequency ω\omega gets amplified and phase-shifted, respectively, in the steady state.

Example: simple first-order system

Let’s consider the simple first-order system with transfer function:

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

The frequency response is by definition:

G(jω)=1jω+1.G(j\omega) = \frac{1}{j\omega + 1}.

To express this in polar form, we can compute the magnitude and phase separately. The magnitude is given by:

M(ω)=G(jω)=1jω+1=1jω+1=1ω2+1.M(\omega) = |G(j\omega)| = \left| \frac{1}{j\omega + 1} \right| = \frac{1}{|j\omega + 1|} = \boxed{\frac{1}{\sqrt{\omega^2 + 1}}}.

The phase is given by:

ϕ(ω)=G(jω)=(1jω+1)=(jω+1)=atan(ω).\phi(\omega) = \angle G(j\omega) = \angle \left( \frac{1}{j\omega + 1} \right) = -\angle (j\omega + 1) = \boxed{-\atan(\omega)}.

Let’s investigate what happens at low and high frequency limits.

Relationship between representations

We have seen two representations of a LTI system so far:

These representations are complete in the sense that they contain all the information about the system’s behavior. We can use either representation to compute the output for any input, and we can convert between them using the Laplace transform and its inverse.

Frequency decomposition of signals

The frequency response of a system tells us how the system responds to inputs of different frequencies. However, we know that any signal can be decomposed into a sum of sinusoids of different frequencies via the Fourier series. Together with the principle of superposition, this means that we can understand how a system will respond to any input by understanding how it responds to sinusoids of different frequencies.

We saw in the section on linear systems how to decompose any signal into a sum of shifted pulses. Similarly, any input can also be decomposed into a sum of sinusoids of different frequencies (a Fourier series), and the system’s response to each sinusoid is given by the frequency response. We can recombine the responses to each sinusoid to get the overall output. In the figure below, we show how a system with transfer function G(s)=10.4s+1G(s) = \frac{1}{0.4 s+1} responds to a square wave input.

How the systems G(s) = \frac{1}{0.4 s+1} responds to a square wave input. The square wave can be decomposed into a sum of sinusoids of different frequencies, and the system’s response to each sinusoid is given by the frequency response. The output is the sum of the responses to each sinusoid.

Figure 3:How the systems G(s)=10.4s+1G(s) = \frac{1}{0.4 s+1} responds to a square wave input. The square wave can be decomposed into a sum of sinusoids of different frequencies, and the system’s response to each sinusoid is given by the frequency response. The output is the sum of the responses to each sinusoid.

As we can see in Figure 3, the input is a square wave, which can be decomposed into a sum of sinusoids of different frequencies. Each sinusoid is affected differently by the frequency response, with higher frequencies being more heavily attenuated and phase-lagged. When we recombined all the transformed sinusoids, we recover a familiar output, the smoothed version of the square wave we expect given that G(s)G(s) is a first-order system with a time constant of 0.4 seconds.


Test your knowledge

Solution to Exercise 1 #

The input has two parts: a constant term and a sinusoidal term. Since the system is linear, we can analyze each part separately and add the results.

First, the constant term corresponds to ω=0\omega=0. The frequency response is

G(0j)=G(0)=60+2=3.G(0j)=G(0)=\frac{6}{0+2}=3.

So the constant part of the output is 31=33\cdot 1 = 3.

Next, we evaluate the frequency response at ω=4\omega=4:

G(4j)=64j+2=32j+1.G(4j)=\frac{6}{4j+2} =\frac{3}{2j+1}.

The magnitude is

M(4)=G(4j)=31+2j=312+22=35.M(4)=|G(4j)| =\frac{3}{|1+2j|} =\frac{3}{\sqrt{1^2+2^2}} =\frac{3}{\sqrt{5}}.

The phase is

ϕ(4)=G(4j)=(1+2j)=atan(2)63.43°\phi(4)=\angle G(4j) =-\angle(1+2j) =-\atan(2) \approx -63.43\degree

Therefore, the sinusoidal part of the output has amplitude

2M(4)=235=65,2M(4)=\frac{2 \cdot 3}{\sqrt{5}} = \frac{6}{\sqrt{5}},

and phase shift atan(2)-\atan(2). The steady-state output is

y(t)=3+65cos(4tatan(2)).\boxed{ y(t)=3+\frac{6}{\sqrt{5}}\cos\bigl(4t-\atan(2)\bigr). }
Solution to Exercise 2 #

To find the magnitude of the frequency response, we must evaluate G(jω)|G(j\omega)|:

G(jω)=ajωa+jω=ajωa+jω=a2+ω2a2+ω2=1.\begin{aligned} |G(j\omega)| &= \left|\frac{a - j\omega}{a + j\omega}\right| \\ &= \frac{|a - j\omega|}{|a + j\omega|} \\ &= \frac{\sqrt{a^2 + \omega^2}}{\sqrt{a^2 + \omega^2}} \\ &= 1. \end{aligned}

Therefore, the magnitude of the frequency response is 1 for all frequencies:

M(ω)=1\boxed{M(\omega) = 1}

To find the phase of the frequency response, we evaluate G(jω)\angle G(j\omega):

G(jω)=(ajω)(a+jω)=atan2(ω,a)atan2(ω,a)=2atan2(ω,a)=2atan(ωa).\begin{aligned} \angle G(j\omega) &= \angle(a - j\omega) - \angle(a + j\omega) \\ &= \atann(-\omega, a) - \atann(\omega, a) \\ &= -2\atann(\omega, a) \\ &= -2\atan\Bigl(\frac{\omega}{a}\Bigr). \end{aligned}

Therefore, the phase of the frequency response is

ϕ(ω)=2atan(ωa)\boxed{\phi(\omega) = -2\atan\Bigl(\frac{\omega}{a}\Bigr)}

So for ωa\omega \ll a, the phase is close to 0, and for ωa\omega \gg a, the phase approaches -180°.