Rulebook

Share Embed Donate


Short Description

Download Rulebook...

Description

Alternative Transients Program (ATP) Rule Book Copyright © 1987-92 by Canadian / American EMTP User Group All rights reserved by ( for details contact ) : Canadian / American EMTP User Group ; Co - Chairmen : Dr. W . Scott Meyer Dr. Tsu - huei Liu The Fontaine , Unit 6B 3179 Oak Tree Court 1220 N.E. 17-th Avenue West Linn , Oregon 97068 Portland , Oregon 97232 United States of America

Rulebook ATP (junio 1996 - internet)

0.

Table

of

H01

Contents

No page numbers accompany the chapters and sections listed below because such numbers are methodically generated from the given information. This is most easily explained by illustration. Section I-D is seen to concern the SUBROUTINE CIMAGE, which would begin on page number 1D-1. The following page would be numbered 1D-2, etc. This assumes that there is sufficient material to warrant two levels of independence (Chapter I, Section D). Some chapters are so short that sections are not warranted, in which case the letter in the middle will be omitted. For example, the references of Chapter XXV begin on page 25-1, followed by page 25-2, etc. In rare cases there may be three levels of categorization. For example, Section IV-D-3 will begin on page 4D3-1, followed by page 4D3-2, etc. I.

General A. B. C. D. E.

F. G. H. I. J. K. L.

II.

III.

F.

About

ATP

Version

of

that

Begin

a

New

Data

Case

Special-request cards having key words Miscellaneous data cards Extensions to miscellaneous data cards

TACS A. B. C. D. E.

Information

EMTP

Background of ATP; user groups; ATP education 1. History of royalty-free EMTP Development 2. Learning to use ATP; user groups; newsletters; E-mail Development centers for ATP Summary program capability; ways execution begins $-cards of SUBROUTINE CIMAGE Computer-dependent aspects and alternatives: 1. Summary of installation-dependent EMTP modules 2. STARTUP disk file for program initialization 3. STARTSPY disk file for program initialization Different computer systems, specific details for all brands Variable dimensioning and Dynamic Dimensioning FORTRAN data format specifications Structure of EMTP input data EMTP data sorting by class (use of "/" cards) $INCLUDE use for data modularization (including arguments) Separate interactive plotting programs: 1. TPPLOT for sophisticated, single-window, plotting 2. WINDOWPLT for simpler, multiple-window, plotting

Cards A. B. C.

Introductory

and

MODELS

to

Simulate

Control

Systems

Purpose of TACS Summary of TACS capability How to simulate what TACS steady-state initialization rules TACS elements and card formats 1. Transfer functions or S-blocks 2. Limiters 3. Signal sources 4. Supplemental variables and devices 5. TACS output-variable specification 6. TACS user-defined initial conditions MODELS : more powerful, flexible, and newer than TACS

ADOLFO DELGADOIV.

Branch

Cards

to

Model

Linear

Elements

1

Rulebook ATP (junio 1996 - internet)

2

H01

A. B. C. D.

Branch card for lumped, series R, L, C Branch cards for Pi-circuits Branch cards for mutually-coupled R-L elements Branch cards for distributed-parameter transmission lines 1. Constant-parameter model with constant [T] 2. Constant-parameter, double-circuit model with special [T] 3. Rigorous, frequency-dependent model (Jose Marti) 4. 2nd-order, recursive-convolution model (Semlyen) E Saturable transformer component F. Branch input using "CASCADED PI" feature V.

Branch A. B. C. D. E. F. G. H. I. J. K.

VI.

Cards

VII.

Cards

Single-Phase

( Including

Thyristors

Network

Source

Cards

and

Elements

(type-99 branch) (type-98 branch) (type-97 branch) (type-96 branch) (type-92; "5555") (type-91; "3333") (type-92; "4444") (type-93 branch) (type-91; "TACS") (Type-93; FORTRAN) ("CORONA MODEL" )

Diodes )

(Other

than

Rotating

Machinery)

Static electric network source functions Type-16 simplified equivalent of hvdc converter

VIII.

Dynamic

Synchronous

IX.

Dynamic

Universal

X.

EMTP

Load

XI.

Cards

to

Override

Initial

XII.

Cards

to

Request

Electric

XIII.

Source

XIV.

Batch-Mode

XV.

Request

XVI.

Interactive A. B. C.

Nonlinear

Time, voltage, current-controlled switches Diode or thyristor (TACS-controlled, type-11) Spark gap or triac (TACS-controlled, type-12) TACS-controlled ordinary switch (type-13)

Electric A. B.

Model

Pseudo-nonlinear resistance R(i) Pseudo-nonlinear reactor L(i) Staircase time-varying resistance R(t) Pseudo-nonlinear hysteretic reactor L(i) Exponential ZnO surge arrester R(i) Piecewise-linear time-vary resistor R(t) True-nonlinear resistance R(i) True nonlinear inductance L(i) Circuit breaker or electric arc R(t,i) User-supplied FORTRAN for compensation Corona modeling for cascaded line sections

Switch A. B. C. D.

to

Flow

Type-1

Machine Machine

Cards

Cards

for

of

(U.M.;

(for

Definitions

Plotting

(3-phase S.M.;

Conditions Network

Cards

Cards

Usage)

of

Output

each

Resulting

Statistical

Execution,

Type-19)

"FIX SOURCE"

(for

Type-59)

time

the

Electric

Variables step )

Simulation

Tabulations

Observation,

and

Control

(SPY)

Initiating EMTP execution that includes SPY Opportunities for SPY dialogue: the keyboard interrupt SPY commands explained according to general function 1. Loading and/or changing EMTP data cards via SPY 2. SPY commands to halt or resume program execution 3. SPY commands to observe EMTP tables: BUS, BRANCH, etc.

Network

Rulebook ATP (junio 1996 - internet)

D. E. XVII.

"JMARTI SETUP"

All A. B. C. D. E. F. G. H. I.

Supporting

Fixed-Dimension

Supporting

---

not yet available

Programs

"XFORMER" to derive [R], [L] of 1-phase transformers "OBSERVE PARALLEL MONTE CARLO" for parallel "STATISTICS" "BCTRAN" to derive [R], [L] of multi-phase transformers "CHANGE SWITCH" to process former switch cards "OLD TO NEW ZNO" to update pre-"M39." ZnO data cards "DATA BASE MODULE" to modularize for $INCLUDE arguments "SATURATION" for magnetic saturation calculations "HYSTERESIS" to punch Type-96 branch cards "ZNO FITTER" to punch Type-92 ZnO branch cards "LINE CONSTANTS"

XXII.

"SEMLYEN SETUP"

XXIII. "CABLE CONSTANTS"

Supporting Supporting

"NETWORK EQUIVALENT"

XXV.

Associated

XXVI.

Index

of

Introductory

Program Program

Supporting

XXIV.

©

Program

Supporting Program

XXI.

I.

3

4. "PLOT" for vector or character plots during execution 5. Command files: @K, FILES, COMMENT, VERIFY, TYPE 6. EMTP variables: EXAMINE, NAMES, ROLL, LIST, FIND, DEPOSIT 7. Table dumping/restoring: SAVE, RESTORE, SLEEP, WAKE, WHEN 8. "DICE" for statistical tabulation of Monte Carlo simulations 9. Mathematics within command files: "APPEND" 10. "RAMP" & "SERIES" for continuous linear parameter variations 11. Utilities: HEADING, TIME, SIZE, LIMIT, HONK, ECHO, WAIT, $ 12. "TACS" : gateway to Concurrent Sequential Processing (CSP) 13. Servicing [Y] changes: YFORM, NOY, FACTOR, NOF Batch-mode execution of SPY commands: $SPY and $SPYEND Use of SPY "PLOT" instead of separate program "TPLOT"

XVIII. "NODA SETUP" XIX.

H01

for

Reference

Program

Supporting

"NETEQV"

Material

Alphabetically-Ordered

Information

Program

About

References

Program

===================================================================== Copyright 1987-1995 by the Can/Am EMTP User Group. All rights reserved. =====================================================================

No part of either this manual or the associated computer program (ATP version of the EMTP) may be reproduced in any form, using cards, paper, microfilm, magnetic media, or any other means, without written permission from the Canadian/American (Can/Am) EMTP User Group. Further, such materials have restricted circulation, and their informational content shall not be released to third parties. The content of this manual, the associated computer program, and all other ATP EMTP materials, are all made available for use by others without any guarantee of usefulness, accuracy, fidelity, or completeness. No author, licensing agent, or authorized distributor will be held responsible for any damages that might possibly result from the use or misuse of ATP EMTP materials for any purpose. The user is solely responsibility for any damages that might possibly result from the use or misuse of ATP EMTP materials for any purpose.

Rulebook ATP (junio 1996 - internet)

4

H01

I-A.

Background of ATP; User Groups; Education The Electromagnetic Transients Program, or EMTP (pronounced by naming the four letters sequentially), is primarily a simulation program of the electric power industry. It can predict variables of interest within electric power networks as functions of time, typically following some disturbance such as the switching of a circuit breaker, or a fault. It also is used by those who specialize in power electronics. EMTP has its roots in Portland, Oregon (USA), at the Bonneville Power Administration (BPA), an agency of the U.S. Department of Energy. Thanks to generous contributions of both manpower and money (the latter to support specialists working on EMTP research and development under contract), BPA dominated EMTP development for more than a decade. This was all public-domain work, and it was given freely to any interested party. This was prior to attempted commercialization of the EMTP during the summer of 1984 (see Section I-A-1 below). The present manual basically is just a complete set of rules for EMTP input and output. Except for the Table of Contents and Introduction at the front (through the end of Section I), and the References and Index at the back (Sections XXV and XXVI, respectively), nothing but rules of program usage will be found. Since most EMTP data have a required order of input, the rules of this book have been written in this same order of data input. Supporting programs (e.g., "LINE CONSTANTS") are exceptions, and they have all been forced to the back (Chapters XVII through XXIV) to agree with the order of appearance within the computer source file (UTPF). Details about interactive execution, observation, and control (SPY) also have no fixed order, and they have been placed in Chapter XVI, preceding the supporting programs. I-A-1.

History

of

Royalty-Free

Development

Following attempted commercialization of the EMTP by certain large organizations of the North American power industry ("EPRI and some friends," as explained later), all EMTP development no longer was given to BPA by persons who had cooperated with BPA in the past. Included was the prodigious afterhours, weekend, and vacation work of Dr. W. Scott Meyer. There evolved a distinct EMTP version known by the acronym ATP (Alternative Transients Program). Although ATP work remains the property of the individuals who produced it, the Can/Am user group is the licensing agent for the use of these EMTP materials by others. For other parts of the world (England, Europe, Taiwan, etc.), such authority has been delegated to others. ATP materials are royalty-free for those who have not participated in "EMTP commerce" (defined by form letter LICENSE.ZIP of the Can/Am user group), but they are not public-domain in nature (as is the case with BPA EMTP work). This distinction is necessary in order to protect such materials from commercial exploitation. The Can/Am user group is grateful to BPA for all of its public-domain EMTP development that formed the basis for this newer, improved, offering of the program. The roots of ATP can be traced to early 1984, when it became apparent to BPA EMTP developers that DCG was not working as it was supposed to, and formed a threat to free EMTP. At that point (February or March), 12 years of "EMTP Memoranda" were ended by Dr. Meyer, and every available hour of his free (non-BPA) time was switched from BPA's EMTP to the creation of a viable alternative that would be denied to those having commercial ambitions (already apparent among several DCG members). ATP, the Alternative Transients Program, was the result during the fall of 1984. This followed Dr. Meyer's return from Europe (the first European EMTP short course, in Leuven) and purchase of his first home computer (the new IBM PC AT) during August of 1984. In September of 1982, a "coordination agreement" concerning the EMTP was signed by six large power organizations of North America: three U.S. government agencies (BPA, the Western Area Power Administration, and the U.S. Bureau of

Rulebook ATP (junio 1996 - internet)

H01

5

Reclamation, with the latter two headquartered in Denver, Colorado) and three Canadian organizations (Hydro-Quebec/IREQ, Ontario Hydro, and the Canadian Electrical Association on behalf of the remaining Canadian utilities). Known by the acronym DCG (for EMTP Development Coordination Group), this organization agreed during March of 1983 to keep the EMTP proper (the UTPF) in the public domain. But there followed a loose Association with the Electric Power Research Institute (EPRI, of Palo Alto, California) during the summer of 1984. During the fall of that year, it was claimed by the DCG Steering Committee that BPA EMTP work would no longer be in the public domain, and would not be given freely to others. But such DCG/EPRI policy was nothing more than wishful thinking by those wanting to commercialize the EMTP. During April of 1985, a U.S. Freedom of Information Act (FOIA) request was filed with BPA, and BPA disclosed its then-latest version of the UTPF as required by that U.S. law. Since then, strong statements from BPA indicated that both U.S. government work and money must result only in public-domain EMTP products. This was consistent with the hopes of European EMTP users, of course. Prior to such statements by higher management and its representatives at BPA, LEC (the Leuven EMTP Center with headquarters on the campus of K.U. Leuven in Belgium) was formed by Prof. Daniel Van Dommelen during the spring and summer of 1984 as a defensive measure. This was after hearing of proposed DCG/EPRI prices during a personal visit by DCG Chairman Doug Mader. Although LEC later had problems of mismanagement, everyone involved can be proud of those early years, and the obvious spirit of independence ("hell no, we won't pay") that drove the effort. The first annual meeting of LEC was held in Leuven on November 4 th of 1985, and Dr. Meyer agreed to bring ATP. About possible cooperation with those who then were trying to sell EMTP, the official minutes of this meeting records the following: "- It was unanimously agreed that the User Group wants to influence the politics of development by making a distinction between: - the EMTP proper (UTPF), which should remain free and intact. - Preprocessors, postprocessors and data bases, which could be things to sell. - After this discussion, it was agreed that TA should contact DCG in order to request EPRI not to sell the EMTP proper (UTPF). Should this first attempt prove to be unsuccessful, then DVD could try." Here "TA" stands for Mr. Ture Adielson of ASEA, who at the time was the EMTP representative of ASEA to both DCG and LEC. Finally "DVD" indicates Prof. Van Dommelen, the Chairman of LEC. Prior to the vote authorizing this statement, Dr. Meyer had agreed to turn his ATP work into the public domain provided DCG and EPRI would do likewise. No response from DCG or EPRI was ever received, as far as the Can/Am user group knows. Both K.U. Leuven and LEC operated through 1993 without any formal connection to any power organization of North America. However, LEC did cooperate with BPA on an informal basis for several years (most effectively from 1985 to 1989), and it remained willing to consider the establishment of a formal tie provided non-commercial EMTP activity at K.U. Leuven could thereby be assisted. This was the stated goal of LEC, which was supposed to be a nonprofit organization. The Chairman did serve without pay, and decisions normally were made (or subsequently reaffirmed) by majority vote of the members. That was through 1990, anyway. But with growth came affluence, and with affluence seemed to come corruption as discovered by LEC's own Steering Committee. After failing to account for all money collected from members, and failing to honor voting rights of members in this regard (accurate accounting of money), LEC was closed at the end of 1993. But the European EMTP User Group (EEUG) was reformed in Hannover, Germany, during November of 1994. This followed the leadership of Dr. Mustafa Kizilcay, who was working for Lahmeyer International as the meeting was planned, but had

Rulebook ATP (junio 1996 - internet)

6

H01

been named to be a Professor at the university in Osnabrueck before the meeting was actually held. By German law, all money must be accounted for, and voting rights of members are guaranteed by an associated charter. As this text is being revised during the spring of 1995, operation is beginning slowly (German law is demanding), but with considerable promise. I-A-2.

Learning

to

Use

ATP;

User

Groups

By far the best way to learn about EMTP capability and usage is by working beside a competent, experienced veteran. Those power organizations that have been using the EMTP for a broad range of power system simulation, and which have not suffered disrupting changes of personnel, represent the ideal learning environment. If the reader is working for such an organization, he should count his blessings, and disregard most of what follows. In case of questions or problems, go see the local experts. Always ask questions. Program users must adopt this habit, since they will be doing it until the day they retire, so broad and complex is transient simulation! For those not so blessed by local experts, the next-best alternative is a strong national or regional EMTP User Group to which new users can turn for help. Contact personnel of ATP-licensed organizations that are officially recognized by the Can/Am user group are as follows: Dr. Akihiro Ametani, Professor and Chairman, Japanese EMTP Committee Dr. Naoto Nagaoka, Professor and Secretary Faculty of Electric Engineering Doshisha University Tanabe, Tsuzuki-gun Kyoto 610-03 JAPAN Prof. Dr.-Ing Mustafa Kizilcay Fachhochschule Osnabrueck Fachbereich Elektrotechnik Albrechtstr. 30 D-49076 Osnabrueck GERMANY Mr. Marco Polo Pereira Chairman, Latin American EMTP User Group Furnas Centrais Elétricas S.A. Rua Real Grandeza 219, C 1608 CEP 22283-900 -- Rio de Janeiro BRAZIL Dr. Brian J. Elliott, Chairman Mr. Stephen Boroczky, Secretary Grid Planning & Development Electricity Transmission Authority PO Box 1000 Sydney South, NSW, 2000 AUSTRALIA Dr. W. Scott Meyer and Dr. Tsu-huei Liu, Co-Chairmen Canadian/American EMTP User Group The Fontaine, Unit 6B 1220 N.E. 17th Avenue Portland, Oregon 97232 U.S.A.

Rulebook ATP (junio 1996 - internet)

H01

7

JinBoo Choo, Manager Korean EMTP Committee Electric Power Research Department Korea Electric Power Corporation (KEPCO) Research Center 117-15, Yong Jeon Dong, Dong-Gu Dae Jeon SOUTH KOREA Mr. Chiang-Tsung Huang, Chairman Mr. Shui-Hsiu Lin, Secretary Republic of China EMTP User Group (Includes Hong Kong and Singapore) System Planning Department Taiwan Power Company (Taipower) 242 Roosevelt Road, Section 3 P. O. Box 171 Taipei 107 REPUBLIC OF CHINA (TAIWAN) Dr. Warren Levy Information Technology Dept. Electricity Supply Commission (ESKOM) Megawatt Park, Maxwell Drive P. O. Box 1091 Johannesburg 2000 SOUTH AFRICA While each group was primarily designed to serve users of its geographical region, anyone in the world can order ATP materials directly from either Osnabrueck or Portland. Also, computer files are being shared on a world-wide basis among ATP-licensed users by E-mail (the Internet). See later paragraph. EMTP education is being handled separately, and materials related to it are not available through BPA, so do not write to Portland for a copy. EMTP education began in June of 1978 with a one-week EMTP short course at the University of Wisconsin -- Madison. This was basically an introductory course, and it has been offered most summers since its inception. Following the switch from BPA's EMTP to the commercial offering of DCG/EPRI in 1987 or 1988, the Madison offering has ceased to be of much value to ATP users, however. Other universities have offered introductory courses, too, from time to time. For ATP, this began in Leuven, Belgium, during the summer of 1987 --- the first public exposition of ATP. Then during the summers of 1988 and 1989, Cal Poly in San Luis Obispo, California, USA, offered the first EMTP course that used only PCs (Personal Computers). The spring of 1989 saw the beginning of such now-famous PC-based education offered by Prof. Dennis Carroll at the University of Florida in Gainesville. Prof. Ned Mohan began his popular 2-day, traveling (it follows IEEE PES Summer Meetings) course in 1990 when the PES meeting was near his home campus in Minneapolis. As for more advanced education, Europeans were first, when a high-level course for experienced users was given during the summer of 1984 by Prof. Daniel Van Dommelen at K.U. Leuven in Belgium. While needed, such advanced courses have difficulty attracting adequate numbers of students to be offered regularly. Power electronics can be simulated using the EMTP as documented by a textbook on the subject that first appeared in 1989. John Wiley & Sons, Inc., of New York City (USA), publish "Power Electronics: Converters, Applications, and

Rulebook ATP (junio 1996 - internet)

8

H01

Design" by Ned Mohan, Tore Undeland, and William Robbins. An associated set of 64 ATP data cases and paper documentation of them (a separate book) can be purchased from Prof. Mohan at the University of Minnesota. Beginning about 1993, this package was bundled with Prof. Mohan's short course, which now specializes in ATP applied to power electronics of power systems. The EMTP Rule Book contains almost nothing about what is happening in the world of EMTP usage and development. For EMTP-related announcements, reports of interesting studies by program users, corrections to the Rule Book and/or common program versions, and summaries of ongoing EMTP research, see the newsletter of the Can/Am user group. This is Can/Am EMTP News, which during 1994 and 1995 has consisted of 20 pages per quarterly issue (January, April, July, and October of each year). Dating to the second half of 1988, WordPerfect 5.1 documents of the content can be obtained by E-mail from several Anonymous FTP sites around the world (more about such E-mail usage later). "EMTP News" was a valuable journal about EMTP that was published by LEC for some 6 or 7 years prior to LEC's demise in 1993. Early issues of the Can/Am newsletter will refer to this, which is an important part of the historical record of ATP usage and development. Unfortunately, no computer storage of most of the published material is believed to exist. It is hoped that the tradition of a journal for full-length articles about ATP use (more than development) can be resurrected during 1995 by the new EEUG, which would use the more appropriate name "EMTP Journal." A newsletter, this was not (during its prime, each issue of the quarterly "EMTP News" averaged about 100 pages). E-mail (electronic mail) has become critically important to many ATP users. As WordPerfect disk files, the newsletter and other ATP-useful things can be obtained from FTP server ftp.ee.mtu.edu (the former plains server, which became a mirror sparky.nodak.edu during April of 1995) using Anonymous FTP transfers of Internet. These two sites are in the north-central USA (Michigan Tech in Houghton and North Dakota State University in Fargo, respectively). There also is a mirror in Europe, at the University of Hannover in Germany at address 130.75.2.2 Details are summarized in the January, 1995, newsletter. Prof. Bruce Mork of Michigan Tech in Houghton manages this material. He also established a free electronic bulletin board [email protected] that allows ATP users to exchange messages. See the October, 1991, issue of the newsletter for Prof. Bruce Mork's 3-page exposition about this pioneering, ATP service he founded. That article also can be found in OCT91.DOC within disk file EMAIL.ZIP on the GIVE2 disk of Salford EMTP distribution. The service is free, and had grown to more than 200 addresses by the end of 1994. Prof. Mork explained FTP use in the July, 1992, issue (see JUL92.DOC within EMAIL.ZIP). ATP itself can be distributed by FTP, but not without security (a password). ATP also can be distributed by normal E-mail using the Attach button of MS Mail within MS Windows (this UUENCODEs an archive such as GIVE1.ZIP automatically) as described in the January, 1995, newsletter. I-B.

Development

Centers

for

ATP

The Can/Am EMTP User group can be reached most easily by E-mail (electronic mail) since use of it was begun by the user group in the fall of 1993. The current Internet address used by Drs. Meyer and Liu is: [email protected] The non-electronic mailing address in The Fontaine was displayed previously. BPA personnel who are preoccupied with free EMTP development are Drs. W. Scott Meyer and Tsu-huei Liu, who most easily can be reached by telephone using number (503) 230-4404. Dr. Liu's telephone is -4401, but this is less useful because it has no recorder, and a secretary might answer. If no human answers 4404, after a full four rings a personalized recording in Dr. Meyer's voice will be heard. If the phone is in use, the recording will be heard immediately. Following Dr. Meyer's brief greeting, a caller will be given an opportunity (after the tone) to leave a recorded message (not over about 8

Rulebook ATP (junio 1996 - internet)

H01

9

minutes). A warning is appropriate, however: Speak slowly and distinctly, since the recording system produces distortion of its own as evidenced by the quality of the recording. When the message is complete, a flashing red light will be seen on Dr. Meyer's telephone. For a telephone call to be returned, be sure the name and telephone number are slowly and clearly enunciated. Finally, the address for conventional mail, E-mail, and also telephone facsimile (FAX) is: Dr. W. Scott Meyer or Dr. Tsu-huei Liu E-mail: [email protected] BPA, Route TEOS; Floor 4, Post S-14 P. O. Box 3621 Portland, Oregon 97208 U.S.A. FAX: (503) 230-3212 Those wanting to use a delivery service will require a street address: 905 N.E. 11th Avenue, with different postal code 97232. Be sure to include the floor and post, since BPA's is one big building of some 2200 workstations. Laurent Dubé, author of MODELS (new control system modeling), also can be reached most easily by E-mail. Use [email protected] (Internet address). He also has voice telephone with a recorder: (503) 392-4551. For FAX, Mr. Dubé uses 392-4575. Located on the Oregon coast about 2 hours by car from Portland, the mailing address is: DEI Simulation Software 7000 Rowan Road Manor P. O. Box 848 Neskowin, Oregon 97149 U.S.A.

I-C.

Summary Program Capability; --------------------------

Ways Execution Begins; ---------------------

Errors ------

.el The EMTP is used to simulate transients of electrical power networks. That is, it is used to solve the algebraic, ordinary, and/or partial differential equations that are associated with an interconnection of the following components: .LITERAL *

Lumped resistance,

R :

*

Lumped inductance,

L :

*

Lumped capacitance,

*

Multiphase Pi-equivalents, where the preceding scalar R, L, and C become symmetric, square matrices [R], [L], and [C].

*

Multiphase distributed-parameter transmission lines, wherein propagation time of the component is represented. Both constant-parameter and frequencydependent representations are provided.

C :

Rulebook ATP (junio 1996 - internet)

10

*

Nonlinear resistors, where the v-i characteristic is single-valued.

*

Nonlinear inductors, either with the conventional single-valued characteristic (see sketch at right) or including hysteresis and residual flux.

*

Time-varying resistance.

*

Switches, used to simulate circuit breakers, spark gaps, or any other connection change of the network. Diodes and thyristers (ac/dc valves) are included.

*

Voltage or current sources. In addition to standard mathematical functions (sinusoids, surge functions, steps, and ramps), the user may specify sources point by point as functions of time, or in usersupplied FORTRAN, or via TACS control (see control system modeling below).

*

Dynamic rotating electric machinery, of which the most common form is conventional, 3-phase synchronous machines. But induction machinery and dc-machinery also can be represented, for 1, 2, or 3 phases. Such machine models can be connected to TACS control system models (see immediately below), thereby allowing dynamics for voltage regulators and speed governors.

*

Control system dynamics as years ago were represented by differential analyzers ("analog computers"). This modeling has been named TACS, an acronym derived from "Transient Analysis of Control Systems." Nonlinear and logical operations of various types are allowed. Inputs and outputs may be interfaced with the electric network of the EMTP, thereby providing hybrid computer capability. All TACS configurations are user-patchable, and hence configurationfree. See Section III for details.

H01

.EL Trapezoidal-rule (second-order) implicit integration is used on the describing equations of most elements that are described by ordinary differential equations. The result is the formation of an associated set of real, simultaneous, algebraic equations that must be solved at each time step (see Ref.#1). These equations are placed in nodal-admittance form, with new unknown voltages as variables, and are solved by ordered triangular factorization (Ref.#4). Program output consists of component variables (e.g., branch currents or voltages, machine torques or speeds, etc.) as functions of time, for those variables that were requested by the user. Both printed and plotted output is possible, with plotting available in either character or vector-graphic mode. See Section#XIV for the batch-mode (both character and vector) plotting, and Section#XVI for the details of interactive (SPY) usage.

Rulebook ATP (junio 1996 - internet)

H01

11

Initial conditions for differential equations of the various components can be determined automatically by the program for many if not most cases of practical interest. The most important restriction is to linear elements (nonlinear components must generally be ignored during phasor steady-state solutions). Yet injections of the electric network may be specified in terms of power and voltage magnitude, thereby providing multi-phase load flow capability. Control system modeling (TACS) allows for the superposition of an arbitary number of linear phasor solutions of different frequencies. An enormous discontinuity in the EMTP occurred during 1984-1985. As DCG/EPRI made proprietary claims to BPA work (later rejected by BPA in connection with a Freedom of Information Act request during April of 1985), the ATP (Alternative Transients Program) version was developed outside of BPA by W.#Scott Meyer and other cooperating individuals and organizations. Because the program was restructured in important ways, former translators had to be abandoned. A new beginning has taken place. As a general rule, the new EMTP (i.e., ATP) is less demanding of computers than were the older ("M39." and before) versions. However, structure is different, so successful experience gained from "M39." and earlier versions is being omitted from this documentation. Most if not all of the two dozen or more distinct computers that once were proven to be EMTP-compatible (for the old code) probably remain compatible for the new code, too. Yet this is not yet known for sure. As an honest, conservative approach, all former (pre-ATP) material is being removed. For those wanting information about the portability of "M39." and earlier EMTP versions, refer to the Rule Book dated June, 1984. For all computer systems, program execution begins with a one-line prompt that shows the most important alternatives within parentheses: .LITERAL $emtp EMTP begins. Send (SPY, file_name, DISK, HELP, GO, KEY) : SPY .EL If the user is communicating with the operating system in real time via a keyboard (as opposed to being home in bed while some batch-mode processor runs his job during the middle of the night), then his next input is crucial to how the program begins execution. If the user knows nothing, he might send the 4th listed alternative ("HELP"), which results in the following universal information about the various choices: 1) "SPY" is the gateway to interactive execution, observation, and control, as documented in Section#XVI of the Rule Book. For details, send "SPY", "HELP" and then "ALL" --- resulting in a total of about 500 lines of instruction. 2) "file_name". If not one of the listed key words (in capital letters), the input line is taken as the name of a disk file of data for batch-mode solution. If this ends with a period, ".dat" (the implied file type DATTYP of the STARTUP file) will be appended. 3)

"DISK"

is request for later prompt for LUNIT6 disk file name.

4)

"HELP"

provides the overview of options now being read.

5) "GO" is for batch solution, like 2, only for the special case of an external connection of the data file to LUNIT5. 6)

"KEY"

7) "STOP" .LITERAL .el

is for use of

LUNIT5#=#5

data input

(no use of LUNT10 cache).

will terminate execution immediately (FORTRAN STOP).

12

Rulebook ATP (junio 1996 - internet)

H01

The 1st alternative, "SPY", should be used only with those computers that have the capability of interactive EMTP execution, observation, and control. Verify availability in the installation-dependent section applicable to the computer of interest before any such attempt. Then refer to Section#XVI for generic instructions of usage. A disk file name may follow "SPY", separated by a blank and possibly preceeded by the character "@" (indicating a SPY command file rather than an EMTP data file). For further details, see the "DATA" command of SPY in Section XVI-C-1. For non-SPY EMTP execution, it is the 2nd option ("file_name") of the initial EMTP prompt that can always be used. Just send the name of any legal disk file that contains EMTP data to be solved. Since such names depend upon computer system (file names were not standardized by ANSI FORTRAN#77), any example might be misleading, so none will be given. Arguments of the type used with $INCLUDE can follow the file name for special cases. Of course, a special data file is required, and arguments must match the demands of the data file in both number and type. If ".dat" is not explicitely keyed, remember to leave room for it (at least 4 blanks) before any arguments begin, since the ".dat" will erase whatever exists at the time and place of its application. An illustration using a single argument is provided by BENCHMARK DC-65, which begins execution as follows. Note that there is only one argument, the end time TMAX of the study, which is being set to 7/10 second: .literal $emtp EMTP begins. Send (SPY, file_name, DISK, HELP, GO, KEY) : dc65. , 0.70 .el For more details, see "DATA BASE MODULE" of Section XIX-F. Two or more arguments require use of a comma "," as a separator (possibly changed by variable CHRCOM on card 19 of the STARTUP file). To continue the argument list on a second or later input line, simply key "$$" (possibly changed by variable CHRCOM on card 19 of the STARTUP file) on the right in any columns not exceeding 79-80. The following continuation line begins in column 2 (column 1 is ignored, so do not begin an argument there). There is no limit to the number of such continuation lines. The third possible beginning is "DISK", which provides a universal way of sending the EMTP's LUNIT6 output to a disk file of the user's choice, in case of non-SPY execution. If the user is communicating with the operating system in real time, and if his computer has windows that can be scrolled the way Apollo's can, then usage of "DISK" is not generally recommended, since it masks important information about how execution is progressing. For example, the user will not know how close to termination a simulation might be. On the other hand, in cases of batch-mode solution with the user at home and asleep in bed, this is precisely what is wanted. For such use, the "DISK" request is sent first, followed by "file_name" (to specify the data), followed by a second file name to which LUNIT6 is to be connected. If such commands are done in real time, the third and final input will be in response to the prompt: .LITERAL Send desired disk file name for LUNIT6 : .el To over-write an existing file of the same name, append "-r" or "-R" for most computers. For example: "dc4. -r". Without this request to replace the old file with the new one, the EMTP will prompt for a correction. The 5th alternative input is "GO", which is not universal, and which is not recommended for any computer that has dynamic OPEN/CLOSE capability. It is only necessary and sufficient for those installations that lack such capability (e.g., mainframe IBM systems) --- computers that require the user to connect the EMTP input data file externally. For typical batch-mode IBM usage, this would be as part of the Job Control Language that runs the program. The

Rulebook ATP (junio 1996 - internet)

H01

13

"GO" command then informs the computer that data has already been connected, and that the user now wants the solution to proceed. The 6th alternative input is "KEY", which has specialized use. One application is for program (or data) debugging using computers with windows (see the Apollo pages). Another application is for the production of batch-mode EMTP plots one at a time, with the user allowed to see the preceding plot before creating the following plot card. This assumes that the user is communicating with the operating system in real time, and that he is using a terminal that is capable of displaying the requested plots. It also assumes that the simulation of interest has already been performed, and that raw plot data points have been saved on disk (integer miscellaneous data parameter ICAT > 0). Consider the following sequence of keyed input lines in response to the initial EMTP prompt: .LITERAL KEY $OPEN, UNIT=4 FILE=//A/WSM/DC3TO54.PL4 ....(etc.) REPLOT 144 1. 0.0 20. 18-A 18-B 18-C .el The 2nd card shown connects the plot file to the program, whereas the 3rd ("REPLOT") transfers control to batch-mode EMTP plotting. The 4th card is the 1st of an indeterminate number of batch-mode EMTP plot cards. Since these are only read one at a time as needed, the user can request whatever he wants in whatever quantity he wants, based of the results of previous plots. It is possible that an extra card, "DISK PLOT DATA", might be required after "KEY" and before "REPLOT". This is the case for those program versions (e.g., Apollo) that do not have an LUNIT4 connection to disk by default. There may also be need of a "CALCOMP PLOT" or "PRINTER PLOT" request before the first plot card, if the STARTUP file does not correspond to the available mode of the terminal being used. Finally, remember that the $OPEN card is installation-dependent. For details of this example, see BENCHMARK DC-54. The 7th and final alternative, not suggested by the prompt, is "STOP", which represents a generic way to terminate program execution. But since most if not all computers have vendor-specific ways that may be more convenient and natural, it is unclear whether the average user will want to key "STOP" just to halt the program. Once program execution is under way, output designed for the line printer (the LUNIT6 I/O channel) will be created at intervals, and variables of interest may be written to a disk file (typically with file type ".PL4") for later plotting. Whether the user sees much if any of this will depend upon whether or not he can see the LUNIT6 output on a computer monitor during this time. The "DISK" command obviously prevents this for most systems, as might the "GO" command (if a file were assigned externally to LUNIT6). Formal error terminations are a special form of output with which every user should be familiar. It is difficult to overlook any such messages, since the LUNIT6 output is marked before and after by the following characteristic, 4-line band of printing that is a full 132 columns wide: .literal -----------------------------------------------------------------ERROR/ERROR/ERROR/ERROR/ERROR/ERROR/ERROR/ERROR/ERROR/ERROR/ERROR/ ... etc. ERROR/ERROR/ERROR/ERROR/ERROR/ERROR/ERROR/ERROR/ERROR/ERROR/ERROR/ -----------------------------------------------------------------.el Following such an introduction will be 5 lines of standard explanation ("You lose, fella ...") to which only the beginning user need pay any attention. But then comes valuable information, beginning an 80-column card image of the last-read data card. Location of the difficulty in the EMTP source code is provided by the numbers that are labeled as: "KILL code number", "Overlay number", and "Nearby statement number". Finally, there is the specific error message itself, always beginning with "KILL =XX" where "XX" is the KILL-code number (between unity and about 230). After a second printing of the

Rulebook ATP (junio 1996 - internet)

14

H01

