## 3 Operating Principles and Mathematical Modelling of the Proposed Controller Design Test  
### 3.1 Bench for the HVDC MMC  
The single-phase topology of the MMC is shown in Figure 2a, which is composed of one phase/arm. The phase is further divided into an upper arm and a lower arm connected together by inductors. Each arm has \(N\) connected submodules (SMs) (SM1, SM2, etc.) in series, and each SM consists of two switches and a capacitor connected across them. By applying [PERSON]'s voltage law (KVL) in the upper and lower loops, as shown in Figure 2a, we obtain  
\[V=\frac{1}{2}V_{dc}-V_{u}-L\frac{di_{U}}{dt} \tag{1}\]  
\[V=-\frac{1}{2}V_{dc}+V_{L}+L\frac{di_{L}}{dt} \tag{2}\]  
Figure 2: (**a**) Single-phase modular multilevel converter (MMC) circuit diagram; (**b**) equivalent circuit of the MMC. Then we apply [PERSON]'s current law (KCL) to obtain the output current:  
\[i=i_{L}+i_{U} \tag{3}\]  
The equivalent circuit of the MMC is shown in Figure 2b. Using Equations (1) and (2), the output voltage is  
\[V=\frac{1}{2}(V_{L}-V_{U})+\frac{L}{2}\frac{di}{dt} \tag{4}\]  
It is clear from Equation (3) that the equivalent inner voltage of the phase can be expressed as  
\[V_{E}=\frac{1}{2}(V_{L}-V_{U}) \tag{5}\]  
Generally, the \(V_{E}\) can be shown as  
\[V_{E}^{ref}=\frac{mV_{dc}}{2}\cos(\omega t) \tag{6}\]  
where \(m\) is the modulation index with \(0<m<1\) and \(\omega\) is the angular frequency. \(N\) submodules are used in the circuit with conventional NLM methods, so Equation (7) is satisfied on the DC side. \[V_{dc}=V_{L}+V_{U} \tag{7}\]  
Reference voltages for the upper and lower arms can be expressed as  
\[V_{U}^{ref}=\frac{V_{dc}}{2}[1-m\cos(\omega t)] \tag{8}\]  
\[V_{L}^{ref}=\frac{V_{dc}}{2}[1+m\cos(\omega t)] \tag{9}\]  
The circulating currents flowing due to the voltage difference in each arm can be found by Equations (10)-(12). These currents distort the leg current, produce additional heat in the switches, increase the rated current of power devices, and cause loss in the MMC. They must be controlled and reduced to avoid losses and reduce system cost. \[V=-\frac{1}{2}V_{dc}+V_{L}+L\frac{di_{L}}{dt} \tag{2}\]0  
\[V=-\frac{1}{2}V_{dc}+V_{L}+L\frac{di_{L}}{dt} \tag{2}\]1  
\[V=-\frac{1}{2}V_{dc}+V_{L}+L\frac{di_{L}}{dt} \tag{2}\]2  
Equations (1) and (2) provide an understanding of the operation of the MMC. The SM voltages should be equal to \(\frac{1}{2}\)\(V_{dc}\) with the total DC link voltage \(V_{dc}\). Consider a basic three-level MMC with two SMs in the upper arm and two in the lower arm. When one SM is inserted in each arm, using Equations (1) and (2), we will get zero. Similarly, when all the SMs in the lower arm are inserted and the SMs in the upper arm are bypassed, we will get an output voltage of \(\frac{1}{2}\)\(V_{dc}\). When all the SMs in the upper arm are inserted, and the SMs in the lower arm are bypassed, we will obtain \(-\frac{1}{2}\)\(V_{dc}\). In case of an even number of levels, a zero output voltage cannot be obtained. The switching pattern of the SMs is shown in Table 1, and the waveform is displayed in Figure 3a. We can conclude from the switching pattern that when all the SMs in the lower arm are inserted and the SMs in the upper arm are bypassed, we will observe a positive peak voltage. Similarly, when all the SMs in the upper arm are inserted and the SMs in the lower arm are bypassed, we will observe negative peaks in the output waveform. Using this concept, we can develop a switching pattern for any number of levels.