## 5 Discussion  
This study presents a method for the control of an inverted pendulum using the trigonometric function. Inverted pendulum control by the TR controller was compared to the capabilities of the PID controller. Tests of the control system using the PID controller showed the problems associated with using a linear controller for a nonlinear object such as an inverted pendulum. When using a linear controller to control a nonlinear object, we take advantage of the fact that any nonlinearity can be approximated by a linear function around a particular operating point. In practice, this means that a control system operating closer to the operating point is more likely to achieve good stabilisation results using a linear controller. The experiment performed by the author clearly confirmed this phenomenon. The linear PID controller performed best in stabilising the pendulum for small initial values of \(\varphi_{0}\). The larger the value of \(\varphi_{0}\) was, the greater the problems with stabilisation of the system. A large initial value led to large tilts of the pendulum, which most often resulted in unstable behaviour of the system. Even in the simplest example, a pendulum without an inertial element, a large overshoot was observed for large values of \(\varphi_{0}\). In practice,  
Figure 14: The results of the simulation test of the PID controller with an inertial block (\(F_{c1}\)) and a disturbance generator of the measurement signal. Figure 15: The results of the true position of the simulation test of the PID controller with an inertial block (\(F_{c1}\)) and a disturbance generator of the measurement signal in close-up. this means that when using a linear controller for a highly nonlinear system, we have to find different controller settings or different linear controller systems for operating points that are far from each other. By monitoring the operating state of the control system, linear control systems can be alternated, or their settings can be changed. This method is commonly used in practice and widely described in the literature. This means that you can use a PID controller and, for example, adjust its settings adaptively [33; 34]. Alternatively, at a given operating point, a linear model of the inverted pendulum can be calculated; then, an inverse model can be determined and used for stabilisation [35; 36]. The advantage of a solution based on linear modelling is the ability to use a number of mathematical tools that we have for the analysis of linear models. The disadvantage of this approach is the final complexity of the solution and the need for a very time-consuming procedure to tune such a controller for a specific case. Additionally, there is a risk that important elements of the model will be simplified during linearization, and the effect on the real object may be surprising. Similarly, disturbances in the control system can induce states in the working system that go far beyond the linear model. The last set of tests (Section 4.3) showed that the introduction of disturbances into the control system greatly limited the PID controller's ability to control the inverted pendulum. Nonlinear solutions such as the TR controller are an alternative to linear systems. The disadvantage of nonlinear systems is often complex mathematical analysis and a lack of consistent knowledge. Often, an uncomplicated nonlinear controller in combination with the control object as a whole constitutes a mathematical model, the analytical solution of which, e.g., in terms of stability, is unattainable. Nonlinear solutions are often unique and difficult to generalise. Hence, in the case of nonlinear systems, simulation tests are one of the basic research methods, as carried out for the TR controller. On the other hand, it should be remembered that nonlinear controllers open up new possibilities unavailable to linear solutions. In the context of the inverted pendulum, the author was inspired by observing phenomena occurring in nature.