Wavelet-based Convolutional Neural Network for Non-Intrusive Load Monitoring of Next Generation Shipboard Power Systems

In this study, a non-intrusive load monitoring (NILM) framework is developed for next generation shipboard power systems (SPS) based on a discrete wavelet transform signal processing and a convolutional neural network (CNN). We have applied the developed NILM method to a four-zone medium voltage direct current (MVDC) SPS to evaluate the effectiveness of the proposed method. Each zone of the MVDC SPS consists of multiple components, such as propulsion load, pulsed load, high ramp rate load, cooling load, and hotel load. The current signals from the main generators are the main inputs to the NILM model. The current signals are first processed through a discrete wavelet transform to create a coefficient vector that reflects the status of all the components in each zone. Then, a multi-class classification problem is formulated and solved using a CNN architecture model to monitor the load statuses in real time. The results of case studies show that the developed NILM model in comparison with benchmark methods can (i) accurately monitor the status of all components with a total accuracy of over 98%, (ii) identify unique pulsed loads with a total accuracy of over 99%, and (iii) sustain the functionality of load monitoring under extreme events such as cyber/physical attacks, load uncertainty, and noisy inputs.


Introduction
Shipboard power systems (SPS) for future navy vessels will consist of a huge number of electric parts, including integrated power systems (IPS) for electric propulsion, weapon loads, and support systems, all of which will require more electric power onboard.In addition, the U.S. Navy envisions to operate future navy ships more intelligently and with fewer crew members [1][2][3].In the meantime, as the number of components grows in SPS, load monitoring becomes one of the most important aspects for SPS functioning.Future naval SPS loads may have unique power consumption patterns (such as pulsed loads).Thus, it is critical to have an effective load monitoring system that can actively monitor all types of loads in real time without inadvertently detecting any faults.
Recent developments in sensing devices, particularly current sensors, have significantly improved the capability of load monitoring.Particularly, non-intrusive load monitoring (NILM) has been widely explored due to its simplicity, affordability, and privacy-preserving properties.In NILM, electrical signals (like currents signals) are monitored at a centralized location, such as smart meters at homes or generator output currents in smart grids.The power usage of each component could then be monitored by leveraging disaggregation techniques based on the sampled current data.Since the aggregated signal in NILM contains the fundamental characteristics of all current signals, there is no need to install current sensors for every single component.

