## 4 Test Results and Discussion
Furthermore, torque ripple is observed to have a total amplitude 0.4 Nm higher with the MOGA-NN approach than with the DRL approach, which achieves smoother torque transitions. We now consider a case where the rotor shaft speed is fixed at 500 rpm and a load variation from 3 Nm to 7 Nm is introduced at 0.28 s. We then study the same outputs as before, as presented in Figure 9. First, without even evaluating the THD, we can see in the phase current responses of Figure 9a,b that the phase currents obtained with the DRL approach present a reduced harmonic content with respect to the currents obtained through the MOGA-NN approach. In the same way, we see in Figure 9a,b that the rotation  
Figure 8: Performance evaluation under a 2 Nm load torque during motor acceleration and deceleration. Figure 7: Training process of TD3 agent. speed and electromagnetic torque responses obtained with the DRL approach present fewer ripples, even after load variation, than what we obtained with the other approach. It shows that the DRL approach achieves better current convergence and demonstrates enhanced robustness to system variations, ensuring smoother transitions and improved overall stability under dynamic load changes. This conclusion is further emphasized by the results presented in Figure 10. In this case, the motor has a fixed shaft speed 600 rpm with different loads of 1 Nm, 4 Nm, 6 Nm, 7 Nm, 9 Nm, 11 Nm, 13 Nm, and 5 Nm applied sequentially at the respective times 0 s, 0.081 s, 0.12 s, 0.172 s, 0.225 s, 0.321 s, 0.42 s, and 0.465 s. As expected, the torque and current ripples obtained with the DRL approach have a constant and reduced amplitude compared to those obtained with the MOGA-NN approach. In addition, Figure 11 gives more information regarding the operation of the proposed control strategies. First, we see that the DRL-based approach reduces the number of switch transitions compared to the MOGA-NN method. Fewer switch transitions directly implies an overall lower switching frequency, which not only minimizes switching losses but also improves the overall efficiency and thermal performance of the inverter. This reduction in switching activity is critical for extending the lifespan of the power electronic components, making the DRL method more practical for long-term applications. Furthermore, the reduced current errors \(\Delta i_{d}\) and \(\Delta i_{q}\) in the DRL approach ensure better electromagnetic torque stability, reduced harmonic content, and overall improved dynamic and steady-state performance of the PMSM drive. We also see that the DRL-based approach demonstrates better consistency and adaptability in the values of the weighting factors \(\lambda_{i}\) and \(\lambda_{f}\), maintaining a stable and optimal profile compared to the fluctuating and unstable adjustments of MOGA-NN. This stability enhances MPCC robustness, enabling reliable performance under dynamic conditions. Additionally, the DRL method adapts efficiently to system variations in real time, offering faster response times and better control performance compared to the static MOGA-NN approach. Figure 9: Performance evaluation under load variation at a shaft speed of 500 rpm. For the operation of electrical machines, it is also interesting to study what happens when the electrical parameters, that is, the stator resistance and inductance, do not match the values for which the controller is tuned. To this end, we first considered operations under nominal parameter values, and we then increased them by 50 % and 100 % of their nominal values with respect to their nominal values, as illustrated in Figure 11(a). In addition, we considered operations under nominal parameter values, and we then decreased them by 50 % and 25 % of their nominal values with respect to their nominal values, as illustrated in Figure 11(b). Once again, the results demonstrate the superiority of the proposed DRL-based weighting factor tuning approach.