**1. Introduction**

With the continuous development of modern technology, ship electrical power systems that can realize overall coordination of the energy of the entire ship are expected to constitute the development trend of ships in the future [1,2]. Ship electrical power systems are significantly different from land power systems [3]. In particular, they are strongly independent. Because ship electrical power systems have a smaller capacity than onshore power systems, bus voltage fluctuation may occur under the application or removal of a large load, which can easily cause serious faults. Any equipment fault in the system can affect the entire power grid. If potential safety hazards occur during operation, they will threaten the safety of the entire ship. Ship electrical power systems are regarded as the core of the entire ship. They are independent and have high requirements in terms of safe operation and fault diagnosis. They need faster and more accurate fault diagnosis than land power systems in case of system faults [4]. Therefore, fault diagnosis technologies are necessary to study ship electrical power systems [5].

Fault diagnosis of a ship electrical power system entails modeling and simulation of the system. Early modeling methods mainly involved physical modeling, i.e., a physical model was established using the similarity principle. At present, the mathematical modeling method is mainly used. This method can abstract the internal characteristics of the system into mathematical formulas, deduce the internal characteristics of the actual system, and diagnose faults through changes in the relationship between the independent variables and the dependent variables of the mathematical formulas. Research on modeling and

**Citation:** Yu, C.; Qi, L.; Sun, J.; Jiang, C.; Su, J.; Shu, W. Fault Diagnosis Technology for Ship Electrical Power System. *Energies* **2022**, *15*, 1287. https://doi.org/10.3390/en15041287

Academic Editor: Xi Gu

Received: 26 December 2021 Accepted: 4 February 2022 Published: 10 February 2022

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

simulation of ship electrical power systems is based on the power system model and involves a series of studies on how to maintain system stability. The ship electrical power system model is integrated with the modules of each basic unit. First, a mathematical model is established for each basic unit of the power system according to the structure and basic principles of the ship electrical power system. Then, a simulation model is built to form a complete ship electrical power system model [6]. The research process should include modeling and simulation technologies, automatic control, and other theoretical methods. In particular, the generator and its excitation are related to the voltage stability of the power system. The linear single variable control method, which was first used in excitation control, has been subsequently modified into the nonlinear multivariable control method. The development of the excitation control method has undergone several stages [7], from the earliest classical proportional integral and differential (PID) control method to the multivariable control method based on modern theory. At present, it is applied as an intelligent control method. In [8], the authors proposed a T-S fuzzy-weightingbased excitation switching control method for a tidal generator set, which can overcome the dynamic and static performance defects in the excitation control of the tidal generator set and improve its performance. In [9], feedback control was adopted for the field currents of the two-phase brushless exciter, and speed reference control was adopted for the excitation frequency and phase sequence; this method achieves a constant field current for the main generator. In [10], the authors presented a nonlinear coordinated excitation and static VAR compensator (SVC) control for regulating the output voltage and improving the transient stability of a synchronous generator infinite bus (SGIB) power system. In terms of the mathematical development of fault diagnosis methods for ship electrical power systems, the author in [11] developed a higher-order mathematical model of the generator to describe the generator state in greater detail. In [12], the authors proposed three different mathematical models for the mathematical modeling of a synchronous generator, used the models under different working conditions, and conducted a detailed comparative analysis of the models to improve the simulation accuracy.

