Hello,
I just started testing SimpleFOC shield 2.03 with Arduino Due.
It works in velocity close loop mode but I have some issues:
- There is an offset between target velocity and the actual RPM
- I have hard time adjusting the PID
— It does control - keeping up ± 2 Hz on the hall sensors. I was expecting more stable RPM.
— I can not get the max RPM of the motor -
My setup:
SimpleFOC shield 2.03
Arduino due
Motor: 4 pole pairs, 3 Hall sensors, 3.2ohm phase to phase, 12V power
Load: no load except a comparatively light encoder wheel
Code: I started it with the Velocity motion control sample and i modified it to enable the current sensing and to be able to change the target and PID parameters from the serial interface.
PID config for the best stability:
float new_pid_P = 0.02; // default pid
float new_pid_I = 0.03; // default pid
float new_pid_D = 0.0; // default pid
float new_pid_V_RAMP = 2000; // default pid
float new_LPF_V_TC = 0.00005; // velocity low pass filter time constant
Results with hall sensor input:
Target rad/sec Stabilized @ Stability
100 (15.91Hz x 4 = 63.66Hz) 66.5 ±0.5 Hz
200 (127.32Hz) 131.2 ±0.5
300 (190.98Hz) 194.8 ±1 Hz
Results with independent 10 ppr optical encoder
Target rad/sec Stabilized @ Hz Stability
100 (15.91Hz x 10 = 159.1Hz) 165.5 ±0.5 Hz
200 (318.31 Hz) 327.1 ±0.5
300 (477.46 Hz) 487.3 ±1 Hz
RPM stability was tested with varying the supply voltage 11 to 13 volts.
Can not adjust the RPM higher than ~340 rad/sec. After 360 there is no RPM change
The goal of my project is to achieve the most stable RPM adjustable between 500 and 3600.
I will appreciate any suggestion :).