Sunteți pe pagina 1din 652

HYPERSIM

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 :

Edition Date Description of changes

First June 2004 Software version 9.0


Second January 2005 Software version 9.1
Third June 2006 Software version 9.2
Fourth November 2006 Updated DG and Lines models
Fifth March 2007 Updated Lines models
Six March 2014 Updated by OPAL-RT

Trademarks:
The following names are registered trademarks or trade names of their respective owners as listed below.

Name Company

Relations :
This manual relates to the following objects.

Number Description

Contents :Hydro Qubec


The software described in this manual are partially or entirely from licensed Hydro-Qubec software.
The material contained in this manual is partially or entirely from Hydro-Qubec documentation.

ii
Table of
Contents

Part-1
Chapter - 1 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

Chapter - 2 Introduction to the Graphical Interface . . . . . . . . . . . . . 29

2.1 Starting Hypersim from HyperView . . . . . . . . . . . . . . . . . 29


2.2 Interface Operating Modes . . . . . . . . . . . . . . . . . . . . . 31
2.3 Editing Mode Overview . . . . . . . . . . . . . . . . . . . . . . . 32
2.4 Simulation Mode Overview . . . . . . . . . . . . . . . . . . . . . 33

Chapter - 3 Editing a Power System Diagram . . . . . . . . . . . . . . . . . 35

3.1 Background Menus . . . . . . . . . . . . . . . . . . . . . . . . . . 36


3.2 Graphic Tools Palette . . . . . . . . . . . . . . . . . . . . . . . . 38
3.2.1 Power System Components. . . . . . . . . . . . . . . . 38
3.2.2 Control Elements . . . . . . . . . . . . . . . . . . . . . . 39
3.2.3 System Tools . . . . . . . . . . . . . . . . . . . . . . . . 39
3.2.4 User and Site Drawers . . . . . . . . . . . . . . . . . . . 39
3.3 Buses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
3.3.1 Drawing . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
3.3.2 Sensor Label and Symbol . . . . . . . . . . . . . . . . . 42
3.3.3 Output Sensors . . . . . . . . . . . . . . . . . . . . . . . 42

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

Chapter - 4 Graphic Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

4.1 Creating Texts and Graphics . . . . . . . . . . . . . . . . . . . . . . . 53


4.1.1 Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
4.1.2 Multibyte Text . . . . . . . . . . . . . . . . . . . . . . . . . . 54
4.1.3 Polylines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
4.1.4 Adding Diversions . . . . . . . . . . . . . . . . . . . . . . . . 54
4.1.5 Rectangle . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
4.1.6 Polygon. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
4.1.7 Straight Line . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
4.1.8 Open Spline Curve . . . . . . . . . . . . . . . . . . . . . . . 55
4.1.9 Ellipse (or circle). . . . . . . . . . . . . . . . . . . . . . . . . 55
4.1.10 Close Spline Curve . . . . . . . . . . . . . . . . . . . . . . 55
4.1.11 Zoom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
4.1.12 Rotation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
4.2 Selecting Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
4.2.1 Selecting One Object . . . . . . . . . . . . . . . . . . . . . . 56
4.2.2 Multiple Selection . . . . . . . . . . . . . . . . . . . . . . . . 56
4.2.3 Selecting All Object . . . . . . . . . . . . . . . . . . . . . . . 56
4.3 Changing Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
4.3.1 Text Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . 57

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

Chapter - 5 Editing Control System . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63

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

Chapter - 6. Interconnecting Control Blocks and


Power System Elements . . . . . . . . . . . . . . . . . . . . . . . . . . 75

6.1 Interconnecting built-in control


connectors to control blocks . . . . . . . . . . . . . . . . . . . . . . 75
6.2 Interconnecting blocks using sensor signals . . . . . . . . . . . . . . 77
6.3 Transceiver Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
6.3.1 Transceiver Blocks . . . . . . . . . . . . . . . . . . . . . . . 78

Chapter - 7 Monitoring simulation results . . . . . . . . . . . . . . . . . . . . . . . 79

7.1 Monitors in the parameter forms of element or control blockk . . . . 79


7.2 Monitors inside the network diagram . . . . . . . . . . . . . . . . . . 80
7.2.1 Monitors associated with element or blockk . . . . . . . . . 80
7.2.2 General purpose monitors . . . . . . . . . . . . . . . . . . . 83
7.3 Expression Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
7.3.1 Expression with simple functions . . . . . . . . . . . . . . . 84
7.3.2 Expression with advanced functions . . . . . . . . . . . . . 85
7.4 Monitors Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
7.4.1 Monitor controls in HyperView . . . . . . . . . . . . . . . . . 87
7.4.2 Monitor controls inside the network diagram . . . . . . . . . 87

Chapter - 8 Customizing Hypersim . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89

8.1 Customizing Hypersim . . . . . . . . . . . . . . . . . . . . . . . . . . 89


8.1.1 Properties Menu . . . . . . . . . . . . . . . . . . . . . . . . . 89
8.1.2 Language Used . . . . . . . . . . . . . . . . . . . . . . . . . 91
8.2 Library Management . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
8.2.1 Library Directories . . . . . . . . . . . . . . . . . . . . . . . . 93
8.2.2 Library of Models Built with Subsystems . . . . . . . . . . . 94
8.2.3 Library of Models Built Using User Code Bloc (UCB) . . . . 98
8.2.4 Library of Models Built from Simulink . . . . . . . . . . . . . 98

vi
8.2.5 Building the Parameter Form . . . . . . . . . . . . . . . . . 98

Chapter - 9 Simulation and Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101

9.1 Sensors, Input/Output and Sensor Configuration . . . . . . . . . . . 102


9.1.1 Sensors and Input/Output . . . . . . . . . . . . . . . . . . . 102
9.1.2 Sensor Configuration . . . . . . . . . . . . . . . . . . . . . 104
9.2 Simulation Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . 105
9.3 State of Disconnecting Switches . . . . . . . . . . . . . . . . . . . . 106
9.4 Network Analysis, Task Distribution,
Code Generation and Simulation . . . . . . . . . . . . . . . . . . . 107
9.5 Changing Parameters of Elements and Blocks . . . . . . . . . . . . 107

Chapter - 10 Setting initial conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . 109

10.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109


10.2 Introduction to Hyperview . . . . . . . . . . . . . . . . . . . . . . . 109
10.3 Snapshot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
10.3.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
10.3.2 Utilization . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
10.4 Load-Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
10.4.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
10.4.2 Preparation of network parameters . . . . . . . . . . . . . 114
10.4.3 Running load-flow and setting initial conditions . . . . . . 115

Chapter - 11 List of Tools and Models . . . . . . . . . . . . . . . . . . . . . . . . . . 117

11.1 SystemTools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117


11.2 NetworkSources and Machines . . . . . . . . . . . . . . . . . . . 117
11.3 NetworkPassive . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
11.4 NetworkLines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
11.5 NetworkTransformers . . . . . . . . . . . . . . . . . . . . . . . . . 119
11.6 NetworkLoads and Motors . . . . . . . . . . . . . . . . . . . . . . 120
11.7 NetworkControllers and Switches . . . . . . . . . . . . . . . . . . 120
11.8 NetworkMiscellaneous . . . . . . . . . . . . . . . . . . . . . . . . 121
11.9 Control Math and Functions . . . . . . . . . . . . . . . . . . . . . 121
11.10 Control Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
11.11 Control Non-Linear and Delay . . . . . . . . . . . . . . . . . . . 123
11.12 Control Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . 124

vii
11.13 Control Miscellaneous . . . . . . . . . . . . . . . . . . . . . . . 124

Chapter - 12 Summary of Menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125

12.1 Main Menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125


12.2 Graphics Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
12.3 Background Menu, Editing Mode . . . . . . . . . . . . . . . . . . . 127
12.3.1 Without Object Selection . . . . . . . . . . . . . . . . . . . 127
12.3.2 With Object Selection . . . . . . . . . . . . . . . . . . . . . 128
12.4 Background Menu, Simulation Mode . . . . . . . . . . . . . . . . . 129
12.4.1 Pointing to a Label . . . . . . . . . . . . . . . . . . . . . . 129
12.4.2 Pointing to a Blank Space . . . . . . . . . . . . . . . . . . 129

Part-2
Chapter - 1 Hypersim Network Models . . . . . . . . . . . . . . . . . . . . . . . . . 133

1.1 List of Single-Phase and Three-Phase Models . . . . . . . . . . . . 133

Chapter - 2 SI or pu system units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149

2.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149


2.2 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
2.3 P.U. Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152

Chapter - 3 System Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155

3.1 POW Synchronization . . . . . . . . . . . . . . . . . . . . . . . . . . 155


3.2 Single and Three phase and Multiplex Buses . . . . . . . . . . . . . 158
3.2.1 Three-Phase Bus . . . . . . . . . . . . . . . . . . . . . . . . 158
3.2.2 Single-Phase Bus . . . . . . . . . . . . . . . . . . . . . . . . 158
3.2.3 Multiplex Bus . . . . . . . . . . . . . . . . . . . . . . . . . . 159
3.3 Simulink Block, User-Coded Block . . . . . . . . . . . . . . . . . . . 160
3.4 Super-Block and Super-Model . . . . . . . . . . . . . . . . . . . . . . 160

Chapter - 4 Current and Voltage Sources . . . . . . . . . . . . . . . . . . . . . . . 161

4.1 Current and Voltage Sources . . . . . . . . . . . . . . . . . . . . . . 161


4.2 Programmable Variable Sources . . . . . . . . . . . . . . . . . . . . 167
4.3 Controlled Voltage and Current Sources . . . . . . . . . . . . . . . . 186

viii
Chapter - 5 Synchronous Turbine Generators . . . . . . . . . . . . . . . . . . . 191

5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191


5.2 Synchronous Generator Model Overview . . . . . . . . . . . . . . . 192
5.3 Common Generic Subsystems . . . . . . . . . . . . . . . . . . . . . 194
5.4 Generic Synchronous Generator . . . . . . . . . . . . . . . . . . . . 194
5.4.1 Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
5.4.2 Progr. General Parameters . . . . . . . . . . . . . . . . . . 196
5.4.3 Load Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
5.4.4 Prog. Parameters . . . . . . . . . . . . . . . . . . . . . . . . 198
5.5 Generic Excitation system . . . . . . . . . . . . . . . . . . . . . . . . 199
5.5.1 Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
5.5.2 Prog. Parameters . . . . . . . . . . . . . . . . . . . . . . . . 200
5.6 Generic Stabilizer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
5.6.1 Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
5.6.2 Programmable Parameters . . . . . . . . . . . . . . . . . . 201
5.7 Hydraulic Turbine Generators . . . . . . . . . . . . . . . . . . . . . . 202
5.8 Speed Regulator for Hydraulic Turbine Generators . . . . . . . . . . 204
5.8.1 Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
5.8.2 Programmable Parameters . . . . . . . . . . . . . . . . . . 205
5.9 Generic Hydraulic Turbine . . . . . . . . . . . . . . . . . . . . . . . . 206
5.9.1 Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
5.9.2 Programmable Parameters . . . . . . . . . . . . . . . . . . 206
5.9.3 List of Available Signals . . . . . . . . . . . . . . . . . . . . 207
5.9.4 Operating Mode . . . . . . . . . . . . . . . . . . . . . . . . . 208
5.9.5 Hydraulic Turbine Generator Control Panel . . . . . . . . . 209
5.10 Tandem Thermal Turbine Generators . . . . . . . . . . . . . . . . . 212
5.11 Generic Boiler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
5.11.1 Operation. . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
5.11.2 Programmable Parameters . . . . . . . . . . . . . . . . . 214
5.12 Speed Regulator for Tandem Thermal Turbine Generators . . . . 215
5.12.1 Operation. . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
5.12.2 Programmable Parameters . . . . . . . . . . . . . . . . . 215
5.13 Tandem Steam Turbine . . . . . . . . . . . . . . . . . . . . . . . . . 216

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

Chapter - 6 Passive Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239

6.1 Shunt and Series R, L, C Elements . . . . . . . . . . . . . . . . . . . 239


6.2 Shunt and Series Non-Linear Resistors . . . . . . . . . . . . . . . . 243
6.3 Mutual Inductances . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
6.4 Decoupling Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
6.5 Passive Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256

Chapter - 7 Lines and Cables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261

7.1 Calculation of electrical parameters . . . . . . . . . . . . . . . . . . . 261


7.1.1 Hyperline Line Data . . . . . . . . . . . . . . . . . . . . . . . 261
7.1.2 Load File (EMTP) . . . . . . . . . . . . . . . . . . . . . . . . 262
7.2 Distributed Parameters Lines . . . . . . . . . . . . . . . . . . . . . . 264
7.2.1 Transmission Lines with Fault . . . . . . . . . . . . . . . . . 272

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

Chapter - 8 Transformers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327

8.1 Three-Phase Linear and Saturable Transformers . . . . . . . . . . . 328


8.2 Single-Phase Linear and Saturable Transformers . . . . . . . . . . 340
8.3 Linear and Saturable Series Transformers . . . . . . . . . . . . . . . 349
8.4 Three-Phase Transformers with Tap Changer . . . . . . . . . . . . 358
8.5 Measuring Transformers . . . . . . . . . . . . . . . . . . . . . . . . 366

Chapter - 9 Loads and Motors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381

9.1 Dynamic Load . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381


9.2 Harmonic Load . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387
9.3 D.C. Motor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395
9.4 Arc Furnace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400
9.5 Induction Motor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405
9.6 Using the Hypersim Dynamic load model . . . . . . . . . . . . . . . 414
9.6.1 Purpose of the Dynamic Load Model . . . . . . . . . . . . . 414
9.6.2 Description of the Load Model. . . . . . . . . . . . . . . . . 414

Chapter - 10 Electronic Switches and Bridges . . . . . . . . . . . . . . . . . . . . 423

10.1 Electronic Switches . . . . . . . . . . . . . . . . . . . . . . . . . . . 423


10.1.1 Parameter Description . . . . . . . . . . . . . . . . . . . . 423
10.1.2 Other Parameters . . . . . . . . . . . . . . . . . . . . . . . 425
10.1.3 Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . 425
10.1.4 List of Available Signals . . . . . . . . . . . . . . . . . . . 426
10.2 Serial Breaker and Shunt Fault Breaker . . . . . . . . . . . . . . . 428

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

Chapter - 11 HVDC and SVC Controllers . . . . . . . . . . . . . . . . . . . . . . . . 445

11.1 Rectifier/Inverter 6/12 Pulse DC Controllers . . . . . . . . . . . . . 445


11.1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 445
11.1.2 Icons and diagrams . . . . . . . . . . . . . . . . . . . . . . 445
11.1.3 Modelling the converter and its control system . . . . . . . 446
11.1.4 Valve faults and DC fault . . . . . . . . . . . . . . . . . . . 446
11.1.5 Firing and synchronization system . . . . . . . . . . . . . . 446
11.1.6 Band-pass filter . . . . . . . . . . . . . . . . . . . . . . . . 448
11.1.7 Low AC voltage detection . . . . . . . . . . . . . . . . . . . 450
11.1.8 The a angle regulation and limiting system . . . . . . . . . 450
11.1.9 The static characteristic . . . . . . . . . . . . . . . . . . . . 450
11.1.10 The voltage dependent current order limiter (VDCOL) . . 451
11.1.11 Dynamic operation of the controller . . . . . . . . . . . . 452
11.1.12 The PI regulators . . . . . . . . . . . . . . . . . . . . . . . 454
11.1.13 Linearization of gain . . . . . . . . . . . . . . . . . . . . . 454
11.1.14 limits. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455
11.1.15 () limitation . . . . . . . . . . . . . . . . . . . . . . . . . 456

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

Chapter - 12 Various Network Elements . . . . . . . . . . . . . . . . . . . . . . . . 495

12.1 Frequency Measure Element . . . . . . . . . . . . . . . . . . . . . 495


12.2 Digital Output Element . . . . . . . . . . . . . . . . . . . . . . . . . 497
12.3 Digital Input Element . . . . . . . . . . . . . . . . . . . . . . . . . . 500
12.4 Analog Input Element . . . . . . . . . . . . . . . . . . . . . . . . . . 501
12.5 Current and Voltage Measure Elements . . . . . . . . . . . . . . . 501
12.6 Disconnection Element . . . . . . . . . . . . . . . . . . . . . . . . . 502

xiii
Chapter - 13 Hypersim Wave Form Playback Model . . . . . . . . . . . . . . . 505

Part-3
Chapter - 1 Control Block List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 515

Chapter - 2 Function Details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 527

Part-4
Chapter - 1 Matlab and Simulink Models . . . . . . . . . . . . . . . . . . . . . . . 545

1.1 Matlab and Simulink Models . . . . . . . . . . . . . . . . . . . . . . . 545


1.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 546
1.3 Main Features of HyperLink . . . . . . . . . . . . . . . . . . . . . . . 546
1.4 Relationship Between HyperLink and
Matlab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 547
1.5 Preparing Simulink Models . . . . . . . . . . . . . . . . . . . . . . . . 547
1.6 Transformations Required in the Model . . . . . . . . . . . . . . . . . 547
1.7 Adapting Step Sizes of Simulink in Real-Time . . . . . . . . . . . . . 548
1.8 Adapting Step Sizes of Simulink and HYPERSIM in Differed Time . 548
1.9 Code Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 548
1.9.1 Code Generation of a Simulink Model . . . . . . . . . . . . 549
1.10 Adding a Simulink Model to Diagram . . . . . . . . . . . . . . . . . 552
1.10.1 Using a Simulink Block . . . . . . . . . . . . . . . . . . . . 552
1.10.2 Using a HyperLink Power System Element . . . . . . . . . 553
1.10.3 Code Generation and S Functions in HyperLink . . . . . . 560
1.11 Changing Simulink Model Parameters During
Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 562
1.12 Limits of Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . 562
1.13 Procedure Used to Change Parameters . . . . . . . . . . . . . . . 563
1.14 Guidelines for a joint Simulink - HYPERSIM simulation. . . . . . . . 565

Chapter - 2 User Coded Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 569

2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 569

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

Chapter - 3 Generation and Importation of EMTP Files . . . . . . . . . . . 595

3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 596

Chapter - 4 Automatic Initialization of Control Panel . . . . . . . . . . . . . . 597

4.1 Control Panel Parameters . . . . . . . . . . . . . . . . . . . . . . . . 597

Chapter - 5 User Coded Model (UCM) . . . . . . . . . . . . . . . . . . . . . . . . . 601

5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 601


5.2 Solution Method in HYPERSIM . . . . . . . . . . . . . . . . . . . . . 602
5.2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 602
5.2.2 Line model . . . . . . . . . . . . . . . . . . . . . . . . . . . . 602
5.2.3 Substation modelling . . . . . . . . . . . . . . . . . . . . . . 604
5.2.4 Parallel tasks in HYPERSIM . . . . . . . . . . . . . . . . . . 612
5.3 User Coded Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . 614
5.3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 614
5.3.2 UCM characteristics . . . . . . . . . . . . . . . . . . . . . . 614
5.3.3 Composition of an UCM . . . . . . . . . . . . . . . . . . . . 615
5.3.4 Building an UCM through an example . . . . . . . . . . . . 616
5.3.5 Using an UCM in HYPERSIM diagram . . . . . . . . . . . . 634
5.3.6 Management of library of UCMs . . . . . . . . . . . . . . . . 635
5.4 Progressive practices with UCM . . . . . . . . . . . . . . . . . . . . . 636
5.4.1 Resistor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 636
5.4.2 Inductor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 638
5.4.3 Series Resistor-Inductor . . . . . . . . . . . . . . . . . . . . 641
5.4.4 Voltage source . . . . . . . . . . . . . . . . . . . . . . . . . 644
5.4.5 Non-linear inductance . . . . . . . . . . . . . . . . . . . . . 648

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.2 ORGANIZATION OF HYPERSIM


The Hypersim software consists of different modules, each one having its own function. The
modules are the following
HYPERSIM, the graphical interface in edition mode (see Figure 1 - 1);
HYPERSIM, the graphical interface in simulation mode (see Figure 1 - 2);
ScopeView, the signal visualization tool (see Figure 1 - 3);
HYPERVIEW, the graphical interface for tools such as Netlist, Load Flow and Snap-
shot (see Figure 1 - 4);
HyperView, the simulation control centre which allows to launch various applica-
tions such as Hypersim, ScopeView, and executes Hypersim related commands such
as Netlist, Load flow, Snapshot and Monitoring (see Figure 1 - 4);

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

Figure 1 - 1 HYPERSIM, the graphical interface in Edition Mode

1-1-21
General
Organization of Hypersim

Figure 1 - 2 HYPERSIM, the graphical interface in Simulation Mode

1-1-22
General
Organization of Hypersim

Figure 1 - 3 ScopeView, the waveform visualization tool

1-1-23
General
Organization of Hypersim

Figure 1 - 4 HyperView, the tool for NetList, Load flow and snapshot

Figure 1 - 5 TestView, the tool for batch file testing

1-1-24
General
Theory of Operation

1.3 THEORY OF OPERATION


A power system network mainly consists of stations interconnected by lines as shown in Figure
1 - 6. Basically, signals travel through lines at the speed of light. However, these lines have a prop-
agation delay which varies with their length.

STATION STATION
Machine
Breaker Breaker

Line
Transformer

Reactor (a) Load

Sub-station Line Sub-station Line


equation equation equation equation
subsystem

subsystem
subsystem
subsystem

(b)

Figure 1 - 6 Diagram of a simple network (a) and


of parallel tasks (b) to simulate a network
Due to this propagation delay, it is possible to simulate stations simultaneously (or in parallel)
with a calculation step smaller than the propagation delay. After each step, the stations can ex-
change results and then recompute the equation with the latest results from the previous time step.
The stations contain passive elements, sources, motors and also control systems of which some
have a much slower response time than that of electric transient phenomena. In practice, the con-
trol systems can also be simulated simultaneously with other station elements.

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 NETWORK SIMULATION STEPS


A simulation consists of two main steps:
Editing the diagram to simulate.
Analysis, simulation and control
This section describes the different actions related to each step. The procedure used to initiate a
step will be detailed progressively.

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

THIS PAGE IS INTENTIONALLY LEFT BLANK

1-1-28

Chapter 2
INTRODUCTION TO THE GRAPHICAL INTERFACE

2.1 STARTING HYPERSIM FROM HYPERVIEW


As mentioned in the previous chapter, HyperView is now the simulation control centre. To
keep all simulation applications coherent and connected together, it is a good practice to start
applications from HyperView.
First, HyperView is launched by typing:
hyperview
This will bring up the empty HyperView window shown in Fig.2 - 1a.

1-2-29
Introduction to the Graphical Interface
Starting Hypersim from HyperView

a) Starting window

b) After launching Hypersim

Figure 2 - 1 HyperView window


Use the menu
Tools->Start Hypersim
to launch Hypersim. When Hypersim is started, HyperView window will change and shows its
Simulation tab as in Fig. 2 - 1b with the following informations (brief descriptions are given
here, more details on these informations will be given later in subsequent chapter):
Network name: At the beginning, no network has been created or loaded, Noname is
filled in this field,
Code directory: directory where the generated code will be kept,
Performance: time scale factor allowing the simulation to be faster, equal or slower than
the real-time.
Type: type of simulation which can be Not real-time or real-type using specific hard-
ware (SGI computer, PC cluster, etc.)
Calculation step: the simulation results will be calculated at every steps.

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.2 INTERFACE OPERATING MODES

2 4 5
3 6

12

10

9 8
11

Figure 2 - 2 Hypersim GUI at start-up


There are two operating modes for the graphic interface: Editing and Simulation. At start-up, the
interface is in Editing mode. Changing modes is done by the Edition and Simulation buttons 2 .

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.

2.3 EDITING MODE OVERVIEW


The following information is displayed in the Hypersim window (see Figure 2 - 2):

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.4 SIMULATION MODE OVERVIEW


In Simulation mode, the interface is displayed as in Figure 2 - 3. Here, the editing menus and but-
tons are not available. However, displacement is still possible using the scroll bars 6 , 7 , 8
and the zoom rate can be changed with 5 or 9 .

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.

15 This area displays a message from the simulations status

1-2-33
Introduction to the Graphical Interface
Simulation Mode Overview

2
5 6
15

14

9 8
13

Figure 2 - 3 Overview of Hypersims GUI in Simulation Mode

1-2-34

Chapter 3
EDITING A POWER SYSTEM DIAGRAM

Connections
Buses

Power
elements

Workspace

Figure 3 - 1 Diagram with Power System Elements


Editing a diagram is done in Edition mode. To edit a diagram as in Figure 3 - 1, within the
workspace, the user creates the required buses, the power system elements and interconnects
them with connections. Elements cannot be connected directly one to another. They must al-
ways be connected using a bus.
The power system elements available are found in drawers whose title begins with NETWORK,
while buses are in the drawer SYSTEM--TOOLS.
For ease of understanding, this section concentrates on the electrical aspect of a diagram, in
other words the creation of buses, power system elements and their interconnections. Each of
these elements is also a graphic object (in addition to being an electrical object). Graphic han-
dling (displacement, zoom in, rotation, copy, paste, etc.) will be described in Part 1, Chapter
4.

1-3-35
Editing a Power System Diagram
Background Menus

3.1 BACKGROUND MENUS


Two background menus can be displayed in the workspace: one related to a selected graphic ob-
ject and one for general commands.
The following procedure is used to display the menu related to a selected object:
A Select the required object in the diagram by left clicking it. The object is then marked with han-
dles.

Figure 3 - 2 Selected element background menu

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

Figure 3 - 3 General background menu


To display the general background menu, make sure no object is selected, then press and hold the
right button. The procedure to execute a command is the same as described above.
The execution of most background menus first displays a dialog box in which the required param-
eters must be defined.

1-3-37
Editing a Power System Diagram
Graphic Tools Palette

3.2 GRAPHIC TOOLS PALETTE

Figure 3 - 4 Graphic Tools Palette


The Graphic Tools Palette, specified by 12 in Chapter 2, is reproduced in Figure 3 - 4. Inside
these drawers, there are icons of elements to simulate, or tools allowing the interconnection of
elements. A brief description of these follows. Chapter 1 in Part 2 (Hypersim Network Models
on page 133) is dedicated to a complete description of each element.
There are two types of elements to simulate: power elements and control elements. There is also
a drawer containing general use elements.

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.

3 NETWORK--LINES. Different types of lines, frequency dependent or not.

4 NETWORK--TRANSFORMER. Different types of transformers, saturable or not, including


voltage and current measuring transformers.
5 NETWORK--LOADS+MOTORS. Different types of loads (dynamic, arc furnace, etc.) and mo-
tors (AC and DC).
6 NETWORK--CONTROLLERS+SWITCHES. AC-DC converters, static compensators, different
configurations of electronic power switches.
7 NETWORK--MISCELLANEOUS. Elements other than those previously described.

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.

12 CONTROL--MISCELLANEOUS. abc<->dq conversion, integer<->floating conversion, trans-


ceiver and also blocks not part of the preceding categories.

3.2.3 System These elements have a general application:


Tools
Synchronize data acquisition and operations,
Buses used to interconnect power system elements,
Models whose content is in a file such as sub-systems (see Part 1, Chapter 10, page 109),
SimulinkTM diagram (see Part 4, Chapter 1, page 545) and user-coded blocks (Part 4, Chap-
ter 2, page 569).

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

Figure 3 - 5 Graphic Tool Palette

1-3-40
Editing a Power System Diagram
Buses

3.3 BUSES

Figure 3 - 6 Drawing Buses


There are three types of buses: single-phase, three-phase and multiplex. These are referred to re-
spectively in Figure 3 - 6 by BusMono, Bus3ph and BusMpx.
The single-phase bus is used to interconnect single-phase elements, the three-phase bus for three-
phase elements and the multiplex bus to connect three-phase elements to single-phase elements
and vice versa.

3.3.1 Drawing Figure 3 - 6 shows how to draw a bus:


Select the type of bus by clicking the corresponding icon in the drawer SYSTEM--TOOLS.
For a single-phase bus, move the pointer to the required position and left click.

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:

Figure 3 - 7 dialog for Bus Label and Sensors


A Select the required bus and display the background menu (see 3.1), to execute Edit label,

B A dialog box, as shown in Figure 3 - 7 is displayed. The following parameters are defined:

1 Label: Name given by the user

2 Visibility: Select Yes or No to show or hide the label on the diagram,

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

a) Dialog box to Edit base voltage

b) dialog box to Edit base voltages summary

Figure 3 - 8 Base Voltage dialog Boxes

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

a) dialog box to Edit number of


phases in a bus b) dialog box to Edit labels
of a multiplexed bus

Figure 3 - 9 dialog Boxes for a Multiplex Bus

3.4 POWER SYSTEM ELEMENTS

Voltage Current
source source
1 1

2 2

Label

Internal
connector
Disconnecting switch
External
connector

Workspace

Figure 3 - 10 Using Power System Elements

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

Figure 3 - 11 dialog box for Connectors and Disconnecting Switches


Power system elements have terminals connected to buses. Each terminal has a disconnecting
switch between two connectors. In Edition mode, the disconnecting switches have no function.
In Simulation mode, the user can open or close a disconnecting switch to enable or disable an el-
ement.
A disconnecting switch can be added or removed by selecting the corresponding element and us-
ing the background menu to execute the command Edit connectors. This command displays
the dialog box shown in Figure 3 - 11 with the following informations:

1 Type: Select Switch Style to be able to use the disconnecting switch. Select Graphic con-
nector to do not use the disconnecting switch.

2 Visibility: Yes to show the connector dots, No otherwise.

1-3-45
Editing a Power System Diagram
Power System Elements

4
1

Figure 3 - 12 Example of a Parameters Control Panel


The connectors of all power system elements can be displayed with the global command Dis-
play connectors in the general background menu (no element selected). Similarly, they can
be hidden with the command Erase connectors.

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:

1 Cancel: Cancel the changes and close the control panel.

2 Apply: Confirm the changes without closing the control panel.

3 Close: Confirm the changes and close the control panel.

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

a) Element with parameters


displayed

c) dialog box to Display results pa-


rameters in the diagram

b) dialog box to Display parameters


in the diagram

Figure 3 - 13 Showing Element Parameters in a Diagram


It is possible to select parameters and show them next to the corresponding element. To display
an element parameter, select the element and use the background menu to execute Display pa-
rameters in the diagram. A dialog box as shown in Figure 3 - 13b) will appear.

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.

3.5 INTERCONNECTING ELEMENTS AND BUSES

2
1
1
A 3
2
4 5 BusMPX
Bus
4 3
3 2
1 2
B
1

(a) (b)

Key: Click left button Click right button

Figure 3 - 14 Making Connections Between an Element


and a Bus
A network (diagram) consists of power system elements interconnected with buses. Figure 3 -
14(a) shows how to make these interconnections. The user draw a connection formed by a series
of straight lines connecting an external connector (see Figure 3 - 10) of a power system element
to a bus. To make a connection:
A Make sure no object was selected in the diagram (no object is surrounded by handles);

B Click the connector to make the connection; the cursor transforms into a pointer 5 specifying
that a connection is being drawn;

C Drag the connection to the bus where to end the connection,

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.

3.6 NUMBER OF ELEMENT PHASES


In most cases, the number of element phases is determined by the type of the element. An AC line
has three phases, a DC cable has one phase, transformers have three phases, except single-phase
models.
In some cases, the number of element phases is determined by its connection to a bus. The ele-
ment is multiphase if it is connected to a multiphase bus, or if it is connected to the multiphase
side of a multiplex bus. It is single-phase if it is connected to a single-phase bus or to the single-
phase side of a multiplex bus. In figure 3 - 14b), element Gen1 has three phases, while R, L and C
elements have one phase.
Hypersim automatically checks if there is a conflict between the number of phases authorized for
an element and the bus connected to this element.

3.7 POW ELEMENT


The simulation of disturbances requires a time reference to clock the disturbance. This reference
is determined by an element called POW (point-on-wave) that should be linked to a bus whose
voltage is relatively stable. A POW is compulsory in a network with power system elements. Hy-
persim warns the user when there is no POW found in the network.
The time reference (t = 0) is established by the level crossing of the Phase a voltage of the bus to
which the POW is connected. This crossover can be during the rise (positive slope) or fall (neg-
ative slope) of the voltage signal. A voltage detection level can also be specified.

1-3-50
Editing a Power System Diagram
Decoupling Element

Level

t t

t=0 t=0
(a) Positive slope (b) Negative slope

Figure 3 - 15 Calculation of the POW Time Reference

3.8 DECOUPLING ELEMENT


As discussed at the beginning of this Part (Chapter 1), Hypersim simulates a network using par-
allel tasks. One of the elements serving to separate these tasks is a transmission line.
Some network stations may consist of many elements and one single task cannot simulate all the
passive elements in the time set by the calculation step. In such cases, it is necessary to divide the
task into many parallel tasks. This is done using decoupling elements. Two of these can be found
in the drawer NETWORK--PASSIVE:
Decoupl: decoupling element replacing a reactor;
Dec_XFO: decoupling transformer replacing a transformer.
Figure 3 - 16 shows the use of a decoupling element to divide task 1 which simulates Station
P into two parallel tasks: task 1a and task 1b.

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

Use of decoupling element to divide a task in two

Figure 3 - 16 Decoupling element

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 CREATING TEXTS AND GRAPHICS


rectangle
open closed
multibyte spline spline stroke filling
text curve curve zoom color color gravity

text poly- straight line rotation stroke thickness font grid


lines and type
polygon ellipse filling pattern

Figure 4 - 1 Text and Graphics Toolbar


It is also possible to create texts and graphics (other than electric elements) using the text and
graphics tool bar shown in Figure 4 - 1. This bar is just above the workspace and the design
tools are on the left-hand side of the bar. Left click to select a tool.
The tools available are described in the following subsections:

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

Line with two


diversions
Straight
line

Bus B

Figure 4 - 2 Example of Adding Diversions to a Transmission Line.


To add a diversion:
A Select the polyline or transmission line

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.

C To end, click the middle button.

1-4-54
Graphic Handling
Creating Texts and Graphics

Note : Undo the diversion using the right button.

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

Zoom-in and zoom-out arrows

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.

4.2.2 Multiple Multiple objects can be selected in two ways:


Selection

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

4.3 CHANGING ATTRIBUTES


The text and graphics tool bar (Figure 4 - 1) also allows to define the attributes of text and graph-
ics. These are Stroke thickness and type, Stroke color, Filling pattern, Fill-
ing color, Font.

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.

4.3.1 Text Text has the following attributes:


Attributes

A Stroke color: colour of text,

B Font: type of lettering.

4.3.2 Graphic Graphics have the following attributes:


Attributes

A Stroke color: colour of lines and contours,

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.

D Filling color: colour of the filling area.

4.4 DIRECT CHANGES IN POSITION AND FORM


Direct changes in position and form require the use of menus. These changes affect all the select-
ed objects.

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 CHANGES DONE FROM THE MENUS

polyline/ rotation command


adding diversions

Figure 4 - 3 Main Menus and Graphics Toolbar


Figure 4 - 3 shows the graphics handling menus available. These are found in the main menu bar
1 and on the graphic tool bar 2 . Each main menu has submenus. To select the graphic sub-
menu, point to the main menu, press and hold the left button to display submenus, drag the pointer
to the required command and release the button.

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

Figure 4 - 4 dialog Box for Alignment


Selected objects can be aligned horizontally or vertically. To do this, select the main menu
Graphics => Align...

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.4 Vertical/ On image can be inverted using the main menus:


Horizontal
flip, Left/ Graphics => Vertical T/B: top/bottom reflection
Right flip
Graphics => Horizontal L/R: left/right reflection

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 GLOBAL OPERATIONS

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

A Make sure no object is selected;

B Using the background menu, execute a Search for a labelled object.


The diagram will be repositioned to show the discovered object in the middle of the visible part
and the object will automatically be selected.

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

4.7 HANDLING A DIAGRAM FILE

Figure 4 - 5 dialog Box for the Menu File=>Open


The menu File on the main menu bar allows executing different operations on the diagrams:
Menu File=>New: create a new diagram.
Menu File=>Open...: load a diagram saved in a file. The dialog box in Figure 4 - 5 is dis-
played to allow to choose the required file. The Filter only allows listing the files with
this suffix.
Menu File=>Save: save a diagram in the same file used with File=>Open.
Menu File=>Save as...: save the diagram in a file chosen by the user. A dialog box sim-
ilar to that in Figure 4 - 5 allows you to define the file.
Menu File=>Revert: Ignore all changes, ignore changes made and reload the diagram
that was saved the last time. A confirmation message pops-up to let user make the choice to
do it or not.
Menu File=>Library management: Management of model libraries. Details are pre-
sented in Chapter 8.

1-4-61
Graphic Handling
Handling a Diagram File

Figure 4 - 6 dialog Box for the Menu File=>Print


Menu File=>Page...: Define the size of the page. The page is limited by a rectangle bor-
dering the diagram. To display the latter, it may be necessary to reduce the zoom using the
Zoom button or arrows. This command does not control the type of paper in the printer.
Menu File=>Print...: Print the diagram on a printer or to a PostScript file. The dialog
box in Figure 4 - 6 allows to select the printer / file and to define the print command or the
PostScript file.
Menu File=>Import...: Add to the current diagram another diagram kept in a file. A dia-
log box similar to that in Figure 4 - 5 allows you to define the file of the diagram to import.
Menu File=>Quit: quit the current Hypersim session.

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.

5.2 CONTROL BLOCKS

Block label
Connector label

Connection (single)
Single connector

3
4

1 2

Multiplexed connector
4
3

1
2

Connection
(multiplexed)

Figure 5 - 1 Control Blocks - Terms Used and Interconnections

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

for all blocks shown in the main diagram,


for all blocks at a same level of a sub-system.
For example, in Figure 5 - 1, all blocks shown must have different label, but sub-system SubSys1
can have a block of the same label with a bloc inside subsystem SubSys2. Hypersim warns the
user if there is an illegal duplicate. The block label can be modified by selecting the block and the
background menu to execute Edit label.
2 Connector: A connector can be single or multiplexed. A single connector is represented as an
empty arrow, it has only one pin and carries only one signal. A multiplexed connector, repre-
sented as a solid arrow, has many pins and carry as much signals as the number of pins. In term
of direction, there are input connector and output connector.
3 Connector Label: Connector identifier. It cannot be modified by the user.

4 Signal: A signal is a variable (varying with time) generated by each pin of the output 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

Figure 5 - 2 Example of signal labels of a connector


and their corresponding signals

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

5.3 INTERCONNECTING BLOCKS


Figure 5 - 1 also shows how to interconnect blocks. Start the connection by left clicking on an
output connector (point 1), move the mouse, left click at each change of direction (points 2 and
3). Finally point at the input destination connector and right click. If all two connectors (input and
output) are single, the work is done. If at least one connector is multiplexed, then user has to de-
fine which signal is connected to which other one, this is done through a pop-up window shown
in Figure 5 - 3:

Figure 5 - 3 Dialog box allowing to make a connection


involving multiplexed connectors

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.4 BLOCK PARAMETERS