"ERROR/ERROR" band, there will be attempted recovery of execution, with the program reading through remaining data cards until a "BEGIN NEW DATA CASE" card is found. Case summary statistics will then separate the error termination from the following solution (if enough data remains to be solved). Non-fatal warning messages are usually much more inconspicuous, but should be looked for, and understood, by the intelligent user. Usually such messages will be indented, and often they are preceded by several special symbols. As an example, consider: "///##Warning.##Nonzero XOPT or COPT differs from the power frequency of 6.00000000E+01 Hz. Did the user really want this?" Not shown here is the indentation of two spaces. .literal I-D.

$-Cards of "CIMAGE" Can Be Ordered Arbitrarily ------------------------------------------------

.el An EMTP data case is made of EMTP data cards (or more formally, of 80-column card-image records, in this day of CRT monitors). Most such cards require specific ordering (see Section I-I), so are the subject of later sections of this manual (Section#II onward). But there is an exception -- a class of cards called "$-cards" for which ordering is arbitary. Such cards will be explained in the remainder of this section. A $-card (pronounced "dollar card") consists of a dollar sign in column one, followed immediately by some short command. All such cards are requests for operations that can be serviced locally within installation-dependent SUBROUTINE CIMAGE. Due to the installation-dependent character, it is true that no one can be sure of what applies to all systems. For example, a particular computer might refuse to recognize any such card. Yet this should not happen. There should be a solid, universal framework that applies to all computers for the following cards: .LITERAL 1. $OPEN 2. $CLOSE 3. $WIDTH 4. $ABORT 5. $ENABLE 6. $NEW EPSILN, EPS 7. $MONITOR 8. $LISTOFF 9. $LISTON 10. $VINTAGE,M 11. $STOP 12. $WATCH 13. $COMMENT 14. $DEBUG, M 15. $UNITS 16. $PUNCH 17. $ERASE 18. $STARTUP, file_name 19. $KEY 20. $BREAK .el It is such universal rules that will be described in the remainder of the present section. For specifics of computer- or installation-dependent exceptions or extensions, see that section of the Rule Book that applies to the computer of interest. .literal I-D-1.

$OPEN

to connect a disk file to an I/O channel -----------------------------------------------

.el $OPEN##is used to connect a disk file to an I/O channel of the program. Similar to the ANSI FORTRAN#77 definitions of these statements, qualifiers are allows. While some qualifiers are required for all computers (e.g., the I/O unit number with qualifier "UNIT="), others (e.g., the record length specification "RECL=") may be required only for certain computers. So, although details may vary from computer to computer, the structure is universal, and this is what will now be summarized. First, consider sample $OPEN usage for Apollo, as drawn from BENCHMARK DC-54 (and split into two lines only for ease of display): .LITERAL $OPEN, UNIT=4 FILE=//A/WSM/DC3TO54.PL4 FORM=UNFORMATTED STATUS=OLD RECL=8000 .el

Rulebook ATP (junio 1996 - internet)

H01

15

Note the single comma, after the request word. All other qualifiers are separated from each other by one or more blanks, not commas (note!). Although the display has been spread onto a second line for convenience of presentation, this is not allowed as EMTP data, which must all fit within a single, 80-column card image. The qualifiers can appear in any order, and variations should be obvious to any FORTRAN programmer. For example, FORM=FORMATTED would be possible, as would STATUS=NEW, STATUS=SCRATCH, or STATUS=UNKNOWN. Yet some of this is computer-dependent. For example, VAX can always create a NEW file (given a higher version number by VAX/VMS), whereas Apollo only can do so if a file of the desired name does not already exists. An unfortunate peculiarity of Apollo Aegis is the need for the "RECL=" qualifier (most systems can dispense with this detail). Remember that using STATUS=SCRATCH conflicts with the use of "FILE=", so these two should never be used together (see the 2nd subcase of BENCHMARK DC-24 for sample STATUS=SCRATCH usage). An illustration of $OPEN usage is provided by BENCHMARK DC-40, which continues the Monte Carlo simulation of DC-24 (which only performed 3 of the 6 total energizations) using "START AGAIN". Before emtp tables can be read via I/O channel LUNIT2#=#2, the disk file storing them must be connected. The data card interpretation for this operation is as follows: .literal C 1 2 3 4 5 6 7 C 34567890123456789012345678901234567890123456789012345678901234567890123456 C ------------------------------------------------|------------------------Connect disk file to I/O unit. |$OPEN, UNIT=2 FILE=DC24. .el Other test cases illustrating $OPEN are: 1)##DC-3, which illustrates the manual naming of the plot file (rather than having a random name based on the date and time of day); 2)##the second subcase of DC-24, to connect the file of user-supplied switch times, DC24LUNIT8.DAT, to unit 8; 3)##DC-32, where the disk file of program tables (created because MEMSAV#=#1) must be connected by the user. 4)##DC-46, where the plot file created by DC-45, DC45.PL4, is connected for postprocessing using TACS; 4)##DC-49, which is like DC-40 except for the lack of dice rolling (it provides a continuation for the deterministic DC-32); 5)##DC-54, where the plot file created by DC-3, DC3TO54.PL4, is connected for purposes of delayed, batch-mode plotting using REPLOT. Should more than 80 columns be required due to a long file name, the user is advised to use a continuation request "=$$" on the right of his $OPEN card. All partial cards begin with "$OPEN," in columns 1-6. For an illustration of such usage, see BENCHMARK DC-66. Interpretation will be identical whether or not the $OPEN is contained on a single card. .literal I-D-2.

$CLOSE

to disconnect a disk file from an I/O channel -----------------------------------------------------

.el $CLOSE is used to disconnect a previously-connected file. Sometimes this is done to protect a data file from being written on after it has been used. At other times it is used to free the I/O unit for another connection that is to follow. In any case, only the UNIT= and STATUS= qualifiers are applicable. The first of these is self-explanatory, and the second will either be STATUS=SAVE or STATUS=DELETE. The addition of "SHOW CARDS" anywhere on the $CLOSE request will result in a listing of 80-column card images of the file just as though the cards had been punched (see $PUNCH). This is just before the file is released. For an illustration, see the second subcase of BENCHMARK DC-52. An illustration of $CLOSE usage is provided by BENCHMARK DC-40, which continues the simulation of DC-24 using "START AGAIN". After emtp tables have

Rulebook ATP (junio 1996 - internet)

16

H01

been connected and read, they are immediately disconnected to protect them against some unplanned, stray WRITE to the I/O channel being used (this is the extra-cautious approach). The following interpretation documents this: .literal C 1 2 3 4 5 6 7 C 34567890123456789012345678901234567890123456789012345678901234567890123456 C ------------------------------------------------|------------------------Disconnect disk file from I/O unit. |$CLOSE, UNIT=2 STATUS=K .el Any data case with MEMSAV#=#1, or the associated subsequent "START AGAIN", will use $CLOSE. Other test cases are the first and third subcases of BENCHMARK DC-24, DC-32, all subcases of DC-49, and the 2nd subcase of DC-52. I-D-3.

$WIDTH

to change the LUNIT6 output width -----------------------------------------

.el $WIDTH,#M##allows the user to modify the LUNIT6 output width, most commonly between 80 and 132. Such $-card specification will overide the initial choice that has been built into the STARTUP file. All output structures for simulation usage can have the width so controlled, although little has been done for non-simulation supporting programs (e.g., "LINE CONSTANTS"), most of which produce only 132-column output. One usage that may have nothing to do with width is to have 132-column output everywhere except for the branch flows and nodal injections of the phasor solution. This can both speed output and save considerable paper, since no reverse flows are printed, and the forward flows are shorter. An illustration of $WIDTH usage is provided by BENCHMARK DC-5, which illustrates 80-column output capability of the program. The following interpretation documents this: .literal C 1 2 3 4 5 6 7 C 34567890123456789012345678901234567890123456789012345678901234567890123456 C ------------------------------------------------|------------------------New KOL132 = 80 (LUNIT6 output width). |$WIDTH, 80, { Req I-D-4.

$ABORT

to proceed to next data subcase ---------------------------------------

.el $ABORT results only in setting the error flag KILL#=#88. For most places of a data case, this will direct control to special error message number 88, and then result in a skip to the next data subcase of the disk file, should one exist. The location of $ABORT is not arbitrary, although it can be placed before just about any blank terminator card as an extra record. An illustration of $ABORT usage is provided by the second subcase of BENCHMARK DC-42, which is to abort before the blank card ending plot cards. The following interpretation documents this: .literal C 1 2 3 4 5 6 7 C 34567890123456789012345678901234567890123456789012345678901234567890123456 C ------------------------------------------------|------------------------End data subcase. "CIMAGE" sets KILL = 88. |$ABORT { Illustration I-D-5.

$DISABLE $ENABLE

to treat data cards as if they were comment cards to end such implicit commenting of data cards -------------------------------------------------------

.el a

The $DISABLE/ENABLE feature is one trivial, universal feature. First, $DISABLE card tells the EMTP to treat all following data cards as if they

Rulebook ATP (junio 1996 - internet)

H01

17

were comment cards, until the following appearance of a $ENABLE card. This is a very handy feature for big blocks of comments, or for the temporary removal of components from a data case without actually throwing the records away (one might later want to restore them, and this allows easy remembrance). Any $INCLUDE file may contain $DISABLE and $ENABLE as a matched pair. Just be sure that $ENABLE always appears in the same disk file as the preceding $DISABLE. For an illustration, see BENCHMARK DC-17, which has $DISABLE and $ENABLE within DC17INC2.DAT, which is called by DC17INC1.DAT (in turn called by DC17.DAT). The $DISABLE/ENABLE feature is no longer actually in SUBROUTINE CIMAGE where it began. Instead, the cards to be discarded are ignored as they are first read from disk at the beginning of execution. Only the last card of the block will be retained, and this will be recreated to include a count of the total number of data cards (including both $DISABLE and $ENABLE) of the extraneous block. As an illustration, for BENCHMARK DC-17 this appears as follows: .literal C 1 2 3 4 5 6 7 C 34567890123456789012345678901234567890123456789012345678901234567890123456 C ------------------------------------------------|------------------------End of data to be ignored (implicit "C "). |$ENABLE, ONLY THIS ONE C ...ARD ENDING 5 CARDS OF $DISABLE/ENABLE IS RETAINED. Another illustration can be found in BENCHMARK DC-24: I-D-6.

$NEW EPSILN to alter miscellaneous data parameter EPSILN ----------------------------------------------------------

.el $NEW#EPSILN,#EPS##allows the user to redefine the floating-point miscellaneous data parameter EPSILN at any point of the input data. The new numerical value is "EPS" --a free-format, positive, floating-point constant. Consult Section II-B for general information about EPSILN. Interpretation of the $NEW#EPSILN request confirms both the old and the new value for the tolerance. The following illustration is from BENCHMARK DC-12: .literal C 1 2 3 4 5 6 7 C 34567890123456789012345678901234567890123456789012345678901234567890123456 C ------------------------------------------------|------------------------EPSILN change. Old, new = 1.000E-08 1.000E-09 |$NEW EPSILN, 1.E-9, { I-D-7.

$MONITOR

to display date and time on the computer monitor ----------------------------------------------------------

.el $MONITOR was originally designed to result in the display of this interpeted card image on the CRT monitor, which might be useful if the LUNIT6 output otherwise would be unseen (e.g., it might be sent to disk rather than to the computer CRT monitor). The result would be a single, 132-column line: 51 columns for the interpretation on the left, 1 columns for the vertical separator, and finally the 80-column card image (which begins with the request $MONITOR) on the right. Since the card in question usually should serve to mark some position of special importance (e.g., the final branch card), comment information to inform the user is appropriate. Any such arbitrary text can follow the in-line comment marker "{", of course. So much for the original use of $MONITOR, which was designed before the use of scientific workstations such as Apollo. For dedicated personal computers that have scrollable windows, there is seldom a good excuse for diverting the LUNIT6 output from the window in which the program is being executed. So, there was little use for the $-card. When the idea of a request for the wall-clock

18

Rulebook ATP (junio 1996 - internet)

H01

time came to mind, it was easy to switch to this more useful and different meaning. So, for Apollo and some other more modern computers, $MONITOR will still produce the 132-column line of the preceding paragraph, but this is just part of the regular LUNIT6 output. The card index for LUNT10 storage is displayed, as shown by the following illustration: .literal C 1 2 3 4 5 6 7 C 34567890123456789012345678901234567890123456789012345678901234567890123456 C ------------------------------------------------|------------------------Send time to CRT monitor. Card NUMDCD = 5492. |$MONITOR { Request t .el But there also is an extra such output that includes the date and the time in the interpretation, and this extra line goes to the CRT screen (Apollo window). An illustration follows: .literal C 1 2 3 4 5 6 7 C 34567890123456789012345678901234567890123456789012345678901234567890123456 C ------------------------------------------------|---------------------------- Monitor time = 10-Apr-86 14.10.30 |$MONITOR { Request t .el To observe such usage, see the solution to standard test case BENCHMARK DC-3 for the computer of interest. The preceding two examples were taken from the Apollo solution of this data. .LITERAL I-D-8. I-D-9.

$LISTOFF to cease outputing interpreted images of input cards $LISTON to resume outputing interpreted images of input cards ---------------------------------------------------------------

.el $LISTOFF/LISTON is another universal feature. First a $LISTOFF card tells the EMTP not to display and interpret data cards that follow. This continues until a following $LISTON card is encountered. The purpose of such use generally is to minimize the size of the output file by omitting the listing and interpretation of blocks of data that have been tested and used before. This is particularly advantageous for users of slow computer terminals, in order that solution speed not be inhibited by unneeded output (assuming that it goes to the terminal display). An illustration of such usage is provided by BENCHMARK DC-17. The interpretation is documented by the following two consecutive lines from the LUNIT6 output of the solution: .literal C 1 2 3 4 5 6 7 C 34567890123456789012345678901234567890123456789012345678901234567890123456 C ------------------------------------------------|------------------------Turn off input data listing at card 5505 |$LISTOFF, ----- Precedi Turn on input data listing at card 5508 |$LISTON .el Note that two card images, numbered 5506 and 5507 (indices of the EMTP card cache), are invisible in between the two that are seen in the solution. .literal I-D-10.

$VINTAGE to choose among alternate data formats ------------------------------------------------

.el $VINTAGE,#M allows the user to choose between old and new data formats on a component by component basis. Here integer constant "M" characterizes the age of the data (only 0 and 1 have meaning so far). Data options will be described later in the manual, along with the components that allow such a choice. Interpretation of the $VINTAGE request is simple enough. was drawn from the solution to BENCHMARK DCPRINT-3:

The following

Rulebook ATP (junio 1996 - internet)

H01

19

.literal C 1 2 3 4 5 6 7 C 34567890123456789012345678901234567890123456789012345678901234567890123456 C ------------------------------------------------|------------------------New MOLDAT = 1 (data vintage). |$VINTAGE, 1, { Switch fr I-D-11.

$STOP

to terminate the present solution ----------------------------------------

.el $STOP terminates the present "solution" as quickly as possible. But what exactly is meant by "solution" in this context? As this feature was originally conceived and implemented, the EMTP response to $STOP was the termination of program execution via an immediate, local FORTRAN STOP statement. So much for the original idea, which rapidly was modified to rely upon an installation-dependent module that serves this function: CALL STOPTP. Then a much bigger change came with the concept that EMTP execution should not be restricted to a single data file. Recall that one disk file (a collection of stacked EMTP data cases) after another can now be solved without execution ever terminating. This is for non-SPY usage, wherein execution begins with the opening prompt: .LITERAL EMTP begins. Send (SPY, file_name, DISK, HELP, GO, KEY) : .el When data of a disk file runs out (blank card ending the last EMTP data case), execution returns to this prompt. Well, this is the intended result of $STOP usage, too. Yet operation is necessarily less than perfect, depending upon where execution was when the card was read. All "CIMAGE" can do is set a flag (KILL = -9999) that will be looked for at various places in the program (e.g., the end of each overlay). Since there are hundreds of calls to the module, it is unrealistic to burden the program with a check after each call. So, there will be the hoped for reprompt if nothing illegal to the operating system (e.g., a numerical decode of the character string "$STOP") occurs before the flag is observed. For an example, see BENCHMARK DC-42, the second subcase of which uses $STOP after plot cards. There is no problem with recognition and recovery, it will be seen. Interpretation of the $STOP request is simple enough. The following was drawn from the solution to BENCHMARK DC-13: .literal C 1 2 3 4 5 6 7 C 34567890123456789012345678901234567890123456789012345678901234567890123456 C ------------------------------------------------|------------------------Halt execution: "CIMAGE" sets KILL = -9999. |$STOP { Illustrate im I-D-12.

$WATCH

to request extra, periodic output to CRT ------------------------------------------------

.el $WATCH,#M is used to define the frequency of special, extra output that always goes to the CRT monitor. This really only has meaning if the LUNIT6 output would otherwise be unseen (e.g., it might be sent to disk rather than to the computer CRT monitor). If "M" were 100, then every 100-th input data card would be shown on the CRT monitor. This periodic output is only 80-columns in width, and it begins with the LUNT10 index number, which leaves only 72 columns for the input card image (to the right of a colon). As an illustration, consider the solution to BENCHMARK DC-12, of which one of the more readily recognizable monotoring lines is the following: .literal C 1 2 3 4 5 6 7 C 34567890123456789012345678901234567890123456789012345678901234567890123456 C ------------------------------------------------|------------------------5602 :BLANK card ending branch cards .el

Rulebook ATP (junio 1996 - internet)

20

H01

Interpretation of the $WATCH request includes confirmation of the user-specified frequency "M". The following is an illustration drawn from BENCHMARK DC-12: .literal C 1 2 3 4 5 6 7 C 34567890123456789012345678901234567890123456789012345678901234567890123456 C ------------------------------------------------|------------------------Paint input data on screen, every 25 -th card. |$WATCH, 25, { Illustrate I-D-13.

$COMMENT

to toggle the suppression of comment cards ----------------------------------------------------

.el $COMMENT serves to toggle the binary flag that controls the interpreted output of comment cards among input data. Following the first appearance of such a card, comment cards will be discarded and not seen in the LUNIT6 file. A second such request card will return the control to its original state, so that subsequent comment cards will be interpreted and displayed. An example of such usage is provided by BENCHMARK DC-3. As for the interpretation, it confirms the new status of the binary flag: zero means that comment cards are seen, whereas unity means that comment cards are being suppressed. The first usage within BENCHMARK DC-3 is interpreted as follows: .literal C 1 2 3 4 5 6 7 C 34567890123456789012345678901234567890123456789012345678901234567890123456 C ------------------------------------------------|------------------------Toggle comment card destruction. New N11 = 1. |$COMMENT { I-D-14.

$DEBUG

for local control of diagnostic printout ------------------------------------------------

.el $DEBUG,#M is a request to redefine the current diagnostic printout control variable IPRSUP (see the integer miscellaneous data card of Section II-B) to value "M" (an integer constant most often in the range of 0 to 9). Confined to the UTPF overlay currently being executed, this allows redefinition of the DIAGNOSTIC printout level. But when the current UTPF overlay is exited, the effect of the $DEBUG definition is lost. Free-format is used for the ",#M" part, so imbedded blanks are optional here. Printout can be turned off later in the same UTPF overlay using "$DEBUG,#0" (remember that level zero implies none). Use of this $-card does not replace the "DIAGNOSTIC" special-request card of Section II-A (for diagnostic printout control overlay by overlay). In fact, this is why the $-card definition is local to the UTPF overlay in which it is read: because IPRSOV is used to reset IPRSUP every time a new overlay is begun. A somewhat artificial example of such usage is provided by BENCHMARK DCPRINT-5. The interpretation confirms the new value of diagnostic control, of course: .literal C 1 2 3 4 5 6 7 C 34567890123456789012345678901234567890123456789012345678901234567890123456 C ------------------------------------------------|------------------------New IPRSUP = 8 (DIAGNOSTIC value). |$DEBUG, 8, { Illustrativ I-D-15.

$UNITS

to alter

XOPT

and/or

COPT ------------------------------------

.el $UNITS,#XOPT,#COPT is used to change the two floating-point miscellaneous data parameters that specify the units of input inductance (millihenries vs. ohms) and capacitance (microfarads vs. micromhos). This allows different

Rulebook ATP (junio 1996 - internet)

H01

21

branches to have different such choices, and it modifies the initial choice that is read from the floating-point miscellaneous data card of Section II-B. Interpretation of the input data confirms the new values for parameters XOPT and COPT. An illustration is provided by BENCHMARK DC-11, from which the following line was taken: .literal C 1 2 3 4 5 6 7 C 34567890123456789012345678901234567890123456789012345678901234567890123456 C ------------------------------------------------|------------------------New XOPT, COPT = 1.59154943E-01 1.59154943E-07 |$UNITS, .1591549431, .15 I-D-16.

$PUNCH

to flush the buffer that holds punched cards ----------------------------------------------------

.el $PUNCH##is used to flush card images that have accumulated in the punched-card buffer (originally I/O channel number LUNIT7) since the last such usage, or since the last usage of $ERASE -which ever is the most recent. Because $PUNCH involves installation-dependent code, details could vary among different computers. Of course, punched cards have just about gone the way of the dinosaur, so the first question is about the disposition of the card images. Most systems will produce both a separate disk file and also a labeled display of the card images on LUNIT6. For details, consult the appropriate installation-dependent information in Section I-F, and look to established illustrations such as BENCHMARK DC-13. It should always be legal to follow the request by a disk file name that is separated from the preceding "$PUNCH" by a comma and an arbitrary number of blanks. See the illustration immediately below. But be aware that there is no guarantee that all computers will actually send the punched cards to that file. Most should, however. Interpretation of the $PUNCH request is simple enough. The following was drawn from the solution to BENCHMARK DC-13: .literal C 1 2 3 4 5 6 7 C 34567890123456789012345678901234567890123456789012345678901234567890123456 C ------------------------------------------------|------------------------Request for flushing of punch buffer. |$PUNCH, dc13a.pch .el Immediately after this will follow a listing of the card images being processed, below a 4-line heading that includes an 80-column ruler. The heading will appear as follows (truncated on the right): .literal A listing of 80-column card images now being flushed from punch buffer follo ============================================================================ 1234567890123456789012345678901234567890123456789012345678901234567890123456 ============================================================================ .el After the last card image, there will be a single bounding record to inform the user that card "punching" is done. This will appear as follows (truncated on the right): .literal =========< End of LUNIT7 punched cards as flushed by $PUNCH request >=== .el Rather than place the disk file name on the $PUNCH card itself, it should be possible for him to connect the file manually using a separate, preceding $OPEN statement. Should unusual file attributes be desired or required, this might be needed in exceptional cases. .literal I-D-17.

$ERASE

to initialize the buffer that holds punched cards ---------------------------------------------------------

Rulebook ATP (junio 1996 - internet)

22

H01

.el $ERASE##is used to destroy any card images that might be in the punch buffer at the time this request is encountered. A conservative strategy is to always include $ERASE at the start of data that is designed to result in punched cards, since it is not always clear what might be executed ahead of the data case of interest. Interpretation of the $ERASE request confirms the number of card images in the punch buffer at the time of usage. The following was drawn from the beginning of solution to BENCHMARK DC-13. Note that no punched cards existed at the beginning of execution: .literal C 1 2 3 4 5 6 7 C 34567890123456789012345678901234567890123456789012345678901234567890123456 C ------------------------------------------------|------------------------Erase all of 0 cards in the punch buffer. |$ERASE I-D-18.

$STARTUP

to re-read the

STARTUP file ---------------------------------------

.el $STARTUP,#file_name is used to read a STARTUP file (see Section I-E-2) immediately, at the instant of time the $-card is read. One or more spaces following the comma after "$STARTUP" are optional. The file name can be any complete, legal specification for the computer being used, not to exceed 32#characters. It is the name of the STARTUP disk file that is wanted at this point of program execution. There must not be a trailing comma (at the end of the file name). An illustration of $STARTUP usage is provided by the first and third subcases of standard test case BENCHMARK DC-37. The following interpretation was taken from the solution of the first subcase, which calls for revised parameters immediately before plotting: .literal C 1 2 3 4 5 6 7 C 34567890123456789012345678901234567890123456789012345678901234567890123456 C ------------------------------------------------|------------------------Reinitialize using this STARTUP file. |$STARTUP, DC37STARTUP.DAT I-D-19.

$KEY

to change card input from LUNT10 channel to keyboard ----------------------------------------------------------

.el $KEY##is used to provide keyboard input of EMTP data cards at some preselected location (the position of the $KEY request) of the program. Maybe when execution begins the user is unsure of some data, and he wants to supply that data later, based on initial program output. This is possible via $KEY, which can be used as often as desired. Each time $KEY is encountered, input will be switched from the normal card image storage of I/O unit LUNT10. Then input cards will be read from the keyboard until the user terminates such interactive input with "END", at which point input will be switched returned to the normal card image storage of LUNT10 at the record immediately following the $KEY request. In terms of card counting, keyboard input does not affect variable NUMDCD of the comment-card interpretation. In effect, keyboard input in extra input. Note that $KEY is for interactive use only. It either provides no assistance at all, or will not function properly, for batch-mode usage. Standard test cases do not illustrate such usage because, if it were added, then the case could not be properly executed in the batch mode. So, if the user wants an illustration, he must make his own. In any case, interpretation should appear as follows: .literal C 1 2 3 4 5 6 7

Rulebook ATP (junio 1996 - internet)

H01

23

C 34567890123456789012345678901234567890123456789012345678901234567890123456 C ------------------------------------------------|------------------------Data input next from keyboard (until "END"). |$KEY I-D-20.

$BREAK

to manually trigger a disaster-level SPY interrupt ----------------------------------------------------------

.el $BREAK##is similar to the preceding $KEY, only here the alternate input is changed to the SPY input channel rather than the keyboard. Of course, the two channels may be the same, for a crude, single-window implementation. But whether or not the input medium or channel is distinct, the destination of the input data is completely different. Whereas $KEY introduces normal EMTP data cards, $BREAK introduces SPY data. Time-sharing has automatically been disabled, so SPY input will continue until the user sends "GO". Of course, $BREAK can only be used with interactive execution (SPY), and this must be selected at the beginning of execution. $BREAK##is much more powerful than $KEY because SPY provides a new dimension of flexibility. For example, the user can modify any EMTP variable using DEPOSIT, and this includes the variable controlling $KEY usage. That is, if the user wants $KEY to be in effect when he leaves SPY with a subsequent "GO", he need only change the value of binary flag KEYBRD from zero to one. Since the disaster-level audible warning of SPY is used by the program in other circumstances, it is natural to employ it here, too. This alerts the user to the fact that the program is ready for interactive input. In the case of apollo, there will be the familiar audible tones of $HONK(10), which are terminated by a simple carriage return in the SPY window. After the last SPY input that is of interest to the user, "GO" will end the SPY input and return control to the batch-mode input that began the interactive operation. If the user wants to switch from SPY input to data card input, he need merely follow the $BREAK request by $KEY of the preceding subsection. They work well together as such an ordered pair. Note that $BREAK is for interactive use only. It either provides no assistance at all, or will not function properly, for batch-mode usage. Standard test cases do not illustrate such usage because, if it were added, the case then could not be properly executed in the batch mode. So, if the user wants an illustration, he must make his own. In any case, interpretation should appear as follows: .literal C 1 2 3 4 5 6 7 C 34567890123456789012345678901234567890123456789012345678901234567890123456 C ------------------------------------------------|------------------------Data input next from SPY (until SPY "GO"). |$BREAK I-D-21.

$INCLUDE

---

no longer within "CIMAGE" -----------------------------------------

.el $INCLUDE##is a very powerful and important command that once was honored by "CIMAGE". But since the advent of data modularization and sorting by class (see Section I-J), the original code of "CIMAGE" was removed. In its place, fortified and generalized service has been added at the beginning of program execution. So, if the original data had $INCLUDE usage, all of this will have been converted before "CIMAGE" is called for the first time. .literal

Ruleboob ATP (junio 1996 - internet)

H01e

1

I.E Computer-Dependent Aspects and Alternatives (General) The EMTP has been proven compatible with some two dozen distinctly different computer systems over the years, although at any one time, current program versions typically will be available only for those computer systems that are actively supported by important contacts. It is machine (computer) translation of a Universal Transients Program File (UTPF) that makes such portability possible. Conceived in November of 1974 (see Ref. 13), this procedure utilizes a different Editor/Translator (E/T) program for each different computer system of interest. An E/T machine translates the UTPF, converting it to legal EMTP FORTRAN for the particular installation of interest. This translation is done by program maintenance and hence should not be of concern to normal users. Just keep in mind that all EMTP code actually begins with the same master file (the UTPF), but differs according to the built-in or specially-requested properties of the translation. The need to update UTPF and computer specific code regularly can not be stressed enough. With this in mind, the writing of a common Rule Book for all different computer systems is just a little tricky. Numerical precision is a computer-dependent detail about which a good user should be aware. The precision of INTEGER values is not much of an issue, since all computers in recent years allow adequate precision for all values of interest. Floating-point representation in the form of REAL or COMPLEX variables is the only realistic concern, then. Today, most computers are byteorganized, and they allow REAL*8 and COMPLEX*16 representations, which provide about 15 or 16 decimal digits of precision. Problems of numerical roundoff that once were associated with 36-bit program versions for word machines such as Honeywell, DEC PDP-10 and SYSTEM20, and Univac have largely disappeared. Either such computers are no longer being used for the EMTP, or program versions have been converted to use DOUBLE PRECISION, which provides an enormous 72 bits of floating-point precision. The question of COMPLEX is trickier, since not all vendors allow precision equal to that of DOUBLE PRECISION for this case. Such is the case with Apollo, which was limited to 32 bits of precision up to operating system release SR9.7. From version SR10 onwards, also Apollo now has DOUBLE PRECISION COMPLEX. Fortunately, it is only the "CABLE CONSTANTS" calculation that was affected by this shortcoming. So, while most program users need not be concerned very much with computer precision, they should certainly be aware of what precision is being used. Disk file names are not defined by the ANSI FORTRAN 77 standard. Diskname, pathname, filename and file extension specifications may substantially vary from one system to the other. There are no general rules. Further, beware of the fact that some operating systems (e.g. UNIX, Aegis SR10.x) are case sensitive as far as file naming is of concern. Hence, all program features that rely on such usage (e.g., the "REPLOT" request, $INCLUDE, $PUNCH, etc.) may vary from one computer to another. Most such usage relies upon the FORTRAN OPEN/CLOSE statement, which may involve further variations, and which may not even exist in the intended, dynamic sense (e.g. IBM mainframe can only imitate dynamic opening). Installation-dependent information must be consulted for all such usage. Interactive execution, observation, and control ("SPY") is highly dependent upon the computer system in various ways, beginning with the display possibilities. If available, "windows" should be used for display, of course (see Apollo as an example). The keyboard interrupt will vary from computer to computer. SPY functions that are based on memory location (e.g., "EXAMINE" or "DEPOSIT") might have trouble for some computers. Etc.

Ruleboob ATP (junio 1996 - internet)

H01e

2

The environment for actually executing the EMTP depends upon the computer being used and also, sometimes, upon the mode of usage (thinking of the difference between "batch mode" and "demand service"). Operating systems will vary with manufacturer, except for the increasingly popular Unix that now is available (but not always used) for almost any computer. Hence, no details that are universal, and applicable to all computers, can be provided. Yet local experts should always be able to advise about such matters. There is another type of difference among program versions that can profitably be described in general terms, however. As summarized in Ref. 17, FORTRAN statements that are highly dependent on computer brand and/or installation usage have been isolated in installation-dependent EMTP modules, e.g. batch mode plotting, random numbers, intrinsic functions, ... If a given organization performs its own translation, such modules might be customized so as to satisfy its own peculiar needs, and Program Maintenance of that organization should thoroughly understand the thinking that is responsible for such changes. But what if an organization receives a FORTRAN copy of the EMTP from some other group? In this case, perhaps nothing will be known about installation-dependent decisions that might be made therein. In order to be able to change some of these decisions if need be, the user must know how to locate the installation-dependent modules of interest. The table of Section IE-1 summarizes such information. Still another aspect of installation-dependent variation is embodied in program "start up" files. For Apollo (and most systems that use this concept), the disk file names are STARTUP and STARTSPY. The idea is simple: rather than building installation-dependent choices into the EMTP FORTRAN, such installation-dependent parameters can be loaded as data at the start of the computer solution of each the data contained in each disk file. Details are provided in Section I-E-2 and I-E-3 (for STARTUP) and Section I-E-4 (for STARTSPY). Let us now start with an overview of the installation-dependent EMTP modules. I.E.1 Summary of Installation-Dependent EMTP Modules This description can be skipped by most program users. It only has limited importance to those who collaborate in program maintenance, as far as the UTPF code is available. The following list summarizes the function of all installation-dependent EMTP modules. Identification is both by module name and UTPF overlay number, in the order of appearance within the UTPF. Physical position is really only an issue for overlaid program versions, of course. Translators typically will connect proper system dependent modules during the translation. Then linkageediting will reference a single, extra file of such modules that is applicable to the computer of interest (e.g., UNIXPCMODS.FOR for AT&T's Unix PC). For a more detailed description of some of the simpler modules, consult comment statements of the UTPF (which contains Apollo copies of the modules), or consult *.RUM files (containing UTPF equivalents of system dependent routines). Modules of UTPF overlay named "MAIN00" and numbered "-1" "WINDOW" is used to open the second window for interactive (SPY) dialogue, and the third window for vector-graphic plotting. All SPY output passes through this routine as well. For workstations (e.g., Apollo or Sun) windows are involved. For other systems, separate terminals could conceivably be used. But

Ruleboob ATP (junio 1996 - internet)

H01e

3

most commonly, systems not providing windows will involve no opening, and SPY output will simply be sent to LUNIT6 (i.e. the first window). "TGRUNT" finds the current central processor and input/output job times using system library functions, C-language calls or assembler calls. Basically, this is used only for the elapsed-time printout of the case-summary statistics at the end of a solution. Communication is via the vector FLSTAT of "BLKCOM". "DATIME" finds the current date and wall-clock time using system library functions, C-language calls or assembler calls and returns both packed together as the 19-byte character string "dd-mon-yy hh.mm.ss". For the date, which comes first, "dd" and "yy" are two decimal digits for the day within a month, and the year, respectively. The "mon" are three letters indicating the month: the first 3 letters of the name, for English. The following time uses just digits, for hours, minutes, and seconds since midnight. Automatic PL4 plot file naming (for those systems having dynamic OPEN/CLOSE capability of FORTRAN) is based on such text. But of course, users are encouraged to specify a more meaningfull file name via the $OPEN-command. "CIMAGE" reads the next data card from I/O unit LUNT10 where all input card images are stored. The card is decoded as 80A1. There is a check for $cards, all of which are processed locally within "CIMAGE". Comment cards (leading C followed by blank and one text string of maximum 78 characters) are skipped. Note that, for some computer systems (LUNTEX=LUNT10), also the language font file BLOCKD51.BIN is stored on the same logical unit. Then, parameter LIMCRD (i.e. length of the LUNT10-buffer) can cause problems whenever one tries to load too long input data (or several input data, stacked one after the other). "ORIENT" is a module that is referenced only by the text-handling routine "TFLUSH". Control actually is transferred only if oriental-language (e.g., Japanese or Chinese) text is involved in the language font file BLOCKD51.BIN (STARTUP file, card 18, first field). Variable JORIEN of the STARTUP file (card 14, variable 8) either enables or prohibits use of the module: If zero, the module is never called, whereas unity will use the module for both input and output. For Europeans, this routine is without importance : JORIEN always should be zero. "LOCINT" finds the address in memory of the argument, as a number of INTEGER words (total bytes divided by the length of a program INTEGER in bytes). This is used by the EMTP to find the size of certain fixed-dimension arrays of the program (not all code is variably-dimensioned). The memory address can be found, either using a system library function, a C-language call or an assembler call. "RFUNL1" satisfies all library functions of a single, REAL argument using ENTRY points for the numerous functions of interest. Neutral names are used (e.g., "SINZ" is used in place of the usual "SIN" or "DSIN" ). Special limit checking may be placed in the module, to protect against trouble with the operating system (e.g. pixel resolution conversion for Apollo). In addition, the top of the module, before the first ENTRY point, connects the STARTUP file (for program initialization in universal SUBROUTINE RSTART). Remark that the connection to file STARTUP is computer-dependent, whereas reading the STARTUP file is general (even though the STARTUP file can contain computer dependent data). "CEXPZ" satisfies all COMPLEX library functions of a single, COMPLEX input argument. Using complex numbers is system dependent ; some systems only have COMPLEX*8, others have COMPLEX*16 too. ENTRY points are used for the second and later of all such library functions.

Ruleboob ATP (junio 1996 - internet)

H01e

4

"ATAN2Z" satisfies all REAL library functions of two REAL input arguments. ENTRY points are used for the second and later of all such library functions. The former module name was the otherwise-unused "RFUNL2". "CMPLXZ" satisfies all COMPLEX library functions of two REAL input arguments. ENTRY points are used for the second and later of all such library functions. "AIMAGZ" satisfies all REAL library functions of a single COMPLEX input argument. ENTRY points are used for the second and later of all such library functions. The former module name was the otherwise-unused "RFUNL3". "DLIBRF" provides all DOUBLE PRECISION library functions of a single DOUBLE PRECISION input. Usage began just for overlay 13, for the Semlyen recursive convolution code of that overlay. A SUBROUTINE, not a FUNCTION module, is involved (i.e., the output is carried as a second argument). "DLIBR2" provides all DOUBLE PRECISION library functions of two DOUBLE PRECISION inputs. Usage is by "SEMLYEN SETUP". A SUBROUTINE, not a FUNCTION module, is involved (i.e., the output is carried as a third argument). Modules of UTPF overlay named "ROOT10" and numbered "0" "TAPSAV" is used to dump and/or restore COMMON blocks of UTPF deck "LABCOM" between working memory and auxilairy storage. The auxiliary storage is usually disk, but could be extra RAM. With virtual memory management, the programmer may think he is using RAM, but in fact the operating system is using disk. In any case, the UTPF module assumes that COMMON blocks are stored in RAM memory in order, and can be transferred by means of a single READ/WRITE execution based on LOCINT values of the beginning and the end. The UTPF contains a module that is correct for DEC VAX/VMS, not for Apollo Aegis (as would be expected). Apollo is one of several computers that do not order COMMON blocks regularly. In case of Apollo, the remedy was to produce a fortified variable-dimensioning program "VARDIM" which in turn produces a "TAPSAV" module that dumps or restores each common block individually. "PLTFIL" provides installation-dependent transfer of the output vector to disk or memory as part of plot-file building. If results go do disk, it is via I/O channel LUNIT4. The conversion to single-precision (assuming EMTP computation uses double this precision) is a common function, in order to save disk space and I/O time. Interactive program versions service the ROLLing "PLOT" command of SPY in this routine, too. "VECRSV" and "VECISV" provide for the dumping and restoring of isolated vectors during the steady-state phasor solution and node renumbering of UTPF overlays 6-11. The first is for REAL vectors, whereas the second is for INTEGERs. UTPF (Apollo) code may not be usable by computers with overlaying because it stores vectors in the working space of UTPF overlay 20 (i.e., in /C20B01/ of "DECK20"). Modules of UTPF overlay named "OVER1" and numbered "1" "SYSDEP" performs various system-dependent initializations at the start of execution of a new EMTP data case, before the first data card is read. The former "MIDOV1" can be built in as an ENTRY point if needed (no such use for Apollo, though). Once a major module, much of the original size was lost when the concept of the STARTUP file was adopted. File OPEN and CLOSE operations are the most conspicuous remaining function.

Ruleboob ATP (junio 1996 - internet)

H01e

5

Modules of UTPF overlay named "OVER16" and numbered "16" "YSERLC" is universal source code, but it is used only by SPY. Since SPY is computer-dependent, some program versions will not have "YSERLC". "ANALYT" provides for user-defined sources in case of "ANALYTIC SOURCES USAGE". Also, the SPY code uses this module to service any "RAMP" requests at each time step. Modules of UTPF overlay named "ROOT20" and numbered "28" This is the only section of source code that can be forwarded to all program users. It allows the user to support just any graphical library. Overlay 20 includes batch-mode EMTP plotting that is accessed by overlay number NCHAIN = 28. Although the character mode of such plotting is universal, the vector-graphic mode is highly dependent upon the plotting interface that is used. The UTPF contains Apollo modules, which allow both screen plotting (with reliance upon Apollo Graphics Primitives or GPR) and also Benson plotting. However, the Benson (or CalComp-like) subroutines are proprietary, and can not be distributed along with any EMTP version. Such plotting routines must be acquired and appended at linkage-editing time by the user. In the UTPF module, dummy ENTRY points for all of the real Benson externals of the previous paragraph have been added, so that Apollo users without such Benson pen plotters will have a "clean" BINDing (linkage-editing). If Benson pen plotting is to be used, such externals must be removed, of course. Other interfaces have been developed too: Postscript, HPGL, CalComp, GKS, CGI, GDDM, PLOT10, X-WINDOWS. Please contact LEC for more details. "BEGPLT" is called by the principal plotting module "SUBR28" before any vector-graphic plotting is done, for each data case. Arbitrary system-dependent initialization is possible. "ENDPLT" is called by the principal plotting module "SUBR28" after all plotting of a given data case is completed. Arbitrary system-dependent termination (e.g., CalComp buffer flushing) is possible. "PLOTXX", "NEWPXX", "SYMBXX", "FACTXX", "SCALEX", "LINEXX", "NUMBXX", "AXISXX", and "GRIDXX" are vector plotting modules with neutral names; they provide functions comparable to those of the CalComp plotting modules "PLOT", "NEWPEN", "SYMBOL", "FACTOR", "SCALE", "LINE", "NUMBER", "AXIS", and "GRID", respectively. The UTPF modules involve calls to Apollo Graphics Primitives or GPR, as previously mentioned. At the bottom is the optional call to Benson plotting, as verified by Dipl. Ing. Bernd Stein of FGH in Mannheim, West Germany. "ADVANZ" exists in the UTPF only because flat-bed plotters that require the rolling of paper over a stationary bed once were used. It dates to 1979 and earlier, when such an EAI plotter was used with BPA's CDC-6500 computer. Yet Apollo has no such usage, and the call to this routine was commented out in the UTPF during 1988.

Ruleboob ATP (junio 1996 - internet)

H01e

6

Modules of UTPF overlay named "OVER21" and numbered "21" "FLAGER" is a SPY utility that checks for user-keyed data since the last such service. Execution may hibernate within the module until the user sends new data. "HONKER" is a SPY utility which issues an audible alarm (i.e., it rings the bell of the terminal or monitor being used). "APPEND" services the "APPEND" command of SPY. It is mostly universal, but is installation-dependent due to the reliance upon common event flags and interprocess communication. "PROMPT" is used to output SPY prompts. It dumps the 80-byte character string PROM80 in the SPY window, while holding the position of the cursor (if possible) ready for a user-keyed response immediately to the right of the prompt. In some way, following routines are a duplication of efforts already made to include batch mode plotting. Similar, interfacing routines could service both batch mode as well as SPY plotting. But the efforts made by LEC to reduce and standardize the number of graphical routines never was accepted by program development. "VECPLT" produces vector-graphic plots for the "PLOT" command of SPY. The Apollo module of the UTPF is installation-dependent because it uses the Apollo Graphics Primitives to paint the screen. Other translations use GKS, Core, and X-WINDOW graphics. "SYMTEK" is called by the immediately-preceding "VECPLT" to output an identifying symbol at specified coordinates of a vector plot of SPY. For most systems, the letters "A", "B", etc. are used to so identify curves, for simplicity. "CHRSIZ" is called by the preceding "VECPLT" to change the size of subsequent character output on a vector plot. It is not used for Apollo, but certainly would be for Tektronix PLOT10. "TGRID" is called by the preceding "VECPLT" to apply a rectangular grid to a vector plot of SPY. I.E.2 STARTUP Disk File for Program Initialization The disk file that will be used by all computer systems to initialize installation-dependent variables at the beginning of a solution of a new data case is the STARTUP file. Possibly the name will be different for some computers or installations, since the installation-dependent FUNCTION RFUNL1 connects this. In any case, a representative sample of STARTUP for Apollo is shown immediately below.

Ruleboob ATP (junio 1996 - internet)

H01e

7

1 RHIGH EPSZNO EPWARN EPSTOP EPSUBA EPDGEL EPOMEG SZPLT SZBED TENFAC 1.D+10 1.D-8 1.D-3 0.1 100. 1.D-16 1.D-15 10.0 72.0 10. 2 SIGMAX TENERG DEGMIN DEGMAX ZNOLIM(1), (2) STATFR ZNVREF XMAXMX AINCR 4.0 1.D+20 0.0 360. 1.0 1.5 60.0 1.E-6 2.0 .05 3 FREQFR HLETT1 Unused VHS VS VH TAXISL VAXISL FILL1 FILL2 60. .12 8.0 1.0 10. 5.0 4.0 1.0 1.0 4 TOLRCE FHTAX FXSUP FYSUP FXTIT FYTIT VPLOTS VPLOTL VPLOTH FTCARR 8.E-5 0.5 0.3 -0.03 0.10 0.15 1.0 5.0 6.0 1.0 5 FXNUMV FXNUMH FVAXTT FXVERT TIMULT TIMTAC OVRLAP FLZERO EPSILN FLTINF 1.5 5.0 -7.5 0.0 1.0 0.0 0.0 1.D-12 1.D-8 1.D+19 6 XHEADM YHEADM HGTHDM XCASTI YCASTI HGTCST XLEGND YLEGND HGTLGN PIXPUN 2.5 8.75 0.2 0.5 8.0 .12 0.5 1.75 .12 80 7 XALPHA YALPHA HGTALF D4FACT PEKEXP EPSLRT EPSPIV PLMARK FACOSC 1.5 0.0 .12 1.0 43. 1.E-12 1.E-16 1.0 0.3 8 NMAUTO INTINF KOL132 MUNIT5 MAXZNO IPRSPY IPRSUP LNPIN MINHAR MAXHAR 1 9999999 132 5 50 0 0 6 0 9 9 NFORS2 NIOMAX MRGN LINLIM MPAGE MODE28 KPGRID KPEN(1) KPEN(2) KPEN(3) 10 10 2 100 0 1 0 1 1 1 10 ..(4) KOMLEV NSMTH MODSCR KOLALP MAXFLG LIMCRD LCHSUP LCHTIT LCHXAX 1 -1 50 2 5 1 4000 1 2 0 1 LCHYAX NXINCH NYINCH NXOFF NYOFF NSMPLT KOLWID KOLSEP JCOLU1 KSLOWR 0 74 68 100 40 50 11 1 0 5 2 KSYMBL NOBACK KOLEXM LTEK NCUT1 NCUT2 INCHPX INCHPY LCHFIL LCHLIM 200 1 60 1 1 1 2 2 0 0 13 NXID6 NYID6 MAXSYM IHS LIMCOL KLEVL KEXTR NXMAX NYMAX IZGR1 10 330 3 3 79 0 0 511 430 0 14 IZGR2 LTIC NXVERN LRLIM KASEND LUNDAT KTRPL4 JORIEN LIMPNL LUNTEX 0 7 30 75 5 3 0 0 200 11 5 KINSEN LISTON LIMTAC NOCALC MFLUSH L4BYTE KOMPAR 1 0 25 0 1000 0 1 6 LUNIT1 LUNIT2 LUNIT3 LUNIT4 LUNIT5 LUNIT6 LUNIT7 LUNIT8 LUNIT9 LUNT10 1 2 3 -4 5 6 7 8 9 10 17 KS(1) KS(2) KS(3) KS(4) KP(1) KP(2) KP(3) KP(4) 1 1 502 500 1 513 502 500 18 Name of language text file ] Window] SPY @K file name ] Central Monte file] /wsm/blockd51.bin junk inclspy .dat //b/wsm/parallel.lis 9 SSONLY CHEFLD TEXNAM CHVBAR BRANCH TXCOPY USERID -TRASH -TERRA CHRCOM PHASOR E DUM | NAME COPY WSMTHL ...... TERRA C {}$, 0 DATTYP LISTYP PCHTYP PL4TYP EFIELD FMTPL4 -BLANK .dat .lis .pch .pl4 10E8.0 Remark that each data card with meaningful numbers is (and must always be) preceded by a comment card, upon which the card number and variable names can conveniently be remembered. There are a total of 20 cards, beginning with seven cards of floating-point values (read as 10E8.0 data), followed by ten cards of integers (cards 8-17, read as 10I8 data), followed by one card of variablelength text, terminated by two cards of ALPHANUMERIC text (A6 names). Before giving a short description of the meaning of all parameters of the STARTUP file, one key item should be clear to all users: the meaning of the variables can (and will be) highly computer/system dependent. This is especially true for those parameters that are related to graphics (be it batch mode or SPY plotting). But also file names and file extensions might depend on the operating system being used. Regardless of what definitions may follow in words on the pages to follow, the computer code will do what it wants. The screen pixel values provide a good example. When the STARTUP file first was conceived, Apollo had a single standard, monochrome, resolution of 800 by 1024 pixels. Then, during late 1986,

Ruleboob ATP (junio 1996 - internet)

H01e

8

the new DN3000 offered a higher resolution of 1024 by 1280 pixels. Many Apollo networks (including LEC's) involve mixtures of such hardware. Rather than have two different STARTUP files (which would be logical, cfr. EGA, VGA on PC386), it was decided during October of 1988 that Apollo users would continue to use the old pixel values in the STARTUP file, but that installation-dependent code of "RFUNL1" would modify these "appropriately" should a high-resolution monitor be installed. This might not be the optimal solution (it even could lead to confusion), but this is the way program maintenance tried to get rid of pixel problems. Another example is for the GEOGRAF software used with the MS-DOS version: all pixel values are ignored since a CalComp-compatible interface is used for all vector-graphics. To conclude, any specific computer can easily modify or ignore pixel-related data. At the same time it is agreed that this might not be transparant to the users. Furthermore, the STARTUP file is continuously extended. The most serious drawback of this growth is that parameters for different applications are mixed. To circumvent this drawback from the user's point of view, section I-E-3 will list all relevant parameters, ordered per topic of interest (e.g. batch mode plotting, SPY plotting, tolerances, STATISTICS, etc.). Anyway, let us discuss the data cards one by one now. Card 1. 1st Miscellaneous Floating-point Numbers -------------------------------------------------------------------------------1 RHIGH EPSZNO EPWARN EPSTOP EPSUBA EPDGEL EPOMEG SZPLT SZBED TENFAC 1.D+10 1.D-8 1.D-3 0.1 100. 1.D-16 1.D-15 10.0 72.0 10. -------------------------------------------------------------------------------Parameters: RHIGH: a near-infinite value of resistance. The program may add such resistance internally, for reasons of connectivity (e.g., in parallel with the Type-99 pseudo-nonlinear resistance element). It should be low enough so as to be legal, yet high enough so that no numerical problems (e.g., overflow) result. The reciprocal of 100 times FLZERO (see card 5, variable 8) is commonly used. EPSZNO: Convergence tolerance for the Newton ZnO iteration. This is just a default value. It can be redefined by a "ZINC OXIDE" request (see section II-A39). EPWARN: Nonfatal warning tolerance .. Newton ZnO iteration. This is just a default value. It can be redefined by a "ZINC OXIDE" request (see section II-A39). EPSTOP: Fatal error tolerance for the Newton ZnO iteration. This is just a default value. It can be redefined by a "ZINC OXIDE" request (see section II-A39). EPSUBA: Normalized damping index Rp/(2*L/DT) for the Type-59 S.M. This is just a default value. It can possibly be redefined by a Class 2 S.M. "TOLERANCES" request of Chapter VIII. EPDGEL: Warning convergence tolerance for the Type-59 S.M. This is just a default value. It can possibly be redefined by a Class 2 S.M. "TOLERANCES" request of Chapter VIII. EPOMEG: Fatal error tolerance for the Type-59 S.M. This is just a default value. It can possibly be redefined by a Class 2 S.M. "TOLERANCES" request of Chapter VIII.

Ruleboob ATP (junio 1996 - internet)

H01e

9

SZPLT: height of the plotter paper, in [inches], for the batch-mode vector plotting. This is the parameter that can be changed by means of a "PLOTTER PAPER HEIGHT" request (see Chapter XIV). SZBED: the limiting plot length in [inches], for the batch-mode vector plotting. This was originally used for flat-bed plotters (mnemonically, "size of bed"), which had a clear maximum. It now can be used to place graphs in a more economical way above or next to a previous plot (see Chapter XIV). TENFAC: a temporary variable that is used to multiply FLZERO (see number 8 on card 5), to produce a larger near-zero tolerance TENFLZ. Naming comes from the fact that the fixed value 10.0 was used for this factor at one time.

Ruleboob ATP (junio 1996 - internet)

H01e

10

Card 2. 2nd Miscellaneous Floating-point Numbers -------------------------------------------------------------------------------2 SIGMAX TENERG DEGMIN DEGMAX ZNOLIM(1), (2) STATFR ZNVREF XMAXMX AINCR 4.0 1.D+20 0.0 360. 1.0 1.5 60.0 1.E-6 2.0 .05 -------------------------------------------------------------------------------Parameters: SIGMAX: Indirect measure for the probability for negative switch opening/closing times for STATISTICAL switches following a Gaussian (not uniform) distribution law (see section VI.B.1). For Gaussian distributions, SIGMAX*σ is the point at which the "tails" of the distribution will be truncated, for purposes of calculating the random switching times. The value of 4.0 has been used for years without complaint. Then, the probability for negative switch opening/closing times is smaller than 0.005%. TENERG: the time (in seconds) for table dumping of Monte Carlo simulations. * Why table dumping ? Recall that by definition, results for every energization are identical, up to the moment of the first random event. Hence, in order to speed up calculations for each energization, it would be a good idea to store the deterministic situation that exists prior to the first random event. Because of the probabilistic nature of a Monte Carlo simulation, the exact moment of the first random event is not known a priori. But based on statistical theory, the probability is very low ( Save the points, but ignore any batch-mode plot cards that might be present. 2 ===> Save the points, and also honor any batch-mode plot cards that might be present. For most computers, the disk file in question will be internally named based on the date and time of day when the simulation began. See the plot file heading for such details. Such details are controlled by installation-dependent SUBROUTINE SYSDEP, so it is not possible to be much more specific. See details for the computer of interest. NENERG is to be left blank (or zero) for single, deterministic simulations. But for "STATISTICS" or "SYSTEMATIC" data cases, this is to be the total number of energizations (exclusive of any possible, extra, base-case solution). Append a minus sign if "SYSTEMATIC" usage is involved --- a flag to distinguish such a case from Monte Carlo studies. Also, remember that an extra "STATISTICS" or "SYSTEMATIC" miscellaneous data card (Section II-C-1) must follow. IPRSUP is normally left blank or zero. If keyed as a positive value, this is the diagnostic printout control that is to be applied to all UTPF overlays. The same result can be obtained via parameter IPRSUP in the STARTUP file. But since the user normally will want to selectively control such output overlay by overlay, he should instead use the "DIAGNOSTIC" special-request card (see section II-A-12). Interpretation of the just-described floating-point and integer miscellaneous data cards confirms only the first three floating-point parameters, but all integer parameters. As an illustration, consider the two associated output lines of BENCHMARK DC-4: C 1 2 3 4 5 6 7 C 34567890123456789012345678901234567890123456789012345678901234567890123456 C ------------------------------------------------|------------------------Misc. data. 1.000E-02 6.000E+00 0.000E+00 | .010 6.0 Misc. data. 1 1 1 1 1 -1 0 0 0 0 | 1 1 1

4

Rulebook ATP *junio 1996 - internet)

H02c

1

II-C. Specially-Requested Extensions to Miscellaneous Data Cards Two of the just-described integer miscellaneous data parameters (see section II-B) can require the input of additional, supplemental extensions that are to immediately follow the integer miscellaneous data cards. If none or only one is used, there is no question of ordering. But if both extensions are required, then these must be appended in the order of presentation, with the "STATISTICS/SYSTEMATIC" card (Section II-C-1 to II-C-3) preceding the card that controls the output frequency (Section II-C-4). "STATISTICS" Miscellaneous Data Card for Actual Simulation If and only if NENERG (cols. 65-72) of the integer miscellaneous data card is positive (i.e. flag for STATISTICS studies, see section VI.B.1), then the following additional card, called the "STATISTICS" miscellaneous data card, is required:

77 Parameters: ISW determines whether there is to be printed output of all the variable switch closing/opening times, for each of the NENERG energizations. Zero will suppress such output, whereas unity will provide it. For the special case where "4444" is keyed in columns 5-8, please refer to section II-C-3, describing the special feature of DICE TESTING. ITEST controls whether an extra random delay, calculated using the parameters DEGMIN, DEGMAX, and STATFR (see STARTUP file), is to be added to randomly-generated switching times for each energization. A zero or blank means that there will be such an addition for all random switches; the value "1" means that there will be no such addition for any random switch; the value "2" means that such an addition will be made only to random closing (not opening) times; a value "3" means that such an addition will be made only to random opening (not closing) times. For details on these different switch types, we refer to section VI.B. IDIST chooses between the two types of dice (distribution laws) that are available. A zero or blank value means that all randomly-generated switching times are to have Gaussian (normal) distribution, whereas a value of unity means that a uniform distribution is to be used instead. Note that this is NOT applicable to the extra random delay (see ITEST parameter), which is assumed always to follow a uniform distribution.

Rulebook ATP *junio 1996 - internet)

H02c

IMAX will normally be left blank or keyed as zero. It is to be keyed with "1" if the user wants additional printout of deterministic extrema for each energization. The extrema in question are those normally seen at the end of a conventional, single simulation that has integer miscellaneous data parameter MAXOUT equal to unity. Such output has maxima, times of maxima, minima, and times of minima --- all extra output (an addition to, rather than a replacement for, the normal output for each energization). IDICE controls whether or not standard random numbers (that vary neither with time nor with manufacturer of the computer) are to be used. The value "1" will give such standard random numbers, whereas a blank or zero will result in the use of computer-dependent dice, if such separate dice have been provided. Specifics will depend upon the installation-dependent logic of ENTRY RANDNZ of "RFUNL1". For reasons of repeatability and universality, standard test cases such as BENCHMARK DC-24, DC-40, DC-48, DC-50, and DCPRINT-13 all use IDICE = 1. KSTOUT controls whether or not each energization is to have added printout that normally is associated only with a conventional, single simulation. Included are output of the time-step loop, and variable extrema (if integer miscellaneous data parameter MAXOUT is positive). The scalar extrema of "PEAK VOLTAGE MONITOR" also will be honored, if it has been declared. Such extra output is in addition to the regular, minimum program output of STATISTICS/SYSTEMATIC simulations. Since any such special output is repeated for each energization, the user should be careful in its use. To obtain such extra output for each energization, key a zero explicitely. A blank or minus one ("-1") will suppress such extra output. KNTRPT is normally left blank or zero. If keyed with a nonzero integer, it is taken to be the energization number KNT that is to be repeated (mnemonically, "count repeat"). This only has meaning for "START AGAIN" usage, where execution begins with the Monte Carlo history (including energization number KNTRPT) already stored in memory. In case two or more sets of Monte Carlo history have been loaded (the first by "START AGAIN" and the second or later set by "LOAD MORE SHOTS"), numbering of the energizations is cumulative, in the order the files were loaded. Of course, KNTRPT must be positive and not larger than the total number of loaded energizations. Following the "TIME STEP LOOP" request, the user will see the heading of variable names followed by time-step loop printout (assuming he requested this with KSTOUT = 0). Following such output, the memory of Monte Carlo usage is erased, so batch-mode plotting (not yet operational) will complete the data case. For an illustion, see the 4th data subcase of BENCHMARK DC-40. NSEED controls whether or not a Monte Carlo simulation is repeatable, should it ever be rerun using the same computer. A blank or zero means that that every solution will be different (i.e., no repeatability), whereas unity will result in identical answers every time the data case is solved on the computer of interest. At issue is the seed of the random number generating algorithm. Normally (for blank or zero in cols. 73-80), this depends on the time of day. But for repeatability (value unity), a constant seed is used.

2

Rulebook ATP *junio 1996 - internet)

H02c

3

Monte Carlo studies are important enough, and tricky enough, so that each should be solved separately using a separate disk file. The stacking of two or more data cases, of which one is a Monte Carlo study, is not recommended. But for those who believe in living dangerously by stacking two or more Monte Carlo studies within a single disk file, remember to use $STARTUP at the beginning of the second or later of these. This is needed to reinitialize the critical tabledumping control TENERG. Let the 2nd subcase of BENCHMARK DC-24 serve as an example in this regard. Interpretation of the previously-described "STATISTICS" miscellaneous data card confirms only the first six parameters. As an illustration, consider the associated output of BENCHMARK DC-24: C 1 2 3 4 5 6 7 C 34567890123456789012345678901234567890123456789012345678901234567890123456 C ------------------------------------------------|------------------------Statistics data. 1 1 0 0 1 0 | 1 1 0 "SYSTEMATIC" Miscellaneous Data Card If and only if NENERG (cols. 65-72) of the integer miscellaneous data card is negative (i.e. flag for SYSTEMATIC studies, see section VI.B.2), then the following additional card, called the "SYSTEMATIC" miscellaneous data card, is required:

78 Parameters: ISW : Same as for preceding "STATISTICS" use. ITEST controls whether switch times to be specified on columns 15-24 of the SYSTEMATIC switch card are to be Tbeg or Tmid (see section VI.B.2). Use blank or zero if Tmid is to be used,or unity if Tbeg is to be specified. IMAX : Same as for preceding "STATISTICS" use. KSTOUT : Same as for preceding "STATISTICS" use. Interpretation of the just-described "SYSTEMATIC" miscellaneous data card is in fact identical to that for "STATISTICS". As an illustration, consider the associated output of BENCHMARK DC-16:

Rulebook ATP *junio 1996 - internet)

H02c

C 1 2 3 4 5 6 7 C 34567890123456789012345678901234567890123456789012345678901234567890123456 C ------------------------------------------------|------------------------Statistics data. 1 1 0 0 0 0 | 1 1 { I "STATISTICS"

Miscellaneous Data Card for Dice Testing

It is possible to test a random number generator without actually performing the simulations that normally would depend upon the random number generator. If and only if NENERG (cols. 65-72) of the integer miscellaneous data card is positive, and if cols. 5-8 of the "STATISTICS" miscellaneous data card (i.e., variable ISW) are keyed with "4444", then only a test of random numbers is desired. For such usage, the extra card following the integer miscellaneous data card has the following format, as a simpler version of the original card of Section II-C-1:

79 ISW : The "4444" is a request for dice testing. ITEST gives the number of points per standard deviation of the tabulations that are to result. A zero is given the default value of 2.0 (meaning 8 entries on either side of the mean, if SIGMAX = 4.0 in the STARTUP file). IDICE : The same as for Section II-C-1 above. NSEED : The same as for Section II-C-1 above. Concerning the rest of the data case, it should be legal card ending switch cards. Only the switch cards are branch cards are arbitary as long as no error results cards are read. Finally, there should be a "BEGIN NEW the bottom, since this will be searched for just as following an EMTP error message.

through the blank actually used, so before the switch DATA CASE" card at would be the case

Switching times will be generated for each of the NENERG imaginary energizations (in fact, program control never leaves overlay 12). There then will be a tabulation for each pair of Gaussian switches. Recall that if the closing time for each of two switches has Gaussian (normal) distribution, then so does the difference of these two. The mean of the difference will be the

4

Rulebook ATP *junio 1996 - internet)

H02c

5

difference of the means, whereas the variance of the difference will be the sum of the two variances. For M Gaussian switches, there will be M*(M-1)/2 such pairs of switches. For each pair , there will be one tabulated output showing both the experimental and the theoretical cumulative distribution functions. See BENCHMARK DC-50 for an example. The just-described tabulation only applies to two switches having Gaussian switching times. If one of the switches is deterministic, or if one is random but uniformly-distributed, then the tabulation is skipped. There is no new interpretation for the miscellaneous data card of dice testing. Refer to the preceding Sections II-C-2 or II-C-3 for illustrations. Change of Frequency of the Time-Step Loop Printout The frequency of LUNIT6 printout within the time-step loop is nominally controlled by integer miscellaneous data parameter IOUT of Section II-B. But this frequency can be varied as the simulation time advances. One way has already been documented in Section II-A: use of a "CHANGE PRINTOUT FREQUENCY" request. Another is to key integer miscellaneous data parameter IPUN (cols. 4148) as "-1", and append the following card:

80 This card specifies at which time steps the printout frequency is to be changed, and to what values the frequency is to be changed. Up to five pairs of these (KCHG, MULT) controls are permitted. The meaning is as follows:

KCHG(K): The time step number at which the K-th variation of printout frequency is to begin. Printout for this particular step number is always provided, as a beginning to the new frequency of output. MULT(K): The modified value of IOUT (see 2nd miscellaneous data card) that takes effect at time step KCHG(K). If a minus sign is appended to MULT(K), then at the corresponding step number KCHG(J), the diagnostic printout status will be changed. That is, there will be a switching of the two sets of diagnostic printout controls: 1. IPRSOV(16:19)

of Section II-A-12 (a

"DIAGNOSTIC"

request);

Rulebook ATP *junio 1996 - internet)

2. IPR(1:4)

H02c

of Section II-A-3 ("ALTERNATE DIAGNOSTIC PRINTOUT").

If there is no minus sign, there will be no change in status of the diagnostic printout at the associated time step. Any minus signs are merely extra flags. The absolute value of MULT still controls the production (nondiagnostic) printout frequency as originally described. Interpretation of the just-described printout control card confirms only the first three pairs of numbers. As an illustration, consider the associated output of BENCHMARK DC-16: C 1 2 3 4 5 6 7 C 34567890123456789012345678901234567890123456789012345678901234567890123456 C ------------------------------------------------|------------------------Printout : 5 5 20 20 0 0 | 5 5 20

6

Rulebook ATP *junio 1996 - internet)

H04

1

IV LINEAR BRANCH CARDS Introduction What are branch cards Branch cards are cards where one can define different kinds of branches. Distinction should be made between linear and non-linear branches. The non-linear branches will be discussed in more detail in chapter V. Following types of linear branches will be discussed in this chapter: - uncoupled, lumped, series R-L-C (type 0) - mutually-coupled, lumped R-L-C elements (type 1,2,3,...) * single phase PI-circuit * multiphase PI-circuit - mutually-coupled, lumped R-L elements (type 51,52,53,...) - distributed-parameter elements with constant transformation (type -1,-2,-3,...) * constant-parameter line models (distortionless or lumped resistance or exact PI) transposed = Clarke model untransposed = K.C.Lee model * double-circuit constant-parameter line models * frequency dependent line model (JMARTI) * recursive-convolution line model (SEMLYEN)

matrix

- saturable transformer component - cascaded PI feature (steady state only) - phasor branch [Y] input (steady state only) For all lumped elements, a normal precision as well as an high-precision format exist. This will be explained on relevant places. For all mutually coupled, lumped elements, both an RL as well as an AR notation exist. This will be explained on relevant places. For most of the above branch types, there are supporting routines available which can be used to generate the necessary data in the proper input format. Wherever appropriate, reference will be made to relevant supporting routines. Where are the branch cards situated on the input file structure As explained in section I-I (Structure of EMTP input data), the branch cards always precede the switch card grouping. This means that branch cards have to follow either the miscellaneous data cards (when no TACS HYBRID is active) or the TACS card grouping (whenever TACS HYBRID is in use). Recall that both linear as well as non-linear branch cards belong to the branch card group. They can be put in any arbitrary order. Do not forget to terminate the grouping of branch cards by a blank card or a card containing the text "BLANK card ending BRANCH cards" This text should start in column 1. Both BLANK and BRANCH should be in capitals. All the remaining text can be in mixed mode (lower case or capitals). This will be of particular importance when using "DATA BASE MODULE" punched card results. Different formats

Rulebook ATP *junio 1996 - internet)

H04

The "$VINTAGE, 1"-card, which is honoured by most computer systems, provides for an alternate high-precision format. Specifically the R, L and C fields are switched from limited accuracy (E6.2) to extended accuracy (E16.0) when the request card "$VINTAGE, 1" precedes a branch card (grouping). If "$VINTAGE, 0" follows this card (grouping), the high-precision format will be toggled to a normal format. For example: $VINTAGE, 1 lumped series R-L-C branches of any type (e.g. type 0: uncoupled RLC; type 1,2,3,...: coupled RLC; type 51,52,53,...: coupled RL) as long as they use the high-precision formats. $VINTAGE, 0 Connectivity definition Each branch is defined by its terminal ends (BUS1 and BUS2). By allocating node names to these terminal ends, the network connectivity is defined. But in effect, the terminal node names do not uniquely specify the branch; just think about two (or more) parallel branches having the same terminal node names. Only in a limited number of cases, it will be necessary to distinct between branches; . Branch output request (column 80-punch) . Reference branch usage (see next paragraph). If no special care is taken, the order of appearance in the input is withheld for parallel branches. If two or more parallel branches occur in the input, it is the first one appearing that will be used as reference branch or that will generate the requested branch output. When distinction should be made between two parallel branches, it is sufficient to alter the sequence of the node names. This simple action indeed is sufficient to distinct between two parallel branches. Example: Suppose one wants to define two parallel branches between node NODA and NODB. For one branch, BUS1 = NODA and BUS2 = NODB. For the other branch, BUS1 = NODB and BUS2 = NODA. When distinction should be made between more then two parallel branches, users' inventivity is called upon. Possible solutions; define an extra, intermediate node by splitting the series RLC in two different parts, or by using dummy measuring switches. Reference branch option When there are two or more branches that have the same elements (R,L,C) with the same values, a memory storage saving option exists; the reference branch option. In such case, one should only define the terminal ends of the branch being defined (BUS1 and BUS2), and in addition in the fields BUS3 and BUS4, reference should be made to the terminal ends of the branch being referred to (BUS1, BUS2). All other fields remain blank. It is clear that the branched being referenced to previously should be defined. Further recall that the sequence in which node names are specified is of crucial importance. Finally, refer to the preceding paragraph (4.- connectivity definition) for special remarks regarding parallel branches.

2

Rulebook ATP *junio 1996 - internet)

H04a

1

IV-A. Branch cards for uncoupled, lumped series RLC branches (type 0) Application GENERAL USAGE: Uncoupled or single phase, lumped series RLC branches specify the non-zero impedance of a branch between two named nodes, or between one named node and the ground (no special name, but just a blank will be sufficient to specify the ground). This impedance can be either a resistance, a capacitor, an inductor or a series connection of any of these.

81 Within FIX SOURCE, a data generator is available that converts the active and reactive loads (P and Q) into equivalent RLC branches (uncoupled, lumped series elements). See section X (FIX SOURCE) for more details. SPECIAL USAGE: The uncoupled, lumped series RLC element can be used for following purposes: -

-

measure the branch current or voltage (see remark 2), break closed loops of parallel connected switches (e.g. thyristor and free-wheeling diode), damp out numerical oscillations which could occur when interrupting the current in an inductor, or applying a step voltage to a capacitor (i.e. scaling of a resistance by the time step DELTAT see section IV.A.3; remark 7), link a floating subnetwork to the reference network (e.g. delta connected loads, ungrounded transformer or machine windings).

Remarks: -

There are limitations on the values of the resistance; there is a maximum and a minimum resistance we have to take into account (remark 5 and 6 of section IV.B.3.). For current-sampling purposes, there is also another facility called a measuring switch (remark 6 of section IV.B.3.). Usage of a high-precision format is explained in section IV.B.2-2.

Card format for uncoupled, lumped series RLC elements First, the three different card formats will be discussed: . normal format ($VINTAGE, 0) . high-precision format ($VINTAGE, 1) . free format.

Rulebook ATP *junio 1996 - internet)

H04a

Next, an explanation of all parameters involved will follow. Indeed, the meaning of the parameters is not dependent on the format being used.

82

NORMAL CARD FORMAT ($VINTAGE, 0)

83 If there is no special request card, the normal format is in use. The R, L and C fields only have a limited accuracy (E6.2 format). HIGH-PRECISION CARD FORMAT ($VINTAGE, 1)

84 FREE FORMAT

2

Rulebook ATP *junio 1996 - internet)

H04a

3

Besides the regular format and the high-precision format, a third (but tricky) way can be used to input RLC branches. This input is called FREE FORMAT, but it is not totally "free". Some important rules apply here : separate each field by comma's (i.e. last sign of the variable CHRCOM in the STARTUP file); blanks are totally ignored, and node names are left adjusted; do not input node names after column 26; do not input values before column 27; Make sure there is always a total of five comma's before column 26 (delimiting one type field and four node name fields) and a total of eight comma's should follow column 27 (delimiting three numeric fields for R, L, C, augmented by 6 dummy fields, probably to make the format compatible with the type 1,2,3-format). for output requests you still MUST use column 80; if a zero is not entered explicitly, the comma should nevertheless always be entered (even for column 1). With these rules, only column 27 and possibly column 80 must be determined as position information. On the other hand, a painstaking count of comma's is necessary. Parameters Following formats.

is

an

explanation

of

the

parameters

used

in

the

above

card

ITYPE: The branch-type has to be punched as zero or blank. BUS1, BUS2: Terminal node names of a branch. Each node can be specified by a 6-character alphanumerical node name. Node names always have to be left adjusted. Note that a blank-name is understood as being ground (TERRA). BUS3, BUS4: Reference branch terminal node names (see section 5 of the introduction), normally left blank. Recall that, when BUS3 and BUS4 are specified, the R, L and C field should remain blank. For the special situation "scaling of a resistance by the time step DELTAT", we refer to remark 7 below. R: Resistance value in Ohms. Except in case of free-format usage, values always have to be right adjusted. L: Inductance value (in mH or Ohms, depending on XOPT). - an inductance L: mH (XOPT = zero or blank) - a reactance 2[Equation: pi]f*L: ohms (XOPT = f) C: Capacitance value (in µF or µMho's, depending on COPT). - a capacitance C : µF (COPT = zero or blank) - a susceptance 2[Equation: pi]f*C: µmhos (COPT = f) OUTPUT OPTION: The options for printing and/or plotting have to be specified in this area. There are four output possibilities: '1' : branch current; '2' : branch voltage; '3' : branch current and branch voltage; '4' : branch power and energy consumption. Remarks:

Rulebook ATP *junio 1996 - internet)

H04a

1)

There are two different ways to specify or alter XOPT and COPT. They can be defined in the miscellaneous cards (see II-B.), or one can use the $UNITS card. This card can be inserted in the branch card grouping, on several places, to switch the units of the capacitors and inductors any time. The use of the $UNITS card is further explained in section ID-15.

2)

At least one value of R, L and C per branch must be non-zero.

3)

When a branch has only one or two elements (R, L, R and C, L and C, etc.), just leave the fields blank of the elements which do not occur in the branch.

4)

When using a reference branch which has other branches in parallel, it is not clear which of them should be the reference branch. Therefore the highest mentioned branch among the parallel branched always is the reference branch. Note that NODEA to NODEB and NODEB to NODEA are two different node-name pairs. These can therefore be used as two distinct reference branches.

5) A high resistance, being used for voltage sampling for example, may not exceed the maximum resistance value, which depends on the computer system. The general rule is that R must not exceed the square root of the largest number which the computer system can represent in floating-point form (e.g. 1.E18 ohms on Univac and Honeywell/GE, 1.E35 ohms on IBM and 1.E100 ohms on CDC). Startup file parameter FLTINF contains the maximum resistance value. 6) A low resistance, being used for current sampling for example, may not be taken lower then the minimum resistance value, which depends on the computer system and the program release. Following limitations exist: - the fundamental limitation is due to floating-point word length (system dependent). - the singularity tolerance parameters EPSILN and TOLMAT. The general idea is that all impedances which terminate on a given node should not differ drastically in value, as measured by the just-mentioned singularity tolerances. Specific relevant points related hereto include the following: EPSILN = singularity tolerance for real, all-resistive transient equivalent-network solutions. For transient studies, the impedances in question are equivalent Norton resistances, depending not only on the element, but also on the time step DELTAT. . For a resistor, this is just the value of the resistance in Ohms. . For an inductor of L Henries, the equivalent resistance is 2L/DELTAT. . For a capacitor of C Farads, the equivalent resistance equals DELTAT/2C. Distributed parameter lines or cables can be treated like a resistor having a resistance equal to the characteristic impedance. EPSILN can be specified in the floating-point miscellaneous data card, or in the startup file. TOLMAT = singularity tolarance for complex (i.e. phasor) admittance solutions during steady state initial conditions. For steady state studies, the impedances in question are phasor impedances, depending not only on the element but also on the frequency f of the sinusoidal excitation being used. . For a resistor, this is just the value of the resistance. . For an inductor, this is 2[Equation: pi]f*L. . For a capacitor, this is (2[Equation: pi]f*C)-1.

4

Rulebook ATP *junio 1996 - internet)

H04a

5

TOLMAT can only be specified in the floating-point miscellaneous data card. Current sampling can alternatively be done by permitting current output requests using the familiar column-80 punch. A second alternative is to use a measuring switch, which is permanently closed. The use of this switch is explained in section VI-A. 7) Scaling of a resistance by the time step DELTAT (Theory Book, section 2.2.2 and 2.3.2). Particularly useful for damping resistors to control numerical oscillation of the trapezoidal rule is the program feature that allows the resistance to be scaled by the time step DELTAT. For a resistor in parallel with an otherwise hanging (disconnected) inductor having value L [Henry], default damping is provided by the formula

R =

16L DELTAT

(L in Henry, DELTAT in sec, R in Ohm) The less-common dual case is that of the series capacitor which otherwise would be shorted, in which case resistance proportional to DELTAT is used:

R =

DELTAT 16C

Either proportional or inverse scaling by DELTAT is available for any simple resistor, if the user makes the right request in the reference branch fields BUS3 and BUS4 (columns 15-26) of the series R-L-C branch card that defines the resistance R as 16*L (Henry) or R as 16*C (Farad). L and C should be left blank. C 1 | 2 | 3 C 345678901234|567890123456|7890 C ------------|------------|---|DIVIDEDELTAT| -- to have R divided by DELTAT :inductance |MULTIPDELTAT| -- to have R multiplied by DELTAT:capacitance No special acknowledgement of such requests will be provided, although the user can verify that the program has understood by checking the first parameter of the data card interpretation (column 1-51 of the LUNIT6 output), which will reflect the scaling. If the user makes an error in spelling the request words (DIVIDEDELTAT or MULTIPDELTAT), the program should terminate execution with a complaint about inability to find the appropriate reference branch. Hence usage carries little danger of misunderstanding. For an illustration of "DIVIDEDELTAT" usage, see the 4th subcase of BENCHMARK DC-55. Examples C 1 2 3 4 5 6 7 8 C 345678901234567890123456789012345678901234567890123456789012345678901234567890 VOLT-A10-A $VINTAGE, 1 $UNITS, 0, 0

1.

123..21E-3

Rulebook ATP *junio 1996 - internet)

H04a

BUSA BUSB 12.8000000000000 10. 3 $VINTAGE, 0 $UNITS, -1, -1 VOLT-B10-B VOLT-A10-A 1 PORT 300. C 1 2 3 4 5 6 7 8 C 345678901234567890123456789012345678901234567890123456789012345678901234567890 The examples in the above figure are representing the branches following below. Presume that XOPT and COPT are set to 0 respectively 60 (Hz) in the miscellaneous data cards. When we switch to high-precision notation, we also use the $UNITS, 0, 0 card to change the units of the capacitance to µF (the units of the inductance remain the same, because XOPT already was 0). At this point, we have to be careful when we are going to use referencing. The branch with nodenames VOLT-B and 10-B will use now the reference branch with nodenames VOLT-A and 10-A. Therefor the units must be the same for these two branches. To switch to the old units again, we will use the $UNITS, -1, -1 card. The current of the branch with terminal nodes VOLT-B and 10-B will be included in the output as well as both current and voltage of branch BUSA to BUSB.

6

Rulebook ATP *junio 1996 - internet)

H04b

1

85 IV.B Branch cards for mutually coupled RLC elements (type 1,2,3) Applications GENERAL USAGE: First of all it is important to realize that, in contrast with the previous branches (type 0), the capacitance values specified on the input cards of type 1,2,3 are for shunt connected capacitances, not for series connected ones. A further observation worth reminding is that the capacitance value that is entered, is internally allocated half at the beginning and half at the end of the model.

86 This class of branches thus provides for the representation of lumpedelement resistance, inductance and capacitance matrices. The elements of the matrices [R], [L] and [C] have the following meaning (steady state):

-

- diagonal Rii + jωLii : self impedance of branch i (impedance of loop "branch i - ground return"); off-diagonal Rik + jωLik : mutual impedance between branches i and k (Rik ≠ 0 with nonzero ground resistivity); diagonal Cii : sum of all capacitances connected to the nodes at both ends of branch i; off-diagonal Cik : negative value of capacitance from branch i to branch k.

2

Rulebook ATP *junio 1996 - internet)

v k - v m = [L]

H04b

dikm + [R] ikm dt

1 dv [C] k + ikm 2 dt 1 dv = [C] m - ikm 2 dt

ik = im

87[ Note that all matrices are assumed to be symmetric and that the matrix of the capacitance is split in two, with half of the total on each end of the branch. This model, better known as a multi-phase nominal PI-equivalent, can be used to simulate transient phenomena on short lines or cables. By connecting many short sections in series, keeping track of any actual transposition (if any), even a transient model for a long line can be obtained. Yet because of increased running time and memory requirements, this modelling should generally be used only as a last resort, where more sophisticated models (e.g. distributedparameter models) are believed to be inadequate. Note that this is not the CASCADED PI option referred to in section IV.F; cascaded PI uses the long-line equivalent, which is valid only for steady state, at one specific frequency. The supporting routine LINE CONSTANTS (section XXI-E) or CABLE CONSTANTS (section XXIII-B) can be used as data generator for type 1,2,3 branch cards. Indeed the parameters [R], [L] and [C] cannot easily be calculated by hand. But also transformers can be modelled using PI-equivalents. Because most transformers have a small P.U. excitation current, the admittance matrix is nearly singular. The leakage impedance is rather low and can be obtained by substracting the mutual impedance from the self-impedance. Because off the fact that the admittance matrix is ill-conditioned, the leakage impedance can get lost in the magnetizing impedance. Therefor, it is necessary to have sufficient accuracy for the inductance. Hence, the normal card format (E6.0) is not sufficient. For transformers, either the alternative high-precision format should be used (see section IV.B.2 and related data generator BCTRAN, section XIX-C), or a more appropriate branch card format (type 51-52-53, see section IV-C) should be used (see data generator XFORMER, section XIX-A). In the ideal case of nonexisting (or very low) P.U. excitation currents, the inductance matrix does not even exist. For this special situation, a special option (AR notation) is used. Here, A stand for L-1 (the inverse of the inductance), which does exist (be it almost singular). This is later explained in more detail (see section IV.B.2). In both cases (AR and RL notation), the positions for the capacitance can be used succesfully to derive frequency dependent transformer models, where one needs to take into account the interwinding capacitances, as well as the capacitances to

Rulebook ATP *junio 1996 - internet)

H04b

3

ground. At this moment (November 1990), no related automatic data generator is available within EMTP. SPECIAL USAGE: A first special situation is when [C] = [0] (there are no capacitances). This case represents only mutually-coupled RL branches, for which even a separate input format (type 51,52,53, see section IV.C.) has been provided. This is the normal situation for transformer modelling.

88 If the user wants a multiphase capacitance matrix to ground (e.g. a capacitor bank), be it in star or in delta, then he can input near-infiniteimpedance series branches and ground all conductors at the far end.

89 Note hereby that the series impedances must be chosen large enough to represent an open-circuit. Recall that there is a limitation on the used values (see section IV.A.3). The C-matrix, specified in the input file must be twice the desired final matrix values, as mentioned before. Recall that the specified value is internally allocated half to the beginning and half to the far end of the model. One can also obtain a single phase (i.e. uncoupled) PI-equivalent. The difference with the representation by uncoupled, lumped series RLC branches is that you can enter the shunt capacitance to ground directly instead of having to introduce two separate branches for this purpose. The only thing you have to do, is using branch type number 1. Card format First, the three different card formats will be discussed: . normal format ($VINTAGE, 0) . high-precision format ($VINTAGE, 1)

Rulebook ATP *junio 1996 - internet)

4

H04b

. free format. For this card-type, 2 different notations exist: the RL-notation and the ARnotation. The card formats first will be explained for the RL-notation (normal usage). Next, the AR-notation will be discussed. RL notation Normally the RL notation is used. You can stack the values for [R], [L] and [C] in the way explained in section IV.B.3 (remarks). If previously the AR notation was used, you can toggle to the RL notation by using the following card:

90 NORMAL CARD FORMAT ($VINTAGE, 0)

91 If there is no special request card, the normal format is in use. The R, L and C fields only have a limited accuracy (E6.2 format). See section IV.B.3 (remarks) for further usage. HIGH-PRECISION CARD FORMAT ($VINTAGE, 1)

Rulebook ATP *junio 1996 - internet)

H04b

5

92 Usage of an extended precision (E16.0) is possible for mutually coupled RLC branches. See section IV.B.3 (remarks) for further usage. FREE FORMAT Besides the regular format and the high-precision format, a third (but tricky) way can be used to input RLC branches. This input is called FREE FORMAT, but it is not totally "free". Some important rules apply here : -

-

separate each field by comma's (i.e. last sign of the variable CHRCOM in the STARTUP file); blanks are totally ignored, and node names are left adjusted; do not input node names after column 26; do not input values before column 27; Make sure there is always a total of five comma's before column 26 (delimiting one type field and four node name fields) and a total of eight comma's should follow column 27 (delimiting nine numeric fields for R, L, C). If the figures are to be continued on the next card because the number of columns per card exceeded, the continuation symbol (fifth character of CHRCOM of STARTUP, usually "$") must be used. On such card, no extra comma's are needed.

With these rules, only column 27 must be determined as position information. On the other hand, a painstaking count of comma's is necessary. See section IV.B.3 (remarks) for further usage. AR notation In some cases, the [L]-1-matrix is ill-conditionned or singular, so [L] does not exist. Therefor the AR notation is used. "A" stands for the [L]-1-matrix and "R" stands for the [R]-matrix. Switching to the AR notation can be done by the following card:

93 In this case, we use the following equation:

Rulebook ATP *junio 1996 - internet)

6

H04b

dv = [L ]-1 v - [L ]-1 [R]i dt Now we have to be carefull when punching the data in the input format. The [L]-1-matrix replaces R in the input format. In the same way, the [R]-matrix replaces L in the input format. Remarks: - This notation can not be used for coupled phases (minimum two).

single-phase situations;

only for

- Before using the AR notation, the program automatically sets XOPT as 0.1591549 (XOPT=1/2π). In this case ω = 1. COPT remains unchanged. The values of the corresponding term of the inverse of L are now to be specified in Henry-1. Before switching to the RL notation, the old value of XOPT can be restored using the command $UNITS,-1,-1. - The AR notation can be combined with the use of the high extention format ($VINTAGE, 1) and the free format. Parameters Following formats.

is

an

explanation

of

the

parameters

used

in

the

above

card

ITYPE: Numbers 1 up to 40 can be used to express each phase of the PIequivalent. When there are continuation cards, ITYPE must be left blank for these (see remark 2). BUS1, BUS2: Specify the terminal node names of each phase in these fields. Nodes may be grounded (indicated by blank field name), if desired. BUS3, BUS4: Equally to uncoupled RLC branches, referencing can be used here. The same rules must be taken into account, except that only the first card (first phase) bears the reference nodes, specified as the nodes appearing on the first card used as reference set. The following cards (following phases) just specify the consecutive type numbers and the node names of the other input ports, not the nodes of the reference set nor the RLC values. R: resistance, value in ohms. L: Inductance value (in mH or Ohms, depending on XOPT). - an inductance L: mH (XOPT = zero or blank) - a reactance 2[Equation: pi]f*L: ohms (XOPT = f) C: Capacitance value (in µF or µMho's, depending on COPT). - a capacitance C : µF (COPT = zero or blank) - a susceptance 2πf*C: µmhos (COPT = f) Col80 punch: only value 2 is allowed, only on the first two cards. Remarks:

Rulebook ATP *junio 1996 - internet)

H04b

7

1) At least one of the matrices [R], [L] or [C] must be nonzero. When matrix [C] is zero, an alternate input format (type 51,52,53; see section IV.C.), can be used. 2) Matrices [R], [L] and [C] are symmetric, so one only needs to specify the elements on and below the diagonal. Hence the following format applies. For phase 1 (A), BUS1 = "SA" and BUS2 = "RA", for phase 2 (B), we have SB and RB, etc. When one card is not sufficient for all RLC values (second and later phases for $VINTAGE, 1;fourth and later phases for $VINTAGE, 0), then continuation cards are used, with columns 1-26 left blank. a) for $VINTAGE, 0:

94 b) for $VINTAGE, 1:

95 3) No branch current output is possible for this branch type. However, the branch voltage can be obtained on the first two phases. In these phases, column 80 is still free and can therefor be used to punch number 2 for branch voltage output requests. By the next phases, column 80 is occupied (at least for $VINTAGE,0) and can therefore not be used for output requests.

Rulebook ATP *junio 1996 - internet)

8

H04b

Examples The next example contains two identical 3-phase circuits. Together, these two circuits constitute six coupled conductors. With two identical PI-equivalents cascaded, the data cards appear as follows: C 1 2 3 4 5 6 7 8 C 34567890123456789012345678901234567890123456789012345678901234567890123456789 0 $UNITS, 60, 0 110-A 20-A 1.41 8.334 .164 210-B 20-B 0.972.8586-.0289 1.239.1392 .1626 310-C 20-C 0.912.2823-.0088 0.863.4218-.0273 1.16 9.518 .166 2 411-A 21-A 1.002.0984-.0180 0.942.1248-.0101 0.902.0398-.005 3 1.41 8.334 .164 511-B 21-B 0.942.1248-.0101 0.892.5064-.0104 0.862.6454-.008 7 0.972.8586-.0289 1.239.1392 .1626 611-C 21-C 0.902.0398-.0053 0.862.6454-.0087 0.833.1597-.014 2 0.912.2823-.0088 0.863.4218-.0273 1.16 9.518 .166 2 C 1 2 3 4 5 6 7 8 C 34567890123456789012345678901234567890123456789012345678901234567890123456789 0 USE AR $VINTAGE, 1, 1BUS1_RBUSH 2BUS2_RBUSL 3BUS1_SBUSH 4BUS2_SBUSL

5BUS1_TBUSH

6BUS2_TBUSL

USE RL $VINTAGE, 0, $UNITS, {do not forget this!

2.4311266503345 -29.04015078715 361.43763967638 .06629545237001 -.7919085305828 2.4311266503345 -.7919085305828 23.900085059572 -29.04015078715 361.43763967638 .06629545237001 -.7919085305828 .06629545237001 -.7919085305828 2.4311266503345 -.7919085305828 23.900085059572 -.7919085305828 23.900085059572 -29.04015078715 361.43763967638 -1,

1.369233463069 0.0 .0095961038351 0.0 0.0 1.369233463069 0.0 0.0 0.0 .0095961038351 0.0 0.0 0.0 0.0 1.369233463069 0.0 0.0 0.0 0.0 0.0 .0095961038351 -1

Rulebook ATP *junio 1996 - internet)

H04b

9

C 1 2 3 4 5 6 7 8 C 34567890123456789012345678901234567890123456789012345678901234567890123456789 0 120-A 30-A 10-A 20-A 220-B 30-B 320-C 30-C 421-A 31-A 521-B 31-B 621-C 31-C As you can see in the grid, following matrices are used in the first six phases of the PI-equivalent:

[R] =  Ω 1.41   0.97.1.23    0.91,0.86,1.16    1.00,0.94,0.90,1.41    0.94,0.89,0.86,0.97,1.23    0.90,0.86,0.83,0.91,0.86,1.16 

7

[ ωL] =  Ω 8.3340    2.8586,9.1392     2.2823,3.4218,9.5180     2.0984,2.1248,2.0398,8.3340    2.1248,2.5064,2.6454,2.8586,9.1392,    2.0398,2.6454,3.1597,2.2823,3.4218,9.5180 

[C] =   µ [F] 0.1640    -0.0289,0.1626     -0.0088,-0.0273,0.1662     -0.0180,-0.0101,-0.0053,0.1640    -0.0101,-0.0104,-0.0087,-0.0289,0.1626     -0.0053,-0.0087,-0.0142,-0.0088,-0.0273,0.1662 

8

Remark the symmetric structure of each matrix and interprete the units of the [L] matrix in ohms (XOPT is set to 60 Hz). The next 6 phases represent a multiphase transformer. The AR notation is used representing following matrices:

[L ]-1 =   H -1 2.4311266503345    -29.04015078715,316.43763967638    .06629545237001,-.7919085305828,2.4311266503345     -.7919085305828,23.900085059572,-29.04015078715,361.43763967638   .06629545237001,-.7919085305828,.06629545237001,-.7919085305828,2.4311266503345      -.7919085305828,23.900085059572,-.7919085305828,23.900085059572,-29.04015078715,361.43763967638 

9

10

Rulebook ATP *junio 1996 - internet)

H04b

[R] =  Ω 1.369233463069    0.0,.0095961038351    0.0,0.0,1.369233463069  10    0.0,0.0,0.0,.0095961038351    0.0,0.0,0.0,0.0,1.369233463069    0.0,0.0,0.0,0.0,0.0,.0095961038351 The high-precision format ($VINTAGE, 1) is also used, transformer needs this format to be as accurate as possible.

because

the

Remark the use of $UNITS, -1, -1 which resets the old units of the inductors (XOPT = 60) and capacitors (COPT = 0). This is indispensable because when using the AR notation, the program automatically changes the units to $UNITS, 0.1591549, 0. Finally, there is a multiphase PI-equivalent which will be referred to the first multiphase PI-equivalent. As mentioned in section IV.B.3. only the first phase bears the reference nodes.

Rulebook ATP *junio 1996 - internet)

H04c

1

IV-C. Branch cards for mutually coupled RL elements (type 51,52,53,...) Application GENERAL USAGE: This class of branches provides for the representation of lumped-element, mutually-coupled R-L branches.

96 The input cards for these branches do not differ much from the previous type 1,2,3 branches, except that there is no provision for inputting a shunt capacitance matrix ([C] = [0]). On the other hand, the inductance data field provides for 12 columns rather then only 6, allowing for greater precision. This is primarily intended for representing the coupled impedances of transformers, as with lower precision the leakage impedances, obtained by substracting the mutual impedances from the self impedances, are very badly and get lost in the magnetizing impedance. However, this drawback can be circumvented by using the high-precision format for type 1,2,3 (see section IV.B). Also network equivalents can be represented using coupled R-L equivalents. Following data generators create punched cards in the type 51,52,53-format: XFORMER (section XIX.A) = transformer model NETEQV (section XXIV.) = network equivalent CHANGE TRANSFORMER (section XIX.J) = convert SATURABLE TRANSFORMER data into XFORMER punched card output format. SPECIAL USAGE: 1) Sequence value: For transposed (balanced) lines, the associated [R] and [L] matrices (phase values) have a special structure: all diagonal elements have a common value Z s and all off-diagonal elements have a common value Zm. When in addition, we only consider transposed three-phase cases, an easier notation, based on Fortesque decomposition, exists. In this case, it is no longer necessary to store the entire matrix (or even the lower-diagonal part). It is more convenient to specify only the associated zero- and positive-sequence values (R 0,L0) and (R1,R2) of a purely diagonal matrix.

Rulebook ATP *junio 1996 - internet)

2

  _ Fortesque _ , , Z Z Z s m m      Z m , Z s , Z m  , ,  Z m Z m Z s

H04c

   Z 0 ,0,0    11 0, Z1 ,0   0,0,  Z 1 

The relation between phase values (Zs,Zm) and sequence values (Z0,Z1) is very simple;

Z0 = Z s + 2 Z m

Z1 = Z s - Z m

Furthermore, sequence values can be calculated automatically using supporting routines LINE CONSTANTS (section XXI-C or section XXI-D) or CABLE CONSTANTS STAND ALONE. Note, however that data manually should be put in the correct input format! This input format will be discussed in more detail in section IV.D.2-3 and 3-2. 2) AR notation: In the ideal case of a transformer having non-existing (or very low) P.U. excitation currents, the inductance matrix does not even exist. For this special situation, a special option (AR notation) is used. Here, "A" stands for L -1 (the inverse of the inductance), which does exist. Remark, however, that the supporting routine XFORMER is not able to create output in AR notation in order to treat such an "ideal" transformer. On the other hand, BCTRAN can, but it does not create the type 51,52,53 branch format being discussed here. Card format For this card-type, 2 different formulations exist: phase value and sequence value formulation. For the phase value formulation, in addition 2 different notations exist: the RL-notation and the AR-notation. In both notations, three different card formats can be used : . normal format ($VINTAGE, 0) . high-precision format ($VINTAGE, 1) . free format. These card formats first will be explained for the RL-notation (normal usage). Next, the AR-notation will be discussed. These notations, which belong to the phase value formulation, will be followed by another part, where an extra format used for the sequence value formulation will be discussed. Phase values RL notation Normally the RL notation is used. You can stack the values for [R] and [L] in the way explained in section IV.C.3. If previously the AR notation was used, you can toggle to the RL notation by using the following card:

Rulebook ATP *junio 1996 - internet)

H04c

3

97

NORMAL CARD FORMAT ($VINTAGE, 0) To specify N mutually coupled R-L elements, the following format is used:

98 HIGH-PRECISION CARD FORMAT ($VINTAGE, 1) Even in this case there is a high-precision format available. All value formats are now switched to the E16.0 format. Next grid shows the input structure.

99

FREE FORMAT Besides the regular format and the high-precision format, a third (but tricky) way can be used to input type 51,52,53 RL branches. This input is called FREE FORMAT, but it is not totally "free". Some important rules apply here : separate each field by comma's (i.e. last sign of the variable CHRCOM in the STARTUP file);

Rulebook ATP *junio 1996 - internet)

4 -

-

H04c

blanks are totally ignored, and node names are left adjusted; do not input node names after column 26; do not input values before column 27; Make sure there is always a total of five comma's before column 26 (delimiting one type field and four node name fields) and a total of six comma's should follow column 27 (delimiting six numeric fields for R and L). If the figures are to be continued on the next card because the number of columns per card exceeded, the continuation symbol (fifth character of CHRCOM of STARTUP, usually "$") must be used. On such card, no extra comma's are needed.

With these rules, only column 27 must be determined as position information. On the other hand, a painstaking count of comma's is necessary. See section IV.C.3 (remarks) and section IV.C.4 (examples) for further usage. Supporting routine XFORMER (section XIX.A) creates punched card output in free-format notation. AR notation In some cases, the [L]-1-matrix is ill-conditionned or singular, so [L] does not exist. Therefor the AR notation is used. "A" stands for the [L] -1-matrix and "R" stands for the [R]-matrix. Switching to the AR notation can be done by the following card:

100 In this case, we use the following equation:

dv = [L ]-1 v - [L ]-1 [R]i 13 dt Now we have to be carefull when punching the data in the input format. The [L]-1-matrix replaces R in the input format. In the same way, the [R]-matrix replaces L in the input format. Sequence values When using the sequence value formulation, only one card format exists:

Rulebook ATP *junio 1996 - internet)

H04c

5

101

Parameters Following is an explanation of the parameters used in the above card formats. A distinction should be made between phase value and sequence value usage. PHASE VALUE USAGE (NORMAL, HIGH-PRECISION OR FREE FORMAT) ITYPE: Specifies N phases by numbering 51, 52, 53, ...(50+N) in this field. N is limited up to 40. Continuation cards must have blank ITYPE fields. BUS1, BUS2: Terminal node names of the elements in the phase, indicated by the ITYPE field. Nodes may be grounded (indicated by blank field name) if desired. BUS3, BUS4: Equally to mutually coupled RLC branches, referencing can be used here. The same rules must be taken into account as typing only the node names of the first phase of the reference set in the same sequence. R, L: The numerical values of the matrices [R] and [L] are to be put in these fields. The units for R will be in ohms and for L there are two cases: - Inductance L : mH if XOPT = zero; - Reactance 2πf*L in ohms at frequency f = XOPT Remarks - Matrices [R] and [L] are symmetric, so only need to be specified on and below the diagonal. When one card is not sufficient to specify all R-L values, then continuation cards are used, with columns 1-26 left blank. The following format applies:

6

Rulebook ATP *junio 1996 - internet)

H04c

a) for $VINTAGE, 0:

102 b) for $VINTAGE, 1:

103 - There is no branch current output possible for this branch type. However, the branch voltage can be obtained on the first two phases (column 80 is not being used). - There is only one supporting routine that can be used to generate the data in the proper input format:

Rulebook ATP *junio 1996 - internet)

H04c

7

XFORMER: to derive [R] and [[Equation: omega]L] for single-phase transformers in free format, RL notation (phase value formulation). See also section XIX.A. SEQUENCE VALUES USAGE ITYPE: Specifies N phases by numbering 51, 52, 53, ...(50+N) in this field. N is limited up to 40. BUS1, BUS2: Terminal node names of the elements in the phase, indicated by the ITYPE field. Nodes may be grounded (indicated by blank field name) if desired. BUS3, BUS4: Terminal node names of the first branch (phase) of the reference set. R, L: The first card (type 51) carries the homopolar or zero sequence values (R0, L0). The second card (type 52) contains the direct or positive sequence values (R1, L1) and the R and L field of the third card has to be left blank. The units for R and L are the same as mentioned for the previous format. For L: - Inductance L : mH if XOPT = zero; - Reactance 2πf*L in ohms at frequency f = XOPT

Remark - If columns 15-80 of the third and further cards for sequence values, are not left blank, the EMTP will not recognize the coupled branches as being specified with sequence values. In this case, the phase domain format will be assumed, with the result being a very unbalanced, erroneous representation. Examples Next example will show the use of normal mutually coupled RL elements. We'll use the output of the supporting routine XFORMER (see section XIX-A) which format is a high-precision and free format. C 8

1

2

3

4

5

6

7

C 34567890123456789012345678901234567890123456789012345678901234567890123456789 0 51,H1 , , , , 0.9272618817281E-01 , 0.3493188082966E+03 , ,,,, 52,L1 , , , , -0.5411077293636E-01 , 0.2037410770117E+03 $ 0.3157657837292E-01 , 0.1189555285801E+03 , ,,,, C 1 2 3 4 5 6 7 8 C 34567890123456789012345678901234567890123456789012345678901234567890123456789 0 A second example shows the special case of sequence values:

Rulebook ATP *junio 1996 - internet)

8

H04c

104 The sequence parameters for example could be: R0 = 4.5 ohm L0 = 87.6 mH C 8

1

2

R1 = 3.1 ohm L1 = 66.4 mH 3

4

5

6

7

C 34567890123456789012345678901234567890123456789012345678901234567890123456789 0 51 N1A N2A 4.5 87.6 52 N1B N2B 3.1 66.4 53 N1C N2C C 1 2 3 4 5 6 7 8 C 34567890123456789012345678901234567890123456789012345678901234567890123456789 0

Rulebook ATP *junio 1996 - internet)

H04f

1

IV.F. Branch input using "CASCADED PI" feature IV.F.1. Applications 1 GENERAL USAGE In Section IV.B we already discussed the multi-phase nominal PI-equivalent. This appeared to be a good model to simulate transient behaviour on short lines and cables. By connecting many short sections in series, keeping track of the actual transposition (if any), even a transient model for a long line can be obtained. Yet, because of the enormous memory requirements, more sophisticated models were formulated. More details can be found in section 4.2. of the Theory Book. For transient analysis, the models of section IV.D are more appropriate. For steady state (at any frequency), the CASCADED PI option dealt with in this section is a better alternative, since it is less memory consuming. On the other hand, some important limitations exist: CASCADED PI uses the long-line equivalent (not the nominal PI-equivalent). Hence, the model is only valid at one specific frequency. Accordingly, only steady state calculations (TMAX [Equation: < To tamper with the ROLLing vector plot, send >< OPTION (MARK, DELAY, PLOT, OVERLAP, MENU) :

choice.

For a quick summary of the options shown, send "MENU". The subcommand "MARK" will immediately identify the curves by applying the appropriate letters ("a", "b", etc.). Use "OVERLAP" to modify the overlap between successive pages of the continuing plot (parameter OVRLAP of the STARTUP file). "DELAY" allows modification of the size of the buffer that controls relative instantaneity of the rolling plot (parameter KSLOWR of the STARTUP file). Finally, "PLOT" transfers the user to the "PLOT:" prompt of "PLOT" --plenty of rope with which the user can hang himself (be careful of this one). So

Rulebook ATP (junio 1996 - internet)

much for the SPY command plot from the outside is

H16

"TEK". Yet another SPY command that controls a rolling "NOROLL" (to terminate the rolling).

"SMOOTH"##is used to modify the tolerance TOLRCE that allows for the discarding of plot points. The initial value is installation-dependent, since it comes from the STARTUP file. "EXTREMA"##and##"LEVEL"##are not really a logical part of plotting, since plots are unaffected by these subcommands. But because implementation of the associated functions was much easier inside of "PLOT" than it would have been on the outside, these two commands are subcommands of "PLOT" rather than SPY commands. At issue is the interactive tabulation of minima and maximum (in the case of "EXTREMA") or level crossings (in the case of "LEVEL") of plot variables over the time range of interest. Normally there is no such output. Sending either command will toggle the associated binary switch that controls such tabular output prior to a plot. An illustration of the "EXTREMA" table follows: MPLOT 4 2 9

Name-1 GEN TRAN TRAN

Name-2 LOADG

Minimum -6.92995E+01 -5.98629E+01 -2.02090E-01

Maximum 7.00000E+01 6.47100E+01 2.49046E-01

T of min 3.00000E+00 3.00000E+00 3.00000E+00

Actually, one column is missing on the right due to lack of space --- a column entitled "T#of#max" (the time of the maximum). As for the first column, the magnitude gives the variable number in the output vector, and any minus sign means a reversal of polarity compared with the output vector. The display of "LEVEL" is transposed compared with this, with unlabeled columns corresponding to the plot variables. For the same three plot variables just shown, an illustration follows: Levels sought : 1st hit time :

1.50000E+00 1.54935E+00

-2.00000E+00 7.11894E-01

3.14000E-01 -9.99900E+03

"FOURIER"##is the gateway to interactive Fourier series computation. The basic mathematics and assumptions are identical to those of the "FOURIER#ON" option of batch-mode EMTP plotting (see Section XIV). Even the printed results will be the same: a table of harmonic content in the LUNIT6 window. But instead of the specification of parameters via a batch-mode plot card, within SPY "PLOT" the controls are interactive, via the keyboard. Also, at the end of any such interactive Fourier computation, the user can interactively plot the magnitudes of complex harmonics as a function of frequency in the form of a bar chart. This requires vector plotting, however (see "MODE"). One simple restriction to the use of "FOURIER" is that only one plot variable is allowed (i.e., the user can only find the harmonic content of a single signal at any one time). There are three prompts within the "FOURIER" subcommand, and this might be shown as minimal documentation: SEND T-beg, FREQ [ 0.0, 60. ] (END, PLOT, LIMIT) : SEND H-beg, H-end (END, ) [ 0 9 ] : SEND V-max (, 0) [ 0.00000000E+00 ] : The first of these seeks to identify the cycle of interest in terms of a beginning time and the frequency. There may be a slight delay following the answer to this first prompt, as the Fourier series is computed, and the harmonic table is displayed in the LUNIT6 window. The second prompt asks for the beginning and ending harmonic numbers for the bar chart. If the user wants no such plot, he sends "END" to return to the first prompt. To exit the first prompt, use "END", which will return to the "PLOT:" prompt. The third and final prompt requests vertical-axis scaling information for the bar chart.

12

Rulebook ATP (junio 1996 - internet)

H16

13

Provided the signal frequency is equal to the power frequency, and the first ten harmonics scaled to fill the vector plot window provide an adequate display, three carriage returns () will respond to these three prompts. The use of "SPY" to exit is not recommended, since it may leave certain control parameters in an unnatural state, thereby adulterating the memory of "PLOT" (in case the user wants subsequent graphs). It is good practice to exit the Fourier computation using "END" ... always. "SHAFT"##is the gateway to interactive analysis of the loss-of-life of a generator shaft due to an applied torque. It is a new plotting function that is still undergoing experimentation and modification, so is not recommended for the general public. But the general operation is easy enough to summarize. Shaft torques can be predicted by the dynamic modeling of rotating machinery (see Sections VIII and IX), so such a signal is assumed to be available for plotting in the output vector when "SHAFT" is requested. Just as with "FOURIER", only one output variable can be analyzed at any one time, and the shaft analysis is provided in lieu of a plot. Normally the user will plot the torque first. Then, having that picture in front of him, he will request a second pass of the same data, during which loss of life is computed. With all diagnostic turned off, the result will be a single summary message in the LUNIT6 window having the following form: End of loss-of-life calculation for generator shaft torque. TOTLOL = 0.00000000E+00 Data used for this fatigue calculation follows. The number of points of the fatigue curve, which came from disk file SHAFT.DAT, is NPTLOL = 3. The torque tolerance (for ignoring relative extrema) is EPSLOL = 1.00000000E+01. The fatigue curve itself, (TORQUE(J), CYCLES(J), J=1, NPTLOL), follows: 1.00000E+05 1.00000E+00 1.00000E+03 1.00000E+01 1.00000E+00 1.00000E+02 As suggested by this output, there is an internal connection of a disk file named SHAFT.DAT, which must contain data describing the shaft of interest. This use of a fixed name and fixed I/O channel are temporary restrictions only, as experimentation continues. Once production usage begins, this can be generalized. But for now, the single disk file SHAFT.DAT must apply to the torque of interest, and it must begin with one miscellaneous data card containing two parameters: D13

(columns 1-8)

EPSLOL

is the torque scaling factor, with blank or zero is taken as unity; (columns 9-16) is the torque tolerance below which excursions are ignored.

This first card is to be followed by the torque-cycles characteristic. consists of one point (a pair of numbers) per card, read as 2E16.0 data: TORQUE CYCLES

This

(columns 1-16) is the torque value of the next point on the loss-of-life characteristic; (columns 17-32) is the associated number of cycles to crack at this level of oscillation.

Both of these values will always be positive. This characteristic is to be defined for monatonically-increasing TORQUE, for which the associated CYCLES value should be monatonically decreasing. The characteristic is to be terminated by a card with TORQUE = 9999.

Rulebook ATP (junio 1996 - internet)

H16

"X-Y#PLOT"##toggles the binary control variable that chooses between normal plotting as a function of time and the plotting of one variable against the other as time increases. Since the program begins with normal plotting, the first such use is a switch to X-Y plotting. For those with vector plotting capability, X-Y plotting should be possible. But there is not yet any such capability for the character mode of plotting. It could be provided upon demand, but thus far there has been no demand. Immediately after the switch to X-Y plotting, there will be a prompt for a horizontal axis title. The following illustrates this: PLOT: X-Y PLOT --- Toggle to "ON" SEND X-AXIS LABEL [

(X-Y plotting) ...] :

The only other difference from a conventional plot will occur after the time span of interest is specified. At this point, the user will be prompted for limits of both the horizontal and vertical axes before the plot is produced. The following is illustrative: PLOT: TIME 0 4 REVISE X-min, REVISE Y-min,

X-max Y-max

[ ] (OLD) : -100 100 [ ] : -100 100

"CURSOR"##is the gateway to logic that allows for the experimental determination of ordinates and slopes of curves using some pointing and marking device. The logic was originally developed for the Tektronix 4014, which had horizontal and vertical lines ("cross hairs") that could be accurately positioned using two thumbwheels. Do not attempt to use this feature unless it is known that the capability has been implemented for the computer and vector-graphic display device of interest. XVI-C-5.

Command Files:

@K,

FILES,

COMMENT,

VERIFY,

TYPE

Much the way modern computer operating systems allow interactive user commands to be built into disk files for execution as a group, so SPY allows the modularization of commands. Disk files of spy commands will be called "command files" (following the DEC VAX/VMS name). Such command files can be executed by preceding an identification of the file by the "@" symbol (again modeled after VAX/VMS). Alternatively, there is a batch-mode connection to such files, too (see $SPY of Section XVI-D). There are ten special, reserved command files that can be accessed by a single decimal digit (variable from 0 through 9). This is quicker than keying a typical file name. To check on the existence of one or more of these, use the "FILES" command, of which the following is an example: SPY: FILE File number : INCLSPY?.DAT:

1 X

2 X

3 X

4

5 X

6

7 X

8 X

9

0 X

An "X" indicates existance of a given file, whereas a blank indicates nonexistence. This display also shows the real name of the disk files (the 5th would be named INCLSPY5.DAT). Command files can in fact be memory-stored rather than disk-stored, and this provides for faster input in case of repetive input (looping within the file, via the subcommand "GOTO" of the SPY command "APPEND"). One way to load card images from Disk to memory (the LUNT10 program card cache) is via the "COPY" sub-sub-command of the "CARD" subcommand of the "SPACE" command of SPY. Once in memory, a command file is executed by appending a slash ("/") in front of the file identification, and using a LUNT10 card index for the file identification.

14

Rulebook ATP (junio 1996 - internet)

H16

15

For example, whereas "@2" will execute the disk-stored, second special command file (shown in the next paragraph), "@/6350" is the command to execute whatever command file begins in card number 6350 of the EMTP card cache (LUNT10). Although the input from most disk-stored command files will continue until an end-of-file is encountered (at which point control will be returned to the keyboard), a software end-of-file is also possible. This is simple enough: "EOF" in columns 1-3 of a command line. Such usage is mandatory in the case of memory-stored command files, of course. Usage of command files can not be nested (i.e., no such command file can itself contain an "@" command). But other user aids are allowed, including EMTP comment cards ("C#"). The SPY "COMMENT" command controls whether or not such lines are seen in the SPY window (the initial choice is for such echoing). In-line comments are also allowed, and are to be encouraged (they make the sequence of commands much more understandable to a human). The Apollo symbol "{" has been reserved for this role --- to mark the place where all input records will be truncated. For an example of such usage, see INCLSPY2.DAT in the next paragraph. In case the user is so sure of the correctness of both his program and his command file that he does not want to see commands as they are executed, he can use the command "VERIFY", which toggles the binary switch that controls such output. Finally, a pounds sign ("@#") can be used for reserved blanks, should such be needed. When a command file ends (usually when input is halted by a hardware end-offile, although the software construct "EOF" will accomplish the same termination), control is returned to the keyboard. But where? What should the prompt be? Because SPY is not smart enough to remember, it simply displays a good guess, namely the frequent "SPY:" prompt. Just remember that this may or may not be correct, depending upon where SPY control was at the instant data of the command file was exhausted. There may be one erroneous prompt. If "@" is to be the first SPY command, there is a more compact way of of beginning execution. As briefly mentioned in Section I-C, and illustrated in Section XVI-A, the user could respond to the original program input prompt with a character string following his "SPY" request, separated by one space. If the appendage begins with "@", it will be taken as input to SPY rather than a file name (as previously described in Section XVI-C-1). For example, EMTP begins. SPY @3

Send (SPY, file_name, DISK, HELP, GO, KEY) :

is the same as first sending only "SPY", and then subsequently sending "@3" to SPY (for Apollo, this would be keyed in the separate SPY input window pane). "TYPE"##allows for the inspection of a command file before that file is executed. Actually, any ASCII disk file can so be inspected, including EMTP data files. But the most common use will be for command files. If there is any question about the content of a command file, it is better to find out before execution (i.e., before it may be too late to make a correction). An illustration of such usage follows: SPY: Line Line Line Line Line Line SPY:

TYPE 2 1 : C Begin INCLSPY2.DAT SPY command file that illustrates 2 : C the use of an argument (albeit trivial). 3 : HELP 4 : %%%%%%%% { Argument is to be the SPY command of interest 5 : SPY { Exit the "HELP" command, returning to "SPY:" 6 : C Bottom of INCLSPY2.DAT; EOF comes next

Rulebook ATP (junio 1996 - internet)

H16

Note the argument (the 8 percent signs on line 4). If the user wants to obtain information about the "PLOT" command of SPY, he need only send "@2#HELP". This is particularly useful if the user has access to just a single terminal of a time-shared computer. For a more flexible workstation such as Apollo, the utility is limited because the operating system provides for multitasking, and the user could independently view the file via the system editor. As just illustrated, parameters or arguments of command files are allowed. Free-format input is used, with a comma (",") separator in the case of two or more. Temporary restrictions include a length limitation of 8 bytes for each argument, a maximum of 10 arguments, and a line length (for the "@" command) of not more than 80 columns. Within the command file, usage of arguments is marked by strings of eight percent signs ("%"). Of course, there must be a one-for-one correspondance between the arguments of the call (the "@" command) and the "% %%%%%%%" fields within the command file. XVI-C-6.

EMTP Variables:

EXAMINE, NAMES, ROLL, LIST, FIND, DEPOSIT

Somewhat analogous to "symbolic debuggers" of modern computer systems, SPY can observe or modify any variable of EMTP tables of the solution overlays. It is the "EXAMINE" and "DEPOSIT" commands of SPY that allow this. Yet there are two fundamental differences: 1) the simulation can not be halted at an arbitary line of an arbitrary subroutine, and 2) only variables that are stored in COMMON blocks (not local variables) are accessible. In order to find where variables are stored, and what the names are, the commands "LIST" and "FIND" have been provided. The "EXAMINE" command began with keyboard orientation, but has since been converted into a structure that is better adapted for use within command files. For workstations having windows, this is no handicap, since a command file can be edited at the same time the program is executed. Specific rules of usage for "EXAMINE" could be figured out from the "HELP" text, of course. But for the casual user who wants to begin operation rapidly, it is easier just to copy and modify some established command file that already uses the feature. As an illustration, consider INCLSPY1.DAT, which contains considerable explanatory annotation. Most of this concerns definition of the variables that are to be observed ("EXAMINE" input). At the end, there is the command to display the variables ("NAMES"): C Begin EXAMINE CUT 0 ADD ISTEP TMAX LUNIT4 T NCHAIN TWOPI END TABLE FORM 1 6 2 8 3 7 -6 SHOW END

INCLSPY1.DAT by building a fixed debugging table This SPY command enters the world of "EXAMINE" choices Reset table length to zero (in case of previous usage) Go into "append mode", adding to bottom of "EXAMINE" table First EMTP COMMON variable to be placed in "EXAMINE" table 2nd EMTP COMMON variable .... 3rd EMTP COMMON variable ... 4th EMTP COMMON variable .... 5th EMTP COMMON variable .... 6th EMTP COMMON variable .... Exit loop over EMTP variable names (back to choices) Display all variables of "EXAMINE" table now defined Process entries of "EXAMINE" table, so ready for later use 1st variable is to have its width expanded to 6 columns 2nd variable is to have its width expanded to 8 columns 3rd through 6th variables ..... expanded to 7 columns Confirm that these 5 modifications have been made correctly Break out of "FORM" loop, moving back to "EXAMINE" choices

16

Rulebook ATP (junio 1996 - internet)

H16

17

SPY Back to "SPY:" prompt (done with "EXAMINE" usage) NAMES Display heading for variables, followed by current values C That's all there is; EOF comes next; Exit INCLSPY1.DAT next. Since the in-line comments explain most of this, such description will not be repeated here. However, this says little about the different SPY prompts to which these lines are responses. The result of "@2" should document the prompts better than words: SPY: EXAMINE CHOICE (TABLE, WIDTH, CUT, NEW, ADD, COPY, FORM, SHOW) : CUT 0 CHOICE (TABLE, WIDTH, CUT, NEW, ADD, COPY, FORM, SHOW) : ADD SEND EMTP VARIABLE: ISTEP SEND EMTP VARIABLE: TMAX SEND EMTP VARIABLE: LUNIT4 SEND EMTP VARIABLE: T SEND EMTP VARIABLE: NCHAIN SEND EMTP VARIABLE: TWOPI SEND EMTP VARIABLE: END CHOICE (TABLE, WIDTH, CUT, NEW, ADD, COPY, FORM, SHOW) : TABLE Row Name INTOUT LOCOUT IMIN IMAX 6 = NUMEX 1 ISTEP 1 45 1 1 2 TMAX 0 20 1 1 3 LUNIT4 1 119 1 1 4 T 0 18 1 1 5 NCHAIN 1 77 1 1 6 TWOPI 0 19 1 1 CHOICE (TABLE, WIDTH, CUT, NEW, ADD, COPY, FORM, SHOW) : FORM Triplets of (index, width, text). NUMEX = 6. 1 5 ISTEP 2 6 TMAX 3 6 LUNIT4 4 6 T 5 6 NCHAIN 6 6 TWOPI SEND K-index, K-width (END, SHOW; "-KEND use") : 1 6 SEND K-index, K-width (END, SHOW; "-KEND use") : 2 8 SEND K-index, K-width (END, SHOW; "-KEND use") : 3 7 -6 SEND K-index, K-width (END, SHOW; "-KEND use") : SHOW Triplets of (index, width, text). NUMEX = 6. 1 6 ISTEP 2 8 TMAX 3 7 LUNIT4 4 7 T 5 7 NCHAIN 6 7 TWOPI SEND K-index, K-width (END, SHOW; "-KEND use") : END CHOICE (TABLE, WIDTH, CUT, NEW, ADD, COPY, FORM, SHOW) : SPY SPY: NAMES ISTEP TMAX LUNIT4 T NCHAIN TWOPI 79 .1E20 -4 3.95 18 6.2832 { 1} It is only the final two lines that normally would be of interest to the user: output of the "NAMES" command. These show that the simulation is on time step number ISTEP#=#79, which corresponds to simulation time T#=#3.95 seconds. The end-time of the simulation will never be reached (TMAX = 1.E19 is set internally for all SPY usage). The overlay number NCHAIN is 18 (within the time-step loop), variable TWOPI is hardly a surprise, and LUNIT4 being negative means that plot data points are being held in memory rather than being written to I/O unit number LUNIT4. The number "1" within braces on the right is a line number. Here, only a single line was required, but for more variables, two or more lines might be required. SPY provides for this automatically. After the variable definition of "EXAMINE", the user can request the display of variable values at any later time. As already seen, this is done by the SPY command "NAMES", which results in a display of the variable headings as well as the current variable values. If only current variable values are wanted, a should be used instead. A final variation of observation is provided

Rulebook ATP (junio 1996 - internet)

H16

by the SPY command "ROLL", which "continuously" (at every SPY opportunity) watches the output variables, and only produces an output if one or more variables has changed since the last check. If one of the variables being examined is expected to change every time step, beware (the output can be fast and voluminous)! To cancel such "ROLL" operation, use "NOROLL" (which also will cancel any rolling plotting). Numbers of the "EXAMINE" output are optimally encoded within the available, user-controlled space. It is input to the "FORM" subcommand that defines the column width. So, if 12 decimal digits were wanted for TWOPI instead of the five that are shown, this could have been requested. The ability to tailor output precision to user needs is a powerful feature of the new "EXAMINE". Another advantage is the ability to make selective changes (e.g., a correction) without redefining the whole display. The "LIST" and "FIND" commands are useful in determining what the available variable names are, and where such data is stored in the computer memory. Consider first several lines of a representative "LIST" display: SPY: LIST Row Number 10 11 12

Symbol Word Name Address TCLOCK 1204348 ABUFF 1187434 CI1 1201032

Vector? (Yes=1) 1 0 0

Ascii? (Yes=1) 1 80 0

Next : 10,12

687

Symbols

:

The heading (lines 2 and 3) shows that 687 distinct symbols are available to the user. Had the user sent "ALL" instead of "10,12" in response to the prompt of the heading, he would have received all 687 rows instead of just rows 10 through 12. The "Word Address" column shows the result of memory location function "LOCINT" applied to the symbol in question. The next column distinguishes between vectors and scalars (note that only TCLOCK is a vector). Finally, there is a distinction between numeric and CHARACTER variables. The zero for CI1 signifies a numeric variable, whereas the unity of TCLOCK is a special positive symbol indicating ALPHANUMERIC (A6) usage. Positive values other than the special value of unity are byte lengths (note that ABUFF is for 80-column card images). But what if the user does not know where a symbol of interest is located? The "FIND" command will locate the row number, as shown by the following example: SPY: FIND Symbol index 11 657

Word address 1187434 1133096

Address change 1187434 -54338

Next symbol : ABUFF : KODEBR :

The output is produced one row at a time, as the user requests a different symbol. The first request was for ABUFF, note, and the second was for KODEBR. The wild card "*" is honored here much as it is for VAX/VMS directory commands. So, if the user wanted to find all symbols that contained the character string "BUS", he should key "*BUS*". "DEPOSIT"##allows the user to change the contents of any cell of the EMTP tables. Of course, some changes to EMTP variables will be common enough that special code has been written for that purpose. An example is the SPY command "IOUT", which shows the user the current value of this variable at the same time it prompts him for a revised value. If such a dedicated command exists, and will perform the desired modification, it is preferable. But often no such specialized command exists, in which case "DEPOSIT" must be used.

18

Rulebook ATP (junio 1996 - internet)

H16

19

Just as with "EXAMINE", the memory location or locations of interest are identified to "DEPOSIT" by means of a symbol name and a subscript range (allowing vector deposits). There is a lot of power here, so the user should be careful. Those who do not know much about the internal workings of the EMTP really should use this tool only after having been advised by some EMTP expert. In any case, an illustration follows: SPY: DEPOSIT SEND EMTP VARIABLE: IPRSUP=9 SEND EMTP VARIABLE: VOLTI(3:5)=0.0 SEND EMTP VARIABLE: Two operations are shown here: first a scalar change, and second a vector change (zeroing cells 3 through 5 of vector VOLTI). While most commonly subscripts will only be applied to a vector, no such program restriction exists. For example, if the user wants to see what integer is located one word beyond the scalar IPRSUP, he could examine IPRSUP(2). This works with either "EXAMINE" or "DEPOSIT". XVI-C-7.

Table Dumping/Restoring:

SAVE,

RESTORE,

SLEEP,

WAKE,

WHEN

Table dumping is the saving of every state variable of an ongoing EMTP simulation. The subsequent reloading of the copy of variables into original locations in memory is called table restoration. Such table dumping and restoration can be accomplished interactively using the "SAVE" and "RESTORE" commands of SPY, which allow the user to back up time on the simulation clock (assuming that simulation time will advance between the time of saving and the time of restoration). Any interactive simulation that involves the repetitive solution of the same basic problem, only with some parameter (e.g., some control system gain) altered between successive solutions, will normally require such table dumping and restoring. After table restoration, but before the simulation is actually restared, the user normally will modify EMTP variables somehow (e.g., using the "DEPOSIT" command of SPY). After all, the user normally has no interest in solving the identical same problem twice. The just-mentioned "SAVE" and "RESTORE" commands of SPY are for use during a single program execution. The resulting storage of EMTP tables is volatile, and it will disappear if either execution is terminated, or if the computer crashes. Should the user want to save tables permanently, then it is the SPY "SLEEP" command that he should use. This is nothing more than an interactive connection to the batch-mode feature involving integer miscellaneous data parameter MEMSAV#=#1 (see Section II-B). To restart such a sleeping EMTP simulation, use the SPY "WAKE" command, which is the interactive equivalent of the batch-mode "START#AGAIN" request (see Section II-A). The "WHEN" command allows the user to delay table saving or restoring until some later, user-specified time. The user merely follows the request word by the time T-when in seconds, separated by one or more blanks. The following illustration is typical: SPY: when .150 Time of "SAVE/RESTORE"

changed from 0.00000000E+00

to 1.50000000E-01

Note that the user keyed the command in lower-case, which was acceptable because KINSEN#=#1 of the STARTUP file instructs the program to convert all lower case to upper case. The confirmation line shows both the old and new values for the time of table handling T-when. The initialization value of zero (meaning no delay for table handling) will always be in effect unless the user modifies it as in this example.

Rulebook ATP (junio 1996 - internet)

H16

Illustrative usage of "SAVE" and "RESTORE" can be found in standard SPY command file number 3, which runs itself. Just send "@3" in the SPY window at the first opportunity, and sit back and watch the show. Just remember that it is an illustration, not a practical application: no variables are altered following table restoration. The speed of table dumping and restoration is highly dependent upon computer system. It is DEC#VAX for which we have found the ideal solution (a single block transfer from memory to memory for the dominant "LABCOM" portion of tables), so VAX is the model for other systems. Apollo is still slow, due to random ordering of the COMMON blocks of "LABCOM". More work is needed (we have ideas, but just have not found the time to do the work). For a system that is painfully slow, the interactive user of "SAVE" and "RESTORE" will want to minimize EMTP table size by carefully choosing his input List Sizes for "VARDIM" (see Section I-G). XVI-C-8.

"DICE"

for Statistical Tabulation of Monte Carlo Simulation

The "DICE" command is meaningful only when the ongoing simulation is a Monte Carlo ("STATISTICS") study. If such a data case were to be executed without SPY, the requested number of energizations NENERG (integer miscellaneous data parameter of Section II-B) would be simulated, followed by statistical tabulation of the variables of interest (as requested by data of Section XII-B). But when using SPY, the number of energizations is set to infinity internally, so it is the user's responsibility to exit the tight loop when he believes answers are smooth enough for his needs. The "DICE" command allows the user to preview the statistical tabulations that normally would be delayed until all simulations are complete. Resulting statistical displays will, of course, be based only on those energizations that will have been completed at the instant of use, however. Variable selection and scaling information for the "DICE" display must be built into the data case just as would be required for batch-mode usage. In case changes to such data are desired during execution, edit the disk file of data cards in a separate window (assuming the user has a workstation such as Apollo), and then reload the file using "DATA". When doing this, just be careful not to add or remove any cards prior to the requests for statistical tabulation, since the card number of the first request for statistical tabulation must remain unchanged. The EMTP itself only provides for LUNIT6 character output of the statistical results. But users of a flexible workstation such as Apollo should have the nicer, vector-graphic alternative, thanks to the inspiration and research of Mr.#E.#J. Michelis of KEMA (Arnhem, The#Netherlands). This involves the simultaneous usage of a separate supporting program "STATPLOT", and "cut and paste" capability of the operating system software. For details, refer to the Apollo Section I-F-1. The termination of a Monte Carlo study will depend upon what more the user wants by way of output. Using SPY, the user will from time to time issue a "DICE" command, in order to see how smooth results have become. Once he is satisfied that distributions are close to assymptotic limits, it only remains to be decided how execution is to be terminated. The quickest way would be an operating system interrupt via the keyboard (e.g., VAX/VMS CTRL-Y or Apollo CTRLQ). Equally effective and nearly as quick is the "SPY" stop command. But either of these quick exits will result in a loss of the small character plots of switching times that normally conclude statistical tabulations. There also would be a loss of the case summary statistics. In order to avoid such a loss, the SPY command "DEPOSIT" should be used to set variable NENERG equal to the current energization number, thereby allowing a natural exit of the Monte Carlo loop

20

Rulebook ATP (junio 1996 - internet)

H16

21

after completion of the current energization. This number should be one of the last outputs to LUNIT6 (at the end of the last line that begins: "Random switching times for energization number"). The final consideration is about possible table saving. Rather than ending execution definitively, one can put the Monte Carlo simulation into hibernation by setting MEMSAV#=#1 at the same time NENERG is altered, if the input data (integer miscellaneous data card) did not set this switch at the very start. XVI-C-9.

Mathematics within Command Files:

"APPEND"

The "APPEND" command provides a gateway to mathematics at the SPY command level. Although much more is possible, and extensions may be more fully developed in the years ahead, the dominant present use is for counting, incrementing, comparing, and jumping --- the ingredients required for looping within command files, and the modification of EMTP data within such a loop. Even before considering what any of the details mean, it might be informative to look at a simple example. The standard command file INCLSPY8.DAT provides an illustration: APPEND { Issue SPY command to enter the world of "APPEND" subcommands MENU { Confirm we are inside "APPEND" by display of possible subcommands SET PRI=4 LEN=1 VAL=0.0 { Initialize REG(4), APPEND reg. number 4, to 0 SET PRI=5 VAL=1.0 { Initialize REG(5), APPEND register number 5, to 1 SET PRI=6 VAL=2 { Initialize REG(6), APPEND register number 6, to 2 ADD PRI=4 SEC=5 LEN=1 STN=3478 { Top of loop : REG(4) = REG(4) + REG(5) KEY PRI=2 MES=SEND_REG(2): { Pause for unused keyboard input to REG(2) LOOK PRI=1 LEN=12 { Display the contents of REG(1) through REG(12) IF PRI=4 .LT. SEC=6 { If REG(4) is less than REG(6), then GOTO LAB=3478 { loop back four lines (to top of loop to increment again) END { Exit "APPEND" command, returning to "SPY:" prompt TIME { Confirm that we have "SPY:" by issuing this simple SPY command The reader is encouraged to execute this file ("@8") on his own computer. There is a loop that will be traversed twice, and each time execution is halted to allow the user to key a number that will be deposited in register number 2. Use distinctive numbers (e.g., "98765"), so that they can be easily recognized in the subsequent display of register contents. Ideally, one would prefer FORTRAN-like capability for the mathematics of SPY. Eventually this may come, much as it already has for TACS (thinking of TACS supplemental variables). But SPY "APPEND" usage is just in its infancy, and something more like assembly language is all that is being provided now. Numerical values must be stored in one of a fixed number (presently 58) of special registers that are identified by a number. Arithmetic is performed only on one or more of these registers. Finally, conditional execution depends on the relative size of two register contents. Once inside the "APPEND" command, a list of the available subcommands can be generated by sending "MENU". The result is as follows: SPY: APPEND >: MENU IF LOAD INIT

GOTO USE KILL

UNUSED COMP ADD SUB CARD KEY

END MUL TAGS

LIB DIV MENU

LOOK COPY

MAP SET

While this is an imposing list, it is possible to understand the overall idea rather quickly by means of a few examples and the summary description of a few general classes of operation.

Rulebook ATP (junio 1996 - internet)

H16

Whereas registers are referred to by number, most often only two registers are involved. For example, one can add the content of one register to another, or one asks whether one register is equal to another. For most such usage, the two registers of interest are referred to as primary and secondary registers, respectively. Symbols are used in that the user first defines these two registers using "tags" such as PRI=3 and SEC=4 (to have register number 3 be the primary register, and register number 4 be the secondary register. Other tags are possible, as illustrated by the following "APPEND" line that uses four tags to describe an addition operation: ADD

PRI=34

SEC=44

LEN=3

INC=1

The "ADD" is the "APPEND" command for addition, with the four tags giving the location and extent of this operation. Vectors are involved, and the tag LEN=3 says that these are of length three. Just as FORTRAN DO-loops can skip cells, so can such vector operations, although such is not being done in this example (the tag INC=1 says that consecutive registers are involved. By definition of the addition command, the primary register is to have the secondary register added to it. Hence registers 44, 45, and 46 are to be added to registers 34, 35, and 36, respectively. Tags must be separated from the command (if any; here, from the "ADD") and from each other by one or more blanks. The command (if any) must come first, and must begin in column one. Thereafter, tags can be placed in any order, and are free-format (except that imbedded blanks within a tag are not allowed, since blanks terminate one tag and start another). "IF"##usage allows for the conditional execution of the following command, if and only if the content of the primary register is related to the content of the secondary register by the appropriate relational operator. Identical to FORTRAN, six relational operators are recognized: .LT.

.LE.

.NE.

.EQ.

.GE.

.GT.

and these must appear somewhere to the right of "IF" (a tag is not used for these operators, note). Just be sure that the relational operator has one or more blanks before and after it, and no imbedded blanks (between the bounding periods). As an illustration, consider: IF

PRI=4 .LT. SEC=42

This is equivalent to the FORTRAN condition IF ( REG(PRI) .LT. REG(SEC) ) Should the condition of the relational operator not be satisfied, then the following "APPEND" command (line of the command procedure, usually) will be discarded. Unlike FORTRAN, the following statement which is to be conditionally executed must always occupy the following line (it can not be added to the line carrying the "IF", nor can it extend to several lines via continuation). "GOTO" provides for an unconditional transfer to another line of the command procedure that is being executed. But unlike the column 1-5 statement number of FORTRAN, the destination here need only be uniquely identified by an alphanumeric string of up to six characters. It is tag "LAB" which identifies the destination of the jump, whereas tag "STN" must appear on the line to which control is to be transferred. Take two such lines out of INCLSPY5.DAT: ADD PRI=4 SEC=5 STN=3478 GOTO LAB=3478 LEN=1

22

Rulebook ATP (junio 1996 - internet)

H16

23

The first of these is the top of the loop, and is identified by the character string "3478". The line itself requests the addition of register number 5 to register number 4. The second line involves an unconditional transfer of SPY control to the first line. The tag "LEN=1" sets the vector length to unity for the just-described register addition. By combining integer counting with "IF" and "GOTO", one has a loop, of course. "ADD", "SUB", "MUL", and "DIV" are the basic arithmetic commands within "APPEND". Vector operations are involved (the "LEN=" tag defines the length), as is possible incrementation of indices by other than unity during the vector operation (use the tag "INC=" to control this). The four summary definitions in equivalent FORTRAN are, respectively: REG(PRI+K) = REG(PRI+K) + REG(SEC+K) REG(PRI+K) = REG(PRI+K) - REG(SEC+K) REG(PRI+K) = REG(PRI+K) * REG(SEC+K). REG(PRI+K) = REG(PRI+K) / REG(SEC+K). For scalar operations (the common case), "K" would be zero in these defintions, and there would be no loop incrementing it. "LIB"##is used to apply a library function to registers beginning with the primary register. The "LEN=" tag controls the number of registers in this vector application. As for the function, it is selected by a "FUN=" tag, with the following choices allowed to the right of the equal sign: "EXP" "SQRT" "RAN" "TIME" "COS" "PI" "ABS" "INT"

-----------------

the EMTP library function "EXPZ" (exponential); the EMTP library function "SQRTZ" (square root); the EMTP library function "RANDNM" (random number); the current EMTP simulation time T in seconds; the EMTP library function "COSZ" (cosine); the circular constant, equal to 3.14159265 ... the EMTP library function "ABSZ" (absolute value); integer truncation (removal of fractional part).

If the reader`s favorite function is missing, complain, since it is trivial to expand the set arbitrarily (only 2 lines of FORTRAN are required for each function). "SET"##allows the user to load registers with constants. This is a vector operation, beginning with the primary register. The value of the constant is defined using the "VAL=" tag. An illustration follows in the next paragraph. "COPY"##allows the user to transfer the contents of one append register to another. The transfer is from the primary to the secondary register, and a vector operation (tags "LEN=" and "INC=" are applicable). "LOOK"##provides observation of register contents. This is a vector operation, beginning with the primary register. As an illustration, consider the definition and observation of three registers: >: SET PRI=12 LEN=3 VAL=3.14 >: LOOK Register contents follow. 1st and last = 12 12 0.314000E+01 0.314000E+01 0.314000E+01

14

"KEY"##allows register definition from the keyboard. This would normally only be used in the middle of a command file. Three tags control the operation. First, "PRI=" and "LEN=" define the range of contiguous registers (a vector),

Rulebook ATP (junio 1996 - internet)

H16

and also the number of free-format values that are to be read from the keyboard. Finally, "MES=" defines a prompt of up to 80 columns, without any imbedded blanks. Without such a prompt, the EMTP user might not know that he was supposed to key some numbers. Or, in the case of two or more requests, he might not know which of the multiple inputs was involved. As a degenerate special case of "KEY" usage, rather than from the keyboard, the required input can be read from the following "APPEND" line (of a command file, normally). Use "MES=NONE" as special request for this in-line data, which may sometimes be simpler or clearer than the use of "SET" for loading registers with numerical values. "CARD"##allows the numeric modification of some data field of a group of EMTP data cards that currently is stored in the card cache of LUNT10. The six required integer parameters come from tags, as follows: PRI --SEC BEG END MOD LEN INC

-------------

Number of the register that is to be used. The numeric contents of this are to be encoded on a data card. LUNT10 number of the card at which modifications begin. Beginning column number of the data field to be defined. Ending column number of the data field to be defined. Mode of the numeric encoding: 0=Real, 1=Integer. The number of consecutive cards to be so modified. To increment PRI in cases of LEN > 1, so that the number being deposited is varied as the card is.

It is in conjunction with the "BEGIN" command of SPY that this "CARD" subcommand of "APPEND" will normally be used. The concept is simple enough. Whereas "DEPOSIT" allows the arbitrary tampering with EMTP tables, some network parameters are buried so as to be inaccessible within the time-step loop. As a result, it is not possible to change such parameters as a simulation is advancing. But it is possible to restart such a simulation at time zero with altered data. This can all be done automatically with a command file. Via arithmetic of "APPEND", the next desired value of some network parameter is computed. This value then is deposited on the card image of interest, after which the solution can be restarted. The result is quite arbitrary parametric studies --- an enormous extension over the one such specialized application that has been hard-coded into EMTP FORTRAN: Monte Carlo studies). As an example of practical interest, consider variation of the inductance of a smoothing reactor of an hvdc filter. An illustration has been built into INCLSPY5.DAT ("@5"). "MAP", "LOAD", "INIT", "KILL", "COMP", and "USE" all are commands that are associated with communication between append registers and the outside world (i.e., either EMTP tables, or a synchronized parallel process. Yet such usage is still highly experimental, and it is not simple. Further, it is dependent upon computer. As a consequence, it is not recommended for anyone other than program developers at the present time. On the other hand, it should be understood that such capability is seen as one possible way to improve the present CSP (concurrent sequential processing) capability of the present "TACS" command of SPY. Refer to Section XVI-C-12 for additional comment about the idea of CSP. XVI-C-10. "RAMP" and "SERIES" for Continuous Linear Variations Some EMTP variables can be changed instantly from one value to a completely different value without difficulty. An example would be the flashover voltage, or the closing time, of a switch. For such cases, the "DEPOSIT" command of SPY is appropriate, since this is the way it operates: instantly and discontinuously. On the other hand, there are variables that must only be altered slowly and smoothly. An example might be the inductance of some series R-L-C branch. In order to avoid abrupt changes, the "RAMP" command was devised. It allows the

24

Rulebook ATP (junio 1996 - internet)

H16

25

user to specify an arbitrary number of beginning and ending times, and beginning and ending parameter values, for linear variations that will occur each time step. Storage for such usage is appended to the U.M.#working space after any normal machine storage, so any such intensive user might consider augmenting List Size#25. The "SERIES" command provides special logic to connect with the "RAMP" command for the variation of series R-L-C branches only. These are common and important enough to deserve special logic of their own. Although discontinuous variations are also allowed, the smooth, ramped change is the more useful and common, probably. At any point prior to overlay 12, the user must declare his intention to tamper with series R-L-C branches by issuing the "SERIES" declaration. Then the program will pause in overlay 12 to allow the user to select those branches that he might later want to vary. The help command provides more details of this high-level command. Yet before the potential user becomes too excited about the powerful idea of ramping EMTP parameters, it should be pointed out that many variables are effectively inaccessible to him. Although he can go through the motions of ramping such variables, the result will not be what it should be because other, unknown program variables that depend upon the ramped variables are not being modified at the same time. The classic case is the time-step size DELTAT, upon which many, many other variables depend. Do not try to ramp DELTAT as shown in a following example, since no good can come of it. Those who are not familiar with internal program structure (i.e., EMTP FORTRAN) are to be discouraged from using "RAMP" for any but the simplest case. Even the veteran developer may need to think a little, and use some trial and error. There are two supporting SPY commands that should be considered at the same time, namely "SERIES" and "YFORM". The first of these should always be used if the parameters of a series R-L-C branch are being ramped, since then the nodal admittance matrix [Y] will be appropriately modified each time step, and that matrix will also be retriangularized. Unfortunately, such quality support for other components is lacking, so if the user knows that [Y] formation and triangularization are required at each time step, he must request it himself, manually. A final potential peril might be mentioned. Actual ramping of variables is handled within SUBROUTINE ANALYT of "ANALYTICAL SOURCES USAGE" fame. But this is an installation-dependent (see Section I-E-1). Hence any intended user of "RAMP" should check that ramping logic has not been removed by those responsible for maintaining the program. There are three basis prompts of shown:

"RAMP",

and these are nested in the order

SPY: RAMP SEND "T-begin", "T-end" (END, SHOW, REWIND) : SEND "F-begin", "F-end" (END) : SEND EMTP VARIABLE: Actually, the final prompt is from "DEPOSIT" to which this "RAMP" logic jumps in order to input and identify the variable. Just as with "DEPOSIT", a vector response is acceptable. An example would be "TX(3:5)", which would result in the simultaneous ramping of three consecutive cells of the TX vector. The order of nesting is intentional. Variables can be specified one after the other as long as both time (the outer loop) and ramp value (the middle loop) remain applicable. When this ceases to be true, send "END" in response to that inner-most prompt and there will be a return to the middle prompt for beginning and ending parameter values. If these "F" values are changed, there will be an

Rulebook ATP (junio 1996 - internet)

H16

26

automatic return to the inner level for more variables. On the other hand, if times must be changed, or if the user is done specifying ramps, sending "END" in response to the middle prompt will return to the outer prompt for times. To erase all previous usage, send "REWIND". To produce a summary table of all ramps, send "SHOW", of which the following is an illustration: Row 1 2

Name I-beg Length T-begin T-end F-begin F-end TX 3. 1. 0.15000E+01 0.25000E+01 0.50000E+07 0.70000E+07 DELTAT 1. 1. 0.75000E+00 0.90000E+00 0.50000E-01 0.75000E-01 No RAMPing before 7.50000000E-01 or after 2.50000000E+00 sec.

It is always prudent to produce this output as the very last operation prior to returning to the "SPY:" prompt (by sending either "SPY" or "END"). This is because it is much easier to spot errors from such a table than it is by reviewing the voluminous input. Note that whereas the user inputs beginning and ending subscripts, the table show the beginning index (unity for a scalar) and the length of the vector that is being ramped. The final line reminds the user of when the first ramp will begin and the last ramp will end. XVI-C-11.

Utilities:

HEADING, TIME, SIZE, LIMIT, HONK, ECHO, WAIT, $, OS

"HEADING"##is the command to produce a new heading for the time-step loop output in the LUNIT6 window. It may be that the user has many output variables, and can not remember which is which. Even if the window can be scrolled backward to find the normal heading, it may be more convenient just to regenerate the heading via this command. "TIME"##is primarily designed to show the current simulation time T (a variable of "BLKCOM"). But since this hardly requires a whole line, the timestep size, the end time TMAX of the study, and the wall-clock time, have all been appended. In case the user wants to check the responsiveness of SPY to keyboard inputs, or to reassure himself that SPY is still alive and well, this is a good, simple command to use. An example follows: SPY: TIME T = 0.200000E+00

TMAX = 0.1000E+20

DELTAT = 0.5000E-01

07.58.44

"SIZE"##and##"LIMIT"##are two simple utilities related to EMTP List Sizes (see Section I-G). Both result in displays of 27 numbers, with 10 numbers per row. The difference is that "SIZE" shows the current actual burden on EMTP tables, where as "LIMIT" shows the table dimensioning. Just as with case summary statistics, if no figure is available, a "-9999" should be displayed. The following illustration was produced during the solution of a slightly modified version of BENCHMARK DC-4: SPY: SIZE 5 5 18 9 0 0 SPY: LIMIT 252 300 50 50 100 150

6 -9999 6

2 -9999 1

9 -9999 -9999

0 0 -9999

695 0 -9999

0 0

1 23

10 0

500 5000 4000

100 -9999 3

2500 -9999 400

40 40 50

1375 4 50

1750 5

75 1600

160 660

"HONK"## is the SPY command that rings the bell of the computer monitor. The following integer, separated by at least one blank, indicates the amplitude of the alert. More detail about this is impossible due to the installationdependent nature of the servicing SUBROUTINE HONKER. An illustration follows: SPY: HONK 5

Rulebook ATP (junio 1996 - internet)

SEND SEVERITY LEVEL OF ALERT (1 TO 10) : 3 Audible alarm began at 02-Apr-88 23.17.38

H16

5

27

bells.

The convention is that zero produces no response, while 10 indicates a disaster (with this latter warning continuing indefinitely until suspended by a user-keyed interrupt). The user will normally avoid the use of ten, which was designed for internally-generated program alarms (e.g., when program storage for plot data has overflowed). As for the mode of usage of "HONK", it will almost always be in a command file, for those cases where there is a need or desire to attract the attention of the operator (who may not be looking at the monitor). "ECHO"##is designed to accumulate keyboard input during testing, so that once an interactive control sequence is perfected, a command file can be established without the necessity of rekeying all of the commands. Also, "ECHO" provides a very compact history of what the user has been doing. An illustration follows: SPY: ECHO SEND DESIRED OPERATION (BEGIN, FILE, SHOW) : SHOW Compacted listing (between "/") of 21 stored commands follows. / TIME / BRANCH / ALL / SPY / FILES / TYPE 1 / @1 / HEADING / LIST / 255,260 / SPY / SIZE / LIST / 1,5 / SPY / LIMIT / BREAK / -150 / GO / ECHO / SHOW SEND DESIRED OPERATION (BEGIN, FILE, SHOW) : In this case, "ECHO" was first requested some 21 SPY commands earlier, when SPY input began to accumulated. At that first usage, the response to the prompt was "BEGIN" --- to begin the accumulation. This time, the request was to "SHOW" the accumulation to date. To terminate such accumulation, send "FILE". There will be an opportunity to save the accumulation in a disk file, but this probably would never be most convenient for the worstation user having "cut and paste" capability. If no disk file is desired, send just a in response to the prompt for a file name. "$"##is the SPY command to send the input line into "CIMAGE" for processing as a conventional $-card of batch-mode usage (see Section I-D). Only the dollar sign in column 1 is mandatory, with all other characters of the line left for "CIMAGE" usage. For an illustration, use "@9" (INCLSPY9.DAT). The most common usage is to turn on DIAGNOSTIC printout via the $DEBUG command. "WAIT"##is the command for all aspects of program execution to hibernate for a fixed period of time. The user merely follows the request word by the desired delay T-delay in seconds, separated by one or more blanks. The following illustration is typical: SPY: WAIT 3 The "TDELAY"

delay will be accomplished of FUNCTION RFUNL1.

within

installation-dependent

function

"OS"##is the command for the execution of an operating system command by SPY. It is highly installation-dependent, since not all computers allow such flexibility, and not all program versions provide for it. For example, the Apollo program version has no such feature, but needs none, since the operating system provides windows in which the user can execute any operating system command of interest as the EMTP executes. On the other hand, the SUN version is fully empowered, and seems able to execute any UNIX command via "OS". Similarly, the PC XT-compatible version using Lahey FORTRAN seems able to execute any MS-DOS command. If in doubt about the computer system of interest, consult the appropriate installation-dependent pages of Section I-F, or experiment with the

Rulebook ATP (junio 1996 - internet)

H16

feature (any computer having no such capability should display a message about unavailability). "DEBUG"##is the command to turn on the diagnostic printout of SPY only. This defines variable IPRSUP. The initial value comes from STARTUP. Although there is some overlap, note that in general diagnostic of SPY is different than diagnostic of the simulation half. To control the latter from SPY, send "$DEBUG level". "IOUT"##is the command to modify the printout frequency (which is stored in the FORTRAN variable of the same name). Follow this command by the desired new output frequency, separated from the command by one or more blanks. XVI-C-12.

"TACS" :

Gateway to Concurrent Sequential Processing (CSP)

Although still the subject of research and experimentation, the concept of Concurrent Sequential Processing (CSP) is important enough to deserve mention. The SPY command that provides access to this feature is "TACS". The general concept of CSP is simple enough: Allow the user to send arbitrary EMTP variables to TACS each time step for processing as supplemental variables. Also allow him to bring back the TACS results each time step, and apply those results to arbitary variables. The use of such computation every time step explains the adjective "concurrent," and "sequential" comes from the fact that this is an inherent restriction of TACS supplemental variables. Entry to summarized:

"TACS"

reveals several

options, which

now will

be briefly

SPY: TACS SEND CONTROL (REWIND, SOURCE, SUPPLEMENTAL, PATCH, SHOW, END) : Sending "REWIND" will erase all previous such definitions, so that definitions will begin from level zero. If "SOURCE" is sent, all following input is assumed to be TACS source cards, until terminated by an "END" card. If "SUPPLEMENTAL" is sent, then all following input is assumed to be TACS supplemental variable/device data cards, also until an "END" card is encountered. The subcommand "PATCH" allows the user to connect any EMTP variables to his TACS sources (in order to define the inputs). It also allows the user to apply supplemental variable results to any EMTP variable. The "any" comes from the use of a memory address of the SPY commands "LIST" or "FIND", just as "EXAMINE" or "DEPOSIT" are quite unrestricted. There will be separate prompts for all such TACS input and output connections. When all such connections are complete, "SHOW" can be used to display a summary table of all TACS CSP input/output connections. The future of the "TACS" command depends in large measure on future evolutionary development. The "TACS" command has the advantage that it is universal, and requires no computer-dependent special features. On the other hand, the processing is limited by the rules of TACS supplemental variables, which are far less general than the FORTRAN compiler (e.g., TACS can not yet invert a matrix easily, or perform fast Fourier transformation, or compute with limited precision). As for the next generation of TACS (already being designed), who can be sure? One alternative to using TACS for CSP involves a synchronized, detached process, which provides much more flexibility for those computers that can handle the operation efficiently. Hence, the soon-to-be-improved "TACS" is a direct competitor for certain not-yet-fully-developed features of the "APPEND" command. In summary, it is clear that the concept of CSP will remain valid, and flexibility of the implementation will improve. But details of such future usage are quite unclear at the present time.

28

Rulebook ATP (junio 1996 - internet)

XVI-C-13.

Servicing [Y] Changes:

YFORM,

NOY,

H16

FACTOR,

29

NOF

Due to practical complications, the production user most likely will have no explicit, manual use for the four SPY commands of this present section (see the heading). They are associated with reforming the nodal admittance matrix [Y] of the time-step loop, and with retriangularizing it. In idealistic theory, whenever the user modifies the computer storage of some network parameter (e.g., by using "DEPOSIT", or CSP of "TACS", or a synchronized parallel process of "APPEND"), he should have [Y] reformed and also retriangularized. Then all would be well forever after, right? Right in theory, but wrong in practice today, unfortunately. Due to the dependence of other program variables on the one being changed by SPY, such reformation of [Y] can only be successful in certain cases. It will take a lot of reprogramming before the time step DELTAT can so be modified. So, only researchers should be using these functions explicitely for a while. Yet the production user may well be exploting the logic of these functions implicitely, without even knowing it. For example, the "RAMP" and "SERIES" commands connect with the code just mentioned. Hence there is no question about the possible removal of unused features. . Batch-Mode Execution of SPY Commands:

$SPY

and

$SPYEND

There is a batch-mode connection to SPY, for those users who can foresee all details of SPY input in advance, before EMTP execution begins. For example, a user otherwise might have no interest in interactive observation and control. However, SPY might provide some special control that might be needed for the data case of interest. A second example of usefulness is for the documentation of SPY capability using standard test cases. The user is referred to BENCHMARK DC-56 and DC-57 as illustrations. $SPY##(keyed in columns 1-4 of an EMTP data card) is the key that allows SPY commands to mixed with normal EMTP data. This request must precede a block of SPY commands, and $SPYEND must follow that block to mark the end. As an illustration of such usage, consider data cards extracted from BENCHMARK DC-56: 14GEN 70. .1591549 -1. $SPY { Request of "CIMAGE" ($-card) to begin batch-mode SPY connection $DEBUG, 0, { 1st SPY command is trivial, ineffective change of DIAGNOSTIC ===< < Etc. (some 56 lines have been omitted to save space) > >=== BREAK { It is the latter: no more "@" cards read until "BREAK" occurs TIME { Trivial SPY command just to demonstrate that we have "SPY:" prompt STOP { This SPY command will terminate execution of the data case $SPYEND { Bound on in-line SPY commands; back to batch-mode program data BLANK card ending all electric sources It is seen that a large block of SPY commands has been inserted after the last EMTP source card, before the blank card ending such sources. Although $SPY looks like a $-card that might be processed by "CIMAGE" (see Section I-D for details), this is not the case. Just as with $INCLUDE, $SPY is processed at the very beginning of execution, where the following happens. All card images following the initiation of $SPY, and preceding the termination of $SPYEND, are in fact removed from the EMTP data card cache of LUNT10, and are placed in a separate disk file named "SPYFILE1.DAT". This is a reserved name, so the user should avoid it and all related files (as the serialization digit preceding the dot varies from 1 through 9). The $SPY card is converted to the following:

Rulebook ATP (junio 1996 - internet)

$OPEN,

UNIT=17

STATUS=OLD

H16

FILE=SPYFILE1.DAT

which will, of course, be serviced by "CIMAGE". This really is just a special connection for what otherwise would be a SPY command file ("@" usage) without arguments. Note the use of fixed I/O channel number#17 --- different from any other program usage (to avoid conflicts) provided the user avoids this number in his STARTUP file declarations for LUNIT1, etc. The location of $SPY usage within an EMTP data case is critical, since this defines the point at which the program begins reading the SPY commands. This does not imply that all SPY commands will be read at this point, however. The user generally will delay the input of other commands by some device such as a "BREAK" command followed by "WAIT" and "BREAK" (to inhibit further input until the break point has been reached). A good illustration is provided by BENCHMARK DC-56. It is possible to have multiple $SPY and $SPYEND declarations, if this proves to be necessary. The present program limit is nine, due to the single serialization digit that follows "SPYFILE" as explained above. There is no need to be sure that one group of SPY commands is exhausted before the next group is requested, since the program handles the transition by brute force. Prior to the connecting of a new "SPYFILE" in "CIMAGE", any old one is disconnected --whether or not all records have been read from the old file. An illustration of multiple $SPY declarations can be found in BENCHMARK DC-57. . Use of SPY "PLOT" Instead of Separate Program

"TPLOT"

A special, new, degenerate application of "SPY" has nothing to do with simulation. Rather, it concerns the plotting of preceding simulations -- a function that previously required a separate, special plotting program "TPPLOT". A separate program no longer is needed, and in many cases, is no longer desired. While the reader could learn this new usage of the EMTP on his own from the detailed information of Section XVI-C, it is important enough to deserve special mention in this special section. Usage of the EMTP just as a plotting program has the advantage of speedier response for the plotting of large data files. Rather than input data points of curves from disk as they are needed (which is the "TPPLOT" approach), the EMTP loads the contents of a ".PL4" plot file into memory at the very start. Then input is either from memory or via paging (virtual memory management), which is an order of magnitude faster than FORTRAN READ operations from an I/O unit. For big data cases, this can save a lot of time, so is worth considering. The really serious user may even want to create a special EMTP version in which the simulation code has been cut out in order to remove the burden of all that extra code and table space, thereby allowing the expansion of plotting space without further burdening the computer. Plotting via the EMTP is simple enough. Begin EMTP execution, and select SPY, of course. Then key the following SPY commands, in order: 1) 2) 3) 4) 5) 6) 7) 8) 9) 10)

DATA --- Request of EMTP for specification of disk file disk_file --- contains a single $OPEN card (see below) STEP --- Instruct SPY to halt the simulation everywhere GO --- Begin EMTP execution. Repeat this 4 times! SPACE --- SPY command allowing management of memory PLOT --- It is plot data storage that we will manage READ --- We want to read plot data points into memory ALL --- Time range of data to be loaded (the whole file) 1 --- Handle every N-th time step, where N = 1 here 0 --- No offset for memory storage of the plot data

30

Rulebook ATP (junio 1996 - internet)

11) SPY

---

H16

31

After plot points are all loaded, exit to "SPY:"

For an illustration of such execution that connects and loads the plot data of the file named DC3TO54.PL4 (created by solving BENCHMARK DC-3), send the SPY command "@0" as the first SPY input. That is, inspect and test the command file INCLSPY0.DAT, the last entry of the "FILES" display. The disk file that is named in step#2 contains just a single card: a $OPEN statement that connects the desired ".PL4" disk file of raw plot data points to unit LUNIT4. The multiple "GO" commands merely serve to step past unwanted SPY break points to where EMTP data normally should be read, in UTPF overlay number 1. The new-case heading should appear, and after it, the interpreted copy of the $OPEN card that is contained within the disk file of step#2. The remaining SPY commands serve to load this data from disk into the EMTP's virtual memory, and finally exit from the "SPACE" command (step#11). When execution of the command file ends, there will be a "SPY:" prompt to which the user can respond with "PLOT" as the plotting begins. Hereafter, details are no different than have already been documented in Section XVI-C-4. Under what circumstances might a user not want to do his plotting this way, using the EMTP? First, there is little or no speed incentive for small ".PL4" files. Since starting the big EMTP is slower than starting the small, separate program "TPPLOT", and since the EMTP requires special steps as just listed, use of the EMTP in such cases is probably more trouble than it is worth. Second, there may be a space problem for truly enormous ".PL4" files. Remember that "TPPLOT" has no limit on the size of the ".PL4" file, whereas the EMTP does (since all such points must be loaded into memory). If a properly dimensioned version of the EMTP is not immediately available, the resizing of tables represents an added complication. Third, the EMTP has no built-in hard copy connection using CalComp plots the way "TPPLOT" does (the "COPY" command). Whereas some computers may have hardware and an operating system that automatically provide hard copies of the screen, this is not universal, and usage of it may not be as convenient. In conclusion, SPY "PLOT" is a powerful new tool, but it is not a general replacement for other froms of EMTP plotting (including "TPPLOT") for all users in all cases. $OPEN##provides an alternate, newer, even more flexible form of such SPY plotting. Rather than burying the file-connection command in a separate file (see "disk_file" of step 2 above), this command can be sent directly through the SPY window. The $-command of SPY allows this more unified treatment. Otherwise, not much is changed. For an illustration, see INCLSPY9.DAT (try "@9").

Rulebook ATP (junio 1996 - internet)

H17

1

XVII-A. JMARTI setup Purpose and applications The supporting routine JMARTI setup can generate only one model (travelling wave model) and is only valid for conventional overhead lines. In the travelling wave model, both the characteristic impedance Zc as well as the propagation function A1 are obtained using modal characteristics, calculated over a user defined frequency range, under the assumption of a constant transformation matrix (phase-mode transformation). Then, both Zi and Ai undergo a high-order rational function approximaiton. In the time domain, this fitting is represented by a sum of real exponentials, thus allowing usage of recursive convolution methods in the time domain. The order of fitting no longer equals two (like it was the case in Semlyen setup). Typical figures for the order are 5...10. The generated LUNIT7 punched card output immediately is in the proper input format to be used for a subsequent transient run, as explained in section IV-D-3. In order to allow the program to calculate the necessary modal characteristics for the conductor system under consideration, the JMARTI code imbeds the LINE CONSTANTS or CABLE CONSTANTS code. For an example using LINE CONSTANTS, we refer to benchmark DCNEW3, 2nd subcase of DCNEW4, DCNEW5 and DCNEW6. For CABLE CONSTANTS, results are considered to be unreliable because the assumption of constant transformation matrix all over the frequency range does not hold for cables. Input structure Input data cards for JMARTI setup involve an imbedded LINE CONSTANTS data case following the initial JMARTI declarations. 1. BEGIN NEW DATA CASE 2. JMARTI SETUP REQUEST 3. Optional special request cards BRANCH 4. A LINE CONSTANTS data case 5. JMARTI miscellaneous fitter specifications or DEFAULT card 6. BLANK card terminating JMARTI 7. BEGIN NEW DATA CASE 10. BLANK CARD terminating all cases Let us discuss the above card formats in more detail now. Whenever appropriate, distinction between the transposed and untransposed case will be clarified. BEGIN NEW DATA CASE JMARTI setup request

Rulebook ATP (junio 1996 - internet)

H17

151 Parameters: PDTO: controls possible reduction in the order of approximating rational functions. Default value = 1. Note: This parameter PDTO is not actually used by the fitter itself, but is merely passed along from the declaration card just shown to any branch cards that later are to be punched. Indeed, in the punched cards of section IV-D-3, parameter PDTO can be found back on cols. 33-38 and has the following meaning: The fitter always returns to LUNIT7 the full order of the approximating rational functions for Zc and A1. The higher the order, the more poles and zeroes are being calculated. During the transient run, the approximative functions are taken into account using recursive convolution and transfer from modal domain to phase domain. These calculations are very timeconsuming. -

In order to speed up calculations during the transient run, the user can specify a threshold for the order reduction (i.e. reduce the number of poles and zeroes approximating Zc and A1). Usage is illustrated in DCNEW4 (first subcase versus second subcase).

Optional BRANCH request

152 The node names should be placed in pairs (sending end, receiving end), phase per phase. When specified, these node names will also appear in the LUNIT7 punched output. When omitted, the user himself will have to enter the desired node names in the punched output file.

2

Rulebook ATP (junio 1996 - internet)

H17

3

Next follows a LINE CONSTANTS data case As explained in section XXI, such input sequence typically looks as follows: a. b. c. d. e. f. g.

LINE CONSTANTS request card unit specification card (ENGLISH or METRIC) conductor cards BLANK card ending conductor cards 2 or 3 frequency cards BLANK card ending frequency cards BLANK card ending LINE CONSTANTS imbedded usage

Note regarding frequency cards: - Depending on whether or not the line is assumed to be transposed (MODALspecification; cols. 69-70) or not, the number of frequency cards differs. - For the untransposed case (MODAL = 1): - Three frequency cards are needed - The first card (transient frequency card) contains the single frequency FREQTRAN at which the transformation matrix should be calculated. Recall that in effect, such matrix is frequency dependent. Hence, FREQTRAN somehow should be related with thte frequency of the transient phenomena one wants to observe. For overhead lines, 5000 Hz is a typical value. Finally, also remark that via parameter TR, the user can specify details on the transformation matrix to be used. It is even possible to use a user-defined rather than a calculated transformation matrix. - The second card (steady state frequency card) bears the single frequency FREQSS at which the steady state values should be calculated. Typically, this is the frequency value of the type-14 sources. - The third card (frequency looping card) specifies the frequency range to loop over for the calculation of the modal parameters Zc and A1. Typically, the starting frequency FREQINIT is set to 0.01 Hz, the number of decades DEC equals 8 or 9 and one must take PNT = 10 points per decade. Via parameter TR, the user can specify details on the transformation matrix to be used. =0: blank or -2 (this option is recommended): the eigenvectors (= columns of the complex transormation matrix) will be rotated closer to the real axis, so that their imaginary part is assumed to become negligible. =-9:the full complex transformation matrix will be used. =-1: the user needs to define his own current transformation matrix, immediately following the first frequency card. - RHO, FCAR, DIST, ISEG and MODAL should be equal on all 3 cards. Hence, the card format looks as follows:

153

Rulebook ATP (junio 1996 - internet)

H17

- For the transposed case (MODAL = 0): - Only two frequency cards needed. Recall that no transient frequency card is needed, because the transformation matrix in case of a transposed case is known a priori. Furthermore, in this special case, the matrix is constant throughout the frequency range. - The first card (steady state card) bears the single frequency FREQSS at which the steady state values should be calculated. Typically, this is the frequency value of the type-14 sources. - The second card (frequency looping card) specifies the frequency range to loop over for the calculation of the modal parameters Zc and A1. Typically, The starting frequency FREQINIT is set to 0.01 Hz, the number of decades DEC equals 8 or 9 and one must take PNT = 10 points per decade. - RHO, FCAR, DIST, ISEG and MODAL should be equal on all 2 cards. Hence, the card format looks as follows:

154 JMARTI miscellaneous fitter specifications -

There are two possible ways to specify miscellaneous fitter specifications: using the DEFAULT option. In this case, only one card is needed. explicite definition of fitter parameters. In this case, three cards are needed. Let us discuss both possibilities in more detail now.

5.a Using the DEFAULT option

155 This is the only card one needs. the non-experienced user.

Such request is generally recommended for

5.b Explicit definition of fitter parameters This option should be selected by the experienced user, who wants to have control over some (or all) of the individual fitting parameters.

4

Rulebook ATP (junio 1996 - internet)

H17

5

Three different types of parameters can be specified on the different fitter cards: - miscellaneous data - parameters for Zc fitting - parameters for A1 fitting Let us discuss these three card formats in more detail now. 5.b.1 Miscellaneous data

156 Parameters: IDEBUG provides control of diagnostic printout during the JMarti fitting. A value of unity is recommended for normal production usage, since this will result in a display of the number of poles and zeroes, and the accuracy of the fit, for each iteration of the corners-allocation loop. Higher values (2, 3 or 4) result in more output. IPUNCH controls whether or not branch cards will be punched after the fitting. Value zero will produce JMarti branch cards, whereas unity will omit such output. KOUTPR controls visibility of JMarti input data card interpretation of the subsequent transient simulation. Recognized, distinct values of KOUTPR are zero, unity, and two. The user-keyed value is placed on resultant branch cards (if any) as variable SKIP. For further details, refer to this variable in Section IV-D-3, Rule 1. GMODE is the conductor conductance in the modal domain (the same as phase to ground conductance in the phase domain, if such conductance is assumed to be the same for all phases, and if there is no mutual conductance between phases. The default value is 3.E-8 mhos/km (equivalent to 4.8E-8 mhos/mile). The units of length should agree with those used within LINE CONSTANTS data. 5.b.2 Parameters for Zc fitting

157 NEXMIS will normally be left blank. A nonzero value indicates the mode number for which a different fitting card is to be supplied. A blank means that all modes of characteristic impedance Z c will use the same fitting card.

Rulebook ATP (junio 1996 - internet)

H17

A nonzero value gives the mode of interest. For example, NEXMIS = 3 means that the characteristic impedance of the third mode is to be fitted using parameters specified on a new fitting card. EPSTOL is the error tolerance for fitting, in percent. The fitting error is evaluated in a least-squares sense, and averaged over a range that excludes initial or final asymptotic regions (by 0.001%). The default value for blank or zero is 0.30%. NORMAX is the maximum order (maximum number of poles) to be allowed for the rational function approximation. Blank or zero is given a default value of 30. IECODE is a switch to determine the mode of fitting. If zero, EPSTOL is used to determine the order of the approximating function. If unity, then EPSTOL has no effect on the order. Instead, the best fit with an order less than or equal to NORMAX is determined. Of course, when using the EPSTOL criterion, it is possible that a fit within this tolerance is not possible. The user will be infored of such difficulty of fitting only if IDEBUG is positive. Increasing the value of NORMAX might in such cases allow the EPSTOL criterion to be met, but not always. Higher order does not guarantee greater accuracy, since the logic is imperfect. So use engineering judgement (moderation in all things). IFWTA controls tabular printout of the fitting. The value unity will result in the display of a table comparing the magnitude and phase angle of the rational approximation with the therortical values as a function of frequency (rows of the table). Zero will suppress such output. IFPLOT controls graphical printout. The value unity will produce a character (line printer) plot comparing the magnitude of the rational approximation with the theoretical value as a function of frequency. Zero will suppress such output. IFDAT controls possible tabular printout of transmission circuit parameters as a function of frequency. The value unity will result in such a display, whereas zero will suppress such output. INELIM is a switch controlling logic of the fitting process. The value zero means that order increases of the approximating function will end if and when the error becomes five times larger than the previous minimum. On the other hand, unity allows increases of order regardless of whether there is improvement. This is within limits represented by parameters NORMAX or EPSTOL, of course. 5.b.3 Parameters of A1 fitting

158 Parameters:

6

Rulebook ATP (junio 1996 - internet)

H17

7

All variables except the first and the last have meanings that are identical to those for Zc (see preceding section XVII-B-2). The first, NEXMIS, differs in that a minus sign is required to indicate a mode of A1 rather than a mode of Zc. The final parameter is a new one in cols. 65-72 named AMINA1. Data points with magnitude less than AMINA1 will be discarded during the fitting process. Blank or zero is given a default value of 1/20. BLANK card terminating JMARTI BEGIN NEW DATA CASE BLANK card terminating all cases Output structure For a description of the output structure, output, we refer to section IV-D-3 (branch cards).

more

especially

the

LUNIT7

Example For examples, we refer to benchmarks DCNEW3, DCNEW4, DCNEW5 and DCNEW6. XXI. Supporting routines Supporting routines are used to translate some input data, which is known for the user, to some other output data which directly can be used in an EMTP application. One group of these supporting routines is treated in this chapter, while other supporting routines are treated in some separated chapters. Following supporting routines are treated in this chapter: 1) 2) 3) 4) 5) 6) 7) 8) 9) 10)

"XFORMER" to derive [R], [[Equation: omega]L] of single-phase transformers "OBSERVE PARALLEL MONTE CARLO" for parallel "STATISTICS" "BCTRAN" to derive [A], [R] or [R], [[Equation: omega]L] of multi-phase transformer "CHANGE SWITCH" to convert former switched R, L elements to type-99, -98 "OLD TO NEW ZNO" to update pre-"M39" ZnO data cards "DATA BASE MODULE" "SATURA" to derive ([Equation: psi],i) peakvalue curves "HYSDAT" to create type-96 hysteretic inductor characteristic "ZNO FITTER" to punch type-92 nonlinear branch cards Convert saturable transformer cards to linear equivalent [R], [L]

Rulebook ATP (junio 1996 - internet)

H19a

1

XIX.A "XFORMER" to derive [R], [wL] of single-phase transformers The supporting routine "XFORMER" can be used to derive a linear [R]-[wL] representation for single-phase transformers (both 2and 3-winding transformers), using test data of the excitation test and short-circuit test at the rated frequency. Excitation losses can't be taken into account by this model. On the other hand, these losses can be neglected for a single-phase transformer, recall. The shortcircuit losses can (and should) be taken into account, however. Stray capacitances are ignored in this representation, which therefore is only valid up to a few kHz. On the other hand, the model is not valid for extremely low frequencies either. The latter is mainly due to the fact that the XFORMER model uses admittances internally without first separating the resistive and inductive parts. At DC conditions, this mathematical manupulation then results in non-zero off-diagonal resistive elements, which indicate induced voltages in the secondary winding. At DC, of course, such voltage induction is physically impossible. Non-linear behaviour can't be included in the "XFORMER" model proper. Such behaviour (saturation or hysteresis) could be taken into account, however, by adding type 93, 96 or 98 elements, connected to the proper transformer terminals (i.e. those windings that are closest to the core) in the electrical network, during the steady-state or transient run. In such case, however, it would be mandatory to specify Iex = 0, since otherwise, the magnetizing inductance will be taken into account twice. On the other hand, of course, I ex = 0 is impossible, since this would result in an admittance matrix being singular. Hence, XFORMER will not be able to take saturation into account properly. Usage of BCTRAN is desirable in such case. Alternatively, for the two-winding transformer, this problem can be circumvented by using the saturable transformer component (which explicitely takes into account the saturation). In the 3-winding case, however, the saturable transformer component can become numerically instable for unknown reasons. Although this model uses the admittance notation internally, nevertheless it is mandatory that the magnetizing current certainly is not near-zero (or zero). Indeed, if the user specifies too little magnetizing current, the magnetizing impedance gets lost in the admittance matrix that becomes nearly singular, so that it can't be inverted any more to result in the desired [R]-[wL] matrices. Remark that the floating-point miscellaneous data parameter EPSLIN (see Section II-B) is used as a singularity tolerance. In cases with small magnetizing current, it is more appropriate to use the "BCTRAN" model of Section XIX-C. For a 2-winding transformer, the equivalent circuit as created by XFORMER looks as follows:

159 The punched card output of XFORMER can be used immediately as input branch cards for mutually coupled R-wL elements (TYPE 51, 52, ...) in the electrical network (Section IV-C). Do not forget to set the miscellaneous parameter XOPT (to be used during the transient run) equal to the value of the rated frequency used to

Rulebook ATP (junio 1996 - internet)

H19a

2

perform the excitation- and short-circuit test. Indeed, all input data are only valid at this implicit frequency. Further, note that it is impossible (even useless) to try to reset the value of this frequency!! The following will "XFORMER" cases.

explain

the

input

data-deck

structure

for

all

possible

Rulebook ATP (junio 1996 - internet)

H19a

3

XIX.A.1 Input data-deck structure for "XFORMER" The only differences between the input rules for a 2-winding and a 3-winding transformer are the following: - (point 4)

Number of terminal nodes, mentioned on the "BRANCH" card.

- (point 5)

Number of cards "NC" in the grouping specifying the electrical parameters of the transformer.

- (point 6) The output for a 2-winding transformer only contains TYPE 51-52 branch cards, whereas the output for a 3-winding transformer contains TYPE 51-53 branch cards. Suppose that a user wants to model a single-phase, 2- or 3-winding transformer using the XFORMER supporting routine. His data deck then should have the following structure: 1. BEGIN NEW DATA CASE 2. XFORMER - special-request word (transfers control to the proper overlay) 3. $ERASE - request (optional) (erase all card images that might exist in punch buffer) 4. BRANCH - card (optional) (name the terminal nodes of the transformer windings) 5. "NC" data cards (specify the electrical parameters of the transformer) NC = 2 for the 2-winding case NC = 4 for the 3-winding case 6. $PUNCH - request (optional) (flush contents of punch buffer of preceding XFORMER case) Remark that the data of points 4, 5 and 6 may be repeated as many times as desired. Each such grouping is a separate data case within the "XFORMER" setup, corresponding to a different transformer. 7. BLANK CARD ending all XFORMER cases 8. BEGIN NEW DATA CASE - card to begin new EMTP data case. As for an example of such input for a single-phase, 3-winding transformer, we refer to benchmark DC-15. Let's discuss the different card formats one by one, in closer detail now. 1. The "BEGIN NEW DATA CASE" card comes first.

160

Rulebook ATP (junio 1996 - internet)

H19a

2. Next comes the "XFORMER" card, a special-request card which serves to transfer control to the overlay in question.

161 3. Next comes the optional "$ERASE" card, a special-request card which serves to reset the punch buffer (LUNIT7).

162 NOTE: This optional $ERASE card should be used whenever punchcard output is requested as input for the electrical network. 4. Next comes the optional "BRANCH" card, which serves to name the terminal nodes of the transformer windings. Thus, each winding will be interpreted as a branch between "BUS1" and "BUS2". Since all of these branches will be represented as TYPE-5x elements, mutual coupling can be taken into account. NOTE: This optional card should be used whenever punched card output is requested as input for the electrical network. The card format is slightly different for the 2- and 3-winding cases. In the FORMAT diagrams, "HV" stands for high voltage, "LV" stands for low voltage, and "MED" stands for medium voltage. a) The 2-winding case:

163

4

Rulebook ATP (junio 1996 - internet)

H19a

5

b) The 3-winding case:

164

5. Following are data cards, specifying the electrical transformer. These cards can be split into two parts:

parameters

of

the

- The first card groups excitation data and the output specification request. This card is slightly different for both 2- and 3-winding transformers (parameter "NW" in column 1). - The second group of cards contains short-circuit data. The number of cards in this second grouping depends on the number of windings. For the 2-winding case, only one card will be needed, but for the 3-winding case, 3 cards are needed. 5.1. First comes one card, containing both the excitation data and the output specification request. The only difference between the 2- and 3-winding cases is the value of the parameter "NW".

165 Parameters: NW

: Number of windings. =2 : 2-winding transformer =3 : 3-winding transformer

IMAGN: The transformer magnetizing current (in percent). Use following formula:

Rulebook ATP (junio 1996 - internet)

IMAGN = I ex VOLT

H19a

2 100 16 SBASE

where Iex = measured excitation current VOLT2 = rated voltage of LV-winding SBASE = power base Note that the case of "IMAGN = 0" will result in an error message. In such case, the user is adviced to use the BCTRAN model (section XIX-C). Further, it is accurate enough to use the magnitude of the value of the exciting current rather than the exact (but smaller) magnetizing current. SBASE: Power base (in MVA), used for "IMAGN"-referencing

5.2. Cards containing short-circuit data. For the 2-winding case, only one card will be needed, but for the 3-winding case, 3 cards are needed. a) The 2-winding case: (only 1 card needed)

166 Parameters: VOLT1: Rated RMS voltage (in kV) of winding 1 (high voltage side). VOLT2: Rated

RMS voltage (in kV) of winding 2 (low voltage side)

PLOSS12: Short-circuit losses (in kW) at rated frequency. ZSC12: Magnitude of the short-circuit impedance (in percent) of the transformer between winding 1 and winding 2. Note that this percent value is implicitly frequency dependent, since it is measured at a very specific frequency: the rated frequency. Further following formula should be used:

ZSC12 =

U sh SBASE 2 1 100 I sh VOLT

where Ish = nominal current Ush = short-circuit voltage SBASE = power base VOLT1 = rated voltage of HV winding

6

Rulebook ATP (junio 1996 - internet)

H19a

7

SBASE: Power base (in MVA), used for "ZSC12"-referencing (e.g. the rated power of the transformer). b) The 3-winding case: (3 cards needed)

167 Parameters: VOLTi: Rated RMS voltage (in kV) of winding "i". PLOSSij: Short-circuit losses (in kW) at rated frequency. ZSCij: Magnitude of the short-circuit impedance (in percent) of the transformer between winding "i" and winding "j". Note that this percent value is implicitly frequency dependent, since it is measured at a very specific frequency: the rated frequency. Further, following formula should be used:

ZSCij =

U sh SBij I sh VOLTi2

where Ish = nominal current Ush = short-circuit voltage SBij = power base VOLTi = rated voltage of winding i SBij : Power base (in MVA), used for "ZSCij"-referencing (e.g. the rated power of the transformer) 6. Next comes the optional "$PUNCH" card, a special-request card which serves to activate the puncher (LUNIT7).

168

Rulebook ATP (junio 1996 - internet)

NOTES:

H19a

1) This optional card should be used whenever punched card output is desired. 2) Since both the resistance- and inductance matrix are in Ohms, at the rated frequency, one should use XOPT = "rated frequency" during transient runs using this punched output as branch card input. 3) This punched card output will use the high-accuracy free-format notation for TYPE -51-52-53 elements. As a consequence, the freeformat separation- and continuation characters (see Card 18 of the STARTUP file of Section I-E-2) will be used on all punched cards. Of course, the usage of such characters must be consistent between the "XFORMER" derivation and the subsequent usage as part of a simulation.

Note that the data of points 4, 5 and 6 may be repeated as many times as desired. Each such grouping is a separate data case within the "XFORMER" setup, corresponding to a different transformer. 7. To end all "XFORMER" cases, a blank card is used. 8. If the user wants to shut off the EMTP at this point, a "BEGIN NEW DATA CASE" card, followed by a blank card should be entered next. XIX-A.2 Example of "XFORMER" data set up Consider a one-phase two-winding transformer with both primary and secondary winding grounded at one terminal. The other terminals are to be named "H1" and "L1" for high-voltage and low-voltage node, respectively. Finally, the following data were obtained by measurement (at 50 Hz) for this transformer: Power rating S Excitation losses Pex,loss Excitation current Iex Short-circuit losses Psh,loss Short-circuit current Ish Short-circuit voltage Ush Voltage rating Vprim/Vsec

: : : : : : :

0.0063 MVA 0.065KW(not needed for XFORMER) 1,85 Amps 0.095 KW 16 Amps 8.3 Volts .220/.377KVolts

The derived values for the other parameters are: per-unit magnetizing current:

1.85 *

220 = 0.0646pu 6300

short-circuit impedance:

Z sh =

8.3 U sh = = 0.518 Ohms (at 50Hz) 20 16 I sh

(6.46%)

8

Rulebook ATP (junio 1996 - internet)

H19a

9

per unit short-circuit impedance:

Z sh,pu = Z sh *

S U 2HS

= 0.02296pu (2.296%)

The short circuit test was performed using 16 A rather than the normal HV current Inom. Hence the value for the losses should be modified: 2

Psh,nom

 16.71  = 0.095*   = 0.10363KW  16 

where the index "nom" refers to nominal conditions and "m" refers to actual measuring conditions.

I sh,nom =

6300 = 16.71A 377

we find 2

Psh,nom

 16.71  = 0.095*   = 0.10363KW  16 

Further note that the resistance values can be tested by handcalculations:

HV: R HV = 0.

3711 = 0.186 2 2

LV: R LV = 0.

3711  220  *  = 0.063  377  2

These values can not be traced back in the punched results. This is because the full admittance matrix is inverted, resulting in non-zero off diagonal values in the resistance matrix. Further details can be found in the Theory Book. The card deck representing the XFORMER input, then would result in the following card sequence: BEGIN NEW DATA CASE C 1 2 3 4 5 6 7 8 C 3456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 XFORMER $ERASE BRANCH H1 L1 C C 2 windings, IMAG = 6.460 %, PBCUR = .0063 MVA C 2 6.460 .0063 C C .377/.220 voltage ratio, PLOSS12 = .10363 KW, ZSC12 = 2.296 %, PBZ12 = .0063 C

Rulebook ATP (junio 1996 - internet) .377 .220 .10363 $PUNCH BLANK CARD ENDING XFORMER BLANK CARD ENDING ALL CASES

2.296

H19a

.0063

XIX.A.3 Output data-deck structure For the sample input data of the preceeding paragraph, the output appears as follows:

Comment card. NUMDCD = 1. Marker card preceding new EMTP data case. Comment card. NUMDCD = 3. Comment card. NUMDCD = 4. Request for transformer [R] +jw[L] computation. Erase all of 0 cards in the punch buffer. Node names for LUNIT7-punched branch cards. Comment card. NUMDCD = 8. Comment card. NUMDCD = 9. Comment card. NUMDCD = 10. New device. 2 6.460000E+00 6.300000E-03 Comment card. NUMDCD = 12. Comment card. NUMDCD = 13. Comment card. NUMDCD = 14. Wind. 0.377E+00 0.220E+00 0.104E+00 0.230E+01

|C data://C/GUIDO/XFORMER.IN |BEGIN NEW DATA CASE |C 1 2 3 4 5 6 7 8 |C 3456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 |XFORMER |$ERASE |BRANCH H1 L1 |C |C 2 windings, IMAG = 6.460 %, PBCUR = .0063 MVA |C |2 6.460 .0063 |C |C .377/.220 voltage ratio, PLOSS12 = .10363 KW, ZSC12 = 2.296 %, PBZ12 = .0063 |C |.377 .220 .10363 2.296 .0063

Single-phase, 2 -winding transformer. IMAGN = 6.46000000E+00 percent based on Voltage across winding Losses Impedance based on [ kV ] in [kW] [percent] [MVA] High 0.38 High -- Low 0.10 2.2960 0.006

6.30000000E-03

MVA.

Impedance matrix as required for transient studies, with reactance X in ohms at the power frequency. R X R X R X High 0.9272619E-01 0.3493188E+03 Low -0.5411077E-01 0.2037411E+03 0.3157658E-01 0.1189555E+03 Short-circuit input impedances follow --- obtained from the just-printed impedance matrix by reverse computation. This represents sort of a check on the computation: High -- Low 0.37071 0.36138 Repeat the preceding calculation, only this time the starting point will be the impedance matrix with all elements rounded to approximately five decimal digits: High -- Low 0.37070 0.37938 Request for flushing of punch buffer.

|$PUNCH

A listing of 80-column card images now being flushed from punch buffer follows. =============================================================================== 1234567890123456789012345678901234567890123456789012345678901234567890123456789 =============================================================================== C Cards punched by support routine on 17-Apr-89 10.34.43 C XFORMER C $ERASE C BRANCH H1 L1 C C C C 2 windings, IMAG = 6.460 %, PBCUR = .0063 MVA C C C 2 6.460 .0063 C C C C .377/.220 voltage ratio, PLOSS12 = .10363 KW, ZSC12 = 2.296 %, PBZ12 = .0063 C C C .377 .220 .10363 2.296 .0063 51,H1 , , , , 0.9272618817281E-01 , 0.3493188082966E+03 , ,,,, 52,L1 , , , , -0.5411077293636E-01 , 0.2037410770117E+03 $ 0.3157657837292E-01 , 0.1189555285801E+03 , ,,,, =========<

End of LUNIT7 punched cards as flushed by

$PUNCH

request

>=======

XIX.A.4 Usage of TYPE 51-52-53 punched output of "XFORMER" TYPE 51-52-53 punched output cards can be used immediately as branch cards representing the transformer. Don't forget to put XOPT (miscellaneous data card) equal to the value of the rated frequency (transformer testing frequency) during a transient simulation. Further, be sure that the free-fromat separation- and continuation characters are compatible between XFORMER and the transient run. For more details, see Section IV-C. Recall that XFORMER can not deal with non-linearities (such as saturation and hysteresis). This could only be done via external addition of a saturation

10

Rulebook ATP (junio 1996 - internet)

curve. But in impossible.

such

case,

XFORMER

proper

should

H19a

deal

with

I ex = 0,

11

wich

is

Rulebook ATP (junio 1996 - internet)

1. "OBSERVE PARALLEL MONTE CARLO"

H19b

1

for Parallel "STATISTICS"

The philosophy and theory behind OPMC is covered in Ref. [52], so such information will not be repeated here. Instead, the presentation here will be limited to an explanation of the interactive dialogue that is possible following the program prompt, which appears as follows: key (INIT, SHOW, END, ADD, EDIT, USE, WAIT, GO, SHOT, WIDTH, CARD, HELP, QUIT): User alternatives, most of which are shown in parentheses, will be explained one at a time in following paragraphs. "INIT" (short for "initialize") is the appropriate first command if no correctly-structured disk file PARALLEL.LIS already exists. Alternatively, it can be used to erase all history from such an existing, legal, history file. "SHOW" will produce a display having one row for each EMTP process that has submitted information since the previous initialization. For example: USERID Starting time Last-shot time KNT NENERG INDMCB Extrema and switch times stored here --> -------------------------------------------------------------------------------------------------1 Milano 11-Nov, 20.48 11-Nov, 20.54 26 750 600 //c/wsm/dc66lunit9.bin 2 London 09-Nov, 14.03 10-Nov, 01.39 142 200 146 //b/keep/process_2/Binary_Output.bin 4 Berlin 12-Nov, 19.45 12-Nov, 19.46 2 430 48 //c/wsm/Output.lis 5 Moscow 12-Nov, 19.45 12-Nov, 19.46 12 150 242 //a/BOB/Goodie_Goodie.bin

The 6-byte USERID is from either the STARTUP file or a subsequent "USER IDENTIFICATION" declaration. Note that lower case is preserved. This label must be unique for any such parallel Monte Carlo simulation, since it identifies the process. The "Starting time" is the same figure that is a part of the heading that begins the LUNIT6 output of a simulation. The "Last-shot time" is the time at which a row of the table was last updated, at the completion of another energization. Variables KNT and NENERG show the number of the lastcompleted energization and the terminal number of such energizations. INDMCB is the index to RAM-based storage of the energizations. Finally, history of the energizations is stored in the disk file having the 40-byte name labeled "Extrema and switch ...", which was taken from the $OPEN card connecting this file to LUNIT2. Should the user want more information, he should send "SHOW ALL", which will append more information after the just-explained table. An illustration follows: Process JJFULL KNTSUM KSWTCH 182 6

created NTOT 25

"START AGAIN" tables named .. //c/wsm/Output.bin IBR NSTAT JJLAST LSIZ23 JJFULL 15 10 6 4000 2

Shown first is the file name of the "LABCOM" tables (normally there will be just one). About following integers, KNTSUM is the sum of all energizations (sum of rows in the KNT column), KSWTCH is the number of switches, NTOT is the number of nodes, IBR is the number of branches, NSTAT is the number of output variables, JJLAST is the last row of the table (visible only if it has not been made inactive by USE), LSIZ23 is the dimensioned limit to RAM-based storage of the energizations, and finally, JJFULL is the process number mentioned in the first line. The command "SHOW TOP" will display three hidden records at the beginning of the table. An illustration follows: Columns: 12345678901234567890123456789012345678901234567890123456789012345678901234567890 123456789012345678 Misc. data = 6 25 15 10 6 4000 2 //c/wsm/Output.bin File locks =1 11 1 Inactivity = 1

Should the user want to "EDIT" these rows, they are numbered -2 (miscellaneous data), -1 (file locking flags), and 0 (inactivity flags). If a number follows the "SHOW" command (e.g., "SHOW 5" or "SHOW ALL 5"), it will be

Rulebook ATP (junio 1996 - internet)

H19b

interpreted as the repetition time in seconds for the display. The loop will continue until it is broken by the user-keyed interrupt of SPY. This assumes that the user-keyed interrupt is available for the computer of interest. If not, perhaps a computer-dependent interrupt of the process will be required. The "END" command will conclude either a single process, or all parallel processes, at the end of the on-going energization or energizations. For a single process, follow the command by the process number (e.g., "END 3" to put process number 3 to bed. By definition, the process number is the row number in the "SHOW" display. To put all processes to bed, send "END ALL". The response of OPMC is to reduce NENERG to KNT. The EMTP checks for such a change after each energization except the first, and it will modify NENERG accordingly, resulting in a premature end to the energizations and a beginning of statistical tabulations, if any. The "ADD" command will punch EMTP data cards for subsequent statistical tabulation of all energizations of all parallel processes. More precisely, it will create the cards to combine (hence, "ADD") all such raw data during a subsequent execution of EMTP. The user takes possession of these cards following a $PUNCH request. To the computer-created cards must be added the tabulation requests that are desired by the user, of course. This is done by manual editing prior to use of the data cards. The "EDIT" command allows the user manually to replace any single row of the central statistics file PARALLEL.LIS. Follow the command word by the process number (the row number of the "SHOW" display). There will be two prompts for the 99-column line in two parts. Send bytes 1-56 (through INDMCB) for line 6 : Send file name (bytes 59:98) to complete row : Note that the two blanks preceding the file name, columns 57 and 58, are not redefined. The "USE" command will toggle the activity status of a row of the central statistics file without affecting the associated process in any way. Follow the command by the process number (the row number of the "SHOW" display) that is to be modified. A subsequent "SHOW" will illustrate the modified status. A row that was visible will become missing (inactive), whereas a row that previously was missing will become visible (active). In the preceding illustration, row number 3 was missing because it had been made inactive by means of a "USE 3" command. The next time a new process would be added to the table, it would fill the last such inactive row before a brand new row would be appended to the end. "WAIT" is like "END" except that it results in process hibernation rather than termination. The hibernating status of a process is indicated in the "SHOW" display by a minus sign applied to the maximum number of energizations "End". To reactivate a hibernating process, use "GO". "GO" is like "END" except that it cancels the hibernation of "WAIT". Such activation may require a few seconds (up to five for Apollo) actually to take effect, however. "SHOT" is like "END" except that it allows the user to change the maximum number of energizations NENERG at the end of the on-going energization. There will be a subsequent prompt for the new NENERG (either one or a full vector for all processes). If "SHOT ALL" is used, a subsequent implied "SHOW" will confirm the modified NENERG for all processes.

2

Rulebook ATP (junio 1996 - internet)

H19b

3

"WIDTH" allows the user to adjust the column width of the output. The command is to be followed by the maximum column width, which must not be less than 79 to avoid rejection. This is the same as the special-request word "TRUNCATE OUTPUT LINES". Without any such declaration, the truncation width is set equal to the output width KOL132 as defined by STARTUP at the start of a new data disk file (not by $STARTUP or $WIDTH, however). To see the full row of the "SHOW" table requires 102 columns, with any smaller figure truncating the 40byte file name on the right. The full width of "SHOW TOP" requires an extra 8 columns (i.e., 110). "CARD" results in the conversion of the UNFORMATTED output file of a process into 80-column FORMATTED output cards. Follow the command by either the process number (the row number of the "SHOW" display) or by the file name following the tag "FILE=" (e.g., "CARD FILE=binary.bin). This is the input. The output will be punched cards (access by $PUNCH). For the inverse operation (for FORMATTED input and UNFORMATTED output), use "CARD READ", after which the user must connect his own input and output files using $OPEN. As a prompt will clarify, these involve units 87 and 88, respectively, and these must be followed by "GO" to actually perform the conversion. The "CARD" command is useful if the Monte Carlo simulation has been split between two or more incompatible computers or operating systems. Of course, in FORMATTED form, results can be exchanged between any two EMTP computers, whereas UNFORMATTED output files generally can not be. Punched cards provide a universal medium of exchange, after which "CARD READ" restores the original, computer-dependent UNFORMATTED form. Also, the "CARD" command allows for easy human inspection and mechanical editing of output files, should this ever prove to be necessary or desirable. "HELP" produces explanation of the sort now being read. "QUIT" will exit "OPMC" in civilized fashion, returning to the opening EMTP prompt after the case-summary timing line that generally is of no interest (ignore it).

Rulebook ATP (junio 1996 - internet)

H19d

1

XIX-D. "CHANGE SWITCH" to Convert Former Switched-R,L Elements to Type-99, 98 Section II-A-42 explains the reason for the "CHANGE SWITCH" feature in considerable detail, and that introduction will not be repeated here. Nor will there be any explanation of former switched-R and switched-L element formats, which can be found in Rule Books printed earlier than the 1982 removal of such elements. Following the "CHANGE SWITCH" request, the user can place an old EMTP data in its entirety, if this is most convenient. What the program does is discard all input cards through the first blank card (for a complete data case, this would be the blank card ending branch cards). Then it reads cards that are assumed to be switch cards, until the blank card terminating these. All later cards, through the following "BEGIN NEW DATA CASE" separator card, are also ignored. So, it is only switch cards that are considered, and only the switchedR and switched-L elements among these are actually processed. Other switches are ignored. This illustrated by the second subcase of BENCHMARK DC-14, which contains informative comment information: BEGIN NEW DATA CASE C 2nd of 2 subcases converts old Type-91, 92, or 93 to pseudo-nonlinear. CHANGE SWITCH NODE1 NODE2 1.0 { Series R-L-C will be discarded, of course 91LEFT RIGHT 0.3E6 { From p. 20 example of 1980 Rule Book } 1 0.0 300. 0.3 200. 0.6 150. 1000. 150. 9999 91 NODE1 NODE2 COPYL COPYR .25E6 { Final card from p. 20 of 1980 Rule Book BLANK card ending program branch cards. This is flag that switches follow. C Type-92 switched-R element follows (to be converted): 92JDAYA LMONA 8.5 3.E5 3.5E5 3 C Type-93 switched-L element follows (to be converted): 93SENDA NEUTRL 4.2 2.5 0.7 3.3 1 BLANK card terminating program switch cards BEGIN NEW DATA CASE $PUNCH { Flush the punched-card output of equivalent pseudo-nonlinear elements BLANK Punched output includes the original switch cards on comment cards as documentation for the Type-98 and Type-99 elements that follow. Other comment cards label the new data. This is illustrated by the beginning of the punched output from BENCHMARK DC-14:

Marker card preceding new EMTP data case. Comment card. NUMDCD = 63. Convert switched-R,L cards to pseudo-nonlinear. This code will read data types 91-Time-Dependent and punched as pseudo-nonlinear elements to meet Type-91: piecewise linear resistor Characteristic. 0.0 300. Characteristic. 0.3 200. Characteristic. 0.6 150. Characteristic. 1000. 150. Characteristic. 9999 Type-91: piecewise linear resistor Comment card. NUMDCD = 77. Comment card. NUMDCD = 78. Type-92: switched resistance Comment card. NUMDCD = 80. Type-93: Switched inductance Request for flushing of punch buffer.

|BEGIN NEW DATA CASE |C 2nd of 2 subcases converts old Type-91, 92, or 93 to pseudo-nonlinear. |CHANGE SWITCH R, 92-Switched Resistance, and 93-Switched Inductor. Such old data will be converted, modern EMTP requirements. |91LEFT RIGHT 0.3E6 1 | 0.0 300. | 0.3 200. | 0.6 150. | 1000. 150. | 9999 |91 NODE1 NODE2 COPYL COPYR .25E6 |C Type-92 switched-R element follows (to be converted): |C 3456789012345678901234567890123456789012345678901234567890 |92JDAYA LMONA 8.5 3.E5 3.5E5 3 |C Type-93 switched-L element follows (to be converted): |93SENDA NEUTRL 4.2 2.5 0.7 3.3 1 |$PUNCH { Flush the punched-card output of equivalent pseudo-nonlinear elements

Rulebook ATP (junio 1996 - internet)

H19d

A listing of 80-column card images now being flushed from punch buffer follows. =============================================================================== 1234567890123456789012345678901234567890123456789012345678901234567890123456789 =============================================================================== C 91LEFT RIGHT 0.3E6 91LEFT RIGHT 3333. C VSTART 0.3E6 C TR in sec. R(TR) in ohms C 0.0 300. 0.0 300. C 0.3 200. 0.3 200. C 0.6 150. 0.6 150. C 1000. 150. 1000. 150. C 9999 9999 : : =========< End of LUNIT7 punched cards as flushed by $PUNCH request >=======

2

Rulebook ATP (junio 1996 - internet)

H19e

1

XIX-E. "OLD TO NEW ZNO" to update pre-"M39." ZnO data cards Section II-A-23 explains access to this supporting program by means of an "OLD TO NEW ZNO" request. Only those with ZnO branch cards predating "M39." program versions of the spring and summer of 1984 need be concerned, of course. Old ZnO branch cards are easily recognized, since data is split into two or more isolated groups. A Type-92 nonlinear element just reserved space for the ZnO arrester, and it involved a dummy characteristic. Parameters of the ZnO itself were read from special data cards immediately before the output-variable (usually node-voltage) specification cards of Section XII. The "OLD TO NEW ZNO" special request is to be followed by the complete, old data case. The conversion routine deals with variable classes, counting blank cards that terminate these, so be careful if other than a complete data case is supplied. As an illustration, consider the 2nd subcase of BENCHMARK DC-14. There is no printout at all while the program is executing, except for any comment cards. When the ZnO data conversion is complete, there will be a oneline message to this effect, as shown by the following output: C 1 2 3 4 5 6 7 C 34567890123456789012345678901234567890123456789012345678901234567890123456 C ------------------------------------------------|------------------------Request to convert old ZnO data to new formats. |OLD TO NEW ZNO { Spe Done with ZnO conversion in "SATURA" of overlay 24. Timing figures characterizing central processor (CP) solution speed. ------

It is the user's responsibility to pick up the punched cards (via $PUNCH request), since otherwise, there is no output.

Rulebook ATP (junio 1996 - internet)

H19g

1

XIX-G "SATURA" TO DERIVE (ψ,i) PEAKVALUE CURVES Purpose & Applications The specification of nonlinear inductors requires a (flux-current) saturation curve relating the total flux linkage to the element current. Such curve can be derived, either by using RMS (voltage, current) readings, or by using a (current, incremental inductance) characteristic. Both approaches are possible, and will be discussed separately, because of the differences in data entry. The punched results ([Equation: psi, i]) then can be used in the saturable transformer component model (section IV-E) or in the nonlinear inductor (type-98 pseudo-nonlinear reactor or type-93 nonlinear inductance) that can be added externally to linear transformer models obtained via BCTRAN (section XIX-C) or XFORMER (section XIX-A). Although the resulting saturation curve will be single-valued, hysteresis can be taken into account by manually displacement of the values of the current. These results than can be used for the type-96 pseudo-nonlinear hysteric reactor (section V-D). This solution is an alternative for the special supporting routine HYSDAT (section XIX-H). Input data deck structure for SATURA In general, an input data-deck for the supporting routine SATURA has the following structure: 1. BEGIN NEW DATA CASE 2. SATURA - special request to activate supporting routine SATURA (see section II-A3. $ERASE - request (optional) to clear punch buffer 4. Per unit base specification card 5. Card grouping, supplying (IRMS, VRMS) or (current, incremental inductance) break points, terminated by a special flag card 6. $PUNCH - request (optional) to activate punching Remark that the points 3 through 6 may be repeated as many times as desired. Each such grouping then is considered as a separate data case, corresponding to a different saturation curve. 7. BLANK CARD ending all saturation cases 8. BEGIN NEW DATA CASE 9. BLANK CARD ending all cases For an example of such input, the reader is referred to benchmark DC13 (first subcase) or to section XIX-G-3. Because of the possibility of two different approaches, two different data entries will be discussed next: - (IRMS, VRMS) data entry; - (I,L) data entry. Only card type 4 and 5 will be discussed. explanatory.

All other cards are self-

Rulebook ATP (junio 1996 - internet)

H19g

XIX-G-2.a. (IRMS, VRMS) data entry

169 With an impressed sinusoidal voltage, an RMS reading of the non-sinusoidal current into the winding is obtained. Supporting program "SATURA" is designed to convert from the user's RMS (v-i) curve to the peak values of a (ψ-i) curve needed for transient simulation. The user inputs his (v-i) curve (RMS values) as a sequence of points, with linear interpolation between these values assumed. The output (ψ-i) curve (peak values) is likewise piecewise-linear with the same number of points. Following approximations are made: 1. The use of linear interpolation in between points. 2. The use of finite-difference approximation to sinusoidal excitation. Onedegree step-size is used, along with trapezoidal-rule integration where needed. 3. Hysteresis is ignored. Let us discuss the data entry in more detail now. will be discussed here.

Only card type 4 and 5

Card 4. The card format for the per unit base specification card :

170

2

Rulebook ATP (junio 1996 - internet)

H19g

3

Parameters: FREQ: frequency (in Hz) of the impressed sinusoïdal voltage source. VBASE: single-phase base voltage (in kV) on which the input break points are based. SBASE: single-phase base power (in MVA) on which the input break points are based. KTHIRD: parameter controlling the type of output. = 0 : only first-quadrant output; = 1 : full curve (first- and third-quadrant output). Card 5. Next comes a card grouping, supplying the (IRMS,VRMS) break points : Only one breakpoint per card can be specified. One should start by specifying the break point closest to the origin (omitting point (0. ,0.), though), and then moving continuously away. The curve must be single-valued. Successive slopes should be non-decreasing. The slope defined by the last breakpoint will be extrapolated to infinity (cfr. fig. 1). Values are in per unit, based on the previously-specified single-phase base :

S base (kA) 27 V base I RMS (pu) = I RMS (A) / I base (A) 28 I base =

V RMS (pu) = V RMS (kV) / V base (kV) The card format to be used is as follows :

171 - The maximum number of breakpoints is limited to 100. - If the saturation curve is intended for a type-98 pseudo-nonlinear element, a maximum of five breakpoints is recommended, in order to avoid numerical tracking problems. - On the other hand, for a type-93 true nonlinear element, many breakpoints around the kneepoint of the saturation curve should be used whenever a smooth approximation of the nonlinear magnetizing current is of interest. This card grouping should be terminated by following special flag card :

Rulebook ATP (junio 1996 - internet)

H19g

172

XIX-G.2.b. (I,L) data entry Instead of an (IRMS, VRMS) characteristic, the user has the option of inputting a current versus incremental inductance characteristic. The trapezoidal rule of integration is then used in this case, to convert the inductance curve into the desired output curve of flux versus current :

ψ (i) = ∫10 L(n)dn

L + Lk - 1 }.( ik - ik - 1) ψ k = ψ k - 1+ { k 2

ψ1 = 0

k = 2,3,,,,

173

Card 4. The card format for the per unit base specification :

4

Rulebook ATP (junio 1996 - internet)

H19g

5

174 Parameters: FLAG: = -1; special request flag for (I,L) data entry (as opposed to (I RMS, VRMS) data entry, explained in point 2.a). SCALI: multiplicator for the current coordinate of the input breakpoint, in order to obtain results in Amps. SCALL: muliplicator for the inductance coordinate of the input breakpoint, in order to obtain results in Henries. Note: If both SCALI and SCALL are blank or zero, the supplied characteristic is understood being specified in units of Amps and Henries, so that no conversion is necessary. KTHIRD: see point 2.a. Note: Although for the (I,L) data entry, the origin point (0. ,0) of the saturation curve appears in the printed output, this value will be omitted in the punched output. Card 5. Card grouping specifying a current versus an incremental inductance characteristic. The current breakpoints ik must be monotone increasing, starting with value zero. Values are in Amps (if SCALI = 0) or otherwise, i k * SCALI is in Amps. The incremental inductance values

 dψ  32 Lk =   di i k

all must be positive. Lk * SCALL is in Henries.

Values are in Henries (if SCALL = 0) or otherwise,

The card format to be used is as follows :

175 The same recommendations as in point 2.a. are valid. This card grouping should be terminated by the same special flag card, as explained in 2.a. 3. Example

Rulebook ATP (junio 1996 - internet)

H19g

6

Consider a five-leg core-type transformer with STAR-connected high-voltage winding with grounded neutral and DELTA-connected low voltage winding (YNd5). Rated power: 750 MVA Rated voltage: 420 kV/27 kV (line-line values) From the positive-sequence excitation test, following data are available : Table 1.

where

Uex

Iex

Pex

KV

A

KW

22.76

8.20

206.2

24.29

11.35

240.26

25.64

15.50

270.13

27.00

21.16

311.00

27.50

24.68

323.03

28.47

31.63

355.48

29.10

38.30

385.41

32.50

80.97

560.00

Uex = excitation voltage (RMS, line-line value) Iex = excitation current (RMS, three-phase average) Pex = excitation loss (three-phase value)

As a first approximation, the RMS excitation current Iex,w in a DELTA winding equals

I ex ,w ≈ I ex / 3 (harmonics neglected) 33 Further, the RMS ma approximated by

gnetizing

current

I m ,ω ≈ Hence, the characteristic :

above

measured

I

2 ex,w

Table

Im,w

in

 P  -  ex   3 U ex  1

the

DELTA

winding

is

2

reduces

to

Table 2: Uex

Imw

KV

A

0.8430

3.65

0.8996

5.66

0.9496

8.23

following

saturation

Rulebook ATP (junio 1996 - internet)

H19g

1.000

11.60

1.019

13.70

1.054

17.78

1.078

21.66

1.204

46.40

7

When converting this characteristic into input data for supporting routine SATURA, we first need to convert to per unit values for the equivalent phase. Sbase = 750/3 = 250 MVA Vbase = 27 kV Ibase = 750/(3*27) = 9259A The input data (table 3) can be obtained from table 2, using the following conversion formulas : IRMS(pu) = IRMS(A) / Ibase(A) VRMS(pu) = VRMS(kV) / Vbase(kV) This finally results in following table : Table 3: VRMS(pu)

IRMS(pu)

0.8430

0.3942 E-3

0.8996

0.6113 E-3

0.9496

0.8888 E-3

1.000

1.253

E-3

1.019

1.480

E-3

1.054

1.920

E-3

1.078

2.333

E-3

1.204

5.011

E-3

The input file for supporting routine SATURA then looks as follows: BEGIN NEW DATA CASE C input data for supporting routine SATURA C Excitation test results for 3-phase transformer C UBASE = 27 kv (RMS, equivalent phase) C SBASE = 750/3 = 250 MVA (equivalent phase) C Ibase = 250 / 27 = 9.26 kA C C 345678901234567890123456789012345678901234567890123456789012345678901234567890 C 1 2 3 4 5 6 7 8 $ERASE SATURATION 50.0 27.00 250.0 1 0 .3942 -3 .8430 .6113 -3 .8996 .8888 -3 .9496 1.253 -3 1.0

Rulebook ATP (junio 1996 - internet) 1.480 1.920 2.333 5.011

-3 -3 -3 -3 9999

H19g

1.019 1.054 1.078 1.204

$PUNCH BLANK LINE ending saturation data BEGIN NEW DATA CASE BLANK LINE ENDING ALL CASES

The corresponding output looks as follows : Comment card. NUMDCD = 1. |C data://A/GUIDO/SATURA3.IN Marker card preceding new EMTP data case. |BEGIN NEW DATA CASE Comment card. NUMDCD = 3. |C input data for supporting routine SATURA Comment card. NUMDCD = 4. |C Excitation test results for 3-phase transformer Comment card. NUMDCD = 5. |C UBASE = 27 kv (RMS, equivalent phase) Comment card. NUMDCD = 6. |C SBASE = 750/3 = 250 MVA (equivalent phase) Comment card. NUMDCD = 7. |C Ibase = 250 / 27 = 9.26 kA Comment card. NUMDCD = 8. |C Comment card. NUMDCD = 9. |C 345678901234567890123456789012345678901234567890123456789012345678901234567890 Comment card. NUMDCD = 10. |C 1 2 3 4 5 6 7 8 Erase all of 0 cards in the punch buffer. |$ERASE Request for magnetic saturation computation. |SATURATION Misc. const. 5.000E+01 2.700E+01 2.500E+02 0 |50.0 27.00 250.0 1 0 (I, V) point. 3.94200E-04 8.43000E-01 |.3942 -3 .8430 (I, V) point. 6.11300E-04 8.99600E-01 |.6113 -3 .8996 (I, V) point. 8.88800E-04 9.49600E-01 |.8888 -3 .9496 (I, V) point. 1.25300E-03 1.00000E+00 |1.253 -3 1.0 (I, V) point. 1.48000E-03 1.01900E+00 |1.480 -3 1.019 (I, V) point. 1.92000E-03 1.05400E+00 |1.920 -3 1.054 (I, V) point. 2.33300E-03 1.07800E+00 |2.333 -3 1.078 (I, V) point. 5.01100E-03 1.20400E+00 |5.011 -3 1.204 Special termination-of-points card. | 9999 Derived saturation curve gives peak current as a function of flux : Row Current [amp] Flux [volt-sec] 1 0.0000000000 0.0000000000 2 5.1618795027 102.4604983603 3 12.3418337241 109.3398153320 4 17.5040965216 115.4169504661 5 24.8062758133 121.5427026812 6 31.4592838067 123.8520140322 7 39.1754389519 128.1060086260 8 49.5865689002 131.0230334903 9 97.2627733421 146.3374140282 9999 Next, check the derived curve by independent reverse computation. Assuming sinusoidal voltage (flux) at the level of each point, rms current is found numerically. This curve should be equal to the original I-V points inputted. Row Current in P.U. Voltage in P.U. 2 0.00039420 0.84300000 3 0.00061130 0.89960000 4 0.00088880 0.94960000 5 0.00125300 1.00000000 6 0.00148000 1.01900000 7 0.00192000 1.05400000 8 0.00233300 1.07800000 9 0.00501100 1.20400000 Request for flushing of punch buffer.

|$PUNCH

A listing of 80-column card images now being flushed from punch buffer follows. =============================================================================== 1234567890123456789012345678901234567890123456789012345678901234567890123456789 =============================================================================== C Cards punched by support routine on 29-Jun-89 09.04.57 C SATURATION C 50.0 27.00 250.0 1 0 C .3942 -3 .8430 C .6113 -3 .8996 C .8888 -3 .9496 C 1.253 -3 1.0 C 1.480 -3 1.019 C 1.920 -3 1.054 C 2.333 -3 1.078 C 5.011 -3 1.204 C 9999 5.16187950E+00 1.02460498E+02 1.23418337E+01 1.09339815E+02 1.75040965E+01 1.15416950E+02 2.48062758E+01 1.21542703E+02 3.14592838E+01 1.23852014E+02 3.91754390E+01 1.28106009E+02 4.95865689E+01 1.31023033E+02 9.72627733E+01 1.46337414E+02 9999 =========< End of LUNIT7 punched cards as flushed by $PUNCH request >=======

8

Rulebook ATP (junio 1996 - internet)

H19g

9

The resulting (ψ,i) characteristic looks as follows :

176 After the flux ψ(t) exceeds saturation flux [Equation: psi sub s], the last slope of the non-linearity is determined by the air-core inductance L air (the additional flux travels in air). The air-core inductance Lair can be approximated by the geometry of the corresponding winding (in this case the low voltage winding). 2 Lair ≈ µ 0 .ω . A / I

where

A = I = w = µ0 =

cross-sectional area of the winding (17,925 cm2) winding length leg length (263 cm) number of turns (54) permeability of free space (1.256637 * 10-8 H/cm)

For the transformer considered, Lair ≈ 0.0025 H. This value includes the leakage impedance of the low voltage winding. If we use the BCTRAN Matrix for the linear transformer model, the nonlinear elements are connected to the low voltage transformer terminals in addition to the linear transformer elements. (In this case it is not necessary to correct Lair by the winding leakage inductance) (By using the [A] [R] Matrix without excitation information, it is also not necessary to correct the nonlinear inductance elements by the linear magnetizing reactance). For the transformer in question ψs≈1.2ψr≈146Vs. If ψres=0.6ψr=72.9Vs in one leg, the flux in this winding at its first maximum becomes : 2 * 121.54 Vs + 0.6 * 121.54 Vs = 316 Vs. The air flux ψair= 316 Vs - 146 Vs = 170 Vs. The last point of the nonlinear characteristic can be calculated from : ∆Imw = 170Vs/0.0025H : 68000A Imw = 68000 A + 97 A = 68097 A

Rulebook ATP (junio 1996 - internet)

H19g

10

Rulebook ATP (junio 1996 - internet)

H19h

1

XIX-H. "HYSDAT" to create type-96 hysteretic inductor characteristic 1. Purpose and applications The specification of remanent magnetism requires a (flux-current) hysteresis curve. Recall that the shape of the hysteresis loop for an inductor depends primarily on the material of the core, while the scaling of the hysteresis loop depends on geometry, the number of turns and other construction factors. What is actually stored in supporting routine HYSDAT is essentially the shape of the loop for a certain type of material. The user then should provide information for the actual reactor being specified, so that a correct scaling can be performed. Hence the data entry is very simple. The punched results ([Equation: psi, i]) can be used for the type-96 hysteretic inductor (section V-D). Up to now, only one curve shape (corresponding to ARMCO Mn) can be selected. With some care, supporting routine SATURA (section XIX-G) can be used to generate hysteresis loops for other materials, it should be noted. 2. Input data deck structure for HYSDAT In general, an input following structure :

data

deck

for

supporting

routine

HYSDAT

has

the

1. BEGIN NEW DATA CASE 2. HYSTERESIS - special request to activate supporting routine HYSDAT (see section II-A-45). 3. $ERASE - request (optional) to clear punch buffer 4. shape specification card 5. scale specification card 6. $PUNCH - request (optional) to activate punching. Remark that the points 4 through 6 may be repeated as many times as desired. Each such grouping then is considered as a separate data case, corresponding to a different hysteresis loop. 7. BLANK CARD ending all hysteresis loops 8. BEGIN NEW DATA CASE 9. BLANK CARD ending all cases For an example of such input, the reader is referred to benchmark 13 (third subcase). Only card 4 and 5 deserve a further explanation. All other cards are self-explanatory. Card 4. Shape specification card : Since the shape of the hysteresis loop for an inductor depends primarily on the material of the core, such core material specification should be possible. This can be obtained using following card format :

Rulebook ATP (junio 1996 - internet)

H19h

177 Parameters: ITYPE: type code specifying the magnetic core material of the inductor. = 1: ARMCO Mh oriented silicon steel (perhaps, other alternatives will be provided later). LEVEL: flag, specifying the desired level = 1: hysteresis loop represented in = 2: hysteresis loop represented in = 3: hysteresis loop represented in = 4: hysteresis loop represented in

of accuracy. 4 to 5 points 10 points 15 points 20 to 25 points.

Card 5. Scale specification card : The scaling of the hysteresis loop depends on the geometry, the number of turns and other factors of the actual construction. This scaling can be fully specified via the location of the positive saturation point. By definition, this is the point in the first quadrant where the hysteresis loop changes from being multivalued to being single-valued. Following card format allows you to specify this point :

178 Parameters: CURSAT: current (in A) of the positive saturation point. FLXSAT: flux (in Vs) of the positive saturation point. Note: By definition, the positive saturation point is the point of the first quadrant where the hysteresis loop changes from being multivalued to being single-valued. One suggested way of determining values for both these coordinates from normal or DC magnetizing curves is as follows. Beginning at the

2

Rulebook ATP (junio 1996 - internet)

H19h

3

right (i.e. linear part) on the normal magnetization curve, a straight-edge is used to extrapolate this line back to the left. The point where this straight line and the actual curve first begin to diverge is then taken as the positive saturation point. It is recommended to use the DC magnetization curve, since this is more readily available than hysteresis loops.

A hysteresis loop should be here

3. Example The following is an extract from DC13.

The input looks as follows :

4BEGIN NEW DATA CASE HYSTERESIS C ITYPE LEVEL { Request Armco M4 oriented silicon steel -- only 1 available 1 2 { That was ITYPE=1. As for LEVEL=2, moderate accuracy output 500. 1.0 { Current and flux coordinates of positive saturation point $PUNCH BLANK card ending "HYSTERESIS" data cases The output looks as follows : Comment card. NUMDCD = 1. |C data://A/GUIDO/HYS.IN Marker card preceding new EMTP data case. |BEGIN NEW DATA CASE Request to make Type-96 hysteresis branch cards. |HYSTERESIS Comment card. NUMDCD = 4. |C ITYPE LEVEL { Request Armco M4 oriented silicon steel -- only 1 available Begin B-H generator. ITYPE = 1. LEVEL = 2. | 1 2 { That was ITYPE=1. As for LEVEL=2, moderate accuracy output CURSAT, FLXSAT = 5.0000E+02 1.0000E+00 | 500. 1.0 { Current and flux coordinates of positive saturation point Derived characteristic for Type-96 pseudo-nonlinear EMTP branch card follows. Current Flux -1.25000000E+02 -9.70588235E-01 -1.56250000E+01 -9.19411765E-01 9.37500000E+00 -8.47058824E-01 2.18750000E+01 -6.58823529E-01 4.21875000E+01 5.70588235E-01 6.56250000E+01 7.52941176E-01 1.12500000E+02 8.64705882E-01 2.07812500E+02 9.41176471E-01 5.00000000E+02 1.00000000E+00 6.87500000E+02 1.00588235E+00 9999. Request for flushing of punch buffer.

|$PUNCH

A listing of 80-column card images now being flushed from punch buffer follows. =============================================================================== 1234567890123456789012345678901234567890123456789012345678901234567890123456789 =============================================================================== C Cards punched by support routine on 29-Jun-89 06.33.56 C HYSTERESIS C C ITYPE LEVEL { Request Armco M4 oriented silicon steel -- only 1 availab C 1 2 { That was ITYPE=1. As for LEVEL=2, moderate accuracy outp C 500. 1.0 { Current and flux coordinates of positive saturation poi -1.25000000E+02 -9.70588235E-01 -1.56250000E+01 -9.19411765E-01 9.37500000E+00 -8.47058824E-01 2.18750000E+01 -6.58823529E-01 4.21875000E+01

5.70588235E-01

6.56250000E+01

7.52941176E-01

1.12500000E+02

8.64705882E-01

2.07812500E+02

9.41176471E-01

Rulebook ATP (junio 1996 - internet) 5.00000000E+02

1.00000000E+00

6.87500000E+02

1.00588235E+00

9999. =========<

End of LUNIT7 punched cards as flushed by

$PUNCH

request

>=======

. "ZNO FITTER" to Punch Type-92 nonlinear branch cards

H19h

4

Rulebook ATP (junio 1996 - internet)

H19i

1

XIX-I-1 Purpose and application The supporting routine "ZNO FITTER" can be used to derive a true (as opposed to pseudo) non-linear representation (type 92 branch card) for a zinc-oxide surge arrester, starting from manufacturer's data for the surge arrester. The model can be used successfully to represent both gapless arresters as well as arresters equipped with series passive gaps or shunt passive gaps. Series active gaps (i.e. current limiting) can not be represented adequately by means of the ZNO model described here. There is some application of the present model to silicon carbide (SiC) arresters, although serious (perhaps unacceptable) approximations must be made. No dynamics of the gap can be provided. Hence the possibilities of such usage will not be emphasized. In essence, such usage represents the SiC block very accurately ("two exponential segments appear to provide a very adequate fit") while ignoring totally the dynamics of the gap (the gap modelling after flashover). In the original EMTP, a dedicated SiC surge arrester model (type 94 branches) did exist. Data acquisition was too complicated and not sufficiently documented. Hence, support of that model was terminated. The basic constraint equation for ZnO modelling is resistive, and is highly nonlinear (exponential): q

 v  i = p  36  V ref  where "i" is the arrester current, "v" is the arrester voltage, and "p", "V ref", and "q" are constants of the device. Typically one picks the reference voltage "Vref" to be twice the rated voltage, or something close to this. In theory, the choice is arbitrary (it is an extra parameter, note). However, a good choice of Vref normalizes the equation, and prevents numerical overflow during the exponentiation. Constants "p" and "q" are unique parameters of the device. Due to the extreme nonlinearity of ZnO characteristics, very little current is drawn for voltages that are substantially below the rated voltage (e.g., 0.5**30 = 9.E-10). So, in order to avoid the possibility of underflow during exponentiation, and also to speed the numerical solution, a linear model is actually used for low voltages and low currents (see AMIN; card number 2), the so-called leakage current region. But this is hidden, out of sight of the user, and it need not concern him. In physical terms, the solution is unaffected by such simplification. The nonlinear V-I arrester characteristic can be approximated by an arbitrary number of exponential segments. Both gapped and gapless arresters can be represented. The difference is made through the specification of VFLASH (see first miscellaneous data card) and A5 (see second miscellaneous data card). The gapped arrester requires the specification of two (I,V) characteristics (one before and one after flashover), while the gapless arrester requires only one such (I,V) characteristic (before flashover). The calculation of the exponentials fitting the user-specified (I,V) characteristics can be automated via the separate supporting routine ARRDAT. "ARRDAT" fits exponential curves in the log-log plane using the least-squares approach. There are two options for the determination of the number of exponentials (curve segments) that are to be used. Variable NEXP (miscellaneous data cards) is used as a flag to select between both options.

Rulebook ATP (junio 1996 - internet)

1. 2.

H19i

the user may specify the number of exponentials or curve segments, and the boundaries of the segments. the program can determine the number of exponentials or curve segments automatically, based on the maximum permissible relative fitting error specified by the user. This is the more common case.

An optional "BRANCH" card allows the user to name the terminal nodes for the Type-92 branch cards that will be punched. Punched results are immediately in the correct format to be used for nonlinear branches of type 92 (section V.E). For an example, we refer to DC39. XIX-I-2 Input data deck structure for ZNO FITTER In general, an input data deck structure for the supporting routine ARRDAT has the following structure: 1. BEGIN NEW DATA CASE 2. ZNO FITTER 3. $ERASE (optional) 4. BRANCH specification card (optional) 5. miscellaneous data cards 6. card grouping to specify the (I,V) characteristic, terminated by blank card 7. cards that specify the flashover behaviour, terminated by a blank card (only when A5 < 0 and VFLASH > 0) 8. BLANK card terminating ARRDAT usage 9. $PUNCH 10. BEGIN NEW DATA CASE 11. BLANK Let us discuss the above card sequence in more detail now. 1. BEGIN NEW DATA CASE 2. Request for supporting routine "ZNO FITTER"

179 3. $ERASE (optional) $ERASE request is optional, and serves to clear the punch buffer 4. BRANCH specification card (optional)

2

Rulebook ATP (junio 1996 - internet)

H19i

3

180 Note:

[SEND(i),REC(i)] are the terminal ends (sending end for phase i. The usual naming convention is used. indicates direct connection to ground. The number of by variable IPHASE on the miscellaneous data card number 1).

and receiving end) A blank for a name phases is specified (see point 5, card

5. Miscellaneous data cards There are two such cards. The first one bears flag variables (to select the proper model) and fitting specifiers. The second one contains the base value specifications. Card Number 1:

181 Parameters: NEXP:

flag to select between the two possible fitting options. 0: number of segments, requested by the user. He will specify both the (I,V) characteristics as well as the boundaries of each exponential segment manually (see point 6 data).

IPHASE: the number of phases of the arrester bank for which branch cards are to be produced. If left blank or keyed with zero, the value will be changed to unity, meaning that a single arrester is to be modelled. If IPHASE > 1, only one phase will be punched explicitely. For all other phases, the reference branch option is used. Do not forget to use the optional BRANCH option, specially designed to allocate node names to the nonlinear branches in the punched output. ERRLIM: this value only has meaning when flag NEXP < 0. ERRLIM is the maximum relative error permitted during the automatic determination of the number of segments (assuming that the user has keyed NEXP negative). A blank or zero field will be converted to the default value of 1/20. The relative error is: ERROR = ABS (C1 - C2) / C1, by definition, where C1 is the value of the current as specified by the user, and C2 is the value of the current as predicted by the exponential approximation.

Rulebook ATP (junio 1996 - internet)

H19i

IPRZNO: controls diagnostic printout. Suggested values are between zero and three. The amount of printout increases with the variable value. VREF:

the reference voltage (RMS value) that will be used to scale the voltage data points (see point 6, card grouping that specifies the (I,V) characteristic). The idea is to produce numbers close to unity for exponentiation, thus avoiding numerical overflow. If left blank or keyed with zero, the value will be changed to twice A2 of card number 2 immediately below. Beware:1) VREF is used for all (I,V) characteristics, both before and after flashover. 2) When Vref is ill conditioned (i.e. V/Vref too far from unity), the fitter will redefine Vref, after giving the user a proper warning.

VFLASH: the gap flashover voltage in units of [volts]. This is a peak (or crest) value, not an RMS (effective) value. Leave this field blank, or key with zero if the arrester is to be gapless. Card Number 2:

182 Parameters: A1: is a divider used for the scaling of voltage points. For example, A1 could be used for the voltage rating of the arrester upon which the input data are based, in order to convert the specified voltage points into perunit values. This is in units of [volts] RMS. A2: This really is just a multiplicative scaling factor for the voltage points, that can be used creatively in more than one way by the user. For example, A2 can be used to convert the arrester voltage points from perunit to [volts]. Alternatively, the user could produce the characteristic of an electrically similar arrester having a different voltage rating. The properties of similar arresters do not change with rating, provided a proportional number of blocks is used to obtain the new rating. Note that if VREF is maintained proportional to A2, then similar arresters will have identical parameters at all ratings. A3: is a multiplier used for the additional scaling of voltage points. For example, it can be used to obtain a minimum characteristic (maximum energy) from a maximum characteristic (maximum voltage). The most commonly used value is unity, however. A4: is a current multiplier that is used to obtain results for arresters with a number of columns that differs from that for which the data points are known. An even (homogeneous) current distribution is assumed among all columns.

4

Rulebook ATP (junio 1996 - internet)

H19i

5

A5: is a flag signaling the existence (or lack of it) of additional data describing the arrester after flashover of the arrester passive gap. a) If zero or unity, the arrester is gapless, and no additional data follows; b) If negative, additional data follows (to represent dissimilar material for a shunt or a series passive gap). See point 7 (cards to specify the flashover behaviour). c) If positive but not unity, there is no further data. Instead, the original input data representing the situation before flashover are to be used to represent the characteristic after flahover, simply by multiplication of the voltages by A5. This is to represent similar material for a shunt or a series passive gap. AMIN: is the minimum current above which the exponential approximation of the arrester characteristic begins. For currents I < AMIN, a linear rather than an exponential approach is used in order to speed up the solution, and also in order to avoid numerical problems (underflow during exponentiation). Even if fitting a straight line that passes through the origin, do not leave AMIN blank or zero, since the logarithm of zero is not defined. 6. Card grouping that Specifies the (I,V) Characteristic Cards that specify the arrester characteristic before flashover come next. a) For the most common case of NEXP negative (see card 1 of miscellaneous data), the program automatically determines the number of segments, and there is to be only one data group, containing an arbitrary number of data pairs (I,V). A blank card will terminate the grouping that defines the non-linear characteristic. b) But for positive NEXP, there are to be NEXP segments. For each segment, a card grouping containing an arbitrary number of data pairs (I,V) is to be specified. Each such group is to be terminated by a blank card. In both cases, each card can contain only one data pair (I,V), using following format:

183 Points always must be in order of increasing current and voltage. The interpretation will confirm the unscaled (I, V) point, as specified by the user. 7. Cards that specify the flashover behaviour If VFLASH of miscellaneous data card number 1 was positive, also the characteristic after flashover needs to be specified by the user. Depending on whether the passive gap (shunt or series) is of similar or dissimilar material, different situations can occur:

Rulebook ATP (junio 1996 - internet)

H19i

- gap is of similar material; A5 (second miscellaneous data card) is positive, but different from UNITY. Value A5 is used as a multiplication factor for the voltage points of the (I,V) characteristic. Because the gap is of similar material as the rest of the arrester, the same basic (I,V) characteristic is used before and after flashover. - gap is of dissimilar material, parameter A5 of miscellaneous data card number 2 is negative. In this case two additional items of information must be supplied to define the ZnO characteristic after flashover. First, there is to be another card number columns 1-12 will actually be read from the card are assumed to remain unchanged). This change his fitting option (user-specified automatic determination of the best number characteristic.

1, although only variable NEXP of card (all other parameters of the gives the user the opportunity to number of exponents to fit, or of exponents) for the flashover

Second, there are to be cards specifying the arrester characteristic after flashover. The (I,V) pairs have the same format as previously described. Again, the number of segments depends on the (second) NEXP value. Again, each segment should be terminated by a blank card. 8. BLANK card terminating ARRDAT An indeterminate number of data cases can be stacked sequentially and solved in a single execution by the program. Each new case follows immediately the blank card terminating the data for the last segment of the preceding case. After the last such ZnO data case, one extra blank card then exits the supporting program "ARRDAT". 9. $PUNCH As with other supporting programs, $PUNCH is used to create the Type-92 branch cards that represent the ZnO arrester being processed. If the user wants such output, it is his responsibility to request it. Further, do not forget either to use the optional BRANCH specification card (see point 4), in order to be sure that the node names will be included in the created type-92 branch cards. The punched output is particularly valuable because it includes comment cards that label the Type-92 branch parameters. As an example, consider the punched output from the solution to the first subcase of BENCHMARK DC-39: A listing of 80-column card images now being flushed from punch buffer follows. ================================================================================ 12345678901234567890123456789012345678901234567890123456789012345678901234567890 ================================================================================ C Rating = 192000.0 V-mult = 9.62000E-01 I-mult = 3.00000E+00 Gapless 92RECA 5555. C V-reference V-flashover 4.1250000000000000E+05 9.2121212121212130E-01 C Multiplier Exponent V-min 2.9479544296115170E+04 2.6530262418533470E+01 5.4505063612285050E-01 9999 5.9605957177725360E+05 9999 92RECB RECA 92RECC RECA

2.6530262418533470E+01

10. BEGIN NEW DATA CASE 11. BLANK

5555. 5555.

4.8665227581674000E-01

6

Rulebook ATP (junio 1996 - internet)

XIX-I-3 Illustrative Usage:

The data of

H19i

7

BENCHMARK DC-39

Consider a single-column ZnO arrester. The voltage points are known for a single-column ZnO arrester rated 1-KV (crest or peak value), maximum voltage characteristic. The current points are given in [amperes] (crest). The user wants parameters for a 192-KV (rms)(A2), 3-column arrester with a maximum energy characteristic. The conversion factor to this characteristic is 0.962 (A3), by assumption. The arrester is equipped with a shunt gap, and the shunted part is electrically similar (A5 should be positive, but different from unity) to the rest of the arrester. The shunt gap consists of 12% additional blocks. That is, after gap sparkover, the arrester contains 0.89286 (1/1.12 = 0.89286) of the original blocks, from which it follows that A5=0.89286 (crestfactor). A reference voltage equal to 412.5KV (V REF) was chosen, since this is the expected operating range of the 3-phase surge arrester. Finally, the arrester is assumed to be equipped with a shunt gap that flashes over at 380KV (VFLASH) (crest). For this basic data, three different EMTP representations are to be obtained, as summarized in the following three subsections. This information was used to construct BENCHMARK DC-39, so the user is referred to this standard test case to see the EMTP implementation. 1)

DC-39 subcase 1:

Single-Exponent Fit

(NEXP = 1)

According to the data provided above, the following values are assigned: 1) A1 = 1000 / [Equation: root 2] is the original rating of the arrester in [volts] (rms); 2) A2 = 192000 is the desired rating of the output in [volts] (rms); 3) A3 = 0.962 is the scaling factor for obtaining the desired maximum energy characteristic; 4) A4 = 3.0 since the original data are given for a single-column arrester, this factor of three will convert them to the desired 3-column device; 5) A5 = 0.89286 since the arrester before flashover contains 12% additional blocks; 6) AMIN = 1.E-3 [amperes] would be a common default choice, which is about the end of the leakage current region. 2)

DC-39 subcase 2:

Double Exponential Fit

(NEXP = 2)

Next, the characteristic described above is to be fitted with two exponentials. The border between the two segments has been determined graphically using log-log paper to lie between 100A and 200A. All other parameters on cards number 1 and number 2 remain unchanged. 3)

DC-39 subcase 3:

Automatic Segment Determination

(NEXP = -1)

Finally, the same data will be fitted with a relative current error of 1/20, which means that ERRLIM = 1/20. 4) Usage of punched output This model internally uses the compensation method. Unlike other situations using the compensation method for a multiphase ZnO surge arrester, the phases do NOT need to be separated by stub lines.

Rulebook ATP (junio 1996 - internet)

H19j

1

1. Convert saturable transformer cards to linear equivalent [R],[L] This supporting routine can be used to convert data lines for the SATURABLE TRANSFORMER model (IV.E) into a coupled [R],[L] equivalent (type 51,52,53 branches). The user should be carefull, however, because some inherent limitations exist for the conversion routine: - Although the SATURABLE TRANSFORMER component can take non-linear behaviour into account, the type 51,52,53 equivalent branches can not: they only provide a LINEAR equivalent. Of course, the user can add the non-linear behaviour as an external branch, but this is tricky (zero magnetizing current is not honored). - Although the SATURABLE TRANSFORMER component can process transformers with zero magnetizing current, type 51,52,53 can not. This situation is similar to the XFORMER model. Recall that only the BCTRAN model can process zero magnetizing current, because it has the AR-notation available. - The data lines for the SATURABLE TRANSFORMER model should be selfcontained (i.e. no reference component usage that copies the data of a preceding transformer). - For the ATP4 version, the punched output is not immediately usable because the free-format output form is incorrect with respect to the node names: the user himself should add separating commas inbetween the fields of the node names. Please refer to punched cards of this model with XFORMER punched cards for comparison. This is a bug that has to be cleared in next program releases (see section J.4). .1 Input data deck structure: Suppose a user wants to convert a self-contained (i.e. no reference branch usage) SATURABLE TRANSFORMER dataset into a linear equivalent [R],[L]-notation. For that reason he would use the supporting routine "CHANGE TRANSFORMER". The input data deck would look as follows: 1) 2) 3) 4)

5) 6) 7) 8)

BEGIN NEW DATA CASE CHANGE TRANSFORMER $ERASE self-contained SATURABLE TRANSFORMER data case remark: - no reference component usage allowed - no zero magnetizing current allowed - specification of non-linear characteristic will not be taken into account in the final linear model. BLANK card ending CHANGE TRANSFORMER supporting routine $PUNCH BEGIN NEW DATA CASE BLANK CARD ENDING ALL CASES

Remark that several point-4 data may be stacked one after the other, without the need to separate. For an example, we refer to the first subcase of DC67. The card formats to be used are so obvious that they do not need to be explained. .2 Example

Rulebook ATP (junio 1996 - internet)

H19j

Following example is an extract of benchmark DC-67, where only the first subcase is used. BEGIN NEW DATA CASE CHANGE TRANSFORMER { Special-request word transfers to special conversion code $ERASE { Rewind (erase) buffer of punched cards as we prepare to punch more TRANSFORMER .005 30.TRANFF 1.E4 3 .005 30. { 1st point of (current, flux): characteristic .01 40. { 2nd point of (current, flux): characteristic .02 45. { 3rd point ... 0.1 50. { 4th point ... 5.0 100. { 5th and final point of (current, flux) char. 9999 { Special terminator bounds characteristic (current = 9999) 1GENT OPEN 5.0 5.E4 50. { 1st of 2 winding cards 2LOADOFF 20. 2.E5 100. { 2nd and final winding card BLANK card ends saturable TRANSFORMER components to be converted to [R], [L]. $PUNCH { Flush the punched-card output of just-created Type-51, 52, ... BEGIN NEW DATA CASE BLANK

.3 Output data deck structure: A listing of 80-column card images now being flushed from punch buffer follows. =============================================================================== 1234567890123456789012345678901234567890123456789012345678901234567890123456789 =============================================================================== C Cards punched by support routine on 29-Jan-91 16.20.46 C CHANGE TRANSFORMER { Special-request word transfers to special conversion code C $ERASE { Rewind (erase) buffer of punched cards as we prepare to punch more C TRANSFORMER .005 30.TRANFF 1.E4 C .005 30. { 1st point of (current, flux): characterist C .01 40. { 2nd point of (current, flux): characterist C .02 45. { 3rd point ... C 0.1 50. { 4th point ... C 5.0 100. { 5th and final point of (current, flux) char. C 9999 { Special terminator bounds characteristic (current = 9999) C 1GENT OPEN 5.0 5.E4 50. { 1st of 2 winding cards C 2LOADFF 20. 2.E5 100. { 2nd and final winding card 51GENT OPEN 5.9066393442623E+03 , 1.2795081967213E+06 , ,,,, 52LOADFF 1.1803278688525E+04 , 2.4590163934426E+06 $ 2.3626557377049E+04 , 5.1180327868852E+06 , ,,,, =========< End of LUNIT7 punched cards as flushed by $PUNCH request >=======

Note that the output is not in the legal free format: no separation by comma's in between node names. Following section shows how data should be modified. .4 Usage The first case is the representation of the saturable transformer as it appears in its normal form: BEGIN NEW DATA CASE $WIDTH, 79, { Request narrow, 80-column LUNIT6 output as an illustration BEGIN PEAK VALUE SEARCH, -1, { Time of -1 is request to read following card 0.5 1.5 2.5 3.5 { Limit extrema to these 2 subranges PRINTED NUMBER WIDTH, 10, 2, { Request max precision of 6 numbers in 80 bytes .010 6.0 1 1 1 1 1 -1 5 5 20 20 100 100 GEN GENT 1.E-3 3 LOADFF 1.0E0 3 TRANSFORMER .005 30.TRANFF 1.E4 .005 30. .01 40. .02 45. 0.1 50. 5.0 100. 9999 1GENT OPEN 5.0 5.E4 50. 2LOADFF 20. 2.E5 100. OPEN 1.E7

2

Rulebook ATP (junio 1996 - internet)

H19j

3

BLANK card finishing all branch cards BLANK card ending non-existent switch cards 14GEN 200. .1591549 -1. BLANK card terminating program source cards 1 { Request for all node voltage outputs C PRINTER PLOT C 193 .5 0.0 4.0 LOAD GEN GENT BLANK card terminating plot cards $WIDTH, 132, { Done with 80 columns, so return to wide, 132-column LUNIT6 output BEGIN NEW DATA CASE BLANK

The next case will show the same example, but now in the [R],[L] representation, with use of the punched card. There is a necessary manual manipulation needed, because of program bug. BEGIN NEW DATA CASE $WIDTH, 79, { Request narrow, 80-column LUNIT6 output as an illustration BEGIN PEAK VALUE SEARCH, -1, { Time of -1 is request to read following card 0.5 1.5 2.5 3.5 { Limit extrema to these 2 subranges PRINTED NUMBER WIDTH, 10, 2, { Request max precision of 6 numbers in 80 bytes .010 6.0 1 1 1 1 1 -1 5 5 20 20 100 100 GEN GENT 1.E-3 3 LOADFF 1.0E3 3 C 1 2 3 4 5 6 7 8 C 345678901234567890123456789012345678901234567890123456789012345678901234567890 51,GENT,OPEN,,, 5.9066393442623E+03,1.2795081967213E+06,,,,, {remark extra comma's 52,LOADFF,,,, 1.1803278688525E+04,2.4590163934426E+06$ {following type code and 2.3626557377049E+04,5.1180327868852E+06,,,,, {node names OPEN 1.E7 BLANK card finishing all branch cards BLANK card ending non-existent switch cards 14GEN 70. .1591549 -1. BLANK card terminating program source cards 1 { Request for all node voltage outputs C PRINTER PLOT C 193 .5 0.0 4.0 LOADFF GEN GENT BLANK card terminating plot cards $WIDTH, 132, { Done with 80 columns, so return to wide, 132-column LUNIT6 output BEGIN NEW DATA CASE BLANK

Rulebook ATP (junio 1996 - internet)

H25

1

XXV EMTP BENCHMARK CATALOGUE Following is a classification of all benchmarks, according to topics discussed in the Rule Book. A first division distincts between benchmarks illustrating supporting routines and benchmarks documenting simulation runs. Any remark that could contribute to the updating or improvement of this list greatly will be acknowledged. Supporting routines Further subdivisions are based on special request words as found in the Rule Book. JMARTI setup: DCN3,DCN5,DCN6,DCP20 LINE CONSTANTS: DC29,DC59,DC60,DCN3,DCN5,DCN6,DCP20 CABLE CONSTANTS: DC27,DC28 SEMLYEN setup: DC29,DC60 XFORMER: DC15 BCTRAN: DCN8 DATA BASE MODULE: DC36 SATURATION (CONVERT): DC13 HYSTERESIS: DC13 NETWORK EQUIVALENT: DC14 OLD to new ZnO: DC13 CHANGE SWITCH: DC14 ZnO FITTER: DC38,DC39 KILL CODES: DC13 Simulation part

Rulebook ATP (junio 1996 - internet)

H25

Further subdivisions are based on the models used in the network simulation. In most cases, these models are referred to, using special request words (as used in the Rule Book). TACS TACS HYBRID: DC1,DC2,DC8,DC19,DC20,DC22,DC30,DC33,DC37,DC38,DC43,DC45,DC47,DC57,DC63,DCN2, DCN10,DCP17 TACS STAND ALONE: DC18,DC19,DC20,DC21,DC23,DC46,DCP24 USAGE OF LINE MODELS CONSTANT PARAMETER MODEL (0,1,2) : DC1,DC2,DC3,DC4,DC5,DC6,DC7,DC9,DC10,DC12,DC16,DC19,DC20,DC22,DC24,DC25,DC26, DC30,DC31,DC32,DC34,DC35,DC38,DC41,DC42,DC43,DC44,DC45,DC47,DC48,DC50,DC51,DC 52,DC53,DC55,DC56,DC57,DC58,DC61,DC62,DC63,DCN1,DCN2,DCN4,DCN7,DCN9,DCN10,DCN 11,DCN12,DCP1,DCP10,DCP11,DCP13,DCP14,DCP15,DCP16,DCP17,DCP18,DCP19,DCP2,DCP2 1,DCP22,DCP26,DCP3,DCP4,DCP5,DCP6,DCP7,DCP8,DCP9 KCLEE MODEL (-1,-2,-3): DC1,DC2,DC7,DC12,DC16,DC24,DC31,DC32,DC37,DC38,DC41,DC47,DC50,DC52,DC61,DC62, DC63,DCN4,DCN7,DCP1,DCP10,DCP13,DCP18,DCP19,DCP6,DCP8 JMARTI MODEL: DCN4,DCN7 SEMLYEN MODEL: DC31,DC61 CASCADE PI: DC9,DC10,DCP25 USAGE OF TRANSFORMER MODELS SATURABLE TRANSFORMER: DC5,DC25,DC32,DC47,DC51,DC53,DCP11,DCP15,DCP21 PI-CIRCUIT: DC1,DC2,DC11,DC25,DC26,DC53,DC63,DCN9,DCN10,DCN11,DCP21,DCP26 USAGE OF NON-LINEAR ELEMENTS TYPE 91 DC22,DC38,DC42,DC43 TYPE 92 DC37,DC38

2

Rulebook ATP (junio 1996 - internet)

H25

3

TYPE 93 DC4,DC7,DC45,DC56,DC58,DCP15,DCP22 TYPE 96 DC45 TYPE 97 DC42,DCP5 TYPE 98 DCN7,DCP15 TYPE 99 DCN7,DCP6 ZINC OXIDE DC37 USAGE OF SWITCHES TIME,VOLTAGE OR CURRENT-CONTROLLED SWITCHES: DC1,DC2,DC3,DC7,DC12,DC16,DC19,DC20,DC24,DC25,DC26,DC30,DC31,DC32,DC41,DC43,D C47,DC48,DC50,DC52,DC53,DC55,DC57,DC61,DC62,DC63,DCN2,DCN4,DCN7,DCN9,DCN10,DC N11,DCP1,DCP10,DCP12,DCP13,DCP17,DCP18,DCP19,DCP2,DCP21,DCP26,DCP6,DCP7, DCP8,DCP9 DIODES OR THYRISTORS (TYPE 11): DC1,DC2,DC30,DC32,DC57,DC63

Rulebook ATP (junio 1996 - internet)

H25

SPARK GAP OR TRIAC (TYPE 12): no illustration found TACS CONTROLLED SWITCHES (TYPE 13): no illustration found STATISTIC SWITCH (TYPE 76): DC16,DC24,DC50,DCP13 MEASURING: DC33

USAGE OF SOURCES STATIC ELECTRIC NETWORK SOURCE FUNCTIONS: DC1,DC2,DC3,DC4,DC5,DC6,DC7,DC9,DC10,DC11,DC12,DC16,DC17,DC19,DC22,DC24,DC25 DC26,DC30,DC31,DC32,DC34,DC35,DC37,DC38,DC41,DC42,DC43,DC44,DC45,DC47,DC48, DC51,DC52,DC53,DC55,DC56,DC57,DC58,DC61,DC62,DC63,DCN1,DCN2,DCN4,DCN7,DCN9, DCN10,DCN11,DCN12,DCP1,DCP10,DCP11,DCP12,DCP13,DCP14,DCP15,DCP16,DCP17,DCP18 DCP19,DCP2,DCP21,DCP22,DCP25,DCP26,DCP3,DCP4,DCP5,DCP6,DCP7,DCP8,DCP9 TYPE 16: DC44 IDEAL TRANSFORMER (TYPE 18): DC25,DC55 TYPE 60: DC22 SM (TYPE 59): DC25,DC26,DC47,DC53,DCN9,DCN10,DCN11,DCP21,DCP26 UM (TYPE 19): DC34,DC35,DCN1,DCN2,DCN9,DCN10,DCN12,DCP16,DCP17,DCP21 FIX SOURCE (LOAD FLOW): DC25,DC26,DCP26 ANALYTIC SOURCE (TYPE 1-10): DC6,DC42

STATISTICAL TABULATION STATISTICAL SWITCH (TYPE 76): DC16,DC24,DC50,DCP13 STATISTICS DATA: DC24,DC40,DC48 OMIT BASE CASE: DCP13

4

Rulebook ATP (junio 1996 - internet)

SPECIAL FEATURES START AGAIN: DC40,DC49 DISK PLOT DATA: DC3,DC45,DC54 SPY USAGE: DC57, DCP22

PEAK VOLTAGE MONITOR: DC61,DC62 $INCLUDE: DC8,DC17,DCP23 /-CARD USAGE: DC33 FOURIER ANALYSIS: DC42 POSTPROCESS PLOT FILE: DC46 REPLOT: DC54 BATCH MODE PLOTTING: DC42,DC46

Last edited 27/09/88 M. Ulens G. Empereur 1

H25

5

Rulebook ATP - Errata

1

LIST OF RULE BOOK ERRATA

XXI - LINE CONSTANTS p7 - parameter FCAR - unusual usage! In derrogation to all other places in the Rule Book, blank and zero have a different meaning for parameter FCAR. This is because in the code (SUBR25), card image interpretation is using character string detection rather than the F10.6 format specifier. Moreover, blank and 1 have the same meaning in this particular case. Be carefull. This was maintained in order to stay compatible with older versions of LINE CONSTANTS. In order to avoid confusion, however, it is advisable not to use blank. p28 - Applications - additional remarks. This section refers to the creation of punched card output. In that case, one should not forget to specify the DIST-parameter in cols 45-52 of the frequency card. For a description of the DIST-parameter, we refer to p20. This modification must be added on following pages: p7, 12, 16, 24, 25 The Rule Book page p4D-2 depicts such set of punched cards for a K.C.Lee model. XXIII - CABLE CONSTANTS p15 - parameter ISYST - wrong description. ISYST = 0 : pipe in the air, touching the earth surface (rather than the wrong description: pipe of infinite thickness) p38 - general remark: - wrong description. X is XOPT C is (not

in mH (not Ohm), for the specified section length, so use =0. (not FREQ). in µF (not micro mho) for the specified section length, so use COPT =0. FREQ).

XIX-C - BCTRAN - some new guidelines p15: The note, near the end of the example becomes obsolete, because starting from ATP3, these shunt resistances are automatically taken into account. p20: similar remark for note 1. Note 2 (p21) still remains valid! p21: the specification of $UNITS and $VINTAGE is performed automatically since ATP3. Be carefull, however, since the $UNITS always is tricky (it has to be reset to the network value after the BCTRAN punched cards).

2

Rulebook ATP - Errata

IV - Branch Cards The current Rule Book still refers to an option "USE AB". Since ATP1, however, this option was modified into "USE AR". Whereas for the old notation USE AB ===> A = L-1 B = R the meaning of parameters now is modified USE AR ===> A = L-1 R = R This request should be preceeded by the request $UNITS, 0.1591549, 0. the same way as used in BCTRAN. Keep this in mind when rading following Rule Book pages: 4B-4 4C-4 4D1-5

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF