Recontruct temporal signal from FFT after transformations

조회 수: 30 (최근 30일)
Benoit Meriot
Benoit Meriot 2017년 10월 19일
답변: Julia Antoniou 2017년 10월 30일
Hello and thank you for taking time on this,
I have a temporal audio signal of 1 second, at 48kHz. I perform an fft on this signal to be able to apply some frequency-dependent modifications on the Spectrum. Then i would like to recreate a temporal signal using these modified amplitude and phase. My problem is that i don' t see how i can recontruct a whole temporal signal, of the same intital length (1 second), if i only use 1024, 2048 or 4096 points for my Fft calculations. So far my code is :
FS=48000;
TS=1/FS;
time=1; %temporal length
vec_t=[0:TS:time]';
vec_t=vec_t(1:end-1);
SIG_0=wgn(length(vec_t),1,0); % source signal
Spectrum computation, modification, reconstruction :
Nfft=4096;
f_lim=Fs/2; %nyquist frequency
df=Fs/Nfft;
f=-f_lim:df:f_lim-df;
F1=a1'.*fftshift(fft(SIG_0(:,1),Nfft)); %With a1 a complex number for Spectrum modification
S1=ifft(ifftshift(F1));
This code works fine, but as you can see, my reconstrcuted signal S1 is only made of Nfft-samples. Is there a matlab function that can reconstruct a whole temporal signal ? may be using windowed-averaged fft ?

답변 (1개)

Julia Antoniou
Julia Antoniou 2017년 10월 30일
Hi Benoit,
There is no windowed-averaged or moving average function specific to FFT. I would recommend using the "movmean" function. (https://www.mathworks.com/help/matlab/ref/movmean.html)
You could also make your "Nfft" the next power of two greater than 40,000, which is 65,536. Although your signal "SIG_0" is only 40,000, the FFT functions will know to pad the rest of the signal with zeros. These zeros can be truncated once your calculations are complete.

카테고리

Help CenterFile Exchange에서 Spectral Measurements에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by