Userman PQ

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 58

Power Quality Analysis Tools User Manual

Version 1.0

Electrical Engineering Department


Texas A&M University
March 30, 2000
Power Quality Analysis Tools User Manual 2

POWER QUALITY ANALYSIS TOOLS USER MANUAL....................................3


1. Introduction................................................................................................................................................3
1.1 Power Quality Problem..........................................................................................................................3
1.2 Power Quality Analysis Tools................................................................................................................3
1.3 The Structure of Power Quality Analysis Tools.....................................................................................3

2. Installation and Setup................................................................................................................................5


2.1 System Requirements.............................................................................................................................5
2.2 Software Installation...............................................................................................................................5
2.3 Software Uninstallation..........................................................................................................................7

3. The menu system description...................................................................................................................8


3.1 The User Interface..................................................................................................................................8
3.2 Modeling..............................................................................................................................................10
3.3 Event Assessment.................................................................................................................................19
3.4 Other Applications................................................................................................................................48
3.5 Tools.....................................................................................................................................................54
3.6 HELP....................................................................................................................................................57

____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 3

Power Quality Analysis Tools User Manual

1. Introduction

1.1 Power Quality Problem


With more power quality sensitive devices introduced into the factories, offices and homes, the power
quality problem becomes more noticed. On the other hand, people are becoming aware of the power is a
kind of commodity. They have more requirements and higher standard on the quality of the power than
before.

1.2 Power Quality Analysis Tools


Based on the MATLAB V5.3 Release 11 and developed by Texas A&M University, PQAT(Power Quality
Analysis Tools) will be a powerful tool for power quality analysis and study. It integrates the following
functions:
 DFR record files management, converting and retrieving
 ability to build study systems, e.g. power system modeling
 online replaying of the recorded events or any created signals
 event detection and classification
 signal characterization
 equipment sensitivity study
 fault location
 optimal capacitor placement
 data file compression
 power quality database

On the other hand, the structure of PQAT (Power Quality Analysis Tools) is flexible and extendable. This
merit is a result of building every PQAT module as an additional toolbox/blockset of MATLAB. In order to
help users to use this tools, an integrated user interface was developed and a set of examples and online
help files on the usage of the menus and libraries were included.

1.3 The Structure of Power Quality Analysis Tools


The PQAT is organized into libraries according to the functions. Components of the same or similar
functionality are placed into one library.

The components in PQAT can be divided into four categories: the Input signals, the System Modeling, the
Analysis Tools and the Display Tools. The first category includes the recorded event files (native DFR
files, COMTRADE files and PQDIF files), the MAT files and all kind of signal generators. The second
category is used to build some test systems to simulate the event scenarios. The core part is the third
category, which completes the detection, classification, characterization, and equipment sensitivity study.

Databas
e
Input Signals
Database
Analysis
Tools
System Model Display

Figure 1.3.1 system structure

____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 4

The analysis tools also have display ability to some extent. The user does not need to add a display block;
the analysis result will be displayed automatically when the analysis/simulation process finished. For
example, the batch mode characterization block will show the signal characterization in tabular format
when the simulation is finished.

category Library
Input Signals Signal generator, Data File
System Modeling Powerlib, Extra Power Lib, Power Quality Events
Analysis Tools Classification, Characterization, Equipment
Sensitivity, Fault Location
Display Tools SIMULINK
Others Optimal Capacitor Placement, data file compression

It should be noticed the data flow is in one direction, i.e. signals -> analysis -> display(or database), which
means the whole structure is a pipes/filters software architecture. Especially, after the analysis results have
been saved into the database, the analysis tools must get the signals through a block of the Data File
library. This design method makes the analysis blocks are independent of the data file format.

____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 5

2. Installation and Setup

2.1 System Requirements


Hardware
 At least 64 MB memory
 At least Pentium CPU
 Color display
 20 MB free hard disk
 Mouse

Software
 Windows 9x/Windows NT 4.0
 Microsoft Access 97 or the corresponding ODBC driver
 Matlab 5.3R11
 Simulink 3
 Powerlib toolbox
 Signal Processing toolbox
 DSP toolbox
 Fuzzy Logic toolbox
 Database toolbox
 Wavelet toolbox

2.2 Software Installation


The installation process of PQAT is simple.
 Download the PQAT from the Internet (or Insert the installation CDROM)
 Select a temporary directory to unzip the downloaded file if applicable.
 Run the setup.exe program on the hard disk or CDROM. Figure 2.4.1 will pop up.

Figure 2.2.1 Power Quality Analysis Tools Installation Program

Follow the prompts on the screen to select the directory you want to install PQAT(Figure 2.2.2). The
default installation directory is c:\pq
 Press the Next button, the installation program will install PQAT

____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 6

Figure 2.2.2 Select the destination directory

During the installation process, the installation program will do the following things:
 Copy all the files to your specified target directory.
 Register the ActiveX controls used by PQAT.
 Update the path to your specified target directory
 Setup the demanded database source name for the database

After installation, the following directories will be created:

<PQAT root dir> The main program and the online help file are under this directory
pq.m - the main program
pq.chm - the online help file
go_out.m - quit the PQAT
templ.mdb - the database file

<PQAT root dir>\char - characterization library


charlib.mdl - the characterization library
axGrid.ocx - an ActiveX control for the display of characterization results
uigetfiles.dll - a MEX file to extend the Matlab's uigetfile function
other files - internal files used by the characterization library

<PQAT root dir>\charmotor - characterization routines


Those files are called by the characterization library. Since those routines were developed by different
person, they reside in a separated directory for maintenance purpose.

____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 7

<PQAT root dir>\cover - the resources for the user interface


All the pictures are in this directory

<PQAT root dir>\data - the working directory to save all the data files
The data files may include MAT files, COMTRADE files, ATP output files (PL4), and TU DFR files. The
COMTRADE files can also be save into the database (templ.mdb)

<PQAT root dir>\datacompress - data compress library

<PQAT root dir>\det&cla - power quality events detection and classification library
detclalib.mdl - the detection/classification library
other files - internal files used by the detection/classification library, some models of the event library and
the examples

<PQAT root dir>\equip - equipment sensitivity study library


equip_model.mdl - the equipment sensitivity library
other files - internal files used by the library and the examples

<PQAT root dir>\ocp - optimal capacitor placement


ocp.m - the main program for optimal capacitor placement.
other files - helper files for optimal capacitor placement, including the load flow program.

<PQAT root dir>\oevent - some models of the event library


Those files are called by the event library. Since those routines were developed by different person, they
reside in a separated directory for maintenance purpose.

<PQAT root dir>\signals - the signal sources


pqfile.mdl - the data file library
sgenerator.mdl - the analytical signal generators
other files - converters and the s-functions of Matlab
<PQAT root dir>\signals\comtrade - Matlab routines for manipulating COMTRADE files

2.3 Software Uninstallation


 Open Control Panel
 Select Add/Remove Programs
 Select Power Quality Analysis Tools
 Press Add/Remove button

____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 8

3. The menu system description

3.1 The User Interface


After the installation, you can run the PQAT by following the steps below:
 start Matlab
 In Matlab command window, type
>> cd <your PQAT dir>
>> pq
Then the user interface of PQAT will popup (Figure 3.1.1).

All the functionality of PQAT are integrated into the menu bar system. For example, you can navigate
through the libraries and the examples via the menu bar. In the future development the client area can be
an HTML viewer, which can be used to browse Power Quality related web sources. Further development
can be an HTML format tutorial and the online update information of PQAT.

Since the importance of the menu bar, it will be detailed in the following description.

The menu can be divided into three parts: the input signals, the signal analysis tools and the sink (e.g.
display tools or database). Bearing this design idea in mind, let us have a detailed look at each menu items.

Figure 3.1.1 Power Quality Analysis Tools User Interface

The menu system is described as below.

____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 9

____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 10

3.2 Modeling

This is the second category components; they are mainly used to build some study systems.

 Powerlib: basic power system library from MATLAB. Please refer to Mathworks's user manuals for
detailed introduction of Powerlib toolbox. The PDF format user manual of Powerlib can be found at
<matlabroot>\help\pdf_doc\powersys.

Figure 3.2.1 Powerlib blockset

 Extralib: extra power system library. This customized library is built upon Powerlib.

Figure 3.2.2 Extralib - some extra-libraries based on Powerlib

____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 11

As shown in Figure 3.2.2, the Extralib includes several customized blocks to simplify the ordinary work.

Buses

The blocks in the first row are buses with different input/output ports. The usage of those blocks is same
as the bus block in Powerlib. In fact, in Powerlib, the user can change the number of ports easily by double
click on the bus object.

3-phase Voltmeter

Measure the three-phase voltages and combine them into a vector output for Simulink use. Connecting the
three inputs with the A, B and C three phases of a network, the corresponding voltages can be read from the
output. The outputs are in vector format. Please refer to the Powerlib/Measurements/Voltage
Measurement block for more information.

Figure 3.2.3 Three-phase voltage meter

3-phase Ampere meter

Measure the three-phase currents and combine them into a vector output for Simulink use. Please refer to
the Powerlib/Measurements/Current Measurement block.

Figure 3.2.4 Three-phase current meter

____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 12

Fault

The Fault block is used to simulate a short circuit fault.

Figure 3.2.5 the fault event generator

This block has two input ports, the above one is used to connect the phase which has a phase-ground short
circuit fault. The below one is used to set the fault time. When a trigger signal feeds into this port, the
Breaker1 will be closed, which simulate a short circuit fault. The user can change the fault resistance.

Arc Furnace

Like all ordinary Power System Blockset elements, the user can drag and drop this block into a model. In
general, arc furnace should be connected to the secondary of the arc furnace transformer. It is designed as a
single-phase element. It behaves like current controlled voltage source, it has one input and two output
terminals.

The input is system current and must be a Simulink signal (not electrical). In order to convert any electrical
signal to a Simulink signal, voltage and current measurement blocks are used (please see the corresponding
example in the application guide in order to see how the arc furnace is connected to the sample power
system). These two measurement blocks act as a link between the electrical signals (from Power system
blockset elements) and Simulink blocks.