In general, fault diagnosis methods are currently categorized into three main types [13], namely fault diagnosis based on analytical modeling, fault diagnosis based on signal processing, and fault diagnosis based on artificial intelligence. Analytical modeling includes state and parameter estimation as well as consistency testing. It has the characteristics of real-time diagnosis and the essence of deep human systems. However, it also has some defects, such as a large modeling error and significant noise interference. Signal processing includes spectrum analysis and wavelet transformation. It has the advantages of simple application and good real-time performance. However, it cannot deal with potential faults. Artificial intelligence [14] includes neural networks, fuzzy theory, genetic algorithms, rough sets, artificial immune systems and fuzzy cluster analysis algorithms, fault trees, and support vector machines, which have strong learning and reasoning abilities. To overcome key faults such as a broken rotor bar or electrical phase fault, a fault diagnosis method for the electric drive of an electric ship has been proposed [15]; however, the number of fault diagnosis objects is insufficient. In [4], the proposed load monitoring and fault detection method outlines a data-clustering-based approach to extract unique feature vectors from short-time Fourier transform analysis for any pulsed load; however, this method is not suitable for any general load curve integrated solution. In [16], the location and severity of a stator winding fault of a permanent magne<sup>t</sup> synchronous motor were modeled and detected, and a mathematical model that can describe both the health state and the fault state was established; however, the mathematical model is not suitable for other ship electrical power system equipment. In [17], a remote system was introduced for online condition monitoring and fault diagnosis of a gas turbine on an offshore oil well drilling platform on the basis of a kernelized information entropy model. In [18], a multi-class multi-core correlation vector machine fault diagnosis method based on manifold learning and swarm intelligence optimization was proposed to improve the predictive maintenance activities of diesel engines.

This paper proposes an improved network fault diagnosis model based on a convolutional neural network (CNN). This method can directly input the original image without feature decomposition and extraction. It has significant advantages, such as simple application, high operation speed, automatic parameter updates, and stable, convergent, and accurate results. These advantages enable the method to overcome existing drawbacks in the fault diagnosis of ship electrical power systems. First, based on the MATLAB/Simulink (The MathWorks Inc., Natick, MA, USA) simulation software platform, the ship electrical power system simulation model is established to understand the normal working state and fault state of the generator and load. Then, the fault response curve is generated and the picture dataset of the network model is obtained. Second, the CNN fault diagnosis model is designed using TensorFlow, an open source tool for deep learning. Finally, network model training is performed, and optimal diagnosis results are obtained to realize structural parameter optimization and diagnosis.

The remainder of this paper is organized as follows. Section 2 describes the model and simulation of the ship electrical power system. Section 3 discusses the development of the improved CNN. Section 4 presents and analyzes the experimental results. Finally, Section 5 concludes the paper.

#### **2. Ship Electrical Power System**

#### *2.1. Model of Excitation Control System*

At present, most ships use AC electric propulsion systems. Because the electrical equipment of the ship mainly comprises inductive loads, the load current will cause demagnetization of the synchronous generator, and the load change will alter the power grid voltage of the ship [19]. To ensure stable operation of the power system, the excitation system will adjust the excitation current supplied to the generator according to the load change, make the generator terminal voltage return to the given value, and realize stability of the generator terminal voltage.

Currently, the most common excitation mode of generators in ship electrical power systems is phase compound excitation of brushless excitation systems. The combination of brushless excitation and automatic voltage regulation (AVR) can effectively enhance the forced excitation capacity and reaction speed of the excitation system. The principle of the excitation system is that the rotating exciter rotates at the same speed as the magnetic field of the main generator, and the auxiliary exciter rotates with the rotating exciter.

AVR plays an important role in phase compound excitation systems [20]. The power supply unit in AVR converts the output voltage of the generator into the voltage required by the system through voltage transformation, rectification and other links, and then transmits the results to the PID control unit and phase control unit. The synchronous control unit controls and adjusts the phase change of the excitation current output through the exciter to maintain the same change as the phase change of the applied thyristor excitation voltage. The voltage difference detection unit monitors the error signal between the reference voltage and the actual voltage in the system. The PID control unit amplifies the voltage error signal. The phase control unit mainly amplifies the signal. The main thyristor rectifier unit mainly rectifies the armature current of the static exciter.

Based on the above-mentioned principles and by referring to the excitation system model recommended by IEEE [21], the mathematical model of the excitation system can be obtained as follows:

