Noise Cancellation with Audacity

Ask questions relating specifically to the PicoDiagnostics NVH equipment and software here.
Post Reply
Steve Smith
Pico Staff Member
Pico Staff Member
Posts: 815
Joined: Sun Aug 25, 2013 7:22 am

Noise Cancellation with Audacity

Post by Steve Smith » Wed Apr 08, 2020 3:14 pm

Following on from Ben’s excellent forum post here https://www.picoauto.com/support/topic22135.html I wanted to share the noise cancelling feature of another audio software suite called Audacity which can be downloaded here https://www.audacityteam.org/download/

Ben has referred to Sonic Visualizer (https://www.sonicvisualiser.org/) in his forum post which is an excellent audio software suite we both use for Heat Maps/Spectrum views when interpreting noise.

The reason I mention Audacity here is because of this video describing how to remove unwanted “noise” from an audio capture https://www.youtube.com/watch?v=10FFKl_0GSA

I am sure Sonic Visualizer has the same facility, but for now I want to share how the Audacity noise cancelation feature could be helpful with NVH

Long story short, I am sitting on an airport bus listening to a transmission /differential whine as we are transferred to the terminal

I take out my mobile phone and record approx. 40 seconds of the whine noise. (I know, I should get out more!)

The format of the audio on my mobile had to be converted to .wav format in order to import into our NVH software. This process is described here https://www.picoauto.com/support/post93381.html#p93381

Here is the mobile phone recording converted to .wav format
Bus Whine uS.wav
Bus Whine US.WAV
(7.24 MiB) Downloaded 46 times
Listening on headphones to the playback; from approx. 0..10 seconds and 27..37 seconds you can hear the whine noise

Here is how the whine noise looks when imported into NVH
IMAGE 1.png
Image 1
We can see above that when the whine is present, we have a clear peak of 375 Hz which could relate to a tooth contact frequency within the transmission/differential. To confirm, we need the transmission ratios, tooth counts, tyre size and road speed, all of which I don’t have given this was not a customer complaint and I should have been in holiday mode!

Tooth contact frequency?:

Think of a differential crown wheel with a poor or worn “finish” on each tooth. Each time a crown wheel tooth makes contact with a pinion tooth noise may well be generated. The speed/frequency of the crown wheel will be T1 (Wheel speed) Assuming our crown wheel has 47 teeth rotating at a frequency of 8 Hz, 8 Hz x 47 = 376 Hz tooth contact frequency.

Whilst tooth contact frequency requires both rotational speed and tooth count (as demonstrated above) the above values used are purely hypothetical

So how can Audacity help?

Well, lets take a reference waveform of the above capture by using the right click feature within the Frequency view
IMAGE 2.png
Image 2
Using Audacity, we can remove a period of the audio where no transmission whine could be heard (approx. 11..26 seconds) This noise is not required and hinders the identification of our offending frequency)

Download the file “Bus Whine uS.wav” above

Open Audacity, click on File and select “Bus Whine uS.wav”, on your PC this will import the mobile phone recording

Left click on the imported waveforms in Audacity and drag from around 11 to 26 seconds
IMAGE 3.png
Image 3
The selected area above will used as “unwanted noise” to remove from the entire capture

Now Click on Effect > Noise Reduction > Get Noise Profile
IMAGE 4.png
Image 4
Here Audacity will learn what to filter from the entire audio capture
N.B. When clicking on Get Noise Profile above all the noise reduction windows will close.

Now select all the entire waveform using the Ctrl and A keys simultaneously and once again click on Effect, but now select “Repeat Noise Reduction”
IMAGE 5.png
Image 5
The noise captured in selected area of Image 3 above will have been removed from the entire capture. Now select File > Export > Export as WAV and save to a location on your PC
IMAGE 6.png
Image 6
Here is the same mobile phone recording above but now with noise cancelling applied
BUS WITH NOISE CANCEL.wav
Bus with Noise Cancel
(6.65 MiB) Downloaded 41 times
nce again, the above file can now be imported for visualization into our NVH software and compared to the reference waveform created in Image 2 above
IMAGE 7.png
Image 7
As we can see, the offending peak (present when the whine occurs during playback) can be seen with a defined ramp either side of a clear peak at 375 Hz. The playback through NVH is the real winner here as the whine is far more pronounced and easier to define when using headphones.

The above is only example, cabin noises spring to mind where cabin boom from tyres etc. could be removed to reveal the customers offending noise (squeak, creak or whine)

I hope this helps, take care……Steve

martinr
OneWave
OneWave
Posts: 33
Joined: Tue Mar 06, 2018 4:06 pm

Re: Noise Cancellation with Audacity

Post by martinr » Mon Apr 20, 2020 1:52 pm

Damn it, Steve: what a disappointment. I was reading through your post with increasing anticipation that it was going to lead to a method of cancelling out the “customer offending noise” in the form of a whine coming from the passenger seat, or, to be precise, the occupant of the seat.
Last edited by martinr on Mon Apr 20, 2020 2:10 pm, edited 1 time in total.

Steve Smith
Pico Staff Member
Pico Staff Member
Posts: 815
Joined: Sun Aug 25, 2013 7:22 am

Re: Noise Cancellation with Audacity

Post by Steve Smith » Mon Apr 20, 2020 2:01 pm

Well Martin, if the whine (from him or her) is continuous and falls in a specified frequency range, then perhaps there is still hope we can remove this "Offending noise"!

That would be a miracle which no doubt takes a little longer than the impossible.

Take care.....Steve

martinr
OneWave
OneWave
Posts: 33
Joined: Tue Mar 06, 2018 4:06 pm

Re: Noise Cancellation with Audacity

Post by martinr » Mon Apr 20, 2020 2:12 pm

I just thought it would be easier than fitting a James Bond ejector seat; it’s the one thing I can’t find on ebay.

I was really after real-time noise cancellation.

Post Reply