As is the case for power system elements (see Section 3.4.4), control blocks have parameters
which can be defined using the background menu and the command Edit parameters. A win-
dow of parameter form is displayed to allow to make the necessary changes. The description of
the block functionality is also found in this window.
Using the same procedures described for the power system elements, it is also possible to:
Copy the parameters of a block to a second block of the same type.
Show the parameters next to the block.

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

5.6 CREATING SUBSYSTEMS BEFORE USING THEM

(a) Subsystem use.

Same label
Same label

Multiplexed
input port

Single
input ports

Multiplexed
(b) Subsystem detailed Output port
diagram

Power
terminal

Figure 5 - 4 Subsystem use and detailed diagram

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.

5.6.1 Creating To create an input port, output port:


Control
Ports Open the drawer SYSTEM--TOOLS, choose one of the icons InPort or OutPort.

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

Figure 5 - 5 dialog box to Define the Order of Subsystem Connectors

1-5-70
Editing Control System
Creating subsystem from a selected part

5.7 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)

Figure 5 - 6 Creating a subsystem from an existing diagram

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,...

5.8 EDITING IN THE SUBSYSTEM CONTENT WINDOW


The subsystem content, which is in a separate window popped-up after executing the background
menu Subsystem content, can be graphically edited during the Editing mode. But there are two
different situations:
A subsystem created from a selected part of the current diagram is editable without any
command.

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 SUBSYSTEM IN SIMULATION MODE


In Simulation mode, it is possible to open/close the subsystem content window, install sensors and
modify the parameters of blocks and elements within the subsystem.

5.9.1 Opening / To open the subsystem content in Simulation mode:


Closing
subsystem Point to the subsystem label;
content Double-click on it or press and hold the right button to display the menu and execute the
command Subsystem content.
The content window allows to install sensors and modify block and element parameters.
To close this window, execute the command File=>Close subsystem on the menu bar.

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

5.10 BLOC ARRAY

Create
bloc array

(a) (b)
Subsystem
content

(c)

(a) Block to be used to create a block array


(b) Block array created, same form as original bloc but shaded
(c) Content of the block array

Figure 5 - 7 Creating a block array and showing its content

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

THIS PAGE IS INTENTIONALLY LEFT BLANK

1-5-74

Chapter 6.
INTERCONNECTING CONTROL BLOCKS AND
POWER SYSTEM ELEMENTS

Filter

Figure 6 - 1 Interconnections of Control Blocks and Power System Elements


It is possible to simulate a diagram consisting of control blocks, power system elements or a
combination of both. There are two possibilities allowing to interconnect control blocks and
power system elements:
Using elements with built-in control connectors.
Connection via elements sensor signals

6.1 INTERCONNECTING BUILT-IN CONTROL


CONNECTORS TO CONTROL BLOCKS
Many elements have both power connectors and built-in control connectors. Such elements
allow interconnecting control blocks to the power system network.

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

MesV: single-phase voltage sensor;


MesI3: three-phase current sensor;
MesV3: three-phase voltage sensor.

6.2 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.

Figure 6 - 2 Interconnection example

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.

6.3 TRANSCEIVER BLOCKS

Line
Station A Station B

Transceiver

Decpl
Station A Station A
Part 1 Part 2
Transceiver

Transmission of control signal between two tasks sent by a transceiver block

Figure 6 - 3 Transceiver Block

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.

7.1 MONITORS IN THE PARAMETER FORMS OF ELEMENT OR CONTROL BLOCKK


Some models has already monitors created in their parameter form. This is the case of fixed
voltage source (SrcV), hydraulic machine (MacHydro), thermal machine (MacTherm), etc.
As an example, the parameter form of the hydraulic machine is shown in Fig. 7 - 1 with its
monitors. During the simulation, user can observe the changing of the monitored values if the
parameter form is opened.

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 MONITORS INSIDE THE NETWORK DIAGRAM


Monitors are added into the network diagram in Editing mode, but signals are only available if at
least the Simulation mode has been activated once. Therefore, before adding monitors, go to
Simulation mode and go back to Editing mode.

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

Scalar form Digital form

Figure 7 - 2 Dialog box for monitor creation and monitor forms.


In the dialog box above, user defines the following parameters:
Result name: name of the monitored value, more details on this will be described later.
Form of the monitor which can be Scalar (simple text string) or Digital (value shown in a
digital-display-like box). These two forms are also shown in Fig.7 - 2,
Show value and unit only: If this is checked, only the monitored Value and its Unit are dis-
played. If it is unchecked, the Title is also displayed.
Alignment which can be Floating with network component (if the associated network ele-
ment or control block is moved, the monitor is also moved with it to preserve the relative
position between them) or Fixed in the network diagram window (the monitor is not moved
with the component, but it can be moved independently).
The lower part of the dialog box shows the list of monitors already in the parameter form of the
selected network element or control blockk and those previously created for this element or
blockk.

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.

a) Characteristics of a monitor already


existing in the parameter form b) Characteristics of a newly created monitor

Figure 7 - 3 dialog boxes allowing to define the monitor characteristics


If the user wants to create a new monitor associated with the selected network element or control
block, type in the Result name in the dialog box in Fig. 7 - 2. Make sure that this same name does
not exist already, then click OK. The dialog box shown in Fig. 7 - 3b will pop up allowing to enter
parameters for the new monitor:
Title: Title that will be written on the monitor (see Fig. 7 - 2). Title does not need to be
unique, like Result name.
Expression: mathematical expression producing the value to be displayed in the monitor.
User can type directly the expression or use the button ...
to bring up the Expression
Editor described below.
Result type: the monitored values are calculated with the above expression using samples in
the data acquisition window defined in HyperView (described later). The result of the calcu-
lation can be RMS, AVG, MIN, MAX, First, Last which mean respectively the r.m.s. value,
average value, maximum, minimum, First or Last value in the data acquisition window.
Units: measurement units of value displayed in the monitor (see Fig. 7 - 2).

1-7-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 EXPRESSION EDITOR


Expression editor is a user-friendly tool allowing to write the monitors expression using available
signals and built-in functions. The following conditions are required in order to be able of using
the Expression editor:
HyperView must be active, if it is not, click the button Hyperview in the upper part of
Hypersim window. HyperView window must also be opened and not minimized in the tray.
The Expression Editor can be used either in Hypersims Editing mode or in Simulation
mode, but it needs to know all the network signals. Therefore, if Hypersim is currently in
Editing mode, go briefly to the Simulation mode then back to Editing mode to allow Hyper-
sim to build up the list of signals.

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.

Figure 7 - 5 Expression editor dialog box

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

Figure 7 - 6 Expression Editor with Advanced functions


Category: Functions are grouped into categories to make the selection easier. Category
shows the current selection. User chooses the category by using the dropped-down list.
Function name: Current function selected from the Category. Again, use the dropped-down
list to make the selection.

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.

This section varies depending of the function arguments.


The Add button will add the function with its defined arguments into the
Expression field.
The Close button closes the Advanced function section.

7.4 MONITORS OPERATIONS


Control of monitor operations is done mostly with HyperView. Some controls are also available
inside the Hypersim network diagram.
To see the evolution of monitored values, the simulation must be started. Fig. 7 - 7 shows a net-
work with its monitors together with HyperView with the Monitoring tab opened.

Start monitoring
Stop monitoring
Show a scope for each selected monitor
Show a multi-signal scope for selected
monitors
Edit the selected monitor properties

a) Simulated network and its monitors


Monitors display area

b) HyperView with its Monitoring tab

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

Multi-signal b) Plot initiated with Show Scope


plot command in Hypersim

a) Plots initiated from HyperView

Figure 7 - 8 Plots of monitored values

1-7-88

Chapter 8
CUSTOMIZING HYPERSIM

8.1 CUSTOMIZING HYPERSIM


Hypersim can be customized to the users requirements in several ways using the Proper-
ties menu;

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:

Figure 8 - 1 Dialog Box of Menu: Properties=>Directory

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.

To save the codes generated for a simulation.


EMTP directory.

The data exchange with EMTP is described in Part 4. The EMTP files are
kept in this directory.
Diagrams directory.

To keep the network diagrams of the user.


System library directory.

Directory of library containing Hypersims base models. This directory is set


by Hypersim installation and is not recommended for non advanced users to
change its settings.
Site library directory.

Directory of library containing site models (see Section 8.2)


User library directory.

Directory of library containing user models (see Section 8.2)


Sensor configurations directory.

To keep the sensors configurations.


Subsystems directory.

To keep the super-blocks and super-models of the user.


User code blocks 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.

Figure 8 - 2 Dialog Box of Menu: Properties=>Files


3 File Menu. This menu opens the dialog box in Figure 8 - 2 and allows to define the default suf-
fixes for files of diagrams, parameter forms and sensor configurations. The user just has to specify
the filename and Hypersim will automatically add the suffix. These parameters can also be saved
in the file
~/HYPERSIM/Hypersim.res
to be used 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

setenv LC_ALL fr_CA

Hypersim will operate in French.

1-8-91
Customizing Hypersim
Library Management

Language information can be displayed by typing:


locale
in a Unix, Linux window. The system will then display:
LANG=fr_CA
LC_COLLATE=fr_CA
LC_NUMERIC=fr_CA
LC_TIME=fr_CA
LC_COLLATE=fr_CA
LC_MONETARY=fr_CA
LC_MESSAGES=fr_CA
LC_ALL=fr_CA

8.2 LIBRARY MANAGEMENT


Hypersim has its base model library including power elements and control blocks. Beside the base
models, other models can be added:
Site models: those are particular for an installation site and available for users on this site.
They can be delivered in Hypersim package or developed by the site users and then
archived in the library to share with all users in the same site.
User models: They are developed by users and archived in the user library located in his
private directory.
All models are organized as different categories and kept in separate drawers as shown in Figure
8 - 3. In this figure, there is only one drawer for site models and one for user models but Hypersim
can accept more than one for each. For instance, all site or user models can be divided into many
categories and each one is kept in a separate drawer. Drawers of base models are marked with a
red rectangle, those of site models with a blue circle and those of user models with a yellow tri-
angle.
Once a model is in the library, inserting it in a diagram is done as with any base model: open the
appropriate drawer, click on the models icon, then click on the desired location of the diagram,
the model will appear at this location.
Users can only add models to site library and user library. These models are limited in the follow-
ing types:
models built using subsystems,
models built with SimulinkTM,
user code block (UCB) models.

1-8-92
Customizing Hypersim
Library Management

Figure 8 - 3 Drawers of different categories of models

8.2.1 Library
Directories

Figure 8 - 4 Dialog allowing to define various 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

Properties -> Directories...


on the top menu bar of Hypersim. This will bring up the dialog box shown in Figure 8 - 4 allowing
definition of various directories including those for Site Library and User Library. Full path name
is required.
It is also worth mentioning that the following directories where users models are normally devel-
oped before being incorporated into either User Library or Site Library: Subsystem directory,
User code block directory and Simulink block directory.

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 Add / Update Model Previously Saved in a File. To do this:

Figure 8 - 5 Dialog to add a model to the library from a


subsystem previously saved in a file

1-8-94
Customizing Hypersim
Library Management

make sure that there is no object selected in the current diagram,


execute the menu
File->Library management->Add/Update model.
The dialog box shown in Figure 8 - 5 appears to allow entering necessary information:
Family. End users can actually add only models built with Subsystem, UCB or Hy-
perlink. Network element and Control block are Hypersim base models.
The model built from a subsystem is described in detail here. Models from
UCB and HyperLink will be presented later in this chapter.
Category. Choose Site for site library, User for user library.
Drawer. Define the drawer where the model will be added to. Click on Browse... to
select an existing drawer from a list or type in a drawer name. If the given
drawer doesnt exist, it will be created.
Model name. Type the new models name or click on Browse... and select an existing
name from a list. Model name must be composed of alphanumeric characters
only.
Model diagram file.

File containing the detailed diagram of the subsystem corresponding to the


model to be added/updated in library. The file name can be typed (full path
is required) or selected from the list given by clicking on Browse...
Model ID number. not used here (used only for network elements and control blocks).

Graphic
tools bar

Figure 8 - 6 Drawing of a models icon

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.

Not used for model built from a subsystem.


Build...Model icon.

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.

Not used for model built from a subsystem.


Cancel, OK. Click Cancel to ignore every thing and close the dialog. OK to terminate. If
OK is chosen, the following message
File XXX
must be MOVED or COPIED to
YYY
lets users choose between moving or copying the detailed subsystem file into
the library directory.
Now, the procedure of adding / updating the model in the library is completed. Open the appro-
priate drawer, one can see the icon of the new or updated model in it. Click on this icon to select
it, then click on a location in the diagram; the model will appear and usable as any other model.
2 Add / Update Model with a Subsystem selected. If a subsystem exists in the current work-
ing diagram, we can add the model of this subsystem to the library by the following way:

1-8-96
Customizing Hypersim
Library Management

Figure 8 - 7 Dialog to add/update the library with the model of a selected


subsystem

In the Editing mode, select the subsystem in the diagram,


Execute the menu
File->Library management->Add/Update model
The dialog shown in Figure 8 - 7 appears. It is lightly different from the dialog of Figure 8 - 5
because some informations related to the selected subsystem are automatically defined and need
not to be entered.
3 Disable link, Restore link. When a subsystem model is taken from the library and inserted into
a diagram, users can display its graphic content by executing the command Subsystem content.
This graphic content cannot be modified by default (except the components parameters).
To modify locally (for the current diagram only and not in the library), user goes to the Editing
mode, selects the subsystem and issues the command Disable link. This command remove the link
between this particular subsystem and the one in the library. A star (*) appears beside the subsys-
tem label to indicate that it is not linked any more to the library. The user can then freely edit this
content without affecting the library and other subsystems of the same model.
After modifications, one can reconnect the selected subsystem to the library by using the Restore
link command. A pop-up message will ask the user to select:
Ignore change: ignore any modification and go back to the library model.

1-8-97
Customizing Hypersim
Library Management

Update file: update the library model with the modifications.


When the link is restored, the star (*) will be removed from the subsystems label.
When a model in the library has been modified using Restore link, to make sure that the current
network uses the latest modifications, the user needs to reread the current network file (us-
ing File->Open). The file reading updates automatically all subsystems taken from the library in
the diagram.

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)

Build...Model Parameter form.

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.

Give the Simulink file (with extension.mdl).

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

To add an entry in the parameter form, user processes as follows:


select the desired type from the side bar,
click in the window, a parameter entry appears with default informations,
with the parameter entry selected, execute the background menu Edit parameters, this will
bring up the dialog shown in Figure 8 - 8b to define the following informations:
- Label: parameter name,
- Default value: default value,
- Unit: measurement unit,
- Identifier: integer number used to identify the parameter. Parameters name and identifier
are obtained using the command formpar of the UCB utility.
- Minimum, Maximum: allowable range of the parameter. Hypersim will check if the
parameter falls inside this range and warn otherwise. By giving 0.0 to these items,
Hypersim will skip this verification.
- Visibility: the parameter can be always shown (Always), always hidden (Never) or shown
only for advanced user of Hypersim (Never for beginner).

1-8-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

Figure 9 - 1 Overview of Hypersim Graphic Interface in Simulation Mode


Once a diagram is built, the Simulation mode can be activated by clicking the Simulation
button specified by 2 in Figure 9 - 1. Hypersim then goes into simulation and control mode,
but the actual simulation does not start automatically.
Hypersim quits the Editing mode and analyses the diagram. It warns the user of any mistake.
Some of these can be fatal and force the user to go back to the Editing mode to make correc-
tions.
If there is no mistake, the user can then:
Install sensors to observe the results of the simulation using Spectrum or Scopeview;
Define the general parameters of the simulation;

1-9-101
Simulation and Control
Sensors, Input/Output and Sensor Configuration

Operate the disconnecting switches of the power system elements;


Start/stop the simulation;
Initiate programmed operations and observe the waveforms in Spectrum or Scopeview;
Change the model parameters.
In Simulation mode, the main menus are reduced. The background menus are different from those
in Edition mode. To display the background menu, point to a blank area of the diagram and press
and hold the right button. However, if the pointer is next to an element, the menu related to the
latter will be displayed.
In Simulation mode, it is not possible to select an object in a diagram.
Note that 1 allows to specify 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]).

9.1 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

Figure 9 - 2 Example of a List of Signals and Sensors


The sensor control panel consists of columns with the following information:
Signal. Generic name of the signal; cannot be changed.
Description. The generic name is repeated here by default. The user can change it.
Unit and Base. The default values are the following: Unit for voltages is V, Unit for cur-
rents is A and the conversion Base is 1.0. Other units can be used by chang-
ing the conversion base. Example: Unit = kV, Base = 1000.
Input/Output. The signals can be connected to external equipment via digital or analog in-
put/output. To do this, the user must define:
Type. DA (analog output), AD (analog input), DO (digital output), DI (digital input).
No. Channel number of the input/output
Unit/Volt. The number of units of the signal corresponding to one Volt of the analog
input/output.

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.

Database used to save the waveforms (no details in this document)


There are three buttons at the bottom of the control (Figure 9 - 2):
Cancel. Ignore the changes and close the panel.
Apply. Confirm the changes and keep the panel open.
OK. Confirm the changes and close the panel.
When sensors are installed, an oscilloscope symbol will be displayed next to the element label.

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

9.2 SIMULATION PARAMETERS

Figure 9 - 3 Dialog Box Used to Define 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.

Before simulation, Hypersim generates a code C specific to each network.


This parameter is used to define the directory where the code is saved.
Performance. This parameter serves as a slowing down factor in real-time. For example, if
the user observes a sine wave on an real oscilloscope, its period will be
performance * real period.
. This is like playing a video in slow motion.
With Performance > 1, the time allocated for each time-step will be
(Performance * real time-step), the CPUs have therefore more time and
more tasks will be packed in each CPU.
In off-line simulation (non real-time mode) with single CPU, Hypersim still
emulates the real-time mode, a large number for Performance could be
required to enable the simulation.

1-9-105
Simulation and Control
State of Disconnecting Switches

Calculation Step.

Specified in seconds. Hypersim uses this parameter to set the simulation


equations. However, in real-time mode, waveform execution is altered by
Performance. The execution is in real-time if Performance = 1, faster
than real-time if Performance < 1, slower if Performance > 1.
Simulation Type.

There are two choices: Real-time or Off-line (or non real-time


mode).
Simulation server.

Computer executing the simulation.


Compiling server. The simulation can be executed by a remote computer that is not neces-
sarily the same type as the one executing Hypersim. The compiling server is
the computer that will compile the code generated used to simulate the net-
work. The server must be of the same type as the one executing the simula-
tion.
Node Type. Type of equipment (computer) used to simulate in real-time. Hypersim cur-
rently supports the following hardware: DECalpha 300, 500 and 533MHz,
SGI parallel computer and the PC cluster.

9.3 STATE OF DISCONNECTING SWITCHES

Operated disconnecting switches

Change in appearance after


operating the specified disconnecting switches

Figure 9 - 4 Operating Disconnecting Switches

1-9-106
Simulation and Control
Network Analysis, Task Distribution, Code Generation and Simulation

The disconnecting switches allow to include or exclude specific elements in a simulation. If an


element is excluded, it does not exist in the simulation. Hence, its signals cannot be observed.
To operate a disconnecting switch, left click the switch icon of the required element. The latter
will change from solid (included) to dotted (excluded) or vice versa, depending on its previous
state.(See Figure 9 - 4).
Disconnecting switches can only be operated when the simulation is stopped or has not been start-
ed. Operating disconnecting switches allows to study the impact of certain elements (present or
absent) in a network.

9.4 NETWORK ANALYSIS, TASK DISTRIBUTION,


CODE GENERATION AND SIMULATION
The background menu allows executing these commands in the following order:
Network Analysis: topological analysis of the network;
Map tasks: distribute tasks to parallel processors;
Generate code: generate the simulation code for the current network;
Simulate network: execute the simulation.
The details of these steps can be found in this Chapter and in Part 1, Chapter 1. For any given
command, Hypersim automatically executes, if necessary, the preceding steps. Hence, if Simu-
late network is asked, Hypersim also executes Network Analysis, Map tasks and Gen-
erate code, if required.

In practice, the user can:


In Editing mode, edit the network or read a diagram located in a file;
Switch to Simulation mode, install sensors or read a sensor configuration from a file,
Execute the command Simulate the network,
Execute the transient operations and display the waveforms using Spectrum or Scopeview.
The intermediate steps are only executed to detect the causes of abnormal conditions.
The background menu also allows to Stop the simulation.

9.5 CHANGING PARAMETERS OF ELEMENTS AND BLOCKS


To change the parameters of an element or a block in Simulation mode:
Point to the element or block label;
Press and hold the right button to display a menu and execute:
Edit parameters. The parameter panel is then displayed or double click the left button
on the element;
Make the required changes, click Apply or Close on the panel.

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.

10.2 INTRODUCTION TO HYPERVIEW

(a)

(b)

Figure 10 - 1 (a) HyperView activation button in Hypersims main window.


Figure 10 - 2 (b) HyperView initial panel.

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

Stop the simulation


. Stop the simulation.
Pause/Continue the simulation.

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

Start the simulation


Stop the simulation
Pause/Continue the simulation
Take a snap-shot of the current simulation
Save the current snap-shot of the simulation
Load the current snap-shot in the simulation
Load a snap-shot file in the simulation

Figure 10 - 3 Snapshot commands and parameters in HyperView window


Load a snap-shot file in the simulation.
Load the snapshot buffer with data from a file, restart the simulation with this
buffer as initial conditions.

1-10-112
Setting initial conditions
Load-Flow

Pause simulation Continue simulation

Figure 10 - 4 Pause and Continue the simulation

The snapshot operations need the two following parameters:


Filename. Complete path and name of the file served to load and save the snapshot buff-
er.
Delay. Delay in seconds before taking the snapshot. If this delay is 0, the snapshot
will be taken as soon as the simulation receives the snap command, this is
normally used to store the steady-state conditions. If the delay is positive, the
snapshot will be taken with a delay counted from the POW detection.
Note that the POW detection is enabled from Spectrum (by clicking on Ac-
quisition) or from ScopeView (by clicking on Plot Signals). When
the POW is detected, it initiates the transients operations (switching of circuit
breakers for example) as well as the data acquisition. By setting Delay to a
positive value, the user can take a snapshot during the transient conditions.

10.4 LOAD-FLOW

10.4.1 Description The Load-flow calculation of a network is also accessible from HyperView. This tool calculates:
Powers (active and reactive) of all machines,
Internal voltages (amplitudes and angles) of all machines,
Voltages (amplitudes and angles) of all buses.
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)

A Base voltages of all buses

B Load-flow parameters section


of all machines

(b)

Figure 10 - 5 : Network data needed to calculate the Load-Flow.


The user can also select buses one by one to enter their base voltage using the Edit base volt-
age menu .

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

Figure 10 - 6 Information under Load Flow tab in HyperView panel.

1-10-115
Setting initial conditions
Load-Flow

Enter load-flow parameters in section 1 of Figure 10 - 1 which includes:


Frequency: base frequency in Hz,
Power Base: base power in MVA,
Max Iteration: maximum number of iterations allowed,
Tolerance PQ: tolerance in MW or MVAR used to stop the iteration process.
Click Apply 7 to make these parameters effective.

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

Click on Update forms 3 to modify machines parameters corresponding to their inter-


nal voltages (amplitudes and angles) accordingly to results calculated by the load-flow.
This operation is optional to make machines parameters reflect their conditions determined
by the load-flow. It is however not sufficient to initialize the whole network with the state
established by the load-flow.

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.

Bus3ph: Three-phase bus.

BusMono: Single-phase bus.

BusMpx: Multiplex Bus.

Connex: Connection (for Hypersim administrator only).

SimulCtr: Simulink block with control connectors.

SimulNet: Simulink block without control connectors.

UserBloc: User code block.


SubSyst: Subsystem.

InPort, OutPort: Control input and output connector of subsystems


ExtConn: Power external connector of subsystems.

11.2 NETWORKSOURCES AND MACHINES


SrcV: Fixed voltage source.

SrcProg: Programmable voltage source (variable with time).

SrcI: Fixed current source.

SrcIPrg: Programmable current source (variable with time).

Hydro: Hydraulic synchronous machine.

HydCmd: Modular hydraulic synchronous machine (reprogrammable).

Therm: Thermal synchronous machine.

ThermCmd: Tandem-compound steam turbine generator

1-11-117
List of Tools and Models
NetworkPassive

CrossCmpd: Modular Cross-compound steam turbine generator.

AmpV: Controlled single-phase voltage source.

AmpV3: Controlled three-phase voltage source.

AmpI: Controlled single-phase current source.

AmpI3: Controlled three-phase current source.

11.3 NETWORKPASSIVE
Ground: Ground connection

R: Series resistor.

L: Series reactor.

C: Series capacitor.

R_Shunt: Shunt resistor.

L_Shunt: Shunt reactor.

C_Shunt: Shunt capacitor.

RL: Series resistor and reactor.

RC: Series resistor and capacitor.

LC: Series reactor and capacitor.

RLC: Series resistor, reactor and capacitor.

RL_Shunt: Shunt resistor and reactor.

RC_Shunt: Shunt resistor and capacitor.

LC_Shunt: Shunt reactor and capacitor.

RLC_Shunt: Shunt resistor, reactor and capacitor.

Mutual: Mutually coupled inductor elements.

RnLinSh: Non-linear shunt resistor. Used normally to simulate ZnO surge arrester.

RnLin: Non-linear series resistor. Used normally to simulate ZnO surge arrester.

Decoupl: Decoupling element (parallelism of tasks).

Dec_XFO: Transformer with decoupling element.

CType: Shunt C type filter.

FiltreDmp: Shunt double damped filter.

FiltRLC: General filter (3 parallel RLC branches in series), shunt

HP: Shunt high-pass filter.

1-11-118
List of Tools and Models
NetworkLines

RLCsp: Series-parallel RLC filter, shunt connection.

CType_ser: series C type filter.


DDmp_ser: series double damped filter.
Gen_ser: Series general RLC filter.
HP_ser: Series high-pass filter
RLCsp_ser: Series-parallel RLC filter, series connection.

11.4 NETWORKLINES
Single: Frequency Constant distributed parameters simple line.

SglFault: Frequency Constant distributed parameters simple line with fault.

Coupled: Frequency Constant distributed parameters coupled double circuit line.

CplFault: Frequency Constant distributed parameters coupled double circuit line with fault.

9phases: Frequency Constant distributed parameters coupled line, 9 phases.

12phases: Frequency Constant distributed parameters coupled line, 12 phases.

Pi: Pi section.

Pi-Flt: Pi section with fault.

Pi-Cpl: Double coupled Pi sections.

PiCplFlt: Double coupled Pi sections with fault.

Pi-9ph: Triple coupled Pi sections.

Pi-12ph: Quadruple coupled Pi sections.

Pi12phFlt: Quadruple coupled Pi sections with fault.

DCcable: DC cable.

Marti: 3 phase Marti line with three-phase connectors.

Marti2P: 2 phase Marti line (for DC network).

Marti3P: 3 phase Marti line with single-phase connectors.

Marti4P: 4 phase Marti line with single-phase connectors.

CplFault (with S symbol on its icon): Frequency Constant distributed parameters coupled line
with fault at different points on different circuits. The model is built using subsystem concept,
user can open the subsystem content to see its details.
12phFault: Frequency constant distributed parameters coupled quadruple line with fault at 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

Sat2: Saturable transformer, 2 windings.

Lin21: Linear transformer, 2 windings with internal tertiary.

Sat21: Saturable transformer, 2 windings with internal tertiary.

Lin2Ser: Linear transformer, 2 windings, series connection primary

SatSer: Saturable transformer, 2 windings, series connection primary

Lin3: Linear transformer, 3 windings.

Sat3: Saturable transformer, 3 windings.

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.

Sat3Tap: Saturable transformer with tap changer, 3 windings.

LinSer: Linear series-series transformer, 2 windings.

Lin2Mono: Single-phase linear transformer, 2 windings.

Sat2Mono: Single-phase saturable transformer, 2 windings.

Sat3Mono: Single-phase saturable transformer, 3 windings.

Zig-Zag: Phase-shift transformer.

CVT: Voltage transformer with capacitive coupling.

CT: Current transformer.

PT: Voltage transformer with magnetic coupling.

11.6 NETWORKLOADS AND MOTORS


DynLd: Dynamic load.

HarmLd: Programmable Non-linear load with random active and reactive power and harmonic
current.
ArcFurn: Arc furnace.

DCMot: Direct current motor.

IndMot: Induction motor.

11.7 NETWORKCONTROLLERS AND SWITCHES


Inv_12: Inverter and DC control, 12 pulses.

Rect_12: Rectifier and DC control, 12 pulses.

Inv_6: Inverter and DC control, 6 pulses.

Rec_6: Rectifier and DC control, 6 pulses.

1-11-120
List of Tools and Models
NetworkMiscellaneous

SVC: Static compensator.

TSC: RLC branch switched with thyristors.

TCR: RL branch controlled with thyristor.

BrShunt: Fault circuit breaker.

BrSerial: Series breaker.

BrShMulti: Shunt circuit breaker, phase by phase operable.

BrSrMulti: Series breaker, phase by phase operable.

BrShMono: Single-phase shunt breaker.

BrSerMono: Single-phase series breaker.

Switch: Switch (breaker or electronic switch)

SwMono: Single-phase switch (breaker or electronic switch).

Br2LMono: Triple H-bridge converter, single phase


Br3Level: Three-level bridge.

11.8 NETWORKMISCELLANEOUS
Mes_Freq: Frequency measuring unit.

Digital_Out: Digital output.

ConfSw: Disconnecting switch.

A/D: Analog input.

D/D: Digital input

MesI: Single-phase current sensor.

MesV: Single-phase voltage sensor.

MesI3: Three-phase current sensor.

MesV3: Three-phase voltage sensor.

11.9 CONTROL MATH AND FUNCTIONS


Sum_2: 2 input adder with gain.

Sum_3: 3 input adder with gain.

Sum_4: 4 input adder with gain.

X: 2 input multiplier.

/: Divider.

Abs: Calculation of absolute value.

1-11-121
List of Tools and Models
Control Logic

gain: Gain block.

Sin: Calculation of sinus.

Cos: Calculation of cosines.

Tan: Calculation of tangent.

ArcCos: Calculation of arc-cosines.

ArcSin: Calculation of arc-sinus.

ArcTan: Calculation of arc-tangent.

10^n: Calculation of 10n

e^n: Calculation of en.

log10: Calculation of base 10 log.

logn: Calculation of natural log.

MathFct: Calculation module of miscellaneous mathematical functions.

Module: Modulus calculation.


Sqrt: Calculation of square root.

H(s): S transfer function.

H(z): Z transfer function.

H(s)dyn: S transfer function with dynamic limits.

H(s)lim: S transfer function with internal limits


H(s)limR: S transfer function with internal limits, reset and initial conditions.

WindAverg: Averaging data in a sliding window.

11.10 CONTROL LOGIC


And2: AND gate.

Nand2: NAND gate.

Or2: OR gate.

Nor2: NOR gate.

Xor2: EXCLUSIVE OR gate.

Nor2: EXCLUSIVE NOR gate.

Not: Logical inverter.

Compare: Two input comparator.

CmpDlay: Comparator with delay.

1-11-122
List of Tools and Models
Control Non-Linear and Delay

CmpLevel: Level comparator (compare input with a fixed level).

Counter: Counter.

DlyOn: Delay on an ON signal.

EdgeDwn: Falling slope detector.

EdgeUp: Rising slope detector.

ZoneDet: Zone detector.

Pack12: Multiplexer, 12 logical inputs.

Pack6: Multiplexer, 6 logical inputs.

11.11 CONTROL NON-LINEAR AND DELAY


Lim: Limiter with fixed limits.

Max2: Maximum of 2 inputs.

Max3: Maximum of 3 inputs.

Max4: Maximum of 4 inputs.

Min2: Minimum of 2 inputs.

Min3: Minimum of 3 inputs.

Min4: Minimum of 4 inputs.

Delay: Analog delay circuit.

NonLin: Non-linear gain

SinPrg: Sinus with amplitude, frequency and phase inputs (AM-FM-PM modulator).

RampDn: Falling ramp.

RampUp: Rising ramp.

RateLim: Variation speed limiter.

MUX2: Analog multiplexer, 2 inputs

DeadZone: Dead band.

Buffer: Buffer with hysteresis.

StepDly: One calculation step delay.

PWM: Pulse width modulator.

Sample: Sampler.

SmoothFlip: smooth flipper (flip smoothly from one input to the other).

1-11-123
List of Tools and Models
Control Sources

11.12 CONTROL SOURCES


ConstF: Floating point constant.

ConstI: Fixed point constant.

Rand: Random number generator.

Pulses: Pulse train generator.

Square: Square wave generator.

Triang: Triangular wave generator.

Sin: Sinusoidal wave generator.

SinAng: Sinusoidal wave generator with output for angle.

timeStep: Calculation step output.

11.13 CONTROL MISCELLANEOUS


dq_abc: Park transformation (dq -> abc).

abc_dq: Inverse Park transformation (abc -> dq).

F_to_I: Floating point to fixed point conversion.

I_to_F: Fixed point to floating point conversion.

IniVal: Initial value and its duration of a variable.

StateVar: State variable system.

TrcverF: Floating point transceiver.

TrcverI: Fixed point transceiver.

Freq3ph: Frequency measurement of 3 phase signal.


PlayBack: Waveform play back system.

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.

12.1 MAIN MENUS

1 File=>New (4.7, page 61). Create a new diagram

2 File=>Open (4.7, page 61). Load a diagram saved un a file

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

11 Edit=>Undo (4.6.2, page 60). Cancel the last operation

12 Edit=>Restore (4.6.2, page 60). Restore the cancelled operation.

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.

25 Graphics=>Align (4.5.3, page 58). Align horizontally/vertically the selected objects.

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.

28 Graphics=>Rotate CW (4.5.5, page 59). Rotate clockwise 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.

43 Help. Display this Hypersim User Manual in PDF format.

44 HyperView (10.2, page 109). Activate HyperView, Hypersims central control panel.

1-12-126
Summary of Menus
Graphics Toolbar

12.2 GRAPHICS TOOLBAR

1 A (4.1.1, page 53). Add text to the diagram.

2 J (4.1.2, page 54). Add multibyte text to the diagram via a dialogue box.

3 (4.1.3, page 54). Draw a polyline form in the diagram.

4 (4.1.5, page 55). Draw a rectangle in the diagram.

5 (4.1.6, page 55). Draw a polygon.

6 (4.1.7, page 55). Draw a straight line.

7 (4.1.8, page 55). Draw an open spline curve.

8 (4.1.9, page 55). Draw an ellipse (or a circle).

9 (4.1.10, page 55). Draw a closed spline curve.

10 (4.1.12, page 56). Rotate an object.

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 BACKGROUND MENU, EDITING MODE

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.

2 Restore (4.6.2, page 60). Restore the cancelled operation.

3 Refresh. Redraw the diagram (to remove any scribbling).

4 Paste (4.5.7, page 59). Paste the objects that are saved on the clipboard.

5 Select All. select all the objects in the current diagram.

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 BACKGROUND MENU, SIMULATION MODE

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.

12 Show (Display) Sensors. Show the sensor symbols.

13 Preferences (9.2, page 105). Define the general parameters of the simulation.

1-12-129
Summary of Menus
Background Menu, Simulation Mode

THIS PAGE IS INTENTIONALLY LEFT BLANK

1-12-130
Part 2

Hypersim Network Models

2-1-131
THIS PAGE IS INTENTIONALLY LEFT BLANK

2-1-132

Chapter 1
HYPERSIM NETWORK MODELS

1.1 LIST OF SINGLE-PHASE AND THREE-PHASE MODELS


To access the HYPERSIM control blocks and the network models, click on the tool palette
on the left side of the main window. (See Figure 1 - 1).

Figure 1 - 1 Graphic Tools Palette

2-1-133
Hypersim Network Models
List of Single-Phase and Three-Phase Models

Figure 1 - 2 System Tools Palette

Control
Three- Single- Simulink
Network Model block
phase phase Access
access

System Tools (Figure 1 - 2)

POW POW element X


Link Connection element X X
BusMono Single-phase bus X
Bus3ph Three-phase bus X

2-1-134
Hypersim Network Models
List of Single-Phase and Three-Phase Models

BusMpx Multiplex bus X X


UserBloc User-coded block X X X
Simukink Simulink block (with I/O Control) X X X X
SimCtrl Simulink block X X
SuperBloc Super-block X X X X
Super-model X X X X
ExtConn External connection X X

Figure 1 - 3 Voltage and Current Sources


Synchronous Turbine-Generator

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

Voltage and Current Sources (Figure 1 - 3)

SrcV Voltage source X X X


V_prg Programmable voltage source X X X X
ScrI Current source X X X
ScrIprg Programmable current source X X X
SrcV3 Three-phase controlled voltage source X X
AmpI3 Three-phase controlled current source X X
AmpV Single-phase controlled voltage source X X
AmpI Single-phase controlled current source X X

Synchronous Turbine Generator (Figure 1 - 3)

Hydro Hydraulic turbine generator X


HydCmd Hydraulic turbine generator (with I/O Con- X X X
trol)
Therm Thermal turbine generator, tandem-com- X
pound
Therm- Thermal turbine generator, tandem-com- X X X
Cmd pound (with I/O Control)
CrossC- Thermal turbine generator, cross-com- X X X
mpc pound (with I/O Control)

2-1-136
Hypersim Network Models
List of Single-Phase and Three-Phase Models

Figure 1 - 4 Network Passive Elements

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

Passive Elements (Figure 1 - 4)

R-L-C Series R, L, C, RL, RC, LC, RLC ele- X X


RL-RC-LC ments (7 items)
RLC
R_Shunt Shunt R, L, C, RL, RC, LC, RLC ele- X X
L_Shunt ments (3 items)
C_Shunt
RL_Shunt
RC_Shunt
LC__Shunt
RLC_Shunt
ZNO Series ZNO arrester X X
ZNO_Shunt Shunt ZNO arrester X X
Mutual Mutual reactor X
Decoupl Uncoupling reactor X
Dec_XFO Uncoupling transformer X
RLCsp S-P RLC type passive filter X
FiltC C type passive filter X
FiltDMP Double damping type passive filter X
FiltRLC Generic passive filter X
FiltHP High-pass filter X

2-1-138
Hypersim Network Models
List of Single-Phase and Three-Phase Models

Figure 1 - 5 Network Lines and Cables

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

Lines and Cables (Figure 1 - 5)

Single Distributed parameters line, 3 phases X


SglFault Distributed parameters line with fault, 3 X
phases
Coupled Coupled distributed parameters line, 6 X
phases
CplFault Coupled distributed parameters line with X
fault, 6 phases
9phases Coupled distributed parameters line, 9 X
phases
12phases Coupled distributed parameters line, 12 X
phases
ClpFault Coupled distributed parameters line with X
fault, 6 phases (type s)
12phFlt Coupled distributed parameters line with X
fault, 12 phases (type s)
Pi PI line, 3 phases X
Pi-Flt PI line with fault, 3 phases X
Pi-Cpl Coupled PI line, 6 phases X
PiCplFlt Coupled PI line with fault, 6 phases X
Pi-9ph Coupled PI line, 9 phases X
Pi-12ph Coupled PI line, 12 phases X
Pi12phFlt Coupled PI line with fault, 12 phases X
DCcable Direct current cable (Marti line, 2 phases) X
Marti Marti line, 3 phases X
Marti2P Marti line, 2 phases X
Marti3P Marti line, 3 phases X
Marti4P Marti line, 4 phases X

2-1-140
Hypersim Network Models
List of Single-Phase and Three-Phase Models

Figure 1 - 6 Network Transformers

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

Lin2 Linear transformer, 2 windings X


Sat2 Saturable transformer, 2 windings X
Lin21 Linear transformer, 2 windings and terti- X
ary winding
Sat21 Saturable transformer, 2 windings and X
tertiary winding
Lin2Ser Saturable series transformer with ground X
connection
SatSer Linear series transformer with floating X
connection
Lin3 Linear transformer, 3 windings X
Sat3 Saturable transformer, 3 windings X
TapDecpl Transformer with tap changer for DC X
converter
Sat2Tap Saturable transformer with tap changer, 2 X
windings
Sat3Tap Saturable transformer with tap changer, 3 X
windings
LinSer Linear series transformer with ground X
connection
Lin2Mono Linear transformer, 2 windings, single- X
phase
Sat2Mono Saturable transformer, 2 windings, sin- X
gle-phase
Sat3Mono Saturable transformer, 3 windings, sin- X
gle-phase
Zig-Zag Zig-zag transformer X
CVT Voltage measuring transformer with X
capacitive coupling
CT Current measuring transformer X
PT Voltage measuring transformer with mag- X
netic coupling

2-1-142
Hypersim Network Models
List of Single-Phase and Three-Phase Models

Figure 1 - 7 Network Loads and Motors

Control
Three- Single- Simulink
Network Model block
phase phase Access
access

Loads and Motors (Figure 1 - 7)

DynLd Dynamic load X


HarmLd Programmable non linear load X
DCMot DC motor X
ArcFurn Arc furnace X

2-1-143
Hypersim Network Models
List of Single-Phase and Three-Phase Models

IndMot Three-phase induction motor X X

Figure 1 - 8 Controllers and Switches

Control
Three- Single- Simulink
Network Model block
phase phase Access
access

SVC and HVDC Controllers (Figure 1 - 8)

2-1-144
Hypersim Network Models
List of Single-Phase and Three-Phase Models

Inv_12 Inverter 12-pulse DC controller X


Rect_12 Rectifier 12-pulse controller X
Inv_6 Inverter 6-pulse DC controller X
Rec_6 Rectifier 6-pulse DC controller X
SVC SVC controller X
TSC TSC branch X
TCR TCR branch X

1 Electronic Switch and Bridge

Bridge Diode bridge X


Switch Electronic switch (2 items) X X
Switch-
Mono
BrShunt/ Ground fault breaker (2 items) X
BrShMulti
BrSerial/ Series fault breaker (2 items) X
BrSrMulti
BrShMono Monophase fault breaker X
BrSer- Monophase shunt breaker X
Mono

2-1-145
Hypersim Network Models
List of Single-Phase and Three-Phase Models

Figure 1 - 9 Miscellaneous Network Elements

Control
Three- Single- Simulink
Network Model block
phase phase Access
access

Miscellaneous Network Elements (Figure 1 - 9)

Mes_Freq Frequency measuring unit X X


Digital_out Digital output X

2-1-146
Hypersim Network Models
List of Single-Phase and Three-Phase Models

ConfSw Disconnecting element switch X


A/D Analog input acquisition element X
D/D Digital input acquisition element X
MesI Current measuring unit X
MesV Voltage measuring unit X
MesI3 Current measuring unit X
MesV3 Voltage measuring unit X

2-1-147
Hypersim Network Models
List of Single-Phase and Three-Phase Models

THIS PAGE IS INTENTIONALLY LEFT BLANK

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

Figure 2 - 1 SI units option

Figure 2 - 2 pu units option


(EQ 1)
2 3 2
= (---------------------
V 100e ) - = 100
R Base ( per phase ) = ----------------------------------------
P Base ( per phase ) 6
100e

(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

Figure 2 - 3 PQ units option


(EQ 5)
2 3 2
= (---------------------
V 100e ) - = 100
R Base ( per phase ) = ----------------------------------------
P Base ( per phase ) 6
100e

.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.3 P.U. DEFINITION


P.U.
Per Unit Quantity
Power transmission lines are operated at voltage levels where the kilovolt is the most convenient
unit to express voltage. Because of the large amount of power transmitted, kilowatts or megawatts
and kilovolt amperes or megavolt amperes are the common terms. However, these quantities as
well as amperes and ohms are often expressed as percent per unit of a base of reference value
specified for each. For instance, if a base voltage of 120 kV is chosen, voltages of 108, 120 and
126 kV become 0.90, 1.00 and 1.05 per unit or 90, 100, and 105% respectively. The per unit value
of any quantity is defined as the ratio of the quantity to its base value expressed as a decimal. The
quantity in percent is 100 times the value in per unit. Both the percent and the per unit methods
of calculation are simpler than the use of the actual, amperes, ohms, and volts. The per-unit
method has an advantage over the percent method because the product of two quantities is
expressed in per unit itself, but the product of two quantities expressed in percent must be divided
by 100 to obtain the result in percent.
Voltage, current, kilo-volt-amperes, and impedance are so related that selection of base values for
any two of them determines the base values of the remaining two. If we specified the base values
of the current and voltage, base impedance and base kilo-volt-amperes can be determined.
The base impedance is that impedance which will have a voltage drop across it equal to the base
voltage when the current flowing in the impedance is equal to the base value of the current. The
base kilo-volt-ampere in single phase systems is the product of base voltage in kilovolts and base
current in amperes. Usually base megavolt amperes and base voltage in kilovolts are the
quantities selected to specify the base. For single-phase systems or three-phase systems where
the term current refers to line current, where the term voltage refers to voltage to neutral, and
where the term kilo-volt-amperes refers to kilo-volt-ampere per phase, the following formulas
relate the various quantities:

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

5 Base power kW 1 =base kVA 1 6 Base power mW 1 =base mVA 1

7 Per unit impedanceactual impedance


of a circuit element =base impedance

2-2-153
SI or pu system units
P.U. Definition

THIS PAGE IS INTENTIONALLY LEFT BLANK

2-2-154

Chapter 3
SYSTEM TOOLS

3.1 POW SYNCHRONIZATION


A Introduction The POW unit synchronizes the data acquisition and the breaker operations. This unit uses
the phase A as a reference signal at the bus to which it is connected.
All the simulated networks must have a unique POW element. Since the synchronization sig-
nal is generated by the crossing of a voltage threshold, it is a good practice to connect the
POW element to a bus where no fault occurs.

B POW
Synchronization
Icon and Diagram

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

Figure 3 - 2 POW synchronization control panel


Figure 3 - 3 shows the synchronization trigger threshold when the slope of the POW unit and the
detection level parameters are respectively positive and 0.5 volt.

2-3-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 SINGLE AND THREE PHASE AND MULTIPLEX BUSES


A Introduction In HYPERSIM, three types of buses can be used to make network connections. These are three-
phase, single-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:
-

Figure 3 - 4 Three-phase bus icon and diagram

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

System Tools Single-Phase Bus

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:
-

Figure 3 - 5 Single-phase bus icon and diagram

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:
-

Figure 3 - 6 Multiplex bus icon and diagram

3.3 SIMULINK BLOCK, USER-CODED BLOCK


Refer to Part 4, Chapters 1 to 5 for the following elements: Simulink Block, User-Coded Block,
Super-Block and Super-Model.

3.4 SUPER-BLOCK AND SUPER-MODEL


Refer to Part 4, Chapters 1 to 5 for the following elements: Simulink Block, User-Coded Block,
Super-Block and Super-Model.

2-3-160

Chapter 4
CURRENT AND VOLTAGE SOURCES

4.1 CURRENT AND VOLTAGE SOURCES


A Introduction The current and voltage sources represent a single or three-phase AC voltage source with a
series or parallel RLC impedance. The value of at least one of the R, L and C elements must
not be zero.

B Icons and
Diagrams of
Current and
Voltage Sources

Current and Voltage Sources


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:
-

Figure 4 - 1 Icons and diagrams of current and voltage sources

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.

Voltage source behind Current source behind


a series impedance a parallel impedance

Figure 4 - 2 Sources Implementation

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.

E General RLC Connection = Series (series R, L, C) or parallel (parallel R, L, C) see Figure 4 - 2;


Parameters
SI or pu units:
SI: Specifies the values of the RLC elements, voltage, current or frequency in interna-
tional units (ohm, henry, farad, volt, ampere and hertz);
pu: Specifies the values of the RLC elements, voltage, current or frequency in pu;
Base values for conversion in pu:
Base MVA: Base power per phase in MVA;
Base volt: Base voltage phase to ground in kilovolt;
Base Freq: Base frequency in hertz;
R: Resistance value in ohms (or pu) for each phase (in order: a b c);
L: Inductance value in henry (or pu) for each phase (in order: a b c);
C: Capacitor value in farad (or pu) for each phase (in order: a b c);
Frequency: Source frequency in hertz (or pu);
Module: Peak value of the amplitude for the source voltage or current in volts (or pu) or
amperes (or pu) for each phase;
Note : For pu, you have to enter 1.4142 pu

2-4-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.

F Source Source (Active/Inactive): To activate or deactivate the source.


Control
Starting mode (Slow/Fast): If Fast, the source is immediately activated or deactivated.
Figure 4 - 5 (a) shows what happens when the source is activated in Fast mode. If Slow,
when the source is activated, the amplitude of the source increases linearly from zero to the
steady-state value. When the source is deactivate, the amplitude of the source decreases lin-
early from the steady-state value to zero. Figure 4 - 5 (b) shows the behaviour of the source
when it is activated in Slow mode.
Sequence (voltage source only: Direct/Inverse/Zero/Per phase): Allows users to set the
phases of the three-phase source as a sequence. The positive sequence sets the angles of
phases a, b, c at 0, -120, 120 degrees. The Inverse 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 angle input).

G Control (Waveform Generation)


System
Origin: Origin of the signal for the voltage source: Internal, External and Simulink
for a Simulink model.
Note : Please note that most source controls (amplitude, angle, etc.) are inoperative in exter-
nal or Simulink mode. Refer to Part 4, Chapter 1, on page 545 concerning the Simulink
models for their use with Hypersim.

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.

H Load Flow (Voltage Source Only)


Parameters
These parameters can be used for the steady-state solution of the network.

Figure 4 - 3 Voltage source control panel

2-4-164
Current and Voltage Sources
Current and Voltage Sources

Figure 4 - 4 Current source control panel

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

4.2 PROGRAMMABLE VARIABLE SOURCES


A Introduction Programmable variable sources (PVS) allow the user to set their own times and durations in some
models.
There are two types of PVS: a variable voltage source and a variable current source. As with the
other sources discussed previously, the voltage source has a series connected RLC impedance and
the current source a parallel connected RLC impedance.
The RLC impedance elements can be connected either in series or parallel, and at least one of the
RLC values must not be null.
Figure 4 - 6 shows the icons and the diagrams used to represent the programmable variable volt-
age sources and the programmable variable current sources.

B Icons and
Diagrams of
Programmabl
e Variable
Sources

Programmable Variable Sources


Current and Voltage Source

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:

Figure 4 - 6 Icons and diagrams of programmable variable sources

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

D General (Control Panel - Page 1)


Parameters
The general parameters define the steady state of the sources. This is the initial state before a var-
iation sequence and the state found after the sequence.
RLC connection = Series (series R, L, C) or parallel (parallel R, L, C);
SI or pu units (voltage source only):
SI: Specifies the values of the RLC elements, the voltage and the frequency in interna-
tional units (Ohm, Henry, Farad, Volt and Hertz);
pu: Specifies the values of the RLC elements, the voltage and the frequency in pu (per
unit);
Base values (voltage source only):
Base MVA: Base power per phase in MVA;
Base Volt: Base voltage phase to ground in kilovolt;
Base Freq: Base frequency in hertz;
R: Resistance value in ohms (or pu) for each phase (in order: a b c);
L: Inductance value in henry (or pu) for each phase (in order: a b c);
C: Capacitor value in farad (or pu) for each phase (in order: a b c);
Frequency: Source frequency in hertz (or pu);
Module: Peak value of the amplitude for the source voltage or current in volts (or pu) or
amperes (or pu) for each phase you have to specify 1.4142 pu;
Angle: Angle of each phase in degrees. The value of the angles can be modified either by
directly entering the numerical values in the appropriate fields or by adjusting the hands on
the dial. The input of the angle varies as a function of the sequence selected in the Source
Control section.
Note : The current source is always in positive sequence and, hence, it does not have a se-
quence selection button.
Here is how to input each sequence.
4 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.
5 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

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.

E Source (Control Panel - General)


Control
Source (Active/Inactive): To activate or deactivate the source;
Starting mode (Slow/ Fast):
If Fast, the source is immediately activated or deactivated. Figure 4 - 5 (a) shows what
happens when the source is activated in normal mode.
If Slow, when the source is activated, the amplitude of the source increases linearly
from zero to the steady-state value. When the source is deactivated, the amplitude of the
source decreases linearly from the steady-state value to zero. Figure 4 - 5 (b) shows the
behaviour of the source when it is activated in slow mode.

2-4-169
Current and Voltage Sources
Programmable Variable Sources

Figure 4 - 7 Control panel of a programmable voltage source (general)


Synchronization (None/Internal): The synchronization of a source means that a pro-
grammed sequence of events will start with the rising front of a synchronizing signal. The
synchronization is linked with the start of programming (Start/Stop) and the repetitive
mode. The operations must be initiated in ScopeView (see Figure 4 - 8) for the synchroniza-
tion signals to take effect. See the paragraph on the repetitive mode (further down) for a
description of the synchronization effects.
At the time this manual was written, the source could only be synchronized internally

(POW) . The option of synchronizing with an external signal is planned (Exter-


nal).
Programming (Start/Stop): Allows or prohibits the starting of programmed sequences of
events. The effect depends on the synchronization and repetitive mode. See the paragraph
on the repetitive mode for a description of the Start effects.

2-4-170
Current and Voltage Sources
Programmable Variable Sources

Repetitive (Enable/Disable): The repetitive mode allows users to repeat a programmed


sequence of events indefinitely:
Disable: The repetitive mode is not selected and the sequence of events will be exe-
cuted only once according to the following conditions (Start button must be pressed):

Operations
Synchronization OFF Synchronization ON
(ScopeView)a

Operation Manual mode: The sequence is The sequence is never initiated.


sequence OFF initiated as soon as the Start
button is pressed and is exe-
Operation cuted only once. To restart, The sequence is initiated with
sequence ON press Stop, followed by the rising front of the synchro-
Start. nization signals (the Start but-
ton must be pressed) and is
executed only once. A synchro-
nizing signal is required to
repeat.
a. In this table, the modes No switching/Switching and the modes Asynchronized/Synchro-
nized come from the ScopeView Acquisition parameters.

Enable, the programmed sequence of events will be repeated indefinitely according to


the following conditions:

Operations
Synchronization OFF Synchronization ON
(ScopeView)

Operation Manual Mode: the sequence is The sequence is never initiated.


sequence OFF initiated as soon as the Start
button is pressed and is exe-
Operation cuted until the Stop button is The sequence is initiated with
sequence ON pressed. To restart, press the rising front of the synchro-
Start. nization signal (the Start but-
ton must be pressed) and is
executed indefinitely thereaf-
ter, until the Stop button is
pressed. The subsequent syn-
chronizing signals are ignored.
To reactivate, press Start
again.

Programming status (Enable/Disable): If Enable, the programmed sequence of events


will be displayed in the windows where Hypersim was launched.

2-4-171
Current and Voltage Sources
Programmable Variable Sources

Synchronization and
Operation sequence are ON when
ticked 3.
(From ScopeView Main Window)

Figure 4 - 8 ScopeView acquisition parameters

F Load Flow (Voltage Source Only)


Parameters

G Timed (Control Panel - Timed variation)


Variation
Programming Timed variations allow users to program sequences of events affecting the steady state of the
source, as defined by the settings for the amplitude, phase, frequency and DC component on page
General of the control panel.
It is possible to vary the amplitude, phase angle, frequency and DC component of the source.
These variations can be in modulation form (sinusoidal or random), step, ramp or staircase. It is
possible to execute some variations simultaneously. For example, the amplitude and frequency of
a source can be made to vary in the same period of time. It is also possible to apply simultaneously
a modulation and a ramp.
The activation of the variations is controlled by the Enable/Disable buttons on page Timed var-
iation (top part) of the control panel. Enable allows the execution of the variations, while Dis-
able prohibits the application of the variations, but the programming values are saved.

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

Figure 4 - 9 Control panel of a programmable voltage source (timed variation)


The random modulation periodically adds or subtracts a constant value to the value to be modu-
lated. The choice of adding or subtracting is random and the probability of each is 50%.
Modulation types: Allows users to select the parameter to modulate:
None: No modulation (the parameters already entered are kept).
Amplitude: Sinusoidal modulation of the amplitude.
Frequency: Sinusoidal modulation of the frequency.
Phase: Sinusoidal modulation of the phase angle.
Random: Random modulation of the amplitude.
Parameters for the sinusoidal modulation:
Amplitude: Amplitude of the modulation sine.
Frequency: Frequency of the modulation sine.
Phase: Phase of the modulation sine.

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.

Figure 4 - 10 Random amplitude modulation of a voltage source

Example of amplitude modulation.

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

Figure 4 - 11 Amplitude modulation results

Example of frequency modulation.

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

2 seconds time span

Figure 4 - 12 Frequency modulation results

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:

AC: for a variation of the peak amplitude of the source.


DC: for a variation of the DC component of the source.
Phase: for a variation of the phase angle of source.
Frequency: for a variation of the source frequency.
Sequence: to change a sequence.

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.

Example of Ramp and Step generation.

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

Figure 4 - 13 Example of ramp/step generation programming

Figure 4 - 14 Ramp/Step generation results

2-4-181
Current and Voltage Sources
Programmable Variable Sources

J Programming (Control Panel - Harmonics)


Harmonics
This function allows users to add harmonics to the waveform of the source. Programming har-
monics consists in defining the harmonic content, specifying the times at which the harmonics
will be added and the general activation of the harmonics.
The fields of the parameters allowing to define the harmonic content are identified in the General
parameters section with the following labels (See figure 4 - 13):
14 Harmonic Numbers: This is the list of the numbers for the required harmonics.

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.

Example of harmonic voltage source programming:

Synthesize an harmonic voltage source with the following parameters:


In the General Control page, enter the parameters as follows:
Module: 1 Vpeak
Angle: 0
DC offset: 0 V
Frequency: 10 Hz
Phase sequence: Zero
Source mode: active
Starting mode: slow
Synchronization: Internal.(Only mode activate for now)
Programming: Start
Repetitive: Disable

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

Figure 4 - 15 Control panel of the programmable voltage source (harmonics)

2-4-185
Current and Voltage Sources
Controlled Voltage and Current Sources

Figure 4 - 16 Voltage source generation (harmonics) results

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).

4.3 CONTROLLED VOLTAGE AND CURRENT SOURCES


A Introduction The controlled voltage and current sources represent a single or three-phase A.C. source with a
series or parallel RLC impedance. In the network, these sources only generate the signal received
on the control connectors. Hence, this process serves only to amplify or inject a signal in the net-
work.

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

Current and Voltage controlled Sources

Properties: Main features:


7 Single or three phase A.C. Amplify or inject a signal
sources with series or parallel in the network from con-
RLC impedance trol block world.
Implementation:
Voltage Sources has series
impedance only that can
be series or parallel RLC
elements
Same for the Current
Sources
Voltage Sources always
reference to the ground
Current Sources injects current
between buses without grounding.

Figure 4 - 17 Icons and diagrams voltage and current controlled sources

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

Controlled voltage source Controlled current source


behind a series impedance behind a parallel impedance

Series RLC connections

Parallel RLC connections

Figure 4 - 18 Controlled voltage and current sources implementation

D Parameter Figures 4 - 19 and 4 - 20, respectively, show the control panels for voltage and current sources.
Description

E General RLC connection = Series (series R, L, C) or parallel (parallel R, L, C).


Parameters
R: Resistance value in ohms for each phase.
L: Inductance value in henry for each phase.
C: Capacitor value in farad for each phase.

F Control V input (voltage source): The voltage amplitude signal.


Connector
I input (current source): The current amplitude signal.
for
Controlled I output (voltage source): The current signal flowing from the source.
Source

2-4-188
Current and Voltage Sources
Controlled Voltage and Current Sources

Figure 4 - 19 Control panel of a controlled voltage source (3 phases)


.

Figure 4 - 20 Control panel of a controlled current source (3 phases)

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

THIS PAGE IS INTENTIONALLY LEFT BLANK

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

Turbines / Generators Groups


Turbines / Generators Groups

Properties: Main features:


7 Three models: The hydraulic and thermal models
Hydraulic turbine/generator each have two versions
Tandem steam turbine/generator Implementation:
Cross-compound steam turbine/ Generic models
generator Modular model that can be mod-
elled externally (except synchro-
nous machine)

Figure 5 - 1 Icons and diagrams of turbine/generator groups

5.2 SYNCHRONOUS GENERATOR MODEL OVERVIEW

Water Stabilizer Volt. Reg

Speed Reg Exi


Gen

Figure 5 - 2 About hydraulic turbine generator

2-5-192
Synchronous Turbine Generators
Synchronous Generator Model Overview

Speed Reg Stabilizer Volt. Reg


Boiler

Heat

Gen
Exi
Boiler Reg

Reheater to condenser...

Figure 5 - 3 About tandem steam turbine generator

Speed Reg Stabilizer Volt. Reg


Boiler Gen

Heat
Exi

Boiler Reg
Gen
Exi

to condenser...
Reheater
Stabilizer Volt. Reg

Figure 5 - 4 About cross-compound steam turbine generator


The following table describes the available subsystems and how they are integrated in machine
models. Some subsystems are common to all types of machine models, so they are described here
as generic models.

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.3 COMMON GENERIC SUBSYSTEMS


5.4 GENERIC SYNCHRONOUS GENERATOR

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*Ifdmax SatOn ge_Ifd


off on 1 / Xad

Xad*Ifdmin
+ +
(Xd - Xd)(Xd - Xd)

+ - (Xd - XI)2
+
(Xd - XI)(Xd - Xd)

Id (Xd - XI)

Figure 5 - 5 Generator block diagram, D axis

Xq - XI
Xq - XI
+ ge_phiq
1 + 1 Xdq - Xq +

Tqo*s 1 + Tqo*s Xq - XI
- -

(Xq - Xq)(Xq - Xq) Xq - Xext


1+
(Xq - XI)2
Xq - XI
-
(Xq - Xq)(Xq - Xq)

+ (Xq - XI)2
-
(Xq - XI)(Xq - Xq)
Iq (Xq - XI)

Figure 5 - 6 Generator block diagram, Q axis

2-5-195
Synchronous Turbine Generators
Generic Synchronous Generator

Internal Voltage behind impedance (Xext+Ra)


ge_phid Ed
ge_phid*s
Ed = -------------------------- ge_phiq*w
omb
ge_phiq Eq
Eq = ge_phiq*s
-------------------------- + ge_phid*w
Id omb
Edreg
The terminal voltage
Iq Eqreg
2 2
Vt = Vtd + Vtq
Vtd Pe
Voltage to be regulated by excitation
Edreg = Vtd + w*Xtfo*Iq - Rtfo*Id
Vtq Qe
Eqreg = Vtq - w*Xtfo*Id - Rtfo*Iq
w Active and reactive electrical power output Te
Pe = Vtd*Id + Vtq*Iq
Qe = Vtq*Id - Vtd*Iq
Electromagnetic torque applied on rotor, on turbine base
Te = (ge_phid*Iq - ge_phiq*Id) *baseMVA/baseMW
Filtering of Power reference
Peo
Peof = ------------------------------
1+TfilPeo*s
Voltage reference for excitation.
If "Voltage reference selection" is set to "Vref"
Vreff = Vref
If "Voltage reference selection" is set to "Vref=Vt"
Vreff = Vreff is calculated in order to have a
terminal voltage of Vref.
This calculation is done at code generation only,
and it is function of parameters
(Peo, Qeo, Vref, Saturation)

Figure 5 - 7 Generator block diagram, various machine calculations

5.4.2 Progr. BaseMVA: Base nominal electrical power of generator (MVA)


General
Parameters
BaseMW: Base nominal mechanical power of turbine (MW)
BaseVolt: Base nominal voltage (kV)
Omb: Base nominal angular frequency (elec. rad/s)
Vref: Voltage reference (pu)
W0: Frequency reference (pu)
Peo: Active power reference (MW)
Qeo: Reactive power reference (Mvar).
(Used only when Voltage Reference Selection is Vref=Vt).

2-5-196
Synchronous Turbine Generators
Generic Synchronous Generator

Voltage reference selection: Selection of reference signal for excitation.


(HYPERSIM can automatically calculate the value of Vref to supply to the excitation sys-
tem in order to have a terminal voltage that corresponds to the Vref parameter. See Figure 5
- 8 for more details).
TFilPeo: Power reference filter (s);
DYN key: Key to access Dynedit database.

The HYPERSIM Synchronous Machine control panel

Voltage Reference Selection


If Vref is selected (as above),
the reference signal to the excitation (Vref_sig)
is directly the Vref parameters available on the control
panel.(Although terminal voltage will be lower than Vref.)
If Vref=Vt is selected,
the reference signal to the excitation (Vref_sig)
is calculated to have Vt at the machine terminal
that is equal to Vref specified on the control panel.
(Although this automatic calculation needs the
operation point of the machine, Peo and Qeo.)

Graphically, we can explain as follow....

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.

Figure 5 - 8 Voltage reference section of control panel

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

The saturation is considered linear from


Vt 0 to 0.8 pu of Vt (terminal voltage).
EU
If Vt < 0.8
1.0
EL I fd = V t
0.8 If Vt > 0.8
I fd = V t + e i

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

(Field current, pu) ln [ ( E U S GU + a ) ( E L S GL + a ) ]


b = ---------------------------------------------------------------------------
-
EU EL

a and b are found with some iteration,


and are:

( I U I AG ) E U
S GU = -----------------------------------
EU
( I L I AG ) E L
S GL = ---------------------------------
-
EL

Figure 5 - 9 Generator saturation curve


ge_Two: Frequency setting time (in seconds, typically = 4s);
ge_Ango: Initial angle of voltage behind ge_Xext;

5.5 GENERIC EXCITATION SYSTEM

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

Edreg + Exci_on Exci_mod


ex_Vtreg 1 Ka on internal Efd
Edreg2+Eqreg2 1 + Tr*s
1 + Ta*s
- + + -
Eqreg off external

ex_Vrmin
ex_Efdfix
Vstab Kf*s
1 + Tf*s

Efd_i Signal form a users defined excitation system.


Field voltage from the external model
must be supplied to inplut connector "Efd_i".

Figure 5 - 10 Generic exciter block diagram

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

ex_Efdfix: Constant excitation voltage. Used when Exci_on is off.

5.6 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.)

Figure 5 - 11 Generic stabilizer block diagram

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

st_T3: Stabilizer time constant (s)


st_T4: Stabilizer time constant (s)
st_T5: Stabilizer time constant (s)
st_T6: Stabilizer time constant (s)
st_Vsmin: Minimum limit of stabilizer voltage (pu)
st_Vsmax: Maximum limit of stabilizer voltage (pu).

5.7 HYDRAULIC TURBINE GENERATORS

Table 51 : HYPERSIM QUICK REFERENCE

Hydraulic Turbine Generator


Hydraulic Turbine Generator

3 3
Hydro HydCmd

Properties: Main features:


The: This machine includes:
Speed regulator;
A generic speed regulator
Turbine; for hydraulic generating
Stabilizer; plants;
Excitation. A generic hydraulic tur-
can be modified. bine and;
A shaft model.
Implementation:
-

Figure 5 - 12 Icon and diagram hydraulic turbine generator


Figure 5 - 13 shows the schematic diagram of a hydraulic turbine generator. The shaded blocks
in Figure 5 - 14 can be modelled externally to the turbine generator block using the CSI. A de-
scription of the speed regulator, the hydraulic turbine and a shaft model follows.

2-5-202
Synchronous Turbine Generators
Hydraulic Turbine Generators

Figure 5 - 13 Schematic diagram of a hydraulic turbine generator

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

Edreg, Eqreg Ed, Eq

Figure 5 - 14 general diagram of a Hydraulic Turbine Generator

2-5-203
Synchronous Turbine Generators
Speed Regulator for Hydraulic Turbine Generators

5.8 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.

-re_sigma The power and speed regulation


of hydraulic machine are based on this
permanent droop characteristics
wo

Peof re_Pe

Figure 5 - 15 Speed and power regulation characteristic

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

x_i Signal from a users defined speed regulator system. external


Gate opening signal from the external model
must be supplied to inplut connector "x_i". Regvi_mod
Pef
internal

Signal from a users defined speed regulator system. external


Pef_i Filtered Electrical Power signal from the external model
must be supplied to inplut connector "Pef_i".

Figure 5 - 16 Speed and power regulator block diagram

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

re_vxmin: Lower limit of gate speed at closing, (negative value)


re_vxmax: Upper limit of gate speed at opening, (positive value).

5.9 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

Signal from a users defined turbine & shaft model.


Speed signal from the external model Note
must be supplied to inplut connector "w_i".
**all signals are refered to pu on the turbine base (baseMW)

***The value Hmec is the inertia constant converted to turbine base.


Hmec = H * BaseMVA/BaseMW.

****tb_gpm is now obsolete, kept for compatibility.

Figure 5 - 17 Hydraulic turbine block diagram

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

Shaft_on: Selection of shaft operation. (On=Normal operation; Off=constant speed equal to


speed reference wo)
tb_Beta: Effect of speed variation on the water height h
tb_Tw: Water time response in penstock
tb_H: Inertia constant (pu/MVA)
tb_Kd: The damping coefficient
tb_Kdstart: Damping coefficient of turbine at start-up time. This value helps to reach syn-
chronism. (typically = 5)
tb_TStart: Duration of turbine start-up (in seconds, typically 5 s)
tb_wmax: Maximum limit of machines speed (pu)
tb_wmin: Minimum limit of machines speed (pu)
tb_Tg0: Torque representing total mechanical losses (pu/MW*s)
tb_gPm: Operation mode of machine (1 = turbine generator; 0 = synchronous compensa-
tor). Obsolete, please use Turb_on.

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

Qe_label: Reactive power (pu/MVA)


Pef_label: Filtered measured electrical power (pu/MVA)
Pef_i_label: Filtered measured electrical power (pu/MVA) provided by an external module
Pm_label: Turbine mechanical power (pu/MW)
x_label: Gate opening (pu)
x_i_label: Gate opening provided by an external module (pu).

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

Figure 5 - 18 Hydraulic turbine generator control panel (general)

2-5-209
Synchronous Turbine Generators
Generic Hydraulic Turbine

Figure 5 - 19 Hydraulic turbine generator control panel (speed/turbine)

2-5-210
Synchronous Turbine Generators
Generic Hydraulic Turbine

Figure 5 - 20 Hydraulic turbine generator control panel (excitation/stabilizer)

2-5-211
Synchronous Turbine Generators
Tandem Thermal Turbine Generators

5.10 TANDEM THERMAL TURBINE GENERATORS

Table 52 : HYPERSIM QUICK REFERENCE

Thermal Turbine Generator

T CC T T 10
CrossCmpd Therm ThermCmd
Thermal Turbine Generator

Properties: Main features:


The: This machine includes:
Speed regulator
A low-pass filter for the
Turbine power reference Peo
Stabilizer A block that automatically
Excitation calculates the voltage ref-
Boiler erence Vreff when the
parameter Vref_select=1
5-10 mass shaft.
A generic models of a
can be modified. speed regulator for thermal
plants
A multi-mass shaft
A boiler and
A steam turbine.
Implementation:
-

Figure 5 - 21 Icon and Diagram Thermal Turbine Generator


Figure 5 - 22 shows the schematic diagram of a thermal turbine generator (tandem-compound).
The blocks are described in Section 5.4, on page 194.The shaded blocks can be modelled exter-
nally to the turbine generator block.

2-5-212
Synchronous Turbine Generators
Tandem Thermal Turbine Generators

Figure 5 - 22 Schematic diagram of a thermal tandem turbine generator


.

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

Eqreg Edreg Ed, Eq

Figure 5 - 23 General diagram of a thermal turbine generator

2-5-213
Synchronous Turbine Generators
Generic Boiler

5.11 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 pressure regulator


ki
bmax
+ s + t9s+1 1
(t9/10)*s+1
+
mhub
td t8*s+1
- kpc + +
0
k4

press ***
+ boiler_on boiler_mod
mhuh +
- k3 internal psih
s
on
+ 1
- off external

k2
*

Boiler model press

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).

Figure 5 - 24 Boiler block diagram

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

ch_k2: Load loss coefficient (pu)


ch_k3: Heat capacity coefficient (pu)
ch_k4: High pressure effect (pu)
ch_t8: Boiler constant (s)
ch_t9: Boiler setting constant (s)
ch_td: Boiler delay setting (s).

5.12 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

x_i Signal form a users defined speed regulator system.


Gate opening signal from the external model
must be supplied to inplut connector "x_i". *** The speed signal w is the generator speed.
It can be mass #1 or #2.
See shaft model for details.

Figure 5 - 25 Speed regulator block diagram

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

tb_pah1: Upper limit of valve speed at opening, (absolute value) (pu)


tb_pah2: Lower limit of valve speed at closing, (absolute value) (pu)
tb_ahlim: Upper limit of valve opening (pu).

5.13 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.

Steam flow Steam flow Steam flow

2 turbine stages 3 turbine stages 3 turbine stages


single reheat single reheat double reheat
(fl=0; fh+fi=1.0) (sw1=0; fh+fi_fl=1.0) (sw1=1; fh+fi+fl=1.0)

Figure 5 - 26 Typical configuration of tandem steam turbine


On the modelling aspect, the block diagram of the steam turbine is shown in Figure 5 - 27,
describing the steam chest, the three turbine stages and the available reheaters. About param-
eter settings, it is important that the sum of power fraction factor, fh, fi, fl, must always be
equal to 1.0. Also, the parameter Tr1 and Tr2 can represents reheaters or crossover, depend-
ing on turbine configuration. Third, the parameter sw1 allow users to by-pass the second re-
heater.

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

1+T4*s High 1+T6*s Intermediate 1+T11*s Low


pressure pressure
1 + T5*s 1 + T7*s 1 + T12*s pressure
turbine turbine turbine

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

Signal form a users defined turbine. external


Turbine steam flow signal from the external model
must be supplied to inplut connector "mhuh_i".

Figure 5 - 27 Steam turbine block diagrams

5.13.2 Programmab tb_t3: Time constant of steam chest (s)


le
Parameter
tb_Tr1: Time constant of reheater 1 (s)
s tb_Tr2: Time constant of reheater 2 (s)
tb_fh: Fraction of mechanical power provided by HP turbine (pu)
tb_fi: Fraction of mechanical power provided by IP turbine (pu)
tb_fl: Fraction of mechanical power provided by LP turbine (pu)

2-5-217
Synchronous Turbine Generators
Generic Shaft

tb_t4: High pressure turbine time constant (s)


tb_t5: High pressure turbine time constant (s)
tb_t6: Intermediate pressure turbine time constant (s)
tb_t7: Intermediate pressure turbine time constant (s)
tb_t11: Low pressure turbine time constant (pu)
tb_t12: Low pressure turbine time constant (pu)
tb_ai: IP valve opening (pu)
tb_al: LP valve opening (pu)
tb_swl: By-pass of second reheater
turb_on: Selection of turbine operation. (On=Normal operation; Off=no turbine, constant
mechanical power equal to Peo)
turb_mod: Selection of turbine model. (Internal: actual model; External: model supplied by
user).

5.14 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

th ti tl te tgo Torque applied


