Arduino-FOC
Arduino-FOC copied to clipboard
False Clarke Transform in FOC
While trying to implement the foc algorithm for a delta wound linear motor, I stumbled upon a little mistake in clarke transform which resulted in unstable current control loop.
i_alpha = 0.6666667*(current.a - (current.b - current.c)); i_beta = _2_SQRT3 *( current.b - current.c );
If am not wrong It is supposed to be like this
i_alpha = 0.6666667*(current.a - current.b / 2 - current.c / 2); i_beta = 0.57735 *( current.b - current.c );
You're absolutely right! I've tested the code mostly for 2 adc signals and since I'm did not have a setup with 3 adcs. I'll update the code for the next release, unless you wanna make a pull request? Thanks!
I would really like to. I also made some modifications in order to find currents on a delta wound motor from two current sensors.
Hello Nemantor, Can you share your Clarke transform formula for delta winding from two current sensors too ?
Here are the equations required to solve for the phase currents of a delta motor configuration. (I only did it for two current sensors)
` float I_a = (...); // the routine can be inserted float I_b = (...);
current.a = ((I_b - I_a) / -3) * -1;
current.c = ((I_b + (2*I_a)) / 3)- *1 ; // the signs of the currents must be adjusted depending on the orientation
current.b = (-current.c - current.a)*-1;
`
Hi Nemantor, Amazing ! I had never done the difference between a star winding and delta winding in FOC in motion control... Why to divide by 3 instead to divide by square root of 3 ? So from your formulas without (* -1) => I_alpha = -(I_b - I_a) / 3.0f; I_beta = _1_SQRT3 * (-(I_b - I_a) / 3.0f) + _2_SQRT3 * (-I_a);
Is it correct ?
Thank you in advance for your answer.