Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

FIR Filter MATLAB problem

Status
Not open for further replies.

August

Newbie
Joined
Aug 19, 2008
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Thailand
Activity points
1,308
FFT_point=128;
order=200;
Wa=[8/64 13/64];

a = fir1(order,Wa,'bandpass'); %FIR bandpass filter with order=20
store_ai = a;
a_fft = fft(a,FFT_point);
store_a = a_fft ;

for( i = 1:14 )
xa( i, : ) = in_signal( i, : );
store_xa = xa( i, : );
xa_fft( i, : )=fft(xa( i, : ),FFT_point);
store_xa_fft=xa_fft( i, : );
ya( i, : )=filter(a,1,xa( i, : ));
store_ya=ya( i, : );
ya_fft( i, : )=fft(ya( i, : ),FFT_point);
% y(i,:) = conv(store_a,ya_fft( i, : ));
% store_y = y(i,:)
% out_signal( i, : ) = in_signal( i, : ) ;
out_signal( i, : ) = ya_fft( i, : ) ;
store_ya_fft = ya_fft( i, : );
end

Above is the code of my FIR filter. After I run this code, I got a problem that is the out_signal( i, : ) included the a_fft(impulse response).
View attachment untitled.bmp
The second figure is impulse response fft, the third figure is input fft and the fifth response is output after filtered.
The filter worked well as you could see from the 20Hz that doesn't pass the filter. But the problem is the impulse is stuck with the output, how can I cut those impulse from the output? Any help? Thank you very much :!:
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top