# High-Accuracy Calibration Based on Linearity Adjustment for Eddy Current Displacement Sensor
## 3 Calibration Method Based on Linearity Adjustment Model
### Mid-Scale Adjustment Function  
After sensitivity adjustment by \(f_{s}\), \(u_{s}\) is obtained. Then, the mid-scale adjustment function based on weighted support vector machine (\(\mu\)SVM) will be established to adjust the linearity of \(u_{s}\), which approaches \(U\).  
Weighted support vector machine is a commonly used machine learning method for solving classification or regression problems, which has a good performance in many practical problems [30; 31]. In this paper, \(\mu\)SVM is adopted for two reasons: firstly, support vector machine (SVM) method can adjust the nonlinearity moderately avoiding overfitting, due to the introduction of slack variable; secondly, targeted nonlinearity adjustment is achieved by the determination of weight coefficient \(\mu\).  
Based on the given training data set \(D=\{(u_{si},U_{i})|i=1,2,\cdots,n\}\), \(u_{si}\in\mathbb{R}^{n}\), \(U_{i}\in\{-1,+1\}\), the SVM method calculates the following optimization problem:  
\[\begin{split}& min\frac{1}{2}\mathbf{\omega}_{T}\mathbf{\omega}+C\sum_{i=1} ^{n}\mu_{i}\xi_{i},\\ & s.t.\quad\left\{\begin{array}{l}U_{i}[(\mathbf{\omega}\cdot u_{i} )+b]\geq 1-\xi_{i},\\ \xi_{i}\geq 0,i=1,2,\cdots,n,\end{array}\right.\end{split} \tag{11}\]  
\begin{table}
\begin{tabular}{l c c c c} \hline \hline  & **Sensor 1** & **Sensor 2** & **Sensor 3** & **Sensor 4** \\ \hline
**Adjusted Output Range (V)** & 0.098–10.3139 & \(-\)0.103–9.7036 & \(-\)0.1100–9.8800 & \(-\)0.0852–10.3420 \\
**Original Sensitivity (V/mm)** & 0.3329 & 0.3240 & 0.3238 & 0.3315 \\
**Adjusted Sensitivity (V/mm)** & 1.7026 & 1.6344 & 1.6650 & 1.7379 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Sensitivity adjustment results.  
Figure 6: Curves of sensitivity adjustment results.  
where \(\omega\) and \(b\) is the optimal hyper plane slope and intercept, respectively, \(C\) is the coefficient of the penalty function, \(\xi_{i}\) is the slack variable and \(\mu_{i}\) is the weight coefficient.  
In order to make the measured values quickly and accurately tend to the ideal values, an optimal weight coefficient is established for the region to be adjusted. In this paper, Gauss function is selected to assign weights \(\mu_{i}\) to the measured voltage values for its peak value and distribution range are easy to control, which is shown in Equation (12):  
\[\mu_{i}=\frac{1}{\sigma_{x}\sqrt{2\pi}}e^{-\frac{(x-x)^{2}}{2\sigma_{x}^{2}}}. \tag{12}\]  
In the process of mid-scale adjustment, the peak of adjustment amplitude is set at \(x=3\). Thus, the average value \(\bar{x}=3\) mm and standard deviation \(\sigma_{x}=1.78\) can be calculated of the displacement series \(x=0,0.1,0.2,\cdots,5.9,6\) mm. Then, the weight coefficient \(\mu_{i}\) can be expressed as:  
\[\mu(x)=0.22\cdot e^{-0.16(x-3)^{2}}. \tag{13}\]  
After simplifying and calculating, the final decision model can be expressed as:  
\[g_{m}:u_{m}=sgn(\sum_{i=1}^{n}U_{i}\alpha_{i}K(u_{si},u_{sj})+b), \tag{14}\]  
where \(K(u_{si},u_{sj})\) is the kernel function, \(u_{m}\) is the output voltage, which is adjusted by the mid-scale adjustment function, and \(n=61\) is the number of the samples (data with an interval of 0.1 mm are recorded once from 0 mm to 6 mm).  
According to Figure 5, the mid-scale adjustment of ECDs is performed based on the sensitivity adjusted curve. Figure 7 shows the first result of mid-scale adjusted curve of sensor 1, and as well the output voltage deviation between the actual characteristic curve and the ideal characteristic curve, which is obviously reduced at the mid-scale.  
Figure 7: First result of mid-scale adjustment based on sensitivity adjusted curve for Sensor 1.