Next Article in Journal
Experimental Isolation and Coherence Analysis of Pressure Pulsations in Tubular Pumps: Unveiling the Impact of Impeller Rotation on Flow Dynamics
Previous Article in Journal
Forest Surveying with Robotics and AI: SLAM-Based Mapping, Terrain-Aware Navigation, and Tree Parameter Estimation
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Real-Time Implementation of Auto-Tuned PID Control in PMSM Drives

by
Adile Akpunar Bozkurt
Mechatronics Engineering, Faculty of Technology, Pamukkale University, 20160 Denizli, Türkiye
Machines 2026, 14(1), 100; https://doi.org/10.3390/machines14010100
Submission received: 2 December 2025 / Revised: 31 December 2025 / Accepted: 12 January 2026 / Published: 15 January 2026

Abstract

Permanent magnet synchronous motors (PMSM) are widely favored in industry for their high efficiency, compact size, and robust performance. This study employs a model-based PID control approach for speed regulation of PMSM. In contrast to traditional PID approaches, this method addresses the inherent nonlinearity of PMSM systems and tunes PID coefficients dynamically for fast multi-input and multi-output (MIMO) operations. Traditional PID controllers typically assume linear motor dynamics and determine a single set of coefficients, often through trial and error. However, the nonlinear dynamics of motor drives and variations in motor parameters often lead to instability, limiting the effectiveness of conventional PID controllers. The proposed auto-tuning PID controller adjusts its coefficients in real-time based on the system’s operational state. This method has been implemented in both simulation and experimental setups, with real-time execution facilitated by dSPACE DS1104. A comparative analysis with conventional PI control demonstrates the enhanced stability and adaptability of the proposed approach.

1. Introduction

Permanent Magnet Synchronous Motors (PMSMs) are among the most widely utilized motor types in modern industry, second only to induction motors. Their adoption has increased rapidly due to their capability to deliver high efficiency, excellent torque-to-current characteristics, and compact power density. These advantages make PMSMs especially suitable for applications that require precise and dynamic performance, such as electric vehicles, robotics, aerospace systems, and various medical devices. As a result, PMSMs have become a central component in many high-performance electric drive systems.
PMSMs are typically employed as variable-speed drives in both speed and position control applications. The successful operation of these systems has been enabled by significant advancements in power electronics, signal processing, and embedded control technologies over the past few decades [1,2]. In industrial practice, approximately 95% of closed-loop control structures are based on Proportional–Integral–Derivative (PID) controllers. PID control remains popular because of its conceptual simplicity, ease of implementation, and ability to offer acceptable performance under a wide range of operating conditions. Classical tuning methods such as the Ziegler–Nichols rule and various second-order approaches provide straightforward mathematical procedures for determining the proportional ( K P ), integral ( K I ), and derivative ( K D ) gains. However, these conventional PID controllers typically assume linear behavior and stationary dynamics. When the system is affected by disturbances, parameter variations, or inherent nonlinearities, the initially tuned PID gains must be readjusted to maintain stability and performance [3].
Unlike DC motors, PMSMs exhibit inherently nonlinear and coupled electromagnetic dynamics, which require more sophisticated control strategies [4]. Although both permanent magnet synchronous motors (PMSMs) and induction motors exhibit nonlinear behavior, PMSMs are particularly affected by nonlinearities due to magnetic saturation, cross-coupling between the d- and q-axis inductances, and the presence of permanent magnet flux. In addition, parameter variations such as temperature-dependent stator resistance and load-dependent inductance changes directly influence the PMSM dynamics, making accurate control more challenging, especially under varying operating conditions. Vector control approaches, also known as field-oriented control (FOC), are widely applied to address this nonlinear behavior. In these systems, PID-based regulators are frequently preferred due to their well-established structure and practical convenience [5,6]. Nevertheless, PMSM drives are sensitive to several real-world effects, including flux weakening at high speeds, parameter drift due to thermal variations, magnetic saturation, and performance degradation under load disturbances. These issues significantly challenge the effectiveness of classical PID tuning methods, including the widely adopted Ziegler–Nichols approach, which often proves insufficient in such nonlinear and time-varying environments [7].
To mitigate these limitations, numerous advanced strategies for PID parameter tuning have been developed. The literature reports solutions such as Genetic Algorithms, online Automatic Tuning, Fuzzy Gain Scheduling, Particle Swarm Optimization (PSO), and Adaptive Interaction-based methods [8,9,10,11,12]. For instance, by Nour et al. [3], a fuzzy logic controller (FLC) was utilized to automatically tune PID gains for PMSM speed control, thereby eliminating the difficulties associated with manual tuning. An Enhanced Robust Fractional-Order PI (ERFOPI) approach capable of maintaining desirable performance even under changing parameters and external disturbances was presented by Zhang and Pi [7]. Similarly, the Chaos Particle Swarm Optimization (CPSO) algorithm was applied by Rui et al. [13] to enhance PID tuning precision within vector-controlled PMSM systems. By Fu et al. [14], a neutrosophic PID tuning scheme was examined, where customized membership functions, cosine-measure theory, and genetic algorithms were employed to achieve optimal tuning. Xiao et al. [15] proposed a generalized minimum-variance-based auto-tuning PID controller for PMSM speed regulation. Furthermore, a novel adaptive chaotic kinetic molecular theory optimization algorithm (CKMTOA) was utilized by Yi et al. [16] to determine optimal PID parameters. In another study, a self-tuning PI controller was developed to improve servo drive stability under large inertia and disturbance conditions by Ma et al. [17]. Adaptive fuzzy tuning structures have also been widely used, as demonstrated in induction motor control by Laoufi et al. [18] and DC motor speed regulation by Mansor et al. [19].
Collectively, these studies confirm that enhanced tuning strategies significantly improve the reliability, stability, and dynamic performance of PMSM drives. However, traditional PID controllers, designed largely for linear systems, still face critical limitations when applied to nonlinear systems like PMSMs. Trial-and-error tuning, insufficient disturbance rejection, and lack of adaptability remain persistent challenges. To address these issues, nonlinear auto-tuning PID methods have emerged as promising alternatives, offering improved robustness and adaptability to varying operating conditions [20,21].
In this study, a novel auto-tuning PID control strategy is applied to PMSM speed control. The proposed method dynamically adapts the controller gains to achieve rapid convergence and enhanced robustness, even under nonlinear operating conditions. The performance of the proposed approach is validated through both simulation and experimental evaluations and is compared against conventional PI control schemes. The results demonstrate significant improvements in dynamic stability, disturbance rejection capability, and steady-state performance, confirming the method’s potential for high-performance electric drive applications.
The remainder of this paper is organized as follows. Section 2 presents the mathematical model of the PMSM. Section 3 describes the vector-control system architecture incorporating PID controllers. Section 4 details the proposed auto-tuning PID strategy. Section 5 provides the simulation studies, and Section 6 presents the experimental validation.

2. PMSM Mathematical Equations

The mathematical model of a PMSM is most commonly represented in the synchronous d-q reference frame due to its simplicity and effectiveness in analyzing motor dynamics. This reference frame transforms the three-phase stator quantities into two orthogonal components, enabling decoupled flux and torque control.
In this framework, the stator voltage equations are represented in the synchronous rotating reference frame and are given by Equations (1) and (2). Similarly, the electromagnetic torque produced by the PMSM is defined mathematically as shown in Equation (3) [22,23,24].
v d s = R s I d s + L d d d t i d s ω r L q i q s
v q s = R s I q s + L q d d t i q s + ω r L d i d s + ω r λ m
T e = 3 2 P 2 λ m i q s + ( L d L q ) i d s i q s
In these equations, R s represents the stator winding resistance, while L d and L q denote the stator winding inductances along the d- and q-axes, respectively. The current components along these axes are i d and i q , with the corresponding voltage components v d and v q . P indicates the number of pole pairs, and λ m is the flux generated by the rotor’s permanent magnets. Furthermore, B refers to the viscous damping coefficient, J is the rotor’s moment of inertia, T e stands for the electromagnetic torque, and ω r denotes the rotor speed.
These equations form the fundamental basis for analyzing and implementing PMSM control strategies under various operating conditions.

3. Vector-Control System Utilizing PID Controllers

Traditional PID control is a widely used vector control technique, commonly referred to as Field-Oriented Control (FOC). The vector control scheme of a PMSM, illustrated in Figure 1, integrates two PID controllers: one serving as a speed controller and the other as a current controller. In this scheme, the motor’s speed signal and stator d-axis current are designated as the reference signals. The three-phase stator currents of the motor are measured and subsequently transformed into a two-phase system using Clarke and Park Transformations. This decomposition separates the motor currents into torque ( i q ) and excitation ( i d ) components.
The output of the PID speed controller generates the i q reference current, while the PID current controller outputs determine the d- and q-axis stator voltage components. These voltage components are processed through the Inverse Park Transformation to produce Space Vector Pulse Width Modulation (SVPWM) signals, which drive the three-phase inverter circuit [25,26].
The PID controller operates by calculating an error signal, e(t), which is defined as the difference between the measured signal and the desired reference signal. This error, as described in Equation (4), serves as the basis for the control process, where the primary objective is to minimize the error over time. The PID controller exhibits key dynamic characteristics, including zero steady-state error, fast system response, minimal oscillation, and high stability, making it a reliable control approach for various applications [27].
Traditional PID control, a linear control methodology, is extensively employed in the regulation of electric motors. It utilizes three fundamental control parameters: proportional (KP), integral (KI), and derivative (KD) gains, which are independently configured as fixed values during system tuning. These gains determine the respective contributions of the proportional, integral, and derivative components to the control signal, as illustrated in Figure 2.
The formulas in Equations (5) and (6) represent the mathematical expressions in the time domain and the Laplace s-domain, respectively [28].
e t = r t y t
u t = K p e t + K i 0 t e t d t + K D d e ( t ) d t
U s = K p + K i s + K D s E ( s )

