I want throttle to be more like on an ICE

John in CR

100 TW
Joined
May 19, 2008
Messages
14,954
Location
Paradise
I'd like to make the throttle for an electric behave more like on an ICE car or motorcycle. For example, I want to have more current capability on tap, so when I want to accelerate faster I can do so instantly and variably. I want to be able to control this extra performance, so once I become accustomed to how my motor reacts temperature-wise I can run more aggressively, OR I can run more conservatively (eg accelerating up an incline) and not waste battery capacity.

This seems like something needed even if 2 inputs are required. I guess what I'm asking for is control over voltage (typical PWM), AND control over current.

Does this already exist? CA current limit doesn't count as this should be immediately variable. If not, how can we emulate it?

John
 
John in CR said:
I'd like to make the throttle for an electric behave more like on an ICE car or motorcycle. For example, I want to have more current capability on tap, so when I want to accelerate faster I can do so instantly and variably. I want to be able to control this extra performance, so once I become accustomed to how my motor reacts temperature-wise I can run more aggressively, OR I can run more conservatively (eg accelerating up an incline) and not waste battery capacity.

This seems like something needed even if 2 inputs are required. I guess what I'm asking for is control over voltage (typical PWM), AND control over current.

What you want is a variable constant current controller. That would apply a fraction (that you determine) of the motor's power through the motor's full speed range. Functionwise, that's more or less what a conventional motorcycle's throttle does.

I'm sure it could be done, but it would probably take one heck of a smarter controller than what we're used to-- something with a closed feedback loop, more like a motion control system than like a throttle. It would probably still use PWM power electronics, but with an interpretive control layer automatically adjusting effective voltage in relation to back EMF in order to attenuate current draw. In that regard, it would be like a CycleAnalyst taking the place of the throttle twistgrip, making constant adjustments to meet the rider's demands (which would be expressed through another twistgrip). Lookup tables could be used to deliver constant torque, constant power, or a speed-dependent rising rate.

Justin could make it happen, but I'm guessing he won't. The opportunity for a total loss of rider power control (that is, for the controller to "fail on") would keep me from selling it to the public for a reasonable price.

Chalo
 
John in CR said:
I'd like to make the throttle for an electric behave more like on an ICE car or motorcycle.

Chalo said:
What you want is a variable constant current controller. That would apply a fraction (that you determine) of the motor's power through the motor's full speed range. Functionwise, that's more or less what a conventional motorcycle's throttle does.

I'm sure it could be done, but it would probably take one heck of a smarter controller than what we're used to-- something with a closed feedback loop, more like a motion control system than like a throttle.

Don't Kelly controllers use motor side (phase) current control already? As Chalo mentions, controlling motor current with the throttle should give an ICE-like response (throttle controlled torque output). I think that it might be good to add in a touch of speed limiting to the basic torque control equation, but I'm not sure this would be needed. John - Wouldn't controlling motor torque directly and proportionnally with the throttle be what you are looking for? I don't see why you would need a second throttle.

I've been playing with a closed loop current control algorithm recently, and have finally managed to build a stable one using a PID loop. For simplicity I started using only one phase of my controller without any commutation, and using battery current instead of motor current. My next step will be to use the phase current instead of battery current in the loop (hardware is already there), then integrate the resulting PID code back into my main controller code. This should yield good proportionnal torque control.

Additionnaly, since the phase current is monitored and adjusted at the PWM frequency (~20kHz), so I'm hoping that I'll be able to reduce the "choppy" feel of the motor commutations when accelerating under heavy load and low speeds. My present thinking is that the "rumble" that we feel at low speed/high torque is produced by uneven motor current during each commutation, and this occurs because the motor's back EMF is not really trapezoidal but more like a rounded trapeze. I believe that this produces higher currents and both the start and ends of each motor commutation, and lower current in the center simply because regular controllers feed a square wave into the motor. This would effectively produce a rumble at the commutation frequency which happens to be very low at low RPM. Maybe I'm wrong about this (another knowledgeable person I know thinks othewise).

And I don't really know what you mean here, Chalo:
Justin could make it happen, but I'm guessing he won't. The opportunity for a total loss of rider power control (that is, for the controller to "fail on") would keep me from selling it to the public for a reasonable price.
I can't see how using a closed current loop would make the controller any less robust... Can you explain?
 
