EFeru / hoverboard-firmware-hack-FOC

With Field Oriented Control (FOC)
GNU General Public License v3.0
1.12k stars 932 forks source link

Synchronizing two different (by diameters) wheels #431

Open YB-Soft opened 1 year ago

YB-Soft commented 1 year ago

Variant

HOVERCAR

Control type

Sinusoidale

Control mode

Voltage

What can we do to make the firmware better?

I searched wiki and all issues and feature requests

Describe suggestions or alternatives you have considered

Hi Bro! Good greate job! I need help. How can i do [subject] in SIN mode for saving max speed? Diameters have relation 1,27. Wheel have different max speed and not linear curve of acceleration. I think so: i get cur speed from more powerable wheel get mismatch speeds and apply proportional mismatch cmdL(R), but comes jerks which can not to smooth out by PID, becouse we have a mechanical link through the road. This link not allow have different speed only one second without drifting. I think jerks need to smooth out on more low level PID. Now code not meaned for different control mode, currs, n_max for different wheel on level utils and main.c.

defines of this constants reused several times on low levels (bldc.c).

IMHO for modularity of code bldc.c and more low level control in bldc*.c must no using global constants high level parameters of motors (like a mode, n_max, curr max), but must get its like variables on enter (that allowing to control of motors with different parameters). Thank you!