Comparative Analysis of Three PI Tuning Methods
Comparative Analysis of Three PI Tuning Methods
Abstract— The paper presents a comparative study of three are robust, and require low maintenance. However, they have
methods used for the Field Oriented Control (FOC) of lower efficiency and perform poorly at high power factors
Permanent Magnet Synchronous Motors (PMSM). The under high-speed conditions. Vector control techniques can
presented work explores three tuning methods (i) manual tuning improve the dynamic performance and expand the constant
(ii) mathematical equation-based tuning based on literature and power region of induction motors. Additionally, recent
(iii) Autotuner from MathWorks for the speed, d-axis, q-axis advances, such as pole-changing induction motors, dual-
control of PMSM motors. The steps for each tuning method are converter strategies for improving power factor at high speeds,
explained in detail along with their performance comparison.
and lightweight axial flux induction motors with excellent
The conclusion highlights the trade-offs in performance and
mechanical properties, enhance the performance of induction
effort for each method, offering insights to help users select the
most suitable approach.
motors. However, these advances come at the cost of
increased system size and cost. Switched reluctance motors
Keywords—Field Oriented Control (FOC), Permanent (SRMs) offer a wide constant power region and exhibit
Magnet Synchronous Motor (PMSM), PI controller tuning, characteristics that are well-suited for EVs. However, they
MATLAB Simulink, Autotuning suffer from torque ripple, leading to acoustic noise, as well as
excessive current ripple. Among these motor types, PMSMs,
I. INTRODUCTION while also lacking a wide constant power region and requiring
Since the last decade, environmental pollution has power converters, offer superior efficiency, smooth torque,
increased severely owing to the emission of various gases like high power density, and improved heat dissipation. The
carbon dioxide, sulphur dioxide, oxides of nitrogen, etc., enhanced efficiency of PMSMs reduces energy consumption,
which are detrimental to human health. Vehicle engines are thereby lowering the required battery capacity for a given
one of the most significant sources of these emissions, range. This reduction in battery size offsets the higher cost of
accounting for 30% to 50% of total road transport-related CO2 PMSMs, improving the vehicle’s range-to-cost ratio [10].
emissions. Along with the problem of pollution, which is To fully leverage the advantages of PMSMs, accurate
exacerbated by population growth and urbanization, the control strategies are essential. Various methodologies are
scarcity of traditional fossil fuels and innovations in employed for speed control of PMSMs, including Field
rechargeable batteries and alternative energy storage Oriented Control (FOC), Direct Torque Control (DTC),
technologies have accelerated the adoption of Electric Sliding Mode Control (SMC), Model Predictive Control
Vehicles (EVs) for transportation [1][2][3][4]. EVs produce (MPC), Fuzzy Logic Control (FLC), and Iterative Learning
fewer or zero emissions compared to their internal combustion Control (ILC) [11][12]. The predominant strategy is Field
engine (ICE) counterparts [5]. The transition to EV Oriented Control (FOC), a vector control method that
technology is also driven by environmental concerns over typically employs PI-type controllers in the current and speed
greenhouse gas emissions. Furthermore, economic advantages control loops. FOC is recognized for its excellent dynamic
such as reduced operational expenses – due to the simpler performance and ease of implementation. It enables
mechanical design of EVs compared to traditional ICE independent control of torque and flux, improving torque
vehicles – alongside incentives from local governments, and response and overall system efficiency.
competitive pricing due to market competition, make EVs a
highly attractive choice for both the present and future In FOC, motor performance is significantly influenced by
[5][6][7][8]. the tuning of Proportional-Integral (PI) controllers that
regulate motor speed and the D- and Q-axis currents. Proper
The electric motor, together with the battery pack, forms adjustment of the PI controller gains, Kp and Ki, is critical to
the cornerstone of an electric vehicle's propulsion system [9]. ensuring system stability, responsiveness, and robustness.
Various motor types are employed in electric propulsion, each Manually tuning these controllers can be a laborious process,
offering unique advantages. Commonly used motors in EVs often requiring weeks of experimentation. This paper presents
include the Brushless DC Motor (BLDC), Permanent Magnet alternative tuning approaches to streamline the process.
Synchronous Motor (PMSM), Induction Motor (IM), and Specifically, it evaluates three methods for tuning PI
Switched Reluctance Motor (SRM) [10][12]. controllers: manual tuning, a mathematical approach based on
Although BLDC motors are well-suited for EVs due to existing literature [13], and the MathWorks Autotuner
their high power density and torque capabilities, they lack a [14][15]. The paper compares the effectiveness of each
wide constant power region because of their limited flux- approach and the effort required for implementation, offering
weakening capability. Induction motors, on the other hand, engineers and researchers insights into the strengths and
offer easier control owing to their flux-weakening capability, weaknesses of each method. This knowledge will assist them
Authorized licensed use limited to: Cape Peninsula University of Technology. Downloaded on August 11,2025 at 10:40:12 UTC from IEEE Xplore. Restrictions apply.
𝐾 = (7)
𝐾 = (8)
Authorized licensed use limited to: Cape Peninsula University of Technology. Downloaded on August 11,2025 at 10:40:12 UTC from IEEE Xplore. Restrictions apply.
Fig. 5. Torque vs Time – Manual Tuning Fig. 8. Torque vs Time – Mathematical equation-based tuning
Fig. 6. Motor's stator currents (phases a, b, and c) – Manual Tuning Fig. 9. Motor's stator currents (phases a, b, and c) – Mathematical equation-based tuning
Authorized licensed use limited to: Cape Peninsula University of Technology. Downloaded on August 11,2025 at 10:40:12 UTC from IEEE Xplore. Restrictions apply.
V. CONCLUSION AND FUTURE WORKS (c) Exploring alternative tuning methods and optimization
This work offers a comparative examination of three PI algorithms for highly nonlinear systems.
tuning methodologies—manual tuning, equation-based (d) Simulating the system on hardware to validate the tuning
tuning, and the MATLAB Simulink FOC autotuner – results in a real-world setting.
pertaining to speed, D-axis, and Q-axis controllers in the Field
Orientated Control (FOC) of Permanent Magnet Synchronous TABLE II. SIMULATION SETTINGS
Motors (PMSM). Each approach was evaluated based on
tuning effort, performance, and its ability to achieve the Sample time (s) 5e-5
desired control response. Overall, the observations highlight Switching frequency (Hz) 20000
that both equation-based tuning and FOC autotuner-based
tuning offer notable advantages over manual tuning, Solver Selection Fixed-Step
especially in terms of time efficiency, as manual tuning Solver and Fixed Step Size Auto
generally requires weeks to complete. While both manual and
equation-based methods enabled the system to reach the Simulation type Discrete
desired behaviour, equation-based tuning demonstrated Target bandwidth (rad/sec)
superior performance with minimal tuning effort, particularly 1000
Current loops (D & Q)
from a total time investment standpoint. This method achieved Target phase margin (degrees)
accurate speed tracking with fewer transient spikes in speed, Current loops (D & Q)
60
torque, and current waveforms. It is also worth noting that the Target bandwidth (rad/sec)
FOC autotuner can operate very quickly on computers with Speed Loop
100
high processing power, such as those with Intel i7 or Apple M
series processors. Table 1 provides a comparison of the Target phase margin (degrees) 60
discussed tuning methods and Fig. 13 provides a quick
snapshot on the results.
TABLE III. PMSM PARAMETERS [20]
TABLE I. TUNING METHODS COMPARED
Computational d-axis inductance (Ld) 0.00424 H
Tuning Method Complexity Total time spent resources
q-axis inductance (Lq) 0.00424 H
required
Manual Tuning Low Weeks Medium Stator resistance (Rs) 0.559 Ω
Mathematical Back EMF @1000rpm 141 V
equation-based Medium Days Medium
tuning PM flux linkage (𝜑𝑓 ) 0.2748 Wb
MathWorks FOC
Medium Days High Poles 8
Autotuner
Rated line voltage 400 V
Authorized licensed use limited to: Cape Peninsula University of Technology. Downloaded on August 11,2025 at 10:40:12 UTC from IEEE Xplore. Restrictions apply.
phi_f = 0.2748; % P M flux linkage (V/rad/s) Vehicles,” Environmental Science & Technology, vol. 36, no. 6, pp.
1169–1180, Feb. 2002, doi: 10.1021/es0108077.
J = 0.00406; % Inertia (J) (is a sum of the moments of inertia [3] O. A. Towoju and F. A. Ishola, “A case for the internal combustion
from motor Jm, wheel Jw and the one associated with the engine powered vehicle,” Energy Reports, vol. 6, pp. 315–321, Feb.
vehicle Jv) (Kgm^2) J = Jm + Jw + Jv 2020, doi: 10.1016/j.egyr.2019.11.082.
[4] Y. Van Fan, S. Perry, J. J. Klemeš, and C. T. Lee, “A review on air
% Time constants (in seconds (s)) emissions assessment: Transportation,” Journal of Cleaner Production,
vol. 194, pp. 673–684, May 2018, doi: 10.1016/j.jclepro.2018.05.151.
T_CAN = 2000e-6; % CAN communication delay (T_CAN)
[5] R. Vidhi and P. Shrivastava, “A review of electric vehicle lifecycle
T_d2 = 100e-6; % Delay in calculating algorithms in the emissions and policy recommendations to increase EV penetration in
India,” Energies, vol. 11, no. 3, p. 483, Feb. 2018, doi:
digital signal controllers 10.3390/en11030483.
T_mw = 2500e-6; % delay in filtering of speed [6] S. Z. Rajper and J. Albrecht, “Prospects of Electric Vehicles in the
Developing Countries: A literature review,” Sustainability, vol. 12, no.
T_d1 = 100e-6; % Delay in calculating algorithms in the 5, p. 1906, Mar. 2020, doi: 10.3390/su12051906.
digital signal controllers [7] G. L. Brase, “What Would It Take to Get You into an Electric Car?
Consumer Perceptions and Decision Making about Electric Vehicles,”
T_PWM = 50e-6; % Delay caused by a pulse width modulator The Journal of Psychology, vol. 153, no. 2, pp. 214–236, Sep. 2018,
doi: 10.1080/00223980.2018.1511515.
% Calculate Tc
[8] N. Rietmann, B. Hügler, and T. Lieven, “Forecasting the trajectory of
Tc = Lq / Rs; electric vehicle sales and the consequences for worldwide CO2
emissions,” Journal of Cleaner Production, vol. 261, p. 121038, Mar.
% Calculate Kc 2020, doi: 10.1016/j.jclepro.2020.121038.
[9] M. Ehsani, K. V. Singh, H. O. Bansal, and R. T. Mehrjardi, “State of
Kc = (K_PWM * K_mc) / Rs; the art and trends in electric and hybrid electric vehicles,” Proceedings
of the IEEE, vol. 109, no. 6, pp. 967–984, May 2021, doi:
% Calculate TcΣ 10.1109/jproc.2021.3072788.
Tc_Sigma = Td1 + T_PWM; [10] S. Madichetty, S. Mishra, and M. Basu, “New trends in electric motors
and selection for electric vehicle propulsion systems,” IET Electrical
% Calculate Kpc and Kic (Current controller gains) Systems in Transportation, vol. 11, no. 3, pp. 186–199, Apr. 2021, doi:
10.1049/els2.12018.
Kpc = Tc / (2 * Kc * Tc_Sigma); [11] P. Stumpf and T. Tóth-Katona, “Recent achievements in the control of
interior Permanent-Magnet Synchronous Machine Drives: A
Kic = 1 / (2 * Kc * Tc_Sigma); comprehensive overview of the state of the art,” Energies, vol. 16, no.
13, p. 5103, Jul. 2023, doi: 10.3390/en16135103.
% Display the results
[12] D. Mohanraj, J. Gopalakrishnan, B. Chokkalingam, and L. Mihet-Popa,
fprintf('Kpc = %.6f\n', Kpc); ‘Critical Aspects of Electric Motor Drive Controllers and Mitigation of
Torque Ripple—Review’, IEEE Access, vol. 10, pp. 73635–73674,
fprintf('Kic = %.6f\n', Kic); 2022, doi: 10.1109/ACCESS.2022.3187515.
[13] P. Rumniak, ‘Tuning of PI regulators in distributed control system for
% Calculation of the sum of small time constants an electric vehicle’, ELECTROTECHNICAL REVIEW, vol. 1, no. 9,
pp. 292–296, Sep. 2015, doi: 10.15199/48.2015.09.70.
T_vSum = 2*T_CAN + T_d2 + T_mw + 2*(T_d1 +
T_PWM); [14] “Field Oriented Control Autotuner - Automatically and sequentially
tune multiple PID control loops in field-oriented control application -
% Calculation of the gain of the plant (Kv) Simulink - MathWorks India.”
https://in.mathworks.com/help/mcb/ref/fieldorientedcontrolautotuner.
Kv = (Kmw * 1.5 * p * phi_f) / (Kmc * J); html.
[15] “How to use field oriented Control AutoTuner Block - MATLAB &
% Calculation of the proportional gain (Kpw) Simulink - MathWorks India.”
https://in.mathworks.com/help/mcb/ug/how-to-use-field-oriented-
Kpw = 1 / (alpha * Kv * T_vSum); control-autotuner.html.
% Calculation of the integral gain (Kiw) [16] P. Pillay and R. Krishnan, ‘Modeling of permanent magnet motor
drives’, IEEE Transactions on Industrial Electronics, vol. 35, no. 4, pp.
Kiw = 1 / (alpha^3 * Kv * T_vSum^2); 537–541, Nov. 1988, doi: 10.1109/41.9176.
[17] N. P. Quang and J.-A. Dittrich, Vector control of Three-Phase AC
% Display the results (Speed Controller gains) machines: System Development in the Practice. Springer, 2015.
fprintf('Proportional Gain (Kpw): %.4f\n', Kpw); [18] S. N. Vukosavic, Electrical machines. Springer Science & Business
Media, 2012.
fprintf('Integral Gain (Kiw): %.4f\n', Kiw); [19] V. M. Bida, D. V. Samokhvalov, and F. Sh. Al-Mahturi, ‘PMSM vector
control techniques — A survey’, in 2018 IEEE Conference of Russian
REFERENCES Young Researchers in Electrical and Electronic Engineering
(EIConRus), Moscow: IEEE, Jan. 2018, pp. 577–581. doi:
[1] C. D. Cooper and F. C. Alley, Air pollution control: A Design 10.1109/EIConRus.2018.8317164.
Approach, Fourth Edition. Waveland Press, 2010.
[20] imperix.com, “Motor Testbench datasheet.” Aug. 31, 2023. [Uploaded
[2] J. J. Schauer, M. J. Kleeman, G. R. Cass, and B. R. T. Simoneit, content from the website imperix.com]. Available:
“Measurement of Emissions from Air Pollution Sources. 5. https://imperix.com/wp-
C1−C32Organic Compounds from Gasoline-Powered Motor content/uploads/document/Motor_testbench_Datasheet.pdf.
Authorized licensed use limited to: Cape Peninsula University of Technology. Downloaded on August 11,2025 at 10:40:12 UTC from IEEE Xplore. Restrictions apply.