how to design a lowpass filter for a audio signa
7 次查看(过去 30 天)
显示 更早的评论
i sent some .wav files as a input to the AM Moudlation scheme in Matlab..i am not getting the clear audio as Output..My Fc=1000,Fs=11025..i attched my input spectrum,the input of the lowpass filter in demodulator spectrum...i know i have some issue in my filter...which filter should i chooose and what is the cutoof frequency i should choose for my filter (you can see the input specturm and get the some knowled3e about the maxmumfrequency of the input )
I got strucked here...so please help me...
0 个评论
采纳的回答
Star Strider
2019-9-25
If you have R21018a or later, use the lowpass function. (Also see the links in and at the end of that documentation page.)
It is also easy to design your own filter:
Fs = 11025; % Sampling Frequency
Fn = Fs/2;
Wp = 1000/Fn; % Passband Frequency (Normalised)
Ws = 1010/Fn; % Stopband Frequency (Normalised)
Rp = 1; % Passband Ripple
Rs = 60; % Passband Ripple (Attenuation)
[n,Wp] = ellipord(Wp,Ws,Rp,Rs); % Elliptic Order Calculation
[z,p,k] = ellip(n,Rp,Rs,Wp); % Elliptic Filter Design: Zero-Pole-Gain
[sos,g] = zp2sos(z,p,k); % Second-Order Section For Stability
figure
freqz(sos, 2^16, Fs) % Filter Bode Plot
signal_filt = filtfilt(sos, g, signal); % Filter Signal
4 个评论
Star Strider
2019-9-30
That is likely not possible. The documentation for filtfilt indicates that x - Input Signal can only be double. The filter function works with integer inputs, however it introduces phase delays and phase distortion. You might be able to work around that by using a linear-phase FIR filter with it such as those produced by fir1. You will have to experiment with that to see if it works with your signal.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Audio and Video Data 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!