0% found this document useful (0 votes)
25 views91 pages

4th Year Project

The document outlines a project focused on developing and integrating microcontroller-based Electronic Control Units (ECUs) for hybrid vehicles using CANBUS technology. It details the project's objectives, methodology, and the completed work in Phase 1, which includes successful simulations of motor control, battery management, and CANBUS communication. The project aims to enhance vehicle performance and safety while contributing to advancements in automotive technology.

Uploaded by

hunter13102003
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views91 pages

4th Year Project

The document outlines a project focused on developing and integrating microcontroller-based Electronic Control Units (ECUs) for hybrid vehicles using CANBUS technology. It details the project's objectives, methodology, and the completed work in Phase 1, which includes successful simulations of motor control, battery management, and CANBUS communication. The project aims to enhance vehicle performance and safety while contributing to advancements in automotive technology.

Uploaded by

hunter13102003
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 91

++++++++++++++++++++++++++++++++++++++++++++++++++++++++

red

Development and Integration of Microcon-


troller based ECUs for Hybrid Vehicles using
CANBUS.
19EEE495-Project Phase 1

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...

• The integration of microcontroller-based ECUs using CANBUS can significantly enhance


communication and coordination among various vehicle systems, thereby improving overall
efficiency.
• Advanced ECUs also enable more precise control over energy management and power
distribution, crucial for optimizing hybrid vehicle performance. This advancement not only
contributes to environmental sustainability but also pushes the boundaries of modern
automotive technology.

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

Our main objectives for the project are as follows:


• Simulation of a working prototype of interconnection of three different ECUs with limited
functions in a CANBUS network using Matlab and Simulink
Hybrid Vehicle Motor Control ECU
Advanced Driver Assistance system ECU
Infotainment ECUs (Dashboard/Display alone)
• Development of Microcontrollers to mimic the 3 ECUs with specific functionalities.
• Establishment of CANBUS network and facilitating communication and data sharing between
the ECUs.

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

• DC-DC Boost Converter Design:


di
1. The voltage-current relation for the inductor L is:V=L
dt
V in
2. The voltage drops across the diode and the transistor:Vout=
1−D
V in
3.Duty cycle: 1-
V out
Vo
4.Load resistance:
Io
Io ∗ D
5.Capacitor:
F s ∗ ∆V o
Vs∗D
6.Inductor:
F s ∗ ∆Io

16 / 91
Calcuated Values - DC-DC Converter

Parameter Symbol Value Units


Input Voltage Vin 12 V
Output Voltage Vout 48 V
Output Current Iout 2 A
Switching Frequency fs 50,000 Hz (50 kHz)
Duty Cycle D 0.75 -
Inductor Value L 1200 µH
Ripple Current (Inductor) ∆IL 0.15 A
Capacitor Value C 4700 × 10−5 (4700 µF )
Output Voltage Ripple ∆Vout 0.638 mV
Table 1: Boost Converter Design Parameters

17 / 91
Design Specifications

Component Specification Value


Battery Voltage 12V
Capacity 7Ah
Total Charge (Coulombs) 25,200 C
Motor Input Voltage 48V
Maximum Speed 1000 RPM
Table 2: Battery and Motor 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

Figure 1: DC Motor Speed


24 / 91
Speed Data Interpretation

• 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

Figure 2: Battery SOC and Relay operation


26 / 91
Battery SOC and Relay Operation

• 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

Figure 3: Enter Caption


28 / 91
PWM Pulse for DC-DC Converter

Figure 4: PWM From ECU DC-DC Converter


29 / 91
PWM Pulse for DC-DC Converter

• PWM is generated from ECU itself which is observed here.


• the time frame of 250 to 268 seconds . in which the Pulses to DC-DC converter stops at
264th Second and all operations thereby stops.
• Frequency of 50khz was taken since , lesser the off time , more efficient the Output Voltage
is.
• The output Voltage and Duty Cycle of this DC-DC Converter depends on the Capacitor and
Inductor Values which were designed using the equations above.

30 / 91
CANBUS Frame Bitwise

Figure 5: CANBUS Frame - Transmitter


31 / 91
CANBUS Operation

• CANbus Integration allowed transmission of 2 important Data SOC and Speed.


