The most recent version of this page is a draft.DiffThis version (03 Dec 2012 22:46) was approved by William Jahn.The Previously approved version (12 Jul 2012 16:09) is available.Diff

This is an old revision of the document!

Signal Detection

Click here to return to the Basic DSP page

The Signal Detection algorithm is a cell that will output a flag once no signal has been present at the input for a given amount of time. The “Threshold” setting will determine the value the input is compared to in order to determine whether or not a signal is present. The “Trig Time” setting will determine how long, in seconds, the cell will wait to output the flag. The peak of the signal is detected, not the RMS value.

This flag can be used, for example, to alert a microcontroller that no audio signal is present in the signal chain, which could then allow the microcontroller to power-down unneeded parts of the system.
It is important to note that the “Trig Time” setting is an approximation. It will take some experimentation to find what value is right for a given application.

Input Pins

NameFormat [int/dec] - [control/audio]Function Description
Pin 0: Inputany - anyInput signal that will be compared to the threshold value

Output Pins

NameFormat [int/dec] - [control/audio]Function Description
Pin 0: Triggerany - anyOutputs a flag after no signal has been present for a given amount of time

GUI Controls

GUI Control NameDefault ValueRangeFunction Description
Threshold(dB)-60[-150:0] Sets the value the input will be compared to. If the input is below this value for a given time determined by “Trig Time(s)”, a flag will be output.
Trig Time(s)120[2:200] sets the amount of time, in seconds, that the signal level must be below the threshold before a flag is output. This value is an approximation.

DSP Parameter Information

GUI Control NameCompiler NameFunction Description
Threshold(dB) thresholdSignalDetectAlg1 Actual value written to the DSP when the value in the “Threshold(dB) box is changed.
Trig Time(s) time_constantSignalDetectAlg1 Actual value written to the DSP when the value in the “Trig Time(s)” box is changed

Algorithm Description

The following graph shows the output (red) of the Signal Detect cell based on a given input (blue). In this scenario the “Threshold(dB)” is set to '-60' and the “Trig Time(s)” is set to '6'. Notice how the output toggles to '1' after the silence following the audio signal, based on the “Trig Time(s)” value, and then returns back to '0' once the signal reappears.


In this example, the Signal Detection cell is being used to monitor the incoming audio signal to be processed by the equalizer. If the signal on both channels falls below the threshold for the duration of the “Trig Time(s)” parameter, a flag will be output to GPIO_0. This can be used, for example, to power down unneeded parts of the system when no signal is present.

Algorithm Details

Toolbox PathLevel Detectors/Lookup Tables - Signal Detect - Signal Detection
Cores SupportedAD194x
“Grow Algorithm” Supportedyes
“Add Algorithm” Supportedyes
Subroutine/Loop Basedno
Program RAM11
Data RAM4
Parameter RAM3
/srv/ · Last modified: 19 May 2022 12:41 by ananthakalyani Sankar