IPMSM Field Oriented Control (FOC) with SVPWM

This motor drive model integrates Field-Oriented Control (FOC) and Space Vector PWM (SVPWM) techniques to control IPMSM.

You are now following this Submission

Speed Control Loop: The reference speed (n_ref) is compared with the actual motor speed. The resulting error is processed through a PI controller to generate the reference q-axis current (I_q). This current determines the torque produced by the motor.
Current Control Loop: There are two separate PI current controllers for the d and q axes. The current references (Id_ref) and Iq_ref) are compared with the motor currents (Id and Iq) obtained from the Park transformation to generate the reference voltage signals (Vd_ref and Vq_ref).
Inverse Park Transformation: It transforms the d-q components in a rotating reference frame into two-phase orthogonal components in the stationary alpha-beta reference frame [1]. During this transformation process, the electrical position angle obtained from the rotor is taken as a reference.
Space Vector PWM: It takes the two-phase reference voltages and generates the optimum switching signals to trigger the 3-phase inverter.
3-Phase Inverter & PMSM Motor: It utilizes the DC voltage to generate the 3-phase alternating currents supplied to the motor windings and drives the motor.
Feedback Path:
  • Clarke Transformation: It transforms the 3-phase currents measured from the motor into two-phase stationary axis currents [2,3].
  • Park Transformation: It is a mathematical transformation developed to represent the current components, expressed in the two-phase orthogonal plane, in the rotating plane (rotor reference frame, d-q) [2,3]. Thanks to this transformation, variable alternating currents are converted into direct current (DC) signals that can be easily processed by the current controllers (PI).
  • Position and Speed Sensing: It processes the data received from the motor sensors to calculate the speed and position information.

Cite As

Irfan Kerem (2026). IPMSM Field Oriented Control (FOC) with SVPWM (https://www.mathworks.com/matlabcentral/fileexchange/184110-ipmsm-field-oriented-control-foc-with-svpwm), MATLAB Central File Exchange. Retrieved .

[1] “Alpha-Beta-Zero to DQ0, DQ0 to Alpha-Beta-Zero.” Perform Transformation from Αβ0 Stationary Reference Frame to Dq0 Rotating Reference Frame or the Inverse - Simulink, ww2.mathworks.cn/help/sps/powersys/ref/alphabetazerotodq0dq0toalphabetazero.html. Accessed 27 Aug. 2025. [2 ]YILMAZ, M., Tezgel, S., & ÇORAPSIZ, M. (2021). Graphical User Interface for Asynchronous Motors Clarke-ParkTransforms Using LabVIEW. Afyon Kocatepe Üniversitesi Fen ve Mühendislik Bilimleri Dergisi, 21(2). [3]Yılmaz, H. C., & Beşer, E. K. (2021). Sürekli Mıknatıslı Senkron Motorun Alan Yönlendirmeli Kontrolü ve Kontrol İçin Geliştirilen Özel Amaçlı Motor Sürücüsünün Tasarımı ve Prototip Üretimi. Bitlis Eren Üniversitesi Fen Bilimleri Dergisi, 10(3), 943-957.

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
25.1.0