## 2 The Structure of Typical DC Microgrids and Traditional Control Strategies
### Improved Model Predictive Control of the Inner Current Control Loop
\begin{table}
\begin{tabular}{c c c c c} \hline \hline \multirow{2}{*}{**Switching Modes**} & \multicolumn{2}{c}{**Battery Converter**} & \multicolumn{2}{c}{**Supercapacitor Converter**} \\ \cline{2-5}  & \(\textbf{SW}_{i}\) & \(\textbf{SW}_{i+1}\) & \(\textbf{SW}_{n+1}\) & \(\textbf{SW}_{n+1}\) & \(\textbf{SW}_{n+2}\) \\ \hline
2 & 1 & 0 & 0 & 1 \\ \hline
3 & 0 & 1 & 1 & 0 \\ \hline
4 & 0 & 1 & 0 & 1 \\ \hline
5 & 0 & 1 & 0 & 1 \\ \hline
6 & 0 & 1 & 0 & 0 \\ \hline
7 & 0 & 0 & 1 & 0 \\ \hline
8 & 0 & 0 & 0 & 1 \\ \hline
9 & 1 & 0 & 0 & 0 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Complementary switching modes for HESS when traditional MPC is utilized. The mathematical model and the discrete model of the battery converter in Figure 7 are shown as  
\[L_{1}\frac{\mathrm{d}I_{\text{bat}}}{\mathrm{d}t}=V_{\text{bat}} \tag{33}\]  
\[I_{\text{bat}}(\mathrm{k}+1)=I_{\text{bat}}(\mathrm{k})+\frac{T_{i}}{L_{1}}\cdot V _{\text{bat}} \tag{34}\]  
Type 3: \(\mathbf{SW_{i}}\) and \(\mathbf{SW_{i+1}}\) is both 0. The equivalent diagrams of the battery converter involve three cases. As shown in Figure 11, \(\mathbf{SW_{i}}\) parallel diode is on (a), or the \(\mathbf{SW_{i+1}}\) parallel diode is on (b), or all switches are off (c). It is necessary to introduce \(I_{\text{dis}}\) and \(I_{\text{char}}\) to identify three cases, shown as  
\[I_{\text{dis}}=\left|\frac{T_{\text{i}}}{L_{1}}\cdot(V_{\text{bat}}-V_{\text{ dc}})\right| \tag{35}\]  
\[I_{\text{char}}=\left|\frac{T_{i}}{L_{1}}\cdot V_{\text{bat}}\right| \tag{36}\]  
The mathematical models and discrete models of the battery converter for three cases in Figure 11 are shown as  
\[\text{(a)}\Bigg{\{} \begin{array}{l}L_{1}\frac{\mathrm{d}I_{\text{bat}}}{ \mathrm{d}t}=V_{\text{bat}}-V_{\text{dc}}\\ I_{\text{bat}}(\mathrm{k}+1)=I_{\text{bat}}(\mathrm{k})+\frac{T_{i}}{L_{1}}(V_{ \text{bat}}-V_{\text{dc}})\end{array}  \tag{37}\]  
\[\text{(b)}\Bigg{\{} \begin{array}{l}L_{1}\frac{\mathrm{d}I_{\text{bat}}}{ \mathrm{d}t}=V_{\text{bat}}\\ I_{\text{bat}}(\mathrm{k}+1)=I_{\text{bat}}(\mathrm{k})+\frac{T_{1}}{L_{1}}\cdot V _{\text{bat}}\end{array}  \tag{38}\]  
Figure 10: Switch states of the battery converter in Type 2. Figure 9: Switch states of the battery converter in Type 1. Similarly, the switching modes of the supercapacitor converter are also divided into three types: 1, 2, and 3. The mathematical models and discrete models are shown as  
\[(1)\left\{ \begin{array}{l}L_{2}\frac{\mathrm{d}I_{\mathrm{sc}}}{\mathrm{d}t}=V_ {\mathrm{sc}}-V_{\mathrm{dc}}\\ \\ I_{\mathrm{sc}}(k+1)=I_{\mathrm{sc}}(k)+\frac{T_{1}}{L_{2}}(V_{\mathrm{sc}}-V_ {\mathrm{dc}})\\ \\ \end{array} \right. \tag{40}\]  
\[(2)\left\{ \begin{array}{l}L_{2}\frac{\mathrm{d}I_{\mathrm{sc}}}{\mathrm{d}t}= V_{\mathrm{sc}}\\ \\ I_{\mathrm{sc}}(\mathrm{k}+1)=I_{\mathrm{sc}}(\mathrm{k})+\frac{T_{1}}{L_{2}} \cdot V_{\mathrm{sc}}\\ \\ \end{array} \right. \tag{41}\]  
\[(3)\ I_{\mathrm{sc}}(k+1)=0 \tag{42}\]  
Consequently, all states of switches are considered, and the evaluation function of the improved MPC is  
\[J=\left|I_{bat}(k+1)-I_{bat-ref}(k+1)\right|+n+\left|I_{sc}(k+1)-I_{bc-ref}(k+1)\right| \tag{43}\]  
In (43), \(n\) is the number of switches which is on in the next sampling cycle, \(I_{bat-ref}(k+1)\) and \(I_{sc-ref}(k+1)\) are the inner current loop reference values for the battery and the supercapacitor. The number \(n\) of conduction switches is considered in the evaluation function to decrease switching losses. Figure 11: The detailed switch states of the battery converter in Type 3 when Ibat changes.