Use of Simulator Equipment for the Development and Testing of Vessel Control Systems

– One of the ways to reduce human influence on the control process is the development of automated and automatic control systems. Modern control systems are quite complex and require preliminary ground testing. The article considers the issues of creating Imitation Modelling Stand for such control system synthesis and testing. For this reason, a Control System Model was integrated into the local computer network of the navigation simulator NTPRO 5000. The authors of the paper developed and tested software for information exchange between the navigation simulator and the Control System Model. The authors also developed a functional module of collision avoidance with many targets for testing in a closed loop system with virtual training objects. The results showed that the developed Imitation Modelling Stand allowed developing and testing functional modules of the control systems. In comparison with the found analogues, it is easy to include in a closed simulation cycle various models of command devices, actuators, control objects, objects of training scene, weather conditions; it is universal both for solving problems of manual control and for developing and testing automatic and automated control systems; it is not highly specialised and is created at minimal costs.


I. INTRODUCTION
According to statistics, more than 85 % of ship accidents that have occurred recently are associated with the human factor [1]- [3]. One of the ways to reduce human influence on the control process is the development of decision support systems (DSS) and automatic control systems (ACS).
The use of digital decision support systems and automatic control systems provides new opportunities due to the fact that decisions on ship control are made on the basis of accurate mathematical calculation, and not using the navigator's intuition, which increases the reliability and accuracy of such systems, contributes to the safety and efficiency of navigation, conservation of human lives at sea, protection of the marine environment and coastal navigation areas.
Decision support systems assist the navigator but do not release him from the decision to operate the vessel in stress situations [4]- [7], unlike the automatic control systems that provide control of the vessel without the navigator's assistance [8], [9]. The navigator only makes the decision to use the automatic module and check its operation. An example of such an automatic system is the autopilot, which has long been used in almost all vessels.
According to experts, using of automatic control systems and decision support systems can reduce the impact of the human factor on navigation safety [10], [11]. But such sophisticated systems require testing stands [12]- [14].
Recently, simulators have been widely used to develop the skills of manually controlling the movement of a vessel. Their main feature is the reliability and realism of the physical processes that are modelled in the system. Transas is one of the leading manufacturers of navigation simulators.
By adapting the navigation training equipment, it is possible to create an Imitation Modelling Stand (IMS), which can then be used for the development and testing of functional modules of decision support systems and automatic control systems. Development of such a stand is an important scientific and technical task.
The object of the research is the process of development and testing of functional modules.
The subject of the research is the Imitation Modelling Stand for the development and testing of functional modules.
The goal of the research is to create Imitation Modelling Stand for the development and testing of functional modules.

II. PROBLEM STATEMENT
Traditionally, navigation simulators are used to acquire and develop skills in manual ship handling. Since 2013, NTPro  Fig. 1 shows the instructor's workplace of NTPro 5000 navigational simulator. Fig. 2 on the left shows the central rack of the simulator, which houses the server, models, switching equipment, uninterruptible power supplies, etc. The laboratories have small and large virtual bridges with visualization and control equipment. One of these bridges -a full mission navigational bridge is shown on the right side of Fig. 2.  It is necessary to integrate the Control System Model (CSM) (system blocks, information exchange software, functional modules) into the existing navigation equipment of the NTPro 5000 simulator in order to create a closed control loop with an NTPro 5000 simulator, in which it will be possible to work out functional modules in dynamics with simulator objects.

III. LITERATURE REVIEW
The thesis [15] deals with the issues of automatic testing of collision avoidance algorithms of surface vessels. Two collision avoidance algorithms are implemented, one of which is based on a speed obstacle, and the other is based on a typical predictive control model. The algorithms were automatically tested by generating various scenarios and situation assessments using a set of metrics.
In the article [16], the issues of design and testing of control systems in the HIL (hardware in the loop) are considered, when parts of the control loop components are real equipment, and parts are modelled. This approach is used when experimenting with a real process is too expensive or too time-consuming. Modelling of slow processes is considered on the example of heating systems and of fast processes on the example of internal combustion engines. Models for 6-and 8-cylinder diesel engines are described, including fuel injection and combustion, pressure boosting, crankshaft torque generation, exhaust turbocharger dynamics and vehicle dynamics. Real-time simulation is compared with measurements on real diesel engines and trucks.
The article [17] discusses the HIL method for testing the marine control systems. The method involves the use of hardware together with virtual models for joint mathematical modelling. The authors propose using the HIL method as a new method for checking and validating the marine control systems. The terminology, functions and failures of the control system, characteristics and requirements for the HIL simulators, as well as the problem of HIL testing are considered.
The article [18] examines the structure and hardware components of various systems, and also attempts to evaluate in more detail the application of HIL-modelling in dynamics and control. The general structure of HIL equipment for various industries is proposed.
The article [19] presents the new DP-HIL simulator concept and technology. The paper shows a block diagram of the HIL simulation, which was modified for testing of dynamic positioning system.
The disadvantage of the proposed solutions [15]- [19] is the low flexibility of including various models of command devices, actuators, control objects, objects of the training scene, weather conditions, etc. into the closed loop of modelling; the proposed solutions contain highly specialised equipment and, as a rule, are high-cost.

