# PMSM DTC - Direct Torque Control for Inner Permanent Magnet Synchronous Motor

**URL:** <https://forum.plexim.com/t/pmsm-dtc-direct-torque-control-for-inner-permanent-magnet-synchronous-motor/1347>\
**Category:** PLECS\
**Tags:** dtc, pmsm\
**Created:** [April 15, 2024, 3:48pm UTC](https://forum.plexim.com/t/pmsm-dtc-direct-torque-control-for-inner-permanent-magnet-synchronous-motor/1347 "2024-04-15T15:48:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![onder44](https://avatars.discourse-cdn.com/v4/letter/o/f19dbf/32.png) [@onder44](https://forum.plexim.com/u/onder44)\
**Post date:** [April 15, 2024, 3:48pm UTC](https://forum.plexim.com/t/pmsm-dtc-direct-torque-control-for-inner-permanent-magnet-synchronous-motor/1347/1 "2024-04-15T15:48:03Z")

</div>

Hello all,

I would like to create a model and find inverter losses for the Inner Permanent Magnet Synchronous Motor with Direct Torque Control. I created a model and added it as an attachment. I used the WLTP cycle as a speed reference. I put the parameters from the IPMSM of the Toyota Prius.

First I tried to use the demo model, which is “induction\_machine\_drive\_controlled\_with\_dtc”, but it didn’t work for PMSM. RPM went to the negative area. You can find it as “Direct Torque Control” block in my model, which I shared as an attachment.

Second I found a schematic from the MATLAB website and tried to model it. You can find it as “Direct Torque Control\_1” block in my model, which I shared as an attachment. At that point, RPM went to the positive area but didn’t follow the speed reference.

Matlab schematic link is: [https://nl.mathworks.com/help/mcb/gs/direct-torque-control-dtc.html](https://nl.mathworks.com/help/mcb/gs/direct-torque-control-dtc.html)

If you give “0” to a constant value it will work with “Direct Torque Control\_1” block.

If you give “1” to a constant value it will work with “Direct Torque Control” block.

Could you please help me to fix the model to follow the given speed reference?

[PMSM Controller DTC.plecs](https://forum.plexim.com/uploads/short-url/5kCRiDAiWkZWTX2X6YPP1fRVrPK.plecs) (1.09 MB)
