1. 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.
    Dismiss Notice

why sawtooth instead of square wave for class D amplifier?

Discussion in 'General Electronics Chat' started by mik3ca, Sep 22, 2017.

  1. mik3ca

    mik3ca Member

    Joined:
    Jun 24, 2017
    Messages:
    137
    Likes:
    1
    Yes you did Mr. Trigger. Considering the sound using a square wave is decently intelligible and loud, I'll stick with it.
     
  2. MrAl

    MrAl Well-Known Member Most Helpful Member

    Joined:
    Sep 7, 2008
    Messages:
    11,026
    Likes:
    951
    Location:
    NJ
    ONLINE
    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.
     
  3. AnalogKid

    AnalogKid Well-Known Member

    Joined:
    Sep 22, 2011
    Messages:
    1,101
    Likes:
    160
    Location:
    Ohio - GMT-5
    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
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. crutschow

    crutschow Well-Known Member Most Helpful Member

    Joined:
    Mar 14, 2008
    Messages:
    10,592
    Likes:
    477
    Location:
    L.A., USA Zulu -8
    ONLINE

    Where exactly are you seeing this square-wave?
     
  6. MrAl

    MrAl Well-Known Member Most Helpful Member

    Joined:
    Sep 7, 2008
    Messages:
    11,026
    Likes:
    951
    Location:
    NJ
    ONLINE
    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: Sep 24, 2017
  7. alec_t

    alec_t Well-Known Member Most Helpful Member

    Joined:
    Jul 10, 2011
    Messages:
    9,247
    Likes:
    1,218
    Location:
    Cardiff, Wales
    Done. See post #14.
     
  8. ronsimpson

    ronsimpson Well-Known Member Most Helpful Member

    Joined:
    Apr 17, 2007
    Messages:
    7,253
    Likes:
    961
    Location:
    Loveland, CO USA
    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.
     
    • Like Like x 1

Share This Page