Open access peer-reviewed chapter

LabVIEW as Power Disturbances Classification Tools

Written By

Ahmad Farid Abidin and Mohd Abdul Talib Mat Yusoh

Submitted: 28 September 2020 Reviewed: 18 January 2021 Published: 13 March 2021

DOI: 10.5772/intechopen.96079

From the Edited Volume

LabVIEW - A Flexible Environment for Modeling and Daily Laboratory Use

Edited by Riccardo de Asmundis

Chapter metrics overview

482 Chapter Downloads

View Full Metrics

Abstract

Power disturbances monitoring is one of the important aspects on dealing power quality issue in electrical system. The aims of conducting monitoring process are to identify the real culprit which contribute to the Power Quality (PQ) problem. One of the vital steps during monitoring process is the classifying various type of power disturbance. This classification process is very important to give a right direction towards proposing the correct mitigation technique. In order to produce reliable classification technique, the devices which has a flexibility on accommodating the software and hardware part need to be deployed. The software is need for algorithm development such as signal processing, Artificial Intelligent (AI) as well as statistical analysis. On the hardware part, the device’s ability to acquire the electrical parameter within the electrical system operation is very important. The data acquisition based on the voltage and current is essential to be feed in the classification algorithm in software side. On the other hand, the interfacing devices and data acquisition module need to be developed at the hardware side, LabVIEW manage to accommodate both software and hardware need and further development of the LabVIEW for this purpose will be elaborated in this chapter.

Keywords

  • LabVIEW
  • power quality (PQ)

1. Introduction

Power quality is a term that commonly used to represent the electrical supply to the consumer without any disruption or blackout. Technically, power quality is defined as the availability of supply voltage to be in the sinusoidal form within the permissible magnitude and frequency without misoperating the electrical equipment [1, 2]. The power quality issue becoming more important since 1980’s due to the dominant use of electronic equipment among the electrical consumers. The electronic equipment is sensitive to any deviation in term of wave shape, magnitude, and frequency of supply voltage as their performance could be affected i.e. misoperation, burn, or shorten lifespan. Nowadays, most of the industries and commercial electrical consumer used the electronic equipment in their daily operation. Hence, the issues of power quality are very prevalent in business environment as the industry and commercial electrical consumer complained that they experienced power quality problem regularly.

Once the electric supply has a low power quality, all the undesirable situation would be experienced by electrical user. In order to have a good power quality, the electrical supply need to have a voltage with the attribute of pure sinusoidal(5% deviation), the permissible magnitude (nominal voltage ±10%) and 50 Hz frequency with permissible range(±1%) [3, 4]. Based those three attributes, any deviation from the given permissible limit is known as power disturbances. The power disturbances consist of different type of disturbances namely, voltages sags, swell, interruptions, transient over voltages, harmonics, and voltage imbalance. The definitions of each type power disturbances can be described as follow [5]:

Referring to Table 1, the type of disturbances has its own unique characteristics. Therefore, there are a paramount important to classify the type disturbance at initial stage of the PQ solution step. The classification of power disturbance is occasionally incorporating with signal processing technique which functioning as feature extraction tools. The popular signal processing technique that often used in extracting the feature are Short time Fourier Transform (STFT), Wavelet Transform (WT), S-Transform (ST), Hilbert Transform (HT), Hilbert Huang Transform (HHT), and Ensemble Empirical mode Decomposition (EEMD) [6, 7, 8, 9, 10, 11]. STFT had been widely used as a tool in recognizing disturbances. Nevertheless, STFT has a limitation where it’s only has a fixed windowing technique which is not fit for non-stationary signal [12]. The improved WT has been introduced to enable the nonstationary signal processing approach in continuous windows size by using multiresolution analysis (MRA) [13]. However, this technique suffers from high losses of information during MRA process [14]. On top of that, the WT has disadvantage where it fails to extract time-frequency information.

