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
    •  Super User 
    on Aug 27, 2020 12:51 PM in reply to DaveThib

    Dave, it's really a great idea to get your speaker protection engineer / programmer involved.  And the -1452's ability to run a lower sample rate subsystem can sure come in handy.  Someday I'll have to experiment with running a NLMS adaptive filter at 8 KHz -- I could never get it to work to my satisfaction at 48K.

         Kim's frequency and time graphs above both show essentially a first-order response -- a 6 dB/octave slope and a "RC" curve respectively.  Also the description of coil and magnet heating suggests that we could model the heating with the sum of two first-order filters -- a slow filter for the magnet and a faster one for the coil.  To do this we would need their scale factors and corner frequencies, four parameters total.  If the research can provide these, we're in business.

         Could such filters work with 5.23 fixed point?  Well, yes -- we can use the scheme shown below, which only works with first-order LP filters of unity DC gain (the filter's two coefficients must sum to one):

    The sine oscillator and Value-Cross blocks produce a 48 pulse per second clock.  This gates the filter's input -- which otherwise sees its own output, freezing time.  Thus the filter runs at Fs = 48 Hz!

         I attempted to duplicate the time graph's general shape, with a rise time of about 1100 seconds.  Using the formula f = 0.35 / T, this works out to f = 0.000318 Hz.  The coefficients shown are for a unity gain first-order filter of this corner frequency at Fs = 48 Hz.  I'm using a General Second-Order Filter with first-order coefficients because the stock First-Order Filter is single precision.

         Running this on a ADAU1701 because it also uses 5.23 math, here's the output time response with the constant one input -- obtained by manually taking readings and entering them in a spreadsheet:

        And one more crazy idea -- if you can actually estimate the thermal rise within your SigmaDSP, why not adapt this signal to modulate a compressor's external input for speaker protection?

         All this is audio in the fast lane -- as far as I can tell, this device just works fine:

         Best regards,


  • Thanks Bob. I really appreciate your help.

    About your idea - is it not what I am already trying to do in 1)? Use a model to predict the temperature and use a limiter to lower the gain if the desired max temperature is reached?

    I like vintage speakers. What speaker is it that is shown in the picture?

    I need to consider that the trick only works for 1st order filters where b0-a1 = 1 and b1 = 0.
    The analog transfer function of the thermal model is second order but b0A is zero and a2A is 1:
    H(s) = (0 + b1A*s + b2A*s^2] / (a0A + a1A*s + 1*s^2)
    After bilinear transformation none of the coefficients are zero.
    As the second order filter has real poles, I can split it into two first order filters (cascaded). Unfortunately, in these filter b1 ~= 0, so I cannot apply the trick.

    You suggested that I could use the sum of two 1st order filters. If I sum two first order filters of the form b0_1/(a0_1+a1_1*z^-1) where b1_1 = 0, I end up with a 2nd order filter of the form (b0+b1*z^-1)/(a0+a1*z^-1+a2*z^-2). In this 2nd order filter, b2 = 0, which is not the case with the 2nd order filter I am trying to split into 1st order filters. So it seems that it is not possible to replace the 2nd order filter by the sum of only two 1st order filters in this case.

    Using partial-fraction expansion, I might be getting somewhere. I get a transfer function of the form:
    b0_1/(a0_1+a1_1*z^-1) + b0_2/(a0_2+a1_2*z^-1) + K
    I.e. a combination of two 1st order filters having b1 = 0 plus a constant. In the time domain, the total output will be the sum of the output of the two 1st order filters plus the input scaled by K.
    I will try to get it to work.


  • 0
    •  Super User 
    on Sep 1, 2020 8:57 PM in reply to HifiDSP

         Hello Kim,

         The vintage radio is a Regal Autodyne five-tube design, c. 1946 -- similar to later AC/DC radios of the 60s except for its wooden case, huge IF transformers and octal tubes.  I found it on eBay.  Its seller had restored it (basically replacing all the capacitors) so it appears to work as well as can be expected.  It doesn't get many stations where I live.

         Sorry it was my understanding that you were undertaking the filter calculations to test your limiters and such, as opposed to closing the loop with the estimated temperature rise.  The two first-order filters I mentioned would run in parallel from the same input, only their results suitably scaled and added together to obtain the final temperature rise.  I'm afraid that the math of combining the filters goes over my head, so it's unlikely I could be of additional help.

         Best regards,


  • Hi everyone,

    I guess this thread ended up quite different from the original subject. A great thanks for all of your replies.

    I discovered a serious bug in the ADAU1442 Parametric EQ graphical user interface. You can set the center frequency for a filter higher than fs/2, and then you might get an unstable filter.

    I can confirm that a parallel combination of filters+gain worked for me, like this:

    However, the sample rate has to be very low, 48 Hz is suitable, in order to provide accurate output. I.e. the power input signal must only contain frequencies lower than 24 Hz. The RMS envelope from Bobs example takes care of this. Care also has to be taken to scale the power input down, so it is not clipped at the Q5.23 upper limit of ~16 (if the input signal exceeds fullscale). The input has to be scaled so much down that the output temperature is also not clipped. It is a good idea to do lots of testing.

    Another problem with the thermal model approach is that the initial temperature when turning on the DSP is unknown because we do not have VI-sensing. If the DSP is turned off when voice coil is very hot and then on again immediately, then the protection does not work.

    Best regards,