Professional Documents
Culture Documents
01'96 Feb
01'96 Feb
CONTENTS
Editorial
3 Call for Contributions
4 Instructions for Autors
EEUG Association
7 EMTP Summer Course
9 EEUG Meeting 1996
Program Information
10 Summary of ATP Development (March’95 .. March’96)
W. Scott Meyer
12 Does Salford ATP run under Windows 95?
László Prikler
17 Enhancement of ATP Execution under MS DOS/MS Windows 3.xx
Mustafa Kizilcay
Utilities
18 Review of some useful shareware/freeware programs related to the work with ATP
Mustafa Kizilcay
Technical Papers
23 Modelling a RL Parallel Circuit Using Type-94 Iterated Component
Laurent Dubé
26 A Neural Network Vacuum Circuit Breaker Model for Simulation of Transient Overvoltages
Janko Kosma, Peter unko
33 Investigation of Transformer Differential Protection Schemes by Using ATP-Models
Murari Mohan Saha, Birger Hillström, Bogdan Kasztenny, Eugeniusz Rosoowski
40 State Space Simulation of Transients using a Transmission Line Model with Frequency
Dependent Parameters
Lutz Hofmann
EEUG News
published by European EMTP-ATP Users Group e.V. (EEUG),
registered Association.
Editors
Dr. Mustafa Kizilcay, Dr. Juan A. Martinez-Velasco, László Prikler
Editors by E-mail
Dr. Mustafa Kizilcay kizilcay@hermes.rz.fh-osnabrueck.de
Dr. Juan A. Martinez-Velasco martinez@ee.upc.es
László Prikler priki@vmt.bme.hu
Mailing address
Prof. Dr. Mustafa Kizilcay
Fachhochschule Osnabrück
FB Elektrotechnik
Albrechtstr. 30
D-49076 Osnabrück, Germany
Phone +49 541 969-3065
Fax +49 541 969-3070
W ith this issue, Mr. Laszlo Prikler of the Technical University of Budapest in Hungary has
voluntarily joined the Board of Editors of EEUG News as a co-editor. This follows
authorization of the Executive Board in April of 1996. We believe this addition is a promising
development for the future shaping of EEUG News.
In this issue we have focused our articles on efficient handling of ATP running on Intel PC’s
besides technical papers presented at the EEUG Meeting 1995. Especially, the article on how to
execute ATP under MS Windows 95 deals with an up-to-date question raised by ATP users. A
summary of ATP development in the last year (March’95 .. March’96) is given in the article
written by Dr. W. Scott Meyer. Important freeware/shareware utilities useful for working with
ATP are reviewed in another article under Tips and Tricks.
EEUG News needs your valuable contributions of any type. These could be in the form of
technical papers, calls for help, discussions, etc. Also, your suggestions to review particular
modelling features, or provide hints about more efficient ATP use, are appreciated.
Your Editors
Instructions for Authors
First, middle and last name of the author Department / institute
Organization name, Country Street / P. O. Box
Postal code, city, country
Voice tel. / fax number (optional)
Email address (if available)
1 Technical contributions
The quality of a publication depends to a great extent on the uniformity of presentation. Rules
that must be observed by authors of articles for EEUG News are as follow (this article can be
considered as an example of a technical paper):
paper size DIN A4 format (21x 29.7 cm) or US standard format (8.5 x 11 inch) with left,
right, top and bottom margins of 2.5 cm or 1 inch.
page layout Single-column and single-spaced format is recommended. The first page should
have the title inside the top margin, and left aligned. The title is followed by the
name (first, middle and last name) of the author, organization name and country
printed left aligned, whereas address, voice tel./fax number (optional) and
E-mail address (if available) of author(s) are printed right aligned.
Section titles should be bold, with two blank lines above, and one blank line
below, each such title. One line should be left blank between paragraphs, and
indentation at the start of paragraphs should not be used.
The contribution should not be paginated. A erasable pencil can be used to
number the pages on the back side, or in the bottom-right corner.
fonts Times New Roman, Roman or another proportional font similar to the font used
to create "Instructions for authors" is preferred.
The title should be bold faced and in capital and small letters with font size of
20 (points) as the title of this text given above.
The names of the authors, organization name and country should be should be
bold faced in font size 12. The address, voice tel./fax number and E-mail
address of author(s) should be in font size 11 as shown above.
The body of the text should use font size 12. Titles of sections and subsections
should be bold in font size 14.
3 General remarks
Selection among contributions is done by the Executive Board of EEUG Association, but
responsibility for the content of a contribution rests with its author(s). If important editorial
changes seem necessary, the authors will be consulted prior to publication. No honorarium will
be paid any author.
Please mail two copies of your contribution to the Chairman and one copy to the Deputy
Chairman of EEUG Association, who act as the Editors of EEUG News on behalf of the
Executive Board:
A n EMTP Summer Course, which will take place at the Fachhochschule Osnabrück, on
July 1-5, 1996, is planned for ATP users with little or no prior ATP experience or for
those wishing to update their skills.
The following main modelling subjects will be covered by the lectures, which will be
accompanied by interesting applications of power system transients in the afternoon PC
laboratory sessions. These applications include, for example, line energization, fault studies,
inrush currents of transformers, power electronics, statistical switching studies and insulation
coordination. The latest PC version of ATP will be used for the exercises. The participants may
use their own portable PCs (386 or newer) for the exercises, if desired.
Monday, July 1
Introduction to the ATP and to the related tools ATPDRAW, TPPLOT and PCPLOT.
Functioning of the ATP on MS-DOS PCs and file organization.
Basic solution methods. Representation of linear circuits with lumped, coupled and uncoupled
elements, static sources and switches.
Tuesday, July 2
Overhead transmission lines. Line equations and traveling waves. Frequency-dependent
behaviour.
Wednesday, July 3
Introduction to the integrated simulation modules TACS (Transient Analysis of Control
Systems) and MODELS (general purpose simulation language). Interface to the electrical
circuit in the ATP. Signal analysis and representation of user-defined control and circuit
components.
Thursday, July 4
Theory of rotating machines. Synchronous machine model, type 59. Universal machine
modelling of AC and DC machines. Speed, voltage and torque control.
Friday, July 5
Data Base Module. Non-linear elements. User-defined components.
Class sections with three theory lectures per day will begin at 8:30 and will end at 13:00. Guided
PC laboratory exercises will take place in the afternoon between 14:30 and 18:00 illustrating the
simulation of system components by means of typical applications.
Laurent Dubé
DEI Simulation Software,
Portland, Oregon, U.S.A.
Mathias Noe
Institute for Electrical Power Systems
University of Hannover, Germany
Laszlo Prikler
Department of Electric Power Systems
Technical University of Budapest, Hungary
To provide better computer access (two participants will share one PC), the enrollment will be
limited to 38 participants. Advanced registration is required. Accommodation of the participants
has been arranged at special rates at the Park Hotel in Osnabrück.
The course announcement has been sent to total 300 European ATP users including EEUG
members. Additionally, the course has been announced in the list servers ATP-EMTP and Power
Globe.
T he next annual meeting of the EEUG will be held on November 10-12, 1996, at the
Technical University of Budapest, Hungary. The Meeting will consist of three main parts:
The Technical Session and technical visit is open to all licensed ATP-EMTP users, whereas
the Members' Meeting can be attended only by EEUG members. On the other hand, interested
persons may observe this meeting as guests, without voting rights.
Two types of contributions may be submitted: conference papers (20 minutes presentation) and
short contributions with 10 minutes presentation. We kindly ask members to submit in writing
any important suggestions or ideas related to EEUG membership. Such ideas will be discussed
at the Members' Meeting.
Contributions on all topics related to the study of any transient phenomena are expected. The
papers should illustrate available features and limitations of ATP. The following preferential
subjects are proposed for this year:
1. Testing of ATP Program - Comparison of simulated results and that obtained by using other
tools (TNA, other programs, field/laboratory tests)
2. New application fields (neural net training, relay algorithm testing, FACT, power
electronics, superconductivity, EMC)
3. Using ATP as simulation tool in the computer aided education
4. MODELS applications
A single page abstract of your technical paper should be submitted before October 1, 1996 by
mail, fax, or E-mail that we can forward a more detailed agenda to the participants of the
meeting. The complete text should arrive no later than October 30, 1996.
Preliminary Program
A detailed announcement will be sent to all EEUG members and European ATP users.
MODELS has been extended in many ways: 1) foreign models and functions allow any
names, and can be in other languages (e.g., C); 2) global variables surpass model
boundaries; 3) solution of simultaneous nonlinear equations; 4) coexistence with TACS
in the same data case; 5) Connection to .PL4 file for POSTPROCESS PLOT FILE use; 6)
vector functions (both arguments and values); 7) complex variable arithmetic; 8) TACS
device types 50-66 in library; 9) Iterated USE of a model; 10) Z-transform alternative.
The Type-94 branch can be used for multi-phase, time-varying, possibly-nonlinear electrical
modeling by connection to MODELS. Compensation then avoids extraneous time delays.
Type-94 logic now allows three distinct multi-phase options: 1) Thevenin (THEV); 2)
Norton (NORT); and 3) iterated (ITER);
Compensation logic has been strengthened. Before, some cases involving adjacent switches
were wrong. The Universal Machine (U.M.) is the most important beneficiary (e.g.,
Bonfanti's complaint in the September, 1989, issue of EMTP News is solved).
Switching at peak current sometimes is required for power electronics. This has been
simplified using GIFU switch logic to provide dynamic current redirection following a new
experimental iteration to satisfy diode and thyristor constraints.
Salford ATP has been enhanced in several ways: 1) The header of a .PL4 file can be
compressed by the removal of unused names; 2) .PL4 files can be double-precision; 3)
STARTUP can be remote; 4) $DEPOSIT allows almost any parameter (including all
STARTUP variables) to be changed in ATP data.
Salford TPPLOT advances: 1) JOIN will merge two .PL4 files; 2) More (40) graphic
modes are allowed to accommodate new output cards; 3) C-like REAL*8 .PL4 files can
be plotted. 4) The MATH command allows mathematical processing of signals as they are
loaded from disk; 5) Separate heading file for MATLAB compatibility of RELAY output;
and 6) COMTRADE output can be created interactively;
IBM OS/2 and MS Windows NT are being used to support modern ATP on Intel PCs. The
Watcom compiler is used. PostScript output of batch-mode plotting has been reworked, and
new utility PSPLOT will print one, two or four plots per page.
The 700-page EMTP Theory Book of BPA has been converted to WordPerfect 5.1 storage
with bitmapped figures for either 300 dpi or 75 dpi.
The 59KILO declaration allows Type-59 S.M. (synchronous machine) voltages and
currents to be scaled by 1000. This allows kilovolts/amps.
model as a function of frequency. This has been extended to CABLE CONSTANTS and
CABLE PARAMETERS.
Loose ends of CABLE PARAMETERS have been completed. These include computer-
stored user instructions, lower-case text, and the documentation of data on any punched
branch cards.
ATPDRAW allows the assembly of ATP data by clicking on menus and icons to build a
schematic. A new version has broken the 640-Kbyte barrier of DOS as well as allowed
many extensions and alternatives.
Noda frequency-dependence for cables and overhead lines is available in Salford EMTP.
But the separate MS-DOS fitting program ARMAFIT is being withheld for further work.
Parametric studies are performed using the CARD subcommand of the APPEND command
of SPY. A character string now can replace the card number.
A large CIGRE hvdc test case has been made compatible with ATP. This is model T-4
within IEEE paper number 95 WM 272-5 PWRD.
ATP for MS Windows 95 is being developed using MS tools. These include FORTRAN,
C, and BASIC compilers that are compatible with MS OLE (Object Linking and
Embedding).
A new Type-25 TACS source can be set equal to any variable of a connected a .PL4 file
within POSTPROCESS PLOT FILE (PPF) data.
The skin effect of LINE CONSTANTS has been corrected to agree with CABLE
PARAMETERS.
Several computers other than Intel-based PCs have been tested for the support of ATP this
past year. These include H-P Unix, DEC OSF Unix, and Apple Macintosh Quadra and
PowerPC.
PCPLOT has been enhanced in following points: 1) A bug related to the assignment of
parallel port for screen hard copy has been corrected; 2) Scaling ticks of axes in HP-GL
format are now visible, when HP-GL file is imported into word processors like WinWord,
WordPerfect; 3) The logic to recognize the end of plot data in .PL4 files has been improved,
so that FREQUENCY SCAN plot data and PL4 file comments entered via ATPDRAW are
handled correctly.
An semi-automatic installation routine is provided with the ATP floppy disks distributed by
the European EMTP-ATP User Group Association.
1 Introduction
The Salford Fortran compiler FTN77/x86 has been used since 1989 to support ATP on Intel-
compatible PC platforms. This version of the ATP program requires that DBOS, Salford’s own
extended memory manager, be active in memory. It is known that even on DOS platforms,
DBOS has required special care to avoid memory conflicts with other memory managers and
disk caching programs. Since those earliest days, graphical operating systems such as Win 3.x,
OS2, Win 95, and Win NT are being used more widely, and these increase the likelihood of
such conflict. Mainly because the memory organisers of such modern operating systems are
integrated deeply in the core of the system, managing the co-operation with DBOS requires
more effort and sophistication --- if it is possible at all. A completely different approach would
be to replace the DOS-based Salford compiler with a new one that is native to the windowed
operating system of interest. In the preceding issue of this periodical, Robert J. Meredith reported
on his success porting ATP to OS2 (and also WinNT/Win95) using Watcom's multiplatform
Fortran77 compiler [1]. However, until Salford Fortran is retired by other program developers,
testing of existing Salford ATP on new operating systems remains timely. More than 40 E-mail
messages have been submitted to the ATP-EMTP Listserv about "how to run ATP under
Windows 95," so the subject remains important to many1 .
Not ATP, but rather Windows 95 itself, requires stronger hardware than the known minimum
(386+4MB) for ATP simulation. This author uses Win95 on a 486 clone having a Cx486DX-
2/66-S processor + 8MB RAM, and he thinks this is the acceptable minimum. Installation of
ATP under Win95 can be accomplished using part C) of ATPSETUP.LIS (the section for Win
3.1) on the GIVE2 disk, but some important modifications do apply:
1. Do not use any qualifier in the EMM386.EXE device setting of the CONFIG.SYS file.
An example of the CONFIG.SYS is shown next:
device=c:\windows\himem.sys
device=c:\windows\emm386.exe
1
Author of this report express his gratitude to other subscribers for their contributions. This
acknowledgement is especially addressed to: Scott Meyer, Harald Wehrend, Robert Meredith, Robert
Schultz, Gayle Collins, Walter Dykas, Christian Hoelzl, Laurie Snider, Gary C. Thomann, Mustafa
Kizilcay and Laurent Dubé.
device
files=30
buffers=50
dos=high,umb
stacks=9,256
2. Set environmental variable ATPDIR equal to the ATP program directory. An example of
the AUTOEXEC.BAT is shown below: (Supposing that ATP directory structure
corresponds to that of INSTALL.BAT on GIVE1 disk creates [2])
PROMPT $p$g
PATH C:\WINDOWS;C:\WINDOWS\COMMAND;C:\DOS;C:\DBOS.DIR;
C:\ATP\PRG;C:\ATPDRAW
SET TEMP=C:\DOS
SET ATPDIR=C:\ATP\PRG\ {the closing \ is important!}
SET BREAK=ON
The use of environmental variable ATPDIR is supported in all subprograms of the recent
ATP package (TPBIG, TPPLOT, PCPLOT) but not yet in ATPDRAW.
3. No additions to this point. But, putting DEVICE=C:\DBOS.DIR\WDBOS.386 entry in the
[386Enh] section of C:\WINDOWS\SYSTEM.INI file is important, so it is repeated here.
Fig. 1
7. Repeat steps 4-6 to prepare for comparable shortcuts to TPPLOT and PCPLOT. The only
difference is use of
Cmd line: C:\DBOS.DIR\RUN77.EXE C:\ATP\PRG\TPP.EXE
and
Cmd line: C:\ATP\PRG\PCPLOT.EXE
for TPPLOT and PCPLOT, respectively.
You may change to "full screen" mode of Screen properties, but you can easily switch
between full screen and window modes later by pressing Alt+Enter. Activate "Always
suspend" Memory properties, which is mandatory for TPPLOT and suggested for
PCPLOT. Using PCPLOT in a window allows the display of signals from two or more
.PL4 files at the same time.
cd c:\atpdraw\atp
c:\dbos.dir\run77.exe c:\atp\prg\tpbig /PARAMS %2
c:\atp\prg\pcplot.exe
rem c:\dbos.dir\run77.exe c:\atp\prg\tpp.exe
cd c:\atpdraw
8-9. Rebooting and running DBOS manually from a DOS prompt is not necessary.
Fig. 2 shows a Win95 Desktop with all four components of the ATP-EMTP package running
simultaneously, each in its own window.
Fig.2
Two 486 DX2-66 clones with 8MB of RAM have been used for testing ATP speed under
different operating systems (MS-DOS, Windows 3.1, and Windows 95). One of these machines
uses a Cyrix processor and Cirrus video card whereas the other has an Intel processor and Tseng
Labs video card. Time in seconds spent inside the time step loop of DC1.DAT is shown in
Table 1. These figures show that simulation speed depends significantly on the type of the main
processor and -- if the output is sent to the screen -- on the type of the video card, too. If output
is sent only to disk, speed seems to be platform- independent. But if output is sent to the screen,
there is a meaningful loss of speed under Windows 95.
5 Conclusion
The present version of Salford ATP does run under Windows 95, with some constraints. Time-
sharing can not be allowed! This means simulation advances only when the ATP window is
active, and it sleeps whenever some other application is active in the foreground. While not the
best, this "semi-multitasking" has some advantages over running ATP under MS-DOS without
Win95. For example, there is no need to re-load TPBIG.EXE every time a new execution is
desired, and task switching between ATP and other Windows applications is much faster; it
requires just a mouse click on the launch pad. Until the problem of inadequate time-sharing
might be solved, those who perform ATP simulation under Win95 are advised either:
1) not to try to time-share during on-going simulation, or
2) to use Watcom ATP from NYPA rather than Salford ATP and DBOS.
6 Acknowledgement
Author's EMTP activity is partly supported by the Hungarian Research Fund under contract No.
OTKA F017479, titled "Research of simulation methods of power systems transients".
7 References
[1] Meredith, R.J.: ATP for OS/2, Windows NT and Windows 95 on Intel PC Platforms,
European EMTP-ATP Users Group News, EUG News Vol. 1 (1995), no. 3/4, pp. 9-15.
[2] Kizilcay, M.: Easy Installation of ATP on an Intel-based PC under MS DOS/MS Windows,
European EMTP-ATP Users Group News, EUG News Vol. 1 (1995), no. 3/4, pp. 16-18.
I n cooperation with Dr. W. Scott Meyer a common DOS environmental variable called
ATPDIR has been introduced to TPBIG, TPPLOT and PCPLOT in order to access necessary
program files like STARTUP, LISTSIZE.DAT, from any directory on MS DOS PC’s.
The environmental variable ATPDIR is defined by using SET command of MS DOS either in
AUTOEXEC.BAT or later, when DOS Extender DBOS is loaded using DBON.BAT. It should
specify the complete path, where the program files are installed on hard disk, e.g.
SET ATPDIR=C:\ATP\PRG\
The last character of the string indicating the complete path must be “\” as shown above.
The use of APPEND is no longer needed, which might cause problems under MS Windows
3.xx. When PATH to the ATP program including TPPLOT and PCPLOT, and to Salford DOS
Extender DBOS is defined in AUTOEXEC.BAT, e.g.
PATH=.....;C:\ATP\PRG;C:\DBOS
and ATPDIR is set, then TPBIG, TPPLOT and PCPLOT can be executed from any directory.
The output (*.LIS) and plot files (*.PL4) will be created in the directory, where ATP is
executed. When ATPDIR is not specified or cancelled by entering SET ATPDIR=, then ATP
behaves like previous program versions.
This feature is available with the program files distributed to the EEUG members and created at
(or later):
TPBIG.EXE 28-March-1996
TPPLOT.LIB 08-April-1996
PCPLOT.EXE (Version 6.40) 04-April-1996
Additionally, TPBIG, TPPLOT and PCPLOT can be started from within ATPDRAW by
changing to the desired directory via batch-files ATP.BAT and TPPLOT.BAT. A recent, not
released enhancement of batch-file execution enables to run data cases in an arbitrary directory
from ATPDRAW. In this case, TPPLOT.BAT and PCPLOT.BAT are dynamically created
within ATP.BAT each time as ATP is called by ATPDRAW.
In the following, important programs selected by the author are summarized. Partly, they are
provided with the floppy disk GIVE2 of ATP distribution. The origin of other programs can be
asked from the EEUG Association. The first two free programs were created directly for ATP
use, whereas the remaining utilities are general-purpose programs.
LISTODAT Recover an ATP Data File from the Output Printer File
LISTODAT is a utility written by Bruce Mork to recover an ATP data file (the
"DAT") from the output printer file (the "LIS"). This first was mentioned in the
April, 1992, issue of the Can/Am EMTP Newsletter. Operation is so simple that
user instructions are not required. The program will prompt for names of the
input and output files. Progress of the conversion is monitored by a digital
readout during execution. LISTODAT is used frequently by the author to create a
complete data case file, if an ATP data case is assembled from partial files via
$INCLUDE statements.
GENPL4 Conversion of Measured Transient Data into PL4 Plot File Format
GENPL4 written by Mustafa Kizilcay enables to create a plot file in PL4 format
of digitally measured and recorded signals. The transient data must have been
recorded with constant sampling period and must be available in tabular form in
text (Ascii) format.
The program is distributed in two separate editions to suit the system you are
running it on:
The 16-bit Edition is designed for IBM PC compatible systems running
Windows 3.1x or Windows for Workgroups 3.1x
The 32-bit Edition is distributed in two separate release sets : one is designed
for Windows 95 and Windows NT 3.51 on Intel processors, and one is
The rubric People and Profiles aims for introduction of ATP users to readers. In this issue,
Executive Board members, Prof. Bernd R. Oswald (treasurer), Dr. Murari M. Saha (secretary)
and Dr. Søren Støvring-Hallson (member) are presented with their biographies and activities in
alphabetical order.
The main research areas of this institute include power system analysis and computation
methods. The most recent research projects and publications concern:
• modelling of power system devices and simulation of power systems based on both,
state-space equations and a set of algebraic and state-space equations,
• design and application of superconducting devices in electrical power systems,
• network studies and simulation and testing of protection relays.
Prof. Dr. Bernd R. Oswald is member of VDE and CIGRE, member of CIGRE Working Group
(SC 38: System Analysis and Techniques), member of the Technical Program Committee of
PSCC and member of the Editorial Board of ETEP.
Dr. Saha was a member of the Steering Committee of Leuven EMTP Center(LEC), Leuven,
Belgium. At Present, he is a member of the Executive Board (EB) of the European EMTP/ATP
Users Group (EEUG), Germany, as well as the Secretary of the EEUG/EB.
In 1994 Dr. Støvring-Hallsson joint NESA, the largest transmission and distribution company in
Denmark, where he is holding the position as manager for the transmission planning and system
studies group. The transmission planning and system studies group is responsible for overall
transmission planning for the east danish transmission system as well as simulation of dynamics
and transients in the system.
Dr. Støvring-Hallsson is presently the chairman of the study group for operational issues in
NORDEL, he is also a member of CIGRE and IEEE and a member of CIGRE working groups
14.22 and 14.29.
In the last three years Dr. Støvring-Hallsson has been heavily involved with the design and
integration into the AC systems of the Kontek HVDC Interconnection between Germany and
Denmark.
It is simple to express i/v as a Laplace transform, using the s-admittance of the circuit:
Y(s)
1 1
R sL
R sL sRL
To calculate the instantaneous conductance G, we can apply the bilinear transformation to the
circuit equation using the trapezoidal rule of integration:
1 1
iR v iL v i i R iL
R sL
and integrating both sides from t1 to t0 using the trapezoidal rule for vdt we have
(v0 v1)
L(i0L i1L) (t0 t1)
2
i0L
t (v v ) i
0 1 1L
2L
or
i L(t)
t v(t) term(t t)
2L
didv G
1
t
R 2L
The model called by the type-94 component in the ATP circuit could then be written as follows:
MODEL variable_R_L
comment -----------------------------------------------------------------
| ____ |
| Internal circuit: 1-2 : R//L | | |
| 1 o o 2 |
| |____| |
| |
| Built for use as a 1-branch type-94 iterated component |
-------------------------------------------------------------- endcomment
comment -----------------------------------------------------------------
| First, declarations required for any type-94 iterated model |
| (the values of these data and input are loaded automatically by ATP) |
| (the values of these outputs are used automatically by ATP) |
| (DO NOT MODIFY THE SEQUENCING OF THE DATA, INPUT, AND VAR IN THIS GROUP)|
| (the names may be modified, except 'n') |
| (when built for n=1, the array notation is not required) |
---------------------------------------------------------------- endcomment
DATA n -- number of node pairs
n2 {dflt: n*n} -- number of matrix elements
OUTPUT i, didv
comment -----------------------------------------------------------------
| Next, declarations of user-defined data for this particular model |
| (values which must be defined when using this model as |
| a type-94 component) |
---------------------------------------------------------------- endcomment
DATA ... -- parameters needed when using the model
comment -----------------------------------------------------------------
| Next, declarations private to the operation of this model |
--------------------------------------------------------------- endcomment
VAR st -- used for converting Laplace s to time domain
R, L -- and any other variables needed in the procedure
INIT
st := 2/timestep -- trapezoidal rule conversion from Laplace
...
calculation of initial values of R and L
...
-- the following initializations are needed for the Laplace function
histdef(v) := v0
histdef(i) := i0
ENDINIT
EXEC
...
calculation of new values of R and L at this time
...
LAPLACE(i/v) := (R|s0 +L|s1)/(R*L|s1) -- i(s)=Y(s).v(s)
didv := 1/R + 1/(st*L) -- di/dv = G(t)
ENDEXEC ENDMODEL