0% found this document useful (0 votes)
199 views

Atpdraw As User Shell For Atp Simulations

ATPDraw is a graphical user interface for ATP simulations that allows users to run simulations and post-processing programs from a centralized shell. Version 2.0 of ATPDraw includes improved handling of transmission line models, direct execution of the ATP program, additional components, and bug fixes. Only the 32-bit version of ATPDraw will continue to be developed going forward. The updates expand ATPDraw's capabilities for modeling transmission lines and cables as well as post-processing simulation results.

Uploaded by

Ionutz Axu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
199 views

Atpdraw As User Shell For Atp Simulations

ATPDraw is a graphical user interface for ATP simulations that allows users to run simulations and post-processing programs from a centralized shell. Version 2.0 of ATPDraw includes improved handling of transmission line models, direct execution of the ATP program, additional components, and bug fixes. Only the 32-bit version of ATPDraw will continue to be developed going forward. The updates expand ATPDraw's capabilities for modeling transmission lines and cables as well as post-processing simulation results.

Uploaded by

Ionutz Axu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

ATPDraw as user shell for ATP simulations

5 ATPDraw as User Shell for ATP Simulations

5.1 Introduction

The ATP-EMTP simulation system consists of various separate supporting programs (pre- and
post processors), data initialization files besides the actual main program (TPBIG.EXE or
ATPWNT.EXE). Besides other alternatives (e.g. using ATP Control Center) ATPDraw can be
used as a simulation center, which provides an operating shell for other ATP-EMTP
components. This shell function is supported by version 1.2 and above [1] and it makes
possible to run external batch jobs, such as direct execution of ATP, to launch post-
processors, or running an external supporting program.

Fig. 1 gives a functional overview of the traditional use of ATP-EMTP program. ATP
components that are communicating via disk files: i.e. the output of the pre-processors are
used as input for the main program, while the product of the simulation can be used as input
for plotting programs. When the main program is used as pre-processor for some components
(e.g. BCTRAN, LINE CONSTANTS etc.), the punch file products must be re-used as input in
a subsequent run via $Include. The structure of the program components is rather difficult, so
having a user shell which supervises the execution of separate programs and input/output
flows is a great advantage.

ASCII Text TPPLOT


editor

.ADP PCPLOT
project file
.ATP file
input data PlotXY
.ALC
line data
ATPDraw *.PL4 PCPLOT for
USP graphical Windows
*.PS
Library LCC user-shell
PL42mat
.PCH *.ATP
Library
GTPPLOT
ATP .PL4, .PS,
(TPBIG.EXE) .HGL file
DspATP32

Data
Information DisplayNT

Fig. 1 - Schematic description of the ATPDraw user shell

ATP-EMTP Beginner's Guide 33


ATPDraw as user shell for ATP simulations

5.2 Direct execution of external commands in ATPDraw

The Run ATP…command makes it possible to use ATPDraw as the center of a powerful
simulation environment, i.e. from which other components (pre- and post-processors,
supporting programs and utilities) of the ATP package are launched. Besides the standard run
ATP command users can add other external commands (e.g. Run ATP / Run LCC / Run
TPPlot / Run PCPlot / Run PlotXY / Run PL42mat etc.) to the existing program items under
the ATP menu.

This function is provided by the Edit Commands dialog box (see Fig. 2). Here the user can
specify the name of a .BAT or an .EXE file and the name of a file which will be sent as
parameter (e.g. ATP.BAT <current .atp file> or PlotXY.exe <current .pl4 file>) when
ATPDraw calls this external program. The Name field specifies the name of the job, while the
Command and Parameter field specifies the name of the file to be executed and its parameter
settings. Selecting Current ATP radio button, the full file name of the current circuit window
with extension .ATP will be sent as parameter. When selecting the File button, ATPDraw
performs a file open dialog box before executing the job, requesting the user to select a file
name, which is then passed as parameter. The new commands specified here are inserted in
the ATP menu dynamically, when the user activates the Update button.

Fig. 2 - The Edit Command dialog box Fig.3 User specified batch jobs
As any other program options, the user specified commands are written to the
ATPDraw.ini file if Tools | Save Options command executed or the “Save options on exit”
on the General page of the Tools | Options menu is checked.

This feature can be used for many different purposes in ATP simulation: e.g. running ATP
within ATPDraw; processing simulation results by TPPLOT, PCPlot or PlotXY; launching
supporting programs, or other data assemblers.
A batch file is suggested as default (runATP_S.bat for the Salford version and runATP_W.bat
for the Watcom versions) under the Tools | Options |Preferences as shown in Fig 3.

ATP-EMTP Beginner's Guide 34


ATPDraw as user shell for ATP simulations

Fig. 3 - Default settings for running ATP

5.2.1 Running Salford ATP

