simplefoc / Arduino-FOC

Arduino FOC for BLDC and Stepper motors - Arduino Based Field Oriented Control Algorithm Library
https://docs.simplefoc.com
MIT License
1.95k stars 511 forks source link

[BUG] Fix KV initialization #344

Closed runger1101001 closed 2 months ago

runger1101001 commented 7 months ago

like this image can someone check my math make sure im not crazy lol

Change the sqrt(2) to sqrt(3) and it should be ok. But maybe put the sqrt(3) somewhere else. It doesn't make sense to have a strange kv with the same name.

Elwin — Yesterday at 10:39 PM Because the id iq vd and vq are like phase-zero quantities. The kv is in phase-phase.

Elwin — Yesterday at 10:42 PM I think you should change it here https://github.com/simplefoc/Arduino-FOC/blob/f9e9a2d29e912957bd75302d4f9a83a1cdff37a5/src/BLDCMotor.cpp#L399

Elwin — Yesterday at 10:47 PM Is the code ment for motors with a trapezoidal back emf? Because if I recall correctly than it could be wrong what I just said. I only work with sinusoidal bemf motors.

runger1101001 commented 7 months ago

PR merged, so this will be closed with the 2.3.3 release