## 4 Results  
A thorough comparison between the switched drive-anti-drive controller and the conventional system without anti-drive draws important conclusions. The target tracking of the inverted pendulum in the presence of known backlash was performed with a drive-anti-drive controller and also with only a conventional drive. The performance of the system was gauged by performance metrics that included the comparison of root mean square error, overshoots, peak time, and settling time.  
The switched-mode controller dynamically adjusts the assigned controller based on the value of \(p\). It continuously monitors the pendulum states and responds to directional changes accordingly, as illustrated in Figure 6.  
Here, three cases are used to discuss the performance of the system.  
When \(p=0\), only the drive is used to track the reference trajectory. Controller 0 drives the driven motor. The control effort by the drive in a switched-mode controller is seen in Figure 7. Anti-drive is not active at that time. We can observe that, when the system changes direction at \(t=10\) s, \(p\) progresses to 1. When \(p=1\), the anti-drive motor is actuated to compensate for backlash, which can be seen from the control effort made by  
Figure 4: Schematic diagram of the drive-anti-drive system.  
Figure 5: Schematic diagram of the single drive.  
Figure 6: Selection of the controller.  
the anti-drive, as shown in Figure 8. The scheme of transitions between the controllers is explained in Algorithm 1.The drive-anti-drive controller exhibits good performance in accurately tracking the reference trajectory, as shown in Figure 9. This switching controller has helped the system in achieving lower rise and settling times. The decrease in overshoot highlights the system's improved stability, as it exhibits less oscillation around the target value in Figure 9.  
The analysis reveals a notable increase in overshoot when the system operates solely with drive control, especially during transitions into backlash mode, as depicted in Figure 10.  
The performances of switched-mode drive-anti-drive and of drive-only are further gauged by root mean square error (RMSE), which is a robust measure of tracking accuracy. Mathematically, if \(y\) is the actual angular position of the pendulum, \(y_{ref}\) is the reference trajectory value, and \(n\) is the number of observations, the RMSE is given by  
Figure 8: Control effort by the anti-drive in a switched-mode controller.  
Figure 7: Control effort by the drive in a switched-mode controller.  
\[\text{RMSE}=\sqrt{\frac{1}{n}\sum_{i=1}^{n}(y_{i}-y_{ref})^{2}}\]  
where \(\{y_{i}\}_{i=1}^{n}\) represents the set of output samples from the numerical simulation. The RMSE deviation for tracking error with a single controller was determined to be 0.3591. However, with the implementation of the drive-anti-drive controller, the RMSE deviation for tracking error reduced to 0.28. This reduction in RMSE signifies a substantial enhancement in performance.  
In essence, the presence of the switched drive-anti-drive controller significantly enhances the system's ability to handle backlash-induced overshoots and effectively track the reference trajectory in lesser settling time, as shown in Table 5, thereby improving its overall performance compared to systems lacking such compensation mechanisms.  
These enhancements suggest that implementing the anti-drive mechanism results in a more agile and reliable drive system.  
Figure 10: Tracking output with drive only.  
Figure 9: Tracking output with drive–anti-drive.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Performance Metric** & **Drive–Anti-Drive** & **Drive-Only** \\ \hline Peak Time & 1.037 & 1.162 \\ Overshoot time (\%) & 68.7 & 323.5 \\ Settling Time & 2.199 & 4.6 \\ \hline \hline \end{tabular}
\end{table}
Table 5: Performance metric comparison of the drive–anti-drive vs. drive-only systems.