AnsweredAssumed Answered

PWM Sine Wave Generation

Question asked by digitalDNA on Aug 26, 2006
Latest reply on Aug 27, 2006 by Mark Hotchkiss
Hello,

In the process of generating a sine wave to drive a 3-phase motor (via a 6-MOSFET or IGBT bridge), and using the V/Hz ramp technique, we can see that the V/Hz ramp process (reference. AN1857, AN1664, etc.) has two output variables:

Amplitude and Table_inc

These two variables are the input for the next process, the PWM Generation Process (Pwmcalc.c) , which, for phase A (for example), uses a sine wave table for one quadrant (with 3rd harmonic) (variable wavequad), retrieves the Table_value, then SCALES BY AMPLITUDE, and finally, calculates PVAL1.

A piece of the code follows:


Table_value = (wavequad[Quad_ptr>>8]); Pwmmod_wave = (Table_value * Amplitude); /* scale by Amplitude */
PVAL1 = (Pwmmod_wave>>8) + (PWM_MODULUS/2);


So my question is if we actually have the wavequad wave table for one quadrant, why do we have to scale Table_value by amplitude ? Isn't the data in the wave table sufficient for that ?

Second question follows: where can I find generous litterature about how is Amplitude related to PVALx's value, since PVALx is a register for the PWM module ?!! Can anyone explain that clearly please ?


Best Regards,
Roger Tannous.

Outcomes