Model Predictive Control of PMSM
- lms editor
- 39 minutes ago
- 4 min read
Model Predictive Control of PMSM
Looking for a clear and practical MATLAB/Simulink model for Model Predictive Control of PMSM? This solution explains how a Permanent Magnet Synchronous Motor (PMSM) can be controlled using MPC for fast speed tracking, torque control, and inverter pulse selection.
𝐈𝐧𝐭𝐫𝐨𝐝𝐮𝐜𝐭𝐢𝐨𝐧
Model Predictive Control of PMSM is a modern control approach used to improve motor performance under changing speed and load conditions.
This MATLAB simulation is useful for:

Students learning motor control concepts
Researchers working on advanced control methods
Engineers analyzing inverter-based PMSM drives
Anyone interested in MATLAB/Simulink motor drive simulation
Why this topic is important
PMSM is widely used in electric drives
MPC offers fast dynamic response
It helps control both speed and electromagnetic torque
It selects the best switching state for the inverter based on a minimum cost function
𝐒𝐲𝐬𝐭𝐞𝐦 𝐎𝐯𝐞𝐫𝐯𝐢𝐞𝐰
The developed Simulink model consists of a DC source, voltage source inverter, PMSM, measurement blocks, PI controller, and an MPC control block.
Main components
500 V DC source
Voltage Source Inverter (VSI)
PMSM motor
Rotor angle, current, speed, and torque measurement
abc to dq0 transformation
PI controller
Model Predictive Controller
Scope blocks for waveform observation
System parameters
Parameter | Value |
DC source voltage | 500 V |
PMSM rated torque | 0.8 N·m |
PMSM rated voltage | 300 V |
PMSM rated speed | 3000 rpm |
Number of pole pairs | 2 |
Number of poles | 4 |
Sampling time | 1e-06 s |
Reference and load settings
Item | Condition |
Initial speed reference | 100 rad/s |
Changed speed reference | 125 rad/s |
Speed change time | 0.05 s |
Initial load torque | 0.3 N·m |
Changed load torque | 0.6 N·m |
Rated load torque | 0.8 N·m |
𝐖𝐨𝐫𝐤𝐢𝐧𝐠 𝐏𝐫𝐨𝐜𝐞𝐬𝐬
The simulation follows a simple and structured control flow.
Step-by-step operation
The 500 V DC source feeds the voltage source inverter.
The inverter converts DC into three-phase AC for the PMSM.
The PMSM output variables are measured:
Rotor angle
Stator currents
Rotor speed
Electromagnetic torque
The measured rotor angle is converted from mechanical angle to electrical angle.
The three-phase stator currents are converted into dq components using transformation blocks.
The actual speed is compared with the reference speed.
The speed error is processed by a PI controller.
The PI controller generates the iq reference.
The id reference is fixed at 0 for field-oriented operation.
The MPC block receives all required inputs and predicts the best inverter switching state.
The selected switching pulse is sent to the inverter.
The inverter controls the PMSM to achieve the required speed and torque response.
𝐂𝐨𝐧𝐭𝐫𝐨𝐥 𝐒𝐭𝐫𝐚𝐭𝐞𝐠𝐲
The heart of this model is the Model Predictive Control block.
Inputs to the MPC block
MPC Input | Description |
Speed reference | Desired motor speed |
Actual id | Measured d-axis current |
Actual iq | Measured q-axis current |
iq reference | Generated from PI controller |
id reference | Fixed at 0 |
Clock input | Used for timing |
Electrical rotor angle | Rotor position in electrical form |
How the control strategy works
The controller initializes:
Stator resistance
Inductance
Flux linkage
DC link voltage
It evaluates 8 switching states
For each switching state, it predicts:
id
iq
A cost function is calculated for all switching states
The controller identifies the state with the minimum cost
That switching state is used to generate the pulse for the inverter
Why id reference = 0
The model uses a field-oriented control concept
Setting id = 0 helps simplify control
It improves torque production through iq control
𝐒𝐢𝐦𝐮𝐥𝐚𝐭𝐢𝐨𝐧 𝐑𝐞𝐬𝐮𝐥𝐭𝐬
The Simulink results show effective control of both speed and torque.
Observed output waveforms
Inverter output voltage
Stator current
Reference and actual speed
Electromagnetic torque
Inverter switching pulses
Result summary
Result Item | Observation |
Speed tracking | Actual speed follows the reference well |
Speed settling | Speed settles before 0.02 s initially |
Reference speed change | Speed changes from 100 rad/s to 125 rad/s after 0.05 s |
Initial torque behavior | Torque peaks around 3.2 N·m during starting |
Torque before 0.05 s | Maintained around 0.3 N·m |
Torque after 0.05 s | Maintained around 0.6 N·m |
Current before load change | Around 0.5 A peak |
Current after load change | Around 1.2 A peak |
Control objective | Both speed and torque are controlled effectively |
What the results indicate
Fast speed response
Good tracking performance
Stable torque behavior after transients
Proper inverter pulse generation
Effective handling of load change
𝐊𝐞𝐲 𝐅𝐞𝐚𝐭𝐮𝐫𝐞𝐬
This simulation offers several useful features:
MATLAB/Simulink implementation
Model Predictive Control for PMSM
Eight-state switching evaluation
Minimum cost-based pulse selection
Speed and torque control in one framework
Field-oriented current reference setting
Useful scope results for analysis
Easy to understand for learning and research
Highlights at a glance
Feature | Benefit |
MPC-based inverter control | Fast and intelligent switching selection |
PI-assisted speed loop | Better speed reference tracking |
dq current control concept | Improved motor control clarity |
Multiple measured signals | Easier waveform analysis |
Load and speed variation testing | Useful for performance validation |
𝐀𝐩𝐩𝐥𝐢𝐜𝐚𝐭𝐢𝐨𝐧𝐬
This type of simulation is relevant in many areas of electrical and control engineering.
Common applications
Electric vehicle drive systems
Industrial motor drives
Servo control systems
Robotics
Automation systems
Academic and laboratory studies
Advanced motor control research
Who can use it
𝐂𝐨𝐧𝐜𝐥𝐮𝐬𝐢𝐨𝐧
The MATLAB Simulation of Model Predictive Control of PMSM is a strong learning and analysis tool for understanding advanced motor control.
Final takeaways
It demonstrates how MPC can control a PMSM effectively
It combines speed control, torque control, and inverter switching optimization
It handles changes in speed reference and load torque
It gives clear waveform outputs for study and validation
It is suitable for students, researchers, and engineers
If you want a practical Simulink-based solution for PMSM control using MPC, this model is a highly useful resource.



Comments