Create Relay Models
Create Relay Models
This tutorial demonstrates how to create a simple overcurrent relay from scratch, test it and extend if afterwards
with voltage protection. The tutorial has been designed for a user who has already used, and is familiar with
the basic functions and structure of PowerFactory.
There are two types of relays provided in PowerFactory : generic and manufacturer specific. All available relays
are contained in the global DIgSILENT-Library.
Each relay model in PowerFactory is made out of different blocks, where each block performs a specific function
of the relay. The number of blocks implemented in a relay model depends on the relay complexity. But
common for all relays is that they always contain instrument transformers (current and/or voltage transformers),
measurement blocks and logic blocks.
For relays with an operating principle based on current measurement (overcurrent, differential, distance relays)
at least one current transformer block must be included in the model. For relays which need information on the
voltage (directional, distance, overvoltage, undervoltage relays) one or more voltage transformer blocks will
need to be (additionally) included.
The measurement block represents the signal conditioning functionality usually used in a real relay to extract
the fundamental frequency signal from the measured instrument transformer inputs. In PowerFactory con-
ditioning of the signal is only necessary for the EMT simulation since the RMS, load flow and static short
circuit calculations are essentially fundamental frequency calculations. The block is also used to specify the
base input values for the relay. For all calculations the measurement block reads the CT and VT outputs and
converts the measured values into discrete signals to be used by other blocks in the relay.
The logic block is responsible for sending the trip signal to the switching device (e.g. circuit breaker). Multiple
switching devices can be specified if necessary in order to simulate an intertripping arrangement.
For each relay block class, a corresponding technical reference document is available. The technical references
contain detailed descriptions of the blocks, their signals and functionalities.
The objective of this tutorial is to get a better overview over relay functionalities, their blocks and signals.
Therefore we will create a simple relay from scratch. In the first step a simple overcurrent relay will be created
and later this relay will be extended with additional overvoltage and undervoltage features. The ability to
execute load flow and short circuit calculations and to interpret the results is considered to be a prerequisite
for this tutorial.
CREATE RELAY MODELS
You will learn how to create a relay with two instantaneous overcurrent blocks (i.e. ANSI standard device
number 50). For this task we will need:
• One current transformer block (CT),
• One measurement block for reading the current values,
• Two overcurrent blocks for processing the measured current,
• One logic block that will send the trip signal to the circuit breaker in case of a fault.
Note: So far, the components of a relay have been described as blocks. In practise each block can be
considered to consist of an object known as a slot drawn within a graphical representation of the relay
functionality known as a frame (or block definition). Each slot is referenced to a specific PowerFactory
object. The PowerFactory object is usually a relay object e.g. a measurement element (class RelMea-
sure) but for CT’s and VT’s it will be a station element (class StaCt, StaVt or StaCombi). Each of these
PowerFactory objects will in turn make reference to a PowerFactory type object of a corresponding type
class.
If you are creating a new relay from scratch you will always have to consider the following steps:
1. Define a relay frame with all slots and their connections. In our case we need 5 slots. The number of
slots depends on the complexity of the relay (e.g. for modern numerical distance relays there can be over
100 slots!)
2. Define the relay type and refer it to the created frame. The relay type has to contain all block types for
each slot. The block type contains important type information such as current ratios, time dial setting
ranges, etc.
3. Use and test the relay to see how your relay reacts.
The steps are now explained in detail.
• Start by inserting a new page in the graphic board. For this add a new tab to the tab bar .
• Place 5 slots in the empty Frame Diagram by selecting the from the Draw toolbox. Each slot will
represent one of the blocks that our relay will contain.
Rev.3 2
CREATE RELAY MODELS
The next step is to specify classnames and input/output signals of the slots.
• The First Slot is named “CT”. This slot will represent the used current transformer. In order for Power-
Factory to know that this slot will be a CT, write “StaCt*” under Class Name inside the slot. The next
important part is to define the input and output signals. For the CT slot we do not need any input signals
so this field will stay empty. In the output signals field write:
I2r_A;I2i_A,I2r_B;I2i_B,I2r_C;I2i_C
The signals represent real and imaginary parts of the CT’s secondary phase currents. The list of all
possible input and output signals are available in the technical reference for the current transformer
document (see figure 2.2). We can use this list to specify the signals we need for our relays.
Figure 2.2: Table of input and output signals of the 3 phase CT element.
Rev.3 3
CREATE RELAY MODELS
• The Second Slot is named “Measurement” and has the class name “RelMeasure*”. The input of this
block should match the output of the CT block. In the technical documentation for this block (RelMeasure)
you will find the name of input signals for real and imaginary part of the phase input currents:
wIr_A;wIi_A,wIr_B;wIi_B,wIr_C;wIi_C
This block provides RMS value of the phase current as output that will be sent to be compared with the
pick up current in the 50/51 block:
I_A;I_B;I_C
Also activate the option Automatic, model will be created. This will later prompt PowerFactory to auto-
matically create a model of the specified class name in the relay type.
Rev.3 4
CREATE RELAY MODELS
Figure 2.4: Partial list of input and output signals of the RelMeasure block.
• The Third Slot will be our 𝐼 >, first instantaneous overcurrent block (50). The class RelIoc* is also
predefined in PowerFactory. Write RelIoc* in the Class Name field and activate the option Automatic,
model will be created. This block expects phase currents:
Iabs_A;Iabs_B;Iabs_C
Rev.3 5
CREATE RELAY MODELS
and provides us with two output signals yout and y_s. For our task, only the yout tripping signal is of
interest.
Figure 2.6: Input and output signals of the 3-phase RelIoc block.
Rev.3 6
CREATE RELAY MODELS
Figure 2.7: Dialog of the definite time overcurrent (RelIoc) block slot.
• Fourth Slot 𝐼 >>. Class Name RelIoc* input and output are the same as for the 𝐼 > and option
Automatic, model will be created activated.
• Fifth Slot “Output Logic” of Class Name “RelLogic”. The last block takes the output signals from the 𝐼 >
and 𝐼 >> slots and sends an open signal to the switching device(s) if one of these two blocks detects
a current larger than its respective pick up threshold. Also activate the option Automatic, model will be
created.
You can also rename the relay frame as “SimpleRelay”. You may have noticed that some of the signals are
separated with commas “ , ” and some of them are separated with semicolons “ ; ”. This difference determines
the visual representation of the signals in the frame. For example I2r_A;I2i_A,I2r_B;I2i_B,I2r_C;I2i_C will
create three connection points on the slot each carrying two signals (first connection I2r_A;I2i_A, second
I2r_B;I2i_B, third signals I2r_C;I2i_C). In that way we can avoid having too many signal lines overcomplicating
our block diagram.
Rev.3 7
CREATE RELAY MODELS
Connect the slots as shown in figure 2.8 above. To connect the slots, use the Signal element from the
drawing toolbox and select two connection points.
In this section we will define the new relay type TypRelay that refers to the relay frame we just created and we
will define each relay block type in detail.
• Create a new object of the Type TypRelay inside the Equipment Type Library folder and name it “OCRe-
lay”. In order to create new objects use the icon .
Rev.3 8
CREATE RELAY MODELS
• From the User Defined Models Folder (also inside of the Library Folder) cut the frame you created in
section 2.1 and paste it inside the new relay type (see figure 2.10).
• Open the new relay type OCRelay and select the frame under the option Relay Definition.
• The relay will automatically be updated and shows all slots from the block diagram. If you activated the
option Automatic, model will be created, each block type is also created in the relay type.
Rev.3 9
CREATE RELAY MODELS
• Create a new relay element at the Motor Cable. Refer to the User Manual for how to create a relay if
needed.
• Create a current transformer with the ratio 1000/1. Update the CT Type to have 1000 A as primary tap
current.
• Select 0.72 p.u. for pickup current and 2.5 s as a time setting in the 𝐼 > block and 8.1 p.u. and 0.1 s in
the 𝐼 >> block.
• Create a time-overcurrent plot and add the motor characteristic on the plot as well.
• Run a load flow calculation. Does the relay trip? Why not?
• Run the 3ph max. short circuit at the end of the protected cable. Does the relay trip?
Let us have a look inside the relay to see how this short circuit current is processed in the relay itself.
• Go to the relay in the data manager. The easiest way to open an element in the data manager is to press
CTRL+E when the relay element dialog is open.
Rev.3 10
CREATE RELAY MODELS
Figure 2.12: Selecting the relevant signals for the Measurement block.
• Let us now look at the signals of the 𝐼 > and 𝐼 >> blocks. First deactivate the Detail Mode and repeat
the steps from above for 𝐼 >. Select Iabs_A,Iabs_B, Iabs_C and yout from the Signals and the pickup
current setting Ipsetr from the Calculation Parameter variable set.
Rev.3 11
CREATE RELAY MODELS
• Finally, also take a look at the Logic block. Which signal is responsible for tripping the relay?
We will extend our newly created relay model by implementing new protection features. This is helpful when
you want to extend existing models with additional features.
Our current model has two instantaneous overcurrent blocks. We will add a voltage protection to the model.
The steps are basically the same: the relay frame will be updated first, then the relay type and afterwards the
relay is tested in the network. For this task one 𝑈 > (59) and one 𝑈 < (27) block will be added. We will not
only need a current transformer (CT) but also a voltage transformer (VT). The Measurement and Logic blocks
have to be changed as well.
• Place 3 new slots on the block diagram by selecting the from the drawing toolbox. Each of them will
represent a new block in our relay model.
• The next step is to select type and input/output signals of the new slots.
• The First new Slot should be named “VT”. This slot will represent the voltage transformer. Write StaVt*
in the field Class Name inside of the slot. For the VT block there are no input signals so this field will stay
empty. The output signals are:
U2r_A;U2i_A,U2r_B;U2i_B,U2r_C;U2i_C
Rev.3 12
CREATE RELAY MODELS
• The Next two new Slots are named 𝑈 > and 𝑈 <. Both slots have the same class name “RelUlim*”
and are expected to receive the same signals: voltage for phase a, b and c. The definition of how these
signals are processed is defined later in the block type. Also activate the option Automatic, model will be
created.
Rev.3 13
CREATE RELAY MODELS
• Make the corresponding changes in the Measurement and Output Logic blocks.
– The Measurement block should be able to receive information from the VT and to provide output
signals for the 𝑈 > and 𝑈 < blocks.
– The Output Logic should additionally support two input signals.
Rev.3 14
CREATE RELAY MODELS
• Connect all slots as shown in figure 3.3 above. In order to connect slots, use the Signal element from the
drawing toolbox and select two connection points.
• Open the relay type of our OCRelay in the Library and rename it as “OCRelayExtended”.
• Press Slot Update and the new slots with their corresponding block types will be automatically created.
Elements will be placed corresponding to the Sequence number specified in the slot dialog. Adjust the
sequence number if necessary.
• Now we need to set the new block types and change the existing ones:
– U>
Function: Overvoltage
ANSI Symbol: 59
IEC Symbol: U>
Voltage: 0.5-1.5;0.1
Time Delay :0.1-100;0.01
Reset Ratio: 95%
– U<
Function: Undervoltage
ANSI Symbol: 27
IEC Symbol: U<
Rev.3 15
CREATE RELAY MODELS
Voltage: 0.5-1.5;0.1
Time Delay :0.1-100;0.01
Reset Ratio: 105%
– Output Logic
No. of Inputs: 4
No. of Inputs per block : 4
• Open the relay element located at the motor cable and press Slot Update.
• Create a new VT with the ratio 415/110V. Update the VT Type to have 415 V as primary tap voltage.
• Set 𝑈 > to trip in 1 s if the voltage rises above 1,1 p.u. and 𝑈 < to trip in 1 s if the voltage drops below
0,9 p.u.
• Change the transformer type, so that it supports tap position adjustment in the range +-20. Execute the
load flow calculation and change the tap position of the transformer so that voltage drops below 0,9 and
rises above 1,1 p.u.
• Check that the relay trips as expected for over- and undervoltage conditions.
• In order to check if the relay trips or not, define a variable for fault clearing time (m:Tfct:_LOCALBUS) in
the result box for the Motor Cable.
Rev.3 16
CREATE RELAY MODELS
4 Summary
This concludes the exercise. Now it should be clear how to carry out the following tasks: