Reconstruct output signal using tfestimate

16 views (last 30 days)
I have an input and ouput signal sampled at 400Hz which I have filtered for frequencies above 20 Hz. THe signal is of length n = 24402, I have then performed tfestimate on the filtered signals to estimate the tf in frequency domain.
[txy,frq] = tfestimate(rr_in_filt,rr_n_filt,[],[],[],Fs);
then I have converted it to time domain as follows:
txy_time = real(ifft(txy));
I then used this tf in time domain to convolve with my filtered output to get an estimate of the output signal
rr_out_calc = conv(txy_time,rr_in_filt);
When i tried to match this data with my filtered output, the results werent matching, instead the pattern of rr_out_cal was similar to the filtered input.
My questions are:
  1. How can I use the results from tfestimate to reconstruct the output signal in time domain?
  2. Does tfestimate only give tf for one sided frequencies,how can i extend this for two sided?

Answers (1)

Simran
Simran on 26 Feb 2025
I can see that you are trying to do two things:
1.) Use the results from “tfestimate” to reconstruct the output signal in time domain.
2.) Extend "tfestimate" for two-sided frequencies.
For the first question, you need to make sure that the operations you are performing are consistent with the nature of the Fourier transform and Convolution.
You can follow these steps to reconstruct the output signal:
1.) Multiply the Fourier transform of the input signal by the transfer function.
rr_in_filt_fft = fft(rr_in_filt); % FFT of input signal
rr_out_fft = txy_full .* rr_in_filt_fft; % Element-wise multiplication
2.) Convert the result back to the time domain.
rr_out_calc = real(ifft(rr_out_fft));
Now to answer the second question, by default the “tfestimate” function provides a one-sided spectrum. For reconstructing a two-sided spectrum:
  • Iftxy is one-sided, you need to mirror it to form a two-sided spectrum before performing the inverse FFT. This involves appending the complex conjugate of the flipped non-redundant part of the spectrum:
txy_full = [txy; conj(txy(end-1:-1:2))]; %Two-Sided Spectrum for txy
By following these steps, you should be able to reconstruct the output signal using the transfer function estimated by “tfestimate”.
For my testing, I used simple sine wave signals for input and output signals, and plotted these figures:
  • Filtered Input Signal
  • Filtered Output Signal
  • Reconstructed Output Signa
You can refer to these documentation for more help:
Hope this helps!

Tags

Products


Release

R2020b

Community Treasure Hunt

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

Start Hunting!