How to convert the passband ripple from dB to linear in the Filter Designer?
12 次查看(过去 30 天)
显示 更早的评论
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
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
2020-4-24
20log base 10 [AP]=-0.1505
pls tell this ans and how to implement to write step by step
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Filter Design 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!