# Conceptualizing a hybrid battery motor controller.



## Tahoe Tim (Feb 20, 2010)

The problem I see is where you say that the LA will do the heavy lifting. If by that you mean the acceleration, I think the Li can take a short burst of deeper C draw without damage. They are better than LA in all cases except for cost and toughness against balancing. 

I began planning to go lithium out of the gate but I am now understanding why others go with LA with plans to switch to li when the la's die. It lets you work out the bugs on a chap pack.


----------



## peggus (Feb 18, 2008)

You'd need inductors between your two switches and the motor for them to work at all, or split the field coil into two separate coils. 

The problem then becomes simple, the current in each phase is: (( pack voltage * PWM duty) - back EMF of the armature)/(resistance of inductors and coils). 
The current out of each pack is ~phase current * duty cycle

Frankly, I'd look into just paralleling lead acid with LiFePo, 4 cells for each 12V lead acid battery. 

The Li charges at 3.6V*4 = 14.4V. The Lead charges at 2.4V *6 =14.4V. The lead discharges mostly linearly from 12V down to 10V. The Li spends most of its time discharging around 12.8V-12V. With the two in parallel the Li will try to recharge the lead as the lead is being drained. Adding some resistance in series with the Li will limit its peak discharge rate. Charging would be done separately. You may also need a diode in series with the Li to prevent a freshly equalized Lead pack from overcharging the lithium.

Devil will be in the details as usual.


----------



## ga2500ev (Apr 20, 2008)

Tahoe Tim said:


> The problem I see is where you say that the LA will do the heavy lifting. If by that you mean the acceleration, I think the Li can take a short burst of deeper C draw without damage. They are better than LA in all cases except for cost and toughness against balancing.


That seems to be in direct contradiction to what Dimitri said. And Dimitri is currently running a Lithium pack. To quote:



> DO NOT buy smaller cells, DO NOT believe TS claims of 3C continuous rate. You will end up throwing good money after bad.
> 
> You need to plan for 2C-2.5C acceleration and 1C or less for cruising current. IMHO, anything less than 100AH is not good even for the smallest car.
> 
> Some people will say that 3C is fine, but there is a good chance that frequent 3C will shorten lifecycle, which would again cause you to throw good money after bad. Remember, TS lifecycle data is for 0.5C , not for 3C. They are only telling you good parts, and even those parts are half true.


Seems pretty clear that if you're going to use a small pack, that it must be current limited. The Headway data seems to go up to 5C, but at more than twice the cost, it puts the pack price out of range.


> I began planning to go lithium out of the gate but I am now understanding why others go with LA with plans to switch to li when the la's die. It lets you work out the bugs on a chap pack.


True, but the LA pack needed to get sufficient range is going to be too heavy for the application. Hence my question of having a hybrid pack.

ga2500ev


----------



## ga2500ev (Apr 20, 2008)

peggus said:


> You'd need inductors between your two switches and the motor for them to work at all, or split the field coil into two separate coils.


I do believe the motor in fct serves as the inductor in a PWM motor controller. I did not draw in the freewheeling diodes and cap bank, both which are required in any application.



> The problem then becomes simple, the current in each phase is: (( pack voltage * PWM duty) - back EMF of the armature)/(resistance of inductors and coils).
> The current out of each pack is ~phase current * duty cycle


So since the current out is a function of duty cycle, that means that the pack isn't instaneanously slammed when the switch is first applied? Like I said before, using short pulses during acceleration that lengthen as the vehicle comes up to speed and starts cruising would be an ideal situation.


> Frankly, I'd look into just paralleling lead acid with LiFePo, 4 cells for each 12V lead acid battery.
> 
> The Li charges at 3.6V*4 = 14.4V. The Lead charges at 2.4V *6 =14.4V. The lead discharges mostly linearly from 12V down to 10V. The Li spends most of its time discharging around 12.8V-12V. With the two in parallel the Li will try to recharge the lead as the lead is being drained. Adding some resistance in series with the Li will limit its peak discharge rate.