Fig. 3 shows a structural diagram of the Imitation Modelling
Stand, which includes an existing NTPro 5000 simulator, the modules of which are located above the local area network (LAN), and Control System Model, which includes additional system blocks 14-16 with information exchange software and functional software. CMS is connected to the local computer network of the NTPro 5000 simulator.
The NTPro 5000 simulator includes command device models 1-5, instructor's workplace 6, models of visualization channels 7-11, models of dynamics 12, 13. Information exchange between the NTPro 5000 simulator and the CSM is made via the LAN, using the regular NMEA NTPro 5000 simulator interface. NMEA is a special protocol for maintaining interoperability of marine navigation equipment from various manufacturers developed by the National Marine Electronics Association (NMEA). Most navigation applications provide Electrical, Control and Communication Engineering ________________________________________________________________________________________2020, vol. 16, no. 2 60 real-time data display supports and understand the NMEA protocol. Each individual message is independent of the others and is completed. The NMEA message includes a header, a dataset represented by ASCII characters, and a checksum field to verify the accuracy of the information transmitted. The title of a standard NMEA message consists of 5 characters, of which the first two defines the type of message and the remaining three indicate its name. NMEA also provides transmission of information from the LAN to a physical or virtual COM port. We can send navigation information from different navigational devices of a navigational bridge simulator using the NMEA interface. Some navigation devises for sending information are listed in Table I [20]- [22].  Fig. 4 shows a screenshot of standard Configuration Editor simulator program. NMEA_LOG_GYRO_ARPA interface has been added to the created ALPHA2-DPA virtual bridge configuration, which provides information exchange between the NTPro 5000 simulator and the CSM modules. The configuration snippet for this interface is shown at the bottom right of the Configuration Editor window.
The fragment above shows that NMEA receives information via the COM3 port from the navigation devices: LOG (device used to estimate the speed of a vessel through water), Gyro (gyrocompass) and ARPA (automatic radar plotting aid). Data via serial COM port is transmitted from the simulator network to the CSM in the form of NMEA messages, for example:  Information exchange software for the receiving and initial processing of information was created (see Fig. 5). Information exchange software is written in C# programming language and uses standard C# library methods for organising COM port communication, for example, ReadExisting() method from SerialPort class for COM port communication, and Substring() method from data class for parsing messages.
Part of code lower shows the process of parsing message to get data about the speed and heading of a vessel. The IMS functions as follows. From the instructor's workplace 6, it is necessary to choose the area of navigation, models of own vessels, models of equipment of vessels, models of targets, surrounding circumstances, weather conditions, models of functioning of command devices and controls gear, models of failures of command devices and controls gear. Then one needs to create an exercise, own vessels are assigned to the virtual bridges and the exercise is run. The models of dynamics 12, 13 simulated movements of own vessel, targets, surrounding circumstances, weather conditions. The results of the simulation via LAN are transmitted to the models of visualization channels 7-11 for display on screens and to command device models 1-5 for simulating their operation and displaying simulation data on their displays. The data of command device models 1-5 by the LAN are transmitted to CSM 14-16 directly in digital form and their functional modules are processed. The development and testing of these functional modules are the purpose of IMS creation. Output signals of the CSM 14-16 are transmitted by the LAN to the models of dynamics 12, 13 of the NTPro 5000 navigation simulator.

V. EXPERIMENTS
Testing the performance of the IMS was carried out in a closed circuit: navigation simulator NTPro 5000 -CSM with functional software module, for different areas of navigation, types of vessels and weather conditions. As a functional module of CSM, the module of avoiding collision with many targets was taken, including manoeuvring ones, mathematical, algorithmic and software of which was developed by the authors and protected by patents [23], [24]. At the instructor's workplace, a task was created to solve the problem of automatic collision avoidance with five dangerous manoeuvring targets.
According to materials [23], [24], in the on-board controller of the vessel, constantly, with the tact of solving the functional task, the area Ω of permissible collision avoidance with many targets simultaneously is constructed 1 2 ...
of divergence were taken at the nodes of the grid built in the coordinates: test Fig. 6 shows a divergence scheme. For each trial vector T V , a trial vector of relative motion j ΔV with j-target is calculated where tgj V is the j-target speed vector estimated from the radar measurements.
Trial vector of relative motion j ΔV is checked for belonging to the sector of dangerous courses (SDC): where sa D is the radius of safe area, mj D is the distance to j-target. Ort where mj B is bearing to j-target. (3) is not met, trial vector ( cos , sin )

