An Improved Random Forest Algorithm for Open-Circuit Fault Diagnosis in Utility Interactive Inverters

In modern power systems, the widespread integration of distributed energy sources, such as photovoltaic systems, has led to a significant increase in the deployment of utility interactive inverters. These inverters play a critical role in converting DC power to AC power and synchronizing with the grid. However, their reliable operation is paramount for grid stability and safety. Among various failure modes, open-circuit faults in Insulated Gate Bipolar Transistors (IGBTs) are common due to factors like aging, overcurrent, or thermal stress. Such faults may not trigger immediate protection mechanisms, allowing the utility interactive inverter to operate under faulty conditions, which can escalate into more severe subsequent failures. Therefore, early and accurate diagnosis of IGBT open-circuit faults is essential to enhance the reliability of utility interactive inverters.

Existing fault diagnosis methods for utility interactive inverters often face challenges in feature extraction and classification accuracy. Traditional approaches, such as model-based analysis, time-domain feature calculation, Fourier transform, wavelet transform, empirical mode decomposition (EMD), and Hilbert-Huang transform (HHT), have been employed for feature extraction. For fault classification, techniques like BP neural networks (BPNN), K-nearest neighbors (KNN), support vector machines (SVM), and auto-encoders are commonly used. However, these methods may suffer from sensitivity to grid and load parameter variations, difficulty in extracting robust features, and suboptimal diagnostic accuracy. To address these limitations, this paper proposes a novel fault diagnosis method based on a modified random forest algorithm for utility interactive inverters. The method utilizes Maximum Overlap Discrete Wavelet Transform (MODWT) to extract wavelet energy features from three-phase current signals, followed by dimensionality reduction using Principal Component Analysis (PCA), and finally employs an improved random forest classifier for fault identification. Experimental results demonstrate that this approach achieves higher diagnostic accuracy compared to conventional methods, making it suitable for real-world applications in utility interactive inverters.

The structure of a typical utility interactive inverter system includes a DC source, a three-phase inverter, LC filters, transmission lines, and a grid connection point. The inverter comprises six IGBTs arranged in three bridge arms (A, B, C). Under normal operation, the three-phase output currents are sinusoidal and balanced. However, when an open-circuit fault occurs in one or more IGBTs, the current waveforms become distorted, exhibiting characteristic patterns such as half-cycle interruptions or distortions. These patterns vary depending on the location and number of faulty IGBTs, providing a basis for fault diagnosis. In this paper, I focus on diagnosing single and double IGBT open-circuit faults, which cover common failure scenarios in utility interactive inverters. The fault types are categorized into five groups: normal operation, single IGBT faults (6 types), two IGBT faults in the same phase (3 types), two IGBT faults on the same side (6 types), and two IGBT faults on crossed sides (6 types), totaling 22 distinct fault classes.

The proposed fault diagnosis algorithm consists of several key steps. First, an open-circuit fault detection module monitors the three-phase currents using a half-cycle root mean square (RMS) calculation every one-third of a cycle. If an anomaly is detected, the system proceeds to data acquisition. The three-phase currents are sampled over a window of two cycles (0.04 seconds) with 200 points per phase, and multiple sliding windows are used to capture various phase angles. To ensure adaptability to utility interactive inverters of different power ratings, the current signals are normalized via per-unit transformation. Subsequently, feature extraction is performed using MODWT for each phase current. MODWT is an improved wavelet transform that avoids down-sampling and maintains translation invariance, preserving important signal information. The decomposition coefficients are obtained through low-pass and high-pass filters without decimation. For a signal \(x(n)\) of length \(N\), the MODWT coefficients at level \(j\) are computed as:

$$ \tilde{S}_j(k) = \sum_n \tilde{g}(n) \tilde{S}_{j-1}(k – n \mod N) $$

$$ \tilde{T}_j(k) = \sum_n \tilde{h}(n) \tilde{S}_{j-1}(k – n \mod N) $$

