Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

The alignment of unipolar PWM signals

Status
Not open for further replies.

kathmandu

Full Member level 5
Joined
Dec 7, 2015
Messages
298
Helped
7
Reputation
14
Reaction score
7
Trophy points
18
Activity points
3,146
Hello,

I want to implement this unipolar PWM algorithm for a sine wave inverter (to drive a h-bridge):

uni-spwm.jpg

However, as you can see from the diagram above, the PWM pulses for the two h-bridge legs (Vg1 and Vg3) have a variable alignment.

That's it, at the begining of the cycle they have a left alignment, they slowly turn to center-alignment (around the peak voltage of the sine wave) and they become right-aligned toward the zero crossing point.

I'm going to use a look-up table to generate the pulse duration but how to dynamically change the pulse alignment during normal operation?

I'm using a Freescale MCU having hardware PWM timers. I know how to set those timers to get left/right-aligned or center-aligned signals but how to choose an alignment in-between??

I thought of using fixed alignment schemes though, BUT..

.. If I'm going to use a center-aligned scheme, I'll get pairs of two identical pulses with the same duty-cycle for every iteration.

.. If I'm going to use left-aligned pulses, I'll get a single pulse for each iteration but the resulting signal will have a variable frequency (and duty-cycle, of course).

Any help is greatly appreciated.


PS: I could try to draw a diagram if my last explanations were confusing.
 

I don't understand your question. The pwm in the shown diagram is simply center aligned, as it can be expected by triangle wave + comparator method.
 

If you look to the left/right of those dotted vertical lines, the pulses are no more center-aligned.

Anyway, I guess the diagram was exaggerated for clarity; actually, every segment of the sine wave between two adjacent triangular pulses could be considered a straight line (parallel to the horizontal axis) thus the resulting unipolar pulses (above/bellow) would be center-aligned.


But one issue still remains (it were not shown in the diagram above): by subtracting two center-aligned pulses, you get a pair of two identical (left/right) pulses. Is this a real problem (by increasing the distortion of the output signal)?
 

In my view, the pulses are center-aligned. The A/B outputs are centered to the triangle peak and the AB difference signal to the triangle zero crossing.
 

I could agree that the center-alignament is the best approximation BUT that's only true if the triangular wave form are cutted by _horizontal_ lines.

From the diagram bellow, the misalignments are quite clear:

spwmalign.png

Anyway, as the switching frequency (triangular wave form) is much higher (20kHz) than the sine wave frequency (50Hz) we can approximate those tiny segments between two adjacent triangular edges as being "horizontal" thus the resulting (subtracted) pulses are center-aligned.

Maybe the error/distortion caused by this approximation is small enough to count (though it's more visible around the sine wave zero crossing region).
 

O.K., I see what you mean. The problem is caused by the simple natural sampling method used in the diagram. As you say, the effect will be relative small due to the large frequency ratio.

A digital pwm modulator will most likely use regular sampling , sample the sine wave at fixed time points (e.g. triangle wave maxima and minima) and hold it for a half or full pwm period.
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top