I finished the simulations.

I used a modified sine wave, but the same applies for a square waveform.

Bipolar PWM:

------------------------------------------------------

Unipolar PWM

According to one of my books, the first simulation was based on:

The first case, where peak voltage is line to line I followed the diagram on this page:

With the Following firing order

For the second case, where line to line voltage = 2*DC_LINK, I replaced T2, T4 and T6 states with the inverted states of T1, T3 and T5 as sugested on the previous links I posted on #1396.

I guess now its a matter of trying this with SPWM with complementary mode PWM rather than center aligned PWM (These are the definitions Atmel uses, microchip may use something different)