A Novel, Portable and Fast Moisture Content Measuring Method for Grains Based on an Ultra-Wideband (UWB) Radar Module and the Mode Matching Method

To perform fast and portable grain moisture measurements under field conditions, a novel moisture sensor was designed, which consisted of a coaxial waveguide, a circular waveguide, and an isolation layer. The electromagnetic characteristics of the sensor were simulated and measured. The analytical model, which represented the relationship between the reflection coefficient of the sensor and the complex permittivity of grain, was established by using the mode matching method. The reflection coefficient of the sensor was measured by using an ultra-wideband (UWB) radar module, and the moisture content of grains was calculated from the complex permittivity by using density-independent model. To verify the performance of the proposed method, wheat, rough rice, and barley were taken as examples. The measured results in the range from 1.0% to 26.0%, wet basis, agreed well with the reference values (R2 was more than 0.99), and the maximum absolute errors for wheat, rough rice, and barley were 1.1%, 1.0%, and 1.4%, respectively. In addition, the effect of isolation layer was discussed. Both the simulation results and the experimental results showed that the isolation layer improved the stability of sensor.


Introduction
Accurate determination of moisture content of grains is of great importance in grain trading, transportation, storage, and processing. Especially during storage, grain moisture plays an important role in the safe storage of grains [1,2]. Using the convection oven to dry the grain and measuring the loss of mass to determine the grain moisture is the standard method of grain moisture measurement in several countries because of its high precision and high reliability [3][4][5], however, it has obvious disadvantages of being time-consuming and cumbersome. In order to achieve fast and precise moisture determination, many studies have been conducted to determine the moisture of grains by using near-infrared reflection methods [6][7][8]. However, the penetration depth of infrared is shallow, and the measured result is easily affected by ambient light and impurities attached to the grain particles, therefore, the method is most often applied to grain moving on a conveyor belt in a processing plant, where the layer of grain is thin and the environment is relatively clean [9].
With good penetrability, the microwave has been widely studied for measuring the moisture of grain [10][11][12]. Microwave method indirectly calculates the moisture content of grain by measuring the complex permittivity, which is related to grain moisture. The complex permittivity is intrinsic where ψ is a density-independent calibration function, which is independent of the bulk density and is linearly related to the moisture content and temperature. At any given frequency, the value of ψ depends only on the grain complex permittivity. a f is a frequency factor, which is related to the microwave frequency. It is a constant for a given grain sample at a given frequency. In the literature [15], the linear relationship between expressions ε /ρ and ε /ρ was found. ρ is the bulk density. The parameter a f was obtained from a complex plane consisting of ε /ρ and ε /ρ, and the parameter a f equaled the slope of the linear regression function of ε /ρ and ε /ρ. T is temperature ( • C), W is the percentage of moisture (wet basis). a 1 , a 2 and a 3 are three undetermined coefficients. The model has been proven effective for the moisture determination of wheat, corn, soybeans, and peanuts (with a standard error of less than 0.97%) [1]. In particular, a shelled peanut moisture determination device was developed by using free-space method (the standard error less than 0.55%), and successfully applied it in the peanut drying field [18][19][20][21]. The free space method can be used to calculate the complex permittivity of grain by measuring the attenuation and phase change of the microwave propagated through the grain. In this condition, only the microwave which transmits through the grain was related to the permittivity of grain. If the size of transverse of the sampler holder is not large enough, there will be great diffraction at the edges of the sample holder. A large part of the microwave energy will pass through the edges of the sample holder instead of penetrating it. To prevent the diffraction at the edges of the sample holder and the multiple reflections in the sample holder, the size of the cross-section and the thickness of the sampler holder must be large enough.
The sizes of the sample holder in their studies [20,21] were 22.2 cm × 13.3 cm × 21.9 cm (4.5 L) and 4.4 cm × 4.4 cm × 12 cm (243 mL), respectively. This makes the measuring device bulky and difficult to carry, limiting its scope of application. The open-ended waveguide technique is a type of microwave reflection method. Due to the different impedances between the sample and the waveguide, the discontinuous impedance at the interface between the waveguide and the measured object will cause microwave reflection. The intensity and phase of the reflected microwaves are related to the impedance of the sample, and the impedance effective approach for analyzing the characteristics of microwaves in discontinuous waveguides, was adopted to build the model. In this paper, a novel, portable, and fast grain moisture content measuring method is proposed, which overcomes the problems of the open-ended coaxial waveguide application in the grain moisture measurement field. Firstly, a grain moisture sensor was designed by combining the coaxial waveguide with a circular waveguide. The circular waveguide can be used as a sampler or the sample holder, and it can prevent the measurement from the environmental interference. Secondly, based on the mode matching method [31], a new model was developed, which could precisely describe the relationship between the complex permittivity of grain and the reflection coefficient of the sensor. As the grain moisture increased, the real part and the absolute value of the imaginary part of the complex permittivity increased, and the magnitude of the corresponding reflection coefficient decreased and the phase decreased. Thirdly, a broadband reflection coefficient measuring method by using the ultra-wideband (UWB) radar module was proposed. Finally, taking wheat, rough rice, and barley as examples, the accuracy and stability of the method were verified. In addition, the paper discussed the influence of the pressure of the sensor on the accuracy of the proposed method.

Design of the Grain Moisture Sensor
Due to the wide bandwidth, no diffraction and simple structure of the open-ended coaxial waveguide, a novel grain moisture sensor was designed. The sensor combined a circular waveguide (grain sampler and sample holder) with the open-ended coaxial waveguide in order to make the sensor suitable for grain moisture measurement in field condition. The schematic of the sensor is shown in Figure 2 and the dimensions are shown in Table 1. The sensor consisted of an open-ended coaxial waveguide, a circular waveguide, an isolation layer, a temperature sensor, and the type-N microwave connector. The sensor's main features were as follows: The open-ended coaxial waveguide. The type-N microwave connector was directly connected to the open-ended coaxial waveguide. The inner conductor was made of gold-plated brass, the outer conductor was made of 304 stainless steel, and the gap between inner and outer conductors was filled with Teflon. Since the dielectric constant of Teflon is approximately a constant ( =2.1 r ε ) over wideband [32], using Teflon to fill the gap can easily make the impedance of the coaxial waveguide be a constant over a wide range of frequency. The dimensions were chosen to make the characteristic impedance equal to 50 Ω and only TEM mode can transmit in the frequency range of 0-5 GHz.
The isolation layer. The end face of the coaxial waveguide was covered with an isolation layer, which was made of Teflon. The isolation layer had two functions. First, it can protect the plating of the inner conductor. The conductivity changes can be avoided in long-term use thus improving the In this paper, a novel, portable, and fast grain moisture content measuring method is proposed, which overcomes the problems of the open-ended coaxial waveguide application in the grain moisture measurement field. Firstly, a grain moisture sensor was designed by combining the coaxial waveguide with a circular waveguide. The circular waveguide can be used as a sampler or the sample holder, and it can prevent the measurement from the environmental interference. Secondly, based on the mode matching method [31], a new model was developed, which could precisely describe the relationship between the complex permittivity of grain and the reflection coefficient of the sensor. As the grain moisture increased, the real part and the absolute value of the imaginary part of the complex permittivity increased, and the magnitude of the corresponding reflection coefficient decreased and the phase decreased. Thirdly, a broadband reflection coefficient measuring method by using the ultra-wideband (UWB) radar module was proposed. Finally, taking wheat, rough rice, and barley as examples, the accuracy and stability of the method were verified. In addition, the paper discussed the influence of the pressure of the sensor on the accuracy of the proposed method.

Design of the Grain Moisture Sensor
Due to the wide bandwidth, no diffraction and simple structure of the open-ended coaxial waveguide, a novel grain moisture sensor was designed. The sensor combined a circular waveguide (grain sampler and sample holder) with the open-ended coaxial waveguide in order to make the sensor suitable for grain moisture measurement in field condition. The schematic of the sensor is shown in Figure 2 and the dimensions are shown in Table 1. The sensor consisted of an open-ended coaxial waveguide, a circular waveguide, an isolation layer, a temperature sensor, and the type-N microwave connector. The sensor's main features were as follows: The open-ended coaxial waveguide. The type-N microwave connector was directly connected to the open-ended coaxial waveguide. The inner conductor was made of gold-plated brass, the outer conductor was made of 304 stainless steel, and the gap between inner and outer conductors was filled with Teflon. Since the dielectric constant of Teflon is approximately a constant (ε r = 2.1) over wideband [32], using Teflon to fill the gap can easily make the impedance of the coaxial waveguide be a constant over a wide range of frequency. The dimensions were chosen to make the characteristic impedance equal to 50 Ω and only TEM mode can transmit in the frequency range of 0-5 GHz.
The isolation layer. The end face of the coaxial waveguide was covered with an isolation layer, which was made of Teflon. The isolation layer had two functions. First, it can protect the plating of the inner conductor. The conductivity changes can be avoided in long-term use thus improving the stability of the sensor. Second, it can improve the accuracy. Without the isolation layer, a conductive path will be formed between the inner and outer conductors through grain kernels. Unfortunately, the characteristic of the path is uncertain, because of the random distribution of grain kernels. As a result, without the isolation layer, there will be a large standard deviation in the measurement of the same sample.
The circular waveguide (grain sampler and sample holder). The circular waveguide was made of 304 stainless steel tubing, which was connected to the open-ended coaxial waveguide. The front of the circular waveguide was cut to 30 degrees, which made it easy to insert into the grain. The inner diameter was designed to make all microwave modes attenuate in the frequency range of 0-5 GHz. This allowed the electromagnetic field to exist in a limited region. Consequently, the measurement needs a small amount of grain sample, and the environment outside does not affect the test results. This can improve accuracy. The volume of the sampler was about 30 mL. Consequently, our proposed method only needs 30 mL grain to complete the measurement. Besides, the circular waveguide can be used as a sampler and the sample holder, since the inside of the circular waveguide was empty. This can make the sensor more convenient to use. Instead of sampling the grain and loading the grain sample into the sample holder, the proposed sensor can be inserted into the grain bulk, the measuring processes of sampling grain and loading the sample into the sample holder can be accomplished simultaneously. Therefore, the proposed sensor can simplify the measurement process and increasing the efficiency.
Temperature sensor. The PT100 platinum resistance thermometer (diameter: 2 mm, height: 5 mm) was placed far away from the isolation layer, which made the coaxial waveguide not be affected by the shell of the temperature sensor. In addition, the temperature sensor was isolated from the sampler by a 2 mm thick ABS plastic, which avoided the influence of the sampler's temperature on measuring grain's temperature. stability of the sensor. Second, it can improve the accuracy. Without the isolation layer, a conductive path will be formed between the inner and outer conductors through grain kernels. Unfortunately, the characteristic of the path is uncertain, because of the random distribution of grain kernels. As a result, without the isolation layer, there will be a large standard deviation in the measurement of the same sample.
The circular waveguide (grain sampler and sample holder). The circular waveguide was made of 304 stainless steel tubing, which was connected to the open-ended coaxial waveguide. The front of the circular waveguide was cut to 30 degrees, which made it easy to insert into the grain. The inner diameter was designed to make all microwave modes attenuate in the frequency range of 0-5 GHz. This allowed the electromagnetic field to exist in a limited region. Consequently, the measurement needs a small amount of grain sample, and the environment outside does not affect the test results. This can improve accuracy. The volume of the sampler was about 30 mL. Consequently, our proposed method only needs 30 ml grain to complete the measurement. Besides, the circular waveguide can be used as a sampler and the sample holder, since the inside of the circular waveguide was empty. This can make the sensor more convenient to use. Instead of sampling the grain and loading the grain sample into the sample holder, the proposed sensor can be inserted into the grain bulk, the measuring processes of sampling grain and loading the sample into the sample holder can be accomplished simultaneously. Therefore, the proposed sensor can simplify the measurement process and increasing the efficiency.
Temperature sensor. The PT100 platinum resistance thermometer (diameter: 2 mm, height: 5 mm) was placed far away from the isolation layer, which made the coaxial waveguide not be affected by the shell of the temperature sensor. In addition, the temperature sensor was isolated from the sampler by a 2 mm thick ABS plastic, which avoided the influence of the sampler's temperature on measuring grain's temperature.

