**1. Introduction**

The development and application of intelligent systems in the modern industry lead to the implementation of improved devices capable of acquiring, processing, storing, and sending any kind of information from any process to perform its continuous assessment. These novelty systems and devices lead to the industry 4.0 and aim to increase the value of the work developed to handle the complexity of all the available data from industrial processes. Indeed, this information is not only directly related to the sensors that are installed in the equipment involved in processes, but the information could also be the electrical consumption that the equipment, the supply to the machinery. Due to an adequate electrical supply has a lot of inference in all the processes in the industrial, commercial, and residential equipment [1].

Therefore, the monitoring of Power Quality (PQ ) has been increased and reached its importance to ensure the appropriate functioning of the electrical equipment in the industrial processes, avoiding unexpected interruptions which may

cause and lead to the loss in the production or utilities. Moreover, the importance of developing new strategies and methodologies for monitoring PQ has gained more interest in the scientific field in recent years [2]. The increase in the electrical power system and the loads connected to supply sources highlight the importance of the availability of monitoring systems to detect and face the occurrence of anomalies presented in the system [3]. Despite in the literature has been identified that problems related to PQ are caused by the supply system or non-linear behaviors of the loads, the opportunity of detecting the occurrence of electrical power disturbances represent a critical challenge to the monitoring systems [4].

In this regard, condition monitoring strategies focused on the assessment of PQ are mainly related to data-driven approaches. In these cases, the acquisition and processing of electrical power signals are performed in order to estimate a useful and meaningful set of features. These, in turn, allow a high-performance characterization of different kinds of electrical power disturbances that may be presented in electrical power systems. In this sense, most of the classical approaches focused on the identification of electrical power disturbances are related to the use of signal processing that transforms the original space of electric power signals through processing techniques such as Fourier Transform, Hilbert Transform, Wavelet Transform, among others [5–7].

Additionally, these proposed approaches focused on obtaining a useful set of features, then use common machine learning-based classification structures to carry out the pattern recognition and classification of assessed power disturbances. Indeed, the most used classifier structures are represented by Support Vector Machines (SVM), Artificial Neural Networks (ANN), infrared Fuzzy Classifiers, among others [8, 9]. On the other side, self-organizing maps (SOM) is a wellstudied technique that is based on a grid of neurons and by a procedure performed under unsupervised learning, the topology of an input data space is represented by a discrete distribution [10]. In this regard, the application of SOM as a part of a monitoring strategy focused on PQ, may lead to extend its application to solve different tasks such as feature reduction, multiple class classification, remaining life prediction, and even novelty detection [11, 12].

Thereby, the main contribution of this chapter lies in the proposal of novelty detection methodology based on Self-Organizing Maps (SOM) for the monitoring of Power Quality (PQ ). The proposed methodology faces the occurrence of power disturbances from the viewpoint of detecting novel events that do not belong to pre-established normal conditions. Thus, the originality of this proposal includes the characterization of different electric power signals by means of calculation a meaningful set of statistical time domain-based features and, then, its posterior data distribution modeling through individual SOM neuron grid models to perform the diagnosis and novelty evaluation. The effectiveness of the proposed methodology is evaluated by analyzing synthetic electric power signals that consider the normal condition, sag, swell, and fluctuations. The obtained results make the proposed method a suitable option for being implemented in embedded systems for online monitoring purposes.

### **2. Theoretical basis**

#### **2.1 Electric power disturbances**

The ideal electric power signals have specific parameters such as fundamental frequency and a specific range of amplitudes that are also known as nominal values. Thus, any deviation from these values is determined as an electric power

**25**

Eq. (1) [12]:

*Novelty Detection Methodology Based on Self-Organizing Maps for Power Quality Monitoring*

disturbance and its occurrence may be detected through PQ monitoring [13]. According to the IEEE Std 1159 [14], a sag is defined as a decrease of the rms value of the voltage for durations that comprises 0.5 cycle to 1 minute with typical decreases of 0.1 per unit (pu) to 0.9 pu. On the other side, a swell is defined as an increase of the rms value and it may occur for values up to 1.1 pu with a duration of 0.5 cycles to 1 min. Otherwise, fluctuations are defined as a series of voltage changes that may appear randomly in the envelope of the signal with typical values between 0.95 pu to 1.05 pu. In the category of waveform distortions are included the harmonics, which are sinusoidal voltages or currents with frequencies that are integer multiples of the fundamental frequency. In addition, other kinds of disturbances are known as transient, which depicts a phenomenon that presents variations between two consecutive steady states, that is, during a short interval of time

Machine learning represents a suitable tool that may be considered in condition assessment methodologies applied to the monitoring of PQ to detect the occurrence of electric power disturbances. In this regard, the SOM is an unsupervised technique based on a neural network that has been used with multiple purposed, such as clustering, classification, prediction of novelty detection. The main objective of SOM is based on the non-linear projection of an original and high-dimensional input data space into a low-dimensional space represented by a pre-defined number of neurons. Through this mapping, the data distribution of the input space, which commonly is represented by a defined number of features, resembles the mapped neurons since the topology of the data is preserved. In this regard, the consideration of SOM for PQ monitoring may lead to detecting the occurrence of power disturbance from a novelty detection viewpoint. Until now, other reported methodologies used for PQ analysis require to be continuously supervised and they use a predefined topology of the data, meanwhile, the SOM automatically adjusts to different data topologies. These are important advantages since they allow to be trained only once, while other techniques are retrained every time the conditions change. This is possible of being implemented whether the available data distribution related to the normal condition is initially modeled and then, eventual novelty patterns are detected due to the topological characteristics of the initial data distribution are highly associated with the normal condition. Indeed, SOM performance is qualitatively measured in terms of the average quantization error, *Ēq*, that also provides information to the degree of novelty detection (*Nd*) described by

