CA3 - Baserunner: Help with PID tuning for PAS only

pickworthi

100 W
Joined
Oct 1, 2020
Messages
129
Location
UK - Oxfordshire
<preamble>
I have replaced my previous KT style controller with a CA3 and Baserunner Z9. At the same time I got a 24 pole PAS sensor from Grin.
All wired connections are good, and everything functions as intended.
The bike is used for PAS only, and I want it to be UK street legal, so 16mph max assist speed.
Its a 36v (10S) battery system. Batteries have been built and tested by me, up to 18 amps continuous discharge.
Based on measurements I have taken from the previous system, the motor (a generic Shengyi - thread here: https://endless-sphere.com/forums/viewtopic.php?f=30&t=112495 has adjustments I thought were needed) is happy at a maxim of 500W. So that is what I have set the maximum power in the CA to. The motor provides a single pole speed sensor via the Baserunner (weird thing to cheap out on - but there it is).

I set the PAS to power mode, max start 500W, zero RPM gain (I pedal at 85-95RPM, so no use for RPM adjustment). Throttle is set to OFF mode.

I adjusted WGain down to 9 to get rid of rough sound when near full power.

I set maxSpeed to 21mph, and use the Digital Aux to scale it down to the desired 16mph (or less for trails).

All throttle ramp up/down settings are at the CA defaults (except that I made PAS the same as throttle, since no throttle).

I have left the Baserunner torque ramp up interval at 200ms (the default).
</preamble>

Unfortunately, I have one problem that I just can't get a handle on - all related to max speed limiting at 16mph:
- Using the default CA settings (PSGain=1.01, ISGain=30, DSGain=300) the bike accelerates at full power (500W) all the way to 20ish MPH, and then very slowly lets the power off until the speed drops to around 15mph. It will only finally settle at 16mph if I am on a reasonable incline where around 200W is required to maintain speed. Example: when coasting on a downhill, the CA powers at 500W if I start pedalling when speed is 20mph, and takes a while to realise it is WAY over the limit.

- If I use the Digital Aux to limit the maximum speed to lower than 16mph, I get a fairly consistent 4mph overshot with the behaviour as above.

I have spent many hours studying the advice in the CA unofficial guide, and also the GRIN tech pages for the CA3. I first tried adjusting around the CA default settings for the PID loop, with no success. Actually I mostly could just make it worse. (I tried single change at a time - reducing PSgain, and ISGAin - trying to get the over damped behaviour.)

Today I spent 4 hours riding up and down a flatish piece of road, trying to implement the CA Unofficial Guide Appendix F process.
What I find is that a PSGAin setting that produces "a single modest overshoot occurs before the speed settles" appears impossible. I either get a very sluggish, over damped, low power (<100W) progression to about 11-12mph, or a full 500W progression to 20ish mph. The difference between the two is just 0.01 in the PSGain setting. (IS=1 & DS=0 in Appendix F).

At this point I am assuming that there is something else in the system that is making it so unforgiving.

I really want to achieve the behaviour as stated in the GRIN tech manual: "A 3 term PID control algorithm is employed in firmware to enable a smooth rollback of motor power as target speed is reached without oscillation."

If anyone can provide some suggestions as how to achieve a "modest overshoot" I would be eternally grateful.
 
I have tried the same thing with a similar setup, and just ended up with zero I and D parameters, and something high on the P parameter. Think it was around 2. Its not ideal, but at least it doesnt overshoot, and I can "lean" on support around 25kph.
I am not sure if it is possible to get this any better with only one pole per revolution, and constantly changing parameters from pedals and road.

Tbh I am using basically the same setup (I have added a little bit of I and D, but mostly P) on a DD setup on another bike, with 30 something poles. I also tried the unofficial guide, but could not make it any better.

Please let us know if you figure out something else 😁
 
Many thanks for your response. I was getting pretty despondent about this, so knowing I'm not alone is really helpful to my mental state :)

I decided to spend the day on my "rolling road" ( https://endless-sphere.com/forums/viewtopic.php?f=3&t=109112 ) , since the weather was indifferent today. Although the indoor resistance trainer is an imprecise simulation of the on road experience, it has the advantage of consistency, and also is not influenced in any way by the speed of pedalling, beyond the start point.

As a result I have learnt a few things that may be of general interest:

1) To be sure a setting change has been applied correctly, I had to power the CA off then on again after each change made through the on-bike interface. I experienced quite a few unexplained results before settling on this as a method. So a) enter setup and make the change, b) leave setup, c) Power off CA, d) power on CA, e) wait for "SETTINGS CHANGED!" message to flash. May well be overkill, but it yields consistent results.

