Citation
Accelerating detailed simulations of an HVDC system based on modular multilevel converters in a multi-core environment

Material Information

Title:
Accelerating detailed simulations of an HVDC system based on modular multilevel converters in a multi-core environment
Creator:
Wang, Xiaodan ( author )
Language:
English
Physical Description:
1 electronic file (81 pages) : ;

Subjects

Subjects / Keywords:
Automatic control -- Data processing ( lcsh )
Electric power distribution -- Direct current ( lcsh )
Genre:
bibliography ( marcgt )
theses ( marcgt )
non-fiction ( marcgt )

Notes

Review:
The topology of the Modular Multilevel Converter (MMC) was introduced in 2001. The MMC topology is well suited for the High Voltage Direct Current (HVDC) system. The MMC-HVDC topology has several advantages over other topologies: (i) it is based on simple converter cells, (ii) it has easy voltage and current scaling, (iii) it features distributed capacitive energy storage, (iv) it oers straightforward protection schemes, (v) it has low switching frequency and losses. However, the simulation speed of a detailed MMC model in an HVDC system is slow due to the computational burden. In this thesis, with the help of PSCAD/EMTDC, a new approach in a multi-core CPU environment has been implemented to speed up the simulations of the HVDC system based on the MMC topology. This approach is evaluated by comparing results with a single-core average model, a single-core detailed model and a eight-core detailed model. This thesis also includes an analysis selecting the best sorting algorithm.
Bibliography:
Includes bibliographic references,
System Details:
System requirements: Adobe Reader.
General Note:
Department of Electrical Engineering
Statement of Responsibility:
by Xiaodan Wang

Record Information

Source Institution:
|University of Colorado Denver
Holding Location:
Auraria Library
Rights Management:
All applicable rights reserved by the source institution and holding location.
Resource Identifier:
921892156 ( OCLC )
ocn921892156
Classification:
LD1193.E54 2015m W36 ( lcc )

Downloads

This item has the following downloads:


Full Text
ACCELERATING DETAILED SIMULATIONS OF AN HVDC SYSTEM
BASED ON MODULAR MULTILEVEL CONVERTERS IN A MULTI-CORE
ENVIRONMENT
by
XIAODAN WANG
B.S., Beijing Technology and Business University, 2010
A thesis submitted to the
Faculty of the Graduate School of the
University of Colorado in partial fulfillment
of the requirements for the degree of
Master of Science
Electrical Engineering
2015


This thesis for the Master of Science degree by
Xiao dan Wang
has been approved for the
Electrical Engineering Program
by
Fernando Mancilla-David, Chair
Titsa Papantoni
Dan Connors
June 18, 2015
n


Wang, Xiaodan (Electrical Engineering)
Accelerating Detailed Simulations of an HVDC System Based on Modular Mul-
tilevel Converters in a Multi-core Environment
Thesis directed by Professor Fernando Mancilla-David
ABSTRACT
The topology of the Modular Multilevel Converter (MMC) was introduced
in 2001. The MMC topology is well suited for the High Voltage Direct Current
(HVDC) system. The MMC-HVDC topology has several advantages over other
topologies: (i) it is based on simple converter cells, (ii) it has easy voltage
and current scaling, (iii) it features distributed capacitive energy storage, (iv) it
offers straightforward protection schemes, (v) it has low switching frequency and
losses. However, the simulation speed of a detailed MMC model in an HVDC
system is slow due to the computational burden.
In this thesis, with the help of PSCAD/EMTDC, a new approach in a
multi-core CPU environment has been implemented to speed up the simulations
of the HVDC system based on the MMC topology. This approach is evaluated
by comparing results with a single-core average model, a single-core detailed
model and a eight-core detailed model. This thesis also includes an analysis
selecting the best sorting algorithm.
m


The form and content of this abstract are approved. I recommend its publication.
Approved: Fernando Mancilla-David
IV


DEDICATION
This thesis is dedicated to my family and my girlfriend who have supported me
all the way since the beginning of my studies. They provide me with a great
source of motivation and inspiration. Finally, this thesis is dedicated to all those
who believe that knowledge is power.
v


ACKNOWLEDGMENT
I would like to express my deepest gratitude to my advisor, Professor Fer-
nando Mancilla-David, for his excellent guidance, care, patience, and for pro-
viding me with an excellent environment for doing research.
I greatly appreciate Professors Titsa Papantoni, and Professor Dan Con-
nors for forming part of my dissertation defense committee. Finally, I would
like to thank my family; they were always there cheering me up and stood by
me through the good and bad times.
I also want to thank Phd student Miguel Carrasco for his tips on my simu-
lation modeling and thesis arrangement.
vi


CONTENTS
Figures .............................................................. ix
Tables............................................................... xii
Chapter
1. Introduction........................................................ 1
2. Power stage......................................................... 3
2.1 Design parameters................................................. 4
2.2 Average model .................................................... 8
2.3 Detailed model.................................................... 9
3. Control scheme..................................................... 13
3.1 Rectifier and inverter control .................................. 14
3.2 Leg energy control............................................... 16
3.3 Modulation....................................................... 16
3.3.1 Control of the average model................................... 18
3.3.2 Control of the detailed model.................................. 19
4. Sorting algorithm.................................................. 25
4.1 Insertion sort................................................... 25
4.2 Quick sort....................................................... 26
4.3 Merge sort....................................................... 27
4.4 Performance test................................................. 27
4.4.1 MATLAB based tests ............................................ 27
vii


4.4.2 PSCAD/EMTDC based tests................................. 28
5. Implementation of the detailed model in a multi-core environment . 34
6. Simulation results............................................... 40
6.1 Test case 1 40
6.1.1 Average model test in the one-core CPU environment........... 40
6.1.2 Detailed model test in the one-core CPU environment ......... 42
6.1.3 Detailed model test in the eight-core CPU environment..... 44
6.2 Test case 2 46
6.2.1 Average model test in the one-core CPU environment........... 46
6.2.2 Detailed model test in the one-core CPU environment ......... 48
6.2.3 Detailed model test in the eight-core CPU environment..... 50
6.3 Test case 3 51
6.4 Comparative evaluation ........................................ 52
6.5 Simulation speed versus SMs number............................. 53
7. Conclusions...................................................... 56
8. Future work...................................................... 57
References.......................................................... 58
Appendix
A. FORTRAN codes for the detailed model............................. 60
viii


FIGURES
Figure
2.1 Schematic of the HVDC back-to-back system........................... 3
2.2 (a) Structure of a SM; (b) series connection of a number of SMs
constituting an arm; (c) converter composed of three legs one for
each phase.................................................... 4
2.3 Overview of the HVDC system in PSCAD................................ 6
2.4 Average model arm................................................... 9
2.5 Detailed model arm................................................. 10
2.6 Submodule at on-state or off-state................................. 11
2.7 The MMC with average or detailed arm............................... 12
3.1 PSCAD control panel................................................ 13
3.2 Overview of the control strategy................................... 14
3.3 Current controller................................................. 15
3.4 Leg energy controller for each phase............................... 16
3.5 Per-phase modulation index computation............................. 17
3.6 Arm in the average model........................................... 19
3.7 Arm in the detailed model.......................................... 20
3.8 Different stairs-V comparison with sinusoidal-V.................... 21
3.9 Flowchart of the voltage balancing algorithm....................... 23
4.1 PSCAD based algorithms validation test input plot............... 29
4.2 PSCAD based algorithms validation test output................... 29
IX


4.3 PSCAD based algorithms validation test switching array................ 30
4.4 PSCAD based algorithms validation test trigger........................ 30
4.5 PSCAD based algorithms validation test output with N-check. . 31
4.6 PSCAD based algorithms validation test switching array................ 31
5.1 CPU monitor in task manager for ENI................................... 34
5.2 CPU monitor in task manager for single core........................... 35
5.3 ENI detailed model.................................................... 36
5.4 ENI circuit in Parti.................................................. 37
5.5 ENI circuit in Part2.................................................. 38
6.1 WEST MMC active power and reactive power.............................. 41
6.2 EAST MMC active power and reactive power.............................. 41
6.3 DC link Voltage....................................................... 41
6.4 Synthesized voltage Va Vb Vc.......................................... 42
6.5 WEST MMC active power and reactive power.............................. 42
6.6 EAST MMC active power and reactive power.............................. 43
6.7 DC link Voltage....................................................... 43
6.8 Synthesized voltage Va Vb Vc.......................................... 43
6.9 WEST MMC active power and reactive power.............................. 44
6.10 EAST MMC active power and reactive power............................. 44
6.11 DC link Voltage...................................................... 45
6.12 Synthesized voltages Va Vb Vc........................................ 45
6.13 Voltage of 12 SMs.................................................... 46
6.14 WEST MMC active power and reactive power............................. 47
6.15 EAST MMC active power and reactive power............................. 47
x


6.16 DC link Voltage..................................................... 47
6.17 Synthesized voltage Va Vb Vc........................................ 48
6.18 WEST MMC active power and reactive power............................ 48
6.19 EAST MMC active power and reactive power............................ 49
6.20 DC link Voltage..................................................... 49
6.21 Synthesized voltage Va Vb Vc........................................ 49
6.22 WEST MMC active power and reactive power............................ 50
6.23 EAST MMC active power and reactive power............................ 50
6.24 DC link Voltage..................................................... 51
6.25 Synthesized voltages Va Vb Vc....................................... 51
6.26 Synthesized voltages Va Vb Vc(Nsm=36)............................... 52
6.27 Synthesized voltages Va Vb Vc(Nsm=108).............................. 52
6.28 Transmission line and 7r-structure.................................. 53
6.29 Simulation time curve............................................... 55
xi


TABLES
Table
2.1 Design parameters................................................ 8
3.1 Phase voltage in terms of N....................................... 22
4.1 MATLAB based algorithms speed test results........................ 28
4.2 PSCAD based algorithms validation test input.................... 28
4.3 PSCAD based algorithms speed tests input arrays................. 32
4.4 PSCAD based algorithms speed test results....................... 33
6.1 Simulation time versus Submodule number on each arm................. 54
xii


1. Introduction
A new High Voltage Direct Current (HVDC) transmission technology based
on the Modular Multilevel Converter (MMC) topology has been introduced in
recent years. In this topology, the converter arm behaves as a controllable
voltage source with a high number of possible discrete voltage steps, which
together can produce close to a true sinusoidal voltage in the AC terminal [1].
MMC topology enables using a smaller switching frequency to reduce converter
losses and eliminates the filter requirements by using a significant number of
levels per arm [2]. Nowadays, there are five MMC-HVDC projects in progress
in Europe [3] [4].
In the following thesis, the basics of the MMC-HVDC technology is ex-
plained in Section 1; the power stage design is shown in Section 2; the control
strategies are shown in Section 3; the sorting algorithm is shown in Section 4;
the multi-core simulation approach is shown in Section 5; the simulation results
are shown in Section 6; the conclusions are shown in Section 7; the future work
is shown in Section 8.
The advantages of the MMC-HVDC technology are summarized in [5, 6, 7]:
AC voltages can be adjusted in very fine increments and a DC voltage with
very little ripple can be achieved, this minimizes the level of generated
harmonics and in most cases completely eliminates the need for AC filters.
The low switching frequency of the individual semiconductors results in
very low switching losses. Total system losses are therefore relatively low,
1


and the efficiency is consequently higher than existing two- and three-level
solutions.
Due to the elimination of additional components such as AC filters and
their switchgear, high reliability and availability can be achieved.
Through a highly modular construction both in the power section and
in control and protection, the system is very scalable, (i.e. conveniently
adaptable to any required power and voltage ratings.)
With respect to later provision of spare-parts, it is easy to replace existing
components by state-of-the-art ones, since the switching characteristics
of each power module are determined independently of the behavior of
the other power modules. This is an important difference to the direct
series-connection of semiconductors as in the two-level technology where
nearly identical switching characteristics of the individual semiconductors
are mandatory.
Independent control of active and reactive power. As a consequence, no
reactive power compensation equipment is needed at the station.
Possibility to connect the system to a weak ac network or even to one
where no generation source is available and the short-circuit level is very
low.
It can provide a variety of ancillary services to the interconnected ac sys-
tems, such as harmonic and unbalanced voltage compensation, flicker elim-
ination, etc.
2


2. Power stage
In a back-to-back configuration, two converters are connected by a DC fink
capacitor, as shown in Figure 2.1. Each converter can independently synthe-
size a sinusoidal voltage at its terminals. These voltages can be defined by
their amplitudes (Vi, V2) and phase angles (di, 92). Active power injections
depend mainly on phase angles, while reactive power injections depend on the
amplitudes of the synthesized voltages. The MMC topology allows independent
control of the voltage amplitudes Ifi and V2. Therefore, reactive power injections
on both sides can be controlled independently. However, phase angles (di, 92)
need to be controlled in such a way that the active power being transmitted
by one converter equals the active power transmitted by the other converter in
steady state to keep the energy of the DC link constant.
Figure 2.1: Schematic of the HVDC back-to-back system.
The basic component of the MMC converter is a simple half bridge with a
capacitor called power submodule (SM), as shown in Figure 2.2(a). With the
two power electronic switches, an SM can generate two output voltages, zero, or
3


the voltage of the capacitor. An SM has bidirectional current capability. The
capacitor can be charged or discharged depending on the direction of the arm
current [8] [9]. The series connection of a number of SMs constitutes an arm, as
shown in Figure 2.2(b). In the converter there are three legs, one for each phase.
A converter leg is composed of an upper and a lower arm. Figure 2.2(c) shows
the structure of the converter. The number of the output steps depends on the
number of SMs available in each arm. By connecting enough SMs in series, no
AC filters will be necessary. In the TransBay Cable Project, Siemens used more
than 200 SMs per converter arm. As a result, the synthesized voltage profile is
very close to sinusoidal [1].
(b)
Figure 2.2: (a) Structure of a SM; (b) series connection of a number of SMs
constituting an arm; (c) converter composed of three legs one for each phase.
2.1 Design parameters
Figure 2.3 shows the overview of the HVDC system implemented in PSCAD.
Each converter consists of three legs. In turn, each leg is composed by two arms,
and each arm is electrically connected with a certain number of SMs in series.
Since the MMC topology belongs to the VSC family, a DC link capacitor is
4


needed. Both converters are connected to the grid through a circuit breaker.
The initial state of both breakers are open, and they will close after all SMs are
fully charged. The nominal power is 110 MW. The selected DC voltage is 200
kV. The number of SMs per arm was chosen to be 36 by heuristics because there
is a trade of between the computational complexity and the harmonics content
on the synthesized voltage.
5


Ibus
IVfein: C...
05
crq'
C
i-S
CD
fcO
w
O
i-j
<'
cd
3
o
I-+J
<
o
o
CD
B
B
u
m
O
>
O


