UserManual en Parte3
UserManual en Parte3
TARIFFS
1. Choose the ’Select’ option from the ’Tariff’ selection control on the reliability page of the load
element. A data manager browser will appear with the ’Equipment Type Library’ selected.
2. Optional: If you have previously defined a ’Tariff’ characteristic and want to re-use it, you can
select it now. Press OK to return to the load element to reliability page.
3. Create an energy tariff object by pressing the New Object button from the data browser toolbar.
A type creation dialog should appear.
4. Select ’Energy Tariff’ and press OK. An ’Energy Tariff’ dialog box will appear.
5. Enter Energy and Costs values for the Energy Tariff (right click and ’Append rows’ as required).
6. Press OK to return to the load element reliability page.
7. Optional: enter a scaling factor for the Tariff.
An example Energy Tariff characteristic is shown in Figure 16.5.2. In this example, ’Approximation’ is
set to ’constant’, i.e. no interpolation between data points. A fault which leads to energy not supplied of
2.50 MWh would result in a cost of
17.1 Introduction
This chapter presents the tools and options included in PowerFactory to view the results of the pre-
formed calculations. Key concepts in this topic are Result Boxes, Virtual Instruments (VIs), Results
Objects, and Variable Selection.
This section presents the set of objects, commands and tools, dedicated to the handling and presenta-
tion of results in PowerFactory.
Results are displayed with help of result boxes in the single line diagrams, as described in Chapter 9:
Network Graphics, Section 9.9 (Results Boxes, Text Boxes and Labels). To edit result boxes (e. g. for
selecting additional variables to be displayed) the so-called Format Editor is used. With the Format
Editor one can define text reports, from very small result boxes to more complex and comprehensive
reports within DIgSILENT PowerFactory .
For a detailed technical description of the report generating language, see Appendix F (The DIgSILENT
Output Language).
The Format Editor (IntForm) will be used in most cases to change the contents of the result boxes in
the single line graphic. PowerFactory offers three ways in which to change a result box definition:
• writing a new user defined format, using the PowerFactory Format Editor.
Because of all these, the result boxes are used as example to introduce the nature and use of the
Format Editor. As explained in Chapter 9: Network Graphics, Section 9.9.1 (Result Boxes) the result
boxes may be right-clicked to select a particular format. Figure 17.2.1 shows the Format Editor dialogue.
Different variables can be added by appending new rows. The user should double click in the corre-
sponding row in the column “Variable” and the list of all available variables will appear.
This Format Editor has a page to change the format by selecting variables, and a page to manually
define a format. What is displayed on this page depends on the input mode of the Format Editor, this
can be changed using the button Input Mode.
User Selection
This mode lets the user select any amount of parameters out of all available parameters for the
selected object or class of objects. This includes model parameters as well as calculated values.
It is also possible to define how the variable will be showed by selecting the columns Show Name,
Show =, Decimal Places and Show Unit. A preview of the Result Box is showed in the Preview
field.
Format Editor
This is the most flexible, but also the most difficult mode. In this mode, any text and any
available variable, in any colour, can be entered in the Form. The highly flexible DIgSILENT
output language allows for complex automatic reports. This mode also offers a fast append of
predefined lines. 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 set of variables to the existing form text.
In Figure 17.2.1, the editor is in the default ’User Selection’ mode. The three predefined rows show the
names of the variables, their units and their descriptions.
The example in Figure 17.2.1 shows that the active and reactive power at the element Xnet have been
selected as well as power factor. This selection will produce three lines of DIgSILENT output language
code. This code can be viewed by changing the Input Mode to “Format Editor”. The text editor in this
page will be disabled, because a format is selected instead of typing in the codes ourselves. However,
it still shows the format of our selection as:
#.## $N,@:m:P:_LOCALBUS
#.## $N,@:m:Q:_LOCALBUS
#.## $N,@:m:cosphi:_LOCALBUS
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 Format 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,@:m:cosphi:_LOCALBUS,@:[m:cosphi:_LOCALBUS
The ’[’-sign encodes for the unit of the variables, instead of the value.
Where the “∼” -sign encodes for the variable name. With both options on, the produced format line
P -199,79 MW
Other often used format characters are ’%’, which encodes the full variable description, and ’&’, which
encodes he short description, if available.
The ComDocu command (“Output of Device Data” ) is used to produce an output of device data. The
output can be used in reports or may help to check the entered data. Reports of calculated results can
be made with the ComSh command. See Section 17.2.3 (Output of Results) for more information.
The “Short Listing” reports only the most important device data, using one line for each single object.
This allows a small but clear documentation. Like the “Output of Results” the “Short Listing” report uses
a form to generate the output. This form can be modified by the user. When the report form is changed,
it is stored in the “Settings” object of the active project. This does not influence the reports of other
projects. The output of objects without a defined short listing will produce warnings like:
The detailed report outputs all device data of the elements selected for output. In addition, type data can
be included (“Print Type Data in Element”). Device Data is split into the different calculation functions
like “Load-Flow” or “Short-Circuit”. The “Basic Data” is needed in all the different calculations. “Selected
Functions” shows a list of the functions whose data will be output. If one wants to report the device data
for all functions move all functions from left to right. If “Selected Functions” is empty no device data will
be output.
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 de-
scribed 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 “Settings”
of the active project. The local annex is stored in the “Output of Device Data” command. To
modify the local annex press the “Change Annex” button. See (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.
The “Annex for Documentation” stores the annex for the documentation of results. The annex number
and the page number for the first page are unique for each class.
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.
The command ComSh (“Output of Results” ) is used to produce an output of calculation results. The
output can be used in reports or may help in interpreting the results, as shown in Figure 17.2.6. To
generate a report with input data use the ComDocu command, see Section 17.2.2 (Output of Device
Data).
Several different reports, depending on the actual calculation, can be created. The radio button on the
upper left displays the different reports possible for the active calculation (Figure 17.2.6 shows a load-
flow). Some reports may be inactive, depending on the object(s) chosen for output. In Figure 17.2.6, a
Complete System Report was selected for output. In the second page ( ) the “Used Format” displays
the format(s) used for the report. Some reports are a set of different outputs. For these reports more
than one form is shown. If the form is modified it will be stored automatically in the “Settings” folder of
the active project. The changed form does not influence the reports of other projects. If “Use Selection”
is active a set of objects (selection) or a single object must be chosen. The report is generated only for
these elements. All relevant objects are used if “Use Selection” is not selected. The relevant objects
depend on the chosen report. Most reports display a title on top of each page. The reference “Title”
defines the contents of the header.
For some reports additional settings are required. These settings depend on the chosen report, the
selected objects for output and the calculation processed before. The calculation (left top) and the used
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 transient simulation, or during a
data acquisition measurement. Result objects are also used in DPL scripts, in reliability calculations, for
harmonic analysis, etc.
Note: Clearing the data will delete the result-file and will reset the database ID. This will destroy all
calculated or measured data in the result file. It will not be possible to restore the data.
1. Creating a new result object and setting the default type to Harmonics, for instance, will cause the
harmonics command dialogue to use this result object by default.
2. Setting the Default type to Triggered will cause the calculation module to copy and temporarily
store signals in that copied result object, every time a Trigger Event becomes active. The Triggered
default type enables the trigger time fields.
When the Output Protocol is pressed, all events that happened during the simulation, recorded by the
result object, will be written again into the output window. So one can check what events took place
during the last simulation.
The contents of a result object are determined by one or more monitor Variable Selection (IntMon)
objects. These monitor objects can be edited by pressing the Variables button. This will show the list
of monitor sets currently in use by the result object.
Selecting a set of result variables, using monitor objects is necessary because otherwise all available
variables would have to be stored, which is practically impossible.
Exporting Results
The stored results for the monitored result variables can be exported by pressing the Export 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 described further
in 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 Figure 17.2.8.
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
• PSSPLT Version 2.0
The export command allows for exporting an interval of results only and to export every n-th result.
Additionally, in the Advanced Options page, 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, the option “Export all variables” is selected, which mean that all the results for all monitored
variables are exported. But also a selection of variables can be made by selecting the option “Export
only selected variables”.
At many stages in the development of a power system design, the differences between certain settings
or design options become of interest.
For a single calculation, the ’absolute’ results are shown in the single line graphics. The variables that
are shown may be specified by the user by altering the result-box definitions.
When pressing the Comparing of Results on/off button ( ), the results of the first calculation are
’frozen’. All subsequent calculations will then show their results as deviations from the first calculation
made. The subsequent calculation results are stored together with the first result. This allows the user
to re-arrange the comparisons as desired by pressing the icon (see the next Section).
The differences between cases are coloured according to the severity of the deviation, making it possible
to recognise the differences between calculation cases very easily. The colouring and severity ranges
may be set in the Edit Comparing of Results... menu option, found by pressing (see the next section).
• Calculate the first case by activating a certain calculation case and, for example, calculating a
load-flow.
• 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, chang-
ing calculation cases, adding or deleting elements, changing the active variations of scenario, 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.
The set of calculated comparisons may be edited to select the cases which are to be compared to each
other or to set the colouring mode. When the icon on the main toolbar is pressed, the Compare
dialogue will open. See Figure 17.3.1.
With the Compare dialogue, the two cases which are to be compared can be selected. Furthermore, a
list of colours may be set which is then used to colour the results displayed in the result boxes, according
to certain levels of percentage change.
In PowerFactory input (data that has been entered by the user) and output (parameters that have been
calculated) data is kept separate. Output data, such as the new tap positions following an automatic tap
adjustment calculation, does not overwrite the settings that the user originally entered, unless the user
specifically commands this, using the icon on the main toolbar.
Note: The corresponding input parameters of the database will be overwritten by the calculated values.
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.
If the icon is clicked, and the input parameters are now overwritten by the calculated values found
on the single line diagram.
Variable Selection (IntMon objects) are used to select and monitor variables associated with objects of
the data model in order to store results. The selection of a variable selection, determines the variables
to be recorded during a simulation run of the variables to be displayed by a “Flexible Page Selector”.
Before a calculation is performed or after initial conditions of a time domain simulation have been
calculated, the user can define variable selection monitors from the single line graphic. To do this,
perform the following steps:
• A data browser listing all the results objects defined in the active study case should appear. Double
click on a target result object to select it. If no result objects have been defined, PowerFactory will
generate a default one, called “All calculations”.
Variable Selection Monitors can also be created directly in the target results object using the Contents
button (of the Results object). This will pop up a browser with all the variable selections that have
already been defined. To define a new variable selection, the icon in the browser can be pressed.
An example of the variable selection object is shown in Figure 17.4.1. Here the variable selection for the
load called Load C, which is found in a grid called Nine_Bus of the active project is shown (red circle).
In this case a RMS simulation (green circle) is to be performed and the total active and the reactive
power flowing to the load are going to be monitored (blue circle).
In the Variable Selection Monitor dialogue the following fields can be seen:
Object
Is the selected object (normally a network component), whose variables are going to be moni-
tored.
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.
By checking this box and selecting the option ’Display results variables in output window’ in the
simulation command, the values calculated for the selected variables during a simulation will be
displayed in the output window.
Filter for
As mentioned previously, there is a large number of variables that may be observed in PowerFac-
tory. 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. Further information about the selection of variable is given in the
subsection Searching the Variables to Monitor.
Page Tab
The first sorting of the variables is by calculation function (load-flow, short-circuit, etc.). In the
example of Figure 17.4.1, the RMS-Simulation page has been automatically selected, as a prior
RMS 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 clicking on them on the
“Available Variables” side, by selecting their checkbox, or by selecting them and then pressing
the ( ) button. The user can remove variables from the Selected Variables area by double-
clicking on them.
Display All
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.
• Variable List (Page): Prints a list of available variables for the current page (e.g. Basic Data) to
the output window.
The second tab of the Variable Selection Monitor Dialogue, goes to the Editor, where variables can be
manually input- for advanced use.
The first sorting of the variables is by calculation function (load-flow, short-circuit, etc.). Within these
sets variables are sorted into sub-sets. The user can select the desired subset by means of the drop
down menu on the Variable Selection field. Following a description of the available subsets:
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/es that the element is connected to (usually preceded by “n:” for ’node’). 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 of objects connected to the object whose variable list is compiled can be
accessed. An example of this variable is the open end voltage at a line end. See the subsection
Selecting the Bus to be Monitored for further information.
Signals
Variables that can be used as interface between user defined and/or PowerFactory models (inputs
and outputs). They 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 that are derived from the primary calculations (i.e. currents, loading, power, losses,
etc.), from input data (i.e. the absolute impedance of a line, derived from impedance/ km * line
length), or that 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. Calculation parameters are preceded by a “c:”.
Element Parameter
Input Parameters that belong directly to the object selected (preceded by “e:”).
Type Parameter
Input Parameters from the corresponding type object 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 examples.
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.
In this subsection an examples for the use of the above described sets are given. The procedures
described below always apply, regardless of which is the final use of the variable selection monitor, i.e.
Flexible Data Page, Results Box, Plots, etc.
Suppose that a two winding transformer called T1 is to be monitored. The following variables are going
to be selected:
• Type name
• Tap setting
• Nominal and calculated voltages at the HV node.
The name of the transformer type is entered in the type data so we select the type parameters (as the
Variable Selection) in the filter - the name is also entered on the basic data page so we should select
the Basic Data page, and the type name parameter is “loc_name” (Figure 17.4.2). Notice that the focus
object for the variable selection object is a transformer.
The tap setting will be found in the element data and the parameter is located on the load-flow page
(this information is gained as the user becomes more familiar with PowerFactory 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 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 Figure 17.4.3 this is illustrated schematically. We have
started by creating a variable selection for the object ’T1’ 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_2’. 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’.
Step by step, the process will be as follows: 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 page, so this is where we will logically find the ’link’ to the connected
object (the cubicle). In Figure 17.4.4 we can see that this selection has been made (Basic Data page).
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.
Double-clicking on this jumps us to another variable selection 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 Selection 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 Figure 17.4.5.
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 page. Figure 17.4.6 shows the result of these jumps
in PowerFactory. Lastly, the parameter required must be selected.
The parameter we wish to display is the nominal voltage of the connected node. This will be found on
the Basic Data page and we must choose the element parameter set to find the parameter, as shown
in Figure 17.4.6. The parameter is called
At this point we could also add the calculated voltage for the node. This will be found under “Currents,
Voltages and Powers” on the Load Flow page.
After having clicked Ok until you are back at the original variable selection 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
selection object.
Note: In this particular example we have used a ’long’ method to show to the node variables for
illustration purposes. Typically, however, a user wishes to display calculated variables such as
the voltage at the end of a line where the breaker at that end is open. In this case PowerFactory
has a special ’shortcut’ set - the “Bus Results”.
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 Figure 17.4.7.
When selecting variables from the Currents, Voltages and Powers set, the user will notice that there is
a filter called Bus Name. This is used to determine which side of an edge element is to be considered.
To maintain standard nomenclature the objects at the ends of a line element are named Terminal i or
Terminal j and HVside or LVside in the case of a transformer.
The ends of an edge element are named bus1 or bus2 and bushv or buslv respectively (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 choosing 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, buslv 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 clas-
sification, 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.
A virtual instrument is basically a tool for displaying calculated results. The most common use of a VI
is to look at the results of a time-domain simulation like an EMT or RMS simulation, by defining one or
more plotted curves showing the variables changing with time.
But there are various other applications of virtual instruments, for example to graphically display voltage
profiles, FFT plots or the results of a harmonic analysis. This could be in the form of a bar graph, a
plotted curve, single displayed variables, tables of values, etc.
The Virtual Instrument Panel is basically a page in the active graphics board, where different plots
or graphs are stored and displayed. The basic information about the included virtual instruments
is stored here.
Virtual Instruments
Virtual Instruments (VIs) are shown on Virtual Instrument Panels and display the results of one or
more variables or parameters. Multiple VIs can be defined for any one Virtual Instruments Panel
and individual VIs can be set up as required by the variable(s) displayed.
All signals, parameters, variables or other magnitudes from PowerFactory can be shown in a Virtual
Instrument. The variables are normally floating point numbers, but there is also the possibility to show
discrete variables as well as binary numbers, for example an “out of service” flag or the switching
operation of a circuit-breaker.
There are various designs of Virtual Instruments available in PowerFactory . These Virtual Instruments
can be divided into several groups, which are described in the subsequent sections of this chapter:
Plots are the ’basic’ diagrams used to show variables. Variables can be plotted against either a time
axis or an axis defined by another variable. PowerFactory plots include the following:
• Subplots (VisPlot)
• Subplots with two y-axis (VisPlot2)
• X-Y plots (VisXyplot)
• FFT plots (VisFft)
Bar Diagrams are similar to Plots. In Bar Diagrams the results are not shown as a line, but as single
bars for each data point.
Vector Diagrams show different variables - like voltage, current or power - in a vector diagram using
polar or cartesian coordinates.
Metre Panels display variables or parameters using a mimic of a physical display or provide a means
of user interaction via a button or switch. Metre Panels include:
• digital display
• horizontal scale of a metre
• vertical scale of a metre
• measurement VI
• interactive button/switch
Curve Inputs are used to convert graphical information (graphs or curves) into a set of data by scan-
ning and sampling the data points.
In addition to the above options there are further types of virtual instruments for specific purposes. For
example, the time-overcurrent plot or the time distance diagram is available for protection studies. Study
specific plots are not described in this chapter but rather directly in the section of the manual dealing
with the individual calculation method. The following list briefly describes some other virtual instrument
types:
Time-Overcurrent Plot
When studying overcurrent relays the tripping characteristic is often displayed by plotting the
magnitude of the current on the x-axis and the resulting relay tripping time on the y-axis. In
PowerFactory, the characteristic curves of power system elements which are to be protected can
also be inserted into the Time-Overcurrent Plot. See Chapter 40: Protection and Section 40.4
(Time-Overcurrent Plot) for further details.
R-X Plot
For distance protection relays, the tripping characteristic of one or more relays can be visualised
in a R-X diagram. PowerFactory includes a R-X Plot for showing the characteristics of distance
relays. PowerFactory also includes a feature to define the impedance of adjacent elements
graphically inside the R-X diagram. See Section 40.6 (The impedance plot) for further details.
Time-Distance Diagram
For studying the selectivity of distance protection, the Time-Distance Diagram is often used. Pow-
erFactory provides a convenient method to automatically show all distance relays in a specified
protection path in one Time-Distance Diagram. See Section 40.7 (The time-distance plot) for
further details.
Feeder Definitions
Voltage Profile
The Voltage Profile shows the voltage profile of a complete subsystem belonging to a defined
feeder in the power system. The voltage profile can be plotted against either the feeder distance
or the node number. See Chapter 13 (Grouping Objects) for further details.
Schematic Path
The Schematic Path plot allows a meshed or radial network to be shown in a brief schematic.
Instead of displaying result boxes, visual information like colours for overloading or voltage are
selected by the user and displayed.
Harmonics
Waveform Plot
A Waveform Plot can be used to show the magnitude and phase angle of voltages and currents
at 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. For a more
detailed description see 17.5.7: The Waveform Plot.
Modal Analysis
Eigenvalue Plot
The Eigenvalue Plot (Viseigen) displays the eigenvalues calculated in the modal analysis (Chap-
ter 27: Modal Analysis / Eigenvalue Calculation). Double-clicking any of the displayed eigen-
values, 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 see
Section 27.3.2 (Viewing Modal Analysis Results using the built-in Plots).
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 Section 27.3.2 (Viewing Modal
Analysis Results using the built-in Plots).
The Mode Phasor Plot (VisModephasor ) displays the same information of the Mode Bar Plot but
in a phasor diagram. For further information see Section 27.3.2 (Viewing Modal Analysis Results
using the built-in Plots).
The tools available for modifying virtual instruments, such as labels and constants, can be applied
equally to most virtual instrument types.
Virtual instruments are created and edited on a Virtual Instruments Panel (SetViPage) which is one of
the possible types of pages on a Graphics Board. Other page types are single line graphics and block
diagram or frame graphics.
• selecting the File → New option on the main menu and subsequently selecting a “Virtual Instru-
ment Page” in the ComNew. This will create a new page in the “Graphics Board” of the currently
active study case.
• 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.
Note: If a new virtual instrument panel is created, while there is no Graphics Board opened already, a
new Graphics Board in will be added to the current study case.
x-Axis holds the default x-Axis for plots without local axis stored in pages without local axis.
Advanced holds the advanced settings like the arrangements of the plots or their specific style.
Results stores a reference to the default results object used by the plots.
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 automat-
ically. But it is possible to turn on user defined moving and resizing of the plots. In this mode 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 automatically.
A ViPage uses a predefined style which set line-styles, line-width, fonts and other graphical settings.
User defined styles can be created and selected. A different style can be selected on each VI panel of
a Graphics Boards.
There are several ways to access the graphics board dialogue from PowerFactory
• When the panel is empty one can access the dialogue by simply double-clicking the empty VI
panel or an empty area on the panel.
• Right-click the background of the VI panel besides the shown plots and choose Edit actual Virtual
Instrument Panel from the context menu.
• The simplest way to edit the dialogue is to click the icon.
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 different pages named:
• 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 simultaneously.
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.
Virtual instrument panels usually set the size and position of new virtual instruments like plots automat-
ically. Then the VIs can not be resized or moved. So the position of these VIs is set automatically and
their size remains unchanged.
There are two different modes for automatically arranging the VIs. The user can choose to arrange the
VIs using either
The modes can easily be changed by pressing the one or the other button. In addition the position of
VIs can easily be exchanged. Thereto mark the VI by clicking it. Then ’drag’ the VI onto another plot.
Thus the position of the VIs will be exchanged.
Note: This option of exchanging the plots by dragging is only possible, when one of the arrangement
buttons are active. If you deactivate both buttons by unselecting them in the toolbar, the plots can
freely be moved by dragging them on the panel. See also Moving and Resizing.
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 libitum’. This mode is also activated by disabling the selected icon
or .
Moving and resizing of VIs in the standard virtual instrument panels is turned off. Both can be activated
by deactivating the auto-arrangement modes by disabling then currently 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.
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 created 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 variables, axis and
curve styles. Figure 17.5.1 shows an example of the dialogue.
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 Figure 17.5.1 this can be seen in the to last rows of the table. Here both variables are shown in one
plot number 7 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 Result 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 be 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 Chapter 9: Network Graphics.
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 element, 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:
1. Results reference on page Results of the VI Panel accessed by pressing the icon.
2. If 1. is empty the Results reference on the Results page of the Graphics Board will be used by
pressing the icon.
3. If both (1. and 2.) are not empty, the results element used for the last calculation will be applied.
If there is no calculation the appropriate results element in the study case will be used (if any).
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.
The options in the context sensitive menu of the VI panel may vary depending on the cursor and the
settings of the panel. The options are listed below:
• Edit Actual Virtual Instrument Panel opens the virtual instrument panel dialogue.
• Create local Page Format creates a page format for the current panel.
• Paste Text inserts text from the from the clipboard into the panel.
• A VI can be selected from the list shown in the Create VI → . . . option to create a new VI on the
panel.
• Style → Select Style is clicked to select a style for the panel.
• Style → Create new Style is selected to create a new style for the panel.
• Style → Edit Style of clicked Element is selected to modify the style of the selected element only.
• Select All → is selected to mark all VIs.
• Export Results. . . exports the shown result into e.g. the output window, a ASCII file, a Comtrade
file or the clipboard.
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 number 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.
Each virtual instrument panel uses a style where line-widths, fonts, brushes and other graphical settings
are defined. There are six predefined styles available in DIgSILENT PowerFactory , which are:
The “Default” styles uses smaller line-widths and smaller fonts than the “Paper” styles. It was designed
to get nice printouts. The paper style was designed for reports and papers where meta-files are included
in text-programs. In addition to the layout the styles hold predefined VIs.
There are several ways to select a predefined or user-defined style for the current virtual instrument
panel. The easiest way to change the style is using the toolbar.
The user-defined styles are described in detail in Section 17.5.11 later in this chapter.
17.5.2 Plots
Plots are the most used diagrams to show parameters, states, signals or variables depending on either
time or on another variable. The following plots are available in PowerFactory :
• SubPlot (VisPlot)
• SubPlot (2y) with two y-axes (VisPlot2)
• X-Y plot (VisXyplot)
• FFT plots (VisFft)
The Subplot
SubPlots are the ’basic’ diagrams and are typically used to display one or more plotted curves from the
results of an EMT or RMS simulation.
A new subplot is created on the current Virtual Instrument 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 settings, as shown in Figure 17.5.2.
• right-click on the subplot, and select the Edit option from the context sensitive menu; or
• double-click on the subplot.
Editing Subplots
The edit dialogue of a subplot, as shown in Figure 17.5.3 has pages for the y-axis and x-axis of the
individual subplot as well as an additional Advanced page for auxiliary settings. The y-axis page is
normally used to set the curves in the subplot, while the x-axis normally shows time (by default).
Scale
The y-axis may be defined for more than one subplot at the same time, or, and by default, may be
defined as a “local Axis” format. When the option Use local Axis is disabled, a reference to the used
’global’ axis type is shown and can be edited by pressing the .
Automatic
The colour, line style, and line width of all new curves in the subplot will be set automatically when
the corresponding option is enabled. The Set now button will apply automatic line formats all existing
curves again.
Shown Results
This is a reference to the currently active result file (ElmRes). This object will be used, if no result file is
specified in the Curves definition table.
Curves
The definition table for the curves is used to specify the result file (optional), object and parameter for
each of the curves as well as their representation.
Some plot types (e.g. VisPlot) have the option to define a ’User Defined Signal’ which allows arithmetic
calculation of additional results based on PowerFactory calculated results. The method to create a
calculated result is explained in section 17.5.3: Calculated Results.
The available options for scaling the axis are described in more detail below.
The x-axes often needs to be synchronised for all subplots or for all subplots on one VI panel, for
instance to show the same time-scale in all plots. In order to synchronise 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:
• To edit the graphics board definition, either right click on the Virtual Instrument and select Edit or
double-click on the Virtual Instrument. Next click on the x-Axis page of the edit dialogue of the
plot and select the option Graphics Board under ’Scale’, ’Axis’. The dialogue for changing the x-
axis definition for the complete graphics board can be then accessed via the Used Axis selection.
Another way to modify the graphics board definition is to click the icon for the graphics board
dialogue and then go to the x-Axis page.
• Similar to the graphics board definition, to edit the virtual instrument panel specific x-axis, either
right click on the Virtual Instrument and select Edit or double-click on the Virtual Instrument. Next
click on the x-Axis page of the edit dialogue of the plot and select the option Page under ’Scale’,
’Axis’. The dialogue for changing the x-axis definition for the virtual instrument panel can be
then accessed via the Used Axis selection. This will display the dialogue of the of the VI panel
(SetVipage). Another way get to the panel dialogue is 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 (virtual instrument) x-axis definition is accessed by selecting the option Local. When
Local is selected, the options for specifying the x-axis are shown directly in the edit dialogue.
The options available for the x-axis are similar to the one for the y-axis. They are described in the
following section. The only difference is in selecting the variable of the axis.
Within the x-axis page there are numerous options to choose from for the x-Axis Variable as shown in
Figure 17.5.4. The Default value depends on the type of simulation and the result object created during
the previous simulation. For time-domain simulations different representations of the time scale are
available. For an FFT plot, the x-axis can be scaled using the frequency in Hz or the harmonic order.
The option User defined enables the user to choose any variable for the x-axis, selectable from a result
object. In this way an x-y plot can be created. Whilst the VisPlot can be used to create x-y plots, there
is also a specific plot type to create an x-y plot: the VisXyplot. The VisXyplot is described in more detail
in section VisXyplot.
The y-axes are normally not synchronised across virtual instruments like the x-axis can be, because
they all show different parameter values and thus need parameter-specific settings. By default, the
Graphics Board’s default plot type is used, but more plot types may be created and used, i.e. plot
types for voltages, power, factors, slip factors, etc. By using the same plot type, different plots can be
compared more easily, without the risk of misinterpreting a difference in curve amplitude.
The y-axis page in the subplot edit dialogue has the option to Use local Axis. Similar to the x-axis, if
the Use local Axis checkbox is not ticked, the graphics board y-axis settings are selected. The graphics
board y-axis settings can be altered by selecting Type when the Use local Axis checkbox is unticked.
The local definitions of an axis (either the x-axis or the y-axis) has three parts:
The axis Limits can be set manually, or can be auto scaled via the Scale button. The scale button sets
the limits automatically from the curve shape. The options to Auto Scale the plot are:
Off Turns any auto scaling function off and will display the results in the range between the given
limits.
On This option will automatically scale the plot at the end of a simulation.
Online This option will automatically scale the plot during the simulation.
The x-axis additionally features a Chart option. If ticked a range and a start value can be set. This will
set the x-axis to the specified range. During the simulation, only an x-range, set in the options, is shown
and will ’wander’ along with the calculation time.
The Adapt Scale settings are used to force a tick mark on the axis at a particular value. The tick marks
can be forced by setting the Offset value for the y-axis and the Trigger value for the x-axis. Other tick
marks will be drawn at ’nice’ distances from this offset. The default value for both x- and y-axis is an
active adapt scale with both Trigger and Offset equal to zero. With the default values, the main ticks of
both axes start at zero.
For the y-axis, to see the deviations from the offset, the Show Deviations from Offset option will draw
a second axis on the right, which has its zero baseline at the offset value. The Show Deviations from
Offset option is available for the y-axis only.
An example of two subplots is given in Figure 17.5.5 where a voltage sag is shown with both an
instantaneous and a RMS value curve. The top curve has the Adapt option disabled, and both axes
autoscaled.
The bottom subplot has a smaller x-axis, to show only the interesting part, and has the Adapt option set
on both axes.
In Figure 17.5.5, the y-axis has its offset set to the nominal voltage level (11kV) and also shows the
deviations from that level in the right vertical axis. From this deviation, it is clear that the RMS voltage
initially drops more than 5kV. The x-axis has its offset set to the event time, which in this case is 100ms
when a short-circuit was simulated. From the x-axis, it is now directly clear that this short-circuit was
cleared after 200ms, at t=300ms.
The curves in a subplot must be taken from a result object (ElmRes) or a Calculated result object
(IntCalcres). A result object is created by a power system calculation function like the RMS or EMT
simulation. The method to create a result object is explained in 17.2.4: Result Objects. The method to
create a calculated result object is explained in 17.5.3: Calculated Result Objects.
The selection of variables to display on the current plot is done in the y-axis page of the edit dialogue.
To view the edit dialogue, double-click on the background of the plot or right-click the plot and select
Edit. The curve definition is shown on the Y-Axis page of the edit dialogue as shown in Figure 17.5.6.
Each line in the Curves ’table’ is used to define a variable to plot and the visual representation of the
curve.
• The first column states the result object from which the data to plot the curve will be read. If it is
empty, the standard result file will be used, as defined in the reference to Shown Results in the
same dialogue.
• The second column states the power system element (here the generator “G1d”), which is se-
lected from the available elements in the result object.
• The third column states the actual variable for the curve (here “xspeed”), selected from the
variables in the result object, belonging to the selected element.
• The next columns specify the style of the individual curve.
• With the last two columns the user can normalise (Norm.) the values of the variable to a nominal
value (Nom. Value).
To select a new result object, element or parameter, double-click the field or right-click the field and
select Select Element/Type or Edit from the context sensitive menu. Then select a new entry from the
list of possible result objects, resp. elements and parameters that appear.
The colour, line style and line width settings are edited in the same way: double-click the cell or right-
click the cell and select Edit.
To create a new curve definition line, right-click on the column number (on the far left) (see cursor arrow
in Figure 17.5.6) and select Insert Rows or Append (n) Rows. Similarly, to delete a marked curve
definition from the list, select Delete Rows.
Note: To see changes between two consecutive simulations, the following procedure can be used.
First run the initial simulation, the simulation results will be stored inside the defined result object
*.ElmRes, which can be found in the active study case. Copy the *.ElmRes object, paste it and
rename it e.g. to “old Results”. Once this is complete, add the same variable to a plot (so that
there are two instances) and select the “old Results” result object for one of them (as shown in
Figure 17.5.6). Upon updating the simulation, the old and the new results will both be shown in
one plot.
To easily specify more than one curve for the same result file and element in one action, select more
than one variable at once 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 columns are
copied automatically. This convenient procedure is shown in Figure 17.5.7 and Figure 17.5.8.
Similarly several elements can be selected and PowerFactory will automatically insert the corresponding
number of rows. The variables are set automatically to the one selected in the first row.
A plot with two y-axes can be seen in Figure 17.5.9. To create this plot, press the icon and select a
Subplot(2y)(VisPlot2) from the pull down list. This will add a subplot with two y-axes to the current VI
panel.
To deactivate the additional axis, navigate to the page for the second y-axis and untick the option Use
second y-Axis.
A further type of plot is the x-y plot. This plot shows one variable dependant on a second variable.
The two variables can be completely independent from each other and do not have to belong to one
element. 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-y plot to the current VI panel.
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 17.5.2 (The Subplot).
On the page Scales of the dialogue, the scales of the two axis can be set automatically or global
definitions can be used.
On page Time Range the time range can be set to the whole simulation time or alternatively select a
specified range to show the results pertaining to a specific time range only.
The FFT plot (VisFft) is similar to the normal subplot (VisPlot) in terms of edit dialogues, with the key
difference being the x-Axis scale. The FFT plot does not show signals on a time scale, but rather uses
a frequency scale. A time range for the signal can be selected prior to transformation into the frequency
domain using the Fast-Fourier Transformation (FFT) algorithm. An FFT will show the harmonic content
of the time bounded signal.
To create an FFT plot, either click on the Append VI(s) icon , or right-click on a plotted curve and
select Create FFT Plot from the context sensitive menu. In the latter case, the mouse pointer can then
be ’dragged’ from the selected point on the curve to the left or right to define a time range for the FFT.
Hold the mouse still to reveal a quick-help box which shows the range, beginning and end of the curve
to be transformed.
To set the final range for the FFT, simply click the diagram again. The FFT is then calculated and shown
in a new FFT plot.
To view the FFT plot edit dialogue, double-click on the FFT plot. The x- and y-axis can be defined on
the various dialogue pages similar to the VisPlot. Additional options specific to FFT plots are:
Calculate
The Calculate 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 Synchronise will synchronise 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 option allows the unit of the x-axis to be set to either Frequency or Harmonic Order.
When Harmonic Order is selected, the nominal frequency can be set. The nominal frequency is
not restricted 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.
Some plot types, such as the VisPlot, have the option to define a ’User Defined Signal’. The ’User
Defined Signal’ option allows calculation of additional results based on the arithmetic manipulation of
one or more results calculated by PowerFactory and recorded in a result object (ElmRes ).
As the calculated result object is used to plot additional values based on other recorded values, the
calculated result object is stored within the relevant VisPlot object under the virtual instrument panel
and the graphics board in the data manager.
To define a new Calculated Result, first perform a simulation, record a result in a result object and create
a VisPlot. Double-click on the Visplot or right-click on the Visplot and select Edit and define at least one
curve from the results stored in the result object. Once at least one curve is assigned in the VisPlot, the
’User Defined Signals’ dialogue should become visible as shown in Figure 17.5.11.
Click on New to create a new calculated result. An example of the calculated result object dialogue is
depicted in Figure 17.5.12.
Name
Input Parameters
• Results defines the result object in which the arithmetic operands are located.
• Operands defines the elements and variable names of the operands within the result object.
Additional operands can be inserted or appended by Mouse over Operand row → Right-Click →
Click Insert Row(s) or Append Row(s) or Append n Row(s).
Result
Refer to section 26.12 for more information on DSL and DSL syntax.
A vector diagram is used to visualise complex values such as voltages, currents and apparent power as
vectors. A complex variable can be defined and shown in one of two different representations:
There are predefined vector diagrams for calculation results. The predefined vector diagrams can easily
be created using the context sensitive menu of a branch:
The example in Figure 17.5.13 shows the voltage and current at one terminal of a line.
Note: A vector diagram can only be shown when branch elements like lines, load, transformers, etc.
are selected. The vectors of the voltage, current or power across the elements or at the nodes
connected 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.
A vector diagram VecVis can be added to the current VI panel, in a similar fashion to the addition of a
subplot. To do this, press the icon and select a Vector Diagram (VecVis) from the pull down list. In
the edit dialogue, variables can then be shown as described in Section 17.5.2 (The Subplot).
The objects and variables of the vector diagram can be changed manually by editing the dialogue.
To open the dialogue, double-click on the vector diagram. Alternatively right-click on the diagram and
select:
In most plots, the x and y scale are given by the minimum and maximum value of each scale. A vector
diagram can’t be defined using minimum and maximum for each scale because the x- and the y-ratio
must be equal. The ratio for each unit is therefore set as the parameter units per axis tick. In addition
the location of the origin can be defined.
If all shown variables have the same unit, the axis are labelled with values and unit. If there is more
than one unit, the labels show ticks. A legend showing the ratio of the units is added in the bottom-right
corner of the plot. The balloon help of the scale highlights the absolute values for each unit.
To modify the scale of an axis the Scales table in the edit dialogue can be changed. The column “Unit”
defines the unit and the column “Scale” defines the ratio in units per tick with a higher ratio compressing
the vector.
If the “Auto Scale” option in the dialogue is turned on, the scales are adapted whenever a new calculation
is ready. Turn off “Auto Scale” to keep the defined scale limits.
The origin position of the vector plot can be changed either graphically or with the dialogue:
• Right-click the vector plot and select Set Origin. This will move the origin to the right-clicked
position.
• Modify the “x-Min.” and “y-Min.” values in the plot dialogue to the starting value of the x-and y
scale.
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 17.5.2 (The Subplot). The representation setting is
also used for the mouse position display in the status bar.
The option Polar in the context sensitive menu toggles between representation in polar and cartesian
coordinates. This representation can also ba changed on the Advanced page in the edit dialogue.
Label of Vectors
In the edit dialogue as well as from the context sensitive menu of the plot, the label of the vector can
be displayed in the different coordinate representations. The different coordinate systems allow display
with either the real and imaginary values or the magnitude and phase angles of the vectors.
There are two different ways to change the objects for which the vector plot is made, either:
• Right-click on one of the vector plots and select Jump To. This shows a list of all connected
elements from which one can be selected. Here the side of a branch 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.
• Double-click the “Element” column in the variables table in the plot dialogue, as depicted in
Figure 17.5.14 and select a new Object from the drop-down list.
• Right-click the vector plot and select the Default Variables option. This will show a list of predefined
variables. This option is not available if there is more than one element shown in the same plot or
if there are no calculation results available.
• Double-click the “Var. x-Axis” column in the variables table in the plot dialogue, as depicted in
Figure 17.5.14 and select a new variable from the drop-down list. The variables shown in the list
are either the magnitude or the real-part of the vector. The angle or the imaginary part are set
automatically. The selection list is empty when no calculation results are available.
Background
The Voltage Profile Plot VisPath shows the voltage profile of a radial network based on the networks
load-flow results. The Voltage Profile Plot is directly connected to a feeder object defined in the network,
so it can only be created for parts of the system where a feeder is assigned.
The Voltage Profile Plot requires a successful load-flow calculation before it can display any results and
hence it can not be created if there is no load-flow calculated. The easiest way to create a voltage
profile plot is to define the plot directly from the single line graphic.
There are two methods to create a Voltage Profile plot. Either from the single line graphic or from the
data manager (or calculation relevant objects filter).
To create a voltage profile plot directly from the single line graphic follow these steps:
1. First define a feeder for the part of the radial network where a voltage profile plot is required. To
define a feeder, right-click on the cubicle at the beginning of the feeder and then select Define →
Feeder. . .
2. Right-click a branch (ElmLne) of a pre-defined feeder. Next select Show → Voltage Profile from
the context sensitive menu. PowerFactory will then create a new object VisPath diagram showing
the voltage profile for the feeder.
To create a voltage profile plot directly from the Data Manager (or calculation relevant objects filter)
follow these steps:
1. Navigate to the Feeder grouping objects within the data manager (Project → Network Model→
Network Data→ Feeders).
2. Right-click on the icon of the feeder object for which the voltage profile is required.
3. Select Show → Voltage Profile from the context sensitive menu.
Note: The option Show → Voltage Profile is only available after a load-flow calculation and only if the
results of the calculation are valid.
The voltage profile plot shows the voltage of terminals or busbars along the length of a feeder. The
variable(s) shown by the plot can be changed. If there is no valid load-flow calculation the plot remains
empty. An example of a voltage profile plot is shown in Figure 17.5.15.
Click on the curve to mark the busbar positions (points) on the voltage profile. 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 default settings, which is voltage m:u with the unit “p.u.” shown as
the y-axis variable. 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.
To change the x-axis variable of the voltage profile follow these steps:
1. Double left-click on a blank area of the plot to open the voltage profile plot dialogue box.
2. On the Scale page of the Edit dialogue a list box defines the x-axis variable. By default ’Distance’
is selected. This shows the distance from the beginning of the feeder in ’km’. There are two other
options:
Bus Index
When Bus Index is selected, each bus is numbered sequentially from the beginning of the feeder
and all of the buses are displayed equidistantly on the plot.
Other
The Other option allows plotting against a user defined variable. Only variables available at all
terminals in the feeder can be used. The software variable name must be typed in the ’Variable’
textbox. For example, to display on the x-axis the load at each terminal, the variable ’m:Pload’
could be used. Note, do not enter the single quotes around the variable name.
The y-axis variable(s) can also 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 used as an alternative.
To change the variable shown, follow these steps:
1. Double left-click on a blank area of the plot to open the voltage profile plot dialogue box.
2. Select the Curves page. At the bottom of the page there is a table called Variables. To manually
add a user-defined variable double-click in the Variable cells. For example, to display the positive
sequence voltage, replace the variable m:u with the variable m:u1. Right click the table and select
the option Append Rows to add additional curves to the plot.
By default, any branch with a loading greater than 80 % will appear in red colour on the voltage profile
plot. To adjust the colour and the loading limits follow these steps:
1. Double left-click on a blank area of the plot to open the voltage profile plot dialogue box.
2. The Branch Colouring settings define the settings for the branch colouring at the bottom of the
Scale page. Any branches that are loaded less than the Lower Limit will be coloured according to
the colour next to the Lower Limit variable. Likewise, any branches loaded greater than the Upper
Limit will be coloured according to the colour next to this variable. This concept is illustrated in
Figure 17.5.16.
The Parallel Branches option is required because the voltage profile plot only shows a single connection
line between nodes, regardless of how many parallel branches connect the two nodes. If there is a
situation where one of these parallel lines is below the Lower Limit and another is above the Upper
Limit, then the parallel branches option determines whether the ’single’ line in the voltage profile plot is
either the line with the maximum loading or the line with the minimum loading. Typically, most users are
concerned with the maximum loading, so the default of Show Maximum will be fine in the majority of
cases.
The colour of the busbar (terminal) names on the voltage profile plot can be altered according to the
user preference. To change the colour setting follow these steps:
1. Double left-click on a blank area of the plot to open the voltage profile plot dialogue box.
2. On the Advanced page towards to centre, the Colouring of the busnames shown in the plot can
be changed by altering the setting Show Busnames.
To access the context sensitive menu, right-click on the plot or on the profile. The context sensitive
menu shows additional functions regarding the voltage profile plot including:
Edit Feeder Open the edit dialogue of the feeder related to the plot.
Edit Data Right-click on a branch in the plot to open the edit dialogue of the selected line, transformer
or other element.
Edit and Browse Show the selected element in the data manager.
Mark in Graphic Mark the selected element in the single line graphic(s).
In addition to the voltage profile, the Schematic Path VisPath object can 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 detailed in Section 17.5.5.
As the name implies, the Schematic Path diagram shows a schematic of a radial network. Similar to
the voltage profile plot, a Schematic Path diagram is also directly connected to a defined feeder in the
network, so it can only be created for the parts of the system with which a feeder is defined. Also the
Schematic Path can only be shown or created, if a load-flow is calculated for the system.
• To define a feeder in the radial network, right-click 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 Visualisation→ Plot. PowerFactory will create a new VisPath and the schematic
diagram showing the profile for the radial network.
• In the calculation relevant objects or in the data manager select the feeder object and select Show
→ Schematic Visualisation→ Plot from the context sensitive menu.
In the plot, the terminals and busbars are displayed as well as the electrical elements belonging to the
feeder depending on the real distance of the network or on the bus index, where the distance between
every node is constant.
Another function to show the schematics of radial networks is the Schematic Single Line Diagram.
These functions are convenient when no single line graphics of a network exists and one wants to let
PowerFactory draw the schematic of a radial network automatically.
These functions can be activated from the context sensitive menu of the branch element with a defined
feeder similar to the voltage plot or the schematic plot described above. Using the option Show →
Schematic Visualisation→ . . . two slightly different operations can be used:
Distance
PowerFactory will draw automatically from the database a single line diagram for the radial net-
work defined by the feeder. The distances between the terminals/busbars in “km” are set auto-
matically according to the distances specified in the lines.
Bus Index
Similar to the schematic diagram the distances between the terminals/busbars will be neglected
and a standard value will be used for all terminals.
Note: Remember to run a load-flow prior to activating these functions. Otherwise you will not have
access to the options.
The waveform plot VisHrm is used to display the voltage or current waveform after a harmonics load-
flow calculation. Harmonics are typically emitted by a harmonic voltage or current source described in
Chapter 23: Harmonics Analysis, Section 23.5.5. The waveform is calculated according to the following
formula:
𝑛
∑︁
𝑢(𝑡) = 𝑢(𝑖) · cos(2𝜋(𝑓 (𝑖) · 𝑡 + 𝜙(𝑖)) (17.1)
𝑖=1
where:
𝑖 Index of frequency
𝑛 Number of frequencies
𝑡 Time
𝑓 (𝑖) Frequency at index i
𝑢(𝑖) Magnitude at frequency i
𝑝ℎ𝑖(𝑖) Angle at frequency i
If a successful harmonic load-flow calculation with the option All Frequencies is performed, the wave-
form plot will show the results of any distorted or pure sinusoidal variable, e.g. voltages or currents, from
any element in the network. The waveform plot can be created even if there is no load-flow calculated.
To create a waveform plot on the current VI panel, press the icon and select a Waveform Plot(VisHrm)
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 settings.
The usage, settings and tools for this plot type are similar to the subplot. A detailed description can
be found in 17.5.2 (The Subplot), although the definition of variables is slightly different. The variable
definition requires a reference to the result object and the element as per the Subplot, but in contrast to
the Subplot, the magnitude of the variable and the angle relating to the magnitude can also be defined.
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. Although the angle can be defined, the parameter is not obligatory.
The Waveform Plot Settings Most other settings/options for the waveform plot are the same as the
settings for the Subplot (VisPlot). See Section 17.5.2 (The Subplot) for more information. However there
are some specific settings unique to the waveform plot, these include the step size and time range. The
step size and time range are specified within the waveform plot settings object stored in the “Settings”
directory of the active project.
To change the waveform plot settings either press the Calculation button in the dialogue of the plot
or select Calculation in the context sensitive menu on the plot. The Settings Waveform Plot SetWave
object holds the Step Size and the Range for the calculation of waveforms in the Waveform Plots (see
Figure 17.5.18).
Step Size
The visible waveforms 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 Frequency. The Highest Frequency and the resulting Step
Size are shown for information.
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 for information.
The curve input command is used for measuring printed curves. The original curves must be available
in windows metafile (*.wmf) or in bitmap (*.bmp) format. The graphics file is displayed as a background
in a curve input plot. This plot then allows for defining plot points by successive mouse clicks.
The curve input plot (VisDefcrv ) allows the measurement and editing of single curves or group of curves
at once. The measured curve points are stored in a Matrix object. The positions of the axis in the curve
input plot can be set by the user.
Special functions for groups of curves allow for x-value synchronisation and many other facilities to
make their input quick and easy.
The special Curve Input virtual instrument plot VisDefcrv is needed for measuring curves. Such a plot,
like all other virtual instruments, is displayed on a Virtual Instrument Panel. A new virtual instrument
panel is created with the new command in the file menu or the new icon of the graphics window.
To create a new Curve Input plot, right-click an empty panel, or press on the panel button bar and
select the Curve-Input (VisDefcrv ). Double-click the curve input plot to open the curve input option
dialogue shown in Figure 17.5.19.
The input options are used to select the graphics file which is to be measured. Only windows metafile
(*.wmf) or bitmap (*.bmp) formats are supported. The x-scale and y-scale settings are used to set the
range and type of the axes of the curves as they are in the graphics file.
Single
Each matrix input defines a single curve. The first column in the matrix holds the x-values, the
second one the y values. Other columns are ignored.
Set of Curves
Only the first matrix is used for input. The first column in the matrix holds the x-values, the other
columns hold the y-values of each curve in the group of curves.
The measured curve is drawn between the measured points by interpolation. This is important for later
when the measured curve is used with a specific interpolation. Setting the correct interpolation mode
when measuring the curve causes a better fit while avoiding excess curve point definitions. Available
modes of interpolation:
• Linear
• Cub. Spline
• Polygon
• Hermite
To open the context sensitive menu for Curve Input, right-click the curve input plot. The menu is used
to select the curve for which points are to be measured or edited, to select the measurement mode, to
synchronise x-values by interpolation, etc as detailed below:
• Open the curve-input dialogue with a double-click and set the following options
– Select the background file
– Select Single or Set of Curves in the Curves Listbox
– Select the interpolation mode
– Select on or more Matrix objects in the table named Curves. At least two columns must be
already present in the matrix object.
• Close the dialogue.
• Define the axis position to adapt the curve input to the 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
Some dialogues contain embedded graphic windows to visualise input settings. An example is shown
in Figure 17.5.20 for the parameter characteristic dialogue. An embedded graph has some similar
functionality and features to the subplot, detailed in section 17.5.2.
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 graphic offers commands for printing and zooming.
To access the context sensitive menu, right-click on the embedded graphic.
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 graphic. The print dialogue includes
an option 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
Zoom All
Change Viewpoint
This option changes the arrow to the move arrow . Press the left mouse button, hold it down
and move the mouse inside or outside the window. This will move the zoomed area in that
direction. Press the right mouse button to change the cursor back again.
In some embedded graphs an option exists to define Limits 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.
Different kinds of plots are used to display calculation results or device data. There are numerous tools
which help the user interpret and analyse data and calculation results. Most of the tools are accessible
directly through the “status bar” of PowerFactory or through the context sensitive menu. To activate the
context sensitive menu, right-click on the curve or on the plot background (depending on the desired
function).
Edit Dialogues
To access the Edit dialogue of the plots, double-click on the background of a plot or Right-Click →
Edit. A quick way to access information pertaining to the plot is to double-click directly on the element
requiring change. This includes:
Legend
X-Axis
The x-axis limits, scales and variable representation and auto scaling options of the current
graphics board or panel.
Y-Axis
The y-axis limits, scales and variable representation and auto scaling options as well as the
variable displayed.
In the status bar of PowerFactory on the bottom of the program window useful information regarding the
data shown in the curves can be obtained.
• First the value of the mouse position in the diagram is displayed in the status bar, similar to the
information shown with an open single line diagram.
• When a curve is clicked and marked with a cross, the cross value is displayed in the status bar and
remains unchanged until the cross is set to a different position. If there is no cross on the active
page the status bar value is reset and no longer displayed. Some plots have different scales on
one axis, these plots can not display a value in the status bar.
• The option Curve-Tracking can be found in the status bar, normally in a grey font style. Double-
click on this font to enable the “Curve-Tracking” mode. In this mode a cross will appear if the
mouse arrow is near a curve. Hold the mouse pointer still for one second and the x- and y-value
will be shown in a balloon window.
Labelling Plots
There are different styles of labels available for labelling curves and graphics. Setting labels is possible
in most of the different plots, although some of the labels are not available in all plot types. Labels are
all created in the same way.
To create a label, first click on the curve to mark the desired data point with a cross, then right-click on
the plot to display the context sensitive menu. The option Label → Insert . . . Label can be selected for
different label types. Alternatively there are also two icons and in the toolbar, which can be used
to create labels directly.
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-label (Add Label with Text option) displays user defined text above and below a line
connected to the curve. Edit the label to change the text shown.
The value-label (Add Label with Value of the Current Curve option) displays the x/y coordinates
of the cross. The label is a text-label filled with the marked coordinates. Edit the label to change
the text.
The format-label (Add Label with definable format option) uses a form to print the displayed text.
The form can be selected as local for each label or a common label can be used for all plots of
the same type in the active project.
More information regarding each labelling option is provided in the following sections.
The text-label and the value-label are defined using the same object type, the VisValue. The VisValue
labels curves or graphics displayed in plots. The text of the label is written above and below a horizontal
line and the line is connected to the curve/graphic with a ’rubber band’.
After creating labels, they can be freely dragged across the plot while staying connected to the data
point on the curve. To change the text of the label, double-click the label or the ’rubber band’. The edit
dialogue of these (VisValue) object is depicted in Figure 17.5.21.
Value
Value displays the connected curve position of the label. For labels created as a value-label this
position is displayed automatically as label text. “x-Axis” displays the x axis value and “y-Axis” the
y axis value. “Time” is visible only for plots showing a trajectory.
Text on Top
Text on Bottom
Labels in plots showing simulation results are usually automatically 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.
Like the text-label and value-label, the format-label (VisLabel) is also set in plots to label curves or
graphics. However, the format-label displays text printed using a form. The form is different for each
type of diagram. It is either defined locally per label or defined for all diagrams of the same type in the
activated project. The format-label dialogue is shown in Figure 17.5.22.
Value
Value displays the connected curve position of the label. “x-Axis” displays the x axis value and
“y-Axis” the y axis value.
Data Object
“Data Object” is a reference to the object of which the plotted curve parameter is derived. If “Data
Object” is not set the label itself is taken as the “Shown Object”.
Shown Object
The object output by the form, see “Data Object” described above.
Shows the used “Format Manager”. The used format is either the local format or the one defined
for all plots of the same type in the active project.
Creates a new “Format Manager” valid for the current label only. The forms can be edited 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 is defined.
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 is reset.
Labels in plots showing simulation results are usually automatically 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.
The context sensitive menu of the format labels provide access to further options. To access the context
sensitive menu, right-click on the format label. The following options can be selected:
Border
Form
The format options can be directly accessed by Edit used Format and Create Local Format for
the marked format label.
Reconnect with...
The constant label (VisXvalue) is used to display a straight line. The VisXvalue can be used to display
y-values for a constant x-quantity or x-values for a constant y-quantity. In some plots like the overcurrent
plot, constant labels are created and deleted automatically for certain simulations e.g. to visualise the
short-circuit current for relays.
The look of constant labels can be varied with different settings including the label location, intersection
values and other options. The dialogue of the constant label is depicted in Figure 17.5.23.
To insert a constant label into a diagram or plot, right-click on the plot and select the option Set constant
→ x-Value or Set constant → y-Value to place a constant x-value or a constant y-value respectively.
The dialogue for the VisXvalue object will be displayed as shown in Figure 17.5.23 and a horizontal or
vertical line will be displayed at the value specified in the dialogue.
There are different options and styles for the constant label:
Name defines the name of the constant line displayed in the plot.
Style changes the representation of the constant label as follows:
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 inter-
sections 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.
Short Line/Intersection (Left/Right) indicates the constant value at the bottom/top respectively
at the right/left side of the plot and the intersections with curves.
Intersection Only shows only the intersection points with the curves.
Label defines the position of the constant value label as follows:
x-Value is Displays the type of current displayed. Visible only for constant x values in time overcurrent
diagrams.
Show Values The constant value can be displayed as a line, as intersections with the curves/graphics
or both. “Line Only” shows a vertical or horizontal line without labels for the intersections with the
curves. “Line with Intersection” creates crosses at the intersection of the line with the curves. For
constant x values the y value is displayed at the crossing and the other way round. The values
and their unit are coloured like the curve crossed.
Intersections Constant x values created automatically in the overcurrent plot are displaying the short-
circuit current. To get the tripping times “Intersections” can be set to SHC Currents. “All” would
display the intersection of the relay curve ignoring the type of current. Visible only for automatic
constant x values showing currents in the time overcurrent diagrams.
Set User Defined The button “Set user defined” is visible for constant values created by the short-
circuit in overcurrent plots. Labels showing this button display the short-circuit current. The labels
are deleted whenever a new short-circuit was calculated. If one wants to modify and keep the
label even if a new short-circuit was calculated the label must be changed to user defined.
There are various ways of inserting lines into a plot. Another way is to insert a Straight line. To create a
straight line right-click on the plot background or on a marked point and select Straight line. The Straight
Line → . . . includes the following options:
Set Secant to add a line directly through the selected data point.
Through Point defines a graphic line through the selected data point with a defined gradient and gives
back the function of the line.
User Defined defines a line independent from the curves shown with a defined gradient and y-offset.
The function of the inserted line can also be seen, when holding the mouse arrow over the line
for 1 second. The options of the line dialogue is similar to the options for the constant value
(VisXvalue).
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 17.5.24 shows the dialogue of the function.
The Curve Filter specifies the type of filter applied to the data read from the result object. This object
is a filter applied to curves in plots. There are different filter types available. The following filter settings
are available. (N=number of points in the original curve, K=number of points in the filtered curve)
Average The filtered curve is the running average of the last n points. The first n-1 points are omitted.
K=N-n+1.
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
• Off
• Simple
• 3D
• 3D with label
The border with 3-dimensional effect and label will insert an additional label on the bottom of the
selected plot. This label can now be defined by double-clicking on it. Furthermore the text style can be
altered by choosing the option Select Font for Border.
The whole diagram or plot can also be exported for further usage in reports. Thereto first mark the plot
which is to be exported to a graphic file. Then select the option File → Export. . . → . . . from the main
menu.
There is the selection between the export into a Windows MetaFile (*.wmf) or into a Bitmap File (*.bmp).
The export of curve data is available for a single VI or for the variables of the entire VI panel. Hence there
are different ways to access the “ASCII Results Export” command ComRes of curve data, described in
the following paragraph. The export directly from the result file gives the opportunity to directly export
several variables at once and is described in more detail in Section 17.2.4(Exporting Results).
• Press the Export... button in the right side of the dialogue box of a virtual instrument.
• Right-click on the VI and select Export... from the context sensitive menu.
• 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 Figure 17.5.25.
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.
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.
Each VI panel, each virtual instrument and every single plot uses a style where line-widths, fonts,
brushes and other graphical settings are defined. These objects normally use predefined styles. In
PowerFactory there are six predefined styles available:
These styles can be modified for all VIs or only for single plots. For this user-defined styles can easily
be created and specified. The base for an user defined style is always the previous default style.
There are several ways to select a predefined or user-defined style or change between the available
styles.
• The easiest way is using the list-box in the toolbar by clicking and selecting one of the available
styles.
• A style can be selected from the Style → Select Style→ . . . in the context sensitive menu of the
VI.
• A style is selected in the VI-Style list-box on the Advanced page of the VI Panel dialogue.
The user-defined styles are stored in the settings folder element of the active project. Therefore each
project has its own ∖ Settings ∖ Styles ∖... path and user defined styles. Only the changed elements are
stored in the project, the unchanged ones are the ones predefined in the default style.
The settings folder elements can be seen in the database in Figure 17.5.26.
Defining Styles for the VI Panel The Style → Create new Style option in the context sensitive menu of
the VI panel SetVipage or every plot on the panel is selected to create a new style for the actual virtual
instrument panel. Insert a name for the style to be created in the input dialogue. Then the new style is
added to the predefined styles and is automatically selected for the current VI panel. The created style
is not set automatically in other VI panels of the project.
If a user-defined style is selected for the current VI panel, the Style → Edit Style option of the context
sensitive menu of the panel may be selected to open the dialogue of the new panel style. Figure 17.5.27
shows the dialogue for editing the layout of the panel.
With the settings shown in Figure 17.5.27, 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 9.7.3: Graphic Options)
• the line width of the title block and of the page frame
There is the possibility to define the x- and y-axis of the plots inside on one page. These settings then
are valid every plot on panels using this style.
To change the styles, right-click on a virtual instrument on the panel and select the option Style → Edit
Style in the context menu. Then a dialogue will pop up containing the settings for
Double-click on the object which is to be changed. As shown in figures 17.5.28, the dialogue of the
selected axis will be opened and can then be modified.
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.
Defining Styles for Single Plots In addition to the axes the presentation of the plot itself can be
chosen by the user. These settings can be accessed through the dialogue shown in 17.5.29 and then
double-clicking on the settings of the VisPlot object.
Another and simpler way to change the settings of the style is to directly select the option Style → Edit
Style of clicked Element from the context sensitive menu. These are the same dialogues shown in
Figure 17.5.29 and can directly be accessed by right-clicking on the
Figure 17.5.29 shows all different settings available for the plots on a VI panel. Thus one can
Grid Options to alter the width, line style and colour 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.
If the settings of the x- and y-axis, of the plot itself as well as the size of a particular plot shall be saved
and then reused for further plots, there is the option Style → Save as predefined VI from the context
menu of every plot or VI.
This option saves the setting of the plot and stores a new VI in the list of all VIs. Hence if adding a plot
the newly created VI can now be selected from the list by pressing the icon and selecting the e.g.
NewName(VisPlot) from the pull down list or by using the option Create VI → . . . from the context menu
of theSetVipage to add new virtual instruments to the VI panel. The new empty subplots appear with
new defined settings.
Data Management
18.1 Introduction
The basic elements of project management within the PowerFactory environment were introduced in
chapter 4 (PowerFactory Overview). They allow the user to generate network designs and administer
all input information and settings related to PowerFactory calculations and analyses. The project itself
is much more than a simple folder which stores all objects which comprise a power system model; it
allows the user to do advanced management tasks such as: versioning, deriving, comparing, merging
and sharing. These advanced features simplify data management in multi-user environments.
The following sections explain each of the data management functions in more detail:
• Project Versions;
• Derived Projects;
• Comparing and Merging Projects;
• How to update a Project; and
• Sharing Projects
The section explains the PowerFactory concept of a version. The section first explains what a version
is and when it can be used. Next the procedure for creating a version is explained. Specific procedures
related to versions such as rolling back to a version, checking if a version is the basis for a derived
project and deleting a version are then explained.
A Version is a snapshot of a project taken at a certain point in time. Using versions, the historic
development of a project can be controlled. Also, the previous state of a project can be recovered by
rolling back a version. From the PowerFactory database point of view, a version is a read-only copy of
the original project (at the moment of version creation), which is stored inside a Version (IntVersion, ).
Versions are stored inside the original project in a special folder called Versions.
The concept of versions is illustrated in Figure 18.2.1. At time 𝑡0, the project ’SIN’ is created. After a
time, 𝑡1, when the owner has made several changes they decide to make a copy of the project in its
current state by creating the version ’V1’. After more time, 𝑡2, and after more changes with respect to
’V1’, another version ’V2’ is created by the owner. The version control can continue with time like this,
with versions accumulating with a periodicity of 𝑡.
After versions are created, the owner can revert the project to the state of the version by using the
Rollback function. This destroys all modifications implemented after a version was created (including
all versions created after the rolled-back version.
This sub-section describes the procedure for creating a version. To create a version of the active project
follow these steps:
2. Select New → Version from the context-sensitive menu. Alternatively, use the option File → New
Version from the main PowerFactory menu. The dialog for the new version appears as shown in
Figure 18.2.1.
3. Set the desired options (explained in the next section) and press OK. PowerFactory automatically
creates and stores the version in the Versions folder (which is automatically created if it does not
yet exist).
Point in Time By default this is set to the system clock time when the version was created.
However, it is also possible to enter an earlier time (back to the beginning of retention period of
the project).
Note: Setting a Point in Time earlier than the clock time means that the version is created considering
the state of the project at the time entered. This can be used for example, to revert the project to
a previous state, even though other versions have not yet been created.
Notify users of derived projects If this option is enabled, when a user of a project that is derived
from the active project activates their derived project, they are informed that the new version is
available. Thereafter, updates of the derived project can be made (for further information about
derived projects refer to section 18.3).
Complete project approval for versioning required If this option is enabled, PowerFactory
checks if all the objects in the active project are approved. If Not Approved objects are found, an
error message is printed and the version is not created.
Note: The Approval Status is found on the Description page in the dialog of most grid and library
objects.
This sub-section describes the use of the Rollback function to revert a project to the state of a version
of that project. For example, consider a project called ’V0’, created at a point in time, 𝑡. If a Rollback to
’V0’ is completed, the project returns to its state at the creation of ’V0’. After the Rollback, all changes
implemented after ’V0’ (i.e. after V0’s point in time) are deleted. Also, all versions newer than ’V0’ are
removed. This concept is illustrated in Figure 18.2.3.
To complete a rollback
Note that a Rollback is not allowed (and therefore not enabled in the context-sensitive menu) if a newer
version of the project exists and this version is the base of a derived project. A rollback cannot be
undone!
Note: A version can only be deleted if it does not have derived projects.
The following steps should be followed to check if a version is the base for a derived project:
3. Right-click on the Version that should be checked. This should be done via the right window pane
in the Data Manager, not the main Data Manager tree.
4. Select the option Output... → Derived Projects.
5. A list of derived projects will be shown in PowerFactory ’s output window.
To delete a version:
This section explains the concept of a derived project. For background information regarding the use
of derived projects, see sub-section 18.3.1. In addition, sub-section 18.3.2 describes the procedure for
creating a derived project.
As is often the case, several users might wish to work on the same project. To avoid large amounts of
data duplication that would be required to create a project copy for each user, DIgSILENT has developed
a virtual copy approach called derived projects. From the user’s point of view, a derived project is like
a normal copy of a project version. However, only the differences between the original project version
(the base project) and the virtual copy (the derived project) are stored in the database. Because the
derived project is based on a version, changes made to the base project do not affect it. Like ’normal’
projects, derived projects can be controlled over time by the use of versions, but these derived versions
cannot be used to create further derived projects.
Note: A derived project is a local ’virtual copy’ of a version of a base project (master project):
- It behaves like a “real copy” from the user’s point of view.
- Internally, only the data differences between the base project and the derived project are stored
in the database.
- This approach reduces the data overhead.
In a multi-user database, the data administrator might publish a base project in a public area of the
database. Every user can subsequently create their own derived project and use as if it is the original
base project. Changes made by individual users are stored in their respective derived projects, so that
the base project remains the same for all users.
In a single-user database, the data administrator must export the base project. The user of the derived
project must always have this project imported. However, different users of the same base project can
exchange their derived project. Therefore the derived project should not be exported with option Export
derived project as regular project enabled. See section 8.1.5 for further details.
The purpose of a derived project is that all users work with an identical power system model. The
derived project always remains connected to the base project.
The concept of derived projects is illustrated in Figure 18.3.1; here version ’Version3’ of the base project
(’MasterProject’) was used to create ’DerivedProject’. After ’DerivedProject’ was created, two versions
of it were created.
At any stage, the data administrator might create a version of a base project which has derived projects
from other versions of the base project. The user might wish to update their derived project with one of
these new versions. Alternatively, the data administrator might like to incorporate changes made in a
derived project to the base project. All of these features are possible, by using the Compare and Merge
Tool, explained in section 18.4.
In the Data Manager, a derived project looks like a normal project. The Derived Project page of its
dialog has a reference where the user can see the base project and the version used to derive the
project.
Users are notified of changes in the base project if: there is a new version of the base project (newer
than the currently-used version) which has the option Notify users of derived projects enabled (the
user/administrator enables this option when creating a new version), and the option Disable notification
at activation disabled (found on the Derived Project page of the project dialog).
The user may update a derived project when they next activate it, provided that the conditions stated
above are met. The newest version that can be used to update a derived project is referred to (if
available) in the Most recent Version field of the dialog. Users can compare this new version with their
own derived project and decide which changes to include in the derived project. For comparing and
accepting or refusing individual changes, the Compare and Merge Tool is used. For information about
the Compare and Merge Tool refer to section 18.4.
Figure 18.3.4: Merging the new version of the base project into derived projects
1. Right-click on the desired folder in the right pane of the Data Manager where the derived project
is to be created.
2. Select New → Derived Project from the context-sensitive menu.
3. Select the source version of the base project using the data browser that appears. This will likely
be the last available version of a project in a public area, created by the data administrator.
4. Press OK.
Note: - The base or master project has to have at least one version before other projects can be derived
from it.
- A project cannot be derived from a derived project.
- Whether a project is derived or not can be checked on the Derived Project page of the project
dialog.
- To create a derived project from a base project stored in another user’s account, read access is
required. See section 18.6 for further details.
The derived project can be exported as a “Regular Project” or with the base project. This option can be
selected from the Export dialog.
This section describes the procedure for comparing and merging projects within the PowerFactory
database. There are many circumstances whereby it may be desirable and/or necessary to merge
data from multiple projects. For example, when the data administrator updates a master project that is
the base project for a derived project that a user is working with. The Compare and Merge Tool (CMT)
can be used to update the user’s project with the data changes, yet also allows the user control over
which changes are implemented.
This section is separated into six sub-sections. Firstly, the background of the CMT is presented. The fol-
lowing sub-section explains the procedure needed for merging together or comparing two projects. Sub-
section 18.4.3 explains the procedure for merging or comparing three projects. In sub-section 18.4.4,
the advanced options of the CMT are explained. The CMT uses a diff browser for showing the
differences and conflicts between compared projects and also for allowing data assignments. This
is explained in sub-section 18.4.5.
When working collaboratively in a multi-user environment, a data administrator might often need to
update the master project to create a version based on updates completed by one or more users to
projects derived from the master project. The Compare and Merge Tool (CMT) is used for this purpose.
This tool can be used for project comparison in addition to the merging of project data. It is capable of
a two-way comparison between two projects and also a three-way comparison for three projects.
Internally, PowerFactory refers to each of the compared projects according to the following nomencla-
ture:
The CMT compares the chosen projects and generates an interactive window known as the CMT diff
browser to show the differences. For a two-way merge, the changes found in the <1st> project can be
implemented in the <Base>, provided that the user selects <1st> as the source (<Base> is by default
the target). When merging three projects together, the target is either the <1st> or <2nd> project.
18.4.2 How to Merge or Compare Two Projects Using the Compare and Merge
Tool
This section describes the procedure for merging together or comparing two projects using the Compare
and Merge Tool (CMT). Note that the comparison is completed using a similar procedure but with slight
differences that will also be explained here.
1. In the Data Manager, right-click on an inactive project and choose Select as Base to Compare.
2. Right-click on a second (inactive) project and select Compare to [Name of Base Project]. The
CMT options dialog will appear as shown in Figure 18.4.1. The <Base> and the <1st> project
are listed in the Compare section of the dialog.
3. Optional: If a third project should be included in the comparison, the box next to <2nd> must be
checked. The third project can then be selected with a data browser by using the icon. See
section 18.4.3 for a more detailed explanation of the 3-way comparison.
4. Optional: If the base and compare projects should be swapped around, press the button. Taking
the example shown in Figure 18.4.1, this would be hte case if Project A should be the <1st>
project and Project B should be the <Base>.
5. Select one of the options Compare only, Manually or Automatically. The differences between
these three choices are:
• Compare only : If the two projects should only be compared and no merge is desired, then
select Compare only. This disables the merge functionality and only the differences between
the two projects will be shown.
• Manually : When this option is selected, the user will be asked to make assignments (i.e.
to choose the source project data for common objects that are merged together). For this
option, the target project can also be selected. Selecting <Base> will merge changes into
the <Base> project, whereas selecting <1st> will instead merge changes into the <1st>
comparison project.
• Automatically : When this option is selected, PowerFactory will attempt to automatically merge
the two projects together, by automatically making data assignments. In a two-way compar-
ison, merging will be automatically into the base project (the base is automatically assumed
to be the ’target’ for the merging procedure). Note that if conflicts are detected during an
automatic merge, the CMT will automatically switch to manual mode.
6. Press Execute to run the compare or merge. The CMT diff browser will appear (unless an
automatic merge was selected and no conflicts were identified by PowerFactory ). Interpreting
and using the diff browser is described in section 18.4.5.
Note: It is possible to assign user-defined names to each of the compared projects. This makes it
easier to recognise which project is being referred to by the CMT later on in the diff browser (see
section 18.4.5). For example, the user might wish to name two compared projects ’Master’ and
’User’, respectively. User-defined names can be implemented by typing the desired name in the
as ... field in the CMT options dialog shown in Figure 18.4.1. These user-defined names are
limited to a maximum of 10 characters.
18.4.3 How to Merge or Compare Three Projects Using the Compare and Merge
Tool
This section describes the procedure for merging or comparing three projects using the Compare and
Merge Tool (CMT). The comparison procedure is completed using a similar method to that used for a
two-way merge or compare, but with minor differences that will be explained here.
1. In the Data Manager, right-click an inactive project and choose Select as Base to Compare.
2. In the window on the right of the Data Manager, hold the CTRL key to multi-select a second and
third inactive project.
3. Right-click the multi-selection and select the option Compare to “<project>”. The CMT options
dialog will appear as shown in Figure 18.4.2. The <Base>, the <1st> and the <2nd> project are
listed in the Compare section of the dialog.
Figure 18.4.2: Compare and Merge Tool options dialog for a three-way merge
4. Select one of the options Compare only, Manually or Automatically. The differences between
these three choices are:
• Compare only : If only two projects should be compared and no merge is required, then select
the radio button Compare only. This disables the merge functionality and only the differences
between the two projects will be shown.
• Manually : When this option is selected, the user will be asked to make assignments (to
choose the source project data for common objects that are merged together). Using this
option, the target project can also be selected. For a three-way merge, merging cannot
be done into the <Base>, meaning that either the <1st> or the <2nd> project must be
selected.
• Automatically : When this option is selected, PowerFactory will attempt to merge the three
projects together, via automatic data assignments. As for the option Manually, the target
can be either the <1st> or <2nd> project. Note that if ’conflicts’ are detected during an
automatic merge, the CMT will automatically switch to manual mode.
5. If using options Manually or Automatically, the assignment priority must also be selected, by
choosing an option from the Assign drop-down menu. This defines the default assignment in
the CMT diff browser (or automatic merge) when PowerFactory identifies conflicts. For example,
say the CMT identifies that the load ’L1’ has an active power of 10 MW in <Base>, 12 MW in
<1st> and 13 MW in <2nd>. By choosing the option Automatically and favour 1st, the default
assignment for ’L1’ would be <1st>, and a power of 12 MW would be assigned to this load in the
target project (provided that the user did not manually alter the assignment).
6. Press Execute to run the compare or merge. The CMT diff browser will appear (unless an
automatic merge was selected and no conflicts were identified by PowerFactory ). Using the diff
browser is described in section 18.4.5.
Note: It is possible to assign user-defined names to each of the compared projects. This makes it
easier to recognise which project is being referred to by the CMT later on in the diff browser (see
section 18.4.5). For example, the user might wish to name two compared projects ’Master’ and
’User’, respectively. User-defined names can be implemented by typing the desired name in the
as ... field in the CMT options dialog shown in Figure 18.4.1. These user-defined names are
limited to a maximum of 10 characters.
The Advanced Options page of the CMT shown is shown Figure 18.4.3.
After the CMT options have been set, press the Execute button to start the CMT comparison. The
comparison and assignment results are then presented in a data browser window (the CMT diff browser
window shown in Figure 18.4.4). The diff browser is divided into three parts:
Figure 18.4.4: Compare and Merge Tool diff browser after a three-way merge
Output Window
The output window displays reports from the context-sensitive (right-click) menu, and other error infor-
mation.
In the CMT Comparison and Assignment Window, a list of the compared objects is shown. The
window appears slightly different depending on whether a two-way merge, a three-way merge or a
comparison has been performed. For instance, after a comparison, the Assigned from and Assignment
Conflict columns are not shown. After a two-way merge, the columns with the project names will show
<Base> and <1st> (or user-defined names), whereas after a three-way merge they will show <1st>
and <2nd>. A comparison result symbol, indicating the differences found for each object from the list,
is displayed in the columns <Base> and <1st> after a two-way merge and in columns <1st> and
<2nd> after a three-way merge. The possible combinations of these symbols are shown and explained
in Tables 18.4.1 and 18.4.2.
For a project merge (i.e. the Merge option was enabled in the command dialog), the Assigned from
must define the source project of the changes to implement in the target project. All listed objects must
have an Assignment. If a certain change should not be implemented in the target; then the ’target’
project must be selected as the source.
Special attention should be paid to all results indicated by the ’conflict’ symbol . This symbol shows
that the objects are different in both compared projects or that another error has occurred. In the case
of conflicts, the user must always indicate the source project for the data.
In a two-way merge, the only available sources for assignment are the <Base> (which is also the
target) and <1st>. In a three-way merge, the possible sources are <Base>, <1st> and <2nd>. The
assignment can be made manually by double-clicking on the corresponding cell in the Assigned from
column and selecting the desired source, or double-clicking the <Base>, <1st> or <2nd> cell that
the user wishes to assign. However, this task can be tedious in large projects where there are many
differences. To rapidly assign many objects, the objects can be multi-selected and then Assign from ...
or Assign with Children from ... can be selected from the context-sensitive (right-click) menu.
Following the assignment of all the objects, the projects can be merged by pressing the Merge button.
The changes are then automatically implemented in the target project.
Note: The Comparison and Assignment window always shows the selected object in the Data Tree
The window on the left side of Figure 18.4.4 shows the Data Tree, which is similar in appearance to
PowerFactory ’s Data Manager tree. This window shows the compared objects in a normal project
tree structure. At each level of the tree, there is an indication on the right showing the status of the
comparison of the contained objects (and the object itself). The legend for the comparison indication is
shown in Table 18.4.3.
Icon/Text Meaning
Assignments/comparison is okay
Conflicts exist
Mixed/<Base>/<1st>/<2nd> The text indicates the assignments
within by indicating the assigned
project. If assignments within are from
multiple different sources, then ’Mixed’
will be shown.
Assignments missing
Bold red font Three-way merge - information will be
lost during the merge
Two-way merge - information could be
lost during the merge
As previously mentioned, the objects displayed in the CMT window can be sorted and organised by the
toolbar as shown in Figure 18.4.5. The buttons available are explained in this section.
Modifications to be shown The Modifications to be shown drop-down menu allows the results
in the comparison windows to be filtered according to their comparison status. Possible filter
options for a three-way comparison are:
• All objects
• All modifications (default)
• All modifications in <1st> (show all modifications, additions and deletions in the <1st> project)
• All modifications in <2nd> (show all modifications, additions and deletions in the <2nd> project)
• All modifications in both (show only those objects which exist in both projects and have been
modified in both projects)
• All modifications in both but different (show only those objects which exist in both projects and
have been modified in both projects to different values)
• Added in <1st> (show only objects added to the <1st> project)
• Modified in <1st> (show only objects modified in the <1st> project)
• Deleted in <1st> (show only objects deleted from the <1st> project)
• Added in <2nd> (show only objects added to the <2nd> project)
• All objects
• All modifications
• Added in <1st>
• Modified in <1st>
• Deleted in <1st>
Show all objects inside chosen object This button will list all compared objects and also
all contained objects (at every level of the tree).
Show graphical elements Pressing this button will prevent graphical differences from ap-
pearing in the Comparison window. Because graphical changes often occur, and are usually
trivial (i.e. a slight adjustment to the x-axis position of an object), this button is extremely useful
for organising the data.
Detail mode and Detail mode class select The functionality of these two buttons is
identical to their function in the Data Manager.
Show only not assigned Filters the display to show only objects not yet assigned. This filter
is only available when the merge option is used. By default all assigned and unassigned objects
are displayed.
Show only Objects with assignment conflicts Only objects with assignment conflicts are
displayed. This filter is only available when the merge option is used. By default objects with and
without assignment conflicts are displayed.
Group dependent objects If this option is enabled, dependent objects are listed indented
underneath each listed comparison object. A dependent object is defined as an object that is
referenced by another object. For example, a line type (TypLne) is a dependent object of a line
element (ElmLne), as are the cubicles that connect the line element to a terminal. If the objects
are grouped and not filtered otherwise, every object has to be listed at least once but can be
listed several times as a dependency. Non-primary objects (such as graphical elements) are only
listed separately if they are not listed as a dependency for another object.
Dependent objects are not filtered. By default, the grouping of dependent objects is not displayed
because this type of display can quickly expand to become unusable (because in a typical project
there are many dependencies).
Output Modification Details This prints a report to the output window showing the details of the
differences for the selected objects. The format of the report is an ASCII table with the modified
parameters as rows and the parameter values in each compared project as columns. The date
and time of the last modification along with the database user who made the last change are
always shown in the first two rows.
Output Non-OPD Modification Details This option is similar to the Output Modification Details
option, but it only shows the modifications that are not classed as Operational Data.
Align Manually This option allows the compared objects to be realigned across the compared
projects. What this means is that disparate objects can instead be compared directly. This could
be useful for example when two different users have added an object to their derived projects but
each has given it a slightly different name, even though the objects are representing the same
’real world’ object. The CMT would see these objects as different objects by default. In this case,
the data administrator might wish to tell PowerFactory that these two different objects are the
same object. This can be achieved using the Align Manually function.
Ignore Missing References For every compared object, missing references can be optionally
ignored. The assignment check will then not check the references of the object. Missing refer-
ences can also be considered again by using the Consider Missing References option. By default
missing references are not ignored.
Set Marker in Tree A right-click in the Data Tree window allows the user to set a marker within
the Data Tree. This has the functionality similar to a bookmark and the user can return to this
point in the Data Tree at any time by using the Jump to Marker ”...” in Tree. Note that it is only
possible to set one marker at a time; setting a new marker will automatically overwrite the last
marker.
The various diff window buttons (as highlighted in Figure 18.4.6) will now be explained.
Figure 18.4.6: Compare and Merge Tool ’Diff window’ with buttons highlighted
Check This button checks that all assignments are okay. The following conflicts are checked for
all compared objects:
• Missing assignment;
• Missing parent (parent object of an assigned object will not exist in the target after merge.)
• Missing reference (referenced object of an assigned object will not exist in the target after merge.)
All conflicts are printed as errors to the output window of the CMT. Conflicts are listed in groups
and with the icon in the Data Tree and in the Comparison and Assignment window.
Recompare After a realignment, it is necessary to run the CMT again using this button to update
the comparison results.
Merge The merge procedure updates the target by copying objects or parameters or by deleting
objects according to the assignments. Before the merge procedure is started, an assignment
check is done. The merge procedure is cancelled if the check detects conflicts. If no conflicts
are detected, the diff browser is closed and then the merge procedure is started. After the merge
procedure is complete, all data collected by the CMT is discarded.
Info The Info dialog called by the Info button shows more information about the comparison:
There are two common procedures that users and data administrators need to complete when working
with master projects and other user projects that are derived from versions of this master project:
This section explains these two procedures and also provides tips for working with the CMT.
When a derived project is activated after a new version of the Base project has been created (provided
that the flag Notify users of derived projects was checked when the version was created and that the
derived project option Disable notification at activation is unchecked), then the user will be presented
with the dialog shown in Figure 18.5.1.
• PowerFactory automatically generates a temporary copy derived from the new version. It then
executes a 3-way comparison with the base version of the user’s project (as the base), the derived
project (as <1st>) and the temporary copy (as <2nd> and target). In the case of a conflict, one
of the following actions will be taken:
• favor none: The CMT diff browser is displayed, and the user can then resolve the conflict(s) by
defining how the changes should be assigned.
• favor derived project: Conflicts are resolved automatically by favouring the user’s modifications,
thereby discarding modifications in the base.
• favor new version: Conflicts are resolved automatically by favouring the base’s modifications,
thereby discarding the user’s modifications.
Get new version and discard modifications in derived project The derived project is auto-
matically replaced by the new version. All user modifications will be lost.
Merge manually Use the CMT to merge the modifications manually. The results of the compar-
ison are displayed in a CMT diff browser, where the user defines how the changes should be
assigned. After these assignments have been defined, the new version and the derived project
are merged to the temporary copy, when the user clicks on the Merge button. The derived project
is then automatically replaced by the temporary copy (now containing information from the new
version), which is deleted.
Notify me again in... The user enters the desired time for re-notification, and the derived project
is activated according to how it was left in the previous session. The notification is deactivated
for the indicated number of days.
Note: In a multi-user environment, updated versions of the base project can be released regularly and
the user will often be presented with the new version notification in Figure 18.5.1. In many cases,
the user will not want to apply the updated version because they will be in the middle of a project
or other calculation and may not want to risk corrupting or changing their results. Therefore, the
option Notify me again in... is the recommended choice because it will leave the user’s project
unchanged.
If the Cancel button is used, the project is activated as it was left in the previous session. The notification
will appear following the next activation.
An alternative way to manually initiate the above procedure is to right-click on the derived project and
select the option Merge from base project. This feature is only possible with deactivated projects.
Changes implemented in derived projects can also be merged to the base project. In this case, the
option Merge to base project must be selected from the context-sensitive menu available by right-
clicking on the derived project. As in previous cases, the CMT is started and conflicts can be manually
resolved using the diff browser.
18.5.3 Tips for Working with the Compare and Merge Tool
One of the most common uses of the CMT is for merging changes made by users to their derived
projects back into the master project to create an updated version for all users. This kind of task is often
performed by the data administrator. For this task it can help to follow the steps outlined below:
1. Check the user’s modifications with a 2-way merge (derived vs. base; What changes were made?
Are all changes intended? Modifications which were made by mistake should be corrected in the
user’s derived model before continuing with the merge procedure.). The check of the modifications
should be done by the user and the data administrator.
2. The data administrator creates a new derived project based on the most recent version of the
’master’ model.
3. A three-way merge is performed, selecting the version on which the user’s derived project is based
on as ’base’, the derived project created in the previous step as <1st> and the user’s derived
project as <2nd>. The changes are merged into <1st> (target).
4. The resulting model is then validated. Conflicts which could not be resolved automatically by the
CMT are corrected manually.
5. The validated model (derived project in data administrator account) is merged to the base model
by using the context-sensitive menu entry Merge to Base Project. This will not cause problems if
the master model has not been changed since deriving the model in step 2.
6. A new version is created by the data administrator and the users are informed.
Note: The Compare and Merge Tool can be used to compare any kind of object within a PowerFactory
project. The functionality and procedure to follow is similar to that explained in this section for
project comparison and merging.
In PowerFactory , any project can be shared with other users according to the rules defined by its owner.
Projects are shared with groups of users and not directly with individuals. Therefore, users must be part
of a group (created and managed by the data administrator) in order to access shared projects.
Depending on the access level that the owner assigns to a group, other users can get:
• Read-only access to the shared project, which allows the copying of objects and the creation of
derived projects from versions within the shared project;
• Read-write access, which allows users full control over all objects within the project.
• Full access, which allows the user to modify the sharing properties and create versions.
To share a project:
1. Open the project dialog by right-clicking on the project name and selecting the option Edit.
2. Select the Sharing page;
3. Right-click within the Groups or Sharing access level columns on the right side of the Sharing
information table to insert (or append) a row(s);
4. Double-click in the Groups cell of the new line and select the group with whom the project is
shared using the data browser;
5. Double-click on the Sharing access level to select the desired access level.
A shared project is marked with the symbol in the Data Manager. To display all the available users
on the Data Manager, click on the Show All Users icon ( ). Only the shared projects of the other users
will be displayed.
For information regarding user groups and the data administrator, refer to chapter 6 (User Accounts and
User Groups).
An archiving function for decreasing the used database storage space and increasing performance of
large multi-user databases is available. Older projects that are currently not used, but which are still
important for possible future use can be archived.
Archiving describes the process of automatically exporting and deleting projects from the database and
storing them in a restorable way in the file system. The actual workload is shifted to the housekeeping
job which can be run overnight, where export and delete operations do not interfere with the users.
Archiving can either be done by the user selecting a project for archiving, or by using DPL scripts.
In multi-user database environments, the user can easily send projects to the archive folder via the
context-sensitive (right-click) menu for each project, and selecting “Archive”. The archived projects
are exported from the database and are placed in a separate folder (“Archived Projects”) for long-term
storage. The user thereby increases system performance and the speed of general database operations
(e.g. project loading/closing). All information regarding the initial project location is also saved allowing
the user to restore projects to the exact location from which they originated.
Projects can be restored into the active database by executing the “Restore” command in the context-
sensitive (right-click) menu of each project.
For more information on this topic, see chapter 5 Program Administration, section 5.5: Housekeeping.
Scripting
In this chapter two programming languages for scripting in PowerFactory will be presented. First part
contains description of the DIgSILENT Programming Language DPL (section 19.1) - build in program-
ming language and the second part (section 19.2) introduces the open source programming language
Python.
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:
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 optimising
• Cable-sizing
• Protection coordination
• Stability analysis
• Parametric sweep analysis
• Contingency analysis
• etc.
Such new calculation functions are written as program scripts which may use
The DPL command 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 single 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 inside 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 settings, parameters or results
directly in the database objects. There is nearly no object inside 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 output 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.
The DPL command ComDpl holds a reference to a remote DPL command when it is not a root
command. The example depicted in Figure 19.1.2 is apparently a referring command, since its “DPL
script” reference is set to the remote command ∖ Library∖ DPL Commands∖ CheckVLoading.
• 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 .
The DPL command holds a reference to a selection of objects (General Selection). At first this general
selection is empty, but there are several ways to define a special set of object used in the DPL command.
• 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 automatically 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 command 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 subroutines, may use and
change the values of the interface variables of these DPL subroutines.
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 external object. Performing the same command
for another busbar would then only require setting the external object to the other busbar.
On the Advanced Options page a Remote script can be selected, which is then used by this script
instead of a local defined script on the next page Script. This is a so called “referring 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.
The most important part of a DPL root command is of course the actual DPL program script. That script
is written on the Script page of a DPL root command dialogue, if no Remote script is selected.
On this page the DPL code of a already defined script is shown and/or new command lines can be
inserted for modifying this script or writing a new script. The available commands and the DPL language
are described in the following sections.
The edited program code also features a highlighting specially suited for handling DPL scripts.
There is also an own editor available for conveniently writing a DPL script. To activate this editor press
the icon on the bottom side of the Script page of a DPL command dialogue.
Now a new window will be opened in PowerFactory. Here the script can be written in a very convenient
way similar to the programming language C++. The highlighting will be activated automatically.
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 synchronised each time the script is saved or
edited in the dialogue. If this Disconnect icon is pressed, the scripts will not be synchronised
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 synchronised with the main dialogue.
One can also jump to the main graphics board by selecting the option Window → Graphic. . . from the
main menu.
The DPL script language uses a syntax quite similar to the C++ programming language. This type of
language is intuitive, easy to read, and easy to learn. The basic command set has been kept as small
as possible.
• variable definitions
• assignments and expressions
• program flow instructions
• method calls
The statements in a DPL script are separated by semicolons. Statements are grouped together by
braces. Example:
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:
DPL uses constant parameters which cannot be changed. It is therefore not accepted to assign a value
to these variables. Doing so will lead to an error message.
Besides these global constants, all internal and external objects are constant too.
variable = expression
variable += expression
variable -= expression
The add-assignment “+=” adds the right side value to the variable and the subtract-assignment “-=”
subtracts the right-side value.
Examples:
• Arithmetic operators: +, -, * , /
• Standard functions ( all trigonometric functions based on radians (RAD))
• 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
Examples:
if (a<3) {
b = a* 2;
}
else {
b = a/2;
}
while (sin(a)>=b* c) {
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();
}
The loop statements “do-while” and “while-do” may contain “break” and “continue” commands. The
“break” and “continue” commands may not appear outside a loop statement.
The “break” command terminates the smallest enclosing “do-while” or “while-do” statement. The exe-
cution of the DPL script will continue with the first command following the loop statement.
The “continue” command skips the execution of the following statements in the smallest enclosing “do-
while” or “while-do” statement. The execution of the DPL script is continued with the evaluation of the
boolean expression of the loop statement. The loop statement list will be executed again when the
expression evaluates to TRUE. Otherwise the loop statement is ended and the execution will continue
with the first command following the loop statement.
Example:
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
}
O2 = S2.Next();
}
if (AllOk) {
DoReport(2); ! report
}
O1 = S1.Next();}
input(var, string);
The input command will pop up a window with the string and an input line on which the user may enter
a value. The value will be assigned to the variable “var”.
output(string);
The string may contain “=-” signs, followed by a variable name. The variable name will then be replaced
by the variable’s value.
Example:
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.
With the syntax for the parameter definitions, program flow and the input and output, it is already
possible to create a small program. However, such a script would not be able to use or manipulate
variables of “external” objects. It would not be possible, for instance, 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 parameters 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.
If a database object is known to the DPL command, then all its methods may be called, and all its
variables are available. For example, if we want to change a load-flow command in order to force an
asymmetrical load-flow calculation, we may alter the parameter “iopt_net”. This is done by using an
assignment:
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
This examples is very primitive but it shows the basic methods for accessing database objects and their
parameters.
Locally stored objects (also called “internal objects”) can be accessed directly. They are known in the
DPL script under their own name, which therefore must be a valid DPL variable name. It will not be
possible to access an internal object which name is “My Load-flow\∼{}1* ”, for instance.
Internal objects may also be references to objects which are stored elsewhere. The DPL command
does not distinguish between internal objects and internal references to objects. An example is shown in
Figure 19.1.4, where a DPL script is shown on the left which has a load-flow command and a reference
to a line in its contents folder on the right.
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”.
Accessing database objects by storing them or a reference to them in the DPL command would create
a problem if many objects have to be accessed, for instance if the line with the highest loading is to be
found. It would be impractical to create a reference to each and every line.
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 “object” 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 selection. 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()”.
The DPL contents make it possible to access external object in the DPL script. The special general
selection object (“SEL”) is used to give all DPL functions and their subroutines access to a central
selection of objects. i.e. the DPL Command Set.
Although flexible, this method would create problems if more than one specific object should be ac-
cessed in the script. By creating references to those objects in the DPL command 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.
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 Figure 19.1.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;
To understand the DPL philosophy and the resulting hierarchical structure of DPL scripts, the following
is important to understand:
• A DPL command either executes its own script or the script of another, remote, DPL command.
In the first case, the DPL command is called a “root command” and the script is called a “local
script”. In the second case, the DPL command is called a “referring” command and the script
is called a “remote script”.
• A root command may define interface variables that are accessible from outside the script and
• 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 different projects and study cases.
The easiest way to develop a new DPL command is to create a new ComDpl in the currently 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 currently active
study case. However, it cannot be executed when another study case is active. 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.
• 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.
• “Generalise” 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.
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.
A DPL command may be included in the contents of another DPL command. In that case, the included
DPL “subroutine” may be called in the script of the enclosing DPL command. In principle, this is not
different from calling, for example, a load-flow command from a DPL script.
As with most other commands, the DPL command only has one method:
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 illustrates this.
Suppose we have a DPL sub-command “Sub1” with the interface section as depicted in Figure 19.1.6.
The DPL syntax is very small because it mainly serves the purpose of basic operations like simple
calculations, if-then-else selections, do-while loops, etc..
The strength of the DPL language is the possibility to call functions and to create subroutines. A function
which can be called by a DPL command is called a “method”. Four types of methods are distinguished:
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 Appendix E DPL Reference for a description of these functions including implementation
examples.
19.2 Python
This section describes the integration of the Python scripting language in PowerFactory and explains the
procedure for developing Python scripts. The Python scripting language can be used in PowerFactory
for:
• Automation of tasks
• Creation of user-defined calculation commands
• Integration of PowerFactory into other applications
The integration of Python into PowerFactory makes the above-mentioned features accessible to users
of PowerFactory .
2. Python file .py that contains code of the script has to be created by external editor. After being
created .py file can be link to the ComPython object inside of PowerFactory. (Subsection 19.2.3)
3. In each .py file PowerFactory -Python module ’powerfactory.pyd’ has to be imported. (Subsection
19.2.2)
4. To run the script the User has to execute the (ComPython) object. (Subsection 19.2.3.2)
By default, no Python interpreter is installed with PowerFactory. A separate installation of the Python
interpreter is therefore required. The recommended Python versions are available in the PowerFactory
installation directory (e.g. C:\Program Files\DIgSILENT\PowerFactory 15.2\python). PowerFactory sup-
ports CPython 3.3 and 3.4. By default PowerFactory uses Python 3.4, but 3.3 can be selected via the
PowerFactory Configuration (see Figure 19.2.2).
The PowerFactory architecture (32- or 64-bit) determines the Python interpreter as shown below:
To check which PowerFactory architecture is installed, press Alt-H to open the Help menu and select
About PowerFactory. . . . If the name of PowerFactory includes “(x86)”, then a 32-bit version is installed;
if the name of PowerFactory instead includes “(x64)”, then a 64-bit version is installed. To avoid issues
with third-party software, the Python interpreter should be installed with default settings (for all users),
into the directory proposed by the installer.
Depending on the functions to be performed by a particular Python script, it may be necessary to install
a corresponding Python add-on/package. For example, Microsoft Excel can be used by Python scripts if
the “Python for Windows Extensions” PyWin32 (http://sourceforge.net/projects/pywin32/)
package is installed, which includes Win32 API, COM support and Pythonwin extensions.
The functionality of PowerFactory is provided in Python through a dynamic Python module (“power-
factory.pyd”) which interfaces with the PowerFactory API (Application Programming Interface). This
provides Python scripts with access to a comprehensive range of data in PowerFactory :
• All objects
• All attributes (element data, type data, results)
• All commands (load flow calculation, etc.)
• Most special built-in functions (DPL functions)
A Python script which imports this dynamic module can be executed from within PowerFactory through
the new Python command ComPython (see Section 19.2.3), or externally (PowerFactory is started by
the Python module in engine mode) (see Section 19.2.4).
To allow access to the Python PowerFactory module it must be imported using the following Python
command:
import powerfactory
To gain access to the PowerFactory environment the following command must be added:
app = powerfactory.GetApplication()
A Python object of class powerfactory.Application is called an application object. Using the applica-
tion object from the command above(“app”), it is possible to access global PowerFactory functionality.
Several examples are shown below:
user = app.GetCurrentUser()
project = app.GetActiveProject()
script = app.GetCurrentScript()
objects = app.GetCalcRelevantObjects()
lines = app.GetCalcRelevantObjects("*.ElmLne")
sel = app.GetDiagramSelection()
sel = app.GetBrowserSelection()
project = app.CreateProject("MyProject", "MyGrid")
ldf = app.GetFromStudyCase("ComLdf")
The listed methods return a data object (Python object of class powerfactory.DataObject) or a Python
list of data objects. It is possible to access all parameters and methods associated with a data object.
Unlike DPL syntax, Python syntax requires use of the dot (.) operator instead of the colon (:) in order to
access element parameters of objects (i.e. name, out of service flag, etc.). All other object parameters
(calculated, type, measured, . . . ) are to be called using the colon (:), as is done in DPL.
Examples:
project = app.GetActiveProject()
projectName = project.loc_name
project.Deactivate()
or:
lines = app.GetCalcRelevantObjects("*.ElmLne")
line = lines[0]
currLoading = line.GetAttribute("c:loading")
For printing to the PowerFactory output window, the following application object (e.g. “app” object)
methods are provided:
app.PrintPlain("Hello world!")
app.PrintInfo("An info!")
app.PrintWarn("A warning!")
app.PrintError("An error!")
Printing the string representation of data objects to the PowerFactory output window makes them
selectable (i.e. creates a hyperlink string in the output window):
project = app.GetActiveProject()
app.PrintPlain("Active Project: " + str(project))
A list of all parameters and methods associated with an object can be obtained using the dir() function
as shown below:
project = app.GetActiveProject()
app.PrintPlain(dir(project))
A Python Module Reference document is available in the Help menu containing a list of supported
functions.
In contrast to DPL, the Python command only links to a Python script file (as shown in Figure 19.2.1).
It stores only the file path of the script and not the file itself. For optimal operation, the script should be
located in the External Data directory.
The script may be executed by clicking on the Execute button of the corresponding dialog. Editing
the script file is possible by clicking the Open in External Editor button. The preferred editor may
be chosen in the External Applications page of the PowerFactory Configuration dialog by selecting the
Tools → Configuration. . . menu item from the main menu as shown in Figure 19.2.2. Python scripts
may be created in any text editor as long as the script file is saved using the UTF-8 character encoding
format. The Python version (3.3 or 3.4) can be selected in the PowerFactory Configuration dialog (Figure
19.2.2).
On the Basic Options page of the Python command (ComPython), the user can define Input parameters
and External objects, as illustrated in Figure 19.2.3. The Input parameter table in the dialog is used as
in DPL to define variables that can be accessed from outside of the Python script. Input parameters
may be the following data types: double, int and string. All other fields (Name, Value, Unit, Description)
are user definable.
The External object table allows the direct configuration of objects under investigation. An external
object is an object external to the Python command that the user wants to access in the script. By
defining the External object here, the user avoids accessing it via Python methods inside the script
(thereby allowing the script to execute faster).
Important: To call an external object or input parameter in Python, the user has first to call the script
and can then access the object/parameter through ScriptObj.ExternObjName:
script=app.GetCurentScript() #to call the current script
extObj=script.NameOfExternObj #to call the external object
inpPar=script.NameOfInpPram #to call input parameter
The Advanced Options page contains two sections: Remote script and Result parameter, as shown in
Figure 19.2.4. Remote script offers a selection of a remote script, which is used instead of the code
defined on the Script page. A remote script can be advantageous in cases where the user has multiple
Study Cases using the same script code, but different input parameters. If the user was to use a remote
script, then modifying the master script will affect all the Python scripts that refer to it. If the user had
locally-defined scripts, then they would need to change the code in each of them. Result parameters
represents results from the script and they are stored inside the specified result object.
The Python command may also contain objects or references to other objects available in the Power-
Factory database. These can be accessed by clicking on the Contents button. New objects are defined
by first clicking the New Object icon in the toolbar of the Python script contents dialog and then
selecting the required object from the New Object pop-up window. References to other objects are
created by defining a reference object “IntRef”. Figure 20.12.6 shows a Python command and some
example contents.
To create a new Python command click on the New Object ( ) icon in the toolbar of the Data Manager
and select DPL Command and more as shown in Figure 20.12.20. From the Element drop-down list
select ’Python Script (ComPython)’. Then press OK and a new Python command will be created. The
Python command dialog is then displayed as shown in Figure 19.2.3. The name of the script, its input
parameters and the file path to the script, etc, can now be specified. The Python command dialog is
also opened by double-clicking a Python script; by selecting Edit from the context-sensitive menu or by
selecting the script from the list after clicking on the main toolbar icon Execute Script ( ).
A Python command may be executed by clicking the Execute button in the dialog.
– Click the icon Execute Script . A list of existing DPL and Python scripts from the global
and local libraries will appear. Select the specific Python script and click OK.
PowerFactory may be run externally by Python. In order to do this, the script must additionally import
the file path to the dynamic module (“powerfactory.pyd”). The following commands should be included
to obtain access to the PowerFactory environment in engine mode:
# Add powerfactory.pyd path to python path.
# This is an example for 32-bit PowerFactory architecture.
import sys
sys.path.append("C:\\Program Files\\DIgSILENT\\PowerFactory 15.2\\python")
The PowerFactory environment can be accessed directly from the Python shell as shown in Figure 19.2.7
Note: If an error message appears when importing the powerfactory module stating “ DLL load failed:
the specified module could not be found”, this means that Microsoft Visual C++ Redistributable for
Visual Studio 2012 package is not installed on the computer.
To overcome this problem the user should add the PowerFactory installation directory to the os
path variable within his python script.
import os
os.environ["PATH"] = r’C:\Program Files\DIgSILENT\PowerFactory 15.2;’
+ os.environ["PATH"]
As with any other Python script, it is possible to remotely debug scripts written for PowerFactory by using
specialised applications.
19.2.5.1 Prerequisites
The recommended IDE for debugging is Eclipse (www.eclipse.org) with the Python add-on PyDev
(www.pydev.org).
The following is a short description of remote debugging with PyDev. For more information please con-
sult the remote debugger manual of PyDev (http://pydev.org/manual_adv_remote_debugger.
html).
1. Start Eclipse
2. Open Debug perspective
3. Start the remote debugger server by clicking “Start Debug Server” in the “Pydev” menu
4. Start PowerFactory
5. Prepare the Python script for debugging:
• Add “pydevd.py” path to sys.path
• Import PyDev debugger module “pydevd”
• Start debugging calling pydevd.settrace()
Example:
#prepare debug
import sys
sys.path.append ("C:\\Program Files\\eclipse\\plugins\\
org.python.pydev_2.8.2.2013090511\\pysrc")
import pydevd
#start debug
pydevd.settrace()
It is not possible to stop and restart the remote debugger server while running PowerFactory .
The following example Python script calculates a load flow and prints a selection of results to the output
window. The script can be executed from within PowerFactory .
if __name__ == "__main__":
#connect to PowerFactory
import powerfactory as pf
app = pf.GetApplication()
if app is None:
raise Exception("getting PowerFactory application failed")
Interfaces
20.1 Introduction
PowerFactory supports a wide set of interfaces. Depending on the specific data exchange task the user
may select the appropriate interface.
DGS (DIgSILENT) is PowerFactory ’s standard bi-directional interface specifically designed for bulk data
exchange with other applications such as GIS and SCADA, and, for example, for exporting calculation
results to produce Crystal Reports, or to interchange data with any other software package.
Figure 20.2.1 illustrates the integration of a GIS (Graphical Information System) or SCADA (Supervisory
Control And Data Acquisition) with PowerFactory via the DGS interface
Here, PowerFactory can be configured either in engine or normal mode. When used in engine mode,
PowerFactory imports via DGS the topological and library data (types), as well as operational informa-
tion. Once a calculation has been carried out (for example a load flow or short circuit), the results are
exported back so they are displayed in the original application; which in this example relates to the
SCADA or GIS application. The difference with PowerFactory running in normal mode (see right section
of Figure 20.2.1) is that, besides the importing of data mentioned previously, the graphical information
(single line graphics) is additionally imported, meaning therefore that the results can be displayed
directly in PowerFactory. In this case, the exporting back of the results to the original application would
be optional.
Although the complete set of data can be imported in PowerFactory every time a modification has been
made in the original application, this procedure would be impractical. The typical approach in such
situations would be to import the complete set of data only once and afterwards have incremental
updates.
• Importing to PowerFactory
– Data Import/Update into PowerFactory from external data sources such as GIS (Network
Equipment), SCADA (Operational Data) and billing/metering systems (Load Data) in order to
perform calculations.
• Exporting from PowerFactory
– Performing calculations in PowerFactory and exporting back the results to the original appli-
cation.
• Integration
– Importing data sets to PowerFactory from GIS or SCADA, performing calculations, and ex-
porting back results to GIS or SCADA.
PowerFactory ’s DGS interface is based on the PowerFactory data model. Data can be imported and
exported with DGS using different file formats and database schemas.
• Database Schemas
– Oracle DB Server (ODBC client 10 or newer)
– Microsoft SQL Server (ODBC driver 2000 or newer)
– System DSN (ODBC)
• File Formats
– DGS File - ASCII
– XML File
– Microsoft Excel File (2003 or newer)
– Microsoft Access File (2003 or newer)
Important to note here is that the content of the files is the same; the only difference being the format.
The core principle of DGS is to organise all data in tables. Each table has a unique name (within
the DGS file or database/table space) and consists of one or more table columns, where generally all
names are case-sensitive.
For more detailed information on DGS and for some examples, please refer to the DGS Interface
document available on the DIgSILENT download area: http://www.digsilent.de/index.php/
downloads.html
To import data via the DGS interface, the general procedure is as follows:
• From the main menu go to File → Import. . . → DGS Format. . . which opens the DGS-Import
dialog.
• Specify the required options in both the General and Options pages, and click on the Execute
button.
1. Importing into a new project. With this option selected a newly generated project is left activated
upon completion.
2. Importing into an existing project. If an operational scenario and/or a variation is active at the
moment the import takes place, the imported data set will be divided correspondingly. For example
importing breaker status (opened/closed) while an operational scenario is active will store this
information in the operational scenario.
General Page
Import into New Project By choosing this option, a project will be created where all the DGS
data will be stored. The user will have the option of specifying a specific name and location (other
than the default).f
Import into Existing Project By choosing this option, the DGS data will be imported into an
already existing project. Here, the data can be selective and its not required that the imported
data must be complete. In some cases, most of the objects are already existent and only an
update is required for some of them.
Import from The source of the data to be imported is specified with this option. If a File Format
source is selected then the location and type of data (DGS, XML, MDB or XLS) must be specified.
If a Database Schema source is selected, then a DB service, User and Password information is
required (the SQL server option will require an extra Database information).
Note: The GIS conversion uses millimetre units with respect to the bottom-left origin and A0 paper
format limit (1188 x 840 mm). It could therefore be necessary to transform the GIS coordinates
before creation of the “.DGS” file.
Options Page
Predefined Library A predefined library located somewhere else in the database can be selected. The
option of copying the library into the project is also available.
Create Switch inside Cubicle In cases where the source data has no switches defined inside
the cubicles, the enabling of this option will create the switches automatically during the import.
If switches already exist in a certain cubicle, the creation of switches in that particular cubicle is
ignored.
Replace non-printable characters If the source data contains not allowed characters (∼, ?,
etc.), they are replaced by an underscore character.
Use foreign keys (available only with the option Import into Existing Project) Every object in
PowerFactory provides a parameter named “Foreign Key” which can be used to identify the object
uniquely within its project. The parameter is a character field with a maximum of 20 characters
and can be found on the Description page of the various property sheets.
If the DGS import interface is used for updating an existing network model the “Name” column
can be filled with the “Foreign Key” of an existing object. The object will then be identified by
this “Foreign Key” and the data defined in the DGS file will overwrite the object’s parameters.
Parameters which are not included in the DGS file will remain unchanged.
Additional Parameters This field is specified for internal use only. No extra information is
required by the user.
For more information regarding DGS import options, please refer to the DGS Interface document avail-
able on the DIgSILENT download area: http://www.digsilent.de/index.php/downloads.
html
In contrast to the DGS Import, where it is not relevant if a project is active or not; the DGS Export is
based on what information is active at the moment the export takes place. In other words, only the
active project, with the corresponding active Study Case, active Scenario, and active Variations are
exported (objects are exported in their current state). Furthermore, the export can be fully configured,
meaning that user has the option of selecting the amount of information to be exported per class object.
In general, the following data can be exported:
• Element data
• Type data
• Graphic data
• Result data (such as load flow results)
To export data via the DGS interface, the general procedure is as follows:
• Import the following file into PowerFactory : DGS 5.0 Export Definitions.dz, available on the
DIgSILENT download area: http://www.digsilent.de/index.php/downloads.html. The
selected import location can be anywhere inside the current user (a typical location would be
directly inside the user). By performing this step, a default variable set definition is imported (def-
inition of the variables to export via DGS). Instead of the user creating the variable set definition
from scratch, the default definition can be used and modified if required (increase or decreasing
the amount of information to be exported).
Note: In previous versions of PowerFactory (13.2), the default definition set is named DGS Variable-
Sets.dz.
The location is inside the installation folder (for example C:\DIgSILENT \pf132b343 \DGS \).
• Activate the project to be exported, considering the which Study Case, Scenario and Variations
should be active.
• From the main menu go to File → Export. . . → DGS Format. . . which opens the DGS-Export
dialog.
• Specify the required options in both the General and Options pages, and click on the Execute
button.
DGS Version Version of the DGS structure. It is highly recommended to use 5.0 for PowerFactory
V14.0.
Format Output format. Either as ASCII, XML, MS Excel or MS Access file (for Excel or Access,
Microsoft Office must be installed on the computer) or as Oracle, MS SQL Server and ODBC
DSN databases (databases format available only for DGS Version 5.0).
Variable Sets With this option, the data exported will be according to the variable definitions
specified (see the explanation at the beginning of the section) It is required to select a folder that
contains the monitor variable objects (IntMon) related to each class that is to be exported.
Options Page
For more detailed information on the Variable Sets definitions (IntMon), please refer to the DGS Interface
document available on the DIgSILENT download area: http://www.digsilent.de/index.php/
downloads.html
Although both import and export functions for PSS/E files are integrated commands of PowerFactory ,
the export function is licensed separately. For more information on prices and licensing please contact
the sales department at [email protected].
PSS/E Import supports versions 23 to 32 and can be performed by going to the main menu and selecting
File → Import. . . → PSS/E.
In the same manner, and provided the appropriate licensing exists, a project can be exported in PSS/E
format by selecting form the main menu File → Export. . . → PSS/E.
PowerFactory is able to convert both steady-state data (for load-flow and short-circuit analysis) and
dynamic data files. It is good practise to first import the steady-state data (described in this section),
then to add the dynamic models (described in Section 20.3.2: Import of PSS/E file (Dynamic Data).
Before starting the next steps for importing a PSS/E file, please make sure that no project is active.
Once this has been confirmed, please select from the main menu File → Import. . . → PSS/E. By doing
so, the Convert PSS/E Files command dialog seen in Figure 20.3.1 will be displayed, asking the user
to specify various options.
PSS/E Raw data Location on the hard disk of the PSS/E raw data file. By default the program
searches for * .raw extensions.
Sequence Data Location of the PSS/E sequence data file. By default the program searches for
*
.seq extensions.
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.
Note: After the Conversion/Importing has finished, the resulting project will contain a graphics folder
where all of the PSS/E drw converted graphics will be stored. The user must therefore relocate
each one of them to the corresponding diagram folder.
Project The project name that will be assigned to the converted/imported file in PowerFactory.
in Location in the data manager tree where the imported file will be stored.
The following topics: Dyn. Models Data, Composite Frame Path, DSL - Model Path, Parameter
Mapping; are not used for the import of steady-state data and will be explained in the dynamic import
Section 20.3.2.
Convert only sequence data file With this option enabled, the converter will only add the
sequence data to an existing project.
Convert only dynamic models file With this option enabled, the converter will only add the
dynamic data file to an existing project (only for dynamic data import).
Convert only graphic file With this option enabled, the converter will add only a single-line
diagram to an existing project.
Only convert file (no DB action) Internal option used for syntax check and error messages
during conversion. Normally this box should be left unchecked.
Output only used dynamic models Displays a list of used dynamic models (only for dynamic
data import).
Unit of ’LEN’ for lines in miles instead of km With this option enabled, all lengths will be
interpreted in miles in the PSS/E raw files.
Consider transformer phase shift With this option enabled, transformer phase shifts will be
considered. This option is recommended and activated by default.
Convert Induction Machines (Generators: P<0) With this option enabled, all generators in the
raw data file that have negative active power will be converted to asynchronous machines. For
transmission grids the option should be disabled for proper modelling of phase shift generators.
Automatic 3-W. Transformer detection/conversion In versions <27, PSS/E does not handle
3-winding transformers as a dedicated model. In such cases, the 3-winding transformer is
modelled with three 2-winding transformers connected to a busbar. If this option is selected, the
converter will try to detect the existence of three 2-Winding Transformers connected to a busbar.
If any candidates are available, PowerFactory will replace them by a 3-Winding Transformer. The
detection algorithm uses the impedances and the voltage control of the transformers as reference.
From version 27 onwards PSS/E supports the 3W-transformer model, so that PowerFactory does
not start an automatic detection of 3W-Trf modelled as 2W-Trfs.
Convert capacitive line shunts to line susceptance B’ If a line has line shunts the converter
adds automatically the line shunt capacitance to the C1’ (B1’) in the PowerFactory line type.
Convert Common Impedance as Transformer If this option is selected, the Common Impedance
in PSS/E may be converted to a PowerFactory common impedance or to a transformer.
Convert Series Capacitance as Common Impedance Older versions of PSS/E do not handle
series capacitances as a dedicated model. These elements therefore are represented by lines
with negative reactances. During the conversion, PowerFactory detects these branches and
converts them to series capacitances (by default) or to common impedances (when this option is
active).
Convert off-nominal turn ratio to transformer tap Transformer ratios different from the rated
ratio are automatically converted to a transformer type using taps, including the correct tap
position.
Busbar naming: ’PSSE_NAME’ With this option enabled, the busbars are named similar to the
PSS/E raw data file (without bus number).
Branch naming: ’BUSNAME1_BUSNAME2_ID’ With this option enabled, the branches are
named as the name of the busbars + ID.
Additional Parameters This field is specified for internal use only. No extra information is
required by the user.
Rotate with respect to busbars The converter will rotate the graphical layout in case of the
majority of busbars being in vertical or horizontal position.
Snap coordinates to grid The converter will snap to grid all objects in the single line graphics.
Transformer Symbol according to IEC This options lets the user choose the transformer sym-
bol as IEEE (default) or IEC representation.
Scaling factor The graphic files are scaled according to the scaling factor shown.
As explained in Section 20.3.1 it is good practise first to import the steady-state data and then to add
the dynamic model data.
Before converting dynamic data, it is recommended to copy the Standard Models library folder located
in the global library into the user directory. The Standard Models dynamic data library folder can be
found under Library\Standard Models. This folder has the structure as shown in Figure 20.3.4.
The following folders and sub folders are of importance in the conversion / importing.
Standard Models This folder contains the information for most typical models; for example,
automatic voltage regulators (AVRs), power system stabilisers (PSS), primary controllers (PCO)
and others. The models are constructed in DIgSILENT Simulation Language (DSL). The folders
also may contain user-defined models.
Composite Model Frames This folder contains the composite frames which are basically wired
diagrams.
An important condition for successful file conversion is that all DSL models used during the conversion
process should be stored in the same model library folder. By default, this is the case in the global
PowerFactory library. If the original library should use specific folders for the different types of controllers
(AVR,PCO,PSS, etc.), the user should copy all of the models into the same library folder. After the
conversion, the user may re-arrange the models.
The procedure to start the import of dynamic network data is very similar to the import of steady-state
data. Some parameter adjustments have to be made.
In the dialog of General Settings in Figure 20.3.1 the following topics have to be specified:
Dyn. Models Data Location of the PSS/E Dynamic Models data file. By default the program
searches for * .dyn and *dyr extensions.
Use Standard Models from global library If this option in enabled, PowerFactory will automat-
ically point to the Standard Models library located in the Global library. There will be no need of
selecting the composite Frame Path and DSL Model Path.
Composite Frame Path Location in the PowerFactory data base where the composite frames
DSL - Model Path Location in the PowerFactory data base where the DSL models are stored
(Standard Models. . . ).
Parameter Mapping Location of the PowerFactory mapping file. This is an option that normally
will not have to be defined by the user. By default PowerFactory will automatically set up its
own internal mapping file. This file defines how to translate the PSS/E internal models into
PowerFactory models, including the mapping of controller parameters. For automated conversion
of user-defined PSS/E controllers the mapping file may be customised.
In the dialog of Import Options in Figure 20.3.1 the following options should be considered:
Convert only dynamic models file With this option enabled, the converter will only add the
dynamic data file to an existing project.
Output only used dynamic models Displays a list of used dynamic models.
This function allows the export of the network model in PSS/E format. The export comprises both
steady-state and dynamic data sets. The correct conversion of dynamic models is only possible for
the standard IEEE models. Models which the user implemented in PowerFactory ’s DSL can not be
automatically translated and must be modelled as user-defined controller types separately in PSS/E.
To export a project in PSS/E format select File → Export. . . → PSS/E from the main menu.
RAW Conversion File Path and file name for the PSS/E RAW file, containing the symmetrical
description of the model.
SEQ Conversion File Path and file name for the PSS/E SEQ file, containing the additional
description of the model necessary for unbalanced conditions.
DYN Conversion File Path and file name for the PSS/E DYN file, containing the dynamic models
of the project.
Convert Motors to Generators if P<0 With this option enabled, all asynchronous machines in
generator mode will be converted to synchronous machines.
Use serial number for bus numbering With this option enabled, the serial number information
stated in the Description page of each terminal will be used for the numbering. If the serial
number field is empty, the numbering assigned will be according to the name (in ascending
order/alphabetical order).
Convert voltage controlled SVS to generator Selecting this option will convert the SVS models
(only the SVS set to voltage control) to generator models.
Export branch as single equivalent line Selecting this option will convert the branch models to
an equivalent line.
Base Apparent Power Base for the power values given in per-unit system.
Girds: The exported file will have the areas defined according to the Grids defined in the
PowerFactory model.
Areas: The exported file will have the areas defined according to the Areas defined in the
PowerFactory model.
Additional Parameters This field is specified for internal use only. No extra information is
required by the user.
PowerFactory offers the user the possibility to import different types of ELEKTRA files. The files sup-
ported for import are as follows:
The general way to import data via the Elektra interface is as follows:
• From the main menu, select: File → Import→ Elektra. . . . The Elektra-Import dialog will be
displayed.
• Select the desired options and click on the Execute button.
Note: The Elektra import cannot be executed if Elektra is open. Close the software before executing
the import.
The import will be executed regardless of whether a project is activated or not. At the end of the
import, the project will be activated. If there is another project activated while importing the Elektra
data, PowerFactory will deactivate the active project, and activate the newly-created or selected project
(according to the settings).
The options available in the Elektra import dialog are described in the following section.
Import into
New project A new project will be created in which all of the Elektra data will be stored. The user can
select a name and a storage location. Different versions of the same network model should be
stored in new projects.
Existing project Elektra data will be imported into an existing project. Use this option if grids from
different regions will be connected and should be calculated together in one project.
Files
Kind of data Within the Elektra import, Element/graphic data (data type *.esd and *. enp) or Type data
(data type *.dat) can be imported, according to the selection.
Element data If Element/graphic data is selected, please set the storage location of the Elektra element
data by clicking the “. . . ” icon.
Graphical data Add graphical data for the element. Select Delete to remove the data from the list.
Type data If Kind of Data: Type data is selected, click on Add to select the Elektra type library (*.dat)
for import. Repeat this step if more type libraries should be added to the import. Select Delete to
delete single files from the selection.
On the Advanced settings page, the following options can be used to simplify the imported network. In
addition, there are two options to activate the import of coupling impedances and active/reactive power
characteristics (Q(P) curves).
General Options
consider graphical node representation If a node is set to Internal Node in the Elektra element
data, PowerFactory will also set the node to Internal Node. That is, the usage of the node in
PowerFactory is set according to the usage in Elektra element data.
create detailed busbar systems for single busbars By default, a detailed representation of substa-
tions is generated for all Elektra busbars in a PowerFactory substation. This is done regardless of
whether it is a single or double busbar. This option should be chosen to set locations where only
single busbars exist, to single busbars in PowerFactory .
create auxiliary graphic objects in annotation layer Objects in the Elektra open graphic (open texts,
memos, rectangles, pictures, . . . ) will be transformed into the annotation layer of PowerFactory
by default. These layers can be scaled and changed in PowerFactory . As an alternative, graph-
ical objects can be split into parts in the import process. This leads to limited options in later
adaptations of the objects.
create element names with reference to the node name In PowerFactory , every element must have
a unique name. To ensure this uniqueness for the Elektra import, the names are comprised of
the following parts: Elektra element name - Elektra name of terminal 1 - Elektra name of other
terminal. If this name has more than 40 letters it will be shortened.
coupling impedances Coupling impedances between adjacent overhead lines in Elektra network data
are converted into corresponding tower elements (ElmTow) and tower types TypTow in PowerFac-
tory .
convert Q(P) curves The reactive power behaviour of generator units or synchronous machines in
Elektra data can be given as an active/reactive power characteristic. These curves are converted
into a Q(P) characteristic in PowerFactory and assigned to the corresponding static generator/s or
synchronous machine/s.
Active and reactive power can be modified through scaling factors in Elektra on different layers. These
factors are transformed into scalar PowerFactory characteristics, upon import of Elektra element data.
If there are many individual scaling factors for Elektra node elements, one of the following options can
be chosen. These options may assist in reducing the number of characteristics in PowerFactory.
Ignore all scaling factors The factors for active and reactive power for Elektra node elements are
ignored within the data import. The results of the load flow calculation are influenced by this
option.
Calculate resulting power quantities The multiplication of the active and reactive power by the Elek-
tra node element factor is transferred into PowerFactory .
Create individual scale factor objects For all factors for Elektra node elements that are set to a value
different to ’1’, corresponding scalar characteristics are created in PowerFactory . This is the
default option.
Additional Parameter This field is for internal use. No additional information is required from the user.
To import Elektra network data, choose Kind of data: Element/graphic data. The following combinations
of element and graphic data exist:
1. Change the user to Administrator by selecting Tools → Switch User. . . → Administrator via the
main menu.
2. Open the PowerFactory Data Manager, and create a new folder of type Library within the directory
Database.
3. Copy the Equipment Library from the import project into this folder.
During the import the following information is provided in the output window:
• Network elements which do not coexist in the Elektra element and in the Elektra graphical data
(multiple entries while importing multiple graphical files are possible).
• Network elements which are generated from power ratings in Elektra nodes.
• Coupling objects between different locations, which cannot be converted.
• Graphical objects whose names are adapted during import.
• Inconsistent or incomplete element parameters.
PowerFactory offers to the user the option of importing different types of NEPLAN files. The files
supported for importing are the following:
• NEPLAN 4
– Project File Data (*.mcb) containing the topological, electrical and graphical data.
– Line Data Type (*.ldb) containing the line type information.
• NEPLAN 5
– Node Table (*.ndt) containing the node data, such as rated voltages and loads.
– Element table (*.edt) containing the branch data, such as lines and transformers.
– GIS/NMS Interface (*.cde) containing the graphical information of all the networks which are
part of the NEPLAN project.
To import data via the NEPLAN interface, the general procedure is as follows:
• From the main menu go to File → Import. . . → NEPLAN. . . which opens the NEPLAN-Import
dialog.
• Specify the required options and click on the Execute button.
The NEPLAN data import always creates a new PowerFactory project. Once the import process has
been executed, the newly generated project is left activated upon completion.
Independent of the NEPLAN file version (4 or 5), the user has the option of importing the data with
or without graphical information. That is, if the user selects importing the data without graphical
information, only the topological and electrical data will get imported, and no single line graphic will
be generated.
When importing NEPLAN 4 files, the user has basically two options:
When importing NEPLAN 5 files, the user is only required to select the * .ndt. By doing so, the
corresponding * .edt file is automatically imported also. This basically means that a * .edt file must
be present otherwise the import will not be executed. The * .cde file is however optional. Additionally, all
three files must have the same name and must be in the same directory! As a recommendation, create
a separate folder and place all the files there.
The following section describes each of the NEPLAN import dialog options.
General Settings
File Type
Neplan Data Location on the hard disk of the NEPLAN data file. Three types of files are available:
*
.mcb, * .ldb and * .ndt.
Project The project name that will be assigned to the converted/imported file in PowerFactory.
in Location in the data manager tree where the imported file will be stored.
Import Graphic Information If this option is enabled then the graphical information is imported
and the single line diagram is generated. In case of NEPLAN 5 import the * .cde file is required.
Additional Rotation Angle for 1-port Elements (deg) If a value different than 0 is stated,
then the single port elements (loads, generators, motors, etc.) are rotated counter clockwise
(degrees) with respect to the original position.
Automatically Scale to A0 If this option is selected, then the graphic is rescaled according
to the A0 page format.
Additional Parameters This field is specified for internal use only. No extra information is
required by the user.
PowerFactory offers the user the option to import Integral files for Load Flow and Short Circuit analysis.
The following files are supported:
• *.dvg
• *.dtf
• *.xml
• From the main menu go to File → Import. . . → Integral. . . (this will open the Integral-Import dialog).
In the ’Save converted data in’ field the user can enter a project name, and the PowerFactory user for
this project can be selected. The Integral data import always creates a new PowerFactory project.
The *.xml Integral files contain graphical information. However, for older Integral files with the ending
*.dvg and *.dtf it is necessary to select graphical data with the ending *.bild.
In PowerFactory , both export and import of UCTE-DEF (Union for the Co-ordination of Transmission of
Electricity-Data Exchange Format) is supported. The UCTE interface is currently intended for import-
ing/exporting grid data of a country belonging to the former UCTE community.
The data contained in these files correspond basically to load flow and short circuit (3 phase) type data.
Furthermore, it only considers specific UCTE voltage levels according to voltage level codes, as well as
UCTE specific country codes, such as DK for Denmark, P for Portugal, etc.
Important to note here is that from 1𝑠𝑡 of July 2009, ENTSO-E (European Network of Transmission
System Operators for Electricity) took over all operational tasks of the 6 existing TSO associations in
Europe, including the Union for the Coordination of Transmission of Electricity (UCTE).
For more information related to the UCTE format, please refer to the following link:
https://www.entsoe.eu/fileadmin/user_upload/_library/publications/ce/otherreports/UCTE-format.pdf
To import data via the UCTE interface, the general procedure is as follows:
• From the main menu go to File → Import. . . → UCTE. . . which opens the UCTE-Import dialog.
• Specify the required options and click on the Execute button.
Once the import process has been executed, the project (new or existing) is left activated upon comple-
tion.
The following section describes each of the UCTE import dialog options.
General Settings
Import into
New Project By choosing this option, a project will be created where all the UCTE data will be
stored. The user will have the option of specifying a specific name and location (other than the
default).
Existing Project By choosing this option, the UCTE data will be imported into an already existing
project.
File Type
Add UCTE Files Location on the hard disk of the UCTE files. Two types of files are available:
*
.uct and * .ucte.
Options
Import for DACF process With this setting the user has the option to import the Day Ahead
Forecast.
Convert negative loads to generators With this option enabled, negative loads defined in the
UCTE file will be converted to generators in the PowerFactory model.
Convert transformer equivalent to common impedance With this option enabled, transformer
equivalents defined in the UCTE file will be converted to common impedances in the PowerFac-
tory model.
Automatically Scale to A0 If this option is selected, then the graphic is rescaled according to
the A0 page format.
Additional Parameters This field is specified for internal use only. No extra information is
required by the user.
As in the other export interfaces, the UCTE Export is based on the active project at the moment the
export takes place. To export data via the UCTE interface, the general procedure is as follows:
• Activate the project to be exported, considering the which Study Case, Scenario and Variations
should be active.
• From the main menu go to File → Export. . . → UCTE. . . which opens the UCTE-Export dialog.
• Specify the required options, and click on the Execute button.
General Settings
File Type
UCTE Data Location on the hard disk where the UCTE files will be stored. Two types of files are
available: * .uct and * .ucte.
Export UCTE voltage >= Only the elements having a voltage grater than the UCTE voltage
specified are exported.
Export branch as single equivalent line By enabling this option the export will convert the
PowerFactory branch definitions into single equivalent lines.
Use first character of characteristic name as branch order code If checked, the characteristic
name (first character) is used in the branch order code of the exported UCTE file.
In PowerFactory , both export and import of CIM (Common Information Model) is supported. The CIM
interface is currently intended for importing/exporting the following profile:
• ENTSO-E 2009
CIM is defined in IEC-61970, and it’s purpose is to allow the exchange of information related to the
configuration and status of an electrical system.
To import data via the CIM interface, the general procedure is as follows:
• From the main menu go to File → Import. . . → CIM. . . which opens the CIM-Import dialog.
• Specify the required options and click on the Execute button.
Once the import process has been executed, the project (new or existing) is left activated upon comple-
tion.
The following section describes each of the CIM import dialog options.
General Settings
Import into
New Project By choosing this option, a project will be created where all the CIM data will be
stored. The user will have the option of specifying a specific name and location (other than the
default).
Active Project By choosing this option, the CIM data will be imported into the active project.
Import from
CIM File Location on the hard disk of the CIM files. Two types of files are supported: * .zip and
*
.xml.
separated Files With this setting the user has the option to import the equipment, topology and
solved state files separately.
Additional Parameters This field is specified for internal use only. No extra information is
required by the user.
As in the other export interfaces, the CIM Export is based on the active project at the moment the
export takes place. To export data via the CIM interface, the general procedure is as follows:
• Activate the project to be exported, considering which Study Case, Scenario and Variations should
be active.
• From the main menu go to File → Export. . . → CIM. . . which opens the CIM-Export dialog.
General Settings
Export to
CIM File Location on the hard disk where the CIM files will be stored. Two types of files are
supported: * .zip and * .xml.
separated Files With this setting the user has the option to export the equipment, topology, and
solved state files separately.
Border Nodes Grid Selection of the grid which contains the X-nodes.
The CGMES Tools provide an additional interface to CIM. These tools are accessible via the main
menu in PowerFactory under Tools → CGMES Tools. This section describes these tools and uses the
following naming conventions:
The CGMES Tools separates each action (i.e. the import and export of CIM data) into two steps. To
import data from a CIM file (XML format) into PowerFactory , the first step is to import the CIM data
into CIM objects (CIM Data Import). This offers the user the possibility to directly interact with the CIM
data from within PowerFactory . The second step is to convert the CIM objects into a grid model (CIM
to Grid Conversion). To export grids from PowerFactory , they must first be converted to CIM objects
(Grid to CIM Conversion). These may still be modified if required, and also directly reimported. The
newly-created CIM objects can then be exported as a ZIP or XML file in conformity with the CIM data
structure (CIM Data Export).
The CIM Data Import is accessible in PowerFactory under Tools → CGMES Tools→ CIM Data Import.
The following options for the import location are available:
• New archive in new project creates a new project with the given name and imports the data into
an archive with the same name.
• New archive in existing project imports the data into a new archive with the given name; requires
an active project.
• Existing archive in active project imports the data into the given archive; data models that are
already contained in the archive will not be modified.
By selecting “New archive in new project”, the name of the project and the file to import can be
specified. Upon clicking the Execute button, the content of the XML file will be imported. This step
results in an active project containing the “CIM Model” folder, which itself has a single archive. This
archive contains the model representations from the XML file.
By selecting “New archive in new project”, the name of the project and the file to import can be
specified. Upon clicking the Execute button, the content of the ZIP file will be temporarily extracted and
imported. This step results in an active project containing the “CIM Model” folder, which has a single
archive. This archive contains the model representations from the ZIP file.
To import several files in a row, the destination Existing archive in active project must be used. The
archive created by the first step must be selected as the “Path” for all subsequent files. This will import
the data into the archive provided.
The CIM Data Export is accessible via Tools → CGMES Tools→ CIM Data Export.
A model representation must be selected as “CIM data” and a file name specified. If the file name does
not already end with “XML”, the extension will be added. This step results in a single XML file which
contains the data of the objects in the model representation.
An archive must be selected as “CIM data” and a file name specified. If the file name does not already
end with “ZIP”, the extension will be added. This step will temporarily export all models as XML files
and subsequently store them as a ZIP file.
To export multiple files from one archive, this archive must first be temporarily created and contain the
models which are to be part of the ZIP file. This can be done by copying the archive within the “CIM
Model” folder and removing unwanted model representations.
The CIM Data Import is accessible under Tools → CGMES Tools→ CIM to Grid Conversion.
To convert all data contained in an imported archive, select “CIM archive” followed by Execute. This will
additionally consider any valid difference models contained in the archive. To import a base model only,
the difference models must be deleted before conversion. If only specific profile information should be
exported, select “Convert selected profiles” and specify those that should be considered. It should be
noted that the resulting subset of profiles still needs to be complete in terms of dependencies.
The CIM Data Import is accessible under Tools → CGMES Tools→ Grid to CIM Conversion.
• New archive converts the networks into a new archive with the given name.
• Existing archive imports the data into the given archive; if the archive already contains models
for the selected networks, these will be modified.
A model for each profile selected will be created per network in the target archive. By default all
profiles are selected. Boundary grids will only be exported with EQ and TP profiles (the respective
boundary versions). If the model does not contain any objects after the conversion process is finished,
PowerFactory will prompt for confirmation before deleting.
Convert network
The PowerFactory networks to be converted can be selected by ticking the checkbox. Only activated
networks can be converted. If one of the networks is to be treated as boundary grid, the corresponding
checkbox must be ticked as well.
Additional options
Create Difference Models: “/createDifference” must be entered into the Additional Options field on the
Advanced Options page of the dialog. Please note that difference models can only be created if Existing
archive is selected as the destination. This archive should contain the base models for the difference
models.
Perform Node Reduction: “/performReduction” must be entered into the Additional Options field on
the Advanced Options page of the dialog. This will export only TopologicalNodes to the model.
For a detailed description on the MATLAB interface please refer to Chapters Stability and EMT Simula-
tion and Modal Analysis, Sections 26.15: MATLAB Interface for DSL models and 27.2.6: Output Options
Modal Analysis.
PowerFactory ’s OPC (Object Linking and Embedding for Process Control) interface is an asynchronous
communication and data exchange mechanism used in process interaction and is widely applied in
SCADA and control systems.
This OPC-implementation assumes that the PowerFactory software is executed as an OPC-Client while
the OPC Server is controlled via the external source. OPC server libraries are available from various
manufacturers. An example of a freeware OPC-Server is that available from Matrikon (“MatrikonOPC
Simulation Server”).
Figure 20.11.1 illustrates the integration of a SCADA system with PowerFactory via the OPC interface.
In this OPC-implementation, PowerFactory can be used either in engine or normal mode. Some further
characteristics of this integration include:
• OPC-Client/Server exchange of any PowerFactory object parameter as well as any signal (bi-
directional Data Exchange).
• PowerFactory listening mode to receive any data or signal from a registered OPC Server.
• PowerFactory sending mode to write back any data or signal to a registered OPC Server.
• Offline
– The bi-directional data exchange is carried out through an explicit command given by the user
in PowerFactory. For example, by pressing a button predefined by the user in PowerFactory.
• Online
– The bi-directional data exchange is automatically carried out at a certain frequency rate;
where the frequency rate is determined by the user.
Note: The OPC functionality in PowerFactory is not considered part of the base package. For more
information on prices and licensing please contact the sales department at [email protected].
– in order to reflect the Operator actions, such as breaker status and tap positions.
– in order to perform state estimation based on the measured network data.
This chapter describes the StationWare interface. An introduction into StationWare is provided in Sec-
tion 20.12.1.
The following two sections describe the overall StationWare architecture (Section 20.12.2) and the
conceptual differences between PowerFactory and StationWare (Section 20.12.3).
Both PowerFactory and StationWare have to be configured before they can be used together (Sec-
tion 20.12.4).
The Getting Started section (Section 20.12.5) provides an introduction to the most important features.
The complete documentation can be found in the Reference section (Section 20.12.7).
The terms StationWare and PSMS are used synonymously throughout this chapter. PSMS stands
for Protection Settings Management System, and stresses the more internal and technical part of
StationWare .
DIgSILENT StationWare is a centralised asset management system for primary and secondary equip-
ment. It provides a reliable central protection settings database and management system for the
complete power system data, both to manage the various control parameters and to centrally store
power system related information and data, based on the latest .NET technology.
StationWare stores and records all settings in a central database, allows modelling of all relevant work
flow sequences, provides quick access to device manuals, interfaces with manufacturer-specific relay
settings software, and integrates with PowerFactory software, allowing powerful and easy-to-use set-
tings co-ordination studies.
Modern numerical relays have a large number of settings that are determined, stored and communi-
cated by proprietary software solutions (these may be suitable for only one particular manufacturer or
only one series or type of relay). This results in a fragmented and distributed settings “database”. DIgSI-
LENT StationWare provides a single system that incorporates all different device protocols, thereby
providing one manageable software data storage system, based on modern IT techniques, facilitating
data interfacing and exchange in a transparent and straightforward manner.
PowerFactory ’s data exchange facility allows it to access the settings stored in StationWare , such that
these may be used as input to the powerful PowerFactory system simulation and protection settings
tools. Settings that are calculated by using these tools may then be transferred back to StationWare .
There are usually several clients. One main advantage of this architecture is 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 it, and then stores it back to the server. On other These changes are visible on other clients.
DIgSILENT StationWare server provides two interfaces to access from client machines:
• Visualisation 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 20.12.2.
The browser displays HTML pages which are created by StationWare ’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 press-
ing on hyperlinks data is sent to the server. The server interprets such requests and creates new
HTML pages which are displayed by the browser again.
• The web service interface, similar to the HTML interface uses the HTTP protocol to communi-
cate 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 StationWare ’s
data and concepts smoothly into its own world.
The functionality of the HTML interface is covered in the StationWare manual. The remainder of this
chapter focuses on PowerFactory as client.
Although StationWare and PowerFactory store data and settings associated with primary devices such
as lines, transformers, . . . and secondary devices, i.e. relays, CTs, VTs and circuit breakers, the two
systems utilise different concepts to deal with this data.
In StationWare it is possible to model a location hierarchy and associate the devices to nodes in this
hierarchy (e.g. substations). This has no equivalent in PowerFactory , where the devices are stored
inside the parent grid (ElmNet) object.
Conversely, PowerFactory allows to the creation of a topological representation of networks which is not
supported in StationWare .
This section describes the concept mismatch between PowerFactory and StationWare . In order to use
the StationWare interface, it is important to understand the differences between both applications.
Location
In StationWare each device belongs to exactly one location. There are different location types e.g.
Region, Area, Substation, or Bay. The locations are organised in a hierarchy tree as shown in Fig-
ure 20.12.3.
In PowerFactory the data is organised in projects (IntPrj). A project may have one or more grids
(ElmNet) which in turn contain net elements e.g. terminals, cubicles, and relays (ElmRelay ). See
Figure 20.12.4 for a typical PowerFactory project.
StationWare ’s location concept and PowerFactory ’s project/grid concept hardly fit together. That’s the
reason why the data mapping between PowerFactory and StationWare begins at the device level which
is the subject of the next sections.
Device
StationWare manages a set of devices e.g. relays, CTs, VTs, circuit-breakers, . . . . Each device is
associated with a device type e.g. ABB DPU2000R or SEL421 003. In addition, 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 20.12.5
for an example. The device ID is used to link one StationWare device to one PowerFactory device. The
PowerFactory device e.g. an ElmRelay object stores the StationWare device ID as foreign key.
Device State
A device’s state is in StationWare called setting. A setting is a list of attributes, and describes 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 StationWare the setting attributes are organised 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 attribute belongs to exactly one setting group. Inside
a group the attribute name is unique.
The device type defines which attributes and groups characterise a device. Table 20.12.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.
According to this attribute definition a device can have settings as shown in tables 20.12.2 or 20.12.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 20.12.4 for a definition and
Table 20.12.5 for an example. The TypRelay type defines components and parameters.
StationWare attributes are mapped to PowerFactory parameters and vice versa. The mapping is non-
trivial since only a small subset of the attributes (the calculation-relevant data) is modelled in PowerFac-
tory and vice versa. Additionally there is no one-to-one relationship between attributes and parameters;
i.e. a parameter may be calculated from several attributes.
Some relays support multiple setting groups (MSG) also called parameter sets. Such relays have the
same group many times (c.f. table 20.12.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 modelling all
MSGs, only one instance of the H groups is provided.
In this case a group index parameter defines which of the MSGs actually is transferred from StationWare
to PowerFactory .
In StationWare each setting has one life cycle phase e.g. Planning or Applied. At each point in time
a device can have a set of settings e.g. three Planning settings, one Applied setting and 12 Historic
settings.
In PowerFactory a device has exactly one state (or setting). Therefore when data is transferred between
PowerFactory and StationWare , always a concrete device setting in StationWare must be specified.
For PowerFactory purposes a special PowerFactory planning phase is introduced. The transfer direc-
tions are specified as follows:
• Imports from StationWare into PowerFactory are restricted to Applied and PowerFactory set-
tings. Applied denotes the current applied setting (Applied) or a previous applied (Historic)
setting.
• Exports from PowerFactory to StationWare are restricted to the PowerFactory setting. (Applied
and Historic settings are read-only and can never be changed).
(Actually PowerFactory ’s sophisticated variant management is similar to the phase concept, but there
is no obvious way how to bring them together.)
20.12.4 Configuration
In order to transfer data between PowerFactory and StationWare both systems must be configured.
StationWare Server
An arbitrary StationWare user account can be used for the StationWare interface in PowerFactory. The
user must have enough access rights to perform operations e.g. for the export from PowerFactory to
StationWare write-rights must be granted.
Please ensure that at least one phase fulfils these requirements, and there exists a setting of this phase.
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 StationWare/PowerFactory mapping.
The mapping between PowerFactory object-attributes and calculation results with StationWare device-
settings or process-settings, or additional attributes of devices, is done via flexible DPL scripts. These
scripts have access not only to data in PowerFactory objects themselves, but also to other related
objects e.g a relay type object or relay sub-blocks.
To be able to transfer data from PowerFactory to StationWare and vice versa, suitable DPL scripts have
to be created and placed in an appropriate location in the project library folder.
The scripts for importing/exporting device settings should be located in the sub-folder “Settings” of the
StationWare folder inside the Project in PowerFactory .
Project\Library\StationWare\Settings.
For importing/exporting additional attributes from StationWare , DPL scripts should be located in the sub-
folder “Attributes”. To be able to export results from PowerFactory to StationWare , the corresponding
script should be located in the sub-folder “Results”. None of these folders are by default in project library
folder and must therefore be created.
Important: DPL scripts for import/export relay-settings must be saved in the same folder as the relay
model (as contents of a TypRelay object). This is the reason why relay models from the PowerFactory
global library cannot be used for this purpose. Relay models from the global library have no built-in DPL
scripts only the Administrator is allowed to modify the PowerFactory global library.
This section is a simple walk-through and covers the most essential StationWare interface functionality.
All (especially the more advanced) options and features are described in the reference section (see
Section 20.12.7: Reference).
We begin with the StationWare side. We create a substation and two relays within:
In the HTML interface the station detail page should look as shown in Figure 20.12.7.
Since we have just created the device it has no settings, yet. Later it will contain a PowerFactory setting
which reflects the relay state on the PowerFactory side.
• start PowerFactory ,
• right-click the cubicle quadrangle with the mouse. A context menu pops up.
• select New Devices. . . /Relay Model. . . as shown in Figure 20.12.10.
A dialog pops up that allows you to specify the settings of the new relay (ElmRelay ).
• press OK
• in the same way add a relay Getting Started Relay 2 to the second terminal.
PowerFactory ’s object filter mechanism gives an overview over all devices inside the current project.
• 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 20.12.12.
All calculation relevant relays (actually there only the two we created above) are displayed in a table
(see Figure 20.12.13).
Now the PowerFactory relays must get linked to the StationWare relays. To be able to make a connec-
tion:
• Ensure that the DPL Import/Export scripts are saved in the same folder as the relay model
• Mark both relay icons with the mouse
• Press the right mouse button.
A Log on to StationWare server dialog pops up. Since this is the first time PowerFactory connects to the
StationWare server some connection settings must be entered.
• enter the Server Endpoint URL of the StationWare server. The URL should have a format similar
to
http://192.168.1.53/psmsws/PSMSService.asmx
• enter Username and Password of a valid StationWare user account.