MagicPlot Manual

Plotting and nonlinear fitting software

User Tools

Site Tools


fft

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
fft [Tue Oct 26 10:05:33 2010]
Alexander
fft [Thu Jan 14 17:14:11 2021] (current)
Alexander
Line 1: Line 1:
-====== Fast Fourier Transform (FFT) (Pro edition only) ======+====== Fast Fourier Transform (FFT) ======
 Open Table or Figure or Plot with initial data and use ''Processing -> Fast Fourier Transform'' menu item to perform [[wp>FFT]]. Open Table or Figure or Plot with initial data and use ''Processing -> Fast Fourier Transform'' menu item to perform [[wp>FFT]].
  
 Fast Fourier transform algorithm computes discrete Fourier transform exactly and is used to considerably speed up the calculations.\\ Note that FFT is not an approximate method of calculation. Fast Fourier transform algorithm computes discrete Fourier transform exactly and is used to considerably speed up the calculations.\\ Note that FFT is not an approximate method of calculation.
  
-MagicPlot uses the algorithm of FFT that does not necessarily require the number of points //N// to be an integer power of 2, though in case of power of 2 evaluation time of the FFT algorithm is less. MagicPlot uses [[http://www.netlib.org/fftpack|jfftpack]] library (a Java version of fftpack).+{{:fft.png?nolink|}}
  
-{{:fft1.png|FFT of table columns dialog}} {{:fft2.png|FFT of curves dialog}} |+===== Parameters ===== 
 + 
 +^ Sampling Interval  Sampling interval of original data Δ//t// is used to compute the data in resulting sampling columnMagicPlot calculates sampling interval as a difference between second and first values in ''Sampling'' column. You can set sampling interval manually in ''Sampling Interval'' field. \\ Note that using of discrete Fourier transform implies that the samples in your original data are equally spaced in time/frequency, i.e. the sampling interval is constant. If the sampling interval is varying or real and/or imaginary data contains empty cells in the middle, the result of discrete Fourier transform will be incorrect.  | 
 +^ Real, \\ Imaginary  | Columns with real and imaginary components of data. \\ If your data is purely real, select ''<none>'' imaginary item  | 
 +^ Forward / \\ Inverse  | Transform direction (here ''Inverse'' also equals to ''Backward'') | 
 +^ 1/N in forward transform  | Divide forward transform result by number of points //N// (see formulas table). If your original data is real, you may want to additionally multiply the result by 2 to get the true amplitudes of real signal. Also referred as ''Normalize'' in some other applications.  | 
 +^ Center zero frequency  | If selected, after forward Fourier transform the two parts of spectrum will be rearranged so that the lower frequency components are in the center; the opposite rearrangement of spectrum will be done before inverse transform if any. Also referred as ''Shift FFT'' in some other applications. | 
 + 
 +===== Algorithm ===== 
 + 
 +MagicPlot uses the algorithm of FFT that does not necessarily require the number of points //N// to be an integer power of 2, though in such a case evaluation is faster. MagicPlot uses [[http://www.netlib.org/fftpack|jfftpack]] library (a Java version of fftpack).
  
-===== Formulas ===== 
 ==== Discrete Fourier Transform Formulas ==== ==== Discrete Fourier Transform Formulas ====
-By default MagicPlot uses 'electrical engineering' convention to set the sign of the exponential phase factor of FFT: Forwart transform is computed using factor ''-1''. Most scientific applications use factor ''-1'' in forward transform as MagicPlot does by default. But notethat the sign of exponential phase factor in Numerical Receipts in C, 2nd edition, p. 503 in forward transform is ''+1''.+By default MagicPlot uses 'electrical engineering' convention to set the sign of the exponential phase factor of FFT: forward transform is computed using factor ''-1''. Most scientific applications use factor ''-1'' in forward transform as MagicPlot does by default. But note that the sign of exponential phase factor in Numerical Receipts in C, 2nd edition, p. 503 and in MATLAB package in forward transform is ''+1''.
  
-^  Factor −1 (Default)  ^^ ^  Factor +1 (Scientific)  ^^ +^  Factor −1 (Default)  ^^^ 
-^  1/N in forward \\ transform  ^  Forward Transform \\ (Signal->Spectrum)  ^  Inverse Transform \\ (Spectrum->Signal) ^  Forward Transform \\ (Signal->Spectrum)  ^  Inverse Transform \\ (Spectrum->Signal) +^  1/N in forward \\ transform  ^  Forward Transform \\ (Signal->Spectrum)  ^  Inverse Transform \\ (Spectrum->Signal) 
-^  Checked \\ (Default)  |  <m>C_n = 1/N sum{k=1}{N}{c_k e^{−2 pi i k n {/} N}}</m>  |  <m>c_n = sum{k=1}{N}{C_k e^{2 pi i k n {/} N}}</m>  | |  <m>C_n = 1/N sum{k=1}{N}{c_k e^{2 pi i k n {/} N}}</m>  |  <m>c_n = sum{k=1}{N}{C_k e^{−2 pi i k n {/} N}}</m> +^  Checked \\ (Default)  |  <m>C_n = 1/N sum{k=1}{N}{c_k e^{−2 pi i k n {/} N}}</m>  |  <m>c_n = sum{k=1}{N}{C_k e^{2 pi i k n {/} N}}</m>  |  
-^  Unchecked  |  <m>C_n = sum{k=1}{N}{c_k e^{−2 pi i k n {/} N}}</m>  |  <m>c_n = 1/N sum{k=1}{N}{C_k e^{2 pi i k n {/} N}}</m>  | |  <m>C_n = sum{k=1}{N}{c_k e^{2 pi i k n {/} N}}</m>  |  <m>c_n = 1/N sum{k=1}{N}{C_k e^{−2 pi i k n {/} N}}</m>  |+^  Unchecked  |  <m>C_n = sum{k=1}{N}{c_k e^{−2 pi i k n {/} N}}</m>  |  <m>c_n = 1/N sum{k=1}{N}{C_k e^{2 pi i k n {/} N}}</m> 
  
