## 1. Introduction

In power systems, power quality (PQ) has been a significant issue that is disrupted by increasing uncertain, intermittent, renewable energy penetration on the generation side [

1,

2] and increasing uptake of electric vehicles (EVs) on the demand side [

3,

4,

5]. In essence, PQ refers to multifarious electromagnetic phenomena that deviate voltage and current from ideal waveforms, which are known as PQ disturbances (PQD). The presence of PQD can be divided into sags, swells, interruptions, oscillations, flickers, harmonics (interharmonics), notches, spikes, and their combinations, as per the international standards such as IEEE-1159, IEC 61000, and EN 50160 [

6,

7,

8]. These disturbances greatly affect the safe and economical operations of power systems, decreasing the lifetime and performance of electrical equipment connected to the system. PQD analysis, including disturbances detection and classification, is an important task to provide adequate information about remedial actions to address the root problem [

9,

10,

11].

In the literature, some methodologies are presented to identify the types of PQ disturbances. Signal processing methods such as Fourier transform (FT), short time Fourier transform (STFT), wavelet transform (WT), S-transform (ST), empirical mode decomposition (EMD), and independent component analysis (ICA) are extensively used to extract features for PQD detection. FT is simple to implement, but it lacks time-frequency localization capability and is unsuitable for non-stationary disturbance [

12]. STFT contains both time and frequency information and can analyze non-stationary signals by sliding window [

13,

14,

15]. Nevertheless, this method is limited by the sliding window size used. Although WT could enhance the time-frequency resolution for disturbance analysis [

16,

17,

18], the analysis results may be affected by the noise present in the signal. The ST generalizes the STFT, extends WT and overcomes some of their disadvantages. Therefore, the ST [

19] is superior compared to the FT, STFT, and WT techniques, especially for the noise-rich system. However, the computational complexity of ST limits its widespread applications. EMD is an adaptive time-frequency method for analyzing non-stationary signals and can decompose the signal into a finite number of intrinsic mode functions (IMFs) [

20]. However, it will lead to false IMF decompositions due to its inherent drawbacks, e.g., mode mixing and boundary effects. To overcome these issues, an EMD-ICA technique was proposed [

21]. This technique is effective at eliminating mode mixing but suffers from the absence of the amplitude information due to the added ICA. Hence, for PQ disturbance detection, it is essential to develop new signal processing techniques, which are capable of simultaneously analyzing all the nonlinear, non-stationary, and noisy signals.

As a new approach, variational mode decomposition (VMD) [

22] decomposes a multimode signal into a finite number of band-limited IMFs. Compared with EMD-based methods, VMD is more robust to noise and sampling errors due to its generalization of the classic Wiener filter into multiple, adaptive bands [

23,

24]. Hence, for PQDs detection and classification, the disturbances feature can be extracted effectively using the VMD method; then, a classifier is used to classify different types of PQD. A noting method is proposed to combine VMD with particle swarm optimization (PSO) algorithms for fault feature extraction of rolling bearing [

24]. A classification of PQ disturbances using VMD and the support vector machine (SVM) is illustrated in [

25].

Other disturbance classification methods include decision tree (DT), random forest (RF), artificial neural network (ANN), probabilistic neural network (PNN), and the extreme learning machine (ELM) [

26]. Among these, the SVM is the most widely used technique, which is based small sample statistics and structural risk minimization principles [

27]. Similarly, DT is a decision support tool in a tree-like graph that is used to describe relationships between different features and make classifications; it has also been used to recognize PQ disturbances [

28]. However, the SVM, DT, and RF methods give rise to cumulative errors in the process of the iterative classification of all disturbances. To overcome this, ANN-based classifiers have been widely used through an expeditious learning process. This process has no iterations or cumulative errors. ANN-based classifiers require a great number of training samples and often converge to local minimas [

29]. PNN, derived from the Bayesian network and the kernel fisher discriminant analysis algorithm, is faster and more accurate than ANN. The existing methods are effective to enhance the performance of the classifier through complicated models, e.g., PSO and the radial basis function (RBF) kernel. Thus, the computational effort is substantially increased.

