View Single Post
Old 09-24-2015, 05:40 PM   #2066 (permalink)
e*clipse
Permanent Apprentice
 
Join Date: Jul 2010
Location: norcal oosae
Posts: 523
Thanks: 351
Thanked 314 Times in 215 Posts
Hey Paul,

How does your FOC part of the code deal with finding the motor position? I think I've figured out a way to (more or less) directly use the sin and cos inputs of the resolver in the SVM part of the code. My motor's resolver goes through two electrical revolutions/mechanical revolution. Being a 4 pole pair motor, there needs to be 4 electrical revolutions of the field per mechanical revolution. Believe it or not, there's a lot of symmetry with this arrangement that might provide some coding opportunities.

I don't know if you're doing the same thing, but in the Microchip "sinusoidal" example code, the SVM part of the code broke the 360* of rotor position into 6 sectors, then used the adjusted angle to calculate the PWM times.

If you do a similar thing, this may work. No lookup tables. No calculating sin, etc. No interrupts.

Is your FOC part of the code in C? Maybe I could see if there's a possibility with it. If it's in assembly, I'm not sure if I want to remind myself...

E*clipse
  Reply With Quote