0% found this document useful (0 votes)
42 views

Tutorial DSL Portability

Portability and Encryption of Dynamic Models discusses options in PowerFactory to make dynamic models more portable and encrypt sensitive models. The "Pack" function takes external model references and creates local copies, making the model self-contained. "Pack → Macro" reduces the model to equations only. Templates allow reusing complete models in other projects. Encryption encrypts a model's equations, hiding proprietary information, and requires an additional license.

Uploaded by

Kike Becerra
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views

Tutorial DSL Portability

Portability and Encryption of Dynamic Models discusses options in PowerFactory to make dynamic models more portable and encrypt sensitive models. The "Pack" function takes external model references and creates local copies, making the model self-contained. "Pack → Macro" reduces the model to equations only. Templates allow reusing complete models in other projects. Encryption encrypts a model's equations, hiding proprietary information, and requires an additional license.

Uploaded by

Kike Becerra
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Portability and Encryption of Dynamic Models

PowerFactory includes different options to facilitate the re-use and portability of dynamic models. If you are
following the complete tutorial and have completed the previous part Testing and Troubleshooting, then you
can continue working with the same project; otherwise you can import the project with the already prepared
model. If you select the first option then go to section 1; otherwise:

• Click on the icon from the exercise “Portability” of the PowerFactory Tutorial window, to import and
activate the project for this exercise.

1 Portability

When creating a DSL model type, it is common to use standard macros and primitive blocks from the DIgSI-
LENT library (e.g. integrators, time delays, PI controllers, etc.), or perhaps even primitive blocks from other
projects or libraries. In the DSL model type, there will consequently be external references and links to the
DIgSILENT library or other projects / libraries.

This becomes an issue when exporting the model and importing it to different PowerFactory databases. Only
the references are exported and if the other databases do not contain the same reference macros or primitive
blocks (or they have been modified), then the model will not function as intended.

PowerFactory offers two functions to make DSL models more portable for reuse:

1. Pack
2. Pack → Macro
Both of these functions can be found in the DSL model type dialog (see Figure 1.1 below).
PORTABILITY AND ENCRYPTION OF DYNAMIC MODELS

Figure 1.1: DSL model type packing and encryption functions

1.1 Pack

The “Pack” function takes all of the external macros used in a DSL model type and creates local copies of them
in a folder called “Used Macros”, located inside the DSL model type object itself (see Figure 1.2 below). All
of the references in the DSL model type are then linked to the local macros in the “Used Macros” folder. The
Pack function therefore creates a self-contained object without any external references.

It is important to note that if a macro needs to be altered after packing, the modifications must be done to the
local macro inside this folder (and not to the macro in the global library, other project, etc).

• Locate in the project and edit the “Simplified AVR” block definition, then pack all macros using the “Pack”
button.
• Check within the DSL model type for the macros folder; it should look like Figure 1.2.

Rev.2 2
PORTABILITY AND ENCRYPTION OF DYNAMIC MODELS

Figure 1.2: Used macros folder created by Pack function

1.2 Pack as Macro

The “Pack → Macro” function takes the “Pack” function one step further and reduces the entire block diagram
into a set of equations. As a result of this function, all graphical representations of the DSL model type are
deleted. This function is irreversible and it is advised that a copy of the DSL model type be made before
attempting to use the “Pack → Macro” function.

2 Dynamic Model Template

The block definition packing functions solves the portability issue for individual block diagrams, but there is often
a requirement to re-use a complete dynamic model, which has already been put together and parameterised, in
a different project, or to share it with others. For this purpose PowerFactory offers the “Template” functionality
which we will use to define a template next.

2.1 Defining a Dynamic Model Template

In the project, first verify the grid’s content. You should easily be able to identify the plant controller (“G1
Controls.ElmComp”). Identify also where the DSL model type and composite model frame are stored; you
should find them within the project library.

• Make sure the Graphical Freeze Mode is off using the icon and multi-select all elements which are
part of the model and will be part of the Template in the single line diagram, these are: synchronous
generator G1, terminal LV and transformer Trf.
• Right-click on the marked elements and select "Define Template...".
• In the dialog window assign a template’s name (Plant Template) and press OK.
• For the selected elements there exists an external object which is the controller (ElmComp). Select “yes”
in the dialog window to confirm that the dynamic model should be included into the template.

Rev.2 3
PORTABILITY AND ENCRYPTION OF DYNAMIC MODELS

Now the template is defined and you should find it within the project’s Templates library.

Before copying/exporting the template to be used in a different project, you have to verify that all references
are packed:
• Locate the template and do right-click Edit → Pack. (This will create local copies of all types inside the
template, then you will be able to use the template without problems in other projects.)
• Repeat clicking this time Edit → Check to verify whether all references have been included in the
template. Check the output window for possible problems and solve them if any.
The template can now be copied or exported/imported into a new project to be used. It only needs to
be inserted in the destination network and properly connected. No additional parameterisation should be
necessary since the template includes element and model parameters.

3 Encryption

Important Note: The DSL model encryption feature requires an additional licence option and is not included
in the basic RMS or EMT simulation packages. Please contact DIgSILENT GmbH if you require this feature.

Models that contain highly sensitive data (e.g. trade secrets, proprietary algorithms, etc.) can be encrypted so
that the internal equations of the model are not visible to others. The “Encrypt” function can be found in the
block definition dialog (see Figure 1.1).

Note that the “Encrypt” function will only be enabled for DSL model types without any graphical representations
(i.e. a macro or an equation block). If a block definition has a graphic, it must be reduced to a set of equations
using the “Pack → Macro” function before the “Encrypt” function can be used.

Figure 3.1 shows an example of the equations window when a block definition has been encrypted.

Rev.2 4
PORTABILITY AND ENCRYPTION OF DYNAMIC MODELS

Figure 3.1: Equations window of an encrypted DSL model type

4 Summary

This concludes the exercise. Now it should be clear how to carry out the following tasks:

□ Pack block definition models.


□ Define and work with templates.
□ Requirements and steps to follow for model encryption.

You might also like