I have a mixed singal in time domain. I applied FFT to find the frequency components. Then I used "filtfilt" to filter the individual signal. Do I need to use ifft to get the time domain individual signal or filtfilt have already done it?
My question: is it necessary to use IFFT after performing the FILFILT on the frequency components of signals to get the time domain singal back?

 채택된 답변

Star Strider
Star Strider 2021년 3월 25일

0 개 추천

The filtfilt function filters in the time domain only.
To see the result of the filtering, calculate the fft of the time-domain signals before and after filtering. To see the transfer function of the filter with respect to the signal itself, use element-wise division of the fft of the filtered signal by the fft of the original (unfiltered) signal, and plot it.

댓글 수: 7

Sohel Rana
Sohel Rana 2021년 3월 25일
편집: Sohel Rana 2021년 5월 17일
Thank you for your explanation. It would be a great help if you tell me whether I'm doing right or wrong to get the time domain signal back?
I had a mixed signal x =x1+x1 where x1 and x2 are the individual signal. I applied FFT on x and got two peaks which corresponds two different frequencies (f1 and f2). Then I used two butterworth badnpass filters on these two frequencies with precise bandwidth. Finally I applied filtfilt to reconstruct the time domain signal.
Just as follow (only for x1 reconstruction):
x=x1+x2
y=fft(x)
which gives two peaks corresponding to two frequencies say f1 and f2
[b,a] = butter(order,[f1-dn, f1+dn],'bandpass'); % here dn is a small increment of frequencies
z=filtfilt(b,a,x)
Can I get the time domain signal back in this way? Is this the right way to reconstruct the signal?
Star Strider
Star Strider 2021년 3월 25일
Note that ‘z’ is the filtered time-domain signal. There is no need to reconstruct it. It already exists in your workspace, since that code appears to be more or less correct. (I cannot determine if it is from the posted code.)
Sohel Rana
Sohel Rana 2021년 3월 25일
Thank you! The same way the second signal x2 can be reconstructed by using f2.
z1 or z2 will always be time domain if I follow the above procedure, right?
Generally, ifft is applied on the signal after performing filtering to get the signal back in time domain. If I use filtfilt, then I don't need to use ifft anymore, right?
Star Strider
Star Strider 2021년 3월 25일
Neither the fft or ifft functions are necessary here, at least with respect to filtering. Everything is in the time domain.
Paul
Paul 2021년 3월 25일
편집: Paul 2021년 5월 17일
Referring to this comment: After applying filtfilt to x, the output z is still, in general, not an exact reconstruction of x1.
Sohel Rana
Sohel Rana 2021년 5월 17일
Hi Paul,
Is there a better way to reconstruc signal?
Paul
Paul 2021년 5월 17일
Hard to say w/o knowing more about the signals. All I was saying is that this procedure cannot, in general, literally reconstruct the signal x1, though it might be very a good estimate of x1, depending on the properties of x1 and x2.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Digital and Analog Filters에 대해 자세히 알아보기

태그

질문:

2021년 3월 24일

댓글:

2021년 5월 17일

Community Treasure Hunt

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

Start Hunting!

Translated by