## 3 TR Controller for an Inverted Pendulum  
In [32], an initial control law was proposed, described by the Formula (4).  
\[F_{x}=\frac{k_{c}}{|\varphi|}\bigg{(}2g\ \sin\bigg{(}\frac{\varphi}{2}\bigg{)} \bigg{|}\sin\bigg{(}\frac{\varphi}{2}\bigg{)}\bigg{|}+\frac{R\varphi|\dot{ \varphi}|}{2}\bigg{)} \tag{4}\]  
The results of the experiment [32] show that this direction of research is appropriate. However, in Formula (4), there is a division by the value of the angle (\(\varphi\)); the angle (\(\varphi\)) can take a value of 0, and in a practical solution, this would mean that \(F_{x}\) should tend to infinity or to the maximum value.  
On the other hand, real control systems always have measurement accuracy limited to a specific range; hence, a dead zone is defined in such systems. To put it simply, measurement accuracy can be understood as the smallest value of the angle (\(\varphi\)) that can be measured and at the same time as a divisor. This value should not be included in the dead zone adopted in the control system. We propose the following formulation of the inverted pendulum control lawd (5), (6).  
\[F_{x}=k_{c}\ q(\varphi)\bigg{(}2g\ \sin\bigg{(}\frac{\varphi}{2}\bigg{)} \bigg{|}\sin\bigg{(}\frac{\varphi}{2}\bigg{)}\bigg{|}+\frac{R\phi|\dot{\varphi }|}{2}\bigg{)} \tag{5}\]  
\[q(\varphi)=\begin{cases}\frac{1}{|\varphi|}\quad\ for\ \ |\varphi|>\varphi_{min}\\ \frac{1}{\varphi_{min}}\quad\ for\ \ |\varphi|\leq\varphi_{min}\end{cases}.\quad\text{ \ \ where \ }\varphi_{min}>0 \tag{6}\]  
The TR controller is a new proposal for stabilisation of an inverted pendulum. In [32], an early version of the controller was shown; then, a version of the TR controller was formulated for the first time in a form similar to that described by Formula (4). Due to the early stage of research, the authors of [32] did not include the extension of Formula (4) with the \(q(\varphi)\) function (5), (6). Hence, the operation of this controller was at risk of an error resulting from division by zero. During the research carried out in [32], the force value was not limited, so the force calculated by the controller could reach values impossible in a practical solution. At this stage, no regularities regarding the TR controller settings were formulated, as described in Section 3.1.  
The following tests reported in [32] showed the effectiveness of the controller:  
* Vertical stabilisation of the pendulum from the initial value of the deviation (\(\varphi_{0}=1[rad]\)) in a system without measurement disturbances;
* Vertical stabilisation of the pendulum from the initial value of the deviation (\(\varphi_{0}=1[rad]\)) in a system without measurement disturbances but with a delay of the actuator system (3);
* Vertical stabilisation of the pendulum in a system without measurement disturbances both with and without a delayed actuator system (3) in a situation when the system was knocked out of the equilibrium point by an impulse generated every 10 s;
* Vertical stabilisation of the pendulum from the initial value of the deviation (\(\varphi_{0}=1[rad]\)) in a system without measurement disturbances and with and without a delayed actuator system (3), with the mass of the pendulum changed by half and leaving the same controller parameters the same as for the large mass.  
The new forms of Equations (5) and (6) with the parameter \(\varphi_{min}=0\) are equivalent to the version tested in [32]. Therefore, this research examines the problem more broadly and is more practical in nature. The TR controller described by Formulas (5) and (6) is protected against the possibility of division-by-zero error thanks to the \(\varphi_{min}>0\) parameter. Tests for different values of the \(\varphi_{min}\) parameter are shown in this paper.