# Bode magnitude computation

Consider the following transfer function

$$G(s)=\frac{1\times 10^6\, s}{s+1}$$

If I evaluate the dB magnitude analytically at frequency 0.1 rad/s, we have

$$\text{Mag. at 0.1 rad/s} = 20\, \log \frac{1\times 10^5}{1.1} \simeq 99 \, \text{dB}$$

and dB magnitude analytically at frequency 1 rad/s, we have

$$\text{Mag. at 1 rad/s} = 20\, \log \frac{1\times 10^6}{2} \simeq 114 \, \text{dB}$$

If we start at 0.1 rad/s with a 99 dB we can say that at 1 decade later i.e. 1 rad/s we will get about 119 dB due to the zero term. But we are getting 114 dB with the analytical calculation. Why about 6 dB down from 119 or 120 dB and not just 3 dB down to reach about 117 dB?

The actual dB magnitude plot is below: My question would be why I am getting 114 dB with the analytical calculation. This value seems too low.

The amplitude of the bode-plot is found by traversing the imaginary axis, or

$$s = j\omega$$

So the formula for the amplitude should actually be

$$A_{dB} = 20\cdot \log_{10} \left(\left| \frac{10^6\cdot j\omega}{j\omega + 1} \right| \right)$$

For $\omega = 0.1$ and $\omega=1$:

$$A_{dB}(0.1) = 20\cdot \log_{10}\left( \frac{10^6\cdot 0.1}{\sqrt{0.1^2 + 1^2}} \right) = 99.96\ dB$$

$$A_{dB}(1) = 20\cdot \log_{10}\left( \frac{10^6\cdot 1}{\sqrt{1^2+1^2}} \right) = 116.99\ dB$$

The 20dB/decade or 6dB/octave "rule" only holds asymptotically. The closer you get to the corner frequency, the worse the approximation is. In your case, that corner frequency is at $\omega_c = 1$, so the approximation will be at its worst.

The corner frequency is also the point where these asymptotes intersect. This is the point where the imaginary part of the denominator ($j\omega + 1$) starts to dominate over the real part, or $|j\omega| = |1|$, which is the case for $A_{dB}(1)$. You end up dividing by $\sqrt{2}$, which is approximately 3dB. • thank you for the detailed answer. I see my serious mistake for computing the magnitude! Jul 2 '18 at 10:16
• Say in the transfer function, we also had a quadratic term in the denominator: s^2 + 100*s + 100000 with complex conjugate roots. Then in computing magnitudes, it would be best to factorise it first and take the magnitude. Is that correct? Because I don't see if we can take the magnitude of the expanded polynomial s^2 + 100*s + 100000 directly. Jul 2 '18 at 10:28
• You can factorize or you can just compute the amplitude directly. In the latter case, you end up with a real part containing $(j\omega)^2=-\omega^2$. Jul 2 '18 at 11:27
• Yes it can be done directly: $\sqrt((10000-\omega^2)^2 + (j\omega\, 10)^2)$. Thank you. Jul 3 '18 at 5:02
• Don't include the "j" in there! Probably small mistake, I think you get it. Jul 3 '18 at 6:37