LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Detecting vibratory limit exceedences with FFT

Solved!
Go to solution

Hello all,

We are monitoring a piece of rotating machinery for vibratory limit exceedences.  Our digital data acquisition is running at 3333Hz with analog anti-aliasing filters infront of the ADC.  We sample at a minimum of 5 times over the highest frequency of interest.  We then duplicate the measured data and apply multiple sets of band pass filters to break the specrum up into several buckets of frequency that we then monitor for exeedences of the define limits. 

 

We are moving from dedicated hardware to perform our frequency analysis to an all digital solution.  I would like to make an FFT display showing the linear magnatude of the signal versus frequency.  I would then like to implement limit checking on the output of the FFT for real time monitoring.  We will still post process our data into frequency bins and will have a second look for limit exceedences after the fact.

 

Like most it seems, I have had trouble getting accurate enough magnitudes from the FFT.  Not sure if my issue is spectral leakage, or a total lack of understanding FFTs.  I think it is the latter.

 

My sample VI has a capture of dynamic data with an actual exceedence in the 4-50Hz bandpass.  The limit is set at magnitude of 5.  Peak magnitude in this bandpass was nearly 10.  I included a screen capture of the limit exceedence on the front panel of the VI for reference.  I also indexed the saved data to the point where the excceedence is seen on the raw data.  

 

I have tried to use an FFT to visualize this limit so that I can detect the exceedence, but I have not been sucessful.  I've tried multiple FFT methods and all fail to measure up.  Could those smarter than me give it a try?  I do not want to have to run multiple band pass filters per signal in realtime like we do in post process.  I am trying to monitor and display data from between 8 and 24 channels.  I am concerned about the limitations of my processing power to keep up in a near realtime environment.

 

Thanks for the help!!  And let me know if this is just the wrong application for an FFT and if something better is in order.

-Chris.

0 Kudos
Message 1 of 10
(5,454 Views)

Ahh yes, my issue was a lack of understanding...

 

I have what I believe to be accurate magnatudes now on an FFT and I have used a couple methods to make the FFT in peak units.  The reason that I do not see the same magnitude on the FFT as the band pass filter is superposition.  There are at least three primary peaks within my pass band and probably several smaller peaks.  There are enough in phase waves adding up together through superposition (I think that is the word, I am at least 15 years away from when I would have studied this stuff).  Anyway, enough energy from those smaller peaks sum up to create a larger manitude in the sum of those peaks.  So, I had a peak of ~9 in the 4-50Hz pass band, but my highest singular peak is only ~3.5 to 4 depending on how big my bins are and what window I use.

 

I ended up having to make anougher test with two generated waves to see and understand what was happening.  (attached)

 

Correct me if I am wrong, but summing the peaks across my desired range of frequencies would not be straight forward as I would have to take phase into account.  If this can be done easily, please let me know how.  Otherwise, I will have to implement the pass band solution again for limit checking.

 

Does anyone have GUI examples for dynamic limit checking?  Looking for inspiration.  I will need to combine an FFT, a water fall or a color map, and also indicators showing the half peak to peak levels in each pass band.  The levels would need to change colors when crossing multiple limit thresholds. 

 

Any help from any source would be appreciated!

-Chris.

0 Kudos
Message 2 of 10
(5,411 Views)

Chris,

 

I have done something similar in the past. The appoach I like is to select the desired FFT bins, do an Inverse FFT on the result, and calculate the RMS value of the result. The RMS value represents the total energy in the signal (or signal subset) and is usually the most meaningful measure of the contents of a band of frequencies, especially when the band contains multiple signals or a signal plus noise.

 

By using the FFt.vi the output is in complex representation and contains both the magnitude and phase information.  In Range and Coerce is applied to the frequency array to select the bins.

 

I added a while loop and an event structure. It only takes a moment to do this and it makes it much easier to explore changes in parameters.

 

Lynn

 

 

Message 3 of 10
(5,385 Views)

I'm a tad outside my area of expertise, but what about computing a Power Spectrum, and possibly averaging the power across the bands of interest?  This takes care of the magnitude/phase situation ...

 

Bob Schor

0 Kudos
Message 4 of 10
(5,364 Views)
Solution
Accepted by ChrisLudwig

Lynn,

 

Thank you for the Reply!  I've been trying the inverse FFT route as well, but my implementation was nowhere as clean as yours.  I did have to switch your inverse FFT block to 1D complex to match the source data though.  The real setting was doubling the output amplitude.  Updated VI attached.

 

I love this solution and will use it happily!!

 

I do have one additional issue though.  My company does not use rms.  All of our limits are in peak (peak to peak)/2.  We also cannot assume that all waveforms are sinusoidal and therefore cannot convert from rms to peak with a root of 2.  I will need an FFT function that does not output in rms.  In Matlab, our guys had to encode our own FFT function as the built in functions all output rms.

 

Any ideas on where to find an FFT function that does not output in rms?  Annoyingly, I would then need an inverse FFT in rms as well to match.

 

-Chris.

0 Kudos
Message 5 of 10
(5,337 Views)

Thanks for the suggestion Bob.  Unfortunately, I am constrained by my vendor.  They set the limits.  They defined the unit as peak amplitude over a range of frequencies.  I can't alter how they tested and qualified their component.  All I can do is accept it and compare my data back to their qualification basis.

 

-Chris.

0 Kudos
Message 6 of 10
(5,333 Views)

@ChrisLudwig wrote:

  I will need an FFT function that does not output in rms.  In Matlab, our guys had to encode our own FFT function as the built in functions all output rms.


I don't get this part. I think that since the FFT decomposes the input signal into sinoid components you can factor in sqrt(2) to scale your spectrum from rms to peak.

Maybe your guys had an easier time doing this than tey admitted?

0 Kudos
Message 7 of 10
(5,326 Views)

So I copied the block diagram of the version 2.2 vi into a subvi to start building the inerfaces to insert it into my application.  I gave it a try and the resulting amplitude was half what was expected.  Checked the help file on the inverse FFT and found that the polymorphic selects the output type, real or complex.  Sure enough, the way you had it is technically correct.  It should be selected to 1D real.  I put the polymorphic to 1D real in my subvi and all works well now.

 

Went back and chacked the example VI.  There, when I put it to 1D real, I get a result which is half the expected magnitude.  I checked the input into the inv FFT on both VIs.  Looks identical.  So, no idea what happened there, but be careful to check the output waveform against the source waveform if you plan to implement this example.

 

Also, I found a FFT block that outputs in peak and then is converted to rms.  It is a simple sqrt(2) conversion so should be no issue with that.

0 Kudos
Message 8 of 10
(5,303 Views)

I believe you are right.  Thanks.

0 Kudos
Message 9 of 10
(5,301 Views)

The basic FFT.vi does not generate rms outputs. I think that somewhere in the detailed help files (maybe for the convert spectral units VI?) there is an explanation of the units and scaling produced by various spectral VIs.

 

Lynn

0 Kudos
Message 10 of 10
(5,281 Views)