* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Vehicle Bus_final
Survey
Document related concepts
Piggybacking (Internet access) wikipedia , lookup
Computer network wikipedia , lookup
Industry Standard Architecture wikipedia , lookup
Network tap wikipedia , lookup
Low-voltage differential signaling wikipedia , lookup
Recursive InterNetwork Architecture (RINA) wikipedia , lookup
List of wireless community networks by region wikipedia , lookup
Low Pin Count wikipedia , lookup
Airborne Networking wikipedia , lookup
UniPro protocol stack wikipedia , lookup
Transcript
Vehicle Bus Communications Network inside a Car By Mike Tran Juan Japata Thi Nguyen Objectives • A Brief Introduction to Serial Bus Systems • Common Serial Bus Systems in Motor Vehicle • A closer look at CAN protocol A Brief Introduction to Serial Bus Systems • Conventional Serial BUS • Motivation behind the Non-conventional BUS. • Common Bus in Vehicle: CAN, LIN, FlexRay, MOST Conventional Serial BUS • RS232: One-to-one exchange, non addressing nodes; power down to connect; Resync/timing OH; 9-25 wires • USB: Synchronizes bus; common clock, master to slave connections—center hub for device to connect; differential signal; 4 wires • I2C: 2-wires; any device can connect; unique address; Multi-Master/Slave structure allows any device to send and receiver, but lead to arbitration and synchronization problems with multiple clocks in system; requires node to be a master node Motivation behind the Non-conventional BUS • Electronification • Consumer demand for integrated controls of comfort and convenient • Stringent government regulation on safety and exhaust emissions • Early electronic control units (ECUs) operated independent of one another • Coordination of these ECUs has immensely improved and extended vehicle functionality and performance • In conventional networking, each of the signal to be transmitted was assigned a electrical line • Intensive networking drove wiring cost sky high Motivation behind the Non-conventional BUS: Conventional Serial BUS to Vehicle BUS • • • • Design based on borrowed ideas from RS232, USB, and I2C No Master node needed 2 wire twisted, differential signals, noise immunity No power down needed to replace the module http://canbuskit.com/what.php Common Bus in Vehicle: CAN, LIN, FlexRay, MOST and others G. Leen & D.Heffernan, “In Vehicle networks: Expanding Automotive Electronic systems,” (Jan 2002) Common Serial Bus Systems in Vehicle • CAN • LIN • FLEXRAY • RADIO FREQ • MOST source : www.aa1.car.com CAN (Controller Area Network) • CAN protocol was developed in 1980 by Robert Bosch for automotive applications • The protocol was official released in 1986 by Society of Automotive Engineer (SAE). • Since 1993 CAN was standardized and available as ISO standard (ISO 11898) • CAN network made up of CAN nodes (ECUs) with CAN interface • ECUs exchange data over their individual CAN interfaces and a transmission medium (CAN bus) that interconnects all the CAN nodes CAN (Controller Area Network) • CAN interface is made up of two parts: communication software and communication hardware • Software handle higher level communication services while hardware implemented the fundamental communication functions. CAN (Controller Area Network) Key benefits: • Mature technology with over 14 years, with many products and tools in the market. • ISO standard protocol • Simple transmission medium • Excellent error checking and handling • Fault confinement • Transfer rate up to 1 Mbps CAN (Controller Area Network) Typical Applications: • Safety: Passenger occupant detection, electronic parking brake • Body Control: Motor control, power door, sunroof, HVAC, lighting • Chassis: Motor control, watchdog • Powertrain: Vacuum leak detection, electronic throttle control, watchdog LIN (Local Interconnect Network) • LIN protocol was developed in the end of 1990 by group of automotive OEMs and suppliers joined with semiconductor and tool producer • LIN is a universal asynchronous receiver-transmitter (UART) – based • LIN network is a single-master, multiple-slave networking architecture LIN (Local Interconnect Network) Key benefits: • LIN protocol provides a cost-effective networking option for connecting switches, sensors and lamps in the vehicle where the bandwidth and versatility of CAN is not required • LIN master node can be connected to higher level of network such as CAN to extend the communication of in-vehicle networking all the way to individual sensor or actuator • Complements CAN as a cost-effective sub-network • LIN protocol can be generated by standard asynchronous communication interfaces (SCI, UART) with no hardware required • Synchronization mechanism means no quartz oscillator required at slave nodes • No protocol license fee LIN (Local Interconnect Network) Typical Applications: • Steering Wheel: Cruise Control, Wiper, Turning Light, Climate Control, Radio • Roof: Rain Sensor, Light Sensor, Light Control, Sunroof • Engine/Climate: Sensors, Small Motors, Control Panel (Climate) • Door/Seat: Mirror, Central ECU, Mirror Switch, Window Lift, Door Lock, Seat Position Motors, Occupant Sensors, Seat Control Panel FLEXRAY • FlexRay was originally developed around 2000 by the founding members of the FlexRay Consortium (BMW, Volkswagen, DaimlerChryler, NXP Semiconductors, General Motors, etc…) • FlexRay communications protocol is designed to provide high-speed deterministic distributed control for advanced automotive applications • FlexRay is a dual-channel architecture offers system-wide redundancy that meets the reliability requirements of safety-critical application FLEXRAY Key Features: • • • • High data rate up to 20 Mbps which increase network throughput Highly deterministic response time Dual channel redundancy System-wide synchronized time base Result in these benefits: • • • • • • Simplified vehicle network architectures Increased enhanced control intelligence Reduced wiring requirements Reduced network subsystems Distributed computing through a global time clock Electromechanical system (X-by-wire) replacing hydraulic components FLEXRAY Typical Applications: • Wheel Node: Fail-Safe, Low to Medium Performance • Body Control Module (BCM): High performance, low power, X-by wire • Master: Highest level of fault tolerance • FlexRay system can also be employed a vehicle-wide network backbone RADIO FREQUENCY (RF) • Radio frequency communications can provide additional vehicle functionality and driver convenience • RF enable a wide variety of safety and comfort features such as Remote keyless entry (RKE) Passive entry (PE) Tire pressure monitoring system (TPMS) Vehicle immobilization systems www.freescale.com RADIO FREQUENCY (RF) www.freescale.com MOST (Media Oriented System Transport) • MOST is a high-speed multimedia network technology optimized by the automotive industry in 1998 • MOST is a serial communication system that built for transmitting audio, video and control data via fiber-optic cables. • High-performance multimedia network technology based on synchronous data communication requires professional software tools and hardware interfaces. Typical Applications using MOST Autoelectronics.com MOST used in lane departure warning Autoelectronics.com www.Freescale.com LIN, CAN, FLEXRAY IN COMPARISON Autoelectronics.com Introduction to CAN CAN technology has been standardized since 1994 and is described by four ISO documents. ISO 11898-1 describes the CAN protocol. In relation to the reference model of data communication, the CAN protocol just covers the Data Link Layer (MAC — Medium Access Control, LLC — Logical Link Control) and the Physical Layer (PLS — Physical Signaling). Introduction to CAN The two ISO documents ISO 11898-2 and ISO 11898-3 cover the two sub-layers of the reference model for data communication: PMA (Physical Medium Attachment) and PMS (Physical Medium Specification). They describe two different CAN physical layers: the high-speed CAN physical layer and the low-speed CAN physical layer. They differ primarily in their definition of voltages and data transmission rates (data rates). ISO 11898-3 allows data rates up to 125 kbit/s. It is primarily used in the convenience area of the automobile. ISO 11898-2 allows data rates up to 1 Mbit/s. Consequently, ISO 11898-2 is primarily used in the powertrain and chassis areas of the automobile. Introduction to CAN ISO 11898-1 defines an event-driven communication. With a higher bus load this may lead to delays, especially for lower priority CAN messages. ISO 11898-4 is an extension of the Data Link Layer that adds a time triggered communication option for CAN-based networks. Standard and Implementation CAN Network A CAN network consists of a number of CAN nodes which are linked via a physical transmission medium (CAN bus) In practice, the CAN network is usually based on a line topology with a linear bus to which a number of electronic control units are each connected via a CAN interface. The passive star topology may be used as an alternative. An unshielded twisted two-wire line is the physical transmission medium used most frequently in applications (Unshielded Twisted Pair — UTP). The maximum data rate is 1 Mbit/s. A maximum network extension of about 40 meters is allowed. At the ends of the CAN network, bus termination resistors contribute to preventing transient phenomena (reflections). ISO 11898 specifies the maximum number of CAN nodes as 32. An ECU that performs its tasks in a CAN network is referred to as a CAN node CAN Network CAN Network An electronic control unit (ECU) requires a CAN interface, this comprises a CAN controller and a CAN transceiver. The CAN controller fulfills communication functions prescribed by the CAN protocol, which relieves the host considerably. The CAN transceiver connects the CAN controller to the physical transmission medium. Usually, the two components are electrically isolated by optical or magnetic decoupling. The CAN nodes differ in the number of CAN messages they each send or receive. For example, one CAN node might receive five different CAN messages, each at a cycle of ten milliseconds, while another CAN node just needs to receive one CAN message every 100 milliseconds, resulting two fundamental CAN controller architectures: CAN controllers with and without object storage. CAN controllers may be integrated, or they may a stand-alone chip component. In this case, the microcontroller treats the CAN controller like a memory chip. CAN Network CAN Transceiver A CAN transceiver always has two bus pins: one for the CAN high line (CANH) and one for the CAN low line (CANL). CAN Bus Physical signal transmission in a CAN network is based on transmission of differential voltages. This effectively eliminates the negative effects of interference voltages induced by motors, ignition systems and switch contacts. Twisting of the two lines reduces the magnetic field considerably. Therefore, in practice twisted pair conductors are generally used as the physical transmission medium. Terminating the ends of the communication channel using termination resistors prevents reflections in a high-speed CAN network. The key parameter for the bus termination resistor is the so-called characteristic impedance of the electrical line. This is 120 Ohm. In contrast to ISO 11898-2, ISO 11898-3 (low-speed CAN) does not specify any bus termination resistors due to the low maximum data rate of 125 kbit/s. CAN Bus CAN Bus Levels Physical signal transmission in a CAN network is based on differential signal transmission. The specific differential voltages depend on the bus interface that is used. A distinction is made here between the high-speed CAN bus interface (ISO 11898-2) and the low-speed bus interface (ISO 11898-3). ISO 11898-2 assigns logical “1” to a differential voltage of 0 Volt. A differential voltage of 2 Volt signifies logical “0”. High-speed CAN transceivers interpret a differential voltage of more than 0.9 Volt as a dominant level within the common mode operating range, typically between 12 Volt and -12 Volt. Below 0.5 Volt, however, the differential voltage is interpreted as a recessive level. A hysteresis circuit increases immunity to interference voltages. ISO 11898-3 assigns a differential voltage of 5 Volt to logical “1”, and a differential voltage of 2 Volt corresponds to logical “0”. CAN Bus Logic A basic prerequisite for smooth communication in a CAN network — especially for bus access, fault indication and acknowledgement — is clear distinctions between dominant and recessive bus levels. The dominant bus level corresponds to logical “0”. The recessive bus level corresponds to logical “1”. The dominant bus level overwrites the recessive bus level. When different CAN nodes send dominant and recessive bus levels simultaneously, the CAN bus assumes the dominant bus level. The recessive bus level only occurs if all CAN nodes send recessive levels. In terms of logic, such behavior is AND-logic. Physically, AND-logic is implemented by a so-called open collector circuit. Practice with the interactive figure “Bus Logic” to learn about the wired-AND bus logic upon which a CAN network is based. CAN Communication Principle Safety-critical applications, such as those in the powertrain area, place severe demands on a communication system’s availability. Decentralized bus access, so that each bus node has the right to access the bus. That is why a CAN network is based on a combination of multi-master architecture and line topology: essentially each CAN node is authorized to place CAN messages on the bus in a CAN network. The transmission of CAN messages does not follow any predetermined time sequence, rather it is event-driven. The communication channel is only busy if new information actually needs to be transmitted, and this allows for very quick bus accesses. A method of receiver-selective addressing is used in a CAN network. Every CAN message is available for every CAN node to receive (broadcasting). A prerequisite is that it must be possible to recognize each CAN message by a message identifier (ID) and node-specific filtering. Although this increases overhead, it allows integration of additional CAN nodes without requiring modification of the CAN network. Frame Types For transmitting user data, ISO 11898-1 prescribes the so-called data frame. A data frame can transport a maximum payload of eight bytes. For that there is the socalled data field, which is framed by many other fields that are required to execute the CAN communication protocol. They include the message address (identifier or ID), data length code (DLC), checksum (cyclic redundancy check sequence — CRC sequence) and RX acknowledgement located in the acknowledgement field. While the generator ECU of relevant information takes the initiative in sending data frames, there also is the remote frame — a frame type with which user data, i.e. data frames, can be requested from any other CAN node. Except for its missing data field, a remote frame has the same structure as a data frame. The error frame is available to indicate errors detected during communication. An ongoing erroneous data transmission is terminated and an error frame is issued. It consists of just two parts: The error flag and the error delimiter. Principle of Bus Access Each node in the CAN network has the right to access the CAN bus without requiring permission and without prior coordination with other CAN nodes. Although bus access based on an event-driven approach enables very quick reactions to events, there is the inherent risk that several CAN nodes might want to access the CAN bus at the same time. CSMA/CA (Carrier Sense Multiple Access with Collision Avoidance) method is used hereto ensure that CAN nodes wishing to send do not access the CAN bus until it is available. In case of simultaneous bus access, the CSMA/CA method based on bitwise bus arbitration ensures that the highest priority CAN message among the CAN nodes prevails. Wired-AND bus logic and arbitration logic ensure that the priority of the CAN message increases with decreasing identifier value: The smaller an identifier is, the higher the priority of the CAN message Principle of Data Protection Reliable data transmission is a prerequisite for the safety and reliability of electronic systems in motor vehicles. Therefore, CAN not only has to satisfy strict real time requirements, but must always provide for reliable data transmission. • Bit coding: helps to reduce emissions significantly. NRZ bit coding (NRZ: Non Return to Zero) was chosen for CAN. NRZ coding is that consecutive bits of the same polarity exhibit no level changes. • Twisted Pair: In symmetrical signal transmission, external noise acts equally on both lines. Ideally, the magnetic fields will exhibit opposite directions in each sub-segment, which leads to the mutual cancellation of any induced voltages or inductive effects. The effectiveness of twisting increases with the number of wraps. At least 30 wraps per meter yields good results. • Termination : On high data rates lines, reflections can be expected on the CAN bus due to finite signal propagation. The bus ends in High-Speed CAN networks must be terminated with the characteristic impedance of the physical transmission medium. The characteristic impedance of the communication channel is 120 Ohm. Logical Error Detection To detect corrupted messages, the CAN protocol defines five mechanisms: Bit monitoring, Monitoring of the message format (Form Check), Monitoring of the bit coding (Stuff Check), Evaluation of the acknowledgement (ACK Check) and Verifying the checksum (Cyclic Redundancy Check). References www.vector.com www.ni.com www.freescale.com http://www.canbuskit.com/what.php http://www.eetimes.com/discussion/murphy-s-law/4024614/A-short-trip-on-the-CAN-bus http://www.vector.com/vi_flexray_solutions_en.html http://autoelectronics.com/body_electronics/data_buses/modeling-tomorrows-networks0501/ Peckol J., On EmbeddedSystems: A Contemporary Design Tool (New Jersey: Wiley,2008) 693-720 G. Leen & D.Heffernan, “In Vehicle networks: Expanding Automotive Electronic systems,” (Jan 2002) CAN tutorial at www.computer-solutions.co.uk Atmel Microcontrollers CAN Tutorial Distributed Embedded Systems (Philip Koopman) October 5, 2011 Questions?