August
Newbie
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 :!:
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 :!: