A Historical Perspective and Review
A Historical Perspective and Review
∗
perspective and review
1 2
Nicolas Navet , Françoise Simonot-Lion
Abstract
1
Contents
3 Automotive middleware 29
3.1 Objectives of an embedded middleware . . . . . . . . . . 29
3.2 Former propositions of middleware . . . . . . . . . . . . 31
3.3 AUTOSAR - a standard for the automotive industry . . 32
3.3.1 The reference model . . . . . . . . . . . . . . . . 32
3.3.2 The communication services . . . . . . . . . . . . 33
3.3.3 The end-to-end communication protection library 37
2
1 Automotive communication systems: character-
istics and constraints
In the early days of automotive electronics, each new function was imple-
mented as a stand-alone Electronic Control Unit (ECU), which is a subsys-
tem composed of a micro-controller and a set of sensors and actuators. This
approach quickly proved to be insucient with the need for functions to be
distributed over several ECUs and the need for information exchanges among
functions. For example, the vehicle speed estimated by the engine controller
or by wheel rotation sensors, has to be known in order to adapt the steering
eort, to control the suspension or simply to choose the right wiping speed.
In today's luxury cars, up to 2500 signals (i.e., elementary information such
as the speed of the vehicle) are exchanged by up to 70 ECUs [1]. Until
the beginning of the 90s, data was exchanged through point-to-point links
between ECUs. However this strategy, which required an amount of com-
munication channels of the order of n2 where n is the number of ECUs ( i.e.,
if each node is interconnected with all the others, the number of links grows
in the square of n), was unable to cope with the increasing use of ECUs due
to the problems of weight, cost, complexity and reliability induced by the
wires and the connectors. These issues motivated the use of networks where
the communications are multiplexed over a shared medium, which conse-
3
quently required dening rules - protocols - for managing communications
and, in particular, for granting bus access. It was mentioned in a 1998 press
release (quoted in [45]) that the replacement of a wiring harness with LANs
in the four doors of a BMW reduced the weight by 15 kilograms. In the
mid-1980s, the third part supplier Robert Bosch developed Controller Area
Network (CAN) which was rst integrated in Mercedes production cars in
the early 1990s. CAN has become today the most widely used network in
automotive systems, and already in 2004 the number of CAN nodes sold per
year was estimated [38] to be around 400 millions (all application elds).
Other communication networks, providing dierent services, are now being
integrated in automotive applications. A description of the major networks
is given in section 2.
The main function of the powertrain domain is controlling the engine. This
domain is increasingly constrained by stringent regulations, such as EURO
5 in force at the time of writing in Europe, for the protection of environment
(e.g., emissions of particulate matter) and energy eciency. The powertrain
function is realized through several complex control laws with sampling pe-
riods of a magnitude of some milliseconds (due to the rotation speed of the
engine) and implemented in micro-controllers with high computing power. In
order to cope with the diversity of critical tasks to be treated, multi-tasking is
required and stringent time constraints are imposed on the scheduling of the
tasks (see [58] for typical automotive scheduling solutions). Furthermore,
frequent data exchanges with other car domains, such as the chassis (e.g.
ESP, ABS) and the body (e.g. dashboard, climate control), are required.
4
The chassis domain gathers functions such as ABS, ESP, ASC (Automatic
Stability Control), 4WD (4 Wheel Drive), which control the chassis com-
ponents according to steering/braking solicitations and driving conditions
(ground surface, wind, etc). Communication requirements for this domain
are quite similar to those for the powertrain but, because they have a stronger
impact on the vehicle's stability, agility and dynamics, the chassis functions
are more critical from a safety standpoint. Furthermore, the X-by-Wire
technology, currently used for avionic systems, is now slowly being intro-
duced to execute steering or braking functions. X-by-Wire is a generic term
referring to the replacement of mechanical or hydraulic systems by fully
electrical/electronic ones, which led and still leads to new design methods
for developing them safely [100] and, in particular, for mastering the inter-
ferences between functions [4]. Chassis and powertrain functions operate
mainly as closed-loop control systems and their implementation is moving
towards a time-triggered approach [82, 44, 76, 72], which facilitates com-
posability (i.e. ability to integrate individually developed components) and
deterministic real-time behavior of the system.
Dashboard, wipers, lights, doors, windows, seats, mirrors, climate control are
increasingly controlled by software-based systems that make up the body
domain. This domain is characterized by numerous functions that necessi-
tate many exchanges of small pieces of information among themselves. Not
all nodes require a large bandwidth, such as the one oered by CAN; this
lead to the design of low-cost networks, such as LIN (see section 2), or more
recently, PSI5 and SENT. On LIN, only one node, termed the master, pos-
sesses an accurate clock and drives the communication by polling the other
nodes - the slaves - periodically. The mixture of dierent communication
needs inside the body domain leads to a hierarchical network architecture
where integrated mechatronic sub-systems based on low-cost networks are
interconnected through a CAN backbone. The activation of body functions
is mainly triggered by the driver and passengers' solicitations (e.g. opening
a window, locking doors, etc).
Electronic-based systems for ensuring the safety of the occupants are in-
5
creasingly embedded in vehicles. Examples of such systems are: impact and
roll-over sensors, deployment of airbags and belt pretensioners, tyre pressure
monitoring, Adaptive Cruise Control (or ACC - the car's speed is adjusted
to maintain a safe distance with the car ahead), lane departure warning sys-
tem, collision avoidance, driver intent and driver drowsiness detection, night
vision assistance. These functions form an emerging domain usually referred
to as active and passive safety.
6
thus, it is easy to check whether the timing constraints expressed on data
exchanges are met. Another interesting property of time-triggered protocols
is that missing messages are immediately identied; this can serve to detect,
in a short and bounded amount of time, nodes that are presumably no longer
operational. The rst downside is the ineciency in terms of network uti-
lization and response times by comparison with the transmission of aperiodic
messages (i.e. messages that are not transmitted in a periodic manner). A
second drawback of time-triggered protocols is the lack of exibility even if
dierent schedules (corresponding to dierent functioning modes of the appli-
cation) can be dened and switching from one mode to another is possible at
run-time. Finally, the unplanned addition of a new transmitting node on the
network induces changes in the message schedule and, thus, may necessitate
the update of all other nodes. TTP/C [95] is a purely time-triggered network
but there are networks, such as TTCAN [37], FTT-CAN [18], FlexRay [11]
or TTEthernet [94], that can support a combination of both time-triggered
and event-triggered transmissions. This capability to convey both types of
trac ts in well with the automotive context since data for control loops
as well as alarms and events have to be transmitted.
1
For instance, in [4], the average bandwidth needed for the engine and the chassis
control was estimated to reach 1500kbit/s in 2008 while it was 765kbit/s in 2004 and
122kbit/s in 1994.
2
Dependability is usually dened as the ability to deliver a service that can justiably
be trusted, see [3] for more details.
7
networks (speed of 125Kbit/s to 1Mbit/s) or class D networks
3 (speed over
1Mb/s). Class C networks, such as high-speed CAN [35], are used for the
powertrain and currently for the chassis domains, while class D networks
are devoted to multimedia data (e.g., MOST [59]) and safety critical ap-
plications that need predictability and fault-tolerance (e.g., TTP/C [95] or
FlexRay [11] networks) or serve as gateways between sub-systems (see the
use of FlexRay at BMW in [85] and [39]).
3
Class D is not formally dened but it is generally considered that networks over 1Mb/s
belong to class D. This SAE classication is outdated today but was often refered to in
the past.
8
underlying communication architecture has to provide a strong and guaran-
teed temporal quality of service. Another driver for increasing data streams
are of course infotainment systems, consider for example a rear-set video
system in HD quality.
This lead to the introduction of two main strategies to achieve better energy
eciency: ECU degradation and partial networking. ECU degradation is
the ability to switch o or reduce the execution rate of software modules,
shutdown some I/O ports, or even put a complete CPU into idle mode. These
low-power features are already supported in AUTOSAR. Partial networking
means putting temporarily into sleep mode a group of nodes, or some entire
network, when they do not need to be operational. For example, a parking
assistance system that cannot be used above 20km/h can be deactivated
at higher speeds. Many control modules in the body of the vehicle (seats,
mirror, door, etc) can remain in sleep mode most of the time [8]. Then, the
nodes are waken up when needed through specic messages. Audi estimates
for instance that the potential savings of partial networking would be around
2.6g CO2/km [97, 8].
The last issue to be dealt with is the security of communication, and more
generally security of the embedded systems. If safety has always been a
matter of concern for automotive embedded systems, security issues have
9
been in our view largely overlooked. The need for more security is driven
by the ever increasing connectivity between the car and the external world,
which includes not only telematics services and internet access, but also
upcoming vehicle-to-vehicle or vehicle-to-infrastructure communication.
10
2.1 The CAN network
To ensure at run-time the freshness
4 of the exchanged data and the timely
CAN (Controller Area Network) is without a doubt the most widely used
in-vehicle network. It was designed by Bosch in the mid 80's for multiplexing
communication between ECUs in vehicles and thus for decreasing the overall
wire harness: length of wires and number of dedicated wires (e.g. the number
of wires has been reduced by 40%, from 635 to 370, in the Peugeot 307 that
embeds two CAN buses with regard to the non-multiplexed Peugeot 306 [52]).
Furthermore, it allows to share sensors among ECUs.
CAN on a twisted pair of copper wires became an ISO standard in 1994 [33,
35] and is now a de-facto standard in Europe for data transmission in au-
tomotive applications, due to its low cost, its robustness and the bounded
communication delays (see [38]). In today's car, CAN is used as an SAE
class C network for real-time control in the powertrain and chassis domains
(at 250 or 500KBit/s), but it also serves as an SAE class B network for the
electronics in the body domain, usually at a data rate of 125Kbit/s.
4
The freshness property is veried if data has been produced recently enough to be
safely consumed: the dierence between the time when the data is used and its production
time must be always smaller than a specied value. The delay experienced by a data is
made up of the network latency, plus the latencies on the sending and receiving ends which
can be large especially if the application tasks are not synchronized with the transmissions
on the network (see [25]).
11
only CAN 2.0A is used since it provides a sucient number of identiers
(i.e. the number of distinct frames exchanged over one CAN network is
lower than 211 ).
CAN uses Non-Return-to-Zero (NRZ) bit representation with a bit stung
of length 5. In order not to lose the bit time (i.e., the time between the
emission of two successive bits of the same frame), stations need to resyn-
chronize periodically and this procedure requires edges on the signal. Bit
stung is an encoding method that enables resynchronization when using
Non-Return-to-Zero (NRZ) bit representation where the signal level on the
bus can remain constant over a longer period of time (e.g. transmission of
'000000..'). Edges are inserted into the outgoing bit stream in such a way
to avoid the transmission of more than a maximum number of consecutive
equal-level bits (5 for CAN). The receiver will apply the inverse procedure
and de-stu the frame. CAN requires the physical layer to implement the
logical and operator: if at least one node is transmitting the 0 bit level
on the bus, then the bus is in that state regardless if other nodes have trans-
mitted the 1 bit level. For this reason, 0 is termed the dominant bit value
while 1 is the recessive bit value.
The standard CAN data frame (CAN 2.0A, see Figure 1) can contain up
to 8 bytes of data for an overall size of, at most, 135bits, including all the
protocol overheads such as the stu bits. The sections of the frames are:
the header eld (see Figure 2), which contains the identier of the
frame, the Remote Transmission Request bit that distinguishes be-
tween data frame (RTR set to 0) and data request frame (RTR set to
1) and the Data Length Code (DLC) used to inform of the number of
bytes of the data eld,
the 15 bit Cyclic Redundancy Check (CRC) eld which ensures the
integrity of the data transmitted,
the End-of-Frame (EOF) eld and the intermission frame space which
is the minimum number of bits separating consecutive messages.
Any CAN node may start a transmission when the bus is idle. Possible
conicts are resolved by a priority-based arbitration process, which is said
non-destructive in the sense that, in case of simultaneous transmissions, the
highest priority frame will be sent despite the contention with lower priority
frames. The arbitration is determined by the arbitration elds (identier plus
12
SOF : Start Of Frame
EOF : End Of Frame
Ack : Acknowledgement
Inter : Intermission
0 : data frame
1 : request frame
Identifier DLC
1
R
0 or 1 T 0 or 1
R
0
11 bits 3 bits 4 bits
Figure 2: Format of the header eld of the CAN 2.0A data frame
CAN arbitration procedure relies on the fact that a sending node monitors
the bus while transmitting. The signal must be able to propagate to the most
remote node and return back before the bit value is decided. This requires
the bit time to be at least twice as long as the propagation delay which limits
the data rate: for instance, 1Mbit/s is feasible on a 40 meter bus at maximum
while 250Kbit/s can be achieved over 250 meters. To alleviate the data rate
limit, and extend the lifespan of CAN further, car manufacturers are starting
to optimize the bandwidth usage by implementing trac shaping strategies
that are very benecial in terms of response times (see, for instance, [24]).
CAN has several mechanisms for error detection. For instance, it is checked
that the CRC transmitted in the frame is identical to the CRC computed
at the receiver end, that the structure of the frame is valid and that no bit-
stung error occurred. Each station which detects an error sends an "error
ag" which is a particular type of frame composed of 6 consecutive dominant
bits that allows all the stations on the bus to be aware of the transmission
error. The corrupted frame automatically re-enters into the next arbitration
13
SOF
arbitration field
Node 1 1 1 0 0 1 0 0 0 0 0 0
Node 2 1 1 0 1 1 0 0 0 0 0 0
Bus 1 1 0 0 1 0 0 0 0 0 0
Level
t
the
arbitration
phase
starts only node
1 remains
Figure 3: CAN arbitration phase with two nodes starting transmitting si-
multaneously. Node 2 detects that a frame with a higher priority than its
own is being transmitted when it monitors a level 0 (i.e. dominant level) on
the bus while it has sent a bit with a level 1 (i.e. recessive level). Afterwards,
Node 2 immediately stops transmitting.
phase, which might lead it to miss its deadline due to the additional delay.
The error recovery time, dened as the time from detecting an error until
the possible start of a new frame, is 17 to 31 bit times. CAN possesses some
fault-connement mechanisms aimed at identifying permanent failures due
to hardware dysfunctioning at the level of the micro-controller, communica-
tion controller or physical layer. The scheme is based on error counters that
are increased and decreased according to particular events (e.g., successful
reception of a frame, reception of a corrupted frame, etc.). The relevance
of the algorithms involved is questionable (see [22]) but the main limitation
is that a node has to diagnose itself, which can lead to the non-detection
of some critical errors. For instance, a faulty oscillator can cause a node
to transmit continuously a dominant bit, which is one manifestation of the
babbling idiot fault, see [74]. Furthermore, other faults such as the parti-
tioning of the network into several sub-networks may prevent all nodes from
communicating due to bad signal reection at the extremities. Without ad-
ditional fault-tolerance facilities, CAN is not well suited for safety-critical
applications. For instance, a single node can perturb the functioning of the
whole network by sending messages outside their specication ( i.e. length
and period of the frames). Many mechanisms were proposed for increasing
the dependability of CAN-based networks (see [74] for an excellent survey),
but if each proposal solves a particular problem, they have not necessar-
ily been conceived to be combined. Furthermore, the fault-hypotheses used
14
in the design of theses mechanisms are not necessarily the same and the
interactions between them remain to be studied in a formal way.
The CAN standard only denes the physical layer and Data Link layer
(DLL). Several higher level protocols have been proposed, for instance, for
standardizing startup procedures, implementing data segmentation or send-
ing periodic messages (see OSEK/VDX and AUTOSAR in 3). Other higher-
level protocols standardize the content of messages in order to ease the inter-
operability between ECUs. This is the case for J1939 which is widely used,
for instance, in Scania's trucks and buses [99].
15
an overlap between the data sent on the buses connected to a gateway, which
induces a signicant waste a bandwidth. To face the EE architecture com-
plexity, and be able to push the limits of CAN, car makers have established
rigorous development processes. Besides, there are now several well-suited
COTS toolsets available on the market to help them with the optimization
and verication using simulation (possibly with fault-injection), schedulabil-
ity analysis and trace analysis (see [64] for the use of RealTime-at-Work's
tools).
Optimizing CAN networks. When CAN was introduced, the bus load
levels were limited, typically much less than 30% (see [65] for a typical set of
messages of the years 1995-2000). Optimizing CAN networks, which includes
reaching higher load levels, has now become an industrial requirement for
several reasons:
It may avoid the industrial risk, the costs and the time to master new
technologies such as FlexRay,
The rst obvious way to optimize a CAN network is to keep the amount
of data transmitted to a minimum, specically limit the transmission fre-
quency of the frames. This requires a rigorous identication and traceability
of the temporal constraints. Given a set of signals or frames, and their as-
sociated temporal constraints (freshness, jitters, etc), they are in addition a
few conguration strategies than can be used:
2. Reassign the priorities of the frames, so that the priority order better
reects the timing constraints,
16
4. Optimize the ECU communication stacks so as to remove all imple-
mentation choices that cause a departure from the ideal CAN behavior
(see [64]).
However, because there is less margin for error, using complex CAN-based
architectures at high load levels involves more detailed supplier specications
on the one hand, and, on the other hand, to spend more time and eort in
the integration/validation phase.
The J1850 [89] is an SAE class B priority bus that was adopted in the USA
for communications with non-stringent real-time requirements, such as the
control of body electronics or diagnostics. Two variants of the J1850 are
dened: a 10.4Kbit/s single-wire version and 41.6Kbit/s two-wire version.
For quite a long time, the trend in new designs seems to be the replacement
of J1850 by CAN or a low-cost network such as LIN (see 2.3.1).
In the 90s, another competing technology was the French Vehicle Area Net-
work (VAN, see [34]) which is very similar to CAN (e.g., frame format, data
rate) but possesses some additional or dierent features that are advanta-
geous from a technical point of view (e.g., no need for bit-stung, in-frame
response: a node being asked for data answers in the same frame that con-
tained the request). VAN was used for years in production cars by the French
carmaker PSA Peugeot-Citroën in the body domain (e.g, for the 206 model)
but, as it was not adopted by the market, it was abandoned in favor of CAN.
CAN FD is a new protocol that was presented for the rst time by Robert
Bosch GmbH at the International CAN Conference in 2012 [30] that com-
bines CAN's core features with a higher data rate and larger data payloads.
The data eld length can be up to 64 bytes long: from 0 to 8 bytes, then above
8 bytes, the possible values are 12, 16, 20, 24, 32, 48 and 64 bytes. Techni-
cally, two bit rates are used successively in the transmission of a CAN FD
frame: one lower for the arbitration phase, as required by the CAN bitwise
arbitration (see 2.2.2), and a higher one used immediately after the arbi-
tration for the transfer of the data payload and related elds (e.g., DLC,
CRC). The bit rate for this data part of the frame transmission can be freely
chosen (e.g., 10MBit/s are mentioned in [30]) but in practice it will depend
much on the topology of the network and the eciency of the transceivers.
It is not clear at the time of writing what is the kind of data rate, and thus
the speedup with regard to standard CAN, that can be achieved in typical
automotive applications and this will largely determine the acceptance of
17
CAN FD. The target mentioned in [30] is an average data rate of 2.5MBit/s
with existing CAN transceivers.
Four main use-cases are identied for CAN FD in [49]: faster software down-
load (end-of-production line or maintenance), avoiding segmentation of long
messages (and possibly securing normal CAN messages with message authen-
tication information), oering higher-bandwidth to car domains requiring it
(e.g., powertrain [49]), and enabling faster communication on long CAN
buses (e.g., in trucks and buses). An important advantage of CAN FD is
that there is an easy migration path from CAN systems to CAN FD systems
since existing CAN application software can basically remains unchanged,
the changes taking place in the communication layers and their congura-
tion. Following FPGA's implementations, microcontrollers with CAN FD
are already available (e.g., [20]) and the protocol has been submitted as ISO
11898-7 for international standardization.
18
2.2.1 The FlexRay Protocol
The FlexRay network is very exible with regard to topology and transmis-
sion support redundancy. It can be congured as a bus, a star or multi-star.
It is not mandatory that each station possesses replicated channels nor a bus
guardian. At the MAC level, FlexRay denes a communication cycle as the
concatenation of a time-triggered (or static) window and an event triggered
(or dynamic) window. In each communication window, size of which is set
statically at design time, two distinct protocols are applied. The communi-
cation cycles are executed periodically. The time-triggered window uses a
TDMA MAC protocol; the main dierence with TTP/C is that a station in
FlexRay might possess several slots in the time-triggered window, but the
size of all the slots is identical (see Figure 4). In the event-triggered part of
the communication cycle, the protocol is FTDMA (Flexible Time Division
Multiple Access): the time is divided into so-called mini-slots, each station
possesses
5 a given number of mini-slots (not necessarily consecutive) and it
can start the transmission of a frame inside each of its own mini-slots. A
mini-slot remains idle if the station has nothing to transmit which actually
induces a loss of bandwidth (see [10] for a discussion on that topic). An
example of a dynamic window is shown in Figure 5: on channel B, frames
have been transmitted in mini-slots n n+2
and while mini-slot n+1 has
not been used. It is noteworthy that frame n + 4 is not received simultane-
ously on channels A and B since, in the dynamic window, transmissions are
independent in both channels.
The FlexRay MAC protocol is more exible than the TTP/C MAC since in
the static window nodes are assigned as many slots as necessary (up to 2047
overall) and since the frames are only transmitted if necessary in the dynamic
part of the communication cycle. In a similar way as with TTP/C, the struc-
ture of the communication cycle is statically stored in the nodes, however,
unlike TTP/C, mode changes with a dierent communication schedule for
5
Dierent nodes can send frames in the same slot but in dierent cycles, this is called
slot multiplexing and it is only possible only in the dynamic segment.
19
TDMA FTDMA
Static Window Dynamic Window
MiniSlot
Slot Counter
The FlexRay frame consists of 3 parts : the header, the payload segment
containing up to 254 bytes of data and the CRC of 24 bits. The header
of 5 bytes includes the identier of the frame and the length of the data
payload. The use of identiers allows to move a software component, which
sends a frame X, from one ECU to another ECU without changing anything
in the nodes that consume frame X. It has to be noted that this is no more
possible when signals produced by distinct components are packed into the
same frame for the purpose of saving bandwidth (i.e., which is refer to as
frame-packing or PDU-multiplexing - see [83] for this problem addressed on
CAN).
From the dependability point of view, the FlexRay standard solely species
a bus guardian (optional), passive and active star coupler (optional) and the
clock synchronization algorithms. Other features, such as mode management
facilities or a membership service, will have to be implemented in software
or hardware layers on top of FlexRay (see, for instance, [5] for a membership
service protocol that could be used along with FlexRay). This will allow
to conceive and implement exactly the services that are needed with the
drawback that correct and ecient implementations might be more dicult
to achieve in a layer above the communication controller.
20
links with single and dual transmission supports on the same network, sub-
networks of nodes without bus-guardians or with dierent fault-tolerance
capability with regards to clock synchronization, etc. In the automotive
context where critical and non-critical functions co-exist and interoperate,
this exibility can prove to be ecient in terms of cost and re-use of existing
components. The reader interested in more information about FlexRay can
refer to [86, 11], and to [77, 25, 103] for how to congure the communication
cycle.
21
CAN standard
TDMA
arbitration
Basic Cycle
Both LIN and TTP/A are master/slave networks where a single master node,
the only node that has to possess a precise and stable time base, coordinates
the communication on the bus: a slave is only allowed to send a message when
it is polled. More precisely, the dialogue begins with the transmission by the
master of a command frame that contains the identier of the message
whose transmission is requested. The command frame is then followed by a
data frame that contains the requested message sent by one of the slaves
or by the master itself (i.e., the message can be produced by the master).
This paragraph also presents the SENT and PSI5 networks which are other
more recent low-cost alternatives to CAN.
22
Frame slot
Frame
Inter-
Response frame
Header space Response space
...
Figure 7: Format of the LIN frame. A frame is transmitted during its frame
slot which corresponds to an entry of the schedule table
LIN (Local Interconnect Network, see [48, 79]) is a low cost serial commu-
nication system used as SAE class A network, where the needs in terms
of communication do not require the implementation of higher-bandwidth
multiplexing networks such as CAN. LIN is developed by a set of major
companies from the automotive industry (e.g., Daimler, Volkswagen, BMW
and Volvo) and is widely used in production cars.
The LIN specication package (LIN version 2.2A [48]) includes not only the
specication of the transmission protocol (physical and data link layers) for
master-slave communications but also the specication of a diagnostic proto-
col on top of the data link layer. A language for describing the capability of a
node (e.g., bit-rates that can be used, characteristics of the frames published
and subscribed by the node, etc.) and for describing the whole network is
provided (e.g., nodes on the network, table of the transmissions' schedule,
etc.). These description language facilitates the automatic generation of the
network conguration by software tools.
A LIN cluster consists of one master node and several slave nodes con-
nected to a common bus. For achieving a low-cost implementation, the
physical layer is dened as a single wire with a data rate limited to 20Kbit/s
due to EMI limitations. The master node decides when and which frame
shall be transmitted according to the schedule table. The schedule table is
a key element in LIN; it contains the list of frames that are to be sent and
their associated frame-slots thus ensuring determinism in the transmission
order. At the moment a frame is scheduled for transmission, the master
sends a header (a kind of transmission request or command frame) inviting
a slave node to send its data in response. Any node interested can read a
data frame transmitted on the bus. As in CAN, each message has to be
identied: 64 distinct message identiers are available. Figure 7 depicts the
LIN frame format and the time period, termed a frame slot, during which
a frame is transmitted.
The header of the frame that contains an identier is broadcast by the master
23
node and the slave node that possesses this identier inserts the data in the
response eld. The break symbol is used to signal the beginning of a frame.
It contains at least 13 dominant bits (logical value 0) followed by one recessive
bit (logical value 1) as a break delimiter. The rest of the frame is made of
byte elds delimited by one start bit (value 0) and one stop bit (value 1),
thus resulting in a 10-bit stream per byte. The sync byte has a xed value
(which corresponds to a bit stream of alternatively 0 and 1), it allows slave
nodes to detect the beginning of a new frame and be synchronized at the
start of the identier eld. The so-called protected identier is composed
of two sub-elds: the rst 6 bits are used to encode the identier and the
last two bits, the identier parity. The data eld can contain up to 8 bytes
of data. A checksum is calculated over the protected identier and the data
eld. Parity bits and checksum enable the receiver of a frame to detect bits
that have been inverted during transmission.
It is also worth noting that LIN oers services to send nodes into a sleep mode
(through a special diagnostic frame termed go-to-sleep-command) and to
wake them up, which is convenient since optimizing energy consumption,
24
especially when the engine is not running, is a real matter of concern in the
automotive context.
25
automotive cameras, is LVDS (Low-Voltage Dierential Signaling) which en-
ables communication at 655Mbit/s and above [54] over twisted pair copper
cables. In the near future, it is very likely that Ethernet-based networks,
probably compliant with the IEEE 802.1 AVB QoS standard (see 2.5.3),
will be used to transport the high data volumes needed by multimedia and
infotainment applications [28, 91].
The third revision of MOST [59] has introduced the support of a channel that
can transport standard Ethernet frames and is thus well suited to transmit
IP trac. These features, along with the higher bandwidth provided by
MOST150 introduced in 2007, are already taken advantage of in some new
vehicle projects [46] to provide access to internet services and web browsing,
and independent access to audio and video sources from all seats with a single
bus. In [41], the MOST consortium announces its intention to develop a next
generation of the protocol, with a target bandwidth of 5Gbit/s, that would
be suited as well for ADAS requiring the transmission of uncompressed video
streams, competing thus with automotive Ethernet solutions.
26
Automotive was at some time considered a serious competitor for MOST
technology but, despite a few early implementations at Renault and Nis-
san, as far as we know the protocol did not reach wide acceptance in the
automotive market.
The rst motivation for Ethernet is that it is a low-cost and mature technol-
ogy that oers much more bandwidth that what is available today, which is
of interest for infotainment and active safety especially [29]. From the user
perspective, as well as from an economic point of view, the re-use of non
automotive-specic networking technologies such as Ethernet can be bene-
cial. However, automotive specic requirements must be taken into account:
e.g., the need for partial networking and power over Ethernet to reduce the
wiring, provision of specic QoS, robustness to severe environmental condi-
tions (e.g., EMI, heat, etc).
In [29], the authors describe a plausible roadmap for the use of Ethernet.
First generation Ethernet network, based on 100BASE-TX physical layer,
will be for diagnostics (using ISO 13400 standard) and code upload (as al-
ready done since 2008, see [39]). The second generation Ethernet network,
from 2015 onwards, will support infotainment and camera-based ADAS us-
ing Ethernet AVB (see 2.5.3) and BroadR-Reach physical layer (see 2.5.2).
At the third stage, from 2020 onwards, gigabit Ethernet should become the
backbone interconnecting most other networks, and replacing thus today's
gateways (see section 4). This communication architecture will benet from
the ability of Ethernet switches to handle ports having dierent speeds. The
backbone will have to support various kinds of trac with dierent QoS re-
quirements, and thus require QoS policies that may be oered, according to
the authors of [29], by a second generation of AVB protocols. A new physi-
cal layer derived from today's 100Mbit/s BroadR-Reach will be needed, and
Time-Triggered transmissions would be available.
27
2.5.2 BroadR-Reach physical layer
Experiments in [91] suggest that AVB would be an excellent option for in-
car multimedia streams, with the advantage that it enables to dynamically
register data ows and can be used with higher level protocols for handling
audio/video streams such as IEEE 1733. To the best of our knowledge, there
is not clear cut answer yet about the suitability of the current AVB standard
for the transmission of critical control data. In October 2012, AVnu Alliance
has announced the formation of the AVB Gen2 Council with the aims to
improve AVB functionality in areas such as time-sensitive transmission and
fault tolerance. This new specication is currently in development within
the IEEE (Audio/Video Bridging Task Group).
28
2.5.4 TTEthernet
3 Automotive middleware
29
integration of software components is to implement a middleware layer that
provides application programs with common services and a common inter-
face. In particular, the common interface allows the design of an application
disregarding the hardware platform and the distribution, and therefore en-
ables the designer focusing on the development and the validation of the
software components and the software architecture that realize a function.
30
Note that a more advanced features would be to come up with adaptive com-
munication services, thanks to algorithms that would modify at run-time the
parameters of the communication protocols (e.g., priorities, transmission fre-
quencies, etc.) according to the current requirements of the application (e.g.,
inner-city driving or highway driving) or changing environmental conditions
(e.g., EMI level). For the time being, to the best of our knowledge, such fea-
tures exist in series automotive embedded systems only for low-power modes
(see 1.5, see also [104] for a research work in the direction of more adaptive
communication systems). In fact, this point requires a coordinated approach
for the design of function (as the denition of control law parameters, the
identication of the parameters acting on the robustness of the function,
etc.) and the deployment of the software architecture that implements the
function (specically the communication parameters). By increasing the ef-
ciency and the robustness of the application, such an adaptive strategy
would certainly ease the re-usability.
A rst step to dene a standard for in-car embedded middleware was started
by the OSEK/VDX consortium (http://www.osek-vdx.org). In particular,
two specications are of particular interest in the context of this chapter: the
OSEK/VDX Communication layer [70] and the Fault-Tolerant Communica-
tion layer [68]. The rst one species a communication layer [70] that denes
common software interfaces and common behavior for internal and external
communications between application components. How signals are packed
into a frame is statically dened o-line and the OSEK/VDX Communi-
cation layer automatically realizes the packing / unpacking at run-time as
well as the handling of queued or unqueued messages at the receiver side.
OSEK/VDX Communication runs on top of a transport layer (e.g., [36])
31
that takes care mainly of possible segmentation of frames and it can operate
on any OS compliant with OSEK/VDX OS services for tasks, events and
interrupt management (see [71]).
32
Figure 8: AUTOSAR reference architecture
One of AUTOSAR's main objective is to improve the quality and the re-
liability of embedded systems. By using a well suited abstraction, the ref-
erence model supports the separation between software and hardware, it
eases the mastering of the complexity, allows the portability of application
software components and therefore the exibility for product modication,
upgrade and update, as well as the scalability of solutions within and across
product lines. Besides, AUTOSAR ensures a smooth integration process of
components provided by dierent companies while protecting the industrial
properties of each actor involved. The AUTOSAR reference architecture is
schematically illustrated in gure 8. An important issue is the automatic
generation of an AUTOSAR middleware that has to be done from the basic
software components, generally provided by suppliers, and the specication
of the application itself (description of applicative-level tasks, signals sent or
received, events, alarms, etc.). The challenge is to realize such a generation
so that the deployment of the middleware layer can be optimized for each
ECU.
33
Figure 9: Communication software components and architecture
34
services are of major importance and are thoroughly described in the docu-
ments provided by the AUTOSAR consortium (see gure 9 for an overview
of the dierent modules). The role of these services is crucial for the behav-
ioral and temporal properties of an embedded and distributed application.
So, their design, their generation and conguration have to be precisely mas-
tered and the verication of timing properties becomes an important activity.
The problem is complex because, as for the formerly mentioned middleware,
the objects (e.g., signals, frames, I-PDU, etc.) that are handled by services
at one level are not the same objects that are handled by services at another
level. Nevertheless each object is strongly dependent of one or several ob-
jects handled by services belonging to neighboring levels. The AUTOSAR
standard proposes two communication models:
the implicit mode means that the reading (resp. writing) of data
is automatically done by the middleware before the invocation (resp.
after the end of execution ) of a component consuming (resp. pro-
ducing) the data without any explicit call to AUTOSAR services; this
is away to protect eectively the data between application software
components and middleware services.
35
(the actual transmission of a signal on the network depends only on
the emission rule of the frame that contains the signal). Furthermore,
when specifying a signal, the designer has to indicate if it is a data, an
event or a mode. For data transmission, incoming data are not queued
on the receiver side while for event exchanges, signals are queued on
the receiver side and therefore, for each transmission of the signal, a
new value will be made available to the application. The handling of
buers or queues is done by the RTE.
36
application about its outcome (success or error). In particular, AUTOSAR
COM can inform the application if the transmission of an I-PDU did not
take place before a specied deadline (i.e., deadline monitoring). On the
receiver side, it also noties the application (success or error of a reception)
and supports the ltering mechanism for signals (dispatching each signal of a
received I-PDU to the application or to a gateway). Both at the sending and
receiving end, the endianness conversion is taken in charge. An important
role of the COM component is to pack/unpack signals into/from I-PDU s.
Note that, as the maximal length of an I-PDU depends on the underlying
networks, the design of a COM component has to take into account the net-
works and therefore it is not fully independent of the hardware architecture.
The COM component has also to determine the points in time where to send
the I-PDUs. This is based on the attributes Transmission Mode of an I-PDU
and on the attribute Transfer Property of each signal that it contains.
to attach, on the sender side, specic control data to data that are to
be sent to the RTE,
to verify, on the receiver side, through the control data, the correction
of the data received from the RTE,
to report, when it occurs, that received data are faulty. In this case,
the fault has to be handled by the receiver software components.
37
The E2E library is implemented as a set of functions that can be invoked
at two levels: by application software components (thanks to a wrapping
technique) or from the COM component. These functions are stateless and
have to report synchronously a verdict ( i.e., the success of the exchange or the
detected errors) to their calling component. The end-to-end communication
protection is based on a standardization of mechanisms under the concept
of E2E prole. Each prole can have several variants. So the instantiation
of one prole for a specic information exchange consists in the choice of a
variant and therefore the setting of the corresponding conguration options.
Each prole oers all or a subset of the following data protection mechanisms:
to check if the received data is the one that is expected. This mech-
anism is based on the denition of a data ID that is not transmitted
with the data but that is used in the computation of the CRC,
nally, to verify that the data is sent and/or received on time. Two
mechanisms are provided for this purpose: receiver communication
timeout and sender acknowledgment timeout.
The CRC and the counters are integrated into a E2E header, which is an
additional control eld transmitted along with the data payload. When
a faulty transmission is detected, the error is then reported to the calling
component.
38
the advent of AUTOSAR and FlexRay - until 2010,
One may imagine that the next stage will be when the car will become an IP
node in the world wide web ([28], see also [31]), integrated into global data
infrastructures enabling a more ecient type of collaborative mobility [78]
relying on interactions between users and infrastructure operators.
Over the years, the technologies needed for the interoperability between ap-
plications located on dierent ECUs and sub-networks have been improved.
With AUTOSAR, we are now close to the desirable characteristics listed in
section 3. However, if the traditional partitioning of automotive applications
into several distinct functional domains with their own characteristics and
requirements has proven useful in mastering the complexity, it lead to the
development of several independent sub-systems with their specic architec-
tures, networks and software technologies. Some diculties arise from this
partitioning since more and more cross-domain data exchanges are needed.
The current practice is to transfer data between dierent domains through
a central gateway (see, for example, [39]). This subsystem is recognized as
being critical in the vehicle: it constitutes a single point of failure, its de-
sign is overly complex and ensuring a guaranteed QoS through gateways is
dicult and require a careful design (see, for instance, [90] and [15]). In
the future, the interconnection between vehicle subdomains could be more
eciently ensured by an Ethernet backbone [29], instead of a gateway. This
backbone will have to support various trac with dierent QoS requirements
on the same network, which will require to implement QoS policies such as
bandwidth reservation.
These issues will certainly require more research and development work but
the current state of technological maturity in security, network hardware
components, communication protocols and middleware engineering is such
that in our view everything is at hand to succeed in building safe, secure
and cost-optimized embedded communication architectures for the next car
generations.
References
39
ded World 2004, Nürnberg, February 2004.
[2] AUTOSAR. Specication of SW-C end-to-end communication protec-
tion library, v3.0.0. Available at http://www.autosar.org, 2013.
[8] C. Butzkamm and D. Bollati. Partial Networking for CAN bus sys-
tems: Any saved gram CO2 /km is essential to meet stricter EU regu-
lations. In 13th International CAN Conference (iCC2012), Hambach,
Germany, March 5-6 2012.
40
[14] R. Davis, A. Burns, R.J. Bril, and J.J. Lukkien. Controller Area Net-
work (CAN) schedulability analysis: Refuted, revisited and revised.
Real-Time Systems, 35(3):239272, April 2007.
[15] R. Davis and N. Navet. Trac shaping to reduce jitter in Controller
Area Network (CAN). SIGBED Rev., 9(4):3740, November 2012.
[16] P.H. Dezaux. Migration strategy of in-house automotive real-time
applicative software in AUTOSAR standard. In Proceedings of the
4th European Congress Embedded Real Time Software (ERTS 2008),
Toulouse, France, 2008.
41
tive systems: a major performance boost, pages 14.114.15. CRC
Press/Taylor and Francis, December 2008.
42
[37] International Standard Organization. 11898-4, Road Vehicles - Con-
troller Area Network (CAN) - Part 4: Time-Triggered Communication.
ISO, 2000.
[49] T. Lindenkreuz. CAN FD - CAN with exible data rate. Slides pre-
sented at Vector Congress 2012, May 2012.
43
[50] Z. Lokaj, T. Zelinka, and M. Srotyr. Cooperative systems for car safety
improvement. In ERCIM News, ISSN 0926-4981, number 94, Special
theme on Intelligent Cars, pages 910. ERCIM-EEIG, July 2013.
[53] E. Mayer. Serial bus systems in the automobile - part 5: MOST for
transmission of multimedia data. Summary of Networking Compe-
tence, February 2008. Published by Vector Informatik GmbH.
[54] K. McCrory. Tech tutorial: LVDS oers ecient data transmission for
automotive applications. EETimes, available at http://www.eetimes.
com/, April 2006.
[59] MOST Cooperation. MOST Specication Revision 3.0 E2, July 2010.
Available at http://www.mostcooperation.com.
44
[62] F. Simonot-Lion N. Navet. The Automotive Embedded Systems Hand-
book, chapter A Review of Embedded Automotive Protocols, pages
4.14.31. Industrial Information Technology series. CRC Press/Taylor
and Francis, December 2008.
45
[75] L.M. Pinho and F. Vasques. Reliable real-time communication in CAN
networks. IEEE Transactions on Computers, 52(12):15941607, 2003.
[76] S. Poledna, W. Ettlmayr, and M. Novak. Communication bus for
automotive applications. In Proceedings of the 27th European Solid-
State Circuits Conference, Villach, Austria, September 2001.
[77] T. Pop, P. Pop, P. Eles, and Z. Peng. Bus access optimisation for
FlexRay-based distributed embedded systems. In Proceedings of the
conference on Design, Automation and Test in Europe (DATE '07),
pages 5156, San Jose, CA, USA, 2007.
46
[88] Society of Automotive Engineers. J2056/2 survey of known protocols.
In SAE Handbook, volume 2. SAE, 1994.
[89] Society of Automotive Engineers. Class B data communications net-
work interface - SAE J1850 standard - rev. nov96, 1996.
47
X-by-Wire Systems. CRC Press, January 2005. R. Zurawski editor,
ISBN 0-8493-3077-7.
48
Index
AFDX, 29
OPEN Alliance SIG, 27
AUTOSAR, 9, 10, 15, 32, 33, 35, 37,
OSEK/VDX, 15, 31
38
AVB, 18, 25, 2729 partial networking, 9, 27, 30
AVB Gen2 Council, 28 point-to-point communication, 3, 38
AVnu Alliance, 28 powertrain domain, 4
PSA, 17, 32
BMW, 4, 8, 19, 26
PSI5, 5, 25
BroadR-Reach, 27
QoS, 25, 27, 29, 39
CAN, 49, 11, 15, 3638
CAN 2.0A, 11 Renault, 26
FlexRay, 8, 15, 18, 31, 36, 38 time-triggered, 6, 18, 19, 21, 25, 28,
frame-packing, 16, 20 32
49