The frequency response is the way a system responds to signals of different speeds, usually sinusoidal signals swept from low frequencies to high frequencies.
So far we have analyzed our systems by giving them a sudden “hit” (step response) or by looking at where their poles lie (Root Locus). But there is a third way of looking at reality that is, for many engineers, the most useful of all: putting on the frequency glasses.
Why? Because the real world is not made of perfect steps. Our code has to deal with noisy sensors, motor vibrations, and references that change smoothly. Today we are going to learn to read one of the most useful representations of our hardware: Bode Plots.
If you have not read the previous articles on Transfer Function and Stability, I recommend taking a step back, because today we are going to squeeze those concepts to the fullest. read more ⯈
The Physical Intuition: A Heavy Door
Imagine trying to move a very heavy blast door by opening and closing it repeatedly.
- Low Frequency: If we open and close it very slowly (once every 10 seconds), the door follows our hand perfectly. Our hand moves 1 meter, the door moves 1 meter. They are synchronized.
- High Frequency: If we try to shake the door back and forth 50 times per second, the door won’t even flinch. Its mass (inertia) prevents it. Additionally, you will notice that your arm pushes, but the door seems to react a fraction of a second late.
This behavior is typical of many systems dominated by inertia, which act as low-pass filters: they follow slow signals and attenuate fast ones. Not all physical systems are low-pass; high-pass, band-pass, and resonant responses also exist.
Anatomy of the Bode Plot
To visualize this without going crazy with complex mathematical equations, engineer Hendrik W. Bode invented a double graphical representation in the 1930s.
A Bode Plot always consists of two superimposed graphs that share the X-axis (frequency on a logarithmic scale):
Magnitude Plot
It tells us how much the input signal is amplified or attenuated when passing through the system. It is measured in Decibels (dB), a very convenient logarithmic unit.
- If we are at 0 dB, it means the output is exactly equal to the input (multiplied by 1).
- If we are at -20 dB, the output is 10 times smaller than the input.
- If we are at +20 dB, the output is 10 times larger.
The formula we use is simple:
Phase Plot
It tells us how much the output is delayed with respect to the input. It is measured in degrees (º). Because physical things take time to react, the output usually lags behind the input (what we call a negative phase shift). A phase shift of -90º means that when our input is at its peak, our output is just crossing zero.
How to Read Its Metrics
When we analyze the Magnitude plot of a system, we look for a critical value that defines its usefulness in the real world:
Bandwidth
The Bandwidth is the range of frequencies over which the system can “track” the input with reasonable accuracy.
In a low-pass system, we usually mark the end of the bandwidth at the frequency where the magnitude drops 3 dB relative to its low-frequency value. At that point, the amplitude is approximately 0.707 times the reference; if comparing signals over the same impedance, this equates to half the power.
- Practical Example: If a drone has a bandwidth of 5 Hz, it means that if you move the joystick left and right faster than 5 times per second, the drone will not be able to tilt quickly enough; it will ignore your commands and remain nearly stationary.
Phase Margin and Stability
So far we have talked about how the plant “filters” fast signals. But the Bode plot hides the ultimate secret of stability that we saw in previous articles.
Think about this: what happens if the system has so much delay that the phase shift reaches -180º? A phase shift of -180º means that the signal is completely inverted. When your controller tells the motor “Push right!”, the delay causes the motor to actually be pushing left.
If at that critical frequency where the phase shift is -180º, our system has a Magnitude greater than 0 dB (i.e., the system amplifies the signal), we have created a monster. Negative feedback becomes positive, amplifying the error infinitely. The system explodes.
To know how close we are to disaster, we use two metrics:
- Gain Margin: How many decibels we can increase the gain before reaching
0 dBat the phase crossover frequency, where the phase is-180°. - Phase Margin: How many degrees are left to reach
-180°at the frequency where the magnitude crosses0 dB. A design typically seeks a positive and sufficient phase margin; values between45°and60°are a common reference, not a universal rule.
Which Tool to Use
With the Bode plot, we complete the circle of “visual tools” in control theory.
- If we want to know how much it oscillates, we look at the temporal step response.
- If we want to know how it becomes unstable when forced hard, we look at the Root Locus.
- If we want to know its operating speed limit, we look at the Bode Plot.
Now that we know how to x-ray our hardware in every imaginable way and understand its physical limitations, we are ready to bring out the heavy artillery.