Adding resistance in series would also burn pack energy as heat. Conceptually inductors serve as current capacitors, so current ramps up as you charge the field in the inductor, and ramps down as energy is drawn from it. Unfortunately, I'm a computer scientist, not an electrical engineer, though I sorely wish now that I had taken a power electronics class when I had the chance. Since the energies on both sides are approximately equal, that means that the current is in fact integrated over the duty cycle. So the aux battery can add the energy that it wants and can cut off the current draw anytime it likes simply by shutting the switch down.

So my preliminary game plan is to measure the instantaneous current being drawn through B2 and S2 and when it exceeds a preset limit, cut the switch off.

I'll go do some testing on some much smaller circuits.

ga2500ev

Charging would be done separately. You may also need a diode in series with the Li to prevent a freshly equalized Lead pack from overcharging the lithium.

Devil will be in the details as usual.[/quote]


----------



## peggus (Feb 18, 2008)

ga2500ev said:


> I do believe the motor in fct serves as the inductor in a PWM motor controller. I did not draw in the freewheeling diodes and cap bank, both which are required in any application.


Yes but you need one inductor per motor controller. You can't just hook them up to the same terminals because when both switches are on the two packs will be directly connected to each other and nothing will limit the current.

You can split the field, add external inductors or use separate motors. 




ga2500ev said:


> So since the current out is a function of duty cycle, that means that the pack isn't instaneanously slammed when the switch is first applied? Like I said before, using short pulses during acceleration that lengthen as the vehicle comes up to speed and starts cruising would be an ideal situation.


It's a function of duty cycle and speed to be exact. You can regulate the current with a PID regulator, the input is desired current minus measured current, the output is dutycycle. This will achieve exactly what you want.

Stupid controllers like the Curtis just set duty cycle proportional to the throttle and cuts the pulse short if over current is detected.




ga2500ev said:


> Adding resistance in series would also burn pack energy as heat. Conceptually inductors serve as current capacitors, so current ramps up as you charge the field in the inductor, and ramps down as energy is drawn from it. Unfortunately, I'm a computer scientist, not an electrical engineer, though I sorely wish now that I had taken a power electronics class when I had the chance. Since the energies on both sides are approximately equal, that means that the current is in fact integrated over the duty cycle. So the aux battery can add the energy that it wants and can cut off the current draw anytime it likes simply by shutting the switch down.
> 
> So my preliminary game plan is to measure the instantaneous current being drawn through B2 and S2 and when it exceeds a preset limit, cut the switch off.
> 
> ...


Yes the resistance does add losses but the voltage difference would never be very high and your small Lithium cells would already have high internal resistance so a relatively low value resistor could be used and losses can be kept manageable, experimentation required. 

I'm merely proposing it as a less complex path to a hybrid pack.


----------



## ga2500ev (Apr 20, 2008)

peggus said:


> Yes but you need one inductor per motor controller. You can't just hook them up to the same terminals because when both switches are on the two packs will be directly connected to each other and nothing will limit the current.
> 
> You can split the field, add external inductors or use separate motors.


Or, as I believe I've been pointing out in my posts, you simply never turn both switches on at the same time. That was always my intent.




> It's a function of duty cycle and speed to be exact. You can regulate the current with a PID regulator, the input is desired current minus measured current, the output is dutycycle. This will achieve exactly what you want.


And I presume that if there is already an overcurrent condition in relation to the current limited pack, you simply do not turn it on at all.

That makes sense.

Stupid controllers like the Curtis just set duty cycle proportional to the throttle and cuts the pulse short if over current is detected.
[/quote]

But this is motor overcurrent right. While I still plan to have that in place, I also plan to have a current shunt connected to the current limited battery. Or is that unnecessary because when the switch is on, the currents between the battery and motor match? Or as I said before the energies match (battery V x battery A = motor V x motor A)?





> Yes the resistance does add losses but the voltage difference would never be very high and your small Lithium cells would already have high internal resistance so a relatively low value resistor could be used and losses can be kept manageable, experimentation required.
> 
> 
> 
> I'm merely proposing it as a less complex path to a hybrid pack.


But if the losses by going that route limits the range, then it's kind of defeating the purpose.

