a can to flexray migration framework

325

Click here to load reader

Upload: edison100

Post on 21-Nov-2015

93 views

Category:

Documents


19 download

DESCRIPTION

CAN and FlexRay communication

TRANSCRIPT

  • Waterford Institute of Technology

    Ireland InstitiidTeicneolaochtaPhortLirge

    ire

    A CAN to FlexRay Migration

    Framework Richard Murphy B.Sc. (Hons)

    M.Sc. Thesis

    (Supervisor)Frank Walsh B.A., B.A.I., M.Sc.

  • SubmittedtoWaterfordInstituteofTechnologyAwardsCouncil,September2009

  • Acknowledgments

    i

    Acknowledgments

    Iwouldliketothanksincerelythefollowingpeople,forwithouttheirinputthisthesis

    wouldnothavebeenpossible.

    IwouldliketothankmysupervisorFrankWalshforhisideasandinputespeciallywhen

    thingswerenotgoingtoplanhewasalwayswillingtogiveuphistimetodiscussany

    issues.Iwouldalsoliketothankthegroupleader,BrendanJackmanforhisassistance

    and inputanytime itwasaskedofhim.AbigthankyoumustgotoGareth,Roband

    WeiDawhohelpedmeanytime Iaskedevenwhiletheywerebusyconductingtheir

    ownresearch.

    Iwould like to thankSumitomoYstrad.The financialbackingofSumitomohasmade

    this thesis possible. I would like to especially thank Paul, Jim and Eamonn whose

    hospitalityandassistancewassecondtononeduringmyvisitsthere.

    FinallyIwouldliketothankmyparentsMiloandKittywhobackedmebothfinancially

    andwithencouragement.WithoutthemIwouldnotbewhereIamnow.

  • Declaration

    ii

    Declaration

    IRichardMurphy,declarethatthisthesisissubmittedbymeinpartialfulfilmentofthe

    requirement for thedegreeM.Sc., isentirelymyownworkexceptwhereotherwise

    accredited.Ithasnotatanyothertimewholeorinpartbeensubmittedforanyother

    educationalaward.

    Signature:

    RichardMurphy

    9thofOctober2009

  • Abstract

    iii

    Abstract

    Oneofthefirstelectronicscomponentsusedinanautomobilewasthefuse.Additional

    features were developed such as engine management systems. These additional

    featuresincreasedtheamountofwiringinawiringharness.Thiscontributedtowards

    thenecessitytodevelopthebusstructureinthe1980s.Thedefactobusstructurein

    the automotive industry became CAN (Controller Area Network). By using a bus

    structure this resulted in less hard wiring being required in the production of an

    automobilewhich further lead to a reduction in production cost. CAN is an event

    triggered protocol which denotes it is nondeterministic and it has a theoretical

    bandwidthlimitof1Mbit\s.Thepracticallimitisnearer500kbit\s.Duringthe80sand

    90s, automotive electronics development increased; this was primarily driven by

    increaseddevelopmentofsafetyfeaturessuchasABS(AntilockBrakingSystem).The

    increaseinthenumberoffeaturesandnodescausedincreasedtrafficonthebus.The

    CANprotocolwillbeunabletomeettherequirementsfortheextraapplications.

    This resulted in the development of FlexRay in 2000 by a consortium originally

    consisting of amongst others BMW, Daimler Chrysler, Freescale and Philips. This

    protocol can implement both timetriggered and eventtriggered messages,

    determinism, fault tolerance, redundancy and can operate at 10Mbit\s. Newly

    developedtechnologieshavehighinitialcoststhereforebeinginitiallymoreexpensive

    thanestablished technologies.This could result in itbeing financiallyunworkable to

    replace a complete automotive buswith FlexRay. FlexRay can possibly be used for

    mission critical applications such as powertrain applications, while other protocols

    suchasCANandLIN(LocalInterconnectNetwork)maypossiblybeusedforlesscritical

    applications.

    The aim of this research is to design and develop a framework that allows the

    implementationofaCANapplicationontheFlexRayprotocol,withoutdegradingthe

    applicationsperformance.

  • TableofContents

    iv

    Table of Contents

    Acknowledgments.......................................................................................................i

    Declaration.................................................................................................................ii

    Abstract.....................................................................................................................iii

    TableofContents......................................................................................................iv

    TableofFigures..........................................................................................................x

    TableofTables.........................................................................................................xv

    TableofEquations..................................................................................................xvii

    SectionIThesisOverview.........................................................................................1

    1 ThesisOverview:.................................................................................................2

    1.1 ProblemSpecification.....................................................................................2

    1.2 SpecifiedSolution...........................................................................................3

    1.3 ResearchQuestions........................................................................................4

    1.4 DocumentLayout...........................................................................................5

    SectionIILiteratureReview......................................................................................7

    2 AutomotiveNetworksReview:...........................................................................8

    2.1 Introduction....................................................................................................8

    2.2 ComputerNetworks.......................................................................................8

    2.3 NetworkFunction...........................................................................................9

    2.4 NetworkTopologies......................................................................................10

    2.5 LAN(LocalAreaNetwork)&WAN(WideAreaNetwork).............................13

    2.6 CommunicationProtocol..............................................................................14

    2.7 AutomotiveNetworksHistory......................................................................15

    2.8 AutomotiveNetworksDescription................................................................16

  • TableofContents

    v

    2.9 ECU...............................................................................................................20

    2.10 AutomotiveNetworkProtocols....................................................................22

    2.11 Conclusion....................................................................................................25

    2.12 References....................................................................................................27

    3 CAN(ControllerAreaNetwork):........................................................................28

    3.1 Introduction..................................................................................................28

    3.2 CANPhysicalStructure.................................................................................29

    3.3 CANFrameFormat.......................................................................................30

    3.4 BusArbitration..............................................................................................34

    3.5 CANErrorHandling.......................................................................................35

    3.6 CANProtocolFeatures..................................................................................39

    3.7 TTCAN(TimeTriggeredControllerAreaNetwork)Introduction...................40

    3.8 Conclusion....................................................................................................43

    3.9 References....................................................................................................44

    4 FlexRay:............................................................................................................45

    4.1 Introduction..................................................................................................45

    4.2 FlexRayFeatures...........................................................................................46

    4.3 FlexRayCycleStructure.................................................................................48

    4.4 FlexRayNodeStructure................................................................................50

    4.5 FlexRayFrameStructure...............................................................................52

    4.6 FlexRayTimingHierarchy..............................................................................56

    4.7 CommunicationCycle...................................................................................58

    4.8 Conclusion....................................................................................................62

    4.9 References....................................................................................................63

    5 AutomotiveEmbeddedSystemsDesign:...........................................................64

    5.1 AutomotiveEmbeddedSystemDesign.........................................................64

  • TableofContents

    vi

    5.2 DistributedArchitecturesIntroduction.......................................................64

    5.3 RealTimeOperatingSystem(RTOS).............................................................66

    5.4 OSEK/VDX.....................................................................................................67

    5.5 ProcessModels.............................................................................................70

    5.6 TaskSchedulingPolicies................................................................................70

    5.7 TaskGraphs..................................................................................................74

    5.8 CriticalPathAnalysis(CPA)...........................................................................74

    5.9 TaskGraphAnalysis......................................................................................77

    5.10 DesignProcess..............................................................................................87

    5.11 Conclusion....................................................................................................90

    5.12 References....................................................................................................91

    6 AutomotiveNetworkMigration:.......................................................................93

    6.1 AutomotiveNetworkMigration....................................................................93

    6.2 Introduction..................................................................................................93

    6.3 ProtocolMigrationRequirements................................................................93

    6.4 SidebySideMigration(UsingaGateway)....................................................95

    6.5 FullMigration..............................................................................................100

    6.6 Conclusion..................................................................................................112

    6.7 References..................................................................................................114

    7 LiteratureReviewConclusion..........................................................................116

    7.1 Conclusion..................................................................................................116

    7.2 References..................................................................................................119

    SectionIIIFrameworkDevelopment.....................................................................120

    8 MigrationFrameworkRequirements:.............................................................121

    8.1 Introduction................................................................................................121

    8.2 MigrationRequirements.............................................................................121

  • TableofContents

    vii

    8.3 ApplicationDefinition.................................................................................122

    8.4 CANParameterAbstraction........................................................................123

    8.5 Migration....................................................................................................124

    8.6 FlexRayFrameImplementation..................................................................124

    8.7 FlexRayApplicationConfiguration..............................................................125

    8.8 Conclusion..................................................................................................126

    9 CANtoFlexRayMigrationMethodology:........................................................127

    9.1 Introduction................................................................................................127

    9.2 FrameworkDevelopment...........................................................................127

    9.3 SystemImplementation..............................................................................129

    9.4 Verification.................................................................................................130

    9.5 ImplementationofAnalysisFindings..........................................................130

    9.6 ApplyingFrameworktoaRealWorldApplication......................................131

    9.7 GenericCANtoFlexRayDevelopment........................................................131

    9.8 StaticSegmentDevelopment.....................................................................132

    9.9 DynamicSegmentDevelopment.................................................................140

    9.10 Conclusion..................................................................................................143

    9.11 References..................................................................................................147

    10 DevelopmentToolsandApplications:.............................................................148

    10.1 Introduction................................................................................................148

    10.2 Hardware....................................................................................................148

    10.3 Software.....................................................................................................154

    10.4 Conclusion..................................................................................................169

    10.5 References..................................................................................................170

    SectionIVTesting&Results.................................................................................171

    11 SystemModel.................................................................................................172

  • TableofContents

    viii

    11.1 Introduction................................................................................................172

    11.2 TractionControl&AdaptiveCruiseControlSummary................................172

    11.3 ApplicationModels.....................................................................................173

    11.4 Hardware....................................................................................................178

    11.5 Software.....................................................................................................181

    11.6 ExtractionMethod......................................................................................182

    11.7 VerificationofParameterConsistency........................................................182

    11.8 ValidationCheck.........................................................................................183

    11.9 Conclusion..................................................................................................183

    11.10 References................................................................................................184

    12 FrameworkImplementationProcedure:.........................................................185

    12.1 Introduction................................................................................................185

    12.2 Abstract(TC)Implementation(TestCase1)...............................................185

    12.3 DynamicSegmentVerification....................................................................197

    12.4 FinalAbstractCaseParameters..................................................................201

    12.5 ExperimentalImplementation(ACC)(TestCase2).....................................202

    12.6 DynamicSegmentAnalysis.........................................................................209

    12.7 FinalExperimentalCaseParameters...........................................................211

    12.8 VerificationofTimeTriggeredProperties(TestCase3).............................213

    12.9 FinalPracticalCaseParameters..................................................................219

    12.10 Conclusion................................................................................................220

    12.11 References................................................................................................222

    13 TestResults&Verification:.............................................................................223

    13.1 Introduction................................................................................................223

    13.2 TestCase2:ACCConfiguration...................................................................224

    13.3 CANResults.................................................................................................225

  • TableofContents

    ix

    13.4 FlexRayResults...........................................................................................245

    13.5 DiscussionofResults...................................................................................272

    13.6 TestCase3:VerificationofTimeTriggeredProperties...............................277

    13.7 Conclusion..................................................................................................282

    SectionVConclusion............................................................................................283

    14 Conclusion:.....................................................................................................284

    14.1 ResearchSummary.....................................................................................284

    14.2 SummaryofTestingandResults.................................................................285

    14.3 ResearchQuestions....................................................................................287

    14.4 AreasforFutureResearch..........................................................................288

    SectionVIAppendices...........................................................................................290

    AppendixA..................................................................................................................I

    14.5 PublishedMaterial...........................................................................................I

    AppendixB.................................................................................................................II

    14.6 Bibliography....................................................................................................II

    AppendixC................................................................................................................V

    14.7 Calculations.....................................................................................................V

  • TableofFigures

    x

    Table of Figures

    FIGURE21:ASIMPLENETWORKEXAMPLE................................................................................................9

    FIGURE22:BUSTOPOLOGY......................................................................................................................10

    FIGURE23:STARTOPOLOGY....................................................................................................................11

    FIGURE24:RINGTOPOLOGY....................................................................................................................12

    FIGURE25:MESHTOPOLOGY...................................................................................................................12

    FIGURE26:TCP/IPMODEL........................................................................................................................14

    FIGURE28:COSTVSDATARATEOFDIFFERENTAUTOMOTIVEPROTOCOLS..........................................17

    FIGURE29:BASICNETWORKCONFIGURATION........................................................................................18

    FIGURE210:POINTTOPOINTNETWORK................................................................................................19

    FIGURE211:ABASICNODECOMPRISINGOFASENSORANDECU..........................................................20

    FIGURE212:MICROPROCESSORBLOCKDIAGRAM..................................................................................21

    FIGURE213:TIMETRIGGEREDSLOTSONANETWORK............................................................................24

    FIGURE31:CANSRELATIONTOTHEOSIMODEL.....................................................................................29

    FIGURE32:TERMINATINGRESISTORS(TOSTOPREFLECTION)................................................................30

    FIGURE33:CANSTANDARDFRAMEFORMAT..........................................................................................31

    FIGURE34:CANEXTENDEDFORMAT.......................................................................................................31

    FIGURE35:REMOTEFRAME.....................................................................................................................32

    FIGURE36:ERRORFRAMEFORMAT.........................................................................................................33

    FIGURE37:OVERLOADFRAMEFORMAT..................................................................................................33

    FIGURE38:ARBITRATIONPROCESS..........................................................................................................35

    FIGURE39:TTCANMATRIXCYCLE............................................................................................................41

    FIGURE310:TTCANSAMPLEWINDOWTIME...........................................................................................42

    FIGURE41:POSSIBLEFLEXRAYIMPLEMENTATION..................................................................................46

    FIGURE42:STARANDBUSTOPOLOGYCOMBINATION............................................................................48

    FIGURE:43:FLEXRAYCYCLESTRUCTURE..................................................................................................49

    FIGURE44:NODEARCHITECTURE(CONSORTIUM,2005)........................................................................50

    FIGURE45:NODECOMPONENTS.............................................................................................................51

    FIGURE46:ROLETHECHIHASINTHEPEINTERACTINGWITHTHEHOSTPROCESSOR(CONSORTIUM,

    2005).................................................................................................................................................52

    FIGURE47:FRAMEFORMAT(CONSORTIUM,2005).................................................................................53

    FIGURE48:PAYLOADSEGMENTCONTAININGTHENETWORKMANAGEMENT(NM)VECTOR&MESSAGE

    ID.......................................................................................................................................................54

    FIGURE49:FLEXRAYTIMINGHIERARCHY(CONSORTIUM,2005).............................................................57

  • TableofFigures

    xi

    FIGURE410:POSSIBLEFLEXRAYFRAMECYCLECONFIGURATION............................................................58

    FIGURE51:BASICDISTRIBUTEDARCHITECTURE......................................................................................65

    FIGURE52:GENERALNODEPROPERTIES.................................................................................................65

    FIGURE53:OSEKMODELVSOSI7LAYERMODEL...................................................................................69

    FIGURE54:BASICTASKGRAPH.................................................................................................................70

    FIGURE55:SIMPLEACTIVITYCONFIGURATION........................................................................................75

    FIGURE56:SAMPLEPROCESSMODEL......................................................................................................76

    FIGURE:57:ALTERNATIVEACTIVITYTASKCONFIGURATIONS..................................................................76

    FIGURE:58:SAMPLECOMPLEXCPAMODEL............................................................................................77

    FIGURE:59:TASKCONTENTS....................................................................................................................77

    FIGURE:510:TWOTASKS,T1&T2,CONNECTEDBYAMESSAGEM1......................................................78

    FIGURE511:TASKT1SRELEASEANDDEADLINEPARAMETERS................................................................78

    FIGURE512:TASKGRAPHEXAMPLE(HURLEY,1994)...............................................................................79

    FIGURE513:GANTTCHARTFORTASKSINFIGURE512(HURLEY,1994).................................................79

    FIGURE514:FOURPHASESOFATASKSEXECUTION................................................................................83

    FIGURE61:PROTOCOLCOMMONFUNCTIONALITY.................................................................................94

    FIGURE62:CONVERTERBETWEENTWODIFFERENTPROTOCOLS...........................................................94

    FIGURE63:EXAMPLEGATEWAYUSAGE...................................................................................................95

    FIGURE64:AUTOSARGATEWAYSTRUCTURE..........................................................................................97

    FIGURE65:FLOWCHARTCONVERTINGFLEXRAYTOCAN(SUKHYUNSEOL,2006)................................99

    FIGURE66:ALGORITHMFORGENERATINGANINDIVIDUAL(SHANDING,2005)..................................103

    FIGURE67:NETWORKTOPOLOGYSYNTHESISALGORITHM(ALOUL,2005)...........................................106

    FIGURE68:DESIGNHEURISTIC(TRAIANPOP,2002)..............................................................................107

    FIGURE69:TTANDDYNSCHEDULABILITYALGORITHMS(TRAIANPOP,2006)......................................107

    FIGURE610:OPTIMISEDBUSCONFIGURATIONALGORITHM(TRAIANPOP,2007)...............................108

    FIGURE611:GLOBALSCHEDULINGALGORITHM(TRAIANPOP,2006)...................................................110

    FIGURE81:FRAMEWORKDEVELOPMENTSTAGES.................................................................................122

    FIGURE91:STFRAMEDATAGRAPHPROFILE.........................................................................................137

    FIGURE92:ILLUSTRATIONOFPERIODICITYANDDISTANCECONSTRAINT.............................................139

    FIGURE93:STSCHEDULINGALGORITHM...............................................................................................145

    FIGURE94:DYNSCHEDULINGALGORITHM............................................................................................146

    FIGURE95:FLEXRAYEXTRACTIONPARAMETERS...................................................................................146

    FIGURE101:FUJITSUSK91F467DFLEXRAYSTARTERKIT......................................................................150

    FIGURE102:FLEXRAYPHYSICALLAYERDRIVERMODULE......................................................................151

    FIGURE103:VN3600FLEXRAYINTERFACE.............................................................................................152

    FIGURE104:CANCARDXL........................................................................................................................153

    FIGURE105:FLEXRAYPASSIVESTAR......................................................................................................153

    FIGURE106:SOFTUNEWORKBENCHV6.................................................................................................154

  • TableofFigures

    xii

    FIGURE107:FMEFRFLASHPROGRAMMER...........................................................................................155

    FIGURE108:DECOMSYS::DESIGNERPRO...............................................................................................156

    FIGURE109:FLEXRAYNODEANDCLUSTERCONFIGURATION...............................................................157

    FIGURE1010:CONSTRAINTVIOLATION..................................................................................................157

    FIGURE1011:SAMPLEFRAMESCHEDULE..............................................................................................159

    FIGURE1012:ECUCONFIGURATIONSCREEN.........................................................................................160

    FIGURE1013:COMMSTACKFLEXRAYCONTROLLERSTATEMACHINE(EGGENBAUER,2006)...............161

    FIGURE1014:FLEXRAYSAMPLEFLOWDIAGRAM..................................................................................167

    FIGURE1015:FLEXRAYFRAMEPANEL....................................................................................................168

    FIGURE1016:CAPLBROWSERPANEL.....................................................................................................168

    FIGURE111:ABSTRACTIMPLEMENTATIONSTAGES..............................................................................173

    FIGURE112:TRACTIONCONTROLTASKGRAPHMODEL........................................................................174

    FIGURE113:ACCTASKGRAPHREPRESENTATION..................................................................................176

    FIGURE114:ACCBLOCKDIAGRAMREPRESENTATION...........................................................................177

    FIGURE115:TESTCASETHREETASKGRAPHCONFIGURATION............................................................178

    FIGURE116:CANPHYSICALTESTCONFIGURATION...............................................................................180

    FIGURE117:FLEXRAYPHYSICALTESTCONFIGURATION........................................................................181

    FIGURE121:FIRSTFRAMEWORKDEVELOPMENTSTAGE.......................................................................186

    FIGURE122:MIGRATIONSTEPTWO.....................................................................................................186

    FIGURE123:FRAMEWORKDEVELOPMENTSTAGETHREE.....................................................................187

    FIGURE124:PATHP4ONTHETRACTIONCONTROLMODEL.................................................................190

    FIGURE125:FLOWCHARTDEVELOPMENTSTAGEFOUR........................................................................192

    FIGURE126:STAGEFIVEDEVELOPMENT..............................................................................................193

    FIGURE127:PAYLOADGRAPHPROFILE..................................................................................................195

    FIGURE128:CONFIGUREDABSTRACTPARAMETERS.............................................................................201

    FIGURE129:PAYLOADGRAPHPROFILE..................................................................................................207

    FIGURE1210:CONFIGUREDABSTRACTPARAMETERS...........................................................................212

    FIGURE1211:FRAMEWORKDEVELOPMENTSTAGESIX.........................................................................212

    FIGURE1212:PATHTHROUGHTASKGRAPH..........................................................................................214

    FIGURE1213:PAYLOADGRAPHPROFILE................................................................................................217

    FIGURE1214:CONFIGUREDABSTRACTPARAMETERS...........................................................................220

    FIGURE131:STANDARDTASKNODALASSIGNMENT.............................................................................224

    FIGURE132:MINIMALTASKNODALASSIGNMENT................................................................................225

    FIGURE133:STAGESEVENOFTHEFRAMEWORKDEVELOPMENT........................................................225

    FIGURE134:NORMALBUSLOAD............................................................................................................227

    FIGURE135:MESSAGETRANSMISSIONTIMESATNORMALLOAD........................................................228

    FIGURE136:APPLICATIONCYCLETIMESATNORMALLOAD..................................................................229

    FIGURE137:NUMBEROFFRAMESPERCYCLEATNORMALLOAD.........................................................230

  • TableofFigures

    xiii

    FIGURE138:60%BUSLOAD....................................................................................................................231

    FIGURE139:MESSAGETRANSMISSIONTIMESAT60%LOAD................................................................232

    FIGURE1310:APPLICATIONCYCLETIMESAT60%LOAD.......................................................................232

    FIGURE1311:NUMBEROFFRAMESPERCYCLEAT60%LOAD...............................................................233

    FIGURE1312:MAXIMUMBUSLOAD.......................................................................................................234

    FIGURE1313:MESSAGETRANSMISSIONTIMESATMAXIMUMLOAD...................................................235

    FIGURE1314:APPLICATIONCYCLETIMESATMAXIMUMLOAD............................................................236

    FIGURE1315:NUMBEROFFRAMESPERCYCLEATMAXIMUMLOAD...................................................237

    FIGURE1316:MESSAGETRANSMISSIONTIMESATNORMALLOAD......................................................238

    FIGURE1317:APPLICATIONCYCLETIMESATNORMALLOAD................................................................239

    FIGURE1318:NUMBEROFFRAMESPERCYCLEATNORMALLOAD.......................................................239

    FIGURE1319:MESSAGETRANSMISSIONTIMESAT60%LOAD..............................................................240

    FIGURE1320:APPLICATIONCYCLETIMESAT60%LOAD.......................................................................241

    FIGURE1321:NUMBEROFFRAMESPERCYCLEAT60%LOAD...............................................................242

    FIGURE1322:MESSAGETRANSMISSIONTIMESATMAXIMUMLOAD...................................................243

    FIGURE1323:APPLICATIONCYCLETIMESATMAXIMUMLOAD............................................................244

    FIGURE1324:NUMBEROFFRAMESPERCYCLEATMAXIMUMLOAD...................................................245

    FIGURE1325:NOREDUNDANCYNORMALBUSLOADCHA....................................................................247

    FIGURE1326:NOREDUNDANCYNORMALBUSLOADCHB....................................................................248

    FIGURE1327:MESSAGETRANSMISSIONTIMESNORMALLOAD...........................................................249

    FIGURE1328:APPLICATIONCYCLETIMESNORMALLOAD.....................................................................250

    FIGURE1329:NUMBEROFSTFRAMESPERCYCLE(NOREDUNDANCY)................................................251

    FIGURE1330:NUMBEROFDYNFRAMESPERCYCLENORMALLOAD....................................................251

    FIGURE1331:MESSAGETRANSMISSIONTIMESHIGHDATARATE........................................................253

    FIGURE1332:APPLICATIONCYCLETIMESHIGHDATARATE..................................................................254

    FIGURE1333:NUMBEROFDYNFRAMESPERCYCLEHIGHDATARATE.................................................254

    FIGURE1334:MESSAGETRANSMISSIONTIMESATNORMALLOAD......................................................256

    FIGURE1335:APPLICATIONCYCLETIMESATNORMALLOAD................................................................257

    FIGURE1336:NUMBEROFDYNFRAMESPERCYCLEATNORMALLOAD...............................................257

    FIGURE1337:MESSAGETRANSMISSIONTIMESHIGHDATARATE........................................................259

    FIGURE1338:APPLICATIONCYCLETIMESHIGHDATARATE..................................................................259

    FIGURE1339:NUMBEROFDYNFRAMESPERCYCLEHIGHDATARATE.................................................260

    FIGURE1340:MESSAGETRANSMISSIONTIMESATNORMALLOAD......................................................261

    FIGURE1341:APPLICATIONCYCLETIMESATNORMALLOAD................................................................262

    FIGURE1342:NUMBEROFDYNFRAMESPERCYCLEATNORMALLOAD...............................................263

    FIGURE1343:MESSAGETRANSMISSIONTIMESHIGHDATARATE........................................................265

    FIGURE1344:APPLICATIONCYCLETIMESHIGHDATARATE..................................................................265

    FIGURE1345:NUMBEROFSTFRAMESPERCYCLEHIGHDATARATE....................................................266

  • TableofFigures

    xiv

    FIGURE1346:NUMBEROFDYNFRAMESPERCYCLEHIGHDATARATE.................................................266

    FIGURE1347:MESSAGETRANSMISSIONTIMESATNORMALLOADS....................................................268

    FIGURE1348:APPLICATIONCYCLETIMESATNORMALLOADS..............................................................268

    FIGURE1349:NUMBEROFDYNFRAMESPERCYCLEATNORMALLOADS.............................................269

    FIGURE1350:MESSAGETRANSMISSIONTIMESHIGHDATARATE........................................................271

    FIGURE1351:APPLICATIONCYCLETIMESHIGHDATARATE..................................................................271

    FIGURE1352:NUMBEROFDYNFRAMESPERCYCLEHIGHDATARATE.................................................272

    FIGURE1353:MESSAGETRANSMITTIMES(MINIMALCONFIGURATION).............................................275

    FIGURE1354:MESSAGETRANSMITTIMES(NORMALCONFIGURATION)..............................................275

    FIGURE1355:CANCONFIGURATIONTESTTHREE..................................................................................279

    FIGURE1356:GRAPHOFCANAPPLICATIONEXECUTIONTIMES............................................................280

    FIGURE1357:FLEXRAYCONFIGURATIONTESTTHREE...........................................................................281

  • TableofTables

    xv

    Table of Tables

    TABLE31:CANERRORSTATES..................................................................................................................38

    TABLE61:EXAMPLECANNETWORK.......................................................................................................111

    TABLE101:OFFSTATE............................................................................................................................162

    TABLE102:STARTUPSTATE...................................................................................................................163

    TABLE103:ONSTATE.............................................................................................................................164

    TABLE104:ONLINESTATE......................................................................................................................164

    TABLE105:CONFIGURATIONSTATE.......................................................................................................165

    TABLE106:RESETSTATE.........................................................................................................................165

    TABLE107:WAKEUPSTATE....................................................................................................................165

    TABLE108:ANALYSISFUNCTIONBLOCKOVERVIEW..............................................................................166

    TABLE111:TRACTIONCONTROLTASKFUNCTIONS...............................................................................174

    TABLE112:ADAPTIVECRUISECONTROLTASKFUNCTIONS...................................................................175

    TABLE121:PARAMETERCM&JMIDENTIFICATION.................................................................................188

    TABLE122:WMFIVEITERATIONSOFTHEQUEUINGDELAY...................................................................189

    TABLE123:WORSTCASERESPONSETIME.............................................................................................189

    TABLE124:OBTAININGSLACK................................................................................................................190

    TABLE125:TASKGRAPHPARAMETERS..................................................................................................191

    TABLE126:FINALTASKGRAPHPARAMETERS........................................................................................191

    TABLE127:MESSAGEDEADLINES...........................................................................................................192

    TABLE128:PAYLOADCALCULATIONS.....................................................................................................194

    TABLE129:INITIALDYNAMICDATA.......................................................................................................197

    TABLE1210:DYNAMICCOMMUNICATIONTIME...................................................................................198

    TABLE1211:MPARAMETERS................................................................................................................199

    TABLE1212:WM(T)PARAMETER............................................................................................................200

    TABLE1213:DYNAMICRESPONSETIMES...............................................................................................200

    TABLE1214:CANINITIALPARAMETERS.................................................................................................203

    TABLE1215:OBTAININGSLACKPARAMETER.........................................................................................203

    TABLE1216:TASKGRAPHPARAMETERS................................................................................................204

    TABLE1217:FINALTASKGRAPHPARAMETERS......................................................................................204

    TABLE1218:MESSAGEDEADLINES.........................................................................................................205

    TABLE1219:PAYLOADCALCULATIONS...................................................................................................206

    TABLE1220:APERIODICCANDATA........................................................................................................210

    TABLE1221:MPARAMETERS................................................................................................................210

    TABLE1222:WM(T)PARAMETER............................................................................................................211

  • TableofTables

    xvi

    TABLE1223:DYNAMICRESPONSETIMES...............................................................................................211

    TABLE1224:CANINITIALPARAMETERSTESTCASETHREE....................................................................213

    TABLE1225:OBTAININGSLACKPARAMETER.........................................................................................214

    TABLE1226:TASKGRAPHPARAMETERS................................................................................................215

    TABLE1227:FINALTASKGRAPHPARAMETERS......................................................................................215

    TABLE1228:MESSAGEDEADLINES.........................................................................................................216

    TABLE1229:PAYLOADCALCULATIONS...................................................................................................216

    TABLE131:NORMALBUSLOAD..............................................................................................................227

    TABLE132:MESSAGEDEADLINES...........................................................................................................228

    TABLE133:60%BUSLOAD......................................................................................................................230

    TABLE134:MAXIMUMBUSLOAD...........................................................................................................234

    TABLE135:MESSAGEDELAYS.................................................................................................................235

    TABLE136:NORMALBUSLOAD..............................................................................................................237

    TABLE137:60%BUSLOAD......................................................................................................................240

    TABLE138:MAXIMUMBUSLOAD...........................................................................................................242

    TABLE139:MESSAGEDELAYS.................................................................................................................244

    TABLE1310:STANDARDBUSLOAD.........................................................................................................247

    TABLE1311:REVISEDFLEXRAYMESSAGEDEADLINES...........................................................................248

    TABLE1312:HIGHDATARATEBUSLOAD...............................................................................................252

    TABLE1313:NORMALBUSLOAD............................................................................................................255

    TABLE1314:HIGHDATARATEBUSLOAD...............................................................................................258

    TABLE1315:NORMALBUSLOAD............................................................................................................261

    TABLE1316:HIGHDATARATEBUSLOAD...............................................................................................264

    TABLE1317:NORMALBUSLOAD............................................................................................................267

    TABLE1318:HIGHDATARATEBUSLOAD...............................................................................................270

    TABLE1319:NUMBEROFCANFRAMESPERSECOND............................................................................273

    TABLE1320:NUMBEROFFLEXRAYFRAMESPERSECOND.....................................................................273

    TABLE1321:ACCCANAPPLICATIONCYCLESTANDARDDEVIATION......................................................276

    TABLE1322:ACCFLEXRAYAPPLICATIONCYCLESTANDARDDEVIATION...............................................277

    TABLE1323:APPLICATIONIDS................................................................................................................278

    TABLE1324:APPLICATIONEXECUTIONTIMES.......................................................................................279

  • TableofEquations

    xvii

    Table of Equations

    EQUATION51:UTILISATIONBOUND........................................................................................................72

    EQUATION52:WCET................................................................................................................................80

    EQUATION53:MESSAGEDELAY...............................................................................................................80

    EQUATION54:RECURRENCERESPONSETIME.........................................................................................81

    EQUATION55:RESPONSETIME................................................................................................................83

    EQUATION56:RESPONSETIME(INCLUDINGJITTER)...............................................................................83

    EQUATION57:COMMUNICATIONTIME...................................................................................................83

    EQUATION58:BLOCKINGDELAY..............................................................................................................84

    EQUATION59:QUEUINGDELAY...............................................................................................................84

    EQUATION510:REOCCURRENCEQUEUINGDELAY..................................................................................84

    EQUATION511:CONVERGENCE...............................................................................................................84

    EQUATION512:RESPONSETIME..............................................................................................................84

    EQUATION513:RECURRENCERESPONSE................................................................................................85

    EQUATION514:UPDATEDRESPONSETIME.............................................................................................85

    EQUATION515:WORSECASEDELAY........................................................................................................85

    EQUATION516:UPDATEDWCRT..............................................................................................................85

    EQUATION517:UPDATEDDELAY.............................................................................................................86

    EQUATION518:TRANSMISSIONTIME......................................................................................................86

    EQUATION519:SIMPLIFIEDTRANSMISSIONTIME...................................................................................86

    EQUATION61:USEDMESSAGESIZEOFNODEI.....................................................................................103

    EQUATION62:MAXIMUMMESSAGESIZEOFNODEI............................................................................103

    EQUATION63:DATAELEMENTOPTIMUMPERIOD................................................................................104

    EQUATION64:OVERALLFITNESS...........................................................................................................104

    EQUATION65:SLOTDURATION.............................................................................................................105

    EQUATION66:SLOTREUSE....................................................................................................................106

    EQUATION67:MNEWTRANSMISSIONSLOTPORTIONWITHINPERIOD(MNEW).......................................106

    EQUATION68:DYNWORSECASERESPONSETIME................................................................................109

    EQUATION69:WORSECASEDELAYM..................................................................................................110

    EQUATION610:COMMUNICATIONTIME...............................................................................................110

    EQUATION91:CANMESSAGESET..........................................................................................................132

    EQUATION92:MESSAGECOMPONENTS................................................................................................132

    EQUATION93:TASKGRAPHEXECUTIONTIME.......................................................................................132

    EQUATION94:INTERMEDIATETASKSCHEDULING................................................................................133

    EQUATION95:TOTALAVAILABLESLACK................................................................................................133

  • TableofEquations

    xviii

    EQUATION96:SLACKPERTASK..............................................................................................................133

    EQUATION97:PARAMETERVALIDATIONCHECK...................................................................................134

    EQUATION98:TRANSMISSIONDEADLINE..............................................................................................134

    EQUATION99:TRANSMISSIONDELAY....................................................................................................134

    EQUATION910:FLEXRAYFRAMESIZE....................................................................................................135

    EQUATION911:FRAMESPERAPPLICATIONCYCLE(STDATA)...............................................................135

    EQUATION912:TOTALREQUIREDBYTES...............................................................................................136

    EQUATION913:SLOTDURATION...........................................................................................................138

    EQUATION914:DISCRETISEDSLOTDELAY.............................................................................................138

    EQUATION915:PERIODICITYANDDISTANCECONSTRAINTVALIDATION..............................................140

    EQUATION916:TOTALDYNCOMMUNICATIONTIME...........................................................................141

    EQUATION917:MINIMUMNUMBEROFREQUIREDDYNSLOTS...........................................................141

    EQUATION918:SLOTQUANTITYVERIFICATION....................................................................................141

    EQUATION919:DYNAMICWORSTCASERESPONSETIME.....................................................................142

    EQUATION920:COMMUNICATIONTIME...............................................................................................142

    EQUATION921:MDELAY......................................................................................................................142

    EQUATION922:NUMBEROFUNUSEDMINISLOTS................................................................................143

    EQUATION923:WM(T)DELAY.................................................................................................................143

    EQUATION121:TASKRESPONSETIME...................................................................................................187

    EQUATION122:MESSAGETRANSMISSION/COMMUNICATIONTIME...................................................187

    EQUATION123:REVISEDTOTALFLEXRAYDATA....................................................................................194

    EQUATION124:RESPONSETIMEANALYSISEQUATION.........................................................................198

    EQUATION125:TOTALDYNCOMMUNICATIONTIME...........................................................................198

    EQUATION126:MDELAY......................................................................................................................199

    EQUATION127:WMDELAY.....................................................................................................................199

    EQUATION128:RESPONSETIMEANALYSISEQUATION.........................................................................209

    EQUATION129:MDELAY......................................................................................................................210

    EQUATION1210:WMDELAY...................................................................................................................210

  • SectionIThesis

    Overview

  • ThesisOverview

    2

    1 Thesis Overview:

    1.1 ProblemSpecification

    The aimof this research is todevelop a framework tomigrate an application from

    CAN,aneventdrivennetworkprotocol,usedprincipallyinautomotiveapplicationsto

    FlexRay,a timetriggeredprotocol.Within theautomotive industry thepredominant

    networkhasbeenCAN(ControllerAreaNetwork)andthisisdiscussedingreaterdetail

    in Chapter 3. In the past eight to ten years it has been realised by automobile

    manufacturers that the CAN protocol will not be sufficient for future application

    requirements (Thomas Noltey, 2005). This is the main reason behind FlexRays

    development. The FlexRay protocol is not intended necessarily to replace CAN.

    Throughbeingabletooperateasingleprotocolforanapplicationthiscanreducethe

    complexityassociatedwithoperatingmultipleprotocolsviagateway/s.Consideration

    ofvariousaspectsofeachprotocolaretobetakeintoaccountsuchascost,knowledge

    of all protocols and the time required to implement these protocols are some

    examplesofsomeofthepossibleissuesencountered.

    Asconsumersexpecthigher luxury levels inautomobiles, this increases the loadson

    thecurrentnetworkprotocols(Schedl,2007).This,combinedwiththeeverincreasing

    amountofsafetyapplicationsbeingdeveloped,hasresultedinpredictionsbyDrAnton

    SchedlattheVectorFlexRaySymposium2007amongstothers, thatcurrentnetwork

    protocolswillnotbeabletocopewiththisdemandinthenearfuture(Schedl,2007).

    In 2000 the FlexRay consortiumwas founded by automobilemanufacturers BMW,

    Daimler Chrysler and semiconductor manufacturers Motorola semiconductors

    products sector (now Freescale semiconductors) and Philips semiconductors.Other

    leading companies in the automotive industry soon joined. It is anticipated that

  • ThesisOverview

    3

    FlexRaywill replaceCAN (as thedefactoautomobilenetwork) forcriticalandsafety

    applications.

    WhileFlexRayisanticipatedasthesolutiontosafetycriticalhighspeedapplications,it

    is also anticipated that CAN technology will continue to be used in less critical

    applications. Amigration from the CAN network to the FlexRay networkwould be

    requiredwhereCANhasreachedmaximumcapacityornewfeaturesareaddedtoan

    application that requires someof the featuresprovided foron theFlexRaynetwork.

    This research aims to provide a framework that will allow applications that have

    previously operated on the CAN network, to successfully operate on the FlexRay

    network.

    1.2 SpecifiedSolution

    One solution is to develop a framework tomigrate from the CAN network to the

    FlexRaynetwork.Toachieveasuccessfulmigrationaminimumrequirementisthatthe

    minimumtimingparametersintheCANnetworkareatleastachievedorexceededin

    the FlexRay network. This requires a detailed understanding of both network

    technologies,butspecificallytheFlexRaynetworkasitismorecomplex.

  • ThesisOverview

    4

    1.3 ResearchQuestions

    Question1:

    Whatarethebenefitsofusingthemigrationframeworkversustheuseofagateway?

    Question2:

    Whatmigration techniques used in other or similar protocols are applicable in this

    research?

    Question3:

    Whatparametersarerequiredinrelationtotheapplicationandnetworkprotocol,for

    migrationtobeundertaken?

  • ThesisOverview

    5

    1.4 DocumentLayout

    Thethesisisarrangedasfollows;

    SectionI:ThesisOverviewThis section, Thesis Overview presents the problem specification and the

    researchquestions.

    SectionII:LiteratureReviewThe Literature Review section discusses the background of automotive

    networks before presenting the CAN and FlexRay protocols in depth. An

    embedded systemoverview isdiscussedbefore the section concludeswitha

    reviewofmigrationprocedurescarriedoutbyotherauthors.

    SectionIII:FrameworkDevelopmentThis section, Framework Development, presents the requirements and

    methodologyforundertakingthismigrationprocedure.

    SectionIV:Testing&ResultsSection IV, Testing & Results, presents the system model and the actual

    migrationframework.Thesectionproceedswiththeabstractandexperimental

    implementationsof thegenericmodeland theACC (AdaptiveCruiseControl)

    referencemodelandtheVerificationofTimeTriggeredproperties.Thesection

    concludeswithapresentationoffindingsandadiscussionofresults.

    SectionV:ConclusionSectionV contains the conclusion, and anypotential futurework thatwould

    improvethisresearch.

    SectionVI:AppendicesSectionVIconcludesthethesiswiththeappendices.

  • ThesisOverview

    6

    1.4.1 References

    THOMASNOLTEY,H.H.,LUCIALOBELLO(2005)AutomotiveCommunicationsPast,CurrentandFuture

    SchedlDA,2007,GoalsandArchitectureforFlexRayatBMW,1stVectorFlexRaySymposium,Stuttgart,Germany.

  • SectionIILiterature

    Review

  • AutomotiveNetworksReview

    8

    2 Automotive Networks Review:

    2.1 Introduction

    This chapter contains a general assessment of what a computer network is, and

    reviewscommonnetworktopologies.TheTCP/IPandOSIreferencemodel layersare

    presenteddue to their use in the transportationofdatapackets. This leadsonto a

    historyofautomotivenetworksdiscussingvariousclassesofautomotiveprotocols.The

    ElectronicControlUnit(ECU)ispresentedduetoitscoreuseinthedevelopmentand

    implementationofnetworks intheautomotive industry.Finallyautomotiveprotocols

    arediscussedateventtriggeredand timetriggered levelandadirect comparison is

    madebetweenthenaturesofbothprotocols.

    2.2 ComputerNetworks

    A network is a series of points or nodes interconnected by communication paths

    (Harbeck,2006)

    TheInternetisthemostcommondatanetworkthatpeoplecomeintocontactwithon

    adailybasis.TheInternetevolvedfromasmallacademicresearchprojectinvolvinga

    few dozen sites to become a vast worldwide system of interconnected networks

    providing various functions and services. The first computer networks were

    timesharing networks that usedmainframes and attached terminals (Teare, 1999).

    Timesharingistheconceptofmultipleusersgettingaccesstotheprocessorduringthe

    processorsidletime.

    By networking remote locations to these powerful computers (timesharing) the

    required tasks could be completedmore economically. Currently an entire industry

    providesnetworkingtechnologiesandservices.

  • AutomotiveNetworksReview

    9

    2.3 NetworkFunction

    AnetworkconsistsoftwoormoredevicesinterconnectedasillustratedinFigure21.

    One of the earliest network typeswas built to allow several computers to share a

    singleprinter.

    A networks function is the transportation of data (e.g. data from a computer to a

    printer).Networkingcanbecomplexbecausetherearesomanydifferenttechnologies

    availablethatcanbeusedtoconnecttwoormorenetworkstogether(Comer,2001).

    Asdatanetworksweredevelopingduring the 1970s and the 1980s the automotive

    industry was also starting to realise the advantages of implementing networks in

    automobiles. Originally, automobiles had relatively small quantities of electric and

    electroniccomponents,usuallyintheformofclosedloopcircuits.Forexample,oneof

    theearliestapplicationswas the controlandoperationof lights.Additional features

    suchaswindscreenwipersandenginemanagementsystemsincreasedthecomplexity

    andvolumeofwiring in thewiringharness.This led to thedevelopmentof thebus

    structureinthe1980s.Thedefactobusstructureintheautomotiveindustrybecame

    theControllerAreaNetwork(CAN).Thestructuresofconventionaldatanetworksand

    automotivenetworkshavesomesimilarities. In the followingsection the featuresof

    both network types are discussed at network level in relation to the following;

    topology,architectureandprotocols.

    Figure 2-1: A Simple Network Example

  • AutomotiveNetworksReview

    10

    2.4 NetworkTopologies

    ThetermTopologyreferstothelayoutoftheinterconnectingdevicesonanetwork.

    Thereare two typesof topologies; thephysical topologywhichdescribes thecable,

    node,andconnectorarrangements,andthere isthe logicaltopologywhichdescribes

    thearrangementofdevicesonanetwork (Steinke,2000).The followingdescription

    dealswithphysicaltopologies.

    ThemainphysicaltopologiesareBus,StarandRing.Thenamesaregiveninrelationto

    the general shape of each network. The type of topology used depends on the

    configurationrequirementsofthesystem.

    2.4.1 BusTopology

    TheBusTopology(showninFigure22)canconsistofacommonmedium,suchasco

    axialcable (10base2 (thinnet)or10base5 (thicknet))orun/shielded twistedpair

    (Institute,2002).

    All the other nodes on the network can be directly connected off this. Because all

    nodes share a commonbus they can also share communication.Thebeginning and

    endofthebusareterminatedtopreventsignalreflectingbackdownthecable.Ifthe

    centralbus fails (e.g. thecable iscut)nodesateithersideof thebreakcancease to

    functioncorrectly,iftheyarerequiredtocommunicatewitheachother.UsingtheCAN

    protocol information travelsalong thecentralbusandwhichevernode requests the

    Figure 2-2: Bus topology

  • AutomotiveNetworksReview

    11

    informationmatchesthemessageIDandthenitcanextracttheinformationfromthe

    bus. Ifthemessage IDdoesnotmatchthenode IDthenodedoesnotgainaccessto

    thatmessage.Ifasinglenodeisremovedfromthenetworkitdoesnotaffecttherest

    ofthesystem.

    2.4.2 StarTopology

    The Star Topology is basedon theprinciple of a centralisedhost throughwhich all

    other nodes communicate (Figure 23). If one node wants to communicate with

    anothernode it is required tosend thedata through thecentralprocessorand then

    distribute it to the desired node. If the central processor node fails, subsequently

    communicationishalted.

    2.4.3 RingTopology

    The Ring Topology or RingNetwork consists of each node being connected totwo

    othernodestoformaringasillustratedinFigure24.Ifonenodesendsdatatoanode

    that isnotdirectly connected, thedatahas togo throughall theothernodes in its

    path.Thedatacantraveltwopaths(leftorright)togettoitsdestinationnode.

    Figure 2-3: Star Topology

  • AutomotiveNetworksReview

    12

    2.4.4 MeshTopology

    InafullyconnectedMeshTopology(asillustratedinFigure25)everynodeisdirectly

    connected toallothernodeson thenetwork.Thismakes itpossible forallnodes to

    senddataat thesame time.Thisalsoallows for redundancy tobe incorporated into

    any systemusingamesh topology configuration.Amessage can takeanalternative

    routeifonerouteiscorruptedorblocked.Duetotheamountofwiringrequiredthisis

    consideredacostlyapproach.

    Figure 2-4: Ring Topology

    Figure 2-5: Mesh Topology

  • AutomotiveNetworksReview

    13

    2.4.5 HybridTopology

    ThesethreetopologytypescanbecombinedtomakeHybridTopologiessuchasaTree

    Topology where there is a central bus and there is a ring and/or star topologies

    branchingoff.

    2.5 LAN(LocalAreaNetwork)&WAN(WideAreaNetwork)

    Networkscangenerallybecategorised inoneoftwofundamentalgroups;LAN(Local

    AreaNetwork)andWAN(WideAreaNetwork).Theseincorporatesomefeaturesfrom

    theOSI(OpenSystemsInterconnect)modelwhichisdiscussedindetailinsection2.9.

    2.5.1 LAN

    LANs connect as few as two devices together or asmany as a few thousand. The

    interconnectionbetweenthedevicescanbeviacableorwirelessmeans.LANsusually

    connectdevicesthatareinrelativecloseproximitytoeachothersuchasaworkstation

    andaprinterinthesamebuilding.InaLAN,aservercancontaindataapplicationsand

    servicesthatotherdevicesareallowedaccess.Ethernetisatechnologythatiswidely

    associatedwith LANs. Ethernet LAN primarily dealswith the physical and datalink

    layers (Teare, 1999). TheMAC layer on a LAN uses amethod called Carrier Senses

    Multiple Access/Collision Detection (CSMA/CD) for dealing with contention on the

    network. A device using CSMA/CD, listens on the networkwhen it has data to be

    transmittedand,ifnootherdeviceisusingthenetworkittransmits.Aftertransmission

    it listenstosee ifacollisionhasoccurred. Ifacollisionhasoccurredeachmessage is

    retransmittedafterarandom lengthoftime. Ifanumberofotherdevicesareusing

    the network, performance degrades due to the increased number of collisions.

    Introducing switches on a network subdivides the network into smaller collision

    domainsresultinginlesscontentionandimprovedperformance.

  • AutomotiveNetworksReview

    14

    2.5.2 WAN

    WANsareusedtoconnectmultipleLANsoveralargerarea.AWANusesdedicatedor

    switched connections to link computers in geographically remote locations that are

    toowidely dispersed to be directly linked to the LAN (Parnell, 1997). They can be

    connected via public telecommunications system or private communications. The

    Internetisanexampleofapubliccommunicationssystem.

    2.6 CommunicationProtocol

    Acommunicationprotocolisasetofrulesorstandardsthatenablescommunications

    ordata transferbetween twoendpoints (SearchNetworking.com,2007).Aprotocol

    enables communication between a host and a remote host as long as the

    communication takes place on the same level. If the rules are not kept then

    communicationcannotoccur.TheTCP/IP referencemodel is illustrated in figure26

    butisnotpresentedindetailasitisnotcoveredinthescopeofthisresearch.

    Figure 2-6: TCP/IP Model

  • AutomotiveNetworksReview

    15

    2.7 AutomotiveNetworksHistory

    Asdatanetworksbeganevolving,theautomotiveindustrywasbeginningtoaddmore

    electronic components and features to automobiles, such as air conditioning and

    electricwindows.Whiledatanetworksweredevelopedto improvequalityofservice

    and increase data transfer rates, the automotive industries initialmotivationwould

    havebeenfundamentallyfinancial.Thishaschangedinrecentyearsasthenumberof

    safety critical applications increases and consumers demand more comfort

    applicationssuchasclimatecontrol.Theintroductionofanetworkedbusstructurein

    automobileshasleadtoareductioninthesizeofwiringharnesses.Reducingthesize

    ofawiringharnessalsoyieldedareductionintheweightoftheautomobileandinturn

    thiswouldimprovefuelefficiency.

    While initially introducing networks in cars reducedweight, this also lead to other

    safety/nonsafety applications being developed, this increased weight and power

    consumption.Theavailabilityofintegratedcircuitsinthe1960sandthe1970sallowed

    furtherdevelopmentofautomotiveelectronicsandthedevelopmentoftheelectronic

    controlunit(ECU).TheuseoftheECUallowedenginemanagementparameterstobe

    varieddependingonexternalconditions likeengine loadandairtemperature.Atthe

    time, the main factor pushing automotive electronics development was exhaust

    emissions regulations.Mechanicalmethods alone could not provide themeans to

    meet these new requirements while maintaining performance and efficiency

    (Fischerkeller, 2007). It was then realised that the microcomputer adapted for

    automotive use could address the requirements for emission controls while

    maintainingperformanceforthedrivingenthusiast.Themicrocomputercouldhandle

    data from the spark timingwith variations in the load speed, inputs from sensors

    providing data on crankshaft position, coolant temperature etc (Jurgen, 1999).

    Increaseddevelopmentof integratedcircuitsallowedcarmanufacturers toeliminate

    passivecomponents.Thenwiththedevelopmentofmicroprocessor,electronicengine

  • AutomotiveNetworksReview

    16

    controls, antilock braking systems and trip computer revolutionised automobile

    electronics(Buchholz,2006).

    Originally, as automobile manufactures started to develop more electronic based

    applications for cars, there was no link between the electronics industry and the

    automotive industry. The automotive industry wanted the technology to be as

    economical aspossible,butwithin theelectronics industry allnew technologies are

    initiallyexpensive (due to research anddevelopment costs) and thenbecomemore

    cost effective due to improvements in productionmethods, product life cycles and

    widespreadadaption.

    It is no coincidence that during the 1980s the seminal breakthrough in automotive

    network development was facilitated by the production of more powerful ICs

    (IntegratedCircuits).TheCANprotocolwasalsodevelopedduringthisperiodandby

    theearly1990shadbecomethedefactostandard intheautomotive industry.There

    havebeenothervariantsof thisprotocolsuchasTTCAN,CANOpen,DeviceNet,CAN

    Kingdom and J1939. Proprietary variants such as J1850 PWM, J1850 VPM and ISO

    91412weredevelopedindividuallybymanufacturersbutthesearenotincludedinthe

    scopeofthisresearch.Therearealsothreeotherprimaryautomotiveprotocols.Local

    InterconnectNetwork (LIN)wasdevelopedasa lowcost, lower speedalternative to

    CAN for use primarily in noncritical body control unit (BCU) functions. TheMedia

    Oriented System Transport (MOST) protocol was developed with high bandwidth

    infotainmentsystemsspecificallyinmind.TheFlexRayprotocolwasdevelopedforuse

    insafetycriticalapplications.

    2.8 AutomotiveNetworksDescription

    Automotive networks can be classified by their protocols. There are four main

    protocolsCAN,LIN,FlexRayandMOST.Eachprotocolisselectedforitsabilitytomeet

    thesystemrequirementswhilekeepingthe implementationandbuildcostsas lowas

    possible.TherelativecostperdatarateisillustratedinFigure28.

  • AutomotiveNetworksReview

    17

    Ageneralruleofthumbisthatthefastestnetworkstendtobethemostexpensiveas

    is illustratedbyFigure28. LINoperatesat speedswithamaximumdata rateof20

    Kbit/sandistypicallyusedinapplicationsthatrequirethedrivertoinitiateoperation.

    In critical applications that occur rapidly or do not require the driver to initiate

    operationthefasternetworkssuchasCANandFlexRaywithspeedsofupto10Mbit/s

    (1Mbit/sforCAN)areusedeventhoughtheyaremoreexpensiveto implementthan

    LIN. In 1994 the SocietyofAutomotive Engineers (SAE) defined the classificationof

    fourclassesofnetworks;ClassA,ClassB,ClassCandD.

    ClassA:Datarates10kbits/orlower ClassB:Dataratesfrom10to125kbits/s ClassC:Dataratesfrom125kbits/sto1Mbit/s ClassD:Dataratesover1Mbit/s

    ClassA isused inthebodyelectronicsofthecarandanexampleisLINasmentioned

    above.ClassB isused to share informationbetweenECUs to reduce thenumberof

    sensors required.A low speedCANnetworkwould fall into this category.A classC

    network would be utilised by a realtime highspeed communications system i.e.

    Figure 2-7: Cost Vs Data Rate of Different Automotive Protocols

  • AutomotiveNetworksReview

    18

    powertrain or chassis applications using high speed CAN. And finally the class D

    network isusedbyMOSTandFlexRay inapplications that requirepredictabilityand

    faulttolerance(NICOLASNAVET,2005).

    While the protocol parameters change from protocol to protocol a basic network

    structurecanbesummarised inFigure29.CAN (ControllerAreaNetwork) is thede

    factonetwork standard in theautomotive industry.CANoperatesonapeertopeer

    basisi.e.nomasterorslave,amessageistransmittedandthenodethatrequiresthe

    datagainsaccesstothedataandprocessesit.

    InFigure210we seean illustrationofanetworkconfigurationwhereeachnode is

    directly connected to every other node on the network (pointtopoint). Figure 25

    (meshtopology)isalsoanexampleofthisasispreviouslyexplained.Forasimplefour

    nodesystem there isnotmuchsystemcomplexity,butmodernhigh tomediumend

    automobiles have over 70 interconnected ECUs therefore dramatically increasing

    system complexity (A. Albert1, 2005). Networking eliminates redundant wiring

    becauseasensoronlyhastobewiredtothenearestcontrollerandthecontrollerwill

    transmittheinformationoverthenetwork(JaredBusen,2006).

    Figure 2-8: Basic Network Configuration

  • AutomotiveNetworksReview

    19

    Networking improvesmany aspectswithin the automotive industry such as design

    flexibility,diagnosticsandreducedwiring/weigh/cost (PhilipKoopman,1998).Design

    flexibilityisimprovedbecausedesignersjusthavetodesignasfarasthecontrollerand

    thenetworktakestheinformationtotherequiredcontrollerinadifferentpartofthe

    automobile.Havingonecentralaccesspointonthenetworkandconnectingthis into

    thediagnosticstoolenableserrormessagesonthebustobereadandanalysed.This

    enables problems to be located quicker than having to test each functional area

    individually.

    Networkingallowstheprovisionforscalabilitywithinasystem.Thisallowsasystemto

    growasmoreapplicationsareadded.Asystemcanonlygrow if in the initialdesign

    stageprovisionismadeforpossibleexpansionorincreaseddatathroughputatalater

    stage.

    2.8.1 GenericNodeComposition

    Examining the componentsof a typical automotivenetworknode reveals a general

    outlinesimilartothatinFigure211.HereasensorprovidesinputdatatoanElectronic

    ControlUnit (ECU).Thesensorsdata isprocessed in theECUand transmittedacross

    Figure 2-9: Point-to-Point Network

  • AutomotiveNetworksReview

    20

    thenetworksothatanyrequiredactionswillbetakenifnecessary.Foroutputdatawe

    couldhaveanactuatorinplaceofthesensor.

    BeforetheintroductionofECUsintoenginemanagementsystemstheamountoffuel

    inacylinder,quantityofairmixedinandtheignitiontimeofthesparkplugswereall

    parameterssetbythedesigneratdesigntime.ByintroducingECUsthisenabledthese

    parameters to bemapped depending on varying engine load values, quality of air

    mixture etc. By having optimum operating conditions the car can achieve its best

    performance as efficiently as possible.With greater emphasis on reducing carbon

    emissions, it iswith the aidof an ECU that these regulations canbemet. The ECU

    receives data from the sensor and uses data tables and calculations to make

    adjustmentstotheactuatingdevices(Jurgen,1999).TheECUcanalsohelptoperform

    systemdiagnosiswheneveranerroroccurs.

    2.9 ECU

    Theelectroniccontrolunit(ECU)inanautomobilehasthreemainfunctions;

    Performdecisionmakingcapabilities(e.g.adjustintakevalues) Performarithmeticcalculations Storedata Readinputsfromsensors PerformActuationsbasedondecisions

    Figure 2-10: A Basic Node Comprising of a Sensor and ECU

  • AutomotiveNetworksReview

    21

    TheECU isbasedaround themicroprocessorbecause itcanperform the threebasic

    requirementsasmentionedabove.Modernautomobilesneedprocessingcapabilities

    ofcomputersandcomputersarebasedaroundmicroprocessors.Themicroprocessor

    acts as a CPU (Central Processing Unit) for a computer. Early microprocessors

    processeduptoeightbitsatatimebutnowadaysmicroprocessorsareavailablein16

    bitand32bitformat,whichenableshigherprocessingspeeds.

    TheCPUworksinasequentialmannerandaclock,usuallyacrystalclock,controlsthe

    timing.Thisenables frequenciesofseveralmegahertzgivinghigherprocessorspeeds

    and greater accuracy for clock samples.When an instruction is received and needs

    temporarystorageintheCPUitisstoredinthememoryregisters.Withintheregisters

    eachwordreceivedisstoredinmemory.

    Figure212illustratesamicroprocessorwithassociatedregisters.Italsoillustratesthe

    program counter that keeps track of where any instructions are stored and what

    instructions theCPU requires running.TheALU (ArithmeticLogicUnit)performs the

    arithmeticcalculationsinbinary.AnydatathatisbeingprocessedbytheALUisstored

    intheaccumulatoruntilthecalculationisfinished.Thecontrolunitdirectsmovement

    ofdata in thecomputer.Whatenablesamicroprocessor tocarryout instructions in

    Figure 2-11: Microprocessor Block Diagram

  • AutomotiveNetworksReview

    22

    thedesiredmanneraretheinstructionsitreceives,theseinstructionswouldusuallybe

    conveyedviasoftwarethroughaprogram.

    A basic computer can consist of the following elements; a microprocessor, extra

    memory,inputsandoutputs.Dataisstoredataspecificaddressismemoryand,when

    theprocessorrequiresdata,fetchesitfromthataddress.

    When storing data inmemory the type ofmemory used is influenced by the tasks

    function.Sourcecodedoesnotchangeandthereforewouldbestored inROM(Read

    OnlyMemory). If the same taskwas performed repeatedlywithout change in the

    processthenROMtypeofmemorycanbeselected,anexampleofthiswouldbeona

    fuel management system that uses fixed data. If the data is only required for a

    temporaryperiodthenRAM(RandomAccessMemory)canbeused.Oncethepoweris

    disconnectedfromthistypeofmemorythedataislost.Anexampleofthiswouldbea

    tripcomputer inaautomobile (alsocalledruntimedata) (Hillier,1996).Nonvolatile

    RAM (NVRAM) isalsoused in instanceswhere storeddata isnot tobeerased.The

    primaryareawhereNVRAMisusedisindatarecordingsuchasintheodometer.

    Abusinterconnectsthecomponentsofthemicroprocessor;thesebusesarenamedin

    relationtothedatatheycarrysuchastheaddressbus,databusandcontrolbus.For

    an automotive based computer the inputs and outputswould typically be sensors,

    transducersandactuators.

    Current practice in the automotive industry is that the physical network bus

    interconnecting between nodes is a cable. Connectors attach the cable to the

    hardware.Theprotocolisacontributingfactorwhencablespecificationsareset.

    2.10 AutomotiveNetworkProtocols

    Asdiscussedintheprevioussectiononereasonforintroducingnetworksintomodern

    automobiles was due to the increased levels of new features and applications in

    automobiles. Design engineers decide what protocol is run on the network. Some

  • AutomotiveNetworksReview

    23

    considerationsthathavetobetaken intoaccountwhendecidingwhatprotocolshall

    beusedare;

    Istheapplicationcritical? Whatspeedsarerequiredfortheapplication? Whatcostsareassociatedwitheachprotocol? Isthetechnologyreadilyavailabletodeveloptheapplicationwiththechosen

    protocol?

    Theanswertothesequestionswilloftendecidetheprotocolchosen,whetheritisan

    eventtriggered(ET)ortimetriggered(TT)system.

    2.10.1 EventTriggeredProtocols

    Inaneventtriggered(ET)system,trafficgetsputontothenetworkafteraneventhas

    occurredsuchasthedriverpressingthebrakes.Thisisasynchronoustransferbecause

    there isnopredetermined timeatwhich theseeventswilloccur.Becauseanyevent

    canoccuratanytimeinanyorder,thenetworkhastohaveadevelopedsystemthat

    willavoidcollisions if twomessageson twoseparatenodes trytogainaccessto the

    networkat the same time.This isachievedby taggingeachmessagewithapriority

    level.Themessagewiththehighestprioritywillbegrantedaccesstothebusonceitis

    free.Thisisanefficientuseofbandwidthduetothefactthatonlymessagesthatneed

    tobetransmittedwillbelookingforaccesstothenetwork(NICOLASNAVET,2005).An

    eventtriggeredcommunicationcontrollerdoesnotneedadispatchingtablebecause

    thetransmissionofamessageistriggeredbyasendcommandfromthehost(Kopetz,

    2000).

  • AutomotiveNetworksReview

    24

    2.10.2 TimeTriggeredProtocols

    Withthetimetriggered(TT)protocol,transmissionoccursatpredefinedpointsintime

    (AndreiHagiescu,2007).Activitiescanonlyoccurwiththeprogressionoftimeandthe

    activity ispredefined.This requires thenetwork tohaveapredefinedschedule that

    assignsactivities/tasksasectionofthetime(timeslot)toperformtherequiredaction.

    Eachtask ismadeupofmessages. Ifamessage isnottransmitted in itsdefinedtime

    slotitwaitsuntilitsnexttimeslot.

    InFigure213,amessageisassignedslottwo(S2)inwhichtotransmit.Ifthemessage

    doesnotobtainaccesstothebus inslot(S2) itsnextassignedslotwhere itwillgeta

    chancetogainaccesstothebusisinslotseven(S7).

    A timetriggered communication controller contains a dispatching table in its local

    memory that determineswhat point in time a particularmessage is transmitted or

    whenthatmessageisexpectedtobereceived(Kopetz,2000).Ifanewnodeisadded

    tothenetworkallothernodesneedtobeupdatedduetoachangeintheschedule(if

    the new nodewas an unplanned addition). This can result in inefficient bandwidth

    usageassomemessagesmightnotneedtotransmitthewholetime,butwillneedto

    beallocatedslotsbythesystemdesigner(AndreiHagiescu,2007).

    2.10.3 ComparisonofEventTriggeredandTimeTriggeredNetworks

    ETsystemshaveanadvantageoverTTsystemswhen itcomes toaddingnewnodes

    onto thenetwork.WithET systems thenewnode canbeaddedonwhere as inTT

    systems the new node has to be scheduled into the system at design time. This

    Figure 2-12: Time Triggered Slots on a Network

  • AutomotiveNetworksReview

    25

    involvesthesystemdesignerreorganisingthesystemscheduletoaccommodatethe

    new IDsonthenewnode.Asstatedpreviouslybandwidthefficiency isgreateronET

    systemsbecauseamessagecanbetransmittedifbandwidthisavailablewhereasona

    TTsystemamessagecanonly transmitwhen ithasbeenscheduledtodosoeven if

    therearenomessagesscheduledintheslotsbeforeit.TTsystemscanbefaulttested

    to ahigherdegreebecause thedesignerhas the scheduleprior to execution. InET

    systems run time testing is critical for catchingpotential faultsdue to theaperiodic

    natureoftheprotocol.AlsoinTTnetworks,sincetheapplicationdoesnotcontrolthe

    timings there isacommon timebase forallnodeswhichallows thecommunication

    controllertosynchronisetothemessageschedule(Hartwich,2007).

    After considering these features the properties of each protocol can be examined.

    OnlyCANandFlexRayarediscussedasLINandMOSTwerenotencounteredduring

    thisresearch.

    2.11 Conclusion

    In this chapter the conceptof computernetworkswas introduced startingwith the

    generalprincipleandmovingontoautomotivesystems.Differingnetwork topologies

    andarchitectureswerediscussedbeforeanexampleoftheTCP/IPreferencemodelis

    presented,whoseprotocolisusedextensivelyintheInternet.Thesevenlayersofthe

    OSIreferencemodelareexplainedasthisreferencemodel isusedtocompare layers

    ofotherprotocols.Abriefhistoryaboutthereasonsforusingofnetworkswithinthe

    automotive industry is presented along with an overview of a nodes hardware

    composition.Finally thechapterconcludeswithadiscussiononTTandETprotocols

    andacomparisonofstrengthsandweaknessofthetwo.

    This chapterpresents thenecessarybackground tounderstanding thepurposesand

    requirementsofnetworkswithintheautomotiveindustry.Bypresentingdatanetwork

    models suchas theOSImodel thisallows comparisons tobemadewhendiscussing

    automotive protocols in later chapters such as the comparisonmade in Chapter 3

    betweenCANand theOSImodel.Bypresentinganoverviewof thevariousnetwork

  • AutomotiveNetworksReview

    26

    types (TT and ET) the limitations and advantages of each architecture type are

    revealed.

  • AutomotiveNetworksReview

    27

    2.12 References

    A.Albert1BP,F.Voetz1,2005,SimulationEnvironmentforInvestigatingtheImpactsofTimeTriggeredCommunicationonaDis