BrettG

Monitoring average and instantaneous signal levels

Discussion created by BrettG on Feb 26, 2010

In order to read back the instantaneous value of any signal inside the SigmaDSP core, insert a DSP Readback cell into the signal flow in SigmaStudio.

ScreenHunter_02 Feb. 26 14.13.jpg

If, for example, the readback cell is inserted next to channel 0 of the input cell of the ADAU1701, the readback will show the instantaneous value of the ADC input.

ScreenHunter_03 Feb. 26 14.14.jpg

In order to implement a readback in a microcontroller in your production system, click the "Read" button on the readback cell in SigmaStudio after compilation. A write/read sequence will be shown in the Capture window. Simply duplicate this write/read sequence in the system microcontroller in order to implement readback in a production system.

 

For some processors, such as the ADAU1701, the readback functionality is hardware-based. Hardware-based readback requires a write followed by a read.

 

ADAU1701 Readback:

ScreenHunter_04 Feb. 26 14.16.jpg

 

For other processors, such as the ADAU1781, the readback frunctionality is software-based. Software-based readback requires a read only.

 

ADAU1781 Readback:

ScreenHunter_05 Feb. 26 14.19.jpg

 

The DSP Readback cell shows the signal's instantaneous value. This is not very useful for audio signals, which are constantly fluctuating around zero. For audio signals, more useful information is the average level of a signal. To read back the level of a signal, an Envelope algorithm can be used.

 

Envelope Implementations:

 

Envelope Peak : Outputs the peak level of a signal

ScreenHunter_07 Feb. 26 14.25.jpg

 

Signal Envelope : Outputs the mean-squared level of a signal

ScreenHunter_11 Feb. 26 14.27.jpg

 

Running Average : Outputs the average level of a signal (similar to RMS)

ScreenHunter_12 Feb. 26 14.28.jpg

 

Simplified peak envelope (Uses fewer instructions - Absolute value followed by a lowpass filter)

ScreenHunter_13 Feb. 26 14.31.jpg

 

Example application - Input monitor

This example project monitors the input level and compares it to a reference threshold value. If the input signal exceeds the threshold, the GPIO output (and DSP readback cell) will display "1". This essentially informs the user if an input is "active" or "inactive."

ScreenHunter_15 Feb. 26 14.37.jpg

 

Basic Level Detectors for Debugging Purposes:


SigmaStudio also contains a level detector algorithm folder for simple debugging purposes.

ScreenHunter_02 Jul. 19 15.07.jpg

 

These algorithms can be inserted into the signal flow and they will read back the signal level without affecting the signal in any way.

ScreenHunter_01 Jul. 19 15.07.jpg

 

Level Detectors Integrated into Existing Cells:


Some cells contain level detectors built into their control GUIs.

 

For example, the Standard RMS and Standard Peak compressors contain level meters.

Here is their location in the library:

ScreenHunter_03 Jul. 19 15.12.jpg

By clicking on the blue icon in the center of the cell, the GUI can be displayed.

 

ScreenHunter_04 Jul. 19 15.13.jpg

ScreenHunter_05 Jul. 19 15.13.jpg

After compiling and downloading the project, the level meters will display on the right side of the GUI when the Level Indicators button is activated.

 

Message was edited by: BrettG - 120719 Added description of level detector cells, added compressor level indicators description

Message was edited by: BrettG - 100301 Clarified DSP readback initiation in SigmaStudio

Outcomes