# Fractional Sliding Mode Harmonic Control of an Active Power Filter
## 4 Simulation  
The performance of the proposed FOSMC was evaluated on the platform of the Matlab/Simulink package with the SimPower Toolbox. A comparison between the fractional module controller and integer controller was also implemented. The parameters of the APF control system are shown in Table 1. In the FOSMC, \(\lambda_{1}=12,\lambda_{2}=3,\lambda_{3}=3\), and \(\rho=180000\). The APF starts to work at the time \(t=0.04\) s after switching on the compensation circuit. After implementing the FOSMC, it was obvious that the harmonics in the gird were efficiently offset, and the source current tended to a steady state after a half cycle, as shown in Figure 4. We demonstrated that the proposed FOSMC applied to an APF eliminated the harmonic current.  
In order to achieve the best working performance in tracking the instruction current, Figure 5 gives different values of the fractional order. With the increasing values of the fraction order, the results became better. When \(\alpha\) was too low (\(\alpha=0.2\)), the compensation current could not quite track the instruction current. When \(\alpha=0.6\), the tracking trajectory was greatly improved, but it seemed inefficient for the length of the tracking time spent. When \(\alpha=0.9\), the result showed that after about \(0.01\) s, the compensation current could almost track the given instruction current. Then, in the simulation, \(\alpha\) was chosen as \(\alpha=0.9\) in order to achieve satisfactory effects. The compensation tracking error is also given in Figure 6, confirming the effectiveness of the proposed FOSMC in the tracking function with a negligible error. Figure 7 further shows the good robustness for the quickly adjustable DC capacitor voltage, when the loads increased. Figure 8 shows the unqualified THD at the start of simulation. In Figure 9, after the APF worked, the THD was \(1.55\%\), which was far less than the harmonic standard of the IEEE of \(5\%\).  
\begin{table}
\begin{tabular}{c c} \hline Supply Voltage and Frequency & \(V_{s1}=V_{s2}=V_{s3}=220\) V, \(f=50\) Hz \\ \hline Switching frequency & \(f_{sw}=10\) KHz \\ \hline The nonlinear load & \(R=10\)\(\Omega\), \(L=2\) mH \\ \hline APF parameters & \(L=10\) mH, \(C=100\) μF \\ \(v_{d\textit{cref}}=1000\) V \\ \hline PI controller & \(k_{p}=0.05\), \(k_{i}=0.01\) \\ \hline \end{tabular}
\end{table}
Table 1: Main parameters.  
Figure 4: Improved source current of the A phase.  
Figure 5: _Cont_.  
Figure 5: Instruction current and compensation current with different values of the fractional order.  
Figure 6: Compensation current tracking error.  
For the purpose of demonstrating that the fractional sliding mode control had good robustness in the presence of load changes, we added the loads in a ladder-type increase.  
Figure 8: Harmonic spectrum of the source current at 0 s.  
Figure 7: DC capacitor voltage without an increasing load.  
Figure 9: Harmonic spectrum of the source current at 0.06 s.  
Finally, a comparison between the fuzzy sliding control system was also given so as to show the superiority of the proposed control. We can clearly see the better THD performance with the fractional control in Table 2. The performance of the APF was obviously better than that of the fuzzy sliding control method as shown in the THD values. The harmonic spectrum of fuzzy sliding mode control is shown in Figure 13.  
\begin{table}
\begin{tabular}{c c c} \hline \hline \multirow{2}{*}{**Time**} & \multicolumn{2}{c}{**THD(\%)**} \\ \cline{2-3}  & **Fractional Sliding Mode Control** & **Fuzzy Sliding Mode Control** \\ \hline
0 & 24.71\% & 24.71\% \\ \hline
0.06 s & 1.68\% & 1.96\% \\ \hline
0.16 s & 1.23\% & 1.49\% \\ \hline
0.26 s & 1.21\% & 1.44\% \\ \hline \hline \end{tabular}
\end{table}
Table 2: THD in the proposed controller and a normal controller.  
Figure 13: _Cont._