News Press

Monday, 19 December 2011

Self-healing Fiber Optic Network of CAN BUS

Abstract: This paper describes optical characteristics of a single CAN network and the lack of work. CAN network to improve the survivability of optical fiber, optical fiber CAN bus design self-healing network. Plastic manner (POF) for the transmission medium, with a wavelength of 650nm red laser optical transceiver device of an optical / electrical conversion. Analysis of the CAN network data frame structure, it presents an interface circuit based on CPLD realization of self-healing methods. Vehicle CAN bus through the formation of self-healing fiber optic network that the network not only has the self-healing function, but also to eliminate fiber optic ring network CAN obstruction.

CAN bus is a German company Bosch 80 in the early 20th century to solve the vehicle developed a number of data exchange a serial data communication protocol. Because of its excellent properties, CAN bus become recognized some of the most promising one field bus. CAN bus transmission medium can be twisted pair, fiber optic and coaxial cable. Twisted-pair CAN bus has now been widely used, the technology has matured. Twisted-pair CAN network technology in the easy, low cost, and electromagnetic radiation on the environment have a certain immunity. But when the work environment particularly complex, its anti-interference ability is not very satisfactory. If electric vehicles on site, the situation is more complex, car electrical system will produce strong electromagnetic interference, will lead to twisted-pair CAN networks can not function properly. Compared with the twisted pair and coaxial cable, fiber superior performance - a strong anti-EMI ability to attract attention. To further enhance the performance of CAN networks should be used to make optical fiber transmission medium. As the vehicle local area network transmission distance is short, while optical CAN network in order to reduce the cost of car may make use of plastic optical fiber (POF) as a transmission medium. Plastic optical fiber transmission in high-speed short-distance communication in low cost, easy connection to bypass good, light weight, so networking and low cost. Germany's BMW in March 2002 listing of the most advanced new car "BMW7 series''used to build the car at 50m POF LAN.

CAN network of optical fiber as a low-level control of industrial local area network, its topology and used the same local area network, the basic topological structure of the bus-shaped, circular and halo shape. Single-loop fiber-optic network in the CAN, because of the delay devices will lead to loop the signal from the shock, so that ring CAN network congestion (or locked). CAN bus controller to comply with the agreement in the link layer should be to design a single fiber optic ring network CAN dedicated logic control unit LCU. The unit's functions are: implementation of the CAN bus data transceiver control, that is the master node does not forward the received data, when the data along the fiber loop back to the original sending node, he was immediately removed; from the node forwarding the received data. Can also eliminate ring fiber CAN bus network, the phenomenon of self-excitation to ensure that rings are not blocked.

Q single-loop fiber-optic network, node or network link failure may cause paralysis. In order to improve the survivability of fiber optic ring network, should constitute a self-healing function of self-healing fiber optic loop network.

A fiber-optic self-healing ring network design CAN

1.1 Structure of optical self-healing ring

CAN fiber optic self-healing ring network shown in Figure 1. The network has two fiber optic loop - clockwise and counterclockwise ring ring, each node SJAl000 CAN controller interface circuit and the loop through the fiber optic network connected to interface circuits produced by the Altera Corporation's complex programmable logic device (CPLD) EPM7128S The two optical transmitter LEDR and LEDL, two optical receivers PINR and PINL composition.

1.2 Interface Circuit Function

CAN Network Interface Circuit fiber self-healing features are: (1) When normal communication optical fiber loop (Figure 2 (a) below), each node in the right end of the left side optical transmitter LEDR send data PINL optical receiver, signal clockwise transmission; Similarly LEDL PINR data transmission, signal transmission counterclockwise, or choose the opposite transmitter data forwarding. (2) When a single fiber failure (Figure 2 (b) below), the downstream C node interface circuit loop, because the left side of optical receiver PINL no signal, right end of the optical transmitter LEDR choose the same side optical receiver PINR data forwarding. (3) When any node between the two fiber failure (Figure 2 (c) so), such as BC optical fiber between nodes is cut off, then B, C and fiber cut off point of two nodes connected to the implementation of loop-back function. At this point, the signal from A to C, AC is the first by a clockwise loop to B, via counterclockwise loop through A, D arrived C. The signal CA will still be transmitted by a clockwise loop. This self-healing function under fault conditions to ensure the continuity of ring can be maintained. After troubleshooting, switching automatically switches back to the original location. (4) CAN controller data to achieve the node chooses to receive. The principles are: for each node to receive the smooth, counterclockwise data, select PINL, PINR the first to reach the data reception. (5) to achieve the node data select Send. The principle: when the bus is idle, select the node transmitter TX CAN controller to send data, remove the ring fiber CAN bus network, the phenomenon of self-excitation to ensure that rings are not blocked; when the CAN controller of the node to receive node , select the data to send the opposite; when the CAN controller node to receive node, and the contralateral Fibre Channel fault, then select the same side of the data to send. (6) determine the channel frame start and frame end, differential bus is idle, the network is fault. Such as the receiver judge to left metering data frame is transmitted PINL have produced when the left side to send data and network communications status symbol flag_l logo sync_l.