Current limiting based on motor phase current vs. battery current is not quite the same as a current mode throttle.
To get the desired response, you make the current limit a function of throttle position. To make it a true torque mode, you need to measure the motor current, but as ZapPat has discovered, this is somewhat challenging on a brushless motor. It comes pretty close if you measure on the battery side.

I built something like this. See this thread: http://endless-sphere.com/forums/viewtopic.php?f=2&t=78&start=0&hilit=current+mode+throttle

I thought the newer versions of the CA had this feature built in (must be programmed in software).

In practice, it makes it real easy to avoid large currents when starting out or running at reduced speeds. If you just ride WOT all the time, it doesn't make much difference.

One issue is if the part of the op-amp circuit decides to take a crap, you could have a stuck on full throttle condition. On my circuit, I added a switch to bypass the circuit and go back to normal throttle.
 
I'm designing my supplemental controller to determine the battery current limit depending on the throttle position so it'll be "more responsive" in certain conditions. I was thinking it'd be linearly mapped(on a current limit of x amps, 50% throttle would correspond to x/2 amps), but I'm not sure if another type would be more appropriate(like exponential or something).
 
Ok, so it's not something I can do and will wait for someone like yourselves to develop it. What about something easier, like a current boost button? Could adding and extra pathway to a shunt that is switchable be an easy solution?

This is my situation. The small motorcycle hub motors I'm using give me a real 45mph bike with the factory controller at 60V, which I've had up to 89kph (55mph) in a tailwind. The only time the motors heat up is on inclines steep enough to bog the motor (15-25% grades). ICE moto's eat me up at the stoplights, and I want to change that as my small contribution to promoting EV's.

My first step is to upgrade the unknown 15 fet controller to 4110's and increase voltage to 72V. The next step up that I can easily do myself is going to dual motors. With the ability to add higher current for a limited number of seconds I may be able to get the performance I want without sacrificing too much range or stressing the motor and stay with just a single rear motor. On hills the ability to increase current may even reduce stress on the system by being able to maintain a speed where the motor is more efficient (yes higher power use but a shorter time, possibly improving overall efficiency up that hill, ie waste heat reduction). The norm here is small ICE's, and I don't expect or desire performance on par with high performance street machines, but I do want to be able to catch the typical ICE guys by surprise.

John
 
ZapPat said:
And I don't really know what you mean here, Chalo:
Justin could make it happen, but I'm guessing he won't. The opportunity for a total loss of rider power control (that is, for the controller to "fail on") would keep me from selling it to the public for a reasonable price.
I can't see how using a closed current loop would make the controller any less robust... Can you explain?

There are just more layers of complexity between the user's input and the motor. The logic layer in particular would be hard to diagnose as having a problem (until after it did something erratic) and impossible to override short of cutting the main power. These machines are not fighter jets-- they won't ever be equipped with triple modular redundant controls. Thus any logical fault could cause the controller to disregard or misinterpret control inputs, which in the worst case would mean the controller defaults to full power, without warning, at an inopportune time.

I use a fuse and a master disconnect plug on my e-bike, but I don't bother to keep a power cutoff or "deadman switch" close at hand. I would want one if my e-bike were logic controlled.

Chalo
 
Chalo said:
ZapPat said:
And I don't really know what you mean here, Chalo:
Justin could make it happen, but I'm guessing he won't. The opportunity for a total loss of rider power control (that is, for the controller to "fail on") would keep me from selling it to the public for a reasonable price.
I can't see how using a closed current loop would make the controller any less robust... Can you explain?

There are just more layers of complexity between the user's input and the motor. The logic layer in particular would be hard to diagnose as having a problem (until after it did something erratic) and impossible to override short of cutting the main power. These machines are not fighter jets-- they won't ever be equipped with triple modular redundant controls. Thus any logical fault could cause the controller to disregard or misinterpret control inputs, which in the worst case would mean the controller defaults to full power, without warning, at an inopportune time.

I use a fuse and a master disconnect plug on my e-bike, but I don't bother to keep a power cutoff or "deadman switch" close at hand. I would want one if my e-bike were logic controlled.

Chalo

When you say "logic", I assume you mean the micro's program complexity (firmware)?

