External buses connect ECUs, sensors, and actuators to each other. They run via a wiring harness and plug-in connections. Levels, bit rates, and impedances are precisely defined in order to ensure interoperability. Examples are CAN, FlexRay, and LIN. For a quick overview, these buses are frequently classified according to the scheme in Table 1. Internal buses connect integrated circuits on the board. They are only used inside an ECU.
CAN
Overview
The CAN bus (Controller Area Network) has established itself as the standard since its first series introduction in motor vehicles in 1991. But it is also often used in automation technology. The major features are:
– Priority-controlled message transmission with non-destructive arbitration.
– Low costs through the use of a lowcost twisted two-wire cable and use of a simple protocol with low computingpower demand.
– A data-transfer rate up to 1 Mbit/s for the high-speed CAN (CAN-C) and up to 125 kbit/s for the low-speed CAN (CAN-B, lower expenditure for the hardware).
– High reliability of data transfer through recognition and signaling of sporadic faults and permanent faults and through network-wide consistency via Acknowledge.
– The multi-master principle.
– High availability by locating failed stations.
– Standardization in accordance with ISO 11898 [1].
Transfer system
Logic bus states and encoding To communicate, the CAN bus uses the two states “dominant” and “recessive”, with which the information bits are transmitted. The dominant state represents “0”, the recessive “1”. The NRZ process (Non Return to Zero) is used as encoding for transmission, in which a zero state is not always returned to between two equal transfer states and, therefore, the time interval between two edges which is required for synchronization can become too great. For the most part a two-wire cable with, depending on the ambient conditions, a non-twisted or twisted pair is used. The two bus lines are called CAN_H and CAN_L (Figure 1).
The two-wire cable facilitates a symmetrical data transfer, in which the bits are transferred via both bus lines using different voltages. This reduces sensitivity to common-mode interference, since interference affects both lines and can be filtered out by creating the difference (Figure 2).
The single-wire cable represents a way of lowering manufacturing costs by saving on the second cable. However, a common ground connection which assumes the function of the second cable must be available to all the bus users for this purpose. The single-wire version of the CAN bus is therefore only possible for a communication system with limited spatial reach. Data transfer on the single-wire cable is more susceptible to interference radiation, since it is not possible to filter out interference pulses as on the two-wire cable. A higher level signal on the bus line is therefore required. This in turn has a negative effect on the interference radiation. The edge steepness of the bus signals must therefore be reduced compared with the two-wire cable. This is associated with a lower data-transfer rate. For this reason, the single-wire cable is only used for the low-speed CAN in the area of body and comfort and convenience electronics. The single-wire solution is not described in the CAN specification. There are also so-called fault tolerant transceivers, which communicate via a two-wire cable, but if a cable breaks continue operating as a single-wire system.
Voltage levels
High-speed and low-speed CANs use different voltage levels to transfer dominant and recessive states. The voltage levels of the low-speed CAN are shown in Figure 1a, those of the high-speed CAN in Figure 1b. The high-speed CAN uses, in the recessive state on both lines, a nominal voltage of 2.5 V. In the dominant state, nominal voltages of 3.5 V and 1.5 V are applied to CAN_H and CAN_L respectively. In the low-speed CAN in the recessive state, a voltage of 0 V (max. 0.3 V) is applied to CAN_H and a voltage of 5 V (min. 4.7 V) is applied to CAN_L. In the dominant state, the voltage at CAN_H is min. 3.6 V and at CAN_L max. 1.4 V.
Limits
It is important for the arbitration method in the case of CAN that all the nodes in the network see the bits of the message identification (frame identifier) simultaneously so that a node – while it is still transmitting a bit – sees whether another node is also transmitting. Delays result from the signal propagation time on the data bus and the processing times in the transceiver. The maximum permissible transfer rate is thus dependent on the overall length of the bus. ISO specifies 1 Mbit/s for 40 m. For longer lines, the possible transfer rate is roughly inversely proportional to the line length. Networks with a 1 km reach can be operated with 40 kbit/s.
CAN protocol
Bus configuration
CAN operates according to the multimaster principle, in which a linear bus topology connects several nodes of equal priority rating.
Content-based addressing
CAN uses message-based addressing. This involves assigning a fixed identifier to each message. The identifier (ID) classifies the content of the message (e.g. engine speed). Each station processes only messages whose identifiers are stored in the list of messages to be accepted. This is called acceptance checking (Figure 3). Thus, the CAN requires no station addresses for data transmission, and the nodes are not involved in managing the system configuration. This facilitates adaptation to variations in equipment levels.
Logic bus states
The CAN protocol is based on two logic states: The bits are either “recessive” (logic 1) or “dominant” (logic 0). When at least one station transmits a dominant bit, it overwrites the recessive bits simultaneously sent by other stations.
Bus arbitration and priority assignments
Each station can begin transmitting a message as soon as the bus is unoccupied. When several stations start to transmit simultaneously, a “wired-and arbitration scheme” becomes active to resolve the resulting bus-access conflicts. The arbitration scheme ensures that the dominant bits transmitted by a station overwrite the recessive bits of other stations (Figure 4). Each station gives bit by bit – the highest significant bit first – the identifier of its message on the bus. During this arbitration phase (selection phase) each transmitting station compares the applied bus level with the actual level. Each station that transmits a recessive bit but observes a dominant bit loses arbitration. The station with the lowest identifier – i.e. with the highest priority – is assigned first access on the bus without having to repeat the message (non-destructive access control). Transmitters respond to failure to gain bus access by automatically switching to receive mode; they then repeat the transmission attempt as soon as the bus is free again.
Data frame and message format
The CAN supports two different message formats, which primarily differ with respect to the length of their identifiers. The standard format has 11 bits, while the extended format has 29 bits. Thus, the data frame to be transmitted contains a maximum of 130 bits (in the standard format) and 150 bits (in the extended format). This ensures minimum waiting time until the next transmission (which could be urgent). The data frame for the standard format consists of seven consecutive fields (Figure 5). The “Start of Frame” indicates the beginning of a message and synchronizes all nodes.
The “Arbitration Field” consists of the message’s identifier and an additional control bit. While this field is being transmitted, the transmitter accompanies the transmission of each bit with a check to ensure that no higher-priority message is being transmitted (which would cancel the access authorization). The control bit determines whether the message is classified under “data frame” or “remote frame”. The “Control Field” contains the code indicating the number of data bytes in the “Data Field”. The “Data Field” has an information content of between 0 and 8 bytes. A message of data length 0 can be used to synchronize distributed processes. The “CRC Field” (Cyclic Redundancy Check) contains a checksum for detecting possible transmission interference. The “Ack Field” contains the acknowledgement signals with which the receivers indicate the error-free receipt of messages. The “End of Frame” marks the end of the message. Then comes the “Interframe Space” to provide a separation from the next data frame.
Transmitter initiative
The transmitter will usually initiate a data transmission by sending a data frame. However, the receiver can also request data from the transmitter. This involves the receiver sending off a “Remote Frame”. The “Data Frame” and the corresponding “Remote Frame” have the same identifier. They are distinguished by the bit that follows the identifier.
Error detection
The CAN incorporates a number of monitoring features for detecting errors. These include: – 15-bit CRC: Each receiver compares the CRC sequence which it receives with the calculated sequence. – Monitoring: Each transmitter reads its own transmitted message from the bus and compares each transmitted and scanned bit. – Bit stuffing: Between “Start of Frame” and the end of the “CRC Field”, each “Data Frame” or “Remote Frame” may contain a maximum of five consecutive bits of the same polarity. The transmitter follows up a sequence of five bits of the same polarity by inserting a bit of the opposite polarity in the bitstream. The receivers eliminate these bits again as the messages arrive. – Frame check: The CAN protocol contains several bit fields with a fixed format for verification by all stations.
Error handling
When a CAN controller detects an error, it aborts the current transmission by sending an error flag. An error flag consists of six dominant bits; it functions by deliberately violating the stuffing convention and the formats.
Fault confinement with local failure
Defective stations can severely impair the ability to process bus traffic. Therefore, the CAN controllers incorporate mechanisms which can distinguish between intermittent and permanent errors, and local station failures. This process is based on statistical evaluation of error conditions.
Implementations
The semiconductor manufacturers offer different implementations of CAN controllers which differ primarily in the extent to which they can store and manage messages. In this way, the host computer can be relieved of protocol-specific activities. A standard categorization is Basic CAN controllers, which have only a few message memories, and Full CAN controllers, in which there is room for all the messages necessary for an ECU.
Standardization
The CAN has been standardized for data exchange in motor vehicles; for applications with a low transfer rate up to 125 kbit/s as ISO 11898-3 [1] and for applications with a high transfer rate over 125 kbit/s as ISO 11898-2 [1] and SAE J 1939 (truck and bus, [2]).
Time-triggered CAN
The extension of the CAN protocol to include the capability of operating in timetriggered mode is called “Time-Triggered CAN” (TTCAN). It is fully configurable with regard to the proportion of time-triggered to event-driven communication components, and is therefore fully compatible with CAN networks. TTCAN is standardized as ISO 11898-4 [1].
CAN with flexible data rate
CAN-FD extends CAN by a second bit rate and a wider data field. Unlike the nominal bit rate previously applicable to CAN, the data bit rate is not limited to 1 Mbit/s. The data bit rate acts exclusively on the data field within the data frame, whereas the nominal bit rate still acts on the control data. In addition, CAN-FD increases the data field from 8 to up to 64 bytes. This also necessitates adaptations to the checksum so as not to compromise transmission reliability. CAN-FD is standardized as ISO 11898-7 [1].
'에너지와 과학 그리고 기술' 카테고리의 다른 글
Ethernet - 1703 (0) | 2022.12.11 |
---|---|
LIN - 1700 (0) | 2022.12.11 |
FlexRay - 1697 (0) | 2022.12.11 |
System Network Of a Motor Vehicle - 30 (0) | 2022.12.10 |
Finite-element method (FEM) - 190 (0) | 2022.12.10 |