## 6 Neural Network  
Define an auxiliary input vector containing the forward speed and heading of AUV and MRS, which is given by: \(\bar{\mathbf{u}}_{k}=\left[u_{v}\cdot cos\left(\psi_{v}\right)\ u_{v}\cdot sin \left(\psi_{v}\right)\ \mathbf{x}\left(4,1\right)\ \mathbf{x}\left(6,1\right)\right]^{T}\). Denote the prediction error \(\mathbf{e}_{k}\) as the error between the motion incremental model with true input vector \(f\left(\bar{\mathbf{u}}_{k}\right)\) and the motion incremental model with noisy input vector \(f\left(\bar{\mathbf{u}}_{k}+\delta\bar{\mathbf{u}}_{k}\right)\), given by: \(\mathbf{e}_{k}=f\left(\bar{\mathbf{u}}_{k}\right)-f\left(\bar{\mathbf{u}}_{k}+\delta\bar{ \mathbf{u}}_{k}\right)\). We use a neural network with a single hidden layer to estimate the \(\mathbf{e}_{k}\), namely  
\[net\left(\bar{\mathbf{u}}_{k},\mathbf{Q},\mathbf{W}_{k-1}\right)=f\left(\bar{\mathbf{u}}_{k} \right)-f\left(\bar{\mathbf{u}}_{k}+\delta\bar{\mathbf{u}}_{k}\right) \tag{37}\]  
where \(net\left(\bar{\mathbf{u}}_{k},\mathbf{Q},\mathbf{W}_{k-1}\right)\) denotes the neural network error compensator, and \(\mathbf{W}_{k-1}\) indicates the linkweights and threshold value of the neural network, the inputs of neural network are the auxiliary input vector \(\bar{\mathbf{u}}\), the process noise covariance matrix \(\mathbf{Q}\), the desired output of neural network is prediction error \(\mathbf{e}_{k}\). \(\mathbf{e}_{k}\) contains the horizontal and vertical direction of prediction error of AUV and MRS, given by: \(\mathbf{e}_{k}=\left[e_{x,v}\ e_{y,v}\ e_{x,f}\ e_{y,f}\right]^{T}\). where the subscript x means horizontal direction, subscript y means vertical direction, subscript v means AUV, subscript f means MRS. The motion incremental model is given by: \(f\left(a\right)=a\cdot dt\). where \(a\) denotes the input of the motion incremental model, and \(dt\) is the time interval.  
The neural network has been widely used in a lot of fields since it is a good tool for modeling complicated nonlinear systems [25]. The neural network structure used in this paper is a multi-inputs and multi-outputs nonlinear system, which is shown in Figure 6.  
Each node that is connected by the links with all nodes in the adjacent layer computes a weighted sum of inputs. The node output is computed by passing the sum through a nonlinear function, e.g., sigmoid function. The jth output of hidden layer and \(k\)th output of output layer can be given by:  
\[\O_{j} =logsig\left(\sum_{i=1}^{I}\w_{ji}^{1}\X_{i}-\theta_{j}^{1}\right) \tag{38}\] \[\Y_{k} =logsig\left(\sum_{j=1}^{I}\w_{kj}^{2}\O_{j}-\theta_{k}^{2}\right) \tag{39}\]  
where \(I\) is the number of inputs, which is equal to 8, \(J\) is the number of hidden layer nodes, which is equal to 5, \(K\) is the number of outputs, which is equal to 4; The output of hidden layer is \(\O\). \(w_{kj}^{2}\) and \(\theta_{kj}^{2}\) are the linkweight and threshold value between the \(j\)th hidden layer node and the \(k\)th output; \(w_{ji}^{1}\) and \(\theta_{ji}^{1}\) indicates the linkweight and threshold value between the \(i\)th input and the \(j\)th hidden layer node; The sigmoid function is chosen as the nonlinear transfer function. Backpropagation (BP) has been widely used in neural network training algorithm. We use BP to train the neural network proposed in this paper. The principle of BP is introduced in the Appendix C.