and can be a unidirectional impulse or an oscillatory wave [15].

*q training*

q



<sup>ï</sup> - = >> - <sup>í</sup> - <sup>ï</sup>

, 1

The proposed novelty detection methodology for PQ is composed by five different steps as **Figure 1** depicts. Thus, in the first step, a complete database composed

*q training*

max


*d q q training*

*E d*

*N d EE*

max

<sup>ï</sup> <sup>&</sup>gt; <sup>î</sup>

**3. PQ-based novelty detection method**

<sup>ì</sup> £ <sup>ï</sup>

*E E*

*q q training*



*E E*

*d E*

max

, 0

, 1

*training q training*

(1)

*DOI: http://dx.doi.org/10.5772/intechopen.96145*

**2.2 Self-organizing maps**

*Novelty Detection Methodology Based on Self-Organizing Maps for Power Quality Monitoring DOI: http://dx.doi.org/10.5772/intechopen.96145*

disturbance and its occurrence may be detected through PQ monitoring [13]. According to the IEEE Std 1159 [14], a sag is defined as a decrease of the rms value of the voltage for durations that comprises 0.5 cycle to 1 minute with typical decreases of 0.1 per unit (pu) to 0.9 pu. On the other side, a swell is defined as an increase of the rms value and it may occur for values up to 1.1 pu with a duration of 0.5 cycles to 1 min. Otherwise, fluctuations are defined as a series of voltage changes that may appear randomly in the envelope of the signal with typical values between 0.95 pu to 1.05 pu. In the category of waveform distortions are included the harmonics, which are sinusoidal voltages or currents with frequencies that are integer multiples of the fundamental frequency. In addition, other kinds of disturbances are known as transient, which depicts a phenomenon that presents variations between two consecutive steady states, that is, during a short interval of time and can be a unidirectional impulse or an oscillatory wave [15].

#### **2.2 Self-organizing maps**

*Artificial Intelligence - Latest Advances, New Paradigms and Novel Applications*

represent a critical challenge to the monitoring systems [4].

Transform, among others [5–7].

online monitoring purposes.

**2.1 Electric power disturbances**

**2. Theoretical basis**

prediction, and even novelty detection [11, 12].

cause and lead to the loss in the production or utilities. Moreover, the importance of developing new strategies and methodologies for monitoring PQ has gained more interest in the scientific field in recent years [2]. The increase in the electrical power system and the loads connected to supply sources highlight the importance of the availability of monitoring systems to detect and face the occurrence of anomalies presented in the system [3]. Despite in the literature has been identified that problems related to PQ are caused by the supply system or non-linear behaviors of the loads, the opportunity of detecting the occurrence of electrical power disturbances

In this regard, condition monitoring strategies focused on the assessment of PQ are mainly related to data-driven approaches. In these cases, the acquisition and processing of electrical power signals are performed in order to estimate a useful and meaningful set of features. These, in turn, allow a high-performance characterization of different kinds of electrical power disturbances that may be presented in electrical power systems. In this sense, most of the classical approaches focused on the identification of electrical power disturbances are related to the use of signal processing that transforms the original space of electric power signals through processing techniques such as Fourier Transform, Hilbert Transform, Wavelet

Additionally, these proposed approaches focused on obtaining a useful set of features, then use common machine learning-based classification structures to carry out the pattern recognition and classification of assessed power disturbances. Indeed, the most used classifier structures are represented by Support Vector Machines (SVM), Artificial Neural Networks (ANN), infrared Fuzzy Classifiers, among others [8, 9]. On the other side, self-organizing maps (SOM) is a wellstudied technique that is based on a grid of neurons and by a procedure performed under unsupervised learning, the topology of an input data space is represented by a discrete distribution [10]. In this regard, the application of SOM as a part of a monitoring strategy focused on PQ, may lead to extend its application to solve different tasks such as feature reduction, multiple class classification, remaining life

Thereby, the main contribution of this chapter lies in the proposal of novelty detection methodology based on Self-Organizing Maps (SOM) for the monitoring of Power Quality (PQ ). The proposed methodology faces the occurrence of power disturbances from the viewpoint of detecting novel events that do not belong to pre-established normal conditions. Thus, the originality of this proposal includes the characterization of different electric power signals by means of calculation a meaningful set of statistical time domain-based features and, then, its posterior data distribution modeling through individual SOM neuron grid models to perform the diagnosis and novelty evaluation. The effectiveness of the proposed methodology is evaluated by analyzing synthetic electric power signals that consider the normal condition, sag, swell, and fluctuations. The obtained results make the proposed method a suitable option for being implemented in embedded systems for

The ideal electric power signals have specific parameters such as fundamental

frequency and a specific range of amplitudes that are also known as nominal values. Thus, any deviation from these values is determined as an electric power

**24**

