This is only a preview of the July 1997 issue of Silicon Chip. You can view 30 of the 96 pages in the full issue, including the advertisments. For full access, purchase the issue for $10.00 or subscribe for access to the latest issues. Items relevant to "A Flexible Interface Card For PCs":
Items relevant to "Points Controller For Model Railways":
Items relevant to "Simple Waveform Generator":
Items relevant to "Colour TV Pattern Generator; Pt.2":
Articles in this series:
Articles in this series:
Articles in this series:
Purchase a printed copy of this issue for $10.00. |
How Holden’s
electronic control
unit works; Pt.1
The latest engine management control
systems are very clever in their operation.
We unravel some of the mysteries hidden
in the Holden system.
By JULIAN EDGAR
A
LTHOUGH THERE have been
many articles published on elec
tronic engine management systems, a detailed analysis of how the
program in an Electronic Control Unit
(ECU) works has been lacking. This
The Holden system uses a
MemCal – a plug-in module
containing both the EPROM and
limp-home data memory. This
approach allows the same ECU to be
used in a wide variety of cars.
is because the manufacturers do not
publish such studies and usually no
other sources have sufficient depth.
However, the way in which one ECU
calculates its outputs can now be re
vealed.
Ken Young, an Australian computer
programmer, has developed a sophisticated software package that allows
the AC-Delco engine management
system to be reprogrammed. This is
the engine management system used
on the Holden Commodore.
In order to develop an effective,
user-friendly software package (plain
English is used on the screen), he
needed to com
pletely lay bare the
programming of the ECU. This he has
done and much of what follows is
drawn with his permission from the
manuals for his KAL Software Dyno
Cal package.
The story reveals the almost unbelievable sophistication of the modern
engine management ECU. Indeed, the
GM-Delco ECU is far more complex in
its operation than most aftermarket
programmable systems.
Note that while all the variables
can be altered using the DynoCal
software, the values used as examples here are from a standard Holden
VR V6 automatic program. Note also
that what follows relates mainly to
engines which use a MAP (manifold
absolute pressure) sensor, as opposed
to engines using an airflow meter (as
in the EcoTec engine fitted to the VS
Commodore).
Basic ECU layout
As with all engine management
systems, the GM-Delco ECU accepts
66 Silicon Chip
This Holden Commodore VR station wagon has an engine management system
that was once undreamt of.
inputs from a variety of sensors,
makes appropriate decisions, and then
outputs various signals. The various
sensors provide either analog voltage
inputs (throttle position sensor, oxygen sensor); pulse inputs (distributor
reference, speed); or simple on/off
logic inputs (airconditioner compressor clutch, gear lever neutral/drive
position).
The various outputs consist of pulse
width modulated pulses (for the trip
computer), simple on/off outputs (engine check light & radiator fan), timed
spark pulses and injector pulses (to
control the fuel injectors).
In the GM-Delco system, both the
program and the data are stored on
a single EPROM. In GM-talk, this
EPROM is called the “MemCal” and
by using different MemCals, GM has
been able to use the same basic ECU on
a variety of engines, including fours,
sixes and eights. The program tells the
controller what to do and consists of
machine code, while the data is made
up of an incred
ible 300+ variables
which tailor the program to the specific
drivetrain application.
Over the years, Holden has used
three different ROM sizes in the
GM-Delco systems. The first systems
used a 16Kb EPROM but this was later
doubled in size to 32Kb. Of this, about
30Kb was used for the program and
the remaining 2Kb for the calibration
data. Holden subsequently added
automatic transmission control to the
ECU. This new ECU is now called a
PCM (Powertrain Control Module)
and its EPROM has again doubled in
size to 64Kb.
Variables
There are four different types of
variables used by the program:
(1). So-called zero dimension variables – these are used to specify the
number of engine cylinders, whether
there is an automatic or manual gearbox installed, etc.
(2). One dimensional variables –
these are used to represent counters,
delays, air/fuel ratios, etc.
(3). Two dimensional variables –
these are look-up tables comprising
such factors as idle air motor steps
versus rpm, air/fuel ratios versus
time, etc.
(4). Three dimensional variables –
these are the 3D maps; eg, air/fuel ratio
versus rpm versus MAP (manifold
absolute pressure).
The program logic can be divided
into six main areas of operation: fuel,
spark, idle air control, diagnostics,
output logic and variables. In addition,
the program determines a number of
internal modes, such as whether the
engine is cranking or running and
whether or not the oxygen sensor is
operational. These modes are saved
and used in various calculations.
Only two of the program areas are
examined here: fuel and spark. Let’s
see how the program actually calculates the various outputs?
Calculating fuel injection
The step-by-step process followed
to calculate the required amount of
fuel is:
(1). Estimate of the mass of air entering the engine;
(2). Look-up the desired air/fuel
ratio for the engine speed and MAP;
(3). Multiply the air mass by the
fuel/air ratio to give the fuel mass
required;
(4). Use the fuel mass to calculate
the injector pulse width.
The air mass per cylinder is calculated from the manifold pressure,
intake air temperature and engine
speed. This figure is then multiplied
by the volumetric efficiency of the
engine. A 3-dimensional table is used
to specify low rpm volumetric efficien
cy, which is calculated as a function
of engine speed and MAP. Another
similar look-up table is used for high
rpm volumetric efficiency.
If the coolant temperature is below
44°C, a correction is applied to the air/
fuel ratio to enrich the mixture. Two
July 1997 67
Volumetric Efficiency
Fig.1: the volumetric efficiency (VE) of the engine is held as a 3-dimensional
map. Here, the VE is shown as a function of engine speed and manifold
pressure. Note that for some combinations of manifold vacuum and engine
speed, the charging efficiency is markedly improved – probably as a result of
the tuned-length intake system.
Air/Fuel Ratio
Fig.2: this map shows the desired air/fuel ratio for each combination of engine
speed and manifold vacuum. For general running, the engine management
system is programmed so that it maintains these ratios as closely as possible.
fur
ther single-dimension variables
control the decay rate of this enrichment and the minimum to which it
68 Silicon Chip
can fall. The main air/fuel ratio lookup table uses three dimensions, with
air/fuel ratio expressed as a function
of MAP and engine speed – see Fig.2.
Injector opening delays due to
variations in battery voltage are compensated for by adding a bias to the
injector pulse width. For example, at a
battery voltage of 11.2V the bias is 1.16
milliseconds. A 2-dimensional table is
used to apply further corrections for
very brief injector openings, to achieve
the non-linear biases required at this
end of the scale.
In operation, the mechanical fuel
pressure regulator maintains the fuel
pressure at a fixed headroom above
the manifold pressure. Despite this,
battery voltage changes apparently
cause sufficient variation in fuel pump
pressure to require another correction
factor. This works as a function of the
battery voltage.
Another correction factor can be
introduced to delay the injector operation. This is used only when the
ECU is used to control a single point
injection system to give better air/fuel
mixing. It is not used in the Commodore, since the V6 employs multi-point
fuel injection.
Lean cruise mode
One of the factors giving the Commodore such good open-road fuel
consumption is the lean cruise mode.
Lean cruise is enacted when the coolant temperature is above 80°C and
the road speed higher than 68km/h.
After 150 seconds, the air/fuel ratio
is increased in 0.1 steps at 0.2 second
intervals. This increase is ultimately
limited to a value derived from a 3-dimensional look-up table and depends
on the engine speed and MAP.
As you might expect, the way in
which the fuel injectors are controlled
during engine starting is rather complicated. There are preset variables
for cranking pulse width and also for
the decay rate of this base crank pulse
width. The steps at which the pulse
width decays are also specified. The
clear flooding throttle position is set
at 98% opening or more and the injector pulse width is reduced to 7.895
milliseconds during cranking with the
throttle in this position.
No less than 22 different variables
are used to control the mixture during
acceleration and deceleration! These
variables include coolant temperature
which is used to control the rate at
which the mixture is leaned off during
deceleration.
A large number of variables are
also used for closed loop running,
whereby the oxygen sensor controls
the mixture. The minimum coolant
temperature at which closed loop
running will start is 44°C at idle and
31.25°C for running conditions. The
program takes six seconds before it
switches from open loop to closed
loop after acceleration and it will do
this only with a manifold vacuum of
more than 5kPa.
Main Spark Advance
Fuel trim
The Short Term Fuel Trim is a
fast-acting air/fuel ratio correction
system which relies on the output of
the oxygen sensor. In operation, the
oxygen sensor outputs a voltage signal
which is categorised as either rich or
lean. The longer the ECU receives a
rich (or lean) signal, the greater the
correction that is applied.
This results in an air/fuel ratio under
closed loop conditions that oscillates
around the stoichiometric point (this
characteristic cycling of mixtures can
be seen on the SILICON CHIP mixture
meter – see November 1995).
Further corrections are applied by
the Long Term Fuel Trim (LTFT) which
uses an array of 24 block memory cells.
Each cell corresponds to an rpm and
MAP range, with the array covering
the engine’s operating range.
When the engine is operating in
closed loop mode, the fuel term is
calculated and then multiplied by
the cell which corre
sponds to the
rpm and MAP conditions present.
If the engine has operated with that
manifold vacuum and engine speed
for a number of seconds, a learning
process takes place. The data in one
block can affect the data in neighbouring blocks, thereby allowing smooth
interpolation to take place between
them. Disconnecting the battery clears
these memory cells, which means that
a car may operate below its optimum
performance level for a short period of
time when it is driven again.
The LTFT RAM data can be accessed
after the event, meaning that the ECU
has continuous on-board data logging
of the air/fuel ratio at 24 different
load/rpm sites. For the LTFT to become active, the oxygen sensor must
be working correctly and the engine
speed must be constant.
Over-revving is prevented by cutting
off the fuel at 5800 rpm and restoring
it again when the engine speed falls
below 5700 rpm (ie, there is 100 rpm
Fig.3: the main spark advance chart is just one of a number of maps used to
calculate the spark advance. If the engine is at idle, the timing is taken from a
2-dimensional look-up table as a function of MAP. At other engine speeds, the
initial spark value is derived from this 3-dimensional table which shows spark
advance as a function of engine speed and MAP.
Long Term Fuel Trim
Fig.4: the Long Term Fuel Trim (LTFT) is an inbuilt form of data logging. It
stores the corrections made to the injector pulse widths so that the air/fuel ratios
depicted in Fig.3 are maintained. A count of 128 indicates that no correction has
been required, while a count that’s less than 128 means that the engine has been
running lean. Conversely, a count greater than 128 indicates that the engine has
been running rich. It can be seen that this particular engine has required only
minor on-going corrections.
July 1997 69
Table 1: Rewriting The Program
Variable
Spark High Advance Rate (degrees/1000 rpm)
Spark Maximum Retard (degrees)
Fuel Max Pulse Width (milliseconds)
Fuel Cut Low RPM
Fuel Cut High RPM
Fuel Cut Time Delay (seconds)
Idle Air Control Max Position (steps)
Idle Air Control Closed Loop Threshold (kPa)
Idle Air Control Warm Up Delay (seconds)
Idle Air Control Deadband (rpm)
Idle Air Control Sag (rpm)
Spark Idle Air Control Advance (degrees)
(kPa MAP)
20
30
40
50
60
70
Spark Attack Rate (degrees/count)
(rpm)
1600
3200
4800
6400
Fuel Volumetric Efficiency (%)
(kPa at 400 rpm)
20
40
60
80
100
(kPa at 1600 rpm)
20
40
60
80
100
(kPa at 3200 rpm)
20
40
60
80
100
(kPa at 6400 rpm)
20
40
60
80
100
of hysteresis to prevent osc
ill-ation
around the cutoff point). The same
technique is also used to limit the
road speed, with the VR V6 automatic
70 Silicon Chip
Modified
Holden V6
Standard
Holden V6
1.96
9.84
24.002
6300
6400
0.04
220
39.86
10
18
206
2.03
8.09
10.986
5715
5817
0.10
196
34.33
5
50
400
20.39
24.26
30.59
31.99
30.94
26.37
26.02
26.02
26.02
26.02
26.02
26.02
0.038
0.065
0.069
0.080
0.030
0.030
0.030
0.030
13.3
16.4
20.3
26.6
33.6
53.5
62.5
53.5
58.2
71.1
31.2
37.1
40.2
50.0
62.1
44.9
67.2
73.4
78.9
81.2
44.9
53.5
64.5
70.3
76.2
60.5
82.4
85.5
87.1
84.4
66.0
70.3
76.2
89.1
99.6
50.6
62.5
74.2
78.1
78.1
model limited to 210km/h.
During manufacturing, the program
is configured to recognise a stoichiometric air/fuel ratio whose value
corresponds to the switching voltage
of the oxygen sensor being used. An
injector constant is also programmed,
allowing larger or smaller injectors to
be used in place of the standard units.
Spark timing
The initial timing information for
the ECU is derived from a crankshaft
position sensor at 60° or 70° before
top dead centre (TDC). The ECU then
calculates the required spark timing,
counts forward and delivers the spark.
If the engine is at idle, the timing is
taken from a 2-dimensional look-up
table as a function of MAP. At other
engine speeds, the initial spark value
is derived from a 3-dimensional table which shows spark advance as a
function of engine speed and MAP. At
low MAP pressures (ie, high vacuum),
the table has increased resolution. In
addition, for engine speeds above 4800
rpm, a high-rpm correction figure is
added to the main advance rate.
The output of the 3-dimensional
coolant correction chart is then used
to modify the timing. This chart
shows the correction as a function of
coolant temperature and MAP. Negative coolant corrections are made by
subtracting another variable (coolant
offset) from the positive value coolant
correction chart.
If exhaust gas recirculation were
to occur, the spark would be further
advanced as a function of MAP and
engine speed. However, this function
is not currently employed. Another
correction not currently used (but
available) is for barometric pressure.
Timing refinements
While the timing procedure so far is
fairly straightforward, there are a num
ber of refinements. For example, when
the automatic transmission is shifted
from Park or Neutral into Drive, the
timing is retarded by 5.98° if the engine
speed is above 3600 rpm. This is done
to cushion shift-shock (the lurch that
occurs when shifting into gear).
The spark advance is also increased
by an amount proportional to the rate
of acceleration. However, the maximum rate of change in spark timing
is limited to 0.01°/milliseconds on the
VR V6 engine.
Depending on the coolant temperature, the rate of change for the throttle
position can also be used to retard
the spark timing. However, the spark
retard logic is bypassed if the vehicle
speed is less than a preset variable
or if the engine speed is higher or
lower than other preset values. When
deceleration fuel cutoff is employed,
the spark timing is decayed until a
minimum value is reached before the
actual fuel cutoff starts.
During starting, an initial timing
value is selected and this is then modified according to the cranking speed
by a 2-dimensional chart. However,
if the cranking speed falls below 400
rpm, the crankshaft position sensor
output becomes inaccurate. When
this happens, the spark is generated
by the ignition module using a backup
mode. The ECU switches the spark
timing back to its normal mode when
the engine speed rises above 400 rpm.
Once the engine is idling, a 2-dimensional table stores the timing values
as a function of MAP. Interpolation is
used if the MAP value falls between
two points.
At the end of the timing calculations, the calculated advance angle is
checked against a 1-dimensional variable which set the maximum and minimum values. These are at 60.2° and
-17.8°, respectively.
Another spark timing variable set
during manufacture estab
lishes the
engine position at which the distributor reference pulse occurs. There
is also a crankshaft position sensor
lag correction factor. This correction
compensates for the electronic delays
in the sensor and pick-up and is set to
200 microseconds for the V6.
In fact, more than 70 variables (ranging from 1-dimensional to 3-dimensional) are used in the calculation of
the final spark advance! As a comparison, some aftermarket programmable
engine management systems rely on
just five or six variables.
Rewriting the program
One way to examine the capabilities
of the ECU is to examine a rewritten
program. Table 1 shows a small extract which compares new software
for a modified V6 Holden against a
standard program. The modified engine featured a new camshaft, higher
compression ratio and bigger valves.
The program revisions were carried out by Awesome Automotive in
Adelaide using the DynoCal software
package. Awesome Automotive can
be contacted on (08) 8277 3927, while
KAL Software (Brad Host) is on 0412
SC
266 758.
BOOKSHELF
Video scrambling & descrambling
for satellite & cable TV
Video Scrambling & Descram
bling for Satellite & Cable TV,
by Rudolf F. Graf and William
Sheets. Published 1987 by
Butterworth-Heinemann. Soft
covers, 215 x 278mm, 246
pages. ISBN 0 7506 9945 0.
Price $34.95.
Even though Pay TV is now a
(loss-making) reality in Australia,
there is still considerable interest
in satellite TV reception by virtue
of the greater variety of programs
and the fact that no monthly
rental fees are payable. However,
quite a few satellite broadcasts are
scrambled and naturally there is
dearth of information about the
techniques involved. This book
sets out to answer many of the
questions although the authors
stress that they in no way condone
the misuse of the information. And
while it was first published in 1987,
the techniques of scrambling and
encryption have not changed much
since then.
I should say at the outset, that
while reading this book may give
you a good understanding of the
various techniques used in video
scrambling, it probably won’t be of
much help if you wish to do some
unauthorised descrambling on an
encrypted satellite signal. On the
other hand, if you wish to be able
to scramble and unscramble video
for your own use, then this book
could be very useful.
It has 12 chapters devoted to
scrambling methods. The first two
chapters start with the basic methods such as video inversion, sine
wave addition and sync alteration
and proceeds to digital techniques
which even involve pixel scrambling. Chapters 3 & 4 become more
specific, with circuit examples.
Chapter 5 covers the SSAVI
system which stands for Sync
Suppression and Active Video
Inversion. Chapter 6 discusses the
VideoCypher system. Chapter 7
is devoted to political, legal and
consumer aspects of scrambling
which will be of little interest to
technical readers.
Chapter 8 continues with digitising of audio and video signals.
Chapter 9 is of particular interest
with cable and satellite decoders,
and working circuits are included.
Chapter 10 covers the VCII and
BMAC (used in Australia) systems.
Chapter 11 is of general interest, talking about satellite TV
signal strength and interference
and finally, chapter 12 covers the
DES (Data Encryption Standard)
algorithm. Chapter 13 is devoted
to semiconductor data sheets and
chapter 14 covers three relevant
US patents on the subject of
scrambling.
In short, a very interesting and
useful text. It will be available to
order from the SILICON CHIP office.
Phone (02) 9979 5644. (L.D.S.)
July 1997 71
|