2) Sitting on the bike in a static trainer, I can give the display my full attention. I thus noticed that the diagnostic display will flash a small "D" or "P" in front of the speed field when either DS or PS is in play. This is more information that the S flag, which is basically on all the time with my setup if the motor is being powered.

3) Battery voltage matters when comparing the results of setting changes. Testing from dead stop to speed limit puts a high load on the battery, so voltage sag is inevitable as time goes on. To be sure, rotate batteries to keep voltage more or less in the same range while testing.

4) The PS, IS and DS settings are balanced on a knife edge. Very small adjustments can result in very big changes. This makes on the fly on road adjustment either very hard, or impossible.

As a first step, I adjusted the throttle out MIN and MAX settings on both CA and the Baserunner so that they match what I think is a typical Hall throttle range on a generic KT controller - 0.88 to 4.4V. I then scaled the CA default ramp up and ramp down settings proportional to the increase in throttle range. I than calculated the time from no throttle to full throttle for each ramp up and ramp down, and set the Baserunner Output Torque ramping values to match the CA. The following images show where I ended up:

CA Throttle settings:
Screenshot_2021-08-12_18-05-48.png

Baserunner Throttle settings:
Screenshot_2021-08-12_18-07-24.png

Baserunner Torque Ramp settings:
Screenshot_2021-08-12_18-09-15.png

I set the speed limit to 14mph for all tests.

<first test series>
I had a go at the CA Unofficial Guide Appendix F method, but I had no success. PS, IS, DS all equal to zero gives no power, but that is the only consistent setting I could find :).
I tried IS=1, DS=0 and a very small value for PS (0.3) - and I got almost no acceleration on the first time I rotated the pedals after making the setting, and then full power acceleration (0-21mph!) the second and subsequent attempts. Power CA off and on, and exactly the same happens again. Totally weird. All other values of PS give me the same result, some just get to 21mph faster than others.

(21mph is significant because I think it is the max possible speed for this setup given Voltage, wheel size - 700C - and motor winding.)

Appendix F says that the method does not work for low power. Given the USA focus in this forum, I suspect that 500W is considered low power. Anyway - all us 250W nominal motor owners here in the old country are on our own apparently.
</first test series>

<second test series>
I then decided to start from the default settings in the CA:
PS=1.01, IS = 50, DS = 300
As on the road, this yielded hard acceleration to a 4mph overshoot, and then a few oscillations down to 14mph.
This time I could pay close attention to the diagnostic display, and I could see that DS came into play very briefly. So, I upped DS by 10%, and immediately I got a noticeable change. Acceleration pulled back a bit before reaching the peak, and then settled a bit faster. The "D" indicator was a bit more prominent during time to settle. After a few iterations, judging by the sound the motor was making, I settled on DS = 310 as the least worse option.

Any changes - even small ones - to PS or IS yielded an instantly worse outcome, in that either the system would oscillate wildly around 14mph, or the overshoot would increase with more power being applied.

I was still getting a very hard acceleration phase past the set limit at this point, with very small roll off on the way up. But, still slightly better than the on road experience.
</second test series>

<third test series>
Given the problem appeared to be power related, as in too much too long, I did a set of tests where I varied the CA power gain setting. As I brought it down ( from 15.0 - the CA default), I could hear that the motor was straining less during the first acceleration phase. This also yielded a faster roll off at the top of the peak, and much less power correction during the settle.
I worked the power gain setting down to 7.0, where the overall feel appeared the best compromise between steady power roll on and slow uptake.

I had the Baserunner plugged into my laptop while doing the tests, and this last phase yielded data that looked like this:
Screenshot_2021-08-12_18-45-41.png

The X-axis is time in seconds. Unfortunately the Baserunner logging tempo is less than once a second, so the data pictured here is just an indication, with a lot of variation that happens in fractions of a second missing (like the peaks for example).
Ignore the speed value - it's kph, plus the Baserunner has a very imprecise wheel setting parameter.