Machine learning represents a suitable tool that may be considered in condition assessment methodologies applied to the monitoring of PQ to detect the occurrence of electric power disturbances. In this regard, the SOM is an unsupervised technique based on a neural network that has been used with multiple purposed, such as clustering, classification, prediction of novelty detection. The main objective of SOM is based on the non-linear projection of an original and high-dimensional input data space into a low-dimensional space represented by a pre-defined number of neurons. Through this mapping, the data distribution of the input space, which commonly is represented by a defined number of features, resembles the mapped neurons since the topology of the data is preserved. In this regard, the consideration of SOM for PQ monitoring may lead to detecting the occurrence of power disturbance from a novelty detection viewpoint. Until now, other reported methodologies used for PQ analysis require to be continuously supervised and they use a predefined topology of the data, meanwhile, the SOM automatically adjusts to different data topologies. These are important advantages since they allow to be trained only once, while other techniques are retrained every time the conditions change. This is possible of being implemented whether the available data distribution related to the normal condition is initially modeled and then, eventual novelty patterns are detected due to the topological characteristics of the initial data distribution are highly associated with the normal condition. Indeed, SOM performance is qualitatively measured in terms of the average quantization error, *Ēq*, that also provides information to the degree of novelty detection (*Nd*) described by Eq. (1) [12]:

$$\mathcal{N}\_d = \begin{cases} E\_q \le \overline{E}\_{q-\text{training}}, & \mathbf{0} \\ d\_{\text{max}} > E\_q > \overline{E}\_{q-\text{training}}, & \mathbf{1} - \frac{\overline{E}\_q - \overline{E}\_{q-\text{training}}}{d\_{\text{max}-\text{training}} - \overline{E}\_{q-\text{training}}} \\ \quad E\_q > d\_{\text{max}-\text{training}}, & \mathbf{1} \end{cases} \tag{1}$$

#### **3. PQ-based novelty detection method**

The proposed novelty detection methodology for PQ is composed by five different steps as **Figure 1** depicts. Thus, in the first step, a complete database composed

#### **Figure 1.**

*Proposed novelty detection strategy based on SOM for monitoring and detecting different PQ events.*


#### **Table 1.**

*Statistical time domain-based set of features.*

by several synthetic signals is generated. The database is generated in Matlab following the corresponding definitions established by the IEEE Std 1159 [13]. In this regard, the synthetic signals are related to different power signals including normal conditions and different disturbances such as sag, swell, and fluctuations.

Subsequently, in the second step, a meaningful set of 3 statistical time domainbased features is estimated from all the synthetic signals, this set of features is composed by the rms value, kurtosis, and skewness [16]. Indeed, the calculation of a numerical set of statistical-time domain features allows obtaining a significant characterization due to its capability for characterizing trends and eventual changes over these trends in the analyzed signals [12, 15]. The mathematical equations of the considered statistical time domain features are listed in **Table 1**.

Then, in the third step, the modeling of all considered power signals is carried out through different SOM neuron grid structures. Thereby, in this modeling stage, the data distribution of each one of the events is modeled and represented by a unique and specific SOM neuron grid model, i.e. the normal condition is represented by *SOM*1, and the power disturbances such as sag, swell, and fluctuations are represented by *SOM*2, *SOM*3, and *SOM*4, respectively.

Afterward, the continuous assessment of electric power signals and the detection of events is performed by a novelty detection stage, such detection is carried out by analyzing the resulting *Ēq* value of each one of the considered SOM's neuron grids. Specifically, the *Ēq* values are successively analyzed by each SOM neuron grid. That is, a measurement is assessed, first, through the *SOM*1 in order to analyze its normal condition. Subsequently, a novel event is detected if an abrupt change in the *Ēq* value is obtained. In this regard, the electric power signal under inspection is subsequently analyzed by a second, third and fourth SOM's neuron grids aiming to find the SOM model that best represents such power signal in Eq terms. Indeed, the increase of the *Ēq* value lies to achieve a novelty detection. Such increase is due to the topological characteristic of the database considered during the modeling of each SOM neuron grid and its difference with the topological characteristics of the measurement under inspection.

Finally, the diagnosis and classification of different power disturbances follows. Synthetic signals with multiple power disturbances are analyzed in this step, in

**27**

logical properties.

*Novelty Detection Methodology Based on Self-Organizing Maps for Power Quality Monitoring*

order to validate the effectiveness of the proposed fault detection and identification

It worth mentioning that the PQ monitoring problem is addressed by the novelty detection technique since changes in the Eq values would be analyzed to conclude if effectively a power disturbance occurs, or if simply the electrical equipment reaches a new condition that falls between an operating range that stills remains normal. In counterpart, techniques focused on outlier/anomaly detection could lead to

The proposed novelty detection methodology has been implemented in Matlab,

As it has been aforementioned, a database composed of different synthetic signals is generated by taking into account the corresponding definitions established by the standards. In this sense, it should be highlighted that any power disturbance must fulfill specific characteristics for being considered as a specific disturbance, otherwise, there will be no appropriate category to which it could belong. Thus, all synthetic signals are generated by considering a sampling frequency of 8 kHz and 50 Hz as fundamental frequency; additionally, different levels of noise are also

Consequently, a database with four different patterns is generated, such patterns are related to different electric power conditions representing the normal condition and, three disturbances such as sag, swell, and fluctuations. Hence, for each one of the considered electric power conditions, twenty synthetic signals are produced

Subsequently, as it has been described, all synthetic signals are processed by estimating a set of statistical time-domain based features. The proposed feature estimation is considered attempting to highlight the most meaningful characteristics that may describe the incidence of unexpected electric power disturbances.

In this regard, due to there exist specific disturbances that may appear instantly,

the statistical set of features is individually estimated for each one of the cycles that compose a complete electric power signal; indeed, a zero-crossing detector is considered to identify the beginning and end of each cycle. Thus, for each one of the considered conditions, twenty synthetic signals with 250 cycles are subjected to this feature estimation, as a result, a feature matrix with 5000 files (samples) and 3

