Effacer les filtres
Effacer les filtres

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

2 vues (au cours des 30 derniers jours)
Gianpietro Battocletti
Gianpietro Battocletti le 10 Fév 2018
Réponse apportée : Suhan le 22 Fév 2018
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);

Réponses (1)

Suhan
Suhan le 22 Fév 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.

Catégories

En savoir plus sur Get Started with Control System Toolbox dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by