Bode plot of butter filter's transfer function has wrong Module axis scale

3 views (last 30 days)
I am tryng to create a second order butterworth lowpass filter and to plot its transfer function on a Bode plot. The problem is that when I create the bode plot the Module axis ranges only from -85dB to -84.6dB, as in the attached screenshot. What am I doing wrong?
Here is the code:
% define sampling frequency
Fc = 250000; % [Hz]
f_Nyq = Fc/2;
% define cutoff frequency
freq_to_cut = 600;
cutoff_freq = freq_to_cut/f_Nyq;
% build filter (second order
[Num,Den] = butter(2, cutoff_freq);
% build transfer function and plot
H = tf(Num, Den);
figure(1), bode(H);

Answers (1)

Suhan
Suhan on 22 Feb 2018
Hi,
The Bode plot is showing the correct magnitude-phase plot. However, in Bode plot, the magnitude axes is in dB. The DC gain of your system can be found by the following command: >> 20*log10(dcgain(H)) ; % where H is the transfer function
which is around -84.8 dB. Moreover, your transfer function has poles and zeros very close to each other. Hence, the variation of the magnitude over the frequency range is low.

Categories

Find more on Get Started with Control System Toolbox in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!