# Intelligent Measurement of Coal Moisture Based on Microwave Spectrum via Distance-Weighted kNN
## 1 Introduction
The main principle of this method is to establish the relationship between the dielectric properties (dielectric constant \(\epsilon^{\prime}\) and dielectric loss factor \(\epsilon^{\prime\prime}\)) of the measured sample and the microwave parameters (attenuation and phase shift). [PERSON] et al. [19] investigated an online measurement method of moisture in black coal, brown coal, and iron ore using low-frequency microwave technology and trialed at a coal export facility. [PERSON] et al. [20] determined the MC of different types of coal by measuring the phase shift of microwaves passing through the sample. However, the above studies only selected a single-point frequency signal or narrow bandwidth microwave signals as the calibration signals. The shape and size of coal particles can vary greatly. The experimental results have shown that the instability of coal samples can lead to random noise interference, which can severely affect the expression of effective information \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Methods** & **Nondestructive** & **Accuracy** & **Time Consumption** & **Others** \\ \hline Drying [6] & No & Very high & Very long & Not suitable for online measurement. \\ Neutron [7; 11] & Yes & Medium to high & Short & Nuclear license required; \\  & & & & High relative investment. \\ Conductance [8; 12] & Yes & Medium & Short & Susceptible to changes in various factors; \\ Capacitance [9; 13] & Yes & Medium & Short & The equipment must be re-calibrated frequently. \\  & & & & & Same as conductance. \\ Infrared reflection [10; 14] & Yes & Medium to high & Short & Surface dependent; \\  & & & & Medium influence from particle size. \\ \hline \hline \end{tabular}
\end{table} 
Table 1: The measurement methods of coal moisture content. when there are fewer data points [21]. These problems can bring many difficulties in the quantitative analysis of coal MC. Therefore, the microwave measurement method based on a single-point frequency signal or narrow bandwidth signals is not suitable for solving the problem considered in this study. With the development of microwave technology and the popularization of vector network analysis equipment, it has become more convenient to obtain the microwave spectrum of the measured sample under broader bandwidth microwave signals rapidly [22; 23]. The existing research has shown that the application of a multi-frequency microwave measurement is conducive to improving the range and accuracy of the MC measurement of the sample under test (SUT) [24]. Moreover, the development and popularization of machine learning and neural network methods have brought greater advantages for processing multi-dimensional complex nonlinear data [25; 26]. To address the above problems, this study innovatively combines microwave scattering parameters with the distance-weighted \(k\)-nearest neighbor (DW-kNN) algorithm to design a measurement system that realizes rapid and non-destructive measurement of coal MC. To the best of our knowledge, no prior work has employed broad bandwidth microwave signals combined with machine learning algorithms to measure the MC of coal. The main contributions of this paper are as follows:  
1. Portable microwave analysis equipment is used to design a measurement system that can efficiently generate and measure broad bandwidth microwave scattering parameters containing 133 frequency points from 8.05 GHz to 12.01 GHz and visualize the microwave spectra. 2. To improve the cleanliness of modeling spectrum data, an iterative clipping method based on Mahalanobis distance (MD-ICM) is used to detect and eliminate abnormal samples, i.e., outliers. To overcome the problem of information leakage due to the limited samples, this study uses the nested cross-validation (NCV) method to evaluate the performance of the proposed method. 3. Based on multiple microwave frequency bands, typical machine learning regression models are also evaluated.