Submitted:
29 December 2024
Posted:
30 December 2024
You are already at the latest version
Abstract
Keywords:
1. Introduction
2. Materials and Methods
2.1. Determination of the Parameters of the PMSM
2.1.1. Electrical Parameters of the Motor
2.1.2. Mechanical Parameters of the Motor
2.2. Cascade Control Structure
2.3. Tuning Approaches
2.3.1. Analytical-Based Tuning
2.3.2. Swarm-Based Tuning
2.3.3. LLM-Based Tuning
3. Results
| No. | Figure | Method | [A] | [Nm] | [%] |
|---|---|---|---|---|---|
| 1 | Figure 6 (b) | ABC | 0.46 | 0.53 | 11.5 |
| 2 | Figure 6 (d) | PSO | 0.47 | 0.54 | 11.8 |
| 3 | Figure 6 (e) | ABC | 1.12 | 1.28 | 27.9 |
| 4 | Figure 7 (b) | analytical & empirical | 0.54 | 0.62 | 13.5 |
| 5 | Figure 7 (d) | analytical | 0.46 | 0.53 | 11.6 |
| 6 | Figure 7 (e) | analytical | 1.25 | 1.43 | 31.2 |
| 7 | Figure 9 (b) | ChatGPT | 2.71 | 3.10 | 67.7 |
| 8 | Figure 9 (d) | Copilot | 0.44 | 0.50 | 10.9 |
| 9 | Figure 9 (e) | Tuning Assistant | 0.57 | 0.65 | 14.2 |
3.1. Swarm-Based Tuning
3.2. Analytical-Based Tuning
3.3. LLM-Based Tuning
3.4. Quantitative Analysis
3.4.1. Prompt Scoring
3.4.2. Torque Ripple
4. Discussion
5. Conclusion
Supplementary Materials
Author Contributions
Funding
Conflicts of Interest
Abbreviations
| LLM | Large Language Model |
| PMSM | Permanent Magnet Synchronous Motor |
| VSC | Variable Speed Drive |
| TA | Tuning Assistant |
| CCS | Cascade Control Structure dichroism |
| AC | Alternating Current |
| SBMA | Swarm-Based Metaheuristic Algorithm |
| PID | Proportional-Integral-Derivative |
| AI | Artificial Intelligence |
| CNC | Computerized Numerical Control |
| IMC | Internal Model Control |
| ITSE | Integral of Time Squared Error |
| IAE | Integral of Absolute Error |
| ABC | Artificial Bee Colony |
| PSO | Particle Swarm Optimization |
Appendix A
| Symbol | Value | Unit | Symbol | Value | Unit | |
|---|---|---|---|---|---|---|
| 4 | A | p | 3 | - | ||
| 4.6 | Nm | 0.014 | Nms/rad | |||
| 1.05 | 0.0177 | |||||
| 0.0127 | H | 100 | - | |||
| 0.25 | Wb | 22000 | Hz | |||
| 1.145 | Nm/A | 4.55 |
Appendix B
| Parameter | Symbol | Value |
|---|---|---|
| No of optimized parameters | D | 6 |
| No of colony size | NP | 10 |
| No of food sources | FN | NP/2 |
| Maximum no of cycles | MCN | 20 |
| Control parameter limit | limit | FN×D |
| Scout production period | SPP | FN×D |
| Modification rate | MR | 0.8 |
Appendix C
| ChatGPT | Copilot | Tuning Assistant |
|---|---|---|
| 1. How should I tune the current PI controller for the PMSM drive? | 1. How should I tune the current PI controller for the PMSM drive? | 1. How should I tune the current PI controller for the PMSM drive? |
| 2. OK, I observe an overshoot during velocity transient and current ripple during steady-state. What do you suggest? | 2. Ok, can you calculate the proportional gain and the integration time constant of the PI current controller if I give you a rise time and basic parameters of the motor? | 2. Ok, I prefer the current control without overshoot, could you please give me the formulas for PI current controller? |
| 3. I noticed that I have zero anti-windup coefficients in both control loops. How do I choose them? | 3. Ok, R = 1.05, L = 0.0127, and Tr = 0.005 | 3. Thanks. I need clarification on the current rise in time value. |
| 4. Ok, how to determine the optimal value of the Proportional Gain (Kp) of the velocity controller in PMSM for the moment of inertia equal to 0.0177 [kgm*m] and torque constant equal to 1.1447 [Nm/A] | 4. Thanks, how should I tune the velocity PI controller for the PMSM drive? | |
| 5. Thanks. And what about the optimal value of the Integral Gain (ki) for this velocity controller? | 5. I noticed that I have zero anti-windup coefficients in both control loops. How do I choose them? | |
| 6. I noticed that I have zero anti-windup coefficients in both control loops. How do I choose them? |
References
- Huanhuan, R.; Zhang, L.; Su, C.; Jian, S.; Liu, D. Research on fuzzy control of permanent magnet synchronous motor for a mobile robot. In Proceedings of the Journal of Physics: Conference Series. IOP Publishing, Vol. 1754; 2021; p. 012172. [Google Scholar]
- Li, P.; Xu, X.; Yang, S.; Jiang, X. Open circuit fault diagnosis strategy of PMSM drive system based on grey prediction theory for industrial robot. Energy Reports 2023, 9, 313–320. [Google Scholar] [CrossRef]
- Che, X.; Ma, Z.; Qi, X.; Li, W.; Niu, H.; Yan, C. Barrier-Function-Based Adaptive Fast-Terminal Sliding-Mode Control for a PMSM Speed-Regulation System. Electronics 2024, 13, 1091. [Google Scholar] [CrossRef]
- Farah, N.; Lei, G.; Zhu, J.; Guo, Y. Robust Model-Free Reinforcement Learning Based Current Control of PMSM Drives. IEEE Transactions on Transportation Electrification 2024, 1–1. [Google Scholar] [CrossRef]
- Di Fonso, R.; Cecati, C. Navigation and Motors Control of a Differential Drive Mobile Robot. In Proceedings of the 2023 International Conference on Control, Automation and Diagnosis (ICCAD); 2023; pp. 1–6. [Google Scholar] [CrossRef]
- Wang, Y.; Fang, S.; Hu, J. Active disturbance rejection control based on deep reinforcement learning of PMSM for more electric aircraft. IEEE Transactions on Power Electronics 2022, 38, 406–416. [Google Scholar] [CrossRef]
- Aggarwal, A.; Meier, M.; Strangas, E.; Agapiou, J. Analysis of Modular Stator PMSM Manufactured Using Oriented Steel. Energies 2021, 14. [Google Scholar] [CrossRef]
- Tarczewski, T.; Szczepanski, R.; Erwinski, K.; Hu, X.; Grzesiak, L.M. A Novel Sensitivity Analysis to Moment of Inertia and Load Variations for PMSM Drives. IEEE Transactions on Power Electronics 2022, 37, 13299–13309. [Google Scholar] [CrossRef]
- Ewert, P.; Kowalski, C.T.; Jaworski, M. Comparison of the Effectiveness of Selected Vibration Signal Analysis Methods in the Rotor Unbalance Detection of PMSM Drive System. Electronics 2022, 11. [Google Scholar] [CrossRef]
- Zuo, Y.; Lai, C.; Iyer, K.L.V. A review of sliding mode observer based sensorless control methods for PMSM drive. IEEE Transactions on Power Electronics 2023. [Google Scholar] [CrossRef]
- Wróbel, K.; Szabat, K.; Wicher, B.; Brock, S. Hybrydowy ślizgowy obserwator Luenbergera w układzie napędowym z połączeniem elastycznym. Przeglad Elektrotechniczny 2024, 2024. [Google Scholar] [CrossRef]
- Kaminski, M.; Malarczyk, M. Hardware implementation of neural shaft torque estimator using low-cost microcontroller board. In Proceedings of the 2021 25th International Conference on Methods and Models in Automation and Robotics (MMAR). IEEE; 2021; pp. 372–377. [Google Scholar]
- Jankowska, K.; Dybkowski, M. Experimental Analysis of the Current Sensor Fault Detection Mechanism Based on Neural Networks in the PMSM Drive System. Electronics 2023, 12. [Google Scholar] [CrossRef]
- Jin, L.; Mao, Y.; Wang, X.; Lu, L.; Wang, Z. Online Data-Driven Fault Diagnosis of Dual Three-Phase PMSM Drives Considering Limited Labeled Samples. IEEE Transactions on Industrial Electronics 2023. [Google Scholar] [CrossRef]
- Niewiara, L.J.; Szczepanski, R.; Tarczewski, T.; Grzesiak, L.M. State Feedback Speed Control with Periodic Disturbances Attenuation for PMSM Drive. Energies 2022, 15. [Google Scholar] [CrossRef]
- Qian, W.; Panda, S.K.; Xu, J.X. Torque ripple minimization in PM synchronous motors using iterative learning control. IEEE Transactions on Power Electronics 2004, 19, 272–279. [Google Scholar] [CrossRef]
- Chung, D.W.; Sul, S.K. Analysis and compensation of current measurement error in vector-controlled AC motor drives. IEEE Transactions on Industry Applications 1998, 34, 340–345. [Google Scholar] [CrossRef]
- Tarczewski, T.; Niewiara, L.; Grzesiak, L. Artificial bee colony based state feedback position controller for PMSM servo-drive – the efficiency analysis. Bulletin of the Polish Academy of Sciences. Technical Sciences 2020, 68. [Google Scholar] [CrossRef]
- Templos-Santos, J.L.; Aguilar-Mejia, O.; Peralta-Sanchez, E.; Sosa-Cortez, R. Parameter Tuning of PI Control for Speed Regulation of a PMSM Using Bio-Inspired Algorithms. Algorithms 2019, 12. [Google Scholar] [CrossRef]
- Aguilar-Mejía, O.; Minor-Popocatl, H.; Tapia-Olvera, R. Comparison and ranking of metaheuristic techniques for optimization of PI controllers in a machine drive system. Applied Sciences 2020, 10, 6592. [Google Scholar] [CrossRef]
- Hussain, H.A. Tuning and Performance Evaluation of 2DOF PI Current Controllers for PMSM Drives. IEEE Transactions on Transportation Electrification 2021, 7, 1401–1414. [Google Scholar] [CrossRef]
- Ren, J.; Ye, Y.; Xu, G.; Zhao, Q.; Zhu, M. Uncertainty-and-Disturbance-Estimator-Based Current Control Scheme for PMSM Drives With a Simple Parameter Tuning Algorithm. IEEE Transactions on Power Electronics 2017, 32, 5712–5722. [Google Scholar] [CrossRef]
- Rajesh Kumar Mahto, A.M.; Bansal, R.C. Controller design using PSO and WOA algorithm for enhanced performance of vector-controlled PMSM drive. International Journal of Modelling and Simulation 2024, 0, 1–11. [Google Scholar] [CrossRef]
- Achour, H.B.; Ziani, S.; Chaou, Y.; El Hassouani, Y.; Daoudia, A. Permanent magnet synchronous motor PMSM control by combining vector and PI controller. WSEAS Trans. Syst. Control 2022, 17, 244–249. [Google Scholar] [CrossRef]
- Umland, J.W.; Safiuddin, M. Magnitude and symmetric optimum criterion for the design of linear control systems: what is it and how does it compare with the others? IEEE Transactions on Industry Applications 1990, 26, 489–497. [Google Scholar] [CrossRef]
- Harnefors, L.; Nee, H.P. Model-based current control of AC machines using the internal model control method. IEEE Transactions on Industry Applications 1998, 34, 133–141. [Google Scholar] [CrossRef]
- Pietrusewicz, K.; Waszczuk, P.; Kubicki, M. MFC/IMC control algorithm for reduction of load torque disturbance in PMSM servo drive systems. Applied Sciences 2018, 9, 86. [Google Scholar] [CrossRef]
- Song, W.; Li, J.; Ma, C.; Xia, Y.; Yu, B. A Simple Tuning Method of PI regulators in FOC for PMSM Drives based on Deadbeat Predictive Conception. IEEE Transactions on Transportation Electrification 2024. [Google Scholar] [CrossRef]
- Nasab, M.R.; Ghalebani, P.; Bruno, S.; Cometa, R.; La Scala, M. Adaptive PI Control of PMSM for Electric Vehicle Application Based on Sliding-mode Extremum Seeking Algorithm. In Proceedings of the 2023 Asia Meeting on Environment and Electrical Engineering (EEE-AM). IEEE; 2023; pp. 1–6. [Google Scholar]
- Chang, Y.; Wang, X.; Wang, J.; Wu, Y.; Yang, L.; Zhu, K.; Chen, H.; Yi, X.; Wang, C.; Wang, Y.; et al. A survey on evaluation of large language models. ACM Transactions on Intelligent Systems and Technology 2024, 15, 1–45. [Google Scholar] [CrossRef]
- Kevian, D.; Syed, U.; Guo, X.; Havens, A.; Dullerud, G.; Seiler, P.; Qin, L.; Hu, B. Capabilities of large language models in control engineering: A benchmark study on gpt-4, claude 3 opus, and gemini 1.0 ultra. arXiv preprint arXiv:2404.03647, arXiv:2404.03647 2024.
- de Zarzà, I.; de Curtò, J.; Roig, G.; Calafate, C.T. Llm adaptive pid control for b5g truck platooning systems. Sensors 2023, 23, 5899. [Google Scholar] [CrossRef]
- Bobek, V. PMSM electrical parameters measurement. Application Note, Freescale Semiconductor Inc., Doc. No. AN4680 2013, 7, 13. [Google Scholar]
- Szczepanski, R.; Tarczewski, T.; Niewiara, L.J.; Stojic, D. Identification of mechanical parameters in servo-drive system. In Proceedings of the 2021 IEEE 19th International Power Electronics and Motion Control Conference (PEMC). IEEE; 2021; pp. 566–573. [Google Scholar]
- Tarczewski, T.; Skiwski, M.; Grzesiak, L.M.; Zieliński, M. PMSM servo-drive fed by SiC MOSFETs based VSI. Power Electronics and Drives 2018, 3, 35–45. [Google Scholar] [CrossRef]
- Astrom, K.J.; Hagglund, T. PID controllers; theory, design, and tuning problems; Instrument Society of America, 1995.
- Bingi, K.; Ibrahim, R.; Karsiti, M.N.; Hassan, S.M.; Harindran, V.R. A comparative study of 2DOF PID and 2DOF fractional order PID controllers on a class of unstable systems. Archives of Control Sciences 2018, 635–682. [Google Scholar] [CrossRef]
- Dannehl, J.; Fuchs, F.W.; Thøgersen, P.B. PI state space current control of grid-connected PWM converters with LCL filters. IEEE Transactions on Power Electronics 2010, 25, 2320–2330. [Google Scholar] [CrossRef]
- Roni, M.H.K.; Rana, M.; Pota, H.; Hasan, M.M.; Hussain, M.S. Recent trends in bio-inspired meta-heuristic optimization techniques in control applications for electrical systems: A review. International Journal of Dynamics and Control 2022, 1–13. [Google Scholar] [CrossRef]
- Chen, J.; Liu, Z.; Huang, X.; Wu, C.; Liu, Q.; Jiang, G.; Pu, Y.; Lei, Y.; Chen, X.; Wang, X.; et al. When large language models meet personalization: Perspectives of challenges and opportunities. World Wide Web 2024, 27, 42. [Google Scholar] [CrossRef]
- Web page of a software solutions provider that enables creating custom GPT Chatbot. Available online: www.ordemio.com/ai-chatbot (accessed on 15 December 2024).
- Tarczewski, T.; Grzesiak, L.M. Constrained State Feedback Speed Control of PMSM Based on Model Predictive Approach. IEEE Transactions on Industrial Electronics 2016, 63, 3867–3875. [Google Scholar] [CrossRef]
- Karaboga, D.; Basturk, B. Artificial bee colony (ABC) optimization algorithm for solving constrained optimization problems. In Proceedings of the International fuzzy systems association world congress. Springer; 2007; pp. 789–798. [Google Scholar]
- Liusie, A.; Manakul, P.; Gales, M.J. Zero-shot NLG evaluation through pairware comparisons with llms. arXiv preprint 2023, arXiv:2307.07889 2023. [Google Scholar]
- Schneider, J.; Schenk, B.; Niklaus, C. Towards llm-based autograding for short textual answers. arXiv preprint 2023, arXiv:2309.11508 2023. [Google Scholar]
- Liu, Y.; Cong, T.; Zhao, Z.; Backes, M.; Shen, Y.; Zhang, Y. Robustness Over Time: Understanding Adversarial Examples’ Effectiveness on Longitudinal Versions of Large Language Models. arXiv preprint 2023, arXiv:2308.07847 2023. [Google Scholar]
- Tarczewski, T.; Grzesiak, L.; et al. Torque ripple minimization for PMSM using voltage matching circuit and neural network based adaptive state feedback control. In Proceedings of the 2014 16th European Conference on Power Electronics and Applications. IEEE; 2014; pp. 1–10. [Google Scholar]
- Li, X.; Zhang, Y.; Malthouse, E.C. Exploring fine-tuning chatgpt for news recommendation. arXiv preprint 2023, arXiv:2311.05850 2023. [Google Scholar]
- Latif, E.; Zhai, X. Fine-tuning ChatGPT for automatic scoring. Computers and Education: Artificial Intelligence 2024, 6, 100210. [Google Scholar] [CrossRef]











| No. | Auto-tuning* | Method | Iter. no. | Time [mins] | User exp. | Fig. | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | 5.58 | 82.85 | 1 | 30.89 | 1000 | 1 | 0.00197 | N | TA | – | adv | Figure 9 (e)-(f) | |
| 2 | 0.5 | 200 | 1 | 30 | 200 | 1 | 0.00198 | Y | empirical | 74 | 80 | beg | – |
| 3 | 0.9 | 45 | 0 | 350 | 4 | 0.8 | 0.00198 | Y | empirical | 80 | – | beg | – |
| 4 | 217.15 | 0 | 371.45 | 134.49 | 500 | 3.16 | 0.00198 | Y | ABC | 500 | 70 | adv | Figure 6 (e)-(f) |
| 5 | 0.39 | 144.44 | 0.1 | 210.1 | 0.0001 | 1 | 0.00199 | N | analytical | 80 | – | beg | – |
| 6 | 8.37 | 0.0001 | 1000 | 382.29 | 0.0004 | 100 | 0.002 | N | analytical | 109 | 30 | beg | Figure 7 (e)-(f) |
| 7 | 2.79 | 82.85 | 0.8 | 152.72 | 1098 | 0.5 | 0.002 | N | analytical | 32 | – | beg | – |
| 8 | 278.96 | 82.85 | 3.37 | 388.98 | 388.98 | 1 | 0.0021 | N | ChatGPT | – | adv | Figure 9 (a)-(b) | |
| 9 | 0.56 | 82.72 | 0.8 | 15.29 | 109.86 | 1.12 | 0.0021 | N | analytical | 41 | 50 | beg | – |
| 10 | 0.5 | 231.11 | 7 | 15.29 | 109.86 | 1.27 | 0.0021 | N | analytical | 70 | – | beg | – |
| 11 | 0.23 | 82.72 | 0 | 152.97 | 0.0009 | 20 | 0.0021 | N | analytical | 34 | 71 | beg | – |
| 12 | 0.28 | 120.7 | 1 | 16.97 | 549.31 | 50 | 0.0022 | N | analytical | 27 | – | beg | – |
| 13 | 2.8 | 82.7 | 0 | 5493.1 | 0.0002 | 5 | 0.0022 | N | analytical | 37 | 56 | beg | – |
| 14 | 2.5 | 12.5 | 0.7 | 17.5 | 25 | 1.25 | 0.0023 | N | empirical | 42 | 15 | adv | – |
| 15 | 0.5 | 60 | 62 | 10 | 120 | 190 | 0.0026 | Y | empirical | 120 | – | beg | – |
| 16 | 1 | 300 | 5 | 20 | 100 | 40 | 0.0026 | Y | empirical | 93 | – | adv | – |
| 17 | 0.4 | 185 | 30 | 150 | 90 | 30 | 0.003 | N | empirical | 115 | 75 | beg | – |
| 18 | 0.75 | 38.52 | 0 | 44.7 | 92.52 | 0 | 0.003 | N | analytical | 98 | – | beg | – |
| 19 | 0.47 | 963.65 | 19.56 | 5.81 | 94.45 | 19.96 | 0.003 | N | analytical | 14 | – | adv | Figure 7 (c)-(d) |
| 20 | 0.056 | 82.85 | 0.7 | 17.5 | 27.5 | 1.5 | 0.0032 | N | an. & em. | 55 | 10 | adv | – |
| 21 | 0.35 | 750 | 200 | 100 | 110 | 190 | 0.0034 | Y | empirical | 91 | 60 | beg | – |
| 22 | 1.21 | 44.95 | 1 | 7.73 | 45.14 | 15 | 0.0042 | Y | PSO | 2757 | 120 | adv | Figure 6 (c)-(d) |
| 23 | 0.103 | 82.72 | 0 | 5 | 50 | 1 | 0.0044 | N | an. & em. | – | 45 | adv | Figure 7 (a)-(b) |
| 24 | 1.4 | 82.72 | 0 | 15.29 | 1.4 | 5 | 0.0045 | Y | analytical | 47 | 66 | beg | – |
| 25 | 0.36 | 250 | 65 | 75 | 30 | 100 | 0.0091 | Y | empirical | 238 | 75 | beg | – |
| 26 | 0.019 | 11.88 | 40.42 | 9.47 | 37.86 | 189.86 | 0.013 | N | ABC* | 430 | 24 | adv | Figure 6 (a)-(b) |
| 27 | 0.011 | 82.72 | 0.1 | 3.05 | 0.046 | 0 | 0.054 | N | analytical | 13 | 48 | beg | – |
| 28 | 0.28 | 82.85 | 1 | 0.3 | 0.8 | 1 | 3.22 | N | an. & em. | 21 | 16 | adv | – |
| 29 | 0.64 | 3.81 | 3.81 | 0.16 | 0.12 | 0.12 | 10.72 | N | Copilot | – | adv | Figure 9 (c)-(d) |
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. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).