Controlled Area Network: A Brief Summary

By Unknown - September 04, 2018

Controlled Area Network: A Brief Summary 


Controller Area Network (CAN) History & Motivation
The increased number of vehicle embedded electronic devices driven by new personalized features have resulted in an increasingly complex point-to point wiring system that were becoming heavier and more and more expensive in 1980's. By this period one of the most important electronic automotive suppliers (Bosch) realized that the electronic devices communication paradigm must be changed. Bosch developed the Controlled Area Network (CAN) and published on SAE congress in 1986. The approval and acceptance of the automotive industry in following years pushed several CAN protocols to be adjusted and standardized until it becomes an international standard (ISO 11898) in 1993.
CAN main benefits are quickly described on the following topics:
1. Lower Cost
-Wiring & Weight reduction: Instead of having a complex point to point wiring system the CAN system migrates the ECUs communication from analogue hardwired signals to a single bus;
Figure 1: Pre CAN vs CAN System
-Electronic Engineering & Tooling lower costs and flexible development: A stable hardware allows software implementation with many possible ECU configurations, quicker feature addition and bug fix through software instead of changing the hardware design.
Example: A given vehicle system (Figure 2) was updated to add some level of Advanced Driver Assistance System (ADAS). The vehicle updated ADAS module (ECU 3) needs to have priority to control the Brake System Actuator (Actuator 1) through ABS module (ECU 1) based on Speed Sensor (Sensor 1) input and also needs to communicate the Cluster (ECU 2) what were the warnings/actions taken in order to display the information to the driver.
Figure 2: Pre CAN vs CAN System Solutions
Pre CAN solution would drive wiring addition and hardware & software modifications to all ECUs. In a CAN system as the actuators and sensors were previously present on vehicle architecture it would only be needed ECUs software/configuration upgrades to broadcast the new required signals through CAN messages.
2. Centralized and prioritized broadcast communication
The CAN messages are broadcasted which means that all network connected ECUs are able to read the transmitted messages sent by any other CAN node in the bus. Messages have priority ID's that enables the developer to arbitrate which critical messages need to have the dispatch prioritized.
3. Error and diagnostic enhanced capability
As the ECUs centralize communications in a single bus it becomes easier to diagnostic failures by using pre-defined Diagnostic Trouble Codes (DTCs), reading Data Identifiers (DIDs) or monitoring if the messages exchanging is working as per functional specification. Also frames with errors are disregarded by all CAN nodes based on Cyclic Redundancy Check (CRC) network specification. In case of many errors being detected continuously, individual nodes error sender shall stop transmitting or disconnect itself from the network.
CAN topology
CAN network topology is designed to connect all nodes in a CAN High and CAN Low circuit creating a common bus with two terminators. Each terminator must have a 120 Ohm resistance (may be 100 Ohms but not less) and shall be placed in the furthest distance apart on the bus. The absence of a 120 Ohms resistor have direct influence on dominant/recessive bit ramp up/ramp down timing. Also measure a resistance in a CAN line is a quick debug action to be taken when investigating failing communication.
 Figure 3: CAN Bus Topology Configuration (ISO 11898)
Some good robustness practices are adopted when designing the system:
  1. Apply wiring twisted pairs throughout the total run of the vehicle;
  2. Project vehicle wiring package to avoid let CAN circuits be easily accessed from out of the vehicle cabin;
  3. Adopt short CAN stubs to non connected ECUs (in case of wiring reduced complexity);
Data can be shared in different ways in a CAN bus:
  • High Speed (ISO 11898-2): 1Mbps maximum speed up to 40 meters length between terminator nodes;
  • Low Speed/ Fault tolerant (ISO 11898-3): 125Kbps maximum speed up to 500 meters between terminator nodes;
Low Speed CAN is normally applied to non critical ECUs which messages are not related with any safety function (e.g. Climate Control Unit and Door Control Unit).
Figure 4: CAN Signaling comparison
 CAN is also faster then traditional digital communication methods due to a reduced switching time, driving less time for CAN High to rise and CAN Low to drop.
