Abstract

To improve the safety of vessels in the offshore wind farms, this paper develops the design and implementation of a multiclient monitoring system that is a ship monitoring system software (SMSS). The design is based on automatic identification system (AIS) and geographic information system (GIS). The data of the target ships around the offshore wind farm zone will be displayed on a GIS map and monitored in the implemented software system in real time. The localization method and the warning zone judgment algorithm are used to carry out the vessel position around the offshore wind farm area. The software system includes some unavoidable features, namely, AIS encoding and decoding and automatic sending of short messages to ships arriving in the warning area. The tests of the SMSS show that in real time, the software system performs properly by detecting the target ships around the warning zone and sends short messages to these ships, which makes the SMSS more effective and reliable.

1. Introduction

The wind turbine and submarine cable, which are the main sources of power supply for oil rigs, must be secured particularly in the wind farm area. Once the oil platform is unpowered, this is due either to damaged wind turbines that are no longer supply power to the sea cables, or to a cable damaged by a likely shock with the ship. After working for several months on the use of AIS and GIS techniques for the modeling and simulation of the ship monitoring system in the offshore wind farm area, SMSS was developed with the idea of the safety of vessels, wind turbines, and sea cables. Wind farm workers must monitor ships in all sea areas where submarine cables are laid to protect them during anchorage because once the vessels enter the offshore wind farm zone, the sea cable connected to the offshore wind power station may be damaged due to the anchoring of the ships. Therefore, this paper develops the design and implementation of the ship monitoring system software to control the movement of vessels in the offshore area so that some necessary precautions can be taken before any damage occurs.

The idea of the multiclient monitoring system based on C/S structure [1] using the idea of Liang [2] was proposed, but the idea was not successfully implemented. It uses radar or VHF voice systems, which cannot satisfy the demand of real-time and rapid surveillance. Later on, a stand-alone version of a marine vessel monitoring system that can effectively monitor the propagation within the sea is proposed by Liu [3] using [1, 2] has been successfully implemented. The system works properly and stably, but it only supports single AIS equipment for data acquisition, which makes the stability of the system not guaranteed. In addition, the alarm system is not perfect enough because it can actually trigger an alarm without sending alarm information to the target ship. Based on the shortcomings mentioned in the above publications, Yu [4] has proposed a series of programs to improve the system. In the end, it is only part of the functions such as sending the information to the target ship that has been realized during the simulation test phase, but the overall design of the system is not completed. Although the system has only completed part of the design, it has nevertheless optimized some of its features. This document designs and implements a system that monitors several ships in real time and automatically sends short messages to ships arriving in the warning zone. The technology used in the design of the system mainly includes the following:(1)AIS decoding and encoding technology: it is a new type of ship navigation communication technology, which can be applied to ship monitoring in the sea area around offshore wind farms.(2)GIS mapping technology: it is a computer system geographic data information [5]. It consists of technologies that refer to the presentation of data in the form of maps, pictures, tables, and databases [6, 7].(3)MapWinGIS technology: its main functions are to directly open, edit, and save files in Image, Grid, Shapefile, TIN, and DBF format. It uses the Geospatial Data Abstraction Library (GDAL) for image data to read [810].(4)PostGIS technology is a truly large spatial database [11], which is the object extension module built on the database system PostgreSQL. Its source code is easy to make it a fast-growing and more sophisticated [12, 13].(5)Publishing and subscription technology is a technology that is based on distributed database MySQL [14]. MySQL is a client/server architecture database that supports multiuser and multithreading.

2. System Analysis and Design

2.1. Requirement Analysis

