## 2 Materials and Methods  
### Modeling  
#### 2.1.1 Theory Consideration  
The relatively mature corn online moisture content sensor is generally a parallel plate capacitor designed based on the dielectric properties of materials, and its structure is modeled in Figure 1a. The measuring cavity is composed of insulating material, the metal plate placed on the outer wall of the cavity is an electrode plate, and the cavity is filled with corn to be measured. The structure shown in Figure 1a is equivalent to a series capacitance model when the edge effect of the capacitance sensor is ignored, as shown in Figure 1b.  
When the corn reaches the state to be measured in the measurement cavity, the output capacitance (C) of sensor is:  
\[C=\frac{S\epsilon_{0}\epsilon_{m}}{d}, \tag{1}\]  
where \(\epsilon_{0}\) is the vacuum dielectric constant, which is 8.85 pF/m [22]; \(\epsilon_{m}\) is the relative dielectric constant of the corn; \(d\) is the distance between the two parallel plates; and \(S\) is the area of plate. The medium between two plates included dry matter, water, and air. The total volume (\(V\)) and the total relative dielectric constant (\(\epsilon_{m}\)) of above three can be expressed, respectively, as:  
\[V=V_{1}+V_{2}+V_{3}, \tag{2}\]  
\[\epsilon_{m}=\frac{V_{1}}{V}\epsilon_{1}+\frac{V_{2}}{V}\epsilon_{2}+\frac{V_ {3}}{V}\epsilon_{3}, \tag{3}\]  
where \(V_{1}\), \(V_{2}\), and \(V_{3}\) are the volume of dry matter, water, and air, respectively; \(\epsilon_{1}\), \(\epsilon_{2}\), and \(\epsilon_{3}\) the relative dielectric constant of these three, respectively. Substituting Equation (3) into Equation (1), the Equation (4) can be obtained:  
\[C=\frac{S\epsilon_{0}}{d}(\frac{V_{1}}{V}\epsilon_{1}+\frac{V_{2}}{V}\epsilon _{2}+\frac{V_{3}}{V}\epsilon_{3}) \tag{4}\]  
The porosity of the filling layer in the measurement cavity is calculated using Equation (5):  
\[p=\frac{V_{3}}{V} \tag{5}\]  
The moisture content of corn feeding into the measurement cavity is calculated as:  
\[M_{d}=\frac{\rho_{2}V_{2}}{\rho_{1}V_{2}}, \tag{6}\]  
where \(M_{d}\) is the moisture content, dry basis, and \(\rho_{1}\) and \(\rho_{2}\) are the density of water and dry matter, respectively.  
Defining \(K_{1}\), and \(K_{2}\) as follows, and substituting Equations (5) and (6) into Equation (4), the Equation (9) can be obtained:  
\[K_{1}=\frac{\rho_{1}}{\rho_{2}}, \tag{7}\]  
Figure 1: Model of a parallel plate capacitor sensor: (**a**) the original model and (**b**) the equivalent model.  
\[K_{2}=\frac{V\rho_{1}}{G}, \tag{8}\]  
\[C=\frac{\varepsilon_{1}+K_{1}M_{d}\varepsilon_{2}}{1+K_{1}M_{d}+(1+Md)K_{2}p}+ \varepsilon\varepsilon_{3}, \tag{9}\]  
where \(G\) is the total mass of corn filled into the measurement cavity, which generally changed little and can be regarded as a constant value under the constraint of the determined installation position of the level sensor. According to Equation (9), the output capacitance of sensor is mainly related to \(M_{d}\), \(p\), \(\varepsilon_{1}\), \(\varepsilon_{2}\), \(\varepsilon_{3}\), \(\rho_{1}\), \(\rho_{2}\), \(V\), and \(G\). Among the above parameters, \(V\), \(\rho_{2}\), and \(G\) were the determined constants; \(\rho_{1}\) is a function depending on \(M_{d}\)[22]; and \(\varepsilon_{1}\), \(\varepsilon_{2}\), and \(\varepsilon_{3}\) are also related to temperature \(T\). Therefore, the feedback capacitance value of the sensor in practical application is a function depending on \(Md\), \(p\), and \(t\). However, the porosity in Equation (9), which is not only affected by the air volume among grains but also by the air volume inside grains [23], is one of the important factors affecting the dielectric properties of materials, especially in online moisture content measurement devices installed to monitor the extremely complex process of industrial corn drying.