on shaft
Shaft
1-mass-model
1
th ti tl te tgo
Shaft
5-mass-model Generator
5 mass (#1 or 2)
4 3 2 1
th ti tl te tgo
Shaft
10-mass-model Generator
mass (#1 or 2)
10 9 8 7 6 5 4 3 2 1

kij k23 k12


Physical hi h3 h2 h1
representation
dij d23 d12
di d3 d2 d1

Figure 5 - 28 Representation of shaft model

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

w_i Signal from a users defined shaft system.


Generator speed signal from the external model *** The speed signal w is the generator speed.
must be supplied to inplut connector "w_i". It can be mass #1 or #2.
*** A friction torque Tgo is applied on generator.

***Each masses are submitted to a speed limiter,


using parameter wmin, wmax.

Figure 5 - 29 Implementation of shaft model

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

Pef_label: Filtered electric power (pu / MVA)


psih_label: Steam pressure at high pressure stage (pu)
psih_i_label: Steam pressure at high pressure stage (pu) provided by an external module
mhuh_label: Flow of high pressure steam (pu)
mhuh_i_label: Flow of high pressure steam (pu) provided by an external module
Th_label: Mechanical torque of high pressure turbine (pu / MW*s)
Th_i_label: Mechanical torque of high pressure turbine (pu / MW*s) provided by an exter-
nal module
Ti_label: Mechanical torque of intermediate pressure turbine (pu / MW*s)
Ti_i_label: Mechanical torque of intermediate pressure turbine (pu / MW*s) provided by an
external module
Tl_label: Mechanical torque of low pressure turbine (pu / MW*s)
Tl_i_label: Mechanical torque of low pressure turbine (pu / MW*s) provided by an external
module
x_label: valve opening (pu)
wxxx1.n_label: Angular speed of mass n (pu)
T12.nm_label: Mechanical torque applied by mass n to mass m (pu).

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

Figure 5 - 30 Thermal turbine generator control panel (general)

2-5-223
Synchronous Turbine Generators
Generic Shaft

Figure 5 - 31 Thermal turbine generator control panel (speed/turbine)

2-5-224
Synchronous Turbine Generators
Generic Shaft

Figure 5 - 32 Thermal turbine generator control panel (shaft/boiler)

2-5-225
Synchronous Turbine Generators
Generic Shaft

Figure 5 - 33 Thermal turbine generator control panel (excitation/stabilizer)

2-5-226
Synchronous Turbine Generators
Cross-Compound Thermal Turbine-Generator

5.15 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

Figure 5 - 34 Schematic diagram of a cross-compound turbine generator

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

Figure 5 - 35 General diagram of a cross-compound thermal turbine generator

5.16 SPEED REGULATOR

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

Figure 5 - 36 Speed regulator block diagram

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 STEAM TURBINE

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

Tmec1 Tmec3 Tmec5 Tmec7

k1 k3 k5 k7
psih mhuh

1 1 1 1
x t1s+1 t2s+1 t3s+1 t4s+1

k2 k4 k6 k8

Tmec2 Tmec4 Tmec6 Tmec8

Figure 5 - 37 Steam turbine block diagram

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

Ed_label: Voltage behind inductance (pu)


Eq_label: External, D and Q axes (pu)
Vt_label: Output voltage (pu)
Efd_label: Field voltage, general (pu)
Vstab_label: Stabilizer output voltage (pu)
w_label: Angular speed (pu)
Te_label: Electrical torque based on generator rating (pu / MW*s)
Pe_label: Active power (pu / MVA)
Qe_label: Reactive power (pu / MVA)
Pef_label: Filtered electric power (pu / MVA)
psih_label: Vapor pressure at high pressure level (pu)
mhuh_label: Flow of high pressure vapor (pu)
Tmec1,...,8_label: Mechanical couple flow of high pressure steam (pu)
x_label: Valve opening (pu)
x_i_label: Valve opening when the speed regulator is modelled externally (pu)
Ifd_label: Field current (pu)
w2,...,n_label: Angular velocity of mass n (pu)
T12,...,nm_label: Mechanical torque applied by mass n to mass m (pu)
Edreg_label: Mechanical torque applied by mass n to mass m (pu). Voltage to be regulated
by excitation for D-axis (Ed)
Eqreg_label: Mechanical torque applied by mass n to mass m (pu) Voltage to be regulated
by excitation for Q-axis (Eq).

5.18 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

Turbine Stages Primary Generator


Numbering of
masses #5
9 #4 #3 #2 #1

Selection of masses. (from 2 to 5)

Tmec1 Tmec3 Tmec5 Tmec7

Tmec2 Tmec4 Tmec6 Tmec8

Selection of masses. (from 2 to 5)

Numbering of
masses
#5 9 #4 #3 #2 #1

Turbine Stages Secondary Generator

Figure 5 - 38 Shaft model with spring-masses

5.18.2 Programmab ar_tg0: Torque representing mechanical losses


le
Parameter
ar_nbmasse: Number of masses on a shaft, 1 to 5
s ar_h1, ar_h2,...: Inertia (in seconds) of masses based on the generator BaseMVA
ar_d1, ar_d2,...: Damping factors of masses based on the turbine BaseMW (in pu torque/pu
speed)
ar_k12, ar_k23,...: Rigidity factors between masses based on the turbine BaseMW for a
3600 rpm machine (in pu/rad)
ar_d1Start: Value of ar_d1 at starting
ar_tStart: Time (in seconds) during which ar_d1 = ar_d1Start
Mass_Tmec1: Mass to which torque Tmec1 is applied
Mass_Tmec2: Mass to which torque Tmec2 is applied (Secondary shaft)
Mass_Tmec3: Mass to which torque Tmec3 is applied
Mass_Tmec4: Mass to which torque Tmec4 is applied (Secondary shaft)
Mass_Tmec5: Mass to which torque Tmec5 is applied
Mass_Tmec6: Mass to which torque Tmec6 is applied (Secondary shaft)
Mass_Tmec7: Mass to which torque Tmec7 is applied
Mass_Tmec8: Mass to which torque Tmec8 is applied (Secondary shaft).

2-5-232
Synchronous Turbine Generators
Multi-Mass Shafts

Figure 5 - 39 Cross-compound thermal turbine generator control panel (general)

2-5-233
Synchronous Turbine Generators
Multi-Mass Shafts

Figure 5 - 40 Cross-compound thermal turbine generator control panel (generators)

2-5-234
Synchronous Turbine Generators
Multi-Mass Shafts

Figure 5 - 41 Cross-compound thermal turbine generator


control panel (turbine/speed/boiler)

2-5-235
Synchronous Turbine Generators
Multi-Mass Shafts

Figure 5 - 42 Cross-compound thermal turbine generator


control panel (mechanical torque/shaft)

2-5-236
Synchronous Turbine Generators
Multi-Mass Shafts

Figure 5 - 43 Cross-compound thermal turbine generator


control panel (excitation/stabilizer)

2-5-237
Synchronous Turbine Generators
Multi-Mass Shafts

THIS PAGE IS INTENTIONALLY LEFT BLANK

2-5-238

Chapter 6
PASSIVE ELEMENTS

6.1 SHUNT AND SERIES R, L, C ELEMENTS


A Introduction An RLC element is a single-phase, two-phase or three-phase element consisting of RLC
branches where each branch can have a resistance (R), an inductance (L) and a capacitor (C)
connected in series. The value of at least one of the three components in series must not be
zero.There are two types of RLC elements: series RLC elements and shunt RLC elements.
An element set to zero means no element is activated and it cannot take a value during a
simulation.
The element automatically adjusts from single-phase to three-phase according to the type of
bus it is connected to.

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.

Table 61 : Series Elements

R L C LC RC RL RLC

Icon

Element

2-6-239
Passive Elements
Shunt and Series R, L, C Elements

Table 62 : Shunt 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

B1 B1_a B1_b B1_c

(a) (b)

Figure 6 - 1 Y Ground connection of a shunt rl element,


as shown in a diagram (a) and in reality (b).

B1 B1_a B1_b B1_c

(a) (b)

Figure 6 - 2 Floating Y connection of a shunt RL element,


as shown in a diagram (a) and in reality (b).

B1 B1_a B1_b B1_c

(a) (b)

Figure 6 - 3 Delta connection of a shunt RL element,


as Shown in a diagram (a) and in reality (b).

C General (See Figure 6 - 4).


Parameters
Base Values
Base MVA: Base power;

2-6-241
Passive Elements
Shunt and Series R, L, C Elements

Base Volt: Base voltage;


Base Freq: Base frequency.
Connection:
For series RLC elements, Series only;
For single-phase shunt RLC elements, only a Y ground connection is allowed;
For three-phase shunt RLC elements, Y ground, Y floating or Delta;
Units: SI, pu or PQ
SI: Specifies the values of the components in international system units (ohm, henry and
farad);
pu: Specifies the values of the components in pu, according to the voltage and power
bases;
PQ: To specify the values of the components in active and reactive powers, (MW, Mvar).

D RLC R: Resistance value for each phase;


Parameters
L: Inductance value for each phase;
C: Capacitor value for each phase.

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

Figure 6 - 4 Control panel of series RLC elements

2-6-242
Passive Elements
Shunt and Series Non-Linear Resistors

G Control Panel
of Shunt RLC
Elements
.

Figure 6 - 5 Control panel of shunt RLC elements

6.2 SHUNT AND SERIES NON-LINEAR RESISTORS


A Introduction The non-linear resistor model was developed to represent the different surge arresters found in
the network. This model is similar to the one found in EMTP. It allows representing any form of
non-linear current-voltage relation, in addition to the typical behaviour of surge arresters. The
model has two implementations: parallel or series connection.

2-6-243
Passive Elements
Shunt and Series Non-Linear Resistors

B Non-Linear
Resistors
Icons and
Diagrams

Series and Parallel Non-linear Resistors

ZNO ZNO_Shunt
2
Series and Parallel Non-linear Resistors

RnLin
RnLin

Properties: Main features:


7 Instant description of the volt- Dissipate a greater quan-
age behaviour with respect to tity of current if an over
the current. voltage or surge occurs,
since its resistance
decreases
Implementation:
Series connection

Figure 6 - 6 Icons and diagrams of series and parallel non-linear resistors

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]

Figure 6 - 7 Non-linear resistors characterization


The relation of V must be translated with respect to I (voltage versus current). The user has two
options to translate this characteristic. Either the EMTP method, that describes sections in the
form of exponential expressions, or using a matrix.
In the first case, the user must provide the information for a number of sections.
For example, the curve drawn in Figure 6 - 7 expresses the I-V relationship in four distinct
sections. Three exponential sections (omit section 1 which is linear.) Section 2, delimited by
Vmin(0) to Vmin(1) is described with the parameters P(0) and Q(0).
The exponential number i selected will force the user to provide the values of Vmin, P and Q for
coefficient 0 to coefficient i-1.
A more simple method consists in describing the curve in a compiled way. For each value of V,
the associated current value is entered.

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

F Matrix Positive part versus negative part:


Format
Symmetry: The user defines the curve from 0 to +Vmax, and this curve is duplicated for
the negative section.
Asymmetry: The user defines a curve from -Vmax to +Vmax. The negative part can dif-
fer from the positive part.
Number of points on the curve: Specifies the number of points characterizing the voltage
curve with respect to the current.(From 1 to 30)
V: Vector of voltage points based on the number of points specified by the user. Each point
corresponds to a location on the curve. (V)
I: Vector of current points based on the number of points specified by the user. Each point
corresponds to a location on the curve. (A)

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

Figure 6 - 8 Control Panel of a Non-Linear Shunt Resistor (General)

2-6-247
Passive Elements
Shunt and Series Non-Linear Resistors

Figure 6 - 9 Control Panel of a Non-Linear Shunt Resistor (Table)

2-6-248
Passive Elements
Mutual Inductances

6.3 MUTUAL INDUCTANCES


A Introduction In the model of a three-phase coupled reactor, the R and L elements are coupled. This model is
equivalent to a PI line without capacitors.

Figure 6 - 10 Icon and Diagram of a Three-Phase Coupled Reactor

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.

C RL Matrix/Sequence: Selects the type of parameters to use:


Parameters
Matrix for RL matrix input;
Sequence for zero and positive sequences;
Matrix R: Resistive value of the impedance matrix;
Matrix L: Inductive value of the impedance matrix;
Sequence 0: Zero sequence resistance - Zero sequence inductance
Sequence 1: Positive sequence resistance - Positive sequence inductance

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

Figure 6 - 11 Control Panel of Three-Phase Coupled Reactors

6.4 DECOUPLING ELEMENTS


A Introduction In order to decrease the calculation load, the task of a complex station can be divided into two
sub-tasks using a decoupling element. There are two types of decoupling elements: with and
without an isolation transformer. The first type is a single or three-phase element, while the
second type is strictly three-phase. The decoupling element replaces a reactor between two power
systems to be decoupled.
In the decoupling element diagram, the dot specifies side two of the element. It is important not
to leave another series reactor with the decoupling element on side 1.

2-6-250
Passive Elements
Decoupling Elements

B Decoupling
Element Icon
and Diagram

Decoupling Elements

Decoupling Dec_XFO

Properties: Main features:


7 Decrease calculation load; The decoupling element is
7 Divide in two subtracts a com- either single and/or three
plex station phase type;
The decoupling element
with isolation xfo is only a
Decoupling Elements

three phase type.


Implementation:
Replaces a reactor
between two power sys-
tems to be coupled.

Figure 6 - 12 Icon and Diagram Decoupling Element

C General Number of phases (1 or 3).


parameters
Grounded phase (A, B, C): Grounded phase (leave blank if no phase is grounded).
Series RL element (specify only one value if the decoupling element is used in a single
phase or specify three values if used in a three-phase power system).
R: Resistance (ohms)
L: Inductance (H)
Gain: Transformation ratio (V2/V1) of isolation transformer.

D List of No signal is available.


available
signals

2-6-251
Passive Elements
Decoupling Elements

E Applications 1 Applications of decoupling element without isolation transformer. Figures 6 - 13 and 6 -


14 show two uses of the decoupling element without isolation transformer in a three-phase power
system.
.

After decoupling
Before decoupling 2 simulation tasks with
1simulation task one time step delay solution

Decoupling
Element

System 1 System 2 System 1 System 2

No grounded phase

Figure 6 - 13 Decoupling of two grounded power systems

Before decoupling After decoupling


Decoupling
Element

System 1 System 2 System 1 System 2


- floating - floating - floating - floating

One grounded phase

Figure 6 - 14 Decoupling of two floating power systems


2 Applications of decoupling element with isolation transformer. Figure 6 - 16 shows the
use of a decoupling element with isolation transformer. This element is especially used when the
grounding of a phase in both power systems by a simple decoupling element (without isolation
transformer) is harmful to the operation of the entire power system. The decoupling element
connects one phase of side 1 to the ground. Side 2 of the element remains floating because of its
isolation transformer. A converter station is a good example of using such an element. In order to
separate the thyristor bridge from the converter transformer, a decoupling element with an
isolation transformer must be used. In this case, the leakage from the floating Y winding is used
to execute the decoupling.
A delay of one time step is created using those elements. So it can create divergence of the
simulation and may or may not be used on a case by case basis.

2-6-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

Figure 6 - 15 Decoupling example for a large sub-station

Before decoupling After decoupling

Decoupling
Element

System 1 System 2 System 1 System 2


- floating - grounded - floating - grounded

Only the power system on side 1 of the


decoupling element is grounded by this element

Figure 6 - 16 Use of a decoupling element with isolation transformer

2-6-253
Passive Elements
Decoupling Elements

Before decoupling After decoupling

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

Figure 6 - 17 Decoupling of a converter station

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

Figure 6 - 18 Example of a form for decoupling element without isolation transformer

2-6-255
Passive Elements
Passive Filters

Figure 6 - 19 Example of a form for decoupling element with isolation transformer

6.5 PASSIVE FILTERS


A Introduction Passive filters are elements showing an identical impedance in different resistance-inductance-
capacitor combinations series or parallel connected. Even though these can be represented with
simple passive elements, using filters has the advantage of eliminating nodes between
components, thereby decreasing the number of nodes or the size of the Z matrix in the station
where they are found. Meaning that the station simulation time is also decreased.
There are five types of filters available in Hypersim:
Series-parallel RLC filter;
Type C filter;
High-pass filter;
Double-tuning filter;
General filter.
The configuration for each filter is shown in Figure 6 - 20. As for shunt RLC elements, passive
filters can be Y, Y Ground and Delta connected. There are no filters with series elements.

2-6-256
Passive Elements
Passive Filters

Figure 6 - 20 Passive Filters Icons and Diagrams

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

Figure 6 - 21 Control panel of a series-parallel RLC filter

Figure 6 - 22 Control panel of a type c filter

2-6-258
Passive Elements
Passive Filters

Figure 6 - 23 Control panel of a high-pass filter

Figure 6 - 24 Control panel of a double-tuning filter

2-6-259
Passive Elements
Passive Filters

THIS PAGE IS INTENTIONALLY LEFT BLANK

2-6-260

Chapter 7
LINES AND CABLES

7.1 CALCULATION OF ELECTRICAL PARAMETERS


There are two ways to enter electrical parameters in the line model in Hypersim. You can use
Hyperline Line Data module in Hyperview or the load file function with EMTP files. All ex-
amples in this chapter are based on the Hyperline tools, except Marti line examples.

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.

Figure 7 - 1 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

Figure 7 - 2 EMTP input file to calculate the parameters of a transposed


three phase line with the geometric data shown in Figures 7 - 6 to 7 - 8

1.0 FREQMX FREQPR FREQPR FREQPR FREQPR FREQPR


I--------II--------II--------II--------II--------II--------II--------I
1.0 15360. 60. 480. 960.
TEST CASE manic-quebec
LIGNE 735kV; 3 phases
RO TERRE = 100 OHMS-M
$$$
NCON REARTH FREQ. 3 3 10 10
I---II--------II--------I I I II II II II
3 100.0 60.0 3 3 10 10

R(OH/MI) XD(OH/MI) DIA(IN) X(FT) YTOW(FT) YMSPN(FT) (0-9)(1,-1)


I--------II--------II--------II--------II--------II--------II---II---I
0.07240 0.37820 0.11517 -49.25 70.75 70.75 0 1
0.07240 0.37820 0.11517 0.75 70.75 70.75 0 1
0.07240 0.37820 0.11517 50.75 70.75 70.75 0 1
5.80000 1.70000 0.03646 -35.00 110.0 110.0 0 -1
5.80000 1.70000 0.03646 35.00 110.0 110.0 0 -1

Figure 7 - 3 Inpurdue input file to calculate the parameters of a frequency


constant parameter untransposed line with the
geometric data shown in Figures 7 - 6 to 7 - 8

2-7-263
Lines and Cables
Distributed Parameters Lines

7.2 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

Table 71 : HYPERSIM QUICK REFERENCE

Lines and cables

2 1

2 1

Properties: Main features:


Frequency Constant Dis- A transposed or untransposed, fre-
tributed Parameters Lines. quency constant distributed
parameters lines is represented by
Its sequences or;
By its propagation modes
and the transformation
Lines and Cables

matrix (Ti) between mode


currents and phase cur-
rents.
A model of a line with fault is also
provided.

Figure 7 - 4 Icon and Diagram Lines and Cables

B Parameter 1 General Parameters . (See Figures 7 - 11 and 7 - 12)


Description
Base MVA: Base power in MVA;
Base Volt: Line base voltage - phase to ground in kV;
Base Freq: Base frequency (Hz);
Length: Line length (km);

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.

Transposition (Untransposed/Transposed): Untransposed or Transposed;


Ti: transformation matrix between mode current and phase current ([Iphase] = [Ti] x
[Imode]); not used in the case of transposed line;
R: Per unit length resistance (ohm/km) for each sequence;
L: Per unit length inductance (henry/km) for each sequence;
C: Per unit length capacitor (farad/km) for each sequence.
3 Fault 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

The phase (P) operation is mandatory if a Uniform/Gaussian distribution ug/t1/t2/t3 is


used. In all other cases the command (C) option is used.

RbDef RcDef
VaDef A VbDef B VcDef C

IaDef IbDef IcDef


Ropen/close Ropen/close Ropen/close

InDef Ground

RDef Ropen/close

Distance of fault
1 2

Figure 7 - 5 Fault Breakers

Table 72 : Types of fault according to state of breakers

State of Breaker A B C Ground

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

Table 72 : Types of fault according to state of breakers

Fault between phases A and C 1 0 1 0


Fault between phases A, C and Ground 1 0 1 1
Fault between phases A and B 1 1 0 0
Fault between phases A, B and Ground 1 1 0 1
Fault between phases A, B and C 1 1 1 0
Fault between phases A, B, C and Ground 1 1 1 1

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)

E Fault Signals Va_FLT_line label: Voltage of phase A on fault bus (volt);


Vb_FLT_line label: Voltage of phase B on fault bus (volt);
Vc_FLT_line label: Voltage of phase C on fault bus (volt)
Ia_FLT_line label: Phase A fault current (ampere);
Ib_FLT_line label: Phase B fault current (ampere);
Ic_FLT_line label: Phase C fault current (ampere);
In_FLT_line label: Ground fault current (ampere);
CMD(a, b, c, n)_FLT_line label: Command for states of phase and ground breakers.

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.

J Transfert The transfert of electrical parameters to Hypersim is very simple.


Electrical
Parameters In Hypersim GUI, edition mode, draw a network with lines.
to Hypersim Go to simulation mode.
Lines
Go to the Line Data GUI, you will see all the names of the lines in you network at the bot-
tom of the page.
To transfert electrical parameters, choose the name of the line and them apply parameters.
See the parameters in the forms of the line.

2-7-268
Lines and Cables
Distributed Parameters Lines

Example:

Example of a 735-kV three-phase line. Three bundles of 4.


Bersfort ACSR 1355 MCM conductors.
Two 1/2 inch-diameter steel ground wires.
Figures 7 - 6, 7 - 7 and 7 - 8 show respectively the geometrical data.

-8.99m 8.99m Overhead ground wire

-12.80m 12.80m

phase A phase B phase C

32,92m
20,73m

= 100-m
Figure 7 - 6 Layout of conductors for a 735 kV line

45,72cm

3,556 cm
o
45

Figure 7 - 7 Details of a bundle conductor

2-7-269
Lines and Cables
Distributed Parameters Lines

Figure 7 - 8 Line height

Example of a 735-kV three-phase line


Three bundles of 4 Bersfort ACSR 1355 MCM conductors
Two 1/2 inch-diameter steel ground wires
Ytower and Ymin are the average heights of conductors

LINE GEOMETRY:

Frequency (Hz): 60.0


Ground resistivity (ohmm): 100.0
Number of phase conductors (bundles): 3
Number of ground wires (bundles): 2

------------------------------------------------------------------------
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 AND BUNDLE CHARACTERISTICS:

Number of conductor types or bundle types: 2


Transposition Options: Untransposed
Conductor internal inductance evaluated from: T/D Ratio
Include conductor skin effect: true

------------------------------------------------------------------------------------------------------------
Conductor Outside DC Relative Conductors Bundle Angle
Type Diameter T/D Ratio GMR Resistance Permeability Per Bundle Diameter Conductor 1
(cm) (cm) (Ohms/km) (cm) (degrees)
------------------------------------------------------------------------------------------------------------
1 3.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:

Resistance matrix (ohm/km):


107.0972E-03 97.288142E-03 94.985601E-03
97.288142E-03 110.49444E-03 97.288142E-03
94.985601E-03 97.288142E-03 107.0972E-03

Inductance matrix (H/km):


1.5767213E-03 751.60911E-06 616.27982E-06
751.60911E-06 1.5708151E-03 751.60911E-06
616.27982E-06 751.60911E-06 1.5767213E-03

Capacitance matrix (F/km):


11.661265E-09 -2.1268277E-09 -583.62337E-12
-2.1268277E-09 12.117397E-09 -2.1268277E-09
-583.62337E-12 -2.1268277E-09 11.661265E-09

Modal parameters for: Untransposed

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

Modal resistances [0 1 2 3 ... N] (ohm/km)


300.43789E-03 12.111597E-03 11.281739E-03

Modal inductances [0 1 2 3 ... N] (H/km)


2.977745E-03 960.44144E-06 775.18526E-06

Modal capacitances [0 1 2 3 ... N] (F/km)


8.5801475E-09 12.244888E-09 14.548121E-09

Self impedance (Zero-sequence & Positive-sequence):

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

Figure 7 - 11 Control panel of an untransposed line with the geometric


data shown in Figures 7 - 6 to 7 - 8

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

Figure 7 - 12 Control panel of a untransposed line with fault (general)

2-7-273
Lines and Cables
Distributed Parameters Lines

Figure 7 - 13 Control Panel of a untransposed line with fault (timing)

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

Figure 7 - 14 Coupled line icon and diagram

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

F Line Data Figures 7 - 15 7 - 16 show the layout of two coupled lines.

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

Select the transpositions options.


Run the program.
The electrical parameters are displayed in the Line Data report.

I Transfert The transfert of electrical parameters to Hypersim is very simple.


Electrical
Parameters In Hypersim GUI, edition mode, draw a network with lines.
to Hypersim Go to simulation mode.
Lines
Go to the Line Data GUI, you will see all the names of the lines in you network at the bot-
tom of the page.
To transfert electrical parameters, choose the name of the line and them apply parameters.
See the parameters in the forms of the line.

2-7-276
Lines and Cables
Distributed Parameters Lines

Example:

Example of a 500-kV three-phase, double-cicruit line.


6 bundles of 3 ACSR 1355 MCM conductors, 2 steel ground wire.
The Phase numbering is set to obtain the (6x6) RLC matrices and sequence parameters
of the two individual circuits.

-14,40m

-11,60m Overhead ground wire

-8,5m

C A

58,2m

46,4m
35,2m
24m

= 100-m

Figure 7 - 15 Geometric layout of two coupled lines

2-7-277
Lines and Cables
Distributed Parameters Lines

50.0cm

30o

= 3.129cm

Figure 7 - 16 Details of a conductor bundle for lines in Figure 7 - 15

Sag

Y m ea n= Ytower (2/3) sag


Ytower Y m ea n

Figure 7 - 17 Line height

2-7-278
Lines and Cables
Distributed Parameters Lines

COMMENTS:

Example of a 500-kV three-phase, double-cicruit line


6 bundles of 3 ACSR 1355 MCM conductors, 2 steel ground wire

LINE GEOMETRY:

Frequency (Hz): 60.0


Ground resistivity (ohmm): 100.0
Number of phase conductors (bundles): 6
Number of ground wires (bundles): 2

------------------------------------------------------------------------
Conductor Phase X Y Tower Y Min Conductor
(bundle) Number (meters) (meters) (meters) Type
------------------------------------------------------------------------
p1 1 -8.50000 46.40000 34.60000 1
p2 2 -14.40000 35.20000 23.40000 1
p3 3 -8.50000 24.00000 12.20000 1
p4 6 8.50000 46.40000 34.60000 1
p5 5 14.40000 35.20000 23.40000 1
p6 4 8.50000 24.00000 12.20000 1
g1 0 -11.60000 58.20000 46.40000 2
g2 0 11.60000 58.20000 46.40000 2
------------------------------------------------------------------------

CONDUCTOR AND BUNDLE CHARACTERISTICS:

Number of conductor types or bundle types: 2


Transposition Options: Untransposed
Conductor internal inductance evaluated from: Geometric Mean Radius (GMR)
Include conductor skin effect: true

------------------------------------------------------------------------------------------------------------
Conductor Outside DC Relative Conductors Bundle Angle
Type Diameter T/D Ratio GMR Resistance Permeability Per Bundle Diameter Conductor 1
(cm) (cm) (Ohms/km) (cm) (degrees)
------------------------------------------------------------------------------------------------------------
1 3.12930 0.37500 1.25600000 0.05208000 1.00000 3 57.73500 30.00
2 0.95250 0.50000 0.37090000 4.10200000 1.00000 1 0.00000 0.00
------------------------------------------------------------------------------------------------------------

Figure 7 - 18 Hyperline line data geometrical parameters of a double circuit lines hown in figures 7 - 15
to 7 - 17

2-7-279
Lines and Cables
Distributed Parameters Lines

LINE PARAMETERS:

Resistance matrix (ohm/km):


107.06173E-03 84.639908E-03 82.566286E-03 82.414725E-03 84.244289E-03 88.571231E-03
84.639908E-03 98.801628E-03 79.254713E-03 79.124767E-03 80.599614E-03 84.244289E-03
82.566286E-03 79.254713E-03 95.785116E-03 77.821153E-03 79.124767E-03 82.414725E-03
82.414725E-03 79.124767E-03 77.821153E-03 95.785116E-03 79.254713E-03 82.566286E-03
84.244289E-03 80.599614E-03 79.124767E-03 79.254713E-03 98.801628E-03 84.639908E-03
88.571231E-03 84.244289E-03 82.414725E-03 82.566286E-03 84.639908E-03 107.06173E-03

Inductance matrix (H/km):


1.6815945E-03 793.83125E-06 680.66615E-06 635.23225E-06 654.02613E-06 731.00435E-06
793.83125E-06 1.6892843E-03 798.1073E-06 658.18462E-06 633.18174E-06 654.02613E-06
680.66615E-06 798.1073E-06 1.6905131E-03 739.69329E-06 658.18462E-06 635.23225E-06
635.23225E-06 658.18462E-06 739.69329E-06 1.6905131E-03 798.1073E-06 680.66615E-06
654.02613E-06 633.18174E-06 658.18462E-06 798.1073E-06 1.6892843E-03 793.83125E-06
731.00435E-06 654.02613E-06 635.23225E-06 680.66615E-06 793.83125E-06 1.6815945E-03

Capacitance matrix (F/km):


10.785129E-09 -2.1084603E-09 -725.71953E-12 -445.46558E-12 -637.94412E-12 -1.4877263E-09
-2.1084603E-09 10.885838E-09 -1.8810997E-09 -492.02897E-12 -425.08373E-12 -637.94412E-12
-725.71953E-12 -1.8810997E-09 11.326109E-09 -1.0694998E-09 -492.02897E-12 -445.46558E-12
-445.46558E-12 -492.02897E-12 -1.0694998E-09 11.326109E-09 -1.8810997E-09 -725.71953E-12
-637.94412E-12 -425.08373E-12 -492.02897E-12 -1.8810997E-09 10.885838E-09 -2.1084603E-09
-1.4877263E-09 -637.94412E-12 -445.46558E-12 -725.71953E-12 -2.1084603E-09 10.785129E-09

Modal parameters for: Untransposed

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

Modal resistances [0 1 2 3 ... N] (ohm/km)


493.79905E-03 20.976121E-03 18.489695E-03 18.201966E-03 17.92674E-03 17.952914E-03

Modal inductances [0 1 2 3 ... N] (H/km)


5.0845077E-03 1.1097985E-03 1.1989381E-03 914.81044E-06 831.23138E-06 858.80321E-06

Modal capacitances [0 1 2 3 ... N] (F/km)


5.8550193E-09 10.674702E-09 9.808374E-09 12.411521E-09 13.608731E-09 13.161354E-09

Self impedance (Zero-sequence & Positive-sequence):

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)

Mutual impedance (Zero-sequence):

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

Figure 7 - 21 Triple line icon and diagram

1.1 1.2

2.1 2.2

C4
3.1 3.2

4.1 4.2

Figure 7 - 22 Quadruple line icon and diagram


A 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 is 9x9 for triple lines and 12x12 for quadruple
lines. This can be explained by the fact that each conductor bundle can be considered as a separate
phase.

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

Figure 7 - 23 Triple line control panel

2-7-283
Lines and Cables
Distributed Parameters Lines

Figure 7 - 24 Quadruple line control panel

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

Figure 7 - 25 Coupled line with fault icon and diagram

1.1 1.2

2.1 2.2

C4
3.1 3.2

4.1 4.2

Figure 7 - 26 Quadruple line with fault icon and diagram

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

3 line sections - fault on line 1 closer than fault on line 2


3 line sections - fault on line 2 closer than fault on line 1
With the graphical interface, the user can visualize the sub-network making up the composed
model, along with all the parameters of each sub-element. However, these parameters are reada-
ble only. To change them, the user must access the control panel of the composed model.
In an all cases, the Model Configuration parameter must agree with the parameters specifying the
fault distance on each line. This distance must be calculated from side 1 of the line. For exam-
ple, if the user wants to simulate a fault on line 1 of a coupled line at a distance of 125 km and a
fault on line 2 at 75 km, he must use the last configuration (3 line sections - dfaut sur la ligne 2
plus prs que dfaut sur la ligne 1"), in addition to entering the values correctly in the fault dis-
tance fields. If the user does not want to use one of the fault elements, he must set the value of the
fault distance to 0 for the fault in question. Obviously, the fault distance must be lower than the
line length.
In the case of a quadruple line with fault, there are five configurations available:
1 section
2 sections
3 sections
4 sections
5 sections
Given the great number of fault location combinations possible with this model, the latter has
been given a general representation, that is the fault breakers are positioned at each fault distance
on each of the 4 lines making up the model. Considering the case with 4 sections (Figure 7 - 27),
there are three locations on each line where fault breakers have been positioned.

2-7-286
Lines and Cables
Distributed Parameters Lines

Figure 7 - 27 Quadruple line with fault - case with 4 sections


As shown in the figure 7 - 27, 12 fault elements are available, but only 3 or 4 (and not more than
1 per line) can be operated. The breakers that will be operated are those set by the fault distance
parameters.
For example, given the following parameters:
Fault distance - line 1: 85 km

2-7-287
Lines and Cables
Distributed Parameters Lines

Fault distance - line 2: 40 km


Fault distance - ligne 3: 140 km
Fault distance - line 4: 40 km
The following elements will be operated: Flt1_2 (line 1), Flt2_1 (line 2), Flt3_3 (line 3) and
Flt4_1 (line 4). Here again, if the number of sections asked does not correspond to the fault dis-
tances entered by the user, Hypersim would give an error and stop the study.

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

Figure 7 - 28 Coupled line with fault control panel

2-7-289
Lines and Cables
PI Line Sections

7.3 PI LINE SECTIONS1

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

Figure 7 - 29 PI section equivalent diagram

B PI Line Icon
and Diagram

Figure 7 - 30 PI line icon and diagram

PI

Figure 7 - 31 PI line with fault icon and diagram

1.IOn order to simplify the text, the PI line sections are called PI lines in this Chapter.

2-7-290
Lines and Cables
PI Line Sections

C Parameter
Description

D General Base MVA: Base power in MVA


Parameters
Base Volt: Line base voltage - phase to ground kV
Base Freq: Base frequency (Hz)
Length: Line length (km);
Data base key name: Key to access the line data base (optional package).

E EMTP Fault/file: to reset values / calculation of parameters


Geometric
File name: EMTP or Inpurdue format file containing the geometric parameters of the lines.
parameters
The EMTP .pun format is not allowed with this model.

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

I Line Signals I1(a,b,c)_bus label: Current in each phase at end 1


I2(a,b,c)_bus label: Current in each phase at end 2

J Fault Signals V(a, b, c)_FLT_line label: Voltage on fault bus (volt);


I(a, b, c, n)_FLT_line label: Fault current (ampere);
CMD(a, b, c, n)_FLT_line label: Command for states of phase and ground breakers.

2-7-291
Lines and Cables
PI Line Sections

K PI Lines
Control
Panels

Figure 7 - 32 PI line control panel

2-7-292
Lines and Cables
PI Line Sections

Figure 7 - 33 PI line with fault control panel

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

Run the program.


The electrical parameters are displayed in the Line Data report.

O Transfert The transfert of electrical parameters to Hypersim is very simple.


Electrical
Parameters In Hypersim GUI, edition mode, draw a network with lines.
to Hypersim Go to simulation mode.
Lines
Go to the Line Data GUI, you will see all the names of the lines in you network at the bot-
tom of the page.
To transfert electrical parameters, choose the name of the line and them apply parameters.
See the parameters in the forms of the line.

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

Figure 7 - 34 Coupled PI Line Icon and Diagram

1.1 1.2

PI C
2.1 2.2

Figure 7 - 35 Coupled PI line with fault icon and diagram

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

Figure 7 - 36 Coupled PI line control panel

2-7-296
Lines and Cables
PI Line Sections

Figure 7 - 37 Coupled PI line with fault control panel

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

Figure 7 - 38 Triple PI line icon and diagram

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

Figure 7 - 39 Quadruple PI line icon and diagram

1.1 1.2

2.1 2.2

PI 4
3.1 3.2

4.1 4.2

Figure 7 - 40 Quadruple PI line with fault icon and diagram

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

Figure 7 - 41 Triple PI line control panel

2-7-300
Lines and Cables
PI Line Sections

Figure 7 - 42 Quadruple PI line control panel

2-7-301
Lines and Cables
PI Line Sections

Figure 7 - 43 Quadruple PI line with fault control panel

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

7.4 MARTI LINES


The Marti line model is used to represent transmission lines with frequency dependent distributed
parameters.

Is Ir
Zeq Zeq
+ +

Vs bs br Vr

Figure 7 - 44 Marti model of a line with frequency dependent parameters


A Icons and The following icons and diagrams are used to represent respectively the Marti model of a 2-phase,
diagrams of 3-phase and 4-phase lines and the Marti model of a 4-phase line.
Marti models
of lines

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

B Parameter 1 General parameters.


description
Length: The length of the line (km);
Data base key name: Key to access the line data base (optional package).
2 Mode parameters.

Source of parameters (control panel, EMTP file): Specifies the source of the parameters;
EMTP file: The name of the EMTP file containing the line parameters;
R0: Modal resistances for infinite frequency;
T0: Delay for modal propagation;
nZ: Number of poles for impedance functions and maximum number of poles;
nA: Number of poles for propagation functions and maximum number of poles;
Ti: Transformation matrix;
KZ: Residues of impedance function;
PZ: Pole of modal impedance function;
KA: Residues of modal propagation function;
PA: Pole of modal propagation function.

C List of 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

Figure 7 - 48 Geometrical parameters of a single cable

40 m

0 150 m 300 m 450 m

Figure 7 - 49 Cable arrangement

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

BEGIN NEW DATA CASE


C JMARTI SETUP
C HVDC DC CABLE CONSTANT
C CABLE CONSTANTS JMARTI SETUP
C REVISION DATE 1996.06.13 (CA-3) TYPE: PROTO-3
C (E=2.80)
CABLE CONSTANTS 1
C --+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
2 -1 1 0 1 1 1 2
3
C NO.1
12.50E-3 37.50E-3 60.00E-3 66.00E-3 73.60E-3 89.25E-3 94.00E-3
2.16E-8 1.0 1.0 2.80 22.00E-8 1.0 1.0 2.3
14.00E-8 10.0 1.0 4.0
0.21 0.1 50700.0
.NODES BUS1A BUS2A BUS1B BUS2B
C
.FIT-S 30
C ---RHO------><-----FREQ---->IDEC>IPNT><length>
0.21 0.0001 8 20 50700.0
BLANK ENDING FREQUENCY CARDS
BLANK
BLANK

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

Figure 7 - 51 The data form for a 2-phase Marti model (Page 1)

2-7-307
Lines and Cables
Marti Lines

Figure 7 - 52 The data form for a 2-phase Marti line (Page 2)

2-7-308
Lines and Cables
Marti Lines

Figure 7 - 53 The data form for a 2-phase Marti line (Page 3)

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

-10.20 m 10.20 m Neutral

N1 N2

Pole 1 Pole 2

58.0 m
45.00 m

= 300-m

Figure 7 - 54 Arrangement of the conductors for a D.C. line to be


modelled by a 4-phase Marti model

50 cm

3,84 cm
o
45

Figure 7 - 55 Details of a conductor bundle

2-7-310
Lines and Cables
Marti Lines

Sag

Y m ea n= Ytower (2/3) sag


Ytower Y m ea n

Figure 7 - 56 Line heights

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

BEGIN NEW DATA CASE


C JMARTI SETUP
C HVDC DC LINE CONSTANT
C REVISION DATE 1996.06.13 (OH-3) TYPE: PROTO-3
C BRANCH
LINE CONSTANTS
C 345678901234567890123456789012345678901234567890123456789012345678901234567890
LINE-MODEL FD-LINE QREAL LOG 0.0001 20 8
METRIC
C ><SKN><RESIS ><><REACT >< DIAM >< HORIZ><YTOWER><YMID ><SPEAK ><ALPH><NAME><>
10.375 0.0353 4 3.84 10.2 45.0 25.73 50.0 45.0 4
20.333 0.0458 4 3.42 10.2 58.0 39.22 50.0 2
30.333 0.0458 4 3.42 -10.2 58.0 39.22 50.0 2
40.375 0.0353 4 3.84 -10.2 45.0 25.73 50.0 45.0 4
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><>
300. 0.1 50.9
.NODES BUSP1K BUSP1M BUSN1K BUSN1M BUSN2K BUSN2M
BUSP2K BUSP2M
.FIT-S 30
BLANK ENDING FREQUENCY CARDS
BLANK
BLANK

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

2.124338189429190171D-01 1.924036334921463531D+00 5.028884404205944847D+00


2.270839272506772488D+01 1.005120632103304530D+02 1.728685079097975006D+02
3.260014906770318817D+02 9.230572847123396514D+02 1.039769622449470944D+03
1.104436574501146879D+03 2.317426161133841561D+03 4.642998362234140586D+03
3.169056986486492860D+03 2.328272207020388669D+04 -3.911681296616907730D+03
2.223404209406260133D-03 3.158973565128211838D-03 4.620224846946283971D-03
6.553228186189036762D-03 9.359945697033484474D-03 1.367597714546365216D-02
1.967682124234779867D-02 2.984507701838491969D-02 4.679117422496081174D-02
7.842264240354916705D-02 9.052468308324533586D-02 1.855867115050435778D-01
3.615974033037598345D-01 5.763849865435555220D-01 8.356366705416022889D-01
3.421543779670204177D+00 6.041710511465915090D+00 1.039910214779839137D+01
1.858317266760856157D+01 6.389692526674280515D+01 1.331847429808593120D+02 PA
1.379898712321664505D+02 5.845725360525605083D+02 7.777991820967040439D+02
1.685455106787059549D+03 3.509811211668321448D+03 5.820471132514062447D+03
9.183896296573060681D+03 1.248690908732375465D+04 1.580547218124728533D+04
1.951304167973025324D+04 2.671587666179315056D+04 3.268633661035108526D+04
4.007253813554433145D+04 6.087350060935598594D+04 5.646628840528698638D+05

-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

Figure 7 - 58 The EMTP .pun file corresponding to


the input file in Figure 7 - 57

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

Figure 7 - 59 The EMTP .pun file corresponding to


the input file in Figure 7 - 57
From the results in Figures 7 - 58 and 7 - 59, the user can manually fill in the data form shown in
Figures 7 - 60 and 7 - 61. However, it is much more convenient to provide the parameters of a
Marti line by specifying where this file is located.

2-7-313
Lines and Cables
Marti Lines

Figure 7 - 60 The control panel for a 4-phase Marti line (Page 1)

2-7-314
Lines and Cables
Marti Lines

Figure 7 - 61 The control panel for a 4-phase Marti line (Page 2)

2-7-315
Lines and Cables
Marti Lines

Figure 7 - 62 The control panel for a 4-phase Marti line (Page 3)

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

-8.99m 8.99m ground bundles

-12.80m 12.80m

phase A phase B phase C

32.92m
20.73m

= 100-m

Figure 7 - 63 Arrangement of the 735kV line conductors in the example

45,72cm

3,556 cm
o
45

Figure 7 - 64 Details of a conductor bundle

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

C LINE-MODEL FD-LINE QREAL LOG 0.1 20 5


C METRIC
C 10.375 0.0450 4 3.556 -12.80 20.73 20.73 45.72 45.0 4
C 20.375 0.0450 4 3.556 0.00 20.73 20.73 45.72 45.0 4
C 30.375 0.0450 4 3.556 12.80 20.73 20.73 45.72 45.0 4
C 00.500 3.605 4 1.111 -8.99 32.92 32.92
C 00.500 3.605 4 1.111 8.99 32.92 32.92
C LINE LENGTH = 2.0000E+02 KM
C TRANSFORMATION MATRIX AT F = 6.0000E+01 HZ
C
-1WED7_aESD7_a 1. -2 3
16 4.34653586960114296289E+02
1.851419703226241325D+02 2.590514312325236460D+03 -3.127957343905229209D+03
...
4.483556445570410142D+04 6.308395833257218328D+04 1.153384636619750963D+05
5.251121673719295068D+05
...
1.171430098321246533D+03 1.991595784569215539D+03 6.894394054349084399D+03
3.159058128914844201D+04
21 7.06384946825246249485E-04
1.904258889256747349D-05 3.524754126773281711D-04 3.625569758395469073D-04
...
4.910483664067133213D+04 5.673099278531855816D+04 5.678719061525723373D+04
-2WED7_bESD7_b 1. -2 3
15 2.29021065423786012616E+02
1.631088231880090405D+02 5.113431558652671924D+02 1.446861730977163461D+04
...
3.214491323468353556D+01 5.052372264795839385D+01 3.620791801335191394D+03
18 6.65071879890839485865E-04
2.747596429699603377D-05 1.188730150254640149D-03 1.367079163808397179D-03
...
2.117885737552492355D+04 6.931031794019443623D+04 3.128498942513289512D+05
-3WED7_cESD7_c 1. -2 3
11 2.76565769130997750835E+02
1.701832497454142583D+02 5.024925533556538539D+03 -5.873665913459929470D+03
...
2.961376653035809170D+01 4.023101487974561678D+03
20 6.70364152859894779982E-04
2.503675227104941751D-05 1.053032514606297865D-03 1.074039267770130878D-03
...
2.322205218597832572D+04 3.185514435311620400D+04 4.446687261054346163D+04
1.485183292621208820D+05 2.191337673961671826D+05
C Q MATRIX BY ROWS (IMAGINARY PART = 0)
0.59520424 -0.41318575 -0.70710678
0.00000000 0.00000000 0.00000000
0.53987156 0.81151353 -0.00000001
0.00000000 0.00000000 0.00000000
0.59520425 -0.41318573 0.70710679
0.00000000 0.00000000 0.00000000

Figure 7 - 66 The EMTP .pun file corresponding to


the input file in Figure 7 - 65
From the results in Figure 7 - 66, the user can fill in manually the data form shown in Figures 7 -
67 and 7 - 68. However, it is much more convenient to provide the parameters of a Marti line by
specifying where this file is located.

2-7-319
Lines and Cables
Marti Lines

Figure 7 - 67 The data form for a 3-phase Marti model (General)

2-7-320
Lines and Cables
Marti Lines

Figure 7 - 68 The data form for a 3-phase Marti line (Impedance)

2-7-321
Lines and Cables
Marti Lines

Figure 7 - 69 The data form for a 3-phase Marti line (Weighting)

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.

Figure 7 - 70 DC cable model

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

B Description 1 General parameters.


of
parameters Length: Length of cable (km);
Data base key name: Access key to the line database (Optional Package).
2 Impedance of grounded shield .

Z1 (side 1): Impedance for shield grounding, side 1;


Z2: Impedance for shield grounding, side 2.

C Mode Source of parameters Form (control panel)/ EMTP File);


