Userman PQ
Userman PQ
Userman PQ
Version 1.0
____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 3
1. Introduction
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.
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
____________________________________________________________________________________
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
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
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
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
<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
____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 7
<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>\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
____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 8
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.
____________________________________________________________________________________
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.
Extralib: extra power system library. This customized library is built upon 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.
Measure the three-phase currents and combine them into a vector output for Simulink use. Please refer to
the Powerlib/Measurements/Current Measurement block.
____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 12
Fault
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
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
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
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
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.
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
____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 18
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
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.
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
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
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.4 the Simulink Version 3 - The Sinks subsystem contains all the display blocks.
____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 22
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.
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.
____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 24
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
» help comtradedbwrite
____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 25
Example:
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.
____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 26
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 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.
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.
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.
____________________________________________________________________________________
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).
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
____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 31
3.3.3 Characterization
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
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.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.
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
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
____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 37
____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 38
____________________________________________________________________________________
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.
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
____________________________________________________________________________________
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.
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.
____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 42
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.
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
____________________________________________________________________________________
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.
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.
____________________________________________________________________________________
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.
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
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
____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 48
3.3.5 Display
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
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.
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.
____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 51
____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 52
____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 53
____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 54
the user can reset the program by pressing the Reset button
____________________________________________________________________________________
Version 1.0 March 30 , 2000
Power Quality Analysis Tools User Manual 55
3.5 Tools
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.
____________________________________________________________________________________
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.
____________________________________________________________________________________
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
____________________________________________________________________________________
Version 1.0 March 30 , 2000