06-28-2023 11:20 PM
Hi Folks,
I am a beginner to LabVIEW.
I am trying to complete a FFT on ADXL 345 sensor's accelerometer data. I am only interested in doing a FFT in the Z-axis as that is the vibration profile I am trying to map. The accelerometer rests on a vibrating plate held up with springs and vibrating with eccentric rotating mass motors. The plate only vibrates for only 3-5 seconds at around 50 Hz. I have been able to plot the accelerometer's x,y,z profile though I am not sure if the FFT I am doing is correct for the Z accelerometer profile.
I have attached my VI as well. I am not sure what the sampling frequency of the FFT is. When I change the FFT size, the value changes on the frequency bins axis. I have scaled the amplitude Y axis by 5.
This is what I am getting when I just shake the vibration plate with my hand.
The question I have is how do I know that my frequency bin is corresponds to the right frequency. When I change the FFT size to 1024 with the same applied vibration to the plate the frequency dominance is at a different bin, as seen below:
Is there a way to coordinate the frequency bin to the correct frequency output? how do I get the sampling frequency(rate) for the FFT?
I was thinking if I knew the sampling frequency of the FFT then I would be able to find delta_f which is equal to sample rate / FFT size (correct?). I have also seen it being related to (FFT size)/2.
I would think that the sampling frequency (rate) is related to the loop frequency (rate). Is that fair to say?
Which direction should I be going in to ensure that that the amplitude corresponds to the right frequency in Hz (seen on the frequency bin X axis) ?
Thank you in advance,
KG117
06-29-2023 03:46 AM
You should learn the basics of Fourier transformation and than of discrete Fourier transformation DFT.
FFT means Fast Fourier transformation and is a DFT with certains constrains to make the calculations fast, but this fact is usually ignored and all DFTs are generally called FFTs ..
Is there a way to coordinate the frequency bin to the correct frequency output? how do I get the sampling frequency(rate) for the FFT?
yes, the number of samples and the SR determine the center frequencies of the bins.
Which direction should I be going in to ensure that that the amplitude corresponds to the right frequency in Hz (seen on the frequency bin X axis) ?
will always be a more or less accurate guess if you don't look at the surrounding bins , search for FFT leakage ..
If you have a equidistant sampled dataset (not always true for digital MEMS using an internal RC oscillator) and a constant (sine) exitation over the window (time) you look at, I suggest to use the extract tone(s) vis found in signal processing/ wfrm measurements
You need to know your samplerate !
One method: Apply a clean sine at known frequency , make a guess of the SR (samples/time), use extract tone.vi , use the frequency output to correct your SR.