4th Year Project
4th Year Project
red
1.Ganishvar S- CB.EN.U4EEE21116
2.Harish R- CB.EN.U4EEE21121
3.Harshitha B- CB.EN.U4EEE21123
4.Mutyam Gayathri Priya- CB.EN.U4EEE21134
Guided by
Dr. K.R.M. Vijaya Chandrakala
Associate Professor,
Department of Electrical and Electronics, ASE-Coimbatore
Outline
1. Introduction
2. Literature Review
3. Objectives
4. Methodology
5. Block Diagram
6. Design And Mathematical Equations
7. Overview of Phase 1 Completed Work
8. Results and Discussion
9. Phase 2
10. Results and Discussion
11. Future Work and Conclusion
12. Timeline
13. References
2 / 91
Introduction
• As vehicles become more electronically controlled, mastering ECU systems is crucial for
automotive innovation. Developing efficient and integrated ECU systems can lead to better
vehicle performance, safety, and user experience.
• Additionally, exploring the concepts of EV, specifically hybrid electric vehicle control systems,
supports the idea of transitioning to greener automotive technologies in the near future,
which is essential in today s scenario.
3 / 91
Introduction Contd...
4 / 91
Introduction Contd...
Project Summary: This project explores the development and simulation of different ECUs
present in a hybrid electric vehicle and their integration into a CANBUS Network. The primary
focus is on understanding the development of a device or a controller which mimics an ECU and
the concept of ECU to ECU interaction in a CANBUS network.
• By simulating these interactions, the project aims to demonstrate how ECUs can effectively
communicate and coordinate to manage various vehicle functions, such as powertrain control
etc.
• This approach not only enhances the reliability and efficiency of hybrid vehicles but also
provides a scalable framework for future advancements in automotive technology.
• The project further investigates the challenges and solutions related to real-time data
exchange with the CANBUS network
5 / 91
Literature Review
The development of Electronic Control Units (ECUs) and their integration within Controller Area
Network (CAN) systems have been significant areas of research in the automotive industry.
Advancements have focused on enhancing cost-effectiveness, safety, and efficiency, particularly in
Hybrid Electric Vehicles (HEVs) and other modern vehicle systems.
Research has explored innovative approaches to ECU design and functionality. Efforts have
included the development of cost-effective ECUs using tools like MATLAB Simulink and
microcontrollers to address key parameters such as throttle control, battery management, and
speed measurement. Additionally, the design and calibration of custom ECUs have demonstrated
improved accuracy in managing fuel injection systems and other critical subsystems.
Studies on CAN-based communication have emphasized its role in enhancing safety and efficiency.
Solutions include automated safety systems integrating sensors and microcontrollers for real-time
monitoring, as well as energy management techniques that optimize power distribution in HEVs
using advanced control and optimization methods. Earlier research also highlighted the robustness
of CAN for distributed control, enabling reliable communication between multiple subsystems.
6 / 91
Literature Review (Cont.)
While significant progress has been made, much of the focus has been on individual ECUs or
isolated applications of CAN systems. Efforts to develop comprehensive models, such as digital
twins for in-vehicle networks, have shown promise. However, the interconnection and collaborative
functionality of multiple ECUs within a unified CANBUS network remain underexplored.
• Research Gap: Despite having plenty of research in the development of ECUs , there has
been intermittent and not frequent research in the interconnection of several Different ECUs
connected in a CANBUS network. This project aims to aid and explore the concept of
CANBUS based interconnection of ECUs by making a small scale Prototype of a CANBUS
network interconnecting multiple ECUs.The goal is to explore the communication and
coordination capabilities of such networks, providing insights into their potential for advanced
automotive applications.
7 / 91
Objectives
8 / 91
Methodology
• Simulation and Mathematical Modelling of the Above mentioned ECUs and some of their
functionalities are done using MATLAB/SIMULINK.
• Setting up Microcontrollers to make protoypes of ECU
Hybrid Motor Control ECU - STM32 Microcontroller
Advanced Driver Assistance System ECU - STM32 Microcontroller
Infotainment ECU - Raspberry Pi 4
• Interconnection of ECUs in a common CANBUS network.(Modules like MCP2551 CAN
Transceiver and MCP2515 CAN Controllers are used)
• Testing Data exchange using third party software and a CAN-USB Adapter
9 / 91
CANBUS Network
10 / 91
Hybrid Vehicle Control ECU
11 / 91
Infotainment ECU Block Diagram
12 / 91
ADAS ECU Block Diagram
13 / 91
Detailed Simulation Block Diagram
14 / 91
Design And Mathematical Equations
I(t)
• State of Charge Equation: SoC(t)=SoC(t-1)+ ∆t
Qn
V − IaRa
• Speed of Dc Motor Equation: N=K
Φ
15 / 91
Design And Mathematical Equations
16 / 91
Calcuated Values - DC-DC Converter
17 / 91
Design Specifications
18 / 91
ECUs and Their Attached Peripherals
ECU Name Peripherals Attached No. of Inputs / Outputs Input Protocol (by Number)
Motor Control ECU SOC sensor (1) 5 Inputs / 3 Outputs 1 (SOC) - Analog
Acceleration sensor (2) 2 (Acceleration) - Analog
Speed sensor (3) 3 (Speed) - Analog
Ignition button (4) 4 (Ignition Button) - Digital
ADAS ECU CAN Message(5) 5 (ADAS Input) - CAN
Relay - Switch (6)
PWM controller (7)
CAN Bus (8)
Infotainment ECU CAN Bus (1) 1 Input / 5 Outputs All Ports - CAN
SOC display (2)
Frontal Traffic alert indicator (3)
Rear Traffic alert indicator (4)
Low battery indicator (5)
Speedometer (7)
ADAS ECU Ultrasonic sensor (1) 5 Inputs / 1 Output 1 (Ultrasonic Sensor) - Analog
Ultrasonic sensor (2) 2 (Ultrasonic Sensor) - Analog
Ultrasonic sensor (3) 3 (Ultrasonic Sensor) - Analog
Ultrasonic sensor (4) 4 (Ultrasonic Sensor) - Analog
CAN Bus (5) 5 (CAN Bus Message) - CAN
19 / 91
Microcontroller Specifications and OEMs/Tier 1 Suppliers
Microcontroller Specifications OEM Tier 1 Supplier
Infineon AURIX 32-bit TriCore Audi Continental
up to 300MHz BMW Bosch
16MB Flash Mercedes-Benz
1MB RAM
5 Peripherals
12 ADC Pins
Supports CAN bus: Yes
Renesas RH850 32-bit Nissan Denso
up to 200MHz Toyota Aisin Seiki
8MB Flash
512KB RAM
6 Peripherals
10 ADC Pins
Supports CAN bus: Yes
STM32F7 32-bit ARM Cortex-M7 Ford Valeo
up to 216MHz Tesla Delphi
2MB Flash
512KB RAM
8 Peripherals
16 ADC Pins
Supports CAN bus: Yes
20 / 91
Overview of Phase 1 Completed Work
. 1.Speed Control and Motor Dynamics
• The operational phases of the DC motor, including acceleration, steady-state speed, and
eventual shutdown due to battery depletion, were effectively simulated.
• The graphical representation provided clear insights into the car’s speed behavior and power
consumption patterns.
2.Battery Management System (BMS)
• The State of Charge (SOC) graph demonstrated the battery’s performance under load, with
critical points triggering the relay cutoff mechanism to prevent over-discharge.
• SOC thresholds were effectively utilized to ensure optimal battery life and motor operation.
3.CANBUS Communication
• CANBUS was successfully implemented for transmitting SOC and speed data between ECUs.
• Proper data frame formatting, including CRC, arbitration IDs, and scaling mechanisms,
ensured secure and efficient communication.
21 / 91
Overview of Phase 1 Completed Work
.
4.MATLAB Dashboard
• A functional dashboard was developed, incorporating ignition controls, speedometers, SOC
displays, and alerts for low battery and traffic conditions.
• The dashboard effectively transitioned between running and stopped states based on system
inputs and battery status.
5.ADAS Integration
• Ultrasonic sensors were integrated to detect frontal and rear obstacles, triggering the Motor
ECU to halt operations and notifying the Infotainment ECU for driver alerts.
6.Speed Event Categorization
• Speed transitions were categorized into acceleration, deceleration, traffic-induced slowdown,
and complete halt. These events were accurately simulated, providing comprehensive insights
into motor behavior under varying conditions.
22 / 91
Overview of Phase 1 Completed Work
.
7.AUTOSAR Compliance
• AUTOSAR-compliant architecture was implemented for one ECU, standardizing
hardware-software interfacing.
• MATLAB facilitated the definition of ports and preparation of software components for
seamless integration with compliant hardware systems.
The simulation effectively demonstrated the functionality of key automotive systems, including
motor control, battery management, communication protocols, and ADAS features. The
integration of AUTOSAR compliance further established the system’s adaptability and
compatibility with industry standards. These results indicate the readiness of the subsystems for
further validation or real-world implementation.
23 / 91
Results and Discussion - Speed
• The Above graph Explains the Acceleration Period of the Model car ( DC Motor ) and the
stable speed period along with the Battery Low period followed with Total Shutdown of the
• The gradual descent in speed and cut off at 264th second is visualized in the graphs
• the initial flatline is the period where is car is off and when the Ignition button is pressed
25 / 91
Battery SOC Graph
• The above Battery SOC Graph shows a steep decrease in SOC as the motor is under
operating Conditions
• The graph flatlined at SOC 40 percent as the Battery Loses its charge and the motor Loses
Supply
• Also the ECU is set in such a way that it cuts of the Supply by giving signal to the Supply
Relay.
• The process of cutting off and fluctuation could be seen at time frame of 265th second
• the gradual decrease in peak voltage of Battery indicates the SOC level decrease
27 / 91
xyz
30 / 91
CANBUS Frame Bitwise
32 / 91
Matlab GUI - DASHBOARD
A Dashboard Containing an Ignition Button , Speed and SOC Display indicators and Battery Low
Alert is done with variable Acceleration Control for the Motor as well. Here The CAR is running.
33 / 91
Matlab GUI - DASHBOARD
This Condition Shows that SOC Cutoff has been reached and The car Stopped.
34 / 91
CAN message Logic Flowchart
35 / 91
CAN Message Logic
• One of the Characteristics of CANBUS is its Arbitration and Identifier and the concept of
Priority which makes it more secure , robust and reliable
• the above Graph shows two messages with Arbitration IDs 100 and 101 and the priority
during different operations
• Motor control ECU sends message with ID 100 And ADAS ECU sends Message with ID 101
• Lower the Arbitration ID , higher the Priority .
36 / 91
CAN Message ID 100
37 / 91
CAN Message ID 101
38 / 91
Matlab GUI - Updated DASHBOARD
• An initial Key with Ignition button are Inputs for Vehicle Starting.
• Other Parameters like acceleration and 4 Ultrasonic sensor distance are inputs to the vehicle
as well.
• SOC and speed values are displayed as numerical values as normal display as well as
speedometers.
• Indicators for Low battery and traffic Alerts are also present
40 / 91
Frontal Traffic GUI
41 / 91
Frontal Traffic
42 / 91
Frontal Traffic GUI and Working
43 / 91
Rear Traffic GUI
44 / 91
Rear Traffic
45 / 91
Rear Traffic GUI and Working
46 / 91
GUI Frontal and Rear Traffic
47 / 91
Frontal And Rear Traffic
48 / 91
Frontal and Rear Traffic GUI and Working
49 / 91
SOC Cutoff
50 / 91
SOC Cutoff
51 / 91
Speed SOC Cutoff
52 / 91
SOC Cutoff
53 / 91
Speed
54 / 91
Speed Graph - Events
55 / 91
AUTOSAR Complicancy
56 / 91
Phase 2- Hardware Implementation
1.ADAS ECU Development
• Designed an STM32-based ADAS ECU utilizing four ultrasonic sensors for obstacle detection
and distance measurement.
• Integrated a joystick or gyroscope to enable speed adjustments dynamically, allowing
user-controlled acceleration and deceleration.
• Programmed the STM32 to process sensor and input data, with outputs structured for CAN
communication.
2.Integration into CANBUS
• Connected the ADAS ECU to the Dashboard ECU using the MCP2515 CAN controller and
SPI interface.
• Configured the STM32 to transmit obstacle distances and speed control commands over the
CANBUS.
• Verified communication via the candump command, capturing structured CAN messages
57 / 91
Phase 2- Hardware Implementation
58 / 91
Hardware setup
60 / 91
Results and Discussion
• The ADAS ECU system monitors obstacles using ultrasonic sensors at four positions:
front-left (Distance1), rear-left (Distance2), rear-right (Distance3), and front-right
(Distance4).
• A traffic alert is triggered when any sensor detects an obstacle within 5 cm.
• When the vehicle speed is below 20 km/h, the ECU sends a 6-byte CAN message that
includes a traffic alert indicator (Byte 0), vehicle speed (Byte 1), and the four sensor
distances (Bytes 2 5).
• If an obstacle is detected within 5 cm, the traffic alert indicator (Byte 0) is set to 01 or 02 or
03 depending on frontal traffic or rear traffic or both respectively; otherwise, it remains 00.
• At speeds above 20 km/h, the ultrasonic sensors are deactivated, and the ECU sends a
2-byte CAN message containing only the traffic alert indicator (always 00, as sensors are off)
and the vehicle speed (Byte 1).
• All CAN messages are padded with 0 internally to a 8 byte message with compliance to the
protocol standards.
61 / 91
Results and Discussion-
62 / 91
Frontal Traffic Detection
63 / 91
Rear Traffic Detection
• Rear traffic is detected when either Distance2 (rear-left) or Distance3 (rear-right) is below 5
cm, triggering a rear traffic alert
64 / 91
Frontal and Rear Traffic Detection
65 / 91
No Traffic Detection
• The ultrasonic sensors are disabled at higher speeds above 20 km/h, and no distance data is
included in the CAN message.
67 / 91
Review-2 Results and Discussion-Traffic alert Gui system
68 / 91
Traffic alert system GUI
• The system tracks real-time vehicle speed and obstacles while storing sensor data in the
cloud, allowing for later analysis and remote access.
• A web-based dashboard provides live updates on the vehicle s speed (e.g., 34 km/h) and
continuously monitors four critical zones: Front Right, Front Left, Rear Right, and Rear Left,
ensuring situational awareness.
• IoT integration allows remote access, predictive maintenance, historical trend tracking, and
real-time alerts.
• Combines CAN Bus and IoT communication for efficient data transfer and a scalable vehicle
monitoring solution.
• This Feature Exhibits a similar feature to AUTOSAR Adaptive Platform which corresponds
to real time automobiles.
• Eventhough HTTP Protocol is better , MQTT is preferref for an automobile.
70 / 91
IOT Integration of traffic alert system
73 / 91
3 phase inverter to drive BLDC motor
• In a three-phase inverter, six switches (S1 to S6) control the conduction of each phase,which
remains ON for 120◦ .
• At any given instant, two switches conduct one from the upper group (S1, S3, S5) and one
from the lower group (S4, S6, S2).
• Switching Sequence:
0◦ 60◦ : S1 & S6 are ON.
60◦ 120◦ : S1 & S2 are ON.
120◦ 180◦ : S3 & S2 are ON.
180◦ 240◦ : S3 & S4 are ON.
240◦ 300◦ : S5 & S4 are ON.
300◦ 360◦ : S5 & S6 are ON.
• Each switch conducts for 120◦ and remains OFF for 240◦ before switching ON again.
• The inverter converts DC power into a three-phase AC waveform, controlling the switching
sequence to drive the motor efficiently.
75 / 91
Switching pattern for 120 degree conduction
76 / 91
Switching Pattern for 120-Degree Conduction
77 / 91
Switching Pattern for 120-Degree Conduction
78 / 91
Review-3 Motor Control ECU Hardware setup
79 / 91
Motor Control ECU Hardware setup
• This stm32 based motor control ECU simulates the vehicle speed and transmitting it over
can to other ECUs.
• It generates a random speed data and sends a 2-byte CAN message to ADAS ECU and
infotainment ECUs
• IT also receives the can message from the adas ecu for the speeed adjustment when obstacle
warning is detected
80 / 91
Hardware Setup:CAN BUS INTEGRATION OF ECUs
81 / 91
Hardware Setup:CAN BUS INTEGRATION OF ECUs
• The ADAS ECU, Motor Control ECU (STM32), and Infotainment ECU (Raspberry Pi 4)
exchange real-time data over the CAN bus
• ADAS ECU (STM32) Obstacle Detection Alerts:
Uses ultrasonic sensors to detect obstacles.
Sends 1-byte alert when speed > 20 km/h.
Sends 5-byte data in traffic conditions
• Motor Control ECU- Reads speed and transmits 2-byte speed data over CAN.
• The Infotainment ECU collects data from other ECUs, displays information .
Receives ADAS alerts and adjusts motor speed if needed
82 / 91
Results and discussion:Speed byte sending by motor ecu
83 / 91
Speed byte sending by motor ecu
• Every second, the code generates a random speed between 0 and 120 km/h and sends as a
2- byte message over CAN bus.
• It sends a 2-byte CAN message with the CAN ID and speed data. It also receives alerts from
the ADAS ECU by checking the first byte of messages received to know whether or not an
alert has been sent.
84 / 91
CANDUMP FROM RASPI WITH 2 CAN MESSAGES
85 / 91
CANDUMP FROM RASPI WITH 2 CAN MESSAGES
• It receives data from both the ADAS ECU and the Motor Control ECU via the CAN bus
• . In normal conditions, it receives 2-byte CAN messages from the Motor Control ECU, which
contain the current vehicle speed i.e. the speed of the motor and CAN ID
• . In traffic conditions, it receives the 5-byte alert and distance data from the ADAS ECU.
• if no traffic condition is detected the system sends only 1 byte with no traffic alert .
• It packs this data into an 8-byte CAN message and transmits it to the Raspberry Pi for
real-time monitoring.
• The Raspberry Pi, configured with candump, captures CAN messages, decoding speed and
ADAS alerts.
• Based on the can id of the system the messages are disaplayed in can dump.
86 / 91
Future Work And Conclusion
• The simulation of key ECUs, including motor control and infotainment systems, and their
integration into a CANBUS network has been successfully completed using MATLAB which
will be integrated in hardware.
• Hardware Development of ADAS ECU using STM32 and Integration of ADAS ECU Into
canbus has been completed as of now
• Replacing the Gyroscope with Motor Control ECU for speed values and development of a
structured GUI for dashboard witll be done.
• The outcomes of this project provide a strong foundation for developing more scalable and
efficient ECU systems, ultimately improving vehicle performance, safety, and sustainability
• The future works involve developing a Dashboard ECU using Raspberry Pi 4B, a Motor
Control ECU, updating and integrating a new CANBUS network between all three ECUs, and
integrating IoT functionality into the Dashboard ECU for enhanced real-time monitoring.
87 / 91
Timeline
88 / 91
References
89 / 91
References
5 K. Ismail, A. Muharam, and M. Pratama, Design of CAN Bus for Research Applications
Purpose Hybrid Electric Vehicle Using ARM Microcontroller, Energy Procedia, vol. 68, Apr.
2015.
6 N. Ilangovan, R. Jagatheesan, P. Gnana Skanda Parthipan, A. Jeyasaravanan, and G.
Prabhakar, Microcontroller based autonomous vehicle control system using can bus, in
2014 IEEE International Conference on Advanced Communications, Control and Computing
Technologies, 2014, pp. 1027 1031.
7 B. Jeeva, S. Awate, J. Rajesh, A. Chowdhury, and S. Sheshadri, 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,
2014, pp. 1 6.
8 G. Kumar and B. Narain, Portable Embedded Data Display and Control Unit using CAN
Bus, Procedia Engineering, vol. 38, pp. 791 798, Dec. 2012.
90 / 91
THANK YOU!
91 / 91