So iun essence you are proposing the following chain:

B2 -> R -> B1 -> controller -> motor

Where B2 is the small lithium pack and B1 the lead acid.

Have to agree that it is simpler. But it would still need to be a huge wattage resistance even if the resistance is low.

ga2500ev


----------



## BWH (Sep 26, 2008)

I know two of the guys who ran (and continue to run) 'The Olympian' back in the Tour de Sol days.

They were using a l-ion lead acid parallel pack a while back and were very happy with it. I'll send them an email and let them know about this thread. They may not post here but I'll pass on anything they send or PM me and I can get you in touch directly.


----------



## peggus (Feb 18, 2008)

ga2500ev said:


> Or, as I believe I've been pointing out in my posts, you simply never turn both switches on at the same time. That was always my intent.


Sorry, I missed that detail. That's a possible approach in theory, in practice it might be a bit tricky to implement. A very Interesting idea though! 

So to answer your original question, as you turn on S1 the current will start to rise in the inductor/motor as a function of (V1-bEmf)/L A/s. You turn off S1 and turn on S2 and current will continue to rise at a rate of (V2-bEmf)/L A/s.

V2 would see a higher current than V1 due to L having already been charged up by S1. Deciding when to switch from S1 to S2 in order to regulate the current from the limited pack would be the tricky part.

I suppose you could use two PID regulators, one adjusts the total pulse width to regulate the motor current and the second PID regulates the ratio of S1 to S2 on-time to limit the battery current from the Li. 
If the two packs are of different voltage tough the output of the second regulator would affect the gain of the first regulator. Could be tricky to tune.



ga2500ev said:


> And I presume that if there is already an overcurrent condition in relation to the current limited pack, you simply do not turn it on at all.
> 
> That makes sense.
> 
> But this is motor overcurrent right. While I still plan to have that in place, I also plan to have a current shunt connected to the current limited battery. Or is that unnecessary because when the switch is on, the currents between the battery and motor match? Or as I said before the energies match (battery V x battery A = motor V x motor A)?


If you're measuring and controlling the motor current you simply limit the current reference to the PID using the energy relationship you mentioned. Ex, if Motor V is 50V, batt V is 100V and max battery current is 100A then you'd limit the motor current reference to 100V * 100A / 50V = 200A. 

Alternatively you measure and control battery current directly, the throttle then becomes a sort of power command.



ga2500ev said:


> Have to agree that it is simpler. But it would still need to be a huge wattage resistance even if the resistance is low.
> 
> ga2500ev


I suspect it would be more like a stretch of 1awg cable, just a hunch though. Blow some air over it and you get a cabin heater too


----------



## BWH (Sep 26, 2008)

Oliver Perry said:


> Please pass on to the person going with the hybrid Li and Pb that we used 12 lead acid batteries in parallel with a Li ion pack that was close to 144 volts. Dr. Paul Kydd knows the exact details. It worked well but our acceleration was limited by the lower amperage Li-ion pack.
> 
> Ollie


Hey ga2500ev, check your PM box for Paul's address.


----------



## ga2500ev (Apr 20, 2008)

BWH said:


> Hey ga2500ev, check your PM box for Paul's address.


Thanks for the info.

ga2500ev


----------



## rmay635703 (Oct 23, 2008)

No offense but this seems your making something simple overly complex.

I would use 

1 Controller

A set of contactors

A switch

An ammeter

Accelerate using only the FLA connected to the controller, let off gas switch to lithium and maintain 1c or less when the need arises let off the gas switch back and go.

Clicking a switch should take no longer than a gear change, the charger is already charged so precharge issues will be minimal.

Your brain and eyes can monitor amps accurately.

Another possibility is to use PWM BEFORE your motor controller AKA PWM up to 100amps from the lithium pack into the FLA pack then both go out your main controller the PWM CHARGER would not use any flyback diodes. To accomplish your lithium pack would have to be at a higher voltage than the lead pack and PWM "charging" would have to occur at the same or lower rate as your motor current draw and then cease when you let off the gas.

Cheers
Ryan


----------



## ga2500ev (Apr 20, 2008)