Then, the data distribution of each one of the electric power signals, represented by its corresponding feature matrix, is modeled and represented by a unique and specific SOM neuron grid model. Thereby, the considered SOM's neuron grids consist basically of a predefined number of neurons (10 x10) which is known as the Matching Unit (MU). Subsequently, during a training process, each SOM neuron grid is randomly initialized and consecutively is adapted to the data distribution under evaluation aiming to retain as much as possible its topo-

columns (features) is obtained for each specific condition.

a software platform used to develop multiple engineering applications such as

considered with the aim of increasing the variability of the database.

*DOI: http://dx.doi.org/10.5772/intechopen.96145*

condition monitoring of industrial systems.

**4.1 Synthetic signal database**

with a signal duration of 5 seconds.

**4.2 Signal processing and data modeling**

methodology.

misclassifications.

**4. Results**

*Novelty Detection Methodology Based on Self-Organizing Maps for Power Quality Monitoring DOI: http://dx.doi.org/10.5772/intechopen.96145*

order to validate the effectiveness of the proposed fault detection and identification methodology.

It worth mentioning that the PQ monitoring problem is addressed by the novelty detection technique since changes in the Eq values would be analyzed to conclude if effectively a power disturbance occurs, or if simply the electrical equipment reaches a new condition that falls between an operating range that stills remains normal. In counterpart, techniques focused on outlier/anomaly detection could lead to misclassifications.

### **4. Results**

*Artificial Intelligence - Latest Advances, New Paradigms and Novel Applications*

Root mean square ( )

Kurtosis ( ) *<sup>n</sup>*

Skewness ( ) *<sup>n</sup>*

*Statistical time domain-based set of features.*

**Table 1.**

**Figure 1.**

*k*

*<sup>k</sup> <sup>k</sup> x x Ku* s

*k k*

*x x <sup>S</sup>* s

= é ù - ë û <sup>=</sup> <sup>å</sup> <sup>3</sup> 1 3

= é ù - ë û <sup>=</sup> <sup>å</sup> <sup>4</sup> 1 4

by several synthetic signals is generated. The database is generated in Matlab following the corresponding definitions established by the IEEE Std 1159 [13]. In this regard, the synthetic signals are related to different power signals including normal

2 1 1 *<sup>n</sup>*

*Proposed novelty detection strategy based on SOM for monitoring and detecting different PQ events.*

*<sup>k</sup> <sup>k</sup> RMS <sup>x</sup> <sup>n</sup>* <sup>=</sup> = ×å (1)

(2)

(3)

Subsequently, in the second step, a meaningful set of 3 statistical time domainbased features is estimated from all the synthetic signals, this set of features is composed by the rms value, kurtosis, and skewness [16]. Indeed, the calculation of a numerical set of statistical-time domain features allows obtaining a significant characterization due to its capability for characterizing trends and eventual changes over these trends in the analyzed signals [12, 15]. The mathematical equations of

Then, in the third step, the modeling of all considered power signals is carried out through different SOM neuron grid structures. Thereby, in this modeling stage, the data distribution of each one of the events is modeled and represented by a unique and specific SOM neuron grid model, i.e. the normal condition is represented by *SOM*1, and the power disturbances such as sag, swell, and fluctuations are

Afterward, the continuous assessment of electric power signals and the detection of events is performed by a novelty detection stage, such detection is carried out by analyzing the resulting *Ēq* value of each one of the considered SOM's neuron grids. Specifically, the *Ēq* values are successively analyzed by each SOM neuron grid. That is, a measurement is assessed, first, through the *SOM*1 in order to analyze its normal condition. Subsequently, a novel event is detected if an abrupt change in the *Ēq* value is obtained. In this regard, the electric power signal under inspection is subsequently analyzed by a second, third and fourth SOM's neuron grids aiming to find the SOM model that best represents such power signal in Eq terms. Indeed, the increase of the *Ēq* value lies to achieve a novelty detection. Such increase is due to the topological characteristic of the database considered during the modeling of each SOM neuron grid and its difference with the topological characteristics of the

Finally, the diagnosis and classification of different power disturbances follows. Synthetic signals with multiple power disturbances are analyzed in this step, in

conditions and different disturbances such as sag, swell, and fluctuations.

the considered statistical time domain features are listed in **Table 1**.

represented by *SOM*2, *SOM*3, and *SOM*4, respectively.

**26**

measurement under inspection.

The proposed novelty detection methodology has been implemented in Matlab, a software platform used to develop multiple engineering applications such as condition monitoring of industrial systems.

#### **4.1 Synthetic signal database**

As it has been aforementioned, a database composed of different synthetic signals is generated by taking into account the corresponding definitions established by the standards. In this sense, it should be highlighted that any power disturbance must fulfill specific characteristics for being considered as a specific disturbance, otherwise, there will be no appropriate category to which it could belong. Thus, all synthetic signals are generated by considering a sampling frequency of 8 kHz and 50 Hz as fundamental frequency; additionally, different levels of noise are also considered with the aim of increasing the variability of the database.

Consequently, a database with four different patterns is generated, such patterns are related to different electric power conditions representing the normal condition and, three disturbances such as sag, swell, and fluctuations. Hence, for each one of the considered electric power conditions, twenty synthetic signals are produced with a signal duration of 5 seconds.

#### **4.2 Signal processing and data modeling**