However, this is the closest I have ever been to the behaviour described in the CA manual, so I'm hopeful.
The settle time appears to be in the 8-10 second range. That may be the next thing to work on.
</third test series>

Tomorrow I'm going out on the road to see what I have achieved. I fear that the reduction in CA power gain will prove a bit too sluggish to live with, but I'll give it the benefit of a long ride to get the full picture. At least adjusting power gain on the road does not yield the wild swings that changing PID values seems to provide.

My apologies for this lab report style post. I want to be thorough, so as to be as helpful as possible.
 
Ride today was interesting. My concern that the CA power gain would be too sluggish was unfounded. Acceleration was smoother than before, with a longer time to start, but not bad. Also, the motor is running quieter during a start, so that, I think, is a good thing.

Based on what I could see and hear, I now understand better the difference between my measurements on the static trainer, and what happens on the road. On the trainer, the changes in wheel speed are very fast, so the rate of change is high. On the road, the system has my weight to contend with (stop that sniggering in the back row). I thus deduce the following:
1) On the trainer the power does not ramp up on the way to the peak as much as it does on the road, since on the road it takes longer, and there is more time for the power to ramp up. This in turn leads to a longer time at the overshoot peak, since the CA has more power to roll back.
2) On the trainer the DS setting takes effect because the rate of change is fast. This explains why a relatively small DS change on the trainer had a noticeable effect. On the road, the rate of change in speed is much slower, and hence the DS setting I have appears not to be coming into play as much.

On the ride today I played around with pre-empting the peak overshoot by adjusting the maximum speed down as the power surge really kicks in. This works, I can get the speed to level off with a max speed of 14mph, and then click it up to 15, then 16, and I get a settled assist at 16mph. So, a solution of sorts if I want to stop with these settings.

I think what the speed adjustment shows is that having a single pole speed sensor is not the issue in this case. The reaction to adjusting the max speed is just about instantaneous - so the CA "knows" what the speed is fast enough to react to my change. Also, at 18mph (the average overshoot speed) the wheel is rotating at over 200 rpm - so the CA is getting enough information to know quickly that it is over max speed.

Going forward, I am going to be guided by this part of the CA Unofficial User Guide:
Screenshot_2021-08-13_19-08-17.png

The chart suggests that increasing DS has the effect I seek (decreasing overshoot and decreasing settle time) so that is where I will start. Over the course of a ride I'll increase DS around 10% a time until I get a noticeable change. At that point I will know whether it's a change worth having - I'm hoping for the power roll off during acceleration that I could briefly see on the trainer.

I'll report back after tomorrows ride.
 
Today's ride was inconclusive.
As planned I increased DS several times, 30 each time. It was hard to spot any sure fire change in behaviour by the time I reached the end of the ride, with the setting at 610 (started at 310).
It felt like the power up to the peak during acceleration was being rolled back a bit more, but it also felt like no change in some circumstances.
Once settled at the target speed, on a small incline, the power needed to maintain the target speed stabilised nicely - so that bit is still working. With higher DS values, the roll on when the speed dropped off the settle point (e.g. when the road rises up) was faster than for lower values, which feels like good behaviour when riding (i.e. no loss of power then surge back). So for settled speed the increased DS values appeared to be better.
But, when the system gets it in it's head that a lot of power is needed - upward of 300W - it just won't let go until it has reached a 3mph overshoot (approx). Even if I stop pedalling briefly when the target speed is reached (and thus cut power), when I resume the CA still wants to surge to the peak. It can't be that CA is lagging in measuring the speed - I can see the speed displayed on the screen - so it knows it's over limit - but keeps going regardless.
That extra unneeded power is really hurting the battery range.

This could mean that the differential part of the PID equation is being swamped by the combined effects of PS and IS, and no value will make a difference. Or, it could mean that my DS setting is still way too low.

This section in the Grin manual has been going round my head for a while now:
Screenshot_2021-08-14_17-48-10.png

Especially "increased by a factor of 2 or 3 for ebikes running a torque-based controller". Clearly this would apply to me, since I have a Baserunner. But, when I increased all three values by 2 and 3 on the trainer, the results were rubbish - wild oscillations with no settle. That could be due to the trainers rapid speed changes - as I mentioned in an earlier post. I'm a bit dubious.
Also, it is being a bit vague - which values to increase? All of them, one at a time? Something else? Not clear.

So I am expanding my plan a bit as follows (all increases off the CA defaults):
- I will increase just DS by 3 times it's default value. I'm already at 2 times, so that would be the next step from the manual's point of view. See what happens.
- I will try a 2 and 3 times increase to just IS. See what happens.
- I will try a 2 and 3 times increase to just PS. See what happens.
- I will try across the board increase of all three values by a factor of 2, and then a factor of 3. See what happens.

Perhaps this will give enough evidence to use as a way forward.

As an aside, when I was asked "what will you do" when I retired, i never occurred to me to say "more maths" :)
 
pickworthi said:
- I will try across the board increase of all three values by a factor of 2, and then a factor of 3. See what happens.
This was the approach that yielded results in the end. Almost satisfying that this whole exercise boils down to RTFM :)

I settled on a local piece of road that has flat bits, up bits and down bits. About 1.5 miles. Road it both ways after each adjustment to assess any changes.
Changing all three settings in unison with the same factor from the defaults yielded positive changes, but it wasn't until I got to a factor of 5 times that I got a really good result.
So:
- Default values: PS=1.01, IS=50, DS=300
- Scaled up by factor of 5: PS=5.01, IS=250, DS=1500

With these setting the peak overshoot was reduced to around 1.5mph (from 3-4mph before).
- Power roll on was faster on the way up to the target.
- Power roll off started at around 0.8mph after the target was passed (the little mph indicator starts flashing on main display)
- Roll off was faster. Overall time at full power reduced.
- Settle on target speed took just one swing back down below the target speed - depending on the road resistance.
- What I call "brow of the hill surges" are reduced. (As in coming off a full power climb onto a downhill.)

Compared to what I was seeing before, this is a big improvement. The feel on the road is better, with obviously overpower surges much reduced.

I stopped at 40 miles because dinner time was approaching. It looks like there is room for further improvement, so next ride will continue the up-scaling until either I get an ideal outcome - or something bad starts happening.
 
Just a brief report today.
Further increases in the three gain setting (by factors of 6, 7, 8 and 9) yielded steadily worse behaviour. Oscillations increased steadily, until it got quite unpleasant.

Today I took the serial cable attached to the BaseRunner along for the ride, and I adjusted the Output Torque Ramping settings back to their defaults: 200ms up, 60ms down. This had a small effect at the 5x settings - the power reduction during overshoot appeared faster, but that may just be my imagination. Anyway, the reasoning here is that the Baserunner needs to respond at the rate that the CA wants - so small smoothing delays seem good.

I need to have a lot more riding and thinking time to see if I can improve on the current settings. As it stands, the bike is now enjoyable to ride again, without hard surges getting in the way. Still some micro surges - especially on flat road - but much better. Not much flat road around here anyway :)
 
Still working on this.

I have found that riding up and down the same stretch of road does not yield settings that work for me on a normal ride. I suspect that I become over fixated on the numbers, as well as possibly a psychological effect of wanting to see change and improvement.
I have thus changed my approach to making a change, and then going on a whole ride with that change to asses it. Also, putting more weight on what my legs are feeling in terms of assist and overshoot. Whole ride for me means 35 miles minimum. That covers most types of road profile I come across.

My focus is on what I'll call a "pump and dump". This is where the system provides more power than needed to reach the target speed, overshoots by a significant amount, and then "dumps" my poor legs with the job of maintaining it. This is a bad feeling when my legs are tired. Pump and dump is most common on roads where gradient is 1-3%, with occasional little rises. It's the rises that causes the effect mainly.

I suspect this may not be of much interest here - given so many threads that are about maxed out power, 500W may be a bit esoteric for the audience. I'll wait until I have something significant before posting again.
 
pickworthi said:
Still working on this...
...
I suspect this may not be of much interest here - given so many threads that are about maxed out power, 500W may be a bit esoteric for the audience. I'll wait until I have something significant before posting again.

I found this of interest since I am on the cusp of purchasing a baserunner, 24 pole pas sensor, CA3 and aux input. I had thought that the components worked seemlessly together.

I am not sure I follow everything about your set up... are you not using the aux button to set and scale up the pas boost level incrementally so that the bike does not immediately go to the highest speed?
 
TorontoBuilder said:
I found this of interest since I am on the cusp of purchasing a baserunner, 24 pole pas sensor, CA3 and aux input. I had thought that the components worked seemlessly together.

I am not sure I follow everything about your set up... are you not using the aux button to set and scale up the pas boost level incrementally so that the bike does not immediately go to the highest speed?

That is exactly what I bought.

I have the digital aux set up so that it effectively goes up and down in 1mph increments. I set the speed suitable for the road conditions in front of me.
The issue is, whatever speed I choose, the CA/controller accelerates to well above the set speed (2-3mph typically), and then throttles back. At it's worst, I get the "pump and dump" effect - high assistance , then nothing. My legs don't like this.
I don't want to be constantly fiddling with aux settings while riding either. The point of riding a bike is to enjoy it, not spend all your time trying to get it to work correctly :)

That said - I am currently quite close to a workable setup. I have a few more rides to do before declaring it acceptable.

I currently think that, because the bike has a low power to weight ratio, the default speed limiting settings do not function very well.
Clearly they do work for some people - so something specific in my overall setup I think.
 
TorontoBuilder said:
I found this of interest since I am on the cusp of purchasing a baserunner, 24 pole pas sensor, CA3 and aux input. I had thought that the components worked seemlessly together.
...
Remember that picworthi is trying to limit speed and some overshoot, something that you likely are not going to consider.

I have a 500w/PAS/Baserunner configuration and the only change I made to the CA settings was to slightly modify how fast the power came on for my winter riding (this is also a front hub setup). Otherwise it's a wonderfully smooth and surprisingly responsive setup right out of the box.
 
Mclewis1 said:
Remember that picworthi is trying to limit speed and some overshoot, something that you likely are not going to consider.

I have a 500w/PAS/Baserunner configuration and the only change I made to the CA settings was to slightly modify how fast the power came on for my winter riding (this is also a front hub setup). Otherwise it's a wonderfully smooth and surprisingly responsive setup right out of the box.

I am adding friction drives to wife and my Vintage Cannondale H600s that we ride mostly on bike paths along the lakeshore in Toronto, so I need to ramp up the torque slowly to prevent slippage, and limit the speed to comply with the law. We have cycle cops who are very vigilant.

I'm not saying I lack confidence in my chosen set-up from Grin, just concerned it wont be as dead simple as I expected.
 
While the CA setup parameters are initially a bit confusing the examples (suggested ranges of the settings with descriptions) do help even if you don't understand exactly what each parameter actually does. I wonder if Grin has any guidance specifically for a friction motor setup to give you an effective starting point? My guess would be that just slowing the power ramp up would initially get you in the ball park.

I'm guessing any setup used on Lakeshore is going to be put through a fair amount of star/stop actions (or at least slow/speed up) but I do understand the need for the oversight. It's been 20+ years since I've been on that route. A popular long Sunday ride when I lived in TO was Yonge > Leaside area > Sunnybrook pk > Taylor Creek > down Vic pk > through the Beach > Boardwalk > the Spit > Commissioners > Lakeshore path > Lakeshore Blvd out sometimes as far as Winston Churchill > then return home with a few shortcuts. Once I started paying more attention to average speeds I got tired of the pedestrian traffic in the parks and on the Lakeshore path and then started going north (up Bayview and Yonge) to King City to get metric and regular century rides in with friends ... although it was fun to continue to train on the open roads of the Spit and along Commissioners.
 
I used to do similar ride through the sunnybrook, but down from York mills thru the Donalda club, over Lawrence to Edwards gardens, then thru Seaton and Taylor creek over to Dentonia and back up VP.

Now I live near in Port Union, so to get DT it is either Kingston Rd or the waterfront trail.. Kingston rd has psycho drivers and high fatality rate, so I keep to the trails being old man now.

I know there are a few videos of the CA3 being programmed so I should be ok.
 
pickworthi said:
Mclewis1 said:
My guess would be that just slowing the power ramp up would initially get you in the ball park.

Would you mind sharing the exact parameter(s) you change to achieve this?

I would try the speed limit tuning parameters in the phaserunner software... the settings only matter if you have limited the speed as you have.

ojK7BznigjZ480IsnY5U0sL_q3EqA2Sup7JNLlx_4d53d-GW58J04jZdE2FkJP_U5w79ILjn2oOzoV_kF0z1wW4JcAFEQoyxNzxmml8tHtriZB02fjqzyTlViSMYBk9nfg=w1280
 
