Professional Documents
Culture Documents
Hypersim User Manual 3 0
Hypersim User Manual 3 0
HYPERSIM
Copyright Notice :
Copyright by Hydro-Qubec, Inc.
All rights reserved. No part of the content of this document may be reproduced or transmitted in any form or by any means
without the written permission of Hydro-Qubec, Inc.
Revision History :
Date
Description of changes
June 2004
January 2005
June 2006
November 2006
March 2007
August 2007
Trademarks:
The following names are registered trademarks or trade names of their respective owners as listed below.
Name
Company
Relations :
This manual relates to the following objects.
Number
Description
Contents :
The software described in this manual are partially or entirely from licensed Hydro-Qubec software.
The material contained in this manual is partially or entirely from Hydro-Qubec documentation.
ii
Table of
Contents
Part-1
Chapter - 1
Chapter - 2
Chapter - 3
General
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
25
1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
25
25
31
32
32
32
32
. . . . . . . . . . . .
35
35
37
38
39
. . . . . . . . . . . . . . . .
41
42
44
44
45
45
45
3.3 Buses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
47
3.3.1 Drawing . . . . . . . . . . . . . . . . . . . . . . . . . . .
47
48
48
iii
Chapter - 4
iv
49
49
50
3.4.1 Drawing . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
50
51
51
52
53
54
55
56
56
57
Graphic Handling
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
59
59
4.1.1 Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
59
60
4.1.3 Polylines . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
60
60
4.1.5 Rectangle . . . . . . . . . . . . . . . . . . . . . . . . . . . .
61
4.1.6 Polygon. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
61
61
61
61
61
4.1.11 Zoom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
61
4.1.12 Rotation . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
62
62
62
62
62
62
63
63
63
4.4.1 Displacement . . . . . . . . . . . . . . . . . . . . . . . . . .
63
63
64
4.5.1 Group/Ungroup . . . . . . . . . . . . . . . . . . . . . . . . .
64
64
4.5.3 Alignment . . . . . . . . . . . . . . . . . . . . . . . . . . . .
64
65
4.5.5 Rotation . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
65
65
65
Chapter - 5
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
66
66
66
4.6.3 Grid. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
66
66
66
67
. . . . . . . . . . . . . . . . . . . . . . . . . .
69
69
72
73
5.4 Subsystems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
73
74
74
75
75
76
76
77
77
78
Chapter - 6
Chapter - 7
Chapter - 8
vi
78
78
78
79
. . . . . . . . . . . . . . . . .
81
81
83
84
84
. . . . . . . . . . . . . . . . . . . .
85
85
86
86
89
90
90
91
92
93
93
Customizing Hypersim
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
95
95
95
97
98
99
100
104
104
104
Chapter - 9
Chapter - 10
. . . . . . . . . . . . . . . . . . . . . . . . . . .
107
108
108
110
111
113
113
114
10.1 Introduction
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Chapter - 11
115
. . . . . . . . . . . . . . . . . . . . . . .
115
10.3 Snapshot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
116
10.3.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . .
116
10.3.2 Utilization . . . . . . . . . . . . . . . . . . . . . . . . . . . .
116
10.4 Load-Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
119
10.4.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . .
119
120
121
123
. . . . . . . . . . . . . . . . . . . . . . . . . .
129
11.1 SystemTools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
129
129
11.3 NetworkPassive . . . . . . . . . . . . . . . . . . . . . . . . . . . .
130
11.4 NetworkLines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
131
11.5 NetworkTransformers . . . . . . . . . . . . . . . . . . . . . . . . .
131
132
132
11.8 NetworkMiscellaneous . . . . . . . . . . . . . . . . . . . . . . . .
133
133
134
135
vii
Chapter - 12
136
136
Summary of Menus .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
137
137
139
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . .
139
139
140
141
141
141
Part-2
Chapter - 1
Chapter - 2
Chapter - 3
Chapter - 4
viii
. . . . . . . . . . . . . . . . . . . . . . . .
145
145
SI or pu system units
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
163
2.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
163
2.2 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
163
166
System Tools .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
169
169
172
172
172
173
174
174
. . . . . . . . . . . . . . . . . . . . . .
175
175
180
Chapter - 5
199
. . . . . . . . . . . . . . . . . .
203
5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
203
204
206
206
5.4.1 Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . .
206
208
210
210
211
5.5.1 Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . .
211
212
213
5.6.1 Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . .
213
213
214
216
5.8.1 Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . .
216
217
218
5.9.1 Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . .
218
218
219
220
221
224
226
5.11.1 Operation. . . . . . . . . . . . . . . . . . . . . . . . . . . .
226
226
227
5.12.1 Operation. . . . . . . . . . . . . . . . . . . . . . . . . . . .
227
227
ix
Chapter - 6
Chapter - 7
228
5.13.1 Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . .
228
229
230
5.14.1 Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . .
230
232
233
235
239
5.15.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . .
239
239
240
5.16.1 Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . .
240
241
241
5.17.1 Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . .
241
242
242
243
5.18.1 Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . .
243
244
Passive Elements .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
251
251
. . . . . . . . . . . . . . . .
255
261
262
267
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
271
271
271
272
274
Chapter - 8
Chapter - 9
Chapter - 10
282
285
291
294
300
300
304
307
313
7.4.1 DC Cable . . . . . . . . . . . . . . . . . . . . . . . . . . . .
332
Transformers .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
339
340
352
361
. . . . . . . . . . . .
370
378
392
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
407
407
413
421
426
431
440
440
440
. . . . . . . . . . . . . . . . . . .
449
449
449
451
xi
Chapter - 11
xii
10.1.3 Commands . . . . . . . . . . . . . . . . . . . . . . . . . . .
451
452
453
453
10.2.2 Breaker . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
458
460
460
461
461
463
463
464
464
464
465
466
467
. . . . . . . . . . . . . . . . . . . . . . .
469
469
11.1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . .
469
469
470
470
470
472
474
474
474
475
476
478
Chapter - 12
478
11.1.14 limits . . . . . . . . . . . . . . . . . . . . . . . . . . . .
479
11.1.15 () limitation . . . . . . . . . . . . . . . . . . . . . . . .
480
481
481
482
483
483
483
484
11.1.23 References . . . . . . . . . . . . . . . . . . . . . . . . . .
485
485
485
486
487
487
487
487
11.1.31 Protection . . . . . . . . . . . . . . . . . . . . . . . . . . .
487
488
11.1.33 Disturbances . . . . . . . . . . . . . . . . . . . . . . . . .
488
489
490
493
496
11.2.1 Parameters . . . . . . . . . . . . . . . . . . . . . . . . . .
501
502
503
510
. . . . . . . . . . . . . . . . . . . . . . . .
519
519
521
523
xiii
Chapter - 13
524
524
525
. . . . . . . . . . . . . .
527
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
537
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
549
Part-3
Chapter - 1
Chapter - 2
Function Details .
Part-4
Chapter - 1
xiv
. . . . . . . . . . . . . . . . . . . . . . .
567
567
1.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
567
568
569
569
569
570
. .
570
570
571
574
574
575
582
584
584
585
587
Chapter - 2
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
591
2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
591
591
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
591
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
593
593
2.5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . .
593
593
593
593
594
594
598
599
599
599
599
600
600
600
601
601
602
602
602
603
603
604
604
605
605
2.9.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . .
605
606
xv
Chapter - 3
606
607
607
2.9.6 Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . .
607
615
. . . . . . . . . . .
617
3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
617
618
618
618
619
619
621
Chapter - 4
Chapter - 5
xvi
. . .
625
. . . . . . . . . . . . . . . . . . . . . . . . .
629
5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
629
. . . . . . . . . . . . . . . . . . . . . .
630
5.2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . .
630
630
633
641
642
5.3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . .
642
642
643
644
662
663
664
5.4.1 Resistor . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
664
5.4.2 Inductor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
666
669
672
676
xvii
xviii
Part 1
Using the Hypersim Interface
2--23
2--24
Chapter 1
GENERAL
1.1 INTRODUCTION
This chapter provides a functional description of Hypersim. For a better understanding, it is
recommended to read the sections in order. A list of available models and interface menus is
provided at the end of the chapter for easy look up.
Hypersim is a software and hardware package designed to simulate Power System Networks.
Networks can be simulated off-line on workstations with one or many processors, or in realtime with parallel processors. In real-time, the simulated events take place at the speed they
would in a real environment. This allows to connect actual equipment to a network simulated
by Hypersim.
Power network simulation requires a large simulation capability. Hypersim must be able to
represent elements such as:
Power elements, including those for power generation, transmission, distribution and
consumption.
Control systems associated with elements for regulation, control and protection.
To cover the network part, Hypersim has a library offering most of the power elements. Control systems have their own library of basic control blocks. Hypersim also accepts diagrams
drawn with SimulinkTM.
A diagram simulated with Hypersim can contain power elements, control blocks or a combination of both types. In addition to the diagrams entered by the user, Hypersim can import or
export files in EMTP format.
1-1-25
General
Organization of Hypersim
TestView, the graphical interface for batch file testing (see Figure 1 - 5).
HYPERSIM, the graphical interface in Edition Mode is used for:
Building a diagram and entering graphical objects or text comments;
Entering the parameters of each element and sequences of operation;
HYPERSIM, the graphical interface in simulation mode is used for:
Performing the network analysis to see the validity of the entered power system;
Performing the task mapping according to the processors available and their interconnections;
Generating and compiling the simulation code;
Starting the simulation;
Defining the signals to be analysed that will be sent to ScopeView;
Entering the parameters of each element and sequences of operations.
ScopeView, the waveform visualization tool is used for:
Viewing the signals of the current simulation;
Viewing the signals of any previous tests saved in a file or database;
Performing any mathematical operation on any signal;
Saving the signal data in a multitude of format (data or picture).
HYPERVIEW, the graphical interface for tools such as netlist, load flow and snapshot
is used for:
Reading, changing or printing all of the parameters of the network of evidence;
Performing a Load flow on the power system and initializing the real-time situation
from that result;
Taking a snapshot of the network and saving it in a file. Future simulations can then
be re-initialized from that exact moment.
TestView, the graphical interface for batch file testing is used for:
Creating or executing batch files for automatic testing.
These modules intercommunicate via the rpc protocol. They can reside on one or many computers in the network. All those modules can be used either in real-time or off-line mode.The
following illustrations are the graphic captures of all the modules.
1-1-26
General
Organization of Hypersim
1-1-27
General
Organization of Hypersim
1-1-28
General
Organization of Hypersim
1-1-29
General
Organization of Hypersim
Figure 1 - 4 HyperView, the tool for NetList, Load flow and snapshot
1-1-30
General
Theory of Operation
STATION
STATION
Machine
Breaker
Breaker
Line
Transformer
(a)
Line
equation
(b)
Sub-station
equation
Line
equation
subsystem
subsystem
subsystem
Sub-station
equation
Load
subsystem
Reactor
1-1-31
General
The stations contain passive elements, sources, motors and also control systems of which
some have a much slower response time than that of electric transient phenomena. In practice,
the control systems can also be simulated simultaneously with other station elements.
In short, the simulation of a power system network can be executed by a series of parallel
tasks to simulate stations and related subsystems and lines.
Editing a
Diagram
With the interface in Edition mode, the diagram of the network to simulate is built by using
the element drawers specified by 12 in Figure 2 - 2 of Chapter . The network can contain
power system elements and control elements. The network can also be saved in a file or read
from a file.
1.4.2
Adding
Monitoring
Devices
Monitoring devices allow to observe the simulation results at slow rate (typically one refresh
per second). Once the network has been drawn and free of errors, user can add the monitoring
devices into the network diagram.
1.4.3
Analysis,
Simulation and
Control
Switching to Simulation mode allows to activate the analysis, simulation and control capabilities of Hypersim. The following operations can be executed in this step:
1 Define General Parameters . These parameters define the simulation step, the type of
simulation (real-time or off-line), the platform where the simulation is executed, etc.
2 Network Analysis. Used to analyse the topology of the diagram; identify lines, stations;
combine elements part of the same station; assign parallel tasks to lines and stations; identify
the control systems that can be executed by the parallel tasks.
The network is automatically analysed when the Simulation mode is activated. However, this
step has to be done manually when Preferences parameters are modified.
3 Task Distribution . Hypersim reads the information on the equipment selected for the sim-
ulation. This information contains the details on the number of processors, their performance
and their communication functions. Hypersim can then distribute to the processors the different parallel tasks established during network analysis based on the time allocated and the
communication functions required. In case of failure, Hypersim asks the user to change the
tasks distribution (for example: modify the simulation step).
1-1-32
General
4 Define Sensors. Each element (power system element or control block) has a list of sen-
sors allowing to observe signals. The user can select some of these to send them to the Spectrum or ScopeView Display Module. The list of sensors can also be saved in a file to be used
at a later time.
The sensors also allow connecting the signals of the simulated network to the outside world.
For example, it is possible to observe simulation signals with a real oscilloscope or to connect
external equipment to the simulated network.
5 Code Generation . Up to this point, only the required preparatory work was done. The
Simulation Module was not created and no simulation was executed. The Simulation Module
is specific to each network and the related parameters and codes must be generated and recompiled.
6 Simulate the Network/Stop the Simulation. The user then starts the Simulation Module
to simulate his network based on the general parameters defined in step 1. When a network
simulation is requested, Hypersim automatically executes steps 2, 3 and 5. However, these
can be launched manually to correct some abnormalities.
7 Acquire and Display Results. During the execution of the simulation, the user can launch
the ScopeView Module to observe the waveforms.
1-1-33
General
1-1-34
Chapter 2
INTRODUCTION TO THE GRAPHICAL INTERFACE
1-2-35
a) Starting window
Compilation host: name of the computer used to compile the generated codes.
Simulation host: name of the computer performing the simulation.
Hypersim is launched with an empty diagram as shown in Figure 2 - 2.
IMPORTANT
From Hypersim 9.1, many new features are added and
need HyperView to run correctly. If Hypersim is activated and HyperView is not present, launch HyperView by
clicking on HyperView button located in the upper part
of Hypersim window.
3
1
12
10
11
1-2-37
Edition mode: This mode is used to draw the network diagram and its control systems
and also to enter element parameters. Cosmetic graphic elements can be added to the
diagram, along with text explanations. In the graphic menus, the following functions
are available for each object: erase, cut, paste, move, rotate, resize, colour, etc.
In Edition mode, the objects in the diagram mainly consist of graphic characteristics
and have very few electrical characteristics.
Simulation mode: In this mode, the editing function is deactivated. The objects in the
diagram mainly have electrical characteristics. The menus in this mode allow to analyse
the network, start or stop a simulation, create disturbances, observe results, etc.
When switching from Edition mode to Simulation mode, the simulation is possible, but
can only be initiated with a user command.
Drawing Toolbar. Offers tools that are used to add text explanations and cosmetic drawings to the diagrams space (rectangles, polygons, lines, etc.). They have no effect on the
actual simulation).
Two exclusive selection buttons allowing to select one of the two interface modes: Edition mode to prepare the diagram and Simulation mode to simulate the network.The selected mode is displayed with a 3-D effect
Specifies the version of the graphic interface (Interface, version...), the Hypersim software version (HYPERSIM, version...) and the workstation name where the
interface is displayed (Display [workstation_name:1]).
The line at the top of the interface consists of the following menus: File, Edit, Graphics, View, Diagram, Special and Properties. When the user points to one of these
while pressing and holding the left mouse button, a pull-down menu is displayed. The
user can then select the desired command to execute. For a detailed descriptions of those
menus, please refer to section 16.1.
10
1-2-38
The actual zoom rate of the diagram. While pressing and holding the right mouse button
the available percentages of zooming are displayed. The user simply moves the mouse
on the desired percentage and release the left mouse button.
For displacement of the viewing window in both directions simultaneously. Simply click
on the rectangle and move it to the desired location.
8
Horizontal and vertical scroll bars used to move the diagram in the workspace.
Gradual zoom arrows. Used to zoom in on the diagram being edited. The up arrow allows
to zoom in, while the down arrow allows to zoom out. The zoom rate is shown in 5 .
The workspace where the user draws the diagram that will be simulated.
11
12
Filename of the diagram, empty if no name is specified (as in the example above). When
editing a diagram, an asterisk (*) before the name specifies that the diagram was modified, but not saved.
Tools palette with many drawers. Each drawer contains elements in one category. To
open a drawer, just click its label. Figure 2 - 2 shows all the drawers closed.
Clicking the small box to the left of a drawer allows to separate the full tools palette and
move it freely on the screen.
Filename containing the list of sensors that can be displayed. An asterisk (*) before the
name specifies that the list was modified, but not saved.
14
An oscilloscope
displayed next to an element indicates that sensors related to this
element were selected for display.
15
1-2-39
15
14
9
13
1-2-40
Chapter 3
EDITING A POWER SYSTEM DIAGRAM
Connections
Buses
Power
elements
Workspace
1-3-41
Select the required object in the diagram by left clicking it. The object is then marked with
handles.
1-3-42
Press the right button and hold. This displays the background menu with the commands that
can be used on the object. The required command is executed by dragging the pointer to it,
then releasing the right button.
Background Menus
1-3-43
Power System
Components
These elements are found in drawers whose title begins with NETWORK--. The drawers contain passive power system elements (lines, transformers, reactors), active power system elements (sources, machines) or electronically controlled elements (converters, breakers).
1 NETWORK--SOURCES+MACHINES. Power generating elements for a network: voltage
1-3-44
3.2.2
Control
Elements
Besides power system elements, Hypersim can also represent control systems by using its
own library of basic blocks. Part 1, Chapter 1, page 567 (describes how Hypersim can use
control diagrams built with SimulinkTM.
The drawers of basic blocks have a title beginning with CONTROL--. These are the following:
8 CONTROL--MATH. Blocks executing algebraic, trigonometric, logarithmic operations and
others.
9 CONTROL--LOGIC. Logical gates (AND, OR,...), comparators, logical delay, multiplex-
ing/demultiplexing.
10 CONTROL--NON-LINEAR. Used to calculate minimum and maximum, non-linear functions, modulators, delay generator, sampler.
11 CONTROL--SOURCES. Waveform and constant generators.
12 CONTROL--MISCELLANEOUS. abc<->dq conversion, integer<->floating conversion,
System Tools
3.2.4
Hypersim allows user to add his own models and in his personal drawer. User models are
those developed by user for his specific applications. They are stored in the users private library and accessible from user drawers.
Site models are specific for one installation site. They can be developed by site users and put
into library to be shared among users on the same site. Chapter 8, page 95, gives detail descriptions of user and site libraries.
1-3-45
1-3-46
3.3 BUSES
Drawing
For a three-phase bus and a multiplex bus, put the pointer in the start position, press and hold
the left button, drag to the final position, then release. The buses can only be horizontal or
vertical.
3.3.2
Sensor Label
and Symbol
Each bus has a label that must be unique in the network. During network analysis, Hypersim
checks if there are duplicate bus labels. In Simulation mode (described later), it is possible to
install sensors to measure the bus voltages. If at least one sensor is installed, a sensor symbol
resembling an oscilloscope will appear next to the bus label.
The following procedure is used to modify the label and position of the sensor symbol:
Select the required bus and display the background menu (see 3.1), to execute Edit label,
1-3-48
Output
Sensors
In edition mode, sensors can be used also as entry to the control block world. They
will connect internal signal of elements to be used by the control blocks.
Base Voltage
Each network bus has a base voltage that can be used to calculate the voltage in pu (per unit).
This parameter is used by the load flow module. It can be edited as follows:
Select the required bus and display the background menu, used to executeEdit base voltage,
The dialogue box in Figure 3 - 7a) is displayed and the base voltage can be defined in phasephase kV and r.m.s. value.
Instead of defining the base voltages for each bus, they can all be defined together in the same
dialogue box. To do this:
Display the general background menu (see Section 3.1) and select Edit base voltages
summary.
3.3.5
The dialogue box in Figure 3 - 7b) is displayed and the base voltages for all the buses can then
be defined.
Multiplex Bus
The multiplex bus is currently used to connect a three phases sections of the network to one
phase sections. In the future, it will allow to generalize to multiphase utilization. Parameters
can be assigned to the multiplex bus by selecting and using the background menu Edit bus.
The dialogue box in Figure 3 - 8a) is displayed to define the number of phases and the one in
Figure 3 - 8b) to define the phase labels.
1-3-49
Voltage
source
Current
source
Label
Internal
connector
Disconnecting switch
External
connector
Workspace
Drawing
Power system elements are found in drawers whose title begins with NETWORK. To draw a
power system element, open its drawer and execute the following:
1
Select the required element by clicking on the corresponding icon in the drawer.
In the workspace, position the pointer where the middle of the element is to be, then left
click. The element will then be displayed.
2
1-3-50
3.4.2
Sensor Label
and Symbol
3.4.3
Disconnecting
Switches and
Connectors
As for the buses, each power system element has a label that must be unique to the network.
When analysing the network, Hypersim will check for any duplicate label. In Simulation
mode (described later), sensors can be installed to measure the specific signals of an element.
If at least one sensor is installed, a sensor symbol is displayed next to the element label. To
change the label and the symbol position of a sensor, follow the same procedure as the one
described for buses (see Section 3.3.2).
1-3-51
4
1
Electrical
Parameters
To edit the electrical parameters of a power system element, the user has to select the element,
display its background menu and then execute the command Edit parameters. Figure 3 11 shows an example of a parameters control panel displayed with this command. The numbers in a circle specify the following:
1 Exclusive Selections parameter type. Defined by clicking on the required selection. The
selected parameter is in colour, while the others are in grey (not selected).
Some elements have an Inclusive Selections parameter type allowing to make many selections simultaneously.
2
1-3-52
3 Dial parameter type. Defined by positioning the pointer at the end of a dial needle, left
clicking and holding to set the needle to the required position. These dials also have a digital
display automatically updated as the needle is positioned. User can also type directly in the
digital display instead of moving the needle.
The displacement range of the needle can also be defined by providing minimum and maximum values.
4
Copying
Parameters
All the parameters can be copied from one element to another element of the same type (example: from one voltage source to another) as follows:
Select the reference element with the left button, and the destination element with the centre
button.
Use the background menu to execute the command Copy parameters. A dialogue box is
displayed to confirm
Bring the background menu on screen again, select Paste to copy the element having the
same parameters.
1-3-53
3.4.6
Showing
Parameters in
a Diagram
In the dialogue box, only one parameter can be selected at a time. To select other parameters,
the user has to re-execute Show parameters in the diagram.
Many parameters are identified with a number. They are for internal use and have no specific
function for the user.
Figure 3 - 12a) shows an example of an element with its parameters shown in the diagram. In
Simulation mode, the parameters shown are automatically updated when changes are made.
1-3-54
The user can hide parameters by selecting the corresponding element and executing in the
background menu Display results. The dialogue box for this command is shown in Figure 3 - 12c) which contains the list of parameters currently shown. Only one parameter can
be hidden at a time.
1
A
4
2
1
3
5
4
3
2
Bus
2
1
(a)
Key:
BusMPX
3
1
(b)
Click left button
Make sure no object was selected in the diagram (no object is surrounded by handles);
Click the connector to make the connection; the pointer transforms into an index
ifying that a connection is being drawn;
If the connection is ended by clicking the bus with the right button, then the connection consists of one straight line between the connector and the middle of the bus.
spec-
1-3-55
It is also possible to divert the connection by moving the pointer and left clicking at each diversion. The connection is ended when the pointer is positioned on the bus and a right click
is made. The connection segments can be either horizontal or vertical, except when there is
only one segment linking the connector and the middle of a bus.
Usually, the last segment ends at the middle of a bus as shown in Figure 3 - 13(a) with connection A linking Gen to the bus. A connection can be made to appear ending next to the
middle of the bus, such as connection B linking element Res. To do this, left click one
more time on the last segment (point 4) before ending the connection (right click while pointing to the bus).
Multiplex buses are used to connect multiphase elements to single-phase elements and vice
versa. Figure 3 - 13b) shows how to interconnect elements to a multiplex bus. The connection
of the Gen1 multiphase voltage source to the multiphase side of BusMPX bus is done following the steps above. The connections of single-phased R, L, C elements are done in the same
way, except that they are ended by right clicking on the dot representing the phase (a, b or c)
of the bus.
1-3-56
Level
t
t=0
(a) Positive slope
t=0
(b) Negative slope
1-3-57
STATION P
Part 1
L
Part 2
task 1
STATION P
Decpl
Part 1
task 1a
Part 2
task 1b
1-3-58
Chapter 4
GRAPHIC HANDLING
Buses, power system elements and connections are electric elements. These are all objects
that can be handled graphically. Similarly, control blocks to be discussed in Chapter are also
graphic objects in addition to being control elements.
It is also possible to create pure graphic objects such as texts or forms to add information or
improve the visual aspect of a diagram. These objects can be handled just like electric elements.
open
spline
curve
multibyte
text
text
polylines
closed
spline
curve zoom
straight line
polygon
rotation
ellipse
stroke
color
filling
color
stroke thickness
and type
gravity
font
grid
filling pattern
Text
To write lines of text: After selecting the tool Text, position the pointer where to start the
text, left click and start writing. Use Enter to change lines.
Changing text attributes (font, size, colour) will be discussed later.
To edit an existing text, select the text to be changed, select the text tool. You are now in edition mode.
1-4-59
Graphic Handling
4.1.2
Multibyte Text
Creating multibyte texts: these are texts in languages which do not use the latin alphabet (Japanese, Chinese, Arabic,...). To do this, select the tool Multibyte text, put the pointer at
the start position, left click and a dialogue box will be displayed to allow to enter the required
text.
Note : It should be noted that all the environment must first be defined with the required
language. The keyboard corresponding to the language must be used.
4.1.3
Polylines
To create a series of straight lines: select the tool Polyline, put the pointer at the start position, left click, move to next position, left click again, and so on. To end, click the middle
button.
To remove the break point and click the right button. To end, click the middle button.
To edit an existing polyline, select the line and click on the polyline tool. You are now in editing line mode.
Changing graphic attributes will be discussed later.
4.1.4
Adding
Diversions
Bus A
Straight
line
Bus B
Select the tool Polyline (see Figure 4 - 3). Point to the selected object at the place where a
diversion is required.
Left click to add a new diversion. The new diversion moves along with the pointer and it is
set using the left button.
1-4-60
Graphic Handling
4.1.5
Rectangle
To create a rectangle: select the tool Rectangle, put the pointer on the first rectangle corner,
while pressing and holding the left button, move the pointer to the opposite corner and then
release the button.
4.1.6
Polygon
To create a polygon: select the tool Polygon, put the pointer on the first polygon vertex, left
click, move to next position, left click again and so on. To end, click the middle button.
To remove vertex or edit an existing polygon, follow the same operations as the polylines.
4.1.7
Straight Line
To create a straight line: select the tool Straight line, put the pointer at the start position,
while pressing and holding the left button, move the pointer to the final position and then release the button. If in addition the Shift key is held, the line will be horizontal or vertical.
4.1.8
Open Spline
Curve
To create an open spline curve: select the tool Open spline curve, put the pointer at the
start position, left click, move to the next position, left click again and so on. To end, click
the middle button. A smooth curve is drew between the given points.
To edit an existing open spline curve, select the line and click on the polyline tool. You are
now in line editing mode.
4.1.9
Ellipse (or
circle)
To create an ellipse (or a circle): select the tool Ellipse, put the pointer on the first corner
of the rectangle enclosing the ellipse, while pressing and holding the left button, move the
pointer to the opposite corner, then release the button.
Press and hold the Shift key to draw a circle.
To create a closed spline curve: select the tool Closed spline curve, put the pointer at
the start position, left click, move to the next position, left click again and so on. To end, click
the middle button. A smooth closed curve is drawn between the polygon vertices.
To edit an existing close spline curve, select the line and click on the polyline tool. You are
now in editing line mode.
4.1.11 Zoom
Click the Zoom icon (see Figure 4 - 1). Press and hold the left button to draw a rectangle around the drawing part you want to enlarge (zoom-in), release the button.
To zoom-out, click the zoom-out arrow at the bottom on the working space
1-4-61
Graphic Handling
Selecting Objects
4.1.12 Rotation
Select the object you wish to rotate in the drawing, click the Rotation icon (see Figure
4 - 1) then rotate the object at will using the mouse.
Selecting One
Object
The object is selected by pointing and left clicking, the object will be surrounded by handles
to show that it has been selected.
4.2.2
Multiple
Selection
Left click the first object and click the following objects using the middle button. This button
can also be used to deselect a previously selected object.
The selected objects are surrounded by handles.
Surround the objects to select with a rectangle as follows: point to the origin of the rectangle,
press and hold the middle button and move the pointer to the final corner of the rectangle.
Release the button.
The selected objects are surrounded by handles.
4.2.3
Selecting All
Object
Select all the objects of a diagram using the menu Edit=>Select all.
1-4-62
Graphic Handling
To set an attribute: point to one of the attributes (example: Stroke color), press and hold
the left button to display a list of options. Then, drag the pointer to the required selection and
release the button.
When an object is created (power element, bus, control block, text or graphics), default attribute values are implied.
To change the attributes of existing objects, select them and then change the attributes.
4.3.1
Text Attributes
4.3.2
Graphic
Attributes
Stroke thickness and type: thickness of lines and contours, and also their appearance
Filling pattern: type of crosshatching in the filling area. For a closed form (polygon,
closed spline curve), the filling area corresponds to the inside section. If the form is not closed
(polyline, open spline curve), the filling area is established inside the closed contour by connecting the last point to the first point.
D
Displacement
When the pointer is on one or many selected objects, it takes the shape of a cross
to specify that the displacement mode was selected. Press and hold the left button and move the objects to their new position, then release the button.
4.4.2
Changing Size
When an object is selected, it is surrounded by a rectangle whose corner and middle points
are marked with handles. When the pointer is on one of the middle points, it takes the following shapes:
,
,
,
specifying that the horizontal or vertical size change
mode is activated. Press and hold the left button and move the pointer until the required size
is obtained, then release the button.
However, if the pointer is on one of the small corner handles, it takes one of the following
shapes
,
,
,
which allows to change the size in both directions using the same
zoom factor. To change the set size, press and hold the left button and move the pointer until
the required size is obtained, then release the button.
1-4-63
Graphic Handling
2
polyline/
adding diversions
rotation command
4.5.2
Group/
Ungroup
Front / Back
Menu Graphics=>Front: put the selected objects in the front of others which are
overlapped with it.
Menu Graphics=>Back: put the selected objects in the back of others which are overlapped with it.
4.5.3
Alignment
1-4-64
Graphic Handling
The dialogue box in Figure 4 - 4 shows a list of different alignment options. Alignment can
be vertical (Top/Bottom) or horizontal (Left/Right). The option As Is means that
there is no alignment for the current direction.
4.5.4
Vertical/
Horizontal flip,
Left/Right flip
4.5.5
Rotation
To make a rotation on one or many objects: select the object(s), select the Rotation tool
on the graphics tool bar. Point to one of the selected objects, the pointer changes into
,
press and hold the left button and make the rotation until the required position is reached, then
release the button.
If you point on the disconnecting switch of a power system element the disconnecting switch
will rotate. Buses and connection can not be rotated.
It is also possible to make 90o clockwise rotations by using the main menu Graphics => Rotate CW.
4.5.6
Changing
Orientation
4.5.7
Cut, Delete,
Copy, Paste,
Duplicate
Menu Graphics=>Orientation: change the orientation of the diagram from landscape to portrait or vice-versa.
These operations are done either using the main menu Edit, or with the background menu.
Menu Edit=>Cut or background menu=>: Cut. Cuts the selected object and put it
on the clipboard.
Menu Edit=>Delete or background menu=>Delete: Cut the selected object without putting it on the clipboard.
Background menu=>Copy: put the objects on the clipboard.
Menu Edit=>Paste or background menu=>Paste: Paste the clipboard objects on the
diagram.
If the paste operation immediately follows the copy, the image is pasted at the exact
same place as the original image. A displacement needs to be done to separate both
images.
A copy of a grouped elements changes the labels of each element in the group (command group).
Edit=>Duplicate or background menu=> Duplicate: duplicate the selected objects.
The duplicate image is slightly off-shift with respect to the original image.
A duplicate of a group of elements does not change the labels in the group (command
group). This is useful a system in a new drawing.
1-4-65
Graphic Handling
Global Operations
Searching for
an Object
This operation is quite useful in a complex diagram to search for an object using its label. To
do this:
4.6.2
4.6.3
Cancelling /
Restoring Last
Operation
Grid
Menu Edit=>Undo or background menu=>Undo: cancel the last 20 operations (example: put back a cut object) one at a time for each cancellation.
Menu Edit=>Restore or background menu=>Restore: restore the last 20 cancelled
operations one at a time for each restoration.
The menu Graphics=>Options=>Grid... allows to define the grid spacing (in a dialogue
box). The spacing can be in pixels, points, centimetres or inches.
The grid can be made visible or not using the action button Grid on the graphics tool bar (
at the far-right of Figure 4 - 3)
If the button Gravity of the graphics tool bar is pressed, object displacement, rotation or sizing will not be smooth and the objects will move in short bursts from one space to another in
the grid. The changes will be smooth if the button is not pressed.
4.6.4
Size of Printed
Image
4.6.5
Diagram Views
The diagram view can be moved in the workspace either using the horizontal and vertical
scroll bars, or continuously by pressing the Control key, while pressing and holding the middle button to move the view. During the displacement, the pointer takes the shape of an open
hand. Views can also be changed using View menu:
View=>Normal size: put the diagram in normal size.
View=>Center page: centre the diagram relative to the workspace.
View=>Reduce to fit: optimized view of the diagram in the workspace.
View=>New View Open another window in Hypersim to display the same diagram.
The displacement in this view and the zoom factor do not affect the other views.
View=>Close View Close a view created with View=>New view.
1-4-66
Graphic Handling
1-4-67
Graphic Handling
1-4-68
Chapter 5
EDITING CONTROL SYSTEMS
Connector label
Connection (single)
Single connector
Multiplexed connector
3
1
2
Connection
(multiplexed)
1-5-69
The basic control blocks are found in drawers whose title begins with CONTROL--.
SimulinkTM control blocs, User Code Blocs and Sub-systems are accessible through icons
named SimulCtr, UserBloc and SubSyst respectively, all are in SYSTEM--TOOLS drawer.
A control system can be built in a hierarchical way, it means that the control system is composed of basic blocs, Simulink blocs, User Code Blocs and sub-systems. Inside a sub-system,
we will find also the same composition as above and so on.
To create a control block in a diagram:
A
Open the drawer containing the required block, left click the block
In the workspace, point to where the middle of the block will be and left click. If it is a
basic bloc, it is immediately displayed. In the cases of SimulinkTM, User Code Bloc
and Sub-systems, a dialogue box will appear to allow entering their file name before the
bloc is displayed in the diagram.
Since the block is also a graphic object, all the graphic operations discussed in Chapter
can be executed (displacement, rotation, zoom, colour change, etc.).
Figure 5 - 1 shows a simple control block diagram and the related terms:
1 Block Label: Block identifier. It must be unique
as an empty arrow, it has only one pin and carries only one signal. A multiplexed connector,
represented as a solid arrow, has many pins and carry as much signals as the number of
pins. In term of direction, there are input connector and output connector.
3 Connector Label: Connector identifier. It cannot be modified by the user.
4 Signal: A signal is a variable (varying with time) generated by each pin of the output con-
nectors of blocks. A single connector has only one signal with one signal label which is the
same as the connector label, a multiplexed has many signals, each has its own signal labels
which is different from the connector label.
To see the signals label of a connector, point at the connector, hold the Control key and click
the left mouse button. A window as shown in Figure 5 - 2 appears to give the list of signal
labels as well as the corresponding signals name
1-5-70
Control Blocks
Example:
Example: In Figure 5 - 1, The signal generated at the output of the
block Sin is named y_Sin,
Signals generated at the multiplexed connector XA of the block
SubSys1 are named XAr_SubSys1 and XAi_SubSys1
Signal can be of type floating point or integer. A single connector carrying a floating point
signal is in black. If it carries an integer signal, it is in red. A multiplexed connector carries
many signals of different types, it is always in black.
5 Connection: Is a set of straight lines linking an output connector to an input connector.
The control connections are in blue by default to set them apart from the power connections
which are in black by default. User can however change freely these colours.
A single connection which carries only one signal is drawn with thin lines. A multiplexed
connection carries more than one signals, it is drawn in thick lines.
1-5-71
1-5-72
Block Parameters
For single connectors, both connectors linked to a connection must be of the same type
(float with float, integer with integer). Hypersim warns the user when there is conflict.
In such a case, a block F_to_I (conversion of float to integer) or I_to_F (conversion
of integer to float) must be inserted. Both of these blocks can be found in the drawer
CONTROL--MISCELLANEOUS).
5.4 SUBSYSTEMS
Subsystems allow to organize a diagram in a hierarchical way: A diagram at its opening in the
main window contains basic power elements (RLC elements, transformers, lines, machines,
loads,...), basic control blocs (adder, gain, transfer function,...) and subsystems which in turn
contains basic power elements, basic blocs and other subsystems, etc.
Subsystems help also to make complex diagram more modular and easier to read. Frequently
used subsystems can be archived in library for easy access and sharing with other users.
Subsystems can be built in two ways:
Create its detailed diagram, save it before using it in another diagram,
Select a part of the current diagram and execute a command to create a subsystem with
the selected part.
Note: Subsystem is the more general form of super-bloc and super-model found in Hypersim
of version prior to 9.0. Subsystem replaces these older forms and is compatible with them.
1-5-73
Same label
Same label
Multiplexed
input port
Single
input ports
Multiplexed
Output port
Power
terminal
1-5-74
Creating
Control Ports
5.5.3
Creating
Power
Terminals
Using a
subsystem in a
Diagram
Open the drawer SYSTEM--TOOLS, choose the icon ExtConn, then click on the diagram at the desired location.
The power terminal appears, its connector can then be connected to an power element
or to a bus-bar.
The detailed diagram of a subsystem must be saved in a file before using it.
To put a previously created and saved subsystem in a diagram:
In the drawer SYSTEM--TOOLS, select the icon SubSys;
Point to the desired location and left click. A dialogue box allows to specify the
filename of the subsystems detailed diagram.
A subsystem is then added in the diagram (Block SubSys in Figure 5 - 4a). Its input / output
connectors and power connectors have the same labels as those of input ports, output ports
and power terminals of the detailed diagram.
The connection of this subsystem to other blocs and power elements is done following the
usual method.
The predefined parameters of all blocks and elements within a subsystem will be the its default parameters. Subsystems dont have parameter forms. To change its parameters, user has
to open its content (detailed diagram) by double clicking on it or executing the background
menu SubSystem content. The detailed diagram is then shown in a separated window, parameters of elements and blocs in this window can be changed as usual. To close this window,
execute the command File=>Close subsystem on its main menu bar.
If the same subsystem is used many times in the same diagram, then each has its own series
of parameters. Changing the parameters of one does not affect the parameters of the other.
1-5-75
5.5.5
Changing the
Detailed
Diagram of a
Super-Block
Changing the
Order of the
Input / Output
Connectors
Once a subsystem is used in diagrams, it is still possible to change its detailed diagram.
Hence, the user can delete or add other blocks. When reading a diagram containing subsystem
Hypersim will update their contents if changes have been made to them.
If all control ports and power terminals are preserved, the connections to the modified subsystems will also be preserved. Otherwise, only connections to unchanged ports and terminals
are preserved and user has to re-establish other connections.
By default, the input/output connectors of a subsystem appear in the order they were created.
To change this order, the user must reopen the detailed diagram file in the main window and
execute the background menu Change Inports/Outports order. The dialogue box
shown in Figure 5 - 5 is displayed to define the new order by changing the numbers in the
column Rank.
1-5-76
Create
subsystem
subsystem
created
Selected area
(a)
(b)
Subsystem
content
(c)
1-5-77
For a subsystem previously saved in a file before being inserted in a diagram, its content is linked to this file and can not be changed by default. To make the content editable, one must select the subsystem and issue the background menu Disable link. A star
(*) will appear beside the subsystems label to indicate its Disable link status. The subsystems content is not linked any more to the file. Any change to the subsystem content will not affect the file content.
After modifying its content, one may want to update the file content. This is done by
selecting the subsystem and executing the background menu Restore link. A confirm
message will pop up to ask if the user really want to replace the file content with the
new subsystem content. If this is confirmed, the star (*) will be removed from the subsystems label.
The window displaying the subsystem content has no drawing tools neither model drawers.
The only editing functions one can do directly in this window is move, cut, paste and make
connections. To add new drawings or models in this window, one has to do the following little
trick: add it in the main window, then cut it and paste it into the subsystem content window.
Opening /
Closing
subsystem
content
5.8.2
Subsystem
Sensors
A subsystem has sensors for all signals available at its output ports. The user can also open
its content to access any sensors on blocks or elements in this diagram.
5.8.3
Changing
Parameters
There are no subsystem parameters form. In the Simulation mode, it is however possible to
open its content and change the parameters of blocks and elements in this diagram. If the simulation is in progress, the changes to the parameters will take effect almost immediately. Otherwise, they will take effect when starting the next simulation.
1-5-78
Bloc Array
Create
bloc array
(b)
(a)
Subsystem
content
(c)
(a) Bloc to be used to create a block array
(b) Bloc array created, same form as original bloc but shaded
(c) Content of the bloc array
1-5-79
1-5-80
Chapter 6
INTERCONNECTING CONTROL BLOCKS AND
POWER SYSTEM ELEMENTS
Filter
Many elements have both power connectors and built-in control connectors. Such elements
allow to interconnect control blocks to the power system network.
1-6-81
An example is shown in Figure 6 - 1 where the element Vmes (bus voltage measuring unit) is
connected to bus MTL via its power connector. Its output control connectors generate signals
a, b, c corresponding to the measured voltages. These signals are then directed to other control
blocks.
The controlled voltage source Vsrc receives control signals Va, Vb, Vc to generate power
voltages. These voltages are linked to bus MTL via the power connector Vsrc.
The following elements have both power and built-in control connectors:
Drawer NETWORK--SOURCES+MACHINES
HydCmd: hydraulic synchronous machine with the possibility of having external regulators.
ThermCmd: thermal synchronous machine with the possibility of having external regulators.
CrossCmpc: cross-compound synchronous machine with the possibility of having
external regulators.
AmpV: controlled single-phase voltage source.
AmpV3: controlled three-phase voltage source
AmpI: controlled single-phase current source.
AmpI3: controlled three-phase current source.
Drawer NETWORK--LOADS AND MOTORS
IndMotor: Induction motor.
Drawer NETWORK--CONTROLLERS+SWITCHES
Inv_12: inverter, 12 pulses.
Rect_12: rectifier, 12 pulses.
Inv_6: inverter, 6 pulses.
Rect_6: rectifier, 6 pulses.
TSC: thyristor controlled RLC branch (TCS type).
TCR: thyristor controlled RL branch (TCR type).
Switch: electronic switch.
BrShunt: breaker shunt.
BrSerie: serial breaker.
BrShMono: breaker shunt, single phase.
BrSerMono: serial breaker, single phase.
Br2LMono: triple H-bridge converter, single phase.
Br3Level: 3 level bridge.
drawer NETWORK--MISCELLANEOUS
1-6-82
A scope symbol and a control connector will appear beside the element. The connector
is single (empty arrow) if only one signal is selected, otherwise it will be multiplexer
(solid filled arrow).
With this new control connector, user can then connect it to any other control blocks to perform the desired operations. An example is shown in Figure 6 - 2b: The bus bar voltages of
Bus1 and the currents of element Ld are sent out through their sensor signal connectors.
Control blocks are added to perform the multiplication of voltage and current of each phase,
then the summation of 3 phases to produce the total active power.
Line
Station A
Station B
Transceiver
Decpl
Station A
Station A
Part 1
Part 2
Transceiver
Transceiver
Blocks
In a network with power elements, control blocks are directly or indirectly connected to at
least one power element. These blocks are normally simulated in the task which simulates
also the power element(s).
The organization of Hypersim into parallel tasks does not allow the direct connection of control signals from one task to another. To communicate control signals among tasks, it is necessary to use a transceiver block (transmitter-receiver) between two different tasks, as shown
in Figure 3 - 3. There are two types of transceiver found in the drawer CONTROL--MISCELLANEOUS:
TrcverF: transceiver for float type signal;
TrcverI: transceiver for integer type signal.
1-6-84
Chapter 7
MONITORING OF SIMULATION RESULTS
Hypersim has the possibility of monitoring results. It means displaying results and update
them periodically at moderately slow speed, about once every second. Therefore, results to
be monitored must be slow varying like machine speed, bus r.m.s.voltages, DC voltage, etc.
Various monitoring devices, or simply monitors, are available, some are already in the model
parameter form, others are added by user into the network diagram.
The control of monitoring devices is done via HyperView, therefore HyperView must be active and connected with Hypersim. If it is not the case, click on the HyperView button on
the upper part of Hypersim window to activate it.
1-7-85
Monitors
Figure 7 - 1 Monitors already created in the hydraulic machine model parameter form.
7.2.1 Monitors
associated
with
element or
block
1-7-86
To create this kind of monitor, select the network element or the control block, right click and
select the menu Display Results, this will bring up the dialogue shown in Fig. 7 - 2 which
allows to define various monitor characteristics and gives the list of monitors already created,
either in the component parameter form or in the network diagram.
Title
Value
Units
Scalar form
Digital form
1-7-87
User can select a monitor from the list, its name will be shown in Result name, click OK and
the dialogue box shown in Fig. 7 - 3a will be brought up to allow to define following additional informations:
Total number of digits: width of the display area.
Number of displayed digits: number of digits used to display the monitored value. If
this value can not fit inside the number of displayed digits, the exponential format will
be used.
...
Result type: the monitored values are calculated with the above expression using samples in the data acquisition window defined in HyperView (described later). The result
of the calculation can be RMS, AVG, MIN, MAX, First, Last which mean respectively
the r.m.s. value, average value, maximum, minimum, First or Last value in the data
acquisition window.
Units: measurement units of value displayed in the monitor (see Fig. 7 - 2).
1-7-88
Minimum and Maximum: Range of the monitored value, used for scaling and clipping
purpose when value is displayed in scope format (described later). Entered 0 for both
Minimum and Maximum for automatic scaling/clipping.
Total number of digits and Number of displayed digits have the same meaning as in
Fig. 7 - 2a.
When all parameters are defined, click OK. A monitor is added into the network beside the
selected element or block. User can then move it to a desired location but the relative position
between the monitor and the associated element/block will be preserved. When the element/
block is moved, the monitor will follow.
A monitor is also a graphic component, it means that user can change its size, colour, line
type, font, etc. using graphic tools.
7.2.2
A monitor can also be added into the network diagram without selection of a network
element or a control block.
General
purpose
monitors
Digital
form
Scalar
form
Newly
created
monitors
Monitor
icons
Figure 7 - 4 Creation of general purpose monitor using tools in the System tools
To do this, open the drawer System-tools as shown in Fig. 7 - 4, select one of the two icons
DIGITAL or SCALAR to create a monitor in Digital or Scalar form respectively, then click
a desired location in the network diagram. A monitor is added with default parameters. Double click on the monitor to bring up the dialogue box shown in Fig. 7 - 3b to define its parameters as before.
1-7-89
Monitors created this way are not graphically related to any network element or control block.
They can be moved freely inside the network diagram. Their expression can however contain
signals coming from any element or block.
Expression
with simple
functions
...
1-7-90
Expression Editor
Signal section contains the type (or model category) and the list of signals available for
this type. Click on
of the current type will present a dropped-down list (Fig. 7 - 5b)
of all available types of the current network (Breaker, Bus, Line, etc.), select a desired
type to get the list of all signals belonging to it.
Click on a signal to add it into the Expression field (or type it). If a function (see below)
is presented, the selected signal will be used as the function argument.
Function section allows to enter a mathematical function into the expression. f x is the
name of the function that will be applied on the next selected signal. Click on
will
show a dropped down list (Fig. 7 - 5c) of all available functions of single argument. The
Advanced... button will help to use all available functions of one or many arguments.
7.3.2
Expression
with advanced
functions
By clicking on Advanced, the Expression editor will take the form shown in Fig. 7 - 6 with a
section for Advanced Function Editor which containing the following items:
1-7-91
The lower section allows to enter the arguments of the currently selected function. For
instance, the example shown in Fig. 7 - 6 uses Harmonic function to calculate a list of
particular harmonics of a signal. It need a Signal which is selected from the list on the
left side (Signal can also be an expression), a Harmonic list, the Fundamental frequency
and the option telling that the given fundamental frequency is either exact or an approximated value.
This section varies depending of the function arguments.
The Add button will add the function with its defined arguments into the
Expression field.
The Close button closes the Advanced function section.
Start monitoring
Stop monitoring
Show a scope for each selected monitor
Show a multi-signal scope for selected
monitors
Edit the selected monitor properties
Figure 7 - 7 Hypersim and Hyperview windows with monitoring controls and displays
1-7-92
Monitors Operations
7.4.1
Monitor
controls in
HyperView
The following controls and display functions are available via HyperView.
Start monitoring: when started, value are refreshed at about once every second for all
monitors on the diagram, in opened parameter forms and also in the monitors display
area of HyperView.
Stop monitoring.
Show a scope for each selected monitor: User selects monitors presented in the monitor
display area and clicks this command, a ScopeView-like window will appear as shown
in Fig. 7 - 8a to plot the monitored values. If the window is already opened, the traces
of selected monitors will be added into this window.
Show a multi-signal scope for selected monitors: Same functionality as the previous
command, except that the selected monitors curves will be superimposed.
Edit the selected monitor properties: This command allow to modify the monitor characteristics. It pop up a window with about the same informations to be edited as in Fig.
7 - 3b.
To calculate the monitors values, data acquisition must be performed using these 2
parameters: Duration and Sampling rate. Duration covers normally one or two cycle
(example: 0.03333 s. for 2 cycles of a 60 Hz network). Sampling rate must be chosen
considering the functions used in the monitor expression (to get correct result for harmonic calculation for example).
7.4.2
Monitor
controls inside
the network
diagram
Editing the monitor properties: double click on a monitor in the network diagram. The
same dialogue box as in Fig. 7 - 3b will appear allowing to make necessary modifications.
Showing monitored value in scope form: In Simulation mode, right click on a monitor
and select Show Scope. A simple scope appears as in Fig. 7 - 8b and show a single trace
of the selected monitor.
1-7-93
Single signal
plots
Multi-signal
plot
1-7-94
Chapter 8
CUSTOMIZING HYPERSIM
Properties
Menu
The Properties menu is found on the main menus bar. By pointing to this menu and pressing and holding the left button, three menus can be executed: Directories, Simulation
and Files.
1 Directories Menu. When executing this menu, the dialogue box in Figure 8 - 1 is displayed
to specify the following directories:
1-8-95
Customizing Hypersim
Customizing Hypersim
SI database directory.
The SI5 database is used for the acquisition and processing system and
has its own directories, a single one for each test series or study.
The database is used with a post-processing software to execute these
test and produces result tables.
Code generation directory.
The data exchange with EMTP is described in Part 1. The EMTP files
are kept in this directory.
Diagrams directory.
The blocks coded by the user are described in Part 1. These blocks are
kept in this directory.
Simulink blocks directory.
The Simulink blocks are described in Part 1. These blocks are saved in
this directory.
At the bottom of a dialogue box, there are three buttons allowing to execute the following
commands:
1-8-96
Cancel.
Apply.
Customizing Hypersim
Customizing Hypersim
Save.
save the parameters above along with other Hypersims properties in the
file
~/HYPERSIM/Hypersim.res
to use them in the next session.
2 Simulation Menu. This menu opens a dialogue box nearly identical to the one in Figure 9
- 3, Chapter 9 the only exception being that there is an additional Save button at the bottom.
This button serves to save the parameters in the file
~/HYPERSIM/Hypersim.res
fault suffixes for files of diagrams, parameter forms and sensor configurations. The user just
has to specify the filename and Hypersim will automatically add the suffix. These parameters
can also be saved in the file
~/HYPERSIM/Hypersim.res
Language
Used
Hypersim can be used in French, English or Japanese. The language is chosen with the environment variables LANG and LC_ALL defined by en (English), fr_CA (French Canadian) and
ja (Japanese).
Example:
If
setenv LANG fr_CA
setenv LC_ALL fr_CA
Customizing Hypersim
Library Management
8.2
LIBRARY MANAGEMENT
Hypersim has its base model library including power elements and control blocs. Beside the
base models, other models can be added:
Site models: those are particular for an installation site and available for users on this
site. They can be delivered in Hypersim package or developed by the site users and then
archived in the library to share with all users in the same site.
User models: They are developed by user and archived in the user library located in his
private directory.
All models are organized as different categories and kept in separated drawers as shown in
Figure 8 - 2. In this figure, there are only one drawer for site models and one for user models
but Hypersim can accept more than one for each. For instance, all site or user models can be
divided in many categories and each one is kept in a separated drawer. Drawers of base models are marked with a red rectangle, those of site models with a blue circle and those of user
models with a yellow triangle.
Once a model has been in the library, inserting it in a diagram is done as with any base model:
open the appropriate drawer, click on the models icon, then click on the desired location of
the diagram, the model will appear at this location.
User can only add models to site library and user library. These models are limited in the following types:
models built using subsystems,
models built with SimulinkTM,
user code bloc (UCB) models.
1-8-98
Customizing Hypersim
Library Management
8.2.1
Library
Directories
1-8-99
Customizing Hypersim
Library Management
Library of
Models Built
with
Subsystems
Subsystem is describe in Chapter 5. Before adding the model in the library, the subsystem
must be already created and saved in a file. There are then two ways to add a subsystem as a
model in the library:
Add/Update a model previously saved in a file,
Add/Update a model with a subsystem selected in current diagram.
1 Add / Update Model Previously Saved in a File. To do this:
1-8-100
Customizing Hypersim
Library Management
Family.
Drawer.
Define the drawer where the model will be added to. Click on Browse...
to select an existing drawer from a list or type in a drawer name. If the
given drawer doesnt exist, it will be created.
Model name.
Type the new models name or click on Browse... and select an existing
name from a list. Model name must be composed of alphanumeric characters only.
not used here (used only for network elements and control blocks).
Graphic
tools bar
1-8-101
Customizing Hypersim
Library Management
Label prefix.
Characters that will be put ahead of the models label when the model
will be inserted in a diagram.
Indicating if the models label will be shown or hidden when the model
is inserted in a diagram.
Label position.
Position of the models label relatively to model graphic. Click the desired radio button.
Sensor position.
Sensor symbol is a tiny scope symbol beside the models label. The sensor position is defined relatively to the label position. Again, click the
desired radio button.
Build...Model graphic.
Click on this button to draw the models icon that will be seen in the
drawer when it is opened. A new Hypersim window as shown in Figure
8 - 5 will appear to allow drawing this icon. The model icon is purely
graphic, use therefore tools in the graphic tools bar to build it. The size
of the icon should not be greater than 1cm x 1cm, the font use should less
than 12 points.
Note: Use the menu Graphic->Option->Grid to define the grid spacing,
then click on Grid button to turn grid on/off.
Name written below icon.
Short name (less than 8 characters) which will appear below the models
icon in its drawer.
Build...Model parameter form.
Click Cancel to ignore every thing and close the dialogue. OK to terminate. If OK is chosen, the following message
File XXX
must be MOVED or COPIED to
YYY
lets user choose between moving or copying the subsystem detailed file
into the library directory.
Now, the procedure of adding / updating the model in the library is completed. Open the appropriate drawer, one can see the icon of the new or updated model in it. Click on this icon to
select it, then click on a location in the diagram the model will appear and usable as any other
model.
1-8-102
Customizing Hypersim
Library Management
2 Add / Update Model with a Subsystem selected. If a subsystem exist in the current
working diagram, we can add the model of this subsystem to the library by the following way:
into a diagram, user can ask to display its graphic content by executing the command Subsystem content. This graphic content can not be modified by default (except the components parameters).
To modify locally (for the current diagram only and not in the library), user goes to the Editing mode, selects the subsystem and issues the command Disable link. This command remove
the link between this particular subsystem and the one in the library. A star (*) appears beside
the subsystem label to indicate that it is not linked any more to the library. The user can then
edit freely this content without affecting the library and other subsystems of the same model.
1-8-103
Customizing Hypersim
Library Management
After modifications, one can reconnect the selected subsystem to the library by giving the
command Restore link. A pop-up message will ask the user to select
Ignore change: ignore any modification and get back to the library model.
Update file: update the library model with the modifications.
When the link is restored, the star (*) will be removed from the subsystems label.
When a model in the library has been modified using Restore link, to make sure that the current network uses the latest modifications, the user needs to reread the current network
file (using File->Open). The file reading updates automatically all subsystems taken from the
library in the diagram.
8.2.3
Library of
Models Built
Using User
Code Bloc
(UCB)
UCB is a Hypersim utility which allows the user to build a model using C-like codes. Details
concerning how to build a model using UCB are given in Part 4, Chapter 2.
The procedure to add / update a model built with UCB is about the same as the model built
from a subsystem. The differences are (see Figure 8 - 4):
Family.
Select UCB.
If nothing is done here, the default parameter form of the UCB will be
used. For most cases, this is satisfactory. If however a customized parameter form is desired, then user can click this button and follow the
procedure describe in Section 8.2.5 below.
8.2.4
Library of
Models Built
from Simulink
The procedure to build a model using Simulink and make it usable in Hypersim is described
in Part 4, Chapter 1. Once the model is tested, it can be put in the Hypersim library in the same
way as a subsystem model. The sole differences in filling the dialogue of Figure 8 - 4 are:
Family.
Select Hyperlink.
Building the
Parameter
Form
1-8-104
In the current version of Hypersim, models built with subsystem and Simulink dont have
particular parameter form. Only models built with UCB have it and the default form is quite
satisfactory. If however a customized parameter form is desired, then the user can click the
button Build...Model Parameter form to bring up the form editing window as shown in Figure 8
- 7a which has all the same graphical editing capabilities as the Hypersim main window.
Along its side bar, there are tools to create parameter entries which can have various type
(text, scalar, toggle, etc.), some of them are shown in this figure (a white graphic box has been
added under each entry).
Customizing Hypersim
Library Management
(b)
(a)
Figure 8 - 7 (a) Form editing window, (b) Dialog to define
parameter informations
To add an entry in the parameter form, user processes as follows:
select the desired type from the side bar,
click in the window, a parameter entry appears with default informations,
with the parameter entry selected, execute the background menu Edit parameters, this
will bring up the dialogue shown in Figure 8 - 7b to define the following informations:
- Label: parameter name,
- Default value: default value,
- Unit: measurement unit,
- Identifier: integer number used to identify the parameter. Parameters name and
identifier are obtained using the command formpar of the UCB utility.
- Minimum, Maximum: allowable range of the parameter. Hypersim will check if the
parameter falls inside this range and warn otherwise. By giving 0.0 to these items,
Hypersim will skip this verification.
- Visibility: the parameter can be always shown (Always), always hidden (Never) or
shown only for advanced user of Hypersim (Never for beginner).
1-8-105
Customizing Hypersim
Library Management
- Read only parameter: the change of some parameter needs to regenerate the code.
Change of these parameters must not be allowed (Yes) during the simulation.
Otherwise the change of the parameter is permitted (No).
If Yes is chosen, the parameter entry in the form will become light grey during the
simulation and the user can not type in a new value.
1-8-106
Chapter 9
SIMULATION AND CONTROL
2
1
Figure 9 - 1
Once a diagram is built, the Simulation mode can be activated by clicking the Simulation
button specified by 2 in Figure 9 - 1. Hypersim then goes into simulation and control mode,
but the actual simulation does not start automatically.
Hypersim quits the Editing mode and analyses the diagram. It warns the user of any mistake.
Some of these can be fatal and force the user to go back to the Editing mode to make corrections.
If there is no mistake, the user can then:
Install sensors to observe the results of the simulation using Spectrum or Scopeview;
Define the general parameters of the simulation;
1-9-107
9.1
9.1.1
Sensors are used to make signals observable. Each bus, power system element and control
block has a list of signals. The user can install sensors on some of these and observe them
with Spectrum or Scopeview.
To display the list of signals, point to the label of a bus, power element or block, then press
and hold the right button. A pop-up menu is displayed. Select Edit sensors. A panel similar
to the one in Figure 9 - 2 is displayed and provides the list of available signals.
To place or remove a signal sensor, click the check box to the left of its name: an X will then
be added or deleted. To place sensors on all of the signals, left click Select all.
1-9-108
Figure 9 - 2
The sensor control panel consists of columns with the following information:
Signal.
Description.
The generic name is repeated here by default. The user can change it.
Unit and Base. The default values are the following: Unit for voltages is V, Unit for
currents is A and the conversion Base is 1.0. Other units can be used by
changing the conversion base. Example: Unit = kV, Base = 1000.
Input/Output.
Type.
No.
Unit/Volt.
The number of units of the signal corresponding to one Volt of the analog input/output.
1-9-109
Example:
If 1000V in the simulated network correspond to 1 V of the analog
output, then Unit/Volt = 1000.
Destination Base.
Apply.
OK.
When sensors are installed, an oscilloscope symbol will be displayed next to the element label.
9.1.2
Sensor
Configuration
A set of sensors installed on buses, power system elements and control blocks form a sensor
configuration. The background menu can be used to execute different operations on such configurations:
Save sensor configuration: save the actual sensor configuration in a file. A
dialogue box is displayed to allow to define the file.
Load sensor configuration: reread a previously saved configuration. A dialogue box is displayed to define the file to read. The name of this file is displayed at the
bottom of the Hypersim window.
Clear current sensor configuration: remove all the sensors and the
filename with the sensor configuration (if it exists).
1-9-110
Simulation Parameters
Figure 9 - 3
Before starting the simulation, it is useful to check some parameters. The command Preferences in the background menu is used to do this. The dialogue box in Figure 9 - 3 allows to
specify the following parameters:
Network Name.
The network usually has the same name as the file used to save the diagram. If the diagram has never been saved, the name will be Sansnom.
Before simulation, Hypersim generates a code C specific to each network. This parameter is used to define the directory where the code is
saved.
Performance.
This parameter serves as a slowing down factor in real-time. For example, if the user observes a sine wave on an real oscilloscope, its period
will be
performance * real period.
This is like playing a video in slow motion.
With Performance > 1, the time allocated for each time-step will be
(Performance * real time-step), the CPUs have therefore more time
and more tasks will be packed in each CPU.
1-9-111
necessarily the same type as the one executing Hypersim. The compiling
server is the computer that will compile the code generated used to simulate the network. The server must be of the same type as the one executing the simulation.
Node Type.
Note : All this information can be entered as default setup at start-up using the Properties
form. (See Chapter for more information)
1-9-112
Figure 9 - 4
1-9-114
Chapter 10
SETTING OF INITIAL CONDITIONS WITH SNAPSHOT AND LOAD-FLOW
10.1 INTRODUCTION
Snapshot and Load-flow are two tools permitting to set-up the network initial conditions.
Snapshot reads the current conditions of the network and uses it as initial conditions for later
simulations. Load-flow, on the other hand, calculates the initial conditions using an iterative
algorithm. Both Snapshot and Load-flow started from the HyperView panel using on the corresponding tabs.
(a)
(b)
1-10-115
HyperView is a new Hypersims central control panel. When its development will be completed, it will serve as the central point from where various Hypersim related applications will
be launched.
For the end users, HyperView is actually used for executing Snapshot and Load-Flow commands. Others applications will be gradually added.
HyperView is activated from the Hypersims main window by clicking on the HyperView
button located on the right of the Help button (see Figure 10 - 1a). When activated, HyperView comes up with its panel showing initially the Simulation tab (see Figure 10 - 1b)
with some simulation parameters. The user can change these parameters then click Apply.
If an error is detected because some changed parameters are invalid, a message will appear.
In this case, user must click on Refresh to display the last valid parameters.
From the HyperView panel, the user can select different applications by clicking on the corresponding tabs. This chapter will describe particularly the Snapshot and Load-Flow applications, both are use for the initialization purpose.
10.3 SNAPSHOT
10.3.1 Description
Snapshot is one of Hypersims utility allowing to take a picture of all simulation variables
as well as their histories. The picture, or the snapshot buffer, is kept in local memory of the
simulation computer (which can be the same as the one running the Hypersims user interface
or a parallel computer running the real-time simulation).
The snapshot buffer represents the state of the simulation at a particular moment. It can be
either the steady-state or somewhere during a transient state. The snapshot buffer can be
saved on a file and later reloaded. The user can start the simulation from the snapshot buffer
which is used as the initial conditions.
If the snapshot buffer has been taken during the steady-state, then start the simulation from it
will bring immediately the network to the steady-state condition. This avoid the time of waiting the network to stabilize.
For some particular transients, especially those that last for a long period, the user may want
to repeat the simulation without repeating the whole transient process. Taking a snapshot in
a middle of a transient and restarting the simulation from it will be useful.
10.3.2 Utilization
The snapshot is accessible from HyperView panel by clicking on the Snapshot tab. The
snapshot commands and parameters reside inside Hyperview panel, under Snapshot tab,
they are shown in Figure 10 - 1. Commands are found on the top of the tab. For convenience,
beside the snapshot commands, other commands are also available to control the simulation.
Commands are found on the top of HyperView window, they are visible even the Snapshot
tab is not selected. For convenience, beside the snapshot commands, other commands are also
available to control the simulation.
Startsim the simulation
Start the simulation from scratch.
1-10-116
Snapshot
1-10-117
Load the snapshot buffer with data from a file, restart the simulation with
this buffer as initial conditions.
1-10-118
Pause simulation
Continue simulation
Complete path and name of the file served to load and save the snapshot
buffer.
Delay.
Delay in seconds before taking the snapshot. If this delay is 0, the snapshot will be taken as soon as the simulation receives the snap command, this is normally used to store the steady-state conditions. If the
delay is positive, the snapshot will be taken with a delay counted from
the POW detection.
Note that the POW detection is enabled from Spectrum (by clicking on
Acquisition) or from ScopeView (by clicking on Plot Signals).
When the POW is detected, it initiates the transients operations (switching of circuit breakers for example) as well as the data acquisition. By
setting Delay to a positive value, the user can take a snapshot during
the transient conditions.
10.4 LOAD-FLOW
10.4.1 Description
The Load-flow calculation of a network is also accessible from HyperView. This tool calculates:
Powers (active and reactive) of all machines,
Internal voltages (amplitudes and angles) of all machines,
Voltages (amplitudes and angles) of all buses.
1-10-119
To be able to run the load-flow, the user must provide the following data:
Base voltage of all buses are defined by using the Hypersims background command
Edit base voltage summary. This command is available both in Editing mode
and Simulation mode, it brings up the dialogue show in Figure 10 - 5a in which the user
must give the phase-to-phase base voltages for all buses.
(a)
(b)
1-10-120
The user can also select buses one by one to enter its base voltage using the menu Edit base
voltage.
10.4.3 Running loadflow and
setting initial
conditions
To run the load-flow, HyperView must be already started, if not, click on the HyperView
button on the Hypersims main window. Once the network is read and the required parameters are already entered. Do the following steps:
On the Hypersims main window, pass to the Simulation mode.
On the HyperView window, select Load Flow tab. The informations in this tab are
shown in Figure 10 - 2.
1-10-121
1
4
1-10-122
Click Apply
Click on Execute
in the Load-flow data viewer 5 . This print out is for information purpose only,
user doesnt need to manipulate them. Check boxes on top of Load-flow data
viewer section allow to display data and results in the desired unit. The pull-down
menus allow to display either all data/results or only the selected categories.
Because the print-out is accumulated in this area, user need to clear it as needed before
a new print by right-clicking in the area and execute Clear
to be able to start
Introduction
The Load Flow Bus models a 3-phase load-flow bus constraint. The constraint bus type is
Power and Voltage control (PV). Each Low Flow element represent at each bus an ideal
source behind a Thevenin impedance. The principal information obtained from the pow-
er flow study is the magnitude and phase angle of the voltage at each bus and the real
and reactive power flowing in each line.
1-10-123
System Tools
Properties:
- Control Power and Voltage at
local bus Bar
- Used in Load Flow tools in
Hyperview
Features:
- Generator, Swing or slack
bus
Implementation:
- Hypersim standart element
For generator bus, the controlled variables are the bus voltage magnitude and
the real power output of the generator. Swing or slack bus, on the other hand, is
treated as a reference bus, thus the voltage magnitude and angle are specified;
Voltage: specified voltage amplitude in pu
Angle: specified angle in deg
P: controlled active power in MW
R: internal Thevenin impedance in ohm
L: internal Thevenin impedance in Henry
D List of Available
Signals
At acquisition, the following signals are made available by the sensors. The value are the signals at the bus bar, internal voltage and angle.
Voltage at the bus bar in kVrmsll.
Angle at the bus bar in deg.
Voltage internal in function of R and L in kVrmsll.
Angle internal in function of R and L in deg.
Power at the bus bar in MW.
Reactive power Q at the bus bar in Mvar.
E Load Flow
Control Panel
1-10-124
Figure 10 - 2 shows the control panel used to enter the Load Flow Bus parameters
Example:
Load flow bus example with two machines. See the Low Flow output
and scopeview results.
1-10-125
-------------------------------------------------------------------------------Bus summary
Bus bar
Base voltage (kV)
B1
100.0
B2
100.0
B3
100.0
Generation summary
Bus bar
Element
B1
Mac1
B2LoadFlowBus
B3
Mac2
Type
E
G
G
V(kV)
100.0000
99.0000
99.0000
Angle(deg)
0.00
---------
Total:
Shunt impedance summary
Bus bar
Element
B3
R1
P(MW)
----50.00
25.00
-------75.00
Cntl Bus
P (MW)
Q (Mvar)
100.00
-0.00
--------------Total:
100.00
0.00
-------------------------------------------------------------------------------Iteration no 1; max PQ = 0.730100;
Iteration no 2; max PQ = 0.000123;
Generation buses
Bus
Pgen (MW)
B1
23.02
B2
50.00
B3
25.00
Vbase (kV)
100.00
Qgen (Mvar)
26.57
-25.27
1.22
1)
kV @ -0.50 deg
Qgen(Mvar)
Pload (MW)
-25.27
0.00
-23.02 MW
-26.10 Mvar
73.02 MW
0.83 Mvar
Qload (Mvar)
0.00
Pshunt (MW)
0.00
Qshunt (Mvar)
0.00
Qload (Mvar)
0.00
Pshunt (MW)
0.00
Qshunt (Mvar)
0.00
Node B3 (no 2)
V = 99.0000 kV @ -2.11 deg
Pgen (MW)
Qgen(Mvar)
Pload (MW)
Qload (Mvar)
Pshunt (MW)
Qshunt (Mvar)
25.00
1.22
0.00
0.00
98.01
0.00
P B3-->B2 = -73.01 MW
Q B3-->B2 = 1.22 Mvar
-------------------------------------------------------------------------------Generation report
Bus bar
Vbase(kV)
V(kV)
Angle(deg)
P(MW)
Q(Mvar)
Vint(kV)
B1
100.00
100.0000
0.00
23.02
26.57
107.9318
B2
100.00
99.0000
-0.50
50.00
-25.27
99.0000
B3
100.00
99.0000
-2.11
25.00
1.22
99.6517
--------------Total:
98.02
2.52
Shunt report
Bus bar
B3
Total:
Vbase(kV)
100.00
V(kV)
99.0000
Angle(deg)
-2.11
P(MW)
98.01
-------98.01
Q(Mvar)
0.00
-------0.00
1-10-126
Aint(deg)
3.53
-0.50
2.10
1-10-127
1-10-128
Chapter 11
LIST OF TOOLS AND MODELS
The tools and models are found in the drawers on the left-hand side of the Hypersim window
( 12 in Figure 2 - 2, Chapter ). They are listed here in the actual order of the drawers. The
name given to each model found in a drawer is provided, followed by a short description. The
following chapters in this manual will describe these in detail.
11.1 SYSTEMTOOLS
POW (point-on-wave): Element used for the synchronization of the simulation.
Bus3ph: Three-phase bus.
BusMono: Single-phase bus.
BusMpx: Multiplex Bus.
Connex: Connection (for Hypersim administrator only).
SimulCtr: Simulink block with control connectors.
SimulNet: Simulink block without control connectors.
1-11-129
11.3 NETWORKPASSIVE
Ground: Ground connection
R: Series resistor.
L: Series reactor.
C: Series capacitor.
R_Shunt: Shunt resistor.
L_Shunt: Shunt reactor.
C_Shunt: Shunt capacitor.
RL: Series resistor and reactor.
RC: Series resistor and capacitor.
LC: Series reactor and capacitor.
RLC: Series resistor, reactor and capacitor.
RL_Shunt: Shunt resistor and reactor.
RC_Shunt: Shunt resistor and capacitor.
LC_Shunt: Shunt reactor and capacitor.
RLC_Shunt: Shunt resistor, reactor and capacitor.
Mutual: Mutually coupled inductor elements.
RnLinSh: Non-linear shunt resistor. Used normally to simulate ZnO surge arrester.
RnLin: Non-linear series resistor. Used normally to simulate ZnO surge arrester.
Decoupl: Decoupling element (parallelism of tasks).
Dec_XFO: Transformer with decoupling element.
CType: Shunt C type filter.
FiltreDmp: Shunt double damped filter.
FiltRLC: General filter (3 parallel RLC branches in series), shunt
HP: Shunt high-pass filter.
1-11-130
NetworkLines
11.4 NETWORKLINES
Single: Frequency Constant distributed parameters simple line.
SglFault: Frequency Constant distributed parameters simple line with fault.
Coupled: Frequency Constant distributed parameters coupled double circuit line.
CplFault: Frequency Constant distributed parameters coupled double circuit line with fault.
9phases: Frequency Constant distributed parameters coupled line, 9 phases.
12phases: Frequency Constant distributed parameters coupled line, 12 phases.
Pi: Pi section.
Pi-Flt: Pi section with fault.
Pi-Cpl: Double coupled Pi sections.
PiCplFlt: Double coupled Pi sections with fault.
Pi-9ph: Triple coupled Pi sections.
Pi-12ph: Quadruple coupled Pi sections.
Pi12phFlt: Quadruple coupled Pi sections with fault.
DCcable: DC cable.
Marti: 3 phase Marti line with three-phase connectors.
Marti2P: 2 phase Marti line (for DC network).
Marti3P: 3 phase Marti line with single-phase connectors.
Marti4P: 4 phase Marti line with single-phase connectors.
CplFault (with S symbol on its icon): Frequency Constant distributed parameters coupled
line with fault at different points on different circuits. The model is built using subsystem concept, user can open the subsystem content to see its details.
12phFault: Frequency constant distributed parameters coupled quadruple line with fault at
different points on different circuits. Its built with subsystem concept.
11.5 NETWORKTRANSFORMERS
Lin2: Linear transformer, 2 windings.
1-11-131
1-11-132
NetworkMiscellaneous
11.8 NETWORKMISCELLANEOUS
Mes_Freq: Frequency measuring unit.
Digital_Out: Digital output.
ConfSw: Disconnecting switch.
A/D: Analog input.
D/D: Digital input
MesI: Single-phase current sensor.
MesV: Single-phase voltage sensor.
MesI3: Three-phase current sensor.
MesV3: Three-phase voltage sensor.
1-11-133
1-11-134
SmoothFlip: smooth flipper (flip smoothly from one input to the other).
1-11-135
1-11-136
Chapter 12
SUMMARY OF MENUS
This chapter summarizes the menus available in the Hypersim graphic interface. Each command is followed by a section number and the corresponding page which provides its details.
Some menus are not documented in this chapter since they are part of other chapters.
in a file.
10 File=>Quit (4.7, page 67). Quit Hypersim
11 Edit=>Undo (4.6.2, page 66). Cancel the last operation
12 Edit=>Restore (4.6.2, page 66). Restore the cancelled operation.
13 Edit=>Cut (4.5.7, page 65). Cut the selected objects and put them on the clipboard.
14 Edit=>Copy (4.5.7, page 65). Copy the selected objects to the clipboard.
15 Edit=>Paste (4.5.7, page 65). Paste the objects saved on the clipboard.
16 Edit=>Delete (4.5.7, page 65). Delete the selected objects. These objects are not saved on
the clipboard.
17 Edit=>Duplicate (4.5.7, page 65). Duplicate the selected objects.
18 Edit=>Select All (4.2, page 62). select all the objects in the current diagram.
1-12-137
Summary of Menus
Main Menus
19 Edit=>(Erase (Hide) Connectors (3.4.3, page 51). Hide the connectors of the power el-
ements.
20 Edit=>Display (Show) Connectors (3.4.3, page 51). Show the connectors of the power
elements.
21 Graphics=>Group (4.5.1, page 64). Group the selected objects into one object
22 Graphics=>Ungroup (4.5.1, page 64). Separate the objects that were grouped.
23 Graphics=>Front (4.5.2, page 64). Put the selected objects in the foreground.
24 Graphics=>Back (4.5.2, page 64). Put the selected objects in the background.
25 Graphics=>Align (4.5.3, page 64). Align horizontally/vertically the selected objects.
26 Graphics=> Vertical Flip (4.5.4, page 65). Invert top/bottom the selected objects.
27 Graphics=> Horizontal Flip (4.5.4, page 65). Invert left/right the selected objects.
28 Graphics=>Rotate CW (4.5.5, page 65). Rotate clockwise the selected objects.
29 Graphics=>Orientation (4.5.6, page 65). Turn the whole graphic from landscape to por-
ed page.
32 View=>New View. Open another window in Hypersim to display the same diagram. The
displacement in this view and the zoom factor do not affect the other views.
33 View=>Close View. Close a view created with View=>New view.
34 View=>Normal Size (4.6.5, page 66). view with a zoom rate of 100%.
35 View=>Reduce to fit (4.6.5, page 66). Optimized view of the diagram in the workspace.
36 View=>Center Page (4.6.5, page 66). Centre the diagram relative to the workspace.
37 Diagram=>. Import an EMTP file. This is described in Part 1, Chapter , page 617.
38 Properties=>Directories (8.1.1, page 95). Specify the directories of the files required by
Hypersim.
39 Properties=>Simulation (8.1.1, page 95). Specify the general parameters of the simula-
tion.
40 Properties=>Files (8.1.1, page 95). Specify the default suffixes of the files.
41 Edition (2.3, page 38). Put Hypersim in Edition mode to prepare the network diagram.
42 Simulation (2.4, page 39). Put Hypersim in Simulation mode and control.
43 Help. Display this Hypersim User Manual in PDF format.
44 HyperView (10.2, page 115). Activate HyperView, Hypersims central control panel.
1-12-138
Summary of Menus
Graphics Toolbar
10
11 Stroke (B, page 63). Define/Change the thickness and the colour of strokes.
12 Pattern (C, page 63). Define/Change the type and the colour of the shading in the filling
area.
13 Gravity (4.6.3, page 66). Activate/Deactivated the displacement by short burst based on
grid increments.
14 Grid (4.6.3, page 66). Show/Hide the grid
Without
Object
Selection
1-12-139
Summary of Menus
7 Erase connectors ((3.4.3, page 51). 8 Hide the connectors of the power elements.
9 Update Network with New Tool Palette. Update the diagram after changing the palette
(change the appearance of the objects in the network and their parameter control panel).
Note : This command is mainly used to update networks built in a previous version of Hypersim.
10 Search for a Labeled Object (4.6.1, page 66). Search for an object by specifying its la-
bel.
11 Change the Inport/Outport Order (5.5.5, page 76). Change the order of the input/output
ports of a super-block.
12 Update Subsystems (5.5.4, page 76). Update a diagram containing super-blocks/supermodels to apply the last changes made to them.
13 Update User / Simulink Blocks. Update a diagram containing user-coded blocks and
Simulink blocks to apply the last changes made to them.
12.3.2
With Object
Selection
When objects are selected, the commands act only on these objects.
1 Cut (4.5.7, page 65). Cut (or delete) the selected objects and put them on the clipboard.
2 Copy (4.5.7, page 65). Copy the selected objects on the clipboard.
3 Paste (4.5.7, page 65). Paste the objects from the clipboard to the diagram.
4 Delete (4.5.7, page 65). Delete the selected objects. These objects are not saved on the
clipboard.
5 Duplicate (4.5.7, page 65). Duplicate the selected objects.
6 Edit Label (3.3.2, page 48, 3.4.2, page 51, 5.1, page 69). Change the label of an object
a power element.
9 Edit Bus (3.3.5, page 49). (If a bus is selected) Specify the number and the names of the
phases of a bus.
10 Copy Parameters (3.4.5, page 53, 5.3, page 73). (If two components are selected)
Copy the parameters of an object (power element or control block) to a second object.
11 Display Parameters (3.4.6, page 54, 5.3, page 73). Show the parameters next to a pow-
Summary of Menus
14 Create Block Array (5.9, page 79). (If a block is selected) Create a subsystem composed
simulated using a separate task or a task in parallel with the other tasks.
16 Subsystem Content (5.5.3, page 75). (If a subsystem is selected) Display the content of
Pointing to a
Label
When a label is pointed, the commands act on the object with this label.
1 Edit Sensors (9.1, page 108). Select the signals to observe in Spectrum or ScopeView.
2 Edit Base Voltage (3.3.4, page 49). Change the base voltage of a bus (by pointing to the
bus label)
3 Edit Parameters (3.4.4, page 52, 5.3, page 73). Change the electrical parameters.
4 Subsystem Content (5.5.3, page 75). Display the content of the selected super-block in a
new window.
12.4.2
Pointing to a
Blank Space
simulation.
4 Simulate network (1.4.3, page 32, 9.4, page 113). Start the simulation.
5 Stop simulation (1.4.3, page 32, 9.4, page 113). Stop the simulation.
6 Save sensor configuration (9.1.2, page 110). Save the current sensor configuration in a
file.
7 Load sensor configuration (9.1.2, page 110). Read a previously saved sensor configura-
tion.
8 Clear current configuration (9.1.2, page 110). Remove all the installed sensors.
9 Selected signals summary. List all the selected signals and input/output.
10 Edit base voltages summary. Change the base voltages of all the buses
11 Erase (Hide) Sensors. Hide the sensor symbols. The sensors are not deleted.
12 Show (Display) Sensors. Show the sensor symbols.
13 Preferences (9.2, page 111). Define the general parameters of the simulation.
1-12-141
Summary of Menus
1-12-142
Part 2
Hypersim Network Models
2-143
2--144
Chapter 1
HYPERSIM NETWORK MODELS
2-1-145
2-1-146
Network Model
Threephase
Singlephase
Control
block
access
Simulink
Access
POW element
Link
Connection element
BusMono
Single-phase bus
Bus3ph
Three-phase bus
BusMpx
Multiplex bus
UserBloc
User-coded block
Simukink
SimCtrl
Simulink block
SuperBloc
Super-block
Super-model
External connection
ExtConn
X
X
2-1-147
2-1-148
Network Model
Threephase
Singlephase
Control
block
access
Simulink
Access
Voltage source
V_prg
ScrI
Current source
ScrIprg
SrcV3
AmpI3
AmpV
AmpI
X
X
HydCmd
Therm
ThermCmd
CrossCmpc
2-1-149
2-1-150
Network Model
Threephase
Singlephase
Control
block
access
Simulink
Access
R_Shunt
L_Shunt
C_Shunt
RL_Shunt
RC_Shunt
LC__Shunt
RLC_Shunt
ZNO
ZNO_Shunt
Mutual
Mutual reactor
Decoupl
Uncoupling reactor
Dec_XFO
Uncoupling transformer
RLCsp
FiltC
FiltDMP
FiltRLC
FiltHP
High-pass filter
2-1-151
2-1-152
Network Model
Threephase
Singlephase
Control
block
access
Simulink
Access
SglFault
Coupled
CplFault
9phases
12phases
ClpFault
12phFlt
Pi
PI line, 3 phases
Pi-Flt
Pi-Cpl
PiCplFlt
Pi-9ph
Pi-12ph
Pi12phFlt
DCcable
Marti
Marti2P
Marti3P
Marti4P
2-1-153
2-1-154
Network Model
Threephase
Singlephase
Control
block
access
Simulink
Access
Transformers (Figure1 - 6)
Lin2
Sat2
Lin21
Sat21
Lin2Ser
SatSer
Lin3
Sat3
TapDecpl
Sat2Tap
Sat3Tap
LinSer
Lin2Mono
Sat2Mono
Sat3Mono
Zig-Zag
Zig-zag transformer
CVT
CT
PT
2-1-155
2-1-156
Network Model
Threephase
Singlephase
Control
block
access
Simulink
Access
Dynamic load
HarmLd
DCMot
DC motor
ArcFurn
Arc furnace
IndMot
2-1-157
2-1-158
Network Model
Threephase
Singlephase
Control
block
access
Simulink
Access
Rect_12
Inv_6
Rec_6
SVC
SVC controller
TSC
TSC branch
TCR
TCR branch
Diode bridge
Switch
SwitchMono
BrShunt/
BrShMulti
BrSerial/
BrSrMulti
BrShMono
BrSerMono
2-1-159
2-1-160
Network Model
Threephase
Singlephase
Control
block
access
Simulink
Access
Digital_out
Digital output
ConfSw
A/D
D/D
MesI
MesV
MesI3
MesV3
2-1-161
2-1-162
Chapter 2
SI OR PU SYSTEM UNITS
2.1 GENERAL
HYPERSIM offers to the users two choices of systems units when inputting parameters. In
fact, it is often useful to enter parameters in the International System of Units (SI) or in Per
Unit (pu) units (See Section 2.3). In addition, some models allow to use parameters in active
and reactive power units (PQ).
The user can choose the system that suits him best from the control panel. The choice is done
from the three Units boxes in the panel: SI, pu or PQ.
Note : Remember that only the passive elements like the RLC, the lines or the transformers
offer the choice of different unit systems.
The three unit choices are:
SI: Input of parameters in International System of Units format (volt, ampere, watt,
ohm, henry, farad);
pu: Input of parameters in pu format; the choice of a reference base voltage, power and
frequency is mandatory;
PQ: Input of parameters in active and reactive power format; the choice of a reference
base voltage is mandatory.
Note : In the transformer model, the base voltage will be determined upon the windings
(primary or secondary).
In addition, neutral impedance of the transformer, since it is not referenced to a
winding, can be specified in SI or amperes, using the symbol A.
2.2 EXAMPLES
As an example, the RLC type load control panel offers three choices. See Figures 2 - 1 to 2 - 3.
With the SI system, the user must provide RLC values in ohms, henry and farad.
The same load can be set in pu, where all the R, L and C values are in pu with reference to
the Base Volt, to the Base MVA, and to the Base frequency.
Finally, it is possible to set that network load value in active (P) and in reactive (Q) power
units. User input MW and MVARS for each R, L and C elements.
Therefore, with the true reference bases of voltage and power, Hypersim will model accurately the various elements with the unit system chosen.
2-2-163
SI or pu system units
Examples
R Base ( per
phase )
2
( 100e )
V
= ---------------------------------------= ---------------------- = 100
6
P Base ( per phase )
100e
(EQ 2)
R = 0 01 = 0 0001pu
(EQ 3)
L Base
per phase
2-2-164
SI or pu system units
Examples
(EQ 4)
C Base
per phase
1
= -------------------------------------------------- = 2 6252 e 5F
R base ( per phase )x 2f
7
1e F = 3 7699e
R Base ( per
phase )
2
( 100e )
V
= ---------------------------------------= ---------------------- = 100
6
P Base ( per phase )
100e
.1H
37.7
.01
-7F
V
-------------------------------------------------------------- = I = 3 775437A
2
2
0 01 ( 2L 2C ) + R
26.4873e3
1e
26.525
(EQ 6)
2
( 2L 2C ) + R = 26 4873e
(EQ 7)
100kV
( p t ) = 3 775437A
------------------------------3
26 487e
2-2-165
SI or pu system units
P.U. Definition
(EQ 8)
P = ( R ou Z ) I
(EQ 9)
2
7MW
0 01 ( 3 775437A )
P MW = -------------------------------------------------------- = 1 4253e
1e6
(EQ 10)
2
37 7 ( 3 775437A )
P ZL = ------------------------------------------------------------- = 0 0005373MVAR
1e6
(EQ 11)
2
26525 ( 3 775437A )
P ZC = --------------------------------------------------------------- = 0 37806MVAR
1e6
2-2-166
SI or pu system units
P.U. Definition
1 - Base current A =
2 - Base Impedance =
3 - Base impedance =
4 - Base impedance =
5 - Base power kW 1 =
base kVA 1
2-2-167
SI or pu system units
P.U. Definition
2-2-168
Chapter 3
SYSTEM TOOLS
Introduction
The POW unit synchronizes the data acquisition and the breaker operations. This unit uses
the phase A as a reference signal at the bus to which it is connected.
All the simulated networks must have a unique POW element. Since the synchronization signal is generated by the crossing of a voltage threshold, it is a good practice to connect the
POW element to a bus where no fault occurs.
B POW
Synchronization
Icon and Diagram
System Tools
POW Synchronization
pow
Properties:
Features:
- Positive or negative reference
slope
Implementation:
Palette and icon representation
Internal signal detection from a bus or from an external command (not from Hypersim);
Detection of an analog or digital signal;
Reference slope (positive or negative): The positive value specifies that the synchronization is done on the positive slope (rising part) of the reference signal. The negative
value specifies the negative slope (falling part) of the signal.
2-3-169
System Tools
POW Synchronization
Detection level: Value of the reference voltage at which the synchronization is triggered.
Reference phase selection when it reaches 0 (A, B or C);
SyncOut_POW signal length in time step multiple. Ex: If the time step = 1 and the
SyncOut_POW value is 10, the signal length is 10 times the time step.
Time_POW signal out unit in time step: second, minute, hour.
D List of Available
Signals
E POW
Figure 3 - 2 shows the control panel used to enter the POW synchronization parameters
Synchronization
Control Panel
Figure 3 - 2
Figure 3 - 3 shows the synchronization trigger threshold when the slope of the POW unit and
the detection level parameters are respectively positive and 0.5 volt.
2-3-170
System Tools
POW Synchronization
KV
1.0
0.8
0.6
Positive
0.4
e
Negativ
Trigger threshold
0.5 volts level
02
0.0
-0.2
-0.4
-0.6
-0.8
-1.0
0.000
0.005
0.010
0.015
0.020
0.025
0.030
0.035
0.040
0.045
Figure 3 - 3 Synchronization with a 0.5 volts Trigger Threshold and a Positive Slope
2-3-171
System Tools
3.2.1
In Hypersim, three types of buses can be used to make network connections. These are threephase, single-phase and multiplex buses.
Three-Phase
Bus
A Description
The three-phase bus is an element used to interconnect three-phase elements in the Hypersim
network. During simulation, the three voltages of this bus can be acquired: Va, Vb and Vc.
B Three-Phase Bus
Icon and
Diagram
Three-Phase Bus
System Tools
Bus
3 ph
Properties:
BaGD
Features:
- Used to interconnect threephase elements
- Access to the three voltages of
a bus
Implementation:
-
Single-Phase
Bus
A Description
The single-phase bus is an element used to interconnect single-phase elements in the Hypersim network (ex: DC side of an HVDC element, DC motor).
Also, used for the modellization of an unbalance circuit when creating a special transformer
arrangement model with the monophase transformer element.
2-3-172
System Tools
System Tools
Bus
Mono
Properties:
DaGC
Features:
- Used to interconnect singlephase elements
- Access to the voltage of a bus
Implementation:
-
Multiplex Bus
A Description
The multiplex bus is an element allowing to retrieve the three voltages of the bus and to establish single-phase connection points (A, B, C). This allows to establish a single-phase network connected to a three-phase bus.
2-3-173
System Tools
B Multiplex Bus
Icon and
Diagram
Multiplex Bus
System Tools
Bus
Mpx
Properties:
Features:
- Used to retrieve the three voltages of a bus
- Establishes a, b and c singlephase connection points
Implementation:
-
2-3-174
Chapter 4
CURRENT AND VOLTAGE SOURCES
The current and voltage sources represent a single or three-phase AC voltage source with a
series or parallel RLC impedance.The value of at least one of the R, L and C elements must
not be zero.
B Icons and
Diagrams of
Current and
Voltage Sources
Voltage
Properties:
Current
Features:
- The voltage source always has
a series connected impedance
- The current source always has
a parallel connected impedance
Implementation:
-
In the network, the current and voltage sources are implemented as follows:
2-4-175
The voltage source always has a series impedance. This impedance consists of series or parallel connected R, L, C elements The current source always has a parallel impedance. This
impedance is made up of series or parallel connected R, L, C elements.
The voltage source has only one network connector as it is always referenced to the ground.
The current source injects a current from one bus to another, without any grounding.
Figures 4 - 3 and 4 - 4 illustrate respectively the control panel of a voltage source and of a
current source. Most of the fields and controls are the same for both control panels.
RLC Connection = Series (series R, L, C) or parallel (parallel R, L, C) see Figure 4 - 2;
SI or pu units:
SI: Specifies the values of the RLC elements, voltage, current or frequency in international units (ohm, henry, farad, volt, ampere and hertz);
pu: Specifies the values of the RLC elements, voltage, current or frequency in pu;
R: Resistance value in ohms (or pu) for each phase (in order: a b c);
L: Inductance value in henry (or pu) for each phase (in order: a b c);
C: Capacitor value in farad (or pu) for each phase (in order: a b c);
Frequency: Source frequency in hertz (or pu);
Module: Peak value of the amplitude for the source voltage or current in volts (or pu) or
amperes (or pu) for each phase;
Note : For pu, you have to enter 1.4142 pu
2-4-176
Angle: Angle of each phase in degrees. The value of the angles can be modified either
by directly entering the numerical values in the appropriate fields or by adjusting the
hands on the dial.
The input of the angle varies as a function of the sequence selected in the Source control
section.
Note : The current source is always in positive sequence and, hence, it does not have a sequence selection button.
Here is how to input each phase sequence.
Direct or Inverse (positive or negative): In this mode, a constant differential of 120 de-
grees is maintained between the phases when the phase angle is changed by entering the value
in the field or by adjusting the appropriate hand on the dial. All the fields are reset and all the
hands are repositioned to maintain this 120 degrees differential.
The only difference between the positive and negative sequences is that in the latter, the signs
for phases b and c are inverted.
Zero (homopolar): Here, a, b and c are in phase. Their differential is zero. When a field is
modified or a dial handle is set, the other two phases automatically take the same value and
the same position.
Per phase. The Per phase mode allows to define the same angle for the phases selected us-
G Control System
(Waveform Generation)
Origin: Origin of the signal for the voltage source: Internal, External and
Simulink for a Simulink model.
Note : Please note that most source controls (amplitude, angle, etc.) are inoperative in external mode or Simulink mode. Refer to 1, Chapter 1, on page 567 concerning the
Simulink models for their use with Hypersim.
2-4-177
Simulink:
Model name: Name of Simulink model implementing the wave generator;
Model directory path: The full directory path where the model is saved;
Execution time: Model estimated or measured execution time of the Simulink model.
H Load Flow
Parameters
2-4-178
2-4-179
Figure 4 - 5 Activation of voltage source (a): Fast, mode (b): Slow mode
I List of Available
Signals
Programmable variable sources (PVS) allow the user to set his own times and durations in
some models.
There are two types of PVS: a variable voltage source and a variable current source. As with
the other sources discussed previously, the voltage source has a series connected RLC impedance and the current source a parallel connected RLC impedance.
The RLC impedance elements can be connected either in series or parallel, and at least one
of the RLC values must not be null.
Figure 4 - 6 shows the icons and the diagrams used to represent the programmable variable
voltage sources and the programmable variable current sources.
2-4-180
B Icons and
Diagrams of
Programmable
Variable Sources
Voltage
Current
Properties:
Features:
- The voltage source always has
a series connected impedance
- The current source always has
a parallel connected impedance.
Implementation:
The control panels for the parameters of both sources each have three pages. The first pages
of both versions have slight differences. Pages 2 and 3 are identical in both versions. Hence,
only the control panel of the voltage source will be shown. Figure 4 - 7 shows the first page
of the control panel for a programmable voltage source. This page contains the definitions of
the general parameters. The load flow parameters, the SI and PU buttons and the base values
(voltage, power and frequency) are not present in the current source control panel.
D General
Parameters
2-4-181
grees is maintained between the phases when the phase angle is changed by entering the value
in the field or by adjusting the appropriate hand on the dial. All the fields are reset and all the
hands are repositioned to maintain this 120 degrees differential.
The only difference between the positive and negative sequences is that in the latter, the signs
for phases b and c are inverted.
Zero (homopolar): Here, a, b and c are in phase. Their differential is zero. When a field is
modified or a dial handle is set, the other two phases automatically take the same value and
the same position
Per phase. The Per phase mode allows to define the same angle for the phases selected us-
ing a checkmark. The other phases are not involved. If many phases are selected, modifying
a field or setting a dial handle for one phase automatically brings the other phases to the same
value and position.
Sequence (Direct/Inverse/Zero/Per phase): Allows to set the phases of the three-phase
source in a sequence. The positive sequence sets the angles of phases a, b, c at 0, -120,
120 degrees. The negative sequence sets the angles of phases a, b, c at 0, 120, -120
degrees.The zero sequence sets the angles of phases a, b, c at 0, 0, 0 degrees (See preceding paragraphs on the angle input).
DC offset: direct current superimposed on the source signal.
E Source Control
2-4-182
2-4-183
At the time this manual was drawn up, the source could only be synchronized internally (POW)
planned (External).
Programming (Start/Stop): Allows or prohibits the starting of programmed sequences
of events. The effect depends on the synchronization and repetitive mode. See the paragraph on the repetitive mode for a description of the Start effects.
Repetitive (Enable/Disable): The repetitive mode allows to repeat indefinitely a programmed sequence of events:
Disable: The repetitive mode is not selected and the sequence of events will be
executed only once according to the following conditions (Start button must be
pressed):
Operations
(ScopeView)a
Operation
sequence OFF
Operation
sequence ON
Synchronization OFF
Synchronization ON
a. In this table, the modes No switching/Switching and the modes Asynchronized/Synchronized come from the ScopeView Acquisition parameters.
2-4-184
Enable, the programmed sequence of events will be repeated indefinitely according to the following conditions:
Operations
(ScopeView)
Operation
sequence OFF
Operation
sequence ON
Synchronization OFF
Synchronization ON
Synchronization and
Operation sequence are ON when
ticked 3.
(From ScopeView Main Window)
2-4-185
F Load Flow
Parameters
G Timed Variation
Programming
H Modulations
2-4-186
Modulation induces a sine or random variation of the selected parameter. Sinusoidal modulation can be applied to the amplitude, the frequency or the phase angle of a source, but for
only one of these parameters at a time. Random modulation only applies to the amplitude of
the source. It is possible to program other events, such as steps or ramps during a source modulation.
2-4-187
Operation Timing: Start and end times of a modulation. The steady state applies
before and after the modulation period;
Parameters for the random amplitude modulation:
Amplitude: Value to add to or subtract from the quantity modulated;
Frequency and phase: Not used;
Operation Timing: Start (B) and end (E) times of the modulation and period (t) (multiple of) time step between successive calculations of the random signal. This period
(B/E/I) must be greater than the calculation step selected for simulation.
In the General control page (see Figure 4 - 7), enter the parameters as follow:
Module: 1 V peak
Angle: 0 deg.
DC offset: 0V
Frequency: 10Hz
Phase sequence: Zero
Source mode: active
Starting mode: Slow
Synchronization: Internal. (Only mode available for now)
Programming: Start
Repetitive: Disable
Note : This mode, when Enable, leaves the program variation running forever after the
first Synchronization signal received (from Scopeview). To stop it, you have to toggle the parameters Programming from Start to Stop.
Programming: Enable
Note : This parameter displays the timed programming in a table format in the Hypersim
terminal window.
In the Time variations page, enter parameters as follows:
Select the Amplitude modulation type button
Timed variations: Enable
Amplitude: 0.5 Volts (Amplitude of the modulation)
Frequency: 2 Hz (Frequency of the modulation)
Angle: 0.0 deg.
2-4-188
Using Scopeview, look at the signals Vabc and Iabc at the source.
Use a Time length of 2.5 seconds and a sampling rate associated with the time step of the
simulation.
You will see an amplitude modulation of 0.5 V over a 1 V signal, at a rate of 2 Hz on an initial
frequency of 10 Hz, during a two-second time span.
0.5V
2Hz
2 seconds time span
In the General Control page (see figure 4 - 7), enter the parameters as follows:
Module: 1 V peak
Angle: 0 deg.
2-4-189
DC offset: 0V
Frequency: 10Hz
Phase sequence: Zero
Source mode: active
Starting mode: Slow
Synchronization: Internal. (Only mode activated for now)
Programming: Start
Repetitive: Disable
Note : This mode, when Enable, leaves the program variation running forever after the
first Synchronization signal received (from Scopeview). To stop it, you have to toggle the parameters Programming from Start to Stop.
Programming: Enable
Note : This parameter displays the timed programming in a table format in the Hypersim
window.
In the Time variations page, enter parameters as follows:
Timed variations: Enable
Select the Frequency modulation type button
Amplitude: 10 Hz (Amplitude of the modulation + and )
Frequency: 1 Hz (Rate of the modulation)
Angle: 0.0 deg.
Operation timing: 0/2 s
B
Using Scopeview, look at the signals Vabc and Iabc of the source.
Use a Time length of 2.5 seconds and a sampling rate associated with the time step of the
simulation.
You will see a frequency modulation of 10 Hz over a 10 Hz signal (meaning a variation from
0 to 20 Hz), at a rate of 1 Hz, during a two-second time span.
2-4-190
1Hz
Step or ramp variations can be programmed independently for each of the source parameters
(amplitude, phase, frequency, DC component). These variations can coincide with a modulation. Five buttons in the bottom section on Timed variation page of the control panel allow
to select the parameter to be changed. Each selection is independent and has its own list of
parameters on the right side. The operation in steady state precedes and follows each variation, unless an infinite variation (without any end time) was programmed, a case where the
final value of the variation is kept until the interruption of the variations. Here is the list of
types of variations shown in the control panel. (See Figure 4 - 12)
Types:
2-4-191
Parameters: These parameters describe how the selected variables by typeset parameter
will change in time. For example, the A.C. amplitude, D.C. component and source phase variations are described in the following fields: Amplitude, Operation Timing and Phase.
Each of these fields is a list of specifications whose elements are separated by commas.
All the lists of a variation type must have the same number of elements. Moreover, each element of a list is linked with the elements in the same position of the other lists. The input format of the values in the lists is described below:
Amplitude: Specifies both the amplitude and the type of variation. Each element of the list
corresponds to a variation and consists of one to three numbers (initial value, final value and
increment), separated by /, following the variation type required. Here is the correspondence:
...B,...Initial value only: step variation
...B/E,...Initial value and final value: ramp
...B/E/I(,...Initial value, final value and increment: staircase.
Each element in the list must have a corresponding element in the Operation Timing and
Phase lists.
Operation timing: Specifies the start and end times to apply the variations. Each element
consists of two numbers separated by a/, depending on the case. The first (B) specifies the
start of the variation in seconds. The second (E) specifies the end of the variation in seconds.
Normally, both times must be entered and this is compulsory for ramps or staircases. It is
possible to specify only the start time (omit the /) for a step that keeps its value indefinitely.
Each element in the list must have a corresponding element in the Amplitude and Phase
lists.
Phase: Specifies to which source phases the variations must be applied. Each element in
the list designates a certain number of phases. These are simply the characters A, B and
C, juxtaposed, if one wants to apply the variation to phases A, B or C. To set only phase
A, the element in the list will be...,A,.... To set all the phases, the element will be...,ABC,...
Each element in the list must have a corresponding element in the Amplitude and Operation Timing lists.
Frequency: The value of the frequency is specified in the same way as the Amplitude.
However, the frequency variation always apply to all the phases of the source.
Sequence: List of types of sequences.
2-4-192
0.0/600000, 1000000/100
0.1/0.3,0.35/0.45
ABC
2-4-193
DC
Amplitude:
Operation timing:
Phase:
200000
0.2/0.3
ABC
Note : The values in the fields to program the wave amplitude (AC) were aligned vertically
to set apart both events occurring at times that do not coincide. Events affecting the
same object cannot coincide. However, two events affecting different parameters of
a source, such as the wave and DC components amplitude, can coincide without
any problem.
Figure 4 - 12 shows a section on the second page of the programmable voltage sources control
panel describing the preceding programming.
:
2-4-194
The harmonics are numbered from 1 (the fundamental) to 50. It is not necessary to specify
the fundamental (1). The list consists of elements separated by commas. Each element can be
an integer or a compact notation B/E/I allowing to specify a succession of harmonics, starting with the first (B) to the last (E) with increments I. It is possible to repeat the same harmonic number.
Amplitude: The list of amplitudes relative to each harmonic.
2-4-195
The amplitude of each harmonic is relative to the fundamental (amplitude 1). It is specified
by a number Ar so that 0.0 < Ar <= 1.0. The list must contain the same number of elements
as the list of harmonic numbers. The elements are separated by commas and each can be a
number between 0.0 and 1.0 or the compact notation B/E/I allowing to specify a succession
of equidistant amplitudes.
Angle: List of the phase angles for each harmonic.
Enter here the required phase angle displacement (outphasing) relative to the fundamental.
This outphasing must be specified in degrees. The list must contain the same number of elements as the list of harmonic numbers. The elements are separated by commas and each element can be an angle or the compact notation B/E/I allowing to specify a succession of
equidistant angles.
Sequence: List of specifications of the sequences (positive, negative, zero and per phase)
Phase: List of phases to which apply the parameters per phase (list Sequence)
The Phase list must contain as many elements as there are parameters per phase (P) in
the Sequence list. It can be empty if there are no parameters per phase. The elements are
separated by commas. Each element can be formed by a concatenation of the letters A, B
and C corresponding to the selected phases. The case ABC is programmed more simply
by using the positive sequence (D).
The fields allowing to program the injection of harmonics are at the beginning of the page.
There are two such fields:
Operation timing: List of enable/disable times - activation/deactivation.
This is a list of the time values whose elements are separated by commas. Each element can
be a numerical value or a compact notation B/E/I for a series of equidistant values. The list
must contain at least one element in order to generate harmonics.
2-4-196
Operating activation: List of activations. This list specifies whether there is or not activa-
tion of harmonics. It is linked with the list of times and must contain the same number of elements. The elements are separated by commas. Each element can have the value 1 to
activate harmonics or 0 to deactivate. The minimum list must contain the value 1 in order
to generate harmonics. In this case, the generation of harmonics will begin at the time entered
in the Operation Timing list and will remain active until the events programming is stopped
by clicking the Stop button on the first page of the control panel.
The global activation of harmonic injection is done by clicking the Enable button on page
3. When Disable is selected, the source operates without harmonics. However, the programming of harmonics is saved and can be reactivated at any time.
2-4-197
Amplitude: 0.25pu
Angle: 0
Sequence: D
B
Using Scopeview, look at the signals Vabc and Iabc of the source.
Use a Time length of 2.5 seconds and a sampling rate associated with the time step of the
simulation.
You will get a generation of 0.25 pu of the 10th harmonic in direct sequence overimpose with
the main signal of 10 Hz, and so between 0.1 and 1 second and also between 1.1 and 2 seconds.
D List of Available
Signals
The controlled voltage and current sources represent a single or three-phase A.C. source with
a series or parallel RLC impedance. In the network, these sources only generate the signal
received on the control connectors. Hence, this process serves only to amplify or inject a signal in the network.
2-4-199
The following icons and diagram are used to represent controlled sources.
Current and Voltage Controlled Sources
B Controlled
Sources Icons
and Diagrams
Properties:
Main features:
Amplify or inject a signal
in the network from control block world.
Implementation:
Voltage Sources has series
impedance only that can
be series or parallel RLC
elements;
Same for the Current
Sources;
Voltage Sources always
reference to the ground;
Current Sources injects current
between buses without grounding.
The voltage and current sources are implemented in the network as follows:
The voltage source always has a series impedance. However, this impedance can be a collection of series or parallel RLC elements. The same applies to the current source, always having
a parallel RLC impedance, parallel or series type. The voltage source has only one network
connector, since is always referenced to the ground. The current source injects a current from
one bus to another, without grounding.
The single or three-phase signal applied to the control connectors as input will be the signal
sent to the network, single or three-phased.
2-4-200
Figures 4 - 17 and 4 - 18 show respectively the control panels for voltage and current sources.
RLC connection = Series (series R, L, C) or parallel (parallel R, L, C);
2-4-201
2-4-202
Chapter 5
SYNCHRONOUS TURBINE GENERATORS
5.1 INTRODUCTION
HYPERSIM provides three different models of synchronous turbine generators: a hydraulic
turbine generator, a tandem steam turbine generator and a cross-compound steam turbine
generator.
Each synchronous generator model is fully complete and functional by itself. Each model integrates various subsystem such as turbine, excitation system, stabilizer, shaft, etc. Any of
those built-in subsystem can be by-passed and replaced by a custom user-defined subsystem,
giving a great flexibility on the modelling aspect.
The icons and diagrams of the hydraulic and thermal turbine generator models are illustrated
respectively in Figure 5 - 1.
Only the modular model is provided for the thermal cross-compound turbine generator. However, this modularity is very limited because only the speed regulator can be modelled externally to the turbine generator block. The icon and diagram of the cross-compound turbine
generator are shown in Figure 5 - 1.
2-5-203
Properties:
7 Three models:
Hydraulic turbine/generator
Tandem steam turbine/generator
Cross-compound steam turbine/
generator
Main features:
The hydraulic and thermal models
each have two versions
Implementation:
Generic models
Modular model that can be modelled externally (except synchronous machine)
Water
Stabilizer
Volt. Reg
Speed Reg
Exi
Gen
2-5-204
Speed Reg
Stabilizer
Volt. Reg
Reheater
to condenser...
Boiler
Exi
Gen
Heat
Boiler Reg
Speed Reg
Stabilizer
Volt. Reg
Boiler
Gen
Exi
Gen
Exi
Heat
Boiler Reg
Reheater
to condenser...
Stabilizer
Volt. Reg
2-5-205
Hydraulic
turbine
generator
Subsystem
CrossCompound
Steam Turbine
generator
Tandem Steam
turbine
generator
Synchronous Generator
Excitation system
Stabilizer
Boiler
Shaft
1 mass
10 masses
2x 5masses
Hydraulic Turbine
Speed Regulator
& Governor
(Hydraulic turbine)
Speed Regulator
& Governor
(steam turbine)
Speed Regulator
& Governor
(cross-compound turbine)
As seen in the previous table, the synchronous alternator, the exciter and the stabilizer subsystem are the same for all three turbine generator models. These common generic subsystems are described first, followed by the features of each turbine generator group.
Operation
The generic synchronous generator model implements the equations of the synchronous alternator in the Park axis (DQ), using Shutlz methods. Since two sets of equations are necessary for D and Q axis, Figure 5 - 5 and 5 - 6 illustrate those sets of equations.
In addition, Figure 5 - 7 presents voltage, power and electromagnetic torque calculations to
be used in the entire machine model.
2-5-206
Xd - XI
Xd - XI
Efd
+
1
Tdo*s
Xd - Xd
1
1 + Tdo*s
Xd - XI
+ ge_phid
-
Vt
(Xd - Xd)(Xd - Xd)
(Xd - XI)2
Xd - Xext
Ifd
ge_XadIfd
Xd - XI
Xad*Ifdmax
SatOn
off
Xad*Ifdmin
ge_Ifd
1 / Xad
on
Id
Xq - XI
Xq - XI
1
Tqo*s
1+
Xdq - Xq
1 + Tqo*s
Xq - XI
(Xq - XI)2
-
+ ge_phiq
-
Xq - Xext
Iq
Xq - XI
(Xq - Xq)(Xq - Xq)
(Xq - XI)2
(Xq - XI)(Xq - Xq)
(Xq - XI)
2-5-207
ge_phid
ge_phiq
Id
Iq
Vtd
Vtq
2
2
Vtd + Vtq
Ed
Eq
Edreg
Eqreg
Pe
Qe
Te
Pe = Vtd*Id + Vtq*Iq
Qe = Vtq*Id - Vtd*Iq
Electromagnetic torque applied on rotor, on turbine base
Te = (ge_phid*Iq - ge_phiq*Id) *baseMVA/baseMW
Filtering of Power reference
Peo
Peof = -----------------------------1+TfilPeo*s
Voltage reference for excitation.
If "Voltage reference selection" is set to "Vref"
Vreff = Vref
If "Voltage reference selection" is set to "Vref=Vt"
Vreff = Vreff is calculated in order to have a
terminal voltage of Vref.
This calculation is done at code generation only,
and it is function of parameters
(Peo, Qeo, Vref, Saturation)
Programmable
General
Parameters
2-5-208
Automatic
calculation
of reference
Saturation
(signal reference to
excitation system)
Note: Automatic calculation is done
at code generation only.
Peo and Qeo must be supplied for an exact
calculation at this operating point.
2-5-209
5.4.3
Load Flow
These parameters are provided by the steady-state solution of the network. They can be used
to initialize the machines.
Type: Type of bus (E = swing bus; G = generation bus);
Voltage: Load flow voltage (pu);
Angle: Load flow angle (Deg);
P: Active power (MW);
Q Min: Minimal reactive power (Mvar);
Q Max: Maximum reactive power (Mvar).
5.4.4
Programmable
Parameters
ge_Xtfo, ge_Rtfo: These parameters are null when the output voltage of the generator is
regulated; they represent the leakage reactance and the copper losses of the transformer
when the voltage on the high-voltage side of the step-up transformer is regulated.
ge_Xl: Armature leakage reactance (Xl) (pu);
ge_Ra: Armature resistance (Ra) (pu);
ge_Xd: Direct synchronous reactance (Xd) (pu);
ge_Xd1: Direct transient reactance (Xd') (pu);
ge_Xd2: Direct sub-transient reactance (Xd) (pu);
ge_Xq: Quadrature synchronous reactance (Xq) (pu);
ge_Xq1: Quadrature transient reactance (Xq') (pu);
ge_Xq2: Quadrature sub-transient reactance (Xq) (pu);
ge_Td01: Direct axis transient time constant (Tdo') (s);
ge_Td02: Direct axis sub-transient time constant (Tdo) (s);
ge_Tq01: Quadrature axis transient time constant (Tqo') (s);
ge_Tq02: Quadrature axis sub-transient time constant (Tqo) (s);
ge_Tdif: Differentiation time constant (default value = 0.0001s)
ge_SatOn: Saturation (1 = yes / 0 = no);
ge_Ifdmin: Lower limit of Ifd. To prevent Ifd from taking a negative value, set
ge_Ifdmin= 0 (pu);
ge_Ifdmax: Upper limit of Ifd (pu);
ge_eu, ge_el, ge_sgu, ge_sgl: Parameters used to generate saturation curve as follows:
See Figure 5 - 9 (pu).
2-5-210
Vt
EU
1.0
EL
If Vt < 0.8
I fd = V t
0.8
If Vt > 0.8
I fd = V t + e i
where:
e i = a ( e
Iag IL
IU
b ( V t 0, 8 )
1)
E L S GL
a = --------------------------------b ( E 0, 8 )
e L
1
Ifd
ln [ ( E U S GU + a ) ( E L S GL + a ) ]
b = --------------------------------------------------------------------------EU EL
( I U I AG ) E U
S GU = ----------------------------------EU
( I L I AG ) E L
S GL = --------------------------------EL
Figure 5 - 9 Generator Saturation Curve
ge_Two: Frequency setting time (in seconds, typically = 4s);
ge_Ango: Initial angle of voltage behind ge_Xext;
Operation
The excitation system regulates the terminal voltage of the synchronous machine. It allows
to regulate the voltage at the terminals of the machine, or on the high-voltage side of the stepup transformer. This regulation is done by varying the field voltage Efd based on the difference between the desired user reference voltage Vref and the actual voltage ex_Vtreg. The
signal Vstab from the stabilizer can be added to this regulation loop.
The excitation system is composed of two systems, a voltage regulator and the exciter.
The field voltage Efd is limited between ex_Vrmin and ex_Vrmax, based on the voltage to
be regulated.
2-5-211
Vtmax
Kp
Vtmin
Vreff
ex_Vrmax
Edreg
Edreg2+Eqreg2
ex_Vtreg
1 + Tr*s
Exci_on
1
-
Eqreg
Ka
1 + Ta*s
Exci_mod
on
internal
off
external
Efd
ex_Vrmin
ex_Efdfix
Vstab
Kf*s
1 + Tf*s
Efd_i
Programmable
Parameters
The parameters are shown in the block diagram of the excitation system (ex_Tr, ex_Ka,
ex_Ta, ex_Kf, ex_Tf, ex_Vtmax, ex_Vtmin, ex_Vrmin, ex_Vrmax, ex_Efdfix, Exci_on). In
addition, the excitation system can be off and set to a constant value. Moreover, the excitation
system can be modelized externally by a user-defined model, depending on the state of
exci_mod switch.
exci_on: Selection of excitation system operation. (On=Normal regulation; Off=constant excitation);
exci_mod: Selection of excitation system model. (Internal = actual model;
External = model supply by user);
ex_Tr: Voltage measurement time constant, (sec);
ex_Ka: Voltage regulator gain;
ex_Ta: Voltage regulator time constant (sec);
ex_Kf: Damping filter feedback gain;
ex_Tf: Damping filter feedback time constant (sec);
ex_Kp: Proportional gain on voltage limit;
ex_Vtmin: Minimum static limit on voltage measurement (pu);
ex_Vtmax: Maximum static limit on voltage measurement (pu);
ex_Vrmin: Minimum static limit of excitation voltage (pu);
2-5-212
Generic Stabilizer
The stabilizer system is designed to damp most electromechanical oscillations. The stabilizer
output is supplied to the excitation system, so it has an effect on the field voltage during transients. The block diagram of the stabilizer is shown in Figure 5 - 11. The stabilizer inputs are
Pe or Pef (filtered electric power) and x (gate opening). For Hydraulic machine, the filtered
electrical power Pef is used, calculated in the speed regulator. For steam turbine machine, the
electrical power Pe is used with no filtering.
Operation
.
Pe or
Pef ***
Kap
1 + Tap*s
Kag
1-Tw1*s
1 + Tag*s
1 + Tw2*s
Vstab_i
Stab_on
Vsmax
s*(1 + T1*s)
1 + T3*s
Ks*T5
1 + T2*s
1 + T4*s
1 + T6*s
Vsmin
Stab_mod
on
internal
off
external
Vstab
0
*** For hydraulic model, the
filtered electrical power (Pef) is used by stabilizer
(see Speed regulator.)
Programmable
Parameters
The parameters are shown in the block diagram of the stabilizer diagram (st_Kag, st_Kap,
st_Tag, st_Tap, st_Ks, st_Tw1, st_Tw2, st_T1, st_T2, st_T3, st_T4, st_T5, st_T6, st_Vsmin,
st_Vsmax). In addition, the stabilizer can be off via parameter stab_on. Moreover, the stabilizer can be modelized externally by a user-defined model, depending on the state of
stab_mod switch.
Stab_on: Selection of stabilizer operation. (On=Normal operation; Off=no stabilizer);
Stab_mod: Selection of stabilizer model. (Internal: actual model; External: model supply by user);
st_Kag: Gain on gate opening;
st_Kap: Gain on electric power;
st_Tag: Time constant on gate opening (s);
st_Tap: Time constant on electric power (s);
st_Ks: Stabilizer gain;
st_Tw1: Stabilizer time constant (s);
2-5-213
3
Hydro
Properties:
The:
Speed regulator;
Turbine;
Stabilizer;
Excitation.
can be modified.
HydCmd
Main features:
This machine includes:
A generic speed regulator
for hydraulic generating
plants;
A generic hydraulic turbine and;
A shaft model.
Implementation:
-
2-5-214
Dam
Speed regulator
Reservoir
Generator
Control gate
Turbine
wo
Speed
Regulator
Peo
Hydraulic
Turbine
Pmec
Stabilizer
Shaft
Vstab
Pe
Vreff
Excitation
& voltage
Efd
Edreg, Eqreg
Park
Conversion
Ia
Ib
Ic
Te
Synchronous
Generator
Id, Iq
Va
Vb
Vc
Vtd, Vqt
Ed, Eq
2-5-215
The speed regulator, is responsible to produce the gate opening signal x depending on actual
electric power Pe and speed w. In fact, this type of regulator is a speed and power regulator,
because it achieves a specific characteristic of regulation, called permanent droop between Pe
and w. So, this regulator needs two different users reference, Peo and wo.
Operation
The regulation characteristic is illustrated in Figure 5 - 15 It represents a line with a slope re_sigma (permanent droop) on which the speed w is equal to the rated speed wo when the
electric power required is equal to the reference power Peof. So, if the machine delivers more
than its reference, the machines speed will tend to decrease, depending on the permanent
droop value.
The speed regulator has two different operating modes. The first operation mode, based on
electrical power regulation, is achieved when re_iop=1. In that mode, the regulator will adjust
x in order to have an electrical power output to be the same as the power reference (Peo).
The second speed regulator operation mode, based on gate opening regulation, will adjust the
gate opening to have mechanical power output be the same as the electrical power reference.
In that case, the friction losses (Tgo) are not considered in the regulation.
The block diagram of the power and speed regulator is illustrated in Figure 5 - 16.
w
-re_sigma
wo
Peof
re_Pe
2-5-216
1 + Ta1*s
1 + Ta2*s
o
Pe
1
1 + Twatt*s
ge_mva
tb_mw
Operation mode
re_iop
Peof
ge_mva
tb_mw
-
sigma
1 + Tp*s
Servo-valve
vxmax
Kg(1 + T1*s)
1
s
Ts(1 + T2*s)
delta*Tt*s
1 + Tt*s
vxmin
xmin
Regvi_mod
external
Regvi_mod
internal
Pef_i
internal
+
x_i
xmax
Pef
external
Programmable
Parameters
2-5-217
The actual model of hydraulic turbine also includes the shaft system, that is represented as
single mass.
Operation
The hydraulic turbine model is responsible to produce the mechanical power to be applied to
the shaft system. The shaft system then applies the swing equations, in order to produce the
speed of the machine.
The block diagram of the turbine model, including the shaft, is shown in Figure 5 - 17.
dw
Beta
penstock
x
q/x
Hydraulic turbine
Turb_on
q
-1
Peo
1.0
tb_gPm
Pm
on
Tw*s
off
BaseMW
Tm
Pm / w
Shaft_on
on
Tm
wo -1.0
wmax -1.0
Te
dw
Tgo
w_i
1
2Hmec*s +Kd
off
Shaft_on
+
wmin -1.0
1.0
Turb_mod
on
internal
off
external
wo
Note
**all signals are refered to pu on the turbine base (baseMW)
***The value Hmec is the inertia constant converted to turbine base.
Hmec = H * BaseMVA/BaseMW.
****tb_gpm is now obsolete, kept for compatibility.
Programmable
Parameters
Turb_mod: Selection of turbine and shaft model. (Internal: actual model; External:
model supply by user)
Turb_on: Selection of turbine operation. (On=Normal operation; Off=constant power
equal to power reference Peo/baseMW)
2-5-218
List of
Available
Signals
2-5-219
Operating
Mode
Using hydraulic synchronous machine, various operating modes are available. These modes
are valid for both the hydraulic and thermal models, since they mainly concern the generic
parts (generator-excitation):
Generating Mode This is the most common mode. A positive mechanical torque is ap-
plied to the shaft of the machine, thereby inducing its rotation. This mechanical torque originates from a hydraulic or thermal turbine. The generator offers an equivalent electrical
torque, but of opposite sign, thereby providing electric power to the network. Any imbalance
between the electrical and mechanical couple translates into a speed variation of the turbine
generator. The excitation circuit is used to regulate the output voltage of the machine and the
speed regulator to control the water or steam input (thermal or hydraulic), thus ensuring a balance between the mechanical and the electrical couple.
Synchronous Compensator Mode Any turbine generator can be used in the synchro-
nous compensator mode by removing the turbine (hydraulic or thermal) and using the machine with no load. By adjusting the excitation circuit, it is possible to control the network
voltage, and to provide or absorb the required reactive power.
Synchronous Motor Mode The same machine can also be used as a motor, in other
words with a reverse mechanical couple, allowing, for example, to pump water upstream to
the dam.
Type 1 Machine Mode In some cases, stability programs require a Type 1" machine or a
constant voltage source behind an impedance, but with a frequency varying as a true machine.
Such a behaviour can also be emulated.
2-5-220
5.9.5
Hydraulic
Turbine
Generator
Control Panel
2-5-221
2-5-222
2-5-223
CC
CrossCmpd
Properties:
The:
Speed regulator;
Turbine;
Stabilizer;
Excitation;
Boiler;
5-10 mass shaft.
can be modified.
T
Therm
10
ThermCmd
Main features:
This machine includes:
A low-pass filter for the
power reference Peo;
A block that automatically
calculates the voltage reference Vreff when the
parameter Vref_select=1;
A generic models of a
speed regulator for thermal
plants;
A multi-mass shaft;
A boiler and;
A steam turbine.
Implementation:
-
2-5-224
Chimney
Superheater
Speed
regulator
Turbines
Boiler
Superheater
Control
valve
Generator
Gas
To the network
Condenser
Cooling water
Boiler
wo
Peo
Ia
Ib
psih
mhuh
Speed and
power
regulator
Ic
Thermal
turbine
Pe
Pmec
Park
ConversionP
5-10 mass
shaft
Stabilizer
Va
Vstab
Vb
Vc
Vreff
Excitation and
voltage
regulator
Efd
Eqreg
Synchromous
alternator
Edreg
Id, Iq
Ed, Eq
2-5-225
5.11.1 Operation
The boiler block diagram is shown in Figure 5 - 24. The upper part of this figure presents the
boiler pressure regulator, as well as the lower part presents the boiler itself. The boiler input
is the high pressure steam flow mhuh and the output is the boiler pressure psih. As mentioned
earlier, the boiler subsystem includes a PI type pressure regulator that controls the steam pressure output. Since the boiler has slow dynamics with respect to the other model, this subsystem is often neglected and set as a constant pressure source.
press
ki
s
bmax
t9s+1
kpc
(t9/10)*s+1
1
t8*s+1
td
mhub
0
k4
press ***
-
mhuh
boiler_on
k3
s
k2
Boiler model
boiler_mod
internal
on
psih
1
off
external
press
psih_i
Signal from a users defined boiler system.
Boiler pressure from the external system
must be supplied to inplut connector "psih_i".
boiler_on: Selection of boiler operation. (On=Normal operation; Off=no boiler, constant pressure);
boiler_mod: Selection of boiler model. (Internal: actual model; External: model supply
by user);
ch_press: Boiler pressure output reference (pu);
ch_bmax: Upper limit of boiler pressure (pu);
ch_kpc: Proportional gain of boiler regulator (pu);
ch_ki: Integral gain of boiler regulator (pu);
2-5-226
5.12.1 Operation
The block diagram of the speed regulator, including the servo-valve, is illustrated in Figure 5
- 25.
w
+
wo
-
1/r
Peof
db
Servo-valve
k1
mhuh
x_i
ahlim
pah1
1/BaseMW
1
t1*s+1
1
s
1
t2
- pah2
Regvi_mod
internal
external
k1 - 1
5.13.1 Operation
As inputs, this subsystem receive the steam pressure psih and the gate opening x. As a result,
three mechanical torque th, ti, tl, are produced.
The physical modelling of the tandem steam turbine is presented in Figure 5 - 27. It describes
most common configuration of tandem steam turbine, with single reheat, double reheat, and
steam crossover.
Steam flow
Steam flow
2 turbine stages
single reheat
(fl=0; fh+fi=1.0)
3 turbine stages
single reheat
(sw1=0; fh+fi_fl=1.0)
Steam flow
3 turbine stages
double reheat
(sw1=1; fh+fi+fl=1.0)
2-5-228
Turbine
configuration
sw1=0
al
Reheater
x
psih
1 + T3*s
Steam chest
Fh
1+T4*s
1 + T5*s
1
Tr1*s
ai
1
Tr2*s
Turbine
configuration
sw1=1
al
Fi
High
pressure
turbine
1+T6*s
1 + T7*s
Fl
Intermediate
pressure
turbine
1+T11*s Low
1 + T12*s pressure
turbine
Turb_on
on
th_i
ti_i
tl_l
(Peo/baseMW)* Fh
(Peo/baseMW)* Fi
(Peo/baseMW)* Fl
off
Turb_mod
internal
th, ti, tl
external
Turb_mod
internal
mhuh_i
mhuh
external
2-5-229
The shaft model offers a multi-mass implementation. Thus, it can be used to study sub-synchronous resonance phenomena. The objective of this model is to modelize the mechanical
distortion and oscillation occurring in the shaft. First, a shaft model receives as inputs the
three mechanical torque signal (th,ti,tl) coming from each steam turbine stage. As a results,
the shaft model produces speed signal for each individual masses in the system.
Such a shaft model is represented physically in Figure 5 - 28. It can be observed that the different stages of the turbines are located on the same shaft, thus explaining possible torsional
oscillations between different stages. The actual shaft model allows to represent the behaviour using 1, 5 or 10 masses.
2-5-230
Generic Shaft
te tgo
th ti tl
Shaft
1-mass-model
Torque applied
on shaft
1
th
te tgo
tl
ti
Shaft
5-mass-model
5
th
3
tl
ti
te tgo
Shaft
10-mass-model
10 9
kij
Physical
hi
representation
di
dij
k23
h3
d23
Generator
mass (#1 or 2)
k12
h2
d3
Generator
mass (#1 or 2)
h1
d2
d12
d1
2-5-231
2 0
th
2 0
1 0
T12
T23
T34
ti
T23
+
T34
tl
h3
Tl 2d
T12
T23
h2
2d
T45
T12
2
h1
Generator
Te 1d 1
Tgo
d
( ) = ( )
j 0
dt j
w_i
w2
2
w3
2h d ( ) = Tm + ( Te ) + k ( ) k ( )
jdt
j
j
j
j ij j
i
jk k
dj ( j ) + djk ( k j ) dij ( j i )
w1
w4
w5
shaft_on
shaft_mod
on
internal
off
external
2-5-232
Generic Shaft
2-5-233
2-5-234
Generic Shaft
5.14.4 Thermal
Turbine
Generator
Control Panel
2-5-235
2-5-236
Generic Shaft
2-5-237
2-5-238
The cross-compound thermal turbine generator has two generating units (primary and secondary) and only one boiler. Many components of this model are similar to those of the ordinary thermal turbine generator. Only the turbines, the speed regulator and the shaft are
different. The list of parameters and available signals is the same for both generating units of
the cross-compound thermal plant. An _s suffix is added to the names of parameters and
available signals of the second generator.
5.15.2 CrossCompound
Thermal
Turbine
Generator
Model
Speed
gov.
Superheater
To Network
Gen Primary
group
Boiler
Condenser
Gen
Secondary
group
2-5-239
Ed,Eq
Vref
SECONDARY GROUP
Ed, Eq
Id,Iq
Wo
Peo
Park
Conversion
Pe
Edreg,Eqreg
Vref
Excitation
W
Synchronous
Alternator
Efd
Vstab
Stabilizer
Shaft
Tmec
mhuh
PRIMARY GROUP
Efd
Excitation
Vstab
Stabilizer
Cross-compound Turbine
psih
Boiler
X
Speed
and
Edreg,Eqreg
Alternator
Synchronous
Tmec
Shaft
Pe
Id,Iq
Park
Conversion
Ia
Ib
Ic
Va
Vb
Vc
2-5-240
The block diagram of the speed regulator is shown in Figure 5 - 36. It is similar to the tandem
turbine generator, except that the latter regulates a signal originating from one of both generators.
Steam Turbine
w_s
w
wsensor
1
twfils+1
1/r
wo
1/r
err2
+
db
+
Peof
k1
Servovalve with speed
limits -position.
1/BaseMW
+ err4
mhuh
k1 - 1
1
tsr*s+1
ahlim
pah1
1
s
1/ tcv
-
- pah2
Figure 5 - 37shows the block diagram of the steam turbine model.This diagram represents the
steam tank, the three stages of the turbine and the heaters.
2-5-241
psih
mhuh
Tmec1
Tmec3
k1
k3
1
t1s+1
Tmec5
k5
k2
k4
Tmec2
Tmec4
k7
1
t4s+1
1
t3s+1
1
t2s+1
Tmec7
k6
Tmec6
k8
Tmec8
5.17.3 List of
Available
Signals
At acquisition, the following signals are made available by the sensors. Only signals from
subsystems common to both turbine generators and signals from the primary turbine generator are listed. The names of signals from the secondary turbine generator are obtained by adding a suffix _s to the names of signals from the primary turbine generator.
V_label_a,b,c: Voltages at the breaker terminals (V);
I_label_a,b,c: Currents from the generator (A);
Id_label: D axis generator current (pu);
Iq_label: Q axis generator current (pu);
Ed_label: Voltage behind inductance (pu);
Eq_label: External, D and Q axes (pu);
Vt_label: Output voltage (pu);
Efd_label: Field voltage, general (pu);
Vstab_label: Stabilizer output voltage (pu);
2-5-242
Multi-Mass Shafts
Figure 5 - 38 illustrates the physical layout of the two shafts. It can be observed that different
stages of the turbines are supported by the same shaft. This layout can potentially induce torsional oscillations between different masses on the same shaft.
The model of the thermal turbine generator has two shafts, each with either one or five masses. In addition, the cross-compound turbine generator model allows the application of a mechanical torque to each turbine mass. Since the masses are hard-coded, shaft models with a
mass number other than 1 or 5 will be simulated by setting the inertia of non-existent masses
to very small values and the rigidity factors adjacent to the shafts to a very high value.
2-5-243
.
Turbine Stages
Numbering of
masses
#5
#4
Primary Generator
#3
#2
#1
Tmec1
Tmec3
Tmec5
Tmec7
Tmec2
Tmec4
Tmec6
Tmec8
Numbering of
masses
#5
#4
#3
#1
#2
Turbine Stages
Secondary Generator
2-5-244
Multi-Mass Shafts
2-5-245
2-5-246
Multi-Mass Shafts
2-5-247
2-5-248
Multi-Mass Shafts
2-5-249
2-5-250
Chapter 6
PASSIVE ELEMENTS
B RLC Elements
Icons and
Diagrams
Tables 61 and 62 show respectively the icons and diagrams used to represent series and
shunt RLC elements.
One end of a shunt RLC element must be connected to a bus while the other end can be
ground connected or not, based on the type of connection. The series element must be connected between two buses in the network.
The palette of models allows to select from 14 icons and diagrams.
LC
RC
RL
RLC
Icon
Element
2-6-251
Passive Elements
LC
RC
RL
RLC
Icon
Element
For shunt elements, three types of connections are available for three-phase connections:
Ground Y Connection: one end of the shunt RL element is connected to a bus and the
other end to the ground (see Figure 6 - 1).
2-6-252
Floating Y Connection: one end of each RLC branch of the RLC element is connected
to a phase at the end of the bus, while the other ends are connected together, but not to
the ground. Figure 6 - 2 shows a floating Y connected shunt RL element.
Delta Connection (or triangle). In the case of a Delta connection, the three RL branches
of a three-phase element are Delta connected, and each top of the Delta is connected to
a phase of the bus. Figure 6 - 2 shows a shunt RL element Delta connected. It can be
seen that Figures 6 - 2 and 6 - 3 do not really represent the actual connections of a shunt
RL element. This is a small inconvenience and there are many ways to go around it. For
example, the user can put a Y sign next to the diagrams of a Y connected shunt RLC
element and a Delta sign next to the diagram of a Delta connected shunt RLC element.
Passive Elements
B1_a
B1
B1_b B1_c
(a)
(b)
B1
B1_a
B1_b B1_c
(b)
(a)
B1
B1_a
B1_b
B1_c
(a)
(b)
Base Values
Base MVA: Base power;
2-6-253
Passive Elements
E List of Available
Signals
F Control Panel of
Series RLC
Elements
Passive Elements
G Control Panel of
Shunt RLC
Elements
.
The non-linear resistor model was developed to represent the different surge arresters found
in the network. This model is similar to the one found in EMTP. It allows to represent, in addition to the typical behaviour of surge arresters, any form of non-linear current-voltage relation. The model has two implementations: parallel or series connection.
2-6-255
Passive Elements
B Non-Linear
Resistors Icons
and Diagrams
Table 63 : HYPERSIM QUICK REFERENCE
Series and Parallel Non-linear Resistors
ZNO
ZNO_Shunt
2
RnLin
Properties:
7 Instant description of the voltage behaviour with respect to
the current.
RnLin
Main features:
Dissipate a greater quantity of current if an over
voltage or surge occurs,
since its resistance
decreases
Implementation:
Series connection
The non-linear resistor model consists mainly of a compiled curve that describes, instantaneously, the behaviour of V with respect to I. It is known that the voltage curve with respect to
the current in a resistor is a line whose slope is equal to the value of the resistance.
To represent a surge arrester, this line bends as the voltage increases. Hence, a surge arrester
allows to dissipate a greater quantity of current if an over voltage or surge occurs, since its
resistance decreases.
The resistor can be characterized as follows:
2-6-256
Passive Elements
V
Vmin[2]
I = P[2] * (V / Vref) ** Q[2]
Vmin[1]
Vmin[0]
Connection:
E Parameter Input
Input data format: Select the parameter input type, either using the EMTP method
(exponential section) or with a matrix.
EMTP format
Number of exponentials: Number of exponential sections of the curve (does not
include the first linear section);
Vref: Base voltage on which the value of Vmin is evaluated (V);
Vmin: Value of the voltage for each section change. There are as many Vmin values
to provide as there are exponential sections (pu);
P: Value characterizing the exponential section. There are as many P values to provide as there are exponential sections (A);
Q: Value characterizing the exponential section. There are as many Q values to provide as there are exponential sections
2-6-257
Passive Elements
F Matrix Format
G List of Available
Signals
H Control Panels
2-6-258
Passive Elements
2-6-259
Passive Elements
2-6-260
Passive Elements
Mutual Inductances
In the model of a three-phase coupled reactor, the R and L elements are coupled. This model
is equivalent to a PI line without capacitors.
Units: SI or pu
SI: Specifies the values of the components in international system units (ohm, henry
and farad);
pu: Specifies the values of the components in p.u. units (Ohm, Henry and Farad p.u.
(per unit).
Base Values
Base MVA: Base power;
Base Volt: Base voltage;
Base Freq: Base frequency.
C RL Parameters
D List of Available
Signals
As is the case with EMTP, the model of the three-phase coupled reactors does not provide
any signal to the user.
E Control Panel of
Three-Phase
Coupled
Reactors
2-6-261
Passive Elements
Decoupling Elements
In order to decrease the calculation load, the task of a complex station can be divided into two
sub-tasks using a decoupling element. There are two types of decoupling elements: with and
without an isolation transformer. The first type is a single or three-phase element, while the
second type is strictly three-phase. The decoupling element replaces a reactor between two
power systems to be decoupled.
In the decoupling element diagram, the dot specifies side two of the element. It is important
not to leave another series reactor with the decoupling element on side 1.
2-6-262
Passive Elements
Decoupling Elements
B Decoupling
element Icon and
Diagram
Table 64 : HYPERSIM QUICK REFERENCE
Decoupling Elements
Decoupling
Dec_XFO
Properties:
7 Decrease calculation load;
7 Divide in two subtracts a complex station
Main features:
The decoupling element is
either single and/or three
phase type;
Decoupling Elements
D List of available
signals
No signal is available.
2-6-263
Passive Elements
Decoupling Elements
E Applications
.
After decoupling
2 simulation tasks with
one time step delay solution
Before decoupling
1simulation task
Decoupling
Element
System 1
System 2
System 1
System 2
No grounded phase
Before decoupling
After decoupling
Decoupling
Element
System 1
- floating
System 2
- floating
System 1
- floating
System 2
- floating
A delay of one time step is created using those elements. So it can create divergence of the
simulation and may or may not be used on a case by case basis.
2-6-264
Passive Elements
Decoupling Elements
HINT. A good way for decoupling a sub-station is by replacing the leakage impedance of the
sub-station transformer by a decoupling element in series with the primary winding of the
transformer and to transfer the parameters from one to the other. But again, depending on the
short-circuit power of the simulated network, it may or may not work.
L1
L2
To other sub-stations
Decoupling
L3
RL=Xfo leak
LS=Xfo leak
Transformer
leak
R1 and L1 = 1e-6
Before decoupling
After decoupling
Decoupling
Element
System 1
- floating
System 2
- grounded
System 1
- floating
System 2
- grounded
Passive Elements
Decoupling Elements
Before decoupling
After decoupling
Decoupling
Element
L leakage
1D
3D
5D
1D
L leakage = 0
c
4D
6D
5D
a
L leakage
3D
2D
c
4D
6D
2D
Figures 6 - 18 and 6 - 19 show forms used for decoupling elements with and without an isolation transformer.
2-6-266
Passive Elements
Passive Filters
Passive filters are elements showing an identical impedance in different resistance-inductance-capacitor combinations series or parallel connected. Even though these can be represented with simple passive elements, using filters has the advantage of eliminating nodes
between components, thereby decreasing the number of nodes or the size of the Z matrix in
the station where they are found. Meaning that the station simulation time is also decreased.
There are five types of filters available in Hypersim:
Series-parallel RLC filter;
Type C filter;
High-pass filter;
Double-tuning filter;
General filter.
The configuration for each filter is shown in Figure 6 - 20. As for shunt RLC elements, passive filters can be Y, Y Ground and Delta connected. There are no filters with series elements.
2-6-267
Passive Elements
Passive Filters
Filters only have several general parameters. To specify the parameters of a filter, SI units are
always used. The function allowing to change units is not available for all filter models.
Hence, the only general parameter is the filter connection:
For a three-phase filter Y ground, Y floating or Delta.
C RLC Parameters
Filters consist of specific RLC combinations and each has a fixed number of elements. As can
be seen in Figures 6 - 21to 6 - 24, the configuration of each filter is shown in their respective
control panel. This allows to associate the parameter to the element whose value the user
wants to set.
Rx: x resistance value for each phase;
Lx: x inductance value for each phase;
Cx: x capacitor value for each phase.
D List of Available
Signals
Since the filters are simulated as elements forming a whole and not as individual elements,
the following signals are made available by the sensors at acquisition:
I(a,b,c)_label: Current for each phase (A).
Hence, the currents flowing in the individual elements are not available.
2-6-268
Passive Elements
Passive Filters
E Passive Filters
Control Panels
2-6-269
Passive Elements
Passive Filters
2-6-270
Chapter 7
LINES AND CABLES
Hyperline Line
Data
The Hypersim Hyperline Line Data tools compute the RLC parameters of an overhead transmission line from its conductor characteristics and tower geometry. See the help file in the
Hyperline Line Data GUI.
2-7-271
7.1.2
Load File
(EMTP)
An EMTP file that contains the physical parameters of the lines (Fig 7 - 6, 7 - 7 and 7 - 8) or
the resolve matrix by the external software of EMTP (Fig 7 - 2) can be loaded automatically
in the parameter form.
Hypersim allows the user to directly transfer data originating from files in three types of format.
Transfer of Parameters from a EMTP .PUN file.
The EMTP AUX routine allows to use a line parameter file to generate a file in .pun
format. When the user clicks on the control panel fichier button, Hypersim transfers
the data in the specified .pun file to the line control panel. It is not possible to read the
data contained in the .PUN file in the case of PI lines.
Calculation of parameters from a Inpurdue type input file.
Historically, Purdue University has developed a TRANS2 program allowing to calculate line parameters using the geometric data of conductors. This program was repatriated by IREQ, improved and is now known as MOLIPAR. The main advantage of the
program is to allow to input geometric data of lines using a graphic interface. However,
MOLIPAR still allows to input data from TRANS2 readable files.This type of file is
known as Inpurdue.
Hypersim calls a modified version of MOLIPAR to calculate the R, L and C matrices
of the lines. Then, the functions of the CLAPACK users guide, third edition, SIAM,
1999, library are used to transform the R, L and C phase parameters into mode parameters and Ti transformation matrix used by Hypersim.
When the user clicks on the control panel file button, Hypersim executes the calculations using the data contained in the file (Figures 7 - 3) displayed in the line control panel. The data will then be transferred in the control panel.
Calculation of parameters using an EMTP type input file.
Hypersim can also use an EMTP input file (Figures 7 - 2) to execute calculations. In
fact, the data are extracted from the EMTP file and the parameters calculated using the
same routine as for an Inpurdue file. The parameters thus calculated are not identical to
those calculated by EMTP with the same input file. However, the electrical behaviours
in both cases are nearly identical.
2-7-272
C Transposed ligne
BEGIN NEW DATA CASE
LINE CONSTANTS
C 345678901234567890123456789012345678901234567890123456789012345678901234567890
C Module
Model---->Matrix--->Scale----><-----Fmin<----NPdec<-----Ndec
ligne-MODEL
CP-ligne QREAL
METRIC
2
C Conductor cards
CI
I
V
CP
RX
R
H
T
S A
N
Ch S
eT
e
D
o
o
V
e l NB
C a<---k<------s<y<------a<------i<------r<------w<------M<------p<----p<----a<u
10.375 0.0450 4
3.556 -12.80
20.73
20.73
45.72 45.0
4
20.375 0.0450 4
3.556
0.00
20.73
20.73
45.72 45.0
4
30.375 0.0450 4
3.556
12.80
20.73
20.73
45.72 45.0
4
00.500 3.6050 4
1.111
-8.99
32.92
32.92
00.500 3.6050 4
1.111
8.99
32.92
32.92
BLANK card terminates conductor cards
C 345678901234567890123456789012345678901234567890123456789012345678901234567890
C RHO ><FREQUENC>< FCAR > <ICPR> <IZPR> I<DISTKM> <IZ>IM<I><I><I><>
100.
60.
11 11
200.0
1
C TRANSP><-nspan--><-span11-><-span12-><-span13-><-span14-><-span15-><-span16->
.TRANSP 3
66.666666 66.666666 66.666666
123
312
231
BLANK card terminates frequency card
BLANK
BLANK
FREQPR
The following icons and diagrams are used to represent lines with or without fault.
Properties:
Frequency Constant Distributed Parameters Lines.
Main features:
A transposed or untransposed, frequency constant distributed
parameters lines is represented by
Its sequences or;
B Parameter
Description
2-7-274
Distance of fault (side 1): Distance of fault from side 1 (see Figure
7 - 5);
Rdef= (Ra, Rb, Rc, Rg): Fault resistance for phase breakers and ground breaker.
4 Fault Breaker Parameters.
The fault breakers are shown in Figure 7 - 5; Table 72shows the types of faults according to
the state of the breakers.
Open state resistances
Phase A, B, C and ground: Resistances of phase and ground breakers in open state.
Closed state resistances
Phase A, B, and ground: Resistances of phase and ground breakers in closed state.
Steady state (Grey = Open, Coloured = Closed)
Phase A, B, C and ground: State of phase and ground breakers in steady state.
Programming of operations (from steady state) (Enable/Disable)
Phase A, B, C and ground: Enable activates this change.
T1 Operation time
Phase A, B, C and ground: Time when the state of the breakers is changed from the
steady state.
T2 Operation time
Phase A, B, C and ground: Time when the state of the breakers changed from the
T1, T3 and T4 operation state.
Note : For a phase to ground fault, we strongly recommend to use the ground in steady
state instead of programming a time of operation in transient state.
P or C
Specifies if the switching of the breaker three phases is controlled by a command
(C) or related to the individual switching timings of each phase (P).
2-7-275
RbDef
VaDef
VbDef
IaDef
RcDef
VcDef
IbDef
Ropen/close
IcDef
Ropen/close
InDef
RDef
Ropen/close
Ground
Ropen/close
Distance of fault
2-7-276
Ground
No fault
C List of Available
Signals
D Line Signals
E Fault Signals
F Transmission
Lines Control
Panels
This section shows how to enter data in the control panels of Frequency Constant Parameters
Three Phase Transmission Lines. The example shows an untransposed line without fault.
G Line Data
H Load File
An EMTP file that contains the physical parameters of the lines (Fig 7 - 2 and 7 - 3) or the
resolve matrix by the external software of EMTP can be loaded automatically in the parameter form.Calculation of Electrical Parameters and Corresponding Control Panel
2-7-277
The calculation of electrical parameters of frequency constant parameter lines with their geometric parameters is done by using Hyperline Line Data module in Hyperview. Figure 7 - 9
shows the relevant part of the Hyperline geometrical parameters.
Load a file into the Line Data GUI or enter your geometrical line parameters.
Select the transpositions options.
Run the program.
The electrical parameters are displayed in the Line Data report.
J Transfert
Electrical
Parameters to
Hypersim Lines
2-7-278
Example:
-8.99m
8.99m
-12.80m
phase A
12.80m
phase B
phase C
32,92m
20,73m
= 100-m
Figure 7 - 6 Layout of Conductors for a 735 kV Line
45,72cm
3,556 cm
45
2-7-279
Sag
Ytower Y m ea n
Figure 7 - 9 Hyperline Line Data geometrical parameters of a constant parameter line shown in figures
7 - 6 to 7 - 8
2-7-280
LINE PARAMETERS:
Resistance matrix (ohm/km):
107.0972E-03 97.288142E-03 94.985601E-03
97.288142E-03 110.49444E-03 97.288142E-03
94.985601E-03 97.288142E-03 107.0972E-03
Inductance matrix (H/km):
1.5767213E-03 751.60911E-06
751.60911E-06 1.5708151E-03
616.27982E-06 751.60911E-06
616.27982E-06
751.60911E-06
1.5767213E-03
Figure 7 - 10 Hyperline electrical parameters for an untransposed line with the geometric data shown
in figure 7 - 6 to 7 - 8
2-7-281
Transmission
Lines with
Fault
2-7-282
A control panel is provided for transmission lines with fault. The calculation of the parameters is identical to lines without fault. The difference is that the control panel for lines includes
the fault parameters. Figures 7 - 12 to 7 - 13 show the control panel of a line with fault and
the geometric data shown in Figures 7 - 6 to 7 - 8.
2-7-283
2-7-284
Coupled Lines
A Coupled Lines
Icons and
Diagrams
The model for coupled lines is used to simulate a double-circuit line or two lines with the
same right of way.
In the model palette, two icons and two diagrams used to represent coupled lines.
1.1
1.2
2.1
2.2
C
Figure 7 - 14 Coupled Line Icon and Diagram
B Parameter
Description
The parameters for coupled transmission lines are the same as for uncoupled lines. The only
difference is that the modal transformation matrix of coupled transmission lines is a 6x6 matrix because each bundle of conductors is considered as a separate phase.
C List of Available
Signals
D Line Signals
V(a, b, c)_line label_bus label: Voltage of each phase on bus label bus (volt);
I(a, b, c,n)_line label_bus label: Currents of each phase and ground on bus label bus
(ampere). When 2 are connected to the same bus, the inductors of phase d, e and f are
used to differentiate the signals. Also, the n1 and n2 neutral indicators will appear.
P_line label_bus label: Active power on bus label bus (watt)
Q_line label_bus label: Reactive power on bus label bus (var)
E Coupled Lines
Control Panels
This section shows how to enter data in the control panels of Coupled Lines.
F Line Data
G Load File
An EMTP file that contains the physical parameters of the lines (Fig 7 - 2 and 7 - 3) or the
resolve matrix by the external software of EMTP can be loaded automatically in the parameter form.Calculation of Electrical Parameters and Corresponding Control Panel
H Calculation of
Electrical
Parameters
The calculation of electrical parameters of frequency constant parameter lines with their geometric parameters is done by using Hyperline Line Data module in Hyperview. Figure 7 - 9
shows the relevant part of the Hyperline geometrical parameters.
Load a file into the Line Data GUI or enter your geometrical line parameters.
Select the transpositions options.
Run the program.
2-7-285
2-7-286
Example:
-11,60m
-8,5m
A
58,2m
46,4m
35,2m
24m
= 100-m
Figure 7 - 15 Geometric Layout of Two Coupled Lines
2-7-287
50.0cm
30o
= 3.129cm
Figure 7 - 16 Details of a Conductor Bundle for Lines in Figure 7 - 15
Sag
Ytower Y m ea n
2-7-288
COMMENTS:
Example of a 500-kV three-phase, double-cicruit line
6 bundles of 3 ACSR 1355 MCM conductors, 2 steel ground wire
LINE GEOMETRY:
Frequency (Hz): 60.0
Ground resistivity (ohmm): 100.0
Number of phase conductors (bundles): 6
Number of ground wires (bundles): 2
-----------------------------------------------------------------------Conductor
Phase
X
Y Tower
Y Min
Conductor
(bundle)
Number
(meters)
(meters)
(meters)
Type
-----------------------------------------------------------------------p1
1
-8.50000
46.40000
34.60000
1
p2
2
-14.40000
35.20000
23.40000
1
p3
3
-8.50000
24.00000
12.20000
1
p4
6
8.50000
46.40000
34.60000
1
p5
5
14.40000
35.20000
23.40000
1
p6
4
8.50000
24.00000
12.20000
1
g1
0
-11.60000
58.20000
46.40000
2
g2
0
11.60000
58.20000
46.40000
2
-----------------------------------------------------------------------CONDUCTOR AND BUNDLE CHARACTERISTICS:
Number of conductor types or bundle types: 2
Transposition Options: Untransposed
Conductor internal inductance evaluated from: Geometric Mean Radius (GMR)
Include conductor skin effect: true
-----------------------------------------------------------------------------------------------------------Conductor
Outside
DC
Relative
Conductors
Bundle
Angle
Type
Diameter
T/D Ratio
GMR
Resistance Permeability Per Bundle
Diameter Conductor 1
(cm)
(cm)
(Ohms/km)
(cm)
(degrees)
-----------------------------------------------------------------------------------------------------------1
3.12930
0.37500 1.25600000 0.05208000
1.00000
3
57.73500
30.00
2
0.95250
0.50000 0.37090000 4.10200000
1.00000
1
0.00000
0.00
------------------------------------------------------------------------------------------------------------
Figure 7 - 18 Hyperline Line Data geometrical parameters of a double circuit lines hown in figures 7 15 to 7 - 17
2-7-289
LINE PARAMETERS:
Resistance matrix (ohm/km):
107.06173E-03 84.639908E-03
84.639908E-03 98.801628E-03
82.566286E-03 79.254713E-03
82.414725E-03 79.124767E-03
84.244289E-03 80.599614E-03
88.571231E-03 84.244289E-03
82.566286E-03
79.254713E-03
95.785116E-03
77.821153E-03
79.124767E-03
82.414725E-03
82.414725E-03
79.124767E-03
77.821153E-03
95.785116E-03
79.254713E-03
82.566286E-03
84.244289E-03
80.599614E-03
79.124767E-03
79.254713E-03
98.801628E-03
84.639908E-03
88.571231E-03
84.244289E-03
82.414725E-03
82.566286E-03
84.639908E-03
107.06173E-03
731.00435E-06
654.02613E-06
635.23225E-06
680.66615E-06
793.83125E-06
1.6815945E-03
-637.94412E-12
-425.08373E-12
-492.02897E-12
-1.8810997E-09
10.885838E-09
-2.1084603E-09
-1.4877263E-09
-637.94412E-12
-445.46558E-12
-725.71953E-12
-2.1084603E-09
10.785129E-09
264.85676E-03
3.2022004E-03
7.8555058E-09
18.395855E-03 (ohm/km)
929.59574E-06 (H/km)
12.570785E-09 (F/km)
Line 2
[R0 R1] =
[L0 L1] =
[C0 C1] =
264.85676E-03
3.2022004E-03
7.8555058E-09
18.395855E-03 (ohm/km)
929.59574E-06 (H/km)
12.570785E-09 (F/km)
Figure 7 - 19 Hyperline Electrical Parameters of a untransposed Double Circuit Line with the Geometric
Data Shown in Figures 7 - 15 to 7 - 17
2-7-290
Figure 7 - 20 Control Panel of an unTransposed Double Circuit Line with the Geometric
Data Shown in Figures 7 - 15 to 7 - 17
Note : In the control panel, the modes are not presented in the same order as that of an
EMTP input file. For Hypersim, this order is 2G, 2IL, 2L, 2L, 2L, 2L.
7.2.3
Triples and
Quadruple
Lines
The triple line model is used to simulate a triple circuit or three lines in the same path. The
same reasoning applies to a quadruple line. These two models are a general case of the coupled line model.
A Icons and
Diagrams
2-7-291
C3
1.1
1.2
2.1
2.2
3.1
3.2
1.1
1.2
2.1
2.2
3.1
3.2
4.1
4.2
C4
B Signal
description
2-7-292
The parameters for coupled transmission lines are the same as for uncoupled lines. The only
difference is that the modal transformation matrix is 9x9 for triple lines and 12x12 for quadruple lines. This can be explained by the fact that each conductor bundle can be considered
as a separate phase.
V(a, b, c)_line label_bus label: Voltage of each phase on bus label bus (volts);
I(a, b, c,n)_line label_bus label: Currents of each phase and ground on bus label bus
(amperes). When the circuits are connected to the same bus, the inductors of phase d, e,
f, g, h, i, j, k, and l are used to differentiate the signals. Also, the n1, n2, n3 and n4 neutral indicators will appear.
2-7-293
Composed
Models:
Coupled Lines
With Fault
and Quadruple
Lines With
Fault
A Introduction
The user may sometimes need to simulate a fault applied at any place on a transmission line.
The user can then insert a fictitious bus at the desired place and simulate the line in two distinct segments. However, if the user needs to simulate many faults on a multiple line, this procedure becomes tedious and the network diagram is cluttered. Composed models were
developed to circumvent this.
B Description of
Composed
Models
Composed models are models made up of many sub-models already available in the element
palette. The parameters of the composed model are available in a unique control panel. They
are then transferred by Hypersim to the different elements making up the model.
2-7-294
1.1
1.2
2.1
2.2
1.1
1.2
2.1
2.2
3.1
3.2
4.1
4.2
C4
The parameters of composed models are the same as those of the different elements which
make them up. In the present case, this includes all the line parameters and the fault element
parameters. However, the number of operations allowed in this case is four (4) per fault element, instead of ten (10) in normal cases.
Some parameters have been added. In order to specify to Hypersim which line configuration
he requires, the user must choose it in the parameter control panel.
In the case of a coupled line with fault. six configurations are available to the user:
1 line section - no fault
2 line sections - fault on line 1
2 line sections - fault on line 2
2 line sections - faults on lines 1 and 2
2-7-295
2-7-296
2-7-297
For both models, only the signals concerning the faults are available. For the coupled line
with fault, these are the following:
I(a, b, c, n)_Flt1\line label: Currents in line 1 fault (ampere);
V(a, b, c)_Flt1\line label: Voltages on the fault bus of line 1(volt);
I(a, b, c, n)_Flt2\line label: Currents in the line 2 fault (ampere);
V(a, b, c)_Flt2\line label: Voltages on the fault bus of line 2 (volt);
For the quadruple line with fault, the following signals are available:
I(a, b, c, n)_fault label\line label: Current in the given fault element (ampere)
V(a, b, c)_bus fault label\line label: Voltages on the given bus fault (volt)
In all the cases, the number of signals available is related to the number of faults asked by the
user. Hence, if no fault is specified (case with 1section), no signal will be available.
As for the other signals usually available in each of the sub-elements making up the combined
model, the user can see them when he displays the combined model content.
2-7-298
2-7-299
PI Lines and PI
Lines with
Fault
A Introduction
The PI line model is mainly used for short transmission lines. See equivalent diagram on Figure 7 - 29.
XL
XC
R
XC
PI
Figure 7 - 30 PI Line Icon and Diagram
PI
Figure 7 - 31 PI Line with Fault Icon and Diagram
1.IOn order to simplify the text, the PI line sections are called PI lines in this Chapter.
2-7-300
PI Line Sections
C Parameter
Description
D General
Parameters
E EMTP Geometric
parameters
F RLC Parameters
G Fault Parameters
The fault parameters are exactly the same as those for constant parameters lines. For more
details, see 3 on page 275.
H List of Available
Signals
I Line Signals
J Fault Signals
2-7-301
K PI Lines Control
Panels
2-7-302
PI Line Sections
M Load File
An EMTP file that contains the physical parameters of the lines (Fig 7 - 2 and 7 - 3) or the
resolve matrix by the external software of EMTP can be loaded automatically in the parameter form.Calculation of Electrical Parameters and Corresponding Control Panel
N Calculation of
Electrical
Parameters
The calculation of electrical parameters of frequency constant parameter lines with their geometric parameters is done by using Hyperline Line Data module in Hyperview. Figure 7 - 9
shows the relevant part of the Hyperline geometrical parameters.
Load a file into the Line Data GUI or enter your geometrical line parameters.
Select the transpositions options.
2-7-303
7.3.2
Coupled PI
Lines and
Coupled PI
Lines with
Fault
As for the PI line model, the coupled PI line model is mainly used for short transmission lines.
A Coupled PI Line
Icon and
Diagram
1.1
1.2
2.1
2.2
PI C
Figure 7 - 34 Coupled PI Line Icon and Diagram
1.1
1.2
2.1
2.2
PI C
2-7-304
PI Line Sections
B Parameter
Description
The parameters for Coupled PI lines are the same as for those for simple PI lines, except that
the dimension of the R, L and C matrices representing the impedances and admittances of the
conductors is 6x6, instead of 3x3. The reason is that this model represents a line with six conductors.
There is a new parameter for sequences. As for the simple PI model, the positive sequence
and zero sequence parameters for each circuit are present. Moreover, the neutral coupling between both circuits must be represented. This is referred to as mutual impedance and is represented only in zero sequence. The user must remember that if he uses the parameter input
by sequences, the simulation will only be an approximation of the reality, the coupling between the phases of both circuits not being represented.
C List of Available
Signals
D Fault Signals
No line signal is available for coupled PI lines. The reason is that the calculations required to
obtain the signals would slow down considerably the time required to simulate the model.
Hence, only the fault signals are available.
2-7-305
E Coupled PI Lines
and Coupled PI
Lines with Fault
Control Panels
2-7-306
PI Line Sections
The geometric data of a coupled PI line are the exactly the same as those for a constant parameters coupled line. Figures 7 - 15 7 - 16 show the geometric parameters required to calculate the electrical parameters.
7.3.3
The models of triple and quadruple PI lines are a generalization of the coupled PI line model.
They represent respectively 3 and 4 three phase circuits. The quadruple model with fault is
also available.
Triple and
Quadruple PI
Lines
A Triple and
Quadruple PI
Lines Icons and
Diagrams
PI 3
1.1
1.2
2.1
2.2
3.1
3.2
2-7-307
1.1
1.2
2.1
2.2
3.1
3.2
4.1
4.2
PI 4
1.1
1.2
2.1
2.2
3.1
3.2
4.1
4.2
PI 4
2-7-308
The parameters for triple and quadruple PI lines are the same as for those for simple PI lines,
except that the dimensions of the R, L and C matrices representing the impedances and admittances of the conductors are 9x9 and 12x12. Since these matrices are large, the option allowing to calculate the values of the parameters from EMTP or Inpurdue files is quite
interesting. It allows to avoid the tedious task of re-transcribing the values and possible resulting errors.
PI Line Sections
C List of Available
Signals
D Fault Signals
As for a coupled PI line, there is no line signal available for triple and quadruple PI lines. Only
the fault signals are available.
V(a, b, c)_FLT1_line label: Voltage on fault bus of line 1 (volt);
V(a, b, c)_FLT2_line label: Voltage on fault bus of line 2 (volt);
V(a, b, c)_FLT3_line label: Voltage on fault bus of line 3 (volt);
V(a, b, c)_FLT4_line label: Voltage on fault bus of line 4 (volt);
I(a, b, c, n)_FLT1_line label: Fault current of line 1 (ampere);
I(a, b, c, n)_FLT2_line label: Fault current of line 2 (ampere);
I(a, b, c, n)_FLT3_line label: Fault current of line 3 (ampere);
I(a, b, c, n)_FLT4_line label: Fault current of line 4 (ampere);
CMD(a, b, c, n)_FLT1_line label: Command for states of phase and ground breakers of
line 1.
CMD(a, b, c, n)_FLT2_line label: Command for states of phase and ground breakers of
line 2.
CMD(a, b, c, n)_FLT3_line label: Command for states of phase and ground breakers of
line 3.
CMD(a, b, c, n)_FLT4_line label: Command for states of phase and ground breakers of
line 4.
2-7-309
E Control Panels
for PI Lines Triple,
Quadruple and
Quadruple with
Fault
2-7-310
PI Line Sections
2-7-311
2-7-312
Since these models are a generalization of the coupled PI line, the data are calculated in the
same way. See section F on page 307 for more details.
Marti Lines
Is
Vs
Ir
Zeq
+
bs
Zeq
+
br
Vr
The following icons and diagrams are used to represent respectively the Marti model of a 2phase, 3-phase and 4-phase lines and the Marti model of a 4-phase line.
M2
Figure 7 - 45 Icon and diagram of a 2-phase Marti model
M3
Figure 7 - 46 Icon and diagram of a 3-phase Marti model
2-7-313
M4
Figure 7 - 47 Icon and diagram of a 4-phase Marti model
B Parameter
description
1 General parameters.
Source of parameters (control panel, EMTP file): Specifies the source of the parameters;
EMTP file: The name of the EMTP file containing the line parameters;
R0: Modal resistances for infinite frequency;
T0: Delay for modal propagation;
nZ: Number of poles for impedance functions and maximum number of poles;
nA: Number of poles for propagation functions and maximum number of poles;
Ti: Transformation matrix;
KZ: Residues of impedance function;
PZ: Pole of modal impedance function;
KA: Residues of modal propagation function;
PA: Pole of modal propagation function.
C List of available
signals
At acquisition, the signals made available by the sensors are the following:
V_bus label: Bus voltage (volt);
I (1, 2, 3)_bus label_(a, b, c): Current for each phase (ampere);
Bhist_line label_bus label: Voltage of the equivalent source (volt).
D The parameter
control panel of
the 2-phase Marti
model
This section presents the data for Marti Lines and shows how to fill in the parameter control
panels.
2-7-314
Marti Lines
R = 94.0 mm
Insulation
R = 89.25 mm
R = 73.60 mm
R = 66.0 mm
Shielding
Sheath
R = 60.0 mm
R = 37.5 mm
R = 12.5 mm
Core
40 m
0
150 m
300 m
450 m
The calculation of the electrical parameters of a cable line from its geometrical parameters is
done by the CABLE CONSTANTS auxiliary module of EMTP. Figure 7 - 50 shows the
EMTP input file for the calculation of parameters of a cable line with geometrical parameters
in Figures 7 - 48 and 7 - 49.
2-7-315
Figure 7 - 50 The EMTP input file for the transmission line in Figure 7 - 48
The resulting EMTP output file (*.pun) contains the electrical cable parameters required by
Hypersim. The user can fill in manually the parameter form using the data from this file.
However, it is much more convenient to provide the parameters of a Marti line by specifying
where this file is located. The data form used for a 2-phase Marti model is shown in Figures
7 - 51 and 7 - 52.
2-7-316
Marti Lines
2-7-317
2-7-318
Marti Lines
The figures 7 - 54, 7 - 55 and 7 - 56 show the geometrical data of a D.C. line to simulated by
a 4-phase Marti model.
2-7-319
-10.20 m
Neutral
10.20 m
N1
N2
Pole 1
Pole 2
58.0 m
45.00 m
= 300-m
Figure 7 - 54 Arrangement of the conductors for a D.C. line to be
modelled by a 4-phase Marti model
50 cm
3,84 cm
45
2-7-320
Marti Lines
Sag
Ytower Y m ea n
The calculation of the electrical parameters of a line from its geometrical parameters can be
done with the LINE CONSTANTS auxiliary module of EMTP. The EMTP input file for calculation of parameter of the Marti model of the line with geometric data in Figures 7 - 54 to
7 - 56 is shown in Figure 7 - 57.
Figure 7 - 57 The EMTP input file for calculation of the Marti model of
the line in Figures 7 - 54 to 7 - 56
The resulting EMTP output file (*.pun) contains the electrical line parameters required by
Hypersim. The .pun file corresponding to the data in Figure 7 - 57 is shown in Figures 7 58 and 7 - 59.
2-7-321
C
C LINE-MODEL
FD-LINE QREAL LOG
0.0001 20
8
C METRIC
C 10.375 0.0353 4
3.84 10.2 45.0 25.73 50.0 45.0
4
C 20.333 0.0458 4
3.42 10.2 58.0 39.22 50.0
2
C 30.333 0.0458 4
3.42 -10.2 58.0 39.22 50.0
2
C 40.375 0.0353 4
3.84 -10.2 45.0 25.73 50.0 45.0
4
C LINE LENGTH = 5.0900E+01 KM
C TRANSFORMATION MATRIX AT F = 1.0000E-01 HZ
-1BUSP1KBUSP1M
1.
-2 4
R0
6
6.437860366261666e+02
1.214563368916744e+05 8.994441071796258e+03 9.878533416150984e+02
5.218688145700812e+02 2.430827370035715e+02 7.811462924772060e+00
1.573655176109663e+03 1.326129090933324e+02 1.033929558222937e+01
4.720148714239056e-01 5.986097456300203e-02 1.579806414525393e-02
T0
nA 36 1.80603943883336581040E-04
4.662533059105316032D-11 6.821937376811354945D-11 2.036425921631951910D-10
5.782581397886991044D-10 1.687971007582514476D-09 4.983484329520763705D-09
1.440602361633273348D-08 4.492392323440471920D-08 1.390729687723402390D-07
4.708724021562232745D-07 1.092178475607250470D-06 8.919761717110231665D-06
8.686525464437772686D-06 2.771537571914321074D-05 4.018241196287703572D-05
1.636814650944065305D-04 2.892839786758156693D-04 1.004748201698990161D-03
3.573004008256362458D-03 1.250239166968926396D-02 1.088917224526830541D-01
2.124338189429190171D-01 1.924036334921463531D+00 5.028884404205944847D+00
2.270839272506772488D+01 1.005120632103304530D+02 1.728685079097975006D+02
3.260014906770318817D+02 9.230572847123396514D+02 1.039769622449470944D+03
1.104436574501146879D+03 2.317426161133841561D+03 4.642998362234140586D+03
3.169056986486492860D+03 2.328272207020388669D+04 -3.911681296616907730D+03
2.223404209406260133D-03 3.158973565128211838D-03 4.620224846946283971D-03
6.553228186189036762D-03 9.359945697033484474D-03 1.367597714546365216D-02
1.967682124234779867D-02 2.984507701838491969D-02 4.679117422496081174D-02
7.842264240354916705D-02 9.052468308324533586D-02 1.855867115050435778D-01
3.615974033037598345D-01 5.763849865435555220D-01 8.356366705416022889D-01
3.421543779670204177D+00 6.041710511465915090D+00 1.039910214779839137D+01
1.858317266760856157D+01 6.389692526674280515D+01 1.331847429808593120D+02
1.379898712321664505D+02 5.845725360525605083D+02 7.777991820967040439D+02
1.685455106787059549D+03 3.509811211668321448D+03 5.820471132514062447D+03
9.183896296573060681D+03 1.248690908732375465D+04 1.580547218124728533D+04
1.951304167973025324D+04 2.671587666179315056D+04 3.268633661035108526D+04
4.007253813554433145D+04 6.087350060935598594D+04 5.646628840528698638D+05
nZ
MODE1
MODE2
-2BUSN1KBUSN1M
1.
-2 4
5
2.731482551204742e+02
-9.617788099334194e-01 6.308605919641434e+02 4.331193406334487e+02
1.724221434755087e+02 8.328710114501270e+01
7.559048915655471e+01 4.372324142004216e+00 6.989164008294293e-01
9.952942517690895e-02 2.165210789595314e-02
30
1.68507017024313034918E-04
2.976288939736678219D-10 4.166278000269748347D-10 1.270207088772429399D-09
3.625107712087353094D-09 1.084682154673342536D-08 3.225016998561776654D-08
...
3.141638984294353122D+03 8.032413459861278170D+03 9.454125255094317254D+03
3.057435910389564015D+04 2.660536798970897798D+05 4.383186793487734976D+05
2-7-322
Kz
Pz
KA
PA
Marti Lines
-3BUSN2KBUSN2M
1.
-2 4
6
3.050308162611487e+02
3.348479781276822e+03 -8.095005363236048e+02 2.165881690405804e+03
1.021488796061139e+03 3.300304498698357e+02 7.434504231273161e+01
1.215446694638670e+03 1.531321007648782e+02 9.956339486126524e+00
8.199131063720786e-01 7.613337629023763e-02 1.725658009724277e-02
29 1.68268284460645992659E-04
2.940908085311805092D-10 4.241857409919830185D-10 1.223717587528708384D-09
3.622523167819298245D-09 1.040767747621782059D-08 3.212008378378164443D-08
...
2.399997252062681582D+03 2.484756152845921406D+03 2.839204597131427818D+03
1.029824746473909363D+04 1.315159405848341703D+04 3.675498740932818328D+04
3.830146072292901954D+04 5.352312728653086815D+05
-4BUSP2KBUSP2M
1.
-2 4
6
3.148580196898951e+02
1.009782611454571e+04 9.700705592854584e+02 1.785164564229039e+03
8.121117397051178e+02 2.481248068072373e+02 4.560548074649877e+01
1.909990749687859e+03 2.720098953443171e+02 7.710005439073262e+00
5.659886003231129e-01 5.428203874133661e-02 1.839846721795406e-02
34 1.67201687672315210328E-04
2.822129163856696038D-10 3.950236865850007068D-10 1.157316865913351826D-09
3.364203251730297467D-09 1.019612468842755876D-08 2.882580002984790444D-08
...
3.982991262883984018D+04 4.737342066570757015D+04 2.624315996852944372D+05
6.068675499114637496D+05
C Q MATRIX BY ROWS (IMAGINARY PART = 0)
0.68441637 -0.70411243 -0.16484151 0.39686270
0.00000000 0.00000000 0.00000000 0.00000000
0.17651442 -0.06497253 0.68760390 -0.58521579
0.00000000 0.00000000 0.00000000 0.00000000
0.17651443 0.06497253 -0.68760391 -0.58521578
0.00000000 0.00000000 0.00000000 0.00000000
0.68441638 0.70411242 0.16484153 0.39686270
0.00000000 0.00000000 0.00000000 0.00000000
2-7-323
2-7-324
Marti Lines
2-7-325
2-7-326
Marti Lines
-8.99m
-12.80m
phase A
8.99m
ground bundles
12.80m
phase B
phase C
32.92m
20.73m
= 100-m
45,72cm
3,556 cm
45
The calculation of electrical parameters of the line from the geometrical parameters in Figures 7 - 63 and 7 - 64 is done by the LINE CONSTANTS auxiliary EMTP module. The EMTP
input file for parameter calculation is shown in Figure 7 - 65.
2-7-327
C
LINE CONSTANTS
C 345678901234567890123456789012345678901234567890123456789012345678901234567890
C
1
2
3
4
5
6
7
8
LINE-MODEL
FD-LINE QREAL LOG
0.1
20
5
METRIC
C ><SKN><RESIS ><><REACT >< DIAM >< HORIZ><VTOWER><VMID ><SEPAR ><ALPH><NAME><>
10.375 0.0450 4
3.556 -12.80 20.73 20.73 45.72 45.0
4
20.375 0.0450 4
3.556 0.00 20.73 20.73 45.72 45.0
4
30.375 0.0450 4
3.556 12.80 20.73 20.73 45.72 45.0
4
00.500 3.605 4
1.111 -8.99 32.92 32.92
00.500 3.605 4
1.111 8.99 32.92 32.92
BLANK card terminates conductor cards
C FREQUENCY CARD
C 345678901234567890123456789012345678901234567890123456789012345678901234567890
C
1
2
3
4
5
6
7
8
C RHO ><FREQUENC>< FCAR > <ICPR> <IZPR> I<DISTKM> <IZ>IM<I><I><I><>
100.
60.
200.0
1
.NODES
BUSP1K BUSP1M BUSN1K BUSN1M BUSN2K BUSN2M
BUSP2K BUSP2M
.FIT-S
36
BLANK ENDING FREQUENCY CARDS
BLANK
BLANK
Figure 7 - 65 The EMTP input file for calculation of the Marti model
of the line in Figures 7 - 63 and 7 - 64
The resulting EMTP output file (*.pun) contains the electrical line parameters required by
Hypersim. The .pun file corresponding to the data in Figure 7 - 65 is shown in Figure 7 - 66.
2-7-328
Marti Lines
C LINE-MODEL
FD-LINE QREAL LOG
0.1
20
5
C METRIC
C 10.375 0.0450 4
3.556 -12.80 20.73 20.73 45.72 45.0
4
C 20.375 0.0450 4
3.556 0.00 20.73 20.73 45.72 45.0
4
C 30.375 0.0450 4
3.556 12.80 20.73 20.73 45.72 45.0
4
C 00.500 3.605 4
1.111 -8.99 32.92 32.92
C 00.500 3.605 4
1.111 8.99 32.92 32.92
C LINE LENGTH = 2.0000E+02 KM
C TRANSFORMATION MATRIX AT F = 6.0000E+01 HZ
C
-1WED7_aESD7_a
1.
-2 3
16
4.34653586960114296289E+02
1.851419703226241325D+02 2.590514312325236460D+03 -3.127957343905229209D+03
...
4.483556445570410142D+04 6.308395833257218328D+04 1.153384636619750963D+05
5.251121673719295068D+05
...
1.171430098321246533D+03 1.991595784569215539D+03 6.894394054349084399D+03
3.159058128914844201D+04
21
7.06384946825246249485E-04
1.904258889256747349D-05 3.524754126773281711D-04 3.625569758395469073D-04
...
4.910483664067133213D+04 5.673099278531855816D+04 5.678719061525723373D+04
-2WED7_bESD7_b
1.
-2 3
15
2.29021065423786012616E+02
1.631088231880090405D+02 5.113431558652671924D+02 1.446861730977163461D+04
...
3.214491323468353556D+01 5.052372264795839385D+01 3.620791801335191394D+03
18
6.65071879890839485865E-04
2.747596429699603377D-05 1.188730150254640149D-03 1.367079163808397179D-03
...
2.117885737552492355D+04 6.931031794019443623D+04 3.128498942513289512D+05
-3WED7_cESD7_c
1.
-2 3
11
2.76565769130997750835E+02
1.701832497454142583D+02 5.024925533556538539D+03 -5.873665913459929470D+03
...
2.961376653035809170D+01 4.023101487974561678D+03
20
6.70364152859894779982E-04
2.503675227104941751D-05 1.053032514606297865D-03 1.074039267770130878D-03
...
2.322205218597832572D+04 3.185514435311620400D+04 4.446687261054346163D+04
1.485183292621208820D+05 2.191337673961671826D+05
C Q MATRIX BY ROWS (IMAGINARY PART = 0)
0.59520424 -0.41318575 -0.70710678
0.00000000 0.00000000 0.00000000
0.53987156 0.81151353 -0.00000001
0.00000000 0.00000000 0.00000000
0.59520425 -0.41318573 0.70710679
0.00000000 0.00000000 0.00000000
2-7-329
2-7-330
Marti Lines
2-7-331
DC Cable
This model was designed to better represent a DC cable. In this model, the user only has access to the core of the cable, the shield is grounded through impedances.
2-7-332
Marti Lines
A Icon and
diagram of a DC
cable
CC
Figure 7 - 71 DC cable: Icon and Diagram
B Description of
parameters
1 General parameters.
D List of available
signals
This example uses the same cable data in Figure 7 - 48 and the calculation of parameters is
done in a similar way. Figures 7 - 72 and 7 - 73 show the data form used for DC cable.
2-7-333
2-7-334
Marti Lines
2-7-335
2-7-336
Marti Lines
2-7-337
2-7-338
Chapter 8
TRANSFORMERS
A General
Introduction
The three-phase transformer library contains models of linear, saturable and tap changer
transformers. These models are built using a combination of single-phase transformers with
two or three windings.
The connections available are the most common found. These are:
Delta connection which can prevent the flow of the zero-sequence current in the other
winding.
Zigzag connection in which the windings belonging to two phases are interconnected.
The saturation of the magnetic core can be represented if the user is interested in this aspect
of the study.
The tap changer characteristic is also available and is quite useful to setup power converters.
The hysteresis phenomena can be modelled with saturation1.
The main hysteresis cycle is characterized by four parameters. It is measured in DC so as not
to include the Foucault losses, which are taken into account by the parallel resistance (Rm).
The initial trajectory is characterized by only one parameter, the initial flux. Two other special parameters serve to minimize the generation of internal nested loops, and their corresponding trajectories, saved in memory (ex.: the loops that are too small will be ignored and
their trajectories modelized by a straight line segment). This is useful since their number must
be limited (100). Generally, the default sizes suffice in most cases simulated. Above this cycle (limited to Is), we enter into the saturation zone. The saturation is then characterized
either by a series of points on the curve or by an inductance the curve approaches asymptotically. In this last case, the model generates automatically segments (in the positive and negative saturation zone) of equal length (Is).
The characteristic Tap changer is also available and is very useful in setups with power converters.
1. The model then represents minor loops, internal to the main cycle, present in transient state.
The main rule dictating the generation of an internal loop is that the magnetization trajectory
depends on the last two inversion points (when the magnetization current changes sign) and each
curve tends to return to the second to last inversion point. To obtain a detailed description of the
model, consult the following reference: Silvano Casoria, Patrice Brunelle, Gilbert Sybille, Hysteresis Modeling in the Matlab/Power System Blockset, Mathematics and Computers in Simulation, Volume 63, Issues 3-5, Pages 237-248.
2-8-339
Transformers
The following icons and diagrams are used to represent the different three-phase transformers
available with Hypersim. The number of windings is specified directly on the diagram representing the selected transformer.
2-8-340
Transformers
Single phase representations of three-phase linear and saturable transformers, with three
windings, are shown in Figure 8 - 2and 8 - 3.
R1
L2
R2
L3
R3
L1
Rm
Lm
R1
L2
R2
L3
R3
L1
Rm
Lsat
D Magnetization
Impedance
Parameters
Rm: Equivalent resistance of iron losses of the magnetic circuit. Expressed in ohm;
Lm: Magnetization inductance in henry (for linear transformers only).
2-8-341
Transformers
Connections:
Y ground: Grounded Y connection;
Y floating: Floating Y connection;
Delta lead: Delta connection with lead of 30
Delta lag: Delta connection with lag of 30
Delta ground: Grounded delta connection;
Vnom.: Rated voltage of winding (kV rms);
R1, L1: Leakage resistance (ohm) and inductance (henry) of winding 1;
R2, L2: Leakage resistance (ohm) and inductance (henry) of winding 2;
R3, L3: Leakage resistance (ohm) and inductance (henry) of winding 3;
Note : To simplify the representation, the leakage inductances of the secondary windings
are used to highlight the decoupling element. This element is internal to the transformer model and the user cannot access it.
Znxx: Neutral impedance where the first x specifies the winding and the second x specifies the impedance number for a given winding (only applies to a Yg winding).
Note : Only applies to a zigzag transformer. In such a case, the primary and tertiary windings are connected to form a zigzag. The user specifies the phase shift with respect
to the reference winding. The only model in this category does not show any saturation.
Default, Lagging and Leading: Selection of the type of phase shift with respect to
the reference winding.
Vnom (zigzag)/winding: Rated voltage of the zigzag winding.
F Saturation
Parameters
The saturation is characteristic of the core, hence of the winding and not the type of threephase connection (Y, delta or zigzag). It is represented only for the magnetization branch
(schematically using line segments).
Number of points: Represents the number of segments of the current-flux saturation
curve. Only the positive part of the curve is specified; the negative part is completed by
symmetry;
Residual flux: Only used for inrush current phenomena;
Isat: The value of the current (in ampere) for each segment of the saturation curve. The
origin (0.0,0.0) is implied. The number of segments must be equal to the parameter
number of points;
Flux: The value of the flux (in volts-second) for each segment of the saturation curve.
The origin (0.0,0.0) is implied. The number of segments must be equal to the parameter
number of points.
2-8-342
Transformers
3
2
1
Isat
Hysteresis:
PHIr: Positive remanent flux (in volts-second) at null current;
Ic: Positive coercive current (in Amperes) at null flux;
Slope @ Ic: Flux slope (in Henry) at coercive current;
Initial flux: Initial flux (in volts-second) determining initial trajectory. The initial trajectory
is calculated by supposing that it has an inversion point on the main cycle;
Tolerance (Flux): Special parameter limiting the generation of minor nested loops. When the
fluxes at the last inversion point and the preceding inversion point are closer than the specified tolerance (in PHIs%, it is assumed that there is displacement on the current loop).
Tolerance (Current): Special parameter limiting the generation of minor nested loops. When
the magnetizing current at the last inversion point and the preceding inversion point are closer
than the specified tolerance (in Ic%), it is assumed that there is displacement on a trajectory
represented by a straight line segment.
Saturation:
Saturation Type: Determines if the parameters are calculated by the model or defined by a
series of segments.
Is: Current value (in Amperes) of the first point in the saturation zone;
PhIs: Flux value (in volts-second) of the first point in the saturation zone;
Ls: Value of saturation inductance (in Henrys) which the curve approaches asymptotically;
Number of points: Represents the number of segments in the current-flux saturation zone.
Only the positive part of the curve is specified; the negative part is completed by symmetry;
2-8-343
Transformers
The following signals are made available after an acquisition for analysis or processing.
These signals vary from one transformer to another.
IMAGa,b,c_Trllabel: Magnetization current for each phase of a saturable transformer;
ILMAGa,b,c_Trlabel: Magnetization current for each phase of a linear transformer;
SEGa,b,c_Trlabel: Segment number of the saturation curve. -The numbering is positive
starting at 1 for the last segment in the negative saturation zone.
-In the hystereris model, the numbering is positive/negative starting at 1/-1 in the positive/negative saturation zone. In the hysteresis zone, it takes a null value.
Traject: Number identifying the trajectory of the operating point in the hysteresis
model. The trajectories making up the main cycle take the value of 1. The initial trajectory for which it is assumed that it has an inversion point on the main cycle takes the
value of 2 and so on. The number increases when the trajectories form nested loops;
and decreases when the loop is not nested. The upper limit accepted by the model is
100. Above this number, the simulation results are erroneous;
FLUXa,b,c_Trlabel: Magnetization flux for each phase for a saturable transformer
(volt-second);
IPRIMa,b,c_Trlabel: Current in the primary for each phase (ampere)
I Control Panels
of Three-Phase
Transformers
2-8-344
Figures 8 - 5 and 8 - 6 show respectively the control panels allowing the user to enter the parameters for a three-phase linear transformer with two windings.
Transformers
2-8-345
Transformers
2-8-346
Transformers
2-8-347
Transformers
2-8-348
Transformers
2-8-349
Transformers
2-8-350
Transformers
2-8-351
Transformers
These transformers are mainly used to simulate single-phase networks or circuits. They can
be linear or saturable. Their characteristics are identical to those of three-phase transformers.
B Icons and
Diagrams of
Single-Phase
Transformers
The following icons and diagrams are used to represent the different single-phase transformers available with Hypersim. The number of windings is specified directly on the diagram
representing the selected transformer.
2-8-352
Transformers
2
TrP9
4
2
TrV8
1
3
2
Tr9Z
4 5
D Magnetization
Impedance
Parameters
Rm: Equivalent resistance of iron losses of the magnetic circuit. Expressed in ohm;
E Winding
Parameters
F Saturation
Parameters
Note : The saturation is characteristic of the core, hence of the winding. It is represented
(schematically with line segments) only for the magnetization branch.
Number of points: Represents the number of segments of the current-flux saturation
curve. Only the positive part of the curve is specified; the negative part is completed by
symmetry;
2-8-353
Transformers
3
2
1
Isat
Parameters are identical to the saturable three-phase transformers. (see Section 8.1).
H List of Available
Signals
The following signals are made available after an acquisition for analysis or processing.
These signals vary from one transformer to another.
IMAG_Trllabel: Magnetization current for a saturable transformer (ampere);
ILMAG_Trlabel: Magnetization current for a linear transformer (ampere);
SEG_TRlabel: Segment number of the saturation curve.
- The numbering is positive starting from 1 for the last segment in the negative saturation curve.
- With the hysteresis model, is positive/negative starting from 1/-1 in the positive/negative saturation zone. In the hysteresis zone the value in nil.
Traject: Number identifying the trajectory of the operating point in the hysteresis model
(see three-phase transformer for more details).
FLUX_Trlabel: Magnetization flux for a saturable transformer (volts-second);
IPRIMa,b,c_Trlablelabel: Current on primary (A) in the linear transformer.
2-8-354
Transformers
2-8-355
Transformers
2-8-356
Transformers
2-8-357
Transformers
2-8-358
Transformers
2-8-359
Transformers
2-8-360
Transformers
These transformers could have been included in the first section dealing with three-phase
transformers. However, because of their particular connection (series), they were set apart.
They follow the same principle as current transformers. They are mainly used for series devices such as DVR, active filter, UPFC, etc.
2-8-361
Transformers
The following icons and diagrams are used to represent the three different types of threephase series transformers available with Hypersim. The number of windings is specified directly on the diagram representing the selected transformer.
D Magnetization
Impedance
Parameters
Rm: Equivalent resistance of iron losses of the magnetic circuit. Expressed in ohms;
E Winding
Parameters
Connections:
2-8-362
Transformers
Note : The saturation is characteristic of the core, hence of the winding and not the type
of three-phase connection (Y or delta). It is represented (schematically with line
segments) only for the magnetization branch. See Figure 8 - 23.
Number of points: Represents the number of segments of the current-flux saturation
curve. Only the positive part of the curve is specified; the negative part is completed by
symmetry;
Residual flux: Only used for inrush current phenomena;
Isat: The value of the current (in ampere) for each segment of the saturation curve. The
origin (0.0,0.0) is implied. The number of segments must be equal to the parameter
number of points;
Flux: The value of the flux (in volt-second) for each segment of the saturation curve.
The origin (0.0,0.0) is implied. The number of segments must be equal to the parameter
number of points.
Flux
3
2
1
Isat
The parameters are identical to those of three-phase saturable transformers (See Section 8.1).
H List of Available
Signals
The following signals are made available after an acquisition for analysis or processing.
2-8-363
Transformers
2-8-364
Transformers
2-8-365
Transformers
2-8-366
Transformers
2-8-367
Transformers
2-8-368
Transformers
2-8-369
Transformers
2-8-370
The transformer models with tap changer (including converter transformers) are designed to
be used when the voltage needs to be set. This is often the case with electronic power converters (rectifier, inverter, etc.). The first type of converter transformer has three windings per
phase: a Y primary with grounding impedance, a floating Y secondary and a delta tertiary.
The grounding of the primary can be done using a series RLC impedance. To set the voltage,
these transformers are often equipped with taps on the primary. All of these transformers have
saturation
Transformers
The following icons and diagrams are used to represent tap changer transformers.
g
TrA8
1
U
U
D
Tap
Tap
TrOY
2
1
U
D
U
Tap
Tap
TrOD
D Winding
Parameters Per
Phase
E Saturation
Parameters
2-8-371
Transformers
The tap changer effect is simulated by changing the transformer ratio. Figure 8 - 31 shows the
tap changing sequence and some related parameters.
Vmin: Primary voltage (kV rms) linked with position 1 to generate the rated voltage on
the secondary winding;
Vmax: Primary voltage (kV rms) linked with the last position of the tap changer to generate the rated voltage on the secondary winding;
V rated: Rated voltage of the primary winding (kV rms);
Timing rate: Minimum time duration required for a signal order to start changing tap(s);
Operating time: Time to change tap(s);
Number of taps: Number of tap(s);
Source of control (internal, external, manual): Specifies the source of the command
(internal, external or manual DC command);
Manual position: Manual position required (can be changed during the simulation).
G List of Available
Signals
2-8-372
Transformers
Operating time
Effective change
2-8-373
Transformers
2-8-374
Transformers
2-8-375
Transformers
2-8-376
Transformers
2-8-377
Transformers
Measuring Transformers
8.5
MEASURING TRANSFORMERS
A Introduction
There are three models of measuring transformers in Hypersim. These are voltage transformers with capacitive coupling, current transformers and finally voltage transformers with magnetic coupling.
B Icons and
Diagrams
CTYI
PT
PTYN
Current Transformer
D Primary Winding
Parameters
Rc, Lc, Cc: Respectively resistance (ohm), capacitance (farad) and inductance (henry)
of the tuning circuit. The values of these parameters are chosen so that the resonance
frequency of the series impedance on the secondary side is 60 Hz.
2-8-378
Transformers
Measuring Transformers
Flux: The value of the flux (in volt-second) for each segment of the saturation curve.
The origin (0.0,0.0) is implied. The number of segments must be equal to the parameter
number of points.
E Secondary
Winding
Parameters
F List of Available
Signals
G Control Panel of
Measuring
Transformers
Figures 8 - 37 and 8 - 38 show the control panel of voltage transformers with capacitive voltage divider;
Figures 8 - 39,8 - 40and 8 - 40show the control panel of the current transformer and;
Figures 8 - 41, 8 - 43and 8 - 46show the control panel of the voltage transformer with magnetic coupling.
2-8-379
Transformers
Measuring Transformers
2-8-380
Transformers
Measuring Transformers
2-8-381
Transformers
Measuring Transformers
2-8-382
Transformers
Measuring Transformers
2-8-383
Transformers
Measuring Transformers
2-8-384
Transformers
Measuring Transformers
2-8-385
Transformers
Measuring Transformers
2-8-386
Transformers
Measuring Transformers
2-8-387
Transformers
Measuring Transformers
2-8-388
Transformers
Measuring Transformers
2-8-389
Transformers
Measuring Transformers
2-8-390
Transformers
Measuring Transformers
2-8-391
Transformers
The inductance matrix transformer (IMT) model reproduces the behavior of a three-phase, 2
or 3-winding linear transformer at power frequency. This model work with the Hyper-
Transfo tool in the Hyperview panel. Based on excitation and short-circuit test in positive and zero sequences, the HyperTransfo tool computes two matrices [R] and [L]
modeling the transformer. The Ri and Li are the resistance and the self inductances. Mij is the
mutual inductances between coils i and j. Hypersim simulate the transformer as a mutuallycoupled R, L branches. This model represent only a three-limb or five limb core. The
three single-phase cores is not supported actually. All the compute details of matrix
[R] and [L] are in the HyperTransfo documentation.
There are two models available in Hypersim, a two windings and a three windings
transformer. Also, this model can be use to study fault in linear transformer. See the
fault modeling explanation, section E. This transformer model does not support saturation.
Secondary
Primary
R1
0
[R] = 0
0
0
0
0
R2
0
0
0
0
0
0
R3
0
0
0
0
0
0
R4
0
0
0
0
0
0
R5
0
0
0
0
0
0
R6
Phases: A
Figure 8 - 49
L1
M21
[ L ] = M31
M41
M51
M61
M12
L2
M32
M42
M52
M62
M13
M23
L3
M43
M53
M63
Matrix [R]
M14
M24
M34
L4
M54
M64
M15
M25
M35
M45
L5
M65
2-8-392
M16
M26
M36
M46
M56
L6
Transformers
B Icon and
Diagram
System Tools
Properties:
- Representing transformer with
inductance matrix [L] and [R].
- Modeling internal faults in a
power transformer.
Features:
- Fault turn to ground or turn
to turn option.
Implementation:
- Hypersim standart element
Matrix R in ohms
Matrix L in henry
Positive sequence parameters in ohms
Zero sequence parameters in ohms
The matrix [L] and [R], Positive and Zero sequence parameters are computed by HyperTransfo. See the HyperTransfo tool in Hyperview.
Winding Connections:
Y ground: Grounded Y connection;
Y floating: Floating Y connection;
Delta lead: Delta connection with lead of 30;
Delta lag: Delta connection with lag of 30;
Delta ground: Grounded delta connection.
Fault type:
Turn to earth (ground);
2-8-393
Transformers
Turn to turn.
When the fault is enable, a new matrix [L] and [R] is computed but this matrix is
not displayed actually in Hypersim.
Leg of faulted winding:
A, B or C
Faulted winding:
Primary, secondary or tertiary
For two windings, the tertiary is not used
Fault turn position:
FaultPositionA, available for turn to earth (ground)
FaultPositionB, available for turn to turn only.
Specify on which turn the fault is apply.
FaultPosition = nb / (na + nb)
na = number of turns of sub-coil a
nb = number of turns of sub-coil b
Coil
Phase A
1
na
Fault
Connexion
nf
nb
2
The model support two connectors for fault. Both are single phase.
To use the model as a simple Inductance matrix transformer, dont use the Tg and Tt connector. Just connect the Tg and Tt at a single-phase bus.
Tg is used for fault to ground, use a breaker single phase connected to gound.
Tt is used to apply a fault turn to turn, use a breaker between Tg and Tt connector.
2-8-394
Transformers
E Fault modeling
The developpment and the validation of the method is based on the article A transformer
model for winding fault studies, See references 2. We dont explain all of the details of the
method. Read the paper for more details.
The principle used to model a fault between a coil turn and the earth or between any two turns
is to divide the faulty coil. See the figure 1-2. The faulted winding nf is splitted into two subwindings a and b connected in series:
a: from top to nf to fault location
b: from fault location to bottom of nf
For a 3-leg 2-winding transformer (6 coupled windings) matrix [L] and [R] is 6 x 6.
When the turn to earth fault is apply the matrix [L] and [R] will be 7 x 7 and for a turn to
turn, the new matrix [L] and [R] is 8 x 8. This matrix is not displayed actually in Hypersim.
Only the matrix 6 x 6 in the forms.
Primary
Secondary
R1a 0 0 0 0 0 0
0 R1b 0 0 0 0 0
0
0 R2 0 0 0 0
[R] =
0
0 0 R3 0 0 0
0
0 0 0 R4 0 0
0
0 0 0 0 R5 0
0
0 0 0 0 0 R6
Phases:
Figure 8 - 53
Where R1, R2 and R3 are for primary parameters and R4, R5 and R6 are for secondary parameters. The columns are respectively the phase A, B and C.
2-8-395
Transformers
La
Mba
M2a
[ L ] = M3a
M4a
M5a
M6a
Mab
Lb
M2b
M3b
M4b
M5b
M6b
Ma2
Mb2
L2
M32
M42
M52
M62
Ma3
Mb3
M23
L3
M43
M53
M63
Ma4
Mb4
M24
M34
L4
M54
M64
Ma5
Mb5
M25
M35
M45
L5
M65
Ma6
Mb6
M26
M36
M46
M56
L6
F References
[1] Dommel, H., et al., Electromagnetic Transients Program Reference Manual (EMTP Theory Book), 1986.
[2] A transformer model for winding fault studies, Partrick Bastard, Pierre Bertrand, Michel
Meunier, IEEE, Vol 9, No 2, April 1994.
G List of Available
Signals
H Control Panel
2-8-396
Transformers
2-8-397
Transformers
2-8-398
Transformers
2-8-399
Transformers
Example:
This example will compare EMTP BcTran model and Hypersim
Inductance matrix transformer model. We compare a 3 windings
transformer and make a fault at the secondary for 6 cycles.
2-8-400
Transformers
2-8-401
Transformers
2-8-402
Transformers
Example:
This example will present an inductance matrix transformer 2windings with a fault turn to ground phase A at 0.1sec for 6 cycles.
2-8-403
Transformers
Figure 8 - 62 > Results for a fault to ground Phase A at 0.1 for 6 cycles
2-8-404
Transformers
2-8-405
Transformers
2-8-406
Chapter 9
LOAD AND MOTORS
Dynamic Loads
Dynamic Loads
Properties:
The dynamic loads are
used to simulate sub-systems at a port which is to
be represented by the variations of the active and
reactive powers as a function of the fundamental
voltage and frequency.
Main features:
The dynamic load models correctly reproduce the behaviour of
a load for the slow modulations of
the fundamental voltage imposed
by the power system dynamics
and for fast transient phenomena
resulting from the switchings.
The block diagram of the dynamic load model implementation is shown in Figure 9 - 2. A
voltage source is connected to a series impedance (Rs. Ls) and a parallel impedance (Rp Lp
or Rp Cp). The value of the internal voltage for this source allows to inject adequate power
into the network.
In the network, the dynamic load acts as a load that absorbs an active power and a reactive
power as a function of the voltage and frequency levels. Equations (EQ 1) to (EQ 4) describe
the complete behavior of the dynamic load. It can be observed that the dynamic load will vary
according to the level of the threshold voltage Vmin.
Hence, if the voltage at the load terminals U > Vmin
2-9-407
(EQ 1)
U-
P = P 0 -----
1 + T p1 s
ff
-------------------- + kp -----------0
1 + T p2 s
f0
np
U0
(EQ 2)
U-
Q = Q 0 -----U 0
nq
ff
1 + T q1 s
------------------- + kq -----------0
1 + T q2 s
f0
P = P 0 ( V min )
2
f f0
U - 1 + T p1 s
,
------------------------------+
kp
---------- np 1 + T s
f0
p2
U0
np 2
(EQ 4)
Q = Q 0 ( V min )
2
f , f 0
U 1 + T q1 s
-------------- -------------------- + kq ----------f0
U nq 1 + T q2 s
nq 2
where:
U is the direct sequence voltage at the fundamental frequency;
f is the fundamental frequency;
P0,Q0 are respectively the active and reactive power for a voltage with amplitude U0
and frequency f0
np is the active power variation coefficient as a function of the voltage (generally
between 1 and 2)
nq s the reactive power variation coefficient as a function of the voltage (generally
between 1 and 3)
kp is the active power variation coefficient as a function of the fundamental frequency
(generally between 0 and 2)
kq s the reactive power variation coefficient as a function of the fundamental frequency
(generally between 0 and -3)
2-9-408
Dynamic Load
The Vmin voltage level allows to change the behavior of the load. Below Vmin, the dynamic
load is said to have a constant impedance, since the exponent of the voltage is 2 (np=2, nq=2).
An additional term is present in (EQ 3) and (EQ 4) to cancel any discontinuity relative to the
threshold Vmin.
The operation of the dynamic load is shown in Figure 9 - 2. Using equations (EQ 1), (EQ 2),
(EQ 3) and (EQ 4), the digital model of the dynamic load can calculate the P and Q powers
to be absorbed by or delivered from the network. Since the model knows the value of the passive parallel components, it can calculate the part of the P1 power to be delivered by the
source. Accordingly, part of the power (P) originates from the parallel impedance (P2) and
part of the power (P1) originates from the internal voltage source.(P=P1+P2)
P 1 ,Q 1
P,Q
If U > Vmin
LS
RS
OR
U np 1 + Tp1,s
f f0
P = P0 -------
----------------------- + kp -----------U0
1 + Tp2,s
f0
P 2 ,Q 2
Lp
Cp
P 0 : Reference active power (MW) for the reference voltage of the load U;
Q 0 : Reference reactive power (Mvar) of the load for the reference voltage of the load
U;
C Load Parameters
V min : Voltage threshold below which the load behaves as a constant impedance (pu);
E Dynamic Load
Control Panel
2-9-410
Dynamic Load
2-9-411
Harmonic Load
Harmonic Load
Harmonic Load
Properties:
The harmonic load model
represents the different
types of industrial loads.
Main features:
The harmonic load model consists
of three elements:
Dynamic load;
Random load;
Harmonic current source.
Harmonic Load
Introduction
The harmonic load model consists of three elements: a dynamic load, a random load and a
harmonic current source. The block diagram for the implementation of a harmonic load model is shown in Figure 9 - 6. This implementation is the same as for a dynamic load, except that
the internal voltage source can also generate harmonics. The value of the internal voltage for
this voltage source allows to inject the adequate power and dynamic loads into the network.
In the network, the harmonic load acts as a load that absorbs a reactive power and an active
power as a function of the voltage and frequency levels. Equations (EQ 5) to (EQ 8) describe
the complete behavior of the harmonic load. It can be observed that the harmonic load will
vary according to the level of the threshold voltage Vmin.
Hence, if the voltage at the load terminals U > Vmin
(EQ 5)
U-
P = P 0 -----
1 + T p1 s
ff
-------------------- + kp -----------0
1 + T p2 s
f0
np
U0
(EQ 6)
U- nq
Q = Q 0 -----U
0
1 + T q1 s
ff
------------------- + kq -----------0
1 + T q2 s
f0
2-9-413
P = P 0 ( V min )
2
f f0
U - 1 + T p1 s
,
------------------------------kp
+
---------- np 1 + T s
f
p2
0
U0
np 2
(EQ 8)
Q = Q 0 ( V min )
2
f , f 0
U - 1 + T q1 s
------------
-------------------- + kq ----------f0
U nq 1 + T q2 s
0
nq 2
where:
U is the direct sequence voltage at the fundamental frequency;
f is the fundamental frequency;
P0,Q0 are respectively the active and reactive power for a voltage with amplitude U0
and a frequency f0
np is the active power variation coefficient as a function of the voltage (generally
between 1 and 2)
nq is the reactive power variation coefficient as a function of the voltage (generally
between 1 and 3)
kp is the active power variation coefficient as a function of the fundamental frequency
(generally between 0 and 2)
kq is reactive power variation coefficient as a function of the fundamental frequency
(generally between 0 and -3)
The Vmin voltage level allows to change the behavior of the load. Below Vmin, the dynamic
load is said to have a constant impedance, since the exponent of the voltage is 2 (np=2, nq=2).
An additional term is present in equations (EQ 7) and (EQ 8) to cancel any discontinuity relative to the threshold Vmin.
The operation of the harmonic load is shown in Figure 9 - 6. Using equations (EQ 5),(EQ
6),(EQ 7) and (EQ 8), the digital model of the dynamic load can calculate the P and Q powers
to be absorbed by or delivered from the network. Since the model knows the value of the passive parallel components, it can calculate the part of the P1 power to be delivered by the
source. Accordingly, part of the power (P) originates from the parallel impedance (P2) and
part of the power (P1) originates from the internal voltage source (P=P1+P2).
2-9-414
Harmonic Load
The two main differences between the dynamic and the harmonic loads are the following.
Firstly, a programmable random variation part can be added to the P1,Q1 power component
provided by the internal source. Secondly, the same load calculates a percentage of harmonics, based on the fundamental, and can then reinject these harmonics as current.
Harmonic injection
P1,Q1
P,Q
If U > Vmin
LS
RS
OR
P2,Q2
Rp
Lp
Cp
U-
P = P0 -----U0
np
U nq 1 + Tq1,s
f f0
PQ = Q0 -------
----------------------- + kq -----------U0
1 + Tq2,s
f0
P 0 : The reference active power of the load (MW) for the reference voltage of the
load U;
Q 0 : The reference reactive power of the load (Mvar) for the U; value;
C Load Parameters
V min : Threshold below which the load behaves as a constant impedance (pu);
2-9-415
np: Active power variation coefficient as a function of the voltage (generally between 1
and 2);
nq: Reactive power variation coefficient as a function of the voltage (generally between
1 and 3);
kp: Active power variation coefficient as a function of the frequency (generally
between 0 and 2);
kq: Reactive power variation coefficient as a function of the frequency (generally
between 0 and -3).
Tp1: Time constant to calculate the active power of the load.
Tp2: Time constant to calculate the active power of the load.
Tq1: Time constant to calculate the reactive power of the load.
Tq2: Time constant to calculate the reactive power of the load.
D Random
Variation
Parameters
E Harmonic
Parameters
2-9-416
Harmonic Load
F List of Available
SIgnals
G Harmonic Load
Control Panels
2-9-417
2-9-418
Harmonic Load
2-9-419
2-9-420
D.C. Motor
DC Motor
DC Motor
Properties:
The D.C.motor model represents both the static and
dynamic behaviours of
two types of industrial
D.C. motors: shunt and
separately excited
Main features:
Two common types of industrial
motors.
Type of connections of either
rotoric and statoric circuits:
Parallel connection (shunt)
or;
Two distinct circuits
DC Motor
Introduction
The following equations govern the voltages of the motor as a function of the currents:
vf = rfif + df/dt
va = raia + da/dt
where
vf: voltage at the terminals of the stator winding
if: current in the stator
rf: resistance of stator winding
f: flux in the stator
va: voltage at the terminals of the rotor winding
ia: current in the rotor
ra: resistance of the rotor winding
a: flux in the rotor
The fluxes can be expressed as follows:
f = Lffif + Lfaia
2-9-421
a = Lafif + Laaia
where
L is a constant
The action of the switch allows the rotor winding to be perceived as a stationary winding with
a magnetic axis perpendicular to the axis of the winding field. There is no induced voltage in
one of the windings because of the variation of the current crossing the other winding. Consequently, the voltage equations can be reduced to a matrix in a Laplace domain, as follows:
vf(s) rf + sLffif(s)
va(s)rLafra + sLaaia(s)
It is useful to represent the electromagnetic torque equation that follows:
Te = Lafifia
And finally, using an equation linking the angular speed r, a complete relation can be set
and allows to form the representative block diagram:
Te = Jdr/dt + Bmr + TL
where
J: moment of inertia of rotor
Bm: damping coefficient associated to the mechanical rotation movement
TL: load torque
Usually, the damping coefficient Bm is not considered.
The D.C. motor is often represented by Figure 9 - 12. According to the type of motor, the rotoric circuit can be connected in parallel with the statoric circuit, thus Vf=Va, in the case of
a shunt motor.
A motor that uses two distinct circuits is referred to as a separately excited motor. The stator
has to be supplied with another circuit, since the rotor is connected to the power network. The
stator can be supplied using different methods, either using a constant source or with Simulink.
2-9-422
D.C. Motor
Laa
if
Stator
circuit
Vf
ia
rf
Lff
ra
Laf.if.wr
Va
Rotor
circuit
C Mechanical Load
Parameters
Load Torque: mechanical torque of the load driven by the motor (N.m)
Moment of inertia: value of total inertia driven by the motor. This value consists of the
inertia of the motor and the inertia of the driven mechanical load (kg.m2)
Viscous friction: value of viscous friction or damping. This corresponds to a friction
loss varying with the speed (N.m.s)
Dry friction: value of dry friction. This corresponds to constant friction loss (N.m)
E List of Available
Signals
2-9-423
Vp_label: voltage at the positive terminal of the motor with respect to the ground (V)
Vn_label: voltage at the negative terminal of the motor with respect to the ground (V)
V_ext_label: voltage of the D.C. motor, or voltage of armature Va (V)
Vf_label: excitation voltage at the terminals of stator (rf+Lff) (V)
Vlink_label: voltage originating from Simulink to supply the stator, in the case of a
separately excited motor supplied by a Simulink circuit (V)
Tm_label: mechanical torque of the motor load (N.m)
If_label: current in the stator circuit or field current.
F D.C. Motor
Control Panel
2-9-424
D.C. Motor
2-9-425
Arc Furnace
Introduction
The A.C. arc furnace model represents both the static and the dynamic behavior of the arc
resistance. The characteristic of the furnace depends on the active power consumption which
varies with the different operating conditions.This model is used to study the harmonics returned to the network and also to study the wave quality, particularly the voltage flicker.
The block diagram of the arc furnace implementation is shown in Figure 9 - 16. The V-I characteristic consists of three regions and is calculated using the arc furnace parameters and operating conditions. The R2 resistance, or the arc furnace resistance when the ignition
threshold voltage is reached, depends only on the extinction and ignition firing voltages and
their respective currents. As for the resistance prior to ignition firing, it is also dependent on
the previously discussed parameters, in addition to the average operating power. To this last
resistance, it is possible to add a sinusoidal or random variation, depending on the characteristics defined by the user. Hence, the model takes into account and includes the periodic and
stochastic changes in the arc resistance. The variables used in the block diagram are defined
as follow:
Vall: Furnace ignition voltage;
Vex: Furnace extinction voltage;
I2-I1: Difference between ignition and extinction currents;
Pmoy: Average operating power;
Amp_sin: Amplitude of sinusoidal variation;
Freq_sin: Frequency of sinusoidal variation;
Pha_sin: Phase of sinusoidal variation;
Amp_al: Amplitude of random variation;
Germe: Random sequence seed for white noise;
Type: Characteristic type of arc resistance;
R1: Resistance of furnace static characteristic before ignition;
R1: Final furnace resistance before ignition;
R2: Furnace resistance once ignited;
Hence:
2-9-426
Arc Furnace
Vall
Vex
Vex
Vall
I2 - I1
I2 - I1
R2
Vall
Vall2
Vex
Pmoy
( Pmoy
R2
R2
+ Vall Vex
R1
)
R2
Amp_sin
Freq_sin
Pha_sin
OR
Caracteristicts V - I
V
R1'
I
Type
To network
Amp_al
Germe
Band-pass
filter
Controlled voltage
source
D Static
Parameters of
Arc Furnace
Ignition voltage: voltage to be reached to ignite the furnace, hence for the electric arc to
strike (V)
Characteristics: characteristics of arc resistance. 1 Static: no variation of furnace resistance value before ignition. 2 Sinusoidal: modulation, following a low frequency sinus,
of the furnace resistance value before ignition. 3 White noise: random variation, following a low frequency white noise, of the furnace resistance value before ignition.
Only one type can be selected at a time.
Extinction voltage: voltage at which the furnace extinguishes (this voltage must be
lower than the ignition voltage) (V)
Average operating power: average power representing the operating conditions of the
furnace. (This parameter is used to calculate the characteristic of the furnace before its
ignition, irrespective of the mode, static or dynamic) (kW)
Extinction current - Ignition current: difference between the ignition and extinction currents (A)
Note : This value should be greater than zero; the extinction current must be greater than the ignition current (kA)
2-9-427
E Sinusoidal
Variation
Parameters of
Arc Resistance
Sinus frequency: vector of respective frequencies for the sinusoidal modulation of the
furnace dynamic characteristic for the three phases (Hz)
Sinus amplitude: vector of respective amplitudes for the sinusoidal modulation of the
dynamic characteristic for the three phases. The calculated sinus is multiplied by the
amplitude specified by the user and by the resistance value. The result is then added to
the furnace resistance before its ignition (ohm)
Sinus phase: vector of respective phases for the sinusoidal modulation of the dynamic
characteristic for the three phases with respect to the initial time of 0 second (degrees)
F Random
Variation
Parameters of
Arc Resistance
Noise amplitude: vector of respective amplitudes for the random variation of the
dynamic characteristic for the three phases. The amplitude specified by the user is used
to multiply the random number which is then added to the resistance value before arc
ignition.
G List of Available
Signals
Random sequence seed: vector of initialization seeds for random functions generating
white noise respectively for each phase. This number must be in the interval [0,1].
2-9-428
Arc Furnace
2-9-429
2-9-430
Induction Motor
Induction Motor
Induction Motor
Properties:
This model is general
enough to represent most
industrial three-phase
induction motors with 1 or
2 squirrel cage rotors or
with wound rotors
Main features:
The model is equipped
with connectors to the control module in order to
facilitate modelling of the
mechanical load.
Induction Motor
Model
rs
- + ----- qs = -----b- v qs ----- ( qs )
ds
s
b
X ls mq
(EQ 10)
rs
- + ----- ds = -----b- v ds + ----- ( ds )
qs
s
b
X ls md
(EQ 11)
r r1
qr1 = -----b- v qr1 ----------------r dr1 + -------- ( qr1 )
s
X lr1 mq
b
2-9-431
(EQ 12)
dr1
r r1
= -----b- v dr1 + ----------------r qr1 + -------- ( dr1 )
s
X lr1 md
b
(EQ 13)
r r2
qr2 = -----b- v qr2 ----------------r dr2 + -------- ( qr2 )
s
b
X lr2 mq
(EQ 14)
r r2
dr2 = -----b- v dr2 + ----------------r qr2 + -------- ( dr2 )
s
X lr2 md
b
mq
qs qr1 qr2
= X aq ------- + ----------- + ----------X
X lr1 X lr2
ls
md
ds dr1 dr2
= X ad ------- + ----------- + ----------X
X lr1 X lr2
ls
(EQ 15)
(EQ 16)
In the preceding equation, the Vdr and Vqr rotor voltages are set at zero for the squirrel cage
rotor.
Current equations:
(EQ 17)
i qs
1- ( )
= -----mq
X ls qs
(EQ 18)
1- ( )
i ds = -----md
X ls ds
(EQ 19)
1
i qr1 = --------- ( qr1 mq )
X lr1
(EQ 20)
i dr1
2-9-432
1 -( )
= -------md
X lr1 dr1
Induction Motor
(EQ 21)
M X ls X lr1 X lr2
Saturation equations:
(EQ 22)
X aq f ( m )
mqsat = mq ------- --------------
X M m mq
(EQ 23)
Mechanical equations:
(EQ 24)
X ad f ( m )
mdsat = md ------- --------------
X M m md
T e = ds I qs qs I ds
b
r = --------- ( T TL )
2Hs e
(EQ 25)
(EQ 26)
2-9-433
Llr2
D Axis
Rs
( - 0) ds
-
+
Vqs
Lls
Llr2
Lm
Ids
Stator
Idr1
( - r) qr1
+
Rr1
( - r) qr2
+
Rr2
Rotor 2
+
Idr2
Llr2
Rs
( - 0) ds
-
+
Vqs
Stator
Vdr1
Vqr2
Q Axis
Rotor 1
Lls
Iqr1
Llr2
( - r) dr2
+
Iqs
( - r) dr1
+
Lm
Rr1
Rotor 1
+
Rr2
Rotor 2
+
Iqr2
Vqr2
Vqr1
C DQ Speed
Reference
2-9-434
Reference selection for the conversion in the DQ axis system: (Rotor, Stator, Stator
rotating field)
Induction Motor
D Motor
Parameters
E Connectors to
Control Module
Interface
F Mechanical Load
Parameters
Mechanical torque (Internal/External): internal or external mechanical torque (Interne = internal, from parameters Wmec Tmec, Externe = external, from connector to the control module).
H: inertia constant (second);
Friction: viscous friction (pu).
The internal mechanical load can be characterized by a five point search table. The user provides the mechanical torque value Tmec for each rotor speed (Wmec). The Wmec five point
vector is in electrical radians/second. The Tmec vector allows to modelize any type of nonlinear mechanical load according to the speed signal.
Wmec: Speed vector (electrical radians/s);
Tmec: Mechanical torque vector (N.m).
G Saturation
Parameters
H List of Available
Signals
2-9-435
2-9-436
Induction Motor
2-9-437
2-9-438
Induction Motor
2-9-439
Purpose of the
Dynamic Load
Model
The purpose of the dynamic load is to model a portion of a power system including a combination of loads (motor loads, constant impedance RLC loads) distribution lines, transformers
and generators, as a simple equivalent representing the dynamic behavior of this subnetwork.
As Hypersim is used to model both the low frequency electromechanical oscillations (typically 0.01 Hz to 2 Hz) and the high frequency electromagnetic transients resulting from faults
and switchings (typically a few kHz), the load model must fulfill the following two requirements:
The load must represent the variations of load active power P and reactive power Q as
function of variable positive-sequence voltage V and fundamental frequency.
The load impedance must represent the subnetwork impedance as function of frequency for an acceptable frequency range. The network impedance will determine the
frequency content of transient voltages and currents, especially for switchings and
faults occurring in the vicinity of the dynamic load. The critical parameters are, the
impedance at fundamental frequency, the position of impedances poles (parallel resonances) and zeros (series resonances) as well as damping (amplitude of poles).
9.6.2
Description of
the Load
Model
The single-line diagram of the dynamic load model is presented on Figure 9 - 25.
Rs
Ls
Cp
P, Q
Rp V 0
2-9-440
f 0
V- np 1 + k f----------P = P 0 ----p
V 0
f0
if V>Vmin
(EQ 28)
V-
Q = Q 0 ----V
0
nq
ff
1 + k q -----------0
if V>Vmin
where:
P, Q
P0, Q0
f0
f
V0
V
Vmin
np, nq
kp, kq
Note : The P, Q variations follow the above equations as long as voltage is above a minimum value Vmin. When voltage falls below Vmin, the load varies as a constant impedance (np=2 and nq=2). The variation laws then follows the following parabolic
law:
(EQ 29)
V min np 2 2
ff
V 1 + k p -----------0
P = P 0 ---------np
f0
V0
if V<Vmin
2-9-441
V min nq 2 2
ff
Q = Q 0 --------- V 1 + k q -----------0
nq
f0
V0
if V<Vmin
Exponents np and nq depend on the nature of loads which are lumped in the dynamic load. In
particular, np and nq= 0, 1, 2 represent respectively constant power, constant current and constant impedance loads. According to reference [1] np usually ranges between 0.5 and 1.8,
whereas nq is typically between 1.5 and 6. Reference [2] also gives examples for residential
and commercial loads.
The following table taken from reference [1] summarizes sample characteristics of different
load classes in north america.
Load class
Power
factor
np
nq
kp
kq
Residential
Summer
Winter
0.9
0.99
1.2
1.5
2.9
3.2
0.8
1.0
-2.2
-1.5
Commercial
Summer
Winter
0.85
0.9
0.99
1.3
3.5
3.1
1.2
1.5
-1.6
-1.1
Industrial
0.85
0.18
6.0
2.6
1.6
In the absence of information on the load composition, the most commonly accepted load
model is to represent active power as constant current (np=1) and reactive power as constant
impedance (nq=2).
Figure 9 - 26 shows variations of active power and reactive power as function of positivesequence voltage for a dynamic load with the following parameters. Frequency is kept constant at nominal frequency.
P0= 50 MW Q0= 25 Mvar
V0= 0.96 pu
2-9-442
2-9-443
Em
Rm
Lm
km*Pi, Qi
Pi, Qi
(1-km)*Pi
Let us assume that the load flow program gives the following values:
V= 25 kV
P= 80 MW
Q= 15 Mvar
2-9-444
2-9-445
1
X s = X 0 -------------------------2
f
0
1 --------f
max
(EQ 32)
R p1 = Z max
(EQ 33)
f max 2
X p = X s -------- f
0
From the example given in Figure 9 - 28 with:
f0= 60 Hz; fmax=240 Hz; R0= 1.47 ; X0= 3.64 ; Zmax= 15.2
The following values are obtained:
Series branch: Inductive reactance Xs= 3.88
Shunt branch: Rp1= 15.2 ; Capacitive reactance Xp= 62.1
Once Xs and Xp are known, the resistance Rs is computed as follows:
(EQ 34)
1
R s + jX s = ------------------------------------------------1
1 - ----j-------------------- --------R 0 + jX o Rp1 X p
1
R p = ------------------------------------------R
f0 2
1
-------- ------s --------R p1 X 2 f max
s
Those values are very close to the exact values found from an iterative solution:
Series branch: Rs= 0.488 ; Xs= 3.90 ; (Ls=0.0103 H)
Shunt branch: Rp= 15.6 ;
References
[1] Power System Stability and Control by P. Kundur, Mc Graw Hill book, 1993
[2] Load Representation For Dynamic Performance Analysis by IEEE task force on Load
Representation for Dynamic Performance, IEEE paper 1992 WM 126-3 PWRS
2-9-447
2-9-448
Chapter 10
ELECTRONIC SWITCHES AND BRIDGES
In Hypersim, a switch is modelled as a variable resistance, very low if the switch is closed
and very high if the switch is open. The control signal of the switch may be provided by: an
internal source, by an external source through digital inputs, or the control system module or
by Simulink. In addition to the switch control signal, the opening and the closing of the switch
depends on the voltage across the switch and the current through the switch.
B Icon and
Diagram of
Electronic
Switches
The following icon and diagram are used to represent electronic switches:
1
Ia
I
SwMono
SwYR
Ib
Ic
SWITCH
Sw94
A General
Parameters
with one phase of the network. If D (delta), each member of the switch is connected between two phases of the network;
Note : The Delta connection is not functional at this time.
2-10-449
B Switch
Parameters
Type: Set the type of the switch used. Each phase may use a different type of switch. Some
type requires two command signals per phase because they are designed from two distinct elements.
Default zero reset. If the ENABLE button is grey, the FailSig_label is reset to zero. This
signal is produce if the switch (diode, thyristor or GTO) has reach its normal or reverse breakdown voltage or if an untimely firing had happened.
D Steady state
condition
State of the switches in steady state on a per phase basis. 0 if the switch is open and 1 if
the switch is to be closed.
2-10-450
Electronic switches
E Precision Valve
Commissioning of the high precision switching (diode, thyristor or GTO). Compensate the
digital error as a result of the switch state change accordingly to the calculation time step.
10.1.2 Other
Parameters
A Open State
Resistances
B Closed State
Resistances
C Holding Current
Current threshold value below which the valve is automatically blocked. Not relevant for the
ideal switch (A);
D Snubber
Capacitance
E Snubber
Resistance
F Forward Break
Overvoltage
Highest value of overvoltage across a blocked valve. Relevant only for the diode, the GTO
and the thyristor (V);
G Reverse Break
Overvoltage
Highest value of overvoltage across a valve. Relevant only for the diode, the thyristor and the
GTO (V);
H Turn-off Time.
Lowest time interval during which the voltage across the valve must stay negative to avoid
the valve being fired again when the forward voltage turns positive. Relevant only for thyristor (s);
I GTO Maximum
Breakable
Current
Maximal value of the GTO current that can be turned off by the GTO turn off command. Relevant only for the GTO (A);
J Forward Voltage
Drop
Minimal forward voltage for which valve firing is possible. Relevant only for the diode, the
thyristor and the GTO (V);
10.1.3 Commands
Establishes the control order origin; external, control block or from Simulink.
A External
B Block of
Commands
The command signals are from the Control Block input placed on the switch icon.
2-10-451
The P connector, on the icon (see Figure 10 - 1), allows to send 0 or 1 command to all
the switches. You must send to this connector a whole value where each bit corresponds
to the command signal from each switch. The less significant bits (1, 2, 3) correspond
to the phases A, B, and C switches in their forward breakdown voltage condition. The
4, 5, and 6 bits correspond to the phases A, B, and C switches in their reverse condition.
Therefore, the whole value of bit 5 on the P connector is 000101 in binary value and
commands the firing of the A and C phases in the forward breakdown voltage condition
of the switch.
The D connector on the icon (see Figure 10 - 1), allows to set a delay to each switching. This function is available only if the High precision switch has been selected. A
decimal value between 0.0 and 1.0 must be applied to this connector for each transition
of one of the switches. The 0.0 value means no delay and a 0.5 value means a 50%
delay accordingly to the actual calculation time step used.
C Simulink
The command signals are from an HyperLink block. The following information must be supplied:
Directory: the full path of the directory where the Simulink model is stored;
Model name: the name of the Simulink model;
Execution time: estimated or calculated execution time of the Simulink model.
10.1.4 List of
Available
Signals
2-10-452
A Electronic
Switches
Command Panel
.
A Introduction
The breaker is simulated as a variable resistance, very low if the breaker is closed and very
high if the breaker is open. The control signals of the breaker may be provided by an internal
timing control, by an external source through control block digital inputs or by Simulink.
2-10-453
B Icons and
Diagrams
Representing
Breakers
There are two types of breakers: the serial breaker and the fault breaker. The icon and the diagram of serial breakers are shown in Figure 10 - 3 while those of fault breakers are shown
in Figure 10 - 3
The data forms of a serial breaker and of a fault breaker are shown in Figures 10 - 5, 10 - 6
and Figures 10 - 7, 10 - 8 respectively.
SI or pu units.
SI for international units of elements (ohms, farad, henry etc.);
pu to set the values in pu.
Base units:
Base MVA: base power (MVA);
Base Volt: base voltage (kV);
Base Freq: base frequency (Hz).
Connection:
for the serial breaker (Serial=S): Only series connection is valid. In this case each
branch of the serial breaker is in series with one phase of the network;
for the fault breaker (Yg): Only Yg connection is valid. In this case the connection
of the three phase fault breaker is as shown in Figure 10 - 9;
Note : The Delta connection options (D) in the data forms of the serial breaker and of the
fault breaker are not functional at this time.
Type (Breaker = 0, Switch = 1):
2-10-454
if 0, the breaker opens as soon as the current in the breaker is lower than the I margin current after the command to open is issued;
if 1, the breaker behaves like an ordinary switch and opens immediately after the
command to open is issued.
2-10-455
2-10-456
2-10-457
A Open State
Resistor
B Closed State
Resistor
C I margin
Current absolute value below which the breaker is allowed to open (A).
D Steady State
Condition
State of phase breakers A, B, C and ground breaker in steady state. Colored if the breaker
is open and Grey, if the breaker is closed.
2-10-458
E Switching Time
Programming
F Time Units
G Phase Operated
Specify which among the phase breakers A, B, C and ground breaker can change state if data
acquisition is made with the switching enabled in Spectrum. For changes of state to happen,
operation times T1 and T2 below must be such that T1<T2.
H T1 Operation
Time
Relative time (with respect to synchronization) when the state of a phase breaker or a ground
breaker changes (s or ms).
T1: Initial status or transition time from low to high (t1) or high to low (t2) with fix,
incremental or random variation types.
All timings specified with these two parameters are in cycles from the fundamental
frequency set in the element control panel.
If a parameter field is blank or contains - no switching will happen for this parameter.
Low: initial digital output status is 0 open;
High: initial digital output status is 1 close.
I T2 Operation
Time
J Control Order
Source
Relative time (with respect to synchronization) when the state of the phase breaker or a
ground breaker returns to the steady state position (s or ms).
Specifies the origin of the control signal (Internal = 0, External = 1, Simulink = 2):
Internal: Hypersim;
External: Digital inputs;
Control block: from Hypersim control block;
Simulink: HyperLink bloc;
Directory: The complete path of the directory where the Simulink model is stored;
Model name: name of the Simulink model;
Execution time: Estimated or measured execution time of the Simulink model.
2-10-459
Ropen/close
Ropen/close
Ropen/close
Ground
Ropen/close
Figure 10 - 9 Connection of the triple H-bridge converter
K List of Available
Signals
The following icon and diagram are used to represent a 2 triple-level converter in H configuration.
2-10-460
Triple-Level Converter in H
Configuration
10.3.2 Parameter
Description
10.3.3 Switch
Parameters
A Type
Specifies the type of switch. The types available are the following:
Breaker:
Blocking is set by the control signal. Conduction depends on the control signal and the
current level in the breaker.
Ideal Switch:
Blocking and conduction are set by the control signal.
Thyristor:
Blocking is set by the control signal and the current level. Firing depends on the control
signal and the voltage at the thyristor terminals
Diode
The diode blocking depends only on the current level across it. The diode firing
depends only on the voltage at its terminals.
Back-to-Back GTO and Diode
Blocking of the GTO is set by the control signal if the current level is acceptable. Firing
of the GTO depends on the control signal and the voltage at the GTO terminals.
The diode blocking depends only on the current level across it. The diode firing
depends only on the voltage at its terminals.
Note : The firing of the diode can be forced by sending to it a control signal. This technique is sometimes used to facilitate the simulation.
B Fail Signal
Reset
Fail Signal Reset. If Enable is grey, the FailSig_label alarm signal is reset. This
signal is generated if the switch (diode, thyristor, GTO) has reached the forward or
reverse breakdown voltage or if false firing has occurred.
2-10-461
Reverse break overvoltage: Highest value of the reverse voltage in a blocked valve.
Applies only to diodes, thyristors and GTO (V).
2 Forward Break
Overvoltage
Forward break overvoltage: Highest value of the forward voltage in a blocked valve.
Applies only to thyristors and GTO (V).
2-10-462
3 Snubber
Resistance
4 Snubber
Capacitance
Triple-Level Converter in H
Configuration
5 Turn-off Time
6 GTO Maximum
Breakable Current
7 Open State
Resistor
8 Closed State
Resistor
Turn-off time: Shortest time interval during which the voltage in the valve must be
negative to avoid being fired again when the voltage becomes positive. Applies only
to thyristors (s).
GTO maximum breakable current: Maximum GTO current value that can be turned
off by the corresponding GTO command. Applies only to GTO (A).
Open state resistor: resistances for phases A, B and C of the open switch (ohm).
Closed state resistor: resistances for phases A, B and C of the closed switch (ohm).
9 Forward Voltage
Drop
Forward voltage drop: minimum forward voltage at which it is possible to fire the
valves. Applies only to diodes, thyristors and GTO (V).
10 Holding Current
Holding current: Current threshold below which the valve is automatically blocked.
Does not apply to ideal switches (A).
Specifies the source of the control signal: external, via control blocks or using Simulink.
A External
B Control Block
The control signals originate from the control block input on the switch icon.
C Simulink
The control signals originate from a HyperLink block. The following information must
be provided:
Directory: full path of the directory where the Simulink model is saved;
Name of model: name of Simulink model;
Execution time: estimated or measured execution time of Simulink model.
10.3.5 List of
Available
Signals
-1: Violation of extinction time limit Tq for Thyristor 21. (Automatically reset after
one calculation time step).
2: Reverse voltage of Thyristor 12 greater than Rbov. (Reset only if fail signal reset =
Enable (Grey).
-2: Reverse voltage of Thyristor 21 greater than Rbov. (Reset only if fail signal reset
= Enable (Grey).
3: Forward voltage of Thyristor 12 greater than Fbov. (Reset only if fail signal reset
= Enable (Grey).
-3: Forward voltage of Thyristor 21 greater than Fbov. (Reset only if fail signal reset
= Enable (Grey).
P_label: Control signal of control module.
D_label: Control signal of control module.
Hypersim provides for a three-level or Neutral Point Clamped (NPC) converter bridge equivalent. The NPC converter is composed of 4 controlled (Q1,Q2, Q3, Q4) switches and 6 diodes
per phase. The control signals of the switches can originate from an external source via digital
input, a system control module (control block) or Simulink. The model emulates the NPC
converter by using an ideal three-level switch (P N, M) per phase - The control signals of the
equivalent three-level switches are generated by the model, based on an integrated logic and
the control signals provided externally. In the blocked mode, when the control pulses are ab
sent, the bridge diodes are also emulated.
The following icon and diagram are used to represent a three-level converter.
2-10-464
Figure 10.13 shows the control panel for a three-level converter bridge.
THREE-LEVEL CONVERTER
10.4.3 Switch
Parameters
A Type
B Other
Parameters
5 Turn-off Time Does not apply to the actual model. Shortest time interval during which
the voltage in the valve must be negative to avoid being fired again when
the voltage becomes positive. Applies only to thyristors.
6 GTO Maximum Breakable Current Does not apply to the actual model. Maximum
GTO current value that can be turned off by the corresponding GTO
command. Applies only to GTO.
7 Open State Resistor Resistances for phases A, B and C of the open switch.
8 Closed State Resistor Resistances for phases A, B and C of the closed switch.
2-10-465
Specifies the source of the control signal: external, via control blocks or using Simulink.
A External
B Control Block
The control signals originate from the control block input on the switch icon.
2-10-466
THREE-LEVEL CONVERTER
C Simulink
The control signals originate from a 1 block. The following information must be provided:
Directory: full path of the directory where the Simulink model is saved;
Name of model: name of Simulink model;
Execution time: estimated or measured execution time of Simulink model.
10.4.5 List of
Available
Signals
2-10-467
2-10-468
Chapter 11
HVDC AND SVC CONTROLLERS
The HVDC converter library contains 12-pulse and 6-pulse models. The control system is the
same for both types of converters. However, 12-pulse models offer the possibility of choosing
between two types of synchronization systems. Since each converter can be operated as a rectifier or as an inverter, the set of parameters is the same for all four converter models. However, different icons and elements are provided to differentiate rectifiers and inverters. The
control system1 includes regulation, synchronization, protection and tap changer subsystems.
The models can simulate a valve short-circuit or a DC fault. Step responses can also be simulated to optimize the regulator parameters. Finally, the thyristor bridge can receive firing
pulses from four different sources:
The internal generic control system provided with the converter;
An external physical source;
Simulink;
The Hypersim control module (control block)
A GTO based two-level voltage-source converter (VSC) may be modelled by using the
GTO+diode switch type in the six-pulse inverter shown in Figure 11 - 4. The model
implementation includes a logic for the simultaneous switching (OFF or ON) of a diode
with the switching of a GTO in accordance with the correct sequence. In this case, the
precision valve option is not operational.
CC 12
D
P
Id
V_Line
1.This control system is only intended for the thyristor based bridge.
2-11-469
InvE9
CC 12
D
P
Id
V_Line
Rec Q7
+
CC 6
D
P
Id
V_Line
InvP1
+
CC 6
D
P
Id
V_Line
The general diagram of a converter station including a 12-pulse converter, a converter transformer and the generic control system is shown in Figure 11 - 5. For a 6-pulse converter, the
bridge would be connected to one of the two secondary windings (star or triangle connections).
The general diagram of the control system is shown in Figure 11 - 6.
It is possible to simulate a short circuit on any of the 12 valves (at the users choice) for a
specified time interval (see form in Figure 11 - 16). A resistive grounded DC fault can also
be simulated at the converter terminal. The time interval is referenced with respect to the start
of the acquisition, or t = 0.
The lag angle reference (a) is a firing system input. It is generated by the regulation system
and the AC voltages of the switching bus. The synchronization system generates firing pulses
for each thyristor. The generic synchronization system used in a 6-pulse converter is of the
equiangular type. It can be used with a 12-pulse converter for which the user also has the
option of using an equidistant synchronization system.
2-11-470
The firing pulses are synchronized with the zero crossings of the switching voltages.
B Equidistant
synchronization
mode
The firing pulses are synchronized with an oscillator whose frequency is 12 times that of the
power grid. The oscillator phase is controlled by the regulation system (current, voltage, etc.)
which lags or leads the firing, if necessary. The oscillator synchronizes itself slowly at the
zero crossings of the switching voltages, but quickly at the previous firing instant. The oscillator gain, set by the user, allows to determine the speed at which the oscillator synchronizes
itself with the zero crossings. A gain of 1 (minimum allowed) means a full synchronization
with the zero crossings1. As the gain increases, the oscillator synchronizes itself more slowly
with the zero crossings (1000 is the maximum limit imposed by the model). Hence, the system is not greatly affected by transients and unbalances of the AC switching voltages. A gain
of 32 (default value) is a good compromise between the synchronization speed and the immunity to the harmonics on the switching voltages. In transient state or during AC faults,
when the switching voltages are absent or severely distorted, the oscillator gain is automatically increased to cancel any zero crossing synchronization.
Note that a valve will be fired (pulse generated) only when the voltage at its terminals has
reached a minimum threshold, adjustable by the user.
2-11-471
Id
Ld
Line
DC Line
IaY
Tap changer
1Y
3Y
5Y
Resistive
DC
Fault
IbY
VL
Va
4Y
6Y
2Y
1D
3D
5D
b
Vb
IaD
IbD
A thyristor with
parallel snubber
circuit
Thyristor
Valve
Fault
b
c
Vc
4D
6D
2D
Neutral
Zneutral
VN
Id
IaY
IbY
IaD
IbD
Va
Vb
Converter
Control
Vc
VL
VN
The voltages used for synchronization are filtered by band-pass filters with an adjustable tuning frequency. The transfer function of one band-pass filter is:
Bs
H ( s ) = ------------------------------2
2
s + Bs + o
o = 2f o
2-11-472
(EQ 1)
(EQ 2)
o
fo
.
0
Manual
blocking
5
Vc
OR
3
Va
4
Vb
Band-pass
filter
Firing
system
Equiangular
6 or 12 pulses
or
Equidistant
AC low voltage
detection
Tap changer
control
1.0
Id REF (pu)
3
Tap -
1.0
Vd REF (pu)
1
Rectifier
Alpha ord
Regulation
system
18
Gamma MIN (deg)
2
Vd
Gamma
1
Id
2
Tap +
DC fault Forced
delay
protection
(on rectifier)
Blocking
6
IaY
7
IbY
8
IaD
9
IbD
Commutation
failure
protection
(on inverter)
Gamma rate
2-11-473
If the voltage is lower than a specified threshold during a specified time interval, the Low
AC voltage detection function provides a low voltage flag. In the equiangular synchronization mode this flag is on and the calculated period T is not updated. It is rather maintained at
its past value in prevision of an eventual AC fault. Also, the DC fault detection is inhibited.
A falling edge delay (from True to False) is applied to the flag to ensure that it remains present
for a minimum period of time. Finally, low voltage detection is used in the DC fault protection described further ahead.
The function of the regulation system is to regulate the direct current or voltage by adjusting
firing angle , and to limit the inverter extinction angle to a minimum value.
min mode
voltage
Voltage
reference
Voltage regulation
mode
min mode
Voltage
margin
V
Current compensated
mode
Current regulation
mode
Current regulation
mode
I
Current margin
rectifier
inverter
Figure 11 - 7
2-11-474
current
Current
reference
Idref reel
Vd
Idref=1.0
Idref=0.8
1.0
Vd
Vdf
Vdf
Td = 0
Tm
Idref reel
Idref min
Idref=0.3
Idref mina
Vdfmin
Idref
Vdf1pu
Vdf
2-11-475
T = T d = 0 when Vd decreases;
In this way, the current reference falls immediately when the voltage drops, but increases
more slowly when the voltage rises. This allows for quick but controlled recovery of the direct power transit.
The typical values of the following adjustable parameters are:
2-11-476
The functional diagram of the controller is shown in Figure 11 - 9. This pole control function
is the same for the rectifier and the inverter.
Limiter
limiters
before
Commutation failure
detector and
limiter
Linearization
Kp,I
Kp,V
G()
err Vd
err Id
Ki,V
Ki,I
Regulator
PI
Regulator
PI
(Id)
(Vd)
DC voltage reference
DC current (converter)
DC current reference
Firing angle
Vd
Vdref
Vdref
Id
Idref
Idref
+
Vdref
+
Vdref
1
------------------------------------------- ( 1 + 1 s ) ( 1 + 2 s )
Idref
Idref
Id
Vd
LCDT
VDCOL
1 ------------------1 + 1 s
+
+
1 ------------------1 + 0.2 s
dV
dI
V/I
K
H ( s ) = K i 1--- + T p G ( ) = -----i + K i T p G ( )
s
s
(EQ 3)
where
2-11-478
G()
G()
1.0
sin ( 20 )
-----------------sin ( )
sin ( 20 )
-----------------sin ( 60 )
20
160
40
140
60
120
limits
On the rectifier side, is limited between two adjustable values. The typical limits are:
min rec = 5
(EQ 4)
(EQ 5)
2-11-479
(EQ 6)
(EQ 7)
where
Note that
min + = min
11.1.15 () limitation
(EQ 8)
In addition to the limit on the value of , a limit is also imposed on the variation rate () of
as shown in Figure 11 - 11. On the rectifier side, is limited between two adjustable values.
The typical values are:
Note that in the equiangular synchronization system, Da is the difference between the current reference and the previous firing reference. In an equidistant synchronization system,
is the difference between the reference a and a value of a reflecting the position of
the oscillator phase (See section 11.1.5).
At the rectifier and the inverter, is within a value range where only the vertical coordinates are adjustable. The typical values for the ordinates (X-axis) are: [Da1, Da2, Da3, Da4]
= [90, 5, -10 and -5] (rectifier); [Da1, Da2, Da3] = [6, 1, -6] (inverter).
2-11-480
(deg)
90
1 6
25
5
10
1 1
30
115
40
60
Rectifier
Figure 11 - 11
6
Inverter
Limitation of
The values marked in Figure 11 - 11 are for illustration only, they can be adapted to the dynamic characteristic of a particular network. The purpose of imposing limits on is to:
reduce the risk of commutation failure particularly when the value of is high;
improve the stability of the control system in case of faults or other large perturbations.
The side effect of limiting the variation rate of is to slow down the response of the control
system.
11.1.16 Protection
system
Two protection functions are implemented in the control system: Protection for DC fault on
the rectifier and Protection for commutation failure on the inverter.
11.1.17 DC fault
protection
A fault in the DC power system is detected on the rectifier side when the following two conditions occur:
The DC voltage falls below a specified threshold for a period of time (adjustable);
No low AC voltage is detected on the rectifier side (characterizing a fault on the AC
side). This detection is done in the Low AC voltage detection function described earlier.
When a fault is detected on the DC side, the rectifier angle is forced to an adjustable value
greater than 90o so that the rectifier operates as an inverter to de-ionize the fault. This forced
is removed after an adjustable period of time. This operation will be repeated until the fault
is cleared or the converter is blocked by the protection system after the operation has been
repeated a number of times.
This function is implemented for simulating faults on the DC side. The function does not discriminate between the faults on the AC side of the inverter and commutation failures on the
inverter, both causing a drop in direct voltage. One way to disable the protection is to assign
a very large value to detection time parameter.
No action is taken on the inverter side since it is already in safe condition.
2-11-481
Detected Commutation
failure
ratemax
Figure 11 - 12
Td rate
Tm rate
rate
o
Parameters
----------------
Tm rate
Description
---------------Rise time
Td rate
Fall time
ratemax
Reduction of max
Variation of cf
T typical value
-------------------10ms
100ms
45o
The protection against commutation failure is provided on the inverter only. The reason is the
firing angle on the inverter side is large and, therefore, the inverter is more prone to commutation failures.
The detection of commutation failures is based on the following principle. In normal state,
the currents (in pu) on the AC side and on the DC side are nearly equal. A commutation failure creates instantaneously a short circuit on the DC side and the DC current increases quickly. The inverter then has a null voltage and hence, the current drops on the AC side.
Therefore, a commutation failure is detected if:
Id I ac > Tolerance
I ac < I ac cf
with, Tolerance = 0, 15 + 0, 1Id and
I ac comfail = 0, 65 pu
2-11-482
There are two ways to unblock the converters (e.g. following a persistent DC fault): manually
or automatically.
Manual unblocking of a converter is initiated by the operator and takes effect only when the
DC current is lower than a specified threshold (set at 0,10 p.u.). This current must then be
decreased by lowering the current reference. All the reference signals have a rate of change
limiter which limits their variation speed (adjustable).When the operator varies the reference,
the effective reference will follow, but at a speed limited by the rate of change limiters.
The automatic disabling takes effect immediately to protect the system. It is controlled by the
DC fault protection system.
When the converter is disabled (manually or automatically), the control system cancels the
firing pulses to the valves. Moreover, a constant delay angle is imposed permanently.
11.1.20 Enabling
(start-up)
Unblocking can only be done manually. To enable the converter, the user has to:
Set the current reference to zero;
Initiate the enabling order. Regular pulses will be sent to the thyristors (instead of
pulses from bypass thyristors).
Set the current or voltage reference to the desired value. After unblocking, the converter will adjust to this given value with a certain delay depending on the limits
imposed by the rate of change limiters. To maintain the current margin, the current
ramp on the rectifier cannot be slower than that of the inverter at start-up.
The converter transformers (rectifier and inverter) can be equipped with a tap changer.
2-11-483
Angle
Inverter
Up
=1
Down = 1
if
if
Up
Tap changer
Down
Up Area
Down=1
Angle ( or )
max angle
Range
min angle
Down Area
Figure 11 - 13
Up=1
The tap changer controller generates the Up or Down order sent to the tap changer of the converter transformer in order to maintain or angle in the range set by:
on the rectifier
(EQ 9)
on the inverter
(EQ 10)
If the angle is not within the range, an up or down request is generated and sent to the tap
changer in order to bring the angle back within the range (if the tap has not yet reached any
of the limits). The size of the range must be selected to avoid hunting, i.e. oscillation of the
angle between the Up area and the Down area. Usually:
Range = at least 1.5 x maximum variation of angle corresponding to a tap
The default range values (adjustable) are shown in the following table.
11.1.22 Description of
parameters
2-11-484
Angle
Min Angle
Max Angle
15
18
17
20
11.1.24 Converter
parameters
General parameters
Vd Base: Base for direct voltage (kV);
Id Base: Base for direct current (kA);
Vac Base (Ph-Ph): Rated AC voltage on the transformer primary (kV rms);
Synchro Bus: Name of the bus whose voltages are used to synchronize the firing system;
Line Bus (Vd Measure): Name of the bus connecting the converter and the DC line;
the direct voltage measurement is taken on this bus;
Converter transformer
Transfo name: Transformer label;
Leakage: Leakage inductance of converter transformer for star or delta winding on
valve side (henry);
Note : Used to determine the commutation resistance to calculate the and angles. It is
assumed that the leakage on the primary side is null and that no series inductance
is connected between the switching bus and the transformer. Otherwise, the primary leakages and/or series inductance will be brought back on the secondary side and
included in the leakage L.
/ Y (lagging = 0, leading = 1): Indicates the relative phase between secondary
windings of the transformer. If 0, the delta winding lags the wye winding; if 1,
the delta winding leads the wye winding.
11.1.25 Operating
modes
2-11-485
2-11-486
First order for Id (1): Time constant of the filter used in the current measurement (seconds);
Second order for Vd (1, 2): Time constants of the filter used in voltage measurement
(Seconds);
11.1.28 Band-pass
filters
(Synchronizati
on)
11.1.29 LCDT
<<VDCOL>>
function
11.1.31 Protection
2-11-487
Vac threshold: Voltage threshold used for low AC voltage detection (pu)
Detection delay: Detection delay for low AC voltage (seconds);
Fall delay: Minimal duration of flag for low AC voltage condition (Voltage lower than
Vca threshold) before the protection system start acting (seconds).
11.1.33 Disturbances
2-11-488
General parameters
Connection (series = Serial; delta = Delta);
Switch parameters
Switch type (Breaker, Ideal Switch, Thyristor,Diode, GTO+Diode): Specifies the
valve type that makes the converter;
Signal reset (Enable, Disable): Reset the default signal to zero.
Precision valve (Activ=Enable,Dsactiv=Disable)
Specific parameters
Rbov (Reverse break overvoltage): Highest value of reverse voltage across a valve.
Relevant only for diodes, thyristors and GTOs (volts);
Fbov (Forward break overvoltage): Highest value of reverse voltage across a
blocked valve. Relevant only for diodes, thyristors and GTOs (volts);
C_snubber: Snubber capacitance (farads);
R_snubber: Snubber resistance (ohms);
Tq: Turn-off time (seconds);
Ibreak: GTO maximum breakable current (amperes);
Th Roff: Open state resistance (ohms);
Th Ron: Closed state resistance (ohms);
Vf1: Forward voltage drop (volts);
Ihold: Holding current.
1.This parameter is used in the element switching logic. The forward voltage drop is not modeled.
2-11-489
2-11-490
2-11-491
2-11-492
2-11-493
2-11-495
This model represents the power component and the control system of a static compensator.
The power component consists of a thyristor controlled reactor (TCR inductive branch) and
three thyristor switched capacitors (TSC capacitive branches). The transformer is not modeled internally and must be added by the user.
The control system includes measuring, synchronization, regulation, distribution and firing
subsystems. Depending on the operation mode, the model allows to study step responses either for a voltage reference or a susceptance reference. This feature can be used to optimize
the regulator parameters.The thyristors can also be fired by signals generated from an external
source.
2-11-496
SVC Controller
B Static
Compensator
Icon and
Diagram
SV
U
I
2-11-497
Distribution Unit
Measuring Unit
Park
Regulation Unit
Regulator
PI
Vmes
Conversion
BCMT
Bp_tot
Bp_tot
Conversion to
Bs_tot
BICT
BICT
Linearization
Network Frequency
Phase-Lock
Loop
freq
Generation of
Firing Pulses
wt
(PLL)
Synchronization Unit
Firing Unit
CONTROL SYSTEM
Primary
Secondary
I
Network
POWER COMPONENT
2-11-498
BCMT
SVC Controller
L
R
C
Synchronization Unit
The synchronization unit consists of a phase-lock loop (PLL) applied to each voltage phase on the transformer primary. The PLL calculates the frequency and phase
angle required to fire the thyristors. Figure 11 - 21 shows a simplified diagram of
this unit. This type of synchronization has the advantage of being insensitive to harmonics and stable in frequency.
Slope
Limitation
1
-
2*PI
Average
Vpu
Regulator
1
s
PI
Low-Pass
Filter
Modulo
frequency
wt
2*PI
cos
2-11-499
Va
Park
Vb
Vc
Conversion
Frequency
-1
s
Vmeasured
Function
Delay n step
Variable Delay
(EQ 11)
K
Bp = Kp + -----i ( Umes Uref XsI )
(EQ 12)
Bp is the required susceptance on the primary side for regulation. The current I is
not measured but calculated using Bp and Umes. The response of the controller depends on the value of the gains. The integral gain determines the speed of the controller, while the proportional gain can be used to compensate for the delay in the
firing system.
Distribution Unit
The distribution unit receives the following input:
The leakage inductance of the transformer;
The signal Bp from the PI;
The states and values of each TSC capacitive and TCR inductive branch;
And the value of the hysteresis to apply at transition points.
From the primary susceptance Bp of the static compensator and the leakage inductance of the transformer, the susceptance Bs on the secondary side is calculated and
then represented as a parallel combination of the TSC capacitive and TCR inductive
branches.
Bs = Bind + Bcap
2-11-500
(EQ 13)
SVC Controller
The value of the capacitance Bcap produced by the parallel capacitive branches and
the value of Bind is given by the non-linear function:
2 + sin 2Bind = 2
---------------------------------------
(EQ 14)
The calculation of the equivalent impedance of the parallel TSC capacitive branches take into account the availability of the branches. Therefore, it is possible to operate in downgraded or degradation mode.
In order to avoid oscillations when the capacitors are switched, hysteresis is used at
transition points when the number of parallel TSC capacitive branches changes.
Firing Unit
The function of the firing unit is to send the firing orders to the thyristors of the different branches. To do this, it receives the following input:
Phase angle (t) of the synchronization voltage;
Firing angle ;
Firing order of the TSC capacitive branches.
Since the TCR inductive branch is controlled, the firing unit sends the t degree
pulses after the last zero-crossing of the synchronization voltage. Since the TSC capacitive branches are only switched and not controlled, their firing is always executed at the same time on the waveform, that is 90 degrees before the zero-crossing
of the voltage.
11.2.1 Parameters
A General
Parameters
Transformer Parameters
Name of primary XFO Bus: Name of the bus on the high voltage side of the static
compensator transformer;
Primary XFO V: Line-line rated voltage on the primary side of the transformer (kV
rms);
Secondary XFO V: Line-line rated voltage on the secondary side of the transformer
(kV rms).
Leakage: Leakage inductance of the primary winding of the transformer (pu/
100MVA);
vs Y (Lag, Lead): Specifies the connection of the transformer and the Delta windings lagging or preceding the Y winding.
2-11-501
A Reference
Parameters
B Operating Mode
Parameters
TCC mode: (On = synchronized firing of the TSC capacitive branches, Off = continuous firing);
Valve blocking and unblocking: (Deblock = valve firing enabled, Block = valve firing
disabled);
C Regulation
Parameters
D Protection
Strategies
Vmax: Maximum value of primary voltage (pu). Above this value, the static compensator is disabled;
Vmin_on: Minimum value of primary voltage (pu). Below this value, the static compensator is disabled;
Vmin_off: Minimum value of primary voltage (pu) required to enable the static compensator.
E AC Fault
Parameters
F Disturbance
Parameters
2-11-502
SVC Controller
H Power
Component
Parameters
The parameters of the elements in the compensator power component are the same for all four
branches.
General Parameters
Connections: Y ground; Y floating; Delta.
RLC Element Parameters
Branch reactor (H);
Resistance in parallel with branch reactor ();
Branch resistance ();
Branch capacitor (F).
Back-to-back Valve Parameters
Valve resistance when open ();
Valve resistance when closed ();
Threshold voltage (V);
Chopping current (A);
Snubber resistance ();
Snubber capacitor (F);
Reverse break overvoltage (V);
Forward break overvoltage (V).
11.2.3 List of
Available
Signals
2-11-503
2-11-504
SVC Controller
DelayImpInt_ label: Firing delay (as a fraction of calculation step) calculated by the
internal command of the static compensator
DelayImpExt_ label: Firing delay (as a fraction of calculation step) calculated by an
external command of the static compensator
DelayImp_ label: Firing delay (as a fraction of calculation step) sent to the static compensator
DelayImpUsed_ label: Firing delay (as a fraction of calculation step) used by the static
compensator
V_Ref_label: Voltage reference for the controller;
B_Ref_label: Susceptance reference for the controller;
Slope_label: Slope of the controller;
Deblocked_label: Signal specifying that the firing pulses are blocked or not.
TCC_Mode_label: Signal specifying that the TCC mode is enabled or disabled
ManualMode_label: Signal specifying that the manual mode is enabled or disabled
Period_label: Period of the network (inverse of the frequency)
Frequency_label: Network frequency
Alpha_TCR1_label: Firing angle of the TCR inductive branch
wtphase_label: Phase angle of synchronization voltages
V_Prim_label: Voltage measured by the system
V_Error_label: Input of PI regulator of regulation unit
B_SVC_label: Susceptance seen from primary side of transformer
B_TSC_label: Capacitive susceptance required
B_TCR_label: Inductive susceptance required
A Static
Compensator
Control Panel
Figures 11 - 23 to 11 - 25 show respectively the first, second and third pages of the static compensator control panel.
2-11-505
2-11-506
SVC Controller
2-11-507
Example:
Figure 11 - 26 shows the network used in this example. The test
consists in applying a rising ramp from 0.75 to 1.25 pu to the source
2-11-508
SVC Controller
2-11-509
1,2
1,15
1,1
Voltage (pu)
1,05
1
0,95
0,9
0,85
0,8
0,75
-6
-5
-4
-3
-2
-1
2-11-510
The parameters for both types of static compensator are identical to those shown in section
11.2.1.
CMD12phase_label: Firing pulse in the positive valve;
CMD21phase_label: Firing pulse in the negative valve;
Iphase_label: Current across the branch;
STATE12phase_label: State of the positive valve;
STATE21phase_label: State of the negative valve;
VCAPphase_label: Voltage across the capacitor (volt);
DelayImpInt_ label: Firing delay (as a fraction of calculation step) calculated by the
internal command (not used)
DelayImpExt_ label: Firing delay (as a fraction of calculation step) calculated by an
external command
2-11-511
2-11-512
Figures 11 - 30 and 11 - 31 show respectively the TCR inductive branch and TSC capacitive
branch control panels.
2-11-513
Example:
2-11-514
2-11-515
1,2
1,15
Voltage (pu)
1,1
1,05
1
0,95
0,9
0,85
0,8
0,75
-4
-3
-2
-1
2-11-516
2-11-517
2-11-518
Chapter 12
VARIOUS NETWORK ELEMENTS
Frequency Measure
Frequency Measure
Properties:
Determines the fundamental frequency of a bus voltage signal.
Hz
Features:
Can be used with any bus in the
network using a basic frequency.
Implementation:
Basic Frequency: Normal fundamental frequency of the network used as the main frequency
of the bandpass filter (Hz)
B Bandpass Filter
Parameters
C List of Available
Signals
2-12-519
D Frequency
Measure Control
Panel
The following figure shows an example of the parameters used for a 60 Hertz test.
The block diagram of the frequency measure element is shown in the next figure. The bus
voltages are read and filtered, then the time between two zero crossings of these voltages is
calculated. When a voltage rise is detected, a counter is reset and increments until the next
rise. The mean of three calculated periods is then determined and inverted to obtain the frequency. The variables used in the block diagram are defined as follows:
Va, Vb, Vc: Bus voltages;
Vaf, Vbf, Vcf: Filtered voltages;
FB: Basic frequency;
LB: Filter bandwidth;
Num: Parameters for the numerator polynomial of the filter;
Den: Parameters for the denominator polynomial of the filter;
Ra, Rb, Rc: Signals to reset the counters used to calculate the period;
Pa, Pb, Pc: Calculated periods for three phases;
f: Fundamental frequency.
2-12-520
LB
FB
Calculation
of transfer
function
Num
Den
Va
Vb
Vc
Bandpass
Filter
Vaf
Vbf
Vcf
Figure 12 - 3
Zero
Crossing
Detection
Ra
Rb
Rc
Pa
Calculation
Pb
of
periods
Pc
Inverse
of
mean
Digital Output
Digital Output
DO
Properties:
Tool to time-program digital sequences.
DO
Features:
In all, four elements can be
programmed.
The user can choose
between seconds, milliseconds or cycles
Implementation:
2-12-521
B Operated Phase
Specifies which breakers of phase A, B and C and the ground breaker can change state if the
data acquisition is done with the switching activated in Spectrum. In order for a change of
state to occur, the operating times (see below) must be T1<T2.
C T1 Operating
Time
Relative time (related to synchronization) when the state of a phase or ground breaker changes.
D T2 Operating
Time
Relative time (related to synchronization) when the state of a phase or ground breaker returns
to a steady state position.
E List of Signals
Available
F Digital Output
Control Panel
2-12-522
Digital Input
Digital Input
ACQ
D/ D
Properties:
Digital input element acquires external digital signals from the input/output cards
ACQ
Features:
48 digital signals can be
acquired;
Digital input element is
connected to a network
bus.
Implementation:
2-12-523
Analog Input
Analog Input
ACQ
A/ D
ACQ
Properties:
Analog input element acquires analog signals from the input/output
cards.
Features:
32 analog signals can be
acquired;
Analog input element is
connected to a network
bus.
Implementation:
The current and voltage measure elements are used to measure the current and voltage of network buses and to connect voltage or current output to Hypersim control blocks. The following table shows the different elements and parameters.
Parameters
Description
Measures
three-phase
voltages
Palette
Element
Input
B1
B2
V3
V
Measures
three-phase
currents
a
b
c
B1
I3
a
b
c
B2
2-12-524
Outpu
t
Nam
e
l.init.v
a
a
b
c
Ga
Gb
Gc
1.0
1.0
1.0
a
b
c
Ga
Gb
Gc
Rpro
be
1.0
1.0
1.0
1.0e-3
Function and
conditions
Measures voltages Va, Vb, Vc of
bus B
a = Va * Ga
b = Vb * Gb
c = Vc * Gc
Measures currents Ia, Ib, Ic
flowing from B1to B2 by
inserting a resistance R
a = Ia * Ga
b = Ib * Gb
c = Ic * Gc
Disconnection Element
Measures
single-phase
voltages
B
V
V
Measures
single-phase
currents
1.0
B1
B2
G
Rpro
be
1.0
1.0e-3
B1
I
B2
Disconnector Element
Disconnect Element
Properties:
Disconnector opens or closes a
connection in the network
between two elements.
Features:
Disconnection possible in
Edition or in Simulation
Mode.
Note : To disconnect an element in simulation
mode, select a breaker
element.
Implementation:
2-12-525
B Disconnection
Control Panel
2-12-526
Chapter 13
HYPERSIM WAVE FORM PLAYBACK MODEL
A Introduction
The wave form playback model is a user-friendly interface compatible with Hypersim Version 9.0. The playback model is a block used to play wave forms in order to validate the control and protection equipment of power grids. It allows to play back, on analog or digital
channels, arbitrary wave forms originating from files in COMTRADE format.
The COMTRADE (Common Format for Transient Data Exchange) format is a IEEE standard
used to facilitate the exchange of digital data from transient phenomena such as power grid
faults, test cases or simulation cases. As this format is widespread, the wave forms can originate from different sources, such as:
a recorder (protection relay, measuring device);
a digital or analog network simulator;
a signal processing software (e.g. SCOPEVIEW, SPECTRUM);
any other device or software exporting digital signals in COMTRADE format.
B Main Features
C Main
Components
In order to provide an overview of the playback system, this section briefly describes the main
components of the system.
The distinct modules of the playback system are:
the user interface of the playback model in Hypersim;
the CNTR test automation software (option);
the playback hardware (Alphi PCI card, 32D/A - 48 DIO).
The following diagram shows the function of the different modules and their relationships.
2-13-527
HYPERSIM PLAYBACK
SCOPEVIEW
MODEL
TEST VIEW
(CGDEV)
PCI
PLAYBACK
ALPHI 32D/A 32 DO
The parameters of the PLAYBACK model allow to change the behavior of the software when
wave forms are played. More specifically, these parameters are used to (see Figure 13 - 4):
enter the name of the directory and of the COMTRADE file. Activate Load File; the
signal in the file will be loaded in the analog/digital output page.
select the operating mode (transient or steady-state);
add a number of steady-state cycles at the beginning and end of signals;
if needed, enable the start/stop button for emergencies;
select the type of synchronization required: internal with the current Hypersim POW or
external with an analog signal or a logic command signal (rising front);
select a reference signal to measure the first steady-state cycle or to set the frequency of
the signal.
E Operating Modes
The software can play back wave forms in two modes: transient or steady-state.
In transient mode, the signals are played back entirely.
In steady-state mode, the software automatically detects a permanent cycle at the beginning
of each analog signal and plays back this cycle indefinitely. For digital output, the software
takes the first point as reference and plays back this point indefinitely.
When using the steady-state mode, make sure the signals have at least two steady-state cycles
at is beginning.
2-13-528
The Prefault and Postfault fields allow to specify the number of steady-state cycles to add at
the beginning (Prefault) (before the fault or the transient phenomenon) and the end of the
wave forms (Postfault).
F Reference
Frequency for
Steady-State
Mode
A parameter allows to select from a list of analog signals the reference signal used to measure
the first steady-state cycle or to set the frequency.
G Signal Output
Rate
The output rate of signals to play back is based on the execution step of the Hypersim simulation (TimeStep parameters). Hence, if the TimeStep is different from the wave form rate, a
resampling of the original wave forms will take place.
The software interpolates or decimalizes the original signal. In both cases, a message warns
the user.
According to his needs, the user can launch ScopeView to execute a resampling of his
COMTRADE file in order to play back the file using the same rate as with Hypersim.
H Updating
Parameter
Changes
I Playback
Synchronization
A parameter in the control panel allows to select the synchronization mode for the transient
mode. The internal synchronization mode operates with the POW and the external synchronization mode with the T input signal.
In the internal playback mode and in the steady state, there is no playback synchronization
in the steady-state mode.
But, if the internal mode is selected, the acquisition with ScopeView will launch an internal
signal sent to the playback block and the transient mode is then executed using the prefault
and the postfault values using also the prefault and the postfault cycle values.
For the external mode, if the input of the T signal changes from 0 to 1 (rising wavefront), the
transient mode is then launched immediately.
J Hypersim
Graphic
Interface
2-13-529
2-13-530
2-13-531
2-13-532
2-13-533
2-13-534
Part 3
Hypersim control blocks
2-535
2--536
Chapter 1
CONTROL BLOCK LIST
The Hypersim simulator interface offers a library of models to design control systems. This
function is available directly through the schematic editor 1. To access the HYPERSIM control blocks and the network models, click on the tool palette. (See Figure 1 - 1).The control
blocks are defined in five categories.
3-1-537
3-1-538
Table 1:
1 - 2 Math Functions
2 input adder with gain
Multiplier
Window averaging
Division
Gain
Absolute value
Sine
Cosine
Tangent
ArcSin
ArcCos
ArcTan
Common exponents
Natural exponents
Common logarithm
Natural logarithm
Maths functions
F Mod
Square root
S Transfer function
Z Transfer function
3-1-539
3-1-540
Table 2:
1 - 3 Logic Functions
Two input AND gate
Two input NAND gate
Two input OR gate
Two input NOR
Exclusive OR gate
Exclusive NOR gate
Inverter NOT gate
Dual signal comparator
Timer on level detector
Single level comparator
Counter
Delay on ON
Rising slope detector
Falling slope detector
Region detectors
12 input multiplexer
6 input multiplexer
3-1-541
3-1-542
Table 3 :
1 - 4 Non-linear Functions
Fix limiter
Two input maximum
Three input maximum
Four input maximum
Two input minimum
Three input minimum
Four input minimum
Delay
Non-linear gain
AM-FM-PM modulator
Falling ramp
Rising ramp
Variation rate limiter
Two input multiplexer
Dead Zone
Buffer with hysteresis
One step delay
PWM modulator
Sampler
3-1-543
3-1-544
Table 4:
1 - 5 Sources
Fix point constant
Floating point constant
Random wave generator
Pulse train generator
Square wave generator
Triangular wage generator
Sinus generator (amplitude)
Sinus generator (phase)
Simulation time
3-1-545
3-1-546
Tableau 5 :
1 - 6 Miscellaneous Functions
Parks Transformation
Inverse Parks Transformation
Conversion of floating point into fixed point
Conversion of fixed point into floating point
Initial value and its duration
Create a block with desired number of I/O connectors
Transceiver
Transceiver
Frequency measurement of 3-phase signals
Playback
3-1-547
3-1-548
Function Details
Chapter 2
FUNCTION DETAILS
The following tables give details for each available control block.
Table A: 21 Math functions
Paramtres
Description
Palette
Element
Two input
summation
with gain
u1
u2
Three input
summation
with gain
u1
u2
u3
Four input
summation
with gain
u1
u2
u3
u1
u2
u1
u2
u3
u1
u2
u3
u4
u4
u1
Multiplier.
Divisor.
Input
u2
u1 u1
.
.
Gain.
Gain
Absolute
value
Abs
Sin.
Sin
Cos.
Cos
u2 u2
Gain
Abs
Sin
Cos
Output
Functionality and
conditions
Name
Initial
value
g1
g2
1.0
1.0
g1
g2
g3
1.0
1.0
1.0
g1
g2
g3
g4
1.0
1.0
1.0
1.0
y = g1*u1 + g2*u2
u1
u2
y = u1 * u2
u1
u2
y = u1 / u2
y = u if u >= 0
y = -u if u < 0
y = sin (u)
u is in degrees
y = cos(u)
u is in degrees
1.0
y=u*g
3-2-549
Function Details
Palette
Element
Input
Output
Name
Tan.
Tan
Tan
ArcSin.
ArcSin
ArcCos.
ArcCos
u ArcCos y
ArcTan.
ArcTan
eu
eu
exp 10
u
10
u
10
log
(decimal
logarithm)
log
log
ln
(natural
logarithm)
ln
u1
ln
exp natural
ArcSin y
ArcTan y
Functionality and
conditions
Initial
value
y = tan(u)
u is in degrees
y = Arc sin(u)
y is in degrees
y = Arc cos(u)
y is in degrees
y = Arc tan(u)
y is in degrees
y = eu
y = 10u
y = log(u)
y = ln(u)
Math function :
Math
Math
Type
0
If Type = 0
function ceil, y = ceil(u)
Math function
If Type = 1
function floor, y = floor(u)
Modulus
3-2-550
Mod
u1
u2
Mod
u1
u2
u1 / u2 Modulus.
y = Mod (u1, u2)
Function Details
Palette
Element
Input
Output
Name
Square root
H(s)
u H(s) y
S transfer
function
Functionality and
conditions
Initial
value
y =
n
m
a
b
0
1
1
1, 1
Y(s) = H(s).U(s)
H(s)=[a0 + a1.s +..an.sn]/
[b0 + b1.s + .....bm.sm]
a is an n dimension vector, b is an m
dimension vector.
Conditions :
n >= 0
m >= 0
H(z)
u H(z) y
Z transfer
function
n
m
a
b
0
1
1
1, 1
Y(z) = H(z).U(z)
H(z)=[a0 + a1.z +..an.zn]/
[b0 + b1.z + .....bm.zm]
a is an n dimension vector, b is an m
dimension vector..
Conditions :
n >= 0
m >= 0
hi
Transfer
function with
dynamic
limits
H(s)
lo
H(s)
u
lo
hi
n
m
a
b
0
1
1
1, 1
Y(s) = H(s).U(s)
H(s)=[a0 + a1.s + .. +an.sn]/
[b0 + b1.s + .....bm.sm]
a is an n dimension vector, b is an m
dimension vector..
y is limited between lo et hi
Conditions :
n >= 0
m >= 0
lim2
H(s)
S transfer
function with
internal limits.
H(s) y
lim1
n
m
a
b
lim1
lim2
0
1
1
1, 1
-1
+1
Y(s) = H(s).U(s)
H(s)=[a0 + a1.s + .. +an.sn]/
[b0 + b1.s + .....bm.sm]
a is an n dimension vector, b is an m
dimension vector..
y is limited between lim1 et lim2
Conditions :
n >= 0
m >= 0
lim1 < lim2
3-2-551
Function Details
Palette
Element
H(s)
reset
init
Input
u
reset
init
lim2
H(s)
state
Output
y
state
lim1
Name
Initial
value
n
m
a
b
lim1
lim2
0
1
1
1, 1
-1
+1
Functionality and
conditions
Y(s) = H(s).U(s)
H(s)=[a0 + a1.s + .. +an.sn]/
[b0 + b1.s + .....bm.sm]
a is an n dimension vector, b is an m
dimension vector..
y is limited between lim1 et lim2
Conditions :
n >= 0
m >= 0
lim1 < lim2
S transfer
function with
internal limits
and reset
t
t-T
u
f
t-T
u
f
fBase
nCycle
60
1
y =
(t T)
Conditions :
fBase > 0
nCycle > 1
3-2-552
T = nCycle /
fBase
t = actual time
Function Details
Palette
Element
Two input
AND gate
u1
u2
Input
Output
u1
u2
u1
u2
u1
u2
u1
u2
u1
u2
u1
u2
u1
u2
yH
yL
Parameter
Functionality and
conditions
AND logic block
y = u1.u2
u1
u2
Two input OR
gate
u1
u2
y = u1.u2
OR logic block
y = u1+ u2
Two input
NOR gate
u2
Exclusive OR
gate
u1
u2
y = u1 + u2
Exclusive
NOR gate
Inverter
Dual signal
comparator
u1? u2
u1
u2
u1? u2
yH
yL
y = u1 u2
yH = 1 if u1 >= u2
= 0 if not
yL = 1 if u1 < u2
= 0 if not
a
Timer on level
detector
u2
u
on
off
u
on
off
Ts
Td
a
0.01
0.02
0.0
if u becomes < a,
y = on after Ts for the Td duration.
if u becomes > a,
y = off , if not it stays on .
Conditions :
Ts > 0
Td > 0
3-2-553
Function Details
Single level
comparator
Palette
Element
u? A
u? A
Output
cnt
reset
cnt
n1...n2 y
reset
n1....n2
Input
Functionality and
conditions
Parameter
A
yH
yL
0
1
-1
n1
n2
start
circ
0
5
0
1
Counter
If u A
If u < A
y = yH
y=yL.
Td
Ton
0.0
0.01
1
0
1
u
y
Td
Ton
Delay on ON
Conditions
Td >= 0
Ton > 0
Rising slope
detector
1e-3
Falling slope
detector
1e-3
Region
detectors
3-2-554
?
?
?
?
uL
uH
yL
yM
yH
-1
1
-1
0
1
If u < uL,
y = yL
If uL u uH , y = yM
If u > uH,
y = yH
Conditions :
uL < uH
Function Details
Palette
M12
12 input
multiplexer
M6
6 input
multiplexer
Element
P1
P2
P3
P4
P5
P6 MUX P
P7
P8
P9
P10
P11
P12
P1
P2
P3 MUX
P
P4
P5
P6
Parameter
Functionality and
conditions
Input
Output
P1
P2
P3
P4
P5
P5
P6
P7
P8
P9
P10
P11
P12
P1
P2
P3
P4
P5
P5
P6
3-2-555
Function Details
Palette
Element
Input
lim2
y
Output
lim1
Fix limiter
Name
Initial
value
lim1
lim2
-1
+1
Functionality and
conditions
Two input
maximum
MAX
u2
Three input
maximum
MAX
Four input
maximum
MAX
Two input
minimum
MIN
Three input
minimum
MIN
Four input
minimum
MIN
3-2-556
u1
MAX
u1
u2 MAX
u3
u1
u2 MAX
u3
u4
u1
u2
MIN
u1
u2 MIN
u3
u1
u2
u3 MIN
u4
u1
u2
u1
u2
u3
u1
u2
u3
u4
u1
u2
u1
u2
u3
u1
u2
u3
u4
Function Details
Palette
Element
Input
Output
Delay
Name
Initial
value
Skip
T
Tmax
init
1
1e-3
0.1
0.0
Functionality and
conditions
y = e-sT
T round-off to the calculation step
multiple
Conditions :
Skip > 0
T > 0
init > 0
NDelay > NHist
Non-linear
gain
n
ytab
utab
3
-1,0,1
-1,0,1
AM-FM-PM
modulator
f AM
p FM
a PM
AM
FM
PM
f
p
a
y = a sin(2*pi*f*t + p)
u1
u2
y2
0
1
1
y
y2
u1
Falling ramp
u2
if u < u1, y = y2
if u1 u u2 , y lowers toward
0 as follows:
u u1- y2
y = y2 ----------------u2 u1
if u > u2, y = 0
Conditions :
u1 < u2
3-2-557
Function Details
Palette
Element
Input
Output
Name
Initial
value
u1
u2
y2
0
1
1
Functionality and
conditions
y
y2
u1
u2
if u < u1, y = 0
if u1 u u2 , y rises
toward y2 as follows:
Rising ramp
u u1- y2
y = ----------------u2 u1
if u > u2, y = y2
Conditions :
u1 < u2
limUp
limDn
1
-1
Variation rate
limiter
Mpx2
Two input
multiplexer
u1
u2
sel
sel
u1 MPX y
u2
If sel = 0, y = 0
If sel = 1, y = u1
If sel = 2, y = u2
Conditions
sel = 0, 1, 2
Dead zone
Buffer with
hysteresis
One step
delay
3-2-558
Dead Zone
Start
End
-1.0
1.0
uH
uL
0.7
0.1
1/z
u
u
1/z
yn = un-1
Function Details
Palette
PWM
Element
s
c
PWM
p
d
Input
s
c
Output
p
d
Name
Initial
value
dS
dC
0
0
PWM
modulator
Functionality and
conditions
Samp
Sampler
s
u Sample y
u
s
opt
3-2-559
Function Details
Table D: 24 Sources
Parameters
Description
Palette
Inpu
t
Element
Outpu
t
Name
Initial
value
Functionality and
conditions
Fix point
constant
1.0
y = K , K is a whole
Floating point
constant
1.0
y = A , A is a real number
Random wage
generator
Rand
P.A.
U/G
germ
Min
Max
Mean
Var.
0
5
0.0
1.0
0.0
1.0
P.T.
U/G
germ
Min
Max
Mean
Var.
0
100
0.01
0.02
0.0
0.02
Rand
Impulsion
train generator
f
t0
A
opt
100
0
1
0
f : frequency
t0: impulsion train start time
Amplitude = A if opt = 0
Amplitude = A/T (energy)
if opt = 1.
T: calculation step
Conditions :
f>0
t0 > 0
opt = 0 or 1
3-2-560
Function Details
Table D: 24 Sources
Parameters
Description
Palette
Inpu
t
Element
Square wave
generator
Outpu
t
Name
Initial
value
f
A
P
D
100
1
0
0.5
Functionality and
conditions
To
Th
f : frequency = 1/T
A : amplitude
P : phase = (To/T)*360
D (duty cycle) = Th/T
Conditions :
f>0
0 <= P <= 360
0<D<1
Triangular
wave
generator
y
y
f
A
P
D
100
1
0
0.5
To
A
Th
T
f : frequency = 1/T
A : amplitude
P : phase = (To/T)*360
D (duty cycle) = Th/T
Conditions :
f>0
0 <= P <= 360
0<D<1
Sinus
generator
(amplitude)
y
y
f
A
P
100
1
0
P -
y = A sin 2 ft + -------
360
f : frequency.
A : amplitude.
P : phase in degrees
Conditions :
f>0
0 <= P <= 360
3-2-561
Function Details
Table D: 24 Sources
Parameters
Description
Palette
Sinus
generator
(phase)
Element
y
ang
<
Inpu
t
Outpu
t
y
ang
Name
Initial
value
f
A
P
100
1
0
Functionality and
conditions
P
y = A sin 2 ft + ---------
360
f : frequency
A : amplitude
P : phase in degrees
Conditions :
f>0
0 <= P <= 360
Simulation
time
3-2-562
y
y
y = simulation time
Function Details
ABC->DQ
Conversion
DQ->ABC
Conversion
Float-Integer
Conversion
Integer-Float
Conversion
Palette
Elements
a
b
c
p
ABC
DQ
DQ
ABC
d
q
p
DQ b
ABCc
F To I
I To F
d
ABC
DQq
Outpu
t
Name
Functionality and
conditions
Initial
value
s
a
b
c
p
d
q
d
q
p
a
b
c
a = d.cos(p) - q.sin(p)
b = d.cos(p - 120)
- q sin(p - 120)
c = d.cos(p + 120)
- q.sin(p + 120)
To i
To f
Input
Input port
In
In
Output port
out
Initial value
and duration
INIT
out
INITy
Vini
Tini
0.0
0.0
Condition
Tini >= 0
.
x=Ax
u1
u2
u3
u4
x=Ax+Bu
y=Cx+Du
Variable states
system
y1
y2
u1
u2
u3
u4
y1
y2
....
nx
nu
ny
A
B
C
D
1.0
1.0
1.0
1.0
1.0
1.0
1.0
x = Ax + Bu
y = Cx + Du
A dimension = nx.nx
B dimension = nx.nu
C dimension = ny.nx
D dimension = ny.nu
Conditions :
nx, nu, ny > 0
3-2-563
Function Details
Palette
Float
transmitter
Elements
Input
Outpu
t
Name
Initial
value
s
Functionality and
conditions
This block type allows float signal exchange between two tasks.
float
Int
Transmitter
u
int
3-2-564
Part 4
Advanced Hypersim Functions
2-565
2--566
Chapter 1
MATLAB AND SIMULINK MODELS
Dynamic Loads
Properties:
- Hyperlink allows the integration of power systems designed
under Matlab/Simulink with
Hypersim operations.
Main features:
- Process models designed under
different Matlab/Simulink versions.
- Hyperlink system can use, in
Hypersim, code generation
with older Simulink versions.
- Many Simulink models can
coexist in the same Hypersim
version
- Many items of the same model
can be used in an Hypersim
program.
- Different models used in the
same diagram can use different
solvers.
- See Section 1.3 below.
1.2 INTRODUCTION
Using HyperLink1 and the RTW2 code generator, it is possible to integrate power systems
designed under Simulink3 with Hypersim operations. In this text, these systems will be called
Simulink models.
4-1-567
The Simulink models can be integrated with some Hypersim elements that can use them as
control blocks. It is also possible to create a HyperLink element connected to a power system
bus when a Simulink model must be connected to many elements or control blocks. Finally,
there is a Simulink control block that also allows to use a Simulink model and whose input/
output can be connected graphically, as is the case for all other control blocks.
4-1-568
At least, in real-time.
Matlab
Simulink (RTW)
5.2
2.0
5.3
3.0
6.1
3.0.1
7.1
4.0
4-1-569
4-1-570
Code Generation
Code
Generation of
a Simulink
Model
Start Simulink and build a model or open an existing model. Then, in the Simulink model
window, select
Tools->Real-Time Workshop->Options.... See Figure 1 - 1.
4-1-571
a)
b)
c)
d)
Still in Solver Options, select the integration method. If there are no continuous blocks in the
Simulink model, choose the discrete option;
1.Note that all the Simulink windows are those of version 4.0.
2. Or a full integer multiple of the Hypersim step size when the simulation is executed in differed
time.
4-1-572
Code Generation
(e
f)
g)
h)
i)
(k
j)
If not selected, select External mode in the Options window. This selection is compulsory to
avoid errors when generating code.
The following steps show how to include a Simulink model, version 3.0.1 (or any more recent
version), in Hypersim, using a Simulink block (control block).
The window below is displayed. It allows to choose the Simulink model to use. In the list,
locate the directory with the Simulink model, select it and click Apply.
1.Valid only for versions 4.0 and more recent of Simulink (Matlab 6.0). If you have a version
older than 4.0, the code will be generated directly in the model directory.
2.Hypersim element, connected to a bus, and allowing to establish a link with a Simulink model.
3.Hypersim control block allowing to establish a link with a Simulink model.
4-1-574
The block will appear in the user diagram and will have a number of input/output connectors
depending on the model used. The following example shows the model voltsousmlk
:.
voltsousmlk
> In1 Out1 >
> In2 Out1 >
> In3
> Gain Out1 >
Connect graphically the input/output of the block to the connectors of the required blocks or
elements using the usual Hypersim connection method.
Continue to draw your power system. At the end, go in Simulation mode to analyze the power
system, generate the code and execute the actual simulation. Later in this chapter, a section
will show how to change some parameters of the Simulink model during simulation.
1.10.2 Using a
HyperLink
Power System
Element
The following steps describe how to integrate a Simulink model using a HyperLink element
(without graphic connection of the input/output) following the Hypersim basic method. Such
an element is still required, since the other Hypersim elements do not have all the connectors
providing access to their internal signals. Moreover, when a Simulink model has numerous
input/output connectors, it is often more practical to use a connections table to link the Hypersim signals, as shown here.
4-1-575
an element that can integrate with a HyperLink control block. For now, these elements are all
the control and switching elements (CONTROLLERS+SWITCHES), the voltage source and
the current source of the DC motor.
B
Connect the HyperLink element or the element that can be controlled by a Simulink model,
to a bus.
Edit the label of the power system element to provide it with a meaningful name.
Edit the parameters of the HyperLink element (Figure 1 - 5). There are three such parameters
for now. The first specifies the name of the directory with the Simulink model, the second
provides the name of the model as defined in Simulink and the third represents the measured
execution time of the Simulink model. This is used by the task mapper to distribute the tasks
to different processors for a real-time or accelerated simulation.
Proceed with the analysis of the power system. Hypersim will detect the presence of Simulink
models. For each Simulink model detected, a window will be displayed to allow the user to
edit the .info file serving to link the input/output of the Simulink model with the Hypersim
signals. If the links already exist, the window will not be displayed.
4-1-576
Edit the .info file of the model to link the labels of the input/output of the Simulink model
with the Hypersim signals.
Each element/model combination has its own info file whose name is a concatenation of
the following elements: hk, HyperLink version, Element label, Simulink model
name and .info. Hence, for the model gain used in the element ABC, the name of the
info file will be hk7.1_ABC_gain.info in version 7.1 of HyperLink.
In the voltage source example used, the file info hk7.1_GeQD_voltsousmlk.info will be
generated in the HyperLink code generation directory and will be as follows:
# HyperLink 7.1 -- Octobre 2000
#
# hk7.1_GeQD_voltsousmlk.info
#
# Date de generation du fichier: 01/01/24
#
# --------------------------------------------------------------------------# HYPERSIM_STEP_SIZE = 5e-05
# --------------------------------------------------------------------------#
# Informations concernant le modele Simulink "voltsousmlk" version 6.0 de Malab
#
# Ce fichier contient:
#
# 1- Certains parametres du modele
# qui serviront lors de la generation de code dans Hypersim.
#
# 2- La correspondance entre les noms des entrees/sorties du modele Simulink
# et les noms des signaux dans Hypersim.
# A la creation du fichier, les champs definissant les noms des signaux
# Hypersim ne contiennent que des "-" et le type des signaux est "double"
# par defaut (colonnes 4 et 5).
# Vous devez editer ce fichier et remplacer les "-" par les noms
# des signaux Hypersim appropries et remplacer le type "double"
# par defaut par le type reel du signal dHypersim
# (choix de "int" ou "double")
#
#---------------------------------------------------------------------------#
# Parametres:
#
# Les champs modifiables sont precedes de la lettre "M"
#
# MODEL
: Nom du modele
# MODEL_PATH
: "Path" du modele
# MODEL_CHECKSUM
: "Checksum" du modele
# MODEL_STEP_SIZE
: Pas de calcul du modele
#
# NB_PAR_TOT
: Nombre total de parametres
4-1-577
4-1-578
Any line beginning with # is a comment. The file consists of three lists INPUTS, OUTPUTS and SCOPES (in bold in the list above), showing respectively the labels for the inputs,
the outputs and the scopes of the model, accompanied by the corresponding1 Hypersim signals. The lists contain four fields (3 for the scopes) separated by tabs or spaces.
The first field contains an order number (0,1,2...), the second is the name of the block2 in the
Simulink model, the third (modifiable) contains the name of the Hypersim signal to connect
and the fourth specifies the type of signal in Hypersim.
During the first analysis, if the Simulink model has just been added to the power system, the
Hypersim signals to connect to the model are not yet defined and the corresponding fields
have a dash (-, as above). The signal type is double by default (except for scopes which
do not have a specified type).
IMPORTANT
Replace the dashes by the name of the Hypersim signals
to be connected with the different inputs and outputs.
Also change the type from double to int for control
signals.
1.
2.
Note that in the case of scopes, the names of the signals are the same as the Simulink labels.
Block of Import, Export and Scope types.
4-1-579
(a)
(b)
4-1-580
MODEL=voltsousmlk
MODEL_PATH=/pcnet/murere/HYPER_SCH/hyplnk
MODEL_CHECKSUM=3505657059U,3506833197U,1470380308U,776400657U
MODEL_STEP_SIZE=5e-05
NB_PAR_TOT=10
NB_INPUTS=3
INPUTS={
0
In1 V_BaMM_a
double
1
In2 V_BaMM_b
double
2
In3 V_BaMM_c
double
}
NB_OUTPUTS=3
OUTPUTS={
0
Out1 VintExt_GeQD_a double
1
Out2 VintExt_GeQD_b double
2
Out3 VintExt_GeQD_c double
}
NB_SCOPES=3
SCOPES={
0
Scope Scope
1
Scope1 Scope1
2
Scope2 Scope2
}
The interconnection of two HyperLink elements is a special case. Usually, the names of the
signals of HyperLink elements are those of the Hypersim signals (in the.info file) related to
the input/output identifiers of Simulink models. For example, if an A Hypersim element defines an output voltage signal, and a B Hypersim element defines a command signal,
the HyperLink element will have to give the name voltage to its input signal, which will
refer to the signal of A having the same name. Moreover, the element will have to give
command as its output signal name, which, in turn, will be referenced by command in
element B.
When connecting two signals of HyperLink elements, it is not possible to mutually associate
the label name of the signal of the other block with the current label. For example, two HyperLink elements Hk1 and Hk2 defining respectively out1 and in2 cannot be connected as follows:
...Hk1.info: (.info file of block Hk1)
...
OUTPUTS={
0
out1
...
in2
4-1-581
out1
Element Hk1 defines in2 as output signal name, but Hk2 refers to out1, which does
not exist as input signal. To correct the problem, all the output signals of HyperLink elements
that are to be connected to an input of another HyperLink element, must have the same name
as their identifier (label). The input signal of element Hk2 will continue, for its part, to
point to the output label of Hk1, giving the following:
...Hk1.info:
...
OUTPUTS={
0
out1
...
out1
out1
...Hk2.info:
...
INPUTS={
0
in2
...
There are two ways of integrating an S Function with a Simulink model, in order to generate code usable in Hypersim:
By generating the code of the S Function directly within the code of the Simulink model.
Using an S Function
Written in C
This is probably the most common case. The function is written in C, thus allowing for a
shorter execution time. The user will have already compiled the function using the cmex.
This process is useful for Simulink to allow the integration of the function in a diagram. It is
not linked with the generation of the container code in Hypersim.
However, the function code will need to be accessible from Hypersim.
When generating code in Simulink, the links with the S Function will be inserted in the appropriate locations. The different modules of the S Function will be called via pointers to
functions. In some cases, these calls will be made at each step size.
4-1-582
As is the case for the first method, this method also requires to have previously compiled the
source file (.c) of the S Function using cmex. The .tlc1 version needs to be added which
allows to insert the algorithm code in the full model code. This file consists of script type
statements capable of looking into a database describing the model, and also the C code,
which has references to variables of the script language. An interpreter (tlc), called when
generating code in Simulink, allows to recognize and to interpret the statements, while copying verbatim the C code, after substituting the values of the script variables in the code generation file.
This method is more work, since it requires keeping two files (.c and.tlc) for the same function. However, it is more efficient, since the code is directly inserted next to the code of the
other blocks. In fact, it is as if a Simulink block had been created. Moreover, it is possible to
change the parameters of the function during simulation.
The .tlc files of the S Functions must be seen from Matlab. In other words, they must
be located in the directories listed in MATLABPATH. If required, change the latter to include the directory of your S Functions.
1.
Code generation files in Simulink/RTW. Please consult the following manuals: Writing S Functions,
Target Language Compiler Reference Guide and Real-Time Workshop Users Guide, published by
The Mathworks Inc., for complete information on S Functions.
4-1-583
4-1-584
Start Simulink
Display the External Mode Control Panel window by selecting the menu:
Tools->External Mode Control Panel....
1.
Multi interfaces mode allowing to use many Hypersim copies on the same computer.
4-1-585
In the External Target Interface window, enter the name of the mex communication file:
HyperLink_comm_s4_0 in the field MEX-file for external interface.
Fill in the field MEX-file arguments: This is where the user defines the recipient of the parameter1change. All the parameters entered on this line must be set between single quotation
marks (). Enter the identification (label) of the Simulink block or of the element containing
a HyperLink block, or of the HyperLink element in the diagram of the Hypersim interface.
This identification must have the following format: label_of_block/bus name. Generally, this
is the only value that the user has to enter. However, others can be added.
If the environment variable IG_DISPLAY which specifies the name of the machine running the Hypersim interface has not been assigned before starting Matlab, or if it has been
wrongly defined, you can add its definition after the element. This variable will need to be set
between quotation marks in the following format: IG_DISPLAY=machine:number where
machine is the name of the computer running the interface and number, the identification
number of this machine (specified in the window of the Hypersim interface).
This method can also be used to add the definition of SSR_ROOTDIR.
The previous figure shows a case where IG_DISPLAY and SSR_ROOTDIR had to be
defined.
Select Simulation->External in the menu bar at the top of your model window.
Still in the menu bar, select Simulation->Connect to target or click the Connect button of the
External Mode Control Panel window. This sets the communication with Hypersim. At this
time, Simulink would be able to transmit all the parameters of the model towards the simulation if the parameter INIT_ALL_PAR were equal to y. The default value of the latter is n.
To assign a value to INIT_ALL_PAR, add its definition just after the parameters of the mex
file (see section 7 above) by following this format: INIT_ALL_PAR=o.
4-1-586
Generally, Simulink is used to design control system, regulation, monitoring devices. In the
same manner, Hypersim is used to represent Power System elements. Thus, only controls signals are exchanged between Hypersim and Simulink.
The use of a Simulink C code generator, called Real-Time Workshop (RTW) is used to convert Simulink diagram in to C code.
If a power system was designed using Simulink, refer to rule #xxx. If a power system network
is implemented in Simulink, using PSB models, refers to rules #xxx.
Rule 2: Signals
exchange
between
Simulink &
Hypersim
Communications between Simulink and Hypersim are bi-directional. The simulink diagram
must contain input and/or output connectors, to exchange control signals with Hypersim.
Signals to be exchanged can be scalar or vector.
If a Simulink "scope" device is used in the diagram, the corresponding signal will be
automatically available in Hypersim.
Input and output connectors should be in relation with Simulink signal only. It cannot
be a connection to a Power System diagram using PSB.
Rule 3: Modelling in
Simulink in
discrete-time
domain (Z)
Rule 4: Limitation in
Simulink
modelling.
4-1-587
In a Simulink simulation, some operations in time can be achieved with a time reference from
the beginning of the simulation.
In a real-time simulation, this time reference cannot be used, since the simulation can be executed perpetually, and events (maneuver) are performed form a steady-state operation.
Thus, Hypersim gets a time reference from a "Voltage Level Crossing" called "Point-onWave" or POW.
The only time reference available, is then produced by Hypersim, and it is called "Point-onWave" or POW. This synchronization pulse can be exchanged to Simulink for some particular operations in time.
Please refer to Hypersim manual for more details.
Rule 6: Code
Generation of
Simulink
diagram.
Before code generation using RTW, you make sure the Matlab path contains Hypersim directory. Use the following command to add and verify the path:
addpath /hypersim/HYP/matlab
Solver option: Fixed-step;
Solver option: discrete (no-continuos-state);
Solver option, Fixed step size: set to a proper value (non-auto);
Real-TimeWorkshop, System Target file: hyperlink.tlc;
Real-TimeWorkshop, template makefile: hyperlink.tmf;
Real-TimeWorkshop, make command: make_rtw.
A power system can be constructed in Simulink using PSB block. Although ONLY simulink
signal can be exchanged with Hypersim.
If PSB block are presents in the Simulink diagram, you must:
Place on your Simulink diagram a PowerGUI block;
Specify in the PowerGui "Discretize electrical model";
Specify in the PowerGui the corresponding timestep.
The presence of this PowerGui block will automatically discretize all PSB blocks present in
the diagram. Please note that some PSB blocks do not supports discretization.
Note : HYPERSIM will require the environment variable SFUN_PATH in order to identify
a system file from Matlab installation directory (sfun_psbdicc.c)
Rule 8: Design of
power system
model with
Simulink
4-1-588
Some special considerations should be taken into account about the signal interface between
Hypersim and Simulink. Basically:
A delay of one timestep (z-1), is present at each interface. (Hyp->sim; Sim->Hyp);
The Simulink task can only be executed on a single processor.
A special implementation of Simulink block can eliminate one timestep delay in the interface.
4-1-589
4-1-590
Chapter 2
USER CODED BLOCKS
2.1 INTRODUCTION
Hypersim users can build their own control blocks with the UCB (User Coded Block) utility,
independently and without recompiling the simulator.This utility is described in the following sections. It consists of a development environment which guides the user in creating
blocks. The integration of a block in a Hypersim diagram is done using a general UCB with
a specific icon in the elements palette and whose diagram element can be connected to other
blocks of the control module in the Hypersim graphic interface.
The following sections explain the normal procedure to create a UCB and then use it in a Hypersim diagram.
GAIN KJ
Use
ENTREE
SORTIE
4-2-591
The UCB can have an initialization function called once at the beginning of the simulation;
The UCB functions are saved in a file called ucb_label_ex.c while the declarations are made
in a file called ucb_label_ex.h, where label is the block label.
A file named ucb_label.bldat contains the required information that will be used by Hypersim
to include a UCB in a power system. This file is located in the same directory as the UCB.
The following is an example of a .bldat file:
Example:
4-2-592
UCB Limits
NIO = 1
Command - int* Out Command signal 0: open, 1: closed
Introduction
Building blocks is done using a ucb command that guides the user through the process and
hides implementation details from the user who can then concentrate on his task while being
assured that the proper links will be established.
All the block requirements are entered by the user in the block definition file which consists
of sections used to define parameters, inputs and outputs, documentation, code, etc.
Each file section is preceded by explanatory remarks.
2.5.2
Using the
ucb
Command
The UCB program guides the user through the process of building a UCB. This command
hides implementation details from the user who can then concentrate on the algorithm of his
block.
All the specifications for the block simulation function are entered in a definition file that includes the following sections: parameter definition, input/output definition, block documentation and execution code. Each section begins with an explanation on how to fill in the
required information.
2.5.3
2.5.4
ucb
Command
Operating
Modes
The ucb command has two operating modes: interactive and batch. In the interactive mode,
the ucb executes commands specified by the user and ends when the user enters the command quit.
Using the
Interactive
Mode
In batch mode, each ucb call executes only one task.and ends as soon as the task is completed.
4-2-593
If a non existing block is entered, the ucb assumes that the user wants to create a new block
with that name.
The ucb will automatically start the editor preferred by the user to allow completion of the
block definition file.
The name of the block can have the extension .ucb and include the complete path of the
block. If no path is specified, the block is assumed to be in the current directory.
2.5.5
ucb Prompt
When the ucb command is entered, a prompt with the name of the current block is displayed. The prompt also contains information about the block. In interactive mode, the
prompt is as shown below1:
[SM] BLOCK>
Block Name
(NewBlock if no block name is specified)
Block Modification Flag
_ = block not modified; * = bloc modified
Status
O Block Opened
N New Block Opened
_ Block Not Opened
Example:
bloc src
[__] src>: Bloc src non ouvert;
[O_] src>: Bloc src ouvert;
[O*] src>: Bloc src ouvert et modifi;
[N*] src>: Nouveau bloc src modifi.
4-2-594
UCB Commands
Calls the Unix command cat and displays the content of the files specified.
co<mpile>
Compiles the code of the current block. If the code of the block has not been generated or if
the definition file of the block is not up to date, you will be asked if you want to generate the
code. If you answer No, the code will not be generated and, if an old version of the code
exists, it will be compiled.The compilation at this time is only for debugging purposes because the code will be recompiled when the block is included in a Hypersim power system.
If no error is detected, the prompt will be displayed again after the compilation. Otherwise,
error messages will be displayed and added next to the erroneous statements in the corresponding files. The editor preferred by the user will be called automatically for each erroneous file. Error messages inserted in the files will be delimited by: "/*### ... %%%*/". The
number of the corresponding line will be displayed within the error message. Error messages
must be deleted from the file after errors are corrected. Most files that need to be edited have
at the beginning a reminder of the block parameters, historical variables and input/output signals. After correcting the errors and closing the editor, you will be asked if you want to save
the corrections. The default answer is Yes. If you answer No, the corrections will be lost.
You will then be asked if you want to recompile the new block code. The default answer is
Yes. This cycle will be repeated until there are no more errors in the file. If the block code
has not been generated, you will be asked if you want to generate it. The default answer is
Yes. If your answer is No, an old version of the code will be compiled.
dat
Displays the content of the file ucb_BLOCK.bldat. All information relating to a block and
required by Hypersim are found in this file. It will be used by Hypersim to incorporate the
block into a simulation program. This file is not directly modifiable.
de<lete> [block]
Deletes the current block or the block specified as parameter. You will be prompted to confirm if you really want to delete the block. The default answer is No.
di<scard>
Erases the last changes made to the current block. Is operative only if the block has not been
saved. You will be prompted to confirm your decision. The default answer is No.
exec
Displays the content of the file ucb_BLOCK.exec. This file contains the simulation code
of the block.
cl<ose>
Closes the current block. If the block has been modified but not saved, you will be asked to
save the block before closing it. The default answer is Yes.
gen<erate>
Generates the code of the current block. The names of the files generated are displayed as they
are generated. If the code of the block is up to date, no action is taken.
init
Displays the content of the file ucb_BLOCK.init. This file contains the code to initialize
the block.
lb
Displays the list of blocks in the current directory. A short description is appended to each
block name.
ls
Calls the Unix command ls which displays the content of the current directory.
4-2-595
ed<it> [block]
more
Creates or changes the block definition file specified as parameter or, by default, the current
block. If the specified block doesnt exist, an error message will be displayed. If the specified
block exists and is different from the current block, the later one will be closed and the specified block opened. Then, UCB will indicate that it is ready to change the block and will open
the editor preferred by the user. Press <Return> or <Enter> to start editing. The editor is selected by the environment variable EDITOR. This variable must be defined before starting
the UCB program. The editors supported are vi, textedit and xemacs. The default editor
is vi.
Calls the Unix command more which shows the content of a file.
n<ew> [block]
Creates a new block! Before UCB creates a new block, you will be asked if you want to close
the current block (if it is opened). The default answer is No. In case no block name is specified, the block will be called NewBlock. If such a name already exists, the name
NewBlock1 will be used and so forth. An error message will displayed if the specified
block already exists. If all the required conditions are met, UCB will ask the user to enter the
block definition. Refer to the command edit for the subsequent operations.
o<pen> [block]
Opens the specified block or the current block. A block must be opened to execute any operation (except deleting it). No action is taken if the block is already open. If the specified block
is not the current block, you will be asked if you want to close the current block. The default
answer is No. If your answer is Yes, the current block will be closed (see the command
Close) and the specified block opened. An error message will be displayed if you try to
open a block that doesnt exist. You can open a block by simply typing its name at the UCB
prompt. The rest of the procedure is the same as when a block is opened with the Open command.
parform
Displays the parameters that can be accessed via the data control panel. The list displayed
consists of three columns: the identification number of the parameter (this number is used in
the data control panel); the parameter name and the parameter description.
pwd
s<ave>
save as
Saves the current block under another name. If a block with the same name already exists,
you will be asked if you want to overwrite it. The default answer is No. If the saving operation is successful, the saved block will become the current block with the status Open.
sh [command]
Executes a Unix shell command or goes in shell mode, if no command is specified. In shell
mode, the shell prompt replaces the UCB prompt. To return to UCB, press <Ctrl> + D.
q<uit>
Quits the UCB program. If the current block has been changed, you will be asked if you want
to save it before quitting. The default answer is Yes.
v<iew>
Displays the definition file of the current block in your preferred editor. (See the command
Edit on how to specify your preferred editor). This command opens the file for viewing
only.
vglob
Displays the content of the file ucb_BLOC.vglob which contains declarations of variables
and global variables of the block simulation function.
4-2-596
UCB Commands
Displays the list of UCB commands with a brief description. Below is the list displayed by
the ? command.
Syntax: ucb [ -g | -c | -d | -i ] [block name]
ucb: List of available commands
----------------------------------------------------------------[] = Optional parameters -- <> = Optional characters
cat
Same as UNIX cat.
cl<ose>
Close current block.
co<mpile> Compilation of current block.
dat
Show content of file ucb_NewBlock.bldat
de<lete> [block]Destruction of current block or optionally name block.
di<scard> Discard last changes to current block
ed<it> [block]
Modify definition of current block or block in
parameter.
exec
Display content of file:
ucb_NewBlock_ex.exec
gen<erate>
Generate C code of current block
init
Display content of file: ucb_NewBlock_ex.init
lb
Display list of blocks in current directory
ls
Same as UNIX ls.
more
Same as UNIX more.
n<ew> [block]
Create a new block of name block or default
name.
o<pen> [block]
Open current block or block named block.
pwd
Same as UNIX pwd.
q<uit>
Exit ucb
s<ave>
Save current block
save as
Save current block under another name.
example: save as NewBlock
sh [command]
If command is present, execute it under UNIX.
Else, enter shell mode. This will start shell
program specified by environment variable:
SHELL.
Enter <ctrl-d> to exit shell and return to ucb.
v<iew>
Display synthesis of current block.
vglob
Display content of file:
ucb_NewBlock_ex.vglob
name of block
Open block of that name.
?
Display present help message
Note : The name of the current block is always part of the prompt:... CurrBblock>
4-2-597
The name of the block can include the extension .ucb and a complete path. If no path is
specified, the block will be assumed to be in the current directory. If no block name is specified, UCB will request it. If the block specified doesnt exist, an error message will be displayed.
Code Generation
If the block exists, ucb will open it, generate its code and close it. See the descriptions of
the corresponding Open, Generate and Close commands in interactive mode.
Code Compilation
If the block exists, ucb will open it, compile its code and close it. See the descriptions of
the corresponding Open, Compile and Close commands in interactive mode.
Block Deletion
The specified block will be deleted automatically. If the block doesnt exist, a warning message will be displayed. See the description of the corresponding delete command in interactive mode.
Display a List of
Block Parameters
4-2-598
This command is useful for those who want to design their own data control panel for a UCB.
It displays the identification numbers of the parameters that can be changed.
Building a Block
Creating a
Block
Suppose you want to create a block called gain. In order to do this, you will need to use the
UCB program in interactive mode.
2.8.2
Starting the
UCB Program
gain is specified as block name. A text similar to the one below will be displayed in the
window where the UCB program was launched (some of the lines are truncated):
Users blocks development system
Opening block: gain!
Editing block: gain definition
!
!Editing in textedit!
! ---------------------------------------------------------!
!To save and exit editor: Menu= File->Save Current File
!
!You are going to edit the file!
Enter <CR> to continue!>>>
The program pauses and waits for you to press <Enter>. The editor that will be used is specified in the text displayed. In our example, the editor textedit will be used because the environment variable EDITOR has been set to textedit before starting the UCB program.
This is done by typing the following:
setenv EDITOR textedit <enter>
xemacs or vi could have been used instead. If EDITOR is not specified, the UCB program uses vi.
You can now edit the block definition file. The file that will be generated is temporary and
will be destroyed once its content has been processed and saved.
If the block already exists, UCB will not edit it immediately. It will open the block, display
the ucb prompt and wait for a command from the user.
2.8.3
Block
Definition File
The block definition file is a temporary file that contains the required information for the
block. It has 10 sections and each section covers a particular aspect of the block. An example
of a block definition file is given below.
The file is well documented (comment lines start with %%). A general header section gives
basic instructions and a list of the sections in the file. Each section has its own header describing the function of the section, the data format, etc.
WARNING
Do not change these comments!!!
4-2-599
General
Information
The general information are the execution time TEXEC and the description of the block DESCR.
DESCR = Description of breaker
TEXEC = 5.0e-6
Default values are assigned to these two parameters. You can change them to adapt them to
the block you are programming.
WARNING
Do not change these names: DESCR and TEXEC!!!
The description of the block, i.e. the string assigned to DESCR, must always be delimited by
double quotation marks.
2.8.5
Block
Documentatio
n
You can enter the block documentation in this section. The text will be in free format and will
be saved as typed. However, text lines that begin with %% will be considered as comments
and will not be saved as part of the block documentation.
2.8.6
Block
Parameters
The block parameters are defined in this section. These parameters will be entered in the parameters control panel accessible from Hypersim. Parameters are values that you can change
before the simulation starts or during its execution. The parameters are entered in tabular
form in which one line describes one parameter. Following is the data format of a parameter
line. You must follow this format:
Name Units Type Dimension Defeat Modify Description
where:
Name:Name of parameter;
Units:
Units of the parameter. Enter a dash (-) or without if no unit is specified
for the parameter;
Type:Type of parameter
int
Integer value
int*
4-2-600
Building a Block
Parameters of
the Block
Simulation
Function
This section must be filled in only if some parameters of the simulation function are different from the block parameters (entered in the control panel). Otherwise, the parameters
of the control panel are passed directly to the simulation.
When parameters of the simulation function are different, you must describe here all the parameters of the function that are identical to the function parameters, including those that are
identical to the control panel parameters. You must also fill in section 10 which will hold the
code to transform the block parameters into simulation parameters that will be ready to be
used by the block execution code.
The names of the simulation function parameters must be different from the names of the
block parameters (entered in the block data control panel) except when the parameter requires
no preliminary transformation. In fact, when the name of a simulation function parameter and
that of a block parameter are identical, the latter is transmitted to the block simulation function without transformation. In this case, you dont have to process that parameter in the transformation code you will specify in section 2.8.13.
The default value applies to all the elements of a parameter with a dimension > 1.
Here is an example of a parameter definition of a block simulation function:
NT1
It is an integer type parameter whose default value is 0. In fact, it is the time Tman1 that has
been converted into a number of samples.
2.8.8
Inputs and
Outputs of the
Block
Simulation
Function
The block inputs and outputs are defined in tabular form where each line refers to one input
signal or one output signal. Following is the format of an input/output signal line. You must
follow this format:
Name Units Type Direction Description
where:
Name:
Units:
Type:
Name of signal
Units of the signal. Enter a dash (-) or without if no unit is specified.
Type of signal
int* Signal with an integer value
4-2-601
2.8.9
Historical
Variables of a
Block
Historical variables ensure the persistence of certain values, between the calls to the simulation function at each step size. These historical variables are private to the instance of the
block. You must follow the provided data format. The parameters are entered in tabular form
where each line of the table corresponds to one historical variable. Below is the format of a
historical variable line. You must follow this format:
Name Type Dimension Default Description
where:
Name:
Type:
C language declarations of global variables. These variables can be accessed by all the functions defined in the block simulation file. Such variables are static and common to all instances of the block. All the functions required by the block simulation function are declared in
this section. You can also include C language header (.h) files. The format must be conform
to C language rules. In the case of our breaker block, the following declarations are made
in this section:
intblPOW_Get ();
intblIsTestEnable();
2.8.11 Initializing a
Block (C Code)
4-2-602
The initialization code of the block is entered in this section. This code will be part of the
block simulation function and will be executed only once before the simulation. This function
can not access the parameters, input/output signals and historical variables of the block. The
initialization procedure can use global variables only. Remember that global variables are
common to all functions in the block simulation file and are also common to all instances of
the blocks. The format must be conform to C language rules.
Building a Block
2.8.12 Block
Execution
Code (C Code)
The block simulation code is entered in this section. This code is executed at each step size.
It applies the block simulation algorithm to the input signals of the previous step size to generate the current output signals of the block. This code will be part of the block simulation
function which will be automatically generated by the UCB program.
In the execution code, input/output signals, parameters and historical variables are referred to
by using the names assigned to them in their respective definition section. In the case of a gain
block, the execution code would be as follows:
*output = gain * *input;
Note the use of the de-reference operator *. Input and output signals must always be dereferenced because they are passed by address to the block simulation function. This address
always points to a single value since input signals are not vectorized.
Historical variables are always passed by address and, therefore, must always be dereferenced. However the address can point to a scalar or a vector value. It is the dimension of the
historical variable that separates scalar historical variables from vector ones.
Scalar parameters are passed by value, while vector parameters are passed by address. In the
case of the breaker block, the parameter T1 is scalar. Here, the use of a de-reference operator is not required.
An array of values can be passed as parameters to a block. In this case, the square brackets
[] can be used in lieu of the de-reference operator. The format must follow C language
rules.
2.8.13 Transforming
Parameters (C
Code)
When some parameters of the block simulation function are different from the block parameters, then the parameter transformation code must be entered in this section. This code will
be executed each time a parameter is changed. From the block parameters in the corresponding block control panel, it will calculate the values of the parameters of the block simulation
function.
The instructions in this code use the parameters defined in sections 2.8.6 and 2.8.7. The scalar
parameters can be used directly. The vectors are used via the de-reference operator * or via
the index, for example ParVec[i].
No transformation is required for a block simulation function parameter with a name identical
to that of a block parameter. These parameters will be passed without transformation to the
block simulation function.
Some variables and pre-defined MACROS are provided to facilitate this task:
TO_SAMPLE: Macro that converts the time in seconds into number of samples.
Ex: TO_SAMPLE(Tman1);
HYSIZE:Macro that returns the dimension of a parameter.
Ex: HYSIZE(Tman1);
(The return value is always an integer type scalar)
NPARB:Number of parameters of the block.
NPARS:Number of parameters of the block simulation
step_size: The time step in seconds.
4-2-603
All block simulation function parameters that are different from block parameters must be assigned values.
2.8.14 Closing the
Capture of a
Block
Definition
After having specified the information required for the block definition, save the file and
close the editor. The analysis of the block information will be executed immediately and the
information saved in a temporary file.
Some errors in the definition of parameters, of inputs/outputs and of historical variables will
probably be detected when the analysis of the block is done. For example, it is an error to declare a parameter as scalar and assign it a dimension greater than 1.
The errors will be reported as follows:
Error(s) while analyzing block definition!
List of rejected lines by section:
%% 1- General informations or parameters
%% 2- Block documentation text
%% 3- Block's parameters
Tman1 s double 10 0.0 1 Time of first operation
%% 4- Simulation function parameters (OPTIONAL)
%% 5- Block's signals
%% 6- Block's historical values
%% 7- Global variables or defines of block (C code)
%% 8- Block's initialization code (C code)
%% 9- Block's execution code (C code)
%% 10-Parameters transformation (C code)
The list of the sections in the definition file is displayed. The lines where errors are detected
are inserted after the title of the section to which they belong. You will be asked if you want
to edit the block definition file in order to correct the errors. If you answer Yes, the block
definition file will be edited again and you can correct the errors. When no more errors are
detected, the block status will become Changed and you can save it, generate its code and
compile it. To save the block, enter the command Save.
2.8.15 Generating the
Block Code
Once the definition of a block is completed, you can proceed with generating its code by entering the UCB command Generate. You dont have to save the block before generating its
code.
The list of files generated is displayed as follows:
Generating code for block: breaker!
Generating code for block: disjoncteur!
Generating: ucb_breaker.vglob!
Generating: ucb_breaker.init!
Generating: ucb_breaker.exec!
Generating: ucb_breaker_ex.c!
Generating: ucb_breaker_ex.h!
Generating: ucb_breaker.xform!
Generating: ucb_breaker_xform.c!
Generating: ucb_breaker.mk!
4-2-604
The files ucb_BLOCK.xform and ucb_BLOCK_xform.c will not be generated if the user has
not defined block simulation function parameters that are different from the block parameters.
The code will not be generated if the block definition has not changed since the last generation of the block code.
2.8.16 Compiling the
Block Code
Here, the compilation of the block code is mainly for validation purposes since the block code
will be compiled again when it will be used in Hypersim. The compilation is done in two
steps. The block simulation function (simul) will be compiled first. The parameter transformation function (xform) will be compiled next if different parameters were defined for the
simulation function.
To compile the block code, enter the command: compile <Enter>
If the compilation is successful, the following message will be displayed and the UCB prompt
will be displayed again:
Compiling block: breaker (simul)!
No errors.
You didn't touch any files.
Compilation succeeded!
Compiling block: breaker (xform)!
No errors.
You didn't touch any files.
Compilation succeeded!
If a block doesnt have a parameter transformation function, only one compilation (simul)
will be executed. If errors are detected during the compilation, error messages will be displayed next to the erroneous statement that caused the error.
Refer to the UCB command Compile for more information on compilation. If the block
code has not been generated, you will be asked if you want execute this operation. The default
answer is Yes. If you answer No, the existing block code will be compiled.
This completes the definition of the block which is now ready to be used in Hypersim.
Introduction
4-2-605
2.9.2
To add a UCB to a Hypersim power system, click the UCB icon in the palette, then click
the Hypersim window. The following dialogue box is displayed:
Adding a UCB
to a Power
System
a
b
c
d
e
The box allows to choose the UCB block and its control panel. It contains four modifiable
fields and a selection list.
A
This first field specifies the path of the directory containing the control panels. This field is
initialized from the Forms Directory field in the Default Directories Properties dialogue
box of the Hypersim interface. You can replace the content with the path of the directory containing your customized control panels.
Enter here the name of the customized control panel of the block. Leave the field empty to
use the default control panel.
Filter to display only the names of the relevant files in the selection list. You do not have to
modify this field.
Path of the directory containing the UCB blocks. The content of this field is initialized from
the User Block Directory field in the Default Directories Properties dialogue box of the
Hypersim interface. You can modify this field.
2.9.3
Identifying a
Block
4-2-606
Locate the UCB required in the e list and click it. Then, click Apply. Using this information, Hypersim will read the file containing the block identification, its parameters and its
inputs/outputs.
This data is used to modify the appearance of the block in the diagram by replacing the block
name and its input/output labels with the definitions of the user.
You can enter the name of the control panel1 corresponding to the block parameters in the
same dialogue box. If you do not do this, a default parameters control panel will be generated
with the identifier of the parameters read previously. (See the additional information on user
programmable blocks in the appendix).
2.9.4
Connecting
the Inputs/
Outputs of a
Block
In the Hypersim interface, connect the inputs and outputs of the block with other blocks of
the control module.
2.9.5
Specifying the
Parameters
The specification of the block parameters can be done via a default data control panel (UserBlocDefaut.form) or a custom data control panel designed by the user. Such user designed
forms will be located in the directory defined by the environment variable USERDIR and
will bear the name: Blockname.form.
The user can design the block data control panel as he likes, provided the parameter identification numbers are accurate. Parameters are numbered starting from 1 in the order they appear in the .bldat file of the block. For help in designing a custom parameter control panel,
the UCB command parform can be used to display the list of parameters and their identification numbers. To this end, the ucb command can also be used in batch mode with the
switch -p by entering: ucb -p Blockname
In the default data control panel, parameters are presented in a list whose order is specified
by the command parform.
2.9.6
Simulation
You can proceed as you normally would for power systems without UCBs.
Appendix
Example:
Example of a block definition file
%%
%%.ucb_breaker.def -- Date: 98/11/25
%% ---------------------------------------------------------------1.The definition of control panels is done in administration mode in Hypersim.
4-2-607
%%
%% Definition of a user's defined Hypersim block
%% --------------------------------------------%%
%% Comments in this file are preceded by this string: %%
%%
%% DO NOT EDIT COMMENTS!
%% --------------------%%
%% Only edit zones between comments.
%% Follow directives describing format of data.
%%
%% File is divided en 10 sections covering the following topics:
%%
%% 1. General informations or parameters
%% 2. Block documentation text
%% 3. Block's parameters
%% 4. Simulation function parameters
%% 5. Block's inputs/outputs
%% 6. Block's historical values
%% 7. Global variables or defines of block (C code)
%% 8. Block's initialization code (C code)
%% 9. Block's execution code (C code)
%% 10.Block's parameters transformation code (C code)
%%
%%
%% ---------------------------------------------------------------%%
%% 1- General information or parameters
%% ---------------------------------%%
%% DESCR:
%%
%% Enter a short description of block, between double quotes
%%
%% TEXEC:
%%
%% Replace default value of 5.0e-6 by estimated execution time of block
%%
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
4-2-608
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
This block defines a general purpose breaker control.
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
%% 3- Block's parameters
%% -----------------%%
%% Enter block's parameters in a tabular form (7 columns).
%% Fields should be separated by one or more space characters.
%% Description should be between double quotes
%%
%%ATTENTION: If you do not supply parameters for simulation function
%% in section 4 below, it will uses parameters defined here.
%%
%% Name : Name of parameter
%% Units : Parameter's units.
%%
Text field at user's convenience
%%
Enter a - when not used
%% Type : Type of parameter
%%
Enter: int
Integer value
%%
int*
Integer array
%%
double Real value
%%
double* Real array
%% Size : Parameter size (number of units)
%%
Enter 1 for scalars
%% Default: Default value of parameter
%% Change: 1 => parameter can change during simulation,else 0
%% Description: Short description of parameter (BETWEEN DOUBLE QUOTES)
%%
%% Format: (7 columns table)
%%
%% Name Units Type Size Default Change Description
%%
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
Tman1 s double 1 0.0 1 Time of first operation
Tman2 s double 1 0.0 1 Time of second operation
EtIn - int 1 0 1 Initial state
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
%% 4- Simulation function parameters (OPTIONAL)
%% -----------------------------%%
%% If the simulation function uses parameters different
%% from the block parameters you must also enter the transformation code
%% in section 10 below. If simulation function parameters and block
%% parameters have the same name, you do not have to assign them
%% in the transformation code. Ucb will do it for you.
%%
4-2-609
4-2-610
%%
%% Format: (5 columns table)
%%
%% Name Units Type Direction Description
%%
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%%
Command - int* Out Command signal 0: open, 1: close
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
%% 6- Block's historical values
%% --------------------------%%
%% Enter block's historical values in a tabular form (5 columns).
%% Fields should be separated by one or more space characters.
%% Description should be between double quotes
%%
%% Name : Name of historical value
%% Type : Type of historical value
%%
Enter: int*
Integer (scalar or array)
%%
double* Real (scalar or array)
%% Size : Size of historical value (number of units)
%% Description: Short description of historical value
%%
(BETWEEN DOUBLE QUOTES)
%%
%% Format: (5 columns table)
%%
%% Name Type Size Default Description
%%
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%%
POW_1 int* 1 0 Last POW value
CountEnab int* 1 0 Count enable historical value
Count1 int* 1 0 Counter for first change of state
Count2 int* 1 0 Counter for second change of state
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
%% 7- Global variables or defines of block (C code)
%% --------------------------------------------%%
%% Enter global variables and defines after comments.
%%
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%%
int
int
blPOW_Get ();
blIsTestEnable();
4-2-611
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
%% 8- Block's initialization code (C code)
%% -----------------------------------%%
%% Enter code that should be run only once, at beginning,
%% after comments.
%%
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%%
/* This block has no initial is at ion function */
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
%% 9- Block's execution code (C code)
%% ------------------------------%%
%% Enter block's implementation code (executed at each step)
%% after comments.
%%
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%%
intPOW;
if (blIsTestEnable())
{
POW = blPOW_Get ();
if ((POW - *POW_1) > 0)
{
*Count1 = 0;
*Count2 = 0;
*CountEnab= 1;
}
if (*CountEnab)
{
if (*Count1 == T1)
{
*Command = 1 - EtIn;
}
if (*Count2 == T2)
{
*Command = EtIn;
*CountEnab = 0;/* 2 chang.d'etats effectue: Fin*/
}
(*Count1)++;
(*Count2)++;
4-2-612
}
else
*Command = EtIn;/* Permet changement etat permanent */
*POW_1 = POW;
}
else
*Command = EtIn;
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
%% 10-Parameters transformation (C code)
%% ---------------------------------%%
%% Enter block parameters transformation function code here.
%% This code will transform block parameters to simulation
%% function parameters. You do not have to assign simulation
%% function parameters which are the same for the block.
%%
%% Predefined values:
%%
%% Defines:
%%
%%
%%
NPARB
NPARS
%%
TO_SAMPLE(t)
%%
HYSIZE(parname)
ters
ber
%%
%% Variables:
%%
%% double step_size;Simulation step size in seconds
%%
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%%
T1
T2
= TO_SAMPLE(Tman1);
= TO_SAMPLE(Tman2);
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%% End of.ucb_breaker.def
Example:
Prompt description when English is the chosen language.
4-2-613
[SM] BLOCK>
Block Name
(New Block if no block name is specified)
Block Modification Flag
_ = block not modified; * = bloc modified
Status
O Block Opened
N New Block Opened
_ Block Not Opened
Example:
List of Commands in French:
4-2-614
co<mpiler>:
dat:
de<truire> [bloc]:
eff<acer>:
exec:
fe<rmer>:
gen<erer>:
init:
lb:
ls:
mod<ifier> [bloc]:
more:
n<ouveau> [bloc]:
o<uvrir> [bloc]:
parform:
pwd:
s<auver>:
sh [commande]:
t<erminer>:
v<isualiser>:
vglob:
?:
If the tool already exists in the $TOOLDIR directory, just add it to the palette.
When instantiating a user block, a dialogue is displayed to allow the user to determine where
to get the information to build his block.
The directory of the default control panel is $FORMULDIR, if this environment variable was defined. Otherwise, ./ will be displayed by default.
The field identifying the name of the control panel is empty.
A filebrowser allows to select the file containing the information on the block to build.
By default, the directory is displayed in $USERDIR, if this environment variable was
defined. Otherwise, ./ will be displayed by default.
The new $USERDIR environment variable can be defined in the directory properties panel.
If the file containing the block information is not valid, a dummy block will be instantiated:
no input/output connector and no control panel.
If the name of a control panel is specified and if it is valid, it will be assigned to the block.
Only the values of identical parameters will be assigned in the control panel (name and type).
If the name of a control panel is specified and if it is not valid, there will be validation of the
existence of the UserBlocDefaut.form default control panel file in the specified directory.
If it does not exist or is not valid, no control panel will be assigned to the block instanciated.
If it exists, the scalar parameters whose integer identifier is identical will have the name of
the variable, the units and the values assigned to the control panel. The unused parameters of
the default control panel will be destroyed.
If no control panel is specified, there will be a validation of the existence of the file NomBloc.form in the specified control panel directory. NomBloc represents the same prefix as the
file.bldat specified for the information on the block.
4-2-615
Steps 6, 7, 8 and 9 are repeated as if the NomBloc.form control panel has already been recorded.
If the control panel used is different from the one specified in the dialogue, a message will be
given indicating which control panel was used or if no panel was used at all.
4-2-616
Chapter 3
GENERATION AND IMPORTATION OF EMTP FILES
3.1 INTRODUCTION
This chapter covers the automatic drawing and repositioning of diagrams using the Diagram
menu commands next to the View Menu of the interface. These commands apply globally and
cannot be cancelled with the Cancel option in the background menu.
However, most commands are complementary and, hence, reversible. The commands do not
interfere with the normal operation of the editor. They should be considered as added capabilities.
The main goal of automatic drawing and repositioning of diagrams is the production of diagrams corresponding to EMTP files.
A Historical
Account
The goal is to develop an efficient means of automatically generating a diagram from different sources (such as an EMTP file) and hiding interactively parts of large diagrams without
losing any connection.
B Edit functions
All the edit functions are available with diagrams drawn and repositioned automatically. It is
also possible to add new elements or delete existing ones at any time.
C Multiple uses
In addition to drawing EMTP diagrams, the repositioning algorithm can be used in the following cases:
Fast drawing or updating of a diagram and automatic repositioning. Improvements can
then be made manually and saved.
Loading a large diagram of which only a small part is of interest to the user. It is then
possible to enclose and implode the undesired parts into a small rectangle without losing any connection. However, the diagram must be repositioned prior to this operation.
If the resulting diagram is not satisfactory, no save is made.
D Multiple
representations
There are four (2x2) representation possibilities: branches can be oblique or orthogonal and
buses can be stretched or fixed to a pre-defined size.
The original algorithm was designed for oblique branches and fixed length buses. It is useful
to display this representation since it is often the best. It is very difficult to clearly position a
complex network with orthogonal branches due to the great number of changes in direction
or involuntary crossings, except for planar graphs1, where stretching buses allows to generate
a diagram approximating a manual drawing.
1.Diagram that can be drawn without any branch crossing.
4-3-617
If the graph is planar (and represented as such, see limits further ahead), orthogonal or oblique
branches will give the same results.
All the branches are directed vertically from top to bottom and the elements and buses are
assumed to have this orientation. If vertical buses or elements with horizontal connections are
used (i.e. such as a line), repositioning will be poor.
You can override these limits. However, you will need to reposition or reconnect manually
all poorly processed objects.
The algorithm used is designed for a directed graph. In the case of a graph without a definite
orientation, the circuits can be processed automatically, but some branches need to be reversed to do so. This is a type of problem that cannot be solved completely. Hence, it is important to orient elements and buses in the direction of the required final result to generate a
clear diagram.
B Processing
Planar Graphs
The barycentre method used to order the nodes of a level does not guarantee a planar result
for a planar graph. The advantage of this method is its quickness
When the graph is planar and the buses are stretched, the method used generates a diagram
that is not centered as well as a method without stretching.
It is not possible to save any added recursive structuring. If a recursive diagram is saved, it
will be initially reread as is since the added rectangles are Unidraw objects. However, the
diagram will be repositioned using only the buses, the elements and the connections saved in
the Unidraw file.
B Characteristics
of Processed
Elements
The algorithm assumes that elements have only two connectors and that these are centred vertically. However, Unidraw uses a magnetism function for all the connections. The result is
that off-centred connectors, even when there are more than two, are processed adequately.
Note : The algorithm handles the processing of nodes with more than two connection
points. However, this capability was not included in the current interface, since
each case must be processed individually. Furthermore, the relative coordinates
for each connection point in each element must be provided.
4-3-618
During generation, the user will be notified on which models are not yet supported.
To generate an EMTP file, in simulation mode, click on top of the menu Special and select
Generate EMTP file. The EMTP file will then be generated.
Global repositioning based on the current parameters of the buses, connections and elements
in the editor. The recursive structuring added interactively is saved. The diagram generated
can spill over the page (represented by a black rectangle). The size of the page can be modified using the appropriate menu. The diagram is always centred.
Undo
Return to the previous positioning. The latter is kept in the temporary file.cancel.axxxxx of
the current directory which is usually destroyed after execution. The xxxxx extension is the
Unix process number of the interface.
EMTP File
Automatic generation of the diagram corresponding to the EMTP file selected in the file selector window. An *.emtp file can be processed with the original EMTP card images or those
generated by interemtp. It is also possible to use the result file from a previous filter pass
(possibly edited manually) named *.emtp.schrec. The format is described further ahead.
Bidirectional Diagram
Reposition the diagram considering that a part of the network was rotated by the user.
Orthogonal Branches
Displays the connections using the convention for single-wire diagrams with square-angle
branches and a layout selected automatically. When this option is chosen, the diagram is redrawn, but not repositioned. This is the initial default value.
Oblique Branches
Displays the connections with oblique branches and a layout selected automatically. This is
the most compact and clean representation. When this option is chosen, the diagram is redrawn, but not repositioned.
Implode
4-3-619
You first select the rectangles enclosing the sub-networks to implode. Then you execute this
command to reduce this sub network to a small red rectangle (2 times the horizontal and vertical distance parameters, or 70x30 pixels by default). The outside branches with sub network
objects are combined into only one branch consisting of many straight line segments whose
colour matches that of the imploded rectangle.
Explode
Enclose
You first select the elements and the buses (not fixed) to be enclosed (connections follow).
Then you execute this command to completely reposition the drawing with the enclosed objects grouped inside a red rectangle identifying the sub-network. To add a level, you can include in this selection already defined enclosing rectangles. The rectangles can be imploded
or not. However, an imploded rectangle will first be exploded before being enclosed so as to
reset the real connections. If you select objects already enclosed, they will be grouped at the
global level. In other words, to have many enclosing levels, you must select each time objects
at the same level.
Separate
You first select the rectangles representing the sub networks to separate. Then you execute
this command to reposition completely the diagram with the objects of the sub-network
brought up one level. The rectangles can be imploded or not.
Permute
Allows the user to permute two selected elements. By selecting two elements and clicking
this function, the drawing is repositioned considering the permutation.
Rotate normal
Rotate inverted
Fuse back
The internal model is superimposed over the network diagram. This model uses red rectangles, lines and text without any other type of structure. This option allows you to see what the
algorithm does with respect to what Unidraw executes. Selecting again disables the command
and the diagram is redrawn.
4-3-620
Stretches the buses to align the connections of the buses and the elements, and hence minimize the changes in direction of these branches. This option provides better results with a planar graph. Selecting again disables the command and the diagram is redrawn. This is the
initial default value.
Vertical yes/no
Compact yes/no
creasing this limit does not guarantee a better result due to the existing circuits when minimizing crossings. Decreasing this limit exceedingly can produce a diagram with too many
crossings. The suggested value is between 10 and 20.
6 *SchParTailleBarre:60 Minimum length of buses in pixels (when only one branch en-
32
32
16
8
10
4-3-621
*SchParTailleBarre:
*EtiquetteFont1:
36
*-menu-medium-r-normal-*-12-100-* Menu 12
Example:
Examples of EMTP diagram generated automatically
4-3-622
4-3-623
4-3-624
Chapter 4
AUTOMATIC INITIALIZATION OF CONTROL PANEL PARAMETERS
Here is some detailed information on generating EMTP diagrams, particularly on the initialization of form parameters from an EMTP specification.
A EMTP Decoding
Conventions
The EMTP software does not use the concept of phase. Consequently, it is necessary to set
conventions to represent a three-phase network as a single-wire diagram.
The filter recognizes the a b c and n or A B C and N characters, as specifying the 3 phases
and the neuter only if these characters are in position 6 (last character) in the EMTP fields
bus1 and bus21.
The cards representing the a b and c phases of a branch must follow each other in the proper
order in the EMTP file.
The specific coding of the bus1 and bus2 fields described in the interemtp2 manual prioritizes
understanding node names. This generally produces a 4 character name. If only the phase notation is identified, then a 5 character node name is produced.
Any other convention or use of option 0 when calling the filter maintains the use of 6 characters in the bus1 and bus2 fields as a node name.
B Validation
The filter usually operates without messages, except when non-supported entities or errors in
the conventions described above occur. In this last case, a message in the language chosen by
the user is displayed on the standard output of the EMTP card that caused the error. Still, the
diagram is generated with the information that is actually partly recognized.
C Relationship
between Names
and Values
The filter uses the concept of appositional parameter to initialize the values obtained from
EMTP in the interface forms. In the ElementsEMTP file, the symbol name is followed by a
classified list of the parameter names ending with a semi-colon.
A name is a string of characters in between quotation marks. It can be either an identification
or a variable name as predefined in the interface. The number is unique and it is better to use
it. However, for clarity sake, it is also possible to use the identification which is on the form.
This identification can be modified. It can be long and can have blank spaces.
In the file shown above, the numbers were substituted for long names only. If the file is
changed to use numbers, such as adapting for form translation, the use of comments is advised
to ensure readability. The order is essential and it should not be modified.
4-4-625
Phases Connexion R;
D Simplifying
EMTP Branches
CENA_aC1010a
.10000.00000.00000
CENA_bC1010b
.20000.00000.00000
CENA_cC1010c
.30000.00000.00000
The following changes are made to the original specification of the EMTP format in order to
simplify the diagram and make it more readable:
The arbitrary order of EMTP branches is changed so as to put the sources at the top of
the diagram and to unfold the branches as much as possible by moving out. This optimization is only applied with option 1 (default).
The RLC branches which come immediately after the sources are withdrawn and their
parameters integrated with the form for sources.
The resistances which follow the breakers are withdrawn and their parameters integrated with the form for breakers.
All the MEASURING breakers are withdrawn and the branches reconnected accordingly.
4-4-626
E Drawn and
Initialized EMTP
Elements
The EMTP format allows a wide variety of specifications of which some are used often and
others rarely. The elements processed by the filter are those for which a simulation is currently possible. The emphasis is on three-phase AC networks. Hence, DC branches are not initialized for the time being.
The capabilities of the filter will be increased as the simulation possibilities are developed.
For now, any EMTP card which is not recognized is the object of a message on the standard
output.
The values read on the EMTP cards are transformed automatically in the Ohm-Henry-Farad
system used for simulation.
The following sections briefly describe the EMTP branches recognized and explain the characteristics and limits for each case.
F RLC Elements
All cases with RLC elements are handled, including mutually coupled (51 52 53) R-L elements with Z0 and Z1.
By convention, a resistance of 0.00100 ohm is considered as specifying a switch.
G Lines
Transposed and untransposed lines are handled. Lines can have 3 phases, or coupled with 6
phases. Only Marti models with 2, 3 or 4 phases are processed.
lines are processed, but only with the $VINTAGE, 0 option.
Note that symbols with multiple connectors used for coupled lines and Marti lines reduce the
quality of the diagram because it is not possible to make permutations between connectors.
You will need to edit manually the diagram in such cases. However, the connectivity (and
therefore the simulation) is always accurate.
H Transformers
I Breakers
Only timed breakers are handled, specified with an opening and a closing time.
J Generators
K Drawn but
Uninitialized
EMTP Elements
L Handled but
Undrawn EMTP
Elements
The following elements, which are specified on many cards, are decoded to avoid many error
messages:
4-4-627
The two formats allowed ($VINTAGE,0 and $VINTAGE,1) are handled, except when specified explicitly. However, only fixed format cards are handled.
The inclusion of files ($INCLUDE) is carried out.
$DISABLE and $ENABLE cards are handled.
Comment cards are ignored.
N EMTP
Characteristics
Not Considered
The concept of reference branch (bus3 and bus4 non empty) is not processed by the filter.
When this occurs, a message is displayed To generate the diagram correctly, you need to copy
explicitly the referenced parameters on the appropriate card in the EMTP file and then remove reference.
This option is not handled for reasons of efficiency and also because of its erratic and nonstandardized use which can be hazardous in some situations. At the present time, this capability is rarely used since it is easy to repeat values with the Cut/Paste command.
4-4-628
Chapter 5
User Coded Model (UCM)
5.1 INTRODUCTION
User Code Model (UCM) is a Hypersim utility allowing users to build their particular models
which can not be built from existing models. As stated by its name, an UCM is coded by users
using C language in respecting some Hypersim rules.
The UCM allows to build models composed of power part and control part. The advantage of
using the UCM is that its power part is solved simultaneously with other power components.
The UCMs admittance is added to the admittance of the whole substation and all node voltages are solved together in the same step. This gives much more numerical stability than if
the power part of users model is represented as controlled sources which imply one-step delay.
Because the UCMs power part is solved together with other power elements, user must follow the same procedure used in Hypersim algorithm to solved node voltages. The control part
is simply a relationship between inputs and outputs and is simpler to model.
The purpose of this document is at the same time the user manual and the tutorial on the
UCM. It contains mainly the following parts:
Solution method in Hypersim: description of the way Hypersim models power elements, handles non-linearity, solves node equations, organizes parallel tasks. This helps
to understand the procedure to build an UCM.
User Code Model: description of the UCM and the procedure to build and use UCMs.
Progressive practices with UCM: series of examples allowing to learn and practice with
UCMs.
5-629
The Hypersim solution method is based mainly on the traditional EMTP technique. Using the
trapezoidal rule for integration, the EMTP converts most lump components of power system
into resistors and current sources and finally solve for node voltages.
Hypersim takes also the advantage of transmission lines to separate the whole power system
into parallel tasks and simulate them it in parallel computers.
This chapter will first describe the line model and show that events happened at one end of
the line will affect the other end only after a transmission delay. Different types of branches
will be analysed to show that they can be represented as resistor-source equivalents.
The simulation of a network is therefore summarized to the modelling of lines and the solution of node equations formed by resistors and current sources to find the node voltages. Nonlinear elements and switches will affect the model behaviour during the simulation and require Hypersim to recalculate them during the simulation.
Hypersim simulates also control systems which are simply represented as relationships of
outputs to inputs.
In the software point of view, Hypersim is composed of a GUI and a Simulation program.
The GUI is not simply a graphical interface but it also analyses the network, calculates models and generates codes necessary for the simulation. Most of simulation preparation works
are done with the GUI to optimize the simulation speed. The Simulation program can run either in real-time on parallel computers or in non real-time on workstations.
Conversion from 3
coupled phases
into 3 decoupled
modes
In a three-phase line, each phase is mutually coupled with other phases. To facilitate the line
simulation, the EMTP uses a technique to convert a mutually coupled three-phase line into 3
decoupled single-phase lines representing 3 decoupled modes. This is graphically represented
in 5 - 1.
In Hypersim, lines are modeled as follows:
Get three phase node voltages at each terminal K and M,
Convert three phase voltages into three-mode voltages:
V0
V1 = Tv
V2
Va
Vb
(EQ 1)
Vc
[ ] = T v ZYT v
5-630
(EQ 2)
V aK
V bK
V cK
I aK
I aM
I bK
I bM
I cK
I cC
V aM
V bM
V cM
V cK
I bK
I cK
V 0K
I 0K
I 0M
V 1K
I 1K
I 1M
V 2K
I 2K
I 2M V 2M
I aM
V 0M
V 1M
Conversion
abc
012
V bK
I aK
Conversion
abc
012
V aK
I bM
I cC
V aM
V bM
V cM
Figure 5 - 1 : Conversion from three coupled phases into three uncoupled modes
where [ ] is a diagonal matrix containing the eigenvalues of the matrix product ZY.
For a balanced line:
1- ------31 -----1
T v = ------2 2
3
1- ------31 -----2
2
(EQ 3)
Calculate three mode currents using single phase line equation (represent each mode),
Convert three modes current into three phase currents,
Ia
I0
Ib = Ti I1
Ic
(EQ 4)
I2
t 1
Ti = [ Tv ]
(EQ 5)
5-631
Each mode (0, 1, 2) can then be represented as shown in 5 - 2. The current sources in this
figure are given as
h- V
mK ( t )
J mK = 1----------------------------------+ hI mK ( t ) +
2
R eq
V
+ h- ------------------------mM ( t )
1----------- + hI mM ( t )
2
R eq
(EQ 6)
where
R
R eq = Z c + -----T4
(EQ 7)
Zc ( RT 4 )
h = ----------------------------Zc + ( RT 4 )
(EQ 8)
is the mode number (0, 1, 2), Z c is the line characteristic impedance, is the transmission
K
+
V mK
I mM
I mK
R
Z c + -----T4
J mK
J mM
R
Z c + -----T4
M
+
V mM
5-632
Substation modelling
5.2.3 Substation
modelling
In each substation, there are passive components interpreted as RLC elements which can be
linear or non-linear, circuit-breakers, different kinds of generation interpreted as voltage and
current sources equipped with control systems. Machines and motors are considered as sources with control systems.
Beside control systems, other equipments are power elements working at the power system
level voltages and currents. Power elements of a substation are interconnected together via
nodes. Power elements are not simulated sequentially one by one but rather simultaneously
all together in a single equation call the node equation:
YV = I
(EQ 9)
where Y is the substation admittance matrix, V is vector of node voltages and I is vector of
node currents (currents injected to nodes).
Control systems are modeled using the bloc diagram principle, either under graphic form
(Hypersim bloc diagram and Simulink bloc diagram) or coded in C/C++. Their inputs can be
node voltages and currents while their outputs can be used to control sources and switches.
A
RLC element
Trapezoidal integration
Hypersim, as EMTP, uses the trapezoidal integration technique, it means that
t
y(t) =
x ( t ) dt
(EQ 10)
will be evaluated as
y(t) = y( t T) + T
--- [ x ( t ) + x ( t T ) ]
2
(EQ 11)
dy ( t )
dt
By the same rule, the derivative ------------ is approximated as a difference deduced from eq.
on page 633 as
y( t) y(t T )
1
---------------------------------- = --- [ x ( t ) + x ( t T ) ]
T
2
(EQ 12)
L branch
For a L branch connected between node k and node m, the following equation is applied:
di km ( t )
v k ( t ) v m ( t ) = L ---------------dt
(EQ 13)
or
5-633
i km ( t ) = --1- [ v k ( t ) v m ( t ) ] dt
L
(EQ 14)
T- [ v ( t ) v ( t ) + v ( t T ) v ( t T ) ]
i km ( t ) = i km ( t T ) + ----m
k
m
2L k
(EQ 15)
vk ( t ) vm ( t )
- + i hist ( t T )
i km ( t ) = ----------------------------R eq
(EQ 16)
R eq = 2L
-----T
(EQ 17)
vk ( t T ) vm ( t T )
i hist ( t T ) = i km ( t T ) + -----------------------------------------------R eq
(EQ 18)
with
k
i km
k
2L
-----T
L
m
i hist
m
k
i km
k
T-----2C
i hist
m
C branch
The current of a C branch connected between nodes k and m is given by
5-634
Substation modelling
d [ vk ( t ) vm ( t ) ]
i km ( t ) = C -------------------------------------dt
(EQ 19)
Replace the derivative by the difference equation given in on page 633, we get
i km ( t ) + i km ( t T )
[ vk ( t ) vm ( t ) ] [ vk ( t T ) vm ( t T ) ]
------------------------------------------- = C ----------------------------------------------------------------------------------------------2
T
(EQ 20)
[ vk ( t ) vm ( t ) ]
i km ( t ) = ---------------------------------- + i hist
R eq
(EQ 21)
T
R eq = ------2C
(EQ 22)
i hist = i km ( t T ) + 2C
------- [ v k ( t T ) v m ( t T ) ]
T
(EQ 23)
or
with
The C branch is also equivalent to a resistor given by eq. on page 635 in parallel with a
historic current source given by eq. on page 635 as shown in 5 - 3. Here again, for a fix
capacitor, R eq is constant. The historic current is recalculated at each time step using voltages and current of the previous time step.
A current source i flowing from node k to node m has the effect of removing a current i from
node k and adding a current i to node m.
Voltage sources with output impedances are converted into current sources in parallel with
the same impedance using Thevenin-Norton conversion.
5-635
i
Figure 5 - 4 : Example of an v-i characteristics of a non-linear resistor
C Non-linear
elements
Non-linear elements are treated as RLC elements, they are also equivalent to a resistor R eq
in parallel with a historic current i hist (if it is not a pure resistor).
Non-linearity is represented normally as a characteristic curve approximated by successive
linear segments. Due to the non-linearity, R eq is no longer constant and need to be recalculated for each time step. Theoretically, this must be done based on the conditions of the actual
time step, but Hypersim does it based on conditions obtained at the last time step because the
current results are not yet available. The change from one segment to the next can be one
time-step delayed. It is therefore a good practice to define the non linearity characteristic with
a smooth changing (more points where there are more changes and vice versa) to avoid the
hunting. An example of a non-linear resistance is shown in 5 - 4.
Hypersim works rather with the conductance Y eq = 1 R eq and splits it as follows:
Y eq = Y ini + Y add
(EQ 24)
where Y ini is the fixed part used as initial condition and Y add is the varying part used to update the conductance according to its operating point.
D Switches
Switches such as circuit-breaker and power electronic switches are simulated as resistors with
two values: one small value (milliohms) for closing state and one large value (meghoms) for
opening state. To know which resistor value to be used, Hypersim needs to know the state of
switched prior to the calculation of Y matrix.
E Generalized power
Each branch element described above is connected between node k and m of the substation
and is equivalent to a resistor Y eq = 1 R eq in parallel to a current source i hist .
element
A generalized power element is simply a black box connected to nodes k, m, n, etc. in the
substation. It is equivalent to a conductance (inverse of resistance) square matrix Y eq and a
vector of historic current I hist . Their dimensions are the number of nodes of the element.
5-636
Substation modelling
Y eq, kk of the matrix Y eq is its self conductance at node k while Y eq, km is the mutual conductance between node k and node m.
In case of a non-linear element, Y eq is splitted into two parts:
Y eq = Y ini + Y add
(EQ 25)
where Y ini is the fixed part used as initial condition and Y add is the varying part used to
update the conductance according to its operating point.
Therefore, all branches are also generalized elements connected to two nodes in the substation. Linear branches have Y add = [ 0 ] and Y ini = Y eq
F Solution of
substations node
equation
As explained above, all power elements, fix or non-linear, are equivalent to resistors in parallel with historic currents. In the node equation YV = I , Y becomes therefore a pure conductance matrix, I is the algebraic sum of currents, including source currents and historic
currents, injected to nodes; currents entering a node will have + sign, currents leaving have
- sign
(EQ 26)
(EQ 27)
Y ii =
Y ij =
Ii =
(EQ 28)
Y has dimension n x n where n is number of nodes in the substation (excluding the ground
node), V and I are vectors of dimension n. A three-phase bus bar corresponds to 3 nodes.
Like each individual element, Hypersim splits also Y into a fixed part and a varying part:
Y = Y INI + Y ADD
(EQ 29)
Y INI is formed by the fixed parts Y ini of all elements and Y ADD is formed by varying parts
Y add of all elements.
The simulation of all power elements in a substation required to solve the node equation
YV = I where Y and I are known by eqs. 23 to 27 and V is the node voltage vector to be
found.
Hypersim solve the node equation using the LDU conversion:
Y = LDU
(EQ 30)
5-637
where L is a lower triangular matrix with all values in the upper triangular equal to 0 and all
elements on the diagonal equal to 1, D is a diagonal matrix, U is a upper triangular matrix
with all values in the lower triangular equal to 0 and all elements on the diagonal equal to 1.
For example, if the matrix Y has a dimension 3x3, the LDU conversion will have the following form:
Y 11 Y 12 Y 13
Y 21 Y 22 Y 23
Y 31 Y 32 Y 33
1 0 0 D 11 0 0
= L 21 1 0 0 D 22 0
L 31 L 32 1
1 U 12 U 13
0 1 U 23
0 D 33 0 0
(EQ 31)
The LDU conversion is chosen instead of the LU conversion because when Y is symmetrical
T
(which is the case for most of substations node equation), U = L . Hypersim will take this
advantage if it exists to save the time needed to compute U.
(EQ 32)
This is solve in two steps: first, replace J = DUV and solve for J in
LJ = I
(EQ 33)
using the forward substitution (because L is lower triangular). Then solve for V in
DUV = J
(EQ 34)
The LDU conversion is done based on the pivot technique used to nullify a particular element
in a matrix. Only the final formulas are listed here:
i1
D ii = Y ii
(EQ 35)
k=0
L ii = U ii = 1
(EQ 36)
j1
1- Y
L ij = ----- ij D kk L ik U kj , i > j (elements in lower triangular)
D jj
k=1
(EQ 37)
1- Y
U ij = -----
D ii ij
5-638
i1
D
L
U
kk ik kj , i < j (elements in upper triangular) (EQ 38)
k=0
Substation modelling
At any time step, if Y does not change from the previous step, the LDU decomposition needs
not to be redone. If Y changes due to either a switching or a change of behaviour of some nonlinear elements, then the LDU decomposition must be recalculated.
In Hypersim, for saving space, matrices L, D and U are stored in a single Y LDU matrix as
shown in 5 - 5 for an example of 3 nodes: elements of D are on the diagonal, elements of L
and U (except their diagonal) are respectively in the lower left and upper right triangular.
D 11 U 12 U 13
L 21 D 22 U 23
L 31 L 32 D 33
Figure 5 - 5 : Example of a Y LDU matrix and a part of it which
needs to be recalculated if a resistor connected to node 2 changes
All equivalent resistors of power elements contributing to Y are connected either between a
node k and the ground node or between two nodes k and m. According to equations 35 to 38,
if a resistor connected to node k change its value, this will change at least the value of Y kk .
Therefore D ii , L ij and U ij , for all i andj k , have to be re-evaluated. In the Y LDU matrix
shown in 5 - 5, this corresponds to elements in the square bloc below and in the right starting
from D kk (k = 2 in this example).
For the purpose of saving the computation time, Hypersim orders the Y and Y LDU matrices
such as nodes connected to varying elements are grouped together and correspond to the lower right part of these matrices.
H Sparsity of Y
matrix
The Y matrix is normally sparse, it means that many elements are 0. To avoid calculation with
zero elements, Hypersim keep a matrix YF indicating the state of each element of Y:
YF ij = 1 if Y ij 0
YF ij = 0 if Y ij = 0
I Sequence of
operations needed
for node equation
solution
Hypersim preforms the simulation of substations in two parts: The off-line preparation executed on the workstation where the Hypersims GUI has been launched, and the simulation
executed either in real-time on parallel computer or in non-real-time on workstation. The non
real-time simulation can run either on the same workstation as the GUI or on another computer.
5-639
Preparation
To calculate parameters for all power elements and the substations node equation, the preparation operations are:
1 Read elements parameters from the parameter form.
2 Define node signals: voltages and currents.
3 Define elements signals: voltages (except node voltages), currents (source, historic), control
signals.
4 Calculate the fixed part Y ini as initial admittance of all elements, as well as other elements
parameters needed during the simulation.
5 Calculate the fixed part Y INI and initialize the substation admittance matrix Y to this value.
6 Reorder Y such as varying elements will affect only the lower right part of Y
7 Download Y INI , Y ini and other simulation parameters needed to the simulation program.
Simulation
At each step of simulation, the following operations are required to simulate power elements
and solve the node equation of a substation:
1 Determine the commands of switches (used to turn them on or off)
2 Determine states of switches
3 If needed (some switches have changed their state or some non-linear elements have
changed their operation point), determine the area of matrix Y needed to be re-evaluated due
to elements which has changed their operating point.
Re-calculate this part of Y.
4 If needed (as above), perform the LDU decomposition of the lower-right bloc of the Y LDU
matrix
9 Calculate elements historic current I hist as well as all other signals it needs.
10 Re-initialize node currents I to [0] for the next step
11 Add elements historic currents I hist to node current I.
12 Calculate control functions
5-640
As mentioned in the line modelling, lines are equivalent to current sources in parallel to resistors at each line end. Current sources at each end depend only on the past value of line voltages and currents of both ends. Variations at one end will therefore affect the other end at one
transmission delay later. The transmission speed is about the light speed which is 300 000 km/
s. A 30km line has a transmission delay of 100 s.
Due to the transmission delay, in a network composed of lines and substation as shown in 5
- 6a, following tasks can be performed in parallel:
Substation tasks solving substation node equations which include also line-end equivalents (current sources in parallel with resistors) and simple control systems,
Line tasks calculating line equivalents at each line end.
Certain complex substations can have complex control systems like an ac-dc conversion station, generation station with machine models. These substations are simulated
with many tasks: one for solving the node equation and others for control systems.
In non real-time mode running in a single processor, all tasks are given to the same processor.
With a parallel computer, tasks are distributed among parallel processors using a task mapping algorithm based on following criteria: execution time of each task, available time of processor, communications needed and communication link available, IO needed and IO
availability etc.
Simple
substation
Line
Complex
substation
Line
Simple
substation
Line
Task
Substation
Task
(a)
Substation
Task
Line
Task
Substation
Task
Substation
control
task #1
Substation
control
task #2
(b)
5-641
Hypersim provides a fairly large library of models for power elements and control blocs. User
can also build model graphically using subsystem containing Hypersims elements and blocs.
For some cases, available models and blocs in Hypersim are not sufficient to represent some
particular needs. This is why User Code Model (UCM) is introduced.
Bus1
Bus3
Bus2
Bus4
T1
In
UCM
T2
A UCM is a component located inside a substation. It is simulated together with other components of the same substation. The UCM is composed of a power part and a control part.
The power part has external nodes (graphically visible) and internal nodes (invisible). This
part is represented as an admittance matrix which will be added to the substation admittance
matrix to solve the node equation. he UCMs admittance matrix can be linear or non-linear.
The control part perform user define control functions using signals from the UCMs control
inputs and internal signals, then produces signals to send to the UCMs control outputs or to
be used internally.
The UCM has its admittance matrix Y eq composed of a fixed part Y ini and a varying part
Y add :
Y eq = Y ini + Y add
5-642
(EQ 39)
Composition of an UCM
The admittance matrix has a certain degree of sparsity. This is indicated by the matrix Yfill:
Yfill ij = 0 if Y eq, ij = 0
(EQ 40)
Yfill ij = 1 if Y eq, ij 0
(EQ 41)
The dimension of all these matrices is the total number of external and internal nodes.
The UCM can have current sources as well as historic currents injected to internal / external
nodes.
The code provided by user has the purpose of calculating the admittance matrix, currents
sources, historic currents and perform all desired control functions.
5.3.3 Composition of
an UCM
A
Input parameters
B Calculated
parameters
Input parameters are those that will be in the parameter form. They can be modified once the
UCM is inserted in the Hypersim diagram.
These parameters are calculated by the Preparation function to be used in the Simulation
functions. The purpose is to avoid doing the same calculation at every time step, thus reducing
the simulation execution time.
C Power nodes
Power nodes can be external or internal. External nodes are graphically visible and will be
connected to bus bars. Internal nodes are not visible. Hypersim will include all UCMs internal and external nodes into the substations node equation and calculates their voltages. Hypersim provides utilities to user to access UCMs node voltages.
D Control IOs
Control inputs allow an UCM to get informations coming from other systems while control
outputs allow to send out informations computed by the UCM. The control outputs can be
connected to other systems or simply used for monitoring purpose.
E Preparation
The Preparation function prepares the parameters needed during the simulation. The objective is to reduced the calculation effort during the simulation.
function
5-643
F Simulation
functions
The Simulations functions of the UCM is compiled together with the simulation code generated by Hypersim to form the Simulation program. This simulation program runs either in
real-time or non real-time mode and communicates with the Hypersims GUI for simulation
control purpose.
The Simulation functions include: Initialization function executed only once at the beginning
of the simulation, preVNode (calculations done before the solution of node voltages) and
postVNode (calculation after the solution of node voltages) executed at every time step.
Initialization
This function is executed once only at the beginning of the simulation to perform various initializations needed by the UCM: set default parameters, initialize counters, etc.
Function preVNode
This function is called prior to the calculation of node voltages by Hypersim. It performs the
following tasks:
Determine switchs commands and switchs states
Calculate Y add by taking into account the switchs state and new non-linear operating
point.
Indicate nodes which are affected by changing in Y add
Calculate currents sources.
Note: Voltage sources must be converted to current sources using Norton equivalent
Function postVNode
This function is called after the calculation of node voltages to
Calculate historics currents,
Determine new operating point of non-linearities,
Perform control functions and other calculations.
5.3.4 Building an
UCM through
an example
A
Functional
description of the
UCM in example
The example of an UCM show in 5 - 8 covers many aspects in the UCM coding. It has current
sources, historic currents, non-linearity, internal and external nodes as well as control inputsoutputs.
5-644
Calculate
3 phase
sine wave
Rs
NI
IL
VL_a
VL_b 3 phase
VL_c rectifier
Lvec
Vinc
VLrec
VLrec
Ind
NE
Input parameters
Rs: internal resistor of voltage source
Lvec, Vinc, Ldim: the non linear inductor depends on the rectified three-phase voltage across it. It is define as a table Lvec of Ldim inductance values picked at regular
intervals of voltage Vinc.
freq: frequency of the source.
Power nodes
NE: three-phase external node. It is visible to allow user to connect it to a three-phase
bus bar.
NI: three-phase internal node. It is not graphically visible on the Hypersim diagram,
but Hypersim calculates its voltages and makes them available to user.
Current sources
Currents sources are named (by user) Isrc_a, Isrc_b, Isrc_c. They are calculated
by dividing the voltage source value to its internal resistor Rs.
Note : For a multi-phase currents, their name must be terminated by _a, _b, _c.
Historic currents
The non-linear inductor has historic currents. They are named (by user) Ihist_a,
Ihist_b, Ihist_c and calculated according to the EMTP model of inductor.
Note : For a multi-phase historic currents, their name must also be terminated by _a, _b,
_c.
D UCM utilities
available to user
Followings are various utilities (under #define forms) to provide communication between
Hypersim and the UCM:
double ucmVNode (int nodeNum): obtain the node voltage calculated by Hypersim for node number nodeNum which can be the node order number (0, 1, 2, ...) or its
symbolic name (NE_a, NE_b, ...)
Ex: ucmVNode(0) or ucmVNode(NE_a)
5-646
double ucmYini(int node1, int node2): element of the matrix Y ini of the
UCM corresponding to row node1 and column node2. Y ini is calculated by user but
the space for this matrix is allocated by Hypersim.
Ex: ucmYini (NI_a, NI_a) = (1.0/Rs) + (1.0/GL)
or ucmYini(0, 0) = (1.0/Rs) + (1.0/GL)
double ucmYadd(int node1, int node2): element of the matrix Y add of the
UCM corresponding to row node1 and column node2. Y add is calculated by user
but the space for this matrix is allocated by Hypersim.
Ex: ucmYadd(NI_a, NE_a) = -GaddVec[0]
int ucmYfill(int node1, int node2): element of the matrix Y fill of the
UCM corresponding to row node1 and column node2. Y fill is determined by user
but the space for this matrix is allocated by Hypersim.
Ex: ucmYfill (1,2) = 0
int ucmNodeChange(int node): nodeth element of vector NodeChange. this
vector is also allocated by Hypersim.
Ex: ucmNodeChange(NE_b) = 1
double ucmTimeStep: obtain the current simulation time step.
Ex: G = ucmTimeStep / (2.0 * L)
E Editing the UCM
Before starting to build a new UCM, select the preferred editor by the command
setenv EDITOR myEditor
myEditor is either vi, xemacs, gedit, etc.
To start editing an UCM from scratch, go into the directory where the UCM will be
constructed (edited. compiled) and launch the script
ucm myUCM
myUCM is the UCM name. In our case we choose Example as the UCM name.
If this is a new UCM, the editor of your choice will be activated and filled with a documented
template to allow user to fill various sections of an UCM definition file named
ucm_myUCM.def, in our case the UCM definition file will be ucm_Exemple.def.
When the editing of the UCM definition file is completed, save it and exit from the editor.
The ucm script will continue to check for errors and build the UCM codes required by Hypersim.
If myUCM is an already existing UCM, the script will not activate the editor but goes right to
the error checking and building codes.
5-647
To modify an existing UCM, just edit the ucm_myUCM.def file, save it and launch again
the script
ucm myUCM
Naming conventions
Many utilities provided by Hypersim start with three letters ucm. Therefore DO NOT
use variable or function name starting with ucm (for example ucmFreqency) to
avoid duplication error.
Although power nodes are entered as multiphase, all calculation must be done on perphase basis. Single phase node is specified either by nodeName_phase (for example
NI_a) or by its ordering number. As with our example above, nodes are numbered and
named as follows (if NE is defined before NI):
0: NE_a
1: NE_b
2: NE_c
3: NI_a
4: NI_b
5: NI_c
Name of multiphase current sources and historic currents must be terminated with _a,
_b, _c, etc. to indicate the phase they belong to. Ex: Isrc_a, Ihist_b.
User must declare variables and functions he uses except certain variables which are
mandatory for UCM. They are allocated by Hypersim and user can access to them by
UCM utilities described above. The mandatory variables already allocated by Hypersim are:
5-648
ucm_myUCM.def
myUCM_ucm_gen
ucm_myUCM_prep.h
ucm_myUCM_prep.c
ucm_myUCM_sim.h
ucm_myUCM_sim.c
%%
%%
%%
%%
%%
%%
%%
%%
%%
%%
%%
%%
%%
%%
%%
%%
%%
%%
%%
%%
%%
%%
%%
%%
%%
%%
%%
%%
%%
%%
%% 6- Current sources.
%% 7- Historical currents.
%%
%% II- Preparatory data preprocessing.
%% 8- Calculated values.
%%
8.1- Calculated parameters table.
%%
8.2- (Calculated Load Flow values. NOT IMPLEMENTED!!!)
%%
8.3- Preparation function code.
%%
8.3.1- Function's global code.
%%
8.3.2- Parameters & initial admittance matrix (Yini) calculation code.
%%
8.3.3- (Load Flow results calculation code. NOT IMPLEMENTED!!!)
%%
8.4- Includes paths list.
%%
8.5- Required libraries list.
%%
8.6- Required libraries paths list.
%%
%% III- Model simulation.
%% 9- Simulation code.
%%
9.1- Historical values table.
%%
9.2- Test points table.
%%
9.3- Simulation functions global code.
%%
9.4- Simulation initialization function.
%%
9.5- Before nodes voltage calculation function code.
%%
9.5.1- Sources calculation.
%%
9.5.2- Command selection.
%%
9.5.3- Admittances matrix calculation (YMadd).
%%
9.6- After nodes voltage calculation function code.
%%
9.6.1- Historical values calculation.
%%
9.6.2- Commands outputs calculation.
%%
9.6.3- Determine nodes to recalculate.
%%
9.7- Includes paths list.
%%
9.8- Required libraries list.
%%
9.9- Required libraries paths list.
%%
%% ----------------------------------------------------------------------------%% Beginning of model definition:
%% ----------------------------------------------------------------------------%%
%% I- Model description.
%%
%% 1- General informations or parameters.
%%
----------------------------------%%
%%
UCM_NAME:
Model Unique Name, already assigned
%%
UCM_TYPE:
Model type (Choice of NetworkElement or CommandBlock)
%%
Default: NetworkElement.
%%
UCM_CATEGORY: Model category (Breaker, Transformer, etc.)
%%
UCM_VERSION: User's model version number (in a string)
%%
UCM_EXEC_TIME: Estimated model's average simulation step time.
%%
Default: 5.0e-6 s.
%%
UCM_DESCRIPTION: Short description of model (one phrase).
%%
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN GENERAL INFORMATION -- Enter or modify general information
UCM_NAME
UCM_TYPE
UCM_CATEGORY
UCM_VERSION
UCM_EXEC_TIME
UCM_DESCRIPTION
=
=
=
=
=
=
Example
NetworkElement
User
1.0
5.0e-6
Voltage source with non-linear inductor
%%
%% 2- Model's documentation.
%%
---------------------%%
%%
Enter text or reference after comments.
%%
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN DOCUMENTATION -- Enter model's documentation after this line...
Three-phase sine-wave voltage source with
- Programmable amplitude of sine waves
- Voltage sources have resistor in series with non-linear inductor
at output
- Inductor voltages are rectified and sent out for display
%% END DOCUMENTATION
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
%% 3- Form parameters (tunables).
%%
%%
Form parameters can be changed by the user, through an editable form
%%
or by any other public mean. Parameters definitions
%%
are in a tabular form.
%%
%%
3.1- General parameters table (10 columns).
%%
Contains the general parameters of the model.
%%
%%
Format: ( 10 columns records)
%%
%%
Name Tag Units Type Size Default Min Max Flags Description
%%
---- --- ----- ---- ---- ------- --- --- ------ ----------%%
%%
Columns descriptions:
%%
%%
Name
: Unique name of parameter (in model's scope).
%%
Tag
: Descriptive name to use in forms.
%%
Units
: Parameter's units.
%%
Text field : Must follows the SI symbols definitions.
%%
Enter a "-" when not used
%%
Type
: Type of parameter
%%
Enter: intInteger value(s)
%%
double Real value(s)
%%
Size
: Parameter size (1->n).
%%
1 defines a scalar.
%%
Default
: Default value(s) of parameter.
%%
v : Default value for a scalar or an array.
%%
(all array's cell will have the same value).
%%
[v1 v2 v3 ... vn] : Default values for an array.
%%
The last value will be propagated to remaining of array
%%
if the default value set is smaller than the array.
%%
Min
: Minimum value allowed.
%%
Max
: Maximum value allowed.
%%
Flags
: Ored values of flags definitions or '-'.
%%
Available values :
%%
NOT_SIMUL_MOD : Cannot be modified during simulation.
%%
Description : Short description of parameter (BETWEEN DOUBLE QUOTES)
%%
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN TUNABLE PARAMETERS -- Enter parameters table after this line...
Rs
"Rs"
5-651
Lvec
10.0
Vinc
Ldim
freq
"Lvec"
H
- "Lvec"
"Vinc" V
"Ldim" "freq" Hz
double 9 [1.0 0.60 0.36 0.22 0.13 0.08 0.04 0.03 0.01] 0.0
double 1 500 0.0 1000 - "Vinc"
int
1 9 0.0 10.0 - "Ldim"
double 1 60.0 30.0 90.0 - "freq"
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
%% 4- Control IOs.
%%
-----------%%
%%
Control IOs will be visible on network schematics as inputs
%%
and outputs connectors.
%%
%%
Control IOs definitions table (7 columns).
%%
%%
Format: ( 7 fields records)
%%
%%
NOTE: All control connectors have a UNITARY width
%%
but they can be grouped.
%%
%%
Name Units Type Direction Position Group Description
%%
---- ----- ---- --------- -------- ----- ----------%%
%%
Fields descriptions:
%%
%%
Name
: Connector's unique identifier (tag).
%%
%%
Units
: Signal's units.
%%
Text field: use the official SI symbols.
%%
Enter a "-" when not used
%%
Type
: Signal type
%%
Enter: int
: Integer
%%
double : Real double precision
%%
Direction
: Enter: in
For model's input signal
%%
out For model's output signal
%%
Position
: Position of connector around the Ucm box
%%
in schematic.
%%
Choice of :
%%
left, right, top, bottom, auto
%%
Group
: Group name or "-" for "no group".
%%
All the connectors with the same group name
%%
will use a single "multiplexed" connector
%%
bearing the group name.
%%
Description
: Short description of connector.
%%
(BETWEEN DOUBLE QUOTES)
%%
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN CONTROL IOS -- Enter control IOs table after this line...
A
IL_a
IL_b
IL_c
VLrec
Ind
5-652
V
A
A
A
V
-
double
double
double
double
double
double
in
out
out
out
out
out
auto
auto
auto
auto
auto
auto
I
I
I
-
"Voltage Amplitude"
"L current, phase a"
"L current, phase b"
"L current, phase c"
"Rectified L voltage"
"Current index in Lvec"
3
3
extern
intern
top
-
yes
yes
"Network Connection"
"Internal node"
5-653
%%
Node name
: The name of a node defined in section 4.
%%
ground
: Connected to ground.
%%
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN CURRENT SOURCES -- Enter sources table after this line...
Isrc_a
Isrc_b
Isrc_c
NI_a
NI_b
NI_c
ground
ground
ground
NE_a
NE_b
NE_c
NI_a
NI_b
NI_c
5-654
%%
---- ----- ---- ---- ----------%%
%%
Columns descriptions:
%%
%%
Name
: Unique name of parameter (in model's scope).
%%
Units
: Parameter's units.
%%
Text field : Must follows the SI symbols definitions.
%%
Enter a "-" when not used
%%
Type
: Type of parameter
%%
Enter: intInteger value(s)
%%
double Real value(s)
%%
Size
: Parameter size (1->n).
%%
1 defines a scalar.
%%
Description : Short description of parameter (BETWEEN DOUBLE QUOTES)
%%
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN CALCULATED PARAMETERS -- Enter parameters table after this line...
GaddVec
Lchanged
Lindex
omega
period
double
int
int
double
double
9
1
1
1
1
"GaddVec"
"Lchanged"
"Lindex"
"omega"
"period"
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
%%
8.3- Preparation function code.
%%
Contains the code to produce the calculated values .
%%
%%
8.3.1- Functions global code.
%%
The following code will be at the beginning of the
%%
preparatory code file.
%%
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN PREPARATORY GLOBAL CODE -- Enter code under the appropriate comment...
/* 8.3.1.1 -- User includes */
#include <stdio.h>
/* 8.3.1.2 -- Definitions */
/* 8.3.1.3 -- Declarations */
/* 8.3.1.4 -- Local functions (static) */
%% END PREPARATORY GLOBAL CODE
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
%%
8.3.2- Parameters & initial admittance matrix (Yini) calculation code.
%%
%%
Enter code here to calculate the initial admittance matrix
%%
and the calculated parameters.
%%
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN PREPARATION FUNCTION CODE -- Enter code after this line...
int
i, j;
5-655
5-656
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
%%
8.4- "Includes" paths list.
%%
Enter paths of your include files separated by spaces after "=".
%%
Put an "\" at end of line to continue list on next line.
%%
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN PREPARATORY INCLUDES PATHS LIST -- Modify the following list...
UCM_PREP_INCLUDES_PATHS =
%% END PREPARATORY INCLUDES PATHS LIST
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
%%
8.5- Required dependency libraries pathnames list.
%%
%%
Enter the pathnames of your dependency libraries
%%
separated by spaces after "=".
%%
Put an "\" at end of line to continue list on next line.
%%
%%
NOTE :
%%
%%
Use the following special names to select the proper paths and/or
%%
libraries names if needed. They will be replaced according to
%%
the system architecture.
%%
%%
<UCMA_DIR>
: Will be replaced by a directory name
%%
according to the computer/os
%%
combination you have.
%%
<UCMA_LIB_SUFFX> : Current library name suffix (Ex.: .a).
%%
<UCMA_LIB_RSUFFX> : Current dynamic library name suffix
%%
(Ex. : .so).
%%
<UCMA_LIB_PREFX> : Current library name prefix (Ex.: lib).
%%
%%
Exemples :
%%
%%
UCM_PREP_DEP_LIBS_PATHNAMES = \! Always the same library
%%
/usr/ucm/libmath.a
%%
%%
UCM_PREP_DEP_LIBS_PATHNAMES = \! Change according to architecture
%%
/user/ucm/libs/<UCMA_DIR>/<UCMA_LIB_PREFX>math<UCMA_LIB_SUFFX>
%%
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN PREPARATORY DEPENDANT LIBRARIES LIST -- Modify the following list...
UCM_PREP_DEP_LIBS_PATHNAMES =
%% END PREPARATORY DEPENDANT LIBRARIES LIST
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
%%
8.6- Required libraries for preparatory functions.
%%
Enter full paths or lib notation (-Lpath -llibrary) of your
%%
libraries separated by spaces after "=".
%%
Put an "\" at end of line to continue list on next line.
%%
%%
ARCHITECTURE DEPENDANT PATHS: See NOTE in section 8.5
%%
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN PREPARATORY LIBRARIES LIST -- Modify the following list...
5-657
UCM_PREP_LIBRARIES =
%% END PREPARATORY LIBRARIES LIST
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
%% III- Model simulation.
%%
%% This sections deals with model's simulation topics.
%%
%% 9- Simulation code.
%%
%%
Code to simulate the model can be executed before or after the nodes
%%
voltages calculations. Code that change topology and cause
%%
recalculation of admittances matrix (YMadd) must be executed before.
%%
%%
9.1- Historical values table.
%%
%%
Contains the historical values of the model.
%%
Historical values are used to keep data from step to step.
%%
%%
Format: ( 5 columns records)
%%
%%
Name Type Size Default Description
%%
---- ---- ---- ------- ----------%%
%%
Columns descriptions:
%%
%%
Name
: Unique name of historical (in model's scope).
%%
Type
: Type of historical value
%%
Enter: intInteger value(s)
%%
double Real value(s)
%%
Size
: Historical value size (1->n).
%%
1 defines a scalar.
%%
Default
: Default value(s).
%%
v : Default value for a scalar or an array.
%%
(all array's cell will have the same value).
%%
[v1 v2 v3 ... vn] : Default values for an array.
%%
The last value will be propagated to remaining of array
%%
if the default value set is smaller than the array.
%%
Description : Short description of historical value
%%
(BETWEEN DOUBLE QUOTES)
%%
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN HISTORICAL VALUES -- Enter the table after this line...
time double 1 0.0 "time"
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
%%
9.3- Simulation functions global code.
%%
The following code will be at the beginning of the
%%
simulation functions file.
%%
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN SIMULATION GLOBAL CODE -- Enter code under the appropriate comment...
/* 9.3.1 -- User includes */
5-658
#include <math.h>
/* 9.3.2 -- Definitions */
/* 9.3.3 -- Declarations */
/* 9.3.4 -- Local functions (static) */
%% END SIMULATION GLOBAL CODE
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
%%
9.4- Simulation initialization function.
%%
Code executed once before simulation starts.
%%
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN SIMULATION INITIALIZATION FUNCTION CODE -- Enter code ->...
time = 0;
Lindex = 0;
Lchanged = 0;
/* 2.0 Pi / 3 */
5-659
ucmYadd(NI_b,NE_b) = -GaddVec[Lindex];
ucmYadd(NE_b,NE_b) = GaddVec[Lindex];
ucmYadd(NI_c,NI_c) = GaddVec[Lindex];
ucmYadd(NI_c,NE_c) = -GaddVec[Lindex];
ucmYadd(NE_c,NE_c) = GaddVec[Lindex];
/* Indicate to Hypersim that nodes are affected by */
/* non-linear change */
ucmNodeChanged(NI_a) = ucmNodeChanged(NE_a) = 1;
ucmNodeChanged(NI_b) = ucmNodeChanged(NE_b) = 1;
ucmNodeChanged(NI_c) = ucmNodeChanged(NE_c) = 1;
}
5-660
Lchanged = 0;
index = (int)(VLrec / Vinc);
if (index > Ldim-1)
index = Ldim - 1;
if (index < 0)
index = 0;
if (index != Lindex)
{
Lindex = index;
Lchanged = 1;
}
Ind = Lindex;
/* Other calculations */
time += ucmTimeStep;
if (time >= period)
time -= period;
5-661
UCM_SIMULATION_LIBRARIES =
%% END SIMULATION LIBRARIES LIST
%% END OF FILE
Figure 5 - 9 Dialogue box to choose an UCM and put into the Hypersim
diagram
In the dialogue box:
Form name is the name of the customized parameter form (not yet implemented).
The files with extension .ucm in the list are all UCMs available in the User Code
Bloc Directory defined above.
5-662
The selected UCM appears in the diagram with its power connectors representing external nodes and control IOs. Internal nodes are not visible.
The UCM can then be connected inside a Hypersim diagram as usual. The Example
UCM with a simple network is shown in 5 - 10.
Double click on an UCM will bring up its parameter forms which show the list of all
input parameters. User can change them as with any other model in Hypersim.
In the Simulation mode, point the UCM, right click and execute the command Edit Sensors to bring up the UCMs sensor list and choose those to be plotted in ScopeView.
Sensors available are
Current sources
Historic currents
Control IOs
To monitor any UCM internal signals, user must define them as control outputs such that they
will be accessed via the sensor list.
All sensor names, except for control inputs, have the same names as they are define in the
UCM file. Sensors of control inputs take the name of signals connected to them.
5.3.6 Management of
library of UCMs
An UCM can be put in Hypersims library and then it becomes accessible through the Hypersim component palette as any other model.
The procedure to put an UCM into Hypersims library is the same as with a sub-
system, a hyperlink model or an user code block (UCB). Refer to Part I, chapter
Model libraries for details.
5-663
Description
Build an UCM to represent a three-phase resistor connected in Y, the neutral is grounded. The
parameters of the UCM is the vector R[3] of 3 values of resistance. The resistors are connected to the external node T. Calculate the current in each phase and send them to control
outputs Ia, Ib, Ic which are grouped together and sent to connector I.
R[3]
B Codes
Ia,Ib,Ic
I
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN GENERAL INFORMATION -- Enter or modify general information
UCM_NAME
UCM_TYPE
UCM_CATEGORY
UCM_VERSION
UCM_EXEC_TIME
UCM_DESCRIPTION
=
=
=
=
=
=
Resistor
NetworkElement
User
"1.0"
5.0e-6
"Resistor 3 phase-ground" # Description du modele
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN DOCUMENTATION -- Enter models documentation after this line...
Documentation de Exemple.
--------------------Three-phase resistor connected in Y grounded
%% END DOCUMENTATION
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN TUNABLE PARAMETERS -- Enter parameters table after this line...
R "R" - double 3 [1.0 1.0 1.0] 0.0 1.0e12 - "R"
%% END TUNABLE PARAMETERS
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5-664
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN CONTROL IOS -- Enter control IOs table after this line...
Ia
Ib
Ic
- double 3 "Equiv.conductance"
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN PREPARATION FUNCTION CODE -- Enter code after this line...
int
i, j;
C Exercise
Build an UCM to represent a three-phase resistor connected in delta. Use control outputs to
send out phase-to-phase voltages and resistors currents.
5.4.2 Inductor
A
Description
T
Ia,Ib,Ic
Lval[3]
B Codes
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN GENERAL INFORMATION -- Enter or modify general information
UCM_NAME
UCM_TYPE
UCM_CATEGORY
UCM_VERSION
UCM_EXEC_TIME
5-666
=
=
=
=
=
Inductor
NetworkElement
User
"1.0"
5.0e-6
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN PREPARATION FUNCTION CODE -- Enter code after this line...
int
i, j;
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN AFTER VOLTAGE CALCULATION -- Enter code ->...
Ia = ucmVNode(T_a) * G[0] + Ihist_a;
Ihist_a = Ia + ucmVNode(T_a) * G[0];
Ib = ucmVNode(T_b) * G[1] + Ihist_b;
Ihist_b = Ib + ucmVNode(T_b) * G[1];
Ic = ucmVNode(T_c) * G[2] + Ihist_c;
Ihist_c = Ic + ucmVNode(T_c) * G[2];
%% END AFTER VOLTAGE CALCULATION CODE
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
C Exercise
5-668
Build an UCM to represent a three-phase RL circuit. R and L are in parallel in each phase.
Use control outputs to send out monitoring signals as needed.
Description
Build an UCM to represent a three-phase RL circuit. R and L are in series and connected together by an internal node Ti. L is grounded while R is connected to the outside by an external
node T.
R[3]
IRa,IRb,IRc
IR
Ti
L[3]
B Code
ILa,ILb,ILc
IL
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN GENERAL INFORMATION -- Enter or modify general information
UCM_NAME
UCM_TYPE
UCM_CATEGORY
UCM_VERSION
UCM_EXEC_TIME
UCM_DESCRIPTION
=
=
=
=
=
=
RL
NetworkElement
User
"1.0"
5.0e-6
"R and L in series" # Description du modele
5-669
%% BEGIN CONTROL IOS -- Enter control IOs table after this line...
ILa
ILb
ILc
IRa
IRb
IRc
A
A
A
A
A
A
double
double
double
double
double
double
out
out
out
out
out
out
auto
auto
auto
auto
auto
auto
IL
IL
IL
IR
IR
IR
"ILa"
"ILb"
"ILc"
"IRa"
"IRb"
"IRc"
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN PREPARATION FUNCTION CODE -- Enter code after this line...
int
5-670
i, j;
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN AFTER VOLTAGE CALCULATION -- Enter code ->...
ILa = ucmVNode(Ti_a) * G[0] + Ihist_a;
5-671
C Exercise
Instead of considering R and L as 2 separated branches as the example above, combine them
together as a combined RL single branch (there is no more internal node). Write down its
equivalent equation using trapezoidal integration rule and build an UCM to represent it. Compare results with those of the example above.
Description
Build a tree-phase sine-wave voltage source. The parameter Amp control the sine wave amplitude and the parameter freq control its frequency. The voltage sources are connected in
Y grounded and each phase have an inductor Ls at its output.
The control outputs I_a, I_b, I_c at the connector I send out the source currents and the
control outputs Db1, Db2, Db3 at connector Db are use for debugging purpose.
T
I_a,I_b,I_c
Ls[3]
I
Db
B Codes
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN GENERAL INFORMATION -- Enter or modify general information
UCM_NAME
UCM_TYPE
UCM_CATEGORY
UCM_VERSION
UCM_EXEC_TIME
UCM_DESCRIPTION
=
=
=
=
=
=
VSrc
NetworkElement
User
"1.0"
5.0e-6
"Three-phase Voltage source with inductor at output"
5-672
Db1
Db2
Db3
T_a ground
T_b ground
T_c ground
5-673
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN CALCULATED PARAMETERS -- Enter parameters table after this line...
Gs
omega
period
- double 3 "Equiv.Conductance"
- double 1 "omega"
- double 1 "period"
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN PREPARATION FUNCTION CODE -- Enter code after this line...
int
i, j;
doubleGLo, Lo;
/* Calculate equivalent conductances of Inductances */
Gs[0] = ucmTimeStep / (2.0 * Ls[0]);
Gs[1] = ucmTimeStep / (2.0 * Ls[1]);
Gs[2] = ucmTimeStep / (2.0 * Ls[2]);
/* Initialize Yini and Yfill */
for (i = 0; i < 3; i++)
{
for (j = 0; j < 3; j++)
{
ucmYini(i,j) = 0.0;
ucmYfill(i,j) = 0;
}
}
/* Calculate Yini and determine Yfill */
ucmYini(T_a, T_a) = Gs[0];
ucmYini(T_b, T_b) = Gs[1];
ucmYini(T_c, T_c) = Gs[2];
ucmYfill(T_a, T_a) = 1;
ucmYfill(T_b, T_b) = 1;
ucmYfill(T_c, T_c) = 1;
/* Calculate other Simulation parameters */
period = 1.0 / freq;
omega = 2.0 * 3.141593 * freq;
%% END PREPARATION FUNCTION CODE
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN HISTORICAL VALUES -- Enter the table after this line...
5-674
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN BEFORE VOLTAGE CALCULATION CODE -- Enter code ->...
/* User code: calulate Yadd */
int i;
doubleVsrc_a, Vsrc_b, Vsrc_c;
doubleTwoPiOver3 = 2.094395333; /* 2.0 Pi / 3 */
/* Calculate source voltages */
Vsrc_a = Amp * sin (omega * time);
Vsrc_b = Amp * sin (omega * time - TwoPiOver3);
Vsrc_c = Amp * sin (omega * time + TwoPiOver3);
/* Calculate current sources */
Isrc_a = Vsrc_a * Gs[0];
Isrc_b = Vsrc_b * Gs[1];
Isrc_c = Vsrc_c * Gs[2];
%% END BEFORE VOLTAGE CALCULATION CODE
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN AFTER VOLTAGE CALCULATION -- Enter code ->...
double Vsrc_a, Vsrc_b, Vsrc_c;
Vsrc_a = Isrc_a / Gs[0];
Vsrc_b = Isrc_b / Gs[1];
Vsrc_c = Isrc_c / Gs[2];
/* Calculate output currents and historic currents */
I_a = (Vsrc_a - ucmVNode(T_a)) * Gs[0] + Ihist_a;
Ihist_a = I_a + (Vsrc_a - ucmVNode(T_a)) * Gs[0];
I_b = (Vsrc_b - ucmVNode(T_b)) * Gs[1] + Ihist_b;
Ihist_b = I_b + (Vsrc_b - ucmVNode(T_b)) * Gs[1];
I_c = (Vsrc_c - ucmVNode(T_c)) * Gs[2] + Ihist_c;
Ihist_c = I_c + (Vsrc_c - ucmVNode(T_c)) * Gs[2];
5-675
/* Other calculations */
time += ucmTimeStep;
if (time >= period)
time -= period;
/* Debugging outputs */
Db1 = I_a;
Db2 = Ihist_a;
Db3 = time;
%% END AFTER VOLTAGE CALCULATION CODE
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
C Exercise
Build an UCM to model a three-phase sine-wave voltage source with the possibility of modulating the sine-wave amplitude. The modulating signal is a triangular wave of slow frequency.
5.4.5 Non-linear
inductance
A
Description
The thee-phase non-linear inductor has its value depending on the rectified three-phase voltage across it. The non linearity is defined by an inductance table Lvec of dimension Ldim
values picked at regular voltage interval Vinc.
The inductor is connected to the network by it external node T. Three phase currents Ia, Ib,
Ic are sent out to the connector I, the rectified three-phase voltage across L is sent out at
connector Vrec. The inductor has Y grounded configuration.
T
Lvec
Ia,Ib,Ic
I
V
Rectifier
Vrec
Vinc
B Codes
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN GENERAL INFORMATION -- Enter or modify general information
UCM_NAME
UCM_TYPE
UCM_CATEGORY
UCM_VERSION
UCM_EXEC_TIME
5-676
Vrec
=
=
=
=
=
Lnlin
NetworkElement
User
"1.0"
5.0e-6
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN DOCUMENTATION -- Enter models documentation after this line...
Non-linear inductor:
L depend on rectified value of three-phase voltages across it
%% END DOCUMENTATION
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN TUNABLE PARAMETERS -- Enter parameters table after this line...
Lvec "Lvec" H double 9 [1.0 0.60 0.36 0.22 0.13 0.08 0.04 0.03 0.01] 0.0 10.0 - "Lvec"
Vinc "Vinc" V double 1 500 0.0 1000 - "Vinc"
Ldim "Ldim" - int
1 9 0.0 10.0 - "Ldim"
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN CONTROL IOS -- Enter control IOs table after this line...
Ia
Ib
Ic
Db1
Db2
Db3
Vrec
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN CALCULATED PARAMETERS -- Enter parameters table after this line...
GaddVec
Lchanged
Lindex
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN SIMULATION INITIALIZATION FUNCTION CODE -- Enter code ->...
Lindex = 0;
Lchanged = 0;
%% END SIMULATION INITIALIZATION FUNCTION CODE
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN BEFORE VOLTAGE CALCULATION CODE -- Enter code ->...
/* User code: calulate Yadd */
int i;
/* Initialize indication of nodes affacted by changing in L */
for (i = 0; i < 3; i++)
ucmNodeChanged(i) = 0;
/* If L has been changed, determine the additional conductance and
indicate that corresponding nodes are affected */
if (Lchanged)
{
ucmYadd(T_a,T_a) = GaddVec[Lindex];
ucmYadd(T_b,T_b) = GaddVec[Lindex];
ucmYadd(T_c,T_c) = GaddVec[Lindex];
ucmNodeChanged(T_a) = 1;
ucmNodeChanged(T_b) = 1;
ucmNodeChanged(T_c) = 1;
}
%% END BEFORE VOLTAGE CALCULATION CODE
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN AFTER VOLTAGE CALCULATION -- Enter code ->...
doubleLo, GLo, GL;
doubleVL_a;
doubleVL_b;
doubleVL_c;
int index;
/* Calculate rectified of 3 phase voltage across L */
VL_a = ucmVNode(T_a);
VL_b = ucmVNode(T_b);
VL_c = ucmVNode(T_c);
Vrec = fabs(VL_a);
if (Vrec < fabs(VL_b))
Vrec = fabs(VL_b);
if (Vrec < fabs(VL_c))
Vrec = fabs(VL_c);
/* Calculate historic currents */
5-679
Lo = Lvec[0];
GLo = ucmTimeStep / (2.0 * Lo);
GL = GLo + GaddVec[Lindex];
Ia = VL_a * GL + Ihist_a;
Ihist_a = Ia + VL_a * GL;
Ib = VL_b * GL + Ihist_b;
Ihist_b = Ib + VL_b * GL;
Ic = VL_c * GL + Ihist_c;
Ihist_c = Ic + VL_c * GL;
/* New operating point of L: calculate the index in the non-linear table */
Lchanged = 0;
index = (int)(Vrec / Vinc);
if (index
index
if (index
index
>
=
<
=
Ldim-1)
Ldim - 1;
0)
0;
if (index != Lindex)
{
Lindex = index;
Lchanged = 1;
}
/* Debugging signal */
Db1 = Lchanged;
Db2 = index;
Db3 = 0.0;
%% END AFTER VOLTAGE CALCULATION CODE
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5-680