# Sensorless HSPMSM Control of an Improved SMC and EKF Based on Immune PSO
## 4 Case Study
### Simulation Experiment I  
In the first experiment, the reference speed is first set as n\({}^{*}\) = 1000 rpm with a no-load startup condition. The total simulation duration is 0.6 s, and the disturbance load T\({}_{m}\) = 10 is suddenly added at 0.4 s. Figure 7 shows the speed comparison diagram, \begin{table}
\begin{tabular}{c c} \hline \hline
**Parameters** & **Value** \\ \hline Stator Inductance/\(\mu\)H & 91.3 \\ Stator Resistance/m\(\Omega\) & 8.17 \\ Rated Voltage/V & 690 \\ Number of Motor Poles & 2 \\ Rated Power/kW & 75 \\ Friction Coefficient/Nms/rad & 0 \\ Flywheel Moment of Inertia/kgm\({}^{2}\) & 0.115 \\ Busbar Capacitance/mF & 3 \\ Bus Voltage Rating/mF & 1100 \\ Minimum Speed/rpm & 10,000 \\ Maximum Speed/rpm & 20,000 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Parameters of the HSPMSM. Figure 6: An improved sensorless vector control block diagram for an HSPMSM based on an EKF. speed error diagram, rotor position angle diagram, and electromagnetic torque diagram of the motor under the EKF matrix parameter control strategy optimized using the basic PSO algorithm and the immune PSO algorithm under the PI controller. Figure 8 shows the speed comparison diagram, speed error diagram, rotor position angle diagram, and electromagnetic torque diagram of the motor under the EKF matrix parameter control strategy optimized using the basic PSO algorithm and immune PSO algorithm under the improved SMC controller. Figure 7: Cont. Figure 8: _Cont_. Figure 7: Comparison diagram of the EKF matrix parameter control strategy optimized using the basic PSO and immune PSO algorithms under the PI controller: (**a**) speed comparison diagram; (**b**) speed error diagram; (**c**) PSO rotor position angle diagram; (**d**) IPSO rotor position angle diagram; (**e**) motor electromagnetic torque diagram. According to the rotational speed curves in Figures 7a and 8a, Table 5 lists the dynamic performance indexes from 0 to 1000 rpm, including the static performance indexes when stabilized at 1000 rpm and the comparison of the dynamic and static indexes after 0.4 s and application of the load. \begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline
**Parameters** & **PI_PSO** & **PI_EKF_P** & **PI_IPSO** & **PI_EKF_IP** & **SMC_PSO** & **SMC_EKF_P** & **SMC_IPSO** & **SMC_EKF_P** \\  & & **SO** & & **SO** & & **SO** & **IPSO** \\ \hline rising time(tr)/s & 0.0465 & 0.0481 & 0.0389 & 0.0390 & 0.0845 & 0.1292 & 0.0699 & 0.1378 \\ \hline peak time(tp)/s & 0.0566 & 0.0585 & 0.0485 & 0.0502 & 0.1001 & 0.1542 & 0.0847 & 0.1684 \\ \hline Adjusting time(ts)/s & 0.0799 & 0.0849 & 0.0753 & 0.0763 & 0.1293 & 0.1047 & 0.0698 & 0.1396 \\ \hline overtone(\(\sigma\))/\% & 7.356 & 9.533 & 12.637 & 12.587 & 0.4 & 0.8 & 1.1 & 0.2 \\ \hline steady-state error/rpm & 7 & 6 & 5 & 9 & 4 & 7 & \(-3.5\) & 1 \\ \hline
0.4 s after load recovery time/s & 0.0463 & 0.0463 & 0.0467 & 0.0463 & 0.059 & 0.056 & 0.0769 & 0.0729 \\ \hline
0.4 s after load recovery value/rpm & 928.4 & 919.9 & 932.5 & 923.1 & 1001 & 1000 & 996 & 1001 \\ \hline
0.4 s after load recovery value fluctuation range/rpm & 928.4 & 912–925 & 932.5 & 923.1 & 990–1005 & 991–1007 & 996–997 & 1001 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Comparison of dynamic and static performance at 1000 rpm under PI and SMC controllers. Figure 8: Comparison diagram of the EKF matrix parameter control strategy optimized using the basic PSO and immune PSO algorithms under the improved SMC: (**a**) speed comparison diagram; (**b**) speed error diagram; (**c**) PSO rotor position angle diagram; (**d**) IPSO rotor position angle diagram; (**e**) motor electromagnetic torque diagram.