CAN Frame details:

Figure 5: CAN Frame Structure
  • SOF (Start of Frame): This is a bit dominant that informs other ECUs that a message is coming after a bus idle.
  • Identifier: Contains Message ID number (11 or 29 bits) and defines message priority.
  • RTR (Remote Transmission Request): Allows ECUs to request messages from other ECUs. This is a dominant bit when additional data information is required from other CAN node.
  • IDE(Identifier Extention): A dominant bit means CAN2.0A (11-bit identifier). Recessive bit means CAN2.0B (29-bit identifier).
  • r0: Reserved bit. Normally a dominant bit.
  • DLC (Data Length Code): Number of bytes of data being transmitted.
  • Data: 0-8 data bytes.
  • CRC (Cyclic Redundancy Check): 15 bits containing a checksum of the preceding application data to check data integrity and detect errors, plus an additional delimiter recessive bit. 
  • ACK (Acknowledgment)- The transmitter node sends a recessive acknowledgment bit and every receiver node that identifies the message as accurate overwrites it with a dominant bit. If the receiving node does not change this bit it means that the message may have an error and will be discarded. A ACK delimiter recessive bit is sent post the ACK.
  • EOF (End of Frame): Marks the frame end with a sequence of 7 recessive bits and disables the bit stuffing.
  • IFS (Interframe Space) - 7 bits space to CAN controller move the received frame to a buffer dedicated area.
 How does arbitration work in a CAN bus?
The higher priority identifier always wins bus access. The network management engineer is able to define which messages shall be published first in case of conflict. The lower identifier binary value, the higher its priority.
Figure 6: CAN Arbitration
How does stuff bit works?
During a CAN frame it's not possible to have more than 5 consecutive bits of the same value. When a similar situation happens it's published an opposite logic value that is ignored and not counted on the frame.
Figure 7: Stuff bit example
CAN Bus Load calculation
 A CAN System is able to handle a high number frames in the same bus although it's not limitless. A high tech automobile can have up to 60 ECUs and depending of the quantity of frames being published the bus traffic can get overloaded and affect the communication integrity.  
CAN frames are differentiated by 4 message classifications: fixed periodic, event periodic, event on change and network management. The Bandwidth utilization calculation can be estimated by the following equation:
When the estimated bandwidth utilization is above 60% it's recommended a gateway module usage. The networks shall be grouped by common sub-systems (i.e Infotainment, Powertrain, Driver Controls, Safety, Body Modules, etc). In these subsystems the majority of messages exchanged have transmitter and receiver in the same network . Required signals from other subsystems shall be transmitted by the gateway module.   
Even in a "gatewayed" system it's still necessary to have special attention with the manufacturing ECUs programming process. The vehicle EoL (End of Line) ECU programming process trends to increase the number of messages being transmitted in a CAN bus because it tries to configure many modules at the same time to speed up the manufacturing process enabling a faster mass production line. Depending of the number of CAN nodes this EoL method may substantially increase the bus load directly affecting the communication integrity.  
CAN FD & Automotive Ethernet
As long as the optional features become standard and new features are added in a connected vehicle the communication protocols need to get improved to proper support the customer needs. CAN FD and Automotive Ethernet have been recently applied in automotive industry trying to close the robustness gap left by traditional CAN and create new foundations for the upcoming embedded connectivity and business models but this will be the subject of a future article.
Thanks!
Do not forget to follow our blog and

  • Share:

You Might Also Like

0 comments

Featured Post

تعليم برامج الادوبي

مرحبا   . بلشت نزل فيديوات باللغة العربية قناتي في اليوتيوب لتعليم   برامج الادوية. لمزيد من المعلومات  رجاء تسجيل في القنات الفيديوات  للمب...

Watch this small video about IDL