Literature review
The methodologies used in NILM could be broadly divided into two categories.The first class of NILM methods is estimating the ON/OFF status and power consumption of each component using steady state values, such as active and reactive power in steady state.For instance, Laughman et al. [4] suggested using active and reactive power, known as P and Q, as the fundamental variables on the P-Q plane.Nevertheless, the P-Q plane may exhibit overlap for various components due to voltage fluctuations from external sources.The inability to track transients is one of the main issues with this kind of technique.The second class of NILM methods focuses more on dynamic performance and is able to track both steady-state and transient load signals.For instance, Leeb et al. [5] decomposed the current signal using a short-term Fourier transform (STFT).The uncertainty principle, however, may cause STFT to lose some low-frequency features.Reference [6] have proposed to use a discrete wavelet transform (DWT) method to extract features, showing that DWT can handle transient data better than the STFT.The study has divided the original signal into approximation and detailed coefficients using Daubechies (db) filters.
NILM could be formulated and characterized as a classification problem that divides the aggregated signal into its sources, once characteristics from the current signals have been extracted.To this end, several classification approaches have been investigated in the literature.For example, Kim et al. [7] have created and trained a Hidden Markov Model for each class, using Hidden Markov Models for classification (i.e., each component).In recent years, NILM has witnessed extensive use of machine/deep learning models.For example, the NILM problem has been solved by classifying wavelet transform coefficients using a k-nearest neighbor model in Refs.[8,9].A decision tree classifier [10] has been adopted to track the loads using DWT coefficients and energy.Deep neural networks (DNN) [11], convolutional neural networks (CNN) [12], recurrent neural networks [13], transfer learning [14], and clustering [15] have also been investigated for NILM.Kang et al. [16] presented an adaptive non-intrusive load monitoring method using harmonic current and voltage-current (V-I) trajectory features in smart grids.This method achieves over 97% accuracy on the PLAID dataset and is validated in real household environments.Liu et al. [17] introduced a novel NILM method for multi-energy coupling (MEC) appliances, incorporating spatio-temporal coupling with semi-supervised learning.Dash et al. [18] introduced a deep learning-based multi-task approach for non-intrusive home appliance monitoring using an attention-powered encoder-decoder network, effectively adapting to the multi-task, multi-label framework of the problem.
A number of studies in the literature have also investigated NILM for SPS load monitoring.For instance, Lindahl et al. [19] employed a feedforward neural network with an average recall of 99% to disaggregate engine room loads on a realistic low voltage AC shipboard power system model.Maqsood et al. [20] have built an STFT for pulsed load monitoring in SPS and showed an over 90% accuracy for a particular type of pulsed load.Langham et al. [21] proposed a secure network for fault detection and diagnostics for ships using sensor fusion.This method can non-intrusively monitor power from a central point by fusing remote sensors, achieving high accuracy in SPS.Cox et al. [22] utilized a finite-state machine which can identify the ON/OFF status of various electro-mechanical loads in SPS, to monitor power transitions from the main control panel.Nation et al. [23] have utilized real-time engine room main panel voltages and currents to disaggregate loads and identify certain automatic load occurrences (especially the ON/OFF load event), using a transient sensitive model.Senemmar and Zhang [24] presented a wavelet-CNN based NILM for a two-zone MVDC SPS that can identity the ON/OFF status of the zonal loads.
While a number of studies have been performed on NILM for SPS, there still exist a few research gaps in the literature.First, there is a lack of a comprehensive model that contains all types of electric loads onboard, including the zonal loads and propulsion load simultaneously.Second, most of the existing NILM models in the literature require a large amount of sensor data, though the main philosophy of NILM is reducing the usage of sensor data and consequently avoiding installing additional sensors and communication devices.Third, to the best of our knowledge, the robustness of NILM methods on SPS has not been fully evaluated under critical situations such as extreme events, cyber/physical attacks, and noisy data.
To bridge these research gaps, in this study, we develop a novel discrete wavelet transform based ensemble CNN approach for NILM in MVDC SPS, aiming to further enhance the effectiveness of NILM techniques for next generation shipboard power systems.The inputs to the proposed NILM technique are current signals of main generators onboard the SPS.First, the AC currents of all the generators in the SPS are monitored and sampled as an aggregated signal, and the characteristics of these current signals are extracted using a discrete wavelet transform.An ensemble wavelet-based CNN model is trained and tested using input vectors, namely current signals and their corresponding extracted features.The objective is to disaggregate the current signals from the generators, thereby solving a multi-class classification problem to determine the status of each onboard component.It is important to note that the proposed ensemble method can identify various types of loads onboard, including the continuous propulsion system status, ON/OFF status, and pulse load status.To evaluate the effectiveness of the proposed wavelet-based ensemble CNN NILM model, two benchmark deep learning models, namely the feedforward DNN and the long short-term memory (LSTM) based NILM, are also developed for comparison.In addition, the accuracy, precision, recall, and F1 scores are compared as evaluation metrics.Finally, two case studies are designed to examine the robustness of the proposed model in extreme events, including missing input data and noisy input data.It is important to note that the proposed NILM framework is not to replace the conventional intrusive load monitoring (ILM) system.There are two main reasons for using the NILM method.First, the NILM method can be implemented together with the main ILM method simultaneously.In conventional SPS, each component is monitored through a current sensor, and the collected information is transferred to the control room in real time.Conventional ILM methods are generally reliable and robust, however with high installation and maintenance cost.Our proposed NILM method is able to operate in parallel with the ILM system to detect any failure or misinformation from the enormous number of sensors onboard.Second, the NILM method is expected to be more resilient and able to function under critical situations.Since the only input to the developed NILM method is the output current of the main generators, the NILM method is able to estimate the status of the entire SPS network under extreme conditions, such as when other sensors at certain components are failed.The two major contributions of this research are summarized as follows.The rest of the paper is organized as follows: Section 2 explains the proposed wavelet-based CNN model for NILM in MVDC SPS.Section 3 discusses the simulations and NILM results of a case study with fourzone MVDC SPS.Section 4 concludes the paper and discusses potential future work.

