ΣSigmaStudio Ask AI Русский Log in

ADAU1446 clipping algorythms

SigmaDSP & SigmaStudio Gordon Mar 24, 2010 00:00 12 replies Original on forum ↗
Subscribe
Gordon Question
Mar 24, 2010 00:00

Hi. I'm experiencing some odd results using the clipping tools. The clipping behaves as expected at low frequencies but modulates rather than clips at higher frequencies. The problem becomes perceptible at about 5/6k and is really noticeable at 8/9k as the attached scope shots show. They're both at the same settings. The top one is a stored shot with soft clipping. The bottom without the soft clipping. SigmaStudio schematic attached. This is NOT the same board I was having the CLKOUT modulation problems with. The clock on this board is stable.

Hope someone can shed some light on this.

TIA

Gordon

Audio Signal Processors

clip

soft

adau1446

SigmaDSP Audio Processors

ADIApproved Reply
Mar 25, 2010 00:00

Hi Gordon,

We are not able to re-create the modulation that you're seeing in simulation of the SigmaDSP core, so it seems not to be caused by the algorithm. We will investigate this further on the evaluation board and let you know what we see. Do you see the same thing on both evaluation boards that you have?

Gordon Reply
Mar 25, 2010 00:00

I only have the 1701 evaluation board which doesn't have the advanced clip. It only happens when the advanced clip is introduced into the circuit. Otherwise it's AOK AFAICS which makes me think the board itself is OK. Just tried it with a triangle and square wave input without the clipping and there's no 'wobble'.

Cheers

Gordon

ADIApproved Reply
Mar 25, 2010 00:00

Do you see the same thing on the multiple ADAU144x boards that you have, or is the issue isolated to this one board? Have you also tried to generate the tone in the SigmaDSP using the sine wave generator, rather than inputting the tone from an external source?

Gordon Reply
Mar 25, 2010 00:00

I reverted the previous board to using fs*256 clock output and have been unable to fix the problem. It requires lifting legs and patching in to go from one to the other and I don't think the legs will take another switch about.

Good idea to try the sine input, rules out any problems from the AD conversion. However, the problem is still there with a sine input. If there's any way to take the DA conversion out of the equation I'm all ears.

Cheers

Gordon

ADIApproved Reply
Mar 29, 2010 00:00

I'm just thinking out loud here, but hopefully it will help to move your debugging forward a bit.

Your test tone in the scope shot looks close to 9kHz and the modulation is about 2.6kHz. Add them up and you get approximately fs/4.

Now in your case, you're seeing DC offset modulation, which is a bit strange because it's not really AM, but the fact that it's modulating at a frequency of almost exactly (fs/4 - fi) leads me to believe this may be related to some aspect of the digital representation of the audio signal (fs = sample frequency, fi = input frequency).

Discrete-time signal representation starts to get interesting when you approach fs/4. If you generate an ideal tone in software that is close to this frequency, you'll see amplitude modulation at a rate of 4 * (fs/4 - fi). Sending that through the soft clipper may be causing it to introduce DC offset modulation in some way. I'll check with the algorithm designers to see if they have any insight.

Here's an example of an ideal tone at 12 kHz (shown sample-by-sample), with a sample rate of 48 kHz:

Here's another example with a test tone of 11999 Hz:

Note the amplitude modulation at a rate of 4 Hz.

I wonder if this is somehow related and if it is causing the clipper to behave differently.

One simple solution might be to play with the values of the DC blocking capacitors on the DAC outputs.

828c3d0a8ba3b17b1796e4bc9df7e15b.jpg
828c3d0a8ba3b17b1796e4bc9df7e15b.jpg
828c3d0a8ba3b17b1796e4bc9df7e15b.jpg-450x102.jpg
828c3d0a8ba3b17b1796e4bc9df7e15b.jpg-450x102.jpg
8361b4cb2a0bfc29fa15e344f7303c4c.jpg
8361b4cb2a0bfc29fa15e344f7303c4c.jpg
8361b4cb2a0bfc29fa15e344f7303c4c.jpg-450x104.jpg
8361b4cb2a0bfc29fa15e344f7303c4c.jpg-450x104.jpg
Gordon Reply
Mar 29, 2010 00:00

Hi Brett. The modulation frequency doesn't always add up that way, it was just coincidental in that case. It may be related of course as the clipping introduces 'unrelated' harmonics. It's perceptible below but starts in earnest at about 7.7k and continues up to cutoff. Tried a small cap at the DAC output, about 1k corner but it didn't change anything.

Cheers

Gordon

ADIApproved Reply
Mar 29, 2010 00:00

Hi Gordon,

In that case, maybe I'll need to shift my focus to the algorithm a little more. I'll continue investigating and will let you know if I find anything.

Gordon Reply
Mar 30, 2010 00:00

Please verify that you can reproduce this. I'd hate to have you jumping through hoops to find out it's something dumb that I've done. I don't think it is as it seems to work fine otherwise but it's always a possibility.

Cheers

Gordon

Gordon Reply
Mar 30, 2010 00:00

Whether it's significant or not I don't know, might just be coincidence. 7.7/8k is the same point (the point where the abberation becomes significant) that a square wave becomes a sine wave.

Gordon

ADIApproved Reply
Mar 30, 2010 00:00

Hi Gordon,

That can be predicted mathematically. A square wave's power spectrum consists of a fundamental and its odd harmonics in decreasing power levels. So, a 1 kHz square wave would include harmonics at 3 kHz, 5 kHz, 7 kHz, 9 kHz, 11 kHz, 13 kHz, etc... Since the audio is being bandlimited by the nyquist rate, the highest frequency that can be reproduced is 24 kHz.

So, a square wave can only be approximated in digital audio when its fundamental is less than 1/3 of the nyquist frequency. In the case of 48 kHz sample rate, this is 24 kHz / 3 = 8 kHz. Because of the reconstruction filter's rolloff around this frequency, in practice this limit will be shifted a few hundred herz down... 7.7kHz sounds very reasonable.

In other words, it's mathematically impossible to reproduce a square wave at over 7.7 kHz in a system with a 48 kHz sample rate.

Still, this doesn't explain the wobble, but it certainly explains the shift of the square wave to a sine.

ADIApproved Reply
Mar 30, 2010 00:00

You can find more information here: http://cnx.org/content/m0041/latest/

Here is a view of the power spectrum from that site:

EZAdministrator Reply
Aug 2, 2018 00:00

This question has been assumed as answered either offline via email or with a multi-part answer. This question has now been closed out. If you have an inquiry related to this topic please post a new question in the applicable product forum.

Thank you,
EZ Admin