Hello colleagues,

I'm a begginer using a microcontroller DSC MC56F8006, and i´m trying to create a code using the beans of Processor Expert. My goal is to create a PWM to control a 3 phase inverter, with phase shifting and with sine base frequency at 50HZ. Before i tried with code (using a look-up table) but i had a lot of troubles.

So, now i'm learning this function precisely, (Mcgen3PhWaveSineIntp) inserted in the Motor Control Bean's, and in combination with PWMMC Bean i can achieve my goal.

Now, after read the documentation about this ones, i stil with some doubts:

*

1) How can find the correspondent value to the variable "PhaseIncrement" ?

2) The variable "DesiredFreq" will be in my case (50Hz)?

3)Which frequency should be on variable "FunctionCallFreq"?

4) Period of sine in my sine still being the value of 65535?

5) This two beans are enough for the procedure that i want to create? Or i dont even need the PWM bean?

Thanks in advance , I really appreciate any help that you can give me in this topic, because at this moment i'm stopped without know how to advance!

Regards,

Rui Pedro

**Notes:

PhaseIncrementis angle increment added to actual phase each function call [-].

DesiredFreq is desired frequency of generated waveform [Hz].

FunctionCallFreq is frequency of function calling [Hz].

Period is period of sine. In our case it is 65535.

Hi, Rui,

As you know that the 3-Phase Wave Generation algorithms is used to control an ACIM with VVVF algorithms. In general, we update the PWM duty cycle in ISR of PWM reload event.

Assume that you want to get 50HZ 3 phase signal, the PWM frequency is 8KHz, of course, the PWM reload interrupt frequency is 8KHz. In the case, the DesiredFreq is 50hz, the FunctionCallFreq is 8kHz, the point number for ONE the sine cycle is 8KHz/50Hz=160, the incremental angle is 360/160=2.25 degree.

This is the formula:

360 degree represents 65535, what is 2.25 degree? we use the formula 360:65535=2.25:x, the x=65535/(360/2.25)=65535/160=410, the PhaseIncrement is 410.

That is why of Eqn 4-9 formula in MotorControl.pdf doc.

You have to add the PhaseGeneration bean and PWN bean, the PhaseGeneration can calculate the phase voltage, the PWM beans can change the duty cycle of PWM based on the voltage from the PhaseGeneration bean.

I attach an example based on 56F8013, hope it can help you.

B R

Xiangjun rong