Documente Academic
Documente Profesional
Documente Cultură
Version 9.3
Reference Guide Manual
Copyright Notice :
Copyright by Hydro Qubec
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
Revision History :
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
ii
Table of
Contents
Part-1
Chapter - 1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
1.2 Organization of Hypersim . . . . . . . . . . . . . . . . . . . . . . 19
1.3 Theory of Operation . . . . . . . . . . . . . . . . . . . . . . . . . 25
1.4 Network Simulation Steps . . . . . . . . . . . . . . . . . . . . . . 26
1.4.1 Editing a Diagram . . . . . . . . . . . . . . . . . . . . . 26
1.4.2 Adding Monitoring Devices . . . . . . . . . . . . . . . . 26
1.4.3 Analysis, Simulation and Control . . . . . . . . . . . . . 26
iii
3.3.4 Base Voltage . . . . . . . . . . . . . . . . . . . . . . . . . . 43
3.3.5 Multiplex Bus . . . . . . . . . . . . . . . . . . . . . . . . . . 43
3.4 Power System Elements . . . . . . . . . . . . . . . . . . . . . . . . . 44
3.4.1 Drawing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
3.4.2 Sensor Label and Symbol . . . . . . . . . . . . . . . . . . . 45
3.4.3 Disconnecting Switches and Connectors . . . . . . . . . . . 45
3.4.4 Electrical Parameters . . . . . . . . . . . . . . . . . . . . . . 46
3.4.5 Copying Parameters . . . . . . . . . . . . . . . . . . . . . . 47
3.4.6 Showing Parameters in a Diagram . . . . . . . . . . . . . . 48
3.5 Interconnecting Elements and Buses . . . . . . . . . . . . . . . . . . 49
3.6 Number of Element Phases . . . . . . . . . . . . . . . . . . . . . . . 50
3.7 POW Element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
3.8 Decoupling Element . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
iv
4.3.2 Graphic Attributes . . . . . . . . . . . . . . . . . . . . . . . 57
4.4 Direct Changes in Position and Form . . . . . . . . . . . . . . . . . . 57
4.4.1 Displacement . . . . . . . . . . . . . . . . . . . . . . . . . . 57
4.4.2 Changing Size . . . . . . . . . . . . . . . . . . . . . . . . . 57
4.5 Changes done from the Menus . . . . . . . . . . . . . . . . . . . . . 58
4.5.1 Group/Ungroup . . . . . . . . . . . . . . . . . . . . . . . . . 58
4.5.2 Front / Back . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
4.5.3 Alignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
4.5.4 Vertical/Horizontal flip, Left/Right flip . . . . . . . . . . . . . 59
4.5.5 Rotation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
4.5.6 Changing Orientation . . . . . . . . . . . . . . . . . . . . . . 59
4.5.7 Cut, Delete, Copy, Paste, Duplicate . . . . . . . . . . . . . 59
4.6 Global Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
4.6.1 Searching for an Object . . . . . . . . . . . . . . . . . . . . 59
4.6.2 Cancelling / Restoring Last Operation . . . . . . . . . . . . 60
4.6.3 Grid. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
4.6.4 Size of Printed Image . . . . . . . . . . . . . . . . . . . . . 60
4.6.5 Diagram Views . . . . . . . . . . . . . . . . . . . . . . . . . 60
4.7 Handling a Diagram File . . . . . . . . . . . . . . . . . . . . . . . . . 61
5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
5.2 Control Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
5.3 Interconnecting Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . 66
5.4 Block Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
5.5 Subsystems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
5.6 Creating Subsystems before using them . . . . . . . . . . . . . . . . 68
5.6.1 Creating Control Ports . . . . . . . . . . . . . . . . . . . . . 68
5.6.2 Creating Power Terminals . . . . . . . . . . . . . . . . . . . 69
5.6.3 Using a subsystem in a Diagram . . . . . . . . . . . . . . . 69
5.6.4 Changing the Detailed Diagram of a Super-Block. . . . . . 70
5.6.5 Changing the Order of the Input / Output Connectors . . . 70
5.7 Creating subsystem from a selected part . . . . . . . . . . . . . . . 71
5.8 Editing in the subsystem content window . . . . . . . . . . . . . . . 71
v
5.9 Subsystem in Simulation Mode . . . . . . . . . . . . . . . . . . . . . 72
5.9.1 Opening / Closing subsystem content . . . . . . . . . . . . 72
5.9.2 Subsystem Sensors . . . . . . . . . . . . . . . . . . . . . . . 72
5.9.3 Changing Parameters . . . . . . . . . . . . . . . . . . . . . 72
5.10 Bloc Array . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
vi
8.2.5 Building the Parameter Form . . . . . . . . . . . . . . . . . 98
vii
11.13 Control Miscellaneous . . . . . . . . . . . . . . . . . . . . . . . 124
Part-2
Chapter - 1 Hypersim Network Models . . . . . . . . . . . . . . . . . . . . . . . . . 133
viii
Chapter - 5 Synchronous Turbine Generators . . . . . . . . . . . . . . . . . . . 191
ix
5.13.1 Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
5.13.2 Programmable Parameters . . . . . . . . . . . . . . . . . . 217
5.14 Generic Shaft . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
5.14.1 Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
5.14.2 Programmable Parameters . . . . . . . . . . . . . . . . . . 220
5.14.3 List of Available Signals . . . . . . . . . . . . . . . . . . . . 221
5.14.4 Thermal Turbine Generator Control Panel . . . . . . . . . 223
5.15 Cross-Compound Thermal Turbine-Generator . . . . . . . . . . . . 227
5.15.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
5.15.2 Cross-Compound Thermal Turbine Generator Model . . . 227
5.16 Speed Regulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
5.16.1 Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
5.16.2 Prog. Parameters . . . . . . . . . . . . . . . . . . . . . . . 229
5.17 Steam Turbine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
5.17.1 Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
5.17.2 Prog. Parameters . . . . . . . . . . . . . . . . . . . . . . . 230
5.17.3 List of Available Signals . . . . . . . . . . . . . . . . . . . . 230
5.18 Multi-Mass Shafts . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
5.18.1 Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
5.18.2 Programmable Parameters . . . . . . . . . . . . . . . . . . 232
x
7.2.2 Coupled Lines . . . . . . . . . . . . . . . . . . . . . . . . . . 275
7.2.3 Triples and Quadruple Lines . . . . . . . . . . . . . . . . . 281
7.2.4 Composed Models: Coupled Lines With Fault
and Quadruple Lines With Fault . . . . . . . . . . . . . . 284
7.3 PI Line Sections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290
7.3.1 PI Lines and PI Lines with Fault . . . . . . . . . . . . . . . . 290
7.3.2 Coupled PI Lines and Coupled PI Lines with Fault . . . . . 294
7.3.3 Triple and Quadruple PI Lines. . . . . . . . . . . . . . . . . 297
7.4 Marti Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303
7.4.1 DC Cable . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
xi
10.2.1 Shunt and Serial Breakers . . . . . . . . . . . . . . . . . . 428
10.2.2 Breaker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433
10.3 Triple-Level Converter in H Configuration . . . . . . . . . . . . . . . 435
10.3.1 Icon and Diagram of a 2 Triple-Level Converter in H
Configuration . . . . . . . . . . . . . . . . . . . . . . . . . 435
10.3.2 Parameter Description . . . . . . . . . . . . . . . . . . . . 436
10.3.3 Switch Parameters . . . . . . . . . . . . . . . . . . . . . . 436
10.3.4 Control Order Source . . . . . . . . . . . . . . . . . . . . . 438
10.3.5 List of Available Signals . . . . . . . . . . . . . . . . . . . . 438
10.4 Three-Level Converter . . . . . . . . . . . . . . . . . . . . . . . . . 439
10.4.1 Icon and Diagram of a 2 Triple-Level Converter in H
Configuration . . . . . . . . . . . . . . . . . . . . . . . . . 439
10.4.2 Parameter Description . . . . . . . . . . . . . . . . . . . . 440
10.4.3 Switch Parameters . . . . . . . . . . . . . . . . . . . . . . 440
10.4.4 Control Order Source . . . . . . . . . . . . . . . . . . . . . 441
10.4.5 List of Available Signals . . . . . . . . . . . . . . . . . . . . 442
xii
11.1.16 Protection system . . . . . . . . . . . . . . . . . . . . . . 457
11.1.17 DC fault protection . . . . . . . . . . . . . . . . . . . . . . 457
11.1.18 Protection for commutation failures . . . . . . . . . . . . 458
11.1.19 Unblocking sequence . . . . . . . . . . . . . . . . . . . . 459
11.1.20 Enabling (start-up) . . . . . . . . . . . . . . . . . . . . . . 459
11.1.21 The tap changer . . . . . . . . . . . . . . . . . . . . . . . 459
11.1.22 Description of parameters . . . . . . . . . . . . . . . . . 460
11.1.23 References . . . . . . . . . . . . . . . . . . . . . . . . . . 461
11.1.24 Converter parameters . . . . . . . . . . . . . . . . . . . . 461
11.1.25 Operating modes . . . . . . . . . . . . . . . . . . . . . . 461
11.1.26 Controller parameters . . . . . . . . . . . . . . . . . . . . 462
11.1.27 Measurement filters . . . . . . . . . . . . . . . . . . . . . 463
11.1.28 Band-pass filters (Synchronization) . . . . . . . . . . . . 463
11.1.29 LCDT <<VDCOL>> function . . . . . . . . . . . . . . . . 463
11.1.30 Tap changer control . . . . . . . . . . . . . . . . . . . . . 463
11.1.31 Protection . . . . . . . . . . . . . . . . . . . . . . . . . . . 463
11.1.32 Low AC voltage detection . . . . . . . . . . . . . . . . . . 464
11.1.33 Disturbances . . . . . . . . . . . . . . . . . . . . . . . . . 464
11.1.34 Valve parameters . . . . . . . . . . . . . . . . . . . . . . 465
11.1.35 Control panel for HVDC converters . . . . . . . . . . . . 466
11.1.36 List of available signals . . . . . . . . . . . . . . . . . . . 469
11.2 SVC Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 472
11.2.1 Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . 477
11.2.2 Control System Parameters . . . . . . . . . . . . . . . . . 478
11.2.3 List of Available Signals . . . . . . . . . . . . . . . . . . . 479
11.3 Static Compensator Branches: TCR and TSC . . . . . . . . . . . . 486
xiii
Chapter - 13 Hypersim Wave Form Playback Model . . . . . . . . . . . . . . . 505
Part-3
Chapter - 1 Control Block List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 515
Part-4
Chapter - 1 Matlab and Simulink Models . . . . . . . . . . . . . . . . . . . . . . . 545
xiv
2.2 UCB Icon and Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . 569
2.3 UCB Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . 569
2.4 UCB Limits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 571
2.5 Building Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 571
2.5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 571
2.5.2 Using the ucb Command . . . . . . . . . . . . . . . . . . . 571
2.5.3 ucb Command Operating Modes . . . . . . . . . . . . . . 571
2.5.4 Using the Interactive Mode . . . . . . . . . . . . . . . . . . 571
2.5.5 ucb Prompt . . . . . . . . . . . . . . . . . . . . . . . . . . 572
2.6 UCB Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 572
2.7 UCB Program in Batch Mode . . . . . . . . . . . . . . . . . . . . . . 575
2.8 Building a Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 576
2.8.1 Creating a Block . . . . . . . . . . . . . . . . . . . . . . . . 576
2.8.2 Starting the UCB Program . . . . . . . . . . . . . . . . . . . 576
2.8.3 Block Definition File . . . . . . . . . . . . . . . . . . . . . . 577
2.8.4 General Information . . . . . . . . . . . . . . . . . . . . . . 577
2.8.5 Block Documentation . . . . . . . . . . . . . . . . . . . . . . 578
2.8.6 Block Parameters . . . . . . . . . . . . . . . . . . . . . . . . 578
2.8.7 Parameters of the Block Simulation Function . . . . . . . . 579
2.8.8 Inputs and Outputs of the Block Simulation Function . . . . 579
2.8.9 Historical Variables of a Block . . . . . . . . . . . . . . . . . 579
2.8.10 Global Variables of a Block (code C) . . . . . . . . . . . . 580
2.8.11 Initializing a Block (C Code) . . . . . . . . . . . . . . . . . 580
2.8.12 Block Execution Code (C Code) . . . . . . . . . . . . . . . 580
2.8.13 Transforming Parameters (C Code) . . . . . . . . . . . . . 581
2.8.14 Closing the Capture of a Block Definition . . . . . . . . . . 581
2.8.15 Generating the Block Code . . . . . . . . . . . . . . . . . 582
2.8.16 Compiling the Block Code . . . . . . . . . . . . . . . . . . 582
2.9 Including a UCB in a Power System . . . . . . . . . . . . . . . . . . 583
2.9.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 583
2.9.2 Adding a UCB to a Power System . . . . . . . . . . . . . . 583
2.9.3 Identifying a Block . . . . . . . . . . . . . . . . . . . . . . . 584
2.9.4 Connecting the Inputs/Outputs of a Block . . . . . . . . . . 585
xv
2.9.5 Specifying the Parameters . . . . . . . . . . . . . . . . . . . 585
2.9.6 Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 585
2.10 User Programmable Blocks . . . . . . . . . . . . . . . . . . . . . . . 593
xvi
Part 1
Using the Hypersim Interface
1-1-17
THIS PAGE IS INTENTIONALLY LEFT BLANK
1-1-18
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 real-
time with parallel processors. In real-time, the simulated events take place at the speed they
would in a real environment. This allows users to connect actual equipment to a network sim-
ulated 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. Con-
trol 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 combi-
nation of both types. In addition to the diagrams entered by the user, Hypersim can import or
export files in EMTP format.
1-1-19
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 interconnec-
tions;
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-20
General
Organization of Hypersim
1-1-21
General
Organization of Hypersim
1-1-22
General
Organization of Hypersim
1-1-23
General
Organization of Hypersim
Figure 1 - 4 HyperView, the tool for NetList, Load flow and snapshot
1-1-24
General
Theory of Operation
STATION STATION
Machine
Breaker Breaker
Line
Transformer
subsystem
subsystem
subsystem
(b)
1-1-25
General
Network Simulation Steps
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.
1.4.1 Editing a With the interface in Edition mode, the diagram of the network to simulate is built by using the
Diagram element drawers specified by 12 in Figure 2 - 2 of Chapter 2. 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 allow to observe the simulation results at slow rate (typically one refresh per
Monitoring second). Once the network has been drawn and free of errors, user can add the monitoring devices
Devices into the network diagram.
1.4.3 Analysis, Switching to Simulation mode allows to activate the analysis, simulation and control capabilities
Simulation of Hypersim. The following operations can be executed in this step:
and
Control
1 Define General Parameters . These parameters define the simulation step, the type of simula-
tion (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; com-
bine elements part of the same station; assign parallel tasks to lines and stations; identify the con-
trol 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 simula-
tion. 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 par-
allel 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).
4 Define Sensors. Each element (power system element or control block) has a list of sensors
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.
1-1-26
General
Network Simulation Steps
5 Code Generation . Up to this point, only the required preparatory work was done. The Simu-
lation 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 simula-
tion 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-27
General
Network Simulation Steps
1-1-28
Chapter 2
INTRODUCTION TO THE GRAPHICAL INTERFACE
1-2-29
Introduction to the Graphical Interface
Starting Hypersim from HyperView
a) Starting window
1-2-30
Introduction to the Graphical Interface
Interface Operating Modes
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.
2 4 5
3 6
12
10
9 8
11
1-2-31
Introduction to the Graphical Interface
Editing Mode Overview
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 dia-
gram mainly have electrical characteristics. The menus in this mode allow users 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.
1 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).
2 Two exclusive selection buttons allowing selection 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
3 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]).
4 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 detailed descriptions of those menus, please refer
to section 16.1.
5 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 de-
sired percentage and releases the left mouse button.
6 For displacement of the viewing window in both directions simultaneously. Simply click on
the rectangle and move it to the desired location.
7 8 Horizontal and vertical scroll bars used to move the diagram in the workspace.
9 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 .
10 The workspace where the user draws the diagram that will be simulated.
1-2-32
Introduction to the Graphical Interface
Simulation Mode Overview
11 Filename of the diagram, empty if no name is specified (as in the example above). When ed-
iting a diagram, an asterisk (*) before the name specifies that the diagram was modified, but
not saved.
12 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 users to separate the full tools palette
and move it freely on the screen.
2 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
Following the action executed by the user, different information is displayed:
13 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 ele-
ment were selected for display.
1-2-33
Introduction to the Graphical Interface
Simulation Mode Overview
2
5 6
15
14
9 8
13
1-2-34
Chapter 3
EDITING A POWER SYSTEM DIAGRAM
Connections
Buses
Power
elements
Workspace
1-3-35
Editing a Power System Diagram
Background Menus
B 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 re-
leasing the right button.
1-3-36
Editing a Power System Diagram
Background Menus
1-3-37
Editing a Power System Diagram
Graphic Tools Palette
3.2.1 Power These elements are found in drawers whose title begins with NETWORK--. The drawers contain
System passive power system elements (lines, transformers, reactors), active power system elements
Componen (sources, machines) or electronically controlled elements (converters, breakers).
ts
1 NETWORK--SOURCES+MACHINES. Power generating elements for a network: voltage and
current sources, hydraulic and thermal machines.
2 NETWORK--PASSIVE. Linear and non-linear R, L, C elements, including passive filters.
1-3-38
Editing a Power System Diagram
Graphic Tools Palette
3.2.2 Control Besides power system elements, Hypersim can also represent control systems by using its own
Elements library of basic blocks. Part 4, Chapter 1, page 545 (describes how Hypersim can use control di-
agrams 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, multiplexing/de-
multiplexing.
10 CONTROL--NON-LINEAR. Used to calculate minimum and maximum, non-linear functions,
modulators, delay generator, sampler.
11 CONTROL--SOURCES. Waveform and constant generators.
3.2.4 User and Hypersim allows user to add their own models, in their personal drawer. User models are those
Site developed by users for their specific applications. They are stored in the users private library and
Drawers accessible from user drawers.
Site models are specific for one installation site. They can be developed by site users and put into
the library to be shared among users on the same site. Part 1, Chapter 8, page 89, gives detailed
descriptions of user and site libraries.
1-3-39
Editing a Power System Diagram
Graphic Tools Palette
1-3-40
Editing a Power System Diagram
Buses
3.3 BUSES
1-3-41
Editing a Power System Diagram
Buses
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 Each bus has a label that must be unique in the network. During network analysis, Hypersim
Label and checks if there are duplicate bus labels. In Simulation mode (described later), it is possible to in-
Symbol stall sensors to measure the bus voltages. If at least one sensor is installed, a sensor symbol re-
sembling an oscilloscope will appear next to the bus label.
The following procedure is used to modify the label and position of the sensor symbol:
B A dialog box, as shown in Figure 3 - 7 is displayed. The following parameters are defined:
3 Alignment: Define the relative position of the label with respect to the bus,
4 Alignment of sensor with respect to label: Define the relative position of the sensor symbol
with respect to the label.
3.3.3 Output In edition mode, sensors can be also used as entry to the control block world. They will
Sensors connect internal elements signals to be used by the control blocks.
1-3-42
Editing a Power System Diagram
Buses
3.3.4 Base Each network bus has a base voltage that can be used to calculate the voltage in pu (per unit). This
Voltage parameter is used by the load flow module. It can be edited as follows:
A Select the required bus and display the background menu, used to executeEdit base voltage,
B The dialog box in Figure 3 - 8a) is displayed and the base voltage can be defined in phase-phase
kV and r.m.s. value.
Instead of defining the base voltages for each bus, they can all be defined together in the same
dialog box. To do this:
C Display the general background menu (see Section 3.1) and select Edit base voltages sum-
mary.
D The dialog box in Figure 3 - 8b) is displayed and the base voltages for all the buses can then be
defined.
3.3.5 Multiplex The multiplex bus is currently used to connect a three phase section of the network to a one phase
Bus section. In the future, it will allow generalizing to multiphase utilization. Parameters can be as-
signed to the multiplex bus by selecting and using the background menu Edit bus. The dialog
box in Figure 3 - 9a) is displayed to define the number of phases and the one in Figure 3 - 9b) to
define the phase labels.
1-3-43
Editing a Power System Diagram
Power System Elements
Voltage Current
source source
1 1
2 2
Label
Internal
connector
Disconnecting switch
External
connector
Workspace
3.4.1 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.
2In the workspace, position the pointer where the middle of the element is to be, then left click.
The element will then be displayed.
Part 1, Chapter 4 on page 53 describes how to change the graphic aspect of an element.
1-3-44
Editing a Power System Diagram
Power System Elements
3.4.2 Sensor As for the buses, each power system element has a label that must be unique to the network. When
Label and analysing the network, Hypersim will check for any duplicate label. In Simulation mode (de-
Symbol scribed 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).
3.4.3 Disconnectin
g Switches
and
Connector
s
1 Type: Select Switch Style to be able to use the disconnecting switch. Select Graphic con-
nector to do not use the disconnecting switch.
1-3-45
Editing a Power System Diagram
Power System Elements
4
1
3.4.4 Electrical To edit the electrical parameters of a power system element, the user has to select the element,
Parameters display its background menu and then execute the command Edit parameters. Figure 3 - 12
shows an example of a parameters control panel displayed with this command. The numbers spec-
ify the following:
1 Exclusive Selections parameter type. Defined by clicking on the required selection. The select-
ed 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 si-
multaneously.
2 Numeric parameter type: Entered by typing the required values.
1-3-46
Editing a Power System Diagram
Power System Elements
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 au-
tomatically 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 Checkboxes; these are checked by left clicking.
5 Commands to end editing:
3.4.5 Copying All the parameters can be copied from one element to another element of the same type (exam-
Parameters ple: from one voltage source to another) as follows:
A Select the reference element with the left button, and the destination element with the centre but-
ton.
B Use the background menu to execute the command Copy parameters. A dialog box is displayed
to confirm
C Bring the background menu on screen again, select Paste to copy the element having the same
parameters.
1-3-47
Editing a Power System Diagram
Power System Elements
3.4.6 Showing
Parameters
in a Diagram
It contains a list of displayable parameters. The user selects the parameter to show, its alignment
relative to the element and the display format which can be one of the following:
1 All: The name, the value and the unit are shown,
2 Value and units: Only the value and units are shown.
In the dialog 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 - 13a) shows an example of an element with its parameters shown in the diagram. In Sim-
ulation mode, the parameters shown are automatically updated when changes are made.
1-3-48
Editing a Power System Diagram
Interconnecting Elements and Buses
The user can hide parameters by selecting the corresponding element and executing in the back-
ground menu Display results. The dialog box for this command is shown in Figure 3 - 13c)
which contains the list of parameters currently shown. Only one parameter can be hidden at a
time.
2
1
1
A 3
2
4 5 BusMPX
Bus
4 3
3 2
1 2
B
1
(a) (b)
B Click the connector to make the connection; the cursor transforms into a pointer 5 specifying
that a connection is being drawn;
D 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.
1-3-49
Editing a Power System Diagram
Number of Element Phases
E It is also possible to divert the connection by moving the pointer and left clicking at each diver-
sion. 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 seg-
ment 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 - 14(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 - 14b) 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-50
Editing a Power System Diagram
Decoupling Element
Level
t t
t=0 t=0
(a) Positive slope (b) Negative slope
1-3-51
Editing a Power System Diagram
Decoupling Element
STATION P
L
Part 1 Part 2
task 1
STATION P
Decpl
Part 1 Part 2
task 1a task 1b
1-3-52
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 5 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 ele-
ments.
4.1.1 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 edi-
tion mode.
1-4-53
Graphic Handling
Creating Texts and Graphics
4.1.2 Multibyte Creating multibyte texts: these are texts in languages which do not use the latin alphabet (Japa-
Text nese, Chinese, Arabic,...). To do this, select the tool Multibyte text, put the pointer at the start
position, left click and a dialog box will be displayed to allow you to enter the required text.
Note : It should be noted that all the environments must first be defined with the required lan-
guage. 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 A polyline or a transmission line module can be diverted. An example is shown in Figure 4 - 2.
Diversions
Bus A
Bus B
B Select the tool Polyline (see Figure 4 - 3). Point to the selected object at the place where a di-
version 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-54
Graphic Handling
Creating Texts and Graphics
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 re-
lease 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 To create a straight line: select the tool Straight line, put the pointer at the start position,
Line while pressing and holding the left button, move the pointer to the final position and then release
the button. If the Shift key is also held, the line will be horizontal or vertical.
4.1.8 Open To create an open spline curve: select the tool Open spline curve, put the pointer at the start
Spline position, left click, move to the next position, left click again and so on. To end, click the middle
Curve button. A smooth curve is drawn 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 To create an ellipse (or a circle): select the tool Ellipse, put the pointer on the first corner of the
circle) 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.
4.1.10 Close To create a closed spline curve: select the tool Closed spline curve, put the pointer at the
Spline start position, left click, move to the next position, left click again and so on. To end, click the
Curve middle button. A smooth closed curve is drawn between the polygon vertices.
To edit an existing closed 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-55
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.
4.2 SELECTING OBJECTS
Objects are selected (electric elements, text or graphics) either to modify their attributes (see Sec-
tion 4.3) or their shape (see Sections 4.4and 4.5). Objects are selected as follows:
4.2.1 Selecting The object is selected by pointing and left clicking, the object will be surrounded by handles to
One Object show that it has been selected.
A 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.
B 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 Select all the objects of a diagram using the menu Edit=>Select all.
All Object
1-4-56
Graphic Handling
Direct Changes in Position and Form
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.
B Stroke thickness and type: thickness of lines and contours, and also their appearance (con-
tinuous, dots, dash...),
C 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.
4.4.1 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 When an object is selected, it is surrounded by a rectangle whose corner and middle points are
Size 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 acti-
vated. 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 fac-
tor. 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-57
Graphic Handling
Changes done from the Menus
4.5.1 Group/ Menu Graphics=>Group: group the selected objects into one object
Ungroup
Menu Graphics=>Ungroup: separate objects that are grouped.
4.5.2 Front / Menu Graphics=>Front: put the selected objects in the front of others which are over-
Back lapped with it.
Menu Graphics=>Back: put the selected objects in the back of others which are over-
lapped with it.
4.5.3 Alignment
1-4-58
Graphic Handling
Global Operations
The dialog box in Figure 4 - 4 shows a list of different alignment options. Alignment can be ver-
tical (Top/Bottom) or horizontal (Left/Right). The option As Is means that there is no
alignment for the current direction.
4.5.5 Rotation To rotate 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 cannot be rotated.
It is also possible to make 90o clockwise rotations by using the main menu Graphics => Rotate
CW.
4.5.6 Changing Menu Graphics=>Orientation: change the orientation of the diagram from landscape
Orientation to portrait or vice-versa.
4.5.7 Cut, These operations are done either using the main menu Edit, or with the background menu.
Delete,
Copy, Menu Edit=>Cut or background menu=>: Cut. Cuts the selected object and puts it on
Paste, the clipboard.
Duplicate
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 dia-
gram.
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.
4.6.1 Searching This operation is quite useful in a complex diagrams to search for an object using its label. To do
for an this:
Object
1-4-59
Graphic Handling
Global Operations
4.6.2 Cancelling Menu Edit=>Undo or background menu=>Undo: cancel the last 20 operations (example:
/ Restoring put back a cut object) one at a time for each cancellation.
Last
Operation Menu Edit=>Restore or background menu=>Restore: restore the last 20 cancelled
operations one at a time for each restoration.
4.6.3 Grid The menu Graphics=>Options=>Grid... lets you define the grid spacing (in a dialog 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 ( 2 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 The menu Graphics=>Options=>Current scale... defines the zoom factor applied on the
Printed full graphic and on the entry of new elements.
Image
4.6.5 Diagram The diagram view can be moved in the workspace either using the horizontal and vertical scroll
Views 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-60
Graphic Handling
Handling a Diagram File
1-4-61
Graphic Handling
Handling a Diagram File
1-4-62
Chapter 5
EDITING CONTROL SYSTEM
5.1 INTRODUCTION
Hypersim can also simulate control systems using:
Its basic control blocks library;
SimulinkTMdiagrams;
User Code blocks (UCB);
Sub-systems;
A combination of the above.
Note : The control systems built using SimulinkTM diagrams and User Code blocks are
discussed in Part 4.
Sub-systems are described in Section 5.5.
Block label
Connector label
Connection (single)
Single connector
3
4
1 2
Multiplexed connector
4
3
1
2
Connection
(multiplexed)
1-5-63
Editing Control System
Control Blocks
The basic control blocks are found in drawers whose title begins with CONTROL--. SimulinkTM
control blocks, User Code blocks 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 blocks, Simulink blocks, User Code blocks and sub-systems. Inside a sub-system, we will
also find 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
B In the workspace, point to where the middle of the block will be and left click. If it is a basic
block, it is immediately displayed. In the cases of SimulinkTM, User Code Bloc and Sub-
systems, a dialog box will appear to allow entering their file name before the block is dis-
played in the diagram.
Since the block is also a graphic object, all the graphic operations discussed in Chapter 4
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
4 Signal: A signal is a variable (varying with time) generated by each pin of the output connec-
tors 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 dif-
ferent 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-64
Editing Control System
Control Blocks
Signal label can be understood as the pin indentifier. If a same bloc (adder for example) is used
many times in a diagram, its signal labels (or pin identifiers) will not be changed but they will
carry different signals distinguished by their different signal names. The signals name is estab-
lished as follows:
SignalLabel_Blocklabel
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 con-
nection carries more than one signals, it is drawn in thick lines.
1-5-65
Editing Control System
Interconnecting Blocks
on the left side of the window, select a signal produced by the output connector,
on the right side, select an input signal label,
click Connect to make the connection or Disconnect to remove an existing connection,
repeat the above steps as needed, then click Close to confirm or Cancel to ignore.
If Close is called at the end, a connection will be made, otherwise if Cancel is clicked, then noth-
ing will appear.
The blocks can still be moved once they are connected. The connections react as elastic bands and
follow the block displacement.
The diversions points (points 2 and 3 in Figure 5 - 1) of a connection can also be modified using
the method described in Section 4.1.4.
The following rules apply to connections:
A connection connects an output connector to an input connector.
1-5-66
Editing Control System
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 inte-
ger to float) must be inserted. Both of these blocks can be found in the drawer CONTROL--
MISCELLANEOUS).
5.5 SUBSYSTEMS
Subsystems allow users 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 blocks (adder, gain, transfer function,...) and subsystems which in turn
contains basic power elements, basic blocks 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-67
Editing Control System
Creating Subsystems before using them
Same label
Same label
Multiplexed
input port
Single
input ports
Multiplexed
(b) Subsystem detailed Output port
diagram
Power
terminal
The diagram of a subsystem is edited in the same way as any other diagrams. The only difference
is that the subsystem contains additional input ports, output ports and power terminals. These last
elements represent connectors that will be connected with the subsystems outside world.
An example of a subsystem detailed diagram is shown in Figure 5 - 4b. Input and output ports are
control connectors. They can be single (carrying one signal) or multiplexed (carrying many sig-
nals). Power elements to be connected to the outside world are terminated with power terminals.
1-5-68
Editing Control System
Creating Subsystems before using them
Point to the required area and left click. A first dialog box appear allowing to define the
number of signals carrying by the port. Give 1 for a single port or a number greater than 1
for a multiplexed port. The second dialog is then brought up to allow defining signal labels
and types (Integer or Double). These parameters can be changed later by selecting the port
and executing the background menu Edit signal labels and types for bloc connector.
In the case of a single port, the connector will be red if the signal type is Integer or black
if it is Double. The port label is the same as the signal label, therefore if one label is
changed, the other is automatically changed.
If the port is multiplexed, the connector is always black and the port label is independent of
the signal labels.
To define a port label, select the port and execute the background menu Edit label.
When a subsystem is inserted in a diagram as in Figure 5 - 4b, it appears as a rectangular box sur-
rounded by control and power connectors whose labels and multiplexing characteristic are the
same as those of input ports, output ports and power terminals.
5.6.2 Creating Open the drawer SYSTEM--TOOLS, choose the icon ExtConn, then click on the diagram at
Power the desired location.
Terminals
The power terminal appears, its connector can then be connected to an power element or to
a bus-bar.
5.6.3 Using a The detailed diagram of a subsystem must be saved in a file before using it.
subsystem
in a To put a previously created and saved subsystem in a diagram:
Diagram
In the drawer SYSTEM--TOOLS, select the icon SubSys;
Point to the desired location and left click. A dialog 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 con-
nectors 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 blocks 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 SubSys-
tem content. The detailed diagram is then shown in a separated window, parameters of elements
and blocks 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-69
Editing Control System
Creating Subsystems before using them
5.6.4 Changing Once a subsystem is used in diagrams, it is still possible to change its detailed diagram. Hence,
the the user can delete or add other blocks. When reading a diagram containing subsystems, Hyper-
Detailed sim will update their contents if changes were made to them.
Diagram of
a Super- If all control ports and power terminals are preserved, the connections to the modified subsystems
Block will also be preserved. Otherwise, only connections to unchanged ports and terminals are pre-
served and user has to re-establish other connections.
5.6.5 Changing By default, the input/output connectors of a subsystem appear in the order they were created. To
the Order of change this order, the user must reopen the detailed diagram file in the main window and execute
the Input / the background menu Change Inports/Outports order. The dialog box shown in Figure 5
Output - 5 is displayed to define the new order by changing the numbers in the column Rank.
Connectors
1-5-70
Editing Control System
Creating subsystem from a selected part
Create
subsystem
subsystem
Selected area created
(b)
(a) Subsystem
content
(a) Original network with a selected area.
(b) Result obtained after executing Cre-
ate subsystem
(c)
In Editing mode, user can select a part of the current diagram and create a subsystem with it. The
procedure is illustrated in Figure 5 - 6:
Select an area in the current working diagram which will be reduced into a subsystem,
Execute the background menu Create subsystem. The selected area is then shrunk into a
subsystem represented as a rectangular surrounded by control and power connectors. Some
elementary graphic operations (flip, changing label position, etc.) may be needed to get it
best view.
To see the subsystem details, double click on it, or select it execute the background menu
Subsystem content. A new window will be opened to show the subsystems content. Con-
trol connectors are labelled as In1, In2,..., Out1, Out2,... while power terminals are labelled
as T1, T2,...
1-5-71
Editing Control System
Subsystem in Simulation Mode
For a subsystem previously saved in a file before being inserted in a diagram, its content is
linked to this file and cannot 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 select-
ing 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 nor 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, you must: add it in the main window, then cut it
and paste it into the subsystem content window.
5.9.2 Subsystem A subsystem has sensors for all signals available at its output ports. The user can also open its
Sensors content to access any sensors on blocks or elements in this diagram.
5.9.3 Changing There are no subsystem parameters forms. In the Simulation mode, it is however possible to open
Parameters 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-72
Editing Control System
Bloc Array
Create
bloc array
(a) (b)
Subsystem
content
(c)
A block array is a subsystem composed of a multiplicity of the same block. The procedure to cre-
ate a block array is shown in Figure 5 - 7:
put a control block in the main window and select it,
execute the background command Create block array,
a dialog appears to allow entering the bloc-arrays multiplicity (number of repetitions of the
original block).
A subsystem is then created to replace the original block. Its graphical form is the same as its orig-
inal block but shaded to indicate a bloc array. Its content can be opened using the background
menu Subsystem content. It is simply a repetition of the original block. Each individual block can
have its own parameters. Inputs and outputs of a block array are multiplexed to represent the nec-
essary number of repetitions of the inputs and outputs of the original block.
1-5-73
Editing Control System
Bloc Array
1-5-74
Chapter 6.
INTERCONNECTING CONTROL BLOCKS AND
POWER SYSTEM ELEMENTS
Filter
1-6-75
Interconnecting Control Blocks and Power System Elements
Interconnecting built-in control connectors to control blocks
An example is shown in Figure 6 - 1 where the element Vmes (bus voltage measuring unit) is con-
nected 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 voltag-
es. 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 regula-
tors.
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
MesI: single-phase current sensor;
1-6-76
Interconnecting Control Blocks and Power System Elements
Interconnecting blocks using sensor signals
(a) Dialog allowing users to select signals to send (b) Example showing the interconnection of
out as control signals. bus-bars and power elements sensor
signals to control blocks.
All signals of bus bars and of any power elements (with and without built-in control connectors)
can be sent out and connected to control blocks.
To make these signals available, in Editing mode do the following steps:
click the element to select it,
right click and execute the command Output sensor signals. A pop-up window as
shown in Figure 6 - 2a appears with a list of signals to be selected and sent out. This list is
the same as the list obtained with the command Edit sensor.
Signals can be selected one by one by putting individual check marks, or all of them by
clicking Select all. Then click OK.
1-6-77
Interconnecting Control Blocks and Power System Elements
Transceiver Blocks
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
6.3.1 Transceiver
B In a network with power elements, control blocks are directly or indirectly connected to at least
locks one power element. These blocks are normally simulated in the task, which also simulates 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-78
Chapter 7
MONITORING SIMULATION RESULTS
Hypersim has the possibility of monitoring results, which means displaying results and up-
dating them periodically at moderately slow speed, about once every second. Therefore, re-
sults to be monitored must be slowly 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 ac-
tive 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-79
Monitoring simulation results
Monitors inside the network diagram
Monitors
Figure 7 - 1 Monitors already created in the hydraulic machine model parameter form.
7.2.1 Monitors To create this kind of monitor, select the network element or the control blockk, right click and
associat select the menu Display Results, this will bring up the dialog shown in Fig. 7 - 2 which allows
ed with defining various monitor characteristics and gives the list of monitors already created, either in
element the component parameter form or in the network diagram.
or blockk
1-7-80
Monitoring simulation results
Monitors inside the network diagram
Title
Value
Units
1-7-81
Monitoring simulation results
Monitors inside the network diagram
Users can select a monitor from the list, its name will be shown in Result name, click OK and the
dialog box shown in Fig. 7 - 3a will be brought up to allow to define following additional infor-
mations:
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.
1-7-82
Monitoring simulation results
Monitors inside the network diagram
Minimum and Maximum: Range of the monitored value, used for scaling and clipping pur-
pose when value is displayed in scope format (described later). Entered 0 for both Mini-
mum 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 se-
lected element or block. User can then move it to a desired location but the relative position be-
tween 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 General A monitor can also be added into the network diagram without selection of a network el-
purpose ement or a control block.
monitors
Digital
form Newly
created
Scalar monitors
form
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 DIG-
ITAL 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 dialog box shown in Fig. 7 - 3b to define its parameters as before.
1-7-83
Monitoring simulation results
Expression Editor
Monitors created this way are not graphically related to any network element or control blockk.
They can be moved freely inside the network diagram. Their expression can however contain sig-
nals coming from any element or blockk.
7.3.1 Expression The Expression Editor is activated by clicking on the button ... in the dialog box of Fig. 7 -
with 3b. This will pop up the dialog box shown in Fig. 7 - 5a. The field Expression at the bottom will
simple be filled either manually and/or by clicking on appropriate objects presented in the box. Users
functions must keep track of the evolution in the Expression and manually complete it or make the neces-
sary corrections.
a) Dialog box showing the signal list b) The types dropped-down list. c) Function dropped-down list
of the current type.
1-7-84
Monitoring simulation results
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 By clicking on Advanced, the Expression editor will take the form shown in Fig. 7 - 6 with a sec-
with tion for Advanced Function Editor which containing the following items:
advanced
functions
1-7-85
Monitoring simulation results
Monitors Operations
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 par-
ticular 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.
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-86
Monitoring simulation results
Monitors Operations
7.4.1 Monitor The following controls and display functions are available via HyperView.
controls in
HyperView Start monitoring: when started, value are refreshed at about once every second for all mon-
itors 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 dis-
play 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 com-
mand, except that the selected monitors curves will be superimposed.
Edit the selected monitor properties: This command allow to modify the monitor character-
istics. 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 param-
eters: 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 Editing the monitor properties: double click on a monitor in the network diagram. The same
controls dialog box as in Fig. 7 - 3b will appear allowing to make necessary modifications.
inside the
network Showing monitored value in scope form: In Simulation mode, right click on a monitor and
diagram select Show Scope. A simple scope appears as in Fig. 7 - 8b and show a single trace of the
selected monitor.
1-7-87
Monitoring simulation results
Monitors Operations
Single signal
plots
1-7-88
Chapter 8
CUSTOMIZING HYPERSIM
8.1.1 Properties The Properties menu is found on the main menus bar. By pointing to this menu and press-
Menu ing and holding the left button, three menus can be executed: Directories, Simulation
and Files.
1 Directories Menu. When executing this menu, the dialog box in Figure 8 - 1 is displayed
to specify the following directories:
1-8-89
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 4. The EMTP files are
kept in this directory.
Diagrams directory.
The blocks coded by the user are described in Part 4. These blocks are kept
in this directory.
Simulink blocks directory.
The Simulink blocks are described in Part 4. These blocks are saved in this
directory.
At the bottom of a dialog box, there are three buttons allowing to execute the following com-
mands:
Cancel. Ignore the changes;
Apply. Apply the changes;
1-8-90
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 dialog 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 but-
ton serves to save the parameters in the file
~/HYPERSIM/Hypersim.res
and to use them again in the next session.
8.1.2 Language Hypersim can be used in French, English or Japanese. The language is chosen with the environ-
Used ment variables LANG and LC_ALL defined by en (English), fr_CA (French Canadian) and ja
(Japanese).
Example:
If
setenv LANG fr_CA
1-8-91
Customizing Hypersim
Library Management
1-8-92
Customizing Hypersim
Library Management
8.2.1 Library
Directories
User must not worry about the location of System Library (base models), this is normally set at
Hypersim installation. Site Library and User Library directories can be defined by user using the
menu
1-8-93
Customizing Hypersim
Library Management
8.2.2 Library of Subsystem is describe in Chapter 5. Before adding the model in the library, the subsystem must
Models be already created and saved in a file. There are then two ways to add a subsystem as a model in
Built with the library:
Subsystem
s Add/Update a model previously saved in a file,
Add/Update a model with a subsystem selected in current diagram.
1-8-94
Customizing Hypersim
Library Management
Graphic
tools bar
Label prefix. Characters that will be put ahead of the models label when the model will
be inserted in a diagram.
Default label visibility.
1-8-95
Customizing Hypersim
Library Management
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 ra-
dio 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 - 6 will
appear to allow drawing this icon. The model icon is purely graphic, there-
fore use tools in the graphic tools bar to build it. The size of the icon should
not be greater than 1cm x 1cm, the font used should be 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.
1-8-96
Customizing Hypersim
Library Management
1-8-97
Customizing Hypersim
Library Management
8.2.3 Library of UCB is a Hypersim utility which allows the user to build a model using C-like codes. Details con-
Models cerning how to build a model using UCB are given in Part 4, Chapter 2.
Built Using
User Code The procedure to add / update a model built with UCB is about the same as the model built from
Bloc (UCB) a subsystem. The differences are (see Figure 8 - 5):
Family. Select UCB.
Model diagram file. Give the UCB file (with extension.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 users can click this button and follow the procedure describe
in Section 8.2.5 below.
8.2.4 Library of The procedure to build a model using Simulink and make it usable in Hypersim is described in
Models Part 4, Chapter 1. Once the model is tested, it can be put in the Hypersim library in the same way
Built from as a subsystem model. The sole differences in filling the dialog of Figure 8 - 5 are:
Simulink
Family. Select Hyperlink.
Model diagram file.
8.2.5 Building In the current version of Hypersim, models built with subsystem and Simulink dont have partic-
the ular parameter form. Only models built with UCB have it and the default form is quite satisfac-
Parameter tory. If however a customized parameter form is desired, then the user can click the button
Form Build...Model Parameter form to bring up the form editing window as shown in Figure 8 - 8a 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 types (text, scalar, toggle, etc.),
some of them are shown in this figure (a white graphic box has been added under each entry).
1-8-98
Customizing Hypersim
Library Management
(b)
(a)
Figure 8 - 8 (a) Form editing window, (b) Dialog box to define
parameter information
1-8-99
Customizing Hypersim
Library Management
- Read only parameter: the change of some parameters 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-100
Chapter 9
SIMULATION AND CONTROL
2
1
1-9-101
Simulation and Control
Sensors, Input/Output and Sensor Configuration
9.1.1 Sensors Sensors are used to make signals observable. Each bus, power system element and control block
and Input/ has a list of signals. The user can install sensors on some of these and observe them with Spectrum
Output 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-102
Simulation and Control
Sensors, Input/Output and Sensor Configuration
1-9-103
Simulation and Control
Sensors, Input/Output and Sensor Configuration
Example:
If 1000V in the simulated network correspond to 1 V of the analog
output, then Unit/Volt = 1000.
Destination Base.
9.1.2 Sensor A set of sensors installed on buses, power system elements and control blocks form a sensor con-
Configurati figuration. The background menu can be used to execute different operations on such configura-
on tions:
Save sensor configuration: save the actual sensor configuration in a file. A dialog
box is displayed to allow to define the file.
Load sensor configuration: reread a previously saved configuration. A dialog 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-104
Simulation and Control
Simulation Parameters
Before starting the simulation, it is useful to check some parameters. The command Preferences
in the background menu is used to do this. The dialog box in Figure 9 - 3 allows users 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.
. The user should not change Network Name.
Code Generation Directory.
1-9-105
Simulation and Control
State of Disconnecting Switches
Calculation Step.
1-9-106
Simulation and Control
Network Analysis, Task Distribution, Code Generation and Simulation
1-9-107
Simulation and Control
Changing Parameters of Elements and Blocks
If the simulation is in progress, the changes to the parameters will take effect almost imme-
diately. This can be seen by observing the waveforms in Spectrum. If the simulation is
stopped, the changes will take effect when the simulation is launched.
Some parameters cannot be modified when the simulation is in progress. In the parameter
panels, these parameters are pale when the simulation is running and they are unmodifiable.
They become dark and modifiable when the simulation is stopped.
1-9-108
Chapter 10
SETTING INITIAL CONDITIONS
10.1 INTRODUCTION
Snapshot and Load-flow are two tools permitting users to set-up the network initial condi-
tions. 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 iter-
ative algorithm. Both Snapshot and Load-flow started from the HyperView panel using on the
corresponding tabs.
(a)
(b)
1-10-109
Setting initial conditions
Snapshot
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 but-
ton located on the right of the Help button (see Figure 10 - 1a). When activated, HyperView
opens with its panel initially showing the Simulation tab (see Figure 10 - 1b) with some sim-
ulation parameters. The user can change these parameters then click Apply. If an error is detect-
ed 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 corre-
sponding 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 utilities that allows taking a picture of all simulation variables
as well as their histories. The picture, or the snapshot buffer, is kept in local memory of the sim-
ulation 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 snap-
shot 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 avail-
able to control the simulation.
Startsim the simulation
. Start the simulation from scratch.
1-10-110
Setting initial conditions
Snapshot
After Pause the simulation is executed, all variables will remain un-
changed and stay at the values they have reached just prior to Pause. They
will continue from these values when Continue the simulation is
executed as shown in Figure 10 - 4.
Take a snap-shot
. It means copy all variables and their histories into the snapshot buffer.
Save the current snap-shot of the simulation
. Save the snapshot buffer in the file specified by Filename.
Load the current snap-shot in the simulation
. Restart the simulation using the snapshot buffer as initial conditions. The
snapshot buffer must be filled previously either by taking a snapshot or load-
ing from a file (with the command below).
1-10-111
Setting initial conditions
Snapshot
1-10-112
Setting initial conditions
Load-Flow
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.
Power flow from each bus to its neighbour buses.
1-10-113
Setting initial conditions
Load-Flow
10.4.2 Preparation To be able to run the load-flow, the user must provide the following data:
of network
parameters 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 Simula-
tion 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-114
Setting initial conditions
Load-Flow
10.4.3 Running To run the load-flow, HyperView must be already started, if not, click on the HyperView button
load-flow on the Hypersims main window. Once the network is read and the required parameters are al-
and setting ready entered. Do the following steps:
initial
conditions 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.
2 3
1
4
1-10-115
Setting initial conditions
Load-Flow
Click on Execute 2 . Hypersim calculates the load-flow and print data and results 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 sec-
tion allow to display data and results in the desired unit. The pull-down menus allow to dis-
play either all data/results or only the selected categories.
Because the print-out is accumulated in this area, users need to clear it as needed before a
new print by right-clicking in the area and execute Clear 6
Check the box Use Initial Condition In Simulation 4 to be able to start the
simulation really with it initial conditions.
Start the simulation by one of two ways:
In HyperView panel, click on start the simulation (see Figure 10 - 3),
In Hypersims main window, execute the background command Simulate network.
1-10-116
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 2). 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.
1-11-117
List of Tools and Models
NetworkPassive
11.3 NETWORKPASSIVE
Ground: Ground connection
R: Series resistor.
L: Series reactor.
C: Series capacitor.
RnLinSh: Non-linear shunt resistor. Used normally to simulate ZnO surge arrester.
RnLin: Non-linear series resistor. Used normally to simulate ZnO surge arrester.
1-11-118
List of Tools and Models
NetworkLines
11.4 NETWORKLINES
Single: Frequency Constant distributed parameters simple line.
CplFault: Frequency Constant distributed parameters coupled double circuit line with fault.
Pi: Pi section.
DCcable: DC cable.
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 dif-
ferent points on different circuits. Its built with subsystem concept.
11.5 NETWORKTRANSFORMERS
Lin2: Linear transformer, 2 windings.
1-11-119
List of Tools and Models
NetworkLoads and Motors
TapDecpl: Converter transformer with tap changer and decoupling element. Y grounded prima-
ry, floating Y and Delta secondaries.
Sat2Tap: Saturable transformer with tap changer, 2 windings.
HarmLd: Programmable Non-linear load with random active and reactive power and harmonic
current.
ArcFurn: Arc furnace.
1-11-120
List of Tools and Models
NetworkMiscellaneous
11.8 NETWORKMISCELLANEOUS
Mes_Freq: Frequency measuring unit.
X: 2 input multiplier.
/: Divider.
1-11-121
List of Tools and Models
Control Logic
Or2: OR gate.
1-11-122
List of Tools and Models
Control Non-Linear and Delay
Counter: Counter.
SinPrg: Sinus with amplitude, frequency and phase inputs (AM-FM-PM modulator).
Sample: Sampler.
SmoothFlip: smooth flipper (flip smoothly from one input to the other).
1-11-123
List of Tools and Models
Control Sources
1-11-124
Chapter 12
SUMMARY OF MENUS
This chapter summarizes the menus available in the Hypersim graphic interface. Each com-
mand is followed by a section number and the corresponding page that provides its details.
Some menus are not documented in this chapter since they are part of other chapters.
3 File=>Save (4.7, page 61). save the diagram in the same file used with
File=>Open
4 File=>Save as (4.7, page 61). save the diagram in a file selected by the user
5 File=>Revert (4.7, page 61). Ignore changes made and reload the diagram that was saved
the last time.
6 File=> Library management(4.7, page 61). Hypersim libraries management.
7 File=>Page (4.7, page 61). Define the page size containing the diagram.
8 File=>Print (4.7, page 61). Print the diagram with the printer or to a file.
9 File=>Import (4.7, page 61). Add in the current diagram another diagram that was saved
in a file.
10 File=>Quit (4.7, page 61). Quit Hypersim
13 Edit=>Cut (4.5.7, page 59). Cut the selected objects and put them on the clipboard.
14 Edit=>Copy (4.5.7, page 59). Copy the selected objects to the clipboard.
15 Edit=>Paste (4.5.7, page 59). Paste the objects saved on the clipboard.
16 Edit=>Delete (4.5.7, page 59). Delete the selected objects. These objects are not saved
on the clipboard.
17 Edit=>Duplicate (4.5.7, page 59). Duplicate the selected objects.
18 Edit=>Select All (4.2, page 56). select all the objects in the current diagram.
1-12-125
Summary of Menus
Main Menus
19 Edit=>(Erase (Hide) Connectors (3.4.3, page 45). Hide the connectors of the power ele-
ments.
20 Edit=>Display (Show) Connectors (3.4.3, page 45). Show the connectors of the power ele-
ments.
21 Graphics=>Group (4.5.1, page 58). Group the selected objects into one object
22 Graphics=>Ungroup (4.5.1, page 58). Separate the objects that were grouped.
23 Graphics=>Front (4.5.2, page 58). Put the selected objects in the foreground.
24 Graphics=>Back (4.5.2, page 58). Put the selected objects in the background.
26 Graphics=> Vertical Flip (4.5.4, page 59). Invert top/bottom the selected objects.
27 Graphics=> Horizontal Flip (4.5.4, page 59). Invert left/right the selected objects.
29 Graphics=>Orientation (4.5.6, page 59). Turn the whole graphic from landscape to portrait
and vice-versa.
30 Graphics=>Option=>Grid (4.6.3, page 60). Define the spacing in the grid
31 Graphics=>Option=>Current Scale (4.6.4, page 60). Define the zoom rate of the printed
page.
32 View=>New View. Open another window in Hypersim to display the same diagram. The dis-
placement 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 60). view with a zoom rate of 100%.
35 View=>Reduce to fit (4.6.5, page 60). Optimized view of the diagram in the workspace.
36 View=>Center Page (4.6.5, page 60). Centre the diagram relative to the workspace.
37 Diagram=>. Import an EMTP file. This is described in Part 4, Chapter 3, page 595.
38 Properties=>Directories (8.1.1, page 89). Specify the directories of the files required by
Hypersim.
39 Properties=>Simulation (8.1.1, page 89). Specify the general parameters of the simulation.
40 Properties=>Files (8.1.1, page 89). Specify the default suffixes of the files.
41 Edition (2.3, page 32). Put Hypersim in Edition mode to prepare the network diagram.
42 Simulation (2.4, page 33). Put Hypersim in Simulation mode and control.
44 HyperView (10.2, page 109). Activate HyperView, Hypersims central control panel.
1-12-126
Summary of Menus
Graphics Toolbar
2 J (4.1.2, page 54). Add multibyte text to the diagram via a dialogue box.
11 Stroke (B, page 57). Define/Change the thickness and the colour of strokes.
12 Pattern (C, page 57). Define/Change the type and the colour of the shading in the filling area.
13 Gravity (4.6.3, page 60). Activate/Deactivated the displacement by short burst based on grid
increments.
14 Grid (4.6.3, page 60). Show/Hide the grid
12.3.1 Without When no objects are selected, the commands have a general application.
Object
Selection
1 Undo (4.6.2, page 60). Cancel the last operation.
4 Paste (4.5.7, page 59). Paste the objects that are saved on the clipboard.
6 Edit Base Voltages Summary (3.3.4, page 43). List and revise the base voltage.
7 Erase connectors ((3.4.3, page 45). Hide the connectors of the power elements
1-12-127
Summary of Menus
Background Menu, Editing Mode
8 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 Hyper-
sim.
9 Search for a Labeled Object (4.6.1, page 59). Search for an object by specifying its label.
10 Change the Inport/Outport Order (5.6.5, page 70). Change the order of the input/output
ports of a super-block.
11 Update Subsystems (5.6.4, page 70). Update a diagram containing super-blocks/super-
models to apply the last changes made to them.
12 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 When objects are selected, the commands act only on these objects.
Object
Selection
1 Cut (4.5.7, page 59). Cut (or delete) the selected objects and put them on the clipboard.
2 Copy (4.5.7, page 59). Copy the selected objects on the clipboard.
3 Paste (4.5.7, page 59). Paste the objects from the clipboard to the diagram.
4 Delete (4.5.7, page 59). Delete the selected objects. These objects are not saved on the clip-
board.
5 Duplicate (4.5.7, page 59). Duplicate the selected objects.
6 Edit Label (3.3.2, page 42, 3.4.2, page 45, 5.2, page 63). Change the label of an object (bus,
power element, control block)
7 Edit Parameters (3.4.4, page 46). Change the electrical parameters.
8 Edit Connectors (3.4.3, page 45). Specify the type and the visibility of the connectors of a
power element.
9 Edit Bus (3.3.5, page 43). (If a bus is selected) Specify the number and the names of the phas-
es of a bus.
10 Copy Parameters (3.4.5, page 47, 5.4, page 67). (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 48, 5.4, page 67). Show the parameters next to a power
element or a control block.
12 Undisplay Parameters (3.4.6, page 48, 5.4, page 67). Hide the parameters next to a power
element or a control block.
13 Create Model in Library with Selected Component (2, page 96). Create a model in the li-
brary from the selected component.
1-12-128
Summary of Menus
Background Menu, Simulation Mode
14 Create Block Array (5.10, page 73). (If a block is selected) Create a subsystem composed of
a multiplicity of a same block.
15 Required Task. (If a subsystem is selected) Determine if the selected subsystem must be sim-
ulated using a separate task or a task in parallel with the other tasks.
16 Subsystem Content (5.6.3, page 69). (If a subsystem is selected) Display the content of a
subsystem in a new window.
12.4.1 Pointing When a label is pointed, the commands act on the object with this label.
to a Label
1 Edit Sensors (9.1, page 102). Select the signals to observe in Spectrum or ScopeView.
2 Edit Base Voltage (3.3.4, page 43). Change the base voltage of a bus (by pointing to the bus
label)
3 Edit Parameters (3.4.4, page 46, 5.4, page 67). Change the electrical parameters.
4 Subsystem Content (5.6.3, page 69). Display the content of the selected super-block in a new
window.
12.4.2 Pointing When a blank space is pointed, the commands have a general application.
to a Blank
Space
1 Network Analysis (1.4.3, page 26, 9.4, page 107). Analyse the network topology.
2 Map Tasks (1.4.3, page 26, 9.4, page 107). Distribute the parallel tasks to processors.
3 Generate code (1.4.3, page 26, 9.4, page 107). Generate the code for the current network
simulation.
4 Simulate network (1.4.3, page 26, 9.4, page 107). Start the simulation.
5 Stop simulation (1.4.3, page 26, 9.4, page 107). Stop the simulation.
6 Save sensor configuration (9.1.2, page 104). Save the current sensor configuration in a file.
7 Load sensor configuration (9.1.2, page 104). Read a previously saved sensor configuration.
8 Clear current configuration (9.1.2, page 104). 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.
13 Preferences (9.2, page 105). Define the general parameters of the simulation.
1-12-129
Summary of Menus
Background Menu, Simulation Mode
1-12-130
Part 2
2-1-131
THIS PAGE IS INTENTIONALLY LEFT BLANK
2-1-132
Chapter 1
HYPERSIM NETWORK MODELS
2-1-133
Hypersim Network Models
List of Single-Phase and Three-Phase Models
Control
Three- Single- Simulink
Network Model block
phase phase Access
access
2-1-134
Hypersim Network Models
List of Single-Phase and Three-Phase Models
2-1-135
Hypersim Network Models
List of Single-Phase and Three-Phase Models
Control
Three- Single- Simulink
Network Model block
phase phase Access
access
2-1-136
Hypersim Network Models
List of Single-Phase and Three-Phase Models
Control
Three- Single- Simulink
Network Model block
phase phase Access
access
2-1-137
Hypersim Network Models
List of Single-Phase and Three-Phase Models
2-1-138
Hypersim Network Models
List of Single-Phase and Three-Phase Models
Control
Three- Single- Simulink
Network Model block
phase phase Access
access
2-1-139
Hypersim Network Models
List of Single-Phase and Three-Phase Models
2-1-140
Hypersim Network Models
List of Single-Phase and Three-Phase Models
Control
Three- Single- Simulink
Network Model block
phase phase Access
access
Transformers (Figure 1 - 6)
2-1-141
Hypersim Network Models
List of Single-Phase and Three-Phase Models
2-1-142
Hypersim Network Models
List of Single-Phase and Three-Phase Models
Control
Three- Single- Simulink
Network Model block
phase phase Access
access
2-1-143
Hypersim Network Models
List of Single-Phase and Three-Phase Models
Control
Three- Single- Simulink
Network Model block
phase phase Access
access
2-1-144
Hypersim Network Models
List of Single-Phase and Three-Phase Models
2-1-145
Hypersim Network Models
List of Single-Phase and Three-Phase Models
Control
Three- Single- Simulink
Network Model block
phase phase Access
access
2-1-146
Hypersim Network Models
List of Single-Phase and Three-Phase Models
2-1-147
Hypersim Network Models
List of Single-Phase and Three-Phase Models
2-1-148
Chapter 2
SI OR PU SYSTEM UNITS
2.1 GENERAL
HYPERSIM offers 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)
(See Section 2.3). In addition, some models allow using parameters in active and reactive
power units (PQ).
The user can choose the system that best suits them from the control panel. The choice is
made within 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 per unit 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 by the windings (pri-
mary 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 network load values in active (P) and in reactive (Q) power units.
User inputs MW and MVARS for each R, L and C elements.
Therefore, with the true reference bases of voltage and power, Hypersim will accurately
model the various elements with the unit system chosen.
2-2-149
SI or pu system units
Examples
(EQ 2)
R = 0 01 = 0 0001pu
(EQ 3)
R base ( per phase )
L Base - = 0 265259H
= -----------------------------------------
per phase
2f ( per phase )
0 1H 0 37699pu
2-2-150
SI or pu system units
Examples
(EQ 4)
1
C Base per phase - = 2 6252 e 5F
= --------------------------------------------------
R base ( per phase )x 2f
7 3
1e F = 3 7699e
.1H
37.7
.01 V
--------------------------------------------------------------- = I = 3 775437A
2 2
0 01 ( 2L 2C ) + R
26.4873e3
-7F
1e
26.525
(EQ 6)
2 2 3
( 2L 2C ) + R = 26 4873e
(EQ 7)
100kV ( p t ) = 3 775437A
-------------------------------
3
26 487e
2-2-151
SI or pu system units
P.U. Definition
(EQ 8)
2
P = ( R ou Z ) I
(EQ 9)
2
01 ( 3 775437A ) - = 1 4253e 7MW
P MW = 0-------------------------------------------------------
1e6
(EQ 10)
2
7 ( 3 775437A ) - = 0 0005373MVAR
P ZL = 37
------------------------------------------------------------
1e6
(EQ 11)
2
( 3 775437A ) - = 0 37806MVAR
P ZC = 26525
--------------------------------------------------------------
1e6
2-2-152
SI or pu system units
P.U. Definition
1 Base current A =base, kVA, (per phase) 2 Base Impedance =base voltage, VLN
base voltage, kV LN base current, A
3 Base impedance =(base voltage kVLN)2 X 1000 4 Base impedance =(base voltage kVLN)2
base kVA 1 base MVA 1
2-2-153
SI or pu system units
P.U. Definition
2-2-154
Chapter 3
SYSTEM TOOLS
B POW
Synchronization
Icon and Diagram
POW Synchronization
System Tools
pow
Properties: Features:
7 Data acquisition synchroniza- - Positive or negative reference
tion slope
7 Timed operations synchroniza-
tion (breaker, programmable Implementation:
voltage sources etc.) -
Palette and icon representation
Figure 3 - 1 POW synchronization icon and diagram
C Parameter Internal signal detection from a bus or from an external command (not from HYPER-
Description SIM);
Detection of an analog or digital signal;
2-3-155
System Tools
POW Synchronization
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 speci-
fies the negative slope (falling part) of the signal.
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 At acquisition, the following signals are made available by the sensors;
Available
Signals Time_Pow_label: Time elapsed since the beginning of the simulation;
SyncOut_Pow_label: Synchronization signal;
External analog input, signal float command (activated with external mode and analog).
External digital mode complete command signal (activated with external mode and digital).
Entry delay. Signal float. The value is sent directly to ScopeView to create an offset
between signals. Ex: To synchronize an acquisition with another acquisition system where
a delay between the system is required to obtain waveforms at the same time.
E POW Figure 3 - 2 shows the control panel used to enter the POW synchronization parameters
Synchronizatio
n Control
Panel
2-3-156
System Tools
POW Synchronization
KV
1.0
0.8
0.6
Trigger threshold
0.4
0.5 volts level
Negativ
Positive
02
e
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-157
System Tools
Single and Three phase and Multiplex Buses
3.2.1 Three-
Phase Bus
A Description The three-phase bus is an element used to interconnect three-phase elements in the HYPERSIM
network. During simulation, three voltages of this bus can be acquired: Va, Vb and Vc.
B Three-Phase
Bus Icon and
Diagram
Three-Phase Bus
Bus
BaGD
3 ph
System Tools
Properties: Features:
7 Interconnect three-phase ele- - Used to interconnect three-
ments phase elements
- Access to the three voltages of
a bus
Implementation:
-
3.2.2 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 modelization of an unbalanced circuit when creating a special transformer ar-
rangement model with the monophase transformer element.
2-3-158
System Tools
Single and Three phase and Multiplex Buses
B Single-Phase
Icon and
Diagram
Properties: Features:
7 Interconnect single-phase ele- - Used to interconnect single-
ments: HVDC, DC motor, etc. phase elements
- Access to the voltage of a bus
Implementation:
-
3.2.3 Multiplex
Bus
A Description The multiplex bus is an element allowing users to retrieve the three voltages of the bus and to es-
tablish single-phase connection points (A, B, C). This allows establishing a single-phase network
connected to a three-phase bus.
2-3-159
System Tools
Simulink Block, User-Coded Block
B Multiplex Bus
Icon and
Diagram
Multiplex Bus
Bus
Mpx
System Tools
Properties: Features:
7 allows users to connect a sin- - Used to retrieve the three volt-
gle-phase network to a three- ages of a bus
phase bus - Establishes a, b and c single-
phase connection points
Implementation:
-
2-3-160
Chapter 4
CURRENT AND VOLTAGE SOURCES
B Icons and
Diagrams of
Current and
Voltage Sources
Voltage Current
Properties: Features:
7 Represent single or three-phase - The voltage source always has
A.C. current or voltage sources a series connected impedance
with a series or parallel RLC - The current source always has
impedance a parallel connected impedance
Implementation:
-
C Sources In the network, the current and voltage sources are implemented as follows:
Implementation
2-4-161
Current and Voltage Sources
Current and Voltage Sources
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.
D Parameter Figures 4 - 3 and 4 - 4, respectively, illustrate the control panel of a voltage source and of a current
Description source. Most of the fields and controls are the same for both control panels.
2-4-162
Current and Voltage Sources
Current and Voltage Sources
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 sec-
tion.
Note : The current source is always in positive sequence and, hence, it does not have a se-
quence selection button.
Here is how to input each phase sequence.
1 Direct or Inverse (positive or negative): In this mode, a constant differential of 120 degrees
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.
2 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.
3 Per phase. The Per phase mode allows users to define the same angle for the phases selected
using 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.
2-4-163
Current and Voltage Sources
Current and Voltage Sources
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.
2-4-164
Current and Voltage Sources
Current and Voltage Sources
2-4-165
Current and Voltage Sources
Current and Voltage Sources
Figure 4 - 5 Activation of voltage source (a): Fast mode, (b): Slow mode
I List of At acquisition, the following signals are made available by the sensors:
Available
Signals I (a, b, c)_label: Source current (A);
VINT(a, b, c)_label: Source voltage (V). (voltage source only) (before the impedance);
P_label: Active power (voltage source only) (instantaneous);
Q_label: Reactive power (voltage source only) (instantaneous).
2-4-166
Current and Voltage Sources
Programmable Variable Sources
B Icons and
Diagrams of
Programmabl
e Variable
Sources
P P
Voltage Current
Properties: Features:
7 Represent programmable cur- - The voltage source always has
rent or voltage sources a series connected impedance
- The current source always has
a parallel connected imped-
ance.
Implementation:
C Parameter The control panels for the parameters of both sources each have three pages. The first pages of
Description 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 con-
trol 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.
2-4-167
Current and Voltage Sources
Programmable Variable Sources
2-4-168
Current and Voltage Sources
Programmable Variable Sources
6 Per phase. The Per phase mode allows users to define the same angle for the phases selected
using 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 users 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.
2-4-169
Current and Voltage Sources
Programmable Variable Sources
2-4-170
Current and Voltage Sources
Programmable Variable Sources
Operations
Synchronization OFF Synchronization ON
(ScopeView)a
Operations
Synchronization OFF Synchronization ON
(ScopeView)
2-4-171
Current and Voltage Sources
Programmable Variable Sources
Synchronization and
Operation sequence are ON when
ticked 3.
(From ScopeView Main Window)
H Modulations 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-172
Current and Voltage Sources
Programmable Variable Sources
2-4-173
Current and Voltage Sources
Programmable Variable Sources
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
2-4-174
Current and Voltage Sources
Programmable Variable Sources
Repetitive: Disable
Note : This mode, when Enabled, leaves the program variation running forever after the first
Synchronization signal received (from Scopeview). To stop it, you have to toggle the pa-
rameters Programming from Start to Stop.
Programming: Enable
Note : This parameter displays the timed programming in a table format in the Hypersim ter-
minal 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.
Operation timing: 0/2 s
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 sim-
ulation.
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.
2-4-175
Current and Voltage Sources
Programmable Variable Sources
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.
DC offset: 0V
Frequency: 10Hz
Phase sequence: Zero
Source mode: active
Starting mode: Slow
Synchronization: Internal. (Only mode activated for now)
2-4-176
Current and Voltage Sources
Programmable Variable Sources
Programming: Start
Repetitive: Disable
Note : This mode, when enabled, leaves the program variation running forever after the first
Synchronization signal received (from Scopeview). To stop it, you have to toggle the pa-
rameters Programming from Start to Stop.
Programming: Enable
Note : This parameter displays the timed programming in a table format in the Hypersim win-
dow.
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
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 sim-
ulation.
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-177
Current and Voltage Sources
Programmable Variable Sources
1Hz
I Ramp/Step Step or ramp variations can be programmed independently for each of the source parameters (am-
Generation plitude, 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 users 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 infi-
nite variation (without any end time) was programmed, a case where the final value of the vari-
ation is kept until the interruption of the variations. Here is the list of types of variations shown
in the control panel. (See Figure 4 - 13)
7 Types:
2-4-178
Current and Voltage Sources
Programmable Variable Sources
8 Parameters: These parameters describe how the selected variables by typeset parameter will
change in time. For example, the AC amplitude, DC 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:
9 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 in-
crement), 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.
10 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 are 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.
11 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 el-
ement in the list must have a corresponding element in the Amplitude and Operation Timing
lists.
12 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.
13 Sequence: List of types of sequences.
First example: The peak voltage in steady state of a source is 100 kV and the user wants to in-
crease it progressively to 125 kV over a period of 0.3 second after a delay of 0.1 second. The delay
is calculated from a starting point which depends on the synchronization mode of the source (refer
to paragraph paragraph F in Source Control). The variation applies to all phases.
Click on the AC button to enter in the fields the following variation parameters:
2-4-179
Current and Voltage Sources
Programmable Variable Sources
Amplitude: 100000/125000
Operation timing: 0.1/0.3
Phase: ABC
Suppose the user wants to change the base voltage source according to the following model:
A ramp applied to the source amplitude with the following parameters:
Start time: 0.1 s
End time: 0.3 s
Initial amplitude: 0.0 s
Final amplitude: 600 000 volts
Another ramp applied to the source amplitude with the following parameters:
Start time: 0.35 s
End time: 0.45 s
Initial amplitude: 1 000 000 volts
For a DC components step with the following parameters:
Start time: 0.2 s
End time: 0.3 S
Amplitude: 200 000 volts
These events are programmed as follows (assuming that all the phases are active):
Click on AC and DC buttons and fill in the fields with the corresponding parameters:
AC
Amplitude: 0.0/600000, 1000000/100
Operation timing: 0.1/0.3,0.35/0.45
Phase: ABC
DC
Amplitude: 200000
Operation timing: 0.2/0.3
Phase: 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 - 13 shows a section on the second page of the programmable voltage sources control
panel describing the preceding programming.
2-4-180
Current and Voltage Sources
Programmable Variable Sources
2-4-181
Current and Voltage Sources
Programmable Variable Sources
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 in-
teger 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.
15 Amplitude: The list of amplitudes relative to each harmonic.
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 am-
plitudes.
16 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 users to specify a succession of equidistant an-
gles.
17 Sequence: List of specifications of the sequences (positive, negative, zero and per phase)
for each harmonic.
Each harmonic must be specified in positive, negative, zero sequence or per phase. The list pro-
vides the sequence to use for each harmonic. It can be empty if all the harmonics are in positive
sequence (the most common case). If not, it must contain the same number of elements as in the
list of harmonic numbers. The elements are separated by commas. Each element can be one of the
following letters:
D Harmonic is in positive sequence (0, -120, +120 degrees)
I Harmonic is in negative sequence (0, +120, -120 degrees)
H Harmonic is in zero sequence (0, 0, 0 degrees)
P Harmonic applies only to some phases
18 Phase: List of phases to which apply the parameters per phase (list Sequence)
2-4-182
Current and Voltage Sources
Programmable Variable Sources
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 sepa-
rated 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 users to program the injection of harmonics are at the beginning of the page.
There are two such fields:
19 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.
20 Operating activation: List of activations. This list specifies whether or not there is activa-
tion of harmonics. It is linked to 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 harmon-
ics or 0 to deactivate. The minimum list must contain the value 1 in order to generate har-
monics. 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-183
Current and Voltage Sources
Programmable Variable Sources
Note : This mode when enabled, leaves the program variation running forever after the first
Synchronization trig received (from Scopeview). To stop it, you have to toggle the pa-
rameters Programming from start to stop
Programming: Enable
Note : This parameters print the timed programming in a table format in the Hypersim win-
dow.
In the Harmonics page, enter the following parameters:
Operation timing: 0.1, 1, 1.1, 2 sec
Operating activation: 1, 0, 1, 0
Harmonic number: 10
Amplitude: 0.25pu
Angle: 0
Sequence: D
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 sim-
ulation.
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.
2-4-184
Current and Voltage Sources
Programmable Variable Sources
2-4-185
Current and Voltage Sources
Controlled Voltage and Current Sources
K List of At acquisition, the following signals are made available by the sensors:
Available
Signals I (a, b, c)_label: Source current (A).
VINT (a, b, c)_label: Voltage source (V).
2-4-186
Current and Voltage Sources
Controlled Voltage and Current Sources
B Controlled The following icons and diagram are used to represent controlled sources.
Sources
Icons and Current and Voltage Controlled Sources
Diagrams
C Sources The voltage and current sources are implemented in the network as follows:
Implementati
on 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 par-
allel 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 an-
other, 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-187
Current and Voltage Sources
Controlled Voltage and Current Sources
D Parameter Figures 4 - 19 and 4 - 20, respectively, show the control panels for voltage and current sources.
Description
2-4-188
Current and Voltage Sources
Controlled Voltage and Current Sources
G List of At acquisition, the following signals are made available by the sensors:
Available
Signals I(a, b, c)_label: Current signal (current source) or measured current (voltage source) (A).
V(a, b, c)_label: Source voltage (V). Voltage source only.
2-4-189
Current and Voltage Sources
Controlled Voltage and Current Sources
2-4-190
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 in-
tegrates various subsystems such as turbine, excitation system, stabilizer, shaft, etc. Any of
those built-in subsystems can be bypassed 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. How-
ever, this modularity is very limited because only the speed regulator can be modelled exter-
nally to the turbine generator block. The icon and diagram of the cross-compound turbine
generator are shown in Figure 5 - 1.
2-5-191
Synchronous Turbine Generators
Synchronous Generator Model Overview
2-5-192
Synchronous Turbine Generators
Synchronous Generator Model Overview
Heat
Gen
Exi
Boiler Reg
Reheater to condenser...
Heat
Exi
Boiler Reg
Gen
Exi
to condenser...
Reheater
Stabilizer Volt. Reg
2-5-193
Synchronous Turbine Generators
Common Generic Subsystems
Cross-
Hydraulic Tandem Steam
compound
Subsystem Turbine Turbine
Steam Turbine
Generator Generator
Generator
Synchronous Generator 1 1 2
Excitation system 1 1 2
Stabilizer 1 1 2
Boiler - 1 1
Shaft 1 mass 10 masses 2x 5masses
Hydraulic Turbine 1 - -
Tandem Steam Turbine - 1 -
Cross-Compound Steam Turbine - - 1
Speed Regulator 1 - -
& Governor
(Hydraulic turbine)
Speed Regulator - 1 -
& Governor
(steam turbine)
Speed Regulator - 1 -
& 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 de-
scribed first, followed by the features of each turbine generator group.
5.4.1 Operation The generic synchronous generator model implements the equations of the synchronous alterna-
tor 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-194
Synchronous Turbine Generators
Generic Synchronous Generator
Efd Xd - XI
Xd - XI
+ + ge_phid
1 + 1 Xd - Xd +
Tdo*s 1 + Tdo*s Xd - XI
- - -
Vt
(Xd - Xd)(Xd - Xd)
Xd - Xext
(Xd - XI)2 Ifd
ge_XadIfd Xd - XI
Xad*Ifdmin
+ +
(Xd - Xd)(Xd - Xd)
+ - (Xd - XI)2
+
(Xd - XI)(Xd - Xd)
Id (Xd - XI)
Xq - XI
Xq - XI
+ ge_phiq
1 + 1 Xdq - Xq +
Tqo*s 1 + Tqo*s Xq - XI
- -
2-5-195
Synchronous Turbine Generators
Generic Synchronous Generator
2-5-196
Synchronous Turbine Generators
Generic Synchronous Generator
Vref
Vref_sig
(signal reference to
Vref Automatic
Peo excitation system)
calculation
Qeo Note: Automatic calculation is done
of reference
at code generation only.
Peo and Qeo must be supplied for an exact
Saturation calculation at this operating point.
2-5-197
Synchronous Turbine Generators
Generic Synchronous Generator
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 Prog. ge_Xtfo, ge_Rtfo: These parameters are null when the output voltage of the generator is
Parameters 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-198
Synchronous Turbine Generators
Generic Excitation system
where:
b ( V t 0, 8 )
e i = a ( e 1)
E L S GL
a = ---------------------------------
b ( E 0, 8 )
Iag IL IU Ifd e L 1
( I U I AG ) E U
S GU = -----------------------------------
EU
( I L I AG ) E L
S GL = ---------------------------------
-
EL
5.5.1 Operation The excitation system regulates the terminal voltage of the synchronous machine. It allows users
to regulate the voltage at the terminals of the machine, or on the high-voltage side of the step-up
transformer. This regulation is done by varying the field voltage Efd based on the difference be-
tween 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 reg-
ulated.
2-5-199
Synchronous Turbine Generators
Generic Excitation system
Vtmax
Kp
Vtmin
Vreff
ex_Vrmax
ex_Vrmin
ex_Efdfix
Vstab Kf*s
1 + Tf*s
5.5.2 Prog. The parameters are shown in the block diagram of the excitation system (ex_Tr, ex_Ka, ex_Ta,
Parameters 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)
ex_Vrmax: Maximum static limit of excitation voltage;
The maximum limit applied to the regulator transfer function is always the minimal value
between the output of the Kp gain and the ex_Vrmax value.
2-5-200
Synchronous Turbine Generators
Generic Stabilizer
5.6.1 Operation The stabilizer system is designed to damp most electromechanical oscillations. The stabilizer out-
put 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.
.
Pe or
Pef *** Kap
1 + Tap*s
- Vsmax Stab_on Stab_mod
s*(1 + T1*s) 1 + T3*s Ks*T5 on internal Vstab
1 + T2*s 1 + T4*s 1 + T6*s
+ Vsmin
x off external
Kag 1-Tw1*s
1 + Tag*s 1 + Tw2*s
0
Vstab_i Signal form a users defined stabilizer. *** For hydraulic model, the
Stabilizer signal from the external model filtered electrical power (Pef) is used by stabilizer
must be supplied to inplut connector "Vstab_i".
(see Speed regulator.)
5.6.2 Programmabl The parameters are shown in the block diagram of the stabilizer diagram (st_Kag, st_Kap, st_Tag,
e st_Tap, st_Ks, st_Tw1, st_Tw2, st_T1, st_T2, st_T3, st_T4, st_T5, st_T6, st_Vsmin, st_Vsmax).
Parameter In addition, the stabilizer can be off via parameter stab_on. Moreover, the stabilizer can be mod-
s elized 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)
st_Tw2: Stabilizer time constant (s)
st_T1: Stabilizer time constant (s)
st_T2: Stabilizer time constant (s)
2-5-201
Synchronous Turbine Generators
Hydraulic Turbine Generators
3 3
Hydro HydCmd
2-5-202
Synchronous Turbine Generators
Hydraulic Turbine Generators
wo
Speed x Hydraulic
Peo Regulator Turbine
Pmec
Ia
Ib
Ic
Stabilizer Shaft Park
Conversion
Vstab w
Pe Te
Va
Vb
Excitation Synchronous Id, Iq Vc
Vreff & voltage Generator
Efd Vtd, Vqt
2-5-203
Synchronous Turbine Generators
Speed Regulator for Hydraulic Turbine Generators
5.8.1 Operation The speed regulator is responsible for producing 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, be-
cause it achieves a specific characteristic of regulation, called permanent droop between Pe and
w. So, this regulator needs two different user references, Peo and wo.
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 ref-
erence, the machines speed will tend to decrease, depending on the permanent droop value.
The speed regulator has two different operating modes. The first operating mode, based on elec-
trical 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 operating 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.
Peof re_Pe
2-5-204
Synchronous Turbine Generators
Speed Regulator for Hydraulic Turbine Generators
1 + Ta1*s
1 + Ta2*s
+
o
-
Operation mode Servo-valve
re_iop
Pe ge_mva vxmax xmax
1 +
1
sigma Kg(1 + T1*s)
1 + Twatt*s tb_mw
1 + Tp*s
Ts(1 + T2*s)
1
s
-
Peof ge_mva 0 vxmin xmin
tb_mw
-
delta*Tt*s
1 + Tt*s
Regvi_mod
x
+ internal
5.8.2 Programmabl Regvi_mod: Selection of speed regulator model. (Internal: actual model; External: model
e supply by user)
Parameter
s re_Ta1: Time constant on speed measurements
re_Ta2: Time constant on speed measurements
re_Twatt: Time constant for power measurement;
re_iop: Regulation mode (1 = Electrical power; 0 = Gate opening)
re_sigma: Permanent droop
re_delta: Transient droop
re_Tp: Time constant for permanent droop
re_Tt: Time constant for transient droop
re_Kg: Regulator gain
re_Ts: Time constant for servo-valve
re_T1: Time constant for speed regulator
re_T1: Time constant for speed regulator
re_xmin: Lower limit of gate opening
re_xmax: Upper limit of gate opening
2-5-205
Synchronous Turbine Generators
Generic Hydraulic Turbine
5.9.1 Operation The actual model of hydraulic turbine also includes the shaft system, that is represented as single
mass.
The hydraulic turbine model is responsible for producing 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
Turb_on
x -
+ -1 q Pm
q/x *
on
+ h Tw*s
- Peo off
Hydraulic turbine BaseMW
1.0 tb_gPm Tm
w Pm / w
Shaft_on
dw
on
1-mass shaft model
Tm
wo -1.0 off
wmax -1.0
+ Shaft_on Turb_mod
Te - 1 internal w
on
2Hmec*s +Kd +
- +
off external
wmin -1.0
Tgo
1.0 wo
w_i
5.9.2 Programmabl Turb_mod: Selection of turbine and shaft model. (Internal: actual model; External: model
e supply by user)
Parameter
s Turb_on: Selection of turbine operation. (On=Normal operation; Off=constant power equal
to power reference Peo/baseMW)
2-5-206
Synchronous Turbine Generators
Generic Hydraulic Turbine
5.9.3 List of At acquisition, the following signals are made available by the sensors:
Available
Signals V_label_a, b, c: Three-phase voltage of power system (pu)
I_label_a, b, c: Three-phase current of generator (pu)
Id_label: Current of machine, D axis (pu)
Iq_label: Current of machine, Q axis (pu)
Ed_label: D axis voltage in front of Xext (pu)
Eq_label: Q axis voltage in front of Xext (pu)
Vt_label: Terminal voltage (pu)
Efdgen_label: Field voltage (pu), now obsolete, replaced by Efd_label
Efd_label: Field voltage (pu)
Efd_i_label: Field voltage provided by an external module (pu)
Ifd_label: Field current (pu)
Vstab_label: Output voltage of stabilizer (pu)
w_label: Angular speed (pu)
w_i_label:Angular speed provided by an external module (pu)
Te_label: Electrical torque (pu/MW*s)
Te_i_label: Electrical torque (pu/MW*s) provided by an external module
Tm_label: Mechanical torque (pu/MW*s)
Pe_label: Active power (pu/MVA)
2-5-207
Synchronous Turbine Generators
Generic Hydraulic Turbine
5.9.4 Operating Using hydraulic synchronous machine, various operating modes are available. These modes are
Mode valid for both the hydraulic and thermal models, since they mainly concern the generic parts (gen-
erator-excitation):
1 Generating Mode This is the most common mode. A positive mechanical torque is applied
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 oppo-
site 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.
2 Synchronous Compensator Mode Any turbine generator can be used in the synchronous
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 pro-
vide or absorb the required reactive power.
3 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.
4 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-208
Synchronous Turbine Generators
Generic Hydraulic Turbine
5.9.5 Hydraulic Figure 5 - 18 shows the control panel of a hydraulic turbine generator.
Turbine
Generator
Control
Panel
2-5-209
Synchronous Turbine Generators
Generic Hydraulic Turbine
2-5-210
Synchronous Turbine Generators
Generic Hydraulic Turbine
2-5-211
Synchronous Turbine Generators
Tandem Thermal Turbine Generators
T CC T T 10
CrossCmpd Therm ThermCmd
Thermal Turbine Generator
2-5-212
Synchronous Turbine Generators
Tandem Thermal Turbine Generators
Boiler
Ia
psih Ib
wo
mhuh Ic
Speed and
power Thermal
Peo
regulator X turbine
Pmec Pe
Park
5-10 mass ConversionP
shaft
Stabilizer
Va
w
Vstab
Vb
Vc
Excitation and Efd Synchromous Id, Iq
voltage alternator
Vreff regulator
2-5-213
Synchronous Turbine Generators
Generic Boiler
5.11.1 Operation The boiler subsystem is responsible for generating the steam pressure used in steam turbines.
The actual boiler is used for both tandem and cross-compound machine.
The boiler block diagram is shown in Figure 5 - 24. The upper part of this figure presents the
boiler pressure regulator, and 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 ear-
lier, the boiler subsystem includes a PI type pressure regulator that controls the steam pres-
sure 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 ***
+ boiler_on boiler_mod
mhuh +
- k3 internal psih
s
on
+ 1
- off external
k2
*
psih_i
Signal from a users defined boiler system.
Boiler pressure from the external system *** With this initial value, the boiler is ready to
must be supplied to inplut connector "psih_i". supply the pressure reference value (press).
5.11.2 Programmable boiler_on: Selection of boiler operation. (On=Normal operation; Off=no boiler, con-
Parameters stant 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-214
Synchronous Turbine Generators
Speed Regulator for Tandem Thermal Turbine Generators
5.12.1 Operation The speed regulator is responsible for producing the gate opening signal x, based on the measure-
ment of speed w signal. The regulation characteristic is slightly different from the hydraulic mod-
el, since it does not depends on electric power Pe.
The block diagram of the speed regulator, including the servo-valve, is illustrated in Figure 5 - 25.
+
wo
1/r
- -
Servo-valve
k1
db ahlim
Peof + pah1 Regvi_mod
+
1/BaseMW 1 + 1 x
internal
t1*s+1 1
t2 s
-
- - pah2 external
0
mhuh
k1 - 1
5.12.2 Programmab Regvi_mod: Selection of speed regulator model. (Internal: actual model; External: model
le supply by user)
Parameter
s tb_r: Permanent droop (pu)
tb_db: Dead band of speed regulator (pu)
tb_k1: Regulator gain (pu)
tb_t1: Time constant of speed relay (s)
tb_t2: Time constant os servo-valve (s).
2-5-215
Synchronous Turbine Generators
Tandem Steam Turbine
5.13.1 Operation The steam turbine subsystem is responsible for producing the required mechanical torque. In
this typical configuration of turbines, 3 pressure stages are implemented. The name Tandem
turbine comes form this installation, where the steam flow has to pass through different tur-
bine stages, all mounted on the same shaft. Between each turbine stage, various equipment,
like reheater or crossover, can be modelized via their response time constants.
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.
2-5-216
Synchronous Turbine Generators
Tandem Steam Turbine
Turbine
configuration
al sw1=0
Reheater
x Turbine
1 + 1 + 1
X ai al configuration
1 + T3*s Tr1*s Tr2*s sw1=1
- -
Steam chest
psih
Fh Fi Fl
Turb_on
on
(Peo/baseMW)* Fh
th_i (Peo/baseMW)* Fi Turb_mod
off
ti_i (Peo/baseMW)* Fl internal
0 th, ti, tl
tl_l
external
Signal form a users defined turbine.
Turbine torque signal from the external model
must be supplied to inplut connector "th_i","ti_i","tl_i".
Turb_mod
internal mhuh
mhuh_i
2-5-217
Synchronous Turbine Generators
Generic Shaft
5.14.1 Operation The shaft model offers a multi-mass implementation. Thus, it can be used to study sub-synchro-
nous 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 signals (th,ti,tl) coming from each steam turbine stage. As a results, the shaft model pro-
duces 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 users to represent the behaviour using 1,
5 or 10 masses.
2-5-218
Synchronous Turbine Generators
Generic Shaft
2-5-219
Synchronous Turbine Generators
Generic Shaft
th
2 0 2 0 1 0 T12
T23
2 2 1
ti T34
T23 T12 T45
+ h3 h2 h1 Generator
T34 T23 T12
Tl 2d 2d Te 1d 1 w1 1
tl 2 2
Tgo w2
Processing equations for 1, 5 or 10 masses... w3 2
( ) = Tm + ( Te ) + k ( ) k ( )
d w4
2h
jdt j j j jk k j ij j i
w5
dj ( j ) + djk ( k j ) dij ( j i )
shaft_on shaft_mod
w
on internal
d
( ) = ( ) . off
dt j j 0 external
5.14.2 Programmab Shaft_on: Selection of shaft operation. (On=Normal operation; Off=constant speed equal to
le reference speed wo)
Parameter
s Shaft_mod: Selection of shaft model. (Internal: actual model; External: model supply by
user)
Number of masses: Number of masses in shaft model, 1, 5 or 10 masses.
This value must be 1 if there is no need for detailed shaft modelling. In this case, all the pa-
rameters (hi, di) must be concentrated in mass no 1.
If detailed shaft modelling is necessary, you may select 5 or 10 masses. By selecting appro-
priate data for inertia and stiffness, it is possible to modelize any number of masses between
1 and 10. Using an infinite value for stiffness will result in grouping 2 masses together.
If a 5 masses model is selected, all parameter related to the 5 first masses must be estab-
lished.
ar_d1Start: Value of ar_d1 during start-up time; This value helps to reach synchronism.
(typically = 10)
ar_tStart: Duration of startup time. (typically = 10s) (s)
ar_tg0: Mechanical friction losses, applied on generator mass (pu)
ar_h1, ar_h2,...: Mass inertia in second, based on generator BaseMVA (pu)
2-5-220
Synchronous Turbine Generators
Generic Shaft
ar_k12, ar_k23,...: Shaft stiffness coefficients in (pu/rad) based on turbine BaseMW (pu)
ar_d1, ar_d2,...: Mass self-damping factors in (pu torque/pu speed) based on turbine
BaseMW; This parameter is also called steam damping, will help to damp torsional oscilla-
tion. Typical value is 25% of inertia (pu).
ar_d12, ar_d23,...: Shaft mutual-damping factors in (pu torque/pu speed) based on turbine
BaseMW; This parameter is also called steam damping, will help to damp torsional oscilla-
tion. Typical value is 25% of inertia.
Generator mass: Selection of mass number that represents the generator. This mass will
receive the electrical torque signal.(Mass #1 or #2). Since the signal w is generator speed, w
is then speed of mass #1 or #2 depending on this parameter. (Typically, 2 configurations are
possible; First: Mass #1 is generator, and mass #2 is a gearbox. Second: Mass #1 is exciter,
mass #2 is generator.
Low pressure turbine: Selection of mass number that represents the low pressure turbine.
Those masses will receive the mechanical torque tl, spitted in 50-50% on two masses.(Mass
#3-4 or #4-5). Valid for 10-masses only.
Intermediate pressure turbine: Selection of mass number that represents the intermediate
pressure turbine. Those masses will receive the mechanical torque ti, spitted in 50-50% on
two masses.(Mass #6-7 or #7-8). Valid for 10-masses only.
5.14.3 List of At acquisition, the following signals are made available by the sensors:
Available
Signals V_label_a,b,c: Voltages at the breaker terminals (V)
I_label_a,b,c: Currents from the generator (A)
Id_label: Machine current, D axis (pu)
Iq_label: Machine current, Q axis (pu)
Ed_label: Voltage behind inductance (pu)
Eq_label: External, direct axis and quadrature (pu)
Vt_label: Output voltage (pu)
Efdgen_label: Field voltage (pu)
Efd_i_label: Field voltage (pu) provided by an external module
Ifd_label: Field current (pu)
Vstab_label: Stabilizer output signal (pu)
Vstab_i_label:Stabilizer output signal provided by an external module
w_label: Angular speed (pu)
w_i_label: Angular speed (pu) provided by an external module
Te_label: Electrical torque based on generator rating (pu / MW*s)
Pe_label: Active power (pu / MVA)
Qe_label: Reactive power (pu / MVA)
2-5-221
Synchronous Turbine Generators
Generic Shaft
2-5-222
Synchronous Turbine Generators
Generic Shaft
5.14.4 Thermal Figure 5 - 30 shows the control panel of a thermal turbine generator.
Turbine
Generator
Control
Panel
2-5-223
Synchronous Turbine Generators
Generic Shaft
2-5-224
Synchronous Turbine Generators
Generic Shaft
2-5-225
Synchronous Turbine Generators
Generic Shaft
2-5-226
Synchronous Turbine Generators
Cross-Compound Thermal Turbine-Generator
5.15.1 Introduction The cross-compound thermal turbine generator has two generating units (primary and sec-
ondary) and only one boiler. Many components of this model are similar to those of the ordi-
nary 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 Cross- Figure 5 - 35 shows the general diagram of a cross-compound thermal turbine generator. In
Compound this model, only the speed regulator can be modelled externally with the control system in-
Thermal terface (CSI).
Turbine
Generator
Model
2-5-227
Synchronous Turbine Generators
Speed Regulator
Vb
Vc
Va
Ia
Ib
Ic
Conversion
Park
Id,Iq
Ed,Eq
PRIMARY GROUP
Pe
Synchronous
Alternator
W
Shaft
Tmec
Edreg,Eqreg
Efd
Excitation
Vstab
Stabilizer
Cross-compound Turbine
Vref
psih
Boiler
Vref
Excitation
Vstab
Stabilizer
SECONDARY GROUP
Edreg,Eqreg
Efd
mhuh
Tmec
Synchronous
Alternator
Shaft
W
X
Ed, Eq
Speed
Id,Iq
and
Pe
Conversion
Park
Peo
Wo
5.16.1 Operation 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 gener-
ators.
2-5-228
Synchronous Turbine Generators
Steam Turbine
w_s
w wsensor
1
twfils+1
1/r
-
err2
wo +
1/r k1
db Servovalve with speed
+
Peof limits -position.
1/BaseMW
ahlim
+ err4 1 pah1 x
+ 1
mhuh tsr*s+1 1/ tcv s
k1 - 1
- - - pah2
0
5.16.2 Prog. Speed regulator: Selector for internal or external speed regulator;
Parameters
tb_wsensor: Selection of the generator whose speed is to be regulated
tb_wfil: Time constant of the speed sensor (s)
tb_r: Permanent droop (pu)
tb_db: Dead-band of regulator (pu)
tb_pah1: Valve speed (absolute) upper limit when opening (pu)
tb_pah2: Valve speed (absolute) upper limit when closing (pu)
tb_ahlim: Valve opening upper limit (pu)
tb_k1: Regulator gain (pu)
tb_tsr: Time constant of speed valve relay (s)
tb_tcv: Inverse of valve speed (speed = 1 / tb_tcv) (s).
5.17.1 Operation Figure 5 - 37 shows 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-229
Synchronous Turbine Generators
Steam Turbine
k1 k3 k5 k7
psih mhuh
1 1 1 1
x t1s+1 t2s+1 t3s+1 t4s+1
k2 k4 k6 k8
5.17.2 Prog. tb_t1: Turbine time constant (separator, superheater, steam chest, re-heater or cross over)
Parameters (s). Typical values are 0.2s for steam chest, 8s for re-heater and 0.4s for cross over
tb_t2: Turbine time constant (separator, superheater, steam chest, re-heater or cross over))
(s)
tb_t3: Turbine time constant (separator, superheater, steam chest, re-heater or cross over))
(s)
tb_t4: Turbine time constant (separator, superheater, steam chest, re-heater or cross over))
(s)
tb_k1,...,8: Mechanical power part provided by the turbine (fractions of generation in high
(FHP), intermediate (FIP) or low turbines (FLP)). Typical values for FHP, FIP and FLP are
0.25, 0.3 and 0.45 respectively.
5.17.3 List of At acquisition, the following signals are made available by the sensors. Only signals from sub-
Available systems common to both turbine generators and signals from the primary turbine generator are
Signals 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)
2-5-230
Synchronous Turbine Generators
Multi-Mass Shafts
5.18.1 Operation Figure 5 - 38 illustrates the physical layout of the two shafts. It can be observed that different stag-
es 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 val-
ues and the rigidity factors adjacent to the shafts to a very high value.
2-5-231
Synchronous Turbine Generators
Multi-Mass Shafts
Numbering of
masses
#5 9 #4 #3 #2 #1
2-5-232
Synchronous Turbine Generators
Multi-Mass Shafts
2-5-233
Synchronous Turbine Generators
Multi-Mass Shafts
2-5-234
Synchronous Turbine Generators
Multi-Mass Shafts
2-5-235
Synchronous Turbine Generators
Multi-Mass Shafts
2-5-236
Synchronous Turbine Generators
Multi-Mass Shafts
2-5-237
Synchronous Turbine Generators
Multi-Mass Shafts
2-5-238
Chapter 6
PASSIVE ELEMENTS
B RLC Elements Tables 61 and 62, respectively, show the icons and diagrams used to represent series and
Icons and shunt RLC elements.
Diagrams
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 users to select from 14 icons and diagrams.
R L C LC RC RL RLC
Icon
Element
2-6-239
Passive Elements
Shunt and Series R, L, C Elements
R L C 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).
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 Fig-
ures 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.
2-6-240
Passive Elements
Shunt and Series R, L, C Elements
(a) (b)
(a) (b)
(a) (b)
2-6-241
Passive Elements
Shunt and Series R, L, C Elements
E List of At acquisition, the following signals are made available by the sensors:
Available
Signals I(a,b,c)_label: Current for each phase (A) in a three-phase element, and I_label in a single-
phase element.
F Control Panel
of Series RLC
Elements
2-6-242
Passive Elements
Shunt and Series Non-Linear Resistors
G Control Panel
of Shunt RLC
Elements
.
2-6-243
Passive Elements
Shunt and Series Non-Linear Resistors
B Non-Linear
Resistors
Icons and
Diagrams
ZNO ZNO_Shunt
2
Series and Parallel Non-linear Resistors
RnLin
RnLin
C Non-Linear The non-linear resistor model consists mainly of a compiled curve that describes, instantaneously,
Resistor the behaviour of V with respect to I. It is known that the voltage curve with respect to the current
Model 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
dissipates 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-244
Passive Elements
Shunt and Series Non-Linear Resistors
V
Vmin[2]
I = P[2] * (V / Vref) ** Q[2]
Vmin[1]
I = P[1] * (V / Vref) ** Q[1]
I = P[0] * (V / Vref) ** Q[0]
Vmin[0]
D General Connection:
Parameters
For series elements, Series only;
For single-phase shunt elements, only a Y ground connection is allowed;
For three-phase shunt elements, Y ground, Y floating or Delta are allowed
E Parameter Input data format: Select the parameter input type, either using the EMTP method (expo-
Input nential 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);
2-6-245
Passive Elements
Shunt and Series Non-Linear Resistors
Q: Value characterizing the exponential section. There are as many Q values to provide
as there are exponential sections
G List of At acquisition, the following signals are made available by the sensors:
Available
Signals I(a,b,c)_label: Current per phase in the non-linear resistor;
SEG(a,b,c)_label: Exponential section being used.
H Control The following figures show the control panels of non-linear resistors.
Panels
2-6-246
Passive Elements
Shunt and Series Non-Linear Resistors
2-6-247
Passive Elements
Shunt and Series Non-Linear Resistors
2-6-248
Passive Elements
Mutual Inductances
B General Units: SI or pu
Parameters
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.
D List of As is the case with EMTP, the model of the three-phase coupled reactors does not provide any
Available signal to the user.
Signals
E Control Panel Figure 6 - 11 shows the control panel of three-phase coupled reactors.
of Three-
Phase
Coupled
Reactors
2-6-249
Passive Elements
Decoupling Elements
2-6-250
Passive Elements
Decoupling Elements
B Decoupling
Element Icon
and Diagram
Decoupling Elements
Decoupling Dec_XFO
2-6-251
Passive Elements
Decoupling Elements
After decoupling
Before decoupling 2 simulation tasks with
1simulation task one time step delay solution
Decoupling
Element
No grounded phase
2-6-252
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
R2 and L2 = 1e-6
Decoupling
Element
2-6-253
Passive Elements
Decoupling Elements
Decoupling
Element
L leakage 1D 3D 5D 1D 3D 5D
L leakage = 0
a a
L leakage
b b
c c
4D 6D 2D 4D 6D 2D
F Examples of Figures 6 - 18 and 6 - 19 show forms used for decoupling elements with and without an isolation
forms used transformer.
for
decoupling
elements
2-6-254
Passive Elements
Decoupling Elements
2-6-255
Passive Elements
Passive Filters
2-6-256
Passive Elements
Passive Filters
B General Filters only have several general parameters. To specify the parameters of a filter, SI units are
Parameters always used. The function that allows changing 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 Filters consist of specific RLC combinations and each has a fixed number of elements. As can be
Parameters seen in Figures 6 - 21to 6 - 24, the configuration of each filter is shown in their respective control
panel. This allows associating 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 Since the filters are simulated as elements forming a whole and not as individual elements, the
Available following signals are made available by the sensors at acquisition:
Signals
I(a,b,c)_label: Current for each phase (A).
Hence, the currents flowing in the individual elements are not available.
2-6-257
Passive Elements
Passive Filters
E Passive
Filters
Control
Panels
2-6-258
Passive Elements
Passive Filters
2-6-259
Passive Elements
Passive Filters
2-6-260
Chapter 7
LINES AND CABLES
7.1.1 Hyperline Line The Hypersim Hyperline Line Data tools compute the RLC parameters of an overhead trans-
Data mission line from its conductor characteristics and tower geometry. See the help file in the
Hyperline Line Data GUI.
2-7-261
Lines and Cables
Calculation of electrical parameters
7.1.2 Load File An EMTP file that contains the physical parameters of the lines (Fig 7 - 6, 7 - 7 and 7 - 8) or the
(EMTP) 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 users 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.
Purdue University developed a TRANS2 program allowing to calculate line parameters us-
ing 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 geo-
metric data of lines using a graphic interface. However, MOLIPAR still allows users to in-
put 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 trans-
formation 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 rou-
tine as for an Inpurdue file. The parameters thus calculated are not identical to those calcu-
lated by EMTP with the same input file. However, the electrical behaviours in both cases
are nearly identical.
2-7-262
Lines and Cables
Calculation of electrical parameters
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
2-7-263
Lines and Cables
Distributed Parameters Lines
A Frequency The following icons and diagrams are used to represent lines with or without fault.
Constant
Distributed
Parameters
Lines Icons
and
Diagrams
2 1
2 1
2-7-264
Lines and Cables
Distributed Parameters Lines
Data base key name: Key to access the line data base (optional package).
2 Other Parameters.
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 using 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-265
Lines and Cables
Distributed Parameters Lines
RbDef RcDef
VaDef A VbDef B VcDef C
InDef Ground
RDef Ropen/close
Distance of fault
1 2
No fault 0 0 0 0
Fault between phase C and Ground 0 0 1 1
Fault between phase B and Ground 0 1 0 1
Fault between phases B and C 0 1 1 0
Fault between phases B, C and Ground 0 1 1 1
Fault between phase A and Ground 1 0 0 1
2-7-266
Lines and Cables
Distributed Parameters Lines
C List of At acquisition, the following signals are made available by the sensors:
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).
P_line label_bus label: Active power on bus label bus (watt)
Q_line label_bus label: Reactive power on bus label bus (var)
F Transmission This section shows how to enter data in the control panels of Frequency Constant Parameters
Lines Control Three Phase Transmission Lines. The example shows an untransposed line without fault.
Panels
G Line Data Figures 7 - 6, 7 - 7 and 7 - 8, respectively, show the geometric data of a 735kV Hydro-Quebec
line.
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.
2-7-267
Lines and Cables
Distributed Parameters Lines
I Calculation The calculation of electrical parameters of frequency constant parameter lines with their geomet-
of Electrical ric parameters is done by using Hyperline Line Data module in Hyperview. Figure 7 - 9 shows
Parameters 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.
2-7-268
Lines and Cables
Distributed Parameters Lines
Example:
-12.80m 12.80m
32,92m
20,73m
= 100-m
Figure 7 - 6 Layout of conductors for a 735 kV line
45,72cm
3,556 cm
o
45
2-7-269
Lines and Cables
Distributed Parameters Lines
LINE GEOMETRY:
------------------------------------------------------------------------
Conductor Phase X Y Tower Y Min Conductor
(bundle) Number (meters) (meters) (meters) Type
------------------------------------------------------------------------
p1 1 -12.80160 20.72640 20.72640 1
p2 2 0.00000 20.72640 20.72640 1
p3 3 12.80160 20.72640 20.72640 1
g1 0 -8.99160 32.91840 32.91840 2
g2 0 8.99160 32.91840 32.91840 2
------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------
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.55600 0.37500 0.00000000 0.04304860 1.00000 4 64.65824 45.00
2 1.27000 0.50000 0.00000000 3.10685596 1.00000 1 0.00000 0.00
------------------------------------------------------------------------------------------------------------
Figure 7 - 9 Hyperline line data geometrical parameters of a constant parameter line shown in figures
7 - 6 to 7 - 8
2-7-270
Lines and Cables
Distributed Parameters Lines
LINE PARAMETERS:
Transformation matrix:
595.18362E-03 -707.10678E-03 -413.16241E-03
539.91787E-03 -11.397316E-15 811.53746E-03
595.18362E-03 707.10678E-03 -413.16241E-03
Line 1
[R0 R1] = 301.27087E-03 11.708982E-03 (ohm/km)
[L0 L1] = 2.9877512E-03 868.25318E-06 (H/km)
[C0 C1] = 8.5884565E-09 13.425735E-09 (F/km)
--------------------------------------------------------------------------------
Figure 7 - 10 Hyperline electrical parameters for an untransposed line with the geometric data shown
in figure 7 - 6 to 7 - 8
2-7-271
Lines and Cables
Distributed Parameters Lines
7.2.1 Transmission A control panel is provided for transmission lines with fault. The calculation of the parameters is
Lines with identical to lines without fault. The difference is that the control panel for lines includes the fault
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-272
Lines and Cables
Distributed Parameters Lines
2-7-273
Lines and Cables
Distributed Parameters Lines
2-7-274
Lines and Cables
Distributed Parameters Lines
7.2.2 Coupled The model for coupled lines is used to simulate a double-circuit line or two lines with the same
Lines right of way.
A Coupled In the model palette, two icons and two diagrams used to represent coupled lines.
Lines Icons
and
Diagrams
1.1 1.2
C
2.1 2.2
B Parameter The parameters for coupled transmission lines are the same as for uncoupled lines. The only dif-
Description ference is that the modal transformation matrix of coupled transmission lines is a 6x6 matrix be-
cause each bundle of conductors is considered as a separate phase.
C List of At acquisition, the following signals are made available by the sensors:
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 This section shows how to enter data in the control panels of Coupled Lines.
Lines Control
Panels
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.Cal-
culation of Electrical Parameters and Corresponding Control Panel
H Calculation The calculation of electrical parameters of frequency constant parameter lines with their geomet-
of Electrical ric parameters is done by using Hyperline Line Data module in Hyperview. Figure 7 - 9 shows
Parameters the relevant part of the Hyperline geometrical parameters.
Load a file into the Line Data GUI or enter your geometrical line parameters.
2-7-275
Lines and Cables
Distributed Parameters Lines
2-7-276
Lines and Cables
Distributed Parameters Lines
Example:
-14,40m
-8,5m
C A
58,2m
46,4m
35,2m
24m
= 100-m
2-7-277
Lines and Cables
Distributed Parameters Lines
50.0cm
30o
= 3.129cm
Sag
2-7-278
Lines and Cables
Distributed Parameters Lines
COMMENTS:
LINE GEOMETRY:
------------------------------------------------------------------------
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 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-279
Lines and Cables
Distributed Parameters Lines
LINE PARAMETERS:
Transformation matrix:
351.82786E-03 502.16609E-03 -248.22699E-03 -546.27181E-03 -355.77792E-03 -297.7989E-03
357.11159E-03 29.570239E-03 -445.0405E-03 -95.876821E-03 504.13737E-03 580.78391E-03
497.39974E-03 -496.61678E-03 -483.19732E-03 425.83203E-03 -334.32912E-03 -272.02404E-03
497.39974E-03 -496.61678E-03 483.19732E-03 -425.83203E-03 334.32912E-03 -272.02404E-03
357.11159E-03 29.570239E-03 445.0405E-03 95.876821E-03 -504.13737E-03 580.78391E-03
351.82786E-03 502.16609E-03 248.22699E-03 546.27181E-03 355.77792E-03 -297.7989E-03
Line 1
[R0 R1] = 264.85676E-03 18.395855E-03 (ohm/km)
[L0 L1] = 3.2022004E-03 929.59574E-06 (H/km)
[C0 C1] = 7.8555058E-09 12.570785E-09 (F/km)
Line 2
[R0 R1] = 264.85676E-03 18.395855E-03 (ohm/km)
[L0 L1] = 3.2022004E-03 929.59574E-06 (H/km)
[C0 C1] = 7.8555058E-09 12.570785E-09 (F/km)
Line 1 - Line 2
R0m = 246.18652E-03 (ohm/km)
L0m = 1.9995885E-03 (H/km)
C0m = -2.0443957E-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-280
Lines and Cables
Distributed Parameters Lines
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 The triple line model is used to simulate a triple circuit or three lines in the same path. The same
Quadruple reasoning applies to a quadruple line. These two models are a general case of the coupled line
Lines model.
A Icons and
Diagrams
2-7-281
Lines and Cables
Distributed Parameters Lines
1.1 1.2
2.1 2.2
C3
3.1 3.2
1.1 1.2
2.1 2.2
C4
3.1 3.2
4.1 4.2
B Signal V(a, b, c)_line label_bus label: Voltage of each phase on bus label bus (volts);
description
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 indi-
cators will appear.
2-7-282
Lines and Cables
Distributed Parameters Lines
C Triple and
Quadruple
Lines Control
Panels
2-7-283
Lines and Cables
Distributed Parameters Lines
7.2.4 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 seg-
ments. However, if the user needs to simulate many faults on a multiple line, this procedure be-
comes tedious and the network diagram is cluttered. Composed models were developed to
circumvent this.
B Description Composed models are models made up of many sub-models already available in the element pal-
of Composed ette. The parameters of the composed model are available in a unique control panel. They are then
Models transferred by Hypersim to the different elements making up the model.
2-7-284
Lines and Cables
Distributed Parameters Lines
C Icons and
Diagrams
1.1 1.2
C
2.1 2.2
1.1 1.2
2.1 2.2
C4
3.1 3.2
4.1 4.2
D Parameter The parameters of composed models are the same as those of the different elements which make
Description 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-285
Lines and Cables
Distributed Parameters Lines
2-7-286
Lines and Cables
Distributed Parameters Lines
2-7-287
Lines and Cables
Distributed Parameters Lines
E Signal For both models, only the signals concerning the faults are available. For the coupled line with
Description 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-288
Lines and Cables
Distributed Parameters Lines
F Control
Panels
2-7-289
Lines and Cables
PI Line Sections
7.3.1 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 R
XC XC
B PI Line Icon
and Diagram
PI
1.IOn order to simplify the text, the PI line sections are called PI lines in this Chapter.
2-7-290
Lines and Cables
PI Line Sections
C Parameter
Description
F RLC Matrix/Sequences:
Parameters
Matrix (untransposed line; fill in the matrices);
Sequences (transposed line; fill in the sequences);
R, L, C: R, L, C matrices (ohm/km, henry/km, farad/km);
Sequence 0: Zero sequence;
Sequence 1: Positive sequence.
G Fault The fault parameters are exactly the same as those for constant parameters lines. For more details,
Parameters see 3 on page 265.
H List of At acquisition, the following signals are made available by the sensors:
Available
Signals
2-7-291
Lines and Cables
PI Line Sections
K PI Lines
Control
Panels
2-7-292
Lines and Cables
PI Line Sections
L Line Data The geometric data shown in Figures 7 - 6 to 7 - 7 are used to calculated a PI line.
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.Cal-
culation of Electrical Parameters and Corresponding Control Panel
N Calculation The calculation of electrical parameters of frequency constant parameter lines with their geomet-
of Electrical ric parameters is done by using Hyperline Line Data module in Hyperview. Figure 7 - 9 shows
Parameters 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-293
Lines and Cables
PI Line Sections
7.3.2 Coupled PI As for the PI line model, the coupled PI line model is mainly used for short transmission lines.
Lines and
Coupled PI
Lines with
Fault
A Coupled PI
Line Icon and
Diagram
1.1 1.2
PI C
2.1 2.2
1.1 1.2
PI C
2.1 2.2
2-7-294
Lines and Cables
PI Line Sections
B Parameter The parameters for Coupled PI lines are the same as for those for simple PI lines, except that the
Description dimension of the R, L and C matrices representing the impedances and admittances of the con-
ductors 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 No line signal is available for coupled PI lines. The reason is that the calculations required to ob-
Available tain the signals would slow down considerably the time required to simulate the model. Hence,
Signals only the fault signals are available.
D Fault Signals 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);
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);
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.
2-7-295
Lines and Cables
PI Line Sections
E Coupled PI
Lines and
Coupled PI
Lines with
Fault Control
Panels
2-7-296
Lines and Cables
PI Line Sections
F Line Data 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 elec-
trical parameters.
7.3.3 Triple and The models of triple and quadruple PI lines are a generalization of the coupled PI line model.
Quadruple They represent respectively 3 and 4 three phase circuits. The quadruple model with fault is also
PI Lines available.
A Triple and
Quadruple PI
Lines Icons
and
Diagrams
1.1 1.2
2.1 2.2
PI 3
3.1 3.2
2-7-297
Lines and Cables
PI Line Sections
1.1 1.2
2.1 2.2
PI 4
3.1 3.2
4.1 4.2
1.1 1.2
2.1 2.2
PI 4
3.1 3.2
4.1 4.2
B Parameter The parameters for triple and quadruple PI lines are the same as for those for simple PI lines, ex-
Description cept 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 that allows calcu-
late the values of the parameters from EMTP or Inpurdue files is quite interesting; it allows users
to avoid the tedious task of re-transcribing the values and possible resulting errors.
2-7-298
Lines and Cables
PI Line Sections
C List of As for a coupled PI line, there is no line signal available for triple and quadruple PI lines. Only
Available the fault signals are available.
Signals
D Fault Signals 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-299
Lines and Cables
PI Line Sections
E Control
Panels for PI
Lines - Triple,
Quadruple
and
Quadruple
with Fault
2-7-300
Lines and Cables
PI Line Sections
2-7-301
Lines and Cables
PI Line Sections
F Line Data Since these models are a generalization of the coupled PI line, the data are calculated in the same
way. See section F on page 297 for more details.
2-7-302
Lines and Cables
Marti Lines
Is Ir
Zeq Zeq
+ +
Vs bs br Vr
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-303
Lines and Cables
Marti Lines
M4
Figure 7 - 47 Icon and diagram of a 4-phase Marti model
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 At acquisition, the signals made available by the sensors are the following:
available
signals 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 This section presents the data for Marti Lines and shows how to fill in the parameter control pan-
parameter els.
control panel
of the 2-
phase Marti
model
2-7-304
Lines and Cables
Marti Lines
E Data of a 2- Figures 7 - 48 and 7 - 49 show the geometrical data of a cable to be modelled by a 2-phase Marti
phase Marti model.
line
R = 94.0 mm Insulation
R = 89.25 mm
Shielding
R = 73.60 mm
R = 66.0 mm
Sheath
R = 60.0 mm
R = 37.5 mm
Core
R = 12.5 mm
40 m
F Calculation The calculation of the electrical parameters of a cable line from its geometrical parameters is done
of electrical by the CABLE CONSTANTS auxiliary module of EMTP. Figure 7 - 50 shows the EMTP input
parameters file for the calculation of parameters of a cable line with geometrical parameters in Figures 7 - 48
and related and 7 - 49.
parameter
form
2-7-305
Lines and Cables
Marti Lines
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 Hy-
persim. 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-306
Lines and Cables
Marti Lines
2-7-307
Lines and Cables
Marti Lines
2-7-308
Lines and Cables
Marti Lines
G The data The figures 7 - 54, 7 - 55 and 7 - 56 show the geometrical data of a D.C. line to simulated by a 4-
form of the 4- phase Marti model.
phase Marti
model
2-7-309
Lines and Cables
Marti Lines
N1 N2
Pole 1 Pole 2
58.0 m
45.00 m
= 300-m
50 cm
3,84 cm
o
45
2-7-310
Lines and Cables
Marti Lines
Sag
H Calculation The calculation of the electrical parameters of a line from its geometrical parameters can be done
of electrical with the LINE CONSTANTS auxiliary module of EMTP. The EMTP input file for calculation of
parameters parameter of the Marti model of the line with geometric data in Figures 7 - 54 to 7 - 56 is shown
and related in Figure 7 - 57.
parameter
form
Figure 7 - 57 The EMTP input file for calculation of the Marti model of
the line in Figures 7 - 54 to 7 - 56
2-7-311
Lines and Cables
Marti Lines
The resulting EMTP output file (*.pun) contains the electrical line parameters required by Hyper-
sim. The .pun file corresponding to the data in Figure 7 - 57 is shown in Figures 7 - 58 and 7 -
59.
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
nZ 6 6.437860366261666e+02 R0
1.214563368916744e+05 8.994441071796258e+03 9.878533416150984e+02 Kz
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 Pz
nA 36 1.80603943883336581040E-04 T0
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 KA
MODE1
-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
MODE2
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-312
Lines and Cables
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-313
Lines and Cables
Marti Lines
2-7-314
Lines and Cables
Marti Lines
2-7-315
Lines and Cables
Marti Lines
I Data of a 3- Figures 7 - 63 and 7 - 64 show the geometrical data of a line to be simulated by a 3 phase Marti
phase line line model.
2-7-316
Lines and Cables
Marti Lines
-12.80m 12.80m
32.92m
20.73m
= 100-m
45,72cm
3,556 cm
o
45
J Calculation The calculation of electrical parameters of the line from the geometrical parameters in Figures 7
of electrical - 63 and 7 - 64 is done by the LINE CONSTANTS auxiliary EMTP module. The EMTP input file
parameters for parameter calculation is shown in Figure 7 - 65.
and related
parameter
form
2-7-317
Lines and Cables
Marti Lines
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 Hyper-
sim. The .pun file corresponding to the data in Figure 7 - 65 is shown in Figure 7 - 66.
2-7-318
Lines and Cables
Marti Lines
2-7-319
Lines and Cables
Marti Lines
2-7-320
Lines and Cables
Marti Lines
2-7-321
Lines and Cables
Marti Lines
7.4.1 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-322
Lines and Cables
Marti Lines
A Icon and The following icon and diagram are used to represent a DC cable.
diagram of a
DC cable
CC
Figure 7 - 71 DC cable: icon and diagram
D List of At acquisition, the following signals are made available by the sensors:
available
signals V_label of bus: Bus voltage (volt)
E The data This example uses the same cable data in Figure 7 - 48 and the calculation of parameters is done
form of a DC in a similar way. Figures 7 - 72 and 7 - 73 show the data form used for DC cable.
cable form
2-7-323
Lines and Cables
Marti Lines
2-7-324
Lines and Cables
Marti Lines
2-7-325
Lines and Cables
Marti Lines
2-7-326
Chapter 8
TRANSFORMERS
A General The three-phase transformer library contains models of linear, saturable and tap changer
Introduction 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:
Y connection with or without neutral grounding
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 convert-
ers.
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 spe-
cial parameters serve to minimize the generation of internal nested loops, and their corre-
sponding 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 cy-
cle (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 asymptot-
ically. In this last case, the model generates automatically segments (in the positive and neg-
ative saturation zone) of equal length (Is).
The characteristic Tap changer is also available and is very useful in setups with power con-
verters.
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, Hys-
teresis Modeling in the Matlab/Power System Blockset, Mathematics and Computers in Simu-
lation, Volume 63, Issues 3-5, Pages 237-248.
2-8-327
Transformers
Three-Phase Linear and Saturable Transformers
In transmission and distribution networks, the three-phase transformers can be built either with
three single-phase transformers or with one three-phase unit called shell-type or core-type
transformer.
1
TrF3 Three-Phase Zigzag Transformer (Linear) with 3 Windings
2 3
B Parameter Single phase representations of three-phase linear and saturable transformers, with three wind-
Description ings, are shown in Figure 8 - 2and 8 - 3.
2-8-328
Transformers
Three-Phase Linear and Saturable Transformers
L2 R2
R1 L1
Rm Lm
L3 R3
L2 R2
R1 L1
Rm Lsat
L3 R3
D Magnetizatio Rm: Equivalent resistance of iron losses of the magnetic circuit. Expressed in ohm;
n Impedance
Lm: Magnetization inductance in henry (for linear transformers only).
Parameters
E Winding Connections:
Parameters
Y ground: Grounded Y connection;
2-8-329
Transformers
Three-Phase Linear and Saturable Transformers
F Saturation The saturation is characteristic of the core, hence of the winding and not the type of three-phase
Parameters 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 ori-
gin (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 num-
ber of points.
2-8-330
Transformers
Three-Phase Linear and Saturable Transformers
Flux
3
2
Isat
G Hystereris Hysteresis:
Parameters
with PHIr: Positive remanent flux (in volts-second) at null current;
Saturation 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 cal-
culated 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 represent-
ed 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-331
Transformers
Three-Phase Linear and Saturable Transformers
Isat: Current value (in Amperes) for each segment of the saturation curve. The first value must be
equal to Is. The number of segments must be equal to the number of points parameter.
Flux: Flux value (in volts-second) for each segment of the saturation curve. The first value must
be equal to PHIs. The number of segments must be equal to the number of points parameter.
H List of The following signals are made available after an acquisition for analysis or processing. These
Available signals vary from one transformer to another.
Signals
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 Figures 8 - 5 and 8 - 6 show respectively the control panels allowing the user to enter the param-
Panels of eters for a three-phase linear transformer with two windings.
Three-Phase
Transformers
2-8-332
Transformers
Three-Phase Linear and Saturable Transformers
2-8-333
Transformers
Three-Phase Linear and Saturable Transformers
2-8-334
Transformers
Three-Phase Linear and Saturable Transformers
2-8-335
Transformers
Three-Phase Linear and Saturable Transformers
2-8-336
Transformers
Three-Phase Linear and Saturable Transformers
2-8-337
Transformers
Three-Phase Linear and Saturable Transformers
2-8-338
Transformers
Three-Phase Linear and Saturable Transformers
2-8-339
Transformers
Single-Phase Linear and Saturable Transformers
B Icons and The following icons and diagrams are used to represent the different single-phase transformers
Diagrams of available with Hypersim. The number of windings is specified directly on the diagram represent-
Single-Phase ing the selected transformer.
Transformers
2-8-340
Transformers
Single-Phase Linear and Saturable Transformers
1 2
TrP9 Single-Phase Series Linear Transformer with 2 windings
3 4
1 2
TrV8 Single-Phase Series Saturable Transformer with 2 windings
3 4
1 2
Tr9Z Single-Phase Series Saturable Transformer with 3 windings
3 4 5 6
D Magnetizatio Rm: Equivalent resistance of iron losses of the magnetic circuit. Expressed in ohm;
n Impedance
Lm: Magnetization inductance in henry (for linear transformer only).
Parameters
F Saturation Note : The saturation is characteristic of the core, hence of the winding. It is represented
Parameters (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;
Residual flux: Only used for inrush current phenomena;
2-8-341
Transformers
Single-Phase Linear and Saturable Transformers
Isat: The value of the current (in ampere) for each segment of the saturation curve. The ori-
gin (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 num-
ber of points.
Flux
3
2
Isat
G Hysteresis Parameters are identical to the saturable three-phase transformers. (see Section 8.1).
parameters
with
saturation
H List of The following signals are made available after an acquisition for analysis or processing. These
Available signals vary from one transformer to another.
Signals
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-342
Transformers
Single-Phase Linear and Saturable Transformers
Figure 8 - 15 shows the control panel of a single-phase linear transformer with two windings.
2-8-343
Transformers
Single-Phase Linear and Saturable Transformers
2-8-344
Transformers
Single-Phase Linear and Saturable Transformers
2-8-345
Transformers
Single-Phase Linear and Saturable Transformers
2-8-346
Transformers
Single-Phase Linear and Saturable Transformers
2-8-347
Transformers
Single-Phase Linear and Saturable Transformers
2-8-348
Transformers
Linear and Saturable Series Transformers
2-8-349
Transformers
Linear and Saturable Series Transformers
B Icons and The following icons and diagrams are used to represent the three different types of three-phase
Diagrams of series transformers available with Hypersim. The number of windings is specified directly on the
Series diagram representing the selected transformer.
Transformers
D Magnetizatio Rm: Equivalent resistance of iron losses of the magnetic circuit. Expressed in ohms;
n Impedance
Lm: Magnetization inductance in henry (for linear transformer only).
Parameters
E Winding Connections:
Parameters
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;
2-8-350
Transformers
Linear and Saturable Series Transformers
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).
F Saturation Note : The saturation is characteristic of the core, hence of the winding and not the type of
Parameters three-phase connection (Y or delta). It is represented (schematically with line seg-
ments) 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 ori-
gin (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 num-
ber of points.
Flux
3
2
Isat
G Parameters The parameters are identical to those of three-phase saturable transformers (See Section 8.1).
for
Hysteresis
with
Saturation
2-8-351
Transformers
Linear and Saturable Series Transformers
H List of The following signals are made available after an acquisition for analysis or processing.
Available
Signals IMAGa,b,c_Trllabel: Magnetization current for each phase of a saturable transformer
(ampere);
ILMAGa,b,c_Trlabel: Magnetization current for each phase for linear series transformer
(ampere);
SEGa,b,c_Trlabel: Segment number of saturation curve.
-The numbering is positive starting at 1 for the last segment in the negative saturation zone.
-In the hysteresis 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
(see the three-phase transformer for more details).
FLUXa,b,c_Trlabel: Magnetization flux for each phase of a series saturable transformer
(V-s);
IPRIMa,b,c_Trlabel: Primary current for each phase of a serial saturable transformer (A).
Figure 8 - 24 shows the control panel of a linear series transformer with two windings.
2-8-352
Transformers
Linear and Saturable Series Transformers
2-8-353
Transformers
Linear and Saturable Series Transformers
2-8-354
Transformers
Linear and Saturable Series Transformers
2-8-355
Transformers
Linear and Saturable Series Transformers
2-8-356
Transformers
Linear and Saturable Series Transformers
2-8-357
Transformers
Three-Phase Transformers with Tap Changer
2-8-358
Transformers
Three-Phase Transformers with Tap Changer
B Icons and The following icons and diagrams are used to represent tap changer transformers.
Diagrams of
Tap Changer
Transformers
g
TrA8
Converter transformer with tap changer and decoupling element
1
U
U Tap
D
Tap
D
TrOY Saturable transformer with tap changer, 2 windings
1
U
U Tap
Tap D
D
2 3
E Saturation Number of points: Represents the number of segments of the current-flux saturation curve.
Parameters Only the positive part of the curve is specified; the negative part is completed by symmetry;
Residual flux: Only used for inrush current phenomena;
The residual flux option is not installed yet;
2-8-359
Transformers
Three-Phase Transformers with Tap Changer
Isat: The value of the current (in ampere) for each segment of the saturation curve. The ori-
gin (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 num-
ber of points.
F Tap Changer 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 (inter-
nal, external or manual DC command);
Manual position: Manual position required (can be changed during the simulation).
G List of At acquisition, the following signals are made available by the sensors:
Available
Signals IMAGa,b,c_Trlabel: Magnetization current for each phase (Amperes);
FLUXa,b,c_Trlabel: Magnetization flux for each phase (volts-second);
SEGa,b,c_Trlabel: Segment number of the saturation curve.
IPRIMa,b,c_Trlabel: Primary winding current a, b, and c phases.
TapPosition_Trlabel: Tap position.
Tap_Trlabel: Tap position.
Up_Trlabel: Up order from an internal DC command;
UpEXT_Trlabel: Up order from an external DC command;
UpBuf_Trlabel: Signal specifying the beginning of a change issued by an up order;
Down_Trlabel: Down order from an internal DC command;
DownEXT_Trlabel: Down order of one position from an external DC command;
DownBuf_Trlabel: Signal specifying the start of a change issued by a down order;
Pos_Trlabel: Tap position;
PosSign_Trlabel: Specifies that the tap is above or below the rated position;
Pos0x%_Trlabel: Specifies by how much the tap is above or below the rated position.
2-8-360
Transformers
Three-Phase Transformers with Tap Changer
Timing
rate
Operating time
Effective change
2-8-361
Transformers
Three-Phase Transformers with Tap Changer
2-8-362
Transformers
Three-Phase Transformers with Tap Changer
2-8-363
Transformers
Three-Phase Transformers with Tap Changer
2-8-364
Transformers
Three-Phase Transformers with Tap Changer
2-8-365
Transformers
Measuring Transformers
B Icons and
Diagrams
2-8-366
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 num-
ber of points.
F List of At acquisition, the following signals are made available by the sensors:
Available
Signals VOUT(a, b, c)_label: Output voltage (V);
VMAG(a,b,c)_label: Voltage in magnetization branch (V);
IMAG(a,b,c)_ label: Magnetization current (A);
FLUX(a,b,c)_label: Mutual flux in the transformer (V.s).
VLOADSEC(a,b,c,n)_label: Load voltage on the secondary
VLOADTERT(a,b,c,n)_label: Load voltage on the tertiary
ILOADSEC(a,b,c,n)_label: Load current on the secondary
ILOAD TERT(a,b,c,n)_label: Load current on the tertiary
ILOAD TERT(0)_label: Ground current on the tertiary
G Control Panel Figures 8 - 37 and 8 - 38 show the control panel of voltage transformers with capacitive voltage
of Measuring divider;
Transformers
Figures 8 - 39 to 8 - 42 show the control panel of the current transformer and Figures 8 - 43 to 8
- 48 show the control panel of the voltage transformer with magnetic coupling;
2-8-367
Transformers
Measuring Transformers
2-8-368
Transformers
Measuring Transformers
2-8-369
Transformers
Measuring Transformers
2-8-370
Transformers
Measuring Transformers
2-8-371
Transformers
Measuring Transformers
2-8-372
Transformers
Measuring Transformers
2-8-373
Transformers
Measuring Transformers
2-8-374
Transformers
Measuring Transformers
2-8-375
Transformers
Measuring Transformers
2-8-376
Transformers
Measuring Transformers
2-8-377
Transformers
Measuring Transformers
2-8-378
Transformers
Measuring Transformers
2-8-379
Transformers
Measuring Transformers
2-8-380
Chapter 9
LOADS AND MOTORS
Dynamic Loads
A Dynamic Load The block diagram of the dynamic load model implementation is shown in Figure 9 - 2. A
Model voltage source is connected to a series impedance (Rs. Ls) and a parallel impedance (Rp Lp
Introduction or Rp Cp). The value of the internal voltage for this source allows users 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-381
Loads and Motors
Dynamic Load
(EQ 1)
np 1 + T p1 s f f0
P = P 0 -------
U
-------------------- + kp -----------
U0 1 + T p2 s f0
(EQ 2)
U nq 1 + T q1 s f f0
Q = Q 0 ------- - + kq -----------
-------------------
U 0 1 + T q2 s f0
(EQ 4)
nq 2 U 1 + T q1 s
2 f f0
Q = Q 0 ( V min ) ,
-------------- -------------------- + kq -----------
U nq 1 + T q2 s f 0
0
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 (gen-
erally 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-382
Loads and Motors
Dynamic Load
The Vmin voltage level allows users 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 thresh-
old 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 ab-
sorbed 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) orig-
inates from the internal voltage source.(P=P1+P2)
U np 1 + Tp1.s
P = P0 -------
f f0
----------------------- + kp ------------
U0 1 + Tp2.s f0
U nq 1 + Tq1.s
PQ = Q0 -------
f f0
----------------------- + kq ------------
U0 1 + Tq2.s f0
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;
V min : Voltage threshold below which the load behaves as a constant impedance (pu);
2-9-383
Loads and Motors
Dynamic Load
D List of At acquisition, the following signals are made available by the sensors:
Available
Signals Freq_label: Network frequency (Hertz);
Period_label: Inverse of the frequency (seconds);
Vd_label: Direct (D) axis voltage (pu);
Vq_label: Quadrature (Q) axis voltage (pu);
Vrms_label: Average value of the direct sequence voltage (pu);
E(a,b,c)_label: Output voltage of the dynamic load (volt);
Ed_label: Direct (D) axis output voltage (pu);
Eq_label: Quadrature (Q) axis output voltage (pu);
I(a,b,c)_label: Dynamic load current (ampere);
P_label: Total active power of the load (pu);
Q_label: Total reactive power of the load (pu);
Pcomp_label: Compensating active power, originating from the internal voltage source
(pu);
Qcomp_label: Compensating reactive power, originating from the internal voltage source
(pu);
2-9-384
Loads and Motors
Dynamic Load
2-9-385
Loads and Motors
Dynamic Load
2-9-386
Loads and Motors
Harmonic Load
Harmonic Load
2-9-387
Loads and Motors
Harmonic Load
(EQ 6)
1 + T q1 s f f0
Q = Q 0 -------
U nq
- + kq -----------
-------------------
U 0 1 + T q2 s f0
(EQ 8)
nq 2 U - 1 + T q1 s
2 f f0
Q = Q 0 ( V min ) ------------- ,
-------------------- + kq -----------
U nq 1 + T q2 s f0
0
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 (gen-
erally between 0 and 2)
kq is reactive power variation coefficient as a function of the fundamental frequency (gen-
erally between 0 and -3)
The Vmin voltage level allows users 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.
2-9-388
Loads and Motors
Harmonic Load
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 ab-
sorbed 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) orig-
inates from the internal voltage source (P=P1+P2).
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.
U np 1 + Tp1.s
P = P0 -------
f f0
----------------------- + kp ------------
U0 1 + Tp2.s f0
U nq 1 + Tq1.s
PQ = Q0 -------
f f0
----------------------- + 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;
V min : Threshold below which the load behaves as a constant impedance (pu);
2-9-389
Loads and Motors
Harmonic Load
2-9-390
Loads and Motors
Harmonic Load
F List of At acquisition, the following signals are made available by the sensors:
Available
SIgnals Freq_label: Network frequency (Hertz);
Period_label: Inverse of the frequency (seconds);
Vd_label: Direct (D) axis voltage (pu);
Vq_label: Quadrature (Q) axis voltage (pu);
Vrms_label: Average value of the direct sequence voltage (pu);
E(a,b,c)_label: Output voltage of the dynamic load (volts);
Ed_label: Direct (D) axis output voltage (pu);
Eq_label: Quadrature (Q) axis output voltage (pu);
P_label: Total active power of the load (pu);
Q_label: Total reactive power of the load (pu);
Pcomp_label: Compensating active power, originating from the internal voltage source
(pu);
Qcomp_label: Compensating reactive power, originating from the internal voltage source
(pu);
Po_label: Reference value for active power of the load, including random variations (pu)
Qo_label: Reference value for reactive power of the load, including random variations,
including random variations (pu)
V(a,b,c)_label: Value of the internal voltage of the source allowing to inject the desired
power (V)
I(a,b,c)Fund_label: Value of the current of the fundamental (A)
I(a,b,c)Total_label: Total current of the harmonic load. This current includes the dynamic
and random part, along with the injected harmonic current (A);
I(a,b,c)_label_label: Current of the dynamic and random load only. This does not include
the harmonic current (A);
I(a,b,c)Harm_label: Harmonic current to be injected only (A);
FundAng_a_label: Angle value of the fundamental of the current for the load, phase a
(degrees)
G Harmonic Figure 9 - 7 shows the control panels for the harmonic load.
Load Control
Panels
2-9-391
Loads and Motors
Harmonic Load
2-9-392
Loads and Motors
Harmonic Load
2-9-393
Loads and Motors
Harmonic Load
2-9-394
Loads and Motors
D.C. Motor
DC Motor
2-9-395
Loads and Motors
D.C. Motor
a = Lafif + Laaia
where
Lff: inductance in the stator winding
Laa: inductance in the rotor winding
Laf et Lfa: mutual inductances between the rotor and the stator
Also, the mutual inductances can be estimated by a sinusoidal function of the angular speed of
the motor c:
Laf = Lfa = -Lcosc
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 users 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-396
Loads and Motors
D.C. Motor
C Mechanical Load Torque: mechanical torque of the load driven by the motor (N.m)
Load
Moment of inertia: value of total inertia driven by the motor. This value consists of the iner-
Parameters
tia 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)
D D.C. Motor Allows users to specify the origin of the statoric circuit power supply:
Type
Shunt connection: the stator voltage is the same as the rotor voltage, since both are con-
nected in parallel.
Internal: separately excited motor, the stator is supplied by a constant internal source.
External: separately excited motor, the stator is supplied by an external source originating
from an A/D.
Simulink: separately excited motor, the stator is supplied by a source originating from
Simulink.
E List of At acquisition, the following signals are made available by the sensors:
Available
Signals I_label: total current of the D.C. motor (A)
E_label: voltage generated by the armature circuit as a counter electromotive force (V)
wr_label: speed of the D.C. motor rotor (rad/s)
2-9-397
Loads and Motors
D.C. Motor
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 sepa-
rately 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.
2-9-398
Loads and Motors
D.C. Motor
2-9-399
Loads and Motors
Arc Furnace
B A.C. Arc The block diagram of the arc furnace implementation is shown in Figure 9 - 16. The V-I charac-
Furnace teristic consists of three regions and is calculated using the arc furnace parameters and operating
Model 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 pa-
rameters, 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-400
Loads and Motors
Arc Furnace
D Static Ignition voltage: voltage to be reached to ignite the furnace, hence for the electric arc to
Parameters strike (V)
of Arc
Extinction voltage: voltage at which the furnace extinguishes (this voltage must be lower
Furnace
than the ignition voltage) (V)
Average operating power: average power representing the operating conditions of the fur-
nace. (This parameter is used to calculate the characteristic of the furnace before its igni-
tion, 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-401
Loads and Motors
Arc Furnace
E Sinusoidal Sinus frequency: vector of respective frequencies for the sinusoidal modulation of the fur-
Variation nace dynamic characteristic for the three phases (Hz)
Parameters
Sinus amplitude: vector of respective amplitudes for the sinusoidal modulation of the
of Arc
dynamic characteristic for the three phases. The calculated sinus is multiplied by the ampli-
Resistance
tude specified by the user and by the resistance value. The result is then added to the fur-
nace resistance before its ignition (ohm)
Sinus phase: vector of respective phases for the sinusoidal modulation of the dynamic char-
acteristic for the three phases with respect to the initial time of 0 second (degrees)
F Random Noise amplitude: vector of respective amplitudes for the random variation of the dynamic
Variation characteristic for the three phases. The amplitude specified by the user is used to multiply
Parameters the random number which is then added to the resistance value before arc ignition.
of Arc
Random sequence seed: vector of initialization seeds for random functions generating
Resistance
white noise respectively for each phase. This number must be in the interval [0,1].
G List of At acquisition, the following signals are made available by the sensors:
Available
Signals Va_F_label: Arc furnace voltage for phase A (V);
Vb_F_label: Arc furnace voltage for phase B (V);
Vc_F_label: Arc furnace voltage for phase C (V);
Ia_F_label: Arc furnace current for phase A (A);
Ib_F_label: Arc furnace current for phase B (A);
Ic_F_label: Arc furnace current for phase C (A);
WhiteNoise_F_label: Random variation added to the arc furnace resistance when the
selected characteristic is dynamic with white noise, before pass-band filtering (ohm);
WhiteNoiseFilt_F_label: Random variation added to the arc furnace resistance when the
selected characteristic is dynamic with white noise, after pass-band filtering (ohm);
2-9-402
Loads and Motors
Arc Furnace
2-9-403
Loads and Motors
Arc Furnace
2-9-404
Loads and Motors
Induction Motor
Induction Motor
(EQ 10)
b rs
ds = ------ v ds + ------ qs + ------- ( md ds )
s b X ls
(EQ 11)
b r r r1
qr1 = ------ v qr1 ---------------- dr1 + --------- ( mq qr1 )
s b X lr1
2-9-405
Loads and Motors
Induction Motor
(EQ 12)
b r r r1
dr1 = ------ v dr1 + ---------------- qr1 + --------- ( md dr1 )
s b X lr1
(EQ 13)
b r r r2
qr2 = ------ v qr2 ---------------- dr2 + --------- ( mq qr2 )
s b X lr2
(EQ 14)
b r r r2
dr2 = ------ v dr2 + ---------------- qr2 + --------- ( md dr2 )
s b X lr2
(EQ 15)
qs qr1 qr2
mq = X aq -------
- + ----------- + -----------
X ls X lr1 X lr2
(EQ 16)
ds dr1 dr2
md = X ad -------
- + ----------- + -----------
X X lr1 X lr2
ls
In the preceding equation, the Vdr and Vqr rotor voltages are set at zero for the squirrel cage rotor.
Current equations:
(EQ 17)
1
i qs = ------- ( qs mq )
X ls
(EQ 18)
1
i ds = ------- ( ds md )
X ls
(EQ 19)
1
i qr1 = --------- ( qr1 mq )
X lr1
(EQ 20)
1
i dr1 = --------- ( dr1 md )
X lr1
(EQ 21)
2-9-406
Loads and Motors
Induction Motor
Saturation equations:
(EQ 22)
X aq f ( m )
mqsat = mq -------- -------------- mq
XM m
(EQ 23)
Mechanical equations:
(EQ 24)
X ad f ( m )
mdsat = md -------- -------------- md
XM m
(EQ 25)
T e = ds I qs qs I ds
(EQ 26)
b
r = ---------- ( T e T L )
2Hs
Generally, the steady-state representation of the model is presented as a transformer with a rotat-
ing secondary. Figure 9 - 20 shows the model for the D and Q Park axes. Both rotor circuits are
depicted.
2-9-407
Loads and Motors
Induction Motor
B General Number of cages: number of squirrel cages per rotor, one or two;
Parameters
Number of poles: number of poles in the machine;
Base power: rated power (kVA);
Base voltage: rated voltage (kV);
0: rated angular speed (electrical radians/second);
R start: startup resistance for a motor with coiled rotor. This value allows users to increase
the resistance value of the squirrel no 1. (ohm);
T start: application delay of mechanical load, since starting the simulation (s);
C DQ Speed Reference selection for the conversion in the DQ axis system: (Rotor, Stator, Stator rotating
Reference field)
2-9-408
Loads and Motors
Induction Motor
E Connectors Mechanical torque (Internal/External): internal or external mechanical torque (Interne = internal,
to Control from parameters Wmec Tmec, Externe = external, from connector to the control module).
Module
Interface
G Saturation It is possible to add a no-load saturation characteristic. The saturation characteristic is given by
Parameters two 10 point vectors representing the voltage and the r.m.s. current of the no-load machine.
Saturation (Enable/Disable): saturation ON (Enable) or OFF (Disable);
Irms: r.m.s. power line of current (A);
Vrms: phase-ground r.m.s. voltage given to the machine (V).
H List of At acquisition, the following signals are made available by the sensors:
Available
Signals Vds_label: Direct axis stator voltage (V);
Vqs_label: Quadrature axis stator voltage (V);
Ids_label: Direct axis stator current (A);
Iqs_label: Quadrature axis stator current (A);
V(a,b,c)r_label: Stator Voltages (V)
Vdr_label: Direct axis voltage of rotor no 1 (V)
Vqr_label: Quadrature axis voltage of rotor no 1 (V)
I(a,b,c)s_label: Stator currents (A);
Idr_label: Direct axis current of rotor no 1 (A);
2-9-409
Loads and Motors
Induction Motor
2-9-410
Loads and Motors
Induction Motor
2-9-411
Loads and Motors
Induction Motor
2-9-412
Loads and Motors
Induction Motor
2-9-413
Loads and Motors
Using the Hypersim Dynamic load model
9.6.1 Purpose of The purpose of the dynamic load is to model a portion of a power system including a combination
the of loads (motor loads, constant impedance RLC loads) distribution lines, transformers and gener-
Dynamic ators, as a simple equivalent representing the dynamic behavior of this subnetwork. As Hypersim
Load is used to model both the low frequency electromechanical oscillations (typically 0.01 Hz to 2
Model Hz) and the high frequency electromagnetic transients resulting from faults and switchings (typ-
ically 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 func-
tion 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 con-
tent 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 fre-
quency, the position of impedances poles (parallel resonances) and zeros (series reso-
nances) as well as damping (amplitude of poles).
9.6.2 Description
of The single-line diagram of the dynamic load model is presented on Figure 9 - 25.
the Load
Model
Rs Ls P, Q
E
Cp Rp V 0
2-9-414
Loads and Motors
Using the Hypersim Dynamic load model
The positive-sequence voltage V is measured at the load terminals and the internal voltage E mag-
nitude and phase angle with respect to voltage V is automatically varied in the load model so
that the net power P and Q entering the load terminals follow the variation laws given below.
Traditionally, the voltage dependency of load characteristics is represented by an exponential
model as given below.
(EQ 27)
f f0
P = P 0 ------ 1 + k p -----------
V np
if V>Vmin
V 0 f0
(EQ 28)
f f0
Q = Q 0 ------ 1 + k q -----------
V nq
if V>Vmin
V 0 f0
where:
P, Q = active and reactive powers at voltage V and frequency f
P0, Q0 = reference active and reactive powers at reference voltage V0 and frequency f0
f0 = nominal frequency (50 Hz or 60 Hz)
f = frequency of fundamental component (near 50 Hz or 60 Hz)
V0 = reference positive-sequence voltage at nominal frequency
V = positive-sequence voltage at fundamental frequency f
Vmin = minimum voltage for which np and nq exponents are used (note 1)
np, nq = exponents defining the variation law of P, Q as function of voltage (note 1)
kp, kq = coefficients defining the variations of P, Q
as function of fundamental frequency.
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 f f 0
P = P 0 ----------
- V 1 + k
p ----------- if V<Vmin
np f0
V0
2-9-415
Loads and Motors
Using the Hypersim Dynamic load model
(EQ 30)
V min nq 2 2 f f 0
Q = Q 0 ----------
- V 1 + k
q ----------- if V<Vmin
nq f0
V0
Exponents np and nq depend on the nature of loads which are lumped in the dynamic load. In par-
ticular, 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.
Power
Load class np nq kp kq
factor
Residential
Summer 0.9 1.2 2.9 0.8 -2.2
Winter 0.99 1.5 3.2 1.0 -1.5
Commercial
Summer 0.85 0.99 3.5 1.2 -1.6
Winter 0.9 1.3 3.1 1.5 -1.1
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 positive-se-
quence voltage for a dynamic load with the following parameters. Frequency is kept constant at
nominal frequency.
2-9-416
Loads and Motors
Using the Hypersim Dynamic load model
Vmin=0.7 pu
Figure 9 - 26 shows P(V) and Q(V) curves for three different exponents np and nq.
In order to determine the four parameters Rs, Ls, Rp, Cp, the load impedance Z(f) as function of
frequency, must be known. It is quite rare that utilities have field measurements available. There-
fore, the only practical method is to perform a detailed simulation of the system to be reduced,
including resistive loads, motor loads, lines, transformers.... The model can be built with any elec-
tromagnetic transient (EMT) program such as Hypersim, EMTP, SimPowerSystems...). This can
be a complex task requiring extensive modelling of the distribution network and some parts of the
high voltage network to be reduced. The load is usually known from a load flow program but the
nature of the load is not necessarily known. Some approximations can then be used.
In the following sections we assume a 25 kV distribution voltage. The method used to obtain dy-
namic load models representing the distribution system (25 kV) and, eventually, part of the trans-
mission network (161 kV, 240 kV...) is explained below and it is illustrated by an example.
2-9-417
Loads and Motors
Using the Hypersim Dynamic load model
From a load flow output, the active and reactive powers Pi, Qi flowing into each individual feeder
or group of feeders (25 kV) is known. The detailed model used for each individual load Pi, Qi is
shown on Figure 9 - 27. The load is assumed to have a resistive part R which contributes to damp-
ing of transients, and a motor part which practically does not contribute to damping. This motor
load is modelled as a voltage source Em behind a series impedance Rm, Lm. (Figure 9 - 27). If
capacitor banks are used for power factor correction at low voltage level (600V and below) they
should be lumped on the distribution level (25kV).The sharing factor km between resistive load
and motor load varies widely according to the country, the season and the nature of load (residen-
tial, commercial...). For example, for the Hypersim model of the Hydro-Quebec system, the fol-
lowing typical load sharing has been used for determining dynamic load models:
winter: 70% resistive; 30% motor (km=0.3)
summer: 50% resistive; 50% motor (km=0.5)
km*Pi, Qi Pi, Qi
Rm Lm
Em
(1-km)*Pi
R
Let us assume that the load flow program gives the following values:
V= 25 kV
P= 80 MW
Q= 15 Mvar
2-9-418
Loads and Motors
Using the Hypersim Dynamic load model
The net active and reactive powers to be programmed in the Hypersim load are therefore +80 MW
and +15 Mvar. The 80 MW active power is the total power absorbed by a mix of motor loads,
resistive loads, plus line and transformer losses. The15 Mvar reactive power is the net reactive
power consumed by the subnetwork (lets say +25 Mvar absorbed by motors and series induc-
tances - 10 Mvar generated by power factor correction capacitor banks).
The positive-sequence magnitude and phase of Z(f) are as shown on Figure 9 - 28.This impedance
curve corresponds to a sharing of 40 MW resistive loads and 40 MW motor loads. The magnitude
curve shows a resonance at 240 Hz. This parallel resonance is mainly due to the interaction of the
distributed 10 Mvar capacitor banks used for power factor correction and motor+transformer in-
ductances. From 0 Hz to 240 Hz the system is inductive. At resonance, the impedance is resistive
(15.2 ohms). The R value corresponds approximately to the resistive load (P=25e3^2/15.2= 41.1
MW). Above 240 Hz the system is capacitive.
2-9-419
Loads and Motors
Using the Hypersim Dynamic load model
Solving this problem is not trivial. The easiest way to get the exact solution is to use an iterative
solution. However, the iteration process can usually be simplified by using the five equations giv-
en below. Because the impedance magnitude Zmax, at resonance, is practically equal to the resis-
tance Rp, the computation of Xs and Xp is first performed by neglecting the resistance Rs . Under
these conditions, one can show that the inductive reactance Xs of the series branch and the capac-
itive reactance Xp of the shunt branch are given by:
(EQ 31)
1
X s = X 0 --------------------------2-
f0
Series branch (Ls): 1 ---------
f max
(EQ 32)
(EQ 33)
f max 2
X p = X s ---------
f0
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
2-9-420
Loads and Motors
Using the Hypersim Dynamic load model
Note that the new Xs value remained the same as the one computed by equation (1), indicating
that the computation process has converged.
Finally, the initial value of Rp (Rp1) must be corrected to take into account the resistive losses
introduced by Rs at resonance:
(EQ 35)
1
R p = -------------------------------------------
1 - ----- Rs f0 2
------- - ---------
R p1 X 2 f max
s
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 Rep-
resentation for Dynamic Performance, IEEE paper 1992 WM 126-3 PWRS
2-9-421
Loads and Motors
Using the Hypersim Dynamic load model
2-9-422
Chapter 10
ELECTRONIC SWITCHES AND BRIDGES
B Icon and The following icon and diagram are used to represent electronic switches:
Diagram of
Electronic
Switches
.
1 1
Ia
I SwYR Ib Sw94
Ic
SwMono SWITCH
2 2
10.1.1 Parameter
Description
A General Connection (Series = S Delta = D) If S (serial), each member of the switch is in series
Parameters with one phase of the network. If D (delta), each member of the switch is connected be-
tween two phases of the network;
Note : The Delta connection is not functional at this time.
2-10-423
Electronic Switches and Bridges
Electronic Switches
B Switch Type: Set the type of the switch used. Each phase may use a different type of switch. Some
Parameters type requires two command signals per phase because they are designed from two distinct ele-
ments.
Available types are:
Ideal switch:
The conduction and blocking depend on the command signal.
Breaker:
The command signal set the blocking. The conduction depends on the command signal and
the current intensity.
Thyristor:
The blocking is set by the command signal and the current intensity. The firing is set by the
command signal and the voltage at the thyristor terminals.
Back-to-back thyristor:
The blocking of each thyristor is set by its own command signal and current intensity. The
firing is set by its own command signal and the voltage at each thyristor terminals.Two
command signals per phase are required.
Back-to-back thyristor and diode:
The thyristor blocking is set by the command signal and the current intensity. The firing is
set by the command signal and the voltage at the thyristor terminals.
The diode blocking is set only by the current intensity through the diode and the firing by
the voltage at the diode terminals only
Note : Using a diode command signal will force the diode to fire. Sometimes, this technique
is used to ease the simulation.
Diode:
The diode blocking is set only by the current intensity through the diode and the firing by
the voltage at the diode terminals only.
GTO:
The GTO blocking is set by the command signal if the current is acceptable. The GTO fir-
ing is set by the command signal and the voltage at the GTO terminals.
Back-to-back GTO and diode:
The GTO blocking is set by the command signal if the current is acceptable. The GTO fir-
ing is set by the command signal and the voltage at the GTO terminals.
The diode blocking is set only by the current intensity through the diode and the firing by
the voltage at the diode terminals only.
Note : Using a diode command signal will force the diode to fire. Sometimes, this technique
is used to ease the simulation.
C Fail signal Default zero reset. If the ENABLE button is grey, the FailSig_label is reset to zero. This signal
reset is produced 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 State of the switches in steady state on a per phase basis. 0 if the switch is open and 1 if the
condition switch is to be closed.
2-10-424
Electronic Switches and Bridges
Electronic Switches
E Precision Commissioning of the high precision switching (diode, thyristor or GTO). Compensate the digital
Valve error as a result of the switch state change accordingly to the calculation time step.
10.1.2 Other
Parameter
s
A Open State Resistances of phases A, B and C of the switch in open state (ohm);
Resistances
B Closed State Resistances of phases A, B and C of the switch in closed state (ohm);
Resistances
C Holding Current threshold value below which the valve is automatically blocked. Not relevant for the ideal
Current switch (A);
D Snubber Capacitance of the RC snubber branch in parallel with the valve (F);
Capacitance
E Snubber Resistance of the RC snubber branch in parallel with the valve (ohm);
Resistance
F Forward Highest value of overvoltage across a blocked valve. Relevant only for the diode, the GTO and
Break the thyristor (V);
Overvoltage
G Reverse Highest value of overvoltage across a valve. Relevant only for the diode, the thyristor and the
Break GTO (V);
Overvoltage
H Turn-off Lowest time interval during which the voltage across the valve must stay negative to avoid the
Time. valve being fired again when the forward voltage turns positive. Relevant only for thyristor (s);
I GTO Maximal value of the GTO current that can be turned off by the GTO turn off command. Relevant
Maximum only for the GTO (A);
Breakable
Current
J Forward Minimal forward voltage for which valve firing is possible. Relevant only for the diode, the thy-
Voltage Drop ristor and the GTO (V);
10.1.3 Commands Establishes the control order origin; external, control block or from Simulink.
A External The command signals are from the digital inputs.
B Block of The command signals are from the Control Block input placed on the switch icon.
Commands
2-10-425
Electronic Switches and Bridges
Electronic Switches
The P connector, on the icon (see Figure 10 - 1), allows users 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 fir-
ing 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 users 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 At acquisition, the following signals are made available by sensors:
Available
Signals Ia,b,c_label: Current through the switch (pu);
cmd12,a,b,c_label: Firing command for the 1 to 2 component of the switch;
cmd21,a,b,c_label: Firing command for the 2 to 1 component of the switch;
state12,a,b,c_label: State of the 1 to 2 component of the switch;
state21,a,b,c_label: State of the 2 to 1 component of the switch;
FailSig,a,b,c_label: Alarm signal from the switch whose meanings are the following:
1: Violation of the extinction time limit Tq for Thyristor12.
(Automatically reset to zero after 1 calculation time step)
1 :Violation of the extinction time limit Tq for Thyristor21.
(Automatically reset to zero after 1 calculation time step)
2:Thyristor12 reverse voltage higher than Rbov. (Reset only by Fail Reset=1)
2:Thyristor21 reverse voltage higher than Rbov. (Reset only by Fail Reset=1)
3:Thyristor12 forward voltage higher than Fbov. (Reset only by Fail Reset=1)
3: Thyristor21 forward voltage higher than Fbov. (Reset only by Fail Reset=1)
P_label: Control signal from the Control System module.
2-10-426
Electronic Switches and Bridges
Electronic Switches
A Electronic
Switches
Command
Panel
.
2-10-427
Electronic Switches and Bridges
Serial Breaker and Shunt Fault Breaker
B Icons and There are two types of breakers: the serial breaker and the fault breaker. The icon and the diagram
Diagrams of serial breakers are shown in Figure 10 - 3 while those of fault breakers are shown in Figure 10
Representing -3
Breakers
A B C P
A B C P
C Parameter The data forms of a serial breaker and of a fault breaker are shown in Figures 10 - 5, 10 - 6 and
Description Figures 10 - 7, 10 - 8 respectively.
D General SI or pu units.
Parameters
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).
2-10-428
Electronic Switches and Bridges
Serial Breaker and Shunt Fault Breaker
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):
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 com-
mand to open is issued.
2-10-429
Electronic Switches and Bridges
Serial Breaker and Shunt Fault Breaker
2-10-430
Electronic Switches and Bridges
Serial Breaker and Shunt Fault Breaker
2-10-431
Electronic Switches and Bridges
Serial Breaker and Shunt Fault Breaker
2-10-432
Electronic Switches and Bridges
Serial Breaker and Shunt Fault Breaker
10.2.2 Breaker
A Open State Resistances of phase breakers A, B, C and ground breaker in open state (ohm).
Resistor
B Closed State Resistances of phase breakers A, B, C and ground breaker in closed state (ohm).
Resistor
C I margin Current absolute value below which the breaker is allowed to open (A).
D Steady State State of phase breakers A, B, C and ground breaker in steady state. Colored if the breaker is
Condition open and Grey, if the breaker is closed.
2-10-433
Electronic Switches and Bridges
Serial Breaker and Shunt Fault Breaker
F Time Units Second, millisecond or cycle is available. (For cycle the frequency is mandatory)
G Phase Specify which among the phase breakers A, B, C and ground breaker can change state if data ac-
Operated quisition is made with the switching enabled in Spectrum. For changes of state to happen, op-
eration times T1 and T2 below must be such that T1<T2.
H T1 Operation Relative time (with respect to synchronization) when the state of a phase breaker or a ground
Time 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 fre-
quency 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 Relative time (with respect to synchronization) when the state of the phase breaker or a ground
Time breaker returns to the steady state position (s or ms).
J Control Order Specifies the origin of the control signal (Internal = 0, External = 1, Simulink = 2):
Source
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-434
Electronic Switches and Bridges
Triple-Level Converter in H Configuration
A B C
Ground
Ropen/close
10.3.1 Icon and The following icon and diagram are used to represent a 2 triple-level converter in H configuration.
Diagram of
a 2 Triple-
Level
Converter
in H
Configurati
on
2-10-435
Electronic Switches and Bridges
Triple-Level Converter in H Configuration
10.3.2 Parameter Figure 10 - 11 shows the control panel for a 2 triple-level converter in H configuration.
Descriptio
n
10.3.3 Switch
Parameter
s
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 cur-
rent 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 sig-
nal 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 Fail Signal Reset. If Enable is grey, the FailSig_label alarm signal is reset. This signal
Reset is generated if the switch (diode, thyristor, GTO) has reached the forward or reverse
breakdown voltage or if false firing has occurred.
2-10-436
Electronic Switches and Bridges
Triple-Level Converter in H Configuration
C .Other
Parameters
1 Reverse Reverse break overvoltage: Highest value of the reverse voltage in a blocked valve.
Break Applies only to diodes, thyristors and GTO (V).
Overvoltage
2 Forward Forward break overvoltage: Highest value of the forward voltage in a blocked valve.
Break Applies only to thyristors and GTO (V).
Overvoltage
3 Snubber Snubber resistance: resistance of RC branch in parallel with the valve (ohm).
Resistance
2-10-437
Electronic Switches and Bridges
Triple-Level Converter in H Configuration
4 Snubber Snubber capacitance: capacitance of RC branch in parallel with the valve (F).
Capacitance
5 Turn-off Time Turn-off time: Shortest time interval during which the voltage in the valve must be nega-
tive to avoid being fired again when the voltage becomes positive. Applies only to thyris-
tors (s).
6 GTO GTO maximum breakable current: Maximum GTO current value that can be turned off
Maximum by the corresponding GTO command. Applies only to GTO (A).
Breakable
Current
7 Open State Open state resistor: resistances for phases A, B and C of the open switch (ohm).
Resistor
8 Closed State Closed state resistor: resistances for phases A, B and C of the closed switch (ohm).
Resistor
9 Forward Forward voltage drop: minimum forward voltage at which it is possible to fire the valves.
Voltage Drop Applies only to diodes, thyristors and GTO (V).
10 Holding Holding current: Current threshold below which the valve is automatically blocked. Does
Current not apply to ideal switches (A).
10.3.4 Control Specifies the source of the control signal: external, via control blocks or using Simulink.
Order
Source
A External The control signals originate from digital input.
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 At acquisition, the following signals are made available by the sensors:
Available
Signals vValve1,2,3,4(A,B,C)_label: Voltage in the switch;
iValve1,2,3,4(A,B,C)_label: Current in the switch;
cmd12Ext1,2,3,4(A,B,C)_label: Firing command for the 1 to 2 component of the switch;
cmd21Ext1,2,3,4(A,B,C)_label: Firing command for the 2 to 1 component of the switch;
State12_1,2,3,4(A,B,C)_label: State of the 1 to 2 component of the switch;
State21_1,2,3,4(A,B,C)_label: State of the 2 to 1 component of the switch;
2-10-438
Electronic Switches and Bridges
Three-Level Converter
10.4.1 Icon and The following icon and diagram are used to represent a three-level converter.
Diagram of
a 2 Triple-
Level
Converter
in H
Configurati
on
2-10-439
Electronic Switches and Bridges
Three-Level Converter
10.4.2 Parameter Figure 10.13 shows the control panel for a three-level converter bridge.
Descriptio
n
10.4.3 Switch
Parameter
s
A Type Specifies the type of switch. The type available is the following:
Back-to-Back ideal Switch and Diode
Blocking and conduction are set by a control signal. B Fail Signal Reset
B Other 1 Reverse Break Overvoltage Does not apply to the actual model. Highest value of the
Parameters reverse voltage in a blocked valve. Applies only to diodes, thyristors and GTO.
2 Forward Break Overvoltage Does not apply to the actual model. Highest value of the
forward voltage in a blocked valve. Applies only to thyristors and GTO.
3 Snubber Resistance Resistance of RC branch in parallel with the valve.
4 Snubber Capacitance Capacitance of RC branch in parallel with the valve.
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-440
Electronic Switches and Bridges
Three-Level Converter
10.4.4 Control Specifies the source of the control signal: external, via control blocks or using Simulink.
Order
Source
B Control Block The control signals originate from the control block input on the switch icon.
2-10-441
Electronic Switches and Bridges
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 At acquisition, the following signals are made available by the sensors:
Available
vValveP,N,M(A,B,C)_label: Voltage across the equivalent switch (V);
Signals
iValveP,N,M(A,B,C)_label: Current in the equivalent switch (A);
cmdl 2ExtQl,Q2,Q3,Q4(A,B,C))_label: Firing command for the 1 to 2 component of the
switch;
State 12P,N,M(A,B,C)_label: State of the Ito 2 component of the equivalent switch
(Logic);
FailSigl,2,3,4(A,B,C)_label: Does not apply to the actual model. Alarm signal of the switch
with the following meanings:
1: Violation of extinction time limit Tq for Thyristor 12. (Automatically reset after one
calculation time step).
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 En-
able (Grey).
2: Reverse voltage of Thyristor 21 greater than Rhov. (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 (Binary code).
D_label: Does not apply to the actual model. Control signal of control module (% step).
2-10-442
Electronic Switches and Bridges
Three-Level Converter
2-10-443
Electronic Switches and Bridges
Three-Level Converter
2-10-444
Chapter 11
HVDC AND SVC CONTROLLERS
11.1.1 Introduction The HVDC converter library contains both 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.
REC01
Y +
CC 12
D
R D Id
P V_Line
1.This control system is only intended for the thyristor based bridge.
2-11-445
HVDC and SVC Controllers
Rectifier/Inverter 6/12 Pulse DC Controllers
InvE9
+ Y
CC 12 D
I D Id
P V_Line
Rec Q7
+
Y
CC 6
R D
P
Id
V_Line
InvP1
+
CC 6 Y
I D Id
P V_Line
11.1.3 Modelling The general diagram of a converter station including a 12-pulse converter, a converter
the transformer and the generic control system is shown in Figure 11 - 5. For a 6-pulse converter, the
converter bridge would be connected to one of the two secondary windings (star or triangle connections).
and its
control The general diagram of the control system is shown in Figure 11 - 6.
system
11.1.4 Valve It is possible to simulate a short circuit on any of the 12 valves (at the users choice) for a specified
faults and time interval (see form in Figure 11 - 16). A resistive grounded DC fault can also be simulated at
DC fault the converter terminal. The time interval is referenced with respect to the start of the acquisition,
or t = 0.
11.1.5 Firing and The lag angle reference (a) is a firing system input. It is generated by the regulation system and
synchroniz the AC voltages of the switching bus. The synchronization system generates firing pulses for each
ation thyristor. The generic synchronization system used in a 6-pulse converter is of the equiangular
system 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-446
HVDC and SVC Controllers
Rectifier/Inverter 6/12 Pulse DC Controllers
A Equiangular The firing pulses are synchronized with the zero crossings of the switching voltages.
synchronizati
on mode
B Equidistant The firing pulses are synchronized with an oscillator whose frequency is 12 times that of the
synchronizati power grid. The oscillator phase is controlled by the regulation system (current, voltage, etc.)
on mode 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 users 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-447
HVDC and SVC Controllers
Rectifier/Inverter 6/12 Pulse DC Controllers
Id Ld Line
DC Line
1Y 3Y 5Y
Tap changer IaY
a VL
Resistive
a IbY
b DC
Fault
Va c
4Y 6Y 2Y
Vb
1D 3D 5D
IaD A thyristor with
a Valve parallel snubber
Fault
IbD circuit
c b Thyristor
Vc c
4D 6D 2D Neutral
Zneutral
VN
Id
IaY
IbY
Converter
IaD
IbD
Va
Vb Control
Vc
VL
VN
11.1.6 Band-pass The voltages used for synchronization are filtered by band-pass filters with an adjustable tuning
filter frequency. The transfer function of one band-pass filter is:
Bs
H ( s ) = -------------------------------
- (EQ 1)
2 2
s + Bs + o
o = 2f o (EQ 2)
2-11-448
HVDC and SVC Controllers
Rectifier/Inverter 6/12 Pulse DC Controllers
where
BBandwidth in radians/second
o Central pulsation in radians/second
.
0 OR
Manual
blocking 3
Firing
Va
4 Band-pass system
Vb filter Equiangular 1
5 6 or 12 pulses
or
Vc
Equidistant
AC low voltage
detection
2
Tap changer Tap +
control
1.0 3
Id REF (pu) Tap -
1.0
Vd REF (pu) Alpha ord
1
Rectifier Regulation
18
system
Gamma MIN (deg)
2 6
Vd IaY
7
Gamma Commutation
IbY
failure
8 protection
DC fault Forced IaD
protection delay (on inverter)
(on rectifier) 9
Blocking IbD
1
Id
Gamma rate
2-11-449
HVDC and SVC Controllers
Rectifier/Inverter 6/12 Pulse DC Controllers
The three-phase voltages on the primary side of the transformer are thus filtered by an adaptive
band-pass filter. The six secondary (Y and side) line voltages (phase to phase) calculated from
the primary voltages are used to determine the zero crossing times. For each voltage, there are
two zero crossings in one cycle, one with an positive slope and another with a negative slope for
a total of 12 zero crossings in each cycle.
The period T is updated 12 times per cycle. The measured period T is limited within an adjustable
interval defined by the Freq max and Freq min parameters.
11.1.7 Low AC If the voltage is lower than a specified threshold during a specified time interval, the "Low AC
voltage voltage detection" function provides a low voltage flag. In the equiangular synchronization mode
detection 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.
11.1.8 The The function of the regulation system is to regulate the direct current or voltage by adjusting firing
angle angle , and to limit the inverter extinction angle to a minimum value.
regulation
and
limiting
system
11.1.9 The static The Vd-Id static characteristic of a rectifier-inverter system is shown in Figure 11 - 7.
characteris
tic
2-11-450
HVDC and SVC Controllers
Rectifier/Inverter 6/12 Pulse DC Controllers
Voltage
min mode
reference
Voltage
margin
V
Current compensated
mode
Current regulation Current regulation
mode mode
I
Current margin
current
rectifier
Current
inverter reference
11.1.10 The Figure 11 - 8 shows the operation of the voltage dependent current order limiter. The object of
voltage this limiter is to ensure a good recovery of the DC power transit following faults on the AC side.
dependent The risk of commutation failure during recovery is also minimized.
current
order
limiter
(VDCOL)
2-11-451
HVDC and SVC Controllers
Rectifier/Inverter 6/12 Pulse DC Controllers
Idref reel
Vd
1.0 Idref=1.0
Idref=0.8
Vd Vdf
Vdf Td = 0 Tm Idref reel
Idref min
First order dynamic
Idref=0.3
filter
Idref mina
Time constant
Vdfmin Vdf1pu Vdf
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:
Idref min = 0,3 p.u.
Vdf min = 0,18 p.u.
Vdf 1pu = 0,6 p.u.
Idref mina = 0,1 p.u.
11.1.11 Dynamic The functional diagram of the controller is shown in Figure 11 - 9. This pole control function is
operation the same for the rectifier and the inverter.
of the
controller
2-11-452
HVDC and SVC Controllers
Rectifier/Inverter 6/12 Pulse DC Controllers
Commutation failure
detector and
Limiter
limiter
before
limiters
Selector for minimum
(Vd)
(Id)
Regulator
Regulator
Linearization
PI
PI
Ki,I
Ki,V
err Vd
err Id
G()
Kp,V
Kp,I
I
-
+
V/I
DC current reference
+
+
1 + 0.2 s
1 -
-------------------
-
Firing angle
VDCOL
dV
+
LCDT
+
- -
--------------------
1 + 1 s
( 1 + 1 s ) ( 1 + 2 s )
-------------------------------------------
Vdref
+
Idref
1
Vdref
Idref
V
Vd
I
Vdref
Id
Vdref
+
1
+
Idref
Idref
Id
Vd
2-11-453
HVDC and SVC Controllers
Rectifier/Inverter 6/12 Pulse DC Controllers
On the inverter side, a current margin I is subtracted from the inverter reference, usually equal
to that of the rectifier, so that in normal state, there is a I error at the PI input. The inverter
regulates the voltage at the DC line input.
where
K i is the integral gain;
K i T p = K p is the proportional gain;
G ( ) is the linearization factor (see Figure 11 - 10).
Upper and lower limits are applied to the regulator output (representing the delay angle) to
ensure it remains within safe range of operation.
11.1.13 Linearizatio The linearization is done by multiplying the proportional gain by a factor G ( ) depending on
n of gain as shown in Figure 11 - 10.
2-11-454
HVDC and SVC Controllers
Rectifier/Inverter 6/12 Pulse DC Controllers
G()
G()
1.0
sin ( 20 )
------------------
sin ( )
sin ( 20 )
------------------
sin ( 60 )
20 40 60
160 140 120
11.1.14 limits On the rectifier side, is limited between two adjustable values. The typical limits are:
o
min rec = 5 (EQ 4)
o
max rec = 168 (EQ 5)
2-11-455
HVDC and SVC Controllers
Rectifier/Inverter 6/12 Pulse DC Controllers
Note : In the equidistant mode of the synchronization, the minrec is not used.
On the inverter side, the lower limit is an adjustable constant, while the upper limit varies
dynamically:
o
min inv = 102 (EQ 6)
max inv = 180 ( min + ) cf (EQ 7)
where
min is the adjustable minimum value of the extinction angle
cf is the adjustable reduction on max inv when a commutation failure is detected (see
Section 11.1.18) in order to reduce the risk of successive commutation failures.
is the calculated overlap angle
Note that
min + = min (EQ 8)
11.1.15 () In addition to the limit on the value of , a limit is also imposed on the variation rate () of
limitation 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-456
HVDC and SVC Controllers
Rectifier/Inverter 6/12 Pulse DC Controllers
(deg)
90
1 6
25 1 1
30 115
5
6
10
40 60
Rectifier Inverter
Figure 11 - 11 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 disturbances.
The side effect of limiting the variation rate of is to slow down the response of the control
system.
11.1.16 Protection Two protection functions are implemented in the control system: Protection for DC fault on the
system rectifier and Protection for commutation failure on the inverter.
11.1.17 DC fault A fault in the DC power system is detected on the rectifier side when the following two conditions
protection 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-457
HVDC and SVC Controllers
Rectifier/Inverter 6/12 Pulse DC Controllers
11.1.18 Protection
for
commutati
on failures
Detected Commutation
failure
ratemax
Tm rate Td rate
rate
0o
Figure 11 - 12 Variation of
cf when detecting a commutation failure
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
instantaneously creates 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
2-11-458
HVDC and SVC Controllers
Rectifier/Inverter 6/12 Pulse DC Controllers
When a commutation failure is detected, the protection decreases the upper limit of by
cf
as shown in equation (EQ 7). This keeps away from the area where the risk of commutation
failure is high. then takes on the form shown in Figure 11 - 12: increases quickly
cf cf
(adjustable first order time constant) when a commutation failure is detected for quick protection,
but decreases more slowly (adjustable first order time constant) to avoid successive commutation
failures.
It is possible to simulate commutation failures by preventing the current from switching from one
thyristor to its neighbor. To do so, a given thyristor (1 of 12 as per users choice) is prevented
from receiving the firing pulse for a given period of time (adjustable).
11.1.19 Unblocking There are two ways to unblock the converters (e.g. following a persistent DC fault): manually or
sequence 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 Unblocking can only be done manually. To enable the converter, the user must:
(start-up)
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.
11.1.21 The tap The converter transformers (rectifier and inverter) can be equipped with a tap changer.
changer
2-11-459
HVDC and SVC Controllers
Rectifier/Inverter 6/12 Pulse DC Controllers
Down=1 Up Area
Angle ( or )
max angle
Range
min angle
Down Area
Up=1
11.1.22 Description The parameter form of HVDC converters are shown in Figures 11 - 14 to 11 - 17
of
parameters
2-11-460
HVDC and SVC Controllers
Rectifier/Inverter 6/12 Pulse DC Controllers
11.1.25 Operating Converter mode (rectifier = 0, inverter = 1): Operating mode of the converter;
modes
Blocking (Disabled = 0, Enabled = 1): If 0, the converter is disabled; if 1 the converter
is enabled;
Regulator mode constant IN/OUT(0/1): 1 for constant regulation mode, 0 for nor-
mal mode;
constant reference: Value of the delay angle when operating in constant mode
(degrees).
2-11-461
HVDC and SVC Controllers
Rectifier/Inverter 6/12 Pulse DC Controllers
Cathode connection (Neutral = 0, Line = 1): Specifies where the cathode side of the con-
verter is connected; neutral side or DC line side.
Firing (internal = 0; external = 1)
11.1.26 Controller Firing (0 = internal, 1 = external, Simulink=2, Control Block=3): Specifies the source of
parameters firing pulses;
Simulink:
Model name: Name of the Simulink model;
Model directory: Name of the directory in which the Simulink model is stored;
Execution time: Estimated or measured execution time of the Simulink model.
UCC command: Always disable (not yet supported).
As a Rectifier
KI Id: Integral gain of the PI current regulator (degrees/pu/second);
KP Id: Proportional gain of the PI current regulator (degrees/pu/second);
min: Lower limit of the delay angle (degrees);
max: Upper limit of the delay angle (degrees).
1, 2: Limit values for the positive variation of delay angle (degrees)) (See Fig-
ure 11-11);
3, 4: Limit values for the negative variation of delay angle (degrees) (See Figure
11-11);
As an inverter
KI Id: Integral gain of the PI current regulator (degrees/pu);
KP Id: Proportional gain of the PI current regulator (degrees/pu);
KI Vd: Integral gain of the PI voltage regulator (degrees/pu);
KP Vd: Proportional gain of the PI voltage regulator (degrees/pu);
min: Lower limit for the angle (degrees);
min: Lower limit for the angle (degrees);
Id Margin: Current margin (pu);
Vd Margin: Voltage margin (pu);
1, 2: Limit values for the positive variation of delay angle (degrees) (See Figure
11-11);
3: Limit value for the negative variation of delay angle (degrees) (See Figure 11-
11);
Synchronization system at firing:
Synchronization mode (Equidistant, Equiangular): Equidistant for equidistant synchro-
nization mode; Equiangular for equiangular synchronization mode.
2-11-462
HVDC and SVC Controllers
Rectifier/Inverter 6/12 Pulse DC Controllers
Vmin: Minimum voltage value at valve terminal, so that the equidistant synchronization
mode can fire the valve (pu).
K osc: Oscillator gain.
Tap changer transformer with decoupling element: Enabled, Disabled.
Transformation ratio, in the event that this last transformer is not used: Ratio, where
1.0 (pu) represents the rated ratio Ns/Np.
11.1.27 Measureme First order for Id (1): Time constant of the filter used in the current measurement (sec-
nt filters onds);
Second order for Vd (1, 2): Time constants of the filter used in voltage measurement
(Seconds);
2-11-463
HVDC and SVC Controllers
Rectifier/Inverter 6/12 Pulse DC Controllers
delay duration: Time interval during which the value of the forced angle is imposed
by the DC protection system. (seconds);
delay number: Number of times the constant angle is imposed and then removed
before the converter is automatically blocked by the DC fault protection;
Protection against commutation failure (inverter)
ON/OFF Protection (1/0): 1 enables protection, 0 disables protection;
cf: Value added to the lower limit of by the protection for commutation failures
(degrees);
Rise time: First order time constant affecting the increase of minimum (seconds);
Fall time: First order time constant affecting the decrease of minimum (seconds);
11.1.32 Low AC Vac threshold: Voltage threshold used for low AC voltage detection (pu)
voltage
detection
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 Disturbanc Faults or Commutation failure (None =0, Valve= 1, DC=2, Misfiring = 3, DCY=4,
es DCD=5): Specifies the type of fault.
0 if no disturbance is desired;
1 for valve fault (short circuit);
2 for ground fault on converter terminals;
3 for simulation of commutation failure;
4 for a fault to be applied in the converter connected to the wye secondary of the
transformer
5 for a fault to be applied in the converter connected to the delta secondary of the trans-
former
Valve No. for fault or commutation failure (1-12): Number of valve to which the fault or the
commutation failure is applied. Numbers 1 to 12 correspond to the following valves (see
Figure 11 - 5): 1Y, 2Y, 3Y, 4Y, 5Y, 6Y, 1D, 2D, 3D, 4D, 5D, 6D.
DC fault R: Value of fault resistance on converter terminals (ohm) (see Figure 11 - 5).
Reference step (None = 0, Iref =1, Vref=2): Specifies the reference step:
0 if no step is desired;
1 for a step in the current reference;
2for a step in the voltage reference (see Figure 11 - 9).
Iref or Vref: Step size for current or voltage reference (pu);
Start time: Start time of the disturbance (second);
End time: End time of the disturbance (second).
2-11-464
HVDC and SVC Controllers
Rectifier/Inverter 6/12 Pulse DC Controllers
1.This parameter is used in the element switching logic. The forward voltage drop is not modeled.
2-11-465
HVDC and SVC Controllers
Rectifier/Inverter 6/12 Pulse DC Controllers
11.1.35 Control
panel for
HVDC
converters
2-11-466
HVDC and SVC Controllers
Rectifier/Inverter 6/12 Pulse DC Controllers
2-11-467
HVDC and SVC Controllers
Rectifier/Inverter 6/12 Pulse DC Controllers
2-11-468
HVDC and SVC Controllers
Rectifier/Inverter 6/12 Pulse DC Controllers
11.1.36 List of At acquisition, the following signals are made available by the sensors:
available
signals VSYNCa,b,c_label: Primary phase voltages used by the firing synchronization system
(volt));
VSYNCba,cb,ac_label: Primary phase-to-phase voltages used by the firing synchronization
system (volt);
2-11-469
HVDC and SVC Controllers
Rectifier/Inverter 6/12 Pulse DC Controllers
2-11-470
HVDC and SVC Controllers
Rectifier/Inverter 6/12 Pulse DC Controllers
2-11-471
HVDC and SVC Controllers
SVC Controller
2-11-472
HVDC and SVC Controllers
SVC Controller
B Static
Compensator
Icon and
Diagram
SV
U
U
I I
2-11-473
HVDC and SVC Controllers
SVC Controller
Distribution Unit
Measuring Unit Regulation Unit
BCMT
Park Vmes Regulator Bp_tot Bp_tot
PI Conversion to
Conversion Bs_tot BICT
U
BICT
Linearization
Network Frequency
BCMT
Phase-Lock freq
Loop
Generation of
wt Firing Pulses
(PLL)
CONTROL SYSTEM
Primary Secondary
Network E
POWER COMPONENT
2-11-474
HVDC and SVC Controllers
SVC Controller
r L
R
C
Vpu Average
Value for One Regulator 1 Modulo wt
-
PI s 2*PI
Cycle
*
cos
2-11-475
HVDC and SVC Controllers
SVC Controller
Va
Park Vmeasured
Vb -1 +
Vc Conversion s -
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 rep-
resented as a parallel combination of the TSC capacitive and TCR inductive branches.
2-11-476
HVDC and SVC Controllers
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:
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 Transformer Parameters
Parameters
Name of primary XFO Bus: Name of the bus on the high voltage side of the static com-
pensator 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.
Control System Parameters
Source of control: Where the control system is modelized (Intern = Internal, External,
Simulink);
Firing order: (Internal, External);
Directory: Directory where the HyperLink model is saved;
Name of HyperLink model;
Execution time: Estimated execution time for the HyperLink model.
Precision valve: Specifies if the user wants to use the precision valve model
2-11-477
HVDC and SVC Controllers
SVC Controller
11.2.2 Control
System
Parameter
s
A Reference Vref: Voltage reference (pu) (automatic mode);
Parameters
Bref: Susceptance reference (pu/100MVA) (manual mode).
CLC Mode: (Automatic, Manual)
B Operating TCC mode: (On = synchronized firing of the TSC capacitive branches, Off = continuous
Mode firing);
Parameters
Valve blocking and unblocking: (Deblock = valve firing enabled, Block = valve firing dis-
abled);
D Protection Vmax: Maximum value of primary voltage (pu). Above this value, the static compensator is
Strategies disabled;
Vmin_on: Minimum value of primary voltage (pu). Below this value, the static compensa-
tor is disabled;
Vmin_off: Minimum value of primary voltage (pu) required to enable the static compensa-
tor.
E AC Fault Vac_min: Primary voltage threshold (pu) below which a fault is detected;
Parameters
Delay AC fault (s);
Minimum duration - AC fault (s);
Delay under voltage: falling edge delay during a specified time interval is applied (s).
2-11-478
HVDC and SVC Controllers
SVC Controller
H Power The parameters of the elements in the compensator power component are the same for all four
Component branches.
Parameters
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 At acquisition, the following signals are made available by the sensors:
Available
Signals CMD12phase_TCR1_label: Firing pulse of the positive valve in the TCR inductive branch;
CMD21phase_TCR1_label: Firing pulse of the negative valve in the TCR inductive
branch;
Iphase_TCR1_label: Current across the TCR inductive branch;
STATE12phase_TCR1_label: State of the positive valve in the TCR inductive branch;
STATE21phase_TCR1_label: State of the negative valve in the TCR inductive branch;
VphaseTh_TCR1_label: Voltage across the valves in the TCR inductive branch;
VCAPphase_TCR1_label: Voltage across the capacitor in the TCR inductive branch;
FAILSIGphase_TCR1_label:;
CMD12phase_TSC1_label: Firing pulse of the positive valve in TSC capacitive branch no
1;
CMD21phase_TSC1_label: Firing pulse of the negative valve in TSC capacitive branch no
1;
Iphase_TSC1_label: Current across TSC capacitive branch no 1;
STATE12phase_TSC1_label: State of the positive valve in TSC capacitive branch no 1;
STATE21phase_TSC1_label: State of the negative valve in TSC capacitive branch no 1;
2-11-479
HVDC and SVC Controllers
SVC Controller
2-11-480
HVDC and SVC Controllers
SVC Controller
2-11-481
HVDC and SVC Controllers
SVC Controller
2-11-482
HVDC and SVC Controllers
SVC Controller
2-11-483
HVDC and SVC Controllers
SVC Controller
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 voltage.
2-11-484
HVDC and SVC Controllers
SVC Controller
2-11-485
HVDC and SVC Controllers
Static Compensator Branches: TCR and TSC
1,2
1,15
1,1
1,05
Voltage (pu)
0,95
0,9
0,85
0,8
0,75
-6 -5 -4 -3 -2 -1 0 1 2 3
2-11-486
HVDC and SVC Controllers
Static Compensator Branches: TCR and TSC
A Icons and
Diagrams of
TCR and TSC
Static
Compensator
s
B Parameters The parameters for both types of static compensator are identical to those shown in section 11.2.1.
2-11-487
HVDC and SVC Controllers
Static Compensator Branches: TCR and TSC
DelayImp_ label: Firing delay (as a fraction of calculation step) sent to the valves
DelayImpUsed_ label: Firing delay (as a fraction of calculation step) used
The signals are the same for both types of branches. Of course, the voltage across the capacitor
of the TCR inductive branch will always be null.
D Control Figures 11 - 30 and 11 - 31 show respectively the TCR inductive branch and TSC capacitive
Panels of branch control panels.
TCR and TSC
Static
Compensator
s
2-11-488
HVDC and SVC Controllers
Static Compensator Branches: TCR and TSC
2-11-489
HVDC and SVC Controllers
Static Compensator Branches: TCR and TSC
Example:
2-11-490
HVDC and SVC Controllers
Static Compensator Branches: TCR and TSC
This example shows the use of a static compensator branch and is very similar to the static
compensator model described previously. The network in Figure 11 - 32 is identical to that in
Figure 11 - 26, the only difference being in the static compensator. In this case, the power
component is simulated with static compensator branches and the control system with a
HyperLink block. The static compensator being simulated consists of two TSC capacitive
branches and one TCR inductive branch. The powers of the branches are identical to those of the
static compensator in the preceding example.
The same test is made, a voltage ramp of 0.75 to 1.25 pu over 10 seconds. The results of the test
are shown in Figure 11 - 33.
2-11-491
HVDC and SVC Controllers
Static Compensator Branches: TCR and TSC
1,2
1,15
1,1
1,05
Voltage (pu)
0,95
0,9
0,85
0,8
0,75
-4 -3 -2 -1 0 1 2 3
2-11-492
HVDC and SVC Controllers
Static Compensator Branches: TCR and TSC
2-11-493
HVDC and SVC Controllers
Static Compensator Branches: TCR and TSC
2-11-494
Chapter 12
VARIOUS NETWORK ELEMENTS
Frequency Measure
Frequency Measure
Hz
f f
Properties: Features:
Determines the fundamental fre- Can be used with any bus in the
quency of a bus voltage signal. network using a basic frequency.
Implementation:
C List of Available At acquisition, the following signals are made available by the sensors:
Signals
Frq_label: Fundamental frequency (Hz)
Priode_label: Fundamental period (s)
Vaf label: Filtered bus voltage for phase A (V)
Vbf label: Filtered bus voltage for phase B (V)
Vcf_label: Filtered bus voltage for phase C (V)
2-12-495
Various Network Elements
Frequency Measure Element
D Frequency The following figure shows an example of the parameters used for a 60 Hertz test.
Measure
Control Panel
.
E Frequency The block diagram of the frequency measure element is shown in the next figure. The bus volt-
Measure ages are read and filtered, then the time between two zero crossings of these voltages is calculated.
Model 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-496
Various Network Elements
Digital Output Element
LB FB
Calculation
of transfer
function
Num Den
Va Vaf Ra Pa
Bandpass Zero Calculation Inverse
Vb Vbf Rb Pb f
Crossing of of
Filter Detection mean
Vc Vcf Rc periods Pc
Digital Output
Digital Output
DO DO
Properties: Features:
Tool to time-program digital se- In all, four elements can be
quences. programmed.
The user can choose
between seconds, millisec-
onds or cycles
Implementation:
2-12-497
Various Network Elements
Digital Output Element
B Operated Specifies which breakers of phase A, B and C and the ground breaker can change state if the data
Phase 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 Relative time (related to synchronization) when the state of a phase or ground breaker changes.
Time
D T2 Operating Relative time (related to synchronization) when the state of a phase or ground breaker returns to
Time a steady state position.
E List of At acquisition, the following signals are made available by the sensors:
Signals
Available CMD01,02,03,04_label: Digital output commands.
2-12-498
Various Network Elements
Digital Output Element
F Digital
Output
Control Panel
2-12-499
Various Network Elements
Digital Input Element
Digital Input
ACQ
ACQ
D/ D
Digital Input
Properties: Features:
Digital input element acquires ex- 48 digital signals can be
ternal digital signals from the in- acquired;
put/output cards Digital input element is
connected to a network
bus.
Implementation:
2-12-500
Various Network Elements
Analog Input Element
Analog Input
ACQ
ACQ
A/ D
Analog Input
Properties: Features:
Analog input element acquires an- 32 analog signals can be
alog signals from the input/output acquired;
cards. Analog input element is
connected to a network
bus.
Implementation:
Parameters
Outpu Function and
Description Palette Element Input
t Nam l.init.v conditions
e a
2-12-501
Various Network Elements
Disconnection Element
B2
Disconnect Element
Disconnector Element
Properties: Features:
Disconnector opens or closes a Disconnection possible in
connection in the network Edition or in Simulation
between two elements. Mode.
Note : To disconnect an ele-
ment in simulation
mode, select a breaker
element.
Implementation:
2-12-502
Various Network Elements
Disconnection Element
B Disconnectio
n Control
Panel
C List of At acquisition, the following signals are made available by the sensors:
Available
Signals Ia,b,c_label: Disconnector current.
2-12-503
Various Network Elements
Disconnection Element
2-12-504
Chapter 13
HYPERSIM WAVE FORM PLAYBACK MODEL
A Introduction The wave form playback model is a user-friendly interface compatible with Hypersim Ver-
sion 9.0. The playback model is a block used to play wave forms in order to validate the con-
trol and protection equipment of power grids. It allows users 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 orig-
inate 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.
C Main In order to provide an overview of the playback system, this section briefly describes the main
Components 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-505
Hypersim Wave Form Playback Model
RPC
Resampling of wave forms
REAL-TIME Steady-state cycle detections
TEST VIEW SIMULATION
(CGDEV)
Internal or external synchronization
D Control The parameters of the PLAYBACK model allow users to change the behavior of the software
Parameters 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 The software can play back wave forms in two modes: transient or steady-state.
Modes
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-506
Hypersim Wave Form Playback Model
The Prefault and Postfault fields allow users 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 A parameter allows users to select from a list of analog signals the reference signal used to mea-
Frequency sure the first steady-state cycle or to set the frequency.
for Steady-
State Mode There is no steady-state detection for digital output.
G Signal Output The output rate of signals to play back is based on the execution step of the Hypersim simulation
Rate (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.
Users can launch ScopeView to execute a resampling of their COMTRADE file, according to
their needs, in order to play back the file using the same rate as with Hypersim.
H Updating The Apply button allows users to apply the changes made.
Parameter
Changes The Cancel button allows users to cancel the changes made and to close the parameter editing
window.
The Close button allows users to apply the changes made and to close the parameter editing win-
dow.
I Playback A parameter in the control panel allows users to select the synchronization mode for the transient
Synchronizat mode. The internal synchronization mode operates with the POW and the external synchroniza-
ion tion 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 post-
fault 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 tran-
sient mode is then launched immediately.
2-13-507
Hypersim Wave Form Playback Model
2-13-508
Hypersim Wave Form Playback Model
2-13-509
Hypersim Wave Form Playback Model
2-13-510
Hypersim Wave Form Playback Model
2-13-511
Hypersim Wave Form Playback Model
2-13-512
Part 3
HYPERSIM Control Blocks
3-1-513
THIS PAGE IS INTENTIONALLY LEFT BLANK
3-1-514
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-515
Control Block List
3-1-516
Control Block List
Table 1 :
1 - 2 Math Functions
3-1-517
Control Block List
3-1-518
Control Block List
Table 2 :
1 - 3 Logic Functions
3-1-519
Control Block List
3-1-520
Control Block List
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-521
Control Block List
3-1-522
Control Block List
Table 4 :
1 - 5 Sources
3-1-523
Control Block List
3-1-524
Control Block List
Table 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 connec-
tors
Transceiver
Transceiver
Frequency measurement of 3-phase signals
Playback
3-1-525
Control Block List
3-1-526
Function Details
Chapter 2
FUNCTION DETAILS
The following tables provide details for each available control block.
Table 21 : Math functions
Paramtres
Functionality and
Description Palette Element Input Output
Initial conditions
Name
value
Two input
summation
u1
y u1 y g1 1.0 y = g1*u1 + g2*u2
u2
with gain u2 g2 1.0
u1 g1 1.0
Three input u1
u2 y g2 1.0 y = g1*u1 +g2*u2 + g3*u3
summation u2 y
u3 u3 g3 1.0
with gain
u1 g1 1.0
Four input u1
u2 y g2 1.0 y = g1*u1 +g2*u2 + g3*u3
u2
summation u3
y u3 g3 1.0 + g4 * u4
with gain u4 u4 g4 1.0
u1 u1 y y = u1 * u2
Multiplier. y
u2 u2
u1 u1
Divisor.
. y u1 y y = u1 / u2
. u2 u2
u2
3-2-527
Function Details
Paramtres
Functionality and
Description Palette Element Input Output
Initial conditions
Name
value
ArcTan. ArcTan u
u y y = Arc tan(u)
ArcTan y
y is in degrees
eu u y y = eu
exp natural u eu y
u u u y y = 10u
exp 10 10 u 10 y
log
(decimal log u y y = log(u)
u log y
logarithm)
ln
(natural ln u1 y u y y = ln(u)
ln
logarithm)
Math function :
Math u y u y Type 0
Math
If Type = 0
function ceil, y = ceil(u)
Math function
If Type = 1
function floor, y = floor(u)
u1 / u2 Modulus.
u1 u1 y y = Mod (u1, u2)
Mod y
Modulus u2
Mod
u2
3-2-528
Function Details
Paramtres
Functionality and
Description Palette Element Input Output
Initial conditions
Name
value
Square root u y
u y y = u
n 0 Y(s) = H(s).U(s)
H(s) u H(s) y
u y m 1 H(s)=[a0 + a1.s +..an.sn]/
a 1 [b0 + b1.s + .....bm.sm]
b 1, 1 a is an n dimension vector, b is an m
S transfer
dimension vector.
function
Conditions :
n >= 0
m >= 0
Y(z) = H(z).U(z)
H(z)
u y n 0 H(z)=[a0 + a1.z +..an.zn]/
u H(z) y
m 1 [b0 + b1.z + .....bm.zm]
a 1 a is an n dimension vector, b is an m
Z transfer
b 1, 1 dimension vector..
function
Conditions :
n >= 0
m >= 0
Y(s) = H(s).U(s)
hi
u y n 0 H(s)=[a0 + a1.s + .. +an.sn]/
H(s) lo m 1 [b0 + b1.s + .....bm.sm]
lo H(s) y
Transfer hi a 1 a is an n dimension vector, b is an m
u
function with b 1, 1 dimension vector..
dynamic y is limited between lo and hi
limits
Conditions :
n >= 0
m >= 0
n 0 Y(s) = H(s).U(s)
lim2 u y m 1 H(s)=[a0 + a1.s + .. +an.sn]/
H(s) a 1 [b0 + b1.s + .....bm.sm]
u H(s) y
b 1, 1 a is an n dimension vector, b is an m
S transfer lim1 lim1 -1 dimension vector..
function with lim2 +1 y is limited between lim1 and lim2
internal limits.
Conditions :
n >= 0
m >= 0
lim1 < lim2
3-2-529
Function Details
Paramtres
Functionality and
Description Palette Element Input Output
Initial conditions
Name
value
n 0 Y(s) = H(s).U(s)
u
lim2 u y m 1 H(s)=[a0 + a1.s + .. +an.sn]/
H(s) y reset state a 1 [b0 + b1.s + .....bm.sm]
reset H(s)
init b 1, 1 a is an n dimension vector, b is an m
init state
lim1 lim1 -1 dimension vector.
lim2 +1 y is limited between lim1 and lim2
Conditions :
n >= 0
S transfer
m >= 0
function with
lim1 < lim2
internal limits
and reset
Microprocessor reset type:
Rising edge, falling edge or none
Output state :
If lim 2 is reached, state = 1,
no limit used = 0
and if lim 1 is reached, state = -1
The init signal allows users to
specify the integrator initial
conditions.
y = u
(t T)
T = nCycle / fBase
t = actual time
Conditions :
fBase > 0
nCycle > 1
3-2-530
Function Details
Functionality and
Description Palette Element Input Output Parameter
conditions
OR logic block
Two input OR u1 u1 y y = u1+ u2
y
gate u2 u2
yH = 1 if u1 >= u2
u1 yH u1 yH = 0 if not
u1? u2
Dual signal u1? u2
u2 yL u2 yL
comparator
yL = 1 if u1 < u2
= 0 if not
if u becomes < a,
a u a
on y u y Ts 0.01 y = on after Ts for the Td duration.
off on Td 0.02 if u becomes > a,
Timer on level off a 0.0 y = off , if not it stays on .
detector
Conditions :
Ts > 0
Td > 0
3-2-531
Function Details
Functionality and
Description Palette Element Input Output Parameter
conditions
A 0 If u A y = yH
Single level u? A u y yH 1 If u < A y=yL.
u u? A y
comparator yL -1
Conditions :
n1 < n2
n1 <= start <= n2
circ = 0 or 1
1
u y Td 0.0 u
u y 0
Ton 0.01 Td 1
y
0
Ton
uL -1 If u < uL, y = yL
?
?
u ?
?
y
u y uH 1 If uL u uH , y = yM
Region ?
? yL -1 If u > uH, y = yH
detectors yM 0
yH 1 Conditions :
uL < uH
3-2-532
Function Details
Functionality and
Description Palette Element Input Output Parameter
conditions
3-2-533
Function Details
Parameters
Functionality and
Description Palette Element Input Output
Initial conditions
Name
value
3-2-534
Function Details
Parameters
Functionality and
Description Palette Element Input Output
Initial conditions
Name
value
u y Skip 1 y = e-sT
u y
T 1e-3 T round-off to the calculation step
Tmax 0.1 multiple
init 0.0
Delay
Conditions :
Skip > 0
T > 0
init > 0
NDelay > NHist
f y
AM-FM-PM f AM
AM p y = a sin(2*pi*f*t + p)
modulator FM
p FM y
a PM a
PM
u y u1 0 y
u2 1 y2
u y
y2 1
u1 u2 u
if u < u1, y = y2
if u1 u u2 , y lowers toward
Falling ramp 0 as follows:
u u1
y = y2 ------------------ y2
u2 u1
if u > u2, y = 0
Conditions :
u1 < u2
3-2-535
Function Details
Parameters
Functionality and
Description Palette Element Input Output
Initial conditions
Name
value
u1 0
u y u2 1 y
y2
u y
y2 1
u1 u2 u
if u < u1, y = 0
if u1 u u2 , y rises
Rising ramp toward y2 as follows:
u u1
y = ------------------ y2
u2 u1
if u > u2, y = y2
Conditions :
u1 < u2
Conditions :
limDn < limUp
u1 y If sel = 0, y = 0
Mpx2 sel u2 If sel = 1, y = u1
u1 MPX y
Two input u2
sel If sel = 2, y = u2
multiplexer
Conditions
sel = 0, 1, 2
Dead zone
u y
u y Start -1.0
Dead Zone End 1.0 If u > Start and u < End, y = 0
If u <=Start, y = u - Start
If u >= End, y = u - End
hysteresis
Conditions :
uL < uH
u y yn = un-1
One step .
1/z u 1/z y
delay
3-2-536
Function Details
Parameters
Functionality and
Description Palette Element Input Output
Initial conditions
Name
value
3-2-537
Function Details
Table 24 : Sources
Parameters
Inpu Outpu Functionality and
Description Palette Element
t t Initial conditions
Name
value
Fix point
constant K K y y K 1.0 y = K , K is a whole
Floating point
constant A A y y A 1.0 y = A , A is a real number
Random wage
generator Rand Rand y
y P.A. T
U/G 0
germ 5
Min 0.0 A
Max 1.0
Mean 0.0 A et T are random following a
Var. 1.0 random or gaussian distribution.
P.T. Parameters A :
U/G 0 Uniform / Gaussian = 0 / 1
germ 100 germ : germ value
Min 0.01
Max 0.02 Minimum and maximum values are
Mean 0.0 available only for a uniform
Var. 0.02 distribution.
Mean and variable values are
available only for a Gaussian
distribution.
Parameters B :
Uniform / Gaussian = 0 / 1
germ : germ value
Conditions :
f>0
t0 > 0
opt = 0 or 1
3-2-538
Function Details
Table 24 : Sources
Parameters
Inpu Outpu Functionality and
Description Palette Element
t t Initial conditions
Name
value
D 0.5
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
Triangular f 100
wave y A 1
To
generator y P 0 A
D 0.5
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 f 100
y = A sin 2 ft + --------
P -
generator y A 1
360
(amplitude) y P 0
f : frequency.
A : amplitude.
P : phase in degrees
Conditions :
f>0
0 <= P <= 360
3-2-539
Function Details
Table 24 : Sources
Parameters
Inpu Outpu Functionality and
Description Palette Element
t t Initial conditions
Name
value
Sinus f 100
y = A sin 2 ft + --------
P -
generator y A 1
y
360
(phase) ang P 0
< ang f : frequency
A : amplitude
P : phase in degrees
Conditions :
f>0
0 <= P <= 360
Simulation
time y y = simulation time
T T y
3-2-540
Function Details
Parameters
Outpu Functionality and
Description Palette Elements Input Initial
t conditions
Name value
s
Integer-Float
Conversion I To F i To f u y y = int input converted in float
Input port
In y y from input port
In
Output port
u u from output port
out out
x=Ax u2
y1
u3 .... A 1.0 B dimension = nx.nu
u3
y2 u4 B 1.0 C dimension = ny.nx
u4
C 1.0 D dimension = ny.nu
D 1.0
Conditions :
nx, nu, ny > 0
3-2-541
Function Details
Parameters
Outpu Functionality and
Description Palette Elements Input Initial
t conditions
Name value
s
3-2-542
Part 4
Advanced HYPERSIM Functions
4-1-543
THIS PAGE IS INTENTIONALLY LEFT BLANK
4-1-544
Chapter 1
MATLAB AND SIMULINK MODELS
Icons:
program.
- Different models used in the
same diagram can use different
solvers.
- See Section 1.3 below.
Figure 1 - 1 Icon and Diagram of Matlab - Simulink models
4-1-545
Matlab and Simulink Models
Introduction
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.
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 users to use a Simulink model whose input/output can
be connected graphically, as is the case for all other control blocks.
4-1-546
Matlab and Simulink Models
Relationship Between HyperLink and Matlab
For the Scopes, HyperLink will add an extension identifying the axis, if many are
present.
The Simulink models used in HYPERSIM operate in both differed time and real-time.
In real-time, the step size specified when generating code in Simulink must be the same as
the step size in HYPERSIM.
In differed time, the step size specified in Simulink can be a multiple integer of the
HYPERSIM step size (Simulink step size = n * HYPERSIM step size, where n >= 1).
The value of the parameters of the Simulink models can be changed during a simulation.
5 5.2 2.0
6 5.3 3.0
6.1 5.3.1 (release 11) 3.0.1
7.1 6.0 (release 12) 4.0
4-1-547
Matlab and Simulink Models
Adapting Step Sizes of Simulink in Real-Time
Basically, the method consists in adding a zero order hold block between a fast block and a slow
block, or a unitary delay between a slow block and a fast block, in order to avoid changes in
values during calculations. This method is described in Chapter 71 of the Simulink Real-Time
Workshop -- Users Guide.
4-1-548
Matlab and Simulink Models
Code Generation
1.9.1 Code Start Simulink and build a model or open an existing model. Then, in the Simulink model
Generation window, select
of a Tools->Real-Time Workshop->Options.... See Figure 1 - 1.
Simulink
Model
4-1-549
Matlab and Simulink Models
Code Generation
a)
b) c)
d)
C 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-550
Matlab and Simulink Models
Code Generation
(e
f)
g)
h)
i) (k
j)
4-1-551
Matlab and Simulink Models
Adding a Simulink Model to Diagram
J If not selected, select External mode in the Options window. This selection is compulsory to avoid
errors when generating code.
1.10.1 Using a The following steps show how to include a Simulink model, version 3.0.1 (or any more recent
Simulink version), in HYPERSIM, using a Simulink block (control block).
Block
A Select the icon representing a Simulink block in the SYSTEM TOOLS palette and
position an instance in your diagram.
B The window below is displayed. It allows users 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-552
Matlab and Simulink Models
Adding a Simulink Model to Diagram
C 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 >
D Graphically connect the input/output of the block to the connectors of the required blocks or
elements using the usual HYPERSIM connection method.
F Continue to draw your power system. At the end, go to Simulation mode to analyze the power
system, generate the code and execute the actual simulation. Later in this chapter, we will show
how to change some parameters Simulink model during simulation.
1.10.2 Using a The following steps describe how to integrate a Simulink model using a HyperLink element
HyperLink (without graphic connection of the input/output) following the HYPERSIM basic method. Such
Power an element is still required, since the other HYPERSIM elements do not have all the connectors
System that provide access to their internal signals. Moreover, when a Simulink model has numerous
Element input/output connectors, it is often more practical to use a connections table to link the
HYPERSIM signals, as shown here.
4-1-553
Matlab and Simulink Models
Adding a Simulink Model to Diagram
A Select the icon : representing a HyperLink element in the elements palette or select 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.
C Edit the power system element label to give it with a meaningful name.
D 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.
F 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.
The text editor is specified by the EDITOR environment variable. vi is used by default. It is
also possible to use xemacs or textedit.
4-1-554
Matlab and Simulink Models
Adding a Simulink Model to Diagram
G Edit the .info file of the model to link the Simulink model input/output labels 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
# NB_INPUTS : Nombre de signaux dentrees au modele
# NB_OUTPUTS : Nombre de signaux de sorties du modele
# NB_SCOPES : Nombre de "scopes" du modele
4-1-555
Matlab and Simulink Models
Adding a Simulink Model to Diagram
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 - double
1 In2 - double
2 In3 - double
}
NB_OUTPUTS=3
OUTPUTS={
0 Out1 - double
1 Out2 - double
2 Out3 - double
}
NB_SCOPES=3
SCOPES={
0 Scope Scope
1 Scope1 Scope1
2 Scope2 Scope2
}
4-1-556
Matlab and Simulink Models
Adding a Simulink Model to Diagram
Any line beginning with # is a comment. The file consists of three lists INPUTS, OUTPUTS
and SCOPES (in bold in the list above), showing the labels for the inputs, the outputs and the
scopes of the model, respectively, 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. Note that in the case of scopes, the names of the signals are the same as the Simulink labels.
2. Block of "Import", "Export" and "Scope" types.
4-1-557
Matlab and Simulink Models
Adding a Simulink Model to Diagram
(a)
(b)
4-1-558
Matlab and Simulink Models
Adding a Simulink Model to Diagram
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
}
Special Case The interconnection of two HyperLink elements is a special case. Usually, HyperLink elements
signal names 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 "out1" and "in2" respectively cannot be connected as
follows:
...Hk1.info: (.info file of block Hk1)
...
OUTPUTS={
0out1in2doubleThe output signal is named "in2"
...
4-1-559
Matlab and Simulink Models
Adding a Simulink Model to Diagram
...Hk2.info:
...
INPUTS={
0in2out1doubleThe input refers to "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={
0out1out1doubleThe output signal is named "out1"
...
...Hk2.info:
...
INPUTS={
0in2out1doubleThe input refers to "out1", which exists.
...
The type of signals will need to be the same on both sides.
To finish the connection, just exit the text editor (without forgetting to save the changes made).
1.10.3 Code There are two ways of integrating an S Function with a Simulink model, in order to generate
Generation code usable in HYPERSIM:
and S
Functions
in
HyperLink
B By generating the code of the S Function directly within the code of the Simulink model.
Using an S This is probably the most common case. The function is written in C, thus allowing for a shorter
Function Written execution time. The user will have already compiled the function using the cmex. This process
in C 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-560
Matlab and Simulink Models
Adding a Simulink Model to Diagram
The generation of the model container code will de done, as usual, when analyzing the power
system in HYPERSIM. In addition, the S Function code will be copied, if required, in the code
generation directory, with everything else that has already been generated. It will be compiled
when generating the code in HYPERSIM.
It is possible that during HYPERSIM analysis, an S Function may not be found.
Generally, the S Functions files are looked for in the current directory or in the model directory.
If the file (.c) of your S Function is located elsewhere, you must define the environment variable
SFUN_PATH, with the name of the directory of your S Function, before starting
HYPERSIM. The directories defined in SFUN_PATH will be added to the default directories
and they will be examined first. For example, if you wish to use two S Functions whose code
is contained in /mon_home/sfdir/sf1.c and /projets/simulink/sfun/sf2.c, SFUN_PATH will
need to be defined as follows:
setenv SFUN_PATH /mon_home/sfdir:/projets/simulink/sfun (C shell)
or:
SFUN_PATH=/mon_home/sfdir:/projets/simulink/sfun
export SFUN_PATH (Bourne shell)
The different paths are separated by :. The variable must be defined before starting
HYPERSIM.
This use of an S Function is not the most effective; the call mechanism is heavy and costly for
some architectures. Moreover, contrary to other Simulink blocks, the parameter values of the
function cannot be changed during a simulation. Fortunately, the inlining procedure allows
adding the function code directly to the code generated for the model.
S Function As is the case for the first method, this method also requires having previously compiled the S
Inlining Function using "cmex" source file (.c). The .tlc1 version needs to be added which allows
inserting 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.
In this case, you do not need to define SFUN_PATH in HYPERSIM, since the code will be
found in the usual model files and it will not be necessary to copy and compile the source file (.c)
of the S Function.
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-561
Matlab and Simulink Models
Changing Simulink Model Parameters During Simulation
4-1-562
Matlab and Simulink Models
Procedure Used to Change Parameters
B Start Simulink
D 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-563
Matlab and Simulink Models
Procedure Used to Change Parameters
F 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.
G 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.
H Select Simulation->External in the menu bar at the top of your model window.
I 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.
1.To which element or block of the HYPERSIM diagram and in which interface instance.
4-1-564
Matlab and Simulink Models
Guidelines for a joint Simulink - HYPERSIM simulation.
Rule 1: Generic Generally, Simulink is used to design control system, regulation, monitoring devices. In the same
use of manner, HYPERSIM is used to represent Power System elements. Thus, only controls signals are
Simulink exchanged between HYPERSIM and Simulink.
with
HYPERSIM 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 #6. If a power system network is
implemented in Simulink, using SimPowerSystems models, refers to rules #7.
Rule 2: Signals Communications between Simulink and HYPERSIM are bi-directional. The simulink diagram
exchange must contain input and/or output connectors, to exchange control signals with HYPERSIM.
between
Simulink & Signals to be exchanged can be scalar or vector.
HYPERSIM
If a Simulink "scope" device is used in the diagram, the corresponding signal will be auto-
matically 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 SimPowerSystems.
4-1-565
Matlab and Simulink Models
Guidelines for a joint Simulink - HYPERSIM simulation.
Rule 5: Simulation In a Simulink simulation, some operations in time can be achieved with a time reference from the
of time beginning of the simulation.
referenced
event in In a real-time simulation, this time reference cannot be used, since the simulation can be executed
Simulink. perpetually, and events (maneuver) are performed form a steady-state operation.
Thus, HYPERSIM gets a time reference from a "Voltage Level Crossing" called "Point-on-
Wave" or POW.
The only time reference available, is then produced by HYPERSIM, and it is called "Point-on-
Wave" 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 Before code generation using RTW, you make sure the Matlab path contains HYPERSIM
Generation directory. Use the following command to add and verify the path:
of Simulink
diagram. 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.
Rule 7: Using SPS A power system can be constructed in Simulink using SimPowerSystems block. Although ONLY
block in a simulink signal can be exchanged with HYPERSIM.
simulink
diagram. If SimPowerSystems 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 SimPowerSystems blocks
present in the diagram. Please note that some SimPowerSystems 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 If a power system models is modelized in Simulink environment, the general implementation
power must be:
system
model with The model should receive voltage or current signals from HYPERSIM;
Simulink
4-1-566
Matlab and Simulink Models
Guidelines for a joint Simulink - HYPERSIM simulation.
Rule 9: The Some special considerations should be taken into account about the signal interface between
Simulink- HYPERSIM and Simulink. Basically:
HYPERSIM
interface 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-567
Matlab and Simulink Models
Guidelines for a joint Simulink - HYPERSIM simulation.
4-1-568
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
4-2-569
User Coded Blocks
UCB Components
The UCB can keep past values (historical) of some variables that are inherent to the block
instance that generated them;
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:
NOMBLOC = breaker
DESCR = breaker de base
NOMEX = ucb_breaker_ex
NOMINIT = ucb_breaker_ex_init();
TEXEC = 5.0e-6
# 1- Block parameters
NPAR = 3
NPARSIM = 3
NHIST = 4
4-2-570
User Coded Blocks
UCB Limits
# 4- Block inputs/outputs
NIO = 1
2.5.1 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 The UCB program guides the user through the process of building a UCB. This command hides
ucb implementation details from the user who can then concentrate on the algorithm of his block.
Command
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 ucb The ucb command has two operating modes: interactive and batch. In the interactive mode, the
Command ucb executes commands specified by the user and ends when the user enters the command
Operating quit.
Modes
In batch mode, each ucb call executes only one task and ends as soon as the task is completed.
2.5.4 Using the To execute the ucb command in interactive mode, type:
Interactive
Mode ucb [-i] [name of block]<cr>
The switch -i, which stands for interactive, is optional. The name of the block is also optional.
When a block name is specified, the ucb command opens the block with that name, otherwise
it prompts for a block name. If no block name is entered, the ucb command creates the default
block NewBlock1.
4-2-571
User Coded Blocks
UCB Commands
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 When the ucb command is entered, a prompt with the name of the current block is displayed.
Prompt 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)
Status
O Block Opened
N New Block Opened
_ Block Not Opened
Example:
bloc src
1.NouveauBloc in French.
1.In English version. See appendix for French version.
2.In English version. See appendix for French version.
4-2-572
User Coded Blocks
UCB Commands
cat file [file]... 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 editable.
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-573
User Coded Blocks
UCB Commands
ed<it> [block] 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.
more 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 open). 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 you answer 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 Calls the Unix command pwd.
s<ave> Saves the current block.
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.
? 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
4-2-574
User Coded Blocks
UCB Program in Batch Mode
-----------------------------------------------------------------
[] = 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 pro-
gram 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-575
User Coded Blocks
Building a Block
generate code;
compile code;
delete block;
display list of block parameters.
Each of the four operations is specified by its respective option -g, -c, -d and -p. If more
than one option is specified, only the last one will be considered.
.
Syntax:
ucb [ -g | -c | -d | -p ] [ Block name ]
Options:
-g: Generates the code of the block;
-c: Compiles the code of the block;
-d: Deletes the block;
-p: Displays the list of parameters of the block.
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 Syntax: ucb -g [Block name]
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 Syntax: ucb -c [Block name]
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 Syntax: ucb -d [Block name]
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 Syntax: ucb -p [Block name]
Block Parameters
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.
2.8.1 Creating a Suppose you want to create a block called gain. In order to do this, you will need to use the
Block UCB program in interactive mode.
4-2-576
User Coded Blocks
Building a Block
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 The block definition file is a temporary file that contains the required information for the block.
Definition It has 10 sections and each section covers a particular aspect of the block. An example of a block
File 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!!!
The following sections describe the 10 sections of a block definition file:
2.8.4 General The general information are the execution time TEXEC and the description of the block DESCR.
Informatio
n 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.
4-2-577
User Coded Blocks
Building a Block
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 You can enter the block documentation in this section. The text will be in free format and will be
Document saved as typed. However, text lines that begin with %% will be considered as comments and
ation will not be saved as part of the block documentation.
2.8.6 Block The block parameters are defined in this section. These parameters will be entered in the
Parameter parameters control panel accessible from HYPERSIM. Parameters are values that you can change
s 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* Vector of values in integers
double Value in real number
double* Vector of values in real numbers
Dimension:Dimension of the parameters. Enter 1 for scalars and the dimension of the
vector for parameters with vector values.
Default:Default value for parameters
Modif:Specifies if the parameter can be changed during the execution of the simulation (1:
Yes, 0: No);
Description:Short description of the parameter (between double quotation marks)
When the parameter type is int* or double*, you must enter a dimension greater than 1.
Conversely, you must enter a dimension of 1 for parameters with types int or double. The
different fields in a parameter description line are separated by spaces.
For example, the breaker block has a parameter Tman1 which specifies the first operation
time of the breaker:
Tman1 s double 1 1.0 1 First operation time
The parameter is called gain, is double type and has a default value of 1.0.
4-2-578
User Coded Blocks
Building a Block
The default value applies to all the elements of a parameter with a dimension > 1.
2.8.7 Parameters
of This section must be filled in only if some parameters of the simulation function are different
the Block from the block parameters (entered in the control panel). Otherwise, the parameters of the
Simulation control panel are passed directly to the simulation.
Function
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 ech. int 1 0 1 No. of sample corresponding to the time Tman1
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 The block inputs and outputs are defined in tabular form where each line refers to one input signal
Outputs of or one output signal. Following is the format of an input/output signal line. You must follow this
the Block format:
Simulation
Function Name Units Type Direction Description
where:
Name: Name of signal
Units: Units of the signal. Enter a dash (-) or without if no unit is specified.
Type: Type of signal
int* Signal with an integer value
double* Signal with a real number value
Direction: Direction of the signal relative to the block.
In for an input signal towards the block
Out for an output signal from the block
Description : Short description of the parameter (between double quotation marks)
2.8.9 Historical Historical variables ensure the persistence of certain values, between the calls to the simulation
Variables function at each step size. These historical variables are private to the instance of the block. You
of a Block 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:
4-2-579
User Coded Blocks
Building a Block
2.8.10 Global C language declarations of global variables. These variables can be accessed by all the functions
Variables defined in the block simulation file. Such variables are static and common to all instances of the
of a Block block. All the functions required by the block simulation function are declared in this section. You
(code C) 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 The initialization code of the block is entered in this section. This code will be part of the block
a Block (C simulation function and will be executed only once before the simulation. This function can not
Code) 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.
2.8.12 Block The block simulation code is entered in this section. This code is executed at each step size. It
Execution applies the block simulation algorithm to the input signals of the previous step size to generate
Code (C the current output signals of the block. This code will be part of the block simulation function
Code) 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 de-
referenced 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.
4-2-580
User Coded Blocks
Building a Block
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 Transformin When some parameters of the block simulation function are different from the block parameters,
g then the parameter transformation code must be entered in this section. This code will be executed
Parameter each time a parameter is changed. From the block parameters in the corresponding block control
s (C Code) 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.
All block simulation function parameters that are different from block parameters must be
assigned values.
2.8.14 Closing After having specified the information required for the block definition, save the file and close
the the editor. The analysis of the block information will be executed immediately and the
Capture of information saved in a temporary file.
a Block
Definition 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
4-2-581
User Coded Blocks
Building a Block
%% 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 Once the definition of a block is completed, you can proceed with generating its code by entering
the Block the UCB command Generate. You dont have to save the block before generating its code.
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!
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 Here, the compilation of the block code is mainly for validation purposes since the block code
the Block will be compiled again when it will be used in HYPERSIM. The compilation is done in two steps.
Code 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:
4-2-582
User Coded Blocks
Including a UCB in a Power System
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.
2.9.1 Introduction The inclusion of a UCB in a power system consists of the following steps:
Adding a UCB diagram to a HYPERSIM power system and connecting it to other blocks;
Entering the block parameters;
Analyzing the power system;
Generating the code of the HYPERSIM power system;
Simulating the power system.
2.9.2 Adding a To add a UCB to a HYPERSIM power system, click the UCB icon in the palette, then click
UCB to a the HYPERSIM window. The following dialogue box is displayed:
Power
System
4-2-583
User Coded Blocks
Including a UCB in a Power System
a
b
c
d
e
The box allows users 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.
B Enter here the name of the customized control panel of the block. Leave the field empty to use
the default control panel.
C Filter to display only the names of the relevant files in the selection list. You do not have to
modify this field.
D 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 Locate the UCB required in the e list and click it. Then, click Apply. Using this information,
a Block 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.
4-2-584
User Coded Blocks
Including a UCB in a Power System
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 Connectingth In the HYPERSIM interface, connect the inputs and outputs of the block with other blocks of the
e Inputs/ control module.
Outputs of
a Block
2.9.5 Specifying The specification of the block parameters can be done via a default data control panel
the (UserBlocDefaut.form) or a custom data control panel designed by the user. Such user designed
Parameter forms will be located in the directory defined by the environment variable USERDIR and will
s 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
%% ----------------------------------------------------------------
%%
%% Definition of a user's defined HYPERSIM block
%% ---------------------------------------------
4-2-585
User Coded Blocks
Including a UCB in a Power System
%%
%% 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
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
%% 2- Block documentation text
%% ------------------------
%%
%% Enter text after comments
%%
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
4-2-586
User Coded Blocks
Including a UCB in a Power System
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
%% 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
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
%% 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.
%%
%% Enter simulation function parameters in a tabular form (7 columns).
%% Fields should be separated by one or more space characters.
%% Description should be between double quotes
4-2-587
User Coded Blocks
Including a UCB in a Power System
%%
%% ATTENTION:If you do not supply parameters for simulation
%%function it will use block's parameters.
%%
%% 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
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
%% 5- Block's signals
%% ---------------
%%
%% Enter block's signals 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 signal
%% Units : Signal's units.
%% Text field at user's convenience
%% Enter a - when not used
%% Type : Signal type
%% Enter: int* Integer (pointer to scalar)
%% double* Real (pointer to scalar)
%% Direction: Enter: In For block's input signal
%% Out For block's output signal
%% Description: Short description of signal
%% (BETWEEN DOUBLE QUOTES)
%%
%% Format: (5 columns table)
%%
4-2-588
User Coded Blocks
Including a UCB in a Power System
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
%% 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
%%
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
%% 7- Global variables or defines of block (C code)
%% ---------------------------------------------
%%
%% Enter global variables and defines after comments.
%%
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%%
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
%% 8- Block's initialization code (C code)
4-2-589
User Coded Blocks
Including a UCB in a Power System
%% ------------------------------------
%%
%% Enter code that should be run only once, at beginning,
%% after comments.
%%
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%%
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
%% 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 (*CountEnab)
{
if (*Count1 == T1)
{
*Command = 1 - EtIn;
}
if (*Count2 == T2)
{
*Command = EtIn;
*CountEnab = 0;/* 2 chang.d'etats effectue: Fin*/
}
(*Count1)++;
(*Count2)++;
}
else
*Command = EtIn;/* Permet changement etat permanent */
4-2-590
User Coded Blocks
Including a UCB in a Power System
*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 Number of block parameters
%% NPARS Number of simulation function parameters
%% TO_SAMPLE(t) Conversion from seconds to sample number
%% HYSIZE(parname) Returns size of array parameter
%%
%% Variables:
%%
%% double step_size;Simulation step size in seconds
%%
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%%
T1 = TO_SAMPLE(Tman1);
T2 = TO_SAMPLE(Tman2);
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%% End of.ucb_breaker.def
Example:
Prompt description when English is the chosen language.
4-2-591
User Coded Blocks
Including a UCB in a Power System
[SM] BLOCK>
Block Name
(New Block if no block name is specified)
Status
O Block Opened
N New Block Opened
_ Block Not Opened
Example:
List of Commands in French:
4-2-592
User Coded Blocks
User Programmable Blocks
sauver sous bloc: Saves the current block under another name
sh [commande]: Executes a command from the shell (Unix) or goes in shell
mode
t<erminer>: End or quit the ucb
v<isualiser>: Displays the definition file of the current block
vglob: Displays the content of the file ucb_BLOC.vglob
?: Displays a short help message
B If the tool already exists in the $TOOLDIR directory, just add it to the palette.
C 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 users 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.
D The new $USERDIR environment variable can be defined in the directory properties panel.
E If the file containing the block information is not valid, a dummy block will be instantiated: no
input/output connector and no control panel.
F 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).
G 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.
H If it does not exist or is not valid, no control panel will be assigned to the block instantiated.
I 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.
J 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-593
User Coded Blocks
User Programmable Blocks
K Steps 6, 7, 8 and 9 are repeated as if the NomBloc.form control panel has already been recorded.
L 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-594
Chapter 3
GENERATION AND IMPORTATION OF EMTP FILES
4-3-595
Generation and Importation of EMTP Files
Introduction
3.1 INTRODUCTION
This chapter is no longer available.
4-3-596
Chapter 4
AUTOMATIC INITIALIZATION OF CONTROL PANEL
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 The filter uses the concept of appositional parameter to initialize the values obtained from
between Names EMTP in the interface forms. In the ElementsEMTP file, the symbol name is followed by a
and Values 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-597
Automatic Initialization of Control Panel
Control Panel Parameters
Any addition or deletion of a parameter to be initialized will require a change in the filtre_emtp
program, and occasionally, in its startup code for the interface.
Initializing parameters is optional. For example, the following diagrams are drawn but are not the
object of any initialization:
59Machine3
SwSectionneur (Switch)
PaParaf
PaTParaf_Shunt
To each parameter corresponds in the *.schrec file generated a value in the form of a character
string in between quotation marks. This value can be an alphanumerical code, a scalar, a vector
or an array, based on the expected type in the form.
Real values with more than 10 characters are limited to 8 in the forms, except for arrays imported
directly from EMTP cards. This is also the case for Marti models where values can take up 26
positions. All the internal calculations are in double precision. The values are read without any
loss in precision. The output limit has been set only to save space in the forms and the arbitrary
limit of 8 can be modified as required.
The following line in the.ElementsEMTP file:
Rs R Phases Connexion R;
can correspond to the following line in the generated file:
N%12 Rs12 Rs 3 S [ 0.1 0.2 0.3 ];
where the R parameter is obtained from the following EMTP cards:
CENA_aC1010a .10000.00000.00000
CENA_bC1010b .20000.00000.00000
CENA_cC1010c .30000.00000.00000
D Simplifying The following changes are made to the original specification of the EMTP format in order to sim-
EMTP plify the diagram and make it more readable:
Branches
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-598
Automatic Initialization of Control Panel
Control Panel Parameters
E Drawn and The EMTP format allows a wide variety of specifications of which some are used often and others
Initialized rarely. The elements processed by the filter are those for which a simulation is currently possible.
EMTP The emphasis is on three-phase AC networks. Hence, DC branches are not initialized for the time
Elements 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 sys-
tem used for simulation.
The following sections briefly describe the EMTP branches recognized and explain the charac-
teristics and limits for each case.
F RLC All cases with RLC elements are handled, including mutually coupled (51 52 53) R-L elements
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 phas-
es. 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.
I Breakers Only timed breakers are handled, specified with an opening and a closing time.
K Drawn but The following elements are only drawn in the diagram:
Uninitialized
EMTP Code 59 - Machines
Elements Code 92 - Arresters
Switches (RLC .00100 ohms)
L Handled but The following elements, which are specified on many cards, are decoded to avoid many error
Undrawn messages:
EMTP
Elements Code 98 - Non Linear Reactors
4-4-599
Automatic Initialization of Control Panel
Control Panel Parameters
XFORMER Transformers
M EMTP The two formats allowed ($VINTAGE,0 and $VINTAGE,1) are handled, except when specified
Characteristi explicitly. However, only fixed format cards are handled.
cs
Considered The inclusion of files ($INCLUDE) is carried out.
$DISABLE and $ENABLE cards are handled.
Comment cards are ignored.
N EMTP The concept of reference branch (bus3 and bus4 non empty) is not processed by the filter. When
Characteristi this occurs, a message is displayed To generate the diagram correctly, you need to copy explicitly
cs Not the referenced parameters on the appropriate card in the EMTP file and then remove reference.
Considered
This option is not handled for reasons of efficiency and also because of its erratic and non-stan-
dardized 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-600
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 volt-
ages 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 de-
lay.
Because the UCMs power part is solved together with other power elements, user must fol-
low 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.
4-5-601
User Coded Model (UCM)
Solution Method in HYPERSIM
5.2.1 Introduction 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. Non-linear el-
ements and switches will affect the model behaviour during the simulation and require HYPER-
SIM to recalculate them during the simulation.
HYPERSIM simulates also control systems which are simply represented as relationships of out-
puts 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.
V0 Va
1
V1 = Tv Vb (EQ 1)
V2 Vc
where [ ] is a diagonal matrix containing the eigenvalues of the matrix product ZY.
For a balanced line:
4-5-602
User Coded Model (UCM)
Solution Method in HYPERSIM
I aK I aM
V aK V aM
I bK I bM
V bK V bM
I cK I cC
V cK V cM
I aK V 0K I 0K I 0M V 0M I aM
V aK V aM
012
012
Conversion
Conversion
I bK V 1K I 1K I 1M V 1M I bM
V bK V bM
I cK V 2K I 2K I 2M V 2M I cC
abc
abc
V cK V cM
Three uncoupled single-phase lines
Figure 5 - 1 : Conversion from three coupled phases into three uncoupled modes
1 2 0
1- ------3-
1- 1 ------
Tv = ------ 2 2 (EQ 3)
3
1- ------3-
1 ------
2 2
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 (EQ 4)
Ic I2
t 1
Ti = [ Tv ] (EQ 5)
B Model of Each mode (0, 1, 2) can then be represented as shown in 5 - 2. The current sources in this figure
single-phase are given as
line
4-5-603
User Coded Model (UCM)
Solution Method in HYPERSIM
1 h V mK ( t )
J mK = ------------ ------------------------- + hI mK ( t ) + (EQ 6)
2 R eq
+ h- V mM ( t )
1----------- - + hI mM ( t )
2 -------------------------
R eq
where
R
R eq = Z c + -----T- (EQ 7)
4
Zc ( RT 4 )
h = ----------------------------- (EQ 8)
Zc + ( RT 4 )
m is the mode number (0, 1, 2), Z c is the line characteristic impedance, is the transmission
delay along the line and R T is the line loss.
A similar expression can also be derived for J mM , the current source at terminal M .
Therefore a single mode line model is reduced at each terminal to an equivalent circuit composed
of a current source in parallel with a resistor. The actual current source J mK at the terminal K and
J mM at terminal M depend only on the past voltages and past currents at both terminals. Equiv-
alent at each terminal can therefore be calculated in parallel.
Model for frequency dependent lines uses the same philosophy but with a more complex equiva-
lent.
I mK I mM
K M
+ J mK J mM
R R
+
V mK Z c + -----T- V mM
Z c + -----T-
- 4 4 -
Each half (left and right) of the line equivalents will be converted from mode to phase form and
incorporated into the corresponding substation equation to be solved with other elements.
5.2.3 Substation In each substation, there are passive components interpreted as RLC elements which can be linear
modelling 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 con-
trol systems.
4-5-604
User Coded Model (UCM)
Solution Method in HYPERSIM
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. Pow-
er 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 (HY-
PERSIM 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
will be evaluated as
T
y ( t ) = y ( t T ) + --- [ x ( t ) + x ( t T ) ] (EQ 11)
2
where T is the calculation time step.
dy ( t )
By the same rule, the derivative ------------ is approximated as a difference deduced from eq. on
page 605 as dt
( t ) y ( t T )- = 1--- [ x ( t ) + x ( t T ) ]
y---------------------------------
(EQ 12)
T 2
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 ----------------- (EQ 13)
dt
or
t
1
i km ( t ) = --- [ v k ( t ) v m ( t ) ] dt (EQ 14)
L
0
4-5-605
User Coded Model (UCM)
Solution Method in HYPERSIM
T
i km ( t ) = i km ( t T ) + ------ [ v k ( t ) v m ( t ) + v k ( t T ) v m ( t T ) ] (EQ 15)
2L
vk ( t ) vm ( t )
i km ( t ) = -----------------------------
- + i hist ( t T ) (EQ 16)
R eq
with
R eq = 2L
------ (EQ 17)
T
vk ( t T ) vm ( t T )
i hist ( t T ) = i km ( t T ) + ------------------------------------------------
- (EQ 18)
R eq
k k k k
i km i km
2L T-
L ------ i hist C ------ i hist
T 2C
m m m m
C branch
d [ vk ( t ) vm ( t ) ]
i km ( t ) = C --------------------------------------- (EQ 19)
dt
Replace the derivative by the difference equation given in on page 605, we get
i km ( t ) + i km ( t T ) [ vk ( t ) vm ( t ) ] [ vk ( t T ) vm ( t T ) ]
- = C -----------------------------------------------------------------------------------------------
------------------------------------------- (EQ 20)
2 T
4-5-606
User Coded Model (UCM)
Solution Method in HYPERSIM
i
Figure 5 - 4 : Example of an v-i characteristics of a non-linear resistor
or
[ vk ( t ) vm ( t ) ]
i km ( t ) = ----------------------------------
- + i hist (EQ 21)
R eq
with
T-
R eq = ------ (EQ 22)
2C
2C
i hist = i km ( t T ) + ------- [ v k ( t T ) v m ( t T ) ] (EQ 23)
T
The C branch is also equivalent to a resistor given by eq. on page 607 in parallel with a historic
current source given by eq. on page 607 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.
For branches of different combinations of RLC elements, one can always write down the voltage-
current relationship, replace integrals by eq. on page 605, derivative by eq. on page 605, and
get more or less complex forms of a equivalent resistor and a historic current.
B Current and A current source i flowing from node k to node m has the effect of removing a current i from node
voltage k and adding a current i to node m.
sources
Voltage sources with output impedances are converted into current sources in parallel with the
same impedance using Thevenin-Norton conversion.
C Non-linear Non-linear elements are treated as RLC elements, they are also equivalent to a resistor R eq in
elements parallel with a historic current i hist (if it is not a pure resistor).
4-5-607
User Coded Model (UCM)
Solution Method in HYPERSIM
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 Each branch element described above is connected between node k and m of the substation and is
power 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 sub-
station. 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.
Y eq, kk of the matrix Y eq is its self conductance at node k while Y eq, km is the mutual conduc-
tance between node k and node m.
In case of a non-linear element, Y eq is splitted into two parts:
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 As explained above, all power elements, fix or non-linear, are equivalent to resistors in parallel
substations with historic currents. In the node equation YV = I , Y becomes therefore a pure conductance
node matrix, I is the algebraic sum of currents, including source currents and historic currents, injected
equation to nodes; currents entering a node will have + sign, currents leaving have - sign
4-5-608
User Coded Model (UCM)
Solution Method in HYPERSIM
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:
where L is a lower triangular matrix with all values in the upper triangular equal to 0 and all el-
ements 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 1 0 0 D 11 0 0 1 U 12 U 13
Y 21 Y 22 Y 23 = L 21 1 0 0 D 22 0 0 1 U 23 (EQ 31)
Y 31 Y 32 Y 33 L 31 L 32 1 0 0 D 33 0 0 1
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.
The node equation YV = I now becomes
LDUV = I (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
G LDU The LDU conversion is done based on the pivot technique used to nullify a particular element in
decompositio a matrix. Only the final formulas are listed here:
n
4-5-609
User Coded Model (UCM)
Solution Method in HYPERSIM
i1
L ii = U ii = 1 (EQ 36)
j1
L ij = ------- Y ij D kk L ik U kj , i > j (elements in lower triangular)
1
(EQ 37)
D jj
k=1
i1
1 D L U , i < j (elements in upper triangular)
D ii ij kk ik kj
U ij = ------
- Y (EQ 38)
k=0
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 non-linear
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
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 The Y matrix is normally sparse, it means that many elements are 0. To avoid calculation with
matrix zero elements, HYPERSIM keep a matrix YF indicating the state of each element of Y:
YF ij = 1 if Y ij 0
4-5-610
User Coded Model (UCM)
Solution Method in HYPERSIM
YF ij = 0 if Y ij = 0
I Sequence of HYPERSIM preforms the simulation of substations in two parts: The off-line preparation exe-
operations cuted on the workstation where the HYPERSIMs GUI has been launched, and the simulation ex-
needed for ecuted either in real-time on parallel computer or in non-real-time on workstation. The non real-
node time simulation can run either on the same workstation as the GUI or on another computer.
equation
solution
Preparation
To calculate parameters for all power elements and the substations node equation, the prepara-
tion 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
5 Calculate sources currents (voltage sources and current sources)
6 Add sources currents to node currents I.
7 Solve YV = I to calculate node voltages V.
4-5-611
User Coded Model (UCM)
Solution Method in HYPERSIM
8 Determine if a non-linear element changes its operating point. If it is the case, calculate its new
Y add and update Y eq = Y ini + Y add for that element.
9 Calculate elements historic current I hist as well as all other signals it needs.
5.2.4 Parallel As mentioned in the line modelling, lines are equivalent to current sources in parallel to resistors
tasks in at each line end. Current sources at each end depend only on the past value of line voltages and
HYPERSIM 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.
4-5-612
User Coded Model (UCM)
Solution Method in HYPERSIM
(a)
Substation Substation
control control
task #1 task #2
(b)
4-5-613
User Coded Model (UCM)
User Coded Model
5.3.1 Introduction 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.
UCM
T2
Graphically, as the example shown in 5 - 7, an UCM looks like all other HYPERSIM models. It
has power connectors (T1, T2 in the example) to connect to the network through bus bars, control
connectors (In in the example) to connect to measurement and control signals. The behaviour of
the UCM is completely defined by user in his code written in C, C++.
5.3.2 UCM A UCM is a component located inside a substation. It is simulated together with other compo-
characteris nents of the same substation. The UCM is composed of a power part and a control part.
tics
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 in-
puts 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 :
The admittance matrix has a certain degree of sparsity. This is indicated by the matrix Yfill:
4-5-614
User Coded Model (UCM)
User Coded Model
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 Input parameters are those that will be in the parameter form. They can be modified once the
parameters UCM is inserted in the HYPERSIM diagram.
B Calculated These parameters are calculated by the Preparation function to be used in the Simulation func-
parameters tions. The purpose is to avoid doing the same calculation at every time step, thus reducing the sim-
ulation execution time.
C Power nodes Power nodes can be external or internal. External nodes are graphically visible and will be con-
nected 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 out-
puts 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
function to reduced the calculation effort during the simulation.
Among the simulation parameters, there are
Other parameters derived from the input parameters. For example: if the input parameter is
the frequency f, but during the simulation the period T = 1 f is needed, then T is calcu-
lated during the preparation to avoid its calculation at every time steps.
The Preparation function provided by user is compiled and linked with the HYPERSIMs GUI.
F Simulation The Simulations functions of the UCM is compiled together with the simulation code generated
functions 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 pur-
pose.
4-5-615
User Coded Model (UCM)
User Coded Model
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 initial-
izations 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
Function postVNode
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 inputs-out-
puts.
4-5-616
User Coded Model (UCM)
User Coded Model
Calculate
A 3 phase
sine wave
L Rs
NI
VL_a
IL IL_a, IL_b, IL_c VL_b 3 phase VLrec
VL_c rectifier
L
Lvec Ind
Vinc VLrec
NE
The control input A fixes the amplitude of the 3 phase sine-wave voltages source which has an
output resistor Rs. The source resistor is then connected with a non-linear inductor L through an
internal node NI. The other end of the inductor is connected to an external node NE to be con-
nected to a HYPERSIM network (internal node can not be connected to a HYPERSIM network).
The three phase current of the inductor IL_a, IL_b, IL_c are outputted to a multiplex port IL
for monitoring purpose. The three-phase voltages across the inductor are rectified and send to a
output port VLrec.
The non-linear inductor has its value L depending on the rectified voltage VLrec as shown also
in 5 - 8. The output Ind indicate the actual step number on the non-linear curve.
B Parameters
Input parameters
GaddVec: table of additional conductance values (to be added to the initial value to get
actual value) corresponding to Lvec. It is calculated as follows:
Lo = Lvec[0]: first value in table Lvec.
GLo = T/(2 * Lo): conductance equivalent to Lo. T is calculation time step.
4-5-617
User Coded Model (UCM)
User Coded Model
C Connectors
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 Followings are various utilities (under #define forms) to provide communication between HY-
available to PERSIM and the UCM:
user
double ucmVNode (int nodeNum): obtain the node voltage calculated by HYPER-
SIM 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)
4-5-618
User Coded Model (UCM)
User Coded Model
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
E Editing the Before starting to build a new UCM, select the preferred editor by the command
UCM
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.
4-5-619
User Coded Model (UCM)
User Coded Model
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 per-phase
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 fol-
lows (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 man-
datory 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:
Y ini : fixed part of the UCM admittance matrix,
Y add : variable part of the UCM admittance matrix,
Y fill : matrix indicating the sparsity of the UCM admittance matrix,
NodeChange: vector indicating which node has been affected by non-linearity.
NodeChange[i] = 1 if node i has been affected,
NodeChange[i] = 0 if node i has not been affected,
Input parameters, Calculated parameters, Control IOs are named according to C conven-
tions (but avoid to start with 3 letters ucm). They are defined in their appropriate section in
the UCM file and must not be re-declared in the function sections.
For a UCM named myUCM, one directory and many files are generated. Among them, users may
be interested to look into following files and directory for more understanding. But beside the
Definition file (file with extension .def), user must not modify other files.
4-5-620
User Coded Model (UCM)
User Coded Model
The UCM definition file to be edited for the UCM Example is named ucm_Exemple.def and
is presented below. All lines started with %% are comments in the template to explain the format
of data to be entered by user. The file contains various sections which correspond to the UCM
building procedure described above.
The UCM Preparation and Simulation functions are coded according to standard C.
User entries are in bold face.
4-5-621
User Coded Model (UCM)
User Coded Model
UCM_NAME = Example
UCM_TYPE = NetworkElement
UCM_CATEGORY = User
UCM_VERSION = 1.0
UCM_EXEC_TIME = 5.0e-6
UCM_DESCRIPTION = Voltage source with non-linear inductor
4-5-622
User Coded Model (UCM)
User Coded Model
%% 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" Ohm double 1 0.01 0.0 1.0e12 - "Rs"
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"
freq "freq" Hz double 1 60.0 30.0 90.0 - "freq"
4-5-623
User Coded Model (UCM)
User Coded Model
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
%% 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 V double in auto - "Voltage Amplitude"
IL_a A double out auto I "L current, phase a"
IL_b A double out auto I "L current, phase b"
IL_c A double out auto I "L current, phase c"
VLrec V double out auto - "Rectified L voltage"
Ind - double out auto - "Current index in Lvec"
4-5-624
User Coded Model (UCM)
User Coded Model
4-5-625
User Coded Model (UCM)
User Coded Model
4-5-626
User Coded Model (UCM)
User Coded Model
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
%% 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.2 -- Definitions */
/* 8.3.1.3 -- Declarations */
4-5-627
User Coded Model (UCM)
User Coded Model
{
for (j = 0; j < 6; j++)
{
ucmYini(i,j) = 0.0;
ucmYfill(i,j) = 0;
}
}
Lo = Lvec[0];
GLo = ucmTimeStep / (2.0 * Lo);
Gs = 1.0 / Rs;
ucmYfill(NI_a,NE_a) = ucmYfill(NE_a,NI_a) = 1;
ucmYfill(NI_b,NE_b) = ucmYfill(NE_b,NI_b) = 1;
ucmYfill(NI_c,NE_c) = ucmYfill(NE_c,NI_c) = 1;
ucmYini(NE_a,NE_a) = GLo;
ucmYini(NE_b,NE_b) = GLo;
ucmYini(NE_c,NE_c) = GLo;
ucmYfill(NE_a,NE_a) = 1;
ucmYfill(NE_b,NE_b) = 1;
ucmYfill(NE_c,NE_c) = 1;
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
%% 8.4- "Includes" paths list.
%% Enter paths of your include files separated by spaces after "=".
4-5-628
User Coded Model (UCM)
User Coded Model
UCM_PREP_INCLUDES_PATHS =
UCM_PREP_DEP_LIBS_PATHNAMES =
UCM_PREP_LIBRARIES =
4-5-629
User Coded Model (UCM)
User Coded Model
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
%% 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.2 -- Definitions */
/* 9.3.3 -- Declarations */
4-5-630
User Coded Model (UCM)
User Coded Model
int i;
doubleVsrc_a, Vsrc_b, Vsrc_c;
doubleTwoPiOver3 = 2.094395333; /* 2.0 Pi / 3 */
if (Lchanged)
{
ucmYadd(NI_a,NI_a) = GaddVec[Lindex];
ucmYadd(NI_a,NE_a) = -GaddVec[Lindex];
ucmYadd(NE_a,NE_a) = GaddVec[Lindex];
ucmYadd(NI_b,NI_b) = GaddVec[Lindex];
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];
4-5-631
User Coded Model (UCM)
User Coded Model
/* non-linear change */
ucmNodeChanged(NI_a) = ucmNodeChanged(NE_a) = 1;
ucmNodeChanged(NI_b) = ucmNodeChanged(NE_b) = 1;
ucmNodeChanged(NI_c) = ucmNodeChanged(NE_c) = 1;
}
time += ucmTimeStep;
Lo = Lvec[0];
GLo = ucmTimeStep / (2.0 * Lo);
GL = GLo + GaddVec[Lindex];
Lchanged = 0;
index = (int)(VLrec / Vinc);
if (index > Ldim-1)
index = Ldim - 1;
if (index < 0)
index = 0;
if (index != Lindex)
4-5-632
User Coded Model (UCM)
User Coded Model
{
Lindex = index;
Lchanged = 1;
}
Ind = Lindex;
/* Other calculations */
time += ucmTimeStep;
if (time >= period) /* To avoid truncation error */
time -= period;
UCM_SIMULATION_INCLUDES_PATHS =
UCM_SIMULATION_DEP_LIBS_PATHNAMES =
UCM_SIMULATION_LIBRARIES =
4-5-633
User Coded Model (UCM)
User Coded Model
Figure 5 - 9 Dialogue box to choose an UCM and put into the HYPERSIM
diagram
4-5-634
User Coded Model (UCM)
User Coded Model
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 An UCM can be put in HYPERSIMs library and then it becomes accessible through the HYPER-
of library SIM component palette as any other model.
of UCMs
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 1, Chapter 8
for details.
4-5-635
User Coded Model (UCM)
Progressive practices with UCM
5.4.1 Resistor
A 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.
Ia,Ib,Ic
R[3]
I
B Codes %%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN GENERAL INFORMATION -- Enter or modify general information
UCM_NAME = Resistor
UCM_TYPE = NetworkElement
UCM_CATEGORY = User
UCM_VERSION = "1.0"
UCM_EXEC_TIME = 5.0e-6
UCM_DESCRIPTION = "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...
4-5-636
User Coded Model (UCM)
Progressive practices with UCM
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN CONTROL IOS -- Enter control IOs table after this line...
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN NODES DEFINITIONS -- Enter nodes table after this line...
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN CALCULATED PARAMETERS -- Enter parameters table after this line...
G - double 3 "Equiv.conductance"
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN PREPARATORY GLOBAL CODE -- Enter code under the appropriate comment...
#include <stdio.h>
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN PREPARATION FUNCTION CODE -- Enter code after this line...
int i, j;
4-5-637
User Coded Model (UCM)
Progressive practices with UCM
ucmYfill(T_a, T_a) = 1;
ucmYfill(T_b, T_b) = 1;
ucmYfill(T_c, T_c) = 1;
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN AFTER VOLTAGE CALCULATION -- Enter code ->...
Ia = ucmVNode(T_a) * G[0];
Ib = ucmVNode(T_b) * G[1];
Ic = ucmVNode(T_c) * G[2];
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 Build an UCM to represent a three-phase inductor connected in Y, the neutral is grounded. The
parameters of the UCM is the vector Lval[3] of 3 values of inductance. The inductors are con-
nected 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.
Ia,Ib,Ic
Lval[3] I
B Codes %%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN GENERAL INFORMATION -- Enter or modify general information
UCM_NAME = Inductor
UCM_TYPE = NetworkElement
UCM_CATEGORY = User
UCM_VERSION = "1.0"
UCM_EXEC_TIME = 5.0e-6
4-5-638
User Coded Model (UCM)
Progressive practices with UCM
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN DOCUMENTATION -- Enter models documentation after this line...
Documentation de Exemple.
---------------------
Three-phase linear inductor connected in Y grounded
%% END DOCUMENTATION
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN TUNABLE PARAMETERS -- Enter parameters table after this line...
Lval "L" H double 3 [0.1 0.1 0.1] 0.0 1.0e12 - "Inductor values"
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN CONTROL IOS -- Enter control IOs table after this line...
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN NODES DEFINITIONS -- Enter nodes table after this line...
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN HISTORICAL CURRENTS -- Enter historical currents table after this...
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN CALCULATED PARAMETERS -- Enter parameters table after this line...
4-5-639
User Coded Model (UCM)
Progressive practices with UCM
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN PREPARATION FUNCTION CODE -- Enter code after this line...
int i, j;
ucmYfill(T_a, T_a) = 1;
ucmYfill(T_b, T_b) = 1;
ucmYfill(T_c, T_c) = 1;
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN AFTER VOLTAGE CALCULATION -- Enter code ->...
C Exercise 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.
4-5-640
User Coded Model (UCM)
Progressive practices with UCM
5.4.3 Series
Resistor-
Inductor
A 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
ILa,ILb,ILc
L[3] IL
B Code %%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN GENERAL INFORMATION -- Enter or modify general information
UCM_NAME = RL
UCM_TYPE = NetworkElement
UCM_CATEGORY = User
UCM_VERSION = "1.0"
UCM_EXEC_TIME = 5.0e-6
UCM_DESCRIPTION = "R and L in series" # Description du modele
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN DOCUMENTATION -- Enter models documentation after this line...
Documentation de Exemple.
---------------------
Three-phase series R-L connected in Y grounded
%% END DOCUMENTATION
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN TUNABLE PARAMETERS -- Enter parameters table after this line...
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
4-5-641
User Coded Model (UCM)
Progressive practices with UCM
%% BEGIN CONTROL IOS -- Enter control IOs table after this line...
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN NODES DEFINITIONS -- Enter nodes table after this line...
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN HISTORICAL CURRENTS -- Enter historical currents table after this...
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN CALCULATED PARAMETERS -- Enter parameters table after this line...
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN PREPARATORY GLOBAL CODE -- Enter code under the appropriate comment...
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN PREPARATION FUNCTION CODE -- Enter code after this line...
int i, j;
4-5-642
User Coded Model (UCM)
Progressive practices with UCM
/* Calculate Rs conductances */
ucmYfill(T_a, T_a) = 1;
ucmYfill(T_b, T_b) = 1;
ucmYfill(T_c, T_c) = 1;
ucmYfill(Ti_a, Ti_a) = 1;
ucmYfill(Ti_b, Ti_b) = 1;
ucmYfill(Ti_c, Ti_c) = 1;
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN AFTER VOLTAGE CALCULATION -- Enter code ->...
4-5-643
User Coded Model (UCM)
Progressive practices with UCM
C Exercise Instead of considering R and L as 2 separated branches as the example above, combine them to-
gether 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.
5.4.4 Voltage
source
A 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 con-
trol outputs Db1, Db2, Db3 at connector Db are use for debugging purpose.
I_a,I_b,I_c
Ls[3] I
Db
B Codes %%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN GENERAL INFORMATION -- Enter or modify general information
UCM_NAME = VSrc
UCM_TYPE = NetworkElement
UCM_CATEGORY = User
UCM_VERSION = "1.0"
UCM_EXEC_TIME = 5.0e-6
UCM_DESCRIPTION = "Three-phase Voltage source with inductor at output"
4-5-644
User Coded Model (UCM)
Progressive practices with UCM
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN DOCUMENTATION -- Enter models documentation after this line...
%% END DOCUMENTATION
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN TUNABLE PARAMETERS -- Enter parameters table after this line...
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN CONTROL IOS -- Enter control IOs table after this line...
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN NODES DEFINITIONS -- Enter nodes table after this line...
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN CURRENT SOURCES -- Enter sources table after this line...
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN HISTORICAL CURRENTS -- Enter historical currents table after this...
4-5-645
User Coded Model (UCM)
Progressive practices with UCM
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN CALCULATED PARAMETERS -- Enter parameters table after this line...
Gs - double 3 "Equiv.Conductance"
omega - double 1 "omega"
period - double 1 "period"
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN PREPARATION FUNCTION CODE -- Enter code after this line...
int i, j;
doubleGLo, Lo;
ucmYfill(T_a, T_a) = 1;
ucmYfill(T_b, T_b) = 1;
ucmYfill(T_c, T_c) = 1;
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
4-5-646
User Coded Model (UCM)
Progressive practices with UCM
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN SIMULATION GLOBAL CODE -- Enter code under the appropriate comment...
#include <math.h>
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN BEFORE VOLTAGE CALCULATION CODE -- Enter code ->...
int i;
doubleVsrc_a, Vsrc_b, Vsrc_c;
doubleTwoPiOver3 = 2.094395333; /* 2.0 Pi / 3 */
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN AFTER VOLTAGE CALCULATION -- Enter code ->...
4-5-647
User Coded Model (UCM)
Progressive practices with UCM
/* Other calculations */
time += ucmTimeStep;
if (time >= period) /* To avoid truncation error */
time -= period;
/* Debugging outputs */
Db1 = I_a;
Db2 = Ihist_a;
Db3 = time;
C Exercise Build an UCM to model a three-phase sine-wave voltage source with the possibility of modulat-
ing 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 I
V
Rectifier Vrec
Vinc Vrec
B Codes %%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN GENERAL INFORMATION -- Enter or modify general information
UCM_NAME = Lnlin
UCM_TYPE = NetworkElement
UCM_CATEGORY = User
UCM_VERSION = "1.0"
4-5-648
User Coded Model (UCM)
Progressive practices with UCM
UCM_EXEC_TIME = 5.0e-6
UCM_DESCRIPTION = "Non-linear inductor"
%%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...
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN NODES DEFINITIONS -- Enter nodes table after this line...
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN HISTORICAL CURRENTS -- Enter historical currents table after this...
4-5-649
User Coded Model (UCM)
Progressive practices with UCM
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN CALCULATED PARAMETERS -- Enter parameters table after this line...
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN PREPARATION FUNCTION CODE -- Enter code after this line...
int i, j;
doubleGLo, Lo;
Lo = Lvec[0];
GLo = ucmTimeStep / (2.0 * Lo);
ucmYfill(T_a, T_a) = 1;
ucmYfill(T_b, T_b) = 1;
ucmYfill(T_c, T_c) = 1;
4-5-650
User Coded Model (UCM)
Progressive practices with UCM
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN SIMULATION INITIALIZATION FUNCTION CODE -- Enter code ->...
Lindex = 0;
Lchanged = 0;
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN BEFORE VOLTAGE CALCULATION CODE -- Enter code ->...
int i;
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;
}
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN AFTER VOLTAGE CALCULATION -- Enter code ->...
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);
4-5-651
User Coded Model (UCM)
Progressive practices with UCM
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;
Lchanged = 0;
index = (int)(Vrec / Vinc);
/* Debugging signal */
Db1 = Lchanged;
Db2 = index;
Db3 = 0.0;
4-5-652