• Both datas are changes into 1 byte amounting to a total of 2 byte data.
• total size of CANBUS data is 8 bytes and the remaining 6 bytes are padded with ZERO.
• A frame with CRC , ACK , SOF , EOF were attached to this data using CAN Controller and
was sent through can transmitter of MOTOR Control ECU and then received by CAN
receiver in Infotainment ECU.
• This data is then Unpacked into data bytes and each byte is Read Individually as 8 bits of
data.
• 8 bits Gives a resolution of 255 and SOC data could be transmitted directly.
• Speed data however has values exceeding 255 so its converted using this formula
(RPM/MAXRPM)*255 and then its unpacked using the reverse formula

32 / 91
Matlab GUI - DASHBOARD

Figure 6: DASHBOARD Running Condition

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

Figure 7: DASHBOARD Stopping Condition

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

Figure 8: Normal Operation


39 / 91
Updated GUI

• 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

• THRESHOLD - 25cm for Ultrasonic Sensors


• GUI shows Front Right Ultrasonic Sensor detects a distance less than 25m
• ADAS ECU sends Command to Motor ECU to stop motor operation
• ADAS ECU sends state 1 as Output to INFOTAINMENT ECU which indicates Frontal
Traffic which will activate Indicator in GUI

43 / 91
Rear Traffic GUI

44 / 91
Rear Traffic

45 / 91
Rear Traffic GUI and Working

• THRESHOLD - 25cm for Ultrasonic Sensors


• GUI shows Rear Right Ultrasonic Sensor detects a distance less than 25m
• ADAS ECU sends Command to Motor ECU to stop motor operation.
• ADAS ECU sends state 2 as Output to INFOTAINMENT ECU which indicates Rear Traffic
which in turn activates indicator in GUI

46 / 91
GUI Frontal and Rear Traffic

47 / 91
Frontal And Rear Traffic

48 / 91
Frontal and Rear Traffic GUI and Working

• THRESHOLD - 25cm for Ultrasonic Sensors


• GUI shows Front Right Ultrasonic Sensor and Front Rear ultrasonic Sensor detects a distance
less than 25m
• ADAS ECU sends Command to Motor ECU to stop motor operation
• ADAS ECU sends state 3 as Output to INFOTAINMENT ECU which indicates Traffic at
both sides , it also turns on both traffic indicators.

49 / 91
SOC Cutoff

50 / 91
SOC Cutoff

51 / 91
Speed SOC Cutoff

52 / 91
SOC Cutoff

• SOC cutoff threshold value is at 40


• When SOC is at 40 , the car starts Decelerating and reaches 0RPM until battery is further
charged
• Simulation, Graph and Dashboard with Low Battery Indicator were also displayed.

53 / 91
Speed

54 / 91
Speed Graph - Events

• 4 zones - Acceleration , Deceleration , Traffic Alert Cutoff and OFF region.


• Each region has different Characteristics which explains a lot about how SPEED varies wrt
Time

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

3.CAN BUS Communication


• Established reliable communication between the ADAS ECU and a Raspberry Pi-based
Dashboard ECU.
• The Raspberry Pi displayed received speed and distance data in real time, validating the
system s functionality.

58 / 91
Hardware setup

Figure 9: ADAS ECU


59 / 91
Hardware setup

Figure 10: Interfacing STM32-ADAS ECU with Raspberry Pi-Dashboard ECU

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-

• 6-byte CAN message:Below 20 km/h


Example:01 01 02 06 0A 0E (hexadecimal)
Byte 0 (01): Frontal Traffic alert active.
Byte 1 (01): Speed = 1.00 km/h.
Byte 2 (02): Distance1 = 2.68 cm.(Less than 5cm)
Byte 3 (06): Distance2 = 6.76 cm.
Byte 4 (0A): Distance3 = 10.44 cm.
Byte 5 (0E): Distance4 = 14.56 cm.
• 2-byte CAN message:Above 20 km/h
Example: can0 100 [2] 00 28 (hexadecimal)
CAN ID (100): Identifies the message type
Byte 0 (00): Traffic alert indicator(off)
Byte 1 (28):Speed = 40.00 km/h.

62 / 91
Frontal Traffic Detection

Figure 11: Frontal Traffic alert Message

• When frontal traffic is detected, either Distance1 (front-left) or Distance4 (front-right) is


below 5 cm, triggering a frontal traffic alert

63 / 91
Rear Traffic Detection

