digital low pass FIR filter design where the cut off frequency is stuck at around -6db

6 vues (au cours des 30 derniers jours)
I am designing a digital FIR filter using Matlab to the specification of a 5KHz cut off frequency, however, no matter what order number(N), sampling frequency(fs) or window I use, I cannot get the cut off frequency(fc) below -6dB (to -3dB)?
Is this a quirk with MatLab or am I doing something wrong?
If I use an odd order number: 5KHz is around -15dB If I use an even order number: 5KHz is around -6dB
I have attached a screenshot of my frequency response at the moment. The code used to produce it is below:
%filter parameters
fc = 5000; %5KHz cut off freq
fs = 20000;
N = 18;
h = fir1((N-1), (fc/fs)*2, 'low',bartlett(N), 'noscale');
fvtool(h, 'Fs', fs)

Réponse acceptée

Star Strider
Star Strider le 2 Mar 2016
The cutoff frequency is defined as the half-power point, corresponding to -6 dB. If you want the filter to be -3 dB down at a certain frequency, the firls function would be worth considering.
  6 commentaires
Lawrence Card
Lawrence Card le 3 Mar 2016
Ok, I understand, the key thing is the difference between power and amplitude which is what I was overlooking by assuming a rule for power whilst using amplitude.
Thanks for your explanations!
Star Strider
Star Strider le 4 Mar 2016
My pleasure!
I’m not certain most signal processing textbooks even discuss the half-power point. The DSP text I use as a reference doesn’t specifically list it in the index. I learned about it early on in the course of studying for my Amateur Extra Class amateur radio ticket (this was back in the vacuum tube, log table and slide rule days), when it was the only way to specify filter passbands, and signals were all thought of in terms of power.

Connectez-vous pour commenter.

Plus de réponses (1)

Jess Stuart
Jess Stuart le 2 Oct 2020
General Rule: X in dB = 10*log(Power Ratio)
DSP Filter designers typically work with voltage, so they will use:
X in dB = 20*log(Voltage Ratio)
But the end result is still in dB and represents a Power Ratio (P2/P1 = (V2/V1)^2)
even if you used the ratio of voltages squared to calculate it.
-6dB is always one-quarter power and -3dB is always half power.

Community Treasure Hunt

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

Start Hunting!

Translated by