Proportional-Integral (PI) controllers are widely used in industrial automation, for their simplicity, robustness and low cost of implementation. However, tuning of these controllers on hardware is still a difficult task, particularly in safety-critical applications such as pressure control. Manual tuning is cumbersome, unreliable, and dangerous or destructive when done directly on the hardware. In this paper, a hardware-safe adaptive PI auto-tuning method using the Absolute Time-Weighted Squared Error (ATSE) performance index for solenoid pressure controllers is presented. The proposed algorithm is fully model-free (without requiring identification of the plant initially), and ensures strict hardware-safety by limiting the incremental gain changes, detecting output saturation and switching to the best-known stable PI gains. The algorithm is tested on an STM32 microcontroller, which communicates with a PC-based tuner via RS-485 Modbus-RTU, and is monitored via a Python-based PyQt-based GUI. The MATLAB/Simulink simulation results show successful steady-state error reduction while keeping the overshoot low, and gain convergence. Real-time tests showed successful communication and hardware-safety. This offers a practical, understandable and ready-to-use adaptive auto-tuning solution for industrial control systems.
Introduction
The text explains the long-standing dominance of PID/PI controllers in industrial automation, especially for controlling processes like pressure, flow, and temperature due to their simplicity and reliability. However, tuning these controllers (setting KpK_pKp?, KiK_iKi?, KdK_dKd?) is difficult because it requires balancing multiple performance goals such as fast response, stability, and minimal steady-state error. Traditional methods like Ziegler–Nichols are widely used but are often time-consuming, unsafe, and can cause instability or hardware damage.
Advanced approaches like Particle Swarm Optimization (PSO), Genetic Algorithms (GA), fuzzy logic, and neural networks aim to improve tuning but introduce new issues such as high computational cost, unsafe exploration of parameters, and poor interpretability, making them less suitable for safety-critical industrial systems.
To address these limitations, the paper proposes a rule-based, hardware-safe, adaptive PI auto-tuning system. Its key contributions include a model-free tuning method, a real-time performance metric called ATSE, and multiple safety mechanisms such as gain limits, incremental updates, and automatic rollback. The system is implemented on an STM32 microcontroller with a PC-based Python tuner communicating via RS-485 Modbus, along with a GUI for monitoring and control.
The literature review shows that classical, model-based, and optimization-based methods each have drawbacks, while intelligent methods lack transparency. This motivates a safe, interpretable, and deterministic tuning approach.
The system architecture consists of:
Hardware: pressure tank, solenoid valve, pressure sensor, STM32 controller, and communication interface.
Software: embedded PI control firmware, Python-based auto-tuner using ATSE logic, and a GUI for real-time monitoring.
Conclusion
This paper presented a hardware-safe adaptive PI auto-tuning system for solenoid-based pressure control, combining the ATSE performance index with a rule-based, model-free gain-update strategy. The system was implemented end-to-end on a practical hardware platform comprising an STM32 embedded controller, RS-485 Modbus-RTU communication, a Python auto-tuner, and a PyQt visualization interface. Simulation validation confirmed significant improvements in settling time, steady-state error, and ATSE cost relative to default gains, with stable and bounded gain convergence. Hardware testing confirmed the correct operation of all software, firmware, and communication subsystems. Full closed-loop hardware validation was constrained by a mechanical leakage issue in the available test rig, which is identified as the primary remaining step toward complete industrial validation.
The proposed approach demonstrates that effective, safe auto-tuning need not require complex optimization machinery or explicit plant modeling. By combining a well-chosen performance metric with conservative, interpretable adaptation rules and robust hardware-safety mechanisms, it provides a practical and directly deployable solution for adaptive PI controller tuning in real industrial environments.
References
[1] R. S. Patil, S. P. Jadhav, and M. Patil, \"Review of intelligent and nature-inspired algorithms-based methods for tuning PID controllers in industrial applications,\" Journal of Robotics and Control (JRC), Feb. 2024, doi: 10.18196/jrc.v5i2.20850.
[2] J.-M. Barrera-Fernandez, J. P. M. Hernandez, K. M. Escobedo, A. Vazquez-Cervantes, and J. Vargas, \"PI-DÆ: An adaptive PID controller utilizing a new adaptive exponent (Æ) algorithm to solve derivative term issues,\" Algorithms, Jun. 2025, doi: 10.3390/a18070391.
[3] D. Pavkovic, D. Lisjak, D. Kolar, M. Cipek, and P. D. Pavkovic, \"PI/PID controller relay experiment auto-tuning with extended Kalman filter and second-order generalized integrator as parameter estimators,\" Tehni?ki Vjesnik, Jun. 2023, doi: 10.17559/tv-20221003112627.
[4] N. Rohadi, L. Kin, Men, and A. Hidayat, \"Adaptive PID auto-tuning algorithm on Omron PLC for speed control and stability,\" Jurnal Nasional Teknik Elektro dan Teknologi Informasi (JNTETI), Nov. 2025, doi: 10.22146/jnteti.v14i4.22693.
[5] C. Lu, R. Tang, C. Li, J. Nwoke, J. Viola, and Y. Chen, \"A fast relay feedback auto-tuning tilt-integral-derivative (TID) controller method with the fractional-order Ziegler-Nichols approach,\" ISA Transactions, May 2024, doi: 10.1016/j.isatra.2024.05.009.
[6] D. A. Brattley and W. W. Weaver, \"Adaptive PI control using recursive least squares for centrifugal pump pipeline systems,\" Machines, Nov. 2025, doi: 10.3390/machines13111064.
[7] P. Dimitrov and M. Alexandrova, \"Automatic control of fluids in electropneumatic system,\" Annual Journal of Technical University of Varna, Bulgaria, Dec. 2025, doi: 10.29114/ajtuv.vol9.iss2.365.
[8] J. E. Gaudio, A. Annaswamy, E. Lavretsky, and M. Bolender, \"Parameter estimation in adaptive control of time-varying systems under a range of excitation conditions,\" IEEE Transactions on Automatic Control, 2021, doi: 10.1109/TAC.2021.3126243.
[9] S. Chen, J. Na, Y. Huang, Y. Xing, J. Zhao, and P. K. Wong, \"Optimal adaptive parameter estimation with online varying learning gain,\" IEEE Transactions on Automatic Control, May 2025, doi: 10.1109/TAC.2024.3520676.
[10] Y. Pan and T. Shi, \"Adaptive estimation and control with online data memory: A historical perspective,\" IEEE Control Systems Letters, 2024, doi: 10.1109/LCSYS.2024.3364588.
[11] J. G. Ziegler and N. B. Nichols, \"Optimum settings for automatic controllers,\" Transactions of the ASME, vol. 64, pp. 759–768, 1942.
[12] K. J. Åström and T. Hägglund, \"Automatic tuning of simple regulators with specifications on phase and amplitude margins,\" Automatica, vol. 20, no. 5, pp. 645–651, 1984.