PWM Sine Wave Generation

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

PWM Sine Wave Generation

跳至解决方案
5,397 次查看
admin
Specialist II
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.
标签 (1)
0 项奖励
回复
1 解答
887 次查看
rocco
Senior Contributor II
Hi, Roger:

I think the mathematically correct way to look at the output is as a vector. A vector has an amplitude and an angle.

But the practical way of thinking about it is to compare your brushless-motor with a brushed-motor. A brushed-motor does it's own commutation, and all you need to do is provide a voltage or current (torque) command to control it. The amplitude, in your application is analogous to the voltage or current command, and the angle is the only the commutation.

在原帖中查看解决方案

0 项奖励
回复
1 回复
888 次查看
rocco
Senior Contributor II
Hi, Roger:

I think the mathematically correct way to look at the output is as a vector. A vector has an amplitude and an angle.

But the practical way of thinking about it is to compare your brushless-motor with a brushed-motor. A brushed-motor does it's own commutation, and all you need to do is provide a voltage or current (torque) command to control it. The amplitude, in your application is analogous to the voltage or current command, and the angle is the only the commutation.
0 项奖励
回复