Simulation and Measurement of the Proposed Sensor
Taking ε MUT = 2.563 − j0.318 as the complex permittivity of the measured object, the electromagnetic field of the proposed sensor was simulated by CST (Dassault Systemes, Stuttgart, Germany). The complex permittivity was derived from the complex permittivity of white hard winter wheat at 4 GHz with a moisture content of 12.6%, which was adopted as a grain sample in this paper. Figure 3 showed the electric field at 4 GHz. Figure 3c,d shows conventional open-ended coaxial probes. The inner and outer conductor radii were 3 mm and 10 mm in Figure 3c, respectively. The inner and outer conductor radii were 1.5 mm and 5 mm in Figure 3d, respectively. The region where the electric field was greater than −30 dB was the sensor's sensing region. The interference at the electric field above −30 dB can be detected by the UWB radar module with a dynamic range of 60 dB adopted in this paper. The depth of sensing region of Figure 3c was 18 mm, and the depth of sensing region of Figure 3d was 9 mm. Therefore, the sensing region of the open-ended coaxial probe can be increased by increasing the radii of the inner and outer conductors. However, there is a limit to the inner and outer conductor radii. Their radii are limited by the single mode transmission condition as shown in the following [33]: where C 0 is the velocity of light, and f max is the maximum frequency of sensor adopted. This indicates that the greater is the sum of the inner and outer conductor radii, the lower is the maximum frequency of the sensor used. In order to maximize the sensing region, we chose the maximum of the sum of inner and outer conductor radii, which met the single mode transmission condition in the frequency range of 0-5 GHz. Comparing to Figure 3c, Figure 3b added a circular waveguide with an inner radius of 15 mm connected to the coaxial waveguide. The circular waveguide could be seen as the sample holder. The wave impedance of the grain inside the circular waveguide was different from the wave impedance of the grain in free space. Choosing proper dimensions of the circular waveguide can change the wave impedance of the grain sample, which made more energy of electromagnetic wave enter into the grain sample. As a result, the sensing region of the sensor can be enlarged. In Figure 3b, the depth of the sensing region was 26 mm, which was 13 mm more than the open-ended coaxial probe shown in Figure 3c. In addition, since the grain sample was in free space in Figure 3c, a part of the energy of electromagnetic wave leaked to the upper and lower space. If the environments interacted with this part of the energy, it would introduce environmental interference. In contrast, the electromagnetic wave in Figure 3b was enclosed in the circular waveguide. Consequently, external interference was avoided. Figure 3a was the proposed sensor in this paper. Comparing to Figure 3b, the proposed sensor was added the isolation layer. The main function of the isolation layer was to prevent the coaxial inner conductor from direct contact with the grain kernels. This can protect the inner conductor's plating. In addition, it can reduce the standard deviation of the measurement and improve the stability (the details were analyzed in the Section 5.5). The depth of the sensing region of the proposed sensor was 25 mm, which was only 1 mm less than sensor without isolation layer. It indicated that the isolation layer hardly influenced the depth of the sensing region. This was mainly because Teflon had a small loss factor and its dielectric constant was close to grain. As a result, hardly influenced the depth of the sensing region. This was mainly because Teflon had a small loss factor and its dielectric constant was close to grain. As a result, the isolation layer improved the stability and did not significantly affect the electromagnetic wave propagating into the grain sample. The temperature sensor used in this paper was fixed on the edge of the opening of the circular waveguide. The electric field was less than −50 dB. The electric field intensity at the position of the temperature sensor was very small. In addition, the temperature sensor had a metal shell, which can produce electromagnetic shielding. Consequently, the electromagnetic field in the proposed sensor did not interfere with the temperature sensor.
To compare simulation and measurement of the proposed sensor's S-parameter, the decanol was adopted as standard material. Because the complex permittivity of decanol was very similar to grain and it can be measured by a 85070E dielectric probe (Keysight Technologies, Santa Rosa, CA, USA). Consequently, the decanol's complex permittivity measured by the 85070E was brought into the simulation. The S-parameter of the sensor was measured by an E5071C vector network analyzer (VNA) (Keysight Technologies).  The temperature sensor used in this paper was fixed on the edge of the opening of the circular waveguide. The electric field was less than −50 dB. The electric field intensity at the position of the temperature sensor was very small. In addition, the temperature sensor had a metal shell, which can produce electromagnetic shielding. Consequently, the electromagnetic field in the proposed sensor did not interfere with the temperature sensor.
To compare simulation and measurement of the proposed sensor's S-parameter, the decanol was adopted as standard material. Because the complex permittivity of decanol was very similar to grain and it can be measured by a 85070E dielectric probe (Keysight Technologies, Santa Rosa, CA, USA). Consequently, the decanol's complex permittivity measured by the 85070E was brought into the simulation. The S-parameter of the sensor was measured by an E5071C vector network analyzer (VNA) (Keysight Technologies). Figure 4 shows the simulated and measured values of S-parameter of the proposed sensor with isolation layer versus without isolation layer. The measured results were consistent with the simulation results. The differences between the measured and simulation results were caused by the error of the fabrication. Besides, the magnitude of S11 of the sensor with the isolation layer was larger than the sensor without the isolation layer. This was because the isolation layer reduced a part of the electromagnetic wave energy propagating into the sample holder. Consequently, more electromagnetic wave energy was reflected.
To compare simulation and measurement of the proposed sensor's S-parameter, the decanol was adopted as standard material. Because the complex permittivity of decanol was very similar to grain and it can be measured by a 85070E dielectric probe (Keysight Technologies, Santa Rosa, CA, USA). Consequently, the decanol's complex permittivity measured by the 85070E was brought into the simulation. The S-parameter of the sensor was measured by an E5071C vector network analyzer (VNA) (Keysight Technologies).