Subsequently, as it has been described, all synthetic signals are processed by estimating a set of statistical time-domain based features. The proposed feature estimation is considered attempting to highlight the most meaningful characteristics that may describe the incidence of unexpected electric power disturbances.

In this regard, due to there exist specific disturbances that may appear instantly, the statistical set of features is individually estimated for each one of the cycles that compose a complete electric power signal; indeed, a zero-crossing detector is considered to identify the beginning and end of each cycle. Thus, for each one of the considered conditions, twenty synthetic signals with 250 cycles are subjected to this feature estimation, as a result, a feature matrix with 5000 files (samples) and 3 columns (features) is obtained for each specific condition.

Then, the data distribution of each one of the electric power signals, represented by its corresponding feature matrix, is modeled and represented by a unique and specific SOM neuron grid model. Thereby, the considered SOM's neuron grids consist basically of a predefined number of neurons (10 x10) which is known as the Matching Unit (MU). Subsequently, during a training process, each SOM neuron grid is randomly initialized and consecutively is adapted to the data distribution under evaluation aiming to retain as much as possible its topological properties.

Furthermore, the performance achieved for each SOM neuron grid model may be quantitatively defined in terms of its quantization error. Specifically, the average quantization error, *Ēq*, represents the mean distance from each measurement to the nearest neuron that is activated (Best Matching Unit-BMU). Thus, after modeling the data distribution of the electric power signal in normal conditions, the first *SOM*1 neuron model achieves a mean quantization error equal to 0.0016.

#### **4.3 Novelty detection and PQ diagnosis**

In order to demonstrate the effectiveness of this first *SOM*1 neuron grid for modeling the normal condition and to evaluate its achieved performance, three different electric power signals, with an electric disturbance, are assessed through the *SOM*1 model. Thus, in **Figure 2** is shown the mean quantization, *Ēq*, obtained by the first *SOM*1 model during the evaluation of the first electric power signal that includes a power disturbance. From **Figure 2**, it should be clarified that each sample of the horizontal axis represents each analyzed cycle from the electric power signal under evaluation. In this regard, it is possible to observe that an abrupt increase of the *Ēq* is achieved between samples 89 and 93, this increase depicts the sudden occurrence of an abnormal condition, indeed, such occurrence is also known as novel detection.

Due to a novelty detection is performed by the *SOM*1, the electric power signal under evaluation has to be analyzed in order to confirm the occurrence of disturbances. Hence, in **Figure 3a** is shown the complete electric power signal and, through visual inspection, it is possible to identify an abnormality on the signal (amplitude reduction), where, such abnormality describes a sag. A detailed visualization of the affected part of the power signal is shown in **Figure 3b**, thus, from **Figure 3b**, and by following the definitions established by the IEEE Std 1159, it may be determined that three cycles of the power signal are affected by the occurrence of sag.

Afterward, a second and a third electric power signal that also includes power disturbance are also assessed under the *SOM*1 model. In this sense, the *Ēq* value achieved during the evaluation of the second signal is graphically represented and shown in **Figure 4**. For this electric power signal, the novelty detection is placed between samples 175 and 178, on the other hand, when this electric power signal is visually inspected an instantaneous amplitude increase is detected. In **Figure 5a** is shown the complete electric power signal evaluated and, in **Figure 5b** is shown a detailed visualization of the affected part of the second power signal, that, according to the established definitions represents the occurrence of swell and affects the power signal during two cycles.

#### **Figure 2.**

*Graphical representation of the resulting mean quantization error (Ēq) that is obtained during the evaluation of an electric power signal that includes an unknown power disturbance (sag), in the first SOM1 model.*

**29**

**Figure 3.**

**Figure 4.**

*power disturbance (swell), in the first SOM1 model.*

normal conditions.

*Novelty Detection Methodology Based on Self-Organizing Maps for Power Quality Monitoring*

Later, the third electric power signal is finally evaluated through the first *SOM*<sup>1</sup> model, the *Ēq* value obtained during its evaluation is graphically represented in **Figure 6**, where, the novelty detection is performed between samples 21 and 32. Thus, when this electric power signal is visually inspected, it is noted that several amplitude variations appear over the power signal, as in **Figure 7a** is shown. In **Figure 7b** is shown a detailed visualization of the affected part of the third power signal, that, in terms of the established definitions, such amplitude variations represent the occurrence of fluctuations. Thereby, through the evaluation of these three electric power signals, which include power disturbances such as sag, swell, and fluctuations, is validated the effectiveness of considering a specific SOM neuron grid to model and represent the data distribution of electric power signals in

*Obtained mean quantization error during the evaluation of an electric power signal that includes an unknown* 

*Electric power signal with a power disturbance, SAG, evaluated under the first SOM1 model. (a) Complete signal with 5 seconds of duration and, (b) zoom of the detailed signal that shows the signal affectation.*

*DOI: http://dx.doi.org/10.5772/intechopen.96145*

*Novelty Detection Methodology Based on Self-Organizing Maps for Power Quality Monitoring DOI: http://dx.doi.org/10.5772/intechopen.96145*

**Figure 3.**

*Artificial Intelligence - Latest Advances, New Paradigms and Novel Applications*

**4.3 Novelty detection and PQ diagnosis**

novel detection.

rence of sag.

power signal during two cycles.

Furthermore, the performance achieved for each SOM neuron grid model may be quantitatively defined in terms of its quantization error. Specifically, the average quantization error, *Ēq*, represents the mean distance from each measurement to the nearest neuron that is activated (Best Matching Unit-BMU). Thus, after modeling the data distribution of the electric power signal in normal conditions, the first *SOM*1 neuron model achieves a mean quantization error equal to 0.0016.

