## 3 Orientation Controller Design
### Determination of the Steering Mechanics  
The controlled system can now be modelled with the knowledge gained from the single-track model. The entire steering train should provide a steering angle \(\delta\), resulting in a sideslip angle or curve radius \(r\). The steering, which consists of the servo motor and the steering linkage, converts a PWM signal into a steering angle \(\delta\). This transmission element is considered to be linear. The relationship is determined experimentally. The vehicle translates the steering angle \(\delta\) into a curve radius \(r\) via the underlying single-track model, which is directly related to the change in orientation \(\frac{d\phi}{dt}\). This relationship is mathematically precisely defined from the previous consideration. The mathematical function between the steering value PWM and the steering angle \(\delta\) was determined experimentally. For this purpose, the steering value of the robot was set to specified values. After selecting the steering value, it had to be ensured that the wheels also assumed the associated steering angle. This can be seen from the fact that the steering servo made no more correction attempts. The robot slowly moved forward, and the path covered was recorded. In this case, the recording was done with a felt-tip pen that drew on the floor. The floor was previously laid out extensively with counting paper. Finally, the tracks were measured. The curve radius was determined from three measuring pointsper lane. The additional measurement points were intended to verify the calculated circle radius. Finally, the steering angle was calculated from the curve radius using Equation (12) to obtain a relationship between the steering value PWM and the steering angle \(\delta\). The distances between the center of gravity and the front or rear axle were also required to calculate the steering angle \(\delta\). These are as follows:  
\[l_{v}=0.205\text{m} \tag{14}\]  
and  
\[l_{h}=0.135\text{m} \tag{15}\]  
The results are presented in Table 2. For points, the top value represents the x-coordinate, and the bottom value represents the y-coordinate. All positions and lengths are in meters. As mentioned, a linear relationship between the steering value and the steering angle \(\delta\) is now expected. The linear regression method represents this relationship as precisely as possible. The artificial linear equation becomes  
\[\delta=a+b\cdot PWM \tag{16}\]  
The linear regression shows that slope \(b\) of the straight line is the ratio between the covariance of the steering value and the steering angle and the variance of the steering value. The slope \(b\) is  
\[b=\frac{Cov(PWM,\delta)}{Var(PWM)}=2.22607\times 10^{-3} \tag{17}\]  
The ordinate section \(a\) is calculated as  
\[a=\overline{\delta}-b\cdot\overline{PWM}=9.10034\times 10^{-3} \tag{18}\]  
where the \(\overline{\delta}\) and \(\overline{PWM}\) represent the mean values from all measurement samples. The empirically determined mathematical relationship between the steering value \(PWM\) and the steering angle \(\delta\) is therefore  
\[\delta=9\times 10^{-3}+2.22607\times 10^{-3}\cdot PWM \tag{19}\]  
Finally, the relationships obtained must be combined to calculate the necessary steering value PWM for the desired circle of radius \(r\). The steering angle \(\delta\) serves as an intermediate variable because it comprises the pre-control and controller components' steering angle components. The steering angle \(\delta\) thus represents the manipulated variable of the controller. To obtain the relationship between the steering angle \(\delta\) and the steering value PWM, Equation (18) is solved for the steering value PWM. \[PWM=\frac{\delta-a}{b}=\frac{1}{2.22607\times 10^{-3}}\cdot\left(\delta-9.10034 \times 10^{-3}\right) \tag{20}\]  
Here, \(a\) represents the zero-point shift, and \(b\) represents the amplification of the steering servo and the steering linkage. The pre-control can calculate the necessary steering angle according to Equation (10), whereby the sign must be considered separately.