Modeling the Sensor Based on the Mode Matching Method
The mode matching method is an effective approach for analyzing the characteristics of microwaves in discontinuous waveguides [31]. At both sides of the discontinuous interface, the transverse electric and magnetic fields can be expanded into combinations of transverse electromagnetic (TEM), transverse magnetic (TM) and transverse electric (TE) modes. The scattering coefficient at the discontinuous interface can be obtained by using boundary conditions and the orthogonality between different modes. In this paper, the electromagnetic field in the coaxial region was expanded into a combination of one TEM mode and N TM 0n modes. The electromagnetic field in the isolation layer was expanded into a combination of M TM 0n modes. Applying the mode matching method at the interface between the coaxial waveguide and the isolation layer in the circular waveguide, the model of the proposed sensor can be built as follows (details are given in Appendix A): where Γ TEM−I denotes the reflection coefficient of the TEM mode in the region I, m i denotes the i-th TM mode electric field intensity coefficient in the region I. in the matrix X and the column vector y are related to the complex permittivity of the grain, and the other terms are constants determined by dimensions of the moisture sensor. The first element of the column vector is the TEM mode reflection coefficient at position O in the region I. As a result, Equation (4) can describe the relationship between the complex permittivity of the grain and the reflection coefficient of the coaxial waveguide (details about the methods for calculating admittances and coupling coefficients are given in Appendix B).
When the complex permittivity of the substance filled in the sampler is known, it is easy to calculate the reflection coefficient by using Equation (4). However, the matrix X may be not a square matrix. In this paper, we solved this problem by the least squares method as follows: When the reflection coefficient is known, it is very difficult to calculate the complex permittivity of the grain, because the analytical equation for calculating the complex permittivity from the reflection coefficient cannot be obtained. Fortunately, in 3.1-4.8 GHz range, the ranges of complex permittivity of wheat, barley, and rough rice are bounded (ε ∈ [1,6], ε ∈ [0, 1]) [1]. For bounded problems that cannot be solved analytically, the look-up table method can quickly give an approximate solution. Low time consumption is the advantage of the method, while large memory consumption is a disadvantage. Its accuracy depends on the step size of the discretization. The smaller the step, the higher the accuracy. Since the range of the complex permittivity is limited, the problem can be solved by the look-up table method. In this paper, the range of complex permittivity was discretized in steps of 0.001, and reflection coefficients corresponding to each complex permittivity was calculated. We created a table containing all complex dielectric constant values and corresponding reflection coefficients. When the reflection coefficient was known, its corresponding complex permittivity could be obtained by looking up the table to find the closest item.
Determining N and M in Equation (4) is very significant. If these are infinity, Equation (4) is an accurate model describing the proposed sensor. However, considering the computational complexity and precision, the appropriate values should be chosen. Since the radius of the isolation layer is much larger than the distance between the inner and outer conductors of the coaxial waveguide, the intensity of high-order modes in isolation layer is larger than that in the coaxial waveguide at the same frequency. Consequently, M should be greater than N. To determine the values of N and M, we took ε MUT = 2.563 − j0.318 (the data from white hard winter wheat adopted in this paper) as an example to study the influence of N and M on the reflection coefficient at 4 GHz. The result is shown in Figure 5. The ∆ denotes for M-N. First of all, the reflection coefficient became stable when ∆ was large enough. Secondly, the larger the value of N, the larger the value of ∆ was needed. Thirdly, regardless of N, the reflection coefficient converged to the same value as ∆ increased. Considering the computational complexity and precision, N equaled 5 and ∆ equaled 20 (M equaled 25) in this paper. When the complex permittivity of the substance filled in the sampler is known, it is easy to calculate the reflection coefficient by using Equation (4). However, the matrix X may be not a square matrix. In this paper, we solved this problem by the least squares method as follows: When the reflection coefficient is known, it is very difficult to calculate the complex permittivity of the grain, because the analytical equation for calculating the complex permittivity from the reflection coefficient cannot be obtained. Fortunately, in 3.1-4.8 GHz range, the ranges of complex permittivity of wheat, barley, and rough rice are bounded ( [1]. For bounded problems that cannot be solved analytically, the look-up table method can quickly give an approximate solution. Low time consumption is the advantage of the method, while large memory consumption is a disadvantage. Its accuracy depends on the step size of the discretization. The smaller the step, the higher the accuracy. Since the range of the complex permittivity is limited, the problem can be solved by the look-up table method. In this paper, the range of complex permittivity was discretized in steps of 0.001, and reflection coefficients corresponding to each complex permittivity was calculated. We created a table containing all complex dielectric constant values and corresponding reflection coefficients. When the reflection coefficient was known, its corresponding complex permittivity could be obtained by looking up the table to find the closest item. Determining N and M in Equation (4) is very significant. If these are infinity, Equation (4) is an accurate model describing the proposed sensor. However, considering the computational complexity and precision, the appropriate values should be chosen. Since the radius of the isolation layer is much larger than the distance between the inner and outer conductors of the coaxial waveguide, the intensity of high-order modes in isolation layer is larger than that in the coaxial waveguide at the same frequency. Consequently, M should be greater than N. To determine the values of N and M, we took 2.563 0.318 MUT j ε = − (the data from white hard winter wheat adopted in this paper) as an example to study the influence of N and M on the reflection coefficient at 4 GHz. The result is shown in Figure 5. The Δ denotes for M-N. First of all, the reflection coefficient became stable when Δ was large enough. Secondly, the larger the value of N, the larger the value of Δ was needed. Thirdly, regardless of N, the reflection coefficient converged to the same value as Δ increased. Considering the computational complexity and precision, N equaled 5 and Δ equaled 20 (M equaled 25) in this paper.

The Reflection Coefficient Measuring Method Based on the UWB Radar Module
To achieve a portable device to measure wideband reflection coefficient, a new approach based on a UWB radar module was proposed in this paper. The diagram is shown in Figure 6a. It consisted of a UWB radar module, a circulator, and a 4 m long transmission line. The radar module (P440, Humatics Inc., Waltham, MA, USA) used in this paper can generate 3.1-4.8 GHz UWB signals, and the sampling interval of the receiver was 61 ps (matching the Nyquist sampling theorem). The

The Reflection Coefficient Measuring Method Based on the UWB Radar Module
To achieve a portable device to measure wideband reflection coefficient, a new approach based on a UWB radar module was proposed in this paper. The diagram is shown in Figure 6a. It consisted of a UWB radar module, a circulator, and a 4 m long transmission line. The radar module (P440, Humatics Inc., Waltham, MA, USA) used in this paper can generate 3.1-4.8 GHz UWB signals, and the sampling interval of the receiver was 61 ps (matching the Nyquist sampling theorem). The circulator (UIYCC2528A, UIY Inc., Shenzhen, China) used in this paper had a 0.5 dB insertion loss and a 24 dB isolation, which could separate the transmitted signal and the reflected signal. The transmission line (RG316, Kingsignal Inc., Shenzhen, China) had a path loss of 1.65 dB·m −1 and a path delay of 4.7 ns·m −1 . Its main function was delaying the reflected signal to avoid aliasing with the leaked signal from the transmitter to the receiver. During the measuring process, the UWB module generated a UWB signal to be transmitted to the circulator port 1, and the circulator sent the signal from the port 2 (isolated port 3) through the transmission line to the moisture sensor. After that, the signal was reflected at the end face of the coaxial waveguide, and the reflected signal transmitted to the circulator port 2 through the transmission line, and the circulator sent the reflected signal from the port 3 to the receiver. Its main function was delaying the reflected signal to avoid aliasing with the leaked signal from the transmitter to the receiver. During the measuring process, the UWB module generated a UWB signal to be transmitted to the circulator port 1, and the circulator sent the signal from the port 2 (isolated port 3) through the transmission line to the moisture sensor. After that, the signal was reflected at the end face of the coaxial waveguide, and the reflected signal transmitted to the circulator port 2 through the transmission line, and the circulator sent the reflected signal from the port 3 to the receiver.  Figure 7 shows an example of a received signal when there was no grain in the sampler. The signal between 0 and 35 ns is the leaked signal from the transmitter to the receiver. The signal inside the dashed line box is the reflection signal from the proposed sensor, which is separated from the leaked signal. This represents that the time delay generated by the transmission line successfully avoid aliasing. Only the signal in the dashed line box was useful to the measurement, so we extracted the signal between 40 ns and 55 ns as the reflected signal g(t) in this paper. A virtual origin position O′ in the transmission line shown in Figure 6b was created, which corresponded to the reflected signal at 40 ns. G was the Fast Fourier Transform of g(t). Assuming the incident signal at the position O′ was j(t), and its Fast Fourier Transform was J, the reflection coefficient at the position O′ can be expressed as follows:  Figure 7 shows an example of a received signal when there was no grain in the sampler. The signal between 0 and 35 ns is the leaked signal from the transmitter to the receiver. The signal inside the dashed line box is the reflection signal from the proposed sensor, which is separated from the leaked signal. This represents that the time delay generated by the transmission line successfully avoid aliasing. Its main function was delaying the reflected signal to avoid aliasing with the leaked signal from the transmitter to the receiver. During the measuring process, the UWB module generated a UWB signal to be transmitted to the circulator port 1, and the circulator sent the signal from the port 2 (isolated port 3) through the transmission line to the moisture sensor. After that, the signal was reflected at the end face of the coaxial waveguide, and the reflected signal transmitted to the circulator port 2 through the transmission line, and the circulator sent the reflected signal from the port 3 to the receiver.  Figure 7 shows an example of a received signal when there was no grain in the sampler. The signal between 0 and 35 ns is the leaked signal from the transmitter to the receiver. The signal inside the dashed line box is the reflection signal from the proposed sensor, which is separated from the leaked signal. This represents that the time delay generated by the transmission line successfully avoid aliasing. Only the signal in the dashed line box was useful to the measurement, so we extracted the signal between 40 ns and 55 ns as the reflected signal g(t) in this paper. A virtual origin position O′ in the transmission line shown in Figure 6b was created, which corresponded to the reflected signal at 40 ns. G was the Fast Fourier Transform of g(t). Assuming the incident signal at the position O′ was j(t), and its Fast Fourier Transform was J, the reflection coefficient at the position O′ can be expressed as follows: Only the signal in the dashed line box was useful to the measurement, so we extracted the signal between 40 ns and 55 ns as the reflected signal g(t) in this paper. A virtual origin position O in the transmission line shown in Figure 6b was created, which corresponded to the reflected signal at 40 ns. G was the Fast Fourier Transform of g(t). Assuming the incident signal at the position O was j(t), and its Fast Fourier Transform was J, the reflection coefficient at the position O can be expressed as follows: If the waveguide between position O and position O was seen as a two-port network, the reflection coefficient at the position O can be calculated from the reflection coefficient at the position O by following equation [33].
where S 11 , S 12 , S 21 and S 22 are S-parameters of the two-port network between position O and position O . By bringing Equation (9) into Equation (10), we get the following equations: Except for G and Γ TEM−I o , β 1 , β 2 , and β 3 in Equation (11) are not dependent on the measured object. For a certain frequency, they are constants. After the constants are determined, the reflection coefficient of the end of the coaxial waveguide (Γ TEM−I o ) can be calculated from G by using Equation (11).

The Method of Calculating the Moisture Content from the Complex Permittivity
In this paper, the density-independent calibration function (1) was adopted to calculate the moisture content. The calibration function is a general method for calculating the moisture content of grain from the complex coefficient, which can eliminate the influence of the bulk density. In addition, it had no relationship with how the complex permittivity was measured. In general, if the complex permittivity of grain can be measured by any method, the calibration function can be used to calculate the grain moisture content from the complex permittivity. We formed Equation (15) by bring Equation (1) into Equation (2). It can be used for calculating the moisture content of grain from its corresponding complex permittivity: where a f is a frequency factor, which is related to the microwave frequency. It is a constant for a given variety of grain at a given frequency. T is temperature ( • C), W is the percentage of moisture (wet basis). b 1 , b 2 and b 3 are three undetermined coefficients. As Equation (1), the expression ε /ε a f ε − ε can be denoted by ψ, which is called the density-independent calibration function. Although the complex permittivity of grain in the frequency range of 3.1-4.8 GHz was measured, Equation (15) adopted only the complex permittivity of a single frequency to calculate the moisture content. The performance of Equation (15) is related to the frequency and the grain type. The optimal frequency for different grain types is different. To improve the accuracy, the optimal frequency for each grain type should be determined through the calibration process. Since the UWB radar module measures the wideband reflection coefficient, the complex permittivity of grain obtained is a spectrum from 3.1 to 4.8 GHz. The moisture determination method described in this paper thus has a good performance for multiple types of grains.

Summary of the Proposed Method
As shown in Figure 8, the proposed moisture content measuring method can be summarized as follows.
(1) Load the sample. 30 mL grain sample can be easily sampled and loaded in the sensor just by inserting the proposed sensor into the grain bulk. Because the circular waveguide designed can be used as the grain sampler and the sample holder. (2) Collect the reflected signal g(t) by using the UWB radar module and calculate G by the Fast Fourier Transform. (3) Calculate the reflection coefficient from the reflected signal in the frequency domain by using Equation (11). (4) Calculate the complex permittivity of grain from the reflection coefficient by look-up table method proposed in Section 2.3. (5) Calculate the moisture content from the complex permittivity by using Equation (15).
Based on the proposed method, a photograph of the developed measuring device is shown in Figure 9.

Summary of the Proposed Method
As shown in Figure 8, the proposed moisture content measuring method can be summarized as follows.
1) Load the sample. 30 ml grain sample can be easily sampled and loaded in the sensor just by inserting the proposed sensor into the grain bulk. Because the circular waveguide designed can be used as the grain sampler and the sample holder. 2) Collect the reflected signal g(t) by using the UWB radar module and calculate G by the Fast Fourier Transform. 3) Calculate the reflection coefficient from the reflected signal in the frequency domain by using Equation (11). 4) Calculate the complex permittivity of grain from the reflection coefficient by look-up table method proposed in Section 2.3. 5) Calculate the moisture content from the complex permittivity by using Equation (15).
Based on the proposed method, a photograph of the developed measuring device is shown in Figure 9.

Calibration Method
There are two equations that must be calibrated. Therefore, the calibration consists of two steps. The first step is calibrating Equation (11). There are three parameters 1 β , 2 β , and 3 β . Therefore, three standard materials with known complex permittivity can be used to achieve the calibration. In this paper, we firstly fixed the proposed sensor vertically and made the sample holder up. Then ) were calculated by using Equation (8). The complex permittivity of air equals one, and the complex permittivity of methanol and ethanol can be obtained from the tables of dielectric dispersion data for pure liquids

