## 4 Motion Control System
### Pose Controller
\begin{bmatrix}v_{Rd}\text{cos}\left({}^{R}\!e_{\varphi} \right)+k_{x}\text{tanh}(k_{v}{}^{R}\!e_{x})\left|\text{sgn}(v_{Rd})\right|\\ \omega_{0 zd}+k_{y}v_{Rd}{}^{R}\!e_{y}+k_{\varphi}\text{tanh}(k_{\omega}{}^{R} \!e_{\varphi})\left|\text{sgn}(v_{Rd})\right|\end{bmatrix} , \tag{36}\]  
where \(k_{x}\) (m/s), \(k_{y}\) (rad/m2), and \(k_{\varphi}\) (rad/s) are the chosen positive parameters responsible for eliminating pose errors \({}^{R}\!e_{x}\), \({}^{R}\!e_{y}\), and \({}^{R}\!e_{\varphi}\), respectively. The adopted controller is similar to the solution presented in [PERSON] et al., 2001 [PERSON] et al. (2001). The following improvements were made compared to the original version:  
* The expression \(\left|\text{sgn}(v_{Rd})\right|\) was added to enforce robot stopping when the desired velocity \(v_{Rd}\) (m/s) is equal to zero despite the \({}^{R}\!e_{x}\) (m) and \({}^{R}\!e_{\varphi}\) (rad) errors being different than zero;
* The parameters \(k_{v}\) (rad/m) and \(k_{\omega}\) (-) were added for the hyperbolic tangent function, which allows the operation of these parts of the controller to be adjusted to the assumed maximum values for the errors \({}^{R}\!e_{x}\) (m) and \({}^{R}\!e_{\varphi}\) (rad), respectively,
* The part of the controller responsible for eliminating the \({}^{R}\!e_{y}\) (m) error was significantly simplified, and, at the same time, a gain \(k_{y}\) (rad/m2) was added for it, following, in this respect, the controller solution discussed in the article by [PERSON] et al., 1990 [PERSON] et al. (1990). Moreover, the method described below for selecting the controller parameters was proposed. Suppose that the absolute values of the robot's maximum generalized velocities \(v_{Rmax}\) (m/s) and \(\omega_{0 zmax}\) (rad/s) are known. Then, it can be assumed that the following dependencies are met in relation to the control vector of the pose controller \(\mathbf{u}_{s}\):  
\[\max(|v_{Rd}|)\leq v_{smax}\leq v_{Rmax}\text{ and }\max\left(|\omega_{0 zd}| \right)\leq\omega_{smax}\leq\omega_{0 zmax}. \tag{37}\]  
During the choice of the parameters of the pose controller, it is assumed that the controller should generate maximum values of velocities, that is, \(v_{smax}\) (m/s) or \(\omega_{smax}\) (rad/s), for minimum or critical pose errors. Moreover, it is assumed that, in case of their surpassing, the controller should still generate maximum velocities \(v_{smax}\) (m/s) or \(\omega_{smax}\) (rad/s) as a result of the use of the saturation function. Taking into account the form of the adopted pose controller, described by Formula (36), the following inequalities for linear and angular control are obtained:  
\[|v_{Rdmax}|\text{cos}\left({}^{R}\!e_{qmin}\right)+k_{x}\text{tanh}(k_{v}{}^ {R}\!e_{xmax})\left|\text{sgn}(v_{Rdmax})\right|\leq v_{smax}, \tag{38}\]  
\[|\omega_{0 zdmax}|+k_{y}|v_{Rdmax}|^{R}\!e_{ymax}+k_{\varphi}\text{tanh}(k_{ \omega}{}^{R}\!e_{qmax})\left|\text{sgn}(v_{Rdmax})\right|\leq\omega_{smax}, \tag{39}\]  
where \(|\text{sgn}(v_{Rdmax})|=1\) and \({}^{R}\!e_{qmin}=0\); hence, \(\text{cos}\left({}^{R}\!e_{qmin}\right)=1\). From the inequality for the linear velocity control (38), the constraint for the \(k_{x}\) (m/s) parameter is obtained in the following form:  
\[k_{x}\leq(v_{smax}-|v_{Rdmax}|)/\tanh(k_{v}{}^{R}\!e_{xmax}), \tag{40}\]  
In turn, from the inequality for the angular velocity control (39), it is possible to determine two parameters \(k_{y}\) (rad/m2) and \(k_{\varphi}\) (rad/s) by introducing an additional assumption. Since the robot's angular velocity control law includes parts responsible for minimizing the lateral position error \({}^{R}\!e_{y}\) (m) and the course error \({}^{R}\!e_{\varphi}\) (rad), the resulting control \(\omega_{s}\) (rad/s) must be a compromise between minimizing both of these errors. To decide how much the pose controller should minimize the lateral position error \({}^{R}\!e_{y}\) (m), let us introduce the parameter \(\eta\) (-).