How can I build up a look-up table for PWM or SVM?

Status
Not open for further replies.

ltg

Member level 4
Joined
Feb 24, 2002
Messages
76
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Visit site
Activity points
533
Hi,

I get a new task to make a motion control for a inductor motor, single phase in 3 phases out. I'm not sure how to calculate and build up a look-up table for sinus values. And I don't know what to choice: sinusoidal PWM or SVPWM. Could some expert give some tips? Thanks in advance!

Best Regards,
ltg
 

hi,
for beginning, you may play with example from
Visual Micro Lab by www.amtools.net
sinewave proj has pwm on AVR with 7bit sinus LUT
GoodLuck.
 

There are some motor applications from Microchip with pic18 series; or you can use Motorola appl. notes.
 

Hi men:

What uC are you using for his application? I use mainly AVR which have many PWM features. Also, I use to write sine tables using matlab, it's
pretty ease to write a file to generate tables, then you copy and paste.
It's important to know what uC do you use.

cheers
Nachus
 

Actually I did not deal with motor sin generation , but from programming point of view you can :
a. Calculate sin output for full period (actually just quarter is enough ) in form of integers . Number of entries size will be dependent on resolution you choose . Number of entries is also defines PWM port
update freq which is equal to WorkingFreq*NoOfEntries
b. Then divide number of entries in this table by 3 . Let say its name - offset.
c. The use following values as initial offset to this table :
0, offset , 2*offset .
d. Use these values as index to the sin table to make output to the PWM port
d. Every time you need to output new value increment the initial offsets by one ,
e. Do not forget to wrap around when tale end is reached .

You can also use logic divider with parallel loading to replace PWM port if it is not available or you can use DAC or simple weighting resistor R-2R matrix without logic divider to generate analog sin signal- but parallel ports will be neded .
 

Hi,

Thanks for the tips and information. I use Fujitsu MB90F598 uC. How many values should I have?
Best Regards,
ltg
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…