Abstract
To operate unmanned systems in the ocean, many elements are required. They could be factors related to the equipment performance or operating methods. However, the aforementioned factors are suitable for situations not assuming unexpected events; in the actual ocean, unmanned equipment has the potential to experience problems in operation due to several factors such as environmental or external forces. Having problems in the propulsion system of unmanned marine equipment in unexpected situations affects the execution of duty of the unmanned equipment and connotes the risk of equipment damage and loss. Also, a lot of data generated in the real world is distributed disproportionately for each class, which means that the data of the minor class consists of significantly less data than the data of the majority class, and the normal data, in contrast, anomaly data is a very small amount of data, and there is very little data for learning. Therefore, in this study, anomaly detection based on unsupervised learning was conducted about these problems. In this study, we evaluated anomaly detection based on unsupervised learning to resolve these problems. Based on the results, the state of unmanned systems being operated in the ocean are identified and the anomaly state is examined. In this study, the auto-encoder (AE) method that learns the features of the normal area of the judgment data, that is, a part of machine learning, and the LSTM method for predicting time series states are utilized. This machine learning technology uses time-series learning data on the state of the unmanned system, creates standards to determine normal and anomaly states, and in turn, learns the normal state and determines the anomaly state. Furthermore, the simulation of the proposed method was carried out to verify the algorithm used in this study, and its validity was verified by comparing its data with the measured data. By applying the deduced anomaly detection information to the unmanned surface vehicle (USV) simulator, a fault tolerance control system was designed to enable the execution of duty even in the situation of an anomaly propeller of the USV, and the effectiveness of this study was verified.
Keywords
Introduction
This study is focused on designing a control algorithm such that this unmanned system determines anomaly data (failure) due to external forces or the environment during the execution of duty. Based on that, it enables the execution of duty in the situation of an anomaly propeller and, in turn, demonstrates optimized performance to continue the execution of duty by making a deduction by itself.
To this end, the algorithm learns the normal data using the vibration data of the USV propulsion system and determines the anomaly data based on the learned data model. In anomaly detection, the amount of anomaly data is much lower than that of the normal data, thus, there are limitations in the acquisition of the anomaly data through supervised learning. 1 Therefore, in this study, we implemented an algorithm that learns the normal data through unsupervised learning and classifies the anomaly data.2,3 Moreover, the anomaly detection of the time series data needs to consider the temporal features. Therefore, the composition of the auto-encoder (AE), which does not consider the temporal features, was transformed into an LSTM-AE that can process the time series data using the LSTM network, which can consider the temporal features. Through this, when anomaly data occurs by learning the normal data, LSTM-AE who has learned the normal data reconstructs the anomaly data. Anomaly data is determined to be anomaly data when Reconstruction Error is larger than normal data and is compared with a value of Threshold defined in advance.
The data used in this study were the vibration data of the propeller generated during the operation of the USV. The USV consists of one propeller in the transverse direction at the FRONT and two propellers at the REAR. Normal data were acquired by mounting vibration sensors on the two propellers in the REAR. Based on these, to verify the effectiveness of the anomaly detection of the propeller, we evaluated the optimal control algorithm for the continuous execution of duties in the anomaly situation of the propulsion system by utilizing the USV control simulation and real sea experimental data.
Anomaly state detection based on the vibration of the unmanned surface vehicle propeller using the LSTM auto-encoder
In the propulsion system of unmanned equipment operated in the ocean, it is extremely difficult to acquire anomaly data compared with normal data. When an anomaly occurs during operation in the ocean, it leads to damage and loss in most cases. Therefore, in this study, we developed an algorithm that learns the normal data and distinguishes the anomaly data using the LSTM auto-encoder (LSTM-AE) algorithm among the unsupervised learning methods.3,4
Composition of the LSTM Auto-Encoder
The composition of the LSTM-AE algorithm is consists of an AE (Auto-Encoder) algorithm that compares differences with normal features to determine whether there is an anomaly, and an LSTM algorithm that handles sequence data to consider the temporal flow. It is composed of an encoder-decoder structure to which LSTM cell is applied.5,6
Figure 1 shows the structure of AE (Auto-Encoder), a representative unsupervised learning methodology that extracts data features through an encoding layer that compresses input data into latent variables and a decoding process that reconstructs it close to the original.

