RMS and peak limiters, latency/look ahead

Hi

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,

Kim



Info.
[edited by: HifiDSP at 7:03 PM (GMT 0) on 19 Jul 2020]
  • 0
    •  Analog Employees 
    on Aug 25, 2020 2:50 PM in reply to HifiDSP

    Hello Kim,

    I think the issue you are seeing is the fact that the IIR filter is being calculated as a 5.23 number. So your numbers are really small and it will get down into the noise floor much more quickly. 

    Usually it is best to calculate the power using an RMS envelope generator. This does two things. It squares the input and then gets a running average of the squares. So you can take the output and get the square root to obtain the average power over the length of time of the time constants. So by adjusting the TC and the Decay you can roughly model the heating curve of the voice coil over time. 

    I don't know if this is readable. 

    This project also increases the gain of the input signal by 18dB to bring it up out of the noise floor. 

    This example was from a program for the ADAU1452/1467 which has more headroom than the ADAU1442. 

    Are you committed to using the 1442? The ADAU452 would be a much better part to use for this application and costs less. 

    We also have a speaker protection algorithm but it only runs on the ADAU1452/1467 family of parts. Plus, it does require I/V feedback. 

    Dave T

  • 0
    •  Super User 
    on Aug 26, 2020 9:15 AM in reply to HifiDSP

         Hello Kim and Dave,

         The IIR filter's b1 coefficient works out to about 2^(-35).  This is way too small to represent in any SigmaDSP, which are 5.23 or 8.24 fixed point (double-precision refers to the calculations, not the coefficients).  I'm not familiar with MATLAB but it likely runs floating point math.

         Dave's graphic is quite readable if you click or tap it, opening a magnified view.  As he said, the ADAU1452 is more suitable for calculations like these.  In addition to more headroom and resolution it features far better square root and divide algorithms.  The ADAU1452's superior divide algorithm also permits use of an implicit RMS calculation, which is more accurate than the stock RMS block.  The AD636 RMS to DC chip used this clever math back in the 70s and it's still around today.  For an example of implicit calculation in a SigmaDSP, see this thread.

         Best regards,

         Bob

  • Hi Dave,

    I think the challenge is to model the heating of the voice coil sufficiently accurate. The biquad (thermal model) does that but then there is the finite precision issue. One way to reduce this issue is by running the biquad at a much lower sample rate but I do not see how that is possible in SigmaStudio (at least using ADAU1442).

    From the begining I considered two options:
    1) To use the biquad to predict the temperature and apply limitation based on the temperature estimate. A straight forward solution until I discovered the finite precision issue.
    2) To use Sigma DSP standard RMS and peak limiters. I then need to find the combination of RMS and peak limiters and time constants needed to provide a fair match to the thermal model.

    Because of the biquad finite precision issue I am looking at option 2), using Sigma DSP RMS and peak limiters. I started out with rather conservative settings for an RMS and a peak limiter based on the spreadsheet from Park Audio.
    I see two challenges by using limiters:
    1) The thermal model (biquad) tracks the current temperature taking into account both the voice coil and magnet. If the voice coil temperature is already 100 degrees C, the driver will not be able to handle much power for a very long duration. If the voice coil and magnet are cold, the voice coil will be able to handle much power for a longer duration. It takes very long to heat up the magnet. This behavior might be difficult to imitate by using RMS and peak limiters.
    2) By looking at the thermal model curve I can see that the driver can handle 8W for 100 seconds without raising the voice coil temperature by more than 100 degrees. However, the driver can only handle 2.5W power long term. So I will need two RMS limiters with different thresholds and different time constants to roughly imitate this.

    No matter the solution used, I need to check that the temperature stays within desired limits. My previous post was about testing the solution by monitoring the estimated voice coil temperature as different stimuli are applied. I just thought it would be practical to monitor the temperature directly in SigmaStudio. However, I will use SPDIF out to transfer the output signal to my PC so that I can do the analysis in Matlab.

    For this project I am committed to using ADAU1442 but for future projects I will look into newer DSPs.
    I have looked at eval-ssm3525z but I cannot find much information about how I can use it and which DSPs support the speaker protection algorithms.
    It would be great if you could send me some more information about how to use eval-ssm3525z and how I can combine it with other evaluation boards.
    Like, do you have a complete kit? And how can I get V/I data out from the eval-ssm3525z board? Do your algorithms support nonlinear compensation or only speaker protection?

    /Kim

  • Hi Bob,

    It is a bit embarrassing but sometimes I forget that the ADAU1442 is using fixed point and that the coefficients are only 28 bit. Matlab uses double precision float.

    Can you think of any way getting around the problem?

    If I could run the filter producing the temperature estimate at a very low sample rate, I think it could work, as the coefficients become larger.

    Would it help anything to scale up the b coefficients and scale the biquad input signal down? It does not matter if the input power signal loses some precision.

    Or what happens if I scale up the b coefficients, do not scale the biquad input down but scale the biquad output signal down? Would there be internal wrap around or saturation in the biquad?

    /Kim

  • 0
    •  Analog Employees 
    on Aug 26, 2020 6:00 PM in reply to HifiDSP

    Hello Kim,

    I will get someone else involved that did work on our speaker protection product. 

    One other thing, the ADAU1452 and similar products has the ability of having threads that run at a lower sample rate so you certainly could run a filter at a lower rate in the new processors. 

    You are correct that accurate measurements of the coil and magnet temperature is a difficult problem to solve. 

    Dave T