Citation:
Abstract:
This paper presents simulation and experimental validation of a Nonlinear Compensation-based Neuro Fuzzy (NCNF) controller designed to balance the rotary inverted pendulum (RIP). Traditional linear controllers, such as Proportional-Integral-Derivative (PID) and state-feedback with pole placement, usually achieve satisfactory results in simulations on linearized models. However, their performance decreases in hardware implementation because of disturbances and unmodeled nonlinear effects such as Coulomb friction and mechanical backlash. To overcome these challenges, a feedforward compensation function was developed to cancel these undesired effects, which is combined with an Adaptive Neuro-Fuzzy Inference System (ANFIS) controller that updates PID gains to improve the rotary arm tracking for a square-wave reference and stabilize the pendulum at the upright position. The proposed NCNF controller is validated through hardware-in-the-loop (HIL) experiments and compared with a baseline state-feedback controller. Results show that the arm angle (θ) overshoot decreased from 40.6% to 0.8% (lower step) and from 17.2% to 2.5% (upper), total steady-state θ-error from 5.75° to 0.296°, and the fitness index dropped from 41.12 to 25.23. The nonlinear compensation reduced the gap between simulation and real-time performance, while the ANFIS further improved the defined control metrics. Overall, the NCNF controller achieves more stable and precise tracking than the state-feedback control.