PMSM controller doesn't work

조회 수: 16 (최근 30일)
frank
frank 2021년 7월 14일
댓글: frank 2021년 8월 3일
Hi everyone,
I'm trying to implement my own PMSM model after reviewing the numerous examples inlcuded in Simulink and the simulink community. I think I have all the right components and settings, but the motor erratically oscillates for a constant commanded torque and speed.
Below is a plot of the commanded and measured torque. The speed response is just a negative divergence from zero (commanded speed is 1000 rpm or about 100 rad/s).
Can anybody point me in the right direction for debugging?
I've attached two files. Run the .m file first to load all the variables needed for the simulink .slx file. I'm using Simscape electrical components in MATLAB/Simulink 2021a. Note, I use 'M' to symbolize torque to avoid confusion with 'T' for sample periods.
I got my motor parameters from the Emrax 228 (datasheet link).
Thanks!

채택된 답변

Joel Van Sickel
Joel Van Sickel 2021년 8월 3일
Hello frank,
you don't have your pole pair parameter entered correctly in your machine. Go to where your mechanical parameters are and you will see that you have friction in the spot where pole pairs should be. Your parameters for that entry should read as follows "[J F n_pole M_fric]"
Regards,
Joel
  댓글 수: 2
frank
frank 2021년 8월 3일
Wow! I can't believe it was something that trivial. Thanks Joel!
Any suggestions for my time-related variables, like Ts, T_spdCtrl, and T_vectCtrl? Or my controller gains?
By decreasing the simulation's discrete timestep to 2e-7 s, I greatly reduced the noise in my torque signal. However, I'm curious if I can get away with a shorter timestep or higher gains.
I know this is an open-ended question, so I would appreciate any rules of thumb that Mathworks recommends for discrete simulation of motors.
Thanks,
Farid
frank
frank 2021년 8월 3일
Never mind. I got comparable results with Ts = 2e-6 s, T_vectCtrl = 5*Ts s (10e-6 s). Thanks again!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Choose and Parameterize Blocks에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by