PFManual Digsilent - 13v2ec
PFManual Digsilent - 13v2ec
PFManual Digsilent - 13v2ec
Manual
DIgSILENT PowerFactory
Version 13.2
DIgSILENT GmbH
Gomaringen, Germany
2007
Publisher:
DIgSILENT GmbH
Heinrich-Hertz-Straße 9
72810 Gomaringen / Germany
Tel.: +49 (0) 7072 - 9168-0
Fax: +49 (0) 7072 - 9168-88
Contents - Manual
Handling of PowerFactory
i
DIgSILENT PowerFactory
ii
DIgSILENT PowerFactory
Protection 15-1
Creating a Protection Device 15-1
Basic Protection Devices 15-10
Path Definitions 15-26
Protection Analysis Results 15-27
Short-Circuit Sweep 15-28
Time-Overcurrent Plot 15-30
The Time-Distance Diagram 15-38
Relay Plot 15-43
iii
DIgSILENT PowerFactory
Optimization Tools
Reliability Analysis
iv
DIgSILENT PowerFactory
v
DIgSILENT PowerFactory
vi
DIgSILENT PowerFactory
Appendix
Glossary A-1
Index D-1
vii
DIgSILENT PowerFactory
viii
Volume I
Handling of PowerFactory
DIgSILENT PowerFactory
Version 13.2
DIgSILENT PowerFactory Program Overview
Chapter 1
Program Overview
1-1
DIgSILENT PowerFactory Program Overview
• Exported projects may be imported into a database tree by pressing the icon on
the Data Manager's toolbar. You will be prompted for the exported filename (*.dz).
• Please make sure that you make backup copies of all the exported data, as well as of
the PowerFactory database on a regular basis.
• However, should you find yourself in the unhappy position of having a corrupted
database and no backup files please contact us for assistance; all may not be lost!
1-2
DIgSILENT PowerFactory Program Overview
set. As requirements dictate further functionality can be added to the license. The user
thus does not have to learn a whole new interface for new functions, but merely uses new
commands within the same environment. In addition, the original network data is used
and only extra data, as may be required by the new calculation function, needs to be add-
ed.
1-3
DIgSILENT PowerFactory Program Overview
" " and ' ' 'These' quotes are used to indicate that the description is one that can
be found within the program- one that is not user definable, for
example, the balloon help description 'Calculate Load Flow' that you
see when you hover your cursor over the Load Flow icon.
"These" are used to indicate data that a user has entered or should
enter. "These" quotes are also used to indicate a process or series of
objects that have no discernible name, but which need to be described.
For example, the "drawing tools panel", which is found on the right
hand side of the drawing canvas.
and [1] [2] [3], etc.
These show a sequence of events that should be performed. Where
they are numbered they will be associated with a graphic in which the
numbers appear.
left-clicking, right-clicking, clicking, double-clicking, etc.
Wherever the instruction clicking or double-clicking appears it should
be taken to mean clicking and double-clicking using the left mouse
button. When the right mouse button is to be used it will be explicitly
stated.
1-4
DIgSILENT PowerFactory The Work Environment in PowerFactory
Chapter 2
The Work Environment in PowerFactory
2-1
DIgSILENT PowerFactory The Work Environment in PowerFactory
As users progress and become more adept with the program, data will be manipulated by
using a data viewer called the Data Manager.
Figure 2.1 shows how PowerFactory looks like when a project is active. It shows the
Graphic window (up) and the Output window (below).
The two means of accessing the data are thus via the graphics page/s and via the Data
Manager.
Data is accessed from the graphics page by double-clicking on an object. An input dia-
logue pops up and the user may then edit the data for that object. In the case of figure
2.2, a line object was double clicked on a single line graphic and then the displayed edit
dialog was opened.
2-2
DIgSILENT PowerFactory The Work Environment in PowerFactory
All of the data that is entered for such objects is specifically structured in folders to allow
the user to navigate through it. To view this data, a "Data Manager" is used. Figure 2.3
shows the Data Manager Window. The data manager is similar in appearance and working
to a Windows Explorer.
As mentioned, data pertaining to a study is organized into several folders. Before exam-
ining this structure we should understand the philosophy behind this arrangement.
2-3
DIgSILENT PowerFactory The Work Environment in PowerFactory
Figure 2.4 shows a snapshot from the data manager.The folders listed contain the follow-
ing type of data:
User Folder In this case named Raj1. This folder is a system folder (the user
account) that is created when the user starts PowerFactory.
Project In this case named Simple Power System. This folder is the frame for
all project subfolders.
2-4
DIgSILENT PowerFactory The Work Environment in PowerFactory
2-5
DIgSILENT PowerFactory The Work Environment in PowerFactory
The data manager sub-window (this window is created by pressing the icon, which
is the first icon on the left of the main toolbar) is always floating and more than one can
be active at the same time. The database manager itself has several appearances: it may
only show the database tree for selecting a database folder, or it may be the full version
with the database tree, the data browser, and all editing capabilities.
One of the major tasks for the data manager is to provide access to the power system
components. The power system components shown in the data manager can be 'gang-
edited' (or 'group-edited') within the data manager itself, where the data is presented in
a tabular format, for all the selected objects. Alternatively each object may also be indi-
vidually edited by double clicking on an object (or right click -> "Edit").
The output window, at the bottom of the screen, is always there; it cannot be closed al-
though it can be minimized.
The output window can be "docked'', that is: fixed to a location on the bottom of the main
window. The docked state is the default, as shown in the figure 2.5.
When clicking the right mouse button, when the cursor is in the output window area, the
context sensitive menu of the output window appears. The output window can then be
undocked by deselecting the "Docking View" (by clicking the mouse onto "Docking View"
to 'untick' it. The undocked output window is still confined to the main window, but now
2-6
DIgSILENT PowerFactory The Work Environment in PowerFactory
as a free floating window. This sometimes occurs 'accidentally' when the user left clicks
the tool bar for the output window and drags the mouse (keeping the mouse button
down) to somewhere outside of the output window boundaries. To rectify this simply left
click in the title bar of the undocked window and drag it down to the bottom of the screen
where it will dock once more (if you have right clicked 'unticked' "Docking View" to right
click and select "Docking View" once more.
The undocked state is not a normal situation for the output window. Because the output
messages that appear in this window are important at any stage while using the program,
the docked state is the best place because it will be visible then and easy to locate.
The edge of the output window shows a splitter bar [a] which is used to change the size
of the output window. The 'drag' cursor, as shown at [a], appears automatically when the
cursor is placed on the splitter bar. The left mouse button can be pressed when the 'drag'
cursor is visible. This will turn the splitter bar to grey and the output window can now be
resized by holding down the mouse button and moving the mouse up or down.
The icon "Maximize Output Window'' ( ) on the main toolbar will enlarge the output
window to almost full-screen. Left click the button again to switch back to the small output
window.
The button minimizes the window to a small object, somewhere on the screen
(usually in the lower left corner- this is the default position) in the case of a sub-
window, or to the task bar for your computer- at the bottom of the screen.
The button reduces the window to a smaller size on the screen; initially there is a
default size for this window but the user may re-size it as desired.
The button will close the sub-window or end the program if this button is clicked
on the main window.
Sub-windows can be re-sized as follows: place the cursor over the lower right corner of
the window and left click and hold the button down- now drag the window to the size you
require. You will find that each corner can be sized like this, as well as each edge.
2-7
DIgSILENT PowerFactory The Work Environment in PowerFactory
Press Alt-H to open the help menu. Use your keyboard to select the Getting Started
Tutorial. Press return to open the Tutorial. The on-line Getting Started Tutorial is
exactly the same as the printed version.
Close the Getting Started Tutorial help (Use the on the main bar). You will return
to the main PowerFactory program window.
Left click the Help menu. Left click the option Users Manual. This opens the on-line
User's Manual.
All command icons are equipped with balloon help text which pop up when the cursor is
held still at the icon for a moment, and no key is pressed.
Find the icon for User Settings by using the balloon help. Do not use the mouse keys:
just point at the icons, hold still, and a balloon text will pop up. Scan all icons until you
find the right one.
Using a command icon couldn't be easier: just click on it with the left mouse icon. Those
icons that perform a task will automatically jump back when that task is finished. Some
command icons however will switch between two modes, for instance the one which will
reserve more place for the output window on the workspace ( ). This icon will stay
down to show the activated mode. Click the command icon again to switch back to the
normal view.
2-8
DIgSILENT PowerFactory The Work Environment in PowerFactory
When PowerFactory has just been started, the toolbar shows only the general com-
mand icons. The 'toolbar select' icon ( ) can be clicked to select additional command
icons.
Fig. 2.9: Data Manager view on graphical elements with balloon help available
The Users Manual and Getting Started Tutorial are quite similar in print and in the on-line
version. Command buttons/icons are sometimes referenced by their name, instead of by
their image. For large buttons, this is normally the case. The name of a button is either
the name on the button itself (OK, Cancel), or the name that appears in the balloon
help( = User Settings).
2-9
DIgSILENT PowerFactory The Work Environment in PowerFactory
Edit Trigger
Displays a list of all triggers that are in current use by the active study
case. These triggers can be edited in order to change the values for
which one or more characteristics are defined. These values will be
modified with reference to the new trigger value. All triggers for all
2 - 10
DIgSILENT PowerFactory The Work Environment in PowerFactory
Calculate Load-Flow
Activates the load-flow command dialogue. For more information about
the specific settings, please refer to chapter 13 (Load-Flow
Calculations).
Calculate Short-Circuit
Activates the short-circuit calculation command dialogue. For more
information, please refer to chapter 14 (Short-Circuit Calculations).
Edit Short-Circuits
Edits Short-Circuit events. Events are used when a calculation requires
more than one action or considers more than one object for the
calculation. Multiple fault analysis is an example of this. If, for instance,
the user multi selects two busbars (using the cursor) and then clicks
the right mouse button Calculate −> Multiple Faults a Short-circuit
event list will be created with these two busbars in it.
2 - 11
DIgSILENT PowerFactory The Work Environment in PowerFactory
have been changed from one calculation to the next. For more
information please refer to 12.4 (Comparisons Between Calculations).
Update database
Utilizes the current calculations results (i.e. the calculation 'output'
data) to change input parameters (i.e. that data that the user has
entered). An example is the transformer tap positions, where these
have been calculated by the load-flow command option "Automatic Tap
Adjust of Tap Changers." For more information please refer to section
12.4.2 (Update Database).
Break
Stops a transient simulation or DPL script that is running.
Reset Calculation
Resets any calculation performed previously. This icon is only enabled
after a calculation has been carried out.
User Settings
User options for many global features of PowerFactory may be set
from the dialogue accessed by this icon. For more information please
refer to chapter 4 (User Settings).
Select ToolBar
Drops down when pressed to present sets of icons (to the right of it)
for various calculation commands: e.g. Stability, Reliability, Harmonics,
Optimal Capacitor Placement and Data Acquisition.
Zoom In Changes the mouse mode to zoom; draw a zoom area by holding the
left mouse button down and dragging a zoom area on the graphic.
2 - 12
DIgSILENT PowerFactory The Work Environment in PowerFactory
Zoom BackSteps the enlargement setting backwards to the last zoom setting. The
zoom can also be activated by holding the ALT key down and pressing
+ or - to zoom in or out, respectively.
Note The user may pan in the graphic, when it is zoomed. To activate
the pan mode place the cursor in a clear space in the graphic (i.e.
where there are no objects), right-click −> "Change Viewpoint."
Now hold the left mouse button down and drag the cursor to an
edge of the graphic - the graphic will pan in that direction. To exit
the pan mode right-click the mouse (this is a valid escape com-
mand for most mouse modes in PowerFactory)
Zoom All
Displays the graphic as a virtual full page (zoom=100%).
Zoom-level
Displays the current zoom setting. The desired zoom setting may be
typed in directly if required; type the desired zoom level, e.g. 175% as
'175' and press ENTER
Print
Prints the currently active graphics window.
Note If the graphic is zoomed less than 200% it will be printed full size,
as determined by the drawing format
Rebuild
Under some circumstances the drawing may not be updated correctly.
Press the rebuild icon to update the currently page from the database.
2 - 13
DIgSILENT PowerFactory The Work Environment in PowerFactory
Freeze Mode
Freezes the single line diagram or the block diagram. In the freeze
mode the diagrams cannot be graphically altered. The underlying data
objects may however still be edited. The freeze mode may be selected
when the single line or block diagram has been completed, thereby
preventing accidental changes.
Graphic Options
Activates the graphic options dialogue (includes options such as "Snap
to Grid" or the cubicle representation). Each graphic window has its
own settings which can be changed using this icon. For more
information, please refer to section 8.3 (Graphic Commands, Options
and Settings).
Show layer...
Activates the layers dialogue. The single line graphic and the Block
diagram graphic windows use transparent layers of drawing sheets to
show the graphical symbols. Each of these layers may be set to be
visible or not. The names of devices, for example, are on a layer for
called "Object Names" and may be hidden by setting the layer to
'invisible'. For more information, please refer to section 8.3.4 (Graphic
Layers).
Undo
Undoes graphical changes and some data changes. Note that this
command is not a 'universal' undo and that deleted elements are sent
to the "Recycle Bin," from where they may be restored. Parameters
that have been changed are not 'undone.'
Delete Element
This icon deletes all selected objects in the drawing. The objects in the
database which correspond with the graphical objects will also be
deleted, unless the elements are represented in more than one graphic.
In this case the use will be asked whether the data elements and/ or
other graphics should also be deleted.
2 - 14
DIgSILENT PowerFactory The Work Environment in PowerFactory
Cut
Cuts all selected objects from the current graphic and places them into
the clipboard.
Copy
Copies all marked objects from the current graphic and places them
into the clipboard.
Paste
Pastes objects from the clipboard to the current/ active graphic.
Objects are inserted to the graphic at the cursor position.
Reconnect Element
Pressing this button disconnects the selected elements, and presents
them for reconnection, one by one. The element is entirely
disconnected and may be connected elsewhere. Once the element has
been disconnected the cursor is seen to be connected to the element
via a 'rubber band.' This action should not be confused with the
"Reconnect Graphically" command, which retains the connections but
allows the user to re-draw the element in a more convenient manner.
Color Representation
Opens the color representation dialogue. This dialogue is used to select
coloring modes which assist in assessing results, for example, coloring
by over or under voltage and branch loading. For more informationless
refer to section 8.3.5 (Color Representation).
2 - 15
DIgSILENT PowerFactory The Work Environment in PowerFactory
2 - 16
DIgSILENT PowerFactory Logon, User Accounts and Program Settings
Chapter 3
Logon, User Accounts and Program Settings
PowerFactory is supplied with a user account managing system, which provides the
user with the possibility to create and maintain a secure folder in which only he/ she may
work. In the case of only a single user in a stand alone application this security is of course
provided by the PC log-on security.
However, in a multi-user environment, where users are accessing a central database, sep-
arate accounts for all users may be created. Sophisticated user account and project man-
agement tools allow the sharing of data whilst retaining data integrity of the original
project file.
3-1
DIgSILENT PowerFactory Logon, User Accounts and Program Settings
The ''full'' version requires a licence key and this may either be an individual, discrete key
(or several individual keys, or a special network key that administers a number of licences
from a central location. This network key will be placed on a networked machine that runs
continuously.
A detailed description of the types of possible installations of PowerFactory on single
PCs and in network environments can be found in the Installation Manual on the
PowerFactory -CD.
Note To run the prepared examples please log on as Demo user. This
user requires no password and you have the possibility to use the
demo projects with the full functionality of PowerFactory.
3-2
DIgSILENT PowerFactory Logon, User Accounts and Program Settings
3.3.1 Log on
A special account for administration of the user accounts is provided, with a special ac-
count for demonstration purposes; these accounts are named 'Administrator' and 'Demo'.
Since there is a user accounting system one needs to log on when starting PowerFac-
tory. The log-on dialogue presents various options that may be configured for your par-
ticular system and installation.
To log on a user name and password is required. If starting PowerFactory for the first
time you can create a user account by typing in your name and a password of your own
choice (this only holds true for a stand alone installation; a multi user installation will have
accounts that have been defined by the user who has access to the Administrator ac-
count).
When you see the 'Do you really want to create a new user account' message press OK
to create your own account (should you forget your password you can log on as the Ad-
ministrator user - the default password is 'Administrator'; and change the password using
a data manager).
3-3
DIgSILENT PowerFactory Logon, User Accounts and Program Settings
in the background, which allows for simple backup and management of the overall data-
base.
The basic PowerFactory database structure, as depicted in the figure 3.2 consists of the
following folders:
The main Library folder
contains all standard PowerFactory types and models. The main
library folder is read only for normal users.
The System folder
contains all objects that are used by internally PowerFactory. The
system folder is read only for all normal users. Changes are only
permitted when logged on as the Administrator, and should be
conducted under the guidance of DIgSILENT customer support.
The Administrator folder
contains all objects needed for creating and managing user groups and
user accounts and for changing global settings.
The Demo folder
contains all demo projects that can be executed by the demo-user. The
demo projects are shared projects and can thus be read and used by
normal users.
User account folders
contain the project folders and all other folders in which the normal
user defines his power systems and all accompanying objects and
settings.
3-4
DIgSILENT PowerFactory Logon, User Accounts and Program Settings
Examples. This menu option has several sub-menus from which a demonstration may be
selected. Selecting a demonstration will start the appropriate command script.-->
Note that this menu option File −> Examples is only available when one is logged onto the
''Demo'' account.
These projects may also be activated and observed in the manner normally employed by
PowerFactory. To learn how this is achieved it is best to work through the on-line tuto-
rial that is provided. See under Help −> Getting Started.
Note The demo user has read and write permissions for all demonstra-
tion projects. However, calculations will only be permitted for the
demonstration networks as long as they have not been changed in
a topological sense. This means that adding or deleting lines,
transformers, loads, machines, etc., will lead to error messages
Licensed users may log in as the ''Demo'' user, change the demonstration projects in any
way, and still be able to start a calculation (as long as their hardlock is available to
PowerFactory). Note that any changes that are made to the demonstration projects will
be kept (that is, the projects are not 'reset' on logout from the Demo account). This may
result in errors when the Demo account is used without a hardlock. Licensed users may
simply copy and paste projects that they are interested in, into their own account for mod-
ification.
As long as a user does not make any topological changes, these demonstration projects
may be used to experiment with PowerFactory. Such experimentation may include:
• Changing and executing commands such as load-flow, short-circuit or transient
analysis.
• Changing power system elements such as selecting other line types, changing
generator settings, etc.
• Creating new calculation cases
• Changing the appearance of the single line graphics except for adding or deleting
power system elements.
• Creating or changing virtual instruments panels such as defining graphs or changing
bar diagrams.
3-5
DIgSILENT PowerFactory Logon, User Accounts and Program Settings
3-6
DIgSILENT PowerFactory Logon, User Accounts and Program Settings
3-7
DIgSILENT PowerFactory Logon, User Accounts and Program Settings
3-8
DIgSILENT PowerFactory Logon, User Accounts and Program Settings
3-9
DIgSILENT PowerFactory Logon, User Accounts and Program Settings
''Raj2'' now right-clicks the grid folder in the Simple Power System project in Raj1's ac-
count and selects Add to Study Case. The grid is added to Raj2's project as a remote sys-
tem stage as shown in the figure 3.6. Raj2 may now work on the base data and make
additions and changes as required, without affecting the data in the base project.
Note Whilst system stages and remote system stages are very powerful
tools that assist the user in the creation of variants they do not ab-
solve the user from the need to think carefully as to how to create
and use the variants. Should topographical changes be made to
the same elements in both the system stage and then the original
project PowerFactory is not able to discern how these should be
managed, thus the use of system stages should be understood and
carefully managed. Please see chapter 7 (Project Management)
here for more information on managing projects
3 - 10
DIgSILENT PowerFactory User Settings
Chapter 4
User Settings
The user settings dialogue (figure 4.1) offers options for many global features of Power-
Factory. This dialogue may be opened either by clicking the User Settings icon ( )
on the main tool bar, or by selecting the Options −> User Settings... menu item from the
main menu.
4-1
DIgSILENT PowerFactory User Settings
4-2
DIgSILENT PowerFactory User Settings
- 'Show Grid only if stepsize will be least': grid points smaller than the selected size
will not be shown.
- 'Show Text only if height will be least': text smaller than the selected size will not
be shown.
- 'No. of columns in graphics floater': specifies the width of the graphics toolbar
when this is a floating window.
- 'No. of columns in graphics docker': specifies the width of the graphics toolbar
when it is docked on the right side of the drawing space.
- 'Line factor when printing': The width of all lines in the graphics will be multiplied
by the specified percentage when printing.
Coordinate Output at statusbar in mm
Specifies that the status bar will display the cursor position in
millimeters.
Update Hidden pages always
Results in all graphical pages on a graphics board being updated, even
when they are not visible. Note that this can slow the processing speed
considerably. The advantage is that no updating is required when a
different graphics page is selected.
Exclude Feeder Colors
May be used to exclude colors, by number code, which are to be used
for feeder definitions. This is used to prevent the use of colors which
are already used for other purposes. Ranges of color numbers are
entered as '2-9'. Multiple ranges of colors must separated by commas,
as in '2-9;16-23'.
Update Graphic while Simulation is running
Use own background color for single line graphics
If the option is enabled, the user can define the background color of
the single line graphics by using the pop up menu and then pressing
OK.
4-3
DIgSILENT PowerFactory User Settings
For information about the Graphic Window refer to chapter 8 (The Graphic Windows).
4-4
DIgSILENT PowerFactory User Settings
4.6 Directories
Compiled DSL Models
Pre-compiled DSL models may be available for use as external models.
The DSL directory should be directed to the correct folder/ directory in
order for PowerFactory to find these models.
PFM-DSM
4.7 Editor
The editor which is used to enter large pieces of text (such as DPL scripts, objects de-
scriptions, etc.) can be configured on this page.
Enable Virtual Space
Allows the cursor to move into empty areas.
Enable Auto Indent
Automatically indents the next line.
Enable Backspace at Start of Line
Will not stop the backspace at the left-most position, but will continue
at the end of the previous line.
View blanks and tabs
Shows these spaces.
Show Selection Margin
Provides a column on the left side where bookmarks and other
markings are shown.
Show line Numbers
Shows line numbers.
Tab Size
Defines the width of a single tab.
Tabs
Toggles between the use of standard tabs, or to insert spaces when the
tab-key is used.
Language coloring
Defines the syntax-highlighting used when the type of text is not
known.
ShortCuts
Opens the short-cut definition dialogue.
4-5
DIgSILENT PowerFactory User Settings
4-6
DIgSILENT PowerFactory Defining a Power System Model in PowerFactory
Chapter 5
Defining a Power System Model in
PowerFactory
The objective of this chapter is to present the basic procedure that is followed in Power-
Factory to define and simulate a power system model. A simple distribution network is
used for this purpose. During the definition of the sample network, references to more
advanced topics related to the definition and analysis of power systems are provided.
The information presented here is intended to serve as a quick reference to new users.
Detailed information about the same procedures is given in the PowerFactory tutorial
and in the coming chapters of this manual. Experienced users are encouraged to skip this
part of the document.
5-1
DIgSILENT PowerFactory Defining a Power System Model in PowerFactory
Folder' (by default your user account). A study case folder and a library folder are auto-
matically created under the new project (information about the study case and the library
folder is given in 6.6).
Because a project should contain at least one grid folder (all the network data is stored
in the so called grid folders), immediately after creating the new project, a dialogue to
create a grid pops up (figure 5.3).
Write the name and the nominal frequency of the new grid and press Ok.
Once you have created the grid folder, an empty single line graphic, having the same
name of your new grid, activates.
5-2
DIgSILENT PowerFactory Defining a Power System Model in PowerFactory
5-3
DIgSILENT PowerFactory Defining a Power System Model in PowerFactory
5-4
DIgSILENT PowerFactory Defining a Power System Model in PowerFactory
Note In a project you will normally work with more than one grid and
will eventually use results plots, station graphics and block dia-
grams. All the graphics that you are using (active graphics) are
stored in a folder called graphic board inside the active study case
(see 8.1.1).
5-5
DIgSILENT PowerFactory Defining a Power System Model in PowerFactory
5-6
DIgSILENT PowerFactory Defining a Power System Model in PowerFactory
Note There is more than one way to place and connect elements in a
single line graphic. For illustrative purposes, the methods shown
here are the simplest ones. Further information about drawing
power system elements is given in 8.4.
As it is seen in figure 5.7, the edit dialogue is composed of different tabs. Each tab has
the name of a PowerFactory function, and contains the parameters that are relevant to
the corresponding calculation.
Certain parameters are relevant to more than one calculation, thus they can be found and
edited in different tabs. For example if you update the tap position of a transformer in the
'Load Flow' tab, the new value will also be seen in the 'RMS-Simulation' tab, The 'EMT-
Simulation' tab, etc.
As it was explained in 2.2, electrical data is divided in element and type data. The edit
dialogue of figure 5.7 correspond to the element data and has a reference to a type data
object in the 'Type' field. To properly define a network component you have to edit both
5-7
DIgSILENT PowerFactory Defining a Power System Model in PowerFactory
The type of the element can be selected from a 'Library' folder by pressing (see
6.6.8). The current type can be edited by pressing (notice that in figure no type ob-
ject has been yet selected).
Note In the edit dialogues you can identify references to other objects
by the 'Select' ( ) and 'Edit' ( ) buttons. When pressing the
'Select' button you are presented a data browser, where you
search for the desired object. When pressing the Edit button the
edit dialogue of the selected type object pops up. Almost every
power system element uses references to type objects. When se-
lecting a type object, a menu where you can select between a glo-
bal or a project type pops up. Project types are those defined in
the project libraries by the user. Global types are those already de-
fined in the libraries that are provided with PowerFactory.
Press to create a new object. The dialogue from figure 5.8 will pop up.
Select the desired type from the list presented in the dialogue from figure 5.8. For
example, if a 2-Winding transformer type is to be created; the type dialogue of figure
5.9 will pop up after pressing Ok.
5-8
DIgSILENT PowerFactory Defining a Power System Model in PowerFactory
Edit the type parameters according to your requirements and then press Ok.
Once a type object has been created, it can be used by any element that requires the
same type data.
You can copy type objects defined in other projects or in the PowerFactory libraries,
then you can paste them in your active library and edit them (information about copy and
paste in the Data manager is given in 6.2.4).
It is also possible to use a direct reference to the types defined in other projects and in
the PowerFactory libraries ( −> Select Global Type and then search for the desired
object). In these cases it is not possible to edit the objects.
Further information about data structure (type and element data) and data base is given
in 2.2 and 6.1. For the definitions of Type, Element and Objects, consult the PowerFac-
tory terminology in Appendix A.
Note Information about the parameters of the elements and the type
objects is given in the online available Technical References.
5-9
DIgSILENT PowerFactory Defining a Power System Model in PowerFactory
Because the graphic objects use references to their corresponding data objects, there can
be a not 1:1 relation between them, i.e. two graphic objects can have a reference to the
same data object. This fact allows the use of the same data object in different single line
graphics and facilitates for example the interconnection between networks (detailed in-
formation about the relation between graphical and data objects is given in 8.1, for infor-
mation about interconnecting networks see 8.4.5)
It is of course possible to create and edit network elements in the data base (by creating
the data objects) and then generate single line graphics using them (see 8.1.5).
Press the Calculate Load Flow icon ( ) in the main toolbar, to open the calculation
command dialogue (figure 5.10).
Set the calculation options according to your requirements (see chapter 13 for
information about the Load Flow command settings).
Once you have defined the calculation settings, you can either perform the calculation by
pressing Execute or only save the settings by pressing Close. In any case the new com-
mand object will be saved in the active study case folder. Any time you want to perform
this same calculation, you can go to the study case folder, open the command dialogue
and Execute it.
During the execution of the calculation, information messages including possible errors
and warnings are displayed in the output window. Once a calculation had been success-
fully performed, predefined results tables are displayed in the result boxes of the single
line graphic (figure 5.11), you can of course set the variables to be displayed in these re-
sult boxes (see 8.5).
5 - 10
DIgSILENT PowerFactory Defining a Power System Model in PowerFactory
As you would expect, result boxes are only one simple way to view simulation results in
PowerFactory; the program offers an ample set of tools to visualize and export the cal-
culated results. For informations on results visualization see chapter 27.
Although a load flow is a very simple example, the procedure followed to perform any
other calculation is in essence the same. You first define the calculation commands (in-
cluding the initial conditions calculation commands when required), execute them and
then define and visualize the results.
Most of this Manual deals with the definition and execution of the available calculations
in PowerFactory. The Volume III presents all the calculations related to the steady state
analysis; Volume IV presents the optimization tools, Volume V the reliability assessment
tools and Volume VI the time domain simulations.
5 - 11
DIgSILENT PowerFactory Defining a Power System Model in PowerFactory
Within the active project you need an active study case to administrate the calculation
commands, the time settings and the graphic boards. You can create as many study cases
as you require.
A new study case can be created by rigth clicking the project in the data base tree
and selecting New−> Study Case.
Similar to projects, only one study case can be activated at a time. The calculation com-
mands defined in this active study case are performed only on the active grids (the grids
which are included in the active study case). As expected you can only see single line
graphics from the active grids.
Within a project you can create all the grids that you require. You just have to:
Rigth click the active project and select New −> Grid.
After the new grid has been created, the dialogue from figure 5.12 is presented. Depend-
ing on the selection, the new grid will be included in the active study case, in an existing
but not active study case or in a new study case.
5 - 12
DIgSILENT PowerFactory Defining a Power System Model in PowerFactory
You can add or remove existing grids from the active study case by means of the context
sensitive menu.
In order to analyze variations in a network without recurring to data redundancy, Pow-
erFactory uses the so called 'System Stages'. For the data base they are special subfold-
ers of the original grid, which store only the changes performed on it. For the user the
will be networks based on an original grid, where topological or element parameter
changes have been applied (Complete information about the functionality of System Stag-
es is given in 7.2).
5 - 13
DIgSILENT PowerFactory Defining a Power System Model in PowerFactory
5 - 14
DIgSILENT PowerFactory The Database and the Data Manager
Chapter 6
The Database and the Data Manager
To manage/ browse the data in PowerFactory, a Data Manager is provided. The objec-
tive of this chapter is to provide detailed information on how the data is structured inside
the program and how to use the Data Manager. Before starting, users should ensure that
they are acquainted with the section 2.2 (Data Arrangement/Structure).
6-1
DIgSILENT PowerFactory The Database and the Data Manager
2 winding transformers). The "Library" folder is used to group type class objects. Once
again this does in fact make the management of the data much simpler.
All of this information is somewhat academic to the user at first, as PowerFactory will
assign objects automatically. However it is useful to have a background to this arrange-
ment before using the Data Manager and its tools.
Later in the manual advanced data management philosophy and techniques are described
that allow variants or alternatives to be created, studied and managed.
The PowerFactory database philosophy can thus be summarized into one 'golden' rule:
'Everything is an object and all objects are stored in the database tree'
The consistent and flexible structure of the database, makes it possible to store every-
thing, without losing control. The big advantage is that dialogue settings relating to cer-
tain projects can be stored together with those projects, and consequently can be used
over and over without having to re-enter the settings each time.
A good example of project specific dialogue settings are the calculation dialogues which
are used to set, for instance, the short-circuit options. By storing the dialogue mask inside
the current project, the same short-circuit calculations, using exactly the same settings,
can be repeated by just recalling the saved dialogue. This way of working also enables
the user to store more than one copy of short-circuit settings, for instance, for a certain
set of fault-positions, and running the same set of calculations by recalling the calculation
dialogues one by one. Comparing this way of working to having to enter a dozen fault
positions sequentially, clearly shows the advantages of being able to save and recall com-
mands or other settings.
This means of arranging the data is called a ''hierarchical, object oriented database'' and
is created according to the German DVG-database format.
6-2
DIgSILENT PowerFactory The Database and the Data Manager
• The input window and history list are opened and closed by the command icon
[6].
• On the right side is the database browser that shows the contents of the currently
selected folder [7].
• Below the database browser and the input window is the message bar, which shows
the current status and settings of the database manager (for further information see
6.2.5).
There are some special features of the database browser which can be accessed at any
time when the content of a folder is shown:
• Balloon text: this is not only available for the buttons in the tool bar and the active
parts of the message bar or the browser window, but also for the data fields [a].
• Active Title buttons of each column; click on any title button to sort the items in the
column; first click- items are sorted in ascending order; second click - items are sorted
in descending order [b].
• Object buttons showing the object standard icon in the first column of the database
browser: each object is represented by a button (here a line object is shown). One
click selects the object and a double-click presents the edit dialogue for the object [c].
PowerFactory makes extensive use of the right mouse button. Each object or folder
may be 'right-clicked' to pop up a context sensitive menu. For the same object the menu
6-3
DIgSILENT PowerFactory The Database and the Data Manager
presented will differ depending on whether the object is selected in the left or right hand
side of the data manager (this is known as a 'context sensitive' menu). Generally, the left
hand side of the data manager will show object folders only. That is, objects that contain
other objects inside them. The right hand side of the data manager shows object folders
as well as individual objects.
Using the right mouse button to access menus is usually the most effective means of ac-
cessing features or commands. Figure 6.2 shows an Illustration of a context-sensitive
right mouse button menu.
The symbolic tree representation of the complete database shown in the database win-
dow may not show all parts of the database. The user settings offer options for displaying
hidden folders, or for displaying parts that represent complete stations. Set these options
as required (4.3 (Data Manager Settings)).
Note It is useful to keep in mind that object folders, such as the grid
( ) folder are merely common folders ( ), that have been des-
ignated to contain particular classes of objects.
6-4
DIgSILENT PowerFactory The Database and the Data Manager
• Use the keyboard: the arrow keys are used to walk up and down the tree and to open
or close folders (left and right arrows). The Page Up and Page Down keys jump up
and down the tree in big steps and the "-" and "+" keys may also be used to open or
close folders.
• Use the toolbar in combination with the browser window. Double-click objects (see "c"
in the figure 6.1) in the browser to open the corresponding object. This could result in
opening a folder, in the case of a common or case folder, or editing the object
dialogue for an object. Once again, the action resulting from your input depends on
where the input has occurred (left or right side of the data manager).
• The and buttons on the data manager tool bar can be used to move up and
down the database tree.
To access the whole range of objects that may be created, the icon must be pressed
(new object icon). This is found the data manager toolbar and presents the dialogue
shown in the figure 6.3.
To simplify the selection of the new objects, a filter is used to sort the object list. This
filter determines what sort of list will appear in the drop-down list of the 'Element' field.
If "Branch Net Elements'' is first selected, the selection of, for instance, a 2-winding trans-
former is accomplished by then scrolling down the element list.
The Element field is a normal edit field. It is therefore possible to type the identity name
of the new element, like "ElmTr3'' for a three-winding transformer, or "TypLne" for a line
type directly into the field.
The possible list of new objects is therefore context sensitive and depends on the type or
class of the originally selected folder.
6-5
DIgSILENT PowerFactory The Database and the Data Manager
After the selection for a new object has been confirmed, the "Element Selection" dialogue
will close, the new object will be inserted into the database and the edit dialogue for the
new object will pop up. If this dialogue is closed by pressing the Cancel button, the whole
action of inserting the new object will be cancelled: the newly created object will be de-
leted from the active folder. The dialogue for the new object may now be edited and the
OK button pressed to save the object to the database.
6-6
DIgSILENT PowerFactory The Database and the Data Manager
data (i.e. line types, transformer types, etc.). When selecting New −> Folder from the
context sensitive menu or the Element Selection Dialogue, a new folder dialogue is
open. There the user can select if the new folder is either a Common folder or a
Library folder.
• A Grid ( ) folder should contain a logical part of the grid. This could be the power
system of a plant or a village, a part of a high voltage transport system, etc.
• A Station ( ) folder contains the busbars, cubicles and switches that belong to the
station.
• A System Stage ( ) folder holds changes from a certain base case. All these
changes are carried out when the system stage is activated and reverted again when
it is deactivated.
• A Study Case ( )) folder holds connections to the grids, system stages, calculation
and tool settings for a particular study combination.
Each folder may have an owner name entered, for documentation or organizational pur-
poses. In this way it should be clear who has created the data. Descriptions may also be
added. An existing folder may be edited by using the "Edit" icon ( ) on the toolbar or
by using the right mouse button.
Each folder may be set to be read-only, or to be a PowerFactory system folder. The
folder may be a "Common" or "Library" folder. These attributes can be changed in the
edit-folder dialogue. These settings have the following meaning:
• Common folders are used for storing non-type objects: electric elements, command
objects, settings, projects, etc.
• Type folders are used as 'libraries' for type objects.
• System folders, which are read only folders
The use of read-only folders is clear: they protect the data. In addition, folders containing
data that is not normally accessed may be hidden. Selecting the kind of folders that the
user/administrator wants to be hidden is done in the user settings dialogue see chapter
4 (User Settings).
6-7
DIgSILENT PowerFactory The Database and the Data Manager
• Showing the path to the recycle bin and the name of the ''recycle object'' in stead of
the original location and name.
• Coloring: a reference to a deleted object will be colored red, i.e. a reference to a type.
Type references are found in the edit dialogues of all elements which use a type like
the line or the transformer object.
An object that has been deleted by mistake can be restored to the original location by
selecting the restore menu option on the recycle object's context sensitive menu. All ref-
erences to the object will also be restored.
6-8
DIgSILENT PowerFactory The Database and the Data Manager
selected and keeping it down while moving the cursor to the target/destination
folder, either in the database tree or in the database browser window.
Note When dragging and dropping a COPY of the object will be made
(instead of moving it) if the Ctrl key is held down when releasing
the mouse button at the destination folder. To enable the 'Drag &
Drop' option double click the 'Drag & Drop' message at the bottom
of the Data Manager window.
6-9
DIgSILENT PowerFactory The Database and the Data Manager
• Relevant objects for calculations are tagged with a sign (this will only be shown
following a calculation). Editing one of these objects will invalidate the calculation
results.
6 - 10
DIgSILENT PowerFactory The Database and the Data Manager
( ).
Include, in the 'Flexible Data' page tab, the terminal voltage and nominal voltage (see
6.5).
In the table ('Flexible Data' page tab), click on the title 'u, Magnitude p.u' to sort all
terminals from highest to lowest calculated voltage.
Then click on the title 'Nom.L-L Volt kV' to sort by nominal voltage level.
Now you will have all terminals first sorted by voltage level and then by rated terminal
voltage.
Advanced filtering capability is provided with the 'Find…' function ( ). A filter is normal-
ly defined to find a group of objects, rather than individual objects (although the latter is
also possible). Advanced search criteria can be defined, e.g. transmission lines with a
length in the range 1km to 2.2km, or synchronous machines with a rating greater than
500MW etc.
The function is available in both the data manager and a data browser. Clicking on 'Find…'
in the data manager allows the user to apply a predefined filter or to define a new filter,
called 'General filter'. If a new filter is defined, the database folder that will be searched
can be defined. Clicking on 'Find…' in a data browser allows the user to define a General
Filter for objects within the browser.
General Filters defined by the user are objects stored in the Changed Settings\ Filters fold-
6 - 11
DIgSILENT PowerFactory The Database and the Data Manager
er.
The options in the General Filter dialogue window are now explained with reference to
Figure 6.4:
Name:
Name of filter.
Object filter:
This field defines either the complete or a part of the search criteria,
and is optional. Examples are as follows:
- *.ElmSym: Include element objects of the class synchronous machines.
- *.TypSym: Include type objects of the class synchronous machines.
- Lahney.*: Include all objects with the name Lahney.
- Lahney.Elm*: Include all element objects with the name Lahney.
- D*.ElmLod: Include all load element objects whose names start with D.
- A drop down list providing various object classes can be accessed with ( ).
Look in:
This field is available if a filter id defined within the data manager. It
allows the user to specify the folder in the database that will be
searched.
Check boxes:
- Include Subfolders will search the root folder specified as well as the subfolders in
the root folder.
- Relevant Objects for Calculation will include only those objects considered by the
active study case (if no study case is active the search is meaningless and no
search results will be returned).
- Area Interconnecting Branches will search for branch elements that interconnect
grids.
The OK button will close the search dialogue, but save the filter object to the Changed
Settings\Filters folder. This makes it available for further use. The CANCEL button will
close the dialogue without saving the changes. This button is useful if a search criterion
6 - 12
DIgSILENT PowerFactory The Database and the Data Manager
(filter) will only be used once.The APPLY button starts the actual search. It will scan the
relevant folders and will build a list of all objects that match the search criteria.
Once the search is complete a list of results is returned in the form of a new data browser
window. From this browser, the returned objects can be marked, changed, deleted, cop-
ied, moved, etc...
Advanced search options allow more sophisticated expressions as search criteria. These
are specified in the "Advanced" tab of the General Filter dialogue (Figure 6.5). The filter
criterion is defined in terms of a logical expression, making use of parameter names. Ob-
jects will be included in the data browser if, for their parameters, the logical expression
is determined to be true. An example of a logical expression is 'dline>0.7'. The variable
dline refers to the length of a transmission line, and the effect of such a filter criterion is
to limit the data in the browser to transmission lines having a length exceeding 0.7 km.
The logical expressions can be expanded to include other relations (e.g. >=), standard
functions (e.g. sin()), and logical operators (e.g. .and.).
I
Fig. 6.5: Filter dialogue - Advanced
"Search Literally" is used to search for user defined strings 'inside' parameter fields. For
example, perhaps the comment 'damaged but serviceable' has been entered for some el-
ements in the network. This may be searched for as shown in the figure 6.6. All parameter
fields will be searched for this string.
6 - 13
DIgSILENT PowerFactory The Database and the Data Manager
As stated before, the objects matching the filter criteria are displayed in a data browser.
They may also be highlighted in the graphic using the 'Color representation' function de-
scribed in 8.3.5. The color to be used in this case can be specified under the tab 'Graphic'
of the General Filter dialogue window.
Note New a filters are saved to the Project \Changed Settings \Filters
folder in the project and are available for use directly, using the
right mouse menu. If a search is to be performed in a particular
grid simply proceed as follows: right-click the grid folder −> Find −
> Local Filters −> Filter Name (e.g. Lines longer than 700m). Re-
member to press the "Apply" button to perform the search.
If you unchecked the "Show Filter Settings before Application" box
under "User Settings"−>"General" then the filter will be applied as
soon as it is selected from the menu. This is useful when you have
already defined several filters for regular use.
6 - 14
DIgSILENT PowerFactory The Database and the Data Manager
Fig. 6.7: Full size edit window appearing after double-clicking the object icon in the
data manager
An open edit dialogue will disable the data manager window from which it was opened.
The edit dialogue has to be closed first in order to open another edit dialogue.
However, it is possible to activate more than one data manager (by pressing the icon
on the main toolbar) and to open an edit dialogue from each of these data managers. This
can be useful for comparing objects and parameters.
Using the full size edit dialogues (Figure 6.7) has one major drawback: it separates the
edited object from the rest of the database, making it impossible to copy data from one
object to the other, or to look at other object parameter values while editing.
PowerFactory brings the big picture back in sight by offering full scale editing capabili-
ties in the data managers browser window itself. The browser window in fact acts like a
spreadsheet, where the user can edit and browse the data at the same time. The browser
window has two modes in which objects can be edited,
• Object mode
• Detail Mode
which are described in the following sections.
6 - 15
DIgSILENT PowerFactory The Database and the Data Manager
The title buttons are used to sort the entries in the browser. The visible data fields can
be double-clicked to edit their contents, or the F2 button can be pressed. The object will
show a triangle in its icon when it is being edited.
After the data field has been changed, move to the other fields of the same object using
the arrow-keys or by clicking on these data fields, and alter them too.
The new contents of a data field are confirmed by pressing the Return key, or by moving
to another field within the same object. The triangle in the icon will change to a small star
to show that the object has been altered. The object itself however has not been updated.
Updating the changes is done by pressing Return again, or by moving to another object
in the browser. By default, PowerFactory will ask to confirm the changes. See section
4.3 (Data Manager Settings) to disable these conformation messages.
If the icon on the browse window of the data manager is pressed, the browser chang-
es to 'detail' mode (see Figure 6.9). It will display only the objects from the same class as
the one which was selected when the button was pressed. In the example of Figure 6.9,
this is a load object (ElmLod). The icon or a filter (6.3.3) may also be used to engage
detail mode.
6 - 16
DIgSILENT PowerFactory The Database and the Data Manager
In 'detail' mode, the browser shows all data fields for the selected calculation function
data set, which can be selected by clicking on a page tab shown at the bottom of the table
view.If a page tab is out of reach, then the page tab scrollers will bring it within the brows-
er window again.
The list of objects may be sorted by any column by pressing the title field button. The
widths of the data fields can be adjusted by pointing the mouse on the separation line
between two title fields and dragging the field border by holding a mouse button down.
As with the browser in 'object' mode, the data fields can be edited by double-clicking
them. In the example the active power settings are being edited, but from the star in the
object icon it is clear that another field of the same object has been edited too, but not
confirmed, because this star would otherwise be a triangle.
It is possible to change a parameter field for more than one object simultaneously. This
is, for instance, useful to raise a certain limit for a range of objects, in order to get a better
load-flow result i.e. by alleviating line overloads. An example is shown in the figure 6.10
where the nominal current for a range of line types is changed at once.
6 - 17
DIgSILENT PowerFactory The Database and the Data Manager
The parameter fields which have to be changed have to be multi-selected first. Right-
clicking the selection will pop up a case sensitive menu from which the Modify Value(s)
option opens the SetValue dialogue, see the figure 6.11.
This dialogue can be used to:
• increase or decrease them by multiplication with a scale factor ("Relative'').
• increase or decrease them by multiplication with a scale factor with respect to the
sum of values selected ("Relative to Sum'').
• Set all the selected parameter fields to a new fixed ("absolute'') value.
It is not possible to simultaneously alter parameter fields from more than one column, i.e.
to change nominal currents and nominal frequencies simultaneous, even if they would
happen to take the same value or would have to be raised with the same percentage.
copied. Please do not open the icon for the Objects relevant for the calculation ,
as this is a filter view collecting objects stored at various locations.
2 Select them (see figure 6.12).
3 Press Ctrl-C to copy or use the icon on the data manager toolbox.
4 Press Ctrl-V to paste or use the icon on the data manager toolbox. The
objects will be copied with all the data. Their names will automatically be altered to
unique names (see figure 6.13).
6 - 18
DIgSILENT PowerFactory The Database and the Data Manager
Copying data fields from one object to another is done just like for any spreadsheet soft-
ware you may be familiar with. To copy one or more data fields,
1 Select them by clicking them once. Select more data fields by holding down the
Ctrl key.
2 Copy the fields to the clipboard by pressing Ctrl-C or the icon.
3 Select one or more target objects data fields. If more than one field was copied,
make sure that the target field is the same as the first copied data field.
4 Press Ctrl-V or the icon. The contents of the data fields will be copied to the
target objects.
6 - 19
DIgSILENT PowerFactory The Database and the Data Manager
6 - 20
DIgSILENT PowerFactory The Database and the Data Manager
A new common folder (IntFolder, ) can be created in the database tree from the con-
text sensitive menu of existing folders by selecting the New option and subsequently the
Folder option from the second menu.
The common folder object is the main building block of the database tree. It is used to
store a multitude of other (folder) objects and has therefore much in common with a "sub-
directory'' on a normal computer hard disk. However, the PowerFactory database tree
does not show a hard disk file structure, but the more abstract database structure.
The common folder has an user-defined name and an user-defined owner. The owner
field may be used for names of power system engineers, project names, department
names, or any other useful information.
The common folder may be set to be read-only to protect the contents from unintentional
changes.
A new grid folder (ElmNet, ) can be created in the database tree from the context sen-
sitive menu of existing project folders by selecting the New option and subsequently the
Grid option from the second menu. This will create a new but empty grid folder. By se-
lecting the File-New option from the PowerFactory main menu and consequently select-
ing the "Grid'' option from the ComNew dialogue, a grid folder will be created together
with a single line graphic. This single line graphic will automatically open in order to create
the grid topology.
The grid folder contains all information about a certain (part of a) power system. This in-
cludes one or more single line graphics, the power system objects, the station folders, the
system stages, etc.
The grid folder dialogue, as depicted in the figure 6.16, has a name, a color, an owner
and a nominal frequency. The color is used to show the grid where the element is stored
and is activated in the coloring mode Grids/Original Locations. Coloring of graphics is de-
scribed in detail in 8.3.5 (Color Representation).
6 - 21
DIgSILENT PowerFactory The Database and the Data Manager
A new station folder (ElmStat, ) is created by adding a new busbar (system) in the
single line graphic. Because all busbars must reside in a station, this will automatically cre-
ate a station folder in which the new busbar(s) will be stored. Different stations may be
combined into larger stations later on.
The station defining dialogue is explained in the section 9.1.3 (Defining Stations).
A new single line graphic folder (IntGrfNet, ) is normally created automatically when
a new grid folder is created from the File-New option on the main menu.
A new single line graphic folder may also be created from the option New from the context
sensitive menu of the folder in which the graphic should be stored by selecting the Graph-
ic option from the second menu.
The context sensitive menu of a graphic folder has a Show Graphic option which will open
a 'graphics board' object in which the graphic will be shown.
More about single line and other graphics can be found in the chapter 8 (The Graphic Win-
dows).
6 - 22
DIgSILENT PowerFactory The Database and the Data Manager
A new system stage folder (IntVariant, ) is created from the parent folder by selecting
the New option from the parent folder's context sensitive menu and consequently select-
ing the System Stage option.
A system stage is a special 'administrator' folder which is used in the hierarchical and non-
redundant system stage administration system. It is capable of stealing the grid informa-
tion of its parents and keeping track of all changes made to these grids. At returning the
information to the parents, the changes registered by the system stage folder will be un-
done. The system stage folder uses special registration objects to keep the changes
made. The next time the system stage folder is activated, it will reactivate all the changes
made the last time it was activated.
The System Stage folder has an user defined name, an optional user defined owner name
and an optional user defined description. The contents button will show the current con-
tents of the folder.
A system stage folder may be 'reduced' to one of its parent folders by activating the par-
ent and right-clicking the system stage folder. The pop-up menu will now show the Re-
duce system stage branch option. Selecting that option will gather the changes stored in
the system stage folders, starting with the reduced folder and walking up the database
path to the activated parent folder. The gathered changes are used to permanently
change the parent design, after which the whole database path between the reduced sys-
tem stage folder and the changed parent is deleted.
A study case folder (IntCase, ) is meant to hold one or more references to grid and/
or system stage folders. These referenced folders together define the studied system con-
figuration and will automatically be (de)activated when the study case folder is (de)acti-
vated.
Without calculation case folders, it would be necessary to manually activate the correct
grid and/or system stage folder folders over and over again in order to analyze the result-
ing power system configuration.
A Study Case folder with a reference to at least one Grid or system Stage folder has to be
activated in order to enable calculations.
The Study Case Folder has an user defined name, an user defined owner, and has a flag
to define it as the default Study Case folder in the current directory. When no Study Case
folder is active when a Grid or System Stage is activated, the default Study Case folder is
activated too, in order to create the reference to the Grid or System Stage folder. When
no default Study Case folder is available, a new one is created automatically.
Disabling the Use as default option will protect the contents of the Study Case folder.
For more information, see 7.1.3 (Study Cases).
Library folders ( ) are used to store 'type' data (2.2). The 'global' library contains 'type'
objects accessible for all users. It is saved in the database directory, at the same level of
6 - 23
DIgSILENT PowerFactory The Database and the Data Manager
the user's folders. When first installed, PowerFactory stores in the 'global' library sub
folders containing an ample set of 'types' for different power system elements.
Local ('project') libraries are automatically generated within the project folders (7.1.1
(Creating a new Project)). By default the 'project' libraries include the 'Scales' folder
(IntScales), which is used to store time scales (10.1.7 (Creating a Time Scale)). In
'project' libraries, the user can define new suitable 'types' for his project or simply import
'types' from the global library or other folders.
When defining a new power system element, the user is asked for a 'type'. There he can
choose among a 'Global Type' (from the 'global' library), a 'Project Type' (from the
'project' library) or a 'New project Type' (define a new 'type' in the 'project' library).
The Matrix page, as depicted in the figure 6.17 holds the table with the matrix values. The
row and column labels are normally defined on the 'labels' page but are enumerated by
default.
The matrix is resized by right-clicking either a row label or a matrix cell. In both cases,
the context menu will show options for inserting, appending or deleting cells.
• If a row label was right-clicked, new rows will be inserted or deleted at the clicked row
position, or appended at the bottom of the matrix.
6 - 24
DIgSILENT PowerFactory The Database and the Data Manager
• If a matrix cell was right-clicked, new columns will be inserted or deleted at the
clicked column position, or appended at the right side of the matrix.
Labels for rows or columns are defined on the labels page, as depicted in the figure 6.18.
"Row labels'' holds the labels for the rows, "Col labels'' defines the labels for columns. It
is not required to define exactly as many labels as there are columns or rows. It is allowed
to enter empty labels, or to define more labels.
New Matrix objects can be created in the database by using the 'new object' icon ( )
under the 'Elements' = ''Others'' −> 'Filter' = ''Other elements (Int*)'' −> 'Element' =
''Matrix (IntMat)'' assignment. The object will be created in current active folder.
6 - 25
DIgSILENT PowerFactory The Database and the Data Manager
New object sets are defined by pressing the icon in the data manager, selecting Oth-
ers and typing SetSelect next to Filter. An object set dialogue pops up, allowing the user
to make the assignment described above, and to specify the content. The Content button
shows the current content of the set. Additional objects are added to the set using the
Add button.
New objects sets may also be defined from the database browser or the graphic. Likewise,
new objects may be added to existing sets from the database browser or graphic. This is
done by selecting one or more objects, right-clicking the mouse and selecting Define or
Add to. A second menu pops up showing the possible sets to define or to add to.
6 - 26
DIgSILENT PowerFactory The Database and the Data Manager
here as "command line commands'', although they do not principally differ from any other
command.
Cd Command
Moves around in the database tree by opening another folder at a
relative position from the currently open folder.
Example:
cd...\gridB\Load1
Cl Command
Stops the redirection of the output window to either a file or to a
printer. All following messages will again be shown only in the output
window.
cl/out stops redirection to a file
cl/prn stops redirection to a printer
Cls Command
Clears the output or input window.
cls/out clears output window
cls/inp clears input window completely
cls/inp/done clears only previously executed commands
.../y asks for confirmation
Dir Command
Displays the contents of a folder.
Example:
dir Study Case
Ed Command
Pops up the dialogue of a default command, i.e. "ldf'', "shc'', etc.
Example:
ed ldf
Exit Command
Exits the program immediately without further confirmation.
Man Command
Queries or sets a variable.
Example:
man/set obj=Load_1.elmlod variable=plini value=0.2
Op CommandC
Redirects output to either a file or a printer.
Example:
op/out f=train3.out
Pause Command
Interrupts the execution of the command pipe until a next pause
command is executed.
Pr Command
Prints either the contents of the output window or the currently active
graphics window.
6 - 27
DIgSILENT PowerFactory The Database and the Data Manager
Rd Command
Opens and reads a file.
Stop Command
Stops the running calculation.
Sys Command
Executes a dos command.
Wr Command
Writes to a file.
6.9.1 Notes
By exporting a folder from the database, only the information in that folder and all its sub-
folders will be stored. If the exported objects use information (e.g. power system types
like line or transformer types) that is saved somewhere else, then that information will
not be stored. Make sure that the used power system types and all other referenced in-
formation is exported too.
When importing a file that contains objects which use data outside the import-file, a
search for that data is started.
6 - 28
DIgSILENT PowerFactory The Database and the Data Manager
For instance, assume a project is exported. One of the line-models uses a type from a
library outside the project. When exporting, the path and name of this type is written in
the export-file, but the type itself is not exported, as is does not reside in the exported
project.
At importing, the stored path and name of the 'external' type is used to find the type again
and to restore the link. However, if the 'external' type is not found, then it will be created,
using the stored path and name. Of course, the created object has default data, as the
original data was not exported. Additionally, an error message is written to the output
window.
Suppose that you are working with a large library, which is stored in a special user-ac-
count to make it read-only. The library is made accessible by sharing it to all users.
When export the projects, the objects from the external library are not exported. Howev-
er, a colleague which has access to the same library may still import your projects without
problems. The external objects used in your projects will be found in the same location,
and the links to these objects will be correctly restored.
6 - 29
DIgSILENT PowerFactory The Database and the Data Manager
6 - 30
DIgSILENT PowerFactory The Database and the Data Manager
values by 'anonymous' values. The term 'anonymous' expresses the fact that the imported
data has no parameter description. The size of the imported value range and the required
data are tested. Importing invalid values (i.e. a power factor of 1.56) will result in an error
message.
6 - 31
DIgSILENT PowerFactory The Database and the Data Manager
the figure 6.25 shows an example of valid spreadsheet data of some line types and some
2 winding transformer types.
6 - 32
DIgSILENT PowerFactory The Database and the Data Manager
6 - 33
DIgSILENT PowerFactory The Database and the Data Manager
The result of the DOLE import depend on whether or not objects of the imported class
and with the imported names already exist or not in the database folder. In the example
of the figure 6.28, none of the imported objects existed in the database an all were cre-
ated new therefore. The example shows the database in detail mode.
New objects are created in the PowerFactory database folder only when no ob-
ject of the imported class and with the imported name is found in that folder.
If such an object is found then its data will be overwritten by the imported data
Because new objects are only created when they do not exist already, and only the im-
ported parameters are overwritten when the object did exists already, the import is al-
ways a save action.
Remarks
Object Names
Object names may not contain any of the characters
*?=",\~|
Default Data
When an imported object is created newly, the imported data is used to
overwrite the corresponding default data. All parameters that are not
imported will keep their default value.
6 - 34
DIgSILENT PowerFactory The Database and the Data Manager
Units
The spreadsheet values are imported without units. No conversion from
MW to kW, for example, will be possible. All spreadsheet values
therefore have to be in the same units as used by PowerFactory.
6 - 35
DIgSILENT PowerFactory The Database and the Data Manager
6 - 36
DIgSILENT PowerFactory Project Management
Chapter 7
Project Management
7-1
DIgSILENT PowerFactory Project Management
It will be noticed that this dialogue is also used to create several other new objects. To
create a new project it must be ensured that the 'Project' option is selected. The target
folder determines where the new project will be created. Normally, and by default, this is
the...\User folder. The name of the new project may be entered as desired.
By pressing Execute, a new project folder will be created. A project should contain at
least one grid and at least one study case folder. A second dialogue will pop up to allow
the user to specify the name and nominal frequency of a new automatically created grid
(figure 7.2).
7-2
DIgSILENT PowerFactory Project Management
The project dialogue of figure 7.4 pops up when selecting Edit −> Project... on the main
menu or when rigth-clicking the project folder in the Data Manager and selecting Edit. It
allows the edition of the basic project settings and the creation of new 'study cases' and
'grids'.
Pressing the New Grid button will create a new grid and will open the grid edit dialogue.
A second dialogue will ask for the study case to which the new grid folder will be added
(for additional information about grid folders see 7.1.2)...
The New Study Case button will create a new study case and will open its dialogue. The
new study case will not be activated automatically (for information about study cases see
7.1.3).
Each project has a special folder which stores all changed settings, such as: changed re-
sult box definitions, changed report definitions, special filters, flexible page definitions,
etc. The buttons Take from existing Project and Set to Default, allow the use
of the changed settings from another project and the use of the Power Factory default
settings respectively. The 'Changed Settings' are stored under the project folder and can
later be viewed in the Data Manager ( icon).
The Input Variables Section allows the user to choose the unit system and the decimal
prefixes for the adaptable element input dialogues within the project. Finally the currency
unit can be defined.
The name of the active study case is shown in the lower part of the dialogue window un-
der the 'Active Study Case' assignment, it's edit dialogue can be opened by pressing the
edit ( ) button.
7-3
DIgSILENT PowerFactory Project Management
After pressing the button, the base apparent power and the minimal value of the re-
sistances and conductances in p.u can be set.
Pressing the Contents button on the dialogue will open a new data browser displaying
all the folders included in the current project directory.
Grids are data folders in which element data pertaining to a network is stored. These
grid folders also contain the single line diagrams which were used to create the power
system design. Additionally, each grid folder may contain a tree of system stage folders
for alternative design options (see 7.2.1 to 7.2.5). There may be one or several of these
grid folders in the project folder, and these may also be seen as areas.
The user may divide their network as desired into these folders, however, a typical ar-
rangement for a network would be as shown in figures 7.5 and 7.6. The schematic dia-
gram in figure 7.5 shows the network layout, and figure 7.6 proposes a PowerFactory
grid arrangement:
7-4
DIgSILENT PowerFactory Project Management
Grouping of the data in this fashion is advantageous as the user embarks on more ad-
vanced studies, such as stability or EMT type simulations. In this type of study the phe-
nomena under study is often localized and irrelevant network data may be excluded from
the study in order to speed up the simulation.
To add a grid folder to the current project, various methods may be employed:
1 Select the Edit-Project option on the main menu. This will open the dialogue of the
project that is currently active. Press the New Grid button.
2 Right-click the project folder in a database manager and select Edit. Press the New
Grid button.
3 Right-click the project folder in a database manager and select New −> Grid from
the menu.
In each case, the dialogue to create a new grid will appear, as shown in the figure 7.2,
where the grid name, frequency and owner may be specified. A second dialogue will ap-
pear after the OK button has been pressed, where the study case that the grid will be
linked to must be selected. Three options are presented:
7-5
DIgSILENT PowerFactory Project Management
7-6
DIgSILENT PowerFactory Project Management
The three small folders in the icon of an study case ( ) are colored red in the database
tree when a study case is active. All of the grids and/or system stage folders are also col-
ored red.
Grids or system stages (7.2.1 to 7.2.5) may be added to, or removed from, the study case
by right-clicking them in the database tree and selecting Add to Study Case or Remove
from Study Case.
A grid or a system stage cannot be separately activated; a study case ( ) linked to the
grid or system stage must be activated. The context sensitive menu will show a Activate
option when a grid or system stage folder is right-clicked if no study case folder is active.
This will present a prompt dialogue which request that either an existing study case be
activated, or a new study case be created first. The grid or system stage is then activate
in conjunction with whichever choice is made.
An active study case named Basic 2006 system is shown in figure 7.8. The database tree
shows the active study case and the grids used by it. These are the grid named Trans-
mission Area in its base configuration and the remaining three grids in the variant config-
uration named 2006 Ops Plan.
To edit the data of a study case, you may select Edit −> Study Case in the main menu, or
right-click the study case in the Data Manager and select Edit. A dialogue as shown in
figure 7.9 will appear.
The grids/system stages that are linked to a study case may be viewed by pressing the
7-7
DIgSILENT PowerFactory Project Management
The study case itself contains several calculation commands, and the special "Summary
Grid" object. The Summary Grid is an internal, automatically created object, as are its con-
tents, inexperienced users should avoid editing it.
A project that contains more than one grid, which has several system stage design alter-
natives, or which uses triggers and scales to model the various conditions under which
the system should operate, calls for many different study cases.
A new study case can be added to the project by various means:
1 Select Edit −> Project from the main menu, or by right-clicking the project folder and
then selecting Edit in a database manager. This will open the dialogue of the active
project. Press New Study Case.
2 By right-clicking the project folder in a database manager and selecting New −>
Study Case from the menu.
In all cases, the dialogue for defining a new study case will appear, as had been depicted
already in figure 7.9, will appear.
It may be seen that, in the study case dialogue, the output (that is, calculated) variable
units may be specified for load-flow and short-circuit. Each study case may have its own
settings in this regard.
7-8
DIgSILENT PowerFactory Project Management
In the ''Step 1'' of figure 7.10, a base case with three parameters is defined: A, B and C.
Three system stage folders are created in this base case and each of them changes one
or more of these parameters (depicted by the ':=' symbol). Two second level system stag-
es are visible. The right columns, pointed by the arrows, give the parameter values when
the grid folder or a system stage folder is activated. These values would be used in the
various calculations. Notice how the third case shows that the change in the first system
stage (A:=11) stays valid when the second level system stage is activated (A:=11,
B:=23). In the sixth case, a change of the first stage (B:=21) is overruled by the second
level stage (B:=23).
7-9
DIgSILENT PowerFactory Project Management
In the second step the 'C' parameter is changed in the base case, this change is reflected
in all system stages except for the sixth one, where the 'C' parameter was already modi-
fied (columns A', B' and C').
Note If all of this seems too complex to grasp initially simply keep the
following in mind:
- Information Flow
information flow is from the higher folder to the lower folder only
(picture an 'information diode')
- Modification Flow
changes made in a higher folder will only be 'inserted' into the low-
er folder if that object has not already been changed in the lower
folder - in this case the lower folder object is 'locked.'
7 - 10
DIgSILENT PowerFactory Project Management
Fig. 7.11: Database with study case using the base grid
Fig. 7.12: Database with base grid removed from study case and before activation of
a system stage folder
7 - 11
DIgSILENT PowerFactory Project Management
All changes made to the objects are registered in the system stage folder. Each change
will be recorded in a separate 'changed object'.
If a new object is inserted whilst a system stage is active, that object is stored inside the
active system stage. It is visible in the data manager under the active system stage folder,
along with the other objects, which have been collected from the higher-level grid and
higher-level system stages. If the system stage is now deactivated, only the newly insert-
ed objects are visible under that system stages' folder. See the figure 7.14
Fig. 7.14: Database after deactivation of a system stage folder, with added object
Deletion of objects will also be registered. An object deleted while a system stage was
active will be returned to the original parent folder. The delete action will be stored in
the system stage folder, and the object will again be (temporarily) deleted the next time
the system stage folder is activated.
Because the graphics are an integral part of the power system designs which they repre-
sent, and because they are stored in the grid folder, they will also be collected by the sys-
tem stage folders when these are activated. This means that all changes made to the
graphics will also be automatically registered by the system stage folder.
The 'changed objects' of a system stage are not normally visible in the data manager.
PowerFactory automatically creates the change objects, and deletes them again if a
change is reversed.
7.2.3 Revisions
It is possible to create, in one go, system stages for all of the grids/ system stages that
are associated with a study case; within the PowerFactory environment this is called
Revisions.
To create a Revision of a certain study case, right-click on it and choose New −> Revision.
PowerFactory will create system stages of all the grids that are associated with the orig-
inal study case in the new 'Revision' study case folder. All of these system stages will have
the same name and will be associated with the new study case.
7 - 12
DIgSILENT PowerFactory Project Management
7 - 13
DIgSILENT PowerFactory Project Management
Note Only the projects that have been shared by their owners, are avail-
able to generate remote system stages. To share a project the cur-
rent user must rigth click on it, select 'Sharing...' and define in the
'Sharing dialogue 'if the project is to be shared with all the users or
only users belonging to a certain group (see 3.4.4 for information
about groups of users).
The current user can also crete remote system stages from his own projects, following
the procedure described above. Of course now it is not necessary to share the project
containing the target grid/system stage.
A study case with remote variants acts like a normal study case. All calculations will ad-
dress all of the objects in the 'Remote Variant', as if they were local objects. The remote
design is protected against changes by the fact that the remote variant is a normal system
stage. All changes made in the 'Remote Grid' will therefore be removed as soon
as the 'Remote Variant' is deactivated.
7 - 14
DIgSILENT PowerFactory Project Management
Fig. 7.16: Project view before and after system stage reduction
As another example, the reduction process of the above example is repeated, but this
time it is divided into sequential steps (figures 7.17 and 7.18).
Step 1: TO REDUCE is reduced into the upper folder AAA. The network configuration
of AAA is now as it was defined in TO REDUCE, but it retains its name.
Step 2: AAA is reduced to AA. The network configuration of AA is now as it was
defined in TO REDUCE.
Step 3: AA is reduced to A.
Step 4: A is reduced to Grid, which now contains the network configuration as
originally defined in TO REDUCE. All other system stages are now directly below Grid.
7 - 15
DIgSILENT PowerFactory Project Management
7 - 16
DIgSILENT PowerFactory Project Management
To open the compare command dialogue right-click on an inactive project folder and then
select Compare Projects... The current active project is taken as the 'Base Project' while
the right-clicked project as the 'Project to Compare' (as it is seen in figure 7.19 the 'Project
to Compare' can be changed/selected from the command dialogue). The command com-
pares the 'Base Project' as it currently looks (Library and grid folders, or if active system
stages System Stage folders instead) with the base of the 'Project to Compare'. No system
stages of the 'Project to Compare' are regarded.
The following example would be useful to clarify the concept of the compare command:
If the 'Base Project' has two grids called ''Grid1'' and ''Grid2'', and ''Grid1'' has a system
stage called ''Variant'', which is active; the 'Project to Compare' has ''Grid1'', ''Grid2'' and
certain system stages; the compare command will compare ''Variant'' and ''Grid2'' from
the 'Base Project' with the grids from the 'Project to Compare'.
The compare command has the following options (please see figure 7.19).
Difference Report only:
Reports missing objects or objects that have different data, in one or
the other project. Only differences on the grid and Library folders are
reported. Disabling this option will create, instead of the report, a
system stage containing the grid differences. The system stages are
created under the active grid/system stage folders of the Base Project.
A recommended practice is always to generate a difference report
before creating a new system stage.
Report additional cubicles:
Reports any additional cubicles found in either of the two projects.
Suppress output messages while comparing:
Differences found during the comparison are not shown.
Ignore cubicle names:
Ignores the names of cubicles and will only search for comparable
connections to busbars and terminals.
Copy Graphics:
Copies the graphics folders from the Project to Compare that do not
exist in the Base Project.
7 - 17
DIgSILENT PowerFactory Project Management
7 - 18
DIgSILENT PowerFactory The Graphic Windows
Chapter 8
The Graphic Windows
8-1
DIgSILENT PowerFactory The Graphic Windows
The grid folder contains a sub-folder called the 'Graphic' folder ('IntGrfnet'). This sub-
folder should generally also not be edited by the user as it is automatically created and
maintained. It contains the graphic objects, associated to the grid data objects, required
to generate the single line graphics.
More than one graphic (single line diagram) may be created in/ for a grid, either to display
the different grid elements over several pages, or to display the same grid elements in
different graphical arrangements.
Consider the 'Simple Power System' project that is shown in the figure 8.1. The active
study case is called Alt Study Case and the active grid has two single line graphics that
have been created for it, Grid and Alt Grid View. The graphics board folder in the study
case has a reference to only the Alt Grid View graphic object and thus only this graphic
for the grid will be shown when the study case is activated.
Fig. 8.1: Relationship between the study case, graphics board and single line
diagrams
The references in the graphics board folder are created when the user adds a grid to a
study case. PowerFactory will ask the user which graphics of the grid should be dis-
played. At any time later the user may display other graphics in the grid by right-clicking
the grid −> Show Graphic. Graphics may be removed by right-clicking the tab at the bot-
tom of the page and right-clicking −> Remove Page(s).
The study case and graphics board folder will also contain references to any other graph-
ics that have been created when the study case is active.
8-2
DIgSILENT PowerFactory The Graphic Windows
Furthermore, graphical symbols may be moved without losing the link to the data object
they represent. Likewise, data objects may be moved without affecting the graphic
The graphics themselves are saved in the database tree, normally in the same folder as
the power grids to which they belong. This makes finding the correct Single Line graphic
representation of a particular grid, even in the case where there are several graphic rep-
resentations for one grid, easy.
When the drawing tools are used to place a new component (i.e. a line, transformer, bar
graph, etc.) a new data object is also created in the database tree. A Single Line Graphic
object therefore has a reference to a grid folder. The new data objects are stored into the
'target' folders that the graphics page is associated with (this information may be deter-
mined by right-clicking the graphic −> Graphic Options see 6.4 for more information).
Since data objects may have more than one graphic representation the deletion of a
graphic object should not mean that the data object will also be deleted. Hence the user
may choose to delete only the graphical object (right-click menu −> Delete Graphical Ob-
ject only. In this case the user is warned that the data object will not be deleted.
This suggests that a user may delete all graphical objects related to a data object, with
the data object still residing in the database and being considered for calculation. This is
indeed what will occur, when such graphical deletion is done.
When an element is deleted completely (right menu option −> Delete Element) a warning
message will confirm the action. This warning may be switched off - see User Settings,
General, "Always confirm deletion of Grid Data").
8-3
DIgSILENT PowerFactory The Graphic Windows
Note The position of an object in the database tree can be found by:
-Opening the edit dialogue. The full path is shown in the header of
the dialogue.
-Right-clicking the object and selecting Edit and Browse. This will
open a new database browser when required, and will focus on the
selected object.
8-4
DIgSILENT PowerFactory The Graphic Windows
8-5
DIgSILENT PowerFactory The Graphic Windows
that case, new data objects are first created and edited in the database manager, or im-
ported from other programs, and subsequently used in one or more single line diagrams.
PowerFactory allows for this either by drag and drop facilities to drag power system ob-
jects from the data manager to a graphic window, or by the 'Draw Existing Net Elements'
tool. The way this is done is as follows:
1 Select from the drawing tools toolbox the kind of object that is to be drawn in the
graphic.
2 Enable the drag & drop feature in the data manager by double-clicking the drag &
drop message in the message bar.
3 Select the data object in the data manager by left clicking the object icon.
4 Hold down the left mouse button and move the mouse to the graphic drawing area
(drag it).
5 Position the graphical symbol in the same way as is done normally.
6 A new graphical symbol is created, the topological data is changed, but the
graphical symbol will refer to the dragged data object. No new data object is
created.
Dragging objects in this manner is supported, however, it is easier to use the 'Draw Ex-
isting Net Elements' tool to perform this action, as described in the next section.
8-6
DIgSILENT PowerFactory The Graphic Windows
former tool has been selected. The database browser will now show all 2-winding trans-
formers which have not been inserted into the graphics. When one of these transformers
is selected in the browser (figure 8.5 b), the corresponding two busbars will be highlighted
in the single line graphic. The insertion point and connections for the transformer is thus
clear. This is also why the nodes should first be placed on the graphic. Edge (lines, trans-
formers) and branch (loads, machines, etc.) elements are placed once the nodes are in
position.
a)
b)
Fig. 8.4: Using the Draw Net Elements tool
8-7
DIgSILENT PowerFactory The Graphic Windows
a)
b)
Fig. 8.5: Placing a transformer
Note Before placing elements onto the graphic users may find it useful
to configure and display a background layer. This will be a bitmap
of an existing single line diagram of the system. It may be used to
'trace' over so that the PowerFactory network looks the same as
current paper depictions; see 8.3.4 for more information on layers.
8-8
DIgSILENT PowerFactory The Graphic Windows
• Insert Page −> Create New Page creates a new page (the icon in the toolbar will
do the same).
• Insert Page −> Open Existing Page opens a page or graphic that has already been
created but which is not yet displayed (the icon in the toolbar will do the same).
• Rename Page presents a dialogue to change the name of the graphic.
• Move/Copy Page(s) displays a dialogue to move or copy the selected page. Copy is
available only for virtual instrument panels.
a) b)
Fig. 8.6: Two tool boxes, for single line diagrams (a) and for block diagrams (b)
8-9
DIgSILENT PowerFactory The Graphic Windows
• Network or block diagram symbols, which are linked to a database object: busbars,
lines, transformers, switches, adders, multipliers, etc.
• Graphical add-on symbols: text, polygons, rectangles, circles, etc.
• The "Graphic Cursor'' ( ) which is mainly used to select graphical objects in order
to change their appearance.
The toolboxes are only visible when the graphics freeze mode is off. The graphics freeze
mode is turned on and off with the icon (found at the local icon bar of the graphical
window).
Zooming
Zoom In:
Zoom Out:
Zoom All:
Press the button; the cursor changes to show a magnifying glass; the area to be zoomed
into must be selected. This is done by dragging a rectangle around the area to be zoomed
−> picture the area to be zoomed and left click in the top left hand corner of an imaginary
rectangle framing the area. Keep the mouse button held down and drag the cursor down
and to the right. A frame is drawn as you do this; when the frame encompasses the area
you wish to zoom into let the mouse button go.
To zoom ''back'' press the Zoom Out button - this will step the zoom back to the last state.
To view the entire page press the Zoom All button (100 percent zoom).
Note You can also type a zoom percentage directly into the 'Zoom Level'
window or use the drop down list to zoom
Print Graphic
Main Menu: File −> Print
8 - 10
DIgSILENT PowerFactory The Graphic Windows
Keyboard: Ctrl + P
Icon:
This function will send the graphic to a printer. A printer dialogue will appear first.
Note The function, Page Setup (accessible via main menu path File −>
Page Setup), allow a subsize for printing to be set. This will, for ex-
ample, print an A3 graphic across two A4 pages. Special paper siz-
es or unusual printer insertion points may be entered as well by
using the margins of the print-out. These margins have to be set
with care as the print-out will be stretched to the frame. If this re-
maining page frame has a X/Y - ratio other than 0.707 (A3, A4),
the drawing will be distorted.
Rebuild
Right-Click: Drawing −>Rebuild
Icon:
The drawing may not be updated correctly in some circumstances. The rebuild function
updates the currently visible page by updating the drawing from the database.
Icon:
Inserts a new graphic object into the Graphic Board folder of the active study case and
presents a blank graphics page to the user. A dialogue to configure the new graphics ob-
ject will appear first.
Icon:
Inserts existing graphics, which may be one of the following:
• Graphic folder object (IntGrfnet, ) −> opens the selected graphic.
• Station (ElmStat, ) −> opens the station graphic of the selected station (this may
also be accessed by right-clicking the station in a Data Manager, or a busbar on the
single line graphic −> Show Station Graphic.
8 - 11
DIgSILENT PowerFactory The Graphic Windows
• Terminal (ElmTerm, ) opens the station graphic of the selected terminal (this may
also be accessed by right-clicking the terminal in a Data Manager, or a terminal on the
single line graphic −> Show Station Graphic.
• Block Definition (BlkDef, ) → The graphic of the block definition is opened. If
there is no graphic defined for the block definitions the command is not executed.
• Virtual Instrument Panels (SetVipage) −> A copy of the selected virtual instrument
panel is created and displayed.
Graphic folder objects (IntGrfnet) may be opened in more than one Graphics Board at the
same time, even more than once in the same Graphics Board. Changes made to a graphic
will show themselves on all pages on which the graphic object is displayed.
Remove Page
Page Tab Menu: Remove Page (The page tab menu is opened by right-clicking the page
tabs).
This function will remove the selected graphic from the Graphics Board. The graphic itself
will not be deleted and can be re-inserted to the current or any other Graphics Board at
any time.
Rename Page
Page Tab Menu: Rename Page (The page tab menu is opened by right-clicking the page
tabs).
This function will pop up a dialogue to change the name of the selected graphic.
Graphic Options
Right-Click Drawing:Graphic Options
Icon:
Each graphic window has its own settings, which may be changed using the graphic op-
tions function. This function presents a dialogue for the following settings. See the figure
8.7.
Basic Attributes tab:
Name
The name of the graphic
Current Net Data
The reference to the database folder in which new power system
elements created in this graphic will be stored.
Snap
Snaps the mouse onto the drawing raster.
Grid
Shows the drawing raster using small points.
Freeze
Switches on the freeze mode
8 - 12
DIgSILENT PowerFactory The Graphic Windows
Ortho-Type
Defines if and how non-orthogonal lines are permitted:
- Ortho Off: Connections will be drawn exactly as their line points were set.
- Ortho: Allow only right-angle connections between objects.
- Semi Ortho: The first segment of a connection that leads away from a busbar or
terminal will always be drawn orthogonally.
Line Style for Cables
Is used to select a line style for all cables.
Line Style for Overhead Lines
Is used to select a line style for all overhead lines.
Offset Factor for Branch Symbols
Defines the length of a connection when a branch symbol is drawn by
clicking on the busbar/terminal. This is the default distance from the
busbar/terminal in grid points.
Show Bus Couplers
Can be used to see all couplers, or to hide them.
Allow Individual Line Style
Permits the line style to be set for individual lines. The individual style
may be set for any line in the graphic by right-clicking the line −> Set
Individual Line Style. This may also be performed for a group of
selected lines/cables in one action, by first multi selecting the elements.
Allow Individual Line Width
As for the individual line style, but may be used in combination with the
"Line Style for Cables/Overhead Lines" option. The individual width is
defined by selecting the corresponding option in the right mouse menu
(may also be performed for a group of selected lines/cables in one
action).
Equidistant Insertion of Terminals on Lines
Is used when an existing line with line-routes is drawn. The terminals
between the line-routes can then be drawn either with distances
according to the relative length of the routes, or, when this option is
enabled, at equidistant positions along the line. This has no effect on
the electrical models, only on the graphical representation.
Display Frame around Switches
Draws a frame around the switch itself (Breakers, Disconnectors, etc.).
This only applies to user-drawn breakers and disconnectors.
Support Line Routes Functionality
Support Line routes functionality:
- Enabled: Two line routes are created when placing a terminal on a LINE.
- Disabled: Two lines are created when placing a terminal on a LINE.
8 - 13
DIgSILENT PowerFactory The Graphic Windows
Additional Attributes and Coordinates tabs: these should only be configured with the as-
sistance of DIgSILENT support staff.
8 - 14
DIgSILENT PowerFactory The Graphic Windows
- Opaque:Means that objects behind the results box cannot be seen through the
results box.
- Transparent:Means that objects behind the results box can be seen through the
results box.
Show line from General Textboxes to referenced objects
may be disabled to unclutter the graphic.
Always show result boxes of detailed couplers
Self-explanatory.
Space saving representation of result boxes on connection lines
Self-explanatory.
Reset textboxes completely
Textboxes and result boxes have reference points (the point on the box
at which the box will 'attach' to its element) that may be changed by
the user. If this option is:
- Enabled:The default reference will be used.
- Disabled:The user defined reference will be used.
when the Reset settings option in the right-click menu for moved result
boxes is selected.
The settings for the cursor type for the graphic windows (large crosshair or small tracking
cross) may be set in the User Settings dialogue, see section 4.2. This is because the cursor
shape is a global setting, valid for all graphic windows, while all graphic settings described
above are specific for each graphic window.
8 - 15
DIgSILENT PowerFactory The Graphic Windows
the selected drawing size, then a larger format should be selected. The existing graphs
or diagrams are repositioned on the new format (use Ctrl+A to mark all objects and then
grab and move the entire graphic by left clicking and holding the mouse key down on one
of the marked objects; drag the graphic to a new position if desired).
If no 'Subsize for Printing' format has been selected, then, at printing time, the drawing
area will be scaled to fit the paper size of the printer. If, for instance, the drawing area is
A3 and the selected paper in the printer is A4, then the graphs/diagrams will be printed
at 70% of their original size.
By selecting a subsize for printing, the scaling of the drawing at printing time can be con-
trolled. The dimensions of the sub-sized printing pages are shown in the graphic page. If,
for instance, the drawing size has been selected as A3 landscape, and the printing size as
A4 portrait, then a vertical grey line will divide the drawing area in two halves. The draw-
ing area will be accordingly partitioned at printing time and will be printed across two A4
pages.
Make sure that the selected subsize for used for printing is available at the printer. The
printed pages are scaled to the available physical paper if this is not the case.
For instance:
• The drawing area has been selected as A2 landscape.
• The subsize for printing has been selected as A3 portrait. The A2 drawing is thus to be
printed across two pages.
• Suppose that the selected printer only has A4 paper. The original A2 drawing is then
scaled down to 70% and printed on two A4 sheets of paper.
Mark All
Icon:
This function marks (selects) all objects in the drawing. This is helpful for moving the
whole drawing to another place or copying the whole drawing into the clipboard. In block
diagrams the surrounding block will not be marked. The keyboard short cut Ctrl+A may
also be used to perform this action.
Edit Data
Right-Click Selection:Edit Data
Keyboard: Alt+Return
Mouse: Double-click
Icon:
This option lets the user edit the device data of all marked objects in the drawing. If only
8 - 16
DIgSILENT PowerFactory The Graphic Windows
one object is marked, then this object's edit dialogue will pop up directly. When more than
one object is marked, a Data Manager window will show the list of marked objects. As
with a normal Data Manager, these objects can be double-clicked to open their edit dia-
logues. See chapter 6 for more information.
Note Changes made in the device data of objects are not registered by
the graphical Undo Function. Undoing these changes is therefore
not possible.
Delete
Right-Click Selection:Delete Element
Keyboard: Del
Icon:
This function deletes all marked objects in the drawing. The database objects for the
graphical object will also be deleted (a warning message will pop up first - this may be
switched off in the "User Settings" dialogue; see 4.2.
Copy
Right-Click Selection:Copy
Keyboard: Ctrl+C
Icon:
Copies all marked objects from the current drawing and puts them into the clipboard.
Paste
Right-Click Drawing:Paste
Keyboard: Ctrl+V
Icon:
Copies all objects from the clipboard and pastes them into the current drawing. The ob-
jects are pasted at the current graphical mouse position. Objects that are copied and so
pasted create completely new graphic and data objects in the graphic that they are pasted
into.
If you wish to copy and paste just the graphic, then choose Paste Graphic Only from the
8 - 17
DIgSILENT PowerFactory The Graphic Windows
right-click menu. Similar results are obtained when using the "Draw Existing Net Ele-
ments" tool (see 8.1.5).
Undo
Right-Click Selection:Undo
Keyboard: Ctrl+Z
Icon:
Undoes the last graphic action. Undo will restore deleted elements or delete created ele-
ments when necessary. Note that data that has been deleted or changed will not be re-
stored.
Icon:
This dialogue sets the line style, line width, brush style, color and font, for annotations
(i.e. not for power system elements).
The line style includes several kinds of dashed or dotted lines and one special line style:
the TRUE DOTS style. This style will only put a dot at the actual coordinates. In a single
line graphic, this means only at the start and the end, which does not make much sense.
For result graphs, however, the TRUE DOTS style will only show the actual data points.
The brush style is used to fill solid symbols like squares and circles. These settings may
also be accessed by simply double-clicking an annotation.
Icon:
This button opens a database browser which contains all objects in the Current Net Data
folder, which are not shown in the active single line graphic.
Draw Existing Net Elements is used mainly to build single line graphics from imported da-
ta, but may also be used to create alternative graphical arrangements for existing data.
See 8.1.5 for more information.
8 - 18
DIgSILENT PowerFactory The Graphic Windows
Rotate
Right-Click Selection:Rotate
Rotates symbols 90 degrees. Only unconnected symbols can be rotated. To rotate a con-
nected element: disconnect it, rotate it and connect it again.
Disconnect Element
Right-Click Selection:Disconnect Element
Disconnects the selected elements.
Reconnect Element
Right-Click Selection:Reconnect Element
Icon:
Disconnects the selected elements and then presents the element for immediate re-con-
nection. The branch to be connected will be 'glued' to the cursor. Left clicking a bar or
terminal will connect the element.
Connect
Right-Click Selection:Connect Element
Connects the selected unconnected elements one by one. The branch to be connected
will be 'glued' to the cursor. Left clicking a bar or terminal will connect the element.
Move Objects
Marked objects can be moved by left clicking them and holding down the mouse button.
The objects can be moved when the cursor changes to an arrowed cross ( ).
Hold down the mouse button and drag the marked objects to their new position. Connec-
tions from the moved part of the drawing to other objects will be adjusted.
8 - 19
DIgSILENT PowerFactory The Graphic Windows
Line points are deleted by right-clicking them and selecting the Delete Vertex option from
the case sensitive menu. This menu also presents the option to stop (end) the line point
editing, which can also be done by left clicking somewhere outside the selected lines.
8 - 20
DIgSILENT PowerFactory The Graphic Windows
Note Certain names and results boxes are, by default, assigned to the
'Invisible Objects' layer. An example are the names and results
boxes for point terminals. This is done to unclutter the graphic.
Should the user wish to display names and/or results boxes for cer-
tain point terminals simply make the 'Invisible Objects' layer visible
and re-assign the names and results boxes required to another lay-
er, such as the 'Object Names' or 'Results' layers - then make the
'Invisible Objects' layer invisible once more.
The 'Configuration' tab has a drop down list showing all layers that may be configured by
the user. Considering the 'Object Names' layer as shown in the figure 8.11, it may be seen
that a target (or focus) may be set. The selected target will be the focus of the performed
configuration command. Various actions or settings may be performed, such as e.g.
changing the font using the Change Font button. The configuration tab may also be used
to mark (select/ highlight) the target objects in the graphic using the Mark button.
The options available to configure a layer depend on the type of Layer. Table 8.1 shows
for each layer in which way its content can be changed in format.
8 - 21
DIgSILENT PowerFactory The Graphic Windows
As and example, suppose that a part of the single line graphics is to be changed, for in-
stance, to allow for longer busbar names. To change the settings, the correct graphical
layer is first selected. In this example, it will be the 'Object Names' layer. In this layer,
only the busbar names are to be changed, and the target must therefore be set to 'All
Nodes'. When the layer and the target has been selected, the width for object names may
be set in the Settings area. The number of columns may be set using the Visibility/
Frame/Width button. Alternatively, the Adapt Width will adapt all of the object name
placeholders to the length of the name for each object.
Changing a setting for all nodes or all branches at once will overwrite the present settings.
8 - 22
DIgSILENT PowerFactory The Graphic Windows
Object Names Boxes with names and additional Text/Box Format SL/B
data description, if configured
8 - 23
DIgSILENT PowerFactory The Graphic Windows
The Single line graphic window has an automatic color representation mode. The icon
on the local toolbar will open the color representation dialogue. This dialogue is used to
select a certain coloring mode. This mode may be
None
This will redraw the graphic in black and white.
Individual
Each symbol may be assigned an individual color as determined by the
user.
Functional
Colors the graphic according to one of the following criteria:
Low/High voltage or loading
Voltage level
Voltage regions
Isolated Grids
User defined filter
Grids/ Original locations
System stages
Loading of Thermal/Peak Short-Circuit Current
Path definitions
System Type AC/DC and Phases
Relay locations
Fault Clearing Times
Feeder Definitions
Fault clearance and power restoration
External measurement locations
Missing graphical connections
Zones
Observability
Choose one of the options to color the graphic accordingly.
The icon on the single line diagram toolbar will turn the title block (See the figure
8.12) on and off. The title block is placed in the lower right corner of the drawing area by
default.
8 - 24
DIgSILENT PowerFactory The Graphic Windows
The contents and size of the title mask can be changed by right-clicking the title block and
selecting the Edit Data option from the context sensitive menu. The Select Title dialogue
that pops up is used to scale the size of the title block by setting the size of the block in
percent of the default size. The font used will be scaled accordingly. To edit the text in
the title block press the edit button ( ) for the 'Title Text' field.
The icon on the single line diagram toolbar will turn the legend block on and off. The
legend block describes the contents of result boxes (for information about result boxes
see 8.5).
Because more than one type of result box is normally used in the Single line graphic, for
instance, one for node results and another one for branch results, the legend box normally
shows more than one column of legends. After changing the result box definitions, it may
be required to manually resize the legend box in order to show all result box legends.
The Legend Box definition dialogue is opened by right-clicking the legend block and se-
lecting Edit Data from the context sensitive menu. The font and format shown may be
configured. When opening a new graphic the legend will appear by default.
8 - 25
DIgSILENT PowerFactory The Graphic Windows
If a load or machine is connected to a busbar using the first method (single left click on
busbar), but a cubicle already exists at that position on the busbar, the load or machine
symbol will be automatically positioned on the other side of the busbar, if possible.
All power system elements are positioned ''bottom down'' by default. However, if the Ctrl
key is pressed when the graphic symbol is positioned onto the drawing surface, it will be
positioned either turned 90 degrees (busbars and terminals) or 180 degrees (loads, ma-
chines). A node placed using the Ctrl key will be placed vertically, and a load thus con-
nected to a node will be positioned above the node (in case of a horizontal busbar/
8 - 26
DIgSILENT PowerFactory The Graphic Windows
terminal), or to the left (vertical busbar/ terminal), instead of beneath or to the right. If
the element has already been placed and the user wishes to flip the element to the other
side of the busbar/ terminal then right-click the element −> Flip At Busbar. If wishing to
first place a symbol and then rotate or mirror it then click on the graphic to place the sym-
bol and then press the Tab key on the keyboard. This will ''jump'' the ''rubber band'' to
the next connection point (or port) of the element. Continual pressing of the Tab key will
leave the symbol placed on the graphic (and the data element in the database, without
being connected. Manipulate the symbol as required and then right-click it −> Connect
Element.
If the element has already been connected it must first be disconnected in order to rotate
or mirror it (right-click the symbol −> Disconnect Element. Figure 8.14 shows an example
of rotated and flipped power system elements.
Terminals
Terminals are representations of nodes, there are seven different terminals that may be
used. See the figure 8.15.
8 - 27
DIgSILENT PowerFactory The Graphic Windows
Terminal
This is the most common representation of a node.
Short Terminal
Looks the same as a Terminal but is shorter and the results box and
name is placed on the "Invisible Objects" layer by default. Typically
used to save space or to unclutter the graphic.
Point Terminal
Typically used to represent a junction point, say between an overhead
line and cable. The results box and name is placed on the "Invisible
Objects" layer by default.
Rectangular Terminal
Typically used for reticulation and/ or distribution networks.
Circular Terminal
Typically used for reticulation and/ or distribution networks.
U-Terminal
Typically used for reticulation and/ or distribution networks.
Polygonal-Terminal
Typically used for reticulation and/ or distribution networks.
Terminals should be placed in position and then, once the cursor is reset, dragged, rotat-
ed and sized as required.
Re-positioning is performed by first left clicking on the terminal to mark it, then click once
more so that the cursor changes to . Hold the mouse button down and drag the ter-
8 - 28
DIgSILENT PowerFactory The Graphic Windows
Busbars
The tools for single and double busbar systems with and without tie breakers will produce
pre-defined busbar systems.
The will pop up the dialogue to define new busbar systems. With this dialogue, com-
plex systems like "Breaker And A Half" systems, with special cubicle configurations may
be defined. See 9.1.1 for more information about busbar systems in PowerFactory.
Busbars are placed by left clicking on an empty space on the drawing area. Busbars are
sized and moved in the same manner as terminals.
8 - 29
DIgSILENT PowerFactory The Graphic Windows
the element, and then making the second and third connection.
The 'free-hand' method for two and triple port elements works the same as for one port
elements.
Note Pressing the Tab key after connecting one side will leave the sec-
ond leg unconnected, or jump to the third leg in the case of three
port elements (press Tab again to leave the third leg unconnect-
ed). Pressing Esc will stop the drawing and remove all connec-
tions.
If the element being drawn seems as if it will be positioned incor-
rectly or untidily there is no need to escape the drawing process.
Make the required connections and then right-click the element
and use Reconnect Graphically to re-draw the element whilst re-
taining the data connections
Annotations are created by clicking one of the annotation drawing tools. Tools are avail-
able for drawing lines, squares, circles, pies, polygons, etc. To draw some of these sym-
bols left click at some place and release the mouse somewhere else (e.g. circles, lines,
rectangles). Other symbols require that you first set the vertices by clicking at different
positions and finishing the input mode by double-clicking at the last position.
a) b)
Fig. 8.17: Marking/ Selecting elements
Astute users may notice that the element is highlighted using a different pattern, depend-
ing on whether the graphic has been frozen or not, as seen in figure 8.17, where (a) is
the when the freeze mode is engaged and (b) when 'un-frozen.'
8 - 30
DIgSILENT PowerFactory The Graphic Windows
• To mark all graphical elements, press the All-button ( ). The keyboard short cut
Ctrl+A may also be used.
• To mark a set of elements at the same time click on a free spot in the drawing area,
hold down the mouse key and move the cursor to another place where you release
the mouse button. All elements in the so defined rectangle will now be marked. A
setting, found in the User Settings dialogue under the 'Graphic Windows' tab (on the
second page of this tab press the button), can alter the manner in which objects
are marked using this marking method, as either 'Partial' or 'Complete'. 'Complete'
means that the whole object marked must lie inside the rectangle.
• To mark more than one object, hold down the Ctrl key whilst marking the object.
• Clicking once on an element belonging to a multiple busbar system will only mark the
chosen object. When clicking on this object again all elements that belong to this
section will be marked. A third click on this object will mark the whole busbar system.
• When clicking on an element and clicking on this element a second time whilst holding
down the Alt key will also mark all the elements connected to the first element.
• If the CtrL+Alt key are pressed simultaneously whilst moving and element then
elements connected to it will also be moved.
The data of any element may be viewed and edited by either double-clicking the graphic
symbol under consideration, or by right-clicking it −> Edit Data. When multiple objects are
selected, their data can be viewed and edited trough a data browser by right-clicking it
−> Edit Data.
8 - 31
DIgSILENT PowerFactory The Graphic Windows
8 - 32
DIgSILENT PowerFactory The Graphic Windows
8 - 33
DIgSILENT PowerFactory The Graphic Windows
8 - 34
DIgSILENT PowerFactory The Graphic Windows
A result box is connected to the graphical object for which it displays the results by a 'ref-
erence point'. The figure 8.22 shows the default reference points for the resultbox of a
terminal. A reference point a connection between a point on the result box (which has 9
optional points), and one of the 'docking' points of the graphical object. The terminal has
three docking points: on the left, in the middle and on the right. The reference point can
be changed by:
• Right-clicking the resultbox with the graphics cursor (freeze mode off), and selecting
Change Reference Points.
• The reference points are shown: docking points in green, reference points in red.
Select one of the reference points by left-clicking it.
• Left-click the selected reference point, and drag it to a red docking point and drop it.
• An error message will result if you drop a reference point somewhere else than on a
docking point.
Result boxes can be freely moved around the diagram. They will remain attached to the
docking point, and will move along with the docking point. A result box can be positioned
back to its docking point by right-clicking it and selecting Reset Settings from the menu.
If the option "Reset textboxes completely" is set in the graphical settings, then the default
reference and docking points will be selected again, and the result box is moved back to
the default position accordingly.
8 - 35
DIgSILENT PowerFactory The Graphic Windows
also possible to get the option Format for Asynchronous Machine, which shows the pre-
defined formats for the element class Asynchronous Machine (ElmAsm). The selected for-
mat will in this case apply only to the visualized asynchronous machines.
If the user wants to create a specific format that is different from the pre-defined ones,
the Edit Format for Edge Elements (or Node Elements) option should be used. Note that
the new format will be applied to the entire group of objects (edge or node objects).
If a created format is expected to be used for just one specific element, then the Create
Textbox option should be used. An additional results box/ textbox will be created, using
the current format for the object. This may then be edited. Information about text boxes
is given in 8.5.4.
When the Edit Format option has been selected the user is presented with the form man-
ager dialogue (figure 8.23). A name for the new form may be entered in the Name field.
Various options for the results box may be set and the drop down lists of pre-defined vari-
ables are used to configure the desired format (section Lines). Once the format has been
set and chosen the format may be saved for future use by pressing the To Library but-
ton. The format is saved to Settings \ Project \ Changed Settings \ Formats \ Grf \ Result
in the user folder and is available for use in any project in the user folder (when right-
clicking a results box for the same calculation functionality the new format will be seen in
the listing of formats).
If the list of pre-defined variables do not contain the required variables, the Input Mode
should be pressed. A dialogue with three possible input modes will pop up. The available
options are:
1 Predefined Variables: This first option is the one presented by default and also
shown in the figure 8.23. The user has maximum three lines available where the
calculation results to be shown in the diagram can be selected. Out of all available
8 - 36
DIgSILENT PowerFactory The Graphic Windows
calculation results a limited but useful selection is pre-defined. This facilitates the
configuration work for less advanced users.
2 User Selection:This option allows the selection of the variables to be displayed in
the single line diagram out of the full set of available magnitudes. The "User
Selection" mode changes the appearance of the form manager slightly so that a
Select Variables appears in place of the pre-defined variables drop down
listings. Press this button to access the variable set (IntMon) dialogue. The
selection and use of variables is fully described in 27.2.4 (Variable Sets and Variable
Monitors).
3 Text Editor:Unlocks the text editor page for manual configuration of the variables
and their format; this should only be used by advanced users. The text editor page
is found on the "View" tab page (figure 8.24).
The final option is using DIgSILENT Output Language, the fully configurable format de-
scription language of PowerFactory. As opposed to the preceding options, it offers the
following advantages:
• More than one variable per line
• Different formats for variables
• User-defined text for individual comments
To modify the text format it is necessary to change to the tab page "view". Then a dia-
logue page appears similar to the one shown in the figure 8.24. A detailed overview over
the syntax of the DIgSILENT Output Language can be found in 27.2.5 (The DIgSILENT
Output Language).
8 - 37
DIgSILENT PowerFactory The Graphic Windows
to set the appearance of the result boxes. The available options include:
• Rotate the result box.
• Hide the selected box.
• Change the layer (see 8.3.4).
• Change the font type and size of the text.
• Change the width.
• Set the text alignment.
• Set the default format (Reset Settings).
8.5.5 Labels
In the general case, a label showing the name of an element within the single line graphic
is automatically created with the graphical objects. The label can be visualized as a text
box showing only the variable corresponding to the name of the object. As the text boxes
format of the labels can be set using the context sensitive menu.
8 - 38
DIgSILENT PowerFactory Representing the Network Topology in PowerFactory
Chapter 9
Representing the Network Topology in
PowerFactory
9-1
DIgSILENT PowerFactory Representing the Network Topology in PowerFactory
• Single busbar system with two sections and a tie breaker ( , figure 9.1 [1]).
• Double busbar system with two sections and two tie breakers ( , figure 9.1 [3]).
When a new busbar/busbar-system is created directly in the single line graphic, a new
station folder is automatically created in the database. The new station folder contains
the busbar objects themselves (StaBar objects), the switches and cubicles connecting
them (StaCubic objects) and (except for single busbars) the 'Busbar System Set' object
(SetBussys) containing the information about the system configuration.
In the station edit dialogue (in the Data Manager right click the new station folder −>Edit),
the option 'Automatically create and delete Cubicles from Graphic' can be selected (figure
9.2). If this option is enabled, cubicles will be automatically created using the breaker and
disconnecters arrangement defined in the 'Cubicle Parameters Set'.
The 'Cubicle Parameters Set' is an object of the class SetCubop, that is stored in the
graphic folder of every grid. This cubicle configuration can be accessed and modified by
pressing the 'Station Feeder Options' icon ( ) from the single line graphic toolbar. Mod-
ifications applied to the 'Cubicle Parameters Set' will only affect new cubicles.
If the 'Automatically create and delete Cubicles from Graphic' option is disabled and the
user trays to connect a new element to a busbar from the station, an error message will
pop up. The user may, either enable the option or manually create a new cubicle from
the station edit dialogue.
The configuration of the cubicles through the SetCubop objects is limited to a certain set
9-2
DIgSILENT PowerFactory Representing the Network Topology in PowerFactory
Fig. 9.3: ''Add Busbar' dialogue for creating a new busbar system
The 'Add Busbar' dialogue from figure 9.3 pops up when a new busbar system is created
using the 'General Busbar System' tool ( icon). It shows the definitions for new busbar
systems and their cubicles. This definition has the following fields:
Busbar system
Reference to a busbar system 'Set' object (i.e SetBussys objects like
9-3
DIgSILENT PowerFactory Representing the Network Topology in PowerFactory
Double busbar system, Single busbar system with two sections and a
tie breaker, etc.).
Cubicle Parameters
Reference to a cubicle 'Set' object (SetCubop object). This set is by
default the one of the single line graphic ('Cubicle Parameters Set' from
previous section).
Voltage Level
The voltage level for the generated busbar system.
Use Busbar Type
Select and/or edit the type data of the single busbar elements, that are
used to build the new system. The selection and edition is the same as
for any other type object (see 5.3.3).
Number of Sections
The number of systems with the configuration given in 'Busbar
System'.
Number of Cubicles in One Busbar Section
The number of cubicles per busbar section.
Note It is not possible to change the basic layout of busbar systems after
they have been created. It will thus not be possible to change, for
instance, a three-bar, "TransferCombi'' system into a two-bar
"Breaker-and-a-half'' system later on. However, it will be possible
to change the electrical parameters like the nominal voltage, the
busbar types, the number of cubicles, the type of switches used,
etc.
The 'Set' dialogue for the busbar system ('Add Busbar' dialogue) uses two other 'Set' di-
alogues: one for the busbars which have to be generated and one for the cubicles. At least
one cubicle must be generated per busbar section, but more may be generated directly.
When other objects are connected to the busbar system in the single line graphic, the
available free cubicles will be used first. When no free cubicles are available an error mes-
sage will pop up if the 'Automatically create and delete Cubicles from Graphic' option in
the station edit dialogue is disabled (figure 9.2). The user may either enable the option
or manually create a new cubicle from the station edit dialogue.
If the 'Automatically create and delete Cubicles from Graphic' option is enabled, new cu-
bicles will be automatically created according to the current settings in the 'Cubicle Pa-
rameters Set' dialogue ( ). If these settings were changed since the busbar system was
created, the new cubicles will differ from the original ones. To ensure equal cubicle con-
figurations, all required cubicles should be generated with the busbar system at once, or
the cubicle 'Set' dialogue must be changed to the correct settings prior to connecting an
object to the busbar.
The cubicle configuration of any station can be visualized in the 'Station Graphic' (9.1.5).
9-4
DIgSILENT PowerFactory Representing the Network Topology in PowerFactory
up when the 'Select' button ( in figure 9.3) is pressed to select a SetBussys object
from the database. After a busbar system 'Set' dialogue has been selected, it may be ed-
ited by using the 'Edit' ( ) button. The 'Busbar System' dialogue (figure 9.4) will pop
up in order to edit the following parameters:
• The name of the (new) busbar system
• The basic configuration:
- A standard single busbar system
- A u-bar system with power switches between busbar sections
- A busbar transfer combination
- A Ring scheme system
- A "Breaker and a half'' system
- A "Break through Method'' system
• The number of busbars per section
• The kind of coupling between the busbar sections
• Whether or not a transfer bus should be used
Note For both the cubicle and busbar system 'Set' dialogue it is possible
to create a new dialogue by pressing the 'New' icon ( ) in the
database browser after the ( ) button was pressed.
9-5
DIgSILENT PowerFactory Representing the Network Topology in PowerFactory
More information about possible busbar configurations can be found in the Technical
Reference Manual.
Figure 9.6 gives a graphical example of the switching options available in the 'Cubicle Pa-
rameters' dialogue:
9-6
DIgSILENT PowerFactory Representing the Network Topology in PowerFactory
When editing the selected cubicles 'Set' in the 'Add Busbar' dialogue a SetCubop object
is being edited and therefore the same dialogue described above is opened.
Note Under most circumstances the user simply connects edge elements
to the busbars and the required cubicles and switches are auto-
matically created as the 'Automatically Create Feeders From
Graphic' option is enabled by default. Specific breaker and discon-
necters configurations, other than those available in the library,
may be build using terminals and discrete switches
9-7
DIgSILENT PowerFactory Representing the Network Topology in PowerFactory
busbars is by use of the icon in the drawing toolbox. By left clicking on the single line
graph area when this button has been pressed, one or more single busbars can be placed.
The busbar objects will automatically be created in the correct data manager folder.
When is depressed in the toolbox, the "Add Busbar System'' dialogue will pop up by
left clicking on the drawing area. This set dialogue is used to define the new busbar sys-
tem, as has been explained in section 9.1.1.
When objects are connected to the new busbar system, all free cubicles are used first.
When no free cubicle is available any more, a message will pop up if the Automatically
Create Feeders From Graphic option in the corresponding station object edit dialogue has
been disabled. When this option is enabled a new cubicle will be created, according to the
settings of the cubicle 'Set' dialogue. Each single line graphic has its own cubicle 'Set' di-
alogue. To make sure that the cubicle configuration is set correctly, the settings for the
current cubicle configurations may be edited and/or altered by pressing the icon on
the active graphics window toolbar.
For every busbar drawn in the single line graphic, a new station is created in the data
base. After all or some of the busbars of the station have been drawn, they can be trans-
ferred into one station. This is shown in the following example.
Suppose a station with four interconnected busbars is to be defined. These four busbars
are drawn independently at first. Interconnecting lines or transformers or other power
system objects may be drawn as well. An example of the resulting single line graph and
corresponding database folder is depicted in figure 9.7 and figure 9.8. The database con-
tains four stations, each station contains busbars and cubicles (figure 9.8).
9-8
DIgSILENT PowerFactory Representing the Network Topology in PowerFactory
The four busbars are each located in one of the station folders. The busbars are automat-
ically given names such as 'B1', 'B2', etc. Because busbars are created in their own sta-
tions, they will normally all be given the same name. This is seen in figure 9.8 where the
station names and busbar names have been automatically generated.
New station configurations can be defined by grouping busbars into one station. This is
done by multi selecting the busbars and right-clicking the selection. A context sensitive
menu will pop up from which the Define Station option (see figure 9.9) must be chosen
to bring up a database browser showing all the station folders that are available in the
grid.
This list will show all stations defined for the grid being developed. This includes the initial
stations created when the selected busbars where drawn. Any of these stations (for ex-
ample 'Station1' in the example) may be selected as the target station.
All selected busbars will be moved to the target station. During this transfer, the names
of the busbars will be changed, should that be necessary to ensure unique naming. The
default name B1 will be changed to B2, B3, B4, etc. User defined names will not be
changed, but a (1), (2), (3), etc. will be attached to the name if this is not the case. All
stations that are 'emptied' during the transfer of busbars and cubicles will be deleted.
More information about stations can be found in section 6.6.3 and 9.1.1.
9-9
DIgSILENT PowerFactory Representing the Network Topology in PowerFactory
Stations may be created directly in the Data Manager by pressing the new object ( )
icon and selecting an ElmStat object. This will pop up the station edit dialogue, as shown
in figure 9.2.
To configure the station, three buttons are provided in this dialogue:
Internal Elements
Presents a database browser showing a list of all current elements in
the station. These elements are either busbars, switches or cubicles.
Cubicles consist of separating switches, power switches, surge
diverters, etc. and have their own 'internal elements' button in their
edit dialogue (see 9.1.2).
Add Busbar System
Presents a dialogue with which a new busbar system can be defined
and added to the station ('Add BusBar System' dialogue). The basic
busbar layout can be chosen, as well as the type and number of
cubicles that will be automatically attached.
Add Cubicle Presents a dialogue to add individual cubicles to previously defined
busbar systems in the station.
When the Add Busbar System button is pressed in the station edit dialogue, the 'Add
BusBar System' dialogue pops up (figure 9.3) with which a new busbar system can be
defined, as has been explained in the section 9.1.1 (Defining Busbar Systems).
The second way to define a station is by gathering busbar systems in the single line
graphic. See (Defining Stations in the Single Line Graphic).
Note Although new stations and other elements may be created from
the data manager it is preferable to create new elements by draw-
ing them in the graphic and then editing them.
More information about stations can be found in section 6.6.3 and 9.1.1.
9 - 10
DIgSILENT PowerFactory Representing the Network Topology in PowerFactory
S1H/1 S2H/1
S1/1 S2/1
S1/2 S2/2
T2 T3 T4 T5
M
~
T1 T6 T7 T8
M M M
~ ~ ~
A terminal can be added to the single line graphic by using one of the icon in the
drawing toolbox. Left clicking in the drawing area will place a new terminal.
Terminals are used in the same way as busbar objects. They can be scaled and moved.
All branch objects that can be attached to a busbar can be attached to a terminal. The
only difference is that the context sensitive menu lacks the station option Define Station.
Terminals may also be drawn using other graphical symbols that may be more conve-
nient, such as the icon. This is used to create the short terminal without a result box.
The short terminal has a default width for one double cubicle, but can be scaled to make
space for more (see T6 in the figure 9.10). Other terminal shapes are shown in the figure
9.11.
9 - 11
DIgSILENT PowerFactory Representing the Network Topology in PowerFactory
When a line is branched off, a special 'dot' or 'point' terminal is created automatically. This
is a short terminal in another graphical form. These terminals are stored in the line object,
which thus acts as a folder object in the database tree, in the case where a line is split
into line routes.
Terminals created outside of lines are stored in the active grid folder of the corresponding
graphic.
9 - 12
DIgSILENT PowerFactory Representing the Network Topology in PowerFactory
9 - 13
DIgSILENT PowerFactory Representing the Network Topology in PowerFactory
• To sectionalise the line into parts so that different line types may be used for the
different sections (such as when a line uses two or more different tower types, or
when manual transpositions should be modelled - since the "Transposed" option in
the type object is a perfect, balanced, transposition).
More about the mathematical models of sectionalised lines and routes, and the relations
between lines and towers, can be found in the Technical Reference Papers (available in
the DIgSILENT support page).
The dialogue shows the two cubicles to which the transmission line is connected ('terminal
9 - 14
DIgSILENT PowerFactory Representing the Network Topology in PowerFactory
i' and 'terminal j'). The example in the Figure 9.13 shows a line which is connected be-
tween the nodes called 'Line End Terminal' and 'Line Feeder Bus'. The line edit dialogue
shows the name of the node (in red) in addition to the name of the cubicle (in blue). The
actual connection point to the node is the cubicle and this may be edited by pressing the
edit button ( ). The cubicle may be edited to change the name of the cubicle, or to
remove the breaker.
The two connections can also be chosen manually, by selecting the cubicles in other
nodes. This is achieved by pressing the buttons next to the 'terminal i' and 'terminal
j' fields. However, this change will not be automatically reflected in the single line graphic.
To re-draw the line right-click the line (which now has a >> symbol on one side) and use
the Reconnect Graphically option. The nodes that the line is connected to are now high-
lighted and the line may be drawn between them.
The type of the line is selected by pressing the next to the type field. Line types for
a line, line route or line sub-section are:
• The straight forward TypLne object type.
• A tower type (TypTow) where the geometrical coordinates and conductor
parameters are specified. The line parameters are calculated from this data.
• A geometrical tower type (TypGeo) where the geometrical coordinates of conductors
are specified.
It is important to regard that references to the conductor types (TypCon objects), used
for the line circuits and for the earth conductors, are always required when defining Typ-
Tow and TypGeo objects. In the TypCon dialogue (figure 9.14), the parameters of the
conductors used in the tower arrangement (including information about conductor bun-
dles) are defined. In TypTow (figures 9.15 and 9.16) / TypGeo dialogues, the conductor
arrangement within the tower is specified.
9 - 15
DIgSILENT PowerFactory Representing the Network Topology in PowerFactory
9 - 16
DIgSILENT PowerFactory Representing the Network Topology in PowerFactory
This dialogue refers to the line which is about to be branched off, its total length and the
permissible length of the interval to be placed. This permissible length interval is deter-
mined by the total line length and connections made previously. The new insertion point
must be within the permitted limits.
Switches may be inserted on either side of the terminal that will be inserted. It will not be
possible to open the line at the insertion point if no switches are inserted (see figure 9.17),
however, switches may be inserted, or deleted, later by right-clicking at the switch posi-
tion (or where the switch would normally be) and selecting Create Circuit-Breaker or Re-
move Circuit-Breaker. The branched-off element (the inserted load, machine, etc.) is
always connected through a switch and may thus be disconnected from the line in all cas-
es. Inserting one or two switches enables the opening of the line from either side or from
both sides.
9 - 17
DIgSILENT PowerFactory Representing the Network Topology in PowerFactory
A new subsection is created by pressing the icon in the database browser. This will
present the Element selection dialogue, which is set to the default element:
• In case of a line: a partial load (ElmLoadvp) or line subsection object.
• In case of a line route: a line subsection object.
The third possibility is to select a line type, which makes it possible to store the line type
in the line element.
As soon as a line or line route is subdivided, its length is calculated as the sum of the line
sections and routes. The "Length of Line" field in the edit dialogue (see the figure 9.12)
of the line itself will thus be disabled when the line is split.
9 - 18
DIgSILENT PowerFactory Parameter Characteristics
Chapter 10
Parameter Characteristics
In any power electrical system there are two means in which the system changes. Firstly
by topological changes where new equipment is added or where the system components
are changed or upgraded.
Secondly, loads will change over time, perhaps daily, as loads peak and slump through
the day, or perhaps seasonally. Similarly, the rating values for transformers and conduc-
tors may vary with temperature.
In PowerFactory any parameter may be assigned a range of values that will be select-
able by date and time, or by some user defined trigger, such as ambient temperature,
temporary overload limit, and so forth
Such ranges of values are known as characteristics in PowerFactory. The range of val-
ues may be in the form of a one dimensional vector, or a two-dimensional matrix. The
assignment of a characteristic may be made individually to a parameter, or to a number
of parameters by using a reference to a characteristic. Studies that utilize characteristics
are also known as parametric studies.
10 - 1
DIgSILENT PowerFactory Parameter Characteristics
the icon in the main toolbar) the scale is set and the parameter value is changed.
When a different study case is activated, or a new study case is created, and a load-flow
is performed, all relevant triggers are copied into the study case folder and may be used
in the new study case.
If no other characteristics have been defined for the parameter yet, the pop up menu will
allow the New Characteristic option. This option will open a second menu where the user
may then:
• create a new scalar value,
• create a discrete time characteristic,
• create a new one-dimensional vector characteristic,
• create a new two-dimensional matrix characteristic,
• use an existing characteristic by reference.
Selecting the Reference... option presents a browser window and the user must then se-
lect a pre-defined characteristic.
If one or more characteristics have already been defined for the parameter, the pop up
menu will show options to edit or delete existing characteristics or to create another new
one. The creation of these characteristics are described in detail in the following sections.
10 - 2
DIgSILENT PowerFactory Parameter Characteristics
Thus, if the 'Global Temperature' scale has been set to 15 deg by the trigger then the
parameter that this characteristic is applied to will thus be multiplied by 2*15+3=33
10 - 3
DIgSILENT PowerFactory Parameter Characteristics
The nature of the characteristic depends on the kind of scale that is selected. All scales
will have a range of values or cases which will be shown in the column to the left of the
"Values" column. Whatever appears in this column is determined by the scale that has
been chosen. The scale may have already have been created or will need to be created
(tip: use the "New Object'' icon when selecting a scale to create a new scale and read
more about scales in the sections following).
The user now enters the range of values for the parameter.
The "Usage" field at the bottom of the characteristic dialogue specifies how the values
entered in the "Values" column will be applied to the parameter that the characteristic is
associated to.
Relative in % will multiply the parameter by the percentage value
Relative will multiply the parameter by the value
Absolute will replace the current parameter value by the absolute value
provided. Interpolations between the values are determined by the
setting in the "Approximation" field. A graph showing the values plotted
against the scale can be seen on the "Diagram" tab.
10 - 4
DIgSILENT PowerFactory Parameter Characteristics
The nature of the characteristic depends on the kinds of scale that are selected. The first
scale, that for columns, must be a discrete scale. The scale for rows may be a discrete or
continuous scale. These scales may have already have been created or will need to be
created (tip: use the "New Object'' icon when selecting a scale to create a new scale
and read more about scales in the sections following).
The "Usage" field at the bottom of the characteristic dialogue specifies how the values
entered in the "Values" column will be applied to the parameter that the characteristic is
associated to.
Relative in % will multiply the parameter by the percentage value
Relative will multiply the parameter by the value
Absolute will replace the current parameter value by the absolute value provided
Interpolations between the values are determined by the setting in the "Approximation"
field. A graph showing the values plotted against the scale can be seen on the "Diagram"
tab.
A column calculator can be used to calculate the column values, as a function of other
columns. This is done by pressing the Calculate.. button. In the example of the figure
10.5, the first column is calculated as the average of the other columns. The result is
10 - 5
DIgSILENT PowerFactory Parameter Characteristics
Once the values have been entered and the triggers have been set, the "Current Value"
field will show what the value that will be used to multiply the parameter is.
10 - 6
DIgSILENT PowerFactory Parameter Characteristics
As soon as at least one case has been defined, the trigger field will be enabled.
The approximation field and accompanying polynomial degree field will be disabled be-
10 - 7
DIgSILENT PowerFactory Parameter Characteristics
cause interpolation cannot be performed for discrete scales. The current percent value is
shown, according to the case that is currently active. The diagram page for the discrete
characteristic shows a bar graph for the available cases. See the figure 10.8 for an exam-
ple. The bar for the case that is currently active is colored black.
10 - 8
DIgSILENT PowerFactory Parameter Characteristics
10 - 9
DIgSILENT PowerFactory Parameter Characteristics
The interpolated Y-value may vary considerably between approximation functions. This is
shown in the figure 10.11 where the linear and constant approximations are drawn on top
of each other. The black crosses, which have been encircled in the figure for clarity, show
the trigger setting and the resulting different Y-values.
10 - 10
DIgSILENT PowerFactory Parameter Characteristics
may be accessed by pressing the icon on the main toolbar. This presents the Set-
Time object, as shown in the figure 10.13.
The buttons in the figure 10.13 have the following meanings:
Ignore Time Trigger
all characteristics that use time scales will be set to their 100% entered
value.
OK Closes the dialogue and sets the study case time trigger
Cancel Closes the dialogue without setting or saving anything.
Descript.>> Opens the description page.
Date Sets the date to today as taken from the local PC.
Time Sets the time to now as taken from the local PC.
10 - 11
DIgSILENT PowerFactory Parameter Characteristics
10 - 12
DIgSILENT PowerFactory Parameter Characteristics
10 - 13
DIgSILENT PowerFactory Parameter Characteristics
available in the database browser to check and edit the characteristics for whole classes
of objects. This 'Scales' mode must be enabled in the User Settings, on the "Functions''
tab. An example of a browser showing the 'Scales' tab is shown in the figure 10.15 (re-
member that the browser must be in 'detail' mode to see these tabs).
The browser in 'Scales' mode shows all characteristics defined for the displayed objects,
together with the original value and the current value as determined by the characteristic.
In the example, a one-dimensional characteristic called 'Loading Characteristic 1' has
been used for the load 'L-Baker'. The trigger has set the scale to a value of 50% and thus
the "Current Value" is 0.025 which is 50% of the input value of 0.05. The current values
will be used in all calculations.
The browser 'Scales' mode is not only used to quickly inspect all defined characteristics,
but may also be helpful in defining new characteristics, or in selecting references. the fig-
ure 10.16 shows the context sensitive menu that appears when a characteristic field is
right-clicked.
10 - 14
DIgSILENT PowerFactory Parameter Characteristics
The option Select Characteristic... , shown in the figure 10.16, is used to define references
to a characteristic and may also be used to create a range of characteristics. This is shown
in the figure 10.17 where a reference is defined for three loads at once.
The "Scales" tab of the browser will only show the "Characteristic" column when at least
one of the objects has a characteristic defined for a parameter. It is thus necessary to
define a characteristic for one object prior to using the browser, when the user would like
to assign characteristics, for the same parameter, for a range of other objects. To define
a 'High-Low' loading characteristic for all loads, for instance, can thus be done by per-
forming the following steps.
Create a discrete scale in the grid folder.
Create a vector characteristic using this scale in the grid folder.
Edit one of the loads, right-click the active power field and assign the vector
characteristic to the relevant parameter.
Open a browser with all loads, activate the 'detail' mode and select the "Scales" tab.
Select the characteristic column (right-click −> Select Column) and then right-click the
selected column.
Use the Select Characteristic... option and select the vector characteristic.
scale is set to 0.50. The flow at the feeder position will thus be 0.61 MVA.
10 - 15
DIgSILENT PowerFactory Parameter Characteristics
10 - 16
DIgSILENT PowerFactory Grouping Network Elements
Chapter 11
Grouping Network Elements
The objective of this chapter is to explain the concept and functionality of Feeders and
Zones, which are objects used in PowerFactory to group elements of the power system.
11 - 1
DIgSILENT PowerFactory Grouping Network Elements
11 - 2
DIgSILENT PowerFactory Grouping Network Elements
11 - 3
DIgSILENT PowerFactory Grouping Network Elements
scale is set to 0.50. The flow at the feeder position will thus be 0.61 MVA.
11 - 4
DIgSILENT PowerFactory Grouping Network Elements
Accessing the feeder dialogueOnce the feeder element dialogue has been opened, all of
the elements in the feeder may be listed in a browser by pressing the Edit button (see
figure 11.5).
When the Mark in Graphic button is pressed all of the elements in the feeder will be
selected in the graphic.
11.2 Zones
Elements in a system may be allocated to a zone and the graphic may be colored to show
these zones. All of the loads may be quickly scaled in a zone and the elements of a zone
may be listed in a browser format for gang editing.
Zones are created by multi-selecting elements and right-clicking −> Define... −> Zone...
or Add to... −> Zone... when a zone(s) have already been defined.
As with feeders a Zone folder is automatically created when the first zone is defined.
Zones may be accessed and edited from this folder.
11 - 5
DIgSILENT PowerFactory Grouping Network Elements
11 - 6
DIgSILENT PowerFactory General Information about Calculations in PowerFactory
Chapter 12
General Information about Calculations in
PowerFactory
Calculate Load-Flow
Calculate Short-Circuit
Break
Reset Calculation
Other command icons are grouped together in sub-toolbars which are selected by the
toolbar selection list:
12 - 1
DIgSILENT PowerFactory General Information about Calculations in PowerFactory
The icon is used to gather and show all objects considered by the study case, and
which are of a certain class, in a browser in order to inspect their data or to edit them.
Pressing the icon will present a menu listing the icons of all classes of objects cur-
rently used for the calculations, as depicted in the figure 12.1. Pressing a class icon will
pop up an object filter browser, filled with all the objects of the selected class, which are
considered by the calculation.
Pressing the line icon, for instance, will open a filter browser which contains a list of all
lines. Pressing the transformer icon gives the list of all transformers, etc. The filter brows-
er can be used to inspect, select or edit selected objects. Normally, the filter browser is
closed after performing any of these actions. It is possible to open more filter browser at
12.3 Results
Following calculations some messages are printed to the output window. These generally
consist of errors, warnings or information that may be useful when interpreting the cal-
culated data. The load-flow calculation function, for example, will provide the following
message when the power system under analysis is has 2 separated areas:
DIgSI/wrng - 1 area(s) are unsupplied.
DIgSI/info - Grid splitted into 2 isolated areas
More extensive output is given in the output window, for example, by the (N-1) outage
calculation, which is an option in the load-flow command dialogue. The output given by
that calculation is a list of load-flow calculations that were performed, each with a table
in which the element on outage and all overloaded elements are provided.
The usual place, however, to visualize load-flow or short-circuit calculation results is in
12 - 2
DIgSILENT PowerFactory General Information about Calculations in PowerFactory
the single line graphics, or the data manager and object filter (when tabulated results are
required). The results on view may configured using the highly flexible, user-definable,
variable sets. These are accessed from the results boxes or flexible data tab. See sections
27.2.1 (Result Objects) and 27.2.4 (Variable Sets and Variable Monitors) for more infor-
mation.
Some calculations offer additional results in the form of bar-graphs, vector diagrams or
other graphical output. All such outputs are presented by so-called virtual instruments,
which are placed on a virtual instruments page in the current graphics board.
• Press the icon on the main toolbar. This will store the base case results and
prepares to store the results of forthcoming calculations.
• If relative results are also required for a particular calculation report, in a formatted
report, that report has to be generated for the first case by pressing the icon on
the main toolbar and selecting the required report. This step is necessary to let the
comparison manager know which parameters are to be compared.
• Change the power system or a calculation setting to create the next case. Permitted
alterations include opening/closing switches, altering load settings or any other
component parameter, changing calculation cases, adding or deleting elements, etc.
• Repeat the calculations as performed for the first case.
• The result boxes in the single line graphic will now show the percentage change as
compared to the first case. If the calculation report, as generated for the first case, is
generated again, it will also show relative results.
• Make and calculate the other cases. After each calculation, the comparison to the first
case is shown.
12 - 3
DIgSILENT PowerFactory General Information about Calculations in PowerFactory
With the Compare dialogue, the two cases which are to be compared can be selected.
Furthermore, a list of colors may be set which is then used to color the results displayed
in the result boxes, according to certain levels of percentage change.
12 - 4
DIgSILENT PowerFactory General Information about Calculations in PowerFactory
• P,Q of Loads
• P,Q of asynchronous machines
Example:
A load-flow is calculated with the options "Automatic Tap Adjust of Transformers" and
"Automatic Shunt Adjustment" enabled. The calculated tap and shunt positions may be
seen in the single line diagram, but it will be noticed that the input data parameter in the
element data dialogue is as originally entered. The icon is clicked, and the input pa-
rameters are now overwritten by the calculated values found on the single line diagram.
12 - 5
DIgSILENT PowerFactory General Information about Calculations in PowerFactory
12 - 6
Volume II
Steady-State Power System Analysis
DIgSILENT PowerFactory
Version 13.2
DIgSILENT PowerFactory Load-Flow Calculations
Chapter 13
Load-Flow Calculations
Please refer to the section Load-Flow Calculations in the Technical References for a
detailed description and the theory behind the load-flow calculations.
In the following pages the options that may be set for the load-flow calculation will be
explained. Following this, some hints on what to do if your load-flow is not solving are
presented.
13 - 1
DIgSILENT PowerFactory Load-Flow Calculations
Network Representation
Balanced, positive sequence
Performs load-flow calculations for a one-phase, positive sequence
network representation, valid for balanced symmetrical networks. A
balanced representation of unbalanced objects is used.
Unbalanced, 3 Phase (ABC)
Performs load-flow calculations for multi-phase network representation.
It can be used for analyzing unbalances of 3-phase systems, e.g.
introduced by unbalanced loads or non-transposed lines, or for
analyzing all kinds of unbalanced system technologies, such as single-
phase- or two-phase systems (with or without neutral return).
Load Options
Consider Voltage Dependency of Loads
Voltage dependency of loads that have voltage dependency factors kpu
and kqu (as set on the Load-Flow tab in the load type) set will be
enabled.
Feeder Load Scaling
Scales loads marked Adjusted by Load Scaling in the load-flow tab of
their element data to match the total load specified in the Load Scaling
option of the feeder object.
Consider Coincidence of Low-Voltage Loads
Calculates a 'low voltage load-flow', where load coincidence factors are
considered, so as to produce maximum branch currents and maximum
voltage drops. Since coincidence factors are used the result of low
voltage analysis will not obey Kirchhoff's current law.
Scaling Factor for Night Storage Heaters
Is the factor by which the night storage heater power (as found in "Low
Voltage load" elements) is multiplied for all low voltage loads.
13 - 2
DIgSILENT PowerFactory Load-Flow Calculations
13.3 Outputs
Show Verification Report
Produces a table in the output window with a list of overloaded objects
and voltage violations, according to the values specified in "Check
devices".
Show Convergence Progress Report
Will print detailed reports concerning load-flow calculations during the
iterations, which may be used to solve convergence problems.
Calculate Power at Risk
Calculates the SPAR (System Power At Risk) parameter, which is shown
in the "Total System Summary Report''. The SPAR equals the minimum
amount of power that will be shed in order to make the highest branch
loading equal to the "Max. Loading of Edge Element". The SPAR
calculation uses a linear optimization technique to calculate the least
power that may be shed in order to alleviate all overloads. This
minimum power that will be shed is called the "Power At Risk".
Output
Is a pointer to the report definition that will be used. The arrow can be
pressed to edit or inspect the report settings.
13 - 3
DIgSILENT PowerFactory Load-Flow Calculations
Note Please mind that these factors are use as global data for the load-
flow calculation. If specific LV load types are defined, this data is
used for the according loads. For all other LV loads the global data
is used instead.
Load-Flow Method
Nodal equations for solving power flows can be implemented by two different methods:
• P,Q-balance (Energy conservation)
• Aria-balance (Kirchoffs law)
In both cases, nonlinear equation systems are resulting, which have to be solved by an
iterative method. PowerFactory always uses Newton-Raphson algorithms as non-linear
equation solver. With regard to the nodal equalizations user has the choice between:
• Classical approach (P,Q)
• Current approach (Kirchoffs law)
In wide transmission systems, especially when heavily loaded, the classical Newton Raph-
son Algorithm usually works the best. Distribution systems, especially unbalanced distri-
bution systems usually converge better using the "Current Iteration" method. In case of
difficulties, additional parameters on the "Iteration Control Page" can be adjusted.
13 - 4
DIgSILENT PowerFactory Load-Flow Calculations
Load-Flow Initialisation
No Topology Rebuilt
Will speed up large sets of consecutive load-flow calculations. It will not
consider a topology rebuild when calculating the next load-flow. If no
topology changes will be made for the system then this option may be
enabled.
No Initialisation (no flat start)
Initialises a load-flow from a previously solved solution (no flat-start).
Consideration of transformer winding ratio
Sets the manner in which voltage initialisation takes place at nodes.
Reducing the relaxation factor results in more iteration but higher
numerical robustness.
Tap Adjustment
Method
The direct method will include the tap controller models in the load-
flow calculations (in the internal loop within the Newton-Raphson
iterations). The new tap positions will then be calculated directly as a
variable and thus result after a single load-flow calculation.
The stepped method will calculate a load-flow with fixed tap positions,
after which the required tap changes are calculated from the observed
voltage deviations and the tap controller time constants. The load-flow
calculation is then repeated with the new tap positions, until no further
changes are required. The tap adjustment will then take place in the
outer loop of the iteration.
Min. Controller Relaxation Factor
The tap controller time constants are used in the automatic tap
changer calculations to determine the relative speed of the various tap
controllers during the load-flow iterations. The relaxation factor can be
used to slow down the overall controller speeds (factor less than 1.0, in
case of convergence problems) or to speed them up (factor more than
1.0, for a faster load-flow).
13 - 5
DIgSILENT PowerFactory Load-Flow Calculations
Convergence Options
Relaxation Factor
A Newton Raphson relaxation factor smaller than 1.0 will slow down
the convergence speed of the load-flow calculation, but may in some
cases result in better convergence.
Automatic Model Adaptation for Convergency
The PowerFactory load-flow function will always first try to find a
solution with the non-linear mathematical power system models. If
such a solution cannot be found, and this option is enabled, an
adaptive algorithm will change these models slightly to make them
more linear, until a solution is found. Model adaptations are reported in
the output window.
13 - 6
DIgSILENT PowerFactory Load-Flow Calculations
13 - 7
DIgSILENT PowerFactory Load-Flow Calculations
Note There are 3 different types of messages that are printed to the out-
put window; warning, error and information messages. Only error
messages must be corrected for a load-flow to solve. Take note of
the warning messages and evaluate them in terms of your system,
these do not need to be corrected for the load-flow to solve. "Un-
supplied Areas" mean that a node or branch element has no supply
(i.e. a breaker is open)
If there is still no convergence then set most of the elements out of service and bring
these back one at a time, from the source element 'downwards', performing a load-flow
each time.
When having large unbalances, such as when there are a number of single or dual phase
elements, or when having power electronics elements use the "Newton Raphson Current
Iteration" option in the "Advanced" tab of the load-flow dialogue.
13 - 8
DIgSILENT PowerFactory Short-Circuit Calculations
Chapter 14
Short-Circuit Calculations
Network Planning
One application is to check the rating of network equipment at planning stage. In this case
the planner is interested in knowing the expected maximum currents (for the rating of the
components) and the minimum currents (to make sure the protection concept will work).
Short-circuit calculation at planning stage mostly will use calculation methods that require
less detailed network modelling (e.g. that do not require load information) and will apply
extreme-case estimations. Examples for these methods are the IEC/VDE calculation
method and the ANSI method.
Operational Problems
A different field of application is the precise evaluation of the fault current in a specific
situation, e.g. to find out if the mal-function of a protection device was a relay failure or
was the consequence of wrong settings. This is the typical application of exact methods
like the superposition method (complete method), which is based on a specific load-flow
situation. This chapter presents the handling of the short-circuit calculation methods as
implemented in PowerFactory. More information about the background on this topic can
be found in section 14.7 (Technical Background).
The short-circuit calculation in PowerFactory is able to perform single faults as well as
multiple faults of nearly unlimited complexity. The handling of PowerFactory, the differ-
ent methods and the available options are presented in the following.
14 - 1
DIgSILENT PowerFactory Short-Circuit Calculations
• When only one single busbar is selected, and Calculate −> Short-Circuit is chosen, the
"Fault Location'' reference is set to the selected busbar.
• When two or more busbars are selected and Calculate −> Short-Circuit is chosen, the
"Fault Location'' reference is set to a so-called "Selection Set'' (Setselect) object,
which contains a list of references to the selected busbars.
In either case, the options for the calculation can be modified. Please refer to section 14.6
(Short-Circuit Calculation Options) for a detailed description of the available parameters.
It should be considered, that changing the option "multiple faults'' may change the selec-
tion of fault locations and may thus lead to a calculation for locations other than the bus-
bars selected in the single line graph. After pressing the button Execute, the calculation
is executed and, if successful, the results are shown in the network diagram. Also a result
report is available and may be printed out.
Once a selection of fault locations is made and the short-circuit calculation is performed,
it is easily possible to execute further calculations based on the same selection of ele-
ments. This can be done by the following alternative actions:
• Following the button will enable the user to select if the fault location is defined in
% of the line length or in absolute distance.
When a fault on a line is calculated, a box is shown next to the line presenting the results
of the calculation.
14 - 2
DIgSILENT PowerFactory Short-Circuit Calculations
- In the short-circuit dialogue in the section Fault Locations, press the button
behind the Short-Circuits. To access the events stored within this object, please
press Contents (see the figure 14.2).
• A window is opening up that presents the list of events. When double-clicking on one
line, a window with the description of the event is opened.
• One now can modify the settings of the short-circuit event. The list of fault locations
consists of a "Short-Circuit Event List'' (IntEvtshc) object, which holds one or more
short-circuit events (EvtShc). Each of these events has a reference to a fault location
(a busbar) and carries a description of the fault type. An example is shown in the
figure 14.3.
14 - 3
DIgSILENT PowerFactory Short-Circuit Calculations
Note To re-use the event list (IntEvtshc) later, this object can be copied
to a user-defined folder in the database manager. This will prevent
it from being modified during the following calculations. When re-
peating the calculation with the same configuration, the reference
in Calculate-Multiple Faults can be set to this object.
14 - 4
DIgSILENT PowerFactory Short-Circuit Calculations
Calculation Method
PowerFactory provides the following calculation methods for short-circuit calculation:
• According to the German VDE 0102/0103 standard.
• According to the International IEC 60909 standard.
• According to the American ANSI/IEEE C37 standard.
• A 'complete' method which considers the pre-fault load-flow results.
The specific options for the selected methods follow in the Advanced Options page.
Fault Type
The following fault types are available:
• 3-Phase Short-Circuit
• 2-Phase Short-Circuit
• Single Phase to Ground
• 2-Phase to Ground
• 1-Phase to Neutral
• 1-Phase Neutral to Ground
14 - 5
DIgSILENT PowerFactory Short-Circuit Calculations
• 2-Phase to Neutral
• 2-Phase Neutral to Ground
• 3-Phase to Neutral
• 3-Phase Neutral to Ground
The fault types with neutral conductor only make sense when the lines are modelled using
neutral conductors.
Output
A text report is automatically written to the output window when the On option is enabled.
The reference to the report generating command can be used to select which type of re-
port will be printed out. Its name is written in blue color behind the button .
Fault Location
Either the option At all Busbars and Terminals is enabled, or a reference must be given
to either
• A single busbar object
• A fault event container (an IntEvtShc object)
• A selection of busbars (a SetSelect), see 14.5 (Short-Circuit Calculation with User-
Defined Element Sets).
Multiple faults will only be calculated for the complete method, when the option Multiple
Faults is enabled. In other cases when more than one fault location has been selected, a
sequence of short-circuit calculations is performed, once for each fault location.
14.6.2 Verification
The verification option will, when enabled, write a loading report to the output window
which shows the various maximum and calculated currents for rated devices. rated devic-
es are, for instance,
• Lines which have a rated Short-Time Current at their line type which is larger than
zero.
• Breakers or coupling switches which have a type with a valid rated current.
Published
This offers a sub-selection for the method, where the version of the used standard can
be selected by the year in which it was issued. The most recent standard is 2001, however
1990 is still available for the verification of documented results.
14 - 6
DIgSILENT PowerFactory Short-Circuit Calculations
Calculate
The pull-down list offers the choice between the minimal or maximal short-circuit current.
Fault Impedance
The fault impedance is defined as the reactance and resistance of the fault itself (i.e. the
impedance of the arc or of the shortening path).
Short-Circuit Duration
The value for the Breaker Time is used to calculate the breaking current of a circuit break-
er. The value for the Fault Clearing Time (Ith) is required for the equivalent thermal cur-
rent.
14 - 7
DIgSILENT PowerFactory Short-Circuit Calculations
The advanced short-circuit options (see 14.5) are used to tune the short-circuit calcula-
tions. It is recommended to make yourself familiar with the IEC/VDE standard read before
modifying these options. A brief summary of the standard can be found in the Technical
References of the short-circuit.
Grid Identification
The calculation of the factor kappa is different for meshed or radial feeding of the short-
circuit. Normally PowerFactory will automatically find the appropriate setting. The op-
tion always meshed will force a meshed grid approach.
c-Voltage Factor
The standard defines the c-voltage factor to be used for the different voltage levels. In
special cases the user may want to define himself the correction factor. In this case please
activate the box "Userdefined'', then a specific c-factor can be entered.
Asynchronous Motors
The influence on the short-circuit currents of the asynchronous motors may be always
considered, automatically neglected when possible, or neglected when possible and con-
firmed by the user.
Conductor Temperature
When activating this option, the initial (pre-fault) conductor temperature can be set man-
ually. This will influence the calculated maximum temperature of the conductors, as
caused by the short-circuit currents.
R-
– ω ⋅ T b ⋅ ---
i DC = 2 ⋅ I″ k ⋅ e X
Method C: Using the R/X ratio calculated with the equivalent frequency method.
The equivalent frequency is depending on the breaking time (see table
14.1). This method is recommended for maximum accuracy.
14 - 8
DIgSILENT PowerFactory Short-Circuit Calculations
R
– ω ⋅ T b ⋅ -----f
i DC = 2 ⋅ I″ k ⋅ e Xf
R R fc
------f = ------c ⋅ -----------
Xf X c f nom
The ratio Rc/Xc is the equivalent impedance calculate at frequency:
fc
f c = ----------- ⋅f
f nom nom
Method C': Using the R/X ratio like for the peak short-circuit current, thus selecting
the ratio fc/fn = 0.4. This options speeds up the calculation, as no
additional equivalent impedance must be calculated.
Calculate Ik
The steady state short-circuit currents can be calculated with different ways of consider-
ing asynchronous machines:
Without Motors
will disconnect all asynchronous motors before calculating the current
Ik.
DIgSILENT Method
Will consider all asynchronous motors by their breaker current. The
breaker opens after the maximum possible time.
14 - 9
DIgSILENT PowerFactory Short-Circuit Calculations
14 - 10
DIgSILENT PowerFactory Short-Circuit Calculations
Prefault Voltage
Value of the pre-fault voltage as required by the ANSI standard.
Fault Impedance
The fault impedance is defined as the reactance and resistance of the fault itself (i.e. the
impedance of the arc or of the shortening path).
NACD Mode
The NACD factor is the ratio of remote current contribution and the total fault current:
NACD = Iremote/Ifault. This NACD factor is used to calculate the breaker currents, includ-
ing the DC component of the current. The remote current contribution required to evalu-
14 - 11
DIgSILENT PowerFactory Short-Circuit Calculations
ate the NACD factor is the sum of all remote generator contribution (induction generators,
synchronous machines, external grids).
The calculation of the NACD factor may be very time consuming, as the contribution of
each generator is calculated one by one. Therefore different approximative methods can
be selected, which represent the most common interpretations of the ANSI Standards:
predominant The the NACD factor is calculated. If the resulting factor is greater as or
equal to 0.5, then the "dc decay only'' curve is used, which means that
the remote generation is higher than the local generation.
interpolated The NACD factor is calculated and the correction factor for the
asymmetrical fault current is interpolated between the "dc decay only"
and "AC/DC decay" curves with the following equation:
MF = AC/DC factor + (DC factor - AC/DC factor)*NACD
If (NACD = 1) then only the DC factor is used, if (NACD = 0) then only
the AC/DC factor is used.
all remote All contributions are set to remote, the NACD factor is not calculated
but assumed equal to 1 and only the "DC decay only'' curve is used.
all local All contributions are set to local the NACD factor is not calculated but
assumed equal to 0 and only the "AC/DC decay" curve is used.
Current/Voltages for
The calculation mode for the currents and voltages to be evaluated:
LV/Momentary
Evaluates the subtransient S/C currents.
LV/Interrupting
Evaluates the breaker currents
30 Cycle Evaluates the 30-cycle (steady-state) current.
14 - 12
DIgSILENT PowerFactory Short-Circuit Calculations
Calculate
This option is used to select the various currents according to the ANSI standard, which
are to be calculated.
• Momentary Current
• Interrupting Current
• 30 Cycle Current
• Low-Voltage Current
14 - 13
DIgSILENT PowerFactory Short-Circuit Calculations
• 30 cycle currents
As opposed to the calculation methods according to IEC/VDE and ANSI, which represent
approximative approaches of the correct short-circuit currents, the complete method
evaluates the accurate currents. It takes into account the precise conditions right before
the fault and treats the short-circuit problem as a special case of the load-flow calculation.
14 - 14
DIgSILENT PowerFactory Short-Circuit Calculations
Load-Flow
As the complete method considers the pre-fault condition in the system, it has to evaluate
a load-flow. The load-flow command (setup) initially is taken from the currently active
Fault Impedance
The fault impedance is defined as the reactance and resistance of the fault itself (i.e. the
impedance of the arc or of the shortening path).
Short-Circuit Duration
The value for the Breaker Time is used to calculate the breaking current of a circuit break-
er. The value for the Fault Clearing Time (Ith) is required for the equivalent thermal cur-
rent.
14 - 15
DIgSILENT PowerFactory Short-Circuit Calculations
Calculate Ik
The steady state short-circuit currents can be calculated with different ways of consider-
ing asynchronous motor contributions:
Without Motors
will disconnect all asynchronous motors before calculating the current
Ik.
DIgSILENT Method
will consider all asynchronous motors by their breaker current. The
breaker opens after the maximum possible time.
Ignore Motor Contributions
will consider asynchronous motor impedances during the calculation,
but will reduce the calculated results for the motor currents.
14 - 16
DIgSILENT PowerFactory Short-Circuit Calculations
14 - 17
DIgSILENT PowerFactory Short-Circuit Calculations
is not sufficient - or to verify the results of this method - the superposition method can
be used. It calculates the expected short-circuit currents in the network on the basis of
the existing network operating condition. If the system models are correct, the results
from this method are always more exact than the results of the method according to IEC
60909. The system analyst is, however, responsible that he has chosen the most un-
favourable conditions with respect to the sizing of plant. In individual cases, this might
result in extensive studies required.
The superposition method is (in terms of system modeling) an accurate calculation meth-
od. The fault currents of the short-circuit are determined by overlaying the healthy load-
flow condition before short-circuit inception with a condition where all voltage supplies
are set to zero and the negative operating voltage is connected at the fault location. The
procedure is shown in the figure 14.11.
14 - 18
DIgSILENT PowerFactory Short-Circuit Calculations
The initial point is the operating condition of the system before short-circuit inception (see
the figure 14.11 a). This condition represents the excitation conditions of the generators,
the tap positions of regulated transformers and the breaker/switching status reflecting the
operational scheme.
From these pre-fault conditions the pre-fault busbar voltage of the faulted busbar can be
calculated. For the pure fault condition the system condition is calculated for the situation
where, the negative pre-fault busbar voltage for the faulted bus is connected at the fault
location and all other sources / generators are set to zero (see the figure 14.11 b).
Since network impedances are assumed to be linear, the system condition after fault in-
ception can be determined by overlaying (complex adding) both the pre-fault and pure
fault conditions (see the figure 14.11 c).As the complete method is a superposition of two
special cases for the load-flow, the data necessary for the model network elements are
exactly the same as for the load-flow calculation.
14 - 19
DIgSILENT PowerFactory Short-Circuit Calculations
14 - 20
DIgSILENT PowerFactory Short-Circuit Calculations
As the IEC standard includes a worst-case estimation for minimum and maximum S/C cur-
rents, some elements require additional data. The mainly affected elements are:
Lines In their type the maximum admissible conductor temperature (for min.
S/C currents) has to be indicated. Line capacitances are not considered
in positive/negative sequence system, but must be used in the zero-
sequence system.
Transformers They require a flag if they are unit or network transformers. Network
transformers may be assigned additional information about operational
limits which is used for a more precise calculation of the impedance
correction factor. Unit transformers are treated different if having a on-
load or a no-load tap changer.
Synchronous Machines
Subtransient impedances are used, besides that information about the
voltage range must be given.
Asynchronous Machines
The ratio of starting current to rated current is used to determine the
S/C impedance.
Please see the standard IEC 60909 to find detailed information about the specific model
and the correction factors of each element.
14 - 21
DIgSILENT PowerFactory Short-Circuit Calculations
14 - 22
DIgSILENT PowerFactory Protection
Chapter 15
Protection
The PowerFactory protection modeling features have been implemented with the fol-
lowing philosophy in mind.
• The protection modeling should be as realistic as possible
• The user must be able to create new complex protection devices or alter existing ones
• Although the protection models may show high complexity, their use must be kept
easy
• All protection models will act on switches.
These specifications led to the following principles.
• A fuse is modeled as a time-overcurrent relay acting on a switch
• A distinction is made between defining or altering new relay models, which is
described in the Technical References, and the use of those models, which is
described in this chapter.
and pressing the button at the cubicle field. See the figure 15.1 for example. The
15 - 1
DIgSILENT PowerFactory Protection
option Edit Relays will bring a list of all protection devices in the cubicle. New devices
may be then created with the icon.
In all cases, selecting the option to create a new protection device will bring a list with
the following options:
• Relay Model (ElmRelay)
• Fuse (RelFuse)
• Current Transformer (StaCt)
• Voltage Transformer (StaVt)
Each of these options will open a dialogue to specify the device that is to be created or
to select the one that is to be edited.
15 - 2
DIgSILENT PowerFactory Protection
The relay frame is a graphically defined composite frame which defines the functional
parts of the relay and their connections. The relay frame can be compared with an empty
printed circuit board.
The relay type is based on the relay frame and defines the type of parts which are allowed
to be put in the relay slots. The relay type can be compared with a printed circuit board
with specific, but still empty, chip or relay sockets.
The relay itself models a specific protection element, based on the relay frame and the
relay type. The relay model uses specific functional elements where the relay type defines
only the allowed type of elements. These specific elements must be based on those ele-
ment types. The relay object can be compared with a finished printed circuit board, where
specific relays and chips have been inserted in the sockets.
The figure 15.2 also shows that most of the work of defining a protection device is done
by the Relay Type Designer. A large set of common relays types is available in the data-
base and these types are ready for use.
How to use a relay type, that is: how to create a relay element, how to add it to the power
system, how to adjust the relay settings, how to perform calculations, etc., is shown by
the example of a simple time-overcurrent relay. This relay measures the currents in three
phases, but calculates a single maximum current Imax. The relay trips a breaker when
Imax violates either the time-overcurrent or the instantaneous overcurrent conditions.
15 - 3
DIgSILENT PowerFactory Protection
15 - 4
DIgSILENT PowerFactory Protection
The "Relay Definition'' field points to the relay frame. The slot definition list will automat-
ically show all slots defined by that relay frame. In the example, these are the five slots
described in the previous section. The "Category'' field is only used to help selecting a
relay type.
An object type is normally selected for each slot, except for the slots for the current and
voltage transformers. A relay based on the relay type may not use elements other than
such which are based on the given object types. The fact that, in the example, no type is
specified for the current transformer, means that all current transformers may be used.
Normally, relay types are only selected but not changed or edited. The PowerFactory
relay database offers a wide variety of relay types.
15 - 5
DIgSILENT PowerFactory Protection
The relay model has a reference to a relay type, a location, a device number and a list of
slots. The location is normally set automatically when a relay is defined in the single line
graphic by right-clicking a cubicle. The cubicle then defines the location. The device num-
ber is only relevant for the device documentation. The slot list is defined by the relay type.
As is shown in the figure 15.5, the relay model should define objects for all the slots in
the relay type. Each of these 'slot elements' must use the corresponding 'slot type', when
such a type is defined in the relay type.
Luckily, the tedious work of creating the correct elements, selecting the correct type and
assigning the element to the correct slot, is performed by the relay element itself.
The whole process of creating a specific relay model thus only asks for selecting a relay
type from the database. What follows then can best be compared by an automatic assem-
bly process:
• as soon as a new relay type is selected, the slot definition list is updated
• all slot elements for which a slot type has been defined will be created automatically.
No elements will be created for those slots for which no slot type has been defined.
Normally, these are only the voltage and current transformer slots. However, if
already existing and valid objects are found in the relay model or the cubicle in which
it resides, they will be assigned to the slots automatically.
• the created slot elements are inserted in the slot definition list
The result is a new and complete relay model with all slots filled (except maybe for the
transformer slots). Of course, all relay settings are still set to their default values.
15 - 6
DIgSILENT PowerFactory Protection
All slot elements created by the relay model are stored in the relay model itself. The figure
15.6 shows the database tree with the example relay model.
The current transformer in the example is not stored in the relay model but in the cubicle.
When, again, a new relay type is selected, the slot elements created for the previous relay
type will in most cases not be suited for the new type. However, the 'automatic assembly
process' will try to reuse as much data as possible from the old settings:
• Slot elements that are also suited for the new rely type will be reused as they are
• Slot elements which are correct except for their type will be assigned the correct slot
type
• Slot elements which cannot be reused will be deleted
• Missing slot elements will be created automatically
Pressing the Cancel button after the Relay Type has been changed will not re-
store the old slot elements.
Normally, the relay type will not define any current and/or voltage transformer types. The
corresponding transformer element will thus not be created automatically. However, if
these measurement transformers were created prior to creating the relay element, they
will be assigned to the correct slot automatically. This is the recommended practice. If the
measurement transformers were not created yet, they may be created by pressing the
Create VT or Create CT buttons. That will create a new transformer in the cubicle were
the relay element is stored.
15 - 7
DIgSILENT PowerFactory Protection
For the current transformer, the tap settings and the connection type have to be selected.
The possible tap range is limited by the type. See the figure 15.7.
The measurement object only needs the Nominal Current and Nominal Voltage. Their
range is limited by the measurement type. The nominal values are only needed if the relay
uses p.u. values. In the example, the measurement object needs no data at all. See the
figure 15.8.
15 - 8
DIgSILENT PowerFactory Protection
The instantaneous overcurrent relay allows for setting the pickup current. See the figure
15.10.
The logic unit dialogue shows a list of all switches that will be opened as soon as the logic
unit trips. The logic unit combines the tripping signals of the sub relays (the Toc and Ioc
relays in this example), in an AND/OR expression (Toc OR Ioc in this example). All switch-
15 - 9
DIgSILENT PowerFactory Protection
es in the list will be opened. If the relay to which the logic unit belongs is stored in a cu-
bicle, the three-phase breaker in that cubicle will be opened by default if no switches are
been specified. See the figure 15.11.
15 - 10
DIgSILENT PowerFactory Protection
A thus created CT will be stored in the cubicle that was right-clicked. The "Location'' fields
"Busbar'' and "Branch'' will be set automatically in that case.
A current transformer always needs a current transformer type.
The top "Location'' field is used either
• to select a cubicle when the CT is created from outside the cubicle,
• to select the preceding CT in the case of an auxiliary CT.
After selecting the type and the setting of the current transformer, its set ratio is shown
in the dialogue (Ratio). In very special cases CTs may be connected in series, that is the
output of one CT is used as the input of the second CT. In this application the second CT
will show a Ratio (the actual ratio of the CT) and a Complete Ratio, (the ratio between
the primary branch flow and the secondary CT current, which is the overall ratio of all CTs
connected in series). In the example of the figure 15.12, the CT is directly connected to
the primary component (which is the standard) and both Ratio and Complete Ratio show
the same value of 1000 A to 1 A.
The primary connection type is only available in the case of an auxiliary CT. The number
of phases can be set to 3, 2 or 1. For a 3- or 2-phase CT, the secondary connection type
can be set to D or Y. For a 1-phase CT, the phase can be set to
• a, b or c phase current
• N = 3*I0
• I0 = I0
The primary and secondary tap settings are limited to the values defined in the current
15 - 11
DIgSILENT PowerFactory Protection
transformer type.
The current transformer type defines the primary and secondary taps of the transformer.
The "Additional Data page'' is used only when saturation is considered, to set the accuracy
parameters:
• The accuracy class
• The accuracy limit factor
• either
- The apparent power (acc. to IEC)
- The burden impedance (ANSI-C)
- The voltage at the acc. limit (ANSI-C)
15 - 12
DIgSILENT PowerFactory Protection
A thus created current transformer will be stored in the cubicle that was right-clicked.
A voltage transformer always needs a voltage transformer type.
The "Location'' field is used either
• to select a cubicle when the VT is created from outside the cubicle
• to select the preceding VT in the case of an auxiliary VT
After selecting the type and the setting of the current transformer, its set ratio is shown
in the dialogue (Ratio). In the example of figure 15.14, the shown VT has a ratio of 5000
V to 100 V.
The primary winding is defined by selecting a tap and a connection type. The available
tap range is defined in the voltage transformer type.
The secondary winding is defined by the secondary winding type, the tap setting and the
connection type. The available tap range is defined in the secondary winding type. A volt-
age transformer requires at least one secondary winding. More windings can be defined
by pressing the button Additional Secondary Windings. This will bring a list of all
previously defined secondary windings. New windings can be created by pressing the
icon.
The connection type "O'' for the secondary windings is the "Open Delta'' connection, as
depicted in the figure 15.15.
15 - 13
DIgSILENT PowerFactory Protection
The connection type "V'' for the primary and secondary windings is depicted in the figure
15.16. Selecting a "V'' connection for the primary winding automatically sets the second-
ary winding to a "V'' too.
15 - 14
DIgSILENT PowerFactory Protection
The secondary winding element requires a type and a reference to the voltage transform-
er. The tap settings range is defined by the windings type.
The secondary tap settings defined in the secondary winding type determine the available
tabs for the secondary winding element.
15 - 15
DIgSILENT PowerFactory Protection
15 - 16
DIgSILENT PowerFactory Protection
The relay element is defined by selecting a relay type. The relay type defines the relay
frame and the slot types which may be used with that frame. After a relay type has been
selected, the "Slot Definition'' list will be filled automatically with the correct slot elements.
The current and voltage transformers, however, are not created automatically, although
available CT's and VT's are selected automatically.
Editing the settings of the relay model is done by editing the settings of the listed slot
elements. Double-clicking a slot element in the "Slot Definition'' list will open the dialogue
of that element.
15 - 17
DIgSILENT PowerFactory Protection
The polarization quantity Apol is rotated over the angle MT, which is the "Max. Torque An-
gle'' set in the relay edit dialogue. The rotated polarization quantity A'pol defines a half
plane which forms the first tripping condition. Further conditions are the projection of the
operating quantity on A'pol, which must be larger than the operating current setting, and
the polarization quantity, which must be larger than the polarization setting. More details
about the polarization methods and the tripping conditions can be found in the basic
Technical References manual.
The choice for the type of operating and polarization quantity is made in the Directional
Relay Type object. The relay object itself allows for the setting of the tripping direction,
the polarization method when both methods (voltage and current) are available, and the
polarization criteria. See the figure 15.22.
Selecting a 'Reverse Tripping Direction' will invert the used operating current. The voltage
or current polarization allow for setting the "Operating Current'', the "Polarization Voltage/
15 - 18
DIgSILENT PowerFactory Protection
The Nominal Voltage is needed for per unit calculations. The Frequency Measurement
Time defines the time used for calculating the frequency gradient.
15 - 19
DIgSILENT PowerFactory Protection
The calculation of the trip time is either based on the minimum melt curve or on the total
clear curve. An example of these curves are shown in the figure 15.26.
15 - 20
DIgSILENT PowerFactory Protection
15 - 21
DIgSILENT PowerFactory Protection
The relay will not reset until the current drops under the reset level, which is specified by
the relay type in percent of the pickup current: Ireset=IpsetKr/100%. See the figure
15.29 for a typical timing diagram.
15 - 22
DIgSILENT PowerFactory Protection
If the relay is located in a cubicle and no switch has been specified, the breaker in the
cubicle will be opened by default.
15 - 23
DIgSILENT PowerFactory Protection
The time dial settings will scale the I-t curve in the Time vs. I/Ip plot, according to the
curve definition. See the figure 15.33 for example.
15 - 24
DIgSILENT PowerFactory Protection
The pickup current defines the nominal value Ip which is used to calculate the tripping
time. The I-t curve definition states a minimum and a maximum per unit current. Lower
currents will not trip the relay (infinite tripping time), higher currents will not decrease the
tripping time any further. These limits are shown in the figure 15.34.
The pickup current may be defined by the relay type to be a per unit value, or a relay
current. The nominal current defined by the measurement unit (see 15.2.10 (The Mea-
surement Unit)) is used to calculate Ip in the case of a per unit value. The relay current
value already equals Ip.
Altering the pickup current will thus not change the I-t curve, but will scale the measured
current to different per unit values. The following example may illustrate this:
• Suppose the minimum current defined by the I-t curve is imin=1.1 I/Ip.
• Suppose the measurement unit defines Inom=5.0 rel.A.
15 - 25
DIgSILENT PowerFactory Protection
15 - 26
DIgSILENT PowerFactory Protection
Remove Partly This will remove the selected objects from a path definition, as long as
the remaining path is not broken in pieces
Remove This will remove the firstly found path definition of which at least one of
the selected objects is a member
Editing, adding objects to or removing objects from path definition is only possible when
the option coloring "Path Definitions'' was chosen in the Color Representation of Graphic
dialogue (SetColgr). This dialogue is opened by pressing the icon on the graphics
toolbar.
A path may be used as a selection for a calculation by selecting one or more objects from
the path definition. This will select the whole path.
15.4.1 Reports
The icon "Output Calculation Analysis'' ( ) in the main menu, will open the "Output''
dialogue (ComSh). The results of the load-flow or short-circuit analysis, for a range of
relays, can be generated in the output by selecting the options
• Results
• Relays
To generate a report for one or more relays, or for one or more previously defined paths,
the data manager may be used to select one or more relays or paths and right-clicking
the selection. The menu will show the option Output-Results if at least one relay was
found amongst the selected objects or in one of the selected paths. If a busbar was se-
lected, then all relays in connection with that busbar are selected too.
15.4.3 Plots
The time-overcurrent plots offer many features for displaying the settings of relays and
the results of short-circuit or load-flow calculations.
The time-overcurrent plots may also be used for changing the settings of relays and fuses,
by simply moving the tripping characteristics. Especially the possibility of changing the
15 - 27
DIgSILENT PowerFactory Protection
curves in combination with a short-circuit or load-flow result, and with the help of trans-
former or line damage curves, ensures a clear and comprehensible setting of the relay
parameters.
The following section explains the special features of the time-overcurrent plots.
15.5.1 Options
Path
Short-Circuits are calculated along this path. Path is set automatically and grayed out if
the command is called by the "Time Distance Plot''.
Additional Relays
If the option "Iterate Tripping Times'' on the advanced page is set, the positions where a
relay trips is interpolated and written to the results. The relays whose tripping times are
15 - 28
DIgSILENT PowerFactory Protection
checked are the relays found in the path and, in addition, the relays given by the selection
referenced in "Additional Relays''. Additional relays is grayed out and set if the command
is called by the "Time Distance Diagram''.
Results Frame
The variables written to the results object can either be defined by the user or by the
"Time Distance Diagram''. If the results are defined by the "Time Distance Diagram'' all
"Monitor Variable Sets'' in the results object are ignored. Otherwise the variables found in
the "Monitor Variable Sets'' stored in the results object are written. The result frame is
grayed out if the command is accessed through the time-distance diagram.
Results
Reference to result object, see also Result Frame, grayed out if the sweep dialogue is ac-
cessed through the time-distance diagram.
Locations
A short-circuit is calculated on each busbar/terminal found in the path. If "Buses and
Branches'' is selected short-circuits on the branches between the busbars are calculated.
Short-Circuit Frame
"Command'' is a reference to the short-circuit command. Except the short-circuit location
the short-circuit settings are not changed by the sweep. The type of failure, the method
of calculation and other settings can be modified there. "Calculation'' is just displaying the
"Fault Type'' set in the short-circuit command.
Step Size
The relay tripping positions in the path can either be iterated or calculated with a contin-
uous step size. In the constant mode a short-circuit is calculated at the beginning of the
branch. The distance between the following short-circuits on the branch is "Continuous
Step Size''. There is always a short-circuit calculated at the end of the branch. In the "It-
erate Tripping Times'' method the relay tripping positions are iterated. If the tripping time
of a relay changes continuously (like overcurrent relays) the sweep changes to continuous
mode automatically. Iteration mode is used again when the tripping time remains un-
changed at the next short-circuit position. The step size frame is grayed out if the com-
mand is accessed by the time-distance diagram.
15 - 29
DIgSILENT PowerFactory Protection
Note To show the relay locations and thus to visualize the switches with
relays definitions these can be highlighted by setting the color rep-
resentation of the single-line diagram to "Relay Locations''. By
right-clicking these elements the option Show −> Time-Overcur-
rent Plot is available and can be chosen.
In all these cases, it is also possible to select the option Add to Time-Overcurrent Plot.
This will pop up a list of previously defined over current plots from which one has to be
selected.
The overcurrent plot shows
• the time-overcurrent characteristics of relays
• the damage curves of transformers or lines
• motor starting curves
• the currents calculated by a short-circuit or load-flow analysis and the resulting
tripping times of the relays
See the figure 15.37 for an example.
15 - 30
DIgSILENT PowerFactory Protection
The time-overcurrent plot shows the results of the short-circuit or load-flow analysis as a
vertical 'x-value' line across the graph. Because the currents differ for each particular re-
lay, a current line is drawn for each relay. The intersection of the calculated current with
the time-overcurrent characteristic is labelled with the tripping time. A 'grading margin'
line, which shows the difference between the tripping times, may be added by right-click-
ing the plot and selecting "Show Grading Margins''.
It is also possible to create an user defined 'x-value' by right-clicking the graph and se-
lecting the Set Constant −> x-value option. The vertical line will show the values at the
intersections of all displayed characteristics. To move the line left, drag it with the mouse.
15 - 31
DIgSILENT PowerFactory Protection
are shown as two lines, plus and minus the grading margin above and below the dragged
tripping characteristic. See the figure 15.38 for an example: the original characteristic is
labelled "1'', the new position as "2'', and the grading margins are labelled "a''.
15 - 32
DIgSILENT PowerFactory Protection
To add a damage curve to a time-overcurrent plot, right-click the plot area and select
Add...−> Conductor/Cable Damage Curve.
The Rated Short-Circuit Current and time of the cable can be inserted. Also typical Cable
Parameters for the conductor, insulation factor, K, are given in figures 15.40 and 15.41.
These tables show the temperature range for the cables:
• T1 = maximum operating temperature in º C
• T2 = maximum short-circuit temperature in º C
and the K factor for a cross section in mm2, CM, MCM and inch2.
15 - 33
DIgSILENT PowerFactory Protection
15 - 34
DIgSILENT PowerFactory Protection
To add the damage curves of specific transformers in the power system, right-click the
transformer object in the single line graphic or the database manager and select the op-
tion Show −> Add to Time-Overcurrent Plot. This will pop up the list of defined overcurrent
plots from which one has to be selected. A damage curve will then be calculated from the
electrical transformer data, according to the ANSI/IEEE C57.109 standard, and added to
the selected time over-current plot.
15 - 35
DIgSILENT PowerFactory Protection
The characteristic currents and durations given in the edit dialogue result in a step wise
motor start current plot, as depicted in the figure 15.45.
15 - 36
DIgSILENT PowerFactory Protection
15 - 37
DIgSILENT PowerFactory Protection
15 - 38
DIgSILENT PowerFactory Protection
Note To show the path definition and thus to visualize the elements con-
tained in the path can be highlighted by setting the color represen-
15 - 39
DIgSILENT PowerFactory Protection
The time-distance plot in the figure 15.47 is separated in two different diagrams. The for-
ward diagram shows all relays at the beginning of the line in path direction. The reverse
diagram shows the relays at the beginning of the line in reverse path direction. The upper
diagram is in forward direction, the lower one in backward direction. There are three dif-
ferent styles for the time-distance plot.These are:
Forward/Reverse
Both diagrams are shown.
Forward Only forward direction diagram
Reverse Only reverse direction diagram
The path axis in the figure 15.48 shows the complete path with busbar and relay loca-
tions. Busbars/Terminals are marked with a tick and the name. The boxes above and be-
low the line show the relay locations in forward and in backward direction. The reference
relays in both directions are marked with an arrow.
15 - 40
DIgSILENT PowerFactory Protection
same impedance the smallest tripping time is used. The possible units
for the short-circuit location are position in km or reactance, resistance
and impedance, each in primary or relay ohm.
Note The easiest way to calculate the short-circuit sweep for the time-
distance plot is by simply pressing the button .
Mind that this is only needed when using the Short-Circuit Sweep
15 - 41
DIgSILENT PowerFactory Protection
15 - 42
DIgSILENT PowerFactory Protection
15 - 43
DIgSILENT PowerFactory Protection
plot or Show −> Add to R-X Plot to get a selection of already created plots to add the
characteristic to an existing plot.
Note To show the relay locations and thus to visualize the switches with
relays definitions these can be highlighted by setting the color rep-
resentation of the single-line diagram to "Relay Locations''. By
right-clicking these elements the option Show −> R-X Plot is avail-
able and can be chosen.
Fig. 15.50: A R-X plot with short-circuit results and two relays
In the figure 15.50 an example is shown for the R-X plot, where two relay characteristics
and the transmission line impedances are displayed.
Furthermore shows the location of the short-circuit or load-flow calculation as a equiva-
lent impedance point in the plot. For every relay displayed in the graph also a legend is
shown containing the relevant information regarding the short-circuit calculation of each
relay:
15 - 44
DIgSILENT PowerFactory Protection
Basic Options:
The dialogue shows the following options:
Unit The current unit may be set to either primary or secondary (relay)
ampere.
Relays Units This option is used to display only certain types of relay characteristics.
Zones Here the zone can be selected which is to be shown. Also All zones of
the relays can be displayed in one graph (default).
Display This option is used to select how the calculated load-flow or short-
circuit current/equivalent impedance will be displayed. Either as an
short-circuit arrow, a cross or none may be selected.
Show Impedance
Color out of service units
Zones being out of service can be shown as well in a different color.
15 - 45
DIgSILENT PowerFactory Protection
Additionally, the show/hide option for the starting, overreach zones, power swing units
and the complete shape of the diagrams can be selected in the dialogue.
Branch Impedances:
There are special options to modify the appearance of the branch impedances:
Number of Relay Locations
Only the branches are shown up to the x-th next relay location. If zero,
no branches are shown at all.
Branches, max. Depth
Maximum number of branches shown from each relay location. If zero,
no branches are shown at all.
Ignore Transformers
Transformer impedances are ignored when activated.
Method Method for determining the line impedances.
Show Branch Options
Here the line style and width can be selected.
Legend:
In the legend belonging to each relay different information and calculation results is dis-
played. Here the user can choose, which results are to be shown.
15 - 46
DIgSILENT PowerFactory Harmonics Analysis
Chapter 16
Harmonics Analysis
One of several power quality aspects related is the harmonic contents of voltages and cur-
rents. Harmonics can either be analyzed in the frequency domain or using time domain
simulation together with post-processing using Fourier Analysis. The PowerFactory
"Harmonics'' functions allow analyzing harmonics in the frequency domain.
Two different functions are supported by PowerFactory:
• Harmonic Load-Flow
• Frequency Sweep
The so-called "Harmonic Load-Flow'' calculates actual harmonic indices related to voltage
or current distortion and harmonic losses caused by "harmonic sources'', usually non-lin-
ear loads (e.g. current converters). "Harmonic sources'' can be defined by a harmonic cur-
rent or a harmonic voltage spectrum. When starting the "Harmonic loadflow'',
PowerFactory carries out a steady state network analysis at each frequency at which
harmonic sources are defined.
A special application of the "Harmonic Load-Flow'' is the analysis of ripple-control signals.
For this application, a "Harmonic Load-Flow'' can be calculated at one specific frequency
only. In contrast to the "Harmonic Load-Flow'', the "Frequency Sweep'' allows a continu-
ous frequency domain analysis. The typical application of the "Frequency sweep'' function
is the calculation of network impedances that allow identifying series and parallel reso-
nances in the network.
These resonance points can tell, at which frequencies harmonic currents cause low or
high harmonic voltages. Especially for filter design purposes, network impedances are of
high importance.
There is a special tool bar available for accessing the different commands for the harmonic
analysis. This toolbar can be displayed (when not already active) by selecting the icon
on the main tool bar and then choosing the bar for Harmonics from the pull-down
menu.
The button bar on the main menu now offers two icons to open a pre-configured com-
mand dialogue:
16 - 1
DIgSILENT PowerFactory Harmonics Analysis
To calculate the harmonic load-flow, use the to open the dialogue of the command
ComHldf. The figure 16.1 shows the dialogue of the harmonic load-flow command.
For a detailed description of the harmonic calculations, see the section Harmonics Analysis
in the Technical References, where the analysis and the harmonic indices are described
in detail.
The following sections describe the different options available in the harmonic load-flow.
16 - 2
DIgSILENT PowerFactory Harmonics Analysis
Calculate Option
Single Frequency
will perform a single harmonic load-flow calculation at the given
''output" frequency fshow or harmonic order respectively. A common
application for this mode is the analysis of ripple control systems. The
results of the analysis are shown in the single line diagram, in the same
way as for a normal load-flow at the fundamental frequency.
All Frequencieswill perform harmonic load-flow calculations for all frequencies for
which harmonic sources are defined. These frequencies are gathered
automatically prior to the calculation. The results are stored in a result
file, which can be used to create harmonic bar graphs (see also section
27.1.2 (Plots)).
16 - 3
DIgSILENT PowerFactory Harmonics Analysis
Advanced Options
Rated Fundamental Frequency Values (IEEE)
All values are rated on the basis of the fundamental frequency values
according to the IEEE standards.
Rated Total RMS-Values (DIN)
All values are rated on the basis of "true RMS''-values, according to the
DIN standards.
The harmonic analysis by frequency sweep is normally used for analyzing self and mutual
network impedances.
But not only self- and mutual-impedances can be analyzed and shown. The available volt-
age source models allow the definition of any spectral density function. Hence, impulse
or step responses of any variable can be calculated in the frequency domain. Especially
the analysis of series resonance problems is a very common application.
The following sections describe the different options available in the harmonic frequency
sweep.
16 - 4
DIgSILENT PowerFactory Harmonics Analysis
Impedance Calculation
The frequency sweep will be performed for the frequency range from "Start Frequency''
to the "Stop Frequency'', with the given "Step Size''.
An option is available for allowing an adaptive step size. Enabling this option will normally
speed up the calculation, and enhancing the results by using a smaller step size where
more detail is needed. The settings for the step size adaptation can be changed on the
"Advanced Options'' page.
16 - 5
DIgSILENT PowerFactory Harmonics Analysis
The filter analysis report generator can be activated with the icon or by using the out-
put icon in the main menu (see also 27.2.7 (Output of Results)). This will open the
same dialogue for the report of the harmonic results, shown in the figure 16.3.
In the dialogue the output frequency, specified in the harmonic load-flow command, is
shown. There are four different reports to be chosen:
Busbars and Branches
This option displays the results of the harmonic load-flow for all node
and branch element in the network. The distortion for various electrical
variables is printed and summarized.
Busbars/Terminals
For the electrical nodes the rated voltage, the voltage at the calculation
frequency as well as RMS values and distortion at the nodes is
displayed.
Filter Layout The filter layout of all active filters in the network are calculated for the
given frequency. The rated values and impedances of the filter as well
as type and vector group are printed to the output window.
Furthermore the currents through the different components and the
losses are shown.
Filter Results
The filter results show the main layout of all filters in the network for
the calculation frequency. For a set of frequencies the voltages and the
currents through the filter are shown in a table format.
16 - 6
DIgSILENT PowerFactory Harmonics Analysis
The default format used for the report in the output window is defined in Used Format
and can be set or changed by selecting the ''edit" button .
16 - 7
DIgSILENT PowerFactory Harmonics Analysis
The spectrum object is independent of the kind of harmonic source, which may be either
a voltage or a current source. The decision whether harmonic sources are fed into the
system as harmonic voltages or as harmonic currents is exclusively taken by the element
to which the spectrum type is associated.
16 - 8
DIgSILENT PowerFactory Harmonics Analysis
I ( fi )
Eqn 16.1: HD I ( f i ) = --------------
I ( f1 )
1- ⋅ I 2 2
Eqn 16.2: THD I = ------- RMS – I ( f 1 ) (Total Harmonic Distortion)
I ref
Eqn 16.3:
1 - ⋅ [ I – I ( f ) ] (Total Arithmetic Distortion)
TAD I = -------
I ref ΣA 1
where
I(fi) component of the current at frequency fi
Iref Reference value for the current
n
∑
2
Eqn 16.4: I RMS = I ( f i ) (Total RMS value)
i=1
n
Eqn 16.5: I ΣA = ∑ I ( f i ) (Arithmetic Sum value)
i=1
The reference value Iref depends on the standard used. The two possible options are the
calculation according to DIN (16.6) and according to IEEE (16.7).
Eqn 16.6: I ref, DIN = I RMS (DIN Standard)
16 - 9
DIgSILENT PowerFactory Harmonics Analysis
∆ϕ h ϕ1
Ih = kh ⋅ e ⋅ I1 ⋅ e
where
⎧
⎪ Ih ⁄ I1 if balanced
⎪
⎪ I ah ⁄ I a1 if unbalanced phase a
kh = ⎨
⎪ I bh ⁄ I b1 if unbalanced phase b
⎪
⎪ I ch ⁄ I c1 if unbalanced phase c
⎩
⎧
⎪ ϕh – ϕ1 if balanced
⎪
⎪ ϕ ah – ϕ a1 if unbalanced phase a
∆ϕ h = ⎨
⎪ ϕ bh – ϕ b1 if unbalanced phase b
⎪
⎪ ϕ ch – ϕ c1 if unbalanced phase c
⎩
The values at the fundamental frequency, I1 and ϕ1, are taken from a preceding load-flow
calculation. A normal load-flow calculation is therefore required prior to a harmonic load-
flow calculation.
In case of balanced systems in which only characteristic harmonics of orders 5, 7, 11, 13,
17, etc., occur, the option "Balanced/Unbalanced Sources'' should be set to "Balanced''.
In this context, "Balanced'' stands for characteristic harmonics. In the balanced case, the
harmonic frequencies are determined by the program, while in the unbalanced case, the
rated frequencies can be defined freely.
The user also can enter magnitude and phase angle of each harmonic component. In case
of harmonic sources which produce non-characteristic, unbalanced or inter-harmonics,
the option "Balanced/Unbalanced Sources'' has to be set to "Unbalanced''. For the "Un-
balanced'' case, harmonic frequency, magnitude and phase angle of each phase can be
chosen individually for each harmonic frequency. This mode thus covers every possible
kind of harmonic source.
A typical problem is how to represent a given harmonic content in a different but the na-
tive modal system (positive, negative or zero sequence system). The following example
should illustrate how to represent the 3rd harmonics in positive or negative sequence sys-
tem (and not in the native zero sequence system).
The phase shift between the three phases is in the symmetrical case:
A: 0°
B: -120°
C: +120° (-240°)
For Harmonics of n-th order:
A: 0°
16 - 10
DIgSILENT PowerFactory Harmonics Analysis
B: -n*120°
C: +n*120°
3rd Harmonic, for example:
A: 0°
B: -360°(= 0°)
C: +360° (=0°)
Consequently, 3rd harmonics in the ideally balanced case only in the zero sequence com-
ponent, as their native modal system. For representing 3rd harmonics (and multiples) in
the positive sequence, the following phase correction needs to be entered:
A: 0°
B: +(n-1)*120°
C: -(n-1)*120°
E.g. the third harmonic:
A: 0°
B: -360° + 240° = -120°
C: +360° - 240° = 120°
For the polynomial characteristic object, as depicted in the figure 16.6, the following for-
mula is used:
⎛ f h⎞ b
y ( f h ) = ( 1 – a ) + a ⋅ ⎜ ----⎟
⎝ f 1⎠
The parameters a and b are specified in the ChaPol dialogue. The unit of y is usually %
of the corresponding parameter specified in the input mask. For example, the resulting
line resistance is obtained by:
16 - 11
DIgSILENT PowerFactory Harmonics Analysis
R ( fh ) = R × y ( fh )
the figure 16.7 shows an example of the use of the polynomial characteristic for a line
type.
The following objects have frequency dependent parameters which may be defined by a
frequency characteristic:
TypLne Line Type
TypAsm Asynchronous Machine Type
TypSym Synchronous Machine Type
ElmShnt Shunt/Filter
16 - 12
DIgSILENT PowerFactory Harmonics Analysis
New result variables may also be added by pressing the icon "Edit Result Variable'' ( ).
This will bring the list of all variable sets which have been defined already. Each variable
set contains variables for a single object. See the figure 16.9 for an example. A new vari-
able set is defined by pressing the "New'' icon ( ).
16 - 13
DIgSILENT PowerFactory Harmonics Analysis
The variable set manager (IntMon) will open when a new variable set is created. The
variable set manager is used to define the variables in the set. The "Object'' reference in
the variable set manager must first be set to the object for which result variables are to
be added to the set. Secondly, the "Harmonic'' page has to be selected. This will show the
list of all results that are available for the selected object, for the harmonic analysis. See
the figure 16.10 for an example.
Result variables may be added or removed from the set of selected variables by pressing
the or buttons.
As the results of the discrete harmonic analysis are discrete, the plots made from the re-
sult file should have the "Bars'' option enabled in the Advanced page of the SubPlot def-
inition dialogue.
16 - 14
DIgSILENT PowerFactory Network Reduction
Chapter 17
Network Reduction
The typical application of network reduction is a project where a specific network has to
be analyzed but this network cannot be studied independent of a neighboring network of
the same or of a higher or lower voltage level. In this case it is one option to have both
networks modeled in detail for the calculation. There however may be situations when it
is not desirable to perform the studies with the complete model. This is the case for in-
stance when the calculation times would increase significantly or when the data of the
neighboring network should not be published in detail. In these cases it is good practise
to provide an representation of the neighboring network, which contains the interface
nodes (connection points) which may be connected by equivalent impedances and volt-
age sources.
The example configuration used in this chapter to illustrate the network reduction func-
tion is a transmission system as shown in the figure 17.1 feeding a distribution system as
shown in the figure 17.2. The distribution system is to be studied in detail, the transmis-
sion system only will be considered in its equivalent model. The distribution network is
fed by the two busbars "Bus 5'' and "Bus 6'' in the center of the transmission system.
17 - 1
DIgSILENT PowerFactory Network Reduction
17 - 2
DIgSILENT PowerFactory Network Reduction
17 - 3
DIgSILENT PowerFactory Network Reduction
17 - 4
Volume III
Optimization Tools
DIgSILENT PowerFactory
Version 13.2
DIgSILENT PowerFactory Optimal Power-Flow
Chapter 18
Optimal Power-Flow
18.1 General
The Optimal Power Flow module allows to optimize a certain objective function in a net-
work whilst fulfilling the load flow equations (equality equations) and a certain predefined
set of inequality equations. The OPF performs a non-linear optimization based on a state-
of-the-art interior-point algorithm. It has the following key features.
18.1.2 Controls
• Generator (ElmSym):
- Active Power
- Reactive Power
• 2-winding Transformer (ElmTr2):
- Tap Position (continuous or discrete)
• 3-winding Transformer (ElmTr3):
- HV-Tap Position (continuous or discrete)
- LV-Tap Position (continuous or discrete)
- MV-Tap Position (continuous or discrete)
• Shunt (ElmShnt):
- Number of steps (continuos or discrete)
18.1.3 Constraints
• Busbars and Terminals (StaBar, ElmTerm):
- Minimum Voltage
18 - 1
DIgSILENT PowerFactory Optimal Power-Flow
- Maximum Voltage
• Lines and Lineroutes (ElmLne, ElmLneroute):
- Maximum Loading
• 2- and 3-winding Transformer (ElmTr2, ElmTr3):
- Maximum Loading
- (Tap Position range, if corresponding tap is control parameter)
• Shunts (ElmShnt):
- (Controller Steps range, if switchable steps are control parameter)
• Generator (ElmSym):
- Minimum Active Power
- Maximum Active Power
- Minimum Reactive Power
- Maximum Reactive Power
• Secondary Controller (ElmSecctrl):
- Minimum Total Active Power
- Maximum Total Active Power
• Station Controller (ElmStactrl)
- Minimum Total Reactive Power
- Maximum Total Reactive Power
• Flexible OPF Constraint Object (ElmConstr) based on PQ-measurements (StaPqmea)
- Minimum Weighted Sum of Active Power Flows
- Maximum Weighted Sum of Active Power Flows
- Minimum Weighted Sum of Reactive Power Flows
- Maximum Weighted Sum of Reactive Power Flows
The setup of the individual control parameters and inequality constraints will be explained
in the following. We start the discussion by demonstrating the usage of the objective func-
tions.
18 - 2
DIgSILENT PowerFactory Optimal Power-Flow
18 - 3
DIgSILENT PowerFactory Optimal Power-Flow
In contrast to a synchronous machine, where the cost curve is directly expressed in $/h,
the cost curve of an external grid is defined by means of a tariff which holds within certain
intervals. Mathematically speaking, the cost curve of a synchronous machine is calculated
as the interpolation of predefined cost points, whereas the cost curve of an external grid
is a piece wise linear function with predefined slopes in each interval.
Note that this pizzerias linear function is not differentiable at the interval limits. Since non-
differentiable functions might cause problems in the optimization step, PowerFactory
slightly smoothens the cost function in a small range around the non-differentiable points.
The width of this range can be manipulated by the user through the “Smoothing Cost
Function” factor. A value of 0% corresponds to no smoothing of the curve at all, whereas
a value of 100% corresponds to full interpolation. The default value is 5%. It is recom-
mended not to change this value.
18 - 4
DIgSILENT PowerFactory Optimal Power-Flow
18 - 5
DIgSILENT PowerFactory Optimal Power-Flow
18.3 Controls
The user may specify which parameters might serve as potential degrees of freedom for
the OPF-algorithm, i.e., which parameters will contribute as controls. It is – independent
of the objective function – completely left to the user to decide which parameters will be
considered as optimization controls in the OPF. The set of potential controls can be
grouped into four categories:
1 Generator Active Power Dispatch.
2 Generator Reactive Power Dispatch.
3 Transformer Tap Positions (for 2- and 3-winding transformers).
4 Switchable Shunts.
Note that the scaling-factors of loads will only be taken into account for “Minimization of
Load Shedding”. In this case, all loads that allow load shedding are automatically used as
controls.
Synchronous Machines
A synchronous machine may contribute with two possible setpoints, namely active and
reactive power control (see figure 18.5).
18 - 6
DIgSILENT PowerFactory Optimal Power-Flow
18 - 7
DIgSILENT PowerFactory Optimal Power-Flow
Shunts
Similarly, for a shunt, its number of steps may serve either as a continuous or a discrete
optimization parameter (see figure 18.8).
For example, if, the MV-tap position of a 3-winding transformer is checked to be an OPF-
control the optimization algorithm will adjust it in such a way that it contributes best to
the objective function. On the other hand, if the user decides that this tap position shall
not be a control parameter, the OPF will calculate the correct tap position as specified in
the load flow settings. This could be, e.g., a fixed position, or adjusted by “automated tap
changing” in order to control the voltage of a certain node, or even be a slave that is ex-
ternally controlled by some other transformer tap.
18 - 8
DIgSILENT PowerFactory Optimal Power-Flow
18.4 Constraints
The user may “formulate” various inequality constraints on certain system parameters,
such that the OPF solution is required to stay strictly within these constraints. It is impor-
tant to note that – since all inequality constraints are considered to be “hard” – it may
happen that by imposing constraints which cannot be fulfilled the setting will disallow a
valid solution at all.
The handling of the constraints is very flexible and much like the way controls have to be
specified. Various categories of constraints do exist. A constraint is considered in the OPF
if and only if the individual constraint flag is checked in the element and the correspond-
ing global flag is enabled in the ComOpf dialogue. The distinct constraint categories are:
1 Branch flow limits (i.e., limits on the loading).
2 Voltage limits on busbars and terminals.
3 Active power limits of generators and active power sum limits of secondary
controllers.
4 Reactive power limits of generators and reactive power sum limits of station
controllers.
5 Constraint Objects: weighted sums of active and reactive power (ElmConstr).
The optimization uses further constraints that are automatically imposed as soon as the
corresponding parameter is used as a control. Such controls are tap position limits and
the number of steps for switchable shunts.
Fig. 18.10: Constraint on the loading of a line element (similar for line routes, 2- and
3-winding transformers)
18 - 9
DIgSILENT PowerFactory Optimal Power-Flow
18 - 10
DIgSILENT PowerFactory Optimal Power-Flow
Fig. 18.13: Total active power sum limit constraint of a secondary controller
Fig. 18.14: Total reactive power sum limit constraint of a station controller
18 - 11
DIgSILENT PowerFactory Optimal Power-Flow
str hosts three distinct StaPqmeas. The corresponding constraint equations that were
formulated in this constraint object would be:
P 1 + P 2 + P 3 ≤ 300 MW
P 1 + P 2 + P 3 ≥ 150 MW
Q 1 + Q 2 + Q 3 ≤ 200 Mvar
where P1,P2,P3 and Q1,Q2,Q3 are the active and reactive power flows measured by the
three StaPqmeas “PQ Export Line 1”, “PQ Export Line 2” and “PQ Export Line 3”. Figure
18.15 shows how this setting is entered in the ElmConstr dialogue.
In the example in figure 18.15 the active power sum over three lines (where the
StaPqmeas were located) is restricted from above by 300MW and from below by
150MW. In addition, the reactive power sum over these lines is constrained by 200 Mvar.
An OPF constraint object can hold any number of StaPqmeas, and thus cope with any
linear combination of active and reactive power sums in the network.
Observe that, in the special case, where n=1, with the help of constraint objects it is pos-
sible to limit the active and reactive power flow at any location in the network.
Moreover, the OPF constraints that can be set in the Secondary Controller, and in the Sta-
tion Controller, can also be seen as special cases of this flexible OPF constraint object.
In order to define an OPF constraint object (ElmConstr), the user needs to first of all de-
fine some StaPqmea objects (into the desired cubicles). The user should be aware that
the orientation of the StaPqmea needs to be set properly. In a second step, a set of
StaPqmeas should be selected in the browser. Select “Define…/OPF Constraint...” in the
18 - 12
DIgSILENT PowerFactory Optimal Power-Flow
context menu of the selection. Then the ElmConstr dialogue will pop (see figure 18.16),
so that upper and lower limits and weighting factors can be edited. By clicking OK, the
OPF constraint object will be stored into the grid folder and, hence, will be considered in
the OPF optimization step.
Fig. 18.16: Defining an OPF constraint object ElmConst for a predefined set off
StaPqmeas
18 - 13
DIgSILENT PowerFactory Optimal Power-Flow
Fig. 18.17: Global control and constraint parameters on the optimal power flow
dialogue
18 - 14
DIgSILENT PowerFactory Optimal Power-Flow
min = f ( x ) – µ ⋅ ∑ log ( si )
i
where µ is the so-called penalty weighting factor. In order to change the contribution of
the penalty function:
f pen = ∑ log ( si )
i
to the overall minimization, the penalty weighting factor µ will be decreased from some
user-defined initial value µmax to some user-specified value µmin.
The smaller the minimum penalty weighting factor, the less the penalty for being close to
the constraint limits will be. This means, that a small minimum penalty weighting factor
will result in a solution that is close to the limiting constraint bounds (if necessary). On
the other hand, a smaller minimum penalty weighting factor will result in a higher number
of iterations necessary.
The parameters for adapting the penalty weighting factor can be adjusted on the Ad-
vanced Options page of the ComOpf dialogue (see figure 18.18). In addition, the user
can specify a factor, by which the current penalty factor shall be divided from one iteration
to another.
Fig. 18.18: Settings for the adaptation of the penalty weighting factor in the ComOpf
dialogue
18 - 15
DIgSILENT PowerFactory Optimal Power-Flow
of the iteration, the following figures are displayed in the output window:
• The current error of the constraint nodal equations (in VA) (Err.Nodes).
• The current error of the constraint model equations (Err. ModelEqu).
• The current error of the inequality constraints (eInequ).
• The current value of the gradient of the Lagrangian function (gradLagFunc).
• The current value of the Lagrangian function (LagFunc).
• The current value of the objective function f to be minimized (ObjFunc).
• The current value of the penalty function fpen (PenFunc).
• The current values of the relaxation Factors (Rlx1,Rlx2) for the primal and dual
variables.
• The current value of the penalty factor µ (PenFac).
18.5.3 Results
The presentation of the OPF results is integrated into the user interface. The solution of
the non-linear optimization in the OPF is available via the complete set of variables of the
conventional Load Flow calculations. It can be seen in the single line diagram of the grid
or through the browser. The inclusion of the following variables in the Flexible Data Tab
in the browser is suggested for synchronous machines and grids to observe the results.
Synchronous machines:
• Active Power (P:bus1)
• Reactive Power (Q:bus1)
• Apparent Power (S:bus1)
• Voltage Magnitude (u:bus1)
Grids:
• Total Production Cost, including costs through external grids (c_disp)
• Generation Fuel Costs (cst_gen)
• Losses (LossP)
• Active Power Generation (GenP)
• Reactive Power Generation (GenQ)
Besides theses specialized results the complete set of variables of conventional Load-Flow
calculations is available for particular user needs. The production costs are expressed in
18 - 16
DIgSILENT PowerFactory Optimal Power-Flow
the same units utilized in the production cost tables of the generator elements.
Also a text report is available. It can be activated using the icon and offers various
templates for detailed result documentation.
18.6.1 Initialization
The non-linear optimization requires an initialization step to generate an initial starting
configuration.
Load Flow
Specifies the settings of the load flow command which is taken for initialization in case no
flat start is used.
∑
T
L ( x, s, λ ) = f ( x ) – µ ⋅ log ( s i ) + ( λ ) ⋅ [ g ( x ) + h ( x ) + s ]
i
18 - 17
DIgSILENT PowerFactory Optimal Power-Flow
2 All load flow constraint equations g(x)=0 are fulfilled to a predefined degree of
exactness, which means:
- all nodal equations are fulfilled.
- all model equations are fulfilled.
3 The Lagrange function L itself converges. This can be achieved if
- either the objective function itself converges to a stationary point, or the gradient
of the objective function converges to zero.
The following parameters serve to adjust these stopping criteria.The user unfamiliar with
the underlying optimization algorithm is urged to use the default settings here.
18 - 18
DIgSILENT PowerFactory State Estimation
Chapter 19
State Estimation
The State Estimator (SE) function of PowerFactory provides consistent load flow re-
sults for an entire power system, based on real time measurements, manually entered
data and the network model. Before any further analysis, such as contingency analy-
sis, security checks etc. can be carried out, the present state of a power system must
be estimated from available measurements. The measurement types that are pro-
cessed by the PowerFactory State Estimator are:
• Active Power Branch Flow
• Reactive Power Branch Flow
• Branch Current (Magnitude)
• Bus Bar Voltage (Magnitude)
• Breaker Status
• Transformer Tap Position
Unfortunately, these measurements are usually noisy and some data might even be
totally wrong. On the other hand, there are usually more data available than abso-
lutely necessary and it is possible to profit by redundant measurements for improving
the accuracy of the estimated network state.
The states that can be estimated by the State Estimator on the base of the given mea-
surements vary for different elements in the network:
• Loads
- Active Power, and/or
- Reactive Power, or
- Scaling Factor, as an alternative
• Synchronous Machines
- Active Power, and/or
- Reactive Power
• Asynchronous Machines
- Active Power
• Static var System
- Reactive Power
• 2- and 3-winding transformers
- Tap Positions (for all but one taps).
19 - 1
DIgSILENT PowerFactory State Estimation
n
∑ wi ⋅ calVali ( x ) – meaVali
2
f(x) =
i=1
The state vector x contains all voltage magnitudes, voltage angles and also all vari-
ables to be estimated, such as active and reactive power injections at all bus bars.
Because more accurate measurements should have a higher influence to the final re-
sults than less accurate measurements, every measurement error is weighted with a
weighting factor w i to the standard deviation of the corresponding measurement
device (+transmission channels, etc.).
In this setting, the goal of a state estimator is to minimize the above given function f un-
der the side constraints that all load flow equations are fulfilled.
19 - 2
DIgSILENT PowerFactory State Estimation
Preprocessing
Plausibility Check
Eliminate Errornous
Measurements
E lim in a te B a d M e a s u re m e n ts
“Repair” Unobservability”
State Estimation
(non-linear Optimization)
OK
Fig. 19.1: Scheme of the PowerFactory state estimator algorithm
The Plausibility Check is sought to detect and separate out, in a second phase, all mea-
surements with some apparent error. PowerFactory provides various test criteria for
that phase of the algorithm.
In a third phase, the network is checked for its Observability. Roughly speaking, a region
of the network is called observable, if the measurements in the system provide enough
(non-redundant) information to estimate the state of that part of the network.
Finally, the State Estimation itself evaluates the state of the entire power system by solv-
ing the above mentioned non-linear optimization problem. PowerFactory provides var-
ious ways for copying with non-observable areas of the network.
In order to improve the quality of the result, observability analysis and state estimation
can be run in a loop. In this mode, at the end of each state estimation, the measurement
devices undergo a so-called ”Bad Data Detection”: the error of every measurement device
can be estimated by evaluating the difference between calculated and measured quantity.
Extremely distorted measurements (i.e. the estimated error is much larger than the stan-
dard deviation of the measurement device) are not considered in the subsequent itera-
tions. The process is repeated until no bad measurements are detected any more.
In the following, the distinct components of the PowerFactory state estimator are ex-
plained in detail.
19 - 3
DIgSILENT PowerFactory State Estimation
19 - 4
DIgSILENT PowerFactory State Estimation
tions) whether it is observable or not. It also subdivides all unobservable states into so-
called ”equivalence-classes”. Each equivalence-class has the property that it is observable
as a group, even though its members (i.e., the single states) cannot be observed. Each
group then can be handled individually for the subsequent state estimation.
Redundancy of measurements
Typically, an observable network is overdetermined in the sense that redundant measure-
ments exist, which—for the observability of the system—do not provide any further infor-
mation. During the Observability Analysis, PowerFactory determines redundant and
non-redundant measurements. Moreover, it subdivides all redundant measurements ac-
cording to their information content for the system’s observability status. In this sense,
PowerFactory is even able to calculate a redundancy level which then indicates how
much reserve the network measurements provide. This helps the system analyst to pre-
cisely identify weakly measured areas in the network.
It should be remarked that the non-linear optimization part of the State Estimator may
highly profit from these ”redundant” measurements; thus, redundant measurements will
not be neglected in the state estimation.
19 - 5
DIgSILENT PowerFactory State Estimation
19.3.1 Measurements
All measurements are defined by placing a so-called ”External Measurement Device” in-
side a cubicle. For this purpose, select the device in the single-line graphic and choose
from the context menu (right mouse button) ”New Devices” and then ”External Measure-
ments...” (see figure 19.2). Then, the new object dialogue pops up with a predefined list
of external measurements. Please select the desired measurement device among this list
(see figure 19.3).
19 - 6
DIgSILENT PowerFactory State Estimation
19 - 7
DIgSILENT PowerFactory State Estimation
The accuracy class and the rating are used for weighting the measurement element. In
19 - 8
DIgSILENT PowerFactory State Estimation
Current Measurements
The External I-measurement (Staextimea) plays a special role and slightly differs from
the External P- and Q-measurements (see figure 19.6): Besides specifying the measured
current magnitude (e:Imea), the user is asked to enter an assumed (or measured) value
for the power factor cosϕ (e:cosphi and e:pf_recapr).
Fig. 19.5: Second page ”Status” of the dialogue for an external P-measurement
Internally, the measured current magnitude is then additionally transformed into two fur-
ther measurements, namely an active and a reactive current. This is due to the fact that
current magnitude does not provide information on the direction of the flow, which — on
the other hand — is essential to avoid ambiguous solutions in the optimization.
In this sense, an external I-measurement may play the role of up to three measurements:
19 - 9
DIgSILENT PowerFactory State Estimation
Voltage Measurements
Voltage measurements (StaExvmea) need to be placed in cubicles as well. The measure-
ment point then is the adjacent terminal.
A voltage measurement basically has the same properties as a flow measurement, except,
for the rating, only a single value for the accuracy needs to be specified. The correspond-
ing internal reference is the nominal voltage of the terminal which serves as measurement
point.
19 - 10
DIgSILENT PowerFactory State Estimation
a) Click the icon , or select from the main menu ”Options User Settings”. Change
to the tab page ”Functions”. The window shown in figure 19.7 will appear.
b) Enable the Display Function ”State Estimator” as shown below.
c) Exit the window clicking the OK button.
With this display function enabled, a new tab called ”State Estimator” appears in the State
Estimator related elements of the grids in the activated project. The State Estimator data
19 - 11
DIgSILENT PowerFactory State Estimation
Loads
For each load (ElmLod), the user can specify whether its active and/or reactive power
shall be estimated by the state estimator. Alternatively, the state estimator is able to es-
timate the scaling factor (for a given P and Q injection). The specification which parame-
ter shall be estimated, is done by checking corresponding boxes on the ”State Estimator”
page of the load (see figure 19.8). When these options are disabled, the load is treated
as in the conventional load flow calculation during the execution of the SE.
Synchronous Machines
Similarly, for synchronous machines (ElmSym), the active and reactive power can be se-
lected as a control variable for being estimated by the state estimator. Again, the user will
find corresponding check boxes on the ”State Estimator” page of the element.
If the corresponding check box(es) are disabled, the synchronous machine behaves as in
the conventional load flow calculation.
Asynchronous Machines
For asynchronous machines (ElmAsm), the active power may serve as a state to be esti-
mated. Once again, the corresponding box has to be checked on the ”State Estimator”
page.
If the corresponding check box is disabled, the asynchronous machine behaves as in the
conventional load flow calculation.
19 - 12
DIgSILENT PowerFactory State Estimation
Transformers
In the 2-winding transformer elements (ElmTr2), the tap position can be specified as a
state to be estimated by the State Estimator (see figure 19.9). Tap positions will be esti-
mated in a continuous way (without paying attention to the given tap limits).
For 3-winding transformers, any two of the three possible tap positions (HV-, MV-, and
LV-side) can be selected for estimation (see figure 19.10).
The corresponding check boxes are found on the ”State Estimator” page of the transform-
ers. If the check box is disabled the State Estimator will treat the tap position of the trans-
formers as in the conventional load flow calculation.
19 - 13
DIgSILENT PowerFactory State Estimation
19.4 Running SE
The following steps should be performed to execute the State Estimator:
• Start from a case where the conventional power flow converges successfully.
19 - 14
DIgSILENT PowerFactory State Estimation
Preprocessing
The algorithm distinguishes between breaker- and tap position-measurements on the one
hand, and P-,Q-,I-, and V-measurements on the other hand. Breaker- and tap position-
measurements are handled in the preprocessing step, whereas the latter types are pro-
cessed in the subsequent parts or the state estimator.
Adapt breaker measurements
If this check box is marked, all measured breakers statuses will be set
to the corresponding measured signal values.
Adapt tap position measurements
If this check box is marked, all measured tap positions will be set to the
corresponding measured values.
Plausibility Check
The algorithm offers various kinds of plausibility checks to validate measurements. Each
measurement undergoes the checks selected by the user. If a measurement fails any of
the required tests, it will be marked as erroneous and will be neglected in all subsequent
steps. A complete error report can be obtained via the error status page of each measure-
ments (see section 19.5).
The following checks can be enabled by marking the corresponding check boxes.
Consistent active power flow direction at each branch
Checks for each passive branch, whether all connected P-
measurements comply with a consistent power flow direction. More
precisely, if some flow out of a passive element is measured while, at
the same time, no flow into the element is measured, then all P-
measurements connected to this element fail this test. For this check, a
P-measurement is said to measure a ”non-zero” flow if the
measurement value is beyond a value of σ • rating , where σ and
rating are the accuracy and the rating, respectively, of the
measurement.
Branch losses exceed nominal values
Checks for each passive branch, whether the measured active power
loss exceeds the nominal loss of the branch by a factor of 1 + ε. This
check only applies to passive branches which have P-measurements
Pmea1 , . . . ,Pmear in each of its r connection devices. The threshold ε,
by which the nominal loss shall not be exceeded, is given by:
r
ε = ∑ σi ⋅ rating i , where σi and ratingi are the accuracy and the
i=1
rating, respectively, of measurement Pmeai.
Negative losses on passive branches
Checks for each passive branch, whether the measured active power
loss is negative, i.e., if a passive branch is measured to generate active
power. This check only applies to passive branches which have P-
measurements Pmea1 , . .. , Pmear in each of its r connection devices.
19 - 15
DIgSILENT PowerFactory State Estimation
Observability Analysis
The Observability Analysis is an optional component of the State Estimator. If activated,
it checks whether the specified network is observable, i.e., whether the remaining valid
P-, Q-, V-, and I-measurements (which successfully passed the plausibility checks) suffice
to estimate the selected P-, Q-, Scaling Factor-, and Tap position-states. In addition, the
Observability Analysis detects redundant measurements. Redundancy, in general, yields
more accurate results for the following state estimation.
Moreover, if the Observability Analysis detects non-observable states, upon user selec-
tion, it tries to fix this unobservability by introducing further pseudo-measurements.
Check for observability regions
If the corresponding check box is marked by the user, the execution of
the State Estimator will run the Observability Analysis (prior to the state
Estimation optimization).
Treatment of unobservable areas
In case of unobservable states, the user has different options to cope
with the situation:
Stop if unobservable regions exist. The algorithm terminates with
the detection of unobservable states. The Observability Analysis groups
all non-observable states into different ”equivalence classes”. Each
19 - 16
DIgSILENT PowerFactory State Estimation
19 - 17
DIgSILENT PowerFactory State Estimation
19 - 18
DIgSILENT PowerFactory State Estimation
Eqn 19.1:
calcVal – meaVal ≥ accuracy
--------------------------------------------- ---------------------
rating 100
where calVal and meaVal are the calculated value and the measured value, respective-
ly. The user may modify this definition by adjusting tolerance factors for bad measure-
ments. More precisely, a measurement is declared to be bad, if the left-hand side in
equation (19.1) exceeds facErr ⋅ accuracy ⁄ 100 . Here facErr > 0 is a factor which can
be specified by the user for each group of measurements individually. Use the factors
facErrP, facErrQ, facErrV, facErrIMagn, facErrIAct, and facErrIReact for
P-, Q-, V-measurements, and the three types of the I-measurements (magnitude mea-
sure, active current measure, reactive current measure).
Initialization
The non-linear optimization requires an initialization step to generate an initial starting
configuration.
Load Flow
Specifies the settings of the load flow command which is taken for initialization in case
no flat start is used.
19 - 19
DIgSILENT PowerFactory State Estimation
19 - 20
DIgSILENT PowerFactory State Estimation
Output
Two different levels of output during the iterative process can be selected.
19.5 Results
The presentation of the State Estimator results is integrated into the user interface. The
solution of the non-linear optimization in the State Estimator is available via the complete
set of variables of the conventional Load Flow calculations. It can be seen in the single
line diagram of the grid or through the browser.
19 - 21
DIgSILENT PowerFactory State Estimation
Deviations
Each branch flow measurement (StaExtpmea, StaExtqmea) and each voltage mea-
surement (StaExtvmea) offers parameters to view its individual deviation between mea-
sured value and computed value by the State Estimation. The corresponding variables
are:
• e:Xmea: measured value as entered in StaExt*mea
• e:cMeaVal: measured value (including multiplier)
• e:Xcal: calculated value
• e:Xdif: deviation in % (based on given rating as reference value)
• e:Xdif_mea: deviation in % (based on the measured value as reference value)
• e:Xdif_abs: absolute deviation in the measurement’s unit
Here X is a placeholder for P, Q, or U in the case of a P-, Q-, or V-measurement.
Recall that a StaExtimea plays a special role, since a current measurement may serve
as up to three measurements (for magnitude, for active current, and/or for reactive cur-
rent). Hence, a current measurement has the above listed variables (with X being re-
placed by I) for each of the three measurement types. In order to distinguish between
the three types, for a StaExtimea, the variables carry the suffixes Magn (for magnitude
measurement), Act (for active current measurement), and React (for reactive current
measurement).
19 - 22
DIgSILENT PowerFactory State Estimation
Error Status
All measurements (StaExt*meas) which possibly participate in the Plausibility Checks,
the Observability Analysis, or the State Estimation provide a detailed error description
page (see figures 19.13 and 19.14) with the following information:
• General Errors:
- Is unneeded pseudo-measurement (e:errUnneededPseudo)
- Its input status disallows calculation, i.e., input status does not allow ”Read” or is
already marked as ”Wrong Measurement” (e:errStatus)
- Measurement is out of service (e:errOutOfService)
• Plausibility Check Errors:
- Fails test: Consistent active power flow direction at each side of branch
(e:errConsDir)
- Fails test: Large branch losses (e:errExcNomLoss)
- Fails test: Negative losses on passive branches (e:errNegLoss)
- Fails test: Large branch flows on open ended branches (e:errFlwIfOpn)
- Fails test: Branch loadings exceed nominal values (e:errExcNomLoading)
- Fails test: Node sum check for P (e:errNdSumP)
- Fails test: Node sum check for Q (e:errNdSumQ)
• Observability Analysis Errors:
- Measurement is considered to be redundant for observability of the network, i.e.,
observability is already guaranteed even without this measurement. Nevertheless
redundant measurements are used in the non-linear optimization since, in general,
they help to improve the result (e:errRedundant).
- For redundant measurements, also the redundancy level is indicated on this page
(e:RedundanceLevel). The higher the redundancy level, the more
measurements with a similar information content for the observability analysis
exist.
• State Estimation Errors:
- Measurement is detected to be bad, has been removed and was not considered in
last non-linear optimization loop (e:errBadData)
This detailed error description is encoded in the single parameter e:error that can be
found on the top of the error status page. Again, we have the convention that, for a
StaExtimea, the variables e:errRedundant, e:RedundanceLevel and e:errBad-
Data carry the suffixes Magn (for magnitude measurement), Act (for active current mea-
surement), and React (for reactive current measurement).
19 - 23
DIgSILENT PowerFactory State Estimation
Fig. 19.14: Detailed error description page for external current measurements
(StaExtimea).
For this purpose, the Observability Analysis uses the flags c:i{P,Q,Scale,Tap}ob-
sFlg for P-, Q-, Scaling factor-, and Tap-states, respectively. These parameters exist for
all elements which carry possible states (ElmLod, ElmAsm, ElmSym, ElmSvs, ElmTr2,
19 - 24
DIgSILENT PowerFactory State Estimation
Estimated States
The user selects to color states of a specific type (P-, Q-, Scaling factor-, or Tap position-
19 - 25
DIgSILENT PowerFactory State Estimation
states). Distinct colors for observable, unobservable, non-estimated states, and states
with unclear observability status can be chosen.
19 - 26
DIgSILENT PowerFactory Optimization Tools for Distribution Networks
Chapter 20
Optimization Tools for Distribution Networks
The objective of this chapter is to present the tools implemented in PowerFactory for
the optimization of distribution networks. By means of simple command edit dialogues it
is possible to calculate the optimal placement, type and size of capacitors in radial distri-
bution networks; the optimal separation points of meshed networks and the optimal type
of reinforcement cables and overhead lines. Each section introduces a different tool, pre-
senting a general description, the objective function, the optimization procedure and the
command dialogues.
20 - 1
DIgSILENT PowerFactory Optimization Tools for Distribution Networks
• Fictitious penalty cost for network nodes with a voltage outside the allowed band (see
figure 20.1).
Sensitivity Analysis
In this step test capacitors are installed at all busbars in the system and the effect of the
installation on the total annual system cost is evaluated. The size of the test capacitors
used to evaluate the cost benefit can be selected according to 4 different options:
• Minimum available capacitor size is used.
• Maximum available capacitor size is used.
• The capacitor size is determined by the peak reactive power requirements of the load.
• The capacitor size best fitting to the reactive energy consumption of the load is used.
20 - 2
DIgSILENT PowerFactory Optimization Tools for Distribution Networks
Feeder
Please select the feeder for which the optimum capacitor placement should be performed.
The feeder is a special PowerFactory element which has to be created before selecting
it in this dialogue (for information about feeders refer to 11.1 (Feeders and Feeder Ob-
jects)).
Optimization Level
The Optimization Level List offers 4 options:
• Remove previous solution - deletes any capacitors placed in the network during the
previous run of the optimization function
20 - 3
DIgSILENT PowerFactory Optimization Tools for Distribution Networks
• Sensitivity only: Performs the sensitivity analysis and shows the result in the text
output window, but does not place any capacitors
• Fix Capacitors: Optimizes the network for fix capacitors, that is capacitors without any
voltage control
• Switched Capacitors: Optimizes the network for switched capacitors performing
voltage control.
Sensitivity Analysis
• Min Shunt: the minimum available capacitor size is used
• Max. Shunt: the maximum available capacitor size is used
• Best fit to load: the capacitor size best fitting to the reactive energy consumption of
the load is used
• Depend on load: the capacitor size is determined by the reactive power requirements
of the load
Optimization Approach
• Gradient Search: Newton-Raphson-Optimization to detect local optimum
• Reactive Tabu Search: Tabu search to detect global optimum of reactive power
installation
Energy Cost
Energy cost applied (in specific cost per kWh).
20 - 4
DIgSILENT PowerFactory Optimization Tools for Distribution Networks
Different penalty cost apply for voltages within the allowed band and outside.
Available Capacitors
When pushing this button, the list appears with all capacitor types available for the opti-
mization. The recommended way of entering types to this list is by copy/paste from type
libraries.
20 - 5
DIgSILENT PowerFactory Optimization Tools for Distribution Networks
Time Vector
Vectorial Characteristic to describe the probability of each discrete loading level (in hrs/
yr). Further information on scales and vector characteristics is given in 10.1 (Character-
istics, Scales and Triggers) and 10.2 (Handling Scales and Characteristics).
20 - 6
DIgSILENT PowerFactory Optimization Tools for Distribution Networks
Candidate Buses
Percentage of all candidate buses from the sensitivity analysis that are used for the actual
optimization process.
20.1.5 Results
The last three tool-bar buttons give access to the optimization results.
20 - 7
DIgSILENT PowerFactory Optimization Tools for Distribution Networks
When pressing the icon , a list appears with all nodes named where capacitors are
listed.
This icon ( ) generates a report with the results of the sensitivity analysis and the final
optimization procedure.
The open tie optimization is started when selecting the general tools in the flexible
toolbar and pressing the icon for open tie-point optimization:
• Open-Tie-Optimization .
20 - 8
DIgSILENT PowerFactory Optimization Tools for Distribution Networks
Feeding points
The section of the network where the optimum open-tie points should be determined is
defined by a set of "feeding points".
Such feeding points can be
• External grids.
• The source-side switchbay of Lines (Overhead lines and cables).
• The source-side switchbay of transformers (if the complete transformer is selected,
the HV side is considered the feeding side).
• The combination of a busbar/terminal and a branch, in which case the feeding
direction towards the branch.
• A feeder object.
The feeding points are the positions where power is assumed to flow into the network.
Only meshes between the feeding points will be optimized. Meshes connecting points in
already optimized meshes are optimized also.
Update Database
If this box is unchecked, the proposals for opening disconnectors are listed in the output
report. If the box is checked, the status of the respective disconnectors is also modified
in the data of the network.
20 - 9
DIgSILENT PowerFactory Optimization Tools for Distribution Networks
Selection
The possible options are:
• Whole System: the complete system fed by the feeding points is radialized;
• One Grid: If the network is composed of several grids (e.g. transmission and
distribution), the grid to be optimized can be selected;
• User-defined: an user defined set is selected, the lines in this set are used for
radializing the network. The selection can be used to further limit the area which is to
be optimized. The first limitation is by defining feeding points. Only meshes for which
all elements are in the selection will be optimized.
Load-Flow Command
Reference to the load-flow settings used by the optimization.
Output On
If this box is checked, the result report is directly written to the message window.
Output
Reference to the configuration dialogue of the output available after termination of the
optimization routine.
The cable size optimization can be selected using the general tools and pressing the
icon for cable size optimization:
20 - 10
DIgSILENT PowerFactory Optimization Tools for Distribution Networks
appropriate type of conductor for cables and overhead lines. The penalty factor for
these lines therefore is fix and cannot be defined by the user.
Maximum voltage drop
Depending on the system topology, on the loads and on the length of the feeder, it
may not be possible to avoid voltage band violations of some nodes due to voltage
drop. This may be mitigated by the installation of a capacitor during a post-
processing optimization.
The specific penalty cost of the optimization therefore is a parameter that can be defined
by the user to weight the voltage loss against the line investments.
20 - 11
DIgSILENT PowerFactory Optimization Tools for Distribution Networks
Check Consistency
Additional plausibility check that can be performed for the final solution. Several
settings are possible:
Off No plausibility check performed
Sum of feeding cables >= sum of leaving cables
very strict condition
Smallest feeding cable >= biggest leaving cable
less strict criterion)
Voltage Profile
Criteria for dealing with voltage band violations.
Consider Voltage Profile
Flag to force that voltage band violations should be included into the
optimization of the line types.
Maximum Voltage Drop Limit value (in %)
to define the max. voltage drop admissible at the end of the feeder.
Output
Various output options for the optimization results are possible.
20 - 12
DIgSILENT PowerFactory Optimization Tools for Distribution Networks
Report
Only Proposed new types for cables and overhead lines are listed in a
report of pre-defined form
Automatic Type Replacement
If this option is selected, the Report will be generated and additionally
the network database will be update with the proposed types.
Report Format
Selection of the format of the generated report.
Voltage Profile
The voltage profile is treated as a constraint of the optimization process. A plane
with two slopes at the lower and upper limits adds penalty cost to the optimization
result in case of violations. The options are as follows:
Penalty Factor 1
Penalty cost for voltage drop lower or equal than admissible limit
defined on the basic parameter page (typically this value is set to 0).
Penalty Factor 2
Penalty cost for voltage drop higher than the admissible limit defined
on the basic parameter page. The value entered here describes the
weight of the voltage band limit in comparison to the investment cost
for the cable/OHL reinforcement.
Consistency Verification/Voltage Drop
Additional plausibility check that can be performed for the final solution if voltage
drop optimization is applied
Cross Section
Type selection for reducing the voltage drop is based on cable/OHL
cross section.
20 - 13
DIgSILENT PowerFactory Optimization Tools for Distribution Networks
Nominal Current
Type selection for reducing the voltage drop is based on rated current
of cable/OHL.
20 - 14
Volume IV
Reliability Analysis
DIgSILENT PowerFactory
Version 13.2
DIgSILENT PowerFactory Reliability Assessment Functions
Chapter 21
Reliability Assessment Functions
In general, the assessment of reliability indices for a power system network, or of parts
of a network, is the assessment of the ability of that network to provide the connected
customers with electric energy of sufficient availability, as one aspect of power quality.
Three different analysis functions are provided:
Contingency analysis:
The non-probabilistic (deterministic) assessment of failure effects
under given contingencies
Network reliability assessment:
The probabilistic assessment of interruptions during a future operation
period of the power system.
Voltage sag assessment:
The probabilistic assessment of the frequency and severity of voltage
sags during an operation period
Each of these calculation methods has it own typical applications. The contingency anal-
ysis can be used to determine power transfer margins or for detecting risk inherent in
loading conditions. Network reliability assessment is used to calculate expected interrup-
tion frequencies and annual interruptions cost, or to compare alternative network designs.
Voltage sag assessment is applied to determine the expected number of equipment trips
due to deep sags.
21 - 1
DIgSILENT PowerFactory Reliability Assessment Functions
selected elements.
The (n-k)-preparation command will prepare and start the outage simulation com-
mand (ComSimoutage) in the currently active study case. If the "Tools" section is not
Outage Level
n-1 This will create a single outage case for each selected object
n-2 This will additionally create outage cases for each unique combination of two
selected objects. The following types can be selected for the contingencies:
All objects stored by shortcuts in the preparation command itself
• Optionally all lines and cables
• Optionally all transformers
• Optionally all synchronous machines
The preparation command will issue a warning when more than 100 outage cases will be
generated.
When creating a new list of elements for the contingency evaluation, the previous content
of the list is overwritten, if existing. After execution the preparation command will pop-up
the outage simulation command.
Another possibility for setting up the list of elements for the contingency analysis is to
graphically select a group of elements and right-click on one element in the selection. Af-
terwards the menu option Calculate - Outage Simulation has to be selected. References
to the selected objects will then be stored in the preparation command automatically.
21 - 2
DIgSILENT PowerFactory Reliability Assessment Functions
Fig. 21.2: Basic Options of dialogue for starting the outage simulation
The outage simulation may also be controlled from a DPL script. Please see the DPL ref-
erence manual or the online help for interfacing methods. Based on the commands avail-
able user-defined reports may be generated.
The basic options for the outage simulation are shown in the figure 21.2. The meaning of
the options is the following:
Load flow command
Settings of the load-flow for the contingency analysis.
21 - 3
DIgSILENT PowerFactory Reliability Assessment Functions
Limits
Max. loading of edge element
Defines the loading level above which a warning is given in the contingency report.
Lower limit of allowed voltage
Minimum admissible voltage; lower voltage values lead to warnings.
Upper limit of allowed voltage
Maximum admissible voltage; higher voltage values lead to warnings.
Output
Print report for each contingency
If activated, the summary of the system behavior is printed out for each
contingency.
Print summary report
If activated, the summary of the system behavior with the outage distribution
factors, as described below, is printed out.
Output Data
Settings of the contingency report to be produced. Several templates are available
(see description of each report template below):
- Maximum circuit loading.
- Voltage ranges
- Overloaded circuits
- Voltage violations.
Besides the report for each contingency PowerFactory produces a summary of all cal-
culated contingencies and the effect on the system conditions. This summary evaluates
maximum loading, minimum and maximum voltage levels, and outage distribution factors
(ODF). The outage distribution factor is defined as
∆I ij
ODF ij, mn = ---------
I mn
where ∆I ij is the current change in branch i-j due to the outage of line m-n, Imn is the
pre-fault current in line m-n and all currents are single-base per-unit values (Inet).
The outage distribution factors are also calculated for generator outages, in which case
∆I ij
ODF ij, m = ---------
Im
is used, where ∆I ij is the current change due to the outage of generator m and Im is the
pre-fault current in that generator.
The outage simulation produces 4 types of reports:
In addition, a contingency report can be printed for each analyzed outage case.
The maximum loading report shows the highest loading found for all contingency cases,
for all branches. Additionally, the ODF for each branch, for the corresponding contingen-
cy. Multiple contingencies (i.e. with more than one outage) produce ODF's of zero. The
21 - 4
DIgSILENT PowerFactory Reliability Assessment Functions
contingency case for which the highest loading was found is given by number, and the
outaged objects are listed. The columns "Gen1'' and "Gen2'' show the first and second
synchronous generator on outage. The columns "Element...'' show the first, second, third,
etc. non-generator object on outage. The maximum loadings are sorted from high to low.
The voltage ranges report shows the highest and lowest voltage found for all contingency
cases, for all busbars and terminals. The outage case for both the highest as well as for
the lowest voltage are shown.
The overloaded circuit report shows all the outage cases for which a branch's loading ex-
ceeded the maximum loading. Additionally, the ODF for each branch, for the correspond-
ing contingency. Multiple contingencies (i.e. with more than one outage) produce ODF's
of zero. More than one contingency case may be shown for a single branch.
The voltage violations report shows all outages cases for which a node's voltage was out-
side the specified range. More than one contingency case may be shown for a single node.
The following options are available on the ''Advanced Options'' tab of the outage simula-
tion (figure 21.3):
Calculation Method
AC Load Flow Calculation
The contingency analysis uses an iterative AC load flow calculation to
calculate the power flow per case.
Sensitivity Method
The power flow per case is calculated based on the network
sensitivities. Each contingency case is formulated as a linear equation
system that forces the power flows in the interrupted components to be
zero.
21 - 5
DIgSILENT PowerFactory Reliability Assessment Functions
The outage cases are normally analyzed by the outage simulation command (ComSimo-
utage) in which they are stored. Each outage case however provides the functionality of
a command. Its interface dialogue is shown in the figures 21.4 and 21.5. Pressing the Ex-
ecute button will activate the outage simulation command to analyze this sole outage
case only. The situation at the end of the outage simulation, e.g. the grid topology includ-
21 - 6
DIgSILENT PowerFactory Reliability Assessment Functions
21 - 7
DIgSILENT PowerFactory Reliability Assessment Functions
• Synchronous generators
• Lines, line routes, line sections
• Transformers
• Loads, motors
If a line section is marked to be part of an outage case, the complete line is considered
to be out of service. Lines which have line routes are replaced by the first line route.
The outage of busbars/terminals is not supported. A single outage case, which takes out
all objects connected to the busbar/terminal can be used in stead.
• clicking the icon on the main toolbar to activate the reliability toolbar (when
needed)
21 - 8
DIgSILENT PowerFactory Reliability Assessment Functions
A reliability assessment will be started when the Execute button is pressed. The calcula-
tion time required for a reliability assessment can range from a few seconds for a small
network and only considering single-order contingencies to several hours for a large net-
work including also second-order faults. A running reliability assessment can be interrupt-
21 - 9
DIgSILENT PowerFactory Reliability Assessment Functions
21 - 10
DIgSILENT PowerFactory Reliability Assessment Functions
Transformers
Consideration of transformer outages.
Generators/External Grids
Consideration of power source outages.
Common Mode
Consideration of Common Mode Outages. These are groups of
elements which are in topological or functional vicinity. Therefore all
elements in this group may be affected by a single outage event.
Common Mode Outages are treated like single element failures.
Maintenance
Not only stochastic but also determined outages can be considered for
reliability evaluation. Determined outages are known in advance and
therefore counted separated from stochastic outages. Even if
determined outages will not lead to service interruptions themselves
they are weakening the structure of the grid and therefore should be
considered for complete reliability analyses.
Results
Perform Evaluation of Result File
When a reliability analysis is started all contingencies studied are
written to a database file. Typically the database file is analyzed in a
second step, where the contingencies may be filtered and the results
may be analyzed in detail. The re-evaluation of the existing database
content is started in this topic.
21 - 11
DIgSILENT PowerFactory Reliability Assessment Functions
21 - 12
DIgSILENT PowerFactory Reliability Assessment Functions
21 - 13
DIgSILENT PowerFactory Reliability Assessment Functions
The following advanced options are available (Please see the figure 21.8):
Results
This options allows to select the result element where the outcome of
the reliability evaluation should be stored. Normally PowerFactory will
create a result object within the present study case.
Output of Results
The user can choose between different forms of the summarizing
report which is printed out after terminating the reliability evaluation.
Colors for the 'Isolated Grids' Coloring Mode
The sequence of events during the FEA of a contingency can be
visualized. In this option the colors used for differentiating the areas for
re-supply can be selected.
21 - 14
DIgSILENT PowerFactory Reliability Assessment Functions
where i is the load point index, k is the contingency index, and frac_i,k is the
fraction of the load which is lost at load point i, for contingency k. For
unsupplied loads, or for loads that are shed completely, frac_i,k=1.0.
For loads that are shed only partly, 0.0 <= frac_i,k < 1.0.
∑
ACIF i ⋅ C i
SAIFI = ---------------------------------- , Unit: 1/C/a
∑ Ci
CAIFI =
∑ ACIF i ⋅ C i
- , Unit: 1/A/a
---------------------------------
∑ i A
SAIDI =
∑ ACIT i ⋅ C i
---------------------------------- , Unit: h/C/a
∑ i C
SAIDI
CAIDI = ----------------- , Unit: h
SAIFI
21 - 15
DIgSILENT PowerFactory Reliability Assessment Functions
∑
ACIT i ⋅ C i
ASUI = ----------------------------------
8760 ⋅ ∑ Ci
ASAI = 1 – ASUI
Where
Pd_i is the weighted average amount of power disconnected
Pr_i is the weighted average amount of power at risk
Ps_i is the weighted average amount of power shed at load point i.
21 - 16
DIgSILENT PowerFactory Reliability Assessment Functions
ENS
ACCI = ------------- in MWh/A/a
∑
Ai
21 - 17
DIgSILENT PowerFactory Reliability Assessment Functions
• clicking the icon on the main toolbar to activate the reliability toolbar (when not
already visible), then clicking the icon.
In both cases, the dialogue window of the voltage sag table command will open, as shown
in the figure 21.9 and the figure 21.10.
Basic Options.
Load selection
points to the set of load points. A load point can be defined by a busbar
or terminal, or by a load.
Short-circuit command
points to the short-circuit command that is used. The options for the
short-circuit type will be changed during the voltage sag calculation,
but other settings may be changed at will.
Results points to the result file that is filled with intermediate results.
Exposed area limit
is the minimum remaining voltage for the voltage sag calculation to
continue calculating short-circuits at busbars further away from the
selected load points. If short-circuits at all busbar at a certain distance
21 - 18
DIgSILENT PowerFactory Reliability Assessment Functions
away from all load points result in remaining voltages at the load points
higher than this limit, then no further short-circuit will be analyzed.
Advanced Options.
The advanced options page shows the various short-circuit types that can be analyzed by
the voltage sag assessment command. All components for which a failure model has been
defined, have only an overall short-circuit frequency. It is not possible to define various
frequencies of occurrence for single phase, two-phase or three-phase short-circuits inde-
pendently for each component. The relative frequency for each type of short-circuit is en-
tered for all components in a uniform way.
The procedure of the voltage sag analysis is in the way, that various faults at all relevant
busbars are simulated. It starts with the selected load-points, and proceeds to neighbor-
ing busbars until the remaining voltage at all load-points does not drop below the exposed
area limit. The remaining voltages and the short-circuit impedances for all load-points are
written to a result file.
After all relevant busbars have been analyzed, the sag table assessment continues by an-
alyzing short-circuits at the middle of all lines and cables that are connected between the
relevant busbars. Again, all remaining voltages and short-circuit impedances for all load-
points are written to the result file.
After the complete exposed area has been analyzed in this way, the result file contains
the values for Z_F1, Z_F2, Z_F0, Z_S1, Z_S2, Z_S0 and ura, uia, urb, uib, urc, uic for the
two ends of all relevant lines and cables and at their middle.
The written impedances are interpolated between the ends of a line and the middle with
a two-order polynomial. From them, and from the written remaining voltages, the various
source impedances are estimated. These estimated impedances are also interpolated be-
tween the ends and the middle.
The interpolated impedances are then used to estimate the remaining voltages in be-
21 - 19
DIgSILENT PowerFactory Reliability Assessment Functions
tween the ends and the middle of the lines or cables. This quadratic interpolation gives
very good results also for longer lines, and also for long parallel or even triple parallel
lines.
The main advantage is, of course, a substantial reduction of the calculation effort and an
increase of the overall calculation speed.
21 - 20
DIgSILENT PowerFactory Reliability Assessment Functions
Because there is no single definition of a voltage sag, the plot offers a selection of sag
definitions:
• Minimum of Line-Neutral Voltages
• Minimum of Line-Line Voltages
• Minimum of Line-Line and Line-Neutral Voltage
• Positive Sequence Voltage
Secondly, the x-variable against which the sag frequency will be shown has to be selected.
Possible x-variables are
• Remaining Voltage
• Nom. Voltage at Shc-Busbar
• Fault clearing time
• Short-Circuit Type
Additionally, the x-variable can be sub-divided according to a split-variable. Possible split
variables are
21 - 21
DIgSILENT PowerFactory Reliability Assessment Functions
• no split
• any of the possible x-variables
It is not allowed to select the same parameter for the x-variable and the split-variable.
An example of the resulting voltage sag plot, in accordance with the settings shown in the
figure 21.11 is shown in the figure 21.12.
The voltage sag plot always shows the annual frequency of occurrence on the y-axis.
The example plot shows a bar for each load point for each x-variable, which is the Re-
maining Voltage. All three loads seem to suffer either deep sags (remaining voltage less
than 0.4 p.u.), or very shallow sags, although the values for 0.8 p.u. are also significant.
Each bar is subdivided to the nominal voltage at SHC-Busbar. Apparently, the shallow
sags are cause by low voltage network, as well as the very deep sags. The high voltage
network seems to cause moderate voltage sags. This is cause by the fact that the low
voltage networks in this example are radially operated and the higher voltage networks
are meshed. More detailed information about a certain value in the voltage sag plot can
be obtained by pointing at a bar or part of a bar and holding the mouse to let the balloon
help pop up.
The Voltage Sag Plot dialogue offers a Report button, which cause the voltage sag plots
to be written to the output window. A table for each selected load point will be written in
accordance to the selected voltage sag definition, x-variable and split-variable. An exam-
ple of a voltage sag table is shown below. The reported voltage sag tables also show the
totals for each row and column.
DIgSI/info - 'Grid\TA2.ElmTerm'
col : Remaining Voltage (Volt.Sag) [p.u.]
row : Nom. Voltage at Shc-Busbar (Unom Shc) [kV]
val : Frequency of Shc (Sag Freq.) [1/a]
----------------------------------------------------------------------
| 0.20 0.50 0.60 0.80 0.85 0.90 0.95 1.00 |
-------|-------------------------------------------------------|------
10.0 | 1.56 0.94 0.00 0.00 0.00 0.00 2.25 6.75 | 11.50
50.0 | 1.45 1.52 0.00 0.83 0.09 0.12 1.08 5.57 | 10.66
150.0 | 3.50 2.32 1.67 0.00 0.00 0.00 0.00 0.00 | 7.50
380.0 | 0.00 1.25 0.00 1.25 0.00 0.00 0.00 0.00 | 2.50
-------|-------------------------------------------------------|------
| 6.52 6.04 1.67 2.08 0.09 0.12 3.33 12.32 | 32.16
----------------------------------------------------------------------
21 - 22
DIgSILENT PowerFactory Reliability Assessment Functions
System State
Generation
Failure Effect
Analysis
Statistical Evaluation
The basic calculation flow diagram is depicted in the figure 21.13. The failure models de-
scribe the way in which the system components may fail, how often they will fail and how
long it takes to repair them. The load models may consists of only a few possible load
demands, or may be based on precise load forecast and growth scenarios.
The combination of one or more simultaneous faults and a specific load condition is called
a 'system state'. The system state production module will use the failure and load models
to build a list of relevant system states. Each of these system states may have one or
more faults. It is the task of the FEA module to analyze the faulted system states by im-
itating the system reactions to these faults, given the current load demands. The FEA will
normally take the power system through a number of operational states which may in-
clude
• Fault clearance by tripping protection breakers
• Fault separation by opening separating switches
• Power restoration by closing normally open switches
• Overload alleviation by load transfer and load shedding
The basic task of the FEA functions is to find out if the system faults will lead to loads
interruptions and when such is the case, which loads will be interrupted for how long.
The results of the FEA are combined by the data that is provided by the system state pro-
21 - 23
DIgSILENT PowerFactory Reliability Assessment Functions
duction module to update the statistics. The system state data describes the expected fre-
quency of occurrence of the system state and its expected duration. The duration of these
system state should not be mistaken for the interruption duration. A system state with a
single line on outage, due to a short-circuit in that line for instance, will normally have a
duration equal to the time needed to repair that line. In case of a double feeder, however,
no loads may suffer an interruption at all. In the case that loads are interrupted by the
outage, the power may be restored by network reconfiguration (i.e by fault separation
and closing a back-stop switch). The interruption duration will then equal the restoration
time, and not the repair duration (=system state duration).
A R1 S2 R2 S3 R3 S4
A T1 T2 T3 T4 T5 T6 t
Fig. 21.14: Example of a monitored component state in time
The line A in this example fails at time T1 after which it is repaired and put back into ser-
vice at T2. It fails again at T3, is repaired again, etc. The repair durations R1=T2-T1,
R2=T4-T3, etc. are exaggerated in this example.
The repair durations are also called the "Time To Repair'' or "TTR''. The service durations
S1=T1, S2=T3-T2, etc. are called the "life-time'', "Time To Failure'' or "TTF''.
Both the TTR and the TTF are stochastic quantities. By gathering failure data about a
large group of similar appliances in the power system, statistical information about the
TTR and TTF, such as the mean value and the standard deviation, can be calculated. The
statistical information is then used to define a stochastic model.
There are many ways in which to define a stochastic model. The so-called "homogenous
Markov-model'' is a highly simplified but generally used model. A homogenous Markov
model with two states is defined by
• A constant failure rate lambda ('lambda')
• A constant repair rate mu ('mu')
these two parameters can be used to calculate the
• mean time to failure, TTF = 1/lambda
• mean time to repair, TTR = 1/mu
• availability, P = TTF/(TTF+TTR)
• unavailability Q, = TTR/(TTF+TTR)
21 - 24
DIgSILENT PowerFactory Reliability Assessment Functions
The availability gives the fraction of time during which the component is in service, the
unavailability the fraction of time during which it is in repair and P+Q = 1.0.
For example, if 7500 monitored transformers where to show 140 failures in 10 years time
during which a total of 7360 hours is spend repairing, then
140 1 1
λ = ---------------------- ⋅ --- = 0,0019 ⋅ ---
10 ⋅ 7500 a a
1
TTF = --- = 530a
λ
7360
TTR = ------------ ⋅ h = 52,6h = 0,006a
140
1 1
µ = ------------ = 167 ⋅ ---
TTR a
530
P = ---------------------------- = 0,99989
530 + 0,006
0,006
Q = ---------------------------- = 6 min
----------
530 + 0,006 a
These equations also introduce some of the units used in the reliability assessment:
• frequencies are normally expressed in [1/a] = "per annum'' = per year
• lifetimes are normally expressed in [a] = "annum''
• repair times are normally expressed in [h] = “hours”
• probabilities or expectancies are expressed as a fraction or as time per year ([h/a],
[min/a]).
Of course, it is also possible to define a homogenous Markov model with more than two
states. Such may be needed to distinguish between faults that can be repaired reasonably
fast, and faults that will require more time. Two repair states are then needed, each with
a different mean repair time.
A peculiarity of the homogenous Markov model is that it is completely memory-less. This
means that, if a preventive maintenance is performed to improve the reliability of a com-
ponent, it does not make any change if the last maintenance has been performed one
week or 5 years ago, or even if maintenance was performed at all. The probability for the
component to fail in the next period of time will be equal in all cases. Effects of changing
preventive maintenance can therefore not be calculated when using the homogenous
Markov model.
The same memory-less quality makes that all repairs will behave in the same way, apart
from their mean duration. And only mean durations can be determined when using ho-
mogenous Markov models. Interruption costs, however, may be dependent on the frac-
tion of repairs that take longer then a certain amount of time. A certain repair may take
2 hours on average, for example, but when compensation has to be paid for interruptions
longer than 3 hours, and when such long repairs occur in 20% of all cases, using the mean
duration alone will not produce correct results. A realistic assessment of interruption costs
is therefore not possible when using the homogenous Markov model.
All reliability assessment functions in DIgSILENT PowerFactory are therefore based on
21 - 25
DIgSILENT PowerFactory Reliability Assessment Functions
the "Weibull-Markov'' model (WM-model). This more advanced stochastic model has the
following features.
• It uses Weibull distributions for all stochastic durations. This distribution uses a shape
factor and a characteristic time. By setting the shape parameter "beta'' to 1.0, a
homogenous Markov model results.
• The Weibull-Markov model is therefore 100% backwards compatible with the
homogenous Markov model, and existing 'homogenous Markov data' may be used
directly without a need for conversion.
• It allows for addressing the effects of maintenance and ageing of equipment.
• It allows for a fast and correct calculation of interruption costs in all cases.
A Weibull-Markov model with three states is depicted in the figure 21.15.
Pr01
S1
λ1, β1
Pr10
Pr21
Pr02
Pr20 Pr12
S2
λ2, β2
This example shows all parameters needed for defining a Weibull-Markov model. If the
example model would describe the behavior of a generator, then
• State S 0 could describe the state with 100% capacity;
• State S 1 could describe a derated state with limited capacity;
• State S 2 could describe the repair state.
The parameters beta ('beta') and eta ('eta') are used to define the stochastic duration of
each state, i.e. the stochastic TTF (State S 0) or TTR (State S 2). The "Transition Proba-
bilities'' Prij define the probability of the generator to change to another state. The prob-
ability Pr01, for example, equals the fraction of failures where the generator is not tripped
but kept on line with derated capacity. The probability Pr02 equals the fraction of failures
that cause the generator to trip, and Pr01+Pr02=1.0 in this example.
In the example of the 7500 monitored transformers, a Weibull-Markov model would result
in
10 ⋅ 7500
η 0 = ---------------------- a = 530a
140
TTF = η 0 = 530a
21 - 26
DIgSILENT PowerFactory Reliability Assessment Functions
η 1 = 7360
------------ a = 0,006a = 52,6h
140
TTR = η 1 = 52,6h
β 0 = 1,0
β 1 = 1,0
The shape factors beta0 and beta1 where left at their default values as no data is available
for calculating them. The raw data, however, could be analyzed to get more realistic val-
ues.
21 - 27
DIgSILENT PowerFactory Reliability Assessment Functions
The bar failure model defines a failure frequency for the busbar itself and an additional
failure frequency for each connection to the busbar. The repair duration is independent
of the number of connections. The total failure frequency for a triple busbar system with
six feeders is for instance calculated as
F_tot = 3 * F_bar + 6 * F_connection [1/a]
which would add up to 0.24 per year for the shown failure model.
The bar or terminal elements will show the total failure frequency, outage expectancy and
mean outage duration at the reliability page. See the figure 21.17 for an example.
21 - 28
DIgSILENT PowerFactory Reliability Assessment Functions
The bar or terminal element may overrule the failure model that it receives through the
bar type by selecting an element model.
The line failure model uses a failure frequency or expectancy per unit length. The repair
duration is independent of the length. Both the time to failure and the repair duration
have a shape factor Beta. The outage expectancy equals the mean repair duration times
the failure frequency and is thus also defined as per 100 km length.
The actual failure frequency for a particular line or cable is calculated by using the length
of the line/cable. The used failure frequency, outage expectancy and mean outage dura-
tion are shown in the reliability page of the line/cable element, as depicted in the figure
21.19.
21 - 29
DIgSILENT PowerFactory Reliability Assessment Functions
The line or cable element may overrule the failure model that it receives through the line/
cable type by selecting an element model. All line and cable failures are assumed to occur
equally often for each position along the length of the line/cable. The line element page
offers an additional parameter to be defined:
Load Shedding/Power Restoration Constraints
Settings valid for emergency loading situations.
Max.Loading
This is the admissible loading during contingencies. Typically this value
depends on the thermal inertia of the element (cable or line) as this
emergency loading will only occur during a limited time. Reasonable
values may be 120% to 140%. If the loading of the element exceeds
this limit the reliability analysis will start shedding the load.
21 - 30
DIgSILENT PowerFactory Reliability Assessment Functions
The transformer failure model has a failure frequency or expectancy and a repair duration
distribution. Both the time to failure and the repair duration have a shape factor Beta. The
outage expectancy equals the mean repair duration times the failure frequency.
The used frequency, outage expectancy and mean outage duration are shown in the re-
liability page of the transformer element, as depicted in the figure 21.21. The transformer
21 - 31
DIgSILENT PowerFactory Reliability Assessment Functions
element may overrule the failure model that it receives through the transformer type. All
transformer failures are assumed to be active failures. Like the line element, the trans-
former element page also offers an additional parameter to be defined.
Load Shedding/Power Restoration Constraints
Settings valid for emergency loading situations.
Max.Loading Admissible loading during contingencies. This value for transformers
may be selected up to 140%.
The second step is to name the created states and to enter the capacity in each state.
The stochastic synchronous machine has the following state attributes:
• Relative Nominal Apparent Power percentage
• Machines On Outage
A fully available machine has
• Nominal Power = 100%
• Machines On Outage = 0
A fully unavailable machine has
• Nominal Power = 0%
A derated state can be defined by defining a nominal power less than 100%, or by setting
'Machines On outage' > 0. A nominal power or 50%, for example, will half the capacity
of all parallel machines, but all machines will remain running. A number of machines on
21 - 32
DIgSILENT PowerFactory Reliability Assessment Functions
outage larger than zero will also reduce the total capacity, but will also change the electric
properties because of less remaining machines running.
The definition of the Weibull-Markov model for the synchronous machine, i.e. the defini-
tion of the state duration matrix, transition probability matrix, or the transition rate matrix,
is described in section 21.7.5 (Defining a Stochastic Model for a Power Plant).
A failure model is selected for a synchronous machine by setting the "stochastic model''
reference on the reliability page of the synchronous machine, as depicted in the figure
21.23.
Each failure model may be used by more than one synchronous machine at the same
time. The synchronous machines that use the same failure model will nevertheless be-
have stochastically independent of each other.
21 - 33
DIgSILENT PowerFactory Reliability Assessment Functions
21 - 34
DIgSILENT PowerFactory Reliability Assessment Functions
When the transition rate matrix is changed, then the state duration matrix and the tran-
sition probability matrix are changed in turn. the figure 21.26 shows the failure model af-
ter the transition rates have been rounded.
21 - 35
DIgSILENT PowerFactory Reliability Assessment Functions
In addition to the transition rates, the Beta's of the state durations may be changed to
other than 1.0, thus creating a Weibull-Markov model from 'homogenous data'.
A Weibull-Markov model with all Beta's set to 1.0 will equal a standard homogenous Mark-
ov model, which is fully determined by its transition rates.
As soon as a Weibull-Markov model has been defined, all statistic parameters for each
state are calculated automatically:
• The state Probability, which is the long-term probability to find the element in the
state
• The state Frequency, which is the mean number of times per year the element enters
or leaves the state
• The state Expectancy, which is overall mean number of hours per year the element
spends in the state
• The Mean Time Between, which is the mean time between entering the state
These state statistics are shown, together with the duration distribution, on the "Graph''
page as depicted in the figure 21.27.
21.7.6 Maintenance
Maintenance is included in the reliability analysis by defining one or more maintenance
blocks. A maintenance block consists of
• A list of objects to maintain
• A maintenance schedule
21 - 36
DIgSILENT PowerFactory Reliability Assessment Functions
Al objects in the list of objects will be taken out of service for maintenance by this main-
tenance block together. See the figure 21.28 for an example.
The maintenance schedule is a list of deterministic moments in time for which the main-
tenance will start. For each planned maintenance, the duration must be given. See the
figure 21.29 for an example.
21 - 37
DIgSILENT PowerFactory Reliability Assessment Functions
21 - 38
DIgSILENT PowerFactory Reliability Assessment Functions
The basic page of the common mode model shows a list where all objects that are out-
aged by the common cause can be entered. The failure data is entered in the failure data
page. The example shows a common cause which outages two lines once every 5 years
on average, for an average of 52 hours. Common mode failure models can be defined for
lines or cables and for line or cable routes.
The common mode failures will not cancel the individual failure models, but will cause ad-
dition outages of all listed components at the same time.
Common mode failure models are created in the following way:
• In the database manager, open the grid folder in which the elements for which a
common mode failure is to be defined are located.
21 - 39
DIgSILENT PowerFactory Reliability Assessment Functions
Load Shedding/Transfer
Load Priority If load shedding is necessary this priority is used for discriminating the
more important loads from the less important loads. The higher the
priority value, the more important is the load.
Shedding Steps
Number of steps for load shedding. A value of e.g. 4 steps means that
the load can be shed in steps of 25 %. An infinite number of steps
means a load that can be shed exactly as required.
Transferable
This percentage indicates to which extent a load can be supplied by an
external source, e.g. a connection to a neighboring network which is
not shown in detail in the grid.
Alternative Supply Node
Node which delivers the transferred power. If this node is not given, it
is assumed that the transferred supply comes from outside the
modeled grid.
21 - 40
DIgSILENT PowerFactory Reliability Assessment Functions
Interruption costs functions are not interpolated in any way. The used interruption costs
for a certain interruption duration will remain constant in between durations. This means
that an interruption functions like
21 - 41
DIgSILENT PowerFactory Reliability Assessment Functions
30min → 7,5$
60min → 20,0$
180min → 80,5$
means
0min ≤ t < 30min → 0,0$
30min ≤ t < 60min → 7,5$
60min ≤ t < 180min → 20,0$
180min ≤ t → 80,5$
Selecting an interruption cost function for a particular load is done by setting the inter-
ruption costs reference on the reliability page of the load dialogue, as depicted in the fig-
ure 21.35. The type of interruption costs function must be set at the load element. Three
types of interruption cost functions can be used:
$/kW cost per interrupted power (kW), versus the interruption duration.
$/customer cost per interrupted customer, versus the interruption duration.
$ cost versus the interruption duration. The selected interruption cost
function will be interpreted according to the selected type.
21 - 42
DIgSILENT PowerFactory Reliability Assessment Functions
21 - 43
DIgSILENT PowerFactory Reliability Assessment Functions
Pre-Processing
- Load Curves First Fault Next Load
- Load Growth Contingency Clearance Demand
- Statistics Initialization
Fault Adjust
Separation Load-Flow
Power
Overload ?
Restoration N
Y
Worst-Case Optimize
AC Load-Flow Energy at Risk
More
Post-Processing
Next More - Load Point Indices
Contingency - System State Indices
- Reports
After the termination of the State Enumeration the analyzed cases are available for veri-
fication. An example can be found in the figures 21.37 and 21.39.
21 - 44
DIgSILENT PowerFactory Reliability Assessment Functions
21 - 45
DIgSILENT PowerFactory Reliability Assessment Functions
tion. The FEA function is a stand-alone function which can also be started separately.
Basically, a FEA analysis consists of 4 steps
• Fault clearance
• Fault isolation
• Power Restoration
• Overload alleviation
The failure effect analysis for the network assessment may be carried out with or without
overload alleviation. Overload alleviation is performed by calculating an AC load-flow,
searching for overloaded branches and performing load transfer and load shedding. Dis-
abling the overload alleviation for networks where overloads due to contingencies are not
expected to occur may speed up the calculations considerably.
The failure effect analyses will be performed for each contingency, for each characteristic
load point and for each year or load growth.
The general sequence of actions is illustrated in figure 21.39. For each of the system
states, one or more failures are present in the system. All failures are assumed to be ac-
tive, i.e. they will cause an intervention by the protection system. The system is assumed
to react to these short-circuits by the immediate opening of one or more protection
switches (breaker B2), followed by manual or automated separation of the faulted equip-
ment (disconnectors D2A, D2B) and the restoration of power to the remaining part of the
protected area (restoration switch R12).
B1
R12
F2
B2 D2A D2B
21 - 46
DIgSILENT PowerFactory Reliability Assessment Functions
At fault clearance, a topological search is started at all faulted components. This search
will find the smallest network area around each faulted component which is confined by
protection breakers only. This smallest area will be isolated from the rest of the network
if these protection breakers are opened. This set of protection breakers is further reduced
by regarding only those breakers which would actually interrupt a fault current. Breakers
further down a feeder past the fault position, i.e. breakers that would not see a fault cur-
rent, will not be opened.
The fault clearance phase is ended by opening the found minimum set of protection
breakers. If it is found impossible to isolate the faulted component from all synchronous
generators or external networks by protection breakers only, then an error message will
be written and the reliability assessment will terminate.
The area around the faulted components which is isolated by the protection breakers is
called the "protected area''. The figure 21.41 shows the example network after the fault
clearance functions have opened the protection breaker. The protected area is the whole
bottom line feeder, and load 1, 2, and 3 are interrupted.
21 - 47
DIgSILENT PowerFactory Reliability Assessment Functions
phase. The fault separation phase starts a topological search at the faulted components
for the smallest area around these components which is confined by separating breakers.
This smallest area will be isolated from the remaining network by opening these separat-
ing switches. Either all closed switches qualify for separator, or only those switches which
have been marked as 'use for fault separation', when the option "Only use marked sepa-
rating switches'' was enabled in the reliability command dialogue.
The result of the search for the separation switches is a set of separating switches which
will, when opened, isolate the smallest possible area around the faulted elements from
the rest of the network. This area is called the "separated area''. The separated area is
smaller than or equal to the protected area. It will never extend beyond the protected
area.
The area between the protected and the separated area is called the "restorable area''
because, principally, power may be restored to those areas. the figure 21.42 shows the
example network with the opened separation switches. The separated area now only con-
tains the faulted line route. Two restorable areas result from the fault separation; the area
which contains load 1, and the area which contains load 2 and 3. Power to load 1 is re-
stored by (re)closing the protection breaker. The left-most separation switch is remote
controlled and has a switching time of 3 minutes. The protection breaker is also remote
controlled, and load 1 is therefore restored in 3 minutes (=0.05 hours). Load 2 and 3 are
still to be restored.
21 - 48
DIgSILENT PowerFactory Reliability Assessment Functions
All loads and busbars in a separated area are considered to be interrupted for the duration
of the repair, which normally is in the order of hours. All loads and busbars in a restored
area are considered to be interrupted for the time needed to open all separators and to
close all power restoration switches. Each switch can be given an individual actuation
time. Effects of automation and remote control can thus be analyzed by lowering the ac-
tuation times for the remote controlled switches.
In order to enhance the transparency of the network reliability assessment, the system
reaction to user selected faults can be made visible in the single line graphs. The different
areas and the protection, separation and restoration switches will be colored differently.
This gives a quick insight in the possible impact of certain faults or fault combinations.
21 - 49
DIgSILENT PowerFactory Reliability Assessment Functions
21 - 50
DIgSILENT PowerFactory Reliability Assessment Functions
The priority load shedding is performed after the power at risk has been determined. The
priority optimal load shedding considers the load priorities defined for each load. The
overload alleviation functions will use the load sensitivity indices to calculate the lowest
possible shedding priority in such a way that when all loads which have equal or lower
priority would be shed, then all overloads would be alleviated. From this, it is clear that
loads with higher priorities are not needed to alleviate the overloading. The priority load
shedding is performed by repeating the linear optimization for the lower priority loads
only. The figure 21.46 shows that when load 4 is set to a higher priority, load 2 is shed
in stead.
The discrete optimal load shedding is performed together with the priority load shedding.
Mixing discrete and priority load shedding does not require additional calculations. The
discrete load shedding scheme uses the fact that each load can only be shed in a fixed
amount of steps. The number of possible steps is entered at each load. The discrete shed-
ding scheme is calculated by transforming the linear optimization problem into a discrete
optimization problem. Solving this linear optimization problem results in a higher or equal
total shed power. The figure 21.47 shows the example network where all loads can only
be shed completely. As load 3 only demands 0.35 MW, and the overload is 0.53 MW, it
cannot contribute to overload alleviation. Shedding load 2 therefore leads to the minimum
amount of shed load.
21 - 51
DIgSILENT PowerFactory Reliability Assessment Functions
Lost load
A system load that is disconnected from the supply as a direct result of one or more sys-
tem failures by intervention of automatic protection devices. A system load cannot be lost
partly.
Shed load
A system load that is disconnected from the supply as result of one or more system fail-
ures by intervention of a system operator. A system load may be shed up to a certain
percentage.
Stochastic
A quantity is said to be stochastic when its value is random and thus unknown. The range
of possible values, however, is known as well as the likelihood of these possible values.
The number of eyes thrown with a dice is random, the possible outcomes are
{1,2,3,4,5,6} and the likelihood is frac16 for each outcome. For a continuous range of
possible outcomes, the likelihood is a continuous function, which is called the Probability
Density Function or "PDF''.
Statistic
Statistic calculation methods are used to analyze stochastic quantities (see Stochastic). A
simple example is the method for calculating a mean repair duration by dividing the total
time spend repairing by the number of repairs performed.
Information obtained by using statistic methods on measured data can be used to build
stochastic models of the observed equipment.
Outage
The removal of a primary component from the system.
21 - 52
DIgSILENT PowerFactory Reliability Assessment Functions
Forced Outage
The unplanned removal of a primary component from the system due to one or more fail-
ures in the system. A failure does not have lead to lead to an outage, for instance the
failure of a transformer tap changer.
Scheduled Outage
The planned removal of a primary component from the system.
Maintenance
The planned removal of one or more primary components from the system.
Spare Unit
A reserve component, not connected to the system, which may be used as a replacement
for a component on outage by switching or replacing.
Failure
The event in which a component does not operate as intended or stops operating as in-
tended. An example of the first kind is a circuit breaker that fails to strip, an example of
the second kind is a transformer that is tripped by its Buchholz relay.
Hidden Failure
An undetected change of a component which will lead to the failure of the component the
next time it is required to operate, unless it is inspected and repaired first.
Active Failure
A failure of a component which activates the automatic protection system. Active failures
are always associated by short-circuits.
Passive Failure
A failure of a component which does not activate the automatic protection system.
Repair
The restoration of the functionality of a component, either by replacing the component or
by repairing it.
Interruption
An unplanned zero-voltage situation at one or more load points due to outages in the sys-
tem.
21 - 53
DIgSILENT PowerFactory Reliability Assessment Functions
Contingency
The state of a system in which one or more primary components are on outage. The level
of a contingency is determined by the number of primary components on outage. A "k-
Level'' contingency is thus the state of a system in which exactly k primary components
are on outage.
Adequacy
The ability of the electrical power system to meet the load demands under various steady
state system conditions.
Security
The ability of the system to meet the loads demands during and after a transient or dy-
namic disturbance of the system.
Availability
The fraction of time a component is able to operate as intended, either expressed as real
fraction or as hours per year.
Redundant Unit
A component which outage will never lead to an interruption in the base state (see Base
State) which cannot be restored by normal switching actions (i.e normal network recon-
figuration) alone.
Base State
The state of the system were all components are able to operate as intended.
(n-1) system
A system for which all relevant components are redundant units (see Redundant Unit).
(n-k) system
A system for which the outage of any k or less components will never lead to an interrup-
tion which cannot be restored by normal switching actions (i.e normal network reconfig-
uration) alone.
Distribution Function
The distribution function for the stochastic quantity X equals the cumulative density func-
tion CDF(x).
CDF(x) = the probability of X to take a value smaller than x.
21 - 54
DIgSILENT PowerFactory Reliability Assessment Functions
21 - 55
DIgSILENT PowerFactory Reliability Assessment Functions
21 - 56
Volume V
Stability Analysis & Simulation of
Transients
DIgSILENT PowerFactory
Version 13.2
DIgSILENT PowerFactory Time-Domain Simulations
Chapter 22
Time-Domain Simulations
With the transient simulation functions of DIgSILENT PowerFactory the dynamic be-
havior of small systems up to large power systems can be analyzed in time domain. So it
is possible to model complex systems from industrial networks up to large transmission
grids in detail taking into account electrical as well as mechanical parameters.
Transients as well as stability and control problems in modern power systems constitute
important considerations during the planning, design and operation of these complex sys-
tems. The effects which are to be examined are for example electro-magnetic transients
and different aspects of stability in power systems. These can be analyses with Power-
Factory using different methods like various functions of time-domain simulations for
varying time periods as well as dynamic or small-signal stability analysis tools using e.g.
the powerful eigenvalue analysis.
There is a very large range of systems which can be analyses. For example it is easily
possible to analyze AC or DC systems (e.g. motor start-up, transmission systems with de-
tailed models of the power plants, complex HVDC systems) as well as a combination of
both. Also new study fields like wind-power or power electronics applications constitute
new challenges in the analysis of power systems and new models and techniques are pro-
vided to meet these requirements.
For modelling different machines and various controller units as well as the electrical and
mechanical parts of power plants, etc., there is the possibility of using a variety of pre-
defined models in the global library of PowerFactory. This model library includes various
models of generators, motors, controllers, motor driven machines, dynamic loads and
passive network elements. For example the IEEE standard models of controllers of power
plants can be found here. Furthermore specific models of controllers and block diagrams
of power plants can be modelled with a high degree of freedom.
22.1 Introduction
To study and analyses power system stability the behavior of power systems under con-
ditions before and after sudden changes in load or generation or during faults or outages
of elements have to be examined. The robustness of a system is defined by the ability of
the system to maintain stable operation under normal and perturbed conditions. There-
fore it is necessary to design and operate a power system so that transient events, e.g.
probable contingencies in the system, can be sustained without the loss of load or loss of
synchronism in the power system. Transients in electrical power systems can mainly be
divided into three time domains:
• short-term, or electromagnetical transients.
• mid-term, or electromechanical transients.
• long-term transients
22 - 1
DIgSILENT PowerFactory Time-Domain Simulations
Because of the sophisticated multilevel modelling of power-system elements and the use
of advanced algorithms, PowerFactory covers the whole range of transient phenomena
in electrical power systems. Consequently, there are three different simulation functions
available:
1 a basic function which uses a symmetrical steady-state (RMS) network model for
mid-term and long-term transients under balanced network conditions.
2 a three-phase function which uses a steady-state (RMS) network model for mid-
term and long-term transients under balanced and unbalanced network conditions
e.g. for analyzing the dynamic behavior after unsymmetrical faults.
3 an electromagnetic transient (EMT) simulation function using a dynamic network
model for electromagnetical and electromechanical transients under balanced and
unbalanced network conditions especially suited for analyzing short-term transients.
In addition to the time-domain calculations, two additional and more specific analysis
functions can be performed:
• Parameter Identification
• Modal Analysis or Eigenvalue Analysis
Based on the results of a valid load-flow calculation of the studied system, the Power-
Factory time-domain simulation functions determine the initial conditions of all power
system elements including all controller units and the mechanical parts of the system as
well. These initial conditions represent the equilibrium operation point at the beginning of
the simulation, fulfilling the requirements that the derivative of all state variables of loads,
machines, controllers, etc. are zero.
Before the start of the simulation process, it is also determined what type of network rep-
resentation must be used for further analysis, what step sizes to use, which events to han-
dle and where to store the results.
The simulation uses an iterative procedure to solve AC and DC network load-flow and dy-
namic model state variable integrations simultaneously. Non-linear and highly accurate
system models result in exact solutions also during high-amplitude transients. Various nu-
merical integration routines for the electromechanical systems (including voltage regula-
tors and power system stabilisers) and the hydro-mechanical or thermo-mechanical
models produce best results within a justifiable period of time.
The whole process of performing an transient simulation typically takes the following
steps:
1 Calculation of Initial Values, which includes a load-flow calculation.
2 Defining result variables and/or simulation events.
3 Optionally defining result graphs and/or other virtual instruments.
4 Run Simulation.
5 Creating additional result graphs / virtual instruments or editing existing ones.
6 Changing settings, repeating calculations.
7 Printing results.
22 - 2
DIgSILENT PowerFactory Time-Domain Simulations
• the symmetrical steady-state (RMS) network model for mid-term and long-term
transients under balanced network conditions.
• the three-phase steady-state (RMS) network model for mid-term and long-term
transients under balanced and unbalanced network conditions.
• the electromagnetic transient (EMT) simulation function using a dynamic network
model for electromagnetical and electromechanical transients under balanced and
unbalanced network conditions.
in the following sections these three analysis functions in the time domain are described
and the usage is explained in detail.
22 - 3
DIgSILENT PowerFactory Time-Domain Simulations
22 - 4
DIgSILENT PowerFactory Time-Domain Simulations
In the upcoming dialogue of the initial conditions command dialogue all simulation set-
tings are defined. Here the type of simulation (RMS or EMT, balanced or unbalanced) can
be chosen and different setting like the time steps are specified, which are important for
executing the simulation.
These settings include
Basic Options The simulation type is selected here (RMS vs. EMT, balanced vs.
unbalanced), and the load-flow command, the result object and the
event list are defined.
Step Sizes Maximum and minimum step size are specified for the available step
size algorithms.
Step Size Adaptation
enables the variable step size algorithm.
Advanced Options
including various error margins, iteration limits, damping factors, etc.
Noise Generation
defines parameters of the noise generation for stochastic applications.
22 - 5
DIgSILENT PowerFactory Time-Domain Simulations
22 - 6
DIgSILENT PowerFactory Time-Domain Simulations
All warnings or error messages should be checked carefully. Typical problems are devices
which are overloaded or operate above or below signal limitation from the beginning of
the simulation.
The error message displayed in the output window might look as follows:
DIgSI/err - Some models could not be initialized.
DIgSI/err - Please check the following models:
DIgSI/err - 'Simple Grid\AVR Common Model.ElmDsl':
DIgSI/err - Initial conditions not valid !
In addition to the Newton-Raphson based algorithm for the solution of "weak'' nonlinear-
ities as for example saturation effects in synchronous and asynchronous machines, the
EMT simulation function allows interrupts for the simulation of "strong'' nonlinearities as
for example switches, two-slope transformer saturation or thyristors. These interrupts can
also occur in between time steps.
In case of such an interrupt, all time dependent variables are interpolated to the instant
of interrupt and the simulation restarts at that point. This prevents numerical oscillations
and allows much a lower integration stepsize in case of power electronics devices.
The dynamic model equations of the voltage-controllers (vco) and the power system sta-
bilisers (pss) are solved simultaneously with the electrical generator and passive network
22 - 7
DIgSILENT PowerFactory Time-Domain Simulations
Note The simulation time can be very sensitive to some of the parame-
ters. For example when you increase the maximum time step the
duration of calculating transients may not always increase. If this
time step is increased over an "optimal'' time step the simulation
time may increase as well. So please observe the simulation time
and the results critically for different simulation parameters.
22 - 8
DIgSILENT PowerFactory Time-Domain Simulations
moment of time at which the event has occurred and restarts the simulation from there.
In case of heavy disturbances it can happen that a very large number of events occur
almost at the same time. Because this would extremely slow down the simulation,
PowerFactory executes all events that occur within a time interval of duration kres*dt-
min at the same time.
The all system variables are then interpolated to the point in time, when the event is tak-
ing place, and the simulation is started from there. A higher resolution factor decreases
the minimum time span between events. The typical value of 0.001 is normally sufficient.
If an event occurs, there are two different options of treating it:
• Calculation of v(t) and v(t+h) as usual. PowerFactory uses special numerical
methods for allowing this without numerical oscillations.
• Calculation of v(t) and v(t+), hence to values at the same time, one before the event
occurs, one after the event occurred. The second method is applied if the option Re-
initialize after events is enabled.
Further parameters can be changed to control the simulation algorithm.
22 - 9
DIgSILENT PowerFactory Time-Domain Simulations
Long-Term Stability
The PowerFactory simulation algorithm always uses A-stable numerical integration al-
gorithms. However, with regard to the solution of dynamic model equations and network
equations, the user can chose between two algorithms (the models are always the same):
• Relaxation Method: Mutual solution of Dynamic model equations and network
equations until convergence is reached: This algorithm is fast for small step sizes but
fails to converge when the step size is increased. Best choice for classical transient
stability applications.
• Simultaneous Solution of dynamic model equations and network equations. This
algorithm is (slightly) slower in case of small step sizes but converges much better in
case of large step sizes. Typical applications are longer term simulations, in which the
simulation step size is increased considerably after fast transients have decayed.
Another typical application are systems with power electronics. Even if power
electronics devices are usually equipped with very fast controls, the "long-term"
algorithm still allows reasonable step sizes, at which the relaxation method would fail.
Note A requirement for using the "long term" algorithm is that just
"true" input and output variables are used for exchanging informa-
tion between different models
22 - 10
DIgSILENT PowerFactory Time-Domain Simulations
short (e.g. 1ms), even if a stability model with steady-state equations for the electrical
network is used. Hence, using a classical integration algorithm would require to use step
sizes much below the smallest time constant of the system, otherwise it would be numer-
ically instable.
With the long-term algorithm, these systems can be analyses with reasonable step sizes.
Hence, the long-term algorithm can not described as using simplified models but as dif-
ferent type of numerical integration algorithm.
22 - 11
DIgSILENT PowerFactory Time-Domain Simulations
22 - 12
DIgSILENT PowerFactory Time-Domain Simulations
Such a result object reference is referring to the currently used result object. The down-
ward arrowed button is used to select, or reset the reference or to edit the contents of
the referenced result object.
The right-arrowed button is used to edit the result object itself. When editing the output
variables press this Edit button and then Contents to get access to the list of variables
stored inside the result object. This will pop up the corresponding ElmRes edit dialogue.
An easier way to edit the result object is to press the icon on the main toolbar, or to
select the Data −> Stability −> Result Variables option on the main menu. This will enable
the user to edit the contents of the currently selected Result object in the Initial Conditions
command dialogue. Result objects (ElmRes) are treated in detail in chapter 27.
To add variables of different elements to the result object for RMS and EMT simulations,
right-click on the preferred element in the graphic and select Define... and Variable Set
(Sim)... as shown in the figure 22.4.
Then this element is monitored during the simulation. The result object is automatically
opened. By double-clicking on the variable set the desired variables can then be se-
lected, see also section 27.2.1.
22 - 13
DIgSILENT PowerFactory Time-Domain Simulations
Note Most of the variables for RMS and EMT simulations are identical.
Nevertheless there may exist variables that are valid for EMT but
not for RMS calculations. It is advisable only to use variables for
the calculation you are performing.
22.5 Events
Besides the reference to a result object the simulation function needs a reference to an
event object to determine the simulation events. The default event object in PowerFac-
tory is Simulation Events and, like the result object, it is also stored inside the study
case.
External events are used in steady-state calculations (e.g. short-circuit calculations) as
well as for transient calculations (Simulations).
PowerFactory offers several kinds of events for time-domain simulations:
1 Control switch events (EvtSwitch)
2 Set parameter events (EvtParam)
3 Short-circuit events (EvtShc)
4 Intercircuit fault events (EvtShcll)
5 Events of synchronous machines (EvtSym)
6 Events of loads (EvtLod)
7 Outage of element (EvtOutage)
The different events are stored in the event object. The contents of the currently selected
Event Object, which can be found in the dialogue of the initial conditions command Com-
Inc, can be edited by using the right-arrowed (Edit) button and then the Contents but-
ton to get access to the event list stored inside the event object.
Easier the event object can be accessed from the main toolbar by pressing the icon.
A list of the currently defined events will be displayed including the set simulation time,
when the event will occur, and the related object. The figure 22.5 shows an example for
22 - 14
DIgSILENT PowerFactory Time-Domain Simulations
a set of events.
When creating a new event, use the icon in the toolbar of the Simulation Events
object. The kind of event can be chosen from the list in the dialogue. The events can also
be modified during a simulation by stopping the calculation, editing the events and con-
tinuing the simulation.
Another way of defining events is - when the initial conditions ( ) are calculated or the
simulation is already running - to double-click on the cubicles to create switching events
respectively to right-click on an element and then select a element related event such as
Define... −> Control Switch, Define... −> Event of Load or Define... −> Short-Circuit Event.
During a simulation all previous events, which already occurred, are displayed in a grey
font style and can't be changed anymore. When the simulation is finished or is stopped
manually, the events which are still to come in the simulation can be altered and new
events can be created as well.
Note At the end of a simulation the event list shows all the events, which
are now in a grey color. Thus they can't be modified again for this
simulation, because the simulation could be restarted from this
point on. To change the events for a new simulation you have first
to initialise the calculation again ( ), so the simulation time is set
back to the beginning.
22 - 15
DIgSILENT PowerFactory Time-Domain Simulations
22 - 16
DIgSILENT PowerFactory Time-Domain Simulations
When the initial values have been calculated successfully, the icon on the main tool-
bar will be activated and can be pressed to start the simulation.
The simulation is performed for the time interval between the start time defined in the
initial conditions command ComInc and stop time tstop, which can be specified in the
simulation dialogue. After a simulation has finished, it may be continued by pressing the
22 - 17
DIgSILENT PowerFactory Time-Domain Simulations
icon again and entering a new stop time. In the latter case, the stop time may also
be entered as relative to the current simulation time.
A running simulation may be interrupted by pressing the or the icon on the main
toolbar. Additional events can be created, while the simulation pauses and results may be
viewed. The simulation is then continued by pressing the icon again. Pausing and
continuing the simulation may be done as often as needed.
22 - 18
DIgSILENT PowerFactory Models for Stability Analysis
Chapter 23
Models for Stability Analysis
Stability analysis calculations are typically based on predefined system models. In the ma-
jority of cases the well known IEEE definitions for controllers, prime movers and other
associated devices and functions are in use.
For planning purposes, this approach might be acceptable. The predefined sets of param-
eters will allow a favorable and reasonable behavior of the analyzed system. This ap-
proach is often also applied for the purpose of operation analysis, and the system will
show a good response similar to the real system.
Also for systems and configurations for which no IEEE models exist, such as wind gener-
ators, HVDC-systems, etc., powerful tools for user defined modelling are required. For
such analysis, also individual and very exact models can be created in PowerFactory to
meet all needs of the system to be analyzed.
When manufacturers are able to supply exact controller models including the real param-
eters, the system model can be improved by not using the IEEE standard models but
building a new block diagram of the individual controller/mechanical system to represent
the device. This will enable to perform a highly accurate system modelling studies.
Especially utilities and consultants with an in-depth knowledge and tradition of conducting
system operation performance and optimization studies have a clear need for adequate
methods and tools for creating accurate transient models for stability analysis.
This includes complex operation analysis and special component planning problems. All
this led to the development of the highly flexible and accurate DIgSILENT PowerFac-
tory time-domain modelling features, which are introduced in this chapter.
23 - 1
DIgSILENT PowerFactory Models for Stability Analysis
domain modelling:
• The DSL block definitions, based on the "DIgSILENT Simulation Language"
(DSL), form the basic building blocks, to represent transfer functions and differential
equations for the more complex transient models.
• The built-in models and common models. The built-in models or elements are the
transient PowerFactory models for standard power system equipment, i.e. for
generators, motors, static VAr compensators, etc. The common models are based on
the DSL block definitions and are the front-end of the user-defined transient models.
• The composite models are based on composite frames and used to combine and
interconnect several elements (built-in models) and/or common models. The
composite frames enable the reuse of the basic structure of the composite model.
The relation between these models and the way that they are used is best described in
the following example.
Suppose the frequency deviations due to the sudden loss of a fully loaded 600 MW unit
in a particular network is to be analyzed. Depending on the network and the required de-
tail in the calculated results, such analysis may ask for a detailed modelling of the voltage
controllers, prime movers and primary controllers, or any other important equipment for
all large generators in the system.
PCU
Primary Controller Unit
23 - 2
DIgSILENT PowerFactory Models for Stability Analysis
ized transient models for each generator directly, with 'burned-in' parameter settings, and
to link these models to a generator without having to define a diagram first. This, how-
ever, would mean that one would have to create a new voltage controller, e.g. for each
generator in the system.
Often the design of many of these voltage controllers will be similar. To omit the need of
creating copies of these controllers for each generator and to avoid redundant copies of
controllers or also of whole generator models.
Here the same relationship between individual controller (Common Model) and controller
definition (Model Definition) respectively between the generic power plant diagram (Com-
posite Frame) and the individual power plant (Composite Model) is used, as the relation-
ship between element and type definition). DIgSILENT PowerFactory uses two key
objects in creating composite models, which can be compared to the element definition
of the different elements:
• The Common Model (ElmDsl) combines general time-domain models or model
equations (a block definition) with a set of parameter values and creates a integrated
time-domain model.
• The Composite Model (ElmComp) connects a set of time-domain models inside a
diagram (a composite frame) and creates a 'composite model'.
The following diagrams explain the relation between the Composite Model (which is using
a Frame as type) and the Common Model (based on a block diagram as type) in detail.
• The Composite Model (ElmComp), see figure 23.2, references a a definition of a
composite frame. This composite frame is basically a schematic diagram containing
various empty slots, in which controller or elements can be assigned. These slots are
then interconnected according to the diagram, see section 24.3.1 (Composite Block
Definitions). The slots in the composite frame are pre-configured for specific transient
models.
• The schematic diagram in the figure 23.3 shows a Composite Frame (BlkDef)
which has one slot for a synchronous machine, one for a primary controller unit (pcu
slot), and one for a voltage controller (vco slot). The composite model, which uses
this composite frame, shows a list of the available slots and the name of the slot. Now
the specific synchronous generator, voltage controller or primary controller unit model
can be inserted into these slots.
• The synchronous machine that is used in the Composite Model are called Built-In
Models, see figure 23.4. This means these elements are pre-configured elements
which do not need a specific model definition. Into the slots all kinds of elements can
be inserted, which are able to input or output variables, e.g. converters, busbars, etc.
• The voltage controller, and primary controller unit, however, are user-defined
Common Models, see figure 23.5. The 'front-end' of all user-defined transient
models is always such a common model (ElmDsl), which combines a model definition
with specific parameter settings. There are predefined definitions as well as the user
can define model definitions by himself.
• The common model has a reference to the Model Definition (BlkDef), which looks
similar to the composite frame (shown in figure 23.6). Here different blocks are
defined and connected together according to the diagram. The input and output
variables have to fit to the slot definition of the slot the model is defined to.
Not all slots of the composite model have to be used. There can also be empty slots. Then
the input of this slot is not used and the output will be assumed to be constant over the
complete simulation. The usage of composite models with its composite frame as well as
23 - 3
DIgSILENT PowerFactory Models for Stability Analysis
the common model with its block definitions are described in the next sections.
The design and creation of user defined common models using the "DIgSILENT Simu-
lation Language" (DSL) can be found in chapter 24 (User Defined (DSL) Models).
0
vco slot ve
0 0
upss ElmVco*
pss slot 1
ElmPss*
sym Slot
ElmSym*
pcu Slot pt
1 1
ElmPcu*
fe
G
~
G1 L1
23 - 4
DIgSILENT PowerFactory Models for Stability Analysis
usetp
o13
Emax
2
u - o12 yi PID Controller ve _{K/(1+sT)}_ uerrs
Ta,Tb,K1 Ke,Te
Emin
upss
3
23 - 5
DIgSILENT PowerFactory Models for Stability Analysis
A composite model element (ElmComp) can created by using the "New Object" ( )
icon in the toolbar of the database manager and selecting Composite Model. The next
step is to select the composite frame. The composite frame can either be stored in the
global or in the local library and can be compared to the type definition of the electrical
elements. The composite model then shows the list of slots in the composite frame as
shown in the figure 23.7.
Existing controllers or models can be assigned to a slot manually by right-clicking the slot
and selecting Select Element/Type, as depicted in the figure 23.7. A data manger window
will pop up and the user can then browse the grid for the element to insert into the se-
lected slot.
If inserting controller models into a slot often the controller element has not yet been cre-
ated. To create a new controller select New Element/Type from the context menu of the
slot. PowerFactory will automatically jump to the project library and show a list of avail-
able user defined models (ElmDsl).
Selecting a model definition form the project or the global library will open the element
dialogue of the newly created common model in order to define the parameters, similar
to e.g. a transformer element. If no suitable model is found, a block definition has to be
selected prior to setting the model parameters (see section 23.3 (The Composite Frame)
and the figure 23.6).
If a element is assigned to a slot, there is the possibility to edit the assigned element by
simply selecting Define... −> Edit Element/Type. The menu command Define... −> Reset
Element/Type will reset the slot, so it is empty again.
23 - 6
DIgSILENT PowerFactory Models for Stability Analysis
Note Depending on the settings of the individual slot the menu com-
mand Define... −> Reset Element/Type will not only clear the
marked slot but also delete the built-in or common model, if it is
stored inside the composite model in the data manager. These set-
tings are explained in the section 23.3 (The Composite Frame) in
more details.
A faster method for defining standard composite models is to right-click an object in the
single line diagram and selecting Define... from the context menu of the element.
When a standard composite model is available for the selected object, a list of the avail-
able controllers is shown. Selecting a controller will add it to the composite model, which
is automatically created when no composite model exists yet for the selected object.
Standard composite models are available for
• The synchronous motor and generator,
• The asynchronous motor and generator,
• The static VAr system.
23 - 7
DIgSILENT PowerFactory Models for Stability Analysis
Inside this folder a second folder with the name of the composite model, which is to be
tested, is created. Here the simple test grid can be found including only the generator,
the complete composite model and a load. Additionally there will be two new study cases
in which a step response for the AVR and the PCU respectively of the composite model
can be tested.
The user can change between the two study cases and your old cases by activating and
deactivating them.
Note There now doesn't exist any connection between the original and
the new elements of the composite model any more. So you can
change all settings of the controller without changing your net-
work.
After testing the controller, the folder "Step Response Test" can be deleted completely
without loss of information in the original network.
23 - 8
DIgSILENT PowerFactory Models for Stability Analysis
To create a new composite frame select the "Insert New Graphic" icon on the main
toolbar and then selecting Block/Frame Diagram and pressing Execute as shown in the
figure 23.10. This new block definition will then be automatically created in the local li-
brary.
An empty diagram of the frame will appear in the graphics window. A slot is then created
by selecting the icon in the graphics toolbox and positioning the slot on the drawing
surface by once clicking at the appropriate position. This is similar to placing elements in
the single line diagram.
An empty slot will be drawn on the page. To define the input and output signals and dif-
ferent parameters of the slot, edit the slot by double-clicking it. The slot edit dialogue will
pop up as depicted in the figure 23.11.
23 - 9
DIgSILENT PowerFactory Models for Stability Analysis
Limiting Signals
Also there is the possibility to enter 'limiting signals'. These signals are handled by
PowerFactory exactly like the normal input signals. The difference is only in the graph-
23 - 10
DIgSILENT PowerFactory Models for Stability Analysis
ical representation in the block diagram. These signals will be shown as inputs on the top
or bottom of the slot.
Class/Name Filter
Additionally there is the possibility to specify a filter for the class name and/or for the
model name to be inserted. This makes sense e.g. when only synchronous machines
should be assigned to the slot. Then for the class name ElmSym* has to be entered.
PowerFactory then will only allow the element class "synchronous machine'' to be in-
serted into the slot. A filter for a specific (part of an) element name can also be defined.
Classification
The classification options does only affect the external behavior of the slot.
Linear The slot representation in the frame diagram will be as a linear or non-
linear model.
Automatic, model will be created
When this option is activated, the function 'Slot Update' (see section
SlotUpdate) will automatically create a DSL model and ask for a block
definition from the library.
Local, Model must be stored inside
This option is activated by default. This means that when a Slot
Update is executed in the composite model, PowerFactory will only
search for elements, which are stored inside the ElmComp. A
reference to models, which are stored outside, i.e. like the synchronous
generator in a plant model, will be removed from the slot.
Not all input or output signals of built-in elements or common models have to be used
and defined in the slot. Also a slot may only have input or output signal.
For example the voltage or frequency of a AC voltage source ElmVac may be controlled
by an external function. So the slot for the source will only have two input signal u0 and
f0. More information about drawing composite frame diagrams can be found in 23.6
(Drawing Composite Block Diagrams and Composite Frames).
ble-clicking it and choose the "select" button for the "Block Definition" in the dialogue.
Now the block definition can be selected, e.g. the type of controller or built-in element,
which should be assigned to this slot later on.
For example if the new defined slot ought to represent a synchronous machine in the
frame diagram, a predefined block definition can be chosen to insert the input and output
signals to this slot available for the element ElmSym. A controller for example should only
assigning to a slot, when only this type of controller is to be inserted into this slot but no
other model.
23 - 11
DIgSILENT PowerFactory Models for Stability Analysis
Some predefined block definitions can be found in the global library in the path Library\
Models\ Built-in.
When the block definition is selected (in our example the ElmSym.BlkDef), the input
and output as well as limiting signals will disappear from the dialogue of the slot. The filter
for the class name will automatically be entered. When selecting the Ok button, the slot
will then show the right inputs and output of the block definition.
Note When a block definition is assigned directly to a slot, only the input/
output signals is set automatically. The internal equations/defini-
tions of the block definition are not implemented into the slot and
the slot itself remains empty. There is always the need to create a
common model, which is the inserted into slot of the composite
model. When the slot refers to an outside block definition, take
care that this reference is also inside your project. If the reference
to the definition is invalid or changed, the slot may be changed as
well. So use the option of assigning a block very carefully.
23 - 12
DIgSILENT PowerFactory Models for Stability Analysis
usetp
o13
Emax
2
u - o12 yi PID Controller ve _{K/(1+sT)}_ uerrs
Ta,Tb,K1 Ke,Te
Emin
upss
3
23 - 13
DIgSILENT PowerFactory Models for Stability Analysis
yi K o11 y2 K1/K2 yo
K1 Ta,Tb
o11(1..
o1
yi1 1/sT
Tb
-
yo(1)
To create a common model, use the "New Object" ( ) icon in the toolbar of the data
manager and select Common Model. The block/model definition has to be selected first.
Similar to the composite frame, this definition is either stored in the global or in the local
library.
The common model then displays the list of available parameters and arrays from the
block diagram, as shown in the figure 23.16. All parameters are listed on the first page of
the common model, and their values be specified there.
23 - 14
DIgSILENT PowerFactory Models for Stability Analysis
If the selected block definition uses one or more arrays in its definition, then these arrays
are displayed on the second page (for simple characteristics) and third page (for two-di-
mensional characteristics) of the ElmDsl object. In the figure 23.17 an example is shown
for a simple 2x2 array definition.
23 - 15
DIgSILENT PowerFactory Models for Stability Analysis
A block reference is created by using the icon in the graphics toolbox. This creates
an empty square which can then refer to any existing block definition in the library.
Note The composite frame and the model definition are very similar and
the usage is nearly identical. When creating one or the other Pow-
erFactory recognizes the class, when you place the first slot or
block. If you place a block ( ) first, the icon for the slot will
become inactive, so you can't mix up slots and block sin one dia-
gram. See also section 23.6 (Drawing Composite Block Diagrams
and Composite Frames).
If the block type is selected PowerFactory inserts all available parameters of the re-
ferred block. You may change the name of the parameter but make sure, the order of the
parameters is not changed. The order is important so the right parameter is assigned to
the parameters inside the block definition.
Signal lines are directed branches, connecting input and output signals. A single output
line may be branched off and connected to more than one input terminal.
23 - 16
DIgSILENT PowerFactory Models for Stability Analysis
After the block reference has been edited, the it will show the input, output and limiting
signal connection points of the referenced block definition as one or more colored dots on
the left and right side respectively on the upper and lower side of the box. Signal lines
may then be connected to these points. It is allowed to refer to the block definition more
than once in the same block diagram. In that way, it is possible to use a particular PID-
controller, for instance, twice or more in the same model definition.
An example of a simple block diagram, comprising a multiplier, a summation point and a
standard PI block, is shown in the figure 23.18.
When rebuilding a diagram, by pressing the icon, the DSL representation of the block
diagram is written to the output window. For the example block diagram in the figure
23.18, this results in
model o1 = 'MyBlock'(i1,i2;x1;Kp,Ti;yi)
s1 = '\System\Library\Models\DSL\PI.BlkDef'(xe;x1;Kp,Ti;yi)
xe = i1*i2
o1 = s1+i2+i1
This simple example shows the whole meaning of the block diagram graphics: it is a con-
venient way to define specific controllers, based on standard components.
However, it would also be possible to define exactly the same block diagram by entering
the above DSL script manually and so create a primitive block definition.
• by the icon "Insert new Graphic" on the toolbar of an opened graphic, and
selecting the option Block/Frame Diagram.
• by right-clicking a or inside a (library) folder in the active project in the data manager
and selecting New... −> Block/Frame - Diagram from the context menu.
23 - 17
DIgSILENT PowerFactory Models for Stability Analysis
• by using the "New Object" icon in the database manager and selecting Block
Definition (BlkDef).
Note The two later options only create a block definition object (BlkDef),
but no graphic. This method is therefore not suited to create a
composite block or frame diagram, but only for creating primitive
block definitions by entering the DSL code.
In the first two methods, a graphic will be created and will appear in the opened graphics
board. A new graphics board will be created when no graphics board is open. The new
block/frame diagram graphic will show a single rectangular block, which visualizes the
block or frame. The name of the new diagram will appear on top of the frame.
Inside this rectangle the following objects can be placed from the graphic toolbox for the
block diagram:
Node objects:
- block references
- summation points
- multipliers
- divisors
- switches
- different kinds of graphical objects
Branch objects:
- signals lines
Inside a frame diagram only the following elements are allowed:
Node objects:
- slots
- different kinds of graphical objects
Branch objects:
- signals lines
These objects can be selected from the Drawing Tool Box. The toolbox also has buttons
for pure graphical add-on objects (lines, polygons, rectangles, texts, etc.) as shown in the
figure 23.19.
23 - 18
DIgSILENT PowerFactory Models for Stability Analysis
Use the Select button (see the cursor in the figure 23.20) to select a model definition.
Predefined standard block diagrams for your usage are located in the folder DataBase\
Library\ Models.
23 - 19
DIgSILENT PowerFactory Models for Stability Analysis
Summation Point
Every dot can be used as an input to the summation point. The sign of signals at summa-
tion points can be changed by editing the summation point object. The "edit" dialogue will
pop up, where any connected input connection can be inverted. Mind that not all dots
have to be used and only one dot can be defined as an output.
Multiplier
Every grey dot of this block can be used as input or output of the multiplier. An output of
three input signals will thus be out=(in_0*in_1*in_2). Mind that not all dots have to be
used and only one dot can be defined as an output.
Divisor
Every grey dot of this block can be used as input or output for the divisor. The first input
will be the numerator and thus be divided by the second (and if existing the third) input.
The order of the signals will be clockwise beginning on the left. An output of three input
signals will then be out=(in_0/in_1/in_2). Mind that not all dots have to be used and only
one dot can be defined as an output.
Switch
Two input signals can be applied to this block, which will be connected to the output ac-
cording to the position of the switch. Additionally a control signal has to be connected to
the top, which will define the operation of the switch. If the control signal is zero or neg-
ative, the switch will stay in the displayed state, whereas a positive signal will cause the
switch to change to the upper signal and the other way round. In the edit dialogue the
zero position of the switch may be altered.
be connected with signal lines. After selecting the button from the graphical toolbox,
a signal line is drawn by first clicking on a 'from' node (output of a block/slot), optionally
clicking on the drawing surface to make a non-straight connection, and finally clicking on
a 'to' node (input to a block/slot). The input and output terminals of common blocks and
other node elements are depicted with colored dots (see the figure 23.21).
23 - 20
DIgSILENT PowerFactory Models for Stability Analysis
Green: Input
Red: Output
Blue: Min. Limitation
Pink: Max. Limitation
Gray: Every Signal can be connected
The signals lines can also be edited in the corresponding dialogue, which gives the pos-
sibility to change the name of the signal.
Multi-Signal Connections
Signals normally connect a single output parameter with a single input parameter. Espe-
cially in the case of three phase signals, such as is often the case of voltage or current
signals, multi-signal connections may be used.
A multi signal is defined by writing two or more signal names together, separated by semi-
colons, e.g "I_A;I_B;I_C''. In figures 23.22 and 23.23, the multi signal output and input
of two block definitions are shown. Both blocks will show a single input or output connec-
tion point. They can be connected to each other by a single signal line, as is shown in the
figure 23.24.
Note The number of variables and their order in the output signal must
23 - 21
DIgSILENT PowerFactory Models for Stability Analysis
Note The names of the input and output signals must equal the names
of the input and output signals defined in the slot/block, you intend
to assign the definition.
23.6.4 Resize
If a marked symbol has small black squares at its corners, it can be resized by left clicking
one of the squares, as can be seen in figure 23.25. The cursor will change to a double
diagonal arrow and moving it (while holding down the left mouse button) resizes the ob-
ject. Release the mouse when the new size is correct.
It is also possible to pull the object(s) to a new size by clicking at one side of the marking
box. The marked object(s) will only resize in one direction in that case. This is not possible
for all objects. Some objects may only be resized with a fixed X/Y- ratio, some other ob-
jects cannot be resized at all.
23 - 22
DIgSILENT PowerFactory Models for Stability Analysis
On the second page of the dialogue, which can be accessed by pressing the button,
information and equations for the initialisation of the block can/has to be entered. Also
the name and the unit of the parameters to be defined in the common model can be spec-
ified (see also chapter 24 (User Defined (DSL) Models)).
Additional DSL equations can be defined at the second page of the block diagram edit
dialogue.
23 - 23
DIgSILENT PowerFactory Models for Stability Analysis
23 - 24
DIgSILENT PowerFactory User Defined (DSL) Models
Chapter 24
User Defined (DSL) Models
System modeling for stability analysis purposes is one of the most critical issues in the
field of power system analysis. Depending on the implemented model accuracy, large sig-
nal validity, available system parameters and applied faults or tests, nearly any result
could be produced and arguments could be found for their justification.
A simple example may illustrate this fact. In a 10 GW power system the expected steady-
state frequency deviation when losing a fully loaded 2000 MW unit depends highly on the
frequency dependency K_f of loads. Assuming a total system droop of 7% and K_f to be
0, the steady-state frequency deviation will be 700 mHz approximately.
Now, with a more realistic coefficient of K_f = 5 %/Hz, the steady-state frequency devi-
ation is expected to be 596 mHz only. On the other hand, the frequency dependency
might be slightly higher or lower, but the nonlinear characteristics of hydro turbine effi-
ciencies and steam valve nonlinearities could be more relevant at a certain unit loading
point. Consequently, as long as only one or two different loading scenarios are consid-
ered, average values with reasonable simple models may give acceptable results by tun-
ing only some key parameters like the frequency dependency of loads or droop settings.
Thus system model structures and parameter settings are to be best evaluated against
the following main criteria:
System size Big systems and small system have different "key parameters''.
Referring to the above example, for a smaller power system the
frequency dependency of loads is not relevant at all, whilst in big
systems like UCTE or UPS/IPS, frequency dependency may cover the
spinning reserve requirements totally.
Unit size Steady-state and transient behavior of big units are more decisive for
the overall system response than smaller ones which might practically
not affect the total system.
System structure
Independent of system and unit size, the system structure may be
more relevant than any other factor. This can easily be demonstrated
when weak systems with a longitudinal geographical extension or
appropriate substructures are analyzed.
System fault Most relevant to system modeling considerations are the applied faults
and related problems which are to be analyzed. The analysis of system
damping and PSS tuning will not necessarily require the boiler
dynamics to be considered. On the other side, load shedding
optimization and frequency restoration would not give appropriate
results if mid and long-term characteristics of relevant system elements
are neglected.
24 - 1
DIgSILENT PowerFactory User Defined (DSL) Models
Study purpose In general, for systems which are in a planning stage, typical models
and parameters could be applied as long as there is no specific
additional information available. However, a more and detailed
representation is necessary for system extensions, where a detailed
model representation should form part of the performance
specification. Special attention has to be paid to the analysis of
operational problems and the operation optimization. For these cases,
a detailed modeling of the relevant components is indispensable.
As soon as a detailed analysis and representation of system models is required, the im-
mediately arising questions are:
• How can the structures and parameters of the model be determined?
• Are IEEE models and additional manufacturers block diagrams adequate and
accurate?
• How could the available information be used within the power system analysis
software?
The approach which is presented here and successfully applied in various projects can be
called the "Advanced System Modeling Approach (ASMA)''. Typical applications are
• the analysis of controller problems and relevant malfunctions, especially under
disturbance conditions
• optimization of control parameter settings
• modeling of unconventional system structures and control concepts often found in
industrial systems
• study applications for the design and specification phase of components and systems
(e.g. power system stabilizer, generator and HVDC controllers).
For the ASMA approach, the following steps are of crucial importance:
Setup of system models
Based on the fundamental equations of engineering and physics, the
basic algebraic and differential equations are to be set up within the
required degree of accuracy. In addition, all parameters like time
constants and gains which could be also derived from these basics, are
likewise to be calculated.
Performance of system tests
In order to define all other parameters and especially nonlinear
characteristics, system performance tests are the best method. In the
majority of cases, frequency response tests will not permit the
determination of any nonlinear structure and its parameters. Special
test procedures, which do not interfere with normal operation, have to
be applied to focus on the steady-state characteristics, gains and time
constants. These measurements are preferably executed with a highly
accurate digital transient performance measurement system.
System Identification
Nonlinear, multi-input and multi-output system identification
techniques are applied for system identification procedures. Typically,
the mismatch between measured and identified curves should be
smaller than 2%.
24 - 2
DIgSILENT PowerFactory User Defined (DSL) Models
24 - 3
DIgSILENT PowerFactory User Defined (DSL) Models
receive input signals from the simulated power system and which react by changing some
other signals.
DSL itself can be looked upon as an add-on to the transient analysis functionality of
PowerFactory. During the simulation, the model equations of the DSL models are com-
bined with those describing the dynamic behavior of the power system components.
These equations are then evaluated together, leading to an integrated transient simula-
tion of the combination of the power system and its controllers.
The DSL main interfacing functions are:
Signal input and output channels:
Any variable defined within the kernel (currently more than 2500) and
in a DSL model, can be accessed in a read-and-write mode. Main and
sub-address features are implemented allowing the access of any
signal existing in the system or to build up complex structures like
hardware-based modules taking equipment "rack'' and "function card''
structures into account.
Events: Conditions evaluated by DSL models may cause events to be sent to
the program kernel where they will be scheduled within the event
queue.
Output and Monitoring:
Conditions may trigger user-defined messages to be displayed in the
output window.
The structure of a DSL model is best explained by example. The used example is that of
a prime mover unit model of a simple hydro turbine. This DSL model has been defined
graphically, and contains one embedded DSL macro. That embedded macro models a sin-
24 - 4
DIgSILENT PowerFactory User Defined (DSL) Models
In the figure 24.2, the model definition that was used to define the hydro turbine model
is depicted. The resulting DSL code, as shown in the output window when a "graphics
rebuild'' is performed is:
1. model Pt = 'pmu_hydro'(At,C;x1;Ti;)
2. pt_x = 'I.BlkDef'(xe;x1;Ti;)
3. i3 = i1/i2
4. i1 = At*At
5. i2 = pt_x*pt_x
6. i4 = xe*pt_x
7. xe = i3-C
8. Pt = pt_x-i4
The line numbers have been added for convenience. The corresponding block definition
shows:
Output Signals : Pt
Input Signals : At, C
State Variables : x1
Parameter : Ti
Internal Variables :
The example describes a simple hydro turbine model with the input signals A_t and C and
the output signal P_t.
24 - 5
DIgSILENT PowerFactory User Defined (DSL) Models
In the figure 24.3, the graphical representation of the embedded primitive DSL model is
depicted. This primitive model is included in the hydro turbine (in line 2 of the hydro's
definition). The DSL primitive implements a single integrator and is programmed by:
1. model y = 'I'(xe;x1;Ti;)
2. [Ti] = 's'
3. limits(Ti) = (0,)
4. inc(x1) = y
5. inc(xe) = 0
6. x1. = xe/Ti
7. y = x1
Line 1 is generated by pushing the Equations button in the block diagram dialogue. Lines
2..7 were entered manually.
The block definition dialogue was used to set
Output Signals : y
Input Signals : xe
State Variables : x1
Parameter : Ti
Internal Variables
Interface description
The interface defines the model name, names of input and output signals, model param-
eters and state variables. These are shown in the output window in the model heading.
Example (line 1 from the hydro turbine model):
1. model Pt = 'pmu_hydro'(At,C;x1;Ti;)
The block diagram dialogue further allows for the definition of limiting parameters and
input signals, and the classification of the model as a linear model and/or as a DSL macro.
Model description
The model description describes the DSL model, based on the signals defined in the in-
terface. The DSL description includes
• Parameter descriptions: name and unit
• Allowed parameter ranges
• Initial conditions and functions which are used to calculate initial values.
24 - 6
DIgSILENT PowerFactory User Defined (DSL) Models
• use the icon "Insert new Graphic" on the toolbar of an opened graphic, and select
the option Block/Frame Diagram.
24 - 7
DIgSILENT PowerFactory User Defined (DSL) Models
To access the dialogue of the block definition (BlkDef), double-click on the frame box
surrounding the diagram.
Complex Block Definition objects may be compared with the "Grid Folders'' in the Power-
Factory database tree. They are defined by graphically defining a controller block dia-
gram of which they will store the graphical information and all logic parts. These parts
include signals, small standard components (adders, multipliers, etc.) or DSL primitives.
Although a complex Block Definition object is created graphically, it allows for additional
DSL equations to define those aspects of the controller that would be difficult to enter in
a graphical way.
The graphical environment in which a complex Block Diagram is constructed, is not treat-
ed here. Please refer to chapter 8 (The Graphic Windows) for more information.
• use the "New Object" icon in the database manager and selecting Block Definition
(BlkDef).
• double-click an new/empty block reference in an open block diagram and then use
the button to select a block definition. Then use the icon to create a new
block definition inside the local library.
DSL primitives are the building blocks from which the more complex controller diagrams
are composed. A DSL primitive, for example, might implement a Low Pass filter, which
may then be used to graphically construct more complex controllers which include such
a filter.
Unlike transformers or other power system components, which may be looked upon as
'power system primitives', a DSL primitive is only referred to by a complex block diagram
and may thus be used in more than one complex DSL model at the same time.
24 - 8
DIgSILENT PowerFactory User Defined (DSL) Models
• The name and title will appear in the library folder, where the model is stored.
• The level of the model representation is only important when using or changing old
models. For new created models "Level 3'' should be used always. For macros this
option does not have any impact, because the level of the highest block is important,
i.e. the controller definition.
• "Automatic Calculation of Initial Conditions'': PowerFactory can calculate the initial
conditions automatically. However if there is no sequence found (because of e.g.
dead lock situations) there will be an error message.
• "Classification'':
Linear This option will only effect the graphical representation of the block in
the diagram. If this option is enabled, the block will be represented as a
linear block, otherwise as a not-linear block with two lines.
Macro This option is used to identify the block definition as a macro inside the
library.
Matlab Enabling the 'Matlab' tag will show am input dialogue, where a Matlab
(*.m) file can be defined with which the block definition can
24 - 9
DIgSILENT PowerFactory User Defined (DSL) Models
24 - 10
DIgSILENT PowerFactory User Defined (DSL) Models
By clicking on the button the second page of the dialogue can be accessed. Here the
(additional) equations of the DSL model can be defined. Also further information e.g. the
initial conditions of state variables and the name and unit of parameters can be specified.
the figure 24.5 shows the additional equations of the DSL model of the PI controller.
The next section will show the handling and usage of the DSL language in detail.
24 - 11
DIgSILENT PowerFactory User Defined (DSL) Models
24 - 12
DIgSILENT PowerFactory User Defined (DSL) Models
Internal variables
Internal variables are defined and used in the DSL model to ease the
construction of a DSL set of equations.
The following rules may be helpful when interpreting warning and error messages:
• A state variable may not be at the same time an output variable; if required, the use
of an assignment like y=x1 is recommended.
• All parameters are real numbers.
• A special parameter 'array_iiii' (with up to 4 digits i), with 2*iiii elements is provided to
define characteristics (see procedure "lapprox'').
• Only the derivatives of state variables can be assigned an expression.
24 - 13
DIgSILENT PowerFactory User Defined (DSL) Models
24 - 14
DIgSILENT PowerFactory User Defined (DSL) Models
24 - 15
DIgSILENT PowerFactory User Defined (DSL) Models
24 - 16
DIgSILENT PowerFactory User Defined (DSL) Models
• The option Automatic Calculation of Initial Conditions needs some configuration work,
but does not require correct initial conditions for each state/input variables. The initial
values are only used to initialize the iteration process. The incfix-function can be used
to determine the initial values in ambivalent situations.
• Use the option Verify Initial Conditions to check, if the initial conditions lead to the
correct result.
Remarks:
• DSL assignments may occur in any sequence. The sequence does not influence the
evaluation of the assignments.
• All variables are of type floating point, even if assigned to a boolean expression, in
which case the value will be 0.0000 or 1.0000;
• When a variable z is used in a logical expression (i.e. y=.not.z), the logical 1 of z is
tested by evaluating (z>0.5):
y1 = .not.z is interpreted and equal to y1 = (z=<0.5)
There is no warning against mixing logical and non-discrete variables in expressions.
Consequently the following code will cause no message: depending on y, z will take
the value x1 + 4.0 or just x1 :
24 - 17
DIgSILENT PowerFactory User Defined (DSL) Models
24 - 18
DIgSILENT PowerFactory User Defined (DSL) Models
The local variable names of macros thus disappear after the prepare process.
DSL Models
In general, there are two basic types of DSL models possible:
1 Models of electrical devices like generators, loads or HVDC systems. These models
are characterized by their principal output signal "complex device current'', which is
injected to the electrical grid at a certain busbar. However, in addition to the
electrical device currents, there may be any other variable defined as an output
signal. A summary of the available variables can be seen in the corresponding
Technical References of the element.
2 Models with output signals which are not directly injected to the electrical network
(general devices). Among these types of models are prime mover units, voltage
controllers, relays, calculation procedures, etc.
output(boolexpr, message_string)
The message_string may contain variables and the special function num(boolexpr) or
num(expr):
• variable names which appear directly after an '=' sign will be substituted by their
actual values; the following line may generate the message:
maximum exceeded: yt=1.2 > ymax=1.0:
output(yymax,'maximum exceeded: yt=yt > ymax=ymax')
• the num(expr) or num(boolexpr) will be substituted with the calculated value of the
expression, e.g.:
value=num(a+b) may produce value=3.5000
fault(boolexpr, event_string)
Each DSL model has the capability to add events to the event list. A DSL model of a dis-
tance relay, for instance, can open the power switch of a line by adding the correct switch
event. 'Adding an event' is done by executing an existing event object in the PowerFac-
24 - 19
DIgSILENT PowerFactory User Defined (DSL) Models
tory database.
Consequently, all events that may be used by the DSL model have to be created together
with the DSL model. They must all be stored inside the common model (ElmDsl). These
'DSL events' will thus form an integrated part of the DSL model.
The event_string in the fault expression must refer to the name of one of these events.
At evaluation, the event will be thrown onto the event stack if boolexpr is true. As soon
as the simulation reaches the event, it will execute it. Consequently, a delayed event may
be thrown by the DSL model by setting the execution time ahead of the current time.
The parameters of the event can be modified in the fault string by assigning a new value.
The mechanism is the same as described above in the output procedure.
Example:
fault(u>1.1,'name=MySwitchEvent1 dtime=0.15')
If the variable u exceeds 1.1 the event named 'MySwitchEvent1' will be thrown onto the
event stack and its variable dtime (relative event time) will be set to 15 milliseconds. The
event will thus be delayed for that amount of time, which, in this case, mimics the time
needed to open a switch. Which switch will open is defined in the event object
'MySwitchEvent1'.
Note The events are accessed or created by opening the edit dialogue
of the common model (double-click on the DSL model in the
Data Manager), and then pressing the button Events . You get now
a list of already defined events inside this model.
The events are not added to the global event list of the project un-
less the event is 'activated' by the DSL model.
inc(x1) = y/K
inc(xe) = y/K
inc(x4) = 1.0
inc(at) = pt
inc(steamflow0) = pt
inc(ylp) = pt
24 - 20
DIgSILENT PowerFactory User Defined (DSL) Models
x1. = select(T1>0,(xe-x1)/T1,0)
y = K*select(T1>0,x1,xe) ! if T1=0 => y=xe
steamflow = at*x4
x4. = (steamflow0 - steamflow)/Tspi ! boiler
yhp = PT1(steamflow;x1;Thp) ! high pressure part
yip = PT1(yhp;x2;Tip) ! medium pressure part
ylp = PT1(yip;x3;Tlp) ! low pressure part
pt = yhp*alfhp + ylp*alflp+ yip*(1.0-alfhp-alflp)
ptmw = pt*sgn*cosn*ngnum ! only for output purposes
The used macro 'PT1' is defined as:
model y = 'PT1'(xe;x1;K,T1;)
x1. = select(T1>0,(xe-x1)/T1,0)
y = K*select(T1>0,x1,xe) ! if T1=0 => y=xe
inc(x1) = y/K
inc(xe) = y/K
[T1] = 's'
limits(T1) = [0,)
24 - 21
DIgSILENT PowerFactory User Defined (DSL) Models
24 - 22
DIgSILENT PowerFactory Modal Analysis/Eigenvalue Calculation
Chapter 25
Modal Analysis/Eigenvalue Calculation
The modal analysis calculates the eigenvalues and eigenvectors of a dynamic multi-ma-
chine system including all controllers and power plant models. This calculation can be per-
formed not only at the beginning of a transient simulation but also at every time step
when the simulation is stopped.
The eigenvalue analysis allows for the computation of modal sensitivities with respect to
generator or power plant controllers, reactive compensation or any other equipment.
The calculation of eigenvalues and eigenvectors is the most powerful tool for oscillatory
stability studies. For its application it is highly recommended to first compute the ’bare
natural’ system oscillation modes. These are the oscillation modes of the system without
taking any controller or power plant model into consideration, i.e. with constant turbine
power, constant excitation voltage etc. Starting from these ’bare natural’ modes the ef-
fects of controllers (structure, gain, time constants etc.) and other additional models can
be calculated as the second step.
25 - 1
DIgSILENT PowerFactory Modal Analysis/Eigenvalue Calculation
1 ⎛ An ⎞
d i = – σ i = ------ ⋅ ln ⎜ --------------
-⎟
Tp ⎝ n + 1⎠
A
where An and An+1 are amplitudes of two consecutive swing maxima or minima respec-
tively.
The oscillatory periods of local generator oscillations are typically in the range of 0.5 to 5
Hz. Higher frequency of the natural oscillations, i.e. those which are normally not regu-
lated out, are often damped to a greater extent than slower oscillations. The oscillatory
period of the oscillations of areas (inter-area oscillations) is normally a factor of 5 to 20
times greater than that of the local generator oscillations.
The absolute contribution of an individual generator to the oscillation mode which has
been excited as a result of a disturbance can be calculated by:
n λi ⋅ t
ω(t) = ∑ ci ⋅ φi ⋅ e
i=1
where
ω(t) generator speed vector
λi i'th eigenvalue
25 - 2
DIgSILENT PowerFactory Modal Analysis/Eigenvalue Calculation
ω1 φ 11 φ 21 φ n1
ω2 φ 12 λ1 t φ 22 λ2 t φ n2 λn t
= c1 ⋅ ⋅e + c2 ⋅ ⋅e + ... + c 2 ⋅ ⋅e
... ... ... ...
ωn φ 1n φ 2n φ nn
The problem of using the right or left eigenvectors for analyzing the participation of a gen-
erator in a particular mode i is the dependency on the scales and units of the vector ele-
ments. Hence the eigenvectors Φi and Ψi are combined to a matrix P of participation
factor by:
p 1i φ 1i ⋅ Ψ i1
p 2i φ 2i ⋅ Ψ i2
pi = =
... ...
p ni φ ni ⋅ Ψ in
The elements of the matrix pij are called the participation factors. They give a good indi-
cation of the general system dynamic oscillation pattern. They may be used easily to de-
termine the location of eventually needed stabilizing devices in order to influence the
system damping efficiently. Furthermore the participation factor is normalized so that the
sum for any mode is equal to 1.
The participation factors can be calculated not only for the generator speed variables, but
for all variables listed in Table 25.1.
25 - 3
DIgSILENT PowerFactory Modal Analysis/Eigenvalue Calculation
a balanced RMS simulation and start a modal analysis after the end of a simulation or after
stopping the simulation.
Note The modal analysis can be executed at any point of time in a tran-
sient simulation. Nevertheless always keep in mind that the results
of the modal analysis are valid on the basis, that the system is in
a quasi steady-state operation point.
Furthermore the calculated oscillation modes are only valid for
"small'' perturbations of the system. If large transient disturbances
are applied to the network, the oscillation frequency and damping
may change from the results of the eigenvalue analysis.
When a load-flow is calculated, the icon to open the modal analysis dialogue( ) be-
comes active. Using the Settings button (in the ''Basic Options'' page), the options for
calculating the initial conditions used by the modal analysis can be specified.
On the ''Advanced Options'' page, the state variable and the result file for the Eigenvalue
analysis can be defined. The default state variable is the speed signal of the generators.
The default result file is Eigenvalue (s:speed) and is stored inside the active study case.
The relative participation factors can be calculated not only for the generator speed vari-
ables, but there is also the possibility to select from the variables as shown in table 25.1.
The figure 25.1 shows the command dialogue of the modal analysis with the variable
s:speed selected as the state variable.
25 - 4
DIgSILENT PowerFactory Modal Analysis/Eigenvalue Calculation
When executing the command by pressing Execute, the initial conditions of all elements
is calculated first. Then the modal analysis constructs a system matrix from the load-flow
and the dynamic data. The eigenvalues and eigenvectors are calculated directly from that
matrix. Since eigenvalue calculations require linearized models, PowerFactory automat-
ically performs the linearization of all relevant system elements.
The following information is printed to the output window, when the eigenvalues are cal-
culated:
DIgSI/info (t=-100:000 ms) - Initial conditions calculated.
DIgSI/info (t=-100:000 ms) - Starting Modal Analysis. Please wait...
DIgSI/info (t=-090:000 ms) - Modal Analysis ready !
25 - 5
DIgSILENT PowerFactory Modal Analysis/Eigenvalue Calculation
Selecting the option Participations, either detailed or not, will further enable the selection
of the state variables and the certain eigenvalues as can be seen in the figure 25.2. For
the user convenience, there is also the possibility to define a filter for the eigenvalues
(system modes). The filter for eigenvalues is used to show only the participation factors
of specific system modes, if Select Eigenvalue(s) is set to Filtered. Otherwise the selected
specific eigenvalue will be used and the filter will be ignored.
The system modes and participating generators can be filtered by using the following op-
tions:
25 - 6
DIgSILENT PowerFactory Modal Analysis/Eigenvalue Calculation
Maximal Damping
The damping of the system mode will be below the defined value in [1/s].
Maximal Period
System modes oscillating below the defined periodic time in [s] will be shown.
Min. Participation
Only generators with a participation factors above the specified limit will by
outputted.
The results of the participation factors of the generators in the small example power sys-
tem are shown in the figure 25.4.
An Eigenvalue Plot is generated by clicking on the icon from the 'Select Plot Type'
button of the toolbar menu (see figure 25.5). After cliking on the icon, the edit dialogue
of the Viseigen object pops up; there the user can set the figure appearance and the
displayed values on the vertical axis. Figure 25.6 shows an example of an Eigenvalue Plot
displaying the imaginary part of the calculated eigenvalues.
25 - 7
DIgSILENT PowerFactory Modal Analysis/Eigenvalue Calculation
DIgSILENT
19,102
11,461
3,8205
-3,8205
-11,461
-19,102
25 - 8
DIgSILENT PowerFactory Modal Analysis/Eigenvalue Calculation
options and the displayed mode can be set. Participant generators can be filtered accord-
ing to the magnitude of the participation factor; also the bar diagram can be restringed
to a selected group of generators. Figure 25.8 shows the Mode Bar Plot for the 20th mode
of the small power system used for the example of figures 25.3 and 25.4.
DIgSILENT
G3
G2
G1
The magnitude and the phase of any participation factor can be visualized by double click-
ing on a bar. This action opens the so called IntEigstate dialogue from figure 25.9.
25 - 9
DIgSILENT PowerFactory Modal Analysis/Eigenvalue Calculation
DIgSILENT
Shown generators (2nd quadrant) Shown generators (1st quadrant)
G 1: +0.350 / +176.9 deg 1,00 G3: +1.000 / +0.0 deg
0,50
-0,50
-1,00
25 - 10
DIgSILENT PowerFactory Modal Analysis/Eigenvalue Calculation
25 - 11
DIgSILENT PowerFactory Modal Analysis/Eigenvalue Calculation
25 - 12
DIgSILENT PowerFactory Model Parameter Identification
Chapter 26
Model Parameter Identification
The process of parameter estimation for power system elements for which certain mea-
surements have been made is performed with the "Parameter Estimation" function using
the icon .
The ComIdent command object is a high performance non-linear optimization tool,
which is capable of a multi parameter identification for one or more models, given a set
of measured input and output signals. This identification is principally performed in the
following way:
• A "Measurement File'' object (ElmFile) is created which maps the raw measured data
onto one or more "measurement signals''. These signals may contain measured
excitation and response signals.
• The measurement signals are used as inputs by the models of the power system
elements for which one or more parameters have to be identified, or they may be
used to control voltage or current sources.
• The output signals of the power system elements are fed into a comparator, just as
the corresponding measured signals. The comparator is thus given the measured
response on the excitation and the simulated response of the element models.
• The comparator calculates an objective function, which is the weighted sum of the
differences between the measured and the simulated response, raised to a whole
power (by default to the power of 2).
• The ComIdent command will collect all objective functions from all comparator
objects in the currently active study case and will minimize the resulting overall
objective function. To do this, the ComIdent command is given the list of
parameters which are to be identified. The objective functions are minimized by
altering these parameters.
This whole process is visualized in the figure 26.1.
26 - 1
DIgSILENT PowerFactory Model Parameter Identification
Of course, this figure 26.1 only visualizes the principle of the identification. To connect
measurement files, power system models and comparator objects to each other, a com-
posite frame is used. This, and all other details of the PowerFactory identification func-
tions, is described in the following sections.
26 - 2
DIgSILENT PowerFactory Model Parameter Identification
The block diagram uses slots which reserve space for the measurement files, the compar-
ator and the element models.
26 - 3
DIgSILENT PowerFactory Model Parameter Identification
The composite model must be set to use the identification block. It will then show the
slots that have been defined in that block. In the current example, the composite model
dialogue will look like the figure 26.3.
26 - 4
DIgSILENT PowerFactory Model Parameter Identification
In this figure, the three slots have been assigned already. Visible is that the comparison
object "Compare Signals'' is selected, as well as a measurement file and the voltage con-
troller of which to find the best possible values for ka and ta.
26 - 5
DIgSILENT PowerFactory Model Parameter Identification
In this figure, the 10 difference signals are listed, with their weighting factor. By default,
these are one, but they may be edited freely. The power factor equals 2 by default but
may be set to any other positive whole number from 2 to 10.
The objective function calculated by the comparison object equals
n
∑
p
[ ( Mi – Si ) ⋅ wi ]
i=1
where
• M i is the measured response (i.e. "in1mea'')
• p is the power
26 - 6
DIgSILENT PowerFactory Model Parameter Identification
26 - 7
DIgSILENT PowerFactory Model Parameter Identification
In this example, two parameters of the voltage controller element "vco IEEEX1'' from the
Composite Identification Model are listed. The identification process will alter these pa-
rameters in order to minimize the objective functions.
The "Mode'' field in the parameter list determines the parameter constraints:
0 means not to change the parameter, but to leave it at its initial conditions. This
option may be used to temporarily exclude some parameters from the identification
process.
1 mean to optimize the parameter without restrictions
2 means to optimize the parameter, given the constraint that the parameter value
must always be greater than zero.
Although the object for which the parameters are optimized in this example is the same
object as is used in the Composite Identification Model, it is allowed to enter any other
parameter from any other element, as long as that element belongs to the active study
case. Such may be used to optimize secondary appliance, where only the behavior of the
primary appliance has been measured.
26 - 8
DIgSILENT PowerFactory Model Parameter Identification
In the figure 26.7, a simple Identification Block Diagram is shown in which the measure-
ment file is no longer connected to the element slot, but to the voltage source slot. The
voltage at the busbar at which the voltage source will be connected will thus be forced to
the measured values during the identification process.
In the figure 26.8, a very simple grid is shown to which the load which is to be identified
and a voltage source element are connected. As with the normal identification process, a
Common Identification Model has to be created which uses the Identification Diagram
with Primary Element as shown in figure 26.7. In the ComIdent command dialogue, the
unknown parameters of the load may then be listed.
It is of course possible to mix the identification of both primary and secondary power sys-
tem elements at the same time.
26 - 9
DIgSILENT PowerFactory Model Parameter Identification
26 - 10
Volume VI
Tools Utilities & Interfaces
DIgSILENT PowerFactory
Version 13.2
DIgSILENT PowerFactory Visualization of Results in PowerFactory
Chapter 27
Visualization of Results in PowerFactory
This chapter presents the tools and options included in PowerFactory to view the results
of the preformed calculations. Key concepts in this topic are Virtual Instruments (VIs), Re-
sults Objects and Variable Sets.
27 - 1
DIgSILENT PowerFactory Visualization of Results in PowerFactory
Bar Diagrams
are similar to the plots. The results are then not shown as a line, but as single bars
for every data point.
Vector Diagrams
easily show different variables - like voltage, current or power - in a vector diagram
using polar or cartesian coordinates.
Meter Panels
can display variables or parameters using different panels like:
• digital display
• horizontal scale of a meter
• vertical scale of a meter
• measurement VI
• interactive button/switch
Curve Inputs
are used to conveniently convert graphical information (graphs or curves) into a set
of data by scanning and sampling the data points.
Bitmaps
can be inserted as a remark or to provide further information.
Additionally to these options there are further types of diagrams for a specific usage are
e.g. the time-overcurrent plot or the time distance diagram used for protection studies.
These plots are not described in this chapter but directly in the part of the manual dealing
with the individual calculation method.
The usage of the plots and the available tools like labels, constants, etc. for the virtual
instruments can be used in either one of the diagrams described above or below. In the
following list these virtual instruments are described shortly:
27 - 2
DIgSILENT PowerFactory Visualization of Results in PowerFactory
Feeder Definitions
Voltage Profile
shows voltage profile of a complete subsystem belonging to a defined feeder in the
power system depending on the distance or the node number. See also 11.1.
Schematic Path
With this plot a meshed or a radial network can easily be shown in a brief
schematic way without result boxes but with optical information like colors for
overloading, etc.
Harmonics
Waveform Plot
Using this plot a waveform is generated from the magnitude and the phase angle
of the harmonic frequencies. With this diagram a variable like the voltage or
current, which is defined in a harmonic source e.g. a power electronic device or a
load, can easily be shown as a time dependent variable. So the real shape of the
voltage can be seen and analysed.A more detailed description see 27.1.6 (The
Waveform Plot).
Modal Analysis
Eigenvalue Plot
The Eigenvalue Plot (Viseigen) displays the eigenvalues calculated in the modal
analysis (Chapter 25). Double-clicking any of the displayed eigenvalues, pops-up
an informative dialogue, where the oscillation parameters and the coordinates in
complex and polar representation are given. For a full description of the eigenvalue
plot is see 25.3.2 (Modal Analysis Plots).
Mode Bar Plot
The Mode Bar Plot (VisModbar) displays the participation factors of the system
generators in a selected mode. Full description of the Mode bar Plot is given in
25.3.2 (Modal Analysis Plots).
Mode Phasor Plot
The Mode Phasor Plot (VisModephasor) displays the same information of the
Mode Bar Plot but in a phasor diagram. For further information see 25.3.2 (Modal
Analysis Plots).
27 - 3
DIgSILENT PowerFactory Visualization of Results in PowerFactory
• selecting the "Insert New Graphic" icon on the graphics board's toolbar and
selecting "Virtual Instrument Panel". This will also create a new VI panel in the current
graphics board.
All virtual instrument panels are stored in graphics boards. A graphic board holds default
settings for plots and other diagrams. The icon is clicked or the Edit Actual Virtual
Instrument Panel option is selected from the context sensitive menu to edit the dialogue.
Once a VI panel has been created, the "Append new VI(s)" icon ( ) can be clicked or
the option Create VI −>... from the context menu of the SetVipage can be selected to
add new virtual instruments to the VI panel.
Virtual instrument panels usually set the size and position of new virtual instruments like
plots automatically. But it is possible to turn on user defined moving and resizing of the
plots. In this modes the plots can be moved or resized by the user. Also the and
icons are used to tile the Virtual Instruments horizontal or to arrange the VIs automati-
cally.
A ViPage uses a predefined style which set line-styles, line-width, fonts and other graph-
ical settings. Own styles can be created and selected. A different style can be selected on
each VI panel of a Graphics Boards.
These different options are described in the following sections.
The icon is clicked or the "Edit Actual Virtual Instrument Panel'' option is selected
from the context sensitive menu to edit the dialogue. The dialogue is split into three dif-
ferent pages named:
27 - 4
DIgSILENT PowerFactory Visualization of Results in PowerFactory
• x-Axis holds the settings for x-Axis of plots and Waveform Plots.
• Advanced holds graphical settings like Style and Background.
• Results contains the reference to the default results object for plots.
The buttons or are clicked to scale the x-axis respectively the y-axis of all plots
on the virtual instrument panel automatically. Plots on other panels in the same graphics
board are unchanged if their axes are local.
The buttons are inactive, if there are no plots shown at all or if the x or y axes can not be
scaled automatically. That applies e.g. for bar-diagrams showing the distortion after a
harmonics load-flow calculation, where the x-axis is given by the harmonic frequencies.
Different types of plots, like the subplot and the waveform plot, can be scaled simulta-
neously.
With the button "Zoom X-Axis" a certain range of the x-axis or of several x-axes can
be zoomed easily. Click on the icon to activate the function, then click on a plot, hold the
right mouse button and 'drag' the mouse to the right or to the left to mark the desired
range on the x-axis. If the mouse button is released, PowerFactory will then show the
marked x ranged zoomed.
Another way to rearrange the VIs is to open the dialogue of the VI panel by pressing the
icon and then use the Arrangement options on the "Advanced" page. Here the option
User defined can be activated. So the VIs will no longer be arranged automatically but
can be resized and moved inside the panel. So the user is free to arrange the VIs 'ad li-
27 - 5
DIgSILENT PowerFactory Visualization of Results in PowerFactory
ly active icon or . Also the option User defined can be activated on the "Advanced"
page of the "edit" dialogue of the VI panel.
A VI is clicked to mark it. The VI is 'dragged' inside the panel by clicking it with the mouse
button pressed. Then the VI can be move across the panel. The mouse is released to set
the new position. A VI is clicked on the border to resize it. A VI is clicked on the border
to resize it.
Note Please note that some VIs can not be resized at all because their
size is set automatically. This applies e.g. for the bitmap VI with
the option "Adapt Size of VI to Size of Bitmap" enabled.
Page Format
The page format is modified using the in the toolbar of the graphics board. VI panels
use the page format set in the graphics board. In addition a local page format can be cre-
ated for each VI panel. The option "Create local Page Format'' is selected in the context
sensitive menu to create a local page format. The VI panel now uses a local page format
independent of the page format set in the graphics board.
"Set default Page Format'' is selected in the context sensitive menu to reset the local page
format. The VI panel now uses the default format of the graphics board again.
The icon is clicked to open the "Edit Plots on Page'' dialogue for defining curves of
several plots. If the variables of only one subplot are to be changed, it is suggested to
edit the dialogue of the plot itself by double-clicking it. This procedure is more convenient.
This dialogue gives a very good overview over the diagrams on the VI panel and the vari-
ables, axis and curve styles. The figure 27.1 shows an example of the dialogue.
27 - 6
DIgSILENT PowerFactory Visualization of Results in PowerFactory
Each line of the table named Curves defines a variable shown on the panel. The variables
definition applies to the plot shown in the first column. When the dialogue is opened the
plots are sorted from left to right and from top to bottom and are numbered accordingly.
All data and settings of each variable is displayed in the table, and the columns are used
exactly like the columns in the table of a plot. To move a variable from one plot to another,
simply change the Plot Nr. of the variable to move.
In this table not only subplots (VisPlot) are shown but also plots with two y-axis
(VisPlot2) can be modified. Here additionally in the column y the y-axis can be defined
to which the variable is related. In the figure 27.1 this can be seen in the to last rows of
the table. Here both variables are shown in one plot number 4 with two different axis. If
the number in this row is grey, only one y-axis is available in this plot.
Like in most tables new rows can be add. Default File for Page is a reference to the results
element of the virtual instrument panel. The Filter... button opens the filter dialogue. The
selected filter will be applied to all plots on the current virtual instrument panel.
Default File for Page is a reference to the default results element of the virtual instrument
panel. This is exactly the same setting like the one displayed on the Results page of the
dialogue box of the virtual instrument panel.
Title Block
All virtual instrument panels in a Graphics Board show the same title by default. The only
difference of the title blocks on the VI-Panels are the panel name and the page number
which are unique for each panel. To create a local title for a VI-Panel simply right-click on
the title and select Create local Title from the context sensitive menu.
Like in the single line graphics the icon in the toolbar is clicked to show or hide the
title block. The title can ba defined or changed by double-clicking on them or use the icon
to modify the title text. For details about the settings of the title object refer to section
8.3.6.
27 - 7
DIgSILENT PowerFactory Visualization of Results in PowerFactory
Results
Some VIs like the most frequently used class "subplot" show curves stored in one ore
more result objects (ElmRes). The curves are selected in a table where the result ele-
ment, the element and a variable have to be selected.
The result column of VIs needs not to be set for most calculations. The VI itself will look
for the results element to display automatically. The default results element is either:
Background
The default background of virtual instrument panels is empty. The background settings
for the panel can be found in the frame Background on the "Advanced'' page of the virtual
instrument panel dialogue.
The Filename defines the background file, which can be either a Windows Metafile
(*.wmf), a Bitmap (*.bmp) or a AutoCad DXF file. If the selected file does not exist, or if
the filename is not set the background remains empty. VIs can be transparent or opaque.
Graphics are transparent must be activated to make all graphics transparent. If an opaque
graphic fills the complete panel area the background will be invisible.
27 - 8
DIgSILENT PowerFactory Visualization of Results in PowerFactory
New VIs can easily be created with the "Append New VI(s)" icon . A small dialogue
will pop up, where the class of VI can be selected from the available Object and the num-
ber of VIs to be added to the current VI panel.
Another way to create VIs is to select the option Create VI −>... from the context menu
of the SetVipage. Then a class of virtual instrument can be selected to be added to the
current VI panel.
27.1.2 Plots
Plots are the most used diagrams to show all sorts of parameters, states, signals or vari-
ables depending on the time or on another variable. To show these time-domain variables
or to visualize a magnitude depending on other variables, there are the following plots
available:
• SubPlot (VisPlot)
• SubPlot (2y) with two y-axes (VisPlot2)
• X-Y plot (VisXyplot)
• FFT plots (VisFft)
27 - 9
DIgSILENT PowerFactory Visualization of Results in PowerFactory
The Subplot
SubPlots are the 'basic' diagrams and are typically used to display one or more plotted
curves from the results of a EMT or RMS simulation. But also bar diagrams used e.g. to
visualize the results of a harmonics calculation are a special type of SubPlots.
A new subplot is created on the current VI panel by pressing the icon and selecting
a Subplot (VisPlot) from the pull down list. More than one subplot may be created at
once by setting the Number of VI(s). The new empty subplots appear with standard set-
tings, as is shown in the figure 27.2.
Editing Subplots
The edit dialogue of a subplot, as shown in the figure 27.3 has pages for the y-axis and
x-axis of the individual subplot as well as an additional Advanced page for auxiliary set-
tings. The y-axis page is normally used to set the curves in the subplot, while the x-axis
normally, and by default, shows time.
27 - 10
DIgSILENT PowerFactory Visualization of Results in PowerFactory
27 - 11
DIgSILENT PowerFactory Visualization of Results in PowerFactory
panel, for instance to show the same time-scale in all plots. In order to synchronize the
x-axes without losing the freedom to manually set each subplot, a hierarchy of x-axes is
used in the Graphics Board:
• The Graphics Board contains the basic x-axis definition. This definition is used by
default by each new subplot.
• A VI panel, however, may define a local x-axis definition, which will then be the
default for each new subplot created on that panel.
• The subplot thus uses the Graphics Board or the panel SetViPage definition by
default, but may also use a local x-axis definition.
Note If you change the settings of the x-axis, which uses the definition
stored in the graphics board, all x-axis are changed using the same
definition in the whole project. These are also affected, if the x-axis
is automatically scaled or zoomed.
The following list describes how to edit the definition of the different x-axes:
• For editing the graphics board definition, select the option Graphics Board and go to
the x-Axis page of the edit dialogue of the plot. Using the button the dialogue for
changing the x-axis definition for the complete graphics board can be accessed.
Another way is to click the icon for the graphics board dialogue and then go to
the x-Axis page.
• Similar to the graphics board definition, the x-axis definition of the VI panel is
changed by selecting the option Page. This will open the dialogue of the of the VI
panel (SetVipage).
Another way is to go to the panel dialogue by clicking the icon or selecting Edit
actual Virtual Instrument Panel from the context menu and then go to the x-Axis
page.
• The local x-axis definition is simply accessed by selecting the option Local. Then the
options for specifying the x-axis is shown in this dialogue.
The options available for the x-axis are similar to the one for the y-axis. They are de-
scribed in the following section. The only difference is in selecting the variable of the axis.
For the x-axis there is a list to choose the x-Axis Variable shown in the figure 27.4. The
Default value is depending on the type of simulation and the result object created during
the previous simulation. Then for time-domain simulations different representations of
the time scale are available. For the FFT plot e.g. the x-axis can be scale using the fre-
quency respectively the harmonic order.
27 - 12
DIgSILENT PowerFactory Visualization of Results in PowerFactory
The option User defined enables the user to choose any variable for the x-axis, which is
selected to be stored in the result object. As shown in the figure 27.4 an element and a
variable can be selected for the x-axis. In this way a x-y plot can be created. There is also
an own plot type for a more convenient way to create x-y plot: the VisXyplot is described
in more detail in section .
27 - 13
DIgSILENT PowerFactory Visualization of Results in PowerFactory
The bottom subplot has a smaller x-axis, to show only the interesting part, and has the
27 - 14
DIgSILENT PowerFactory Visualization of Results in PowerFactory
27 - 15
DIgSILENT PowerFactory Visualization of Results in PowerFactory
far left) (see cursor arrow in the figure 27.6) and selecting Insert Rows or Append (n)
Rows. Marked curve definitions can similarly be deleted from the list by selecting Delete
Rows.
If more than one curve is to be specified for the same result file and element, this may
be done in one action by selecting more than one variable from the variable list. This will
automatically create new entries in the curve definition table for all additionally selected
variables. The entered Result File and Element are copied automatically. This very conve-
nient procedure is shown in the figure 27.7 and the figure 27.8.
Similarly several elements can be selected. Then PowerFactory will automatically insert
the according number of rows. The variables are then set automatically to the one select-
ed in the first row.
27 - 16
DIgSILENT PowerFactory Visualization of Results in PowerFactory
A plot with two y-axes can be seen in the figure 27.9. To create this plot the icon has
to be pressed and a Subplot (2y) (VisPlot2) to be selected from the pull down list. This
will add a subplot with two y-axes to the current VI panel.
The second axis can then be defined and curves for this axis can be specified similar to
the 'basic' subplot VisPlot. In the edit dialogue of this plot, as shown in the figure 27.9,
there will now appear a page for y1-Axis and for y2-Axis.
On the page for the second y-axis, this additional axis can be deactivated by unticking the
option Use second y-Axis.
To create a x-y plot press the icon and then select a X-Y Plot (VisXYPlot) from the
pull down list. This will add a new x-a plot to the current VI panel.
The figure 27.10 shows the edit dialogue of the plot.
27 - 17
DIgSILENT PowerFactory Visualization of Results in PowerFactory
On the variables page the variables for the x- and y-axis are specified. Both variables have
to be stored in one result file of a simulation. To select variables of two different elements
the option Show x-Element in Table has to be activated. The options and the tools for the
curves are similar to the ones described in section (The Subplot).
On the second page Scales of the dialogue the scales of the two axis can be set automat-
ically or global definitions can be used for them.
The plot is drawn for a certain time range. On page Time Range this range can be set to
the whole simulation time. Another way is to select only a specified range to show these
results.
Like other plots it can be created by using the "Append VI(s)" icon . An much easier
way is to click on a plotted curve and then selecting Create FFT Plot from the context sen-
sitive menu. Then the mouse pointer can be 'dragged' from the selected point on the
curve to the left or right. When holding the mouse still, a quick-help box shows the range,
beginning and end of the curve to be transformed.
By clicking the diagram again, a range for the FFT is set and the FFT is calculated and
shown in a newly created plot.
When entering the "edit" dialogue by double-clicking the plot, the x- and y-axis can be
defined on the different pages similar to the VisPlot. Additional options are:
27 - 18
DIgSILENT PowerFactory Visualization of Results in PowerFactory
Calculate This additional option on the page y-Axis modifies the fast-fourier
transformation and the time range of the signal the FFT is applied to.
The button Synchronize will synchronize the time range with the
given frequency.Furthermore the different parts of the variable and the
number of samples for the FFT can be selected.
Unit The unit of the x-axis can be set to Frequency or Harmonic Order. For
the Harmonic Order the nominal frequency can be set different to the
network frequency.
Display On the Advanced page the display of the FFT results can be toggled
between the Spectral Line and a solid Curve.
27 - 19
DIgSILENT PowerFactory Visualization of Results in PowerFactory
Note A vector diagram can only be shown when branch elements like
lines, load, transformers, etc. are selected. Then the vectors of the
voltage, current or power across the elements or at the nodes con-
nected to the elements are shown in diagrams.
The vector can be shown after a load-flow calculation or before
and after a transient RMS simulation.
Another way of creating a vector diagram VecVis to the current VI panel is - equal to
adding a subplot - by pressing the icon and selecting a Vector Diagram (VecVis)
from the pull down list. In the edit dialogue the variables can then be shown as described
in section (The Subplot).
The objects and variables of the vector diagram can be changed manually by editing the
dialogue, which is opened by double-clicking the vector diagram. The more convenient
method is to right-click the diagram and selecting
• Default Vectors −>... to select a predefined vector from the list.
• Label of Vectors changes the label of the displayed elements shown in the diagram.
• Jump to Element to select one of the elements that is connected to the currently
displayed element.
• Set Origin set the origin of the diagram to the position selected with a mouse-click.
• Center Origin set the origin of the diagram in the middle of the plot.
27 - 20
DIgSILENT PowerFactory Visualization of Results in PowerFactory
Changing Coordinates
The plot displays the vectors in cartesian or in polar representation. The grid of a polar
plot is shown as circles and can be altered as described in section (The Subplot). The
representation setting is also used for the mouse position display in the status bar.
The option Polar in the context menu toggles between representation in polar and carte-
sian coordinates. On the Advanced page in the edit dialogue this representation can also
ba changed.
Label of Vectors
In the edit dialogue as well as from the context menu of the plot the label of the vector
can be displayed in the different coordinate representation, so the real and imaginary val-
ue or the magnitude and phase angle can be shown.
27 - 21
DIgSILENT PowerFactory Visualization of Results in PowerFactory
element is automatically checked. The Jump To option is not available if there is more
than one element shown in the same plot or if there are no calculation results
available.
• The "Element'' column in the variables table in the plot dialogue, as depicted in the
figure 27.12, is double-clicked to select a new object.
Note The option Show −> Voltage Profile is only available when a load-
27 - 22
DIgSILENT PowerFactory Visualization of Results in PowerFactory
The voltage profile plot shows the voltage of terminals or busbars along a feeder. The
variable(s) shown by the plot can be changed. If there is no valid load-flow calculation
the plot remains empty. A voltage profile is shown in the figure 27.13.
The curve shown can be clicked and marked at the busbar positions (points). Like most
plots available in DIgSILENT PowerFactory the voltage profile plot can be labelled. See
the context sensitive menu or the description of the result graphs for details.
The plot in the example shows the voltage m:u with the unit "p.u.''. The position of the
busbars (x axis) is shown as the distance from the beginning of the feeder. The unit is
"km''. The variables shown for the busbars can be changed by the user through the edit
dialogue of the plot.
The x-Variable of the voltage profile can be changed by editing the dialogue of the plot.
On the Scales page of the Edit dialogue a list box defines the x-axis variable. There are
two predefined x axis.
Distance shows the distance of the busbar away from the feeder in "km''.
Bus Index numbers the busbars so the distance on the plot between the busses is
constant.
Other prompts for random variable input. Each variable available at all
busbars in the feeder can be input there.
The y-Variable(s) can be user-defined. The predefined variable for the plot is the voltage
m:u with the unit "p.u.''. Any other variable available at all busbars in the feeder can be
set. To change the shown variable, edit the voltage profile dialogue and change the vari-
able name in the table. Resize the table to append variables.
The Branch Coloring settings define a different coloring of the plot. For example the over-
27 - 23
DIgSILENT PowerFactory Visualization of Results in PowerFactory
loading of a branch element can be defined and shown in the plot. In the figure 27.13 to
line elements are loaded over 80%, so they are displayed in red. Also either the maximum
or the minimum values of parallel branches can be shown.
On the Advanced page the Coloring of the busnames shown in the plot can be defined
additionally.
Off does not display any bus names.
Black simply shows all names in black font style.
Colored acc. to Feeder
Colors the bus names according to the color of the different feeders.
The context sensitive menu shows now additional functions regarding the voltage profile
plot, when right-clicking on the plot or on the profile:
Edit Feeder
opens the "edit" dialogue of the feeder related to the plot.
Edit Data
opens the "edit" dialogue of the selected line, transformer or other
element.
Edit and Browse
shows the selected element in the data manager.
Mark in Graphic
marks selected element in the single line graphic(s).
Schematic Diagram
Besides the voltage profile the object VisPath can also be used to show the schematic
diagram of a radial network. The usage and the different options available for this plot
are similar to the voltage profile plot in section 27.1.4.
The diagram shows a schematics of a radial network. It is also directly connected to a
defined feeder in the network, so it can only be created for the part of the system a feeder
is assigned to. It can only be shown or created, if a load-flow is calculated for the system
To create a schematic diagram,
• a feeder has to be defined for the radial network by right-clicking on a switch in the
single line graphic or in the data manager and then select Define −> Feeder....
• The context sensitive menu of a branch with a defined feeder will now show the
option Show −> Schematic Visualization −> Plot. PowerFactory will create a new
VisPath and the schematic diagram showing the profile for radial network.
• In the 'calculation relevant objects' or in the data manager select the feeder object
and select Show −> Schematic Visualization −> Plot from the context sensitive menu.
In the plot the terminals and busbars are displayed as well as the electrical elements be-
longing to the feeder depending on the real distance of the network or on the bus index,
where the distance between every node is constant.
27 - 24
DIgSILENT PowerFactory Visualization of Results in PowerFactory
To create a waveform plot on the current VI panel, press the icon and select a Wave-
form Plot (VisHrm) from the pull down list. More than one subplot may be created at
27 - 25
DIgSILENT PowerFactory Visualization of Results in PowerFactory
once by setting the Number of VI(s). The new empty subplots appear with standard set-
tings.
Usage, settings and tools of this plot are similar to the subplot. A detailed description can
be found in (The Subplot). Although the definition of the variables is slightly different.
Besides the result object and the element, there can be defined the magnitude of the vari-
able, which is to be shown in the plot, and additionally the angle related to the magnitude
can be inserted when this information is needed.
The appropriate angle is automatically matched to the selected magnitude, if such angle
is available in the results and if the variable is a voltage or a current. When no appropriate
angle is found, one may be selected manually. Nevertheless it is not obligable to insert
an angle to shown the waveform plot.
The figure 27.14 shows an example for defining a variable in the VisHrm.
27 - 26
DIgSILENT PowerFactory Visualization of Results in PowerFactory
Step Size
The waveforms seen in the plot are calculated by the waveform plot itself. To avoid errors
the Step Size must be smaller than half the period of the highest frequency calculated by
the harmonics load-flow. To guarantee that this criteria is always fulfilled, independent of
the harmonics calculation, the Step Size is entered in Number of Samples in Highest Fre-
quency. The Highest Frequency and the resulting Step Size are shown just for informa-
tion.
Range
To be independent of the basic frequency the time range of the waveform is entered in
Number of cycles of Basic Frequency. Basic Frequency and the resulting Range are shown
just for information.
A new Curve Input plot is created by right-clicking the empty panel, or by pressing
on the panel button bar and subsequently selecting the Curve-Input (VisDefcrv). The
curve input option dialogue as shown in figure 27.16 is opened by double-clicking the
curve input plot.
27 - 27
DIgSILENT PowerFactory Visualization of Results in PowerFactory
27 - 28
DIgSILENT PowerFactory Visualization of Results in PowerFactory
27 - 29
DIgSILENT PowerFactory Visualization of Results in PowerFactory
- Right-click the plot and select Select Set Axis - x-Axis. Left click the end of the x-
axis of the background plot.
- Right-click the plot and select Select Set Axis - y-Axis. Left click the end of the y-
axis of the background plot.
• Open the curve-input dialogue and adapt the scale of the curve input plot to the scale
of background plot
• Right-click the plot and select the Active Curve option and activate the first curve. The
option is not available when
- There is no Matrix object selected in the 'Curves' table of the dialogue
- One of the matrix object(s) has less than two columns
• Right-click the plot and select the Input option. Select the input mode. With the first
curve, select the with x/y-Pairs option.
• Left click the curve to set x/y values.
• Right-click the plot and select the Input - Off option to finish the definition of the
curve
27 - 30
DIgSILENT PowerFactory Visualization of Results in PowerFactory
Similar to the plots on a VI page the mouse position in the embedded graphic is shown
in the status bar. The context sensitive menu of the embedded graphs offers commands
for printing and zooming.
Print Picture
This option opens the print dialogue. The default print format for embedded graphs
is A4. The printer orientation is set to the orientation of the embedded graph. The
print dialogue offers to preview the printed area.
Zoom In
This option changes the cursor to a magnifying glass. Drawing a rectangle with the
cursor will enlarge that area.
Zoom Back
This option restores the previous zoom area.
Zoom All
This option zooms out to the complete window.
Change Viewpoint
This option changes the arrow to the move arrow . Press the left mouse button,
hold it down and move the mouse outside the window. This will move the zoomed
area in that direction. Press the right mouse button or Esc to change the cursor
back again.
Additionally there may be a Limits available in the dialogue. Pressing this button will open
a small dialogue where the minimum and maximum of the x-axis can be changed, or the
Scale button will reset the settings and scale the axis automatically.
Edit Dialogues
The "Edit" dialogue of the plots can be accessed through double-clicking on the back-
ground of each plot or by selecting Edit in the context sensitive menu. A faster way to
access special information of the plot is to double-click directly on the element which is
to be change. This can be the:
Legend
the legend text and representation can be edited directly.
X-Axis
to edit the x-axis limits, scales and variable representation and auto scaling options
of the current graphics board or panel.
Y-Axis
to edit the y-axis limits, scales and variable representation and auto scaling options
as well as the variable to be shown.
A double-click on other positions will open the plot dialogue.
27 - 31
DIgSILENT PowerFactory Visualization of Results in PowerFactory
Labelling Plots
There are different styles of labels available for labelling curves and graphics. Setting la-
bels is possible in most of the different plots, although some of the labels are not available
in all kinds of plots. The labels are created the same way.
The label option is available from the context sensitive menu whenever a curve or graphic
was clicked and marked with a cross. The option Label −> Insert... Label can be selected
for the different labels. In addition there are two icons and in the toolbar, which
can be used to create labels.
After selecting the appropriate label from the sub-option of label, a rubber band from the
cross to the mouse is shown. A click with the left mouse button sets the label, the right
mouse button cancels. The following different labels are available.
The Text and Value Label
The text-label displays an user defined text above and below a line connected to
the curve with a rubber band. Edit the label to change the text shown.
The value-label displays the x/y coordinates of the cross. The label is a text-label
filled with the coordinates. Edit the label to change the text.
The Format Label
The form-label uses a form to print the displayed text. The form is local for each
label or common to all plots of the same type in the active project.
27 - 32
DIgSILENT PowerFactory Visualization of Results in PowerFactory
Value Value displays the connected curve position of the label. For labels
created as value this position is displayed as label text. "x-Axis''
displays the x axis value, "y-Axis'' the y axis value. "Time'' is visible only
for plots showing a trajectory.
Text on Top Text written above the horizontal line.
Text on BottomText written below the horizontal line.
Delete Label when a new Simulation is started
Some plots show the simulation results. Labels in plots showing
simulation results are deleted when the simulation is started again. To
keep labels in such plots, e.g. to compare curves with the last run, turn
off this option. The default of this option is "on''.
27 - 33
DIgSILENT PowerFactory Visualization of Results in PowerFactory
The different information and parameters for this label are described below:
Value Value displays the connected curve position of the label. "x-Axis''
displays the x axis value, "y-Axis'' the y axis value.
Data Object "Data Object'' is a reference to the shown object. If "Data Objectless
not set the label itself is taken as shown object.
Shown Object The object output by the form, see "Data Object'' described above.
Edit Used Format
Shows the used "Form Manager''. The used format is either the local
format or the one defined for all plots of the same type in the active
project.
Create Local Format
Creates a new "Form Manager'' valid for the current label only. The
forms can be edit without influencing other labels in the same plot or in
the active project. The "Create Local Format'' button is replaced by the
"Set Default Format'' when a local format was defined.
Set Default Format
Removes the local format. The format used is the one used for all plots
of the same type in the active project. The "Set Default Format'' button
is replaced by the "Create Local Format'' when the local format was
reset.
Delete Label when a new Simulation is started
Some plots show simulation results. Labels in plots showing simulation
results are deleted when the simulation is started again. To keep labels
in such plots, e.g. to compare curves with the last run, turn off this
option.
From the context sensitive menu of the format labels more options can be selected
Border A simple border of the selected label can be turned on or off.
Form The format options can be directly accessed by Edit used Format and
Create Local Format for the marked format label.
27 - 34
DIgSILENT PowerFactory Visualization of Results in PowerFactory
Reconnect with...
Reconnects the format label to another curve or data point.
To insert a constant label into a diagram or plot, the option Set constant −> x-Value or
Set constant −> y-Value places a constant x- or a constant y-value into the current plot.
Thus the dialogue for constant the VisXvalue object will pop up (shown in the figure
27.20) and a horizontal respectively vertical line will then be displayed at the value spec-
ified in the dialogue. Also the constant value and (if exist) the value of intersections with
the curves will be shown.
There are different options and styles for the constant label:
Name defines the name of the constant line and will be displayed in the plot.
Style changes the representation of the constant label:
Line Only displays only the solid line and the related label.
Line with Intersections
shows a solid line including label and indicates the values when
intersections with the curves of the plot.
Short Line Only (Left/Right)
indicates the constant value at the bottom/top respectively at the right/
left side of the plot.
27 - 35
DIgSILENT PowerFactory Visualization of Results in PowerFactory
27 - 36
DIgSILENT PowerFactory Visualization of Results in PowerFactory
Curve Filter
Curves shown in the plots and diagram can be filtered using the "Curve Filter". The option
Filter... from the context sensitive menu displays the filters available to be applied to the
data read from the result object. Another way to access this function is from the "edit"
dialogue of the plot. Here the Filter... button can be pressed. The figure 27.21 shows the
dialogue of the function.
The "Curve Filter'' specifies the type of filter applied to the data read from the result ob-
ject. This object is a filter applied to curves in plots. There are different filter types avail-
able. The following filter settings are available. (N=number of points in the original curve,
K=number of points in the filtered curve)
Disabled No filtering will be performed. K=N.
Average The filtered curve is the running average of the last n points. The first
n-1 points are omitted. K=N-n+1.
27 - 37
DIgSILENT PowerFactory Visualization of Results in PowerFactory
Balanced Average
The filtered curve is the running average of the last (n-1)/2 points, the
current point and the next (n-1)/2 points. This filter thus looks ahead of
time. The first and last (n-1)/2 values are omitted, n must be an odd
number. K=N-n+1.
Purge Points by averaging
The filtered curve contains the averages of each block of n values.
K=N/n. This filter may be used to speed up the display of large curves.
Purge Points The filtered curve only contains every n-th value. All other values are
omitted. K=N/n. This filter may be used to speed up the display of
large curves.
Note A curve filter can only be applied at the end of the simulation or
measurement, points added during a simulation or measurement
are not filtered. The option Filter... is not available in all plots.
Border
The option Border in the context sensitive menu will insert or change the border of the
selected plot or diagram. The options available are
• Off
• Simple
• 3D
• 3D with label
The border with 3-dimensional effect and label will insert an additional label on the bot-
tom of the selected plot. This label can now be defined by double-clicking on it. Further-
more the text style can be altered by choosing the option Select Font for Border.
27 - 38
DIgSILENT PowerFactory Visualization of Results in PowerFactory
• Right-click on the VI and select Export... from the context sensitive menu.
Exporting curves of the entire VI panel:
• Press the Export Results... button on the "Results" page of the VI panel.
• Right-click on an empty area of the VI panel and select Export Results... from the
context sensitive menu.
Note If in one plot or on one VI panel variables are shown from several
result objects, a dialogue will appear before the export command,
where you have to select one result file from the list.
This function will export the data from the displayed curve with the given time range as
ASCII text to the following programs/files:
• Output Window
• Windows Clipboard
• Measurement File (ElmFile)
• ComTrade
• Textfile
In this dialogue the individual step size can be set, the columns of the result file and the
header for the export as can be seen from the figure 27.22.
27 - 39
DIgSILENT PowerFactory Visualization of Results in PowerFactory
Various VI Tools
Grid This option in the context sensitive menu displays a dialogue to turn
on/off the available grid lines. For both x- and y-axis a main grid and a
help grid can be displayed in the plots. Furthermore - depending on the
type of plot - the representation of the different ticks on the axes can
also be specified.
Autoscale X, Autoscale Y
Changes the autoscale settings of the plot. Off turns off the auto-scale
mode. On performs an auto-scale at the end of the simulation or
calculation. Online is available in simulation plots only and tests the plot
limits after each new simulation point.These settings can also be
defined in the "edit" dialogue of the x- and y-axes.
x-Scale(s), y-Scale(s)
There are two options in the x-scale or y-scale entry. Edit displays a
dialogue to modify the scale settings like minimum, maximum and
other settings. Scale Automatic calculates the minimum and maximum
of the curve and adapts the scale limits.These settings can also be
defined in the "edit" dialogue of the x- and y-axes or by double-clicking
on the corresponding axis.
27 - 40
DIgSILENT PowerFactory Visualization of Results in PowerFactory
Show dx/dy Right-click on data point on a curve and select Show dx/dy from the
menu. The two lines will appear, which are connected to the tip of the
mouse pointer. A balloon window will show the x- and y-difference
between the selected data point and the point where the tip of the
mouse pointer is in the diagram. Additionally the gradient is displayed.
27 - 41
DIgSILENT PowerFactory Visualization of Results in PowerFactory
With the settings shown in the figure 27.24, mainly the layout of the title block of the VI
panel is edited. Here the user can define
• the different font styles for the various entries of the block by clicking on the buttons
• the height and the width of the columns of the title block (see section 8.3.6)
• the line width of the title block and of the page frame
27 - 42
DIgSILENT PowerFactory Visualization of Results in PowerFactory
In the dialogue the following settings of the axes can be specified for the selected style:
Axis Here the style and width of the axis itself can be changed. Also the
number of small ticks shown between the divisions can be chosen.
Text The number of characters and the digits behind the decimal point as
well as the font type and size can be specified.
Distance between Axis and Text
Arrow The representation can be altered between the normal style and a style
with an arrow at the end of the axis with a certain width and length of
its tip.
27 - 43
DIgSILENT PowerFactory Visualization of Results in PowerFactory
• on the plot itself to access the settings plot style, i.e. the grid, legend, etc.
The figure 27.26 shows all different settings available for the plots on a VI panel. Thus
one can
Grid Options to alter the width, line style and color of the main grid and the
help grid.
Legend Edit the distances from the legend to axis and between the different
legends.
Margins Set spaces between the diagram and the surroundings.
27 - 44
DIgSILENT PowerFactory Visualization of Results in PowerFactory
The result object (ElmRes, ) is used by the PowerFactory program to store tables
of results. The typical use of a result object is in writing specific variables during a tran-
sient simulation, or during a data acquisition measurement. Result objects are also used
in DPL scripts, in reliability calculations, for harmonic analysis, etc.
An example of the result object dialogue is depicted in the figure 27.27.
Note Clearing the data will delete the result-file and will reset the data-
27 - 45
DIgSILENT PowerFactory Visualization of Results in PowerFactory
base ID. This will destroy all calculated or measured data in the re-
sult file. It will not be possible to restore the data.
Exporting Results
The stored results for the monitored result variables can be exported by pressing the Ex-
port button in the result object. This will activate the "ASCII Results Export'' command
ComRes and will pop up the ASCII-results export dialogue, which allows for exporting to
the output window, to the windows clipboard, to a file or to other export formats.
This command is the same command for exporting curve data form a VI plot. This is de-
scribed further in section (Export of Curve Data).
In this dialogue the individual step size can also be set, the columns of the result file and
the header for the export as can be seen from the figure 27.28.
27 - 46
DIgSILENT PowerFactory Visualization of Results in PowerFactory
This function will export the data from the displayed curve with the given time range as
ASCII text to the following programs/files:
• Output Window
• Windows Clipboard
• Measurement File (ElmFile)
• ComTrade
• Textfile
The export command allows for exporting an interval of results only and to export every
n-th result. So the user may define an additional step size n for the export. Additionally a
User defined interval for the time/x-scale can be set as the minimum and maximum value
of the first recorded variable (in time domain simulations this is of course the time).
By default, all the results for all monitored variables are exported. But also a selection of
variables can be made by entering column numbers under the section Columns (Vari-
ables). The header of the exported result table can include either the variable name or its
long or short description.
27 - 47
DIgSILENT PowerFactory Visualization of Results in PowerFactory
When clicking the right mouse button, when the cursor is in the output window area, the
context sensitive menu of the output window appears. The output window can then be
undocked by deselecting the "Docking View'' (by clicking the mouse onto "Docking View"
to 'untick' it). The undocked output window is still confined to the main window, but now
as a free floating window.
27 - 48
DIgSILENT PowerFactory Visualization of Results in PowerFactory
Note This sometimes occurs 'accidentally' when the user left clicks the
tool bar for the output window and drags the mouse (keeping the
mouse button down) to somewhere outside of the output window
boundaries. To rectify this simply left click in the title bar of the un-
docked window and drag it down to the bottom of the screen,
where it will dock once more (if you have right-clicked 'unticked'
"Docking View" to right-click and select "Docking View" once more.
The undocked state is not a normal situation for the output window. Because the output
messages that appear in this window are important at any stage while using the program,
the docked state is the best place because it will be visible then and easy to locate.
The upper edge of the output window shows a splitter bar which is used to change the
size of the output window. The 'drag' cursor, appears automatically when the cursor is
placed on the splitter bar. The left mouse button can be pressed when the 'drag' cursor
is visible. This will turn the splitter bar to grey and the output window can now be resized
by holding down the mouse button and moving the mouse up or down.
The output window may be moved and resized by:
• Dragging the splitter bar as shown in the figure 27.29, when the output window is in
the 'docking' mode
• Double-clicking the frame of the output window to dock/undock it from the main
window.
• Pressing the on the main toolbar, which enlarges the graphics board by hiding
the output window.
• Pressing the icons on the main toolbar, which enlarges the output window
The contents of the output window may be stored, edited, redirected, etc., using the fol-
lowing icons:
Opens an editor and pastes any selected or complete text from the
output window
Either saves the selected text to an ASCII file, or the complete contents
of the output window if no selection was made
Copies the selected text to the Windows Clipboard for use in other
programs
Searches the text in the output window for the occurrences of a given
text. A "?'' wild cart may be used
27 - 49
DIgSILENT PowerFactory Visualization of Results in PowerFactory
Acts like "redirect to disk", but all messages will now be printed directly
Pre-sets the option for the print dialogue. Either chooses printing of the
selected text or all buffered text if no selection was made
To enable the copy and paste of other than normal messages, the corresponding message
categories have to be checked. Only the selected messages will be copied. This means,
for example, that when the information texts are disabled and a block of text is copied in
which the following 4 lines are present:
DIgSI/info - Calculating load-flowDIgSI/info - load-flow iteration: 1DIgSI/
info ------------------------------------------DIgSI/info - Load-flow
converged with 1 iteration
then these 4 lines will not be copied.In most cases only the calculation results are of in-
terest, not the messages that surround them. The errors, warnings, information and pro-
tocol messages are therefore disabled by default.
The other option is to disable all escape sequences in the ASCII export to file, printer or
other editors. These escape sequences are used by PowerFactory to code for text color
and special characters. Other programs may not be able to display the exported text cor-
rectly. The escape sequences have to be disabled in that case.
Additionally the maximum number of lines in the output window can be specified. This
means that if this number is exceeded due to further information displayed in the window,
27 - 50
DIgSILENT PowerFactory Visualization of Results in PowerFactory
the oldest messages will be deleted. The value "-1'' will disable the limit for the number
of lines.
27 - 51
DIgSILENT PowerFactory Visualization of Results in PowerFactory
printed object name was found to be an existing object in the database tree.
These option are
Edit Object will open the edit dialogue of the printed object, which is i.e. the reason
for the error message
Edit and Browse Object
will open the data manager and show the element and its parameters
there.
Mark in Graphic
will mark the clicked element in the single line diagram and zoom into
the region of its place. The interactive feature of the output window is
extremely convenient when 'debugging' a new or changed power
system design. Faulty elements don't have to be searched for in order
to correct their parameters.
27 - 52
DIgSILENT PowerFactory Visualization of Results in PowerFactory
27 - 53
DIgSILENT PowerFactory Visualization of Results in PowerFactory
Which lines will be copied is determined by the output window settings. See section 4.4
for more information. When text from the output window is about to be copied, an info
message will pop up, informing the user about the current settings. See the figure 27.33.
A button is supplied which brings the user directly to the user settings dialogue. The info
message may be disabled, in which case it will never show up again.
27 - 54
DIgSILENT PowerFactory Visualization of Results in PowerFactory
This form editor has a page to change the format by selecting variables, and a page to
manually define a format. What is displayed on which page depends on the input mode
of the Form Editor, which can be change using the button Input Mode.
27 - 55
DIgSILENT PowerFactory Visualization of Results in PowerFactory
with that variable is appended to the form. The User defined button
acts like the input mode "User Selection'' with one important difference.
Where the "User Selection'' mode is used to redefine the complete form
text, the User defined button appends a line for each selected
variables to the existing form text.
Note To use the "Predefined Variables'' is the easiest way to select vari-
ables, if they are accessible from the pull-down list.
If not only the standard variables should be shown, but also addi-
tional ones shall be defined, the best way is to use the option "User
Selection''.
In the figure 27.34, the editor is in the default 'Predefined Variables' mode. The three list-
boxes show the names of the variables, their units and their description.
The three listboxes used for the 'Predefined Variables' mode are replaced by a Select
Variables button in the 'User Selection' mode. Pressing this button will pop up a 'Monitor
Variable Set' dialogue (IntMon) which is used to define a set of variables. The IntMon
dialogue is explained in the next section.
The example in the figure 27.34 shows that the active and reactive power at the element
Xnet have been selected as well as the loading percentage. This selection will produce
three lines of DIgSILENT output language code. This code can be viewed by selecting
the View page. The text editor in this page will be disabled, because a format is selected
in stead of typing in the codes ourselves. However, it still shows the format of our selec-
tion as:
#.## $N,@:m:P:_LOCALBUS
#.## $N,@:m:Q:_LOCALBUS
#.## $N,@:c:loading
This example shows the basic syntax of the DIgSILENT output language:
• The '#' sign is a placeholder for generated text. In the example, each line has a
placeholder for a number with two digits after the decimal point ('#.##'). The first
'#'-sign stands for any whole number, not necessary smaller than 10.
• The '$N' marks the end of a line. A line normally contains one or more placeholders,
separated by non-'#' signs, but may also contain normal text or macro commands.
• After the '$N', the list of variable names that are used to fill in the placeholders have
to be added. Variable names must be separated with commas. Special formatting
characters, like the '@:'-sign, are used to select what is printed (i.e. the name of the
variable or its value) and how.
The mentioned example will produce an result box like
12.34
4.84
103.56
The form editor offers options for the unit or name of the selected variable. If the Unit-
show option is enabled, a second placeholder for the unit is added:
#.## # $N,@:m:P:_LOCALBUS,@:[m:P:_LOCALBUS
#.## # $N,@:m:Q:_LOCALBUS,@:[m:Q:_LOCALBUS
#.## # $N,@:c:loading,@:[c:loading
The '['-sign encodes for the unit of the variables, in stead of the value.
The same goes for the variable name, which is added as
27 - 56
DIgSILENT PowerFactory Visualization of Results in PowerFactory
# #.## $N,@:~m:P:_LOCALBUS,@:m:P:_LOCALBUS
# #.## $N,@:~m:Q:_LOCALBUS,@:m:Q:_LOCALBUS
# #.## $N,@:~c:loading,@:c:loading
Where the `~'-sign encodes for the variable name.With both options on, the produced
format line
# #.## # $N,@:~m:P:_LOCALBUS,@:m:P:_LOCALBUS,@:[m:P:_LOCALBUS
Will lead to the following text in the result box:
P 12.34 MW
Other often used format characters are '%', which encodes for the full variable descrip-
tion, and '&', which decodes for the short description, if available.
27 - 57
DIgSILENT PowerFactory Visualization of Results in PowerFactory
Object
This figure illustrates the variable set for the load object called 'Bulk Load,' which is
found in the 'Grid' folder of the active project. Since a load-flow calculation has just
been performed the load-flow tab has been selected.
Note that if the variable set dialogue has been accessed when editing a results box
or flexible page selector the variables that are chosen are displayed for the entire
class of variable selected in the "object" field. In other words, in this case the 'Bulk
Load' is the selected object so the variable set will be applied to the ElmLod class.
Class Name
If no object has been selected the "Class Name" field becomes active. This is
normally used for more advanced studies and need not be explained further here.
Display Values during simulation in output window (...)
When performing simulation studies over time it is useful to sometimes have the
output values of the selected variables printed to the output window as the
simulation is running. This is achieved by checking this box.
Filter for
As mentioned previously, there are a large number of variables that may be
observed in PowerFactory. To be able to find and select these they are sorted
into sets. A series of filters allows the user to sort through the sets.
Page Tab (here Load Flow)
The load-flow tab has been automatically selected as a prior load-flow calculation
was performed.
Available Variables
All of the variables that are available for display are listed here (as sorted by the
filter).
Selected Variables
The selected variables are shown here. Variables are placed here by highlighting
(selecting) them on the "Available Variables" side and then pressing the
button. Individual variables can also simply be double-clicked to transfer them from
one column to the other.
Display as
If this box is checked then all of the selected variables are shown in the "Selected
Variables" area. If it is not checked then the filter will also apply to the "Selected
Variables" area and only those selected variables in the filtered set will be shown.
The first sorting of the variables is by calculation function (load-flow, short-circuit, etc.).
Within these sets variables are sorted into sub-sets as follows:
Filter for/Variable Set:
• Currents, Voltages and Powers; almost self explanatory- these are the outputs as
calculated by a calculation function. The variable is preceded by "m:" (representing
'monitored' or 'measured') as in "m:P:bus1" for the active power drawn by the load.
The user may select one set for branches and one set for the nodes, which then is
used for each node the edge is connected to.
• Bus Results; variables for the bus/s that the element is connected to (usually
preceded by "n:"). A branch element (having only one connection to a bus) will
obviously only have results for "Bus1." An edge element (two connections, as in a line
for example) will have "Bus1" or "Bus2." This means that the results for objects can
be accessed that are connected to the object that the list is compiled for. An example
27 - 58
DIgSILENT PowerFactory Visualization of Results in PowerFactory
of this variable is the open end voltage at a line end. See following for a more
complete explanation of usage. Also see section (Bus1, Bus2, Bushv, Buslv and
Localbus Explained) for more on Bus1, Bus2, etc.
• Signals; variables that are used between models (inputs and outputs) and are
preceded by "s:". These should be used when creating a controller or in a DPL script.
These variables are accessible whilst an iteration is being calculated, whereas the
other variables sets are calculated following an iteration.
• Calculation Parameter; variables (such as loading, or losses) that are derived from the
'core' calculation, or are derived from input data, such as absolute line impedance
(derived from impedance/ km * line length), or have been transformed from input
data to a format useful for calculation (actual to per unit), or that are required for
such transformation (e.g. nominal power). The parameters that actually are available
depend on the object type. Preceded by "c:".
• Element Parameter; variables that belong to the directly to the object selected
(preceded by "e:"). For general use, where the selected object is an Element (as
opposed to a Type) this will mean that these are indeed Element variables and the
user need not trouble themselves further. For further explanation please see the note
at the end of this section.
• Type Parameter; type variables that are linked to the element object under
consideration; for example, the current rating of a line type that a line element is
using.
• Reference Parameter; these are variables from objects that are linked or connected to
the object under consideration (preceded by "r:"). For example, a line element may
be part of a line coupling and the reference parameter will allow us to display the
name of the coupling element. The use of reference parameters is explained
following.
Buttons on the right of the dialogue are:
• Balanced toggles between the balanced and unbalanced variable set.
• goes to the manual input page for variables- for advanced use.
• Print Values prints the current values for all the selected variables to the output
window.
• Variable List prints a list of all available variables to the output window.
• Variable List (Page) prints a list of available variables for the current tab (e.g.
Basic Data) to the output window.
For general use it is sufficient to simply select the variables required and transfer them to
the selected variables column. To find a particular variable requires some knowledge of
where the variables are stored in the object under consideration. As an example display
following information is displayed
• type name,
• the tap setting,
• the nominal and calculated voltages at the HV node for a particular transformer.
These variables may need to be displayed on the single line diagram so we will start by
creating a textbox and editing its format, which is described later in this section. These
variables may also be displayed in the flexible data tab - the process is the same.
27 - 59
DIgSILENT PowerFactory Visualization of Results in PowerFactory
The name of the transformer type is entered in the type data so we select the type pa-
rameters (as the Variable Set) in the filter- the name is also entered on the basic data tab
so we should select the Basic Data Tab, and the type name parameter is "loc_name". No-
tice that the focus object for the variable set object is a transformer. This has been auto-
matically selected since we created a textbox for the transformer by right-clicking it.
The tap setting will be found in the element data and the parameter is located on the
load-flow tab (this information is gained as the user becomes more familiar with Power-
Factory and recalls where the data was entered; such recollection directs the user to the
correct variable sub-set). The variables seen in the selected Variables column should now
be:
t:loc_name
e:nntap
To now be able to see the variables for the HV bus we use the reference parameters. The
reference parameters work like a 'refer to' command. In the figure 27.38 this is illustrated
schematically. We have started by creating a variable set for the object 'TX1' which is an
element object. Using the reference parameter we will refer to the object that the LV side
of the transformer is connected to, which is the cubicle ’Cub_1’. Since the nominal and
calculated voltages of the node are located in the node object itself we will next need to
refer to this node object ’LV’.
27 - 60
DIgSILENT PowerFactory Visualization of Results in PowerFactory
In a step by step fashion the process will now be shown. We first need to refer to or 'jump
to' the cubicle. If we picture the input dialogue for the transformer element we recall that
the connections for the HV and LV sides are listed on the basic data tab, so this is where
we will logically find the 'link' to the connected object (the cubicle). In the figure 27.39
we can see that this selection has been made (page tab Basic Data). We also notice that
the object that is presently the focus is the transformer element as the object. To affect
the jump to the cubicle we choose the reference parameter set, and then select the object
that we want to jump to, the cubicle connected to the HV side in the Available Variables
list.
27 - 61
DIgSILENT PowerFactory Visualization of Results in PowerFactory
Double-clicking on this jumps us to another variable set object whose focus object is the
cubicle that the LV side of the transformer is connected to. It is not immediately obvious
that the jump has occurred as the new variable set object appears directly on top of the
original one. If grabbing the one that appears before you and drag it to one side it will
become more obvious (you can also see this by noting that the name in the "Object" field
has changed), and will look as shown in the figure 27.40.
The second jump must now be affected - to the node that the cubicle is connected to. In
a logical fashion this 'connectivity' is also found on the basic data tab. The figure 27.41
shows the result of these jumps in PowerFactory. Lastly, the parameter required must
be selected.
27 - 62
DIgSILENT PowerFactory Visualization of Results in PowerFactory
The parameter we wish to display is the nominal voltage of the connected node. This will
be found on the Basic data tab and we must choose the element parameter set to find
the parameter, as shown in the figure 27.41. The parameter is called:
uknom kV Nominal Voltage: Line-line
At this point we could also add the calculated voltage for the node. This will be found un-
der "Currents, Voltages and Powers" on the load-flow tab.
After having clicked OK until you are back at the original variable set object you will see
that these referenced variables have been added as:
r:buslv:r:cBusBar:e:uknom
r:buslv:r:cBusBar:m:U
which can be read as −> 'jump to the LV bus' −> 'jump to the connected node' −> 'display
the selected variables.'
Once the user is more familiar with this nomenclature this jump may be typed in directly
to the variable set object. The understanding of this is also useful for writing DPL scripts.
27 - 63
DIgSILENT PowerFactory Visualization of Results in PowerFactory
These bus results can only be seen in the calculation function tabs and they are drawn
from an internal node that is not displayed on the single line graphic. An illustration of this
node and its relationship to the cubicle is shown in the figure 27.42.
An additional example on the use of reference parameters is the display of conductor
types (*.TypCon) for a line element (*.ElmLne) that uses a tower type (*.TypTow). Once
the variable set manager for the line is displayed, the basic data tab is selected, then the
reference parameter set, and the referenced variables, of which the conductor types are
one, is displayed. Once again this is a convenient shortcut that has been made for this
combination of element and type.
27 - 64
DIgSILENT PowerFactory Visualization of Results in PowerFactory
Should the tower be close to another tower, and thus be coupled by a coupling element
however, the coupling element object must first be referenced.
The procedure would be:
• select the reference parameter set on the basic data tab (assuming that one have
started at the variable set object for the line element),
• double-click the "c_ptow Line Couplings" variable (or select it and then press the
arrow button to transfer the variable to the "Selected Variables" column),
• select the "loc_name Name" variable and transfer it to the "Selected Variables"
column,
• press "OK" until returned to the graphic or flexible data tab.
Note In the above examples we have used the element parameter set
to access variables of the element class (*.Elm* - what we 'tradi-
tionally' know as elements in PowerFactory). However, it should be
borne in mind that "Element Parameter" actually refers to the pa-
rameters of the focus object.
For example, if we have referenced the variable set from a line el-
ement -> (then to) line coupling -> tower type -> conductor type
the focus object is already a type and "Element Parameters" refers
to the parameters of the type object itself.
27 - 65
DIgSILENT PowerFactory Visualization of Results in PowerFactory
The ends of an edge element are named "bus1" or "bus2" and "bushv" or "buslv" respec-
tively (a three winding transformer will also have "busmv"). These ends are matched to
the "i" and "j" sides so that i −> bus1 or bushv and j −> bus2 or buslv. Thus, when choos-
ing variables from the flexible page manager the user should specify which side of the
edge element the variables are to be taken from. Note that "bus1, bus2, bushv, bus-
lv" are not references to the connected node, they are in fact the ends of the
edge element.
When a variable is selected for display from the single line graphic the user will notice a
further classification, that of "_LOCALBUS." This classification merely indicates the end of
the edge element and describes internally which side of the edge element the result box
should access its variables from. That is the 'bus' local to that end.
Almost all textual output that is produced in PowerFactory, is defined by a report form.
The use of report forms range from the simple and small result forms that specify the
contents of the single line result boxes to large and complex forms that are used to print
out complete system reports.
In all cases, the text in the editor field of a IntForm object specifies the report that is to
be generated. For result boxes, that text is normally created automatically in the IntForm
dialogue by selecting "Predefined Variables'', or any other set of variables, and some ex-
tra's such as the number of decimals and if an unit or name should be shown. These op-
tions will automatically create a report form. That automatic form is normally used as it
is, but it may be altered manually. This is shown in the figure 27.43, where report format
is changed such that the variable name of the loading factor is deleted and replaced by
27 - 66
DIgSILENT PowerFactory Visualization of Results in PowerFactory
the fixed text 'ld', because the variable name "loading'' is felt too long compared with the
names of the other two variables ("P'' and "Q''). The shown format will produce result box-
es like
P 12.34 MW
Q 4.84 Mvar
ld 103.56 %
Defining single line result boxes only asks for a basic understanding of the DIgSILENT
output language. For more complex reports, many different variables from all kinds of ob-
jects have to be printed as listings or tables. Such a report would require macro handling,
container loops, selection of parameters, headers, footers, titles, colors, etc. The DIgSI-
LENT output language offers all this, and more.
The basic syntax, which is primary used for defining result boxes is given in the following
overview.
Placeholders
A placeholder for strings like variable names or whole numbers is a single '#'-sign. For
real numbers, the placeholder consists of
• a single '#' for the integer part
• a point or comma
• one or more '#'-signs for the fractional part
The number of '#'-signs after the decimal point/comma defines the number of decimals.
The '#'-sign itself can be included in user-defined text by typing '\#'.
27 - 67
DIgSILENT PowerFactory Visualization of Results in PowerFactory
27 - 68
DIgSILENT PowerFactory Visualization of Results in PowerFactory
argument:
idx: index of branch, the currently set bus index is used when idx<0
example:
CUBIC(0):e:loc_name
returns name of cubicle at busindex 0
TITLE
Gets the title that is set in the output command (ComSh or ComDocu)
example:
TITLE:e:annex
writes annex of title
VARIANT
Gets the active variant in which the current object is stored
example:
VARIANT:e:loc_name
writes the name of the variant
NET
Gets the grid in which the current object is stored
example:
NET:e:loc_name
writes the name of the grid
CMD
Returns the last calculation command, i.e. a Short-Circuit (ComShc), Load-flow
(ComLdf),...
example:
CMD:pabs
writes the short-circuit position on the line after calculation of a short-circuit.
CASE
Returns the currently active calculation case
example:
CASE:e:loc_name
writes the name of the active calculation case
DEF
Returns the default object. The default object depends on the currently processed
output.
example:
DEF:e:loc_name
writes the name of the default object
STALNE
Returns the station if the current object is a busbar. Returns a line if the current
object is a terminal between line routes. Otherwise, nothing is returned, and the
entry will be ignored.
example:
STALNE:e:locname
writes the name of the line or station.
27 - 69
DIgSILENT PowerFactory Visualization of Results in PowerFactory
RES
Returns the currently active results object (ElmRes) used by simulation, harmonics
or other calculation modules
example:
RES:e:desc
writes the first line of the description of the results object
Color
A line can be set to another color by adding a '_LCOL(c)' command directly after the '$N,'
marker. This will color the whole line according to the color number c.
a black i gray
c red k bordeaux
g cyan o marine
iA single item can be colored by using the '_COLOR(Variable name; color code)'.
27 - 70
DIgSILENT PowerFactory Visualization of Results in PowerFactory
a loop command. Line type codes may be made language dependent by adding a 'E', for
English lines or a 'G' for German lines, i.e. '$HG' specifies a German header line.
A report format must at least contain one normal ($N) line.
The following commands are used for page and line controls. They can only be used di-
rectly behind the line type codes '$N', '$F' or '$H'.
_PAGEBREAK
Forces a page break after the current line
_AVAILBREAK
Enables page breaking after the current line (default)
_NOBREAK
Disables page breaking directly after the current line
_LCOL(c) Changes the color of the current line, c is the color code.
_OBJ(ClsNam)
The current line will only be used for objects from the class "ClsNam''.
_BUS(inum) The current line will only be used for objects which connect to exactly
inum nodes
_FIRST The current line will only be used when the loop index is 0 (first
passage)
_NFIRST The current line will only be used when the loop index is not 0 (all but
the first passages)
_IF(boolean expression)
The current line will only be written when the expression is true.
Example: _IF(m:u:bus1>0.95)
_IFNOT(boolean expression)
The current line will only be written when the expression is false.
Example: \IF(m:u:bus1<0.95)
Example:
| #.## # #.## # #.## |$R,_NOBREAK, ..
27 - 71
DIgSILENT PowerFactory Visualization of Results in PowerFactory
27 - 72
DIgSILENT PowerFactory Visualization of Results in PowerFactory
Device Data
Use Selection
The set of reported elements depends on the "Use Selection'' setting. If "Use
Selection'' is checked one element or a "Set'' object must be chosen for output. If
"Use Selection'' is not checked the "Filter/Annex'' page specifies the set of elements
for the report. This page is described further down. Another way to select object
for the report is to select the objects in the "Data Manager'' or the "Single Line''
graphics and select "Documentation'' in the "Output'' entry of the context menu.
The "Output of Device Data'' command will pop up.
Annex
Each class uses it's own annex. There is either the default annex or the individual
annex. To use the default annex check "Use default Annex''. Changes of the annex
are stored in the "Changed Settings'' of the active project. The local annex is stored
27 - 73
DIgSILENT PowerFactory Visualization of Results in PowerFactory
in the "Output of Device Data'' command. To modify the local annex press the
"Change Annex'' button. See section (The Annex for Documentation) for details.
Title
Most reports display a title on top of each page. The reference "Title'' defines the
contents of the header.
Filter/Annex
If one wants to report elements without defining a set of objects "Use Selection'' on the
"Device Data'' page must not be checked. The objects in the list "Selected Objects'' will
be filtered out of the active projects/grids and reported. "Available Objects'' shows a list
of elements which can be add to the "Selected Objects'' list. The list in "Available Objects''
depends on the "Elements'' radio button. Elements in the left list are moved to the right
by double-clicking them. The text in the "Annex'' input field will be set as default annex
for the selected class.
27 - 74
DIgSILENT PowerFactory Visualization of Results in PowerFactory
Objects This column shows the different classes with their title.
Annex This column stores the annex number shown in the Annex field of the
report.
First Page This column defines the start page for the class in the report. The first
page number depends on the class of the first element output in your
report. The page number of its class is the page number of the first
page.
27 - 75
DIgSILENT PowerFactory Visualization of Results in PowerFactory
27 - 76
DIgSILENT PowerFactory Interfaces with Other Programs
Chapter 28
Interfaces with Other Programs
The simulation event is defined for the load, where the reactive power is increased after
0.5 seconds.
28 - 1
DIgSILENT PowerFactory Interfaces with Other Programs
28 - 2
DIgSILENT PowerFactory Interfaces with Other Programs
After the simulation the resulting plots show busbar voltages and excitation voltage for
both generators. The results are stored in result files located on "Results'' folder of the
according study case.
These results from the reactive power step in the load can be seen as dotted curves in
the figure 28.8. Here the generator terminal voltage (controller input) and the excitation
voltage of both generators is shown. Thus the response of the AVR can be seen from
here.
• using the "New Object'' icon in the database manager and selecting Block
Definition (BlkDef).
• double-clicking an new/empty block reference in an open block diagram and then use
the button to select a block definition. Then The icon can be used to create a
new block definition inside the local library.
Now open the dialogue of the new BlkDef
• by double-clicking on the frame of a composite block definition
• by double-clicking the definition in side the library or on its icon
Here input and output variables, parameters, state variables and limiting signals have to
be defined. Instead of inserting the equations to describe the different function blocks, a
28 - 3
DIgSILENT PowerFactory Interfaces with Other Programs
Matlab file *.m can be selected, when the option Matlab is activated.
The edit dialogue of the block definition including the parameter definition and the select-
ed file can be seen in the figure 28.4 for the mentioned example.
The model representation of the ElmVco__16 in the Matlab Simulink package is shown
in the figure 28.5.
When the block definition is specified, a DSL model has to be created first. As described
in 23.4 (The Common Model), the common model element (ElmDsl, ) is the front-end
28 - 4
DIgSILENT PowerFactory Interfaces with Other Programs
object for all user-defined block definitions. This means that all user-defined transient
models including built-in elements or Matlab models cannot be used other than through
a common model.
The common model then combines a model or block definition with specific set of param-
eter values. The edit dialogue of the DSL element now looks different to the built-in Elm-
Vco. From the figure 28.6 can be seen, that this dialogue is similar to the normal DSL
models. All time constants and other parameters are the same as for the built-in VCO
models.
The figure 28.7 shows the composite model using the special frame with the generator
'G1' and the Matlab-AVR inserted into the slots.
28 - 5
DIgSILENT PowerFactory Interfaces with Other Programs
These results from the simulation of the reactive power step using the built-in VCO model
(dotted curves) and using the Matlab representation (solid curves) can be seen in the fig-
ure 28.8.
Fig. 28.8: Results of the transient simulation with the Built-In model
28 - 6
DIgSILENT PowerFactory Interfaces with Other Programs
Those variables are necessary to successfully run the Simulink model. There are three in-
put signals (U, Estop, Upss), one output signal Uerrs and two state variables x1 and x2.
In each step of the PowerFactory simulation the Simulink model is completely evaluat-
ed. State variables ('InitialState') are assigned to Simulink model in each step of the sim-
ulation. For PowerFactory it is a simple function call:
[t, x, y] = VCOtype16.
PowerFactory uses only one Simulink model for both generators. To avoid limitation of
Simulink, which allows only one instance of the model running at the same time, Power-
Factory must send all parameters in the each step of the simulation.
To find appropriate equations for the initial conditions you need to understand the con-
struction of the transfer function blocks in Simulink. To obtain this understanding you
can replace the variables with actual numbers in the Matlab Simulink model, set the
initial conditions, run it for a few seconds and monitor the outputs of all transfer functions
to see whether the model initialized correctly.
The Matlab Simulink model (.mdl) and the interface file (.m) file may not have the same
name.
The order of the state variables in the interface file's statement "options = simset('Initial-
State', [x1, x2, …….])" is important; the order of the elements in the vector [x1, x2, …]
must be the same as in the state variable vector constructed internally by Matlab. To de-
termine the order of the Matlab state variable vector the user may use the command "[siz-
es,x0,xstring]= ModelName" in the Matlab workspace, where ModelName is the name
of the Simulink model (without the .mdl extension and without inverted commas). The
output of the string variable xstring contains the names of the dynamic blocks in the Sim-
ulink model in the desired order. In the case of the above example the first state variable
is in the measurement block and the second state variable is in the integrator:
xstring =
...'VCOtype16_model/Measure/State Space'
...'VCOtype16_model/Integrator'
The names of the variables in the 'Initial conditions' fields in the masks of the Simulink
model dynamic blocks is irrelevant.
28 - 7
DIgSILENT PowerFactory Interfaces with Other Programs
The initial conditions are set within Power Factory. Also, for the purpose of Power Facto-
ry's model checking mechanisms, the state derivatives equal to zero
The Simulink solver parameters are set to integrate over one small time step, e.g. start
time = 0, end time = 0.01, and step size = 0.01.
The y-matrix returned by MATLAB contains the output variables. If more than one output
variable is defined in the DSL model, then those are sorted alphabetically before assign-
ing the outputs from MATLAB. For example, if there are two outputs "uerrs" and "out-
put", then the value from the first column of the y-matrix is assigned to "output" and the
value from the second column is assigned to "uerrs".
File Definition
The first line of a DOLE file configures the DOLE interface and must have the following
definition:
dole [/fkey][/dbupd][/gupd][/mm] langue= level=
/fkey use for all DOLE commands foreign keys. Set option /dbupd
/dbupd update database while reading dole file
/gupd update graphic while reading dole file
/mm graphic coordinates in mm (command ComGrp), PowerFactory uses
internally coordinates in mm/87.5 !
28 - 8
DIgSILENT PowerFactory Interfaces with Other Programs
Create - Command
The Create command creates new objects in the PowerFactory database and has fol-
lowing definition:
create [/sec][/rou][/noswt] objname.classname [name=....]
objname name of the new object
classname class type of the new object, i.e. ElmLod (General Load), ElmSym
(Synchronous Machine), TypSym (Type of Synchronous Machine), etc.
/sec creates Line Sub-Sections
/rou creates Line Routes
/noswt in combination with /rou, set switch insert mode to false, default =
true
name Names of Line Routes, Line Sub-Sections, with /sec: name=section
name 1,section name 2,... with /rou : name=[term. x],route 1,term
1,route 2 ...
Examples for the Create - Command:
create .\Example 1.ElmNet
Creates a grid with name Example 1
Create .\Example 1\Load 1.ElmLod
Creates a general load in the Example 1 folder with name Load 1
create .\Example 1\Line 1.ElmLne
Creates a line in the Example 1 folder with name Line 1
create .\Grid 2.ElmNet\Gen 1.ElmSym
Creates a grid with name Grid 2 if not exists and create a synchronous machine in the
folder Grid 2 with name Gen 1
28 - 9
DIgSILENT PowerFactory Interfaces with Other Programs
Additional functions
By default the command inserts switches between line routes. With the option /noswt
the command does not insert switches. Change the default if wanting to insert a tilde ('~')
before or/and behind the name of the terminals.
Default switch insert
create/rou .\Example 1\Line 1 name=,Route 1,Term 1~,Route 2
A switch is inserted between Route 1 and Term 1
No switch is inserted between Term 1 and Route 2
create/rou .\Example 1\Line 1 name=,Route 1,~Term 1,Route 2
No switch is inserted between Route 1 and Term 1
A switch is inserted between Term 1 and Route 2
Option /noswt, no switch insert
create/rou/noswt .\Example 1\Line 1 name=,Route 1,Term 1~,Route 2
No switch is inserted between Route 1 and Term 1
A switch is inserted between Term 1 and Route 2
create/rou/noswt .\Example 1\Line 1 name=,Route 1,~Term 1,Route 2
A switch is inserted between Route 1 and Term 1
No switch is inserted between Term 1 and Route 2
Set - Command
The Set command is used for defining variable sets and modify values of these sets. The
command has the following definition:
set [/def][/fkey][/cls] obj=name [var=...][val=...]
/def Define a variable set for all elements from type name
/cls Clear all variable sets
/fkey Interpret 'name' as foreign key, this switch is ignored with dole/fkey
var= List of variable names etc. var=plini,qlini,...
val= List of values etc. val=,10.3, 2.5, .... (first character = used delimiter)
28 - 10
DIgSILENT PowerFactory Interfaces with Other Programs
Additional functions
The set command takes the last object created with the create - command when
"obj=blank'' is used.
set/def obj=ElmLod var=plini,qlini
create .\Grid 1\Load 1.ElmLod
set obj= val=10.5, 1.3
set plini, qlini of the object Load 1 to 10.5 and 1.3
set/def obj=ElmStactrl var=qsym:SIZE,qsym:ALL
Set values and size of a vector (table):
SIZE: change the size of the vector
ALL: set all values of the vector
set obj=Stactrl 1 var=5,20,25,35,7,13
Element Stactrl 1: qsym[0]=20,qsym[1]=25 ...
size of qsym = 5
set/def obj=ElmDsl var=params:LIST:table1_R
Set DSL Parameter:
set obj=Dsl 1 val=No,vname1:2,vname2:1.25,vname3:2.3,vname4:125
Special syntax of ElmDsl
No: number of following parameters (here No=4)
name of parameter : value of parameter, ....
Connect - Command
The Connect command connects edge elements (Lines, Loads, Machines, etc.) to bus-
bars and terminals and has the following definition:
connect name [b1=bus1][ib1=] ... [b4=bus4][ib4=]
name name of element
b1,..,b4 names of the terminal or busbar bus1..bus4
ib1,..,ib4 connection mode (0 or 1)
mode=0: switch opened, mode=1: switch closed
PowerFactory connects the edge elements to the busbars or terminals (bus1, bus2,...)
and creates (if necessary) for all busbars automatically cubicles and switches.
Examples for the Connect command
connect .\Line_10kV b1=.\SS1 ib1=1 b2=.\SS2 ib2=1
Connect a line (Line_10kV) to the terminals SS1 and SS2
connect .\Tr_10_15 b1=.\SS2 ib1=1 b2=.\STAT_1\SS3 ib2=1
Connect a Transformer (Tr_10_15) to the terminal SS2 with the high voltage side and to
the busbar SS3 in station STAT_1 with the low voltage side.
28 - 11
DIgSILENT PowerFactory Interfaces with Other Programs
Buscnf - Command
The Buscnf command is used for renaming switches and cubicles which are created with
the connect command or the create/rou command.
buscnf cubn=cubicle name swtn=switch name
cubn set the name of the cubicle to cubicle name
swtn set name of the switch to switch name
Example for the Buscnf - Command
connect .\Line_10kV b1=.\SS1 ib1=1 b2=.\SS2 ib2=1
buscnf cubn=Cub 0.1 swtn=S 0.1
renames the cubicle and switch which connecting SS1 with Line_10kV (terminal i)
buscnf cubn=Cub 0.2 swtn=S 0.2
renames the cubicle and switch which connecting SS2 with Line_10kV (terminal j)
connect .\trf_10/100 b1=.\SS10 ib1=1 b2=.\SS20 ib2=1
buscnf cubn=Cub_1 swtn=S_1
renames the cubicle and switch connecting SS10 with trf_10/100 (HV - Side)
buscnf cubn=Cub_2 swtn=S_2
renames the cubicle and switch connecting SS20 with trf_10/100 (LV - Side)
create/rou .\Example 1\Line name=,Route 1,Term 1,Route 2, ...
... Term 2,Route 3
buscnf cubn=C_R1 swtn=S_R1
renames the cubicle and switch which connecting Route 1 with Term 1
buscnf cubn=C_R2 swtn=S_R2
renames the cubicle and switch which connect Term 1 with Route 2
buscnf cubn=C_R3 swtn=S_R3
renames the cubicle and switch which connect Route 2 with Term 2
buscnf cubn=C_R4 swtn=S_R4
renames the cubicle and switch which connect Term 2 with Route 3
Ifupd Command
The Ifupd command is used for composite models to update the interface and insert ref-
erences.
ifupd mod=name objs=object1,object2,object3...
mod name of the composite model
objs list of object names to insert references into the composite model
Example for the Ifupd - Command
ifupd mod=Comp1 objs=Gen 1,Busbar 1
inserts into the composite model Comp1 two references points to Gen 1 and Busbar 1 and
updates the interface.
Echo Command
The Echo Command is used for printing information messages into the Output Window of
PowerFactory.
Example for the Echo- Command:
echo Reading Transformer Data
Prints into Output Window: "DIgSI/Info Reading Transformer Data''
28 - 12
DIgSILENT PowerFactory Interfaces with Other Programs
Activate Command
The Activate Command is used to activate or deactivate projects and study cases. Calcu-
lations are only possible after a study case has been activated.
ac [/de] [ name | all ]
name name of the project or study case
/de deactivate
all Deactivates the currently active project and study case
Examples
ac \User\Factory\20kV
Activates the project or study case 20kV in the folder \ User\ Factory
ac/de \User\Distribution\Shc1
Deactivates the project or study case Shc1 in the folder \ User\ Distribution
New Command
The New Command is used to create a new visual object. Visual objects are all objects
which can be displayed graphically in a single line or a block diagram.
Syntax:
new /sgl | /blk | /vis [pTarget=target] [sName=name]
/sgl Creates a new grid with a corresponding single line graphic. The
command will automatically activate the newly created grid.
/blk Creates a new block diagram.
/vis Creates a new virtual instrument panel.
pTarget= Specifies the folder in which the new object should reside. The default
value for this parameter is '\ User '
sName= Specifies the name of the object to create. The default value for this
parameter is "noname''
Example
new/sgl pTarget=\User\Factory sName=20kV
This will create the new grid with the name 20kV and the corresponding single line graphic
in the folder \ User\ Factory .
28 - 13
DIgSILENT PowerFactory Interfaces with Other Programs
Syntax:
grp/new [obj=] [sFKey=] symbol= pos= [size=] [iRot=] [sAttr=] [iNamVis=]
[iResVis=]
obj= Specifies the complete name (incl. path) of the corresponding data
object. If this data object exists it will be linked to the created graphic
object, if not it will be created, too.
sFKey= Specifies the value for the foreign key (parameter 'for_name') of the
data object. This parameter can be used to identify the created object
by later commands or interactions. Therefore it must be unambiguous
in the complete database and can be considered as an unique foreign
key for all objects in the PowerFactory database.
symbol= The identifier name for the graphical symbol which is used to represent
the created object in the graphic.
• "symbol=__HGRAF__'' is used to create auxiliary graphic objects for illustrating
purposes.
• "symbol=__BREAKER__'' is used to insert breaker switches in single line
graphics. Breakers in single lines are not represented by real graphic objects.
They are only virtual instruments which show the summary switch mode of a
complete feeder.
• In PowerFactory the insertion of compound objects into a graphic is possible
by specifying a compound symbol. This means, that with one grp/new command
it is possible to insert several graphic objects representing a complex data
object. This is, for example, used in single line graphic windows to insert a
complex busbar system into the drawing.
pos= A list of coordinates used to insert the created object into the drawing.
The coordinates are separated by a comma. Each coordinate consists
of two values (one for the dimension x and one for the dimension y),
separated by a comma. For node objects only one position is
necessary. For branch objects the coordinate list should contain the
same positions as if the object will be interactively entered into the
graphic window (see PowerFactory Users Manual - Chapter 'Graphic
Windows', 'Adding New Power System Elements'). 'Double-clicks' are
simulated by entering the same position twice.
size= This options allows to specify a graphical size different from the default
for the created object. The default value is determined by the used
symbol.
iRot= This options allows to specify a graphical rotation angle different from
the default for the created object. The value for the angle must be
entered in degrees (0-360) and is counted counterclockwise. The
default value is determined by the used symbol.
iNamVis= Specifies whether the name attribute of the created object is visible in
the drawing. Name attributes are defined by the appropriate symbol
definition. The possible values for this parameter and their meaning
are:
0 Do not show name attributes
1 Show name attributes
-1 Take the default value from the symbol definition
28 - 14
DIgSILENT PowerFactory Interfaces with Other Programs
iResVis= Specifies whether the result attribute(s) of the created object are
visible in the drawing. These attributes are defined by the appropriate
symbol definition. The possible values for this parameter and their
meaning are:
0 Do not show result attributes
1 Show result attributes
-1 Take the default value from the symbol definition
sAttr= In the create mode of the Graphic command this parameter can
contain a definition of an additional geometry object to visualize the
created objected. The syntax for the geometry object definition is the
same as is used by the symbol definition (see syntax description of the
symbol definition).
&Hint: to transform coordinates from mm to the internal coordinate
space, please divide by 87.5, even if dole/mm was set.
Examples
grp/new sFKey=99/KT05 symbol=ShortTermStrip size=0.1 ...
... pos=0.65,1.25
This will create a new graphic object with according to the definition of the symbol
'ShortTermStrip'. The graphic object will get the position (0.65/1.25) and the size 0.1. If
the PowerFactory database contains an appropriate data object (a Terminal) with the
foreign value '99/KT05' it will be linked to the created graphic object, otherwise it will be
created and linked, too.
grp/new obj=User\Factory\20kv\TR015 symbol=d_tr2 ...
... iResVis=0 pos=0.65,0.75,0.65,1.05,0.65,1.05,0.65,1.25
This will create a new graphic object according to the definition of the symbol 'd_tr2'. The
object (a Transformer) will be connected with the busbar or terminal referenced by the
position (0.65/0.75) and the busbar or terminal referenced by the position (0.65/1.25).
The position of the created object will be (0.65/1.05) using a simulated double-click. Result
attributes for the object will not be visible. If the PowerFactory database contains an
appropriate transformer with the specified complete name (inclusive the path) it will be
linked to the created graphic object, otherwise it will be created and linked, too. If it is
created, the topology of the data objects will be taken from the graphical topology,
otherwise the graphical topology must match the given topology at data object level.
grp/new symbol=d_lin pos=2.55,0.35,2.75,0.35,2.75,0.80, ...
... 3.1,0.8
This will create a new graphic object and a new data object according to the definition of
the symbol 'd_lin'. The object (a Line) will be connected with the busbar or terminal
referenced by the position (2.55/0.35) and the busbar or terminal referenced by the
position (3.1,0.8). The other given coordinates represent intermediate line points.
28 - 15
DIgSILENT PowerFactory Interfaces with Other Programs
• Identify objects by entering the positions of the object in the drawing with the
parameter 'pos'.
• If only one coordinate is entered, the coordinate will have to lay inside the
surrounding rectangle of the desired object. By entering more than one coordinate
more than one object can be referenced. Then the coordinates are interpreted as
points of an imaginary polyline in the drawing. Objects are referenced if their
surrounding rectangles will be intersected by this imaginary polyline.
Syntax:
grp/mod obj= | sFKey= | pos= [size=] [iRot=] [iNamVis=] [iResVis=]
obj= Used to identify a graphic object via the complete name (incl. path) of
the linked data object or the complete name (incl. path) of the graphic
object itself.
sFKey= Used to identify a graphic object via the foreign key of the linked data
object or the foreign key of the graphic object itself.
pos= A list of coordinates used to identify the object(s) in the drawing. The
coordinates are separated by a comma. Each coordinate consists of two
values (one for the dimension x and one for the dimension y),
separated by a comma (see description above).
size= This options allows to specify a new graphical size for the referenced
object(s).
iRot= This options allows to specify a new graphical rotation angle for the
referenced object(s). The value for the angle must be entered in
degrees (0-360) and is counted counterclockwise.
iNamVis= Specifies whether the name attribute of the object(s) is (are) visible in
the drawing. Name attributes are defined by the appropriate symbol
definition. The possible values for this parameter and their meaning
are:
0 Do not show name attributes
1 Show name attributes
-1 Take the default value from the symbol definition
iResVis= Specifies whether the result attribute(s) of the created object(s) is (are)
visible in the drawing. These attributes are defined by the appropriate
symbol definition. Possible values for this parameter and their meaning
are:
0 Do not show result attributes
1 Show result attributes
-1 Take the default value from the symbol definition
Examples
grp/mod size=1.15 pos=0.65,0.8
This will change the size of the graphic object whose surrounding rectangle is referenced
by the position (0.65/0.8).
grp/mod obj=\User\Factory\20kv\bus23 iRot=90
This will change the rotation angle of the graphic object whose linked data object has the
complete name (incl. path) \ User\ Factory\ 20kv\ bus23.
28 - 16
DIgSILENT PowerFactory Interfaces with Other Programs
Note Note that it is not necessary that you specify values for all identi-
fied objects. The list of referenced objects is sorted in increasing
order according to their intersection with the points of the imagi-
nary polyline given by the parameter 'pos'.
Example
grp/sfk symbol=d_bus_h pos=0.25,0.7,0.25,1.0 sAttr:0=99/2b ...
... sAttr:1=99/1a
This will set the foreign key values for two data objects whose linked graphic objects are
first intersected by the imaginary polyline with the start point (0.25/0.7) and end point
(0.25/1.0) and whose symbol name is 'd_bus_h'.
28 - 17
DIgSILENT PowerFactory Interfaces with Other Programs
• active and reactive power flow, voltage profile, system losses and reactive power
compensation requirements
• general fault analysis
• system losses optimization
• spinning reserve and load shedding supervision and optimization
• analysis of measures for system oscillation stabilization
The access to previously stored data allows the analysis of any occurred fault or otherwise
specific situation needed to be studied. In this case, the main advantage of accessing
SCADA history files is the ability of updating power system data easily without being
forced to edit any data manually.
PowerFactory SCADA interfacing has been realized in a very general manner, ensuring
that a PowerFactory SCADA on-line link can be realized with nearly any SCADA hard-
ware and software.
28 - 18
DIgSILENT PowerFactory Interfaces with Other Programs
Create - Command
The Create command creates new objects in the PowerFactory database and has fol-
lowing definition:
create [/sec][/rou][/noswt] objname.classname [name=....]
objname name of the new object
classname class type of the new object, i.e. ElmLod (General Load), ElmSym
(Synchronous Machine), TypSym (Type of Synchronous Machine), etc.
/sec creates Line Sub-Sections
/rou creates Line Routes
/noswt in combination with /rou, set switch insert mode to false, default = true
name Names of Line Routes, Line Sub-Sections, with /sec : name=section
name 1,section name 2, ..., with /rou : name=[term. x],route 1,term
1,route 2 ...
Example for the Create - Command:
create .\Example 1.ElmNet
creates a grid with name Example 1
28 - 19
DIgSILENT PowerFactory Interfaces with Other Programs
Connect - Command
The Connect command connects edge elements (Lines, Loads, Machines, etc.) to busbars
and terminals and has the following definition:
connect name [b1=bus1][ib1=] ... [b4=bus4][ib4=]
name name of element
b1,..,b4 names of the terminal or busbar bus1 .. bus4
ib1,..,ib4 connection mode (0 or 1)
mode=0: switch opened, mode=1: switch closed
PowerFactory connects the edge elements to the busbars or terminals (bus1, bus2,...)
and creates for all busbars automatically cubicles and switches.
Examples for the Connect command
connect .\Line_10kV b1=.\SS1 ib1=1 b2=.\SS2 ib2=1
Connect a line (Line_10kV) to the terminals SS1 and SS2
connect .\Tr_10_15 b1=.\SS2 ib1=1 b2=.\STAT_1\SS3 ib2=1
Connect a Transformer (Tr_10_15) to the terminal SS2 with the high voltage side and to
the busbar SS3 in station STAT_1 with the low voltage side.
28 - 20
DIgSILENT PowerFactory Interfaces with Other Programs
• 'Terminals'
• 'Loads'
• 'Lines'
• 'Transformers
• 'LV Transformers'
• 'DigSI Lines'
The 'DigSI Lines' worksheet is for internal use only.
The button Create ConversionFile is used to generate the ".DGS''-file. The created
".DGS''-file is stored in the current directory and will receive the same named as the excel
file (but with the extension 'DGS').
Alternatively, the ".DGS''-file can be generate by the GIS itself, without using the Excel
spreadsheet. The format of the ".DGS''-file is described hereinafter for that purpose.
28 - 21
DIgSILENT PowerFactory Interfaces with Other Programs
• Grid Name: Either enter the name of an existing grid, or a new name. The new
electrical models will be created in the given grid.
If no single line graphic is selected, then the default graphic in the selected grid will be
used to draw the new graphic symbols.
The "GIS Conversion File'' option is used to enter the name and path of the ".DGS''-file
on disk.
The "Predefined Terminals'' option is used to optionally select an existing Grid which con-
tains previously defined terminals to which branches that are imported from the ".DGS''-
file are to be connected.
Conversion Options
Several conversion options are available on the Options page of the conversion command
dialogue, as depicted in the figure 28.10.
The "Conversion Elements'' option is used to disable the import of specific classes. Dis-
abling the Transformers -option, for instance, will disregard all transformer data in the
".DGS''-file. No transformers will thus be imported.
The "Line Types'' option is used to generate routes and sections, dependent on the se-
lected type libraries:
• Overhead Line (OHL) Type Library (optional): Existing PowerFactory Library path
• Cable Line Type Library (optional): Existing PowerFactory Library path
The option "Automatic Drawing of Branch Net Elements'' can be disabled to switch off the
automatic drawing of lines and transformers.
28 - 22
DIgSILENT PowerFactory Interfaces with Other Programs
Each new section must start at a new line that starts with two dollar characters '$$' fol-
lowed by the section name:
$$<section_name>[: parameter descriptions][element_parameters]
Each line within a section must start with a line number, followed by comma separated
fields. The line numbers are identical with the row number of the respective page of the
spreadsheet, when the ".DGS''-File was created by the Excel spreadsheet. The available
parameters are found on the "Description'' page of the "Gis2Dole.xls'' spreadsheet.
Example:
$$Version
1.1
$$Terminals:xlsLineNumber,Name,uknom,X,Y,Length,Rotation,GrType
2,X3177,11,250,350,60,90,1 3,X3702,11,150,350,60,90,1
$$Transformers:xlsLineNumber,Name,Type,Busbar1,Conn1,Busbar2,Conn2,OoS,Par.
no.,TapPos
2,2WTr1,Transformer\300 kVA,C-3462 H,1,C-3462 L,0,1,2,0
3,2WTr2,Transformer\300 kVA,C-3462 H,1,C-3462 L,1,0,1,0
28 - 23
DIgSILENT PowerFactory Interfaces with Other Programs
Nominal Frequency
Nominal frequency of the file to be Converted/Imported.
PSS/E Raw data
Location on the hard disk of the PSS/E raw data file. By default the
program searches for *.raw extensions. The user may consider all
types of files by typing *.*.
Add Graphic Files
Location of the PSS/E drw files on the file system. Again by default the
programs searches for files with extension *.drw. The user may
consider all types of files by typing *.*.
28 - 24
DIgSILENT PowerFactory Interfaces with Other Programs
searches for *.seq extensions. The user may consider all types of files
by typing *.*.
The following topics
Dyn Models Data
Parameter Mapping
Composite Frame Path
DSL - Model Path
are not used for the import of steady-state data and will be explained in the dynamic im-
port section 28.4.2.
28 - 25
DIgSILENT PowerFactory Interfaces with Other Programs
28 - 26
DIgSILENT PowerFactory Interfaces with Other Programs
28 - 27
DIgSILENT PowerFactory Interfaces with Other Programs
28 - 28
DIgSILENT PowerFactory Interfaces with Other Programs
28 - 29
DIgSILENT PowerFactory Interfaces with Other Programs
28 - 30
DIgSILENT PowerFactory Interfaces with Other Programs
28 - 31
DIgSILENT PowerFactory Interfaces with Other Programs
Client 1 Client 2
HTML/HTTP SOAP/HTTP
PowerWare
Kernel
PowerWare Server
Usually there are several clients. One main advantage of this architecture is the fact that
the data is stored in one central database on the server. One client connects to the server
and fetches the data from there, modifies them, and afterward stores them back to the
server. On other clients these changes are visible.
DIgSILENT PowerWare server provides two interfaces to access from client machines:
3 Visualization by means of a standard web browser. The HTML interface can be used
with an usual web browser (e.g. Microsoft Internet Explorer or Mozilla Firefox) as
shown in figure 28.18.
The browser displays HTML pages which are created by PowerWare’s HTML front
end. The HTML pages are transferred using the HTTP protocol on top of the TCP/IP
internet protocol.
HTML allows to present all kind of data e.g. plain text, tables or images.
Additionally HTML provides concepts to achieve interactivity: by submitting HTML
forms or pressing on hyperlinks data is sent to the server. The server interpretssuch
requests and creates new HTML pages which are displayed by the browser again.
28 - 32
DIgSILENT PowerFactory Interfaces with Other Programs
4 The web service interface, similar to the HTML interface uses the HTTP protocol to
communicate with the web service frontend, though no HTML pages are transferred
but lower-level data (SOAP/XML encoded). The web service client application is
responsible to present this data conveniently.
PowerFactory is able to play the role of a web service client. It integrates parts of
PowerWare’s data and concepts smoothly into its own world.
The functionality of the HTML interface is covered in the PowerWare manual. The re-
mainder of this chapter focuses on PowerFactory as client.
28 - 33
DIgSILENT PowerFactory Interfaces with Other Programs
In order to use the PowerWare interface it’s important to know about the differences
between both applications.
Location
In PowerWare each device belongs to exactly one location. There are different location
types e.g. Region, Area, Substation, or Bay. The locations are organized in a hierarchy
tree as shown in figure 28.19.
In PowerFactory the data is organized in projects (IntPrj). A project may have one or
more grids (ElmNet) which in turn contain net elements e.g. terminals, cubicles, and re-
lays (ElmRelay). See figure 28.20 for a typical PowerFactory project.
28 - 34
DIgSILENT PowerFactory Interfaces with Other Programs
PowerWare’s location concept and PowerFactory’s pr oject/grid concept hardly fit to-
gether. That’s the reason why the data mapping between PowerFactory and Power-
Ware begins at the device level which is the subject of the next sections.
Device
PowerWare manages a set of devices e.g. relays, CTs, VTs, or Circuit breakers. Each
device is associated to a device type e.g. ABB DPU2000R or SEL421 003. Additionally each
device has an unique ID: the device ID.
In PowerFactory a relay is represented by an ElmRelay object which references exactly
one TypRelay object. The ElmRelay object contains several sub-components e.g. the I>
component (a RelToc object), the Logic component (RelLogic), or the Ios component
(RelMeasure). See figure 28.21 for an example. The device ID is used to link one Power-
Ware device to one PowerFactory device. The PowerFactory device e.g. an ElmRelay
object stores the PowerWare device ID as foreign key.
28 - 35
DIgSILENT PowerFactory Interfaces with Other Programs
Device State
A device’s state is in PowerWare called setting. A setting is a list of attributes, and de-
scribes the state of one device completely. An attribute is a tuple of
• attribute name,
• attribute type which can be an arbitrary integer or floating point number, optionally
with a range restriction, or a string, or a enumeration type.,
• a default value,
• an optional unit.
A complex relay may have thousands of attributes. In PowerWare the setting attributes
are organized in so-called setting groups. A setting group groups the attributes together
which belong somehow together. It’s often defined by the device manufacturer. Each at-
tribute belongs to exactly one setting group. Inside a group the attribute name is unique.
The device type defines which attributes and groups characterize a device. Table 28.1
shows an example of a possible device type. There are two setting groups G and H. Group
G has the attributes a, b, and c, group H has the attributes d and e.
28 - 36
DIgSILENT PowerFactory Interfaces with Other Programs
According to this attribute definition a device can have settings as shown in tables 28.2
or 28.3.
On the PowerFactory side there are neither setting nor group nor attribute. There is the
ElmRelay object and its sub-objects. These objects can have parameters. See table 28.4
for a definition and table 28.5 for an example. The TypRelay type defines components
and parameters.
PowerWare attributes are somehow mapped to PowerFactory parameters and vice
versa. How this actually is accomplished, is described in section 28.5.7 (Technical Refer-
ence). The mapping is non-trivial since only a small subset of the attributes (the calcula-
tion-relevant data) is modeled in PowerFactory and vice versa. Additionally there is no
one-to-one relationship between attributes, and parameters and a parameter could get
calculated out of several attributes.
.
Some relays support multiple setting groups (MSG) also called parameter sets. Such re-
28 - 37
DIgSILENT PowerFactory Interfaces with Other Programs
lays have the same group many times (c.f. table 28.5). The groups H1, H 2, and H 3 have
the same set of attributes (c and d). Some relay models in PowerFactory do not support
this concept fully. Instead of modeling all MSGs, only one instance of the H groups is pro-
vided.
In this case a group index parameter defines which of the MSGs actually is transferred
from PowerWare to PowerFactory.
In PowerFactory a device has exactly one state (or setting). Therefore when data is
transferred between PowerFactory and PowerWare, always a concrete device setting
in PowerWare must be specified.
For PowerFactory purposes a special PowerFactory planning phase is introduced. The
transfer directions are specified as follows:
• Imports from PowerWare into PowerFactory are restricted to Applied and
PowerFactory settings. Applied denotes the current applied setting (Applied) or
a previous applied (Historic) setting.
28 - 38
DIgSILENT PowerFactory Interfaces with Other Programs
28.5.4 Configuration
In order to transfer data between PowerFactory and PowerWare both systems must
be configured.
PowerWare Server
An arbitrary PowerWare user account can be used for the PowerWare interface in
PowerFactory. The user must have enough access rights to perform operations e.g. for
the export from PowerFactory to PowerWare write-rights must be granted.
A non-default life cycle phase named PowerFactory of status Planning must be cre-
ated. This phase must have a cardinality constraint of 1 i.e. there may exist one or no
such setting for one device.
PowerFactory Client
The client operating system must allow connections to the server (network and firewall
settings etc.).
Nothing has to be done in the PowerFactory configuration itself. The TypRelays in the
Library must of course support PowerWare/PowerFactory mapping.
28 - 39
DIgSILENT PowerFactory Interfaces with Other Programs
create two relays named Getting Started Relay 1 and Getting Started Relay 2 in the
Getting Started substation
In the HTML interface the station detail page should look as shown in figure 28.22.
Go to the detail page of the Getting Started Relay 1 (c.f. figure 28.23).
Since we have just created the device it has no settings, yet. Later it will contain a Power-
Factory setting which reflects the relay state on the PowerFactory side.
28 - 40
DIgSILENT PowerFactory Interfaces with Other Programs
28 - 41
DIgSILENT PowerFactory Interfaces with Other Programs
Press the icon (Edit Relevant Objects for calculation) in the toolbar and select
the icon (ElmRelay) to filter out all non-relay objects as shown in figure 28.27.
All calculation relevant relays (actually there only the two we created above) are displayed
in a table (c.f. figure 28.28).
28 - 42
DIgSILENT PowerFactory Interfaces with Other Programs
enter the Server Endpoint URL of the PowerWare server. The URL should have a
format similar to
http://the.server.name/powerwarews/powerwarews.asmx
enter Username and Password of a valid PowerWare user account.
28 - 43
DIgSILENT PowerFactory Interfaces with Other Programs
press OK.
The connection procedure may take some seconds. If the server could be accessed and
28 - 44
DIgSILENT PowerFactory Interfaces with Other Programs
the user could be authenticated a success message is printed into the output window
DIgSI/info - Established connection
to PowerWare server ’http://192.168.1.53/psmsws/psmsws.asmx’
as user’pf00002’
Otherwise an error dialogue pops up. Correct the connection settings until the connection
is successfully created. The reference section (section 1.6.2) explains the connection op-
tions in detail.
Having established a connection to the server, a browser dialogue pops up which displays
the location hierarchy as known from the PowerWare HTML interface. The dialogue is
shown in figure 28.31.
navigate to the Getting Started substation,
select the Getting Started Relay 1 device,
press OK.
28 - 45
DIgSILENT PowerFactory Interfaces with Other Programs
navigate to the relay detail view of the Getting Started Relay 1 relay (c.f. Fig. 28.33)
Observe the new created PF setting. The phase of this setting is PowerFactory.
28 - 46
DIgSILENT PowerFactory Interfaces with Other Programs
switch to the settings detail page of the new PF setting (c.f.Fig. 28.34).
The setting values should correspond to the relay state in PowerFactory. In the same
way the Getting Started Relay 2 relay has a new PF setting.
Now try the opposite direction and import a setting from PowerWare into PowerFac-
tory.
modify the PF settings in PowerWare by entering some other values
in PowerFactory mark the relays with the mouse and right-click to get the relay
context menu as shown in figure 28.29.
select the Import... item in the PowerWare menu entry.
Again the ComPowerware dialogue (c.f. figure 28.32) pops up as known from the export.
leave the default settings,
press Execute.
Again the result of the settings transfer is reflected in the output window:
DIgSI/info - Imported 2 of 2 device settings successfully
find ElmRelay object parameters changed according to the changes on the
PowerWare side
All import options are described in detail in the reference section (Export and Import Set-
tings).
28.5.6 Reference
This section describes all options and features concerning the PowerWare interface.
28 - 47
DIgSILENT PowerFactory Interfaces with Other Programs
Connection
Similar to the HTML interface the PowerWare interface in PowerFactory is session-ori-
ented: when a user logs on to the system by specifying a valid PowerWare account
(username and password) a new session is created. Only inside such a session Power-
28 - 48
DIgSILENT PowerFactory Interfaces with Other Programs
Ware can be used. The account privileges restrict the application functionality e.g. an ad-
ministrator account is more powerful than a usual user account.
Working with PowerFactory the first time the PowerWare server is required the Logon
dialogue is shown as shown in figure 28.36.
The PowerWare connection options are stored in the user settings (c.f. figure 28.37).
After each successful logon the user settings are updated.
28 - 49
DIgSILENT PowerFactory Interfaces with Other Programs
import the user requires read-access rights. For exporting additionally write-access rights
are required.
A more convenient way is to use the Browser dialogue shown in figure 28.39. The dia-
logue allows to browse through the PowerWare location hierarchy and select a device.
The hierarchy data is cached to minimize network accesses. Due this caching it’s possible
that there may exist newly created locations or devices which are not displayed in the
browser dialogue. The Refresh button empties the cache and enforces PowerFactory
to re-fetch the correct data from the server.
28 - 50
DIgSILENT PowerFactory Interfaces with Other Programs
You can even specify the fault location. All these calculation options are stored in the
ComShc object. Every action object has an Execute button which starts the action. In
fact there is a large number of parametrized actions like load flow calculation (ComLdf),
simulation (ComSim), there is even a ComExit object that shuts down PowerFactory. All
objects which can ’do’ something have the Com prefix.
Since the PowerWare interface is actually ’doing’ something (it does import data, it does
export data) it is implemented as a ComPowerware object.
The ComPowerware object is used both for the import (section 1.6.4.1) and the export
(section 1.6.4.2). It is located in the project’s study case according to PowerFactory
conventions. The actual Getting Started project (section 1.5) is shown in figure 28.40.
By default the study case of a new project contains no ComPowerware object. It is auto-
matically created when it is first needed, as well as the ComShc object is instantiated at
the time when the first short-circuit calculation is performed.
Import Options
The ComPowerware dialogue provides import options as follows (figure 28.41):
Transfer Mode
select Import from PowerWare as Transfer Mode
Check only Plausibility
if the Check only Plausibility flag is enabled the import is only simulated
but not really executed.
Life cycle Phase/Time stamp
The Life cycle phase may either be PowerFactory or Applied.
28 - 51
DIgSILENT PowerFactory Interfaces with Other Programs
28 - 52
DIgSILENT PowerFactory Interfaces with Other Programs
– All Settings Groups is disabled: then only the Group Index -th group is
transferred.
• • If the relay in PowerWare has MSGs and the PowerFactory relay model
doesn’t support MSGs: then the Group Index-th group is imported.
These parameters are ignored completely if the relay has no MSGs.
The import transfer is started by pressing Execute.
Export Options
The export options are almost identical to the import options (c.f. figure 28.42):
Transfer Mode
Select Export as Transfer Mode
Life cycle Phase
Only the PowerFactory setting in PowerWare can be the target
setting. Applied settings can never be changed.
Click Execute to start the data transfer. If there exists already a PowerFactory setting
in PowerWare it is removed completely.
Then a new PowerFactory is created as copy of the current Applied setting. If no Ap-
plied setting is available the default settings are copied. Then the PowerFactory -rel-
evant part of the settings are copied upon the PowerFactory setting.
28 - 53
DIgSILENT PowerFactory Interfaces with Other Programs
well. The PowerWare interface is heavily based on DPL (DIgSILENT Programming Lan-
guage) which is documented in a separate DPL Manual.
Overview
For each device type (TypRelay) and each transfer direction a separate DPL script is re-
quired.
The import DPL script takes the PowerWare attributes and a ElmRelay object as input
and fills somehow the ElmRelay object’s and its subobjects’ parameters.
The export DPL script takes a ElmRelay object as input parameter and calculates some
output parameters which are the PowerWare attributes.
Note: DPL’s most important benefit is: you can do everything. That’s ex-
actly DPL’s most important disadvantage as well. Be sure that your
DPL scripts do what they should do and not more.
An import script should only set the parameters in the ElmRelay
object and its subcomponents. An export script shouldn’t change
anything at all (at least within PowerFactory).
Import Scripts
The algorithm used for the import from PowerWare to PowerFactory is as follows. Let
d be the device whose setting is to be imported:
1 let t be d’s device type
2 let dpl be the PsmsImport.ComDpl object near t
3 initialize dpl’s input parameter with the device attributes from PowerWare
4 initialize dpl’s external object parameter Relay with d
5 execute dpl
28 - 54
DIgSILENT PowerFactory Interfaces with Other Programs
28 - 55
DIgSILENT PowerFactory Interfaces with Other Programs
The Input parameters get initialized with the PowerWare attribute values and the Ex-
ternal Object with the current relay.
The second page of the ComDpl script holds the output parameters. They have the mean-
ing as follows (figure 28.45 shows the Advanced options).
Remote Script this parameter must be unset
Result Parameters the table must have one entry with Name Result of Type String.
The DPL script should set this parameter to OK if the import procedure
was successful. Otherwise it may hold an error message which is
displayed in the output window.
Figure 28.46 shows the Script page which contains the DPL code. The code must be a
valid DPL program. It should set the relay parameters according to the input parameters.
28 - 56
DIgSILENT PowerFactory Interfaces with Other Programs
Export Scripts
The export direction is almost symmetric to the import process. Be d the device whose
setting is to exported:
1 let t be d’s device type
28 - 57
DIgSILENT PowerFactory Interfaces with Other Programs
28 - 58
DIgSILENT PowerFactory Interfaces with Other Programs
28 - 59
DIgSILENT PowerFactory Interfaces with Other Programs
create in PowerWare a new substation with one device of the desired device type.
Create a default PowerFactory setting for this device.
create a simple PowerFactory project which contains a device of the desired type
link the PowerFactory device to the PowerWare device by setting the foreign key
to the device ID.
Then write the import script:
create an empty PsmsImport.ComDpl near the TypRelay object.
define the input and output parameters of the ComDpl object
write the DPL code
test the script by importing the PowerFactory setting
Iterate these steps until there are no error messages. Change the setting in PowerWare
and re-try the import. In quite the same way create and verify a PsmsExport.ComDpl
script.
28 - 60
DIgSILENT PowerFactory Interfaces with Other Programs
28 - 61
DIgSILENT PowerFactory Interfaces with Other Programs
28 - 62
DIgSILENT PowerFactory The DIgSILENT Programming Language - DPL
Chapter 29
The DIgSILENT Programming Language - DPL
The DIgSILENT Programming Language DPL serves the purpose of offering an interface
for automating tasks in the PowerFactory program. The DPL method distinguishes itself
from the command batch method in several aspects:
• DPL offers decision and flow commands
• DPL offers the definition and use of user-defined variables
• DPL has a flexible interface for input-output and for accessing objects
• DPL offers mathematical expressions
The DPL adds a new dimension to the DIgSILENT PowerFactory program by allowing
the creation of new calculation functions. Such user-defined calculation commands can
be used in all areas of power system analysis, such as
• Network optimizing
• Cable-sizing
• Protection coordination
• Stability analysis
• Parametric sweep analysis
• Contingency analysis
• etc.
Such new calculation functions are written as program scripts which may use
• Flow commands like 'if-then-else´ and 'do-while'
• PowerFactory commands (i.e. load-flow or short-circuit commands)
• Input and output routines
• Mathematical expressions
• PowerFactory object procedure calls
• Subroutine calls
29 - 1
DIgSILENT PowerFactory The DIgSILENT Programming Language - DPL
The DPL command object ComDpl is the central element, which is connecting different
parameter, variables or objects to various functions or internal elements and then puts
out results or changes parameters.
As the input to the script can be predefined input parameters, single objects from the sin-
gle line diagram or the database or a set of objects/elements, which are then stored inside
a so called "General Selection''.
These input information can then be evaluated using functions and internal variables in-
side the script. Also internal objects can be used and executed, like
• a calculation command, i.e. ComLdf, ComSim, etc., especially defined with certain
calculation options
• subscripts also released in DPL
• filter sets, which can be executed during the operation of the script
Thus the DPL script will run a series of operation and start calculation or other function
inside the script. It will always communicate with the database and will store changed set-
tings, parameters or results directly in the database objects. There is nearly no object in-
side the active project, which can not be accessed or altered.
During or at the end of the execution of the DPL script, the results can be outputted or
parameters of elements my be changed. There is the possibility to execute a predefined
output command ComSh or to define own outputs with the DPL commands available.
29 - 2
DIgSILENT PowerFactory The DIgSILENT Programming Language - DPL
• A root command has its own script on the "script'' page of the dialogue.
• A referring command uses the script of the remote DPL command.
A DPL Command ComDpl can be created by using the "New Object'' ( ) icon in the
toolbar of the data manager and selecting DPL Command and more. Then press OK and
a new DPL command is created. The dialogue is now shown and the parameters, objects
and the script can now be specified.
This dialogue is also opened by double-clicking a DPL script, by selecting Edit from the
context sensitive menu or by selecting the script from the list when pressing the icon .
29 - 3
DIgSILENT PowerFactory The DIgSILENT Programming Language - DPL
• Select one or more elements in the single line diagram. Then right-click the selection
(one of the selected elements) and choose the option Define...−> DPL Commands
Set... from the context sensitive menu.
• It is also possible to select several elements in the data manager. Right-click the
selection and choose the option Define...−> DPL Commands Set... from the context
sensitive menu.
To execute a DPL command or to access the dialogue of a script, the icon can be
activated. This will pop up a list of available DPL scripts from the global and local library.
The easiest way to start a DPL command AND define a selection for it is
• To select one or more elements in the single line diagram or in the data manager and
then right-click the selection.
• Choose the option Execute DPL Scripts from the context sensitive menu.
• Then select a DPL script from the list. This list will show DPL scripts from the global as
well as from the local library.
• Select a DPL script, insert/change the variables and then press the button
Execute
In this way the selection is combined into a DPL Commands Set and the set is auto-
matically selected for the script chosen.
Only one single DPL command set is valid at a time for all DPL scripts. This means that
setting the DPL command set in one DPL command dialogue, will change the DPL com-
mand set for all DPL commands in the database.
Note To choose different sets for various DPL scripts you can either use
different selection object SetSelect like the "General Set''. Or new
DPL command sets can be created and selected inside the active
study case. This is done by pressing , selecting "other'' and the
element "Set (SetSelect)'' and then selecting the set type.
The interface section Input Parameters is used to define variables that are accessible from
outside the DPL command itself. DPL commands that call other DPL commands as sub-
routines, may use and change the values of the interface variables of these DPL subrou-
tines.
The list of External Objects is used to execute the DPL command for specific objects. A
DPL command that, for example, searches the set of lines for which a short-circuit causes
too deep a voltage dip at a specific busbar, would access that specific busbar as an ex-
ternal object. Performing the same command for another busbar would then only require
setting the external object to the other busbar.
29 - 4
DIgSILENT PowerFactory The DIgSILENT Programming Language - DPL
this script instead of a local defined script on the next page Script. This is a so called "re-
ferring command''. The "root command'' as described above in the example uses the local
defined script.
Also there can be Result parameters defined. These parameters are results from the script
and they are stored inside the result object. Hence it is possible to access them through
the variable monitor and display them in a plot.
With this icon "Edit Object'' the edit dialogue of the script is opened and the user
can Check the modified script for errors or one can Execute it.
The script inside the editor and in the dialogue are synchronized each time the
script is saved or edited in the dialogue. If this "Disconnect'' icon is pressed, the
scripts will not be synchronized anymore.
With the "search'' icon the user can activate a Find, a Replace or also a Go To
function inside the editor.
With the "search next'' icon find/replace/go to the next matching word.
With the "search previous'' icon find/replace/go to the previous matching word.
With the these icons bookmarks can be set in the editor. Also jump from one
bookmark to the next or previous as well as clear all bookmarks.
When finished editing, press the icon and the script will be synchronized with the
29 - 5
DIgSILENT PowerFactory The DIgSILENT Programming Language - DPL
main dialogue. One can also jump to the main graphics board by selecting the option Win-
dow −> Graphic... from the main menu.
statement1;
statement2;
if (condition)
{
groupstatement1;
groupstatement2;
}
All parameter declarations must be given together in the top first lines of the DPL script.
The semicolon is obligatory.
Examples:
29 - 6
DIgSILENT PowerFactory The DIgSILENT Programming Language - DPL
variable = expression
variable += expression
variable -= expression
The add-assignment "+='' adds the right side value to the variable and the subtract-as-
signment "-='' subtracts the right-side value.
Examples:
29 - 7
DIgSILENT PowerFactory The DIgSILENT Programming Language - DPL
• Constants:
pi() pi
twopi() 2 pi
e() e
if ( [boolexpr] ) [statlist]
if ( [boolexpr] ) [statlist] else [statlist]
do [statlist] while ( [boolexpr] )
while ( [boolexpr] ) [statlist]
for ( statement ; [boolexpr] ; statement ) [statlist]
in which
if (a<3) {
b = a*2;
}
else {
b = a/2;
}
while (sin(a)>=b*c) {
29 - 8
DIgSILENT PowerFactory The DIgSILENT Programming Language - DPL
a = O:dline;
c = c + delta;
}
if ({.not.a}.and.{b<>3}) {
err = Ldf.Execute();
if (err) {
Ldf:iopt_lev = 1;
err = Ldf.Execute();
Ldf:iopt_lev = 0;
}
}
for (i = 0; i < 10; i = i+1){
x = x + i;
}
for (o=s.First(); o; o=s.Next()) {
o.ShowFullName();
}
O1 = S1.First();
while (O1) {
O1.Open();
err = Ldf.Execute();
if (err) {
! skip this one
O1 = S1.Next;
continue;
}
O2 = S2.First();
AllOk = 1;
DoReport(0); !reset
while (O2) {
err = Ldf.Execute();
if (err) {
! do not continue
AllOk = 0;
break;
}
else {
DoReport(1); ! add
29 - 9
DIgSILENT PowerFactory The DIgSILENT Programming Language - DPL
}
O2 = S2.Next();
}
if (AllOk) {
DoReport(2); ! report
}
O1 = S1.Next();}
The example results in the pop up of a window as depicted in the figure 29.3.
The output command is considered obsolete and has been replaced by the more versatile
"printf'' and "sprintf'' functions. Please see the DPL reference for detailed information.
29 - 10
DIgSILENT PowerFactory The DIgSILENT Programming Language - DPL
to write a script that replaces a specific line by possibly better alternatives, in order to
select the best line type. Such a script must be able to access specific objects (the specific
line) and specific sets of objects (the set of alternative line types).
The DPL language has several methods with which the database objects and their param-
eters become available in the DPL script:
• The most direct method is to create an object, or a reference to an object, in the DPL
command folder itself. Such an object is directly available as "object'' variable in the
script. The variable name is the name of the object in the database.
• The DPL command set may be used. This method is only useful when the order in
which the objects are accessed is not important. The DPL command set is
automatically filled when a selection of elements is right-clicked in either the single
line graphic or the data manager and the option Execute DPL Script is selected.
• The list of external objects is mainly used when a script should be executed for
specific objects or selections. The list of external objects is nothing more than a list of
'aliases'. The external object list is used to select specific objects for each alias, prior
to the execution of the script.
In this example, the load-flow objects is known as the objects variable "Ldf''.
The general syntax for a parameter of a database object is
objectname:parametername
In the same way, it is possible to get a value from a database object, for instance a result
from the load-flow calculations. One of such a result is the loading of a line object, which
is stored in the variable "c:loading''. The following example performs the unbalanced load-
flow and reports the line loading.
Example
29 - 11
DIgSILENT PowerFactory The DIgSILENT Programming Language - DPL
This examples is very primitive but it shows the basic methods for accessing database ob-
jects and their parameters.
The example DPL script may now access these objects directly, as the objects "Ldf'' and
"Line''. In the following example, the object "Ldf'', which is a load-flow command, is used
in line 01 to perform a load-flow.
In line 01, a load-flow is calculated by calling the method "Execute()'' of the load-flow
command. The details of the load-flow command, such as the choice between a balanced
single phase or an unbalanced three phase load-flow calculation, is made by editing the
object "Ldf'' in the database. Many other objects in the database have methods which can
be called from a DPL script. The DPL contents are also used to include DPL scripts into
other scripts and thus to create DPL "subroutines''.
29 - 12
DIgSILENT PowerFactory The DIgSILENT Programming Language - DPL
A more elegant way would be to use the DPL global selection and fill it with all lines. The
data manager offers several ways in which to fill this object DPL Command Set with
little effort. The selection may then be used to access each line indirectly by a DPL "ob-
ject'' variable. In this way, a loop is created which is performing the search for the highest
loading. This is shown in the following example.
Example
The object SEL used in line 08 is the reserved object variable which equals the General
Selection in the DPL command dialogue. The SEL object is available in all DPL scripts at
all times and only one single "General Selection'' object is valid at a time for all DPL scripts.
This means that setting the General Selection in the one DPL command dialogue, will
change it for all other DPL commands too.
The method "AllLines()'' in line 08 will return a set of all lines found in the general selec-
tion. This set is assigned to the variable "S''. The lines are now accessed one by one by
using the set methods "First()'' and "Next()'' in line 09, 16 and 22.
The line with the highest loading is kept in the variable "Omax''. The name and database
location of this line is written to the output window at the end of the script by calling
"ShowFullName()''.
29 - 13
DIgSILENT PowerFactory The DIgSILENT Programming Language - DPL
should be accessed in the script. By creating references to those objects in the DPL com-
mand itself, the DPL command would become specific to the current calculation case.
Gathering the objects in the general selection would create the problem of selecting the
correct object.
To prevent the creation of calculation-specific DPL commands, it is recommended practice
to reserve the DPL contents for all objects that really 'belong' to the DPL script and which
are thus independent on where and how the script is used. Good examples are load-flow
and short-circuit commands, or the vector and matrix objects that the DPL command uses
for its computations.
If a DPL script must access a database object dependent on where and how the DPL script
is used, an "External Object'' must be added to the external object list in the DPL root
command. Such an external object is a named reference to an external database object.
The external object is referred to by that name. Changing the object is then a matter of
selecting another object.
In the figure 29.5, an example of an external object is given. This external object may be
referred to in the DPL script by the name "Bar1'', as is shown in the example.
Example:
sagdepth = Bar1:u;
29 - 14
DIgSILENT PowerFactory The DIgSILENT Programming Language - DPL
• A referring command may overrule all default interface values and all selected
external objects of the remote command.
• Each DPL command can be called as a subroutine by other DPL commands.
The use of remote scripts, external objects and interface variables makes it possible to
create generic DPL commands, which may be used with different settings in many differ-
ent projects and study cases.
The easiest way to develop a new DPL command is to create a new ComDpl in the cur-
rently active study case and to write the script directly in that DPL object. In such a way,
a DPL "root command'' is made. If this root command needs DPL subroutines, then one
or more DPL command objects may be created in its contents. Each of these subroutines
will normally also be written as root functions.
The newly written DPL command with its subroutines may be tested and used in the cur-
rently active study case. However, it cannot be executed when another study case is ac-
tive. In order to use the DPL command in other study cases, or even in other projects,
one would have to copy the DPL command and its contents. This, however, would make
it impossible to alter the DPL command without having to alter all its copies.
The solution is in the use of 'remote scripts'. The procedure to create and use remote
scripts is described as follows.
Suppose a new DPL command has been created and tested in the currently active study
case. This DPL command can now be stored in a save place making it possible to use it
in other study cases and projects.
This is done by the following steps:
• Copy the DPL command to a library folder. This will also copy the contents of the DPL
command, i.e. with all it's DPL subroutines and other locally stored objects.
• "Generalize'' the copied DPL command by resetting all project specific external
objects. Set all interface variable values to their default values. To avoid deleting a
part of the DPL command, make sure that if any of the DPL (sub)commands refers to
a remote script, all those remote scripts are also stored in the library folder.
• Activate another study case.
• Create a new DPL command object (ComDPL) in the active study case.
• Set the "DPL script'' reference to the copied DPL command.
• Select the required external objects.
• Optionally change the default values of the interface variables
• Press the Check button to check the DPL script
The Check or Execute button will copy all parts of the remote script in the library that
are needed for execution. This includes all subroutines, which will also refer to remote
scripts, all command objects, and all other objects. Some classes objects are copied as
reference, other classes are copied completely.
The new DPL command does not contain a script, but executes the remote script. For the
execution itself, this does not make a change. However, more than one DPL command
may now refer to the same remote script. Changing the remote script, or any of its local
objects or sub-commands, will now change the execution of all DPL commands that refer
to it.
29 - 15
DIgSILENT PowerFactory The DIgSILENT Programming Language - DPL
The difference is that each DPL subroutine has different interface parameters, which may
be changed by the calling command. These interface parameters can also be set directly
at calling time, by providing one or more calling arguments. These calling arguments are
assigned to the interface parameters in order of appearance. The following example illus-
trates this.
Suppose we have a DPL sub-command "Sub1'' with the interface section as depicted in
the figure 29.6.
29 - 16
DIgSILENT PowerFactory The DIgSILENT Programming Language - DPL
Internal methods
These are the build-in methods of the DPL command. They can always
be called.
Set methods These methods are available for the DPL 'set' variables.
Object methods
These methods are available for the DPL 'object' variables.
External methods
These are the methods which are available for certain external
PowerFactory objects, such as the load-flow command, the line
object, the asynchronous machine, etc.
Please see the DPL Reference for a description of these functions including implementa-
tion examples.
29 - 17
DIgSILENT PowerFactory The DIgSILENT Programming Language - DPL
29 - 18
Volume VII
Power System Models Reference
DIgSILENT PowerFactory
Version 13.2
DIgSILENT PowerFactory
Chapter 30
Type Objects-Reference Data
Input parameters
Table 30.1 shows the input parameters for the TypTr2 object. Parameters are presented
in the same order of the element dialogue (starting from the 'Basic Data' tab).
The description of the 2-winding transformer model, presenting the relations among the
input parameters is given in the corresponding Technical Reference Paper (Support page
under Technical References).
Note: The name of the parameter is displayed in the Element edit dialogue, by placing
the cursor in the input field of the parameter. Certain parameters are relevant to more
than one calculation, therefore they can be found and edited in different tabs. The avail-
ability of some parameters is conditioned to the current value of the selection parameters
(iopt_...); therefore not all the listed parameters would be visualized at once in a dialogue.
itrmt Type 0
it0mt Type 0
ansiclass Class
tap_side at Side x=0|x=1 0
manuf Manufacturer
doc_id Additional Data
desc Description
pStoch Stochastic model
satcur Current (peak) p.u.
Input parameters
Table 30.2 shows the input parameters for the TypTr3 object. Parameters are presented
in the same order of the element dialogue (starting from the 'Basic Data' tab).
The description of the 3-winding transformer model, presenting the relations among the
input parameters is given in the in the corresponding Technical Reference Paper (Support
page under Technical References).
Note: The name of the parameter is displayed in the Element edit dialogue, by placing
the cursor in the input field of the parameter. Certain parameters are relevant to more
than one calculation, therefore they can be found and edited in different tabs. The avail-
ability of some parameters is conditioned to the current value of the selection parameters
(iopt_...); therefore not all the listed parameters would be visualized at once in a dialogue.
i3loc Position 0
i30lc Position 0
itrmt Type 0
manuf Manufacturer
doc_id Additional Data
desc Description
pStoch Stochastic model
Input parameters
Table 30.3 shows the input parameters of the TypAsmo object. Parameters are present-
ed in the same order of the Type dialogue (starting from the 'Basic Data' tab).
The description of the asynchronous machine model, presenting the relations among the
input parameters is given in the in the corresponding Technical Reference Paper (Support
page under Technical References).
Note: The name of the parameter is displayed in the Type edit dialogue, by placing the
cursor in the input field of the parameter. Certain parameters are relevant to more than
one calculation, therefore they can be found and edited in different tabs. The availability
of some parameters is conditioned to the current value of the selection parameters
(iopt_...); therefore not all the listed parameters would be visualized at once in a dialogue.
fold_id In Folder
charact Charact.
nslty Connection 0
i_cage Rotor 0
manuf Manufacturer
desc Description
Input parameters
Table 30.4 shows the input parameters for the TypTrb object. Parameters are presented
in the same order of the element dialogue (starting from the 'Basic Data' tab).
The description of the booster transformer model, presenting the relations among the in-
put parameters is given in the corresponding Technical Reference Paper (Support page
under Technical References).
Note: The name of the parameter is displayed in the Element edit dialogue, by placing
the cursor in the input field of the parameter. Certain parameters are relevant to more
than one calculation, therefore they can be found and edited in different tabs. The avail-
ability of some parameters is conditioned to the current value of the selection parameters
(iopt_...); therefore not all the listed parameters would be visualized at once in a dialogue.
Input parameters
Table 30.5 shows the input parameters for the TypCab object. Parameters are presented
in the same order of the element dialogue (starting from the 'Basic Data' tab).
The description of the cable type model, presenting the relations among the input param-
eters is given in the corresponding Technical Reference Paper (Support page under Tech-
nical References).
Note: The name of the parameter is displayed in the Element edit dialogue, by placing
the cursor in the input field of the parameter. Certain parameters are relevant to more
than one calculation, therefore they can be found and edited in different tabs. The avail-
ability of some parameters is conditioned to the current value of the selection parameters
(iopt_...); therefore not all the listed parameters would be visualized at once in a dialogue.
my Relative Permeability 1.
manuf Manufacturer
doc_id Additional Data
desc Description
uline Rated Voltage kV x>=0 0.
Input parameters
Table 30.6 shows the input parameters for the TypCon object. Parameters are presented
in the same order of the element dialogue (starting from the 'Basic Data' tab).
The description of the conductor type model, presenting the relations among the input
parameters is given in the corresponding Technical Reference Paper (Support page under
Technical References).
Note: The name of the parameter is displayed in the Element edit dialogue, by placing
the cursor in the input field of the parameter. Certain parameters are relevant to more
than one calculation, therefore they can be found and edited in different tabs. The avail-
ability of some parameters is conditioned to the current value of the selection parameters
(iopt_...); therefore not all the listed parameters would be visualized at once in a dialogue.
manuf Manufacturer
doc_id Additional Data
desc Description
Input parameters
Table 30.7 shows the input parameters of the TypLod object. Parameters are presented
in the same order of the Type dialogue (starting from the 'Basic Data' tab).
The description of the general load model, presenting the relations among the input pa-
rameters is given in the corresponding Technical Reference Paper (Support page under
Technical References).
Note: The name of the parameter is displayed in the Type edit dialogue, by placing the
cursor in the input field of the parameter. Certain parameters are relevant to more than
one calculation, therefore they can be found and edited in different tabs. The availability
of some parameters is conditioned to the current value of the selection parameters
(iopt_...); therefore not all the listed parameters would be visualized at once in a dialogue.
fold_id In Folder
charact Charact.
manuf Manufacturer
desc Description
Input parameters
Table 30.8 shows the input parameters for the TypLne object. Parameters are presented
in the same order of the element dialogue (starting from the 'Basic Data' tab).
The description of the line type model, presenting the relations among the input param-
eters is given in the corresponding Technical Reference Paper (Support page under Tech-
nical References).
Note: The name of the parameter is displayed in the Element edit dialogue, by placing
the cursor in the input field of the parameter. Certain parameters are relevant to more
than one calculation, therefore they can be found and edited in different tabs. The avail-
ability of some parameters is conditioned to the current value of the selection parameters
(iopt_...); therefore not all the listed parameters would be visualized at once in a dialogue.
manuf Manufacturer
doc_id Additional Data
desc Description
frnom Nominal Frequency Hz x>=0 50.
fcharL1 L1'(f)
fcharR1 R1'(f)
fcharC1 C1'(f)
fcharL0 L0'(f)
fcharR0 R0'(f)
fcharC0 C0'(f)
pStoch Stochastic model
cabdiam Outer Diameter mm 0.
iopt_cnd Cable is
iopt_ord Conductors
cmeth Installation Method (IEC
364)
iopt_dir Arrangement
lcost Line Cost $/km x>=0 0.
Input parameters
Table 30.9 shows the input parameters for the TypRec object. Parameters are presented
in the same order of the element dialogue (starting from the 'Basic Data' tab).
The description of the rectifier model, presenting the relations among the input parame-
ters is given in the corresponding Technical Reference Paper (Support page under Tech-
nical References).
Note: The name of the parameter is displayed in the Element edit dialogue, by placing
the cursor in the input field of the parameter. Certain parameters are relevant to more
than one calculation, therefore they can be found and edited in different tabs. The avail-
ability of some parameters is conditioned to the current value of the selection parameters
(iopt_...); therefore not all the listed parameters would be visualized at once in a dialogue.
Gs Snubber-Conductance S x>=0 0.
Input parameters
Table 30.10 shows the input parameters for the TypSym object. Parameters are present-
ed in the same order of the element dialogue (starting from the 'Basic Data' tab).
The description of the synchronous machine model, presenting the relations among the
input parameters is given in the corresponding Technical Reference Paper (Support page
under Technical References).
Note: The name of the parameter is displayed in the Element edit dialogue, by placing
the cursor in the input field of the parameter. Certain parameters are relevant to more
than one calculation, therefore they can be found and edited in different tabs. The avail-
ability of some parameters is conditioned to the current value of the selection parameters
(iopt_...); therefore not all the listed parameters would be visualized at once in a dialogue.
xd xd p.u. x>0 2.
xq xq p.u. x>0 2.
fcharrstr rs(f)
fcharlss l''(f)
i_v12 Model x=0|x=1 0
manuf Manufacturer
doc_id Additional Data
desc Description
dpu Mechanical Damping p.u. x>=0 0.
Input parameters
Tables 30.11 and 30.12 show the input parameters for the TypTow and TypGeo objects.
Parameters are presented in the same order of the element dialogue (starting from the
'Basic Data' tab).
The description of the tower models, presenting the relations among the input parameters
is given in the corresponding Technical Reference Paper (Support page under Technical
References).
Note: The name of the parameter is displayed in the Element edit dialogue, by placing
the cursor in the input field of the parameter. Certain parameters are relevant to more
than one calculation, therefore they can be found and edited in different tabs. The avail-
ability of some parameters is conditioned to the current value of the selection parameters
(iopt_...); therefore not all the listed parameters would be visualized at once in a dialogue
ktrto Transposition
nphas Num. of Phases
pcond_e Conductor Types TypCon
ktrto_c1 t x=0|x=1 0
ktrto_c2 t x=0|x=1 0
ktrto_c3 t x=0|x=1 0
ktrto_c4 t x=0|x=1 0
ktrto_c5 t x=0|x=1 0
ktrto_c6 t x=0|x=1 0
nphas_1 x=1|x=2|x=3 0
nphas_2 x=1|x=2|x=3 0
nphas_3 x=1|x=2|x=3 0
nphas_4 x=1|x=2|x=3 0
nphas_5 x=1|x=2|x=3 0
nphas_6 x=1|x=2|x=3 0
cond_e1 1
cond_e2 2
cond_c1 1
cond_c2 2
cond_c3 3
cond_c4 4
cond_c5 5
cond_c6 6
xy_e1 1 m 0.
xy_e2 2 m 0.
xy_c1 1 m 0.
xy_c2 2 m 0.
xy_c3 3 m 0.
xy_c4 4 m 0.
xy_c5 5 m 0.
xy_c6 6 m 0.
manuf Manufacturer
doc_id Additional Data
desc Description
pStoch Stochastic model
manuf Manufacturer
doc_id Additional Data
desc Description
Chapter 31
Element Objects-Reference Data
Input parameters
Table 31.1 shows the input parameters for the ElmTr2 object, Table 31.2 for the
ElmTr2n. Parameters are presented in the same order of the element dialogue (starting
from the 'Basic Data' tab).
The description of the two winding transformers, presenting the relations among the input
parameters is given in the in the corresponding Technical Reference Paper (Support page
under Technical References).
Note: The name of the parameter is displayed in the Element edit dialogue, by placing
the cursor in the input field of the parameter. Certain parameters are relevant to more
than one calculation, therefore they can be found and edited in different tabs. The avail-
ability of some parameters is conditioned to the current value of the selection parameters
(iopt_...); therefore not all the listed parameters would be visualized at once in a dialogue.
fold_id In Folder
charact Charact.
typ_id Type
iZoneBus Zone 0
ldcrs Rset V 0.
ldcxs Xset V 0.
re0tr_l Re Ohm 0.
desc Description
dpl1 dpl1 0.
dpl2 dpl2 0.
dpl3 dpl3 0.
dpl4 dpl4 0.
dpl5 dpl5 0.
fold_id In Folder
charact Charact.
typ_id Type
iZoneBus Zone 0
ldcrs Rset V 0.
ldcxs Xset V 0.
desc Description
dpl1 dpl1 0.
dpl2 dpl2 0.
dpl3 dpl3 0.
dpl4 dpl4 0.
dpl5 dpl5 0.
Input parameters
Table 31.3 shows the input parameters for the ElmTr3 object. Parameters are presented
in the same order of the element dialogue (starting from the 'Basic Data' tab).
The description of the 3-winding transformers, presenting the relations among the input
parameters is given in the corresponding Technical Reference Paper (Support page under
Technical References).
Note: The name of the parameter is displayed in the Element edit dialogue, by placing
the cursor in the input field of the parameter. Certain parameters are relevant to more
than one calculation, therefore they can be found and edited in different tabs. The avail-
ability of some parameters is conditioned to the current value of the selection parameters
(iopt_...); therefore not all the listed parameters would be visualized at once in a dialogue.
fold_id In Folder
charact Charact.
typ_id Type
iZoneBus Zone 0
re0h Re Ohm 0.
re0m Re Ohm 0.
re0l Re Ohm 0.
xe0h Xe Ohm 0.
xe0m Xe Ohm 0.
xe0l Xe Ohm 0.
desc Description
dpl1 dpl1 0.
dpl2 dpl2 0.
dpl3 dpl3 0.
dpl4 dpl4 0.
dpl5 dpl5 0.
Input parameters
Table 31.4 shows the input parameters of the ElmAsm object. Parameters are presented
in the same order of the element dialogue (starting from the 'Basic Data' tab).
The description of the asynchronous machine model, presenting the relations among the
input parameters is given in the corresponding Technical Reference Paper (Support page
under Technical References).
Note: The name of the parameter is displayed in the Element edit dialogue, by placing
the cursor in the input field of the parameter. Certain parameters are relevant to more
than one calculation, therefore they can be found and edited in different tabs. The avail-
ability of some parameters is conditioned to the current value of the selection parameters
(iopt_...); therefore not all the listed parameters would be visualized at once in a dialogue.
fold_id In Folder
charact Charact.
typ_id Type
i_mot Generator/Motor 0
desc Description
dpl1 dpl1 0.
dpl2 dpl2 0.
dpl3 dpl3 0.
dpl4 dpl4 0.
dpl5 dpl5 0.
Input parameters
Table 31.5 shows the input parameters for the ElmTrb object. Parameters are presented
in the same order of the element dialogue (starting from the 'Basic Data' tab).
The description of the booster transformers, presenting the relations among the input pa-
rameters is given in the corresponding Technical Reference Paper (Support page under
Technical References).
Note: The name of the parameter is displayed in the Element edit dialogue, by placing
the cursor in the input field of the parameter. Certain parameters are relevant to more
than one calculation, therefore they can be found and edited in different tabs. The avail-
ability of some parameters is conditioned to the current value of the selection parameters
(iopt_...); therefore not all the listed parameters would be visualized at once in a dialogue.
fold_id In Folder
charact Charact.
typ_id Type
iZoneBus Zone 0
desc Description
re0tr_l Re Ohm 0.
Input parameters
Table 31.6 shows the input parameters for the ElmCabsys object. Parameters are pre-
sented in the same order of the element dialogue (starting from the 'Basic Data' tab).
The description of the cable system, presenting the relations among the input parameters
and the required types is given in the corresponding Technical Reference Paper (Support
page under Technical References).
Note: The name of the parameter is displayed in the Element edit dialogue, by placing
the cursor in the input field of the parameter. Certain parameters are relevant to more
than one calculation, therefore they can be found and edited in different tabs. The avail-
ability of some parameters is conditioned to the current value of the selection parameters
(iopt_...); therefore not all the listed parameters would be visualized at once in a dialogue.
fold_id In Folder
charact Charact.
desc Description
dpolar Polarity
pa Wave Propagation
Input parameters
Table 31.7 shows the input parameters for the ElmZpu object. Parameters are presented
in the same order of the element dialogue (starting from the 'Basic Data' tab).
The description of the common impedance model, presenting the relations among the in-
put parameters is given in the corresponding Technical Reference Paper (Support page
under Technical References).
Note: The name of the parameter is displayed in the Element edit dialogue, by placing
the cursor in the input field of the parameter. Certain parameters are relevant to more
than one calculation, therefore they can be found and edited in different tabs. The avail-
ability of some parameters is conditioned to the current value of the selection parameters
(iopt_...); therefore not all the listed parameters would be visualized at once in a dialogue
fold_id In Folder
charact Charact.
iZoneBus Zone 0
manuf Manufacturer
desc Description
dpl1 dpl1 0.
dpl2 dpl2 0.
dpl3 dpl3 0.
dpl4 dpl4 0.
dpl5 dpl5 0.
Input parameters
Table 31.8 shows the input parameters of the ElmAsm object. Parameters are presented
in the same order of the element dialogue (starting from the 'Basic Data' tab).
The description of the double feed asynchronous machine model, presenting the relations
among the input parameters is given in the corresponding Technical Reference Paper
(Support page under Technical References).
Note: The name of the parameter is displayed in the Element edit dialogue, by placing
the cursor in the input field of the parameter. Certain parameters are relevant to more
than one calculation, therefore they can be found and edited in different tabs. The avail-
ability of some parameters is conditioned to the current value of the selection parameters
(iopt_...); therefore not all the listed parameters would be visualized at once in a dialogue.
fold_id In Folder
charact Charact.
typ_id Type
i_mot Generator/Motor 0
desc Description
cv Cv x>=0 0.
Kd Kd 0.1
Kq Kq 0.1
Td Td s 0.01
Tq Tq s 0.01
Input parameters
Table 31.9 shows the input parameters for the ElmXnet object. Parameters are present-
ed in the same order of the element dialogue (starting from the 'Basic Data' tab).
The description of the external network model, presenting the relations among the input
parameters is given in the corresponding Technical Reference Paper (Support page under
Technical References).
Note: The name of the parameter is displayed in the Element edit dialogue, by placing
the cursor in the input field of the parameter. Certain parameters are relevant to more
than one calculation, therefore they can be found and edited in different tabs. The avail-
ability of some parameters is conditioned to the current value of the selection parameters
(iopt_...); therefore not all the listed parameters would be visualized at once in a dialogue.
fold_id In Folder
charact Charact.
desc Description
cpower From MW
dpl1 dpl1 0.
dpl2 dpl2 0.
dpl3 dpl3 0.
dpl4 dpl4 0.
dpl5 dpl5 0.
Input parameters
Table 31.10 shows the input parameters of the ElmLod object. Parameters are presented
in the same order of the element dialogue (starting from the 'Basic Data' tab).
The description of the general load model, presenting the relations among the input pa-
rameters is given in the corresponding Technical Reference Paper (Support page under
Technical References).
Note: The name of the parameter is displayed in the Element edit dialogue, by placing
the cursor in the input field of the parameter. Certain parameters are relevant to more
than one calculation, therefore they can be found and edited in different tabs. The avail-
ability of some parameters is conditioned to the current value of the selection parameters
(iopt_...); therefore not all the listed parameters would be visualized at once in a dialogue.
fold_id In Folder
charact Charact.
typ_id Type
desc Description
OptCost Unit 0
dpl1 dpl1 0.
dpl2 dpl2 0.
dpl3 dpl3 0.
dpl4 dpl4 0.
dpl5 dpl5 0.
Input parameters
Table 31.11 shows the input parameters for the ElmLodlv object. Parameters are pre-
sented in the same order of the element dialogue (starting from the 'Basic Data' tab).
The description of the low voltage load model, presenting the relations among the input
parameters and the required types is given in the corresponding Technical Reference Pa-
fold_id In Folder
charact Charact.
typ_id Type
pnight P kW x>=0 0.
desc Description
OptCost Unit 0
dpl1 dpl1 0.
dpl2 dpl2 0.
dpl3 dpl3 0.
dpl4 dpl4 0.
dpl5 dpl5 0.
Input parameters
Table 31.12 shows the input parameters for the ElmLodvp object. Parameters are pre-
sented in the same order of the element dialogue (starting from the 'Basic Data' tab).
The description of the partial load model, presenting the relations among the input pa-
rameters and the required types is given in the corresponding Technical Reference Paper
(Support page under Technical References).
Note: The name of the parameter is displayed in the Element edit dialogue, by placing
the cursor in the input field of the parameter. Certain parameters are relevant to more
than one calculation, therefore they can be found and edited in different tabs. The avail-
ability of some parameters is conditioned to the current value of the selection parameters
(iopt_...); therefore not all the listed parameters would be visualized at once in a dialogue.
fold_id In Folder
charact Charact.
typ_id Type
pnight P kW x>=0 0.
desc Description
Input parameters
Table 31.13 shows the input parameters for the ElmLneroute object. Parameters are
presented in the same order of the element dialogue (starting from the 'Basic Data' tab).
The description of the line route model, presenting the relations among the input param-
eters and the required types is given in the corresponding Technical Reference Paper
(Support page under Technical References).
Note: The name of the parameter is displayed in the Element edit dialogue, by placing
the cursor in the input field of the parameter. Certain parameters are relevant to more
than one calculation, therefore they can be found and edited in different tabs. The avail-
ability of some parameters is conditioned to the current value of the selection parameters
(iopt_...); therefore not all the listed parameters would be visualized at once in a dialogue.
fold_id In Folder
charact Charact.
typ_id Type
iZoneBus Zone 0
sections Sections
index Index 0.
desc Description
dpl1 dpl1 0.
dpl2 dpl2 0.
dpl3 dpl3 0.
dpl4 dpl4 0.
dpl5 dpl5 0.
Input parameters
Table 31.14 shows the input parameters for the ElmLnesec object. Parameters are pre-
sented in the same order of the element dialogue (starting from the 'Basic Data' tab).
The description of the line route model, presenting the relations among the input param-
eters and the required types is given in the corresponding Technical Reference Paper
(Support page under Technical References).
Note: The name of the parameter is displayed in the Element edit dialogue, by placing
the cursor in the input field of the parameter. Certain parameters are relevant to more
than one calculation, therefore they can be found and edited in different tabs. The avail-
ability of some parameters is conditioned to the current value of the selection parameters
(iopt_...); therefore not all the listed parameters would be visualized at once in a dialogue.
Table 31.14:ElmLnesec
Name Description Unit Range Default
fold_id In Folder
charact Charact.
typ_id Type
index Index 0.
Table 31.14:ElmLnesec
Name Description Unit Range Default
desc Description
Input parameters
Tables 31.15, 31.16 and 31.17 show the input parameters for the defined motor driven
machine types. Parameters are presented in the same order of the element dialogue
(starting from the 'Basic Data' tab).
The description of the motor driven machine models, presenting the relations among the
parameters and the connection to a motor, are given in the corresponding Technical Ref-
erence Paper (Support page under Technical References).
Note: The name of the parameter is displayed in the Element edit dialogue, by placing
the cursor in the input field of the parameter. Certain parameters are relevant to more
than one calculation, therefore they can be found and edited in different tabs. The avail-
ability of some parameters is conditioned to the current value of the selection parameters
(iopt_...); therefore not all the listed parameters would be visualized at once in a dialogue
fold_id In Folder
charact Charact.
typ_id Type
fold_id In Folder
charact Charact.
typ_id Type
fold_id In Folder
charact Charact.
typ_id Type
Input parameters
Table 31.18 shows the input parameters for the ElmNec object. Parameters are present-
ed in the same order of the element dialogue (starting from the 'Basic Data' tab).
The description of the NEC/NER model, presenting the relations among the input param-
eters is given in the corresponding Technical Reference Paper (Support page under Tech-
nical References).
Note: The name of the parameter is displayed in the Element edit dialogue, by placing
the cursor in the input field of the parameter. Certain parameters are relevant to more
than one calculation, therefore they can be found and edited in different tabs. The avail-
ability of some parameters is conditioned to the current value of the selection parameters
(iopt_...); therefore not all the listed parameters would be visualized at once in a dialogue.
fold_id In Folder
charact Charact.
manuf Manufacturer
desc Description
Input parameters
Table 31.19 shows the input parameters of the ElmVscmono object. Parameters are pre-
sented in the same order of the element dialogue (starting from the 'Basic Data' tab).
The description of the PWM converter model, presenting the relations among the input
parameters is given in the corresponding Technical Reference Paper (Support page under
Technical References).
Note: The name of the parameter is displayed in the Element edit dialogue, by placing
the cursor in the input field of the parameter. Certain parameters are relevant to more
than one calculation, therefore they can be found and edited in different tabs. The avail-
ability of some parameters is conditioned to the current value of the selection parameters
(iopt_...); therefore not all the listed parameters would be visualized at once in a dialogue
fold_id In Folder
charact Charact.
Kd Kd 0.1
Kq Kq 0.1
Td Td s 0.01
Tq Tq s 0.01
manuf Manufacturer
desc Description
Input parameters
Table 31.20 shows the input parameters of the ElmVsc object. Parameters are presented
in the same order of the element dialogue (starting from the 'Basic Data' tab).
The description of the converter model, presenting the relations among the input param-
eters is given in the corresponding Technical Reference Paper (Support page under Tech-
nical References).
Note: The name of the parameter is displayed in the Element edit dialogue, by placing
the cursor in the input field of the parameter. Certain parameters are relevant to more
than one calculation, therefore they can be found and edited in different tabs. The avail-
ability of some parameters is conditioned to the current value of the selection parameters
(iopt_...); therefore not all the listed parameters would be visualized at once in a dialogue.
fold_id In Folder
charact Charact.
manuf Manufacturer
desc Description
Input parameters
Table 31.21 shows the input parameters for the ElmRecmono object. Parameters are
presented in the same order of the element dialogue (starting from the 'Basic Data' tab).
The description of the rectifier model, presenting the relations among the input parame-
ters is given in the corresponding Technical Reference Paper (Support page under Tech-
nical References).
Note: The name of the parameter is displayed in the Element edit dialogue, by placing
the cursor in the input field of the parameter. Certain parameters are relevant to more
than one calculation, therefore they can be found and edited in different tabs. The avail-
ability of some parameters is conditioned to the current value of the selection parameters
(iopt_...); therefore not all the listed parameters would be visualized at once in a dialogue.
fold_id In Folder
charact Charact.
typ_id Type
desc Description
Pset Power-Setpoint MW 1.
pctrl Controller
Input parameters
Table 31.22 shows the input parameters for the ElmRec object. Parameters are present-
ed in the same order of the element dialogue (starting from the 'Basic Data' tab).
The description of the rectifier model, presenting the relations among the input parame-
ters is given in the corresponding Technical Reference Paper (Support page under Tech-
nical References).
Note: The name of the parameter is displayed in the Element edit dialogue, by placing
the cursor in the input field of the parameter. Certain parameters are relevant to more
than one calculation, therefore they can be found and edited in different tabs. The avail-
ability of some parameters is conditioned to the current value of the selection parameters
(iopt_...); therefore not all the listed parameters would be visualized at once in a dialogue.
loc_name Name
fold_id In Folder
charact Charact.
typ_id Type
desc Description
Pset Power-Setpoint MW 1.
bstp Control-Characteristic
ntrcn Tap-Changer 0
pctrl Controller
Input parameters
Table 31.23 shows the input parameters of the ElmScap object. Parameters are present-
ed in the same order of the element dialogue (starting from the 'Basic Data' tab).
The description of the Series Capacitance model, presenting the relations among the input
parameters is given in the corresponding Technical Reference Paper (Support page under
Technical References).
Note: The name of the parameter is displayed in the Element edit dialogue, by placing
the cursor in the input field of the parameter. Certain parameters are relevant to more
than one calculation, therefore they can be found and edited in different tabs. The avail-
ability of some parameters is conditioned to the current value of the selection parameters
(iopt_...); therefore not all the listed parameters would be visualized at once in a dialogue
fold_id In Folder
charact Charact.
iZoneBus Zone 0
Im Current kA
Vm Voltage kV
manuf Manufacturer
desc Description
Input parameters
Table 31.24 shows the input parameters for the ElmSind object. Parameters are pre-
sented in the same order of the element dialogue (starting from the 'Basic Data' tab).
The description of the series reactance model, presenting the relations among the input
parameters is given in the corresponding Technical Reference Paper (Support page under
Technical References).
Note: The name of the parameter is displayed in the Element edit dialogue, by placing
the cursor in the input field of the parameter. Certain parameters are relevant to more
than one calculation, therefore they can be found and edited in different tabs. The avail-
ability of some parameters is conditioned to the current value of the selection parameters
(iopt_...); therefore not all the listed parameters would be visualized at once in a dialogue.
fold_id In Folder
charact Charact.
iZoneBus Zone 0
manuf Manufacturer
desc Description
Input parameters
Table 31.25 shows the input parameters for the ElmShnt object. Parameters are pre-
sented in the same order of the element dialogue (starting from the 'Basic Data' tab).
The description of the shunt/filter model, presenting the relations among the input pa-
rameters is given in the corresponding Technical Reference Paper (Support page under
Technical References).
Note: The name of the parameter is displayed in the Element edit dialogue, by placing
the cursor in the input field of the parameter. Certain parameters are relevant to more
than one calculation, therefore they can be found and edited in different tabs. The avail-
ability of some parameters is conditioned to the current value of the selection parameters
(iopt_...); therefore not all the listed parameters would be visualized at once in a dialogue.
fold_id In Folder
charact Charact.
nbsph of Phase
c1 Capacitance C1 uF x>=0 0.
fcharL L(f)
fcharR R(f)
fcharC C(f)
manuf Manufacturer
desc Description
Input parameters
Table 31.26 shows the input parameters for the ElmVar object. Parameters are present-
ed in the same order of the element dialogue (starting from the 'Basic Data' tab).
The description of the soft starter model, presenting the relations among the input pa-
rameters is given in the corresponding Technical Reference Paper (Support page under
Technical References).
Note: The name of the parameter is displayed in the Element edit dialogue, by placing
the cursor in the input field of the parameter. Certain parameters are relevant to more
than one calculation, therefore they can be found and edited in different tabs. The avail-
ability of some parameters is conditioned to the current value of the selection parameters
(iopt_...); therefore not all the listed parameters would be visualized at once in a dialogue.
fold_id In Folder
charact Charact.
iZoneBus Zone 0
K Amplification x>=0&x<=1 0.
manuf Manufacturer
desc Description
Input parameters
Table 31.27 shows the input parameters for the ElmSvs object. Parameters are present-
ed in the same order of the element dialogue (starting from the 'Basic Data' tab).
The description of the static var compensator, presenting the relations among the input
parameters is given in the corresponding Technical Reference Paper (Support page under
Technical References).
Note: The name of the parameter is displayed in the Element edit dialogue, by placing
the cursor in the input field of the parameter. Certain parameters are relevant to more
than one calculation, therefore they can be found and edited in different tabs. The avail-
ability of some parameters is conditioned to the current value of the selection parameters
(iopt_...); therefore not all the listed parameters would be visualized at once in a dialogue.
fold_id In Folder
charact Charact.
Re Resistance, Re Ohm 0.
Xe Reactance, Xe Ohm 0.
R0 Resistance, R0 Ohm 0.
X0 Reactance, X0 Ohm 0.
manuf Manufacturer
desc Description
Input parameters
Table 31.28 shows the input parameters of the ElmSym object. Parameters are present-
ed in the same order of the element dialogue (starting from the 'Basic Data' tab).
The description of the synchronous machine model, presenting the relations among the
input parameters is given in the corresponding Technical Reference Paper (Support page
under Technical References).
Note: The name of the parameter is displayed in the Element edit dialogue, by placing
the cursor in the input field of the parameter. Certain parameters are relevant to more
than one calculation, therefore they can be found and edited in different tabs. The avail-
ability of some parameters is conditioned to the current value of the selection parameters
(iopt_...); therefore not all the listed parameters would be visualized at once in a dialogue.
fold_id In Folder
charact Charact.
typ_id Type
i_mot Generator/Motor 0
desc Description
Pmin_uc Min. MW 0.
cost_up Startup $ 0.
cost_down Shutdown $ 0.
cpower Power MW
dsecres Reserve 0.
cap_P Act.Power MW
P_min Min. MW 0.
dpl1 dpl1 0.
dpl2 dpl2 0.
dpl3 dpl3 0.
dpl4 dpl4 0.
dpl5 dpl5 0.
Input parameters
Table 31.29 shows the input parameters for the ElmTow object. Parameters are pre-
sented in the same order of the element dialogue (starting from the 'Basic Data' tab).
The description of the line coupling model, presenting the relations among the input pa-
rameters is given in the corresponding Technical Reference Paper (Support page under
Technical References).
Note: The name of the parameter is displayed in the Element edit dialogue, by placing
the cursor in the input field of the parameter. Certain parameters are relevant to more
than one calculation, therefore they can be found and edited in different tabs. The avail-
ability of some parameters is conditioned to the current value of the selection parameters
(iopt_...); therefore not all the listed parameters would be visualized at once in a dialogue.
fold_id In Folder
charact Charact.
desc Description
line1 Circuit 1
line2 Circuit 2
line3 Circuit 3
line4 Circuit 4
line5 Circuit 5
line6 Circuit 6
towdist Distance m
sag_e Max.Sag m
dpolar Polarity
sag_c Max.Sag m
transp Transposition
dtow Length 0.
pos1 Position 1 km
pos2 Position 2 km
pa Wave Propagation
Input parameters
Table 31.30 shows the input parameters for the ElmLne object. Parameters are present-
ed in the same order of the element dialogue (starting from the 'Basic Data' tab).
The description of the line model, presenting the relations among the input parameters
and the posible types is given in the corresponding Technical Reference Paper (Support
page under Technical References).
Note: The name of the parameter is displayed in the Element edit dialogue, by placing
the cursor in the input field of the parameter. Certain parameters are relevant to more
than one calculation, therefore they can be found and edited in different tabs. The avail-
ability of some parameters is conditioned to the current value of the selection parameters
(iopt_...); therefore not all the listed parameters would be visualized at once in a dialogue.
fold_id In Folder
charact Charact.
typ_id Type
iZoneBus Zone 0
pz1 Poles,Mode 1 Hz
zz1 Zeros, Z1 Hz
pz2 Poles,Mode 2 Hz
zz2 Zeros, Z2 Hz
pa1 Poles, A1 Hz
za1 Zeros, A1 Hz
pa0 Poles, A0 Hz
za0 Zeros, A0 Hz
pa2 Poles, A2 Hz
za2 Zeros, A2 Hz
cubsecs Routes/Cubicles/Sections
desc Description
dpl1 dpl1 0.
dpl2 dpl2 0.
dpl3 dpl3 0.
dpl4 dpl4 0.
dpl5 dpl5 0.
Input parameters
Table 31.31 shows the input parameters of the ElmClock object. Parameters are pre-
sented in the same order of the element dialogue (starting from the 'Basic Data' tab).
The description of the clock model, presenting the relations among the input parameters
is given in the corresponding Technical Reference Paper (Support page under Technical
References).
Note: The name of the parameter is displayed in the Element edit dialogue, by placing
the cursor in the input field of the parameter. Certain parameters are relevant to more
than one calculation, therefore they can be found and edited in different tabs. The avail-
ability of some parameters is conditioned to the current value of the selection parameters
(iopt_...); therefore not all the listed parameters would be visualized at once in a dialogue
fold_id In Folder
charact Charact.
typ_id Type
Tp Period ms x>0 1.
Input parameters
Table 31.32 shows the input parameters of the ElmFft object. Parameters are presented
in the same order of the element dialogue (starting from the 'Basic Data' tab).
The description of the fast Fourier transform model, presenting the relations among the
input parameters is given in the in the corresponding Technical Reference Paper (Support
page under Technical References).
Note: The name of the parameter is displayed in the Element edit dialogue, by placing
the cursor in the input field of the parameter. Certain parameters are relevant to more
than one calculation, therefore they can be found and edited in different tabs. The avail-
ability of some parameters is conditioned to the current value of the selection parameters
(iopt_...); therefore not all the listed parameters would be visualized at once in a dialogue
fold_id In Folder
charact Charact.
typ_id Type
Input parameters
Table 31.33 shows the input parameters of the ElmFile object. Parameters are presented
in the same order of the element dialogue (starting from the 'Basic Data' tab).
The description of the measurement file element, presenting the functionality of the input
parameters is given in the corresponding Technical Reference Paper (Support page under
Technical References).
Note: The name of the parameter is displayed in the Element edit dialogue, by placing
the cursor in the input field of the parameter. Certain parameters are relevant to more
than one calculation, therefore they can be found and edited in different tabs. The avail-
ability of some parameters is conditioned to the current value of the selection parameters
(iopt_...); therefore not all the listed parameters would be visualized at once in a dialogue.
fold_id In Folder
charact Charact.
f_name Filename
icol Column j 0
afac Factor a 1.
bfac Factor b 0.
prim P or S
desc Description
Input parameters
Table 31.34 shows the input parameters of the ElmFsrc object. Parameters are present-
ed in the same order of the element dialogue (starting from the 'Basic Data' tab).
The description of the Fourier source model, presenting the relations among the input pa-
rameters is given in the corresponding Technical Reference Paper (Support page under
Technical References).
Note: The name of the parameter is displayed in the Element edit dialogue, by placing
the cursor in the input field of the parameter. Certain parameters are relevant to more
than one calculation, therefore they can be found and edited in different tabs. The avail-
ability of some parameters is conditioned to the current value of the selection parameters
(iopt_...); therefore not all the listed parameters would be visualized at once in a dialogue
fold_id In Folder
charact Charact.
dc_com DC Component 0.
ampl_ Amplitude
Input parameters
Table 31.35 shows the input parameters of the ElmReg object. Parameters are presented
in the same order of the element dialogue (starting from the 'Basic Bata' tab).
The complete description of the Register model is given in the corresponding Technical
Reference Paper (Support page under Technical References).
Note: The name of the parameter is displayed in the Element edit dialogue, by placing
the cursor in the input field of the parameter. Certain parameters are relevant to more
than one calculation, therefore they can be found and edited in different tabs. The avail-
ability of some parameters is conditioned to the current value of the selection parameters
(iopt_...); therefore not all the listed parameters would be visualized at once in a dialogue
fold_id In Folder
charact Charact.
typ_id Type
Input parameters
Table 31.36 shows the input parameters of the ElmSamp object. Parameters are pre-
sented in the same order of the element dialogue (starting from the 'Basic Data' tab).
The complete description of the Sample and Hold model is given in the corresponding
Technical Reference Paper (Support page under Technical References).
Note: The name of the parameter is displayed in the Element edit dialogue, by placing
the cursor in the input field of the parameter. Certain parameters are relevant to more
than one calculation, therefore they can be found and edited in different tabs. The avail-
ability of some parameters is conditioned to the current value of the selection parameters
(iopt_...); therefore not all the listed parameters would be visualized at once in a dialogue
fold_id In Folder
charact Charact.
typ_id Type
Input parameters
Table 31.37 shows the input parameters of the ElmTrigger object. Parameters are pre-
sented in the same order of the element dialogue (starting from the 'Basic Data' tab).
The complete description of the Trigger model is given in the corresponding Technical
Reference Paper (Support page under Technical References).
Note: The name of the parameter is displayed in the Element edit dialogue, by placing
the cursor in the input field of the parameter. Certain parameters are relevant to more
than one calculation, therefore they can be found and edited in different tabs. The avail-
ability of some parameters is conditioned to the current value of the selection parameters
(iopt_...); therefore not all the listed parameters would be visualized at once in a dialogue
fold_id In Folder
charact Charact.
typ_id Type
i_max On x=0|x=1 0
i_min On x=0|x=1 0
i_grd On x=0|x=1 0
valmax Threshold 1.
Appendix A
Glossary
Device
A certain kind of physical power system components: certain synchronous machines, two-
winding transformers, busbars, or other kinds of equipment. Example: a NKBA 0.6/1kV 4
x 35sm cable.
Appliance
A specific physical, installed, power system component: a specific generator, transformer,
busbar, etc. Example: a piece of NKBA 0.6/1kV 4 x 35sm cable, 12.4 meters long.
Type
A mathematical model for devices: general models for two-winding transformers, two-
winding transformers, busbars, etc. A type model only contains the non-specific data valid
for whole groups of power system elements. Example: a NKBA 0.6/1kV 4 x 35sm cable
type, named "NKBA_4x35.TypLne"
Element
A mathematical model for specific appliances. Most element models only hold the appli-
ance-specific data while the more general type-specific data comes from a type-reference.
Example: a model of a piece of NKBA 0.6/1kV 4 x 35sm cable, 12.4 meters long, named
"FC 1023.ElmLne"
Cubicle
A cubicle is the connection point between a edge or branch element and a node (repre-
sented by a busbar or terminal). It may be visualized as a bay in a switch yard or a panel
in a switchgear board. Elements such as CT's, protection equipment, breakers and so
forth, are housed in the cubicle, as one would expect to find in reality.
Node
The mathematical or generic description for what are commonly known as busbars in the
electrical world. In PowerFactory nodes may be represented by "Busbars" or "Termi-
nals" of various kinds. These are treated in the same manner in mathematical terms but
treated slightly differently in the database. As far as possible the user should use terminals
as Busbars can be somewhat inflexible. See also Busbars, Edge Elements, Branch Ele-
A-1
DIgSILENT PowerFactory Glossary
ments.
Busbars
Busbars are particular representations of nodes. Busbars are housed in a Station folder
and several busbars may be part of a station.
Edge Elements
The elements between two nodes. May also be termed 'two port element.' Source, topo-
logical studies; picture a 3 dimensional box, the corners of the box would be called the
nodes, and the edges between corners are hence 'edges.' See also nodes, branch ele-
ments.
Branch Elements
A one port element connected to a node, such as a load or a machine. See also nodes,
edge elements.
Class
A class is a template for an element, type or other kind of objects like controller block
diagrams, object filters, calculation settings, etc. Examples:
• The 'TypLne' class is the type model for all lines and cables
• The 'ElmLne' class is an element model for a specific line or cable
• The 'ComLdf' class is a load-flow command
• The 'EvtSwitch' class is an event for a switch to open or close during simulation
Object
An object is a specific item stored in the database. Examples are specific type or element
models which have been edited to model specific devices or appliances. Examples: the
element "FC 1023.ElmLne", the type "NKBA_4x35.TypLne", the load-flow command
"3Phase.ComLdf"
Grid
A Grid is a collection of power system elements which are all stored in one so-called "Grid
Folder'' in the database. Normally, a grid forms a logical part of a power system design,
like a the MV distribution system in a province, or the HV transport system in a state.
System Stage
A system stage is an alternative design or variation for a particular grid. A system stage
is stored in a system stage folder, which keeps track of all differences from the design in
the higher hierarchical level. The highest level is formed by the base grid folder. It is pos-
sible to have system stages of system stages.
See also: Grid, Base Case
A-2
DIgSILENT PowerFactory Glossary
Base Case
A base case is the highest level in a tree of hierarchical system stage designs. It is the
basic power system design, for which one or more alternative designs may be created and
analyzed. The base case is always stored in a grid folder.
See also: System Stage, Grid
Study Case
A study case is a folder which stores a list of references or shortcuts to grid or system
stage folders. These folders are (de)activated when the calculation case folder is (de)ac-
tivated.
Elements in the grid folders that are referenced by the study case form the 'calculation
target' for all calculation functions. Elements in all other, non-active, grid folders are not
considered for calculation.
Besides the list of active folders, the calculation case also stores all calculations com-
mands, results, events, and other objects which are, or have been, used to analyze the
active power system.
See also: Grid, System Stage
Project
All power system definitions and calculations are stored and activated in a project. The
project folder therefore is a basic folder in the user's database tree. All grids that make
out the power system design, with all design variants, study cases, commands, results,
etc. are stored together in a single project folder.
Result Object
A result object keeps one or more lists of parameters which are to be monitored during a
calculation. Results objects are used for building calculation result reports and for defining
a virtual instrument.
See also: Virtual Instrument
Virtual Instrument
A virtual instrument is a graphical representation of calculation results. It may be a line
or bar graph, a gauge, a vector diagram, etc. A virtual instrument gets its values from a
result object.
See also: Result Object.
Block Definition
A block definition is a mathematical model which may be used in other block definitions
or in a composite model. Examples are all default controllers (i.e. VCO's, PSS's, MDM's),
and all additional user-defined DSL models. A block definition is called "primitive'' when it
is directly written in DSL, or "complex'' when it is build from other block definitions, by
drawing a block diagram.
A-3
DIgSILENT PowerFactory Glossary
Block Diagram
A block diagram is a graphical representation of a DSL model, i.e. a voltage controller, a
motor driven machine model or a water turbine model. Block diagrams combine DSL prim-
itive elements and block definitions created by drawing other block diagram.
The block models thus created may (again) be used in other block diagrams or to create
a Composite Frame.
See also: DSL primitive, Composite Frame
DSL primitive
A DSL primitive is the same as a primitive block definition. A DSL primitive is written di-
rectly in DSL without the use of a block diagram.
Examples are PID controllers, time lags, simple signal filters, integrators, limiters, etc. DSL
primitives are normally used to build more complex block definitions.
See also: Block Definition, Block Diagram
Slot
A slot is a place-holder for a block definition in a composite frame. A composite model is
created from a composite frame by filling one or more slots with an appropriate object.
See also: Block Definition, Composite Frame.
Composite Frame
A composite frame is a special block diagram which defines a new stand-alone model,
mostly without in- or outputs. A composite frame is principally a circuit in which one or
more slots are connected to each other.
A composite frame is used to create composite models by filling the slots with appropriate
objects. The composite frame thus acts as template for a specific kind of composite mod-
els.
See also: Block Diagram, Slot
Composite Model
A composite model is a specific combination of mathematical models.These models may
be power system elements such as synchronous generators, or block definitions, such as
voltage controllers, primary mover models or power system stabilizers.
Composite models may be used to create new objects, such as protection devices, to
'dress-up' power system elements such as synchronous machines with controllers, prime
movers models, etc., or for the identification of model parameters on the basis of mea-
surements.
A-4
DIgSILENT PowerFactory Glossary
Page Tab
Page tabs are small indexes at the edge (mostly on the top or bottom) of a multi-page
window. The tabs show the titles of the pages. Left-clicking the page tab opens the cor-
responding page. Page tabs are used in object dialogues, which often have different pag-
es for different calculation functions, and in the Graphics Board Window, when more than
one graphical page is present.
Drag&Drop
"Drag&Drop'' is a method for moving an object by left clicking it and subsequently moving
the mouse while holding the mouse button down ("dragging''). Releasing the mouse but-
ton when the new location is reached is called "dropping''. This will move the object to
the new location.
DAQ
Abbreviation for "Data Acquisition''.
DPL
Abbreviation for "DIgSILENT Programming Language''.
A-5
DIgSILENT PowerFactory Glossary
A-6
DIgSILENT PowerFactory DPL Reference
Appendix B
DPL Reference
B-1
DIgSILENT PowerFactory DPL Reference
fscanfsep Assigns fields in file and returns number of fields. Considers separation
character and stops after max. number of positions given.
ActiveCase Returns the active calculation case.
SummaryGrid Returns the summary grid.
ActiveProject Returns the active project.
validLDF Checks for a valid load-flow result.
validRMS Checks for a valid simulation result.
validSHC Checks for a valid short-circuit result.
validSIM Checks for a valid simulation result.
SetLineFeed Sets the automatic line feed for "printf()''.
GetPageLen Returns the number of lines per page.
GetCaseObject Returns the found class object from current case.
GetCaseCommand Returns default command objects.
GetGraphBoard Returns the currently active Graphics Board.
GetTime Returns current processor time.
GetLanguage Returns the current language.
GetLocalLib Returns a local library folder.
GetGlobalLib Returns a global library folder.
PostCommand Adds a command to the command pipe.
ResIndex Returns column number of variable in result object.
GetResData Returns a value from a certain result curve.
ResNval Returns number of values stored in certain result curve.
ResNvars Returns the number of variables (columns) in result file.
LoadResData Loads the data of a result file in memory.
ResetCalculation Resets the calculations.
fopen Opens a file from a path.
fclose Closes an open file.
Random Returns a random number.
SetRandSeed Initializes the random number generator.
fRand Returns stochastic numbers according to a probability distribution.
ddeOpen Establishes a DDE connection to a topic of an application.
ddeClose Closes the DDE link.
ddeExe Starts command in the current dde opened topic.
ddePoke Sends data to an item in the currently opened DDE topic.
ddeRequest Receives data from an item in a previously opened DDE topic.
B-2
DIgSILENT PowerFactory DPL Reference
Exe
void Exe (string Command)
DPL Internal Methods
Immediately executes the command, bypassing the command pipe in the input window.
The DPL command will continue after the command has been executed. The 'Exe' com-
mand is provided for compatibility and testing purposes only and should only be used by
experienced users.
Arguments:
string Command (obligatory): The command string
Return value:
void (no return value)
Example:
The following command connects two terminals via an existing coupler 'NameBreaker'.
while (Obj) {
NameBreaker = ...;
NameTerm1 = ...;
NameTerm2 = ...;
ObjTerm = SEL.First();
if (ObjTerm) {
printf('Connect to Terminal: %s',NameTerm2);
sExec = sprintf('connect obj=%s b1=%s b2=%s',
NameBreaker,NameTerm1,NameTerm2);
Exe(sExec);
Obj = SelGrids.Next();
}
AllRelevant
Set AllRelevant (string S |int i)
DPL Internal Methods
Returns a set with calculation relevant objects, i.e. the objects which are used by the cal-
culations. The set of calculation relevant objects is determined by the currently active
study case and the currently active grids.
Objects which are out-of-service are ignored when i=0, but are included when i=1 or
when i is omitted. A wildcard argument can be given, and only objects whose name and
class-name satisfy this wildcard will be returned.
Arguments:
string S (optional) : Classname(s) with wildcards
int i (optional) : flag to include out of service objects
Return value:
The set of all calculation relevant objects, according to the given class-name wildcards
Example 1:
The following example writes the names of calculation relevant objects for various set-
tings.
B-3
DIgSILENT PowerFactory DPL Reference
set S;
object O;
printf('all objects, including out-of-service:');
S = AllRelevant();
for (O=S.First(); O; O=S.Next()) {
O.ShowFullName();
}
printf('all objects, excluding out-of-service:');
S = AllRelevant(0);
for (O=S.First(); O; O=S.Next()) {
O.ShowFullName();
}
printf('all busbars and terminals,');
printf('including out-of-service:');
S = AllRelevant('*.StaBar,*.ElmTerm');
for (O=S.First(); O; O=S.Next()) {
O.ShowFullName();
}
printf('all lines, excluding out-of-service:');
S = AllRelevant('*.ElmLne',0);
for (O=S.First(); O; O=S.Next()) {
O.ShowFullName();
}
Example 2:
The following example writes the full name of all relevant busbars and terminals in the
output window.
set S;
object O;
S = AllRelevant('*.StaBar,*.ElmTerm'); ! includes out-of-service objects
for (O=S.First(); O; O=S.Next()) {
O.ShowFullName();
}
ClearCommands
void ClearCommands ()
DPL Internal Methods
Clears the command pipe of the input window.
Arguments:
none
Return value:
void (no return value)
Example:
The following command clears the input window.
ClearCommands();
ClearOutput
void ClearOutput ()
B-4
DIgSILENT PowerFactory DPL Reference
Delete
void Delete (object O | set S)
DPL Internal Methods
Deletes an object or a set of objects from the database. The objects are not destroyed
but are moved to the recycle bin.
Arguments:
object O (optional): The object to delete
set S (optional): The set of objects to delete
Return value:
void
Example:
The following example removes all "Dummy" fuses from the network. The 'DummyType'
variable is a local variable in the DPL script. A set of objects-to-delete is created first and
then that set is deleted. This has the advantage that one single entry in the recycle bin is
created which contains all deleted fuses. Manually restoring ('undelete') the deleted fuses,
in case of a mistake, can then be done by a single restore command.
object O;
set S, Del;
S = AllRelevant();
O = S.Firstmatch('RelFuse');
while (O) {
if (O:typ_id=DummyType) {
Del.Add(O);
}
O = S.Nextmatch();
}
Delete(Del);
B-5
DIgSILENT PowerFactory DPL Reference
B-6
DIgSILENT PowerFactory DPL Reference
Table B.1:
a black i gray
b black j light gray
c red k bordeaux
d green l dark red
e blue m dark green
f brown n light green
g cyan o marine
h magenta p dark blue
Example:
printf('The \cfbrown\ca fox jumped\nover\tthe\nlazy\tcat');
printf('result written to c:\\documents\\pf\\res.txt');
printf('%% = %%%6.2f%% %%', 123.34);
printf
void printf (String Format, String T | double X | int I, ...)
DPL Internal Methods
Outputs a formatted string. The printf() command uses the C++ printf() formatting syn-
tax.
Arguments:
String Format (obligatory): The format string
String T (optional): string argument
double X (optional): double argument
int I (optional): int argument
Return value:
void
Example:
See the format string syntax for examples and more information.
The output format is defined by the format string. The passed arguments and the passed
format string must match. An error message will be produced when, for instance, a format
string for two strings is used together with three doubles.
The 'printf' will automatically insert a line-break after printing by default. This means that
the next 'printf' will start on the next line. The automatic line-break can be disabled by
using the "SetLineFeed''-function.
See "SetLineFeed'' for more information.
B-7
DIgSILENT PowerFactory DPL Reference
sprintf
string sprintf (String Format, String T | double X | int I, ...)
DPL Internal Methods
Returns a formatted string. The sprintf() command uses the C++ printf() formatting syn-
tax.
Arguments:
String Format (obligatory): The format string
String T (optional): string argument
double X (optional): double argument
int I (optional): int argument
Return value:
The formatted string
Example:
See the format string syntax for examples and more information.
The following example redirects the output to a file. The filename is formatted from a path
and the name of the current calculation case. "Redirect'' is an ComOp and "StopRedirect''
is an ComCl object in the DPL command
Redirect:f = sprintf('%s%s.out',
'c:\\MyDocuments\\results0813\\', O:loc_name);
Redirect.Execute();
Form.WriteOut(Lines); ! write a report
StopRedirect.Execute(); ! stop redirection
Since version 13.1 there is an easier way of writing an string to a file by using "fprintf'' .
The output format is defined by the format string. The passed arguments and the passed
format string must match. An error message will be produced when, for instance, a format
string for two strings is used together with three doubles.
See the format string syntax for more information.
Also see "printf'' .
Also see "fprintf'' .
Also see "Error'' .
Also see "Warn'' .
Also see "Info'' . Also see "Write'' .
B-8
DIgSILENT PowerFactory DPL Reference
fprintf
void fprintf (int iFH, string Format, string T | double X | int I, ...)
DPL Internal Methods
Writes a formatted string to a file. The fprintf() command uses the C++ printf() format-
ting syntax.
Arguments:
int iFH (obligatory): Number of file handler (0,1,...,9)
string Format (obligatory): Defines a format of variable types (int/string/double) to which
the fields are assigned
string T (optional): Return of the result string
double X (optional): Return of the result double
int I (optional): Return of the result integer
Return value:
A return value of 0 indicates that no fields were assigned. The return value is -1 for an
error or if the end of the string is reached before the first conversion.
Example:
See the format string syntax for examples and more information.
The following example outputs a defined string to a file.
double x;
int i;
string s;
fopen('d:\tmp\test.txt','r',0);
x = 123456789.987654321;
i = 2468;
s = 'hello dpl';
fprintf(0,'string:%s int=%d double=%f', s,i,x);
fclose(0);
The output format is defined by the format string. The passed arguments and the passed
format string must match. An error message will be produced when, for instance, a format
string for two strings is used together with three doubles.
See the format string syntax for more information.
Also see "printf'' .
Also see "sprintf'' .
Also see "Error'' .
Also see "Warn'' .
Also see "Info'' . Also see "Write'' .
fWrite
The command "fWrite'' is obsolete and has been replaced by the "printf'' command. See
"printf'' for more information.
B-9
DIgSILENT PowerFactory DPL Reference
ToStr
The command "ToStr'' is obsolete and has been replaced by the "sprintf'' command. See
"sprintf'' for more information.
Write
int Write (string Format, [object aObj | set aSet], ...)
DPL Internal Methods
Writes out a line of formatted text, using the DIgSILENT output language.
Arguments:
string Format (obligatory): The format string
object aObj (optional): An object which is used to get data from
set aSet (optional): A set which is used to get objects from
Return value:
0 on success, 1 on error
The "Write'' command is used to quickly output a line of formatted output, using the same
formatting language as is used for defining reports and result-boxes. See section 27.2.5
for more information.
Because data or parameters of more than object is often written out, the DIgSILENT
output language has the special macro "ACC(x)'' to distinguish between these objects. Pri-
or to execution, all given objects and all objects in the given sets are listed together in a
single list. The "ACC(x)'' macro returns the object with the index "x'' in that list. The ACC
("acc''="access'') macro can be used more than once for the same object.
Interface variables of the DPL script can also be used in the format string by the "DEF''
macro. If the DPL script has "ResX'' as an interface double, then "DEF:ResX'' will access
that variable.
Example:
In the following example, two lines of output are written out. The first line only contains
normal text. The second line writes the name and loading of two lines. In this example,
"ACC(1)'' refers to the object "LineA', and "ACC(2)'' to "LineB''
Write('The following results are found');
Write('# : #.## # , # : #.## # $N,
ACC(1):loc_name,ACC(1):c:loading,[ACC(1):c:loading,
ACC(2):loc_name,ACC(2):c:loading,[ACC(2):c:loading', LineA, LineB);
Also see "printf'' .
Also see "sprintf'' .
Also see "fprintf'' .
Also see "Error'' .
Also see "Warn'' .
Also see "Info'' .
B - 10
DIgSILENT PowerFactory DPL Reference
Error
string Error (String Format,String T | double X | int I, ...)
DPL Internal Methods
Writes a formatted string as error message to the output window. The DPL execution will
continue, but a pop-up error message box will appear at the end of execution.
Arguments:
String Format (obligatory): The format string
String T (optional): string argument
double X (optional): double argument
int I (optional): int argument
Return value:
The formatted string
Example:
The following example writes an error to the output window.
Error('Index could not be calculated.');
The output format is defined by the format string. The passed arguments and the passed
format string must match. An error message will be produced when, for instance, a format
string for two strings is used together with three doubles.
See the format string syntax for more information.
Also see "printf'' .
Also see "sprintf'' .
Also see "fprintf'' .
Also see "Warn'' .
Also see "Info'' .
Also see "Write'' .
Warn
string Warn(String Format, String T | double X | int I, ...)
DPL Internal Methods
Writes a formatted string as warning to the output window.
Arguments:
String Format (obligatory): The format string
String T (optional): string argument
double X (optional): double argument
int I (optional): int argument
Return value:
The formatted string
Example:
B - 11
DIgSILENT PowerFactory DPL Reference
Info
string Info (String Format, String T | double X | int I, ...)
DPL Internal Methods
Writes a formatted string as information message to the output window.
Arguments:
String Format (obligatory) : The format string
String T (optional) : string argument
double X (optional) : double argument
int I (optional) : int argument
Return value:
The formatted string
Example:
The following example writes an info message to the output window.
Info('Trying to calculate first index...');
The output format is defined by the format string. The passed arguments and the passed
format string must match. An error message will be produced when, for instance, a format
string for two strings is used together with three doubles.
See the format string syntax for more information.
Also see "printf'' .
Also see "sprintf'' .
Also see "fprintf'' .
Also see "Error'' .
Also see "Warn'' .
Also see "Write'' .
B - 12
DIgSILENT PowerFactory DPL Reference
EchoOn
void EchoOn ()
DPL Internal Methods
Re-activates the user interface.
Arguments:
none
Return value:
void
Example:
The following example de-activates the user-interface to speed up the calculations, after
which the user-interface is re-activated again.
EchoOff(); .. do some calculation ... EchoOn();
Also see "EchoOff()'' .
Also see "NoFinalUpdate()'' .
EchoOff
void EchoOff ()
DPL Internal Methods
Freezes (de-activates) the user-interface. For each EchoOff(), an EchoOn() should be
called. An EchoOn() is automatically executed at the end of a DPL execution, except for
when "NoFinalUpdate()'' has been called.
Arguments:
none
Return value:
void
Example:
The following example de-activates the user-interface to speed up the calculations, after
which the user-interface is re-activated again.
EchoOff();
.. do some calculation ...
EchoOn();
Also see "EchoOn()'' .
Also see "NoFinalUpdate()'' .
NoFinalUpdate
void NoFinalUpdate ()
DPL Internal Methods
Prevents the automatic "EchoOn()'' at end of execution.
Arguments:
B - 13
DIgSILENT PowerFactory DPL Reference
none
Return value:
void
Example:
EchoOff();
.. do some calculation ...
NoFinalUpdate();
Also see "EchoOff()'' .
Also see "EchoOn()'' .
strstr
int strstr (string S1, string S2)
DPL Internal Methods
Searches for a substring in a string and returns the position of the first letter of substring
S2 in string S1.
Arguments:
string S1 (obligatory) : The string
string S2 (obligatory) : The substring
Return value:
The first position in S1 where S2 was found, or -1 when S2 was not found.
Example:
The following example searches for string 'brown' in string S1
string S1, S2;
int i;
S1 = 'The brown fox';
i = strstr(S1, 'brown');
! i now equals 4
strcpy
String strcpy (string S, int start, int count)
DPL Internal Methods
Copies a substring from a string.
Arguments:
string S (obligatory) : The string
int start (obligatory) : The start position in S
int count (optional) : Number of characters to copy
Return value:
The copied substring
Example:
string S1, S2;
S1 = 'The brown fox';
B - 14
DIgSILENT PowerFactory DPL Reference
strcmp
int strcmp (string S1, string S2, int count)
DPL Internal Methods
Compares two strings.
Arguments:
string S1 (obligatory) : The first string
string S1 (obligatory) : The second string
int count (optional) : Number of characters to compare
Return value:
-1 when S1 < S2, for up to count characters
0 S1 = S2, for up to count characters
1 when S1 > S2, for up to count characters
strchg
int strchg(string sStr, string sFind, string sNew)
DPL Internal Methods
Searches in the string sStr for the sub-string sFind and substitutes it by teh sub-string
sNew.
Arguments:
string sStr (obligatory): string to be scanned and modified.
string sFind (obligatory): sub-string to be found.
string sNew (obligatory): sub-string to be inserted instead of sFind.
Return value:
-1 if substring was not found.
0 if substring was found at least once.
Example:
int iRet;
string sStr, sFind, sNew;
B - 15
DIgSILENT PowerFactory DPL Reference
strlen
int strlen (string S)
DPL Internal Methods
Returns the length of a string.
Arguments:
string S (obligatory) : The string
strtok
string strtok (string Source, string Delimiter, int Pos, int Num)
DPL Internal Methods
Splits the string Source into tokens separated by the characters defined in the Delimiter.
The function returns the token between separator (Num-1) and (Num) as a string and the
position of the token in the Source.
Arguments:
string Source (obligatory) : String containing token(s)
string Delimiter (obligatory) : Set of delimiter characters
int Pos (obligatory) : Returns the position of token in Source (beginning with 0)
int Num (optional) : Number of the token to be read (default = 1)
Return value:
Token read. If nothing is read, the token is empty and Pos = -1
Example:
The following example searches for different tokens in sStr
string sRes, sStr, sDel;
int iPos;
sStr = 'Das, ist nur, ein Test mit Nr. (555); weiter nichts';
sDel = ',;()';
sRes = strtok(sStr,sDel,iPos);
printf('Token: %s iPos = %d',sRes,iPos);
sRes = strtok(sStr,sDel,iPos,2);
printf('Token: %s iPos = %d',sRes,iPos);
sRes = strtok(sStr,sDel,iPos,4);
printf('Token: %s iPos = %d',sRes,iPos);
Output of the script above:
Token: Das iPos = 0
Token: ist nur iPos = 4
Token: 555 iPos = 32
strftime
string strftime (String Format)
DPL Internal Methods
B - 16
DIgSILENT PowerFactory DPL Reference
Table B.2:
%a Abbreviated weekday name
%% Percent sign
Return value:
The formatted time string
Example:
The following example shows the date.
B - 17
DIgSILENT PowerFactory DPL Reference
sscanf
int sscanf (string Source, string Format, string T | double X | int I, ...)
DPL Internal Methods
Returns the number of fields successfully converted and assigned; the return value does
not include fields that were read but not assigned.
Arguments:
string Source (obligatory) : The string
string Format (obligatory) : Defines a format of variable types (int/string/double) to which
the fields are assigned
string T (optional) : Return of the result string
double X (optional) : Return of the result double
int I (optional) : Return of the result integer
Return value:
A return value of 0 indicates that no fields were assigned. The return value is -1 for an
error or if the end of the string is reached before the first conversion.
Example:
The following example assignes the first two fields of string sStr to the string sRes and
the double rVal
iPos = 0;
sStr = 'Test 23';
iRet = sscanf(sStr,'%s %d',sRes,iPos);
printf('%s %d iRet = %d',sRes,iPos,iRet);
Output of the script above:
Test 23 iRet = 0
fscanf
int fscanf (int iFH, string Format, string T | double X | int I, ...)
DPL Internal Methods
Returns the number of fields successfully converted and assigned; the return value does
not include fields that were read but not assigned.
Arguments:
int iFH (obligatory) : Number of file handler (0,1,...,9)
string Format (obligatory) : Defines a format of variable types (int/string/double) to which
the fields are assigned
string T (optional) : Return of the result string
double X (optional) : Return of the result double
int I (optional) : Return of the result integer
B - 18
DIgSILENT PowerFactory DPL Reference
Return value:
A return value of 0 indicates that no fields were assigned. The return value is -1 for an
error or if the end of the string is reached before the first conversion.
Example:
The following example assignes the first to fields of the text file 'test.txt' (contents: 'Name
12.333') to the string sRes and the double rVal
fopen('d:\tmp\test.txt','r',0);
iRet = fscanf(0,'%s %d',sRes,rVal);
printf('%s %.1f iRet = %d',sRes,rVal,iRet);
fclose(0);
Output of the script above:
Name 12.3 iRet = 0
fscanfsep
int fscanfsep(int iFH, string Ft, string T | double X | int I, ..., string sSep, int iLine)
DPL Internal Methods
Functionality like fscanf. Returns the number of fields successfully converted and as-
signed; the return value does not include fields that were read but not assigned. This
function additionally considers a special character to separate the values, instead of the
standard separators like blanks and tabs. It also can be instructed to stop after the line
read.
Arguments:
int iFH (obligatory) : Number of file handler (0,1,...,9)
string Ft (obligatory) : Defines a format of variable types (int/string/double) to which the
fields are assigned
string T (optional) : Return of the result string
double X (optional) : Return of the result double
int I (optional) : Return of the result integer
string sSep : separator character
int iLine (obligatory) : 1 if the interpretation of the line will be stopped after the current
line. 0 for continued interpretation.
Return value:
A return value of 0 indicates that no fields were assigned. The return value is -1 for an
error or if the end of the string is reached before the first conversion.
Example:
int iRet;
string sRes;
fopen('c:\test1.txt','r',0);
SetLineFeed(0);
B - 19
DIgSILENT PowerFactory DPL Reference
break;
}
printf('%s\n',sRes);
}
fclose(0);
ActiveCase
Object ActiveCase ()
DPL Internal Methods
Returns the currently active Study Case.
Arguments:
none
Return value
A "IntCase'' object
Example:
The following example writes the name of the active study case to the output window.
object aCase;
aCase = ActiveCase();
aCase.ShowFullName();
SummaryGrid
Object SummaryGrid ()
DPL Internal Methods
Returns the summary grid in the currently active Study Case. The summary grid is the
combination of all active grids in the study case.
Arguments:
none
Return value:
A ElmNet object, or a 'NULL' object when no grids are active
Example:
The following example performs a load-flow and returns the total grid active power losses.
object SumGrid;
SumGrid = SummaryGrid();
if (SumGrid) {
Ldf.Execute();
output('Active Power Losses=SumGrid:c:LossP');
}
ActiveProject
Object ActiveProject ()
DPL Internal Methods
Returns the currently active project.
B - 20
DIgSILENT PowerFactory DPL Reference
Arguments:
none
Return value:
A "IntPrj'' object
Example:
The following example prints the name of the active project to the output window.
object Prj;
Prj = ActiveProject();
Prj.ShowFullName();
validLDF
int validLDF ()
DPL Internal Methods
Checks to see if the last load-flow results are still valid and available.
Arguments:
none
Return value:
0 if no load-flow results are available
Example:
The following example checks if a load-flow is available, and performs one when not.
int valid;
valid = validLDF();
if (.not.valid) {
Ldf.Execute();
}
validRMS
int validRMS ()
DPL Internal Methods
Checks to see if the last RMS simulation results are still valid and available.
Arguments:
none
Return value:
0 if no RMS simulation results are available
Example:
The following example checks if a RMS simulation is available, and performs one when
not.
int valid;
valid = validRMS();
if (.not.valid) {
Rms.Execute();
}
B - 21
DIgSILENT PowerFactory DPL Reference
validSHC
int validSHC ()
DPL Internal Methods
Checks to see if the last short-circuit results are still valid and available.
Arguments:
none
Return value:
0 if no short-circuit results are available
Example:
The following example checks if a short-circuit result is available, and performs one when
not.
int valid;
valid = validSHC();
if (.not.valid) {
Shc.Execute();
}
validSIM
int validSIM ()
DPL Internal Methods
Checks to see if the last simulation results are still valid and available.
Arguments:
none
Return value:
0 if no simulation results are available
Example:
The following example checks if a simulation result is available.
int valid;
valid = validSIM();
if (.not.valid) {
output('No simulation result available');
}
SetLineFeed
void SetLineFeed (int i)
DPL Internal Methods
Sets or resets the automatic line feed for printf().
Arguments:
int i (obligatory) : use '0' to disable the automatic line feed, use '1' to enable it again.
Return value:
void
B - 22
DIgSILENT PowerFactory DPL Reference
Example:
The following example disables the automatic line feed prior to printing a matrix of num-
bers. The special character '\n' is used to force a line feed.
int i,j;
SetLineFeed(0); ! disable line-feed
for (i=0; i<3; i+=1) {
printf('%2d', i);
for (j=1; j<5; j+=1) {
printf('\t%2d', i+j);
}
printf('\n'); ! insert a line-feed
}
Also see "printf'' .
GetPageLen
int GetPageLen (int orientation)
DPL Internal Methods
Returns the number of lines per page according to the currently selected printer and pa-
per size.
Arguments:
int orientation (optional) : Paper orientation: 0: landscape, 1: portrait ; default: landscape
Return value:
The maximum number of lines that can be printed on a single sheet of paper.
GetCaseObject
object GetCaseObject (string ClassName)
DPL Internal Methods
Returns the first found object of class "ClassName'' from the currently active calculation
case. The object is created when no object of the given name and/or class was found.
Returns the default command object of class "ClassName'' from the currently active cal-
culation case. Initializes newly created commands according to the project settings.
The icons on the main menu for load-flow, short-circuit, transient simulation, etc. also
open the corresponding default command from the currently active study case. Using
"GetCaseCommand()" in a DPL script will return the same command.
Arguments:
string ClassName (optional) : Class name of the object ("Class''), optionally preceded by
an object name without wildcards and a dot ("Name.Class'').
Return value:
The found or created object.
Example:
The following example uses the default SetTime object to change the calculation time,
and then executes the load-flow command with the name 'Unbalanced'.
object time, com;
B - 23
DIgSILENT PowerFactory DPL Reference
time = GetCaseObject('SetTime');
time:hourofyear = 1234;
com = GetCaseObject('Unbalanced.ComLdf');
com.Execute();
GetCaseCommand
object GetCaseCommand (string ClassName)
DPL Internal Methods
This command is obsolete. Please use the more versatile "GetCaseObject'' in stead.
Please refer to "GetCaseObject()'' .
GetGraphBoard
SetDeskTop GetGraphBoard ()
DPL Internal Methods
Returns the currently active Graphics Board.
Arguments:
none
Return value:
The graphics board object
Example:
The following example looks for an opened Graphics Board and sets its default results to
the results object named 'Results'.
object aGrf;! Look for opened graphics board.
aGrf=GetGraphBoard();
if (aGrf) { ! Set default results object
aGrf.SetResults(Results);
}
Also see
SetDeskTop.GetPage
SetDeskTop.SetResults
SetDeskTop.SetXVar
SetDeskTop.SetScaleX
SetDeskTop.SetAutoScaleX
SetDeskTop.SetAdaptX
GetTime
int GetTime (int iN)
DPL Internal Methods
Returns current processor time.
Arguments:
B - 24
DIgSILENT PowerFactory DPL Reference
GetLanguage
int GetLanguage ()
DPL Internal Methods
Returns the current program language setting.
Arguments:
none
Return value:
0 = English, 1 = German
Example:
The following example displays a different message, depending on the language.
int err, lng;
lng = GetLanguage();
err = Ldf.Execute();
if (err) {
if (lng) {
output('Load-flow command returned an error');
} else {
output('Fehler im Lastfluss Kommando');
}
exit(); }
GetLocalLib
object GetLocalLib ([string ClassName])
DPL Internal Methods
Returns the local library for object-types of class "ClassName''. ClassName may be omit-
ted, in which case the complete local library folder is returned.
Arguments:
string ClassName (optional) : The classname of the objects for which the library folder is
sought
Return value:
The library folder
Example:
The following example shows the contents of the local library for line types.
object Lib, O;
set S;
Lib = GetLocalLib('TypLne');
S = Lib.GetContents();
O = S.First();
while (O) {
O.ShowFullName();
B - 25
DIgSILENT PowerFactory DPL Reference
O = S.Next();
}
Also see "GetGlobalLib'' .
GetGlobalLib
object GetGlobalLib ([string ClassName])
DPL Internal Methods
Returns the global library for object-types of class "ClassName''. ClassName may be omit-
ted, in which case the complete global library folder is returned.
Arguments:
string ClassName (optional) : The classname of the objects for which the library folder is
sought
Return value:
The library folder
Example:
The following example shows the contents of the global library for line types.
object Lib, O;
set S;
Lib = GetGlobalLib('TypLne');
S = lib.GetContents();
O = S.First();
while (O) {
O.ShowFullName();
O = S.Next();
}
Also see "GetLocalLib'' .
PostCommand
void PostCommand (string Command)
DPL Internal Methods
Adds a command to the command pipe in the input window. The posted commands will
be executed after the DPL command has finished.
Arguments:
string Command (obligatory) : The command string
Return value:
void (no return value)
Example:
The following command causes the PowerFactory program to end after the DPL script
has finished.
PostCommand('exit');
B - 26
DIgSILENT PowerFactory DPL Reference
ResIndex
int ResIndex (object res, object O, string vnm)
DPL Internal Methods
Returns the column number of the variable 'vnm' of object 'O' in the result object 'res'. An
error is produced when 'res' is not a ElmRes object, when 'O' is not in the result file.
Arguments:
object res (obligatory) : the result file
object O (obligatory) : The monitored object
string vnm (obligatory) : the name of the monitored variable of object 'O'
Return value:
The index of the variable. This index can be used in "GetResData'' to retrieve the value.
A negative index is returned when 'vnm' is not in the result file.
Example:
object obj, res;
double x, x1, x2;
int n, ix, i1, i2;
int Nval;
obj = GetCaseCommand('ComInc');
res = obj:p_resvar;
LoadResData(res);
Nval = ResNval(res,0);
obj = res.GetObject(1);
i1 = ResIndex(res, obj, 'm:I1:bus1');
i2 = ResIndex(res, obj, 'm:U1:bus1');
if (i1<0.or.i2<0) exit();
ix = 0;
while (ix<Nval) {
GetResData(x, res, ix);
GetResData(x1, res, ix, i1);
GetResData(x2, res, ix, i2);
printf('%8.5f %8.5f %8.5f', x, x1, x2);
ix += 1;
}
Also see "LoadResData()''
"GetResData()''
"GetObject'' .
GetResData
int GetResData (double d, object O, int iX, int iCrv)
DPL Internal Methods
Returns a value from a result object for row iX of curve iCrv. An error is produced when
O is not a ElmRes object.
Arguments:
double d (obligatory) : the returned value
object O (obligatory) : The result file object
B - 27
DIgSILENT PowerFactory DPL Reference
ResNval
int ResNval (object O, int iCrv)
DPL Internal Methods
Returns the number of values stored in result object for curve iCrv. An error is produced
when O is not a ElmRes object.
Arguments:
object O (obligatory) : The result file object
int iCrv (obligatory) : The curve number, which equals the variable or column number.
ResNvars
int ResNvars (object O)
DPL Internal Methods
Returns the number of variables (columns) in result file. An error is produced when O is
not a ElmRes object.
Arguments:
object O (obligatory) : The result file object
Also see "LoadResData()'' .
LoadResData
void LoadResData (object O)
DPL Internal Methods
Loads the data of a result file (ElmRes) in memory. An error is produced when O is not
a ElmRes object.
Arguments:
object O (obligatory) : The result file object
Return value:
B - 28
DIgSILENT PowerFactory DPL Reference
void
Example:
object obj, res;
double x;
int Nvar, Nval, n, ix,iy;
string str;
obj = GetCaseCommand('ComInc');
res = obj:p_resvar;
LoadResData(res);
Nvar = ResNvars(res);
Nval = ResNval(res,0);
printf('Nvar=%d Nval=%d', Nvar, Nval);
ix = 0;
while (ix<Nval) {
iy = 0;
GetResData(x, res, ix);
str = sprintf('%f :', x);
while (iy<Nvar) {
GetResData(x, res,ix,iy);
str = sprintf('%s %8.5f ', str, x);
iy += 1;
}
printf('%s', str);
ix += 1;
}
An example (depending of the results in the result object) of the output for this script :
Nvar=3
Nval=11
-0.050000 : 0.12676 30.73286 12.91360
-0.040000 : 0.12676 30.73286 12.91360
-0.030000 : 0.12676 30.73286 12.91360
-0.020000 : 0.12676 30.73286 12.91360
-0.010000 : 0.12676 30.73286 12.91360
-0.000000 : 0.12676 30.73286 12.91360
0.010000 : 0.12676 30.73286 12.91360
0.020000 : 0.12676 30.73286 12.91360
0.030000 : 0.12676 30.73286 12.91360
0.040000 : 0.12676 30.73286 12.91360
0.050000 : 0.12676 30.73286 12.91360
ResetCalculation
void ResetCalculation ()
DPL Internal Methods
Resets all calculations and destroys all volatile calculation results.
Arguments:
none
Return value:
void (no return value)
Results that have been written to result objects (for display in graphs) will not be de-
stroyed. All results that are visible in the single line diagrams, however, will be destroyed.
Example:
B - 29
DIgSILENT PowerFactory DPL Reference
fopen
int fopen (string Path, string Mode, int iFH, int iRet)
DPL Internal Methods
Opens file with attribute Mode and assigns an ID iFH of the file handler to the open file.
Arguments:
string Path (obligatory): Path of file to open. Path must exist. File could be created de-
pending on the Mode
string Mode (obligatory): The attribute for opening the file (r,w,a,r+,w+,a+,b,t)
int iFH (obligatory): Number of file handler (0,1,...,9)
int iRet (optional): If it is set to 0 or no value is given, the function does not return any
value. If different that 0, value is returned
Return value:
0 on success, 1 on error
Example:
The following example opens a file and closes it again.
fopen('d:\tmp\test.txt','r',0);
iRet = fscanf(0,'%s %d',sRes,rVal);
printf('%s %.1f iRet = %d',sRes,rVal,iRet);
fclose(0);
fclose
void fclose (int iFH)
DPL Internal Methods
Closes file with the ID iFH of the file handler (between 0 and 9).
Arguments:
int iFH (obligatory) : Number of file handler (0,1,...,9)
Return value:
void
Example:
The following example opens a file and closes it again.
fopen('d:\tmp\test.txt','r',0);
iRet = fscanf(0,'%s %d',sRes,rVal);
printf('%s %.1f iRet = %d',sRes,rVal,iRet);
fclose(0);
Random
double Random ([double x1 [,double x2]])
DPL Internal Methods
B - 30
DIgSILENT PowerFactory DPL Reference
Returns a pseudo random value. If x1 and x2 are omitted, a value in the range of [0 ...
1] is returned. If only x1 is given, the possible range is [0 ... x1] and with both x1 and x2,
[x1 ... x2].
Arguments:
double x1 (optional) : upper/lower limit
double x2 (optional) : upper limit
Return value:
A pseudo-random number
Example:
The following example sets a load to a random active power prior to calculating a load-
flow.
double P;
Load:plini = Random(1.2, 2.3);
Ldf.Execute();
SetRandSeed
void SetRandSeed (int N)
DPL Internal Methods
Initializes the random number generator. One out of 10 predefined initialization seeds can
be selected.
Arguments:
int N (obligatory) : seed 0..10
Example:
See fRand()
fRand
double fRand (int mode | double p1 | double p2)
DPL Internal Methods
Returns a stochastic number according to a specific probability distribution.
Arguments:
int mode (obligatory) :
Table B.3:
0: uniform distribution
1: normal distribution
2: weibull distribution
double p1 (obligatory) :
B - 31
DIgSILENT PowerFactory DPL Reference
double p1 (obligatory) :
Table B.4:
uniform normal weibull
Return value:
void
Example:
The following example prints random numbers for the following distributions:
uni0 : an uniform distribution in [0..1]
uni1 : an uniform distribution in [0..50]
uni2 : an uniform distribution in [-8, 21];
norm : a normal distribution with mean=30 and standard variance=5
weib : a Weibull distribution with lambda=5 and beta=30
int n;
double uni0,uni1,uni2,norm,weib;
SetRandSeed(2);
for (n=0; n<10; n+=1) {
uni0 = fRand(0);
uni1 = fRand(0, 50);
uni2 = fRand(0, -8, 21);
norm = fRand(1, 30, 5);
weib = fRand(2, 5, 30);
printf('%f %f %f %f %f', uni0, uni1, uni2, norm, weib);}
Results Output:
0.232422 20.225048 20.364702 32.294429 15.165993
0.877555 31.371372 11.501229 28.380458 26.404837
0.901226 15.313008 14.782988 23.883499 34.911052
0.598748 17.908476 -6.831869 28.314934 20.706127
0.588662 35.265549 6.403110 25.233148 16.437912
0.474393 44.846884 20.024787 35.297444 22.190684
0.122955 24.725714 -6.099016 28.535867 27.149573
0.554570 17.020344 13.658290 32.858903 30.625329
0.920789 47.127992 0.749566 28.616229 21.187893
0.609307 11.819403 -6.716297 37.955694 29.645523
ddeOpen
int ddeOpen(string sPath, string sAppName, string sTopic)
DPL Internal Methods
Establishes a DDE connection to a topic of an application.
Arguments:
string sPath (obligatory) :Path to application to start. If empty ('') the application must be
started manually by the user. If path is given, ddeOpen will start the application if it not
already running.
string sAppName (obligatory) : Application name.
string sTopic (obligatory) : Topic; The topic of a DDE conversation can be either the name
B - 32
DIgSILENT PowerFactory DPL Reference
of a open document or the special topic "System". A document can be either a regular
document in the application, a template, or a macro
Return value:
0 on success, != 0 on errors
Example:
The following example establishes a DDE connection to topic System of Excel and closes
the connection if successfully established.
int ierr;
ddeClose
void ddeClose()
DPL Internal Methods
Closes the DDE link.
Arguments:
none
Return value:
none
Example:
The following example establishes a DDE link to topic named 'System' of Excel and closes
the connection if successfully established.
int ierr;
ddeExe
int ddeExe (string sCmd)
DPL Internal Methods
Starts command in the currently opened topic. A command can be a visual basic com-
mand, too. Commands are usually sent to the topic named 'System'.
B - 33
DIgSILENT PowerFactory DPL Reference
Arguments:
string sCmd (obligatory): Command to execute
Return value:
<0 if the dde connection was not established before calling ddeExe, =0 if ddeExe suc-
cessfully executed, >0 if ddeExe failed
Example:
The following example looks for a sheet named 'Sheet1'. A new sheet is created if Sheet1
was not found. Then the DDE link to the page is established.
int ierr;
ddePoke
int ddePoke (string sItem, string sData)
DPL Internal Methods
Sends data to an item in the currently opened DDE topic.
Arguments:
string sItem: the item receiving the data. Examples for an item are a cell in excel or a
named bookmark in word.
string sData: the data to send.
Return value:
<0 if the dde connection was not established before calling ddePoke, =0 if the ddePoke
was successfully executed, >0: if the ddePoke failed.
Example:
The following example writes data to some cells on the worksheet named 'Sheet1' in Ex-
cel. It is assumed that Excel is already running when starting the dpl command.
int ierr, i;
double x,y,z;
B - 34
DIgSILENT PowerFactory DPL Reference
string s,s1,s2;
ddeRequest
int ddeRequest (string sItem, string sStringData, double dNumVal)
DPL Internal Methods
Receives data from an item in a previously opened DDE topic
Arguments:
string sItem: The item. Examples for an item are a cell in excel or a named bookmark in
word
string sStringData:The data received from the topic as string (return value=2)
double dNumVal:The data received from the topic as a number (if sStringData is a num-
B - 35
DIgSILENT PowerFactory DPL Reference
Set.Add
int Set.Add ([object O | set S])
B - 36
DIgSILENT PowerFactory DPL Reference
Set.Remove
int Set.Remove (object O)
Removes an object from the set.
Arguments:
object O (obligatory) : the object to remove
Return value:
0 on success
Example:
The following example removes al short lines from a set
set S;
object O;
double l;
S = SEL.AllLines();
O = S.First();
while (O) {
l = O:dline;
if (l<1) {
S.Remove(O);
}
O = S.Next();
}
Set.Clear
void Set.Clear()
Clears the set.
Arguments:
B - 37
DIgSILENT PowerFactory DPL Reference
none
Return value:
void
Example:
The following example clears a set
set Sbig;
Sbig = SEL.AllLines();
...
Sbig.Clear();
Set.First
Object Set.First()
Returns the first object in the set.
Arguments:
none
Return value:
The first object or 0 when the set is empty
Example:
The following example writes the full names of all line in the general selection to the out-
put window.
set S;
object O;
S = SEL.AllLines();
O = S.First();
while (O) {
O.ShowFullName();
O = S.Next();
}
Also see "Next'' .
Set.Next
Object Set.Next ()
Returns the next object in the set.
Arguments:
none
Return value:
The next object or 0 when the last object has been reached
Example:
The following example writes the full names of all line in the general selection to the out-
put window.
set S;
object O
S = SEL.AllLines();
O = S.First();
B - 38
DIgSILENT PowerFactory DPL Reference
while (O) {
O.ShowFullName();
O = S.Next();
}
Also see "First'' .
Set.Firstmatch
Object Set.Firstmatch (String WildCard)
Set.Nextmatch
int Set.Nextmatch ()
Set.FirstFilt
Object Set.FirstFilt (String WildCard)
Returns the first object from the set which name matches the wildcard. The wildcard may
contain (parts of the) name and classname.
Arguments:
String WildCard (obligatory) : class name, possibly containing '*' and '?' characters
Return value:
The first matching object, or NULL when no first object exists.
Example:
The following example writes all two and three winding transformers whose name start
with a "T'' to the output window
set S;
object O;
S = AllRelevant();
O = S.FirstFilt('T*.ElmTr?');
while (O) {
O.ShowFullName();
O = S.NextFilt();
}
Also see "NextFilt'' .
Set.NextFilt
int Set.NextFilt ()
Returns the next object from the set which name matches the wildcard.
Arguments:
none
B - 39
DIgSILENT PowerFactory DPL Reference
Return value:
The next object, or NULL when no next object exists.
Example:
The following example writes all two and three winding transformers to the output win-
dow
set S;
object O;
S = AllRelevant();
O = S.FirstFilt('T*.ElmTr?');
while (O) {
O.ShowFullName();
O = S.NextFilt();
}
Also see "FirstFilt'' .
Set.IsIn
int Set.IsIn (object O)
Checks if the set contains object 'O'.
Arguments:
object O (obligatory) : an object
Return value:
1 if the O is in the set.
Example:
The following example collects all not selected lines.
set Ssel, Srel, Snsel;
object lne;
int i;
Ssel = SEL.AllLines();
Srel = AllRelevant();
lne = Srel.Firstmatch('ElmLne');
while (lne) {
i = Ssel.IsIn(lne);
if (i=0) Snsel.Add(lne);
lne = Srel.Nextmatch();
}
Set.Count
int Set.Count ()
Returns the number of objects in the set.
Arguments:
none
Return value:
The number of objects in the set.
Example:
The following example terminates the DPL script when the general selection is found to
B - 40
DIgSILENT PowerFactory DPL Reference
contain no lines.
set S;
int n;
S = SEL.AllLines();
n = S.Count();
if (n=0) {
exit();
}
Set.Obj
int Set.Obj (int Index)
Returns the object at the given index in the set.
Arguments:
int Index (obligatory) : the index of the object.
Return value:
The object at the given index in the set, when "Index'' is in range, NULL otherwise.
Set.SortToVar
int Set.SortToVar (int R, string V1, ..., string V5)
Sorts the objects in the set to the variable names.
Sorts the objects to the values for V1. Within the sorting for V1, a sub-sorting for V2, sub-
sub-sorting for V3, etc., until V5 can be performed. The sorting is from higher values to
lower when R==1, and reverse when R==0.
Arguments:
int R (obligatory) : sorting direction
string V1 (obligatory) : first variable name
string V2 (optional) : , ..., string V5 (optional) : 2nd..5th variable names
Return value:
0 on success
Example:
The following example writes all lines to the output window, sorted to derating factor and
length.
set S;
object O;
S = AllRelevant('*.ElmLne,*.ElmLneRoute');
S.SortToVar(0, 'fline', 'dline');
O = S.First();
while (O) {
printf('%10s %f %f',O:loc_name,O:fline,O:dline);
O = S.Next();
}
Set.SortToClass
int Set.SortToClass (int R)
Sorts the objects in the set to their class name. The sorting is from A..Z when R=0 and
B - 41
DIgSILENT PowerFactory DPL Reference
Set.SortToName
int Set.SortToName (int R)
Sorts the objects in the set to their name.
Sorts the objects in the set to their name. The sorting is from A..Z when R=0 and reverse
when R=1.
Arguments:
int R (obligatory) : sorting direction
Return value:
0 on success
Example:
The following example writes all objects to the output window, sorted to names.
set S;
object O;
S = AllRelevant();
S.SortToName(0);
O = S.First();
while (O) {
O.ShowFullName();
O = S.Next();
}
Set.MarkInGraphics
void Set.MarkInGraphics ()
Marks all objects in the set in the currently visible graphic by hatch crossing them.
Arguments:
none
Return value:
void
Example:
The following example will try to mark a set of lines in the single line graphic.
B - 42
DIgSILENT PowerFactory DPL Reference
set S;
object O;
S = SEL.AllLines();
S.MarkInGraphics();
B - 43
DIgSILENT PowerFactory DPL Reference
Object.CreateObject
object Object.CreateObject (string ClassNm [, string | int NM1, ...])
Creates a new object of class 'ClassNm' in the target object. The target object must be
able to receive an object of the given class. A fatal DPL error will occur when this is not
the case, causing the running DPL command to exit. "Fold.CreateObject(aClass, nm1,
nm2, ...)'' will create a new object of class aClass and names it to the result of the con-
catenation of 'nm1', 'nm2', etc.
Arguments:
string ClassNm (obligatory) : The class name of the object to create
string | int NM1 (optional) : The first part of the object name
string | int NM2 (optional) : The next part of the object name
...
Return value:
The created object, or NULL when no object was created
Example:
The following example creates a fuse in a set of cubicles. The new fuses will be named
"Fuse Nr.0'', "Fuse Nr.1'', etc.
object target;
set Cubs;
int n;
Cubs = SEL.GetAll('StaCubic');
target = Cubs.First();
n = 0;
while (target) {
target.CreateObject('RelFuse', 'Fuse Nr', n);
target = Cubs.Next();
n+=1;
}
Object.ShowFullName
void Object.ShowFullName ()
Writes the complete path and name to the output window.
Arguments:
none
Return value:
void
Because the complete database path is written to the output window, the written names
can be right-clicked in the output window to edit the objects. This procedure is therefore
B - 44
DIgSILENT PowerFactory DPL Reference
useful for selecting objects which should be inspected or edited after the DPL script has
finished.
Example:
The following example will write all overloaded lines from the selection to the output win-
dow.
set S;
object O;
S = SEL.AllLines();
O = S.First();
while (O) {
if (O:c:loading>100.0) {
O.ShowFullName();
}
O = S.Next();
}
Object.GetFullName
string Object.GetFullName ()
Returns the complete path and name as a string.
Arguments:
none
Return value:
The full name of the object
Example:
The following example will write all overloaded lines from the selection to the output win-
dow.
set S;
object O;
string objname;
S = SEL.AllLines();
O = S.First();
objname = O.GetFullName();
printf('Name of object: %s',objname);
Object.GetContents
set Object.GetContents (string WildCard, int Contents)
Returns the set of objects that are stored in the object and which name matches the wild-
card. Returns an empty set, if the object's container is empty or if the object is not capable
of storing objects. The wildcard may contain (parts of the) name and classname.
Arguments:
string WildCard (optional) : class name, possibly containing '*' and '?' characters
int Contents (optional) : if Contents = 1, the DPL command will additionally search all sub-
folders. If Contents = 0 (Default), the DPL command will only search object o.
Return value:
The set of objects
B - 45
DIgSILENT PowerFactory DPL Reference
Example:
The following example collects all lines that are stored in line objects.
set Grids, Lines;
object pLne, pGrd;
Grids = AllRelevant('*.ElmNet');
! get all grids
pGrd = Grids.First();
while (pGrd) {
printf('Lines in Grid %s',pGrd:loc_name);
! get all objects of class ElmLne* (ElmLne, ElmLneroute)
! in all pGrd and it's subfolders of pGrd
Lines = pGrd.GetContents('*.ElmLne*',1);
pLne = Lines.First();
while (pLne) {
pLne.ShowFullName();
pLne = Lines.Next();
}
pGrd = Grids.Next();
}
Object.GetClass
string Object.GetClass ()
Returns the class name of the object.
Arguments:
none
Return value:
The class name of the object
Example:
The following example checks to see if two sets start with the same class.
object O1, O2;
O1 = S1.First();
O2 = S2.First();
i = O1.IsClass(O2.GetClass());
if (i) {
output('Both sets start with the same class');
}
Object.IsClass
int Object.IsClass (string ClassName)
Checks to see if the object is of a certain class.
Arguments:
string ClassName (obligatory) : The name of the class.
Return value:
1 when the object is of the given class, 0 otherwise
Example:
The following example write all overloaded lines and transformers to the output window,
where a different maximum loading is used for lines or transformers.
B - 46
DIgSILENT PowerFactory DPL Reference
set S;
object O;
int i;
S = AllRelevant();
O = S.First();
while (O) {
i = O.IsClass('ElmLne');
if (i) {
if (O:c:loading>0.85) O.ShowFullName();
} else {
i = O.IsClass('ElmTr2');
if (i) {
if (O:c:loading>0.95) O.ShowFullName();
}
}
O = S.Next();
}
Object.GetParent
object Object.GetParent ()
Returns the parent folder.
Arguments:
none
Return value:
The parent folder object.
Example:
The following example returns the folder in which a line is stored. The function "GetBest-
Line()'' is an example DPL script which returns a line.
object Lne, Fold;
Lne = GetBestLine();
Fold = Lne.GetParent();
...
Also see "GetContents'' .
Object.GetNode
string Object.GetNode (int iBusNo, int iSw)
Returns the node(s) connected to the object.
Arguments:
int iBusNo (obligatory) : Bus number (0,1)
int iSw (obligatory) : Considering configuration of switches (0,1), Default=0
Return value:
Connected node object
Object.IsNode
int Object.IsNode ()
B - 47
DIgSILENT PowerFactory DPL Reference
Object.GetCubicle
object Object.GetCubicle (int N)
Returns the cubicle of an object at the connection with index n, or NULL if there is no
cubicle inside the object.
Arguments:
int N (obligatory) : The connection number.
Return value:
The cubicle object or NULL.
Object.HasResults
void Object.HasResults ()
Returns 'true' when the object has calculated result parameters.
Arguments:
none
Return value:
'true' (1) or 'false' (0)
Object.GetConnectedElms
set Object.GetConnectedElms ([int rBrk[,int rDis[,int rOut]]])
Returns the set of connected elements. Only electrically connected elements are returned
when the conditions of all switches are regarded. Possible connections will also be re-
turned when rBrk and/or rDis is zero, in case of open breakers and/or disconnectors. The
default values are (0,0,0).
Arguments:
int rBrk (optional) : if true, regards position of breakers
int rDis (optional) : if true, regards position of disconnectors
int rOut (optional) : if true, regards in-service or out-of-service status
Return value:
The set of connected elements
Object.GetConnectionCount
int Object.GetConnectionCount ()
B - 48
DIgSILENT PowerFactory DPL Reference
Object.Edit
void Object.Edit ()
Opens the edit dialogue of the object. Command objects (like the ComLdf) will have their
Execute button disabled. The execution of the running DPL script will be halted until the
edit dialogue is closed again.
Editing of DPL command objects ComDPL is not allowed.
Arguments:
none
Return value:
void
Example:
The following example opens a line dialogue, prior to calculating a load-flow.
MyLine.Edit(); Ldf.Execute();
Object.Move
void Object.Move (object O | set S)
Moves an object or a set of objects to this folder.
Arguments:
object O (optional) : Object to move
set S (optional) : Set of objects to move
B - 49
DIgSILENT PowerFactory DPL Reference
Return value:
0 on success, 1 on error.
Example:
object targetobj,pObj;
set AllObjs;
! move pObj to targetobj
targetobj.Move(pObj);
! move all objects inside AllObjs to targetobj
targetobj.Move(AllObjs);
Object.AddCopy
object Object.AddCopy (set aSet | object aObj [, string | int NM1, ...])
Copies a single object or a set of objects to the target object. "Fold.AddCopy(aObj)'' cop-
ies object 'aObj' into the target object 'Fold', "Fold.AddCopy(aSet)'' copies all objects in
'aSet' to "Fold''.
"Fold.AddCopy(aObj, nm1, nm2, ...)'' will copy aObj and rename it to the result of the
concatenation of 'nm1', 'nm2', etc.
The target object must be able to receive a copy of the objects. The function "Fold.Ad-
dCopy(aObj,...)'' returns the copy of "aObj'', "Fold.AddCopy(aSet)'' returns "Fold'', when
the copy operation was successful. A "NULL'' object is returned otherwise.
Copying a set of objects will respect all internal references between those objects. Copy-
ing a set of lines and their types, for example, will result in a set of copied lines and line
types, where the copied lines will use the copied line types.
Arguments:
set aSet (obligatory) : The set of objects to copy
or
object aObj (obligatory) : The object to copy
string | int NM1 (optional) : The first part of the new name
string | int NM2 (optional) : The next part of the new name
...
Return value:
Returns the copy that has been created.
Example:
The following example copies a fuse to a set of cubicles. The copies will be named "Fuse
Nr.0'', "Fuse Nr.1'', etc.
object target, copy;
set Cubs;
Cubs = SEL.GetAll('StaCubic');
target = Cubs.First();
while (target) {
copy = target.AddCopy(aFuse, 'Fuse Nr', n);
if (copy) copy.ShowFullName();
target = Cubs.Next();
}
B - 50
DIgSILENT PowerFactory DPL Reference
Object.IsRelevant
int Object.IsRelevant ()
Returns 1 if the object is currently used for calculations. Returns 0 otherwise.
Arguments:
none
Return value:
0 when not used
Example:
The following example checks if a line is used in the calculation.
i = MyLine.IsRelevant();
if (i) {
MyLine.ShowFullName();
}
Object.IsOutOfService
int Object.IsOutOfService ()
Returns 1 if the object is currently out of service. Returns 0 otherwise.
Arguments:
none
Return value:
0 when not out of service
Example:
The following example checks if a line is out of service.
i = MyLine.IsOutOfService();
if (i) {
MyLine.ShowFullName();
}
Object.IsInFeeder
void Object.IsInFeeder (object Feeder [, double OptNested=0])
Returns if the object belongs to the feeder area defined by "Feeder''.
Arguments:
object Feeder (obligatory) : The Feeder definition object
double OptNested (optional) : "Nested feeders'' option (1 or 0)
Return value:
1 if "Feeder'' is a feeder definition and the object is in the feeder area, 0 otherwise.
Object.VarExists
int Object.VarExists (string VarName)
B - 51
DIgSILENT PowerFactory DPL Reference
Checks to see if this object has a currently valid variable called "VarName''.
Arguments:
string VarName (obligatory) : The name of the variable.
Return value:
1 when "VarName'' is the name of a currently valid variable for this object.
Example:
The following example calculates the total length of cables and lines.
double x;
int i;
set s;
object O;
s = AllRelevant();
O = s.First();
while (O) {
i = O.VarExists('dline');
if (i) {
x += O:dline;
}
O = s.Next();
}
printf('Total length = %d', x);
Object.GetNet
object Object.GetNet(void)
Returns the grid in which the object is located.
Arguments:
none
Return value:
The result object or NULL, if the current object is not stored in any grid.
Object.GetSize
int Object.GetSize (string VarName,int rows,int cols)
Returns the size of the variable "VarName'' when this variable is a vector or a matrix.
Arguments:
string VarName (obligatory) : The name of the variable
int rows (obligatory) : The number of rows for a vector or matrix
int cols (optional) : The number of columns for a matrix
Return value:
0 when "VarName'' is a valid variable name, else 1.
Example:
The following example prints the matrix resistances from a Tower model with 2 circuits.
int ierr;
double x;
B - 52
DIgSILENT PowerFactory DPL Reference
Object.GetVal
int Object.GetVal (object/double X,string VarName,int rows,int cols)
Returns the value of the variable "VarName'' when this variable is a vector or a matrix,
for the given row and column.
Arguments:
double/object X (obligatory) : The variable in which to return the result
string VarName (obligatory) : The name of the variable
int rows (obligatory) : The row number for a vector or matrix
int cols (optional) : The column number for a matrix
Return value:
0 when "VarName'' is a valid variable name and row number and column number are in
range, else 1.
Example:
See "GetSize''
Object.lnm
string Object.lnm (string VarName)
Returns the long description of the variable.
Arguments:
string VarName (obligatory) : The variable name
Return value:
B - 53
DIgSILENT PowerFactory DPL Reference
Object.snm
string Object.snm (string VarName)
Returns the short variable name. By default, the short name equals the long variable
name. In some cases, the variable also has a short name which is used to save space in
reports or dialogues.
Arguments:
string VarName (obligatory) : The variable name
Return value:
The short name.
Example:
See "lnm''
Also see "unm''
Object.unm
string Object.unm (string VarName)
Returns the unit of the variable.
Arguments:
string VarName (obligatory) : The variable name
Return value:
The unit name.
Example:
See "lnm''
Also see "snm''
Object.Unom
double Object.Unom ()
Returns the nominal voltage of the object.
B - 54
DIgSILENT PowerFactory DPL Reference
Arguments:
none
Return value:
The nominal voltage
Example:
The following example collects all high voltage lines. The value VoltageLevel is an input
parameter.
set S, Shv;
object O;
double U;
S = SEL.AllLines();
O = S.First();
while (O) {
U = O.Unom();
if (U>VoltageLevel) {
Shv.Add(O);
}
O = S.Next();
}
Also see "Inom''
Object.Inom
double Object.Inom ()
Returns the nominal current of the object.
Arguments:
none
Return value:
The nominal current
Example:
The following example collects all high current lines. The value MinCurrent is an input pa-
rameter.
set S, Shv;
object O;
double U;
S = SEL.AllLines();
O = S.First();
while (O) {
U = O.Inom();
if (U>MinCurrent) {
Shv.Add(O);
}
O = S.Next();
}
Also see "Unom''
Object.MarkInGraphics
void Object.MarkInGraphics ()
B - 55
DIgSILENT PowerFactory DPL Reference
Marks the object in the currently visible graphic by hatch crossing it.
Arguments:
none
Return value:
void
When the currently visible single line graphic does not contain the object, nothing will
happen.
Example:
The following example will try to mark a set of lines in the single line graphic.
set S;
object O;
S = SEL.AllLines();
O = S.First();
while (O) {
O.MarkInGraphics();
O = S.Next();
}
Object.StochEvt
int Object.StochEvt (double d | double st)
Returns the first or the next state of a stochastic object, when the object has a valid failure
model. Draws a first state, using the state probabilities, when "st'' is omitted. Draws the
next state, using Monte-Carlo simulation, when "st'' is given. The drawn state is returned.
The duration of the drawn state is returned in "d''.
Arguments:
double d (obligatory) : duration of the returned state
double st (optional) : current state of the object
Return value:
void
Example:
The following example prints the states of a line for a year. This is a small example of a
chronological Monte-Carlo simulation.
SetRandSeed(1);
st = Line.StochEvt(t);
while (t<8760) {
printf('%7.2f %d', t, st);
st = Line.StochEvt(d, st);
t = t + d;
}
result:
1172.67
01186.05
15554.87
05560.11
17873.65
07888.94
18260.78
B - 56
DIgSILENT PowerFactory DPL Reference
08274.29
1
ComOutage.SetObjs
int ComOutage.SetObjs (set S)
Sets the list of objects according to S.
Arguments:
set S (obligatory) : the set of objects
Return value:
O on success, 1 on error.
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects.
ComOutage.GetObject
object ComOutage.GetObject (int line)
Get the element stored in line number line in the table of ComOutage. The line index
starts with 0.
Arguments:
int line (obligatory):line index, if index exceeds the range NULL is returned
Return value:
the element of line line in the table.
Example:
The following example shows how to access elements in the table of all ComOutage
whose names start with "L".
object aCmd,
B - 57
DIgSILENT PowerFactory DPL Reference
aOutage,
aElm;
set Outages;
int iElements,
iElm;
ComOutage.RemoveEvents
void ComOutage.RemoveEvents (string type, int info)
Removes events stored inside the command.
Arguments:
string type (optional):
none remove all events stored inside ComOutage
'Lod remove all EvtLod
'Gen' remove all EvtGen
'Switch' remove all EvtSwitch
int info (optional):
1 show info message in output window (default)
0 do not show info message
Return value:
none
Example:
The following example shows how to remove events from ComOutage
object aCmd,
aOutage;
set Outages;
B - 58
DIgSILENT PowerFactory DPL Reference
ComSimoutage.Reset
int ComSimoutage.Reset ()
Resets the intermediate results of the outage simulation.
Arguments:
none
Return value:
O on success, 1 on error.
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects.
ComSimoutage.Execute
int ComSimoutage.Execute ()
Executes an outage simulation after resetting the results.
Arguments:
none
Return value:
B - 59
DIgSILENT PowerFactory DPL Reference
O on success, 1 on error.
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects.
ComSimoutage.ExecuteCntcy
int ComSimoutage.ExecuteCntcy (object O)
Executes an (additional) ComSimoutage, without resetting results. The results of the out-
age analyses will be added to the intermediate results. Object "O'' must be a ComSimo-
utage object. Outage definitions in O which have already been analyzed will be ignored.
Arguments:
object O (obligatory) : The ComSimoutage object
Return value:
O on success, 1 on error.
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects.
ComSimoutage.AddCntcy
int ComSimoutage.AddCntcy (object O, string name)
Executes an (additional) ComOutage, without resetting results. The results of the outage
analysis will be added to the intermediate results. Object "O'' must be a ComOutage ob-
ject. If the outage definition has already been analyzed, it will be ignored. The Co-
mOutage will be renamed to "name'' when "name'' is given.
Arguments:
object O (obligatory) : The ComOutage object
string name (optional) : A name for the outage
Return value:
O on success, 1 on error.
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects.
B - 60
DIgSILENT PowerFactory DPL Reference
ComSimoutage.SetLimits
int ComSimoutage.SetLimits (double vlmin, double vlmax, double ldmax)
Sets the limits for the outage simulation.
Arguments:
double vlmin (obligatory) : The minimum voltage
double vlmax (obligatory) : The maximum voltage
double ldmax (obligatory) : The maximum loading
Return value:
1 always
Example:
The following example analyses all selected outage definitions and adds the results to the
intermediate results.
set s;
object o;
s = SEL.GetAll('ComOutage');
o = s.First();
while (o) {
CA.AddCntcy(o);
o = s.Next();
}
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects.
returns the objects which are normally given to the reporting command to produce the
contingency reports.
ComSimoutage.ReportObjs
set ComSimoutage.ReportObjs (set s, int mode)
Returns the objects which are normally given to the reporting command to produce the
contigency report.
Arguments:
set set (obligatory) : Initial set of objects
int mode (obligatory) : Report mode (1..4)
Return value:
set of objects for report.
See also
DPL Internal Methods
Set Methods
B - 61
DIgSILENT PowerFactory DPL Reference
Object Methods
Using other objects.
IntPrj.Activate
int IntPrj.Activate ()
Activates the project. Deactivates other projects first.
Arguments:
none
Return value:
0 on success, 1 on error.
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects.
IntPrj.Deactivate
int IntPrj.Deactivate ()
De-activates the project.
Arguments:
none
Return value:
0 on success, 1 on error.
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects.
B - 62
DIgSILENT PowerFactory DPL Reference
IntCase.Activate
int IntCase.Activate ()
Activates the study case. Deactivates other study cases first.
Arguments:
none
Return value:
0 on success, 1 on error.
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects.
IntCase.Deactivate
int IntCase.Deactivate ()
De-activates the study case.
Arguments:
none
Return value:
0 on success, 1 on error.
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects.
ElmNet.Activate
int ElmNet.Activate ()
Adds a grid to the active study case.
Arguments:
none
Return value:
B - 63
DIgSILENT PowerFactory DPL Reference
0 on success, 1 on error.
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects.
ElmNet.Deactivate
int ElmNet.Deactivate ()
Removes a grid from the active study case.
Arguments:
none
Return value:
0 on success, 1 on error.
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects.
IntVariant.Activate
int IntVariant.Activate ()
Adds a variant to the active study case.
Arguments:
none
Return value:
0 on success, 1 on error.
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects.
B - 64
DIgSILENT PowerFactory DPL Reference
IntVariant.Deactivate
int IntVariant.Deactivate ()
Removes a variant from the active study case.
Arguments:
none
Return value:
0 on success, 1 on error.
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects.
TypAsm.CalcElParams
int TypAsm.CalcElParams ()
Calculates the electrical parameters from the input data.
Arguments:
none
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects.
TypAsmo.CalcElParams
int TypAsmo.CalcElParams ()
Calculates the electrical parameters from the input data.
Arguments:
none
B - 65
DIgSILENT PowerFactory DPL Reference
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects.
ElmFeeder.GetAll
set ElmFeeder.GetAll (int iNested)
Returns a set with all objects belonging to this feeder.
Arguments:
int iNested (optional) : In case of nested feeders, all elements will be returned when iN-
ested=1, otherwise only the objects up to the next feeder will be returned.
Return value:
The set of feeder objects.
Example:
set aAll,aFeeders;
object pPrj,pFeeder,pObj;
! output elements in the feeders
pPrj = ActiveProject();
if (pPrj) {
aFeeders = pPrj.GetContents('*.ElmFeeder',1);
aFeeders.SortToVar(0,'loc_name');
for (pFeeder=aFeeders.First(); pFeeder; pFeeder=aFeeders.Next()){
printf('Elements in feeder %s',pFeeder:loc_name);
aAll = pFeeder.GetAll(1);
for (pObj=aAll.First(); pObj; pObj=aAll.Next()) {
printf(' %s\\%s',pObj:r:fold_id:loc_name,pObj:loc_name);
}
}
}
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects.
B - 66
DIgSILENT PowerFactory DPL Reference
ElmFeeder.GetBuses
set ElmFeeder.GetBuses (int iNested)
Returns a set with all buses belonging to this feeder.
Arguments:
int iNested (optional) : In case of nested feeders, all elements will be returned when iN-
ested=1, otherwise only the objects up to the next feeder will be returned.
Return value:
The set of bus elements in feeder.
Example:
set aNodes,aFeeders;
object pPrj,pFeeder,pObj;
! output elements in the feeders
pPrj = ActiveProject();
if (pPrj) {
aFeeders = pPrj.GetContents('*.ElmFeeder',1);
aFeeders.SortToVar(0,'loc_name');
for (pFeeder=aFeeders.First(); pFeeder; pFeeder=aFeeders.Next()){
printf('Buses in feeder %s',pFeeder:loc_name);
aNodes = pFeeder.Getbuses(1);
for (pObj=aNodes.First(); pObj; pObj=aNodes.Next()) {
printf(' %s\\%s',pObj:r:fold_id:loc_name,pObj:loc_name);
}
}
}
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects.
ElmFeeder.GetBranches
set ElmFeeder.GetBranches (int iNested)
Returns a set with all branch elements belonging to this feeder.
Arguments:
int iNested (optional) : In case of nested feeders, all elements will be returned when iN-
ested=1, otherwise only the objects up to the next feeder will be returned.
Return value:
The set of branch elements in feeder.
Example:
set aBranches,aFeeders;
object pPrj,pFeeder,pObj;
! output elements in the feeders
pPrj = ActiveProject();
if (pPrj) {
aFeeders = pPrj.GetContents('*.ElmFeeder',1);
aFeeders.SortToVar(0,'loc_name');
B - 67
DIgSILENT PowerFactory DPL Reference
ElmFeeder.GetNodesBranches
set ElmFeeder.GetNodesBranches (int iNested)
Returns a set with all buses and branches belonging to this feeder.
Arguments:
int iNested (optional) : In case of nested feeders, all elements will be returned when iN-
ested=1, otherwise only the objects up to the next feeder will be returned.
Return value:
The set of bus and branch elements in feeder.
Example:
set aAll,aFeeders;
object pPrj,pFeeder,pObj;
! output elements in the feeders
pPrj = ActiveProject();
if (pPrj) {
aFeeders = pPrj.GetContents('*.ElmFeeder',1);
aFeeders.SortToVar(0,'loc_name');
for (pFeeder=aFeeders.First(); pFeeder; pFeeder=aFeeders.Next()){
printf('Branches and Nodes in feeder %s',pFeeder:loc_name);
aAll = pFeeder.GetNodesBranches(1);
for (pObj=aAll.First(); pObj; pObj=aAll.Next()) {
printf(' %s\\%s',pObj:r:fold_id:loc_name,pObj:loc_name);
}
}
}
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects.
ElmFeeder.GetObjs
set ElmFeeder.GetObjs (string ClassNameint iNested)
B - 68
DIgSILENT PowerFactory DPL Reference
Returns a set with all objects of class 'ClassName'' which belong to this feeder.
Arguments:
int iNested (optional) : In case of nested feeders, all elements will be returned when iN-
ested=1, otherwise only the objects up to the next feeder will be returned.
Return value:
The set of feeder objects.
Example:
set aAll,aFeeders;
object pPrj,pFeeder,pObj;
! output elements in the feeders
pPrj = ActiveProject();
if (pPrj) {
aFeeders = pPrj.GetContents('*.ElmFeeder',1);
aFeeders.SortToVar(0,'loc_name');
for (pFeeder=aFeeders.First(); pFeeder; pFeeder=aFeeders.Next()){
printf('Cubicles in feeder %s',pFeeder:loc_name);
aAll = pFeeder.GetObjs('StaCubic');
for (pObj=aAll.First(); pObj; pObj=aAll.Next()) {
printf(' %s\\%s',pObj:r:fold_id:loc_name,pObj:loc_name);
}
}
}
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects.
ComNmink.AddRef
void ComNmink.AddRef ([object O | set S])
Adds shortcuts to the objects to the existing selection.
Arguments:
One of the following two parameter has to be given
object O (optional) : an object
set S (optional) : a set of objects
Return value:
void
Example:
B - 69
DIgSILENT PowerFactory DPL Reference
The following prepares and executes an outage simulation for all high loaded lines.
PrepOut.Clear();
S = AllRelevant();
O = S.Firstmatch('ElmLne');
while (O) {
if (O:c:loading>75) {
PrepOut.AddRef(O);
}
O = S.Nextmatch();
}
PrepOut.Execute();
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
ComNmink.Clear
void ComNmink.Clear ()
Empties the selection.
Arguments:
none
Return value:
void
Example:
The following example creates a selection of all loads.
PrepOut.Clear();
S = AllRelevant();
O = S.Firstmatch('ElmLne');
while (O) {
if (O:c:loading>75) {
PrepOut.AddRef(O);
}
O = S.Nextmatch();
}
PrepOut.Execute();
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
ComNmink.GetAll
Set ComNmink.GetAll (String ClassName)
Returns all objects which are of the class 'ClassName'.
B - 70
DIgSILENT PowerFactory DPL Reference
Arguments:
String ClassName (obligatory) : The object class name.
Return value:
The set of objects
Example:
The following example writes all three winding transformers in the preparation command
to the output window.
set S;
object O;
S = Prep.GetAll('ElmTr3');
O = S.First();
while (O) {
O.ShowFullName();
O = S.Next();
}
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
ElmComp.Slotupd
int ElmComp.Slotupd ()
Performs a slot update for the composite model, to automatically select available models
for the slots.
Arguments:
none
Return value:
void
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects.
B - 71
DIgSILENT PowerFactory DPL Reference
ComRes.ExportFullRange
int ComRes.ExportFullRange ()
Executes the export command for the whole data range.
Arguments:
none
Return value:
0
Example:
The following example exports a range of results
object O;
set S;
S = SEL.GetAll('ElmRes');
O = S.First();
while (O) {
Export:pResult = O;
Export.ExportFullRange();
O = S.Next();
}
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects.
ComRes.FileNmResNm
int ComRes.FileNmResNm ()
Sets the filename for the data export.
Arguments:
none
Return value:
1
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects.
B - 72
DIgSILENT PowerFactory DPL Reference
ComEcho.On
int ComEcho.On ()
Turns on the user interface.
ComEcho.On() is obsolete. Use the internal command EchoOn() instead.
Arguments:
none
Return value:
0 on success
Example:
The following example turns off the user interface, calls a subroutine and turns it back on
again.
aEcho.Off();
PerformCalculation();
aEcho.On();
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
ComEcho.Off
int ComEcho.Off ()
Turns off the user interface.
ComEcho.Off() is obsolete. Use the internal command EchoOff() instead.
Arguments:
none
Return value:
0 on success
Example:
The following example turns off the user interface, calls a subroutine and turns it back on
again.
aEcho.Off();
PerformCalculation();
aEcho.On();
See also
B - 73
DIgSILENT PowerFactory DPL Reference
SetTime.SetTime
void SetTime.SetTime (double H,double M,double S)
Sets the time in the current year. There is no restriction to the values for H, M and S,
except for the fact that negative values are interpreted as zero. Values higher than 24 or
60 will be processed normally by adding the hours, minutes and seconds into an absolute
time, from which a new hour-of-year, hour-of-day, minutes and seconds are calculated.
Arguments:
double H (obligatory) : The hours
double M (optional) : The minutes
double S (optional) : The seconds
Return value:
none
Example:
The following sets the time to 1134.45 hours, 91.2 minutes and 675.3 seconds, which re-
sults in the time 08:09:27 on the 48'th day of the year.
object Time, Com;
Time = GetCaseObject('SetTime');
Time.SetTime(1134.45, 91.2, 675.3);
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
SetTime.Date
void SetTime.Date ()
Sets the current date.
Arguments:
none
B - 74
DIgSILENT PowerFactory DPL Reference
Return value:
none
Example:
The following example executes a load-flow for 14:30 at the current day (the computer's
system date).
object Time, Com;
Time = GetCaseObject('SetTime');
Com = GetCaseCommand('ComLdf');
Time.Date();
Time:hour = 14;
Time:min = 30;
Com.Execute();
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
SetTime.Time
void SetTime.Time ()
Sets the current time.
Arguments:
none
Return value:
none
Example:
The following example executes a load-flow for the current time and date (the computer's
system time).
object Time, Com;
Time = GetCaseObject('SetTime');
Com = GetCaseCommand('ComLdf');
Time.Date();
Time.Time();
Com.Execute();
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
B - 75
DIgSILENT PowerFactory DPL Reference
IntMon.PrintVal
void IntMon.PrintVal ()
Prints the values of the selected variables to the output window.
Arguments:
none
Return value:
none
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
IntMon.PrintAllVal
void IntMon.PrintAllVal ()
Prints a description for all available variables to the output window.
Arguments:
none
Return value:
none
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
IntMon.NVars
int IntMon.NVars ()
Returns the number of selected variables or, more exact, the number of lines in the vari-
able selection text on the second page of the IntMon dialogue, which should contain one
B - 76
DIgSILENT PowerFactory DPL Reference
IntMon.GetVar
string IntMon.GetVar (int row)
Returns the variable name on the given row of the variable selection text on the second
page of the IntMon dialogue, which should contain one variable name per line.
Arguments:
none
Return value:
The variable name.
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
IntMon.RemoveVar
int IntMon.RemoveVar (string name)
Removes the variable "name'' from the list of selected variable names.
Arguments:
The variable name.
Return value:
1 when the variable name was not found, 0 otherwise.
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
B - 77
DIgSILENT PowerFactory DPL Reference
IntMon.ClearVars
int IntMon.ClearVars ()
Clears the list of selected variable names.
Arguments:
none
Return value:
none
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
IntMon.AddVar
int IntMon.AddVar (string name)
Appends the variable "name'' to the list of selected variable names.
Arguments:
The variable name.
Return value:
none
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
SetFilt.Get
Set SetFilt.Get ()
Returns a container with the filtered objects.
Arguments:
none
Return value:
The set of filtered objects
B - 78
DIgSILENT PowerFactory DPL Reference
Example:
The following example shows the names of objects filtered by the FiltLongLines.SetFilt fil-
ter
set S;
object O;
S = FiltLongLines.Get();
O = S.First();
while (O) {
O.ShowFullName();
O=S.Next();
}
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
ComDpl.Execute
int ComDpl.Execute (user defined arguments)
Executes an external DPL script as a subroutine.
Arguments:
user defined arguments
Return value:
0 on success
Example:
The following example performs a load-flow and calls the DPL subroutine "CheckVoltages''
to check the voltage conditions.
int err;
err = Ldf.Execute();
if (.not.err) err = CheckVoltages(0.94, 1.05);
if (err) printf('Voltage conditions are violated');
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
B - 79
DIgSILENT PowerFactory DPL Reference
IntMat.Get
double IntMat.Get (int row, int col)
Returns the (row, col) value from the matrix. An run-time error will occur when 'row' or
'col' are out of range.
Arguments:
int row (obligatory) : row in matrix: 1..NRow()
int col (obligatory) : column in matrix: 1..NCol()
Return value:
Value in matrix.
Example:
The following example multiplies two matrices
int r,c,z,s,s1r,s2c;
double v1,v2,v;
s = M1.NCol();
r = M2.NRow();
if (s<>r) {exit();}
s1r = M1.NRow();
s2c = M2.NCol();
M3.Init(s1r,s2c);
r=1;
while (r<=s1r) {
c=1;
while (c<=s2c) {
z=1; v=0.0;
while (z<=s) {
v1=M1.Get(r,z);
v2=M2.Get(z,c);
v+=v1*v2;
z+=1;
}
M3.Set(r,c,v);
c+=1;
}
r+=1;
}
See also
B - 80
DIgSILENT PowerFactory DPL Reference
IntMat.Set
int IntMat.Set (int row, int col, double V)
Set the value at position (row,col) in the matrix to V. The matrix is automatically resized
if necessary.
Arguments:
int row (obligatory) : row number: 1..NRows()
int col (obligatory) : col number: 1..NCols()
double Vj (obligatory) : value
Return value:
0 on success
Example:
See IntMat.Get for an example
IntMat.Init
int IntMat.Init (int NRows, int NCols)
Initializes the matrix. The size is set to (NRows, NCols), all values are set to 0.
Arguments:
int NRows (obligatory) : number of rows
int NCols (obligatory) : number of columns
Return value:
0 on success
Example:
See IntMat.Get for an example
IntMat.Resize
int IntMat.Resize (int NRows, int NCols)
Resizes the matrix. Existing values will not be changed. Added values will be set to 0.
Arguments:
int NRows (obligatory) : number of rows
int NCols (obligatory) : number of columns
Return value:
0 on success
B - 81
DIgSILENT PowerFactory DPL Reference
Example:
The following example gets a value from the matrix, possibly resizing it first.
int Nc,Nr,x,y;
Nr = Mat.NRows();
Nc = Mat.NCols();
x=5;y=3;
if ({x>Nr}.or.{y>Nc}) {
Mat.Resize(x,y);
}
v = Mat.Get(x,y);
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
IntMat.NRow
int IntMat.NRow ()
Returns the number of rows in the matrix. The function "NRow()'' replaces the obsolete
function "SizeX()''.
Arguments:
none
Return value:
The number of rows
Example:
See IntMat.Get for an example
IntMat.NCol
int IntMat.NCol ()
Returns the number of columns in the matrix. The function "NCol()'' replaces the obsolete
function "SizeY()''.
Arguments:
none
Return value:
The number of columns
Example:
See IntMat.Get for an example
IntMat.RowLbl
string IntMat.RowLbl (String S, int R)
B - 82
DIgSILENT PowerFactory DPL Reference
IntMat.ColLbl
string IntMat.ColLbl (String S, int C)
Sets or reads the label of the C'th column.
Arguments:
String S (optional) : Labelstring
int C (obligatory) : Number of the column
Return value:
Assigned or read labelstring
Example:
The following example labels some columns.
Mat.ColLbl('transformers',1);
Mat.ColLbl('lines',2);
Mat.ColLbl('busbars',3);
The following example assigns the label of the first column to the string aLabel
string aLabel;
aLabel = Mat.ColLbl(1);
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
B - 83
DIgSILENT PowerFactory DPL Reference
IntVec.Get
double IntVec.Get (int i)
Returns the value at index i.
Arguments:
int i (obligatory) : Vector index.
Return value:
Value at index i.
Example:
The following example adds two vectors.
int i,j;
double v1,v2;
i = Vec1.Size();
j = Vec2.Size();
if (i<>j) {
output('invalid operation');
exit();
}
Vec3.Init(i);
i=1;
while (i<=j) {
v1 = Vec1.Get(i);
v2 = Vec2.Get(i);
Vec3.Set(i,v1+v2);
i+=1;
}
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
IntVec.Set
double IntVec.Set (int i, double V)
Sets the value at index i to V. Valid indexes are in [1, IntVec.Size()].
Arguments:
int i (obligatory) : Vector index.
B - 84
DIgSILENT PowerFactory DPL Reference
IntVec.Init
int IntVec.Init (int Size)
Initializes the vector. Sets the length to Size and all values to 0.
Arguments:
int Size (obligatory) : The initial size.
Return value:
0 on success
Example:
See IntVec.Get for an example
IntVec.Resize
int IntVec.Resize (int Size)
Resizes the vector. Added values are set to 0.0.
Arguments:
none
Return value:
0 on success
Example:
The following example adds a value to a dynamically scaled vector.
int i,s;
i = 5;
s = Vec.Size();
if (i>s) {
Vec.Resize(i);
}
Vec.Set(i,V);
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
B - 85
DIgSILENT PowerFactory DPL Reference
IntVec.Size
int IntVec.Size ()
Returns the size of the vector.
Arguments:
none
Return value:
The size of the vector
Example:
See IntVec.Get for an example
ElmCoup.Close
int ElmCoup.Close ()
Closes the buscoupler.
Arguments:
none
Return value:
0 on success
Example:
The following example gathers all open couplers before closing them.
int opn;
set S, So;
object O;
S = Couplers.AllElm();
O = S.First();
while (O) {
opn = O.IsOpen();
if (opn) {
O.Close();
So.Add(O);
};
}
See also
DPL Internal Methods
Set Methods
Object Methods
B - 86
DIgSILENT PowerFactory DPL Reference
ElmCoup.Open
int ElmCoup.Open ()
Opens the buscoupler.
Arguments:
none
Return value:
0 on success
Example:
The following example gathers all closed couplers before opening them.
int cl;
set S, Sc;
object O;
S = Couplers.AllElm();
O = S.First();
while (O) {
cl = O.IsClosed();
if (opn) {
O.Open();
Sc.Add(O);
};
}
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
ElmCoup.IsOpen
int ElmCoup.IsOpen ()
Returns 1 when the coupler is open.
Arguments:
none
Return value:
1 when open, 0 when closed
Example:
See ElmCoup.Close for an example
ElmCoup.IsClosed
int ElmCoup.IsClosed ()
B - 87
DIgSILENT PowerFactory DPL Reference
ElmLne.HasRoutes
int ElmLne.HasRoutes ()
Returns if the line is subdivided into routes.
Arguments:
none
Return value:
0 when the line is a single line, 1 when it is subdivided into routes.
Example:
The following example reports all lines with routes.
set S;
object O;
int i;
S = AllRelevant();
O = S.Firstmatch('ElmLne');
while (O) {
i = O.HasRoutes();
if (i) O.ShowFullName();
O = S.Nextmatch();
}
See also
DPL Internal Methods
Set Methods
Object Methods
B - 88
DIgSILENT PowerFactory DPL Reference
ElmLne.HasRoutesOrSec
int ElmLne.HasRoutesOrSec ()
Returns if the line is subdivided into routes or sections.
Arguments:
none
Return value:
0 when the line is a single line, 1 when it is subdivided into routes, 2 when into sections.
Example:
The following example reports all lines with sections.
set S;
object O;
int i;
S = AllRelevant();
O = S.Firstmatch('ElmLne');
while (O) {
i = O.HasRoutesOrSec();
if (i=2) O.ShowFullName();
O = S.Nextmatch();
}
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
ElmLne.GetType
int ElmLne.GetType ()
Returns the line type object.
Arguments:
none
Return value:
The TypLne object
Example:
The following example reports all 'untyped' lines
set S;
object O, T;
S = AllRelevant();
O = S.Firstmatch('ElmLne');
while (O) {
T = O.GetType();
if (T=0) {
O.ShowFullName();
B - 89
DIgSILENT PowerFactory DPL Reference
}
O = S.Nextmatch();
}
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
ElmLne.IsCable
int ElmLne.IsCable ()
Returns if this is a cable.
Arguments:
none
Return value:
1 when the line is a cable, otherwise 0.
Example:
The following example reports the loading of all cables.
set S;
object O;
int i;
S = AllRelevant();
O = S.Firstmatch('ElmLne');
while (O) {
i = O.IsCable();
if (i) {
Write('# : #.## $N, @ACC(1):loc_name, @ACC(1):c:loading, O);
}
O = S.Nextmatch();
}
ElmLne.IsNetCoupling
int ElmLne.IsNetCoupling ()
Returns if the line connects two grids.
Arguments:
none
Return value:
1 when the line is a coupler, otherwise 0.
Example:
The following example reports all the loading of all couplers
set S;
object O;
int i;
S = AllRelevant();
B - 90
DIgSILENT PowerFactory DPL Reference
O = S.Firstmatch('ElmLne');
while (O) {
i = O.IsNetCoupling();
if (i) {
Write('# : #.## $N, @ACC(1):loc_name, @ACC(1):c:loading, O);
}
O = S.Nextmatch();
}
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
ElmLne.SetCorr
int ElmLne.SetCorr ()
Sets the correction factor of the line, according to IEC364-5-523.
Arguments:
none
Return value:
0 on success, 1 on error;
Example:
The following example sets a correction factor.
BuriedLine.SetCorr();
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
ElmLne.CreateFeederWithRoutes
int ElmLne.CreateFeederWithRoutes (double dis,double rem,object O[int sw0,int
sw1])
Creates a new feeder in the line by splitting the line in 2 routes and inserting a terminal.
Arguments:
double dis (obligatory) :
double rem (obligatory) :
object O (obligatory) : A branch object that is to be connected at the inserted terminal.
int sw0 (optional) : when true, a switch is inserted on the one side
int sw1 (optional) : when true, a switch is inserted on the other side
B - 91
DIgSILENT PowerFactory DPL Reference
Return value:
0 on success, 1 on error;
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
ElmLneroute.IsCable
int ElmLneroute.IsCable ()
Returns if the route is a cable.
Arguments:
none
Return value:
1 when a cable, otherwise 0.
Example:
The following example reports all cable routes.
set S;
object O;
int i;
S = AllRelevant();
O = S.Firstmatch('ElmLneroute');
while (O) {
i = O.IsCable();
if (i) O.ShowFullName();
O = S.Nextmatch();
}
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
ElmLneroute.HasSections
int ElmLneroute.HasSections ()
Returns if the line route is subdivided into sections.
B - 92
DIgSILENT PowerFactory DPL Reference
Arguments:
none
Return value:
1 when subdivided sections, 0 otherwise
Example:
The following example reports all lines routes with sections.
set S;
object O;
int i;
S = AllRelevant();
O = S.Firstmatch('ElmLneroute');
while (O) {
i = O.HasSections();
if (i) O.ShowFullName();
O = S.Nextmatch();
}
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
TypLne.IsCable
int TypLne.IsCable ()
Returns if the line type is a cable type.
Arguments:
none
Return value:
1 when the line type is a cable type, otherwise 0.
Example:
The following example reports all cable types.
set S;
object O;
int i;
S = AllRelevant();
O = S.Firstmatch('TypLne');
while (O) {
i = O.IsCable();
if (i) O.ShowFullName();
O = S.Nextmatch();
B - 93
DIgSILENT PowerFactory DPL Reference
}
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
TypLne.SetNomCurr
int TypLne.SetNomCurr ()
Sets the nominal current of the line type, according to IEC364-5-523.
Arguments:
none
Return value:
0 on success, 1 on error.
Example:
The following example sets the correction factor.
BuriedLineType.SetNomCurr();
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
ElmRes.Init
int ElmRes.Init ()
Initializes the result object. This is required for all result files that are not stored in the
DPL command object.
B - 94
DIgSILENT PowerFactory DPL Reference
Arguments:
none
Return value:
0 on success
Example:
The following example initializes the result object.
Res.Init();
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
ElmRes.Clear
int ElmRes.Clear ()
Clears the result object.
Arguments:
none
Return value:
0 on success
Example:
The following example clears the result object.
Res.Clear();
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
ElmRes.Write
int ElmRes.Write ()
Writes the current results to the result object.
Arguments:
none
Return value:
0 on success
Example:
B - 95
DIgSILENT PowerFactory DPL Reference
The following example performs load-flows for a number of load levels and writes the re-
sults to the result object
double P;
double i;
P = LoadMin;
i = 1;
while ({P<LoadMax}.and.{i}) {
i = Ldf.Execute();
if (i) {
Res.Write();
P += LoadStep;
}
}
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
ElmRes.Draw
int ElmRes.Draw ()
Updates all plots that display values from the result object.
Arguments:
none
Return value:
0 on success
Example:
The following example updates the graphics every 10 steps to save time and yet follow
the results while calculating
double i,n;
Ld:pini = LoadMin;
i = 1;
n = 0;
while ({Ld:pini<LoadMax}.and.{i}) {
i = Ldf.Execute();
if (i) {
Res.Write();
n += 1;
Ld:pini += LoadStep;
}
if (n>9) {
Res.Write();
n = 0;
}
}
See also
DPL Internal Methods
Set Methods
B - 96
DIgSILENT PowerFactory DPL Reference
Object Methods
Using other objects
ElmRes.WriteDraw
int ElmRes.WriteDraw ()
Writes current results to the result objects and updates all plots that display values from
the result object.
Arguments:
none
Return value:
0 on success
Example:
The following example performs load-flows for a number of load levels and writes the re-
sults to the result object
double P;
double i;
P = LoadMin;
i = 1;
while ({P<LoadMax}.and.{i}) {
i = Ldf.Execute();
if (i) {
Res.WriteDraw();
P += LoadStep;
}
}
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
ElmRes.SetAsDefault
void ElmRes.SetAsDefault ()
Sets this results object as the default results object.
Arguments:
none
Return value:
none
See also
DPL Internal Methods
Set Methods
Object Methods
B - 97
DIgSILENT PowerFactory DPL Reference
ElmRes.AddVars
void ElmRes.AddVars (object O, string v1 [,string v2,...])
Adds variables to the list of monitored variables for the Result object.
Arguments:
object O (obligatory) : an object.
string v1 (obligatory) : variable name for object O.
string v2..v9 (optional) : optional further variables names for object O.
Return value:
none
Example:
object Res;
Res = MyResults();
Res.AddVars(MyLine,'m:Ikss:busshc','m:I:busshc');
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
ElmRes.GetObj
object ElmRes.GetObj (int index)
Returns the objects used in the result file. Positive index means objects for which param-
eters are being monitored (i.e. column objects). Negative index means objects which oc-
cur in written result rows as values.
Arguments:
int index (obligatory) : index of the object.
Return value:
the object, when found.
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
B - 98
DIgSILENT PowerFactory DPL Reference
ElmZone.GetAll
set ElmZone.GetAll ()
Returns all objects which belong to this zone.
Arguments:
none
Return value:
The set of objects
Example:
set aAll,aZones;
object pPrj,pZone,pObj;
! output elements in the zone
pPrj = ActiveProject();
if (pPrj) {
aZones = pPrj.GetContents('*.ElmZone',1);
aZones.SortToVar(0,'loc_name');
for (pZone=aZones.First(); pZone; pZone=aZones.Next()) {
printf('Elements in zone %s',pZone:loc_name);
aAll = pZone.GetAll();
for (pObj=aAll.First(); pObj; pObj=aAll.Next()) {
printf(' %s\\%s',pObj:r:fold_id:loc_name,pObj:loc_name);
}
}
}
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
ElmZone.GetBuses
set ElmZone.GetBuses ()
Returns all buses which belong to this zone.
Arguments:
none
Return value:
The set of objects
See also
DPL Internal Methods
B - 99
DIgSILENT PowerFactory DPL Reference
Set Methods
Object Methods
Using other objects
ElmZone.GetNodes
set ElmZone.GetNodes ()
Returns all nodes which belong to this zone.
Arguments:
none
Return value:
The set of objects
Example:
set aAll,aZones;
object pPrj,pZone,pObj;
! output elements in the zone
pPrj = ActiveProject();
if (pPrj) {
aZones = pPrj.GetContents('*.ElmZone',1);
aZones.SortToVar(0,'loc_name');
for (pZone=aZones.First(); pZone; pZone=aZones.Next()) {
printf('Nodes in zone %s',pZone:loc_name);
aAll = pZone.GetBuses();
for (pObj=aAll.First(); pObj; pObj=aAll.Next()) {
printf(' %s\\%s',pObj:r:fold_id:loc_name,pObj:loc_name);
}
}
}
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
ElmZone.GetBranches
set ElmZone.GetBranches ()
Returns all branches which belong to this zone.
Arguments:
none
Return value:
The set of objects
Example:
set aAll,aZones;
object pPrj,pZone,pObj;
! output elements in the zone
B - 100
DIgSILENT PowerFactory DPL Reference
pPrj = ActiveProject();
if (pPrj) {
aZones = pPrj.GetContents('*.ElmZone',1);
aZones.SortToVar(0,'loc_name');
for (pZone=aZones.First(); pZone; pZone=aZones.Next()) {
printf('Branches in zone %s',pZone:loc_name);
aAll = pZone.GetBranches();
for (pObj=aAll.First(); pObj; pObj=aAll.Next()) {
printf(' %s\\%s',pObj:r:fold_id:loc_name,pObj:loc_name);
}
}
}
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
ElmZone.GetObjs
set ElmZone.GetObjs (string classname)
Returns all objects of the given class which belong to this zone.
Arguments:
string classname (obligatory) : name of the class.
Return value:
The set of objects
Example:
set aAll,aZones;
object pPrj,pZone,pObj;
! output cubicles in the zone
pPrj = ActiveProject();
if (pPrj) {
aZones = pPrj.GetContents('*.ElmZone',1);
aZones.SortToVar(0,'loc_name');
for (pZone=aZones.First(); pZone; pZone=aZones.Next()) {
printf('Cubicles in zone %s',pZone:loc_name);
aAll = pZone.GetObjs('StaCubic');
for (pObj=aAll.First(); pObj; pObj=aAll.Next()) {
printf(' %s\\%s',pObj:r:fold_id:loc_name,pObj:loc_name);
}
}
}
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
B - 101
DIgSILENT PowerFactory DPL Reference
ComRel3.Execute
int ComRel3.Execute ()
Executes the Level 3 reliability assessment calculations.
Arguments:
none
Return value:
0 on success
Example:
The following example executes a ComRel3 Command named 'Rel3'
Rel3.Execute();
ComRel3.RemoveOutages
void ComRel3.RemoveOutages ()
Removes all contingency definitions (*.ComOutage) stored inside the command. This is
exactly the same like pressing the button named "Delete Contingencies" in the dialogue
box of the command.
Arguments:
int msg (optional) :
1 show info message in output window (taken by default),
0 do not show a message
Return value:
none
Example:
The following example removes all ComOutage objects stored inside the ComRel com-
mand in the study case.
object aCmd;
ComRel3.RemoveEvents
void ComRel3.RemoveEvents (string type, int info)
B - 102
DIgSILENT PowerFactory DPL Reference
Removes events stored inside the contingencies (*.ComOutage) inside the command.
Arguments:
string type (optional):
none remove all events stored inside the ComOutages inside ComRel3
'Lod' remove all EvtLod
'Gen' remove all EvtGen'
'Switch' remove all EvtSwitch'
int info (optional):
1 show info message in output window (default)
0 do not show info message
Return value:
none
Example:
The following example shows how to remove events from the ComOutage commands
stored inside ComRel3:
object aCmd;
ComRel3.AnalyseElmRes
int ComRel3.AnalyseElmRes (int error)
Evaluate the results object created by the last calculation. Performs exactly the same like
pressing the button 'Perform Evaluation of Result File' in the dialogue box of the com-
mand.
Arguments:
int error (optional):
0 do not display an error message (default)
1 display error messages in case of errors
Return value:
0 on success, !=0 on error.
Example:
The following example shows how to call the evaluation of the results.
object aCmd,
aResFile;
int iError;
B - 103
DIgSILENT PowerFactory DPL Reference
if (iError) {
! display my own error message
aResFile = aCmd:p_resenum;
if (aResFile) {
Error('Evaluation of results %s failed', aResFile:loc_name);
}
}
}
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
ComInc.Execute
int ComInc.Execute ()
Executes a calculation of initial values.
Arguments:
none
Return value:
0 on success
Example:
The following example executes the ComInc command named 'Inc'
Inc.Execute();
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
ComLdf.Execute
int ComLdf.Execute ()
Execute a load-flow calculation.
B - 104
DIgSILENT PowerFactory DPL Reference
Arguments:
none
Return value:
0 on success
Example:
The following example executes the ComLdf command name 'Ldf'
Ldf.Execute();
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
ComShc.Execute
int ComShc.Execute ()
Executes a short-circuit calculation.
Arguments:
none
Return value:
0 on success
Example:
The following example execute the ComShc command named 'Shc'
Shc.Execute();
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
B - 105
DIgSILENT PowerFactory DPL Reference
StaSwitch.Close
int StaSwitch.Close ()
Closes the switch.
Arguments:
none
Return value:
0 on success
Example:
The following example gathers all open switches before closing them.
int opn;
set S, So;
object O;
S = Switches.AllElm();
O = S.First();
while (O) {
opn = O.IsOpen();
if (opn) {
O.Close();
So.Add(O);
};
}
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
StaSwitch.Open
int StaSwitch.Open ()
Opens the switch.
Arguments:
none
Return value:
0 on success
Example:
The following example gathers all closed switches before opening them.
int cl;
set S, Sc;
object O;
S = Couplers.AllElm();
O = S.First();
while (O) {
cl = O.IsClosed();
if (opn) {
O.Open();
B - 106
DIgSILENT PowerFactory DPL Reference
Sc.Add(O);
};
}
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
StaSwitch.IsOpen
int StaSwitch.IsOpen ()
Checks if the switch is open.
Arguments:
none
Return value:
1 when open, 0 when closed
Example:
See StaSwitch.Close for an example
StaSwitch.IsClosed
int StaSwitch.IsClosed ()
Checks if the switch is closed.
Arguments:
none
Return value:
1 when closed, 0 when open
Example:
See StaSwitch.Open for an example
SetFeeder.GetAll
Set SetFeeder.GetAll ()
Returns all objects in the feeder.
B - 107
DIgSILENT PowerFactory DPL Reference
Arguments:
none
Return value:
The set with all objects
Example:
The following example gets all feeder objects.
set S;
S = Feeder1.GetAll();
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
SetFeeder.GetBuses
Set SetFeeder.GetBuses ()
Returns all busbars and terminals in the feeder.
Arguments:
none
Return value:
The set with all busbars and terminals
Example:
The following example gets all feeder bars.
set S;
S = Feeder1.GetBuses();
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
SetFeeder.GetBranches
Set SetFeeder.GetBranches ()
Returns all branches in a feeder.
Arguments:
none
Return value:
The set with all branches
B - 108
DIgSILENT PowerFactory DPL Reference
Example:
The following example gets all feeder branches
set S;
S = Feeder1.GetBranches();
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
SetPath.GetAll
Set SetPath.GetAll ()
Returns all objects in the path definition.
Arguments:
none
Return value:
The set of objects
Example:
The following example writes all objects in the path definition to the output window.
set S;
object O;
S = aPath.GetAll();
O = S.First();
while (O) {
O.ShowFullName();
O = S.Next();
}
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
B - 109
DIgSILENT PowerFactory DPL Reference
SetPath.GetBusses
Set SetPath.GetBusses ()
Returns all busbars and terminals in the path definition.
Arguments:
none
Return value:
The set of objects
Example:
The following example writes all busbars and terminals in the path definition to the output
window.
set S;
object O;
S = aPath.GetBusses();
O = S.First();
while (O) {
O.ShowFullName();
O = S.Next();
}
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
SetPath.GetBranches
Set SetPath.GetBranches ()
Returns all branches in the path definition.
Arguments:
none
Return value:
The set of objects
Example:
The following example writes all branches in the path definition to the output window.
set S;
object O;
S = aPath.GetBranches();
O = S.First();
while (O) {
O.ShowFullName();
O = S.Next();
}
See also
DPL Internal Methods
B - 110
DIgSILENT PowerFactory DPL Reference
Set Methods
Object Methods
Using other objects
SetPath.AllBreakers
Set SetPath.AllBreakers ()
Returns all breakers in the path definition.
Arguments:
none
Return value:
The set of objects
Example:
The following example writes all breakers in the path definition to the output window.
set S;
object O;
S = aPath.AllBreakers();
O = S.First();
while (O) {
O.ShowFullName();
O = S.Next();
}
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
SetPath.AllClosedBreakers
Set SetPath.AllClosedBreakers ()
Returns all closed breakers in the path definition.
Arguments:
none
Return value:
The set of objects
Example:
The following example writes all closed breakers in the path definition to the output win-
dow.
set S;
object O;
S = aPath.AllClosedBreakers();
O = S.First();
while (O) {
O.ShowFullName();
B - 111
DIgSILENT PowerFactory DPL Reference
O = S.Next();
}
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
SetPath.AllOpenBreakers
Set SetPath.AllOpenBreakers ()
Returns all open breakers in the path definition.
Arguments:
none
Return value:
The set of objects
Example:
The following example writes all open breakers in the path definition to the output win-
dow.
set S;
object O;
S = aPath.AllOpenBreakers();
O = S.First();
while (O) {
O.ShowFullName();
O = S.Next();
}
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
B - 112
DIgSILENT PowerFactory DPL Reference
SetSelect.AddRef
void SetSelect.AddRef ([object O | set S])
Adds a reference to the objects to the existing selection.
Arguments:
One of the following two parameter has to be given
object O (optional) : an object
set S (optional) : a set of objects
Return value:
void
Example:
The following example adds all loads and lines from the general DPL selection to the se-
lection "MySelection''.
set S;
S = SEL.AllLines();
MySelection.AddRef(S);
S = SEL.AllLoads();
MySelection.AddRef(S);
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
SetSelect.Clear
void SetSelect.Clear ()
Empties the selection.
Arguments:
none
Return value:
void
Example:
B - 113
DIgSILENT PowerFactory DPL Reference
The following example creates a selection of all loads in the general DPL selection.
set S;
S = SEL.AllLines();
MySelection.Clear();
MySelection.AddRef(S);
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
SetSelect.AllElm
Set SetSelect.AllElm ()
Returns all elements (Elm*) in the selection.
Arguments:
none
Return value:
The set of objects
Example:
The following example writes all objects in the general DPL selection to the output win-
dow.
set S;
object O;
S = SEL.AllElm();
O = S.First();
while (O) {
O.ShowFullName();
O = S.Next();
}
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
SetSelect.AllLines
Set SetSelect.AllLines ()
Returns all lines and line routes in the selection.
Arguments:
none
Return value:
The set of objects
B - 114
DIgSILENT PowerFactory DPL Reference
Example:
The following example writes all lines and line routes in the general DPL selection to the
output window.
set S; object O; S = SEL.AllLines(); O = S.First(); while (O) {
O.ShowFullName(); O = S.Next(); }
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
SetSelect.AllBars
Set SetSelect.AllBars ()
Returns all busbars and terminals in the selection.
Arguments:
none
Return value:
The set of objects
Example:
The following example writes all bars in the general DPL selection to the output window.
set S;
object O;
S = SEL.AllBars();
O = S.First();
while (O) {
O.ShowFullName();
O = S.Next();
}
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
SetSelect.AllLoads
Set SetSelect.AllLoads ()
Returns all loads in the selection.
Arguments:
none
Return value:
The set of objects
B - 115
DIgSILENT PowerFactory DPL Reference
Example:
The following example writes all loads in the general DPL selection to the output window.
set S;
object O;
S = SEL.AllLoads();
O = S.First();
while (O) {
O.ShowFullName();
O = S.Next();
}
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
SetSelect.AllAsm
Set SetSelect.AllAsm ()
Returns all asynchronous machines in the selection.
Arguments:
none
Return value:
The set of objects
Example:
The following example writes all asynchronous machines in the general DPL selection to
the output window.
set S;
object O;
S = SEL.AllAsm();
O = S.First();
while (O) {
O.ShowFullName();
O = S.Next();
}
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
SetSelect.AllSym
Set SetSelect.AllSym ()
Returns all synchronous machines in the selection.
B - 116
DIgSILENT PowerFactory DPL Reference
Arguments:
none
Return value:
The set of objects
Example:
The following example writes all synchronous machines in the general DPL selection to
the output window.
set S;
object O;
S = SEL.AllSym();
O = S.First();
while (O) {
O.ShowFullName();
O = S.Next();
}
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
SetSelect.AllTypLne
Set SetSelect.AllTypLne ()
Returns all line types in the selection.
Arguments:
none
Return value:
The set of objects
Example:
The following example writes all line types in the general DPL selection to the output win-
dow.
set S;
object O;
S = SEL.AllTypLne();
O = S.First();
while (O) {
O.ShowFullName();
O = S.Next();
}
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
B - 117
DIgSILENT PowerFactory DPL Reference
SetSelect.All
Set SetSelect.All ()
Returns all objects in the selection.
Arguments:
none
Return value:
The set of objects
Example:
The following example writes objects in the general DPL selection to the output window.
set S;
object O;
S = SEL.All();
O = S.First();
while (O) {
O.ShowFullName();
O = S.Next();
}
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
SetSelect.GetAll
Set SetSelect.GetAll (String ClassName)
Returns all objects in the selection which are of the class 'ClassName'.
Arguments:
String ClassName (obligatory) : The object class name.
Return value:
The set of objects
Example:
The following example writes all three winding transformers in the general DPL selection
to the output window.
set S;
object O;
S = SEL.GetAll('ElmTr3');
O = S.First();
while (O) {
O.ShowFullName();
O = S.Next();
}
See also
DPL Internal Methods
B - 118
DIgSILENT PowerFactory DPL Reference
Set Methods
Object Methods
Using other objects
SetSelect.AllBreakers
Set SetSelect.AllBreakers ()
Returns all breakers in the selection.
Arguments:
none
Return value:
The set of objects
Example:
The following example writes all breakers in the general DPL selection to the output win-
dow.
set S;
object O;
S = SEL.AllBreakers();
O = S.First();
while (O) {
O.ShowFullName();
O = S.Next();
}
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
SetSelect.AllClosedBreakers
Set SetSelect.AllClosedBreakers ()
Returns all closed breakers in the selection.
Arguments:
none
Return value:
The set of objects
Example:
The following example writes all closed breakers in the general DPL selection to the out-
put window.
set S;
object O;
S = SEL.AllClosedBreakers();
O = S.First();
B - 119
DIgSILENT PowerFactory DPL Reference
while (O) {
O.ShowFullName();
O = S.Next();
}
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
SetSelect.AllOpenBreakers
Set SetSelect.AllOpenBreakers ()
Returns all open breakers in the selection.
Arguments:
none
Return value:
The set of objects
Example:
The following example writes all open breakers in the general DPL selection to the output
window.
set S;
object O;
S = SEL.AllOpenBreakers();
O = S.First();
while (O) {
O.ShowFullName();
O = S.Next();
}
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
IntForm.SetText
int IntForm.SetText (String Text)
Sets the format text of a report form.
B - 120
DIgSILENT PowerFactory DPL Reference
Arguments:
String Text (obligatory) : The format text string
Return value:
0 on success
Example:
The following example sets a format string and writes the report for two sets
set SLines,SLoads;
... fill SLines and SLoads ...
OvlReport.SetText('
| Loading of lines: |$H
$LOOP,_EXTERNAL
|# #.# |$N,loc_name,loading
$END ');
OvlReport.WriteOut(SLines, SLoads);
See also IntForm.WriteOut
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
IntForm.WriteOut
int IntForm.WriteOut (set ListSet, set PoolSet, int Landscape)
Write the report to the output window.
The report form object will write a report to the output window, based on the format text,
for the objects in the ListSet and the PoolSet. The ListSet is used in the _EXTERNAL mac-
ro. All format lines between the $LOOP,_EXTERNAL and the $END macro's will be written
for each object in the Listset, which is therefore called the 'sequential set'. In the format
text itself, objects from the PoolSet may be referenced directly by the "ACC(x)'' macro,
which is replaced by the x'th object in the PoolSet. The PoolSet is therefore called the
'random access set'. The ListSet or PoolSet may be empty.
The command object that is normally reached by the macro "DEF'' in report forms will
always return the main DPL command that is running at the moment, even when the
'WriteOut' call is made in a DPL subscript.
Arguments:
Set ListSet (obligatory) : The sequential set of objects
Set PoolSet (optional) : The random access set of objects
int Landscape (optional) : Sets the page orientation used to calculate the number of lines
fitting on a printed page
0 = Portrait, 1 = Landscape; default: Landscape
Return value:
0 on success
Example:
B - 121
DIgSILENT PowerFactory DPL Reference
The following example reports the loading of a list of objects for a certain load condition.
The objects for the loading are sequentially listed. The load conditions are reported for a
special set of loads, which are given as a pool of objects.
set SLines,SLoads;
... fill SLines and SLoads ...
OvlReport.WriteOut(SLines, SLoads);
If OvlReport has the following format string:
---------------------$H,
| command : # |$H,DEF:loc_name
| Load settings: |$H| # #.# |$H,ACC(2):loc_name,ACC(2):plini
| # #.# |$H,ACC(3):loc_name,ACC(3):plini
---------------------$H,
| Loading of lines: |$H
$LOOP,_EXTERNAL
|# #.# |$N,loc_name,loading
$END
---------------------$F,
the following report could be the result:
---------------------|
command : FindWL |
| Load settings: |
| Ld12a 3.43 |
| Ld14b 2.52 |
---------------------
| Loading of lines: |
| Ln1 95.6 |
| Ln2 92.1 |
| Ln3 90.4 |
| Ln4 85.3 |
| Ln5 84.7 |
| Ln6 84.2 |
| Ln7 82.6 |
| Ln8 62.5 |
---------------------
See also IntForm.SetText
See also
DPL Internal Methods
Set Methods
Object Methods
Using other objects
B - 122
DIgSILENT PowerFactory DPL Reference
DoAutoScaleX
SetAutoScaleX
SetAdaptX
SetDesktop.Show
int SetDesktop.Show ([string name|object O])
Shows the page with the same name as 'O'' or the page with name "name'' in the Graphics
Board. The object "O'' is typically a ViPage object but, as only its name is used, it may
be any other type of object.
Arguments:
string name (obligatory) : Name of graphics page.
object O (optional) : An object.
Return value:
0 on success, 1 on error.
Example:
The following example activates all pages in the graphics board one by one and exports
them as WMF figures.
object GrBrd,Pg;
set Pgs;
int n;
string FileName;
GrBrd = GetGraphBoard();
if (GrBrd) {
Pgs = GrBrd.GetContents();
Pg = Pgs.First();
while (Pg) {
GrBrd.Show(Pg);
FileName = sprintf('c:\\mydoc\\%s%d', n, Pg:loc_name);
GrBrd.WriteWMF(FileName);
Pg = Pgs.Next();
}
}
Also see Using other objects
SetDesktop.WriteWMF
void SetDesktop.WriteWMF (string filename)
Exports the currently open graphic in the graphics board to a WMF figure.
Arguments:
string name (obligatory) : Filename without extension.
Return value:
none
Example:
See SetDeskTop.Show()
Also see Using other objects
B - 123
DIgSILENT PowerFactory DPL Reference
SetDesktop.GetPage
object SetDesktop.GetPage (string name, int create)
Searches, activates and returns a graphics page in the currently open Graphics Board. If
"create'' is true, then a new ViPage will be created added to the graphics board when no
page with the name was found.
Arguments:
string name (obligatory) : Name of the page.
int create=1 (optional) : create > 0 --> create panel if not exists.
Return value:
Virtual Instrument Panel (SetVipage)
Example:
The following example looks for the Virtual Instrument Panels named Voltage, Current
and Power in the Graphics Board currently opened. The pages are created if they do not
exist.
object aGrf;
object aPageV;
object aPageC;
object aPageP;
! Look for opened graphics board.
aGrf=GetGraphBoard();
if (aGrf) {
! Search or create Virtual Instrument Panels
aPageV=aGrf.GetPage('Voltage',1);
aPageC=aGrf.GetPage('Current',1);
aPageP=aGrf.GetPage('Power',1);
}
Also see Using other objects
SetDesktop.SetResults
void SetDesktop.SetResults (object res)
Sets default Results (ElmRes) of Graphics Board.
Arguments:
object res (obligatory) : Results to set (ElmRes) or NULL to reset.
Return value:
none
Example:
The following example looks for an opened Graphics Board and sets its default results to
the results object named 'Results'.
object aGrf;
! Look for opened graphics board.
aGrf=GetGraphBoard();
if (aGrf) {
! Set default results object
aGrf.SetResults(Results);
}
B - 124
DIgSILENT PowerFactory DPL Reference
SetDesktop.SetXVar
void SetDesktop.SetXVar (object obj, string varname)
Sets x-axis variable. If obj and varname are empty the default x-axis variable (time) is set.
Arguments:
object obj (optional) : x-axis object
string varname (optional) : variable of obj
Return value:
none
Example:
The following examples look for an opened Graphics Board and set its x-axis variable. The
first example sets an user defined x-axis variable. The second one sets the default x-axis
(time).
object aGrf;
! Look for opened graphics board.
aGrf=GetGraphBoard();
if (aGrf) {
! Set user defined x-axis variable
aGrf.SetXVar(line,'m:U1:bus1');
}
object aGrf;
! Look for opened graphics board.
aGrf=GetGraphBoard();
if (aGrf) {
! Set default x-axis variable (time)
aGrf.SetXVar();
}
Also see Using other objects
SetDesktop.SetScaleX
void SetDesktop.SetScaleX (double min, double max, int log)
Sets scale of x-axis. Invalid arguments like neg. limits for log. scale are not set. No argu-
ments --> automatic scaling.
Arguments:
double min (optional) : Minimum of x-scale.
double max (optional) : Maximum of x-scale.
int log (optional) : > 0 --> x-scale is logarithmic.
Return value:
none
Example:
The following examples look for an opened Graphics Board and set its x-axis scale. There
are three different examples. 1. Example: Scale x-axis automatically 2. Example: Set min-
imum to 0 and maximum to 20. 3. Example: Set minimum to 1 and maximum to 1000.
B - 125
DIgSILENT PowerFactory DPL Reference
SetDesktop.DoAutoScaleX
int SetDesktop.DoAutoScaleX ()
Scales the x-axes of all plots in the graphics board which use the x-axis scale defined in
the graphics board. The same can be achieved by pressing the Scale button on the x-
Axis page of the graphics board.
Arguments:
none
Return value:
none
Example:
The following example looks for a page named voltage and performs an automatic scaling
of the x-axes.
! perform autoscale of x-scales of all plots
! using the x-scale definition of the graphics board.
object aGrf;
! Look for opened graphics board.
aGrf=GetGraphBoard();
if (aGrf) {
aGrf.DoAutoScaleX();
}
Also see VisFft Methods
VisPlot Methods and
SetViPage Methods
B - 126
DIgSILENT PowerFactory DPL Reference
SetDesktop.SetAutoScaleX
void SetDesktop.SetAutoScaleX (int mode)
Sets the automatic scaling mode of the x-scale.
Arguments:
int mode (obligatory) : Possible values: 0 never, 1 after simulation, 2 during simulation
Return value:
none
Example:
The following example looks for an opened Graphics Board and sets its auto scale mode
to off.
! Set autoscale mode to offobject aGrf;
! Look for opened graphics board.
aGrf=GetGraphBoard();
if (aGrf) {
! Turn off automatic scaling of x-scale
aGrf.SetAutoScaleX(0);
}
Also see Using other objects
SetDesktop.SetAdaptX
void SetDesktop.SetAdaptX (int mode, double trigger)
Sets the adapt scale option of the x-scale.
Arguments:
int mode (obligatory) : Possible values: 0 off, 1 on
double trigger (optional) : Trigger value, unused if mode is off or empty.
Return value:
none
Example:
The following example looks for an opened Graphics Board and sets its adapt scale option.
object aGrf;
! Look for opened graphics board.
aGrf=GetGraphBoard();
if (aGrf) {
! Turn on adapt scale, use a trigger value of 3
aGrf.SetAdaptX(1,3);
! Turn off adapt scale
aGrf.SetAdaptX(0,3);
! Turn on adapt scale again, do not change the trigger value
aGrf.SetAdaptX(1);
}
Also see Using other objects
B - 127
DIgSILENT PowerFactory DPL Reference
SetVipage.GetVI
object SetVipage.GetVI (string name, string class, int create)
Searches for a virtual instruments on the Virtual Instrument Panel.
Arguments:
string name (obligatory) : Name of Virtual Instrument
string class='VisPlot' (optional) : classname of Virtual Instrument.
int create=1 (optional) : create >0 --> create panel if not exists.
Return value:
Virtual Instrument
Example:
The following example looks for a Plot (VisPlot) named RST on a Virtual Instrument Panel.
The plot is created if it was not found.
object aGrf;
object aPage;
object aPlot;
! Look for opened graphics board.
aGrf=GetGraphBoard();
if (aGrf) {
! Get Virtual Instrument Panel named Voltage
aPage=aGrf.GetPage('Voltage',1);
if (aPage) {
! Get plot named RST. Create the plot if not exists
aPlot=aPage.GetVI('RST','VisPlot',1);
}
}
Also see Using other objects
B - 128
DIgSILENT PowerFactory DPL Reference
SetVipage.SetStyle
void SetVipage.SetStyle (string name)
Sets style folder of Virtual Instrument Panel.
Arguments:
string name (obligatory) : Name of style.
Return value:
none
Example:
The following example looks for a Virtual Instrument Panel named Voltage and sets its
style to 'Paper'.
object aGrf;
object aPage;
! Look for opened graphics board.
aGrf=GetGraphBoard();
if (aGrf) {
! Get Virtual Instrument Panel named Voltage
aPage=aGrf.GetPage('Voltage',1);
if (aPage) {
! Set style named Paper
aPage.SetStyle('Paper');
}
}
Also see Using other objects
SetVipage.SetTile
void SetVipage.SetTile (int tile)
Rearranges the Virtual Instruments.
Arguments:
int tile=1 (optional) : tile > 0 --> tile Virtual Instruments, tile =0 --> arrange them hori-
zontally.
Return value:
none
Example:
The following example looks for a Virtual Instrument Panel named Voltage and rearranges
the Virtual Instrument.
object aGrf;object aPage;
! Look for opened graphics board.
aGrf=GetGraphBoard();
if (aGrf) {
! Get Virtual Instrument Panel named Voltage
aPage=aGrf.GetPage('Voltage',1);
if (aPage) {
! Arrange the VIs horizontally
aPage.SetTile(0);
! Tile VIs (default input parameter is 1)
aPage.SetTile();
}
B - 129
DIgSILENT PowerFactory DPL Reference
}
Also see Using other objects
SetVipage.SetResults
void SetVipage.SetResults (object res)
Sets default Results (ElmRes) of Virtual Instrument Panel.
Arguments:
object res (obligatory) : Results to set (ElmRes) or NULL to reset.
Return value:
none
Example:
The following example looks for a Virtual Instrument Panel named Voltage and resets its
default results.
object aGrf;
object aPage;
! Look for opened graphics board.
aGrf=GetGraphBoard();
if (aGrf) {
! Get Virtual Instrument Panel named Voltage
aPage=aGrf.GetPage('Voltage',1);
if (aPage) {
! Set default results on page
aPage.SetResults(NULL);
}
}
Also see Using other objects
SetVipage.SetXVar
void SetVipage.SetXVar (object obj, string varname)
Sets x-axis variable. If obj and varname are empty the default x-axis variable (time) is set.
Arguments:
object obj (optional) : x-axis object
string varname (optional) : variable of obj
Return value:
none
Example:
The following examples look for a Virtual Instrument Panel named Voltage and set the x-
axis variable. The first example sets an user defined x-axis variable of the Virtual Instru-
ment Panel. The second one sets the default x-axis (time).
object aGrf;
object aPage;
! Look for opened graphics board.
aGrf=GetGraphBoard();
if (aGrf) {
! Get Virtual Instrument Panel named Voltage
B - 130
DIgSILENT PowerFactory DPL Reference
aPage=aGrf.GetPage('Voltage',1);
if (aPage) {
! Set x-scale from 100 to 120
aPage.SetScaleX(100,120);
! Set x-scale variable
aPage.SetXVar(line,'m:U1:bus1');
}
}
object aGrf;
object aPage;
! Look for opened graphics board.
aGrf=GetGraphBoard();
if (aGrf) {
! Get Virtual Instrument Panel named Voltage
aPage=aGrf.GetPage('Voltage',1);
if (aPage) {
! Set x-scale from 100 to 120
aPage.SetScaleX(100,120);
! Set default x-scale variable (time)
aPage.SetXVar();
}
}
Also see Using other objects
SetVipage.SetScaleX
void SetVipage.SetScaleX (double min, double max, int log)
Sets scale of x-axis. Invalid arguments like negative limits for logarithmic scale are not
set. No input arguments --> automatic scaling.
Arguments:
double min (optional) : Minimum of x-scale.
double max (optional) : Maximum of x-scale.
int log (optional) : > 0 --> x-scale is logarithmic.
Return value:
none
Example:
The following examples look for a Virtual Instrument Panel named Voltage and set its x-
axis scale. There are three different examples. 1. Example: Scale x-scale automatically.
2. Example: Set minimum to 0 and maximum to 20. 3. Example: Set minimum to 1 and
maximum to 1000. Changes to a log. scale
! Scale x-scale automatically.
object aPage;
object aGrf;
! Look for opened graphics board.
aGrf=GetGraphBoard();
if (aGrf) {
! Get Virtual Instrument Panel named Voltage
aPage=aGrf.GetPage('Voltage',1);
if (aPage) {
! Automatic scaling
aPage.SetScaleX();
}
}
B - 131
DIgSILENT PowerFactory DPL Reference
SetVipage.SetDefScaleX
void SetVipage.SetDefScaleX ()
Sets default scale of x-axis (SetDesktop).
Arguments:
none
Return value:
none
Example:
The following example looks for a Virtual Instrument Panel named Voltage and resets the
option 'Use local x-Axis' to 0. After that the x-scale used is the Graphics Board (SetDesk-
top).
! Set default x-scale
object aPage;
object aGrf;
! Look for opened graphics board.
aGrf=GetGraphBoard();
if (aGrf) {
! Get Virtual Instrument Panel named Voltage
aPage=aGrf.GetPage('Voltage',1);
if (aPage) {
! Reset option 'Use local x-Axis' aPage.SetDefScaleX();
}
}
Also see Using other objects
B - 132
DIgSILENT PowerFactory DPL Reference
SetVipage.DoAutoScaleX
int SetVipage.DoAutoScaleX ()
Scales the x-axes of all plots on the virtual instrument panel automatically. The same can
be achieved by pressing the icon in the toolbar of the graphic.
Arguments:
none
Return value:
none
Example:
The following example looks for a page named voltage and performs an automatic scaling
of the x-axes.
! perform autoscale of x-axis of all plots on page
object aPage;
object aGrf;
! Look for opened graphics board.
aGrf=GetGraphBoard();
if (aGrf) {
! Get Virtual Instrument Panel named Voltage
aPage=aGrf.GetPage('Voltage',1);
if (aPage) {
aPage.DoAutoScaleX();
}
}
Also see VisFft Methods
VisPlot Methods
SetDesktop Methods
SetVipage.DoAutoScaleY
int SetVipage.DoAutoScaleY ()
Scales the y-axes of all plots on the virtual instrument panel automatically. The same can
B - 133
DIgSILENT PowerFactory DPL Reference
SetVipage.SetAutoScaleX
void SetVipage.SetAutoScaleX (int mode)
Sets automatic scaling mode of the x-scale for local scales.
Arguments:
int mode (obligatory) : Possible values: 0 never, 1 after simulation, 2 during simulation
Return value:
none
Example:
The following examples look for a Virtual Instrument Panel named Voltage and change its
auto scale mode. The first example works fine, the second one generates an error mes-
sage because the x-scale is unused.
! Set autoscale mode Off
object aGrf;
object aPage;
! Look for opened graphics board.
aGrf=GetGraphBoard();
if (aGrf) {
! Get Virtual Instrument Panel named Voltage
aPage=aGrf.GetPage('Voltage',1);
if (aPage) {
! Set limits to change x-scale of page to used scale
aPage.SetScaleX(0,10);
! Turn off automatic scaling of x-scale
aPage.SetAutoScaleX(0);
}
}
! Try to set autoscale mode to online
object aGrf;
object aPage;
! Look for opened graphics board.
aGrf=GetGraphBoard();
if (aGrf) {
! Get Virtual Instrument Panel named Voltage
aPage=aGrf.GetPage('Voltage',1);
if (aPage) {
! Reset option 'Use local x-Axis' of Virtual Instrument Panel
aPage.SetDefScaleX();
! Try to set automatic scaling of x-scale to Online
aPage.SetAutoScaleX(2);
}
}
Also see Using other objects
B - 134
DIgSILENT PowerFactory DPL Reference
SetVipage.SetAdaptX
void SetVipage.SetAdaptX (int mode, double trigger)
Sets the adapt scale option of the x-scale for local scales.
Arguments:
int mode (obligatory) : Possible values: 0 off, 1 on
double trigger (optional) : Trigger value, unused if mode is off or empty
Return value:
none
Example:
The following examples look for a Virtual Instrument Panel named Voltage and sets its
adapt scale option. The first example works fine, the second one generates an error mes-
sage because the x-scale is unused.
! Modify adapt scale option of Virtual Instrument Panel
object aPage;
object aGrf;
! Look for opened graphics board.
aGrf=GetGraphBoard();
if (aGrf) {
! Get Virtual Instrument Panel named Voltage
aPage=aGrf.GetPage('Voltage',1);
if (aPage) {
! Set x-scale limits to set option 'Use local x-Axis'
aPage.SetScaleX(0,20);
! Turn on adapt scale, use a trigger value of 3
aPage.SetAdaptX(1,3);
! Turn off adapt scale
aPage.SetAdaptX(0,3);
! Turn on adapt scale again, do not change the trigger value
aPage.SetAdaptX(1);
}
}
! Try to turn on adapt scale
object aPage;
object aGrf;
! Look for opened graphics board.
aGrf=GetGraphBoard();
if (aGrf) {
! Get Virtual Instrument Panel named Voltage
aPage=aGrf.GetPage('Voltage',1);
if (aPage) {
! Reset option 'Use local x-Axis' of Virtual Instrument Panel
aPage.SetDefScaleX();
! Try to turn on adapt scale, use a trigger value of 3
! Leads to error message because scale is not local
aPage.SetAdaptX(1,3);
}
}
Also see Using other objects
SetVipage.GetScaleObjX
object SetVipage.GetScaleObjX ()
B - 135
DIgSILENT PowerFactory DPL Reference
Returns used object defining x-scale. The returned object is either the Virtual Instrument
Panel itself or the Graphics Board.
Arguments:
none
Return value:
Object defining the x-scale.
Example:
The following examples look for a Virtual Instrument Panel named Voltage and get the
used x-scale object. GetScaleObjX of the first example gets the Graphics Board, in the sec-
ond one the Virtual Instrument Panel itself is returned.
! Used scale is Graphics Board
object aPage;
object aGrf;
object aScale;
! Look for opened graphics board.aGrf=GetGraphBoard();
if (aGrf) {
! Get Virtual Instrument Panel named Voltage
aPage=aGrf.GetPage('Voltage',1);
if (aPage) {
! Reset option 'Use local x-Axis' of Virtual Instrument Panel
aPage.SetDefScaleX();
! Get object defining scale
aScale=aPage.GetScaleObjX();
if (aPage=aScale) {
output('The scale used is the Virtual Instrument Panel
itself.');
} else if (aGrf=aScale) {
output('The scale used is the Graphics Board.');
} else {
output('The scale used was not found.');
}
}
}
! Used scale is Virtual Instrument Panel itself
object aPage;
object aGrf;
object aScale;
! Look for opened graphics board.
aGrf=GetGraphBoard();
if (aGrf) {
! Get Virtual Instrument Panel named Voltage
aPage=aGrf.GetPage('Voltage',1);
if (aPage) {
! Set x-scale to change it to local
aPage.SetScaleX(1,100);
! Get object defining scale
aScale=aPage.GetScaleObjX();
if (aPage=aScale)
output('The scale used is the Virtual Instrument Panel itself.');
else if (aGrf=aScale)
output('The scale used is the Graphics Board.');
else
output('The scale used was not found.');
}
}
Also see Using other objects
B - 136
DIgSILENT PowerFactory DPL Reference
VisPlot.AddVars
void VisPlot.AddVars (string V, object O1,...,O8)
void VisPlot.AddVars (object O, string V1,...V8)
Appends variables to the SubPlot. Variables which are already in the plot are not added.
Arguments:
object O (obligatory) : Object for which variables V1..V8 are added
string V1..V8 (obligatory) : One to eight variables names for object O
or
string V (obligatory) : Variable name which is added for objects O1..O8
object O1..O8 (obligatory) : One to eight objects variable V
Return value:
none
Using AddVars a single object with different variables or one variable with several objects
can be add to the Subplot. To append a list of variables of a single object the first input
parameter is an object followed by a list of maximum nine variables. To append the same
variable for several objects the first input parameter is the variable name followed by a
list of maximum nine objects.
Example:
B - 137
DIgSILENT PowerFactory DPL Reference
The following examples look for a Subplot named RST on Virtual Instrument Panel named
Voltage and append a list of variables.
1. Example: Append several variables for one single object.
2. Example: Append one variable for a list of objects.
! Append several variables for one single object.
object aPage;
object aGrf;
object aPlot;
object aScale;
! Note: object load is an interface parameter,
! therefore it is not defined here
! Look for opened graphics board.
aGrf=GetGraphBoard();
if (aGrf) {
! Get Virtual Instrument Panel named Voltage
aPage=aGrf.GetPage('Voltage',1);
if (aPage) {
! Get subplot named 'RST'
aPlot=aPage.GetVI('RST','VisPlot',1);
if (aPlot) {
! Clear variable list
aPlot.Clear();
! Append variables
aPlot.AddVars(load, 'm:U1:bus1','m:U1l:bus1','m:phiu1:bus1');
}
}
}
! Append several objects with one single variable
object aPage;
object aGrf;
object aPlot;
object aScale;
! objects load,line and xnet are interface parameters,
! therefore they are not defined here.
! Look for opened graphics board.
aGrf=GetGraphBoard();
if (aGrf) {
! Get Virtual Instrument Panel named Voltage
aPage=aGrf.GetPage('Voltage',1);
if (aPage) {
! Get subplot named 'RST'
aPlot=aPage.GetVI('RST','VisPlot',1);
if (aPlot) {
! Clear variable list
aPlot.Clear();
! Append variables
aPlot.AddVars('m:U1:bus1',load, line, xnet);
}
}
}
Also see Using other objects
VisPlot.AddResVars
void VisPlot.AddResVars (object Res, string V, object O1,...,O7)
void VisPlot.AddResVars (object Res, object O, string V1,...V7)
B - 138
DIgSILENT PowerFactory DPL Reference
Appends variables from a specific result file to the SubPlot. Combinations of result file and
variables which are already in the plot are not added.
Arguments:
object Res (obligatory) : Result object
plus
object O (obligatory) : Object for which variables V1..V8 are added
string V1..V8 (obligatory) : One to eight variables names for object O
or
string V (obligatory) : Variable name which is added for objects O1..O8
object O1..O8 (obligatory) : One to eight objects variable V
Return value:
none
See "AddResVars'' for more information.
VisPlot.Clear
void VisPlot.Clear()
Removes all variables from SubPlot.
Arguments:
none
Return value:
none
Example:
The following example looks for a Subplot named RST on Virtual Instrument Panel named
Voltage and removes all variables from the plot.
! Remove all variables in Subplot named RST on
! Virtual Instrument Panel named Voltage
object aPage;
object aGrf;
object aPlot;
! Look for opened graphics board.
aGrf=GetGraphBoard();
if (aGrf) {
! Get Virtual Instrument Panel named Voltage
aPage=aGrf.GetPage('Voltage',1);
if (aPage) {
! Get Subplot named 'RST'
aPlot=aPage.GetVI('RST','VisPlot',1);
if (aPlot) {
! Remove all variables from Subplot
aPlot.Clear();
}
}
}
Also see Using other objects
B - 139
DIgSILENT PowerFactory DPL Reference
VisPlot.SetXVar
void VisPlot.SetXVar (object obj, string varname)
Sets x-axis variable. If obj and varname are empty the default x-axis variable (time) is set.
Arguments:
object obj (optional) : x-axis object
string varname (optional) : variable of obj
Return value:
none
Example:
The following examples look for a Subplot named RST and set its x-axis variable. The first
example sets an user defined x-axis variable of the plot. The second one sets the default
x-axis variable (time).
! Set user defined x-axis variable
object aPage;
object aGrf;
object aPlot;
! Look for opened graphics board.
aGrf=GetGraphBoard();
if (aGrf) {
! Get Virtual Instrument Panel named Voltage
aPage=aGrf.GetPage('Voltage',1);
if (aPage) {
! Get Subplot named 'RST'
aPlot=aPage.GetVI('RST','VisPlot',1);
if (aPlot) {
! Set x-scale from 100 to 120
aPlot.SetScaleX(100,120);
! Set x-scale variable
aPlot.SetXVar(line,'m:U1:bus1');
}
}
}
! Set default x-axis variable (time)
object aPage;
object aGrf;
object aPlot;
! Look for opened graphics board.
aGrf=GetGraphBoard();
if (aGrf) {
! Get Virtual Instrument Panel named Voltage
aPage=aGrf.GetPage('Voltage',1);
if (aPage) {
! Get Subplot named 'RST'
aPlot=aPage.GetVI('RST','VisPlot',1);
if (aPlot) {
! Set x-scale from 100 to 120
aPlot.SetScaleX(100,120);
! Set default x-scale variable (time)
aPlot.SetXVar();
}
}
}
Also see Using other objects
B - 140
DIgSILENT PowerFactory DPL Reference
VisPlot.SetScaleX
void VisPlot.SetScaleX (double min, double max, int log)
Sets scale of x-axis. Invalid arguments like negative limits for logarithmic scale are not
set. No arguments --> automatic scaling.
Arguments:
double min (optional) : Minimum of x-scale.
double max (optional) : Maximum of x-scale.
int log (optional) : > 0 --> x-scale is logarithmic.
Return value:
none
Example:
The following examples look for a Subplot named 'RST' and set its x-scale. There are three
different examples. 1. Example: Perform auto scaling on x-axis. 2. Example: Set minimum
to 0 and maximum to 20. 3. Example: Set minimum to 1 and maximum to 1000. Changes
to a log. scale
! Automatic scaling of x-scale
object aPage;
object aGrf;
object aPlot;
! Look for opened graphics board.
aGrf=GetGraphBoard();
if (aGrf) {
! Get Virtual Instrument Panel named Voltage
aPage=aGrf.GetPage('Voltage',1);
if (aPage) {
! Get subplot named 'RST'
aPlot=aPage.GetVI('RST','VisPlot',1);
if (aPlot) {
! Automatic scaling
aPlot.SetScaleX();
}
}
}
! Set minimum and maximum without changing map mode
object aPage;
object aGrf;object aPlot;
! Look for opened graphics board.
aGrf=GetGraphBoard();
if (aGrf) {
! Get Virtual Instrument Panel named Voltage
aPage=aGrf.GetPage('Voltage',1);
if (aPage) {
! Get subplot named 'RST'
aPlot=aPage.GetVI('RST','VisPlot',1);
if (aPlot) {
! Set minimum and maximum
aPlot.SetScaleX(0,20);
}
}
}
! Set minimum and maximum, set map mode to log.
object aPage;
object aGrf;
B - 141
DIgSILENT PowerFactory DPL Reference
object aPlot;
! Look for opened graphics board.
aGrf=GetGraphBoard();
if (aGrf) {
! Get Virtual Instrument Panel named Voltage
aPage=aGrf.GetPage('Voltage',1);
if (aPage) {
! Get subplot named 'RST'
aPlot=aPage.GetVI('RST','VisPlot',1);
if (aPlot) {
! Set minimum and maximum, change to log scale
aPlot.SetScaleX(1,1000,1);
}
}
}
Also see Using other objects
VisPlot.SetScaleY
void VisPlot.SetScaleX (double min, double max, int log)
Sets scale of y-axis. Invalid arguments like negative limits for logarithmic scale are not
set. No arguments --> automatic scaling.
Arguments:
double min (optional) : Minimum of y-scale.
double max (optional) : Maximum of y-scale.
int log (optional) : > 0 --> y-scale is logarithmic.
Return value:
none
Example:
The following examples look for a Subplot named 'RST' and set its y-axis scale. There are
three different examples. 1. Example: Perform auto scaling on y-Axis. 2. Example: Set
minimum to 0 and maximum to 20. 3. Example: Set minimum to 1 and maximum to 1000.
Changes to a log. scale
! Automatic scaling of y-scale
object aPage;
object aGrf;
object aPlot;
! Look for opened graphics board.
aGrf=GetGraphBoard();
if (aGrf) {
! Get Virtual Instrument Panel named Voltage
aPage=aGrf.GetPage('Voltage',1);
if (aPage) {
! Get subplot named 'RST'
aPlot=aPage.GetVI('RST','VisPlot',1);
if (aPlot) {
! Automatic scaling
aPlot.SetScaleY();
}
}
}
! Set minimum and maximum without changing map mode
object aPage;
B - 142
DIgSILENT PowerFactory DPL Reference
object aGrf;
object aPlot;
! Look for opened graphics board.
aGrf=GetGraphBoard();
if (aGrf) {
! Get Virtual Instrument Panel named Voltage
aPage=aGrf.GetPage('Voltage',1);
if (aPage) {
! Get subplot named 'RST'
aPlot=aPage.GetVI('RST','VisPlot',1);
if (aPlot) {
! Set minimum and maximum
aPlot.SetScaleY(0,20);
}
}
}
! Set minimum and maximum, set map mode to log.
object aPage;
object aGrf;
object aPlot;
! Look for opened graphics board.aGrf=GetGraphBoard();
if (aGrf) {
! Get Virtual Instrument Panel named Voltage
aPage=aGrf.GetPage('Voltage',1);
if (aPage) {
! Get subplot named 'RST'
aPlot=aPage.GetVI('RST','VisPlot',1);
if (aPlot) {
! Set minimum and maximum, change to log. scale
aPlot.SetScaleY(1,1000,1);
}
}
}
Also see Using other objects
VisPlot.SetDefScaleX
void VisPlot.SetDefScaleX ()
Sets default scale of x-axis (SetDesktop or SetVipage).
Arguments:
none
Return value:
none
Example:
The following example looks for a Subplot named 'RST' and sets the option 'Use local x-
Axis' to 0. After that the x-scale used is the Graphics Board (SetDesktop) or the Virtual
Instrument Panel (SetVipage).
! Reset option 'Use local x-Axis'
object aPage;
object aGrf;
object aPlot;
! Look for opened graphics board.
aGrf=GetGraphBoard();
if (aGrf) {
B - 143
DIgSILENT PowerFactory DPL Reference
VisPlot.SetDefScaleY
void VisPlot.SetDefScaleY ()
Sets default scale of y-axis (IntPlot).
Arguments:
none
Return value:
none
Example:
The following example looks for a Subplot named 'RST' and sets its option 'Use local y-
Axis' to 0. After that the y-scale used is the Plot Type (IntPlot).
! Reset option 'Use local y-Axis'
object aPage;
object aGrf;
object aPlot;
! Look for opened graphics board.
aGrf=GetGraphBoard();
if (aGrf) {
! Get Virtual Instrument Panel named Voltage
aPage=aGrf.GetPage('Voltage',1);
if (aPage) {
! Get subplot named 'RST'
aPlot=aPage.GetVI('RST','VisPlot',1);
if (aPlot) {
! Reset option 'Use local y-Axis'
aPlot.SetDefScaleY();
}
}
}
Also see Using other objects
VisPlot.DoAutoScaleX
int VisPlot.DoAutoScaleX ()
Scales the x-axis of the plot automatically. The function works for local x-scales only. If
the x-scale is not local a warning is shown in the output window and 1 is returned by the
function. This command works for the plot VisPlot, VisHrm and VisPlot2.
Arguments:
B - 144
DIgSILENT PowerFactory DPL Reference
none
Return value:
0 on success, 1 on error.
Example:
The following example looks for a subplot named 'RST' and performs an automatic scal-
ing.
! perform autoscale of x-axis
object aPage;
object aGrf;
object aPlot;
int iFailed;
iFailed=1;
! Look for opened graphics board.
aGrf=GetGraphBoard();
if (aGrf) {
! Get Virtual Instrument Panel named Voltage
aPage=aGrf.GetPage('Voltage',1);
if (aPage) {
! Get subplot named 'RST'
aPlot=aPage.GetVI('RST','VisPlot',1);
if (aPlot) {
! perform automatic scaling now
iFailed = aPlot.DoAutoScaleX();
if (iFailed > 0) {
! just to demonstrate the return value.
printf('Could not scale x-axis');
}
}
}
}
Also see VisFft Methods
SetDesktop Methods and
SetViPage Methods
VisPlot.DoAutoScaleY
int VisPlot.DoAutoScaleY ()
Scales the y-axis of the plot automatically. The function works for local y-scales only. If
the y-scale is not local a warning is shown in the output window and 1 is returned by the
function. This command works for the plot VisPlot, VisHrm, VisFft and VisPlot2.
Arguments:
none
Return value:
0 on success, 1 on error.
Example:
The following example looks for a subplot named 'RST' and performs an automatic scal-
ing.
! perform autoscale of y-axis
object aPage;
B - 145
DIgSILENT PowerFactory DPL Reference
object aGrf;
object aPlot;
int iFailed;
iFailed=1;
! Look for opened graphics board.
aGrf=GetGraphBoard();
if (aGrf) {
! Get Virtual Instrument Panel named Voltage
aPage=aGrf.GetPage('Voltage',1);
if (aPage) {
! Get subplot named 'RST'
aPlot=aPage.GetVI('RST','VisPlot',1);
if (aPlot) {
! perform automatic scaling now
iFailed = aPlot.DoAutoScaleY();
if (iFailed > 0) {
! just to demonstrate the return value.
printf('Could not scale y-axis');
}
}
}
}
Also see SetViPage Methods
VisPlot2.DoAutoScaleY2
int VisPlot2.DoAutoScaleY2 ()
Scales the second y-axis of the plot automatically. The function works if the y-Axis is en-
abled and uses the local y-scale settings. In any other case a warning is produced and
the function returns 1.
Arguments:
none
Return value:
0 on success, 1 on error.
Example:
The following example looks for a subplot named 'RST' and performs an automatic scal-
ing.
! perform autoscale of y2-axis
object aPage;
object aGrf;
object aPlot;
int iFailed;
iFailed=1;
! Look for opened graphics board.
aGrf=GetGraphBoard();
if (aGrf) {
! Get Virtual Instrument Panel named Voltage
aPage=aGrf.GetPage('Voltage',1);
if (aPage) {
! Get subplot named 'RST'
aPlot=aPage.GetVI('RST','VisPlot2',1);
if (aPlot) {
! perform automatic scaling now
iFailed = aPlot.DoAutoScaleY2();
B - 146
DIgSILENT PowerFactory DPL Reference
if (iFailed > 0) {
! just to demonstrate the return value.
printf('Could not scale y2-axis');
}
}
}
}
Also see SetViPage Methods
VisPlot.SetAutoScaleX
void VisPlot.SetAutoScaleX (int mode)
Sets automatic scaling mode of the x-scale for local scales.
Arguments:
int mode (obligatory) : Possible values: 0 never, 1 after simulation, 2 during simulation
Return value:
none
Example:
The following example looks for a Subplot named 'RST' and change its auto scale mode.
The first example works fine, the second one generates an error message because the x-
scale is unused.
! Set autoscale mode of x-scale to off
object aPage;
object aGrf;
object aPlot;
! Look for opened graphics board.
aGrf=GetGraphBoard();
if (aGrf) {
! Get Virtual Instrument Panel named Voltage
aPage=aGrf.GetPage('Voltage',1);
if (aPage) {
! Get subplot named 'RST'
aPlot=aPage.GetVI('RST','VisPlot',1);
if (aPlot) {
! Set limits to change x-scale of page to used scale
aPlot.SetScaleX(0,10);
! Turn off automatic scaling of x-scale
aPlot.SetAutoScaleX(0);
}
}
}
! Try to set autoscale mode of x-scale to online
object aPage;
object aGrf;
object aPlot;
! Look for opened Graphics Board.
aGrf=GetGraphBoard();
if (aGrf) {
! Get Virtual Instrument Panel named Voltage
aPage=aGrf.GetPage('Voltage',1);
if (aPage) {
! Get subplot named 'RST'
aPlot=aPage.GetVI('RST','VisPlot',1);
if (aPlot) {
B - 147
DIgSILENT PowerFactory DPL Reference
VisPlot.SetAutoScaleY
void VisPlot.SetAutoScaleY (int mode)
Sets automatic scaling mode of the y-scale for local scales.
Arguments:
int mode (obligatory) : Possible values: 0 never, 1 after simulation, 2 during simulation
Return value:
none
Example:
The following example looks for a Subplot named 'RST' and change its auto scale mode.
The first example works fine, the second one generates an error message because the y-
scale is unused.
! Set autoscale mode of y-scale to off
object aPage;
object aGrf;
object aPlot;
! Look for opened graphics board.aGrf=GetGraphBoard();
if (aGrf) {
! Get Virtual Instrument Panel named Voltage
aPage=aGrf.GetPage('Voltage',1);
if (aPage) {
! Get subplot named 'RST'
aPlot=aPage.GetVI('RST','VisPlot',1);
if (aPlot) {
! Set limits to change y-scale of page to used scale
aPlot.SetScaleY(0,10);
! Turn off automatic scaling of y-scale
aPlot.SetAutoScaleY(0);
}
}
}
! Try to set autoscale mode of y-scale to online
object aPage;
object aGrf;
object aPlot;
! Look for opened Graphics Board.
aGrf=GetGraphBoard();
if (aGrf) {
! Get Virtual Instrument Panel named Voltage
aPage=aGrf.GetPage('Voltage',1);
if (aPage) {
! Get subplot named 'RST'
aPlot=aPage.GetVI('RST','VisPlot',1);
if (aPlot) {
! Reset option 'Use local y-Axis' of Subplot
aPlot.SetDefScaleY();
B - 148
DIgSILENT PowerFactory DPL Reference
VisPlot.SetAdaptX
void VisPlot.SetAdaptX (int mode, double trigger)
Sets the adapt scale option of the x-scale for local scales.
Arguments:
int mode (obligatory) : Possible values: 0 off, 1 on
double trigger (optional) : Trigger value, unused if mode is off or empty
Return value:
none
Example:
The following examples look for a Subplot named 'RST' and change its adapt scale option.
The first example works fine, the second one generates an error message because the x-
scale is unused.
! Modify adapt scale option of Subplot
object aPage;
object aGrf;
object aPlot;
! Look for opened Graphics Board.
aGrf=GetGraphBoard();
if (aGrf) {
! Get Virtual Instrument Panel named Voltage
aPage=aGrf.GetPage('Voltage',1);
if (aPage) {
! Get subplot named 'RST'
aPlot=aPage.GetVI('RST','VisPlot',1);
if (aPlot) {
! Set x-scale limits to set option 'Use local x-Axis'
aPlot.SetScaleX(0,20);
! Turn on adapt scale, use a trigger value of 3
aPlot.SetAdaptX(1,3);
! Turn off adapt scale
aPlot.SetAdaptX(0,3);
! Turn on adapt scale again, do not change the trigger value
aPlot.SetAdaptX(1);
}
}
}
! Try to turn on adapt scale of x-scale
object aPage;
object aGrf;object aPlot;
! Look for opened Graphics Board.
aGrf=GetGraphBoard();
if (aGrf) {
! Get Virtual Instrument Panel named Voltage
aPage=aGrf.GetPage('Voltage',1);
if (aPage) {
! Get subplot named 'RST'
B - 149
DIgSILENT PowerFactory DPL Reference
aPlot=aPage.GetVI('RST','VisPlot',1);
if (aPlot) {
! Reset option 'Use local x-Axis' of Subplot
aPlot.SetDefScaleX();
! Try to turn on adapt scale, use a trigger value of 3
! Leads to error message because scale is not local
aPlot.SetAdaptX(1,3);
}
}
}
Also see Using other objects
VisPlot.SetAdaptY
void VisPlot.SetAdaptY (int mode, double offset)
Sets the adapt scale option of the y-scale for local scales.
Arguments:
int mode (obligatory) : Possible values: 0 off, 1 on
double trigger (optional) : Offset, unused if mode is off or empty
Return value:
none
Example:
The following examples look for a Subplot named 'RST' and change its adapt scale option
of the y scale. The first example works fine, the second one generates an error message
because the y-scale is unused.
! Modify adapt scale option of Subplot
object aPage;
object aGrf;
object aPlot;
! Look for opened Graphics Board.aGrf=GetGraphBoard();
if (aGrf) {
! Get Virtual Instrument Panel named Voltage
aPage=aGrf.GetPage('Voltage',1);
if (aPage) {
! Get subplot named 'RST'
aPlot=aPage.GetVI('RST','VisPlot',1);
if (aPlot) {
! Set y-scale limits to set option 'Use local y-Axis'
aPlot.SetScaleY(0,20);
! Turn on adapt scale, use a trigger value of 3
aPlot.SetAdaptY(1,3);
! Turn off adapt scale
aPlot.SetAdaptY(0,3);
! Turn on adapt scale again, do not change the trigger value
aPlot.SetAdaptY(1);
}
}
}
! Try to turn on adapt scale for y-scale
object aPage;
object aGrf;
object aPlot;
! Look for opened Graphics Board.
aGrf=GetGraphBoard();
B - 150
DIgSILENT PowerFactory DPL Reference
if (aGrf) {
! Get Virtual Instrument Panel named Voltage
aPage=aGrf.GetPage('Voltage',1);
if (aPage) {
! Get subplot named 'RST'
aPlot=aPage.GetVI('RST','VisPlot',1);
if (aPlot) {
! Reset option 'Use local y-Axis' of Subplot
aPlot.SetDefScaleY();
! Try to turn on adapt scale, use a trigger value of 3
! Leads to error message because scale is not local
aPlot.SetAdaptY(1,3);
}
}
}
Also see Using other objects
VisPlot.GetScaleObjX
object VisPlot.GetScaleObjX ()
Returns used object defining x-scale. The returned object is the Subplot itself, the Virtual
Instrument Panel or the Graphics Board.
Arguments:
none
Return value:
Object defining the x-scale.
Example:
The following examples look for a Subplot named 'RST' and get the used x-scale object.
There are three different examples.
1. Example: Used scale is Graphics Board 2. Example: Used scale is Virtual Instrument
Panel 3. Example: Used scale is Subplot itself.
B - 151
DIgSILENT PowerFactory DPL Reference
} else if (aPage=aScale) {
output('The scale used is the Virtual Instrument Panel.');
} else if (aGrf=aScale) {
output('The scale used is the Graphics Board.');
} else {
output('The scale used was not found.');
}
}
}
}
! Used Scale is Virtual Instrument Panel
object aPage;
object aGrf;
object aPlot;
object aScale;
! Look for opened graphics board.
aGrf=GetGraphBoard();
if (aGrf) {
! Get Virtual Instrument Panel named Voltage
aPage=aGrf.GetPage('Voltage',1);
if (aPage) {
! Set x-scale to change it to local
aPage.SetScaleX(1,100);
! Get subplot named 'RST'
aPlot=aPage.GetVI('RST','VisPlot',1);
if (aPlot) {
! Reset option 'Use local x-Axis' of Subplot
aPlot.SetDefScaleX();
! Get object defining scale
aScale=aPlot.GetScaleObjX();
if (aPlot=aScale) {
output('The scale used is the Subplot itself.');
} else if (aPage=aScale) {
output('The scale used is the Virtual Instrument Panel.');
} else if (aGrf=aScale) {
output('The scale used is the Graphics Board.');
} else {
output('The scale used was not found.');
}
}
}
}
! Used Scale is Subplot itself
object aPage;
object aGrf;
object aPlot;
object aScale;
! Look for opened graphics board.
aGrf=GetGraphBoard();
if (aGrf) {
! Get Virtual Instrument Panel named Voltage
aPage=aGrf.GetPage('Voltage',1);
if (aPage) {
! Reset option 'Use local x-Axis' of Virtual Instrument Panel
aPage.SetDefScaleX();
! Get subplot named 'RST'
aPlot=aPage.GetVI('RST','VisPlot',1);
if (aPlot) {
! Set x-scale of Subplot to change it to local
aPlot.SetScaleX(1,100);
! Get object defining scale
B - 152
DIgSILENT PowerFactory DPL Reference
aScale=aPlot.GetScaleObjX();
if (aPlot=aScale) {
output('The scale used is the Subplot itself.');
} else if (aPage=aScale) {
output('The scale used is the Virtual Instrument Panel.');
} else if (aGrf=aScale) {
output('The scale used is the Graphics Board.');
} else {
output('The scale used was not found.');
}
}
}
}
Also see Using other objects
VisPlot.GetScaleObjY
object VisPlot.GetScaleObjY ()
Returns used object defining y-scale. The returned object is either the Subplot itself or
the Plot Type (IntPlot).
Arguments:
none
Return value:
Object defining the y-scale.
Example:
The following examples look for a Subplot named 'RST' and get the used y-scale object.
There are three different examples.
1. Example: Used scale is Plot Type.
2. Example: Used scale is Subplot itself.
! Used scale is Plot Type
object aPage;
object aGrf;
object aPlot;
object aScale;
! Look for opened graphics board.
aGrf=GetGraphBoard();
if (aGrf) {
! Get Virtual Instrument Panel named Voltage
aPage=aGrf.GetPage('Voltage',1);
if (aPage) {
! Get subplot named 'RST'
aPlot=aPage.GetVI('RST','VisPlot',1);
if (aPlot) {
! Reset option 'Use local y-Axis' of Subplot
aPlot.SetDefScaleY();
! Get object defining scale
aScale=aPlot.GetScaleObjY();
if (aScale=aPlot) {
output('The y-scale used is the Subplot itself.');
} else {
output('The y-scale used is the Plot Type.');
}
}
B - 153
DIgSILENT PowerFactory DPL Reference
}
}
! Used scale is Subplot itself
object aPage;
object aGrf;
object aPlot;
object aScale;
! Look for opened graphics board.
aGrf=GetGraphBoard();
if (aGrf) {
! Get Virtual Instrument Panel named Voltage
aPage=aGrf.GetPage('Voltage',1);
if (aPage) {
! Get subplot named 'RST'
aPlot=aPage.GetVI('RST','VisPlot',1);
if (aPlot) {
! Set x-scale of Subplot to change it to local
aPlot.SetScaleY(1,100);
! Get object defining scale
aScale=aPlot.GetScaleObjY();
if (aScale=aPlot) {
output('The y-scale used is the Subplot itself.');
} else {
output('The y-scale used is the Plot Type.');
}
}
}
}
Also see Using other objects
VisPlot.SetCrvDesc
object VisPlot.SetCrvDesc (int index, string desc [, string desc1]...)
Sets the description of curves starting at curve number 'index'. A list of descriprions can
be set.
Arguments:
int index (obligatory) : Row of first curve to change the description.
string desc (obligatory) : Description to set for curve in row index.
string desc1 (optional) : Description to set for curve in row index+1. Object defining the
y-scale.
Example:
The following examples look for a Subplot named 'RST' sets the description for the curves
defined in row two and three. The first variable's description remains unchanged.
! Modify descriptions
object aPage;
object aGrf;
object aPlot;
object aScale;
! Note: object load is an interface parameter,
! therefore it is not defined here! Look for opened graphics
board.aGrf=GetGraphBoard();
if (aGrf) {
! Get Virtual Instrument Panel named Voltage
aPage=aGrf.GetPage('Voltage',1);
B - 154
DIgSILENT PowerFactory DPL Reference
if (aPage) {
! Get subplot named 'RST'
aPlot=aPage.GetVI('RST','VisPlot',1);
if (aPlot) {
! Clear variable list
aPlot.Clear();
! Append variables
aPlot.AddVars(load, 'm:U1:bus1','m:U1l:bus1','m:phiu1:bus1');
! Set description of row 2 and 3
aPlot.SetCrvDesc(2,,'Line-Line Voltage','Angle');
}
}
}
Also see Using other objects
VisFft.DoAutoScaleX
int VisFft.DoAutoScaleX ()
Scales the x-axis of the fft plot automatically. After scaling the x-axis automatically the x-
scale minimum is 0. The maximum is nsamples/2 or nsamples/2 x fundamental frequency.
Arguments:
none
Return value:
always 0
Example:
The following example looks for a FFT-Plot named 'FFT' and performs an automatic scal-
ing.
! perform autoscale of x-axis
object aPage;
object aGrf;
object aPlot;
! Look for opened graphics board.
aGrf=GetGraphBoard();
if (aGrf) {
! Get Virtual Instrument Panel named Voltage
aPage=aGrf.GetPage('Voltage',1);
if (aPage) {
! Get FFT plot named 'FFT'
aPlot=aPage.GetVI('RST','VisFft',1);
if (aPlot) {
! perform automatic scaling now
aPlot.DoAutoScaleX();
}
}
}
Also see VisPlot Methods and SetViPage Methods
B - 155
DIgSILENT PowerFactory DPL Reference
IntPlot.SetScaleY
void IntPlot.SetScaleY (double min, double max, int log)
Sets scale of y-axis. Invalid arguments like negative limits for logarithmic scale are not
set. No arguments --> automatic scaling.
Arguments:
double min (optional) : Minimum of y-scale.
double max (optional) : Maximum of y-scale.
int log (optional) : > 0 --> y-scale is logarithmic; 0 --> y-scale is linear.
Return value:
none
Example:
The following example looks for a Subplot named 'RST' and set its y-axis scale. There are
three different examples. 1. Example: Perform auto scaling on y-Axis. 2. Example: Set
minimum to 0 and maximum to 20. 3. Example: Set minimum to 1 and maximum to 1000.
Changes to a log. scale
! Automatic scaling of y-scale
object aPage;
object aGrf;
object aPlot;
object aScale;
! Look for opened graphics board.
aGrf=GetGraphBoard();
if (aGrf) {
! Get Virtual Instrument Panel named Voltage
aPage=aGrf.GetPage('Voltage',1);
if (aPage) {
! Get subplot named 'RST'
aPlot=aPage.GetVI('RST','VisPlot',1);
if (aPlot) {
! Reset option 'Use local y-Axis' of subplot
aPlot.SetDefScaleY();
! Get object defining scale (now IntPlot)
aScale=aPlot.GetScaleObjY();
if (aScale) {
! Perform auto scaling
aScale.SetScaleY();
}
}
}
}
! Set minimum and maximum without changing map mode
object aPage;
object aGrf;
object aPlot;
object aScale;
B - 156
DIgSILENT PowerFactory DPL Reference
IntPlot.SetAutoScaleY
void IntPlot.SetAutoScaleY (int mode)
Sets automatic scaling mode of the y-scale.
Arguments:
int mode (obligatory) : Possible values: 0 never, 1 after simulation, 2 during simulation
Return value:
none
B - 157
DIgSILENT PowerFactory DPL Reference
Example:
The following example sets the auto scale mode of the Plot Type to On.
! Set autoscale option of Plot Type
object aPage;
object aGrf;
object aPlot;
object aScale;
! Look for opened graphics board.
aGrf=GetGraphBoard();
if (aGrf) {
! Get Virtual Instrument Panel named Voltage
aPage=aGrf.GetPage('Voltage',1);
if (aPage) {
! Get subplot named 'RST'
aPlot=aPage.GetVI('RST','VisPlot',1);
if (aPlot) {
! Reset option 'Use local y-Axis' of subplot
aPlot.SetDefScaleY();
! Get object defining scale (now IntPlot)
aScale=aPlot.GetScaleObjY();
if (aScale) {
! Set auto scale option to on
aScale.SetAutoScaleY(1);
}
}
}
}
Also see Using other objects
IntPlot.SetAdaptY
void IntPlot.SetAdaptY (int mode, double offset)
Sets the adapt scale option of the y-scale.
Arguments:
int mode (obligatory) : Possible values: 0 off, 1 on
double offset (optional) : Offset, unused if mode is off or empty
Return value:
none
Example:
The following examples look for a Subplot named 'RST', gets its Plot Type and changes
the adapt scale option of the scale.
! Modify adapt scale option of Plot Type
object aPage;
object aGrf;
object aPlot;
object aScale;
! Look for opened graphics board.
aGrf=GetGraphBoard();
if (aGrf) {
! Get Virtual Instrument Panel named Voltage
aPage=aGrf.GetPage('Voltage',1);
if (aPage) {
! Get subplot named 'RST'
B - 158
DIgSILENT PowerFactory DPL Reference
aPlot=aPage.GetVI('RST','VisPlot',1);
if (aPlot) {
! Reset option 'Use local y-Axis' of subplot
aPlot.SetDefScaleY();
! Get object defining scale (now IntPlot)
aScale=aPlot.GetScaleObjY();
if (aScale) {
! Set y-scale limits to set option 'Use local y-Axis'
aScale.SetScaleY(0,20);
! Turn on adapt scale, use an offset of 3
aScale.SetAdaptY(1,3);
! Turn off adapt scale
aScale.SetAdaptY(0,3);
! Turn on adapt scale again, do not change the offset
aScale.SetAdaptY(1);
}
}
}
}
Also see Using other objects
B - 159
DIgSILENT PowerFactory DPL Reference
B - 160
DIgSILENT PowerFactory DSL Reference
Appendix C
DSL Reference
C-1
DIgSILENT PowerFactory DSL Reference
lim
lim ( u, min, max)
Nonlinear limiter function:
limstate
limstate ( x1, min, max)
Nonlinear limiter function for creating limited integrators.
Example:
x1. = xe/Ti;
y = limstate(x1,min,max);
This was previously realized by using "select'' and "lim'' functions:
delay
delay ( x, Tdelay)
Delay function. Stores the value x(Tnow) and returns the value x(Tnow-Tdelay).
Tdelay in seconds and larger than 0.0. The expression Tdelay must evaluate to a
time independent constant and may therefore only consist of constants and param-
eter variables. The expression x(t) may contain other functions.
Example:
C-2
DIgSILENT PowerFactory DSL Reference
select
select ( boolexpr, x, y)
Returns x if boolexpr is true, else y.
Example:
time
time ()
Returns the current simulation time.
Example:
t=time()
y = sin(t) or
y = sin(time())
file
file ( ascii-parm, expr)
!OBSOLETE! Please use an ElmFile object in the composite model in stead.
picdro
picdro ( boolexpr, Tpick, Tdrop)
Logical pick-up-drop-off function useful for relays. Returns the internal logical state:
0 or 1.
Return value:
The internal state:
• changes from 0 to 1, if boolexpr=1, for a duration of at least Tpick seconds
• changes from 1 to 0, if boolexpr=0, after Tdrop seconds
• remains unaltered in other situations.
flipflop
flipflop ( boolset, boolreset)
Logical flip-flop function. Returns the internal logical state: 0 or 1.
Return value:
The internal state:
• changes from 0 to 1, if boolset=1 and boolreset=0 (SET)
C-3
DIgSILENT PowerFactory DSL Reference
aflipflop
aflipflop ( x, boolset, boolreset)
'Analog' flip-flop function. Returns the (old) value for x at SET-time if internal
state=1, else returns the current value of x.
Return value:
The internal state:
• changes from 0 to 1, if boolset=1 and boolreset=0 (SET)
• changes from 1 to 0, if boolset=0 and boolreset=1 (RESET)
• remains unaltered in other situations. (HOLD)
lapprox
lapprox ( x, array_iiii)
Returns the linear approximation y=f(x), where f is defined by the array_iiii. Please
consider that the array has to be sorted in ascending order.
Example:
y = lapprox(1.8, array_valve)
invlapprox
invlapprox ( y, array_iiii)
Inverse lapprox with array.
lapprox2
lapprox2 ( xl, xc, matrix_iiii)
Returns the linear approximation y=f(xl,xc) of a two-dimensional array, where f is
defined by the matrix_iiii. xl represents the line value and xc the column of the ma-
trix. Please consider that the array has to be sorted in ascending order.
Example:
sapprox
sapprox ( x, array_iiii)
Returns the spline approximation y=f(x), where f is defined by the array_iiii. Please
consider that the array has to be sorted in ascending order.
C-4
DIgSILENT PowerFactory DSL Reference
Example:
y = sapprox(1.8, array_valve)
sapprox2
sapprox2 ( xl, xc, matrix_iiii)
Returns the spline approximation y=f(xl,xc) of a two-dimensional array, where f is
defined by the matrix_iiii . xl represents the line value and xc the column of the ma-
trix.
Example:
event
Option 1: no create/target specification
event( MaxTrig, x, 'name=ThisEvent dtime=delay value=val vari-
able=var')
C-5
DIgSILENT PowerFactory DSL Reference
other name is given, the DSL interpreter checks any composite models where
the present DSL model (common model) is used and searches for a slot with
the given name. The event then is applied to the DSL common model in that
slot.
string ThisEvent (obligatory)
Name of the external event to be started. The event must be stored locally in-
side the DSL model. If 'name=this' is set, no event has to be created but a pa-
rameter event (EvtParam) will be created and executed automatically.
double delay (obligatory)
Delay time of the event after triggering.
double val (optional)
Value of the parameter event (only when 'name=this' is set).
double var (optional)
Parameter to which the value is set (only when 'name=this' is set).
Return value:
void (no return value)
Remark:
If the event()-definition according to options 2/3 is used, the create and target pa-
rameters must be the first parameters that are listed.
Example:
The example shows a counter made with DSL using event( , ,'name=this ...') which
automatically creates and configures a parameter event. The variable named
counter will be set to value val within dtime. The input signal is a sine-wave.
inc(x) = 0
inc(u) = amp0*sin(10*x)
inc(counter) = 0
x.=1
u = amp0*sin(10*x)
yo = u-trigval
cadd = counter+1
event(0,yo,'name=this dtime=0.0 value=cadd variable=counter')
event(0,yo,'name=OpenBreaker dtime=0.2')
Please see the DSL Reference in the appendix for a detailed list of all available functions.
C-6
DIgSILENT PowerFactory DSL Reference
C-7
DIgSILENT PowerFactory DSL Reference
C-8
DIgSILENT PowerFactory Index
D-1
DIgSILENT PowerFactory Index
D-2
DIgSILENT PowerFactory Index
D-3
DIgSILENT PowerFactory Index
D-4
DIgSILENT PowerFactory Index
D-5
DIgSILENT PowerFactory Index
D-6
DIgSILENT PowerFactory Index
D-7
DIgSILENT PowerFactory Index
D-8
DIgSILENT PowerFactory Index
D-9
DIgSILENT PowerFactory Index
Next On
Set (DPL) B-38 ComEcho (DPL) B-73
NextFilt On-Line Operation (DOLE) 28-17
Set (DPL) B-39 Open
Node A-1 ElmCoup (DPL) B-87
NoFinalUpdate (DPL Internal Method) B-13 StaSwitch (DPL) B-106
noswt (DOLE) 28-10 Open Tie Optimization 20-8
NRow Options 20-9
IntMat (DPL) B-82 OPF 18-1
NVars Opt. Capacitor Placement
IntMon (DPL) B-76 Basic Options 20-3
O Optimization Procedure 20-2
Obj Sensitivity Analysis 20-2
Set (DPL) B-41 Target Function 20-1
OBJECT Optimal Capacitor Placement 20-1
DIg Output Language 27-68 Optimal Power-Flow 18-1
Object A-2 Optimization Procedure 20-8
Object (DPL) Outage 21-52
AddCopy B-50 Outage Calculation 21-1
CreateObject B-44 output
Edit B-49 DPL 29-10
GetClass B-46 DSL 24-19
GetConnectedElms B-48 Output of Device Data 27-72
GetConnectionCount B-48 Documentation 27-74
GetContents B-45 Filter/Annex 27-74
GetCubicle B-48 Output of Results 27-75
GetFullName B-45 Output Window
GetNode B-47 Context Sensitive Menu 27-51
GetParent B-47 Copy 27-53
GetSize B-52 Legend 27-52
GetVal B-53 Settings 4-4, 27-50
HasResults B-48 Overload Alleviation (Reliability) 21-49
Inom B-55 P
IsClass B-46 Page Tab A-5
IsInFeeder B-51 Parameter Identification
IsNode B-47 Application 26-8
IsOutOfService B-51 Comparison Slot 26-4
IsRelevant B-51 Measurement File 26-3
lnm B-53 Model Creation 26-4
MarkInGraphics B-55 Performing 26-6
Move B-49 Target Function 26-2
ShowFullName B-44 Passive Failure 21-53
snm B-54 pi
StochEvt B-56 DPL 29-8
unm B-54 DSL C-1
Unom B-54 picdro
VarExists B-51 DSL C-3
Objects PostCommand (DPL Internal Method) B-26
Edit 8-3 pow
Filtering 6-11 DPL 29-7
Search 6-10 DSL C-1
Sorting 6-10 Power at Risk 21-49
Objects relevant for Calculation 12-2 Power Restoration (Reliability) 21-48
ODF (Outage Distrib. Factor) 21-4 Primitive Block Definitions (DSL) 24-8
Off Print Graphic 8-10
ComEcho (DPL) B-73 PrintAllVal
D - 10
DIgSILENT PowerFactory Index
D - 11
DIgSILENT PowerFactory Index
D - 12
DIgSILENT PowerFactory Index
D - 13
DIgSILENT PowerFactory Index
D - 14
DIgSILENT PowerFactory Index
D - 15
DIgSILENT PowerFactory Index
D - 16