Go Down

Topic: FFT Library (Read 41130 times) previous topic - next topic

pjrc

To accurately sample between 0-2000, your best bet is to sample at 4000 times a second and ....
The trouble with this is what happens if your signal has any signal content between 2000 to 20000 Hz, like the many harmonics of the notes between 82.4 to 1318.52 Hz.  Those harmonics at higher frequencies, and other frequency content associates with the way the note changes over time, are why it sounds like a musical instrument and not a sterile-sounding pure sine wave.

Anything above 2000 Hz doesn't magically go away.  It corrupts your measurements in the 0 to 2000 Hz range.  This is call "aliasing", and it's a well known and often ignored (by hobbyists) problem.

To make this really work, you'd need an extreme analog filter circuit to remove everything above 2000 Hz (or attenuate it to low levels that limit the damage it does to your signal).  Even very intense filters have a substantial transition region, which usually means you need to sample somewhat faster that you'd otherwise want to, simply to prevent the higher frequency content you couldn't filter away from aliasing onto your signal you wanted to sample.

sossio89

I'm  looking for an Arduino FFT library able to give the presence in frequenquency domain of a characteristic frequency of a bearing failure.

There are some characteristic frequency in a frequenquency domain when  I analyze  the vibrational signal of a   failed bearing.

I use an accelerometer with arduino.


Can I found this frequency?

jremington

What would that "characteristic frequency" be?

pjrc

#33
Jan 24, 2016, 11:48 pm Last Edit: Jan 24, 2016, 11:48 pm by Paul Stoffregen
If you have a signal where you wish the measure the frequency, FFT is a poor choice.  You'll be frustrated by the coarse resolution of the frequency bins, and the additional frequency smearing that results from window algorithms.

The first and most important question is whether your signal is simple enough to be reliably turned into a digital waveform of the correct frequency?  For complex signals like musical notes from guitars or vocals, you (usually) can't.  There's far too much harmonic content, where digital circuit would sometimes/often give a frequency twice, three times or more the intended frequency.

If your vibration signal is simple enough, perhaps you can build a circuit to reliably turn it into a digital signal without extra rising/falling edges.  Usually such a circuit involves a low pass filter and a voltage comparator with a small amount of hysteresis feedback.  If you can get a reliable digital signal, then you can use the FreqCount or FreqMeasure libraries.

If you can't get a good digital signal, then you'll need to use analog sampling and a sophisticated algorithm to find the frequency while ignoring other stuff like harmonics and noise.  A very good one is the YIN algorithm.  A good implementation of this was recently contributed to the Teensy Audio Library.  But that does require using a Teensy board (full disclosure: I'm the guy who makes Teensy...), because the YIN algorithm is too much computation for normal Arduino.

https://github.com/PaulStoffregen/Audio/blob/master/examples/Analysis/NoteFrequency/NoteFrequency.ino
http://www.pjrc.com/teensy/gui/?info=AudioAnalyzeNoteFrequency

Another lower quality algorithm that can run on normal Arduino is here:

http://www.instructables.com/id/Arduino-Frequency-Detection/

sossio89

#34
Jan 25, 2016, 11:28 am Last Edit: Jan 25, 2016, 11:34 am by sossio89
I know characteristic frequency from some math formulas.

In this first part of my experimentation I don't know if my vibration signal is simple enough to be reliably turned into a digital waveform of the correct frequency.


The signals are generated from rotation of rolling bearings in a elettric motor.


This is the frequency domain of an other experiment:



They wanted to find a specific frequency: 130 Hz.




Can you hel me to built the hardware part and software part If my vibration signal is simple enough?


sossio89

Can you help me for this work?

KeithRB

First do some some simulations to decide how many points you need for your FFT. Then we can help you with your hardware. You should also start your own darn topic!

sossio89

I write this in another topic?

sossio89

http://forum.arduino.cc/index.php?topic=374902.0

Go Up