# Making longer a time domain signal by adding values on its frequency domain. What am I doing wrong?

## Background

Here's the thing: using software for Finite Element Acoustic Simulation I got the dataset of frequency response from a room; software works by solving the wave equation in the interval $[f_i,f_f]$ so results come directly in the frequency domain and we save them into a .csv file: For decay time analysis, we're on the way to transform the data to time domain (using IFFT) and it has some tricks that you may know but I'll mention briefly:

(From Matlab's FFT documentation)

1. Space between 0 [Hz] and f_i [Hz] must be filled in (keeping the distance between points as in the results) and assigned zero amplitude, to let IFFT algorith work correctly

2. Do an amplitude "de-normalization"

3. "Reflect" the frequency spectra using the last frequency element as pivot, omitting the first one and conjugating this copied values

4. Apply IFFT, and done.

So far, we've made and proved a code that does this steps using the .csv file as entry. The test was realized with a .csv created from a .wav file and it resulted ok:

(Subplot 1: original. Subplot 2: after process) ## The problem

Our analysis was made from 0.1 to 200 Hz with steps of 0.1 Hz. When we transformed the results to time domain, the signal was 10 secs long but we expected it to be at least 30 secs (since was a model similar to last's plot one). We tried to reduce the distance between points by interpolating it, as $\Delta f = 1/T$ say (with $T$ as signal duration). However, when applying again IFFT the plot was exactly the same! So, how can I process my data to get a longer signal in the time domain?

Hope I have been clear enough. Thanks in advance.

EDIT: showing correctly the list before first image

• decreasing frequency step should work! – Mohammad M Jun 23 '18 at 7:29
• It is not clear what you did in the last graph. You correctly applied the IFFT to the values in the CSV file? Then you took a subset of the values in the CSV file, and did the inverse transform of that? – Cris Luengo Jun 23 '18 at 7:43
• @CrisLuengo I just edit the list before the first pic to show it correctly; I applied those steps to the subset of values, then IFFT. This might be work... I'm about to check out how did I build the time axis, probably the mistake is there and all the previous process is ok (unless someone detects a problem here) – Julio Jun 24 '18 at 13:07
• Julio, you still didn’t show what you did to make the bottom plot. How did you determine the sample spacing? How did you select the subset of frequencies to inverse transform? Did you fill the remaining frequencies with zeros or did you leave them out altogether? – Cris Luengo Jun 24 '18 at 20:20
• @CrisLuengo sorry, I missunderstood it. First I got the sampling frequency with the product of signal length L and the frequency sample spacing df; where I'm not sure if I'm doing right is with time axis block: $ Fs = L*df; Fs = round(Fs); time_axis = (1/Fs)*(0:L-1); $ – Julio Jun 25 '18 at 18:26