Arduino-FOC icon indicating copy to clipboard operation
Arduino-FOC copied to clipboard

False Clarke Transform in FOC

Open Nemantor opened this issue 4 years ago • 5 comments

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 );

Nemantor avatar May 01 '21 02:05 Nemantor

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!

askuric avatar May 01 '21 08:05 askuric

I would really like to. I also made some modifications in order to find currents on a delta wound motor from two current sensors.

Nemantor avatar May 01 '21 11:05 Nemantor

Hello Nemantor, Can you share your Clarke transform formula for delta winding from two current sensors too ?

Polyphe avatar May 09 '21 10:05 Polyphe

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;

`

Nemantor avatar May 11 '21 00:05 Nemantor

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.

Polyphe avatar Jul 12 '21 16:07 Polyphe