In [

30], Gaing proposed a PNN-based method for classifying different types of disturbances. In order to settle previous problems, the deep stochastic configuration network (DSCN) is introduced. The DSCN [

31,

32,

33] was proposed in 2017. The DSCN can assign weight and bias randomly. Hence, this technique has a faster learning speed over ANNs and better generalization capability.

The main contribution of this work lies in a novel method combining VMD and DSCN for PQ disturbances detection and classification, and VMD was used to extract PQ disturbance features. Especially, the vital parameters of VMD were discussed in detail as per different types of disturbances. Then, the features extracted were sent to DSCN for classification. The proposed method is tested by seven types of synthetic PQ disturbances as well as a real time signal from the IEEE 1159.2 Working Group datasheet.

## 2. Variation Mode Decomposition

VMD is a non-recursive and adaptive signal processing method. It can decompose a multicomponent signal into an ensemble of band-limited IMFs, which are defined as amplitude modulated frequency modulated (AM-FM) signals with sparsity property based on Tikhonov regularization algorithm, Wiener filter, and Hilbert transformation. The IMF

$u\left(t\right)$ is illustrated as

where

$\phi \left(t\right)$ is the phase angle, which is a nondecreasing function; the instantaneous frequency is

$\omega \left(t\right)={\phi}^{\prime}\left(t\right);$ and

$A\left(t\right)$ is the amplitude of the IMF. This part illustrates the structure and solution of VMD method.

#### 2.1. The Structure of VMD

The goal of VMD is to decompose a multicomponent signal into a finite number of sub-signals (modes), $u\left(k\right)$, that compact around a center frequency $\omega \left(k\right)$. The process of VMD is listed as follows:

- (i)
Obtain the unilateral frequency spectrum of each mode by computing the associated analytic signal by means of Hilbert transform (in which

${j}^{2}=-1$):

- (ii)
Shift the frequency spectrum of each mode to baseband by multiplying an exponential tuned with estimated center frequency:

- (iii)
Calculate the bandwidth of each mode by means of the squared

${L}^{2}$-norm of the gradient. The constrained variational problem is as follows:

where

$\left\{{u}_{k}\right\}=\left\{{u}_{1},\cdots ,{u}_{k}\right\}$ and

$\left\{{\omega}_{k}\right\}=\left\{{\omega}_{1},\cdots ,{\omega}_{k}\right\}$ are all the modes with short bandwidth properties and their center frequencies, respectively.

#### 2.2. The Computation of VMD

A quadratic penalty

$\mathsf{\alpha}$ and Lagrangian multipliers

$\mathsf{\lambda}$ are introduced to address (4) to make constrained problem unconstrained. The Lagrangian operator

$L$ is illustrated as follows [

16]:

In order to solve the variational problem in (5), alternate direction method of multipliers (ADMM) is used to produce different modes and calculate the center frequencies. Each mode and center frequency obtained from solutions in spectral domain can be represented as

where

${\widehat{u}}_{k}^{n+1}\left(\mathsf{\omega}\right)$ is the result of the Wiener filter of the resident part

$\widehat{f}\left(\omega \right)-{{\displaystyle \sum}}_{i\ne k}{\widehat{u}}_{i}\left(\omega \right)$;

${\omega}_{k}^{n+1}$ is the center frequency. The

kth mode

${u}_{k}$ can be obtained by means of an inverse Fourier Transform.

Therefore, the steps of VMD algorithm can be concluded as follows:

- (i)
Initialize the $\{{\widehat{u}}_{k}^{1}\}$, $\{{\omega}_{k}^{1}\}$, $\{{\widehat{\lambda}}^{1}\}$, and $n=0$;

- (ii)
Update the ${u}_{k}$ and ${\omega}_{k}$ repeatedly according to (6), (7);

- (iii)
Update dual ascent

$\lambda $ according to

- (iv)
Repeat step (2), (3), until convergence: ${{\displaystyle \sum}}_{k}\Vert {\widehat{u}}_{k}^{n+1}-{\widehat{u}}_{k}^{n}{\Vert}_{2}^{2}/\Vert {\widehat{u}}_{k}^{n}{\Vert}_{2}^{2}<\epsilon $.

