Vehicle Networks. CAN-based Higher Layer Protocols. Univ.-Prof. Dr. Thomas Strang, Dipl.-Inform. Matthias Röckl



Similar documents
Product Information CANalyzer.J1939

The SAE J1939 Communications Network

ISO11783 a Standardized Tractor Implement Interface

TD-03011E. Identifier Usage in CANopen Networks

Local Interconnect Network Training. Local Interconnect Network Training. Overview

Getting Started with CANopen Version Application Note AN-AON

Distributed Real-Time Systems (TI-DRTS) Track 2. CAN-BUS Introduction. Version Ref. VECTOR application note & Motorola note

Computer Network. Interconnected collection of autonomous computers that are able to exchange information

In-Vehicle Networking

Objectives of Lecture. Network Architecture. Protocols. Contents

PEMS Conference. Acquiring Data from In-Vehicle Networks. Rick Walter, P.E. HEM Data Corporation

RA Automotive. Silver Scan-Tool for the testing of OBD functionality. Peter Stoß Senior Manager RA Automotive. Mai 2008

Understanding SAE J1939. by Simma Software, Inc.

How To Understand The Layered Architecture Of A Network

PC-Based Vehicle OBD Tester

Overview. Securing TCP/IP. Introduction to TCP/IP (cont d) Introduction to TCP/IP

IP Networking. Overview. Networks Impact Daily Life. IP Networking - Part 1. How Networks Impact Daily Life. How Networks Impact Daily Life

Transport and Network Layer

J1939: Opening Up AUTOSAR to the Heavy Vehicle Industry

Networking Test 4 Study Guide

Introduction To The CANopen Protocol Version 1.1 Application Note AN-ION

Communication Networks. MAP-TELE 2011/12 José Ruela

LIN (Local Interconnect Network):

Jena er Antriebstechnik. GmbH. 1. Introduction. 2. Properties. 3. Hardware. 4. Baud Rates. Brief Instructions - CANopen Interface

RPDO 1 TPDO 1 TPDO 5 TPDO 6 TPDO 7 TPDO 8

2. IP Networks, IP Hosts and IP Ports

Communication Networks. MAP-TELE 2011/12 José Ruela

Ethernet. Ethernet. Network Devices

Virtual KNX/EIB devices in IP networks

CANopen high-level protocol for CAN-bus

FOUNDATION Fieldbus High Speed Ethernet Control System

Security (II) ISO : Security Architecture of OSI Reference Model. Outline. Course Outline: Fundamental Topics. EE5723/EE4723 Spring 2012

Industrial Networks & Databases

Hardware & Software Solutions

Note! The problem set consists of two parts: Part I: The problem specifications pages Part II: The answer pages

Protocols and Architecture. Protocol Architecture.

Written examination in Computer Networks

Note! The problem set consists of two parts: Part I: The problem specifications pages Part II: The answer pages

Chapter 1: Introduction

IP Network Layer. Datagram ID FLAG Fragment Offset. IP Datagrams. IP Addresses. IP Addresses. CSCE 515: Computer Network Programming TCP/IP

How To Design A Layered Network In A Computer Network

EITF25 Internet Techniques and Applications L5: Wide Area Networks (WAN) Stefan Höst

Guide to Network Defense and Countermeasures Third Edition. Chapter 2 TCP/IP

Diagnostic of off-highway machinery for agriculture

Transport Layer Protocols

Elettronica dei Sistemi Digitali Costantino Giaconia SERIAL I/O COMMON PROTOCOLS

K-line Communication Description

Computer Networks/DV2 Lab

Basic Networking Concepts. 1. Introduction 2. Protocols 3. Protocol Layers 4. Network Interconnection/Internet

Vorlesung Kommunikationsnetze Fieldbus Systems

1. SAFETY PRECAUTIONS AND WARNINGS

CONTROL MICROSYSTEMS DNP3. User and Reference Manual

Access Control: Firewalls (1)

Communication Systems Internetworking (Bridges & Co)

Network-Oriented Software Development. Course: CSc4360/CSc6360 Instructor: Dr. Beyah Sessions: M-W, 3:00 4:40pm Lecture 2

Course Overview: Learn the essential skills needed to set up, configure, support, and troubleshoot your TCP/IP-based network.