Type of power disturbanceCharacteristic
Voltage sagTemporary voltage reduction in magnitude between 10% and 90% of nominal voltage in RMS for duration few cycles to one minute
InterruptionsInterruptions can be defined as 0.9 pu reductions in voltage magnitude for duration less than 1 minute.
SwellAn increase of RMS voltage from 0.1 pu to 0.8 pu for duration 0.5 cycle to 1 minute.
HarmonicsA Sinusoidal voltages or currents which having frequencies that are integer multiple of the frequency at which supply system is designed to operate.
Voltage imbalanceThe ratio of the negative sequence component to the positive sequence component which exceed 0.5%
InterruptionsThe disappearance of the supply voltage on one or more phases. It is usually qualified by an additional term indicating the duration of the interruption
Transient over voltagesSudden, non-power frequency change in the steady-state condition of voltage, current, or both,

Table 1.

The definition of each type power disturbance.

S-transform (ST) is proposed to carry out the solution which experienced by STFT and WT [15, 16]. ST is superior signal processing tool, where its technique is improved and outcome the limitation that exist in STFT and WT. ST manage to provide the distinct features which facilitate the decision making tools i.e., Artificial Intelligent (AI) to produce the accurate classification result accuracy. From the literature studies, there are several types of AI that frequently used as a decision making mechanism for classifying power disturbances, such as the Support Vector Machine (SVM), Levenberg Marquardt Neural Network (LMNN), Probability Neural Network (PNN), General Regression Neural Network (GRNN), and Radial Basic Function Neural Network (RBFNN) [17, 18, 19, 20, 21]. However, due to the less computational burden and resilience performance, the SVM has been chosen as a decision-making tool to be used in this work. Both ST and SVM are embedded to LabVIEW module by means of MATLAB algorithm to perform as power disturbance classifier.

LabVIEW is fast and widely used hardware integration which is a convenient instrument and PC constructed with data acquisition that has the ability to various interfacing type of real-time input signal [22]. Thus, it offers valuable analysis with variation choice of programming tools which is suitable to be implemented in real-time power quality monitoring system.

Advertisement

2. LabVIEW role

This research is conducted in LabVIEW software with the aid of National Instrument (NI) data acquisition module, where the entire data acquisition module, analysis module, features extraction process and data representation are developed and executed using this tools [23]. Along with enormous flexibility in interfacing and working with various type of real time input signal from different type of measurement tools, LabVIEW is offering a superiority analysis with a variety choice of programming tools that is appropriate to be implemented in real time power quality monitoring system. The flexibility of LabVIEW software also grants an excellent output result of the projects with lesser computational time. This develops system from this research basically is able to extract features and classify the PQ disturbance as illustrated in Figure 1.

Figure 1.

System architecture of PQ analysis using LabVIEW software.

Based on Figure 1, the developed system starts with the accumulating of PQ disturbances by using the PQ recorder i.e. Fluke 1750. Then those PQ disturbances are transferred to Chroma 61701 for storing and regenerating purpose. Then a National instruments Compaq Data Acquisition Chassis (NI cDAQ-9184) with NI 9225 card is used for high-speed acquisition of PQ disturbances. Further, the types of PQ disturbances are analyzed in LabVIEW interfacing since the voltage signals which acquired from the NI 9225 card. Further work of classification process which based on ST and SVM are developed at LabVIEW platform.

Advertisement

3. S-transform algorithm

Time-frequency transform as known as S-Transform was proposed by Stockwell and his co-workers in 1996, inheriting the advantage of Continuous Wavelet Transform (CWT). As a modification from CWT, ST can be derived by multiplying the phase factor to CWT equation as expressed in (1) where the algorithm of CWT can be defined as (2)

STτf=CWTτdei2πftdtE1
CWTτd=+xtψtτddtE2

By substituting (2) into (1), the final equation for the ST can be define as,

STτf=+xtψtτdei2πftdtE3

Unlike CWT, ST applies Gaussian window instead of mother wavelet which can be defined as,

ψtf=gtei2πftE4

Where g(t) can be expressed as,

gt=1σ2πet2/2σ2E5

The capability of the ST Gaussian window to varies according to the frequency of the signal is depend on the Gaussian window width, σ which can be define as,

σf=1fE6

Hence, the final equation of the ST can be expressed as,

STtf=f2π+xtetτ2f2/2ei2πftdtE7

3.1 S-transform embedded in LabVIEW

In order to apply signal processing analysis, the ST algorithm function is embedded in LabVIEW software via MathScript Node that act as a native compiler of m file which can blend textual and graphical approaches for signal processing and data analysis task. MathScript Node works in integrating m files into the LabVIEW graphical environment. Embedded process of m file ST algorithm into LabVIEW present a hybrid approach between text-based maths with graphical programming, which is enhanced the capability of previously developed algorithm to perform the analysis in a real time environment.

MathScript Node is an embedded LabVIEW feature that links the text based I/O variables with the inputs and outputs of LabVIEW. Figure 2 shows ST analysis implementation in LabVIEW via MathScript Node. In order to call the user-define function from m file into the LabVIEW MathScript Node, the path for the m file directory will be added to MathScript: Search Path in MathScript Window. The input variable on the right-hand side of the MathScript Node will be the voltage signal and the output on the left-hand side of the MathScript Node indicates all possible output of the transform voltage signal by ST.

Figure 2.

LabVIEW MathScript node with user define function called S-transform output features.

The output of transformed voltage signal using ST is in the form of N × M matrix called S-matrix. Each element within the 2-dimension array of the S-matrix is a complex value where the row represents the frequency while the column represents time. Hence, the output of the S-matrix could be visually analyzed by the representation of time-amplitude graph and frequency-amplitude graph, where the amplitude stands for the absolute value or vector of each complex element from the S-matrix. The example of one of the PQ disturbance is illustrated in Figure 3. Further analysis is performed on the S-matrix output in the form of time-amplitude and frequency-amplitude graph as shown in Figures 4 and 5 respectively in order to extract the feature of PQ disturbance.

Figure 3.

IEEE working group recorded waveform of PQ disturbance.

Figure 4.

Time-amplitude graph of S-matrix.

Figure 5.

Frequency-amplitude graph of S-matrix.

3.2 Support vector machine

SVM is basically a binary two-class classifier and has been extended to multiclass classifier. Multi error-correcting output code (ECOC) technique has been used to deal with multiclass classifications problems [24, 25, 26]. The SVM equation for function equation can be written as:

fy=k=1NaiKxxi+bE8

Where ai the weighting factor, x is the training samples and xi are the support vectors, b represent the bias and N is the training samples. In a classifier model, only the support vector takes effect in the classification. The kernel function helps nonlinear SVM maps the training sample from the input space into the higher dimensional feature space [27, 28]. Kernel function can be written as:

Kxxi=фx.фxiE9

Eq. (10) below is the example of nonlinear equation for radial basis function (RBF) SVM.

Kxxi=expxxi22σ2E10

Where σ is the kernel width. The only difference of nonlinear SVM function after the implementation of kernel function would be:

fy=k=1Naiфx.фxi+b=k=1NaiKxxi+bE11

There are two types of coding design in ECOC-SVM to construct the classifiers. Most common used of coding design are One-versus-One (OVO) and One-versus-All (OVA) [26]. ECOC is used to analyze and correct the error data when conducted in the channel. The ECOC algorithm capable to enhance the performance of fault tolerance of classification model by encoding different class. The classification problem can be overcome by associating a row of a k x m “coding matrix” with entries {−1, 0, +1). Each class is assigned a binary string of length m where m is the number of binary classification problems to be constructed. The comparison between classes “-1” and “+1” and ignoring classes with “0” is represented from matrix column. The “codeword” string which are "It+" and "It" respectively used to replace “-1” and “+1”. Then m binary function is learned, one for each bit position in these binary strings. The desired outputs of m binary functions are specified by the codeword of class i during the training of class i. Now, new values of X are classified to generate an m-bit strings by evaluating each of the n binary function. X is assigned to the class whose codeword is closest after comparing string to each of the k codeword [29].

LabVIEW is a tool to design a system of engineering application that capable to evaluate and control. LabVIEW is fast and widely used hardware integration which is convenient instrument and PC constructed with data acquisition that has the ability to interfacing various type of real time input signal [22].

This software holds the three components which are the front panel, block diagram, and icon and connector panel. The front panel on Figure 6 serves as the user interface. The block diagram contains the graphical source code that defines the functionality of the block diagram. Voltage continuous block diagram based on example finder is select to capture the real time waveform. It determines a block diagram on continuously acquire voltage measurement using a DAQmx device referring on Figure 7. During the generation of PQ disturbance, voltage measurement NI is already connected via Ethernet to the computer to capture the real-time voltage signal. In order to gain voltage waveform, the physical channel must be set to ai1. To gain accurate waveform the sample rate and number of samples are set to 12800 and 256, respectively.

