Professional Documents
Culture Documents
ENVIRONMENT
by
XIAODAN WANG
Master of Science
Electrical Engineering
2015
This thesis for the Master of Science degree by
Xiaodan Wang
by
Titsa Papantoni
Dan Connors
ii
Wang, Xiaodan (Electrical Engineering)
Accelerating Detailed Simulations of an HVDC System Based on Modular Mul-
tilevel Converters in a Multi-core Environment
ABSTRACT
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
of the HVDC system based on the MMC topology. This approach is evaluated
model and a eight-core detailed model. This thesis also includes an analysis
iii
The form and content of this abstract are approved. I recommend its publication.
iv
DEDICATION
v
ACKNOWLEDGMENT
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
3. Control scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.3 Modulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4. Sorting algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
vii
4.4.2 PSCAD/EMTDC based tests . . . . . . . . . . . . . . . . . . . . 28
6. Simulation results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
7. Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
8. Future work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Appendix
viii
FIGURES
Figure
each phase. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
ix
4.3 PSCAD based algorithms validation test switching array. . . . . . . 30
x
6.16 DC link Voltage. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
xi
TABLES
Table
xii
1. Introduction
A new High Voltage Direct Current (HVDC) transmission technology based
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].
levels per arm [2]. Nowadays, there are five MMC-HVDC projects in progress
in Europe [3][4].
plained in Section 1; the power stage design is shown in Section 2; the control
are shown in Section 6; the conclusions are shown in Section 7; the future work
is shown in Section 8.
very little ripple can be achieved, this minimizes the level of generated
harmonics and in most cases completely eliminates the need for AC filters.
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.
are mandatory.
low.
ination, etc.
2
2. Power stage
In a back-to-back configuration, two converters are connected by a DC link
their amplitudes (V̂1 , V̂2 ) and phase angles (θ1 , θ2 ). Active power injections
depend mainly on phase angles, while reactive power injections depend on the
control of the voltage amplitudes V̂1 and V̂2 . Therefore, reactive power injections
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
V1 V2
MMC MMC
1 2
AC System 1 AC System 2
θ1 θ2
V̂1 V̂2
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
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
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
Leg
Arm
SM SM Arm Arm Arm
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.
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
5
bus2
Ibus Main : C... Main : C...
East AC System
Voltage west Voltage east
West AC System 1.5 1.5
A A
BRK
0.1132 [H] V V 0.2598 [H]
V F Ph Ph F V
R=0
V
200.0
0.0
0.0
60.0
60.0
10 [uF]
0.1 0.1
1 1
DC Link
Timed
umec West MMC DC_1 Breaker DC_1
East MMC umec Voltage east
6
Vdc Logic
#1 #2
AC BRK #2
AC #1
* Closed@t0 *
DC_2 DC_2
Voltage west
BRK
Q_ref P_ref P_ref Q_ref
R=0
230.0
230.0
V
10 [uF]
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
imum forward current of 1.2 kA. The resistance of the selected IGBT is 1 mΩ,
therefore, the total resistance of each arm is 36 mΩ. The capacitance of each
2SEMMC
C=
6Narm VC2
where S is the nominal power of the converter, EMMC is the capacitor’s storage
energy in [KJ/MVA], Narm is the number of the SMs in each arm, and VC is the
SM nominal voltage.
kJ
With a storage energy of 331 MVA [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 system’s base impedance, as shown in the
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 (∆)
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 (mΩ) 1
SM Capacitor (mF) 14.6
Arm inductance (H) 0.1172
DC Link Capacitor
Capacitance (µF) 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 (mΩ) 1
SM Capacitor (mF) 14.6
Arm inductance (H) 0.1172
East Transformer
Primary Voltage (kV) 230 (Y)
Secondary Voltage (kV) 180 (∆)
Power Rating (MVA) 133
Leakage Reactance (pu) 0.1
East AC System
Bus Voltage West (kV) 230
Thevenin Equivalent Impedance (H) 0.2598
8
voltage source, and the calculation is shown in Section 3. The series resistance
Average Vout
R
Arm V-calculated
Nin
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
9
L
Detailed Vout SM
SM Controls
Arm
Nin
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 mΩ).
10
Capacitor off-state Capacitor on-state
C C
C C
Finally, the WEST and EAST MMC are modified with either average or
11
DC_1
Vout Vout Vout
MMC MMC MMC
Vap_eq Vbp_eq Vcp_eq
average average average
or or or
Nin Nin Nin
detailed detailed detailed
Np_a Np_b Np_c
arm arm arm
P = 0.0001059
Q = -0.001344
BRK
A
AC V
DC_2
12
3. Control scheme
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
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
Rectifier control Wi
i = a, b, c
Leg energy controller
udiff i 1
Reactive power i = a, b, c
Qrect Qref rect Iq ref
reference generator
Power–to–current
transformation Current controller Modulation
Control panel
Figure 3.2 shows the overall control strategy. Through the ABC-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
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
Following the active and reactive power generators, the power references are
14
transformation is based on the following equations:
3
P = (vd id + vq iq ),
2
3
Q = (−vd iq + vq id ).
2
The Phase Lock Loop(PLL) forces vq = 0, which will simplify the above
current are compared to generate an error, and the error is driven to zero with
Figure 3.3. The output signals of the current controller, Ea, Eb and Ec, will be
Iq
*
P
Idref Ed
Pref Ea
DQ
I
1.5 Vd Id Vd Eb
to
Vq
P
Iqref Eq ABC Ec
Pref
I
-1.5 Vd Iq Id
*
wL
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
1
Dif fi = (Wi ref − Wi )(Ki + Kp ) i = a, b, c,
s
P
Diff
320000
Vup 2
X I
Vlow W
2
X
3.3 Modulation
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:
Vdc 1
Niup = − Ei − Udiff i i = a, b, c
2 Viu eq
Vdc 1
Nilow = + Ei − Udiff i i = a, b, c
2 Vil eq
which is determined by the current controller, and Udiff i is the output of the
leg energy controller. At any point in time the sum of the upper and lower
Nup + Nlow = 1
Figure 3.5.
Diff-a
Vdc
* Na-up
2 Ea Va-up N N
Diff-a Quantizer
Vdc
* Na-low
2 Ea Va-low N N
17
3.3.1 Control of the average model
CSM
Ceq =
n
where Varm iup and Varm ilow are the equivalent voltages of the upper arm and the
lower arm. Combining the three equations above, the Varm iup and Varm ilow are:
Iiup
Z
Varm iup = Ceq
dt i = a, b, c
Nupi
Iilow
Z
Varm ilow = Ceq
dt i = a, b, c
Nlowi
Based on these equations, the average arm can be modeled as shown in Figure
3.6.
18
Nin * I-equiv
L
I
19
Nin
L
Delay
T(1)
Detailed Vout SM V(1)
T(2)
SM V(2) Sorting
T(3) Varray Algorithm
SM V(3)
Arm and
Nin T(N)
SM V(N) Switching
Tarry
I
Vout
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
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
Assuming there are N SMs in each arm, to satisfy Kirchhoff’s Voltage Law
(KVL), the synthesized voltage on phase A needs to fit both upper arm’s and
N = Nupperarm + Nlowerarm
Solving the above equations set, Vsm equals Vdc/N. Assuming four SMs, Va
21
Table 3.1: Phase voltage in terms of N.
size of every step may be different without control. To equalize all the steps,
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
22
Voltage Array Indices Array
Sorting with a
selected algorithm Sorting process
Current .GE. 0 ?
Yes No
Select N count SMs Select N count SMs
with low voltage with low voltage
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
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
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
complexity (big O notation) in terms of the size of the list(N). The candidate
• Insertion Sort
• Quick Sort
• Merge 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
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
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
O(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].
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.
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
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 O(n) addi-
tional scratch space. After the array has been partitioned, the two partitions
quick sort sorts an array of size n in O(nlogn) work in O(log 2 n) time using O(n)
additional space.
is also a divide and conquer algorithm used in computer science [19] [20].
1. Divide the unsorted list into n sublists halfway, until each list containing
to produce new sorted sublists until there is only 1 sublist remaining. This will
scale is enough for the MATLAB based tests. However, the tic-toc function is
27
Table 4.1: MATLAB based algorithms speed test results.
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,
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
Selecting time interval between 0s and 0.035s, the input Voltage array is
28
Figure 4.1: PSCAD based algorithms validation test input plot.
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(1) 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.
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.
30
Figure 4.5: PSCAD based algorithms validation test output with N–check.
Both the quick sort and the merge sort are divide-and-conquer algorithms
”Additional Source files” and link the files to simulations. In a source file, 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
31
a PSCAD based algorithm speed test is necessary.
Three sorting algorithms are tested with three different input arrays as in
Table 4.3. Array1 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 µs, and plot step to 250 µs, the
in Table 4.4.
32
Table 4.4: PSCAD based algorithms speed test results.
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
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.
34
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
PHBwest PHBeast
PHCwest PHCeast
Transmission Line
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
The main project piece (Part1) 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, Part1 sends modulation indices to Part2, and Part2
sends arm voltages back to Part1 for both upper and lower arms.
P P P
ar ar ar
t2 t3 t4
:T :T :T
lin lin lin
Nanw 2 1 Napw e3 e5 e7
2 1 Timed
Nbnw Nbpw Breaker
BRKdc Logic Edc
Closed@t0
Tline1
Tline2
4e 6e 8e
nli nli nli
:T :T :T
2t 3t 4t
ra ra ra
P P P
37
N d elia t ed
N d elia t ed
4
neli
T
sms 63
sms 63
po te
po te
V mra
mra
t ob e
t ob e
3 enil T
V
0 enil T:1 traP
2 1
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
simulation step to be equal or smaller than 10% of the ”signal traveling time”.
where C and L are the capacitance and the inductance of the transmission line,
Mode” to avoid the soil and the transmission tower configuration. Afterward,
eters are set. To make the transmission line equal to an inductor, it requires
R=0 and XC→ ∞. 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
The simulation results will include the active and reactive power for both
MMC converters, the DC link voltage and the synthesized voltage. Some SM
• WEST MMC active and reactive power reference, PWref=60 MW, QWref=0
MVar,
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
Figure 6.1: WEST MMC active power and reactive power.
41
Figure 6.4: Synthesized voltage Va Vb Vc.
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
42
Figure 6.6: EAST MMC active power and reactive power.
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
44
Figure 6.11: DC link Voltage.
selected as shown in Figure 6.13. They are almost overlapping, which shows the
45
Figure 6.13: Voltage of 12 SMs.
• WEST MMC active and reactive power reference, PWref=40 MW, QWref=-
10 MVar,
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
Figure 6.14: WEST MMC active power and reactive power.
47
Figure 6.17: Synthesized voltage Va Vb Vc.
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
48
Figure 6.19: EAST MMC active power and reactive power.
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
50
Figure 6.24: DC link Voltage.
In test case 3, only the multi-core models are tested. The simulation result
51
Figure 6.26: Synthesized voltages Va Vb Vc(Nsm=36).
It is worth noting that as the number of the SMs per arm increases, the bad
• The active and reactive power of both WEST and EAST MMC in all tests
52
• The synthesized voltage of the multi-core model contains some noise not
• 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
in Figure 6.28, the shorter the length is, the less π-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
C C C C
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
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
Note that if the number of the SMs per arm is 200, it will take 86400s to
finish 1s 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
of 43 times.
54
Simulation time respect to SMs number per arm
6000
data 1
2 quadratic
y = 6.9*x - 1.8e+02*x + 1.5e+03
5000
Simulation time for 1 sec duration
4000
3000
2000
1000
0
10 15 20 25 30 35 40
SMs number per arm
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-
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
In the ENI approach, inductors are replaced by the transmission line models.
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
simulation significantly, and it will be effective for MMC simulations with a high
number of submodules.
56
8. Future work
is better.
• Optimal way of splitting: The original project has been split by assumed
the system to maximize the CPU usage. One possible approach to do this
57
REFERENCES
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):2360–2371, Jun.
2013.
[12] J. Peralta, H. Saad, S. Dennetiere, J. Mahseredjian, and S. Nguefeu. De-
tailed and averaged models for a 401–level MMC–HVDC 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):316–324, 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(1):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-
PSCAD. Instead of injecting C file or Matlab file, the FORTRAN approach ap-
pears to be the best choice, as for saving the simulation time. Here is the code
#LOCAL real A
#LOCAL real B
!CHECK IF N CHANGE
!---STORAGE MATRIX-----!
DO I=1,36
clmscd(I)=I
END DO
DO J=1,36
clmfst(J)=$IN(J)
60
END DO
DO I=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
DO I=1,36
$OUT(I)=clmscd(I)
END DO
tri=0
!---GIVE T WITH 1/0 BASED ON NUMBER OF ON/OFF CAPS-N AND CURRENT DIRECTION-ID-
tri=1
61
do i=1, 36
$T(clmscd(i))=0
else
$T(clmscd(i))=1
end if
end do
tri=2
do i=1, 36
$T(clmscd(i))=1
else
$T(clmscd(i))=0
end if
end do
end if
62
num=36
do i=1, num
vsarray(i)=$IN(i)*10
vlb(i)=i
end do
!call MergeSort
!call QuickSort
do i=1,$N
$T(vlb(i))=0
end do
do i=$N+1, num
$T(vlb(i))=1
end do
else
do i=1, num-$N
$T(vlb(i))=1
end do
do i=num+1-$N, num
$T(vlb(i))=0
63
end do
endif
endif
subroutine Merge(A,ALB,NA,B,BLB,NB,C,CLB,NC)
integer :: I,J,K
I = 1; J = 1; K = 1;
C(K) = A(I)
CLB(K)=ALB(I)
I = I+1
else
C(K) = B(J)
64
CLB(K)=BLB(J)
J = J+1
endif
K = K + 1
enddo
C(K) = A(I)
CLB(K)=ALB(I)
I = I + 1
K = K + 1
enddo
C(K) = B(J)
CLB(K)=BLB(J)
J = J + 1
K = K + 1
enddo
return
65
integer, dimension(N), intent(in out) :: A
integer :: NA,NB,V,VLB
if (N < 2) return
if (N == 2) then
V = A(1)
VLB=ALB(1)
A(1) = A(2)
ALB(1)=ALB(2)
A(2) = V
ALB(2)=VLB
endif
return
endif
NA=(N+1)/2
NB=N-NA
call MergeSort(A,ALB,NA,T,TLB)
call MergeSort(A(NA+1),ALB(NA+1),NB,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
integer, intent(in) :: na
integer :: pivot
integer :: marker
pivot = a(1)
67
left = 0
right = na + 1
right = right - 1
right = right - 1
enddo
left = left + 1
left = left + 1
enddo
temp = a(left)
templb = alb(left)
a(left) = a(right)
alb(left) = alb(right)
a(right) = temp
alb(right) = templb
end if
enddo
marker = left + 1
68
else
marker = left
end if
call QSort(a(:marker-1),alb(:marker-1),marker-1)
call QSort(a(marker:),alb(marker:),na-marker+1)
end if
69