THE DESIGN AND IMPLEMENTATIONOFHIGH RELIABILITYFIBER COMMUNICATION TERMINAL FOR SHIP CONTROL

RONG ZENG, JINLIANG HE, XIDONG LIANG, XUEQING HU

Dept. of Electrical Engineering,

TsinghuaUniversity

Beijing, 100084

CHINA

Abstract: - How to enhance the reliability of the supervision and control system of the ship power system, especially the survivability in emergency, the communication system is a key problem. The gap of the demand of the reliable communication of supervision network and the shortage of the traditional two-way structure with self-healing ability is discussed here. The principle and thedesignto develop a kind of flexible access optical communication terminal which based on embedded platform and spanning tree algorithm are presented.

Key-Words: -Fiber Optic Ethernet, Spanning Tree, Embedded System

1 Introduction

Communication system, one of the most important parts of the supervision system, is a way through which the intelligent terminals exchange data with the controland management center. The available communication modes used in the shipcontrol are various, for example, wireless communication, cable communication, and so on. Compared with those modes above, optical fiber communication has many merits such as security and reliability, long distant transmission, huge capability, high ability to resist the electromagnetic interference. Especially recently, with the rapid descending of the optical fiber’s price, optical fiber communication has been applied in the communication network of supervision system more and more widely.

In the light of the character of the two-way optical fiber network with self-healing ability, this paper points out some weaknesses when it is used in shipcommunication network, then gives the principle and the design of a kind of flexible access optical communication terminal based on Ethernet structure.

2 The Communication Modes Used in Ship Control System

The equipments in a ship are widely covered, large in quantity, changed more frequently than those in transmission system, so the structure of the network is much more complex. The main requestto the distribution communication system issummarized below.

a. The security of the communication

b.The velocity of the communication

c.Easy operation and maintenance

d. The ability resisting the fault

There are many communication modes applied in ship control system at present, wireless communication, electric cable communication and optical fiber communication. Electric cable communication adopts twisted-pair to transfer data using RS485,RS232 or fieldbus technology. Despite the low cost, its limited transmission velocity and low distancemakes it unsuitable to be used in the main network of ship control system. Wireless communication has some applications in remote data collection in ship (remote status and meter supervision,load control system, etc.) due to its easy installation, little influence in location, but it doesn’t fit the request of the main communication network for it is easy to be interfered by electromagnetic wave and the poor stability, the large amount of maintain work, the limited transmission velocity. In contrast to those methods above, optical fiber communication are superior for its high performance, long distance transmission and strongability to resist the electromagneticinterference. Despite its relatively high cost, more and more optical fiber Ethernet has been used in distribution communication system.

By now, the optical fiber networks used are often designed as looped structure with station-substation mode. Data are transmitted along the optical fiber in one way. The main station doesn’t convey data to avoid the loop message, and only those substations can convey data. In order to enhance the reliability of the communication and prevent the whole network from breaking down due to the fault of one substation, the network is often designed as two-way with self-healing ability. There are two types of mechanisms of two-way network: one is only one loop works in normal condition and the other is in backup state, it works only when the network is faulty; the other is two loops work together, as illustrated in figure 1, signals in loop A and loop B are transmitted respectively and the station will choose signals with better quality. If some fault occurs (we assume the fiber has been cut off at point K), the substation will switch the signal received to the other loop. The two loops A&B reconstruct a new loop to transmit data.

Fig. 1 two-way self-healing net

Figure 2 shows a typical communication network which consists of the main station, the substations and the optical fiber. The stations connect each other by fiber, and connect the intelligent terminal by twisted-pair. Although this type of communication can communicate reliable, it has some shortages such as its rigid structure, the poor adaptation when it comes to the distribution network which changes frequently and has more and more terminals to connect in.

Fig.2 distributed communication network

First, in normal condition, if the mechanism of one way is used, one of the loops is in idle state and not exploited effectively. If the mechanism of two-way is used, then whatever message sent by main station or substations will be delivered in both loops in the same time. This will actually increase the load of the network.

Second, when it needs to add new node in the loop structure network, as illustrated in the left of the figure 2, we assume between substation 1 and 2, a communication node is needed, this requires opening the original loop and re-construct the network. It is not only difficult for the optical fiber to be melt, but also the dissipation will increase and the quality will be influenced.

Third, when a group of intelligent terminals need to be added, a new loop will usually be made to interconnect these equipments by terminals and connect to original network at some substation (as substation 5 in Fig.2). This requires the substation has more than one pair optical fiber interfaces and is able to establish a tangent loop network. In addition, all the data transmitted in the new network have to be sent to original network from substation 5. This greatly increases the load of substation 5. What’s more, the new network depends on substation 5 so much that if something is wrong with the substation 5, it will be paralytic thoroughly.

Finally, the communication mode based on loop structure is hard to fit the complex network structure, for example, it will make the system structure much more complex if more than one subnets are tangent in the same substation.

Therefore, ship communication system needs optical terminal that is not only fit for complex network topology, but also has the merit that can be flexibly accessed when the network needs new equipments. Only by this, the optical terminal can fit the character of the distribution, and establish a complex, easy maintained optical communication network.

3Design of and Implementation of the FlexibleAccess FiberTerminal

3.1 The function of the fiber terminal

To overcome the problems of the traditional optical terminal of distributed communication system, the new optical terminal won’t distinguish master or slave relation between the stations, any terminal can retransmit the data. The data are transmitted two ways in the network, so that all the optical fiber will be used fully. The data will be sent in the shortest path, and there is no duplication in the network. The topology of the network will be organized more than loop.

As the embedded system begin to be used in intelligent terminal, the new way that connecting intelligent terminal by Ethernet has substituted the original way that is by RS485 bus or fieldbus little by little. For this reason, the optical terminal will support many Ethernet interfaces. Of course, the traditional interfaces such as RS232, RS485 or CAN bus can also be supported.

3.2 Broadcast Storm

The optical terminal hasn’t limited the structure of the network, so that there may be some redundant paths in the network. In order to enhance the reliability of some stations, backup lines or a loop network sometimes will be used. When considering the fact that any port of optical terminal can convey data, if no particular actions are taken, the broadcast in the Ethernet will produce a great number of loop packets, which results in broadcast storm. Broadcast storm will consume net resource greatly, even break down the whole network.

3.3 The Spanning Tree Algorithm

In order to solute the problem of broadcast storm, optical terminal performs the spanning tree algorithm of IEEE802.1D protocol. This algorithm will configurethe active topology of a Bridged LAN of arbitrary topology into a single spanning tree, such that there is at most one data route between any two end stations, eliminating data loops [1].

In order for the spanning algorithm, three conditions should be satisfied. Each terminal has a unique identifier in the Bridged LAN. Each port has an identifier, unique in any individual terminal. A unique multicast MAC address, that recognized by all the terminals in the Bridged LAN.

We should offer a mechanism to assign value of the terminals and ports. Since every terminal has a 48-bit Universally Administered Addresses, the unique identifier of terminal can derived partly from it and partly from a priority which can be adjusted. For each port, we can assign a priority with a numerical value. The lower the value, the higher the priority identifier is. In addition, we should assign a Port Cost associated with each port, which means the cost of frame transmission in the LAN to which the port connects.

The terminals send a type of Bridge Protocol Data Unit (BPDU) known as a Configuration BPDU to each other in order to propagating the topology information, which contains Root Identifier, Root Path Cost, Bridge Identifier, Port Identifier, Max Age and so on.

At first, each terminal announces that it is the root, and sends Configuration BPDU to other terminals, receives Configuration BPDU from other terminals in the same time. When a terminal received a Configuration BPDU with higher priority of Root Identifier, it updates the information of root. As the Configuration BPDU frames propagate in the network, all the terminals will agree with the Root which has the highest priority soon. Then the Root originates configuration BPDU on all the LANs to which it is attached at regular intervals. Each terminal has a Root Path Cost (it is the least sum of the Path Cost from each terminal to Root) and the port associated with it will be assigned as the RootPort.Each group of equipments, often be organized as a LAN, will connect to the Bridged LAN through a port, which will be called the DesignatedPort of the LAN. At last, all the RootPorts and DesignatedPorts are allowed to forward and receive packets, and other ports are blocked.

In normal operation, the Root transmits Configuration BPDU regularly to update the counter maintained by each terminal and ensure thattopology information is not timed out. If any terminal’s counter expires (maybe the data path is broken down), it will send a TopologyChange Notification BPDU to notify the Root that the topology of the network is changed. After the Root receives, it notifies all the terminals in the Bridged LAN that the spanning tree needs reconfiguration. Then some of the terminals will change the state of their ports and the network is self-healing. Considering the propagation delays, the ports transit from blocking state to forwarding state will pass two other states: listening and studying. Every change of port state has to wait until the counter expires, otherwise there will be temporary data loops and the duplicationand disordering of frames.

3.4 Hardware Design of the Optical Terminal

The main structure of the optical terminal, illustrated in figure 3, consists of Ethernet communication module based on switch structure and embedded system module.

Fig.3 optical terminal structure

3.4.1 Ethernet Communication Module

Ethernet module supports the terminal some optical fiber interfaces and twisted-pair interfaces. In order to fit complex network structure, any port can exchange data with other port or ports. This is realized by switch chip.