The integrated SMSS must contain technologies that meet the following requirements:(1)Support multiple AIS devices to access simultaneously: since a single AIS device monitors the sea area with a limited range and poor stability, therefore the system is required to support simultaneous access and dynamic configurability of multiple devices.(2)Presentation layer in the form of GIS electronic chart: the observation sea area, the warning zone, and the sea vessel are displayed in the form of an electronic chart, so that the user can more intuitively understand the navigation of the sea vessel.(3)Multiclient design: in the project, it is necessary to visualize the monitoring system information at locations such as the offshore booster station and the land centralized control center, so that the system can meet the simultaneous online access from multiple clients.(4)Ship alarm function: the system needs to have an automatic alarm function (the system interface pops up an alarm box and generates it) to automatically send alarm information to the stagnant vessel and thus manually send a short message to the target vessel.(5)Historical information query function: the system must include information on vessel history and historic trace mapping functions to help user query data and report accidents to historic vessels.

The indicators required by this system are presented in Table 1.

2.2. Structure Analysis

Based on ActiveX control of MapWinGIS, the system is using Microsoft Visual Studio (MVS) version 2017 and LabWindows/CVI platform to develop the SMSS design and implementation. The system gains support from resources provided by MVS, which can intelligently perceive code errors and offer solutions to solve the problem. It provides powerful data processing capabilities for applications such as reporting, data entry, data analysis, data editing, data visualization, and a large number of interface enhancement controls that make it easy for developers to develop interfaces. LabWindows/CVI combines the power and flexibility of the C language with professional measurement tools to control, analyze, and display data acquisition.

2.3. Hardware Design Framework

The system is mainly composed of a server, clients, and AIS equipment (AIS host, GPS antenna, and VHF antenna) and is able to monitor ships within a radius of more than 40 km. The framework of the hardware design is as shown in Figure 1. The AIS device includes separate receive and transmit antennas that can receive all AIS ship information in the VHF communication range in real time and conform to the standard NMEA0183 GPS data output format.

The AIS device accepts both the surrounding ship and the AIS base station as a receiving module. The server is connected to the AIS device via a serial port that allows the transmission of AIS decoding and encoding data between the two devices. Each client and the server communicate and exchange data through the User Datagram Protocol (UDP).

2.4. Software Function Module

The server data processing storage software includes data processing module, AIS data visualization module part function, and the client software. The structure of the SMSS is shown in Figure 2 and contains the following functional modules: AIS data acquisition module, AIS data decoding and encoding module, AIS visualization module, early warning, and alarm module. In addition, it also includes AIS data transmission module, report management module, historical data query module, and user management module.

3. Key Technical Analysis and Ship Localization Method

3.1. AIS Information Acquisition/Decoding and Encoding Module

The AIS devices include Class A devices, Class B devices, and base stations. The system receives AIS information and decodes it through the serial port RS232/RJ45 network port. The process of receiving and decoding AIS messages is displayed in Figure 3.

After the data are entered into the serial port buffer, the server retrieves and parses the data of the buffer. The decoding information is therefore sent to the server’s processing module to be processed via the security queue. When a message is sent to the target ship, the server processing module sends a short message to the data encoding thread through the security queue for encoding and then transmits the encoded data via the serial port.

The data acquisition module sets the number of threads according to the number of AIS devices connected to the system. Each AIS device has a separate thread used to send data to the server through the corresponding serial port, which performs and processes them in the server’s transceiver layer.

The information processing of the system mainly includes AIS decoding, AIS encoding, and data transmission based on the UDP protocol.

3.1.1. AIS Decoding

The system performs AIS decoding in strict accordance with the provisions of International Telecommunication Union ITU-1371 [15]. For information containing multiple AIVDMs (such as message number 5), the system will recognize its survey signal and its continuous message identification. Multiple messages of the same group are automatically integrated and then decoded [16].

3.1.2. AIS Encoding

This system performs secondary development of AIS equipment, so that it can accept the short message sending instruction of the server. It has the function of automatically sending short messages to ships in the sea area. This paper independently designed a set of AIS coding technologies for encoding and transmitting short message instructions. Its format is as follows:(i)$XNMSG, message ID, nine-digit code, message type, and statement content check code.(ii)Message ID: use three digits to represent the sent message ID. The short message type is shown in Table 2.(iii)Check code: take the string XOR check between $ and , which is a two-digit hexadecimal number.

3.1.3. Data Transmission and Reception Based on UDP Protocol

