You are on page 1of 11

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/357044797

Design and Simulation of Engine Management System

Conference Paper · October 2021


DOI: 10.1145/3492547.3492605

CITATIONS READS
0 389

3 authors:

Salma Mohammed Masouda abdalrhman Mohmed


University of Omar Al-Mukhtar University of Omar Al-Mukhtar
9 PUBLICATIONS   8 CITATIONS    1 PUBLICATION   0 CITATIONS   

SEE PROFILE SEE PROFILE

Tahani Abdalmawla
University of Omar Al-Mukhtar
1 PUBLICATION   0 CITATIONS   

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Conformance Testing Using Finite State Machine View project

FSM model solved problems View project

All content following this page was uploaded by Salma Mohammed on 21 December 2021.

The user has requested enhancement of the downloaded file.


Design and Simulation of Engine Management System

SALMA MOHAMMED* , Department of Computer Science Omar AL-Mukhtar University, Libya


MASOUDA MOHAMED, Department of Computer Science Omar AL-Mukhtar University, Libya
TAHANI ABDALMAWLA, Department of Computer Science Omar AL-Mukhtar University, Libya
The development of manufacturing and management, technologies over the previous decade has transformed the
automotive industry. The engine management system is undoubtedly one of the most intelligent systems in today’s
automobile. The purpose of this paper is to design and simulate an automotive engine management system. Based
on a PIC development board, we design and implement engine control functions which include an ignition system,
acceleration, deceleration, emergency brakes, hand brakes, speed, and distance travelled. The C language is chosen for
the development of PIC microcontroller. Results have shown and proven the success of the proposed system.

CCS Concepts: ∙ Computer systems organization → Embedded systems; Redundancy; Robotics; ∙ Networks
→ Network reliability.

Additional Key Words and Phrases: Automotive Embedded Systems, Engine Management System(ESM),Engine
Control Unit(ECU), PIC Microcontroller

ACM Reference Format:


Salma Mohammed, Masouda Mohamed, and Tahani Abdalmawla. 2021. Design and Simulation of Engine Management
System. In Woodstock ’18: ACM Symposium on Neural Gaze Detection, June 03–05, 2018, Woodstock, NY . ACM,
New York, NY, USA, 10 pages. https://doi.org/10.1145/1122445.1122456

1 INTRODUCTION
These days, the automotive industry is actually the sixth biggest in the world. Produces approx. 70 million
vehicles per year and provides significantly add to the world’s government income [11].As an engineering
technology, automotive electronically controlled technology has progressed from the either-1990s to 2010. At
this point, the electronics industry for the automotive industry is providing a much more advanced dexterous
reliable electricity supply. Sensor and,on this basis, have 8 or 16 large-capacity memory, microprocessor,
On this foundation, the overall design of the mechanical and electrical systems of the vehicle is organized
and based on the overall design of the automotive mechatronics system. Engine management systems will
concentrate on fixing the issues of automatic control car parts or assembly, will continue to build a commonly
used computer network and IT to make vehicles more autonomous, smart technologies, automotive and
social convergence, and will fix concerns like transfer [9]. In this paper we studies and designs EMS as
example of automotive industry.In order to achieve high efficiency, low fuel consumption and low exhaust
emissions,EMS have become an integral component of a Spark Ignition (SI) engine the construction of
EMS is an amalgamate-signal embedded system that interconnects with the engine via a variety of sensors
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee
provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and
the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored.
Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires
prior specific permission and/or a fee. Request permissions from permissions@acm.org.

c 2021 Association for Computing Machinery.
Manuscript submitted to ACM

1
Woodstock ’18, June 03–05, 2018, Woodstock, NY Mohammed and Mohamed, Abdalmawla.

and actuators [1].As well, the control unit of ESM consists of an engine control algorithm. An engine
management system control techniques are purposed for air-to-fuel ratio control, ignition control, and
electronic throttle control also and idle speed control, etc. Consequently, the architecture of the control
system of the EMS involves several structurally engineered sub-control modules to supply an optimal engine
performance. Higher engine performance is achieved by the efficient design and execution of the EMS control
system. The architecture of the engine control system is a very difficult job due to the complexities of
the functions required [2]. Several types of research related to engine management systems . In [11] the
automotive electronic control technology concept is introduced. This article provides more detail about
the recent applications of auto-mobile electronic control system also, development the feelings of electrical
control technology in the automotive industry. Overview review of the fundamental control components in
SI EMS throughout its purposes and control strategies was presented in [9].In [1] through co-simulation
and software estimation was performed partition process for ECU. Additionally, optimizing the system
based on the size of the code and running time .Also, collapsing or separating modules discriminatively,
and by using conditional statements to shifting the threshold among control and data flow. The engine
model in [2] was progressed and simulated control functions. Also, was emphasized on checking the control
functions of a virtual engine model. This paper designs and simulates of embedded auto-mobile system . we
designs and implements the engine control functions which are ignition,acceleration,deceleration,emergency
brakes,hand brake,and illustrates the speed, and distance travelled . The rest of this paper is organized
as follows.In section 2 illustrates detailed descriptions of Engine management system components.Section
3 shows the hardware design of EMS .Section 4 shows the software design .Section 5 show the results of
EMS.Finally,Section 6 a conclusion of our work.

2 ENGINE MANAGEMENT SYSTEM COMPONENTS


Formerly, the engine controls were applied using mechanical devices for instance carburettor, mechanical
diesel fuel injector, distributor through centrifugal or vacuum advance, plus thermal bi-metal actuators.
While in many applications, these devices offered suitable performance, also were comparatively low-cost.
The devices did not offer the level of control required to comply with today’s pollution regulations. Nowadays,
automatically the devices perform innumerable control functions using sensors and actuators the information
of the working state of the engine provides from the sensors, for regulating their process the actuators are
used.Using the sensors, the ECU processes the information, also decides for each actuator the required
location [8].Figure 1 depicts some of the components of the engine control system.

2
Design and Simulation of Engine Management System Woodstock ’18, June 03–05, 2018, Woodstock, NY

Fig. 1. Engine Management System Components [8]

2.1 Sensors
Various sensors interpret signals from the car driver. For Instance of sensors accelerator pedal position,
transmission range selector, also, brake pedal switch. Additional sensors are responsible for providing the
data for the state of the operating engine. Which are coolant temperature, intake air temperature, and
barometric pressure. Other sensors provide the data for the existing state of the engine. Also, can be utilized
for feed-forward plus feedback control. These involve the position sensor of the crankshaft, which is utilized
both for ignition and fuel injection timing and for engine speed calculation [8].

2.2 Controller
Emission regulations have been a role in the increasing usage of electronic engine controls.Electronic controls
allow for more precise control of the air-to-fuel ratio, spark advance, fuel injection timing, and EGR flow
rate. Electronic controls can also increase performance, accuracy, fuel efficiency, and vehicle integration [8].

2.3 Actuators
Actuators are devices that regulate the operation of the engine.Common actuators are fuel injector, air
throttle, EGR valve, VGT turbine vanes, and ignition system. To maintain the required position, Actuators
with location control usually have a position sensor which is paired with the feedback controller [8].

2.3.1 Ignition system. The ignition mechanism measures the ignition angle that defines the point at which
the ignition spark is created to ignite the mixture of air and fuel in the combustion chamber. This is
dependent on the mass flow of air and the present speed of the piston.The specified ignition time shall refer
to combustion operations across all cylinders [5].

2.3.2 fuelling system. The fueling system calculates the fuel mass to be injected in the intake manifold for
a combustion process in a cylinder [5].

3
Woodstock ’18, June 03–05, 2018, Woodstock, NY Mohammed and Mohamed, Abdalmawla.

3 HARDWARE DESIGN
The block diagram for a typical engine management system is shown in Figure 2 which have four main
components Switches, LEDs, LCD and PIC16F84 Microcontroller.The push button switches as inputs to
the system. LCD and LEDs as outputs.

Ignition Switch Ignition Light

Accelerator Pedal Firing Pulses

Hand Brake Microcontroller Wheels


Switches PIC16F84 LEDs
Hand Brake
Brakes

Emergency Brakes Brake Lights

LCD
Speed
Mileage

Fig. 2. The EMS Hardware Block Diagram

3.1 PIC16F84 Microcontroller


The PIC16FXX family has characteristics that decrease the need for external components, lowering costs,
improving system dependability, and lowering power usage.PIC16F84 categorizes into the group of 8-bit
Microcontroller,low cost,high-efficiency and has RICS architecture.In addtion, Suitable for a wide range of
digital applications. It contains input and output Ports PORTA,PORTB.which involve 13 input/output
pins.Also,1024 x 14 bit Flash program memory,68 bytes of RAM and 64 byte of data EEPROM memory
.One 8-bit timer/counter with 8 bit Prescaler.Stack with eight deep level ,and several interrupt sources
which are internal and external.Based on Harvard architecture, the wide of separate instruction is 14-bit for
each word with the separate 8-bit data bus [10].

