eAxis Analytics: JavaScript Fourier Analyzer
Developed Using AngularDart
I spent many years coding Fourier Transforms and digital filters for processing and analyzing biomedical
signals. As part of learning AngularDart programming, I wrote a JavaScript implementation of a radix-2
discrete FFT (Fast Fourier Transform) and used it to develop the following Fourier Analyzer. The result
is a web app that is coded entirely in JavaScript and runs in all browsers.
Steps for Using Digital Fourier Analyzer are as follows:
-
Generate Time and Frequency Domain Waveform: in the lower Time Domain Waveform frame,
select a waveform and set its properties (frequency, sampling rate and number of samples).
If you want random noise added to the waveform, select the Add Noise… checkbox. Once set,
click the Generate Waveform button. This will plot the waveform in both time and frequency domains.
-
Display Time and Frequency Data: once the waveforms are generated, move the mouse in the plot frames
to display a cursor. Time or frequency data corresponding to the position of the cursor will be
displayed in the Results frame.
-
Reset the Data: click the Set Default Waveform button to reset waveform setting to original default values.
-
Suggestions: the sampling frequency must be at least twice the waveform frequency (i.e., above the
Nyquist frequency) to prevent aliasing. To generate a waveform with an exact number of periods, set
the waveform frequency (fw) equal to the sampling frequency (fs) multiplied by the sampling rate (R)
divided by the number of waveform periods (n). The formula is fs = fw * (R / n). For example, to get
four periods of a 1000 Hz signal with 256 samples, set fs = 1000 Hz * (256 / 4) = 64000 Hz (these are
the default waveform settings). Doing this will create a frequency spectrum with a perfect impulse
response with magnitude of one at the frequency of the waveform.
© Copyright 2020 by eAxis LLC
All Rights Reserved