On the other hand, the output signal is simply the voltage signal across the arc furnace terminal. The upper
terminal should be connected to secondary of the arc furnace transformer, and the lower terminal is
connected to neutral.

After connecting arc furnace properly to the sample power system, by double clicking on the arc furnace
block the following block diagram shown in Figure 3.2.6 will show up. Therein, chaos is generated in
upper portion of the figure, while the dynamic multi-valued v-i characteristics of electric arc is obtained in
the lower portion by simply solving corresponding differential equation that represents the general
dynamics of the arc model . There are several gain blocks in the lower portion of the model that stand for
differential equation coefficients. These coefficients determines the voltage amplitude according to
incoming current level. Therefore, by tuning the values of the blocks labeled "Gain1" and/or "Gain2" the
desired voltage level could be obtained.

____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 13

Figure 3.2.6 Simulink implementation of proposed arc furnace model

The chaotic signal-generated in the upper portion- is used to represent the flicker effect on arc furnace
voltage and alter the symmetry in the v-i characteristics. The more you alter the symmetry the higher
magnitude of even harmonics you will get. So, by tuning the gain block labeled "Gain3", even harmonic
magnitudes and the flicker level could be adjusted.

It should be noted that, the Matlab *.m file whose name is "curr.m" is evaluated at each time step during
the simulation. So, this file has to be placed in the same path where user works, otherwise the following
error message "Error in MATLAB Function block 'eaf/Arc Furnace/MATLAB Fcn' while evaluating
expression: Undefined function or variable 'curr' " could be seen.

Flicker meter

Unlike to all other blocks the flicker meter block does not have to be connected to the sample power
system. The user can drag and place it wherever s/he wants in the Simulink file. All s/he has to do is to save
the voltage or current signal -on which the flicker study is intended to perform- during the simulation as a
".mat" file. While saving signals to a file, sampling frequency must be determined. Then, by clicking on
flicker meter block the following dialog box shown in Figure 3.2.7 will be displayed.

____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 14

Figure 3.2.7 Dialog box for Flicker meter

All you have to do is just enter the sampling frequency of the saved signal and the corresponding file name
and click on the "OK" button. Then the file named as "flickermeter.m" will be called and the flicker
severity will be evaluted. At the end, the short term flicker severity index, P st, and the immediate flicker
sensation curve will be displayed.

As in arc furnace model, here again a MATLAB .M file is called, so in order not to get any error message
user needs to be careful to have all these .M files ("flickermeter.m" and "oflickmetd") in the current work
path.

Rectifier Circuit

The Rectifier Circuit block models a three phase rectifier.

Figure 3.2.8 the rectifier circuit

Double click on the block, the above figure will show. In the above figure, the most right hand side block
represents a direct current load. The user can change its value by double click it. The input ports of A, B

____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 15

and C should be connected with a three-phase circuit. The port #4 is the trigger signal for selecting
different input resistance.

Capacitor Bank

The Capacitor Bank block is used in the capacitor switch study. The switching time is set by imposing a
trigger signal at port #4. Double-clicking the three-phase capacitor block, figure will show; the parameters
of the capacitors can be set in this dialog

Figure 3.2.9 the three-phase capacitor

Figure 3.2.10 selecting the parameters of the capacitor

 Eventlib : pre-built examples for some power quality events, shown in Figure 3.2.11. By double
clicking on a component will open an example. For example, double clicking the Sags component will

____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 16

open the voltage sag example (Figure 3.2.12). Those events are a good start point to study power
quality problems. By following those examples, the users can build their own study system.

Figure 3.2.11 pre-built event cases

The pre-built events are very useful for study the power quality events. Compared with ATP/EMTP, the
Matlab toolbox Powerlib provides a very user friendly interface to build study systems. Incorporating with
SIMULINK, the Powerlib can simulate a system with both primary devices and the secondary
control/protection devices. The only problem is it imposes a higher requirement on the hardware. For
example, on a old 486 machine will small memory, the simulation probably cannot be proceeded.

Figure 3.2.12 shows a voltage sag example. The power source is represented by an ideal voltage source;
and the models of the transmission lines are using the simplest one. A short circuit fault is simulated on
the bottom transmission line, and the voltage sag phenomenon can be watched on the top transmission line.

The fault happens at 0.2s after the simulation begins and disappears at 0.28s. (Figure 3.2.13). Running this
example, the voltage waveform of load 1 can be viewed from the scope (Figure 3.2.14). So, we can see,
although the fault happens at phase A of line 2, the voltage of phase C of line 1 is lower than phase A of
line 1.

____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 17

Figure 3.2.12 Voltage sag study example

Figure 3.2.13 specify the fault period

____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 18

Figure 3.2.14 the voltage waveform

All the examples in the events library will be detailed in the Application Guide. Please refer to the
Application Guide chapter 2-5.

____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 19

3.3 Event Assessment

 Input Signals: signal generators and recorded data files


 Assessment Tools: detection/classification, characterization, equipment sensitivity study
 Display: display scope etc.