The system requires high real-time data transmission between the client and the server. Considering the advantages of UDP protocol, such as no connection, high rate, and low resource consumption, the system uses UDP protocol instead of TCP protocol for data transmission. However, there is a problem of packet loss in UDP, and the correctness of the transmitted data cannot be guaranteed. For this reason, the system adds a check code to the end of the UDP data of the sender to perform transmission data check.

3.2. Multithreading Technology

The threads in the system are mainly divided into the main thread of the server, the data acquisition/processing thread, the UDP data sending thread, and the UDP data receiving thread. Each thread is independent of each other and does not affect each other. The main thread of the server is primarily responsible for controlling the functions of the user interface, loading the INI configuration file, and opening other threads.

The number of data acquisition/processing threads is the same as the number of serial ports (the number of AIS devices). According to the INI configuration file presented in Table 3, the system will set the number of AIS devices and automatically allocate serial port data processing threads. Each serial port data processing thread allocates two thread security queues for data transmission and data reception.

As shown in Figure 4, thread-safe queues are used for data transmission between threads of the system. When a poll is set in the program and the server sends data, the data transmission security queue of each serial data processing thread sends data to the UDP data sending thread in turn, thus performing a continuous loop. Avoid using thread locks because the number of threads is too large, resulting in inefficient data transfer and deadlock. When the server accepts the data, the UDP data receiving thread will sequentially send the message to the data queue of each serial port data processing thread to receive the message, without waiting, which improves the running speed of the system.

3.3. Ship Localization Method
3.3.1. GIS Visualization

This system selects MapWinGIS for secondary development and visually reflects information about the vessel, wind farm, and submarine cable in the form of an electronic map allowing the user to view monitoring information. It is a powerful open-source GIS platform that is a collection of free open-source components and desktops developed for small- to medium-sized GIS applications. As shown in Figure 5, the GIS visualization is drawn from four layers, namely, the chart layer, the submarine cable layer, the observation warning layer, and the AIS ship layer. The different layers are all defined in the same coordinate system (WGS1984 coordinate system), so that the different positions of the different layers overlap and correspond in the same coordinate system.

(1) Chart Layer. The main function of the chart layer is to provide the entire system with the geographic information of the sea area where the submarine cable is located and to draw the corresponding sea area in the form of a map.

Traditional map files often use only one map file to represent the entire map, which results in low resolution if the map file is too small. If the map file is too large, the system runs slower. The system stacks multiple files of different formats and resolutions to form a new map file, which solves the problem of map resolution and also improves system execution speed.

(2) Sea Cable Layer. It is the first layer overlaid on the chart layer. In this layer, the starting point of the submarine cable, its coordinates, and its endpoint are displayed. The shape of the submarine cable is drawn as well.

(3) Observation Alert Layer. This layer includes the observation zone and the police zone. The warning zone is inside the observation zone, and its area shape is a closed irregular polygon. When drawing the warning zone, first determine the latitude and longitude coordinates of all the vertices of the warning zone, then fix them on the drawing layer. Finally, connect the vertices in turn. The setting of the observation area is identical to that of the warning zone.

(4) Drawing of AIS Ship Layers. The AIS layer displays the ship on the drawing layer according to the coordinate information, maps the ship based on the ship’s coordinates and the actual heading, and then draws the shape of the ship on the coordinates. The AIS ship information on this layer will be updated in real time based on the refresh of the database. It has a function on ship positioning through coordinates.

3.3.2. Ship Positioning Method [17]

Assuming that is the time cost by the AIS signal transmitted from satellite to ship, the time difference of arrival (TDOA) between the adjacent signals received by the ship can be expressed as

The frequency difference of arrival (FDOA) between the adjacent AIS signals can be expressed aswhere is the carrier frequency of the AIS signal and is the signal propagation velocity. is the vessel position vector in the Earth-centered Earth-fixed (ECEF) reference, and are the velocity vector and position vector of the satellite when transmitting the AIS signal, respectively is the difference of noise between the two time measurements, and is the difference of noise between the two frequency measurements.

It is assumed that the number of signals received by the ship in the visual time of the satellite is ; the localization equation matrix based on (1) and (2) can be written aswithwhere is the TDOA measurement vector obtained by synchronization technique, is the FDOA measurement vector, and is the measurement noise matrix.

Since the predicted ship position with interactive multiple model (IMM) algorithm is defined as , the localization model combining this prediction with TDOA/FDOA measurements can be expressed as

Let consider the measurement vector, it is expressed as and ; on the basis of least-squares criterion, the estimated position of the proposed model is achieved by applying the Gauss–Newton algorithm as follows:where , , is the noise covariance, is the covariance matrix of ship predicted position obtained in IMM algorithm, and , with

Knowing that the transformation of vessel location from the geodetic coordinates to ECEF coordinate is defined aswhere and are the longitude and latitude ECEF coordinates of vessel and are the coordinates of vessel. is the radius of curvature in prime vertical, where  = 0.00669437999013 and  = 6378.137 km are the square of the first eccentricity and equatorial radius of the earth defined by WGS-84, respectively.

3.3.3. Ship Judgment Algorithm in Warning Area

The ship guard zone is a closed area, which is abstracted into a polygon with vertices . Considering the point where the vessel is located as presented in equation (5), a ray parallel to the -axis is made to the right, and it is judged whether or not is in the closed region by the number of intersections of the ray with the polygon (indicated as ). The method of judgment is as follows.

If is on the edge or vertex of the polygon, the ship is in the warning zone. Otherwise, define as the number of intersections to 2 takes the remainder, and then use the parity of the remainder to judge:

As shown in Figure 6, the intersection of the first ray and the polygon is 2 and the point is out of the warning zone. The intersection of the second ray and the polygon is 4 and the point is outside the warning zone. The intersection of the third ray and the polygon is 3 and the point is warning area.

Taking into account the speed of the ship arriving to AIS ship observation area (at 1 Km of the wind farm area), the threshold speed is set to 90 Km/h as displayed in Figure 7.

If the speed of the ship is above the threshold speed, it will be considered a dangerous vessel, and then alarm information will be sent to the target ship.

3.4. Multiclient Design
3.4.1. PostGIS Geographic Information Database

PostGIS is an object-relational open-source spatial information database that supports distributed network access. The system uses the PostGIS geographic information database to store electronic chart geographic data information and spatial data information of the warning zone.

Because the system adopts multiclient design, the client can only access the server through the network interaction method, but cannot access the local file on the server. The normal map file is stored locally in the shape format and the client cannot read it effectively. But the PostGIS geographic information database can effectively solve this problem and store the electronic data of the electronic chart, so that the server and the client can access and read the current geographic information data.

The system sets two levels of permissions, namely, ordinary employees and administrators. Only the administrator is authorized to modify the electronic chart data information, the location, and the size information of the alert zone.

3.4.2. Data Publishing and Subscription Mechanism Based on Distributed Database (MySQL)

All ship data from the system will be stored in the server-side MySQL database data table after decoding. The server-side data processing flow diagram is presented in Figure 8. The functions include ship data update and ship redundant data deletion.

(1) Ship Data Update. In order to optimize the system design and reduce the access burden of the data table, the database uses a combination of data tables and log tables to process the data. The database of the ship data is periodically updated once every 5 seconds. After the update is complete, the time information for updating the database is stored in the log table. The user can always access the log table. Once the log table is updated, the user accesses the data table, connects the ship data and the geographic data in PostGIS to the client, displays the current position of each ship on the electronic chart, and then symbolizes it.

(2) Ship Redundant Data Deletion. Ship data must have certain timeliness. In the thread, the system will start a timer to browse information about the ship at regular intervals. By comparing the time of the information acquired on the vessels with the time of the server, vessels that are not time-sensitive in the database will be deleted to draw the historical track of the ships.

When the system client performs historical track drawing, it will call the ship history information from the MySQL database and simulate the track display on the electronic chart [18, 19].

4. Software System Applications and Performance

Designed and implemented in Visual Studio and LabWindows platform version 2017, the application of the software system environment is Windows 7 server, 64-bit operating system, and the processor is Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40 GHz 2.40 GHz (2 processors) with 16 GB of memory. The programming is carried out on C language, C++, C# language, and MATLAB R2014a (8.3.0.532).

4.1. Software System Introduction

Before making any settings, user needs to enter the password to access the settings page. As shown in Figure 9, after clicking on “Personnel Login,” there will be a user login interface. Once connected, the software-related parameters can be set.

As displayed in Figure 10, the main interface of the SMSS is mainly composed of following aspects: menu bar; label bar; ship monitoring column; temperature, strain, current carrying monitoring column; alarm processing column; maintenance bar; alarm indicator; real-time alarm information; operation and maintenance; and AIS ship observation area and AIS ship warning area.

Among the mentioned aspects, the temperature, strain, and current carrying capacity monitoring columns are in a state to be developed. Once the development is complete, they will be integrated into the entire system; this will form a complete system for monitoring submarine cables.

4.2. Performance Test

Through the ImportShapefile of the MapControl function, the vector graphics file is entered into the GetLayer of the database to be read. Click on “Map Mode” in the tab bar to display the submarine cable operation framework as shown in Figure 11. The green box is the file from the database area.

The system performs data source simulation experiments through test software. In the field, samples were taken from the AIS message data collected and used as a data source to perform the tests.

As presented in Figure 12, the interface displays the AIS packet information, the MMSI number of the current sending device, and the IP address of the server. When the data collection and data transfer software receive the alarm information sent by the server, the software interface displays the IP address of the server and declares that the reception was successful. If no alarm message is received, the interface will display “No message received” every 10 seconds.

The ship warning zone determines the warning area of the vessel in which the latitude and longitude coordinates are set as shown in Figure 13.

Ship monitoring column module displays the ship information near the submarine cable in operation as shown in Figure 14.

The speed threshold setting option interface is shown in Figure 15. When the ship enters the warning zone with the speed higher than the threshold, the system will alarm.

The user can manually send a short message to the target ship through the MMSI number. As shown in Figure 16, the user can select the short message transmission type, customize the content of the message to be sent, or select the system to send the content of the message.

The system still has some functions, namely, map mode, submarine cable laying path, ship warning zone, ship observation area, ship information bar, speed threshold, free monitoring ship, alert handling bar, single item processing, operation and maintenance information of submarine cable (the submarine cable is in a safe state; the submarine cable is in danger state), report output dialog, AIS history view, and AIS history query. The simulation experiment test of the software is performed using data source. The number of ships in the analog data source, the number of vessels in the alert zone, and the number of ships to be alarmed corresponding to 1.5 times the system index are defined. Then, the ratio of the number of vessels analyzed to the number of samples is calculated to determine if it meets the system index.

After many tests, the experimental results are presented in Table 4.

The table shows that the data obtained meet the requirements of the technical indicators of the system.

5. Conclusion

Ship monitoring system software was designed with the idea of the security of vessels, wind turbines, and sea cables in the offshore wind farm zone. The idea is catching up with the industry’s lag in the area of automatic surveillance of sea areas surrounding offshore wind farms. By applying a modular design and multithreading technology to the designed software, the scalability of the system has improved, as well as its efficiency. The software has been successfully applied in the East China Sea at Jiangsu Nantong (offshore wind power project) and has met the monitoring requirements. In this paper, although the SMSS can provide users with data queries, information analysis, and technical decisions, some of the previously mentioned functions (monitoring columns of temperature, strain, and current load capacity) must be developed. This will make complete and powerful monitoring system software capable of monitoring ships and submarine cables in the offshore wind farms area.

Data Availability

The algorithms are the data used to support the findings of this study and may be released upon application to the Integrated Monitoring and Research Laboratory for Submarine Cable and Intelligent System of Shanghai Maritime University (contact [email protected]).

Conflicts of Interest

The authors declare that there are no conflicts of interest regarding the publication of this paper.

Acknowledgments

This work was supported by the National Natural Science Foundation of China (nos. 61672338 and 61873160).