In order to demonstrate the effectiveness of this first *SOM*1 neuron grid for modeling the normal condition and to evaluate its achieved performance, three different electric power signals, with an electric disturbance, are assessed through the *SOM*1 model. Thus, in **Figure 2** is shown the mean quantization, *Ēq*, obtained by the first *SOM*1 model during the evaluation of the first electric power signal that includes a power disturbance. From **Figure 2**, it should be clarified that each sample of the horizontal axis represents each analyzed cycle from the electric power signal under evaluation. In this regard, it is possible to observe that an abrupt increase of the *Ēq* is achieved between samples 89 and 93, this increase depicts the sudden occurrence of an abnormal condition, indeed, such occurrence is also known as

Due to a novelty detection is performed by the *SOM*1, the electric power signal under evaluation has to be analyzed in order to confirm the occurrence of disturbances. Hence, in **Figure 3a** is shown the complete electric power signal and, through visual inspection, it is possible to identify an abnormality on the signal (amplitude reduction), where, such abnormality describes a sag. A detailed visualization of the affected part of the power signal is shown in **Figure 3b**, thus, from **Figure 3b**, and by following the definitions established by the IEEE Std 1159, it may be determined that three cycles of the power signal are affected by the occur-

Afterward, a second and a third electric power signal that also includes power disturbance are also assessed under the *SOM*1 model. In this sense, the *Ēq* value achieved during the evaluation of the second signal is graphically represented and shown in **Figure 4**. For this electric power signal, the novelty detection is placed between samples 175 and 178, on the other hand, when this electric power signal is visually inspected an instantaneous amplitude increase is detected. In **Figure 5a** is shown the complete electric power signal evaluated and, in **Figure 5b** is shown a detailed visualization of the affected part of the second power signal, that, according to the established definitions represents the occurrence of swell and affects the

*Graphical representation of the resulting mean quantization error (Ēq) that is obtained during the evaluation of an electric power signal that includes an unknown power disturbance (sag), in the first SOM1 model.*

**28**

**Figure 2.**

*Electric power signal with a power disturbance, SAG, evaluated under the first SOM1 model. (a) Complete signal with 5 seconds of duration and, (b) zoom of the detailed signal that shows the signal affectation.*

#### **Figure 4.**

*Obtained mean quantization error during the evaluation of an electric power signal that includes an unknown power disturbance (swell), in the first SOM1 model.*

Later, the third electric power signal is finally evaluated through the first *SOM*<sup>1</sup> model, the *Ēq* value obtained during its evaluation is graphically represented in **Figure 6**, where, the novelty detection is performed between samples 21 and 32. Thus, when this electric power signal is visually inspected, it is noted that several amplitude variations appear over the power signal, as in **Figure 7a** is shown. In **Figure 7b** is shown a detailed visualization of the affected part of the third power signal, that, in terms of the established definitions, such amplitude variations represent the occurrence of fluctuations. Thereby, through the evaluation of these three electric power signals, which include power disturbances such as sag, swell, and fluctuations, is validated the effectiveness of considering a specific SOM neuron grid to model and represent the data distribution of electric power signals in normal conditions.

#### **Figure 5.**

*Electric power signal with a power disturbance, SWELL, evaluated under the first SOM1 model. (a) Complete signal with 5 seconds of duration and, (b) zoom of the detailed signal that shows the signal affectation per two cycles.*

#### **Figure 6.**

*Achieved mean quantization error obtained during the assessment of an electric power signal that includes an unknown power disturbance (fluctuations), in the first SOM1 model.*

Regarding the proposed methodology, the modeling of the data distributions related to synthetic electric power signals with different disturbances such as sag, swell and fluctuations, is also performed by three individual SOM neuron models, *SOM*2, *SOM*3 and *SOM*4 respectively. Thereby, *SOM*2 represents the sag power disturbance, *SOM*3 represents the swell power disturbance and, *SOM*4 represents the fluctuation power disturbance. The mean quantization error, *Ēq*, achieved during the training of each SOM neuron model is 0.003, 0.0023 and 0.0016, for each one of the considered disturbances, sag, swell and fluctuations, respectively.

Accordingly, in order to evaluate the performance achieved by each modeled SOM neuron model, an electric power signal that includes all considered conditions, normal, sag, swell and fluctuations, is evaluated through the four SOM

**31**

and **Figure 7a**.

**Figure 7.**

*affectation.*

**Figure 8.**

*evaluation through SOM1, SOM2, SOM3 and SOM4.*

*Novelty Detection Methodology Based on Self-Organizing Maps for Power Quality Monitoring*

neuron models, *SOM*1, *SOM*2, *SOM*3 and *SOM*4. Thus, as it has been mentioned, the electric power signal is first evaluated through the SOM1 neuron model and, in case of novelty detection, such electric power signal is subsequently analyzed by *SOM*2, *SOM*3 and *SOM*4 neuron grids aiming to find the SOM model that best represents such power signal in terms of its *Ēq* value. In **Figure 8** is shown the electric power signal used to evaluate the SOM neuron grid structure, this electric power signal is composed by concatenating an electric power signal in a normal condition of 5 seconds of duration with the electric power signals shown in **Figure 3a**, **Figure 5a**

*Electric power signal with three power disturbances, sag, swell and fluctuations, used by the subsequent* 

