Signal Computations & Reconstruction

2 visualizaciones (últimos 30 días)
vanrapa
vanrapa el 15 de Abr. de 2019
Editada: vanrapa el 24 de Abr. de 2019
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 comentarios
David Wilson
David Wilson el 22 de Abr. de 2019
Editada: David Wilson el 22 de Abr. de 2019
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 el 22 de Abr. de 2019
Editada: vanrapa el 24 de Abr. de 2019
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?

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Fourier Analysis and Filtering en Help Center y File Exchange.

Productos


Versión

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by