It must be noted that ATPDraw has no any connection with the main program of ATP
(TPBIG.EXE) at the code level or via DLLs. The Run…feature simply executes the external
commands specified by the user. So it is always the user’s responsibility to install ATP
properly and to set the properties and provide the content of that external .BAT files in correct
format.

To ensure smooth interaction between ATPDraw, DBOS and ATP/Salford, it is recommended


to add the DBOS directory to the search PATH and specify an ATPDIR environmental
variable1 in the AUTOEXEC.BAT file (i.e. SET ATPDIR=Drive:\Path\Sal_ATP_prog_dir).
The next step is to create a Run ATP command using the ATP | Edit Commands submenu by
selecting the “current ATP” as Parameter and Drive:\Path\runATP_S.bat as the
Command. Only a single line command is needed in the runATP_S.bat:
run77.exe %atpdir%tpbig.exe /PARAMS %1 {or /PARAMS disk %1 * -r }
Properties of the runATP.bat should be set as shown next under Win95/NT:
Program:
Cmd line: Drive:\ATPDRAW\runATP_S.bat
Batch file: DBOS_ON.BAT
Run: Normal Window
Close on exit: ;
Screen Usage: Window

Because ATP/Salford is running under DBOS, a single line batch file DBOS_ON.BAT must
be executed before TPBIG.EXE is loaded. The corresponding single line command of the
DBOS_ON.BAT file referenced in the properties settings should be as follows:
C:\dbos3_5\dbos /page 800000 {800000 limits DBOS to grab all extended memory}

1
The integrated ATP installation wizzard distributed by EEUG makes this settings automatically.

ATP-EMTP Beginner's Guide 35


ATPDraw as user shell for ATP simulations

5.2.2 Running Watcom ATP

For the Watcom version of ATP the name of the environmental variable is WATDIR (i.e. SET
WATDIR=Drive:\Path\Wat_ATP_prog_dir) in the AUTOEXEC.BAT. Then create a Run
W_ATP command using the ATP | Edit Commands submenu and select the “current ATP” as
Parameter and Drive:\Path\runATP_W.BAT as Command. The ATP.BAT is just a
single line command again, as shown below:
%watdir%tpbigw.exe /PARAMS %1 {or /PARAMS disk %1 * -r}

5.2.3 Running TPPLOT from ATPDraw

Because TPPLOT is also a DBOS application, settings are very similar to those specified in
section 5.2.1. When creating the Run TPPLOT command using the ATP | Edit Commands
submenu, select “None” as Parameter and Drive:\Path\TPPLOT.BAT as the Command.
The TPPLOT.BAT is a single line file: run77 %atpdir%tpp.exe. Properties settings are
almost identical with that of specified in section 5.2.1, except the Screen:

Program:
Cmd line: C:\ATPDRAW\TPPLOT.BAT
Screen:
Usage: Full-screen !

Moreover, it is suggested to modify the settings at the end of the TPPLOT.BEG file as shown
below:

C @LAB2 {comment it out or copy the LAB2 file into your ATPDraw directory}
FILE ATP\*.PL4 {add these two commands to the end of the file}
CHOICE

5.2.4 Launching PCPlot, W_PCPlot or PlotXY and ATP_LCC

After creating the Run … command using the ATP | Edit Commands submenu selet “Current
PL4” as Parameter and Drive:\Path\Name_of_the.exe file as Command. for the
post-processors (PCPlot, PCPlot for Windows, PlotXY, PL42MAT) and “None” for
ATP_LCC. Finally, Browse and select the name of the executable disk file of the
corresponding application. Update button adds the new Run…command to the ATP menu.

5.3 References
[1] L. Prikler, H. K. Hoidalen: ATPDraw for Windows 3.1x/95/NT version 1, User’s Manual,
SEfAS TR A4790, Norway 1998

ATP-EMTP Beginner's Guide 36


ATPDraw for Windows – Version 2

6 ATPDraw for Windows - Version 2

Hans Kristian Høidalen N-7491 Trondheim


Institute of Electrical Power Norway
Norwegian University of Science and Technology Fax: +47 73594279
[email protected]

Abstract - The paper briefly summarises the functionality of ATPDraw for Windows, version
1.0. Then the new features of ATPDraw are presented along with ideas for future
development. The latest version of ATPDraw is called 2.0 and includes better handling of
MODELS, direct execution of ATP, several new components, and some important bug-fixes.
This paper gives some examples of what kind of features were implemented in version 2 of the
program, spanning from better handling of line/cable modelling to postprocessing. Only the
32-bit version of ATPDraw (for Windows 95/98/NT) will be further developed.

6.1 Introduction

A TPDraw for Windows is a graphical, mouse-driven preprocessor to the ATP version of


