VICARED: A Neural Network Based System for the Detection of Electrical Disturbances in Real Time
Abstract
The study of the quality of electric power lines is usually known as Power Quality. Power quality problems are increasingly due to a proliferation of equipment that is sensitive and polluting at the same time. The detection and classification of the different disturbances which cause power quality problems is a difficult task which requires a high level of engineering knowledge. Thus, neural networks are usually a good choice for the detection and classification of these disturbances. This paper describes a powerful system for detection of electrical disturbances by means of neural networks.
Full text
VICARED: A Neural Network Based System for the Detection of Electrical Disturbances in Real Time Iñigo Monedero1, Carlos León1, Jorge Ropero1, José Manuel Elena1, and Juan C. Montaño2 1 Departamento de Tecnología Electrónica, University of Seville, Spain {imonedero, cleon, jmelena}@us.es, [email protected] 2 Consejo Superior de Investigaciones Científicas, Seville, Spain [email protected] Abstract. The study of the quality of electric power lines is usually known as Power Quality. Power quality problems are increasingly due to a proliferation of equipment that is sensitive and polluting at the same time. The detection and classification of the different disturbances which cause power quality problems is a difficult task which requires a high level of engineering knowledge. Thus, neural networks are usually a good choice for the detection and classification of these disturbances. This paper describes a powerful system for detection of electrical disturbances by means of neural networks. 1 Introduction Power Quality (PQ) has been a research area of exponential increasing interest particularly in the last two decades [1]. It is defined as the study of the quality of electric power lines and has recently sharpened because of the increased number of loads sensitive to power quality and become tougher as the loads themselves become important causes of the degradation of quality [2].Thus nowadays, customers demand higher levels of PQ to ensure the proper and continued operation of such sensitive equipment. The poor quality of electrical power is usually attributed to power line disturbances such as waveshape faults, overvoltages, capacitor switching transients, harmonic distortion and impulse transients. Often the greatest damage from these disturbances lies in the loss of credibility of the power utilities on the side of their customers. The classification and identification of each one of the disturbances is usually carried out from standards and recommendations depending on where the utilities operate (IEEE in the United States, UNE in Spain, etc). Our own classification, based on these standards and recommendations, is given in Table 1.
Table 1. Types of disturbances Range Type of disturbance Subtype of disturbance Time Min. value Max. value Slight deviation 49.5 Hz. 50.5 Hz Frequency Severe deviation 10 s 47 Hz. 52 Hz. Average voltage 10 min 0.85 Un 1.1 Un Flicker - - 7 % Short 10 ms-1s Long 1s-1min Sag Long-time disturbance > 1min 0.01 U 0.9 U Short < 3 min Undervoltage Long > 3 min 0.01 U Temporary Short 10 ms – 1s Temporary Long 1s - 1min Temporary Longtime disturbance > 1 min 1.5 KV Voltage Swell Over-voltage < 10 ms 1.1 U 6 KV Harmonics - THD > 8 % Harmonics and other information signals Information signals - Included in the other disturbances 2 Artificial Intelligence on Power Quality New and powerful tools for the analysis and operation of power systems, as well as for PQ diagnosis are currently available. The new tools of interest are those of artificial intelligence (AI) [1], including expert systems, fuzzy logic and artificial neural networks (ANNs) [3]. For the case of electrical disturbances, all the factors that make ANNs a powerful tool are present. We get information which is massive – electrical signals are constantly received – and distortioned – there is an important noise component. In addition, the signal must be pre-processed to get a feature extraction by means of wavelet transform and other mathematical techniques which provide a unique characteristic which can represent every single PQ disturbance. It is carried out by means of a different resolutions analysis using the technique called multi-resolution signal decomposition or multi-resolution analysis. In multi-resolution analysis the signal is decomposed in a set of approximation wavelet coefficients and another set of detail wavelet coefficients. The detail coefficients of the lowest levels store the information from the fastest changes of the signal while the highest ones store the low-frequency information. Thus, with the help of these new mathematic tools the detection of the electrical disturbances has tended to be easy but their classification is still a difficult task in which ANNs play an important role [4-11].
3 Neural Network Real-Time Classifier We have developed a prototype of a real-time system for the detection and classification of electrical disturbances. The system is a detector of power line disturbances whose detection kernel is based on artificial intelligence techniques (in particular, a first version based on ANNs). The system consists of a PC application which includes the AI kernel and an acquisition card. A. Environment The environment of the application shows the information which is acquired and registered by the system. It consists of several windows where the acquired signal is represented by means of the VRMS of the three signal phases, and a neutral. Other windows show the last detected disturbance, a bar diagram that reports the number and the type of detected disturbances and a window with a historic which registers the date and time of the different events. We also have more options like a bar diagram reporting a temporal graphic view of the disturbances, a more detailed representation of the last detected disturbance or a triphasic diagram and representation of the signal. The acquisition card obtains 640 samples every 100 milliseconds. These samples are shown on the chart and processed by the AI kernel. When one or more disturbances are detected in the 100 milliseconds, the corresponding registers are updated, changing the corresponding windows for the last disturbance, the bar diagrams and the historic. B. Kernel In order to train the ANN, we have to generate the maximum possible number of signals representing patterns of electrical signals which include all the abovementioned disturbances, so we have designed a signal generator with this aim. In fact, we have generated over 27,000 signals including one-disturbance signals and twodisturbance signals. The detection system uses Wavelet transform of the acquired signal for the generation of signal features [4-10]. The aim of feature extraction by Wavelet transforms is to provide a unique characteristic which can represent every single PQ disturbance. The input vectors of the ANN are generated carrying out a number of operations on the Wavelet transform. It is known that the Wavelet transform detects better the lowfrequency components in the last detail levels and fast variations in first levels. Thus, our solution is based on the concept that the amplitude disturbances would be better detected in the first levels of Wavelet transform while the frequency disturbances would be better detected in the last levels. Therefore, we decided to use parallel neural networks as it is shown on Figure 1. The signal is pre-processed using the wavelet transform as it has been said above. The result of this are the inputs for all the ANNs. First of all, these inputs are given to the disturbance detector ANN, which output is either 0 - no disturbance - or 1 - disturbance -. If there is a disturbance, the ANN inputs are given to another three
Disturbance ANN Frequency ANN Voltage ANN Harmonics ANN Pre-processing Signal ANN Inputs Disturbance No disturbance Voltage disturbance Frequency disturbance Harmonics disturbance Fig. 1. Block diagram ANNs, each one specialized in the detection of a different type of disturbance. In the same way, the outputs for these ANNs are 0 or 1, depending on the fact that there is or not that kind of disturbance. These types are, according to Figure 1 above, voltage disturbances – sags, swells, undervoltages and overvoltages -, frequency disturbances – slight and severe deviations – and harmonics disturbances. The existence of a disturbance detector ANN previous to the other ANNs is due to the greater importance of the detection of disturbances compared with the classification of them. Besides, the disturbance ANN acts as a filter for the next ANNs. Some of the possible mistakes committed by the three parallel specific neural networks are eliminated by the disturbance detector ANN. The reason for using several ANNs and not only one is that a unique ANN with seven outputs – one for every type of disturbance – needs too many neurons to work properly and, consequently, more memory resources. C. Neural Network building To be able to train each neural network, firstly we must decide the convenient learning method. There are basically two learning methods mainly used, supervised learning and self-organised learning. The first one gets input data and associates them with a determined output while the second one makes its own input data classification. For our case, we want a different output according to the existence or not of a disturbance or its type, depending on the chosen neural network. That is the reason why a supervised learning works better. Besides, we have to choose a particular type of supervised learning. The best option is the backpropagation (BP) learning method using the multilayer perceptron due to its better rate between simplicity and efficiency. Important features of the neural networks are the study of the necessary input values, the neural network structures, transfer functions and learning algorithms. In particular, we have used the following values as input vector of the amplitude neural network: the V RMS of the signal, the integral, the maximum and the V RMS of the
detail wavelet coefficients of 1, 2 and 3 level. In order to get a faster convergence and better results these data were scaled so that minimum is -1 and maximum is 1. The chosen kind of ANN is a multilayer perceptron with 3 hidden layers with different number of neurons, depending on the ANN and its number of outputs. The output functions of the layers have been chosen with a logarithmic sigmoid transfer function for all the layers. All the inputs, structures, functions and training algorithms have been reached after testing with different ones. The best results until now have been obtained for neural networks shown in Table 2. Table 2. Neural Network structure Neural Network type Number of hidden neurons Number of outputs Transfer functions Training algorithm Disturbance 20, 14 & 8 1 logarithmic sigmoid Levenberg-Marquardt Voltage 12, 9 & 6 4 logarithmic sigmoid Levenberg-Marquardt Frequency 16, 12 & 7 2 logarithmic sigmoid Levenberg-Marquardt Harmonics 20, 14 & 8 1 logarithmic sigmoid Levenberg-Marquardt D. Programming Tasks For programming tasks we have used the MATLAB tool to test the different possibilities in the pre-processing of the signal and in the structure of the kernel. We used this tool due to the powerful toolboxes with specialized functions contained in it utilizing the signal and the wavelet toolboxes for the pre-processing task and the neural networks toolbox for the design of the kernel [11]. Once we carried out the test and found a good code for the pre-processing and the AI kernel, we programmed them in C++ language in order to optimize the execution time. The tests carried out in execution time about the pre-processing time are around the 0.1 milliseconds for the wavelet transform. For the design and programming of the tool environment the selected tool has been Borland C++ Builder 5 which is a powerful tool for the development of visual applications as well as a robust C++ compiler. 4 Results Before embedding the kernel in the classifier tool we selected the best training method for the configuration of ANNs. Thus, for the training of the networks we used 80% of the generated signals as training patterns and 20% as test patterns. On the other hand, thresholds were defined in the ANN outputs in order to distinguish if a particular output value may be considered as a disturbance or not. The defined thresholds were 0.3 and 0.7 and thus, output values above 0.7 were considered as disturbances and below 0.3 ideal signals. Values found between 0.3 and 0.7 were taken as errors in the detection of the input pattern. The distance between the output network and the desired value was defined as a safety coefficient in the detection.
We are going to consider two different kinds of results: the general ones, it is to say, the percentage of success in every ANN – see Table 3 - , and the particular ones, which are more intuitive and consider some particular cases of failure in one of the neural networks. In addition, we have the results for only one disturbance signals and the results for two-disturbance signals which include the one-disturbance signals too. Table 3. One-disturbance signal results Type of ANN Number of outputs Test signals Number of errors Correctly detected % Disturbance 1 334 1 99.70 Voltage 4 334 20 94.01 Harmonics 1 334 1 99.70 Frequency 2 334 5 98.50 The first conclusion we obtain is that the higher number of ANN outputs we use, the higher number of errors we get. This is due to the higher complexity introduced by the necessity of fixing all the outputs at the same time. The second conclusion is related to the influence of these errors. As said above, the most important ANN is the one which detects disturbances – the existence or not of a disturbance is much more important than its type – so we have focused our efforts on its correct working. On the one hand, we must say that these percentages are referred to all the testing signals but we also have to bear in mind that some of the signals that fail are filtered by the disturbance ANN. On the other hand, we have to analyze what kind of signals tend to fail. To illustrate this point we have considered some of the signals that fail in the voltage ANN –table 4-. Table 4. Errors in analysis Real signal Detected event Ideal signal with a small 9% sag Sag 10.8% and 11 ms overvoltage Swell 99.7% and 35 ms undervoltage Sag 98% and 10 ms sag Undervoltage Ideal signal with a small 8% overvoltage Overvoltage 80% Swell and 9 ms Overvoltage 97% and 10 ms sag Ideal signal Analogously, results are similar for other signals and other ANNs. We observe that the signals which fail are near the limit of a disturbance, so it is not a big mistake to consider them as the neural network tells us. In table 5, we have the results obtained for two-disturbance signals, with approximately 27700 signals, about 5500 for the test and the rest for training. Training performance of the disturbance ANN is shown in Figure 5.
Table 5. Two-disturbance signal results Type of ANN Number of outputs Test signals Number of errors Correctly detected % Disturbance 1 5523 70 98.73 Voltage 4 5523 575 89.58 Harmonics 1 5523 57 98.97 Frequency 2 5523 278 94.97 Conclusions are similar to the ones we have achieved for one-disturbance signals. Results are slightly worse due to the greater complexity of the signals. 5 Conclusions What we have developed is a real-time system for the detection of electrical disturbances based on artificial neural networks. With this system we are capable of detecting the existence or not of disturbances and their type with a very high possibility of success and bearing in mind that most of the mistakes are committed with not very common signals in real life – those in the edge of a disturbance. The use of C++ language makes it possible to achieve the objective of making our system a real-time one. This may allow electrical companies to detect disturbances with time enough to find possible troubles and take steps to avoid further problems. Our current work is focused on carrying out tests with the system working in real time in the power line in order to improve our results with real signals. Another line of our investigation is the study of the utilization of different structured parallel networks of the same type using a voting system which will allow us to achieve better results. References [1] W.R. Anis Ibrahim and M.M. Morcos, “Artificial Intelligence and Advanced Mathematical Tools for Power Quality Applications: A Survey”, 668 IEEE Transactions on Power Delivery, Vol. 17, April 2002. [2] W.E. Kazibwe and H.M. Sendaula, “Expert Systems Targets. Power Quality Issues”, IEEE Comput. Appl. Power, vol. 5, pp 29-33, 1992. [3] G. Zheng, M.X. Shi, D. Liu, J. Yao, Z.M. Mao, “Power Quality Disturbance Classification Based on Rule-Based and Wavelet-Multi-Resolution Decomposition”, Proceedings of the First International Conference on Machine Learning and Cybernetics, Beijing, 4-5 November 2002. [4] A.Elmitwally, S. Farghal, M.Kandil, S. Abdelkader and M.Elkateb, “Proposed waveletneurofuzzy combined system for power quality violations detection and diagnosis”, IEEE Proc-Gener. Trans. Distrib. Vol. 148 No 1, pp. 15-20, January 2001. [5] P. K. Dash, S. K. Panda, A. C. Liew, B. Mishra, and R. K. Jena, “New approach to monitoring electric power quality,” Elect. Power Syst. Res. vol. 46, no. 1, pp. 11–20, 1998.
[6] A.K. Ghosh and D. L. Lubkeman, “The classification of power system disturbance waveforms using a neural network approach”, IEEE Trans. Power Delivery. Vol. 10. pp. 671-683, July 1990. [7] J.V. Wijayakulasooriya, G.A. Putrus and P.D. Minns, “Electric power quality disturbance classification using self-adapting artificial neural network”, IEEE Proc-Gener. Trans. Distrib. Vol. 149 No. 1, pp. 98-101, January 2002. [8] R. Daniels, “Power quality monitoring using neural networks,” in Proc.1st Int. Forum Applications Neural Networks Power Syst., 1991, pp. 195–197. [9] S. Santoso, J. P. Edward, W. M. Grady, and A. C. Parsons, “Power quality disturbance waveform recognition using wavelet-based neural classifier - Part 1: Theoretical foundation,” IEEE Trans. Power Delivery, vol. 15, pp. 222–228, Feb. 2000. [10] S. Santoso, J. P. Edward, W. M. Grady, and A. C. Parsons, “Power quality disturbance waveform recognition using wavelet-based neural classifier—Part 2: Application,” IEEE Trans. Power Delivery, vol. 15, pp. 229–235, Feb. 2000. [11] M. Mallini and B. Perunicic, “Neural network based power quality analysis using MATLAB,” in Proc. Large Eng. Syst. Conf. Power Eng., Halifax, NS, Canada, 1998, pp. 177–183.