Top Banner
Bachelor’s thesis Bachelor’s degree in Industrial Technology Engineering Analysis, modelling and simulation of an HVDC converter using OpenModelica REPORT June 2020 Author: Oriol Esquius Mas Supervisor: Eduardo Prieto Araujo Escola Tècnica Superior d’Enginyeria Industrial de Barcelona
91

Analysis, modelling and simulation of an HVDC converter ...

Mar 13, 2023

Download

Documents

Khang Minh
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Analysis, modelling and simulation of an HVDC converter ...

Bachelor’s thesisBachelor’s degree in Industrial Technology Engineering

Analysis, modelling and simulation ofan HVDC converter using

OpenModelica

REPORTJune 2020

Author: Oriol Esquius Mas

Supervisor: Eduardo Prieto Araujo

Escola Tècnica Superiord’Enginyeria Industrial de Barcelona

Page 2: Analysis, modelling and simulation of an HVDC converter ...
Page 3: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 1

AbstractMore and more countries are developing new research and industry centers (the Indian city of Hyder-abad is a good example of countries with a huge population having needing more and more energysupply). Building roads, local industry, technological centers and raising the standard of living of thepopulationmust be a right for any countrywhich developmentwas truncated by colonization or by innertensions. To do all of this, a huge amount of energy is needed.

The energetic transition is necessary to provide the communities the increasing electric power neededand to generate it using renewable sources, reducing our negative impact on the planet. The renewableenergy depends on the geographical conditions, a generating station can not be built wherever. So, oneof the biggest challenges of the energetic transition is to transmit power through long distances as someareas are not adequate to produce energy from renewable sources.

In order to transmit this power through long distances, the HVDC technology is chosen as it is reliableand presents low transmission losses for long distances.

So, with the objective of uniting free software and energetic transition, this thesis will present the simu-lation and analysis of a HVDC using OpenModelica, which is free and open-source software, thereforeanyone is freely licensed to use, copy, study, and change the software in any way, and the source code isopenly shared. Also, this thesis will try to present the limitations of the program as a lot of features arestill in development.

The initial goal of the project was to simulate electrical grid components with free software and usingparallel computing. As explained further in the report, the parallelization of the simulation has beendismissed.

So, the goal of this thesis is to analyze the structure and control of a Modular Multi-level Converter in aHVDC transmission using free software.

Page 4: Analysis, modelling and simulation of an HVDC converter ...

Contents

1 Introduction 61.1 OpenModelica . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

1.1.1 Modelica Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61.1.2 Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

1.2 High-Voltage Direct Current . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71.2.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71.2.2 Advantages of HVDC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81.2.3 HVDC history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

2 Modelica 132.1 Modelica libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

2.1.1 Modelica Standard Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132.2 Acausal language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142.3 Parallel computing using OpenModelica . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

2.3.1 Task-Graph-Based Parallelization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162.3.2 Transmission Line Modeling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

3 HVDC converters 263.1 Line commutated converters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

3.1.1 Three-phase full-wave controlled bridge rectifier [4] . . . . . . . . . . . . . . . . . . 263.2 Voltage source converters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

3.2.1 Modular Multi-level Converter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

4 Model 354.1 Average Value Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364.2 Per Unit calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384.3 Upper level control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

4.3.1 Clarke transformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394.3.2 Signal calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404.3.3 Phase Locked Loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404.3.4 dq transformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414.3.5 Vdc controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424.3.6 P control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424.3.7 Q control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444.3.8 Vac control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454.3.9 Choice controller for idref . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454.3.10 Choice controller for iqref . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464.3.11 idq reference limiter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 474.3.12 Inner controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494.3.13 dq to abc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

4.4 Equivalent source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

5 Simulations 545.1 Prepare and run a simulation: Equivalent source test . . . . . . . . . . . . . . . . . . . . . 54

5.1.1 Model construction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

2

Page 5: Analysis, modelling and simulation of an HVDC converter ...

5.1.2 Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 585.1.3 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

5.2 Average Value Model test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 605.2.1 Simulation parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 615.2.2 Simulation setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 625.2.3 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 625.2.4 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

5.3 Two node power system simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 665.3.1 Simulation parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 665.3.2 Simulation setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 685.3.3 Simulation results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 685.3.4 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76

6 Environmental impact of HVDC vs HVAC technology 78

7 Project cost 80

8 Conclusions 83

Bibliography 87

List of Figures

1.1 Monopolar link . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71.2 Bipolar link . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81.3 Homopolar link . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81.4 HVDC vs AC cost . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

2.1 Electrical > MultiPhase and Electrical > Analog . . . . . . . . . . . . . . . . . . . . . . . . 142.2 Serial vs Parallel computing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152.3 Example circuit [13] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162.4 BLT-Matrix [13] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172.5 Merging nodes [13] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182.6 OpenModelica model of a three-phase equivalent generator . . . . . . . . . . . . . . . . . 182.7 BLT-Matrix of the equivalent generator system . . . . . . . . . . . . . . . . . . . . . . . . . 192.8 Task-graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192.9 Timer results of the parallel simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202.10 Timer results of the serial simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202.11 Basic model of a TLM connection [10] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212.12 OmcOmcTriplePendulum composite model, diagram view (left) and physical represen-

tation (right) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222.13 Submodel pendulum2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222.14 TLM connection attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232.15 Compositemodel1 after fetching interface data . . . . . . . . . . . . . . . . . . . . . . . . . 232.16 Error message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

3.1 AC voltage [23] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273.2 6-pulse output [23] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283.3 MMC standard structure [19] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293.4 Submodule structure [18] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

3

Page 6: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 4

3.5 Intensity flow [17] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303.6 Intensity flow [17] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303.7 Intensity flow [17] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313.8 Intensity flow [17] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313.9 AC output of a MMC [22] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323.10 NPC converter [20] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

4.1 MMC model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354.2 AVMmodel. Red zone = AC side ; Blue zone = DC side . . . . . . . . . . . . . . . . . . . . 364.3 ACside block equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374.4 DCside block equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374.5 PU − Calculation block equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384.6 Upper level control model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394.7 Clarke’s transformation equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394.9 PLL block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404.8 Signal calculation block equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404.10 dq transformation block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414.11 parkI1 block equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414.12 parkV1 block equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414.13 Vdc controller block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424.14 First . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434.15 Second block of the P control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444.16 First block of the Q control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444.17 Vac control block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454.18 choiceController block equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464.19 QVACChoice block equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464.20 idqRef − Limiter block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 474.21 f1− IDQREF block equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484.22 f2− IDQREF block equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484.23 Inner control model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494.24 Inner control block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504.25 Inner control detailed diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504.26 DQtoABC block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 514.27 ClarkInv block equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 514.28 EquivalentSource block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 524.29 Two node power system model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

5.1 Equivalent source simulation model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 545.2 New Modelica Class options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 555.3 Resistor element parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 565.4 Inductor element parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 565.5 Equivalent source element parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 575.6 Model before and after the connection of its elements . . . . . . . . . . . . . . . . . . . . . 585.7 Result of checking the model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 585.8 Simulation setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 595.9 Plotting perspective window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 605.10 Current results at the positive pin of the voltage source . . . . . . . . . . . . . . . . . . . . 605.11 Average Value Model simulation model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 615.12 DC voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 635.13 Capacitor voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 635.14 Theta, vα and vβ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 645.15 α, β, d and q voltages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 645.16 Reference voltages in the a, b, c frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 655.17 Voltage inserted in the AC side of the AVM . . . . . . . . . . . . . . . . . . . . . . . . . . . 655.18 Two node power system model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 665.19 DC voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68

Page 7: Analysis, modelling and simulation of an HVDC converter ...

5.20 DC capacitors voltages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 685.21 Current measured by the power sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 695.22 Active power measured by the power sensor . . . . . . . . . . . . . . . . . . . . . . . . . . 695.23 Converter 1 AC grid voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 705.24 Converter 1 AC grid voltage zoom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 705.25 Converter 2 AC grid voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 705.26 Converter 2 AC grid voltage zoom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 715.27 Converter 1 α, β, d and q voltages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 715.28 Converter 2 α, β, d and q voltages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 725.29 Converter 1 θ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 725.30 Converter 2 θ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 735.31 Converter 1 reference voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 735.32 Converter 2 reference voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 745.33 Converter 1 reference voltage zoom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 745.34 Converter 2 reference voltage zoom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 755.35 Voltage inserted in the converter 1 AVM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 755.36 Voltage inserted in the converter 2 AVM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76

List of Tables

3.1 Table to test captions and labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

5.1 Constant voltage source parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 615.2 Resistor parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 615.3 Equivalent generator parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 615.4 AVM parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 625.5 Converters 1 and 2 parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 675.6 Resistor parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 675.7 Equivalent generators 1 and 2 parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67

5

Page 8: Analysis, modelling and simulation of an HVDC converter ...

Chapter 1

Introduction

1.1 OpenModelica1.1.1 Modelica LanguageModelica is a freely available, object-oriented language for modeling complex physical systems devel-oped since 1996 by the non-profit Modelica Association (MA). It permits the user to model systems con-taining mechanical, electrical, electronic, hydraulic, thermal, control, electric power or process-orientedsubcomponents

It is possible to find different Modelica libraries, such as the Modelica Standard Library, created by theModelica Association to model mechanical (1D/3D), electrical (analog, digital, machines), magnetic,thermal, fluid, control systems and hierarchical state machines. The model studied in this thesis is builtwith elements from the Modelica Standard Library, even if many other libraries are available to modeland simulate power systems.

1.1.2 SoftwareConsidering that the technological advance and the enrichment of our society requires the free exchangeof information and, thus, the democratization of the research tools, it is very important to look for real freesoftware alternatives to the tools ºly used in order to empower users and encourage open collaboration.

According to its definition, software is considered free software if people who receive a copy of thesoftware have the following four freedoms:

1. The freedom to run the program for any purpose.

2. The freedom to study how the program works, and change it to make it do what you wish.

3. The freedom to redistribute and make copies so you can help your neighbour.

4. The freedom to improve the program, and release your improvements (and modified versions ingeneral) to the public, so that the whole community benefits.

This thesis will study an HVDC using the free software OpenModelica. According to its website, "Open-Modelica is an open-source Modelica-based modeling and simulation environment intended for indus-trial and academic usage". So, OpenModelica is a free and open-source environment, which allows usersto study, change, and distribute the software to anyone and for any purpose.

6

Page 9: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 7

Many versions of OpenModelica have been released since its creation and, as explained in their website,researchers, students, or any interested developer are welcome to participate in the project and cooperateto improve the software capabilities and performance. In order to analyze and simulate theHVDCmodelstudied in this thesis, the 1.14.1OpenModelica version has beenused since it is the latest complete release.The software has different tools such as OpenModelica Shell, Open Modelica Notebook, Open ModelicaPython Interface and or Open Modelica Matlab Interface. In order to study and simulate the model theOpen Modelica Connection Editor, a graphical interface that provides the user with easy-to-use modelcreation, connection editing, simulation of models, and plotting of results.

To emphasize how important it is for the developers to improveOpenModelica performance, it is relevantto add that experimental nightly builds are available between official releases in order to give the usersthe chance to try new features and report feedback to the developers, making it easier to detect bugs andproblems in the release.