The primary side of the transformer is rated at 230 kV with a grounded Wye
connection and the secondary side is rated at 180 kV with a delta connection,
considering the DC link voltage 200 kV. A leakage reactance of 10% is selected
as a typical value of this rated power.
The insulated-gate bipolar transistors (IGBTs) in each SM are selected ac-
cording to their voltage blocking and maximal current conduction capabilities.
The voltage blocking capability needs to reach Vb=400/36=11.1 kV and a max-
imum forward current of 1.2 kA. The resistance of the selected IGBT is 1 mfl,
therefore, the total resistance of each arm is 36 mQ. The capacitance of each
SM may be obtained by the following equation [10]:
_2SEmmc
6i\UWc2
where S is the nominal power of the converter, Ammo is the capacitors storage
energy in [KJ/MVA], NaTni is the number of the SMs in each arm, and 1% is the
SM nominal voltage.
With a storage energy of 331^^- [5], combining all the known parameters
in the equation, the capacitance is found to be 16.4 mF. The arm inductance,
Ls, has been selected as 15% of the systems base impedance, as shown in the
following equation [10].
Ls = 0.15-Zg = 0.11727/
All system parameters are summarized in the Table 2.1.
7


Table 2.1: Design parameters.
West AC System
Bus Voltage East (kV) 230
Thevenin Equivalent Impedance (H) 0.1132
West Transformer
Primary Voltage (kV) 230 (Y)
Secondary Voltage (kV) 180 (A)
Power Rating (MVA) 133
Leakage Reactance (pu) 0.1
West MMC
Number of SMs per arm 36
Number of IGBTs per SM 2
IGBT blocking capability (kV) 15
IGBT maximal forward current (kA) 3
IGBT resistance (mQ) 1
SM Capacitor (mF) 14.6
Arm inductance (H) 0.1172
DC Link Capacitor
Capacitance (fiF) 0.5
Rated voltage (kV) 400
East MMC
Number of SMs per arm 36
Number of IGBTs per SM 2
IGBT blocking capability (kV) 15
IGBT maximal forward current (kA) 3
IGBT resistance (mQ) 1
SM Capacitor (mF) 14.6
Arm inductance (H) 0.1172
East Transformer
Primary Voltage (kV) 230 (Y)
Secondary Voltage (kV) 180 (A)
Power Rating (MVA) 133
Leakage Reactance (pu) 0.1
East AC System
Bus Voltage West (kV) 230
Thevenin Equivalent Impedance (H) 0.2598
2.2 Average model
To validate the detailed model simulations, the average model is imple-
mented first. In the average model, each arm is presented by an equivalent
8


voltage source, and the calculation is shown in Section 3. The series resistance
and inductance in each average arm is 36 mil and 0.117 H, respectively. One
arm in the average model is shown in Figure 2.4.
Average Vout
Arm
Nin
Figure 2.4: Average model arm.
2.3 Detailed model
In the detailed model, each arm has a series connection of a certain number
of SMs. The control on the SMs will be explained in Section 3. One arm in the
detailed model is shown in Figure 2.5.
9


Detailed Vout
Arm
Nin
Figure 2.5: Detailed model arm.
It is worth noting that the arm inductance and resistance of both models
are same. In the detailed model, the diodes and the IGBTs have the same
resistance. As shown in Figure 2.6, in both on and off states of the SMs, the
arm resistance remains constant, (i.e. the total resistance is a constant 36 mQ).
10


Capacitor off-state Capacitor on-state
3 3 c 3 3 c

3 3 c 3 3 r^c

Figure 2.6: Submodule at on-state or off-state.
Finally, the WEST and EAST MMC are modified with either average or
detailed arm, as shown in Figure 2.7.
11


Figure 2.7: The MMC with average or detailed arm.
DC 1
DC 2
12


3. Control scheme
The overall operation of the converters is directed by the control panel as in
Figure 3.1. The references can be set in this control panel, including the active
and reactive power of the rectifier side, the reactive power of the inverter side
and the active power flow direction.
Control Panel _
Ramp Power direction Qwest Qeast
100 20
1.66667
-no
-20
A
A
East West
_0
-20
40
10
-20
Figure 3.1: PSCAD control panel.
Depending on the active power flow direction, one of the converter stations
will act as a rectifier and the other one will act as an inverter. For instance, if
power is flowing from the WEST MMC to the EAST MMC, the east converter
will act as the inverter and the west converter will act as the rectifier [11].
13


Figure 3.2: Overview of the control strategy.
Figure 3.2 shows the overall control strategy. Through the ABC-to-DQ
transformation, the active and reactive power references are transformed to DQ
current references an fed to the current controller. The current and energy
controllers then work together to generate the modulation index, N, for each
arm in both converters [12] [13].
3.1 Rectifier and inverter control
The difference between the rectifier and the inverter is the active power
reference generator. In the rectifier, the active power reference and the reactive
power reference are coming directly from the control panel. In the inverter, the
reactive power reference is coming from the control panel, however, the active
power reference is generated by the DC link voltage control.
Following the active and reactive power generators, the power references are
transferred to current references with the ABC-to-DQ transfer. The ABC-to-DQ
14


transformation is based on the following equations:
3
P = ^{vdid + vqiq),
3
Q = + vqid).
The Phase Lock Loop(PLL) forces vq = 0, which will simplify the above
equation set to be:
-Fref ^TdFd_ref)
3
Qref ^^dFqj-ef-
Following the power-to-current transformation, reference current and actual
current are compared to generate an error, and the error is driven to zero with
the help of two decoupled compensators. Aiagram of this process is shown in
Figure 3.3. The output signals of the current controller, Ea, Eb and Ec, will be
used as input signal in the modulation in Section 3.3.
wL
wL
Figure 3.3: Current controller.
15


3.2 Leg energy control
The leg energy control is built to balance the three phase voltages and reduce
the circulating current. The energy on each leg is a function of the upper and
lower arm voltages. In other words, the leg energy will be stable if the leg voltage
is fixed, and the three phases will be balanced.
Diffi = (ITLref Wi)(Ki + Kp-s) i = a,b, c,
where W\ = Vh;_eq + V^_eqz = a, b,c.
The leg energy controller is shown in Figure 3.4.
Figure 3.4: Leg energy controller for each phase.
3.3 Modulation
The instantaneous voltage of each arm is determined by the modulation
index N. In the average model, N is in the range of 0 to 1. When N equals 0,
16


