Control strategies for inverted pendulum: A comparative analysis of linear, nonlinear, and artificial intelligence approaches

An inverted pendulum is a challenging underactuated system characterized by nonlinear behavior. Defining an effective control strategy for such a system is challenging. This paper presents an overview of the IP control system augmented by a comparative analysis of multiple control strategies. Linear techniques such as linear quadratic regulators (LQR) and progressing to nonlinear methods such as Sliding Mode Control (SMC) and back-stepping (BS), as well as artificial intelligence (AI) methods such as Fuzzy Logic Controllers (FLC) and SMC based Neural Networks (SMCNN). These strategies are studied and analyzed based on multiple parameters. Nonlinear techniques and AI-based approaches play key roles in mitigating IP nonlinearity and stabilizing its unbalanced form. The aforementioned algorithms are simulated and compared by conducting a comprehensive literature study. The results demonstrate that the SMCNN controller outperforms the LQR, SMC, FLC, and BS in terms of settling time, overshoot, and steady-state error. Furthermore, SMCNN exhibit superior performance for IP systems, albeit with a complexity trade-off compared to other techniques. This comparative analysis sheds light on the complexity involved in controlling the IP while also providing insights into the optimal performance achieved by the SMCNN controller and the potential of neural network for inverted pendulum stabilization.

Citation: Irfan S, Zhao L, Ullah S, Mehmood A, Fasih Uddin Butt M (2024) Control strategies for inverted pendulum: A comparative analysis of linear, nonlinear, and artificial intelligence approaches. PLoS ONE 19(3): e0298093. https://doi.org/10.1371/journal.pone.0298093

Editor: Gang Wang, University of Shanghai for Science and Technology, CHINA

Received: July 11, 2023; Accepted: January 17, 2024; Published: March 7, 2024

Copyright: © 2024 Irfan et al. This is an open access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.

Data Availability: All relevant data are within the paper.

Funding: The author(s) received no specific funding for this work.

Competing interests: The authors have declared that no competing interests exist.

1 Introduction

The design of a control system for an inverted pendulum (IP) is a classical problem employed in nonlinear control systems. IP has many practical applications in various fields, such as humanoid robots and Segways. IP is a highly unstable and nonlinear system with a very complex nature. As an under-actuated system, the control design of an IP is considered a challenging task.

Several types of inverted pendulums, such as rotational IP and pendulum on the cart, have been previously tested, and researchers have proposed various methods to control these IP systems. The authors of [1–3] proposed a backstepping (BS)-based control technique for IP control. They proposed that the BS controls a two-step approach where swing up, while upward balancing is attained by a linear integral regulator. Lee et al. (2015) proposed an output feedback-based technique in the existence of uncertainties to stabilize IP on a cart [4]. A high-gain observer is used to estimate the states that are not measured in order to combat their uncertain nature. Lee and Takangi (1993) proposed an optimized genetic algorithm through a fuzzy controller to control the IP [5]. The genetic algorithm methodologies in control system engineering have been applied to several problems. Cuevas et al. (2015) proposed a fuzzy logic-based optimal controller for IP, in which the results for both the phase plan and linguistic trajectories are presented, and they demonstrated stable characteristics [6]. Optimal PID control for the linear model of IP is combined with pole placement algorithms to obtain the performance specifications, which leads to firefly optimization control [7]. Similarly, Eltohamy and Kuo (1998) designed a nonlinear controller for a single IP, based on an unstable upright position. An extended state observer is designed to observe the disturbances and uncertainties that have a rejection ability [8]. The researcher in [9] experimented with a traditional fuzzy controller to stabilize a single IP and improve the dynamics of the system accordingly.

Linear Quadratic Regulator (LQR) is a classical linear control system that can control those systems where disturbances and uncertainties are absent. This technique allows one to find the closed-loop gain location for the system by guaranteeing system stability in the presence of all states of the system [10, 11]. Sliding Mode Control (SMC) is a robust control technique that deals with the parametric uncertainties of matched and unmatched disturbances [12–14]. More consistency is required between the mathematical and actual models of the system. To overcome these discrepancies, robust control techniques such as SMC are more effective [15]. Fuzzy Logic Controller (FLC) is an artificial intelligence (AI) control technique that is used to develop a model for a complex system. This simplifies the model under certain assumptions and reduces the complexity of the system. It maintains the system’s energy in a steady state (up down position) [16, 17]. Similarly, a Neural Network (NN) is a practical algorithm for modeling nonlinear statistical scenarios by providing a method for logistic regression. It estimates the function, which has multiple inputs initially considered as unknown, and interconnects the system that exchanges information with each other [18]. NN connections have a numerical weight matrix, and based on previous information, NNs adapt to the input to achieve better learning capabilities [19–21].

This research study explores linear, nonlinear, and AI control strategies, such as LQR, SMC, BS, FLC, and SMCNN, and a comparative analysis is augmented with simulations of the selected algorithms. An IP without a controller is inherently unstable. Hence, to check and maintain its stability, we must manipulate it to check the response of the system vertically and horizontally. The FLC technique provides a benchmark for testing IP response without a mathematical approach. It stabilizes the system and maintains the cart in the desired position. The SMC is designed and implemented to check the response of the nonlinear and underactuated systems. It has a single input and two outputs for the cart position and pendulum angle. Therefore, this technique stabilizes the uncertain SIMO and MIMO systems. The LQR controller, which is an optimal control technique for the desired trajectories, is also simulated. The BS and SMCNN are explored in terms of IP stability to observe the behavior of the system. The FLC, SMC, and LQR simulation results are compared to analyze the behavior of the linear and nonlinear families on the control strategies.

The remainder of this paper is organized as follows. Section 1 describes the details of IP modeling, including linear and nonlinear models, while Section 2 presents different control approaches to stabilize the IP. Section 3 presents the results of the implemented control techniques, and Section 4 concludes the overall analysis of our research.

2 Modeling of inverted pendulum

The physical system of an IP is depicted in Fig 1, and comprises an IP mounted on a cart moving on a rail. The translational movement of the cart is enabled by DC motors that swing freely in a vertical position. A motor shaft is connected to the cart using thin steel wire. The IP system model is divided into two parts. The first is the mechanical structure of the cart and pendulum angle and the second is the DC motor transmission model.