4. Auto-Tuning PID Control

The auto-tuning PID controller, illustrated in Figure 3, replaces the conventional fixed-gain structure by continuously updating the proportional, integral, and derivative gains during PMSM operation. The proposed framework adopts a model-based adaptive control strategy, comprising a discrete-time system model, two Jacobian matrices, and an adaptive PID computation unit. One Jacobian matrix validates the control input, while the other incrementally adjusts the PID coefficients to enhance control accuracy.
In this configuration, y r denotes the reference signal, y ( n + 1 ) represents the predicted output, u ( n + 1 ) is the computed control signal, and δ u ( n + 1 ) corresponds to the correction term. The instantaneous error e ( n ) is calculated as the difference between the reference and measured outputs, from which the PID controller generates the control action [20,21]. The adaptive mechanism ensures that the PID gains are optimized in real time, maintaining precise control under varying operating conditions.
The overall control structure integrates the discrete model and the two Jacobian matrices, J m and J c . J m validates the control signal, while J c updates the PID parameters. The reference signal and candidate voltage input are fed into this block, producing predicted outputs and correction terms. The adaptive PID block updates the control parameters K P , K I , and K D iteratively over a prediction horizon of K steps. The discrete control law is expressed in Equation (7):
u n + 1 = u n + K p e n e n 1 + K I e n + K D ( e n 2 e n 1 + e n 2 )
The coefficients K P , K I , and K D are adaptively modified through the tuning process. The control signal u ( n + 1 ) is applied iteratively over a prediction horizon of K steps, with optimal parameters obtained by minimizing the cumulative squared prediction error as defined in Equation (8):
F u n + 1 = 1 2 k = 1 K j = 1 Q ( y ~ j n + k y ^ j n + k ) 2 + 1 2 λ r = 1 R ( u r n + 1 u r n ) 2
In this formulation, K represents the prediction horizon, and λ is a regularization factor. To minimize the cost function and update the PID coefficients simultaneously, the Levenberg–Marquardt optimization algorithm is applied as given in Equation (9):
K P n e w K I n e w K D n e w = K P o l d K I o l d K D o l d ( J T J + μ I ) 1 J T e ^
The term μ denotes a damping factor balancing the behavior between the steepest-descent and Gauss–Newton methods, while I is the identity matrix [20,21].
The Jacobian matrix and the prediction error vector are defined in Equations (10)–(12), where Δ u ( n + 1 ) = u ( n + 1 ) u ( n ) .
J = e ^ 1 ( n + 1 ) K P e ^ 1 ( n + 1 ) K I e ^ 1 ( n + 1 ) K D e ^ Q ( n + K ) K P e ^ Q ( n + K ) K I e ^ Q ( n + K ) K D λ 1 Δ u ( n + 1 ) K P λ 1 Δ u ( n + 1 ) K I λ 1 Δ u ( n + 1 ) K D λ R Δ u ( n + 1 ) K P λ R Δ u ( n + 1 ) K I λ R Δ u ( n + 1 ) K D
J = y ^ 1 ( n + 1 ) K P y ^ 1 ( n + 1 ) K I y ^ 1 ( n + 1 ) K D y ^ Q ( n + K ) K P y ^ Q ( n + K ) K I y ^ Q ( n + K ) K D λ 1 Δ u ( n + 1 ) K P λ 1 Δ u ( n + 1 ) K I λ 1 Δ u ( n + 1 ) K D λ R Δ u ( n + 1 ) K P λ R Δ u ( n + 1 ) K I λ R Δ u ( n + 1 ) K D
e ^ = e ^ 1 ( n + 1 ) e ^ Q ( n + K ) λ 1 Δ u ( n + 1 ) λ R Δ u ( n + 1 ) = y ~ 1 n + 1 y ^ 1 ( n + 1 ) y ~ 1 n + K y ^ 1 ( n + K ) λ 1 Δ u ( n + 1 ) λ R Δ u ( n + 1 )
During each iteration, the PID coefficients are refined using the calculated Jacobian terms, and the objective function is approximated via a second-order Taylor expansion as shown in Equation (13).
F u n + 1 + δ u n + 1 F u n + 1 + F u n + 1 u n + 1 δ u n + 1 + 1 2 F 2 ( u n + 1 ) u 2 ( n + 1 ) ( δ u n + 1 ) 2
The derivative of the cost function with respect to the correction term δu(n + 1) is then set to zero, yielding the update rule expressed in Equation (14). Subsequently, approximate Jacobian substitutions can be applied as formulated in Equations (15)–(17).
δ u n + 1 = F u ( n + 1 ) 2 F u 2 ( n + 1 )
J m = y ^ 1 ( n + 1 ) u 1 ( n + 1 ) y ^ 1 ( n + 1 ) u 2 ( n + 1 ) y ^ 1 ( n + 1 ) u R ( n + 1 ) y ^ Q ( n + 1 ) u 1 ( n + 1 ) y ^ Q ( n + 1 ) u 2 ( n + 1 ) y ^ Q ( n + 1 ) u R ( n + 1 ) λ 1 λ 1 λ 1 λ R λ R λ R
δ u n + 1 = J m T e ^ J m T J m
J = y ^ 1 ( n + 1 ) u 1 ( n + 1 ) y ^ 1 ( n + 1 ) u 2 ( n + 1 ) y ^ 1 ( n + 1 ) u R ( n + 1 ) y ^ Q ( n + 1 ) u 1 ( n + 1 ) y ^ Q ( n + 1 ) u 2 ( n + 1 ) y ^ Q ( n + 1 ) u R ( n + 1 ) λ 1 λ 1 λ 1 λ R λ R λ R u 1 ( n + 1 ) K P 11 u 1 ( n + 1 ) K D R Q u R ( n + 1 ) K P 11 u R ( n + 1 ) K D R Q
Here, the K P , K I , and K D gains are updated at each iteration within the PID block [20,21].
The stepwise procedure of the proposed control algorithm is summarized as follows:
  • Measure PMSM outputs and compute the instantaneous error e ( n ) .
  • Calculate the candidate control input u n + 1 from the adaptive PID module.
  • Predict system outputs for the next K steps, [ y ^ 1 ( n + 1 ) , , y ^ Q ( n + K ) ] .
  • Compute the Jacobian matrices J m and J c along with the correction term δ u ( n + 1 ) .
  • Update the PID parameters ( K P , K I , K D ) in the controller.
