## 3 Path Tracking Controller
The motor controller uses the DC motor, and the DC motor is derived as

\[T_{s}=D\;I_{s}-Z\;\dot{\varphi}_{sd}\;,\;s=L\;or\;R \tag{17}\]

where \(T_{s}\) is the actual torque output by the DC motor, \(D\) is torque constant of the motor, and \(I_{s}\) is the motor current. In motor control, the influence of damping torque must not be ignored. Therefore, the damping term is considered in the motor control, and \(Z\) is the damping coefficient [5]. In the PID control algorithm, it is difficult to obtain reasonable proportional, integral, and differential coefficients. In this paper, the following steps are used to tune the PID controller, and the corresponding coefficient is obtained:

* Firstly, the proportional coefficient is tuned. The initial value can be calculated quantitatively, and the different values from both sides of the initial value can be taken. The final proportional coefficient can be determined when the system has a relatively fast response speed. * Secondly, the integral coefficient is tuned. The time for the system to reach stability is tested when the value is 0-1, and the integral coefficient can be determined when the time is relatively short. * Thirdly, the differential coefficient is tuned. The differential coefficient, which is 0-1, can be determined when the system is relatively stable. According to the above method of tuning the PID controller, the coefficients of the speed controller \(K_{pv}\), \(K_{lv}\), and \(K_{Dv}\) are 50, 0.5, and 0, respectively, and the coefficients of the motor controller \(K_{PT}\), \(K_{IT}\), and \(K_{DT}\) are 4, 0, and 1, respectively. ### Yaw Rate Control

The yaw rate controller, as shown in Figure 4, is developed from an RBF neural network where an online adaptive law is applied. The neural network is composed of an input layer, a hidden layer, and an output layer. Position and orientation errors, as well as their deviations, are taken as the input of the neural network. The output is the desired yaw rate of the wheeled robot, which is denoted as \(u_{y}\). In this paper, a 4-9-1 structure is employed to facilitate the RBF neural network, and a self-adaptive law is applied to update the network parameters online. As shown in Figure 4, \(\mathbf{x}=\left[ \begin{array}{cccc}&e_{\theta}&e_{p}&\dot{e}_{\theta}&\dot{e}_{p}\\ \end{array} \right]^{T}\) is defined as the network input, and \(\mathbf{h}=\left[h_{j}\right]^{T}\) is the output of hidden layer, where \(h_{j}\) represents the value of the Gaussian function for the \(j_{\text{th}}\) neuron. \[h_{j}=\exp\left(-\frac{\|\mathbf{x}-\mathbf{c}_{j}\|^{2}}{2{{\text{${{j}$}}}^{2}}}\right) \tag{18}\]

where \(\mathbf{c}=\left[c_{jk}\right]\) is the central vector, \(\mathbf{b}=\left[b_{j}\right]^{T}\) is the width vector of the Gaussian function, and \(j=1,2,\ldots m\), \(m\) is the number of neurons in the hidden layer. The output of the neural network is

\[u_{y}=\sum_{j=1}^{m}\omega_{j}h_{j} \tag{19}\]

where \(\omega_{j}\) is the weight of output layer from the \(j_{\text{th}}\) neuron. An error indicator of the network is defined as

\[E=\frac{1}{2}e(t)^{2} \tag{20}\]

In this paper, \(e(t)\) is defined as a weighted error with the equivalent tracking error \(e_{q}\) and its deviation \(\dot{e}_{q}\)

\[e(t)=s_{1}e_{q}(t)+s_{2}\dot{e}_{q}(t) \tag{21}\]

where \(s_{1}\) and \(s_{2}\) are the weight coefficients of \(e_{q}\) and \(\dot{e}_{q}\), respectively. The changes in the weight are \(\Delta\omega_{j}(t)\), \(\Delta b_{j}(t)\), and \(\Delta c_{jk}(t)\), and they are derived using the gradient descent method to update the network. \[ \begin{split}\Delta\omega_{j}(t)=-\eta\frac{\partial E}{ \partial\omega_{j}}=\eta e(t)h_{j}\\ \Delta b_{j}(t)=-\eta\frac{\partial E}{\partial b_{j}}=\eta e(t) \omega jh_{j}\frac{\|\mathbf{x}-\mathbf{c}_{j}\|^{2}}{b_{j}^{3}}\\ \Delta c_{jk}(t)=-\eta\frac{\partial E}{\partial c_{jk}}=\eta e(t) \omega jh_{j}\frac{x_{j}-c_{jk}}{b_{j}^{2}}\end{split}  \tag{22}\]

where \(\eta\) is the learning rate, and the value is between 0 and 1.