• Forums
• Posts
Latest Posts
Active Posts
Recently Visited
Search Results
• Page Extras
• Forum Themes

Author
microLearner
Junior Member
• Total Posts : 98
• Reward points : 0
• Joined: 2017/02/27 20:26:37
• Location: 0
• Status: offline
0

# Space Vector Modulation AN1017

This is a clarification of space vector modulation from the AN1017A application note Fig15. My understanding as per the diagram is
Sector 1: PWM1 duty is maximum, PWM2 duty is minimum, PWM3 duty varies from 100% to 0%.
Similarly for all the other sectors as per the diagram. Am I correct? Please advise. In case if my assumption is correct. What is the rate at which the PWM will decrease or increase?

List Solutions Only

du00000001
Just Some Member
• Total Posts : 2179
• Reward points : 0
• Joined: 2016/05/03 13:52:42
• Location: Germany
• Status: offline
Re: Space Vector Modulation AN1017 2018/05/11 18:15:18 (permalink) ☄ Helpfulby microLearner 2018/05/12 00:32:58
0
You haven't got it:
1. What you consider the "maximum", is 100 % * (0.5 + 0.5 * cos(phi)) [phi = -30 .. 30 degrees in the resp. sector]
2. The "minimum" equals 100 % * (0.5 + 0.5 * cos(phi + 180 degrees)) [same considerations for phi]
3. And the linear looking transitions are 100 % * (0.5 + 0.5 * cos(phi + 120 resp. 240 degrees))
There is some "trick" leading to having each phase "painting" the "max" resp. "min" pattern twice: while the absolute voltage looks somewhat "weird", the differential voltages are the sine voltages required. But the pattern shown reduces some EMI (emissions) and avoids some problems inherent to a control scheme considered more "normal" (that would be: "painting" the sines as absolute sine voltages).

PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
microLearner
Junior Member
• Total Posts : 98
• Reward points : 0
• Joined: 2017/02/27 20:26:37
• Location: 0
• Status: offline
Re: Space Vector Modulation AN1017 2018/05/11 20:41:39 (permalink)
0
You are a genius. What ever you have explained me i am not able to follow. I have done excel calculations based on the sample program provided by microchip. Can you please confirm if the wave forms are as expected? I am not able to do full attachments as the website is restricting and does not allow. First question is are the waveform are correct? If correct should the PDC1, PDC2, PDC3 go from 0 to max (PTPER = 1000, 20Khz). Please help. Just full of doubts. Sector you referred -30 .. 30 but sector i assumed starts from 0 to 360. I am confused of -30?
post edited by microLearner - 2018/05/11 20:55:05
microLearner
Junior Member
• Total Posts : 98
• Reward points : 0
• Joined: 2017/02/27 20:26:37
• Location: 0
• Status: offline
Re: Space Vector Modulation AN1017 2018/05/11 22:12:54 (permalink)
0
I plotted the curves as per the formula suggested by you. If i am plotting the linear translation conversion start but it starts from 50 and ends at 7. Why it starts from 50? Why not from some 90 or so? Please advise.
T Yorky
Super (Thick) Member
• Total Posts : 513
• Reward points : 0
• Joined: 2012/08/28 02:07:35
• Location: UK
• Status: offline
Re: Space Vector Modulation AN1017 2018/05/12 08:26:17 (permalink)
0
@microlearner,
Have a look at AN0955. Although this is for the PIC18 (and coded in assembler !) the associated write up and theory is very good and will assist in understanding the waveforms you have posted (They look correct).
The pdf explains the 6 sector concept and the resulting need to only store a 0-60 degree sine look up table. It also explains the disadvantage of using simple sine output.
Just be aware that this is only one of many space vector modulation techniques. The one used by MChip allows very simple calculations, hence why a 5MHz PIC18 can perform the calcs in assembler. The waveform(s) are actually normalised and I have them as 0-100% vertical scaling in my documentation. They also have a third harmonic element that is explained in AN0955.
If you are willing, it is worth 'walking through' the assembler to see how the calculation is performed. Many of the calcs are 16 bit so this takes quite a few instructions in an 8bit cpu. The look up table is a bit odd due to the 8 bit arrangement.
T Yorky.
microLearner
Junior Member
• Total Posts : 98
• Reward points : 0
• Joined: 2017/02/27 20:26:37
• Location: 0
• Status: offline
Re: Space Vector Modulation AN1017 2018/05/12 08:30:54 (permalink)
0
Thank you very much for the reply. Surely i will go through that document and post if i have any clarifications.
microLearner
Junior Member
• Total Posts : 98
• Reward points : 0
• Joined: 2017/02/27 20:26:37
• Location: 0
• Status: offline
Re: Space Vector Modulation AN1017 2018/05/12 08:40:45 (permalink)
0
I am not finding the application note AN0955. Could you please send me the link. Thank you.
du00000001
Just Some Member
• Total Posts : 2179
• Reward points : 0
• Joined: 2016/05/03 13:52:42
• Location: Germany
• Status: offline
Re: Space Vector Modulation AN1017 2018/05/12 09:28:16 (permalink) ☄ Helpfulby microLearner 2018/05/12 09:44:27
0

