Development of a wavelet-based algorithm to detect and determine ...
Development of a wavelet-based algorithm to detect and determine ...
Development of a wavelet-based algorithm to detect and determine ...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
<strong>Development</strong> <strong>of</strong> a <strong>wavelet</strong>-<strong>based</strong> <strong>algorithm</strong> <strong>to</strong> <strong>detect</strong> <strong>and</strong><br />
<strong>determine</strong> certain disturbances in power networks<br />
D I P L O M A T H E S I S<br />
Institute for<br />
Electrical Power Systems <strong>and</strong> High Voltage Engineering<br />
Department <strong>of</strong> Electrical Power Systems<br />
Graz University <strong>of</strong> Technology<br />
Head <strong>of</strong> department: O. Univ.-Pr<strong>of</strong>. Dipl. Ing. Dr.techn. Lothar Fickert<br />
First reviewer: O. Univ.-Pr<strong>of</strong>. Dipl. Ing. Dr. techn. Lothar Fickert<br />
Second reviewer: Dipl. Ing. Robert Schmaranz<br />
Presented by<br />
Stefan Böhler<br />
Graz, Oc<strong>to</strong>ber 2003
Mein Dank gilt Herrn Dipl. Ing. Robert Schmaranz für die exzellente Betreuung bei<br />
der Erstellung. Weiters gilt mein Dank Herrn Univ.-Pr<strong>of</strong>. Dipl. Ing. Dr. techn. Lothar<br />
Fickert für die interessante Aufgabenstellung, sowie für die Begutachtung dieser Ar-<br />
beit. Sie waren immer bereit, mir mit ihrem Wissen weiterzuhelfen und haben nie die<br />
Geduld verloren, auch wenn die gesamte Arbeit länger gedauert hat, als vorgesehen.<br />
Widmen möchte ich diese Arbeit meinen Eltern Irmgard und Armin, die mir den nötigen Rück-<br />
halt für das Gelingen dieser Arbeit gaben.
Eidesstattliche Versicherung<br />
Ich versichere an Eides statt durch meine Unterschrift, dass ich die vorstehende Ar-<br />
beit selbständig und ohne fremde Hilfe angefertigt und alle Stellen, die ich wörtlich<br />
oder annähernd wörtlich aus Veröffentlichungen entnommen habe, als solche ken-<br />
ntlich gemacht habe, mich auch keiner <strong>and</strong>eren als der angegebenen Literatur oder<br />
sonstiger Hilfsmittel bedient habe. Die Arbeit hat in dieser oder ähnlicher Form noch<br />
keiner <strong>and</strong>eren Prüfungsbehörde vorgelegen.<br />
Schwarzach, den 29. Ok<strong>to</strong>ber 2003<br />
Stefan Böhler
Contents<br />
Eidesstattliche Erklärung ii<br />
1 Introduction 1<br />
2 Power Quality Recorder Simeas-R 3<br />
2.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3<br />
2.2 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4<br />
2.2.1 Fault recorder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4<br />
2.2.2 Power data recorder . . . . . . . . . . . . . . . . . . . . . . . . . . 5<br />
2.2.3 Power <strong>and</strong> frequency recorder . . . . . . . . . . . . . . . . . . . . 6<br />
2.2.4 Event recorder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6<br />
2.3 Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7<br />
2.3.1 Common interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . 7<br />
2.3.2 Data acquisition units . . . . . . . . . . . . . . . . . . . . . . . . . 7<br />
2.4 Operation modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9<br />
2.5 S<strong>of</strong>tware (OSCOP P) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10<br />
2.5.1 Application range . . . . . . . . . . . . . . . . . . . . . . . . . . . 10<br />
I
2.5.2 S<strong>of</strong>tware modules . . . . . . . . . . . . . . . . . . . . . . . . . . . 11<br />
3 SIMEAS R in the labora<strong>to</strong>ry 14<br />
3.1 SIMEAS R configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14<br />
3.2 Labora<strong>to</strong>ry use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16<br />
4 IEEE St<strong>and</strong>ard Common Format for Transient Data Exchange (COMTRADE)<br />
for Power Systems 18<br />
4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18<br />
4.2 Sources <strong>of</strong> transient data . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19<br />
4.3 Files for data exchange . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20<br />
4.3.1 Header file (xxx...xxx.HDR) . . . . . . . . . . . . . . . . . . . . . . 20<br />
4.3.2 Configuration file (xxx...xxx.CFG) . . . . . . . . . . . . . . . . . . 21<br />
4.3.3 Data file (xxx...xxx.DAT) . . . . . . . . . . . . . . . . . . . . . . . . 26<br />
4.4 Differences between the 1991’s <strong>and</strong> the 1999’s st<strong>and</strong>ard . . . . . . . . . . 26<br />
5 Program <strong>to</strong> read Comtrade files in<strong>to</strong> Matlab 28<br />
5.1 Data structure <strong>of</strong> data s<strong>to</strong>rage in MATLAB . . . . . . . . . . . . . . . . . 31<br />
6 Wavelets 33<br />
6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33<br />
6.2 Basic ideas <strong>of</strong> the <strong>wavelet</strong> transform . . . . . . . . . . . . . . . . . . . . . 35<br />
6.2.1 Representation <strong>of</strong> signals through transforms . . . . . . . . . . . . 35<br />
6.2.2 Continuous Wavelet Transform . . . . . . . . . . . . . . . . . . . . 43<br />
6.2.3 Discretization <strong>of</strong> Continuous Wavelet Transform . . . . . . . . . . 49<br />
II
7 Algorithm <strong>to</strong> <strong>determine</strong> certain kind <strong>of</strong> disturbances 53<br />
7.1 Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53<br />
7.2 Analyzation <strong>of</strong> the disturbances . . . . . . . . . . . . . . . . . . . . . . . . 55<br />
7.2.1 Detecting <strong>and</strong> localizing in time a disturbance . . . . . . . . . . . 55<br />
7.2.2 Identifying the disturbance . . . . . . . . . . . . . . . . . . . . . . 57<br />
7.2.3 Generalizing the classification pattern . . . . . . . . . . . . . . . . 58<br />
7.3 MATLAB implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . 60<br />
7.3.1 Program modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60<br />
7.3.2 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61<br />
8 Conclusion <strong>and</strong> Look-Out 63<br />
List <strong>of</strong> figures 65<br />
List <strong>of</strong> tables 66<br />
Bibliography 67<br />
III
Chapter 1<br />
Introduction<br />
Electrical power industry worldwide moves <strong>to</strong>ward deregulation <strong>and</strong> competition. At<br />
the same time, electrical power systems are becoming more complicated. The depen-<br />
dence <strong>of</strong> modern society on electrical energy is increasing continuously. Even short<br />
interruptions in electrical supply can lead <strong>to</strong> serious consequences. Aspects <strong>of</strong> power<br />
quality are getting more important <strong>to</strong>o <strong>and</strong> are <strong>of</strong>ten regulated in contracts. Big fac<strong>to</strong>-<br />
ries with very sensible processes (i.e. paper mills, rolling mills,...) have a big damage<br />
in case <strong>of</strong> a fault.<br />
This requires the high reliability, accuracy <strong>and</strong> reaction speed <strong>of</strong> energy management<br />
systems, control systems <strong>and</strong> protection systems. The development <strong>and</strong> operation <strong>of</strong><br />
these systems are <strong>based</strong> on the signals processing, in which the processing <strong>of</strong> power<br />
transients is one <strong>of</strong> the most important subjects, because power transients are gener-<br />
ated by state changes <strong>and</strong> normally concerned with the occurrences <strong>of</strong> faults, distur-<br />
bances <strong>and</strong> operations.<br />
This diploma thesis deals with recording <strong>of</strong> disturbances in power networks by use <strong>of</strong><br />
the power quality recorder SIMEAS R. In the second step, this power quality is inte-<br />
grated in the power network simula<strong>to</strong>r at the Department <strong>of</strong> Electrical Power Systems<br />
for use in the labora<strong>to</strong>ry "Störungen und Schutz in elektrischen Anlagen", so that stu-<br />
dents become acquainted with power quality <strong>and</strong> its moni<strong>to</strong>ring. This disturbance<br />
1
ecordings from the power quality recorder <strong>and</strong> some more from different electricity<br />
power suppliers, which are saved in the COMTRADE format are analyzed by use <strong>of</strong><br />
<strong>wavelet</strong> transform. This analyzation should estimate the origin for this disturbance.<br />
The order <strong>of</strong> the chapters is in the sequence for the analyzation: disturbance record-<br />
ing, import in<strong>to</strong> MATLAB, analyzation with MATLAB. To each step, there is a theo-<br />
retical part about the power quality recorder SIMEAS R, the COMTRADE format <strong>and</strong><br />
<strong>wavelet</strong>s.<br />
2
Chapter 2<br />
Power Quality Recorder Simeas-R<br />
2.1 Overview<br />
The shortcut SIMEAS R means "SIemens MEASurement Recorder"<br />
The power quality recorder SIMEAS R is used for quality assurance in power stations,<br />
<strong>and</strong> extra-high, high-voltage <strong>and</strong> medium-voltage installations. SIMEAS R records<br />
power faults <strong>and</strong> power quality <strong>and</strong> moni<strong>to</strong>rs the secondary <strong>and</strong> primary technical<br />
facilities. It has an integrated digital fault recording system with an integrated fault<br />
recorder, power <strong>and</strong> frequency recorder, digital recorder <strong>and</strong> an event recorder system.<br />
The signals are sampling with a high sampling rate (256 times the base frequency with<br />
64-fold oversampling) with a high degree <strong>of</strong> accuracy (measuring fault < 0,2 %), <strong>and</strong> a<br />
high resolution (16 bit). With its new transducer concept it is capable <strong>to</strong> record signals<br />
with DC components. For transfer an configuration it can be equipped with direct<br />
communication interfaces <strong>to</strong> an analog or digital telephone network, LAN or WAN<br />
using TCP/IP pro<strong>to</strong>col or null modem. Through this communication possibilities it<br />
has the capability for remote diagnosis <strong>and</strong> full commissioning via modem or network.<br />
3
2.2. FUNCTIONS 4<br />
2.2 Functions<br />
2.2.1 Fault recorder<br />
The analog <strong>and</strong> binary signals are continually moni<strong>to</strong>red for limit violations. If a trig-<br />
ger occurs, all inputs are recorded in parallel with pre-fault, variable fault progression<br />
<strong>and</strong> post-fault data. The recorded data can be provided <strong>to</strong> the diagnostic system for<br />
determining the fault location. An intelligent progression control records the fault only<br />
for the duration <strong>of</strong> which it is present.<br />
The resolution is 16 bits. The sampling frequency is 256 times the fundamental (12,80kHz<br />
per input at 50Hz). Binary inputs are recorded with a sampling frequency <strong>of</strong> 2kHz. At<br />
the time <strong>of</strong> triggering, the real time (in ms) is recorded.<br />
The following triggers are implemented in the s<strong>of</strong>tware for each input.<br />
For analog inputs:<br />
• Minimum trigger<br />
• Maximum trigger<br />
• Rate <strong>of</strong> change trigger (positive, negative)<br />
• Positive-sequence system trigger minimum or maximum<br />
• Negative-sequence system trigger minimum or maximum<br />
For binary inputs:<br />
• positive <strong>and</strong> negative slope<br />
• negative slope<br />
• positive slope<br />
• Logical combination <strong>of</strong> analog <strong>and</strong> binary trigger criteria<br />
Triggers are logically combined. For example triggers can be logically combined <strong>to</strong><br />
distinguish a fault from intentional disconnection <strong>of</strong> a supply.
2.2. FUNCTIONS 5<br />
2.2.2 Power data recorder<br />
The power data recorder functionality s<strong>to</strong>res the signals continuously. The averaging<br />
time is freely configurable. The mean values are <strong>determine</strong>d from the calculated r.m.s.<br />
values (which are calculated every cycle). Different averaging times can be configured<br />
for the electrical values.<br />
The following electrical measurements are s<strong>to</strong>red <strong>and</strong> <strong>determine</strong>d by the evaluation<br />
program:<br />
• Voltage U1, U2, U3, U4<br />
• Current I1, I2, I3, I4 Note: Depending on the type <strong>of</strong> power network <strong>and</strong> connec-<br />
tion, either the phase voltages or the phase-<strong>to</strong>-ground voltages are recorded.<br />
• Active power P1, P2, P3, P4<br />
• Reactive power Q1, Q2, Q3, Q4<br />
• Power fac<strong>to</strong>r cos phi 1, 2, 3<br />
• Frequency f<br />
• Positive-sequence system<br />
• Negative-sequence system<br />
• Weighted <strong>and</strong> unweighted dis<strong>to</strong>rtion fac<strong>to</strong>r<br />
• Harmonics (max. 5 selected for an averaging time up <strong>to</strong> 10s)<br />
• Harmonics (50 for averaging times <strong>of</strong> 10s upwards)<br />
• DC signals when the DDAU is used<br />
This function allows the feeders <strong>to</strong> be continously moni<strong>to</strong>rd <strong>and</strong> an analysis <strong>of</strong> the<br />
network quality can be performed.
2.2. FUNCTIONS 6<br />
2.2.3 Power <strong>and</strong> frequency recorder<br />
This functionality is used <strong>to</strong> record the load conditions before, during <strong>and</strong> after a fault<br />
occurs. Power swinging within the power network is recorded over a long period <strong>of</strong><br />
time. The length <strong>of</strong> the recording time depends on the configuration <strong>of</strong> the period for<br />
which a mean value is estimated.<br />
The principle <strong>of</strong> operation is similar <strong>to</strong> the fault recording mode, however, the signals<br />
are <strong>determine</strong>d every cycle (e.g. every 20ms at 50Hz frequency) <strong>and</strong> s<strong>to</strong>red depending<br />
on the configuration. The signals are s<strong>to</strong>red at an interval between 1 <strong>and</strong> 250 cycles. If,<br />
e.g., 100 cycles is configured, the average <strong>of</strong> the values is <strong>determine</strong>d over this period.<br />
The frequency channel has an accuracy <strong>of</strong> ± 1mHz. The recording can be initiated<br />
using the start selec<strong>to</strong>rs. The trigger is derived by comparing the current value with<br />
the previously <strong>determine</strong>d value. The maximum pre-fault time is, e.g., 40 minutes for<br />
an averaging time <strong>of</strong> 250 cycles.<br />
The power <strong>and</strong> frequency progression is recorded for up <strong>to</strong> 2 hours, independent <strong>of</strong> the<br />
averaging. If the averaging time is set <strong>to</strong> one cycle, then 10s <strong>of</strong> pre-fault are available.<br />
The power <strong>and</strong> frequency recorder is used especially for recording the primary control<br />
in power stations <strong>and</strong> swinging turbines in electrical power systems. The frequency<br />
gradient ∆f/∆t reacts if a power station is disconnected from the network, or a large<br />
change in the network power occurs.<br />
Since all the inputs are recorded in parallel, the user can generate a power balance, for<br />
an infeed point in the switchgear. This function is au<strong>to</strong>mated in the OSCOP P program<br />
package.<br />
2.2.4 Event recorder<br />
The binary inputs are sampled at 2kHz (0,5ms). State changes are written with a real<br />
time <strong>of</strong> 1ms in<strong>to</strong> the s<strong>to</strong>rage. For each <strong>of</strong> the 16 binary inputs, 200 state changes can be<br />
s<strong>to</strong>red within 1s. The entire s<strong>to</strong>rage can be freely configured. For 5 Mbytes <strong>of</strong> s<strong>to</strong>rage<br />
approximately 120.000 state changes can be s<strong>to</strong>red.
2.3. INTERFACES 7<br />
The binary inputs are assigned exactly <strong>to</strong> the analog recordings depending on their<br />
real-time values. Furthermore, the output from the OSCOP P program has the form <strong>of</strong><br />
a chronologically sorted file, i.e. in the form <strong>of</strong> an event recorder system. This means<br />
that a separate event recorder system does not need <strong>to</strong> be installed.<br />
2.3 Interfaces<br />
2.3.1 Common interfaces<br />
The following interfaces are provided for connecting the peripherals <strong>and</strong> for remote<br />
data transfer<br />
• Printer interface LPT1 (rear)<br />
• PCCARD slot type 2 <strong>to</strong> accomodate:<br />
– an analog modem V.21, V.22, V.32, V.34, V.90<br />
– Ethernet LAN connection<br />
• COM 1 data interface for: (rear)<br />
– an external digital modem (EURO-ISDN), X.25 pad<br />
• COM 2/COM S maintenance interface for: (front)<br />
– a notebook (on-site configuration)<br />
2.3.2 Data acquisition units<br />
Data acquisition units (DAUs) are provided for connection <strong>to</strong> the various processes.<br />
The signals are connected via terminals on the rear side. The DAUs contain the com-<br />
plete signal conditioning functions, the analog/digital conversion functions <strong>and</strong> the<br />
entire downstream digital processing.
2.3. INTERFACES 8<br />
For adaptation <strong>to</strong> the corresponding process signals, various acquisition units are avail-<br />
able.<br />
VCDAU (Voltage/Current Data Acquisition Unit)<br />
[8 analog (4 x voltage / 4 x current) <strong>and</strong> 16 binary inputs]<br />
The unit is used <strong>to</strong> record current / voltage <strong>and</strong> binary inputs. Typical applications<br />
are the moni<strong>to</strong>ring <strong>of</strong> feeders or a transformer panel. The calculated measurements are<br />
derived from the input current <strong>and</strong> voltage.<br />
CDAU (Current Data Acquisition Unit)<br />
[8 analog (8 x current) <strong>and</strong> 16 binary inputs]<br />
The unit is used <strong>to</strong> record current <strong>and</strong> binary inputs. A typical application is the record-<br />
ing <strong>of</strong> two feeders.<br />
VDAU (Voltage Data Acquisition Unit)<br />
[8 analog (8 x voltage) <strong>and</strong> 16 binary inputs]<br />
The unit is used <strong>to</strong> record voltage <strong>and</strong> binary inputs. A typical application is the record-<br />
ing <strong>of</strong> busbar voltages.<br />
BDAU (Binary Data Acquisition Unit)<br />
[32 binary inputs]<br />
This unit is used whenever 16 binary inputs per analog acquisition module are insuffi-<br />
cient. This allows the user, for example <strong>to</strong> combine 8 analog <strong>and</strong> 48 binary inputs.<br />
DDAU (DC Data Acquisition Unit)<br />
[8 analog (8 x process measur<strong>and</strong>s) <strong>and</strong> 16 binary inputs]<br />
The unit is used <strong>to</strong> record process measurements, such as 4 <strong>to</strong> 20 mA, or DC voltages,<br />
such as 10 V DC. In conjunction with a transducer, voltages <strong>of</strong> up <strong>to</strong> 400 V can be pro-
2.4. OPERATION MODES 9<br />
cessed.<br />
Figure 2.1 shows the front <strong>and</strong> the back <strong>of</strong> the power quality recorder SIMEAS R. On<br />
the front side there are some status LED’s. They can be assigned <strong>to</strong> the different status<br />
signals from SIMEAS R. There are a few but<strong>to</strong>ns also <strong>to</strong> block the device or <strong>to</strong> start<br />
a manual recording. Under the power switch there is a serial interface <strong>to</strong> configure<br />
the device <strong>and</strong> <strong>to</strong> transfer the recordings. On the back side there is the power supply<br />
connec<strong>to</strong>r <strong>and</strong> the data acquisition units. There a parallel interface <strong>to</strong> connect a printer<br />
<strong>and</strong> a serial interface <strong>to</strong> connect a modem for example. It is possible <strong>to</strong> attach the<br />
SIMEAS R with an internal modem or ISDN card also.<br />
Figure 2.1: Connections <strong>of</strong> SIMEAS R<br />
The SIMEAS R in the labora<strong>to</strong>ry is equipped with the data acquisition units VCDAU<br />
<strong>and</strong> VDAU. The VCDAU is used in the labora<strong>to</strong>ry for measuring voltage <strong>and</strong> current<br />
in the power network simula<strong>to</strong>r <strong>and</strong> VDAU is measuring the voltage in the power<br />
supply.<br />
2.4 Operation modes<br />
The SIMEAS R has three basic operation modes:
2.5. SOFTWARE (OSCOP P) 10<br />
Normal operation In normal operation, all functions <strong>and</strong> triggers are active. Depend-<br />
ing on the configured averaging time, recordings are performed continuously .<br />
If a trigger limit is violated, a recording begins with prefault values, fault pro-<br />
gression <strong>and</strong> post-fault values. The cause <strong>of</strong> the trigger violation is s<strong>to</strong>red with<br />
the header data. Depending on the configuration, any SIMEAS R connected via<br />
the LAN network is also triggered.<br />
Blocked operation In blocked operation, no recording is initiated when a trigger con-<br />
dition occurs. All triggers are inactive, <strong>and</strong> the signalling relay is not energized.<br />
The device is only active in the "digital recorder" mode.<br />
This operating mode is selected when maintenance work is carried out on the<br />
affected feeders.<br />
Test operation In test operation, as in normal operation, all functions <strong>and</strong> triggers are<br />
active, however, the recorded events always have "Test" entered as their cause.<br />
The signalling relay "Event currently being recorded" is not energized. This op-<br />
erating mode is used <strong>to</strong> test the SIMEAS R.<br />
The operating modes can be selected via the keyboard. Remote control using OSCOP<br />
P (see chapter 5) is also possible.<br />
2.5 S<strong>of</strong>tware (OSCOP P)<br />
2.5.1 Application range<br />
OSCOP P is a program package for transmission <strong>and</strong> diagnosis <strong>of</strong> measured values,<br />
which have been recorded with power quality recorder SIMEAS R.<br />
The user is able <strong>to</strong> control the transmission <strong>and</strong> diagnosis in manual or au<strong>to</strong>matic op-<br />
eration. The results are send <strong>to</strong> the printer.
2.5. SOFTWARE (OSCOP P) 11<br />
2.5.2 S<strong>of</strong>tware modules<br />
The program package OSCOP P consists <strong>of</strong> several different program modules. This<br />
modules are described below. Not all programs are necessary for data transmission.<br />
Main program modules<br />
Parameterize PC The "Parameterize PC" program module is used <strong>to</strong> set the basic sys-<br />
tem parameters which are: name <strong>and</strong> passwords <strong>of</strong> the authorized users <strong>of</strong> OS-<br />
COP P, st<strong>and</strong>ard interfaces <strong>of</strong> the PC, number <strong>and</strong> parameters <strong>of</strong> the respective<br />
SIMEAS Rs. Once these settings have been entered, later modification is not re-<br />
quired unless the user wishes <strong>to</strong> provide an extension <strong>to</strong> the existing SIMEAS R<br />
unit (additional DAU modules or new SIMEAS R systems, modification <strong>of</strong> the<br />
passwords <strong>of</strong> existing SIMEAS R systems or new access authority for OSCOP P).<br />
Parameterize devices Parameterize module, where the registration device <strong>of</strong> type SIMEAS<br />
R is parameterized.<br />
Transfer Communication module, which transfers the recorded disturbances <strong>to</strong> the<br />
evaluation PC.<br />
Evaluate Graphical evaluation module, where the disturbances are displayed graphi-<br />
cally<br />
Additional program modules<br />
Simple Diagnosis Diagnosis module which can <strong>determine</strong> kind <strong>and</strong> location <strong>of</strong> failure<br />
in the controlled branch.<br />
Complex Diagnosis Diagnosis module which can <strong>determine</strong> kind <strong>and</strong> location <strong>of</strong> fail-<br />
ure in controlled branch. In addition <strong>to</strong> simple Diagnosis, the effect <strong>to</strong> the higher-<br />
ranking network is evaluated.<br />
Statistic module SICARO PQ Diagnosis module which makes an analysis about the<br />
power quality. The recordings are evaluated according <strong>to</strong> the norms EN50160
2.5. SOFTWARE (OSCOP P) 12<br />
<strong>and</strong> IEC1000. The results are shown in diagrams.<br />
These screenshots shown here are from OSCOP P. Figure 2.2 shows the parameterizing<br />
page. It is the channel for the voltage in phase L1 on the power network simula<strong>to</strong>r.<br />
The trigger levels for maximum voltage, minimum voltage <strong>and</strong> the rate <strong>of</strong> change <strong>of</strong><br />
the voltage. The page for currents is similar <strong>to</strong> this page.<br />
Figure 2.2: OSCOP P parameterizing<br />
Figure 2.3 shows the visualization <strong>of</strong> a recorded fault. RMS values are choosed <strong>to</strong> show.<br />
It can be seen, that there was a ground failure in phase L1. The RMS values are given<br />
in each phase an at the different segments.<br />
In figure 2.4 the same fault as in figure 2.3 can be seen. This view shows the fault in<br />
analog values. In this view it is possible <strong>to</strong> recognize the transient phenomenom at the<br />
beginning <strong>and</strong> the end <strong>of</strong> the fault.
2.5. SOFTWARE (OSCOP P) 13<br />
Figure 2.3: OSCOP P evaluation RMS values shows a<br />
earth-fault in L1<br />
Figure 2.4: OSCOP P evaluation analog value shows<br />
the same earth-fault in L1 as in Figure 5
Chapter 3<br />
SIMEAS R in the labora<strong>to</strong>ry<br />
As described in chapter 1, the SIMEAS R was used in the labora<strong>to</strong>ry "Störungen und<br />
Schutz in elektrischen Anlagen" <strong>to</strong> show possibilities moni<strong>to</strong>r power quality in power<br />
networks. The SIMEAS R was integrated in<strong>to</strong> the power network model at the Institute<br />
for Electrical Power Systems <strong>and</strong> High Voltage Engineering, Department for Electrical<br />
Power Systems at Graz University <strong>of</strong> Technology.<br />
3.1 SIMEAS R configuration<br />
For use <strong>of</strong> the SIMEAS R in the labora<strong>to</strong>ry, the measuring device has <strong>to</strong> be prepared.<br />
There were many old disturbance recordings on the internal hard-disk. Asking the<br />
Siemens helpdesk how <strong>to</strong> clear this recordings the answer was that it is only possi-<br />
ble <strong>to</strong> clear old recordings after removing the PCMCIA hard-disk from SIMEAS R <strong>and</strong><br />
building it in a PCMCIA slot <strong>of</strong> a notebook. All files on the hard-disk, except the fol-<br />
lowing should be deleted. It is important <strong>to</strong> let these files un<strong>to</strong>uched, because SIMEAS<br />
R is out <strong>of</strong> function without them.<br />
This files must not be deleted!<br />
• bootromsys<br />
• VXworks<br />
14
3.1. SIMEAS R CONFIGURATION 15<br />
• DAU.bin<br />
• Parm.txt<br />
• Slot1 - 4.txt<br />
After that, the hard-disk is <strong>to</strong> remount in<strong>to</strong> the SIMEAS R. After switching it on, the<br />
LED’s on the front are beginning <strong>to</strong> flash. This means that the SIMEAS R is preparing<br />
its memory areas, which are defined through Oscop P. During this process the SIMEAS<br />
R should not be switched <strong>of</strong>f.<br />
To test the proper function <strong>and</strong> <strong>to</strong> make some real disturbance recordings, a test-run<br />
was performed. In this test-run the SIMEAS R was connected <strong>to</strong> the public power net-<br />
work over a few weeks. The recordings were viewed with Oscop P. It could be seen<br />
that the threshold values were very narrow, so the SIMEAS R had many recordings<br />
with very small under- <strong>and</strong> overvoltages.<br />
Figure 3.1: SIMEAS R in the testing setup with lap<strong>to</strong>p
3.2. LABORATORY USE 16<br />
Figure 3.1 shows the SIMEAS R in the test setup for testing the proper function. The<br />
lap<strong>to</strong>p is used <strong>to</strong> configure it <strong>and</strong> <strong>to</strong> transfer the disturbance recordings <strong>and</strong> is connect<br />
<strong>to</strong> the service interface on the front side.<br />
For an easy use <strong>to</strong>gether with the power network model, the SIMEAS R was equipped<br />
with cables <strong>and</strong> banana plugs <strong>to</strong> connect it <strong>to</strong> the power network model. There are<br />
cables <strong>to</strong> measure three currents <strong>to</strong>gether with four voltages <strong>and</strong> additionally three<br />
voltages.<br />
3.2 Labora<strong>to</strong>ry use<br />
The exercises in the labora<strong>to</strong>ry exist <strong>of</strong> setting the correct parameters (limiting values<br />
for voltages <strong>and</strong> currents) with the configuring program OSCOP P which is described<br />
in chapter 2 <strong>and</strong> the proper connection <strong>and</strong> integration in<strong>to</strong> a power network simula<strong>to</strong>r.<br />
Figure 3.2 shows this integration in<strong>to</strong> this simula<strong>to</strong>r.<br />
Figure 3.2: SIMEAS R in the labora<strong>to</strong>ry use at the De-<br />
partment for Electrical Power Systems<br />
A description <strong>of</strong> the SIMEAS R was written for the students. It is an abstract about the<br />
functions <strong>of</strong> the SIMEAS R, the h<strong>and</strong>ling <strong>of</strong> the SIMEAS R <strong>and</strong> the use <strong>of</strong> the program<br />
OSCOP P <strong>to</strong> paramterize the SIMEAS R <strong>and</strong> <strong>to</strong> transfer the disturbance recordings.
3.2. LABORATORY USE 17<br />
Then the SIMEAS R is connected <strong>to</strong> the power network model in the labora<strong>to</strong>ry. At<br />
least the plugs for the current in all three phases <strong>and</strong> the plugs for the voltage in all<br />
three phases have <strong>to</strong> be plugged in. As an option the fourth voltage input can be<br />
connected <strong>to</strong> the neutral conduc<strong>to</strong>r. There are four additional voltage inputs <strong>and</strong> some<br />
digital inputs. So it is possible <strong>to</strong> record status information from switches or distance<br />
relays.<br />
After that some failures (single phase <strong>and</strong> three-phase short circuits, earth faults) were<br />
simulated with the power network model with different neutral earthing (solidly earthed,<br />
isolated <strong>and</strong> inductive earthed system). If the parameters were set correctly, the SIMEAS<br />
R records them. With Oscop P the recordings are viewed <strong>and</strong> analyzed. In addition <strong>to</strong><br />
the SIMEAS R, the disturbances were also recorded with a digital distance relay. The<br />
recordings <strong>of</strong> these two devices were compared <strong>and</strong> analyzed.
Chapter 4<br />
IEEE St<strong>and</strong>ard Common Format for<br />
Transient Data Exchange<br />
(COMTRADE) for Power Systems<br />
4.1 Introduction<br />
The rapid evolution <strong>and</strong> implementation <strong>of</strong> digital devices for fault <strong>and</strong> transient record-<br />
ing <strong>and</strong> testing in the electric utility industry has generated the need for a st<strong>and</strong>ard<br />
format for the exchange <strong>of</strong> such data for use with various devices <strong>to</strong> enhance <strong>and</strong> au<strong>to</strong>-<br />
mate the analysis, testing, evaluation <strong>and</strong> simulation <strong>of</strong> the power system <strong>and</strong> related<br />
protection schemes during fault <strong>and</strong> disturbance conditions.<br />
The COMTRADE st<strong>and</strong>ard defines a common format for the data files <strong>and</strong> exchange<br />
medium needed for the interchange <strong>of</strong> various types <strong>of</strong> fault, test, or simulation data.<br />
The proliferation <strong>and</strong> implementation <strong>of</strong> digital devices for the acquisition, analysis,<br />
simulation <strong>and</strong> testing <strong>of</strong> power - system equipment has made available a pr<strong>of</strong>usion<br />
<strong>and</strong> variety <strong>of</strong> data that has not been readily available in the past. Since these data<br />
may come from a variety <strong>of</strong> sources, from different manufacturers using proprietary<br />
or other st<strong>and</strong>ard formats, a common format st<strong>and</strong>ard is necessary <strong>to</strong> facilitate the<br />
exchange <strong>of</strong> such data between devices with diverse applications but that have the<br />
18
4.2. SOURCES OF TRANSIENT DATA 19<br />
capability <strong>of</strong> utilizing digital data from other devices.<br />
4.2 Sources <strong>of</strong> transient data<br />
There are several possible sources <strong>of</strong> transient data for exchange:<br />
• Digital fault recorders<br />
Digital fault recorders for moni<strong>to</strong>ring power-system voltages, currents <strong>and</strong> dig-<br />
ital events are supplied by several manufacturers. Typical recorders moni<strong>to</strong>r 16<br />
<strong>to</strong> 64 analog channels <strong>and</strong> a comparable number <strong>of</strong> event (contact status) inputs.<br />
Sampling rates, analog-<strong>to</strong>-digital converter resolution, record format, <strong>and</strong> other<br />
parameters have not been st<strong>and</strong>ardized.<br />
• Digital protective relays<br />
New relay designs using microprocessors are currently being developed <strong>and</strong><br />
marketed. Some <strong>of</strong> these relays have the ability <strong>to</strong> capture <strong>and</strong> s<strong>to</strong>re relay input<br />
signals in digital form <strong>and</strong> transmit these data <strong>to</strong> another device. In performing<br />
this function, they are similar <strong>to</strong> digital fault recorders, except that the nature<br />
<strong>of</strong> the recorded data may be influenced by the needs <strong>of</strong> the relaying <strong>algorithm</strong>.<br />
As with the digital fault recorders, record format <strong>and</strong> other parameters have not<br />
been st<strong>and</strong>ardized.<br />
• Transient simulation programs<br />
Unlike the above devices which record actual power system events, transient<br />
simulation programs generate transient data <strong>based</strong> on mathematical models <strong>of</strong><br />
power systems. Because this analysis is carried out by a digital computer, the<br />
results are inherently in digital form suitable for digital data dissemination. An<br />
example for such a simulation program is the SABER simula<strong>to</strong>r [2].<br />
While originally developed for the evaluation <strong>of</strong> transient overvoltages in power<br />
systems, these programs are finding increasing usage in other types <strong>of</strong> studies, in-<br />
cluding test cases for digital relaying <strong>algorithm</strong>s. Because <strong>of</strong> the ease with which
4.3. FILES FOR DATA EXCHANGE 20<br />
the input conditions <strong>of</strong> the study can be changed, transient simulation programs<br />
can provide many different test cases for a relay.<br />
• Analog simula<strong>to</strong>rs<br />
Analog simula<strong>to</strong>rs model power system operations <strong>and</strong> transient phenomena,<br />
with scaled values <strong>of</strong> resistance, inductance <strong>and</strong> capacitance, operating at greatly<br />
reduced values <strong>of</strong> voltages <strong>and</strong> current. The components usually are organized<br />
with similar line segments that can be connected <strong>to</strong>gether <strong>to</strong> form longer lines.<br />
The frequency response <strong>of</strong> the analog simula<strong>to</strong>r primarily is limited by the equiv-<br />
alent length <strong>of</strong> the model segment <strong>and</strong> typically ranges from 1 - 5 kHz. The<br />
analog output <strong>of</strong> the simula<strong>to</strong>r could be converted <strong>to</strong> digital records with appro-<br />
priate filtering <strong>and</strong> sampling. The power network simula<strong>to</strong>r at the Department<br />
for Electrical Power Systems is such an analog simula<strong>to</strong>r.<br />
4.3 Files for data exchange<br />
The COMTRADE data format consists <strong>of</strong> three files, the configuration file, the data file<br />
<strong>and</strong> the header file (the header file is defined in [4] only). The configuration file <strong>and</strong><br />
the header file are ASCII files, the data file is an ASCII or binary file, as it is configured<br />
in the configuration file.<br />
The extension <strong>of</strong> the file name is used <strong>to</strong> identify the type <strong>of</strong> file, ".HDR" for header,<br />
".CFG" for configuration, <strong>and</strong> ".DAT" for data file.<br />
4.3.1 Header file (xxx...xxx.HDR)<br />
The header file is created by the origina<strong>to</strong>r <strong>of</strong> the fault data using a word processor<br />
program. The data is intended <strong>to</strong> be printed <strong>and</strong> read by the user. The crea<strong>to</strong>r <strong>of</strong> the<br />
header file can include any information in any format desired. The header files are<br />
free-form ASCII files <strong>of</strong> any length. ASCII files can be read by simple edi<strong>to</strong>rs <strong>and</strong> word<br />
processors.
4.3. FILES FOR DATA EXCHANGE 21<br />
4.3.2 Configuration file (xxx...xxx.CFG)<br />
The intent <strong>of</strong> the configuration file is <strong>to</strong> provide the information necessary for a com-<br />
puter program <strong>to</strong> read <strong>and</strong> interpret the data values in the associated data files. Some<br />
<strong>of</strong> these information might be duplicated in the header file (e.g., number <strong>of</strong> channels)<br />
<strong>to</strong> be compatible with CIGRE.<br />
Content<br />
The configuration file has the following information:<br />
1. Station name <strong>and</strong> identification<br />
2. Number <strong>and</strong> type <strong>of</strong> channels<br />
3. Channel names, units, <strong>and</strong> conversion fac<strong>to</strong>rs<br />
4. Line frequency<br />
5. Sample rate <strong>and</strong> number <strong>of</strong> samples at this rate<br />
6. Date <strong>and</strong> time <strong>of</strong> first data value<br />
7. Date <strong>and</strong> time <strong>of</strong> trigger point<br />
8. File type<br />
Format<br />
The configuration file is a st<strong>and</strong>ard ASCII file <strong>of</strong> a fixed or pre<strong>determine</strong>d format. It<br />
must be included on every disturbance recording.<br />
The file is divided in<strong>to</strong> lines. Each line is terminated by a carriage return <strong>and</strong> line feed<br />
. Commas are used <strong>to</strong> separate elements within a line. For missing data items,<br />
the separa<strong>to</strong>r commas are retained with no spaces between the commas.<br />
The information in the file must be listed in the exact order <strong>and</strong> fixed-order format<br />
shown after.
4.3. FILES FOR DATA EXCHANGE 22<br />
• Station name <strong>and</strong> identification<br />
The configuration file begins with the station name <strong>and</strong> the station identification.<br />
station_name,id <br />
where:<br />
station_name =the unique name <strong>of</strong> the recorder<br />
id =the unique number <strong>of</strong> the recorder<br />
• Number <strong>and</strong> type <strong>of</strong> channels<br />
This statement contains the number <strong>and</strong> type <strong>of</strong> channels as they occur in each<br />
data record in the data file:<br />
TT,nnt,nnt <br />
where:<br />
TT= <strong>to</strong>tal number <strong>of</strong> channels<br />
nnt= number <strong>of</strong> channels <strong>of</strong><br />
t= types <strong>of</strong> input (A=analog/D=status).<br />
• Channel information<br />
This is a group <strong>of</strong> lines containing channel information. There is one line for each<br />
channel as follows:<br />
nn,id,p,cccccc,uu,a,b,skew,min,max <br />
...<br />
nn,id,p,cccccc,uu,a,b,skew,min,max <br />
nn,id,m <br />
nn,id,m <br />
where:<br />
nn= channel number<br />
id= channel name
4.3. FILES FOR DATA EXCHANGE 23<br />
p= channel phase identification<br />
cccccc= circuit/component being moni<strong>to</strong>red<br />
uu= channel units (kV, kA, etc.)<br />
a= real number (see below )<br />
b= real number. Channel conversion fac<strong>to</strong>r is ax+b<br />
[i.e., a recorded value <strong>of</strong> x corresponds <strong>to</strong> (ax+b) in units uu<br />
specified above]<br />
skew= real number. Channel time skew (in µs) from start <strong>of</strong> sample period<br />
min= an integer equal <strong>to</strong> the minimum value (lower limit <strong>of</strong><br />
sample range) for samples <strong>of</strong> this channel<br />
max= an integer equal <strong>to</strong> the maximum value (upper limit <strong>of</strong> sample range)<br />
for samples <strong>of</strong> this channel<br />
m= (0 or 1) the normal state <strong>of</strong> this channel (applies <strong>to</strong> digital<br />
channels only)<br />
This "nn,id,p,cccccc,uu,a,b,skew,min,max" sequence is necessary <strong>to</strong> provide the<br />
channel names, phase, units, <strong>and</strong> conversion fac<strong>to</strong>rs for each <strong>of</strong> the channels in<br />
the order in which they occur in the data. Phase, circuit component, <strong>and</strong> conver-<br />
sion fac<strong>to</strong>rs are not necessary for digital channels <strong>and</strong> thus are omitted.<br />
In the above record format specification, the line seperated by dashs represent<br />
analog channels <strong>and</strong> the last two lines represent digital channels.<br />
The real value for the analog value is calculated as follows:<br />
value = x · a + b<br />
• Line frequency<br />
The line frequency is listed on a seperate line in the file:<br />
lf <br />
where:<br />
lf= line frequency in Hz (50 or 60)
4.3. FILES FOR DATA EXCHANGE 24<br />
• Sampling rate information<br />
This section contains the <strong>to</strong>tal number <strong>of</strong> sample rates followed by a list contain-<br />
ing each sample rate <strong>and</strong> number <strong>of</strong> the last sample at the given rate.<br />
nrates <br />
sssss1,endsamp1 <br />
sssss2,endsamp2 <br />
...<br />
sssssn,endsampn <br />
where:<br />
nrates= number <strong>of</strong> different sample rates in the data file<br />
sssss1 - sssssn= the sample rate in Hz<br />
endsamp1 - endsampn= last sample number at this rate<br />
• Date/time stamps<br />
There are two date/time stamps: the first one is for the first data value in the data<br />
file <strong>and</strong> the second one is for the trigger point. They have the following format:<br />
mm/dd/yy,hh:mm:ss.ssssss <br />
mm/dd/yy,hh:mm:ss.ssssss <br />
where:<br />
mm= month (01-12)<br />
dd= day <strong>of</strong> month (01-31)<br />
yy= last two digits <strong>of</strong> year<br />
hh= hours (00-24)<br />
mm= minutes (00-59)<br />
ss.ssssss=seconds (from 0 sec <strong>to</strong> 59.999999 sec)<br />
• File type<br />
The data file type is identified as being an ASCII file by the file type identifier ft.
4.3. FILES FOR DATA EXCHANGE 25<br />
ft <br />
where:<br />
ft= ASCII<br />
Example configuration file<br />
The following example shows a configuration file from a digital protection device. The<br />
first line contains the station name (UAB_110kV_PN 7S513_1294). The second line<br />
contains the number <strong>of</strong> channels, in this example there are 8 analog channels <strong>and</strong> 1<br />
digital channel. The next few lines are explaining each analog <strong>and</strong> the digital chan-<br />
nel (see former section for detailed information) The last lines contain information<br />
about the power frequency (50 Hz), number <strong>of</strong> sampling frequencies (1), sample rate<br />
(999,000999), number <strong>of</strong> samples (240), time <strong>and</strong> type <strong>of</strong> data file (BINARY).<br />
UAB_110kV_PN 7SA513_1294„1997<br />
9,8A,1D<br />
1,IL1„1,I/In,4.3234,-4.3859,0,-32767,32767,1,1,S<br />
2,IL2„2,I/In,4.3636,8.7719,0,-32767,32767,1,1,S<br />
3,IL3„3,I/In,4.3368,-8.7719,0,-32767,32767,1,1,S<br />
4,IE„4,I/In,1.3385,-4.3859,0,-32767,32767,1,1,S<br />
5,UL1„5,U/Un,2.5189,-1.0152,0,-32767,32767,1,1,S<br />
6,UL2„6,U/Un,2.5235,-1.5228,0,-32767,32767,1,1,S<br />
7,UL3„7,U/Un,2.5018,-1.5228,0,-32767,32767,1,1,S<br />
8,Uen„8,U/Un,2.6335,-3.5532,0,-32767,32767,1,1,S<br />
1,Bin 1„,0<br />
50.0<br />
1<br />
999.000999,240<br />
27/11/2001,14:44:00.006000<br />
27/11/2001,14:44:00.006000<br />
BINARY<br />
1.0
4.4. DIFFERENCES BETWEEN THE 1991’S AND THE 1999’S STANDARD 26<br />
4.3.3 Data file (xxx...xxx.DAT)<br />
The data file contains the value <strong>of</strong> each sample <strong>of</strong> each input channel. The number<br />
s<strong>to</strong>red for a sample is usually the number produced by the device that samples the<br />
input waveform.<br />
The s<strong>to</strong>red data may be either zero <strong>based</strong>, or it may have a zero <strong>of</strong>fset. Zero-<strong>based</strong> data<br />
goes from a negative number <strong>to</strong> a positive number, e.g., -2000 <strong>to</strong> +2000. Zero-<strong>of</strong>fset<br />
numbers are all positive with a positive number chosen <strong>to</strong> represent zero, e.g., 0 <strong>to</strong><br />
4000 with 2000 representing zero. Conversion fac<strong>to</strong>rs specified in the configuration file<br />
define how <strong>to</strong> convert the data values <strong>to</strong> engineering units.<br />
In addition <strong>to</strong> data representing analog inputs, inputs that represent on/<strong>of</strong>f signals are<br />
also frequently recorded. These are <strong>of</strong>ten referred <strong>to</strong> as digital inputs, digital channels,<br />
digital subchannels, event inputs, logic inputs, binary inputs, contact inputs or status<br />
inputs. In this st<strong>and</strong>ard, this type <strong>of</strong> input is referred <strong>to</strong> as a status input. The state <strong>of</strong><br />
a status input is represented by a number "1" or "0" in the data file.<br />
4.4 Differences between the 1991’s <strong>and</strong> the 1999’s stan-<br />
dard<br />
In 1999 was a revision <strong>of</strong> this COMTRADE St<strong>and</strong>ard. Their are a few differences be-<br />
tween the 1991’s <strong>and</strong> the 1999’s st<strong>and</strong>ard, which are listed below.<br />
1. The Header (.HDR) file is explicitly defined as optional.<br />
2. The Configuration (.CFG) file has been modified. A field containing the COM-<br />
TRADE st<strong>and</strong>ard revision year has been added <strong>to</strong> distinguish files made under<br />
this or future revisions <strong>of</strong> the st<strong>and</strong>ard. If this field is not present, the data is<br />
assumed <strong>to</strong> comply with the COMTRADE st<strong>and</strong>ard C37.111-1991 [3]. A field<br />
for a Time Stamp Multiplication Fac<strong>to</strong>r has been added <strong>to</strong> meet the need for<br />
long duration files. To assist in conversion <strong>of</strong> the data, three new scaling fields<br />
(primary, secondary, <strong>and</strong> primary-secondary) are added, defining the instrument
4.4. DIFFERENCES BETWEEN THE 1991’S AND THE 1999’S STANDARD 27<br />
transformer winding rations, <strong>and</strong> whether the recorded data is scaled <strong>to</strong> reflect<br />
primary or secondary values. Configuration fields for Status (Digital) Channel<br />
Information habe been exp<strong>and</strong>ed <strong>to</strong> five fields <strong>to</strong> allow the same level <strong>of</strong> defini-<br />
tion as for analog channels. Line Frequency is now defined as a floating point<br />
field. Support for Event Triggered data has been added by the addition <strong>of</strong> a new<br />
mode for Sampling Rate Information when the sampling rate is variable. The<br />
Date/Time Stamps format has been modified with the day <strong>of</strong> month preceding<br />
the month entry field, <strong>and</strong> the year field now has all four numbers <strong>of</strong> the year. A<br />
requirement that at least one leading space shall be <strong>to</strong>lerated in the data fields, in-<br />
cluding those fields for which no data is available (previously specified as comma<br />
delimiters with no spaces in between) has also been added.<br />
3. A new format for a binary data (.DAT) file has been specified <strong>and</strong> the requirement<br />
for a supplied conversion program has been eliminated.<br />
4. A new optional Information file (.INF) has been added <strong>to</strong> provide for transmis-<br />
sion <strong>of</strong> extra public <strong>and</strong> private information in computer-readable form.<br />
5. All field descriptions are explicitly defined with respect <strong>to</strong>: criticality, format,<br />
type, minimum/maximum length, <strong>and</strong> minimum/maximum value.
Chapter 5<br />
Program <strong>to</strong> read Comtrade files in<strong>to</strong><br />
Matlab<br />
Because <strong>of</strong> writing the <strong>wavelet</strong> analyzation <strong>algorithm</strong> in MATLAB it is necessary <strong>to</strong><br />
import all signal, which are recorded <strong>and</strong> saved by the power quality recorder SIMEAS<br />
R in COMTRADE format, in<strong>to</strong> MATLAB. This import routine was written in Matlab<br />
<strong>to</strong>o, so it can be integrated in<strong>to</strong> the calculating <strong>algorithm</strong>.<br />
In addition <strong>to</strong> the program <strong>to</strong> convert Comtrade files, a program <strong>to</strong> read other data files<br />
<strong>of</strong> recorded disturbances [10] was written. This files are in Matlab format already <strong>and</strong><br />
have <strong>to</strong> be loaded <strong>and</strong> converted in<strong>to</strong> my data structure only .<br />
This program for Comtrade input has two parts. The first part is the reading <strong>of</strong> the<br />
config file <strong>and</strong> the second part is the reading <strong>of</strong> the data file. The structure chart <strong>of</strong> the<br />
first part is shown in figure 5.1, the structure chart from the second part is shown in<br />
figure 5.2.<br />
The statement variable = line in figure 5.2 means that one line in the config file is read<br />
<strong>and</strong> saved in<strong>to</strong> variable. The lines <strong>to</strong> be read are in a strict order. The first variable =<br />
line statement is reading the first line, the second statement is reading the second line<br />
<strong>and</strong> so on. That’s why, the order must not be changed.<br />
There is only one decision concerning <strong>to</strong> the revision year (see 4.3.2) in the first part,<br />
because the time-multiplication is new in the 1999’s st<strong>and</strong>ard. In the second part, there<br />
28
Figure 5.1: Structure chart <strong>of</strong> the first program part for<br />
reading the configuration file<br />
29
Figure 5.2: Structure chart <strong>of</strong> the second program part<br />
for reading the data file<br />
30
5.1. DATA STRUCTURE OF DATA STORAGE IN MATLAB 31<br />
is also one decision concerning <strong>to</strong> the revision year, because the ratio is also new in the<br />
1999’s st<strong>and</strong>ard. To have this decision only, the program is calculating with ratio=1 if<br />
the revision year is not 1991. Otherwise the ratio is being read from the config file.<br />
The minor difference <strong>of</strong> the input routine for the date file between the two different<br />
types (ASCII or binary) is not explained in the structure chart. The difference is only in<br />
the step reading file <strong>and</strong> saving.<br />
5.1 Data structure <strong>of</strong> data s<strong>to</strong>rage in MATLAB<br />
The following table lists the variables, which are used in my data s<strong>to</strong>rage in MATLAB<br />
<strong>and</strong> their meanings. For the details <strong>of</strong> the meanings look at 4.3.2.
5.1. DATA STRUCTURE OF DATA STORAGE IN MATLAB 32<br />
name meaning<br />
station Station name <strong>and</strong> identification as given in the configuration file<br />
rev_year Revision year <strong>of</strong> the st<strong>and</strong>ard (1991 or newer)<br />
T_analog Time information for each sample in each analog channel<br />
number_analog Number <strong>of</strong> analog channels<br />
number_digital Number <strong>of</strong> digital channels<br />
number_all Number <strong>of</strong> all channel (analog <strong>and</strong> digital)<br />
AnalogChannel Channel information for each analog channel<br />
DigitalChannel Channel information for each digital channel<br />
Frequency Frequency as given in the config file<br />
number_samples Number <strong>of</strong> different sampling rates<br />
Sample Sampling rate <strong>and</strong> number <strong>of</strong> samples with this sampling rate<br />
Time_begin Time when the recording begins<br />
Time_trigger Time when the recording devices was triggering<br />
Typ Type <strong>of</strong> data file (ASCII or binary)<br />
timemult Time-multiplication fac<strong>to</strong>r (in 1991’s st<strong>and</strong>ard timemult=1)<br />
ratio Ratio <strong>of</strong> the current- or voltage - transformer<br />
skew Channel time skew from start <strong>of</strong> sample-period for each analog<br />
channel<br />
Table 5.1: Data structure <strong>of</strong> the calculating <strong>algorithm</strong>
Chapter 6<br />
Wavelets<br />
6.1 Introduction<br />
The <strong>wavelet</strong> transform is a new <strong>and</strong> developing branch <strong>of</strong> mathematics. Recently it<br />
has become one <strong>of</strong> the hot points in the research <strong>of</strong> engineering applications. This is<br />
neither a novelty nor a fashion. The <strong>wavelet</strong> transform leads <strong>to</strong> the signal processing<br />
techniques with special characteristics that have been expected for a long time. [6]<br />
The term "<strong>wavelet</strong>" literally mens little wave because a <strong>wavelet</strong> decays quickly (lit-<br />
tle) with oscillations (wave) (see figure 6.1). Although countless functions may be little<br />
waves, the item <strong>wavelet</strong> is reserved for those little waves that are associated with a par-<br />
ticular choice: narrow-b<strong>and</strong> in frequency. Simply, <strong>wavelet</strong>s are window functions not<br />
only in time domain but also in frequency domain. The <strong>wavelet</strong> transform represents a<br />
signal through <strong>wavelet</strong>s. It is a linear transformation much like the Fourier transforma-<br />
tion but with important differences: the <strong>wavelet</strong> transform can localize simultaneously<br />
in time <strong>and</strong> in frequency, adjust the window widths according <strong>to</strong> frequency au<strong>to</strong>mati-<br />
cally <strong>and</strong> allow the flexible selection <strong>of</strong> <strong>wavelet</strong>s <strong>to</strong> match different applications.<br />
The <strong>wavelet</strong> transform as a new item was proposed by Morlet for geophysics signal<br />
processing in 1982 [8], but there was a long time preparation for its development. The<br />
<strong>wavelet</strong> transform was developed as a new theory in mathematics by Meyer, Gross-<br />
mann <strong>and</strong> Daubechies during 1984-1988. In 1989, Mallat proposed the multiresolution<br />
33
6.1. INTRODUCTION 34<br />
analysis theory <strong>and</strong> developed the fast <strong>algorithm</strong>s <strong>of</strong> the <strong>wavelet</strong> transform [7]. Since<br />
then, the <strong>wavelet</strong> transform has been spreading in different scientific areas because <strong>of</strong><br />
its perfection in theory <strong>and</strong> suitability for a wide range <strong>of</strong> applications specially for<br />
processing transient signals.<br />
As a transient signal, its amplitude, frequency or both do not stay constant when time<br />
changes. Up <strong>to</strong> now, the Fourier transform <strong>based</strong> methods are generally employed<br />
for the processing <strong>of</strong> power transients, despite that the Fourier transform is only suit-<br />
able for periodical signals. This is why there are still many unsatisfac<strong>to</strong>ry results <strong>and</strong><br />
nonunified definitions concerning the Fourier transform applications in power sys-<br />
tems, although great deal <strong>of</strong> concerning work has been done. There is always the<br />
requirement for a more suitable method <strong>to</strong> process power transients.<br />
With the development <strong>of</strong> the <strong>wavelet</strong> transform, it is naturally <strong>to</strong> explore <strong>and</strong> see how<br />
this promising approach works in power systems. Since 1994, the <strong>wavelet</strong> transform<br />
has been introduced in<strong>to</strong> power systems <strong>and</strong> applied for the analysis <strong>and</strong> the classifica-<br />
tion <strong>of</strong> power quality events [9], protections, data compression, cable partial discharge<br />
measurement <strong>and</strong> so on. There is a sharp increasing tendency in the presentation about<br />
the <strong>wavelet</strong> transform applications in power systems. The <strong>wavelet</strong> transform is becom-<br />
ing a well-known method <strong>and</strong> is drawing more attention <strong>of</strong> electrical engineers.<br />
Through the published papers, it is known that the <strong>wavelet</strong> transform is suitable for the<br />
analysis <strong>of</strong> power transients <strong>and</strong> has a big potential area in power system applications.<br />
However, it is noticed that the <strong>wavelet</strong> transform applications in power systems are<br />
still quite rough <strong>and</strong> limited:<br />
• They are mainly on the introduction <strong>of</strong> the basic conceptions <strong>and</strong> theory <strong>of</strong> the<br />
<strong>wavelet</strong> transform but lack <strong>of</strong> detail explanations <strong>and</strong> practical application re-<br />
sults.<br />
• They are mainly with qualitative analysis but short <strong>of</strong> rationing criteria <strong>and</strong> suf-<br />
ficient verifications.<br />
• They are mainly on the application <strong>of</strong> basic <strong>wavelet</strong> <strong>algorithm</strong> but hardly on the<br />
deep or extension theories such as <strong>wavelet</strong> singularity theory <strong>and</strong> improved al-
6.2. BASIC IDEAS OF THE WAVELET TRANSFORM 35<br />
gorithms etc.<br />
Therefore, the situation is that the <strong>wavelet</strong> transform applications in power systems<br />
are very meaningful but just at the beginning, <strong>and</strong> there is a great deal <strong>of</strong> concerning<br />
research <strong>to</strong> do.<br />
The <strong>wavelet</strong> transform with its special characteristics, such as the time-frequency lo-<br />
cation, the au<strong>to</strong>-adaptivity <strong>to</strong> frequency, the flexible selection <strong>and</strong> the fast <strong>algorithm</strong>s<br />
etc., opens a door <strong>to</strong>wards a lot <strong>of</strong> possibilities <strong>and</strong> large developing field in power<br />
systems. However, it is not very easy <strong>to</strong> start underst<strong>and</strong>ing <strong>and</strong> using the <strong>wavelet</strong><br />
transform because the <strong>wavelet</strong> transform is built up on the theories <strong>of</strong> modern math-<br />
ematics <strong>and</strong> modern signal processing [7] <strong>and</strong> the most the <strong>of</strong> published books about<br />
<strong>wavelet</strong> transform are the contributions <strong>of</strong> mathematicians.<br />
In this chapter, the first section gives the basic ideas <strong>of</strong> the <strong>wavelet</strong> transform. In the<br />
second section, the continuous <strong>wavelet</strong> transform (CWT) is introduced. The discrete<br />
<strong>wavelet</strong> transform (DWT) as the key point will be introduced in the third section. The<br />
forth section displays how the <strong>wavelet</strong> transform works through an example. The fifth<br />
section then describes <strong>and</strong> discusses the general problems <strong>and</strong> corresponding solutions<br />
in practical applications.<br />
6.2 Basic ideas <strong>of</strong> the <strong>wavelet</strong> transform<br />
6.2.1 Representation <strong>of</strong> signals through transforms<br />
The idea in mathematics <strong>and</strong> in engineering is <strong>to</strong> represent <strong>and</strong> <strong>to</strong> analyze a signal<br />
or a system in different domains. The changes from on domain <strong>to</strong> another are called<br />
transforms.<br />
An useful transform is <strong>to</strong> decompose a signal in<strong>to</strong> elementary functions for a space.<br />
These elementary functions should be chosen with some care <strong>to</strong> be sure that the trans-<br />
form is invertible. Generally, they should form an orthogonal base or a base for the<br />
respective space.
6.2. BASIC IDEAS OF THE WAVELET TRANSFORM 36<br />
Suppose that a sequence {ϕn(t)} is a base for a space, <strong>and</strong> then any functions f(t) in<br />
the space can be represented with this base. Namely, there is Equation 6.1.<br />
f(t) = � Inϕn(t) n ∈ Z (6.1)<br />
Where In is a scalar sequence generated through the inner product <strong>of</strong> f(t) <strong>and</strong> ϕn(t), as<br />
shown in equation 6.2.<br />
{In} = 〈f(t), ϕn(t)〉 =<br />
Where ϕ ∗ n(t) is the complex conjugation <strong>of</strong> the function ϕn(t).<br />
�<br />
+∞<br />
−∞<br />
f(t)ϕ ∗ n(t)dt (6.2)<br />
Equations 6.1 <strong>and</strong> equation 6.2 form a pair <strong>of</strong> transforms. Equation 6.2 is called the (for-<br />
ward) transform or the decomposition because it breaks a function in<strong>to</strong> pieces through<br />
the base for the space. Equation 6.1 is called the inverse transform or the reconstruction<br />
because it puts the pieces back <strong>to</strong>gether <strong>to</strong> retrieve the original signal. It is clear that<br />
the property <strong>of</strong> a base is determinate for the transform.<br />
A transform theory always involves how <strong>to</strong> break a function apart (transform) <strong>and</strong><br />
then <strong>to</strong> put it back <strong>to</strong>gether (inverse transform). The reason for doing this is that sig-<br />
nificant insights, clear patterns, <strong>and</strong> efficiencies can be obtained through the operation<br />
on the pieces rather than the original function. Electrical engineers are familiar <strong>to</strong> many<br />
transforms: Fourier transform, Laplace transform, z transform, symmetric components<br />
transform <strong>and</strong> so on. These transforms all have own well working areas.<br />
The <strong>wavelet</strong> transform is nothing else but another transform. It represents signals<br />
through the space base that have the expected characteristics.<br />
Representation <strong>of</strong> signals through the <strong>wavelet</strong> transform<br />
Wavelets <strong>and</strong> the admissible condition: A <strong>wavelet</strong> belongs <strong>to</strong> one kind <strong>of</strong> functions<br />
which have the following characteristics:<br />
• The amplitude quickly decays <strong>to</strong> zero in both directions.
6.2. BASIC IDEAS OF THE WAVELET TRANSFORM 37<br />
• The function is oscilla<strong>to</strong>ry.<br />
• Average value is zero<br />
The first characteristic makes a function "little" whereas the second one makes it "wavy"<br />
<strong>and</strong> hence a <strong>wavelet</strong>. These two characteristics must be simultaneously satisfied for a<br />
function <strong>to</strong> be a <strong>wavelet</strong>. A sinusoid never decays (i.e. wavy but not little) so that can<br />
not be a <strong>wavelet</strong>. A decay function (little but not wavy, e.g. Gauss function) also can<br />
not be a <strong>wavelet</strong>. However, the product <strong>of</strong> a wavy <strong>and</strong> a decay function can lead a<br />
<strong>wavelet</strong>. Figure 6.1 shows, as an example, how a <strong>wavelet</strong> is created: the product <strong>of</strong><br />
a sinusoid (6.1(a)) <strong>and</strong> a Gauss function (6.1(b)) makes a <strong>wavelet</strong> (6.1(c)) - the famous<br />
Morlet <strong>wavelet</strong> [8].<br />
Figure 6.1: Wavelet<br />
In mathematics, any function ψ(t) can be a <strong>wavelet</strong> if it satisfies the following condi-<br />
tion.
6.2. BASIC IDEAS OF THE WAVELET TRANSFORM 38<br />
�<br />
+∞<br />
−∞<br />
Equation 6.3 is called the admissible condition.<br />
ψ(t)dt = 0 (6.3)<br />
The admissible condition is quite lenient so that there are a lot <strong>of</strong> <strong>wavelet</strong>s, which can<br />
be discrete or continuous, real or complex functions. Figure 6.2 shows three different<br />
<strong>wavelet</strong>s as examples. The Haar <strong>wavelet</strong> (the simplest <strong>wavelet</strong>) <strong>and</strong> the Db2 <strong>wavelet</strong><br />
(one <strong>of</strong> Daubechies <strong>wavelet</strong>s) are discrete while the Mexican Hat <strong>wavelet</strong> is continuous.<br />
The continuous <strong>wavelet</strong>s are described with formulas, but the discrete <strong>wavelet</strong>s nor-<br />
mally have no direct formulas <strong>and</strong> are given through discrete filters.<br />
Figure 6.2: Examples <strong>of</strong> <strong>wavelet</strong>s<br />
Mother <strong>wavelet</strong>, <strong>wavelet</strong> family <strong>and</strong> <strong>wavelet</strong> domain: Any <strong>wavelet</strong> can be taken<br />
as a mother <strong>wavelet</strong>. A mother <strong>wavelet</strong> generates a <strong>wavelet</strong> family by scaling <strong>and</strong><br />
translating. All members in one <strong>wavelet</strong> family have the same energy <strong>and</strong> the similar<br />
waveform as the mother <strong>wavelet</strong>.<br />
Let ψ(t) denote a mother <strong>wavelet</strong>, the corresponding <strong>wavelet</strong> family ψab(t) is defined<br />
as Equation 6.4:<br />
ψab(t) = a −1/2 � �<br />
t − b<br />
· ψ<br />
a<br />
(6.4)<br />
Where a represents "scale" <strong>and</strong> b represents "translation". Figure 6.3 displays the re-<br />
lation between a mother <strong>wavelet</strong> (Morlet <strong>wavelet</strong>) <strong>and</strong> it’s family. It can be seen that
6.2. BASIC IDEAS OF THE WAVELET TRANSFORM 39<br />
translation b is just a representation <strong>of</strong> time <strong>and</strong> scale a influences the duration so that<br />
has a direct relation with frequency.<br />
Figure 6.3: Mother <strong>wavelet</strong> <strong>and</strong> <strong>wavelet</strong> family<br />
A <strong>wavelet</strong> family forms a base or an orthogonal base <strong>of</strong> the general space L 2 (R). There-<br />
fore, nearly every interesting function could be represented as a linear combination <strong>of</strong><br />
a <strong>wavelet</strong> family <strong>and</strong> also could be reconstructed. A space base formed by a <strong>wavelet</strong><br />
family is also called a <strong>wavelet</strong> base. Such representation with a <strong>wavelet</strong> base is called<br />
the <strong>wavelet</strong> transform.<br />
Special characteristics <strong>of</strong> a <strong>wavelet</strong> family: As other transforms, the characteristic<br />
<strong>of</strong> the <strong>wavelet</strong> transform is decided by the properties <strong>of</strong> the space base formed by the<br />
<strong>wavelet</strong> family, i.e. the <strong>wavelet</strong> base.<br />
Figure 6.4(a) shows an orthogonal <strong>wavelet</strong> base in the time-frequency plane. The<br />
<strong>wavelet</strong> base is like a music note, as shown in Figure 6.4(b), which tells when <strong>and</strong><br />
which <strong>to</strong>ne (frequency) is played. the <strong>wavelet</strong> base forms such windows, which are
6.2. BASIC IDEAS OF THE WAVELET TRANSFORM 40<br />
Figure 6.4: Property <strong>of</strong> a <strong>wavelet</strong> base<br />
rectangles with the same area but different shapes. Hence, the windows adjust au<strong>to</strong>-<br />
matically narrow at high frequency <strong>and</strong> wide at low frequency. Just these properties<br />
make the <strong>wavelet</strong> transform work in a special way.<br />
From Fourier Transform <strong>to</strong> Wavelet Transform<br />
The <strong>wavelet</strong> transform does not appear by chance but is a good result from the long<br />
time researches. The motivation is <strong>to</strong> overcome the drawbacks <strong>of</strong> the Fourier transform<br />
in analyzing transient signals.<br />
Fourier Transform: Nowadays, the Fourier transform is the most well known trans-<br />
form. Since 1822 Fourier created the theory <strong>and</strong> especially since 1965 the fast Fourier<br />
transform (FFT) was proposed, the Fourier transform has been applied in nearly all the<br />
engineering fields.<br />
In mathematics, the Fourier transform <strong>of</strong> a function f(t) is defined as:<br />
F (ω) = 〈f(t)e jωt 〉 =<br />
�<br />
+∞<br />
−∞<br />
f(t)e −jωt dt (6.5)<br />
It represents a signal with an orthogonal base {e jωt }, which includes the sinusoids <strong>of</strong><br />
different frequencies. In this way, the Fourier transform changes our view from time<br />
domain <strong>to</strong> frequency domain.
6.2. BASIC IDEAS OF THE WAVELET TRANSFORM 41<br />
The Fourier transform is perfect <strong>and</strong> quite simple in mathematics. However, many<br />
people are still working on it <strong>and</strong> there are many concerned definitions, such as tran-<br />
sient frequency <strong>and</strong> harmonics etc., still under the discussion in engineering. The rea-<br />
son is that the practical applications requires more than the theory has.<br />
The Fourier transform transfers a signal in<strong>to</strong> the frequency domain, the information<br />
evolving with time is lost completely. For example, two different signals have the<br />
same result through the Fourier transform, as shown in Figure 6.5. It is impossible<br />
for the Fourier transform <strong>to</strong> tell when a particular frequency <strong>to</strong>ok place. Besides, the<br />
Figure 6.5: Different signals but same Fourier trans-<br />
form representation<br />
Fourier transform needs the information in an infinite amount <strong>of</strong> time, i.e. all the past,<br />
present <strong>and</strong> future information <strong>of</strong> a signal, just <strong>to</strong> evaluate the spectrum at a single<br />
frequency. Strictly, the Fourier transform is only suitable for h<strong>and</strong>ling periodic or time-<br />
invariant signals in practical applications. Unfortunately, most <strong>of</strong> signals in practice are<br />
non-periodic <strong>and</strong> time-variant <strong>and</strong> transient characteristics such as a sudden change,<br />
beginnings <strong>and</strong> ends <strong>of</strong> events are <strong>of</strong>ten the most important part <strong>of</strong> signals.<br />
Therefore, it remains a challenge in practical applications how <strong>to</strong> analyze transient<br />
signals <strong>and</strong> how <strong>to</strong> obtain time information as well as frequency information simulta-
6.2. BASIC IDEAS OF THE WAVELET TRANSFORM 42<br />
neously.<br />
Figure 6.6: Wavelet Transform <strong>of</strong> two different sinu-<br />
soids<br />
Wavelet Transform The <strong>wavelet</strong> transform has the capability <strong>of</strong> time location as well<br />
as frequency location, similar as the Short Time Fourier Transform (STFT) in a certain<br />
degree. Unlike other transforms, it leads the expected flexible windows. Namely, it<br />
uses au<strong>to</strong>matically wide windows at low frequency <strong>and</strong> narrow windows at high fre-<br />
quency. These properties are just what have been searched for. Besides, the <strong>wavelet</strong><br />
transform is perfect hence fully supported by mathematics.<br />
The <strong>wavelet</strong> transform represents a signal with two new parameters, i.e. scale a <strong>and</strong><br />
translation b. Because translation b has the same meaning as time, the plane formed<br />
by translation <strong>and</strong> scale is called the time-scale domain or the <strong>wavelet</strong> domain. Notice<br />
that scale is related with frequency, the time-scale plane then is related with the time-<br />
frequency plane.<br />
Figure 6.6 displays the <strong>wavelet</strong> transforms <strong>of</strong> two different sinusoids, which have the<br />
same Fourier transform result (see Figure 6.5). It can be seen that the <strong>wavelet</strong> transform<br />
can distinguish between these two signals clearly <strong>and</strong> tell simultaneously when <strong>and</strong><br />
which scale or frequency concerning with the signals.<br />
A Physical Explanation <strong>of</strong> Wavelet Transform<br />
The <strong>wavelet</strong> transform can be roughly explained with the function <strong>of</strong> a lens, as shown<br />
in Figure 6.7. If a signal f(t) corresponds <strong>to</strong> an observed object, a <strong>wavelet</strong> base ψab(t)<br />
<strong>to</strong> a lens, then changing translation b is similar <strong>to</strong> make the lens move parallel with the<br />
object <strong>and</strong> the change <strong>of</strong> scale a <strong>to</strong> make the lens move forwards or backwards, i.e. <strong>to</strong>
6.2. BASIC IDEAS OF THE WAVELET TRANSFORM 43<br />
Figure 6.7: Wavelet transform, illustration <strong>of</strong> scale <strong>and</strong><br />
translation<br />
change the lens resolution. Different a corresponds <strong>to</strong> different resolution. It can be<br />
seen that:<br />
• The <strong>wavelet</strong> transform has the multiresolution characteristic so that a signal can<br />
be analyzed from larger features <strong>to</strong> finer features.<br />
• The <strong>wavelet</strong> transform has the ability <strong>of</strong> the simultaneous localization in time<br />
<strong>and</strong> in scale (or frequency) so that local properties <strong>of</strong> a signal can be analyzed.<br />
This is the reason that the <strong>wavelet</strong> transform is praised as a "mathematical microscope"<br />
in signal processing, as it is illustrated in figure 6.7.<br />
6.2.2 Continuous Wavelet Transform<br />
Definition <strong>of</strong> Continuous Wavelet Transform<br />
The continuous <strong>wavelet</strong> transform (CWT) <strong>of</strong> a function f(t) ⊂ L 2 (R) is given by Equa-<br />
tion 6.6.<br />
Wψf(a, b) =<br />
�<br />
+∞<br />
−∞<br />
f(t)ψ ∗ ab(t)dt (6.6)
6.2. BASIC IDEAS OF THE WAVELET TRANSFORM 44<br />
Where Wψf(a, b) are <strong>wavelet</strong> coefficients ψab(t) represents a <strong>wavelet</strong> family created by<br />
a mother <strong>wavelet</strong> ψ(t), a <strong>and</strong> b are the scale <strong>and</strong> the translation respectively, <strong>and</strong> the<br />
superscript " ∗ " denotes complex conjugation because <strong>wavelet</strong>s can be complex.<br />
The continuous <strong>wavelet</strong> transform transfers one-dimension functions in<strong>to</strong> the two di-<br />
mension plane, called the time-scale plan or simply the <strong>wavelet</strong> domain. A <strong>wavelet</strong><br />
coefficient shows the correlation degree between the function <strong>and</strong> the <strong>wavelet</strong> at a par-<br />
ticular scale <strong>and</strong> translation. The set <strong>of</strong> all <strong>wavelet</strong> coefficients is the <strong>wavelet</strong> domain<br />
representation <strong>of</strong> the function f(t) with respect <strong>to</strong> the <strong>wavelet</strong> family.<br />
The CWT is invertible. The inverse continuous <strong>wavelet</strong> transform (ICWT) is defined<br />
by Equation 6.7.<br />
Where the coefficient cψ =<br />
f(t) = W −1<br />
ψ f(a, b) = c−1<br />
ψ<br />
+∞ �<br />
0<br />
�<br />
+∞<br />
0<br />
a −2 �<br />
da<br />
|ψ(ω)| 2<br />
dω < +∞<br />
ω<br />
+∞<br />
−∞<br />
Wψf(a, b)ψab(t)db (6.7)<br />
The inverse continuous <strong>wavelet</strong> transform reconstructs the original function by sum-<br />
ming appropriately weighted <strong>wavelet</strong> family. the weights are the <strong>wavelet</strong> coefficients<br />
Wψf(a, b).<br />
Explanations about Continuous Wavelet Transform<br />
More about a Wavelet Family: A <strong>wavelet</strong> family can be produced from a mother<br />
<strong>wavelet</strong>:<br />
ψ(t)ψab(t) = a−1/2 � �<br />
t − b<br />
ψ<br />
a<br />
Wavelet families are only different versions <strong>of</strong> the mother <strong>wavelet</strong>. They have a similar<br />
shape, maybe some longer or some higher, but they have the same energy or norm as<br />
the mother <strong>wavelet</strong>, i.e. ||ψab(t)||2 = ||ψ(t)||2.<br />
It is very important <strong>to</strong> keep a unified energy in one <strong>wavelet</strong> family so that a unified<br />
base for energy measurement can be kept during the <strong>wavelet</strong> transform.
6.2. BASIC IDEAS OF THE WAVELET TRANSFORM 45<br />
Scale <strong>and</strong> Frequency Scaling a function simply means stretching or compressing it.<br />
Figure 6.3 shows the effect <strong>of</strong> the scale a. The larger scales correspond <strong>to</strong> the more<br />
"stretched" waves. It is clear that, for a sinusoidal function, the scale a is inverse pro-<br />
portion <strong>to</strong> the frequency ω.<br />
There is a similar relation between the scale <strong>and</strong> the frequency in the <strong>wavelet</strong> trans-<br />
form. The more stretched the <strong>wavelet</strong>, the longer the portion <strong>of</strong> the signal will be<br />
analyzed, <strong>and</strong> thus the coarser or lower frequency features <strong>of</strong> the signal will be mea-<br />
sured by the <strong>wavelet</strong> coefficients. Therefore, there is a corresponding relation between<br />
the <strong>wavelet</strong> scale <strong>and</strong> frequency as following:<br />
• Small scale ⇒ compressed <strong>wavelet</strong> ⇒ rapidly changing detail ⇒ high frequency.<br />
• Large scale ⇒ stretched <strong>wavelet</strong> ⇒ slowly changing, coarse feature ⇒ low fre-<br />
quency.<br />
In other words, frequency is inverse proportional <strong>to</strong> scale. However, the proportion<br />
ratio depends on the mother <strong>wavelet</strong>, sampling frequency <strong>and</strong> the <strong>wavelet</strong> transform<br />
type (CWT or DWT). Figure 6.8(a) shows the relation between frequency <strong>and</strong> scale<br />
with a given sampling frequency. The sampling frequency leads <strong>to</strong> the corresponding<br />
frequency b<strong>and</strong> in different scale levels. Figure 6.8(b) is an example for a sampling<br />
frequency <strong>of</strong> 4,8 kHz. Of course the sampling frequency should fulfil the Nyquist<br />
criteria which depends on the highest frequency <strong>of</strong> the signal.<br />
For obtaining a fixed relation, there is a simple method. [9] The relation can be derived<br />
for a particular <strong>wavelet</strong> function by making the <strong>wavelet</strong> transform <strong>of</strong> a cosine wave<br />
function with a known frequency <strong>and</strong> computing the scale a at which the <strong>wavelet</strong> co-<br />
efficient reaches its maximum. Following this method, the relation between frequency<br />
<strong>and</strong> scale is obtained for the Db4 <strong>wavelet</strong> in form ψ(t) = e −t2 /2 cos(5t):<br />
1<br />
f = kfs<br />
a<br />
1<br />
= 0, 8fs<br />
a<br />
(6.8)<br />
Where f <strong>and</strong> a are corresponding <strong>to</strong> frequency <strong>and</strong> scale, fs denotes sampling fre-<br />
quency in Hz <strong>and</strong> k is a constant which changes solely with function form <strong>of</strong> each
6.2. BASIC IDEAS OF THE WAVELET TRANSFORM 46<br />
Figure 6.8: Scale level <strong>and</strong> frequency b<strong>and</strong><br />
mother <strong>wavelet</strong> (for the Db4 <strong>wavelet</strong> k = 0, 8).<br />
More about the Admissible Condition The admissible condition shown in Equation<br />
6.3 can be represented in frequency domain:<br />
�+∞<br />
0<br />
|ψ(ω)| 2<br />
dω < +∞ (6.9)<br />
ω<br />
Where ω denotes the radian frequency <strong>and</strong> Ψ(ω) is the Fourier transform representa-<br />
tion <strong>of</strong> the function ψ(t). Equation 6.8 is not a new condition but just the same condition<br />
described in a different domain.<br />
The requirement on coefficient cψ in the inverse continuous <strong>wavelet</strong> transform, shown<br />
in Equation 6.7, is just the admissible condition. This is not by chance but means that<br />
the admissible condition keeps the <strong>wavelet</strong> transform invertible.<br />
Any function can be a mother <strong>wavelet</strong> if it satisfies the admissible condition. Most<br />
natural signals satisfy this condition, thus they could be mother <strong>wavelet</strong>s in theory. In<br />
practice, a mother <strong>wavelet</strong> should be chosen carefully <strong>to</strong> meet the needs <strong>of</strong> applica-<br />
tions.
6.2. BASIC IDEAS OF THE WAVELET TRANSFORM 47<br />
Calculation <strong>of</strong> the Continuous Wavelet Transform<br />
The calculation <strong>of</strong> the continuous <strong>wavelet</strong> transform is a quite simple process. There<br />
are five steps:<br />
1. Chose a <strong>wavelet</strong> <strong>and</strong> locate it at the start section <strong>of</strong> the original signal.<br />
Figure 6.9: Step 1 <strong>of</strong> the continuous <strong>wavelet</strong> transform<br />
2. Calculate a <strong>wavelet</strong> coefficient according <strong>to</strong> Equation 6.6.<br />
3. Shift the <strong>wavelet</strong> <strong>to</strong> the right <strong>and</strong> repeat step 1 <strong>and</strong> 2 until the whole signal is<br />
covered.<br />
Figure 6.10: Step 3 <strong>of</strong> the continuous <strong>wavelet</strong> trans-<br />
form<br />
4. Scale the <strong>wavelet</strong> <strong>and</strong> repeat step 1 through 3<br />
5. Repeat step 1 through 4 for all scales.<br />
With the help <strong>of</strong> the <strong>wavelet</strong> transform, a one-dimensional signal can be represented<br />
in two-dimensional domain. Figure 6.12 shows, as an example, the <strong>wavelet</strong> domain
6.2. BASIC IDEAS OF THE WAVELET TRANSFORM 48<br />
Figure 6.11: Step 4 <strong>of</strong> the continuous <strong>wavelet</strong> trans-<br />
form<br />
Figure 6.12: The continuous <strong>wavelet</strong> transform (Here:<br />
f=800/a, t=b)<br />
representations <strong>of</strong> a power signal. figure 6.12(a) displays the signal which contains 3rd<br />
harmonic component. The signal is transferred in<strong>to</strong> 32 scales through Morlet <strong>wavelet</strong>,<br />
where the relation between scale <strong>and</strong> frequency is: frequency = 800/scale. Figure<br />
6.12(b) displays the <strong>wavelet</strong> representation on the time-scale plane in 2D, where the<br />
dark degree is proportional <strong>to</strong> the absolute value <strong>of</strong> the <strong>wavelet</strong> coefficients. It can be<br />
seen that the <strong>wavelet</strong> transform locates the energy around scale 16 <strong>and</strong> 5.34 (i.e. 50 Hz<br />
<strong>and</strong> 150 Hz), which corresponds <strong>to</strong> the fundamental frequency <strong>and</strong> the 3rd harmonics<br />
in the signal, <strong>and</strong> shows the time information <strong>of</strong> the signal at the same time. Creating<br />
the <strong>wavelet</strong> coefficients at every possible scale leads <strong>to</strong> a large quantity <strong>of</strong> the calcula-<br />
tion because the continuous <strong>wavelet</strong> transform is great redundant. Because the basic<br />
calculation <strong>of</strong> the CWT is an inner product or a convolution, there are some faster algo-
6.2. BASIC IDEAS OF THE WAVELET TRANSFORM 49<br />
Figure 6.13: The dyadic lattice in the time-scale plane<br />
rithms that concern the convolution theorem. For example, it is considerably faster <strong>to</strong><br />
do the calculation in the frequency domain with the help <strong>of</strong> the Fourier transform: one<br />
can calculate the <strong>wavelet</strong> coefficients for a given scale at all sections simultaneously<br />
(step 2 <strong>and</strong> 3 at the same time) <strong>and</strong> efficiently.<br />
6.2.3 Discretization <strong>of</strong> Continuous Wavelet Transform<br />
As mentioned above, <strong>to</strong> carry out the continuous <strong>wavelet</strong> transform is a fair amount<br />
<strong>of</strong> work <strong>and</strong> it generates large amount <strong>of</strong> data. Therefore, the continuous <strong>wavelet</strong><br />
transform is primarily employed <strong>to</strong> derive properties <strong>and</strong> the discrete form is necessary<br />
for reducing redundancy <strong>and</strong> for most computer implementations.<br />
In general, the discrete forms <strong>of</strong> the continuous <strong>wavelet</strong> transforms are generated by<br />
the sampling from the corresponding continuous <strong>wavelet</strong> transform. For example, the<br />
scale is sampled by a = a j<br />
0, <strong>and</strong> the translation by b = nb0a j<br />
0, where a0 <strong>and</strong> b0 are the<br />
discrete scale <strong>and</strong> the translation step sizes respectively <strong>and</strong> j ∈ Z. If a0 = 2 <strong>and</strong> b0 = 1,<br />
then the scales <strong>and</strong> positions will be <strong>based</strong> on the power <strong>of</strong> two, i.e. a = 2 j <strong>and</strong> b = n2 j .<br />
The <strong>wavelet</strong> coefficients then correspond <strong>to</strong> the dyadic lattice points in the time-scale<br />
plane, as shown in Figure 6.13. This lattice can be indexed by two integers: j <strong>and</strong> n,<br />
where j corresponds <strong>to</strong> the discrete scale levels <strong>and</strong> n <strong>to</strong> the discrete translation steps.
6.2. BASIC IDEAS OF THE WAVELET TRANSFORM 50<br />
For a function f(t) <strong>and</strong> a mother <strong>wavelet</strong> ψ(t), the corresponding discrete form <strong>of</strong> the<br />
continuous <strong>wavelet</strong> transform is then:<br />
Wψf(j, n) = 2 −j/2<br />
�<br />
f(t)ψ ∗<br />
� j t − 2 n<br />
2j �<br />
dt (6.10)<br />
In such a way, the discretization <strong>of</strong> the continuous <strong>wavelet</strong> transform is done. Since<br />
only the scale <strong>and</strong> the translation are discrete in the power <strong>of</strong> two <strong>and</strong> the time variable<br />
is continuous, the discrete transform in Equation 6.10 is called the continuous time<br />
<strong>wavelet</strong> series or the dyadic <strong>wavelet</strong> transform.<br />
A discrete form <strong>of</strong> the continuous <strong>wavelet</strong> transform is specified by the sampling<br />
choice <strong>of</strong> the scale <strong>and</strong> the translation in the time-scale plane <strong>and</strong> the choice <strong>of</strong> the<br />
mother <strong>wavelet</strong>. It is clear that there might be infinite such choices but certainly that<br />
the choices cannot be made arbitrarily. The limit is that such the discretization should<br />
satisfy a basic property, namely, invertibility.<br />
This very practical filtering <strong>algorithm</strong> yields a fast <strong>wavelet</strong> transform - a box in<strong>to</strong> which<br />
a signal passes, <strong>and</strong> out <strong>of</strong> which <strong>wavelet</strong> coefficients quickly emerge. Let’s examine<br />
this in more depth.<br />
One-Stage Filtering: Approximations <strong>and</strong> Details<br />
For many signals, the low-frequency content is the most important part. It is what gives<br />
the signal its identity. The high-frequency content, on the other h<strong>and</strong>, imparts nuance.<br />
It is like the human voice. Removing <strong>of</strong> high-frequency components, causes the voice<br />
sounding different, but it can be underst<strong>and</strong>. However, enough removing <strong>of</strong> the low-<br />
frequency components, causes the voice not <strong>to</strong> be unders<strong>to</strong>od. In <strong>wavelet</strong> analysis, this<br />
parts are called approximations <strong>and</strong> details. The approximations are the high-scale,<br />
low-frequency components <strong>of</strong> the signal. The details are the low-scale, high-frequency<br />
components.<br />
The one stage filtering process, at its most basic level, looks like this:<br />
To get as much samples as the input signals, the approximated <strong>and</strong> the detailed part
6.2. BASIC IDEAS OF THE WAVELET TRANSFORM 51<br />
are downsampled by two.<br />
Multiple-level decomposition<br />
Figure 6.14: One - stage - filtering<br />
The decomposition process can be iterated, with successive approximations being de-<br />
composed in turn, so that one signal is broken down in<strong>to</strong> many lower resolution com-<br />
ponents. This is called the <strong>wavelet</strong> decomposition tree. Since the analysis process is<br />
iterative, in theory it can be continued indefinitely. In reality, the decomposition can<br />
proceed only until the individual details consist <strong>of</strong> a single sample or pixel.
6.2. BASIC IDEAS OF THE WAVELET TRANSFORM 52<br />
Figure 6.15: Multiple - level - decomposition
Chapter 7<br />
Algorithm <strong>to</strong> <strong>determine</strong> certain kind <strong>of</strong><br />
disturbances<br />
The discrete <strong>wavelet</strong> transform, which was described in the former chapter, is now<br />
used <strong>to</strong> <strong>detect</strong> <strong>and</strong> <strong>to</strong> <strong>determine</strong> certain kind <strong>of</strong> disturbances in power networks.<br />
7.1 Theory<br />
For the theory <strong>of</strong> the discrete <strong>wavelet</strong> transform is fully explained in chapter 6. The<br />
discrete <strong>wavelet</strong> transform <strong>to</strong>gether with multiple level decomposition is used for the<br />
analyze <strong>of</strong> disturbance recordings.<br />
By using the DWT <strong>and</strong> observing the particular features <strong>of</strong> the several decomposition<br />
levels <strong>of</strong> a signal, some important conclusions can be drawn. These information can<br />
be used <strong>to</strong> <strong>detect</strong> <strong>and</strong> <strong>to</strong> identify the disturbance. A digital program is developed <strong>and</strong><br />
written with the <strong>wavelet</strong> <strong>to</strong>olbox in MATLAB.<br />
Each disturbance occurred in the power network results in specific frequencies in the<br />
voltage waveform. Thus only the voltages have <strong>to</strong> be analyzed.<br />
The program works in five steps as follows:<br />
Step 1: Evaluation <strong>of</strong> the square <strong>of</strong> the <strong>wavelet</strong> coefficients <strong>of</strong> the recorded distur-<br />
53
7.1. THEORY 54<br />
bance.<br />
Step 2: Evaluation <strong>of</strong> the square <strong>of</strong> the <strong>wavelet</strong> coefficients found at step 1.<br />
Step 3: Calculation <strong>of</strong> the dis<strong>to</strong>rted signal energy, in each <strong>wavelet</strong> coefficient level.<br />
The "energy" mentioned above is <strong>based</strong> on the Parseval’s theorem: "the energy that<br />
a time domain function contains is equal <strong>to</strong> the sum <strong>of</strong> all energy concentrated in<br />
the different resolution levels <strong>of</strong> the corresponding <strong>wavelet</strong> transformed signal".<br />
This can be mathematically expressed as:<br />
Where:<br />
N�<br />
|f(n)| 2 =<br />
n=1<br />
N�<br />
|aJ(n)| 2 +<br />
n=1<br />
f(n): Time domain signal in study<br />
J�<br />
j=1 n=1<br />
N: Total number <strong>of</strong> samples <strong>of</strong> the signal<br />
N�<br />
|f(n)| 2 : Total energy <strong>of</strong> the f(n) signal<br />
n=1<br />
N�<br />
|dj(n)| 2<br />
N�<br />
|aJ(n)| 2 : Total energy concentrated in the level "j" <strong>of</strong> the approximated<br />
n=1<br />
J�<br />
j=1 n=1<br />
version <strong>of</strong> the signal.<br />
N�<br />
|dj(n)| 2 :Total energy concentrated in the detailed version <strong>of</strong> the signal,<br />
from levels "1" <strong>to</strong> "j".<br />
(7.1)<br />
Step 4: In this stage the steps 1, 2 <strong>and</strong> 3 are repeated for the corresponding "pure sinu-<br />
soidal version" <strong>of</strong> the signal in study.<br />
Step 5: The <strong>to</strong>tal dis<strong>to</strong>rted signal energy <strong>of</strong> the signal in study (found in step 3) is com-<br />
pared <strong>to</strong> the corresponding one <strong>of</strong> the pure sinusoidal signal version (evaluated<br />
in step 4). The result <strong>of</strong> this comparison is a deviation that can be evaluated by<br />
equation 7.2.<br />
� �<br />
energy(j) − reference_energy(j)<br />
deviation_energy(j)(%) =<br />
· 100% (7.2)<br />
reference_energy(7)<br />
where:
7.2. ANALYZATION OF THE DISTURBANCES 55<br />
j: <strong>wavelet</strong> decomposition level<br />
deviation_energy: Deviation between the energy distributions <strong>of</strong> the signal in<br />
study <strong>and</strong> its corresponding pure sinusoidal wave signal, at<br />
each <strong>wavelet</strong> decomposition level<br />
energy: energy distribution <strong>of</strong> the signal in study<br />
reference_energy: energy distribution <strong>of</strong> the pure sinusoidal signal version<br />
reference_energy(7): energy concentrated at the level 7 (which concentrates the<br />
highest energy) <strong>of</strong> the pure sinusoidal signal version.<br />
As will be shown in the next section, the deviation <strong>of</strong> the distributed energy curve <strong>of</strong><br />
the signal in study <strong>and</strong> the pure sinusoidal version <strong>of</strong> every particular power quality<br />
disturbance has an unique pattern that can be used <strong>to</strong> identify the origin <strong>of</strong> a voltage<br />
disturbance.<br />
7.2 Analyzation <strong>of</strong> the disturbances<br />
7.2.1 Detecting <strong>and</strong> localizing in time a disturbance<br />
The <strong>wavelet</strong> which is used for this study was the "Daub4", which is shown in figure 7.1<br />
The figure ?? shows a voltage which was dis<strong>to</strong>rted by a capaci<strong>to</strong>r switching.<br />
Figure ??(a) is the voltage which is analyzed. Figure ??(b) is the <strong>wavelet</strong> approximated<br />
coefficient for level 5, (c) (d) (e) (f) <strong>and</strong> (g)are the the detailed versions for levels 5,4,3,2<br />
<strong>and</strong> 1. The detailed level 1 (figure ??(g)) <strong>of</strong> the transformed signal clearly shows a peak<br />
at t=400ms. The other <strong>wavelet</strong> levels have also experienced variations at the same time.<br />
This implies that some transient phenomena has occurred at this time. Therefore, it can<br />
be said that the disturbance has been <strong>detect</strong>ed <strong>and</strong> located in time. However this figure<br />
brings no sufficient evidences <strong>of</strong> what kind <strong>of</strong> disturbance occurred <strong>to</strong> this signal.
7.2. ANALYZATION OF THE DISTURBANCES 56<br />
Figure 7.1: Daubechies4 <strong>wavelet</strong><br />
Figure 7.2: Detecting a disturbance, using<br />
Daubechies4 <strong>wavelet</strong> - <strong>wavelet</strong> coefficients squared
7.2. ANALYZATION OF THE DISTURBANCES 57<br />
Figure 7.3: Distribution <strong>of</strong> energy in 10 <strong>wavelet</strong> coeffi-<br />
cient levels<br />
7.2.2 Identifying the disturbance<br />
In order <strong>to</strong> try <strong>to</strong> identify the type <strong>of</strong> disturbance <strong>of</strong> this voltage signal, the step 3<br />
(which was explained in chapter 7.1 has <strong>to</strong> be work out. In this step, through equation<br />
7.1, the energy concentrated in 10 <strong>wavelet</strong> coefficient levels is calculated <strong>and</strong> plotted.<br />
The results are in figure 7.3(a). The 7th level holds the biggest part <strong>of</strong> the signal energy.<br />
The 6th level keeps also an important parcel <strong>of</strong> it. The remaining levels practically do<br />
not add any important parcel <strong>to</strong> the signal energy. After this, in step 4, the fundamental<br />
component <strong>of</strong> figure ??(a) voltage is evaluated as well as the corresponding energy dis-<br />
tribution. This is illustrated in figure 7.3(b). After this, if a visual comparison was made<br />
between figures 7.3(a) <strong>and</strong> (b), no important differences could be observed. However,<br />
these figures are not equal. In order <strong>to</strong> spot these differences, the equation 7.2 is used.<br />
This equation allows the calculation <strong>of</strong> the deviation between the energy distributions<br />
<strong>of</strong> the signal in study <strong>and</strong> its corresponding fundamental sinusoidal wave signal, at<br />
each <strong>wavelet</strong> decomposition level. The result <strong>of</strong> this is the deviation curve, illustrated<br />
in figure . This curve shows the deviations <strong>of</strong> the signal with disturbance from the<br />
corresponding pure sinusoidal one. The curve <strong>of</strong> figure 7.3(c) is within the "pattern"<br />
for capaci<strong>to</strong>r bank switching.
7.2. ANALYZATION OF THE DISTURBANCES 58<br />
Figure 7.4: Some voltage signals with power quality<br />
disturbances<br />
7.2.3 Generalizing the classification pattern<br />
The analysis <strong>of</strong> the capaci<strong>to</strong>r bank switching, shown in the previous section, can be<br />
exp<strong>and</strong>ed <strong>to</strong> other power quality disturbances. Figure 7.4(a) shows the perfect fun-<br />
damental voltage waveform <strong>and</strong> is used as a reference for the other seven voltage<br />
waveforms. Figures 7.4(b) <strong>to</strong> (h) show seven voltage waveforms that represent typ-<br />
ical power quality disturbances: a short-circuit fault 7.4(b), a notching dis<strong>to</strong>rtion 7.4(c),<br />
a harmonic dis<strong>to</strong>rtion 7.4(d), a voltage sag 7.4(e), a voltage swell 7.4(f), a capaci<strong>to</strong>r bank<br />
switching 7.4(g) <strong>and</strong> a inductive-resistive load switching 7.4(h). All this voltage wave-<br />
forms leads <strong>to</strong> characteristic deviations <strong>of</strong> energy distribution pattern. So the five steps<br />
described above were used <strong>to</strong> get these pattern. The pattern for this seven voltage<br />
waveforms are shown in figure 7.5. Figure 7.5(a) does not show any deviation because<br />
it refers exactly <strong>to</strong> the pure sinusoidal <strong>and</strong> there is no deviation. This pattern can be<br />
calculated for each disturbance which can occur in power networks. Of course these<br />
pattern are not always exactly the same, but in a small range.
7.2. ANALYZATION OF THE DISTURBANCES 59<br />
Figure 7.5: Deviation in distributed energy related <strong>to</strong><br />
figure 7.4
7.3. MATLAB IMPLEMENTATION 60<br />
Figure 7.6: Structure chart <strong>of</strong> the program module<br />
which calculates the reference energy<br />
7.3 MATLAB implementation<br />
7.3.1 Program modules<br />
The theory in the section above is now implemented in a Matlab program. This pro-<br />
gram is splitted in<strong>to</strong> three small modules. The first module, which imports the distur-<br />
bance recordings in<strong>to</strong> Matlab was already described in chapter 5. Two versions <strong>of</strong> this<br />
module are able <strong>to</strong> import disturbances recorded in Comtrade format (see chapter 4)<br />
as well as disturbances s<strong>to</strong>red in MATLAB [10].<br />
The second module has <strong>to</strong> be run after the import <strong>of</strong> the disturbance data <strong>and</strong> calculates<br />
the reference signal, the multiple <strong>wavelet</strong> decomposition <strong>and</strong> the energy distribution<br />
over ten <strong>wavelet</strong> decomposition levels. This energy distribution is used as the reference<br />
energy distribution for the second module <strong>to</strong> identify the disturbance. Figure 7.6 shows<br />
the structure chart <strong>of</strong> this module.<br />
The third small program calculates the disturbed energy distribution <strong>of</strong> the signal in<br />
study <strong>and</strong> the deviation from the reference energy distribution. The result is the devi-<br />
ation <strong>of</strong> energy distribution pattern. The function <strong>of</strong> this program is illustrated in the<br />
structure chart in figure 7.7. The shadowed part <strong>of</strong> the program module is finished but<br />
not tested. It can be tested if the pattern are calculated for 50Hz <strong>and</strong> the corresponding<br />
sampling frequency.
7.3. MATLAB IMPLEMENTATION 61<br />
7.3.2 Summary<br />
Figure 7.7: Structure chart <strong>of</strong> the program module<br />
which identifies the disturbance<br />
It is possible <strong>to</strong> add new pattern for other disturbances. The calculation is the same as<br />
with already integrated disturbances. It is not necessary <strong>to</strong> find new criteria <strong>to</strong> <strong>detect</strong><br />
these new disturbances, as it is necessary if the identifying is estimated with changing<br />
<strong>of</strong> the RMS values (for example for a short circuit the criterias are: decreasing voltage<br />
<strong>and</strong> increasing current, but this can be a load switching also, thus additional criterias<br />
are need for this identifying).<br />
The characteristic pattern described are calculated for a voltage frequency <strong>of</strong> 60Hz at<br />
an unknown sampling rate. So these pattern have <strong>to</strong> be adopted for 50Hz <strong>and</strong> a known<br />
sampling frequncy. Through simulations with Matlab it is known that for getting the<br />
same pattern as described, a sampling rate <strong>of</strong> 8333,33Hz is necessary. Because this is<br />
not possible, the new pattern have <strong>to</strong> be calculated. To calculate them, it is necessary<br />
<strong>to</strong> have very clear disturbance recordings. Of course this is possible with a simula-<br />
<strong>to</strong>r (power network model or computer <strong>based</strong> simula<strong>to</strong>r). It is very interesting <strong>to</strong> do<br />
this simulation with a sampling rate <strong>of</strong> 12,8kHz, because the Simeas R disturbance<br />
recorder can be used <strong>to</strong> get the disturbance recordings or 6,4kHz because the distur-<br />
bance recording can be downsampled from the recordings from the Simeas R. The<br />
pattern for several equal disturbances are not the same exactly but in a small range. So<br />
several disturbances for each fault have <strong>to</strong> be calculated <strong>to</strong> get the range <strong>of</strong> the pattern.<br />
In the time for this diploma thesis, it was not possible <strong>to</strong> make these simulations.<br />
It is obvious <strong>to</strong> use this small peaks, which are described above for localizing the dis-
7.3. MATLAB IMPLEMENTATION 62<br />
turbance <strong>to</strong> <strong>detect</strong> also involving faults. So they can be separated <strong>and</strong> each one can<br />
be calculated for its own. The result is a higher accuracy in the identification <strong>of</strong> the<br />
disturbances.<br />
Also possible is the adaptation <strong>of</strong> the Matlab programs for a very fast digital signal<br />
processor. So the disturbances can be <strong>detect</strong>ed very fast. And it can be integrated in a<br />
digital measuring or recording device. It is only necessary <strong>to</strong> s<strong>to</strong>re the pattern for each<br />
disturbance. Each pattern has ten values only, so their is a very small need <strong>of</strong> memory.
Chapter 8<br />
Conclusion <strong>and</strong> Look-Out<br />
The identifying <strong>of</strong> disturbances with the use <strong>of</strong> <strong>wavelet</strong>s is a very individual method.<br />
As a result <strong>of</strong> this Diploma thesis, the power quality recorder could be integrated in<br />
the labora<strong>to</strong>ry <strong>and</strong> in the power network simula<strong>to</strong>r. It is still in use <strong>and</strong> moni<strong>to</strong>rs the<br />
power supply the hole time. It is used by the students <strong>to</strong>o. Another usage <strong>of</strong> this power<br />
quality recorder is in different companies, which have problem with power quality, <strong>to</strong><br />
moni<strong>to</strong>r disturbances <strong>and</strong> <strong>determine</strong> the origin <strong>of</strong> this disturbances.<br />
As a second step the COMTRADE format was analyzed <strong>and</strong> a program was written <strong>to</strong><br />
import this recording in COMTRADE format in<strong>to</strong> MATLAB for further calculations.<br />
The extensive theory <strong>of</strong> <strong>wavelet</strong>s could be introduced <strong>to</strong> the students <strong>and</strong> the staff at<br />
the institute. The use <strong>of</strong> <strong>wavelet</strong>s <strong>to</strong> analyze disturbances in power networks is a very<br />
new <strong>and</strong> growing area in electrical engineering. This diploma thesis is a contribution<br />
<strong>to</strong> this field. As a result <strong>of</strong> missing disturbance recordings with the correct sampling<br />
frequency, it was not possible <strong>to</strong> test the identifying <strong>algorithm</strong> completely. But it is a<br />
base <strong>to</strong> carry on this work.<br />
63
List <strong>of</strong> Figures<br />
2.1 Connections <strong>of</strong> SIMEAS R . . . . . . . . . . . . . . . . . . . . . . . . . . . 9<br />
2.2 OSCOP P parameterizing . . . . . . . . . . . . . . . . . . . . . . . . . . . 12<br />
2.3 OSCOP P evaluation RMS values shows a earth-fault in L1 . . . . . . . . 13<br />
2.4 OSCOP P evaluation analog value shows the same earth-fault in L1 as<br />
in Figure 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13<br />
3.1 SIMEAS R in the testing setup with lap<strong>to</strong>p . . . . . . . . . . . . . . . . . 15<br />
3.2 SIMEAS R in the labora<strong>to</strong>ry use at the Department for Electrical Power<br />
Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16<br />
5.1 Structure chart <strong>of</strong> the first program part for reading the configuration file 29<br />
5.2 Structure chart <strong>of</strong> the second program part for reading the data file . . . 30<br />
6.1 Wavelet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37<br />
6.2 Examples <strong>of</strong> <strong>wavelet</strong>s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38<br />
6.3 Mother <strong>wavelet</strong> <strong>and</strong> <strong>wavelet</strong> family . . . . . . . . . . . . . . . . . . . . . 39<br />
6.4 Property <strong>of</strong> a <strong>wavelet</strong> base . . . . . . . . . . . . . . . . . . . . . . . . . . . 40<br />
6.5 Different signals but same Fourier transform representation . . . . . . . 41<br />
6.6 Wavelet Transform <strong>of</strong> two different sinusoids . . . . . . . . . . . . . . . . 42<br />
6.7 Wavelet transform, illustration <strong>of</strong> scale <strong>and</strong> translation . . . . . . . . . . 43<br />
64
LIST OF FIGURES 65<br />
6.8 Scale level <strong>and</strong> frequency b<strong>and</strong> . . . . . . . . . . . . . . . . . . . . . . . . 46<br />
6.9 Step 1 <strong>of</strong> the continuous <strong>wavelet</strong> transform . . . . . . . . . . . . . . . . . 47<br />
6.10 Step 3 <strong>of</strong> the continuous <strong>wavelet</strong> transform . . . . . . . . . . . . . . . . . 47<br />
6.11 Step 4 <strong>of</strong> the continuous <strong>wavelet</strong> transform . . . . . . . . . . . . . . . . . 48<br />
6.12 The continuous <strong>wavelet</strong> transform (Here: f=800/a, t=b) . . . . . . . . . . 48<br />
6.13 The dyadic lattice in the time-scale plane . . . . . . . . . . . . . . . . . . 49<br />
6.14 One - stage - filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51<br />
6.15 Multiple - level - decomposition . . . . . . . . . . . . . . . . . . . . . . . . 52<br />
7.1 Daubechies4 <strong>wavelet</strong> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56<br />
7.2 Detecting a disturbance, using Daubechies4 <strong>wavelet</strong> - <strong>wavelet</strong> coeffi-<br />
cients squared . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56<br />
7.3 Distribution <strong>of</strong> energy in 10 <strong>wavelet</strong> coefficient levels . . . . . . . . . . . 57<br />
7.4 Some voltage signals with power quality disturbances . . . . . . . . . . . 58<br />
7.5 Deviation in distributed energy related <strong>to</strong> figure 7.4 . . . . . . . . . . . . 59<br />
7.6 Structure chart <strong>of</strong> the program module which calculates the reference<br />
energy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60<br />
7.7 Structure chart <strong>of</strong> the program module which identifies the disturbance 61
List <strong>of</strong> Tables<br />
5.1 Data structure <strong>of</strong> the calculating <strong>algorithm</strong> . . . . . . . . . . . . . . . . . 32<br />
66
Bibliography<br />
[1] Ronald W. Schafer Alan V. Oppenheim. Discrete-time signal processing. Prentice<br />
Hall, 1999.<br />
[2] Analogy Inc. SABER design applications reference, july, 1997.<br />
[3] IEEE C37.111-1991. IEEE St<strong>and</strong>ard Common Format for Transient Data Exchange<br />
(COMTRADE) for Power Systems. IEEE St<strong>and</strong>ards Board.<br />
[4] IEEE Std. C37.111-1999. IEEE St<strong>and</strong>ard Common Format for Transient Data Exchange<br />
(COMTRADE) for Power Systems. IEEE St<strong>and</strong>ards Board. Revision <strong>of</strong> IEEE Std.<br />
C37.111-1991.<br />
[5] Gerhard Doblinger. MATLAB - Programmierung in der digitalen Signalverarbeitung.<br />
J. Schlembach Fachverlag, 2001.<br />
[6] Shang Li. Wavelet Transform Application in Power Systems. PhD thesis, Friedrich<br />
Alex<strong>and</strong>er University <strong>of</strong> Erlangen-Nuremberg, 2002.<br />
[7] S. Mallat. A Wavelet Tour <strong>of</strong> Signal Processing. Academic Press, 1997.<br />
[8] J. Morlet. Wave Propagation <strong>and</strong> Sampling Theory <strong>and</strong> Complex waves. Technical<br />
report, Geophysics, 47 (2), pp. 222-236, 1982.<br />
[9] Penna C. Resende J. W., Chaves M.L.R. Identification <strong>of</strong> power quality disturbances<br />
using the MATLAB <strong>wavelet</strong> transform <strong>to</strong>olbox. Technical report, Universidade Fed-<br />
eral de Uberl<strong>and</strong>ia.<br />
67
[10] Schmaranz Robert. Detection <strong>and</strong> Identification <strong>of</strong> Disturbances. PhD thesis, De-<br />
partment for Electrical Power Systems, Graz University <strong>of</strong> Technology, estimated<br />
publication spring 2004.<br />
[11] the Math Works Inc. Matlab c○ reference guide, 1992.<br />
[12] the Math Works Inc. Matlab c○ user guide: Wavelet <strong>to</strong>olbox, 1996.<br />
68