## 5 Results
### Gain Scheduling  
The gain scheduling adaptive control technique can be considered to be a classic multimodel control strategy. Therefore, it is necessary to use a greater number of local controllers that can always be adjusted to the situations in which the system is inserted.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline \multirow{2}{*}{**PWM (\%)**} & \multicolumn{2}{c}{**Right Wheel (rpm)**} & \multicolumn{2}{c}{**Left Wheel (rpm)**} \\  & **Positive** & **Negative** & **Positive** & **Negative** \\ \hline
30 & 645 & \(-\)665 & 665 & \(-\)657 \\
40 & 797 & \(-\)791 & 792 & \(-\)803 \\
50 & 896 & \(-\)894 & 897 & \(-\)903 \\
60 & 965 & \(-\)953 & 952 & \(-\)966 \\
70 & 1016 & \(-\)991 & 992 & \(-\)1010 \\
80 & 1053 & \(-\)1018 & 1017 & \(-\)1044 \\
90 & 1112 & \(-\)1072 & 1070 & \(-\)1101 \\
100 & 1184 & \(-\)1138 & 1126 & \(-\)1176 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Speeds in RPM for selection of local controllers.  
Figure 15: Time constant behavior. Left wheel (blue) and right wheel (black): (**a**) positive direction and (**b**) negative direction.  
Thus, the eight models obtained in the identification were used. Figure 16 represents the linear interpolation for the proportional and integral gains of the local controllers tuned for each model of the right wheels (represented in black) and the left wheels (in blue).  
The control variables used were found by linear interpolation between the eight operating points. It is worth noting that saturations were placed for regions below the first operating point and regions above the last operating point.  
Figure 17 shows the positive velocity tracking. It is possible to note that the adaptive gain scaling controller allowed a speed reference to be tracked. In this same figure, small overshoots can be observed. First, on the left wheel, close to 5 s, the wheel rotation speed reached a value of 764 rpm for the imposed reference of 700 rpm. The second overshoot can be seen for the right wheel after 10 s of testing, at which point the wheel rotation speed reached a value of 113 rpm for an imposed reference of 150 rpm. It is important to highlight that the control law was successful at handling these cases, and in both situations, these overshoots were corrected in less than half a second.  
Figure 16: Linear interpolation for the proportional and integral gains—right wheel (black) and left wheel (blue). Positive direction: (**a**) Kp and (**c**) Ki. Negative direction: (**b**) Kp and (**d**) Ki.  
Figure 17: Gain scheduling for positive direction. Tracking signal in black and system response in blue for (**a**) left wheel and (**c**) right wheel. Control signal applied to the motors for (**b**) left wheel and (**d**) right wheel.  
However, when analyzing Figure 18, which consists of applying the same method to track speed in the negative direction, performance that is not as good as that presented for the positive direction is observed. An underdamped response can be observed, meaning that the system behavior does not approach the speed reference smoothly but, rather, with oscillations. The system's response to different speed references is much faster; however, more intense overshoots occur, and subsequently, oscillations with progressively decreasing amplitudes are observed until the speed tracking enters a steady state.  
In this case, both wheels exhibit the most significant overshoot at the same point: around 2.5 s into the test and for a reference speed of \(-300\) RPM. Observing Figure 18, at this point, the left wheel reaches a maximum speed of \(-406\) RPM, while the right wheel reaches \(-382\) RPM. The respective overshoots are 35% and 27%, indicating that the controller's correction was not sufficient to prevent oscillatory behavior, impairing the robot's performance in walking in a straight line.