Digital Engine Control Systems Overview
Digital Engine Control Systems Overview
➢ The primary purpose of the electronic engine control system is to regulate the air fuel mixture,
ignition timing, and exhaust gas recirculation (EGR).
➢ Ignition timing and EGR are controlled separately to optimize performance and fuel
economy.
➢ The engine control system as shown Fig 1. is a microcontroller implemented with a specially
designed microprocessor and operating under program control.
➢ The associated ROM contains the program for each mode as well as calibration parameters
and lookup tables. The earliest such systems was incorporated in 8-bit microprocessors, but
the trend is toward implementation with 32-bit microprocessors.
➢ The microcontroller under program control generates output electrical signals to operate the
fuel injectors to maintain stoichiometric mixture and ignition to optimize performance.
➢ The correct stoichiometric mixture is obtained by regulating the quantity of fuel delivered
into each cylinder during the intake stroke in accordance with the air mass.
➢ The quantity of fuel delivered by the fuel injector is determined by the operation of the fuel
injector, the fuel injector is a solenoid-operated valve.
➢ When the injector valve is opened, fuel flows at a rate 𝑅𝑓(in gal/sec) that is determined by
the regulated pressure and by the geometry of the fuel injector valve.
➢ The quantity of fuel F delivered to any cylinder is proportional to the time T, the valve is
BEC714C Page 1
Module 3 Digital Engine Control Systems and Control Units
opened
F =𝑅𝑓T
➢ The engine control system then determines the correct quantity of fuel to be delivered to each
cylinder via measurement of mass air flow rate.
➢ The controller then generates an electrical signal that opens the fuel injector valve for the
appropriate time interval „T‟ to deliver the desired fuel quantity to the cylinder such that a
stoichiometric air/fuel ratio is maintained.
➢ The controller also determines the correct time for fuel delivery to correspond to the intake
stroke for the relevant cylinder. Quantity of fuel depends on the particular engine operating
condition as well as the controller mode of operation.
➢ The engine control system is responsible for controlling fuel and ignition for all possible
engine operating conditions.
➢ For a typical engine there are seven different engine operating modes that affect fuel control
are 1) Engine crank 2) Engine warm-up 3) Open-loop control 4) Closed-loop control
5) Hard acceleration 6) Deceleration 7) Idle speed.
➢ The program for mode control logic determines the engine operating mode from sensor data
and timers.
➢ The mode control logic automatically selects an engine start control scheme that provides the
low air/fuel.
➢ When the ignition key is switched on initially, the mode control logic automatically selects
an engine start control scheme that provides the low air/ fuel ratio required for starting the
engine.
➢ Once the engine RPM rises above the cranking value, the controller identifies the “engine
started” mode and passes control to the program for the engine warm-up mode.
➢ This operating mode keeps the air/fuel ratio low to prevent engine stall during cool weather
until the engine coolant temperature rises above some minimum value.
➢ When the coolant temperature rises sufficiently, the mode control logic directs the system to
operate in the open-loop control mode until the EGO sensor warms up enough to provide
accurate readings.
BEC714C Page 2
Module 3 Digital Engine Control Systems and Control Units
➢ This condition is detected by monitoring the EGO sensor‟s output for voltage readings
above a certain minimum rich air/fuel mixture voltage set point. When the sensor has
indicated rich at least once the control mode selection logic selects the closed-loop mode for
the system.
➢ The engine remains in the closed-loop mode until either the EGO sensor cools or fails to
read a rich mixture for a certain length of time or a hard acceleration or deceleration occurs.
If the sensor cools, the control mode logic selects the open-loop mode again
➢ During hard acceleration or heavy engine load, the control mode selection logic chooses the
duration of the acceleration or heavy load. it provides maximum torque but relatively poor
emissions control and poor fuel economy regulation as compared with a stoichiometric
air/fuel ratio.
➢ After the need for enrichment has passed, control is returned to either open- loop or closed-
loop mode, depending on the control mode logic selection conditions that exist at that time.
BEC714C Page 3
Module 3 Digital Engine Control Systems and Control Units
➢ During periods of deceleration, the air/fuel ratio is increased to reduce emissions of HC and
CO due to unburned excess fuel.
➢ When idle conditions are present, the engine speed is controlled to reduce engine roughness
and stalling that occur.
➢ In modern engine control systems, the controller is a special-purpose digital computer built
around a microprocessor as shown in Fig 3.2. The controller also includes ROM containing
the main program, RAM for temporary storage of data during computation.
➢ The sensor signals are connected to the controller via an input/output (I/O) subsystem. The
I/O subsystem provides the output signals to drive the fuel injectors as well as to trigger
pulses to the ignition system.
➢ The solid-state control system includes hardware for sampling and analog-to-digital
conversion such that all sensor measurements are in a format suitable for reading by the
microprocessor.
1. Engine Crank
➢ When the engine is being cranked, the fuel control system must provide an intake air/fuel ratio
of 2:1 to 12:1, depending on engine temperature. The correct air/fuel ratio [(A/F )d]is selected
from a ROM lookup table as a function of coolant temperature.
➢ Low temperatures affect the ability of the fuel metering system to atomize or mix the
incoming air and fuel.
➢ At low temperatures, the fuel tends to form into large droplets in the air, which do not burn as
efficiently as tiny droplets.
➢ The larger fuel droplets tend to increase the apparent air/fuel ratio, because the amount of
usable fuel in the air is reduced therefore, the fuel metering system must provide a decreased
air/fuel ratio to provide the engine with a more combustible air/fuel mixture.
➢ During engine crank the primary issue is to achieve engine start as rapidly as possible. Once
the engine is started the controller switches to an engine warm-up mode
2. Engine Warm Up
➢ When the engine is warming up, an enriched air/fuel ratio is still needed to keep it running
smoothly, but the required air/fuel ratio changes as the temperature increases.
➢ The fuel control system stays in the open-loop mode, but the air/fuel ratio commands
BEC714C Page 4
Module 3 Digital Engine Control Systems and Control Units
continue to be altered due to the temperature changes.
➢ The controller selects a warm-up time from a lookup table based on the temperature of the
coolant. During engine warm-up the air/fuel ratio is still rich, but it is changed by the
controller as the coolant temperature increases.
➢ The measured coolant temperature (CT) is converted to an address for the lookup table. This
address is supplied to the ROM table via the system address bus (A/B).
➢ The data stored at this address in the ROM is the desired air/fuel ratio (A/F ) for that
temperature. This data is sent to the controller via the system data bus (D/B) as shown in Fig
3.3.
➢ The controller is configured to switch from engine warm-up mode to an open- loop mode
after a sufficient time by means of an internal timer.
➢ The quantity of fuel to be injected during the intake stroke of any given cylinder is determined
by the mass of air (A).The quantity of fuel is given by the air charge divided by the desired
air/fuel ratio.
➢ The quantity of air drawn into the cylinder „A’ is computed from the mass air flow rate and
the RPM. The mass air flow rate (MAF) will be given in kg/sec. If the engine speed in
revolutions/minute is RPM, then the number of revolutions/second (which we call r)is
➢ The mass air flow is distributed approximately uniformly to half the cylinders during each
revolution. If the number of cylinders is N then the air charge (mass) in each cylinder during
one revolutions
BEC714C Page 5
Module 3 Digital Engine Control Systems and Control Units
➢ The fuel injector pulse duration T corresponding to this fuel quantity is compute during the
known fuel
3. Open-Loop Control
➢ For a warmed-up engine, the controller will operate in an open loop. The engine may be
warmed sufficiently but the EGO sensor may not provide a usable signal. It is important to
have a stoichiometric mixture to minimize exhaust emissions.
BEC714C Page 6
Module 3 Digital Engine Control Systems and Control Units
➢ Corrections of the base pulse width occur whenever it affects the accuracy of the fuel
delivery.
➢ The base pulse width 𝑇𝑏is computed as described above, except that the desired air/fuel ratio
(A/F ) is14.7 (stoichiometry) From the fig 3.4. an alternate method of computing EGR is
𝑑
computed from RPM and volumetric efficiency.
➢ The volume rate for air is found by subtracting the EGR volume flow rate from the
combined air and EGR.
➢ The mass air flow rate is computed as the product of the volume flow rate for air and the
intake air density.
➢ The speed-density method can be implemented either by computation in the engine control
computer or via lookup tables. From the fig 3.5: the lookup table implementation as three
variables need to be determined: volumetric efficiency (nv), intake density (da), and EGR
volume flow rate (RE ).
➢ The volumetric efficiency is read from ROM with an address determined from RPM and
MAP measurements. The intake air density is read from another section of ROM with an
address determined from MAP and Ti measurements. The EGR volume flow rate is read
from mass air flow rate is the speed-density method.
➢ Although the speed-density method has essentially been replaced by direct mass air flow
measurements.
➢ An measurements of manifold absolute pressure (MAP), RPM, and intake air temperature Ti.
➢ The air density da is computed from MAP and Ti, and the volume flow rate Rv is determined
from differential pressure (DP) and EGR valve position. These variables are combined to
yield the mass air flow rate:
BEC714C Page 7
Module 3 Digital Engine Control Systems and Control Units
➢ In any closed-loop control system a measurement of the output variables is compared with the
desired value for those variables.
➢ The variables being regulated are exhaust gas concentrations of HC, CO, and NOx, direct
measurement of these exhaust gases is not feasible in production automobiles.
➢ The closed-loop mode can only be activated when the EGO sensor is sufficiently warmed.
➢ The output voltage of the sensor is high when the exhaust oxygen concentration is low. The
EGO sensor voltage is low whenever the exhaust oxygen concentration is high.
➢ Fuel delivery is regulated by the engine control system by controlling the pulse duration (T)
for each fuel injector..
BEC714C Page 8
Module 3 Digital Engine Control Systems and Control Units
➢ A representative algorithm for fuel injector pulse duration for a given injector during the nth
computation cycle, T(n), is given by
➢ Whenever the EGO sensor indicates a rich mixture , then the integral term is reduced by the
controller for the next cycle is I (n +1) = I(n) – 1
➢ Whenever the EGO sensor indicates a lean mixture, the controller increments I(n) for
the next cycle
I (n +1) = I(n) + 1
➢ Fig 3.6 During relatively lean periods the closed-loop correction term increases for each
computation cycle, where as during relatively rich intervals this term decreases.
BEC714C Page 9
Module 3 Digital Engine Control Systems and Control Units
5. Acceleration enrichment
➢ During periods of heavy engine load such as during hard acceleration, fuel control is adjusted
to provide an enriched air/fuel ratio to maximize engine torque and neglect fuel economy and
emissions.
➢ The computer detects this condition by reading the throttle angle sensor voltage. High throttle
angle corresponds to heavy engine load and is an indication that heavy acceleration is called
for, by the driver.
➢ The fuel system controller responds by increasing the pulse duration of the fuel injector signal
for the duration of the heavy load. Enrichment of the air/fuel ratio is about 12:1.
6. Deceleration leaning
➢ During periods of light engine load and high RPM such as during coasting or hard
deceleration, the engine operates with a very lean air/fuel ratio to reduce excess emissions of
HC and CO.
BEC714C Page 10
Module 3 Digital Engine Control Systems and Control Units
➢ The control mode selection logic switches to speed control, when the throttle angle reaches
its zero (completely closed) position and engine RPM falls below a minimum value, and
when the vehicle is stationary.
➢ Idle speed is controlled by using an electronically controlled throttle bypass valve that allows
air to flow around the throttle plate and produces the same effect as if the throttle had been
slightly opened.
➢ There are various schemes for operating a valve to introduce bypass air for idle control. One
relatively common method for controlling the idle speed bypass air uses a special type of
motor called a stepper motor.
➢ A stepper motor moves in fixed angular increments when activated by pulses on its two sets
of windings as shown in Fig 3.7a
BEC714C Page 11
Module 3 Digital Engine Control Systems and Control Units
➢ From fig 3.7b the engine control computer can know the position of the value in a number of
ways. In one way the computer can send sufficient pulses to completely close the valve when
the ignition is first switched on. Then it can send open pulse to a specified position.
➢ The Idle speed is detected by the RPM sensor, and the speed is adjusted to maintain a constant
BEC714C Page 12
Module 3 Digital Engine Control Systems and Control Units
idle RPM. The computer receives digital on/off status inputs from several power-consuming
devices attached to the engine.
➢ When the engine is not idling, the idle speed control valve may be completely closed so that
the throttle plate has total control of intake air.
➢ During periods of deceleration leaning, the idle speed valve may be opened to provide extra
air to increase the air/fuel ratio in order to reduce HC emissions.
EGR Control
➢ A second electronic engine control subsystem is the control of exhaust gas that is recirculated
back to the intake manifold.
➢ Under normal operating conditions, engine cylinder temperatures can reach more than 3000°F.
The higher the temperature, the more chance the exhaust will have Nox emissions.
➢ A small amount of exhaust gas is introduced into the cylinder to replace normal intake air.
This results in lower combustion temperatures, which reduces Nox emissions.
➢ The control mode selection logic determines when EGR is turned off or on.
➢ A valve is Positioned along this passageway whose position regulates EGR from zero to
some maximum value as shown in Fig 3.8. Typically the valve is operated by a diaphragm
connected to a variable vacuum source.
BEC714C Page 13
Module 3 Digital Engine Control Systems and Control Units
➢ In many EGR control systems the controller monitors the differential pressure between the
exhaust and intake manifold via a differential pressure sensor (DPS). With this signal from
the sensor, the controller can calculate the valve opening for the desired EGR level.
➢ Before the development of electronic ignition the traditional ignition system included spark
plugs, a distributor, and a high-voltage ignition coil.
➢ The distributor would sequentially connect the coil output high voltage to the correct spark
plug. In addition, it would cause the coil to generate the spark by interrupting the primary
current in the desired coil, thereby generating the required spark.
➢ The time of occurrence of this spark in relation of the piston to TDC influences the torque
generated.
BEC714C Page 14
Module 3 Digital Engine Control Systems and Control Units
➢ The coil fires the spark plugs for the two cylinders simultaneously. For the first cylinder, the
mixture is ignited and combustion begins for the power stroke. For the other the
combustion has already taken place and the spark has no effect.
➢ The variables that influence the optimum spark timing at any operating condition include
RPM, manifold pressure , barometric pressure, and coolant temperature.
➢ The correct ignition timing for each value of these variables is stored in a ROM lookup
table. The variation of spark advance (SA) with RPM for a representative engine as shown
in Fig 3.9a.
➢ The engine control system obtains readings from the various sensors and generates an
address to the lookup table (ROM). After reading the data from the lookup tables, the control
system computes the correct spark advance. An output signal is generated at the appropriate
time to activate the spark.
➢ The coil driver circuits generate the primary current in windings P1 and P2 of the coil packs
depicted in Figure 3.9a above.
➢ At the correct time the driver circuits interrupt the primary currents via a solid-state switch.
This interruption of the primary current causes the magnetic field in the coil pack to drop
rapidly, inducing a very high voltage (20,000–40,000 volts) that causes a spark.
The total spark advance, SA (in degrees before TDC), is made up of several components that are
added together: Fig 9:
SA = SA S + SAP + SA T
➢ The first component, SAS, is the basic spark advance, which is a tabulated function of RPM
and MAP.
➢ The second component, SAP, is the contribution to spark advance due to manifold pressure.
This value is obtained from ROM lookup tables.
➢ The final component, SAT, is the contribution to spark advance due to temperature.
BEC714C Page 15
Module 3 Digital Engine Control Systems and Control Units
➢ The spark relative to TDC increases the torque until a point is reached at which best torque is
produced. This spark advance is known as mean best torque or MBT.
➢ When the spark is advanced too far, an abnormal combustion phenomenon occurs that is
known as knocking as shown in Fig 3. 11.
➢ The frequency of these oscillations is specific to a given engine configuration and the range is
BEC714C Page 16
Module 3 Digital Engine Control Systems and Control Units
about few kilohertz. A excessive knock will damage the engine and must be avoided.
➢ One control strategy for spark advance under closed-loop control is to advance the spark
timing until the knock level becomes unacceptable. At this point, the control system reduces
the spark advance until acceptable levels of knock are achieved.
➢ A spark scheme advance control is based on limiting the levels of knocking requires a knock
sensor.
BEC714C Page 17
Module 3 Digital Engine Control Systems and Control Units
➢ The level of knock intensity is indicated by voltage (𝑇) at the end of the gate interval.
The spark control system compares this voltage with a threshold voltage to determine
whether knock has or has not occurred.
➢ The comparator output voltage is binary valued, depending on the relative amplitude of
(𝑇) and the threshold voltage.
BEC714C Page 18
Module 3 Digital Engine Control Systems and Control Units
➢ Whenever (𝑇) is less than the threshold voltage, the comparator output is low, indicating
no knock. Whenever (𝑇) is greater than the threshold value, the comparator output is
high, indicating knock. as shown in fig 3.14:
➢ There are generally two classes of correction that are used fast correction and slow
correction.
➢ In the fast correction scheme, the spark advance is decreased for the next engine cycle
by a fixed amount (typically from 5° to 10°) whenever knock is detected.
➢ Then the spark advance is advanced in one degree increments every 5 to 20 crankshaft
revolutions. The fast correction ensures that minimum time is spent under heavy
knocking conditions
➢ In the slow correction scheme, spark advance is decreased by one (or more) degree
each time knock is detected, until no knocking is detected. The spark advance
proceeds in one- degree increments after many engine cycles.
➢ The slow correction scheme is more of an adaptive closed-loop control than is the fast
correction
BEC714C Page 19
Module 3 Digital Engine Control Systems and Control Units
➢ During engine warm-up when the catalytic converter is cold, HC and CO are oxidized in
the exhaust manifold by routing secondary air to the manifold.
➢ This creates extra heat to speed warm-up of the converter and EGO sensor, enabling the
fuel controller to go to the closed-loop mode more quickly.
➢ A large amount of HC and CO are oxidized in the manifold during periods of heavy loads,
which creates more heat and converter can be damaged In such cases, the secondary air is
directed to the air cleaner, where it has no effect on exhaust temperatures.
➢ After warm-up, the main use of secondary air is to provide an oxygen-rich atmosphere in the
BEC714C Page 20
Module 3 Digital Engine Control Systems and Control Units
second chamber of the three-way catalyst, dual-chamber converter system.
➢ In a dual-chamber converter, the first chamber contains rhodium, palladium, and platinum to
reduce NOx and to oxidize HC and CO.
➢ The second chamber contains only platinum and palladium. The extra oxygen from the
secondary air improves the converter‟s ability to oxidize HC and CO in the second converter
chamber.
➢ The computer program for the control mode selection logic can be modified to include the
conditions for controlling secondary air.
➢ The computer controls secondary air by using two solenoid valves similar to the EGR valve.
One valve switches air flow to the air cleaner or to the exhaust system. The other valve
switches air flow to the exhaust manifold or to the converter.
➢ The air routing is based on engine coolant temperature and air/fuel ratio.
BEC714C Page 21
Module 3 Digital Engine Control Systems and Control Units
➢ During engine-off conditions, the fuel stored in the fuel system tends to evaporate into
the atmosphere. To reduce these HC emissions, they are collected by a charcoal filter
in a canister.
➢ The collected fuel is released into the intake through a solenoid valve controlled by the
computer. This is done during closed-loop operation to reduce fuel calculation
complications in the open- loop mode.
➢ Automatic transmissions use a hydraulic or fluid coupling to transmit engine power to the
wheels. Because of slip, the fluid coupling is less efficient than the nonslip coupling of a
pressure-plate manual clutch used with a manual transmission.
➢ The automatic transmission to provide fuel economy near that of a manual transmission and
still retain the automatic shifting convenience.
➢ Many control systems use this feature to enable the computer to learn new lookup table values
for computing open- loop air/fuel ratios.
➢ When the computer is in the closed-loop mode, the computer checks its open-loop calculated
air/fuel ratios and compares them with the closed-loop average limit-cycle values.
➢ If they match closely, nothing is learned and the open-loop lookup tables are unchanged.
➢ If the difference is large, the system controller corrects the lookup tables so that the open-loop
values more closely match the closed-loop values.
➢ This updated open-loop lookup table is stored in separate memory (RAM),which is always
powered directly by a car battery so that the new values are not lost while the ignition key is
turned off.
➢ The next time the engine is started, the new lookup table values will be used in the open-loop
mode and will provide more accurate control of the air/fuel ratio. This feature is very
BEC714C Page 22
Module 3 Digital Engine Control Systems and Control Units
important because it allows the system controller to adjust to long-term changes in engine and
fuel system conditions.
System Diagnosis
➢ Sensor and actuator failures or misadjustments can be easily detected by the computer.
➢ The computer will detect a malfunctioning of MAF sensor, if the sensor‟s output goes above
or below certain specified limits, or fails to change for long periods of time..
➢ If the computer detects the loss of a primary control sensor or actuator, it may choose to
operate in a different mode until the problem is repaired.
➢ The operator is notified of a failure by blinking lights or some other indicator on the
instrument panel.
CONTROL UNIT
➢ A large number of parameters can be included in the process to support optimal operation of
various systems.
➢ The control unit receives the electrical signals from the sensors, evaluates them, and then
calculates the triggering signals for the actuators.
➢ The Motronic control unit contains all of the algorithms for open and closed-loop control
needed to govern the engine-management processes (ignition, induction and mixture
formation, etc.).
OPERATING CONDITIONS
The control unit is subjected to very high demands with respect to
➢ Extreme ambient temperatures
➢ Extreme temperature changes
➢ Indirect materials and supplies
➢ The effects of moisture and Mechanical stress such as vibration from the engine
➢ The control unit must operate reliably when the vehicle is started with a weak battery
BEC714C Page 23
Module 3 Digital Engine Control Systems and Control Units
(e.g. cold start) and with high charge voltages .
Design
➢ The printed circuit board with the electrical components is installed in a housing of
plastic or metal.
➢ A multiple plug connects the control unit to the sensors, actuators and electrical power
supply. The high-performance driver circuits that provide direct control of the actuators
are specially integrated within the housing
➢ The majority of the electrical components are of the surface-mounted device technology
type.
Data processing
Input signals
➢ The actuators and the sensors represent the interface between the vehicle and the control
unit in its role as the processing unit.
➢ The electrical signals of the sensors are routed to the control unit via a wiring harness and
the connector plug.
➢ These signals can be of the following type:
Analog input signals
➢ Analog input signals within a given range, analog input signals can assume practically
any voltage value.
➢ They are converted into digital values by an analog to digital converter in the
microcontroller of the control unit and used for calculations by the microcontroller CPU.
➢ The maximum resolution of these analog signals is 5 mV.
Digital input signals
➢ Digital input signals only have two states, They are either “high” or “low” (logical 1and
logical 0 respectively).Such signals are processed directly by the microcontroller.
Pulse-type input signals
➢ The pulse-shaped input signals from inductive-type sensors containing information on
rotational speed and reference mark are conditioned in their own control unit stage.
➢ spurious pulses are suppressed and the pulse-shaped signals converted into digital
rectangular signals.
BEC714C Page 24
Module 3 Digital Engine Control Systems and Control Units
Signal conditioning
➢ Protective circuits limit the voltages of input signals to levels suitable for processing.
➢ Filters separate the useful signal from most interference signals.
➢ The signals are then amplified to the input voltage required by the microcontroller (0 to 5
V).
➢ Signal conditioning can take place completely or partially in the sensor depending upon
the sensor‟s level of integration.
Signal processing
➢ The control unit is the switching center governing all of the functions and sequences
regulated by the engine-management system.
➢ The closed and open-loop control functions are executed in the microcontroller.
➢ The input signals that are provided by the sensors and the interfaces to other systems
(such as the CAN bus) are used as input variables.
➢ The control unit program supports generation of the output signals used to control the
actuators.
Output signals
➢ The microcontroller uses the output signals to control output stages that usually provide
enough power for connecting the actuators directly.
➢ The output stages are proof against short circuits to ground or battery voltage, as well as
against destruction due to electrical or thermal overload.
➢ Such malfunctions, together with open-circuit lines or sensor faults are identified by the
output stage IC as an error and reported to the microcontroller.
➢ Switching signals Actuators can be switched on and off using the switching signals (e.g.
motor fans).
PWM signals
➢ Digital output signals can be in the form of PWM (Pulse-Width Modulated) signals.
➢ These are constant-frequency rectangular signals with variable on-times Fig 3.18.
➢ Various actuators can be moved to various operating positions using these signals.
BEC714C Page 25
Module 3 Digital Engine Control Systems and Control Units
EOL programming
➢ The different vehicle is differing with control programs and data records.
BEC714C Page 26
Module 3 Digital Engine Control Systems and Control Units
➢ The Flash-EPROM‟s complete memory area can be programmed at the end of production
with the program and the variant-specific data record.
➢ Another way of reducing the type diversity is to store several data variants in the
memory, which are then selected using coding at the end of the production line. This
coding is stored in an EEPROM.
BEC714C Page 27
Module 3 Digital Engine Control Systems and Control Units
Programming
➢ The only command form capable of direct interpretation by a microprocessor is a bit
pattern.
➢ These are automatically translated by an assembler program into bit patterns (machine
code) that can be understood by the microprocessor.
➢ For more complex systems and programs, high-level programming languages such as C
are needed, as otherwise it would be impossible to keep extensive programs manageable
and free of errors.
➢ Such languages require sophisticated translation programs (compilers) which convert the
text of the high-level language into a form that can be processed by the microcontroller.
➢ The machine code is stored in the program memory, where it remains permanently.
BEC714C Page 28
Module 3 Digital Engine Control Systems and Control Units
BEC714C Page 29
Module 3 Digital Engine Control Systems and Control Units
Semiconductor memories
Applications
➢ Memories are used to store large volumes of Digital signals representing data
➢ Program code and
➢ Constants
Storage involves
➢ Recording (writing)
➢ Permanent retention (actual storage)and
➢ Location and retrieval (reading) of information
➢ Memories utilize physical effects that clearly and easily create and show two different
states (e.g. conducting/non-conducting or loaded/not loaded).
➢ The information that is to be stored must therefore exist in binary form, i.e. encoded as a
series of “yes or no” statuses (logical “1”or logical “0”).
➢ Memory modules are organized on a bit or word basis, depending on the application.
➢ A “word” is a group of bits that can be processed as a single unit.
➢ The word length is equal to the number of bits processed as a single unit. Eight bits are
referred to as a byte.
BEC714C Page 30
Module 3 Digital Engine Control Systems and Control Units
Read-only memory
➢ Read-only memory (ROM) is permanent storage memory that allows any memory
location to be accessed directly but as the name indicates allows the information only to
be read and not modified.
➢ A ROM is nonvolatile memory, i.e. the information it contains is retained even when the
operating voltage is switched off.
➢ It is usually used to store program code(control programs) and fixed data that need to be
retrievable at any time.
➢ The information may be indelibly entered in the memory by the manufacturer or the user
by means of appropriate programming of specially prepared memories (PROMs or
programmable ROMs).
Erasable ROM
➢ There are also ROMs whose contents can be erased and reprogrammed as outlined below.
Flash EEPROM
➢ A more sophisticated variant of the EPROM and EEPROM is flash EEPROM.
➢ In this case, electrical flash pulses are used to erase specific storage areas or the entire
contents of the memory.
BEC714C Page 31
Module 3 Digital Engine Control Systems and Control Units
➢ The erased areas can subsequently be reprogrammed.
➢ The flash memory can be reprogrammed on a programming station.
➢ The advantage of flash EEPROM is that is can also be reprogrammed while still inside
the sealed control unit.
Software structure
BEC714C Page 32
Module 3 Digital Engine Control Systems and Control Units
➢ The microcontrollers that are currently used in vehicles can execute upto 1 million
commands per second.
➢ The engine-management program has to react extremely quickly to signals from the
speed sensor, which records the engine speed and the crankshaft position.
➢ These signals arrive at short intervals that can be a matter of milliseconds, depending on
the engine speed.
Interrupt control
➢ As an event occurs that requires an extremely rapid response, the program that is
currently running must be interrupted. This can be done using the microcontroller‟s
interrupt control facility.
➢ Events can trigger a program execution interrupt, where upon the program jumps and
executes the “interrupt routine”.
➢ When this routine has been executed, the program resumes at the point at which it was
interrupted
➢ An interrupt can be triggered by an external signal
➢ The control unit program reacts to several of these interrupts. An interrupt source can
therefore request an interrupt while another interrupt routine is currently being executed.
➢ Every interrupt source therefore has a fixed priority assigned to it.
➢ The priority controller decides which interrupt is allowed to interrupt another interrupt.
BEC714C Page 33
Module 3 Digital Engine Control Systems and Control Units
Tooth interrupt
➢ The crankshaft is equipped with a pulse wheel Fig 3.21. That has a certain number of
teeth on its circumference. The teeth are scanned by the speed sensor.
➢ This allows the crankshaft position to be recorded. The typical distance between a pair of
teeth on the crankshaft sensor wheel is 6°.
➢ In order to determine the crankshaft position, the control unit program must execute
certain routines as each tooth is detected. At 6,000 rpm the detection time between two
teeth is approximately 300 μs.
➢ Every command in these routines must be executed within this time. This requires a rapid
response to the speed sensor signal.
➢ For this purpose, the engine-speed signal is connected to a microcontroller interrupt
input. Every falling signal edge at this input interrupts the current calculations that are in
progress and forces a branch to the interrupt routine.
➢ After executing the commands in the interrupt routine, the program continues execution
at its point of origin.
➢ In order to perform certain operations the control unit program requires the time taken for
the crankshaft to travel between one tooth and the next.
➢ This calculation is performed by an internal timer. This is a freewheeling 16-bit counter
Fig 3.21. that increments at a certain rate, depending on the microcontroller oscillator
clock cycle.
➢ This time frame amounts to about 0.5 μs. When the falling tooth flank occurs, the current
counter status is recorded. The difference (and therefore the tooth interval) is calculated
using the stored counter from the previous tooth.
BEC714C Page 34
Module 3 Digital Engine Control Systems and Control Units
Combustion-synchronous interrupt
➢ Some calculations have to be performed for every combustion cycle. For example, the
ignition angle and the injection have to be recalculated synchronously with combustion
for each cylinder. The program does this by branching to the “synchronization program”
after certain teeth (Fig. 3.22).
➢ This interrupt takes place after every 30 teeth (ignition interval) for a four cylinder
engine, and after every 20 teeth for a six-cylinder engine.
➢ The synchronization program is fixed to a certain tooth position and has to be executed
with high priority. For this reason it is activated via an interrupt (triggered by a command
in the tooth interrupt routine).
➢ Since the synchronization program runs over several teeth at fast engine speeds, it has to
be interrupted by the tooth interrupt. The tooth interrupt is given higher priority than the
synchronization program.
BEC714C Page 35
Module 3 Digital Engine Control Systems and Control Units
Ignition interrupt
➢ The ignition output takes place within a certain crankshaft range, depending on the value
from the ignition map, the ignition output is controlled by an interrupt.
➢ Like the synchronization program, the ignition interrupt is also called up once per
combustion cycle.
➢ The control unit program is aware of the crankshaft position in the 6° framework.
➢ The framework is not accurate enough for ignition angle output.
➢ Accurate ignition output between two teeth must take place as well as this approximate
counting for the last 0 to6 crankshaft degrees. This is done using a timer Fig. 3.23.
➢ Ignition angle output that was purely timer-controller would lead to an ignition angle
output error at high engine speed dynamics. Firstly, the ignition coil must be enabled for
a defined
➢ In order to do this, the program calculates the switch-on time by calculating backwards
from the ignition angle at which the ignition coil has to be switched off.
➢ This makes it possible to calculate the tooth after which the ignition coil has to be
switched off .
➢ The remaining angle(detailed counting 0 to 6°) is converted into an output time using the
current engine speed. As soon as the specified tooth position has been reached using
approximate counting, a time is loaded with the output value from the detailed counting.
When this time period expires, the timer triggers an interrupt.
➢ The commands that switch on the ignition coil are programmed in this interrupt routine.
BEC714C Page 36
Module 3 Digital Engine Control Systems and Control Units
➢ Then the timer is preset to the dwell period value, which causes an interrupt to be
triggered when the timer elapses, switching off the ignition coil and therefore initiating
ignition.
Background program
➢ All other activities that do not run in an interrupt routine or a time frame are processed in
the background program.
➢ At fast engine speeds, the synchronization program and the tooth interrupt are called
frequently, leaving little CPU time for the background program.
➢ The time taken for a complete run-through of the background program therefore increases
rapidly with the increasing engine speed.
➢ The background program must therefore only contain low-priority functions.
BEC714C Page 37