3.3.1 Input Signals

As stated before, there are two kinds of modes in the PQAT: online mode and batch mode. For online
mode, all the signals must be replayed or generated by a module block of the input signal libraries.

 Signal Generators: all kinds of analytical signal generators, shown in Figure 3.3.1.1

Those analytical signal generators can generate the signals of the common power quality events, including
voltage sag, transient, harmonic, impulse, flicker and notch. For a detailed explanation of those signal
generator, the user is referred to the Theory Report, chapter 2, part 2.3.4.

Figure 3.3.1.1 signal generators

 Data File: recorded event files, including DFR files, COMTRADE files, PQDIF files and MAT files.
Short circuit data files are also included here for fault location use. (Figure 3.2.1.2)

____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 20

Figure 3.3.1.2 Data File library

For user friendly purpose, the Data File library has the following features:
 using the user interface of an open file dialog rather than typing the filename in an edit control box.
 setting the simulation stop time according to the length of the waveform automatically

Mat file - Replay a recorded Matlab(.mat) file.

EMTP file - Replay a EMTP (.pl4) file.

COMTRADE file - Replay a COMTRADE (.dat, .cfg) file

TU DFR file - Replay a TU DFR (.dat) file

PQDIF file - Replay the IEEE P1159.3 PQDIF (.pqd) file

Mehta DFR file - Replay a Mehta Tech DFR file

Hathaway DFR file - Replay a Hathaway DFR file

The usage of the Mat file block, the EMTP file block, the COMTRADE file block and the TU DFR file
block are all the same, since all the blocks in the Data File library are built with consistent user interfaces.

As an example, we will introduce how to replay a recorded waveform in TU DFR file format.
 select Input Signals menu and click the File Library menu item. Figure 3.3.1.2 will pop up.
 select File menu and click the New menu item (Figure 3.3.1.3), create a new model
 drag a module block of the Data File library into the newly created model
 select Tools menu and click the Display menu item. Figure 3.3.1.4 will pop up.
 double click on the Sinks button, a new window will pop up.
 drag a Scope block into the newly created model. (Figure 3.3.1.5)
 connect the output of the data file block and the input of the Scope block.(Figure 3.3.1.5)
 double click on the TU DFR file block to select the file you want to replay (Figure 3.3.1.6)
 press the run button to replay the waveform.

____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 21

 double click the Scope block to see the waveform (Figure 3.3.1.7)

Figure 3.3.1.3 Create a new model

Figure 3.3.1.4 the Simulink Version 3 - The Sinks subsystem contains all the display blocks.

Figure 3.3.1.5 Replay a recorded waveform

____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 22

Figure 3.3.1.6 Select the file you want to replay

Figure 3.3.1.7 the waveform

The common feature of the blocks in the Input Signal menu is they all have only one output port. When you
replay the signals under Simulink. The recorded or artificial created signals will be output through this port.
The user can connect the output port with a display block, e.g. scope. The output can also be used as the
input of other blocks which need input signals in Simulink format. For example, in the Classification and
Characterization sections, the recorded waveforms are feed into a Classification or Characterization block.

Database

The PQAT accesses the power quality database via the Database toolbox of Mathwork. Since the Database
toolbox works through ODBC, any database management systems can be used to implement the required
power quality database. In the current version, the Microsoft Access 97 is selected for its popularity. The
installation program will setup all the things to use the database.

The database file is located under the PQAT root directory, i.e. where the PQAT software package is
installed. The data saved in the database includes the waveforms (COMTRADE files and MAT files), the

____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 23

classification results, and the characterization results. The tables for power system devices, substations,
etc. are for the future development use, e.g. fault location.

There are two ways to use the database, the first one is through the interface provided by the PQAT; the
second one is open it from MS Access 97 as shown in Figure 3.3.1.8.

Figure 3.3.1.8 Open the database from MS Access 97

To use the database in this way, the user can refer the Database Structure document in the Theory Report
Appendix II.

Currently, the PQAT provides two kinds of interfaces to access the database. One is for saving the
classification/characterization results. In this case, the user just needs to press the "save to database"
button, and all will be done. Another one is to play back the waveforms in the IndexEvent table. This
interface is exported through the Database block of the Data File library.

Drag and drop the Database block into a model, and double clicking on the Database block, Figure
3.3.1.9 will popup and allow the user to select waveforms previously saved in the database.

There are three steps to pick up a waveform:


1. Select the event type
The waveforms are categorized into seven types of power quality events: Voltage Sag, Voltage Swell,
Harmonic, Transient, Harmonic, Notch, and Impulse.
2. Select the file name
When the user select a file, the corresponding description text will appear in the Description section,
and the waveform will be shown on the right side.
3. Press the OK button
Then the waveform is ready to use, e.g. replay.

____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 24

Figure 3.3.1.9 selecting a waveform from the database

How to save COMTRADE files into the database:

There are two steps to save a COMTRADE file into the database (supposing the COMTRADE file is
mycmtrd.dat and mycmtrd.cfg) :

 cmtrd = comtraderead("mycmtrd");
 comtradedbwrite(cmtrd);

