Signal Computations & Reconstruction

2 次查看(过去 30 天)
vanrapa
vanrapa 2019-4-15
编辑: vanrapa 2019-4-24
I would like some help with the following,
I have two signals, A1 (8192 x 1) and B1 (15223 x 1) sampled at 72 MHz.
1.I have to compute a new signal, such that,
fB2 = conj(fft(B1)) * fft(B1) / fft(A1)
Since A1 and B1 have different number of samples, I added zeros to A1 before computing the respective FFT. But I am not sure adding zeros is correct?
So can I compute fB2 any other way?
2. Also, I have to compute IFFT (fB2). But I am not sure how to reconstruct the signal in time domain based on my sampling frequency of 72 MHz from my IFFT result. I read somewhere that I am supposed to use zero padding, but I did not find any clear example.
Can somebody help?
I have written the following code so far,
dt = mean(diff(Time));
fs = 1/dt;
[fA1, f1] = dataFFT(A1,fs);
[fB1, f2] = dataFFT(B1,fs);
fBtr = conj(fB1);
fB2div = fB1./fA1
fB2 = fBtr.*fB2div
B2 = ifft(fB2)
Any help would be great. Thanks.
  2 个评论
David Wilson
David Wilson 2019-4-22
编辑:David Wilson 2019-4-22
Seems reasonable, but I'd start by just truncating B1 down to the length of A1 (which is already a nice power of 2).
B1r = B1(1:length(A1)); % reduced B
Provied the signals are stationary in the frequency domain, I can't see that being a big problem. (If they are not stationary in frequency, then you have other problems.)
What's the function dataFFT?
With appropriate scaling, you could probably use just the normal fft and ifft routines.
vanrapa
vanrapa 2019-4-22
编辑:vanrapa 2019-4-24
Thanks for the reply.
The signals are stationary. So I can truncate B1.
dataFFT code,
function [val, freq] = dataFFT(sg,sfrequency)
L = length(sg);
NFFT = 2^nextpow2(L);
freq = sfrequency/2*linspace(0,1,NFFT/2+1);
val = fft(sg,NFFT)/L;
val = 2*abs(val(1:NFFT/2+1));
I am guessing that there is an issue with the scaling. But I have already scaled the FFT result by 1/L. I have also tried with 1/sqrt(L) for FFT and with sqrt(L) for IFFT. But I am not getting my desired output.
Are there any other procedure for scaling?

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Fourier Analysis and Filtering 的更多信息

产品


版本

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by