1
\$\begingroup\$

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

\$\endgroup\$
  • \$\begingroup\$ i used this formula => from k=0 to 18 Acos(2*pixKn/N + P) - Asin(2*pi*x*1/N + P) + .... and got the same wave . does it right ? \$\endgroup\$ – EraMaX Aug 8 '15 at 23:09
  • 1
    \$\begingroup\$ You don't say how many time domain data points you have. In any case, DFT may not be the right way to go about finding a formula for the time function. You might try fitting a z-transform to the raw data (eg by least squares), then transforming this to the S-domain, followed by inverse Laplace transforming to get the closed form function of time. Also note that phase information obtained from a DFT is very often unreliable. \$\endgroup\$ – Chu Aug 8 '15 at 23:12
  • \$\begingroup\$ Btw, you need to format the formula; and explain what it's supposed to do. \$\endgroup\$ – Chu Aug 8 '15 at 23:30
3
\$\begingroup\$

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".

\$\endgroup\$
  • \$\begingroup\$ very thanks, Now i have amplitudes and phases for the wave. i need a sin of cos to form wave formula and how to form it? also does i need any convert of amp or phase? \$\endgroup\$ – EraMaX Aug 8 '15 at 21:18
  • \$\begingroup\$ @EraMaX The inverse equation given IS a sine/cosine series in complex form. Do you know the exponential form of sine? \$\endgroup\$ – crasic Aug 15 '15 at 1:08
  • \$\begingroup\$ Yes, it is sin(x) = (e^(ith) - e^(-ith))/2i \$\endgroup\$ – EraMaX Aug 15 '15 at 10:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.