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.
Earthquake protection: Buildings can be designed so that their resonant frequencies are not strongly excited by seismic waves. Passive damping, tuned mass dampers, or active control can be used to reshape the building’s frequency response.
Quiet systems: Engines and other machines can be made quieter by reducing resonant peaks at frequencies where they generate noise, or by shifting vibrations to frequencies that are easier to isolate or attenuate.
Passenger comfort: Cars and other vehicles can be designed so that road disturbances are not strongly transmitted to passengers. Suspension design shapes the frequency response from road input to vehicle motion.
Vibration isolation: Precision instruments, such as microscopes, semiconductor lithography machines, and gravitational-wave detectors, must be isolated from floor vibrations. Isolation systems are designed to attenuate vibrations over the frequency range where the instrument is most sensitive.
Flexible structures: Robotic arms, cranes, aircraft wings, and space structures often have lightly damped vibration modes. Controllers can be designed to move these systems quickly while avoiding excitation of their resonant frequencies.
Audio feedback: Microphones and speakers can form feedback loops that produce unwanted ringing or howling at particular frequencies. Filters and controllers can reshape the frequency response to suppress these resonant peaks.
Definition of frequency response¶
The most important concept to know is summarized below:
Magnitude: If , the system amplifies sinusoids at frequency . If , the system attenuates sinusoids at frequency .
Phase: If , we say the output lags the input (phase lag). If , we say the output leads the input (phase lead).
For example, suppose:
Then (attenuation) and (60° of phase lag). Here are the plots:
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 . 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:
In the Laplace domain, we can write the output as:
To find the time-domain response, we can take the inverse Laplace transform, which requires doing a partial fraction expansion:
where are the poles of and are the corresponding residues. Using the complex cover-up method, we see that . So in the time domain, we have:
Since the system is stable, all poles have negative real parts, so the transient terms decay to zero as and we are left with the sinusoidal steady-state response.
The complex number is called the frequency response of at frequency . The frequency response is most naturally expressed in polar form as a function of its magnitude and phase , which are both functions of :
Here is a diagram showing the polar and cartesian forms of the frequency response.
Figure 2:Complex number 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:
Comparing the real and imaginary parts of in Eq. (3) and in Eq. (8), we see that:
So the magnitude and angle of the frequency response tells us how much an input sinusoid at frequency 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:
The frequency response is by definition:
To express this in polar form, we can compute the magnitude and phase separately. The magnitude is given by:
The phase is given by:
Let’s investigate what happens at low and high frequency limits.
Low frequency: As , our frequency response becomes which is the DC gain of our system. This makes sense; in this limit, our input becomes a zero-frequency sinusoid, which is effectively a constant ().
High frequency: As , we have . So high-frequency sinusoids are heavily attenuated. This phenomenon is present in all physical systems and is known as high-frequency roll-off. We also have . So at high frequency, the output lags behind the input by 90 degrees. We will see later that the amount of high-frequency phase lag depends on the number of poles and zeros of the system.
Relationship between representations¶
We have seen two representations of a LTI system so far:
Impulse response: is the output of the system in response to an impulse input. For an input , the output is given by the convolution integral .
Transfer function: is the ratio of the Laplace transforms of the output and input. For an input , the output is given by . The impulse and transfer function are related by the Laplace transform: .
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 responds to a square wave input.
Figure 3:How the systems 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 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 . The frequency response is
So the constant part of the output is .
Next, we evaluate the frequency response at :
The magnitude is
The phase is
Therefore, the sinusoidal part of the output has amplitude
and phase shift . The steady-state output is
Solution to Exercise 2 #
To find the magnitude of the frequency response, we must evaluate :
Therefore, the magnitude of the frequency response is 1 for all frequencies:
To find the phase of the frequency response, we evaluate :
Therefore, the phase of the frequency response is
So for , the phase is close to 0, and for , the phase approaches -180°.