Of course there is a certain amount of truth in what you say, but I would still tend to dissagree. Of course more code complexity requires more debuging and a longer test period, but it doesn't mean that it will end up more buggy or prone to runaway as you mention. I'm sure Justin's CA code is fairly complex (sounds like it uses a PID/PI algorithm itself), and I've not yet heard of it bugging on someone and going haywire. In fact I haven't hit a lock up in my controller code for quite a long time now. Not only this, but I use a micro with a robust hardware motor control module, and use interrupts for the most time critical events. A bug causing a potential runaway condition would have to be pretty darn weird to continue commutating the motor and at the same time locking the throttle's control (hasn't happened to me yet in a couple years and thousands of hours of playing with this particular PIC micro). If some young and buggy code where to have some major fault arise in my own setup, it would likely result in the battery fuse blowing and coasting to a stop. Using a micro with specialized motor control peripherals is a must in my opinion...

On a side note, I'm sure the code in the infinion (for example) is more complex than many basic ebike controllers just because of the extra features it offers but I have yet to hear of a lock up on one of these. And of course there are kelly controllers, or sevcons or other industrial ones that use also PID algorithms and other features without being unreliable.
 
John in CR said:
Ok, so it's not something I can do and will wait for someone like yourselves to develop it. What about something easier, like a current boost button? Could adding and extra pathway to a shunt that is switchable be an easy solution?

John

Yes, you could do something like that, but having a switch in series with a shunt element would have problems with contact resistance variations. It works better to switch a resistor in series with the shunt signal going to the controller. This way you can use tiny wires and switches.
 
fechter said:
John in CR said:
Ok, so it's not something I can do and will wait for someone like yourselves to develop it. What about something easier, like a current boost button? Could adding and extra pathway to a shunt that is switchable be an easy solution?

John

Yes, you could do something like that, but having a switch in series with a shunt element would have problems with contact resistance variations. It works better to switch a resistor in series with the shunt signal going to the controller. This way you can use tiny wires and switches.

I'd think that a "Turbo" button would be a common desire. Can controllers handle this variation in shunt resistance on the fly or would they get confused?

John
 
I would think it'd be easy and wouldn't cause the controller to get confused if you added a resistance in parallel with the shunt. However, the contact resistance of a button is probably going to be higher than the shunt itself(Just measure these things to make sure) so it might not be of much benefit. For an easy hook up, just measure the resistance of the shunt and then make sure the resistance of the button is lower than that. If the total resistance of the "button path" is equal to that of the shunt, then that should double your current limit. Half of the shunt, and it should triple your current limit.

But, contact variation... huh, does a button's resistance significantly vary when being pushed down?
 
fechter said:
John in CR said:
Ok, so it's not something I can do and will wait for someone like yourselves to develop it. What about something easier, like a current boost button? Could adding and extra pathway to a shunt that is switchable be an easy solution?

John

Yes, you could do something like that, but having a switch in series with a shunt element would have problems with contact resistance variations. It works better to switch a resistor in series with the shunt signal going to the controller. This way you can use tiny wires and switches.

Wouldn't have to match the input impedance (with the series resistor) of the controller's "shunt signal line" to double the current limit and to know the input impedance to control what the current limit is going to be? How would you suggest measuring the input impedance?

Edit: Or, wait... I know what you're getting it. Experiment with different resistances and find out! But, now comes the question - How does one put something in series with the shunt signal line? Does that suggest you have to break the trace?
 
swbluto said:
<snip>

But, contact variation... huh, does a button's resistance significantly vary when being pushed down?

could be something really silly like it does not contact with the same pressure every time. also it will not always contact in exactly the same place every time. the resistance will change ever so slightly. doesn't mean anything when you are switching power to some thing and the .020R resistance of the contact won't mean much. but when you are using it to influence a shunt that is an even lower resistance than that contact (typically less than 0.005R) those variations are a large difference.

so i guess the most accurate answer is "DEPENDS".

rick
 
I'm sure that Fechter's suggestion is the way to go, but "tiny" sounds like we're talking about sizes impossibly small for me and my caveman electronics skills to work with.

How about another route? I've got a couple of CA's yet to be installed. I think I can handle reducing the shunt resistance and measuring the new value. Then could I use my CA somehow to generally limit current to what I have now and with something switchable make it allow more current?

John
 
the CA cannot by itself increase the current limit. it can only lower it.

the shunt or modified shunt will set the absolute maximum limit. the CA can then be programmed to choose a value somewhat lower than that. the problem s that there is not a convenient method to change the CA set limit. or to disable the CA limiter on the fly. it could only be done by reprograming the CA to a different set point.

typical shunts measure 0.005 or lower. the ones in the Crystalyte analog controllers are around 0.001R. one foot of 10AWG wire has the same resistance. and that is a thick chunk of wire. what you are talking about is taking a few feet of wire from one end of the shunt, to a switch mounted on the handlebars and back to the other end of the shunt. if the controller is at the rear that would be about 10ft or wire or 0.010R just for the wire. add to that the 0.002R or more contact resistance of the switch and the value jumps to at least 0.012R. so just the wiring alone will put 0.012R in parallel with the original shunt. the new resistance will become 0.001R || 0.012R = 0.00092R for all practical purposes only an 8% change for all of that effort. not sure if you will even notice the boost.

oh yeah feel the power!!!! i got less than 8% turbo boost. i also got a couple of battery jumper cables running from my controller to my turbo button on the handle bars.

rick
 
Rick,

I was thinking of using a 30 amp relay (or pair of them if necessary) that I already have in order to keep the wires as short as possible, maybe 2-3" total.

John
 
John in CR said:
Rick,

I was thinking of using a 30 amp relay (or pair of them if necessary) that I already have in order to keep the wires as short as possible, maybe 2-3" total.

John

this is one of those cases that may most easily be solved by trying it. too much depends on the components being used. hope you share your results. but i would not count on the results being repeatable or for others to be able to duplicate them.

rick
 
John in CR said:
How about another route? I've got a couple of CA's yet to be installed. I think I can handle reducing the shunt resistance and measuring the new value. Then could I use my CA somehow to generally limit current to what I have now and with something switchable make it allow more current?

John

That would work.

Increase the current limit in the controller by soldering the shunt to give you the turbo setting. Program the CA to limit at a lower value. Use a small switch to disable the CA throttle pull down and engage turbo. The switch would just go in line with the wire that goes to the throttle.
 
fechter said:
John in CR said:
How about another route? I've got a couple of CA's yet to be installed. I think I can handle reducing the shunt resistance and measuring the new value. Then could I use my CA somehow to generally limit current to what I have now and with something switchable make it allow more current?

John

That would work.

Increase the current limit in the controller by soldering the shunt to give you the turbo setting. Program the CA to limit at a lower value. Use a small switch to disable the CA throttle pull down and engage turbo. The switch would just go in line with the wire that goes to the throttle.

Great, something I can do pretty easily, and it gives me one more reason to get off my butt and connect the CA's. Thanks Fechter, you're the King!

John
 
ZapPat said:
Chalo said:
ZapPat said:
I can't see how using a closed current loop would make the controller any less robust... Can you explain?

There are just more layers of complexity between the user's input and the motor. The logic layer in particular would be hard to diagnose as having a problem (until after it did something erratic) and impossible to override short of cutting the main power.

When you say "logic", I assume you mean the micro's program complexity (firmware)?

Of course there is a certain amount of truth in what you say, but I would still tend to dissagree. Of course more code complexity requires more debuging and a longer test period, but it doesn't mean that it will end up more buggy or prone to runaway as you mention.

My relevant experience is with CNC machinery (open and closed-loop) and vector motor motion control systems. Some of these systems have been more stable than others, but I don't think I ever worked with one that didn't run away at one time or another. Some of them were chronic about it-- for instance on one machine, chips and dust would clog the CNC control's air conditioner filter, the computer would get hot, and the machine would run away. Others had good fault condition detection but no discrimination about shutdown-- for instance I had a Baldor vector motor control that applied full electric braking upon encountering any sort of error or parameter violation. The trouble was, it was running a scientific test apparatus with a loop of slack chain on it, and sudden braking caused the machine to crash.

Anyway, I'm sure with something as simple as a one-axis speed controller, the digital controller could be made very reliable. But no system that has a computer in charge of a motor is 100.00% reliable, and given the price sensitivity of this market, I'm skeptical about the willingness or ability of any manufacturer to bring an exceptionally stable and fault-tolerant system to market. At the least, I would want a freewheel, a controller that was able to shut itself down upon detecting a fault condition, and a cutoff switch within easy reach.
 
Back
Top