Through the above process, a finite number of IMFs

${u}_{k}$ with specific sparsity properties can be obtained non-recursively. This algorithm is more robust to noise, because wiener filter is embedded for modes update. Flow chart for solution of VMD is shown in

Figure 1.

#### 2.3. Determination of VMD Parameters

There are three key parameters impacting the alluring of the feature methods, namely, Lagrangian multiplier λ, number of modes K, and regularization factor $\alpha $.

(i) Lagrangian Multiplier λ

The Lagrangian multiplier is selected to enforce the equality constraint of reconstruction. It can be set to zero if exact reconstruction is not required, particularly in noisy conditions. In this work, it is done by simply choosing its update parameter τ = 0 in term (8).

(ii) Number of Modes K

K denotes the number of modes from the VMD analysis results. If it is small, the result suffers from mode mixing, there multiple modes are present in one mode component. If it is large, the result suffers from mode redundancy, where a mode is decomposed into many modes components. In this paper, K is determined based on the number of voltage peaks in frequency domain from FFT results.

(iii) Regularization factor $\alpha $

The term (5) is the classical Tikhonov regularization problem when

$\lambda =0$, in which the penalty parameter

$\alpha $ is actually regularization factor. When

$\alpha $ is small, the constraint term

$\Vert f\left(t\right)-{{\displaystyle \sum}}_{k=1}^{K}{u}_{k}{\left(t\right)\Vert}_{2}^{2}$ can be easily satisfied, whereas the penalty term

$\Vert {\partial}_{t}\left[\left(\delta \left(t\right)+\frac{j}{\pi t}\right)\times {u}_{k}\left(t\right)\right]{e}^{-j{\omega}_{k}t}{\Vert}_{2}^{2}$ does not have adequate penalty; we can not expect the mode and center frequency to be detected precisely. When

$\alpha $ is large, the constraint term

$\Vert f\left(t\right)-{{\displaystyle \sum}}_{k=1}^{K}{u}_{k}{\left(t\right)\Vert}_{2}^{2}$ could not to be satisfied; we expect that the center frequencies

${\omega}_{k}$ and corresponding IMFs

${u}_{k}\left(t\right)$ might be estimated precisely under noisy and noise-free environments. However, the center frequencies would converge to the same frequency to lead mode redundant and missed due to the local optimization property of VMD [

16]. Hence, value of

$\alpha $ can be kept low (of the range of few hundreds) in order to capture signals containing wide range of frequencies, while for detection of frequency components of signal over smaller range, it should be kept larger (in the range of tens of thousands). In this paper, we selected

$\alpha $ according to different disturbances analysis condition combining parameter K and

${\omega}_{k}$, as shown in following section.

#### 2.4. PQ Disturbances Analysis

In order to demonstrate the effectiveness of VMD for harmonic signal decomposition, a synthetic signal was established in MATLAB, which is given by:

where

${A}_{m}$,

${f}_{m}$,

${\psi}_{m}$, and

$n\left(t\right)$ are the amplitude, frequency, phase angle of different components, and white noise respectively. The waveform is sampled at 2 kHz. The number of samples is 2000, and the resolution of this signal is 1 Hz. The synthetic signal is composed of a fundamental component, four harmonic components, one interharmonic component and white noise. The magnitude and frequency spectrum of the synthetic voltage are shown in

Figure 2.

Next, we used VMD to separate the synthetic signal. Considering both precise requirement and noisy level of voltage signal, we chose K = 6, according to wave packages of frequency spectrum of waveform,

$\alpha =\mathrm{20,000}$ and

${\omega}_{ini}=50,\text{}150,\text{}250,\text{}350,\text{}367,\text{}\mathrm{and}\text{}450\text{}$Hz, respectively, in order to avoid the adverse effect of local optimum property of VMD, in which the interharmonics frequency is 367 Hz and harmonics frequencies are 150, 250, 350, and 450 Hz, respectively. The decomposed modes and their frequency spectrum are illustrated in

Table 1 and

Figure 3.

As can be seen in

Figure 3, the spectrum of all frequencies was decomposed distinctly and had high degree of correlation with the theoretical modes. The modes of the signal that were recovered by VMD constitute a good partition of the original signal spectrum. In

Figure 3 and

Table 1, each mode was clearly dominant around its respective center frequency. Almost all components were extracted flawlessly, except the fifth and seventh order ones. This is due to the fact that the amplitudes of these two modes are both close to noise. The Signal-to-Noise-Ratio (SNR) is only −1.49 dB.

#### 2.5. Flicker Separation

Flicker waveform, which has amplitude envelope with low frequency component, was modelled mathematically as in Formula (10)

According to trigonometric identities, we could expand term (10) to (11)

Hence, as shown in Formula (11), each flicker with frequency ${f}_{n}(<{f}_{0})$ is decomposed into two components with frequency ${f}_{0}\pm {f}_{n}$. In nature, voltage signal with flicker component is composed of fundamental component (${f}_{0}$) and two other (${f}_{0}\pm {f}_{n}$) components, whose frequency is close to ${f}_{0}$. In this paper, we assume that ${f}_{0}=50$Hz, ${f}_{n}=9$Hz, ${A}_{0}=1\left(\mathrm{pu}\right),$ and ${A}_{n}=0.1\left(\mathrm{pu}\right)$. In order to separate flicker precisely using VMD, we chose large regularization factor $\alpha =\mathrm{20,000}$; K = 3; and initialize ${\omega}_{ini}=41,\text{}50,\text{}59$ Hz, respectively.

The magnitude and frequency spectrum of it is shown in

Figure 4. The decomposed modes and their frequency spectrum are illustrated in

Table 2 and

Figure 5.

From above results, the effectiveness of VMD technique has been evaluated. This method could capture the flicker components accurately as well as fundamental voltage. Since the flicker frequency is 9 Hz, spectrum of decomposed modes showed 41 (50–9) Hz with 0.049 amplitude in pu and 59 (50 + 9) Hz with 0.05 amplitude in pu. The sum of amplitude, which is 0.099, was in high accordance with flicker component of the synthetic voltage.

## 4. Results and Discussion

In order to validate the proposed method, both synthetic and real-world PQ disturbance signals were acquired and used for constructing analytical models.

#### 4.1. Synthetic Signal

Based on synthetic signals, four types of mixed PQ disturbances are established: (1) interruption with oscillation, (2) sag with harmonics, (3) swell with notch, and (4) swell with spike. The synthetic models are then constructed in MATLAB. There are 200 sample signals to establish for each disturbance, where 150 are for training model and 50 for testing. Each synthetic signal is sampled at 2 kHz. The number of samples is 2000, and the resolution of this signal is 1 Hz.

In the first stage, the PQ disturbance signal is composed of fundamental and transient components with

K = 2,

α = 200, and

ω_{ini_1} = 50 Hz. The results are illustrated in

Figure 8.

The fundamental component was fully decomposed in first mode (circle flagged in spectrum), which concluded all stationary disturbances, e.g., interruption, sag, and swell, while impulse component, which included non-stationary disturbances, e.g., oscillation, harmonics, notch, and spike, was separately extracted in the second mode. In the first stage, stationary and non-stationary disturbances were separated into two parts. Then, three statistics features, which are mean, variance, and kurtosis, were extracted to define a feature matrix of DSCN for classification in the second stage of proposed method.

More specifically, the weights and biases of DSCN are randomly assigned under a supervisory mechanism, while the number of layers and nodes in each hidden layer is contributed automatically according to a specific termination criterion. DSCN starts with a small network and stochastically configures its nodes for the current layer until the termination criterion is met. Then, a hidden layer is added by the DSCN proceeds until an acceptable error tolerance is achieved. In the proposed method, a supervisory range is set to a parameter, and actual parameters are randomly assigned by the DSCN. For instance, the maximum node number in a hidden layer (

${L}_{max}$) is set at 200, and the range of weights and biases (

$\mathsf{\lambda}$) is 0.5 to 100. The termination criterion (

$\mathrm{tol}$) is 0.01. Under this condition, DSCN produced 3 hidden layers, 191 nodes in each layer, 3 × 191 stochastic weight values, and 1 × 191 stochastic bias values in our work. The classification rates are 100% and 99.4% in the training and the test fusion matrices, respectively. The results of classification are shown in

Figure 9.

#### 4.2. Real World Signal

Following the synthetic signals, a real-world PQ disturbance signal from the IEEE 1159.2 Working Group datasheet is used for validating the proposed method. The signal under test is based on the three-phase voltages which are contaminated for sag, swell, and oscillatory transient events. The signals were all analyzed using the proposed method with parameters being

K = 2,

α = 200, and

ω_{ini_1} = 50 Hz. The results are shown in

Figure 10.

It can be observed from

Figure 8 that the fundamental component was fully decomposed in the first mode (circle flagged in spectrum), which concluded all stationary disturbances, sag (in phase A), and swell (in phase B and C), while impulse component (square flagged in spectrum), which included oscillatory transient events, was separately extracted in the second mode.

#### 4.3. Discussion

In synthetic signals, as can be seen from

Figure 9, the classification rate in the training matrix was 100% for all disturbances. The number of the simulated events was 150 for training the model. As shown in

Figure 7c, the training accuracy was higher than 0.99 when 40 nodes were established in the hidden layer; moreover, the training RMSE was lower than 0.18. While 50 events were used for testing, the total classification rate was 99.4%, as shown in

Figure 7b. Results demonstrated that the proposed method based on the VMD and DSCN can achieve an excellent detection and classification rates for disturbances. Additionally, the results of proposed method were compared to other techniques in

Table 3 and

Table 4.

The accuracy comparison of the proposed PQ assessment framework with other methods was illustrated in

Table 3 with four methods including EMD and balanced neural tree [

20], ST and NN with DT [

34], Hybrid ST and DT [

35], and ADALINE and FNN [

29]. The evaluation results showed that the proposed framework has comparatively better performance over most of other existing methods. The accuracy of ST combined with NN and DT methods proposed in [

34] was slightly higher than the proposed method.

From the above analysis, the proposed method is excellent in the following aspects. Firstly, the developed VMD is capable of detecting PQD as a feature extraction method. The key parameters of VMD are determined as per different types of disturbance. Secondly, three statistical features (mean, variance, and kurtosis) are extracted from instantaneous amplitude of the decomposed modes. Finally, different types of disturbance are classified by the DSCN, which has a faster learning speed and better generalization capability than existing methods.

However, the NN and DT algorithms are combined for classification [

27], which complicates the classified process and increases its computing time. While DSCN method is used as a classifier in the proposed method, the accuracy is similar. The tradeoff between the accuracy and complexity is typical, subject to their computational costs. Additionally, the accuracy comparison for specific event of the proposed method with other techniques was illustrated in

Table 4 with four methods including wavelet network [

36], fuzzy and ST [

37], ADALINE and FNN [

29], and dynamics and ST [

38]. It was observed that the proposed method showed better classification capability, since the VMD approach in the first stage of this method had separated the stationary and non-stationary disturbances effectively, which simplified the classification process in DSCN in the second stage of the method. It can be seen from

Figure 10 that the proposed method can also locate the moment when disturbances occur and is capable of capturing the start and finish of the disturbance.

## 5. Conclusions

In this paper, a new algorithm based on VMD and DSCN is developed for the detection and classification of PQ disturbances. In the detection stage, the VMD can deal with the time and frequency resolutions of stationary and non-stationary PQ events. The key parameters in the VMD method are determined as per the disturbances. All the PQ events can also be located precisely by means of VMD. This algorithm is excellent in feature extraction. In terms of classification, the DSCN has a faster learning speed and better generalization capability than existing methods. It does not need complicated models to optimize the classifier, while existing methods do. Thus, the computational effort is substantially decreased compared to the existing algorithms. Finally, a real-world PQ event and simulated events are used to confirm the effectiveness of the proposed method.

However, the proposed method has been tested through offline analysis. In the future work, it will be implemented online in hardware in the loop system. The computational speed of the VMD and DSCN methods needs to be improved in this respect.