where \(\tilde{S}_j\) and \(\tilde{T}_j\) are the approximation and detail coefficients, respectively, and \(\tilde{g}(n) = g(n)/\sqrt{2}\) and \(\tilde{h}(n) = h(n)/\sqrt{2}\) are the modified filters derived from the original DWT filters \(g(n)\) and \(h(n)\). The Daubechies 10 (db10) wavelet function is used for decomposition over 7 levels, resulting in 8 frequency bands per phase. The energy of each band is calculated as:

$$ E_m = \sum_{k=1}^{N} d_m(k)^2 $$

where \(d_m(k)\) represents the coefficients of the \(m\)-th band. For each phase, an 8-dimensional energy vector is formed, and by concatenating the three phases, a 24-dimensional feature vector is obtained. This high-dimensional vector may contain redundant information, so PCA is applied to reduce dimensionality while retaining 50% of the variance, resulting in a 12-dimensional feature vector for efficient classification.

The core of the diagnosis method is an improved random forest algorithm. Traditional random forests ensemble multiple decision trees via bootstrap aggregating and random feature selection to enhance classification performance. However, the standard voting scheme assigns equal weight to each tree, which may not optimize accuracy. In this work, I modify the voting strategy by incorporating tree-specific weights based on classification accuracy. During training, a validation set is used to compute the accuracy matrix \(ACC\) for each decision tree across all fault classes:

$$ ACC = \begin{bmatrix}
acc_{11} & acc_{12} & \cdots & acc_{1K} \\
acc_{21} & acc_{22} & \cdots & acc_{2K} \\
\vdots & \vdots & \ddots & \vdots \\
acc_{M1} & acc_{M2} & \cdots & acc_{MK}
\end{bmatrix} $$

where \(K\) is the number of trees, \(M\) is the number of fault classes, and \(acc_{ij}\) denotes the accuracy of tree \(j\) for class \(i\). The weight matrix \(W\) is then derived by normalizing each row:

$$ w_{ij} = \frac{acc_{ij}}{\sum_{j=1}^{K} acc_{ij}} $$

During testing, the weighted votes from all trees are aggregated to determine the final fault class. This approach gives higher influence to trees with better performance, thereby improving overall diagnostic accuracy for utility interactive inverters.

To evaluate the proposed method, I conducted extensive simulations using MATLAB/Simulink. A utility interactive inverter system model was built with parameters including an 800 V DC source, a 380 V/50 Hz grid, a 20 kW inverter rating, a 10 kHz switching frequency, 25 mH filter inductors, 5 μF filter capacitors, and 0.01 Ω damping resistors. Eighteen operating conditions were simulated, varying grid voltage, frequency, load type, and power levels, as summarized in Table 1. Each condition included 22 fault states, yielding a total of 3960 samples. The dataset was randomly split into 2420 training samples, 220 validation samples, and 1320 test samples.

Table 1: Simulation Conditions for Utility Interactive Inverter Fault Diagnosis
Condition No. Grid Voltage (V) Grid Frequency (Hz) Load Type Apparent Power (kVA) Active Power (kW) Reactive Power (kVar)
1 380 50 Harmonic (rectifier) 11.2 10 5
2 380 50 RL 20 16 12
3 380 50 RL 20 17 10.5
4 380 50 RL 20 18 8.7
5 380 50 RL 20 19 6.2
6 380 50 RL 20 20 0
7 380 50.2 RL 20 18 8.7
8 380 50.1 RL 20 18 8.7
9 380 49.9 RL 20 18 8.7
10 380 49.8 RL 20 18 8.7
11 400 50 RL 20 18 8.7
12 390 50 RL 20 18 8.7
13 370 50 RL 20 18 8.7
14 360 50 RL 20 18 8.7
15 380 50 RL 30 27 13.1
16 380 50 RL 25 22.5 10.9
17 380 50 RL 15 13.5 6.5
18 380 50 RL 10 9 4.4

