《CAN网络如何工作外文翻译.doc》由会员分享,可在线阅读,更多相关《CAN网络如何工作外文翻译.doc(17页珍藏版)》请在三一办公上搜索。
1、机 电 与 车 辆 学 院毕 业 设 计(论 文)外 文 翻 译题 目:基于单片机的CAN实验系统设计专 业: 电子信息工程 班 级: 姓 名: 学 号: 指导教师: 日 期: 2012年5月29日 How the CAN network functionsPrinciples of data exchange. When data are transmitted by CAN, no stations are addressed, but instead, the content of the message (e.g. rpm or engine temperature) is desig
2、nated by an identifier that is unique throughout the network. The identifier defines not only the content but also the priority of the message. This is important for bus allocation when several stations are competing for bus access.If the CPU of a given station wishes to send a message to one or mor
3、e stations, it passes the data to be transmitted and their identifiers to the assigned CAN chip (”Makeready”). This is all the CPU has to do to initiate data exchange. The message is constructed and transmitted by the CAN chip. As soon as the CAN chip receives the bus allocation (”Send Message”) all
4、 other stations on the CAN network become receivers of this message (”Receive Message”). Each station in the CAN network, having received the message correctly, performs an acceptance test to determine whether the data received are relevant for that station (”Select”). If the data are of significanc
5、e for the station concerned they are processed (”Accept”), otherwise they are ignored. A high degree of system and configuration flexibility is achieved as a result of the content-oriented addressing scheme. It is very easy to add stations to the existing CAN network without making any hardware or s
6、oftware modifications to the existing stations,provided that the new stations are purely receivers.Because the data transmission protocol does not require physical destination addresses for the individual components, it supports the concept of modular electronics and also permits multiple reception
7、(broadcast, multicast) and the synchronization of distributed processes: measurements needed as information by several controllers can be transmitted via the network, in such a way that it is unnecessary for each controller to have its own sensor.Broadcast transmission and acceptance filtering by CA
8、N nodesNon-destructive bitwise arbitration.For the data to be processed in real time they must be transmitted rapidly. This not only requires a physical data transfer path with up to 1 Mbit/s but also calls for rapid bus allocation when several stations wish to send messages simultaneously. In real-
9、time processing the urgency of messages to be exchanged over the network can differ greatly: a rapidly changing dimension (e.g. engine load) has to be transmitted more frequently and therefore with less delays than other dimensions (e.g. engine temperature) which change relatively slowly. The priori
10、ty at which a message is transmitted compared with another less urgent message is specified by the identifier of the message concerned. The priorities are laid down during system design in the form of corresponding binary values and cannot be changed dynamically. The identifier with the lowest binar
11、y number has the highest priority. Bus access conflicts are resolved by bitwise arbitration on the identifiers involved by each station observing the bus level bit for bit. In accordance with the ”wired and” mechanism, by which the dominant state (logical 0) overwrites the recessive state (logical 1
12、), the competition for bus allocation is lost by all those stations with recessive transmission and dominant observation. All ”losers” automatically become receivers of the message with the highest priority and do not reattempt transmission until the bus is available again.Efficiency of bus allocati
13、on. The efficiency of the bus allocation system is determined mainly by the possible application for a serial bus system. In order to judge as simply as possibly which bus systems are suitable for which applications the literature includes a method of classifying bus allocation procedures. Generally
14、 we distinguish between the following classes:Allocation on a fixed time schedule.Allocation is made sequentially to each participant for a maximum duration regardless of whether this participant needs the bus at this moment or not (examples: token slot or token passing).Bus allocation on the basis
15、of need.The bus is allocated to one participant on the basis of transmission requests outstanding, i.e. the allocation system only considers participants wishing to transmit (examples: CSMA, CSMA/CD, flying master, round robin or bitwise arbitration). For CAN, bus allocation is negotiated purely amo
16、ng the messages waiting to be transmitted. This means that the procedure specified by CAN is classified as allocation on the basis of need. Another means of assessing the efficiency of bus arbitration systems is the bus access method:Non-destructive bus access. With methods of this type the bus is a
17、llocated to one and only one station either immediately or within a specified time following a single bus access (by one or more stations). This ensures that each bus access by one or more stations leads to an unambiguous bus allocation (examples: token slot, token passing, round robin, bitwise arbi
18、tration)Destructive bus allocation. Simultaneous bus access by more than one station causes all transmission attempts to be aborted and therefore there is no successful bus allocation. More than one bus access may be necessary in order to allocate the bus at all, the number of attempts before bus al
19、location is successful being a purely statistical quantity (examples: CSMA/CD, Ethernet). In order to process all transmission requests of a CAN network while complying with latency constraints at as low a data transfer rate as possible, the CAN protocol must implement a bus allocation method that g
20、uarantees that there is always unambiguous bus allocation even when there are simultaneous bus accesses from different stations. The method of bitwise arbitration using the identifier of the messages to be transmitted uniquely resolves any collision between a number of stations wanting to transmit,
21、and it does this at the latest within 13 (standard format) or 33 (extended format) bit periods for any bus access period. Unlike the message- wise arbitration employed by the CSMA/CD method this nondestructive method of conflict resolution ensures that no bus capacity is used without transmitting us
22、eful information. Even in situations where the bus is overloaded the linkage of the bus access priority to the content of the message proves to be a beneficial system attribute compared with existing CSMA/CD or token protocols: in spite of the insufficient bus transport capacity, all outstanding tra
23、nsmission requests are processed in order of their importance to the overall system (as determined by the message priority). The available transmission capacity is utilized efficiently for the transmission of useful data since ”gaps” in bus allocation are kept very small. The collapse of the whole t
24、ransmission system due to overload, as can occur with the CSMA/CD protocol, is not possible with CAN. Thus, CAN permits implementation of fast, traffic-dependent bus access which is non-destructive because of bitwise arbitration based on the message priority employed. Non-destructive bus access can
25、be further classified into centralized bus access control and decentralized bus access control depending on whether the control mechanisms are present in the system only once (centralized) or more than once (decentralized). A communication system with a designated station (inter alia for centralized
26、 bus access control) must provide a strategy to take effect in the event of a failure of the master station. This concept has the disadvantage that the strategy for failure management is difficult and costly to implement and also that the takeover of the central station by a redundant station can be
27、 very time-consuming. For these reasons and to circumvent the problem of the reliability of the master station (and thus of the whole communication system), the CAN protocol implements decentralized bus control. All major communication mechanisms, including bus access control, are implemented severa
28、l times in the system, because this is the only way to fulfil the high requirements for the availability of the communication system. In summary it can be said that CAN implements a traffic-dependent bus allocation system that permits, by means of a non-destructive bus access with decentralized bus
29、access control, a high useful data rate at the lowest possible bus data rate in terms of the bus busy rate for all stations. The efficiency of the bus arbitration procedure is increased by the fact that the bus is utilized only by those stations with pending transmission requests. These requests are
30、 handled in the order of the importance of the messages for the system as a whole. This proves especially advantageous in overload situations. Since bus access is prioritized on the basis of the messages, it is possible to guarantee low individual latency times in real-time systems.Message frame for
31、mats.The CAN protocol supports two message frame formats, the only essential difference being in the length of the identifier (ID). In the standard format the length of the ID is 11 bits and in the extended format the length is 29 bits. The message frame for transmitting messages on the bus comprise
32、s seven main fields. A message in the standard format begins with the start bit ”start of frame”, this is followed by the ”arbitration field”, which contains the identifier and the ”RTR” (remote transmission request) bit, which indicates whether it is a data frame or a request frame without any data
33、 bytes (remote frame). The ”control field” contains the IDE (identifier extension) bit, which indicates either standard format or extended format, a bit reserved for future extensions and - in the last 4 bits - a count of the data bytes in the data field. The ”data field” ranges from 0 to 8 bytes in
34、 length and is followed by the ”CRC field”, which is used as a frame security check for detecting bit errors. The ”ACK field”, comprises the ACK slot (1 bit) and the ACK delimiter (1 recessive bit). The bit in the ACK slot is sent as a recessive bit and is overwritten as a dominant bit by those rece
35、ivers which have at this time received the data correctly (positive acknowledgement). Correct messages are acknowledged by the receivers regardless of the result of the acceptance test. The end of the message is indicated by ”end of frame”. ”Intermission” is the minimum number of bit periods separat
36、ing consecutive messages. If there is no following bus access by any station, the bus remains idle (”bus idle”).Detecting and signalling errors. Unlike other bus systems, the CAN protocol does not use acknowledgement messages but instead signals any errors that occur. For error detection the CAN pro
37、tocol implements three mechanisms at the message level:Cyclic Redundancy Check (CRC) The CRC safeguards the information in the frame by adding redundant check bits at the transmission end. At the receiver end these bits are re-computed and tested against the received bits. If they do not agree there
38、 has been a CRC error.Frame check This mechanism verifies the structure of the transmitted frame by checking the bit fields against the fixed format and the frame size. Errors detected by frame checks are designated ”format errors”.ACK errors As mentioned above, frames received are acknowledged by a
39、ll recipients through positive acknowledgement. If no acknowledgement is received by the transmitter of the message (ACK error) this may mean that there is a transmission error which has been detected only by the recipients, that the ACK field has been corrupted or that there are no receivers. The C
40、AN protocol also implements two mechanisms for error detection at the bit level.Monitoring The ability of the transmitter to detect errors is based on the monitoring of bus signals: each node which transmits also observes the bus level and thus detects differences between the bit sent and the bit re
41、ceived. This permits reliable detection of all global errors and errors local to the transmitter.Bit stuffingThe coding of the individual bits is tested at bit level. The bit representation used by CAN is NRZ (non-return-to-zero) coding, which guarantees maximum efficiency in bit coding. The synchro
42、nisation edges are generated by means of bit stuffing, i.e. after five consecutive equal bits the sender inserts into the bit stream a stuff bit with the complementary value, which is removed by the receivers. The code check is limited to checking adherence to the stuffing rule. If one or more error
43、s are discovered by at least one station (any station) using the above mechanisms, the current transmission is aborted by sending an ”error flag”. This prevents other stations accepting the message and thus ensures the consistency of data throughout the network. After transmission of an erroneous me
44、ssage has been aborted, the sender automatically re-attempts transmission (automatic repeat request). There may again be competition for bus allocation. As a rule, retransmission will be begun within 23 bit periods after error detection; in special cases the system recovery time is 31 bit periods. H
45、owever effective and efficient the method described may be, in the event of a defective station it might lead to all messages (including correct ones) being aborted, thus blocking the bus system if no measures for self-monitoring were taken. The CAN protocol therefore provides a mechanism for distin
46、guishing sporadic errors from permanent errors and localizing station failures (fault confinement). This is done by statistical assessment of station error situations with the aim of recognizing a stations own defects and possibly entering an operating mode where the rest of the CAN network is not n
47、egatively affected. This may go as far as the station switching itself off to prevent messages erroneously recognized as incorrect from being aborted.Data reliability of the CAN protocol.The introduction of safety-related systems in automobiles brought with it high requirements for the reliability o
48、f data transmission. The objective is frequently formulated as not permitting any dangerous situations for the driver to occur as a result of data exchange throughout the whole life of a vehicle. This goal is achieved if the reliability of the data is sufficiently high or the residual error probability is sufficiently low. In the context of bus systems data, reliability is understood as the capability to identify data corrupted by transmission faults. The residual error probability is a statistical measure of the impairment of data reliability: it specifies the probability