Figure 12: Rear Traffic Alert Message

• 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

Figure 13: Frontal and Rear Traffic alert Message

65 / 91
No Traffic Detection

Figure 14: No Traffic alert Message

• If all sensor distances are above 5 cm, no traffic alert is generated.


66 / 91
CAN Message Behavior at High Speeds

Figure 15: 2-byte CAN message (high speed )

• 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

• The Traffic Alert System GUI,implemented on Raspberry Pi 4, providing real-time monitoring


of speed, obstacle detection, and traffic alerts to enhance driver awareness.
• The speedometer dynamically displays the vehicle s current speed (e.g., 18 km/h) for
continuous speed monitoring.
• Distance sensors track obstacles in four critical zones: Front Right, Front Left, Rear Right,
and Rear Left.
• Rear Left zone detects an obstacle at just 3 cm, triggering an immediate Rear Alert.
• Integrated with CAN Bus communication for efficient data transfer between the ECU,
sensors, and Raspberry Pi 4.

68 / 91
Traffic alert system GUI

Figure 16: GUI Interface


69 / 91
IOT Integration of traffic alert system

• 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

Figure 17: IOT Integration of traffic alert system


71 / 91
Comparing Raspberry Pi 4 & STM32-Based ECU to Real-Life
Automotive ECUs
• Both Raspberry Pi 4 and STM32-based ECUs are used in automotive applications, but
neither is an automotive-grade ECU like those found in real vehicles from OEMs such as
Bosch, Continental, or Denso. Let’s break down their real-world performance, applications,
limitations, and scalability compared to actual automotiveăECUs.
• Raspberry Pi 4 as an ECU :More powerful than many standard automotive MCUs, but
lacks real-time processing . Can handle complex AI models, dashboards, andăinfotainment.
• Limitations:Limited temperature range Draws 2.5W to 5W, much higher than traditional
automotive MCUs ( 200mWătoă500mW).
• STM32-Based ECU : Runs RTOS, which is better suited for real-time tasks than Linux.
Some STM32 chips support AUTOSAR
• Limitations:Limited to CAN, SPI, and UART, making it slower than modern automotive
Ethernet used in high-end ADAS ECUs. Most STM32 MCUs have 1MB Flash, 1MB RAM,
which is tiny compared to real ADAS ECUs with 16GB+ RAM andăSSDăstorage.
72 / 91
Hybrid Vehicle Control ECU

Figure 18: Hybrid Vehicle Control ECU

73 / 91
3 phase inverter to drive BLDC motor

Figure 19: 3 phase inverter to drive BLDC motor


74 / 91
Switching Pattern for 120-Degree Conduction

• 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

Figure 20: S1 AND S6

76 / 91
Switching Pattern for 120-Degree Conduction

Figure 21: S1 AND S2 Figure 22: S1 AND S3

77 / 91
Switching Pattern for 120-Degree Conduction

Figure 23: S1 AND S4 Figure 24: S1 AND S5

78 / 91
Review-3 Motor Control ECU Hardware setup

Figure 25: motor control ecu

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

Figure 26: canbus 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

Figure 27: speed tera term

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

1 A. Swaminathan, A. Nirmal, L. S. Kishore Krishna, R. Kruthik Soundappan, R. R. Lekshmi,


and K. R. M. Vijaya Chandrakala, Development of Low-Cost Electronic Control Unit for
Hybrid Electric Vehicle, in 2023 2nd International Conference on Paradigm Shifts in
Communications Embedded Systems, Machine Learning and Signal Processing (PCEMS),
2023, pp. 1 6.
2 L. Popa, A. Berdich, and B. Groza, CarTwin-Development of a Digital Twin for a
Real-World In-Vehicle CAN Network, Applied Sciences, vol. 13, Dec. 2022.
3 A. Ansfer and M. Beno, Improving the Efficiency of HEV Electronic Applications Using
CAN-BUS Communication, Intelligent Automation & Soft Computing, vol. 33, pp. 1455
1472, Jan. 2022.
4 R. Ranjan, K. S. Chari, R. Arya, and B. H. Krishna, Design of controller area network
based automated safety system for vehicle, in 2017 International Conference on Intelligent
Computing, Instrumentation and Control Technologies (ICICICT), 2017, pp. 1215 1221.

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

You might also like