rmay635703 said:


> No offense but this seems your making something simple overly complex.


None taken.


> I would use
> 
> 1 Controller
> 
> ...


If that's the case then a microcontroller can do it too. I see some issues:

1) Contactor wear.

2) Operator wear. Operator intervention is fine on an occasional basis. But the setup you're talking about would need to be engaged, disengaged, and monitored virtually every time the vehicle stops. 

3) It's very unlikely that speed will be maintainable at 40-60A only with lithium. So even at cruise the LA pack would need to supplement.

4) Does not take into account the heretofore hidden issue of the fact that the packs have different energy capacities and usage patterns. An automatic system is going to need to be used so that it is likely that the packs will drain proportionally.

The control system really isn't the issue. I'm just trying to grasp how in terms of current does a pack interact with a spinning motor. Peggus has been quite helpful in this respect.



> Another possibility is to use PWM BEFORE your motor controller AKA PWM up to 100amps from the lithium pack into the FLA pack then both go out your main controller the PWM CHARGER would not use any flyback diodes. To accomplish your lithium pack would have to be at a higher voltage than the lead pack and PWM "charging" would have to occur at the same or lower rate as your motor current draw and then cease when you let off the gas.
> 
> Cheers
> Ryan


So just to be clear:

B2 -> S2 -> B1 -> S1 -> Motor

B2 is the lithium and B1 the lead. If S2 and S1 were sequenced so that they were never on at the same time, would it really matter what the motor current was?

Now that's an interesting idea. I just wonder what the efficiency would be as compared to putting the B2 energy directly into the motor?

ga2500ev


----------



## rmay635703 (Oct 23, 2008)

ga2500ev said:


> None taken.
> 
> If that's the case then a microcontroller can do it too. I see some issues:
> 
> 1) Contactor wear.


 Minimal since you won't be HOT switching in that scenario



ga2500ev said:


> So just to be clear:
> 
> B2 -> S2 -> B1 -> S1 -> Motor
> 
> ...


Um no that really isn't right s2 is not really a true controller, it is a charger on the FLA pack it has no flyback diode and it is ahead of the primary controller. Charging the lead pack ahead of the controller is very different than having 2 controllers with 2 mismatched flybacks bumping around.

AKA your controller RELEASES current into the motor, the charger could not dump current into the motor as it is ahead of the primary controller.

The efficiency would depend on how closely you match the current in to the current out (it should trail just slightly so no current shunts into the FLA) and more importantly how closely you can match up the lead and lithium so the discharge lines never get too far apart, unfortunately you can't use a diode since the battery has a critical function of aborbing current when the controller and charger signals aren't "matched"

I would estimate the efficiency would probably be within 10% of just going directly into the motor, depending of coarse on how much "switching" loss there is throttling back the lithium pack. The less switching the more efficient.

Cheers
Ryan


----------



## ga2500ev (Apr 20, 2008)

rmay635703 said:


> Minimal since you won't be HOT switching in that scenario


Sounds complicated. Full gas with lead acid, release pedal, switch contactor, resume pedal with lithium.

Rinse and repeat, possibly each time you shift gears.

Not feeling the love there.





> Um no that really isn't right s2 is not really a true controller,


Never said it was. It's a switch.


> it is a charger on the FLA pack it has no flyback diode and it is ahead of the primary controller.


I'm with you.


> Charging the lead pack ahead of the controller is very different than having 2 controllers with 2 mismatched flybacks bumping around.


Now I'm not. The freewheeling diode is always connected in parallel to the motor. So there would only be one. So I cannot see how it would be mismatched.


> AKA your controller RELEASES current into the motor, the charger could not dump current into the motor as it is ahead of the primary controller.


If both switches in the diagram are closed, then the motor can certainly draw current through both switches. The fact that it is incorporated into a charger is not relevant. A charger is designed to pump energy (voltage and amps) into whatever is being charged. And if the motor is drawing current at that time, it certainly will draw current from the charger.

So I'm quite unclear how it can be otherwise if S2 is closed. The only way to guarantee that the motor isn't drawing current from the charger is to ensure that the charger and motor are never connected together at the same time.