1.2 High-Voltage Direct Current1.2.1 DescriptionHVDC stands for High Voltage Direct Current, a technology used to transmit bulk power over longdistances. In a simple way, a two node HVDC systems work as follows: AC power is generated in ageneration substation; this power is converted into DC power by using a rectifier; at the other end of theline, an inverter is used in order to convert the DC power to AC power, and then deliver it to the grid.

Different types of HVDC links have been used through years. The following are the three major types ofHVDC links.

• Monopolar link

Monopolar link uses one DC conductor between both ends as ground is used as a return path. It isthemost simpleHVDC link, but also the less robust. If any problemappears in the transmission, thepower flowmust be stopped as only one path can be used, and there is no alternative to supply thepower. So, if a remote zone with no power generation capacity is exclusively fed by a monopolarDC link and a problem appears in the transmission line, the power flow is interrupted and thereceiving end has no power supply until the problem is solved.

Figure 1.1: Monopolar link

• Bipolar link

Bipolar link uses twoDC conductorswith opposite polarities and four converters. For example, up-per conductor can transmit electric power at 500 kVwhile lower control does so at -500 kV, creatinga 1000 kV difference.

In the bipolar link, if a problem appears in one of the converters, the conductor linked to this con-

Page 10: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 8

verter must be disabled, but there still are another conductor and its two transformers available,therefore the bipolar link can be used as a monopolar link using earth as return path. This connec-tionmakes the HVDC linkmuchmore reliable, as the complete interruption of power transmissionis much less probable due to the possibility to use it as a monopolar link.

Figure 1.2: Bipolar link

• Homopolar link

Homopolar link uses two ormore conductors having the same polarity. In this case, earth is alwaysused as a return path.

As for the bipolar link, the homopolar link can be used as a monopolar if a problem appears in oneof the conductors or in one of the converters, using ground as a return path.

Figure 1.3: Homopolar link

1.2.2 Advantages of HVDCHVDC transmission presents many advantages over other power transmission system, the following listpretends to summarize the most relevant ones.

• Low losses

Page 11: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 9

– The base loss is due to the ohmic resistance of the lines, and is proportional to the current.Using very high voltage allows to have a lower current, reducing the losses. Doubling thevoltage of the line the losses due to the ohmic resistance are reduced by a factor of 4.

Pbaseloss = R · I2 (1.1)

V ′ = 2 · V (1.2)

I ′ = I/2 (1.3)

P ′baseloss = R · I ′2 = R · I2/4 = Pbaseloss/4 (1.4)

This advantage also applies for High Voltage Alternating Current systems.

– The corona effect is the phenomenon of ionisation of surrounding air around the conductor.This effect can cause discharges along the transmission line, generating power loss. The lossesdue to corona effect respect the following proportionality:

Pcoronaloss ∝ (f + 25) (1.5)

Being f the frequency, which is 0 in an ideal DC transmission and superior to 0 in an ACtransmission, loss due to corona effect is lower using DC transmission system.

Even if the power loss in the convertersmakeHVDC losses higher thanAC’s for short distancepower transmissions, the lower losses along the transmission lines makeHVDCmore efficientfor long distance power transmission.

• Low cost

HVDC terminal stations are more expensive than AC’s, due to the fact that they must transformfrom AC to DC and vice versa, which makes the AC transmission system cheaper for short dis-tances. But an HVDC transmission line costs less than an AC line for the same transmission capac-ity in long transmission lines, because DC needs two sets of conductors while AC needs one foreach phase. This also allows the use of smaller transmission towers for DC transmission.

The distance over which HVDC transmission is cheaper than AC transmission, called the "break-even distance" or the "break point", is around 600 km for overhead lines, as illustrated in the fol-lowing graphic.

This advantage ismuchmore noticeablewhenworkingwith offshorewindpower. UnderseaHVACcables have much more capacitance than overhead HVAC cables, which increases the losses due tothis factor. The losses using HVAC become unacceptable at a transmission distance of 80 km . So,HVDC becomes the best option to transmit power from wind farms built in the sea. Consideringthat reducing losses is an important factor to reduce the environmental impact of the energy gen-eration (with less losses less energy has to be generated to obtain the same results), the break pointdistance is much smaller in this case.

Page 12: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 10

Figure 1.4: HVDC vs AC cost

• Allows asynchronous connections

While most of the countries use 50Hz current, around 40 states have a power grid using 60Hzfrequency. HVDCsystems allow connections between grids at different frequency. Also, it preventscascading failures from propagating from one connected grid to another one. An example of anHVDC system connecting grids working at different frequencies is the Saudi Arabia-Egypt HVDClink project, which is in the implementation phase nowadays. TheKingdomof SaudiArabia electricgrid has a frequency of 60 Hz, while the Egypt grid work at 50Hz. Another example, which isalready working, is the Garabi interconnection between Argentina (50 Hz) and Brazil (60 Hz),with 490 km lenght and 2,2 MW power rating.

• Long distance water crossings

The lenght of a HVDC cable is not limited due to technical limits. So, for long distances, HVDCis the only feasible alternative to transmit power. The longest undersea power cable is the HVDClink between Feda in Norway and the seaport of Eemshaven in the Netherlands, with a lenght of580km and a capacity of 700 MW.

1.2.3 HVDC historyEven if it is known that electricity has been amatter of interest since the antiquity, it was not until the late19th century that electricity became essential to the modern way of life. During the second industrialrevolution, from the late 19th to the early 20th century, electrification of industry allowed huge changesinmanufacturingmethods, such asmass producing and assembly lines. The electrification has even beennamed as "the most important engineering achievement of the 20th century" by the National Academyof Engineering fromWashington.

At the beginning of the electricity supply industry there was a great battle between alternating currentand direct current for electricity distribution. At first, AC was the winner of it, partly because of the lackof converters to tone down the voltage. Also, regarding the price, the AC transmission is still nowadayscheaper for short distances as seen before in this thesis.

Page 13: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 11

But as the size of electricity supply systems increased, the limitations of AC and the advantages of HVDCpower transmission became noticeable.

The first transmission of electric power usingdirect current over a longdistancewas theMiesbach–MunichPower Transmission of 1882, used in order to run an artificial waterfall in an electricity exhibition in Mu-nich. The wire used failed a few days later.

It was not until 1954 that was created the world’s first ever commercial HVDC link, the Gotland 1 inSweden, which linked the peninsular city of Västervik to the island of Gotland. Using a voltage of 100kV, it was able to transfer 20 MW over a 98 km long submarine cable.

The HVDC systems became more usual around the world during the late 1970’s and the 1980’s. In Asia,the first commercial HVDC connection was built in 1979 in Japan in order to connect two power grids,Hokkaido and Honshu, and three other connections, in China (2) and India, were built during the 80s.It is relevant to add that several HVDC connection projects of the late 80s were cancelled because of thecollapse of the Soviet Union, such as the HVDC Ekibastuz–Centre in asian Russia, which constructionbegan in 1978 but was paused then abandoned. Regarding North America, the first HVDC connectionmeant to last a long time was the 1968 HVDC Vancouver Island, connecting the Vancouver Island toDelta, British Columbia, with a total lenght of 42 km. From 1970 to 1979, six new connections werebuilt, being the 70s the most productive decade until the 2010s in the continent. Concerning Africa, onlyfour HVDC connections have been constructed, the being the first one the 1979 Cahora Bassa powertransmission system connecting Mozambique and South Africa, transmitting 1920 MW at a voltage levelof 553 kV. This connection is remarkable as it was the first HVDC connection in the world running at avoltage superior to 500 kV.

Nowadays, the HVDC connections are considered efficient and reliable. Considering that the power us-ing renewable sources must sometimes be generated far from load centers, HVDC links are increasinglybeing built and designed for future constructions all around the globe. So it is of a great importance tostudy their components and behaviour from the academic environment, because HVDC technology willpossibly play a key role enabling the transition to an energy system based on renewables.

Page 14: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 12

Page 15: Analysis, modelling and simulation of an HVDC converter ...

Chapter 2

Modelica

2.1 Modelica librariesModelica Libraries are a set of libraries containing objects that allow simulations to be carried out indifferent fields of engineering. These libraries are arranged in five blocks:

• Free standard conform libraries developed by the Modelica Association

• Free other libraries developed by the Modelica Association

• Free libraries provided by users of Modelica

• Free older libraries developed by the Modelica Association (deprecated)

• Commercial libraries

The first block contains three libraries: the Modelica Standard Library, which content is discussed inSection 2.1.1; theModelica Sinchronous library, a library to define and synchronize sampled data systemswith different sampling rates; and theVehicles Interface library, for interface definitions and architecturesfor vehicle systemmodeling. These three libraries, as all the libraries except for the commercial ones, arefree to download.

While the second block includes other libraries developped by theM.A., in the third block are the librariesdeveloped and uploaded by Modelica users in order to share knowledge and improve the language per-formance. These libraries are free to download, to share and modify.

The fourth block contains outdated libraries which content has been updated since their creation. Mostof this libraries were improved and included in the Modelica Standard Library.

Finally, the fifth block is made up of commercial libraries developed by companies or individuals suchas Dassault Systèmes or Wolfram.

2.1.1 Modelica Standard LibraryThe Modelica Standard Library is a standardized and free package developed with the Modelica lan-guage. It contains model components in many domains.

In the OpenModelica Connection Editor (OMEdit) interface, used in this thesis simulations, the librariesare visible on the left of the screen, on the so-called Libraries Browser. Its location can be modified on the

13

Page 16: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 14

screen, and it can even be opened in a new window. As its name suggests, the Libraries Browser canbrowse between the different libraries loaded in order to find components more easily.

Figure 2.1: Electrical > MultiPhase and Electrical > Analog

The major part of the VSC-HVDCmodel used in this thesis is composed by elements from the ModelicaStandard Library, named Modelica in the browser. As seen in Section 2.1, the library components areclassified. In order tomake a proper introduction to theMSL, and assuming that some of the componentsused power electronics belong to the electrical field, let’s take a look at the Electrical tab.

Fig. 2.1 is a caption of Multiphase and Analog tabs inside Electrical. In these "subfolders" are differentelements. For example, it is possible to get a one-phase resistor in the Analog tab by dragging the com-ponent to the model being built. If the model has been designed to simulate an m-phase systems, thelibrary contains a multiphase resistor element in the Multiphase tab. So, a great variety of elements areavailable in this library, making it possible to build large models exclusively using the MSL.

2.2 Acausal languageModelica language is built directly on acausal notation of models, which means it is built on a declara-tive modeling style based on equations that describe the behavioral relationships instead of assignmentstatements. It is easy to illustrate the idea of acausal modeling using the resistor example.The resistor equation can be written:

V = R · I (2.1)

In this case, the acausality makes the resistor equation more reusable since it doesn’t describe assignmentbut equality. Therefore, instead of only assigning to V the value of RI, the resistor equation can be usedin three ways:

V := R · I (2.2)

R := V/I (2.3)

I := V/R (2.4)

Page 17: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 15

2.3 Parallel computing using OpenModelicaTraditionally software has been written for serial computing: the problem to solve is divided into seriesof instructions, which are executed one after another (sequentially) on a single processor. Only oneinstruction is executed at a time. When simulating very largemodels, simulating time becomes a problemas the simulation can last muchmore than desired, being an obstacle to continuing the ongoing research.