For the usage of comtraderead and comtradedbwrite, the user can use the help command to get the manual:

» help comtraderead

COMTRADEREAD Read/load/input COMTRADE file (Reversion 1997)


COMTRADE = COMTRADEREAD(comtradefile)
Note: comtradefile should have no extension

See also COMTRADEWRITE.

» help comtradedbwrite

COMTRADEDBWRITE Write COMTRADE into database


COMTRADEDBWRITE(comtrade)

____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 25

comtrade: comtrade struct

Example:

comtradedbwrite(comtrade); save the comtrade into the database

See also COMTRADEDBREAD.

How to add waveforms into the IndexEvent table:

The user must use MS Access to add records into the table; no user interface is provided in the PQAT.

Note, when a user uses the blocks of the batch mode characterization library, there is an option allowing
the user to save to characterization results into the database. The corresponding waveforms are
automatically added into the IndexEvent table in this case.

Figure 3.3.1.10 batch mode characterization

____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 26

Figure 3.3.1.11 select the file(s) to characterize

Figure 3.3.1.12 the characterization result

When the user double-click on the block in Figure 3.3.1.10, Figure 3.3.1.11 will show up and let the user
specify the file(s) to characterize. After selecting the file(s), the user can press the run button to run the
characterization process. The result (Figure 3.3.1.12) will be displayed at the end of the process. The user
can press the "Save to database" button to save the characterization results.

____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 27

Figure 3.3.1.13 the CharHarmonic table

Figure 3.3.1.14 the IndexEvent table

Figure 3.3.1.13 shows the table which has the characterization results. And, from Figure 3.3.1.14 we can
see the file name of the characterized data file has been inserted into the IndexEvent table.

3.3.2 Classification

____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 28

The following three menus (Classification, Characterization and Equipment Sensitivity) are for the signal
analysis tools. The blocks in this category can be divided into two categories further: the online mode
analysis and the batch mode analysis. Blocks in the former category have one input port for the signals,
and may have several output ports or have no output ports at all. For those blocks that have no output ports,
the display and saving to database abilities have been built into them. For batch mode blocks, there are no
input and output ports.

This category of components is for power quality event detection/classification

 Library: event detection/classification library. Only one method is included now as described in
Figure 3.3.2.1
 Examples: demo examples to show how to use Classification library

The classification library is used to help the user to determine the power quality event type of a given
recorded file (DFR or PQ meter). Since, currently the Data File library supports only COMTRADE format
for DFR files, other native DFR files should be converted into COMTRADE format at first. The converted
COMTRADE files can be saved into the database for future retrieving.

Figure 3.3.2.1 Classification Library

The Classification library is easy to use. There are two blocks in the library, one for online mode
classification, another for batch mode classification. The usage is given by the examples. Please run those
examples before starting to build your own system.

There are three demos under the Example menu item.

____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 29

Demo #1(Figure 3.3.2.2) is for batch mode classification. To run this demo, double click the block and
select the files you want to classify and then press the run button. The result will pop up when the
classification process finishes (Figure 3.3.2.3).

Figure 3.3.2.2 Batch mode classification

Figure 3.3.2.3 Batch mode classification result

Demo #2 and Demo #3 are online mode classification. From the demos, you can see there are input signal
blocks in both examples. In Demo #2, the input signal source is a MAT file, whereas a TU DFR file in
Demo #3. You can also use other blocks as long as they belong to the input source category, e.g. an
analytical signal generator.

Demo #2 is shown in Figure 3.4.4. After pressing the run button, the result will be shown in the green box
and the text below the box. The only difference between Demo #2 and Demo #3 is a TU DFR file is used
in Demo #3, so the demo #3 will not be shown here.

____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 30

Figure 3.3.2.4 Online mode classification result

____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 31

3.3.3 Characterization

This library is for event signals characterization

 Library: event characterization library. Shown in Figure 3.3.2.1.


 Examples: demo examples to show how to use Characterization library. See Fig 3.3.2.2 -Fig 3.3.3.4.

Figure 3.3.3.1 Characterization library

The plot mode characterization block utilizes the SIMULINK s-function to replay the data files which are
recorded on site or created by the study cases. The study cases can be built by using Powerlib or
EMTP/ATP. The usage of the online mode characterization block is shown in Figure 3.3.3.2, which is the
Demo #1 under the Examples menu item.

The parameters of the plot mode characterization block can be customized by double click on the block.
Figure 3.3.3.3 will show up.

number of signals: specify the number of input signals, e.g. for ABC three phases signals, there are three
input signals
Harmonic: Check this box if you want the harmonic analysis output
Harmonic Interested: specify the order of the harmonic you want to analysis
Fundamental: Check this box if you want to output the fundamental values of the input signals
Phase Angle: Check this box if you want to output the Phase angles of the input signals
RMS: Check this box if you want to output the root mean square values of the input signals
Total Harmonic Distort (THD): Check this box if you want to output THD of the input signals
Unbalanced Ratio: Check this box if you want to output the unbalanced ratio of the input signals

____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 32

