How to convert the passband ripple from dB to linear in the Filter Designer?

조회 수: 23 (최근 30일)
Tong Xu
Tong Xu 2019년 1월 26일
댓글: paravai s 2020년 4월 24일
Hi everyone,
I'm using the Filter Designer in Matlab 2018b. I designed a low pass FIR filter using the equiripple design method. In the filter specifications, I set the passband ripple as Apass = 1dB and the stopband attenuation as Astop = 40dB. Then I generate the matlab code by selecting Filter Design Function.
Here is a section of the generated Matlab code:
% All frequency values are in MHz.
Fs = 1600; % Sampling Frequency
Fpass = 90; % Passband Frequency
Fstop = 110; % Stopband Frequency
Dpass = 0.057501127785; % Passband Ripple
Dstop = 0.01; % Stopband Attenuation
dens = 20; % Density Factor
I knew that the values of Apass and Astop have been converted from dB to linear, so I get Dpass = 0.057501127785 and Dstop = 0.01. Here I figured out the linear value of stopband attenuation can be caculated using Dstop = 10^(-Astop/20), which is the inverse of Astop = -20*log10(Dstop).
I also assume Apass = -20*log10(1-Dpass) and the inverse is Dpass = 1 - 10^(-Apass/20). However, I'm unable to get Dpass = 0.057501127785 by substituting Apass = 1dB.
Can anyone tell me how Dpass is calculated? I.e. how to convert the passband ripple from dB to linear?
Thank you very much.
Regards,
Tong
  댓글 수: 4
Paul Martin
Paul Martin 2020년 4월 21일
I too was trying to find how Dpass was calculated. Rearraging the above equation and putting it into matlab gives
x = 1; D = (power(10,x/20)-1) / (power(10,x/20)+1)
D =
0.0575
paravai s
paravai s 2020년 4월 24일
20log base 10 [AP]=-0.1505
pls tell this ans and how to implement to write step by step

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Matched Filter and Ambiguity Function에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by