(Can be found searching for "AN955".)

PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
microLearner
Junior Member
• Total Posts : 98
• Reward points : 0
• Joined: 2017/02/27 20:26:37
• Location: 0
• Status: offline
Re: Space Vector Modulation AN1017 2018/05/14 00:03:46 (permalink)
0
I have gone through the document. The first doubt i have is how the Duty cycle Table is arrived. Can you provide the calculations how it was arrived?

2. If i am rotating my Vs reference vector every 5 degrees and when the VS vector is in sector 1. There location of Vs is at 60 degrees. Then TA will be 0 as per equation 5 is this a valid condition? In that case Phase R Duty cycle and Phase Y Duty Cycle will be same?
post edited by microLearner - 2018/05/14 00:06:45
qɥb
Monolothic Member
• Total Posts : 3329
• Reward points : 0
• Joined: 2017/09/09 05:07:30
• Location: Jupiter
• Status: offline
Re: Space Vector Modulation AN1017 2018/05/14 00:10:55 (permalink)
0
You can't paste an image directly into a post.
You have to use the "attach" button in the Full Editor.

This forum is mis-configured so it only works correctly if you access it via https protocol.
The Microchip website links to it using http protocol. Will they ever catch on?
PicForum "it just works"
simong123
Lab Member No. 003
• Total Posts : 1273
• Reward points : 0
• Joined: 2012/02/07 18:21:03
• Location: Future Gadget Lab (UK Branch)
• Status: offline
Re: Space Vector Modulation AN1017 2018/05/14 06:15:45 (permalink)
5 (1)
Am I the only one for whome the title Space Vector Modulation conjures up the image of Marvin the Martian from Bugs Bunny cartoons?

Where's the Kaboom? There should've been an Earth shattering Kaboom!

Sorry.
du00000001
Just Some Member
• Total Posts : 2179
• Reward points : 0
• Joined: 2016/05/03 13:52:42
• Location: Germany
• Status: offline
Re: Space Vector Modulation AN1017 2018/05/14 06:23:24 (permalink) ☄ Helpfulby microLearner 2018/05/14 11:09:38
0
I'm replying somewhat late . . .
... genius ...

Remember that these are "sector plots" that at the edges have to fit to the plots of other "sectors". So nothing is basically wrong if a sector starts with 7 % (at the left edge) if another sector ends with 7 % (at the right edge). Always provided that these sectors follow each other.

Your segment curves start/end at about 7 resp. 93 % - due to the "zero"-line being at 50 %.
Without this shifting and "scaling", it would be about 0.866 resp. -0.866 - the values for cos(30°) / cos(-30°) resp. cos(150°)/cos(210°).

PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
du00000001
Just Some Member
• Total Posts : 2179
• Reward points : 0
• Joined: 2016/05/03 13:52:42
• Location: Germany
• Status: offline
Re: Space Vector Modulation AN1017 2018/05/14 06:27:11 (permalink)
0
@ Simong123
Wait until some 100 kW motor experiences a bearing damage (better: gets blocked): there you'll get you Kaboom. Maybe not earth-shattering, but surely loud enough

PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
microLearner
Junior Member
• Total Posts : 98
• Reward points : 0
• Joined: 2017/02/27 20:26:37
• Location: 0
• Status: offline
Re: Space Vector Modulation AN1017 2018/05/14 11:03:01 (permalink)
0
The excel calculations seem to be Ok for around 6000 RPM. But in real hardware it seems to go for a toss. I am sending the PDC data over CAN in pwm interrupt. Please find the results. Any suggestions.
microLearner
Junior Member
• Total Posts : 98
• Reward points : 0
• Joined: 2017/02/27 20:26:37
• Location: 0
• Status: offline
Re: Space Vector Modulation AN1017 2018/05/17 07:38:42 (permalink)
0
Rectified the bugs and got the same waveforms same as excel in the real hardware. The results seem to be encouraging. Thanks to everyone and special thanks to du0..1. But still need to test more. Thank you.
Isaac_Sewell
Senior Member
• Total Posts : 160
• Reward points : 0
• Joined: 2003/11/25 06:26:50
• Location: Sheffield, England
• Status: offline
Re: Space Vector Modulation AN1017 2018/05/17 11:37:33 (permalink)
0
We’re these bugs in the ANxxxx or in your code? If they were in the app note, they might be good to share.
microLearner
Junior Member
• Total Posts : 98
• Reward points : 0
• Joined: 2017/02/27 20:26:37
• Location: 0
• Status: offline
Re: Space Vector Modulation AN1017 2018/05/18 10:02:43 (permalink)
0
No the issues in my software but in one of the reference software's BLDC.x provided for the application little bit of confusion was there
`// Period Calculation// Period = (FCY / PDIV * 60) / (RPM * NO_POLEPAIRS )#define MINPERIOD    1367        // For 6000 max rpm and 4 poles motor#define MAXPERIOD    32767        // For 250 min rpm and 4 poles motor`

As per the application note the period is divided by No of poles, But in the source code it is NO_polepairs. I am not sure if it has anything to do with input capture initialization.