Summary of the Proposed Method
As shown in Figure 8, the proposed moisture content measuring method can be summarized as follows.
1) Load the sample. 30 ml grain sample can be easily sampled and loaded in the sensor just by inserting the proposed sensor into the grain bulk. Because the circular waveguide designed can be used as the grain sampler and the sample holder. 2) Collect the reflected signal g(t) by using the UWB radar module and calculate G by the Fast Fourier Transform. 3) Calculate the reflection coefficient from the reflected signal in the frequency domain by using Equation (11). 4) Calculate the complex permittivity of grain from the reflection coefficient by look-up table method proposed in Section 2.3. 5) Calculate the moisture content from the complex permittivity by using Equation (15).
Based on the proposed method, a photograph of the developed measuring device is shown in Figure 9.

Calibration Method
There are two equations that must be calibrated. Therefore, the calibration consists of two steps. The first step is calibrating Equation (11). There are three parameters 1 β , 2 β , and 3 β . Therefore, three standard materials with known complex permittivity can be used to achieve the calibration. In this paper, we firstly fixed the proposed sensor vertically and made the sample holder up. ) were calculated by using Equation (8). The complex permittivity of air equals one, and the complex permittivity of methanol and ethanol can be obtained from the tables of dielectric dispersion data for pure liquids

Calibration Method
There are two equations that must be calibrated. Therefore, the calibration consists of two steps. The first step is calibrating Equation (11). There are three parameters β 1 , β 2 , and β 3 . Therefore, three standard materials with known complex permittivity can be used to achieve the calibration. In this paper, we firstly fixed the proposed sensor vertically and made the sample holder up. Then filled the sampler with air, methanol at 20 • C, or ethanol at 20 • C. Their corresponding reflected signals in the frequency domain (G 1 , G 2 , and G 3 ) were obtained, and their corresponding reflection coefficients of the end of coaxial waveguide (Γ TEM−I 1 , Γ TEM−I 2 , and Γ TEM−I 3 ) were calculated by using Equation (8). The complex permittivity of air equals one, and the complex permittivity of methanol and ethanol can be obtained from the tables of dielectric dispersion data for pure liquids [34]. The three sets of data were brought into Equation (11), and the three functions were expressed in matrix form as follows: The three parameters β 1 , β 2 , and β 3 can be determined by solving Equation (16). This calibration step was only needed to be done one time after the proposed moisture measuring device was manufactured.
The second step is calibrating Equation (15). There is the optimal frequency ( f 0 ), the frequency factor a f , and three coefficients (b 1 , b 2 , b 3 ) that need to be determined. Firstly, we created a calibration data set. For a certain type of grain, four samples with different moisture contents were prepared. Their standard moisture content (W 1 , W 2 , W 3 , W 4 ) was determined by oven method (ISO 712-2009), and their complex permittivity spectra at 20 • C (ε 1−20 , ε 2−20 , ε 3−20 , ε 4−20 ) were measured, and their complex permittivity spectra at 30 . The linear relationship between ψ and w can be used to determine a f and f 0 . We formed an objective function as follows: where a f 0 is the optimal value of a f at optimal frequency f 0 . ep 20 ( f ) denotes the vector ep 20 at the frequency f . ψ(ep 20 ( f ), a f ) denotes the vector of ψ, which obtained by bringing ep 20 ( f ) and a f into Equation (1). r(w, ψ(ep 20 ( f ), a f )) represents the linear correlation coefficient of w and ψ(ep 20 ( f ), a f ) of calibration data set. The objective function aims to find the best combination of a f and f to make the linear correlation coefficient take the maximum value. In this paper, the range of a f was discretized from zero to one in steps of 0.0001, and the range of f was discretized from 3.1 to 4.8 GHz in the steps of 0.1 GHz. The calibration data set w and ep 20 were brought into the objective function (17), and tried every combination of a f and f to find the optimal values ( a f 0 and f 0 ) which made the linear correlation coefficient take the maximum. Finally, other parameters (b 1 , b 2 , b 3 ) can be obtained by bringing every calibration data into Equation (15) and a matrix function can be formed as follows:  (1), respectively. The matrix function can be solved by the least squares method as follows: For each type of grain, this calibration step was needed to be done one by one.

Sample Preparation and Measurement
For this study, about 2 kg of hard white winter wheat (cultivar: Hemai-20) with initial moisture of 11.0% (wet basis) were obtained from Keyuan Seed Industry Co., Ltd. (Shandong, China). About 2 kg of winter barley (cultivar: Xiyin-2) with initial moisture of 10.2% (wet basis) were obtained from Ruifeng Seed Industry Co., Ltd. (Gansu, China). About 2 kg of rough rice (cultivar: Liangyou-3218) with initial moisture of 11.0% (wet basis) were obtained from Kelongyu Seed Industry Co., Ltd., (Hunan, China). Each type of grain was divided into 20 samples of 100 g each and these were conditioned to 20 different moisture contents using the method described by Trabelsi [19] and Nelson [35]. The samples with moisture contents above their initial values were prepared by spraying grains with distilled water and storing in plastic bags for 72 h at 4 • C to equilibrate. The samples with moisture contents below their initial values were prepared by drying at 80 • C in a convection oven for 2 h to 72 h. All samples were manually mixed regularly to ensure even distribution of moisture and were equilibrated to room temperature (25 • C) overnight before measurements. The moisture contents were determined by grinding and drying in triplicate, 5 g samples in a convection oven at 130 • C for 90 min (ISO 712-2009) [4]. The standard deviations of each moisture were less than 0.17. The moisture contents determined by the oven drying method were considered true values.
Bulk densities of all prepared samples were measured, and the results are shown in Figure 10. When the moisture content was less than 8%, wet basis, the bulk density of wheat and rough rice increased slightly with the increase of moisture. When the moisture content was more than 8%, wet basis, the bulk density of wheat and rough rice decreased sharply at first and then decreased slightly. ( ) For each type of grain, this calibration step was needed to be done one by one.

Sample Preparation and Measurement
For this study, about 2 kg of hard white winter wheat (cultivar: Hemai-20) with initial moisture of 11.0% (wet basis) were obtained from Keyuan Seed Industry Co., Ltd. (Shandong, China). About 2 kg of winter barley (cultivar: Xiyin-2) with initial moisture of 10.2% (wet basis) were obtained from Ruifeng Seed Industry Co., Ltd. (Gansu, China). About 2 kg of rough rice (cultivar: Liangyou-3218) with initial moisture of 11.0% (wet basis) were obtained from Kelongyu Seed Industry Co., Ltd., (Hunan, China). Each type of grain was divided into 20 samples of 100 g each and these were conditioned to 20 different moisture contents using the method described by Trabelsi [19] and Nelson [35]. The samples with moisture contents above their initial values were prepared by spraying grains with distilled water and storing in plastic bags for 72 h at 4 °C to equilibrate. The samples with moisture contents below their initial values were prepared by drying at 80 °C in a convection oven for 2 h to 72 h. All samples were manually mixed regularly to ensure even distribution of moisture and were equilibrated to room temperature (25 °C) overnight before measurements. The moisture contents were determined by grinding and drying in triplicate, 5 g samples in a convection oven at 130 °C for 90 min (ISO 712-2009) [4]. The standard deviations of each moisture were less than 0.17. The moisture contents determined by the oven drying method were considered true values.
Bulk densities of all prepared samples were measured, and the results are shown in Figure 10. When the moisture content was less than 8%, wet basis, the bulk density of wheat and rough rice increased slightly with the increase of moisture. When the moisture content was more than 8%, wet basis, the bulk density of wheat and rough rice decreased sharply at first and then decreased slightly.  The bulk density of barley decreased with increasing moisture content. At the same moisture content, the bulk density of wheat was larger than that of rough rice, and the bulk density of rough rice was larger than that of barley.
In addition, the length of wheat kernel, rough rice kernel, and barley kernel were measured. The average length increased with the increase of moisture content. The length of wheat was from 6.1 mm to 6.7 mm, and the length rough rice was from 7.4 mm to 8.2 mm, the length of barley was from 8.7 mm to 9.6 mm.
Based on the proposed calibration method, four samples with moisture contents approximately 5%, 10%, 15%, and 20% were selected from the prepared samples as calibration samples for each type of grain (wheat, rough rice, and barley). Figure 11a,b,c illustrate the frequency factor a f and f dependence of the value of the objective function (17) for wheat, rough rice, and barley, respectively. The bulk density of barley decreased with increasing moisture content. At the same moisture content, the bulk density of wheat was larger than that of rough rice, and the bulk density of rough rice was larger than that of barley.
In addition, the length of wheat kernel, rough rice kernel, and barley kernel were measured. The average length increased with the increase of moisture content. The length of wheat was from 6.1 mm to 6.7 mm, and the length rough rice was from 7.4 mm to 8.2 mm, the length of barley was from 8.7 mm to 9.6 mm.
Based on the proposed calibration method, four samples with moisture contents approximately 5%, 10%, 15%, and 20% were selected from the prepared samples as calibration samples for each type of grain (wheat, rough rice, and barley). Figures 11a, 11b, and 11c illustrate the frequency factor  Table 2. The blank region on the left side of the figure was the forbidden region. When a f was too small, the expression ε /ε a f ε − ε was smaller than zero, which made ψ an imaginary number. It was meaningless that ψ was an imaginary number, so the blank region on the left side of the figures indicated the forbidden region. The pentagram in each figure denotes the optimal combination of a f and f . It can be seen there is the best combination for each type of grain, and the optimal values are shown in Table 2. After calibration, 20 wheat samples, 20 barley samples, and 20 rough rice samples were sequentially measured by using the developed moisture measuring device. The measurements were carried out at the room temperature (25 • C). The grain samples were placed in many plastic cups, and the sensor was inserted vertically into the grain, and each sample was measured five times.

Measured Moisture Contents Results
The moisture content results measured with the developed device and moisture contents determined by oven drying method for wheat, rough rice, and barley are compared in Figure 12a,b,c, respectively.  After calibration, 20 wheat samples, 20 barley samples, and 20 rough rice samples were sequentially measured by using the developed moisture measuring device. The measurements were carried out at the room temperature (25 °C). The grain samples were placed in many plastic cups, and the sensor was inserted vertically into the grain, and each sample was measured five times.

