| Author |
Message |
ltg
Joined: 24 Feb 2002 Posts: 75
|
08 Sep 2003 12:04 How can I build up a look-up table for PWM or SVM? |
|
|
|
|
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
|
|
| Back to top |
|
 |
sboduna
Joined: 15 May 2001 Posts: 40
|
08 Sep 2003 17:39 |
|
|
|
|
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.
|
|
| Back to top |
|
 |
Google AdSense

|
08 Sep 2003 17:39 Ads |
|
|
|
|
|
|
| Back to top |
|
 |
xirix
Joined: 26 Jun 2001 Posts: 156 Helped: 1 Location: Romania
|
09 Sep 2003 7:32 |
|
|
|
|
| There are some motor applications from Microchip with pic18 series; or you can use Motorola appl. notes.
|
|
| Back to top |
|
 |
nachus001
Joined: 08 Sep 2003 Posts: 20
|
09 Sep 2003 12:30 |
|
|
|
|
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
|
|
| Back to top |
|
 |
artem
Joined: 22 May 2003 Posts: 1652 Helped: 91 Location: Turan
|
09 Sep 2003 14:09 |
|
|
|
|
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 .
|
|
| Back to top |
|
 |
ltg
Joined: 24 Feb 2002 Posts: 75
|
09 Sep 2003 20:40 |
|
|
|
|
Hi,
Thanks for the tips and information. I use Fujitsu MB90F598 uC. How many values should I have?
Best Regards,
ltg
|
|
| Back to top |
|
 |