100% found this document useful (1 vote)
234 views346 pages

6 ECU Development UNAL 20240129

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
100% found this document useful (1 vote)
234 views346 pages

6 ECU Development UNAL 20240129

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/ 346

Automotive ECU Development

SCIENCE
PASSION
TECHNOLOGY

Automotive ECU Development


Sensor-, Actuator- and Electric Motor
Technologies
Lecturer:
Dr. Alexander Kreis – [email protected]
Alexander Fragner – [email protected]

January & February, 2024


Automotive ECU Development

2
General Position, distance

Rotational and
translational velocity
Resistive

• Introduction Acceleration Capacitive

• General Information
Pressure
Inductive

Force and Torque

• Project Examples Flow


Magnetostatic

• Automotive Sensor & Actuator Technologies Gas & concentration Sound wave
propagation (e.g.

• Technologies and Applications


Temperature ultrasonic)
Piezoelectric
Object detection
• Important Steps in the Measuring Process Electromagnetic wave propagation

• Calibration
• Sensors types
• Actuator Technologies
• Electric Motor Technologies
• Automotive IT
• Hands-On Examples
• Icebreaker Session
Automotive ECU Development

3
General Information
• Training Schedule -> 4 days (Mon. – Thu.)
• Exam day -> Monday, February 5th

• a.m. session -> 09:00 – 12:00


• p.m. session -> 13:00 – 16:00

• Breaks -> 10:15 – 10:45


-> 12:00 – 13:00
-> 14:15 – 14:45

• Active Participation & Discussion Rounds


• Theory, Videos, Side Stories, Hands-On
Automotive ECU Development

4
Project Examples – Research Vehicle for Autonomous
Inner-city Goods Transport
Automotive ECU Development

5
Project Examples
Sensor application
Automotive ECU Development

6
Project Examples
Actuator application
Automotive ECU Development

7
Project Examples – Automated Charging for BEVs
Automotive ECU Development

8
Project Examples – Position Sensor Test Bench
• Max. Speed: ± 24.000 rpm
• Temperature range: -40°C to +160°C
• 5 MS/sec Data Acquisition Unit
• Evaluation and Vehicle ECU
• High Precise Reference Sensor
(8192 increments per rotation)
• Misalignment of DUT in 4 axis
• Supply Voltage 0V to 40V ±15mV
• Angular resolution < 0,1° at 24.000rpm
• Acceleration > 10.000 rpm/sec
Automotive ECU Development

9
Project Examples – Position Sensor Test Bench
• Data Acquisition Units for
Reference and DUT
• Mechanical decoupled data acquisition
to prevent shock and vibrations
• Vehicle target ECU and
evaluation ECU
• Synchronized reference data
acquisition card and ECUs
• Electromagnetic shields
Automotive ECU Development

10
Project Examples – Position Sensor Test Bench
Automotive ECU Development

11
Project Examples – Position Sensor Test Bench
Automotive ECU Development

12
Project Examples – Position Sensor Test Bench
Automotive ECU Development

13
Project Examples – Position Sensor Test Bench
Automotive ECU Development

14
Contents
• Automotive Sensor & Actuator Technologies
• Technologies and Applications
• Important Steps in the Measuring Process
• Calibration
• Sensors Types
• Actuator Types
• Electric Motor Technologies • Hands-On Examples
• ECU Development
• Automotive IT
• Embedded Systems
• Software & Hardware Components
• Automotive Controller Networks
• Functional Development of
Mechatronic Systems
Automotive ECU Development

15
Goals of this Course
• Basic knowledge and a broad insight in different sensor and actuator
technologies
• Understanding of sensor and actuator effects for translation of physical
conditions to electrical signals
• Exemplary automotive sensor and actuator applications
• Knowledge exchange
• Be able to optimize products

• Discussions of used internal products


Automotive ECU Development

16
Technical Systems
Sensors Actuators
 Recognize environmental  Receive and fulfil
conditions and own orders from the
system status. controller.

 Conversion to processible  Conversion of


information. signal to mechanic
or other physical
 Provision to controller. quantity.

Pic-Source: https://www.theverge.com/2017/11/21/16684160/toyota-thr3-humanoid-robot-mimic-movement
Automotive ECU Development

17
Mechatronic Systems Overview
Flow of information
Communication Man-machine
system interface
Information Information
processing Human
processing
Control Measurement
inputs signals

Electrics/ Information technology


Actuators Sensors
Mechanics

Power
supply Environment
Regulating
variable Measurand

Basic system
Forces, Forces,
displacement, displacement,
etc. Flow of energy etc.

Information flow Energy flow Flow of


substances
Automotive ECU Development

18
What is a Sensor?
• Our environment is described by physical quantities and relations.
• To provide the information, we need to understand how to translate the information.

Physical/Chemical
value Φ (non electric)

??? ???
Pic-source: https://www.rüdiger-weiss.de, http://www.besthealthmag.ca, https://stephenmansfield.tv/habits-and-the-brain/

Disturbance Value Yi
(temperature, voltage fluctuation)

• Conversion of an unknown physical or chemical measurand into a suitable electrical


signal for further processing.
Automotive ECU Development

19
Example: Microphone

Acoustic wave moves membrane and coil → induction → electric signal


Automotive ECU Development

20
Automotive Sensor Technologies and Applications
Application Technologies
Automotive ECU Development

21
Sensor Market Development
 Doubled in 10 years!
 Innovative sensor concepts
and new sensor application
fields (e.g. autonomous
driving or comfort functions)
will raise expectations.

North America automotive sensor


revenue by application, 2012 -
2022 (USD Million)

USD 18.68 Billion in 2014


Automotive ECU Development

22
Important steps in the measuring process

Measurement Conversion Evaluation Processing

• Correct and defined detection of the measurand.


Automotive ECU Development

23
Application Examples of Different Sensor Effects
Position, distance

Rotational and Resistive


translational velocity

Acceleration Capacitive

Pressure
Inductive

Force and Torque


Magnetostatic
Flow

Gas & concentration Sound wave


propagation (e.g.
Temperature ultrasonic)
Piezoelectric
Object detection

Electromagnetic wave propagation


Automotive ECU Development

24
Measuring Results
A measuring result always consists of:
 Measuring unit
 Numeric value
 Accuracy of the measurement
 For example:
U = 13,58 V ± 1%

There is no measurement, which delivers


a flawless, completely accurate result!
Automotive ECU Development

25
Accuracy
1. Accuracy of the measurement system
 → Technical characteristics (e.g. tolerance)
 → Calibration
2. Accuracy of the measurement process
 → Repeatability
 → Reproducibility

Costs /
Accuracy
effort
Automotive ECU Development

26
Accuracy: Requirements for Automotive Applications
Automotive ECU Development

27
Repeatability
• Fundamental requirement for experiments, measurements and analysis.
• Successive measurements should get the same result.
• Sufficient documentation of the setup and execution of the experiment.
• Scientific statements have to be based on several measurements.

Reproducibility
• Measures our ability to replicate the findings of others.
• Differences by
• Equipment
• Time and place
• People
• Environment
Automotive ECU Development

28
Conversion
• Conversion of received sensor signal to further processible signal.
-> E.g. conversion from an analog to a digital signal.

Measurement Conversion Evaluation Processing


Automotive ECU Development

29
Signal Types

Stationary signals
 e.g. DC

Non-stationary signals
 e.g. AC

 Different measurement devices necessary


Automotive ECU Development

30
Signal Types
Deterministic
 Can be defined exactly by a mathematical formula.

Non-Deterministic
 Random Signals (noise)
 Can not be defined by a mathematical equation.
Automotive ECU Development

31
Signal Types
Periodic signals
 Repeats itself every time period.

Quasi-periodic
 Periodic over a short time.
 Changes in amplitude or frequency in the long term,
e.g. temperature change.
Automotive ECU Development

32
Signal Types
Repetitive signals
 A certain signal period repeats in uneven
intervals

Transient signals
 Switching operations
Automotive ECU Development

33
Signal Types
Continuous amplitude and time Discrete amplitude and continuous
time
Automotive ECU Development

34
Signal Types
Continuous amplitude Discrete amplitude and time
and discrete time
Automotive ECU Development

35
A/D Converter ADC
• An ADC converts a continuous time and continuous amplitude
analog signal in a discrete time and discrete amplitude digital signal.
• The ADC carries out two processes, sampling and quantization.
Automotive ECU Development

36
Sampling
 Continuous time signal in
discrete and uniform time
intervals.
 Nyquist-Shannon sampling
theorem
 Sampling rate must be
higher than twice the
highest frequency of the
signal.

fsampling > 2 x fmax


Automotive ECU Development

37
Quantization
Replacing the analog values with an approximation from a finite set of discrete
values.
Common ADC bit depth: 8-bit, 16-bit, 24-bit.
2N values. For example: 28 = 256 values.
Automotive ECU Development

38
Signal to Noise Ratio
• Every signal is contaminated by some amount of noise
• Too much noise will make the signal undetectable
• SNR is the ratio between signal power to noise power
• Usually represented in dB
𝑃𝑃𝑃𝑃
𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆 = 10log
𝑃𝑃𝑃𝑃
Automotive ECU Development

39
Quantization Error
Offset error
 Output is changing at the wrong input.
 Offset is equal for the whole range.
Automotive ECU Development

40
Quantization Error
Gain error
 Change in the slope of the staircase
 Larger error for higher output
Automotive ECU Development

41
Quantization Error
Differential nonlinearity
 DNL describes the deviation from the ideal step size
Automotive ECU Development

42
Quantization Error
Integral nonlinearity
 INL describes the deviation of the centerpoints from the ideal
Automotive ECU Development

43
Sample and Hold Circuit
Automotive ECU Development

44
ADC Types
• Flash ADCs
• Pipelined converters
• Successive approximation register (SAR) converters
• Integrating or dual-slope converters
• Sigma-delta converters (ΣΔ)
Automotive ECU Development

45
Comparator
The Comparator Function – Non-inverting

VIN and VREF applied to +IN and -IN inputs


VIN = input signal
VREF = reference signal
May have both DC and AC components

VOUT can be one of two levels


VH = HIGH (1)
VL = LOW (0)

INPUT OUTPUT
VIN > VREF HIGH (1)
VIN < VREF LOW (0)
Automotive ECU Development

46
Flash ADC
• Compares the input signal Vin to a
unique reference voltage Vref by a
comparator.
• The output of the comparator is
connected to a 8-line to 3-line priority
encoder.
• The encoders output corresponds to the
currently active input.
Automotive ECU Development

47
Subranging / Pipelined ADC
• The input is first converted with a flash ADC.
• The digital value is converted back in analog format by a DAC and subtracted
from the input.
• The difference is converted to digital with another ADC.
• A pipelined ADC repeats this process to get a higher resolution but also a
latency delay.
Automotive ECU Development

48
Integrating / Dual-Slope ADC
• An unknown input voltage is applied to the input of the integrator for a
fixed time (tu)
• A known reference voltage of opposite polarity is applied to the
integrator until the output returns to zero (td)
• The time period (td) is proportional to the input voltage (Vin)

Pic-source: https://slideplayer.com/slide/4584344/15/images/31/Dual-Slope+ADC+%E2%80%93+How+It+Works.jpg,
Automotive ECU Development

49
Successive Approximation Register (SAR)
• Input signal Uin will be digitalized in n steps
• Accuracy increases by 1 Bit with every step
• Each step Uin is compared with Uref
• Depending on, if Uin is higher or lower, Uref changes up or down
Automotive ECU Development

50
Digital to Analog Converter DAC
Device to transform digital data into an analog signal
Applications
 Audio
 Video
 Mechanical actuators
 Analog controller
 Analog components

Pic-source: https://www.intersil.com/content/dam/Intersil/featured/grid/digital-to-analog-converter-dac.png
Automotive ECU Development

51
Weighted Resistor DAC
• Each digital level is converted into an equivalent analog voltage.
• Consists of a weighted resistor network.
• OPamp is used as an summing amplifier, which gives a weighted sum of
the input voltage VR.

 Output voltage is a
amplitude discrete signal,
which has to be filtered by
a lowpass filter.
Automotive ECU Development

52
R-2R DAC
• Basically same concept as weighted resistor method.
• Requires only 2 resistor values.
Automotive ECU Development

53
Evaluation
• Feasibility check of received measurement signal.
• Detection and minimization of possible errors.

Measurement Conversion Evaluation Processing


Automotive ECU Development

54
Feasibility Check: Physical Quantities and Units
Dimensional formula
𝐸𝐸𝑘𝑘 = 𝑚𝑚 ∗ 𝑣𝑣 2 ⟹ 1 J = 1 kg ∗ 1 𝑚𝑚⁄𝑠𝑠 2
Unit conversion
1 ℎ ∗ 601𝑚𝑚𝑚𝑚𝑚𝑚
ℎ ∗ 60 𝑠𝑠
1 𝑚𝑚𝑚𝑚𝑚𝑚
= 3600 𝑠𝑠 = 3.6 ∗ 102 𝑠𝑠

Dimensional equation
 Same units on both sides
𝐸𝐸𝑘𝑘 = 1�2 𝑚𝑚𝑣𝑣 2 ⇒ 𝐸𝐸𝑘𝑘 = 𝑚𝑚 ∗ 𝑣𝑣 2 = 𝑚𝑚 ∗ 𝑠𝑠 2 ∗ 𝑡𝑡 −2
Automotive ECU Development

55
Measurement Error
Systematic error
 Usually caused by sensor.
 Incorrectly calibrated instrument, friction, worn out instrument.
 Can be corrected by careful examination.

Random error
 Caused by unknown and unpredictable changes in the experiment.
 Different results for the same repeated measurement.
Automotive ECU Development

56
Origin of measurement errors

x y
Measurement
Measuring object Output element
instrument
process system further processing
(equipment error)

Backlash error Backlash error


Measurement External
error disturbances Error in measurement
(noise) recording
Personal errors
Automotive ECU Development

57
Arithmetic average
i xi [mV] The arithmetic average 𝑥𝑥̅ 𝑵𝑵
𝟏𝟏
1 103 from the measurements 𝑥𝑥𝑖𝑖 � = � 𝒙𝒙𝒊𝒊
𝒙𝒙
2 106
can be determined by 𝑵𝑵
3 102
𝒊𝒊=𝟏𝟏
4 104 𝑁𝑁 10
1 1 1
5 105 𝑥𝑥̅ = � 𝑥𝑥𝑖𝑖 = � 𝑥𝑥𝑖𝑖 = ∗ 1040 𝑚𝑚𝑚𝑚 = 104 𝑚𝑚𝑚𝑚
𝑁𝑁 10 10
6 104 𝑖𝑖=1 𝑖𝑖=1

7 104
𝑁𝑁 10
8 103 1 2
1 2 12
𝑠𝑠 = � 𝑥𝑥𝑖𝑖 − 𝑥𝑥̅ = � 𝑥𝑥𝑖𝑖 − 𝑥𝑥̅ = 9
= 1,155 𝑚𝑚𝑚𝑚
9 104 𝑁𝑁 − 1 9
𝑖𝑖=1 𝑖𝑖=1
10 105
∑ 1040 mV
𝑼𝑼 = 𝟏𝟏𝟏𝟏𝟏𝟏 ± 𝟏𝟏, 𝟏𝟏𝟏𝟏𝟏𝟏 𝒎𝒎𝒎𝒎
Automotive ECU Development

58
Normal distribution
• Distribution that occurs naturally in many situations.
• Reference for many probability problems
• 𝑁𝑁 → ∞; 𝑥𝑥̅ → 𝜇𝜇; 𝑠𝑠 → 𝜎𝜎
(𝑥𝑥−𝜇𝜇)2
1 −
𝑓𝑓 𝑥𝑥 = 𝑒𝑒 2𝜎𝜎2
𝜎𝜎 2𝜋𝜋
Automotive ECU Development

59
Regression Analysis
Relationship between two variables
 E.g. voltage and current at a resistor

Commonly used type: Linear


regression

𝒚𝒚 = 𝒎𝒎 ∗ 𝒙𝒙 + 𝒃𝒃
Automotive ECU Development

60
Calibration
• A test during which known values of the measurand are applied to the sensor
and the corresponding output signals are recorded.

• Calibration curve: The graphical representation of the relationship between


measured variable and output signal determined in the calibration.

straight line

range [%]

FSO…full scale output


Automotive ECU Development

61
Matching/Calibration of a Sensor
Matching is done in three
steps:
1. Recording of actual value
(characterization)
2. Correction parameters’
storage
3. Operating phase
Depending whether sensor is
“intelligent” or not.
Automotive ECU Development

62
Recording of Actual Value
• External calibration computer host varies measurand and influencing variables.
• Sensor provides raw measurement data at its output.
• A high precise reference sensor provides “true” data.
• Calibration host compares sensor’s (DUT) and reference output.
Automotive ECU Development

63
Correction parameters’ storage
a. Sensor has no storage/compensation unit.
b. Sensor has a storage/compensation unit
(“smart sensor”).

Ad a.:
 Calibration host generates look-up table (LUT).
 This LUT is stored in the control unit (ECU, MCU, …).
 Control unit reads in raw sensor data and compares it to LUT

Ad b.:
 Calibration host calculates model parameters (e.g. linear characteristic) and stores the model on the smart
sensor's storage.
Automotive ECU Development

64
Operating phase
The (smart) sensor is now disconnected from the host computer and is in a
position itself to calculate the measured variable xe with relatively low error thanks
to the stored model data.
Automotive ECU Development

65
Correction Model of a (Smart)sensor
Automotive ECU Development

66
Processing
• Provision of signal to further processing, e.g. in any electronic control unit
(ECU).
• Providing the measured result in a certain signal type (analog / digital).
• ECU reads in this signal.
• In automotive applications, normally signal type is defined by supplier and
OEM.

Measurement Conversion Evaluation Processing


Automotive ECU Development

67
Sensor Signal Processing  ECU

Hall sensor

Waveform of an ABS sensor

Temperature sensor Manifold-Absolute-


signal at cold start Pressure (MAP)-sensor
Automotive ECU Development

68
Processing Example
Automotive ECU Development

69
Processing Example
Automotive ECU Development

70
Processing Example
Automotive ECU Development

71
Processing Example
Automotive ECU Development

72
Processing Example
Automotive ECU Development

73
Processing Example

Logic level “1”

Logic level “0”

Physical level “1”

Physical level “0”


Automotive ECU Development

74
Processing Example
Automotive ECU Development

75
Sensor Classification

• Assignment and application

• Characteristic curve type

• Type of output signal


Automotive ECU Development

76
Assignment and Application
Sensor effect Application
Functional sensors, used for open and closed loop control assignments
(e.g. engine management, on board diagnosis), e.g.
Pressure sensor
 Electromechanical pressure sensor
 Hot-wire air mass meter
 Piezoelectric knock sensor
 Inductive rotational speed sensor

Safety (passenger protection) and security (e.g. theft deterrence Seatbelt tension
sensor
feature), e.g.
 Micromechanical capacitive acceleration sensor
 Electromechanics door contact switch

Information and comfort functions for driver/passenger Air-Fuel Mixture


 Digital capacitive humidity sensor Sensor (Lambda
Sensor, O2 sensor)
 Resistive temperature sensor
Automotive ECU Development

77
Characteristic Curve Type
Continuous linear curves (a)
• Control assignments covering a wide measuring range. Linear curves are
also distinguished by “uncomplicated testing and calibration“.

Continuous nonlinear curves (b)


• Closed-loop control of a measured variable across a relatively restricted
measuring range (e.g. exhaust-gas control to λ = 1), vehicle spring-
deflection level).

Discontinuous multi-step signal (c)


• Discretized output signal for further processing

Two-step curves (d)


• Limit-value monitoring S- Output signal; X- Measured variable
a- Continuous linear;
• Featuring hysteresis, if necessary b- Continuous nonlinear
• If remedial measures are more difficult, then multi-step curves (c) can be c- Discontinuous multi-step;
used for an earlier warning. d- Discontinuous two-step (with hysteresis)
Automotive ECU Development

78
Classification of the Determined Output Signals
Automotive ECU Development

79
Sensor Types
Active
 Generate energy out of the measurement process, which is necessary for passing
by the information.
 E.g. Inductive sensor, Thermocouple …
 Signal: e.g. voltage, current, charge, frequency
Passive
 Energy must flow through the sensor to
gather information.
 E.g. Hall sensor, Potentiometer,
Accelerometer
 Signal: e.g. resistance, capacity,
inductance
Automotive ECU Development

80
Sensor Integration Levels

SE Sensors; SA Signal conditioning; A/D Analog-Digital converter;


ECU Control unit; MC Microcontroller; BS Bus interface
Automotive ECU Development

81
Smart Sensor
• Intelligent sensors, (a.k.a. integrated sensors) or sensors with specific local
electronics.
• Decentral sensor information processing, relief of any central vehicle control unit
(VCU).
• Complex information from multisensory structures can be merged here by local
further processing.
• Sensor is capable of measurement, conversion and evaluation of signal
-> simplification of communication process with integrated system.
Automotive ECU Development

82
Sensor Types Examples
Binary sensors

Resistive sensors
Some other
thrilling sensors

Sensors
Piezo-electric Capacitive
sensors sensors

Wave propagation Inductive Magnetostatic


sensors sensors sensors
Automotive ECU Development

83
Binary Sensors
Simplest information: „Is something there or not?“

Only two states.


 Digital output:
 „0/off/low/closed/false” or
 „1/on/high/open/true “ Door contact switch closes
an electric circuit.

Exemplary technical principles: switches,


contacts, pins …
I (A) contact contact Output signal example:
open closed
Application examples: low level sensor, door contact switch,
distance limit switches…

time
Automotive ECU Development

84
Resistive Sensor
Change of ohmic resistance (Ω) by changing characters of an ohmic
conductor, e.g.

• length (e.g. potentiometer)


• cross section (e.g. strain gauge sensor)
• specific resistance (temperature sensor)

𝑈𝑈 R… resistance in [Ω] Resistance mainly depending on:


𝑅𝑅 = [Ω]
𝐼𝐼 U… voltage [V]  length
I … current [A]  cross section
ρ∗𝑙𝑙 ρ… specific resistance in [Ω*mm²/m]  material
𝑅𝑅 = [Ω]
𝐴𝐴 l…conductor length in [m]  temperature
A…conductor cross section in [mm²]
Automotive ECU Development

85
Capacitive Sensor
Based on changing the electrical capacity of a single capacitor or capacitor system, e.g.

• dielectric (e.g. humidity of fluid level sensor)


• distance between plates (e.g. force or acceleration sensor)

Q…Electric charge [C]


C…Capacity [F]
Capacitor equation: U…Voltage [V]
𝐴𝐴𝐴𝐴
𝜖𝜖0 …permittivity [𝑉𝑉𝑉𝑉]
𝐴𝐴 𝑄𝑄 𝜖𝜖𝑟𝑟 …relative permittivity [−]
𝐶𝐶 = 𝜖𝜖0 ∗ 𝜖𝜖𝑟𝑟 ∗ = d…distance between plates [m]
𝑑𝑑 𝑈𝑈 A…area [m2]
Automotive ECU Development

86
Magnetostatic Sensor
• Measure a DC magnetic field.
• Suitable for miniaturization.
• Can be manufactured at reasonable costs using
microsystem technology.
• Used types:
 galvanomagnetic effects
 Hall and Gaussian effects
 anisotropic magneto resistive effects
 AMR (anisotropic magneto resistive effect)
 GMR (giant magneto resistive effect)
Automotive ECU Development

87
Inductive Sensor
• Inductive sensors mainly consist of a coil with a ferrite or
magnetic core.

• They operate on two different principles:


The use of eddy currents, or the law of induction.

U ind = l ⋅ v ⋅ B
Uind … induced voltage [V]
l … length of wire [m]
Inductive effect v … target velocity [m/s]
B … magnetic flux density [T]


U ind = − N ⋅ (general law of induction)
dt
N … number of conductor loops [-]
Φ … magnetic flux [Wb]
t … time [s]
Automotive ECU Development

88
Piezo-Electric Sensor
• After the pressure is applied on a crystal surface (i.e. Quartz), differently charged
ions are moving through the crystal grid.
• As a result, electric charges are generated on the surface of the sides of the crystal
where the pressure is applied.
• During discharge, these charges can be converted into a proportional voltage via an
integrated amplifier or an amplifier with an extreme high input resistance
(electrometer amplifier).
• The piezo effect is reversible. Tensile and compressive
forces lead to different polarity of the charge.
• The size of the charge is not temperature dependent
and has no hysteresis depending on the force.
Automotive ECU Development

89
Wave Propagation Sensor

Ultrasonic

Night viev

• Measure time between sending and receiving a signal.


• Long Range- & Midrange-Radar
• Laser scanner
• 3D Video-Camera, Top view-Cameras,
• Ultrasonic sensors
• Infrared (Night view) …
Automotive ECU Development

90
Measurand Types
 Position
 RPM and velocity
 Acceleration
 Pressure
 Force and torque
 Flow
 Gas and concentration
 Temperature
 Object detection, distance
Automotive ECU Development

91
Position Sensors
• Position sensors record the variety of one or multi-dimensional positions
(translatoric and rotatoric variables) in a wide variety of areas.

• Including gaps, distances, displacements, fill levels or minor expansions


– anything that can be measured in meters and angles.
Automotive ECU Development

92
Travel/Angular Positions as
Direct/Indirect Measured Variables
Automotive ECU Development

93
Low Level Sensor
𝑆𝑆
Uses effect of electric conductance (EC or σ [ ]).
𝑚𝑚
1 𝐴𝐴
𝑆𝑆 = =
Ω 𝑉𝑉
𝑈𝑈
Output: 𝐼𝐼 =
𝑅𝑅
EC of exemplary media:
𝑆𝑆
 Silver: σ = 60 106
𝑚𝑚
𝑆𝑆
 Tap water: σ = 50 10−3
𝑚𝑚
Automotive ECU Development

94
Low Level – Reed Contact
 Closing of el. circuit via reaction
of magnetic straps to a magnetic
field.

Pic-source: http://www.strippenstrolch.de/1-2-20-der-reed-kontakt.html, Wikipedia


Automotive ECU Development

95
Potentiometer
 Wiper potentiometer uses the
correspondence between the length
of a wire or film resistor and its
resistance value.

1…Wiper
2…Resistance track
3…Contact conductor track
IA…Wiper current
U0…Supply voltage
UA…Measurement voltage
R…Resistance
ᵠmax…Maximum angle of rotation
ᵠ…Measured angle

[9]
Automotive ECU Development

96
Application I

Tank Shell

(Fuel Delivery Module)

1 Electrical connections
2 Wiper spring
3 Contact rivet
4 Resistor board
5 Bearing pin
6 Twin contact
7 Float lever
8 Float
9 Fuel-tank floor
Automotive ECU Development

97
Application II
Air mass potentiometer Throttle valve potentiometer
1 Throttle valve
2 DC-motor
3 Wiper
4 Resistance track 1
5 Resistance track 2

1 Throttle valve
2 Throttle-valve sensor
UA Measurement voltages
UV Operating voltage
R1, R2 Resistance tracks 1 & 2
R3, R4 Calibration resistors
R5, R6 Protective resistors
Automotive ECU Development

98
Applications III
Acceleration pedal potentiometer
Resistance tracks
Wiper pairs

Pic-source: https://www.citycarparts.co.uk/ekmps/shops/citycarparts/images/renault-clio-ii-accelerator-throttle-pedal-potentiometer-8200089857-32399-p.png, https://t4-wiki.de/wiki/Geber_G79_(Gaspedalstellung)


Automotive ECU Development

99
Application IV Fuel Level Sensor
Magnet at art moves flexible contacts over
resistance track.
Sensor element not in contact with
medium (→ no abrasion due to aggressive
substances in fuel, e.g. RME).
Automotive ECU Development

100
Pros & Cons – Potentiometer

 Low costs  Mechanical wear from abrasion.


 Simple design  Measuring errors due to abraded particles.
 Very broad measuring effect  Problematic when operated in fluids.
(measuring range ≈ supply voltage)  Variable contact resistance between wiper and
 No electronic circuitry required measurement track.
 High level of interference immunity  Strong acceleration or vibration can result in wiper
 Broad temperature range (up to 250 °C) lift-off.
 High precision (better than 1 % of measuring range)  Limited possibilities for miniaturization.
 Wide measuring range (almost 360° is possible)
 No difficulty with redundant design
 Flexible characteristic curve (variable conductor
track width)
 Flexible assembly
(on curved as well as on flat surfaces)
 Numerous manufacturers
 Rapid prototyping
Automotive ECU Development

101
Ultrasound
• Sound waves with frequencies higher than the upper audible limit of human
hearing (about 20 kHz).
• Ultrasonic Module sends out a cycle burst of ultrasound (e.g. at 40 kHz via
Transmitter).
• Sound wave in medium with sonic velocity.
• Ultrasonic Module records echo (via Receiver) and measures time
between sending and receiving signal.
• The distance can be calculated with:

L = 1/2 × T × C

L…distance
T…time between the emission
and reception
C…the sonic speed
Automotive ECU Development

102
Dependency of Sound Velocity on Medium
Automotive ECU Development

103
Ultrasonic Fluid Level Sensor
• Sensor calculates Speed Of Sound (SOS)
of fluid by measuring time against a fixed
distance (SOS = Distance/Time).

• Measurement of fluid level by transmitting


signal to and receiving from fluid level.
Automotive ECU Development

104
Magnetostatic Sensor
• Measure a DC magnetic field.
• Suitable for miniaturization.
• Can be manufactured at reasonable costs using
microsystem technology.
• Used types:
 galvanomagnetic effects
 Hall and Gaussian effects
 anisotropic magneto resistive effects
 AMR (anisotropic magneto resistive effect)
 GMR (giant magneto resistive effect)
Automotive ECU Development

105
Hall Effect Sensors
• Based on Hall-effect theory (Edwin Hall- 1879).
• Electric current carrying conductor is kept in a
magnetic field.
• The magnetic field exerts a transverse force on
the moving charge carriers. Single Hall IC chip

• Tends to push them to one side of the conductor.


• Build-up of charge at the sides of the conductors
will balance magnetic influence
• Producing measurable voltage between the two
sides of the conductor. +Vc

Gnd
Signal
Automotive ECU Development

106
Galvanomagnetic Effect
B Magnetic flux density
I Wafer current
IH Hall current
IV Supply current 𝑈𝑈𝐻𝐻 = 𝑅𝑅𝐻𝐻 � 𝐼𝐼 � 𝐵𝐵/𝑑𝑑
UR Longitudinal voltage
𝛼𝛼 Deviation of the electrons
due to the magnetic field
RH = Hall coefficient
d = wafer thickness

a Circuit
b Curve of Hall voltage UH
c Increase of wafer
resistance R (Gaussian effect)
Automotive ECU Development

107
Rotor Position Detection – Hall Effect Sensors
• Rotor position is sensed using Hall-effect sensors
embedded into the stator.
• Sensor sensitivity depends on e.g.
• Placement to the magnet
• Air gap
• Magnet strength

Pic-source: https://www.appliancedesign.com/articles/95289-how-to-select-hall-effect-sensors-for-brushless-dc-motors/
Automotive ECU Development

108
Hall Effect Sensor
a) Linear (analog output sensor): b) Threshold (digital, or on-off)
• Produce a hall voltage proportional to • Produce a constant hall voltage when field
the strength of magn. field around it. strength reaches certain amplitude and/or
• Orientation of surrounding magn. field polarity.
determines the polarity of the voltage • Latching devices:
swing. • E.g. turn on when a positive field
• Used in musical applications, throttle, … strength reaches the threshold.
• E.g. only turn off under negative
field of same strength.
Automotive ECU Development

109
Analog Hall angular-position sensor (up to 90°/180°)
Linear characteristic curve for angles up to
approximately 90°
a Design
b Characteristic curve with working range A

1…Rotor disk (permanent magnetic),


2…Pole shoe, 3…Conductive element,
4…Airgap, 5…Hall sensor, 6…Shaft

Linear characteristic curve for angles up to


180°
Bipolar field of the magnet ring is passed
through a Hall sensor arranged between
semicircular conductive elements
The effective magnetic flux through the
Hall sensor is dependent on the angle of
rotation ᵠ.
Application: e.g. Acceleration pedal position

a…Position a, b…Position b, c…Output signal, 1…Magnetic


yoke, 2…stator (1, 2 soft iron), 3…Rotor (permanent
magnet), 4…Airgap, 5…Hall sensor, ᵠ…Angle of rotation
Automotive ECU Development

110
Hall angular-position sensor (360°+)
• E.g. digital Hall sensor device with n Hall-switches

Angular position measurement up to 360° with a circular, equidistant arrangement of simple Hall switches
1…Housing with permanent magnets,2…Codedisk (magnetic), 3…Printed-circuit board with Hall switches
Automotive ECU Development

111
Pros & Cons – Potentiometer

 fast operation  Power supply necessary


 long life
 highly repeatable
 no moving parts
 broad temperature range
 inexpensive
Automotive ECU Development

112
RPM- and Speed Sensors
• Mainly, measurement of rotational speed.
• Measuring the number of revolutions or the distance traveled per unit
of time.
• Measuring principles (examples):
 Magnetic-inductive (for the most part electrically passive - not supported
by form of local/on-site electronics).
 Magnetostatic sensors (Hall-effect, need local, integrated electronics for
signal conditioning → “Intelligent” or “active” sensors)
 Optical and capacitive sensors
(highly unsuitable for rough operating conditions
in a motorized vehicle).
Automotive ECU Development

113
RPM- and Speed Sensors
• To measure variables which occur between two components or
referenced to the road surface or another vehicle.

• Examples:
 Crankshaft and camshaft rotational speed.
 Wheel speeds (e.g. ABS/TCS/ESP).
 Rotational speed of the diesel fuel-injection pump.
 Vehicle movement (e.g. yaw rate).
Automotive ECU Development

114
Sensor Shapes and Rotors
Rotors:
Fork shape (a) Of decisive importance when measuring rotational
 Measurement in axial direction. speed. Usually provided by the vehicle
 + Lower sensitivity to air gap. manufacturer, while the sensor itself comes from a
 - Must be roughly aligned to the rotor. component supplier.
 - Space demands for included sensor.
Types:
a) Magnetically passive (e.g. gear wheel)
b) Magnetically active (pole wheels)
Rod shape (b) a)
 Measurement in radial direction.
 The rotor teeth approach the sensor.
 + Relatively easy to install. b)
 - Higher sensitivity to air gap.
 Mainly used in automotive applications.
Automotive ECU Development

115
Magnetically Passive Rotors
E.g. gear wheels.
Made from magnetically soft materials (usually steel).
+ Lower costs than magnetically active rotors.
+ Not magnetized  no danger of mutual demagnetization
(e.g. during storage).
- Difficult to scan, particularly in combination with rod
sensors.
Normally, passive rotors are in the form of gear wheels 
already present on the engine.
Exemplary application: starter ring gear, with additional
reference mark for picking off the crankshaft position (fault-
free and optimum timing of ignition and injection).
Automotive ECU Development

116
Magnetically Active Rotors
E.g. „Pole wheels“

Made from magnetically hard materials (permanent


magnets). wheel speed sensor

+ Larger air gaps possible in relation to pole wheels


with same increment width .
Multipole ring
+ Higher resolutions possible.
- Higher costs than magnetically passive rotors. Sensor housing

Sensor
Automotive ECU Development

117
Inductive Sensor Effect
• Use Faraday’s law of induction when measuring rotational speed.
• Means: they generate a voltage UA at their two-pole output which is
Moved
proportional to the change (referred to time) of a magnetic flux ɸ permanent
magnet

(⍵ = number of turns).
• The magnetic flux ɸ is also a function of the rotational position x and
the air gap dL: where ɸ = ɸ(x, dL) and dL = const .

• Where dx/dt represents the (rotational) speed to be measured.


Direction of
magnetic
flux Φ
Automotive ECU Development

118
Inductive Speed Sensors
Basically, inductive speed sensors are
comprised of three important magnetic
component parts:
Fixed coil
Soft-iron component
Permanent-magnet component
____________________________
1 Rod magnet
2 Soft-magnetic
pole pin
3 Induction coil
4 Airgap dL
5 Ferromagnetic gearwheel (or rotor or pulse wheel)
6 Rotational or reference mark
𝝀𝝀 Tooth interval
Automotive ECU Development

119
Flux and Voltage Curve for an Inductive-Type
Sensor
• Figure shows the flux curve and the voltage induced by a single rotational or reference mark
(slot, cam, or pole pin).
• Normally, the steep passage through zero which takes place at the mid-point of maximum
flux is utilized for the electronic detection of such a rotational or reference mark.
• According to Faraday’s Law, in all phases the signal’s amplitude is proportional to rotational
speed.
• In order to ensure adequate, interference-free evaluation in the control unit, the spacing
between the peaks of a double pulse (or of a periodic voltage pulse) should be at least 30
mV.
• The signal amplitude is highly dependent (exponentially) upon air gap and tooth size.
Automotive ECU Development

120
Pros & Cons – Inductive Speed Sensor

 Low manufacturing costs.  Conventional coil technology imposes limits on size


 High immunity to interference: reduction.
low static internal resistance (dynamically higher).  The output signal is rpm-dependent, unsuitable for
 No local electronics (electrically passive), that need quasi-static movements.
to be protected.  Sensitive to air-gap fluctuations
 No problems with DC voltage drift
(dynamic measuring principle).
 Broad temperature range
(limited primarily by the sealing compound
characteristics).
Automotive ECU Development

121
Simple Hall Rod Sensors
With magnetically passive rotors:
 - High dependency on air gap.

With magnetically active rotors (pole wheels):


 Air gap influences signal
 + But sensor is triggered by varying polarity
only at magnetic zero point (B=0, remains
unchanged).
 No errors due to air gap fluctuations, relatively
wide air gaps possible.
Automotive ECU Development

122
Acceleration Sensors
• Basic principles
 Measurement of displacement
 Measurement of force
• Application examples
 Knock control in gasoline engines
 Triggering restraint systems (e.g. airbag and seat-belt pretensioners)
 Detecting the accelerations of the vehicle for the antilock brake system
(ABS) or the electronic stability program (ESP)
 Evaluation of body acceleration for use by the chassis and suspension
control systems.
• Measured variable is acceleration a, often stated as a multiple of
the acceleration due to gravity gn (1 g ≈ 9.81 m/s2).
Automotive ECU Development

123
Measurement Principles
Automotive ECU Development

124
Measuring Range of Acceleration Sensors

typical values in motor vehicles


Automotive ECU Development

125
Piezo-Electrical Effect
• After the pressure is applied on a crystal surface (i.e. Quartz),
differently charged ions are moving through the crystal grid.
• As a result, electric charges are generated on the surface of
the sides of the crystal where the pressure is applied.
• During discharge, these charges can be converted into a
proportional voltage via an integrated amplifier or an amplifier
with an extreme high input resistance (electrometer amplifier).
• The piezo effect is reversible. Tensile and compressive forces
lead to different polarity of the charge.
• The size of the charge is not temperature dependent and has
no hysteresis depending on the force
Automotive ECU Development

126
Knock Sensor / Engine Knocking
• When combustion of some of the air/fuel mixture in the cylinder does not result from
propagation of the flame front ignited by the spark plug, but one or more pockets of air/fuel
mixture explode outside the envelope of the normal combustion front.
• Shock wave creates a characteristic metallic "pinging" sound, and cylinder pressure increases
dramatically.
Automotive ECU Development

127
Capacitive Acceleration Sensor – Measuring the
Displacement
 A mass m – the seismic mass – is elastically attached to the body, the acceleration
a of which it is intended to measure.

Sensor
Automotive ECU Development

128
Capacitive Acceleration Sensor – Measuring the
Displacement
 Compensation principle: the system deflection
due to acceleration is controlled out by an +: greater measurement range
equivalent return force. +: only limited by the return force
 The sensor element is now a component part of a +: a higher cut-off frequency than
closed control loop. non-motion- controlled systems
 The return force or the variable generating it (e.g.
current or voltage) acts as a measure of the
acceleration.
 The system operates through closed-loop control
