Next Article in Journal
Convolutional Neural Network Applications in Fire Debris Classification
Next Article in Special Issue
Design and Optimization of Electronic Nose Sensor Array for Real-Time and Rapid Detection of Vehicle Exhaust Pollutants
Previous Article in Journal
Model Development for Alcohol Concentration in Exhaled Air at Low Temperature Using Electronic Nose
Previous Article in Special Issue
A Microphysiometric System Based on LAPS for Real-Time Monitoring of Microbial Metabolism
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Real-Time Measurement of Moisture Content of Paddy Rice Based on Microstrip Microwave Sensor Assisted by Machine Learning Strategies

1
College of Materials and Environmental Engineering, Hangzhou Dianzi University, Hangzhou 310018, China
2
Department of Biosystems Engineering, Zhejiang University, 866 Yuhangtang Road, Hangzhou 310058, China
*
Authors to whom correspondence should be addressed.
Chemosensors 2022, 10(10), 376; https://doi.org/10.3390/chemosensors10100376
Submission received: 29 June 2022 / Revised: 20 August 2022 / Accepted: 13 September 2022 / Published: 20 September 2022

Abstract

:
Moisture content is extremely imoprtant to the processes of storage, packaging, and transportation of grains. In this study, a portable moisture measuring device was developed based on microwave microstrip sensors. The device is composed of three parts: a microwave circuit module, a real-time measurement module, and software to display the results. This work proposes an improvement measure by optimizing the thickness of paddy rice samples (8–13 cm) and adding the ambient temperatures and the moisture contents (13.66–27.02% w.b.) at a 3.00 GHz frequency. A random forest, decision tree, k-nearest neighbor, and support vector machine were applied to predict the moisture content in the paddy rice. Microwave characteristics, phase shift, and temperature compensation were selected as the input variables to the prediction models, which have achieved high accuracy. Among those prediction models, the random forest model yielded the best performance with highest accuracy and stability (R2 = 0.99, RMSE = 0.28, MAE = 0.26). The device showed a relatively stable performance (the maximum average absolute error was 0.55%, the minimum absolute error was 0.17%, the mean standard deviation was 0.18%, the maximum standard deviation was 0.41%, and the minimum standard deviation was 0.08%) within the moisture content range of 13–30%. The instrument has the advantages of real-time, simple structure, convenient operation, low cost, and portability. This work is expected to provide an important reference for the real-time in situ measurement of agricultural products, and to be of great significance for the development of intelligent agricultural equipment.

1. Introduction

Moisture content is an important index that reflects the freshness, preservation state, and internal quality of agricultural products [1], and it is a key measurement and control parameter in the processes of purchasing, processing, storing, and transporting. High moisture content leads to grain mildew, shortened storage time, and effects on the food taste [2]. Grain moisture content is a crucial factor for the management of harvesting and postharvest operations and is a basis for pricing in the grain trade [3].
The grain moisture content generally is measured by direct-contact methods or indirect-noncontact methods [4]. The direct-contact methods usually employ desiccation or a chemical method to measure the moisture content [5], such as the oven-drying method and the Karl Fisher titration method, which have the advantages of simple steps and high accuracy of the detection result. However, the processes of sample preparation and the long operation of inspection equipment would be occurred, which is not suitable for the real-time or field measurements there [6]. By detecting the variable parameters related to the water content of materials, indirect-noncontact methods, such as the neutron gauge [7], resistance detection [8], the capacitance method [9], near-infrared spectroscopy [10], and the microwave-drying method [11], serve to determine the moisture content in grains. Indirect-contact methods generally have a high measurement speed but usually have their own disadvantages, respectively. For near-infrared spectroscopy, the absorption spectrum varies with the moisture content of the material, and the infrared penetration depth is on the micron level, which means the detection area will be quite small on the surface of samples; however, for agricultural products, the measurement area should be as large as possible, thus results in limited application of the near-infrared method. The capacitance method regards the detected objects as a dielectric material and measures the dielectric constant of the measured objects [12]; however, the results of this method are greatly affected by the environment’s temperature, and the device needs to be recalibrated after a long period of use. The capacitance method demonstrates poor performance for materials with high moisture content and is not a perfect solution for on-line measurement because the capacitive sensor takes a long time to introduce samples between the electrodes [13].
The principle of the microwave method is similar to that of the capacitance method, and it has the advantages of non-destructive detection, high speed, and real-time monitoring [14]. For moisture measurement based on microwaves, the dominant detecting method can be mainly divided into microwave reflection and microwave transmission [15]. One of the advantages of microwave reflection detection is that the integration of signal transmission and reception can simplify the installation; however, the advantage can also turn into a disadvantage, as it causes a low resolution and smaller reflected signals from individual antennae, which need special auxiliary hardware to amplify the signals and improve precision [16]. Applications of microwave transmission on the moisture measurements of peanuts, corn, and soybeans [17,18,19] have been achieved, but the detection equipment based on horn antenna were large and the experiments were inconvenience when carrying on-site. With the development of microstrip antenna sensors in recent years, it is possible to use microstrip antenna sensors instead of a horn antenna to realize microwave signal receiving and transmitting [20] and to design a set of portable real-time detection devices for grain moisture content.
The water molecule in the detected material is a strong dipole, which plays a dominant role in the impact on the dielectric properties compared to the dry matter. Therefore, the moisture content in the detected material can be measured by analyzing the dielectric properties, but the detecting equipment is expensive and complicated. This study converts to directly measure the parameters related to the dielectric properties, such as microwave attenuation and phase shift, to detect the moisture content of the material and to make the detecting equipment portable.
In general, very limited optimization work has been carried out regarding the realization of the on-line measurement of the moisture content of agricultural and food products. In this context, the aims of the present study are: (1) to develop a low-cost portable device for the real-time measurement of paddy rice with a moisture content range of generally 13–30%; (2) to determine the optimal measurement parameters according to experimental objects (microwave characteristics, phase shift, and temperature compensation); and (3) to develop an effective moisture content prediction model by comparing different regression algorithms. This work is expected to provide an important reference for the real-time in situ measurement of other agricultural products and to be of great significance for the development of intelligent agricultural equipment.

2. The Design of the Portable Moisture Content Detecting Device

2.1. The Principle of Microwave Transmission Detection

As a non-contact detecting method, microwave transmission detection has the advantages of a fast detection speed, high applicability, and strong practicability. The detection principle of the microwave transmission method is as follows:
The relationships between attenuation and phase shift and the dielectric properties are shown in Figure 1. The attenuation and phase shift of the microwave signal can be obtained as follows:
Δ A = P inc P tra P ref
Δ φ = φ tra φ inc 2 π n
where Pinc is the incident signal power, dBm; Ptra is the transmitted signal power, dBm; Pref is the reflected signal power, dBm; φinc is the phase of the incident signal, rad; φtra is the phase of the transmitted signal, rad; and N is an integer determined by the thickness of the test sample.

2.2. The Portable Detection Device

2.2.1. The Structure and the Principle

A schematic diagram of the detection device is shown in Figure 2. The device is divided into three sub-modules: (a) the microwave signal transmission-generation module, MSTGM; (b) the real-time measurement module (RTMM) with two microstrip microwave sensors (transmitting and receiving); (c) and the signal receiving–processing module, SRPM. The MSTGM sends a microwave signal at the specified frequency, which goes into the power distributor by the splitter. Two of the same microwave signals are generated after the power splitter. One microwave signal, processed by the low-noise amplifier 2 is translated to the microstrip transmitting antenna in RTMM as the incident signal. The incident signal perpendicularly irradiates the grain samples, a part of which is reflected by the sample surface to form a reflected signal. Due to the reverse cut-off function caused by the isolator, the reflected signal is extremely reduced, and the signal generator is protected. The other part of the microwave incident signal turns into the transmission signal after penetrating the grain samples. The transmission signal, which is received by the microstrip receiving antenna, is transmitted to the radio-frequency port of the in-phase and quadrature mixer (IQ mixer) as the input radio-frequency (RF) input signals. The other signal from the power splitter is amplified by the low-noise amplifier 1 and then enters the local oscillator (LO) of the IQ mixer as the input reference signal.
The microstrip transmitting antenna and microstrip receiving antenna were in close contact with the tested sample during measurement, and the distance between the two antennas changed as the sample cell distance changed. The microwave attenuation data, phase-shift data, and environment temperature data were transmitted to the upper computer via a serial communication protocol. Then, different regression models set in the upper computer train and process the data. The model with the best performance index was integrated into the microcontroller, and the predicted grain moisture content was displayed on the liquid crystal display (LCD) screen in real time.

2.2.2. The Measurement of Attenuation and Phase Shift

The attenuation and phase shift of the microwave signal were derived from the two output signals of the IQ mixer. As shown in Figure 2a, the IQ mixer had a total of four ports: two input ports (RF and LO), and two output ports (I and Q). The microwave signal that did not penetrate the sample to the input port LO was treated as a reference signal; the microwave transmission signal that did penetrate the sample to the input port RF was considered a radio-frequency signal. The IQ mixer generated the identity signal of the radio-frequency signal and the reference signal in the output port I. An orthogonal signal was generated by mixing the radio-frequency signal from the output port Q and the reference signal that has undergone a 90-degree phase-shift transformation. The attenuation and phase shift of the microwave were calculated from the reference signal LO, and the radio-frequency signal RF was calculated from the output signal at the port I end and the output signal at the port Q [21].
The output signals from port I and port Q were direct currents in this study, and the signal processing procedure was same as the work in our preview work [22].

2.3. The Hardware Part of the Device

2.3.1. Circuit Module

