Post Go back to editing

SigmaStudio signal level detection, reduce trigger time

Hello,

I found a signal level detection function in the following document site.

https://wiki.analog.com/resources/tools-software/sigmastudio/toolbox/leveldetectorslookuptables/signaldetection

However, the minimum limit of the trigger time is 2 seconds.

Is there a way to further reduce the trigger time?

 

Thanks and Regards,

  • Hello Takumi,

    Yes, you can make it faster.

    This cell was designed to be an inactivity detector. So when a signal goes over the threshold it will change the output to "0" with no delay. It is looking at the peak signal level so it will change during the same sample period that the signal goes above threshold.

    Then if there is no signal for a long time then the output will go high. This is intended to be used to power down an amplifier after a long period of inactivity. So the programmer simply thought that 2 seconds of inactivity would be fast enough so the GUI was programmed to not accept anything smaller. So the fix is to go around the GUI.

    If there is a microcontroller in the system then it can simply write a new value into the time constant parameter. In SigmaStudio you can click on the parameter's hex value and enter a new value. The only problem is if you are going to selfboot. Then the EEPROM image will come from the GUI's value for the trigger time. It will also be there for the system files output. So the system controller will have to update the value shortly after booting up and if there is no system controller then the SigmaStudio program will have to be setup to write to the parameter from within the program.

    So here are some examples:

    So in this example the time_constant parameter is located at address 89. I had the GUI set for 2 seconds so the value in the memory is 96000 which is two seconds of samples. So simply change this memory location to the number of samples you would like to have for the trigger time.

    Here is where I clicked on the Hex value field and entered 24,000 which is 500ms at 48K fs.

     

    Keep in mind that this time is an approximation since the audio level has to decay to be below threshold. I do not know if there is a time constant or if it only detects the peak. My experimentation it seems that it does not accumulate the envelope of the signal and only looks at the peak value. So this means that if the trigger time is really short and the input signal is a very low frequency, then the trigger can toggle during each cycle of the sine wave. So if this is set too fast it might cause some unexpected behavior for low frequencies.

    So if you are self-booting and need to have the DSP update the parameter itself. Then use the Parameter Update cell that is located in the DSP Functions library.  Once you compile the project then you can select the parameter to update to the value in the DC cell. 

    Here is what I had set the update cell value to.

    Dave T

  • 0
    •  Analog Employees 
    •  Super User 
    in reply to DaveThib

    Hello Everyone,

    I just realized that the Sigma300 algorithm for Signal Detection is different than the ones for the Sigma200 and Sigma100 parts. 

    For the Sigma300, the ADAU1452/1467 families of parts, it uses number of samples for the time constant as I detailed above. 

    For the 100 and 200 cores, the ADAU1701, 1401, 1761, 1442, 1787 uses a time constant formula as a leakage value to multiply by to obtain a time constant. This older post details the formula.

    ADAU1761 Signal Detection Time_Constant Algorithm - Q&A - SigmaDSP Processors & SigmaStudio Dev. Tool - EngineerZone (analog.com)

    Dave T