Been very busy here with the saliency (?) based position detection, want to detect the rotor phase at standstill by measuring the differences between the motor inductances.
And I want it good, just dividing the rotor position in 60 degree portions (like what you get with hall sensors) will not be good enough, I want like 8 bits or so. Basically the goal is to get phase info as if there was a resolver, but then without the resolver but based on the motor inductance info.
The level of processing this needs is staggering. To get 8 bit info is actually quite simple (but needs a trick that took me 5 days to figure out), the MSB though (the bit saying we're between 0-179 or 180-359 degrees) is a real #@$%#^*$&*. Been playing with sending out a bit pattern in the Field weakening dimension (Id or Iq, don't know what it is called officially, I call it I_imag), using matched filters etc to detect it back in the saliency and then based on inversion or not decide the MSB. This kinda worked but was horribly unreliable and audible noisy to boot (oh yeah, another thing is I don't want a loud tone or anything like that).
Also had to start using the DSP as simple first order lowpass filtering is no longer good enough. Have now switched over to FIR filtering and doing stuff like sample rate conversion.
I do now have something that works for deciding the MSB, but it does not work always. I already figured out why this is and also how to fix it, but it will again put an extra layer of complexity on top. Luckely at the moment I am nowhere near the limit of the processor, the one I have now does 70 M instructions per second versus 30 for the 30F.
Good thing it is so complex though, with me being out of a job at the moment it is a fun project to keep me busy (though with the summer going on here there is also lots of cycling and motorbiking to be done