Non-intrusive electric load monitoring
Load monitoring refers to the process of detecting the ON/OFF status of one component or extracting electrical energy consumption at the component level based on one or more measurements.Fig. 1 provides a general illustration of the load monitoring process.In this case, N components are taken into consideration, which are installed on one common bus, such as one electrical phase or line.Each device draws its own individual current (I n ), with I agg = I L = ∑ N n=1 I n serving as the aggregated current, while all devices share the same voltage, namely the line-to-neutral voltage (V L ) [25].
NILM is used to characterize the problem of estimating the amount of energy consumed by individual electrical components, by employing disaggregation techniques and utilizing only the aggregated signal.These devices are typically electric loads with a variety of electrical characteristics (e.g., resistive, inductive, capacitive, or electronic) and operating modes (e.g., always on, one-state, multi-state, non-linear, or continuous).The use of alternative metering structures, such as sound or light sensors, to detect electrical equipment is one of the strategies that are not solely restricted to energy measures.From the perspective of components identification, NILM techniques could be further grouped into three categories: machine learning, pattern matching, and singlechannel source separation.
In NILM systems that rely on machine learning, the relationship between the aggregated signal I agg and the corresponding component signals I n could be discovered by training a regression or classification model.The trained learning model could either estimate the component power consumption (regression) or the projected component statuses (classification).The trained machine learning model is then utilized to monitor the component load, based on the aggregated signal in real time.Different with machine learning based methods that depend on model training, pattern matching based methods rely on the formation of a dictionary matrix that is comprised of a collection of reference signatures [26].This dictionary could either be formed by the vertices and edges of a network, which detects rising and falling edges same as graph signal processing, or be formed by a matrix of typical reference signatures for each appliance.For single-channel source separation, NILM is often formulated as an optimization problem.The hypothesis is that individual power consumption signatures of target appliances could be extracted from the aggregated signal, by applying constraints (such as sparseness, contextual figures, or probabilistic features) to the optimization problem [27].

Four-zone MVDC shipboard Power System
In this study, we are focusing on NILM for a modified four-zone MVDC shipboard power system.The adopted MVDC SPS model is developed by the Electric Ship Research and Development Consortium (ESRDC) [28,29], which has been modeled in MATLAB Simulink [30].In the MVDC SPS model, two main generators with the rated capacity of 36 MVA each (MG 1 and MG 2), and two auxiliary generators with 5 MVA capacity each (AXG 1 and AXG 2), are used to power a 12-KV, four-zone MVDC network.Since the ESRDC model aggregates all of the loads, we have modified the model to provide additional information on other load categories in each zone.Specifically, each power conversion module (PCM 1 to 4) in each zone can consist of four different types of load categories, i.e., a pulsed load, a high ramp rate load (HRRL), a hotel load, or a cooling load.These loads are standard types found on an SPS.Each load in each zone is fed from two independent DC busbars, namely the Starboard and Port Side.While it is possible to add multiple loads in each zone, doing so may increase the complexity of the problem without providing significant additional benefits.The circuit breakers, switches, and current sensors are located on switchboards (SWBD) in each zone.It is worth mentioning that the modeling of energy consumption of components is based on synthetic data and real-world data provided by the American Bureau of Shipping (ABS) [31].Table 1 summarizes the types of load that exist in each zone.In this table, "1" means the presence of that component in the zone, and "0" means the component is not located in the zone.These different types of load could represent all forms of power consumption in an MVDC SPS.It should be mentioned that in a practical MVDC SPS, each zone may have different components and power ratings.However, for the purpose of NILM, all the four types of load are considered in Zone 3 in our study.In addition, a 45 MW propulsion system (PMM) is simulated to model the electric power consumption of the electric motor onboard in Zone 3. The modified four-zone MVDC SPS model is illustrated in Fig. 2.
To mathematically formalize our particular configuration of a fourzone MVDC SPS, as illustrated in Fig. 2, the following models are considered.
where V Gen main and V Gen rated are the actual and rated voltages for nodes connected to the generators, respectively.R Gen main is the resistive droop gain coefficient, and I Gen main is the output current of generators [32].The indices i and j represent the set of SPS network nodes, and I ij is the branch current between nodes i and j.N ij is the set of all nodes connected to node i. Y ij is the admittance between nodes i and j, and equals to Y ij = 1/Z ij .V i and V j denote the voltages at nodes i and j, respectively.
The power output of each main and auxiliary generators must be non-negative: where P Gen main is the power output of the main generators (main = 1, 2), and P Gen aux is the power output of the auxiliary generators (aux = 1, 2).The power output of each main and auxiliary generators is limited by its maximum capacity:  P Gen main ≤ Capacity main for main = 1, 2. (5) where the Capacity main and Capacity aux are the capacity of main and auxiliary generators, respectively.The summation of total power output of the main and auxiliary generators must meet the total power demand across all zones: where P k zone is the power demand of the k-th zone, and k is the number of zones.
These equations represent the power output constraints, power balance equations, generator capacity limits, and power demand satisfaction for the four-zone MVDC shipboard power system model.

