MATLAB: How to simulate field oriented control system for a PMSM with a torque load

focpmsm

I'm trying to simulate a field oriented control system for a permanent magnet synchronous motor. I used standard Matlab simulink blocks in creating the system. My requirement is to create a system where the load torque can change randomly and the suppled electromagnetic torque can also changed accodrding to the need. When the load is in torque form the system doesn't produce any electromagnetic torque or speed. Torque keeps oscillating around load torque value and speed around '0'. When the form of load is changed to speed it produces an acceptable torque and speed which needs to be tuned by tuning PI controllers. I have attached the simulation file and the initializing Matlab script file. I'm unnable to identify exact the problem. Am I missing some theory component/ or trying to simulate it wrong?

Best Answer

The problem was in the angle conversion. I was missing mechanical angle to electrical angle conversion. By adding it the problem was fixed.
Related Question