Capitulo 16
Capitulo 16
Program Automation
Chapter 16 - Program Automation
As a program extension. In this case the user, in the course of using the program interactively, can decide to select an existing Automation File as the next instruction to the
program.
For un-attended execution. This is commonly called batch execution. In this case the
entirety of the users interaction would be the specification of the source of the instructions for it to execute (although there may be other options specified at the same time).
Although there are a few minor exceptions, for the most part the specification of the instructions, i.e.
the contents of the Automation File, is the same in both cases.
The following sections will concentrate on the first alternative. Near the end of the chapter is a
section on batch execution. There is also a section on entering single commands; while not a
program automation method it uses the commands defined here and is best understood in this
context.
An Application Program Interface (API) is a set of callable routines for building software applications. PSSE has a supported, documented API available for use with PSSE. The API is the
primary and recommended method for accessing PSSE functionality for automation. The PSSE
API is described in PSSE Application Program Interface (API). That manual includes descriptions
of the syntax for using each API routine in each automation method in which it is supported. Not
every API routine is supported in every automation method.
In most cases the API manual will also describe the syntax for calling an equivalent Fortran
subroutine.
All material contained in this documentation is proprietary to Siemens Industry, Inc., Siemens Power Technologies International.
16-1
PSSE 33.4
Program Operation Manual
Program Automation
Automation Methods in PSSE
Siemens PTI will support users who make use of the API through the automation methods
described here, such as batch commands and Python programs, only. No support is provided
for Fortran or, say, C applications developed by users of PSSE.
The Batch (or BAT_) Command interpreter (Section 16.5 Batch Commands)
The Line Mode Interpreter (LMI) (Section 16.11 Line Mode Commands)
The PSSE Engineering Basic (PSEB) macro processor (Section 16.14 Building a
Response File, Power Flow Calculation)
The PSSE Simulation Run Assembler (PSAS) macro processor (Section 16.15
Building a Response File, Dynamic Simulation)
Only five file types are available in the GUI, because line mode commands and batch commands
can be intermingled in the same file, so the Response File file type (*.idv) is used for either (or both).
Some general observations are appropriate at this point:
Python and IPLAN are both programming languages, i.e. they can be used to write any
kind of a program, not just control PSSE (although IPLANs features are fairly limited,
relatively speaking).
IPLAN programs must be compiled (they do not need to be linked). The compiler
(called IPLAN) is a Siemens PTI product and supplied with PSSE. The source files
are of file type *.ipl. The result (*.irf) are not object code files in the normal sense, but
a unique format.
PSEB and PSAS commands can also be embedded in Response Files, albeit in a particular context.
Python programs can use existing IPLAN programs and Response Files. The other
automation methods can all interact with each other.
Response Files, PSAS, and PSEB Command Files are free-format data files.
All material contained in this documentation is proprietary to Siemens Industry, Inc., Siemens Power Technologies International.
16-2
PSSE 33.4
Program Operation Manual
Program Automation
Python Programs
Siemens PTI supports the use of Python programs within PSSE, however, the language
itself is not supported nor maintained by Siemens PTI staff.
The PSSE installation package will also install the following freely available third-party extension
modules:
wxPython (http://www.wxpython.org//)
Python files can be in source form (*.py, *.pyw) or byte-compiled (*.pyc). Python Files can be used
in PSSE in any of the following ways:
From Run Program Automation File (see Section 16.3 Automation Methods in
PSSE)
At program startup by using the -pyfile option (see Section 16.9 Unattended Execution
of PSSE)
excelpy - provides Python functions to interface with Excel; these functions can be
used to create, populate and format Excel workbooks from Python.
All material contained in this documentation is proprietary to Siemens Industry, Inc., Siemens Power Technologies International.
16-3
PSSE 33.4
Program Operation Manual
Program Automation
Python Programs
Your PSSE installation will also include the following Python extension modules which can also be
imported into user programs inside or outside of the PSSE GUI:
caspy - provides access to the Saved Case Data Extraction routines (USRCAS)
redirect - some tools to connect I/O streams between PSSE and Python
wordpy - provides Python functions to interface with Microsoft Word; these functions
can be used to create, populate, and format a Microsoft Word document from Python.
This is especially useful to insert plot files (*.eps, *.wmf, *.png, etc.) created by
PSSPLT/PSSPLOT or any picture file into a Word document.
These modules are fully supported as part of the PSSE program product. There are other Python
modules and programs that are supplied with PSSE that either support the above modules or are
used by other program features. Modules that are designed as standalone programs (for example,
createusrdll) are also supplied. In addition you will find several *.py files supplied in the Example
directory for you to use and modify as you see fit.
Each of the modules above provides built-in documentation which can be accessed via the Python
help command. In the case of psspy, however, the result will be too voluminous to be useful. A
summary is available by entering:
help(psspy.psspyc)
Help is also available for individual API routines, e.g:
help(psspy.pout)
Some features of the psspy module that are not part of the API itself are documented in the doc
string for psspy. Enter:
print psspy.__doc__
All material contained in this documentation is proprietary to Siemens Industry, Inc., Siemens Power Technologies International.
16-4
PSSE 33.4
Program Operation Manual
Program Automation
Python Programs
All material contained in this documentation is proprietary to Siemens Industry, Inc., Siemens Power Technologies International.
16-5
PSSE 33.4
Program Operation Manual
Program Automation
Python Programs
if ierr!=0: break
ierr,busarea = psspy.busint(busnum,'AREA')
psspy.report('%s %s' % (busnum,busarea))
One idiosyncrasy of the current embedded interpreter is that results are not automatically echoed
to the terminal as they are in the stand-alone Python interpreter. To view the values of expressions
you must use the print command.
All material contained in this documentation is proprietary to Siemens Industry, Inc., Siemens Power Technologies International.
16-6
PSSE 33.4
Program Operation Manual
Program Automation
Batch Commands
Starting with release 33.4.0, a new command line switch has been supplied to allow you to run any
of several versions of Python with PSSE, including the native interpreter for 2.7, the version that
we supply a rebuilt copy of. Through some internal conversions that we have developed, most of
the original problems have been avoided. If you specify no command line switch then you will still
get the rebuilt interpreter. The shortcut in the Start Menu will specify -pyver 27.
Batch commands are free-format forms of inputs to the PSSE API. What this means is best illustrated by an example.
Lets say there is a PSSE API routine called abcd. It takes an integer argument (IVAL), a twoelement integer array (IDATA) and returns a floating-point value and an integer return code. The
batch command syntax for this hypothetical API routine would be:
BAT_ABCD IVAL IDATA(1) IDATA(2)
In other words, three integers after the command name that correspond to the arguments IVAL, the
first element of IDATA and the second element of IDATA, respectively. The returned values are not
represented. Furthermore, if the function of the API routine was only to return those values, then
there will not be a batch command syntax defined for it. The reason for this is that the batch
commands are not a language; there are no variables or logic controls. A batch command is really
data to the batch command interpreter, which then calls the indicated API routine with the input
values defined after the command name.
The format of the batch commands is the same as the standard free-format rules used for all
PSSE data files. The following additional rules apply to batch commands, though:
The command name itself is case insensitive, i.e. it doesnt matter whether you use
upper case or lower case letters, or mix them (the documentation will always define
them as all upper case).
The commands may be continued on multiple lines. The interpreter keeps reading data
until all the arguments that it needs for a given API routine are satisfied.
There is a special token, a semi-colon, that can be used to tell the interpreter that it
should return all remaining inputs to default settings for that particular API routine. It
must be a separate token, not part of the previous value. In our example above,
BAT_ABCD 1 34 ;
will reset the third value to the default value, but
BAT_ABCD 1 34;
will return a syntax error because 34; is not a valid integer.
Batch commands can be used in Response Files or entered as Command Line input.
16.6 Recording
Activity Recording
The PSSE interface is capable of recording PSSE API commands. Recorded API commands
can be in the form of either Python statements or batch commands (Response File) depending on
a specified user option. The easiest way to record a Python script (*.py, for Python statements) or
a Response File (*.idv, for batch commands) for later execution is to use the I/O Control>Start
All material contained in this documentation is proprietary to Siemens Industry, Inc., Siemens Power Technologies International.
16-7
PSSE 33.4
Program Operation Manual
Program Automation
Argument Passing
Recording option. Selecting this option will start the recorder. The entry of subsequent selections
of PSSE commands will record the API routines used to an automation file for later use until the
I/O Control>Stop Recording option is selected.
As an example, suppose you wanted to print power flow results to the Report View for buses 101,
201, 205, 154, and 3001. To record these interactions:
1. Select I/O Control>Start Recording and select the type of file you wish to record: Python
File (*.py) or Response File (*.idv).
2. Specify, say, busout.idv or busout.py as the filename depending on your selection of file type
in Step 1, and open it.
3. Select File>Open, select savnw.sav, and open it.
4. Select Power Flow>Solution>Solve. The power flow solutions dialog is displayed. Solve it
and then close it.
5. Select Power Flow>Reports>Bus based reports. The bus based reports dialog is displayed.
Enter buses 101, 201, 205, 143, 3001 in the text box provided. Select Go and then close it.
6. Select I/O Control>Stop Recording.
Using a text editor, open the file busout.idv (Figure 16-1) or busout.py (Figure 16-2) and you will see
the following:
@! File:"C:\Program Files\PTI\PSSE31\EXAMPLE\busout.idv", generated on TUE, AUG 17 2004 15:41
BAT_CASE,'C:\Program Files\PTI\PSSE31\EXAMPLE\savnw.sav'
BAT_FDNS,0,0,0,1,1,0,99,0
BAT_BSYS,1,0,0.0,0.0,0,5,101,201,205,154,3001,0,0
BAT_POUT,1,0
15:13
Arguments can be passed to a response file by using the Arguments button located on the
[Select Program Automation File to Run] dialog.
Arguments can be passed to the following types of automation files:
Python files
Response files
IPLAN files
but how they are handled by each varies. Note that the dialog permits specifying arguments for
PSAS and PSEB files, but those languages have no facility for retrieving the argument values.
All material contained in this documentation is proprietary to Siemens Industry, Inc., Siemens Power Technologies International.
16-8
PSSE 33.4
Program Operation Manual
Program Automation
Argument Passing
All material contained in this documentation is proprietary to Siemens Industry, Inc., Siemens Power Technologies International.
16-9
PSSE 33.4
Program Operation Manual
Program Automation
Default Values
or:
@CHAIN , filename , 'argument 1' , 'argument 2' ... 'argument 15'
Many of the statements in automation files specify data for which defaults exist. The idea of a default
value is one that is simply not specified. Typically this means that either some function or action
associated with that value is ignored, or a specific documented value is used; that specific value
might be a fixed value - say, zero - or the current value of some quantity in the network case or a
program setting.
While it is possible in some programming languages for a value to be missing, the general case is
that in order to indicate this situation a special value is used. When input values are omitted in automation files such special values are substituted for them. The various API routines check for the
special values and take appropriate default actions when they are encountered.
Currently spaces and false are used for filenames and logical values when they are omitted. The
special values for integers, real numbers (floats), and characters (strings) are returned from the API
routines GETDEFAULTINT, GETDEFAULTREAL, and GETDEFAULTCHAR. No assumptions
should be made that these precise values will be identical from one release of the PSSE to
another. If it is necessary to acquire these values, always run the API routine to get the current
values.
Default values can be specified in references to API routines in Python Files. Data items can be
omitted in Response Files. The concept of default values does not apply to IPLAN programs in
general, but there are some functions that take optional arguments, and because PUSH statements
can contain anything that could be in a Response File, any comments about Response Files will
apply there. All data values are required in PSEB and PSAS files, unless the syntax specifically indicates otherwise.
All material contained in this documentation is proprietary to Siemens Industry, Inc., Siemens Power Technologies International.
16-10
PSSE 33.4
Program Operation Manual
Program Automation
Unattended Execution of PSSE
mysub([_i,1])
mysub(opt=[_i,1])
mysub(opt2=1)
mysub(opt=None,opt2=1)
mysub(opt=[_i,42],opt2=1)
mysub(opt2=1,opt=[_i,352])
mysub(opt1=_i,opt2=1)
where _i is a variable equal to the default integer value.
What this means is that all the functions in psspy recognize special keywords formed by concatenating any input list name and the string representation all the possible index values (starting at 1)
and will use them to override just that specific element of the list.
This will work directly inside of the PSSE GUI because those variable are automatically assigned
the appropriate values at program startup. This is why the statements
_i=psspy.getdefaultint()
_f=psspy.getdefaultreal()
_s=psspy.getdefaultchar()
are recommended in Section 16.4.3 The External Interpreter Environment.
In some cases, it may be desirable to run PSSE in batch mode, that is, without any user interface.
PSSE provides command line options that can be used for this purpose. In Section 16.9.1 Startup Commands provides a list of all the available command line options; these four specifically
pertain to this purpose:
-rspfile
-pyfile
-argstr
-embed
All material contained in this documentation is proprietary to Siemens Industry, Inc., Siemens Power Technologies International.
16-11
PSSE 33.4
Program Operation Manual
Program Automation
Unattended Execution of PSSE
-argstr and -embed will be ignored if neither -rspfile nor -pyfile are specified
the command line is blank delimited; if the string specified to -rspfile, -pyfile, or -argstr
contains a blank then the string must be quoted
if the same option is specified more than once, only the last one will be used
the string value for the -argstr option is the argument string (see Section 16.7 Argument
Passing)
Provision is made for specifying only Response Files or Python Files. Both of those file types can
use other types of Automation Files so, indirectly at least, any type can be used.
The -embed option has the effect of suppressing the display of the PSSE GUI. If the Automation
File terminates without stopping the execution of PSSE the GUI will be displayed at that time.
The following are a few points to be aware of when preparing to run PSSE in an unattended mode:
PSSE does not read input from stdin or write to stdout, so pipes cannot be used for
batch execution of PSSE.
Be aware of the nature of the operating system tool you are using to start PSSE. In
Microsoft Windows, for example, non-console application programs, such as PSSE,
are executed asynchronously. This means that should you have a batch file that starts
PSSE it will not wait for the program to stop before continuing on the next statement
in the batch file.
When running in batch mode (i.e. with a startup automation file specified that stops the
program) the Progress tab and Report tab output should be re-directed to a printer or
file, otherwise output will be sent to windows that would be closed when the program
stops.
All material contained in this documentation is proprietary to Siemens Industry, Inc., Siemens Power Technologies International.
16-12
PSSE 33.4
Program Operation Manual
Program Automation
Running a Python Program
Python programs run in this manner execute in the embedded interpreter environment as described
in Section 16.4.2, The Embedded Interpreter Environment. All code runs in that local namespace
and can therefore be impacted by previous Python programs, or affect subsequent Python
programs. Specifically, local variables retain their bindings (values) for the entirety of the execution
of PSSE. Use Modules, Classes, or functional programming techniques to create independent
namespaces.
Pythons interaction with PSSE is strictly through the API. PSSE functions can be executed, and
data can be retrieved from PSSEs working memory. API routines are provided to run Response
Files and IPLAN programs from within a Python program, so the other automation methods are integrated with Python in this way, and functionality that was developed using this other methods, which
all predate Pythons introduction into PSSE, is preserved and can be used with minimal rework.
All material contained in this documentation is proprietary to Siemens Industry, Inc., Siemens Power Technologies International.
16-13
PSSE 33.4
Program Operation Manual
Program Automation
Line Mode Commands
Line mode commands can be used to automate PSSE through Response Files (*.idv), so called
because they contain responses to the questions that the command line of PSSE asks.
The modern GUI has replaced this previously common method of operation, but there is a wealth
of existing Response Files containing line mode commands used to automate PSSE. Therefore
PSSE currently contains a feature called the Line Mode Interpreter (LMI) - a new program written
to imitate the traditional line mode of PSSE, but that actually uses the PSSE API. In a way it is
a translator from line mode to batch commands. It is not a perfect imitation, and those differences
are captured in PSSE Command Line Interface (CLI) Users Guide, Appendix A.
It is worth noting that, although the line mode now comprises a subset of the full functionality of
PSSE, for those functions it can perform, and for those users who are thoroughly familiar with the
command line (and are good typists), the program can still be operated more quickly from the
keyboard than is physically possible with a point-and-click interface (i.e., a mouse). So while
command line capabilities are not likely to be enhanced in the future, its current operation is considered to be an important feature of the program.
All material contained in this documentation is proprietary to Siemens Industry, Inc., Siemens Power Technologies International.
16-14
PSSE 33.4
Program Operation Manual
Program Automation
Running a Response File
16.11.3 Version
The LMI provides an additional feature that the original line mode did not - the ability to change
versions. As releases of PSSE come out, sometimes changes are necessary in the sequence of
line mode commands. The creates maintenance work for existing Response Files. The LMI
provides a command, VERSION, which displays or sets the version of the line mode language
being processed. Introduced at rev 31 of PSSE, it recognizes versions from rev 30 and newer, for
example:
VERSION 30 - sets the version to rev 30
VERSION 31 - sets the version to rev 31
etc.
VERSION - displays the current version
ACTIVITY?
>>IDEV <filename>
Immediate Commands - CLI
@ input filename
OR
@ chain filename
Python Command
psspy.runrspnsfile <filename>
Interrupt Control Codes
None
Executing activity IDEV in Line Mode should be considered an obsolete capability which is retained
for backward compatibility purposes. Activity IDEV itself is not sensitive to any interrupt control code
options. While one or more Response Files are active, the CL interrupt control code may be used
to close all open Response Files.
All material contained in this documentation is proprietary to Siemens Industry, Inc., Siemens Power Technologies International.
16-15
PSSE 33.4
Program Operation Manual
Program Automation
Recording User Actions
ACTIVITY?
>>ECHO
Interrupt Control Codes
None
The dialog echoing activity ECHO enables the writing of all subsequent user dialog input to a designated file, which may subsequently be used as a Operation of activity ECHO.
Users of PSSEs traditional command line interface will be familiar with the activity ECHO. It
performs a function similar in effect to the recording function in the current program. It is a very
different thing, however, and a remnant of it remains.
ECHO copies terminal input to a file. Because all PSSE input in a console application either came
from a terminal or a device that imitated the terminal, that meant all (interactive) input. This capability is retained in the PSSECMD console application.
The current recording function is a feature of the API routines. When they are called, if recording is
enabled, they record a copy of their input in the designated format in the designated file; it doesnt
matter how the call occurred - by menu selection, through line mode, from an automation file, etc.
The ECHO function still exists in the GUI, and it still does the same thing, i.e. copies all terminal
input to a file. The difference is that there is very little terminal input. The API routine userin, the
IPLAN function INPUT (and INPUTLN), and the @pause immediate command all attempt to read
from the terminal, which is handled in via a pop-up window. So data entered there will show up in
an ECHO file.
Related to this is the traditional command line activity IDEV, meaning Input DEVice. IDEV was used
to replace the terminal with a file so that subsequent READs from the terminal would find the
responses in the file (hence the name Response File). IDEV never executed the commands in a
Response File, although that appeared to be the situation. The implementation of IDEV in the GUI
does what most people would expect, therefore; it causes the commands in the Response File to
be interpreted by the LMI. This means, however, that IDEV no longer runs the way it used to, i.e.
replaces terminal input with a file. That function is now performed by the API routine
SET_INPUT_DEV. The outcome of that API is opening a file to respond to input requests from the
All material contained in this documentation is proprietary to Siemens Industry, Inc., Siemens Power Technologies International.
16-16
PSSE 33.4
Program Operation Manual
Program Automation
Recording User Actions
terminal (except @pause which will still force an actual terminal read, handled via a pop-up
window).
When activity ECHO is initiated, if a file for capturing responses had previously been opened with
an earlier execution of activity ECHO, it is closed.
All material contained in this documentation is proprietary to Siemens Industry, Inc., Siemens Power Technologies International.
16-17
Program Automation
Building a Response File, Power Flow Calculation
PSSE 33.4
Program Operation Manual
ACTIVITY?
>>PSEB
ENTER INPUT FILE NAME (0 TO EXIT, 1 FOR TERMINAL):
>>
Interrupt Control Codes
None
The power flow run assembler activity PSEB allows the user to specify routine power flow runs in
an English-like language. Input to activity PSEB is taken either from a PSEB Command File or from
the dialog input device. This can be in-stream in a Response File, typed into the command line in
the GUI, or entered at the console in PSSECMD. The output from activity PSEB is in the form of a
PSSE Response File.
All material contained in this documentation is proprietary to Siemens Industry, Inc., Siemens Power Technologies International.
16-18
PSSE 33.4
Program Operation Manual
Program Automation
Building a Response File, Power Flow Calculation
previously defined vocabulary. The PSEB commands are documented below and in the PSEB
Users Ready Reference.
PSEB commands do not interact with PSSE directly. The PSEB macro processor is really a translator from the PSEB language to a Response File, which may contain a mixture of command line
and batch commands. The PSEB command line command normally automatically performs the
commands in the Response File after the translation. When used with the suffix CHECK (i.e. PSEB,
CHECK) only the translation is performed. When using the PSEB API routine only the translation is
performed.
Each PSEB command begins with a verb from the vocabulary recognized by activity PSEB. Some
commands require additional keywords (e.g., BUS, BRANCH), numeric quantities (e.g., bus
number, load MW), and/or character identifiers (e.g., bus name, circuit identifier) in specific fields of
the command format. Some commands provide for the optional specification of keywords, numeric,
and/or character quantities; these are shown in the command syntax enclosed in braces ([ ]).
Where one of several keywords may be specified, they are shown in the command format enclosed
in vertical bars (| |). One of the keywords listed must be entered in the field.
Each keyword or data value must be followed by one or more blanks. For clarity, a comma or equal
sign may be used in place of, or in addition to, a blank space. For example, the following two PSEB
commands are equivalent:
OPEN TIE FROM BUS 153 TO BUS 154 CKT 2
OPEN TIE, FROM BUS = 153, TO BUS = 154, CKT = 2
Any field labeled bus id designates that a bus identifier is to be entered. When the numbers input
option is in effect, the bus number must be specified; using the names input option, the extended
bus name enclosed in single quotes is required.
Any field labeled dc id designates that a two-terminal dc line name is to be entered. If the name
contains any blanks or special characters, it must be enclosed in single quotes.
I and R indicate that integer and real (i.e., it may include a decimal point) numeric values respectively are to be specified.
Many PSEB commands provide for the insertion of optional descriptive text in designated fields,
indicated by [n] in the command syntax. For example, the following two PSEB commands translate
into the same PSSE dialog:
RECOVER FROM SAVNW.SAV
RECOVER saved case FROM SAVNW.SAV
A dollar sign ( $ ) at the end of a PSEB command line is used to continue the command on the
following line. At least one space must precede the dollar sign. As many physical lines as required
may be used to specify a single PSEB command as long as all lines except the last one are terminated with a dollar sign. This multiline capability may be used with all PSEB commands except the
USE command (see below). In addition, each PSSE activity command and response to an instruction entered in passthru mode (see below) must be entered on a single line.
All material contained in this documentation is proprietary to Siemens Industry, Inc., Siemens Power Technologies International.
16-19
Program Automation
Building a Response File, Power Flow Calculation
PSSE 33.4
Program Operation Manual
All material contained in this documentation is proprietary to Siemens Industry, Inc., Siemens Power Technologies International.
16-20
PSSE 33.4
Program Operation Manual
Program Automation
Building a Response File, Power Flow Calculation
|MW
|
|MWP |
|MWI |
|ALTER | |MWY |
[ |MW | ]
|CHANGE| |MVAR | LOAD [n] BUS (bus id) [LOAD (id)] TO (R) [ |MVAR| ]
|MVARQ|
|MVARI|
|MVARY|
This form of the ALTER command is used to change a specified component of a designated
load at a designated bus to a specified value. If the optional load identifier tokens are
omitted, a load identifier of 1 is assumed. The second token specified indicates the component of load as follows:
MW, MWP
MWI
MWY
MVAR, MVARQ
MVARI
MVARY
The value specified is always in MW or Mvar at unity voltage. Refer to Load Data.
SHED LOAD [n] BUS (bus id)
The SHED command is used to set all loads at the specified bus out-of-service. Refer to
Load Data.
|MW
|
|ALTER | |MWG |
[|MW |]
|CHANGE| |MVAR | SHUNT [n] BUS (bus id) [SHUNT (id)] TO (R) [|MVAR|]
|MVARB|
This form of the ALTER command is used to change a specified component of a specified
fixed shunt at a designated bus to a specified value. If the optional shunt identifier tokens
are omitted, a shunt identifier of 1 is assumed. The second token specified selects either
the active (MW or MWG) or reactive (MVAR or MVARB) component of bus shunt. Values
entered are in MW or Mvar at unity voltage. The reactive component is specified as a negative quantity for an inductive load. Refer to Fixed Bus Shunt Data.
|ALTER |
|CHANGE| BUS (bus id) CODE TO (I)
This form of the ALTER command is used to change the bus type code of a designated bus.
Refer to Bus Data.
All material contained in this documentation is proprietary to Siemens Industry, Inc., Siemens Power Technologies International.
16-21
Program Automation
Building a Response File, Power Flow Calculation
PSSE 33.4
Program Operation Manual
|ALTER | |R|
[|CKT
|
]
|CHANGE| |X| TO (R) [n] FROM [n] BUS (bus id) TO [n] BUS (bus id) [|CIRCUIT| (id)]
|B|
This form of the ALTER command is used to change the per unit resistance, reactance or
charging of a designated non-transformer branch or two-winding transformer to a specified
value. If the optional circuit identifier tokens are omitted, a circuit identifier of 1 is assumed.
Refer to Non-Transformer Branch Data.
DROP PLANT [n] BUS (bus id)
This form of the DROP command is used to disconnect all generation at a specified bus.
The bus type code is set to one; refer to Bus Data and Section 5.9.1 Equipment Status
Changes.
RECONNECT PLANT [n] BUS (bus id)
This form of the RECONNECT command is used to reconnect generation at a specified
bus. The bus type code is set to two; machine status flags are not changed. Refer to Bus
Data, Generator Data, and Section 5.9.1 Equipment Status Changes.
|UNIT
|
DROP |GENERATOR| (id) [n] BUS (bus id)
|MACHINE |
|LOAD
|
|SHUNT
|
This form of the DROP command is used to disconnect a specified machine, load, or fixed
shunt at a designated bus. The machine, load, or shunt status flag is set to zero; refer to
Load Data, Fixed Bus Shunt Data, Generator Data, and Section 5.9.1 Equipment Status
Changes.
|UNIT
|
RECONNECT |GENERATOR| (id) [n] BUS (bus id)
|MACHINE |
|LOAD
|
|SHUNT
|
This form of the RECONNECT command is used to reconnect a specified machine, load,
or fixed shunt at a designated bus. The machine, load, or shunt status flag is set to 1; the
bus type code is not changed. Refer to Bus Data, Load Data, Fixed Bus Shunt Data, Generator Data, and Section 5.9.1 Equipment Status Changes.
DISCONNECT BUS (bus id)
This form of the DISCONNECT command is used to electrically disconnect a bus and all
equipment connected to it. This command results in the use of activities DSCN and ORDR.
|DISCONNECT| |LINE |
[|CKT
|
]
|TRIP
| |TIE
|[n] FROM [n] BUS (bus id) TO [n] BUS (bus id) [|CIRCUIT| (id)]
|OPEN
| |BRANCH|
This form of the DISCONNECT command is used to remove a specified branch from
service. If the optional circuit identifier tokens are omitted, a circuit identifier of 1 is
assumed. The branch status flag is set to zero; refer to Non-Transformer Branch Data and
Section 5.9.1 Equipment Status Changes.
All material contained in this documentation is proprietary to Siemens Industry, Inc., Siemens Power Technologies International.
16-22
PSSE 33.4
Program Operation Manual
Program Automation
Building a Response File, Power Flow Calculation
|RECONNECT| |LINE |
[|CKT
|
]
|CLOSE
| |TIE
| [n] FROM [n] BUS (bus id) TO [n] BUS (bus id) [|CIRCUIT|(id)]
|RECLOSE | |BRANCH|
This form of the RECONNECT command is used to return a specified branch to service. If
the optional circuit identifier tokens are omitted, a circuit identifier of 1 is assumed. The
branch status flag is set to 1; refer to Non-Transformer Branch Data and Section 5.9.1
Equipment Status Changes.
|DISCONNECT|
[|CKT
|
]
|TRIP
|THREEWINDING [n] FROM [n] BUS (bus id) TO [n] BUS (bus id) TO [n] BUS (bus id) [|CIRCUIT| (id)]
|OPEN
|
This form of the DISCONNECT command is used to remove all windings of a specified
three-winding transformer from service. If the optional circuit identifier tokens are omitted,
a circuit identifier of 1 is assumed. The transformer status flag is set to zero; refer to Transformer Data and Section 5.9.1 Equipment Status Changes.
|DISCONNECT|
[|CKT
|
]
|TRIP
|THREEWINDING [n] AT [n] BUS (bus id) TO [n] BUS (bus id) TO [n] BUS (bus id) [|CIRCUIT| (id)]
|OPEN
|
This form of the DISCONNECT command is used to remove the winding connected to the
bus specified as the AT bus of a specified three-winding transformer from service. If the
optional circuit identifier tokens are omitted, a circuit identifier of 1 is assumed. The transformer status flag is set to 2, 3 or 4; refer to Transformer Data and Section 5.9.1 Equipment
Status Changes.
|RECONNECT|
[|CKT
|
]
|CLOSE
|THREEWINDING [n] FROM [n] BUS (bus id) TO [n] BUS (bus id) TO [n] BUS (bus id) [|CIRCUIT| (id)]
|RECLOSE |
This form of the RECONNECT command is used to return all windings of a specified threewinding transformer to service. If the optional circuit identifier tokens are omitted, a circuit
identifier of 1 is assumed. The transformer status flag is set to 1; refer to Transformer Data
and Section 5.9.1 Equipment Status Changes.
BLOCK DCLINE (dc id)
The BLOCK command is used to block a specified two-terminal dc line. The control mode
is set to zero; refer to Two-Terminal DC Transmission Line Data.
UNBLOCK DCLINE (dc id)
The UNBLOCK command is used to unblock a specified two-terminal dc line. The control
mode is set to 1 (i.e., the UNBLOCK command assumes power control mode). Refer to
Two-Terminal DC Transmission Line Data.
|SETPOINT|
SET DCLINE (dc id) |SCHEDULE| TO (R)
This form of the SET command is used to change the current or power demand
(SETPOINT) or scheduled dc voltage (SCHEDULE) on a specified two-terminal dc line to
a designated value; refer to Two-Terminal DC Transmission Line Data.
SET LOADFLOW TITLE LINE |1| TO (title)
|2|
This form of the SET command is used to change the designated line of the two-line case
heading to a specified string. The title may be up to 60 characters and must be enclosed in
single quotes; refer to Case Identification Data.
All material contained in this documentation is proprietary to Siemens Industry, Inc., Siemens Power Technologies International.
16-23
Program Automation
Building a Response File, Power Flow Calculation
PSSE 33.4
Program Operation Manual
|BUS |
NET GENERATION [n] |BUSES| (bus id) [(bus id)...[(bus id)]]
This form of the NET command is used to net the generation with the load at specified
buses; refer to activity GNET. Up to 25 buses may be specified in each use of this
command.
NET GENERATION [n] FOR BUSES (I) THRU (I)
This form of the NET command is used to net the generation with the load at all buses within
a specified bus number range; refer to activity GNET. This command is valid only when the
bus input option is in its numbers setting.
SET SOLUTION OPTION[S] TO DEFAULT
This form of the SET command is used to instruct activity PSEB that subsequent SOLVE
commands (see below) are to execute power flow solutions with the present power flow
solution adjustment option settings honored. Refer to Sections 3.3.3 and 6.3.20 and activity
OPTN.
SET SOLUTION OPTION[S] TO [|DISCRETE-TAP|],[|AREA-LOCKED|],[FLAT-START],[|DC-LOCKED|],[|SHUNT-LOCKED|],[|PHASE-SHIFT |]
[|DIRECT-TAP |] [|AREA-INTCHG|]
[|DC-ADJUST|] [|SHUNT-ADJUST|] [|PSHFT-LOCKED|]
[|TAP-LOCKED |] [|TIES+LOADS |]
[|SHN-ADJ-CONT|]
This form of the SET command is used to enable and/or disable the power flow adjustments
to be used on subsequent power flow solutions initiated with the SOLVE command (see
below). For any adjustment option not specified, the present program option setting is
honored. Refer to Sections 3.3.3 and 6.3.20 and activity OPTN.
|FNSL|
|FDNS| [
|AFTER (I) [ITERATION[S]]|]
SOLVE [n] USING |NSOL| [WITH VAR LIMITS [n] |IMMEDIATE[LY]
|]
|SOLV| [
|IGNORED
|]
|MSLV|
|INLF|
The SOLVE command is used to execute one of the power flow solution activities. Solution
options as established by the last SET SOLUTION OPTIONS command are honored; if no
SET SOLUTION OPTIONS command was specified, the current solution adjustment option
settings are honored. Refer to activities SOLV, MSLV, FNSL, NSOL, FDNS, INLF, and
OPTN and Section 3.3.3 Program Run-Time Option Settings.
|PSS
|
|PASS
|
|PASSTHRU|
The PASSTHRU command is used to inform activity PSEB that subsequent command
input is in the form of BAT_ records (refer to PSSE Application Program Interface (API))
and/or PSSE activity commands and responses to questions rather than in the form of
PSEB commands. While passthru mode is in effect, each input to activity PSEB is simply
appended without modification to the Response File being built. If input to activity PSEB is
being taken from the users terminal, the prompt PASSTHRU: is issued while this mode is
in effect. Passthru mode is terminated and PSEB command mode reinstated by entering
the command FIN (see below). @INPUT and @CHAIN commands must not be specified
while passthru mode is in effect; the IDEV activity command may be specified.
All material contained in this documentation is proprietary to Siemens Industry, Inc., Siemens Power Technologies International.
16-24
PSSE 33.4
Program Operation Manual
Program Automation
Building a Response File, Power Flow Calculation
FIN
Terminate passthru mode (see above) and reinstate PSEB command mode.
|USE |
|COPY| (response-file-filename) [arg1 ... [arg9]]
|IDEV|
The USE command allows the user to include the BAT_ records (refer to PSSE Application Program Interface (API)) and/or PSSE line mode commands and responses to
instructions which are contained in a Response File within the PSEB commands which
define a PSSE calculation sequence. The USE filename command is converted to an
@INPUT filename command and inserted into the Response File being constructed by
activity PSEB. Note that entries in the designated file must be in the form of BAT_ records
and/or activity commands and responses to questions rather than in the form of PSEB
commands.
The designated file may contain @INPUT commands but must not contain any @CHAIN
commands or IDEV activity commands. The designated file must be terminated with an
@END command; it must not be terminated with an IDEV activity command or a FIN PSEB
command.
EXECUTE (iplan-program-filename)
The EXECUTE command allows the user to include the execution of an IPLAN program
within the PSEB commands which define a calculation sequence. The EXECUTE filename
PSEB command is converted to an EXEC filename activity command (refer to activity
EXEC) and inserted into the Response File being constructed by activity PSEB.
WATCH [OFF]
The WATCH command is used to enable or disable the echoing of responses generated
from PSEB commands to the dialog output device (normally the users terminal). Response
echoing is disabled upon entering activity PSEB; the PSEB command WATCH enables
response echoing and WATCH,OFF disables it.
CHECK
The CHECK command instructs activity PSEB to bypass the automatic execution of the
Response File that it constructs.
END
The END command terminates PSEB command input. Unless it is otherwise suppressed,
the Response File constructed by activity PSEB is automatically executed.
ABORT
The ABORT command terminates activity PSEB and bypasses the automatic execution of
the Response File that it has constructed.
HELP
This form of the HELP command displays the list of PSEB commands at the dialog output
device (refer to Section 4.4 Virtual Output Devices).
All material contained in this documentation is proprietary to Siemens Industry, Inc., Siemens Power Technologies International.
16-25
PSSE 33.4
Program Operation Manual
Program Automation
Building a Response File, Dynamic Simulation
HELP,command
This form of the HELP command displays the syntax format of the specified PSEB
command at the dialog output device (refer to Section 4.4 Virtual Output Devices).
Additional Information
PSS E GUI Users Guide, Section 23.3.3, PSEB Command File, Power Flow Calculation
PSSE Command Line Interface (CLI) Users Guide,
Section 19.4, Building a Response File, Power Flow Calculation
ACTIVITY?
>>PSAS
ENTER INPUT FILE NAME (0 TO EXIT, 1 FOR TERMINAL):
>>
Interrupt Control Codes
None
The simulation run assembler activity PSAS allows the user to specify dynamic simulation runs in
an English-like language. Input to activity PSAS is taken either from a PSAS Command File or from
the dialog input device. This can be in-stream in a Response File, typed into the command line in
the GUI, or entered at the console in PSSECMD. The output from activity PSAS is in the form of a
PSSE Response File.
All material contained in this documentation is proprietary to Siemens Industry, Inc., Siemens Power Technologies International.
16-26
PSSE 33.4
Program Operation Manual
Program Automation
Building a Response File, Dynamic Simulation
The HOLD command is used to preserve dynamics working memory and the power flow
working case in Snapshot and Saved Case Files respectively (refer to activities SNAP and
SAVE). When the HOLD command includes the optional keyword NOW, activity SNAP and
SAVE are immediately executed and the user specifies the number of dynamic simulation
array elements to save in the same manner as when activity SNAP is specifically invoked.
All material contained in this documentation is proprietary to Siemens Industry, Inc., Siemens Power Technologies International.
16-27
Program Automation
Building a Response File, Dynamic Simulation
PSSE 33.4
Program Operation Manual
In this case, the PSSE responses for activity SNAP and SAVE are not written to the
Response File being constructed by activity PSAS.
When the HOLD command does not include the optional keyword NOW, the appropriate
entries in the Response File are made to take a Snapshot and save the working case during
the subsequent execution of the Response File. In this case, the user may optionally
specify the keyword SIZES followed by the number of CONs, STATEs, VARs, ICONs and
output channels to be preserved. If this keyword and its data are omitted, a blank response
is generated in the Response File and, when the Response File is subsequently executed,
activity SNAP preserves up to the next available positions in the respective dynamics data
arrays.
RECOVER[n] FROM (snapshot-filename) AND (saved-case-filename) [NOFACT] [NOTYSL] [NORETURN]
The RECOVER command is used to access the designated Snapshot and Saved Case
Files (refer to activities RSTR and CASE). Activities RSTR and CASE are executed immediately and the PSSE responses for activities RSTR, LOFL, and CASE are written to the
Response File being constructed by activity PSAS. The activity commands FACT, TYSL,
and RTRN are included in the Response File unless they are suppressed with one or more
of the optional tokens NOFACT, NOTYSL and NORETURN. If NOFACT is specified,
NOTYSL is assumed. If NORETURN is specified, NOFACT and NOTYSL are also
assumed, and the next PSAS command must be either CONVERT, USE or PASS; the
CONVERT command (see below) generates the RTRN activity command but in passthru
mode (see below), the RTRN activity command must be specified before terminating
passthru mode.
The RECOVER command overwrites dynamics working memory and the power flow
working case. The HOLD command with the NOW option may be used before the
RECOVER command to preserve these two sets of data.
|INITIALIZE| OUTPUT |(filename)| [SNAPSHOT |(filename)|]
|START
|
|NONE
| [
|NONE
|]
This form of the START command is used to initialize the dynamic model in preparation for
state-space simulations. The STRT activity command is generated with user specified
channel output and Snapshot filename responses. The reserved token NONE may be used
to indicate that the corresponding filename is not to be specified.
|INITIALIZE| EXTENDED [n] OUTPUT |(filename)| [n]
|START
|
|NONE
|
This form of the START command is used to initialize the dynamic model in preparation for
extended term simulations. The MSTR activity command is generated with a user specified
channel output filename response. The reserved token NONE may be used to indicate no
channel output file is to be specified.
|TO |
|CYCLE[S] |
RUN [n] |FOR| (R) |SECOND[S]| [PRINT (I)] [PLOT (I)] [CRTPLT (I)]
The RUN command is used to perform dynamic simulation calculations with activity RUN
or MRUN. If the RUN command is preceded by the START command (see above), the form
of the START command determines whether activities RUN or MRUN is to be used. Otherwise, state-space simulations are assumed and activity RUN is used. The real value indicates the duration of the simulation calculation and may be specified in either seconds or
cycles. It is the value of simulation time (i.e., TPAUSE) when the token TO precedes it and
an incremental value of time when the token FOR precedes it. The optional integer tokens
All material contained in this documentation is proprietary to Siemens Industry, Inc., Siemens Power Technologies International.
16-28
PSSE 33.4
Program Operation Manual
Program Automation
Building a Response File, Dynamic Simulation
and their corresponding keywords allow the user to specify channel printing and plotting
intervals (refer to Section 14.10 Performing State-Space Simulation in Time Steps). By
default, PRINT=20, PLOT=5 and CRTPLT=0.
|OFF|
CONVERGENCE MONITOR |ON |
The CONVERGENCE MONITOR command is used to enable or disable the printing of the
network solution convergence monitor during the execution of the PSSE activity calls
generated by subsequent START and RUN commands (see above). By default, the
convergence monitor is suppressed.
All material contained in this documentation is proprietary to Siemens Industry, Inc., Siemens Power Technologies International.
16-29
Program Automation
Building a Response File, Dynamic Simulation
PSSE 33.4
Program Operation Manual
This form of the APPLY FAULT command is used to apply a fault with a specified fault
admittance, (R1) + j(R2), at a designated bus. The Response File being constructed by
activity PSAS includes responses to use activity ALTR to change the fixed shunt at the bus.
(R2) should be entered as a negative number. Refer to Bus Data, activity ALTR and
Section 19.7.2 Applying Disturbances.
If the MVA token is specified, the active and reactive components of fixed shunt at the bus
are set to the values specified as (R1) and (R2) respectively; i.e., the fault admittance is
specified in the same MVA units as is bus shunt.
If the MHO or MHOS token is specified, (R1) and (R2) are entered in mhos and activity
PSAS converts them to the MVA units used for specifying bus shunts. If the optional base
voltage tokens are specified, the base voltage specified on the PSAS command is used in
the conversion calculation; otherwise, the base voltage contained in the working case for
the designated bus is used. In either case, a positive base voltage value is required.
|Z
|
APPLY FAULT [n] BUS (bus id) [n] |IMPEDANCE| (R1) (R2) OHM[S] [BASEKV (R)]
This form of the APPLY FAULT command is used to apply a fault with a specified fault impedance,
(R1) + j(R2), at a designated bus. The Response File being constructed by activity PSAS includes
responses to use activity ALTR to change the fixed shunt at the bus. (R2) should be entered as a
positive number and (R1) and (R2) are specified in ohms. Activity PSAS converts them to the MVA
units used for specifying bus shunts. If the optional base voltage tokens are specified, the base
voltage specified on the PSAS command is used in the conversion calculation; otherwise, the base
voltage contained in the working case for the designated bus is used. In either case, a positive base
voltage value is
|L-G |
SCMU |L-L | FAULT [n] BUS (bus id) [n] [ZL-G (R1) (R2)] [n]
|L-L-G|
[ZL-L (R3) (R4)] [n] [CONVERTDC] [n] [APPLYZCOREC]
The SCMU FAULT command is used to calculate and apply a single line-to-ground, lineto-line, or line-to-line-to-ground fault at a designated bus. For the L-G and L-L-G faults, (R1)
and (R2) may optionally specify the complex line-to-ground fault impedance to be used;
similarly, for the L-L and L-L-G faults, (R3) and (R4) may optionally specify the complex
line-to-line fault impedance to be used. These impedances are specified in per unit. For any
of these impedance values that are not specified, 0.0 is assumed.
If the optional token CONVERTDC is specified, dc lines and FACTS device boundary
conditions are converted to constant admittance load for the fault calculation. Otherwise,
they are neglected.
If the optional token APPLYZCOREC is specified, for those transformers which include a
transformer impedance adjustment table, the same correction factor is applied to the zero
All material contained in this documentation is proprietary to Siemens Industry, Inc., Siemens Power Technologies International.
16-30
PSSE 33.4
Program Operation Manual
Program Automation
Building a Response File, Dynamic Simulation
sequence impedance as is applied to the positive sequence impedance. Otherwise, transformer zero sequence nominal impedances are used.
|L-G
|
|L-L
|
|L-L-G |
[|CKT
|
]
SPCB |3PHASE| FAULT (R1) [n] FROM [n] BUS (bsid) TO [n] BUS (bsid) [n] [|CIRCUIT| (id)]
[n] [ZL-G (R2) (R3)] [n] [ZL-L (R4) (R5)] [n] [CONVERTDC] [n] [APPLYZCOREC]
This form of the SPCB FAULT command is used to calculate and apply a ground fault at a
designated point along a transmission line. (R1) specifies the fault location as the fraction
of the line from the FROM bus; the default value of 0.5 applies the fault at the midpoint of
the line.
For the L-G and L-L-G faults, (R2) and (R3) may optionally specify the complex line-toground fault impedance to be used; similarly, for the L-L and L-L-G faults, (R4) and (R5)
may optionally specify the complex line-to-line fault impedance to be used. These impedances are specified in per unit. For any of these impedance values that are not specified,
0.0 is assumed.
If the optional token CONVERTDC is specified, dc lines and FACTS device boundary
conditions are converted to constant admittance load for the fault calculation. Otherwise,
they are neglected.
If the optional token APPLYZCOREC is specified, for those transformers which include a
transformer impedance adjustment table, the same correction factor is applied to the zero
sequence impedance as is applied to the positive sequence impedance. Otherwise, transformer zero sequence nominal impedances are used.
[|CKT
|
]
SPCB 2PHASE OPEN [n] FROM [n] BUS (bsid) TO [n] BUS (bsid) [n] [|CIRCUIT| (id)]
[n] [CONVERTDC] [n] [APPLYZCOREC]
This form of the SPCB FAULT command is used to calculate and apply a transmission line
unbalance with two of its three phases open.
If the optional token CONVERTDC is specified, dc lines and FACTS device boundary
conditions are converted to constant admittance load for the fault calculation. Otherwise,
they are neglected.
If the optional token APPLYZCOREC is specified, for those transformers which include a
transformer impedance adjustment table, the same correction factor is applied to the zero
sequence impedance as is applied to the positive sequence impedance. Otherwise, transformer zero sequence nominal impedances are used.
[|CKT
|
]
SPCB 1PHASE OPEN [n] FROM [n] BUS (bsid) TO [n] BUS (bsid) [n] [|CIRCUIT| (id)]
[n] [PATH (R1) [ [n] [ZL-G (R2) (R3)] ] [n] [CONVERTDC] [n] [APPLYZCOREC]
This form of the SPCB FAULT command is used to calculate and apply a transmission line
unbalance with one of its three phases open.
This branch unbalance may optionally include a ground fault at a designated point of the
open phase by specifying the optional token PATH, along with (R1) which specifies the fault
location as the fraction of the line from the FROM bus; the default value of 0.5 applies the
All material contained in this documentation is proprietary to Siemens Industry, Inc., Siemens Power Technologies International.
16-31
Program Automation
Building a Response File, Dynamic Simulation
PSSE 33.4
Program Operation Manual
fault at the midpoint of the open phase. (R2) and(R3) may optionally specify the complex
line-to-ground fault impedance in per unit to be used. For any of these impedance values
that are not specified, 0.0 is assumed.
If the optional token CONVERTDC is specified, dc lines and FACTS device boundary
conditions are converted to constant admittance load for the fault calculation. Otherwise,
they are neglected.
If the optional token APPLYZCOREC is specified, for those transformers which include a
transformer impedance adjustment table, the same correction factor is applied to the zero
sequence impedance as is applied to the positive sequence impedance. Otherwise, transformer zero sequence nominal impedances are used.
[|CKT
|
]
SPCB BREAKER OPEN [n] AT [n] BUS (bsid) TO [n] BUS (bsid) [n] [|CIRCUIT| (id)]
[n] [PATH (R1) [ [n] [ZL-G (R2) (R3)] ] [n] [CONVERTDC] [n] [APPLYZCOREC]
This form of the SPCB FAULT command is used to calculate and apply a transmission line
unbalance with the breaker of one phase open. The breaker at the AT bus is assumed to
be the open breaker.
This branch unbalance may optionally include a ground fault at a designated point of the
open phase by specifying the optional token PATH, along with (R1) which specifies the fault
location as the fraction of the line from the FROM bus; the default value of 0.5 applies the
fault at the midpoint of the open phase. (R2) and(R3) may optionally specify the complex
line-to-ground fault impedance in per unit to be used. For any of these impedance values
that are not specified, 0.0 is assumed.
If the optional token CONVERTDC is specified, dc lines and FACTS device boundary
conditions are converted to constant admittance load for the fault calculation. Otherwise,
they are neglected.
If the optional token APPLYZCOREC is specified, for those transformers which include a
transformer impedance adjustment table, the same correction factor is applied to the zero
sequence impedance as is applied to the positive sequence impedance. Otherwise, transformer zero sequence nominal impedances are used.
All material contained in this documentation is proprietary to Siemens Industry, Inc., Siemens Power Technologies International.
16-32
PSSE 33.4
Program Operation Manual
Program Automation
Building a Response File, Dynamic Simulation
|LINE |
[|CKT
|
]
APPLY FAULT [n]|TIE
|[n] FROM [n] BUS (bus id) TO [n] BUS (bus id) [n][|CIRCUIT|(id)] [n]
|BRANCH|
This form of the APPLY FAULT command is used to apply a solidly grounded three-phase
fault at the from bus end of a designated non-transformer branch. The Response File being
constructed by activity PSAS includes responses to use activity ALTR to change the line
shunt at the from bus end of the branch to j(-2.107). If the optional circuit identifier tokens
are omitted, a circuit identifier of 1 is assumed. Refer to Bus Data, activity ALTR and
Section 19.7.2 Applying Disturbances.
|LINE |
APPLY FAULT [n] |TIE
| [n] FROM [n] BUS (bus id) TO [n] BUS (bus id) [n]
|BRANCH|
|Y
|
|ADMITTANCE| (R1) (R2)
[|CKT
|
]
[|CIRCUIT| (id)] [n]
|MVA
|
|MHO[S]| [BASEKV (R)]
This form of the APPLY FAULT command is used to apply a fault with a specified fault
admittance, (R1) + j(R2), at the from bus end of a designated non-transformer branch. The
Response File being constructed by activity PSAS includes responses to use activity ALTR
to change the line shunt at the from bus end of the branch. (R2) should be entered as a
negative number. If the optional circuit identifier tokens are omitted, a circuit identifier of 1
is assumed. Refer to Non-Transformer Branch Data, activity ALTR and Section 19.7.2
Applying Disturbances.
If the MVA token is specified, the values specified as (R1) and (R2) are divided by the
system base MVA and the active and reactive components respectively of the line shunt at
the from bus end of the branch are set to these values. The fault admittance is therefore
specified on the record is in the same MVA units as is bus shunt (refer to Bus Data).
If the MHO or MHOS token is specified, (R1) and (R2) are entered in mhos and activity
PSAS converts them to the per unit values used for specifying line shunts. If the optional
base voltage tokens are specified, the base voltage specified on the PSAS command is
used in the conversion calculation; otherwise, the base voltage contained in the working
case for the designated from bus is used. In either case, a positive base voltage value is
required.
|LINE |
[|CKT
|
]
APPLY FAULT [n] |TIE
| [n] FROM [n] BUS (bus id) TO [n] BUS (bus id) [n] [|CIRCUIT| (id)] [n]
|BRANCH|
|Z
|
|IMPEDANCE| (R1) (R2) OHM[S] [BASEKV (R)]
This form of the APPLY FAULT command is used to apply a fault with a specified fault
impedance, (R1) + j(R2), at the from bus end of a designated non-transformer branch. The
Response File being constructed by activity PSAS includes responses to use activity ALTR
to change the line shunt at the from bus end of the branch. (R2) should be entered as a
positive number and (R1) and (R2) are specified in ohms. Activity PSAS converts them to
the per unit values used for specifying line shunts. If the optional base voltage tokens are
specified, the base voltage specified on the PSAS command is used in the conversion calculation; otherwise, the base voltage contained in the working case for the designated from
bus is used. In either case, a positive base voltage value is required. If the optional circuit
identifier tokens are omitted, a circuit identifier of 1 is assumed. Refer to Non-Transformer
Branch Data, activity ALTR and Section 19.7.2 Applying Disturbances.
All material contained in this documentation is proprietary to Siemens Industry, Inc., Siemens Power Technologies International.
16-33
Program Automation
Building a Response File, Dynamic Simulation
PSSE 33.4
Program Operation Manual
|LINE |
CLEAR |TIE
| FAULT [n]
|BRANCH|
This form of the CLEAR command is used to clear the last line fault which was previously
applied with the APPLY FAULT command (see above). The Response File being
constructed by activity PSAS includes responses to use activity ALTR to change the appropriate line shunt on the faulted branch back to its original value.
Activity PSAS remembers the faulted branch and the from and to bus orientation specified
on the last APPLY FAULT command. Note that only the last line fault command is remembered by activity PSAS.
CONVERT [n] MW TO (R) (R) [MVAR TO (R) (R)]
The CONVERT command is used to convert the constant MVA load at all buses in the
working case to a specified mix of the constant MVA, constant current and constant admittance load characteristics. The (R) values are specified as percents where the first value of
each pair is the percentage of load to be converted to the constant current characteristic
and the second is the percentage to be converted to constant admittance. If the optional
Mvar tokens are omitted, the same split of load is used for the active and reactive power.
The Response File being constructed by activity PSAS includes responses to use activity
CONL to convert the load as specified in the CONVERT command, followed by the activity
commands CONG, ORDR, FACT, TYSL, and RTRN.
The CONVERT command must be used immediately following a RECOVER command on
which the optional token NORETURN is specified.
|MWP |
|MWI |
|ALTER | |MWY |
[ |MW | ]
|CHANGE| |MVARQ| LOAD [n] BUS (bus id) [LOAD (id)] TO (R) [ |MVAR| ]
|MVARI|
|MVARY|
This form of the ALTER command is used to change a specified component of a designated
load at a designated bus to a specified value. If the optional load identifier tokens are
omitted, a load identifier of 1 is assumed. The second token specified indicates the component of load as follows:
MWP
MWI
MWY
MVARQ
MVARI
MVARY
Reactive power component, constant admittance characteristic; R is negative for an inductive load.
The value specified is always in MW or Mvar at unity voltage. Refer to Load Data.
All material contained in this documentation is proprietary to Siemens Industry, Inc., Siemens Power Technologies International.
16-34
PSSE 33.4
Program Operation Manual
Program Automation
Building a Response File, Dynamic Simulation
This form of the ALTER command is used to change the per unit resistance, reactance or
charging of a designated non-transformer branch or two-winding transformer to a specified
value. If the optional circuit identifier tokens are omitted, a circuit identifier of 1 is assumed.
Refer to Bus Data.
DROP PLANT [n] BUS (bus id)
This form of the DROP command is used to disconnect all generation at a specified bus.
The bus type code is set to one; refer to Bus Data and Section 5.9.1 Equipment Status
Changes.
RECONNECT PLANT [n] BUS (bus id)
This form of the RECONNECT command is used to reconnect generation at a specified
bus. The bus type code is set to two; machine status flags are not changed. Refer to Bus
Data, Generator Data, and Section 5.9.1 Equipment Status Changes.
|UNIT
|
DROP |GENERATOR| (id) [n] BUS (bus id)
|MACHINE |
|LOAD
|
|SHUNT
|
This form of the DROP command is used to disconnect a specified machine, load, or fixed
shunt at a designated bus. The machine, load, or shunt status flag is set to zero; refer to
Bus Data, Fixed Bus Shunt Data, and Section 5.9.1 Equipment Status Changes.
All material contained in this documentation is proprietary to Siemens Industry, Inc., Siemens Power Technologies International.
16-35
Program Automation
Building a Response File, Dynamic Simulation
PSSE 33.4
Program Operation Manual
|UNIT
|
RECONNECT |GENERATOR| (id) [n] BUS (bus id)
|MACHINE |
|LOAD
|
|SHUNT
|
This form of the RECONNECT command is used to reconnect a specified machine, load,
or fixed shunt at a designated bus. The machine, load, or shunt status flag is set to one; the
bus type code is not changed. Refer to Bus Data, Load Data, Fixed Bus Shunt Data, Generator Data, and Section 5.9.1 Equipment Status Changes.
DISCONNECT BUS (bus id)
This form of the DISCONNECT command is used to electrically disconnect a bus and all
equipment connected to it. This command results in the use of activities DSCN and ORDR.
|DISCONNECT| |LINE |
[|CKT
|
]
|TRIP
| |TIE
| [n] FROM [n] BUS (bus id) TO [n] BUS (bus id) [|CIRCUIT| (id)]
|OPEN
| |BRANCH|
This form of the DISCONNECT command is used to remove a specified branch from service. If the optional circuit identifier tokens are omitted, a circuit identifier of 1 is assumed.
The branch status flag is set to zero; refer to Non-Transformer Branch Data and
Section 5.9.1 Equipment Status Changes.
|RECONNECT| |LINE |
[|CKT
|
]
|CLOSE
| |TIE
| [n] FROM [n] BUS (bus id) TO [n] BUS (bus id) [|CIRCUIT|(id)]
|RECLOSE | |BRANCH|
This form of the RECONNECT command is used to return a specified branch to service. If
the optional circuit identifier tokens are omitted, a circuit identifier of 1 is assumed. The
branch status flag is set to one; refer to Non-Transformer Branch Data and Section 5.9.1
Equipment Status Changes.
|DISCONNECT|
[|CKT
|
]
|TRIP
|THREEWINDING [n] FROM [n] BUS (bsid) TO [n] BUS (bsid) TO [n] BUS (bsid) [|CIRCUIT| (id)]
|OPEN
|
This form of the DISCONNECT command is used to remove all windings of a specified
three-winding transformer from service. If the optional circuit identifier tokens are omitted,
a circuit identifier of 1 is assumed. The transformer status flag is set to zero; refer to Transformer Data and Section 5.9.1 Equipment Status Changes.
|DISCONNECT|
[|CKT
|
]
|TRIP
|THREEWINDING [n] AT [n] BUS (bsid) TO [n] BUS (bsid) TO [n] BUS (bsid) [|CIRCUIT| (id)]
|OPEN
|
This form of the DISCONNECT command is used to remove the winding connected to the
bus specified as the AT bus of a specified three-winding transformer from service. If the
optional circuit identifier tokens are omitted, a circuit identifier of 1 is assumed. The transformer status flag is set to 2, 3 or 4; refer to Transformer Data and Section 5.9.1 Equipment
Status Changes.
|RECONNECT|
[|CKT
|
]
|CLOSE
|THREEWINDING [n] FROM [n] BUS (bsid) TO [n] BUS (bsid) TO [n] BUS (bsid) [|CIRCUIT| (id)]
|RECLOSE |
This form of the RECONNECT command is used to return all windings of a specified threewinding transformer to service. If the optional circuit identifier tokens are omitted, a circuit
identifier of 1 is assumed. The transformer status flag is set to one; refer to Transformer
All material contained in this documentation is proprietary to Siemens Industry, Inc., Siemens Power Technologies International.
16-36
PSSE 33.4
Program Operation Manual
Program Automation
Building a Response File, Dynamic Simulation
All material contained in this documentation is proprietary to Siemens Industry, Inc., Siemens Power Technologies International.
16-37
PSSE 33.4
Program Operation Manual
Program Automation
Building a Response File, Dynamic Simulation
PELEC
QELEC
ETERM
ECOMP
EFD
VREF
SPEED
XADIFD
VOTHSG
VUEL
VOEL
MACHAPPIMP
PMECH
MACHITERM
If the optional machine identifier tokens are omitted, channels for all machines at the bus
are generated. The user may either specify the channel identifier(s) to be assigned to the
output channel(s) or let activity CHAN assign them. Refer to Table 15-2 Activity CHAN
Summary and 19-1, activity ALTR, and Section 19.6.1 Output Channel Selection.
|BSFREQ |
|VOLTAGE |
PLACE |VOLT&ANG| [n] BUS (bus id) IN CHANNEL[S]
[WITH IDENTIFIER[S] (ident) [AND (ident)]]
This form of the PLACE command is used to assign a single bus quantity (two quantities in
the case of VOLT&ANG) to an output channel. The user may either specify the channel
identifier(s) to be assigned to the output channel(s) or let activity CHAN assign them. Refer
to Table 15-2 Activity CHAN Summary and 19-1, activity ALTR, and Section 19.6.1 Output
Channel Selection.
|PLOAD|
PLACE |QLOAD| [n] BUS (bus id) [LOAD (id)] IN CHANNEL[S]
[WITH IDENTIFIER (ident)]
This form of the PLACE command is used to assign a single load quantity to an output
channel. If the optional load identifier token is omitted, channels for all loads at the bus are
generated. The user may either specify the channel identifier to be assigned to the output
channel(s) or let activity CHAN assign it. Refer to Table 15-2 Activity CHAN Summary and
19-1, activity ALTR, and Section 19.6.1 Output Channel Selection.
PLACE quantity [n] BUSES (I1) THRU (I2) IN CHANNEL[S]
This form of the PLACE command is used to assign a specified machine, bus, or load
related quantity to output channels for all machines, buses, or loads within a designated
bus number range. < quantity > is specified as in the three BUS forms of the PLACE
command given above. Refer to Table 15-2 Activity CHAN Summary and 19-1, activity
All material contained in this documentation is proprietary to Siemens Industry, Inc., Siemens Power Technologies International.
16-38
PSSE 33.4
Program Operation Manual
Program Automation
Building a Response File, Dynamic Simulation
This form of the PLACE command is used to assign one or two branch related quantities
to output channels for a designated branch. If the optional circuit identifier tokens are
omitted, a circuit identifier of 1 is assumed. The second token specified indicates quantities
to be monitored as follows:
FLOWP
FLOWPQ
Two channels containing the active and reactive power flow on the branch.
The user may either specify the channel identifier(s) to be assigned to the output channel(s)
or let activity CHAN assign them. Refer to Table 15-2 Activity CHAN Summary and 19-1,
activity ALTR, and Section 19.6.1 Output Channel Selection.
|3WNDFLOWP |
|3WNDFLOWPQ |
|3WNDFLOWMVA|
[|CKT
|
]
PLACE |3WNDRELAY3 | [n] BUS (bus id) TO [n] BUS (bus id) TO [n] BUS (bus id) [|CIRCUIT| (id)]
IN CHANNEL[S] [WITH IDENTIFIER[S] (ident) [AND (ident)]]
This form of the PLACE command is used to assign one or two branch related quantities
to output channels for the three-winding transformer winding connected to the first bus
specified. If the optional circuit identifier tokens are omitted, a circuit identifier of 1 is
assumed. The second token specified indicates quantities to be monitored as follows:
3WNDFLOWP
One channel containing the active power flow into the winding.
3WNDFLOWPQ
Two channels containing the active and reactive power flow into the
winding.
3WNDFLOWMVA
3WNDRELAY3
The user may either specify the channel identifier(s) to be assigned to the output channel(s)
or let activity CHAN assign them. Refer to Table 15-2 Activity CHAN Summary and 19-1,
activity ALTR, and Section 19.6.1 Output Channel Selection.
|VAR[S] |
PLACE |STATE[S]| (I1) [THRU (I2)] IN CHANNEL[S]
This form of the PLACE command is used to assign one or more consecutive VARs or
STATEs to output channels. Refer to Table 15-2 Activity CHAN Summary and 19-1, activity
ALTR, and Section 19.6.1 Output Channel Selection.
All material contained in this documentation is proprietary to Siemens Industry, Inc., Siemens Power Technologies International.
16-39
Program Automation
Building a Response File, Dynamic Simulation
PSSE 33.4
Program Operation Manual
|PSS
|
|PASS
|
|PASSTHRU|
The PASSTHRU command is used to inform activity PSAS that subsequent command
input is in the form of BAT_ records (refer to PSSE Application Program Interface (API))
and/or PSSE activity commands and responses to questions rather than in the form of
PSAS commands. While passthru mode is in effect, each input to activity PSAS is simply
appended to the Response File being built without modification. If input to activity PSAS is
being taken from the users terminal, the prompt PASSTHRU: is issued while this mode is
in effect. Passthru mode is terminated and PSAS command mode reinstated by entering
the command FIN (see below). @INPUT and @CHAIN commands must not be specified
while passthru mode is in effect; the IDEV activity command may be specified.
FIN
Terminate passthru mode (see above) and reinstate PSAS command mode.
|USE |
|COPY| (response-file-filename) [arg1 ... [arg9]]
|IDEV|
The USE command allows the user to include the BAT_ records (refer to PSSE Application Program Interface (API)) and/or PSSE line mode commands and responses to
instructions which are contained in a Response File within the PSAS commands which
define a PSSE calculation sequence. The USE filename command is converted to an
@INPUT filename command and inserted into the Response File being constructed by
activity PSAS. Note that entries in the designated file must be in the form of BAT_ records
and/or activity commands and responses to questions rather than in the form of PSAS
commands.
The designated file may contain @INPUT commands but must not contain any @CHAIN
commands or IDEV activity commands. The designated file must be terminated with an
@END command; it must not be terminated with an IDEV activity command or a FIN PSEB
command.
EXECUTE (iplan-program-filename)
The EXECUTE command allows the user to include the execution of an IPLAN program
within the PSAS commands which define a calculation sequence. The EXECUTE filename
PSAS command is converted to an EXEC filename activity command (refer to activity
EXEC) and inserted into the Response File being constructed by activity PSAS.
WATCH [OFF]
The WATCH command is used to enable or disable the echoing of responses generated
from PSAS commands to the dialog output device (normally the users terminal). Response
echoing is disabled upon entering activity PSAS; the PSAS command WATCH enables
response echoing and WATCH,OFF disables it.
All material contained in this documentation is proprietary to Siemens Industry, Inc., Siemens Power Technologies International.
16-40
PSSE 33.4
Program Operation Manual
Program Automation
Building a Response File, Dynamic Simulation
CHECK
The CHECK command instructs activity PSAS to bypass the automatic execution of the
Response File which it constructs (refer to Section 16.15.3 Operation of Activity PSAS).
END
The END command terminates PSAS command input. Unless it is otherwise suppressed
(refer to Section 16.15.3 Operation of Activity PSAS), the Response File constructed by
activity PSAS is automatically executed.
ABORT
The ABORT command terminates activity PSAS and bypasses the automatic execution of
the Response File which it has constructed.
HELP
This form of the HELP command displays the list of PSAS commands at the dialog output
device (refer to Section 4.4 Virtual Output Devices).
HELP,command
This form of the HELP command displays the syntax format of the specified PSAS
command at the dialog output device (refer to Section 4.4 Virtual Output Devices).
The name of the appropriate PSAS Command File (refer to Section 2.4.1 File Usage).
If the specified file does not exist or some other file system related error occurs, an
appropriate error message is printed and the request for the input device is repeated.
Data input from the users terminal. This applies to both interactive and Response File
operation of PSSE.
The user specifies an output filename. Refer to Section 2.4.1 File Usage for the file specification
conventions used by activity PSAS. If a file system error occurs while opening the specified file, an
appropriate error message is printed. If no filename is specified, activity PSAS writes its output into
a file for which the name is of the form PSASnnn.IDV, where < nnn > is a number which is set such
that the resulting filename is a new file in the users directory.
When terminal input had been specified, activity PSAS issues the prompt PSAS: each time it is
ready to accept a new PSAS command. PSAS command input is terminated by entering either the
END or ABORT command.
When input is taken from a PSAS Command File, no prompts are issued. If the input file is not terminated with either the END or ABORT command, the following message is printed:
OUT OF FILE DATA--SWITCH TO TERMINAL INPUT MODE
Additional PSAS command input records may then be entered from the users terminal.
If an error occurs in processing an input record, an appropriate error message is printed, the
offending record is ignored, and processing continues.
All material contained in this documentation is proprietary to Siemens Industry, Inc., Siemens Power Technologies International.
16-41
Program Automation
Building a Response File, Dynamic Simulation
PSSE 33.4
Program Operation Manual
Upon entry of either the END or ABORT command, activity PSAS is terminated and, except as
described below, an @INPUT command is automatically issued to execute the Response File
constructed by activity PSAS. If PSSE is already being operated in Response File mode (i.e.,
activity PSAS was initiated from a Response File), any remaining commands contained in the original Response File are executed following the execution of the Response File created by activity
PSAS.
The execution of the PSAS Response File is bypassed if any one of the following has occurred:
1. Command line only: Activity PSAS was invoked with the suffix CHECK.
2. The PSAS command CHECK was entered during PSAS command input.
3. Command line only: PSAS command input was terminated with the command ABORT
rather than END.
4. Any errors were encountered during the processing of PSAS command input. In this case,
if PSSE is being operated in its Response File mode, all active Response Files are closed
and further user inputs to PSSE are taken from the users terminal.
When automatic Response File execution is bypassed, activity PSAS prints the message:
YOUR RESPONSE FILE IS filename
where < filename > is the name of the PSSE Response File corresponding to the run described
by the PSAS commands which were specified.
While activity PSAS may be used with an ECHO file enable, care must be exercised if the automatic
execution of the Response File built by activity PSAS occurs. In this case, the ECHO file will contain
the commands used to execute activity PSAS as well as the Response File commands generated
by activity PSAS. That is, if subsequently executed as a PSSE Response File, the ECHO file will
perform the sequence defined by the PSAS commands twice.
All material contained in this documentation is proprietary to Siemens Industry, Inc., Siemens Power Technologies International.
16-42
PSSE 33.4
Program Operation Manual
Program Automation
Launching an IPLAN Program File
The generation of the Response File entries corresponding to previously specified PLACE
commands cancels the parameters established by any previous NEXT command.
Additional Information
PSS E GUI Users Guide, Section 23.3.4, PSAS Command File, Dynamic Simulation
PSSE Command Line Interface (CLI) Users Guide,
Section 19.5, Building a Response File, Dynamic Simulation
ACTIVITY?
>>EXEC,filename
ENTER INPUT FILE NAME (0 TO EXIT, 1 FOR TERMINAL):
>>
Python Command
psspy.runiplanfile <filename>
Interrupt Control Codes
None
The programmable PSSE execution activity EXEC retrieves an IPLAN executable program and
starts its execution. The IPLAN program must have been compiled by the IPLAN compiler from its
source form into an IPLAN Executable Program File, and the name of the IPLAN Executable
Program File must be specified.
Activity EXEC itself is not sensitive to any interrupt control code options. However, PSSE activities
executed under control of an IPLAN program respond to interrupt control codes in their normal
fashion. In addition, the IP interrupt control code may be used to terminate execution of an active
IPLAN program.
All material contained in this documentation is proprietary to Siemens Industry, Inc., Siemens Power Technologies International.
16-43
PSSE 33.4
Program Operation Manual
Program Automation
Launching an IPLAN Program File
Compiled IPLAN Files can be used in PSSE in any of the following ways:
from I/O Control >Run Program Automation File (see Section 16.3 Automation
Methods in PSSE)
via line mode activity EXEC (see Section 16.11 Line Mode Commands)
via the EXECUTE command in PSAS and PSEB (see Sections 16.14.1 and 16.15.1)
via the runiplanfile function in the Python extension module psspy (see Section 16.4.1
PSSE Extension Modules For Python)
For specific detailed information and instructions on how to use the IPLAN language, please refer
to the IPLAN Program Manual.
All material contained in this documentation is proprietary to Siemens Industry, Inc., Siemens Power Technologies International.
16-44
PSSE 33.4
Program Operation Manual
Program Automation
Launching an IPLAN Program File
When the token -arg is specified, activity EXEC instructs the user to specify the argument list which
is to be passed to the IPLAN program.
After the IPLAN program is loaded into PSSEs working memory, activity EXEC is terminated and
execution of PSSE continues. PSSEs next request for input (i.e., for the users specification of
the next function or activity to be performed) triggers the execution of the IPLAN program. When
the PSSE GUI is being used, a read from the dialog input device is forced after the IPLAN program
is loaded. While an IPLAN program is controlling the execution of PSSE, input to PSSE is
normally taken from the IPLAN program rather than from the PSSE dialog input device. On the
other hand, input to the IPLAN program to satisfy any IPLAN INPUT and INPUTLN statements is
always taken from the dialog input device. When the PSSE GUI is being used, a General Input
Window is created containing whatever prompts are awaiting display and taking the request input.
PSSE continues to accept input from the IPLAN program until either an IPLAN PAUSE, PAUSE
UNTIL, or PAUSE READ statement is executed; or the IPLAN program is terminated. At this time,
PSSE looks to the dialog input device for its input, or control returns to the GUI.
The input conventions described above apply regardless of whether interactive operation is active,
the execution of the IPLAN program is initiated from a Response File, or the IPLAN program
PUSHes an @INPUT or @CHAIN command or an IDEV,filename activity command. IPLAN
Program Manual gives some examples describing the interaction of Response Files and IPLAN
programs when both are active simultaneously.
While the redirection of input to PSSE provided by activity EXEC is similar in concept to the use
of Response Files, an IPLAN program is much more flexible than a Response File; it may receive
information from PSSE and make decisions based upon PSSE execution results.
For details on the IPLAN programming language, the IPLAN language interface to the PSSE
working case and dynamics data, and the IPLAN compiler, refer to the IPLAN Program Manual.
Additional Information
All material contained in this documentation is proprietary to Siemens Industry, Inc., Siemens Power Technologies International.
16-45
PSSE 33.4
Program Operation Manual
Program Automation
Launching an IPLAN Program File
All material contained in this documentation is proprietary to Siemens Industry, Inc., Siemens Power Technologies International.
16-46