Structure of auto encoder.
And equation (1) below represents AE.
And the structure of the LSTM used when learning time series data is shown in Figure 2.

Structure and operation of long short-term memory (LSTM).
And equation (2) represents LSTM.
The LSTM-AE makes the model learn using only the data of the normal signal. The encoder and decoder learn how to represent the normal signal to be more like a normal signal as the learning progresses, and finally, it outputs the data with a very similar distribution to the normal signal for the reconstructed results.7,8
Training
The encoder takes n continuous vectors
Compress information using
Inference
Compared to the learning process, the same thing is that Encoder generates a feature vector and uses Encoder’s feature vector as the initially hidden vector of Decoder. The difference is that the input of Decoder uses reconstructed output

Structure of LSTM-AE.
Reconstruction error:
Data division
As shown in Figure 4, In this paper, the normal section is divided into 4 (

Data division.
If this anomaly score exceeds the threshold (
Design of the anomaly detection model according to the propeller vibration of the unmanned surface vehicle
The LSTM-AE learns the characteristics of the normal data, when the anomaly data features are entered, the reconstruction error becomes larger than the error obtained when entering the normal data. Furthermore, when the time series propeller vibration data of the USV is entered into the learned LSTM-AE, it reconstructs the data to be as similar as possible to the entered vibration time series data. During this process, it determines if the input data are either normal or anomaly data by comparing the threshold, which sets up the reconstruction loss value representing the difference between the reconstructed and original results. Figure 5 presents the anomaly detection diagram using LSTM-AE.

Anomaly detection diagram using LSTM-AE.
In this study, the indicator that is generally widely used referred to as the mean squared error (MSE), was utilized. And the vibration data of the propeller mounted on the manufactured USV was used as the learning data.
The Specifications of an experimental USV and data set used are shown in Table 1, and the USV used for data collection is shown in Figure 6.
Specifications of an experimental USV and Data set.

USV for vibration data acquisition.
The data consist of 0.12 million single rows. To utilize the noise data obtained in 1 s as one input data, its form was converted into 120 rows for 1000 each. Moreover, if the difference in scale of the data features is inconsistent, it has an adverse effect on learning. Normalization is the method of making the data features to be reflected in the same scale (importance) to prevent this problem. 9
There are several normalization methods including min-max normalization,
The network cell of the LSTM-AE is the LSTM cell. The normalized raw data were transformed into a three-dimensional form to fit the two-dimensional data into the input data format of the LSTM cell. Finally, 20,000 training data comprising only normal data, 3600 validation data comprising normal and anomaly data, and 6800 test data were generated.
The composition of the final model built using these are shown in Table 2.
Final model construction.
Finally, after the learning is completed, the threshold that becomes the standard for determining the normality and anomaly of the input data is set up.
In this study, the precision-recall graph was used and the threshold was set up using the precision_recall_curve library provided by Sklearn. Considering the Trade-Off relationship between precision and reproduction rate, precision-recall uses the point with the highest precision and reproduction rate as the threshold of the model.
The precision_recall_curve is presented in Figure 7.

precision_recall_curve.
In the precision_recall_curve, the precision value is 8.0293847562, the recall value is 7.94,859,473,826, and the threshold is 3.0511952275.
Model and control system of the unmanned surface vehicle
All ships including the USV have the six-degrees-of-freedom equation of motion, which can be expressed with translational and rotational motion.11,12 Three components of the six-degrees-of-freedom equation represent the motion about the posture, and the other three represent the motion about the direction. As shown in Figure 8, in the motion of the surface vehicle, the motion about the posture is defined as surge, sway, and heave, whereas the motion about the direction is defined as roll, pitch, and yaw. In this study, the information related to the posture in the USV, namely roll, pitch, and the

Six degrees of freedom for a ship.
USV motion model
Location alongside the left and right direction is a factor significantly affected by the operating system of the USV, and it can be calculated using the USV motion model. Furthermore, it is a vehicle moving on the surface of the water, and unlike underwater vehicles, it is more significantly affected by the external thrust force rather than the external force by the fluid.13,14 To reflect these features in the simulation, equations (7) to (9) about the propulsion force and moment were shown. 15
The moment is
The model of the final USV including the fluid force is as follows.
Fault tolerant USV control algorithm
In this study, to prepare for a situation where one of the three propellers equipped in the USV breaks down, the fault tolerance cases for the propulsion system of the USV used in this study can be classified into three 16 :
Failure in one propeller in the transverse direction at the front
Failure in one starboard side at the rear
Failure in one port side at the rear
Based on the aforementioned three cases, the artificial neural network PID (ANN-PID) controller that adjusts the gain of the control algorithm was designed.
The ANN-PID controller is an algorithm that can change the control gain according to the current error. Additionally, it can simply and effectively control the USV using anomaly data. This algorithm is a method of reforming the gain of the controller such that the duty progresses continuously based on the heading angle in the direction of progress by detecting anomaly data, obstructing the detected propeller, and combining the two remaining propellers. The structure of ANN-PID is as shown in Figure 9.17–19

Structure of artificial neural network PID.
The three input data of the ANN-PID in Figure 8 are the error values used as a basis of the PID control algorithm, integral values of error, and differential values of error. The control input data are entered into the non-linear activation functions, namely hyperbolic tangent functions, respectively. This is a simple controller composed of a single layer; although it uses the sigmoid function as an activation function, in this case, the hyperbolic tangent function was utilized as an activation function because the hyperbolic tangent function has a higher efficiency than the existing sigmoid function. The hyperbolic tangent function and the sum of the signals entered into the function (
In this equation, ref(
Equation (10) shown above is the final equation for calculating the gain of the ANN-PID, and the controller calculates the gain until the final value is within the set target range. Also
Control of the unmanned surface vehicle using anomaly detection data
Anomaly detection model results
To evaluate the model made in this study, reconstruction error, train MAE loss, test MAE loss, and ROC for training data and test data are shown in Figure 10.

Model performance of LSTM-AE.
The model performance was evaluated using the area under the ROC (AUROC) index. Based on the evaluation results using the library of Sklearn, the result of 0.8816 was obtained.
Based on these results, the values were presented in the graph in Figure 11.

Test loss and threshold of anomaly detection model.
The graph presented above is the graph showing the test loss alongside the threshold obtained after applying the threshold. The data that detected the anomaly of the vibration data measured in the USV using the learned model is presented in Figure 12.

Anomaly detection of propeller vibration.
Fault tolerance control algorithm results utilizing anomaly detection data
In this study, the simulation was performed assuming that one of the three propellers installed in the USV was broken by reflecting the anomaly state detection result.
The fault-tolerant cases for the propulsion system of the USV were classified into three, namely, failure in one propeller in the transverse direction at the front, failure in one starboard side propeller at the rear, and failure in one portside at the rear. The situation in which two embedded propellers break down simultaneously was excluded. This is because if two propellers break down, the thrust and steering performance required for the operation of the USV cannot be structurally guaranteed. Here, based on the anomaly detection learning model that was previously verified, the status of the embedded propellers is identified using the measured vibration data, the operation is halted in the case of anomaly detection, and in turn, the thrust is redistributed based on the progress direction of the remaining two propellers. The arrangement of the propellers in the USV used in this study is presented in Figure 13. And the simulation to verify this consists of four steps.
Acquire the vibration data of each of the three propellers mounted on the USV and acquire learning data through normalization.
Using the LSTM-AE algorithm to check whether each propeller is anomaly.
Application of ANN-PID controller according to the propeller with an anomaly.
Apply the output value to the USV Dynamic Model.

Classification according to the failure situation of the propeller of the USV.
To verify the performance of the algorithm, the simulation including the USV model and LSTM-AE, ANN-PID was designed. The designed simulation is shown in Figure 14.

Simulation of USV including dynamics model and LSTM-AE, ANN-PID.
Furthermore, the parameters used in the simulation are listed in Table 3.
Parameters of propellers.
The simulation results for each case based on the data are shown above are presented in Figure 15. In the graph shown below, the simulation was designed to detect an anomaly using the vibration data in the case that the propeller stops its operation owing to failure, and to reach the final waypoint utilizing the other remaining propellers. Also, the initial gain of the controller was set to P_Gain 10, I_Gain 0.1, and D_Gain 1.

USV Simulation results including anomaly detection.
Moreover, to follow the USV heading angle according to the case, it adjusted the controller gain; the self-adjustment gain is shown in Figure 16.

Gain of the artificial neural network PID.
Conclusions
In this study, the USV propeller vibration data was used to determine whether there was an abnormality during driving, and based on this, a control system was designed to enable normal driving in abnormal situations. To determine the abnormality of the propeller, an auto-encoder (AE) algorithm that compares the difference with the normal characteristics to determine whether there is an abnormality and a long short-term memory (LSTM) algorithm that processes sequence data in consideration of time was used. For this purpose, Algorithm AE (Auto-Encoder), which determines whether there is an abnormality by comparing normal characteristics and differences to determine the abnormality of the propeller, and Algorithm LSTM-AE, which combines Algorithm LSTM (Long Short-Term Memory) to process sequence data in consideration of the passage of time, was used.
In addition, the LSTM-AE algorithm was verified by acquiring vibration data of three propellers mounted on the actual USV, and based on this, the simulation was designed to enable normal operation through proper controller switching in a failure situation according to the scenario. At this time, the ANN-PID algorithm was applied as an algorithm for controlling USV. Algorithm ANN-PID is an algorithm that can vary the control gain according to the current error and can control USV simply and efficiently using USV’s anomaly state data. Through the LSTM-AE algorithm used in the Anomaly Detection of this system, we created a model that can detect more than the propeller of USV, and set the optimal threshold using the Precision-Recall graph. In addition, as a result of evaluating the model performance using AUROC, a result of 0.8816 was derived for the abnormality detection reliability. Based on these algorithms (LSTM-AE, ANN-PID), a system capable of overcoming the assumed failure situation was designed and verified through simulation. And it was confirmed that the Desired trajectory was stably followed by changing the gain of the control algorithm of the other propellers in normal operation from the time when the failure was determined as a result of the simulation.
This study attempted to apply this algorithm to marine equipment that had been limitedly applied to Anomaly Detection and Fault Tolerance Control. In addition, the anomaly data was detected with an accuracy of about 80% using the propeller vibration data of the USV operating normally at sea. This result is judged to be based on data errors due to various variables, such as environmental factors, errors due to data acquisition, errors due to measurement equipment itself, and the LSTM-AE algorithm that has not yet been optimized.
The biggest meaning of this study is that the anomaly Detection was applied to marine equipment and applied to fault tolerance control using it, and the actual USV propeller vibration was measured to generate a learning algorithm and verify its effectiveness. Although the current study did not show perfect anomaly data detection performance, it is thought that more anomaly detection performance will be achieved if learning data is generated by designing techniques to correct environmental noise, measurement equipment noise, and errors in data acquisition. In addition, further research will be conducted after securing vibration and other data (current, environment sensor, etc.) for various USV situations at sea.
Footnotes
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This research was a part of the project titled “Development of smart maintenance monitoring techniques to prepare for disaster and deterioration of port infra structures,” funded by the Ministry of Oceans and Fisheries, Korea.