Fig. 3. PIC16F84 Microcontroller [10]

3.2 Liquid Crystal Display (LCD)


LCD is an electronic presentation module which produces a visible image by utilizing liquid crystal.it display
characters, numbers and special characters [12].

4
Design and Simulation of Engine Management System Woodstock ’18, June 03–05, 2018, Woodstock, NY

3.3 Push Button Switch


The push button switch is a kind of switch that comprises of a basic electrical technique or an air switch
technique to turn anything on or off [4].

3.4 Light Emitting Diode (LED)


LED is a ”Light Emitting Diode” type of semiconductor.LEDs are semiconductor light sources that merge
the pairs, which are a P-type semiconductor with N-type semiconductor [14].

4 SOFTWARE DESIGN
The system of ESM was simulated on the PIC16F84 development board.The program is written in C
language in IAR Workbench IDE.IAR Workbench IDE (integrated development environment) is professional
IDE for PIC.The simplified block diagram shown below illustrates the inputs and outputs of an EMS for
4-cylinder car.

Ignition Switch RB7 RA4 Ignition Light

Accelerator Pedal RB4 RA0 Firing Pulses

Hand Brake RB6 Engine Management RA1 Wheels


System
(EMS) RA2 Hand Brake
Brakes RB5

Emergency Brakes RB0 RA3 Brake Lights

Speed
Mileage

Fig. 4. Block Diagram of Inputs and Outputs of the EMS

The following figure 5 demonstrates the flow chart of PIC Programming for EMS.

5
Woodstock ’18, June 03–05, 2018, Woodstock, NY Mohammed and Mohamed, Abdalmawla.

Start

Read the switch

No If The Iignition switch


is pressed If the
emergency
brake is
Yes
pressed
Turn on the ignition light

Yes
Flashing LED once per sec.
Firing pulses 1Hz
Decrease the speed to 1Hz for
2second

No If the Accelerator

Pedal is turned on
Firing pulses remains flashing at If the hand brake is
1Hz. Yes pressed and freq
equal to 1H
No
If The frequency is
equal to 10000 Yes

Yes
Engine is turned off,and the brake
Increase the frequency firing Increase the speed from 10 to
light is turned on
flashing from 1 to 10Hz 1000Hz

turned off brake light for 1 sec

If Decelerator Display the speed and distance


switch is turned travelled on LCD
on and the
frequency is
over than 1Hz
Turned off the engine,
Engine start again by press
Yes switch ignition

Decrease the speed to 10Hz ,a rate of


10Hz in 9 secs.

End

Fig. 5. FlowChart of whole Program

The basic control functions of the systems shown as following figure 6

Ignition

Acceleration

Deceleration

Eemergency
Brakes

Hand Brakes

Display The Speed


and Distance

Fig. 6. Block Diagram of EMS Functions

6
Design and Simulation of Engine Management System Woodstock ’18, June 03–05, 2018, Woodstock, NY

4.1 Ignition System


To start the car movement operation have to press the ignition key winch is a switch RB7. Afterword,
Operates the engine at idle mode by sending firing pulses at 1Hz.That means flashing the LED (RA0) once
every second.The equation below illustrates calculating a one second.
4 * 𝑃𝑟𝑒𝑠𝑐𝑎𝑙𝑒𝑟 * 𝑇 𝑀 𝑅0𝑣𝑎𝑙𝑢𝑒
𝑇 = (1)
𝐹𝑐𝑟𝑦𝑠𝑡𝑎𝑙 * 106
In the whole program, it was assigned a Prescaler 8.PIC board uses frequency 3.3768MHz crystal.
4 * 8 * 𝑇 𝑀 𝑅0𝑣𝑎𝑙𝑢𝑒
0.001 = (2)
3.3768 * 106
The result of the equation is 153 (0x99h).This value obtains no more than 1ms for overflow.Will count to
1000 to acquire 1sec.The following table show registers values.

Table 1. Registers Values

Register Value
INTCON 0xa0

Examine the ignition switch if it is turned on.Leap to interrupt section to compare the frequency with
the counter if it isn’t equal to 1000 the counter continues to count until frequency equal to 1000 which
represents 1 sec. Subsequently, turn on the firing switch and turned off for 1 sec.Otherwise,if RB7 is turned
off the ignition light turned off RA4=0.Otherwise ,If RB4 isn’t pressed on the Firing pulses RA0 remains
flashing at 1Hz.