Figure 3.3.3.2 Voltage sag signals characterization by real-time approach

Figure 3.3.3.3 Select the parameters

In Figure 3.3.3.3, after changing the settings, the user can press the Apply button to save the changes. The
corresponding output ports will disappear when some parameter output selection boxes are unchecked.
For online mode characterization, there are two sub-categories: blocks connected with signals directly and
blocks connected with classification blocks. Demo #3 and Demo #4 are examples of the later case. These
blocks can be used with classification blocks only. On the other hand, the former sub-category can be used
in more wide situation. For example, you can connect an online mode characterization block to your study
system built by Powerlib directly.

____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 33

Double-click on the Online mode block of Figure 3.3.3.1, the detailed online mode characterization library
will show as Figure 3.3.3.4. Double-click on the Online mode block (connect with classification) of Figure
3.3.3.1, the detailed online mode characterization library will show as Figure 3.3.3.5.

Figure 3.3.3.4 Online mode characterization library

Figure 3.3.3.5 Online mode characterization library - cooperates with the classification library

The blocks shown in Figure 3.3.3.4 and 3.3.3.5 can be used to characterize the most power quality events,
including voltage sag, voltage swell, harmonic, transient, flicker, notch, and impulse. The difference
between those two libraries are, the blocks in Figure 3.3.3.4 are used to connect with signals directly,
whereas, the blocks in Figure 3.3.3.5 are used to connect with the outputs of classification blocks. Please
note, the input ports of those blocks in Figure 3.3.3.4 are labeled "Signal"; the input ports of those blocks in
Figure 3.3.3.5 should be "EventType".

____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 34

Demo #3 and Demo #4 shows the usage of the online characterization cooperated with online
classification.

Figure 3.3.3.6 Online classification and characterization

Demo #3 is shown in Figure 3.3.3.3.4. In this demonstration, supposing the power quality event type of a
recorded file is unknown, so a classification block is used to get the event type at first. The outputs of the
classification block will activate the corresponding characterization block of the event type only.

To run this example, please select the data file you want to analysis at first by double-click on the Mat file
block. Then by pressing the run button, the SIMULINK simulation will start. When the simulation stops,
the classification result will show in the green box. And the classification result can also be got from which
the characterization block is activated. The characterization results will pop up in a tabular format in
Figure 3.3.3.7.

This example is a very general one. It can be used to classify and characterize seven types of power quality
events. And the user doesn't need to have information about the event type before he/she performs the
analysis. Demo #4 shows a more specific case, where the event type is almost known as voltage sag, so
only one voltage sag characterization block is connected with the classification block.

____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 35

Figure 3.3.3.7 Online classification and characterization result

The batch mode characterization blocks are useful for the handling of a batch of files. Human interference
can be reduced in this case. To perform batch mode characterization, the user must know in advance the
event types of a group of data files. The batch mode characterization library is in Figure 3.3.3.8.

The online mode is better for its integration with SIMULINK and easy to understand. The batch mode is
faster.

The batch mode is easy to use; there is no connection with other blocks. The Demo #2 (Figure 3.3.3.9)
shows the usage of the batch mode blocks of the voltage sag characterization. The results are shown in
tabular format in Figure 3.3.3.10.

Please note, the batch mode characterization blocks must be used for data files whose event types have
been known. Using an incorrect characterization block for a given data file, the results is unknown.

The Characterization library is used to calculate the IEEE recommended parameters of signals of a power
quality event. For the meaning of those parameters, please refer to the Theory Report or IEEE
Recommended Practice for Monitoring Electric Power Quality(IEEE std 1159-1995)

____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 36

Figure 3.3.3.8 Characterization library - batch mode

Figure 3.3.3.9 Voltage sag signals characterization in batch mode

____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 37

Figure 3.3.3.10 Voltage sag signals characterization results in batch mode

____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 38

3.3.4 Equipment Sensitivity

 Library: equipment model library. Figure 3.3.4.1


 Examples: examples to show how to perform equipment sensitivity study. Figure 3.3.4.2

Figure 3.3.4.1 The equipment model library

Figure 3.3.4.2 Equipment sensitivity study

____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 39

For detailed introduction of the examples of equipment sensitivity study, please refer to the Theory Report
chapter 5 and the Application Guide .

The equipment library actually uses the blocks in the Powerlib, the Extralib and the Equip_model in
equipment sensitivity study. In fact, the users can even build their own models for power system devices.
Most of the blocks in the equipment library are links to blocks of Powerlib. The blocks of the equipment
library are listed below:

Double-clicking on the first block in the library, i.e. Power Electronics, Figure 3.3.4.3 will show up.

Figure 3.3.4.3 Power Electronics

The blocks in the left column are from the Powerlib/Power Electronics. Every block has a detailed
description in the user manual of Powerlib. The Synchronized 6-Pulse Generator is from
Powerlib/PowerlibExtra/ControlBlocks; the 6-pulse diobe bridge and 6-pulse thyristor bridge are from
Powerlib/PowerlibExtra/Three-Phase Library. Please refer to the user manual of Powerlib for those
blocks. The PDF format user manual can be found at <matlab>\help\pdf_doc.

.
The second block in the library represents the measurements. Double-clicking on it, the Figure 3.3.4.4 will
popup. The Voltage Meter and the Current Meter are from the Powerlib/Measurements, The ASM
Measurement Demux is from the Powerlib/Machines. The Three-phase Volt-meter is composed by three
single-phase voltage meters (Figure 3.3.4.5) The Three-phase current meter is composed by three single-
phase current meters (Figure 3.3.4.6).

____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 40

Figure 3.3.4.4 Measurements

Figure 3.3.4.5 Three-phase voltage meter

Figure 3.3.4.6 Three-phase current meter

____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 41

The measurements are used to convert Powerlib signals into Simulink signals. After converting, those
signals can be connected with Simulink blocks directly.

The Common Equipment library consists of the most used one-phase and three-phase power equipment
(Figure 3.3.4.7). Double-click on the 3Phase block, Figure 3.3.4.8 will show.

Figure 3.3.4.7 Common Equipment

Figure 3.3.4.8 Three-phase Common Equipment

The first two blocks in Figure 3.3.4.8 (Asynchronous Machine p.u. Units and Asynchronous Machine SI
Units) are from the Powerlib/Machines.

The ASM (Asynchronous Machine) model is shown in Figure 3.3.4.9.

____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 42

Figure 3.3.4.9 Common Three-phase equipment - Asynchronous Machine

The VSD (Variable Speed Drive) model is shown in Figure 3.3.4.10. The induction motor is fed by
current-controlled PWM inverter which is built using six 'MOSFET' blocks. The motor drives a
mechanical load characterized by inertia J, friction coefficient B, and load torque TL. The speed control
loop uses a proportional-integral controller to produce the slip frequency reference wr which is used to
control the amplitude and the frequency of the three-phase controlled oscillator. This latter produce the
current references ia*, ib*, and ic* for the current controller. Current and Voltage Measurement blocks
provide signals for visualization purpose. Motor torque and speed signals are available at the output of the
'Asynchronous Motor' block. There is an example in Powerlib (powerdemo\psbfrequency.mdl). Please
enter "demo" command at Matlab command window to open the examples.

Figure 3.3.4.10 Common Three-phase equipment - Variable Speed Drive

The Electrical Sources contain all kind of power sources as Figure 3.3.4.11. The first five blocks are links
to Powerlib blocks. Please refer to Powerlib user manual for those five blocks.

____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 43

Figure 3.3.4.11 Sources

Figure 3.3.4.12 Sources - signal generator

____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 44

The sixth block is the Signal Generator. Double-clicking on it, Figure 3.3.4.12 will be shown. After the
user specifies the characteristic of the signal, the generator can output waveform of the given characteristic.
For the meaning of those parameters, please refer to the Theory Report.

The From File block is linked to the corresponding Simulink's Sources/From File block.

The Power Electronic Converter block is similar with the next one except the diodes are replaced with
thyristors. The open/close of the thyristors are controlled by the three line voltages. Note, the inputs are
Simulink signals and the outputs are Powerlib signals.

Figure 3.3.4.13 Sources - power electronic converter

The power electronic rectifier is used to create rectified direct voltage. Note, the inputs are Simulink signals
and the outputs are Powerlib signals. For the difference between Simulink signals and Powerlib signals,
please refer to the Powerlib user manual. In a word, the Simulink signals are control signals. They can be
seen as the secondary side signals, opposite to the primary side voltage/current of Powerlib. The capacitor
is used to filter out the high-frequency components, thus makes the output voltages much smoother.

Figure 3.3.4.14 Sources - power electronic rectifier

____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 45

The connection of the three-phase source is shown in Figure 3.3.4.15. Double-click on the block to set the
parameters (Figure 3.3.4.16). The source is a symmetric ideal three-phase voltage source. Please refer to
the AC Voltage Source of Powerlib.

Figure 3.3.4.15 Sources - three-phase voltage source

Figure 3.3.4.16 Sources - set parameters of three-phase voltage source

The Voltage Generator and Current Generator are actually controlled voltage/current source. These two
blocks are useful in representing sources controlled by Simulink signals. The controlled voltage source is
shown in Figure 3.3.4.17, and the controlled current source is in Figure 3.3.4.18.

In Figure 3.3.4.17, the input is a vector represents the three-phase voltage (A,B and C). The vector should
be Simulink signals. The output is the three ideal voltage sources used to connect with Powerlib blocks.
The input can be direct or alternate values. Please refer to the Controlled Voltage Source of Powerlib.

In Figure 3.3.4.18, the input is a vector represents the three-phase current (A,B and C). The vector should
be Simulink signals. The output is the three ideal current sources used to connect with Powerlib blocks.
The input can be direct or alternate values. Please refer to the Controlled Current Source of Powerlib.

____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 46

Figure 3.3.4.17 Sources - three-phase controlled voltage source

Figure 3.3.4.18 Sources - three-phase controlled current source