pickworthi said:
Mclewis1 said:
My guess would be that just slowing the power ramp up would initially get you in the ball park.

Would you mind sharing the exact parameter(s) you change to achieve this?
I'd start with PAS ramp up rate under the Throttle Out Settings in the CA Setup Utility which is also referred to as ThrO->PAS Rate in the documentation for manually changing the CA settings.

Remember that regardless of whether you have a physical throttle, PAS, or torque sensor that the CA just looks like a throttle to the controller.
 
Since starting this thread, I have done 20 rides, covered 955 miles, and made a lot of parameter adjustments. I am now in a position to declare that I have found a set of parameter values that:
a) Limit the initial overshoot on transition from power to speed control to between 0.5 and 1 mph depending on the road resistance
b) Hold a steady 16 mph with only 0.2 - 0.3 mph variation on roads where speed can be maintained without having to resort to full power

There are still a few niggles, the main one being that it is still a bit slow to recognise a significant increase in load (e.g. a steeper ramp). This causes the bike to loose more speed than necessary, and thus causes a stronger over correction, which in turn causes another overshoot as in a) above.

This is a different world to the one I was in when I got the CA3 and Baserunner. To be honest, I thought then that I had bought a pup - the bike was close to un-rideable. Now, it feels good, no surging, no pump and dump. So, if anyone else finds themselves in a similar position as me I'll say that perseverance is the answer. There is very likely a set of parameter values that does what you want - but you do have to put in the miles on the road to find them.

What I will do in following posts is:
1) Show the parameter setting I have arrived at, with some notes around how I got to some of the values (they will undoubtedly look a bit odd).
2) Show some data from the last ride, showing on the road performance
3) Offer my current theory about why I can't improve on some aspects of the performance
 
The parameter settings.

First, the Baserunner:
-----------------------------
Screenshot_2021-09-13_21-22-17.png
When I started this journey I thought that giving the throttle the widest possible range (1v-4.4v) would allow the CA to smooth out the oscillations. I have now decided that a smaller range (the Baserunner default in this case) allows a faster response to PID algorithm changes.

Screenshot_2021-09-13_21-22-47.png
I the same vein as above - these ensure that the Baserunner responds quickly to any change the CA wants

Screenshot_2021-09-13_21-23-03.png
This is just to make it clear that the Baserunner's speed control will not be involved. well not unless I fall off a cliff :)
(Aside: If I set the value to over 100km/h, the Baserunner refuses to load the parameters.)


Next, the CA3:
-------------------
Firmware version is 3.14 (latest stable as of this posting date).

Screenshot_2021-09-13_21-32-45.png
I get the speed signal from the Geared hub motor via the white wire. I'm stuck with one pole since I don't want the clutter of an external speed sensor.
The wheel diameter is calibrated to my Garmin speed sensor and Garmin Edge 1000.

Screenshot_2021-09-13_21-33-06.png
All the throttle ramps are set high, I've been increasing them steadily, and may well continue doing so until I get a bad result.
The reasoning is that I want the PID control loop to be able to make whatever change it needs without then being damped by a ramp setting. Also, the bike plus me has a very low power to weight ratio (less than 2 watts per kilogram). So I need as much power as soon as possible to get the thing moving.