Measured Moisture Contents Results
The moisture content results measured with the developed device and moisture contents determined by oven drying method for wheat, rough rice, and barley are compared in Figure  12a,b,c, respectively. Firstly, it can be seen that the measured results of the proposed method agree well with the values of the standard moisture content from the oven drying method. The R 2 (coefficients of determination [36]) was used to illustrate the level of agreement between the measured data and the standard data. The range of R 2 is from zero to one. The larger the value of R 2 , the better the measured data agree with the standard data. When the value of R 2 equals one, the measured data are equal to the standard data. The R 2 of wheat was 0.997, the R 2 of rough rice was 0.994, and the R 2 of barley was 0.993. Second, the maximum absolute error of the wheat was 1.1%, the maximum absolute error of barley was 1.4%, and the maximum absolute error of rough rice was 1.0%. The mean relative errors of wheat, rough rice, and barley were 4.8%, 4.1%, and 4.8%, respectively. After averaging five results of each sample, the maximum absolute error of the wheat reduced to 0.6%, of the rough rice reduced Firstly, it can be seen that the measured results of the proposed method agree well with the values of the standard moisture content from the oven drying method. The R 2 (coefficients of determination [36]) was used to illustrate the level of agreement between the measured data and the standard data. The range of R 2 is from zero to one. The larger the value of R 2 , the better the measured data agree with the standard data. When the value of R 2 equals one, the measured data are equal to the standard data. The R 2 of wheat was 0.997, the R 2 of rough rice was 0.994, and the R 2 of barley was 0.993. Second, the maximum absolute error of the wheat was 1.1%, the maximum absolute error of barley was 1.4%, and the maximum absolute error of rough rice was 1.0%. The mean relative errors of wheat, rough rice, and barley were 4.8%, 4.1%, and 4.8%, respectively. After averaging five results of each sample, the maximum absolute error of the wheat reduced to 0.6%, of the rough rice reduced to 0.5%, and of the barley reduced to 0.7%. As a result, multiple measurements can improve the accuracy of the proposed method. Finally, the standard deviation of each sample increased with the increase in moisture content. The maximum standard deviation of wheat was 0.407, which occurred when the moisture was 24.1%. The maximum standard deviation of barley was 0.680, which appeared when the moisture was 24.7%. The maximum standard deviation of rough rice was 0.423, which occurred when the moisture was 21.7%.
Since the effectiveness of measuring moisture content in some published literature [13,37] was evaluated by calculating the SEP (standard error of performance) defined as follows: where n is the number of samples, W measured i denotes the measured moisture content of the i-th sample, and W standard i denotes the standard moisture content of the i-th sample. The accuracy of the moisture content of wheat, rough rice, and barley measured by the proposed method versus methods of literature are shown in Tables 3-5, respectively. Table 3. The accuracy of the moisture content of wheat measured by the proposed method versus methods of literature.