very close to the zero point of the excursion and
achieves a high degree of linearity.
Automotive ECU Development

129
Micromechanical Capacitive Acceleration Sensor
Automotive ECU Development

130
Micromechanical Capacitive Acceleration Sensor
for Yaw Rate Sensing
Automotive ECU Development

131
Micromechanical Capacitive Acceleration Sensor
for Rollover Applications
Automotive ECU Development

132
Force and Torque (Piezo-Resistive Effect)
• Change in the electrical resistance of a semiconductor
or metal when mechanical strain is applied.
• E.g. thin silicon layers change their electrical resistance
when bent.
• This allows forces to be measured.
• In contrast to the piezoelectric effect, the piezoresistive
effect causes a change only in electrical resistance, not
in electric potential.
Automotive ECU Development

133
Strain-gage Force Sensor
• Strain- gage resistors in the form of film resistors are so
closely bonded to the surface of the selected elastic
member that they follow its surface elongation perfectly.
• The change in resistance resulting from the resistor’s
elongation is defined by the particular gage factor K:

∆R/R = K*ε
Automotive ECU Development

134
Strain-gage Torque Measurement
 Angle-measurement methods
require a certain length “l” of
the torsion shaft via which the
torsion angle (approximately
0.4° to 4°) can be picked-off.

 The mechanical stress σ


proportional to the torque is
aligned at an angle of less
than 45° to the shaft axis.
1 Torsion rod; F Torsion angle
σ Torsional stress; M Torque
r Radius; l Rod length
Automotive ECU Development

135
Strain-gage Torque Sensor
 Strain-gage principle has become
predominant.
 Strain-gage bridge measures the
mechanical stress.
 The bridge is powered using
transformer principles.
 Further local electronic components
on the shaft permit the
measurement signal to be amplified
and converted to an AC form which
is independent of the air gap (for
instance, frequency-analog) which 1 Torque indicator; σ Torsional stress
can then also be outputted using M Torque; 𝑼𝑼𝟎𝟎 Supply voltage
R1 to R4 Strain-gage measuring
transformer principles. resistors
Automotive ECU Development

136
Applications
• Commercial-vehicle sector: coupling force between
the tractor vehicle and its trailer.
• Damping force for use in electronic chassis and
suspension control.
• Axle load for electronically controlled braking-force
distribution on commercial vehicles.
• Pedal force on electronically-controlled brake Force
systems. sensor
• Braking force on electrically actuated, electronically-
controlled brake systems.
• Drive and brake torque.
• Steering and steering servo torque. Torque
sensor
Automotive ECU Development

137
Pressure Sensor - Applications
 Intake-manifold or boost pressure (1 to 5 bar) for gasoline injection
 Brake pressure (10 bar) on electropneumatic brakes
 Air-spring pressure (16 bar) on pneumatic-suspension vehicles
 Tire pressure (5 bar absolute) for tire pressure monitoring
 Hydraulic reservoir pressure (approximately 200 bar) for ABS and power
assisted steering
 Shock-absorber pressure (approximately 200 bar) for chassis and
suspension control
 Coolant pressure (35 bar) for air- conditioning systems
 Modulation pressure (35 bar) for automatic transmissions
 Brake pressure in master cylinder and wheel-brake cylinder (200 bar), and
automatic yaw-moment compensation on the electronically-controlled brake
 Overpressure/underpressure of the tank atmosphere (0.5 bar)
Automotive ECU Development

138
Method: Direct Pressure Measurement
Direct pressure measurement with
• Given that all known resistors are more or less electrical resistor
pressure-dependent (volumetric effect), when very
high pressures (>104 bar) are to be measured, it
would suffice to simply subject an electrical
resistor to the pressure medium.

• - but more or less temperature-dependent, a


characteristic which is usually very difficult to
suppress.

• - Sealing of contacts difficult


Automotive ECU Development

139
Method: Diaphragm-Type Sensors
• Most common method used for the measurement Diaphragm-Type Sensors
of pressure.
• Thin diaphragm as a mechanical intermediate
stage which is exposed on one side to the
pressure to be measured.
• Diaphragm deflects a function of the pressure.
• Within a very wide range, its diameter and
thickness can be adapted to the particular
pressure range.

Diaphragm-type sensors
1: Force measurement device
p: pressure
Automotive ECU Development

140
Method: Strain Gauge Pick-Off
• The elongations of the diaphragm occurring on the
deflection of a diaphragm-type sensor are Strain Gauge Pick-Off
detected using strain-gage technology.
• Strain-gage resistors are affixed to the diaphragm.
• Their electrical resistance varies under the
influence of mechanical stresses.
• The resistors are connected together to form a
Wheatstone bridge.
• Its voltage output is a measure for the pressure.
Strain gauge pick-off method
2: strain gauges
p: pressure
Automotive ECU Development

141
Method: Transfer to a Force Sensor
• Instead of directly using the force taken up by their Transfer to a Force Sensor
diaphragm, a number of sensors transfer it to a
force sensor whose measurement range can
remain constant due to the fact that the purely
mechanical diaphragm has already performed the
adaptation to the pressure-measuring range.

• Perfect linkage from measuring diaphragm to


force sensor (for instance by a tappet) must be
ensured though.

Measurement using capacity


in a capsule
Automotive ECU Development

142
Examples High pressure:
• Steel diaphragm with strain-gage resistors
(bridge circuit).
• Measuring range is dependent on the
thickness of the diaphragm.
• Application examples:
• Rail-pressure sensor for gasoline direct
injection (up to 200 bar)
• Rail-pressure sensor for common-rail
diesel-injection system (up to 2,000 bar)
• Brake-fluid pressure sensor in the
hydraulic modulator of the ESP (up to
350 bar)
Automotive ECU Development

143
Examples Low pressure:
• E.g. measures the pressure in the vehicle's
fuel tank.
• Part of the vehicle's sealed EVAP
(Evaporative) system
• Input for OBDII (e.g. diagnose of leaks in
the tank system).

Pressure Sensor Fluid


• Relative fluid pressure
measurement
• Measurement Range 0
to 100bar
• Analaog output
• Integrated series
connector
Automotive ECU Development

144
Tire Pressure Measurement Tire pressure sensor for
direct measurement
• Direct: via sensor element in wheel.
• Indirect: e.g. comparison of wheel
speeds (wheel speed sensor)

Seat occupation detection: pressure


measurement via resistive sensor elements
in a „mat“, integrated in the seat.
Automotive ECU Development

145
Flow Sensors – Flowmeters
 Calibrated for flow through a pipe with a
symmetrical flow profile.

 This means that a flow with a velocity vector v at


practically any point of the flow cross-section of
area A depends only on the radius to the central Flow profiles
axis, and not on the angle at the circumference. 1 Laminar flow profile; 2 Turbulent flow profile
A Cross-sectional area of the tube
Q Flow; R Tube radius; r Distance from the tube center
v(r) Flow profile

 The flow profile is related to the Reynolds number: Re = v × D/h


 v: flow velocity
 D: cross-section dimension;
Volumetric flow:
 h: kinematic ductility(medium) Mass flow:
Automotive ECU Development

146
Differential Pressure Flow Meter /
Pressure Drop Equation
The calculation of the pressure drop
across fixed orifice plates is based on two
physical laws:
Continuity equation and Bernoulli’s
equation

a Ring orifice; b Sensor plate; 1 Orifice plate 1 Sensor plate; 2 Air-temperature sensor; 3
𝑨𝑨𝒔𝒔 Disk cross-section; 𝑨𝑨𝟏𝟏,𝟐𝟐 Measuring cross- To control unit; 4 Potentiometer; 5 Damping
section chamber;
𝒑𝒑𝟏𝟏,𝟐𝟐 Measured pressures; Δp Pressure drop 6 Compensation flap; QL Intake-air flow
QLM Air-mass flow

Pressure drop equation: 𝑤𝑤𝑤𝑤𝑤𝑤𝑤 ρ1 = ρ2 = ρ


Automotive ECU Development

147
Pitot Tube Ultrasonic
Flow measurement via determination of Ultrasonic signals both
dynamic pressure.  in flow direction
 against flow direction
At stationary fluid, measured time for signal
arrival is the same.
When in movement, difference in signal arrival
time is proportional to flow velocity.
Automotive ECU Development

148
Coriolis Force and Electromagnetic Flow Meter
• Faraday's law of induction.
• Moving conductive liquids
inside of a magnetic field
generates an electromotive
force (voltage).
• Potential difference proportional
to the flow velocity
perpendicular to the flux.
Automotive ECU Development

149
Hot-Wire / Hot-Film Anemometer
• Exemplary Automotive application
Automotive ECU Development

150
Gas and Concentration
• Concentration: ration of mass or volume of a certain material in another
material or mix.
• Ideal case: a sensor is sensitive to only one medium, while “ignoring” all
other mediums.
• In practice: cross sensitivity to other mediums
• even though, as is often the case, “temperature” and “pressure” are
maintained constant.

Applications:
• Oxygen content in the exhaust gas
• CO, NOx
• Air humidity inside the vehicle
• Humidity in the compressed-air brake system
• Dampness of the outside air
• Concentration of soot in diesel-engine exhaust gas
• Urea concentration (SCR)
Automotive ECU Development

151
Gas and Concentration -> Humidity Sensors
Resistive sensors Capacitive sensors

 hygroscopic layers (humidity sensitive film)


 store and release water, dependent on the relative humidity
 → change in a resistor’s value (R) or the value of a planar capacitor.
Automotive ECU Development

152
Gas and Concentration -> Humidity Sensors
Resistive sensor:
Reduction of R due to water storage (increase of conductivity)
Capacitive sensor:
Increase of C due to increase of εr (relative dielectric constant of water εrW≈ 80)
10.000

1.000

Impedance [kΩ]
100

10

1
10 50 90
Relative Humidity [%RH]
Automotive ECU Development

153
Temperature Sensors

U(T) = U0*R(T)/(R(T)+RV) U(T) = I0*R(T)


Automotive ECU Development

154
Temperature Sensors – NTC Resistors
• An NTC thermistor is a thermally sensitive
resistor whose resistance exhibits a large,
precise and predictable decrease as the core
temperature of the resistor increases over the
operating temperature range.
• Their characteristic curve can be defined as
follows:
Automotive ECU Development

155
Temperature Sensors – PTC Resistors
• A PTC thermistor is a thermally sensitive resistor
whose resistance increases significantly with
temperature.
• The following applies for the computational definition
of these sensors:
Automotive ECU Development

156
Exemplary Resistance Temperature Detector (RTD)
• RTD100 or PT 100 means: 100 Ω at e.g. 0°C.
Automotive ECU Development

157
Thermocouples
• Thermocouples are used in particular for measuring
ranges ≥ 1,000 °C
• They rely on the Seebeck effect.
• Both free ends of the thermoelement configuration are
at the same (reference) temperature.
• The sensor signals are usually small
• In order to increase the measurement voltage, it is
common practice to connect a number of identical
thermocouples in series.
copper

constantan

1…copper/constantan, 2…iron/constantan, 3…nickel-chromium/ nickel, 4…platinum rhodium/platinum


Automotive ECU Development

158
Semiconductor Depletion Layers
• Presuming a constant current, the forward voltage of semiconductor depletion layers
such as those in diodes and in the basis-emitter path of a transistor, demonstrate
very good linearity as a function of temperature:
Automotive ECU Development

159
Non-Contacting Temperature Measurements
• Non-contacting (pyrometric) temperature sensing

• Preferred technique for small, moving, or inaccessible objects;


dynamic processes that require fast response.