The circuit module is shown in Figure 3. The whole device was divided into two layers: Figure 3a shows the superstructure, which was the high-frequency microwave circuit module. Figure 3b shows the lower structure, which was the low-frequency circuit and power module. Figure 3c shows the 3D simulation of the overall structure. The two parts were supported by four copper columns with fixed bolts at each corner. The height distance between the two parts was slightly greater than that of the highest circuit components. This design scheme made the overall structure compact and stable.
In Figure 3a,c, the high-frequency microwave circuit module consisted of an isolator, a power divider, two low-noise amplifiers, and an IQ mixer. The main functions of this part were the transmission of the high-frequency microwave signal, isolation of the unwanted reflected wave signals received from the microstrip transmitting antenna, amplification of the microwave signal, and conversion of the transmission signal received by the microstrip receiving antenna into a low-frequency signal. In Figure 3b,c, the low-frequency circuit and power module in the lower structure consisted of an AD converter, an STM32 module, a power terminal block, and a switching power supply. The main functions of this part were the power supply of the whole device, reception/conversion/processing of low-frequency signals, and conversion of low-frequency signals into attenuation and phase-shift data. This structure effectively separated high- and low-frequency signals from each other and prevented interference, while greatly saving installation space and making the overall device smaller.
The microwave signal generator was DSINSTRUMENTS SG6000L (Suzhou Ruibeis Electronic Technology Co., Ltd., Suzhou, China), whose output frequency ranged from 25 Mhz to 6000 Mhz, and the phase noise is less than −72 dbc. The signal generator’s maximum output power level was over +10 dBm. The size of this part was 7.0 cm × 3.2 cm × 5.5 cm, which is easy to integrate and carry. Marki’s IQ-0205 model was selected as the IQ mixer. The IQ mixer operated in the frequency range of 2000–5000 Mhz and had a maximum conversion loss of 8 dB. Designed with a small size, IQ-0205 is quite convenient for portable device design.

2.3.2. Real-Time Measurement Module

As shown in Figure 4, the microstrip transmitting antenna and the microstrip receiving antenna were the same sizes in the real-time measurement module. Figure 4b shows one sample of a sample cell, and there were six sample containers of the same material, same height, same width, but different lengths, in this experiment, and they were all made by 3D printing.
Figure 4c shows that the real-time measurement module consists of two microstrip antennae, a sample cell, a fixed base, two guide rails, and a four-T antenna fixed frame. Both the fixed base and the T-shaped fixed antenna stand are made by 3D printing.
The two-microstrip antenna sensor GAUA3000M-40M-A (Beijing Gwave Technology Co., Ltd., Beijing, China) operate at 3 Ghz and has a bandwidth of 20 Mhz and a gain of 7 dBi with A coaxial SMA interface. Compared with the common horn antenna, the microstrip antenna has a narrow working bandwidth with a small volume advantage. The size of the microstrip antenna sensor is 80 mm × 80 mm × 1.5 mm, which is very suitable for integration in small-scale equipment.

2.3.3. Integral Structure of the Portable Moisture Detecting Device

As shown in Figure 5, the circuit module and the real-time measurement module are installed in the same cuboid white plastic box. The two modules communicate with each other through the coaxial line. The size of the entire shell is 42 cm × 32 cm × 16 cm. The device is appropriate, lightweight, and easy to carry, thus offering the possibility to measure the moisture content of grains in situ.

2.4. The Software Parts

An STM32F103RBT6 chip (Sichuan Kangwei Technology Co., Ltd., Sichuan, China) was installed as the microcontroller for signal receiving and processing and to realize the functions of the signal AD conversion, attenuation, and phase-shift data calculation, grain moisture content calculation, LCD control, temperature sensor control, and serial communication. The attenuation and phase-shift data were converted into code calculation by Formulas (1)–(6), and the moisture content was calculated by the best regression model selected by the upper system. The AD7606 module (Sichuan Kangwei Technology Co., Ltd., Sichuan, China) was applied to the AD conversion. An SPI communication protocol, a 16-bit analog-to-digital converter (ADC), and an eight-channel synchronous sampling were adopted to obtain a more stable signal compared to the ADC of the STM32, and the frequency of the obtained signal could reach up to 200 kSPS. The real-time ambient temperature data were collected by the DS18B20 (Sichuan Kangwei Technology Co., Ltd., Sichuan, China), which has a small volume and light weight, by separately calculating the integer and decimal digits of the parameters. The organic light-emitting diode (OLED) with the resolution of 128 × 64 was chose as the device screen. The result was displayed on the OLED screen.
The whole program adopted a modular design and was divided into different program modules according to the different functions. The defined peripheral header files only needed to import to the main program, and the whole set worked immediately once the main program was started. If the relevant functions needed modification, the corresponding header files were changed (or replaced) directly, which was quite convenient. The whole program was written in C language, and the code was compiled by the Keil software (Version 5, ARM Germany GmbH, Grasbrunn, Germany). The program flow chart is shown in Figure 6.

2.5. Sample Preparation

The fresh paddy rice (Oryza sativa L.) samples were purchased from a local supermarket (Hangzhou, China), and the initial moisture content of the samples was 13.66%. Before the experiment, all paddy rice was filtered with mesh to remove particles and other matters, and the rice with minimal damage and uniform shape were selected as the final experimental samples. An amount of 500.00 g of the paddy rice sample was weighed for each group, and eight groups were selected in this study. According to the initial moisture content of paddy rice, deionized water (0, 10.88, 29.69, 43.02, 49.94, 64.31, 79.46, and 95.45 g) was added to the eight groups. Then, the samples were sealed in plastic bags and stored in a dry, cool, unventilated environment for 2–3 days. During storage, the paddy rice was fully agitated to absorb as much water as possible for the sample. A standard oven-drying method [23] was applied to detect the moisture content of processed samples (5 g paddy rice was used here), and the results were 13.66, 15.65, 18.20, 20.17, 21.22, 23.21, 25.45, and 27.02% for each group of paddy rice. The eight groups with different moisture contents are shown in Figure 7. To verify the results, two groups of additional samples were prepared with random moisture contents (15.01 and 21.90%); the procedure was the same as for the eight groups of paddy rice above.

