How to convert the passband ripple from dB to linear in the Filter Designer?
23 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Paul Martin
am 21 Apr. 2020
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
am 24 Apr. 2020
20log base 10 [AP]=-0.1505
pls tell this ans and how to implement to write step by step
Antworten (0)
Siehe auch
Kategorien
Mehr zu Matched Filter and Ambiguity Function finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!