View Single Post
      07-26-2013, 02:18 PM   #82
bradleyland
TIM YOYO
United_States
1504
Rep
3,282
Posts

Drives: 2013 M3
Join Date: Jun 2010
Location: Vero Beach, FL

iTrader: (0)

Garage List
Quote:
Originally Posted by MCaro View Post
Nice analysis, swamp. Just a few questions cause I am curious...
Why did you choose a hanning window?
Did you try a spectrogram to get better time/frequency resolution?
Have you tried running the audio through an adaptive FIR filter to remove white noise?

Overall it's pretty interesting. I didn't know F1 teams did something similar...
I had similar questions, so I did some exploration of my own.

Why did you choose a hanning window?

I think he probably chose Hanning window because of the dynamic range of the audio data. Although I looked at rectangular as well, and the plot looked pretty good after I applied a lowpass filter.

Did you try a spectrogram to get better time/frequency resolution?

Spectrographs of mechanical sounds are really difficult to interpret. I've attached a screenshot of a short section if you're interested in looking at it. This is the region just before the upshift.

Have you tried running the audio through an adaptive FIR filter to remove white noise?

I'm not really sure what an adaptive FIR filter is. From what I gather, it would required input coefficients that would allow me to narrow the frequency range. I just used a lowpass filter as you can see in my full write-up.

==============

My analysis shows a result that's closer to 7400 RPM. If you download my files, you can open the .aup files with Audacity (it's free). Running spectrum analysis on the audio just before the upshift always gives me values closer to 330 Hz, not 350-360 Hz. Not sure why exactly.

Full write-up: http://upload.bradlanders.com/bimmer...ound-analysis/

Copy/paste of my Markdown source (links won't work, so you'll have to click here for the full version):

Quote:
# F80 M3 Sound Analysis

## Goal

Identify maximum operating RPM of the F80 M3 from a video clip.

## Gathering data

Source video: REDACTED TO AVOID EMBED; SEE FULL VERSION

Extraction process: Audio captured using AudioHijack, imported to Audacity and saved in lossless Audacity internal format. Audio captured from video starting at approximately 3:04.

Full audio section:[listen](audio/f80-m3-03m04s-clip.wav) (16-bit, 44.1 KHz, PCM)

Audacity timeline (full section):

![Audacity timeline for audio selection](images/f80-m3-03m04s-timeline.png)

For our purposes, we will analyze the audio just before the shift "burp" heard at 4.3s. By zooming in on the timeline, we can see the change in frequency pattern with good precision. The section we will analyze is shown below:

![Clip for analysis](images/clip-for-analysis.png)

This is a 0.300s clip, starting at 4.000s.

Clip for analysis:[listen](audio/f80-m3-analysis-clip.wav)

All my source files are available for download at the end of this document.

## Analysis

Based on a quick look at the waveforms zoomed all the way in, the audio extracted from the video appears to be a true stereo recording. Having two tracks of the same audio will confuse frequency analysis because a stereo microphone uses two separate recording sources. These two sources record different audio reflections, based on the direction and orientation of each microphone. To mitigate this, we'll split the stereo tracks, then select one for analysis. I flipped a coin and chose the right channel.

From here, we can see that we've got a pretty decent waveform to work with. Here's the clip at full zoom:

![Analysis clip at full zoom](images/clip-for-analysis-fullzoom.png)

Based on rumors, we know the target redline RPM is around 7700 RPM, which translates to 385 Hz if we accept swamp2's Doppler compensation. A pure series of cylinder firing events should produce a clear series of pressure pulses at that frequency range. Anything distant from that range is either a harmonic or mechanical, wind, or tire noise.

We can use a lowpass filter to discard extraneous noise above 500 Hz, as we know that anything above this mark won't be a cylinder firing impulse pattern We could use a highpass filter as well, but let's see what the lowpass gets us first.

Apply Audacity lowpass: rolloff 48 dB, cuttoff 500 Hz.

This yields a much cleaner waveform, which should help our spectrum analysis significantly.

![After 500 Hz lowpass](images/clip-after-lowpass-500hz.png)

What we're left with is a much purer, almost sinusoidal sounding audio tone.

Filtered clip:[listen](audio/f80-m3-filtered-clip.wav)

This is the point at which we'll perform a frequency analysis. We can see from the waveform that we do not have uniform amplitude, which should be expected given that we're dealing with real world audio. The audio appears to have a dynamic range of around 1:2 to 1:3. We'll look at Hamming and Hanning windowing, as they both represent a good balance of dynamic range and frequency resolution. They're also a good fit because we've used a lowpass filter to restrict our frequency range to 0-500 Hz; the lower boundary actually being much higher than 0 Hz, as video recording equipment bottoms out well above 0 Hz.

Note: I find the plots easier to read without the grid lines, but I've provided both with and without in the download.

### Hamming window

![Hamming window frequency analysis, log, no grid](images/hamming-nogrid.png)

### Hanning window

![Hanning window frequency analysis, log, no grid](images/hanning-nogrid.png)

## Results

Hamming produces a peak at 325 Hz, and Hanning at 327 Hz. It's worth noting that, although I didn't show it here, using a Rectangular windowing function also resulted in highest amplitude peak around 330 Hz. I also performed analysis on the unfiltered audio, which showed similar peaks (but with more noise, obviously).

I'll be generous (to the max RPM) and use 330 Hz as the authoritative result, because of the increased resolution of rectangular window functions.

Using the same [Doppler compensation](http://www.wolframalpha.com/input/?i...370Hz%2C+90mph) figures (90 MPH), we can derive that the source frequency was around 370 Hz. This translates to 7400 RPM.

## Comments

While I found this analysis interesting, I believe there are too many confounding factors to treat the results of this sound analysis as anything more than a very broad estimate. Even if I were to stand firm that my analysis were somehow more robust than the others done here, there's no guarantee that this is the redline (maximum) RPM of the new M3. It should be noted that the vast majority of turbocharged engines deliver maximum performance when they are shifted short of their redline RPM.

## Downloads

You can download a zip file containing all images, audio files, and Audacity source files, as well as the Markdown source file for this write-up in [this 2.6 MB zip file](download.zip).
EDIT: Removed the spectrogram attachment, because it makes the thread so wide. Just download the Audacity files and have a look for yourself.
__________________
His: 2019 R1250GS - Black
Hers: 2013 X3 28i - N20 Mineral Silver / Sand Beige / Premium, Tech
Past: 2013 ///M3 - Interlagos Blue Black M-DCT
Past: 2010 135i - TiAg Coral Red 6MT ///M-Sport

Last edited by bradleyland; 07-26-2013 at 03:33 PM.. Reason: Fuck that attachment
Appreciate 0