The proposed method (denoted as M5) was compared against four benchmark techniques: BPNN (M1), KNN (M2), auto-encoder (M3), and SVM (M4). All methods used MODWT energy features (F2), except for an additional test where DWT energy features (F1) were employed with M5 to highlight the superiority of MODWT. The diagnostic accuracy for each fault class, averaged over 10 runs, is presented in Table 2. The results show that for normal operation and two IGBT faults in the same phase, all methods achieved 100% accuracy. For single IGBT faults, same-side two IGBT faults, and crossed-side two IGBT faults, M1, M2, and M3 exhibited accuracies below 90%, while M4 and M5 surpassed 90%. Specifically, SVM (M4) achieved an overall accuracy of 96.6%, whereas the improved random forest (M5) reached 96.8%, demonstrating a slight but consistent improvement. Moreover, when using DWT features (F1), M5’s accuracy dropped to 84.2%, confirming that MODWT features provide more robust energy representations for utility interactive inverter fault diagnosis.

Table 2: Comparison of Fault Diagnosis Accuracy for Utility Interactive Inverters
Fault Type M1 (BPNN) Accuracy (%) M2 (KNN) Accuracy (%) M3 (Auto-encoder) Accuracy (%) M4 (SVM) Accuracy (%) M5 (Improved Random Forest) Accuracy (%)
Normal 100 100 100 100 100
Single T1 100 96.7 96.7 95.0 98.3
Single T2 81.7 76.7 71.7 98.3 91.7
Single T3 71.7 71.7 78.3 95.0 98.3
Single T4 81.7 70.0 95.0 91.7 96.7
Single T5 76.7 100 100 95.0 96.7
Single T6 93.3 95.0 95.0 98.3 93.3
Two IGBTs in Same Phase (T1T4) 100 100 100 100 100
Two IGBTs in Same Phase (T3T6) 100 100 100 100 100
Two IGBTs in Same Phase (T5T2) 100 100 100 100 100
Two IGBTs on Same Side (T1T3) 90.0 90.0 73.3 98.3 96.7
Two IGBTs on Same Side (T1T5) 86.7 80.0 80.0 95.0 90.0
Two IGBTs on Same Side (T3T5) 85.0 68.3 75.0 98.3 96.7
Two IGBTs on Same Side (T4T6) 91.7 90.0 90.0 98.3 95.0
Two IGBTs on Same Side (T4T2) 76.7 78.3 78.3 93.3 100
Two IGBTs on Same Side (T6T2) 75.0 85.0 76.7 90.0 95.0
Two IGBTs on Crossed Sides (T1T6) 86.7 96.7 96.7 96.7 98.3
Two IGBTs on Crossed Sides (T1T2) 85.0 95.0 95.0 98.3 96.7
Two IGBTs on Crossed Sides (T3T4) 73.3 71.7 83.3 93.3 100
Two IGBTs on Crossed Sides (T3T2) 83.3 81.7 81.7 98.3 96.7
Two IGBTs on Crossed Sides (T5T4) 78.3 78.3 78.3 98.3 93.3
Two IGBTs on Crossed Sides (T5T6) 86.7 95.0 95.0 93.3 96.7
Overall Accuracy 86.5% 87.3% 87.4% 96.6% 96.8%

To further validate the practicality of the proposed method, a simple experimental setup was constructed using a rapid control prototyping (RCP) module, a three-phase utility interactive inverter, and a personal computer. The inverter had a power rating of 10 kW, and fault scenarios were programmed via Simulink models downloaded to the RCP controller. The three-phase currents were measured during open-circuit faults, and the diagnosis algorithm correctly identified the fault type, such as a single T1 open-circuit fault, matching the actual condition. This experiment underscores the applicability of the method to real utility interactive inverter systems.

In conclusion, this paper presents an improved random forest algorithm for open-circuit fault diagnosis in utility interactive inverters. The method leverages MODWT to extract energy features from three-phase currents, which are robust to grid and load variations, and employs a weighted voting scheme in random forests to enhance classification accuracy. Simulation and experimental results demonstrate that the proposed approach outperforms conventional methods like BPNN, KNN, auto-encoder, and SVM in terms of diagnostic accuracy. Moreover, the method is adaptable to utility interactive inverters of different power levels, as training on a 20 kW inverter dataset yielded good performance under varied conditions. Future work will focus on extending the diagnosis to multiple open-circuit faults, addressing grid harmonic distortions, and integrating the algorithm into real-time monitoring systems for utility interactive inverters. The continuous improvement of such diagnostic techniques is vital for ensuring the reliability and safety of modern power networks with high penetration of distributed energy resources.

Scroll to Top