R 2 SEP (%)
Proposed method in this paper 0.997 0.14 Method in literature [   The proposed method achieved better accuracy of measuring the moisture of wheat and rough rice than the cited literature. The accuracy of measuring the moisture of barley was similar to the literature [37]. Both published articles [16] and [38] used the free space method to measure the complex permittivity of grain. The electromagnetic waves propagated in free space. Although narrow beam antennas and larger sample holder were adopted, there was still a part of electromagnetic waves passing through the edges of the sample holder instead of penetrating grain sample. This would introduce errors into the measurement. In addition, larger sample holder made the device difficult to carry and use in the field conditions. The [2] parallel transmission lines were used as a probe. The electromagnetic field of this method was open in space. If the volume of the grain sample was not large enough, the electromagnetic wave would leak out of the grain sample, and the result would be affected by the environment. Reference [37] used a coaxial sample holder to measure the impedance. The electromagnetic field existed in a limited space, which avoided external interference. Therefore, it obtained better accuracy. Compared with the cited literature, the proposed method gave good accuracy for wheat, rough rice, and barley. In addition, the measuring device was small and portable. The high accuracy of the proposed method in this paper was derived from three aspects. First, the proposed sensor was a closed system. The electromagnetic field existed only inside the circular waveguide, which can avoid external interference. Secondly, the electromagnetic field model of the proposed sensor was developed based on the mode matching method. This method was an analytical way to describe the relationship between the complex permittivity and the reflection coefficient. Its accuracy was much higher than the approximate model. In addition, the grain samples used in this paper were all clean seeds, and the impurity content was very low, which avoided the influence of impurities on the results during the measurement.

Verification of the Performance of Measuring the Complex Permittivity
Since the complex permittivity is an important intermediate variable of the proposed method in this paper, it is important to verify the accuracy of the measurement of the complex permittivity. Decanol was adopted as the standard material for test because its range of complex permittivity was very close to the grain. An 85070E dielectric probe (Keysight Technologies) was used as a standard method. The method of calculating the complex permittivity by the proposed sensor included three steps. First, the reflected signal G was measured by the ultra-wideband radar module. Then, the reflection coefficient of the sensor was calculated by Equation (11). Finally, the complex permittivity was calculated by the look-up table method. Figure 13 showed the dielectric constant and loss factor of decanol measured by the proposed sensor versus the probe 85070E at 20 • C. The measured results by the proposed sensor were consistent with the results measured by the probe 85070E. The mean relative error of the dielectric constant was 0.6%, and the mean relative error of the loss factor was 1.9%. Therefore, the complex permittivity measured by the proposed sensor had good precision. narrow beam antennas and larger sample holder were adopted, there was still a part of electromagnetic waves passing through the edges of the sample holder instead of penetrating grain sample. This would introduce errors into the measurement. In addition, larger sample holder made the device difficult to carry and use in the field conditions. The [2] parallel transmission lines were used as a probe. The electromagnetic field of this method was open in space. If the volume of the grain sample was not large enough, the electromagnetic wave would leak out of the grain sample, and the result would be affected by the environment. Reference [37] used a coaxial sample holder to measure the impedance. The electromagnetic field existed in a limited space, which avoided external interference. Therefore, it obtained better accuracy. Compared with the cited literature, the proposed method gave good accuracy for wheat, rough rice, and barley. In addition, the measuring device was small and portable. The high accuracy of the proposed method in this paper was derived from three aspects. First, the proposed sensor was a closed system. The electromagnetic field existed only inside the circular waveguide, which can avoid external interference. Secondly, the electromagnetic field model of the proposed sensor was developed based on the mode matching method. This method was an analytical way to describe the relationship between the complex permittivity and the reflection coefficient. Its accuracy was much higher than the approximate model. In addition, the grain samples used in this paper were all clean seeds, and the impurity content was very low, which avoided the influence of impurities on the results during the measurement.

Verification of the Performance of Measuring the Complex Permittivity
Since the complex permittivity is an important intermediate variable of the proposed method in this paper, it is important to verify the accuracy of the measurement of the complex permittivity. Decanol was adopted as the standard material for test because its range of complex permittivity was very close to the grain. An 85070E dielectric probe (Keysight Technologies) was used as a standard method. The method of calculating the complex permittivity by the proposed sensor included three steps. First, the reflected signal G was measured by the ultra-wideband radar module. Then, the reflection coefficient of the sensor was calculated by Equation (11). Finally, the complex permittivity was calculated by the look-up table method. Figure 13 showed the dielectric constant and loss factor of decanol measured by the proposed sensor versus the probe 85070E at 20 °C. The measured results by the proposed sensor were consistent with the results measured by the probe 85070E. The mean relative error of the dielectric constant was 0.6%, and the mean relative error of the loss factor was 1.9%. Therefore, the complex permittivity measured by the proposed sensor had good precision.

Influences of the Moisture Content on Reflection Coefficient, Complex Permittivity, and Reflected Signal
Due to the complex permittivity, the reflection coefficient and the reflected signal are intermediate variables in the measurement process in this paper, it is important to analyze the influence of moisture content on them. The effects of moisture content on the dielectric constant and loss factor are shown in Figure 14a,b, respectively. Since the optimal frequencies for wheat, rough rice, and barley are 3.6 GHz, 4.0 GHz, and 4.1 GHz, the data of wheat, rough rice, and barley in Figure 14a,b was measured at 3.6 GHz, 4.0 GHz, and 4.1 GHz, respectively. Both the dielectric constant and the loss factor increased with the increase of the moisture content. Since the dielectric constant and loss factor of water were much larger than that of dry grain, the moisture content had a great influence on the complex permittivity of grain. The dielectric constant and loss factor of grain rose with the increase of the moisture content. In addition, the relationship between complex permittivity and the moisture content was not linear. The volume of the grain kernel rose with the increase of moisture content. That led to the porosity change, which affected the volume rate of air in the sample holder. This factor made the influence of moisture content on the complex permittivity of grain as non-linear. Due to the complex permittivity, the reflection coefficient and the reflected signal are intermediate variables in the measurement process in this paper, it is important to analyze the influence of moisture content on them. The effects of moisture content on the dielectric constant and loss factor are shown in Figure 14a,b, respectively. Since the optimal frequencies for wheat, rough rice, and barley are 3.6 GHz, 4.0 GHz, and 4.1 GHz, the data of wheat, rough rice, and barley in Figure 14a,b was measured at 3.6 GHz, 4.0 GHz, and 4.1 GHz, respectively. Both the dielectric constant and the loss factor increased with the increase of the moisture content. Since the dielectric constant and loss factor of water were much larger than that of dry grain, the moisture content had a great influence on the complex permittivity of grain. The dielectric constant and loss factor of grain rose with the increase of the moisture content. In addition, the relationship between complex permittivity and the moisture content was not linear. The volume of the grain kernel rose with the increase of moisture content. That led to the porosity change, which affected the volume rate of air in the sample holder. This factor made the influence of moisture content on the complex permittivity of grain as non-linear.  Figure 15 shows the effect of the moisture content on the reflection coefficient of the proposed sensor. Both the magnitude and phase of the reflection coefficient decreased with the increasing moisture. The influence of moisture content on the reflection coefficient was caused by the change of complex permittivity. The change of complex permittivity made the wave impedance of the grain in the proposed sensor change, which affected the reflection coefficient. The proposed model expressed by Equation (4) in this paper can accurately describe the relationship between the complex permittivity and the reflection coefficient.   Figure 15 shows the effect of the moisture content on the reflection coefficient of the proposed sensor. Both the magnitude and phase of the reflection coefficient decreased with the increasing moisture. The influence of moisture content on the reflection coefficient was caused by the change of complex permittivity. The change of complex permittivity made the wave impedance of the grain in the proposed sensor change, which affected the reflection coefficient. The proposed model expressed by Equation (4) in this paper can accurately describe the relationship between the complex permittivity and the reflection coefficient. Due to the complex permittivity, the reflection coefficient and the reflected signal are intermediate variables in the measurement process in this paper, it is important to analyze the influence of moisture content on them. The effects of moisture content on the dielectric constant and loss factor are shown in Figure 14a,b, respectively. Since the optimal frequencies for wheat, rough rice, and barley are 3.6 GHz, 4.0 GHz, and 4.1 GHz, the data of wheat, rough rice, and barley in Figure 14a,b was measured at 3.6 GHz, 4.0 GHz, and 4.1 GHz, respectively. Both the dielectric constant and the loss factor increased with the increase of the moisture content. Since the dielectric constant and loss factor of water were much larger than that of dry grain, the moisture content had a great influence on the complex permittivity of grain. The dielectric constant and loss factor of grain rose with the increase of the moisture content. In addition, the relationship between complex permittivity and the moisture content was not linear. The volume of the grain kernel rose with the increase of moisture content. That led to the porosity change, which affected the volume rate of air in the sample holder. This factor made the influence of moisture content on the complex permittivity of grain as non-linear.    Figure 16a,b shows the moisture content dependence of the magnitude and phase of the reflected signal g(t). The magnitude of the reflected signal was between −46 dBm and −60 dBm, and it decreased with the increase of the moisture content. As the moisture increased, more electromagnetic energy entered the grain, and less electromagnetic energy reflected back. This was consistent with the decrease in the magnitude of the reflection coefficient as the moisture increases (Figure 15a). The phase of the reflected signal decreased as the moisture content increased. Since the incident signal was constant and the phase of the reflection coefficient was equal to the phase of the reflected signal minus the phase of the incident signal, the phase of the reflected signal changed in the same direction with the reflection coefficient. This was consistent with the results that both the phase of the reflected signal and the reflection coefficient decreased as the moisture content increased. The quantitative relationship between the moisture content and the reflected signal was complicated. It can be depicted by combining Equations (15), (4), and (11). Equation (15) represented the relationship between the moisture content and the complex permittivity, and Equation (4) represented the relationship between the complex permittivity and the reflection coefficient, and Equation (11) represented the relationship between the reflection coefficient and the reflected signal. Consequently, calculating the reflected signal from the complex permittivity or calculating the complex permittivity from the reflected signal can be achieved by Equations (15), (4), and (11).  Figure 16a,b shows the moisture content dependence of the magnitude and phase of the reflected signal g(t). The magnitude of the reflected signal was between −46dBm and −60dBm, and it decreased with the increase of the moisture content. As the moisture increased, more electromagnetic energy entered the grain, and less electromagnetic energy reflected back. This was consistent with the decrease in the magnitude of the reflection coefficient as the moisture increases (Figure 15a). The phase of the reflected signal decreased as the moisture content increased. Since the incident signal was constant and the phase of the reflection coefficient was equal to the phase of the reflected signal minus the phase of the incident signal, the phase of the reflected signal changed in the same direction with the reflection coefficient. This was consistent with the results that both the phase of the reflected signal and the reflection coefficient decreased as the moisture content increased. The quantitative relationship between the moisture content and the reflected signal was complicated. It can be depicted by combining Equations (15), (4), and (11). Equation (15) represented the relationship between the moisture content and the complex permittivity, and Equation (4) represented the relationship between the complex permittivity and the reflection coefficient, and Equation (11) represented the relationship between the reflection coefficient and the reflected signal. Consequently, calculating the reflected signal from the complex permittivity or calculating the complex permittivity from the reflected signal can be achieved by Equations (15)

Verification of the Method of Determining the Frequency Factor by Optimizing the Objective Function
The determination of the frequency factor f a in literature [16] was determined by analyzing the data of ε ρ ′ and ε ρ ′′ by linear regression, and the value of f a equaled the slope of the linear regression function. However, this method required measuring bulk density, which needed additional equipment. In this paper, an objective function (17) was proposed to determine f a by optimization based on the linear relationship between density-independent calibration function ψ and moisture content W . It had the advantage of avoiding the measurement of bulk density during calibration and improving efficiency. To verify the validity of the method used in this paper, we performed a linear regression analysis on data ε ρ ′ and ε ρ ′′ , and the results are illustrated in Figure 17a,b,c, for wheat at 3.6 GHz, rough rice at 4.0 GHz, and barley at 4.1 GHz, respectively. The slopes of the linear regression function were 0.4625, 0.5388, and 0.6094 for wheat, rough rice, and barley, respectively. The relative errors between f a determined by optimization and determined by the method in the literature [16] were 0.7%, 0.8%, and 1.8% for wheat, rough rice, and barley, respectively. f a obtained by the method we used were consistent with f a obtained by the methods in the literature. Therefore, the parameter estimation method can accurately determine f a without measuring bulk density.

Verification of the Method of Determining the Frequency Factor by Optimizing the Objective Function
The determination of the frequency factor a f in literature [16] was determined by analyzing the data of ε /ρ and ε /ρ by linear regression, and the value of a f equaled the slope of the linear regression function. However, this method required measuring bulk density, which needed additional equipment. In this paper, an objective function (17) was proposed to determine a f by optimization based on the linear relationship between density-independent calibration function ψ and moisture content W. It had the advantage of avoiding the measurement of bulk density during calibration and improving efficiency. To verify the validity of the method used in this paper, we performed a linear regression analysis on data ε /ρ and ε /ρ, and the results are illustrated in Figure 17a,b,c, for wheat at 3.6 GHz, rough rice at 4.0 GHz, and barley at 4.1 GHz, respectively. The slopes of the linear regression function were 0.4625, 0.5388, and 0.6094 for wheat, rough rice, and barley, respectively. The relative errors between a f determined by optimization and determined by the method in the literature [16] were 0.7%, 0.8%, and 1.8% for wheat, rough rice, and barley, respectively. a f obtained by the method we used were consistent with a f obtained by the methods in the literature. Therefore, the parameter estimation method can accurately determine a f without measuring bulk density.

Influence of the Isolation Layer on the Stability
To verify the effect of the isolation layer on the stability, 20 wheat samples' moisture contents were measured by a moisture sensor without an isolation layer. Each sample was measured five times, and the standard deviation of each sample was computed. The results are shown in Figure 18. The standard deviations of the measured results using the sensor with the isolation layer were significantly decreased by 0.52 on average comparing to the standard deviations without the isolation layer. Therefore, the isolation layer improved the stability. In this paper, the moisture content was calculated from the complex permittivity, and the complex permittivity was calculated from the reflection coefficient, and the reflection coefficient was measured by the UWB radar module. The complex permittivity of grain is the complex permittivity of the mixture of grain kernels and air. Consequently, the porosity has a large effect on the complex permittivity of the mixture. It means that the complex permittivity of the mixture is influenced by the volume rate of grain kernels and air. Unfortunately, the distribution of porosity in grain is not uniform. For example, there is 1 L wheat, and let us assume its standard porosity equals 50%. If 1 ml wheat is sampled to measure its porosity, the value will be random. It may be greater than 50% or less than 50%, which means that the variance of the measured result is large. If 100 ml wheat sample is sampled to measure the porosity, the result will also be random, but the variance must be smaller

Influence of the Isolation Layer on the Stability
To verify the effect of the isolation layer on the stability, 20 wheat samples' moisture contents were measured by a moisture sensor without an isolation layer. Each sample was measured five times, and the standard deviation of each sample was computed. The results are shown in Figure 18. The standard deviations of the measured results using the sensor with the isolation layer were significantly decreased by 0.52 on average comparing to the standard deviations without the isolation layer. Therefore, the isolation layer improved the stability.

Influence of the Isolation Layer on the Stability
To verify the effect of the isolation layer on the stability, 20 wheat samples' moisture contents were measured by a moisture sensor without an isolation layer. Each sample was measured five times, and the standard deviation of each sample was computed. The results are shown in Figure 18. The standard deviations of the measured results using the sensor with the isolation layer were significantly decreased by 0.52 on average comparing to the standard deviations without the isolation layer. Therefore, the isolation layer improved the stability. In this paper, the moisture content was calculated from the complex permittivity, and the complex permittivity was calculated from the reflection coefficient, and the reflection coefficient was measured by the UWB radar module. The complex permittivity of grain is the complex permittivity of the mixture of grain kernels and air. Consequently, the porosity has a large effect on the complex permittivity of the mixture. It means that the complex permittivity of the mixture is influenced by the volume rate of grain kernels and air. Unfortunately, the distribution of porosity in grain is not uniform. For example, there is 1 L wheat, and let us assume its standard porosity equals 50%. If 1 ml wheat is sampled to measure its porosity, the value will be random. It may be greater than 50% or less than 50%, which means that the variance of the measured result is large. If 100 ml wheat sample is sampled to measure the porosity, the result will also be random, but the variance must be smaller In this paper, the moisture content was calculated from the complex permittivity, and the complex permittivity was calculated from the reflection coefficient, and the reflection coefficient was measured by the UWB radar module. The complex permittivity of grain is the complex permittivity of the mixture of grain kernels and air. Consequently, the porosity has a large effect on the complex permittivity of the mixture. It means that the complex permittivity of the mixture is influenced by the volume rate of grain kernels and air. Unfortunately, the distribution of porosity in grain is not uniform. For example, there is 1 L wheat, and let us assume its standard porosity equals 50%. If 1 mL wheat is sampled to measure its porosity, the value will be random. It may be greater than 50% or less than 50%, which means that the variance of the measured result is large. If 100 mL wheat sample is sampled to measure the porosity, the result will also be random, but the variance must be smaller than the result of measured using 1 mL sample. If all wheat (1 L) are taken to measure the porosity, the value will be equal to 50%, and the variance will be approximately zero. Therefore, the variance of the porosity decreases with the increasing of the sampling volume. Considering the grain in the sample holder of the proposed sensor to be stratified, the complex permittivity of the first layer, which directly contacts with the inner and outer conductors of the coaxial waveguide, has a greater influence on the reflection coefficient than the other layers. Since the volume of this layer is very small, the randomness of porosity is strong. This indicates that the complex permittivity of this layer has strong randomness. However, the layer with strong randomness has a greater influence on the reflection coefficient than other layers. This leads to a large variance in the measured result. The isolation layer can prevent the grain kernels from direct contact with the coaxial inner and outer conductors. As a result, there is no direct circuit from the inner conductor to the outer conductor through the grain kernels. The influence of the porosity's randomness of the first layer on the measurement can be reduced by the isolation layer.
In order to verify the effect of the first layer's complex permittivity on the reflection coefficient of the proposed sensor, the CST (Dassault Systemes) simulation software was adopted, and the simulation models are shown in Figure 19. Figure 19a shows the sensor with the isolation layer, and the area within 3 mm from the isolation layer was the first layer. The complex permittivity of the first layer was ε 2 , and the complex permittivity of the rest of the grain was ε 1 . Figure 19b shows the sensor without the isolation layer, and the area within 3 mm from the opening of the coaxial waveguide is the first layer. Its complex permittivity was ε 2 , and the complex permittivity of the rest of grain was ε 1 . than the result of measured using 1 ml sample. If all wheat (1 L) are taken to measure the porosity, the value will be equal to 50%, and the variance will be approximately zero. Therefore, the variance of the porosity decreases with the increasing of the sampling volume. Considering the grain in the sample holder of the proposed sensor to be stratified, the complex permittivity of the first layer, which directly contacts with the inner and outer conductors of the coaxial waveguide, has a greater influence on the reflection coefficient than the other layers. Since the volume of this layer is very small, the randomness of porosity is strong. This indicates that the complex permittivity of this layer has strong randomness. However, the layer with strong randomness has a greater influence on the reflection coefficient than other layers. This leads to a large variance in the measured result. The isolation layer can prevent the grain kernels from direct contact with the coaxial inner and outer conductors. As a result, there is no direct circuit from the inner conductor to the outer conductor through the grain kernels. The influence of the porosity's randomness of the first layer on the measurement can be reduced by the isolation layer. In order to verify the effect of the first layer's complex permittivity on the reflection coefficient of the proposed sensor, the CST (Dassault Systemes) simulation software was adopted, and the simulation models are shown in Figure 19. Figure 19a shows the sensor with the isolation layer, and the area within 3 mm from the isolation layer was the first layer. The complex permittivity of the first layer was 2 ε , and the complex permittivity of the rest of the grain was 1 ε . Figure 19b shows the sensor without the isolation layer, and the area within 3 mm from the opening of the coaxial waveguide is the first layer. Its complex permittivity was 2 ε , and the complex permittivity of the rest of grain was 1 ε .
(a) (b)  We defined three statuses. The status 1 denoted that the complex permittivity of the first layer equaled the complex permittivity of the rest of grain. The status 2 denoted that the complex permittivity of the first layer was 10% smaller than the complex permittivity of the rest of grain. The status 3 denoted that the complex permittivity of the first layer was 10% larger than the complex permittivity of the rest of grain. The prepared wheat with 6.2% and 18.5% moisture content were adopted as the measuring grain for the simulation. Their dielectric constants and loss factors are shown in Figure 20a,b, respectively. The values were measured by the proposed method. than the result of measured using 1 ml sample. If all wheat (1 L) are taken to measure the porosity, the value will be equal to 50%, and the variance will be approximately zero. Therefore, the variance of the porosity decreases with the increasing of the sampling volume. Considering the grain in the sample holder of the proposed sensor to be stratified, the complex permittivity of the first layer, which directly contacts with the inner and outer conductors of the coaxial waveguide, has a greater influence on the reflection coefficient than the other layers. Since the volume of this layer is very small, the randomness of porosity is strong. This indicates that the complex permittivity of this layer has strong randomness. However, the layer with strong randomness has a greater influence on the reflection coefficient than other layers. This leads to a large variance in the measured result. The isolation layer can prevent the grain kernels from direct contact with the coaxial inner and outer conductors. As a result, there is no direct circuit from the inner conductor to the outer conductor through the grain kernels. The influence of the porosity's randomness of the first layer on the measurement can be reduced by the isolation layer. In order to verify the effect of the first layer's complex permittivity on the reflection coefficient of the proposed sensor, the CST (Dassault Systemes) simulation software was adopted, and the simulation models are shown in Figure 19. Figure 19a shows the sensor with the isolation layer, and the area within 3 mm from the isolation layer was the first layer. The complex permittivity of the first layer was 2 ε , and the complex permittivity of the rest of the grain was 1 ε . Figure 19b shows the sensor without the isolation layer, and the area within 3 mm from the opening of the coaxial waveguide is the first layer. Its complex permittivity was 2 ε , and the complex permittivity of the rest of grain was 1 ε .
(a) (b)   Figure 21a shows the simulation results for the moisture content of 6.2%. It was obvious that the changes of the complex permittivity of the first layer had a significant effect on the reflection coefficient of the sensor without the isolation layer. The influence on the reflection coefficient of the sensor with the isolation layer was small. Taking 3.6 GHz as an example, when the complex permittivity of the first layer increased by 10%, the reflection coefficient of the sensor without the isolation layer reduced by 0.29%, and the reflection coefficient of the sensor with the isolation layer reduced by 0.11%. When the complex permittivity of the first layer reduced by 10%, the reflection coefficient of the sensor without the isolation layer increased by 0.31%, and the reflection coefficient of the sensor with the isolation layer increased by 0.13%. Figure 21b shows the simulation results for the moisture content of 18.5%. Similar to Figure 21a, the isolation layer reduced the effect of the changes of the complex permittivity of the first layer on the reflection coefficient. Taking 3.6 GHz as an example, when the complex permittivity of the first layer increased by 10%, the reflection coefficient of the sensor without the isolation layer reduced by 1.43%, and the reflection coefficient of the sensor with the isolation layer reduced by 0.39%. When the complex permittivity of the first layer reduced by 10%, the reflection coefficient of the sensor without the isolation layer increased by 0.97%, and the reflection coefficient of the sensor with the isolation layer increased by 0.64%. Comparing Figure 21a with Figure 21b, it can be seen that the changes of the reflection coefficient of the high moisture grain were greater than that of the low moisture grain.
The results of the simulation agreed with the experimental results shown in Figure 18. The isolation layer can reduce the variance of the measured results. In addition, the variance of the measured results rose with the increase of the moisture content. status 3 denoted that the complex permittivity of the first layer was 10% larger than the complex permittivity of the rest of grain. The prepared wheat with 6.2% and 18.5% moisture content were adopted as the measuring grain for the simulation. Their dielectric constants and loss factors are shown in Figure 20a,b, respectively. The values were measured by the proposed method. Figure 21a shows the simulation results for the moisture content of 6.2%. It was obvious that the changes of the complex permittivity of the first layer had a significant effect on the reflection coefficient of the sensor without the isolation layer. The influence on the reflection coefficient of the sensor with the isolation layer was small. Taking 3.6 GHz as an example, when the complex permittivity of the first layer increased by 10%, the reflection coefficient of the sensor without the isolation layer reduced by 0.29%, and the reflection coefficient of the sensor with the isolation layer reduced by 0.11%. When the complex permittivity of the first layer reduced by 10%, the reflection coefficient of the sensor without the isolation layer increased by 0.31%, and the reflection coefficient of the sensor with the isolation layer increased by 0.13%. Figure 21b shows the simulation results for the moisture content of 18.5%. Similar to Figure 21a, the isolation layer reduced the effect of the changes of the complex permittivity of the first layer on the reflection coefficient. Taking 3.6 GHz as an example, when the complex permittivity of the first layer increased by 10%, the reflection coefficient of the sensor without the isolation layer reduced by 1.43%, and the reflection coefficient of the sensor with the isolation layer reduced by 0.39%. When the complex permittivity of the first layer reduced by 10%, the reflection coefficient of the sensor without the isolation layer increased by 0.97%, and the reflection coefficient of the sensor with the isolation layer increased by 0.64%. Comparing Figure 21a with Figure 21b, it can be seen that the changes of the reflection coefficient of the high moisture grain were greater than that of the low moisture grain.
The results of the simulation agreed with the experimental results shown in Figure 18. The isolation layer can reduce the variance of the measured results. In addition, the variance of the measured results rose with the increase of the moisture content. To further verify the effect of complex dielectric constant changes in different regions on the reflection coefficient, we established the simulation models as shown in Figure 22. The complex permittivity of a 3 mm thick grain layer in the sample holder was 2 ε , and the complex permittivity of grain in other regions was 1 ε . For the sensor with the isolation layer, d Δ denoted the distance To further verify the effect of complex dielectric constant changes in different regions on the reflection coefficient, we established the simulation models as shown in Figure 22. The complex permittivity of a 3 mm thick grain layer in the sample holder was ε 2 , and the complex permittivity of grain in other regions was ε 1 . For the sensor with the isolation layer, ∆ d denoted the distance between the grain layer and the isolation layer. For the sensor without the isolation layer, ∆ d denoted the distance between the grain layer and the end face of the coaxial waveguide. ε 1 equaled the complex permittivity of prepared wheat with the 18.5% moisture content (Figure 20a,b). ε 2 was 10% larger than ε 1 . The simulation evaluated the effect of a 10% increase in the complex permittivity of a 3 mm thick grain layer on the reflection coefficient at 3.6 GHz.
between the grain layer and the isolation layer. For the sensor without the isolation layer, d Δ denoted the distance between the grain layer and the end face of the coaxial waveguide. 1 ε equaled the complex permittivity of prepared wheat with the 18.5% moisture content (Figure 20a,b). 2 ε was 10% larger than 1 ε . The simulation evaluated the effect of a 10% increase in the complex permittivity of a 3 mm thick grain layer on the reflection coefficient at 3.6 GHz. The simulation results were shown in Figure 23. First, with or without the isolation layer, the decreases' ratio of the magnitude of the reflection coefficient shrank with the increase of the distance d Δ . This was mainly caused by the intensity of the electromagnetic field decreasing with the increase of the distance d Δ . The farther the distance, the weaker the effect of complex permittivity changes on the reflection coefficient. Secondly, the changes of the complex permittivity in the region, which was within 3 mm from the end face of the coaxial waveguide of the sensor without the isolation layer, had a greater influence on the reflection coefficient than other regions. In contrast, the reflection coefficient of the sensor with the isolation layer was less sensitive to the changes of the complex permittivity than the sensor without the isolation layer. It was caused by the isolation layer blocking a part of the electromagnetic wave's energy. Fortunately, the isolation layer weakened the effect of the changes of the complex permittivity of the first layer on the reflection coefficient. The isolation layer reduced the level of inhomogeneity of the complex permittivity in different regions influencing on the reflection coefficient. As a result, the reflection coefficient measured by the proposed sensor was more accurately related to the complex permittivity of the whole grain in the sample holder rather than the grain near the end face of the coaxial waveguide. In summary, the isolation layer can reduce the variance of the measured results and improve the performance.  The simulation results were shown in Figure 23. First, with or without the isolation layer, the decreases' ratio of the magnitude of the reflection coefficient shrank with the increase of the distance ∆ d . This was mainly caused by the intensity of the electromagnetic field decreasing with the increase of the distance ∆ d . The farther the distance, the weaker the effect of complex permittivity changes on the reflection coefficient. Secondly, the changes of the complex permittivity in the region, which was within 3 mm from the end face of the coaxial waveguide of the sensor without the isolation layer, had a greater influence on the reflection coefficient than other regions. In contrast, the reflection coefficient of the sensor with the isolation layer was less sensitive to the changes of the complex permittivity than the sensor without the isolation layer. It was caused by the isolation layer blocking a part of the electromagnetic wave's energy. Fortunately, the isolation layer weakened the effect of the changes of the complex permittivity of the first layer on the reflection coefficient. The isolation layer reduced the level of inhomogeneity of the complex permittivity in different regions influencing on the reflection coefficient. As a result, the reflection coefficient measured by the proposed sensor was more accurately related to the complex permittivity of the whole grain in the sample holder rather than the grain near the end face of the coaxial waveguide. In summary, the isolation layer can reduce the variance of the measured results and improve the performance.

Influence of the Pressure on The Measurement
10% larger than 1 ε . The simulation evaluated the effect of a 10% increase in the complex permittivity of a 3 mm thick grain layer on the reflection coefficient at 3.6 GHz. The simulation results were shown in Figure 23. First, with or without the isolation layer, the decreases' ratio of the magnitude of the reflection coefficient shrank with the increase of the distance d Δ . This was mainly caused by the intensity of the electromagnetic field decreasing with the increase of the distance d Δ . The farther the distance, the weaker the effect of complex permittivity changes on the reflection coefficient. Secondly, the changes of the complex permittivity in the region, which was within 3 mm from the end face of the coaxial waveguide of the sensor without the isolation layer, had a greater influence on the reflection coefficient than other regions. In contrast, the reflection coefficient of the sensor with the isolation layer was less sensitive to the changes of the complex permittivity than the sensor without the isolation layer. It was caused by the isolation layer blocking a part of the electromagnetic wave's energy. Fortunately, the isolation layer weakened the effect of the changes of the complex permittivity of the first layer on the reflection coefficient. The isolation layer reduced the level of inhomogeneity of the complex permittivity in different regions influencing on the reflection coefficient. As a result, the reflection coefficient measured by the proposed sensor was more accurately related to the complex permittivity of the whole grain in the sample holder rather than the grain near the end face of the coaxial waveguide. In summary, the isolation layer can reduce the variance of the measured results and improve the performance.

Influence of the Pressure on The Measurement
Since the pressure may be applied to the sensor by hand in practical applications, or due to grain above it, it is important to study the influence of external pressure on the measurement. In this paper, the proposed moisture sensor was firstly inserted vertically into the wheat sample and the moisture was measured without pressure. Then, a 1 kg weight (about 10 N pressure) was placed on the sensor and the moisture was measured. The results are shown in Figure 24a. The measured moisture content increased slightly with the increase in pressure and this increase was higher at higher moisture contents. For wheat sample with 25.4% moisture, the measured result with 10 N pressure was larger than that without pressure by 0.7. For moisture below 5.0%, the 10 N pressure did not noticeably affect the measurement. This is mainly because the pressure compressed the grain in the sampler, which made the proportion of grain kernels in the sampler rise and the volume ratio of grain's moisture in the sampler became larger. In addition, grain kernels became softer as moisture increased. The higher the moisture content, the easier these can be compressed, and the more significant is the effect of pressure. Therefore, the pressure had a more obvious influence on the measurement of high moisture grain.
In another aspect, the proposed method was not sensitive to the change of bulk density. Bulk density of grain in the sample holder can be obtained by dividing the mass of grain by the volume of the sample holder. The volume of the sample holder was constant. With 10 N pressures on the sensor, more grain kernels were brought into the sample holder. Consequently, the mass of grain increased, and the bulk density of grain in the sample holder increased as well. With the increase of bulk density, few changes can be observed in Figure 24a. It indicated that the proposed method eliminated the influence of bulk density.
In addition, we also studied the influence of pressure on the measurements using the sensor without the isolation layer. The results are shown in Figure 24b. Compared with Figure 24a, it is obvious that the pressure had a more significant influence on the measurements without the isolation layer. Measuring the wheat sample with 25.4% moisture by using the sensor without isolation layer, the 10 N pressure made the measuring result increase by 1.4, which was two times larger than that with the isolation layer. When 10 N pressures were applied to the sensor without the isolation, the pressures were transmitted to the grain through the end face of the coaxial waveguide. Grain kernels in the region, which was near the end face of the coaxial waveguide, were compressed to a great degree. As a result, the volume rate of the moisture in the region increased larger than other regions. In addition, without the isolation layer, the first layer of grain, which was directly contacted with the inner and outer conductors of the coaxial waveguide, had a greater influence on the measured result. Eventually, the measured results of the sensor without the isolation layer were more sensitive to pressures. In contrast, the proposed sensor with the isolation layer can reduce the sensitivity of the measurement to the first layer of grain. Consequently, the influence of the pressure on the measurement was reduced and the performance of the proposed method was improved. moisture was measured without pressure. Then, a 1 kg weight (about 10 N pressure) was placed on the sensor and the moisture was measured. The results are shown in Figure 24a. The measured moisture content increased slightly with the increase in pressure and this increase was higher at higher moisture contents. For wheat sample with 25.4% moisture, the measured result with 10 N pressure was larger than that without pressure by 0.7. For moisture below 5.0%, the 10 N pressure did not noticeably affect the measurement. This is mainly because the pressure compressed the grain in the sampler, which made the proportion of grain kernels in the sampler rise and the volume ratio of grain's moisture in the sampler became larger. In addition, grain kernels became softer as moisture increased. The higher the moisture content, the easier these can be compressed, and the more significant is the effect of pressure. Therefore, the pressure had a more obvious influence on the measurement of high moisture grain.
In another aspect, the proposed method was not sensitive to the change of bulk density. Bulk density of grain in the sample holder can be obtained by dividing the mass of grain by the volume of the sample holder. The volume of the sample holder was constant. With 10 N pressures on the sensor, more grain kernels were brought into the sample holder. Consequently, the mass of grain increased, and the bulk density of grain in the sample holder increased as well. With the increase of bulk density, few changes can be observed in Figure 24a. It indicated that the proposed method eliminated the influence of bulk density.
In addition, we also studied the influence of pressure on the measurements using the sensor without the isolation layer. The results are shown in Figure 24b. Compared with Figure 24a, it is obvious that the pressure had a more significant influence on the measurements without the isolation layer. Measuring the wheat sample with 25.4% moisture by using the sensor without isolation layer, the 10 N pressure made the measuring result increase by 1.4, which was two times larger than that with the isolation layer. When 10 N pressures were applied to the sensor without the isolation, the pressures were transmitted to the grain through the end face of the coaxial waveguide. Grain kernels in the region, which was near the end face of the coaxial waveguide, were compressed to a great degree. As a result, the volume rate of the moisture in the region increased larger than other regions. In addition, without the isolation layer, the first layer of grain, which was directly contacted with the inner and outer conductors of the coaxial waveguide, had a greater influence on the measured result. Eventually, the measured results of the sensor without the isolation layer were more sensitive to pressures. In contrast, the proposed sensor with the isolation layer can reduce the sensitivity of the measurement to the first layer of grain. Consequently, the influence of the pressure on the measurement was reduced and the performance of the proposed method was improved.

Influence of the Frequency on the Accuracy of the Measured Results
In the paper, the complex permittivity of grain in the frequency range of 3.1-4.8 GHz was measured. However, only the complex permittivity of a single frequency was adopted by Equation (15) to calculate the moisture content. Since the performance of Equation (15) was varied with frequency, selecting the complex permittivity of the optimal frequency could improve the accuracy. Beside, Different types of grain had the different optimal frequency. Consequently, it was necessary to determine the optimal frequency for each grain type. In the range of 3.1 to 4.8 GHz, the frequency was divided into 18 frequency points in steps of 0.1 GHz. The moisture contents were calculated from the complex permittivity at each frequency point. The maximum absolute errors were counted and the results were shown in Figure 25. When the maximum absolute error reached the minimum, its corresponding frequency was the optimal one. The optimal frequency for wheat, rough rice, and barley was 3.6 GHz, 4.0GHz, and 4.1GHz, respectively. This was the same as calibrating results (Table 2 and Figure 11). Since the UWB radar module measured the wideband reflection coefficient, the complex permittivity of grain obtained was a spectrum from 3.1 to 4.8 GHz. It had two advantages. Firstly, the complex permittivity of the optimal frequency could be chosen to improve the accuracy. Secondly, the method had a good performance for multiple types of grains. Since the grain of different type had the different optimal frequency, measuring complex permittivity of wideband had more opportunity to choose the optimal frequency. (15) to calculate the moisture content. Since the performance of Equation (15) was varied with frequency, selecting the complex permittivity of the optimal frequency could improve the accuracy. Beside, Different types of grain had the different optimal frequency. Consequently, it was necessary to determine the optimal frequency for each grain type. In the range of 3.1 to 4.8 GHz, the frequency was divided into 18 frequency points in steps of 0.1 GHz. The moisture contents were calculated from the complex permittivity at each frequency point. The maximum absolute errors were counted and the results were shown in Figure 25. When the maximum absolute error reached the minimum, its corresponding frequency was the optimal one. The optimal frequency for wheat, rough rice, and barley was 3.6 GHz, 4.0GHz, and 4.1GHz, respectively. This was the same as calibrating results (Table 2 and Figure 11). Since the UWB radar module measured the wideband reflection coefficient, the complex permittivity of grain obtained was a spectrum from 3.1 to 4.8 GHz. It had two advantages. Firstly, the complex permittivity of the optimal frequency could be chosen to improve the accuracy. Secondly, the method had a good performance for multiple types of grains. Since the grain of different type had the different optimal frequency, measuring complex permittivity of wideband had more opportunity to choose the optimal frequency.

Conclusions
In this paper, a novel portable device was designed, fabricated and evaluated to measure grain moisture content fast and accurately, and the following conclusions can be drawn: 1) A novel moisture sensor can be designed by combining the grain sampler and the coaxial waveguide. The inner diameter of the sampler should be designed to make all electromagnetic wave modes attenuate. This allows the measurement procedure to require only a small amount of grain sample, and the interferences of the environment can be avoided. 2) The mode matching method can be used to accurately model the moisture sensor proposed in this paper, and the complex permittivity of grain can be obtained by using the look-up table method. 3) With UWB radar module, a portable broadband reflection coefficient measuring device can be achieved. 4) Compared with the accuracy of moisture measurement literature, the proposed method had better precision in measuring wheat and rough rice. The accuracy of measuring barley moisture was similar to the literature. In addition, the proposed method had the advantages of anti-environment interference and portability compared with the methods in the literature.

