# Online Learning Based Underwater Robotic Thruster Fault Detection
## 6 Experimental Results and Analysis  
### Implementation of the Fault Detection Algorithm  
The pipeline of the underwater robotics thruster fault detection implementation is illustrated in Figure 6. Before fault detection, the historical best solution library was initialized based on prior knowledge of the thruster model. During operation of the underwater robot, the system monitoring information was collected, which was fed into the online learning-based fault detection algorithm.  
Whenever a set of runtime work status data is collected, the fault detection algorithm first checks whether there is currently a control variable-speed model available. If there already exists a control variable-speed model, the predicted propeller speed is calculated and the model prediction residual will be evaluated by the residual threshold. If the model prediction residual is within the threshold, it means that the thruster is not malfunctioning. If the model prediction residual exceeds the threshold, or there is no control variable-speed  
Figure 6: The schematic flowchart of the thruster fault detection algorithm.  
model available, the online modeling procedure will start. It consists of online time delay estimation, data alignment and online optimization based polynomial fitting modeling.  
When a new control variable-speed model is built through online modeling, the fault detection algorithm will check whether there is an existing enabled model. If no enabled model exists before, then enable the new-built model and calculate the model residual, the followed process is the same as previously described. If there already exists an enabled model before the new model is established, the new-built model will replace the enabled model. Afterwards, propeller speed prediction residual of the new-built model will be calculated. If the residual is within the predefined range, the thruster system is determined to work smoothly. Otherwise, the fault detection algorithm will check if the model has been updated in the previous round. When the work status data of the next sampling period is collected, the model online update process will be started, and the following process is the same as previously described. If the model has been updated in the previous step, a thruster fault occurs.  
Compared with existing methodologies, main feature of the online learning-based fault detection algorithm is the dynamic model based on online modeling and the adaptive fault detection strategy based on online model update. To better demonstrate the performance of the proposed method, we designed a comparison method that uses a fixed model and performs fault detection based only on fixed thresholds. In the fixed-model based method, when a set of runtime work status data is collected, a control variable-speed model will be created in the same way as the proposed online modeling method. After that, the control variable-speed model will be used for propeller speed prediction in the whole fault detection process. If the speed prediction residual of the fixed model exceeds the predefined threshold, a thruster fault was determined to have occurred. For comparison, the predefined threshold and range of the modeling data is the same as that uses in the proposed online learning model-based method.