all SMs are disconnected, and when N equals 1, all SMs are connected. For the
upper and lower arm in each leg, the modulation indexes are computed as:
Niap = ( % E{ UdmA
V!
i = a,b,c
iu_eq
iVilow = + Ei- Uditu J i = a,b,c
_eq
where Vdc is the DC link voltage, E-x is AC terminal voltage to be synthesized
which is determined by the current controller, and t/dao is the output of the
leg energy controller. At any point in time the sum of the upper and lower
modulation indexes in an arm is one:
Arup + N\ow 1
A diagram of the modulation index computation for one leg is shown in
Figure 3.5.
Figure 3.5: Per-phase modulation index computation.
17


3.3.1 Control of the average model
The arm equivalent capacitance is:
and the arm voltages are:
a
eq
Csm
n
K,
tup

ilow
harm jup ^up_i ^
harm Jlow -^low_i ^
a, b, C
- a,b,c
where Krm_iup and KrmJiow are the equivalent voltages of the upper arm and the
lower arm. Combining the three equations above, the T4rm_iup and KrmJiow are:
^armJup j Nupi i = a,b,c
^arm-ilow j f -Alow ,, 1 ceq dt i = a, b, c
-'Pov.-
Based on these equations, the average arm can be modeled as shown in Figure
3.6.
18


Figure 3.6: Arm in the average model.
3.3.2 Control of the detailed model
The detailed model arm is shown in Figure 3.7.
19


Figure 3.7: Arm in the detailed model.
In the detailed model, the modulation index needs to be multiplied by the
number of the SMs in each arm. As a result, the modulation index of the detailed
model is an integer in the range of 0 to 36. In general, the number of the levels
is equal to one plus the number of the SMs. It is also worth noting that the
number of SMs has to be even, otherwise the 0 kV level cannot be achieved.
20


Figure 3.8: Different stairs-V comparison with sinusoidal-V.
Three voltage curves with different number of SMs (N) per arm (N=4, N=8,
N=12) are generated as shown in Figure 3.8. It is apparent that as the number
increases, the voltage profile becomes closer to sinusoidal. In the detailed model
simulations, the magnitude of the stepwise curve equals the number of the SMs
in each arm [14].
Assuming there are N SMs in each arm, to satisfy Kirchhoffs Voltage Law
(KVL), the synthesized voltage on phase A needs to fit both upper arms and
lower arms voltage drop, as in the following equations:
Va
K
N
dc/2 upper armVsm
~^dcj~^ I AlowerarmVi
sm
AT-

Solving the above equations set, Vsm equals Vdc/N. Assuming four SMs, Va
would take values as shown in Table 3.1.
21


Table 3.1: Phase voltage in terms of N.
N(upper) N (lower) Va(upper KVL) Va (lower KVL)
4 0 Kfc/2 4Vsm = Vdc/2 ~Vdc/2 + OVCre = Vdc/2
3 1 Vdc/2 3Vsm = Vdc/4 Vdc/2 + lVsm = Vdc/4
2 2 Vdc/2 2Vsm = 0 ~Vdc/2 + 2Vsm = 0
1 3 Vdc/2 IVsm = Vdc/4 Vdc/2 + 3Vsm = Vdc/4
0 4 Vdc/2 0Vsm = Vdc/2 Vdc/2 + 4Vsm = Vdc/2
Va is in the range of -Vdc/2 to +Vdc/2 by steps of Vdc/4. However, the
size of every step may be different without control. To equalize all the steps,
the SMs voltage balancing algorithm is introduced.
In the following discussion, the term ON signifies that one SM gives the
Capacitor voltage (Vc) as the output voltage, and OFF signifies that a sub-
module gives 0 kV as the output voltage. The number of SMs on and off is in
the range of 0 to 36. Also, N(t) refers to the number of the submodules in the
ON state in the upper arm of one phase leg at time t.
The SMs voltages are balanced by turning ON or OFF SMs depending on the
current flow directions. N(t) SMs with lower capacitor voltages will be turned
ON when the arm current flow is charging the capacitors, and OFF when the
arm current flow is discharging them. A flowchart of SMs voltage balancing is
shown in Figure 3.9 [15] [16].
22


( Switching Array ) Switching process
Figure 3.9: Flowchart of the voltage balancing algorithm.
There are three inputs: (i) N(t), (ii) Id(current direction) and (iii) V(array,
for all SMs). The voltage balancing controller will receive data from all the
inputs during the simulations, then, the data of V(array) will be listed in a table
along with their labels VLB(array). Next, the table of V(array) and VLB(array)
will be sorted into ascending sequence, and finally, the switching signals T(array)
will be generated based on N(t), I, and the sorted table generated in step three
of Figure 3.9. Combined with the voltage balancing control, the detailed arm is
built as shown in Figure 3.7.
23


Also, to accelerate the simulation, the sorting process will only be triggered
when N(t) changes [15]. This will reduce the sorting process frequency and the
results will be acceptable if the SMs number is high enough to avoid using filters.
The process of checking whether N(t) changes in the processing time interval
will be notified as N-check in this thesis.
24


4. Sorting algorithm
The sorting algorithm has been selected from three candidates in order to
improve the simulation speed. Three sorting algorithms are evaluated both in
MATLAB and PSCAD. The computing time is matching the computational
complexity (big O notation) in terms of the size of the list(N). The candidate
sorting algorithms are:
Insertion Sort
Quick Sort
Merge Sort.
4.1 Insertion sort
Insertion sort is an iterative algorithm which removes one element from the
input data each iteration and adds it to the correct lovation in a sorted output
list. This process repeats until no input elements remain [17].
The best case input is an array that is already sorted. In this case insertion
sort has a linear running time O(n). During each iteration, the first remaining
element of the input is only compared with the right-most element of the sorted
subsection of the array.
The simplest worst case input is an array sorted in reverse order. The set of
all worst case inputs consists of all arrays where each element is the smallest or
second-smallest of the elements before it. In these cases every iteration of the
25


inner loop will scan and shift the entire sorted subsection of the array before
inserting the next element. This gives insertion sort a quadratic running time
0(n2).
The average case is also quadratic, which makes insertion sort impractical
for sorting large arrays. However, insertion sort is one of the fastest algorithms
for sorting very small arrays, even faster than quick sort. In fact, good quick
sort implementations use insertion sort for arrays smaller than a certain thresh-
old, also when arising as subproblems; the exact threshold must be determined
experimentally and depends on the machine, but is commonly around ten [18].
4.2 Quick sort
Quick sort is a divide and conquer algorithm. Quick sort first divides a
large array into two smaller sub-arrays: the low elements and the high elements.
Quick sort then recursively sorts the sub-arrays [19] [20].
The steps of quick sort are:
1. Pick an element as a pivot from the array. 2. Reorder the array so that
all elements with values less than the pivot are placed before the pivot, while all
elements with values greater than the pivot are placed after it (equal values can
go either way). After this partitioning, the pivot is in its final position, which
is called the partition operation. 3. Recursively apply the above steps to the
sub-array of elements until the sub-array contains one element.
Quick sorts divide-and-conquer formulation makes it amenable to paral-
lelization using task parallelism. The partitioning step is accomplished through
the use of a parallel prefix sum algorithm to compute an index for each array
element in its section of the partitioned array. Given an array of size n, the
26


partitioning step performs O (n) work in O (logn) time and requires 0(n) addi-
tional scratch space. After the array has been partitioned, the two partitions
can be sorted recursively in parallel. Assuming an ideal choice of pivots, parallel
quick sort sorts an array of size n in O(nlogn) work in O(log2n) time using O(n)
additional space.
4.3 Merge sort
Merge sort is an 0 (nlogn) comparison-based sorting algorithm. Merge sort
is also a divide and conquer algorithm used in computer science [19] [20].
The steps of merge sort are:
1. Divide the unsorted list into n sub lists halfway, until each list containing
1 element (a list of 1 element is considered sorted). 2. Repeatedly merge sublists
to produce new sorted sublists until there is only 1 sublist remaining. This will
be the sorted list.
4.4 Performance test
The sorting algorithms are tested both in MATLAB and PSCAD/EMTDC.
Since the tic-toc function is available in MATLAB, a small arbitrarily time
scale is enough for the MATLAB based tests. However, the tic-toc function is
not available in PSCAD, so a longer period of time is necessary to make the
stopwatch reliable for the PSCAD based tests.
4.4.1 MATLAB based tests
Using tic-toc function in MATLAB, these three algorithms computing time
are compared with same input array as shown in Table 4.1.
27


Table 4.1: MATLAB based algorithms speed test results.
Algorithms timel(s) time2(s) time3(s) time4(s) time5(s)
Insertion Sort 0.0531 0.0541 0.0553 0.0562 0.0555
Quick Sort 0.0209 0.0216 0.0213 0.0204 0.0212
Merge Sort 0.0327 0.0351 0.0345 0.0361 0.0342
The quick sort approach is the optimal choice. MATLAB also gives hints
for the sorting algorithm choice in SIMULINK. When the number of elements
in an array is less than or equal to 32, MATLAB recommends the insertion sort,
and when it is greater than 32, quick sort is recommended.
4.4.2 PSCAD/EMTDC based tests
In this section, the three sorting algorithms are tested in PSCAD. The first
test shows how these sorting algorithms work to speed up the voltage balancing
control. To make the sorting process occur frequently, all the six elements of the
input array (to represent a voltage array) are defined to be different from each
other at all times as shown in Table 4.2.
Table 4.2: PSCAD based algorithms validation test input.
Elements Name Element s (Volt age)
V(l) V = 3 sin(2cuf + 60) + 10
V(2) V = 3.5 sin(2u;i + 75) + 10
V(3) V = 2 sin(2u;i + 40) + 10
V(4) V = sin(2u;i + 70) + 10
V(5) V = sin(2u;i + 20) + 10
V(6) V = 2.2 sin(2u4 + 118) + 10
Selecting time interval between Os and 0.035s, the input Voltage array is
shown in Figure 4.1.
28


Figure 4.1: PSCAD based algorithms validation test input plot.
As mentioned in Section 3, without the N-check, the sorted indices will be
as shown in Figure 4.2. Combined with the direction of the arm current flow,
the switching signal T(6) will be as shown in Figure 4.3. In this test, the current
direction, Id, is set to be constantly positive. From T(l) to T(6), again, they
are only switched when N changes. N also decides the number of the SMs to be
ON or OFF. For a positive Id in this test, the SMs with lower voltage will be
switched ON.
Sorted Indices
6.0 - Index(l) |"Index(2) |"Index(3) |"Index(4) |"Index(5) I"lndexf61

510
3.0 -

1.0 -

T o.oooo 0,0050 o.oioo o.oiso 0.0200 0.0250 0,0300 0.0350
Figure 4.2: PSCAD based algorithms validation test output.
29


Figure 4.3: PSCAD based algorithms validation test switching array.
The N-check is realized by delaying N for one simulation time step, and then
comparing N with Ndelay. The sorting process will only be triggered if they are
different, as in Figure 4.4. The sorted indices with N-check will be as shown in
Figure 4.5. The switching signals with N-check will be as shown in Figure 4.6.
N and Ndelay for N-check
6.0
5.0
4.0
3.0
2.0
1.0
0,0
1 Ndelay
N
1 , i 1
r I r i
r i J
I T
ip i 1
n
T (si
0.0000
0,0050
0,0100
0,0150
0.0200 0.0250 0,0300 0,0350
Figure 4.4: PSCAD based algorithms validation test trigger.
30


Sorted Indices
Index(1) Index(2) |Index(3) |Index(4) |"Index(5) Index(61
U.U - _





T fsl o.orioo 0.0050 o.oioo o.oiso 0.0200 0.0250 0.0300 0.0350
Figure 4.5: PSCAD based algorithms validation test output with N-check.
Figure 4.6: PSCAD based algorithms validation test switching array.
Both the quick sort and the merge sort are divide-and-conquer algorithms
and therefore need to be programmed with recursive subroutines. However, the
FORTRAN compiler inside of PSCAD cannot accept recursive subroutines in
programmed blocks. The solution of the recursive programming is to use the
Additional Source hies and link the hies to simulations. In a source hie, the
quick sort and the merge sort subroutines can be programmed recursively. The
quick sort and the merge sort subroutines can be called by the programmed
block in PSCAD, which introduces additional communication time. Therefore,
31


a PSCAD based algorithm speed test is necessary.
Table 4.3: PSCAD based algorithms speed tests input arrays.
Index Array 1 Array 2 Array 3
1 3 sin(2c 2 3.5 sin(2aA + 75) + 10 3.5 sin(2caf + 75) + 10 35
3 2 sin(2c
4 sin(2c 5 sin(2u;f + 20) + 10 sin(2cnt + 20) + 10 32
6 2.2 sin(2cnt + 118) + 10 2.2sin(2o;f + 118) + 10 31
7 7 30 30
8 8 29 29
9 9 28 28

36 36 1 1
Three sorting algorithms are tested with three different input arrays as in
Table 4.3. Array 1 requires least effort to sort (because most of the array is
already in ascending order), and Array3 requires most effort to sort (because it
is in opposite order). Setting the time step to 50 /is, and plot step to 250 /is, the
time to complete a 100 s simulation for three sorting algorithms is summarized
in Table 4.4.
32


Table 4.4: PSCAD based algorithms speed test results.
Algorithms Simulation Simulation Simulation
time(s) for time(s) for time(s) for
Array 1 Array2 Array3
Insertion Sort 53.94 54.17 66.66
Merge Sort 55.69 52.40 54.14
Quick Sort 64.41 54.38 64.41
Regarding 36 elements, Table 4.4 shows that: (i) the insertion sort is the
best for a less-effort sorting situation, (ii) the quick sort speed is not stable,
because it is influenced by the pivot selection too much. In this test, the first
element is selected as the pivot, (iii) the merge sort has good speed in all three
situations.
Therefore, the merge sort is the optimal selection when the communication
time is considered.
33


5. Implementation of the detailed model in a multi-core
environment
Other than the selection of the sorting algorithm, a new approach is imple-
mented to accelerate the simulation on the software side. The new approach is
called Electrical-Network-Interface(ENI) and its from PSCAD/EMTDC.
The concept of the ENI approach splits the project into pieces, and the
computational burden from every piece is assigned to each CPU core of the
computer. As a result, the overall CPU usage can reach 100%, as shown in
Figure 5.1. For a typical simulation, only two cores will do the processing,
so the CPU usage normally acts as shown in Figure 5.2 on a eight-core CPU
computer. There are two requirements for ENI: 64-bit operation system and a
multi-core CPU.
Applications | Processes | Services | Performance | Networking | Users |
CPU Usage
CPU Usage History
Memory
Physical Memory Usage History

IP!
m BBBBBli
Figure 5.1: CPU monitor in task manager for ENI.
34


Applications [ Processes | Services | Performance | Networking | Users |
CPU Usage CPU Usage History
Memory Physical Memory Usage History
Figure 5.2: CPU monitor in task manager for single core.
In order to fully use the CPU, the number of the splitting pieces has to be
one less than the number of the CPU cores, since one core has to be left for
the PSCAD software and windows operations. For example, in a computer with
eight cores, the original project is better to be split into seven pieces. These
seven pieces will be computed in parallel. Therefore, giving each piece an equal
portion of the total work is preferred, so that the cores who finish their tasks
will not have to wait for other cores who have not finished.
The bridge between different pieces for the ENI approach is the transmission
line as shown in Figure 5.3. The original project is split into a simulation set of
seven project pieces, since the computer running the simulation has eight cores.
35


Main Piece
- r~ i T -T -r
Arm \\ Arm i i i i i i Arm Arm Arm Arm
P HRwfjst
PHCwdst
Arm
Arm
I
Arm
Arm
H H
Transmission Line
PHAeast
PHBeast
PHCeast
Arm Arm Arm Arm
k i i
Arm
Piece No. 7
Figure 5.3: ENI detailed model.
After splitting, the main project piece consists of the whole system control,
the grid and the DC link. The other six project pieces comprise two arms,
36


the sorting process, the switching process and all the SMs. In Figure 5.3 all
transmission lines are represented by black solid squares.
The main project piece (Parti) is built as shown in Figure 5.4, and other
pieces (Part2-Part7) are shown as in Figure 5.5. The transmission lines are also
useful for sending and receiving data in between different project pieces. As
seen in Figure 5.4 and 5.5, Parti sends modulation indices to Part2, and Part2
sends arm voltages back to Parti for both upper and lower arms.
Nanw v/i-/ Napw
i
HI

Nbnw f^/,1/ Nbpw

HI
G 7 s- 0
75
-D ^ D
Oi
a- a-
N> U)
id id
3
fD fD
LO U1
d> c ) i
Valw
Va2w
Ncnw
Ncpw
lffTlil
ine2
%
C
F
fN
tf
fO
Vblw
VbW
H
e
5
H
Vclw
BRKdc
Timed
Breaker
Logic
Cbsea@tO
Vc|w
Edc
H
S
to
Figure 5.4: ENI circuit in Parti.
37


Figure 5.5: ENI circuit in Part2.
The ENI approach also raises a new restriction for the simulation step-time.
Since the transmission line is the bridge to connect different pieces, the signal
traveling time needs to be taken into account. PSCAD/EMTDC requires the
simulation step to be equal or smaller than 10% of the signal traveling time.
The capacitive reactance XC of the transmission line can be calculated to avoid
the signal traveling time issue using the following equation:
TS=VCL
where C and L are the capacitance and the inductance of the transmission line,
TS is the maximum simulation time step.
In PSCAD/EMTDC, the transmission line can be set in the Bergeron
Mode to avoid the soil and the transmission tower configuration. Afterward,
using Manual Entry of X, Y, the R(Q/m), XL(Q/m), XC(MQ m) param-
eters are set. To make the transmission line equal to an inductor, it requires
R=0 and XC> oo. However, according to the equation of the time step, the
38


XC is dependent on the XL. This will influence the simulation results, it will be
shown in Section 6.
39


6. Simulation results
Three test cases are built to evaluate the ENI multi-core approach. The
first two test cases include simulations for the single-core average model, the
single-core detailed model and the eight-core detailed model. The third test
case includes simulations for the eight-core detailed model for different number
of SMs per arm.
The simulation results will include the active and reactive power for both
MMC converters, the DC link voltage and the synthesized voltage. Some SM
voltages will also be shown in the detailed model simulation.
6.1 Test case 1
The first test case uses the references as:
DC link voltage reference, Vdcref=400 kV,
WEST MMC active and reactive power reference, PWref=60 MW, QWref=0
MVar,
EAST MMC reactive power reference, QEref=10 MVar.
6.1.1 Average model test in the one-core CPU environment
Figure 6.1 shows the active and the reactive power of the WEST MMC.
Figure 6.2 shows the active and reactive power of the EAST MMC. Figure 6.3
shows the DC link voltage. Figure 6.4 shows the synthesized voltage.
40


WEST MMC active and reactive power
Pwest Owest
h




-f
1

1
100
80
60
40
20
0
-20
-40
-60
T (si
0.0
5.0
10.0
15.0
20.0
25.0
30.0
Figure 6.1: WEST MMC active power and reactive power.
Figure 6.2: EAST MMC active power and reactive power.
DC link Voltage
"Edc



oUU
^ -

in

DU

T (si
0.0
5.0
10.0
15.0
20.0
25.0
30.0
Figure 6.3: DC link Voltage.
41


Figure 6.4: Synthesized voltage Va Vb Vc.
6.1.2 Detailed model test in the one-core CPU environment
Figure 6.5 shows the active and reactive power of the WEST MMC. Figure
6.6 shows the active and reactive power of the EAST MMC. Figure 6.7 shows
the DC link voltage. Figure 6.8 shows the synthesized voltage.
O'
WEST MMC active and reactive power
100
80
60
40
20
0
-20
-40
-60
Pwest Owest


T
-1
T (s)
0.0
5.0
10,0
15.0
20,0
25,0
30.0
Figure 6.5: WEST MMC active power and reactive power.
42


a
1
80
60
40
20
0
-20
-40
-60
-80
-100
T (si
Peast
EAST MMC active and reactive power
1 Oeast



o.o
5.0
10.0
15.0
20.0
25.0
30.0
Figure 6.6: EAST MMC active power and reactive power.
Figure 6.7: DC link Voltage.
Figure 6.8: Synthesized voltage Va Vb Vc.
43


6.1.3 Detailed model test in the eight-core CPU environment
Figure 6.9 shows the active and reactive power of the WEST MMC. Figure
6.10 shows the active and reactive power of the EAST MMC. Figure 6.11 shows
the DC link voltage. Figure 6.12 shows the synthesized voltage.
Figure 6.9: WEST MMC active power and reactive power.
Figure 6.10: EAST MMC active power and reactive power.
44


DC link Voltage
450
400
350
300
> 250
200
B 150
> 100
50
0
Edc
T (si





0.0
5.0
10.0
15.0
20.0
25.0
30.0
Figure 6.11: DC link Voltage.
Synthesized Voltage
200
150
100
5 -50
m -100
> -150
-200__________________________________________________________________________________
T fs-) 1.1450 1.1500 1.1550 1.1600 1.1650 1.1700 1.1750 LlloO
i _______________________________________________________________________ >
-Va -Vb - Vc

X A A ^ A'"X
A X X j (
/ \ / \ / v \ / \ /
,/ \ / \ / \ /
X x X X
v_. V-_,v X* X. y a x.

Figure 6.12: Synthesized voltages Va Vb Vc.
In an arm of the multi-core detailed model, 12 SMs voltage are randomly
selected as shown in Figure 6.13. They are almost overlapping, which shows the
sorting process is working well.
45


Voltages of 12 SMs
ta.D
16.D
H.D
12.0
? 10.0
& a.o
g 6.0
2.0
0.0
T fs) 0.0 5X) io!o 15^0 2 0 0 250 30.0
Vrandom



Figure 6.13: Voltage of 12 SMs.
6.2 Test case 2
The second test case uses the references as:
DC link voltage reference, Vdcref=400 kV,
WEST MMC active and reactive power reference, PWref=40 MW, QWref=-
10 MVar,
EAST MMC reactive power reference, QEref=20 MVar.
6.2.1 Average model test in the one-core CPU environment
Figure 6.14 shows the active and the reactive power of the WEST MMC.
Figure 6.15 shows the active and reactive power of the EAST MMC. Figure 6.16
shows the DC link voltage. Figure 6.17 shows the synthesized voltage.
46


WEST MMC active and reactive power
- Qwest
i
Figure 6.14: WEST MMC active power and reactive power.
Figure 6.15: EAST MMC active power and reactive power.
DC link Voltaqe
"Edc



oUU
^ -

in

DU

T (s')
0.0
5.0
10.0
15.0 20.0 25.0 30.0
Figure 6.16: DC link Voltage.
47


Figure 6.17: Synthesized voltage Va Vb Vc.
6.2.2 Detailed model test in the one-core CPU environment
Figure 6.18 shows the active and reactive power of the WEST MMC. Figure
6.19 shows the active and reactive power of the EAST MMC. Figure 6.20 shows
the DC link voltage. Figure 6.21 shows the synthesized voltage.
Figure 6.18: WEST MMC active power and reactive power.
48


EAST MMC active and reactive cower
Peast Oeast



i

.

1
80
60
40
20
0
-20
-60
T (si
0.0
5.0
10.0
15.0
20.0
25.0
30.0
Figure 6.19: EAST MMC active power and reactive power.
DC link Voltage
"Edc


jjU
^ nJUU
^ -

in idu

*rU

T o.o 5^o io!o is!o 2o!o iilo io!o
i
Figure 6.20: DC link Voltage.
Figure 6.21: Synthesized voltage Va Vb Vc.
49


6.2.3 Detailed model test in the eight-core CPU environment
Figure 6.22 shows the active and reactive power of the WEST MMC. Figure
6.23 shows the active and reactive power of the EAST MMC. Figure 6.24 shows
the DC link voltage. Figure 6.25 shows the synthesized voltage.
WEST MMC active and reactive power
Pwest Owest >



f
O' I _fl
-n u
\jr
r


T (sl o.o 5,b mo mo 2o!o 25io 3o!o Figure 6.22: WEST MMC active power and reactive power.
EAST MMC active and reactive power
Peast Oeast


nj oU Px*
1

v
i_



T o.o 5F mo mo mo mo io!o
Figure 6.23: EAST MMC active power and reactive power.
50


DC link Voltage
Figure 6.24: DC link Voltage.
Synthesized Voltage
200
150
100
5 -50
m -100
> -150
-200__________________________________________________________________________________
T fs-) 1.1450 1.1500 1.1550 1.1600 1.1650 1.1700 1.1750 LlloO
i _______________________________________________________________________ >
-Va -Vb - Vc

X A A ^
A X X j (
/ \ / \ / v \ / \ /
,/ \ / \ / \ /
X x X x
X* X. y a x

Figure 6.25: Synthesized voltages Va Vb Vc.
6.3 Test case 3
In test case 3, only the multi-core models are tested. The simulation result
of the synthesized voltage with different number of SMs, (Nsm=36, Nsm=108)
are as shown in Figure 6.26 and Figure 6.27.
51


Figure 6.26: Synthesized voltages Va Vb Vc(Nsm=36).
Figure 6.27: Synthesized voltages Va Vb Vc(Nsm=108).
It is worth noting that as the number of the SMs per arm increases, the bad
effect from the ENI approach decreases.
6.4 Comparative evaluation
From the simulations, the results show that:
The active and reactive power of both WEST and EAST MMC in all tests
meet the references at steady state.
52


The synthesized voltage of the multi-core model contains some noise not
seen in the one-core models.
The DC voltage in the multi-core model contains noise as well.
The noise in the multi-core model decreases when the number of SMs per
arm gains.
The source of this noise is the ENI bridge, transmission line. Since trans-
mission line and cable are the only available bridge for the ENI approach, the
best way to split system is replacing inductors by transmission lines. Since the
transmission line can be treated as a series connection of 7r-structures, as shown
in Figure 6.28, the shorter the length is, the less 7r-structures will exist. Even
though the length of every transmission line is set as 1 m, the noise still exists.
This is the downside of the ENI approach. This drawback of the ENI approach
is decreased as the number of levels increases.
L R L R
Figure 6.28: Transmission line and 7r-structure.
6.5 Simulation speed versus SMs number
The main contribution of this thesis is speeding up the simulations. Accord-
ing to [10] [16] [21], the typical detailed MMC model simulation with a large
number of SMs is slow. A table of simulation time versus SMs number per arm
53


is summarized in the Table 6.1 in the single-core CPU environment. It shows
how much time it will take to finish 1 s simulation.
Table 6.1: Simulation time versus Submodule number on each arm.
Arm SMs number 14 16 18 20 22 24
Simulation time(s) 232 392 541 710 902 1044
Arm SMs number 26 28 30 32 34 36
Simulation time(s) 1424 1693 2520 2848 3086 4084
A quadratic curve fit for the data in Figure 6.29 is obtained using the basic
fitting tool by MATLAB. The equation of simulation time versus SMs number
per arm is:
T = 6.9N2 ISON + 1500
Note that if the number of the SMs per arm is 200, it will take 86400s to
finish Is duration of run. For the test cases (with 36 SMs per arm), it only takes
94.4 s to simulate one second with the multi-core approach vs. 4048 s reported
in the literature for a single-core architecture. This is a simulation speed gain
of 43 times.
54


Simulation time respect to SMs number per arm
Figure 6.29: Simulation time curve.
55


7. Conclusions
An HVDC system based on MMC topology has been modeled to one average
and two detailed models and simulated in a single-core and a multi-core environ-
ment. The performance of three sorting algorithms are evaluated by MATLAB
and PSCAD/EMTDC.
The simulation speed has been greatly improved with the help of selected
sorting algorithm and the ENI approach. Compared to the average model,
the detailed model can show more information such as the submodule voltage
profiles. The approach in a multi-core environment makes it possible to simulate
a large system in the detailed model within a reasonable time frame.
In the ENI approach, inductors are replaced by the transmission line models.
This approximation introduces noise on the DC link and synthesized voltage.
This seems to be a huge problem to the detailed model with 36 submodules in
each arm. However, in the real MMC-HVDC technology projects, it usually has
more than 200 submodules in each arm, and the introduced noise will decrease
as the submodules number increases.
Therefore, the ENI approach in a multi-core environment can accelerate the
simulation significantly, and it will be effective for MMC simulations with a high
number of submodules.
56


8. Future work
In the future, the following work may be done:
More comparisons: The circulating current effects can be analyzed.
ENI bridge: In the future, it can be improved if the inductor substitution
is better.
Optimal way of splitting: The original project has been split by assumed
model branch computational equality, there could be better ways to split
the system to maximize the CPU usage. One possible approach to do this
could be to use the software VTune to analyze CPU usage.
57


REFERENCES
[1] M. Davies, M. Dommaschk, J. Dorn, J. Lang, D. Retzmann, and D. So-
erangr. HVDC PLUS-Basics and principle of operation. Siemens Energy
Sector, ET PS SL/DSoe/Re-2008-08-10-HVDC PLUS V, 3, 2008.
[2] B. Gemmell, J. Dorn, D. Retzmann, and D. Soerangr. Prospects of multi-
level VSC technologies for power transmission. In T&D Conf. and Expo.,
2008. T. D. IEEE/PES, pages 1-16, Apr. 2008.
[3] T. Westerweller, K. Friedrich, U. Armonies, A. Orini, D. Parquet, and
S. Wehn. Transbay cable-Worlds first HVDC system using multilevel
voltage-sourced converter.
[4] Siemens. HVDC Plus References. [Online] Available:
http://www.energy.siemens.com/us, 2013.
[5] B. Jacobson, P. Karlsson, G. Asplund, L. Harnefors, and T. Jonsson. VSC-
HVDC transmission with cascaded two-level converters. In CIGRE session,
pages B4-B110, 2010.
[6] J. Arrillaga, Y. H. Liu, and N. R. Watson. Flexible Power Transmission:
The HVDC Options. John Wiley & Sons, Inc., 2007.
[7] N. Flourentzou, V. G. Agelidis, and G. D. Demetriades. VSC-Based HVDC
Power Transmission Systems: An Overview. IEEE Trans. Power Electron.,
24(3)092-602, Mar. 2009.
[8] A. Antonopoulos, L. Angquist, and H-P. Nee. On dynamics and voltage
control of the modular multilevel converter. In 13th European Conf. on
Power Electron, and Applicat., pages 1-10, 2009.
[9] S. Rohner, S. Bernet, M. Hiller, and R. Sommer. Modulation, losses, and
semiconductor requirements of modular multilevel converters. IEEE Trans.
Ind. Electron., 57(8):2633-2642, Aug. 2010.
[10] X. Jianzhong, Z. Chengyong, L. Wenjing, and G. Chunyi. Accelerated
model of modular multilevel converters in PSCAD/EMTDC. IEEE Trans.
Power Del, 28(1):129 136, 2013.
58


[11] G. Bergna, E. Berne, P. Egrot, P. Lefranc, A. Arzande, J. C. Vannier,
and M. Molinas. An energy-based controller for HVDC modular multi-
level converter in decoupled double synchronous reference frame for voltage
oscillation reduction. IEEE Trans. Ind. Electron., 60(6):23602371, Jun.
2013.
[12] J. Peralta, H. Saad, S. Dennetiere, J. Mahseredjian, and S. Nguefeu. De-
tailed and averaged models for a 401-level MMC-HVDG system. IEEE
Trans. Power Del, 27(3):1501-1508, 2012.
[13] G. Minyuan, X. Zheng, and C. Hairong. Control and modulation strate-
gies for modular multilevel converter based HVDC system. In IEEE Ind.
Electron. Soc. Annu. Conf., pages 849-854, 2011.
[14] P. Sotoodeh and R. D. Miller. A new multi-level inverter with FACTS
capabilities for wind applications. In IEEE Green Technologies Conf., pages
271-276, Apr. 2013.
[15] M. Saeedifard and R. Iravani. Dynamic performance of a modular multilevel
back-to-back HVDC system. IEEE Trans. Power Del, 25(4):2903 2912,
Oct. 2010.
[16] U. N. Gnanarathna, A. M. Gole, and R. P. Jayasinghe. Efficient modeling of
modular multilevel HVDC converters (MMC) on electromagnetic transient
simulation programs. IEEE Trans. Power Del, 26(1):316324, 2011.
[17] Algorithms and Data Structures Slection Sort. [Online] Available:
http://www.algolist.net / Algorithms.
[18] D. Knuth. The Art of Computer Programming 3 (2nd ed.). Addison-
Wesley, 1998.
[19] B. Jon. Programming Pearls. Addison-Wesley Professional, 1999.
[20] R. Miller and L. Boxer. Algorithms sequential & parallel: a unified ap-
proach.
[21] F. Yu, W. Lin, X. Wang, and D. Xie. Fast voltage-balancing control and
fast numerical simulation model for the modular multilevel converter. IEEE
Trans. Power Del, 30(l):220-228, Feb. 2015.
[22] P. Le-Huy, P. Giroux, and .J. C. Soumagne. Real-time simulation of mod-
ular multilevel converters for network integration studies. In Proc. IPST,
2011.
59


APPENDIX A. FORTRAN codes for the detailed model
In this chapter, the algorithm of sorting is shown. The codes are pro-
grammed in the FORTRAN language, which can be directly compiled by the
PSGAD. Instead of injecting C hie or Matlab hie, the FORTRAN approach ap-
pears to be the best choice, as for saving the simulation time. Here is the code
using InsertionSort in PSCAD.
#L0CAL real A
#L0CAL real B
#L0CAL real clmfst(36)
#L0CAL real clmscd(36)
#L0CAL integer tri
!CHECK IF N CHANGE
! STORAGE MATRIX-----!
! INITIAL ORIGINAL MATRIX 2ND CLO WITH LABELS!
DO 1=1,36
clmscd(I)=I
END DO
! INITIAL ORIGINAL MATRIX 1ST CLO WITH VOLTAGES!
DO J=1,36
clmfst(J)=$IN(J)
60


END DO
! SORT MATRIX ROWS BASED ON 1ST CLO VALUES IN ASENDING SEQUENCE!
DO 1=1,36
DO J=(I+1),36
IF (clmfst(J).LT.clmfst(I)) THEN
A=clmfst(J)
clmfst(J)=clmfst(I)
clmfst(I)=A
B=clmscd(J)
clmscd(J)=clmscd(I)
clmscd(I)=B
END IF
END DO
END DO
! GIVE OUT WITH SORTED LABELS!
DO 1=1,36
$OUT(I)=clmscd(I)
END DO
tri=0
! GIVE T WITH I/O BASED ON NUMBER OF ON/OFF CAPS-N AND CURRENT DIRECTION-ID-
if ($ID .gt. 0 .and. tri .eq. 0) then
tri=l
61


do i=l, 36
if (i .le. NT) then
$T(clmscd(i))=0
else
$T(clmscd(i))=l
end if
end do
else if ($ID .le. 0 .and. tri .eq. 0) then
tri=2
do i=l, 36
if (i .le. 36-NT) then
$T(clmscd(i))=l
else
$T(clmscd(i))=0
end if
end do
end if
Here is the code calling MergeSort or Quicksort.
#L0CAL integer num
#L0CAL integer vsarray(36)
#L0CAL integer vlb(36)
#L0CAL integer TT(19)
#L0CAL integer Tib(19)
if ($N .ne. $Nd) then
62


num=36
do i=l, num
vsarray(i)=$IN(i)*10
vlb(i)=i
end do
!call MergeSort
call MergeSort(vsarray, vlb, num, TT, Tib)
!call Quicksort
call Quicksort(vsarray, vlb, num)
if ($ID .ge. 0) then
do i=l,$N
$T(vlb(i))=0
end do
do i=$N+l, num
$T(vlb(i))=l
end do
else
do i=l, num-$N
$T(vlb(i))=l
end do
do i=num+l-$N, num
$T(vlb(i))=0
63


end do
endif
endif
Here is the linked FORTRAN file for MergeSort.
subroutine Merge(A,ALB,NA,B,BLB,NB,C,CLB,NC)
integer,
integer,
integer,
integer,
integer,
integer,
integer,
intent(in) ::
intent(in out)
intent(in out)
intent(in)
intent(in)
intent(in out)
intent(in out)
NA,NB,NC
:: A(NA)
: : ALB(NA)
:: B(NB)
:: BLB(NB)
:: C(NC)
:: CLB(NC)
integer :: I,J,K
I = 1; J = 1; K = 1;
do while(I <= NA .and. J <= NB)
if (A(I) <= B(J)) then
C(K) = A(I)
CLB(K)=ALB(I)
I = 1+1
else
C (K) = B (J)
64


CLB(K)=BLB(J)
J = J+l
endif
K = K + 1
enddo
do while (I <= NA)
C(K) = A(I)
CLB(K)=ALB(I)
1 = 1 + 1
K = K + 1
enddo
do while (J <= NB)
C (K) = B ( J)
CLB(K)=BLB(J)
J = J + 1
K = K + 1
enddo
return
end subroutine merge
recursive subroutine MergeSort(A,ALB,N,T,TLB)
integer, intent(in out) :: N
65


integer, dimension(N), intent(in out) :: A
integer, dimension(N), intent(in out) :: ALB
integer, dimension((N+l)/2), intent (out) ::
integer, dimension((N+l)/2), intent (out) ::
integer :: NA,NB,V,VLB
if (N < 2) return
if (N == 2) then
if (A(l) > A(2)) then
V = A(l)
VLB=ALB(1)
A(1) = A(2)
ALB(1)=ALB(2)
A(2) = V
ALB(2)=VLB
endif
return
endif
NA=(N+l)/2
NB=N-NA
call MergeSort(A,ALB,NA,T,TLB)
call MergeSort(A(NA+1),ALB(NA+1),NB,T,TLB)
T
TLB
66


if (A(NA) > A(NA+1)) then
T(1:NA)=A(1:NA)
TLB(1:NA)=ALB(1:NA)
call Merge(T,TLB,NA,A(NA+1),ALB(NA+1),NB,A,ALB,N)
endif
return
end subroutine MergeSort
Here is the linked FORTRAN file for Quicksort,
recursive subroutine QSort(a,alb,na)
integer, intent(in) :: na
integer, dimension(na), intent(in out) :: a
integer, dimension(na), intent(in out) :: alb
integer :: left, right
integer :: pivot
integer :: temp, templb
integer :: marker
if (na > 1) then
pivot = a(l)
67


left = 0
right = na + 1
do while (left < right)
right = right 1
do while (a(right) > pivot)
right = right 1
enddo
left = left + 1
do while (a(left) < pivot)
left = left + 1
enddo
if (left < right) then
temp = a(left)
templb = alb(left)
a(left) = a(right)
alb(left) = alb(right)
a(right) = temp
alb(right) = templb
end if
enddo
if (left == right) then
marker = left + 1
68


else
marker = left
end if
call QSort(a(:marker-l),alb(:marker-1),marker-1)
call QSort(a(marker:),alb(marker:),na-marker+l)
end if
end subroutine QSort
69


Full Text

PAGE 1

ACCELERATINGDETAILEDSIMULATIONSOFANHVDCSYSTEM BASEDONMODULARMULTILEVELCONVERTERSINAMULTI-CORE ENVIRONMENT by XIAODANWANG B.S.,BeijingTechnologyandBusinessUniversity,2010 Athesissubmittedtothe FacultyoftheGraduateSchoolofthe UniversityofColoradoinpartialfulllment oftherequirementsforthedegreeof MasterofScience ElectricalEngineering 2015

PAGE 2

ThisthesisfortheMasterofSciencedegreeby XiaodanWang hasbeenapprovedforthe ElectricalEngineeringProgram by FernandoMancilla-David,Chair TitsaPapantoni DanConnors June18,2015 ii

PAGE 3

Wang,XiaodanElectricalEngineering AcceleratingDetailedSimulationsofanHVDCSystemBasedonModularMultilevelConvertersinaMulti-coreEnvironment ThesisdirectedbyProfessorFernandoMancilla-David ABSTRACT ThetopologyoftheModularMultilevelConverterMMCwasintroduced in2001.TheMMCtopologyiswellsuitedfortheHighVoltageDirectCurrent HVDCsystem.TheMMC-HVDCtopologyhasseveraladvantagesoverother topologies:iitisbasedonsimpleconvertercells,iiithaseasyvoltage andcurrentscaling,iiiitfeaturesdistributedcapacitiveenergystorage,ivit oersstraightforwardprotectionschemes,vithaslowswitchingfrequencyand losses.However,thesimulationspeedofadetailedMMCmodelinanHVDC systemisslowduetothecomputationalburden. Inthisthesis,withthehelpofPSCAD/EMTDC,anewapproachina multi-coreCPUenvironmenthasbeenimplementedtospeedupthesimulations oftheHVDCsystembasedontheMMCtopology.Thisapproachisevaluated bycomparingresultswithasingle-coreaveragemodel,asingle-coredetailed modelandaeight-coredetailedmodel.Thisthesisalsoincludesananalysis selectingthebestsortingalgorithm. iii

PAGE 4

Theformandcontentofthisabstractareapproved.Irecommenditspublication. Approved:FernandoMancilla-David iv

PAGE 5

DEDICATION Thisthesisisdedicatedtomyfamilyandmygirlfriendwhohavesupportedme allthewaysincethebeginningofmystudies.Theyprovidemewithagreat sourceofmotivationandinspiration.Finally,thisthesisisdedicatedtoallthose whobelievethatknowledgeispower. v

PAGE 6

ACKNOWLEDGMENT Iwouldliketoexpressmydeepestgratitudetomyadvisor,ProfessorFernandoMancilla-David,forhisexcellentguidance,care,patience,andforprovidingmewithanexcellentenvironmentfordoingresearch. IgreatlyappreciateProfessorsTitsaPapantoni,andProfessorDanConnorsforformingpartofmydissertationdefensecommittee.Finally,Iwould liketothankmyfamily;theywerealwaystherecheeringmeupandstoodby methroughthegoodandbadtimes. IalsowanttothankPhdstudentMiguelCarrascoforhistipsonmysimulationmodelingandthesisarrangement. vi

PAGE 7

CONTENTS Figures....................................ix Tables.....................................xii Chapter 1.Introduction................................1 2.Powerstage................................3 2.1Designparameters...........................4 2.2Averagemodel.............................8 2.3Detailedmodel.............................9 3.Controlscheme..............................13 3.1Rectierandinvertercontrol.....................14 3.2Legenergycontrol...........................16 3.3Modulation...............................16 3.3.1Controloftheaveragemodel....................18 3.3.2Controlofthedetailedmodel....................19 4.Sortingalgorithm.............................25 4.1Insertionsort..............................25 4.2Quicksort................................26 4.3Mergesort................................27 4.4Performancetest............................27 4.4.1MATLABbasedtests........................27 vii

PAGE 8

4.4.2PSCAD/EMTDCbasedtests....................28 5.Implementationofthedetailedmodelinamulti-coreenvironment..34 6.Simulationresults.............................40 6.1Testcase1...............................40 6.1.1Averagemodeltestintheone-coreCPUenvironment.......40 6.1.2Detailedmodeltestintheone-coreCPUenvironment......42 6.1.3Detailedmodeltestintheeight-coreCPUenvironment......44 6.2Testcase2...............................46 6.2.1Averagemodeltestintheone-coreCPUenvironment.......46 6.2.2Detailedmodeltestintheone-coreCPUenvironment......48 6.2.3Detailedmodeltestintheeight-coreCPUenvironment......50 6.3Testcase3...............................51 6.4Comparativeevaluation........................52 6.5SimulationspeedversusSMsnumber.................53 7.Conclusions................................56 8.Futurework................................57 References ...................................58 Appendix A.FORTRANcodesforthedetailedmodel................60 viii

PAGE 9

FIGURES Figure 2.1SchematicoftheHVDCback{to{backsystem.............3 2.2aStructureofaSM;bseriesconnectionofanumberofSMs constitutinganarm;cconvertercomposedofthreelegs{onefor eachphase................................4 2.3OverviewoftheHVDCsysteminPSCAD...............6 2.4Averagemodelarm...........................9 2.5Detailedmodelarm...........................10 2.6Submoduleaton-stateoro-state...................11 2.7TheMMCwithaverageordetailedarm................12 3.1PSCADcontrolpanel..........................13 3.2Overviewofthecontrolstrategy....................14 3.3Currentcontroller............................15 3.4Legenergycontrollerforeachphase..................16 3.5Per-phasemodulationindexcomputation...............17 3.6Armintheaveragemodel........................19 3.7Arminthedetailedmodel.......................20 3.8Dierentstairs-Vcomparisonwithsinusoidal-V............21 3.9Flowchartofthevoltagebalancingalgorithm.............23 4.1PSCADbasedalgorithmsvalidationtestinputplot..........29 4.2PSCADbasedalgorithmsvalidationtestoutput...........29 ix

PAGE 10

4.3PSCADbasedalgorithmsvalidationtestswitchingarray.......30 4.4PSCADbasedalgorithmsvalidationtesttrigger...........30 4.5PSCADbasedalgorithmsvalidationtestoutputwithN{check...31 4.6PSCADbasedalgorithmsvalidationtestswitchingarray.......31 5.1CPUmonitorintaskmanagerforENI.................34 5.2CPUmonitorintaskmanagerforsinglecore.............35 5.3ENIdetailedmodel...........................36 5.4ENIcircuitinPart1...........................37 5.5ENIcircuitinPart2...........................38 6.1WESTMMCactivepowerandreactivepower............41 6.2EASTMMCactivepowerandreactivepower.............41 6.3DClinkVoltage.............................41 6.4SynthesizedvoltageVaVbVc.....................42 6.5WESTMMCactivepowerandreactivepower............42 6.6EASTMMCactivepowerandreactivepower.............43 6.7DClinkVoltage.............................43 6.8SynthesizedvoltageVaVbVc.....................43 6.9WESTMMCactivepowerandreactivepower............44 6.10EASTMMCactivepowerandreactivepower.............44 6.11DClinkVoltage.............................45 6.12SynthesizedvoltagesVaVbVc.....................45 6.13Voltageof12SMs............................46 6.14WESTMMCactivepowerandreactivepower............47 6.15EASTMMCactivepowerandreactivepower.............47 x

PAGE 11

6.16DClinkVoltage.............................47 6.17SynthesizedvoltageVaVbVc.....................48 6.18WESTMMCactivepowerandreactivepower............48 6.19EASTMMCactivepowerandreactivepower.............49 6.20DClinkVoltage.............................49 6.21SynthesizedvoltageVaVbVc.....................49 6.22WESTMMCactivepowerandreactivepower............50 6.23EASTMMCactivepowerandreactivepower.............50 6.24DClinkVoltage.............................51 6.25SynthesizedvoltagesVaVbVc.....................51 6.26SynthesizedvoltagesVaVbVcNsm=36...............52 6.27SynthesizedvoltagesVaVbVcNsm=108..............52 6.28Transmissionlineand -structure...................53 6.29Simulationtimecurve..........................55 xi

PAGE 12

TABLES Table 2.1Designparameters............................8 3.1PhasevoltageintermsofN.......................22 4.1MATLABbasedalgorithmsspeedtestresults.............28 4.2PSCADbasedalgorithmsvalidationtestinput............28 4.3PSCADbasedalgorithmsspeedtestsinputarrays..........32 4.4PSCADbasedalgorithmsspeedtestresults..............33 6.1SimulationtimeversusSubmodulenumberoneacharm.......54 xii

PAGE 13

1.Introduction AnewHighVoltageDirectCurrentHVDCtransmissiontechnologybased ontheModularMultilevelConverterMMCtopologyhasbeenintroducedin recentyears.Inthistopology,theconverterarmbehavesasacontrollable voltagesourcewithahighnumberofpossiblediscretevoltagesteps,which togethercanproduceclosetoatruesinusoidalvoltageintheACterminal[1]. MMCtopologyenablesusingasmallerswitchingfrequencytoreduceconverter lossesandeliminatesthelterrequirementsbyusingasignicantnumberof levelsperarm[2].Nowadays,thereareveMMC-HVDCprojectsinprogress inEurope[3][4]. Inthefollowingthesis,thebasicsoftheMMC-HVDCtechnologyisexplainedinSection1;thepowerstagedesignisshowninSection2;thecontrol strategiesareshowninSection3;thesortingalgorithmisshowninSection4; themulti-coresimulationapproachisshowninSection5;thesimulationresults areshowninSection6;theconclusionsareshowninSection7;thefuturework isshowninSection8. TheadvantagesoftheMMC-HVDCtechnologyaresummarizedin[5,6,7]: ACvoltagescanbeadjustedinveryneincrementsandaDCvoltagewith verylittleripplecanbeachieved,thisminimizesthelevelofgenerated harmonicsandinmostcasescompletelyeliminatestheneedforAClters. Thelowswitchingfrequencyoftheindividualsemiconductorsresultsin verylowswitchinglosses.Totalsystemlossesarethereforerelativelylow, 1

PAGE 14

andtheeciencyisconsequentlyhigherthanexistingtwo{andthree{level solutions. DuetotheeliminationofadditionalcomponentssuchasACltersand theirswitchgear,highreliabilityandavailabilitycanbeachieved. Throughahighlymodularconstructionbothinthepowersectionand incontrolandprotection,thesystemisveryscalable,i.e.conveniently adaptabletoanyrequiredpowerandvoltageratings. Withrespecttolaterprovisionofspare-parts,itiseasytoreplaceexisting componentsbystate-of-the-artones,sincetheswitchingcharacteristics ofeachpowermodulearedeterminedindependentlyofthebehaviorof theotherpowermodules.Thisisanimportantdierencetothedirect series-connectionofsemiconductorsasinthetwo-leveltechnologywhere nearlyidenticalswitchingcharacteristicsoftheindividualsemiconductors aremandatory. Independentcontrolofactiveandreactivepower.Asaconsequence,no reactivepowercompensationequipmentisneededatthestation. Possibilitytoconnectthesystemtoaweak"acnetworkoreventoone wherenogenerationsourceisavailableandtheshort-circuitlevelisvery low. Itcanprovideavarietyofancillaryservicestotheinterconnectedacsystems,suchasharmonicandunbalancedvoltagecompensation,ickerelimination,etc. 2

PAGE 15

2.Powerstage Inaback-to-backconguration,twoconvertersareconnectedbyaDClink capacitor,asshowninFigure2.1.Eachconvertercanindependentlysynthesizeasinusoidalvoltageatitsterminals.Thesevoltagescanbedenedby theiramplitudes ^ V 1 ^ V 2 andphaseangles 1 2 .Activepowerinjections dependmainlyonphaseangles,whilereactivepowerinjectionsdependonthe amplitudesofthesynthesizedvoltages.TheMMCtopologyallowsindependent controlofthevoltageamplitudes ^ V 1 and ^ V 2 .Therefore,reactivepowerinjections onbothsidescanbecontrolledindependently.However,phaseangles 1 2 needtobecontrolledinsuchawaythattheactivepowerbeingtransmitted byoneconverterequalstheactivepowertransmittedbytheotherconverterin steadystatetokeeptheenergyoftheDClinkconstant. Figure2.1: SchematicoftheHVDCback{to{backsystem. ThebasiccomponentoftheMMCconverterisasimplehalfbridgewitha capacitorcalledpowersubmoduleSM,asshowninFigure2.2a.Withthe twopowerelectronicswitches,anSMcangeneratetwooutputvoltages,zero,or 3

PAGE 16

thevoltageofthecapacitor.AnSMhasbidirectionalcurrentcapability.The capacitorcanbechargedordischargeddependingonthedirectionofthearm current[8][9].TheseriesconnectionofanumberofSMsconstitutesanarm,as showninFigure2.2b.Intheconvertertherearethreelegs,oneforeachphase. Aconverterlegiscomposedofanupperandalowerarm.Figure2.2cshows thestructureoftheconverter.Thenumberoftheoutputstepsdependsonthe numberofSMsavailableineacharm.ByconnectingenoughSMsinseries,no AClterswillbenecessary.IntheTransBayCableProject,Siemensusedmore than200SMsperconverterarm.Asaresult,thesynthesizedvoltageproleis veryclosetosinusoidal[1]. Figure2.2: aStructureofaSM;bseriesconnectionofanumberofSMs constitutinganarm;cconvertercomposedofthreelegs{oneforeachphase. 2.1Designparameters Figure2.3showstheoverviewoftheHVDCsystemimplementedinPSCAD. Eachconverterconsistsofthreelegs.Inturn,eachlegiscomposedbytwoarms, andeacharmiselectricallyconnectedwithacertainnumberofSMsinseries. SincetheMMCtopologybelongstotheVSCfamily,aDClinkcapacitoris 4

PAGE 17

needed.Bothconvertersareconnectedtothegridthroughacircuitbreaker. Theinitialstateofbothbreakersareopen,andtheywillcloseafterallSMsare fullycharged.Thenominalpoweris110MW.TheselectedDCvoltageis 200 kV.ThenumberofSMsperarmwaschosentobe36byheuristicsbecausethere isatradeofbetweenthecomputationalcomplexityandtheharmonicscontent onthesynthesizedvoltage. 5

PAGE 18

Figure2.3: OverviewoftheHVDCsysteminPSCAD. 6

PAGE 19

Theprimarysideofthetransformerisratedat230kVwithagroundedWye connectionandthesecondarysideisratedat180kVwithadeltaconnection, consideringtheDClinkvoltage 200kV.Aleakagereactanceof10%isselected asatypicalvalueofthisratedpower. Theinsulated-gatebipolartransistorsIGBTsineachSMareselectedaccordingtotheirvoltageblockingandmaximalcurrentconductioncapabilities. ThevoltageblockingcapabilityneedstoreachVb=400/36=11.1kVandamaximumforwardcurrentof1.2kA.TheresistanceoftheselectedIGBTis1m, therefore,thetotalresistanceofeacharmis36m.Thecapacitanceofeach SMmaybeobtainedbythefollowingequation[10]: C = 2 SE MMC 6 N arm V 2 C whereSisthenominalpoweroftheconverter, E MMC isthecapacitor'sstorage energyin[KJ/MVA], N arm isthenumberoftheSMsineacharm,and V C isthe SMnominalvoltage. Withastorageenergyof331 kJ MVA [5],combiningalltheknownparameters intheequation,thecapacitanceisfoundtobe16.4mF.Thearminductance, L S ,hasbeenselectedas15%ofthesystem'sbaseimpedance,asshowninthe followingequation[10]. Z s = V 2 ac S L s =0 : 15 Z s =0 : 1172 H AllsystemparametersaresummarizedintheTable2.1. 7

PAGE 20

Table2.1: Designparameters. WestACSystem BusVoltageEastkV230 TheveninEquivalentImpedanceH0.1132 WestTransformer PrimaryVoltagekV230Y SecondaryVoltagekV180 PowerRatingMVA133 LeakageReactancepu0.1 WestMMC NumberofSMsperarm36 NumberofIGBTsperSM2 IGBTblockingcapabilitykV15 IGBTmaximalforwardcurrentkA3 IGBTresistancem1 SMCapacitormF14.6 ArminductanceH0.1172 DCLinkCapacitor Capacitance F0.5 RatedvoltagekV400 EastMMC NumberofSMsperarm36 NumberofIGBTsperSM2 IGBTblockingcapabilitykV15 IGBTmaximalforwardcurrentkA3 IGBTresistancem1 SMCapacitormF14.6 ArminductanceH0.1172 EastTransformer PrimaryVoltagekV230Y SecondaryVoltagekV180 PowerRatingMVA133 LeakageReactancepu0.1 EastACSystem BusVoltageWestkV230 TheveninEquivalentImpedanceH0.2598 2.2Averagemodel Tovalidatethedetailedmodelsimulations,theaveragemodelisimplementedrst.Intheaveragemodel,eacharmispresentedbyanequivalent 8

PAGE 21

voltagesource,andthecalculationisshowninSection3.Theseriesresistance andinductanceineachaveragearmis36mand0.117H,respectively.One armintheaveragemodelisshowninFigure2.4. Figure2.4: Averagemodelarm. 2.3Detailedmodel Inthedetailedmodel,eacharmhasaseriesconnectionofacertainnumber ofSMs.ThecontrolontheSMswillbeexplainedinSection3.Onearminthe detailedmodelisshowninFigure2.5. 9

PAGE 22

Figure2.5: Detailedmodelarm. Itisworthnotingthatthearminductanceandresistanceofbothmodels aresame.Inthedetailedmodel,thediodesandtheIGBTshavethesame resistance.AsshowninFigure2.6,inbothonandostatesoftheSMs,the armresistanceremainsconstant,i.e.thetotalresistanceisaconstant36m. 10

PAGE 23

Figure2.6: Submoduleaton-stateoro-state. Finally,theWESTandEASTMMCaremodiedwitheitheraverageor detailedarm,asshowninFigure2.7. 11

PAGE 24

Figure2.7: TheMMCwithaverageordetailedarm. 12

PAGE 25

3.Controlscheme Theoveralloperationoftheconvertersisdirectedbythecontrolpanelasin Figure3.1.Thereferencescanbesetinthiscontrolpanel,includingtheactive andreactivepoweroftherectierside,thereactivepoweroftheinverterside andtheactivepowerowdirection. Figure3.1: PSCADcontrolpanel. Dependingontheactivepowerowdirection,oneoftheconverterstations willactasarectierandtheotheronewillactasaninverter.Forinstance,if powerisowingfromtheWESTMMCtotheEASTMMC,theeastconverter willactastheinverterandthewestconverterwillactastherectier[11]. 13

PAGE 26

Figure3.2: Overviewofthecontrolstrategy. Figure3.2showstheoverallcontrolstrategy.ThroughtheABC-to-DQ transformation,theactiveandreactivepowerreferencesaretransformedtoDQ currentreferencesanfedtothecurrentcontroller.Thecurrentandenergy controllersthenworktogethertogeneratethemodulationindex, N ,foreach arminbothconverters[12][13]. 3.1Rectierandinvertercontrol Thedierencebetweentherectierandtheinverteristheactivepower referencegenerator.Intherectier,theactivepowerreferenceandthereactive powerreferencearecomingdirectlyfromthecontrolpanel.Intheinverter,the reactivepowerreferenceiscomingfromthecontrolpanel,however,theactive powerreferenceisgeneratedbytheDClinkvoltagecontrol. Followingtheactiveandreactivepowergenerators,thepowerreferencesare transferredtocurrentreferenceswiththeABC-to-DQtransfer.TheABC-to-DQ 14

PAGE 27

transformationisbasedonthefollowingequations: P = 3 2 v d i d + v q i q ; Q = 3 2 )]TJ/F19 11.9552 Tf 9.298 0 Td [(v d i q + v q i d : ThePhaseLockLoopPLLforces v q =0,whichwillsimplifytheabove equationsettobe: P ref = 3 2 v d I d ref ; Q ref = )]TJ/F15 11.9552 Tf 10.494 8.087 Td [(3 2 v d I q ref : Followingthepower-to-currenttransformation,referencecurrentandactual currentarecomparedtogenerateanerror,andtheerrorisdriventozerowith thehelpoftwodecoupledcompensators.Aiagramofthisprocessisshownin Figure3.3.Theoutputsignalsofthecurrentcontroller,Ea,EbandEc,willbe usedasinputsignalinthemodulationinSection3.3. Figure3.3: Currentcontroller. 15

PAGE 28

3.2Legenergycontrol Thelegenergycontrolisbuilttobalancethethreephasevoltagesandreduce thecirculatingcurrent.Theenergyoneachlegisafunctionoftheupperand lowerarmvoltages.Inotherwords,thelegenergywillbestableifthelegvoltage isxed,andthethreephaseswillbebalanced. Diff i = W i ref )]TJ/F19 11.9552 Tf 11.955 0 Td [(W i K i + K p 1 s i = a;b;c; where W i = V 2 ip eq + V 2 in eq i = a;b;c ThelegenergycontrollerisshowninFigure3.4. Figure3.4: Legenergycontrollerforeachphase. 3.3Modulation Theinstantaneousvoltageofeacharmisdeterminedbythemodulation indexN.Intheaveragemodel,Nisintherangeof0to1.WhenNequals0, 16

PAGE 29

allSMsaredisconnected,andwhenNequals1,allSMsareconnected.Forthe upperandlowerarmineachleg,themodulationindexesarecomputedas: N iup = V dc 2 )]TJ/F19 11.9552 Tf 11.955 0 Td [(E i )]TJ/F19 11.9552 Tf 11.956 0 Td [(U di i 1 V iu eq i = a;b;c N ilow = V dc 2 + E i )]TJ/F19 11.9552 Tf 11.955 0 Td [(U di i 1 V il eq i = a;b;c where V dc istheDClinkvoltage, E i isACterminalvoltagetobesynthesized whichisdeterminedbythecurrentcontroller,and U di i istheoutputofthe legenergycontroller.Atanypointintimethesumoftheupperandlower modulationindexesinanarmisone: N up + N low =1 Adiagramofthemodulationindexcomputationforonelegisshownin Figure3.5. Figure3.5: Per-phasemodulationindexcomputation. 17

PAGE 30

3.3.1Controloftheaveragemodel Thearmequivalentcapacitanceis: C eq = C SM n andthearmvoltagesare: V iup = V arm iup N up i i = a;b;c V ilow = V arm ilow N low i i = a;b;c where V arm iup and V arm ilow aretheequivalentvoltagesoftheupperarmandthe lowerarm.Combiningthethreeequationsabove,the V arm iup and V arm ilow are: V arm iup = Z I iup C eq N upi dti = a;b;c V arm ilow = Z I ilow C eq N lowi dti = a;b;c Basedontheseequations,theaveragearmcanbemodeledasshowninFigure 3.6. 18

PAGE 31

Figure3.6: Armintheaveragemodel. 3.3.2Controlofthedetailedmodel ThedetailedmodelarmisshowninFigure3.7. 19

PAGE 32

Figure3.7: Arminthedetailedmodel. Inthedetailedmodel,themodulationindexneedstobemultipliedbythe numberoftheSMsineacharm.Asaresult,themodulationindexofthedetailed modelisanintegerintherangeof0to36.Ingeneral,thenumberofthelevels isequaltooneplusthenumberoftheSMs.Itisalsoworthnotingthatthe numberofSMshastobeeven,otherwisethe0kVlevelcannotbeachieved. 20

PAGE 33

Figure3.8: Dierentstairs-Vcomparisonwithsinusoidal-V. ThreevoltagecurveswithdierentnumberofSMsNperarmN=4,N=8, N=12aregeneratedasshowninFigure3.8.Itisapparentthatasthenumber increases,thevoltageprolebecomesclosertosinusoidal.Inthedetailedmodel simulations,themagnitudeofthestepwisecurveequalsthenumberoftheSMs ineacharm[14]. AssumingthereareNSMsineacharm,tosatisfyKirchho'sVoltageLaw KVL,thesynthesizedvoltageonphaseAneedstotbothupperarm'sand lowerarm'svoltagedrop,asinthefollowingequations: V a = V dc = 2 )]TJ/F19 11.9552 Tf 11.955 0 Td [(N upperarm V sm V a = )]TJ/F19 11.9552 Tf 9.298 0 Td [(V dc = 2+ N lowerarm V sm N = N upperarm + N lowerarm Solvingtheaboveequationsset,VsmequalsVdc/N.AssumingfourSMs,Va wouldtakevaluesasshowninTable3.1. 21

PAGE 34

Table3.1: PhasevoltageintermsofN. Nupper Nlower VaupperKVL ValowerKVL 4 0 V dc = 2 )]TJ/F15 11.9552 Tf 11.955 0 Td [(4 V sm = )]TJ/F19 11.9552 Tf 9.299 0 Td [(V dc = 2 )]TJ/F19 11.9552 Tf 9.299 0 Td [(V dc = 2+0 V sm = )]TJ/F19 11.9552 Tf 9.299 0 Td [(V dc = 2 3 1 V dc = 2 )]TJ/F15 11.9552 Tf 11.955 0 Td [(3 V sm = )]TJ/F19 11.9552 Tf 9.299 0 Td [(V dc = 4 )]TJ/F19 11.9552 Tf 9.299 0 Td [(V dc = 2+1 V sm = )]TJ/F19 11.9552 Tf 9.299 0 Td [(V dc = 4 2 2 V dc = 2 )]TJ/F15 11.9552 Tf 11.955 0 Td [(2 V sm =0 )]TJ/F19 11.9552 Tf 9.299 0 Td [(V dc = 2+2 V sm =0 1 3 V dc = 2 )]TJ/F15 11.9552 Tf 11.955 0 Td [(1 V sm = V dc = 4 )]TJ/F19 11.9552 Tf 9.299 0 Td [(V dc = 2+3 V sm = V dc = 4 0 4 V dc = 2 )]TJ/F15 11.9552 Tf 11.955 0 Td [(0 V sm = V dc = 2 )]TJ/F19 11.9552 Tf 9.299 0 Td [(V dc = 2+4 V sm = V dc = 2 Vaisintherangeof-Vdc/2to+Vdc/2bystepsofVdc/4.However,the sizeofeverystepmaybedierentwithoutcontrol.Toequalizeallthesteps, theSMsvoltagebalancingalgorithmisintroduced. Inthefollowingdiscussion,theterm"ON"signiesthatoneSMgivesthe CapacitorvoltageVcastheoutputvoltage,and"OFF"signiesthatasubmodulegives0kVastheoutputvoltage.ThenumberofSMsonandoisin therangeof0to36.Also,Ntreferstothenumberofthesubmodulesinthe "ON"stateintheupperarmofonephaselegattime"t". TheSMsvoltagesarebalancedbyturningONorOFFSMsdependingonthe currentowdirections.NtSMswithlowercapacitorvoltageswillbeturned ONwhenthearmcurrentowischargingthecapacitors,andOFFwhenthe armcurrentowisdischargingthem.AowchartofSMsvoltagebalancingis showninFigure3.9[15][16]. 22

PAGE 35

Figure3.9: Flowchartofthevoltagebalancingalgorithm. Therearethreeinputs:iNt,iiIdcurrentdirectionandiiiVarray, forallSMs.Thevoltagebalancingcontrollerwillreceivedatafromallthe inputsduringthesimulations,then,thedataofVarraywillbelistedinatable alongwiththeirlabelsVLBarray.Next,thetableofVarrayandVLBarray willbesortedintoascendingsequence,andnally,theswitchingsignalsTarray willbegeneratedbasedonNt,I,andthesortedtablegeneratedinstepthree ofFigure3.9.Combinedwiththevoltagebalancingcontrol,thedetailedarmis builtasshowninFigure3.7. 23

PAGE 36

Also,toacceleratethesimulation,thesortingprocesswillonlybetriggered whenNtchanges[15].Thiswillreducethesortingprocess'frequencyandthe resultswillbeacceptableiftheSMsnumberishighenoughtoavoidusinglters. TheprocessofcheckingwhetherNtchangesintheprocessingtimeinterval willbenotiedas"N-check"inthisthesis. 24

PAGE 37

4.Sortingalgorithm Thesortingalgorithmhasbeenselectedfromthreecandidatesinorderto improvethesimulationspeed.Threesortingalgorithmsareevaluatedbothin MATLABandPSCAD.Thecomputingtimeismatchingthecomputational complexitybigOnotationintermsofthesizeofthelistN.Thecandidate sortingalgorithmsare: InsertionSort QuickSort MergeSort. 4.1Insertionsort Insertionsortisaniterativealgorithmwhichremovesoneelementfromthe inputdataeachiterationandaddsittothecorrectlovationinasortedoutput list.Thisprocessrepeatsuntilnoinputelementsremain[17]. Thebestcaseinputisanarraythatisalreadysorted.Inthiscaseinsertion sorthasalinearrunningtimeO n .Duringeachiteration,therstremaining elementoftheinputisonlycomparedwiththeright-mostelementofthesorted subsectionofthearray. Thesimplestworstcaseinputisanarraysortedinreverseorder.Thesetof allworstcaseinputsconsistsofallarrayswhereeachelementisthesmallestor second-smallestoftheelementsbeforeit.Inthesecaseseveryiterationofthe 25

PAGE 38

innerloopwillscanandshifttheentiresortedsubsectionofthearraybefore insertingthenextelement.Thisgivesinsertionsortaquadraticrunningtime O n 2 Theaveragecaseisalsoquadratic,whichmakesinsertionsortimpractical forsortinglargearrays.However,insertionsortisoneofthefastestalgorithms forsortingverysmallarrays,evenfasterthanquicksort.Infact,goodquick sortimplementationsuseinsertionsortforarrayssmallerthanacertainthreshold,alsowhenarisingassubproblems;theexactthresholdmustbedetermined experimentallyanddependsonthemachine,butiscommonlyaroundten[18]. 4.2Quicksort Quicksortisadivideandconqueralgorithm.Quicksortrstdividesa largearrayintotwosmallersub-arrays:thelowelementsandthehighelements. Quicksortthenrecursivelysortsthesub-arrays[19][20]. Thestepsofquicksortare: 1.Pickanelementasapivotfromthearray.2.Reorderthearraysothat allelementswithvalueslessthanthepivotareplacedbeforethepivot,whileall elementswithvaluesgreaterthanthepivotareplacedafteritequalvaluescan goeitherway.Afterthispartitioning,thepivotisinitsnalposition,which iscalledthepartitionoperation.3.Recursivelyapplytheabovestepstothe sub-arrayofelementsuntilthesub-arraycontainsoneelement. Quicksort'sdivide-and-conquerformulationmakesitamenabletoparallelizationusingtaskparallelism.Thepartitioningstepisaccomplishedthrough theuseofaparallelprexsumalgorithmtocomputeanindexforeacharray elementinitssectionofthepartitionedarray.Givenanarrayofsizen,the 26

PAGE 39

partitioningstepperformsO n workinO logn timeandrequiresO n additionalscratchspace.Afterthearrayhasbeenpartitioned,thetwopartitions canbesortedrecursivelyinparallel.Assuminganidealchoiceofpivots,parallel quicksortsortsanarrayofsizeninO nlogn workinO log 2 n timeusingO n additionalspace. 4.3Mergesort MergesortisanO nlogn comparison-basedsortingalgorithm.Mergesort isalsoadivideandconqueralgorithmusedincomputerscience[19][20]. Thestepsofmergesortare: 1.Dividetheunsortedlistintonsublistshalfway,untileachlistcontaining 1elementalistof1elementisconsideredsorted.2.Repeatedlymergesublists toproducenewsortedsublistsuntilthereisonly1sublistremaining.Thiswill bethesortedlist. 4.4Performancetest ThesortingalgorithmsaretestedbothinMATLABandPSCAD/EMTDC. Sincethetic-tocfunctionisavailableinMATLAB,asmallarbitrarilytime scaleisenoughfortheMATLABbasedtests.However,thetic-tocfunctionis notavailableinPSCAD,soalongerperiodoftimeisnecessarytomakethe stopwatchreliableforthePSCADbasedtests. 4.4.1MATLABbasedtests Usingtic-tocfunctioninMATLAB,thesethreealgorithmscomputingtime arecomparedwithsameinputarrayasshowninTable4.1. 27

PAGE 40

Table4.1: MATLABbasedalgorithmsspeedtestresults. Algorithms time1s time2s time3s time4s time5s InsertionSort 0.0531 0.0541 0.0553 0.0562 0.0555 QuickSort 0.0209 0.0216 0.0213 0.0204 0.0212 MergeSort 0.0327 0.0351 0.0345 0.0361 0.0342 Thequicksortapproachistheoptimalchoice.MATLABalsogiveshints forthesortingalgorithmchoiceinSIMULINK.Whenthenumberofelements inanarrayislessthanorequalto32,MATLABrecommendstheinsertionsort, andwhenitisgreaterthan32,quicksortisrecommended. 4.4.2PSCAD/EMTDCbasedtests Inthissection,thethreesortingalgorithmsaretestedinPSCAD.Therst testshowshowthesesortingalgorithmsworktospeedupthevoltagebalancing control.Tomakethesortingprocessoccurfrequently,allthesixelementsofthe inputarraytorepresentavoltagearrayaredenedtobedierentfromeach otheratalltimesasshowninTable4.2. Table4.2: PSCADbasedalgorithmsvalidationtestinput. ElementsName ElementsVoltage V V =3sin !t +60+10 V V =3 : 5sin !t +75+10 V V =2sin !t +40+10 V V =sin !t +70+10 V V =sin !t +20+10 V V =2 : 2sin !t +118+10 Selectingtimeintervalbetween0sand0.035s,theinputVoltagearrayis showninFigure4.1. 28

PAGE 41

Figure4.1: PSCADbasedalgorithmsvalidationtestinputplot. AsmentionedinSection3,withouttheN-check,thesortedindiceswillbe asshowninFigure4.2.Combinedwiththedirectionofthearmcurrentow, theswitchingsignalTwillbeasshowninFigure4.3.Inthistest,thecurrent direction,Id,issettobeconstantlypositive.FromTtoT,again,they areonlyswitchedwhenNchanges.NalsodecidesthenumberoftheSMstobe ONorOFF.ForapositiveIdinthistest,theSMswithlowervoltagewillbe switchedON. Figure4.2: PSCADbasedalgorithmsvalidationtestoutput. 29

PAGE 42

Figure4.3: PSCADbasedalgorithmsvalidationtestswitchingarray. TheN-checkisrealizedbydelayingNforonesimulationtimestep,andthen comparingNwithNdelay.Thesortingprocesswillonlybetriggerediftheyare dierent,asinFigure4.4.ThesortedindiceswithN-checkwillbeasshownin Figure4.5.TheswitchingsignalswithN-checkwillbeasshowninFigure4.6. Figure4.4: PSCADbasedalgorithmsvalidationtesttrigger. 30

PAGE 43

Figure4.5: PSCADbasedalgorithmsvalidationtestoutputwithN{check. Figure4.6: PSCADbasedalgorithmsvalidationtestswitchingarray. Boththequicksortandthemergesortaredivide-and-conqueralgorithms andthereforeneedtobeprogrammedwithrecursivesubroutines.However,the FORTRANcompilerinsideofPSCADcannotacceptrecursivesubroutinesin programmedblocks.Thesolutionoftherecursiveprogrammingistousethe "AdditionalSourceles"andlinkthelestosimulations.Inasourcele,the quicksortandthemergesortsubroutinescanbeprogrammedrecursively.The quicksortandthemergesortsubroutinescanbe"called"bytheprogrammed blockinPSCAD,whichintroducesadditionalcommunicationtime.Therefore, 31

PAGE 44

aPSCADbasedalgorithmspeedtestisnecessary. Table4.3: PSCADbasedalgorithmsspeedtestsinputarrays. Index Array1 Array2 Array3 1 3sin !t +60+10 3sin !t +60+10 36 2 3 : 5sin !t +75+10 3 : 5sin !t +75+10 35 3 2sin !t +40+10 2sin !t +40+10 34 4 sin !t +70+10 sin !t +70+10 33 5 sin !t +20+10 sin !t +20+10 32 6 2 : 2sin !t +118+10 2 : 2sin !t +118+10 31 7 7 30 30 8 8 29 29 9 9 28 28 . . . . . . 36 36 1 1 Threesortingalgorithmsaretestedwiththreedierentinputarraysasin Table4.3.Array1requiresleasteorttosortbecausemostofthearrayis alreadyinascendingorder,andArray3requiresmosteorttosortbecauseit isinoppositeorder.Settingthetimestepto50 s,andplotstepto250 s,the timetocompletea100ssimulationforthreesortingalgorithmsissummarized inTable4.4. 32

PAGE 45

Table4.4: PSCADbasedalgorithmsspeedtestresults. Algorithms Simulation timesfor Array1 Simulation timesfor Array2 Simulation timesfor Array3 InsertionSort 53.94 54.17 66.66 MergeSort 55.69 52.40 54.14 QuickSort 64.41 54.38 64.41 Regarding36elements,Table4.4showsthat:itheinsertionsortisthe bestforaless-eortsortingsituation,iithequicksortspeedisnotstable, becauseitisinuencedbythepivotselectiontoomuch.Inthistest,therst elementisselectedasthepivot,iiithemergesorthasgoodspeedinallthree situations. Therefore,themergesortistheoptimalselectionwhenthecommunication timeisconsidered. 33

PAGE 46

5.Implementationofthedetailedmodelinamulti-core environment Otherthantheselectionofthesortingalgorithm,anewapproachisimplementedtoacceleratethesimulationonthesoftwareside.Thenewapproachis calledElectrical-Network-InterfaceENIandit'sfromPSCAD/EMTDC. TheconceptoftheENIapproachsplitstheprojectintopieces,andthe computationalburdenfromeverypieceisassignedtoeachCPUcoreofthe computer.Asaresult,theoverallCPUusagecanreach100%,asshownin Figure5.1.Foratypicalsimulation,onlytwocoreswilldotheprocessing, sotheCPUusagenormallyactsasshowninFigure5.2onaeight-coreCPU computer.TherearetworequirementsforENI:64-bitoperationsystemanda multi-coreCPU. Figure5.1: CPUmonitorintaskmanagerforENI. 34

PAGE 47

Figure5.2: CPUmonitorintaskmanagerforsinglecore. InordertofullyusetheCPU,thenumberofthesplittingpieceshastobe onelessthanthenumberoftheCPUcores,sinceonecorehastobeleftfor thePSCADsoftwareandwindowsoperations.Forexample,inacomputerwith eightcores,theoriginalprojectisbettertobesplitintosevenpieces.These sevenpieceswillbecomputedinparallel.Therefore,givingeachpieceanequal portionofthetotalworkispreferred,sothatthecoreswhonishtheirtasks willnothavetowaitforothercoreswhohavenotnished. ThebridgebetweendierentpiecesfortheENIapproachisthetransmission lineasshowninFigure5.3.Theoriginalprojectissplitintoasimulationsetof sevenprojectpieces,sincethecomputerrunningthesimulationhaseightcores. 35

PAGE 48

Figure5.3: ENIdetailedmodel. Aftersplitting,themainprojectpiececonsistsofthewholesystemcontrol, thegridandtheDClink.Theothersixprojectpiecescomprisetwoarms, 36

PAGE 49

thesortingprocess,theswitchingprocessandalltheSMs.InFigure5.3all transmissionlinesarerepresentedbyblacksolidsquares. ThemainprojectpiecePart1isbuiltasshowninFigure5.4,andother piecesPart2-Part7areshownasinFigure5.5.Thetransmissionlinesarealso usefulforsendingandreceivingdatainbetweendierentprojectpieces.As seeninFigure5.4and5.5,Part1sendsmodulationindicestoPart2,andPart2 sendsarmvoltagesbacktoPart1forbothupperandlowerarms. Figure5.4: ENIcircuitinPart1. 37

PAGE 50

Figure5.5: ENIcircuitinPart2. TheENIapproachalsoraisesanewrestrictionforthesimulationstep-time. Sincethetransmissionlineisthebridgetoconnectdierentpieces,the"signal travelingtime"needstobetakenintoaccount.PSCAD/EMTDCrequiresthe simulationsteptobeequalorsmallerthan10%ofthe"signaltravelingtime". ThecapacitivereactanceXCofthetransmissionlinecanbecalculatedtoavoid the"signaltravelingtime"issueusingthefollowingequation: TS = p CL whereCandLarethecapacitanceandtheinductanceofthetransmissionline, TSisthemaximumsimulationtimestep. InPSCAD/EMTDC,thetransmissionlinecanbesetinthe"Bergeron Mode"toavoidthesoilandthetransmissiontowerconguration.Afterward, using"ManualEntryofX,Y",theR =m ,XL =m ,XC M m parametersareset.Tomakethetransmissionlineequaltoaninductor,itrequires R=0andXC !1 .However,accordingtotheequationofthetimestep,the 38

PAGE 51

XCisdependentontheXL.Thiswillinuencethesimulationresults,itwillbe showninSection6. 39

PAGE 52

6.Simulationresults ThreetestcasesarebuilttoevaluatetheENImulti-coreapproach.The rsttwotestcasesincludesimulationsforthesingle-coreaveragemodel,the single-coredetailedmodelandtheeight-coredetailedmodel.Thethirdtest caseincludessimulationsfortheeight-coredetailedmodelfordierentnumber ofSMsperarm. Thesimulationresultswillincludetheactiveandreactivepowerforboth MMCconverters,theDClinkvoltageandthesynthesizedvoltage.SomeSM voltageswillalsobeshowninthedetailedmodelsimulation. 6.1Testcase1 Thersttestcaseusesthereferencesas: DClinkvoltagereference,Vdcref=400kV, WESTMMCactiveandreactivepowerreference,PWref=60MW,QWref=0 MVar, EASTMMCreactivepowerreference,QEref=10MVar. 6.1.1Averagemodeltestintheone-coreCPUenvironment Figure6.1showstheactiveandthereactivepoweroftheWESTMMC. Figure6.2showstheactiveandreactivepoweroftheEASTMMC.Figure6.3 showstheDClinkvoltage.Figure6.4showsthesynthesizedvoltage. 40

PAGE 53

Figure6.1: WESTMMCactivepowerandreactivepower. Figure6.2: EASTMMCactivepowerandreactivepower. Figure6.3: DClinkVoltage. 41

PAGE 54

Figure6.4: SynthesizedvoltageVaVbVc. 6.1.2Detailedmodeltestintheone-coreCPUenvironment Figure6.5showstheactiveandreactivepoweroftheWESTMMC.Figure 6.6showstheactiveandreactivepoweroftheEASTMMC.Figure6.7shows theDClinkvoltage.Figure6.8showsthesynthesizedvoltage. Figure6.5: WESTMMCactivepowerandreactivepower. 42

PAGE 55

Figure6.6: EASTMMCactivepowerandreactivepower. Figure6.7: DClinkVoltage. Figure6.8: SynthesizedvoltageVaVbVc. 43

PAGE 56

6.1.3Detailedmodeltestintheeight-coreCPUenvironment Figure6.9showstheactiveandreactivepoweroftheWESTMMC.Figure 6.10showstheactiveandreactivepoweroftheEASTMMC.Figure6.11shows theDClinkvoltage.Figure6.12showsthesynthesizedvoltage. Figure6.9: WESTMMCactivepowerandreactivepower. Figure6.10: EASTMMCactivepowerandreactivepower. 44

PAGE 57

Figure6.11: DClinkVoltage. Figure6.12: SynthesizedvoltagesVaVbVc. Inanarmofthemulti-coredetailedmodel,12SMsvoltagearerandomly selectedasshowninFigure6.13.Theyarealmostoverlapping,whichshowsthe sortingprocessisworkingwell. 45

PAGE 58

Figure6.13: Voltageof12SMs. 6.2Testcase2 Thesecondtestcaseusesthereferencesas: DClinkvoltagereference,Vdcref=400kV, WESTMMCactiveandreactivepowerreference,PWref=40MW,QWref=10MVar, EASTMMCreactivepowerreference,QEref=20MVar. 6.2.1Averagemodeltestintheone-coreCPUenvironment Figure6.14showstheactiveandthereactivepoweroftheWESTMMC. Figure6.15showstheactiveandreactivepoweroftheEASTMMC.Figure6.16 showstheDClinkvoltage.Figure6.17showsthesynthesizedvoltage. 46

PAGE 59

Figure6.14: WESTMMCactivepowerandreactivepower. Figure6.15: EASTMMCactivepowerandreactivepower. Figure6.16: DClinkVoltage. 47

PAGE 60

Figure6.17: SynthesizedvoltageVaVbVc. 6.2.2Detailedmodeltestintheone-coreCPUenvironment Figure6.18showstheactiveandreactivepoweroftheWESTMMC.Figure 6.19showstheactiveandreactivepoweroftheEASTMMC.Figure6.20shows theDClinkvoltage.Figure6.21showsthesynthesizedvoltage. Figure6.18: WESTMMCactivepowerandreactivepower. 48

PAGE 61

Figure6.19: EASTMMCactivepowerandreactivepower. Figure6.20: DClinkVoltage. Figure6.21: SynthesizedvoltageVaVbVc. 49

PAGE 62

6.2.3Detailedmodeltestintheeight-coreCPUenvironment Figure6.22showstheactiveandreactivepoweroftheWESTMMC.Figure 6.23showstheactiveandreactivepoweroftheEASTMMC.Figure6.24shows theDClinkvoltage.Figure6.25showsthesynthesizedvoltage. Figure6.22: WESTMMCactivepowerandreactivepower. Figure6.23: EASTMMCactivepowerandreactivepower. 50

PAGE 63

Figure6.24: DClinkVoltage. Figure6.25: SynthesizedvoltagesVaVbVc. 6.3Testcase3 Intestcase3,onlythemulti-coremodelsaretested.Thesimulationresult ofthesynthesizedvoltagewithdierentnumberofSMs,Nsm=36,Nsm=108 areasshowninFigure6.26andFigure6.27. 51

PAGE 64

Figure6.26: SynthesizedvoltagesVaVbVcNsm=36. Figure6.27: SynthesizedvoltagesVaVbVcNsm=108. ItisworthnotingthatasthenumberoftheSMsperarmincreases,thebad eectfromtheENIapproachdecreases. 6.4Comparativeevaluation Fromthesimulations,theresultsshowthat: TheactiveandreactivepowerofbothWESTandEASTMMCinalltests meetthereferencesatsteadystate. 52

PAGE 65

Thesynthesizedvoltageofthemulti-coremodelcontainssomenoisenot seenintheone-coremodels. TheDCvoltageinthemulti-coremodelcontainsnoiseaswell. Thenoiseinthemulti-coremodeldecreaseswhenthenumberofSMsper armgains. ThesourceofthisnoiseistheENIbridge,transmissionline.SincetransmissionlineandcablearetheonlyavailablebridgefortheENIapproach,the bestwaytosplitsystemisreplacinginductorsbytransmissionlines.Sincethe transmissionlinecanbetreatedasaseriesconnectionof -structures,asshown inFigure6.28,theshorterthelengthis,theless -structureswillexist.Even thoughthelengthofeverytransmissionlineissetas1m,thenoisestillexists. ThisisthedownsideoftheENIapproach.ThisdrawbackoftheENIapproach isdecreasedasthenumberoflevelsincreases. Figure6.28: Transmissionlineand -structure. 6.5SimulationspeedversusSMsnumber Themaincontributionofthisthesisisspeedingupthesimulations.Accordingto[10][16][21],thetypicaldetailedMMCmodelsimulationwithalarge numberofSMsisslow.AtableofsimulationtimeversusSMsnumberperarm 53

PAGE 66

issummarizedintheTable6.1inthesingle-coreCPUenvironment.Itshows howmuchtimeitwilltaketonish1ssimulation. Table6.1: SimulationtimeversusSubmodulenumberoneacharm. ArmSMsnumber 14 16 18 20 22 24 Simulationtimes 232 392 541 710 902 1044 ArmSMsnumber 26 28 30 32 34 36 Simulationtimes 1424 1693 2520 2848 3086 4084 AquadraticcurvetforthedatainFigure6.29isobtainedusingthe"basic tting"toolbyMATLAB.TheequationofsimulationtimeversusSMsnumber perarmis: T =6 : 9 N 2 )]TJ/F15 11.9552 Tf 11.955 0 Td [(180 N +1500 NotethatifthenumberoftheSMsperarmis200,itwilltake86400sto nish1sdurationofrun.Forthetestcaseswith36SMsperarm,itonlytakes 94.4stosimulateonesecondwiththemulti-coreapproachvs.4048sreported intheliteratureforasingle-corearchitecture.Thisisasimulationspeedgain of43times. 54

PAGE 67

Figure6.29: Simulationtimecurve. 55

PAGE 68

7.Conclusions AnHVDCsystembasedonMMCtopologyhasbeenmodeledtooneaverage andtwodetailedmodelsandsimulatedinasingle-coreandamulti-coreenvironment.TheperformanceofthreesortingalgorithmsareevaluatedbyMATLAB andPSCAD/EMTDC. Thesimulationspeedhasbeengreatlyimprovedwiththehelpofselected sortingalgorithmandtheENIapproach.Comparedtotheaveragemodel, thedetailedmodelcanshowmoreinformationsuchasthesubmodulevoltage proles.Theapproachinamulti-coreenvironmentmakesitpossibletosimulate alargesysteminthedetailedmodelwithinareasonabletimeframe. IntheENIapproach,inductorsarereplacedbythetransmissionlinemodels. ThisapproximationintroducesnoiseontheDClinkandsynthesizedvoltage. Thisseemstobeahugeproblemtothedetailedmodelwith36submodulesin eacharm.However,intherealMMC-HVDCtechnologyprojects,itusuallyhas morethan200submodulesineacharm,andtheintroducednoisewilldecrease asthesubmodulesnumberincreases. Therefore,theENIapproachinamulti-coreenvironmentcanacceleratethe simulationsignicantly,anditwillbeeectiveforMMCsimulationswithahigh numberofsubmodules. 56

PAGE 69

8.Futurework Inthefuture,thefollowingworkmaybedone: Morecomparisons:Thecirculatingcurrenteectscanbeanalyzed. ENIbridge:Inthefuture,itcanbeimprovediftheinductorsubstitution isbetter. Optimalwayofsplitting:Theoriginalprojecthasbeensplitbyassumed modelbranchcomputationalequality,therecouldbebetterwaystosplit thesystemtomaximizetheCPUusage.Onepossibleapproachtodothis couldbetousethesoftwareVTunetoanalyzeCPUusage. 57

PAGE 70

REFERENCES [1]M.Davies,M.Dommaschk,J.Dorn,J.Lang,D.Retzmann,andD.Soerangr.HVDCPLUS{Basicsandprincipleofoperation. SiemensEnergy Sector,ETPSSL/DSoe/Re-2008-08-10-HVDCPLUSV ,3,2008. [2]B.Gemmell,J.Dorn,D.Retzmann,andD.Soerangr.ProspectsofmultilevelVSCtechnologiesforpowertransmission.In T&DConf.andExpo., 2008.T.D.IEEE/PES ,pages1{16,Apr.2008. [3]T.Westerweller,K.Friedrich,U.Armonies,A.Orini,D.Parquet,and S.Wehn.Transbaycable{WorldsrstHVDCsystemusingmultilevel voltage{sourcedconverter. [4]Siemens.HVDCPlusReferences.[Online]Available: http://www.energy.siemens.com/us,2013. [5]B.Jacobson,P.Karlsson,G.Asplund,L.Harnefors,andT.Jonsson.VSC{ HVDCtransmissionwithcascadedtwo{levelconverters.In CIGREsession pagesB4{B110,2010. [6]J.Arrillaga,Y.H.Liu,andN.R.Watson. FlexiblePowerTransmission: TheHVDCOptions .JohnWiley&Sons,Inc.,2007. [7]N.Flourentzou,V.G.Agelidis,andG.D.Demetriades.VSC{BasedHVDC PowerTransmissionSystems:AnOverview. IEEETrans.PowerElectron. 24:592{602,Mar.2009. [8]A.Antonopoulos,L.Angquist,andH-P.Nee.Ondynamicsandvoltage controlofthemodularmultilevelconverter.In 13thEuropeanConf.on PowerElectron.andApplicat. ,pages1{10,2009. [9]S.Rohner,S.Bernet,M.Hiller,andR.Sommer.Modulation,losses,and semiconductorrequirementsofmodularmultilevelconverters. IEEETrans. Ind.Electron. ,57:2633{2642,Aug.2010. [10]X.Jianzhong,Z.Chengyong,L.Wenjing,andG.Chunyi.Accelerated modelofmodularmultilevelconvertersinPSCAD/EMTDC. IEEETrans. PowerDel. ,28:129{136,2013. 58

PAGE 71

[11]G.Bergna,E.Berne,P.Egrot,P.Lefranc,A.Arzande,J.C.Vannier, andM.Molinas.Anenergy{basedcontrollerforHVDCmodularmultilevelconverterindecoupleddoublesynchronousreferenceframeforvoltage oscillationreduction. IEEETrans.Ind.Electron. ,60:2360{2371,Jun. 2013. [12]J.Peralta,H.Saad,S.Dennetiere,J.Mahseredjian,andS.Nguefeu.Detailedandaveragedmodelsfora401{levelMMC{HVDCsystem. IEEE Trans.PowerDel. ,27:1501{1508,2012. [13]G.Minyuan,X.Zheng,andC.Hairong.ControlandmodulationstrategiesformodularmultilevelconverterbasedHVDCsystem.In IEEEInd. Electron.Soc.Annu.Conf. ,pages849{854,2011. [14]P.SotoodehandR.D.Miller.Anewmulti{levelinverterwithFACTS capabilitiesforwindapplications.In IEEEGreenTechnologiesConf. ,pages 271{276,Apr.2013. [15]M.SaeedifardandR.Iravani.Dynamicperformanceofamodularmultilevel back{to{backHVDCsystem. IEEETrans.PowerDel. ,25:2903{2912, Oct.2010. [16]U.N.Gnanarathna,A.M.Gole,andR.P.Jayasinghe.Ecientmodelingof modularmultilevelHVDCconvertersMMConelectromagnetictransient simulationprograms. IEEETrans.PowerDel. ,26:316{324,2011. [17]AlgorithmsandDataStructuresSlectionSort.[Online]Available: http://www.algolist.net/Algorithms. [18]D.Knuth. TheArtofComputerProgramming3nded. .Addison{ Wesley,1998. [19]B.Jon. ProgrammingPearls. Addison{WesleyProfessional,1999. [20]R.MillerandL.Boxer. Algorithmssequential¶llel:auniedapproach [21]F.Yu,W.Lin,X.Wang,andD.Xie.Fastvoltage{balancingcontroland fastnumericalsimulationmodelforthemodularmultilevelconverter. IEEE Trans.PowerDel. ,30:220{228,Feb.2015. [22]P.Le{Huy,P.Giroux,andJ.C.Soumagne.Real{timesimulationofmodularmultilevelconvertersfornetworkintegrationstudies.In Proc.IPST 2011. 59

PAGE 72

APPENDIXA.FORTRANcodesforthedetailedmodel Inthischapter,thealgorithmofsortingisshown.ThecodesareprogrammedintheFORTRANlanguage,whichcanbedirectlycompiledbythe PSCAD.InsteadofinjectingCleorMatlable,theFORTRANapproachappearstobethebestchoice,asforsavingthesimulationtime.Hereisthecode usingInsertionSortinPSCAD. #LOCALrealA #LOCALrealB #LOCALrealclmfst #LOCALrealclmscd #LOCALintegertri !CHECKIFNCHANGE !---STORAGEMATRIX-----! !---INITIALORIGINALMATRIX2NDCLOWITHLABELS---! DOI=1,36 clmscdI=I ENDDO !---INITIALORIGINALMATRIX1STCLOWITHVOLTAGES---! DOJ=1,36 clmfstJ=$INJ 60

PAGE 73

ENDDO !---SORTMATRIXROWSBASEDON1STCLOVALUESINASENDINGSEQUENCE---! DOI=1,36 DOJ=I+1,36 IFclmfstJ.LT.clmfstITHEN A=clmfstJ clmfstJ=clmfstI clmfstI=A B=clmscdJ clmscdJ=clmscdI clmscdI=B ENDIF ENDDO ENDDO !---GIVEOUTWITHSORTEDLABELS---! DOI=1,36 $OUTI=clmscdI ENDDO tri=0 !---GIVETWITH1/0BASEDONNUMBEROFON/OFFCAPS-NANDCURRENTDIRECTION-ID---! if$ID.gt.0.and.tri.eq.0then tri=1 61

PAGE 74

doi=1,36 ifi.le.NTthen $Tclmscdi=0 else $Tclmscdi=1 endif enddo elseif$ID.le.0.and.tri.eq.0then tri=2 doi=1,36 ifi.le.36-NTthen $Tclmscdi=1 else $Tclmscdi=0 endif enddo endif HereisthecodecallingMergeSortorQuickSort. #LOCALintegernum #LOCALintegervsarray #LOCALintegervlb #LOCALintegerTT #LOCALintegerTlb if$N.ne.$Ndthen 62

PAGE 75

num=36 doi=1,num vsarrayi=$INi*10 vlbi=i enddo !callMergeSort callMergeSortvsarray,vlb,num,TT,Tlb !callQuickSort callQuickSortvsarray,vlb,num if$ID.ge.0then doi=1,$N $Tvlbi=0 enddo doi=$N+1,num $Tvlbi=1 enddo else doi=1,num-$N $Tvlbi=1 enddo doi=num+1-$N,num $Tvlbi=0 63

PAGE 76

enddo endif endif HereisthelinkedFORTRANleforMergeSort. subroutineMergeA,ALB,NA,B,BLB,NB,C,CLB,NC integer,intentin::NA,NB,NC integer,intentinout::ANA integer,intentinout::ALBNA integer,intentin::BNB integer,intentin::BLBNB integer,intentinout::CNC integer,intentinout::CLBNC integer::I,J,K I=1;J=1;K=1; dowhileI<=NA.and.J<=NB ifAI<=BJthen CK=AI CLBK=ALBI I=I+1 else CK=BJ 64

PAGE 77

CLBK=BLBJ J=J+1 endif K=K+1 enddo dowhileI<=NA CK=AI CLBK=ALBI I=I+1 K=K+1 enddo dowhileJ<=NB CK=BJ CLBK=BLBJ J=J+1 K=K+1 enddo return endsubroutinemerge recursivesubroutineMergeSortA,ALB,N,T,TLB integer,intentinout::N 65

PAGE 78

integer,dimensionN,intentinout::A integer,dimensionN,intentinout::ALB integer,dimensionN+1/2,intentout::T integer,dimensionN+1/2,intentout::TLB integer::NA,NB,V,VLB ifN<2return ifN==2then ifA>Athen V=A VLB=ALB A=A ALB=ALB A=V ALB=VLB endif return endif NA=N+1/2 NB=N-NA callMergeSortA,ALB,NA,T,TLB callMergeSortANA+1,ALBNA+1,NB,T,TLB 66

PAGE 79

ifANA>ANA+1then T:NA=A:NA TLB:NA=ALB:NA callMergeT,TLB,NA,ANA+1,ALBNA+1,NB,A,ALB,N endif return endsubroutineMergeSort HereisthelinkedFORTRANleforQuickSort. recursivesubroutineQSorta,alb,na integer,intentin::na integer,dimensionna,intentinout::a integer,dimensionna,intentinout::alb integer::left,right integer::pivot integer::temp,templb integer::marker ifna>1then pivot=a 67

PAGE 80

left=0 right=na+1 dowhileleftpivot right=right-1 enddo left=left+1 dowhilealeft
PAGE 81

else marker=left endif callQSorta:marker-1,alb:marker-1,marker-1 callQSortamarker:,albmarker:,na-marker+1 endif endsubroutineQSort 69