• Has been considered for occupant-protection (passenger-


position monitoring for airbag triggering), and for comfort and
convenience (air conditioning in accordance with skin-
temperature measurement, prevention of of fogging of the
windscreen.
Automotive ECU Development

160
Pros & Cons of the Methods
Thermocouple RTD Thermistor I.C. Sensor

Criteria: Sensor
behavior (e.g. linearity),
• Self-powered • Most stable • High output • Most linear accuracy, sensitivity,
• Simple • Most accurate • Fast • Highest output
space requirements,
Pros

• Rugged • More linear than • Two-wire ohms • Inexpensive




Inexpensive
Wide variety
thermocouples measurements technology robustness, costs, etc.
• Wide range

• Non-linear • Expensive • Non-linear • T<200°C


• Low voltage • Current source • Limited • Power supply
• Reference required required temperature range required
Cons

• Least stable • Small ∆R • Fragile • Slow


• Least sensitive • Low absolute • Current source • Self-heating
resistance required • Limited configurations
• Self-heating • Self-heating available
Automotive ECU Development

161
Object Detection – ADAS functions
SAE / VDA – Levels of Autonomous Driving

• Collection of information around


the vehicle
• To acquire information from
the immediate and distant
environment around the
vehicle.
• Environmental detection and
reaction functions

?? Authorized level 3 & 4 systems ??


Automotive ECU Development

162
ADAS Sensors
• Vision systems
• Long Range- & Midrange-Radar, Laser scanner, 3D Video camera, Top view cameras, Ultrasonic sensors,
Infrared (Night view) …
• On-Board Sensors
• e.g. ESP: Lateral acceleration sensors, Wheel speed, Yaw rate, Steering angle, Brake system pressure
sensor; … , Ambient temperature, Air pressure, Rain sensor, ...
• Further sensors / Information sources
• Digital maps & GPS, Car2Car, Car2Infrastructure, Car2Home, …

Ultrasonic

Night viev
Automotive ECU Development

163
UBER Self-Driving Car Technologies
Automotive ECU Development

164
Waymo Driver Technologies
Automotive ECU Development

165
Waymo Driver Technologies

• 360° Lidar: max. 300m range, day & night applicability


• Perimeter Lidar: objects close to the vehicle
• 29 cameras: high resolution images, overlapping fields, equipped with cleaning systems and heaters
• 360° long range cameras > 500m range
• Perimeter cameras ... near field
• Radar: high resolution radars at 6 spots around the car. Complements the cameras and Lidars in bad weather conditions
Automotive ECU Development

166
Waymo Driver Technologies
Roof unit:
360° Lidar
360° cameras
Long range
cameras
2 Radars

Both side units:


Radar, perimeter Lidar, cameras

Front unit:
Perimeter
Lidar,
cameras
Rear side
units:
Radar,
perimeter
Lidar,
cameras
Automotive ECU Development

167
Park Distance Sensor

1. Decoupling element
2. Membrane
3. Plug
4. Sensor housing
5. El. circuit
6. Piezo-ceramics
7. Ultrasonic wave
8. Object
Automotive ECU Development

168
Park Distance Sensor
Combined transmitting/
receiving operation
 Sensor transmits and
receives signal.

Receiving operation:
Trilateration
 Sensor receives signal
from other ultrasonic
sensors. Tesla invented a way to project
ultrasound through metal,
 Calculation of minimal
allowing them to hide these
distance to object (in
sensors all over their cars, to
external central control
maintain vehicle aesthetics.
unit).
Automotive ECU Development

169
Radio Detecting And Ranging (RADAR)
• Radio frequency: 30 Hz → 300 GHz
• Frequency Modulated Continuous Wave (FMCW).
• Radio-frequency (rf) energy is transmitted to and
reflected from the reflecting object.
• A small portion of the reflected energy returns to
the radar set. This returned energy is called an
ECHO, just as it is in sound terminology. Radar
sets use the echo to determine the direction and
distance of the reflecting object.
• Applicable e.g. for collision avoidance.
• In today’s vehicle safety systems, radars are used
in conjunction with cameras, ultrasound and other
sensors to obtain information about a vehicle’s
surroundings.
• Using high-level processing technology to facilitate
the fusion of this sensor data can lead to improved
object identification and decision-making.
Automotive ECU Development

170
Radio Detecting And Ranging (RADAR)
Short-range radars(SSR) Long-range and Full-range radars
They work with low ranges and high aperture They cover longer distances (up to approx. 820 feet or 250
angles (up to approx. 330 feet or 100 meters). This meters) and offer information that the emergency braking
type of radar sensor is installed as a corner radar system and / or adaptive cruise control (ACC) needed.
in the bumper ends. The lane-change warning,
lane-change assist, and intersection assistant all
require them.
Automotive ECU Development

171
What Does a RADAR See?
Automotive ECU Development

172
What Does a RADAR See?
Automotive ECU Development

173
LIDAR Sensors
• A LIDAR (Light Detection and Ranging)
system is based on the Time of Flight (ToF)
method.
• ToF is used to determine the time that a
laser pulse needs to overcome a certain
distance in a particular medium.
• In the automotive sector, laser pulses with
a length of 3 to 20 nanoseconds are used
for the ToF method
• The shorter laser pulses provide a better
accuracy. LIDAR sensors in the automotive
industry can reliably detect objects within
ranges of up to 300 meters.
Automotive ECU Development

174
Inside a LIDAR
• Laser diode emits laser pulses.
• Rotating mirror deviates laser
pulses to target coordinates and
creates a fan of laser light around
the sensor.
• Any object that comes within this
range reflects the laser light back
to the sensor, hitting the mirror.
• Photo diode receives the
reflected laser beam and
converts the light into an
electrical current. Inside a photo diode:
• ToF-method: Distance is
calculated based on how long the
light takes to bounce back to the
sensor.
Automotive ECU Development

175
Pros & Cons – Inductive Speed Sensor

 Speed of light is constant and known -> independent  No colors detectable. But could be addressed with
from medium. data fusion from cameras (again issue: night?)
 High accuracy (dependent on actual resolution).  Costs.
 More insensitive to environmental conditions (e.g.
 Energy consumption.
dust, fog, snow).
 Relatively high data acquisition (10 to 20 MByte/s) ->
 Usable at night.
effort in data management.

Level of detail depends on number of laser pulses per time: Low impact from environmental conditions
Automotive ECU Development

176
What Does a LIDAR Sensor See?
Automotive ECU Development

177
Principles of Path Planning and Motion
1. Virtual recording of the environment
 Creation of 2d grid map of the environment.
 Map is a grid with a probability for a cell being free or a part of a (permanent) structure.
2. Localizing the vehicle in the map
 Information of the ego-motion from the vehicle with actual measurements from the
laser scanner.
3. Global path planning
 Automatically planning a collision-free path from the actual position to a given goal.
 Done by searching for a sequence of short motions (e.g. different normal Ackermann
arc segments) that do not collide with any obstacles in the map.
 No consideration of dynamic obstacles (e.g. pedestrians) so far.
4. Local planning
 Also takes into account the actual measurements of the lidar sensors in order to be
able to react to dynamic obstacles.
 Executes the path, finding a collision free motion command for the next timestep,
respecting actual dynamics.
 In order to avoid dynamic obstacle collision, the planner is allowed to deviate from the
path within defined boundaries.
Automotive ECU Development

178
Automotive Cameras
• Cameras are the most precise mechanism
available to capture accurate data at high
resolution.
• Collect the highest amount of information in
relation to e.g. RADAR, LIDAR, or Ultrasonic
 Distance, colours, shape, …
• Many of ADAS applications can be implemented
by using a vision system with forward, rear, and
side mounted cameras for pedestrian detection,
traffic-sign recognition, blind spots, and lane-
detect systems.
• Key sensor to achieve a reliable environment
perception for ADAS functions
• Standard equipment in several middle- and high- Deep information?
class vehicles and support several Level-2 and
Level-3 ADAS functionalities
• Cameras are passive sensors
Automotive ECU Development

179
Automotive Cameras
 A typical sequence where the host vehicle decelerates to
keep a safe headway distance from the detected vehicle.
 The detected target vehicle (the truck) is marked by a
white rectangle. As the distance to the target vehicle
decreases the size of the target vehicle in the image
increases.

 Lane Marking Detection using camera:


Automotive ECU Development

180
Distance Detection Using Cameras
Distance detection methods:
• Active methods
• Passive methods

Mercedes-Benz S-Class. DISTRONIC PLUS


with Steering Assist: comfort-enhancing
assistance with lateral lane guidance.
Automotive ECU Development

181
Automotive Cameras

Traffic Sign Assist: Recognizes no-


overtaking zones and access restrictions

Night View Assist PLUS: alerting


to pedestrians and animals
Automotive ECU Development

182
What Do Automotive Cameras See?
Automotive ECU Development

183
Biometric Sensors
• A biometric sensor is a transducer that changes a biometric treat
of a person into an electrical signal. Treats mainly include
biometric fingerprint reader, iris, face, voice…
• Reads or measures light, temperature, speed, electrical capacity
and other types of energies. Biometric sensors are an essential
feature of identity technology
Ambient light sensor
• determines how much light is available in the area surrounding
the iPhone (for Facial recognition ideal)
Proximity sensor
• determines how close the iPhone is to (your) face
Fingerprint Recognition
• Includes taking a fingerprint image of a person and records its
features
• Optical sensor works by shining a bright light over fingerprint
and taking what is effectively a digital photograph
• Capacitive sensor measures finger electrically
• There are varying distances between each part of finger
and the surface below
• A capacitive scanner builds up a picture of fingerprint by
measuring these distances
Automotive ECU Development

184
Touch Screen
• Direct manipulation type gesture-based technology
• Electronic visual display capable of detecting and locating a touch over its
display area
• Touch screen is a 2-dimensional sensing device made of 2 sheets of
material separated by spacers
• The sensor generally has an electric current or signal going through it and
touching the screen causes a voltage or signal change
• A touch screen sensor is a clear glass panel with a touch responsive
surface which is placed over a display screen
• There are two main touch screen technologies:
1. Resistive Resistive Capacitive
1. composed of a flexible top layer made of polythene and a rigid
bottom layer made of glass separated by insulating dots, attached to
a touch screen controller
2. more affordable but offering only 75% of light monitor and the layer
can be damaged by sharp objects
2. Capacitive
1. coated with a material that stores electrical charges
2. can transmit up to 90% of light from the monitor
Automotive ECU Development

185
Motion Sensor
• Motion sensor is a device that notices moving objects,
mainly people
• The main principle of motion sensor is to sense a burglar
and send an alert to control panel, which gives an alert to
monitoring center
• Types of Motion Sensors:
 Passive Infrared (PIR) Sensor
 Includes a thin Pyroelectric film material, that responds to IR radiation by
emitting electricity
 Activates burglar alarm whenever this influx of electricity takes place
 PIR Sensors are economical, don’t use more energy and last forever
 Ultrasonic Sensor
 Microwave Sensor
 Generates microwave pulses and then calculate their reflection off of
objects, in order to know whether objects are moving or not
 Microwave sensors are very sensitive, but sometimes they can see
through non-metallic objects and thus can detect moving objects outside
the target range / area.
Automotive ECU Development

186
Why do we Need Actuators?
• As part of a control system
• To take influence on a process or system
• To convert a weak electric signal, e.g. from a digital or integrated control
circuit, into powerful action.

• Improve the efficiency of a process or system


• To fulfil the CO2 target w/o loss of comfort and freedom (heating,
automotive, Industry, …)
• For improved control and comfort (Remote control, household,
autonomous driving, internet of things, …, accessibility)
Automotive ECU Development

187
Categorization of Actuators
According to their main power source According to their response to a
Pneumatic – air/gas pressure varying input signal
Hydraulic – oil/fluid pressure
Electric – electric power 140
 Piezo-Electric – electric charge Proportional
120 Steps
 Electro-Magnetic – electric power, Digital

actuator travel [mm]


magnetic energy of a PM 100

 Electro-Thermic – electric power 80


 … 60
Thermic – Thermal energy
40
 Heaters
 Heated bimetal strips 20

 Heated wax - thermostat 0


0 5 10 15 20 25
 SMA - Shape Memory Alloy input signal [V]
Chemical – Oxidation potential
Automotive ECU Development

188
Categorization of Actuators
According to their operating According to their direction of
degree of freedom actuation
• Rotational actuators • One-way or “single” acting
• Transversal actuators • two-way acting “double” acting
• Complex actuators (e.g. push/pull operation, CW and CCW)

According to their control path


• Directly or
• indirectly controlled

Examples:
• For direct: A relays or an electric motor
activated by a switch
• For indirect: Hydraulic actuator controlled by
electrically controlled valve
Automotive ECU Development

189
Examples of Actuators Currently in Use
Chassis Power Train
Automotive ECU Development

190
Examples of Actuators Currently in Use
Find the
actuators
Automotive ECU Development

191
Contents – CU Driven Actuators
Automotive ECU Development

192
Contents – CU Driven Actuators
Automotive ECU Development

193
Heaters – Basics
Conversion of electric energy into thermal energy Seat heating
𝑊𝑊𝑒𝑒 = 𝑊𝑊𝑄𝑄 ca. 100W
𝑐𝑐 … 𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐
𝑊𝑊𝑒𝑒 = 𝑈𝑈 � 𝐼𝐼 � Δ𝑡𝑡 = 𝑐𝑐 � 𝑚𝑚 � Δ𝑇𝑇 𝑚𝑚 … 𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚
t … time
𝑇𝑇 … 𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇 Steering wheel
Power equivalence heating ca. 50W
𝑃𝑃𝑒𝑒 = 𝑃𝑃𝑄𝑄
𝑃𝑃𝑒𝑒 = 𝑈𝑈 � 𝐼𝐼 = 𝑐𝑐 � 𝑚𝑚 � Δ𝑇𝑇/Δ𝑡𝑡 = 𝑃𝑃𝑄𝑄 Rear defrost
ca. 200W
For heaters with constant ohmic resistance Rheater over temperature
(temperature coefficient) or when ΔT is rather small:
𝑈𝑈 2 Overall heating
𝑃𝑃𝑒𝑒 = = 𝐼𝐼 2 � 𝑅𝑅ℎ𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒 ca. 1-3kW
𝑅𝑅ℎ𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒
Automotive ECU Development

194
Heaters – Fields of Application

Temperature limitation due to


current reducing increase of
resistance
Automotive ECU Development

195
Heaters – Fields of Application
Automotive ECU Development

196
Heaters – Fields of Application

Expansion Thermostat
Wax
element
Lifting pin

Heating resistor

Large valve plate for


closing the large
coolant circuit
Automotive ECU Development

197
Heaters – SMA Shape Memory Alloys
Timeline of Memory Metals
• 1932 - A. Ölander discovers the pseudo elastic properties of Au-Cd alloy.
• 1949 - Memory effect of Au-Cd reported by Kurdjumov & Kandros.
• 1967 – At Naval Ordance Laboratory, Beuhler discovers shape memory effect in nickel titanium
alloy, Nitinol, which proved to be a major breakthrough in the field of shape memory alloys.
• 1970-1980 – First reports of nickel-titanium implants being used in medical applications.
• Mid-1990s – Memory metals start to become widespread in medicine and soon move to other
applications.

Transformation Transformation
Alloy Hysteresis (°C)
Composition Temperature Range (°C)
Ni-Al 36-38% Al -180 to +100 Ca. 10
Ni-Ti 49-51% Ni -50 to +110 Ca. 30
Automotive ECU Development

198
Heaters – SMA Shape Memory Alloys
Material behaviour in micro-size
Automotive ECU Development

199
Existing and Potential Automotive SMA Applications

Videos
Automotive ECU Development

200
Existing and Potential Automotive SMA Applications

The schematic of NiTi (Left) Scanning electron micrograph of a NiTi Magnetic microgripper (a)
microvalve in (a) close micro-gripper (Right) (1) The sketch of the schematic of the body,
position, (b) open operational mode (2) Thermo-mechanically (b) Gripping a micro-object
position cycle (3) The working principle due to heating by the micro-tip
/ cooling
Automotive ECU Development

201
Existing and Potential Automotive SMA Applications

The micro wrapper based on NiTi thin Schematics of the operation of


film MicroSwitches
Automotive ECU Development

202
Existing and Potential Automotive SMA Applications

Videos
Automotive ECU Development

203
Pros & Cons – SMAs

 High mechanical performances  Low energy efficiency


 High power to weight ratio  Complex thermo-mechanical behavior
 Large deformation  Complex motion control
 Large actuation force  Expensive materials
 High damping capacity  Temperature depended effect
 High frequency response  Poor fatigue properties
 High wear resistance  Low operation speed
 High corrosion and chem. Resistance
 Low operation voltage
 High specific strength
 Compactness and lightness
Automotive ECU Development

204
Contents – CU Driven Actuators
Automotive ECU Development

205
Pyro Actuator
Characteristics:
• Ideal for safety device
• Fast actuation
• One time use
• Gas generators or Initializer
for gas generation

1. End cap 6. Cable crimping 11. Tubular rivets


2. Firing pin 7. Retaining balls 3x 12. Pressure cylinder
3. Gas generator 8. Sensor head 13. Sensor carrier
4. Thermowell 9. Sensor spring 14. Transport locking
5. Impact spring 10. Piston 15. Bowden cable
Automotive ECU Development

206
Pyro Actuator - Applications
Pyro actuators as gas generator for safety
device - Airbag
• Two stage operation
• Limitation on shock and noise
Automotive ECU Development

207
Pyro Actuator - Applications
Seatbelt tensioner:
• Fast reaction
• One time use
• Design compromise :
• Tensioning the seatbelt quickly
to securely lock the belts
ratchet but smoothly enough
not to harm the person
Automotive ECU Development

208
Pyro Actuator – Application Piston Actuator
Automotive ECU Development

209
Pyro Actuator – Application Piston Actuator
The Mercedes-Benz SLS has explosive
bolts that separates the doors from the
car for easy exit during a serious
accident.
Automotive ECU Development

210
Contents – CU Driven Actuators
Automotive ECU Development

211
Piezo Actuator
The piezoelectric effect was discovered by Jacques and
Pierre Curie in 1880.

Basics on piezoelectric material


• Piezoelectricity is the property of some materials to
develop electric charge on their surface when
mechanical stress is exerted on them.
• An applied electric field produces a linearly proportional
strain in these materials.
• The electrical response to mechanical stimulation is called
the direct piezoelectric effect, and
• the mechanical response to electrical simulation is called
the converse piezoelectric effect.
Automotive ECU Development

212
Piezo Actuator
direct piezoelectric effect converse piezoelectric effect

Development of electrical Strain when electrical charge is


charges under mechanical supplied
stress
Automotive ECU Development

213
Piezo Actuator – Characteristics of Piezoelectric Material
Automotive ECU Development

214
Piezo Actuator – Actuators for Quasi-Static Applications
Benders
Displacement up to mm
range

Amplified actuators
Force

 Piezoelectric ceramic is elastic


 strain is proportional to stress!
Automotive ECU Development

215
How to Select an Quasi-Static Actuator

Displacement

Force
Automotive ECU Development

216
Piezo Actuator – Automotive Applications

Diesel Injector

Requirements
Piezo actuator
• Small stroke – high precision module

• Fast actuation for multiple injections Coupler module


Switching valve
• High fluid pressure (> 1500 bar)
Dash module
• Hot environment
• Vibrations
Automotive ECU Development

217
Piezo Actuator – Automotive Applications
Knock
sensor
Automotive ECU Development

218
Contents – CU Driven Actuators
Automotive ECU Development

219
Relay – Pros & Cons

 Separation of different kinds of circuits LV/HV,  Electrical contacts are subject to wear
DC/AC
 May require additional electrical components,
 High and low side application (comp. transistor)
e.g. for induction spark suppression
 Great power (voltage and / or current)
amplification in one stage  EMC issues may require shielding
 Are found in DC and AC systems
 Robust
Automotive ECU Development

220
Relay – Contact Configurations
E.g. usage of two SPDT:
2 bit digital input to change polarity /
direction of motion of a DC motor

SPST – Single Pole Single Throw


SPDT – Single Pole Double Throw
DPST – Double Pole Single Throw
DPDT – Double Pole Double Throw
Where:
C is the Common terminal
NO is the Normally Open contact
NC is the Normally Closed contact
Automotive ECU Development

221
Solenoids and Linear Electromagnets
Solenoids are electro-magnetic
actuators

They…
• are the widest used type of actuators
• serve as direct actuators or as trigger
for indirect actuation
• enable the electric control of actuators
of other categories

Solenoids are drivers for speakers,


plungers, switches (relays), valves, …
Automotive ECU Development

222
Solenoids and Linear Electromagnets Video

• Solenoids are devices which use electromagnetic forces to generate linear


movements of their inner ferromagnetic cores.
• This movement is called “stroke”.
• This type of electromagnet can exert a pulling / pushing force on the
mechanically mounted part.
coil
immersion core

bearing
coil carrier
Automotive ECU Development

223
Solenoids and Linear Electromagnets

DOOR OPENER HOSE PINCH METAL JACK

COGWHEEL STOPPER EJECTION SYSTEM


Automotive ECU Development

224
Solenoids – Force-Stroke-Diagram
Automotive ECU Development

225
MSMA – Magnetic Shape Memory Alloy Video
magnetic

• Activated by magnetic field


strain

(electro magnet)

• Reset / compressed by
mechanical force (preloaded
by spring)
compression
magnetic
Automotive ECU Development

226
Contents – CU Driven Actuators
Automotive ECU Development

227
Electric Motors
• Basics of Electro-Motion

• Self commutated DC Motor


• Types of DC Motors

• Electrically commutated DC Motor


• Permanent Magnet BLDC
• Stepper motors
Automotive ECU Development

228
Electric Motors – Operating Principle of Electric Machines

𝑰𝑰 ∗ 𝑵𝑵
𝑩𝑩 = µ𝟎𝟎 𝑭𝑭 = 𝑰𝑰 × 𝑩𝑩 × 𝑳𝑳
𝒍𝒍
Automotive ECU Development

229
Electric Motors – Operating Principle of Electric Machines

DC Generator – with Commutation

AC Generator
Automotive ECU Development

230
Electric Motors – Parts of a PM DC Motor
Automotive ECU Development

231
Electric Motors – Working Principle Video
Automotive ECU Development

232
Electric Motors – DC Machine Characteristics
Shunt Excited Shunt Excited
Series Exited Series Exited
Compound Excited Compound Excited

Torque
Speed

Torque Armature current


Automotive ECU Development

233
Electric Motors – Series Motors
Series Motors
The series DC motors are used where high starting torque is required, and variations in speed are possible.
E.g. the series motors are used in Traction system, Cranes, air compressors, Vacuum Cleaner, Sewing machine, etc.

Series Excited AC / DC Motor - Universal-Motor


Automotive ECU Development

234
Electric Motors – Series Motors
Automotive ECU Development

235
Electric Motors – Series Motors
Car cooling fan Car windscreen wipers

• Air density compensation by fan • High starting torque


speed built in • Speed control by resistors in series or
switched or windings
Automotive ECU Development

236
Electric Motors – Externally or PM Excited Motors
Externally Excited or Permanent Magnet Excited Motors
The externally excited motor offers an additional degree of freedom as the field can be controlled to influence the
motor characteristics. Big machines were ones used as locomotive drives.

The PM excited is/was the widest spread electric motor for small alliances such as fans, toys, servos, … as it is
cheap. They offer easy speed control just by the supplied voltage.
Automotive ECU Development

237
Electric Motors – Externally or PM Excited Motors
speed

torque
Automotive ECU Development

238
Electric Motors – Applications of PM Excited Motors
Automotive ECU Development

239
Electric Motors – Shunt Motors
Shunt Motors
The shunt motors are used where constant speed is required and starting conditions are not severe. The
various applications of DC shunt motor are in Lathe Machines, Centrifugal Pumps, Fans, Blowers, Conveyors,
Lifts, Weaving Machine, Spinning machines, etc.
Automotive ECU Development

240
Electric Motors – Compound Motors
Compound Motors
The compound motors are used where higher starting torque and fairly constant speed is required. The
examples of usage of compound motors are in Presses, Shears, Conveyors, Elevators, Rolling Mills, Heavy
Planners, etc.
Automotive ECU Development

241
Electric Motors – Losses

 Transition to Brushless
DC Motors (BLDC)
Automotive ECU Development

242
Contents – CU Driven Actuators
Automotive ECU Development

243
Electric Motors – BLDC
Outer rotor type Inner rotor type

+ Easy to obtain large torque. + The rotor is small and can respond quickly.
+ Speed is stable during constant rotation. + The coil is located on the outside and the level of
− The rotor is large. hear dissipation is high.
− Requires appropriate safety measures. − Magnets can be damaged by centrifugal forces.
Automotive ECU Development

244
Electric Motors – BLDC
Automotive ECU Development

245
BLDC – Control of the Sense of Rotation

I DC
ω

VDC T

Control signal: CW/CCW


Automotive ECU Development

246
Inside a BLDC
A BLDC-Motor:
• consists of a controller, an inverter and an AC-Motor
• is consequently a 3 phase AC-Motor supplied by DC
Automotive ECU Development

247
BLDC vs. PM DC
Automotive ECU Development

248
BLDC – Pros and Cons
PRO CONS
Brushless no brush friction no self commutation
no wear, less maintenance
lower mechanical losses

Excitation on the lighter rotor fixed excitation


rotor (PM) less inertia fixed characteristics
better acceleration
higher speed

Energy supplied better cooling conditions rotor position feedback


to the stator windings are not exposed electronical commutation
to centrifugal forces
less weight
Electronical better Electro Magnetic higher complexity
commutation Compatibility (EMC) sensors
higher speed additional cost
improved control
Automotive ECU Development

249
BLDC Control
Input:
• Typically torque, speed, position and/or direction
• Inputs can be analog voltage, potentiometer, switches
or digital communications (serial, CAN, LIN,…)

BLDC Motor Control:


• Basic I/O for 6-steps (block) or
3 phase PWM (sinusoidal) commutation
• Comparators for over-current detection
• Comparators for speed sensing in sensor less control
• Capture/Compare/PWM or input captures for speed sensing

Feedback:
• Hall effect sensors, optical encoder or back-EMF voltage
Automotive ECU Development

250
BLDC Control
Six Step Commutation is used for BLDC Motors (concentrated windings)
• Requires “rough” knowledge about the rotor position
(sensor or sensor less)
• Drives current into only two windings at any one time
• Use PWM to control drive circuitry

Sine-wave Commutation is used for PMSM (distributed windings)


• Requires absolute knowledge about the rotor position
• Drives sinusoidal current into all windings with a phase off-set
• Use PWM to built the sinus shape and control drive circuitry
Automotive ECU Development

251
BLDC Control
Automotive ECU Development

252
BLDC Control – Six-step or Block Commutation Video
Automotive ECU Development

253
BLDC Control – Sin-Wave Commutation

Speed control by
Automotive ECU Development

254
BLDC Control – Sin-Wave Commutation
Automotive ECU Development

255
BLDC Control – Automotive Application
Traction motor/generator in
hybrid powertrains
Accessories – electrification for
increased efficiency /performance

electric
water pump

electric
turbo
charger
Automotive ECU Development

256
BLDC Control – Automotive Application
Automotive ECU Development

257
Stepper Motors  Ideal for positioning task due to
deterministic step size
 No position feedback required
 But position calibration necessary
 Consume current in stand still (holding
torque)
 Resolution is given by design but can be
refined by control method (full/half/micro
step)
Stepper motors offer special features

• Datasheet study
• Control of stepper motors (commutation modes /
sequences)
• Type differentiation and their Identification
Automotive ECU Development

258
Stepper Motors

• Less demanding in terms of accurate


positioning (lost step)
• New flat screen dash board displays are
competing with the stepper motor gauge
(mimic of the stepper motor gauge initialization)
Automotive ECU Development

259
Parts of Stepper Motors Video

Variable Reluctance Stepper Motor

Hybrid Stepper Motor


Automotive ECU Development

260
Stepper Motors Switching Sequence
Automotive ECU Development

261
Stepper Motor – Automotive Application
Flap Actuation Motor Location

Idle Air Control (IAC) system

Air conditioner and


ventilation control
Automotive ECU Development

262
BLDC Control – Automotive Application
Automotive ECU Development

263 Content Automotive


1. Automotive IT IT
1. Introduction
2. Automotive HW
3. Hardware Development
2. Software
1. Software Basics Hardware Software Network
2. Development Process
3. Introduction to Programming
4. Optional - Programming Examples Throughout the next decade autonomous cars in
particular are even considered to be one of the 10 most
3. Automotive Controller Networks disruptive technologies with revolutionary impact on life,
society and economy.
1. Network basics (terms & definitions)
Today's Embedded Automotive Systems already drive
2. Automotive data networks (LIN, CAN, FlexRay, Ethernet, etc.) about 90 % of the innovation in the automotive sector,
and the corresponding Electronic Control Units already
account for about 40 % of the total vehicle development
expenses.
Automotive ECU Development

264 Automotive IT

Automotive
IT

Hardware Software Network


Automotive ECU Development

265 The Modern Computer


• Computer architecture designed in 1945 by John von Neumann (“The Father of the Modern
Computer”)
• Parts:
• Central Processing Unit
• Arithmetic/Logic Unit
• Control Unit
• Memory Unit
• Input and Output Mechanisms
• Parts share a common bus
• Binary Number System
• Base 2 number system
• By the use of different combinations of 0 and 1 numeric values can be represented
• Computers “understand” only 0 and 1 or ON and OFF
Automotive ECU Development

266 ASCII & Data Representation


American Standard Code for Information
Interexchange
ASCII codes represent text in
computers

Example:

Char Binary Char Binary


“A” 01000001 “a” 01100001
“B” 01000010 “b” 01100010
“C” 01000011 “c” 01100011
“0” 00110000 “1” 00110001
Automotive ECU Development

267 Processor (CPU)


 Is the electronic circuitry within a
computer that carries out the
instructions of a computer program by
performing the basic arithmetic, logical,
control and input/output (I/O)
operations specified by the instructions
 Components:
 ALU (Arithmetic Logic Unit):
performs mathematical, logical, and
decision operations
 CU (Control Unit): directs all of the
processors operations
 MMU (Memory management unit):
performs memory protection, cache Block diagram of a basic CPU. Black lines indicate
data flow, whereas red lines indicate control flow,
control and bus arbitration arrows indicate flow directions.
Automotive ECU Development

268 Microprocessor vs. Microcontroller


Microprocessor (μP): Microcontroller (μC):
 Application in e.g. personal  Compact integrated circuit
computers, laptops, work  Meant for specific purposes
stations,
 Typically includes some kind of
 Typically large memory for OS, processor,
different SW and operations memory, and I/O
 Serial-and parallel interfaces for  Cheaper than CPUs
data exchange, terminal, printer,
 Lower power requirement
etc.
 Less heat
 ANSI-keyboard,
 Small size
graphic card, monitor(s)
 Limited capabilities
 Limited performance
Automotive ECU Development

269 Embedded System - ECU


Micro-controller level Software level

Software applications
Actor

(e.g. ABS, ESP)


-Functions
-Control
-Computations Platform software
(e.g. Diagnosis, functional
safety, communication)

Actor
Real-time operation system
(e.g. Scheduling, interface
driver)
-Program control
-Functional safety

Actor
-Data interfaces Hardware
(Interfaces to sensors, actors)

A/D, D/A … analog/digital, digital/analog signal transmission


DIG … digitale signal transmission
CAN … BUS system
Automotive ECU Development

270 Future ECU Hardware Design Trend goes to a lower


number but more powerful
controllers.

IPC… Inter-Processor Communications


Automotive ECU Development

271 Example: Processor Count in Modern Vehicles

Tesla S processor count


Automotive ECU Development

272 Integrated Circuits


 An integrated circuit (IC, chip, microchip)
is a set of electronic circuits on one small
plate ("chip") of semiconductor material,
normally silicon (most abundant
semiconductor)
 ICs can have up to several billion
transistors and other electronic
components in an area the size of a
human fingernail and are used in virtually
all electronic equipment today

Chip production:
https://www.youtube.com/watch?v=UvluuAIiA50&feature=youtu.be&t=53
Automotive ECU Development

273 Moore's Law

The number of
transistors in a
dense integrated
circuit doubles
approximately
every two years
(computer power
doubling every 18
months)
Automotive ECU Development

274 Motherboard – Embedded System


Source: https://qnovo.com/anatomy-of-an-iphone/

Allows communication and distributes


power to all computer components

e.g. iPhone 6 motherboard


(logic board)
Automotive ECU Development

275 Memory
 Physical device capable of storing information temporarily or
permanently
 Cache (also called CPU memory) stores data so future requests for
that data can be served faster (much faster than regular RAM)
 Read Only Memory (ROM):
 Non-volatile memory
 Cannot be written on or erased without special equipment
 Start-up instructions (BIOS) are loaded at factory
 Random Access Memory (RAM):
 Volatile memory
 Hold: Software instructions and data
before & after the CPU processes it
Automotive ECU Development

276 Memory
 PROM:
EPROM
 Programmable- Read- Only- EEPROM

Memory
 User can program it electrically once
 EPROM:
 Erasable- Programmable- ROM
 User can program and erase it via
UV-light
 EEPROM (E2PROM):
 Electrically erasable PROM
 Possibility to erase it electrically (no
UV-light)
Automotive ECU Development

277 Memory – Flash Memory


 Is an electronic (solid-state)
non-volatile computer storage
medium that can be electrically
erased and reprogrammed
 Toshiba developed flash memory in
the early 1980s and introduced it to
the market in 1984 USB flash drive - The
chip on the left is the
 Widely used (memory cards, USB flash memory and the
flash drives, SSDs, mobile phones controller is on the right.

etc.)
 RAM is much faster than flash, but it
is more expensive and requires
constant power
Automotive ECU Development

278 HW (PCB) Development Process

?
Automotive ECU Development

279 PCB Development Process


 Requirements Analysis
 Schematics (Circuit Design)
Requirements Schematics
 Simulation
 Layout
 Prototyping
 Testing

Prototyping Layout
Testing
Automotive ECU Development

280 PCB Development Process


Project start:
 all functions of the ECU to be developed are described in a block diagram
 on this basis, the following aspects can be derived:
 hardware components
 cost estimation for the hardware
 development effort and tool costs

Hardware samples:
 after the project start, hardware samples are built
 the samples can be assigned to four categories as preliminary stages of the series
ECU, where each sample category builds on the previous one (A-, B-, C- & D-
Sample)
Automotive ECU Development

281 PCB Development Process


A – Sample C – Sample
 is created from an existing ECU or a  is the release sample with which the OEM
development circuit board conducts "technical release“ tests
 it is a functional sample that is used  with this ECU-Sample all specifications are fulfilled
for preliminary tests and serves to  the product release concludes the development
confirm the design (Proof of phase
Concept)  as far as possible, the C-samples are
manufactured with standard tools and close-
B – Sample to-production manufacturing processes
 contains all circuit parts D – Sample
 it is a test sample with which the entire  is the pre-series sample
range of functions and  are used to equip pre-series vehicles for large-
technical requirements can be tested scale vehicle tests
 already suitable for extended testing in  these ECUs are assembled and tested using
vehicle prototypes standard production processes and under series
production conditions
Automotive ECU Development

282 PCB Development Process – Schematics


Arduino Uno - Schematics
Automotive ECU Development

283 PCB Development Process – Layout


Layout:
 required for the production of the Printed Circuit Board (PCB)
 shows the traces and the connection pins of the components
 the layout is generated in a CAD system (e.g. Autodesk Eagle)
 data from the schematic are transferred and converted
 the resulting netlist (list of component connections) provides information on how components are
connected to each other
 specifications for the layout that must be taken into account:
 power dissipation that occurs in components (possibility of heat
dissipation)
 EMC influences (electromagnetic compatibility)
 optimal arrangement of components
 placement of components by automatic component assembly machines
 space requirements for test probes and visual inspection systems
Automotive ECU Development

284 PCB Development Process – Prototyping


PCB Production:
 with the layout data the Printed Circuit Board can be
manufactured
Production of PCBs:
 EN: https://youtu.be/zChympZyqdE?t=19
 DE: https://youtu.be/2EU6WB6uYKk?t=16
Prototyping:
 the finished printed circuit board must be
equipped with the components
 after assembly, the components are soldered
Assembly of PCBs:
https://youtu.be/ylk6VMBLrvM?t=85
Automotive ECU Development

285 PCB Development Process – Testing


Inspection of the assembled printed circuit board:
 Electrical test:
 for this purpose, electrical test specifications are created that run on a computer
 this automatic test checks the completeness of the assembly and the
functionality of the circuit

 Thermal test / HW integration test:


 thermographic images of the printed circuit board show the heat
generated by the components during operation
 this enables the detection of components that are getting too
warm
Automotive ECU Development

286 PCB Development Process – EMC


Inspection of the assembled printed circuit board:
EMC (Electromagnetic Compatibility) test
 measurements in the EMC measurement hall test the behavior of the ECU for
electromagnetic irradiation and radiation

 Measurements are performed both on the


installed ECU (vehicle measurements) and in
the laboratory (e.g. stripline method)
 under investigation is the interference immunity
of the output signals (e.g. ignition signals,
injection signals) to irradiation as well as the
radiation behavior

EMC measurement hall test


Automotive ECU Development

287 Example: PCB Development – Parking assist system


Requirements - System description
 depending on the remaining distance to object, an
acoustic (buzzer) and optical signal (LED) should
be given Initial prototype was realized
with the Arduino Uno development
Board

Reasons for the selected µC


 low performance and memory
requirements
 costs → cheaper, better suitable µC
 system requires less connection pins and
peripherals → more compact PCB possible
Automotive ECU Development

288 Example: PCB Development – Parking assist system – Pinout


Automotive ECU Development

289 Example: PCB Development – Parking assist system –


Breadboard
Automotive ECU Development

290 Example: PCB Development – Parking assist system –


Schematics
Automotive ECU Development

291 Example: PCB Development – Parking assist system –


Layout
Automotive ECU Development

292 Automotive IT

Automotive
IT

Hardware Software Network


Automotive ECU Development

293 Automotive Controller Networks


I. Network basics (terms & definitions, consumer area technologies)
II. Controller Area Network (CAN)
III. Local Interconnect Network (LIN)
IV. FlexRay
V. Media Oriented Systems Transport
VI. Automotive Ethernet

Collection of computers, servers,


mainframes, network devices (e.g.
ECUs), etc., which are connected with
each other in order to be able to
share data and communicate
Automotive ECU Development

294
Costs and Data Rates of Automotive Bus Systems
Automotive ECU Development

295 Automotive Network Topologies


Line-Bus (CAN, LIN): FlexRay is usually realized in
a star structure
 Several control units are connected via short
stub lines to the same connection cables. A
bus access procedure must control which ECU or
Star
star
device may send at what time in order to coupler

prevent collisions as well as to detect and


resolve them

Termina Trans-
mission Ring
-ting
resistor line

MOST works with ring


structures with max. 64 ECUs
Automotive ECU Development

296 Control Paradigm


1. Time-Triggered Architecture
 Action derived from progression of time (FlexRay & MOST)
 Static, periodic, prior known schedule fluctuation of latency time
 Global notion of time
Automotive ECU Development

297 Control Paradigm


2. Event-Triggered Architecture
 System activity triggered by an event
 Priority based communication (e.g. CAN)
Automotive ECU Development

298 The Network Integration Problem


 Network integration is carried out by the OEM who determines bus topology, speed,
number of nodes and messages, and finally the configuration, e.g. the assignment of
priorities or time slots to bus messages
 The decision-making process typically includes the following questions:
 Is the network (temporarily) overloaded (threshold ~50 %)?
 Which messages can get lost and how often?
 Can more ECUs (electronic control units) and how many be
connected without overloading the bus?
 How about diagnosis and ECU flashing?
 Answering these questions requires understanding the sophisticated effects that individual
decisions might have on the overall performance and timing. And it requires a systematic
procedure including appropriate supply-chain communications in terms of data sheets
and requirement specifications.
Automotive ECU Development

299 Controller Area Network (CAN)


 CAN is a bit stream-oriented line-bus, which is defined for a maximum bit rate of
1 Mbit/s (usually 500 kbit/s)
 The data transmission is done serially bit by bit
 Several control units are connected in parallel via short stub lines to the same
connection cables (multi-master architecture). A bus access procedure controls
which device may send at what time in order to prevent collisions as well as to
detect and resolve them
Automotive ECU Development

300 CAN-BUS Components


 CAN-controller
 receives data from the microcontroller in the e.g. ECU, which needs to be send
 processes and passes them on to the CAN transceiver
 CAN-transceiver
 performs the physical connection to the bus lines
 is a transmitter and receiver
 converts data from the CAN controller into electrical signals and sends
them to the data bus lines
 Termination resistor
 is a resistor at the ends of the data lines
 needed to suppress reflections as well as return the
bus to it’s recessive / idle state
 Data-bus lines
 bidirectional and are used to transfer data
 called CAN-High (CAN_H) and CAN-Low (CAN_L)
Automotive ECU Development

301 Controller Area Network (CAN)

High Speed CAN,


i.e. Class C:
bit rates ≥ 250 kbit/s Voltage levels on High Speed CAN data bus line [Bosch] Voltage levels on High Speed CAN data bus line [Dewetron]

The transceiver can generate two different states of a bit:

Bit value „1“ - recessive Bit value „0“ - dominant


 Transceiver open, switches  Transceiver closed
to 2,5 V  CAN_H switches to approx.
 Voltage on the data bus line 3,5 V, CAN_L to approx.1,5 V
approx. 2,5 V
Automotive ECU Development

302 Controller Area Network (CAN)

Bit value „1“ - recessive


 Transceiver open, switches to 2,5 V
 Voltage on the data bus line approx.
2,5 V
Bit value „0“ - dominant
 Transceiver closed
 CAN_H switches to approx. 3,5 V,
CAN_L to approx.1,5 V
Automotive ECU Development

303 Controller Area Network (CAN)


 Example: window regulator two bits, four different variants
 first bit 0 V and second bit 0 V window regulator is currently in
motion (low-speed can)
 With more bits, more information can be transmitted variants = 2n
Automotive ECU Development

304 CAN Data Transmission


Course of data transmission:
 Prepare data - data for transmission is forwarded
to the CAN
controller by the ECU
 Send data - CAN transceiver receives data from
the CAN controller, converts them into electrical
signals and sends them
 Receive data - all other ECUs which are
connected to the CAN data bus become
recipients
 Check data - the ECUs check whether they need
the received The data is received and
data for their functions or not
evaluated by all participants
 Keep data - if the data is important, it is stored (broadcast)!
and processed, otherwise it is ignored/dropped
Automotive ECU Development

305 CAN Message


 CAN is a broadcast system, i.e. each transmitter sends its messages without destination and
source address. The message is marked by a unique identifier - message identifier

 Each controller on the bus receives the message and decides on the basis of the message
identifier, whether to processes or ignore the message

 Each controller can send a message as soon as the bus is free for at least 3 bit times. The message
identifier not only features the content of a message but also its priority. If there is a collision, the
message with the higher priority “wins” - Carrier Sense Multiple Access/Collision Resolution
(CSMA/CR)

 Control Bits: Data Length Code (DLC)... defines


the length of the payload
 Payload: 0 to 8 bytes of data (e.g. sensor
information)
 Cyclic Redundancy Check (CRC): error
detection
 Acknowledge and end of frame: to check the
message format
Automotive ECU Development

306 CAN Message


Automotive ECU Development

307 CAN Message Priority


 CAN works event-orientated. Ideally, the message is sent immediately as
soon as it is copied to the message buffer of the communication controller
and the corresponding transmission bit is set

 If, however, the bus is currently busy or if there is a another message with a
higher priority ready for transmission, the message has to wait until the
bus is free
Automotive ECU Development

308 CAN Message Priority


 Example: three ECUs are starting to send data at the same time

Brake Priority Data protocol Message


ECU (ECU) identifier
1 Brake 001 1010 0000
Engine 2 Engine 010 1000 0000
ECU
3 Gearbox 100 0100 0000

Gearbox Bit with Value Significance


ECU
0V 0 more
significant
Data-bus 5V 1 less
line significant

Gearbox ECU loses Engine ECU loses


Automotive ECU Development

309 CAN Database File (*.dbc)


 CAN database file (DBC) describes the communication of a single CAN network and
contains definitions of all messages and signals. The most popular format is DBC, which is
a proprietary format by Vector
 The information in a DBC file is sufficient to monitor and analyze the CAN network
 A DBC file can also be used to develop the communication software of an electronic control
unit which shall be part of the CAN network. The functional behavior of the ECU is not
addressed by the DBC file
 To make sense of the 8 data bytes in a message, the controller will decode the data into signals
such as engine rpm, fuel level or brake pedal position. Each signal has a start bit and end bit,
which are used to select the correct bits out of the 8 bytes. No signal information is
transmitted over the bus. Instead all controllers must agree on the layout of messages and
signals beforehand
Automotive ECU Development

310 CAN Database File (*.dbc)


Automotive ECU Development

311 CAN Database File (*.dbc)

Payload 64bit example:


0010001101111011 0010001 1 01111011 0010001111011001 0001101111011101
Automotive ECU Development

312 CAN with Flexible Data-Rate (CAN FD)


 Because of its limited bus bandwidth (1 Mbit/s) CAN is considered as a bottleneck for future/present chassis and drivetrain
systems
 CAN buses exceed recommended busloads ( >50 %) → high overhead for sending CAN messages ( ≥50 % ) → Only
around 40-50 % of the bandwidth is used for actual data
 CAN FD (Bosch, 2012) makes an increase in the bandwidth of CAN systems possible → alternative to FlexRay
 Increasing the CAN message data length from max. 8 to 64 bytes
 Increasing the bit clock (targets of physical layer: up to 8 Mbit/s)
 Possibility of bit rate adjustment (> 1 Mbit/s)
 Physical layer and arbitration phase same as standard CAN
Automotive ECU Development

313 Overview CAN


 Event-driven communication between multiple ECUs for the exchange of measurement and
control signals
 Line-bus architecture with max. 40 m bus length at 1 Mbit/s
 Usual bitrates 500 kbit/s (High-Speed-CAN) and 125 kbit/s (Low-Speed-CAN)
 Messages with 0 - 8 data bytes and 6 - 8 bytes overhead (header / trailer)
 CAN controllers, transceivers and microprocessor necessary
 Broadcast system  messages labelled by message identifier, identification & acceptance by the
recipient; prioritization of messages
 Network-wide data consistency as all CAN controllers ignore the received data, if
one or more devices detect a transmission error
 Automatic retransmission in case of an error. Automatic shutdown of defective CAN controllers
 Worst case latency: 270 μs, theoretically possible user data rate 29 KB/s (11 bit identifier)
 Increasing the usable data rate by using up to 64 bytes per message and dynamic switching to higher
bitrates in development (CAN-FD)

313
Automotive ECU Development

314 Automotive IT

Automotive
IT

Hardware Software Network


Automotive ECU Development

315 Introduction to Programming


Automotive ECU Development

316 Software Development

Host System Target System


Automotive ECU Development

317 Algorithm
 An algorithm is a step-by-step
set of rules to be followed in
problem-solving operations

 e.g. Flowchart for finding the


largest of three numbers A, B
and C
Automotive ECU Development

318 SW Programming
 Is a process that leads from an original formulation of
a computing problem to executable computer programs
Automotive ECU Development

319 Binary Number System


 Computers “understand” only 0 and 1

 By the use of different combinations of 0 and 1 numeric


values can be represented
 Simple and efficient at detecting an electrical signal's OFF or ON
state
 Binary is the most efficient way to control logic circuits
Automotive ECU Development

320 From Source Code to Executable Program

(1) (2)

(2)

(1) Editor – source code or (3)


file (e.g. „.c“)
(2) Compile & Assembly –
object code or file („.obj“)
(3) Linker – executable
code or file („.exe“)
(4) Loader - executable
code is loaded into
memory & ready for (4)
execution
Automotive ECU Development

321 From Source Code to Executable Program


Automotive ECU Development

322 Header Files


 A header file (also called library) is
a file with extension .h, which
contains C function declarations
and macro definitions

 Preprocessor allows a program to


include source code from another
file by using the #include directive

 Including a header file is equal to


copying the content of the header
file to the program

 Syntax:
Automotive ECU Development

323 Data Types


 a variable is a way of naming and
storing a value for later use by the
program
 declaring a variable means defining its
type
 they can be defined by setting the
variable equal to the desired value
 because the flash memory in
embedded applications is limited
(microcontrollers, e.g. Arduino), we Variable declaration

need to consider the size of numbers


we wish to store in choosing variable
types
Automotive ECU Development

324 Data Types – number storage


Common variable types:
 int
 integers are the primary data-type for
number storage
 int stores a 16 bit (2 byte) value
 this yields a range of -32,768 to
32,767 (minimum value of -2^15 and
a maximum value of (2^15 – 1)) Integer variable declaration

 unsigned int
 same as int → stores a 2 byte value
 only store positive values, yielding
a useful range of 0 to 65,535 ((2^16) Unsigned int variable declaration

- 1)
Automotive ECU Development

325 Data Types – number storage Integer alternatives:


8-bit: int8_t uint8_t
Common variable types: 16-bit: int16_t uint16_t
32-bit: int32_t uint32_t
 long
 long variables are extended size
variables for number storage
 store 32 bits (4 bytes), from
-2,147,483,648 to 2,147,483,647 Long variable declaration

 byte
 stores an 8-bit unsigned number, from 0
to 255 Byte variable declaration

char
 a data type that takes up 1 byte of
memory and stores a character value
 character literals are written in single
quotes like ’A’ Storing characters
Automotive ECU Development

326 Data Types – number storage


Common types of variables:
 float, double, long double
 Data type for floating (point) numbers - number that has a
decimal point
Automotive ECU Development

327 Arrays
 an array is a collection of variables which share the
same data type

 e.g. declare an array that can store 10 integer values

 array elements are stored sequentially in memory


Automotive ECU Development

328 Arrays
 rules for declaring an array:
 data type can be any valid data type such as int, float, char, …
 name of an array must follow naming rules of variables
 size of the array must be zero or a constant positive integer

 we can access an element of the array by using the array name


followed by the element subscript enclosed in square brackets
Automotive ECU Development

329 String
 is a sequence of characters (char)
 a string can be defined as an array of characters, which is terminated
by a null byte ('\0') - e.g. declare a string with a length of 50 characters

 string literals are words surrounded by double quotation marks

 Example: initializing string variables


Automotive ECU Development

330 Operators
Logical operators:
 an expression containing
a logical operator returns
either 0 or 1, depending
on whether the
expression is true or
false (boolean
operators)
 logical operators are
commonly used in
programming in
decision making
Automotive ECU Development

331 Operators
Examples with logical operators:

Task: limit input distance to a range between 4 & 20 cm


Solution: logical AND (&&) operator
if (distance >= 4) && (distance <= 20)

Task: switch traffic light if distance to incoming object is less


than 10 m or if button is pressed
Solution: logical OR (||) operator
if (distance < 10) || (button == pressed)

Distance
Button input
sensor input
Automotive ECU Development

332 Operators
Arithmetic operators:
 C supports common
arithmetic operators such
as +, -, *, / and modulus
operator %
 modulus operator (%)
returns the remainder of
integer division calculation
Automotive ECU Development

333 Operators
Relational operators:
 two expressions can be compared using relational and equality
operators
 the result of such an operation is either true or false (1 or 0)
 relational operators are crucial for control structures, since each loop
and if-statement must check whether a condition is fulfilled in order to
enter the control structure body
Automotive ECU Development

334 Comments
 a comment is a set of characters that is used to document the code to
make the code easier to understand and maintain in the future
 it starts with a combination of a forward slash and an asterisk (/*)
and ends with (*/) or double forward slash (//) for inline comment
 all comments in the program are ignored by the compiler
Automotive ECU Development

335 Control Structures


 control structures allow us to
control the execution sequence
of a program and decide which
path a program should take
(control flow)

Conditional constructs
 if - statement
 switch/case – statement
Loops
 count-controlled (for)
 condition-controlled (while)
Automotive ECU Development

336 If Statements
 the if statement allows to control the flow of our program, letting it make decisions on
what code to execute
 mostly used in conjunction with a comparison operator (==, !=, <, >,
>=, <= )

 to have more than one statement execute after an if statement that evaluates to true, use
braces

.
Automotive ECU Development

337 If Statements
 the else statement effectively says that any code after it (whether a single line or
code between brackets) will be executed if the if statement is FALSE

 another use of else is when there are multiple conditional statements that may all
evaluate to true, yet we want only one if statement's body to execute
 for that we can use the else if statement following an if statement and its body
Automotive ECU Development

338 Switch / Case Statement


 specifies different code that should be executed in different
conditions
 compares the value of a variable with the values specified in the case statements
 the switch/case statement is used to control very complex conditional and branching
operations
Automotive ECU Development

339 For Loop


 repeats a block of statements enclosed in curly braces
 often used when the number of iterations is predetermined (if not predetermined we use the
while loop)
 syntax of the for loop:

 three expressions separated by semicolons in the control block of the for loop:
 initialization_expression - expression executes when the loop first
starts. It is typically used to initialize a loop counter variable
 loop_condition - expression is evaluated at the beginning of each iteration. The execution of the
loop continues until the loop_condition evaluates to false
 increment_expression - expression is evaluated at the end of each iteration. It is used to increase
or decrease the loop counter variable
Automotive ECU Development

340 For Loop


 Example: The following example demonstrates how to use the for loop to display numbers
from 0 to 4

 we can put a for loop inside another for loop -


this is called a nested for loop
for loop flowchart
Automotive ECU Development

341 While Loop


 while loop is used when we want to execute a block of code
repeatedly with a checked condition before making an
iteration
 syntax of while loop:

 the while loop executes as long as the given


logical expression evaluates to true
 when expression evaluates to false, the loop stops
 the expression is checked at the beginning of each iteration

 it is necessary to update the loop condition inside


the loop body to avoid an infinite loop while loop flowchart
Automotive ECU Development

342 While Loop

 if we want to check the condition after each iteration, we need to use


the do while loop statement
Automotive ECU Development

343 Input and Output


 Input means to feed some data into a program and can be given in the
form of a file or from the command line (keyboard)
 Output means to display some data on the screen, printer or in any file
 C provides several built-in library functions to perform input
and output tasks
 Two commonly used functions for I/O (Input/Output) are printf() and
scanf()
 The scanf() function reads formatted input from standard input
(keyboard), whereas the printf() function sends formatted output to
the standard output (screen)
Automotive ECU Development

344 Input and Output

Integer: %d
Char: %c
Float. %f
Unsigned integer: %u

Inside the quotation of


printf() function, there is
a format string „%d“. If
the format string
matches the argument
(testInteger), it is
displayed on the screen.
Automotive ECU Development

345 Input and Output

 The scanf() function reads


formatted input from the
keyboard. When user
enters an integer, it is
stored in variable
testInteger

 “&” sign before


testInteger gets the
address of testInteger and
the value is stored in that
address
Automotive ECU Development

SCIENCE
PASSION
TECHNOLOGY

Automotive ECU Development


Sensor-, Actuator- and Electric Motor
Technologies
Lecturer:
Dr. Alexander Kreis – [email protected]
Alexander Fragner – [email protected]

January & February, 2024

You might also like