Nowadays, most of the computers aremulticore computers as they combine two ormore processors. Thisinnovation represents a huge opportunity to reduce simulation time, as each processor is able to executean instruction at the same time. So, if a computer has four processors, it can execute four instructions atthe same time. But this is not enough to reduce the simulation time by a factor of 4.

As commented, in serial computing, the problem to solve is divided into series of instructions executedsequentially, one after another. So, with one or four processors, the result is supposed to be the same asthe n instruction execution can not start until the n-1 instruction execution is finished.

In order to reduce simulation time profiting the availability of more than one processor, serial computingmust be replaced by parallel computing.

What is parallel computing?

Essentially, parallel computing is the use of multiple computer resources in order to solve one problem.While in serial computing the problem is divided into instructions executed sequentially, in parallel com-puting the problem is broken into discrete parts that can be solved concurrently. This parts are dividedinto a series of instructions executed sequentially. As a result, the problem is divided into parts whichare solved concurrently using different processors, so instructions from two or more parts can be con-currently executed using different processors. In this case, an coordination mechanism is employed. Fig.2.2 exposes a basic diagram to understand the main difference between serial and parallel computing.

Figure 2.2: Serial vs Parallel computing

OpenModelica developers have been trying to implement the parallel simulations formany years. But, asModelica users have little control over the inner workings of a simulation, something very important inorder to parallelize it, come techniques have been developed in order tomake it possible. In the followingSection 2.3.1 and Section 2.3.2 two of the major accomplishments are explained, exposing automatic andmanual parallelization methods.

Page 18: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 16

2.3.1 Task-Graph-Based ParallelizationTheory and exampleApplications such as Dymola or OpenModelica create a single thread simulation code, which does notallow the parallel simulation using multi-core computers. So, in order to execute a parallel simulation,additional compiler flags must be added in the simulation setup.

The addition of +d=hpcom flag in the simulation setup allows the launch of the automatized paralleliza-tion of the system. The theorical explanation and an example of this parallelizationmethod are presentedbelow.

The equations of a simulation using Modelica can be seen as a set of Differential Algebraic Equations,that is to say, a system of equations either containing differential and algebraic equations or equivalent tothis system. DAEs are different to ODEs by the fact that some of the dependent variables occur withouttheir derivatives. (2.5) shows the definition of a DAE.

F (x, x, v, t) = 0 (2.5)

In (2.5) t represents the independent variable of time, x vector contains all variables for which deriva-tives with respect to time appear inside the equations, and v contains all dependent variables (algebraicvariables) for which no derivatives are present.

Differentiation index can be described as the number of times one has to differentiate the DAE (2.5) toobtain an ODE. The differentiation index can be understood as "how far" the DAE is to form an ODE.

In order to move towards the parallelization of the simulation code, index reduction is applied to (2.5),that is to say, (2.5) is transformed into a DAEwhich index reduction is 1 or 0. An incidencematrix is builtusing the resulting equation system, deriving to a task graph that can be explored using the yEd GraphEditor. The matrix is arranged so the blocks of equations can be solved from the top to the bottom.

Let’s see a theorical example.

Figure 2.3: Example circuit [13]

The circuit in Fig. 2.3 is defined with the equations:

Page 19: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 17

f1 : vs = offset (2.6)

f2 : vR1 = R1 · ic (2.7)

f3 : PR1 = vR1 · ic (2.8)

f4 : vR1 = vs − vR1n (2.9)

f5 : ic = C · vc (2.10)

f6 : vR2 = R2 · ic (2.11)

f7 : PR2 = vR2 · ic (2.12)

f8 : vR2 = vR1 − vc (2.13)

BLT-Matrix built from the f equations: In this example, vs is determined in f 1. Equations f 2, f 4, f 6 and

Figure 2.4: BLT-Matrix [13]

f 8 have a circular dependency: uR1 is solved in f 2; f 2 requires ic; ic is solved in f 6; f 6 depends on f 4; f 4solves uR1n, but requires uR1 solved in f 2. This circular dependency is illustrated with the grey block inthe BLT-matrix (Fig. 2.4).

To describe how the different parts of a simulation code are related to each other, a task graph is veryeffective as, for a current user, it is easier to see these relations using nodes and connections than usingequations. Adding the flag +d=graphml in the simulation setup, a document will be created during thesimulation using OpenModelica. This document has to be opened in a program called yEd Graph Editorand contains the task graph. In order to have a simple graph, another transformation is made duringthe simulation using the flag +d=dumprepl. This transformation follows this rule: chains of nodes witha maximum of one successor and one predecessor are merged. In Fig. 2.5 nodes 4 and 5 are merged into1.

Page 20: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 18

Figure 2.5: Merging nodes [13]

Finally, the tasks are dispersed among different threads in the scheduling process, so each thread will besimulated in a different processor using parallel computing.

SimulationUsing the+d=hpcom,+d=bltmatrixdump,+d=graphml,+d=dumprepl and+d=dumpdaelowflags, the equiv-alent generator (Fig. 2.6) of the studied VSC-HVDC model has been used to test this automatic paral-lelization.

Figure 2.6: OpenModelica model of a three-phase equivalent generator

The BLT-Matrix of this system is shown in Fig. 2.7.

Page 21: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 19

Figure 2.7: BLT-Matrix of the equivalent generator system

As the system is three-phase and very simple, it is intuitive to think that each one of the three phases canbe simulated concurrently. This can be easily seen in the task-graph using yEd Graph Editor, Fig. 2.8. Inthe graph, the three blocks, each one referring to a phase, are distinguishable. Also three alone blocksare present (number 36, 31, 34) referring to equations that can be solved alone regarding temperature.

Figure 2.8: Task-graph

The timer results of the parallel simulation using +d=hpcom flag and serial simulation without any flagadded to the simulation setup are are:

Page 22: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 20

Figure 2.9: Timer results of the parallel simulation

Figure 2.10: Timer results of the serial simulation

So, according to the simulation timer, in this example the serial simulation is around 10 times faster thanthe parallel simulation. According to theory, this should not happen as parallel computing is supposedto speed up the simulation. Simulating in parallel a system needs multicore computers and additionalknowledge, and is supposed to benefit the investigator. So, this feature, which is pretty new, has to bedeveloped, get better and more efficient for the users to consider it a reliable option.

2.3.2 Transmission Line ModelingTrnasmission Line Modeling (TLM) is a method for parallelizing simulations. It is an equation-basedmodel, and is unconditionally stable if the system is stable itself and the TLM parameters respect thephysical boundaries. A package has been developed using the Modelica language in order to createcomposite models using the TLM technique.

TheoryThe basic idea of the TLM technique it takes time for a physicalmagnitude to go fromonepoint to another.So, the Transmission LineModeling uses physicallymotivated delays in order to divide amodel.The time

Page 23: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 21

that a physical magnitude takes to travel is called Ttlm.

Figure 2.11: Basic model of a TLM connection [10]

In Fig. 2.11, v1, v2, i1, i2, c1 and c2 are the characteristics of a transmission line. c1 and c2 representthe information propagated delayed. P and Q are the variables in the connection, and could representmagnitudes of any domain (for example, voltage and current). ZF is the impedance factor of the TLMconnection. This parameters are governed by the following equations [10]:

c1(t) = v2(t− Ttlm) + ZF · I2(t− Ttlm) (2.14)

c2(t) = v1(t− Ttlm) + ZF · I1(t− Ttlm) (2.15)

F1(t) = ZF · I1(t)(t− Ttlm) + c1(t) (2.16)

F2(t) = ZF · I2(t)(t− Ttlm) + c2(t) (2.17)

This equations lead to an explicit parallelization of the system. Let’s take a look at (2.16): F1 dependson the system 1 and on c1, which depends on the system 2 at t-TTLM time. So, at time t, F1 only dependson the values of itself at t and on the values of an external system at t-TTLM. The same logic is appliedto F2. Therefore, if the exchange of information is well done, the initial equation system of the model istransformed into two smaller implicit equation systems, which can be solved in parallel.

An advantage is that different time steps and solvers can be used for each submodel using interpolationin order to exchange information at the time needed.

Even if TLM method was developed in order to simulate electromagnetical signals, nowadays it can beapplied in other fields, such as mechanics.

Existing model simulationAmodelmade to be simulated using TLM technology has a .xml format and is called a CompositeModel.Thismodels sometimes use exclusively theOpenModelica software, or can simulate the submodels usingother programs such as Simulink. But as this thesis tries to focus its efforts on using free software in thepower systems simulations, only OpenModelica has been considered.

Many models have been developed and are available in the OpenModelica files. Most of them use me-chanical components. Before trying to build a composite model, an existing model is simulated. Asthe goal of this simulation is only trying to undestand the components of the TLM composite model, amechanical composite model is chosen as it is the most complete one already modeled.

The model simulated is the OmcOmcTriplePendulum (Fig. 2.12). This composite model contains threesubmodels builtwith elements from theModelica StandardLibrary representing three blockswithwidth,lenght, height and density connected using TLM connections.

Page 24: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 22

Figure 2.12: OmcOmcTriplePendulum composite model, diagram view (left) and physical representa-tion (right)

Before analyzing the TLM connections, let’s take a look at the submodels (pendulum1, pendulum2 and pen-dulum3). All three submodels mean to represent the same blocks, with the same characteristics. But, asseen in Fig. 2.12, the submodel pendulum2 has two connections instead of one as the block 2 is connectedto block 1 and block 3.

Figure 2.13: Submodel pendulum2

As seen in Fig. , the submodel pendulum2 is composed by four elements:

• boxBody1: This component is taken fromModelica > Mechanics > Multibody > Parts > Bodybox andrepresents a cuboid with width, lenght, height and density.

• world: This component is taken fromModelica >Mechanics >Multibody >World and represents theearth basic environment. In the case studied, it only adds gravitation.

• TLM: The two TLM connections are taken from TLM > TLM-Interface-3D > TLMInterface3D. Thiselement accomplishes the functions TLMSetMotion and TLMGetMotion. That is to say, receivingand sending: model name, time, position, orientation, velocity and angular velocity of the model.

So, in this composite model, three submodels representing cuboids connected between them set in anhorizontal orientation and attracted by the gravity force. The submodel pendulum1 is connected to arotational support fixed at the axis origin, so the cuboids don’t fall down in a free fall.

The TLM elements of the submodels are necessary in order to send and receive the desired informationthrough the TLM connections. In the studied case the information sent and received through the con-nections is model name, time, position, orientation, velocity and angular velocity. The attributes of theconnections are the following:

Page 25: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 23

Figure 2.14: TLM connection attributes

αis a damping constant included because the basic TLM model has no damping. Including this param-eter makes the c component of the equations become:

cfiltered(t) = cfiltered · (t− T ) + c(t) · (1− α) (2.18)

The text view of a composite model contains the initial conditions of each submodule and the conditionsof eachTLMconnection. From this, OpenModelica is able to simulate themodel using the TLM techniqueand obtain satisfying results.

Construction of a composite modelIf the goal is to be able to build a compositemodel and simulate it using the TLM technique, the usermustbe able to create it. So, following the instructions from the OpenModelica User’s Guide, some attemptshave been made.

First of all, the goal was to re-build the triple pendulummodel previously studied. Following the instruc-tions from the OpenModelica User’s Guide, the submodels were loaded and added to a new compositemodel named "Compositemodel1". So, as the guide indicates, after clicking the option "Fetch InterfaceData", the TLM pins appear and are supposed to be ready to be connected using TLM connections (Fig.2.15).

