Electronics > Beginners
sound analyzer for automating quality checks?
<< < (10/10)
rhb:

--- Quote from: engineheat on January 23, 2019, 06:09:57 pm ---
--- Quote from: rhb on January 17, 2019, 07:22:38 pm ---
There are three sensible approaches to the problem:

1)  Subtract an average ambient noise spectrum from the result.  That works OK if the noise characteristics are time invariant.


--- End quote ---

Thanks, this is what I was thinking about as well, will give it a try.


--- End quote ---

1) is required.  The others are optional.  But to use them you need to have examples of bad assemblies. So you have to do 1) first to use either.  The best way to discover anomalies is for a human to look at the data and mark them.  The computer can take it from there with ease after a little programming.

It's really worth implementing SVD-KL and basis pursuit and comparing the results.  This is especially true with noisy data. I'm quite confident that the improvement in accuracy and resolution from step to step will be dramatic.
engineheat:
Thanks.

I'm sure even after I implement that, they will ask me to prove that it is doing what it should. For example, they might wonder if the "microphone is calibrated." What can I do to prove to them that the system is robust?

Are there any good samples of sound with known frequency that I can demonstrate that the FFT is outputting the right result. (I tested already on Youtube videos of sounds but they might want to be more rigorous than that...)

Also, the magnitudes of the FFT depends on sound card, the format of the data, and I guess also the microphone used. Is there even a way to calibrate all that and does it even make sense to do so? Because I can totally imagine they want to know where those magnitude numbers come from.

Thanks
rhb:
 I posted the algebra for sound card errors previously.   Correcting the sound card errors is more exercise in gratuitous accuracy than substantive.  Mostly good for impressing management that you've been very  thorough,  But you might find some real surprises.
   
Calibrating microphones is expensive and difficult.  Also probably not really needed. To "normalize" the microphones, make a soundproof box and use a spark pug as the source.  Traditional reference was lead shot poured onto a sheet of steel.  Record with each mike in all positions.  Then the math is a simple variant of the card algebra.

BTW Any acoustical enclosure should avoid having any flat or parallel surfaces.  Moisten 1/4" gypsum board to make it flexible and apply 2 layers with the seams at 90.  This is to prevent resonance between the walls from saturating the pickup.

The canonical tests for an FFT are a pure real sequence of ones. The transform is a spike at T0.  The corollary is unit spikes at  T0. TN/2 and Tn.  This should all have unit modulus and the phase angle should go from zero t0 two Pi.  Any deviation needs to be investigated.  These test for an "off by one" in the array indexing of the FFT which is by far the most common error.  The other test is to do the opposite.

The addition in the transform leads to the scaling issue.  I like 1/sqrt(N)  as that means the magnitude of the values stays the same.  There are 6 permutations off the FFT, three scalings and the sign of the exponent.  All are in use by some workers, so you have to watch out for that.

My professional work has always been the opposite.  My job has been to find the anomaly.  That's well defined physically,   However, the noise is another matter.  The best seismic  processors can recover clear signal from data which are so noisy that there is no signal visible at all.

First reference is the masterpiece of classical Wiener-Shannon-Nyquist analysis.  There is a detailed an explanation of everything you want to do there.  So I can explain things simply by saying read section n.p. I started using this 30 years ago in the 2nd edition.  I have pretty much all the DSP classic texts.  It's 10-12 ft of shelving going back to the original publications by Wiener and Shannon.  None of them compare in terms of breadth of coverage of issues of real world importance as B&P.  Alan Piersol passed away, so the 4th is the last edition.  B&P summarizes the mathematics from Fourier in 1820 to Wiener et al in 1940 with detailed derivations for common practical cases. So if you can read the math you can write the code.  There are caveats though as with everything.  Read closely and check the citations.

There is a *lot* of mathematics to learn to implement your use case properly.  This is the first step which must be mastered.  Much of it should be familiar to varying degrees with varying terminology. 

Random Data
Bendat & Piersol
4th ed

The 2nd book is Mallat.  It's an essential bridge into the mathematics of modern DSP.  I had it for years in  a couple of editions, but only used it as a reference,  I never read it through. Just looked at the pictures which are very cool.  Foucart & Rauhut made me realize I needed to fill a gap in my knowledge so I read Mallat which resolved the matter.   For years I just used the back part of Mallat and skipped the wavelet discussion.  But wavelet mathematics are important to sparse L1 pursuits in general.

A Wavelet Tour of Signal Processing
Stephane Mallat
3rd ed

The discussion in Mallat of sparse L1 pursuits is quite adequate for actual practice in a wide range of applications. As it is 10 years old, a new edition should be out soon.

The next thing to be done is collect data on motors, good and bad.  As current screening is manual, put up a waterfall display of the the last N tests for the manual tester to classify as good or bad. Put that monitor in portrait mode.  Also present mean, median, mode and standard deviation A(f) plots on a landscape oriented monitor.  Record all the data and then start running analyses per B&P.  But involve the current testers and the rework staff.  The latter  should repeat the test in a quieter setting, rework the motor noting what was done. and record the motor after rework.

That data is what validates the process.  The people who have been doing it say it works.  Move them to the another bottleneck and repeat.  It's important that success bring them better jobs. 

For a test to be useful it needs to last for several rotations of the slowest shaft.  Testing for shorter periods just means some things are not tested.

It's important to note that all the gear work driven by the motor has a harmonic or sub-harmonic relationship to the motor speed.  A good assembly will have a tone at the shaft speed and that times the number of teeth on each gear spinning at that speed.  Other patterns present will indicate the presence of a variation in the gear contact.

FWIW  So far as I can tell sparse L1 pursuits are at the heart of "deep learning" which in turn is just "neural nets" which made the great innovation of  solving an unknown equation the program picked out, done over.  You just hope it has something to do with what you wanted.   What can I say?  I've been to a lot of dog and pony shows.
rhb:
I've been contemplating the problem. Both SVD-KL and sparse L1 pursuits require models of good and bad devices.  Those are easy to accumulate over time, but what to do to start?

Get some golden samples of good gearmotors,  count the teeth on all the shafts so you know what multiples of the shaft rotations there will be spectral peaks, make a long recording so that you can average 10,000 FFTs.  Do this in a quiet area and identify all the spectral peaks.

In the line setting, record the ambient noise, run the motor and record it and the noise.  Difference the two recordings and then examine  the residual difference  from the reference recording.

You need to make sure the recordings have multiple full revolutions of all shafts so that all the teeth get checked.

My general thinking is that if you make several ambient noise recordings with gearmotor recordings in between, defective units should be apparent from looking at the residual of the gearmotor - ambient noise - golden reference  averaged spectra. and that simply summing the residual would give you a good initial pass/fail.  In any case, rework should have a well isolated sound chamber to record motors before and after rework to collect the data for more sophisticated models.  You might well find that there are only a few bad unit spectra.

Navigation
Message Index
Previous page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod