mrbill
10 kW
justin_le said:This behavior should be somewhat better in the P7, but I know what to do to make it work perfectly.
I went out riding this afternoon to test a bunch of stuff on my bike: new front wheel, reversed usual spoke orientation on rear wheel non-drive side to better handle disk brake torque under hard braking, and the CAV3, P7 firmware. Up and down lots of hills.
http://www.trimbleoutdoors.com/ViewTrip/2874325
The surging or kick of motor power upon resumption of PAS-mediated throttle is less than it was with P6. I still get kicked occasionally, but most of the time the initial application of power is kick-free. I did change some of the parameters: upRamp -> 2.5v/sec (lower was too sluggish for when I press the throttle to get power NOW!), and fastRampCurrent I increased from 0 to 1.7 Amps. With P6 setting this to anything but zero caused more kick, but it seems to work as expected in P7.
mrbill said:It feels like the CAV3 is ignoring the prior assist factor (set by aux pot) or throttle ramping when power is re-applied after a 3-second break in pedaling or after a 3-second application of the e-brake.
What's actually happening is that the power feedback loop is still attempting to output a higher and higher signal if you pedal during the ebrakes (which separately forces the output low) and then on releasing the ebrakes there is a built in "wind-up" in the feedback term. The up-and down ramp rates are always being followed, but you have them set so high that it's not having much effect. I think that's why I haven't noticed this since I've typically had a much more subdued up-ramp, and with hub motors I don't think an overshoot is felt with quite as much kick.
Your explanation makes sense. I still do get an occasional kick, and it's hard for me to remember all the conditions that led up to the misbehavior. I think it occurs more often (but not always!) after running the motor for a while in PAS mode, then taking a short pedaling break, then resuming pedaling with a kick.
(The other rough edge, a minor nuisance, is the wide hysteresis of the speed limit when approached from above the max speed. If decelerating through the max speed, resumption of power is delayed unless one is decelerating very slowly. E.g. if max speed=20mph and bicycle decelerates quickly from 25 mph through 20 mph as when a downhill is following by an uphill, power might not be applied until speed is down to 15 or 16 mph and momentum lost. PSGain=0.85v/mph, IntSGain=200, and DSGain=200. The parameters were tweaked for approaching the speed limit from below.)
Ha yes, this is part of the asymmetric control problem (CA can apply power to speed up the bike, but has no ability to control the deceleration rates) and I'm glad you reminded me of it since there may be some room for algorithm changes to better cope with that. If you do increase the DSGain to a higher value though you should find that the situation is improved, as then it will sense your rapid deceleration and attempt to increase the throttle output accordingly.
OK, I will try some higher values for DSGain and see if that improves the behavior of approaching speed limit from above without causing too much oscillation when approaching speed limit from below.
It would be nice if PAS-mediated throttle signal observed the throttle ramping parameters. I'm using up-ramp of 3.5v/sec, fast-ramp of 5v/sec and down-ramp of 40v/sec.
Try in this case having your standard up ramp at 1V/sec, and if you find that it is switching from the fast to the standard up ramp too soon then either increase the fast ramp current threshold from 3A to more like 5 or 6A, OR reduce the fast ramp rate a bit so that the current draw of the motor as it is ramping up to an RPM that engages the drive chain is less than the current threshold. You want the throttle to quickly reach the voltage where the motor RPM is now matched to the drivechain RPM, and then take a slower path from that point on. 3.5 V/sec may not seem too fast, but given that at a given RPM the controller goes from no current to max current over about a 0.3-0.5V span (depending mostly on the motor's winding resistance), it means that the effective time to go from zero to full power is on the order of 0.1 seconds. That's not a whole lot of time for the CA to respond in.
On today's ride I realized my ramping was a bit too fast. I tried 1v/sec, but this resulted in too sluggish throttle behavior (and PAS behavior). I gradually increased the upRamp, 1.7v/sec, 2.2v/sec, and settled on 2.5v/sec. I also turned on the fastRamp by setting current to 1.7A, just under the full-throttle free-spin current of my motor. Since I updated to P7 I haven't tried higher fastRampCurrent values that would only be attained when the motor is loaded, although with P6, higher fastRampCurrents gave harder kicks. My goal is for the throttle (manual or PAS) to feel instantaneous or nearly so, but gradual enough not to overshoot the other limits or to give me a kick.
Let me know if subjectively things improve with the suggestions posted above and I'll work on addressing some of the key algorithm issues to optimize things further.
Thanks for looking into these two issues. I'll experiment with DSGain this weekend.
Oh, and I really like the new Aux Adjust display that appears when I adjust the Aux Pot. Nice to see the actual power level I'm dialing in. One improvement would be to have that display persist for a couple seconds after the Aux Pot value stops changing. It disappears too fast!