**3. Current Balancing Algorithm**

Table 1 provides the total number of ON switches for all the modules in the MCSI at any given instance. In odd intervals, the commands for the upper switches in each module are the same, the upper switch of a specified phase is turned ON in every module. On the other hand, the numbers of lower switches that should be turned ON in each phase of the MCSI are di fferent. During Interval I, for example, Table 1 specifies how many modules should have their *Sal*, *Sbl*, and *Scl* switched ON without mapping these commands to specific modules. During even intervals, the reverse is true. In this section, an optimized selection process referred to as CBA is presented. Based on the output line-to-neutral voltages *vLN* and the sharing inductors' currents (*iLu* and *iLl* in each module), the CBA determines the optimum way to distribute the ON commands among the modules such that the average value of the inductors' currents remain close to each other.

Before introducing the CBA, it is important to understand the relationship between the output line-to-neutral voltages and the inductors currents. Consider the single module in Figure 6. Expressions for the voltages across the upper and lower inductors are given in Equation (10) and Equation (11), respectively. The voltage *vcm* is the common-mode voltage, which has been discussed extensively in the literature [1]. Recall that only one of the upper switches (*Sau*, *Sbu*, and *Scu*) can be switched ON, i.e., have a value of 1 while others have values of 0. The same constraint is applied to the lower switches. Equation (10) and Equation (11) show that the voltages across the upper and lower sharing inductors depends on which phase they are connected to. For example, assume *vaN* = 0.9 p.u, *vbN* = −0.073 p.u, and *vcN* = −0.827 p.u. In this case, if the current in the upper sharing inductor is low, the best option is to connect it to phase C, by turning *Scu* ON. Since Equation (10) has the highest possible value, it will result in the highest possible *diLu*/*dt*. If the current in the upper sharing inductor is high, on the other hand, connecting it to phase A would result in the lowest possible *diLu*/*dt*. The same conclusions are reversed for the lower sharing inductor, the line to neutral voltage in Equation (11) has a positive sign. Note that knowledge of *vcm* is not required when determining the best option, because *vcm* has the same effect across all phases. Therefore, to implement an optimized selection process, at every switching instance, the CBA starts by identifying what interval the MCSI is operating in. During odd intervals the CBA ranks the modules according to their lower sharing inductors' currents in a descending order. It then assigns the modules with low inductor's currents to phases that has the highest *vLN*. During even intervals the CBA ranks the modules according to their upper sharing inductors' currents in a descending order; then assigns the modules with lowest inductor currents to phases that have the lowest *vLN*. Hence, the average values of the upper and lower inductors' currents can be maintained around the same value, *Idc*/*M*. The CBA is summarized in the flow chart presented in Figure 7.

$$
\upsilon\_{Lu} = \frac{V\_{dc}}{2} - \left( S\_{au}\upsilon\_{dV} + S\_{bu}\upsilon\_{bN} + S\_{cu}\upsilon\_{cN} \right) - \upsilon\_{cu} \tag{10}
$$

$$v\_{Ll} = \frac{V\_{dc}}{2} + (S\_{dl}v\_{dN} + S\_{bl}v\_{bN} + S\_{cl}v\_{cN}) + v\_{cm} \tag{11}$$

**Figure 6.** Single current source inverter (CSI) module.

**Figure 7.** A flow chart summarizing the current balancing algorithm (CBA).

To illustrate the process of CBA through an example, assume the CBA was triggered by a PWM change in a five-level MCSI (*M* = 2) where the new values of *iam*, *ibm*, and *icm* are 2, −1, and −1, respectively. Furthermore, assume *vbN* = 0.5 and *vcN* = −0.5. Since the MCSI is operating in Interval I (*iam* is at its positive peak), the CBA will switch *Sau* ON in both modules, switch *Sbl* ON in one module, and switch *Scl* ON in the other module, i.e., one module will be assigned to *S*1 (see Figure 2d) while another module will be assigned to *S*2 (see Figure 2e). Here, the CBA must decide which module should receive the *Sbl* ON command and which one should receive the *Scl* ON command. According to Equation (11), the value of *vLl*in a module is maximized when *Sbl*is switched ON (because *vbN* > *vcN*).

Therefore, the CBA will send the *Sbl* ON command to the module that has the lower *iLl* value while sending the *Scl* ON command to the other module.