*Electric power signal with a power disturbance, fluctuations, evaluated under the first SOM1 model. (a) Complete signal with 5 seconds of duration and (b) zoom of the detailed signal that shows the signal* 

*DOI: http://dx.doi.org/10.5772/intechopen.96145*

*Novelty Detection Methodology Based on Self-Organizing Maps for Power Quality Monitoring DOI: http://dx.doi.org/10.5772/intechopen.96145*

#### **Figure 7.**

*Artificial Intelligence - Latest Advances, New Paradigms and Novel Applications*

Regarding the proposed methodology, the modeling of the data distributions related to synthetic electric power signals with different disturbances such as sag, swell and fluctuations, is also performed by three individual SOM neuron models, *SOM*2, *SOM*3 and *SOM*4 respectively. Thereby, *SOM*2 represents the sag power disturbance, *SOM*3 represents the swell power disturbance and, *SOM*4 represents the fluctuation power disturbance. The mean quantization error, *Ēq*, achieved during the training of each SOM neuron model is 0.003, 0.0023 and 0.0016, for each one

*Achieved mean quantization error obtained during the assessment of an electric power signal that includes an* 

*Electric power signal with a power disturbance, SWELL, evaluated under the first SOM1 model. (a) Complete signal with 5 seconds of duration and, (b) zoom of the detailed signal that shows the signal affectation per* 

Accordingly, in order to evaluate the performance achieved by each modeled SOM neuron model, an electric power signal that includes all considered conditions, normal, sag, swell and fluctuations, is evaluated through the four SOM

of the considered disturbances, sag, swell and fluctuations, respectively.

*unknown power disturbance (fluctuations), in the first SOM1 model.*

**30**

**Figure 5.**

*two cycles.*

**Figure 6.**

*Electric power signal with a power disturbance, fluctuations, evaluated under the first SOM1 model. (a) Complete signal with 5 seconds of duration and (b) zoom of the detailed signal that shows the signal affectation.*

#### **Figure 8.**

*Electric power signal with three power disturbances, sag, swell and fluctuations, used by the subsequent evaluation through SOM1, SOM2, SOM3 and SOM4.*

neuron models, *SOM*1, *SOM*2, *SOM*3 and *SOM*4. Thus, as it has been mentioned, the electric power signal is first evaluated through the SOM1 neuron model and, in case of novelty detection, such electric power signal is subsequently analyzed by *SOM*2, *SOM*3 and *SOM*4 neuron grids aiming to find the SOM model that best represents such power signal in terms of its *Ēq* value. In **Figure 8** is shown the electric power signal used to evaluate the SOM neuron grid structure, this electric power signal is composed by concatenating an electric power signal in a normal condition of 5 seconds of duration with the electric power signals shown in **Figure 3a**, **Figure 5a** and **Figure 7a**.

#### **Figure 9.**

*Mean quantization error achieved by each SOM neuron model during the evaluation of an electric power signal that includes power disturbance such as sag, swell, and fluctuations. (a) SOM1, (b) SOM2, (c) SOM3 and (d) SOM4.*

The *Ēq* values achieved by each SOM neuron model are individually shown from **Figure 9a-d**, for *SOM*1, *SOM*2, *SOM*3 and *SOM*4, respectively. Therefore, by analyzing the *Ēq* value of **Figure 9a**, from *SOM*1, it is possible to notice the occurrence

**33**

**Table 2.**

*Novelty Detection Methodology Based on Self-Organizing Maps for Power Quality Monitoring*

of different events detected as novelties. In this regard, when the first novelty detection occurs, the *Ēq* values of the following SOM's neuron models have to be analyzed. That is, while a novelty detection is performed by the *SOM*1 neuron grid, for these specified number of samples, in the second SOM neuron grid, *SOM*2, is achieved the lowest *Ēq* value; whereas, the rest of SOM's neuron models present an abrupt increase of the *Ēq* value. Consequently, the first novelty detection of *SOM*<sup>1</sup>

Subsequently, when the second novelty detection appears over the *Ēq* value of *SOM*1 (**Figure 9a**), in the *SOM*3 is achieved the lowest *Ēq* value; while the rest of SOM's neuron models the abrupt increasing and change of the *Ēq* value is described; thus, the occurrence of swell produces the second novelty detection. Finally, the third novelty detection that occurs in the *Ēq* value of *SOM*1 trend to produce abrupt and variable changes of the *Ēq* value, indeed, this variable behavior also appears over the *Ēq* values of *SOM*2 and *SOM*3 neuron grids, and, the unique SOM neuron model that do not present these abrupt and variable changes in the *Ēq* value is the *SOM*4 neuron grid. Hence, the third novelty detected by the *SOM*4 neuron grid

Therefore, the obtained results prove the effectiveness of the proposed methodology to perform the PQ monitoring and for detecting the occurrence of electric power disturbances. In fact, the proposed diagnosis methodology also has the advantage of considering additional disturbances for being modeled through additional SOM's neuron grids models. Definitely, this proposed structure is suitable to be implemented in embedded systems such as field-programmable gate arrays

Moreover, aiming to summarize the obtained results in **Table 2** are shown the resulting classification ratios that were achieved during the training and validation of each SOM neuron grid model; thus, three test cases are evaluated. As in **Table 2** is

Regarding other novelty detection methods, one-class support vector machine (OC-SVM) remains as the most classical approach that has been implemented under condition monitoring strategies to perform novelty detections. In this sense, the consideration of OC-SVM with classical feature reduction techniques, such as PCA (Principal Component Analysis) and LDA (Linear Discriminant Analysis),

**Test case** *Known class* **(%)** *Unknown class* **(%)** Normal (100%) Sag (100%) Normal (100%), Sag (100%) Swell (>98%) Normal (100%), Sag (100%), Swell (100%) Fluctuation (>97%)

*Resulting diagnosis and novelty detection ratios for each SOM neuron grid model.*

observed, the test case 1 consists on evaluating the available data related to the Normal and Sag conditions through the first *SOM*1 model and, in the case of the Normal (evaluated as the known condition) condition is achieved 100% of the global classification ratio; whereas, in the case of Sag (evaluated as the unknown condition) or novelty detection 100% of the global classification is also obtained. Subsequently, for the second test set, the conditions considered as known are the Normal and Sag conditions and, the occurrence of Swell is evaluated as the known condition; in the third test case, the known conditions are Normal, Sag and Swell; while the Fluctuation represents the unknown condition. Therefore, it should be highlighted that all the samples that were evaluated have been correctly identified and diagnosed to its corresponding class (assigned condition) with a membership

*DOI: http://dx.doi.org/10.5772/intechopen.96145*

belongs to the appearance of sag.

depicts the occurrence of fluctuations.

(FPGA) for online monitoring purposes.

probability higher than 97% for all cases.

#### *Novelty Detection Methodology Based on Self-Organizing Maps for Power Quality Monitoring DOI: http://dx.doi.org/10.5772/intechopen.96145*

of different events detected as novelties. In this regard, when the first novelty detection occurs, the *Ēq* values of the following SOM's neuron models have to be analyzed. That is, while a novelty detection is performed by the *SOM*1 neuron grid, for these specified number of samples, in the second SOM neuron grid, *SOM*2, is achieved the lowest *Ēq* value; whereas, the rest of SOM's neuron models present an abrupt increase of the *Ēq* value. Consequently, the first novelty detection of *SOM*<sup>1</sup> belongs to the appearance of sag.

Subsequently, when the second novelty detection appears over the *Ēq* value of *SOM*1 (**Figure 9a**), in the *SOM*3 is achieved the lowest *Ēq* value; while the rest of SOM's neuron models the abrupt increasing and change of the *Ēq* value is described; thus, the occurrence of swell produces the second novelty detection. Finally, the third novelty detection that occurs in the *Ēq* value of *SOM*1 trend to produce abrupt and variable changes of the *Ēq* value, indeed, this variable behavior also appears over the *Ēq* values of *SOM*2 and *SOM*3 neuron grids, and, the unique SOM neuron model that do not present these abrupt and variable changes in the *Ēq* value is the *SOM*4 neuron grid. Hence, the third novelty detected by the *SOM*4 neuron grid depicts the occurrence of fluctuations.

Therefore, the obtained results prove the effectiveness of the proposed methodology to perform the PQ monitoring and for detecting the occurrence of electric power disturbances. In fact, the proposed diagnosis methodology also has the advantage of considering additional disturbances for being modeled through additional SOM's neuron grids models. Definitely, this proposed structure is suitable to be implemented in embedded systems such as field-programmable gate arrays (FPGA) for online monitoring purposes.

Moreover, aiming to summarize the obtained results in **Table 2** are shown the resulting classification ratios that were achieved during the training and validation of each SOM neuron grid model; thus, three test cases are evaluated. As in **Table 2** is observed, the test case 1 consists on evaluating the available data related to the Normal and Sag conditions through the first *SOM*1 model and, in the case of the Normal (evaluated as the known condition) condition is achieved 100% of the global classification ratio; whereas, in the case of Sag (evaluated as the unknown condition) or novelty detection 100% of the global classification is also obtained. Subsequently, for the second test set, the conditions considered as known are the Normal and Sag conditions and, the occurrence of Swell is evaluated as the known condition; in the third test case, the known conditions are Normal, Sag and Swell; while the Fluctuation represents the unknown condition. Therefore, it should be highlighted that all the samples that were evaluated have been correctly identified and diagnosed to its corresponding class (assigned condition) with a membership probability higher than 97% for all cases.

Regarding other novelty detection methods, one-class support vector machine (OC-SVM) remains as the most classical approach that has been implemented under condition monitoring strategies to perform novelty detections. In this sense, the consideration of OC-SVM with classical feature reduction techniques, such as PCA (Principal Component Analysis) and LDA (Linear Discriminant Analysis),


**Table 2.**

*Resulting diagnosis and novelty detection ratios for each SOM neuron grid model.*

*Artificial Intelligence - Latest Advances, New Paradigms and Novel Applications*

The *Ēq* values achieved by each SOM neuron model are individually shown from **Figure 9a-d**, for *SOM*1, *SOM*2, *SOM*3 and *SOM*4, respectively. Therefore, by analyzing the *Ēq* value of **Figure 9a**, from *SOM*1, it is possible to notice the occurrence

*Mean quantization error achieved by each SOM neuron model during the evaluation of an electric power signal that includes power disturbance such as sag, swell, and fluctuations. (a) SOM1, (b) SOM2, (c) SOM3 and (d) SOM4.*

**32**

**Figure 9.**

are used to evaluate the available data to detect novelties during the PQ monitoring. Thus, by evaluating the available data by means of such approach a global classification ratio about 62% is approximately obtained for each evaluated condition. Therefore, it must be mentioned that the consideration SOM neuron grids as a part of a novelty detection structure leads to obtain advantageous results over classical approaches such as OC-SVM.