2.6. Measurement Procedure and Data Acquisition

The effects of temperature and sample thickness on the signals were considered. The tests under the same temperature with different thicknesses were carried out, as well as the tests under the same thickness with different temperatures. The samples were filled with sample cells in the way of free fall. Before the moisture detection experiment, the conductivity of an empty sample container was tested three times, and the average value was taken as the reference data, which was used to obtain the real attenuation and phase-shift data. The results of the three measurements were averaged. The measured distance between the transmitting antenna and the receiving antenna depended on the thickness of the sample container, and the two antennae were closely connected with the sample container.
The thicknesses of the samples were 8–13 cm, respectively. The sample containers with different thicknesses are shown in Figure 8. All sample containers were made by 3D printing (WESTI Science Park Incubator Co., Ltd., Xi’an, China) with nylon (polyamide material) (WESTI Science Park Incubator Co., Ltd., Xi’an China). During measurement of the samples with different thicknesses, the ambient temperature was 21 °C. During the measurement of the samples with the same thickness, the ambient set temperatures were 15 °C, 20 °C, 25 °C, and 30 °C, respectively. For each measurement, three replicate trials were taken, and the detecting time was set to 5 s. After each measurement, the true values of the samples and the no-load values with on samples and were detected at different temperatures. All the obtained data were translated and transmitted through serial communication, and stored at the upper computer.

3. Results and Discussion

3.1. Eigenvalue Selection

The data obtained from the experiment included attenuation data, phase-shift data, and temperature data. For experiments with different thicknesses, the temperature was constant, and the feature values were attenuation and phase shift. For experiments at different temperatures, the sample thickness was constant, and the temperature was variable. To compensate for the temperature of the model, it was set as the characteristic value in the regression models. Our previous studies have shown that the microwave attenuation values at different frequencies were different for corn samples with different moisture contents [22]. When the microwave frequency was 2–10 Ghz, the attenuation value of samples with a moisture content lower than 29% did not change much, and when moisture content was higher than 29%, only the phase shift signals could distinguish the samples [21,24].
In this study, the microwave signal frequency was 3 Ghz, and the frequency selection source was from our previous work [24]. For the quantitative analysis of the importance of the attenuation and phase shift at 3 Ghz, a random forest was used to analyze the data with different thicknesses, and the final features were selected according to the importance of the feature values given by the random forest regression model. By calculating the contribution value of each feature, the importance of each feature is sorted according to its contribution value when constructing each tree within a random forest model. Usually, the Gini index or OOB error rate can be used to calculate the contribution value. The results are shown in Table 1.
The importance of the phase shift was much greater than that of the attenuation under different thicknesses. The average value of the attenuation under six thicknesses is 10.27%, and the average value of the phase shift is 89.73%. To verify the accuracy of the characteristic importance results given by a random forest, the cross-validation results of the random forest were applied. The input eigenvalues were divided into three cases: attenuation, phase shift, and attenuation + phase shift. The evaluation index took the determination coefficient R2, the mean absolute error (MAE), and the root mean square error RMSE (RMSE), and the results are shown in Figure 9.
Figure 9 demonstrates: When the attenuation data were used as the only input eigenvalue, the average value of R2 under six thicknesses was about 0.6; the average value of the MAE was about 2%, and the average value of the RMSE was about 3%. When the phase-shift data were used as the only input eigenvalue, the average value of R2 was about 0.981, the average value of the MAE was about 0.4%, and the average value of the RMSE was about 0.6%. The model based on phase shift was obviously better than the model based on the attenuation characteristics, which may indicate that the influence of the phase shift on sample moisture content was dominant in this study. When the random forest model is combined with the attenuation and phase shift, the average values of the three indexes performed better than those of the models based on attenuation or phase shift alone. Therefore, the combination of attenuation and phase shift was applied as the input eigenvalue for the final regression model.

3.2. Sample Thickness Selection

