My very first Class D pwm (switching) amplifier.

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

No this I cannot do, but that is irrelevant in my oppinion, as the errors from a gain stage is nonlinerarities that is very difficult for the ears to detect (second order harmonics can be quite high in an gain stage and be very accurate sounding all the same) but nonlinearities in the triangular wave form is not related to the musical signal an thereby much more detectable to the ear.

IMO the modulator of a class-d amp can definitely be compared to the VAS of a linear amp. A nonlinearity of the triangle wave would result in an according nonlinearity of the amplitude to pulse-width conversion (in other words gain-nonlinearity). I.e. it would not reduce resolution as such, it would reduce linearity in simply the same way as the nonlinearity of an ordinary amp's VAS does.

To go from 16 to 20 bits of resolution in a PCM signal is easily detectable for the ear, even through an amplifier having .1 % harmonic distortion!!

I can definitely agree with that (i.e. the resolution thing) but keep in mind that it will be hard to find DACs or ADCs with a LINEARITY of 20 bits.

As already mentioned there are other things that can generate more distortion than the triangle-nonlinearity:

Switching residuals that stray into the modulator.
Timing errors introduced by the comparators, drivers and output devices.
Supply voltage drop. etc.

Regards

Charles
 
This is probly a little of the current discussion but I'll ask anyway :)
In regard to your output filter, For strictly sub use would you recommend a lower cut off point for the Filter?
Also would this pose any problems (asside from the added resistance from large chokes :dead: )
I was thinking of using some audiophile crossovers in parralelle (3mh) for an easy solution since 20 amp inductors arn't cheap in my part of the world (or obtainable for that matter).
 
Hi Charles

I agree with you almost all the way:
Static nonlineariteies in triangel waveform is compareable with nonlinearities in gain stages, but what about dynamic nonlinearities and noise. Is it not compareable with quantizing noise and errors?
You mention the timing errors in the comperator. If the waveform the comperator is comparing with has timing errors, the result is the same and it will "double the trouble" so to speak.
But again, I agree that you do NOT solve all problems in PWM just by removing the triangel!

Koldby
 
Hi fr0st

A lower crossover would definitely mean less output ripple for the same filter order.

But I would still use a fairly high one (in the kHz range) for two reasons: 1.) Large filter inductors are heay, large and expensive. 2.) you don't have to take it into account when calculating the crossover.

For our amp we made the inductors by ourselves back then. We used an RM12 Core of N67 material from Siemens (now EPCOS: http://www.epcos.com/inf/80/db/fer_01/02510255.pdf) and introduced an air-gap by placing some insulation material in the two legs of the core (the same principle as LC audio uses with their new version of the ZAP pulse).

Though a nice air-cored coil would be nice from the THD point-of-view (the TacT amplifiers uses nice foil ones) they can get quite expensive and will need much more shielding than a cored inductor with a "closed" path.

I will search for the formulae telling how to calculate such an air-gap and post them here.


Koldby

Removing the triangle and substituting it with a nice quartz-controlled clock is one of the advantages of a DS-amp. Overshoot and the like will no longer disturb during the signal transition since transition takes place as soon as a flip-flop is clocked and the next decision will not be taken before the next clock pulse. In the meantime all the overshoot and other anomalies will be integrated and taken into account (i.e. their effective contribution to the output signal).
There is of course a downside (as ever): Higher order DS modulators, which are definitely necessary, are difficult to design.

Regards

Charles
 
The promised functional description (post #98):
To be able to use NFB the fed-back signal must be integrated. In order to achieve a flat frequency response the forward path of the amp must be integrated as well. A triangle signal can be generated by integrating a rectangular.
So we end up with three integrators whose output signals have to be summed with the correct polarity.
Since Integration is a linear operation we can equally use one summing integrator instead which is built arounf U2B.
The rectangular is generated with the crystal oscillator/frequency divider around U1. Giving a really nice rec-tangular signal of 250 kHz.
The second half of U2 is used to make a differential input which should reduce EMC problems and lets one choose the amps polarity.
R27 is there to adjust DC offset.
In order to introduce some dead-time to suppress cross-conduction there are two comparators used (U3A&B). The dead-time can be adjusted with R28.
The drivers were made by Teledyne and are now available by IR. The driver circuit is a modified version (ad-ditional DC path) of the Motorola AN 1042.
The output switches are a complementary pair of MOSFETS.
The lowpass R25/C22 is to keep the harshest bit of EMC from being fed into the NFB loop. With the PCB we used the output rectangular looked that fine we might even have left it away.
The putput filter was a cauer filter with a cutoff frwquency of 45 kHz approx. With a real load of 6 Ohms the FR was flat within +- 1 dB up to the cutoff frequency. By fiddling around with C33 we achieved a car-rier suppression of slightly more than 80 dB !!!!

What I would do differently today:
A better differential receiver at the input. A better OP-AMP than an LF412. A double N-channel design us-ing a driver like the IR2110. The 2110 didn’t have the specs it has today, which was one reason for not choosing it back then.
I would make R11 larger but use a limiting circuit around the integrator to improve clipping behaviour.
I would also use a double feedback loop.

Regards

Charles
 
Thanks, Charles, for sharing that information with us.

For the dead time, I was thinking on another method: Using only a comparator, then inverting the signal with two XOR gates (the way Crest LT amplifier does). Then use a RC circuit with the R bypassed with a schotky diode in inverse polarities for each branch and buffer it with another XOR gate (this way, non inverting in both branches).
Well, one image worths more than a thousand words:

This allows me to adjust the delay before the rising edges.
Perhaps this could be modified someway, like adjusting only the delay of the rising edge of one of the mosfets.

The outputs of this circuit go to a IR2110 driver.


Best regards.
 

Attachments

  • dead_time.png
    dead_time.png
    3.1 KB · Views: 1,152
Hi ssanmor

One alternate method that is only relying on logic gates is the following (only one branch described):

You have an AND gate whose first input is fed by the control signal directly. The other one is fed by the delayed control signal. The delay is made by using any number of non-inverting buffers or an even number of inverters. The result would be that transitions from 1 to 0 would immediately be present at the output whereas transistions from 0 to 1 will be delayed by the delay time of the "delay line".
Maybe this could even be made adjustable by the use of an RC lowpass in between.
We discussed this method back then when we developed our amp but dropped it in favour of the method we finally used. The comparator we used back then was one of the fastest available (and is still a cool one !!!) and since it came as dual version only .........

Regards

Charles
 
Yes, that's another ellegant way, Charles.

However, since you must do the same with the inverted PWM signal for the other Mosfet, and it is better to equalize the delays for both branches (that's why Crest LT uses 2 XOR gates), you end up with quite a lot of gates (4 inverters, 2 xor and 2 ands, although you could implement all with NAND gates thus reducing it to, say, 8 or 10 gates).

Do you see any problem in the 4 XOR solution I proposed?

This forum is proving very useful since we are discussing almost every aspect of the design of Class D amplifiers.

By the way, I have just received 2 samples of a 35uH coil from Coilcraft. The exact model is: DMT3-35-12. Do you think it is suitable (saturation, etc)? My design for the filter is, finally, shown in the attached image.
Ripple rejection is about 100dB if properly tuned :bigeyes:
 

Attachments

  • filter.png
    filter.png
    1.8 KB · Views: 1,036
Hi ssanmor

I expect that your dead-time approach would work.

Depending upon output power your coil migh be sufficient with 12 Amperes. What I didn't find on the particular webpage is the optimum frequency range for this coil (i.e. the core to be exact).

Depending on what you want to use the amp for, the f3 of 27 kHz that you'll achieve with your output filter, will be a little low.

Regards

Charles
 
It shouldn't be a problem for the feedback in these case but it affect the overall frequency response. Such an amp is regarded as rather sluggish today. I would take a main capacitor of half the size which would also result in a lower filter Q (i.e. better transient response). But I assume that you will play around anyway.:) :cool:

Regards

Charles
 
From the description they seem to be intended for AC mains filter usage (which might be good for you as well in a later stage !).
Also the core-shape seems to be generate quite some stray-field.

Another thing I was once thinking of was an "air-cored" toroidal coil. I.e. one that you wind on a toroidal core made out of insulation material. The advantage would be neligible saturation distortion and reduced stray-field compared to cylindrical air-coils.
The downside would be the need for more windings than a similarly sized cylindrical coil.

Regards

Charles

BTW: How will you wire your prototype ? Breadboard, "real" PCB ...?
 
First I will make it in one of these PCB's with only holes and copper pads, I don't know how to call it.
The modulator was made that way and worked fine.
Once everything is adjusted, I will design a PCB board.

I think that cores are not intended for mains usage, they sell them as ideal for switching power supplies, but I am not sure. It is a matter of trial and error!
 
Dead time control

Well, I have been doing some simulations on the dead-time control. They show that you can quite well adjust it from 0 to 100ns using 1K potentiometers, with minimal distortion in the pulse width (except that the ON time is reduced by one dead time on each waveform, but this is exactly what we want to do). The advantage is that you can control the on delays for both branches separately and it uses only a XOR chip (4030/4070).
You will notice that the levels are adapted to directly drive an IR2110 assuming that the negative rail is -50V.
The design is very inspired on the Crest LT design.

Here are the schematic and simulation results (for 2 dead-time adjustments: 5ns and 33ns (220 and 470 Ohms, respectively).

I hope it is useful.
 

Attachments

  • deadtime.zip
    10.8 KB · Views: 393
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.