CS335 Sample Questions for Exam #2

Introduction to. LIN (Local Interconnect Network)

Per-Flow Queuing Allot's Approach to Bandwidth Management

CCNA R&S: Introduction to Networks. Chapter 5: Ethernet

Internet Control Protocols Reading: Chapter 3

Tutorial.

Introduction to RACE FUELS Hans-Christian von der Wense Munich, Germany

First Semester Examinations 2011/12 INTERNET PRINCIPLES

OIL PRESS 71.8 PSI FUEL. Cloud based, diagnostic, engine monitoring and reporting system.

imc BUSDAQ autonomous intelligent synchronized Field bus data acquisition - from stationary to mobile imc productive testing

Network layer" 1DT066! Distributed Information Systems!! Chapter 4" Network Layer!! goals: "

Introduction to J1939 Version Application Note AN-ION

Based on Computer Networking, 4 th Edition by Kurose and Ross

ANTAL ELECTRONIC Field Bus and Communication Technology. Manual PDP2CAN. Version 3.08

Internet Protocol: IP packet headers. vendredi 18 octobre 13

CSE 3461 / 5461: Computer Networking & Internet Technologies

ISOBUS Task Controller Workshop. Presented by Andy Beck / Hans Nissen John Deere

ICOM : Computer Networks Chapter 6: The Transport Layer. By Dr Yi Qian Department of Electronic and Computer Engineering Fall 2006 UPRM

The OSI Model and the TCP/IP Protocol Suite

Review: Lecture 1 - Internet History

IP address format: Dotted decimal notation:

IP - The Internet Protocol

Lecture Computer Networks

A Transport Protocol for Multimedia Wireless Sensor Networks

Internetworking. Problem: There is more than one network (heterogeneity & scale)

Layered Architectures and Applications

Chapter 3. Internet Applications and Network Programming

Protocol Architecture

Architecture and Performance of the Internet

VXLAN: Scaling Data Center Capacity. White Paper

Introduction to Computer Networks

ESSENTIALS. Understanding Ethernet Switches and Routers. April 2011 VOLUME 3 ISSUE 1 A TECHNICAL SUPPLEMENT TO CONTROL NETWORK

CSIS CSIS 3230 Spring Networking, its all about the apps! Apps on the Edge. Application Architectures. Pure P2P Architecture

Introduction to LIN. Webinar

