Delay of Cycle Analyst Limiting Functions

dan p

10 µW
Joined
Jan 7, 2008
Messages
5
Location
Norfolk, VA
Is it normal that my Cycle Analyst shows that my speed and (more importantly) my amps are peaking way above the limits that I've set in the basic setup? I've read that the way it works is to just inhibit the throttle when the limits are exceeded, but it seems like there is a significant delay before it starts cutting the throttle back. Is there any way to decrease this delay time? Is it not of much concern since it's just a momentary spike? I'm not really worried about it because my batteries are 8ah and can supposedly handle a 5C discharge rate and my controller is limiting the current to ~39a, but I would think that this would be a problem for those who have added solder to the shunt in their controller and are relying on their CA to limit the current.
 
Yep.. mine do it too.

It was not an exact limit but rather an average waveform type limit. I wanted to limit the controller to 20 amps to prevent my BMS from triping at 35.. but it was no use.

8ah 5C Ni cells can deliver 40 amps in short spikes, but long draws of this magnitude will make them darn hot..
 
Ok, glad it's not just me. Like I said, I'm not really worried, but was just curious because I haven't seen anybody mention anything about this.

And yeah, even without the limiting, I'd only be drawing close to 40 amps for the first few seconds when I get up to speed from a stop (there aren't a lot of hills around here). Even so, I'm going to leave my CA set to limit the current to 30 amps for now, so I'll only be getting very brief spikes up to 39 amps.

I checked the speed limiting function (no load) and set the speed limit to 19mph and when I hit the throttle, the speed shoots up to 38mph (my no load top speed), then falls down to 15mph for about a second, and then goes up to 19mph and stays there. I'm sure it's much less drastic when used with a load (I haven't tested it yet on the road)--I'm guessing it will probably let me get up to like 21 or 22 before dropping me back down to 19.

I guess I'm just surprised to see how slow it is to react to the limits being exceeded. Does anyone know if it is slow to react to the LVC limit being exceeded too?

By the way, I must say that it is an awesome product and I'm in no way denouncing it. I'm really into stats and the CA is half the fun of riding my new e-bike. :)
 
dan p said:
I guess I'm just surprised to see how slow it is to react to the limits being exceeded.

It is a consequence of smart compromise. CA guess the high load is approaching, so it let the speed crosover limit for a moment (short delay).
This way you get better response (better dynamic for a while).

When high load will occur it is better strategy to crossover the speed limit when load is still relatively low and trying keeping speed at that limit (when speed slowly falling under heavy load) - then trying avoid falling speed by maximize current/torque at heavy load.

The first strategy allow avoid excesive currents under heavy loads for a moment.
The rigid limit with no delay is not so convenient and smart.
 
