I am looking into detection of pressurized gas leaks by means of the broadband hissing sound (white noise) generated from pressurized leaking gas. The instrument will have a broadband microphone followed by a high pass filter to filter away all low frequency audible noise below 15-20 kHz, but when broadband noise from leaks occure, they will pass the filter and activate an alarm. The problem is that in noisy industrial environments, machines (compressors), and other equipment will also have some ultrasound components above 15-20 kHz, and it will do false activation. Is it possible to recomend optimal DSP algoritms to be used, after the raw 15-20 kHz filtering to do a efficient suppression of machine made background noise, without affecting the sensitivity for the leak noise? I cannot tolerate varible gain for the leak noise (white noise) because then it will affect the sensitivity to detect leaks in a predefined distance, so the system must automatically suppress unwanted industrial background noise, but not affect the sensitivity to the leak noise (white noise in frequency range 20 kHz to 50 kHz).?

I would say that the main difference between leak noise i want to detect (the broadband white noise) and the machine noise is that the leak noise is just plain white noise, while very often the machine noise will have some components of high frequency reprocicating noise pattern in it from highspeed running compressors which the white noise leak noise do not have, but the high frequency reprocicating background noise can vary in frequenct from machine to machine so I do noy want to use some kind of fixed notch filter, so I am locked to one machine, at one rotation speed. Actually the problem is that the machines main noise frequency will be belos the 15-20 kHz, but it is the harmonics that repeat itself up above 15-20 kHz, and it is those I need to have filtered away. Seen from a more practical point of view, my own ears will be able to hear the difference, so I woundered if that could be realized in a electronic filter too.

  • $\begingroup$ Well there's no way to filter out everything from 15-20 kHz while also keeping everything from 15-20 kHz. You have to be more specific about the characteristics of each signal. Is the machine noise only at certain frequencies that you can notch out? Do those frequencies change over time? If the machine noise is also wideband, can you measure it with a nearby microphone and then remove that signal from the far microphone? etc. $\endgroup$
    – endolith
    Apr 15, 2016 at 19:04
  • $\begingroup$ Do you need to detect just the onset of a leak, or do you need a continuous output that says "leak sound at volume X." $\endgroup$
    – JRE
    Apr 18, 2016 at 14:34
  • $\begingroup$ Well, basically I just need to indicate leak/no leak. In the meantime I want my device to cover a certain area for leaks, a radius around my device, and the greater distance between leak and device, the lower sound level recived by my device, and thereby, the worse signal/noise ratio for the DSP to handle. In other words, I do not need to indicate dB level from the leak sound, I just need to indicate leak/no leak, in the longest distance between leak and device i can get. $\endgroup$
    – mtolesen
    Apr 20, 2016 at 10:16
  • $\begingroup$ You could get a high gain microphone and pointed in the direction where you expect leaks to come from. Simultaneously collect ambient noise with a microphone with a more isotropic directivity. At this point you could use some very basic adaptive cancellation techniques. $\endgroup$
    – dsgrnt
    Sep 30, 2017 at 20:18

1 Answer 1


One way to do this is to look at modeling your signal: $$ x[n] = x_h[n] + x_n[n] $$ where $x_h$ is the hissing sound and $x_n$ is the noise.

If you can say that $x_n$ is modeled as: $$ x_n[n] = \sum_{k=K_1}^{K_2} a_k \sin(k\omega_0 n + \phi_k) $$ where $K_1$ is the lowest harmonic of frequency $\omega_0$ that makes it through your high pass filter, $K_2$ is the highest harmonic, $a_k$ is the amplitude of the $k^{\rm th}$ harmonic, $\omega_0$ is the fundamental frequency and $\phi_k$ is the absolute phase of the $k^{\rm th}$ harmoninc.

Then you can estimate $(a_k,\omega_0, \phi_k)$ by minimizing $$ \left| x[n] - \sum_{k=K_1}^{K_2} a_k \sin(k\omega_0 n + \phi_k) \right|^2 $$ to find $(\hat{a}_k,\hat{\omega}_0, \hat{\phi}_k)$ and then look at the residual: $$ \hat{x}_h[n] = x[n] - \sum_{k=K_1}^{K_2} \hat{a}_k \sin(k\hat{\omega}_0 n + \hat{\phi}_k) $$

This should allow some cancellation of the harmonic background noise, but won't be real time. There are algorithms that can do the estimation in real-time, but you're best trying this first on recorded data to see if it works.

  • $\begingroup$ Hello Peter K, Please excuse me for not writing my comment in the right place, I am a bit new here. If we look on doing the above in real time (because I need that) does that require a lot of processer power to do that?, I ask because I need this background noise suppression to be carryed out in a little industrial field device, with it's own DSP where I do not have a big PC like computer to do the realtime calculations.. $\endgroup$
    – mtolesen
    Apr 18, 2016 at 14:07
  • 1
    $\begingroup$ A PC should not be required, provided your device isn't a PIC or something really small. Try what I suggest above first, on a desktop, just to make sure it works for your data. If it doesn't work for your data, there's not much point in making it real-time / adaptive. $\endgroup$
    – Peter K.
    Apr 18, 2016 at 14:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.