Conclusions
In this paper, a novel portable device was designed, fabricated and evaluated to measure grain moisture content fast and accurately, and the following conclusions can be drawn: (1) A novel moisture sensor can be designed by combining the grain sampler and the coaxial waveguide. The inner diameter of the sampler should be designed to make all electromagnetic wave modes attenuate. This allows the measurement procedure to require only a small amount of grain sample, and the interferences of the environment can be avoided. (2) The mode matching method can be used to accurately model the moisture sensor proposed in this paper, and the complex permittivity of grain can be obtained by using the look-up table method. (3) With UWB radar module, a portable broadband reflection coefficient measuring device can be achieved. (4) Compared with the accuracy of moisture measurement literature, the proposed method had better precision in measuring wheat and rough rice. The accuracy of measuring barley moisture was similar to the literature. In addition, the proposed method had the advantages of anti-environment interference and portability compared with the methods in the literature. (5) The pressure on the sensor influenced the measured result, especially for grain with high moisture.
Designing an isolation layer between the grain and the coaxial waveguide remarkably reduced the influence and improved the accuracy. Multiplying e TM−II k at both side of Equation (A7) and integrating in the region of R a ≤ r ≤ R b , 0 ≤ ϕ ≤ 2π , c k can be obtained as Equation (A9) by using the orthogonality of different modes.