Figure 6.

Front panel of LabVIEW software.

Figure 7.

Block diagram of high NTGV features extraction.

The block diagram of voltage continues to capture and extract all the features of voltage signal with the aid of ST algorithm. While loop is constructed to block diagram at acquired data in order to repeats the code within its sub diagram until a specific condition occurs. A While Loop always executes at least one time. The mathscript node is built to insert the ST algorithm. The input variable from the mathscript node is connect to DAQmx in order to read one or more waveforms from a task that contains one analog input channels which is voltage measurement NI. Output variable from the mathscript node is inserted into array block + feedback and then connect to the waveform graph. The feedback on the array block is utilized to store and display each cycle of data per windows on the waveform graph. This is a simple manner to capture the features of PQ problems according to real-time signal of measurement. It is also to gain S-matrix graph of frequency time represent time series signal. Inside this mathscript node, MATLAB coding of ST and statistical command are embedded.

Extracted features will be in statistical data waveform. All the wanted features extraction coding is assemble inside the mathscript node which are mean, median, standard deviation, variance, and others. This statistical method suitable to be used when lot of data is picked for training process and it is profitable to produce an effectiveness in SVM method of classifying. This reason statistical method is choosing because the data collected is in a set of possible value of the measured quantity.

All the extracted features of the PQ disturbance signal from ST are introduce in the form of the frequency-amplitude graph. The extracted features in form of statistical data are perform based on mean, median, standard variation, variance, kurtosis and skewness.

Mean is the average value of a signal. The value of mean can be gain by adding all amplitude of signal and divide by N, sample. Mathematical equation as below (12).

μ=1Ni=1N1xiE12

Median is a middle number of arrangements of amplitude in numerical order and the mathematical equation state below:

m=L+N2FfCE13

Standard deviation (STD) is a range of how far the signal varies from the mean and average deviation. This variance value can be gain by the average of the squaring different each of the deviations. The variance represents the power of this fluctuation. In equation form, the standard deviation (14) and variance (15) is calculated:

s=1N1i=0N1x1μ2E14
s2=1N1i=0N1x1μ2E15

Skewness is a measurement of data has outliers which means has symmetry. Identify the signal whether the symmetric to the left or to right of the center point. The kurtosis data can be identify based on the normal distribution of right tailed or left tailed. Below is the mathematical equation:

Skewness=1Ni=1Nxix¯31Ni=1Nxix¯232E16
Kurtosis=1Ni=1Nxix¯41Ni=1Nxix¯22E17
Advertisement

4. Classification method

In order to complete this project, the construction of last part is handled in MATLAB software. The coding of classification PQ disturbance is created, and result is recorded. Simulation of SVM method is done to gain the accuracy of classification.

SVM classifier start with load a big number of PQ disturbance sample, i.e. 100. Which randomly consist of 9 types of statistical pattern. All data is randomize using for loop. After record the whole randomized data, 2 stages of SVM algorithm will be perform. Step first for SVM is performing training samples which based on flowchart been initialized at 50%. In order to produce good generalization performance function of Gaussian or polynomial can be chosen in training model. Then fitness function will be calculated referring on the training data Therefore, the remaining data sample are used as testing process. The training result will be model for testing process. Then the accuracy is evaluated whether reach satisfaction of this project or far from reaching desired accuracy.

Target value will be compared with testing. Should be the classification success approaching 100% to reach high accuracy level. If the classification evaluate is effective enough, thus process will be start again with randomized data.

Figure 8 above is created at editor window. The training data percentage is select for 50%. In randomize data code loop for is used. For loop function to executing a specific statement repeatedly until some false condition is met. In this application, it’s for the purpose of different type of PQ disturbance. The Data is the original statistical feature of each sample. Then all the statistical data is identified which class each. It is arranged into their type of disturbance and statistical features is assemble randomly.

Figure 8.

Coding of randomized data of classification using SVM in MATLAB software.

Figure 9 above is coding of training classification of PQ disturbances. X interval is the input of predictor data which each column will be observe while Y interval is target value. At line 40, there will be non-linear type of default value for the two-class learning that separate the data with the hyperplane. It is important to choose type of kernel function in order to accomplish success training. RBF is used for one type training while gaussian or polynomial can be used for two type class or multiple. Polynomial is chosen due to disorder symmetry. The ‘class names’ to distinguishes the different type data which represent PQ disturbances.

Figure 9.

Training coding of SVM in MATLAB software.

Advertisement

5. Conclusion

Further use of this coding will produce the classification result from the use of ST and SVM in the LabVIEW tools. This classification is significant, particularly in sending the electricity-based problem which originated from PQ disturbances. The LabVIEW function which assemble the ST, SVM and interfacing system in one platform could be a beneficial for electrical engineer conduct the problem shooting step. The capability of LabVIEW to integrate with different type algorithm prove to be the strength to materialize its function as classification tools. The introduction of this classification technique will minimize the time taken to pinpoint problem related to PQ disturbance. The more advance feature of this tools could be extended towards cloud computing function, Internet of Thing (IOT) application as well as wireless classification process.

Advertisement

Acknowledgments

We are grateful to the editors and anonymous reviewers for their constructive comments and valuable suggestions that helped to improve the quality of this manuscript significantly.

Advertisement

Appendices and nomenclature

AI

artificial intelligent

CWT

continuous wavelet transform

ECOC

error correction output code

EEMD

empirical embedded mode decomposition

GRNN

general regression neural network

HHT

Hilbert Huang transform

HT

Hilbert Huang

IOT

Internet of Thing

LMNN

Levenberg Marquardt neural network

NI

national instruments

OVO

one versus one

OVA

one versus all

PNN

probability neural network

PQ

power quality

MRA

multiresolution analysis

RMS

root-mean-square

RBF

radial basis function

RBFNN

radial basic function neural network

ST

S-transform

STD

standard deviation

STFT

short time fast transform

SVM

support vector machine

THD

total harmonic distortion

WT

wavelet transform

References

  1. 1. Mazlumi K. Power Quality Monitoring. In: Power Quality Monitoring, Analysis and Enhancement. Rijeka: InTech, p. Ch. 1.
  2. 2. Zobaa AF, Aleem SHEA, Balci ME. Introductory Chapter: Power System Harmonics—Analysis, Effects, and Mitigation Solutions for Power Quality Improvement. In: Zobaa A, Aleem SHEA, Balci ME (eds) Power System Harmonics - Analysis, Effects and Mitigation Solutions for Power Quality Improvement. Rijeka: InTech, p. Ch. 1.
  3. 3. Polycarpou A. Power Quality and Voltage Sag Indices in Electrical Power Systems. In: Rey GR, Muneta LM (eds) Electrical Generation and Distribution Systems and Power Quality Disturbances. Rijeka: InTech, p. Ch. 6.
  4. 4. Santos SR dos, Peres R, Cano WFR, et al. Simulation and Optimization of Electrical Insulation in Power Quality Monitoring Sensors Applied in the Medium-Voltage. In: Sánchez RA (ed) Simulation and Modelling of Electrical Insulation Weaknesses in Electrical Equipment. Rijeka: InTech, p. Ch. 7.
  5. 5. Power I, Society E. IEEE Guide for Application of Power Electronics for Power Quality Improvement on Distribution Systems Rated 1 kV Through 38 kV. 2012. Epub ahead of print 2012. DOI: 10.1109/IEEESTD.2012.6190701.
  6. 6. A. Rodriguez, J.E. Ruiz, J. Aguado, J.J. Lopez, F.I. Martin FM. Classification of Power Quality Disturbances using S-transform and Artificial Neural Networks. 2011 IEEE Int Conf Power Eng Energy Electr Drives 2011; 1: 608–615.
  7. 7. Science C, Rourkela T. Feature Detection using Manish Bansal Feature Detection using S-Transform.
  8. 8. Ramesh Babu N, Jagan Mohan B. Fault classification in power systems using EMD and SVM. Ain Shams Eng J. Epub ahead of print 2015. DOI: 10.1016/j.asej.2015.08.005.
  9. 9. Jayasree T, Devaraj D, Sukanesh R. Power quality disturbance classification using Hilbert transform and RBF networks. Neurocomputing 2010; 73: 1451–1456.
  10. 10. De Yong D, Bhowmik S, Magnago F. An effective power quality classifier using wavelet transform and support vector machines. Expert Syst Appl 2015; 42: 6075–6081.
  11. 11. Jurado F, Saenz JR. Comparison between discrete STFT and wavelets for the analysis of power quality events. Electr Power Syst Res 2002; 62: 183–190.
  12. 12. Fais M, Ghani A, Abidin AF, et al. Real Time Detection and Classification of Single and Multiple Power Quality Disturbance Based on Embedded S- Transform Algorithm in Labview. In: Proceedings of the 2017International Symposium on Industrial Engineering and Operations Management (IEOM). 2017, pp. 280–289.
  13. 13. Brazil USP, Kagan N, Ordoñez G. Automatic Power Quality Disturbance Classification Using Wavelet,. 2009; 8–11.
  14. 14. Al-Aboosi YY, Sha’ameri AZ. Improved signal de-noising in underwater acoustic noise using S-transform: A performance evaluation and comparison with the wavelet transform. J Ocean Eng Sci 2017; 000: 1–14.
  15. 15. Mahela OP, Shaik AG, Gupta N. A critical review of detection and classification of power quality events. Renew Sustain Energy Rev 2015; 41: 495–505.
  16. 16. He Z, Ji Y. S-Transform Based Novel Indices for Power Quality Disturbances. In: Zobaa A, Canteli MM, Bansal R (eds) Power Quality Monitoring, Analysis and Enhancement. Rijeka: InTech, p. Ch. 10.
  17. 17. Lin WM, Wu CH, Lin CH, et al. Detection and classification of multiple power-quality disturbances with wavelet multiclass SVM. IEEE Trans Power Deliv 2008; 23: 2575–2582.
  18. 18. Chen ZM, Li MS, Ji TY, et al. Detection and Classification of Power Quality Disturbances Using Probabilistic Neural Network. 2016Int Jt Conf Neural Networks 2016; 1277–1282.
  19. 19. Ni YQ, Li M. Wind pressure data reconstruction using neural network techniques: A comparison between BPNN and GRNN. Measurement 2016; 88: 468–476.
  20. 20. Fung CCFCC, Iyer V, Brown W, et al. Comparing the Performance of Different Neural Networks Architectures for the Prediction of Mineral Prospectivity. 2005 Int Conf Mach Learn Cybern 2005; 1: 18–21.
  21. 21. Schwenker F, Kestler HA, Palm G. Three learning phases for radial-basis-function networks. Neural Networks 2001; 14: 439–458.
  22. 22. Pahuja P, Chandra P, Scholar MT, et al. Power Quality Monitoring using LabView.
  23. 23. El-Leathey L-A. Energy Management System Designed for the Interconnected or Islanded Operation of a Microgrid Using LabVIEW Software. In: Nayeripour M, Waffenschmidt E, Kheshti M (eds) Smart Microgrids. Rijeka: InTech, p. Ch. 3.
  24. 24. Übeyli ED. Doppler ultrasound signals analysis using multiclass support vector machines with error correcting output codes. Expert Syst Appl 2007; 33: 725–733.
  25. 25. Übeyli ED. Multiclass support vector machines for diagnosis of erythemato-squamous diseases. Expert Syst Appl 2008; 35: 1733–1740.
  26. 26. Bosnic JA, Petrovic G, Putnik A, et al. Power Quality Disturbance Classification Based on Wavelet Transform and Support Vector Machine. Proc 11th Int Conf Smolenice, Slovakia 2017; 9–13.
  27. 27. Zhu H, Liu X, Lu R, et al. Efficient and Privacy-Preserving Online Medical Prediagnosis Framework Using Nonlinear SVM. IEEE J Biomed Heal Informatics 2017; 21: 838–850.
  28. 28. Li J, Teng Z, Tang Q, et al. Detection and Classification of Power Quality Disturbances Using Curvelet Transform and Support Vector Machines. Int Conf Inf Commun Embed Syst (ICICES2016) 2016; 1–11.
  29. 29. Xiao-feng L, Xue-ying Z, Ji-kang D. Speech Recognition Based on Support Vector Machine and Error Correcting Output Codes. 2010 First Int Conf Pervasive Comput Signal Process Appl 2010; 336–339.

Written By

Ahmad Farid Abidin and Mohd Abdul Talib Mat Yusoh

Submitted: 28 September 2020 Reviewed: 18 January 2021 Published: 13 March 2021