If condition
belongs to the areas of permissible controls. The area of permissible controls in case of collision avoidance with all Control and Communication Engineering ________________________________________________________________________________________2020, vol. 16, no. 2 62 targets can be obtained by combining the areas of permissible controls with each target separately like (1).
Any pair of collision avoidance parameters 1 1 ( , ) n n V K ∈ Ω is valid for collision avoidance with all targets simultaneously. Therefore, further selection of the parameters of the collision avoidance from Ω is determined by additional conditions, for example, by the conditions for optimising the collision avoidance, the stability conditions (the invariance of the selected collision avoidance parameters), the Rules of the COLREG-72, etc. The deflection angle of the rudder δ and the deflection angle of the telegraph ϴ are determined as where ∫ ω ψ are the gains of the PID controller for the mismatch angle, the angular velocity and the integral of the mismatch angle; mz m ω ψ , are the measured course and angular rate of vessel rotation; δ is the rudder deflection to get a safe course; ϴ is the telegraph deflection to get a safe speed; 1 n K is a new course for safety collision avoidance; 1 n V is a new speed for safety collision avoidance. Figure 7 shows a screenshot of the vessel, targets and weather conditions from the visualization channels of the simulator. Information exchange software reads information from command device models with the period of its updating and transmits it to CSM for processing in order to solve the problem of collision avoidance. Fig. 8 shows the interface of the information exchange software during the experiment. The input and output data, the areas of safe movement and the settings of the software are depicted in more detail in patents [23], [24]. The output data in the form of a telegraph command and rudder command are transmitted by the information exchange software to the simulator. Fig. 9 illustrates the trajectory and position of the own ship (OS) and the target ships (T1-T5) at the end of the collision avoidance from the instructor's workplace.
At 12:17:00 CPA with all targets was more than 0.5 n.m. Throughout the experiment, the minimum distance to the targets was 0.502 n.m. with T2 (in Fig. 10). After 12:20:00 the range to all targets started increasing. This means that the automatic collision avoidance finished and experiment was successful.   The experiment showed the possibility of using the IMS for the development and testing of mathematical, algorithmic and software tools of CSM for different areas of navigation, types of ships and weather conditions.

VI. RESULTS
The paper has considered the issues of creating Imitation Modelling Stand based on a certified navigation simulator NTPro 5000 for the development and testing in a closed loop system with a Control System Model of mathematical, algorithmic and software tools of automated and automatic vessel motion control systems. The literature review of using IMS for the development and testing of functional modules has been conducted; the deficiencies of the proposed solutions have been identified, and the relevance of solving this problem has been substantiated. Software for information exchange between the navigation simulator and the Control System Model has been developed and tested. The authors of the paper have developed mathematical, algorithmic and software tools for the system of automatic control of divergence with many targets, including manoeuvring ones. The Control System Model with information exchange software and functional software is integrated into the local computer network of the simulator for creating a closed control loop and solving the problem of automatic collision avoidance with many targets, including manoeuvring ones. At the instructor's workplace, an exercise has been created to solve the problem of automatic divergence with five manoeuvring targets. Mathematical modelling of the avoidance collision processes with five manoeuvring targets in a closed circuit NTPro 5000 -Control System Model has been carried out.

VII. DISCUSSION
The results of mathematical modelling have shown that the developed Imitation Modelling Stand allows developing and testing the mathematical, algorithmic and software tools for automatic and automated control systems for various types of vessels, navigation areas and weather conditions and can be used to develop and test functional modules of the control systems.
Imitation Modelling Stand, in comparison with the found analogues, also makes it easy to include in a closed simulation cycle various models of command devices, actuators, control objects, objects of training scene, weather conditions; it is also universal both for solving problems of manual control and for developing and testing automatic and automated control systems; it is not highly specialized and created at minimal costs.

VIII. CONCLUSION
Imitation Modelling Stand has been created for the development and testing of mathematical, algorithmic and software tools of automatic and automated control systems.
The scientific novelty of the results obtained lies in the fact that for the first time it has been proposed to use a navigation simulator for the development and testing of mathematical, algorithmic and software tools for automatic and automated vessel motion control systems. This is achieved due to the fact that the LAN of the navigation simulator, which includes the instructor's workplace, command device models, models of visualization channels and models of dynamics, additionally integrates a Control System Model, which is one or several personal computers with information exchange software and functional software for controlling the movement of the vessel, creating an exercise at the instructor's workplace and running the simulator. The parameters of the vessel movement are read by the information exchange software into the Control System Model and processed there by functional algorithms to obtain controls; the obtained controls are transferred by the information exchange software back to the simulator to take into account their effects on the movement of the vessel model.
The practical value of the obtained results lies in the fact that mathematical modelling has confirmed the operability and efficiency of the created Imitation Modelling Stand by the example of working out the mathematical, algorithmic and software tools of automatic collision avoidance system with many targets, including manoeuvring ones, which allows them to be recommended for practical use.
Further research will be related to the adaptation of the created Imitation Modelling Stand for the development and testing of offshore vessel functional software.