MATLAB: How to make sure that the Bode magnitude plot always always starts from 0 dB

amplitudeSimulink Control Design

How can I make sure that my Bode magnitude plot always always starts from 0 dB?
I am generating Bode plots for a transfer function where the order of the numerator is smaller than the order of the denominator. My Bode magnitude plots always start from a constant offset, but I would really like them to start from 0 dB so that I can observe the amplitude at peak resonance easier.

Best Answer

The Bode magnitude plot starts from a non-zero offset because of the transfer function's DC gain. This can easily be obtained if s = 0 is substituted into your transfer function, which corresponds to a zero-frequency (hence static) input. The only way you can make the Bode magnitude plot start from 0 dB in this case is to factor out the DC gain from your transfer function.
The DC gain can easily be calculated using the "<https://www.mathworks.com/help/releases/R2016b/control/ref/dcgain.html dcgain>" function and then the transfer function can be divided by this constant number. Now the Bode magnitude plot will always start from 0 dB because the resulting transfer function has unity DC gain.
Related Question