# Selecting two regen torque setpoints with brake pedal



## etischer (Jun 16, 2008)

Someone here posted a message about how their NEV regen was programmed. I thought it was briliant and put the same feature in my controller. 










If I tap the brake pedal, "drag regen is selected". I can return to coasting mode (no regen) by pressing the gas pedal. 

If I press and hold the brake pedal, I get full regen braking. When I release the brake, drag regen is selected. When I press the gas pedal, coasting mode (no regen) is selected. 

This allows me to maintain speeds down hill without having to cycle between coasting and regen braking. Braking torque is set to 25% and Drag torque is set to 10%. 

Seems to work very well, I can have 2 regen setpoints without any additional buttons or pots.


----------



## Salty9 (Jul 13, 2009)

Could you give us an estimate of the percentage of total braking that regen does and its value to you? I hope to use this info down the road a bit.


----------



## DavidDymaxion (Dec 1, 2008)

That sounds like a great algorithm, thanks for posting!

Here's a random thought, each brake tap could bring on like 5 or 10% more regen.


etischer said:


> Someone here posted a message about how their NEV regen was programmed. I thought it was briliant and put the same feature in my controller.
> 
> 
> 
> ...


----------



## Dave Koller (Nov 15, 2008)

Nice thinking Eric -


----------



## etischer (Jun 16, 2008)

Salty9 said:


> Could you give us an estimate of the percentage of total braking that regen does and its value to you? I hope to use this info down the road a bit.


On the freeway typically 100% of my braking is done with regen. I can pull 100A at 335V, about 45 bhp. 

At slower speed the hp (and amps into the pack) is reduced because I am braking with the same torque but the RPM is less. 

I don't know how much range I gain by using regen, but on the long down hill stretches it's nice to pump power back into the pack. It makes up for the extra power required for climbing the hill.


----------



## etischer (Jun 16, 2008)

Dave Koller said:


> Nice thinking Eric -


It was actually El Rayo who gave me the idea. 



El Rayo said:


> Regen in my Th!nk is two stage 50A/100A. Regen is activated by the brake light switch and works like this: Press an hold brake pedal gives 100A regen above 60 kph, then amps is reduced gradually to 0 at about 20kph. Press and release gives 50A above 40 kph. Regen is disconnected when the accelerator is pressed.
> Energy captured by regen is about 5% - 8% according to the log in my Th!nk.


----------



## Jan (Oct 5, 2009)

DavidDymaxion said:


> Here's a random thought, each brake tap could bring on like 5 or 10% more regen.


I’m busy trying to do it a little different. With yet another arduino. I love those little buggers.

I wanted: 
- Regen when breaking, from zero to max at the moment the breaks physical start to work.
- Downhill regen breaking maintaining a constant speed.
- When no throttle applied a slow creaping speed, since it’s an 4x4. 

I came up with the following pedal behaviour:
- No pedals pressed = maintain current RPM exactly. If the RPM’s start to increase, apply regen. And if they decrease apply a little more power.
- Press the clutch pedal a little, and the car will freewheel. The motor will shutdown. Downhill this means gaining speed, otherwise the car will slow down slowly.
- Press the break, depending on the position regen will be applied, from zero to max just where they physically start to work.
- Press the throttle is obvious now.

So I get all what I want, including cruise control. And a very intuitive way of cruise control.


----------



## Olaf-Lampe (Feb 24, 2010)

I know from Siemens inverters, that they provide drag torque when you release acc pedal.
This is more like the ICE behaviour.

-Olaf


----------



## Jan (Oct 5, 2009)

Olaf-Lampe said:


> This is more like the ICE behaviour.


Hi Olaf,

Why copy ICE behavior exactly? Drag torque is not designed behavior, but inevitable behavior of an ICE.


----------



## etischer (Jun 16, 2008)

Sounds like you want to control your motor in speed (or even position) mode instead of torque mode when rock crawling.  The motor will maintain speed/position, you don't need to control when it regens in this mode, regen is just a side effect of the motor holding position. 




Jan said:


> I’m busy trying to do it a little different. With yet another arduino. I love those little buggers.
> 
> I wanted:
> - Regen when breaking, from zero to max at the moment the breaks physical start to work.
> ...


----------



## Jan (Oct 5, 2009)

etischer said:


> Sounds like you want to control your motor in speed (or even position) mode instead of torque mode when rock crawling. The motor will maintain speed/position, you don't need to control when it regens in this mode, regen is just a side effect of the motor holding position.


Yes, you can put it that way. But I found no options on the TIM600 yet, that does this for me. So, I think I've to program the arduino to maintain the desired speed.


----------



## Dave Koller (Nov 15, 2008)