In networking ECUs in heavy-duty vehicles, it is the J1939 protocol that. plays a key role. J1939 networks are based on the CAN bus (high-speed

Protocol Specification & Design. The Internet and its Protocols. Course Outline (trivia) Introduction to the Subject Teaching Methods

Chapter 11. User Datagram Protocol (UDP)

Industrial Requirements for a Converged Network

Overview of Computer Networks

Data Link Layer Overview

Computer Networks. Chapter 5 Transport Protocols

Software Development for Multiple OEMs Using Tool Configured Middleware for CAN Communication

Transcription:

Vehicle Networks CAN-based Higher Layer Protocols Univ.-Prof. Dr. Thomas Strang, Dipl.-Inform. Matthias Röckl

Outline Introduction General-purpose HLPs ISO TP TP2.0 Special-purpose HLPs Vehicle-Operational Purposes: CANopen SAE J1939 Diagnostics Purposes: ISO 15765-3 (KWP2000/CAN) Unified Diagnostic Services On-Board Diagnostics

Introduction Pure CAN provides fast, prioritized, reliable, broadcast message transmission with sophisticated error detection and error handling Pure CAN can fulfill all requirements of small closed systems Pure CAN cannot satisfy the requirements that have to be fulfilled within large, extendable, interconnected networks from different manufacturers Higher Layer Protocols (HLP) required that enable the interconnection of these networks Inter-manufacturer connection is of major importance for all kinds of utility vehicles: Trucks Tractors Snowcats Extension: Harvesters Foresters Cranes Fixed attached components: blue lights, information systems, taximeter Dynamic attached components: trailers, seeders, dozer blades Highly dynamic attaches components: Fleet management system

Introduction Functions that have to be fulfilled by HLPs: Definition of common message identifiers, their meaning, format and respective data types to enable interoperability Flow control Transportation of messages > 8 bytes Node addressing to address a specific device Networking via gateways Network management: Startup, maintenance and shutdown behavior Status reporting, diagnosis Application Application Application Application CAN Low Speed Interconnecting Higher Layer Protocol CAN Low Speed CAN High Speed CAN High Speed Other Protocols

Introduction CAN in ISO/OSI Reference Model No. of layer ISO/OSI ref model CAN protocol specification 7 Application Application specific 6 Presentation 5 Session 4 Transport 3 Network 2 Data Link 1 Physical Optional: Higher Layer Protocols (HLP) CAN protocol (with free choice of medium)

Introduction Protocol messaging Layer N Layer N-1 Protocol Data Unit (PDU) of layer N becomes Service Data Unit (SDU) of layer N-1 (N-1)-SDU extended with Protocol Control Information (PCI) and Footer becomes (N-1)-PDU Terminology Layer 1 PDU: bits Layer 2 PDU: frame Layer 3 PDU: packet Layer 4 PDU: segment PCI PCI (N)-PDU Payload SDU (N-1)-PDU Footer Footer RECAP

Introduction Protocol service primitives Layer N Layer N-1 Service Access Points (SAP) provide services to upper and lower layers SAP to layer (N-1) Request Confirmation SAP to layer (N) Response Indication End system A (N)-Service User SAP (N-1)-Service Provider Network Protocol (PDU) End system B (N)-Service User (1) Request (4) Confirmation (3) Response (2) Indication SAP (N-1)-Service Provider RECAP

Introduction Network Layer Transmission of packets over multiple intermediate hops Protocols: IPv4, IPv6, ICMP, IGMP Main functions: Global addressing Routing, e.g.: Flooding Link State Routing Distance Vector Routing Hierarchical Routing Fragmentation Quality of Service RECAP

Introduction Transport Layer Data exchange over a logical connection between end-to-end systems Protocols: TCP, UDP, DCCP, SCTP Main functions: Reliability management: Reliable communication (e.g. TCP by acknowledgements) Unreliable communication (e.g. UDP) Segmentation with (un)ordered delivery Flow control: Overload at receivers Congestion control: Overload of the network Connection management: Connection-oriented (e.g. TCP) Connectionless (e.g. UDP) Error Control Multiplexing of concurrent services RECAP

General-purpose HLPs ISO-TP

ISO-TP Overview ISO-TP = ISO Transport Protocol Designed to run existing diagnostics protocols (ISO 14230) on CAN Unreliable connection-oriented transport protocol enabling: Segmentation (transmission of up to 4095 bytes) Flow Control Broadcast and unicast addressing Uses CAN on Data Link layer Standardized under ISO 15765-2 E.g. used with diagnostics protocols KWP2000 and UDS

ISO-TP Frames Frame Types: Single Frame: 0x0 Data Length 0..7 Data Bytes Standard frame for unsegmented data First Frame: 0x1 Data Length Data Length 0..6 Data Bytes Initial frame in a sequence of frames Consecutive Frame: 0x2 Seq Number 0..7 Data Bytes Subsequent frame in the sequence (SN modulo 2 4 ) Flow Control Frame: 0x3 Flow Status Block Size Separation Time Response of the receiver specifying min. timing and max. buffer size (=block size) for consecutive frames In case of error (timeout or wrong sequence number) application layer is informed but not sender of the message no inherent reliability, application layer has to handle errors 4 bit 4 bit 8 bit 8 bit 0-127ms 0-127ms 0-127ms

ISO-TP Addressing Flow control requires unicast communication Addresses have to be predefined and statically assigned Addressing schemes: Normal Addressing: Source and destination address are encoded in CAN identifier Extended Addressing (for gateways): Additional Transport-PCI Byte (= first byte of CAN payload) with gateway address CAN payload reduced to 0..6 bytes

General-purpose HLPs TP2.0

TP2.0 Overview Designed to allow existing diagnostics protocols on CAN2.0A Mainly used by Volkswagen Group Connection-oriented transport protocol enabling: Segmentation of arbitrary size Flow control with handshake Dynamic assignment of CAN identifier per channel (vs. static assignment of CAN identifiers in ISO-TP) Automatic recovery after timeout Addressing: Unicast Multicast, e.g. all ECUs on the powertrain Broadcast

TP2.0 Broadcast communication Allows usage of gateways (specified by Logical Address) Broadcast messages with and without required response CAN Identifier Opening ID CAN Payload Address Logical Opcode SID Para meter Service ID Request 0x23 Response 0x24 Para meter

TP2.0 Connection-oriented unicast communication Connection setup request/response message: CAN Identifier Opening ID Address Opcode RX ID TX ID Data message: Connection shutdown message: Opening ID Opcode CAN Payload Destination ID Request 0xCO Positive Response 0xD0 Negative Response 0xD6-0xD8 Connection Test 0xA3 Positive Response 0xA4 Negative Response 0xA8 Sender ID Opening ID Opcode 1..7 Data Opening ID Opcode ACK APP Type ID of application e.g. 0x01 Diagnostics Includes Sequence Number, Receive Ready (for Flow Control), etc.

TP2.0 Message sequence 1. Channel Setup 2. Data Exchange Block-wise data transmission Cumulative acknowledgements 3. Channel Shutdown

Special-purpose HLPs CANopen

CANopen Overview Developed by CAN in Automation (CiA) since 1995 Originally developed for motion-oriented machine control networks, by now it is also used to network: medical electronics, automotive-, industrial- and rail-vehicles, laboratory automation systems, building automation systems, embedded networks such as passenger information systems, gambling machines and professional coffee machines, vehicle add-ons (blue lights, taximeter, etc.) Standardized in 2002 under EN 50325-4 Features: CAN 2.0A on Data Link layer (optional CAN 2.0B) Network auto-configuration Access to all device parameters Device synchronization Cyclic and event-driven data transfer Synchronous reading or setting of inputs, outputs or parameters

CANopen Overview Three parts: Application Layer Object Dictionary Communication Profile Based on: Zeltwanger 2007, CANopen Application Object Dictionary Communication Profile Area Manufacturer Specific Profile Area Standardized Device Profile Area Network Variables Area Index 1000-1FFF 2000-5FFF 6000-9FFF A000- AFFF Value Communication Profile SDO PDO

CANopen Object Dictionary and Profiles Every CANopen device has a standardized device specification, the Object Dictionary (OD) It includes general objects (ID, manufacturer, etc.) and status objects (temperature, speed, etc.) Semantics of the OD-objects are defined in the Electronic Data Sheet (EDS) Objects are addressed by 16-bit index + 8-bit subindex 1000-1FFF: Communication profile area (CiA DS-301) 2000-5FFF: Manufacturer-specific profile area 6000-9FFF: Standardized device profile area (e.g. CiA DS-401) A000-AFFF: Network variables (NWV) CANopen defines: Communication profiles: definition of fundamental communication mechanisms Device profiles: unambiguous definition of manufacturer-independent ODparameters describing the device and its network behavior (i.e. input/output modules, drives, encoders, etc.) Devices become interoperable and interchangeable between manufacturers

CANopen Communication Profile Process Data Objects (PDO): Transport of real-time data (=operational data) Service Data Objects (SDO): Read and write OD entries (=system parameters) Special Object Messages: Synchronization (SYNC) Cyclic time synchronization Time Stamp (TIME) Adjustment of global network time Emergency Object (EMCY) Indicate device internal errors Administrative Messages: Network Management (NMT) Node state monitoring Error Control: Cyclic heartbeat, Node/Life guarding PDO Process Data Object Real-time data High priority Max. 8 Bytes Broadcast communication Pure CAN No confirmation Communication Profile SDO Service Data Object System parameters Low priority Data aggregation (>8 Bytes) Unicast communication Data addressing by index Confirmed services

CANopen Device and Application Profiles (extract) CiA 301: CANopen application layer and communication profile CiA 401: Device profile for generic I/O modules CiA 402: Device profile for drives and motion control (servo controller, stepper motor controller, frequency inverter) CiA 404: Device profile for measuring devices and closed-loop controllers CiA 406: Device profile for encoders (rotating and linear) CiA 413: Set of device profiles for truck gateways CiA 415: Application profile for road construction machine sensors CiA 418: Device profile for battery module CiA 419: Device profile for battery charger CiA 422: Application profile for municipal vehicles (e.g. garbage trucks) CiA 423: Application profile for power drive systems (e.g. diesel engine) CiA 424: Application profile for rail vehicle door control systems CiA 447: Application profile for special-purpose car add-on devices

CANopen CiA DS-447 Car add-on devices Attachment of add-on devices, such as blue light, siren, taximeter, etc. Standardization finished in 2008

CANopen CiA DS-413 Device profiles for truck gateways

CANopen Source: Zeltwanger 2005: J1939-based application profiles ISO 11783 (ISOBUS) for agricultural and municipal vehicles, based on J1939 and NMEA-2000

Special-purpose HLPs SAE J1939

SAE J1939 Specified by Society of Automotive Engineers (SAE) heavy trucks and bus division The SAE J1939 set of profiles is based on the CAN data link layer (ISO 11898-1) using the extended frame format (CAN2.0B) with 29-bit identifier Features Unicast and broadcast communication Network management Transport protocol functions: data segmentation, flow control Definition of parameter groups Support of real-time close loop control Applications Light to heavy trucks Agriculture equipment e.g. tractors, harvester, etc. Engines for public work

SAE J1939 Standards SAE J1939-71 Truck and bus power-train network Defines all parameters as well as assembled messages called parameter groups SAE J1939-31 Network layer Defines repeaters, routers, gateways and bridges SAE J1939-73 Application layer diagnostics Defines diagnostic messages SAE J1939-21 Data link layer Defines commonly used messages such as Request, Acknowledgement and Transport Protocol SAE J1939-11 Physical layer Physical layer based on ISO 11898-2 at 250 kbit/s with up to 30 devices and a maximum of 40 m bus length (twisted shielded pair) SAE J1939-81 Network management Defines message sequences for initialization and constraints on the use of addresses (e.g. address claiming)

SAE J1939 Message Format Priority 3 CAN 29-bit-Identifier Structure Reser ved 1 Data Page 1 Parameter Group Number (PGN) 18 PDU Format 8 PDU Specific Priority: Priority during the arbitration phase (lower value = higher priority) Reserved: Reserved for future usage (always 0) Data Page selector: Expands parameter groups (for future usage) PDU Format: Global PGNs for broadcast parameter groups PDU Format >= 0xF0 = 240 10 PDU Specific: Group Extension (further PDU type specification) Specific PGNs for unicast parameter groups PDU Format <= 0xEF = 239 10 PDU Specific: Destination Address 8 Source Address 8

SAE J1939 Example Engine Temperature message: Broadcast transmission with 1 Hz Priority 6 S Arbitration Control O F Field Field Data Field CRC Res 0 DP PDU Format 0 254=0xFE CAN 2.0B Frame PDU Specific 238=0xEE Source Address??? Coolant Temperature Fuel Temperature Engine Oil Temperature Turbo Oil Temperature Engine Intercooler Temp. Not defined 8 8 16 16 8 8 Torque/Speed Control message: Unicast transmission to Engine (=00) with 100 Hz to Engine-Retarder(=15) with 20 Hz Priority 3 Res 0 DP PDU Format 0 0 PDU Specific 15 (= Engine-Retarder) Source Address 11 (= ABS/TC) A C K End of Frame Control Bits Requested Speed / Speed Limit Requested Torque / Torque Limit Not defined 8 16 8 32

SAE J1939 Transport Layer The Transport Protocol specifies the breaking up of large amounts of data into multiple CAN-sized frames, along with adequate communication and timing to support effective frame transmission between nodes Two types: Broadcast Announcement Message (BAM) Broadcast communication Connection-less (e.g. no handshake) Unreliable No flow control Connection Mode Data Transfer (CMDT) Unicast communication Connection-oriented (2-way handshake) Reliability by cumulative ACKs Flow control by windowing

SAE J1939 Addressing Address: Unique identity within a session Every device requires a unique address (0-253) 254: zero address 255: broadcast address Included in every message Can change during re-configuration Name: Probably unique identifier within the network Provides functional identification of ECUs Used to arbitrate in the case of an address selection conflict Name

SAE J1939 Network management Dynamic address allocation (address claiming) Address conflict detection Address conflict resolution

SAE J1939 Application Source: Vector 2006, CAN und J1939 Unter extremen Einsatzbedingungen Source: CLAAS 2005, Diagnose bei CLAAS

SAE J1939 Fleet Management System (FMS) Supervise a whole fleet - consisting of vehicles from different manufacturers - over the Internet Developed by the 6 major European truck manufacturers Daimler, MAN, Scania, DAF, IVECO, Volvo/Renault Based on J1939 Vehicle data shall be available for third parties but internal vehicle busses shall be untouched Secure and legal solution for the remote download of data e.g. from the digital tachograph Following traffic Individual re-routing because of congestion control GPS Positioning Congestion Floating cars report position + velocity + x

Special-purpose HLPs Diagnostics

Diagnostics Interchange of digital information between an on-board ECU and a off-board diagnostic tester to facilitate inspection, test, diagnostics and configuration Layer 7-5 Layer 4-3 Layer 2-0 Manufacturer enhanced diagnostics Unified Diagnostic Services ISO 14229 ISO 14230-3 ISO 14230-2 K-Line ISO 15765-3 Diagnostics on CAN ISO 15765-2 ISO 11898 CAN TP2.0 Legislated diagnostics On-Board Diagnostics (OBD) ISO 15031 ISO 15031-5 K-Line CAN J1850 Based on: Zimmermann, Schmidgall 2007: Bussysteme in der Fahrzeugtechnik Mandatory after 2008 in US

Diagnostics ISO 15765-3 Diagnostics on CAN Diagnostics on CAN standardized in ISO 15765-3 in 2004 Enables interoperability between off-board diagnostic tester and onboard ECU ISO 15765-3 is based on the Keyword Protocol 2000 (KWP2000) protocol Client-Server with simple request-response communication Off-board Diagnostic Tester Vehicle Gateway ECU ECU ECU ECU

Diagnostics ISO 15765-3 Diagnostics on CAN Client-Server communication: Client (=diagnostic tester) initiates request and waits for confirmation Server (=ECU) receives indication and sends response Services Diagnostic Management: Control of diagnostic sessions Network Layer Protocol Control Data Transmission: Read from and write to ECUs Stored Data Transmission: Read Diagnostic Trouble Codes (DTC) Input/Output Control: Control of ECU I/O Remote Activation of Routines: ECU program startup Upload/Download: ECU Flashing

Diagnostics ISO 15765-3 Diagnostics on CAN Message formats: Service ID SID SID 0x40 Error ID Service Request Request Parameters Positive Response Response Parameters Negative Response SID Error Code

Diagnostics Unified Diagnostic Services Unified Diagnostics Services (UDS) standardized by ISO 14229 Advancement of Diagnostics on CAN for general usage Whereas ISO 15765-3 relies on CAN, UDS is independent of lower layer protocols Technically UDS is almost identical to Diagnostics on CAN, advancements are mainly the restructuring of SIDs and unification UDS also defines, as one of the first protocols, a security layer in order to encrypt data APP UDS CAN Security Layer Security Layer APP UDS CAN

Diagnostics On-Board Diagnostics Self-diagnostic and reporting capability of modern vehicles Guarantees standardized access to vehicle information for: fault diagnostics by repair shop and emission inspection by technical inspection agencies ( TÜV ) Mandatory in Europe for: gasoline vehicles manufactured since 2001 diesel vehicles manufactured since 2003 OBD provides diagnostic data on: Emission-related components (e.g. lambda sensor, catalytic converter) Engine Vehicle electronics

Diagnostics On-Board Diagnostics Service ID SID Parameter ID PID Service Request 0..6 Byte Request Parameters Service Identifiers (SID): Fault memory 0x03 Request emission-related diagnostic trouble codes 0x02 Request powertrain freeze frame data 0x04 Clear emission-related diagnostic information Test of emission-related components 0x05 Request oxygen sensor monitoring test results 0x06 Request control of on-board system, test or component Read ECUs 0x01 Request current powertrain diagnostic data 0x09 Request vehicle information Parameter Identifier (PID): 0x04 Calculated Load Value 0x05 Engine Coolant Temp 0x0A Fuel Pressure (gage) 0x0C Engine RPM 0x0D Vehicle Speed 0x11 Absolute Throttle Position

Questions Why are Higher Layer Protocols (HLP) required? What are the main functions of HLP in automotive environments? Why almost all HLPs introduce unicast communication?