Feature extraction
The uncertainty principle, which applies to most feature extraction techniques, implies that there will be a trade off between temporal and frequency resolutions.For instance, the STFT, a widely used technique for extracting features from time-series data, has a high level of resolution in the frequency domain but none in the time domain.In other words, the STFT coefficients for two signals with identical frequency indices but differing time will be identical.
Time-frequency analysis often uses wavelet transform, which enables the feature extraction procedure to utilize various frequencies while taking the time domain information into account.The output coefficients might therefore include both types of characteristics, i.e., low frequency features that are connected to the time domain and high frequency information that can be found in the frequency domain.
By considering the discrete input signal f[t] where the integer variable n denotes a discrete series' sample number, the scaling parameter (s) and translation parameter (u) can be obtained using s = a j and u = ka j , respectively, to extract features using a discrete wavelet transform [33].
A combination of low-pass and high-pass filters are used in the DWT, which was introduced as a signal decomposition technique first by Mallat [34], to separate the signal into a number of frequency bands.The scaling and wavelet functions to describe the time domain signal f[t] are given as follows: The term a N [k]ϕ N,k [t] represents the approximation of the signal at the coarsest level N using scaling functions ϕ N,k [t].The term d j [k]ψ j,t [t] adds the detail coefficients d j [k] across all levels j from 1 to N, using wavelet functions ψ j,t [t] to refine the signal reconstruction.
The "dmey" wavelet transform was chosen in this study due to its capability of identifying sharp transients in the input signal.In order to identify any pulsation in the signal, the "dmey" wavelet transform needs to extract features from simulated and even real input data.The signal will be divided into approximation and detail coefficients via the wavelet transform described below [35].
where the wavelet transform normalization factor is defined as M = 2 J , while j=1,2, …,J and k=1,2, …,2 j .Therefore, in order to evaluate a discrete signal using DWT, it is possible to design two digital filters: one high-pass filter, h 1 [n], which is connected with a mother wavelet ψ(t), and its low-pass mirror counterpart, h 0 [n], which is related to the scaling function ϕ(t).This kind of DWT decomposes the signal into different levels.After the discrete input signal has been segmented into various frequency bands, it travels through a high-pass filter h 1 [n] and a low-pass filter h 0 [n], and the outputs of both filters are then downsampled.The low frequency components, also known as approximation coefficients (a j ), give a low frequency but a high time resolution.In contrast, the high-frequency components, also known as detail coefficients (d j ), have a high frequency but a low time resolution.
Fig. 3 shows a sample of generator current, along with a zoomed-in view showcasing both the actual current signal and the filtered current signal.The figure also illustrates the relevant spectrum of approximation and detail wavelet coefficients.The generator current sample faces a load turning on; resulting in a slight increase in this current sample at position 3000 (see the orange filtered current signal).This figure illustrates how the increase in generator current is reflected in both approximation and detail coefficients, as indicated by the green line at sample 3000 in the wavelet coefficients spectrum.In other words, the changes in the frequency domain can be completely detected in the time domain.

Convolutional neural networks (CNN)
In this study, an ensemble CNN model is employed for NILM, being trained and tested to accurately determine the status of all components in each zone.The proposed CNN architecture consists of four convolution layers, two pooling layers, one flattening layer, and two fully connected layers, to determine the state of each SPS component.Kernel filters are essential operators in CNN, which are the core of convolution layers.The output characteristics from a convolutional layer can be obtained by applying the kernel filter as follows.
In (12), is the output feature map at position j in layer l.It should be noted that many filters should be used on a single input to extract various sorts of features, which would considerably increase the volume of data, in order to fully leverage the capability of the convolutional layer.The max pooling layer, which follows the convolution layer, selects the highest value inside a filter operator to extract the most important characteristics from the input signal.
where down denotes that the largest value among the n 2 values is chosen using a square filter with a size of n × n, which scans the whole output of the convolution layer.The most important properties will still be preserved while greatly reducing the data volume via the max pooling layer.After the convolution and pooling layers, a flattening layer is used to combine all of the rows in the retrieved feature matrix into a single row, followed by a fully connected layer.The fully connected layer increases the non-linearity with the goal of detecting any hidden features in the processed data, as described in Eq. ( 14).The last fully connected layer relates all the extracted features from the input data to the desired output that is readable for the users.
The equation describes the output o l j of the j-th neuron in the last layer l of the CNN.It is computed by applying an activation function f to the weighted sum of the inputs x (l− 1) i from the previous layer l − 1, with weights w (l)  ji and a bias term b (l) j .

