Design of an adaptive fuzzy–PID controller for a DC motor-based railway barrier system
Abstract
Railway level crossings require reliable barrier systems to operate safely under changing conditions. In practice, DC motor–driven barriers are influenced by load variations, disturbances, and nonlinear behavior, which can limit the performance of conventional PID control. In this study, an adaptive fuzzy–PID controller is developed, where fuzzy logic adjusts the PID parameters online based on the control error and its rate of change. The system is modeled and tested in MATLAB/Simulink, and then implemented on an STM32 microcontroller for real-time validation. The results show that the proposed controller reduces overshoot from 12.76% to 0.85% and provides a smoother response under load disturbances. A slightly longer settling time is observed, but the system remains stable and well-damped during operation. Experimental tests also show consistent behavior, suggesting that the approach can be applied in practical railway barrier systems.