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

조회 수: 7 (최근 30일)
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)

채택된 답변

Star Strider
Star Strider 2016년 3월 2일
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
Lawrence Card
Lawrence Card 2016년 3월 3일
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 2016년 3월 4일
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.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Jess Stuart
Jess Stuart 2020년 10월 2일
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.

카테고리

Help CenterFile Exchange에서 Bartlett에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by