4.2 Acceleration
Check if the RB4 is switched on.At that point,compare if the frequency is equal to 1000. Additionally,
Compare the acceleration frequency if it is greater than 1000(1Hz).Subtract the frequency from 100 with
a delay of 50ms. To increase the speed from 1Hz to 10Hz repeat this method ten times.The wheels start
moving when the engine receives 10Hz.On the other hand, if the frequency isn’t equal to 1000. Increase the
speed from 10Hz to 100Hz. via comparing the acceleration frequency if it is greater than 10Hz.Subtract the
frequency from 10 with a delay 10000Ms. The function of increase frequency from 1 to 10Hz and from 10 to
100Hz is similar.Depend on the value of frequency and time.

𝑓 𝑟𝑒𝑞 = 𝑓 𝑟𝑒𝑞 − 𝑓 𝑟𝑒𝑞 𝑎𝑐𝑐𝑒𝑙𝑒𝑟𝑎𝑡𝑖𝑜𝑛 (3)

where:
𝑓 𝑟𝑒𝑞 = 𝑓 𝑟𝑒𝑞 − 100𝐻𝑧 (4)
Otherwise ,If RB4 isn’t pressed on the Firing pulses RA0 remains flashing at 1Hz.

4.3 Deceleration
Examine if the RB5 is pressed,the brake light will RA3 turned on and at the same time, the speed is
decreased to 1Hz a rate of 10Hz in 9 secs. To clarify, when the RB5 was pressed and the frequency is greater
than 1000 add 100 to deceleration frequency to obtain 1000ms (1Hz). If obtain 1 Hz the speed is zero and

7
Woodstock ’18, June 03–05, 2018, Woodstock, NY Mohammed and Mohamed, Abdalmawla.

the wheel is stopped RA1 set to 0. The time period to acquire 1Hz is a 9 Secs.Having regard to, the driver
shouldn’t reduce speed to 1 Hz, this is considered optionally.

𝑓 𝑟𝑒𝑞 = 𝑓 𝑟𝑒𝑞 + 𝑓 𝑟𝑒𝑞 𝐷𝑒𝑐𝑒𝑙𝑒𝑟𝑎𝑡𝑖𝑜𝑛 (5)


where:
𝑓 𝑟𝑒𝑞 = 𝑓 𝑟𝑒𝑞 + 100𝐻𝑧 (6)

4.4 Emergency Brakes


On condition that the RB0 emergency brake is pressed the speed will decrease to zero for 2 sec.To
illustrate,decreasing the speed is done by returning the frequency value to 1Hz.

4.5 Hand Brakes


In the idle mode, the frequency is 1Hz(1000ms). If press the hand brake RB6 ,the engine will be turned off
and the brake light is turned on. After 1 sec the brake light is turned off.Consequently, the car turns off.

4.6 Speed and Distance


LCD device used to demonstrate the speed and distance.

4.6.1 Speed. Speed of vehicle calculate by following equation:

𝑆𝑝𝑒𝑒𝑑 = (((𝐹 𝑟𝑞/𝑃 𝐹 )/2) * 3600/1000)) (7)


The previous equation clarifies calculate the speed. More details ,PF pulse frequency denotes number of
cycle where is calculated by dividing by 1000 by T.where T denotes total cycle time (ms).
1000
𝑃𝐹 = (8)
𝑇𝑚 𝑠
The equation 7 calculate the speed .Frq is frequency which value 1000 for 1 ms to obtain 1Hz and divide by
2 because two frequency get 1 meter as shown is equation 8.After that multiply 3.6 to convert-meter/hour
to Kilo-meter/hour.

4.6.2 distance. The distance travelled is calculated from following equation:

𝐷𝑖𝑠𝑡𝑎𝑛𝑐𝑒𝑚 = 𝑃 𝐹/2 (9)

PF denotes number of pulses which each two pulses represent one meter.

5 RESULTS
Engine management systems was successfully implemented.

5.1 Speed
To measure the current speed,subsequent equation 10 exhibits that:

𝑆𝑝𝑒𝑒𝑑 = ((1000/𝑃 𝐹 )/2) * 3.6) (10)

8
Design and Simulation of Engine Management System Woodstock ’18, June 03–05, 2018, Woodstock, NY

Table 2. Number of pulses generated for a given distance travelled

Pulse frequency Distance of Travelled (m)


10 5
20 10
30 15
40 20
50 25
60 30
70 35
80 40
90 45
100 50