dan p said:
I checked the speed limiting function (no load) and set the speed limit to 19mph and when I hit the throttle, the speed shoots up to 38mph (my no load top speed), then falls down to 15mph for about a second, and then goes up to 19mph and stays there. I'm sure it's much less drastic when used with a load (I haven't tested it yet on the road)--)

Are you adjusting for the centrifical forces that are at play? :?
 
Another thing to keep in mind is the controller's throttle response is slower to ramp up than it is to ramp down. If the motor overshoots the CA setting, it will slam the throttle input down, and won't come back up as fast due to the soft start circuit in the controller.

Under actual load, the response will be much better, since the inertia of the bike prevents rapid changes in load.
 
recumbent said:
dan p said:
I checked the speed limiting function (no load) and set the speed limit to 19mph and when I hit the throttle, the speed shoots up to 38mph (my no load top speed), then falls down to 15mph for about a second, and then goes up to 19mph and stays there. I'm sure it's much less drastic when used with a load (I haven't tested it yet on the road)--)

Are you adjusting for the centrifical forces that are at play? :?

Hmm... is it possible for a wheel to continue to accelerate after power stops being applied? I wouldn't think so.

Regardless, though, the problem is that power is still being applied after the limit has been exceeded.

fechter said:
Another thing to keep in mind is the controller's throttle response is slower to ramp up than it is to ramp down. If the motor overshoots the CA setting, it will slam the throttle input down, and won't come back up as fast due to the soft start circuit in the controller.

Under actual load, the response will be much better, since the inertia of the bike prevents rapid changes in load.

So, do you think that replacing the ramp capacitor with a lower value one would reduce the delay? I tested the speed limiter while riding my bike last night, and I was pretty close with my prediction--I set it at 19mph and I hit a max speed of 21.5 before it took me back down to 19. I'm not concerned with the speed limit being temporarily exceeded at all, but it would be nice if the amp limit wasn't exceeded.
 
dan p said:
Regardless, though, the problem is that power is still being applied after the limit has been exceeded.

Could you imagine quite different contoller with two different speed limits ?
First - burst speed limit and second continuous speed limit.
First limit would be set higher few km/h or mph and power could be applied up to 3 seconds (for example) if that limit will not be exceeded.
After that time if speed still been execeeded second (lower) limit the power would be cut off.

But such scheme is more complicated than one limit and default delay.
The main reason for speed limit is saving the power/batteries. So short delay dont burden for that. And you still can reach few km/h more for a moment. So it is more flexible for you this way: you have better acceleration for a longer period of time even if speed limit has been exceeded.
 
Hmmm.... changing the ramp up capacitor won't change how fast the throttle can decrease.

With my analog current limiter circuit, I do not see any noticable overshoot. It could get into sort of an oscillation under some conditions, but I slowed the response to prevent that.

Perhaps Justin designed the delay intentionally to prevent such oscillations. The overshoot should not be a problem under most conditions, but tripping the BMS on a battery could be a pain.
 
Hmm that is kind of disappointing to hear. I really wanted to use the CA as a true current limiter on a 4110 controller but if the shunts are too modified it sounds like you would blow your fets before it starts to ramp down. I think its time to start experimenting with kelly controllers.
 
If the shunt in the controller is set to a safe level, you don't have to worry about blowing your FETs. The CA can turn it down from there. It may still work well as a battery conserving feature even if there is a little spike.

If you slowed the controller ramp up, the current would not rise as quickly and the CA might be able to keep up. Of course, I hate a slow ramp up. There might be a comprimise somewhere between responsiveness and CA overshoot.
 
I had buying a cycle analyist on my wish list mainly for the current limiting features. I would like to run a 72v 20amp controller to consume maximum 15 amps for range. Is it a rocky ride? How long is this delay? Maybe I would shave the shunt down instead to limit the current - any suggestions? :?:
 
If you want to limit current to maximize range, I think the CA will work great. The overshoot we're talking about is like milliseconds. Just enough to trip a BMS, but I don't think you would feel it when riding.
 
dan p said:
Is it normal that my Cycle Analyst shows that my speed and (more importantly) my amps are peaking way above the limits that I've set in the basic setup? I've read that the way it works is to just inhibit the throttle when the limits are exceeded, but it seems like there is a significant delay before it starts cutting the throttle back. Is there any way to decrease this delay time?

There is indeed a way to decrease the delay time, and that is by increasing the feedback gain terms in the advanced setup menu. In this case you would be modifying PAGain (proportional gain for over-current error) and the IntAGain (integral gain for over-current error). As the values are raised, you'll get a faster response, but with an increased likelyhood of oscillation about the set point value. In general, the proportional gain is a little touchy for current control, so I would play around mostly with IntAGain. Just gradually increase the value from the default number until you are happy with the tradeoff between a fast response and a bit of jitter in the current control loop. The optimum value varies from setup to setup, depending on the motor type, controller type, and battery voltage, but generally you can have it reach a stable output in <1/4 second.

There is another parameters of possible importance as well, ITermMax, the max output to prevent integral gain wind-up. If you have ITermMax set all the way to 5V, but the motor controller considers 3.5V to be the peak throttle value, then the CA output needs to drop from 5V all the way down to about 2.9V (3.5V minus the 0.6V or so diode drop) before it can even begin to regulate the controller, and so this causes an additional delay time for the limiting to kick in. ITermMax should be as low as possible without causing the full throttle voltage to be clamped.

As others have noted in this thread, there is no way for the CA to limit current peaks that exist on the order of milliseconds, which can cause a BMS to trip or a mosfet to fry, that kind of really fast regulation needs to happen directly at the PWM chip on the motor controller. But the current limit will work perfectly for all other reasons, such as extending the range, reducing the continuous current draw from the battery pack, running at constant power, or what have you.

-Justin
 
Thanks for the tips Justin.

I've seen oscillations with my current limiter before. The motor makes a cool screaming sound. If you tweak the gain unitl oscillation just starts, then back off a bit, it should be optimized.

There is some delay in the controller itself, but only in the increasing direction (ramp up).

If the rate of change of current is slow enough, the CA will only overshoot by a tiny amount.
 
justin_le said:
dan p said:
Is it normal that my Cycle Analyst shows that my speed and (more importantly) my amps are peaking way above the limits that I've set in the basic setup? I've read that the way it works is to just inhibit the throttle when the limits are exceeded, but it seems like there is a significant delay before it starts cutting the throttle back. Is there any way to decrease this delay time?

There is indeed a way to decrease the delay time, and that is by increasing the feedback gain terms in the advanced setup menu. In this case you would be modifying PAGain (proportional gain for over-current error) and the IntAGain (integral gain for over-current error). As the values are raised, you'll get a faster response, but with an increased likelyhood of oscillation about the set point value. In general, the proportional gain is a little touchy for current control, so I would play around mostly with IntAGain. Just gradually increase the value from the default number until you are happy with the tradeoff between a fast response and a bit of jitter in the current control loop. The optimum value varies from setup to setup, depending on the motor type, controller type, and battery voltage, but generally you can have it reach a stable output in <1/4 second.

There is another parameters of possible importance as well, ITermMax, the max output to prevent integral gain wind-up. If you have ITermMax set all the way to 5V, but the motor controller considers 3.5V to be the peak throttle value, then the CA output needs to drop from 5V all the way down to about 2.9V (3.5V minus the 0.6V or so diode drop) before it can even begin to regulate the controller, and so this causes an additional delay time for the limiting to kick in. ITermMax should be as low as possible without causing the full throttle voltage to be clamped.

As others have noted in this thread, there is no way for the CA to limit current peaks that exist on the order of milliseconds, which can cause a BMS to trip or a mosfet to fry, that kind of really fast regulation needs to happen directly at the PWM chip on the motor controller. But the current limit will work perfectly for all other reasons, such as extending the range, reducing the continuous current draw from the battery pack, running at constant power, or what have you.

-Justin

Hello Justin, that's great to hear you again and that you help us with the CA!

I had some problem with my CA, and i wonder if it's because of some advanced setup menu parameter that could be wrong.

I observed that ONLY in COLD temperature outside, when i increase the throttle to run with my bike, it only respond by pulsating the power to the motor :| these pulse seems to be short and not perfectly regular.. maybe around 0.4hz maybe 100ms per pulse and that is insufisent to run my bike.

If i increase again the throttle, it keep pulsating without any change.

After couple of minutes, it begin to run normally and pulse become continuous throttle as i keep the throttle grip twisted... like if it need to warm up to accept continuous throttle...

Also, about that phenomenum, sometime, if i keep throttle max, the pulssating throttle become continuous and ramp up in less than 2-3 sec and my bike run continuopusly after that.

Also If i unplug the CA, it work normally... that's strange...

have you an idea that could help me?

Doc
 
Hey Doc, Did you look at the readings on the CA while that was happening?

It sounfds like it might be something I saw as well. When there is a high diffrence in tempeture between the CA and the controller, it reads wildly. if I reset it, the readings normalize for a while, or they normalize on there own when the tempeture diffrence lessons.

I'm thinking the CA might think it's already at max current because of the temp diffrence.

And Justin is the one to ask, but I think the temp diffrence is causing a thermo electric effect in the wires between the CA and the controller. It only effects me when I do something like drag the bike in from the 30 degeree garage and power it up in a 80 degree housee, with the controller insulated in a bag, and the CA exposed to the warm air on the handlebars.
 
Doctorbass said:
I observed that ONLY in COLD temperature outside, when i increase the throttle to run with my bike, it only respond by pulsating the power to the motor :| these pulse seems to be short and not perfectly regular.. maybe around 0.4hz maybe 100ms per pulse and that is insufisent to run my bike.

After couple of minutes, it begin to run normally and pulse become continuous throttle as i keep the throttle grip twisted... like if it need to warm up to accept continuous throttle...

have you an idea that could help me?

Hey Stéphane, that is interesting and the first I have heard a symptom just like this. A 0.4Hz frequency is quite low. When I was initially prototyping and parts sourcing I did run into a few situations with one particular op-amp where the output buffer that drives the throttle over-ride signal would go into oscillations when connected to the 5ft lead, presumably from the small output capacitance of the cable. That was at a way higher frequency but it led to a bit of a rough feeling in the ebike control loop.

One thing that could cause this kind of delayed power pulsation is if for some reason the CA is reading values that are WAY above the set points, which would cause throttle output to down to 0V in short order and then only later slowly ramp up. After this event, did you have a chance to scan through the Max and Min values to see if there was anything unusual was read for max amps or max speed, or even min volts? No idea why it would be cold weather related and then go away, but it would be an easy thing to look at for some clues.

Otherwise, I'm scratching my head for ideas. If the board was here I would wire up a small multimeter or portable oscilloscope to see what exactly is happening on the throttle over-ride line. The latest revision of the PCB has some small changes to this part of the circuit which better shields the op-amp output from the actual cable going to the controller, so if we can't sort it out then we'll do a circuiboard swap and then I'll have it here for analysis, although in all probability I'll have no luck at reproducing what you are seeing. -Justin
 
Drunkskunk said:
Hey Doc, Did you look at the readings on the CA while that was happening?

It sounfds like it might be something I saw as well. When there is a high diffrence in tempeture between the CA and the controller, it reads wildly. if I reset it, the readings normalize for a while, or they normalize on there own when the tempeture diffrence lessons.

I'm thinking the CA might think it's already at max current because of the temp diffrence.

And Justin is the one to ask, but I think the temp diffrence is causing a thermo electric effect in the wires between the CA and the controller. It only effects me when I do something like drag the bike in from the 30 degeree garage and power it up in a 80 degree housee, with the controller insulated in a bag, and the CA exposed to the warm air on the handlebars.

Temperature differences can have an effect on the current reading, but generally that would need to be a temperature difference on either side of the controller shunt resistor, not a difference from the controller as a whole to the CA box. The metal is the same (copper) and any thermoelectric voltages resulting from a temperature gradient would completely cancel out. Plus, a thermoelectric effect would produce a fairly small current offset, <<1A for sure.

If you are seeing wild readings, then that sounds almost for sure like an intermittent connection on one of the shunt leads (blue wire or white wire), most likely at the 6-pin connector with the controller, though I've run into two instances now where the actual stranded copper wire had a break in it (go figure) and some cases where the connector pin crimping didn't quite make full contact with the strands. Intermittent mechanical connections often appear to be temperature related in account of material expansion and contraction.

Justin
 
Hello Justin, Thanks for your detailed answer. I'll do my work and check for the throttle overide voltage with my scope. i'm not sure it have a diode for the throttle overide. The CA version i have is one of your lastest and it was a replacement for a unit i had that had problem with max speed display peak error.

I'll film the probelm if i can..

thanks Justin
 
Back
Top