Issues understanding the running average block
Hello thank you for taking your time to read my issue,
I am attempting to design a logic flow to distinguish between two signals of the same amplitude (Value = 1.0):
A sustained pulse with a duration of 1 second.
Short peaks/transients with a maximum duration of 200ms.
I have been testing the "Running Average" block to differentiate these based on their average energy. However, I am encountering a significant trade-off regarding the time constants:
With a Fast Attack (High TC): The block reacts too quickly, causing the 200ms transient peaks to reach a high value, making them indistinguishable from the valid 1s pulse.
With a Slow Attack (LOW TC): The filter takes too long to reach the steady state. By the time the output stabilizes, the 1s signal has already ended or is near completion, preventing a reliable detection threshold.
I am looking for a block or a configuration that allows for asymmetrical dynamics. Ideally, I need a behavior characterized by:
A low "rms TC" to " filter out" the peaks.
A high "decay" parameter to decend quickly when signal is absent.
Does the ADI library offer a specific block better suited for this duration-based discrimination, or is there a way to configure the existing averaging/envelope blocks to reach what i'm looking for ?
Audio Signal Processors
adau1452
software
running average
adau1452 eval board
Sigmastudio 4.5.1
sigmastudio
SigmaDSP Audio Processors
Show More
Hello lsmail115,
I do not think I fully understand the problem you are having and this pulse signal. So I am going to add a few projects here but I think it will take some more work to find what you need.
So a sustained pulse verses a shorter transient pulse?... Hmm...
This project is for the ADAU1442 DSP core but I did a peak detector and then a threshold it had to surpass before switching over. I do not expect this to be the answer.
However, if you have been using only the "running Average" block then I suggest you switch over to the Peak or Peak Accurate envelope generators. They also have some with an external decay input which might be handy.
1537.ADAU1442 Threshold Signal Swtiching.dspproj
So give that a try and experiment with the settings. You should be able to make this work.
Dave T
Please log in to reply.