Data generation
Each zone in the original four-zone MVDC model contains aggregated loads.We have modified the four-zone MVDC model to allow simulations of various future SPS load types.Four types of load, i.e., a pulsed load, a high ramp rate load, a hotel load, and a cooling load, are considered in each zone.Each type of load has been simulated with their unique features as described in Table 2 [29,36].
Table 2 presents four types of loads, each representing a kind of load onboard a ship.Cooling loads provide comfort temperatures for crews and required temperatures for reefer ships.Hotel loads represent baseline power consumption for crew accommodation and lighting.High ramp rate loads, such as ballast water pumps, include motor loads like pumps and compressors.Pulse loads, unique to Navy ships, are characterized by sudden bursts of high power demand.These loads together cover most shipboard power system loads.Each type of load in Table 2 has two operational statuses, i.e., ON or OFF.The proposed NILM methodology aims to determine the status of each type of load, by leveraging the minimum available information and signals from the SPS network.
The modified MVDC SPS model is simulated for 30 s in MATLAB Simulink.According to the literature review and sampling limits, a 4 kHz sampling rate is used for all AC and DC voltages and currents.Since more than 90% of the entire loads are supplied through the main generators, NILM seeks to determine the operational state (i.e., ON or OFF) of all components and the power consumption level of the propulsion system, only using the current signals from the main generators.To this end, the inputs to the NILM model are the AC current signals of the generators.Since each generator's three current waveforms have the same characteristics, the network is considered to be balanced.We also assume that each SPS zone has its own NILM system.This is because the rated power of each component may vary between different zones.Consequently, it is strongly advised to have a local load monitoring system in each zone.These presumptions ensure that the final input to the NILM method is the single line current of the generator in each zone.
For the whole 30 s simulation time horizon, a total of 120,000 data points at the sampling rate of 4 kHz are generated from the generators' current signals.The discrete wavelet transform is first applied to preprocess the data, which separates the input signal into wavelet coefficients.To this end, a sliding window of 200 current samples is slipped from the beginning of the current signal.The 200 samples are equivalent to 50 ms, meaning that the model's responsiveness in the time domain is 50 ms.In other words, the NILM model can detect the new state of a type of load within 50 ms if its status has changed.Each zone may have up to four components, each of which may be either ON or OFF, as shown in Table 2.The propulsion engine also consumes power continuously, and we have divided the propulsion motor consumption into 11 categories ranging from 0 to 100 % of the rated power with a 10 % interval.In this study, Table 1 indicates that the propulsion load is located in Zone 3. Additionally, Zone 3 contains all four types of zonal loads: general load, hotel load, HRRL, and pulse load.The model presented in this paper can disaggregate the load status at the zonal level.Therefore, we have chosen Zone 3 for our case study, as it contains all types of loads and presents the greatest challenge for disaggregation.Thus, there will be 2 × 2 × 2 × 2 × 11 = 176 classes, by considering the state of all the components in this zone.Fig. 4 shows the configuration of the four types of load and the propulsion system in Zone 3, and briefly illustrates the procedure of NILM for this zone.
The large number of classes (i.e., 176) creates challenges for load monitoring.To simplify the classification problem, a separate CNN network is trained specifically for the classification of power consumption in the propulsion system.This is because a great portion of the generated power is consumed by the propulsion system, and the propulsion system presents a unique power consumption pattern.The ON/ OFF status and power consumption of propulsion motors can be calculated through a mean calculation of the current signal.Hence, it is possible to accurately determine the consumption of propulsion system from 0 to 100 % with a 10 % interval.Hence, this propulsion-focused CNN network will classify the power consumption of the propulsion system from 0 % to 100 % in 11 classes.In this way, we can ensure that the power consumption of the propulsion system does not interfere with the load monitoring of other components.Then, we focus on the remaining four types of load, and their consumption is not apparent from the overall trend of the generator current signals.As a result, we have reduced the number of classes from 176 to 16.
Hence, there are 16 classes in the NILM problem based on the ON/ OFF state of all the components.The state of each component is indicated by a unique label from 0 to 15 in each window (which consists of 200 samples).The label of classes is derived from a 4-bit combination of HRRL, pulse load, cooling load, and hotel load, respectively, where "0" means OFF and "1" means ON for each component.For example, Class 0 means all four components are OFF, Class 5 means the pulse load and hotel load are ON while HRRL and cooling load are OFF, and Class 15 means all four loads are ON.The label of the 200-sample window is represented by the last sample in particular, and the label will be applied to the whole sample window.If there is a change in the status of appliances from one sample to the next, it can be detected by the NILM method.