Apply the final control signal u ( n + 1 ) = u ( n + 1 ) + δ u ( n + 1 ) to the system.

5. Simulation Studies

The initial evaluation of the proposed control strategy was performed through simulations in the MATLAB/Simulink R2025b (MathWorks Inc., Natick, MA, USA) environment to verify the effectiveness of the auto-tuning PID controller prior to experimental implementation. The simulation model included the detailed PMSM dynamics and the auto-tuning PID control algorithm, enabling real-time adaptation of the controller gains based on the system’s operating state.
Figure 4 illustrates the performance of the auto-tuning PID controller at a reference speed of 100 rad/s under no-load conditions. As shown, the system rapidly reaches the reference speed without any overshoot, confirming the controller’s capability to provide stable and accurate speed tracking even in the absence of a load. A closer inspection of the initial transient interval reveals that the reference speed is attained within a short rise time, with no noticeable oscillatory behavior. The smooth transient response highlights the effectiveness of the dual-Jacobian-based gain adaptation mechanism in minimizing overshoot and ensuring fast convergence. Compared to conventional fixed-gain tuning approaches, this behavior indicates a more responsive and well-damped dynamic performance, even during the startup phase. Minor oscillations, if any, are quickly damped, demonstrating the robustness of the proposed control strategy for steady-state operation.
To further evaluate dynamic performance, a step reference velocity input was applied, as depicted in Figure 5, where both the reference and actual speed responses are presented. The system initially operated at 80 rad/s for the first second, followed by an increase to 100 rad/s, and then returned to 80 rad/s after approximately 2.1 s. As clearly observed in Figure 5, the auto-tuning PID controller accurately follows the commanded speed transitions with negligible steady-state error and without overshoot, demonstrating a well-damped transient response and stable operation throughout the entire speed range. The short settling time indicates that the online auto-tuning mechanism effectively adapts the PID gains in real time in response to sudden variations in the reference speed. This adaptive gain adjustment compensates for abrupt dynamic changes, ensuring minimal transient error and rapid convergence to the desired operating point. Moreover, the smooth speed trajectory during both acceleration and deceleration phases implies that the proposed controller maintains proper current regulation and avoids excessive control effort, thereby preserving safe operating conditions for the PMSM drive. These results confirm that the proposed auto-tuning PID controller is capable of handling abrupt speed variations while maintaining both speed accuracy and system robustness.
Overall, the simulation studies confirm the effectiveness and robustness of the proposed auto-tuning PID controller under both steady-state and transient operating conditions. Rather than focusing on individual test cases, these results collectively demonstrate that the controller design provides reliable and consistent performance across different operating scenarios. Consequently, the simulation outcomes establish a solid basis for the subsequent experimental investigations, indicating that the proposed control strategy is well-suited to address practical variations in motor dynamics and the requirements of high-performance PMSM drive applications.