Table 3. Number of pulses generated for a given speed

Pulse frequency Speed (km/h)


10 180
20 90
30 60
40 45
50 36
60 30
70 25
80 22.5
90 20
100 1.8

Example:Assume frequency is 10HZ and the time delay is 1000 ms so PF =100

𝑆𝑝𝑒𝑒𝑑 = ((1000/100)/2) * (3600/1000) = 1.8𝑘/ℎ (11)

Example :Assume frequency is 100HZ and the time delay is 1000ms so PF = 10

𝑆𝑝𝑒𝑒𝑑 = ((1000/10)/2) * (3600/1000) = 180𝑘/ℎ (12)

5.2 Distance
Example:assume PS are 2000 by using equation 9 to measure the distance

𝐷𝑖𝑠𝑡𝑎𝑛𝑐𝑒𝑚 = 2000/2 = 1𝑘𝑚 (13)

6 CONCLUSION
This paper has been successfully presented an effective and low-cost an automotive engine management
system (EMS). It is designed using Programmable Integrated Circuit (PIC) 16F84 microcontroller, Push
Button Switch and light-emitting diode (LED) and Liquid Crystal Display (LCD). The algorithms for the
Engine Control Unit (ECU) were implemented, which are ignition, acceleration, deceleration, emergency

9
Woodstock ’18, June 03–05, 2018, Woodstock, NY Mohammed and Mohamed, Abdalmawla.

brakes, hand brakes, speed, and distance travelled. The first function presents the ignition system for starting
the car. Then acceleration function which increases the speed gradually from slowest to fastest. Deceleration
function, on the other hand, reduces the speed to the lowest or stop. Emergency brakes function, reduce the
speed to zero during 2 sec. In addition, the hand brake function which turns off the engine. The last function
calculates the speed and distance travelled of the engine.The results demonstrated that the designed system
performs well enough to meet the anticipated requirements.

REFERENCES
[1] B Ashok, S Denis Ashok, and C Ramesh Kumar. 2016. A review on control system architecture of a SI engine management
system. Annual Reviews in Contro 41 (2016), 94–118.
[2] Tullio Cuatto, Claudio Passerone, Claudio Sansoè, Francesco Gregoretti, Attila Jurecska, and Alberto Sangiovanni-
Vincentelli. 2000. A case study in embedded systems design: An engine control unit. Design Automation for Embedded
Systems 6, 1 (2000), 71–88.
[3] Bruno Martin De Alc^ antara Dias, Armando Antonio Maria Laganá, Joao Francisco Justo, Leopoldo Rideki Yoshioka,
Max Mauro Dias Santos, and Zonghua Gu. 2018. Model-based development of an engine control module for a spark
ignition engine. IEEE Access 6 (2018), 53638–53649.
[4] farnell 2020. Pushbutton Switches Datasheet. farnell.
[5] Patrick Frey. 2011. Case study: engine control application. (2011).
[6] B Jeeva, Swapnil Awate, J Rajesh, Arindrajit Chowdhury, and Sreedhara Sheshadri. 2014. Development of custom-made
engine control unit for a research engine. In 2014 2nd International Conference on Emerging Technology Trends in
Electronics, Communication and Networking. IEEE, 1–6.
[7] Tufan Koç, Durmuş Karayel, Barış Boru, Vezir Ayhan, İdris Cesur, and Adnan Parlak. 2014. Design and implementation
of the control system of an internal combustion engine test unit. Advances in Mechanical Engineering 6 (2014), 914876.
[8] John Lahti. 2014. Engine management systems. Encyclopedia of Automotive Engineering (2014), 1–17.
[9] Zongbao Li. 2015. Research on Automotive Electronic Control Technology. (2015).
[10] microship Technology Inc 1998. PIC16FXX Data Sheet. microship Technology Inc.
[11] Nicolas Navet and Françoise Simonot-Lion. 2017. Automotive embedded systems handbook. CRC press.
[12] Mark Palmer. 1997. LCD 16X2 Datasheet. micorship.
[13] Jayanta Kumar Pany and RN Das Choudhury. 2011. Embedded automobile engine locking system, using GSM technology.
International Journal of Instrumentation, Control and Automation (IJICA) Volume-1, Issue-2 (2011), 49–53.
[14] Rohm Semiconductor 2018. LED Datasheet. Rohm Semiconductor.
[15] Haiteng Sun. 2018. Design and simulation of engine control system. Ph.D. Dissertation. Politecnico di Torino.

10

View publication stats

You might also like