squigdawg
1 µW
- Joined
- Dec 16, 2018
- Messages
- 4
Like Shredkid and others on this thread, I'm also experiencing the Instantaneous Overcurrent Fault with BBSHD and Phaserunner. It happens almost every time during hard acceleration and I’ve tried everything I can think of with no luck. With a 52V battery everything runs great and no faults using the Kp=1 Ki=10 values that others have recommended, but at 78V (21S) I can’t make it reliable.
Here are some things I’ve tried:
I see on the Developer tab (and included BOD.json file), Instantaneous Over Current Trip Threshold (address 29) is set to its maximum value of 116 Amps. I *think* what is happening is the poorly tuned PI controller (due to incorrect Kp and Ki values) is overshooting the 96 Amp target and tripping the fault. The graphing feature on the Dashboard tab doesn’t ever show the overshoot past 96 Amps, but I think the polling rate is just too low. Anyway, here are some observations that don’t make sense:


Here are some things I’ve tried:
- Recommended PLL bandwidth = 2.5, current regulator bandwidth = 2500. This results in a “judder” that I assume is the controller with too much gain oscillating around the setpoint.
- Auto-tuned with both 4 and 88 pole pairs (77 rpm/V vs 3.5 rpm/V due to ~22:1 gear ratio to the cranks). No difference either way.
- Lowered max phase amps from 96 to 50A (50A torque is much gentler but still faults)
- Arielpixels’ solution here: Keep voltage at 52V, use CA current limit and throttle ramping. Also, set current bandwidth and PLL to 0. Then set Ki and Kp manually. Kp = autotuned 118, lowered Ki to .2. Still faults.
- Tried the Beta v1.1 Phaserunner software with no difference, then went back to current version v1.0.5.
- Sensorless start. I didn’t give this a fair try because I don’t like the hesitation on start interfering with wheelies and starting on steep hills.
- “Torque Up Ramp” left at default 200ms. Did not want to increase this since faster start response is the goal.
- Manually tuning Kp and Ki with Current Regulator Bandwidth set to 0. More details on that below.
I see on the Developer tab (and included BOD.json file), Instantaneous Over Current Trip Threshold (address 29) is set to its maximum value of 116 Amps. I *think* what is happening is the poorly tuned PI controller (due to incorrect Kp and Ki values) is overshooting the 96 Amp target and tripping the fault. The graphing feature on the Dashboard tab doesn’t ever show the overshoot past 96 Amps, but I think the polling rate is just too low. Anyway, here are some observations that don’t make sense:
- When using the “current regulator bandwidth” mode without manually tuning Kp and Ki, the advice is to *increase* current regulator bandwidth if you are getting instantaneous over current faults. But that increases both Kp and Ki making the current response more aggressive causing the over current fault more easily. What am I missing here?
- When manually tuning Kp and Ki, Kp behaves as expected: Kp too small and motor current doesn’t reach the max. Kp too large causes oscillations and noise from the motor. Ki, however, seems to be much too sensitive. With Kp=0, the very first increment of Ki=0.0625 (Ki register is scaled by 16 so quantized to increments of 1/16) causes aggressive motor current ramp to max in just a few milliseconds. It’s not clear what rate the current regulator is updating at but I would expect you could set Ki to the smallest value and get a nice slow ramp up of motor current over several seconds.
- If I set a small current regulator bandwidth like 20 radians, it calculates small Kp=0.01 and Ki=2.44 values that you can see in the greyed out text boxes and the motor current response is very gentle. However, setting current regulator bandwidth to 0 and manually entering those same Kp and Ki values gives a very different aggressive motor current response. Why is the response so different if Kp and Ki weren’t changed? Could this be a bug that helps explain why the overcurrent fault keeps happening when using a manual Ki setting? I'll try asking Grin support and post back if I make any progress.