2 interface circuit design

Self-healing network self-healing fiber optic CAN transceiver control function and the programmable logic device (ALTERA EPM7128SLC84 1 15) implementation, programming using VHDL language. A concrete description below.

2.1 input and output port settings

Figure 3 shows the interface circuit CPLD's I / O port diagram. Among them, the input and output pin_l, led_l, 1ed_r, pin_r respectively with light / power conversion module PINL, LEDL, LEDR, PINR connected: txd, rxd each device with the data system CAN Jing sender TX, RX receiver is connected; flag_txd = 1 CAN controller TX0 on behalf of the node is sending data frames; flag_l = 1 channel is sending data on behalf of the left frame; flag__r = 1 channel is sending the right documents on behalf of the frame. sync_l status symbol for the left side of network communications, sync_r status symbol for the right of the network traffic. When the left channel is normal, the output sync_1 = "l", driven network status light emitting diode D_sl; when the right channel is normal, the output sync_r = "1", drive network status light emitting diode D_sr; if the network status light-emitting diode D_sr or D_sl off, that corresponds to Fibre Channel network out of trouble. When the node select the left channel CAN controller, the data received, the output side rx_l / r is high; when the node select the right channel CAN controller, the data received, the output side rx_l / r is low. Reset for the reset input terminal, active-low; clk0 for the clock input, input clock frequency of 20MHz.

Self-healing fiber optic network of CAN bus

2.2 CPLD functional structure

CPLD to control the self-healing ring network interface unit, the control circuit consists of a divider, a central state machine, send data selector, data selector receiving the composition, shown in Figure 4.

2.3 Crossover

Communication Interface CPLD clock frequency 20MHz. CAN self-healing fiber optic network in each node and CPLD Interface CAN controller SJAl000 work with independent clocks. In order to produce the flag state machine signals synchronized with the CAN controller, data transfer, to ensure the two data selector switch and data synchronization, should be the correct choice of the state machine clock. This network of data transmission in the CAN baud rate is 125kbit / s, the state. Machine clock rxclk design data transfer rate of 8 times the baud rate, that is 1Mbit / s, to ensure the data bits in a CAN data read cycle can be repeated to improve anti-jamming capability. So divider function to generate a clock frequency of 1MHz.


2.4 The state machine center

Based on CAN 2.0B protocol, CAN network data frame consists of seven different bit fields, namely SOF, arbitration field, control field, data field, CRC field, response field, the end frame. Data field length of 0 to 8 bytes. Frame start position is a dominant bit low power? Quot; 0 "; frame end of the 7 recessive bits from" 1 "consisting of sequences; in the data frame transmission, the use of digital technology add charge coding, to ensure data frame bits stream will not be five consecutive "1''or''0."

Central control state machine is the design of the core modules. Center of the state machine functions are: (1), the detection frame CAN data frame start and end frame, producing a corresponding signal to send data flag flag_txd, flag_r and flag_l. (2) generation network communication status flags sync_r and sync_l. Center by the state machine: the composition of the three state machines: the CAN controller state machine node, the left channel and right channel state machine state machine. They were discriminant each channel (TX, PIN_L and PIN_R) whether there is data transfer. The following explanation of the different parts of the state machine are the nodes in CAN controller state machine as an example.

Self-healing fiber optic network of CAN bus