parameters
EMTP File: Name of EMTP file with the cable parameters;
R0: Modal resistances for infinite frequency;
T0: Delay of 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: Transform matrix;
KZ: Residues of impedance function;
PZ: Pole for modal impedance function;
KA: Residues of modal propagation function;
PA: Pole for modal propagation function;

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

Figure 7 - 72 The data form for a DC cable (Page 1)

2-7-324
Lines and Cables
Marti Lines

Figure 7 - 73 The data form for a DC cable (Page 2)

2-7-325
Lines and Cables
Marti Lines

Figure 7 - 74 The data form for a DC cable (Page 3)

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.

8.1 THREE-PHASE LINEAR AND SATURABLE TRANSFORMERS


A Icons and The following icons and diagrams are used to represent the different three-phase transformers
Diagrams of available with Hypersim. The number of windings is specified directly on the diagram represent-
Three-Phase ing the selected transformer.
Transformers

Three-Phase Linear Transformer with 2 Windings

Three-Phase Saturable Transformer with 2 Windings

Three-Phase Linear Transformer with 3 Windings and Internal


Tertiary

Three-Phase Saturable Transformer with 3 Windings and Internal


Tertiary

Three-Phase Linear Tans former with 3 Windings

Three-Phase Saturable Transformer with 3 Windings

1
TrF3 Three-Phase Zigzag Transformer (Linear) with 3 Windings
2 3

Figure 8 - 1 Icons and Diagrams of Three-Phase Transformers

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

Figure 8 - 2 Single-phase representation of a linear transformer

L2 R2
R1 L1

Rm Lsat

L3 R3

Figure 8 - 3 Single-phase representation of a saturable transformer

C General Base MVA: Base power per phase in MVA;


Parameters
Base Freq: Base frequency in hertz;
Vbase primary: Base voltage on the primary of the transformer in kV rms;
Vbase secondary: Effective base voltage on the secondary in kV rms.

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

Y floating: Floating Y connection;


Delta lead: Delta connection with lead of 30
Delta lag: Delta connection with lag of 30
Delta ground: Grounded delta connection;
Vnom.: Rated voltage of winding (kV rms);
R1, L1: Leakage resistance (ohm) and inductance (henry) of winding 1;
R2, L2: Leakage resistance (ohm) and inductance (henry) of winding 2;
R3, L3: Leakage resistance (ohm) and inductance (henry) of winding 3;
Note : To simplify the representation, the leakage inductances of the secondary windings are
used to highlight the decoupling element. This element is internal to the transformer
model and the user cannot access it.
Znxx: Neutral impedance where the first x specifies the winding and the second x specifies
the impedance number for a given winding (only applies to a Yg winding).
Note : Only applies to a zigzag transformer. In such a case, the primary and tertiary windings
are connected to form a zigzag. The user specifies the phase shift with respect to the
reference winding. The only model in this category does not show any saturation.
Default, Lagging and Leading: Selection of the type of phase shift with respect to the
reference winding.
Vnom (zigzag)/winding: Rated voltage of the zigzag winding.

F Saturation 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

Figure 8 - 4 Saturation curve of a saturable transformer

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

Figure 8 - 5 Control panel of a linear transformer


with two windings (general)

2-8-333
Transformers
Three-Phase Linear and Saturable Transformers

Figure 8 - 6 Control panel of a linear transformer


with two windings (neutral impedance)
Figures 8 - 7, 8 - 8 and 8 - 9 show the control panel of a three-phase saturable transformer with
two windings per phase.

2-8-334
Transformers
Three-Phase Linear and Saturable Transformers

Figure 8 - 7 Control panel of a saturable transformer


with two windings (general)

2-8-335
Transformers
Three-Phase Linear and Saturable Transformers

Figure 8 - 8 Control panel of a saturable transformer


with two windings (neutral impedance)

2-8-336
Transformers
Three-Phase Linear and Saturable Transformers

Figure 8 - 9 Control panel of a saturable transformer


with two windings (saturation)

2-8-337
Transformers
Three-Phase Linear and Saturable Transformers

Figure 8 - 10 Control panel for a saturable transformer


with 2 windings (hysteresis and saturation)
Figures 8 - 11 and 8 - 12 show the control panels related to a three-phase zigzag transformer.

2-8-338
Transformers
Three-Phase Linear and Saturable Transformers

Figure 8 - 11 Control panel of a zigzag transformer with


3 windings (general)

2-8-339
Transformers
Single-Phase Linear and Saturable Transformers

Figure 8 - 12 Control panel of a zigzag transformer with


3 windings (neutral impedance)

8.2 SINGLE-PHASE LINEAR AND SATURABLE TRANSFORMERS


A Introduction These transformers are mainly used to simulate single-phase networks or circuits. They can be
linear or saturable. Their characteristics are identical to those of three-phase transformers.

B Icons and 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

Figure 8 - 13 Icons and diagrams of single-phase transformers

C General Base MVA: Base power per phase in MVA


Parameters
Base Freq: Base frequency in hertz
Vbase primary: Effective base voltage on the primary of the transformer in kV rms
Vbase secondary: Effective base voltage on the secondary in kV rms

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

E Winding Vnom1, Vnom2: Rated voltage of winding (kV rms);


Parameters
R1, L1: Leakage resistance (ohm) and inductance (henry) of winding 1;
R2, L2: Leakage resistance (ohm) and inductance (henry) of winding 2;
R3, L3: Leakage resistance (ohm) and inductance (henry) of winding 3;
Note : To simplify the representation, the leakage inductances of the secondary windings are
used to highlight the decoupling element. This element is internal to the transformer
model and the user cannot access it.
Znxx: Neutral impedance where the first x specifies the winding and the second x specifies
the impedance number for a given winding (only applies to a Yg winding).

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

Figure 8 - 14 Saturation curve of a saturable transformer

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.

Figure 8 - 15 Single-phase linear transformer with 2 windings:


general parameters
Figures 8 - 16 and 8 - 17 show both control panels required to enter the parameters of a single-
phase saturable transformer with 2 windings.

2-8-343
Transformers
Single-Phase Linear and Saturable Transformers

Figure 8 - 16 Single-phase saturable transformer with 2 windings:


general parameters

2-8-344
Transformers
Single-Phase Linear and Saturable Transformers

Figure 8 - 17 Single-phase saturable transformer with 2 windings:


saturation characteristic

2-8-345
Transformers
Single-Phase Linear and Saturable Transformers

Figure 8 - 18 Single-phase saturable transformer with 2 windings:


(hysteresis and saturation)
Figures 8 - 19 and 8 - 20 show the control panel to fill in for a single-phase saturable transformer
with three windings

2-8-346
Transformers
Single-Phase Linear and Saturable Transformers

Figure 8 - 19 Single-phase saturable transformer with 3 windings:


general parameters

2-8-347
Transformers
Single-Phase Linear and Saturable Transformers

Figure 8 - 20 Single-phase saturable transformer with 3 windings:


saturation characteristic

2-8-348
Transformers
Linear and Saturable Series Transformers

Figure 8 - 21 Single-phase saturable transformer with 3 windings:


hysteresis parameters

8.3 LINEAR AND SATURABLE SERIES TRANSFORMERS


A Introduction These transformers could have been included in the first section dealing with three-phase trans-
formers. However, because of their particular connection (series), they were set apart. They fol-
low the same principle as current transformers. They are mainly used for series devices such as
DVR, active filter, UPFC, etc.

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

Three-Phase Linear Series Transformer with 2 Windings

Three-Phase Linear Series Connection Primary


Transformer with 2 Windings

Three-Phase Saturable Series Connection Primary


Transformer with 2 Windings

Figure 8 - 22 Icons and diagrams of series transformers

C General Base MVA: Base power per phase in MVA;


Parameters
Base Freq: Base frequency in hertz;
Vbase primary: Effective base voltage on the primary of the transformer in kV rms;
Vbase secondary: Effective base voltage on the secondary in kV rms.

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

Figure 8 - 23 Saturation curve of a saturable transformer

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

Figure 8 - 24 Linear series connection primary transformer


with 2 windings: general parameters

2-8-353
Transformers
Linear and Saturable Series Transformers

Figure 8 - 25 Linear series connection primary transformer


with 2 windings: neutral impedance

2-8-354
Transformers
Linear and Saturable Series Transformers

Figure 8 - 26 Saturable series connection primary transformer


with 2 windings: general parameters

2-8-355
Transformers
Linear and Saturable Series Transformers

Figure 8 - 27 Saturable series connection primary transformer


with 2 windings: neutral impedance

2-8-356
Transformers
Linear and Saturable Series Transformers

Figure 8 - 28 Saturable series connection primary transformer


with 2 windings: saturation characteristic

2-8-357
Transformers
Three-Phase Transformers with Tap Changer

Figure 8 - 29 Series saturable transformer with branch joint on the


primary with 2 windings (hysteresis and saturation)

8.4 THREE-PHASE TRANSFORMERS WITH TAP CHANGER


A Introduction The transformer models with tap changer (including converter transformers) are designed to be
used when the voltage needs to be set. This is often the case with electronic power converters (rec-
tifier, inverter, etc.). The first type of converter transformer has three windings per phase: a Y pri-
mary with grounding impedance, a floating Y secondary and a delta tertiary. The grounding of
the primary can be done using a series RLC impedance. To set the voltage, these transformers are
often equipped with taps on the primary. All of these transformers have saturation

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

TrOD Saturable transformer with tap changer, 3 windings

2 3

Figure 8 - 30 Icons and Diagrams of Transformers with Tap Changer

C General Base MVA: Base power per phase in MVA;


Parameters
Base Freq: Base frequency in hertz;
Vbase primary: Base voltage on the primary of the transformer in kV rms
Vbase secondary: Base voltage on the secondary in kV rms
Rm: Magnetization losses equivalent resistance of iron losses for the magnetic circuit
(ohm);

D Winding V nom.: Rated voltage in kV rms;


Parameters
R1: Leakage resistance (ohm) of winding 1 (primary);
Per Phase
R2, L2: Leakage resistance (ohm) and inductance (henry) of winding 2 (Y secondary);
R3, L3: Leakage resistance (ohm) and inductance (henry) of winding 3 ( secondary);
Zn: Neutral impedance (ohm, H, F).

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

Tap change order


(up or down)

Timing
rate

Start tap change

Operating time

Effective change

Figure 8 - 31 Tap changing sequence

H Control Panel Figures 8 - 32 to 8 - 35 show the control panel of a converter transformer.


of Tap
Changer
Transformers

2-8-361
Transformers
Three-Phase Transformers with Tap Changer

Figure 8 - 32 Tap changer transformer with decoupling element (general)

2-8-362
Transformers
Three-Phase Transformers with Tap Changer

Figure 8 - 33 Tap changer transformer with decoupling element (control)

2-8-363
Transformers
Three-Phase Transformers with Tap Changer

Figure 8 - 34 Tap changer transformer with decoupling element (saturation)

2-8-364
Transformers
Three-Phase Transformers with Tap Changer

Figure 8 - 35 Tap changer transformer with decoupling element (hysteresis)

2-8-365
Transformers
Measuring Transformers

8.5 MEASURING TRANSFORMERS


A Introduction There are three models of measuring transformers in Hypersim. These are voltage transformers
with capacitive coupling, current transformers and finally voltage transformers with magnetic
coupling.

B Icons and
Diagrams

Voltage Transformer with Capacitive Coupling

CTYI Current Transformer

PT PTYN Voltage Transformer with Magnetic Coupling

Figure 8 - 36 Icons and diagrams of voltage and current transformers

C Capacitive C1, C2: Capacitances of voltage divider (farad);


Divider
Rc, Lc, Cc: Respectively resistance (ohm), capacitance (farad) and inductance (henry) of
the tuning circuit. The values of these parameters are chosen so that the resonance fre-
quency of the series impedance on the secondary side is 60 Hz.

D Primary Number of turns: (default: np = 18240);


Winding
Rp, Lp: Leakage resistance (ohm) and inductance (henry);
Parameters
Rm: Resistance (ohm) representing magnetization losses;
Cp: Stray capacitance (farad);
Saturation parameters:
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;
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;

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.

E Secondary Number of turns: (default: ns = 100);


Winding
Rs, Ls: Leakage resistance (ohm) and inductance (henry);
Parameters
R, RL, LL: Resistances (ohm) and load inductance (henry).

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

Figure 8 - 37 Control panel of a voltage transformer


with capacitive voltage divider (general)

2-8-368
Transformers
Measuring Transformers

Figure 8 - 38 Control panel of a voltage transformer


with capacitive coupling (saturation)

2-8-369
Transformers
Measuring Transformers

Figure 8 - 39 General parameters of a current transformer (general)

2-8-370
Transformers
Measuring Transformers

Figure 8 - 40 Winding connection in a current transformer (configuration)

2-8-371
Transformers
Measuring Transformers

Figure 8 - 41 Saturation characteristic of a current transformer (saturation)

2-8-372
Transformers
Measuring Transformers

Figure 8 - 42 Saturation characteristic of a current transformer (hysteresis)

2-8-373
Transformers
Measuring Transformers

Figure 8 - 43 Voltage transformer with magnetic coupling (general)

2-8-374
Transformers
Measuring Transformers

Figure 8 - 44 Voltage transformer with magnetic coupling (saturation)

2-8-375
Transformers
Measuring Transformers

Figure 8 - 45 Voltage transformer with magnetic coupling (general)

2-8-376
Transformers
Measuring Transformers

Figure 8 - 46 Voltage transformer with magnetic coupling (configuration)

2-8-377
Transformers
Measuring Transformers

Figure 8 - 47 Voltage transformer with magnetic coupling (saturation)

2-8-378
Transformers
Measuring Transformers

Figure 8 - 48 Voltage transformer with magnetic coupling (hysteresis)

2-8-379
Transformers
Measuring Transformers

THIS PAGE IS INTENTIONALLY LEFT BLANK

2-8-380

Chapter 9
LOADS AND MOTORS

9.1 DYNAMIC LOAD

Dynamic Loads

Properties: Main features:


The dynamic loads are The dynamic load models cor-
used to simulate sub-sys- rectly reproduce the behaviour of
tems at a port that is to be a load for the slow modulations of
Dynamic Loads

represented by the varia- the fundamental voltage imposed


tions of the active and by the power system dynamics
reactive powers as a func- and for fast transient phenomena
tion of the fundamental resulting from the switchings.
voltage and frequency.

Figure 9 - 1 Icon and Diagram 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

and if the voltage at the load terminals V < Vmin


(EQ 3)
2 f f0
np 2 U - 1 + T p1 s
P = P 0 ( V min ) -------------
np 1 + T s
-------------------
- + kp ,
-----------
f0
U0 p2

(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

Figure 9 - 2 Block diagram of dynamic load


This model is only valid for a fundamental frequency between 50 Hz and 70 Hz.

B General Base MVA: Rated power (MVA);


Parameters
Base Volt: Base voltage (kV);
Base Frequency: Base frequency Hz;
ON/OFF Dynamic load (Enable/Disable): If Enable, the load is ON; if Disable, the
load is OFF;
ON/OFF Measuring filters (Enable/Disable): If Enable, the measuring filters are ON, and
if Disable, the filters are OFF;

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;

U : Reference voltage of the load (pu);

V min : Voltage threshold below which the load behaves as a constant impedance (pu);

2-9-383
Loads and Motors
Dynamic Load

C Load Rs: Series resistance (ohm);


Parameters
Ls: Series inductance (H);
Rp: Shunt resistance (ohm);
Lp or Cp: Shunt inductance or capacitance;
np: Active power variation coefficient as a function of the voltage (generally between 1 and
2);
nq: Reactive power variation coefficient as a function of the voltage (generally between 1
and 3);
kp: Active power variation coefficient as a function of the frequency (generally between 0
and 2);
kq: Reactive power variation coefficient as a function of the frequency (generally between
0 and -3).
Tp1: Time constant to calculate the active power of the load.
Tp2: Time constant to calculate the active power of the load.
Tq1: Time constant to calculate the reactive power of the load.
Tq2: Time constant to calculate the reactive power of the load.

D 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);

E Dynamic Figure 9 - 3 shows the dynamic load control panel.


Load Control
Panel

2-9-384
Loads and Motors
Dynamic Load

Figure 9 - 3 Dynamic load control panel

Dynamic Load example

Figure 9 - 4 shows a typical example of a Dynamic Load scenario.

2-9-385
Loads and Motors
Dynamic Load

Figure 9 - 4 Example using the dynamic load

2-9-386
Loads and Motors
Harmonic Load

9.2 HARMONIC LOAD

Harmonic Load

Properties: Main features:


The harmonic load model The harmonic load model consists
represents the different of three elements:
types of industrial loads.
Dynamic load;
This flexible model allows
Harmonic Load

users to accurately charac- Random load;


terize loads with a high Harmonic current source.
harmonic content and to
add random power varia-
tions.

Figure 9 - 5 Icon and diagram harmonic load


A Harmonic The harmonic load model consists of three elements: a dynamic load, a random load and a har-
Load monic current source. The block diagram for the implementation of a harmonic load model is
Introduction shown in Figure 9 - 6. This implementation is the same as for a dynamic load, except that the in-
ternal voltage source can also generate harmonics. The value of the internal voltage for this volt-
age source allows users to inject the adequate power and dynamic loads into the network.
In the network, the harmonic load acts as a load that absorbs a reactive power and an active power
as a function of the voltage and frequency levels. Equations (EQ 5) to (EQ 8) describe the com-
plete behavior of the harmonic load. It can be observed that the harmonic load will vary according
to the level of the threshold voltage Vmin.
Hence, if the voltage at the load terminals U > Vmin
(EQ 5)
U np 1 + T p1 s f f0
P = P 0 ------- -------------------- + kp -----------
U0 1 + T p2 s f0

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

And, if the voltage at the load terminals V < Vmin


(EQ 7)
2 f f0
np 2 U - 1 + T p1 s
P = P 0 ( V min ) -------------
np 1 + T s
-------------------
- + kp ,
-----------
f
U0 p2 0

(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

Figure 9 - 6 Block diagram of harmonic load model


This model is only valid for a fundamental frequency between 50 Hz and 70 Hz.

B General Base MVA: Rated power (MVA);


Parameters
Base Volt: Base voltage (kV);
Base frequency: Rated frequency (Hz);
Dynamic Load ON/OFF (Enable/Disable): If Enable, the load is ON; if Disable, the
load is OFF;
Measuring Filter ON/OFF (Enable/Disable): If Enable, the measuring filters are ON; if
Disable, the filters are OFF;

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;

U 0 : The reference voltage of the load (pu);

V min : Threshold below which the load behaves as a constant impedance (pu);

2-9-389
Loads and Motors
Harmonic Load

C Load Rs: Series resistance (ohm);


Parameters
Ls: Series inductance (H);
Rp: Shunt resistance (ohm);
Lp or Cp: Shunt inductance or capacitance (H);
np: Active power variation coefficient as a function of the voltage (generally between 1 and
2);
nq: Reactive power variation coefficient as a function of the voltage (generally between 1
and 3);
kp: Active power variation coefficient as a function of the frequency (generally between 0
and 2);
kq: Reactive power variation coefficient as a function of the frequency (generally between
0 and -3).
Tp1: Time constant to calculate the active power of the load.
Tp2: Time constant to calculate the active power of the load.
Tq1: Time constant to calculate the reactive power of the load.
Tq2: Time constant to calculate the reactive power of the load.

D Random SeedPQ: Root for the random generation of P and Q.


Variation
Parameters Seedt: Root for the random generation of each interval.
P distribution (Uniform / Gaussian): Distribution choice for P
Pmin: In the case of a uniform distribution, minimum value of P.
Pmax: In the case of a uniform distribution, maximum value of P.
Pmoy: In the case of a gaussian distribution, average value of P.
Pvar: In the case of a gaussian distribution, variance value of P.
Q distribution (Uniform / Gaussian): distribution choice for Q
Qmin: In the case of a uniform distribution, minimum value of Q.
Qmax: In the case of a uniform distribution, maximum value of Q.
Qmoy: In the case of a gaussian distribution, average value of Q.
Qvar: In the case of a gaussian distribution, variance value of Q.
Tmin: Minimum time interval between two changes of P and Q. The distribution is
always uniform between Tmin and Tmax.
Tmax: Maximum time interval between two changes of P and Q. The distribution is
always uniform between Tmin and Tmax.

2-9-390
Loads and Motors
Harmonic Load

E Harmonic Harmonic numbers: The number of each harmonic to inject as current.


Parameters
Harmonic current amplitude: Current amplitude for each harmonic. In percentage relative
to the current of the fundamental.
Harmonic current phase: Current phase for each harmonic. In degrees relative to the phase
of the fundamental.

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

Figure 9 - 7 Harmonic load control panel (general)

Figure 9 - 8 Harmonic load control panel (random)

2-9-392
Loads and Motors
Harmonic Load

Figure 9 - 9 Harmonic load control panel (harmonic)

Harmonic Load Example

Figure 9 - 10 shows a typical example of an Harmonic Load scenario.


Enter the following parameters in the Parameters for Harmonic Current Source in the control
panel (Harmonic Tab).
Note : Model of a 6 pulse D.C. motor drive.

2-9-393
Loads and Motors
Harmonic Load

Figure 9 - 10 Example using the harmonic load

2-9-394
Loads and Motors
D.C. Motor

9.3 D.C. MOTOR

DC Motor

Properties: Main features:


The D.C.motor model rep- Two common types of industrial
resents both the static and motors.
dynamic behaviours of Type of connections of either
two types of industrial rotoric and statoric circuits:
DC Motor

D.C. motors: shunt and Parallel connection (shunt)


separately excited or;
Two distinct circuits

Figure 9 - 11 Icon and diagram dc motor


A DC Motor The following equations govern the voltages of the motor as a function of the currents:
Introduction
vf = rfif + df/dt
va = raia + da/dt
where
vf: voltage at the terminals of the stator winding
if: current in the stator
rf: resistance of stator winding
f: flux in the stator
va: voltage at the terminals of the rotor winding
ia: current in the rotor
ra: resistance of the rotor winding
a: flux in the rotor
The fluxes can be expressed as follows:
f = Lffif + Lfaia

2-9-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

Figure 9 - 12 Simplified diagram of D.C. shunt motor

B Motor R rotor: (ra) resistance of rotoric winding (ohm)


Parameters
L rotor: (Laa) inductance of rotoric winding (henry)
R stator: (rf) resistance of statoric winding (ohm)
L stator: (Lff) inductance of statoric winding (henry)
L mutual: (Laf) mutual inductance between the stator and the rotor (henry)

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.

F D.C. Motor Figure 9 - 13 shows the control panel of a D.C. motor.


Control Panel

Figure 9 - 13 DC motor control panel

Figure 9 - 14 shows typical example using a DC Motor.

2-9-398
Loads and Motors
D.C. Motor

Figure 9 - 14 Example using a D.C. motor

2-9-399
Loads and Motors
Arc Furnace

9.4 ARC FURNACE


A Arc Furnace The A.C. arc furnace model represents both the static and the dynamic behavior of the arc resis-
Introduction tance. The characteristic of the furnace depends on the active power consumption which varies
with the different operating conditions.This model is used to study the harmonics returned to the
network and also to study the wave quality, particularly the voltage flicker.

Figure 9 - 15 A.C. arc furnace icon and diagram

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

Figure 9 - 16 Block Diagram of Arc Furnace

C General Phase: number of phases (3)


Parameters
Characteristics: characteristics of arc resistance. 1 Static: no variation of furnace resistance
value before ignition. 2 Sinusoidal: modulation, following a low frequency sinus, of the fur-
nace resistance value before ignition. 3 White noise: random variation, following a low fre-
quency white noise, of the furnace resistance value before ignition. Only one type can be
selected at a time.

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);

H A.C. Arc Figure 9 - 17 shows the arc furnace control panel.


Furnace
Control Panel

2-9-402
Loads and Motors
Arc Furnace

Figure 9 - 17 Arc furnace control panel

Example using an arc furnace

2-9-403
Loads and Motors
Arc Furnace

Figure 9 - 18 Arc furnace example

2-9-404
Loads and Motors
Induction Motor

9.5 INDUCTION MOTOR

Induction Motor

Properties: Main features:


This model is general The model is equipped
Induction Motor

enough to represent most with connectors to the con-


industrial three-phase trol module in order to
induction motors with 1 or facilitate modelling of the
2 squirrel cage rotors or mechanical load.
with wound rotors

Figure 9 - 19 Icon and diagram induction motor


A Induction The induction motor model can be represented by four pairs of equations.
Motor Model
The electrical equations convert the voltage signals into electrical fluxes in a DQ Park represen-
tation. A saturation relation introduces the non-linearity of mutual inductance in the motor. The
current equations convert the fluxes for both rotor and stator into currents on the DQ axes. Finally,
the mechanical equations represent the rotor speed, using mechanical and electrical torques and
taking into account inertia and friction.
Electrical flux equations:
(EQ 9)
b rs
qs = ------ v qs ------ ds + ------- ( mq qs )
s b X ls

