-
Notifications
You must be signed in to change notification settings - Fork 5
Signal processing
A signal is detected if a detection variable exceeds a certain threshold above background (noise) . There are three operations to be carried out.
- Extraction of detection variable
- Background noise estimation.
- Determination of detection threshold
A simple detection variable of sound is the power of the signal (i.e. amplitude squared). When batch processing is done, as with Teensy, and one is only interested if there is a signal in the 128 samples of an audio block, then the detection variable is conveniently chosen as the maximal power value inside the audio block.
detVar = max(x[ii].^2, ii=0:127)
Background is typically the mean value of the detection variable in absence of a signal. An exponential average is a convenient way to estimate the background noise. The length of the exponential history is characterized by an averaging window
noiseEst = (noiseEst*window + (mean(xx[ii].^2, ii=0:127) – noiseEst) ) /window
To suppress the influence of a signal on the averaging, it is custom to choose a very large window during the presence of a signal. The selection of the size of a smoothing window in absence and during presence of a signal, is data dependent and requires some experimentation.
The detection threshold describes the value by which the data must exceed the background noise to be classified as signal. Its value is typically obtained by choosing an acceptable false alarm rate, that is, in absence of a signal the detector is only allowed to fire seldom (low false alarm rate). The selection of detection thresholds is data dependent and requires experimentation. Note, a very large detection threshold, while eliminating false alarms, my miss existing signals.
WMXZ Environmental micro Sound Recorder (c) 2018