Screenshot_2021-09-13_21-33-28.png
I set the maximum speed to 20 mph, mainly because it makes it easy to set the digital aux to increment in 1 mph clicks, which I find convenient. I limit to 16 mph or below - honest.
Start speed is zero because I don't have a throttle, and the motor has Hall start.
No pedal max speed is irrelevant since no throttle.
Now for the meat:
PSGain: How on earth did I get to 4.87 V/MPH, I hear you ask. Well, it took a while. I figured that the default in a factory reset CA3 is 1.01 V/KPH. Now, if you change the units to miles, the PSGain stays at the default, i.e. 1.01 V/MPH. This is a much lower setting than 1.01 V/KPH. To get back on parity, the setting should be 1.62 V/MPH. With that as the default, I increase in multiples until I got to 3 times the default - as the CA3 manual suggests might be needed. (For some reason me setting 4.86 has turned into 4.87 - doesn't make a difference.)
ISGain: Starting at the default (50), I lowered the value until the speed limiting (flashing mph on the main display) was in effect from a low speed. I then stepped the value up in increments of 5 until I got a steady settle from just below the target speed. It's hard to describe - mainly reduced time to settle but also reduced overshoot. Higher than 70 yields too much overshoot. This value can still be fine tuned I think.
DSGain: (The value is actually 1000, the CA application only displays up to 3 digits - Setting on actual CA is 4 digits.) This setting comes from increasing DSGain from the default (300) until I could hear and feel the power getting skittish (sort of on/off cycle around the settle point). I then backed away until the skittishness stopped.

Screenshot_2021-09-13_21-33-46.png
Current and Power limits reflect my equipment's limitations.
Current gain is unchanged.
I arrived at the power gain value by following Grin advice in the help file, which is to increase gain until the power fluctuates, and then reduce by 30%. I was looking for fastest practical power increase for all the same reasons the throttle ramps are set high.

Screenshot_2021-09-13_21-34-24.png

Screenshot_2021-09-13_21-34-43.png
Power PAS setting.
I am using the Assist Start level and Assist scale factor to provide me with some level of throttle control. My usual cadence is in 85-95 rpm range, this combination yields max power at 70 rpm. I can thus pedal slowly on a crowded path when passing pedestrians, and I am unlikely to fall below 70 rpm during normal riding.
Start/stop setting gives a fast response with the 24 pole PAS sensor. I like a fast response - press on the pedal and power appears.

Screenshot_2021-09-13_21-35-03.png
This setting gives me the 1 mph per click I'm so fond of.
I also use this in crowded paths and other tricky areas to limit the speed to something suitable.
 
Here are some graphs from a stretch of road on my last ride with the settings I posted above. I'm afraid you need to zoom in with your browser to see what's going on.

Screenshot_2021-09-13_22-19-43.png
This shows the elevation profile of the stretch, and my speed. At the start I come off a downhill section, turn a corner, and head off. The graph shows a rapid settle around 16 mph, and then holding 16 mph with a couple of down-up fluctuations. The first was caused by a combination of rough road and gradient increase. The second was where I turned off the main road onto a side road (and thus stopped pedalling for a short bit).

Screenshot_2021-09-13_22-20-39.png
This graph shows the gradient, which is mostly around 0.8%. The bit of note is a short dip, followed by a short ramp of 5%. On the speed and cadence graphs there is almost no fluctuation at this point.

Screenshot_2021-09-13_22-21-27.png
This graph shows my pedal cadence. Despite my assertion in the last post that I usually pedal in the 85-95 rpm range, I decided to do this stretch at around 80 rpm. Since I did not change gear after the start, fluctuations in my cadence are directly proportionate to the speed, except close to the end where I negotiated a turn off the main road onto a side road. PID control handled that well I think.

I think this shows a well functioning PID algorithm. Small overshoot at the start, then settle and hold. The feel in my legs was of a constant effort, supported at different places with just enough power to keep the speed stable. No surging.

This outcome was impossible when I started, so I could say I'm pleased.
 
Whilst all the above is great, and I now get an enjoyable ride, there are still some niggles. I have a theory about them, which I will share here. I would be very interested to hear any counter points.

The remaining niggle has to do with speed of response when load conditions change. This goes two ways:
1) Riding along and a short ramp in the road appears. Speed starts to drop quickly, but the CA does not add significant power until a couple of mph are lost. At this point, it takes a lot more power to correct than it would have done if the response was faster.
2) Accelerating up and over the brow of a hill, the CA keeps powering on well past the target speed. At it's worst, this leads to removal of all power at around 17-18 mph, which is truly annoying if the road is busy getting steeper at exactly that point.

The setting I describe above mitigate these effects to a degree. But I think the root cause here is acceleration, and the CA's inability to measure it. The reason for that I think, is the single pole speed sensor.

The DS-gain setting I ended up at is very high. DS (differential speed) is acceleration. With a single pole sensor, although the speed is being tracked OK, the small changes in speed that signal acceleration/deceleration are not seen quickly enough to start adjusting power to compensate. So the high setting compensates a bit, but it can't magic up data that isn't there.

Thus, I think the only way to improve my setup further is to buy a shiny new SX1 motor from Grin, with the 6 speed poles it provides.
I'll talk myself into it at some point. The wife may be a tougher proposition :)
 
Back
Top