MEGAsquirt A place to collectively sort out this megasquirt gizmo

Alternator control in the modern era

Thread Tools
 
Search this Thread
 
Old 12-01-2012, 01:53 PM
  #1  
Elite Member
Thread Starter
 
JasonC SBB's Avatar
 
Join Date: Jul 2005
Posts: 6,420
Total Cats: 84
Default Alternator control in the modern era

Originally Posted by Joe Perez
Alternator control as we have traditionally been doing it is sort of an application-specific hack. I believe that the goal is to use one of the many spare PWM outputs of the ECU, and configure it such that BattV is used as the X-axis variable in the map. As Ben said, this is in the early test stages, but will obviously be a reality quite soon. The Miata isn't the only vehicle with an ECU-controlled alternator these days, so it's high on the list.
That would implement a simple table-driven 'P' type of control (i.e. not 'PID'), and it will work, BUT, the sampling/decision loop has to be faster than a certain rate else the system will oscillate. I know 500 Hz is fast enough, and IIRC 20 Hz is too slow.
JasonC SBB is offline  
Old 12-04-2012, 04:29 PM
  #2  
Supporting Vendor
 
Matt Cramer's Avatar
 
Join Date: Sep 2006
Posts: 2,332
Total Cats: 67
Default

Originally Posted by JasonC SBB
That would implement a simple table-driven 'P' type of control (i.e. not 'PID'), and it will work, BUT, the sampling/decision loop has to be faster than a certain rate else the system will oscillate. I know 500 Hz is fast enough, and IIRC 20 Hz is too slow.
I'll have to check what we found when we scoped the stock Miata ECU, but it appears to have been sort of a modified P type. It had a "Use X duty cycle at Y volts" algorithm, but it wasn't linear like a P control.
__________________
Matt Cramer
www.diyautotune.com
Matt Cramer is offline  
Old 12-04-2012, 07:49 PM
  #3  
Elite Member
iTrader: (2)
 
cordycord's Avatar
 
Join Date: Dec 2011
Location: SoCal
Posts: 2,450
Total Cats: 479
Default Alternator control in the modern era

Originally Posted by Joe Perez
It will read the crank / cam sensors of a '99 Miata without changing anything internally, as well as the crank / cam sensors or pretty much any other vehicle in existence.

Ditto for aircon. This has been a native function of the MS3 for a while now.


Alternator control as we have traditionally been doing it is sort of an application-specific hack. I believe that the goal is to use one of the many spare PWM outputs of the ECU, and configure it such that BattV is used as the X-axis variable in the map. As Ben said, this is in the early test stages, but will obviously be a reality quite soon. The Miata isn't the only vehicle with an ECU-controlled alternator these days, so it's high on the list.

EDIT: I just did some browsing of the dev board, and apparently this is already implemented in the latest Alpha code. So there you go.
So MS3 controls the alternator...can you do anything funky with it? For example, can you turn the alternator off during WOT?
cordycord is offline  
Old 12-04-2012, 07:58 PM
  #4  
Boost Pope
iTrader: (8)
 
Joe Perez's Avatar
 
Join Date: Sep 2005
Location: Chicago. (The less-murder part.)
Posts: 33,019
Total Cats: 6,587
Default

Originally Posted by cordycord
So MS3 controls the alternator...can you do anything funky with it? For example, can you turn the alternator off during WOT?
At present, the software control for the alternator is in its infancy, piggy-backing on an existing application. Anything is possible, it's just a question of code development.

Shutting off the alternator at WOT could be achieved using existing functionality by switching the field drive with a relay that is activated by the MS under certain conditions. I honestly have no idea how to calculate what the potential benefits of this would be.

Actually, that's not true. I know exactly how to calculate this.

Under a typical load, we'll say that the alternator is putting out 30 amps. (running the engine, a few lights, etc.) At 13.8 volts, that's 414 watts. A typical alternator is about 55% efficient, so it's taking in 753 watts of mechanical energy. 1 hp = 745 watts, so the alternator is consuming 1.01 horsepower.

Hmm.

A typical alternator is around 50-60% efficient
Joe Perez is offline  
Old 12-04-2012, 08:16 PM
  #5  
Elite Member
iTrader: (2)
 
cordycord's Avatar
 
Join Date: Dec 2011
Location: SoCal
Posts: 2,450
Total Cats: 479
Default

Originally Posted by Joe Perez
At present, the software control for the alternator is in its infancy, piggy-backing on an existing application. Anything is possible, it's just a question of code development.

Shutting off the alternator at WOT could be achieved using existing functionality by switching the field drive with a relay that is activated by the MS under certain conditions. I honestly have no idea how to calculate what the potential benefits of this would be.

Actually, that's not true. I know exactly how to calculate this.

Under a typical load, we'll say that the alternator is putting out 30 amps. (running the engine, a few lights, etc.) At 13.8 volts, that's 414 watts. A typical alternator is about 55% efficient, so it's taking in 753 watts of mechanical energy. 1 hp = 745 watts, so the alternator is consuming 1.01 horsepower.

Hmm.

A typical alternator is around 50-60% efficient
Wouldn't it be nice to ask more of the alternator during braking? Poor man's KERS.
cordycord is offline  
Old 12-04-2012, 08:55 PM
  #6  
Elite Member
Thread Starter
 
JasonC SBB's Avatar
 
Join Date: Jul 2005
Posts: 6,420
Total Cats: 84
Default

Originally Posted by Matt Cramer
I'll have to check what we found when we scoped the stock Miata ECU, but it appears to have been sort of a modified P type. It had a "Use X duty cycle at Y volts" algorithm, but it wasn't linear like a P control.
Or you could do in s/w what my circuit does:

It's a hysteretic controller that simply makes a new decision every 1.5 ms or so.
That is, every 1.5 ms it will decide whether or not to turn the field on or off. The decision is simply: is the voltage is higher or lower than the setpoint or not? The voltage needs to be filtered with about a 100-300 us time constant.

Trust me it works well. If you doubt me, realize that the field voltage to output current characteristic of an alternator is an integrator. A hysteretic controller will innately produce the "PWM" signal you need, and is inherently stable if the sampling period is fast enough.

I can tell you it works better than the alternator control in my 540i. I blip the gas at idle in the 540, the lights flare briefly. Not in the miata.

Edit
P.S. My circuit has about 50 mV of hysteresis, IIRC.
P.P.S. The resulting "PWM" on the field signal, is closer to "pulse density modulation", if you wanna get fancy.

Last edited by JasonC SBB; 12-05-2012 at 11:10 AM.
JasonC SBB is offline  
Old 12-04-2012, 08:58 PM
  #7  
Elite Member
Thread Starter
 
JasonC SBB's Avatar
 
Join Date: Jul 2005
Posts: 6,420
Total Cats: 84
Default

Originally Posted by Joe Perez
At present, the software control for the alternator is in its infancy, piggy-backing on an existing application. Anything is possible, it's just a question of code development.

Shutting off the alternator at WOT could be achieved using existing functionality by switching the field drive with a relay that is activated by the MS under certain conditions. I honestly have no idea how to calculate what the potential benefits of this would be.
There is potential danger with low voltage at full power. The fuel pump will be receiving reduced voltage and its pressure may droop.

If you want to see useful things to do with alternators and MPG, check out what Honda did with the early-mid 90s Civic HX. It was discussed at length at one of the popular MPG geek sites.

Other fancy things you should do:

- use a separate pin for sensing batt volts - in my NB the pin that is connected to the injector power line is not accurate. There's a different pin that is (I forgot which one, I think it's called "room fuse")

- keep alternator off below 500 rpm or so

- pinch off the setpoint below 800 RPM (e.g. 14.2V at 800 RPM, sliding to 12.6V at 600 RPM), to help with anti-stall.

Last edited by JasonC SBB; 12-04-2012 at 09:08 PM.
JasonC SBB is offline  
Old 12-04-2012, 09:24 PM
  #8  
Elite Member
iTrader: (1)
 
Full_Tilt_Boogie's Avatar
 
Join Date: May 2009
Location: Jacksonville, FL
Posts: 5,155
Total Cats: 406
Default

Whats this about the HX alternator?

I havent seen or heard anything about that, and it would have to be OBD-I to be early mid 90s, and I dont know of anything in the ECU I tried googling but found nothing.
Full_Tilt_Boogie is offline  
Old 12-04-2012, 09:32 PM
  #9  
Boost Pope
iTrader: (8)
 
Joe Perez's Avatar
 
Join Date: Sep 2005
Location: Chicago. (The less-murder part.)
Posts: 33,019
Total Cats: 6,587
Default Alternator control in the modern era

Thread split off from the "Megasquirt is for the Fishes" discussion.
Joe Perez is offline  
Old 12-05-2012, 09:18 AM
  #10  
Boost Czar
iTrader: (62)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 79,490
Total Cats: 4,079
Default

Originally Posted by Joe Perez
Shutting off the alternator at WOT could be achieved using existing functionality by switching the field drive with a relay that is activated by the MS under certain conditions. I honestly have no idea how to calculate what the potential benefits of this would be.
I'm still using Jason's circuit in my builds, but with the addition of a PNP to trigger an NPN to send out the field output. So I'm able to set an output in the MS to activate the alternator only after 300RPM like the OEM ECU, so it would be just as easy to cut it back off above a certain TPS or any other trigger.


I do know alternator control is on the docate for the MS3 code, just unsure when Ken will get to it and hoe he'll implemint it.
Braineack is offline  
Old 12-05-2012, 10:04 AM
  #11  
Senior Member
iTrader: (1)
 
NiklasFalk's Avatar
 
Join Date: Jun 2006
Location: Sweden
Posts: 1,390
Total Cats: 63
Default

Originally Posted by cordycord
So MS3 controls the alternator...can you do anything funky with it? For example, can you turn the alternator off during WOT?
Be prepared to switch to a different table for the non-alt case, for the different voltage giving a quite different situation for e.g fuel pressure.
14.1V is quite different than 11.1V or whatever the fuel pump and ECU will see sans-alt.
NiklasFalk is offline  
Old 12-05-2012, 10:11 AM
  #12  
Boost Czar
iTrader: (62)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 79,490
Total Cats: 4,079
Default

Originally Posted by NiklasFalk
Be prepared to switch to a different table for the non-alt case, for the different voltage giving a quite different situation for e.g fuel pressure.
14.1V is quite different than 11.1V or whatever the fuel pump and ECU will see sans-alt.
That's why the MS (and almost all other ECUS) has voltage compensation correction curves...

Specifically for dwell, deadtime, and the idle valve.
Braineack is offline  
Old 12-05-2012, 10:53 AM
  #13  
Ben
Supporting Vendor
iTrader: (33)
 
Ben's Avatar
 
Join Date: Jul 2006
Location: atlanta-ish
Posts: 12,659
Total Cats: 134
Default

Originally Posted by Joe Perez
At present, the software control for the alternator is in its infancy, piggy-backing on an existing application. Anything is possible, it's just a question of code development.

Shutting off the alternator at WOT could be achieved using existing functionality by switching the field drive with a relay that is activated by the MS under certain conditions. I honestly have no idea how to calculate what the potential benefits of this would be.

Actually, that's not true. I know exactly how to calculate this.

Under a typical load, we'll say that the alternator is putting out 30 amps. (running the engine, a few lights, etc.) At 13.8 volts, that's 414 watts. A typical alternator is about 55% efficient, so it's taking in 753 watts of mechanical energy. 1 hp = 745 watts, so the alternator is consuming 1.01 horsepower.

Hmm.

A typical alternator is around 50-60% efficient
We have done this for pro level Solo2 cars. A ~130 hp typical 4-banger picks up about 2 whp when shutting off the alternator.
__________________
Chief of Floor Sweeping, DIYAutoTune.com & AMP EFI
Crew Chief, Car Owner & Least Valuable Driver, HongNorrthRacing

91 Turbo | 10AE Turbo | 01 Track Rat | #323 Mazda Champcar

Originally Posted by concealer404
Buy an MSPNP Pro, you'll feel better.
Ben is offline  
Old 12-05-2012, 10:57 AM
  #14  
y8s
2 Props,3 Dildos,& 1 Cat
iTrader: (8)
 
y8s's Avatar
 
Join Date: Jun 2005
Location: Fake Virginia
Posts: 19,338
Total Cats: 573
Default

Random real world experience with alternator control:

The MS3 compensates for voltage, but not for load. With the constant-voltage control of the alternator, there is not really any more need for voltage compensation except for (maybe) at startup where the alternator is only working against the battery.

Sadly, the current MS3 software gets all crazy when you have a steady voltage and varying load alternator: you turn on the headlights, the idle dips and gets sad. turn them off and it swells.
y8s is offline  
Old 12-10-2012, 11:25 PM
  #15  
Elite Member
iTrader: (2)
 
cordycord's Avatar
 
Join Date: Dec 2011
Location: SoCal
Posts: 2,450
Total Cats: 479
Default KERS via alternator

The Braille boys were talking about the ALMS cars (Corvettes, etceteras) shutting down the alternator during WOT for the additional horsepower, and then turning it back on during off-throttle or braking to recharge the battery. It's just another way to free up some horsepower.

I wonder when they're engaging the alternator if they're simply turning it back "on", or if it's being ramped up over a short period to avoid damage to the alternator or the belt system. Jeez, I wonder if this was one of the issues with the F1 alternators.
cordycord is offline  
Old 12-11-2012, 02:05 AM
  #16  
Elite Member
iTrader: (10)
 
Reverant's Avatar
 
Join Date: Jun 2006
Location: Athens, Greece
Posts: 5,976
Total Cats: 355
Default

Modern alternator control you say?

Name:  ems2_alternator.png
Views: 1359
Size:  115.2 KB
Reverant is offline  
Old 12-11-2012, 02:26 AM
  #17  
Elite Member
 
Zaphod's Avatar
 
Join Date: Mar 2006
Location: Schwarzenberg, Germany
Posts: 1,553
Total Cats: 101
Default

Originally Posted by Reverant
Modern alternator control you say?

Zaphod is offline  
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
StratoBlue1109
Miata parts for sale/trade
21
09-30-2018 01:09 PM
Corky Bell
Prefabbed Turbo Kits
18
11-22-2016 09:01 PM
russian
Miata parts for sale/trade
6
10-08-2015 03:01 PM
ihiryu
General Miata Chat
9
09-28-2015 10:22 AM



Quick Reply: Alternator control in the modern era



All times are GMT -4. The time now is 12:26 AM.