how to design a lowpass filter for a audio signa

조회 수: 7 (최근 30일)
Hari Ijjada
Hari Ijjada 2019년 9월 25일
댓글: Star Strider 2019년 9월 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...BeforeLPF.PNG

채택된 답변

Star Strider
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
Hari Ijjada
Hari Ijjada 2019년 9월 30일
sorry ...actually that is my mistake ...that is not Cutoff Frequency...that carrier frequency...
i am getting output now .Sir do you have any filter which process " int " data in matlab ?.
Star Strider
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 CenterFile Exchange에서 Audio and Video Data에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by