Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

why sawtooth instead of square wave for class D amplifier?

Status
Not open for further replies.
Yes you did Mr. Trigger. Considering the sound using a square wave is decently intelligible and loud, I'll stick with it.
 
I would disagree, a sawtooth has near instantaneous transition in one direction, and a slow ramp in the other.

But regardless, all class-D amps (of this type) use triangle waves - why would you want to use something that would be inferior?.

Hi,

Sorry to have to disagree, but a sawtooth works just as good as a triangle and is more stable.

Back in the early 1980's i was handed a commercial/industrial battery charger design that had to be redone. The main problem with the design was not that the PWM did not work, but that here was no protection for over current or reverse battery connection. The design had a sawtooth producing circuit that was used to produce the PWM pulses. I did not have to modify that part of the circuit except maybe to make the sawtooth rise (or fall) time faster.

The sawtooth circuit is easy for this because it does not even have to be a perfectly linear ramp. A slightly curved ramp is acceptable because the integrating error amp does not care if it has to integrate up just a tiny bit more for some pulse widths than others as long as it is not too much.

The disadvantage ot the sawtooth wave is that the capacitor has to be discharged (or charged) very quickly and that requires a higher current. The advantage of the real triangle (ramp up and ramp down) is that there is no fast transition so it's a smoother wave. The disadvantages however are 1. that the wave is more difficult to produce, and 2. that there is a phase shift associated with a triangle due to the pulse edge moving forward in time relative to the cycle time, which could produce an unstable pole.

So there are differences between using a dual slope triangle vs a single slope ramp in both the generation of the signal as well as the overall control effects on the operation. To see the difference in operation however requires an intricate rather than a casual analysis of the circuits.

Many integrated circuit controllers work with a single slope ramp (sawtooth) not a dual slope triangle.
 
Sorry to have to disagree, but a sawtooth works just as good as a triangle and is more stable.
Really sorry to have to disagree, but ... more stable?
The disadvantage of the sawtooth wave is that the capacitor has to be discharged (or charged) very quickly and that requires a higher current.
Completely agree, and I think this is a more significant problem than you do. Besides just getting a circuit to behave, the voltage effects and EMI of the large current spike must be dealt with.
The advantage of the real triangle (ramp up and ramp down) is that there is no fast transition so it's a smoother wave.
Completely agree, which means this reinforces the corresponding disadvantage of the saw wave.
The disadvantages however are 1. that the <tri> wave is more difficult to produce,
Disagree, because of your statement about producing the high current spike needed for the saw wave's fast edge.
and 2. that there is a phase shift associated with a triangle due to the pulse edge moving forward in time relative to the cycle time, which could produce an unstable pole.
I can't whip out the math, but I challenge you to justify this one. In an identical parallel comparison of two signal chains (tri and saw) with the same comparators generating the PWM followed by the same low pass filters recovering the baseband signal, and a reasonable relationship between the baseband and the carrier, such as a 1.73 kHz tone and 100 kHz saw and tri waves, I don't see any reason for the time or phase delay through the two chains to be significantly different.

ak
 
Considering the sound using a square wave is decently intelligible and loud, I'll stick with it.
Where exactly are you seeing this square-wave?
 
Really sorry to have to disagree, but ... more stable?

Completely agree, and I think this is a more significant problem than you do. Besides just getting a circuit to behave, the voltage effects and EMI of the large current spike must be dealt with.

Completely agree, which means this reinforces the corresponding disadvantage of the saw wave.

Disagree, because of your statement about producing the high current spike needed for the saw wave's fast edge.

I can't whip out the math, but I challenge you to justify this one. In an identical parallel comparison of two signal chains (tri and saw) with the same comparators generating the PWM followed by the same low pass filters recovering the baseband signal, and a reasonable relationship between the baseband and the carrier, such as a 1.73 kHz tone and 100 kHz saw and tri waves, I don't see any reason for the time or phase delay through the two chains to be significantly different.

ak

Hi,

Well try generating each signal and see what you can find out.

As to the stability, we look at the start time of one cycle. If we have a fast high going transition (sawtooth) then the pulse always starts out at the same time. So if the cycle time is say 10us, then the outgoing PWM pulse starts at 0 sec., 10us, 20us, 30us, etc. With a triangle though and 50 percent duty cycle, the pulse does not start until it reaches t+2.5us, and if there is a sudden demand the next pules again could start out at t+0us, meaning we get a phase shift as well as a different duty cycle. This is equivalent to not just PWM anymore, but PWM combined with PPM which could cause some unusual results. The worst cases would be during load or line transitions. Also, for very large transitions we could see almost a 5us difference in start times which is already 50 percent of the whole cycle time.

What this means is that the PWM is no longer a linear function of the output such as A*v, it could be some exponential function instead. The theory in buck circuits is that the PWM is a linear function so if we loose that we could end up with a situation like we have in the boost circuit. The boost circuit has a problem where when the output increases the control circuit things that the output decreased momentarily and that creates a stability problem. This is fairly wall documented.

I might be able to show how all this works mathematically when i get a chance, but we could also do some simulations with both types of PWM generators. It is a must however that we show at least load transition behavior because steady state operation is not good enough to show any problem that might come up. Line transitions too of course. The AC math analysis is not all that simple.
 
Last edited:
Much very theoretical talk.
My first power supplies and one audio amp was many years ago. The power transistors were turned on/off strictly by the ramp oscillator. (sawtooth or triangle) I think the triangle responds 1/2 in 1/2 clock verses a sawtooth that responds 1 in 1 clock. (better in "math" but not measurable in real life) This is "voltage mode".

Then I started using "current mode". This is where the oscillator is used only to turn the transistors on. The comparitor is looking at the current in the inductor to turn off the transistors. (sawtooth linearity is not a factor because nothing is looking at the ramp) The ramp is the current. This type of supply/ audio amp/ is better to stabilize.

Next I moved to Hysteresis PWM. This is where there is no oscillator. If you need 1A output and H=0.1 then the MOSFET turns on at 0.95A and off at 1.05A. That is the oscillator. (triangle oscillator) The response time is good because it can go to 100% or 0% until the desired output is achieved. Then it switched to the desired duty cycle.

I like any of the current mode PWMs because they respond to input voltage variations with out causing the error amp to respond.
I have also used; hysteresis, constant on time, constant off time, etc. I like the "variable frequency" of these. The radio noise is spread out over a wide range and thus hard to find. At HP they rejected my variable frequency designs because the noise could not be measured. My other companies liked the idea.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top