Figure 2.15: Compositemodel1 after fetching interface data

When the user tries to connect the different submodels in order to establish the connection attributesand execute the simulation, an error appears indicating that the TLM connections were no set correctly.After repeatedly trying to solve this problem, even building another model in another computer, theerror message appears every time, claiming that tge TLM connection can not be made due to a problemin the TLM pins.

Page 26: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 24

Figure 2.16: Error message

The TLM connections have been tried in simple signal circuits using OpenModelica, obtaining the sameerror result.

• So, what is the conclusion from a normal user’s point of view?

Even after checking the different possible solutions for the problem, the user could not be able to solveit, being impossible for him to run a co-simulation. The problem may be in the computer, in the Open-Modelica development, or in the lack of information available for a normal user with limited informaticsformation. The conclusion is that the TLM simulation is a very attractive way to divide a model intosubmodels able to be simulated by even different programs, exchanging information and introducingthe parallelization. The computer used for this thesis is probably more powerful than the computers ofmany students in the UPC. So, the co-simulation using the TLM technique is not ready to be widely usedin an academical environment, and has to be developed in order to be considered reliable for a generaluse.

Page 27: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 25

Page 28: Analysis, modelling and simulation of an HVDC converter ...

Chapter 3

HVDC converters

In a HVDC connection, in order to transform a high voltage AC signal to a high voltage DC signal, orvice-versa, a converter is needed. A HVDC system includes one or more converters working as rectifier,and one or more converters working as inverter.

Since the 1940’s, electronic converters are used in the high voltage connections. The two major familiesof static converters are presented below.

3.1 Line commutated convertersMost of the active HVDC links work with line commutated converters. Line Commutated Converters(LCC) use uncontrolled switching devices such as diodes or switching devices that can only be turned onsuch as thyristors. Most of the HVDC line commutated converters in the world are built using thyristors,as diode converters can only be used as rectifiers and do not allow a real control of the DC voltage.

With the aim of illustrating how a simple line commutated converter transforms alternating current todirect current, the 6 pulse bridge rectifier operation is exposed in 3.1.1.

3.1.1 Three-phase full-wave controlled bridge rectifier [4]The three-phase full-wave controlled brigde rectifier, also named the 6 pulse bridge rectifier is a linecommutated converter than can illustrate how a circuit of diodes or thyristors can transform a threephase AC signal to a DC signal.

In order to explain how the rectifierworks, let’s call i1 to the current flowing through the thyristor number1, i2 to the current flowing through the thyristor number 2, and so on for the 6 thyristors. Let’s also callVL the peak voltage of the AC, Vdc the output voltage of the DC side and w the angular frequency of theAC signal. Finally, let’s call T1 to the thyristor 1, T2 to the thyristor 2, and so on. So, the three phase ACsignals are:

Vao = VL · sin(w · t) (3.1)

Vbo = VL · sin(w · t−2 · π3

) (3.2)

Vco = VL · sin(w · t−4 · π3

) (3.3)

Assuming the AC voltage is represented by the graphic below:

26

Page 29: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 27

Figure 3.1: AC voltage [23]

• wt=π6 rad

T6 and T1 start conducting, and the output voltage is:

Vdc = Vab = Vao − Vbo = VL · sin(π

6)− VL · sin(

π

6− 2 · π

3) (3.4)

Vdc/VL = 1, 5p.u. (3.5)

• wt=π3 rad

T6 and T1 are conducting, and the output voltage is:

Vdc = Vab = Vao − Vbo = VL · sin(π

3)− VL · sin(

π

3− 2 · π

3) (3.6)

Vdc/VL =√3p.u. (3.7)

• wt=π6 rad

T1 and T2 start conducting, and the output voltage is:

Vdc = Vac = Vao − Vco = VL · sin(π

2)− VL · sin(

π

6− 4 · π

3) (3.8)

Vdc/VL = 1, 5p.u. (3.9)

• wt= 2·π3

T1 and T2 are conducting, and the output voltage is:

Vdc = Vac = Vao − Vco = VL · sin(2 · π3

)− VL · sin(2 · π3− 4 · π

3) (3.10)

Vdc/VL =√3p.u. (3.11)

This list of conducting states goes on with the same logic until 2π is reached. The Vdc obtained is illus-trated in the following graphic, in which the highest point of the Vdc curve corresponds to the

√3 p.u.

value, while the lowest point corresponds to the 1,5 p.u. value. The average Vdc value is:

Vdc−average = 3 ·√2 · VL/π · cos(α) (3.12)

Page 30: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 28

In the previous equation, α is the firing angle of the thyristors. In the case shown, this angle is equal to0.

The voltage level of the DC side has 6 pulses in an AC voltage curve period, from its name comes.

Figure 3.2: 6-pulse output [23]

In order to obtain a 12-pulse bridge rectifier, a method usually used is to connect two 6-pulse bridgerectifiers, each one connected to a transformer. One is connected to a star-star transformer, and the otherone to a star-delta connection, getting a π

6 shift between both signals and, therefore, obtaining a 12-pulserectifier.

As commented before, the present and future for HVDC converters are the Voltage Source Converters, asthey allow a better control, produce an insignificant level of harmonics and have a fine control of reactivepower.

3.2 Voltage source convertersThyristors can be turned on but can’t be turned off, which gives the control system only one degree offreedom. Other semiconductors can be turned on and off using externally generated commands, whichpermits control of the commutation without the need of external sources. GTO and IGBT allow bothoperations, therefore these are the devices used in voltage source converters.

3.2.1 Modular Multi-level ConverterAs said before in this thesis, a HVDC system requires a converter able to transform AC signal to DCsignal, and vice-versa. The MMC is the most current converter used nowadays in order to accomplishthis task, allowing a voltage with low harmonics and low commutation losses.

Page 31: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 29

MMC structureThe following structure is assumed for a standard Modular Multi-level Converter.

Figure 3.3: MMC standard structure [19]

The converter is composed by submodules (SM1, SM2, and so on), distributed symmetrically along anupper and a lower arm for each phase of the AC side, each of this arms containing an inductance. Thenumber of submodules for each phase determines the amount of levels obtained. Having more levels ofAC output (in the DC/AC conversion) means having less harmonics and an output much more similarto a sinusoidal curve.

The variations of the basic MMC, such as the neutral point clamped (NPC) or the flying capacitor (FC)are not studied in this thesis.

SubmoduleNowadays, several thousands of submodules are interconnected in each converter. The type of submod-ules used in this converters are the half bridge. The half bridge submodules are composed by two IGBTdevices connected to a capacitor. The operation of the MMC depends on the switching of the submod-ules, performed by a switching algorithm, which generates the firing signals.

Page 32: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 30

Figure 3.4: Submodule structure [18]

Different states of the submodule depend on the activation of the semiconductors and the polarity of thearm. The four operating modes of MMC submodules are the following:

• Mode 1: T1 opened, T2 closed, positive polarity on the arm. The submodule voltage is VSM, thecapacitor is charging.

Figure 3.5: Intensity flow [17]

• Mode 2: T1 closed, T2 opened, positive polarity on the arm. The submodule voltage is 0, thecapacitor charge remains constant.

Figure 3.6: Intensity flow [17]

• Mode 3: T1 opened, T2 closed, negative polarity on the arm, the capacitor discharges. The sub-

Page 33: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 31

module voltage is VSM.

Figure 3.7: Intensity flow [17]

• Mode 4: T1 closed, T2 opened, negative polarity on the arm. The submodule voltage is VSM., thecapacitor charge remains constant.

Figure 3.8: Intensity flow [17]

Fundamental equationsAs said, the submodels can be grouped into two blocks: the upper arm, with voltage vua, and the lowerarm, with voltage vla. The voltage of each submodule is charged with a voltage equal to the DC voltagedivided by the number n of submodules in its arm:

vsubmodule = VDC/n (3.13)

The AC output of a MMC looks like in Fig. 3.9, depending on the number of submodules used and theirstate in each arm.

Page 34: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 32

Figure 3.9: AC output of a MMC [22]

Regarding the relation between AC voltage and DC voltage, it is governed by the following equations,being obtained through the upper arm or the lower arm:

va = VDC/2− vua − L · diua/dt (3.14)

va = −VDC/2 + vla + L · dila/dt (3.15)

Also, the voltages of each arm vua and vla are governed by equations 2.16 and 2.17:

vua =

n∑k=1

Sua · vcua (3.16)

vla =

n∑k=1

Sla · vcla (3.17)

Being Sua and Sla the conduction states of each submodule (1 or 0).

Page 35: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 33

nu nl va5 0 −VDC/24 1 −VDC/2 + VDC/53 2 −VDC/2 + 2 · VDC/52 3 −VDC/2 + 3 · VDC/51 4 −VDC/2 + 4 · VDC/50 5 −VDC/2 + 5 · VDC/5

Table 3.1: Table to test captions and labels

The equations are studied in the Section 4.1.

Neutral-Point Clamped

A different type of MMC converter is the Neutral-Point Clamped converter. In the NPC converter, twosemiconductors are added and the medium voltage is defined as a neutral point.

Figure 3.10: NPC converter [20]

With the example in Fig. 3.10, let’s take phase a and see how the semiconductors states influence theoutput voltage.

• S3 and S4 ON, S1 and S2 OFF: The output is connected to the bottom and Voutput = −Vdc

2 .

• S2 and S3 ON, S1 and S4 OFF: The output is connected to neutral point and Voutput = 0.

• S1 and S2 ON, S3 and S4 OFF: The output is connected to top Voutput = Vdc

2 .

Page 36: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 34

Page 37: Analysis, modelling and simulation of an HVDC converter ...

Chapter 4

Model

The model studied has been downloaded from https://github.com/ and was uploaded by the userlvanfretti in 2017. According to the information given by the user, the model was developped by Mo-hammed Ahsan Adib Murad and Luigi Vanfretti and presented in the 12th International Modelica Con-ference. It represents a Modelica VSC-HVDC Average Value Model Implementation.

In this chapter, different parts of the model will be analized, from the AC/DC conversion to the controlstructure.

Even if Modelica is still in development and some features may be considered not ready for the academicuse, it is important to appreciate the will to collaborate in order to improve the OpenModelica perfor-mances, sharing the model built and giving all the internet users the chance to download and studyit.

The VSC-MMC model developed in Modelica language is represented in Fig. 4.1. In this chapter thecomponents of this model and their connections will be studied.

Figure 4.1: MMC model

35

Page 38: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 36

The converter has been divided into three parts: the upper level control block (violet in Fig. 4.1), the perunit calculation block (green in Fig. 4.1), and the average value model block (red in Fig. 4.1). Each partwill be studied before presenting the simulation results.

4.1 Average Value ModelThe structure of a MMC contains hundreds of submodules in each arm, which makes building an accu-rate model a really difficult task. Also, it gives the computer a huge amount of information to process,slowing down (or not allowing) the simulation execution. In this work, an average value model is im-plemented in order to make it easier to build and simulate it.

Figure 4.2: AVMmodel. Red zone = AC side ; Blue zone = DC side

In Fig. 4.2, the elements contained in the red square form the AC side of the AVM model, while theelements contained in the blue square form the DC side of the AVMmodel.

As seen on the AC side, the voltage of the converter for each phase j = a, b, c depends on the voltage ofthe DC side and the reference voltage of each phase. The blocks on the bottom left of the AC side are theones containing the equation that determines the voltage of the controlled AC voltage sources (4.5).

For each j=a,b,c phase:

vuj = vuSMj − L ·diuj

dt(4.1)

vlj = vlSMj− L ·

diljdt

(4.2)

vphasej = vlSMj− L ·

diljdt

(4.3)

vuSMj= −vphasej + Ls ·

diuj

dt+Vdc2

(4.4)

vlSMj= vphasej + Ls ·

diljdt

+Vdc2

(4.5)

Page 39: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 37

being vlSMjand vuSMj

the voltages of the lower and upper submodules group, Vdc the voltage measuredon the DC side,vphasej the voltage of the phase, ilj and iuj

the lower and upper current.

Regarding the current values, as the circulating currents is are zero, for each phase j = a, b, c the nextequations must be respected:

iupperj =ij2+Idc3

(4.6)

ilowerj = − ij2+Idc3

(4.7)

The AVM is built assuming that the number of submodules in for each phase j = a, b, c is constant beingthe sum of the upper and lower arm voltages for each phase equal to DC voltage (4.8).

vuj+ vlj = Vdc (4.8)

Finally, the AVMuses a controlled voltage current vavm calculated using the AC side blocks. The relationbetween the controlled ac source vavm and the dc voltage Vdc is:

vavmj =Ls2· dijdt− vphasej (4.9)

vavmj=vrefj · Vdc

2(4.10)

Figure 4.3: ACside block equations

In the DC side, the current in the capacitor is:

ic = C · dvdcdt

(4.11)

But as it is assumed that the DC voltage is constant, dvdcdt = 0 and therefore ic = 0.

The DC side voltage and current are related to the AC side voltage and current from each phase with thefollowing equations obtained using the power balance:

Vdc · Idc = vAVMa· ia + vAVMb

· ib + vAVMc· ic (4.12)

Idc =1

2· (vrefa · ia + vrefb · ib + vrefc · ic) (4.13)

In Fig. 4.4 is presented the equation of the DCside block, calculating the DC current.

Figure 4.4: DCside block equations

Regarding the inductance, the resistor and the capacitor of the DC side, their values are obtained:

C =6 · CN

(4.14)

L =2 · Larm

3(4.15)

R =2 ·Rloss ·N

3(4.16)

Page 40: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 38

4.2 Per Unit calculation

Figure 4.5: PU − Calculation block equations

The control of the converter reference voltages is executed using p.u. calculations in order to simplify thecalculations and interpretations of the system. Using the p.u. calculations, values of the same variableare similar, which makes it easier to establish comparisons between systems with different sizes. Thisallows also easier calculations as different voltage levels are brought to a similar level.

The p.u. values are calculated by dividing the values between the base values:

v =V

Vbase(4.17)

i =I

Ibase(4.18)

z =Z

Zbase(4.19)

S =S

Sbase(4.20)

In the model studied, voltage and current from the primary and secondary of the Y-D transformer aretransformed into p.u. values. Along with the the dc voltage Vdc, they are the inputs of the upper levelcontrol.

Page 41: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 39

4.3 Upper level control

Figure 4.6: Upper level control model

All the variables enter the Upper Level Control in p.u.. The inputs are the dc voltage measured on theDC side and the star and delta primary and secondary current and voltage in the abc frame. The outputsare the reference voltages that will be multiplied by Vdc

2 and control the converter voltage.

4.3.1 Clarke transformation

Figure 4.7: Clarke’s transformation equations

TheClarke’s transformation, also known as theαβ transformation, permits to transform sinusoidal three-phase signals (120º phase shift between phases a,b,c) into two sinusoidal signals (90º shift betweenphases α,β,0). The 0 component is separated from the other two, and the system is only defined us-ing α β variables.

The input variables are the star and delta currents and voltages of the ac grid VabcY , VabcD , IabcY andIabcD. The outputs are the currents and voltages in the αβplane. The equations in the block are repre-sented in Fig. 4.7.

Page 42: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 40

Figure 4.9: PLL block diagram

4.3.2 Signal calculation

Figure 4.8: Signal calculation block equations

The active and reactive power are obtained using the αβ0 frame. The inputs of the signal calculationblock are the α and β star voltages obtained after the Clarke transformation. The active and reactivepower are obtained from equations 4.21 and 4.23, defined in the Modelica language as seen in Fig. 4.8:

P = Vα · Iα + Vβ · Iβ (4.21)

Q = −Vα · Iβ + Vβ · Iα (4.22)

The ac voltage of the grid is obtained from equation :

V ac =√V 2α + V 2

β (4.23)

The obtained magnitudes are the outputs of the block are the active power P , the reactive power Q andthe ac grid voltage VAC−grid.

4.3.3 Phase Locked LoopThe objective of the Phase Locked Loop is to obtain the frequency and the θ angle of the grid.

Using the output θ value, vα and vβ , the Park block is used to obtain vd.

In order to obtain the θ value, the output value of AverageV alueMeanFrequency goes through a PI inorder to obtain w value. Then, w is integrated using an integration block and the θ angle is the output.ThemoduloOperation block is used to eliminate the 2πn component in 2πn+ θ. The loop is closed usingthis output angle as an input of the Park block.

Page 43: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 41

4.3.4 dq transformation

Figure 4.10: dq transformation block

Figure 4.11: parkI1 block equations

Figure 4.12: parkV1 block equations

The dq transformation block receives as inputs the α and β currents and voltages and the θ angle calcu-lated in the PLL block, and sets as outputs the d and q currents and voltages. In this model, d voltageand current are used for the active power, while q voltage and current are used for the reactive power.

The Park transformation is executed applying a rotation to the αβ0 plane in order to obtain dc signalsfrom ac signals. The matrix that allows this transformation is represented in (4.24).(

xdxq

)=

(sin(θ) − cos(θ)cos(θ) sin(θ)

)·(xαxβ

)(4.24)

Page 44: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 42

The transformation is executed in the parkI1 and parkV1 blocks (figures 4.11 and 4.12); the first one isfor the current transformation, the second one for the voltage transformation. The equations are 4.25 and4.26 for the current block, and 4.27 and 4.28 for the voltage block.

Id = Iα · sin(θ)− Iβ · cos(θ) (4.25)

Iq = Iα · cos(θ) + Iβ · sin(θ) (4.26)

Vd = Iα · sin(θ)− Iβ · cos(θ) (4.27)

Vq = Vα · cos(θ) + Vβ · sin(θ) (4.28)

4.3.5 Vdc controller

Figure 4.13: Vdc controller block

The vdc controller receives as an input the DC voltage mesured in the DC side of the average value modeland transforms it into the reference id current, idref .

As seen in the Fig. 4.13 the reference voltage is produced with a step signal, and the sum between thereference voltage and the voltage mesured multiplied by −1 goes through a PI controller. The equationgoverning this step is:

idref = (Kp +kis) · (Vdcref − vdc) (4.29)

4.3.6 P controlThe P controller execution is divided in two blocks: p-controller and power-Current.

(4.37) represents the calculation of idref .

idref =1

vd(Kp +

kis) · (Pref − P ) (4.30)

First blockThe first block of the controller (p − controller) is the responsible for the (Kp +

kis ) · (Pref − P ) part of

the equation, and calculates the reference P needed in order to find the necessary d current, idref .

Page 45: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 43

Figure 4.14: First

As seen in Fig. 4.14, the reference active power is generated with a step signal. The Vdc also has a role inthis block. The input Vdc goes through a deadband, and is added then to the (Kp+

kis ) · (Pref −P ) result.

The role of the deadband is the following. Being Vdc the voltage of the HVDC lines, Vdcmax= 1.05 and

Vdcmin = 0.95 the maximum and minimum accepted voltages in p.u., and KPDB equal to 10, the blockexecutes the following algorithm:if Vdc ≥ 1.05 theny = (Vdcmax − Vdc) ·KPDB

else if Vdc ≤ 0.95 theny = (Vdcmin

− Vdc) ·KPDBelsey = 0

end if

So, if Vdc is greater than accepted, a negative value will be added to the P reference calculation in order tofinish the control operation applying a lower reference voltage. If Vdc is lower than accepted, a positivevalue will be added to the P reference calculation in order to finish the control operation applying ahigher reference voltage.

Second blockThe second block of the controller (power − Current) completes (4.37). Considering

P = vd · id (4.31)

the reference P obtained in the first block will now be divided by vd, obtained in the signal calculationblock, in order to obtain idref .

Page 46: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 44

Figure 4.15: Second block of the P control

So, at the end of the P control, (4.37) is completed.

4.3.7 Q controlThe Q control execution is divided in two blocks: q-controller and power-Current.

The (4.32) represents the calculation of iqref .

iqref = − 1

vd· kis· (Qref −Q) (4.32)

First blockThe first block of the controller (q − controller) is the responsible for the −(kis ) · (Qref −Q) part of theequation, and calculates the reference −Q needed in order to find the necessary q current, iqref .

Figure 4.16: First block of the Q control

As seen in Fig. 4.16, the reference reactive power is generated with a step signal, that is added to the Q

Page 47: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 45

from the signalCalculation. The signal then goes through a PI and a unitary negative gain.

Second blockThe second block of the controller (power − Current) completes (4.32). Considering

Q = −vd · iq (4.33)

the reference -Q obtained in the first block will now be divided by vd, obtained in the signalCalculationblock, in order to obtain iqref . 4.15.

4.3.8 Vac control

Figure 4.17: Vac control block

The Vac control block has two inputs, the iq obtained in the dq−transformation block and the V ac−gridobtained in the signalCalculation block, and the necessary iqref as output. The equation governing thecalculation of iqref is:

iqref = iq + (kp ·kis) · (Vacref − Vac−grid) (4.34)

4.3.9 Choice controller for idrefAs seen in the P and Vdc controllers, the necessary idref can be obtained using the reference active poweror using the reference ac grid voltage with equations:

idref =1

vd(Kp +

kis) · (Pref − P ) (4.35)

idref = (Kp +kis) · (Vdcref − vdc) (4.36)

Using the block choiceControl it is possible to choose which control, P or Vac, is used to obtain idref .As seen in Fig. 4.19, an algorithm is executed. The OpenModelica user, when choosing the simulationparameters, assigns a value to the parameterMode. If this value is bigger than 0, the output of the block

Page 48: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 46

y is equal to the value of P , that is to say, the idref obtained using the P controller. IfMode is not biggerthan 0, the output y is equal to the value of V DC, that is to say, the idref obtained using the Vdc controller.

Figure 4.18: choiceController block equations

4.3.10 Choice controller for iqrefAs seen in the Q and Vac controllers, the necessary iqref can be obtained using the reference active poweror using the reference ac grid voltage with equations:

iqref = − 1

vd· kis· (Qref −Q) (4.37)

iqref = iq + (kp ·kis) · (Vacref − Vac−grid) (4.38)

Using the block QV ACChoice it is possible to choose which control, P or Vac, is used to obtain idref .As seen in Fig. 4.19, an algorithm is executed. The OpenModelica user, when choosing the simulationparameters, assigns a value to the parameter C −QV AC. If this value is bigger than 0, the output of theblock y is equal to the value of Q, that is to say, the iqref obtained using the P controller. If C − QV ACis not bigger than 0, the output y is equal to the value of V AC, that is to say, the iqref obtained using theVdc controller.

Figure 4.19: QVACChoice block equations

Page 49: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 47

4.3.11 idq reference limiter

Figure 4.20: idqRef − Limiter block

The idqRef − Limiter block is used in order to limit the reference currents in the dq frame. How thelimiter works depends on the parameter Prior. The blocks f1−IDQREF and f2−IDQREF equationsare visible in 4.21 and 4.22

• Prior = 1:

The f1− IDQREF block sends information to the vLimiter block in order to limit Id− ref − inwith a maximum of Idlim and a mimimum of −Idlim, being this value equal to 1.1.

The f2− IDQREF block sends information to the vLimiter1 block in order to limit Iq− ref − inwith a maximum of

√Ilim2 − Idrefout2 and a mimimum of −

√Ilim2 − Idrefout2, being this

value equal to 1.1.

• Prior = 0:

The f2− IDQREF block sends information to the vLimiter1 block in order to limit Iq− ref − inwith a maximum of Idlim and a mimimum of −Idlim, being this value equal to 1.1.

The f1−IDQREF block sends information to the vLimiter block in order to limit Id−ref−inwitha maximum of

√Ilim2 − Iqrefout2 and a mimimum of -

√Ilim2 − Iqrefout2, being this value

equal to 1.1.

Page 50: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 48

Figure 4.21: f1− IDQREF block equations

Figure 4.22: f2− IDQREF block equations

Page 51: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 49

4.3.12 Inner controller

Figure 4.23: Inner control model

The Fig. 4.23 is the inner controller used in theModelicamodel. It is built exclusively with elements fromthe Modelica Standard Library. The inputs are the voltages from the AC grid vd and vq , the convertercurrents id and iq , and the reference currents id−ref and iq−ref . The outputs are the reference voltagesin the dq plane, vd−ref and vq−ref .

In order to understand the model, let’s explain the relation between its variables.

Being vrefdq the converter AC voltage, idq the converter current, and vdq the AC grid voltage, all in the dqplane, w the angular frequency of the AC system and L respecting (4.39), the equation relating all thevariables is:

L =Larm2

+ Ltransf (4.39)

vrefdq = vdq + w · L ·(iq−id

)− L · didq/dt (4.40)

So the system is:vrefd = vd + w · L · iq − L · did/dt (4.41)vrefq = vq + w · L · id − L · diq/dt (4.42)

Then, in order to decouple the system, a decoupler is added using an inner feedback loop:

v′d = v − L · did/dt (4.43)

v′q = v − L · diq/dt (4.44)

Page 52: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 50

G(s) is then the transfer function relating v′dq to idq (4.45). It is a decoupled function, so the d can becontrolled independently of q and vice-versa.

Gqd(s) =

(−1/(sL) 0

0 −1/(sL)

)(4.45)

The controlled is done with a PI controller:

GPI(s) = −(Kp +Ki/s 0

0 Kp +Ki/s

)(4.46)

The equations can be illustrated using a block diagram (Fig. 4.24)

Figure 4.24: Inner control block diagram

A more detailed diagram is presented in Fig. 4.25 and matches with the inner controller of the model(Fig. 4.23). The wL is set in the studied model as a constant, while the PI controllers and the sums aredisplayed the same way as in the detailed diagram. In the model, the voltage of the AC grid in the dqplane is filtered using a low pass filter with a 11Hz cut-off frequency.

Figure 4.25: Inner control detailed diagram

Page 53: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 51

4.3.13 dq to abc

Figure 4.26: DQtoABC block

This block is the responsible to transform the vdref and vqref signals into the varef , vbref and vcref signalsin the a,b,c frame that will be applied to the system. θ obtained in the PLL and Vdc measured are used toreach the objective.

The first step is to assume that vdref and vqref form a complex number:u = vdref + i · vqref (4.47)

This number is then expressed in its polar coordinates, and its module is divided by Vdc. After passingthrough a limiter that establishes a maximum of 1.5 for the module

Vdcvalue, and using the argument ob-

tained at the cartesian to polar conversion, the number is again transformed to cartesian coordinate. Thisnew number can be named:

vref = vdnewref+ i · vqnewref

(4.48)In order to transform vref from the d, q to the αβ plane, the inverse Park operation is executed.(

xαxβ

)=

(sin(θ) − cos(θ)cos(θ) sin(θ)

)−1·(xdxq

)(4.49)(

xαxβ

)=

(sin(θ) cos(θ)− cos(θ) sin(θ)

)·(xdxq

)(4.50)

This operation is executed using the cos and sin blocks for the θ value and using product and additionblocks, as the operation is quite simple and does not need a matrix to be realized.

Finally, the inverse Clarke operation is modeled. The inputs of the ClarkInv block are the α and β, anda constant k = 0 in order to complete the 3x3 matrix to realize the operation and obtain the three valuesin the a,b,c plane, varef , vbref and vcref , that will be sent to the AC side of the Average Value Model.

Figure 4.27: ClarkInv block equations

Page 54: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 52

4.4 Equivalent sourceThe equivalent source used to simulate a three-phase AC electrical grid is composed of a cosine voltagesource, a three-phase resistor and a three-phase inductor, both connected to the positive pin of the source(4.28).

Figure 4.28: EquivalentSource block

This equivalent source will be used in the HVDC simulation using the model studied, establishing atwo-node power system with a converter sending power to the other. The equivalent source is used inboth sides of the connection in order to simulate an electrical grid. Due to solver issues, both grids areconnected to the same ground.

Figure 4.29: Two node power system model

Page 55: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 53

Page 56: Analysis, modelling and simulation of an HVDC converter ...

Chapter 5

Simulations

5.1 Prepare and run a simulation: Equivalent source testThis section explains how to prepare and run a simulation using OMEdit using a simple circuit as an ex-ample, and is not necessary in order to understand the simulations results. In order to see the simulationsof the studied model, advance to Section 5.2.

The equivalent source presented in Fig. 4.4 is used to simulate three-phase AC electrical grid. Composedof a cosine voltage source, a three-phase inductor and a three-phase resistor, in the equivalent source testmodel the equivalent source is connected to a resistor and an inductance in order to test its behaviour(5.1).

Figure 5.1: Equivalent source simulation model

5.1.1 Model constructionThis section presents the steps to build the Equivalent Source model.

• File > New Modelica Class:

54

Page 57: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 55

When opening the New Modelica Class options, the name of the new class must be specified (inthis case, "Eq-Source-Test"). Then the specialization of it: the new creation can be a model, a class,a package, a block, an operator, a connector... .

In this case, the different elements of the MMC and HVDC model are inserted in a class calledVSCHVDC. That’s why the new model will be included in this class through the option Insert inclass (optional).

Figure 5.2: New Modelica Class options

• Drag elements:

When the new empty model has been created, it is time to drag the basic elements of the desiredmodel from the Libraries browser. In this example, the elements are from two different libraries, theModelica Standard Library and the package VSCHVDC. So, in order to be allowed to use them,MSLand VSCHVDC must be loaded. The elements are the following:

– Modelica.Electrical.MultiPhase.Basic.Resistor: The three-phase resistor is dragged from theMod-elica Standard Library. By double-clicking the element the parameters can be set (Fig. 5.3). Forthe multiphase elements the m parameter is the number of phases (in this case m = 3). Inorder to have the same ohmic value for each phase, the expression fill(Rvalue,m) is used, butthe values could be defined to be different.

Page 58: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 56

Figure 5.3: Resistor element parameters

– VSCHVDC.HVDC-Emtp.Inductor: The three-phase inductor could be also dragged from theModelica Standard Library, but a similar inductor has been profited from the VSCHVDC pack-age. In element, the parameters chosen are the initial current for each phase, the number ofphases m and the inductance value for each phase (fill(Lvalue,m)).

Figure 5.4: Inductor element parameters

– VSCHVDC.HVDC-Emtp.EquivalentSource.Equivalent-Source: The equivalent source, presentedin Fig. 4.28, is dragged from the VSCHVDC package. The parameters can be set by double-clicking the element on the model. Between them, the line to line voltage is 400kV and thefrequency is 50Hz.

Page 59: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 57

Figure 5.5: Equivalent source element parameters

– Modelica.Electrical.Analog.Basic.Ground: The ground, in order to have a 0 voltage reference, isdragged from theModelica Standard Library.

– Modelica.Electrical.MultiPhase.Basic.Star: The star connection is dragged from theModelica Stan-dard Library. The parameter is the number of phases, in this casem = 3.

• Connect the elements:

For a normal model construction the elements connection is very simple: clicking on one pin anddragging the mouse until reaching the other pin of the connection is enough. In the Fig. 5.6, it ispossible to see the elements dragged before and after the connection. The connection cable used isthe same as if the simulation was done with 1, 3 or 5 phases.

Page 60: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 58

Figure 5.6: Model before and after the connection of its elements

5.1.2 SimulationOnce the model is built and the parameters are adjusted, the next step is to run the simulation. In orderto see if the model is built with no mistakes and ready to be simulated, it is possible to check the modelclicking on Check model. It is also possible to simulate without checking, as the program will inform theuser if the simulation cannot be completed, but this may take very long if the model is big. The modelcheck of the model is successful (Fig. 5.7), and has 223 equations and 223 variables.

Figure 5.7: Result of checking the model

Once the model is checked, it is time to choose the simulation setup. The basic choices are the start time,stop time and number of intervals, that can be also set changing the interval time. But in the simulationsetup it is possible to add compiler flags as seen before in this thesis, or to turn on an interactive simulationamong other options. In the model, the simulation will last 0,4s and will have 500 intervals (Fig. 5.8),and the flag -d=newInst is recommended.

Page 61: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 59

Figure 5.8: Simulation setup

If the option Simulate is on, the simulation starts automatically after choosing the simulation setup. Awindow appears informing the evolution of the simulation.

5.1.3 ResultsOnce the 100% of the simulation is reached, it is possible to see the results in the plotting perspective. Itis possible to go to the plotting perspective by clicking on the option Plotting on the right bottom of thescreen (Fig. 5.10), or by clicking Ctrl+F3. On the right of the plotting perspective window the variablesare grouped for each element in the Variables browser. Once a variable is picked, a color is assigned andthe evolution of its value through time is represented in the graphic. It is possible to hide the variablerepresentation clicking on the name at the top of the graphic. The scale is adjustable selecting the areato zoom drawing a square with the left mouse button, or clicking on the graphic with the right button.

For theEq−Source−Testmodel the voltage of the positive (green) and negative (red) pin of the phase"a" resistor is plotted, such as the voltage drop between both pins (violet). The expected behaviour isobtained, as a sine curve is noticeable for each pin with an almost inappreciable voltage difference. Thecurrent also has an expected behaviour as the three phases have a 120 degrees voltage shift and a sineevolution.

The peak voltage is 309805V and the peak current is 988,78A.

Page 62: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 60

Figure 5.9: Plotting perspective window

Figure 5.10: Current results at the positive pin of the voltage source

5.2 Average Value Model testThe second simulation is the HVDC link test simulation. The equivalent generator is connected to theAC side of the AVM. A resistor is connected to the upper DC transmission line and to a constant voltagesource. The lower DC transmission line is connected to the ground, forcing a 0V voltage.

Page 63: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 61

Figure 5.11: Average Value Model simulation model

5.2.1 Simulation parametersThe simulation parameters are the following:

• Constant voltage source:

Parameter ValueVoltage 640 kV

Table 5.1: Constant voltage source parameters

• Resistor parameters:

Parameter ValueR 10 Ohm