The tuning library is used with the blocks of Signal Generator library (Section 3.3.1), and every block in
the library corresponds one block of the Signal Generator library. The tuning blocks are used to
automatically fill the parameters of the corresponding signal generator block using a recorded waveform
file. Since the tuning block will locate the signal generator block in the model, please make sure use the
correct type of the tuning block.

For example, in Figure 3.4.20, after the user double clicks the transient tuning block , the transient
generator will have the parameters of the user selected waveform. In this way, the user can quickly change
the generator to a characteristic he/she wants.

____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 47

Figure 3.3.4.19 Tuning library

Figure 3.3.4.20 Equipment sensitivity example #4

____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 48

3.3.5 Display

Figure 3.3.5.1 Display library

Currently, the blocks in the display library are links to the corresponding Simulink 3 blocks. Please refer to
the Simulink User Manual for their usage.

____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 49

3.4 Other Applications


 Fault Location:
 Optimal Capacitor Placement: improve the reactive power condition of the system

3.4.1 Fault location

This is the user interface to call PTI PSS/E and DFR Assistant. In order to run short circuit calculation
program, the short circuit data files in the Input Signals are needed. The calculation results can be used to
compare with the recorded waveforms.

 Library: the MATLAB interface to PTI PSS/E and DFR Assistant.


 Examples: demo examples on the library usage

This part is still under development.

3.4.2 Optimal Capacitor Placement

For the theoretical description of the Optimal Capacitor Placement, please refer to the Theory Report
Chapter 7.

The user interface for the Optimal Capacitor Placement program is shown in Figure 3.4.2.1.

____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 50

Figure 3.4.2.1 the user interface for Optimal Capacitor Placement program

The usage of the program can be divided into the following steps:
 select the constraints through the Options menu.
The user should set the constraints of the Voltage Limits, the Load Levels and the Harmonic Levels at first.

Figure 3.4.2.2 set the maximum limit of the Voltage limits

____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 51

Figure 3.4.2.3 set the minimum limit of the Voltage limits

Figure 3.4.2.4 select the load level

Figure 3.4.2.5 select the harmonic level

____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 52

 select the test systems through the Test Systems menu.


Currently, there are 4 test systems; the user can select one of them from the menu.

Figure 3.4.2.6 select the test system

 select the capacitance unit through the Capacitance Unit menu.


The user can specify the unit of the capacitance. Figure 3.4.2.7.

Figure 3.4.2.7 select the capacitance unit

 select the objective functions through the Objective Functions menu

There are two kinds of objective functions:


 minimizing the network loss only
 minimizing the network loss and the THD(total harmonic distort)

____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 53

Figure 3.4.2.8 select the objective functions

 run the program by pressing the Run button


When the program finished, the message of "Program is Finished" will be displayed on the user interface.

 plot the results through the Plot menu


After the program finished, the user can display the optimization results. The trajectory of the objective
function is shown in Figure 3.4.2.9. From the figure, we can see the minimum point is reached at around
the 7th iteration. The last optimization results is shown in Figure 3.4.2.11. So, in this case, bus #14 and bus
#15 need to install capacitors.

Figure 3.4.2.9 the trajectory of the objective function

____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 54

Figure 3.4.2.10 the trajectory of the network loss

Figure 3.4.2.11 the location of the capacitors

 the user can reset the program by pressing the Reset button

By pressing the Quit button, the user interface will be closed.

____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 55

3.5 Tools

 Data Compression: using wavelet to compress the data file

The Data Compression library uses wavelet transformation to do data compression. The compressing
MAT files must be into the SIMULINK format, which means the first row of the data is the time series.
Note: (1) the compression process is not lose-less (2) the compressing file must be in Matlab format.

Figure 3.5.1 The data compression library

Figure 3.5.2 The usage of the data compression library

____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 56

The above example illustrates the use of the tool "PQ data compression and de-compression" based on the
wavelet transform. The interface looks like Figure. 3.5.2. The following steps are to be taken.

(1) Double click on the icon "Mat file" and enter the name of the input file. Here we select "abg.mat".
(2) Double click on the icon "Compression" and enter the name of the file for saving the compressed data.
Here we enter "sending1.dat".
(3) Then run the simulation. A dialog box as shown in Figure. 3.5.3 will appear. So far, we have finished
the compression stage.
(4) For de-compression, double click on the icon "De-compressin". A dialog box pops up and prompts the
user to input the name of the file to be de-compressed. Here we enter "sending1.dat". Then another
dialog box pops up and prompts the user to input the name of the file for saving the de-compressed
data. Here we enter "abg_decom.mat". Then run the simulation. To see the effects of the
reconstruction, the original and the re-constructed signal are shown in Figure 3.5.4. We have finished
the de-compression stage.

Figure 3.5.3 The compression result message box

Figure. 3.5.4 The original and the re-constructed signal

____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 57

For the details of the Data Compression part, please refer to the Theory Report Appendix A and the
Application Guide.

____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 58

3.6 HELP

 Help file: show the WINHELP format help file.


The online help is available as shown in Figure 3.6.1.

Figure 3.6.1 online help

 About: show copyright© and version information

____________________________________________________________________________________
Version 1.0 March 30 , 2000

You might also like