Data pre-processing
Based on the procedure outlined in Section 2, the discrete wavelet transform (DWT) is first applied to the sample window.The particular DWT function adopted here is "dmey" with four degrees of decomposition.Four sets of approximation coefficients and four sets of detail coefficients are produced by each discrete wavelet transform.Each set of approximation or detail coefficients has 200 coefficients, which is the same number of elements as the sample window.The final approximate and all detail coefficients are selected from the resulting sets to form a vector of coefficients.The original window sample, approximation, and four levels of details are then appended together, creating a row of 1200 data points, which is considered as the number of columns for the training dataset.The associated label of that particular sample window is added to the output label matrix along with the new vector, which is placed in the first row of the coefficient matrix.The sample window will move to the next 200-samples window to repeat the wavelet transform procedure and complete the wavelet coefficient matrix gradually.The final wavelet coefficient matrix is composed of 1200 columns and 119,800 rows, with 6 layers (one for each line current input), where each row corresponds to the wavelet coefficients of a 200-samples window.The 119,800 is derived from 200,000-200, which results from moving the sliding window from the first sample to the last.This process for one current signal from one phase of the generator creates a matrix of 119,800 × 1200.This process is repeated 6 times for each main generator (we have two main generators) and each phase (three phases), creating the six layers of the training dataset.The output label vector, on the other hand, has 119,800 elements (with values from 0 to 15) that represent the status of every component throughout each sample window.
This coefficients matrix is the input to the CNN model.To solve the NILM classification problem, we have used a 1D convolutional kernel to process the matrix.Due to the huge volume of generated data, a subsampling technique is adopted to reduce the number of rows in the coefficient matrix by 1/10.It should be noted that SMOTE, the first layer of the CNN model, aims to balance the number of the output label classes by replicating the labels that are less appeared.SMOTE is specifically designed to tackle imbalanced datasets by generating synthetic samples for the minority class.Since the duration of pulsed loads and radar loads when they are ON is very short, relatively fewer samples from these classes will appear in the coefficient matrix.To ensure that all output classes have an equal number of rows in the input matrix, the SMOTE layer replicates these types of labels.The number of rows rises from 11,980 to 72,016 after the SMOTE layer.We randomly choose 80 % of the 72,016 rows for training (57,613) and 20 % of the rows for testing (14,403), to evaluate the performance of NILM.Table 3 summarizes the characteristics of each model.Fig. 5 illustrates the process on how the coefficient matrix is generated.A sample of one line of generators and its related coefficients are shown in the figure.The detail coefficients show how the sharp changes in current signal is detected by the wavelet decomposition.

NILM results and discussion
To evaluate the performance of the proposed wavelet-based CNN method for NILM, two other deep learning-based benchmark NILM methods have also been adopted for comparison, i.e., a feedforward fully connected DNN and an LSTM-based NILM method.The inputs to both DNN and LSTM models are also the coefficients matrix generated by the wavelet transform, which is the same as the CNN model.It is worth mentioning that the DWT extracts frequency features from the input signal, to obtain features that are not observable from the raw signals.In other words, the current signals contain different features such as amplitude, phase, and frequency; without appropriate feature extraction, it is challenging to detect the changes in the current signals.To make a consistent comparison, the DWT has been applied to all the three deep learning methods.
The three deep learning models are trained and evaluated based on the simulated data shown in Fig. 4. All simulations are performed on a laptop with a Core i7 processor clocked at 1.5 GHz, 16 GB of RAM, and an NVIDIA GeForce MX230 GPU.The neural network models are constructed using the TensorFlow library, and all power flow and operation simulations are carried out in MATLAB Simulink.
Each deep learning model is trained with 100 epochs, and the hyper parameters of each deep learning model are determined using the "adam" optimizer [37].The NILM problem is a multi-class classification problem.Thus, we have adopted the "categorical_crossentropy" as the loss function with the metric of "accuracy".
Table 4 compares the performance of the propulsion system monitoring among the three learning models, in terms of the training accuracy, testing accuracy, and loss.The wavelet-based CNN has shown an approximately 90% accuracy in determining the condition of propulsion system.Such a high accuracy could greatly help improve the load monitoring capabilities in future MVDC SPS.Fig. 6 shows the normalized confusion matrix of the wavelet-CNN based NILM method for the propulsion system monitoring.The diagonal elements of the confusion matrix represent the number of labels that are correctly categorized, whereas other elements represent the number of labels that are  misclassified.The confusion matrix indicates that a large portion of samples are correctly classified for the propulsion system.Classes 1 and 9 share similar features with other classes, posing challenges for the model to differentiate between them.As a result, they exhibit lower accuracy compared to other classes.It is possible to increase the accuracy for these classes by considering smaller steps for classifying the level of power consumption.Table 5 compares the performance of monitoring other types of load among the three learning models.It is observed that the proposed wavelet-CNN based NILM method can classify the status of all the components in Zone 3 with an over 98 % accuracy, by only using the current of main generators.Overall, this NILM method could provide an effective solution during the failure of the ILM system.Fig. 7 shows the normalized confusion matrix of the wavelet-CNN method for the status of other zonal components.It is important to note that the proposed NILM model has successfully detected pulse loads that have a unique power consumption pattern.Take class "4" that indicates the state of a pulsed load (highlighted in the figure) as an example, the wavelet-CNN based NILM approach has shown an over 99 % accuracy in identifying the pulsed load.The behavior of a pulsed load is similar with that of a fault in MVDC systems.Thus, to prevent triggering any fault prevention mechanisms, it is critically important to precisely monitor these types of load.The authors present a study on fault detection of shipboard power systems in the presence of pulse load in Ref. [38].To further evaluate the efficacy of the wavelet-CNN based NILM approach, several common assessment metrics such as the accuracy, recall, and F1-score are also calculated based on the confusion matrix [39].

