Page Options
You are here : Magazine Articles
  Minimize
14

 

Basic Control Theory and Engine Management Systems

By Vince Illi

 

The modern internal combustion engine is a marvel of engineering. Compared to engines of the early and mid twentieth century, today’s engines are more powerful, more efficient, and orders of magnitude more reliable. These breakthroughs are mainly due to one thing: the engine management system, which is a computer (or multiple computers) that regulate how an engine operates, controlling such parameters as ignition timing, fuel injector pulse width, and cam timing. Those parameters can be adjusted thousands of times per second based on input from a myriad of sensors monitoring things such as intake air temperature, coolant temperature, intake manifold absolute pressure, throttle position, and a host of other things. 

But how exactly does an engine management system (or EMS) work? Learning the answer to that question will help you not only gain a better understanding of how an engine operates, but will also assist in tuning engines. At its heart, the EMS is an electronic control system

The AEM EMS-4 is an example of a "stand alone" EMS.  One that is designed to work in multiple vehicles and on multiple engines.  The EMS-4 is specifically designed for four cylinder engines.

 

Basic Control Systems

Control theory is a branch of engineering and mathematics that deals will how to control systems and obtain a desired output. The system that is being controlled is called the plant, and the devices used to control that system are called controllers

There are two main types of control systems: open-loop and closed-loop.

Electronic Control Systems

A Basic Open-Loop Control System.

 

The open-loop control system is the most basic and has the least amount of functionality. In this type of system, a desired output (sometimes called the reference) is fed into the system. The controller uses the input to drive the plant, producing the desired output. The problem with these systems is a lack of “feedback.” The system is unable to react to changes in its environment because it has no way of knowing what the plant is actually doing.

A good example to think of is a cruise-control system on a car. Let’s say you’re trying to get good fuel economy in your 400-horsepower Mustang, so you set the cruise control to 55 MPH. That is your reference. On a level, straight highway, your open-loop control system maintains 55 MPH by maintaining the throttle position. However, as soon as you start to go up a hill, your car decelerates because the throttle position does not change. This is because the system has no way of knowing it needs to change the reference. 

Closed-Loops Control System

A Basic Closed-Loop Control System. Note the “Feedback Loop.”

 

A closed-loop control system solves this problem by using a feedback loop. The feedback loop allows the system to adjust for changing conditions by utilizing sensors that measure what the current output is. This output is then added or subtracted from the reference (creating the measured error) to enable the system to adjust itself.

In our example, the cruise control system uses the vehicle speed sensor (among others) for its feedback loop. When your car starts going up the hill, its speed drops. That difference in speed (let’s say negative 5 MPH) is subtracted from the original reference (55 MPH), giving a total input into the system of 60 MPH, and causing your car to open the throttle wider to get back up to its set speed. When you reach the top of the hill and begin going over the set speed, the system automatically closes the throttle to again maintain the correct speed. 

Now that we know how a basic control system works, we can start looking at a few examples of different types of engine tuning systems used in cars.  

 

Pages: 1 of 4 Next Page

Comments

hallskiwallski
# hallskiwallski
Wednesday, December 14, 2011 12:35 AM
Good read, just installed the FIC-6 from AEM, now i can utilize this info for the perfect tune (sarcasm)..it should help none the less, what is the best stand alone system for a '00 celica gt?
Andrew Brilliant
# Andrew Brilliant
Wednesday, December 14, 2011 2:11 AM
I wish I had stuff like this when I was in school, I would have been way less bored in controls!
DrunkenMessiah
# DrunkenMessiah
Wednesday, December 14, 2011 5:14 AM
Hahaha, wow, that was funny. This article was great, but then I turned to page 3 and saw the picture of the old Chrysler turbo and was like "what's an old dinosaur motor like mine doing on MotoIQ!?"

And then of course I read on and realized that it was for historical context. That makes much more sense.

Still, those old Chrysler Logic Modules where pretty advanced for their day. The Motorola chip in my 1987 version operates at a whopping two megahertz. TWO!!! I've always been amazed at how much functionality they got out of such primitive electronics. If you told a modern engineer to build an engine management system with just two megahertz of computing power he'd curl up into the fetal position and start weeping.

It kinda bums me out actually. Chrysler's turbo motors had far and away the most advanced engine management of any mass-market American drive-train at the time. Hell, just having the balls to put a turbocharged engine in a goddamn minivan made them cool in my book. And now look at them. Chrysler sells what have to be THE most unappealing new cars on the market today. All semblance of passion or technological innovation; its just all gone.

Anyway, sweet article! Can't wait to see more in this series.
Dusty Duster
# Dusty Duster
Wednesday, December 14, 2011 7:33 AM
@Andrew:
I can relate. My control systems professor in college was downright TERRIBLE.