6. Experimental Studies

The dSPACE DS1104 controller board (dSPACE GmbH, Paderborn, Germany)was utilized for conducting real-time experimental studies. The experimental setup consists of a PMSM for speed control and a second permanent magnet synchronous generator (PMSG) coupled to the PMSM to serve as a controllable load, enabling investigation of dynamic motor behavior under realistic operating conditions. As illustrated in Figure 6, the setup integrates the PMSM, PMSG load, inverter, sensors, and the dSPACE DS1104 control platform, allowing real-time execution of both conventional PI and auto-tuning PID control algorithms. The sampling time of 5 kHz was selected to ensure high-fidelity signal acquisition and precise control execution, enabling accurate observation of fast transient dynamics in MIMO nonlinear systems. This high sampling rate is particularly beneficial for capturing subtle current oscillations and transient responses during step changes.
The PMSM specifications employed in this study are as follows: 1.27 Nm rated torque, 3000 r/min rated speed, 4 pole pairs, 2.5 Ω stator resistance, and 7 mH stator inductance. The PMSG load allows the emulation of realistic torque variations, providing a thorough evaluation of both conventional PI and proposed auto-tuning PID controllers under varying operational conditions. In this study, the classical fixed-gain PI controller is selected as the reference benchmark, as it represents the most commonly adopted control structure in industrial PMSM drive systems due to its simplicity, robustness, and ease of implementation within field-oriented control frameworks. The comparison is therefore focused on evaluating the added value of the proposed auto-tuning PID strategy, rather than comparing different controller orders.
Both controllers were initially evaluated at a reference speed of 100 rad/s. For a fair comparison, the gains of the classical PI controller were tuned using a two-stage procedure. Initial tuning was carried out in MATLAB/Simulink through simulation-based analysis to ensure system stability and adequate damping. Subsequently, the gains were fine-tuned experimentally on the dSPACE DS1104 platform using ControlDesk under real-time operation. The final gains were selected to minimize overshoot, settling time, and steady-state error across different operating conditions.
For the sake of reproducibility, the final PI gains used in the experimental studies are as follows: for speed control, K p = 1.202 and K i = 0.00155 ; for current control, K p = 0.1609505 and K i = 1.9525 . This tuning approach reflects common industrial practice for fixed-gain PI controllers in PMSM drive systems. The experimental results are presented in Figure 7.
Figure 7a shows that the auto-tuning PID controller rapidly tracks the desired reference speed without overshoot, exhibiting a short settling time and negligible steady-state error, highlighting its ability to dynamically adjust gains in real time to compensate for nonlinearities. Conversely, the conventional PI controller reaches the reference speed within approximately 2 s with minimal overshoot, while the settling time is observed to be approximately 5 s.
Figure 7b presents the corresponding id current response, demonstrating that the auto-tuning PID maintains the current tightly at 0 A, while the PI controller exhibits small oscillations, indicating less precise d-axis current regulation. These oscillations in the PI controller may lead to minor energy losses and reduced efficiency during transient events, corresponding to increased integral performance indices during dynamic operation.
Step reference experiments were conducted to further assess dynamic performance of the control strategies under load conditions. The reference speed was initially set to 80 rad/s, increased to 100 rad/s at approximately the 10th second, and then returned to 80 rad/s after the 20th second. The corresponding speed and current responses of both the classical PI and the proposed auto-tuning PID controllers are presented in Figure 8a–c.
Figure 8a illustrates the speed responses, while Figure 8b,c show the corresponding d-axis (id) and q-axis (iq) current responses, respectively. Although the PI controller is able to reach the desired speed levels with relatively small speed deviations, noticeable oscillations are observed in both the id and iq currents, indicating reduced robustness under dynamic operating conditions.
The load torque applied by the coupled PMSG was kept constant during the experiments. The observed decrease in the q-axis current at higher speeds is therefore attributed to the improved efficiency of the control strategy and the reduction in torque-producing current ripple once steady-state operation is reached, rather than to a decrease in load torque.
In contrast, the auto-tuning PID controller accurately tracks the reference speed transitions without overshoot. At the same time, both id and iq currents remain tightly regulated throughout the experiment. The id current stays close to zero, minimizing reactive power consumption, while the iq current closely follows the torque demand, ensuring accurate and efficient torque production. These results clearly demonstrate the superior transient performance and robustness of the proposed auto-tuning PID controller under sudden reference speed changes.
Overall, the experimental study confirms that the auto-tuning PID controller provides enhanced tracking performance, improved current regulation, and increased robustness against disturbances compared to the conventional fixed-gain PI controller. The combination of a high sampling rate, accurate current measurement, and real-time gain adaptation enables a comprehensive evaluation of the controller’s performance under realistic operating conditions. These findings highlight the suitability of the proposed control strategy for high-performance PMSM applications requiring precise, adaptive, and real-time control.

7. Conclusions

In this study, an auto-tuning PID controller was developed and experimentally validated for the speed regulation of a Permanent Magnet Synchronous Motor (PMSM), a nonlinear and inherently coupled MIMO system. The proposed approach leverages two Jacobian matrices: one for generating the verification term used in refining the control input, and another for dynamically updating the PID gains according to the instantaneous operating conditions of the motor. This dual-Jacobian structure enables the controller to adapt its parameters in real time, ensuring reliable tracking performance even under varying load and speed transitions.
Experimental implementation was carried out on a dSPACE DS1104 real-time control platform, allowing a direct comparison between conventional fixed-gain PI control and the proposed auto-tuning PID strategy. The results clearly demonstrate that while the baseline PI controller introduces overshoot and exhibits slower convergence under rapid reference variations, the auto-tuning PID maintains smooth and overshoot-free tracking behavior. This improvement is attributed to the controller’s ability to continuously reshape its gains based on system dynamics, thereby compensating for nonlinearities and cross-couplings that typically degrade the performance of traditional controllers.
Beyond its favorable transient response, the auto-tuning PID controller also improves overall robustness against parameter variations and external disturbances. The adaptive mechanism ensures that the controller maintains stability and consistent performance without requiring extensive manual tuning, which is often time-consuming in practical applications. The experimental findings thus validate the effectiveness of the method and highlight its suitability for high-performance motor drive systems where real-time adaptability is essential.
Overall, the proposed auto-tuning PID framework presents a promising alternative for advanced PMSM drives, offering enhanced stability, improved dynamic behavior, and reduced dependence on offline tuning procedures. Future work may focus on extending the methodology to field-oriented control structures, incorporating load torque estimation into the adaptation mechanism, or deploying the approach on embedded microcontroller platforms for cost-effective industrial integration. The strong experimental results obtained in this study indicate that the method has significant potential for broader adoption in nonlinear motor control applications.

Funding

This research received no external funding.

Data Availability Statement

The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding author.

Conflicts of Interest

The author declares no conflict of interest.

References

  1. Kumar, R.; Gupta, R.A.; Singh, B. Intelligent Tuned PID Controllers for PMSM Drive—A Critical Analysis. In Proceedings of the 2006 IEEE International Conference on Industrial Technology, Mumbai, India, 15–17 December 2006; pp. 2055–2060. [Google Scholar] [CrossRef]
  2. Lakhe, R.K.; Chaoui, H.; Alzayed, M.; Liu, S. Universal control of permanent magnet synchronous motors with uncertain dynamic. Actuators 2021, 10, 49. [Google Scholar] [CrossRef]
  3. Nour, M.; Bouketir, O.; Yong, C.E. Self-tuning of PI speed controller gains using fuzzy logic controller. Mod. Appl. Sci. 2008, 2, 55–65. [Google Scholar] [CrossRef][Green Version]
  4. Aguilar Mejia, O.; Tapia, O.R.; Tellez, R.G.; Templos, S.J.L. Adaptive controller method for permanent magnet synchronous motor speed-regulation. In Proceedings of the 7th IET International Conference on Power Electronics, Machines and Drives (PEMD 2014), Manchester, UK, 8–10 April 2014. [Google Scholar] [CrossRef]
  5. Jan, R.-M.; Tseng, C.-S.; Liu, R.-J. Robust PID control design for permanent magnet synchronous motor: A genetic approach. Electr. Power Syst. Res. 2008, 78, 1161–1168. [Google Scholar] [CrossRef]
  6. Hägglund, T.; Åström, K.J. Revisiting the Ziegler-Nichols tuning rules for PI control. Asian J. Control. 2008, 4, 364–380. [Google Scholar] [CrossRef]
  7. Zhang, B.; Pi, Y. Enhanced robust fractional order proportional-plus-integral controller based on neural network for velocity control of permanent magnet synchronous motor. ISA Trans. 2013, 52, 510–516. [Google Scholar] [CrossRef] [PubMed]
  8. Porter, B.; Jones, A.H. Genetic tuning of digital PID controllers. Electron. Lett. 1992, 28, 843–844. [Google Scholar] [CrossRef]
  9. Åström, K.J.; Hägglund, T.; Hang, C.C.; Ho, W.K. Automatic tuning and adaptation for PID controllers: A survey. IFAC Proc. Vol. 1992, 25, 371–376. [Google Scholar] [CrossRef]
  10. Zhao, Z.Y.; Tomizuka, M.; Isaka, S. Fuzzy gain scheduling of PID controllers. IEEE Trans. Syst. Man Cybern. 1993, 23, 1392–1398. [Google Scholar] [CrossRef]
  11. Miao, Y.; Liu, Y.; Chen, Y.; Jin, H. PID controller parameter tuning based on improved particle swarm optimization algorithm. In Proceedings of the International Conference on Electrical, Electronics and Mechatronics (ICEEM 2015), Phuket, Thailand, 20–21 December 2015; pp. 104–107. [Google Scholar] [CrossRef]
  12. Lin, F.; Brandt, R.D.; Saikalis, G. Self-tuning of PID controllers by adaptive interaction. In Proceedings of the 2000 American Control Conference (ACC), Chicago, IL, USA, 28–30 June 2000. [Google Scholar] [CrossRef]
  13. Rui, Z.; Xinhong, X.; Lianbo, C.; Shifeng, G.; Yanhui, Z. Design of PI controller for PMSM using chaos particle swarm optimization algorithm. IOP Conf. Ser. Mater. Sci. Eng. 2019, 717, 012021. [Google Scholar] [CrossRef]
  14. Fu, Z.; Liu, C.; Ruan, S.; Chen, K. Design of neutrosophic self-tuning PID controller for AC permanent magnet synchronous motor based on neutrosophic theory. Math. Probl. Eng. 2021, 2021, 5548184. [Google Scholar] [CrossRef]
  15. Xiao, X.; Yongdong, L.; Min, L. Performance control of PMSM drives using a self-tuning PID. In Proceedings of the IEEE International Conference on Electric Machines and Drives, San Antonio, TX, USA, 15 May 2005; pp. 1053–1057. [Google Scholar] [CrossRef]
  16. Yi, L.; Zhang, C.; Wang, G. Research of self-tuning PID for PMSM vector control based on improved KMTOA. Int. J. Intell. Syst. Appl. 2017, 9, 60–67. [Google Scholar] [CrossRef][Green Version]
  17. Ma, W.; Xu, C.; Yang, F. An auto-tuning PI controller for the speed control of a permanent magnet synchronous motor drive. Adv. Intell. Soft Comput. 2011, 124, 124–136. [Google Scholar] [CrossRef]
  18. Laoufi, C.; Abbou, A.; Sayouti, Y.; Akherraz, M. Self Tuning Fuzzy Logic Speed Controller for Performance Improvement of an Indirect Field-Oriented Control of Induction Machine. Int. Rev. Autom. Control. 2013, 6, 464–471. [Google Scholar]
  19. Mansor, M.N.; Samat, A.A.A.; Tajudin, A.I.; Salim, N.A.; Daud, K.; Shukor, S.F.A. Self Tuning of PI Controller for Speed Control of DC Motor by Using Fuzzy Logic Controller. In Proceedings of the 2021 6th IEEE International Conference on Recent Advances and Innovations in Engineering (ICRAIE), Kedah, Malaysia, 1–3 December 2021; pp. 1–6. [Google Scholar] [CrossRef]
  20. Iplikci, S. A comparative study on a novel model-based PID tuning and control mechanism for nonlinear systems. Int. J. Robust Nonlinear Control. 2010, 20, 1483–1501. [Google Scholar] [CrossRef]
  21. Cetin, M.; Iplikci, S. A novel auto-tuning PID control mechanism for nonlinear systems. ISA Trans. 2015, 58, 292–308. [Google Scholar] [CrossRef] [PubMed]
  22. Wibowo, W.K.; Jeong, S. Genetic algorithm tuned PI controller on PMSM simplified vector control. J. Cent. South Univ. 2013, 20, 3042–3048. [Google Scholar] [CrossRef]
  23. Akpunar, A.; İplikçi, S. Runge-Kutta model predictive speed control for permanent magnet synchronous motors. Energies 2020, 13, 1216. [Google Scholar] [CrossRef]
  24. Akpunar, A.; İplikçi, S. Control and parameter estimation of PMSM by Runge-Kutta model based predictive control. In Proceedings of the 12th International Symposium on Advanced Topics in Electrical Engineering (ATEE 2021), Bucharest, Romania, 25–27 March 2021. [Google Scholar] [CrossRef]
  25. Bida, V.M.; Samokhvalov, D.V.; Al-Mahturi, F.S. PMSM vector control techniques—A survey. In Proceedings of the IEEE Conference of Russian Young Researchers in Electrical and Electronic Engineering (EIConRus), Moscow, Russia, 29 January–1 February 2018; p. 8317164. [Google Scholar] [CrossRef]
  26. Xu, K.; Chen, W.; Xu, Y.; Gao, M.; He, Z. Vector control for PMSM. Sens. Transducers 2014, 170, 227–233. [Google Scholar]
  27. Olubiwe, M.; Uchegbu, V.C.; Uzoechi, L.O. Improved electrical discharge machine (EDM) servomechanism controller for machining micro pits. Int. J. Eng. Res. Technol. 2016, 5, 316–320. [Google Scholar]
  28. Zhao, J.; Xi, M. Self-tuning of PID parameters based on adaptive genetic algorithm. IOP Conf. Ser. Mater. Sci. Eng. 2020, 782, 042028. [Google Scholar] [CrossRef]
