Please find the attached, IIn the comparison, I just changed the mathmetical dq PMSM model into a Multisim PMSM model, the FOC part code is still the same as the NI PMSM FOC example. But the results are totally different. I have tried to adjust the PI parameters for the Mutisim based simulation, however, no matter how I changed these parameters, the simulation result is just out of expectation.