RMS and peak limiters, latency/look ahead


It seems that the RMS limiter does not introduce any signal delay. Is that correct?

What window length is used when the RMS value is calculated/how is the RMS value calculated?

When adding the limiter output and the inverted input signal, the signals cancel when the input signal is far below the limiter threshold. As the signal gets closer to the threshold, the signals do not fully cancel but the limiter still has its "active flag" to zero. I.e. the limiter degrades the signal unless far below the set threshold even though the limiter is not "active". Is it because the limiter does a gradual transition? 

Is it also true that the Peak limiter does not delay the signal? I.e. that it has no lookahead? I think I can implement look ahead by using a delay block.

I am using Sigma Studio 4.5 and ADAU1442. The RMS limiter has the parameters: RMS TC (dB/s), Decay (dB/s), and Threshold (dB).

Best regards,


[edited by: HifiDSP at 7:03 PM (GMT 0) on 19 Jul 2020]
  • 0
    •  Analog Employees 
    on Jul 22, 2020 7:56 PM 9 months ago

    Hello Kim,

    There is no delay going through the limiters. The SigmaDSPs run the entire program during one sample period. So the current sample goes into the limiter, the sidechain is calculated to determine the gain factor to apply to the audio then the current sample is multiplied by the gain factor to produce the resulting sample. So it all happens during the current sample. 

    The peak compressors will react to a peak during the current sample so no need to add a delay to look-ahead. Now with the RMS compressor/limiters there is an attack time. For those dynamics cells you could do a look-ahead but in some ways the slow attack is the sound that is desired. You have the flexibility to do either. In the analog world you cannot do the instantaneous peak limiting. 

    The RMS time constant is derived with this formula:

    Tc = 1.0- (10^ (dBps / (10*fs) ) )

    dBps = dB per second that in entered in the GUI

    Tc = Time Constant that is entered into the DSP parameter memory location

    fs = sampling rate

    So the audio comes in, the absolute value is then taken and the peak will be tested against the current peak. If it is greater then this new one is now the peak, if it is less then the old peak remains. Then the Tc is applied to the current peak and then that result goes into finding the gain factor from the table to apply to the audio. There are more details but this is a quick explanation. 

    The Decay is calculated using this formula. 

    Release = dBps / (96*fs)

    Regarding the gradual gain change, Yes, some of the compressor/limiters have a soft knee point or have a button to choose this. 

    You may also be reaching the threshold earlier than you think. Also, keep in mind that the meters in SigmaStudio read 3dB lower. A 0dBFS signal will read as -3dB. 

    Threshold is done by changing the gain factors in the table of gain factors. Basically they are moved up or down the table to move the threshold point to a different input level. You can also implement this using a volume control for limiters with external detector inputs. It is simpler than writing all new compressor gain table. 

    Dave T

  • Hello Dave,
    Thanks for the explanation.

    Your formula for TC confuses me. I assume TC should be the window length in seconds. Inserting 50 dB/s I get:
    1.0-(10^(50/(10*fs))) = -2.3988e-04
    BrettG provided this formula:
    TC(ms) = 20/(dbps *ln(10))*10^3
    20/(50*ln(10)) = 0.1737 [seconds]

    I hope it is okay, if I tell about the problem I am trying to solve.
    I am working on an active surround system with DSP XO two-way speakers and multiple subwoofers. Given the combination of drivers, DACs and PAs ensures that for normal music (crest factor > 6 dB), I thought the speakers should not be able to overheat and worst-case displacement should be below XMax, not close to Xmech. Therefore, I had not yet added RMS and peak limiters for power and displacement limiting.
    However, someone played around with Parametric EQ in Sigma Studio and suddenly there was a very loud high frequency note. I believe a biquad became unstable (bad coefficient transfer) and caused the output to exceed full scale. In the Sigma DSP, the signal can go up to +24 dB but the DACs only output up to about +3-4 dB. It took the person perhaps 30-40 seconds to shut down the power amplifiers and that was too long. The front channel tweeters overheated and one of them was destroyed.
    This incident has made me aware of two things:
    1) For the Sigma DSP and DAC (AD1938) combination, the Voltage output can exceed full scale, it does not clip unless digital signals exceeds +3-4 dB.
    2) The tweeter power handling is 250W peak, 100W long term (1 minute on, 2 minutes off etc.), IEC-5 with a high pass Butterworth 2nd order filter at 2500 Hz. IEC-5 power handling is for a pink noise signal (6 dB crest factor) AND the high pass filter. For a sine wave the crest factor is only 3 dB. If a high frequency sine wave is reproduced at a high level, a lot of power is put into the tweeter. The tweeter will be able to handle far less than 100W for a sine wave (and way less DC power, ~5W I have read). Therefore a tweeter can easily be destroyed by playing a wave signal at a high level.

    I think the solution is to use limiters to protect drivers and our ears from high frequency waves. The limiters should turn all the output signals for all drivers in all speakers down simultaneously. This I can accomplish by creating a side chain with an RMS limiter for each driver, find the minimum limiter gain value and scale all driver signals by this value. In this case, I believe it is sufficient to monitor the tweeter signals only. However, it is vital that the audio quality is not degraded, hence all the questions about the limiters.

    Best regards,

  • Hi Kim.

    There are various ways to protect a transducer coil from overheating. The safest is to make sure the amplifier max Vout is low enough in order to work in a "safe power zone" independently of the signal you feed it. Of course, you will not exploit your speakers fully, but you'll stay safe, whatever the signal you throw at the amp.

    I've seen a bunch of other methods. Mostly compression/limiting, but it is not perfect.
    One smart way I've seen was on some Electro-Voice subwoofers. They actually had a kind of simulation of the coil temperature and were adjusting a compressor according to this simulated temperature. I think it is called Voice-Coil Protection or something like this. That could be another way to go about protection.

    Now, My guess is that you are designing something for the consumers market right? Or is this intended for professionals? If you need the 'Wow' factor and to push the boundaries, then yes, multiple compression and limiting stages are the way to go. Compression and limiting for the global sound right after DSP input, and compression and limiting again before each amplification channel. That way you have control over the total spectrum power and the power of each frequency band. Avoid making any band sidechain another. There is just no point in doing this as you already can compress and limit the whole spectrum beforehand.

  • Hi CopperMaze,

    Thank you for the input. Yes, it is for the consumer use and I do not expect the system to be operated at max output levels very often.

    I think the IEC-5 long term power test signal is pink noise with a 2nd order Butterworth high-pass at 40 Hz and 2nd order Butterworth low-pass at 5000 Hz. The difference in RMS value of an IEC-5 pink noise signal, with and without the 2nd order Butterworth high-pass at 2500 Hz, is about 8 dB.
    (10^(-8/20))^2 = 10^(-16/20) = 0.16
    If the math is right, the tweeter itself can only handle 16% of the specified power. So, the tweeters can handle 16W long term and 40W short term.

    If I had VI-sensing available, I could make a very accurate power limiter but maybe a limiter with no feedback can be almost as good. I googled the Electro-Voice products and it seems they are using a proprietary "Peak Anticipation Limiter" with parameters that are matched to the drivers. Since I know the drivers in my project and can measure any parameters needed, maybe I could make a custom power limiter in the future. For now, I will stick to using the SigmaStudio RMS limiters. I have found a good document at parkaudio.au that describes what settings to use for the Sigma Studio limiters. It is called "Limiters – how and why to use them" and the file is named Limiter_UM_en.pdf
    The document gives good starting points for the parameters. As the tweeter short term power is 40W, I am going to use a peak limiter in case the signal goes above fullscale (as power goes above 40W). Based on the document and spreadsheet, I got the RMS limiter settings:  TC 250 dB/s, Decay 10 dB/s and threshold -12 dB. The RMS limiter is followed by a peak limiter with these settings: Hold 1 ms, Decay 812 dB/s and threshold 0 dB.

    Any advice on choosing better parameters values is welcome. Perhaps by finding the thermal resistance of voice coil and magnet, Rtv [K/W] and Rtm, and thermal capacitance of voice coil and magnet, Ctv and Ctm [J/K], better settings can be derived. I will start out asking the driver manufacturer for recommended settings.


  • To test the temperature limiter, I want to simulate the voice coil temperature with and without the limiter. I have a second order thermal model that predicts delta voice coil temperature from input power. Since the model is only second order, it can be simulated by a single biquad.

    I could record the digital output and process the data externally but I was hoping that I could use the "graph" in SigmaStudio to monitor the simulated voice coil temperature. In its simplest form, I tried a double precision biquad:

    I simulated 1 W DC input power but the graph and the value in the continuous readback field are not right. The value reaches a plateau (9.17 deg C) that is far lower than what I see in Matlab (~44 deg C after an hour):

    Using "simulation stimuli" and "simulation probe", I verified that the frequency responses of the filters look quite similar:

    In Matlab, I tried using the rounded coefficients you see in the "IIR coefficients" window but that only produced a small deviation in the output.

    As described, the DC-gain of the filter is about 44, so the max output will not fit in Q5.23. I used Q12.16 as input format (but also tried other formats), so that I could specify much greater powers than 1 W. 

    I suspect the problem has something to do with rounding. Is the output reaching a plateau because the DSP has lower precision than Matlab and the feedback contribution in the biquad "dies out" after a while or something like that?

    Is there anything I can do to improve precision or maybe there is something related to the Qx.y formats that I have overlooked?