## 2 Scheduling Requirements and Modeling Foundations of Roadheaders
### Optimization of Weights Based on BP Neural Network
Figure 4: Path tracking results based on the pose deviation model. (**a**) The differences between the planned positions along path #1 and the real positions during tracking; (**b**) The differences between the planned positions along path #2 and the real positions during tracking. Figure 3: The pre-designed path #1 and path #2 for the path tracking control simulations. Therefore, as shown in Figure 6, the nonlinear optimization of the BP neural network is applied to the tracking control based on the pose deviation model. It is simple to apply the BP neural network within the path tracking control based on the pose deviation model:  
* The used BP neural network has 3 layers and is 9-9-3. The 9 inputs are the desired posture \(\mathbf{P}_{d}=(X_{d},Y_{d},\theta_{d})^{T}\), the current posture \(\mathbf{P}_{c}=(X_{c},Y_{c},\theta_{c})^{T}\), and the position and orientation errors \(\mathbf{p}_{e}=(x_{e},y_{e},\theta_{e})^{T}\); the 3 neurons on the output layer are the parameters \(k_{x}\), \(k_{y}\), \(k_{\theta}\). * The activation function for the hidden layer is the positive-negative symmetric Sigmoid function: \(f(x)=\tanh(x)=\frac{e^{x}-e^{-x}}{e^{x}+e^{-x}}\); the activation function for the output layer is the non-negative Sigmoid function: \(g(x)=\frac{1}{2}(1+\tanh(x))=\frac{e^{x}}{e^{x}+e^{-x}}\); and the cost function is taken as \(E(x)=\frac{1}{2}(P_{d}-P_{c})^{2}=\frac{1}{2}\mathbf{p}_{e}\mathbf{e}^{2}\). * There is no clear physical concept between the inputs and outputs, and previous training for a final set of optimized \(k_{x}\), \(k_{y}\), \(k_{\theta}\) before the path tracking simulation is not necessary. Instead, the initial values of \(k_{x}\), \(k_{y}\), \(k_{\theta}\) are set randomly and are updated iteratively based on a back-propagation algorithm. As the pose deviation converges to zero, the values of \(k_{x}\), \(k_{y}\), \(k_{\theta}\) become steady. * In each adjustment, the driving commands for the roadheader, i.e., the heading velocity \(v\) and the turning angular speed, and the values of \([v_{c},\omega_{c}]^{T}\) are calculated using Equation (4) with the \(x_{e},y_{e},\theta_{e},\omega_{d},\vartheta_{d}\), etc., which are obtained by instant measurements and predictions from the last adjustment. Then, the position and orientation errors \(\mathbf{p}_{e}=(x_{e},y_{e},\theta_{e})^{T}\) would be updated by \(\mathbf{p}_{e}\rightarrow\mathbf{p}_{e}+\hat{\mathbf{p}}_{e}\Delta t\), followed by the updating of the cost \(E(x)\). The variance of the cost guides fixing of the connection weights  
Figure 5: Path tracking results using different sets of values. (**a**) The differences between the planned positions along path #1 and the real positions during tracking; (**b**) The differences between the planned positions along path #2 and the real positions during tracking. Figure 6: Path tracking model using BP neural network. \(w_{ij}^{(1)}\), \(w_{jm}^{(2)}\) by a negative gradient direction searching (the superscript (1) means from the input layer to the hidden layer; (2) means from the hidden layer to the output layer. The subscripts \(i\), \(j\), \(k\) refer to the \(i\)-th, \(j\)-th, \(k\)-th neuron from the three layers, respectively). The outputs \(k_{x}\), \(k_{y}\), \(k_{\theta}\) are renewable until the error \(\text{p}_{e}\) converges to zero. Using the structure shown by Figure 6, the path tracking simulation following path #1 and path #2 is carried out using the same conditions as introduced previously. The results are shown in Figure 7. Notice that since the initial position of the roadheader is identical with the start point of the planned path; this means the initial position derivation is zero, and thus the first command given to the \([v_{c},\omega_{c}]^{T}\) is to maintain. In other words, the first iteration produces nothing and is wasted, while the total number of iterations is set equal to the number of points along the planned path; therefore, as seen in Figure 7, there is always around one step between the aimed and local position.