The state machine sets the 61 states, that is idle, S1, S2, S3 ... S60. When the bus is idle, the state machine is in idle state idle, then come along rxclk the detected txd = 0, the state machine turned to S1, while the data flag is set to send the signal flag_txd = "1"; the second upper edge, the state machine unconditional turning S2; third on along, the state machine unconditional turning S3; fourth on along, the state machine unconditional turning S4; fifth on coming along, the point is the central location of data bits, data stability, read the data again, if txd = "0" is still set up the conditions that frame start coming, the state machine turned S5; otherwise flag_txd = "0", while state machine turned idle state idle, waiting for the arrival of the start frame.

When the state machine is in S5, the then rxclk (1MHz) than one for each clock cycle, state machine state prior to further (S6, S7, S8, S9, S10, S11, S12, ... ..., S58, S59, S60); Every 8 clock cycles, on the CAN bus data bits to a detected (S12, S20, S28, S36, S44, S52, S60), ensure that each test in the data bit (bit period) Central. When the continuous 7 txd = "1", the detected "1" means "the end of''the arrival of the frame, sending data flag reset flag_txd =" 0 ", waiting for the arrival of the next frame start; otherwise the state machine returns the state S5, waiting for the arrival of the end frame.

Network communication status sync_r, sync _l is for an important basis for self-healing ring network. As mentioned above, when the channel to send data about the state flag flag = "1''when the network communication state of the channel sync =" 1 ", the network status light-emitting diode D_sr, D_sl light; when the frame when the end came, flag =" 0 " to start the network communication state count group count, the clock is rxclk = 1MHz, when the counter is 30000, (30ms), sync = "0", the network status light-emitting diode D_sr, D_sl off. This means that a data frame, if re- no other data were also detected in the starting frame, the network broke down. If Zai Dao can be detected within 30ms data frame 起始 (flag set Wei), the network communication Zhuangtai logo sync continued to "1". counter reaches the full value of Shi Jian The frame should be the shortest time interval estimation.

2.5 Data Selector

Send data and receive data selector selector function is to achieve link structures (that is, channel selection). To ensure the network to work, CAN network delay should be less than a data width (bit period). To link structure of time as short as possible, using the maximum clock frequency (20MHz) control of two data selector.

Sending the data selector, CPLD testing three-way channel data txd, pin_l, pin_r. The channel data with different priorities. Priority setting: When the node to send data (txd = "0" or flag_txd = "1''), the left and right channel to send control tanning ⑺ CAN vote Tang X data, which led_r = txd, led_l = txd. If This node does not send data, according to sync_r and sync_l choose to send data, were normal when the left and right channel, select the opposite data transmission, led_r = pin_l, led_l = pin_r. If a channel fails, the data not to see the opposite side, select the This side of the data is sent, led_l = pin_l, led_r = pin_r. Accordingly, not only to achieve self-healing network, but also eliminates the ring network blocking problem.

Self-healing fiber optic network of CAN bus

In the receive data selector, set the left channel as the preferred receive channels; not yet reached the time when the left channel data (flag_l = "0'') or the left channel failure, without human intervention, automatically selects the right channel to receive. Accordingly, achieve optimal reception (choice of priorities to reach channel data reception), and double-loop fiber CAN bus network self-healing capabilities.

Formed in the electric vehicle CAN self-healing fiber optic network, using plastic optical fiber as the transmission medium, plastic optical fiber has low loss window in the visible region, selected wavelength of 650nm (red) optical / electrical converter module - Agilent produced HFBR-1528 optical transmitter and optical receiver HFBR - 2528. CAN nodes control discharge device or with optional SJAl000 TMS320LF2407 DSP chip CAN controller, composed of four CAN self-healing optical network node board. CAN network data transfer rate is set to 125kbit / s, when the failure to set a certain channel, the network can achieve Figure 2 (b) are not self-healing function; when setting any node failure between the two fiber-optic network to Implementation Figure 2 (c) shows the self-healing capabilities. When the CAN node fails, the interface circuit can still work to ensure loop network; when the interface circuit failure will cause the node from the bus, the other nodes to achieve network self-healing, constitute a single ring. Through the oscilloscope to observe, sending node to send data through the bus competition; receiving node can send a response signal to the bus; node data through the 4-node self-healing fiber optic CAN return nodes in less than 100ns. After testing, the channel failure time for self-healing network 301ms