The switch chip should have management functions and hardware assist for Spanning Tree Algorithm. According to spanning tree algorithm, the ports of the switch work in four states: blocking, listening, studying and forwarding. There should be a special multicast MAC address used for the address of BPDU. Frames with this address can tunnel blocking ports. After the terminal initializes, all the ports are in blocking state, and a management port is appointed. The management port connects the MAC port of microprocessor (MPU) directly. Since the BPDU frames concerned only by MPU, they will be sent to MPU only through management port though they are multicast frames.

The switch chip must at least support two optical fiber interfaces to perform the looped network. According to the number of the optical fiber port and twisted-pair port, together with the PHY chips and optical fiber transceivers, isolate transformers and RJ45 interfaces, we can build the ports of optical terminal. Because there is no auto-negotiation mechanism in fiber Ethernet, the ports can be configured at 100Base-FX, full duplex mode. The twisted-pair ports can be configured at auto-negotiation mode, making them adapt to 10/100M, half/full duplex.

3.4.2 Embedded PlatformModule

Embedded platform module which mainly consists of MPU, SDRAM and FLASH chips, is aim to control the terminal. MPU transfers packets through MAC port, controls and accesses the register of switch and PHY chips through SMI port. MPU can also expand some other interfaces, such as CAN, SPI, UART and so on, to support types of communication modes.

A well-functioned communication terminal should not only communicate effectively and reliably, but also have network management which is both powerful and easy operating. It is obviously that traditional SCM with embedded program can’t fit those functions, so that an embedded system is needed. The available embedded system is varied, such as QNX, VxWorks, WinCE and Linux. As free software with open source code, Linux is not only stable, low cost but also has many device drivers available. The device drivers can be modified to fit our own system.

3.5 Software Design and Implementation

The optical terminal transmits and receives two types of Ethernet frame: common Ethernet frame and BPDU frame.This is shown in figure 4.

Fig.4 The main flow chart of Ethernet frame

For common Ethernet frames, only the ports in a forwarding state can receive them. Then the terminal conveys them to the ports that are in a forwarding state according to the frame’s types (unicast, multicast or broadcast). This is done by the switch automatically almost without user’s intervention. After MPU’s MAC driver received frames, it conveys the frames to upper layer, usually the Network Layer. But for BPDU frames with special MAC multicast address, because they contain the topology information, they should be received in any port state, and transmitted to the MPU through SMI port. As the spanning tree algorithm works at Data Link Layer, what we need to do is to modify Linux MAC driver and capture the BPDU frames, so that they won’t be conveyed to upper layer.

Fig.5 software framework of the system

Then in the switch driver, as illustrated in figure 5, we use functions “read” and “write” to receive and transmit BPDU frames. As we can’t expect when the BPDU frames come and whether there is a free buffer, the “read” and “write” functions should perform blocking I/O. Generally speaking, the switch doesn’t need random access, so the switch driver can be designed as a character device. Considering we need to configure the register of switch, “ioctl” function should be supported.

3.6 The Implementation of the Flexible Communication

When the spanning tree algorithm is implemented on the terminal, it picks up the information of network from BPDU frames. The MPU calculates each terminal port’s state according to spanning tree algorithm, and then adjusts them to eliminate the loops in network. If we adjust the terminal identifier of original main station, so that it possesses the highest priorityand be assigned as the root of the spanning tree, each terminal will choose a shortest path to the root with a high probability. When it needs to add new equipments, we can connect them to the nearest terminal. As the number of the optical fiber interfaces or twisted-pair interfaces is limited, new terminal can be expandedwhen the interfaces are not enough.

4 Conclusion

This paper presents a type of flexible access optical fiber communication terminal according to the request of the ship control system. Performing the spanning tree algorithm with consuming limited bandwidth, it eliminates the redundant paths in the network effectively; monitor the change of the topology of the network. With the embedded system’s powerful function, the terminal realizes convenient management of network. So with this kind of terminal, establishing a complex optical Ethernet in ship communication system is reliable and survivable.

References:

[1] J.I. Ykema, Protective Devices in Navy Shipboard Electrical Power Systems, Naval Engineers Journal, May 1988.

[2] Karen Nan Miu, Hsiao-Dong Chiang, Bentao Yuan, Gary Darling, Fast Service Restoration for Large-Scale Distribution Systems with Priority Customers and Constraints, Proceedings of the 20th International conference of Power Industry Applications, 1997, pp3-9

[3]ANSI/IEEE Std 802.1D, 1998 EditionPart 3:Media Access Control (MAC) Bridges,1998

[4]Alessandro Rubini, Linux Device Drivers, O’Reilly & Associates,Inc. , 1998

[5] Seifert, R. Gigabit Ethernet. Reading, MA: Addison Wesley, 1998