Electronic – how to get wave formula using IFFT

demodulationfftfouriersignal processingspectrum analyzer

I have a wave and i can't know its formula
so i used Fast Fourier Transform (FFT) to make frequency spectrum for this wave to get all frequencies and amplitudes (in db) of this wave.

[1] i need to build the formula of this wave (time-domain) using frequency spectrum results and how to convert db of amplitudes.

[2] i can't know the phase for each equation because spectrum only give me amplitudes and frequencies, so how could i found the phases?

Thanks

Best Answer

First, you should realize that the FFT is just one particular algorithm for caluclating the discrete Fourier transform (DFT). None of what you asked depends on the details of the FFT algorithm, it all is generally applicable to the DFT, so I'll talk about that.

I'll answer your questions out of order.

i can't know the phase for each equation because spectrum only give me amplitudes

You started with the actual wave, and calculated the DFT. That included getting the phase information. If you threw away the phase information, that was a mistake. The only way to get it back is to go back to the original time-domain data and re-calculate the DFT, but don't throw away the phase information this time.

i need to build the formula of this wave using frequency spectrum results

You can recover the time-domain waveform using the inverse DFT (IDFT):

$$x_n = \frac{1}{N}\sum_{k=0}^{N-1}X_k e^{i2\pi{}kn/N}$$

However

  1. This assumes you have the complex Fourier components, including phase information. Since you say you threw away the phase information, you don't actually know the \$X_k\$ values, only their magnitudes \$\left|X_k\right|\$, and you can't recover the waveform.

  2. This just recovers the same waveform data you started with. It doesn't tell you "the formula" for the waveform unless you consider a decomposition into sinusoids (or complex exponentials) to be the same thing as "the formula".