(1) Mathematical model of phase compound excitation device is represented by *d* and *q* components as follows:

$$
\mathcal{U}I\_I = \sqrt{\left(\mathcal{U}\_d - K I\_d \mathfrak{x}\right)^2 + \left(\mathcal{U}\_\emptyset - K I\_\emptyset \mathfrak{x}\right)^2} \tag{1}
$$

where *Ur* is the output voltage of the phase compound excitation device, *Ud* is the armature terminal voltage of generator axis *d*, *Uq* is the armature terminal voltage of generator axis *q*, *K* = <sup>9</sup>√2/*<sup>π</sup>*, and *x* is the moving reactance.

#### (2) Mathematical model of voltage difference

The model of voltage difference is an adder model, which compares the effective voltage signal input of other elements and obtains a voltage difference signal as a control signal. The difference between the output terminal voltage and the set voltage satisfies Equation (3):

$$\mathcal{U}\_{tf} = \sqrt{\mathcal{U}\_d^2 + \mathcal{U}\_q^2} \cdot \frac{1}{1 + T\_r s} \tag{2}$$

$$
\Delta \mathcal{U} = \mathcal{U}\_{ref} + \frac{\mathcal{U}\_{f0}}{\mathcal{K}\_t} - \mathcal{U}\_{tf} + \mathcal{U}\_{stab} - \mathcal{U}\_{ff} \tag{3}
$$

where *Ut f* is phase compound excitation voltage signal, *Tr* is the time constant of the filter, *Uref* is the reference voltage of the automatic voltage regulating device, Δ *U* is the voltage difference between the output terminal voltage and the set voltage, *Uf* 0 is the initial excitation voltage, *ke* is the effective gain of the exciter, *Ustab* is the grounding voltage of power system (0), and *Uf f* is the feedback output voltage.

(3) Amplifier mathematical model The mathematical equation that the amplifier satisfies is:

$$
\mathcal{U}\_a = \mathcal{U}\_c \frac{\mathcal{K}\_a}{1 + T\_a s} \tag{4}
$$

where *Ua* is the output voltage of the amplifier, *Uc* is the voltage output by the compensator, *Ka* is the gain of the amplifier, and *Ta* is the time constant of the amplifier.

(4) Mathematical model of lead–lag compensator The mathematical equation that the lead–lag compensator satisfies is:

$$
\Delta l\_{\rm c} = \Delta l I \frac{T\_{\rm c}S + 1}{1 + T\_{\rm b}s} \tag{5}
$$

where *Tc* and *Tb* are the lead compensation time constant and lag compensation time constant of the compensator, respectively.

(5) Mathematical model of proportional saturation element The mathematical equation of proportional saturation element is:

$$\text{In } 0 \le E\_f \le E\_{f\text{max}}, E\_f = E\_{d\text{-}}\\E\_{f\text{max}} = \begin{cases} \text{constant, } K\_p = 0\\\ K\_p \mathcal{U}\_{tf}, K\_p \ge 0 \end{cases} \text{ conditions}$$

$$\text{Then, } E\_{fd} = \mathcal{U}\_d + \mathcal{U}\_r \tag{6}$$

where *Ef d* is the voltage output by the voltage regulating device, and *Ef* and *Efmax* are the proportional saturation element output voltage value and maximum voltage value, respectively.

(6) Simplified exciter mathematical model Exciter is usually represented by one-order inertia element, as shown in Equation (7):

$$
\mathcal{U}\_f = \mathcal{E}\_{fd} \frac{1}{\mathcal{K}\_\mathcal{\epsilon} + T\_\mathcal{\epsilon}} \tag{7}
$$

where *Uf* is the output voltage of the exciter and *Te* is the time constant of the exciter.

(7) The mathematical equation that the feedback stabilization element satisfies is:

$$\mathcal{U}\_{ff} = \mathcal{U}\_f \frac{K\_f s}{1 + T\_f s} \tag{8}$$

where *Kf* and *Tf* are the gain and time constant of the feedback element.

#### *2.2. Simulation Model of Diesel-Driven Synchronous Generator and Its Excitation System*

According to the above-mentioned mathematical model, the simulation model of the excitation control system [22] is established using simulation software as follows:

As shown in Figure 1, the main regulator and lead–lag compensator, as the main controller and damping feedback link, constitute a closed-loop PID control loop. Input vref is the set value of the synchronous generator terminal voltage, vd and vq are the voltage values on the d-axis and q-axis of the generator, respectively, and vstab is the synchronous generator ground zero voltage. The output terminal Vf of the excitation control system is the excitation voltage. In addition to the corresponding parameters of each link shown in Figure 1, the initial excitation voltage Vf0 is set to 1, and the upper and lower limits of the proportional saturation link for the limiting amplitude are 5 and 0, respectively.

**Figure 1.** Excitation control system simulation model.

The power unit of the power system of the ship adopts diesel fuel combination for combined power. The main power unit is the synchronous generator driven by diesel, while the auxiliary power unit is the asynchronous generator driven by a gas turbine. The synchronous generator is the synchronous generator simulation model in the MAT-LAB/Simulink/SimPowerSystems module library, and its parameters are listed in Table 1. To ensure stability and correctness of the simulation graphics, it is also necessary to use the built-in function of the powergui module in Simulink in order to initialize the generator.

**Table 1.** Simulation parameters of synchronous generator.


#### *2.3. Simulation Model of Gas-Turbine-Driven Asynchronous Generator*

The auxiliary power unit gas turbine has a complex structure. To better simulate the operation, the turbine part of the of gas turbine is used to replace the entire gas turbine [23], as shown in Figure 2.

**Figure 2.** Turbine simulation model.

The turbine uses a two-dimensional look-up table to calculate the turbine torque output (TM) as a function of the gas speed (w speed) and turbine speed (w turbo) of the gas turbine.

The asynchronous generator is the asynchronous generator simulation model in the MATLAB/Simulink/SimPowerSystems module library. Its parameters are listed in Table 2.

**Table 2.** Simulation parameters of asynchronous generator.


#### *2.4. Discrete Frequency Regulator*

Figure 3 shows the simulation model of the discrete frequency regulator [24]. The frequency is controlled by the discrete frequency regulator module. The controller uses a standard three-phase phase locked loop (PLL) system to measure the system frequency. The measured frequency is compared with the reference frequency (60 Hz) to obtain the frequency error. The error is then integrated to obtain the phase error. Further, the proportional differential (PD) controller uses the phase error to generate an output signal representing the required secondary load power. The signal is converted into an 8 bit digital signal to control the switching of eight three-phase secondary loads. To minimize voltage interference, switching occurs when the voltage crosses zero.

#### *2.5. Ship Electrical Power System Simulation Model*

The ship electrical power system model consists of the diesel-driven main generator set module, gas-turbine-driven auxiliary generator set module, and power load. The main load is 300 kW [25]. The secondary load block consists of eight groups of three-phase resistors connected in series with the GTO thyristor switch. The nominal power of each unit follows a binary series; thus, the load can be varied from 0 to 510 kW in steps of 2 kW. The GTO is simulated by an ideal switch. In summary, the simulation model of the ship electrical power system can be obtained as shown in Figure 4. A, B and C are phase lines.

**Figure 3.** Discrete frequency regulator simulation model.

**Figure 4.** Ship electrical power system simulation model.

#### *2.6. Typical Fault Simulation of Ship Electrical Power System*

Ship electrical power systems are different from land power systems. In particular, ship electrical power systems are strongly independent. A component fault in the ship power grid may affect the entire power grid. Short-circuit faults and open-phase faults are typical faults that pose serious threats. Such faults affect not only individual equipment but also the power grid of the entire ship. In severe cases, they may lead to paralysis of the ship power grid. As shown in Table 3 short-circuit faults include single-phase short-circuit grounding, two-phase short circuit, two-phase short-circuit grounding, and three-phase short circuit, while open-phase faults include single-phase disconnection and two-phase disconnection. It is necessary to simulate and diagnose the state of short-circuit and open-phase faults as typical faults in ship electrical power systems.

There are many reasons for short-circuit faults [26], such as line aging, component damage, corrosion and ring breaking in the working environment of the ship, and component insulation. Short-circuit faults pose serious threats, as they may burn important equipment, interfere with nearby communication, endanger life, and even lead to power grid collapse and loss of power supply for the entire ship. For ship electrical power systems, any type of short-circuit fault can not only threaten the safety of the entire ship power grid but also produce various problems such as electromagnetic interference. Open-phase faults, similar to short-circuit failure, will also has devastating effects.

Based on the simulation model of the ship electrical power system, the "three-phase fault" fault module of Simulink is added at the synchronous generator, asynchronous generator, main load, and secondary load ends to set the time of fault occurrence and simulate typical single-phase short-circuit grounding faults, two-phase short-circuit faults,

two-phase short-circuit grounding faults, and three-phase short-circuit faults [27]. A "threephase breaker" is used to set the occurrence time of open-phase faults and simulate typical single-phase disconnection and two-phase disconnection.



This section describes single-phase short-circuit grounding faults at the synchronous generator end. During normal operation, the three phases are symmetrical; hence, regardless of which phase of ABC is grounded, the changes in the short-circuit faults are basically the same. The single-phase short-circuit grounding fault simulation is performed by taking phase a as an example. The fault module is set to phase a grounding in 10 s, the fault module is cut off in 10.5 s, and the total simulation time is 25 s. Before 10 s, the entire power system was in stable operation. At 10 s, the fault module caused phase a short-circuit grounding fault, and the fault was removed after 0.5 s. The simulation results are shown as response curves in Figure 5. When different faults occur in different equipment of the power system of the ship, the amplitudes of the four output response curves in the fault time period are different from the normal waveform, and the differences are significant. Therefore, this is used as the basis for fault diagnosis.

The abscissa represents time, and its unit is second (s). Vf (pu) is the unit value of the excitation voltage, Frequency (Hz) is the system frequency, rotor speed wm (pu) is the unit value of the synchronous generator speed, and ASM speed (pu) is the unit value of the asynchronous generator speed.

It can be seen that in the initial stage of the ship electrical power system, the system tends to be in stable operation after starting, and the speed, excitation voltage and frequency of the two generators have not changed, and the entire power system has not fluctuated significantly. At 10 s, the fault module "Three-Phase Fault" causes the single-phase shortcircuit grounding fault of Phase A, and the short-circuit current in phase A, generator speed, excitation voltage and frequency fluctuate greatly. The single-phase short-circuit grounding

fault affects the stability of the power system and makes the ship unable to run normally. At 10.5 s, the fault module "Three-Phase Fault" is removed, and the single-phase short-circuit grounding fault disappears. After adjustment by the excitation control system, the ship electrical power system returns to normal; the speed, excitation voltage, and frequency of the two generators return to stability. Similarly, the simulation results of two-phase short-circuit, two-phase short-circuit grounding, three-phase short circuit, single-phase disconnection, and two-phase disconnection at the synchronous generator end are shown in Figure 6. The faults at the asynchronous generator, main load, and secondary load ends will not be repeated.

**Figure 5.** Response curve of single-phase short-circuit grounding fault at synchronous generator terminal.

**Figure 6.** Response curve of five different faults at synchronous generator end.

#### **3. Construction of Improved CNN**

*3.1. CNN*

CNN has emerged as a research hotspot in many scientific fields, especially pattern classification [28]. CNN is composed of a series of layers, as well as data flows between the layers. The basic structure is as follows: input layer, convolution layer, activation function, pooling layer, and fully connected layer, i.e., INPUT-CONV-RELU -POOL-FC.

The convolution layer is a feature extraction layer. The input of each neuron is connected to the local receptive field of the previous layer and extracts local features. The convolution layer mainly convolutes the image according to the convolution kernel and reduces noise [29]. It also involves the principle of "weight sharing". The calculation formula of the convolution layer is as follows:

$$\mathbf{x}\_{j}^{l} = \sum\_{i \in M\_{j}} \mathbf{x}\_{i}^{l-1} \times k\_{i\bar{j}}^{l} + b\_{j}^{l} \tag{9}$$

where *l* denotes the number of layers, *Mj* represents the feature graph set of the previous layer associated with the *j*the feature graph of the current layer, *xlj* is the *j*th characteristic diagram output by the *l*th layer, *xl*−<sup>1</sup> *i* is the *i*th characteristic diagram of the output of the *l* − 1th layer, *klij* is the convolution kernel between the *j*th characteristic graph of the *l*th layer and the *i*th characteristic graph of the previous layer, and *blj* is the offset of the *j*th characteristic graph of the *l*th layer.

The activation function is used to add nonlinear factors, because the convolution method is used to deal with linear operations, i.e., assign weights to each pixel. The expression of the linear model is not sufficient; hence, an activation function is required. Common activation functions include the sigmoid function, tanh function, ReLU function, and leaky ReLU function.

The pooling layer is a feature mapping layer. After adding bias, a new feature map is obtained in the pooling layer through a nonlinear function [30]. The functions of pooling are as follows: (i) reducing the size of the characteristic diagram and simplifying the computational complexity of the network; (ii) feature compression to extract the main features. The operation formula of the pooling layer is as follows:

$$x\_j^l = \beta\_j^l \text{subddown}\left(x\_i^{l-1}\right) + b\_j^l \tag{10}$$

where subdown(·) represents the pooled down-sampling function, *βlj* is the ratio column offset, and *blj*is the additive bias.

The fully connected layer is used to connect all the features and send the output value to a classifier (such as a softmax classifier) for classification.

Finally, the test accuracy and error loss function value of the model are output. The structure and parameters of CNN are shown in Figure 7.

#### *3.2. Improved CNN*

The traditional model has a complex structure, massive parameters, and low running speed. Moreover, the convergence speed of the classification results is affected by the method of initializing the parameters and the updating of the network weights, and there are oscillation problems in the accuracy and loss rate curves. In summary, this study makes the following improvements and proposes a CNN model with better performance, which can avoid the above-mentioned issues.

(1) All local response normalization (LRN) layers are removed and the initial value program is changed. It is proven by practice that the normalization operation of batch normalization (BN) is used after simple parameter initialization. The use of BN is conducive to the convergence of the samples and the stability of the network.


CNN model parameters and improved CNN model parameters are listed in Tables 4 and 5, respectively.

**Figure 7.** CNN structure.

**Table 4.** The parameters of the CNN.


**Table 5.** The parameters of the improved CNN.


#### *3.3. Flow of CNN Algorithm*

The algorithm flow of the proposed CNN fault diagnosis model is shown in Figure 8. It is mainly divided into four stages:


**Figure 8.** Algorithm flow.

#### *3.4. Data Preprocessing*

This study employs MATLAB/Simulink to build the ship electrical power system and takes the waveform of fault response curve as the input of the network fault model. Data preprocessing is divided into the following parts: data acquisition, image culling and data normalization.


of data. The result value is mapped to the interval of (0,1). The transformation function is as follows:

$$\mathbf{x}^\* = \frac{\mathbf{x} - \min}{\max - \min} \tag{11}$$

where *max* and *min* are the maximum and minimum values of the sample data.

After preprocessing of the above-mentioned data, the image set with significant characteristics is used as the input of the CNN. The CNN model performs convolution, pooling, and other operations on the picture set to generate the output of the network model.

#### **4. Experimental Results and Analysis**

This study employed a Windows 10 system (Microsoft, Redmond, DC, USA) with the Python 3.7.11 (Python Software Foundation, Wilmington, DE, USA) compiling environment and TensorFlow learning framework to write the network programs. Because the image dataset used in this study was simple and regular, and the amount of data was small, the conventional method was used to adjust the parameters in order to optimize the CNN model.

#### *4.1. Learning Rate*

In the training network model, the learning rate is an important super-parameter that controls the speed of network weight adjustment. In general, the higher the learning rate, the faster is the learning of the network. However, if it is too high and reaches extreme values, the accuracy will be reduced; the loss value will stop falling and oscillate repeatedly at a certain position. The lower the learning rate, the slower the decrease in the loss gradient and the longer the convergence time. Therefore, it is crucial to choose an appropriate learning rate. By referring to numerous experiments as well as the literature, the learning rate of the network model was set to 0.0001.

#### *4.2. Experimental Results*

After several experiments, the optimal network fault diagnosis model is finally obtained. Compared with the original CNN model proposed, the average accuracy of the identification and classification of the ship electrical power system is up to 99%. This method makes the fault diagnosis of the ship electrical power system more convenient and reliable. The accuracy and loss variation diagrams were generated using PyCharm and TensorFlow frameworks, as shown in Figure 9a,b, respectively. The accuracy and loss variation diagrams of the original CNN are shown in Figure 9c,d, respectively. The accuracy of each fault category is listed in Table 6.

As can be seen from Figure 9a,b, the overall identification accuracy of the improved model for ship electrical power systems faults increases, and the loss rate decreases as the number of training epochs increases. After the improved model is trained once, the average accuracy of fault diagnosis reaches 97%, and the loss value is less than 0.1. After 4 times of model training, the average accuracy of fault diagnosis is 99%, and the loss value is less than 0.05. A comparison of Figure 9a–d shows that the recognition accuracy of the improved CNN after the first training epoch is higher than that of the original network after four training epochs. At the same time, the convergence speed of the loss value curve of the improved model is higher than that of the original model; the fluctuation range is smaller and is more stable after convergence. As can be seen from Table 6, the accuracy of the improved CNN for different faults at different locations is higher than that of the original network, indicating that the improved CNN provides good classification results for the fault identification of the ship electrical power systems; thus, it has considerable potential for the fault diagnosis of ship electrical power systems.

**Figure 9.** Experimental results of training network and original network: (**a**) accuracy of training network, (**b**) loss of training network, (**c**) accuracy of original network and (**d**) loss of original network.



## **5. Conclusions**

A fault diagnosis method for ship electrical power systems was proposed on the basis of an improved CNN to support the normal operation of ships. According to the results, the following conclusions can be drawn:


Nevertheless, there remains a scope for improvement in terms of the training time of the model. In the future, the simulation model will be improved such that it is more in line with actual ship electrical power systems. Based on the optimized CNN model, fault diagnosis accuracy can be improved further.

**Author Contributions:** Conceptualization, J.S. (Jie Sun); methodology, C.Y. and J.S. (Jie Sun); software, C.Y. and J.S (Jie Sun); validation, C.J., J.S (Jun Su) and W.S.; formal analysis, J.S. (Jie Sun) and J.S. (Jun Su); investigation, C.Y., J.S. (Jie Sun) and W.S.; resources, J.S. (Jie Sun) and C.J.; data curation, W.S.; writing—original draft, C.Y., L.Q. and J.S. (Jie Sun); writing—review & editing, C.Y. and L.Q.; visualization, J.S. (Jun Su); supervision, L.Q. and C.J.; project administration, L.Q. and C.J. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research was funded by National Natural Science Foundation of China NO.51875270 and Industry University Research Collaboration of Jiangsu Province NO.BY2020031.

**Conflicts of Interest:** The authors declare no conflict of interest.
