Clipping Distortion in Class-D Amplifier

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
Hello there,

class-D amplifier seem to be an important issue nowadays and it seems like everyone has heard about them. Of course there is a lot of information concerning this topic, but I was wondering why I couldn't find any papers regarding the clipping behavior of this amplifiers.

Why is the Clipping behavier so important?
I built a class-D amplifier with the tripath Chipset TK2350. This is a stereo class-T architecture with 300W@4ohm per channel (of course this is not reality on the scope of THD, ...)

The results were quite nice and I was satisfied, apart from the clipping behavior. The clipping leads to a very ugly kind of distortion, which isn't a possibility for audio purposes. It is a "nonharmonic" distortion (not a frequency multiple of the input signal).

I was thinking of the reasons for the distortions, based on easy ideal models for the amplifier topology . Means Integrator, comparator, feedback, output filter. With and Without triangle oscillator for oscillating and selfoscillating amplifier.

Does anyone knows a paper where the clipping behavior is descibed in that manner?
A further point is, that the THD of the amplifier isn't that bad, but the human ear is very sensible to nonharmonic distortion. So it has to be secured, that the distortions aren't appearing.

Maybe this points are already discussed here and I would be very grateful
for some information.

kind regards
 
I have extensively analyzed the clipping distortion of a self-oscillating (via phase shift) class d amplifier based on the original UcD design published in the Hypex white papers.

In the UcD design there is a significant frequency shift just prior to saturation because the narrow duty cycle switching waveform required to get to the rail ends up looking like a rounded sawtooth after it makes its way around the loop back to the comparator input. This is significant because the fundamental Fourier component of a sawtooth has a 90 degree phase shift with respect to the fundamental Fourier component of the highly asymmetrical switched waveform. With a rounded sawtooth as in the UcD the actual phase shift is somewhat less, but the effect of any such phase shift is to lower the switching frequency because it then requires less additional phase shift going around the loop in order to achieve the 180 degree total that must occur (at the comparator, which adds inversion) in order to sustain oscillation. This can best be seen by looking at the loop phase plots in the UcD white papers or technology pages on the Hypex website.

Note that the above analysis applies only to determining what will be the power stage's switched carrier frequency. The effect on audio signals is a related result that occurs due to the changes both in carrier frequency and carrier waveform slopes appearing back at the comparator at the moment of switching. The Hypex white paper gives the formula to calculate modulator gain, but the net result is a significant reduction in small signal loop gain occurs as the output signal approaches the rail. This is a nonlinear effect and results in a somewhat rounded clipping a bit like a tube amplifier.

If this were all there was to clipping effects, it might be considered benign because only warm "round" harmonic signals would be added to the original audio, yet many listeners have reported a bright sound to the UcD. I think this is because there are several other effects going on beside gain reduction. The carrier sweeps down in frequency as the rail is approached and it will probably generate swept non harmonic audible beat frequencies against the audio due to the nonlinear mixing. Also, there is a kind of rail crossing effect that seems to occur when the audio first pushes the carrier out of range. I haven't really analyzed this effect much, so I may be completely wrong, but if it occurs, it probably depends on the high pass characteristic of the audio input signal. Another possible nonlinear effect not related to clipping is large signal slew rate limiting (but this possibility is usually eliminated by the input signal bandpass filter).

I have run extensive LTspice simulations in order to study these effects. A particularly interesting analysis compares two circuits that are identical in every way except that one is switching UcD style and the other has a linear gain stage with gain exactly equal to the effective audio loop gain of its UcD twin. All other aspects are the same, same delays, same LC filters in the output, same feedback networks, same clipping levels, etc. When fed with the same audio input such that the outputs stay under half the rail voltage, there is absolutely no difference between the audio outputs (except for the carrier, of course).

A nice feature of LTspice is that it allows the output to be saved as a wave file so it is possible to generate a simulated distortion difference signal and actually listen to it. What I mean here is that I have driven both simulated circuits with the same input signal and taken the difference of the outputs. As long as the outputs stay under half the rail or so, no difference exists and no sound comes out. But under clipping conditions it is possible to listen to just the distortion difference signal. To be fair to Hypex and class d in general, it is very small, but it definitely has a very bright hissing sort of sound.

Regards -- analogspiceman
 
Last edited:
Here is the wave file so you can listen to the distortion remnant yourself. This is the UcD distortion signal only with the undistorted linear output signal subtracted out.

The UcD design parameters are:

Nominal operation: 400kHz, 45V rails & 4.56 gain
Input: 1.0Vp 2kHz soft square wave slowly ramped into the rail over 2 seconds

Listen carefully to the first third or half of the wave file - there is no distortion remnant. Towards the end the 2kHz becomes evident, but with a metallic edge. At the very end the 2kHz square wave is driving the UcD into clipping so that it stops switching altogether on half of the square wave. As it nears the rail, the UcD carrier frequency shifts down by a modest factor of 2 or so until the output gets nearly right on the rail.

So, you Golden Ears types who have claimed to have heard a coloration from the UcD, does this wave file sound ring a bell, so to speak? Remember that normally the undistorted signal is very very much louder than the remnant. The undistorted signal has been completely removed here so the distortion can be greatly amplified to unrealistic levels for listening purposes.

Regards -- analogspiceman
 

Attachments

  • UcD distortion only (undistorted output signal removed) 400kHz, 45V rails & 4.56 gain with 1Vp 2.zip
    65.4 KB · Views: 293
Last edited:
Something seems to be wrong with the last attachment because the wave file doesn't seem to play (the file name was too long perhaps), so let's try again.

The chirping at end of the wave file is when half the square wave drives the output into saturation to where switching stops altogether momentarily. -- a.s.
 

Attachments

  • UcD distortion remnant.zip
    65.1 KB · Views: 189
Last edited:
I'm always wondering why people try to explain subtle sonic characteristics (warmth, brightness) by referring to clipping behaviour. Most listeners don't ever come near clip when listening. On normal speakers, 1W is bloody loud and will get the neighbors banging on the wall. Any explanation why an amplifier has a certain character relative to another must be valid at levels well below clip to stand a chance of being close to reality.

Besides, there is a danger to crude approximations. The small-signal gain of a UcD style amp does drop to zero near clip (where else would it go) but that by no means implies the trend is downward all the way from zero modulation. In fact, depending on the exact choice of components (and to an extend, load) it may actually go up quite a bit before finally dropping off.

The white paper on the Hypex site is good as executive summaries go but it is by no means the state of the understanding. This is a good thing since one of the basic assumptions -that the oscillation frequency is where the loop phase transitions through 360 degrees- is false (even though it is almost true at zero modulation). Which means that any explanation of the finer points of how such modulators behave had better not start there.

The exact behaviour of switching frequency and small-signal gain can be obtained mathematically without resort to a simulator as I've done here AES E-Library: Globally Modulated Self-Oscillating Amplifier with Improved Linearity. As a bonus the experiments outlined in the paper show how even a modulator done without regard to its DC transfer function will distort less than the power stage up to half modulation (a quarter of maximum power). For any amplifier of more than a few watts therefore, the distortion behaviour of the modulator is unlikely to be a good indicator of how the thing will sound.
 
Hi,
This is an infinite problem as long as it is seen from the theoretical point.
But it is immediately obvious in practice when we listen to an amplifier in class D.
on a 300w rms amp with good speakers, I set the volume at 40-50% for good listening but if the song contains voice in the foreground and other instruments, I listen to the voice intermodulation, and "mixes" on the high frequency (cimbals etc). At this point I have to reduce the volume at 30% to listen very clean. (The dynamics is not controllable), then it is preferable to design a very fast and linear amplifier. Measure around the clip is a great way to see if the project is good, fast and perfectly, capable of maintaining zero-out or a few mV imbalance while force sound. is clearly and unequivocally demonstrated that many amplifiers have a high intermodulation already at 60% modulation. This is due to the switching delay of the stages after the comparator (if it is very good).
Other good measure for understand if stage is very fast, applied 15Khz at 75% of power amd measure THD. Is clare that this value can not compare with normal thd but surprise that in some amp, this is 3% and 0.1 at 1Khz:)
Or .. just say it is not an amplifier for audiophiles.
 
Last edited:
It is a "nonharmonic" distortion (not a frequency multiple of the input signal).

I d strongly suggest its not "nonharmonic".
Reason: ANY periodic signal will ONLY contain the fundamental freq (= 1 / periodic time) and / or its multiple freqs. Period.
As long as the output signal of your amp has the same periodic time like the input (assume no other frequencies mixed in like 50 or 100 Hz hum, noise etc...), it will only contain additional harmonics of the fundamental frequency.
 
So it looks I did not read analogspicemans very good comment up to now. Heavy clipping and slew rate limiting is basically the same kind of definitely nonlinear harmonic distortion. *(see below)
I did not think of the switching frequency intermodulation coming in to play with variable frequency topologies: "The carrier sweeps down in frequency as the rail is approached and it will probably generate swept non harmonic audible beat frequencies against the audio due to the nonlinear mixing." I agree, this distortion type can definitely be non-harmonic, noise style and will affect the signal's periodicity, yeah....

*Why is clipping and slew rate limiting both harmonic (as long as the switching frequency does not intermodulate, e.g. in a linear amp)? Slew rate limiting is the same as deriving the signal vs time, then clipping, then integrating back. The only difference is that for slew rate limiting, the distortion products are integrated also (which does not basically change the frequencies generated, only their relative amplitudes) ...
 
Having heard the snippet I would like to draw your attention to the fact that apart from the obvious 3rd harmonic, the sound consists only of mix products between the HF switching residual and the sampling rate of the audio file. The "swishing" noises are not inside the audio band until the point where the simulator samples it and exports it to wave. You will need to re-run the simulation with a steeper lowpass filter to make sure that you are only hearing in-band products. In addition you may have to set extremely low tolerance and time step values to make sure you're not hearing simulator errors.

I'm quite used to hearing the residual of my amps and I can assure you that the swishing thing in the background is an artefact of the simulation.
 
Something seems to be wrong with the last attachment because the wave file doesn't seem to play (the file name was too long perhaps), so let's try again.

The chirping at end of the wave file is when half the square wave drives the output into saturation to where switching stops altogether momentarily. -- a.s.

Saw this

You now it is in fact a transmittor with modulation, and also there when overmodulate you get nasty things, so do not overmodulate, also with recording with pc and to loud same happens.
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.