(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

X aq = X ad = ------- + ------- + --------- + ---------


1 1 1 1 1
X M X ls X lr1 X lr2

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

Llr2 ( - r) qr1 Rr1


Rotor 1
+ -
D Axis +
Rs ( - 0) ds Lls
Idr1
+
- + Llr2 ( - r) qr2 Rr2
Rotor 2
+ -
+ Vdr1
Vqs Ids Lm Idr2
Stator
Vqr2
- - -

Llr2 ( - r) dr1 Rr1


Rotor 1
+ -
Q Axis +
Rs ( - 0) ds Lls
Iqr1
- + Llr2 ( - r) dr2 Rr2
+ Rotor 2
+ -
+ Vqr1
Vqs Iqs Lm Iqr2
Stator Vqr2
- - -

Figure 9 - 20 Steady-state representation of induction motor model


Hence, depending on the selected motor configuration, the rotoric circuit will be simple or double.
The values for Vdr and Vqr are zero since a squirrel cage rotor is being modeled. In the case of a
coiled rotor, a startup resistance value can be set on the rotor and is added to Rr1.

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

D Motor R Stator: stator resistance (ohm);


Parameters
Xl Stator: stator reactance (ohm);
R Rotor 1: no 1 rotor resistance (ohm);
Xl Rotor 1: no 1 rotor reactance (ohm);
R Rotor 2: no 2 rotor resistance (ohm);
Xl Rotor 2: no 2 rotor reactance (ohm);
Xm: mutual reactance (ohm).

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

F Mechanical H: inertia constant (second);


Load
Friction: viscous friction (pu).
Parameters
The internal mechanical load can be characterized by a five point search table. The user provides
the mechanical torque value Tmec for each rotor speed (Wmec). The Wmec five point vector is in
electrical radians/second. The Tmec vector allows users to modelize any type of non-linear me-
chanical load according to the speed signal.
Wmec: Speed vector (electrical radians/s);
Tmec: Mechanical torque vector (N.m).

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

Iqr_label: Quadrature axis current of rotor no 1 (A);


I(a,b,c)r_label: Rotor no 1 currents (A);
Tmec_label: Mechanical torque (N.m);
Te_label: Electrical torque (N.m);
wr_label: Rotor speed (electrical rad/s);
w_label: Reference speed for DQ conversion (electrical rad/s;
PHIds_label: Direct axis stator flux (V);
PHIqs_label: Quadrature axis stator flux (V);
PHIdr_label: Direct axis rotor flux (V);
PHIqr_label: Quadrature axis rotor flux (V);
Tmec_i_label: Mechanical torque signal from control module (N.m)

I Induction Figure 9 - 21shows the induction motor control panels.


Motor
Control
Panels

Figure 9 - 21 Induction motor control panel (general)

2-9-410
Loads and Motors
Induction Motor

Figure 9 - 22 Induction motor control panel (torque/load)

2-9-411
Loads and Motors
Induction Motor

Figure 9 - 23 Induction motor control panel (saturation)

2-9-412
Loads and Motors
Induction Motor

Example using an induction motor

Figure 9 - 24 Example using an induction motor

2-9-413
Loads and Motors
Using the Hypersim Dynamic load model

9.6 USING THE HYPERSIM DYNAMIC LOAD MODEL


The present document explains the Hypersim dynamic load model, its applications and how to
determine its parameters.

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

Figure 9 - 25 Single-line diagram of the dynamic load


The series impedance (Rs, Ls) together with the internal voltage E model the motor part of the
load and the system series impedance due to lines and leakage reactances of transformers. The
shunt impedances Rp, Cp represent the resistive load as well as line capacitances and capacitor
banks.
The dynamic load topology shown on Figure 9 - 25 allows modelling the first pole of the positive-
sequence impedance versus frequency curve. The Hypersim dynamic load model also includes a
parallel shunt inductance Lp that can be used instead of Cp .This Rp/Lp shunt topology is rarely
used. It would allow fitting of a combination of circuits presenting no shunt resonance (RL loads
and motor loads). In this document we consider only using Rp and Cp.

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

Industrial 0.85 0.18 6.0 2.6 1.6

In the absence of information on the load composition, the most commonly accepted load model
is to represent active power as constant current (np=1) and reactive power as constant impedance
(nq=2).

Figure 9 - 26 shows variations of active power and reactive power as function of positive-se-
quence voltage for a dynamic load with the following parameters. Frequency is kept constant at
nominal frequency.

P0= 50 MW Q0= 25 Mvar


V0= 0.96 pu

2-9-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.

Figure 9 - 26 Variation of P and Q as function of voltage


(50-MW 25-Mvar load at V0=0.96 pu; Vmin=0.7 pu)

Determination of load parameters

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

Figure 9 - 27 Individual load model to be used in the detailed model


The series impedance Rm, Lm represents the motor impedance (leakage reactance of induction
motor, or subtransient reactance of synchronous motors and generators) in series with distribution
transformers. A reasonable approximation of motor and associated transformer impedance could
be Lm ~ 0.25 p.u. based on motor load power (km*Pi) and Rm=Xm/8 (0.03p.u)
Once the complete system including all individual loads system has been modelled, its impedance
is measured by performing a frequency scan for the desired frequency range (typically 0 to 2
kHz).

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.

Figure 9 - 28 Example of impedance vs frequency curve


25 kV, 80 MW load (50% R, 50% motor)
The four parameters of the dynamic load Rs, Ls, Rp and Cp can be determined from the following
four parameters selected on the impedance curve:
The resistance and reactance at fundamental frequency f0
(R0= 1.47 ohms; X0=3.64 ohms)
The resonance frequency (fmax= 240 Hz).
The impedance magnitude at resonance frequency (Zmax=15.2 ohms).

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)

Shunt branch (Rp/Cp): R p1 = Z max

(EQ 33)
f max 2
X p = X s ---------
f0

From the example given in Figure 9 - 28 with:

f0= 60 Hz; fmax=240 Hz; R0= 1.47 ; X0= 3.64 ; Zmax= 15.2
The following values are obtained:
Series branch: Inductive reactance Xs= 3.88
Shunt branch: Rp1= 15.2 ; Capacitive reactance Xp= 62.1
Once Xs and Xp are known, the resistance Rs is computed as follows:
(EQ 34)
1
R s + jX s = -------------------------------------------------
1 1 - ----- j-
-------------------- ---------
R 0 + jX o Rp1 X p

Equation (4) gives the following results:


Rs= 0.459 ; Xs=3.88

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

From equation (5), the Rp value is 15.6 .


If we summarize, the four parameters computed from equations (1) to (5) are:
Series branch: Rs= 0.459 ; Xs= 3.90 ; (Ls=0.0103 H)
Shunt branch: Rp= 15.6 ; Xp= 62.1 ; (Cp= 42.7 F)
Those values are very close to the exact values found from an iterative solution:
Series branch: Rs= 0.488 ; Xs= 3.90 ; (Ls=0.0103 H)
Shunt branch: Rp= 15.6 ; Xp= 62.5 ; (Cp= 42.4 F)

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

THIS PAGE IS INTENTIONALLY LEFT BLANK

2-9-422

Chapter 10
ELECTRONIC SWITCHES AND BRIDGES

10.1 ELECTRONIC SWITCHES


A Introduction In Hypersim, a switch is modelled as a variable resistance, very low if the switch is closed
and very high if the switch is open. The control signal of the switch may be provided by: an
internal source, by an external source through digital inputs, or the control system module or
by Simulink. In addition to the switch control signal, the opening and the closing of the switch
depends on the voltage across the switch and the current through the switch.

B Icon and 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

Figure 10 - 1 Icons and diagrams of electronic switches

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
.

Figure 10 - 2 Electronic switches command panel

2-10-427
Electronic Switches and Bridges
Serial Breaker and Shunt Fault Breaker

10.2 SERIAL BREAKER AND SHUNT FAULT BREAKER

10.2.1 Shunt and


Serial
Breakers
A Introduction The breaker is simulated as a variable resistance, very low if the breaker is closed and very high
if the breaker is open. The control signals of the breaker may be provided by an internal timing
control, by an external source through control block digital inputs or by Simulink.

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

Figure 10 - 3 Icon and diagram of a serial breaker

A B C P

Figure 10 - 4 Icon and diagram of a fault breaker

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

Figure 10 - 5 Data form for serial breakers (general)

2-10-430
Electronic Switches and Bridges
Serial Breaker and Shunt Fault Breaker

Figure 10 - 6 Data form for serial breakers (timing)

2-10-431
Electronic Switches and Bridges
Serial Breaker and Shunt Fault Breaker

Figure 10 - 7 Data form for fault breakers (general)

2-10-432
Electronic Switches and Bridges
Serial Breaker and Shunt Fault Breaker

Figure 10 - 8 Data form for fault breakers (timing)

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

E Switching Enable or disable the time of operation programed.


Time
Programming

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

Ropen/close Ropen/close Ropen/close

Ground
Ropen/close

Figure 10 - 9 Connection of the triple H-bridge converter

K List of At acquisition, the following signals are made available by sensors:


Available
Signals Com_label_a,b,c: Phase breaker commands (pu)
Com_label_n: Ground connected breaker command (pu) (for fault breaker only)
I_label_a,b,c: Phase breaker currents (pu)
I_label_n: Ground connected breaker current (pu) (for fault breaker only)

10.3 TRIPLE-LEVEL CONVERTER IN H CONFIGURATION


A Introduction Hypersim provides a two-triple-level converter in H configuration. There are 4 switches per
phase for a total of 12. The control signals of the switches can originate from an external source
via digital input, a system control module (control block) or Simulink.

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

Figure 10 - 10 Icon and diagram of a 2 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

Figure 10 - 11 Control Panel of a 2 Triple H-Bridge Converter

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

FailSig1,2,3,4(A,B,C)_label: 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 =
Enable (Grey).
2: Reverse voltage of Thyristor 21 greater than Rbov. (Reset only if fail signal reset =
Enable (Grey).
3: Forward voltage of Thyristor 12 greater than Fbov. (Reset only if fail signal reset =
Enable (Grey).
3: Forward voltage of Thyristor 21 greater than Fbov. (Reset only if fail signal reset =
Enable (Grey).
P_label: Control signal of control module.
D_label: Control signal of control module.

10.4 THREE-LEVEL CONVERTER


A Introduction Hypersim provides for a three-level or Neutral Point Clamped (NPC) converter bridge equivalent.
The NPC converter is composed of 4 controlled (Q1,Q2, Q3, Q4) switches and 6 diodes per phase.
The control signals of the switches can originate from an external source via digital input, a sys-
tem control module (control block) or Simulink. The model emulates the NPC converter by using
an ideal three-level switch (P N, M) per phase - The control signals of the equivalent three-level
switches are generated by the model, based on an integrated logic and the control signals provided
externally. In the blocked mode, when the control pulses are ab sent, the bridge diodes are also
emulated.

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

Figure 10 - 12 Icon and Diagram of a three-level converter

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

Figure 10 - 13 Control Panel of a three-level Bridge or NPC Converter


9 Forward Voltage Drop Does not apply to the actual mode!, minimum forward volt age at
which it is possible to fire the valves. Applies only to diodes, thyristors and
GTO
10 Holding Current Does not apply to the actual model. Current threshold below which the
valve is automatically blocked. Does not apply to ideal switches.

10.4.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.

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

THIS PAGE IS INTENTIONALLY LEFT BLANK

2-10-443
Electronic Switches and Bridges
Three-Level Converter

2-10-444

Chapter 11
HVDC AND SVC CONTROLLERS

11.1 RECTIFIER/INVERTER 6/12 PULSE DC 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.

11.1.2 Icons and


diagrams

REC01
Y +
CC 12
D

R D Id
P V_Line

Figure 11 - 1 Icon and diagram of 12-pulse rectifier

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

Figure 11 - 2 Icon and diagram of 12-pulse inverter

Rec Q7
+
Y
CC 6

R D
P
Id
V_Line

Figure 11 - 3 Icon and diagram of 6-pulse rectifier

InvP1
+
CC 6 Y

I D Id
P V_Line

Figure 11 - 4 Icon and diagram of 6-pulse inverter

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.

1.As it is the case for the equiangular synchronization system

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

Tap Change Demand

Figure 11 - 5 The general diagram of a 12-pulse converter bridge

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

fo Central frequency (hertz)

.
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

Figure 11 - 6 The general diagram of the generic converter control system


At fo frequency, H(s) has a gain of 1 and its phase is zero. As a result, the band-pass filter does
not affect the fundamental component of the voltage (neither in amplitude nor in phase), while it
reduces other harmonic components.
The B parameter (proportional to the pass-band with a typical value of 45 Hz) is used to control
the sensitivity and the speed of the filter. A small bandwidth improves harmonic filtering and
gives less distorted wave-form at the filter output. However, the smaller the bandwidth, the slower
the filter is in following the amplitude and phase fluctuations of the input signals.

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 Voltage regulation


mode

Voltage
min mode
reference
Voltage
margin
V

Current compensated
mode
Current regulation Current regulation
mode mode

I
Current margin

current
rectifier
Current
inverter reference

Figure 11 - 7 Vd-Id static characteristic


Normally, the rectifier regulates the direct current to maintain it equal to the current reference. In
abnormal cases (e.g. voltage drop in the AC power system) the delay angle can reach its
minimal value min and the rectifier will not be able to regulate the current. In such a case, it is
said to operate in min mode.
The inverter regulates the direct voltage Vd measured at the DC line input to keep it equal to the
voltage reference. In Figure 11 - 7, the inverter operates in voltage regulation mode. If the current
drops below the current reference, the inverter goes in "current compensated mode" where the
voltage is regulated with a slope determined by the voltage margin (V) and the current margin
(I). If the current falls even lower than the (current reference - current margin), the inverter will
operate in "current regulation mode".
If the DC current increases (load increase or fault in the AC power system on the inverter side),
the extinction angle can reach the minimal value allowed and the inverter can loose its
regulating capability. It then operates in "min mode".

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

Idref Idref limiter based on DC voltage


(after dynamic filtering)

Figure 11 - 8 Voltage dependent current order limiter (VDCOL)


The limiter includes two functions: the dynamic filtering of the DC voltage and the calculation of
the reference based on the filtered voltage.
1 Dynamic filtering of the voltage The DC voltage Vd goes through a first order filter whose
time constant T varies:

T = T d = 0 when Vd decreases;

T = T m = 80ms when Vd increases.

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

Current margin (on inverter))


Voltage margin (on inverter)
DC voltage reference step

DC current reference step


DC current (converter)
dI

DC voltage (DC line)


DC voltage reference

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

Figure 11 - 9 Functional diagram of the regulation unit


The regulation unit essentially consists of two PI (proportional-integral) regulators with limiters:
one for the current and the other for the voltage. The delay angle is established by the lowest
value among the outputs of the two regulators.
On the rectifier side, the reference current Idref takes on a normal value (e.g. < 1.2 p.u.) while the
voltage reference Vdref takes on a very high value (e.g. 2 p.u.). In this way, the regulation unit
cannot regulate the voltage and will be forced to operate in current regulation mode. A signal
allows users to apply a current reference step for a specified time interval.

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.

11.1.12 The PI The PI regulator includes the following transfer function:


regulators
K
H ( s ) = K i 1--- + T p G ( ) = -----i + K i T p G ( ) (EQ 3)
s s

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

Figure 11 - 10 Correction factor for proportional gain of PI regulators


This linearization is necessary to have the regulation respond with the same speed at different
values of .
On the inverter side, the linearization is applied on the = 180 and G() looks the same
as G().
The linearization of the gain does not apply to the integral part of the PI regulator because this
part of the response is slower.
The regulator output goes through two limiting functions before being sent to the firing unit.
These functions are: limiter and limiter.

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

Parameters Description T typical value


---------------- ---------------- --------------------
Tm rate Rise time 10ms

Td rate Fall time 100ms


o
ratemax Reduction of max 45

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

with, Tolerance = 0, 15 + 0, 1Id and I ac comfail = 0, 65 pu

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

Command to change taps


Up
Up =1 if Angle > angle max Tap changer
Angle
Down = 1 if Angle < angle min Down
Inverter
Angle = on rectifier or on inverter

Down=1 Up Area
Angle ( or )
max angle
Range
min angle
Down Area
Up=1

Figure 11 - 13 Demand to change taps


The tap changer controller generates the Up or Down order sent to the tap changer of the converter
transformer in order to maintain or angle in the range set by:
min < < max on the rectifier (EQ 9)
min < < max on the inverter (EQ 10)
If the angle is not within the range, an up or down request is generated and sent to the tap changer
in order to bring the angle back within the range (if the tap has not yet reached any of the limits).
The size of the range must be selected to avoid hunting (i.e. oscillation of the angle between the
Up area and the Down area). Usually:
Range = at least 1.5 x maximum variation of angle corresponding to a tap
The default range values (adjustable) are shown in the following table.

Table 1: Typical angles limiting the range

Angle Min Angle Max Angle


15 18
17 20

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.23 References Id Ref: Current reference (pu);


Id Ref + Slope: Current reference rising rate (pu/s);
Id Ref - Slope: Current reference falling rate (pu/s);
Id Ref min: Current reference lower limit (pu);
Id Ref max: Current reference upper limit (pu);
Vd Ref: Voltage reference (pu);
Vd Ref + Slope: Voltage reference rising rate (pu/s);
Vd Ref - Slope: Voltage reference falling rate (pu/s);
Vd Ref min: Voltage reference lower limit (pu);
Vd Ref max: Voltage reference upper limit (pu).

11.1.24 Converter General parameters


parameters
Vd Base: Base for direct voltage (kV);
Id Base: Base for direct current (kA);
Vac Base (Ph-Ph): Rated AC voltage on the transformer primary (kV rms);
Synchro Bus: Name of the bus whose voltages are used to synchronize the firing system;
Line Bus (Vd Measure): Name of the bus connecting the converter and the DC line; the
direct voltage measurement is taken on this bus;
Converter transformer
Transfo name: Transformer label;
Leakage: Leakage inductance of converter transformer for star or delta winding on valve
side (henry);
Note : Used to determine the commutation resistance to calculate the and angles. It is as-
sumed that the leakage on the primary side is null and that no series inductance is con-
nected between the switching bus and the transformer. Otherwise, the primary leakages
and/or series inductance will be brought back on the secondary side and included in the
leakage L.
/ Y (lagging = 0, leading = 1): Indicates the relative phase between secondary windings
of the transformer. If 0, the delta winding lags the wye winding; if 1, the delta wind-
ing leads the wye winding.

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);

11.1.28 Band-pass Freq base: Frequency base (hertz);


filters
(Synchroni
Freq min: Lower limit of acceptable frequency (hertz);
zation) Freq max: Upper limit of acceptable frequency (hertz);
Band-pass: Bandwidth of the filter (hertz);

11.1.29 LCDT Vd min= Vdfmin in Figure 11 - 8;


<<VDCOL>
> function Id min= Idrefmin in Figure 11 - 8;
Rise time= Tm in Figure 11 - 8;
Vd threshold= Vdf1pu in Figure 11 - 8;
Note : When the user changes the reference, the effective reference varies from the previous
value to the requested value following a ramp whose slope is adjustable in both direc-
tions (rise and fall).

11.1.30 Tap (see Figure 11 - 13)


changer
control min: Lower limit of alpha angle range on rectifier (degrees);
max: Upper limit of alpha angle range on rectifier (degrees);
min: Lower limit of gamma angle range on inverter (degrees);
max: Upper limit of gamma angle range on inverter (degrees).

11.1.31 Protection DC fault protection (on rectifier)


Detection delay: Detection delay of DC fault (seconds);
Vd threshold: DC voltage threshold used for DC fault detection (pu);
delay: Value of the constant angle imposed after a fault is detected (degrees);

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

11.1.34 Valve General parameters


parameters
Connection (series = Serial; delta = Delta);
Switch parameters
Switch type (Breaker, Ideal Switch, Thyristor,Diode, GTO+Diode): Specifies the valve
type that makes the converter;
Signal reset (Enable, Disable): Reset the default signal to zero.
Precision valve (Activ=Enable,Dsactiv=Disable)
Specific parameters
Rbov (Reverse break overvoltage): Highest value of reverse voltage across a valve. Rele-
vant only for diodes, thyristors and GTOs (volts);
Fbov (Forward break overvoltage): Highest value of reverse voltage across a blocked
valve. Relevant only for diodes, thyristors and GTOs (volts);
C_snubber: Snubber capacitance (farads);
R_snubber: Snubber resistance (ohms);
Tq: Turn-off time (seconds);
Ibreak: GTO maximum breakable current (amperes);
Th Roff: Open state resistance (ohms);
Th Ron: Closed state resistance (ohms);
Vf1: Forward voltage drop (volts);
Ihold: Holding current.

1.This parameter is used in the element switching logic. The forward voltage drop is not modeled.

2-11-465
HVDC and SVC Controllers
Rectifier/Inverter 6/12 Pulse DC Controllers

11.1.35 Control
panel for
HVDC
converters

Figure 11 - 14 The parameter form for HVDC converters (General)

2-11-466
HVDC and SVC Controllers
Rectifier/Inverter 6/12 Pulse DC Controllers

Figure 11 - 15 The parameter form for HVDC converters (Regulation)

2-11-467
HVDC and SVC Controllers
Rectifier/Inverter 6/12 Pulse DC Controllers

Figure 11 - 16 The parameter form for HVDC converters (Protection)

2-11-468
HVDC and SVC Controllers
Rectifier/Inverter 6/12 Pulse DC Controllers

Figure 11 - 17 The parameter form for HVDC converters (Valves)

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

V_LINE_label: DC voltage relative to ground at the DC line input (volt);


V_NEUTRAL_label: DC neutral relative to ground at the DC line input (volt);
IaPrimXfo, IbPrimXfo, IcPrimXfo_label: AC currents in the primary windings of the trans-
former (ampere);
Id_label: DC current on bridge (ampere);
IaY, IbY, IcY_label: AC currents in the Y secondary windings of the transformer (ampere);
V12_xY_label (x = 1, 2, 3, 4, 5, 6): Voltage across valve x of the bridge connected to the Y
windings (volt);
I12_xY_label (x = 1, 2, 3, 4, 5, 6): Current across valve x of the bridge connected to the Y
windings (Amperes);
CMD12INT_xY_label (x = 1,2,3,4,5,6): Firing command from the internal source to com-
ponent 1 to 2 of valve x of the bridge connected to the Y windings (logical);
CMD21INT_xY_label (x=1,2,3,4,5,6): Firing command from the internal source to compo-
nent 2 to 1 of valve x of the bridge connected to the Y windings (logical);
CMD12EXT_xY_label (x=1,2,3,4,5,6): Firing command from the external source to com-
ponent 1 to 2 of valve x of the bridge connected to the Y windings (logical);
CMD21EXT_xY_label (x=1,2,3,4,5,6): Firing command from the external source to com-
ponent 2 to 1 of valve x of the bridge connected to the Y windings (logical);
CMDFLT_ label: Flag for a valve fault (logical);
PPattern_label: A number whose binary code specifies that the thyristors are receiving fir-
ing pulses. For example, 5 specifies that firing pulses are sent to thyristors 1 and 3.
Up_Trlabel: Signal sent to the tap changer to increase the tap position (logical);
Down_Trlabel: Signal sent to the tap changer to decrease the tap position (logical);
STATE12_xY_label (x = 1,2,3,4,5,6): State of the 1 to 2 component of valve x of the
bridge connected to the Y windings (logical));
STATE21_xY_label (x = 1,2,3,4,5,6): State of the 2 to 1 component of valve x of the
bridge connected to the Y windings (logical);
FAILSIG_xY_label (x = 1,2,3,4,5,6): Valve alarm signal with the following meanings:
1: Infringement of Tq extinction limit time for Thyristor 12. (Automatically reset to zero
after a time step).
1: Infringement of Tq extinction limit time for Thyristor 21. (Automatically reset to zero
after a time step).
2: Reverse voltage of Thyristor 12 greater than Rbov. (Reset to zero only if Fail Reset=
Enable.
2: Reverse voltage of Thyristor 21 greater than Rbov. (Reset to zero only if Fail Reset=
Enable.
3: Direct voltage of Thyristor 12 greater than Rbov. (Reset to zero only if Fail Reset=
Enable.

2-11-470
HVDC and SVC Controllers
Rectifier/Inverter 6/12 Pulse DC Controllers

DelayImpInt_label: Internal pulse delay.


DelayImpExt_label: External pulse delay.
DelayImp_label: Pulse delay.
DelayImpUsed_label: Pulse delay used.
P_label: Same as Pattern_label, but originating from control module.
D_label: Delay from control module.
IaD, IbD, IcD_label: AC current in the delta secondary windings connected to transformer
(ampere);
V12_xD_label (x=1, 2, 3, 4, 5, 6): Voltage in valve x of the bridge connected to the delta
windings (volt);
I12_xD_label (x=1, 2, 3, 4, 5, 6): Current in valve x of the bridge connected to the delta
windings (ampere);
CMD12INT_xD_label (x=1,2,3,4,5,6): Firing command from the internal source to compo-
nent 1 to 2 of valve x of the bridge connected to the delta windings (logical). For the
GTO+Diode switch the signal value is -1 when the diode is forced to conduct;
CMD21INT_xD_label (x=1,2,3,4,5,6): Firing command from the internal source to compo-
nent 2 to 1 of valve x of the bridge connected to the delta windings (logical);
CMD12EXT_xD_label (x=1,2,3,4,5,6): Firing command from the external source to com-
ponent 1 to 2 of valve x of the bridge connected to the delta windings (logical);
CMD21EXT_xD_label (x=1,2,3,4,5,6): Firing command from the external source to com-
ponent 2 to 1 of valve x of the bridge connected to the delta windings (logical). For the
GTO+Diode switch the signal value is -1 when the diode is forced to conduct;
STATE12_xD_label (x = 1,2,3,4,5,6): State of the 1 to 2 component of valve x of the
bridge connected to the delta windings (logical);
STATE21_xD_label (x = 1,2,3,4,5,6): State of the 2 to 1 component of valve x of the
bridge connected to the delta windings (logical);
FAILSIG_xD_label (x = 1,2,3,4,5,6):
PeriodY_label: Period of AC voltage measured in the "equiangular" synchronization sys-
tem of the bridge connected to the Y windings (seconds);
PeriodD_label: Period of AC voltage measured in the "equiangular" synchronization sys-
tem of the bridge connected to the delta windings (seconds);
IdRef_label: DC current reference (pu);
VdRref_label: DC voltage reference (pu);
Mu_label: Commutation angle (degrees);
Gamma_label: Extinction angle (degrees);
Alpha_label: Firing delay angle generated by the regulation system (degrees);
Deblocked_label: Unblocking status flag (logical);

2-11-471
HVDC and SVC Controllers
SVC Controller

CmdComFail_label: Command to simulate a switching failure (logical);


CmdInvMode_label: Specifies the rectifier/inverter mode (0 = rectifier; 1 = inverter) (logi-
cal);
ComFail_label: Detection signal for a switching failure on Y or delta bridge (logical);
AlphaRet_label: Signal specifying the forced retard mode (logical).
RatioXfo_label: Normalized transformation ratio (Ns/Np) of converter transformer (pu);
syn_Vd0_level_label: Mean of the maximum ideal DC voltage (pu) - in the equidistant syn-
chronization system;
syn_Alpha_Osc_label: Firing delay angle reflecting the oscillator phase (degrees) - in the
equidistant synchronization system;
syn_Alpha_measured_label: Measured firing delay angle (degrees) - in the equidistant syn-
chronization system;
syn_Delta_alpha_label: Phase variation (positive = lag; negative = lead) of oscillator
(degrees) - in the equidistant synchronization system;
syn_Vac_ZC_number_label: Count for the 12 zero crossings of switching voltages in the
12 pulse converter [0 to 11] - in the equidistant synchronization system. The 0 count coin-
cides with the zero crossing of the switching voltage of valve 1 on the Y bridge (D) when
the delta winding is lagging (or ahead) of the Y winding;
syn_Firing_pulse_number_label: Count for the 12 firing of the valves in the 12 pulse con-
verter [0 to 11] - in the equidistant synchronization system. The 0 count coincides with the
firing pulse of valve 1 on the Y bridge (D) when the delta winding is lagging (or ahead) of
the Y winding;
sys_Frequency_label: Measured frequency of AC voltage (Hz) - in the equidistant type syn-
chronization system.

11.2 SVC CONTROLLER


A Introduction This model represents the power component and the control system of a static compensator. The
power component consists of a thyristor controlled reactor (TCR inductive branch) and three
thyristor switched capacitors (TSC capacitive branches). The transformer is not modeled
internally and must be added by the user.
The control system includes measuring, synchronization, regulation, distribution and firing
subsystems. Depending on the operation mode, the model allows users to study step responses
either for a voltage reference or a susceptance reference. This feature can be used to optimize the
regulator parameters.The thyristors can also be fired by signals generated from an external source.

2-11-472
HVDC and SVC Controllers
SVC Controller

B Static
Compensator
Icon and
Diagram

SV

U
U

I I

Figure 11 - 18 Static compensator icon and diagram.

C Static Figure 11 - 19 shows the static compensator diagram.


Compensator
2 Power Component The models of the four branches of a static compensator are identical
Model
(see Figure 11 - 20). Resistances R and r respectively represent ohmic losses in the capacitor and
the reactor. One of these elements can be ignored by assigning a zero value to it in the control
panel. The two resistances, the capacitor and the reactor form a type of black box. Hence, it is not
possible to measure the voltage across one of the resistances or the reactor. However, the voltage
across the capacitor is calculated and available as a signal. This is also the case for the voltages
across the thyristors.

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)

Synchronization Unit Firing Unit

CONTROL SYSTEM

Primary Secondary

Network E

POWER COMPONENT

Figure 11 - 19 Static compensator diagram

2-11-474
HVDC and SVC Controllers
SVC Controller

r L

R
C

Figure 11 - 20 Static compensator branch

D Control Synchronization Unit


System
The synchronization unit consists of a phase-lock loop (PLL) applied to each voltage
phase on the transformer primary. The PLL calculates the frequency and phase angle
required to fire the thyristors. Figure 11 - 21 shows a simplified diagram of this unit.
This type of synchronization has the advantage of being insensitive to harmonics and
stable in frequency.

1 Slope Low-Pass frequency


-
2*PI Limitation Filter

Vpu Average
Value for One Regulator 1 Modulo wt
-
PI s 2*PI
Cycle
*

cos

Figure 11 - 21 Phase-Lock Loop (PLL)


Measuring Unit
Voltage measuring must be accurate, fast and insensitive to harmonics. To do this, the
output of the Park conversion block is integrated and the voltage is measured by sub-
tracting two consecutive samples of the integrator output with a delay of one cycle be-
tween them. The voltage measuring unit is shown in Figure 11 - 22.

2-11-475
HVDC and SVC Controllers
SVC Controller

Va
Park Vmeasured
Vb -1 +

Vc Conversion s -

Frequency Delay n step Variable Delay


Function

Figure 11 - 22 Measuring Unit


Control Unit
The control unit consists of a proportional and integral (PI) controller. The latter com-
pares the voltage measured and voltage reference to achieve:
Umes = Uref + XsI (EQ 11)
The output of the controller is given by:

Bp = Kp + -----i ( Umes Uref XsI )


K
(EQ 12)
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.

Bs = Bind + Bcap (EQ 13)

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:

Bind = 2 2 + sin 2- (EQ 14)


----------------------------------------

The calculation of the equivalent impedance of the parallel TSC capacitive branches
take into account the availability of the branches. Therefore, it is possible to operate in
downgraded or degradation mode.
In order to avoid oscillations when the capacitors are switched, hysteresis is used at
transition points when the number of parallel TSC capacitive branches changes.
Firing Unit
The function of the firing unit is to send the firing orders to the thyristors of the different
branches. To do this, it receives the following input:
Phase angle (t) of the synchronization voltage;
Firing angle ;
Firing order of the TSC capacitive branches.
Since the TCR inductive branch is controlled, the firing unit sends the t degree pulses
after the last zero-crossing of the synchronization voltage. Since the TSC capacitive
branches are only switched and not controlled, their firing is always executed at the
same time on the waveform, that is 90 degrees before the zero-crossing of the voltage.

11.2.1 Parameters
A General 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);

C Regulation Kp: Proportional gain;


Parameters
Ki: Integral gain;
Pente: Slope of voltage controller (pu/100MVA);
Hysteresis: (pu/100MVA).

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).

F Disturbance Disturbance type: Vref or Bref;


Parameters
Delta_Vref: Value of step in the voltage reference (pu);
Delta_Bref: Value of step in the value of the susceptance reference (pu/100MVA);
Start time: Time when the disturbance is applied (s);
End time: Time when the disturbance is removed (s).

G Adaptive Base frequency (Hz);


Band-Pass
Minimum frequency (Hz);
Parameters
Maximum frequency (Hz);
Bandwidth (Hz).

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

VphaseTh_TSC1_label: Voltage across the valves in TSC capacitive branch no 1;


VCAPphase_TSC1_label: Voltage across the capacitor in TSC capacitive branch no 1;
FAILSIGphase_TSC1_label:
CMD12phase_TSC2_label: Firing pulse of the positive valve in TSC capacitive branch no
2;
CMD21phase_TSC2_label: Firing pulse of the negative valve in TSC capacitive branch no
2;
Iphase_TSC2_label: Current across TSC capacitive branch no 2;
STATE12phase_TSC2_label: State of positive valve in TSC capacitive branch no 2;
STATE21phase_TSC2_label: State of negative valve in TSC capacitive branch no 2;
VphaseTh_TSC2_label: Voltage across the valves in TSC capacitive branch no 2;
VCAPphase_TSC2_label: Voltage across the capacitor in TSC capacitive branch no 2;
FAILSIGphase_TSC3_label:
CMD12phase_TSC3_label: Firing pulse of the positive valve in TSC capacitive branch no
3;
CMD21phase_TSC3_label: Firing pulse of the negative valve in TSC capacitive branch no
3;
Iphase_TSC3_label: Current across TSC capacitive branch no 3;
STATE12phase_TSC3_label: State of positive valve in TSC capacitive branch no 3;
STATE21phase_TSC3_label: State of negative valve in TSC capacitive branch no 3;
VphaseTh_TSC3_label: Voltage across the valves in TSC capacitive branch no 3;
VCAPphase_TSC3_label: Voltage across the capacitor in TSC capacitive branch no 3;
FAILSIGphase_TSC3_label:
pulsePat_int_label: Signal containing the binary code representing the firing orders of the
valves
VSYNCphase_label: Voltage signal used by synchronization unit;
DelayImpInt_ label: Firing delay (as a fraction of calculation step) calculated by the inter-
nal command of the static compensator
DelayImpExt_ label: Firing delay (as a fraction of calculation step) calculated by an exter-
nal command of the static compensator
DelayImp_ label: Firing delay (as a fraction of calculation step) sent to the static compensa-
tor
DelayImpUsed_ label: Firing delay (as a fraction of calculation step) used by the static
compensator
V_Ref_label: Voltage reference for the controller;
B_Ref_label: Susceptance reference for the controller;

2-11-480
HVDC and SVC Controllers
SVC Controller

Slope_label: Slope of the controller;


Deblocked_label: Signal specifying that the firing pulses are blocked or not.
TCC_Mode_label: Signal specifying that the TCC mode is enabled or disabled
ManualMode_label: Signal specifying that the manual mode is enabled or disabled
Period_label: Period of the network (inverse of the frequency)
Frequency_label: Network frequency
Alpha_TCR1_label: Firing angle of the TCR inductive branch
wtphase_label: Phase angle of synchronization voltages
V_Prim_label: Voltage measured by the system
V_Error_label: Input of PI regulator of regulation unit
B_SVC_label: Susceptance seen from primary side of transformer
B_TSC_label: Capacitive susceptance required
B_TCR_label: Inductive susceptance required
A Static Figures 11 - 23 to 11 - 25 show respectively the first, second and third pages of the static
Compensator compensator control panel.
Control Panel

2-11-481
HVDC and SVC Controllers
SVC Controller

Figure 11 - 23 Static compensator control panel (General)

2-11-482
HVDC and SVC Controllers
SVC Controller

Figure 11 - 24 Static compensator control panel (TCR)

2-11-483
HVDC and SVC Controllers
SVC Controller

Figure 11 - 25 Static compensator control panel (TSC1)

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

Then a positive sequence reading is taken of the voltage on the


transformer primary and of the current in the Rprim resistance to draw
the U-I dynamic curve of the system. The variation of the source voltage
is done as a ramp over 10 seconds.

The following parameters are used:


Static Compensator: Fault parameters, automatic mode at Vref = 1.0 pu
Network at 735 kV, short-circuit power of 6000 MVA, quality factor of 10
Transformer YD 735/16 kV, 333 MVA, leakage of 15%
Load on primary = 200 MW
Load on secondary = 500 kW

Figure 11 - 26 Test network for the static compensator

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

Current (pu/100 MVA)


U-I Dynamic Curve of the Static Compensator

Figure 11 - 27 U-I dynamic curve of the static compensator

11.3 STATIC COMPENSATOR BRANCHES: TCR AND TSC


As seen in the introduction to this chapter, the static compensator model consists of a control
system and a power component. The latter has 4 three-phase branches, each with the same
configuration as shown in Figure 11 - 20. The model presents a configuration with one TCR
inductive branch and three TSC capacitive branches. However, the user may want to build his
own static compensator model with a different configuration. He can then use the static
compensator branch model with an external control which he can program himself. Both types of
branches are available to the user: the TCR inductive branch (TCR or thyristor-controlled reactor)
and the TSC capacitive branch (TSC or thyristor-switched capacitor). Essentially, both of these
models are identical, the TCR branch being a specific case of the TSC branch.
These models are built-in and do not add nodes (or increase the Z matrix).

2-11-486
HVDC and SVC Controllers
Static Compensator Branches: TCR and TSC

A Icons and
Diagrams of
TCR and TSC
Static
Compensator
s

Figure 11 - 28 TCR inductive branch icon and diagram

Figure 11 - 29 TSC capacitive branch icon and diagram

B Parameters The parameters for both types of static compensator are identical to those shown in section 11.2.1.

C List of CMD12phase_label: Firing pulse in the positive valve;


Available
CMD21phase_label: Firing pulse in the negative valve;
SIgnals
Iphase_label: Current across the branch;
STATE12phase_label: State of the positive valve;
STATE21phase_label: State of the negative valve;
VCAPphase_label: Voltage across the capacitor (volt);
DelayImpInt_ label: Firing delay (as a fraction of calculation step) calculated by the inter-
nal command (not used)
DelayImpExt_ label: Firing delay (as a fraction of calculation step) calculated by an exter-
nal command

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

Figure 11 - 30 TCR inductive branch control panel

2-11-489
HVDC and SVC Controllers
Static Compensator Branches: TCR and TSC

Figure 11 - 31 TSC capacitive branch control panel

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.

Figure 11 - 32 Test network for the static compensator

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

Current (pu/100 MVA)

U-I Dynamic Curve of the Static Compensator

Figure 11 - 33 U-I dynamic curve of the static compensator

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

12.1 FREQUENCY MEASURE ELEMENT

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:

Figure 12 - 1 Icon and diagram frequency measure


A General Basic Frequency: Normal fundamental frequency of the network used as the main frequency
Parameters of the bandpass filter (Hz)

B Bandpass Filter Bandwidth: Width of bandpass filter (Hz)


Parameters

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
.

Figure 12 - 2 Frequency 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

Figure 12 - 3 Block Diagram of Frequency Measure1

12.2 DIGITAL OUTPUT ELEMENT

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:

Figure 12 - 4 Icon and diagram digital output


A Time Units The user can choose between seconds, milliseconds or cycles.

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

Figure 12 - 5 Digital output control panel

2-12-499
Various Network Elements
Digital Input Element

12.3 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:

Figure 12 - 6 Icon and diagram digital input

2-12-500
Various Network Elements
Analog Input Element

12.4 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:

Figure 12 - 7 Icon and Diagram analog input

12.5 CURRENT AND VOLTAGE MEASURE ELEMENTS


A Introduction The current and voltage measure elements are used to measure the current and voltage of network
buses and to connect voltage or current output to Hypersim control blocks. The following table
shows the different elements and parameters.

Parameters
Outpu Function and
Description Palette Element Input
t Nam l.init.v conditions
e a

Measures B B a Ga 1.0 Measures voltages Va, Vb, Vc of


three-phase b Gb 1.0 bus B
a
voltages V3 b c Gc 1.0 a = Va * Ga
V c b = Vb * Gb
c = Vc * Gc

Measures B1 B1 a Ga 1.0 Measures currents Ia, Ib, Ic


three-phase B2 b Gb 1.0 flowing from B1to B2 by
a
currents I3 b c Gc 1.0 inserting a resistance R
I c Rpro 1.0e-3 a = Ia * Ga
be b = Ib * Gb
B2 c = Ic * Gc

2-12-501
Various Network Elements
Disconnection Element

Measures B B y G 1.0 Measures voltage V of bus B


single-phase y=V*G
voltages V y
V

Measures B1 B1 y G 1.0 Measures current I flowing from


single-phase B2 Rpro 1.0e-3 B1to B2 by inserting a resistance
currents I y be R
I y=I*G

B2

12.6 DISCONNECTION ELEMENT

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:

Figure 12 - 8 Icon and diagram disconnection element


A R Resistance Resistance value of the disconnection when closed.

2-12-502
Various Network Elements
Disconnection Element

B Disconnectio
n Control
Panel

Figure 12 - 9 Disconnection 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

THIS PAGE IS INTENTIONALLY LEFT BLANK

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.

B Main Features Here is an overview of the system features:


consists of 32 D/A output channels, 12 bits 10V;
consists of 32 logical output channels, 0-5V;
output range is 1 Hz to 20 kHz;
allows users to play back arbitrary wave forms from COMTRADE files in binary or
ASCII format in compliance with the IEEE C37.111-1991 or C37.111-1997 standard;
allows users to change the gain of analog signals;
allows users to select output signals;

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

SCOPEVIEW HYPERSIM PLAYBACK Setup of simulation block parameters


MODEL

COMTRADE file display


Interpolation, Reject,
etc.of wave forms

RPC
Resampling of wave forms
REAL-TIME Steady-state cycle detections
TEST VIEW SIMULATION
(CGDEV)
Internal or external synchronization

Automated tests management


Equipment controller programming
Automated tests setup PCI

PLAYBACK Analog or digital wave forms generation


ALPHI 32D/A 32 DO Visual displaying on oscilloscope

Figure 13 - 1 General diagram

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.

J Hypersim Here is an example of a playback in Hypersim.


Graphic
Interface

2-13-507
Hypersim Wave Form Playback Model

Figure 13 - 2 Playback icon and diagram

Figure 13 - 3 Example of hypersim diagram


The selected signal connected to the input of the voltage source is sent to the mono phase and the
sync out of the POW base on this signal will generate the trigger input for the synchronization of
the transient playback.

2-13-508
Hypersim Wave Form Playback Model

Figure 13 - 4 General playback parameters

2-13-509
Hypersim Wave Form Playback Model

Figure 13 - 5 Parameters for analog signals

2-13-510
Hypersim Wave Form Playback Model

Figure 13 - 6 Parameters for logical signals

2-13-511
Hypersim Wave Form Playback Model

THIS PAGE IS INTENTIONALLY LEFT BLANK

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.

Figure 1 - 1 Graphic Tool Palette

1.See Part 1, Chapter 2 for detailed instructions on graphic interface

3-1-515
Control Block List

Figure 1 - 2 Math Functions

3-1-516
Control Block List

Table 1 :

1 - 2 Math Functions

2 input adder with gain Transfer function with dynamic limits


3 input adder with gain S Transfer function with internal limits
4 input adder with gain S Transfer function with internal limits
reset and initial condition
Multiplier Window averaging
Division
Gain
Absolute value
Sine
Cosine
Tangent
ArcSin
ArcCos
ArcTan
Common exponents
Natural exponents
Common logarithm
Natural logarithm
Maths functions
F Mod
Square root
S Transfer function
Z Transfer function

3-1-517
Control Block List

Figure 1 - 3 Logic Functions

3-1-518
Control Block List

Table 2 :

1 - 3 Logic Functions

Two input AND gate


Two input NAND gate
Two input OR gate
Two input NOR
Exclusive OR gate
Exclusive NOR gate
Inverter NOT gate
Dual signal comparator
Timer on level detector
Single level comparator
Counter
Delay on ON
Rising slope detector
Falling slope detector
Region detectors
12 input multiplexer
6 input multiplexer

3-1-519
Control Block List

Figure 1 - 4 Non-linear Functions

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

Figure 1 - 5 Source Functions

3-1-522
Control Block List

Table 4 :

1 - 5 Sources

Fix point constant


Floating point constant
Random wave generator
Pulse train generator
Square wave generator
Triangular wage generator
Sinus generator (amplitude)
Sinus generator (phase)
Simulation time

3-1-523
Control Block List

Figure 1 - 6 Miscellaneous Functions

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

THIS PAGE IS INTENTIONALLY LEFT BLANK

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

Gain u y g 1.0 y=u*g


Gain. u Gain y

Absolute Abs u y y = u if u >= 0


u Abs y
value y = -u if u < 0

Sin. Sin u y y = sin (u)


u Sin y
u is in degrees

Cos. Cos u Cos y u y y = cos(u)


u is in degrees

3-2-527
Function Details

Table 21 : Math functions

Paramtres
Functionality and
Description Palette Element Input Output
Initial conditions
Name
value

Tan. Tan u y y = tan(u)


u Tan y
u is in degrees

ArcSin u y y = Arc sin(u)


ArcSin. u ArcSin y
y is in degrees

ArcCos. ArcCos u y y = Arc cos(u)


u ArcCos y
y is in degrees

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

Table 21 : Math functions

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

Table 21 : Math functions

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.

Average on fBase is the u signal and the nCycle


t u t
windows u y fBase 60 frequency, number of windows
t-T y
f t-T f nCy- 1 average.
cle

y = u
(t T)

T = nCycle / fBase
t = actual time

Conditions :
fBase > 0
nCycle > 1

3-2-530
Function Details

Table 22 : Logic functions

Functionality and
Description Palette Element Input Output Parameter
conditions

AND logic block


Two input u1 u1 y y = u1.u2
y
AND gate u2 u2

NAND logic block


Two input u1
y
u1 y
NAND gate u2 u2 y = u1.u2

OR logic block
Two input OR u1 u1 y y = u1+ u2
y
gate u2 u2

NOR logic block


u1 u1 y
Two input y
u2 u2 y = u1 + u2
NOR gate

Exclusive OR logic block


Exclusive OR u1
y
u1 y y = u1 u2
gate u2 u2

Exclusive NOR logic block


Exclusive
u1
y
u1 y
NOR gate u2 u2 y = u1 u2

Inverter logic block


u y y=u
Inverter u y

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

Table 22 : Logic functions

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

Counter from n1 to n2.


n1....n2 cnt cnt y n1 0 Increasing if cnt goes from 0 to 1
n1...n2 y
reset reset n2 5 Decreasing if cnt goes from
start 0 0 to -1.
circ 1 start: reset and start value.
circ: 1 if circular counter
Counter
0 if not

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

Delay on ON y goes from 0 to 1 after the Td s


delay and stays to 1 for the Ton s
duration.
Conditions
Td >= 0
Ton > 0

When u goes from 0 to 1,


u y T 1e-3 y goes from 0 to 1 and stays at 1
u y
Rising slope for T seconds
detector
Conditions :
T>0

When u goes from 1 to 0,


u y
u y T 1e-3 y goes from 0 to 1 and stays at 1
Falling slope for T seconds
detector
Conditions :
T>0

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

Table 22 : Logic functions

Functionality and
Description Palette Element Input Output Parameter
conditions

P1 P The P output equals the P1 to P12


P1 P2 binary input sum.
M12 P2
P3 P3
P4
P5 P4
P6 MUX P P5
P7
P8 P5
12 input P9
P10 P6
multiplexer P11 P7
P12
P8
P9
P10
P11
P12

P1 P The P output equals the P1 to P6


P1 P2 binary input sum.
M6 P2
P3 MUX
P P3
6 input P4
P5 P4
multiplexer P6 P5
P5
P6

3-2-533
Function Details

Table 23 : Non-linear functions

Parameters
Functionality and
Description Palette Element Input Output
Initial conditions
Name
value

if u < lim1, y = lim1


lim2
u y lim1 -1 if lim1 u lim2 , y = u
u y
lim1 lim2 +1 if u > lim2, y = lim2
Fix limiter
Conditions :
lim1 < lim2

Maximum of u1 and u2.


Two input MAX u1 u1 y y = Max (u1, u2)
maximum MAX y
u2 u2

Maximum of u1, u2 and u3.


Three input MAX u1 u1 y y = Max (u1, u2, u3)
u2 MAX y
maximum u3 u2
u3

Maximum of u1, u2, u3 and u4.


MAX
u1
u1 y y = Max (u1, u2, u3, u4)
Four input u2 MAX y
u3 u2
maximum u4
u3
u4

Minimum of u1 and u2.


Two input MIN u1 y y = Min (u1, u2)
u1
minimum MIN y u2
u2

Minimum of u1, u2 and u3


u1 u1 y y = Min (u1, u2, u3)
MIN
Three input u2 MIN y
u3 u2
minimum
u3

Minimum of u1, u2, u3 and u4.


MIN u1 u1 y y = Min (u1, u2, u3, u4)
Four input u2 y
u3 MIN u2
minimum u4
u3
u4

3-2-534
Function Details

Table 23 : Non-linear functions

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

n 3 y computed from the


ytab -1,0,1 ytab vs utab curve
Non-linear u y utab -1,0,1 n: dimension of ytab and utab
u y
gain
Conditions:
n>0

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

Table 23 : Non-linear functions

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

limUp 1 If u > limUp, y = limUp


u y -1 If u < limDn, y = limDn
u y limDn
Otherwise y = u
Variation rate (i.e. y will follow u with a delay if u
limiter varies too quickly)

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

uH 0.7 If u > uH, y = 1


u y uL 0.1 If u < uL, y = 0
Buffer with u y

hysteresis
Conditions :
uL < uH

u y yn = un-1
One step .
1/z u 1/z y
delay

3-2-536
Function Details

Table 23 : Non-linear functions

Parameters
Functionality and
Description Palette Element Input Output
Initial conditions
Name
value

"s + dS" input signal is compared


s p s p dS 0 with (carrier) "c + dC"
PWM PWM
c d c d dC 0 If "s + dS" > "c + dC" then p = 1
PWM If "s + dS" < "c + dC" then p = 0
modulator
d is the normal delay (0 or 1) when
s + dS" and "c + dC" cross at the
actual time.

y output keeps the previous value


s u y opt 1 except in the following cases:
Samp u Sample y
s if opt = 1, y = u if the change goes
from 0 to 1.
Sampler
if opt = 2, y = u if the change goes
from 1 to 0.
if opt = 3, y = u if the change goes
from 0 to 1 or form 1 to 0.

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

Impulsion f 100 f : frequency


train generator y t0 0 t0: impulsion train start time
y
A 1 Amplitude = A if opt = 0
opt 0 Amplitude = A/T (energy)
if opt = 1.
T: calculation step

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

Square wave f 100


generator y y A 1
To Th
P 0 A

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

Table 25 : Miscellaneous functions

Parameters
Outpu Functionality and
Description Palette Elements Input Initial
t conditions
Name value
s

ABC->DQ a d d = 0.66667.[a.cos(p) + b.cos(p -


Conversion a
b q 120)
ABC b ABCd
c + c.cos(p + 120)]
DQ c
p DQq p q = -0.66667.[a.sin(p) + b.sin(p -
120)
+ c.sin(p + 120)]

DQ->ABC d a a = d.cos(p) - q.sin(p)


Conversion d
q b b = d.cos(p - 120)
a
DQ qDQ b p c - q sin(p - 120)
ABC pABCc c = d.cos(p + 120)
- q.sin(p + 120)

Float-Integer u y y = float input converted in int


Conversion F To I f To i

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

Initial value y = Vini if 0 <= t <= Tini


and duration INIT u
INITy u y Vini 0.0 y=u if t > Tini
Tini 0.0 Condition
Tini >= 0

Variable states nx 1.0 x = Ax + Bu


system u1 y1 nu 1.0 y = Cx + Du
. u1 u2 y2 ny 1.0 A dimension = nx.nx
y=Cx+Du
x=Ax+Bu

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

Table 25 : Miscellaneous functions

Parameters
Outpu Functionality and
Description Palette Elements Input Initial
t conditions
Name value
s

Float This block type allows float sig-


transmitter y
u y nal exchange between two tasks.
u
float

Int This block type allows int signal


Transmitter u y exchange between two tasks.
u y
int

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

1.1 MATLAB AND SIMULINK MODELS


Table 11 : HYPERSIM QUICK REFERENCE

Matlab and Simulink Models

Icons:

Properties: Main features:


- Hyperlink allows the integra- - Process models designed under
tion of power systems designed different Matlab/Simulink ver-
under Matlab/Simulink with sions.
HYPERSIM operations. - Hyperlink system can use, in
HYPERSIM, code generation
with older Simulink versions.
- Many Simulink models can
coexist in the same HYPER-
SIM version
- Many items of the same model
can be used in a HYPERSIM
Dynamic Loads

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.

1.3 MAIN FEATURES OF HYPERLINK


The following are the main features of the HyperLink system.
HyperLink can process models designed using different Matlab/Simulink versions. When-
ever possible, we try to follow the development of the Matlab/Simulink/RTW versions in
order to take into consideration the changes made and to maintain the link with HYPER-
SIM.
The HyperLink system can use code generated with older Simulink/RTW versions, within
HYPERSIM (see the versions available in Table 12 below). Moreover, the same HYPER-
SIM diagram can use models whose code originates from different Simulink versions.
Many Simulink models can coexist in the same HYPERSIM power system.
Many instances of the same model can be used in a HYPERSIM diagram.
The different models used in the same diagram can use different solvers.
Most Simulink blocks are usable in a model designed for HYPERSIM. However, the XY
Graph, Display, To File and To Workspace blocks cannot be used. The first two
have not been implemented and the last two are inoperative since the simulation does not
have access to a file system4. These blocks are simply ignored when generating code.
A Simulink model can contain continuous or discrete blocks and S Functions.
A Simulink model can contain blocks originating from different blocksets and tool-
boxes.
The signals related to Scopes are accessible in HYPERSIM.
The connection of signals between HYPERSIM and Simulink models is done using
Import and Export blocks.
It is possible to graphically connect the Simulink models input/output in HYPERSIM
diagrams. The connection can also be made by recording the name of the HYPERSIM sig-
nals, corresponding to the input/output of the model, in a file.
HyperLink decomposes "vectorized" signals to create many signals with the same name, to
which will be added a numeric suffix (_0, _1, etc.).

1.Lien HYPERSIM - Simulink.


2.RTW: Real-Time Workshop, trademark of The Mathworks Inc.
3.Simulink, trademark of The Mathworks Inc.
4.At least, in real-time.

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.

1.4 RELATIONSHIP BETWEEN HYPERLINK AND


MATLAB
The following table shows the relationship between the different versions of HyperLink and
Matlab/Simulink/RTW.

Table 12 : Relationship between HyperLink and Matlab/Simulink/RTW

HyperLink Matlab Simulink (RTW)

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

1.5 PREPARING SIMULINK MODELS


Using a Simulink model in HYPERSIM has several constraints and can require changes. Some
changes to the model may be required and the Simulink and HYPERSIM step sizes may need to
be adapted before generating the code. The code generation is done in two steps under the control
of Simulink and HYPERSIM. You should first generate the code in Simulink before using it and
then generate the encapsulation code in HYPERSIM.

1.6 TRANSFORMATIONS REQUIRED IN THE MODEL


Models with continuous blocks and models with many step sizes will need to be transformed.
Even if, in principle, code can be generated using a model with continuous blocks, it is possible
that the time required to compute the model is too long and that this exceeds the duration of a step
size in real-time. In order to decrease the calculation time, the continuous blocks will need to be
transformed into their discrete equivalent, more adapted to a sampled universe.
Some commands were designed to execute this transformation automatically. It is preferable to
design all new models using discrete blocks.
If a model has discrete blocks with different step sizes, transitions will be required between
slow blocks and fast blocks.

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.

1.7 ADAPTING STEP SIZES OF SIMULINK IN REAL-TIME


In real-time, the step sizes of the Simulink model and HYPERSIM must be identical.

1.8 ADAPTING STEP SIZES OF SIMULINK AND HYPERSIM IN DIFFERED TIME


In differed time, the step sizes defined in the Simulink model and in HYPERSIM can be different,
provided their ratio is a full integer and the step size of the model is slower.

1.9 CODE GENERATION


Generating the code of a Simulink model used in HYPERSIM consists of two steps:
First, the Simulink model code is generated using the Real-Time Workshop;
Second, the container code of the Simulink model is generated in HYPERSIM.
HyperLink operation will be described using a simple example. In Figures 1 - 6 (a), the voltage
source GeQD is replaced by the Simulink three-phase voltage source (see Figure 1 - 1). The
amplitude of this voltage source can be controlled via the HYPERSIM Control Module Interface
by adjusting the value of the constant ConstFY in Figure 1-6 (a). Alternatively, the amplitude of
the voltage source can be controlled by adjusting the value of the constant Gain in the Simulink
model of the voltage source. The HYPERSIM files are cont_volt_sou_opt1.sch,
cont_volt_sou_opt2.sch and the Simulink file is voltsousmlk.mdl

1.Models with Multiple Sample Rates

4-1-548
Matlab and Simulink Models
Code Generation

Figure 1 - 1 Simulink Model of a Controlled Voltage Source

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)

Figure 1 - 2 Simulation Parameters Window of a Simulink Model


Using this window1, execute the following:
A Click the tab Solver;

B In the section Solver Options, select Type: Fixed-step;

C Still in Solver Options, select the integration method. If there are no continuous blocks in the
Simulink model, choose the discrete option;

D Enter the Step size (must be the same as in HYPERSIM2);

E Click the Real-Time Workshop tab (see Figure 1 - 2);

F Enter HyperLink.tlc in the System target file field;

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)

Figure 1 - 3 Real-Time Files Window of a Simulink Model

G Enter Hyperlink.tmf in the Template makefile field:

H Do not click the button Generate code only

I Select HyperLink code generation options in the list Category.

i) (k

j)

Figure 1 - 4 Code Generation Options in HyperLink

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.

K Click the Build button.


Simulink will generate the code for the Simulink model in a sub-directory1 of the model directory.
Once the code is generated, you can go to the second step which consists in inserting one or many
elements that can integrate the code generated by Simulink/RTW in your power system.
Afterwards, when generating code in HYPERSIM, a container code of the Simulink model will
be produced.

1.10 ADDING A SIMULINK MODEL TO DIAGRAM


To add a model created in Simulink to a HYPERSIM diagram, it is necessary to first generate its
code. Once the C code of a model has been generated using RTW in Simulink, it is possible
to add it to a HYPERSIM diagram and to process the result. Three methods can be used to do this:

Connecting a HyperLink2 power system element to a bus;


Using some power system elements (such as breakers) for which it is possible to replace
their control block with a contained Simulink model.
Using a Simulink3 block.
Note : Only HyperLink versions 6.1 and after allow using Simulink blocks whose input/output
connection is done graphically.
Unlike other elements, HyperLink elements do not have ready-to-use simulation block
functions stored in libraries. The simulation functions for a Simulink model are generated at the
time the power system is analyzed and their code is stored directly in the directory .../exec/
src_HyperLink located in the code generation directory selected by the user. Moreover, the files
generated by RTW will also be copied to this directory. A file with the extension .info will
be generated at the same time and location. It defines, among others, the connections between the
HYPERSIM signals and the Simulink input/output.

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.

E Edit the icon label to provide it with a meaningful name.

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.

Figure 1 - 5 Parameters of a HyperLink Element


Click Apply to include the model. Note that these parameters are also displayed for elements that
can use a Simulink model, such as breakers. However, you must select the Simulink button in
the control section of their respective window to replace the internal control block with the
Simulink command (Figure 1 - 6b shows the window a voltage source controlled by a Simulink
model).

E Finish drawing the power system and go to Simulation mode.

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

# INPUTS : Liste des entrees


# Comporte les champs (colonnes) suivants =
# Indice
# Etiquette de Simulink
# M Nom du signal HYPERSIM
# M Type du signal HYPERSIM (int, float, double)
#
# OUTPUTS : Liste des sorties
# Comporte les champs (colonnes) suivants =
# Indice
# Etiquette de Simulink
# M Nom du signal HYPERSIM
# M Type du signal HYPERSIM (int, float, double)
#
# SCOPES : Liste des "scopes"
# Comporte les champs (colonnes) suivants =
# Indice
# Etiquette de Simulink
# M Nom du signal HYPERSIM (meme que letiquette)
#
# NOTE: Les champs dans "INPUTS", "OUTPUTS" et "SCOPES"
# sont separes par des espaces ou des tabulations!
#
# ATTENTION! Seules les colonnes 4 et 5 des signaux peuvent etre modifiees.
#

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)

Figure 1 - 6 Voltage Source Modeled by Simulink


Once edited, the lists in our .info file will be as follows:

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
}

Figure 1 - 7 Lower Part of the file hk7.1_GeQD_voltsousmlk.info (After Editing)


Note that the dashes have been replaced by the names of the required HYPERSIM signals (as
named in the lists of sensors).
Also note that the Simulink label-HYPERSIM signal association will be kept if you need to
regenerate the code of the Simulink model. However, any new label will have a - in its signal
field and any label removed will be deleted from the .info file.
The scopes are considered as outputs of the HyperLink elements.

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

A By using an S Function written in C, whose code is available.

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

1.11 CHANGING SIMULINK MODEL PARAMETERS DURING


SIMULATION
When integrating a Simulink model with HYPERSIM, it is possible to change some model
parameters during a simulation. The parameter change is done via the Simulink interface.
Simulink allows users to transmit the values of changed parameters towards the external
simulation process, when they specify the external simulation mode. To do this, Simulink uses
a MEX file containing predefined functions allowing communication with an external process.
We have developed a mex file which communicates with the HYPERSIM parameter change
mechanism and that is recognizable by Simulink.
The parameters of the Simulink block and the HyperLink element correspond to the
information transmitted when changing parameters in the Simulink interface, and as such, they
can pass the values originating from the interface.

1.12 LIMITS OF PARAMETERS


It is not possible to change the block parameters of a Simulink model without recompiling.
Actually, a parameter cannot be changed during a simulation if the change affects the following:
the number of states, inputs or outputs in any block;
the sampling rate or the number of step sizes;
the integration algorithm for continuous systems;
the name of the model or of any block;
the parameters of Fcn blocks;
the zero parameters in the blocks State Space and Zero Pole (continuous and discrete)
among those specified by the user or those that are calculated (i.e. the matrices A, B, C, and
D generated by a transformation from Zero-pole to State space;
the parameters of Fcn blocks.
If you wish to change one of the parameters above, you must generate the model code and,
hence, the code in HYPERSIM.
However, the parameters of the transfer functions and of the State space blocks can be
changed, under certain circumstances.
The parameters (polynomial numerators and denominators) of
Transfer Fcn (continuous and discrete) and Discrete Filter blocks can be changed, as
long as the number of states is not affected.
Consult the SIMULINK Real-Time Workshop - Users Guide1 for detailed information
on the changes of parameters that are not allowed during a simulation.

1. Simulink 4.0, release 12

4-1-562
Matlab and Simulink Models
Procedure Used to Change Parameters

1.13 PROCEDURE USED TO CHANGE PARAMETERS


In order for the Simulink interface to communicate with HYPERSIM, the environment variables
IG_DISPLAY (example: setenv IG_DISPLAY menelas:1) and SSR_ROOTDIR must be
defined before starting Matlab. IG_DISPLAY specifies the name of the machine running the
HYPERSIM interface and also its number1, and SSR_ROOTDIR defines the base directory of the
power system simulation software. However, if not already done, it is possible to review these
values when initializing the communication. See step below.
To change the parameters during a simulation, execute the following:
A Start the simulation in HYPERSIM

B Start Simulink

C Open the model in which you want to change the parameters.

D Display the External Mode Control Panel window by selecting the menu:
Tools->External Mode Control Panel....

E Click the Target Interface button. The following window is displayed:

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.

J Then, select Simulation->Start real-time code or press ctrl-t (optional).


Afterwards, each time you change a parameter (one that is allowed), Simulink will transmit when
you click Apply in the window of the corresponding block.

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.

1.14 GUIDELINES FOR A JOINT SIMULINK - HYPERSIM SIMULATION.


This section introduce the basic guidelines to design a Simulink diagram that can be used in a
Real-Time simulation using HYPERSIM.
Note : Please refer to document "Quick Start using HYPERSIM and Matlab/Simulink" for a
more detailed procedure.

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.

Rule 3: Modelling In order to achieve real-time simulation:


in Simulink
in discrete- Only discrete-time (in Z-domain) modelling is allowed. Thus, no continuous states is
time allowed in the diagram, like S-domain blocks.
domain (Z)
All discrete blocks (Z-domain) should operate at the same timestep, or at a greater multiple
of the timestep.
No limitation is present on the discrete method (trapeze, Euler, etc).
The timestep values should be identical in HYPERSIM and Simulink.
Note : Simulink offers the capability to discretize automatically (transform from s to z). See
Simulink-Tool-Model Discretizer.

Rule 4: Limitation In order to correctly use the real-time workshop:


in Simulink
modelling. No block "S-Function based on a "m-file" are allowed in the diagram;
No block "Matlab-Function" are allowed;
No timer block or time related elements are allowed (see rules #5).
Note : "S-Function" based on C code is allowed. Please refer to Matlab/Simulink for more
details.

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.

The model should make calculations from those input signals;


The models calculates a voltage or a current that is sent back to HYPERSIM.
Those signals are used in HYPERSIM to supply controlled voltage source or current source.
Note : On the Power System side (HYPERSIM), model must be implemented as a voltage or a
current source.
On the control side (Simulink), only calculations are done based on voltage/current
measurements.

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.

THIS PAGE IS INTENTIONALLY LEFT BLANK

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.

2.2 UCB ICON AND DIAGRAM


The following icon and diagram represent a UCB. Note that the diagram is a general
functional block with the same number of inputs and outputs as a UCB.

GAIN KJ

Use ENTREE SORTIE

Figure 2 - 1 UCB Icon and Diagram

2.3 UCB COMPONENTS


The simulation of a UCB is done via a block simulation function that implements the users
algorithm.
The UCB has the following features:
The UCB simulation function is called at each step size to process input signals
generated by other blocks and to produce output signals that will be used by other
blocks;
The UCB can have parameters that can be changed during the execution of the
simulation. For example, a block implementing a sine generator will have the following
parameters: amplitude, frequency and phase shift. The parameters used in the interface
and those of the simulation function can be different. In such cases, it is possible to
define a transformation code allowing to switch from one representation to another;

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:

# Block breaker data file

NOMBLOC = breaker
DESCR = breaker de base
NOMEX = ucb_breaker_ex
NOMINIT = ucb_breaker_ex_init();
TEXEC = 5.0e-6

# 1- Block parameters

NPAR = 3

Tman1 s double 1 0.0 1 First operation time


Tman2 s double 1 0.0 1 Second operation time
EtIn - int 1 0 1 Initial state

# 2- Simulation function parameters

NPARSIM = 3

T1 ech. int 1 0.0 1 No. sample of the first operation time


T2 ech. int 1 0.0 1 No. sample of the second operation time
EtIn - int 1 0 1 Initial state

# 3- Simulation function historical values

NHIST = 4

POW_1 int* 1 0 POW value


CountEnab int* 1 0 HistoriqueCount enable history
Count1 int* 1 0 Present count for the 1st state change
Count2 int* 1 0 Present count for the 2nd state change

4-2-570
User Coded Blocks
UCB Limits

# 4- Block inputs/outputs

NIO = 1

Command - int* Out Command signal 0: open, 1: closed

2.4 UCB LIMITS


UCBs are subject to the following limits:
Parameters with many elements can only have one initial value identical for all;
The use of functions, other than those defined in the various system libraries (for example:
mathematical library libm...) is not allowed in the parameter transformation code.

2.5 BUILDING BLOCKS

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)

Block Modification Flag


_ = block not modified; * = bloc modified

Status
O Block Opened
N New Block Opened
_ Block Not Opened

Example:
bloc src

[__] src>: Bloc src non ouvert;


[O_] src>: Bloc src ouvert;
[O*] src>: Bloc src ouvert et modifi;
[N*] src>: Nouveau bloc src modifi.

2.6 UCB2 COMMANDS


In the following description of UCB commands, the string of characters between < > is
optional. The parameters between [ ] are also optional, block stands for the block name.
Commands with no parameters apply to the current block.
Here is the list of commands accepted by UCBs:

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>

2.7 UCB PROGRAM IN BATCH MODE


As stated earlier, the batch mode allows users to perform only one operation every time the ucb
command is executed. The UCB program ends after completing the requested task.
Four types of operations are possible in this mode:

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 BUILDING A BLOCK

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.

2.8.2 Starting To start the UCB program, type:


the UCB
Program ucb gain <enter>

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

Name Type Dimension Default Description


where:
Name: Name of historical variable
Type: Type of historical variable
int* Historical variable in integer (scalar or vectorial)
double* Historical variable in real number (scalar or vectorial)
Dimension: Dimension of historical variable
Default : Default value (or initial) of the historical variable
Description: Short description of the parameter (between double quotation marks)
The different fields in a parameter description line are separated by spaces.
If the block doesnt have historical variables, just leave this section empty.
Example of a historical variable
POW_1 int* 1 0 Value of the last POW

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

Compiling block: breaker (simul)!


No errors.
You didn't touch any files.
Compilation succeeded!
Compiling block: breaker (xform)!
No errors.
You didn't touch any files.
Compilation succeeded!

If a block doesnt have a parameter transformation function, only one compilation (simul) will be
executed. If errors are detected during the compilation, error messages will be displayed next to
the erroneous statement that caused the error.
Refer to the UCB command Compile for more information on compilation. If the block code
has not been generated, you will be asked if you want execute this operation. The default answer
is Yes. If you answer No, the existing block code will be compiled.
This completes the definition of the block which is now ready to be used in HYPERSIM.

2.9 INCLUDING A UCB IN A POWER SYSTEM

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.

E List of UCB blocks contained in the directory specified in d.

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
%% ---------------------------------------------

1.The definition of control panels is done in administration mode in HYPERSIM.

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

DESCR = General purpose breaker


TEXEC = 5.00e-6

%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
%% 2- Block documentation text
%% ------------------------
%%
%% Enter text after comments
%%
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

This block defines a general purpose breaker control.

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

Tman1 s double 1 0.0 1 Time of first operation


Tman2 s double 1 0.0 1 Time of second operation
EtIn - int 1 0 1 Initial state

%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
%% 4- Simulation function parameters (OPTIONAL)
%% ------------------------------
%%
%% If the simulation function uses parameters different
%% from the block parameters you must also enter the transformation code
%% in section 10 below. If simulation function parameters and block
%% parameters have the same name, you do not have to assign them
%% in the transformation code. Ucb will do it for you.
%%
%% 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

T1 sample int 1 0.0 1 Sample number of first operation


T2 sample int 1 0.0 1 Sample number of first operation
EtIn - int 1 0 1 Initial state

%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
%% 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

%% Name Units Type Direction Description


%%
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%%

Command - int* Out Command signal 0: open, 1: close

%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
%% 6- Block's historical values
%% ---------------------------
%%
%% Enter block's historical values in a tabular form (5 columns).
%% Fields should be separated by one or more space characters.
%% Description should be between double quotes
%%
%% Name : Name of historical value
%% Type : Type of historical value
%% Enter: int* Integer (scalar or array)
%% double* Real (scalar or array)
%% Size : Size of historical value (number of units)
%% Description: Short description of historical value
%% (BETWEEN DOUBLE QUOTES)
%%
%% Format: (5 columns table)
%%
%% Name Type Size Default Description
%%
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%%

POW_1 int* 1 0 Last POW value


CountEnab int* 1 0 Count enable historical value
Count1 int* 1 0 Counter for first change of state
Count2 int* 1 0 Counter for second change of state

%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
%% 7- Global variables or defines of block (C code)
%% ---------------------------------------------
%%
%% Enter global variables and defines after comments.
%%
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%%

int blPOW_Get ();


int blIsTestEnable();

%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
%% 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
%%

/* This block has no initial is at ion function */

%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
%% 9- Block's execution code (C code)
%% -------------------------------
%%
%% Enter block's implementation code (executed at each step)
%% after comments.
%%
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%%

intPOW;

if (blIsTestEnable())
{
POW = blPOW_Get ();

if ((POW - *POW_1) > 0)


{
*Count1 = 0;
*Count2 = 0;
*CountEnab= 1;
}

if (*CountEnab)
{
if (*Count1 == T1)
{
*Command = 1 - EtIn;
}

if (*Count2 == T2)
{
*Command = EtIn;
*CountEnab = 0;/* 2 chang.d'etats effectue: Fin*/
}

(*Count1)++;
(*Count2)++;
}
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)

Block Modification Flag


_ = block not modified; * = bloc modified

Status
O Block Opened
N New Block Opened
_ Block Not Opened

Example:
List of Commands in French:

cat fichier [fichier]...: Lists the content of files


co<mpiler>: Used to compile the code of the current block yes
dat: Displays the content of the file ucb_BLOC.bldat
de<truire> [bloc]: Deletes the current block or the block specified as parameter
eff<acer>: Deletes the last changes made to the current block
exec: Displays the content of the file ucb_BLOC.exec
fe<rmer>: Closes the current block
gen<erer>: Generates the code of the current block
init: Displays the content of the file ucb_BLOC.init
lb: Displays the list of blocks in the current directory
ls: Calls the UNIX command ls.
mod<ifier> [bloc]: Creates or modifies the block definition specified as parameter
or by default the current block
more: Calls the UNIX command more.
n<ouveau> [bloc]: Creates a new block
o<uvrir> [bloc]: Opens the block specified or the current block
parform: Displays the list of parameters that can be accessed using a
control panel
pwd: Calls the UNIX command pwd
s<auver>: Saves the current block

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

2.10 USER PROGRAMMABLE BLOCKS


A The files $TOOLDIR/userbloc.tool (tool created initially) and $PALETTEDIR/userbloc
(representation of the user block in the palette) must exist to allow proper operation of the
program.

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

4.1 CONTROL PANEL PARAMETERS


Here is some detailed information on generating EMTP diagrams, particularly on the initial-
ization of form parameters from an EMTP specification.
A EMTP Decoding The EMTP software does not use the concept of phase. Consequently, it is necessary to set
Conventions conventions to represent a three-phase network as a single-wire diagram.
The filter recognizes the a b c and n or A B C and N characters, as specifying the 3 phases
and the neuter only if these characters are in position 6 (last character) in the EMTP fields
bus1 and bus21.
The cards representing the a b and c phases of a branch must follow each other in the proper
order in the EMTP file.
The specific coding of the bus1 and bus2 fields described in the interemtp2 manual prioritizes
understanding node names. This generally produces a 4 character name. If only the phase no-
tation is identified, then a 5 character node name is produced.
Any other convention or use of option 0 when calling the filter maintains the use of 6 charac-
ters in the bus1 and bus2 fields as a node name.

B Validation The filter usually operates without messages, except when non-supported entities or errors in
the conventions described above occur. In this last case, a message in the language chosen by
the user is displayed on the standard output of the EMTP card that caused the error. Still, the
diagram is generated with the information that is actually partly recognized.

C Relationship 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.

1.See EMTP documentation for this terminology.


2.IREQ-94-247 Report - Base de donnes de rseau et interfaces by Gilbert Sybille

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.

H Transformers Linear and saturable transformers with 1, 2 or 3 windings are handled.


If there are neutral impedances, they are enclosed in the form and are not drawn separately.
The links originating from transformers with 3 connectors are not always drawn optimally. You
will need to edit the diagram manually 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.

J Generators Only sinusoidal sources of type 14 are handled.

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 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.

5.2.2 Line model


A Conversion In a three-phase line, each phase is mutually coupled with other phases. To facilitate the line sim-
from 3 ulation, the EMTP uses a technique to convert a mutually coupled three-phase line into 3 decou-
coupled pled single-phase lines representing 3 decoupled modes. This is graphically represented in 5 - 1.
phases into 3
decoupled In HYPERSIM, lines are modeled as follows:
modes Get three phase node voltages at each terminal K and M,
Convert three phase voltages into three-mode voltages:

V0 Va
1
V1 = Tv Vb (EQ 1)
V2 Vc

For an unbalanced line, T v is the solution of the following equation:


1
[ ] = T v ZYT v (EQ 2)

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

Mutually coupled three-phase line

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)

Inject phase current to terminal nodes K and M.

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 -

Figure 5 - 2 : Equivalent circuit of one mode of a transmission line

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

HYPERSIM, as EMTP, uses the trapezoidal integration technique, it means that


t

y(t) = x ( t ) dt (EQ 10)


0

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

Using the trapezoidal integration rule given by eq. 11 above, we get

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

According to eq. on page 606, an L branch is equivalent to a resistor R eq in parallel to a his-


toric current source i hist as shown in 5 - 3. One can see that the historic current depends only on
the values of voltage and current of the previous step.
For a fix inductor, L is constant, therefore R eq is constant and need not to be recalculated at each
time step.

k k k k
i km i km

2L T-
L ------ i hist C ------ i hist
T 2C

m m m m

Figure 5 - 3 : Equivalents of L and C branch using the trapezoidal rule

C branch

The current of a C branch connected between nodes k and m is given by

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.

Branch of RLC combination

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

Non-linearity is represented normally as a characteristic curve approximated by successive linear


segments. Due to the non-linearity, R eq is no longer constant and need to be recalculated for each
time step. Theoretically, this must be done based on the conditions of the actual time step, but
HYPERSIM does it based on conditions obtained at the last time step because the current results
are not yet available. The change from one segment to the next can be one time-step delayed. It
is therefore a good practice to define the non linearity characteristic with a smooth changing
(more points where there are more changes and vice versa) to avoid the hunting. An example of
a non-linear resistance is shown in 5 - 4.
HYPERSIM works rather with the conductance Y eq = 1 R eq and splits it as follows:

Y eq = Y ini + Y add (EQ 24)

where Y ini is the fixed part used as initial condition and Y add is the varying part used to update
the conductance according to its operating point.

D Switches Switches such as circuit-breaker and power electronic switches are simulated as resistors with two
values: one small value (milliohms) for closing state and one large value (meghoms) for opening
state. To know which resistor value to be used, HYPERSIM needs to know the state of switched
prior to the calculation of Y matrix.

E Generalized 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:

Y eq = Y ini + Y add (EQ 25)

where Y ini is the fixed part used as initial condition and Y add is the varying part used to update
the conductance according to its operating point.
Therefore, all branches are also generalized elements connected to two nodes in the substation.
Linear branches have Y add = [ 0 ] and Y ini = Y eq

F Solution of 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

Y ii = ( all self conductances connected to node i ) (EQ 26)

Y ij = ( all mutual conductances connected between nodes i and j ) (EQ 27)

4-5-608
User Coded Model (UCM)
Solution Method in HYPERSIM

Ii = ( source & historic currents entering node i ) (EQ 28)

( source & historic currents leaving node i )


Y has dimension n x n where n is number of nodes in the substation (excluding the ground node),
V and I are vectors of dimension n. A three-phase bus bar corresponds to 3 nodes.
Like each individual element, HYPERSIM splits also Y into a fixed part and a varying part:

Y = Y INI + Y ADD (EQ 29)

Y INI is formed by the fixed parts Y ini of all elements and Y ADD is formed by varying parts
Y add of all elements.
The simulation of all power elements in a substation required to solve the node equation
YV = I where Y and I are known by eqs. 23 to 27 and V is the node voltage vector to be found.
HYPERSIM solve the node equation using the LDU conversion:

Y = LDU (EQ 30)

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

DUV = J (EQ 34)

using the backward substitution (because DU is an upper triangular matrix).

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

D ii = Y ii Dkk Lik Uki (EQ 35)


k=0

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

Figure 5 - 5 : Example of a Y LDU matrix and a part of it which


needs to be recalculated if a resistor connected to node 2 changes

All equivalent resistors of power elements contributing to Y are connected either between a node
k and the ground node or between two nodes k and m. According to equations 35 to 38, if a resistor
connected to node k change its value, this will change at least the value of Y kk . Therefore D ii ,
L ij and U ij , for all i andj k , have to be re-evaluated. In the Y LDU matrix shown in 5 - 5, this
corresponds to elements in the square bloc below and in the right starting from D kk (k = 2 in this
example).
For the purpose of saving the computation time, HYPERSIM orders the Y and Y LDU matrices
such as nodes connected to varying elements are grouped together and correspond to the lower
right part of these matrices.

H Sparsity of Y 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.

10 Re-initialize node currents I to [0] for the next step

11 Add elements historic currents I hist to node current I.

12 Calculate control functions

5.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

Simple Complex Simple


Line Line
substation substation substation

(a)

Substation Line Substation Line Substation


Task Task Task Task Task

Substation Substation
control control
task #1 task #2

(b)

Figure 5 - 6 : A network structure and the corresponding parallel tasks

4-5-613
User Coded Model (UCM)
User Coded Model

5.3 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.

Bus1 Bus3 Bus4


Bus2
T1
In

UCM
T2

Figure 5 - 7 Example of an UCM inside HYPERSIM network

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 :

Y eq = Y ini + Y add (EQ 39)

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

Yfill ij = 0 if Y eq, ij = 0 (EQ 40)

Yfill ij = 1 if Y eq, ij 0 (EQ 41)

The dimension of all these matrices is the total number of external and internal nodes.
The UCM can have current sources as well as historic currents injected to internal / external
nodes.
The code provided by user has the purpose of calculating the admittance matrix, currents sources,
historic currents and perform all desired control functions.

5.3.3 Composition
of an UCM
A Input 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

The fixed part of the admittance matrix Y ini ,

The sparsity indication matrix Y fill ,

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

Calculate currents sources.


Note: Voltage sources must be converted to current sources using Norton equivalent

Function postVNode

This function is called after the calculation of node voltages to


Calculate historics currents,
Determine new operating point of non-linearities,
Perform control functions and other calculations.

5.3.4 Building
an UCM
through an
example
A Functional
description
of the UCM in
example

The example of an UCM show in 5 - 8 covers many aspects in the UCM coding. It has current
sources, historic currents, non-linearity, internal and external nodes as well as control 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

Figure 5 - 8 Example of an UCM with its functional content

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

Rs: internal resistor of voltage source


Lvec, Vinc, Ldim: the non linear inductor depends on the rectified three-phase voltage
across it. It is define as a table Lvec of Ldim inductance values picked at regular intervals
of voltage Vinc.
freq: frequency of the source.

Calculated parameters and other parameters


used during the simulation

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

GaddVec[i] = T/(2 * Lvec[i]) - GLo


Lindex: indexes in the table GaddVec to be used to obtain current value of conductance
for each phase.
Lchanged: Indication if inductor has changed it value.
omega: angular frequency = 2 * freq.

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.

Control Inputs Outputs

A: control input which determines the amplitude of the voltage source.


IL: multiplex output port containing the three phase currents IL_a, IL_b, IL_c of the
inductance.
VLrec: control output giving the three-phase rectified value of the inductors voltages.

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

int ucmNodeChange(int node): nodeth element of vector NodeChange. this vec-


tor is also allocated by HYPERSIM.
Ex: ucmNodeChange(NE_b) = 1
double ucmTimeStep: obtain the current simulation time step.
Ex: G = ucmTimeStep / (2.0 * L)

E Editing the 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.

UCM generated files and directories

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

ucm_myUCM.def Definition file


myUCM_ucm_gen generated code directory containing following
files:
ucm_myUCM_prep.h include file for the Preparation function
ucm_myUCM_prep.c Preparation function
ucm_myUCM_sim.h include file for Simulation functions
ucm_myUCM_sim.c Simulation functions

UCM definition file

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.

%% UCM Model Definition File -- Generated from:


%%
%% Model Example definition file -- Date: Tue Mar 22 16:16:10 EST 2005
%% -----------------------------------------------------------------------------
%%
%% Definition of a user's created HYPERSIM model
%% ---------------------------------------------
%%
%% Comments used by the definition file are preceded by this string: "%%"
%%
%% ***************************
%% * DO NOT MODIFY COMMENTS! *
%% ***************************
%%
%% Only edit zones between comments.
%% Follow directives describing format of data.
%%
%% This file is divided en 3 major sections : General description,
%% Preparatory data preprocessing and Model simulation.
%%
%% Here is the file general structure :
%%
%% I- Model description.
%% 1- General informations or parameters.
%% 2- Model's documentation.
%% 3- Form parameters (tunables).
%% 3.1- General parameters table.
%% 3.2- (Load Flow parameters table. NOT IMPLEMENTED!!!)
%% 4- Control IOs.
%% 5- Network nodes.
%% 6- Current sources.
%% 7- Historical currents.
%%
%% II- Preparatory data preprocessing.
%% 8- Calculated values.
%% 8.1- Calculated parameters table.
%% 8.2- (Calculated Load Flow values. NOT IMPLEMENTED!!!)

4-5-621
User Coded Model (UCM)
User Coded Model

%% 8.3- Preparation function code.


%% 8.3.1- Function's global code.
%% 8.3.2- Parameters & initial admittance matrix (Yini) calculation code.
%% 8.3.3- (Load Flow results calculation code. NOT IMPLEMENTED!!!)
%% 8.4- Includes paths list.
%% 8.5- Required libraries list.
%% 8.6- Required libraries paths list.
%%
%% III- Model simulation.
%% 9- Simulation code.
%% 9.1- Historical values table.
%% 9.2- Test points table.
%% 9.3- Simulation functions global code.
%% 9.4- Simulation initialization function.
%% 9.5- Before nodes voltage calculation function code.
%% 9.5.1- Sources calculation.
%% 9.5.2- Command selection.
%% 9.5.3- Admittances matrix calculation (YMadd).
%% 9.6- After nodes voltage calculation function code.
%% 9.6.1- Historical values calculation.
%% 9.6.2- Commands outputs calculation.
%% 9.6.3- Determine nodes to recalculate.
%% 9.7- Includes paths list.
%% 9.8- Required libraries list.
%% 9.9- Required libraries paths list.
%%
%% -----------------------------------------------------------------------------
%% Beginning of model definition:
%% -----------------------------------------------------------------------------
%%
%% I- Model description.
%%
%% 1- General informations or parameters.
%% -----------------------------------
%%
%% UCM_NAME: Model Unique Name, already assigned
%% UCM_TYPE: Model type (Choice of NetworkElement or CommandBlock)
%% Default: NetworkElement.
%% UCM_CATEGORY: Model category (Breaker, Transformer, etc.)
%% UCM_VERSION: User's model version number (in a string)
%% UCM_EXEC_TIME: Estimated model's average simulation step time.
%% Default: 5.0e-6 s.
%% UCM_DESCRIPTION: Short description of model (one phrase).
%%
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN GENERAL INFORMATION -- Enter or modify general information

