 # SVPWM (Spave Vector PWM) for 3 phase inverter.

Hello to everyone, i need some help for a problem that i have days now.

I am going to do a 3 phase inverter for control the speed of a 3 phase inductor motor.

As a read/search in many articles, the best solution is to control the swiches (mosfet in my case) with Space Vestor PWM and now SPWM. Due to less THD and more power.

Problem is that Atmel/TI/MicroChip articles are describe the method more mathematicaly.

I want if someone knows, to try help me understand what will be the steps.I have work with AtMega16/8051/Arduino microcontrolers in both ASM/C and my problem isnt how to program but what are the steps.

Thanks anyway and sorry for my bad english.

In short you use 3 synchronised phase-correct PWM signals with 50% duty cycle representing zero.

So all the phases step together in a square wave for zero drive - the differences between the phases are zero, despite the square wave.

To get a drive level you adust the duty cycles relative to each other in a 3-phase manner.

Imagine you have a 256 entry sine lookup table, sine[] with values from -124 to +124:

``````#define DEG120 (0x100/3)

byte sine [0x100] = { 0, ....... } ;

int amplitude = 0 ;  // varies from 0 to 256

byte phase = 0 ;  // 0..255 represents 0 degrees to 358.6 degrees

void loop ()
{
int u_drive = (sine [phase] * amplitude) >> 8 ;   // look up and scale
int v_drive = (sine [(phase+DEG120) & 255] * amplitude) >> 8 ;
int w_drive = -u_drive-v_drive ; // 3-phase relationship, u, v, w sum to 0

analogWrite (Upin, 0x80 + u_drive) ;
analogWrite (Vpin, 0x80 + v_drive) ;
analogWrite (Wpin, 0x80 + w_drive) ;

..
}
``````