Forums

Autocorrelation rocks for Engine RPM

Started by Robert Scott June 10, 2013
A while ago I posted a question about how to extract pitch information
from the messy sound of an engine.  It was for an iPhone app I have
developed which displays the RPM of an engine based on the sound it
makes.  Vladimir and other suggested autocorrelation as used in pitch
detection in speech.  Thanks, guys!  After a long time struggling with
various ad hoc ways to qualify peaks in the FFT and match them up with
harmonics of the fundamental pitch of the engine, the autocorrelation
method beats them all by a long shot.  I finally got it all
implemented into my app, which also displays a real-time graph of the
autocorrelation function.  I have tested it on lawnmowers, string
trimmers, generators, motorcycles, industrial earthmoving equipment,
and single-engine airplanes.  In almost every case the graph was clear
and the RPM calculation was solid.  I wish I had known about this
three years ago when I first released my app.  I could have avoided a
lot a bad reviews.  Thanks again.  This is a new tool in my toolbox.

Robert Scott
Hopkins, MN
  
>A while ago I posted a question about how to extract pitch information >from the messy sound of an engine. It was for an iPhone app I have >developed which displays the RPM of an engine based on the sound it >makes. Vladimir and other suggested autocorrelation as used in pitch >detection in speech. Thanks, guys! After a long time struggling with >various ad hoc ways to qualify peaks in the FFT and match them up with >harmonics of the fundamental pitch of the engine, the autocorrelation >method beats them all by a long shot. I finally got it all >implemented into my app, which also displays a real-time graph of the >autocorrelation function. I have tested it on lawnmowers, string >trimmers, generators, motorcycles, industrial earthmoving equipment, >and single-engine airplanes. In almost every case the graph was clear >and the RPM calculation was solid. I wish I had known about this >three years ago when I first released my app. I could have avoided a >lot a bad reviews. Thanks again. This is a new tool in my toolbox. > >Robert Scott >Hopkins, MN > >
Is it already available in the app store?
On Mon, 10 Jun 2013 18:31:34 -0500, "dszabo" <62466@dsprelated> wrote:

>>A while ago I posted a question about how to extract pitch information >>from the messy sound of an engine. It was for an iPhone app I have >>developed which displays the RPM of an engine based on the sound it >>makes. Vladimir and other suggested autocorrelation as used in pitch >>detection in speech. Thanks, guys! After a long time struggling with >>various ad hoc ways to qualify peaks in the FFT and match them up with >>harmonics of the fundamental pitch of the engine, the autocorrelation >>method beats them all by a long shot. I finally got it all >>implemented into my app, which also displays a real-time graph of the >>autocorrelation function. I have tested it on lawnmowers, string >>trimmers, generators, motorcycles, industrial earthmoving equipment, >>and single-engine airplanes. In almost every case the graph was clear >>and the RPM calculation was solid. I wish I had known about this >>three years ago when I first released my app. I could have avoided a >>lot a bad reviews. Thanks again. This is a new tool in my toolbox. >> >>Robert Scott >>Hopkins, MN >> >> > >Is it already available in the app store?
Only the crummy FFT-only version is there now. The autocorrelation version is only on my development phone so far. I plan to submit the update to app store in the next few days and then Apple will have to review it before they let it go live. Robert Scott Hopkins, MN
That's interesting.  Why does the autocorrelation work so much better?  Don't all the harmonics still show up in the autocorrelation graph?

How does this work with multicylinder enginers?  I'd think a 2-cylinder motorcycle would have a fundamental frequency that is twice the RPM.
Also, doesn't a 2-cycle engine have a fundamental pitch that is the same as the RPM (or RPS), whereas a 4-cycle, 1-cylinder engine would have a pitch half that of the crankshaft rotation? 
Kevin Neilson <kevin.neilson@xilinx.com> wrote:
> Also, doesn't a 2-cycle engine have a fundamental pitch that is > the same as the RPM (or RPS), whereas a 4-cycle, 1-cylinder > engine would have a pitch half that of the crankshaft rotation?
And for more than one cylinder, multiply by the number of cylinders, maybe. Assuming that most of the sound comes from the exhaust pipe as the valve opens and exhaust goes out. As the path from different cylinders might be different, there could be some lower harmonics. (or less high harmonics.) There are now variable cylinder engines which can turn on and off some of the cylinders, to be more efficient when full power isn't needed. As far as I know, they stop the fuel injector, but the valves still open and close, and air is still compressed and released. Maybe they can also switch the valves. That should make more interesting sounds. -- glen
On Tue, 11 Jun 2013 20:13:11 +0000 (UTC), glen herrmannsfeldt
<gah@ugcs.caltech.edu> wrote:

>Kevin Neilson <kevin.neilson@xilinx.com> wrote: >> Also, doesn't a 2-cycle engine have a fundamental pitch that is >> the same as the RPM (or RPS), whereas a 4-cycle, 1-cylinder >> engine would have a pitch half that of the crankshaft rotation? > >And for more than one cylinder, multiply by the number of >cylinders, maybe. > >Assuming that most of the sound comes from the exhaust pipe as the >valve opens and exhaust goes out. As the path from different >cylinders might be different, there could be some lower harmonics. >(or less high harmonics.) > >There are now variable cylinder engines which can turn on and off >some of the cylinders, to be more efficient when full power isn't >needed. As far as I know, they stop the fuel injector, but the >valves still open and close, and air is still compressed and >released. Maybe they can also switch the valves. That should make >more interesting sounds. > >-- glen >
Not only that, but on an airplane there can be gear reduction between the engine and propeller, and the number of blades on the propeller matters, too. So there can be a decoupling in frequency between the engine and prop. I asked previously how that was handled and didn't get a response. Eric Jacobsen Anchor Hill Communications http://www.anchorhill.com
On 2013-06-11 22:20, Eric Jacobsen wrote:
[...]
> > Not only that, but on an airplane there can be gear reduction between > the engine and propeller, and the number of blades on the propeller > matters, too. So there can be a decoupling in frequency between the > engine and prop. > > I asked previously how that was handled and didn't get a response.
Well, also in a car there is "decoupling" between the engine and the tyres, and those one are making a lot of noise too. In both cases, the noise of the "explosion" in the cylinders is quite unique and loud. bye, -- piergiorgio
Eric Jacobsen <eric.jacobsen@ieee.org> wrote:

(snip, I wrote)
>>And for more than one cylinder, multiply by the number of >>cylinders, maybe.
>>Assuming that most of the sound comes from the exhaust pipe as the >>valve opens and exhaust goes out. As the path from different >>cylinders might be different, there could be some lower harmonics. >>(or less high harmonics.)
(snip)
> Not only that, but on an airplane there can be gear reduction between > the engine and propeller, and the number of blades on the propeller > matters, too. So there can be a decoupling in frequency between the > engine and prop.
> I asked previously how that was handled and didn't get a response.
Well, one response I remember seeing was that properler RPM was more useful than engine RPM. Could be interesting if the exhaust pipe was close to the propeller, as there might be some cross (mixing) terms. -- glen
On 12.6.13 12:48 , glen herrmannsfeldt wrote:

> Well, one response I remember seeing was that properler RPM was > more useful than engine RPM. > > Could be interesting if the exhaust pipe was close to the > propeller, as there might be some cross (mixing) terms. > > -- glen
In a propeller airplane, it is common that the propeller noise is louder than the exhaust noise. Each blade creates a spiral- formed wake pressure front. At take-off power, the blade tips run pretty near the speed of sound. This is a design limitation, which limits the direct-drive engine RPM to below 3000 rpm. In type certification it is required to have an instrument for propeller RPM. This is a safety requirement to protect against overspeed. -- Tauno Voipio