Table 5.2: Resistor parameters

• Equivalent generator parameters:

Parameter ValueUac 400 kV (RMS line to line)Scc 10000 MVA

RL ratio 10

Frequency 50 HzRd U2

ac · 1Scc·√1+k2

OhmLd k · Rd

2·π·f HPhase a angle 0 radPhase b angle −2·π

3 radPhase c angle 2·π

3 rad

Table 5.3: Equivalent generator parameters

Page 64: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 62

• AVM parameters:

Parameter ValueRated power 1000 MVA

Primary voltage 400 kV (RMS line to line)Secondary voltage 320 kV (RMS line to line)

Submodules per arm 400Scc 10000

V DCref 1Pref 1Qref 0V acref 1

Vb-Primary ACprimV oltage · 1000 (RMS line to line)Vb-Secondary ACsecondV oltage · 1000 (RMS line to line)Ib-Primary RatedPower · 1000·

√2

ACprimaryV oltage/√3

Ib-Secondary RatedPower · 1000·√2

ACsecondV oltage/√3

Controller choice mode 0C-QVAC 1Prio 0

Table 5.4: AVM parameters

Being the Controller choice mode 0 and C-QVAC 1, the controls used are the Vdc and Q control. Thereference active and reactive power are 1 and 0. The voltage level expected in the DC is 640 kV. The basevalues are calculated using the voltages measured during the simulation on the AC side.

5.2.2 Simulation setupThe simulation time is 3s using 0.0001s intervals. Only the recommended newInst flag is added.

5.2.3 ResultsThe DC voltage (Fig. 5.13) is obtained measuring the voltage level on the positive and negative pin ofthe DC side of the AVM. As expected, the value of the positive pin tends to 640kV, while the voltage ofthe negative pin is always 0 due to the ground connection. The curve representing the voltage betweenthe two pins of the DC side tends to 640kV in the stationary state.

Page 65: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 63

Figure 5.12: DC voltage

Figure 5.13: Capacitor voltage

The theta angle, calculated in the PLL block, has the expected behaviour. The reached value is 6,07radians. The Fig. 5.14 is focused on a short period of the simulation. This allows to see the period of θcurve, 0.02s, and confirm that it matches with the period of α and β voltages, calculated in the Clarke’sblock.

Page 66: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 64

Figure 5.14: Theta, vα and vβ

Concerning the dq calculation, in Fig. 5.15 the voltages α (red), β (blue), d (green) and q (pink) areplotted. The main advantage of the dq reference is going from oscillating to constant values in the sta-tionary state. In the stationary state vd tens to 1 p.u. while vq tends to 0 p.u., being the peak of α and βequal to 1 p.u..

Figure 5.15: α, β, d and q voltages

The reference voltages in the a, b, c frame, output of the upper level control, are plotted in Fig. 5.16. Threesine waves are plotted, with a peak of 0,81 p.u. and a frequency of 50Hz.

Page 67: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 65

Figure 5.16: Reference voltages in the a, b, c frame

At the end of the control the converter voltage vref ·Vdc

2 voltage is inserted in the AVM AC side, and isaround 281kV in the stationary state.

Figure 5.17: Voltage inserted in the AC side of the AVM

5.2.4 ConclusionsThe values reached the stationary state at around 0.2 seconds of simulation.

The AVM test simulation results were as expected, and OpenModelica was able to simulate a realisticbehaviour of the converter. The values had an expected evolution in the α,β,d,q and a,c,b planes. In thed,q plane, vd is set to be 1 and vq is set to be 0 in the stationary state.

The control mode worked well, as the voltage from the converter maintained the stability, delivering therequired voltage to the grid.

As the converter is controlling Vdc, no control of the active power sent is used in this simulation.

The sensors also had a satisfactory result, and this allowed a good calculation of the p.u. values, vital for

Page 68: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 66

the good execution of the control commands.

5.3 Two node power system simulationThe converter tested in the previous simulation is now linked to another converter forming a HVDClink. Conv1, the converter on the left in Fig. 5.18, sends 2000 MW to Conv2, the converter on the right,through a DC connection with a resistance of 1.022 Ohm. The equivalent generators in both AC sides ofthe link work at a different frequency, 60Hz for Conv1 grid and 50Hz for Conv2 grid, and are connectedto ground forcing a 0V voltage levels in their negative pin.

Both grids are connected to the same ground, this is because the program was not able to complete thesimulation if one ground was used for each converter.

The idea behind this simulation is to try the AVM for simulating very simple HVDC links. Due to issueswith the solver, the DC cable complexity was not increased. With a bigger knowledge of the softwareand solid information notions, this could have been achieved.

Also, using a different frequency for each grid, one of the advantages of HVDC links (connecting gridsusing a different frequency) is tested. The frequencies chosen are 50 Hz and 60 Hz because similarconnections exist in the world, with around 40 countries having 60 Hz electrical grids.

Figure 5.18: Two node power system model

5.3.1 Simulation parametersRegarding the parameters, they are the same for both converters excepting the active power orDCvoltagechoice (Mode 1 for Conv1, Mode 0 for Conv2 as converter 1 controls the active power P and Q andconverter 2 controls DC voltage and Q). Also, the initial current values for simulation of each converterhave the opposite sign (positive for Conv1 and negative for Conv2).

Page 69: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 67

• Converter 1 and 2 parameters:

Parameter Conv1 Value Conv2 ValueRated power 2000 MVA 2000 MVA

Primary voltage 400 kV 400 kVFrequency 60 Hz 50 Hz

Secondary voltage 320 kV 320 kVSubmodules per arm 400 400

Scc 10000 10000V DCref 1 1Pref 1 1Qref 0 0V acref 1 1

Vb-Primary ACprimV oltage · 1000 (RMS line to line) ACprimV oltage · 1000 (RMS line to line)Vb-Secondary ACsecondV oltage · 1000·

√2√

3ACsecondV oltage · 1000·

√2√

3

Ib-Primary RatedPower · 1000·√2

ACprimaryV oltage/√3

RatedPower · 1000·√2

ACprimaryV oltage/√3

Ib-Secondary RatedPower · 1000·√2

ACsecondV oltage/√3

RatedPower · 1000·√2

ACsecondV oltage/√3

Controller choice 1 0C-QVAC 1 1Prio 0 0

Table 5.5: Converters 1 and 2 parameters

• Resistor parameters:

Parameter ValueR 1.022 Ohm

Table 5.6: Resistor parameters

• Equivalent generators 1 and 2 parameters:

Parameter Conv1 Value Conv2 ValueUac 400 kV 400 kV (RMS line to line)Scc 10000 MVA 10000 MVA

RL ratio 10 10

Frequency 60 Hz 60 HzVm 400 ·

√2√3kV 400 ·

√2√3kV

Rd U2ac · 1

Scc·√1+k2

Ohm U2ac · 1

Scc·√1+k2

OhmLd k · Rd

2·π·f H k · Rd

2·π·f HPhase a angle 0 rad 0 radPhase b angle −2·π

3 rad −2·π3 rad

Phase c angle 2·π3 rad 2·π

3 rad

Table 5.7: Equivalent generators 1 and 2 parameters

Page 70: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 68

5.3.2 Simulation setupThe simulation time is 3s using 30000 intervals of 0,0001s. Only the recommended newInst flag is added.

5.3.3 Simulation resultsThe DC voltage is obtained using the voltage sensor of the wattmeter in the DC link. The stationary stateis reached around t = 0.9, the DC voltage value is stabilized around 640kV, the expected value, as seenin Fig. 5.19. This voltage is similar to the voltage level observed in the DC capacitors of both converters,being stable around 640kV too (Fig. 5.20). The voltage drop due to the resistance in the DC connectionis unnoticeable.

Figure 5.19: DC voltage

Figure 5.20: DC capacitors voltages

The power sensor also measures the current flowing from converter 1 to converter 2, with positive valuesin the direction of the active power flow (Fig. 5.21). The value of the current fluctuates around 3140 A.Some instabilities are observed, being the most noticeable one at 2.11s with a low peak of 2052 A and ahigh peak of 3973 A. This variations have a direct effect in the power sent from converter 1 to converter

Page 71: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 69

2, as the DC voltage is much more stable than the current, being this one the responsible for the activepower instabilities. The active power ismeasured using the power sensor (Fig. 5.22). Once the stationarystate is reached, the active power fluctuates around the expected 2000 MW. The variations match in timewith the current variations, being the lowest peak located at 2.11s with a value of 1309 MW.

Figure 5.21: Current measured by the power sensor

Figure 5.22: Active power measured by the power sensor

The AC grid voltages in both sides of the link are plotted in Fig. 5.23 and 5.25, and zoomed in Fig. 5.24and 5.26. Being the amplitude of 326 kV, the frequency is as expected, 60 Hz for converter 1 grid and 50Hz for converter 2 grid. The sine waves have the expected form.

Page 72: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 70

Figure 5.23: Converter 1 AC grid voltage

Figure 5.24: Converter 1 AC grid voltage zoom

Figure 5.25: Converter 2 AC grid voltage

Page 73: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 71

Figure 5.26: Converter 2 AC grid voltage zoom

Regarding the Converter 1, Conv1, the α(red), β(blue), d (green) and q (purple) voltages are plotted inFig. 5.27 for a lapse of around 0,4s in order to make it visible. The oscillation of the alpha beta values isexpected, and so is the phase shift. vd is stabilized at 0.95 p.u., being 1 p.u. the expected value, while vqis has a value of 0 p.u..

Figure 5.27: Converter 1 α, β, d and q voltages

Regarding the Converter 2, Conv2, the α(green), β(purple), d (red) and q (blue) voltages are plotted inFig. 5.27 for a lapse of 0,5s in order to make it visible. The oscillation of the alpha beta values is expected,and so is the phase shift. vd (green) is stabilized at 1 p.u., the expected value, while vq is has a value of0 p.u..

Page 74: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 72

Figure 5.28: Converter 2 α, β, d and q voltages

Regarding the θ values, they are as expected for both converters (figures 5.29 and 5.30), and are the sameas for the AVM test simulation.

Figure 5.29: Converter 1 θ

Page 75: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 73

Figure 5.30: Converter 2 θ

The reference voltages output of the control system for both converters are presented in Fig. 5.33 and5.34. Variations are presented in the same instants as the power and current drops are presented, beingthe peak value for, this variations are more noticeable for the second converter, and the stationnary stateis presented arount t = 0.9s. The frequencies results are as expected, as the voltage values, even if the bphase voltage remains short for both converters.

Figure 5.31: Converter 1 reference voltage

Page 76: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 74

Figure 5.32: Converter 2 reference voltage

Figure 5.33: Converter 1 reference voltage zoom

Page 77: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 75

Figure 5.34: Converter 2 reference voltage zoom

This reference voltage output of the upper level control are then inserted in the AC side of the AVM, con-trolling the converter voltage. The voltage inserted in the AVM is obtained by multiplying the referencevoltage values values by the measured DC voltage level. The result is plotted in Fig. 5.35 and Fig. 5.36,with an amplitude of 295 kV for both converters.

Figure 5.35: Voltage inserted in the converter 1 AVM

Page 78: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 76

Figure 5.36: Voltage inserted in the converter 2 AVM

Finally, the losses due to the conduction of the IGBT devices can be obtained knowing thatR = 23 ·Rloss.

In this simulation, the number of submodules per arm is 400, andRloss = 0, 001Ohm. So, the losses dueto the semiconductors, assuming the current value is 3140 A, are around 837 W.

5.3.4 ConclusionsThe values reached the stationary state at around 1.05 seconds of simulation.

The simulation results were as expected, and OpenModelica was able to simulate a realistic behaviourof the converter. The values had an expected evolution in the α,β,d,q and a,c,b planes. In the d,q plane,vd is set to be 1 and vq is set to be 0 in the stationary state.

The control mode worked well, as the voltage from the converter maintained the stability, delivering therequired voltage to the grid.

The current had some ups and downs, reaching a minimal value of 2052 A, which had direct conse-quences on the amount of power sent to converter 2, with a low peak of 1309 MW.

As converter 2 was controlling Vdc and converter 1 was controlling P (check the control choice mode)both magnitudes were limited and their values fluctuated around the expected ones.

The sensors also had a satisfactory result, and this allowed a good calculation of the p.u. values, vital forthe good execution of the control commands.

Finally, the equivalent R on the DC side allowed to estimate the losses due to the conduction through thesemiconductors. The value, 837 W, can be considered negligible for 400 submodules per arm.

Page 79: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 77

Page 80: Analysis, modelling and simulation of an HVDC converter ...

Chapter 6

Environmental impact of HVDC vsHVAC technology

This chapter will shortly present the consequences for the environment of deploying HVDC vs HVAClinks.

• Power loss:

The energy transmission using HVDC transmission presents less power loss than using HVACtechnology. This is translated into less energy generation for the same power needed. If the poweris generated using non renewable sources, the CO2 emissions is reduced with the HVDC link asless power generated satisfies the same supply needs.

• Visual impact:

HVDC causes less visual impact than HVAC as the stations are smaller and the number of cablesis less. The possibility to use underwater cables also reduces the visual impact.

• Energy transition:

HVDC links play a key role in the energy transition. HVDC allows the integration of renewablesources in the electrical grid. Also, as the losses are lower than using HVAC links, transmission ofpower generated in areas where renewable sources are available can be efficiently distributed overlong distances. Also HVDC is the best system to integrate offshore power generation plants.

• Electric fields:

Electric fields produced by HVDC transmission lines are lower than the electric fields produced byHVAC transmission lines. Investigations performed inCanada andRussia show that the discomforteffects to humans and the effects to vegetation under HVAC are not observed under HVDC lines.

• Underwater cables:

The possibility to use underwater cable in HVDC technology reduces the visual impact but cancreate disorders in the seabed wildlife, it is important to check the best path to reduce the negativeeffects on marine ecosystems.

78

Page 81: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 79

Page 82: Analysis, modelling and simulation of an HVDC converter ...

Chapter 7

Project cost

Labour costs:

Afixed labour cost of 12 €/ho has beenfixed for the research, analysis andwriting of the project, assumingthat all tasks are important to complete the objective.The labour cost for simulation has been fixed at 5€/hour, as other tasks can be realized while waiting for the simulation to be executed.

The research includes the timededicated to discoveringOpenModelica, which needs an important amountof hours as information regarding the features related to parallelization has been difficult to collect; it alsoincludes the time dedicated to the gathering of information related to the HVDC links and its converters.

The analysis includes the study of the different parts of the model and the results of the simulations.

The simulation includes the hours dedicated to executing the simulation, assuming that other tasks canbe done during the waiting time.

The writing includes the time dedicated to the writing of the thesis, including the hours used to thinkthe structure of the report.

Licences cost:

As this project was developed using OpenModelica, extracting information from sources freely availableand redacted using Overleaf LaTeX editor, the licences costs are zero.

This could have been different if a comparison was made between the results using OpenModelica andthe results using the samemodel on another reliable non free software such as Dymola, a software usingthe Modelica language and developed by Dassault Systèmes.

Material cost:

In order to realize the project a relatively modern computer is needed. The computer is not exclusivelybought for this project, and its lifetime surpasses the time dedicated to the thesis. So, the computer costhas been calculated estimating a life expectancy of 6 years, the duration of the project being 5 months,and the price of the computer being 600 €.

Energy cost:

The energy cost includes the internet connection and the electricity supply, and is estimated of around0.04 €/hour.

80

Page 83: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 81

Total cost:

Concept Time [hours] Cost [€]Research 110 1320Simulation 15 75Analysis 90 1080Writing 60 720

Computer - 42Energy - 128

TVA (21%) - 707TOTAL - 4071

Page 84: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 82

Page 85: Analysis, modelling and simulation of an HVDC converter ...

Chapter 8

Conclusions

The initial goal of this project was to discover how to model and simulate components of an electricalgrid using parallel computing with OpenModelica, but the several complications faced during the de-velopment of it modified the objective.

The objective of simulating in parallel components of an electrical grid has not been achieved in order tospeed up the simulations has not been achieved. Two approaches to parallelization are presented in thethesis, the co-simulation using TLM technique (Section 2.3.2) and the automatic parallelization usinghpcom flags (Section 2.3.1). The first one was not successful as the modelling was not completed dueto errors appearing when trying to connect the submodels. The second approach was tried and gaveno errors, but was useless as the simulation time was much bigger using parallel computing than serialsimulation. So, from a user’s point of view, the parallel execution of simulations using OpenModelicais not reliable, and the program features must be developed and perfected to be considered ready foracademic use.

The objective of discovering OpenModelica and simulating aMMC converter and a HVDC link has beenachieved with satisfactory results. The model, developed by Mohammed Ahsan Adib Murad and LuigiVanfretti and presented in the 12th International Modelica Conference, was downloaded from https://github.com/. Its parts are analyzed and the behaviour, despite some instabilities, is satisfactory inoverall. Different simulations have been executed with similar results, and OpenModelica offers reliableresults.

Finally, it is important to highlight the lack of clear explanations regarding some Modelica features, asthe program is not widely used in the engineering academic domain. The research has not been easy, asno easy tutorials were found and the learning was based on try and failure. As no complete blocks weredisponible in Modelica Standard Library, all the components of the model were composed of basic Mod-elica elements, adding difficulties to the project development and the stability and successful simulationof the model.

The overall balance is satisfactory, even if the difficulties limited the scope of the project.

83

Page 86: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 84

Page 87: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 85

AcknowledgementsEn primer lloc vull agrair a tothom qui m’ha acompanyat durant els anys a la universitat, amistats i partdel professorat que ha demostrat una preocupació real pel desenvolupament dels estudiants com a futursenginyers i com a persones. Cal agraïr també a totes les treballadores de la universitat per fer que aquestfos un camí més planer.

Vull enviar un agraïment especial a l’Assemblea d’Estudiants que ha defensat els meus drets i els delsestudiants sempre que ha calgut i que, amb els seus encerts i errors, ha estat una font d’aprenentatge icreixement constant.

També vull agraïr a l’Altre Fòrum per haver-me permès descobrir una altra enginyeria, la que posa lavida al centre i té un enorme poder transformador.

Finalment, vull agraïr a la meva família per haver-me donat l’oportunitat d’estudiar i haver-me empèsa dubtar de les coses, a formar-me com a ciutadà crític i a qüestionar l’estat de les coses, tant quan hemcoincidit en opinions com quan aquestes han estat contràries.

Page 88: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 86

Page 89: Analysis, modelling and simulation of an HVDC converter ...

Bibliography

[1] Mohammed Ahsan AdibMurad, Luigi Vanfretti, AModelica VSC-HVDCAverage Value Model Imple-mentation and its Software-to-Software Validation using an EMT Power System Domain Specific Simulator,May 2017, 12th International Modelica Conference

[2] Robert W. Erickson, Dragan Maksimovic, Fundamentals of power electronics, second edition, 2001,Kluwer Academic Publishers

[3] Abhishek Kumar, D. M. Akbar Hussain, HVDC (High Voltage Direct Current) Transmission System:A Review Paper, July 2018, Gyancity Journal of Engineering and Technology

[4] National Programme onTechnology Enhanced Learning, Electrical - HighVoltageDCTransmission,12th July 2012, https://www.youtube.com/playlist?list=PL4B78E9972172086A (list)

[5] A. Beddard, M. Barnes, Modelling of MMC-HVDC Systems – An Overview, 2015, 12th Deep Sea Off-shore Wind RD Conference, EERA DeepWind’2015

[6] Fernando Martinez-Rodrigo, Dionisio Ramirez, Alexis B. Rey-Boue, Santiago de Pablo and LuisCarlos Herrero-de Lucas, Modular Multilevel Converters:Control and Applications, 26 October 2017,MDPI Journals

[7] OpenModelica User’s Guide, release v1.14.1, 30th December 2019, Open SourceModelica Consortium

[8] OpenModelica Compiler Flags, 2016, Open Source Modelica Consortium

[9] Transmission Line Modeling (TLM) Based Co-Simulation, 2017, Open Source Modelica Consortium

[10] TLMSimulator: A framework for composite modelling and co-simulation, 2017, Open Source ModelicaConsortium

[11] Peter Fritzson, Introduction to Object-Oriented Modeling and Simulation with Modelica Using Open-Modelica , 2012, OpenModelica tutorial

[12] Martin Sjölund, Mahder Gebremedhin, Peter Fritzson, Parallelizing Equation-Based Models for Sim-ulation on Multi-Core Platforms by Utilizing Model Structure, 2013, Department of Computer and In-formation Science, Linköping University, Sweden

[13] Marcus Walther, Volker Waurich, Christian Schubert, Dr.-Ing. Ines Gubsch, Equation based par-allelization of Modelica models, 2013, Department of Computer and Information Science, LinköpingUniversity, Sweden

[14] Peter Fritzson, The Modelica Language and Technology for Model-Based Development, 28th March 2012,

87

Page 90: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 88

Department of Computer and Information Science, Linköping University, Sweden

[15] ABB, HVDC : una tecnología para la eficiencia energética y la fiabilidad de las redes, ABB document

[16] Kamran Sharifabadi, Lennart Harnefors, Hans-Peter Nee, Staffan Norrga, Remus Teodorescu,Design, Control and Application of Modular Multilevel Converters for HVDC Transmission Systems, 2016,SemanticsScholar

[17] Cebrián Illana, Sandra, Diseño y control de un convertidor modular multinivel para transmisión de en-ergía eléctrica en corriente continua de alta tensión desde un parque eólico marino, 2018, Universidad deValladolid

[18] U.N. Gnanarathn, S.K. Chaudharyt, A.M. Gole, and R. Teodorescu,Modular Multi-level Converterbased HVDC system for grid connection of offshore wind power plant, 2010, 9th IET International Con-ference

[19] Fei Chang,1Zhongping Yang, Yi Wang, Fei Lin, and Shihui Liu, Characteristics and Control Strategiesof Multiterminal High Voltage Direct Current Transmission Based on Modular Multilevel Converter, 2015

[20] Valentin Oleschuk, Gabriele Grandi, Algorithms, Schemes and Techniques of Space-Vector Modulationfor Dual-Inverter Systems with Symmetrical Multilevel Phase Voltage, 2012

[21] High-voltage direct current, Wikipedia article (English)

[22] HVDC converter, Wikipedia article (English)

[23] Three phase rectification tutorial, https://www.electronics-tutorials.ws/power/three-phase-rectification.html (English)

Page 91: Analysis, modelling and simulation of an HVDC converter ...

Analysis, modelling and simulation of an HVDC converter using OpenModelica pàg. 89