Sie sind auf Seite 1von 40

U

ECE 525
Lecture 27

Protection Simulations
Using PSCAD or
ATPDraw

B.K. Johnson

U
I

Electromagnetic
Transients

Fall 2004

ECE 525
Lecture 27

Power systems normally in steady-state


Allows use of RMS phasors
Switching, operations, faults, lightning,
Response frequencies from DC to MHz
Response generally dies out rapidly
Large voltage and currents are possible
RLC response to change in volt or current
B.K. Johnson

Fall 2004

U
I Simulations for Protection

ECE 525
Lecture 27

Fault studies
Basic phasor fault program
Current magnitudes
Sequence Currents

Limited ability to test relays

B.K. Johnson

U
I

Relay Test Options

Fall 2004

ECE 525
Lecture 27

Controlled source/amplifier
Generate current and voltage inputs to
relay
CT/PT secondary voltages and currents
Programmable waveforms
See what trips the relay
Some options in microprocessor relays to
come in at low level inputs
B.K. Johnson

Fall 2004

U
I Time domain simulations

ECE 525
Lecture 27

Use circuit simulation to generate


waveforms
Primary or secondary

Transfer to amplifiers that control relay


Or to low level inputs
Data in COMTRADE format
B.K. Johnson

U
I

EMTP type programs

Fall 2004

ECE 525
Lecture 27

Able to model power system in detail


Include non-60 Hz response, DC offsets,
saturation
Better models for coupling between lines
Travelling wave and frequency dependent
models

Detailed machine models available


B.K. Johnson

Fall 2004

U
I

Analyzing Transients

ECE 525
Lecture 27

Understand the transient you want to model


Good data to form detailed models
Mathematical model of the system
Solve coupled differential equations
Options:
Hand calculations in the LaPlace domain
Hand calculations in the time domain
Time domain numerical simulation
B.K. Johnson

U
I

Circuit Simulation

Fall 2004

ECE 525
Lecture 27

Output often as waveforms


Often want peak values of v(t) and I(t)
Transient Network Analyzer (TNA)
Predates use of digital computers
Analog computer model
Hybrid: digital controls
Real-time digital simulators
Expensive
Closed loop testing of control hardware
B.K. Johnson

Fall 2004

U
I Time Domain Simulation

ECE 525
Lecture 27

Digital computer simulation of transients


General purpose equation solvers:
MATLAB, MathCAD
Analog electronic and integrated circuits:
SPICE, Saber, Electronics Work Bench
Not really designed for power system
transients
B.K. Johnson

The Electromagnetic
U
I Transients Program-EMTP

Fall 2004

ECE 525
Lecture 27

Hermann Dommel, Germany, then BPA


Numerically solves difference equations
Fixed versus variable time-step
EMTP has become and industry standard
(verified models)
MatTRAN, NETOMAC, and SimPOW are
other alternatives
B.K. Johnson

10

Fall 2004

U
I

ECE 525
Lecture 27

EMTP Variants

Original version mainly modeled RLC


elements switches, sources and lines
Many extensions and several versions
ATP: Alternate transients program
EMTP96: Latest in the line of EPRI-DCG
(now just DCG) The EMTP or EMTP-RV
EMTDC: Reduced size version available
free from their web site.
Microtran: University of British Columbia
B.K. Johnson

U
I

11

Fall 2004

ECE 525
Lecture 27

PSCAD EMTDC

PSCAD is the graphical user interface


EMTDC is the numerical solver
For this course you can run the cases
supplied through course web page
Capture the results
You can modify the files or create new
cases if youre interested
We will discuss that here
B.K. Johnson

12

Fall 2004

U
I Getting PSCAD/EMTDC

ECE 525
Lecture 27

Available in the Senior Design Lab


Free Student Edition (15 node limit)
Download from: http://www.pscad.com/
Download How To PDF for Student Edition
Download the Program itself
Download GNU Fortran Compiler
unless you have compatible one installed

These are large downloads


B.K. Johnson

U
I

13

The ATP Version

Fall 2004

ECE 525
Lecture 27

ATP is essentially free, a license application


needs to be filled out
http://www.emtp.org/

The purpose is to limit access to parties that


have participated in EMTP-Commerce
Cost is limited to shipping materials--can
download much of it now

B.K. Johnson

14

Fall 2004

U
I

ECE 525
Lecture 27

ATP Versions

ATP ported several operating system


Several versions for the PCs
Run in DOS windows/Command Prompt
Salford: Historically the default version shipped,
Salford DOS Extender
Watcom: Watcom FORTRAN compiler, no longer
updated
Ming32: WinXP, 2000, NT, 95, 98 version. Again
easy to install.
B.K. Johnson

U
I

15

Fall 2004

ECE 525
Lecture 27

Plotting Programs

Older versions of EMTP displayed plot


on screen at end of the simulation run
Special purpose plotting programs
TPPLOT: Distributed with Salford ATP
PCPLOT (WPCPLOT): Simple plotting
program.
GTPPLOT: Build of TPPLOT using GNU
Fortran Compiler. Doesn't require Salford
Extender, can handle Comtrade
B.K. Johnson

16

Fall 2004

U
I

Plotting Programs

ECE 525
Lecture 27

PlotXY: Simply Windows based plotting


program. Export to word processor
TOP: Electrotek wrote for EPRI-DCG and
extended for harmonics programs, ATP
Available free: http://www.electrotek.com/TOP
Good post processing capabilities.
Output to Comtrade

Matlab: Can use PL42MAT to convert


output from ATP to data file for Matlab.
B.K. Johnson

U
I

17

Graphical Interfaces

Fall 2004

ECE 525
Lecture 27

EMTP is written in FORTRAN


FORTRAN read statements,
Restrictions on input data file

Several attempts at graphical interfaces


ATPDraw is best options for ATP.
Use mouse and icons to create circuit
Program creates the EMTP data file
Run ATP/plotting from ATPDRAW
B.K. Johnson

18

Fall 2004

U
I

EMTP-like Programs

ECE 525
Lecture 27

Designed to study transient phenomenon from a

few hundred Hertz to hundreds of kHz


Switching surges, faults studies, insulation
coordination, power electronic interactions with
power systems
EMTP can also model dc systems and
electromechanical interactions
Trapezoidal integration scheme astable (stable
results if transient modeled is stable)

B.K. Johnson

U
I

19

EMTP Programs

Fall 2004

ECE 525
Lecture 27

Outputs are voltage, current, power, and energy

versus time
Control variables are available if controls are
modeled
Can model simple controls using EMTPs control
models or can interface to FORTRAN (in some
cases C or Matlab too)

B.K. Johnson

20

Fall 2004

U
I

Associated Files

ECE 525
Lecture 27

Input Datafile (text file)


Extension options: *.dat or *.atp (ATPDraw)
Avoid Long File Names

Plot Datafile (formatted ASCII)


Extension *.PL4

Text Output File (plain text)


Extension: *.OUT or *.LIS
Error Messages in this file
B.K. Johnson

U
I

21

Associated Files (cont)

Fall 2004

ECE 525
Lecture 27

ATPDraw Schematic File


Extension: *.adp

Supplement Include File


Use modular programs
Examples: Line constants output, subsystems
Extension options: *.pch, *.pun, *.lib

ATP debug file


Extension: *.dbg (generally not used)
B.K. Johnson

22

Fall 2004

U
I Creating a File: Text Based

ECE 525
Lecture 27

Use fixed width fonts with your text editor


If use MS-Word or Word-Pad make sure use Courier

Plain text editor better option

Best if it provides column number


Older ATP versions do not perform type
checking, use all upper case for variables
Column alignment is very important
The ATP rule book refers to individual lines as
data cards

B.K. Johnson

U
I

23

Sample File

Fall 2004

ECE 525
Lecture 27

C Brian K. Johnson
C Simulation for problem 3.11 in Greenwood
BEGIN NEW DATA CASE
C ........................... Miscellaneous data ..............................
C DeltaT<---TMax<---XOpt<---COpt<-Epsiln<-TolMat<-TStart
0.2E-4
0.05
C --IOut<--IPlot<-IDoubl<-KSSOut<-MaxOut<---IPun<-MemSav<---ICat<-NEnerg<-IPrSup
1
1
1
C
C ........................... Circuit data ...................................
C Bus1->Bus2->Bus3->Bus4-><----R<----L<----C
VS
V1
0.0992 3.157
BLANK ends circuit data
C
C ........................... Switch data ....................................
C ***** Close at 160 degrees, or 70 degrees past peak ********
C Bus-->Bus--><---Tclose<----Topen<-------Ie
O
V1
7.4074E-3
999.
1
BLANK ends switch data
C

B.K. Johnson

24

Fall 2004

U
I

Sample File (cont.)

ECE 525
Lecture 27

C ...........................Source data ......................................


C Bus--><I<Amplitude<Frequency<--T0|Phi0<---0=Phi0
<----Tstart<----Tstop
14VS
28.16913E3
60.
-90.
0.
-1.
9999.
BLANK ends source data
C
C ........................... Output Request Data ............................
C Bus-->Bus-->Bus-->Bus-->Bus-->Bus-->Bus-->Bus-->Bus-->Bus-->Bus-->Bus-->Bus-->
V1
VS
BLANK ends output requests
BLANK ends plot request
BEGIN NEW DATA CASE
BLANK ends all cases

B.K. Johnson

U
I

25

Sections of the Datafile

Fall 2004

ECE 525
Lecture 27

An ATP datafile must at a minimum have the


following sections

Header/Miscellaneous Data Cards


Circuit Data
Switch Data
Source Data
Output request data
Plot request data

B.K. Johnson

26

Fall 2004

U
I

Sections of the Datafile

ECE 525
Lecture 27

End of section marked with BLANK starting in


column 1
Rest of the card is comment
An accidental blank line in data file is treated as end
of section

Graphical interfaces such as ATPDraw insulate

user from needing to work at this level


Still useful to know what is going on at this level
For Debugging
If someone sends you an older file

B.K. Johnson

U
I

27

Comment Cards

Fall 2004

ECE 525
Lecture 27

Good practice to have comments in the file


Comments start with a C in column 1 and a blank in
column 2
C *****************************
C * This is a sample comment *
C *****************************

ATP allows in-line comments. Place comment

between { and }
Make sure that you don't block useful data fields

B.K. Johnson

28

Fall 2004

U
I

ECE 525
Lecture 27

Comment Cards (cont.)

User can also treat a block of code between keywords


$DISABLE and \$ENABLE
$DISABLE
all lines in between keywords are ignored
$ENABLE

B.K. Johnson

U
I

29

Fall 2004

ECE 525
Lecture 27

Running Text Only File

Run from DOS Command Prompt


Best if have a batch file
Sample Batch File Given in ATPDraw setup

Need a plot program to look at results


Rarely use text output file

B.K. Johnson

30

Fall 2004

U
I

Datafile Information

ECE 525
Lecture 27

See Handout Titled:


ATP Datafiles

B.K. Johnson

U
I

31

ATPDraw

Fall 2004

ECE 525
Lecture 27

Available for download from from ATP


distribution sites
Follow link for ATPDraw for information
about the program
Get the program and the patch files (update
to fix bugs in executable)
Manual for download (Vers 3.5 of prog)
B.K. Johnson

32

Fall 2004

U
I

ECE 525
Lecture 27

Capabilities

Graphical pre-processor for ATP


MS Windows (old DOS version too)
Development funded BPA and SINTEF
Energy Research
Written by Hans Kr. Hoidalen (Trondheim)
Automatically fills in the fields, removing a
major source of errors in data files
Still some sources of errors remain
B.K. Johnson

U
I

33

Fall 2004

ECE 525
Lecture 27

Installing ATPDraw

Installation is fairly easy


Default installation path Program Files
The space in the file name can create
problems running ATP from ATPDraw
Install it somewhere else. I normally install
in C:\tools\prog\ATPDraw

Creates shortcut in the start menu


B.K. Johnson

34

Fall 2004

U
I

Running ATP from


ATPDraw

ECE 525
Lecture 27

Still need a copy of ATP


Licensed users can get other versions
Follow installation directions for yours
ATPDraw calls ATP from a DOS Batch
file (extension *.bat)
Passes full path to file when calls ATP

B.K. Johnson

U
I

35

Sample Batch File

Fall 2004

ECE 525
Lecture 27

The following batch file is for Ming32 ATP


SET GNUDIR=C:\tools\prog\gatp\
SET PATH=C:\tools\prog\gatp;"%PATH%
del %2dbg
del %3lis
tpbig %1 %2 %3 %4 %5 %6

The first line defines variable GNUDIR


Different ATP versions use different name
Sets program working environment
The final \ is important
B.K. Johnson

36

Fall 2004

U
I Sample Batch File (cont.)

ECE 525
Lecture 27

Second line adds executable to your search


path (not needed if set this at boot time)
The next lines just clean up old files
del
del

%2dbg
%3lis

The fifth line calls ATP itself


tpbig

%1

%2

%3

%4

%5

%6

TPBIG is the executable itself


The others set input and output files

B.K. Johnson

37

U
I Sample Batch File (cont.)

Fall 2004

ECE 525
Lecture 27

Alternate command:
tpbig.exe both %1 %1. -R

both tells program to write error messages to


screen and to file (useful for debugging)
Could also set disk to only do disk file or leave
blank for no message
First %1 is input data file from ATPDraw
The second %1. is output text file. The .
prevents overwrite of original data file
-R tells ATP overwrite existing output file
B.K. Johnson

38

Fall 2004

U
I Sample Batch File (cont.)

ECE 525
Lecture 27

This bat file will let you run ATP, and all of
the support program (line constants etc)
Similar files can be written for Salford
version of the Watcom version
Watcom version is tricky to set up for line
constants program

B.K. Johnson

U
I

39

Setting Up ATPDraw

Fall 2004

ECE 525
Lecture 27

Open up ATPDraw
Select: Tools pull down menu
Select: Options...
Choose Preferences tab
You select a text editor, or use Notepad (default)
ATP is where you set path to your batch file

Armafit is a special line constants routine,


which we wont cover now
B.K. Johnson

40

Fall 2004

U
I

ECE 525
Lecture 27

ATPDraw Preferences

B.K. Johnson

U
I

41

Fall 2004

ECE 525
Lecture 27

Further Settings

The Directories tab settings are ok


However, you do want changes in the
View/ATP tab
Select Edit settings tab
You may want to change some of the
default settings. However, you can change
any of these for a specific data file

B.K. Johnson

42

Fall 2004

U
I

Simulation Settings

ECE 525
Lecture 27

Default time step (deltaT)


is very small
Default run time short
Xopt and Copt ok
Select Power Frequency
Reset to 60 Hz
Can mess up some sources
Author based in Europe
B.K. Johnson

U
I

43

Output Settings

Fall 2004

ECE 525
Lecture 27

Probably dont need the


selected Printout
options for most cases
Slow down the program
somewhat
Plot frequency should be
low and odd.

B.K. Johnson

44

Fall 2004

U
I

ECE 525
Lecture 27

Format Settings

Switch settings ok for


most cases (are for
statistical studies only)
May want to set some
of Misc settings,
although they will
follow from some items
in Drawing File
B.K. Johnson

U
I

45

Fall 2004

ECE 525
Lecture 27

Saving New Settings

The Save or Apply buttons arent


sufficient to permanently save change
All choose: Tools --> Save Options

B.K. Johnson

46

Fall 2004

U
I

Other Settings

ECE 525
Lecture 27

To set plotting program and other options


you need to open a file
Either select the File|Open sequence of click on
the icon
Initial default is the Examples directory, after that
it is the last directory worked in.
For now, choose example Exa_1.adp (*.adp
represents the drawing files). Some examples
may not work right
B.K. Johnson

U
I

B.K. Johnson

47

Example 1

48

Fall 2004

ECE 525
Lecture 27

Fall 2004

U
I

ATP Menu

ECE 525
Lecture 27

A new pulldown
menu is now
available at the
top of the
window, called
ATP

B.K. Johnson

U
I

49

ATP Menu

Fall 2004

ECE 525
Lecture 27

Settings is changes deltaT


etc. for a given case
Make File As generates
ATP data file from drawing
Run ATP calls your bat file
Each Edit calls text editor
Make Names, makes node
names for drawing
B.K. Johnson

50

Fall 2004

U
I

ECE 525
Lecture 27

Edit Commands

Allows you to set


additional commands
Run other ATP versions
On Current ATP drawing
On Selected File

Run plot programs


On Current PL4

Use Update to set


B.K. Johnson

U
I

51

Fall 2004

ECE 525
Lecture 27

Saving New Settings

The Update buttons isnt sufficient to


save for next time
All choose: Tools --> Save Options

B.K. Johnson

52

Fall 2004

U
I

Running an ATP File

ECE 525
Lecture 27

Now we run the example case opened earlier


Always a multi-step process
1) Make file to create ATP data file from drawing.
Must do this every time you change drawing
Default is to place this in ATP subdirectory under
ATPDraw home directory (with extension *.ATP)
Can edit this file with Edit ATP-File option (not saved
to drawing file)

2) Run your case


3) Call plotting program
B.K. Johnson

U
I

53

Running an ATP File

Fall 2004

ECE 525
Lecture 27

The drawing file saved separately (save often)


Remember to save your changes often
Default is to save this in the Project
subdirectory under ATPDraw
Note that if want to save elsewhere, need to
select a new home for both ADP and ATP files
PL4 and *.lis (or *.out depending on version) are
written to same directory at *.ATP file
Need to cleanup directories periodically
B.K. Johnson

54

Fall 2004

U
I

Making You Own File

ECE 525
Lecture 27

Open a new drawing (from File


menu or from icon)
Can get the component menu by
right clicking mouse in the
drawing screen
Each item lets you select
components to create

B.K. Johnson

U
I

55

Linear Branches

Fall 2004

ECE 525
Lecture 27

These are the basic circuit


elements
Single phase and three phase
options
C:U(0) and L:I(0) are capacitor
and inductor with voltage/current
initial conditions
Note ATPDraw uses U for voltage
B.K. Johnson

56

Fall 2004

U
I

ECE 525
Lecture 27

Operating on component

Once you select a component you can rotate


it by single clicking the right mouse button on
it.
Use to structure your drawing more nicely
This also selects polarity for branch outputs

Double-click left button to open a window to


edit values

B.K. Johnson

U
I

57

Resistor Dialog Box

Fall 2004

ECE 525
Lecture 27

Set value for


resistance in Ohms
Node names not set
Can add comment
Select Branch Output
$Vintage,1 sets high
precision numbers
B.K. Johnson

58

Fall 2004

U
I

Inductor

ECE 525
Lecture 27

L is in mH unless
you have set Xopt
to a frequency
Label creates a
label on the
drawing next to the
component
Help menus are
pretty good
B.K. Johnson

U
I

59

Capacitor

Fall 2004

ECE 525
Lecture 27

Capacitance is in
microFarads
unless Copt set
Note program sets
a default value to
prevent errors if
you randomly
connect nodes
B.K. Johnson

60

Fall 2004

U
I

RLC

ECE 525
Lecture 27

RLC lets you set R,


L, and C or any
combination
Creates same data
card as R, L, or C
alone, but lets you
do all fields

B.K. Johnson

U
I

61

3 Phase RLC

Fall 2004

ECE 525
Lecture 27

Can do a series 3
phase RLC
Y connected
Delta connected

B.K. Johnson

62

Fall 2004

U
I

Capacitor with Initial


Voltage Value

ECE 525
Lecture 27

Now can set value


for C
Positive and
negative voltage
relative to ground
at T=0

B.K. Johnson

U
I

63

Switch Pop Up Menu

Fall 2004

ECE 525
Lecture 27

In most cases you will use a time


controlled switch (single or three
phase)
Measuring Switches (always
closed)
TACS controlled switches

B.K. Johnson

64

Fall 2004

U
I

Time Controlled Switch

ECE 525
Lecture 27

Set T_close
Set T_open
T_open must be
larger than T_close

Imar is absolute
value of current it
will interrupt
Can select outputs
B.K. Johnson

U
I

B.K. Johnson

65

Three Phase Switch

66

Fall 2004

ECE 525
Lecture 27

Fall 2004

U
I

Measuring Switch

ECE 525
Lecture 27

No fields to set, but


you must select
Current output

B.K. Johnson

U
I

67

Source Pop Up Menu

Fall 2004

ECE 525
Lecture 27

Allows you to create ordinary


sources
Machines and TACS controlled
sources on other pop-up menus
Most of these sources are
referenced to ground

B.K. Johnson

68

Fall 2004

U
I

B.K. Johnson

U
I

B.K. Johnson

Type 11 Source

69

Single Phase AC Source

70

ECE 525
Lecture 27

Fall 2004

ECE 525
Lecture 27

Fall 2004

U
I

Three Phase AC Source

B.K. Johnson

U
I

71

Floating Source

ECE 525
Lecture 27

Fall 2004

ECE 525
Lecture 27

Created using the


Ideal Transformer
Component
Frequency default
is 50Hz unless you
change default
power frequency in
settings menu
B.K. Johnson

72

Fall 2004

U
I

Creating a Circuit

ECE 525
Lecture 27

Components are
highlighted in red until you
edit values
Can connect components
together by dragging left
mouse button between
nodes and then clicking on
finishing node
1 Ph or 3 Ph on context
B.K. Johnson

U
I

73

Selecting Node Names

Fall 2004

ECE 525
Lecture 27

Double click left button to


get node data window
Type node name in SWT
6 characters max
ALL CAPS or numbers or
will have errors

Can ground the node


Name wont matter
Ground symbol will appear
B.K. Johnson

74

Fall 2004

U
I

Selecting Node Names

ECE 525
Lecture 27

Can choose to Display


name on the screen
If you have a connection
between nodes, all nodes
will get a name you
assigned when Make
Names or Make File
ATPDraw assigns names
if you dont
B.K. Johnson

U
I

75

Building a System

Fall 2004

ECE 525
Lecture 27

Most recent
component
displayed in
a palette on
screen for
easier reuse
Can also
copy your
components
B.K. Johnson

76

Fall 2004

U
I

Probes and 3 Phase

ECE 525
Lecture 27

Menu for voltage and


current measurements
Probe Volt is line to
ground voltage
Probe Branch Volt
puts in dummy branch
as does probe curr
Select 1 or 3 ph
B.K. Johnson

77

U
I ATPDraw ATP Data File

Fall 2004

ECE 525
Lecture 27

File itself is less readable:


BEGIN NEW DATA CASE
C -------------------------------------------------------C Generated by ATPDRAW August, Wednesday 16, 2000
C A Bonneville Power Administration program
C Programmed by H. K. Hidalen at SEfAS - NORWAY 1994-98
C -------------------------------------------------------C Miscellaneous Data Card ....
C dT >< Tmax >< Xopt >< Copt >
5.E-6
.05
500
1
1
1
1
0
0
1
0
C
1
2
3
4
5
6
7
8
C 345678901234567890123456789012345678901234567890123456789012345678901234567890
/BRANCH
C < n 1>< n 2><ref1><ref2>< R >< L >< C >
C < n 1>< n 2><ref1><ref2>< R >< A >< B ><Leng><><>0

B.K. Johnson

78

Fall 2004

U
I ATPDraw ATP Data File

ECE 525
Lecture 27

V2
69.64
0
V3
V4
.03
0
V4
41.79
0
VS
V2
1.057
1
/SWITCH
C < n 1>< n 2>< Tclose ><Top/Tde ><
Ie
><Vf/CLOP >< type >
V2
V3
.0166667
99.
1
/SOURCE
C < n 1><>< Ampl. >< Freq. ><Phase/T0><
A1
><
T1
>< TSTART >< TSTOP >
14VS
0
11268.3
60.
-1.
1.
BLANK BRANCH
BLANK SWITCH
BLANK SOURCE
V4
V2
VS
BLANK OUTPUT
BLANK PLOT
BEGIN NEW DATA CASE
BLANK

B.K. Johnson

79

Fall 2004

Das könnte Ihnen auch gefallen