Bode Diagram
This note gives you an intuitive, practical way to understand what Bode diagrams really tell you: how your system reacts to different frequencies in terms of gain and phase. It also shows where this comes from and how to quickly approximate Bode plots, so you can analyze systems, tune controllers, or design filters without getting lost in heavy math.
The Bode diagram
What is it ? - A practical explanation we may all know
The Bode diagram explains how a sinusoidal excitation of the input of a linear system ($G(s)$) is amplified and phase shifted. To get the amplification factor and the dephasing, you only need to evaluate the norme and argument of this transfert function using for argument $jw$, where $w$ is the angular frequency of the input signal : $G(jw)$.
Where does it come from ? - A theoretical roots made as simple as possible
On one side, there is the excitation signal you are sending to your system:
$$u(t) = \varepsilon(t) \cdot \alpha \cdot sin(wt) \quad \xrightarrow{\mathcal{L}\text{ of a signal}} \quad U(s) = \alpha \cdot \frac{w}{s^2 + w^2} \qquad \text{// use Laplace transform dictionnary.}$$On the other side, there is your system. To try to keep everything as general as possible, we wont pick any particular model $G(s)$, and instead consider a super general system with multiples poles and zeros :
$$G(s) = K\frac{(s+z_1)(s+z_2)\dots}{(s+p_1)(s+p_2)\dots}$$Then, the output can be written as :
$$ Y(s) = G(s)U(s) + [\dots]y_0 = \underbrace{\left([\dots]y_0 + \frac{A_1}{s+p_1} + \frac{A_2}{s+p_2} + \dots \right)}_{\text{Values that vanish over time if } p_i > 0 \ \forall i } + B \frac{w}{s^2+w^2} + C \frac{s}{s^2 + w^2} $$where the values of $\left\{A_1,A_2,...,B,C\right\}$ can be computed with the residue method. Here, we only care about $B$ and $C$ since they are the only “persistant” components of the response $Y(s)$. To compute them, we do:
$$\lim_{s\rightarrow jw} (s^2+w^2)Y(s) = \left\{\begin{array}{l} Bw + Cjw \\ G(jw)\alpha w \end{array}\right. \qquad \Rightarrow \qquad \left\{\begin{array}{l} B = \alpha \cdot Re\left\{G(jw)\right\} \\ C = \alpha \cdot Im \left\{G(jw) \right\} \end{array}\right. .$$From which we get the output signal :
$$y(t) = \Big[ \left[\text{vanishing values}\right] + \alpha \cdot Re\left\{G(jw)\right\} \cdot sin(wt) + \alpha \cdot Im\left\{G(jw)\right\} \cdot cos(wt) \Big]\cdot \varepsilon(t).$$Now, using the following trigonometry identity and definitions of the real and imaginary parts of $G(jw)$ w.r.t. its norm and argument :
$$\begin{array}{l} a\cdot sin(wt) + b\cdot cos(wt) = \sqrt{a^2+b^2}\cdot sin\left(wt + \arctan(b/a)\right), \\ Re\left\{G(jw) \right\} = |G(jw)|\cdot cos\big(arg(G(jw))\big), \\ Im\left\{G(jw) \right\} = |G(jw)|\cdot sin\big(arg(G(jw))\big), \end{array}$$we can rewrite $y(t)$ as :
$$y(t) = \Big[ \left[\text{vanishing values}\right] + \underbrace{|G(jw)|}_{\text{amplification}} \cdot \underbrace{\alpha \cdot sin\Big(wt}_{\text{input signal}} + \underbrace{arg\big(G(jw)\big)}_{\text{dephasing}}\Big) \Big]\cdot \varepsilon(t).$$That’s what we wanted to show.
Why is this important? - Usage examples
The Bode diagrams is a formidable tool in all the activities you may have as a control engineer. In all those activities, you will want to check the Bode diagrams, either for design or analysis purpose.
Analysing a system to control, then consider $G(s)$ as the S-Function of the plant :
- Which frequencies are the most critical.
- How fast this system can be controlled.
Designing a controller, then consider $G(s)$ as the S-Function of the controlled plant :
- You may want to design your controller so that the amplification factor is equal to 1 at the “controlled frequencies”.
Designing a filter, then consider $G(s)$ as the S-Function of a signal processing tool :
- You may want to remove the high frequency components for a measured signal.
- You may want to remove specific frequencies from a signal, e.g., to avoid sending those specific frequencies in a system that doesn’t like them (if a the plant has resonance frequencies, it might be a good idea to not feed the controller with those frequencies)
How and why should I understand how to approximate it ?
As mentioned in the previous section, the Bode diagrams are useful for both design and analysis of systems. Understanding how to approximate it, will help use (in other notes) define simple rules and methods. Also, it’s a great tool easily build intuition on how systems work.
To do the approximation, you first need to write the S-Function of the system in the following format :
$$G(s) = K \frac{(s+z_1)(s+z_2)\cdots}{(s+p_1)(s+p_2)\cdots}, \qquad \Rightarrow \qquad G(jw) = K \frac{(jw+z_1)(jw+z_2)\cdots}{(jw+p_1)(jw+p_2)\cdots}.$$Then, the basic idea is to do the following approximations :
$$jw+\alpha = \left\{ \begin{array}{ll}\alpha, & w<\alpha, \\ jw, & w>\alpha, \end{array} \right., \qquad (jw)^2 + 2\zeta w_0 (jw) + w_0^2 = \left\{ \begin{array}{ll}w_0^2, & wWhich means that the drawing of $G(jw)$ is segmented at all $\alpha = \left\{z_1, z_2, \dots, p_1, p_2, \dots \right\}$ and each segment can be drawn using the simple complex number operation illustrated hereafter :
$$\begin{array}{l} z_1 = |z_1|\cdot e^{j arg(z_1)}, \\ z_2 = |z_2|\cdot e^{j arg(z_2)}, \\ z_3 = |z_3|\cdot e^{j arg(z_3)}, \end{array} \qquad \Rightarrow \qquad \frac{z_+\cdot z_2}{z_3} = \frac{|z_1|\cdot |z_2|}{|z_3|}\cdot e^{j(arg(z_1) + arg(z_2) - arg(z_3))}.$$