UCM_NAME = 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

%% END GENERAL INFORMATION


%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
%% 2- Model's documentation.
%% ----------------------
%%
%% Enter text or reference after comments.
%%
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

4-5-622
User Coded Model (UCM)
User Coded Model

%% BEGIN DOCUMENTATION -- Enter model's documentation after this line...


Three-phase sine-wave voltage source with
- Programmable amplitude of sine waves
- Voltage sources have resistor in series with non-linear inductor
at output
- Inductor voltages are rectified and sent out for display

%% END DOCUMENTATION
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
%% 3- Form parameters (tunables).
%%
%% Form parameters can be changed by the user, through an editable form
%% or by any other public mean. Parameters definitions
%% are in a tabular form.
%%
%% 3.1- General parameters table (10 columns).
%% Contains the general parameters of the model.
%%
%% Format: ( 10 columns records)
%%
%% Name Tag Units Type Size Default Min Max Flags Description
%% ---- --- ----- ---- ---- ------- --- --- ------ -----------
%%
%% Columns descriptions:
%%
%% Name : Unique name of parameter (in model's scope).
%% Tag : Descriptive name to use in forms.
%% Units : Parameter's units.
%% Text field : Must follows the SI symbols definitions.
%% Enter a "-" when not used
%% Type : Type of parameter
%% Enter: intInteger value(s)
%% double Real value(s)
%% Size : Parameter size (1->n).
%% 1 defines a scalar.
%% Default : Default value(s) of parameter.
%% v : Default value for a scalar or an array.
%% (all array's cell will have the same value).
%% [v1 v2 v3 ... vn] : Default values for an array.
%% The last value will be propagated to remaining of array
%% if the default value set is smaller than the array.
%% Min : Minimum value allowed.
%% Max : Maximum value allowed.
%% Flags : Ored values of flags definitions or '-'.
%% Available values :
%% NOT_SIMUL_MOD : Cannot be modified during simulation.
%% Description : Short description of parameter (BETWEEN DOUBLE QUOTES)
%%
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN TUNABLE PARAMETERS -- Enter parameters table after this line...
Rs "Rs" 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"

%% END TUNABLE PARAMETERS

4-5-623
User Coded Model (UCM)
User Coded Model

%% 3.2- Load Flow parameters NOT IMPLEMENTED!!!

%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
%% 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"

%% END CONTROL IOS


%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
%% 5- Model nodes definitions table (6 columns).
%%
%%
%% Format: ( 6 fields records)
%%

4-5-624
User Coded Model (UCM)
User Coded Model

%% Name Phases IntExt Position Connect NL element Description


%% ---- -------- ------ -------- ------------------ -----------
%%
%% Fields descriptions:
%%
%% Name : Node's unique identifier.
%%
%% Phases : Number of phases.
%% Text field: Enter a number (1, 3) or
%% 0 for dynamic number of phases.
%% IntExt : Nodes can be internal or external.
%% An external node has a connection to the network
%% and will be visible as a "network connector"
%% on the schematic.
%% Values : intern/extern
%% Position : Position of connector around the Ucm box
%% in schematic (external nodes only!).
%% Choice of :
%% left, right, top, bottom, auto
%% or '-' : Non applicable.
%% Connect NL element :
%% Indicates if a non linear element is connected
%% to this node.
%% Text field : Enter "yes" or "no".
%% Description : Short description of node.
%% (BETWEEN DOUBLE QUOTES)
%%
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN NODES DEFINITIONS -- Enter nodes table after this line...
NE 3 extern top yes "Network Connection"
NI 3 intern - yes "Internal node"

%% END NODES DEFINITIONS


%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
%% 6- Current sources definitions table (single phase).
%%
%%
%% Format: ( 3 fields records) [1] o +
%% |
%% Name Pos. End conn. Neg. End conn. |
%% ---- -------------- -------------- _|_
%% / ^ \ I
%% Fields descriptions: \_|_/
%% |
%% Name : Current source unique identifier. |
%% (Append phase suffix : _a, _b, etc.) [2] o -
%% if applicable.
%% Pos. End conn. : Positive end connection point [1].
%% Neg. End conn. : Negative end connection point [2].
%%
%% Connections points accepted values:
%%
%% Node name : The name of a node defined in section 4.
%% ground : Connected to ground.
%%
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN CURRENT SOURCES -- Enter sources table after this line...
Isrc_a NI_a ground
Isrc_b NI_b ground

4-5-625
User Coded Model (UCM)
User Coded Model

Isrc_c NI_c ground

%% END CURRENT SOURCES


%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
%% 7- Historical currents definitions table (single phase).
%%
%%
%% Format: ( 3 fields records) [1] o +
%% |
%% Name Pos. End conn. Neg. End conn. |
%% ---- -------------- -------------- _|_
%% / ^ \ I
%% Fields descriptions: \_|_/
%% |
%% Name : Historical current unique identifier. |
%% (Append phase suffix : _a, _b, etc.) [2] o -
%% if applicable.
%% Pos. End conn. : Positive end connection point [1].
%% Neg. End conn. : Negative end connection point [2].
%%
%% Connections points accepted values:
%%
%% Node name : The name of a node defined in section 4.
%% ground : Connected to ground.
%% - : Not connected
%%
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN HISTORICAL CURRENTS -- Enter historical currents table after this...
Ihist_a NE_a NI_a
Ihist_b NE_b NI_b
Ihist_c NE_c NI_c

%% END HISTORICAL CURRENTS


%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
%% II- Preparatory data preprocessing.
%%
%% Due to performances issues, we must do as much work as possible
%% before simulation starts. This part never runs in real time.
%%
%% 8- Calculated values (used as parameters).
%% ---------------------------------------
%%
%% Values to calculate before the simulation starts.
%% Simulation tasks will use results of this calculations.
%%
%% 8.1- Calculated parameters table. (5 columns).
%% Contains the calculated parameters definitions.
%%
%% Format: ( 5 columns records)
%%
%% Name Units Type Size Description
%% ---- ----- ---- ---- -----------
%%
%% Columns descriptions:
%%
%% Name : Unique name of parameter (in model's scope).
%% Units : Parameter's units.
%% Text field : Must follows the SI symbols definitions.
%% Enter a "-" when not used

4-5-626
User Coded Model (UCM)
User Coded Model

%% Type : Type of parameter


%% Enter: intInteger value(s)
%% double Real value(s)
%% Size : Parameter size (1->n).
%% 1 defines a scalar.
%% Description : Short description of parameter (BETWEEN DOUBLE QUOTES)
%%
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN CALCULATED PARAMETERS -- Enter parameters table after this line...
GaddVec - double 9 "GaddVec"
Lchanged - int 1 "Lchanged"
Lindex - int 1 "Lindex"
omega - double 1 "omega"
period - double 1 "period"

%% END CALCULATED PARAMETERS

%% 8.2- Calculated Load Flow values. NOT IMPLEMENTED!!!

%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
%% 8.3- Preparation function code.
%% Contains the code to produce the calculated values .
%%
%% 8.3.1- Functions global code.
%% The following code will be at the beginning of the
%% preparatory code file.
%%
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN PREPARATORY GLOBAL CODE -- Enter code under the appropriate comment...

/* 8.3.1.1 -- User includes */


#include <stdio.h>

/* 8.3.1.2 -- Definitions */

/* 8.3.1.3 -- Declarations */

/* 8.3.1.4 -- Local functions (static) */

%% END PREPARATORY GLOBAL CODE


%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
%% 8.3.2- Parameters & initial admittance matrix (Yini) calculation code.
%%
%% Enter code here to calculate the initial admittance matrix
%% and the calculated parameters.
%%
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN PREPARATION FUNCTION CODE -- Enter code after this line...
int i, j;
doubleGLo, Lo, Gs;

printf ("********** ucm_Exemple_prep: Rs = %f *******************\n", Rs);

/* Initialize Yini and Yfill to 0 */

for (i = 0; i < 6; i++)

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;
}
}

/* Compute Yini, Yfill */

Lo = Lvec[0];
GLo = ucmTimeStep / (2.0 * Lo);
Gs = 1.0 / Rs;

ucmYini(NI_a, NI_a) = Gs + GLo;


ucmYini(NI_b, NI_b) = Gs + GLo;
ucmYini(NI_c, NI_c) = Gs + GLo;

ucmYfill (NI_a, NI_a) = 1;


ucmYfill (NI_b, NI_b) = 1;
ucmYfill (NI_c, NI_c) = 1;

ucmYini(NI_a,NE_a) = ucmYini(NE_a, NI_a) = -GLo;


ucmYini(NI_b,NE_b) = ucmYini(NE_b, NI_b) = -GLo;
ucmYini(NI_c,NE_c) = ucmYini(NE_c, NI_c) = -GLo;

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;

/* Calculer GaddVec (param de simulation) */

for (i = 0; i < Ldim; i++)


{
GaddVec[i] = (ucmTimeStep / (2.0 * Lvec[i])) - GLo;
}

/* Calculate other parameters */

omega = 2.0 * 3.141593 * freq;


period = 1.0 / freq;

%% END PREPARATION FUNCTION CODE

%% 8.3.3- Load Flow results function code. NOT IMPLEMENTED!!!

%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
%% 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

%% Put an "\" at end of line to continue list on next line.


%%
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN PREPARATORY INCLUDES PATHS LIST -- Modify the following list...

UCM_PREP_INCLUDES_PATHS =

%% END PREPARATORY INCLUDES PATHS LIST


%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
%% 8.5- Required dependency libraries pathnames list.
%%
%% Enter the pathnames of your dependency libraries
%% separated by spaces after "=".
%% Put an "\" at end of line to continue list on next line.
%%
%% NOTE :
%%
%% Use the following special names to select the proper paths and/or
%% libraries names if needed. They will be replaced according to
%% the system architecture.
%%
%% <UCMA_DIR> : Will be replaced by a directory name
%% according to the computer/os
%% combination you have.
%% <UCMA_LIB_SUFFX> : Current library name suffix (Ex.: .a).
%% <UCMA_LIB_RSUFFX> : Current dynamic library name suffix
%% (Ex. : .so).
%% <UCMA_LIB_PREFX> : Current library name prefix (Ex.: lib).
%%
%% Exemples :
%%
%% UCM_PREP_DEP_LIBS_PATHNAMES = \! Always the same library
%% /usr/ucm/libmath.a
%%
%% UCM_PREP_DEP_LIBS_PATHNAMES = \! Change according to architecture
%% /user/ucm/libs/<UCMA_DIR>/<UCMA_LIB_PREFX>math<UCMA_LIB_SUFFX>
%%
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN PREPARATORY DEPENDANT LIBRARIES LIST -- Modify the following list...

UCM_PREP_DEP_LIBS_PATHNAMES =

%% END PREPARATORY DEPENDANT LIBRARIES LIST


%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
%% 8.6- Required libraries for preparatory functions.
%% Enter full paths or lib notation (-Lpath -llibrary) of your
%% libraries separated by spaces after "=".
%% Put an "\" at end of line to continue list on next line.
%%
%% ARCHITECTURE DEPENDANT PATHS: See NOTE in section 8.5
%%
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN PREPARATORY LIBRARIES LIST -- Modify the following list...

UCM_PREP_LIBRARIES =

%% END PREPARATORY LIBRARIES LIST


%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
%% III- Model simulation.
%%

4-5-629
User Coded Model (UCM)
User Coded Model

%% This sections deals with model's simulation topics.


%%
%% 9- Simulation code.
%%
%% Code to simulate the model can be executed before or after the nodes
%% voltages calculations. Code that change topology and cause
%% recalculation of admittances matrix (YMadd) must be executed before.
%%
%% 9.1- Historical values table.
%%
%% Contains the historical values of the model.
%% Historical values are used to keep data from step to step.
%%
%% Format: ( 5 columns records)
%%
%% Name Type Size Default Description
%% ---- ---- ---- ------- -----------
%%
%% Columns descriptions:
%%
%% Name : Unique name of historical (in model's scope).
%% Type : Type of historical value
%% Enter: intInteger value(s)
%% double Real value(s)
%% Size : Historical value size (1->n).
%% 1 defines a scalar.
%% Default : Default value(s).
%% v : Default value for a scalar or an array.
%% (all array's cell will have the same value).
%% [v1 v2 v3 ... vn] : Default values for an array.
%% The last value will be propagated to remaining of array
%% if the default value set is smaller than the array.
%% Description : Short description of historical value
%% (BETWEEN DOUBLE QUOTES)
%%
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN HISTORICAL VALUES -- Enter the table after this line...
time double 1 0.0 "time"

%% END HISTORICAL VALUES

%% 9.2- (Test points table. NOT IMPLEMENTED!!!)

%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
%% 9.3- Simulation functions global code.
%% The following code will be at the beginning of the
%% simulation functions file.
%%
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN SIMULATION GLOBAL CODE -- Enter code under the appropriate comment...

/* 9.3.1 -- User includes */


#include <math.h>

/* 9.3.2 -- Definitions */

/* 9.3.3 -- Declarations */

/* 9.3.4 -- Local functions (static) */

4-5-630
User Coded Model (UCM)
User Coded Model

%% END SIMULATION GLOBAL CODE


%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
%% 9.4- Simulation initialization function.
%% Code executed once before simulation starts.
%%
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN SIMULATION INITIALIZATION FUNCTION CODE -- Enter code ->...
time = 0;
Lindex = 0;
Lchanged = 0;

%% END SIMULATION INITIALIZATION FUNCTION CODE


%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
%% 9.5- Before "nodes voltage calculation" function code.
%% Code executed before "nodes voltages calculations".
%%
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN BEFORE VOLTAGE CALCULATION CODE -- Enter code ->...
/* User code: calulate Yadd */

int i;
doubleVsrc_a, Vsrc_b, Vsrc_c;
doubleTwoPiOver3 = 2.094395333; /* 2.0 Pi / 3 */

/* Calculate current sources */

Vsrc_a = A * sin (omega * time);


Vsrc_b = A * sin (omega * time - TwoPiOver3);
Vsrc_c = A * sin (omega * time + TwoPiOver3);

Isrc_a = Vsrc_a / Rs;


Isrc_b = Vsrc_b / Rs;
Isrc_c = Vsrc_c / Rs;

/* Compute Yadd if non-linearity changes */

for (i = 0; i < 6; i++)


ucmNodeChanged(i) = 0;

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];

/* Indicate to HYPERSIM that nodes are affected by */

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;
}

%% END BEFORE VOLTAGE CALCULATION CODE


%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
%% 9.6- After "nodes voltage calculation" function code.
%% Code executed after "nodes voltages calculations".
%%
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN AFTER VOLTAGE CALCULATION -- Enter code ->...
doubleLo, GLo, GL;
doubleVL_a, VL_b, VL_c;
int index;

time += ucmTimeStep;

/* Calculate historic currents */

Lo = Lvec[0];
GLo = ucmTimeStep / (2.0 * Lo);
GL = GLo + GaddVec[Lindex];

VL_a = ucmVNode(NI_a) - ucmVNode(NE_a);


IL_a = VL_a*GL + Ihist_a;
Ihist_a = IL_a + VL_a*GL;

VL_b = ucmVNode(NI_b) - ucmVNode(NE_b);


IL_b = VL_b*GL + Ihist_b;
Ihist_b = IL_b + VL_b*GL;

VL_c = ucmVNode(NI_c) - ucmVNode(NE_c);


IL_c = VL_c*GL + Ihist_c;
Ihist_c = IL_c + VL_c*GL;

/* Compute 3-phase rectified voltage accross inductance */

VLrec = fabs (VL_a);


if (VLrec < fabs(VL_b))
VLrec = fabs(VL_b);
if (VLrec < fabs(VL_c))
VLrec = fabs(VL_c);

/* New operating point of L */

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;

%% END AFTER VOLTAGE CALCULATION CODE


%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
%% 9.7- "Includes" paths list.
%% Enter paths of your include files separated by spaces after "=".
%% Put an "\" at end of line to continue list on next line.
%%
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN SIMULATION INCLUDES PATHS LIST -- Modify the following list...

UCM_SIMULATION_INCLUDES_PATHS =

%% END SIMULATION INCLUDES PATHS LIST


%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
%% 9.8- Required simulation dependency libraries pathnames list.
%% Enter the pathnames of your libraries separated
%% by spaces after "=".
%% Put an "\" at end of line to continue list on next line.
%%
%% ARCHITECTURE DEPENDANT PATHS: See NOTE in section 8.5
%%
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN SIMULATION DEP LIBS LIST -- Modify the following list...

UCM_SIMULATION_DEP_LIBS_PATHNAMES =

%% END SIMULATION DEP LIBS LIST


%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
%% 9.9- Libraries required by simulation functions.
%% Enter full paths or lib notation (-Lpath -llibrary) of your
%% libraries separated by spaces after "=".
%% Put an "\" at end of line to continue list on next line.
%%
%% ARCHITECTURE DEPENDANT PATHS: See NOTE in section 8.5
%%
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN SIMULATION LIBRARIES LIST -- Modify the following list...

UCM_SIMULATION_LIBRARIES =

%% END SIMULATION LIBRARIES LIST


%% END OF FILE

4-5-633
User Coded Model (UCM)
User Coded Model

5.3.5 Using an Launch HYPERSIM with the command hyper,


UCM in
HYPERSIM
On the top tool bar, use the menu
diagram Properties -> Directories -> User Code Bloc Directory
to define the directory (complete path) where UCMs are built and stored. Actually User
Code Bloc Directory stands for UCBs as well as for UCMs.
To put an UCM into the diagram, open the drawer System Tools, click on icon UCM,
then click in the diagram. A dialogue box will be pop up as shown in 5 - 9 to let user choose
the UCM to be used.

Figure 5 - 9 Dialogue box to choose an UCM and put into the HYPERSIM
diagram

In the dialogue box:


Form name is the name of the customized parameter form (not yet implemented).
The files with extension .ucm in the list are all UCMs available in the User Code Bloc
Directory defined above.
The selected UCM appears in the diagram with its power connectors representing external
nodes and control IOs. Internal nodes are not visible.
The UCM can then be connected inside a HYPERSIM diagram as usual. The Example
UCM with a simple network is shown in 5 - 10.

4-5-634
User Coded Model (UCM)
User Coded Model

Figure 5 - 10 The UCM Exemple used in a HYPERSIM diagram

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 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

%% END GENERAL INFORMATION


%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN DOCUMENTATION -- Enter models documentation after this line...

Documentation de Exemple.
---------------------
Three-phase resistor connected in Y grounded

%% END DOCUMENTATION
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN TUNABLE PARAMETERS -- Enter parameters table after this line...

R "R" - double 3 [1.0 1.0 1.0] 0.0 1.0e12 - "R"

%% END TUNABLE PARAMETERS


%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

4-5-636
User Coded Model (UCM)
Progressive practices with UCM

%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN CONTROL IOS -- Enter control IOs table after this line...

Ia A double out auto I "Ia"


Ib A double out auto I "Ib"
Ic A double out auto I "Ic"

%% END CONTROL IOS


%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN NODES DEFINITIONS -- Enter nodes table after this line...

T 3 extern bottom no "Network Connection"

%% END NODES DEFINITIONS


%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN CALCULATED PARAMETERS -- Enter parameters table after this line...

G - double 3 "Equiv.conductance"

%% END CALCULATED PARAMETERS


%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN PREPARATORY GLOBAL CODE -- Enter code under the appropriate comment...

/* 8.3.1.1 -- User includes */

#include <stdio.h>

%% END PREPARATORY GLOBAL CODE


%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN PREPARATION FUNCTION CODE -- Enter code after this line...

int i, j;

G[0] = 1.0 / R[0];


G[1] = 1.0 / R[1];
G[2] = 1.0 / R[2];

/* Initialization of Yini and Yfill */

for (i = 0; i < 3; i++)


{
for (j = 0; j < 3; j++)
{
ucmYini(i,j) = 0.0;
ucmYfill(i,j) = 0;
}
}

4-5-637
User Coded Model (UCM)
Progressive practices with UCM

/* Calculate Yini and define Yfill */

ucmYini(T_a, T_a) = 1.0 * G[0];


ucmYini(T_b, T_b) = 1.0 * G[1];
ucmYini(T_c, T_c) = 1.0 * G[2];

ucmYfill(T_a, T_a) = 1;
ucmYfill(T_b, T_b) = 1;
ucmYfill(T_c, T_c) = 1;

%% END PREPARATION FUNCTION CODE


%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN AFTER VOLTAGE CALCULATION -- Enter code ->...

/* Calculate Resistor current and send them to control outputs */

Ia = ucmVNode(T_a) * G[0];
Ib = ucmVNode(T_b) * G[1];
Ic = ucmVNode(T_c) * G[2];

%% END AFTER VOLTAGE CALCULATION CODE


%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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

UCM_DESCRIPTION = "Linear Inductor" # Description du modele

%% END GENERAL INFORMATION


%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

%%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"

%% END TUNABLE PARAMETERS


%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN CONTROL IOS -- Enter control IOs table after this line...

Ia A double out auto I "Ia"


Ib A double out auto I "Ib"
Ic A double out auto I "Ic"

%% END CONTROL IOS


%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN NODES DEFINITIONS -- Enter nodes table after this line...

T 3 extern bottom no "Network Connection"

%% END NODES DEFINITIONS


%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN HISTORICAL CURRENTS -- Enter historical currents table after this...

Ihist_a ground T_a


Ihist_b ground T_b
Ihist_c ground T_c

%% END HISTORICAL CURRENTS


%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN CALCULATED PARAMETERS -- Enter parameters table after this line...

G - double 3 "Equiv.conductance of L"

%% END CALCULATED PARAMETERS

4-5-639
User Coded Model (UCM)
Progressive practices with UCM

%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN PREPARATION FUNCTION CODE -- Enter code after this line...

int i, j;

/* Calculte the equivalent conductances of L */

G[0] = ucmTimeStep / (2.0 * Lval[0]);


G[1] = ucmTimeStep / (2.0 * Lval[1]);
G[2] = ucmTimeStep / (2.0 * Lval[2]);

/* Initialization of Yini and Yfill */

for (i = 0; i < 3; i++)


{
for (j = 0; j < 3; j++)
{
ucmYini(i,j) = 0.0;
ucmYfill(i,j) = 0;
}
}

/* Initialize Yini to the equiv. conductance of L */


/* Define Yfill */

ucmYini(T_a, T_a) = G[0];


ucmYini(T_b, T_b) = G[1];
ucmYini(T_c, T_c) = G[2];

ucmYfill(T_a, T_a) = 1;
ucmYfill(T_b, T_b) = 1;
ucmYfill(T_c, T_c) = 1;

%% END PREPARATION FUNCTION CODE


%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN AFTER VOLTAGE CALCULATION -- Enter code ->...

Ia = ucmVNode(T_a) * G[0] + Ihist_a;


Ihist_a = Ia + ucmVNode(T_a) * G[0];

Ib = ucmVNode(T_b) * G[1] + Ihist_b;


Ihist_b = Ib + ucmVNode(T_b) * G[1];

Ic = ucmVNode(T_c) * G[2] + Ihist_c;


Ihist_c = Ic + ucmVNode(T_c) * G[2];

%% END AFTER VOLTAGE CALCULATION CODE


%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

C Exercise 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

%% END GENERAL INFORMATION


%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

%%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...

L "L" H double 3 [0.01 0.01 0.01] 0.0 1.0e12 - "Inductors"


R "R" ohm double 3 [0.1 0.1 0.1] 0.0 1.0e12 - "Resistors"

%% END TUNABLE PARAMETERS


%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

4-5-641
User Coded Model (UCM)
Progressive practices with UCM

%% BEGIN CONTROL IOS -- Enter control IOs table after this line...

ILa A double out auto IL "ILa"


ILb A double out auto IL "ILb"
ILc A double out auto IL "ILc"
IRa A double out auto IR "IRa"
IRb A double out auto IR "IRb"
IRc A double out auto IR "IRc"

%% END CONTROL IOS


%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN NODES DEFINITIONS -- Enter nodes table after this line...

T 3 extern bottom no "Network Connection"


Ti 3 intern - no "Internal node"

%% END NODES DEFINITIONS


%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN HISTORICAL CURRENTS -- Enter historical currents table after this...

Ihist_a ground Ti_a


Ihist_b ground Ti_b
Ihist_c ground Ti_c

%% END HISTORICAL CURRENTS


%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN CALCULATED PARAMETERS -- Enter parameters table after this line...

GL - double 3 "Equiv.L conductance"


GR - double 3 "Equiv.R conductance"

%% END CALCULATED PARAMETERS


%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN PREPARATORY GLOBAL CODE -- Enter code under the appropriate comment...

/* 8.3.1.1 -- User includes */

#include <stdio.h> /* Needed for using printf */

%% END PREPARATORY GLOBAL CODE


%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

%%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 equivalent L conductances */

GL[0] = ucmTimeStep / (2.0 * L[0]);


GL[1] = ucmTimeStep / (2.0 * L[1]);
GL[2] = ucmTimeStep / (2.0 * L[2]);

/* Calculate Rs conductances */

GR[0] = 1.0 / R[0];


GR[1] = 1.0 / R[1];
GR[2] = 1.0 / R[2];

/* Initialize Yini and Yfill to 0 */

for (i = 0; i < 6; i++)


{
for (j = 0; j < 6; j++)
{
ucmYini(i,j) = 0.0;
ucmYfill(i,j) = 0;
}
}

/* Calculate Yini and define Yfill */

ucmYini(Ti_a, Ti_a) = GL[0] + GR[0];


ucmYini(Ti_b, Ti_b) = GL[1] + GR[1];
ucmYini(Ti_c, Ti_c) = GL[2] + GR[2];

printf ("**** Preparation: GL[0] = %f, GR[0] = %f, ucmYini(Ti_a,Ti_a) = %f *****\n",


GL[0], GR[0], ucmYini(Ti_a, Ti_a));

ucmYini(T_a, T_a) = GR[0];


ucmYini(T_b, T_b) = GR[1];
ucmYini(T_c, T_c) = GR[2];

ucmYini (Ti_a, T_a) = ucmYini (T_a, Ti_a) = -GR[0];


ucmYini (Ti_b, T_b) = ucmYini (T_b, Ti_b) = -GR[1];
ucmYini (Ti_c, T_c) = ucmYini (T_c, Ti_c) = -GR[2];

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;

ucmYfill(Ti_a, T_a) = ucmYfill(T_a, Ti_a) = 1;


ucmYfill(Ti_b, T_b) = ucmYfill(T_b, Ti_b) = 1;
ucmYfill(Ti_c, T_c) = ucmYfill(T_c, Ti_c) = 1;

%% END PREPARATION FUNCTION CODE


%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN AFTER VOLTAGE CALCULATION -- Enter code ->...

ILa = ucmVNode(Ti_a) * G[0] + Ihist_a;

4-5-643
User Coded Model (UCM)
Progressive practices with UCM

Ihist_a = ILa + ucmVNode(Ti_a) * G[0];

ILb = ucmVNode(Ti_b) * G[1] + Ihist_b;


Ihist_b = ILb + ucmVNode(Ti_b) * G[1];

ILc = ucmVNode(Ti_c) * G[2] + Ihist_c;


Ihist_c = ILc + ucmVNode(Ti_c) * G[2];

IRa = (ucmVNode(T_a) - ucmVNode(Ti_a)) * GR[0];


IRb = (ucmVNode(T_b) - ucmVNode(Ti_b)) * GR[1];
IRc = (ucmVNode(T_c) - ucmVNode(Ti_c)) * GR[2];

%% END AFTER VOLTAGE CALCULATION CODE


%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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"

%% END GENERAL INFORMATION


%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

4-5-644
User Coded Model (UCM)
Progressive practices with UCM

%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN DOCUMENTATION -- Enter models documentation after this line...

Three-phase sine-wave voltage source with inductor at output

%% END DOCUMENTATION
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN TUNABLE PARAMETERS -- Enter parameters table after this line...

Amp "Amp" V double 1 1.0 0.0 10.0 - "Source Amplitude"


Ls "Ls" H double 3 [0.1 0.1 0.1] 0.0 1.0e12 - "Output inductor"
freq "freq" Hz double 1 60.0 1.0e-12 1.0e12 - "frequency"

%% END TUNABLE PARAMETERS


%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN CONTROL IOS -- Enter control IOs table after this line...

I_a - double out auto I "Output current, phase a"


I_b - double out auto I "Output current, phase b"
I_c - double out auto I "Output current, phase c"

Db1 - double out auto Db "Debugging output 1"


Db2 - double out auto Db "Debugging output 2"
Db3 - double out auto Db "Debugging output 3"

%% END CONTROL IOS


%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN NODES DEFINITIONS -- Enter nodes table after this line...

T 3 extern bottom no "Network Connection"

%% END NODES DEFINITIONS


%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN CURRENT SOURCES -- Enter sources table after this line...

Isrc_a T_a ground


Isrc_b T_b ground
Isrc_c T_c ground

%% END CURRENT SOURCES


%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN HISTORICAL CURRENTS -- Enter historical currents table after this...

Ihist_a T_a ground


Ihist_b T_b ground
Ihist_c T_c ground

%% END HISTORICAL CURRENTS

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"

%% END CALCULATED PARAMETERS


%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN PREPARATION FUNCTION CODE -- Enter code after this line...

int i, j;
doubleGLo, Lo;

/* Calculate equivalent conductances of Inductances */

Gs[0] = ucmTimeStep / (2.0 * Ls[0]);


Gs[1] = ucmTimeStep / (2.0 * Ls[1]);
Gs[2] = ucmTimeStep / (2.0 * Ls[2]);

/* Initialize Yini and Yfill */

for (i = 0; i < 3; i++)


{
for (j = 0; j < 3; j++)
{
ucmYini(i,j) = 0.0;
ucmYfill(i,j) = 0;
}
}

/* Calculate Yini and determine Yfill */

ucmYini(T_a, T_a) = Gs[0];


ucmYini(T_b, T_b) = Gs[1];
ucmYini(T_c, T_c) = Gs[2];

ucmYfill(T_a, T_a) = 1;
ucmYfill(T_b, T_b) = 1;
ucmYfill(T_c, T_c) = 1;

/* Calculate other Simulation parameters */

period = 1.0 / freq;


omega = 2.0 * 3.141593 * freq;

%% END PREPARATION FUNCTION CODE


%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

4-5-646
User Coded Model (UCM)
Progressive practices with UCM

%% BEGIN HISTORICAL VALUES -- Enter the table after this line...

time double 1 0.0 "time"

%% END HISTORICAL VALUES


%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN SIMULATION GLOBAL CODE -- Enter code under the appropriate comment...

/* 9.3.1 -- User includes */

#include <math.h>

%%% END SIMULATION GLOBAL CODE


%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN BEFORE VOLTAGE CALCULATION CODE -- Enter code ->...

/* User code: calulate Yadd */

int i;
doubleVsrc_a, Vsrc_b, Vsrc_c;
doubleTwoPiOver3 = 2.094395333; /* 2.0 Pi / 3 */

/* Calculate source voltages */

Vsrc_a = Amp * sin (omega * time);


Vsrc_b = Amp * sin (omega * time - TwoPiOver3);
Vsrc_c = Amp * sin (omega * time + TwoPiOver3);

/* Calculate current sources */

Isrc_a = Vsrc_a * Gs[0];


Isrc_b = Vsrc_b * Gs[1];
Isrc_c = Vsrc_c * Gs[2];

%% END BEFORE VOLTAGE CALCULATION CODE


%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN AFTER VOLTAGE CALCULATION -- Enter code ->...

double Vsrc_a, Vsrc_b, Vsrc_c;

Vsrc_a = Isrc_a / Gs[0];


Vsrc_b = Isrc_b / Gs[1];
Vsrc_c = Isrc_c / Gs[2];

/* Calculate output currents and historic currents */

I_a = (Vsrc_a - ucmVNode(T_a)) * Gs[0] + Ihist_a;


Ihist_a = I_a + (Vsrc_a - ucmVNode(T_a)) * Gs[0];

I_b = (Vsrc_b - ucmVNode(T_b)) * Gs[1] + Ihist_b;


Ihist_b = I_b + (Vsrc_b - ucmVNode(T_b)) * Gs[1];

4-5-647
User Coded Model (UCM)
Progressive practices with UCM

I_c = (Vsrc_c - ucmVNode(T_c)) * Gs[2] + Ihist_c;


Ihist_c = I_c + (Vsrc_c - ucmVNode(T_c)) * Gs[2];

/* Other calculations */

time += ucmTimeStep;
if (time >= period) /* To avoid truncation error */
time -= period;

/* Debugging outputs */

Db1 = I_a;
Db2 = Ihist_a;
Db3 = time;

%% END AFTER VOLTAGE CALCULATION CODE


%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

C Exercise Build an UCM to model a three-phase sine-wave voltage source with the possibility of 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"

%% END GENERAL INFORMATION


%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN DOCUMENTATION -- Enter models documentation after this line...

Non-linear inductor:
L depend on rectified value of three-phase voltages across it

%% END DOCUMENTATION
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN TUNABLE PARAMETERS -- Enter parameters table after this line...

Lvec "Lvec" H double 9 [1.0 0.60 0.36 0.22 0.13 0.08 0.04 0.03 0.01] 0.0 10.0 - "Lvec"
Vinc "Vinc" V double 1 500 0.0 1000 - "Vinc"
Ldim "Ldim" - int 1 9 0.0 10.0 - "Ldim"

%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN CONTROL IOS -- Enter control IOs table after this line...

Ia A double out auto I "Current phase a"


Ib A double out auto I "Current phase b"
Ic A double out auto I "Current phase c"

Db1 - double out auto Db "Debugging signal no. 1"


Db2 - double out auto Db "Debugging signal no. 2"
Db3 - double out auto Db "Debugging signal no. 3"

Vrec V double out auto - "Rectified 3-phase voltage across L"

%% END CONTROL IOS


%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN NODES DEFINITIONS -- Enter nodes table after this line...

T 3 extern top yes "Network Connection"

%% END NODES DEFINITIONS


%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN HISTORICAL CURRENTS -- Enter historical currents table after this...

Ihist_a ground T_a

4-5-649
User Coded Model (UCM)
Progressive practices with UCM

Ihist_b ground T_b


Ihist_c ground T_c

%% END HISTORICAL CURRENTS


%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN CALCULATED PARAMETERS -- Enter parameters table after this line...

GaddVec - double 9 "Additional conductance of L"


Lchanged - int 1 "Indicate that L has changed"
Lindex - int 1 "Index in table GaddVec"

%% END CALCULATED PARAMETERS


%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN PREPARATION FUNCTION CODE -- Enter code after this line...

int i, j;
doubleGLo, Lo;

/* Initialize Yini and Yfill */

for (i = 0; i < 3; i++)


{
for (j = 0; j < 3; j++)
{
ucmYini(i,j) = 0.0;
ucmYfill(i,j) = 0;
}
}

/* Compute Yini and define Yfill */

Lo = Lvec[0];
GLo = ucmTimeStep / (2.0 * Lo);

ucmYini(T_a, T_a) = GLo;


ucmYini(T_b, T_b) = GLo;
ucmYini(T_c, T_c) = GLo;

ucmYfill(T_a, T_a) = 1;
ucmYfill(T_b, T_b) = 1;
ucmYfill(T_c, T_c) = 1;

/* Calculate GaddVec, conductance to be added when L changes */

for (i = 0; i < Ldim; i++)


{
GaddVec[i] = (ucmTimeStep / (2.0 * Lvec[i])) - GLo;
}

%% END PREPARATION FUNCTION CODE

4-5-650
User Coded Model (UCM)
Progressive practices with UCM

%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN SIMULATION INITIALIZATION FUNCTION CODE -- Enter code ->...

Lindex = 0;
Lchanged = 0;

%% END SIMULATION INITIALIZATION FUNCTION CODE


%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN BEFORE VOLTAGE CALCULATION CODE -- Enter code ->...

/* User code: calulate Yadd */

int i;

/* Initialize indication of nodes affacted by changing in L */

for (i = 0; i < 3; i++)


ucmNodeChanged(i) = 0;

/* If L has been changed, determine the additional conductance and


indicate that corresponding nodes are affected */

if (Lchanged)
{
ucmYadd(T_a,T_a) = GaddVec[Lindex];
ucmYadd(T_b,T_b) = GaddVec[Lindex];
ucmYadd(T_c,T_c) = GaddVec[Lindex];
ucmNodeChanged(T_a) = 1;
ucmNodeChanged(T_b) = 1;
ucmNodeChanged(T_c) = 1;
}

%% END BEFORE VOLTAGE CALCULATION CODE


%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN AFTER VOLTAGE CALCULATION -- Enter code ->...

doubleLo, GLo, GL;


doubleVL_a;
doubleVL_b;
doubleVL_c;
int index;

/* Calculate rectified of 3 phase voltage across L */

VL_a = ucmVNode(T_a);
VL_b = ucmVNode(T_b);
VL_c = ucmVNode(T_c);

Vrec = fabs(VL_a);
if (Vrec < fabs(VL_b))
Vrec = fabs(VL_b);
if (Vrec < fabs(VL_c))
Vrec = fabs(VL_c);

4-5-651
User Coded Model (UCM)
Progressive practices with UCM

/* Calculate historic currents */

Lo = Lvec[0];
GLo = ucmTimeStep / (2.0 * Lo);
GL = GLo + GaddVec[Lindex];

Ia = VL_a * GL + Ihist_a;
Ihist_a = Ia + VL_a * GL;

Ib = VL_b * GL + Ihist_b;
Ihist_b = Ib + VL_b * GL;

Ic = VL_c * GL + Ihist_c;
Ihist_c = Ic + VL_c * GL;

/* New operating point of L: calculate the index in the non-linear table */

Lchanged = 0;
index = (int)(Vrec / Vinc);

if (index > Ldim-1) /* To avoid of going outside of the table */


index = Ldim - 1;
if (index < 0)
index = 0;

if (index != Lindex) /* Compare index with its past value (historic) */


{
Lindex = index;
Lchanged = 1;
}

/* Debugging signal */

Db1 = Lchanged;
Db2 = index;
Db3 = 0.0;

%% END AFTER VOLTAGE CALCULATION CODE


%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

4-5-652

S-ar putea să vă placă și