# Whats the reason for triangular carrier PWM

I understand that triangular carrier PWM uses a higher frequency triangular carrier wave to compare with the desired output waveform but I would like to know more about the process. I've also learned and seen the Fourier transform that shows that it lowers harmonics. Is there an easy intuitive reason for how this was discovered? I understand that a sawtooth carrier will do the same thing but doesn't do as good of a job. Is the triangle carrier the best that it gets? Is triangular chosen for the reason of its harmonic limiting nature? Could you use either method for an inverter just adjust respective amplitudes of the different types of carrier? Does anyone know of a derivation of how we figured out that triangular PWM works well? I just want to understand the process a little better fundamentally. Is there a geometric relationship between the triangle wave and the sine wave that's relevant and adds some beauty or is it just what it is?

In a sawtooth PWM, the centre of each pulse and thus the phase of the reconstructed waveform varies with the signal amplitude or PWM duty cycle.

Double sided modulation, using a triangular waveform, avoids this problem, keeping the centre of each PWM pulse at a constant phase relative to the PWM sampling interval.

And yes, the phase distortion does appear as unwanted harmonic content when you PWM modulate a sine wave with triangular PWM.

• Awesome answers! Thank you Brian and Alex. That's exactly the type of explanation I was hoping for! Also, I think I can find this elsewhere, but how does the frequency of the carrier matter? Does it alter the frequency of the reference waveform (the one to be output)? Or does it just result in more pulses and therefore a better digital approximation? Mar 3 '15 at 19:25
• Better approximation, easier filtering. As far as I can recall, the harmonic content is related to the ratio F(signal)/F(pwm) so you can expect high frequency signals to be less accurately coded - triangular is better, but not perfect Mar 4 '15 at 6:58

The waveform you use has to have a linear slope because the idea is to convert voltage to duty cycle in a linear manner. If you use a sine wave, then the conversion will be nonlinear and will introduce distortion. The idea is that the slope of the waveform will be used to convert voltage to time. If you use a symmetric waveform (triangle wave) to do this conversion, the resulting waveform will be a center aligned PWM signal. A center aligned PWM signal has fewer harmonics than an edge aligned PWM signal.

• Do you have any references for that last claim? It seems arbitrary where the alignment is for the signal. The claim of a relationship between the alignment and the harmonics generated seems interesting if it is true (for the same duty cycle generated by either technique). Both a center-aligned and edge-aligned PWM signal both have two edges with equal slopes. Mar 3 '15 at 18:20
• Edge aligned always had one edge in the same place on subsequent cycles, while center aligned has no fixed relationship between the edges on subsequent cycles. Those rising or falling edges on regular intervals will generate more harmonics. Mar 4 '15 at 9:25

To understand why a sawtooth-carrier PWM adds harmonic distortion, consider the effect of modulating a low-frequency triangle wave using one. Assume the falling edges of the PWM wave occur at a fixed frequency (the same principles would apply if the rising edges did so). If the falling edges occur at a fixed frequency, then while the duty cycle is increasing (as it will be during part of the low-frequency triangle waveform) the rising edges will occur at a rate slightly faster than the PWM frequency. While the duty cycle is decreasing, the rising edges will occur at a rate slightly slower than the PWM frequency. The effect of this will be to compress time during the rising ramp of the sawtooth wave, and stretch it during the falling ramp.

Since all waves which are free of even harmonics must be glide reflections of themselves, a waveform in which all rising ramps have a slope which is not shared by any falling ramps must contain even harmonics. Since a triangle wave does not have such harmonics, that would imply that the PWM must have created some.

Another good reason for using triangular PWM carries in some (not all) applications is the sampling effect during control. For instance, in motor drives control, the output voltage, generated through PWM, induces pseudo-triangular waves in the measured current, and normally these currents are measured -and sampled- to accurately control the motor variables (speed, torque, flux). If you use a sawtooth waveform, and the sampling instant occurs either at the extremes of the sawtooth carrier or at the reference crossing, you will sample one of the peak values of the current, including commutation ringing. But if you use triangular carriers for PWM, and the sampling instant are either the maximum, minimum, or both values of the carrier, you will always sample the average current during the carrier period (or half-period).

In some other applications, like buck converters (DC-DC converters, see Here), a sawtooth PWM carrier is used to measure the peak current instead of the average one during the sampling period.