Figure 1. Block diagram of the vector control system for PMSM.
Figure 1. Block diagram of the vector control system for PMSM.
Machines 14 00100 g001
Figure 2. Block diagram of the PID controller.
Figure 2. Block diagram of the PID controller.
Machines 14 00100 g002
Figure 3. Auto-tuning PID controller structure ([20,21]).
Figure 3. Auto-tuning PID controller structure ([20,21]).
Machines 14 00100 g003
Figure 4. Simulation of the auto-tuning PID controller at 100 rad/s reference speed under no-load conditions.
Figure 4. Simulation of the auto-tuning PID controller at 100 rad/s reference speed under no-load conditions.
Machines 14 00100 g004
Figure 5. Simulation of the auto-tuning PID controller under step reference speeds: initial 80 rad/s, step to 100 rad/s, and return to 80 rad/s.
Figure 5. Simulation of the auto-tuning PID controller under step reference speeds: initial 80 rad/s, step to 100 rad/s, and return to 80 rad/s.
Machines 14 00100 g005
Figure 6. Experimental setup for real-time PMSM speed control, including the PMSM, PMSG load, inverter, and dSPACE DS1104 controller.
Figure 6. Experimental setup for real-time PMSM speed control, including the PMSM, PMSG load, inverter, and dSPACE DS1104 controller.
Machines 14 00100 g006
Figure 7. PI and auto-tuning PID controller responses at 100 rad/s reference speed under load conditions: (a) Speed response, (b) id current response.
Figure 7. PI and auto-tuning PID controller responses at 100 rad/s reference speed under load conditions: (a) Speed response, (b) id current response.
Machines 14 00100 g007
Figure 8. PI and auto-tuning PID controller step reference responses under load conditions: (a) speed response, (b) d-axis current (id), (c) q-axis current (iq).
Figure 8. PI and auto-tuning PID controller step reference responses under load conditions: (a) speed response, (b) d-axis current (id), (c) q-axis current (iq).
Machines 14 00100 g008
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Akpunar Bozkurt, A. Real-Time Implementation of Auto-Tuned PID Control in PMSM Drives. Machines 2026, 14, 100. https://doi.org/10.3390/machines14010100

AMA Style

Akpunar Bozkurt A. Real-Time Implementation of Auto-Tuned PID Control in PMSM Drives. Machines. 2026; 14(1):100. https://doi.org/10.3390/machines14010100

Chicago/Turabian Style

Akpunar Bozkurt, Adile. 2026. "Real-Time Implementation of Auto-Tuned PID Control in PMSM Drives" Machines 14, no. 1: 100. https://doi.org/10.3390/machines14010100

APA Style

Akpunar Bozkurt, A. (2026). Real-Time Implementation of Auto-Tuned PID Control in PMSM Drives. Machines, 14(1), 100. https://doi.org/10.3390/machines14010100

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop