# Recontruct temporal signal from FFT after transformations

10 views (last 30 days)
Benoit Meriot on 19 Oct 2017
Answered: Julia Antoniou on 30 Oct 2017
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 ?

Julia Antoniou on 30 Oct 2017
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.