-
-
Notifications
You must be signed in to change notification settings - Fork 43
Fourier Transforms
Sambit Paul edited this page Dec 11, 2021
·
14 revisions
We apply the Discrete Fourier Transform to decompose the signal and represent it as a sum of periodic components. On decomposition we get a real component and an imaginary component. For DFT on real signals, the frequencies are mirrored around the centre.
In this library, we are able to get all 4 variations:
- Positive Absolute Values
- Positive Complex Values
- Full Absolute Values
- Full Complex Values
Fourier dft = new DiscreteFourier(signal); //Works well for short signals (<200 points)
OR
Fourier dft = new FastFourier(signal); //Works well for longer signals (>200 points)
dft.transform();
boolean onlyPositive = true;
double[] out = dft.getMagnitude(onlyPositive); //Positive Absolute
boolean onlyPositive = true;
double[][] out = dft.getComplex2D(onlyPositive); //Positive Complex
boolean onlyPositive = false;
double[] out = dft.getMagnitude(onlyPositive); //Full Absolute
boolean onlyPositive = false;
double[][] out = dft.getComplex2D(onlyPositive); //Full Complex
We apply the Inverse Discrete Fourier Transform to a complex sequence to reconstruct the original signal. This process also generate a signal with a real and an imaginary component.
In this library, the IDFT works in 2 modes:
- For a real sequence
- For a complex sequence
// Automatically detects real and complex sequence and performs IDFT accordingly
InverseFourier idft = new InverseDiscreteFourier(complexSequence); //When DFT is performed using DiscreteFourier
OR
InverseFourier idft = new InverseFastFourier(complexSequence); //When DFT is performed using FasrFourier
idft.transform();
double[] outReal = idft.getReal(); //To get only the real component
double[] outAbsolute = idft.getMagnitude(); //To get the absolute value of the complex signal
double[][] out = idft.getComplex2D(); // To get the complex signal
The image shows the plot of the complex output. As you can see, the real component represents the original signal:
Wiki
-
Filters
- IIR Filters
- FIR Filters
- Kernel-Based Filter
- Adaptive Filters
-
Signals
-
Peak Detection
-
Transformations
-
Speech
-
Windowing