Alternator control in the modern era - Miata Turbo Forum - Boost cars, acquire cats.

Welcome to Miataturbo.net   Members
 


MEGAsquirt A place to collectively sort out this megasquirt gizmo

Reply
 
 
 
LinkBack Thread Tools
Old 12-01-2012, 02:53 PM   #1
Elite Member
Thread Starter
 
Join Date: Jul 2005
Posts: 6,454
Total Cats: 80
Default Alternator control in the modern era

Quote:
Originally Posted by Joe Perez View Post
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   Reply With Quote
Old 12-04-2012, 05:29 PM   #2
Supporting Vendor
 
Matt Cramer's Avatar
 
Join Date: Sep 2006
Posts: 2,266
Total Cats: 51
Default

Quote:
Originally Posted by JasonC SBB View Post
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 is offline   Reply With Quote
Old 12-04-2012, 08:49 PM   #3
Elite Member
iTrader: (1)
 
cordycord's Avatar
 
Join Date: Dec 2011
Location: SoCal
Posts: 1,775
Total Cats: 148
Default Alternator control in the modern era

Quote:
Originally Posted by Joe Perez View Post
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   Reply With Quote
Old 12-04-2012, 08:58 PM   #4
Boost Pope
iTrader: (8)
 
Joe Perez's Avatar
 
Join Date: Sep 2005
Location: Delicious and Moist.
Posts: 26,328
Total Cats: 1,926
Default

Quote:
Originally Posted by cordycord View Post
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   Reply With Quote
Old 12-04-2012, 09:16 PM   #5
Elite Member
iTrader: (1)
 
cordycord's Avatar
 
Join Date: Dec 2011
Location: SoCal
Posts: 1,775
Total Cats: 148
Default

Quote:
Originally Posted by Joe Perez View Post
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   Reply With Quote
Old 12-04-2012, 09:55 PM   #6
Elite Member
Thread Starter
 
Join Date: Jul 2005
Posts: 6,454
Total Cats: 80
Default

Quote:
Originally Posted by Matt Cramer View Post
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 12:10 PM.
JasonC SBB is offline   Reply With Quote
Old 12-04-2012, 09:58 PM   #7
Elite Member
Thread Starter
 
Join Date: Jul 2005
Posts: 6,454
Total Cats: 80
Default

Quote:
Originally Posted by Joe Perez View Post
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 10:08 PM.
JasonC SBB is offline   Reply With Quote
Old 12-04-2012, 10:24 PM   #8
Elite Member
iTrader: (1)
 
Join Date: May 2009
Location: Jacksonville, FL
Posts: 4,687
Total Cats: 216
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   Reply With Quote
Old 12-04-2012, 10:32 PM   #9
Boost Pope
iTrader: (8)
 
Joe Perez's Avatar
 
Join Date: Sep 2005
Location: Delicious and Moist.
Posts: 26,328
Total Cats: 1,926
Default Alternator control in the modern era

Thread split off from the "Megasquirt is for the Fishes" discussion.
Joe Perez is offline   Reply With Quote
Old 12-05-2012, 10:18 AM   #10
Boost Czar
iTrader: (61)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 72,900
Total Cats: 1,793
Default

Quote:
Originally Posted by Joe Perez View Post
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   Reply With Quote
Old 12-05-2012, 11:04 AM   #11
Senior Member
iTrader: (1)
 
Join Date: Jun 2006
Location: Sweden
Posts: 1,392
Total Cats: 58
Default

Quote:
Originally Posted by cordycord View Post
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   Reply With Quote
Old 12-05-2012, 11:11 AM   #12
Boost Czar
iTrader: (61)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 72,900
Total Cats: 1,793
Default

Quote:
Originally Posted by NiklasFalk View Post
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   Reply With Quote
Old 12-05-2012, 11:53 AM   #13
Ben
Supporting Vendor
iTrader: (33)
 
Ben's Avatar
 
Join Date: Jul 2006
Location: atlanta-ish
Posts: 12,689
Total Cats: 99
Default

Quote:
Originally Posted by Joe Perez View Post
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.
Ben is offline   Reply With Quote
Old 12-05-2012, 11:57 AM   #14
y8s
2 Props,3 Dildos,& 1 Cat
iTrader: (8)
 
y8s's Avatar
 
Join Date: Jun 2005
Location: Fake Virginia
Posts: 19,038
Total Cats: 407
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   Reply With Quote
Old 12-11-2012, 12:25 AM   #15
Elite Member
iTrader: (1)
 
cordycord's Avatar
 
Join Date: Dec 2011
Location: SoCal
Posts: 1,775
Total Cats: 148
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   Reply With Quote
Old 12-11-2012, 03:05 AM   #16
Supporting Vendor
iTrader: (10)
 
Reverant's Avatar
 
Join Date: Jun 2006
Location: Athens, Greece
Posts: 5,441
Total Cats: 199
Default

Modern alternator control you say?

Name:  ems2_alternator.png
Views: 69
Size:  115.2 KB
Reverant is offline   Reply With Quote
Old 12-11-2012, 03:26 AM   #17
Senior Member
 
Join Date: Mar 2006
Location: Schwarzenberg, Germany
Posts: 1,497
Total Cats: 81
Default

Quote:
Originally Posted by Reverant View Post
Modern alternator control you say?

Zaphod is offline   Reply With Quote
 
 
Reply

Related Topics
Thread Thread Starter Forum Replies Last Post
Another Cast Manifold Corky Bell Prefabbed Turbo Kits 18 11-22-2016 10:01 PM
My solution for Oiltemp and Oilpressure input into Megasuirt (MS3) Zaphod MEGAsquirt 41 01-24-2016 01:25 PM
1991 special edition with hard top full part out JC, NJ russian Miata parts for sale/trade 6 10-08-2015 04:01 PM
Back to Stock Part Out!! Turbo Parts, MS2 Enhanced 01-05, Suspension, and MOAR! StratoBlue1109 Miata parts for sale/trade 16 10-02-2015 10:39 AM
Another Alternator thread ihiryu General Miata Chat 9 09-28-2015 11:22 AM


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -4. The time now is 09:02 AM.