> The efficiency would depend on how closely you match the current in to the current out (it should trail just slightly so no current shunts into the FLA) and more importantly how closely you can match up the lead and lithium so the discharge lines never get too far apart, unfortunately you can't use a diode since the battery has a critical function of aborbing current when the controller and charger signals aren't "matched"
> 
> I would estimate the efficiency would probably be within 10% of just going directly into the motor, depending of coarse on how much "switching" loss there is throttling back the lithium pack. The less switching the more efficient.
> 
> ...


Thanks for the info.

ga2500ev


----------



## rmay635703 (Oct 23, 2008)

ga2500ev said:


> Now I'm not. The freewheeling diode is always connected in parallel to the motor. So there would only be one. So I cannot see how it would be mismatched.
> 
> 
> If both switches in the diagram are closed, then the motor can certainly draw current through both switches. The fact that it is incorporated into a charger is not relevant. A charger is designed to pump energy (voltage and amps) into whatever is being charged. And if the motor is drawing current at that time, it certainly will draw current from the charger.
> ...


I don't believe you understand how a standard series wound motor controller operates.

??? Generally you NEVER place a current source between the motor controller & the motor as not only will the current through the controller be going into the motor but also (from the controllers point of view) an uncontrolled current flow which will also flow through the controllers tail end flyback diode.

Having an uncontrolled current flow messes up the controllers logic and also can easily cause severe damage to the controller, a sustained voltage going the wrong direction over a controller is very bad.

That is why the charger must not dump directly on the flyback (motor) side of the controller, it must dump on the battery side, this may seem trivial but it is very important for the controller to be able to operate, have a long life and do its job control current flow and throttle.

Cheers
Ryan


----------



## ga2500ev (Apr 20, 2008)

rmay635703 said:


> I don't believe you understand how a standard series wound motor controller operates.


I'm not sure that's the issue. In a normal configuration, the only power input into a series wound motor controller is the battery pack. What you are proposing is essentially to put an operating battery charger on that battery pack while the controller is running. That's a completely different animal than normal operation.


> ??? Generally you NEVER place a current source between the motor controller & the motor as not only will the current through the controller be going into the motor but also (from the controllers point of view) an uncontrolled current flow which will also flow through the controllers tail end flyback diode.


That has never been under discussion. We're not talking about connecting anything to the motor controllers output other than the motor. In my simplified text configurations in my previous post on this discussion, the motor controller is S1, which is right next to the motor. There is no additional current source between the controller and the motor. Let's repeat the diagram with some more meaningful names:

Lithium -> Charger -> Lead Acid -> Motor Controller -> Motor

See? Nothing between the Motor Controller and the Motor.



> Having an uncontrolled current flow messes up the controllers logic and also can easily cause severe damage to the controller, a sustained voltage going the wrong direction over a controller is very bad.


Not relevant to the discussion.



> That is why the charger must not dump directly on the flyback (motor) side of the controller, it must dump on the battery side, this may seem trivial but it is very important for the controller to be able to operate, have a long life and do its job control current flow and throttle.


Now let's get back to my point. If the charger and the motor controller switch on at the same time, then there will be a current draw from the lithium pack directly into the motor. It's essentially a configuration where the lithium and lead are in parallel. But since the lithium has a higher pack voltage (because it is charging the lead acid pack), then the controller is going to draw current from that lithium pack through the charger first before touching the lead acid at all. Which in my mind defeats the purpose of the initial proposal.

Now on the other hand the charger and the controller work in opposition to one another, then we may have something workable. The charger cannot accurately control how much current the motor and motor controller will draw from its input. However, if the motor controller is off and the charger on, then the charger output energy will flow into the lead acid pack charging it. And since it's only dealing with the lead acid pack, and not the motor controller and motor, it can limit the amount of current draw from the lithium pack through the charger used to charge the lead acid.

The still open question is how much energy is wasted charging the lead acid instead of just dumping it directly to the motor through the motor controller. I finally see that this statement above is what makes you think that I'm talking about bypassing the motor controller. I'm not.

Comments?

ga2500ev


----------

