Bode plot of butter filter's transfer function has wrong Module axis scale
3 次查看(过去 30 天)
显示 更早的评论
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);
0 个评论
回答(1 个)
Suhan
2018-2-22
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.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Get Started with Control System Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!