## 1 Introduction  
The inverted pendulum is used in modelling and research in various fields of science and engineering due to its complexity and interesting properties. It is particularly used in robotics, where stabilisation of the inverted pendulum is one of the primary tasks. Robots equipped with inverted pendulums must have controllers to maintain their balance in order to move on uneven terrain. By using such models, they can even overcome such significant differences in levels as stairs [1; 2; 3; 4]. The problem of stabilising robots and controlling them with the desired accuracy and resistance to interference is an issue widely discussed in the literature. The inverted pendulum model is applied to different types of robots, including single-wheeled or two-wheeled robots [5; 6]. Outside of robotics, the inverted pendulum model is used in the stabilisation of vehicles such as bicycles, motorbikes or cars. The inverted pendulum is also used to analyse human behaviour in a quiet standing position [7]. This tool allows for the study of human balance and response to different stimuli. In astronautics, the inverted pendulum model is used to simulate the behaviour of spacecraft in microgravity. This helps astronauts and engineers to develop strategies to control and stabilise spacecraft. Another example is the stabilisation of multirotor drones. The inverted pendulum can also provide an introduction to more complex calculations required for operations such as stabilising a helicopter in a hovering position [8]. Therefore, the development and search for new controller solutions for an inverted pendulum are important scientific directions. As shown in [9; 10; 11], there are many directions in the search for a solution to the problem of controlling an inverted pendulum. Due to the nonlinearity of the problem, the control of an inverted pendulum is divided into two issues. One concerns the swing-up of the pendulum [12; 13], and the other concernsstabilisation in an upright position [14]. These problems are often considered separately. According to the researchers' experience, the swing-up algorithm makes it possible to set the pendulum near an upright position, but it is not effective for stabilising the pendulum in an upright position. Based on this approach, in the second step, hybrid algorithms are built that implement complete control of the inverted pendulum [15; 16; 17]. In other studies, researchers have adopted a comprehensive approach to solving the problem [9; 11]. Controlling an inverted pendulum is a complex problem; therefore, solutions to the problem using classic control methods as well as AI methods are being sought. An optimal controller with a linear-quadratic quality ratio (LQR) is often used to solve nonlinear problems. Examples of the use of this method can be found in the literature [18; 19; 20; 21]. One of the methods used to control inverted pendulums in the field of AI is the use of neural networks [22; 23]. Other methods used to control inverted pendulums include predictive algorithms. Examples of such applications can be found in [24; 25]. One interesting method is the use of Perceptual Control Theory, the distinguishing feature of which is that the controlled variables are inputs (perceptions, as opposed to outputs of the system) [26]. Another method that has been proposed is the use of fuzzy logic to control an unstable nonlinear model, such as an inverted pendulum on a cart [12; 27]. Proposals combining classic solutions with fuzzy logic can also be found [28]. In this type of algorithm, fuzzy inference is used to correct the PID controller settings or the controller structure depending on the system operating point. The fuzzy PID controller combines the classic PID controller formula with fuzzy inference. Despite many proposals based on AI methods, adaptive solutions and complex computational methods, in practice, PID controllers are still readily used to stabilise inverted pendulums [29; 30; 31].