# A Designed Calibration Approach for the Measurement -While-Drilling Instrument
## 2 Materials and Methods
### The Collecting Method for the Sample Data  
This section describes the collection of the data points (the datasets \(\mathbf{D}_{k}\) and the dataset \(\mathbf{D}_{\mathbf{a}-\mathbf{x}}\)). The error parameters, in a tri-axial accelerometer and a tri-axial magnetometer, are provided in Table 1 in advance. Furthermore, the two constant vectors (the gravitational vector and the geomagnetic vector) can be presented as \(\mathbf{G}=(0,0,1)\) and \(\mathbf{M}=(29.4,0,45.3)\), respectively, in the NED frame, after an online search [38]. The method of collecting the data sets \(\mathbf{D}_{k}\) comes from a further extension of the equal-angle criteria [37]. It aims to simulate the process of the MWD instrument measuring data at different attitudes. Firstly, the error-free sampling points were gathered to simulate the output of the tri-axial accelerometer and the tri-axial magnetometer in the _car_ frame. These sampling points were evenly distributed on the spherical surface which is formed by the tri-axial components of the two constant vectors (\(\mathbf{G}\) and \(\mathbf{M}\)) in the _car_ frame with any \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Sensor Type** & **Parameters Type** & \multicolumn{2}{c}{**Value**} \\ \hline \multirow{6}{*}{Accelerometer} & Error matrix \(K_{ab}^{*}\) & \(\begin{pmatrix}1.17660&0.20992&-0.14296\\ -0.106737&-0.107493&0.30493\\ -0.0301&-0.12035&1.84215\end{pmatrix}\) \\  & Calibration matrix & \(\begin{pmatrix}0.83905&-0.15131&0.11206\\ 0.07671&0.89551&-0.17684\\ 0.02327&0.06964&0.66261\end{pmatrix}\) \\ \cline{2-4}  & Bias \(b_{a}\) & \(\begin{pmatrix}0.1&0.12&-0.2\end{pmatrix}^{\mathrm{T}}\) \\ \hline \multirow{6}{*}{Magnetometer} & Error matrix \(K_{ab}^{*}\) & \(\begin{pmatrix}1.55357&0.32715&-0.10994\\ -0.080801&1.89784&0.08181\\ 0.06812&0.15627&0.77476\\ \end{pmatrix}\) \\  & Calibration matrix & \(\begin{pmatrix}0.64052&-0.11893&0.10345\\ 0.02967&0.52602&-0.0513\\ -0.06231&-0.09564&1.29199\end{pmatrix}\) \\ \cline{2-4}  & Bias \(b_{m}\) & \(\begin{pmatrix}1.5&4.13&0.9\end{pmatrix}^{\mathrm{T}}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: The assumed error parameters for the sensor model of the MWD instrument. Figure 3: The operation flow chart of the calibration approach. attitude. The method of collecting these error-free sampling points was implemented by the following steps. 1. Artificially fix a pitch angle sequence [\(-90^{\circ}\), \(90^{\circ}\), \(-45^{\circ}\), \(45^{\circ}\), \(0^{\circ}\)] in the range of [\(-90^{\circ}\), \(90^{\circ}\)]. 2. Pick out a value in turn from the angle sequence in step 1 as a selected pitch angle \(\theta_{i}\). 3. Calculate an azimuthal angel sequence based on the value of the selected pitch angle \(\theta_{i}\), according to Equation (24), where \(n_{yi}\) is the total number of angles in the azimuth sequence. 4. Pick out a value in turn from the azimuthal angel sequence in step 3 as a selected azimuthal angel \(\psi_{\bar{y}}\). 5. Five values are randomly given as a tool-face angle sequence in the range of [\(0^{\circ}\), \(360^{\circ}\)]. 6. Pick out a value in turn from the tool-face angle sequence in step 5, as a selected tool-face angel \(\varphi_{k}\). Then, the selected attitude angles (\(\psi_{\bar{y}_{i}}\), \(\theta_{i}\), \(\varphi_{k}\)) are determined. 7. Solve the tri-axial components of the two constant vectors (\(\mathbf{G}\) and \(\mathbf{M}\)) in the _car_ frame by the direction cosine matrix which has been built with the selected attitudes angle above. These tri-axial components are exactly the datasets of error-free data points. \[\left\{ \begin{array}{ll}\theta_{i}&=\left[\begin{array}{cc}-90^{\circ}&90^ {\circ}&-45^{\circ}&45^{\circ}&0^{\circ}\end{array}\right]\\ \\ n_{\psi i}&=\begin{cases}round(12\times\sin\theta_{i})&\theta_{i}\
eq\pm 90^{ \circ}\\ 1&\theta_{i}=\pm 90^{\circ}\end{cases}\\ \\ \psi_{\bar{y}_{i}}&=\frac{360^{\circ}\times i}{n_{yi}},j=1,2,\cdots,n_{\psi i} \end{array} \right.