# Signal Computations & Reconstruction

조회 수: 1 (최근 30일)
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 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 2019년 4월 22일
편집: vanrapa 2019년 4월 24일
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?

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

### 카테고리

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