the Electromagnetic Transients Program (EMTP). In the program the user can construct
an electric circuit, by selecting predefined components from an extensive palette. The
preprocessor then creates the corresponding ATP input file automatically in correct format.
Circuit node naming is administrated by ATPDraw and the user only needs to give name to
"key" nodes. ATPDraw currently supports 64 standard components and 24 TACS objects
(+probes&3-phase and several old components). A simplified usage of MODELS is also
possible. In addition, the user can create his own circuit objects using the Data Base Module
and the $INCLUDE option of ATP. Both single phase and 3-phase circuits can be constructed.
Multiple circuit windows make it possible to work on several circuits simultaneously and
copy information between the circuits. Most types of edit facilities like copy/paste, rotate,
import/export, group/ungroup, undo and print are available. Other facilities in ATPDraw are:
a built-in editor for ATP-file editing, support of Windows clipboard for bitmap/metafile,
output of Windows Metafile/Bitmap file format or PostScript files. The possibility of building
up libraries of circuits and sub-circuits makes ATPDraw a powerful tool in transients analysis
of electric power systems. The ATPDraw package also includes the ATP_LCC program for
Line/Cable constants.

The ATPDraw for Windows program is royalty free and can be downloaded free of charge
from the ftp server ftp.ee.mtu.edu. The proprietary rights of the program belong to Bonneville
Power Administration, USA, the company who financed the program development.

6.1.1 History of ATPDraw development

The first version of a simple graphical preprocessor was developed at the Norwegian Institute
of Technology in 1991. The program was intended for educational purposes. Two demo
versions of ATPDraw were demonstrated at the European EMTP Users Group fall meetings in
Leuven, Belgium in 1991 and 1992. The Bonneville Power Administration (BPA), USA then

ATP-EMTP Beginner's Guide 37


ATPDraw for Windows – Version 2

contacted the developers with the intention to finance further development of the program.
The first phase of the project was completed in May 1994 and ATPDraw was made available
via the Internet together with its manuals. In the second stage of the project, completed in
December 1995, some important limitations of the previous version were overcome. The
program became compatible with the DOS Protected Mode Interface and could run more
reliably in Windows’ DOS box, as well as on network connected PCs. In addition, the
program speed was increased since no overlay and disk swapping were required. Thanks to
the continuous support of BPA, the program development was going on. A completely new
release written in Borland Delphi is now available for the most popular Windows operating
systems: a 32-bit version for Windows 95/NT, and a 16-bit version for Windows 3.x. This
User’s Manual has been prepared for users of that recent ATPDraw version.

6.2 Functionality of ATPDraw

This chapter explains some of the basic concepts of ATPDraw, focusing on how to operate the
Main menu and the Component selection menu, and two important windows: the Main
window and the Component dialog box. The environment of ATPDraw is shown in Fig. 1.
ATPDraw has a standard Windows user interface.
Main menu Tool bar icons Component Windows
tool bar standard buttons

Circuit
Header, map
circuit file
name

Circuit
windows

Scroll
bars

Circuit
comments

Current
action
mode

Status bar with Component


menu option hints selection menu

Fig 1 - The Main window, Multiple Circuit windows and the floating Selection menu.

ATP-EMTP Beginner's Guide 38


ATPDraw for Windows – Version 2

The ATPDraw environment consists basically of the following parts:

Main menu:
The main menu provides access to all the functions offered by ATPDraw.
File: Load and save circuit files, start a new one, import/export circuit files, create
postscript and metafile/bitmap files, print the current circuit and exit.
Edit: Circuit editing:copy/paste/delete/duplicate/flip/rotate, select, move label, copy
graphics to clipboard and undo/redo etc.
View: Tool bar, status bar and comment line on/off, zoom, refresh and view options.
ATP: Create node names, make ATP file, edit ATP file, ATP file settings
(miscellaneous cards and file formats, file sorting etc.), running batch jobs.
Objects: Edit support files (default values, min/max limits, icon and help file), create new
files for MODELS and User Specified Objects.
Tools: Icon editor, help file editor, text editor, setting of various program options.
Window: Arranging of the circuit windows. Map window.
Help: About box and Windows help file system.

Circuit window:
The circuit is built up in this window. The circuit window is the container of circuit objects.
From the file menu the user can load circuit objects from disk or simply create an empty
window to start building a new circuit. Circuit objects include standard ATP components, user
specified elements, MODELS and TACS components, connections and relations. ATPDraw
supports multiple documents and offers the user to work on several circuits simultaneously
along with the facility to copy information between the circuits. The size of the circuit
window is much larger than the actual screen, as indicated by the scroll bars of each circuit
window. To move around in the circuit, use the window scrollbars, or drag the view rectangle
of the Map window to another position.

Component selection menu:


This menu is hidden initially and pops-up only after a right mouse button click in an empty
space of the Circuit window. In this menu all circuit objects can be selected. After selecting an
object in one of the fields or pop-up menus, the object is drawn in the circuit window in
marked and moveable mode.

