Hi wangxuan
good Job, we are getting closer ! Again I have attached my model.
I've seen your / mine / our modified model and think we could use the data type conversation in the Slow Loop Control Subsystem like shown below:

Then the Speed_Reference (yellow line in COMMANDS) is exactly the same like in module 5 s32k example.
Your implemented gains in the Fast Loop Control Subsystem

Now I was able to simulate correctly. Here are the results:


Like you see the COMMANDS and SVM are completely the same like in s32k module 5.
(U_Alpha and U_Beta are still upscaled)
But in EFFECTS we have some differences, the Motor Speed swings extremely:

I have made some Simulation runs (blue --> wc = 0.001; yellow --> wc = 1; red --> original pmsm module5)

How we could get the same result as in the pmsm Workshop module5 (red line) ?
After this step is done we could parametrize our own Motor with the values of R,L and so on.
Another way could be to use the Simscape Power Systems Toolbox instead of the Simulink PMSM model.
Also the Parameters of the LUT in the Slow Loop Control Subsystem I didn't have parametrized yet.
If this is done I want to download the code to the target and see the results in FreeMASTER.
Best regards