Upload
roisin-howard
View
216
Download
0
Embed Size (px)
Citation preview
8/13/2019 The Use of CAN Based Networks in Automotive Real Time Systems
1/6
The use of CAN based Networks in Automotive Real-
Time SystemsController Area Network a real time bus
Risn Howard
Bachelor of Engineering in Computer EngineeringUniversity of Limerick
Limerick!"!#$%studentmail&ul&ie
AbstractThis paper discusses the importance of the CAN bus
and why it is widely used today in both the automotive segment
where it originate and in industry and automation. This network
is very robust and uses arbitration to organize message delivery.
This minimizes the need for priority based queues at system level.eal time embedded systems and the need for a network like
CAN to implement them is discussed.
Keywords- real-time systems; embedded systems; automotive;
network; controller area network; vehicle; FleRay; Motorol
Interconnect; MI; Local Interconnect Network; LIN; in-vehicle
network; IVN; E!;
'& '()R*+UC)'*(
Real,time systems are of huge importance in all areas of theworld today& - real time system is one which must deliver atask in a timely manner. within a timing constraint& *ne of the
key areas where real,time systems are a necessity is in theautomotive industry& Like all everyday e/uipment. cars arenow full of electronics and em0edded systems& )he need forthese systems to 0e flawless is of huge importance in the safetyof their users&
''& *1ER1'E2
A. What is a Real Time System
- real time system is one which must deliver a task in a timely
manner. within a timing constraint& (ot only does a systemneed to run a control law with time constraints. it must also
schedule communications3 it has to deal with sending and
receiving messages according to deadlines& )iming constraintsfor real,time systems can 0e divided into two types3 hard andsoft& Hard real time systems are safety critical. if they do not
finish within their timing deadline serious conse/uences mayresult& 4oft real time systems on the other hand have deadlines
0ut it is not critical that they meet them& 5any em0edded
systems are hard real,time systems& +eadlines of 6o0s in anem0edded system are typically derived from the re/uired
responsiveness of the sensors and actuators monitored and
controlled 0y it&
B. Real Time Alications
Real-time applications can be divided into thefollowing four types according to their timing
attributes.a! "urely cyclic#
- purely cyclic application e7ecutes every task in the system
periodically& Even '8* operations are polled& 5oreover. itsdemands in resources do not vary significantly from period to
period&
b! $ostly cyclic#
5ost tasks in a mostly cyclic system e7ecute periodically& )hesystem must also respond to some e7ternal events
asynchronously. for e7ample fault recovery and e7ternalcommands&
c! Asynchronous % redictable#
5ost tasks are not periodic in applications such as multimediacommunication. radar signal processing. and tracking& )heduration 0etween consecutive e7ecutions of a task may vary
considera0ly. or the variations in the amounts of resourcesdemanded in different periods may 0e large& However. these
variations have either 0ounded ranges or known statistics&
d! Asynchronous % unredictable#
-pplications that react to asynchronous events and have tasks
with high run,time comple7ity 0elong to this type& -n e7ample
is intelligent real,time control systems&
C. The imortance of real time systems
-periodic or sporadic 6o0s are ones whose release times are
not known& -periodic 6o0s have either soft of no deadlines.whereas sporadic 6o0s have hard deadlines& )he processormust fit these 6o0s into idle spots9
'''& -U)*5*)'1ERE-L)'5E4:4)E54
Real time em0edded systems are critical in automo0iles& 'n
modern vehicles there could 0e up to ! electronic control
units ;ECU
8/13/2019 The Use of CAN Based Networks in Automotive Real Time Systems
2/6
)here are many e7amples of ECU=s some common control
units are as follows>
&! 'n(ine control unit
)! Ariba( control unit *AC+!
,! oor control unit
! "owetrain control unit
/! Transmission control unit
0! Seed control unit1! Break control module *ABS or 'SC!
4ome of these ECU=s form independent su0systems 0ut for
others they need to communicate. and this communication isessential& )he way for the ECU=s to communicate is over and
em0edded network&
'1& C*55*((E)2*R?4'(-U)*5*B'LE4
)here are many different in,vehicle networks availa0le. such
as Controller -rea (etwork ;C-(
8/13/2019 The Use of CAN Based Networks in Automotive Real Time Systems
3/6
5otorola 'nterconnect is a serial communications interface
using a single line from one 5aster to as many as ! slavedevices& )he 5' 0us is used to control 4mart 4witches.
5otors. 4ensors. and -ctuators& 't may also 0e used as
an -utomotive Busto drive 5irrors. 4eats. 2indow lifts orHead light levelers& )he 5' interface uses only ,wire to
send and receive data at a data rate of D kHK&
)he 5' 0us utiliKes a push8pull se/uence to transfer data0etween the master and the slaves& )he 5aster sends apush field to the slave devices connected to the 0us& )his
field contains data. plus the address of one of the slaves&)he 4lave addressed then responds to the received data.
transmitting the Aull field on the 5' Bus to the 5aster&)he data returned 0y the slave is likely to 0e status 0its
representing internal or e7ternal information& )he 5' 0ushas two states3 +ominant ;4tate < which is represented 0y
a ma7imum of & 1. and
Recessive ;4tate
8/13/2019 The Use of CAN Based Networks in Automotive Real Time Systems
4/6
!igure "#$) The CAN node structure
B. Bit 'ncodin( % Synchronisation
Controller -rea (etworking is a very ro0ust and relia0le
communication network& (on Return to Gero 0it coding.
(RG. is used in C-(& 'n (RG encoding there are two signal
levels3 0it is represented 0y a high level and 0it 0y a lowlevel& )he level remains constant over the full time slot& *ne
0it is represented 0y one time slot& )o avoid a loss ofsynchroniKation in the signal due to successive =s or =s a
techni/ue called 0it stuffing is used& )he 0it stuffingtechni/ue that the C-( protocol utiliKes is a complimentary
0it is inserted after five consecutive 0its of e/ual value& -t thereceiver these 0its have to 0e un,stuffed so the original data is
processed& )his techni/ue is also a mechanism from detectingerrors at 0it level&
C. The CAN frame format
)he C-( protocol has two frame formats3 a 0ase frame
;@igure '1,
8/13/2019 The Use of CAN Based Networks in Automotive Real Time Systems
5/6
the node is sending the message '+ it compares the 0it 0eing
sent with the 0it on the 0us& 'f at any stage this is different thenode will stop transmission to avoid collisions with another
C-( frame& )his lets the node know if the transmission of the
0it was successful or if it was overwritten3 writing a . thedominant state. overwrites a . the recessive state& Unlike
other networks. instead of producing a 6amming se/uence toprevent collisions. they are resolved 0y priority& )he 0us with
the highest priority wins ar0itration and this node can transmitthe message& )he process is constantly repeated so any
message that lost ar0itration in the last cycle will have thechance to send again. the message with the ne7t highest
priority will 0e transmitted the ne7t time around& )his entireprocess is implemented in hardware. no software intervention
is re/uired& )his mechanism is known as collision avoidancerather than collision detection as collisions do not happen in
C-(&@igure '1,F shows the C-( 0it timing structure&
)here are F segments in each 0it time3 the synchroniKationsegment. the propagation segment. the phase segment and
phase segment D& Registers can 0e set up so as to allow
certain time /uanta for each segment& Menerally the samplepoint is 0etween the st and Dnd phase segment&
!igure "#$+ CAN bit timing
'. The benefit of CAN in automotive real time systems
(early all carmakers in Europe. -merica. and @ar East useC-( high,speed networks ;e&g& " k0ps< in their power,
engine systems. which are compliant to the '4* !#!,Dphysical layer standard& -dditionally most European
passenger cars are e/uipped with C-(,0ased multiple7systems& )hese multiple7 networks link door and roof control
units as well as lighting and seat control units& 4ome of themultiple7 networks are compliant to the fault,tolerant physical
layer standard ;'4* !#!,
8/13/2019 The Use of CAN Based Networks in Automotive Real Time Systems
6/6
2e suggest that you use a te7t 0o7 to insert a graphic;which is ideally a dpi )'@@ or EA4 file. with all fontsem0edded< 0ecause. in an 542 document. this method issomewhat more sta0le than directly inserting a picture&
)o have non,visi0le rules on your frame. use the542ord N@ormatO pull,down menu. select )e7t Bo7 SColors and Lines to choose (o @ill and (o Line&
figures and ta0les after they are cited in the te7t& Use the
a00reviation N@ig& O. even at the 0eginning of a sentence&
)-BLE '& )-BLE):AE4):LE4
Table
,ead
Table Column ,ead
"able column subhead #ubhead #ubhead
copy 5ore ta0le copya
a& 4ample of a )a0le footnote& ;)a0le footnote