The distance between the two antenna sensors was changed by changing the thicknesses of different sample cells, and the optimal sample thickness was decided by the prediction results. The sample thickness was divided into six groups, from 8 to 13 cm, with an interval of 1 cm. The random forest and decision tree have too many parameters to be adjusted and are easy to fall into over-fitting, and the k-nearest neighbor algorithm has the problems of difficult neighbor selection and easy classification error. The multiple linear regression (MLR) was selected to choose the best thickness.
The signal data of 240 samples (five samples for each group × eight groups × six levels of thickness) were used for the MLR model training. As mentioned in Section 2.5, two additional samples were made with random moisture contents to test the trained model; thus, 10 groups of samples were prepared for testing the established MLR model. The moisture content predictions of 180 samples (three samples for each group × 10 groups × six levels of thickness) under the thickness of 8 cm to 13 cm are displayed in Figure 10. Figure 10 shows the true and predicted values of the moisture contents for each sample with different colors.
As shown in Figure 10, when the sample thickness was 8 cm: The R2 value was only 0.887, while the R2 values of other thicknesses were higher than 0.960. The MAE value was higher than 1.5%, while the MAE values of other thicknesses were lower than 0.8%. The RMSE value was higher than 1.6%, while the RMSE values of other thicknesses were lower than 0.9%. It can be concluded that under the thickness of 8 cm, the prediction of moisture contents in paddy rice was the worst. According to the values of R2, MAE, and RMSE, the prediction performance with a 12 cm sample thickness was best among those of 8–13 cm thickness. Thus, the final sample thickness of 12 cm was selected as the best test thickness.

3.3. Temperature Compensation

The ambient temperature has a certain impact on the accuracy of moisture content measurement. Based on the input characteristics determined above and the test thickness (12 cm), tests on four groups with different temperatures (15 °C, 20 °C, 25 °C, and 30 °C, respectively) were carried out respectively. The results are shown in Figure 11.
To reduce the influence that the environment temperature might cause during in situ testing, the temperature data were put into the training model as compensation data. As shown in Figure 11, the R2 values at the four temperatures showed no obvious difference. When the ambient temperature was 20 °C, the MAE and RMSE values were the smallest, indicating that 20 °C might be the best ambient temperature for moisture content detection. Then, the model was verified with a random temperature (18 °C in this work). The results are shown in Figure 12.
Figure 12 shows that before and after the addition of temperature compensation, the improvement in the R2 value was not significant. However, the MAE and RMSE values after adding temperature compensation were lowered obviously. Therefore, it is necessary to compensate the temperature as the characteristic data in the model.

3.4. The Prediction of Moisture Content Based on Four Models

After the eigenvalues, sample thickness, and temperature compensation are all determined, it is necessary to find an algorithm with the best performance to return to the microcontroller as the final model to predict the unknown samples. A random forest, decision tree, k-nearest neighbor, and support vector machine were used to train the data, and the trained models were verified by predicting the new verification samples. The prediction results of the four models are shown in Figure 13.
Figure 13 shows that the results of the three performance indexes of the random forest were better than the other three models, and the performance of the k-nearest neighbor algorithm was the worst (There was a large deviation between the predicted value and the real value of the moisture content in paddy rice.). Therefore, the random forest was chosen as the final model returned to the microprogrammed control unit (MCU) to predict the moisture content in the paddy rice samples.

3.5. The Final Display

The selected model parameters (random forest) were written into the MCU code, and portable moisture detection was applied to detect the moisture content of the rice. Some actual display effects are shown in Figure 14, where “Temp” refers to the ambient temperature measured in real time, “MC” refers to the measured moisture content value, and the measurement is repeated three times.
As shown in Table 2, the maximum average absolute error of the equipment was 0.55%, and the minimum absolute error was 0.17% when compared to the results obtained from the standard drying method; thus, the measurement results from the portable moisture detection device are acceptable. The mean standard deviation was 0.18%, the maximum standard deviation was 0.41%, and the minimum standard deviation was 0.08%, indicating that the measurement results are relatively stable. In practical moisture detection, the content range of rice is generally 13–30%, and content outside the range is of little significance. The prediction result clearly follows the normal distribution, and the accuracy of the moisture measurement is acceptable [25,26]. Therefore, the device can be applied to the detection of grain moisture content.

4. Conclusions

In this study, a novel portable real-time detection device for grain moisture measurement based on microwave microstrip antenna sensors is developed, which can operate in situ with high accuracy. The main conclusions are as follows:
1.
A real-time detection device for paddy rice moisture content was designed, and a microwave measurement module was built to carry out non-destructive measurements. The STM32F103RBT6 chip was designed as the signal receiving and processing module to realize the functions of AD conversion, microwave attenuation and phase-shift calculation, temperature acquisition and display, and screen control and serial port communication. The final moisture content was displayed in real time on the LCD screen.
2.
The attenuation, phase-shift, and temperature data were obtained. The characteristic value of the best combined form was determined using a random forest, after comparison with the performances of decision tree model, k-nearest neighbor model, and support vector machine model. The temperature compensation was added to optimize the model. Finally, the model parameters with the best performance index in the above four algorithms were selected and returned to the single-chip microcomputer to display the measured value of the grain moisture content in real time.
3.
Nine groups of grains with different moisture contents were measured by the detection device. The maximum and minimum average absolute errors of the measurement results were 0.55% and 0.17%, respectively. The maximum standard deviation was 0.41%, and the minimum was 0.08%. The accuracy and stability of the measurement results were within the acceptable range.
In this study, the portable moisture detection device designed for grain moisture content is small, light, highly expansive, and accurate. This work is expected to provide an important reference for the development of real-time measurement of other agricultural products, and to be of great significance for the development of intelligent agricultural equipment and industrial applications. In our future studies, the adaptability of the microwave moisture measurement system for moisture measurement of agricultural products with complex surfaces and shapes, such as tea leaf, soybean, and crop straw, will be investigated.

