12'98may
TRANSCRIPT
-
8/11/2019 12'98may
1/85
EEUG NewsEuropean EMTP-ATP Users Group e.V.FEBRUARY -MAY 1998
NUMBER 1-2
VOLUME 4
C O N T E N T S
Editorial
3 Instructions for Authors
EEUG Association
6 EEUG Meeting98, Prague, Czech Republic, November 9-10, 19989 One-day ATP-EMTP Course - Frequency Domain Harmonic Analysis
Prague, Czech Republic, November 11, 1998
12 EEUG Working Group Transmission line models in ATP -Mustafa Kizilcay
Program Information
15 Whats New in ATP and TPPLOT - W. Scott Meyer-Tsu-huei Liu
Program Development
18 Harmonic analysis using the HARMONIC FREQUENCY SCAN in ATP
Gabor Furst
26 PCPLOT for Windows version 1.0 -Mustafa Kizilcay and Deniz Celikag
36 ATP workstation graphics for WinNT4 & OS/2 -R.J. Meredith and R.A. Schultz41 PlotXY - a new postprocessor for ATP -Massimo Ceraolo
Technical Notes48 Digital computation of electromagnetic transients in power systems. Current status
Juan A. Martinez-Velasco
Discussion Corner73 Modeling negative impedances in transient programs
Regional User Groups
75 Latin American EMTP/ATP Users Group Activities -Marco Polo Pereira
81 Japanese EMTP Committee Meeting and Workshop -Mustafa Kizilcay Japanese ATP Users Group (JAUG) Meeting -Masahiro Kan
Technical Papers
85 Fault Location Algorithm Testing using MODELS - Toshihisa Funabashi,Yoshishige Mizuma and Hitomi Otoguro
93 Simulation of a series compensated line for evaluation of relaying algorithms Murari Mohan Saha, Eugeniusz Rosolowski, Jan Izykowski, Bogdan Kasztenny
106 Relay protection algorithm testing with off-line simulation using ATP Kornl Petri, Gyrgy Csipke and Lszl Prikler
-
8/11/2019 12'98may
2/85
-
8/11/2019 12'98may
3/85
Editorial
EEUG News Feb-May 1998 3
Instructions for Authors
First, middle and last name of the authorDepartment / institute
Organization name, CountryStreet / 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. Rulesthat must be observed by authors of articles forEEUG Newsare 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 shouldhave 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 countryprinted left aligned, whereas address, voice tel./fax number (optional) and E-mailaddress (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, andindentation 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 usedto 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 bold faced
in font size 12. The address, voice tel./fax number and E-mail address ofauthor(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.
-
8/11/2019 12'98may
4/85
Editorial
4 EEUG News Feb-May 1998
numbering Arabic numerals should be employed in numbering of sections, figures, tables,equations and references. The subsections are numbered by inserting a full stop"." between numbers, e.g. 1 1.1 1.1.3. All the figures, tables and equations
should be numbered progressively. Equation numbers should be given inparentheses, such as (1) or (2-5), whereas numbers of references should bewritten between square brackets, such as [1].
structure The structure of a technical paper usually is organized in the following parts, in
the given order: title, abstract (100 to 150 words), introduction, body,conclusions, references and annexes, if required.
references A reference of a monograph should contain author(s), title, edition, publication(place and publisher) and year. Example:
[1] Karni, S.: Network Theory: Analysis and Synthesis, Boston, Allyn andBacon, Inc., 1966.A reference of a part of a contribution or to a monograph should containauthor(s), title of host, edition, part number, publication (place, publisher),
year and location within the host documentation.
Serials include periodicals, newsletters, annuals, and series of reports. Articles inserials contain author(s), title, title of host document, location within host andpagination of the part, as shown below:
[2] Clerici, A.; Marzio, L.: Coordinated Use of TNA and Digital Computer for
Switching-Surge Studies: Transient Equivalent of a Complex Network, IEEETrans. on Power Appar. and Systems, PAS-89 (1970), no. 8, pp.1717-1726
The authors are requested to prepare up to 10 keywords for their contributions. The keywords
should reflect the concepts, topics and methods included in the contribution.
Technical papers should be submitted primarily in printed form (three copies) ready to bephotocopied. Additionally, the text should be delivered on a MS-DOS floppy disk, if it is createdusing a word processor such as WordPerfect / CorelPerfect or MS-Word running under
MS-DOS, MS-Windows 3.x or MS-Windows 95.
2 Short articles, calls for help, suggestions, solutions, announcements
It is sufficient to provide the contribution by E-mail or on a DOS floppy disk (two copies)addressed each to the Editor and the Chairman of EEUG Association, who are responsible for the
edition. The text can be created using a plain text editor such as MS-DOS EDIT, or using a wordprocessor. When a word processor is used, WordPerfect 5.1/6.0, CorelPerfect 7.0 or MS-Wordfor Win3.x/95 2.0/6.0/7.0 format is preferred. Please state the rubric under which the article
should appear.
-
8/11/2019 12'98may
5/85
Editorial
EEUG News Feb-May 1998 5
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 willbe paid any author.
Technical papers should be submitted primarily in printed form ready to be photocopied. Pleasemail two copies of your contribution to the Editor and one copy to the Chairman, who act as thesupervising editor ofEEUG Newson behalf of the Executive Board:
Additionally, the text should be delivered to the Editor on an MS-DOS floppy disk or e-mail
attachment in zipped form, if it was created using word processor such as WordPerfect orMS-Word running under MS-DOS, MS-Windows 3.x or MS-Windows 95.
Co-editors of EEUG News
Lszl Prikler Prof. Dr.-Ing. M. Kizilcay
Technical University of Budapest Fachhochschule Osnabrck
Dept. of Electric Power Systems FB Elektrotechnik
Egry J. u. 18. Albrechtstr. 30
H-1111 Budapest, Hungary D-49076 Osnabrueck, Germany
Phone +36 1 463 3015 Phone +49 541 969-3065
Fax +36 1 463 3013 Fax +49 541 969-3070/-2936
Email: [email protected] Email: [email protected]
-
8/11/2019 12'98may
6/85
EEUG Association
6 EEUG News Feb-May 1998
EEUG Meeting 98Prague/Czech Republic, November 9-10, 1998
he traditional European EMTP-ATP Users Group Meeting in 1998 will be held in Prague theTcapital of Czech Republic on 9-10 November 1998. The meeting is hosted by the Faculty ofElectrical Engineering of the Czech Technical University in Prague.
Preliminary Program
Monday Nov. 9 9:00 - 18:00 Technical Sessions
Tuesday Nov. 10 9:00 - 13:00 Technical SessionsTuesday Nov. 10 14:30 - 16:30 Members Meeting
The Technical Sessions are open to all licensed ATP users. Preliminary registration will be alsoaccepted for those institutions/persons who are not yet licensed users of the EMTP-ATP.
Interested users should contact the Conference Organizer to inform how to apply for the licenseand/or to become EEUG member. This information is also available on the EEUG home page:http://www.vmt.bme.hu/eeug.
Members Meeting makes up the second part of the EEUG Meeting. After four years since the
foundation of the EEUG Association , the term of the present Executive Board ends at the endof 1998. A new Executing Board consisting of six members should be elected by the EEUGmembers at the Users Meeting in Prague.
Call for Papers
Two types of contributions may be submitted for presentations at the technical sessions: fullconference papers (20-minutes presentation) and short contributions (10-minutes presentation).
Contributions concerning the simulations of transients in power systems using ATP are expected.Interesting subjects could be comparison of simulation results with measurements, developmentand implementation of new models, application of ATP to education etc.
A single page abstract of submitted technical papers should be send to the Conference Organizerby mail, fax or e-mail before September 4. The full manuscript should arrive no later than October31. Publication guidelines will be provided with the acceptance letter.
The official language of the conference is English, therefore all abstracts and full papers shouldbe submitted in English.
Members Note
EEUG members are asked to submit in writing any important suggestion related to EEUG to the
Chairman of the Association, Prof. M. Kizilcay, before October 10. According to the Charter of
the Association, these suggestions will be included in the agenda of the Members Meeting. Aseparate invitation will be sent to all members at least 8 weeks before the meeting.
-
8/11/2019 12'98may
7/85
EEUG Association
EEUG News Feb-May 1998 7
Meeting Location
Hotel Krystal ***
Jos Martho 2/407
160 41 Prague 6, Czech Republic
Registration
Early registration for the meeting is recommended. Please return the Registration Form and
payment before September 30, to the secretariatof the conference:Agentura Carolina, Ltd.
EEUG 98P. O. Box 45Albertov 7/3a
128 01 Prague,Czech RepublicContact person: Renata KarlovPhone: 420-2-298223, 29 40 52
Fax: 420-2-296983E-mail: [email protected]
Registration Form for the meeting is available on the EEUG Web site at address:
http://www.vmt.bme.hu/eeug/eugmee98.htm
The registration desk at the conference hotel will be open on Sunday, November 8, from 8:00to 11:00 a.m. and 16:00 p.m. to 19:00 p.m., on Monday, November 9, from 8:00 a.m. to
16:00 p. m.
Registration Fees
before Sept 30 after Sept 30EEUG members: 125 USD 150 USDNon-members: 150 USD 175 USD
Accompanying persons: 35 USD 40 USD
The fee includes meeting proceedings, coffee during breaks, lunches, conference dinner. The fee
for accompanying persons includes conference dinner and access to optional activities.
Cancellation of Participation
The registration fee will be refunded with a deduction of 30% to cover the administrative costsif participation in the Conference is cancelled before October 15, 1998 in writing. No refunds will
be possible after this date.
Hotel Accommodation
The deadline for the hotel bookings in full choice is September 30, 1998. Later bookings will be
also accepted, but only up to the capacity of the reserved hotel.
-
8/11/2019 12'98may
8/85
EEUG Association
8 EEUG News Feb-May 1998
Following prices apply for the participants at Hotel Krystal***
single room 24 USD
double room 32 USDdeposit 20 USD
Accommodation cannot be reserved without deposit payment. The deposit must accompany theRegistration Form. Payment for accommodation should be done by a cheque, by a bank transferor by credit card. The reservation will be confirmed by a hotel voucher upon the receipt of your
deposit. Accommodation has to be paid in Registration Office on the first day of your stay.
Hotel Accommodation Form is available on the EEUG Web site at address:
http://www.vmt.bme.hu/eeug/eugmee98.htm
Social Events
An optional Sightseeing tour of Prague is scheduled on Sunday, November 8. The officialdinner will be held on Monday evening, November 9.
Optional Tourist Program
Prague Castle, Old Town of Prague on Sunday, November 8 at 9.30 a.m.
(A half day tour including transfer, guide, entrance fees, lunch. Price: 35 USD)
A walk through Prague castle with a visit to the Royal Palace and St. Vitus Cathedral. The
Old Town is the Pragues oldest independent quarter. Almost every architectural style is to be
found within its small area. Its monuments include the Old Town Hall with its astronomicalclock, the Gothic Tyn Church, The Clementinum - the large complex of a former Jesuit
College.
Please note that the organizer may cancel the excursion if it is selected by fewer than 10 participants.
Insurance
Neither the Conference Organizing Committee nor Agentura Carolina Ltd. accept any liability or
responsibility for death, illness or injury to persons or for the loss of, or damage to property orfor any financial loss of any person attending the Conference.
Conference Organizer
Dr. Tom Hasman
Czech Technical University in PragueFaculty of Electrical EngineeringDepartment of Power Engineering
Technick 2166 27 Prague, Czech RepublicPhone: 420-2-24352362
Fax: 420-2-3117556E-mail: [email protected]
-
8/11/2019 12'98may
9/85
-
8/11/2019 12'98may
10/85
EEUG Association
10 EEUG News Feb-May 1998
Instructors
Gabor Furst Mustafa Kizilcay
Consulting Engineer Professor
Vancouver BC, Canada Department of Electrical EngineeringFachhochschule Osnabrck, Germany
Course Outline
The following topics will be covered by the lectures, which will be accompanied by illustrative
examples. The latest PC version of ATP-EMTP running under MS Windows 95 will be used for
the exercises. The participants may bring and use their own portable PCs running MS Windows3.x/95/NT, if desired.
Introduction to power quality and harmonic analysis
Frequency characteristics of network components
Modelling of the frequency dependence of network components in ATP-EMTP
FREQUENCY SCANcomputation using ATP-EMTP
The ATP-EMTP method of harmonic analysis:
HARMONIC FREQUENCY SCAN
Preparation of a HFSdata case
Use of utilities HSOURCEand HFSINV
Examples of typical HFSstudies
Examples of typical FSstudies
The course will begin at 9:00 and will end at 17:00.
Course Fee
The course fee includes lectures, course notes with a computer diskette containing input data filesof the examples/exercises, a lunch and coffee breaks.
EEUG members: 190 USDNonmembers: 240 USD
Cancellation Policy: The course fee will be refunded with a deduction of 30 % to cover theadministrative costs if participation in the course is cancelled before October 15, 1998 in writing.
No refunds will be possible after this date.
A minimum enrollment of 10 participants will be necessary to hold the course. The EEUG e.V.
reserves the right to cancel the course, if necessary (a full refund would be made, should this
occur).
-
8/11/2019 12'98may
11/85
EEUG Association
EEUG News Feb-May 1998 11
Location
The course will be held at
Hotel Krystal
Jos Martho 2/407
160 41 Prague 6, Czech Republic
on November 11, 1998.
Registration
Early registration for the course is recommended. Please return the enclosed Registration and
Accommodation Form before September 30, 1998 to
Agentura Carolina, Ltd.
EEUG 98P. O. Box 45
Albertov 7/3a128 01 Prague,Czech RepublicContact person: Renata Karlov
Phone: 420-2-298223, 29 40 52Fax: 420-2-296983E-mail: [email protected]
Accommodation
Following prices apply for the course participants at Hotel Krystal***
single room 24 USDdouble room 32 USD
deposit 20 USD
Accommodation cannot be reserved without deposit payment. The deposit must accompany the
Registration Form. Payment for accommodation should be done by a cheque, by a bank transferor by credit card. The reservation will be confirmed by a hotel voucher upon the receipt of yourdeposit. Accommodation has to be paid in Registration Office on the first day of your stay.
Registration and Hotel Accommodation Form is available on the EEUG Web site at address:http://www.vmt.bme.hu/eeug/course98.htm
-
8/11/2019 12'98may
12/85
EEUG Association
12 EEUG News Feb-May 1998
EEUG Working Group Transmission
line models in ATP
Mustafa Kizilcay
-
8/11/2019 12'98may
13/85
EEUG Association
EEUG News Feb-May 1998 13
-
8/11/2019 12'98may
14/85
EEUG Association
14 EEUG News Feb-May 1998
-
8/11/2019 12'98may
15/85
Program Development
EEUG News Feb-May 1998 15
Whats New in ATP and TPPLOT?
W.Scott Meyer, Tsu-huei Liu
Canadian/American EMTP User Group, USA
E-mail: [email protected]
MOUSET is the STARTUP parameter that indicates whether or not a mouse is to be checked
for input in response to the opening prompt. Prior to correction of FLAGER on October 15 ,th
the user of real MS-DOS (as opposed to an MS-DOS window of MS Windows) had a problem
if he informed ATP that he had a mouse when in fact the mouse was not running. (Can/Am EMTP News, October 1997, p.1)
A new Type-20 source for the electric network was added to represent an operational amplifier
(op amp). The new code provides ideal modelling of the device: constant gain, an infinite inputimpedance, and zero output impedance. The op amp output (i.e., the node to which the Type-20 source is applied) must not touch a switch, in general. Usage of op amp modeling isillustrated by a new 4 data subcase of BENCHMARK DCNEW-22.th
Can/Am EMTP News, October 1997, p.8)
The COMTRADE command of Salford TPPLOT was substantially improved. Prior to a
correction on August 12 , COMTRADE output might be in error for data that had been extractedth
from large .PL4 files, which involved overflow of a 2-byte integer.(Can/Am EMTP News, October 1997, p.11)
If the station name is not defined by the user in the COMTRADE session of TPPLOT, it will be
generated automatically using the format:
TPPLOT creates from+ name of the PL4 file
. Thedefault output file names in COMTRADE session no longer have the fixed formCOMTRADE.YYY. Instead, if the user does not specify an output name, names of the two outputfiles will be parallel to the input file. For example, COMTRD.PL4 will produce output filesCOMTRD.CFG (the configuration file) and COMTRD.DAT (the signal file).
(Can/Am EMTP News, October 1997, p.12)
Environment variable WATDIR is honored for Watcom ATP as the ATPDIR is for Salford and
GNU programs. For those who use Win95 the separate, distinct name for the environmentalvariable makes it possible to reserve one DOS window for Salford use and another windowfor Watcom use. (Can/Am EMTP News, January, 1998, p.6)
TACS ASSEMBLY LANGUAGE (TAL) is a new special-request word that refers to use of
lower-level (assembly-language-like) coding for TACS supplemental variables. TACS assemblylanguage is not as fast as compiled TACS, obviously. But it avoids the need for a compiler andlinker. Details of TACS assembly language are being kept secret for a while. They will not berevealed to anyone unless he promises in writing to preserve the secret, and to avoidcommercialization. (Can/Am EMTP News, January, 1998, p.12)
-
8/11/2019 12'98may
16/85
Program Development
16 EEUG News Feb-May 1998
After December 10 MODELS is available for numeric processing within the loop over phasorth
solutions, as frequency is varied. TACS is not (yet) available. Earlier variables of the electricnetwork were being passed to MODELS only on the first step of the scan.
(Can/Am EMTP News, January, 1998, p.15)
widexx (4 letters followed by two decimal digits) is a new possible content of STARTUP
variable FMTPL4 for those wanting TPPLOT RELAY - like FORMATTED output. This isa 4 type of .PL4 file: uniform columns of numbers. Instead of a usual specification such asth
10E8.0 (to produce 10 columns of width 8 each), the user can key wide08 to produce columnsof width 8 as far as the eye can see. Any translation created after December 9 should include thisth
fourth alternative (Can/Am EMTP News, January,1998, p.15)
Prior to reform on December 4 nonblank FMTPL4 in the STARTUP file was necessary, but notth
sufficient, to request a FORMATTED .PL4 file. There also was integer L4BYTE havingcontrol over the format. Now, for versions that support C-like (the most efficient) files, a switchto FORMATTED requires only the addition of nonblank FMTPL4 (e.g., 10E8.0). IntegerL4BYTE is used only if FMTPL4 is blank, in which case it chooses between C-like (if unity)and UNFORMATTED (if zero). (Can/Am EMTP News, January, 1998, p.16)
Request word FLUX can be added to the characteristic of a Type-93 nonlinear reactor as a new,
more-efficient and more-convenient way to create device flux as an output variable. Flux replacesthe branch voltage output request. Initially, it is the user's responsibility to remember that whatotherwise would be branch voltage is, in fact, branch flux. There is not yet any reminder in the
heading of printed output (as for power and energy), or any special marking.(Can/Am EMTP News, January, 1998, p.16)
HP-GL output of a Fourier bar chart was added December 14 . In case of FOURIER ON (toth
produce spectral decomposition instead of the usual time plot) vertical bars and their associated
labeling (a harmonic number below each bar and a floating-point number above the tallest bar) arecreated and drawn into the ATPHPGL.xxx files as colored rectangles. It is working for Postscript,too. (Can/Am EMTP News, April, 1998, p.1)
NOBARS is a new binary switch that has been provided in order that a Fourier-like bar chart offrequency response can be ordered. This would be for any one variable of a .PL4 file that has
been produced by either FREQUENCY SCAN (FS) or HARMONIC FREQUENCY SCAN(HFS) execution of ATP. The default value is unity, which will result in conventional plotting (nota bar chart). So, if the user has connected the .PL4 file of a frequency scan, and if he does wanta bar chart, he must toggle this switch to zero. January 6 is the date such operation began.th
(Can/Am EMTP News, April, 1998, p.2)
Interpretation of input data cards was improved on February 17 for TACS supplementalth
devices. Earlier the device number was the only way one such interpretation differed fromanother. Now, text explains meaning of the number involved. To illustrate using a Type-50device, TACS supplemental device type 50 was the old interpretation whereas TACS
device type 50: Frequency sensor or meter
is the new text. (Can/Am EMTP News, April, 1998, p.7)
-
8/11/2019 12'98may
17/85
Program Development
EEUG News Feb-May 1998 17
The new Type-68 TACS device supports well the multiphase saturable transformer modelling.
Simulation speed was reported more than a factor of 8 faster than of the old model which usesonly conventional TACS components. The input file is much more compact, too: 71 lines for the
new compared with 328 lines for the original TACS code. (Can/Am EMTP News, April, 1998, p.7)
CASCADE LINE is a request word for the series connection of line sections, transpositions, and
miscellaneous lumped elements. CASCADE LINE provides no new modeling. Rather, it offersa new high-level data assembler that is convenient for cases involving numerous repetitions.Although details have changed, this is comparable in concept to what was done usingCASCADED PI which is not supported any more.
(Can/Am EMTP News, April, 1998, p.8)
HIGH ORDER PI CIRCUIT (HOPC) is a new, single-line request for a multi-phase Pi circuit.
A single branch card is involved, and this makes reference to an external data file. Unlike$INCLUDE, HOPC bypasses evaluation at the beginning of execution and it also avoids theinefficiency of FORMATTED data. It is much more efficient to bypass the card images anddirectly load program tables from an unformatted disk file. This is what is possible, using the newHOPC alternative.
(Can/Am EMTP News, April, 1998, p.9)
ALLOW EVEN PLOT FREQUENCY (AEPF) is a new request that allows even IPLOT values.
In the absence of an AEPF request, even values in columns 9-16 of the integer misc. data cardwill continue to be made odd. But with an AEPF request, such improvement will be ignored.
(Can/Am EMTP News, April, 1998, p.18)
-
8/11/2019 12'98may
18/85
Program Development
EEUG News Feb-May 1998
18
Harmonic analysis using the HARMONIC
FREQUENCY SCAN in ATP
Gabor Furst
Consulting Engineer, Canada
Vancouver BCCanada
1 Summary
ARMONIC FREQUENCY SCAN (HFS) is the ATP Request to call this option. HFS isa companion to Frequency Scan (FS). Both FS and HFS performs a series of phasor
solutions. FS solves the network for the specified sources, incrementing in each subsequent
step the frequency of the sources, but not their amplitudes or phase angles. Exception is the
James Randall option where the phase angles allow for the assumption that frequencies are
harmonics on the fundamental (see July 1997 CanAm Newsletter). HFS on the other hand,
performs harmonic analysis by executing a string of phasor solutions determined by a list of
Type 14 sources entered by the user. This procedure is the same as the procedure for
harmonic analysis used by all commercial harmonic analysis software known to the writer.
The main advantage of this approach compared with the time domain harmonic analysis is a
reduction in runtime of ten times or more, and avoidance of accuracy problems with Fourieranalysis. In addition some extra features have been implemented in TPBIG and TPPLOT to
enhance HFS.
The new option for harmonic analysis with ATP is available in the TPBIG version dated
April, 14, 1998 or later.
2 Introduction
Harmonic analysis is a study with the objective of determining harmonic current and voltage
distributions in a network due to harmonic currents generated by a variety of loads andnonlinearities. Harmonic analysis, particularly in distribution and subtransmission systems,
has gained increased importance in recent years, due to proliferation of harmonic sources and
consequently, an increased awareness of the effect of these sources on power quality. A
number of commercial programs have appeared on the market in recent years for harmonic
analysis. Nearly all the software companies marketing power system analysis software, have a
harmonic analysis program the cost of which runs into several thousand of US dollars. Apart
from certain technical benefits using ATP, such as the availability of a large variety of
models, either native to ATP, or available from ATP sources on a non commercial basis,
there is a considerable economic benefit to ATP users performing harmonic analysis with
ATP.
H
-
8/11/2019 12'98may
19/85
Program Development
EEUG News Feb-May 1998
19
3 Harmonic analysis, solution techniques
All the commercial software on the market uses the same basic approach to harmonic
analysis. This is to solve the network for sources of the same harmonic order separately. The
calculation of total harmonic distortion in voltages or currents is then done from processingthe results from the individual solutions. The network can be modeled with either Thevenin
or Norton equivalents to solve the fundamental and harmonic voltage and current distribution.
The power frequency (fundamental) voltages and currents may also be taken either from a
conventional loadflow, or simply defined by other considerations, such as minimum operating
voltages or currents in branches of interest. This approach is based on taking cognizance of
the fact that harmonics as they exist in practice, do not cause or modify saturation due to their
relatively high frequency and small amplitude, hence the network can be considered linear
and solutions for the individual frequencies can be simply superimposed. Should the network
contain harmonics generated by nonlinearities, such as typically transformer saturation, such
harmonic sources have to be precalculated and applied as user specified harmonic sources,
in the same way as other harmonic sources. This is rarely done, as it is assumed that such
harmonic sources do not play a significant role compared to other load related harmonics such
as those caused by power electronic components. Harmonic analysis programs also perform
frequency scan, the same way as ATP does. This is considered to be an integral part of
harmonic analysis, particularly in studies related to capacitor and filter applications,
resonance problems etc. This option has of course been available in ATP.
4 The time domain approach with ATP
Conceptually, it should be possible to do harmonic analysis with ATP the same way as it isdescribed above. One needs only to run a sequence of phasor (steady state) solutions with the
required harmonic frequency sources, generate for each run an output file either directly or
through TPPLOT, and process the results in any desired way. This appears to be simple
enough, except it requires a very cumbersome process of generating a sequence of data files,
or rerun the same data file modified for the desired harmonic orders, and then process the
results either outside TPPLOT or by postprocessing TPPLOT files. It appears that this
approach, probably for the reason mentioned, has never been used.
The method used with ATP for harmonic analysis is to run a simulation in the time domain
with all the harmonic sources represented (See Fargo posting September 15, 1994 by thewriter). The difficulty which this approach presents arises from the fact that the phasor
solution can only be done for the fundamental or any other desired harmonic order, the rest of
harmonic sources have to be activated in the first time step. The actual harmonic analysis is
carried out by doing a FOURIER analysis in EMTP specified in the data file, or using
TPPLOTs FOURIER to do it. The problem which is inherent to using this method is that the
harmonic sources initialized in a time step give rise to transients. The transients so evoked
take time to die out. The Fourier analysis has to be done after the system has settled. This
settling time is in the order of 15 to 20 cycles for the lower order harmonics in a typical
distribution network, but can be substantially more for higher order harmonics. Some studies
performed by the writer had settling times up to about 25 to 30 cycles. The user has to find
out by experimentation what the settling time is. Running the system for desired settling timemay result in very long runs. A study of a ten bus distribution network resulted in an ATP
-
8/11/2019 12'98may
20/85
Program Development
EEUG News Feb-May 1998
20
time domain simulation time 10 times as long as a typical harmonic analysis program would
require, using compatible network representation. Once the system has settled a Fourier
analysis has to be done either from inside ATP or in TPPLOT. Fourier analysis inside ATP or
in TPPLOT has some pitfalls. Substantial errors can be encountered if DELTAT or IPLOT is
not properly selected. These errors are not only subject to DELTAT and can occur even withvery small time steps. Dr. Scott Meyer proposed the addition of a time equal to DELTAT/2 in
the TPPLOT Fourier application to eliminate errors (see Fargo posting by Dr. Scott Meyer
October 25, 1996). In addition, a choice af an odd integer for IPLOT is also required as
pointed out by Prof. Kizilcay. In many ATP industrial and utility distribution studies short
lines and cables are modeled with distributed parameter lines, sometimes simply for
convenience. To reduce the simulation time for harmonic analysis, the user would have to
convert these lines to pi equivalents, to avoid enormously long simulation times because of
the very small DELTAT required.. On the positive side, time domain harmonic analysis
enables the user to represent harmonics arising from nonlinear components, without having to
inject these harmonics separately, as this would be required in the conventional method of
analysis. Apart from the above mentioned difficulties time domain analysis is an excellentmethod from a conceptual point of view, and is preferred to the conventional method in
studies where nonlinearities play a big role in the fundamental frequency network solution. It
is also the only practical way to explore ferroresonance problems.
5 ATPs new HARMONIC FREQUENCY SCAN option
The new option which has been implemented in ATP is the special Request HARMONIC
FREQUENCY SCAN (HFS). It uses the same basic approach as the commercial harmonic
analysis programs and in fact it requires the same kind of logic as used for FREQUENCYSCAN. While FS performs a sequence of phasor solutions with the source frequencies
incremented in a predetermined manner and then enables the results of bus voltages to be
viewed in TPPLOT as a function of frequency, HFS performs a sequence of phasor solutions
for the 14 type current voltage sources, but only for the sources frequencies specified by the
user. The results, which are harmonic voltages at nodes and harmonic currents in branches for
any of the specified frequencies, can then be viewed in TPPLOT, as tabulated listings or bar
charts, in the same way as such results can be viewed following a FOURIER command in
TPPLOT.
HFS is connected to MODELS the same way as FS is connected, so that the user is able to
manipulate the results from MODELS creating special files (write1 and write2 commands in
MODELS) or outputs which can be viewed from TPPLOT. In addition, all the ATP, TACS
and MODELS facilities are of course available for the post processing of output files.
Harmonic analysis requires that certain components have parameters which are frequency
dependent. Frequency dependence in this context means that Rs, Ls and Cs are not constant,
but vary with frequency. Such components are typically transmission lines, loads, rotating
machines and transformers. These will be added gradually.
Some details of the new HFS features are described next.
-
8/11/2019 12'98may
21/85
Program Development
EEUG News Feb-May 1998
21
6. Details of HFS features
6.1 R-L-C elementsLinear frequency dependence of R-L-C elements either individually or in any combination is
available. The frequency dependence is specified in a separate group of records after thesources, from which this group is separated by a BLANK. The values of R, L. or C are
entered at a user specified elevated frequency, and TPBIG performs a linear interpolation at
any intermediate frequency. The exact format of entries is shown in the new DCN21
Benchmark data series, subcases 6, 7 and 8. As a simple example for an R element only, and
for the bus name LOAD, the entry is:
LOAD resistance was entered as 5 ohms in the network data. It is desired to have a value of
2.5 ohms at a frequency of 200 Hz.
BLANK ending sourcesNEXT FREQUENCY FOR SERIES RLC 200.LOAD 2.5BLANK ending frequency dependenct RLC
An important practical application is to represent frequency dependence of transformer
winding resistance. Making the winding resistance small in whatever transformer model is
used, an external variable resistance is added to keep the transformer X/R ratio constant.
A further option in the next development phase of HFD will be the Funk-Hantel formula [1]
to represent frequency dependence of R-L-C elements.
( )R f R a ffpf r pf
r
b
= +
1 1 (1)
( )L f L af
fpf L
pf
Lb
= +
1 1 (2)
wherefpfis the power frequency (50 Hz or 60 Hz), Rpf andLpf are the resistance/inductance
value of the RL branch at power frequency.
6.2 Lines
Frequency dependent line representation has been available, typically the JMARTI SETUP,
which may be used in frequency scans. It should be noted, however, that for the majority of
harmonic analysis studies in distribution and subtransmission systems, such frequency
dependent representation will not be required, firstly because most of harmonic analysis
studies are only for positive sequence harmonics, and secondly because this sophistication in
distribution and subtransmission studies is not justified even if triple (zero sequence)
harmonics have to be considered. One of the advantages of HFS is to enable the usage of very
short distributed parameter lines, without the penalty incurred in the time domain analysis,
where such representation requires very small DELTA and consequently a very long run time.
-
8/11/2019 12'98may
22/85
Program Development
EEUG News Feb-May 1998
22
6.3 Transformers
Frequency dependence of transformer inductances and resistances have been used in the past,
mainly in ferroresonance related studies. Frequency dependence of transformer winding
resistance can be modeled as described above under the R-L-C elements. Apart fromresonance type studies, frequency dependence of winding resistance should be modeled for
studies involving the analysis of losses due to harmonics.
6.4 Loads
A new frequency dependent load has been added. The model is based on the CIGRE type C
model [2], which is a series impedance ofRs+j Xsin parallel with a reactance ofXp, where
RV
Ps=
2
; X A h Rs s= ; Xh R
B QP
Cp
s=
(3)
and P and Q are the power frequency in MW and MVAR, h = is the harmonic order
(1,2,n),
A,B, and Care constants with default values suggested by CIGRE: A=0.073, B=6.7, C=0.74.
This load model was developed for the harmonic frequency scan but will not be unique to it.
It will be a general purpose ATP load model for both single and three phase applications. The
usage of the CIGRE model is illustrated in Benchmark data cases DCN21subcases 11 and 12.
As an example and ignoring exact column entries as shown in DCN21, assuming a CIGRE
load at bus TEST
XXXX TEST 0.5 CIGRE A,B,C 0.073 6.7 0.74 TEST V P Q
where V = line to line voltage kV, P = MW, Q = MVAr or other consistent units
or for three phase at the bus LOAD
GENA LODA
GENB LODB GENB LODC
-
8/11/2019 12'98may
23/85
Program Development
EEUG News Feb-May 1998
23
It should be noted that the CIGRE model used with the default parameters is a composite
distribution load model based on tests by the Electricite de France.
6.5 Synchronous Machines
At this time no special models are available for harmonic analysis. Specifically, SM58/59
synchronous machine models and the U.M. options for induction motors will not be modeled
in the phasor solution, and hence not represented properly for HFS. Moreover, a detailed
representation of either a synchronous machine or an induction machine is not justified for
harmonic analysis. The impedance presented by a synchronous machine to positive and
negative sequence harmonics is close to the negative sequence inductance, and there is, in the
general case, not enough data available on the rotor circuits which would justify a more
detailed model. For zero sequence harmonics the value depends on the neutral grounding.
This may be modeled by a simple inductance connected between neutral and ground.
6.6 Induction Motors (Generators)
Until a more refined model is developed, induction motors for harmonic studies should be
modeled with their locked rotor impedance. This representation should be adequate for the
vast majority of harmonic analysis studies. The model recommended by the writer for the
next phase of HFS development is basically the well known equivalent circuit of an induction
machine but without the magnetizing branch. The frequency dependent element in this circuit
is the rotor resistance with a value ofR/s(h), wheres(h)is the harmonic frequency slip. This
harmonic slip is (h-1)/hor (h+1)/hfor positive and negative sequence harmonics respectivelyand 1.0 for all zero sequence harmonics. For higher order harmonics the value of s(h)
converges to 1.0 which results in the value of the locked rotor impedance. There is a small
error for lower order harmonics if the locked rotor impedance is used.
6.7 Harmonic Sources
Harmonic sources are entered as Type 14 sources in the familiar way in the
I2 - A6 - I2 - E10 -E10 -E10format, where :
I2= 14
A6is the bus name
I2is blank or -1 (current source)
first E10is the amplitude in peak voltage or current
second E10is frequency in Hz or in harmonic order h(frequency / power frequency)
third E10is the angle
The fields after the 40th column are blank, Tstart or Tstop is not specified , Tstart is
internally set to -1. Note that the frequency is entered either in Hz or harmonic order but the
two types cannot be mixed in the same data file. Entries for the sources can be in any order,
they are internally sorted. The number of sources which can be entered is virtually unlimited ,
-
8/11/2019 12'98may
24/85
Program Development
EEUG News Feb-May 1998
24
at least for all practical purposes. The only requirement is that there must be at least one
power frequency (h = 1) source specified.. As it is not unusual to run harmonic analysis
without power frequency excitation, this requirement means that a dummy entry has to be
created with an amplitude of say 0.000001. The correct format of source entries is shown in
DCN21.datsubcases 3 to 15.
The correct specification of the angle is very important. The angle of the harmonic source is
the same as the angle of the fundamental frequency load current at the bus in question, which
has to be obtained from a loadflow study. The amplitude and angle of harmonics is a function
of the power electronic device generating the harmonics. Three phase diode and thyristor
rectifiers represent one of the major harmonic sources in the system A utility
HSOURCE.EXE was developed to assist in specifying such harmonic sources. HSOURCE
can be used to generate a set of correctly formatted 14 type sources which the user can copy
into his data file or call with $INCLUDE.
7 HFS Output Features
The output of HFS is sent to a PL4 file. Harmonic voltages and currents can be viewed by
running TPPLOT. TPPLOT displays either a line graph of harmonics as a function of
frequency, or a bar chart. The bar chart option is activated by sending a SET NOBARS=0
command. The abscissa of the bar chart is harmonic order. Only the highest value of the
harmonics is labeled at present.
HFS and FS allows now the monitoring of harmonic currents and voltages. This is
demonstrated in DCN21.dat subcase 4. Subcase 1 in DCN21 shows the -5 option in theoutput group, to monitor branch voltages of any type of branch including distributed
parameter lines. DCN21.datsubcase 4 shows the use of the -1 option in the output group,
to monitor current in a distributed parameter line. Branch currents can also be obtained by
keying 1 in column 80 as for the regular ATP data files. These options are also available for
FS. Subcases of DCN1and DN25show some other examples too.
Not yet available in TPPLOT, THD% and harmonic RMS values are calculated at the end of
the TPBIG run and recorded at the end of the .LIS file.
TACS and MODELS are connected to HFS the same way as they are connected to FS. There
has been no change in this respect, it is expected , however, that there will be in update in due
course to the newly available current monitoring options.
-
8/11/2019 12'98may
25/85
Program Development
EEUG News Feb-May 1998
25
8 Future Development
The following items are tentatively envisaged for the phase II development of HFS:
- Addition of the Funk-Hantel frequency correction for R,L circuits- Induction motor model
- Refinement of bar chart in TPPLOT
- Recording of TDH%, harmonic RMS values, IT product and TIF in TPPLOT
- Generation of wave shapes through TACS and/or MODELS
- Improvements based on comments from users
9 Acknowledgment
The implementation and ATP coding of HFS and associated changes in TPBIG and TPPLOT
were a major effort by Dr. Scott Meyer, which is acknowledged with thanks.
Thanks are also due to Gene Porter who participated in the verification process and for his
constructive comments and suggestions.
10 References
[1] G.Funk, T. Hantel:Frequenzabhangigkeit der betribsmittel von Drehstromnetzn,
ETZ ArchiveVol. 9, 1987
[2] CIGRE. Electra Vol. 71, 1981
-
8/11/2019 12'98may
26/85
Program Development
EEUG News Feb-May 1998
26
PCPLOT for Windows 95 and NTVersion 1.0
Mustafa Kizilcay & Deniz Celikag
-
8/11/2019 12'98may
27/85
Program Development
EEUG News Feb-May 1998
27
-
8/11/2019 12'98may
28/85
Program Development
EEUG News Feb-May 1998
28
-
8/11/2019 12'98may
29/85
Program Development
EEUG News Feb-May 1998
29
-
8/11/2019 12'98may
30/85
Program Development
EEUG News Feb-May 1998
30
-
8/11/2019 12'98may
31/85
Program Development
EEUG News Feb-May 1998
31
ATP workstation graphics for WinNT4 & OS/21
Robert J. Meredith Robert A. Schultz, P.E.Independent Consultant Consulting Engineer
River Edge, New Jersey, USA Yorktown Heights, New York, [email protected] [email protected]@ieee.org [email protected]
1 Introduction
his article is a shortened version of the ATPGRAPH.PDFdocument, which is availablevia FTP from ftp.ee.mtu.edu/pub/atp/util/atpgraph. The paper discusses how ATP
plots can be efficiently produced, stored, displayed, analyzed, printed to hard copy and
embedded in electronic documents for distribution. More specifically, this document is about
Postscriptgraphics: why they are ideally suited to serve all of the above functions, what
tools and procedures are now available and how they can be used effectively. Additionally,
this document describes DisplayNT, a new Postscript plot display and comparison program
for Windows NT4.
Efficient use of the ATP for complex, real-world engineering studies mandates efficient
production of many plots as well as the associated means of storing them, retrieving them,viewing them, comparing them, etc. All of these goals can be attained with the tools
described in this document.
2 Why Postscript?
The format of the Postscript has increased in flexibility over time. Now all the various
translations of ATP share essentially the same support for color Postscript plotting.
The reason Postscript survives, despite the higher price of Postscript printers, is that itsperformance is unequalled. The printers operate on any computer platform, running any
operating system. Postscript is actually a fairly high-level programming language, capable of
dealing efficiently with arrays, loops, geometry, transformations, user-defined variables and
procedures. Although ATP does not make use of most of this capability, the ability to easily
redefine what the printer is to do when it encounters a particular saved instruction makes
Postscript much more versatile than HPGL or any alternative image transfer process.
1 DisplayNT for Windows NT 4, Display2 for OS/2 Warp and versions of PSPlot for those operating systems are
copyrighted products of Robert J. Meredith and Robert A. Schultz. They are freely available, without separate licensing, topersons licensed to use ATP by the Can/Am ATP Users Group or associated Users Groups. All trademarks are property of
their respective owners.
T
-
8/11/2019 12'98may
32/85
Program Development
EEUG News Feb-May 1998
32
ATP Postscript files are also extremely compact, even when compared to less versatile
alternatives. Table 1 shows a comparison of the sizes of Postscript, HPGL and GNU plot files
for the authors 14-plot test case. Whether compressed or uncompressed, Postscript is the
most compact method of preserving plots -- as well as providing the easiest means of recall
and greatest versatility. Table 1
Quantity/
Plotting Method:
Number of Files
Uncompressed
File Size(s) (bytes) Compressed
File Size (bytes)
Postscript 1 165208 32891
HPGL 14 243246 49693
GNU 1 216147 56924
The compactness of ATP Postscript graphics originates from the ATP code that once drove
the Apollo screen display. The screen pixel coordinates of line breakpoints that might have
been drawn on a screen are now saved in various files for Postscript or HPGL or GNUplotting. This concept means that there is no need to send a succession of points lying on a
straight line into the output file. Only breakpoints need to be sent when the line direction has
changed. This ATP intelligence, greatly limits the number of points that must be saved in a
Postscript file. By contrast, the pl4 file of saved variable values inefficiently retains points
at regular intervals, without regard to whether there has been a change from the last value or
rate of change of value. A variable whose value never changes requires as much pl4 file
storage as the one changing at the highest frequency. However the Postscript file is
unaffected, because ATP screen plotting discards all unnecessary intermediate points.
Postscript plotting is the only method in which the concept of font even arises. Other
methods, like the true Calcomp plotter, simply stroke lettering. Postscript plotting is also theonly method that allows the background grids to be erased under the lettering, regardless of
last-minute changes to font sizes. That makes Postscript lettering more legible than any other
alternative. Postscript language also enables axis numerals to be exactly centered to the left or
under their associated tic marks, regardless of last-minute changes to the size of the font
used. Postscript also allows last-minute changes to stroke patterns of lines.
Postscript has also evolved to become the most portable form of vector graphics imaging.
When encapsulated Postscript (EPS) figures are included in a document, they can be scaled to
fit any available space without loss of quality. Adobes portable document format (PDF) takes
this capability even further, allowing embedded EPS graphics to be enormously enlarged atviewing time to reveal otherwise hidden detail. In short the versatility, integration, ease of use
and quality of the Postscript/EPS/PDF family of cross-platform products is unequalled and
irresistible to those who understand its capability.
3 The DisplayNT program
DisplayNT is a program for viewing ATP Calcomp Postscript plots in the Windows NT 4.0
operating system. It was written by the authors of this report and is the functional equivalent
of their Display2 program for the OS/2
environment. Its principal features include high
quality plot presentations that can be highly customized in terms of background, trace and
-
8/11/2019 12'98may
33/85
Program Development
EEUG News Feb-May 1998
33
font colors, line widths and font sizes. In use it becomes an integrated part of the ATP
program, automatically stepping through all the plots at the completion of a case, unless
interrupted by user mouse or keyboard input.
DisplayNT utilizes the ATP Postscript file as input and is capable of mimicking almost allaspects of Postscript printing, including such sophistication as erasure of background grids
under text. Figure 1 provides an approximation of the appearance of DisplayNT plots.
Figure 1 -- Approximation of typical DisplayNT screen plot
DisplayNT is more than just a time-of-run plot display program. It allows plot redisplay at
any time by either feeding the program the name of a saved Postscript plot file as a command
line argument or by simply mouse clicking on the Postscript files icon. The latter operation
requires making an association between the default .ps file type and the DisplayNT
program or adding DisplayNT to the users SendTo folder, as discussed later. In either event
all of the plots created in the ATP case can be reviewed in detail and compared to other cases,
since multiple instances of DisplayNT can be run simultaneously in individually sized and
positioned windows on the Windows NT desktop. All windows provide proportional scaling
of both lines and text, although text is omitted in windows too small to display it properly
(less than 350 pixels high). The user can turn plots into icons ready for immediate recall, if
desired.
DisplayNT goes beyond the capabilities of the general purpose Postscript viewer software of
Ghostview/Ghostscript by allowing the user to suppress extraneous curves or text, in order to
allow isolation of a single trace among the mess. It also allows viewing of exceptionally
long plots of up to 3.5 times normal width for instances where strip charts of extended time
periods might provide the best presentations. An example is shown in Figure 2. Note that
long plots are one of the reasons that a high-resolution display is recommended. The
DisplayNT program allows the screen view of the Postscript plots to be optimizedindependently of the printed view of the same plots from the same Postscript files. For
-
8/11/2019 12'98may
34/85
Program Development
EEUG News Feb-May 1998
34
example, the Postscript file can use colors or dash patterns most appropriate for printing on
white paper, while DisplayNT can show solid color traces of independent width and color on
a black screen background, as shown in these figures.
Figure 2 Example of extended width DisplayNT display
4 DisplayNT program requirements
DisplayNT utilizes OpenGL version 1.1 graphics routines for the highest quality of plotdisplay. While OpenGL is intended for 3-D graphics, the authors have chosen it for this 2-D
application to gain access to its unequalled anti-aliasing and scaling routines.
The use of OpenGL almost mandates use of Windows NT version 4.0. Neither Windows 95
nor Windows NT 3.51 comes with OpenGL 1.1 support. While Windows 95 can beretrofitted with OpenGL dlls that do make DisplayNT operate, the authors have yet to witness
satisfactory DisplayNT speed, even on 200 MHz Pentium processors. It is apparent that
Windows 95 is handicapped by the inadequate capabilities of that O/S or inadequate video
driver support for the retrofitted OpenGL dlls. Under Windows NT 4, performance has been
found to be quite fast -- even on 90 MHz Pentiums with 32 MB of memory -- provided that a
decent PCI accelerated video board is present. The authors have found the ATI Graphics Pro
Turbo, the Imagine 128 and even the low cost Diamond Stealth 2000 to have quite acceptable
speed. (Unfortunately, the latter video card does not provide 1280 by 1024 resolution.)
Considering the overall incompetence of Windows 95 the authors will not port DisplayNT
to Windows 95 or any variant. OS/2 support via the Display2 program has existed for about
two years and the code will be maintained without maintenance for OS/2 users.
DisplayNT shines best on a high-resolution desktop. Users are advised to maintain a 1280 x
1024 resolution or better and at least 65000 colors to best appreciate the multiple windowing
and comparison capabilities of DisplayNT. Do not use a video card that can only support high
resolution with interlacing or at a 60 Hz refresh rate. A non-interlaced rate of 70 Hz or greater
is mandatory to avoid annoying flicker.
DisplayNT is neither shareware nor freeware. It has been developed, despite lack of support
by the authors employer, as a hobby and as a service to the ATP community. It is availablefree of charge only to licensed ATP users and may be only freely distributed among the same.
-
8/11/2019 12'98may
35/85
Program Development
EEUG News Feb-May 1998
35
It is not a general purpose Postscript interpreter and will work only with the Postscript files
produced by recent versions of ATP. Compatible ATP Postscript files are produced by all
Watcom versions distributed by the authors for use under OS/2 or Windows NT/ Windows 95
and the newest (approximately 10-97 or later) Salford and Watcom versions from the Can-
Am User Group. DisplayNT will announce its displeasure with non-conforming files by asimple error message.
5 DisplayNT installation and testing
DisplayNT.exe needs to be placed with other atpwnt executables in a directory named
atpwnt, for consistency. The command script eatpw.cmd (Execute ATP-Windows), that
integrates ATP and DisplayNT operation, goes in the same place. The directory should be
placed on the users path. An environmental variable, now named atpwnt, must point to the
source directory. Do not set a value for atpdir or features now being added to ATP may
cause ATP to use a remote version of startup, causing an inability to customize plotappearance within the local working directory. A line at the top of the eatpw script can be
edited to establish the atpwnt environment when the script is run. Or the environmental
variable may be set in the control panel, along with the Path variable. Do not let the two
settings conflict! One can determine all his environmental variables by typing set at a
command prompt, opened after all settings have been made.
It is most important to ensure that startup variable NOPOST is set to zero. Else, no plots are
produced.
For most convenient operation, an association between the Postscript file type and theDisplayNT program must be made in one of two ways. A direct association allows plot
display to begin simply by double clicking on an ATP Postscript file icon. The other
possibility is for DisplayNT to appear in the SendTo folder brought up by a right-mouse
click on the same Postscript file icon. That is a little less convenient, but would be
appropriate if you wanted double clicking on a .ps file to bring up something else like
Ghostview/Ghostscript. It is a matter of choice and convenience. Those, like the authors, who
have Postscript printers at home and at work would probably not use Ghostview for printing
and would have a primary association with DisplayNT. Those who must rely on Ghostview
for all printing of Postscript files, and who often do so, might prefer that association to be
primary.
Should you want to use the .ps ending as a primary association to DisplayNT, it may be
necessary to remove a conflicting association. That is done by starting regedt32 at a
command prompt; selecting the hkey_classes_root on Local Machine window; highlighting
the .ps entry and selecting delete from the edit menu. To make the new association, click
on a .ps file or a file with your designated ending and, when prompted for the program to
open, select DisplayNT.exe in the atpwnt directory. Click the Always use this program
box to make it stick. To establish the SendTo association by menu it is necessary to copy
DisplayNT.exe to the WINNT4 Drive\WINNT\Profiles\Your_Login\SendTo folder.
Both atpwnt.exe and DisplayNT.exe can be run in any working directory. All necessary filesfor atpwnt are copied to the working directory from the atpwnt directory, as needed by
-
8/11/2019 12'98may
36/85
Program Development
EEUG News Feb-May 1998
36
the eatpw.cmd script. DisplayNT generates its own DisplayNT.ini file in the working
directory the first time it is run. That file may be subsequently edited to revise the variables
determined by that file. That includes the colors and widths of all lines and fonts. The user is
free to edit the DisplayNT.ini file to suit his pleasure. Font sizes and line widths are in points;
window height and offsets are in pixels. Possible screen color selections can be seen in theopen DisplayNT window by hitting the C key on the keyboard. Other keyboard controls are
listed and may be viewed and actuated by the menus attached to mouse button 2 when
DisplayNT is active.
The test Postscript file named postplot.ps is distributed with DisplayNT. DisplayNT can be
tested by entering DisplayNT postplot.ps at a command prompt in the directory where the
test file resides. (Several of the 14 plots have been embedded with troublesome characters to
test for unusual performance. They should not be considered as display errors.) When started
without a file sequence number as a first or second argument to the program, the plots will
automatically page and eventually disappear from the screen. For the case of a single plot, the
user must enter a command line 1 after the file name or as the only argument (when thedefault file is desired) to avoid paging and automatic termination. If the user hits any of the
keys indicated at the bottom of the display, automatic paging will cease after the subsequent
plot. Note that two of the test plots, like Figure 2, demonstrate double-width plots that have to
be accommodated by reducing window height and dragging out the right hand border of the
window. The user is free to experiment with the plot suppression functions on the keyboard
or the mouse menu. All keyboard suppressions terminate with a paging action, but may be
made permanent by modification of DisplayNT.ini.
A special test mode may be entered by typing DisplayNT 1 in a command window. In
addition to the Information Box popup, there should be a starting tone before the first plot andan ending tone after the last plot has been displayed. (The tones are WNT-specific and are not
heard on Win 95.) The elapsed time from tone to tone can provide an indication of whether or
not you are getting expected performance. The authors get 8-9 second elapsed times on 166-
MHz Pentium and 5-7 second times on 200 MHz Pentium Pro. Your mileage may vary
downward if you do not have a competent video board, the correct video settings or
adequate memory (32MB is enough for WNT 4.). The authors regard 15 seconds or less as
fast enough to not be annoying. Please be advised that the use of to switch
between full screen and windowed command prompts has been found to severely handicap
DisplayNT causing it to take ten times as long to execute. This anachronism of DOS should
neverbe used in WNT. If you use an NT command shell window, as the authors do, it must
be originally created in "Window Mode" and not "Full Screen Mode. This is the NTinstallation default. It can be checked and changed, if necessary, in the "Properties" menu,
Options tab.
6 Customizing Calcomp Postscript plots
Extensive user customization of the appearance of Calcomp Postscript plots is possible, if one
understands the mechanisms. By default the positioning of lines and the starting positions of
text are controlled by startup or graphics file variables and are the same in both printed plots
and screen plots from DisplayNT (or Display2). There are only a few minor exceptions to thisrule. All other parameters are subject to individual customization in the printed, EPS and
-
8/11/2019 12'98may
37/85
Program Development
EEUG News Feb-May 1998
37
DisplayNT formats. Settings, such as dash patterns, line widths, colors, fonts, and font sizes,
are controlled by the Postscript header file or the DisplayNT.ini for printed and screen
images, respectively. With custom editing of the Postscript file, (The Postscript file from ATP
is completely readable) every aspect of the plot can be modified. Using that mechanism, one
can easily superimpose plots from different files for either printing or screen display.
Text and font customizations are also possible. Postscript font heights in points
(approximately 1/72 of an inch) are obtained by multiplying the ATP inch heights by a
factor of 72. The actual Postscript font sizes define minimum line separations, allowing for
lower case descenders, but the conversion is a good approximation. The user should keep in
mind that multiple copies of DisplayNT.ini can be made for different screen display purposes.
Each working directory automatically has its own DisplayNT.ini file. Likewise, if the file
headpost.lis is found in the ATP working directory it completely replaces the default
Postscript header written into the Postscript plot file by ATP.
The Postscript header provides full control of widths, dash patterns and colors on a curve bycurve basis, rather than the partially collective approach of DisplayNT.ini. There is actually
support for up to eight simultaneous curves, but using that many requires custom insertion of
the additional four traces into the Postscript plot file.
For more details authors refer to the ATPGRAPH.PDF document available via aFTP from
the site mentioned at the beginning of this report.
7 Printing Postscript plots from ATP
There are several ways to obtain hard copies of ATP Postscript plots. The easiest way is to
simply copy the Postscript file to local port LPT1 or any network port that connects to a
Postscript printer. The default Postscript header is designed to place one plot per page on
letter size paper.
copy postplot.ps lpt1 orcopy postplot.ps \\server_name\printer_name
For those not having a Postscript printer, the freely available programs Ghostview and
Ghostscript can be used to both display the Postscript images and to print them individually
to any of several supported printers on any of several sizes of paper.
Use of the authors PSPlot command-line program lets users be more selective in printing.
It allows selection of any of the plots in the file to be printed at one, two or four plots per
page. It also allows cancellation of default color content in the plots to eliminate gray scale
rendition of the default colors. PSPlot can also substitute another header file to obtain
customization, even after the ATP plots have been created. (It is never too late to revise non-
positioning information.) PSPlot simply creates an output file named postcom.ps in the
working directory. The batch file Postplot.cmd can be used to execute PSPlot, feed it the
command-line arguments desired and copy the resultant postcom.ps file to a Postscript
printer of ones choice. Again, if one does not have a Postscript printer, the file postcom.ps
can be opened by Ghostview/Ghostscript and printed to almost any kind of printer.
-
8/11/2019 12'98may
38/85
-
8/11/2019 12'98may
39/85
Program Development
EEUG News Feb-May 1998
39
That is the preferred way of distributing an electronic document because it preserves the
original authors layout. Distributing in Word or WordPerfect document format does not.
For those who must see the figures in Word or WordPerfect for one reason or another,
Ghostview can readily process the users EPS figure to add a bitmapped image of the figure.It is that image that can be viewed in the word processor or directly printed to non-Postscript
printers. The bitmapped image is completely ignored in Postscript printing and can increase
the size of the EPS figure enormously.
9 Customizing printed layout of plots
Editing of Postscript headers has been repeatedly mentioned. This section describes only the
type of changes that can be made. Advanced users are requested to investigate Appendix A of
theATPGRAPH.PDF document, in which all Postscript header definitions have been heavily
commented by the authors as reminders of what they do.
The beginning of a typical Postscript header is shown below. The %% lines provide overall
information to the printer:
%!PS-Adobe-3.0 EPSF-3.0%%Pages: (atend)%%BoundingBox: 36 55 576 735%%DocumentFonts: Helvetica%%Creator: Watcom ATP Version%%CreationDate: User Editable%%Title: User Editable%%EndComments%%BeginProlog
Every occurrence of a % marks the beginning of a comment that is ignored in processing
the print description. The first two characters of the first line are used by some auto-
switching printers to separate Postscript jobs from PCL or pure text jobs. The EPSF allows
a single page print created by PSPlot to be understood as a stand-alone EPS figure, just in
case that is your need. It has no impact on multi-page print jobs.
The BoundingBox statement tells any Postscript processing software the clipping boundary
of the image to be included in word processing applications. The numbers represent the lowerleft x,y corner coordinates and the upper right x,y coordinates of the bounding rectangle, in
points. Points are about 1/72 of an inch. The default rectangle is about 7.5 inches wide by 9.4
inches high. (The coordinate system for Postscript uses the lower left corner of the paper in
portrait as the origin, unless translated or rotated.)
Any line beginning with a / is either a command or a definition.
/papwid 612 def % paper narrow dimension (points)/paphgt 792 def % paper long dimension (points)/bakgnd 1.0 def % background gray (0./1.=B/W)
The above definitions simply define the size of the paper, so that when the coordinate system
is shifted from portrait to landscape that it shifts the proper distance for letter size paper.
-
8/11/2019 12'98may
40/85
Program Development
EEUG News Feb-May 1998
40
Users of A4 or other sizes are free to edit the definitions. The /bakgnd definition was used
before DisplayNT to add a black or gray background to the plots. It should not be necessary in
the future, except for exceptional circumstances, since DisplayNT largely ignores the header
definitions.
The next set of commands is used to position a single plot on letter size paper, for sideways
viewing:
/landx 135 def % landscape x coord. for grid lower left cor. (points)/landy 75 def % landscape y coord. for grid lower left cor. (points)/yaxl 453 def % printed length of "8-inch" y axis (points)
The two definitions at the top determine where the grid will be located relative to the lower
left corner, in landscape. The.third definition sets the size of the Y-axis length, in points, to
any value desired by changing the number after /yaxl. The value above is 6.3 inches. The
length along the X-axis will scale proportionally to 7.9 inches for a typical 8 x10 plot.
Should one want plots displayed horizontally on a page in portrait, another set of definitions
comes into play:
/shiftx2 0 def % desired x shift of second plot grid from first (points)/shifty2 -335 def % desired y shift of second plot grid from first (points)% (For scalable 1/2 page portrait .eps plot use %%BoundingBox: 90 400 525 740)
This time the page setup assumes one plot above the next. The /shiftx2 and /shifty2
definitions tell the printer how much the second plot is to be shifted to the right and down
from the first.
Should one want to make an EPS figure with a normal horizontal layout on a page in portrait,
simply print one plot, at two per page (-p2) with PSPlot and add the indicated clippingboundary for an original 8 x 10 plot. Otherwise use Ghostview to identify where the lower
left and upper right corner of the clipping boundary should be and add those coordinates to
the third line of the header. The EPS plot is fully ready for use after only those two
procedures. It should not take more than a couple of minutes to make such an EPS figure for
use in any report .
10 Conclusions
The authors are confident that Postscript techniques, applied to both state-of-the-art videographics and hardcopy printing, provide more flexibility and higher quality output than any
other possible approach, -- even for those who do not have Postscript printers. It is very
important for one to recognize the need for and the immense utility of having essentially
automatic, intrinsic graphics output for ATP simulation work in a production-engineering
environment. DisplayNT represents what the authors consider to be an efficient and elegant
solution to this need, based on over 40 years of combined experience with digital transient
programs.
-
8/11/2019 12'98may
41/85
Program Development
EEUG News Feb-May 1998
41
PlotXY - a new plotting program for ATP
Massimo Ceraolo
University of Pisa, Italy
Department of Electrical Systems and AutomationV. Diotisalvi, 2 56126 Pisa
e-mail [email protected]
Abstract
his paper presents a new plotting program for ATP, called PlotXY, that has recentlydistributed to the ATP Community. The program is available via FTP from the
anonymous ATP-FTP server or from its mirror in Hanover at addresses:
ftp.ee.mtu.edu/pub/atp/util/plotxy or 130.75.2.2/pub/mirror/atp/util/plotxy
The main program features are:
easy-to use Graphical User Interface full 32 bit (win32) code for very fast operation up to 8 curves per plot plots from up to 3 different files on the same sheet plots versus time as well as X-Y plots allowed factors and offsets and zoom support clever automatic axis scaling cursor to see values in numerical format
Keywords:User Interface, GUI, ATP, Win32, PL4, Object-Oriented programming.
2 Introduction
A good user interface makes programs more usable, and reduces the time required to obtain
the required results. Present-day operating systems Graphical User Interfaces (GUIs) givehigh level support of designing good user interfaces. However, to take full advantage of these
GUIs, it is normally needed to rewrite the user interfaces of old programs.
Ideally, in the authors opinion, to take the maximum advantage of the GUIs, the ATP
computation core, that is the real wealth of the ATP Community, should be integrated with
more modern user interface modules, for more user friendly data input and output.
The two main moments in which the user interacts with the program are:
1. when he describes the system to be simulated
2. when he analyses graphically the results.
T
-
8/11/2019 12'98may
42/85
Program Development
EEUG News Feb-May 1998
42
To improve phase 1, with respect to the traditional use of (one or more) text file(s), now
ATPDraw for Windowsprogram [1] is available as a graphical user interface, which allows to
describe graphically the system to be simulated.
To see graphically the results of simulations, historically two DOS programs have beenavailable: PCPLOT (pure DOS) and TPPLOT (extended DOS). Both programs are very
useful tools, but do not take advantage of the graphical User interface of the new GUI
operating systems.
Because of this, recently some new initiatives were introduced:
porting of PCPLOT under the Windows environment (still in progress) birth of the ATPGRAPH, mainly thought for Win/NT and OS/2 operating systems.
These initiatives clearly shows a movement of the ATP community towards a more wide used
graphical interfaces for ATP.
It is therefore not very advisable to undertake efforts to build new plotting programs for ATP
from scratch. However, the author of this article realised some months ago that his plotting
program (created for the use with a program completely different from ATP) could be
adapted easily to use with ATP, taking into account the authors experience with the PL4 C-
like file structure acquired in the past when he co-built and maintained the PL42MAT
program [2]. He has therefore decided to invest some of his time in adapting this program to
ATP. The result of this effort has been christened PlotXY.
Since the features and the user interface of this new program are much different from those of
the new PCPLOT for Windows (WPCPLOT) it is felt that there could be some ATP usersthat would consider the use of PlotXY as an alternative to WPCPLOT.
This paper presents the program PlotXY, in particular analysing the reason of the choices
made when building it, and in general supplying information that has not been included in the
program documentation.
3 Basic ideas behind PlotXY
The main specifications the author has considered in building PlotXY are the following ones:
1. both plots versus time and plots of some variables against another
2. possibility to plot several variables simultaneously
3. possibility to plot variables taken from different .PL4 files
4. support for factors, offsets, zoom, with the maximum ease of use
5. program visual aspect/openness.
6. cursor to see numerical values
7. tools to ease the simulation session
8. support for lengthy simulations
Let us discuss the different items separately.
-
8/11/2019 12'98may
43/85
Program Development
EEUG News Feb-May 1998
43
1 While the most important plot type when processing the results of a time domain
simulation program is the plots versus time, it is not rare that the plot of one (or more)
variable against another is required. Therefore this function has been included, although it
has presently some limitations it is not active in case of multi-files (see later), it does not
allow to see the numerical values by means of a cursor.
2 One of the problem was to choice the maximum allowed number of simultaneous curves
per plot. In principle, it would be easy to pose no limits on this number; in practice, it is
observed that the more the curves, the more difficult to differentiate them on the screen or
paper so that they are visually easily distinguished. Since PlotXY uses always continuous
lines for plots, and it distinguishes the plots only by the use of different colours, there is a
practical limit of around 5-10 in the maximum simultaneous curves per plot. The value of
8 has been chosen.
3 Another feature considered very important for the ATP user is the possibility to plot
variables coming from different .PL4 files. PlotXY supports the access of maximum 3such files, simultaneously . This number, (which can be easily raised if there is a request),
comes mainly from two considerations:
since all the files from which you plot simultaneously are completely loaded inmemory, many files can rapidly bring to very large memory occupation;
the legend becomes increasingly complex as long as the number of the involved filesincreases.
4 Factors and Offsets are arranged in an easy-to use table. They are written in the same
colours as the related curves, for maximum clarity. After factors and/or offsets have been
defined or modified, the simple issue of a Carriage Return causes the plot to beimmediately updated to the new values. To zoom in a particular part of the plot, a simple
clickand-drag mouse operation is foreseen. Obviously, also manual definition of scales is
allowed.
5 Traditionally, plotting programs have features allowing to put text on the axes and
completing the plots with titles, curve names, etc. in user-defined positions. However,
today computer programs are more open than in the past. Therefore, the product of a
program can be exported into another, specialised for another functions, for additional
processing. In the case of PlotXY the author preferred to include a function of object-
oriented exporting of plots instead of supplying a text-definition facility. An object-oriented plot can be completely customised by means of a generic drawing program:
colours and fonts can be easily changed, other elements can be added such as titles,
legends, arrows, etc. In theMicrosoft Windows operating system, object oriented drawings
are coded in the language called Windows Meta File, or WMF; in particular in Win32 an
enhanced version of WMF, called EMF, orEnhanced Metafile is available. PlotXY makes
use of the more powerful version of these languages, i.e., EMF, for exporting plots.
One disadvantage of this approach is that very few shareware programs are able to work
satisfactorily with the EMF format, at present. This situation will probably change in the
near future. However, if there is a sufficient user request, the author can enrich PlotXY
with some axis/title editing facility.
-
8/11/2019 12'98may
44/85
Program Development
EEUG News Feb-May 1998
44
6 Every good plotting program should have a cursor to see the exact numerical value of
the curves shown. This feature is not missing in PlotXY. It is supported in two ways:
displaying the exact numerical values read from the binary file(s) or a linear interpolation
between two points adjacent to the considered abscissa.
7 When users make ATP simulations, they often make simulation sessions in which they
repeat a pattern line this:simulate - see plots - change something - simulate again. Often
between two simulations only small changes are made in the input file(s), and one wants to
see their effect on the same set of variables. To support such a cyclical jobs, a Refresh
function has been implemented. When the Refresh button is pressed, the file already in
memory is reloaded (i.e., the file in memory is discarded and a file having the same name
and path is loaded from disk), the output variables that were selected remain selected, and
the already defined factors and offsets are retained. TheRefreshfeature is clever enough to
work smoothly even when a variable selected in a previous cycle is not present anymore in
the new version of the PL4 file.
To see a plot of the currently selected variables, there is a plot button. In addition, an
Update button is present, that causes the current plot to be updated (with the newly
selected set of variables, factors and offsets), while retaining the current zoom window of
the plot.
8 One of the great advantages of modern operating systems is the ability for multitasking.
For the users of a simulation program like ATP, this means that while simulation is in
progress, other work can be done with the same computer. For very long simulations this is
particular useful, and becomes more useful if one has the possibility to browse the
current status of the simulation from time to time. PlotXY provides an important feature inthis direction. In fact the users of the Watcom version of ATP can plot from a PL4 file
even if the actual simulation is still in progress. Moreover, PlotXY can be left open so that
from time to time a simple Refresh can be issued to update the plot of the currently
selected variables.
4 Samples of Program Windows
It was stated earlier, the maximum effort has been made by the author to make the program as
easy and fast to use as possible. A two pages file (Plotxy.doc) can be found in the distribution
kit which describes all the functions of the program in detail. The users are advised to read
this short documentation, too, because that quick manual is not repeated here. On the
contrary, the next parts of this paper gives an idea of the look and feel of the program.
Since it is believed that for programs having a small number of commands the use of buttons
is to be preferred, the PlotXY program has no menus. Instead, two types of buttons are
present:
text buttons, for which the button names are directly shown on their face
graphic buttons, that have a graphic icon on their face, and the button name can be
seen as a text hint showed when the mouse pointer is left on the button face.
-
8/11/2019 12'98may
45/85
Program Development
EEUG News Feb-May 1998
45
The program has two main and some auxiliary windows. The main window contains
information on the currently loaded file(s) and its (their) content, as well as about the
variables selected for plotting and their related factors and offsets (Fig. 1/a). When the user
clicks on the Plotbutton, the Plot window, shown in Fig.1/b, is displayed.
Fig. 1/a - The Main window of PlotXY
Fig. 1/b - The Plot window
In Fig. 1 the program, with default dimension and position of the windows, shows some plots
from data case DC3C.pl4. Although curves are displayed here as gray shades, in the real
world the curves can be easily distinguished because they are drawn in different colours.
If the user has a B/W printer, and wants to print directly from PlotXY, i.e., without copying
and pasting the plot into a drawing program, he has the opportunity to mark the curves with
different symbols, as shown in Fig. 2.
The shots of Fig. 1 and 2 refer to the so-calledBasicor Sin