6.2.1 Overview of ATPDraw

The ATPDraw for Windows program has functionality similar to the DOS version [2]. The
Component selection menu is hidden, however, but appears immediately when clicking the
right mouse in the open area of the Circuit window. Fig. 1 shows the main window of
ATPDraw containing two open circuit windows. From the Component selection menu you
select components to insert into the circuit. To select and move an object, simply press and
hold down the left mouse button on the object while moving the mouse. Release the button
and click in an empty area to unselect and confirm its new position. The object is then moved
to the nearest grid point (known as gridsnapping). If two or more components overlap as a
consequence of a move operation, you are given a warning message and can choose to
proceed or cancel the operation.

ATP-EMTP Beginner's Guide 39


ATPDraw for Windows – Version 2

Selecting a group of objects for moving can be done in three ways: Holding down the Shift
key while left clicking on an object. Pressing and holding down the left mouse button in an
empty area enables the user to drag a rectangular outline around the objects he wants to select.
And finally, double-clicking the left mouse button in an empty area enables the definition of a
polygon-shaped region by repeatedly clicking the left mouse button in the circuit window. To
close the region, click the right mouse button. Objects that are defined to fall within the
indicated region or rectangle are added to the selected objects group. For components this
means that the centre point of a component icon must lie within the defined region or
rectangle. For connections and relations the region or rectangle must surround both end-
points. To move the selected group of objects, press and hold down the left mouse button
inside the group while moving the mouse. Unselect and confirm the new position by clicking
in an empty area. Any overlapping components will produce a warning.

To move objects outside the visible part of the circuit, use the window scrollbars or the view
rectangle in the map window. Any selected objects or group will follow the window to its new
position.

Objects or group can be rotated by clicking the right mouse button inside the selected object
or group. Other object manipulation functions, such as undo/redo and clipboard options can be
found in the Edit menu. Additionally, the most frequently used object manipulation functions
can be accessed by holding down the Shift key while clicking with the right mouse button on
an object or on a selected group of objects. This will display and activate the circuit window
shortcut menu.

Components and component nodes can be opened for editing, by a right-click (or left double-
click) on an unselected component or node. Either the Node data, Component or Open Probe
dialog box will appear, allowing the user to change component or node attributes and
characteristics.

Selecting a single component and press the Crtl+F1 key combination, the component specific
help is displayed. When double-clicking on a selected group of objects, the Open Group
dialog box will appear, allowing the user to change attributes common to all components in
that group, such as group number and hide and lock state. Default component attributes are
stored in support files. Access to create and customise support files is provided by the Objects
menu.

Components are connected if their nodes overlap or if a connection is drawn between the
nodes. To draw a connection between nodes, click on a node with the left mouse button. A
line is drawn between that node and the mouse cursor. Click the left mouse button again to
place the connection (clicking the right button cancels the operation). The gridsnap facility
helps overlapping the nodes. Connected nodes are given the same name by the Make Names
and Make File options in the ATP menu. Nodes can be attached along a connection as well as
at connection end-points. A connection should not unintentionally cross other nodes (what
you see is what you get). A warning for node naming appears during the ATP file creation if a
connection exists between nodes of different names, or if the same name has been given to
unconnected nodes. Connections can be selected as any other objects. To resize a connection,
click on its end-point with the left mouse button, hold down and drag. If several connections
share the same node, the desired connection to resize must be selected first. Selected
connection nodes are marked with squares at both ends of the selection rectangle.

ATP-EMTP Beginner's Guide 40


ATPDraw for Windows – Version 2

After selecting a component in the Component selection menu the new circuit object appears
in the middle of the circuit window enclosed by a rectangle. Click on it with the left mouse
button to move, or the right button to rotate, finally click in the open space to unselect and
place the object. The object-input window appears after clicking the right mouse button on a
circuit object, as shown in Fig. 2.

Fig 2 - The Component dialog box.

The Component dialog box has the same layout for all circuit objects. In this window the user
must specify the required component data. The number of DATA and NODES menu fields
are the only difference between input windows for standard objects. The nonlinear branch
components have a Characteristic page too, in addition to the normal Attributes page, where
the nonlinear characteristics and some include file options can be specified.

Below the data input column there is a Group No input field. This is an integer field where an
optional group number can be specified to the object, which could be used as a sorting criteria
(the lowest group number will be written first into the ATP file).

Below the node input column there is a Label input text field. The content of this field is
written on the screen and also into the circuit file. The label text is movable. The component
dialog box has a Comment input text field. If you specify a text in this field, it will be written
to the ATP file as a comment (i.e. as the first line of the object’s data).

The radio buttons of the Output group specify the branch output requests. If the Hide box is
selected, the object becomes hidden (which means that it is not written to the ATP file) and its
icon becomes light gray in the circuit window. The Lock option is not yet implemented in the
present version of the program.

ATP-EMTP Beginner's Guide 41


ATPDraw for Windows – Version 2

The OK button will close the dialog box and the object’s data and its properties are updated in
the data structure. The red drawing color that indicates that no data is given to the object will
be turned off. When clicking on the Cancel button, the window will be closed without
updating the object’s data. The Help button invokes the Help Viewer showing the help text of
the object. For obtaining further help press the F1 key.

6.3 Latest news in ATPDraw development

ATPDraw version 2 introduced the “project” concept. Project files (.adp) are stored in the
Project directory. A project file contains a circuit description and all non-standard (or user
specified) support (sup), model (mod), line/cable data (alc) and library (lib) files. When
opening a project, ATPDraw unpackes the files and store them in the specified folders. If the
folder specified in the project file is unknown the default folders are used.

6.3.1 Improved handling of MODELS

Usage of MODELS within version 1.0 of ATPDraw is accomplished in two steps. The first
step is performed outside ATPDraw and consist of writing a model file containing the
description of each model (.MOD). This file is an ordinary text file starting with MODEL
<ModelName> and ending with ENDMODEL. The model file also contains definitions of
INPUT, OUTPUT and DATA variables. The second step is to define an object within
ATPDraw. This is done by creating a support file (.SUP) containing the definition of each
object node and data along with its icon. The usage of MODELS is thus time consuming and
may introduce errors, since a new object has to be defined each time.

Version 1.2 and above of ATPDraw for Windows is capable of reading the .MOD file
directly, examine its input, output and data variables, and suggest a support file on the correct
format. If the user wants a different icon or other node positions on the icon border he is free
to modify the default support file. This new module of ATPDraw is activated if the user
selects a file with extension .MOD under MODELS in the Component selection menu.
ATPDraw accepts either comma or CR+LF as separation between variables. Comment flags
‘C’ in column 1 and ‘--‘ are handled. As default, input nodes are basically positioned on the
left side of the icon and the outputs on the right. Maximum 12 input+output variables are
allowed along with 36 data variables. Only single variables are allowed (not indexed). When
reading this .mod file, ATPDraw performs a message box shown in Fig. 3.

If the user clicks on Yes in Fig. 3, the edit support file window will appear where the user
primarily can edit the icon and change node positions. If the user selects No, the default
ATPDraw object is drawn in the circuit window directly, as shown in Fig. 4.

Fig. 3 - Read .mod file dialog box. Fig. 4 - Default model object.

ATP-EMTP Beginner's Guide 42


ATPDraw for Windows – Version 2

Version 2 of ATPDraw also supports RECORD of model variables. This option is found
under ATP|Settings/Record page as shown in Fig. 5.

Fig. 5 - Record of model variables.

In the list box under Model, all models in the active circuit are listed with their USE AS name.
When selecting a model in this box its variables (declared under VAR) are listed in the list
box under Variable. When selecting a variable here a default alias name appears in Alias. Edit
this name and click on Add to record the variable. The Alias name can be changed by selecting
an item in the Record list box and type in a new name. The record list is stored in the circuit
file, but it does not follow the circuit when using the clipboard or the export group option.

6.3.2 Direct execution of other programs

Direct execution of ATP was removed from ATPDraw when introducing the Windows
version 1.0. This was due to possible conflicts with DBOS. Now this feature has been
reintroduced in a new and powerful way. The user is allowed to specify several programs to
execute and what to send as parameter when calling these programs. The option is found
under ATP|Edit Commands as shown in Fig. 6. In this window the user can select a name for
the batch job (under Name), which file to execute (under Command), and what kind of file to
send as parameter when calling this program (under Parameter). Selecting Current ATP under
Parameter will send the name of the latest generated ATP file as parameter. When selecting
File, the user has to specify a file to send when later launching the batch job. The specified
batch jobs appear in the main menu under ATP as shown in Fig. 7. They are stored in the
atpdraw.ini file under Tools|Options (Save or Save options on exit).

ATP-EMTP Beginner's Guide 43


ATPDraw for Windows – Version 2

Fig. 6 - The Edit batch job window. Fig. 7 - ATP menu.

6.3.3 New components

All the older circuit objects of version 1.0 are supported by version 1.2 and above, but some of
them has been removed from the Component selection menu and replaced by other more
general components. The removed objects are:

Component Selection menu Support files


• RLC 3-ph RLC_3, RLC_3X3, RLC_D3
• Nonsym. lines **** LINELC_3, LINELC_6, LINELC_9
• Switch T. 3 SWITCH_3
• Stat./Systematic switches STATSWIT, SYSTSWIT
• Saturable transformers TRADD_3, TRADY_3, TRAYD_3, TRAYY_, TRAYYD_3
• TACS G(s) and K G(S)_NOL, G(S)_NAL, G(S)_FIL, K_NOL, K_NAL, K_FIL

The objects can be found under User Specified|Files in the /SUP directory if absolutely
required. They are also supported internally in ATPDraw and will produce the correct output.
Old circuit files will of course still contain these objects.

The three RLC objects have been removed since the RLC3, RLCD3 and RLCY3 objects cover
them (individual R, L and C in the three phases). The same argument applies to the
SWITCH_3 component being removed due to the SWIT_3XT object (independent opening
and closing times for each phase). The statistic and systematic switches have been replaced by
new objects, which support specification of master/slave switches. The Nonsym. lines have
been removed since the feature Overhead line (PCH) really makes these dummy lines
superfluous. New and general objects have replaced the transformer and transfer function
objects. The following new objects are available in ATPDraw version 2:

ATP-EMTP Beginner's Guide 44


ATPDraw for Windows – Version 2

Selection menu Sup. file Icon Purpose


Branch linear| RLC3 Individual RLC in the three phases
RLC 3-ph

Branch linear| RLCD3 Individual RLC in the three phases.


RLC-D 3-ph Delta-coupled.

Branch linear| RLCY3 Individual RLC in the three phases.


RLC-Y 3-ph Wye-coupled.

Branch nonlinear| NLIND96 Current dependent inductance with


L(i) Type 96 hysteresis. Type 96.

Line distributed LINEZU_2 KCLee distributed parameter. 2-phase.


Untransposed With complex transformation matrix.

Line distributed LINEZU_3 KCLee distributed parameter. 3-phase.


Untransposed With complex transformation matrix.

Switches| SW_STAT Statistic switch with


Statistic independent/master/slave option.

Switches| SW_SYST Systematic switch with independent/master


Systematic /slave option.

Transformers| GENTRAFO General-purpose 3-ph., 2 or 3 windings


Saturable 3-phase saturable transformer. High/low homopolar
reluctance.
TACS| TRANSF General purpose laplacian transfer function in
Transfer function TACS.

TACS| DEVICE56 User specified saturation.


Devices

TYPE 94| TYPE94_1 Type-94 components. Supported interface:


1 phase , 3 phase TYPE94_3 Thevenin, Norton or Iterated

Frequency comp.| HFS_SOUR Harmonic frequency source


HFS Source

Frequency comp.| CIGRE_1 CIGRE load for HFS studies


Cigre load 1/3 ph CIGRE_3

Frequency comp.| RLC_F Linear RLC for HFS studies


Linear RLC

ATP-EMTP Beginner's Guide 45


ATPDraw for Windows – Version 2

Figures 8 and 9 show the component dialog boxes for the four new components.

Fig. 8 - New component dialog boxes for two new objects.


Left: General 3-phase transformer. Right: TACS transfer function.

Fig. 9 - New component dialog boxes for two new objects.


Left: Systematic switch. Right: Statistic switch.

6.3.4 Other updates and bug-fixes

The problem with trailing blanks in punch files is removed from the Overhead lines (PCH)
module.

Handling of transposition for objects having several 3-phase nodes is improved. It should now
be possible to use transposition correctly with user specified objects. This is accomplished by
specifying a 3-phase circuit number for each node in the support file. In this way the program
knows the nodes that should have the same phase sequence. All the support files for the
standard components as well as the default objects for overhead lines are updated.
Specification of the circuit-number is done under Kind under Objects|User Specified|Edit sup-
file/Nodes page as shown in Fig. 10 for the GENTRAFO object. Since Kind is equal for the P,

ATP-EMTP Beginner's Guide 46


ATPDraw for Windows – Version 2

S, and T 3-phase nodes, these nodes will receive the same phase sequence. The user has to
update the user-specified objects correspondingly.

Fig. 10 - Specification of circuit number (Kind) for 3-phase objects.

The icon of each component can be edited individually. A speed button is found at the bottom
of the component dialog box, as shown in Fig. 2. Clicking this button brings up the icon editor
where the user can edit the icon for the specific object. The icons are stored in the circuit file.

The high precision option ($Vintage,1) has been extended and improved. All components
where the high precision format is available has a $Vintage, 1 check button in the component
dialog box, as shown in Fig. 2. It is thus possible to control the precision format for each
individual component. Selecting High resolution under the ATP|Settings/File format page will
overrule the individual setting and force $Vintage, 1 for all components if possible. The
esthetical problem with several superfluous $Vintage cards has been removed.

The characteristic for non-linear components (non-linear branches, saturable transformers, and
TACS Device 56) is automatically sorted after increasing x-values.

All models are written directly in the ATP file instead of using $Include. This helps the users
who complains about the $Prefix/$Suffix problem when combining MODELS with User
Specified objects. Blank lines are removed when inserting the model file in the ATP file.

An improved real to text string conversion routine is used for the component dialog box and
should remove the irritating round off error often seen in the data edit fields. Lower values
-10 -38 +38
that 10 are supported (legal range is now 0 and ±10 up to ±10 ). An internal error in
-10
ATPDraw is also removed so that lower values than 10 are written to the ATP file correctly.

TACS Device 50 has received an extra variable (max. acceptable change). A new support file
is distributed, and ATPDraw updates the circuit files.

Version 1.2 introduced a new format of both support files and circuit files. New support files
for standard components are included in the distribution. The user needs to update his old

ATP-EMTP Beginner's Guide 47


ATPDraw for Windows – Version 2

support files for MODELS and User Specified objects. A separate utility program called
ConvertSUP is also distributed. The layout of this program is shown in Fig. 11.

Fig. 11 - ConvertSUP program.

The program reads all the support files in the specified directories, rename the old ones to
extension ‘.old’ and writes new support files. These support files are compatible with version
2.0. The most severe change in the support file format is that each file now includes a code for
the type of component. When performing the component dialog box and writing the ATP file,
ATPDraw checks this number instead of the file name. It is of little importance to the user
(although he is now free to store his support files anywhere), but cleans up the source code
extensively. The program does not update the 3-phase circuit number (Kind in Fig. 10).

ATPDraw can read old circuit files from the 1.0 version. As default ATPDraw stores new
circuits in a 2.0 format. This format can not be read by the 1.0 version (and thus by users
having the 16-bit Windows 3.1 version). It is also possible to store the file in the 1.0 format by
selecting Save As and specify version 1.0 under Save as type. Version 1.0 circuit files do not
include all the ATP|Setting variables (frequency scan etc..), MODELS Record and have only
32 data per component (36 data in the new version). If the objective is to ensure complete
compatibility with version 1.0 users, none of the new components should be used.

6.3.5 Harmonic source for Harmonic Frequency Scan

Harmonic frequency scan simulations are now supported under ATP|Settings/Simulation, as


shown in Fig. 12. The user must specify the Power Frequency.All types of the new ATP
output format is supported. Certain combinations of Outputs are not possible as required by
ATP.

Selecting Harmonic HFS will run the ATP data case so many times as specified in the
Harmonic source in Fig. 13. In this example, 5 harmonic components are specified and the
ATP data case will run 5 times. The frequency of the harmonic source will for each ATP run
be incremented. In the first run the source frequency will be 1x50 Hz, the second run 5x50 Hz
etc. up to the fifth run f= 11x50 Hx = 550 Hz. The frequency basis is selected under Power
Frequency in Fig. 12. The source frequency can also be specified directly in Hz and in such
case the first F/n must be greater of equal to Power Frequency. Specifying the frequencies F/n
like 50, 250, 350, 450, and 550 would be equivalent to what is shown in Fig. 13.

ATP-EMTP Beginner's Guide 48


ATPDraw for Windows – Version 2

Fig. 12 Selecting Harmonic Frequency Scan.

Fig. 13

6.3.6 Improved handling of Line/Cable models

The separate Line/Cable Constant supporting program ATP_LCC was on the prototype level
and contained some bugs and inconsistencies. The latest development resulted significant
change in the LINE/CABLE CONSTANTS support. The process of creating a line/cable
models in ATPDraw via the program ATP_LCC, needed several steps. This complicated the
usage and resulted in some extra work when modifying the model.

To use the built-in line/cable module of ATPDraw the user must first select a line/cable
component with the desired number of phases (1..9) under Line/Cable item in the selection
menu. This will display a component in the circuit window which is connected to the circuit

ATP-EMTP Beginner's Guide 49


ATPDraw for Windows – Version 2

as any other component. Clicking on this component will bring up a special input dialog box
called the Line/cable dialog as shown in Fig. 14.

When the required data are specified the user can close the dialog by clicking on OK. This
will store the specified data to disk in a user selectable alc file (atpdraw line/cable) preferably
in the /LCC directory. The user is also asked if ATP should be executed to produce the
required atp, punch and lib files. If the user answers No on the this question, ATP is not
executed, and the user is prompted again later when creating the final ATP file under
ATP|Make file. The lib-file required to built the final ATP file is given the same name as the
alc file (with extension lib) and stored in the same folder. The user can also run ATP at any
time by clicking on the Run ATP button, store the alc data on a different file (Save As) or
import old alc file data (Import).

Because the Noda line/cable data format does not allow the full path of the lib-file to be
written in the ATP file, the .alc file should be stored in the same directory as the final atp file
or the lib-file should be moved to this directory manually. For all other line/cable models the
$Prefix/$Suffix option must be turned off or the lib-files move to the /USP folder.

It is very important to ensure a correct ATP installation and setup of the ATP command in
ATPDraw. This is done under Tools|Options under Preferences. It is recommended to use
batch files. Two such files will be distributed with ATPDraw (runATP_S for the Salford
version (DBOS required) and runATP_W for the recommended Watcom or GNU versions). If
the setup of ATP is incorrect, line and cable models will not be produced. When creating a
Noda line/cable model the Armafit program is executed automatically to create the required
lib-file. The Armafit command is specified under Tools|Options under Preferences. The batch
file runAF.bat is distributed with ATPDraw.

Fig. 14 - Line/Cable dialog window

ATP-EMTP Beginner's Guide 50


ATPDraw for Windows – Version 2

In the Line/cable dialog the user can select


System type:
Overhead line: LINE CONSTANTS
Single core cables: CABLE PARAMETERS
Enclosing pipe: CABLE PARAMETERS
Model:
Bergeron: Constant parameter KCLee or Clark models
PI: Nominal PI-equivalent (short lines)
JMarti: Frequency dependent model with constant transformation matrix
Noda: Frequency dependent model
Semlyen: Frequency dependent simple fitted model (not supported in CABLE
PARAMETERS)
View:
Displays the cross section of the specified line or cable.
Zooming is supported with speed- or mouse- buttons (in: left, out: right).
Copying to the Windows clipboard is supported in either bitmap or metafile formats.

Selecting the Verify button will establish a LINE MODEL FREQUENCY SCAN data case.
Further ATP is executed and ATPDraw reads the generated LIS file and displays the result.
This enables the user to compare his line/cable model with an exact PI-equivalent as a
function of frequency. The minimum and maximum frequencies must be specified along with
the number of points per decade. The created data case calculates the zero-sequence and
"positive" sequence input impedances. In the zero-sequence mode the same voltage is applied
to all phase at one end of the line. In the "positive" sequence the sum of the applied voltages
is zero. For a n-phase line the angle between the voltages is 360/n, thus only for a 3-phase
model the "positive" sequence can be called positive. In both cases the other end of the
line/cable is short circuited and grounded. The user can select which phase and mode to study.
The magnitude of the input impedance for the selected phase and mode is drawn in a log-log
graph for both the model to be tested and the exact PI-equivalent. The LINE MODEL
FREQUENCY SCAN feature of ATP does not work for Noda and Semlyen models.

Fig. 15 shows the Verify module where a 500 m long 3-phase single core cable modeled as
JMarti (f-matrix =1e4 Hz) are compared with an exact PI-equivalent from 1 Hz to 1 MHz.
The fit for this type of cable is good but often large deviations are seen for low frequencies.

6.4 Future development

ATPDraw does not support or facilitate the usage of the MODELS language. The user must
write his own model file without the assistance from ATPDraw. The plan is to extend the
present text editor in ATPDraw and add some tools to assist the user when writing a model
file. This will include some help files and automatic inclusion of the model’s structure. The
editor will also make sure that the model file is stored in the correct directory with the correct
extension.

ATPDraw is now a pure pre-processor to ATP. The plan is to also let ATPDraw handle output
of ATP simulation and plot pl4 files on screen and paper. Besides the pure plotting some
simple routines will be added, to enable mathematical operations on curves. The schedule
includes the preparation of the data structure to handle curves. This includes reading of

ATP-EMTP Beginner's Guide 51


ATPDraw for Windows – Version 2

Fig. 15
multiple pl4 files. Borland Delphi supports a graph object, which makes it rather simple to
plot and print curves. This graph object must be adapted to ATPDraw, where the user is
allowed to specify which curve to plot, colour, dot/dash, zooming etc. Also routines for curve
manipulation will be added. Typical examples are scaling, offset adjustment, adding and
subtracting curves, FFT analysis etc.

The schedule also includes improving the handling of electrical machines. Allow several
machines and support the special cases when two machines feed the same bus. Additionally,
the type 94 component will be included.

6.5 Conclusion

Version 2 of ATPDraw for Windows 95/98/NT has been extended and improved to meet the
requirements from users all over the world. Of most importance is the facilitated handling of
MODELS, direct execution of ATP, and more general components. The schedule for further
ATPDraw development contains additional improvements of MODELS handling, and plotting
of simulation data. Only the 32-bit version will be developed further.

6.6 Acknowledgement

The work on ATPDraw has been possible thanks to funding from Bonneville Power
Administration in Portland, USA.

6.7 References

[1] L. Prikler, H.K. Høidalen: ATPDraw for Windows 3.11x/95/NT version 1.0 User’s
Manual, SEfAS TR A4790, Norway, ISBN 82-594-1358-2, Oct. 1998.
[2] H.K. Høidalen: ATPDRAW version 3, User Manual, EFI TR A4389, Norway 1996.

ATP-EMTP Beginner's Guide 52

You might also like