@Drunken Messiah:
That picture is the engine from my late, great Plymouth Duster!
Def
# Def
Wednesday, December 14, 2011 8:49 AM
MAF sensors are very accurate considering the environment they live in, but they do have the downfall of having an exponential VQ curve. This means that small amounts of voltage noise in the sensor signal start resulting in increasingly larger error as you get closer to the sensor's 5V metering limit.

This isn't a problem in most setups, but I have seen some people have fluctuating AFR, timing, and consequently power output when they had some EMI noise on their MAF sensor line.


I do agree MAF sensors are nice, but I also appreciate speed density in many applications.
Dusty Duster
# Dusty Duster
Wednesday, December 14, 2011 8:52 AM
The solution to the noise problem on MAF sensors is to prevent them from operating near the 5V limit. If your car is ingesting enough air to approach this limit, a larger MAF sensor is needed. This is why MAF sensors were not popular originally; the larger sensors were quite expensive.
Micah McMahan
# Micah McMahan
Wednesday, December 14, 2011 9:11 AM
oh and odd comment on the V12, I'd read somewhere that Toyota actually had two EMS's for that engine from the factory and ran each bank as it's own engine...never found out if this was factor or JDM folk lore.

As for 2Mhz, I'd laugh at the controls group if they handed us such an ECU LOL we have so much going on in a modern diesel that our after treatment has it's own ECU.
bigBcraig
# bigBcraig
Wednesday, December 14, 2011 9:23 AM
Its my understanding that some cars (Subarus in particular) run in open loop whenever they're at high load, which requires tuning for any change you make to the engine.

Can someone explain why this is? Is it just that the ECU doesn't have to computing power to listen to a feedback loop and adjust as the car is accelerating? I'd imagine that it would be more important at high load than any other time to be monitoring engine parameters and reacting to them.
Brew
# Brew
Wednesday, December 14, 2011 9:54 AM
Great article!
BMW also used two separate ECUs on their early V12s, which were essentially 2 of their M20 straight sixes joined at the crankcase.
Dallas J
# Dallas J
Wednesday, December 14, 2011 10:30 AM
A little nit pick at your cruise control example. If the car is doing 50 with the speed set to 55, then the controller will see a value of 5 not 60. If you're thinking "But then at 55mph the error is zero and you get no throttle, then slow down". Yep, unless...

A cruise control is an example of a type 0 system with some finite steady state error unless the "type" is increase with either an integral, lead/lag, or anything that increases the number of poles within the transfer function.

Taking the integral controller as an example, it sums the error over time giving the needed offset to reduce steady state error to zero from a step input. Its constantly adjusting itself unless the error is zero, at that point the offset remains constant.
Dusty Duster
# Dusty Duster
Wednesday, December 14, 2011 11:03 AM
@Dallas:

This article is supposed to be for beginners. You expect me to get into PID controllers and integro-differential calculus?
Dallas J
# Dallas J
Wednesday, December 14, 2011 11:14 AM
True, but there is dumbing it down and there is erroneously stating ;)
EB Turbo
# EB Turbo
Wednesday, December 14, 2011 2:24 PM
The information stated can be true for OEM applications and logic but, for aftermarket standalones is false. AlphaN with a MAP or MAF correction is the preferred method of tuning. MAP sensor Speed density based systems cannot identify Volume of air. Only Pressure. you can get it closer by adding Air tempreture to the mix but there is no way to derive volume from pressure.
Subasean
# Subasean
Wednesday, December 14, 2011 3:37 PM
@ bigBcraig
I was a Subaru Tech for 3 years before I got laid off, from 2006-2009, and for emissions purposes the cars were held to 14.7 until a certain RPM. All the Subaru horror stories I heard started up a little after I was let go, (Now I'm a NissNerd) but from what info I was able to get, the Closed/Open Loop delay is the reason 2007+ STi's started grenading, since they were being forced into 14.7:1 lean as the turbos were starting to build serious boost, and that overlap was leaning them out and causing detonation. I haven't ever had anyone definitively confirm, but from talking to folks who tune them, just in passing, the OL/CL delay is the first thing to get turned off when an STi gets tuned. Again, all my experience has been anecdotal, as I was literally laid off in the middle of my first fried STi diag, (#4 piston was burned to a crisp) but it makes sense to me. I remember the first time I was confused when the Toughbook was reading 14:7 for most of a test drive when I was trying to confirm a dead 02 sensor on a 2007 STi. Finally "had" (I kmow, poor me =) to punch the sucker and run it up past 4k to get the reading I needed.

For what it's worth, I'm still intending to get my '06-'07 STi this coming year. I just intend to have a tune done on it. Especially if anyone with more specific STi expertise can definitively confirm the OL/CL delay thing, since I'm no longer in a position to get a straight answer from Subaru.
Subasean
# Subasean
Wednesday, December 14, 2011 3:43 PM
I also vaguely remember that's what the bulletin and new tune they issued for the cars was supposed to cure, but I've heard about people who had the tune and nuked anyway, of course, if the motor was already compromised by the dangerous base tune, a reflash isn't going to undue thermal damage
DaGou
# DaGou
Wednesday, December 14, 2011 4:18 PM
EB Turbo all I can say is PV-nRT.

where n is the amount of substance of gas (also known as number of moles) and R is the ideal, or universal, gas constant, equal to the product of Boltzmann's constant and Avogadro's constant. In SI units, n is measured in moles, and T in kelvin. R has the value 8.314 J·K−1·mol−1.

x01011000x
# x01011000x
Wednesday, December 14, 2011 5:53 PM
bigBcraig, the stock Subaru O2 sensor accuracy for reading rich and the ECU table scaling for the sensor are a cause. You would need a wideband O2 and an ECU that has the proper tables to work with it. I have seen speculation that the stock "wideband" on the 32 bit Subaru ECU cannot read correct rich due to where it is placed in the up pipe.

Subasean, I have also read the same about stock 07+ tunes. Theory being the ECU stays in CL too long into load, causing lean fuel plus boost. Some Subaru tuners also change the CL to OL delay value to 0 to simplify the ECU fueling table transitions when moving from CL to OL. Further, some people have experienced a smoother roll onto throttle by getting rid of the delay.
x01011000x
# x01011000x
Wednesday, December 14, 2011 6:02 PM
Also wanted to say great article.

It seems the big power Subaru and some R35 GT-R tuners switch over to Speed Density from MAF. I assume this is from the turbo inlets being so big that a MAF may not be able to provide acceptable stability, and like in the article, there are some tuning benefits of SD.

Is there a point where the diameter of a turbo inlet is just too big for a MAF sensor to be of use?
Dusty Duster
# Dusty Duster
Wednesday, December 14, 2011 7:38 PM
@Binary Dude:

Another downside to MAF sensors that I neglected to mention in my article is resolution. A MAF sensor, for the most part, operates between 0 and 5 volts. The larger diameter the sensor, the more air that can flow. However, the increased flow capability also reduces the resolution of the signal. A 300-horsepower MAF sensor reads from 0-5 volts, whereas a 1,500-horsepower MAF also reads from 0-5 volts. Because of this, larger MAF sensors can make tuning a car at idle and very low throttle positions difficult. I believe this is one of the reasons that the Ford Shelby GT500 uses a combination of MAF counts and speed-density.
Ockham
# Ockham
Wednesday, December 14, 2011 8:16 PM
And all the more reason to check the resolution of your ECU's analog channels before buying.
Mitch P
# Mitch P
Thursday, December 15, 2011 3:41 AM
To those interested in the Toyota 1GZ-FE VVTi V12, the Japanese market Toyota Century that the engine came in uses 2 ECU's to control the engine as two six cylinder engines. There are redundant sensors for everything - two TPS', two MAF's, two Crank Sensors, etc... and Toyota claims that there is a mode where one side of the engine will continue to run if there is an issue/fault with the other ECU system.

The ECU's on the 1GZ engine are different from each other as one has extra plugs to control the transmission and one does not. This is different than some other factory twin ECU setups that use the same ECU and programming for both banks. There is an input that is either grounded or not grounded in the wiring harness to tell the ECU which bank of the engine it is running. Therefore, one can swap the ECU's side to side and the engine will still operate normally. (very handy for trouble shooting too)
Mitch P
# Mitch P
Thursday, December 15, 2011 3:52 AM
EB Turbo, I couldn't agree more. Has worked very well in my experience. :)
Subasean
# Subasean
Thursday, December 15, 2011 9:01 AM
Just farting around RomRaider last night I hit on this thread on the Subie's OL/CL delay tables. Nothing specific as to failures, but I found it interesting nonetheless.
http://www.romraider.com/forum/viewtopic.php?t=1603
M
# M
Thursday, December 15, 2011 10:26 AM
Dusty,

I would think anything over a 10 bit system would allow for enough tuning resolution for differing flow rates on a MAF. You would surely not use your 10 bit inputs on an ECU for something as important as the air metering device or strategy. Use those 10 bits on temperatures and switch inputs. Use your 12, 16, and higher bit inputs on the important items.

Also, be sure to take a look at the exact specifications of bit resolution inputs when specing out an ecu. Some companies will hide the fact that they are using 8 or 10 bit AD converters and therefore give you steppy data and subsequently give you steps between fueling and ignition points in your tables.

I left some things out, but take a close look. Also look how they do the sampling for those inputs and the filtering. Some will say they log at 2khz and really mean they sample at 2khz and filter it down to 500hz for actual control and logging.

I could go on, but probably not the right section.

MF
M
# M
Thursday, December 15, 2011 10:30 AM
Correction to above. I would say not to use the 10 bits on items that would require the resolution Dusty was using as an example. If you have a different strategy, 10 bit resolution on the inputs can certainly be sufficient. Just like he was saying, the volume of air at idle versus full throttle on a 1000hp monster will require a higher resolution input.
ALSO do not forget that the MAF sensor itself will likely have a resolution of the sensor.

carry on...
MF
Dallas J
# Dallas J
Thursday, December 15, 2011 10:37 AM
To what dusty is saying, assume you're trying to make a 1000hp car and that 10 lb/min air ~ 100hp. You'd need to measure a max of 100lb/min of air. A 10 bit system would give you a resolution of about 0.1 lb/min. A car generally idles in the 0.5lb/min range so each bit change on the ADC will end up being a very large 20% measured change in airflow when trying to idle.

So I'd agree with him, the more power the MAF supports the harder it is to fine tune the low airflow moments.
olaaf
# olaaf
Thursday, December 15, 2011 3:59 PM
“venting it to atmosphere causes the EMS to assume that all that air is still in the intake tract”

I don’t understand this statement as it refers to recirc valves and MAF’s, and I’ve heard it a lot.

So, you are running at WOT and then lift off the pedal, the recirc valve routes air back to the intake, but so what? The throttle plate is closed, and the MAF now reads a very low value because there is no air coming into the intake, if anything there is air pushing out of the intake… no? No air is entering the motor during this period then the throttle plate is closed, so why does it matter where the air goes?
Dusty Duster
# Dusty Duster
Friday, December 16, 2011 10:23 AM
First of all, you are assuming that the throttle plate stays closed. It might, and it might not, as is the case during a WOT shift from 2-3 going down a drag strip. Secondly, air does not "push out of the intake" when the throttle is closed. Thirdly, even when the throttle plate is closed, air is still entering the engine, it is simply under high vacuum.

Air entering the system is metered at the MAF, which is usually located immediately after the air cleaner and before the compressor. ("Compressor" in this case refers to either a turbocharger or a centrifugal supercharger.) Once this airflow is metered, the EMS has no way of knowing if air is added or removed from the system after that point. In the case of an ambient-vent blow-off valve, air is removed from the system that the EMS is unable to compensate for, because it doesn't know about the air being removed from the system.
olaaf
# olaaf
Friday, December 16, 2011 10:53 AM
I still don’t quite follow… let’s take the following example-

WOT throttle in 1st gear, and 15lbs of boost is built. You shift to 2nd, and call it a non-aggressive slow shift where you lift off the throttle, shift to second and smoothly apply throttle again. In that 2 second period during the shift, the throttle plate is closed, the recirc value opens and, let’s say all the piping from after the compressor to the throttle plate (intercooler, etc.) is 900 cubic inches of volume, that mass of air enters the intake after the MAF and before the compressor wheel- and it’s under 15lbs of pressure above atmospheric- where does the air go?

How does air enter the engine when the throttle plate is closed? Of course, a little will go into the engine via the idle valve and around the throttle plate, but that would happen under vacuum anyways, and as such would happen even if the valve vented to the atmosphere. There is no way in that 2 seconds between the shifts that the recirculated air is consumed by the motor- it must stagnate in the intake tract.. right? if this is the case for the 2 seconds, no matter what:

1- The air has been metered
2- The air isn’t in the motor (and the mixture will go rich for the amount of time it takes to normally consume 900 cubic inches at 15lbs, because the EMS metered the air already)
3- So how can the EMS possibly care if the air is sitting in the intake tract (loosing pressure, right?) for 2 seconds or dumped back in the atmosphere?

So, after the 2 seconds the motor has done, say 75 full 360 degree cycles, and the EMS is looking at the information right NOW to calculate the fuel load required, and it has no knowledge of the pressure/volume of air after the MAF (the recirculated air in the intake tract)..?

What am I missing?
Dallas J
# Dallas J
Friday, December 16, 2011 11:16 AM
What the recirc valve is doing is circulating the compressed air through the turbo. The turbo is still spinning and trying to draw air through and without the recirc valve it would continue to draw air through the MAF, which of course means more fuel gets dumped in.

So it's more preventing more air from getting metered.
olaaf
# olaaf
Friday, December 16, 2011 12:22 PM
Ahh!! Makes perfect sense! Thank you very much for answering this! The turbo is still pumping and air will be drawn past the MAF and dumped to the atmosphere. I wonder how efficient the recirc is, and if programmatically in a theoretical world (TPS sensor, manifold pressure) the EMS could be programmed to ignore MAF during these transient conditions..


Post Comment

Only registered users may post comments.

          MotoIQ Proudly Presents Our Partners:


Copyright 2012 by MotoIQ.com
Privacy StatementTerms Of UseAdvertise