flathill wrote:Excellent work! So the back emf of your motor is very close to a sine wave (which is why your controller is outputting sine waves)? Have you tried it with other motors? Could it account for a non perfect motor (winding/magnet/steel variations) if it always knew the position through self learning, or is the feedback delayed assuming a "perfect" motor (this is problem not a real world issue but could reduce noise)?
Yep, the back-emf of my motor is accidently close to a sine and this is why the controller is outputing a sine.
I haven't tried it yet but the program in the 30F has a gain factor in it to amplify a (RAM) stored back-emf
waveform to the final voltages in the PWM output stage. In the multiplication routine I added clipping which
flattens the top of the sines when the gain is high. This effectively changes the sine to a trapezoid. I tried
with the trapezoid when the algorithm was still in a kind of 'corrected' sensored mode, was fine then...
I build the motor in the video myself. The spacing inbetween the magnets and inbetween the coils has quite some
spread on it, the motor is far, far from perfect. But this is no issue for the algorithm, it doesn't need a perfect
motor. The algorithm extracts it position information at every clock cycle, it's not limited to only 6 sampling
moments per e-revolution as in a windmilling type algorithm. So, the feedback it not 'delayed' and does not
assume a perfect motor. There's no 'self learning' type algorithm as these are typically computationally expensive
and introduce delay in the system.
I haven't tried it with another motor (I only have the one from the video) but all throughout the design I've made
the system such that it is as general as possible. Therefore I didn't like the FOC algorithms you can find in the
application notes of Microchip or NXP, they all require knowledge of the motor (being Kv, winding resistance R
and/or winding inductance L). I find using motor parameter kind of tricky as they probably change with temperature
so I wanted something that's not dependent on them (ever see the series resistance explode with temp ? its scary)
I would love some input on how the algorithm works with different motors. It's not ready for it at the moment as
the video was literally made 5 minutes after I got it to work, but maybe it's an idea to mail some programmed
30F4011 chips around so people can try it in their own controllers (you would need to build the power stage etc
yourself or do a brain transplant on a Lyen controller)...? Your motor has to be able to deal with field weakening
though (I read somewhere that field weaking can damage the permanent magnets but I don't know how tricky this is).