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!