Quote:
Originally Posted by e*clipse
Paul - is the sensorless.c code you sent the same code you're working on now w/ thingstodo? Wow. 42 pages of code. This may take a bit of coffee.
|
yes!
what does VV mean? Ya, the original V/Hz I did didn't use space vector modulation.
Quote:
Originally Posted by e*clipse
You comment that it's ok if theta2 and theta3 overflow when they are being clocked relative to theta1. Example:
theta2 = theta1 + 0x5555; // 120 degree offset. Who cares if it overflows. it just wraps around. Heck ya!
I'm confused - if theta2 gets larger than the 65535, it will go to zero + the difference?
|
That's exactly what it does. Isn't it neat that they thought of just such emergencies?
You got that stuff! For an unsigned int, 65535 + n = n - 1. It's modulo 65536 arithmetic. For example:
34059 + 59412 = 93471 MOD 65536 = 93471 - 65536 = 27935.
So, think of the angle as time. The faster time speeds forward, the quicker you work your way through the sine wave, just stopping along the way to quickly set the duties to wherever you are on the 3 waveforms. The faster you go, you may eventually only pick 20 points evenly spaced, but even that looks an awful lot like a sine wave. So the faster you go, the lower the resolution of the sine wave, but it's still a sine wave, but with a higher frequency.
Quote:
Originally Posted by e*clipse
This is a fake quote. it's so much fun making people say things they didn't actually say! hahaha
|