Jan said:


> Yes, you can put it that way. But I found no options on the TIM600 yet, that does this for me. So, I think I've to program the arduino to maintain the desired speed.


My version 2 PCM is Arduino controlled - I love that platform - sort of a poor man's C program... 

I missed something here but do not wish to hijack Eric's thread... I will try to track down what you have done with the Arduino!


----------



## raymond.nl (Mar 17, 2010)

etischer said:


> Seems to work very well, I can have 2 regen setpoints without any additional buttons or pots.


Having very little experience with regen I actually liked the way it's set up in a Tesla. It take 5 minutes to get used to it, but in general when you let go of the throttle completely you get serious regen. When you want to coast you have to keep the throttle down just a bit.

0% throttle = max regen (say -4m/s²)
5% throttle = medium regen (say -2m/s²)
10% throttle = coast

and of course everything in between. It's effectively two pedals in one, where the real brake pedal is only used in extreme circumstances.

To me this sounds more user-friendly than tap dancing on the throttle and brake pedal to get the car to do what I want it to do. And it allows you to maintain your speed most efficiently on any slope.


----------



## etischer (Jun 16, 2008)

That is how I had my inverter programmed before. Makes it a bit tough to shift gears without a clutch cause the motor always wants to go to zero speed when you let off the throttle. 

I also like being able to let off the throttle and coasting for what seems like forever. The only time I want drag is if I'm going down hill. Having drag just to give that ICE feel isn't my goal, but each to his/her own. 



raymond.nl said:


> Having very little experience with regen I actually liked the way it's set up in a Tesla. It take 5 minutes to get used to it, but in general when you let go of the throttle completely you get serious regen. When you want to coast you have to keep the throttle down just a bit.
> 
> 0% throttle = max regen (say -4m/s²)
> 5% throttle = medium regen (say -2m/s²)
> ...


----------



## tomofreno (Mar 3, 2009)

Mine (Curtis AC controller) seems to vary regen continuously with degree of acc pedal depression. As I ease up on the acc pedal the current into the motor decreases. If I ease up the right amount I get zero current, no current into the motor, none generated out. If I ease up the acc pedal more I get a small amount of regen current. Releasing further gives more regen current. So as I approach a light I control the vehicle deceleration by how far the pedal is released. I can release it until I get a small amount of regen current and the car will decelerate slowly, or I can ease up more on the pedal to get faster deceleration and more regen current. Of course releasing it completely gives the most regen current and fastest deceleration. If I decelerate a bit too quickly, I depress the pedal a bit decrease regen, or further still to put some current through the motor to apply some torque to the wheels. It seems be continuously variable. The motor is run under torque control. The maximum amount of regen, obtained if the pedal is completely released suddenly, is programmable in the controller.


----------



## Jan (Oct 5, 2009)

Dave Koller said:


> My version 2 PCM is Arduino controlled - I love that platform - sort of a poor man's C program...
> 
> I missed something here but do not wish to hijack Eric's thread... I will try to track down what you have done with the Arduino!


Shall we start an Arduino thread? I've nothing posted yet about my arduino stuff. I'm restorating a landcruiser BJ40. At the moment I'm converting the dashboard into digital. Swapped the meters with simpel voltmeters, and a stepper motor for the speed. The ODO meter with a LCD display. All under control of an Arduino mega. Fantastic little machine.


----------



## Olaf-Lampe (Feb 24, 2010)

Another option is to disable regen while the gearlever is in neutral ( or crosses the neutral position ). In early racing days, the igniton was interupted with a switch on the shift rod to shift without clutch. Nowadays racing is all about 'dog boxes'.

But everyone his own flavour
Olaf


----------



## Dave Koller (Nov 15, 2008)

Jan said:


> Shall we start an Arduino thread?


You start it and let's see - say here in Tech.... Sorry Eric .. I am sensitive to hijacking threads..


----------



## david85 (Nov 12, 2007)

etischer said:


> Sounds like you want to control your motor in speed (or even position) mode instead of torque mode when rock crawling. The motor will maintain speed/position, you don't need to control when it regens in this mode, regen is just a side effect of the motor holding position.


You have my attention now(not that I wasn't impressed already).

So commanding 0 RPM is all it takes to get regen out of your motor? I wonder if that could work for my BLDC setup.


----------



## etischer (Jun 16, 2008)

Just commanding a slower speed than actual speed will get regen current to flow. This is how my AC induction motor works, I assume BLDC would act the same???







david85 said:


> You have my attention now(not that I wasn't impressed already).
> 
> So commanding 0 RPM is all it takes to get regen out of your motor? I wonder if that could work for my BLDC setup.


----------