Author Contributions

Conceptualization, Z.W. and S.Q.; methodology, J.L.; software, J.L.; validation, J.L., S.Q. and Z.W.; formal analysis, S.Q.; investigation, S.Q. and J.L.; resources, Z.W.; data curation, J.L.; writing—original draft preparation, S.Q. and J.L.; writing—review and editing, S.Q. and J.L.; visualization, S.Q. and J.L.; supervision, S.Q. and J.L.; funding acquisition, S.Q. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the National Key R&D Program of China [2019YFE0124600].

Acknowledgments

The authors acknowledge the financial support of the National Key R&D Program of China (2019YFE0124600).

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Besharati, B.; Lak, A.; Ghaffari, H.; Karimi, H.; Fattahzadeh, M. Development of a model to estimate moisture contents based on physical properties and capacitance of seeds. Sens. Actuators A Phys. 2021, 318, 112513. [Google Scholar] [CrossRef]
  2. Du, J.; Lin, Y.; Gao, Y.; Tian, Y.; Zhang, J.; Fang, G. Nutritional Changes and Early Warning of Moldy Rice under Different Relative Humidity and Storage Temperature. Foods 2022, 11, 185. [Google Scholar] [CrossRef] [PubMed]
  3. Risius, H.; Prochnow, A.; Ammon, C.; Mellmann, J.; Hoffmann, T. Appropriateness of on-combine moisture measurement for the management of harvesting and postharvest operations and capacity planning in grain harvest. Biosyst. Eng. 2017, 156, 120–135. [Google Scholar] [CrossRef]
  4. Ramli, N.A.M.; Rahiman, M.H.F.; Kamarudin, L.M.; Zakaria, A.; Mohamed, L. A Review on Frequency Selection in Grain Moisture Content Detection. In Proceedings of the 5th International Conference on Man Machine Systems, Pulau Pinang, Malaysia, 26–27 August 2019; p. 012002. [Google Scholar]
  5. Klomklao, P.; Kuntinugunetanon, S.; Wongkokua, W. Moisture content measurement in paddy. J. Phys. Conf. Ser. 2017, 901, 012068. [Google Scholar] [CrossRef]
  6. Wang, W.C.; Wang, L. Design of Moisture Content Detection System. Phys. Procedia 2012, 33, 1408–1411. [Google Scholar] [CrossRef]
  7. Liu, D.; Zeng, X.-A.; Sun, D.-W. Recent Developments and Applications of Hyperspectral Imaging for Quality Evaluation of Agricultural Products: A Review. Crit. Rev. Food Sci. Nutr. 2015, 55, 1744–1757. [Google Scholar] [CrossRef]
  8. Li, C.; Li, B.; Huang, J.; Li, C. Developing an Online Measurement Device Based on Resistance Sensor for Measurement of Single Grain Moisture Content in Drying Process. Sensors 2020, 20, 4102. [Google Scholar] [CrossRef]
  9. Tinna, A.; Parmar, N.; Bagla, S.; Goyal, D.; Senthil, V. Design and development of capacitance based moisture measurement for grains. Mater. Today Proc. 2021, 43, 263–267. [Google Scholar] [CrossRef]
  10. Peiris, K.H.S.; Bean, S.R.; Chiluwal, A.; Perumal, R.; Jagadish, S.V.K. Moisture effects on robustness of sorghum grain protein near-infrared spectroscopy calibration. Cereal Chem. 2019, 96, 678–688. [Google Scholar] [CrossRef]
  11. Nirmaan, A.M.C.; Rohitha Prasantha, B.D.; Peiris, B.L. Comparison of microwave drying and oven-drying techniques for moisture determination of three paddy (Oryza sativa L.) varieties. Chem. Biol. Technol. Agric. 2020, 7, 1. [Google Scholar] [CrossRef]
  12. Heřmanská, A.; Středa, T.; Chloupek, O. Improved wheat grain yield by a new method of root selection. Agron. Sustain. Dev. 2015, 35, 195–202. [Google Scholar] [CrossRef]
  13. Clarys, P.; Clijsen, R.; Taeymans, J.; Barel, A.O. Hydration measurements of the stratum corneum: Comparison between the capacitance method (digital version of the Corneometer CM 825®) and the impedance method (Skicon-200EX®). Int. Soc. Ski. Imaging (ISSI) 2012, 18, 316–323. [Google Scholar] [CrossRef] [PubMed]
  14. Liu, H.; Liu, H.; Liu, H.; Zhang, X.; Hong, Q.; Chen, W.; Zeng, X. Microwave Drying Characteristics and Drying Quality Analysis of Corn in China. Processes 2021, 9, 1511. [Google Scholar] [CrossRef]
  15. Chen, Z.; Wu, W.; Dou, J.; Liu, Z.; Chen, K.; Xu, Y. Design and Analysis of a Radio-Frequency Moisture Sensor for Grain Based on the Difference Method. Micromachines 2021, 12, 708. [Google Scholar] [CrossRef]
  16. Zhang, W.; Yang, G.; Lei, J.; Liu, C.; Tao, J.; Qin, C. Development of on-line detection device for grain moisture contentusing microwave reflection method. Trans. Chin. Socity Agric. Eng. 2019, 35, 21–28. [Google Scholar]
  17. Taheri, S.; Brodie, G.; Jacob, M.V.; Antunes, E. Dielectric properties of chickpea, red and green lentil in the microwave frequency range as a function of temperature and moisture content. J. Microw. Power Electromagn. Energy 2018, 52, 198–214. [Google Scholar] [CrossRef]
  18. Julrat, S.; Trabelsi, S. Measuring Dielectric Properties for Sensing Foreign Material in Peanuts. IEEE Sens. J. 2019, 19, 1756–1766. [Google Scholar] [CrossRef]
  19. Yigit, E.; Duysak, H. Determination of Flowing Grain Moisture Contents by Machine Learning Algorithms Using Free Space Measurement Data. IEEE Trans. Instrum. Meas. 2022, 71, 1–8. [Google Scholar] [CrossRef]
  20. Gundewar, P.P.; Patel, V.U.; Chaware, T.S.; Askhedkar, A.R.; Raje, R.S.; Subhedar, M.M.; Udgire, V.N. Design of a microstrip patch antenna as a moisture sensor. In Proceedings of the 2019 IEEE Pune Section International Conference, Pune, India, 18–20 December 2019; pp. 1–5. [Google Scholar]
  21. Zhang, J.; Du, D.; Bao, Y.; Wang, J.; Wei, Z. Development of Multifrequency-Swept Microwave Sensing System for Moisture Measurement of Sweet Corn With Deep Neural Network. IEEE Trans. Instrum. Meas. 2020, 69, 6446–6454. [Google Scholar] [CrossRef]
  22. Zhang, J.; Wu, C.; Shao, W.; Yao, F.; Wang, J.; Wei, Z.; Du, D. Thickness-Independent Measurement of Grain Moisture Content by Attenuation and Corrected Phase Shift of Microwave Signals at Multiple Optimized Frequencies. IEEE Trans. Ind. Electron. 2022, 69, 11785–11795. [Google Scholar] [CrossRef]
  23. GB/T21305; Cereal and Cereal Products-Determination of Moisture Content-Routine Reference Method. The China National Standardization Management Committee: Beijing, China, 2007.
  24. Zhang, J.; Bao, Y.; Du, D.; Wang, J.; Wei, Z. OM2S2: On-Line Moisture-Sensing System Using Multifrequency Microwave Signals Optimized by a Two-Stage Frequency Selection Framework. IEEE Trans. Ind. Electron. 2021, 68, 11501–11510. [Google Scholar] [CrossRef]
  25. Tian, L.; Cai, T.; Goetghebeur, E.; Wei, L.J. Model evaluation based on the sampling distribution of estimated absolute prediction error. Biometrika 2007, 94, 297–311. [Google Scholar] [CrossRef]
  26. Vera Zambrano, M.; Dutta, B.; Mercer, D.G.; MacLean, H.L.; Touchie, M.F. Assessment of moisture content measurement methods of dried food products in small-scale operations in developing countries: A review. Trends Food Sci. Technol. 2019, 88, 484–496. [Google Scholar] [CrossRef]