-Here //c<sub>n</sub>// are complex signal components and //C<sub>n</sub>// are complex spectrum components, //n// = 1...//N//.+\\
  
-The only difference is in the sign of exponential phase factor and 1///N// multiplier.+^  Factor +1 (Scientific)  ^^^ 
 +^  1/N in forward \\ transform  ^  Forward Transform \\ (Signal->Spectrum)  ^  Inverse Transform \\ (Spectrum->Signal) 
 +^  Checked \\ (Default)  |  <m>C_n = 1/N sum{k=1}{N}{c_k e^{2 pi i k n {/} N}}</m>  |  <m>c_n = sum{k=1}{N}{C_k e^{−2 pi i k n {/} N}}</m> 
 +^  Unchecked  |  <m>C_n = sum{k=1}{N}{c_k e^{2 pi i k n {/} N}}</m>  |  <m>c_n = 1/N sum{k=1}{N}{C_k e^{−2 pi i k n {/} N}}</m>  |
  
-Note: If you expect to get the original data when doing inverse FFT of forward FFT set the ''Normalize Forward Transform'' and ''Center Zero Frequency'' check boxes identically for forward and inverse transforms.+ 
 +Here //c<sub>n</sub>// are complex signal components and //C<sub>n</sub>// are complex spectrum components, //n// = 1...//N//. The only difference is in the sign of exponential phase factor and 1///N// multiplier. 
 + 
 +Note: if you expect to get the original data when doing an inverse FFT of forward FFTset the ''1/N in Forward Transform''''Center Zero Frequency'' and ''Factor'' options the same for forward and inverse transforms.
  
 ==== Amplitude and Phase Columns Formulas ==== ==== Amplitude and Phase Columns Formulas ====
-<m>Amplitude_n = sqrt{{Re_n}^2 + {Im_n}^2},~~ Phase_n = atan2(Im_n,~ Re_n)</m>+<m>A_n = sqrt{{Re_n}^2 + {Im_n}^2},~~ phi_n = atan2(Im_n,~ Re_n)</m>
  
-Because of using [[wp>atan2]] function the phase is unwrapped and is in range (//−π//, //π//].+Because of using ''[[wp>atan2]]'' function the phase is unwrapped and is in range (//−π//, //π//]. The result of ''atan2(y, x)'' is similar to calculating the arc tangent of ''y/x'', except that the signs of both arguments are used to determine the quadrant of the result.
  
 ==== Sampling Column Formulas ==== ==== Sampling Column Formulas ====
Line 42: Line 57:
   * Missing values in the end of the column are ignored.   * Missing values in the end of the column are ignored.
  
-===== Parameters ===== +===== See Also ===== 
-^ Sampling Interval  | Sampling interval of original data Δ//t// is used to compute the data in resulting sampling column. If ''Get from''  box is set, MagicPlot will calculate sampling interval as difference between two beginning values from given column. You can set sampling interval manually by checking ''Set manually'' box. \\ Note that using of discrete Fourier transform implies that the samples in your original data are equally spaced in time/frequency, i.e. the sampling interval is constant. If the sampling interval is varying or real and/or imaginary data contains empty cells in the middle, the result of discrete Fourier transform will be incorrect. +  * [[processing]]
-^ Real, \\ Imaginary  | Columns with real and imaginary components of data. \\ If your data is only real, select ''<all zeros>''  imaginary item  | +
-^ Forward / \\ Inverse  | Transform direction (here Inverse equals to Backward) | +
-^ 1/N in forward transform  | Also referred as 'Normalize' in some applications. Divide forward transform result by number of points //N// (see formulas table). If your original data is real, you may want to additionally multiply the result by 2 to get the true amplitudes of real signal +
-^ Center zero frequency  | If selected, after forward Fourier transform the two parts of spectrum will be rearranged so that the lower frequency components are in the center; the opposite rearrangement of spectrum will be done before inverse transform if any.  |+
fft.1288073133.txt.gz · Last modified: Sun Nov 8 12:20:32 2015 (external edit)