Table 4
The training and testing accuracies of the three deep learning based NILM models for the propulsion system.
In the confusion matrix, TP, FP, and FN stand for true positive, false positive, and false negative, respectively.For the particular class "4" with pulsed load, the precision, recall, and F1-score are 0.998, 0.991, and 0.995, respectively.Since the confusion matrices are normalized, the diagonal elements show the accuracy of each specific class in each row.For example, Fig. 7 shows that all classes have achieved more than 96 % accuracy with the wavelet-CNN-based NILM model.It is worth mentioning that the lowest accuracy is related to class "12", which represents a combined "ON" status of both a pulse load and a high ramp rate load simultaneously, which is also one of most challenging cases to detect.Class 0 represents the "OFF" status for all components, which presents a 100 % accuracy.In terms of training and testing time, it takes approximately 17 min to train the Wavelet-CNN model.Once trained, each testing iteration takes, on average, only 120 μs to respond.The simulations were executed on a laptop equipped with a Core i7 processor running at 1.5 GHz, 16 GB of RAM, and an NVIDIA GeForce MX230 GPU.Power flow and operational simulations were performed using MATLAB Simulink, while neural network models were developed with the TensorFlow library.

NILM under extreme conditions
It is important to verify the accuracy of the model under faulty conditions.Therefore, extreme situations were considered and tested to assess the robustness of our model.A faulty condition can have two major impacts: causing outages in a line where circuit breakers on both sides of the line open to isolate the fault, or a generator outage, where the fault is inside the generator or generator bus.Since the only input to the proposed NILM method is the current signals of the main generators, it is expected that the NILM method will be more robust under extreme conditions, such as when other sensors at certain components are failed.
To further evaluate the capability of NILM under disruptive events, the following two additional case studies are performed where the input current signals have been affected by extreme events.
• Case I -Line Failure: In Case I, we assume that the current signal for one line of MG2 is missing, potentially due to a short circuit or a cyber/physical attack.• Case II -Generator Failure: In Case II, we model an outage of MG2 as an incident within the SPS network.
Table 6 shows the accuracy of the wavelet-CNN based NILM model under these two failure scenarios.The results indicate that the NILM model is still effective in determining the status of all components under these disruptive events.Specifically, in Case I, the NILM model shows approximately the same accuracy compared to the normal operating condition.Fig. 8 shows the accuracy of the NILM model for each of the 16 classes under disruptive events.For Case II with an outage of the generator, the NILM model could successfully monitor the status of most components, except for those classes when both the pulsed load and the high ramp rate load are turned on simultaneously (i.e., .
Due to the disturbances of these two unique types of loads and the swings in the current signals after the generator outage, the NILM accuracy is decreased significantly in Classes 13-15.In particular, in Class 13, the model has the lowest accuracy.This is because the transient   effects of HRRL, pulse load, and hotel load cannot be damped quickly, which significantly decreases the accuracy during the outage of a generator.However, in practical conditions, since the duration of pulse loads is extremely short, the pulse loads will turn off quickly.The average accuracy of Classes 0-11 is 84.7 %.

NILM under load uncertainty
In this section, we also consider the uncertainty associated with the power consumption of components.To model this uncertainty, we derive probability density functions (PDFs) for power consumption by combining synthetic simulated data and real-world data provided by American Bureau of Shipping (ABS) for each component [31].We employ the Three-Sigma approach that identifies data points within three standard deviations of the mean in a normal distribution, describing the bounds of these data points.
The probability associated with each scenario is calculated using these PDFs.It is important to note that all PDFs are assumed to follow a normal distribution [40].Each component yields seven distinct scenarios, resulting in a total of 2401 scenarios when considering all four types of components.To address this substantial number of scenarios, we employ simultaneous backward reduction and fast forward selection scenario reduction (SCENRED) techniques within stochastic programming, ultimately extracting ten scenarios along with their corresponding probabilities [41].The probabilities for these reduced scenarios are summarized in Table 7.
We then evaluate the performance of the proposed wavelet-CNN method, which has been trained using the original data, under these new scenarios.The accuracy results for each scenario are detailed in Table 7.The same evaluation methodology is applied to wavelet-DNN and Wavelet-LSTM, employing the same scenarios.Our findings reveal the overall accuracy of the proposed models in the presence of uncertainty for wavelet-CNN, wavelet-LSTM, and wavelet-DNN as 95.35 %, 76.28 %, and 41.78 %, respectively.

NILM under noisy input
In real-world scenarios, noise is a common occurrence, creating a challenge for accurate load monitoring.To assess the robustness of the wavelet CNN model under these conditions, we have conducted experiments with varying Signal-to-Noise Ratio (SNR) values.We have introduced Gaussian white noise to the raw signal at different SNR levels, allowing us to evaluate the capability of the wavelet CNN model in noisy conditions.SNR, defined as the ratio of signal power to noise power, is used to quantify noise levels.SNR is calculated as follows [42]: where P s and P n represent power of the signal and power of the noise, respectively.The three NILM models were trained and tested across a range of SNR levels, from 50 dB to 10 dB.Generally a signal to noise ratio of more than 20 dB is recommended for communication networks [43].Fig. 9 presents the models' accuracies at various SNR levels, and for comparison, we provide accuracies for the baseline case "None".In addition, the figure depicts a sample from the generator current signal both with and without noise at two different noise levels: 10 dB and 50 dB.The results indicate that the model maintains a high level of accuracy across diverse SNR values.These findings underscore the wavelet CNN model's impressive noise resilience, allowing effective load monitoring even in challenging and noisy environments.

Conclusion
In this study, we developed a discrete wavelet transform assisted ensemble convolutional neural networks model for non-intrusive load monitoring (NILM) in MVDC shipboard power systems (SPS).The status of different components in each zone was determined by the NILM model, based on the real-time current of main generators in SPS.The NILM approach was applied and validated on a modified four-zone MVDC SPS, and the results showed that the wavelet-CNN based NILM model could accurately monitor more than 98% of load situations out of the 14,000 total testing scenarios, which performed significantly better than the two benchmark NILM models based on feedforward DNN and LSTM.It is also important to note that the developed wavelet-CNN based NILM approach could precisely monitor crucial loads (such as pulsed loads).The results also showed that the NILM method is robust under disruptive events such as line or generator failures, and is still effective  under uncertain and noisy conditions.As potential future work, the developed NILM model could be applied to more complex models such as all-electric unmanned SPS, where battery energy storage and high power energy storage could be included.An intelligent MVDC SPS network monitoring system could be developed by combining the NILM framework with fault detection and network reconfiguration models.

Declaration of competing interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

Fig. 1 .
Fig. 1.Block diagram of a load monitoring task with N individual components.
where l denotes the current convolution layer index number; the parameters K w and K h indicate the kernel filter width and height sizes for that particular convolution layer, respectively.x (l− 1) s (c +u, r +u) is the input feature map value at position (c + u, r + u) for the s-th channel in layer (l − 1).Y l j

Fig. 3 .
Fig. 3.The overview of sampling and feature extraction with DWT in a load changing example.

Fig. 4 .
Fig. 4. The overall NILM process for one SPS zone with the propulsion system and four types of load.

Fig. 6 .
Fig. 6.Confusion matrix of the wavelet-CNN based NILM method for propulsion system classification.

Fig. 7 .
Fig. 7. Confusion matrix of the wavelet-CNN based NILM method for components status classification.Label 4 indicates the state of a pulsed load.

Fig. 8 .
Fig. 8. Average accuracy of the wavelet-CNN based NILM method for each class under extreme conditions.

Table 2
Characteristics of each type of load in the MVDC SPS model.

Table 3
Models characteristics.

Table 5
The training and testing accuracies of the three deep learning based NILM models for other zonal components.

Table 6
The accuracy of wavelet-CNN based NILM method under extreme conditions.

Table 7
Probabilities of the reduced scenarios and the accuracy of the proposed wavelet-CNN.