Figure 1. Detection principle of microwave transmission method: ε’ is the dielectric constant; ε” is the loss factor; Δ φ is the phase shift, rad; λ0 is the wavelength, m; D is the sample thickness, m; Δ A is the attenuation, dB.
Figure 1. Detection principle of microwave transmission method: ε’ is the dielectric constant; ε” is the loss factor; Δ φ is the phase shift, rad; λ0 is the wavelength, m; D is the sample thickness, m; Δ A is the attenuation, dB.
Chemosensors 10 00376 g001
Figure 2. Schematic diagram of detection device: (a) a microwave signal transmission-generation module; (b) a real-time measurement module; (c) a signal receiving-processing module.
Figure 2. Schematic diagram of detection device: (a) a microwave signal transmission-generation module; (b) a real-time measurement module; (c) a signal receiving-processing module.
Chemosensors 10 00376 g002
Figure 3. Circuit module: (a) high-frequency microwave circuit module; (b) low-frequency circuit power module; (c) 3D simulation of the whole module; ①. Microwave signal generator; ②. Isolator; ③. Power splitter; ④. Low-noise amplifier 2; ⑤. Low-noise amplifier 1; ⑥. IQ mixer; ⑦. AD converter; ⑧. Microcontroller; ⑨. Power terminal block; ⑩. Switching power supply.
Figure 3. Circuit module: (a) high-frequency microwave circuit module; (b) low-frequency circuit power module; (c) 3D simulation of the whole module; ①. Microwave signal generator; ②. Isolator; ③. Power splitter; ④. Low-noise amplifier 2; ⑤. Low-noise amplifier 1; ⑥. IQ mixer; ⑦. AD converter; ⑧. Microcontroller; ⑨. Power terminal block; ⑩. Switching power supply.
Chemosensors 10 00376 g003
Figure 4. Real-time measurement module: (a) microstrip antenna; (b) sample cell; (c) real-time measurement module; ①, transmitting antenna; ②, receiving antenna; ③, fixed base; ④, guide rail; ⑤, antenna fixing frame; ⑥, measuring sample.
Figure 4. Real-time measurement module: (a) microstrip antenna; (b) sample cell; (c) real-time measurement module; ①, transmitting antenna; ②, receiving antenna; ③, fixed base; ④, guide rail; ⑤, antenna fixing frame; ⑥, measuring sample.
Chemosensors 10 00376 g004
Figure 5. Integral measuring device: (a) inner structure; (b) external structure.
Figure 5. Integral measuring device: (a) inner structure; (b) external structure.
Chemosensors 10 00376 g005
Figure 6. Program flow chart.
Figure 6. Program flow chart.
Chemosensors 10 00376 g006
Figure 7. Paddy rice samples with different moisture contents.
Figure 7. Paddy rice samples with different moisture contents.
Chemosensors 10 00376 g007
Figure 8. Sample containers with different thicknesses.
Figure 8. Sample containers with different thicknesses.
Chemosensors 10 00376 g008
Figure 9. Feature importance verification: (a) the results based on attenuation; (b) the results based on phase shift; (c) the results based on attenuation and phase shift.
Figure 9. Feature importance verification: (a) the results based on attenuation; (b) the results based on phase shift; (c) the results based on attenuation and phase shift.
Chemosensors 10 00376 g009
Figure 10. Prediction results under different sample thicknesses: (a) with the thickness of 8 cm; (b) with the thickness of 9 cm; (c) with the thickness of 10 cm; (d) with the thickness of 11 cm; (e) with the thickness of 12 cm; (f) with the thickness of 13 cm.
Figure 10. Prediction results under different sample thicknesses: (a) with the thickness of 8 cm; (b) with the thickness of 9 cm; (c) with the thickness of 10 cm; (d) with the thickness of 11 cm; (e) with the thickness of 12 cm; (f) with the thickness of 13 cm.
Chemosensors 10 00376 g010
Figure 11. Performance results of different temperature test sets: (a) results at 15 °C ambient temperature; (b) results at 20 °C ambient temperature; (c) results at 25 °C ambient temperature; (d) results at 40 °C ambient temperature.
Figure 11. Performance results of different temperature test sets: (a) results at 15 °C ambient temperature; (b) results at 20 °C ambient temperature; (c) results at 25 °C ambient temperature; (d) results at 40 °C ambient temperature.
Chemosensors 10 00376 g011
Figure 12. Performance index results before and after adding temperature compensation: (a) results before temperature compensation, (b) results after temperature compensation.
Figure 12. Performance index results before and after adding temperature compensation: (a) results before temperature compensation, (b) results after temperature compensation.
Chemosensors 10 00376 g012
Figure 13. Prediction results of four algorithms: (a) results based on random forest; (b) results based on decision tree; (c) results based on k-nearest neighbor; (d) results based on support vector machine.
Figure 13. Prediction results of four algorithms: (a) results based on random forest; (b) results based on decision tree; (c) results based on k-nearest neighbor; (d) results based on support vector machine.
Chemosensors 10 00376 g013
Figure 14. Display of actual moisture content measurement results.
Figure 14. Display of actual moisture content measurement results.
Chemosensors 10 00376 g014
Table 1. Feature importance.
Table 1. Feature importance.
Thickness (cm)The Importance of Feature Values (%)
Attenuation (dB)Phase Shift (m)
816.8483.16
96.5593.45
107.4392.57
119.2190.79
127.9492.06
138.8191.19
Table 2. Comparison of measurement results of samples with different moisture content.
Table 2. Comparison of measurement results of samples with different moisture content.
No.The Moisture Content Measured by the Standard Drying Method ± SD(%)The Measured Content Measured by the Portable Moisture Detection ± SD(%)MAE (%)
127.02 ± 0.1027.57 ± 0.100.55
225.58 ± 0.2325.32 ± 0.100.26
323.21 ± 0.1022.94 ± 0.080.27
421.45 ± 0.2621.47 ± 0.410.28
520.17 ± 0.1420.22 ± 0.250.17
619.19 ± 0.1218.74 ± 0.110.45
718.20 ± 0.1117.77 ± 0.100.43
815.65 ± 0.1515.39 ± 0.150.26
913.66 ± 0.2013.64 ± 0.230.17
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Liu, J.; Qiu, S.; Wei, Z. Real-Time Measurement of Moisture Content of Paddy Rice Based on Microstrip Microwave Sensor Assisted by Machine Learning Strategies. Chemosensors 2022, 10, 376. https://doi.org/10.3390/chemosensors10100376

AMA Style

Liu J, Qiu S, Wei Z. Real-Time Measurement of Moisture Content of Paddy Rice Based on Microstrip Microwave Sensor Assisted by Machine Learning Strategies. Chemosensors. 2022; 10(10):376. https://doi.org/10.3390/chemosensors10100376

Chicago/Turabian Style

Liu, Jin, Shanshan Qiu, and Zhenbo Wei. 2022. "Real-Time Measurement of Moisture Content of Paddy Rice Based on Microstrip Microwave Sensor Assisted by Machine Learning Strategies" Chemosensors 10, no. 10: 376. https://doi.org/10.3390/chemosensors10100376

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop