A method for online moisture monitoring of grain in grain depot based on millimeter wave radar
By using millimeter wave radar and time domain convolutional neural network (TCN) in the grain warehouse to conduct online detection of grain moisture content, the problem of insufficient efficiency and accuracy of grain moisture detection in the existing technology is solved, and efficient and accurate grain moisture monitoring is achieved.
Patent Information
- Application Number
- CN202210310306.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-28
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2042-03-28
AI Technical Summary
It is difficult for the existing technology to achieve efficient and accurate online testing of grain moisture in grain warehouses, especially in storage environments.
The online moisture monitoring method based on millimeter wave radar is adopted, and the feature extraction and classification prediction of millimeter wave radar echo signal is used to perform feature extraction and classification prediction of millimeter wave radar echo signal to achieve real-time monitoring of grain moisture content.
It realizes efficient and accurate monitoring of grain moisture content in the grain warehouse environment, reduces detection costs and complexity, and is suitable for online inspection needs in warehousing scenarios.
Smart Images

Figure CN114646649B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of radar signal analysis and image recognition, and in particular to an online moisture monitoring method for grain in a grain depot based on millimeter wave radar. Background Art
[0002] Grain moisture content is an important detection parameter in crop production, transportation, and barn storage. Grain moisture content is an important indicator for evaluating crop status. During the storage process, excessive moisture content inside crops will cause the growth of microorganisms inside the grain, causing mildew, insects and other deterioration reactions. Too low moisture content will destroy the internal structure of crops and reduce nutritional value. Therefore, in the production, transportation, and storage of grain, there is an urgent need for a method that can accurately and real-time detect the moisture content of grain to strictly monitor its moisture content.
[0003] The existing grain moisture detection technologies are mainly divided into resistance method, capacitance method, near-infrared spectroscopy multivariate calibration modeling method, nuclear magnetic resonance method, etc. Among them, the resistance method and capacitance method are relatively cheap, but the accuracy is low and the stability is poor; while the instrument and optical path construction process in near-infrared spectroscopy and nuclear magnetic resonance methods are complicated, the instrument components are expensive, and they are more suitable for accurate moisture measurement in laboratory scenarios.
[0004] Existing studies have shown that water molecules will show sensitivity to electromagnetic waves under the polarization of specific frequency bands (microwave and millimeter wave bands) of electromagnetic wave fields, and millimeter wave band electromagnetic waves have been proven in existing literature and experimental scenarios to be used for moisture content detection in food and crops. The original echo signal collected by the millimeter wave radar is a mixed baseband signal of a high-frequency sinusoidal transmission signal modulated by a carrier and a received signal, which is related to time changes and has a certain periodicity. Therefore, a time domain convolutional neural network can be used to extract time domain features and perform network modeling.
[0005] Temporal Convolutional Networks (TCN) is a general architecture for convolutional sequence prediction. As a new sequence analysis model, TCN combines the advantages of RNN and CNN, requiring less memory, having more stable gradients and more flexible receptive fields. There are two main features: 1) There is a causal relationship between the layers of the convolutional network, which means that there is no information loss from the future to the past; 2) The architecture can be scalable to any length, and can obtain sequences of any length and map them to output sequences of the same length.
[0006] TCN can be seen as a combination of one-dimensional fully convolutional neural networks and causal convolution. On the one hand, the idea of causal convolution can be used to achieve the purpose of "no missed connections". The output of the convolution layer at time t is only convolved with the elements of the current layer and the previous layer. On the other hand, the one-dimensional fully convolutional neural network uses zero padding to keep each output layer the same size as the input layer. At the same time, TCN solves the problem of reverse training by using dilated convolution. Residual blocks have been proven to be an effective method for training deep networks, which allows the network to transfer information in a cross-layer manner. Finally, TCN constructs a residual block to replace a layer of convolution. A residual block contains two layers of convolution kernel nonlinear mapping. WeightNorm and Dropout are added to each layer to make the network parameters more generalized and regularized. Summary of the invention
[0007] The technical problem to be solved by the present invention is to provide a method for online moisture monitoring of grain in a granary based on millimeter wave radar, so as to perform online moisture detection of grain in a granary with both detection efficiency and accuracy.
[0008] In order to solve the above technical problems, the present invention provides a method for online moisture monitoring of grain in a grain depot based on millimeter wave radar, and the specific process is as follows:
[0009] The millimeter wave radar is placed in the grain storage pile of the grain depot, and the detection sampling is carried out according to the five-point sampling rule to obtain the original echo data of the ADC sampling of each sampling point and send it to the host computer for data preprocessing, and then the preprocessed data Dc is input into the grain moisture content classification network for classification prediction, and the moisture prediction content of each sampling point is output and the results are displayed and stored in the host computer;
[0010] The data preprocessing is to obtain the sampling data Dt after the original echo data sampled by the ADC is subjected to the frequency modulation pulse period average sampling operation; at the same time, the original echo data sampled by the ADC is subjected to the Fourier transform frequency domain feature extraction operation to obtain the frequency domain feature, and then subjected to the frequency modulation pulse period average sampling operation to obtain the sampling data Df; then the sampling data Dt and the sampling data Df are spliced on the frequency modulation pulse number dimension to obtain the preprocessed data Dc;
[0011] The grain moisture content classification network includes a TCN-based time domain convolutional network and a multi-layer perceptron that are connected in sequence.
[0012] As an improvement of the method for online moisture monitoring of grain in a grain depot based on millimeter wave radar of the present invention:
[0013] The frequency modulation pulse period average sampling is specifically as follows: the average of the same sampling point of every 16 frequency modulation pulse periods is calculated using formula (1):
[0014]
[0015] in, is the average value of the sampling points of every 16 frequency modulation pulse cycles, S n is the value of the sampling point corresponding to the nth frequency modulation pulse period within each period of calculating the mean value;
[0016] The original data dimension of each frame of each category in the original echo data sampled by the ADC is 256*4*512. After formula (1), the processed data with a dimension of 16*4*512 is obtained. Then, the processed data with a dimension of 16*4*512 is spliced and expanded in the channel dimension (4) and the sampling point dimension (512) to obtain the sampled data Dt.
[0017] As a further improvement of the method for online moisture monitoring of grain in a grain depot based on millimeter wave radar of the present invention:
[0018] The Fourier transform frequency domain feature extraction is to perform a finite-length discrete Fourier transform on 512 sampling points of the original echo data sampled by the ADC according to formula (2) to obtain processed data with a dimension of 256*4*512;
[0019]
[0020] Among them, X(m) represents the data after discrete Fourier transform, X(n) represents the digital signal sampled by ADC, and N is the number of periodic points for discrete Fourier transform.
[0021] As a further improvement of the method for online moisture monitoring of grain in a grain depot based on millimeter wave radar of the present invention:
[0022] The training process of the grain moisture content classification network is as follows: collect N groups of grain samples with moisture contents arranged in equal intervals, use millimeter wave radar to collect 100 frames of original echo data of each group of grain samples, and use the moisture content of each group as the label of the 100 frames of original echo data of the group, so as to construct a data set for training and testing; then obtain the preprocessed data Dc obtained by the data preprocessing of the data set, and randomly divide the preprocessed data Dc into a training data set D_train and a test data set D_test according to a ratio of 8:2;
[0023] The grain moisture content classification network is trained using the training data set D_train, the mean square error is used as the loss function, and the Adam optimizer is used for network parameter learning; the network parameter learning rate Learning_rate is set to 0.00025, 16 groups of data are input for each batch, and 1000 epochs are iterated for training;
[0024] The test data set D_test is tested every 100 epochs, and the prediction error is calculated using the MSE loss function. If the MSE calculated on the current test data set D_test is the historical minimum, the current network parameter model file is saved. After completing the training and testing steps of 1000 epochs, the network model parameter file corresponding to the minimum MSE value calculated on the test data set D_test in history is taken as the network parameter model file of the grain moisture content classification network.
[0025] As a further improvement of the method for online moisture monitoring of grain in a grain depot based on millimeter wave radar of the present invention:
[0026] The TCN time domain convolutional network is the first layer of the grain moisture content classification network. The number of filters is 64, the kernel size of each convolutional layer is 3, the number of residual block stacks used is 2, and the expansion list is [1, 2, 4, 8...2 n ];
[0027] The multi-layer perceptron is the second to fifth layers of the grain moisture content classification network. The second to fourth layers are all fully connected layers, and each layer is followed by a ReLU activation function. The second layer has an input dimension of 32*1024 and an output dimension of 1024; the third layer has an input dimension of 1024 and an output dimension of 256; the fourth layer has an input dimension of 256 and an output dimension of 64; the fifth layer is the network output layer, and the activation function uses Softmax, with an input dimension of 64 and an output dimension of 10. As a further improvement of the grain online moisture monitoring method based on millimeter wave radar of the present invention:
[0028] The millimeter wave radar is arranged in a glass cylinder, with the plane where the transmitting antenna of the millimeter wave radar is located facing the food outside the cylinder, and the millimeter wave radar is separated from the four walls of the cylinder;
[0029] The five-point sampling rule is to divide the grain pile into three storage layers: upper, middle and lower. Each storage layer is approximately a square of 50 square meters. Five sampling points are taken at the upper left, lower left, upper right, lower right and middle of the square, and the millimeter wave radar is respectively set at the five sampling points.
[0030] The beneficial effects of the present invention are mainly reflected in:
[0031] 1. The present invention utilizes the advantage of high sensitivity of millimeter wave radar sensors to moisture detection and applies it to actual storage scenarios, overcoming the complexity and labor cost of sampling and testing or drying measurements at different areas and points in grain warehouse laboratory scenarios;
[0032] 2. The present invention utilizes Fourier transform to extract the frequency domain phase signal of radar wave, and utilizes time domain convolution network to perform feature extraction on radar wave baseband signal, which can comprehensively extract frequency domain features and time domain features in radar wave, provide high-quality data features for the grain moisture content classification network of the present invention, and establish a set of grain moisture online detection method that takes into account detection efficiency and accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 It is a flow chart of the method for online moisture monitoring of grain in a grain depot based on millimeter wave radar of the present invention;
[0034] Figure 2 This is a schematic diagram of a millimeter wave radar placed in a grain pile;
[0035] Figure 3 This is a schematic diagram of the original data frame structure of the millimeter wave radar;
[0036] Figure 4 This is a visualization of the millimeter-wave radar ADC sampling data. DETAILED DESCRIPTION
[0037] The present invention is further described below in conjunction with specific embodiments, but the protection scope of the present invention is not limited thereto:
[0038] Embodiment 1,
[0039] Taking the monitoring of wheat moisture as an example, the national standard for wheat moisture content is 12.5%, which is called safe grain; technicians need to use a hand-controlled mechanical sampling machine to sample every 50 square meters of grain surface in the upper, middle and lower grain storage layers in the grain storage pile every half a month according to the 5-point sampling rule (that is, the 50-square-meter horizontal plane is regarded as a square with a length of about 7m and a width of about 7m, and five sampling points are taken at the upper left, lower left, upper right, lower right and middle of the square respectively) and transport it to the laboratory scene for testing using a moisture detector. When the moisture content of wheat exceeds 13%, it is called semi-safe grain, and the sampling frequency of the above sampling process needs to be increased to once a week. When the moisture content of wheat exceeds 13.5%, it is called dangerous grain, and the above sampling test needs to be performed once a day until the moisture content of the wheat returns to the normal range or is damaged and cannot be stored. Therefore, according to the above detection specifications: the online moisture monitoring method of grain in a grain depot based on millimeter wave radar of the present invention, such as Figure 1 As shown in the figure, the online moisture detection of wheat in the grain warehouse is implemented according to the following steps:
[0040] S1. Millimeter wave radar and sampling data structure
[0041] S1.1. The sensor used in this embodiment is the development board CAL77S244-AB based on an Alps, 4T4R, 77 / 79GHz, Radar SoC millimeter-wave radar chip designed and produced by Calterah Microelectronics Technology Co., Ltd. CAL77S244-AB is an automotive-grade fully integrated millimeter-wave radar SoC (package integrated antenna), which has 4 built-in transmit channels and integrated phase shifters, as well as 4 receive channels and integrated power saturation detectors. The on-chip antenna uses an integrated antenna array in the package to support horizontal and pitch detection; the generation method of the FMCW (frequency modulated continuous wave) waveform generator can be customized by the user, supporting automatic gain control, frame interleaving and other functions. Define the waveform generator as a Chirp in a linear frequency modulation pulse (the time period of the frequency sweep change).
[0042] The millimeter-wave radar is set to the transmission mode, and the waveform generator of the millimeter-wave radar has a sweep start frequency of 76Ghz and a sweep end frequency of 81Ghz. Electromagnetic waves are transmitted in the normal transmission mode, and after being reflected and scattered by the wheat in the grain warehouse, the original echo data is obtained in the receiving channel.
[0043] S1.2 Data structure of raw echo data
[0044] The data structure of each frame of the original echo data is as follows: Figure 3 As shown in the figure, the outermost layer Cxxx represents each Chirp (linear frequency modulation pulse) and its corresponding label. Each frame of raw echo data contains 256 Chirps, that is, 256 samples of the same linear frequency modulation pulse cycle; the middle layer Rxxx represents the data of each receiving channel, which is composed of Figure 3 It can be seen that there are four ADC sampling channels R0, R1, R2 and R3; the innermost layer Sxxx represents the ADC sampling data of the baseband signal, and it can be seen that each linear frequency modulation pulse cycle contains 512 sampling points. Finally, the original data of each ADC sampling the voltage signal (-0.8V-0.8V) is a 13-bit signed integer, which is packaged with a first sign bit and the last two bits are filled with zeros to become a 16-bit signed integer data. Therefore, the data dimension of each frame of raw echo data is 256*4*512; the data of 512 sampling points is 16-bit signed integer data.
[0045] S2. Build and train a grain moisture content classification network
[0046] S2.1. Constructing datasets for training and testing
[0047] A certain amount of wheat is collected, first dried to the driest state and then divided into several groups, then different amounts of water are added to each group of wheat, and after the water is absorbed by the wheat grains, several groups of wheat samples with the same volume and different moisture contents are obtained; the following operations are performed on each group of wheat samples:
[0048] 1) Measure the radar signal waveform under the current moisture content state and record it:
[0049] Set the millimeter-wave radar to the transmission mode. The waveform generator of the millimeter-wave radar has a sweep start frequency of 76Ghz and a sweep end frequency of 81Ghz. When electromagnetic waves are transmitted in the normal transmission mode, the original echo data sampled by ADC can be obtained in the receiving channel after being reflected and scattered by wheat. ADC refers to a device that converts continuous analog signals into discrete digital signals.
[0050] 2) Place each group of wheat samples in a drying box for drying, and compare the precise mass of the wheat before and after drying to obtain the precise true moisture content of the group of wheat. The actual true moisture content is classified into the range of ±N*0.5 (N is a positive integer) of the standard moisture content of safe wheat grain according to the principle of proximity, and the standard moisture content is used as the true label of the training data corresponding to the group of wheat.
[0051] The operation was repeated in this way to prepare ten groups of wheat samples with moisture contents ranging from 10% to 14.5% (with a gradient of 0.5%), as well as the original echo data of ADC sampling at the corresponding moisture contents.
[0052] Therefore, the data used for training and testing are the original echo data sampled by ADC with true labels, where the true labels are 10 values evenly distributed around the sensitive monitoring point (12.5%) of wheat moisture content, that is, 10 classification values of moisture content prediction, and each moisture content point corresponds to the collection of 100 frames of original echo data, that is, the original data dimension of ADC sampling is 10*100*256*4*512, where 10 is the number of categories, 100 is the number of data frames per category, 256 is the number of linear frequency modulation pulse cycles, 4 is the number of antenna receiving channels, and 512 is the number of sampling points of each antenna receiving channel per linear frequency modulation pulse cycle. The detailed description of the data set used for training and testing is shown in Table 1 below:
[0053] Table 1. Dataset description
[0054]
[0055] S2.2 Data Preprocessing
[0056] The original echo data sampled by the ADC in the data set established in step S2.1 is subjected to the frequency modulation pulse period mean sampling operation to obtain the sampling data Dt; at the same time, the frequency domain features obtained by the original echo data sampled by the ADC are subjected to the Fourier transform frequency domain feature extraction operation, and then the sampling data Df is obtained after the frequency modulation pulse period mean sampling operation; finally, the sampling data Dt and the sampling data Df are spliced to obtain the final pre-processed data Dc.
[0057] 1) Frequency modulation pulse period average sampling:
[0058] The visualization of the sampling data of the four ADC sampling channels of the millimeter wave radar is as follows: Figure 4 As shown, the two horizontal axes represent the sampling point number axis and the frequency modulation pulse cycle number axis respectively, and the vertical axis represents the quantization amplitude of the ADC sampling point amplitude. In order to reduce the data dimension for feature compression, the data dimension is reduced by calculating the data mean: in the frequency modulation pulse cycle number dimension, it is assumed that the baseband signal waveform will not change in a very short time, so the formula (1) is used to calculate the mean of the same sampling point for every 16 frequency modulation pulse cycles. In this way, the original data dimension of each category and each frame in the original echo data is 256*4*512. After calculating the mean, the processed data with a dimension of 16*4*512 can be obtained.
[0059]
[0060] in To obtain the average value of the sampling points of every 16 frequency modulation pulse cycles, S n The value of the sampling point corresponding to the nth frequency modulation pulse period in each period of calculating the mean value.
[0061] Then, the processed data of 16*4*512 dimensions are concatenated and expanded in the channel dimension (4) and the sampling point dimension (512) to obtain preprocessed data of 16*2048 dimensions, which is recorded as sampling data Dt.
[0062] 2) Fourier transform frequency domain feature extraction:
[0063] Since the presence of moisture in grains will cause the frequency and phase of millimeter waves to change during transmission, it is necessary to obtain the frequency and phase characteristic information of the original radar wave through Fourier transform. The original echo data sampled by ADC is transformed through Fourier transform to obtain frequency domain phase information, which can comprehensively extract the frequency domain characteristics and time domain characteristics of the radar wave, and provide high-quality data features for the grain moisture content classification network. The original data dimension of each category and each frame in the original echo data sampled by ADC is 256*4*512. In the sampling point dimension, finite-length discrete Fourier transform is performed on 512 sampling points according to formula (2) to obtain processed data with 256*4*512 dimensions.
[0064]
[0065] Among them, X(m) represents the frequency domain characteristics of the data after discrete Fourier transformation, that is, the original echo data sampled by ADC, x(n) represents the digital signal sampled by ADC, and N is the number of periodic points for discrete Fourier transformation.
[0066] In order to reduce the amount of data, the discrete Fourier transform is used to obtain 256*4*512 dimensional data, and then the frequency modulation pulse period mean sampling operation is performed according to the description in S401 and formula (1) to obtain 16*2048 dimensional preprocessed data, which is recorded as sampling data Df.
[0067] 3) Data splicing: The obtained sampling data Dt and the sampling data Df are spliced. Since the data dimensions of the sampling data Dt and the sampling data Df are both 16*2048, the data are spliced on the frequency modulation pulse dimension to obtain the preprocessed data Dc, whose data dimension is 32*2048.
[0068] The preprocessed data Dc is randomly divided into a training data set D_train and a test data set D_test in a ratio of 8:2.
[0069] S2.3, construct a grain moisture content classification network based on TCN time domain convolutional network and multi-layer perceptron;
[0070] The structure of the grain moisture content classification network is shown in Table 2, which includes a TCN time-domain convolutional network and a multi-layer perceptron network connected in sequence.
[0071] Table 2 Moisture content classification network structure based on time domain convolution TCN network and multi-layer perceptron
[0072]
[0073]
[0074] In the first layer of the network, a TCN time-domain convolutional network is set up to extract time-domain features. The TCN time-domain convolutional network is built based on reference 1 (reference 1: Bai S, Kolter JZ, Koltun V. An empirical evaluation of generic convolutional and recurrent networks for sequence modeling [J]. arXiv preprint arXiv: 1803.01271, 2018.). The number of filters of the TCN time-domain convolutional network is 64, the kernel size of each convolutional layer is 3, the number of residual block stacks used is 2, and the expansion list is [1, 2, 4, 8...2 n ]; The purpose of this layer is to extract the time domain variation characteristics in the radar wave baseband time domain signal.
[0075] The multilayer perceptron network includes the second to fifth layers: the second to fourth layers are set as three fully connected layers, where the second layer has an input dimension of 32*1024 and an output dimension of 1024; the third layer has an input dimension of 1024 and an output dimension of 256; the fourth layer has an input dimension of 256 and an output dimension of 64, and each layer is followed by a ReLU activation function. The role of the ReLU activation function is to introduce the rectified linear unit into the training of the multilayer perceptron network. Due to its good gradient characteristics, it plays a positive role in the convergence of the deep network. The definition of the ReLU function is shown in formula (3):
[0076]
[0077] Among them, x represents the value of each output unit.
[0078] The fifth layer is the network output layer, which outputs the prediction of the moisture content classification. Its input dimension is 64, and its output dimension is 10, representing the probability prediction value of each classification output. The activation function uses Softmax to ensure that the sum of all output neurons is 1.0, which is generally a probability value less than 1, so that each output value can be compared intuitively. The activation function formula is:
[0079]
[0080] Among them, e i Represents the output value of the i-th node, and n is the number of output nodes in the last layer, that is, the number of classification categories.
[0081] S2.4 Model Training
[0082] The grain moisture content classification network constructed in step S2.3 is trained on the training data set D_train obtained in step S2.2. The loss function uses the mean squared error (MSE) to calculate the error between the network prediction value and the true value of the label. The calculation formula of MSE is:
[0083]
[0084] Among them, y i is the true value of the label, is the network prediction value, and m is the total number of samples.
[0085] The Adam optimizer is used for network parameter learning. The network parameter learning rate Learning_rate is set to 0.00025, and 16 sets of data are set for each batch to input the network for training. The training is iterated for 1000 epochs. During the training process, every 100 epochs need to be tested on the test data set D_test obtained in step S2.2. The MSE loss function is used to calculate the prediction error of the network on the test data set D_test. If the MSE calculated on the current test data set D_test is the historical minimum value (that is, the current optimal value predicted by the network model), the current network parameter model file is saved.
[0086] After iterating 1000 epochs of training and testing steps, the network model parameter file corresponding to the minimum MSE value calculated on the test data set D_test in the past is taken as the network parameter model file of the grain moisture content classification network that can be used online.
[0087] S3, online use
[0088] The SoC of the CAL77S244-AB millimeter-wave radar can be regarded as a rectangular circuit board, which fixes the millimeter-wave radar in the middle of a small glass cylinder in an internal manner. Figure 2 As shown in the figure, the plane where the transmitting antenna of the millimeter-wave radar is located is facing the grain outside the cylinder, and the millimeter-wave radar is kept at a certain distance from the four walls of the cylinder as the detection space; according to the 5-point sampling rule: each grain storage pile is divided into three storage layers: upper, middle and lower. Each storage layer is approximately squared according to 50 square meters. The glass cylinder with the millimeter-wave radar is placed in each approximate square according to the 5-point rule for detection sampling. The original echo data of the ADC sampling of each sampling point is collected and sent to the host computer for processing;
[0089] Then, in the upper computer, data preprocessing is performed on the original echo data sampled by ADC at each sampling point in turn according to step S2.2: the original echo data sampled by ADC is subjected to the frequency modulation pulse period mean sampling operation to obtain the sampling data Dt; at the same time, the original echo data sampled by ADC is subjected to the Fourier transform frequency domain feature extraction operation to obtain the frequency domain feature, and then subjected to the frequency modulation pulse period mean sampling operation to obtain the sampling data Df; finally, the sampling data Dt and the sampling data Df are spliced in the frequency modulation pulse number dimension to obtain the final preprocessed data Dc.
[0090] The preprocessed data Dc is input into the grain moisture content classification network that can be used online in step 2.4 for classification prediction, and the predicted moisture content of wheat at each sampling point is output and the results are displayed and stored in the host computer.
[0091] Experiment 1:
[0092] In order to verify the detection effect of the millimeter wave radar-based grain moisture monitoring method for grain depots proposed in the present invention, three groups of wheat scene comparison experiments were conducted in this experiment, namely:
[0093] 1) Room temperature 20℃, wheat bulk density 770kg / m 3 ;
[0094] 2) Room temperature 20℃, wheat bulk density 800kg / m 3 ;
[0095] 3) Room temperature 25℃, wheat bulk density 770kg / m3
[0096] In order to achieve room temperature control, a constant temperature box was used to place the wheat. Then, three groups of experimental data sets of wheat scenes were constructed using the method of step 2.1 in Example 1. Three algorithms were used to compare the effects of each group of experimental data sets:
[0097] 1. Standard Support Vector Machine Prediction Model (SVM)
[0098] Preprocessing of the experimental data set of each group: For the data of the four channels of the millimeter-wave radar ADC, the average is taken in the dimension of the number of sampling points to obtain 4*256 data, and then the four-channel data is concat (connected) to obtain the preprocessed data of 1*1024 dimension;
[0099] The support vector machine prediction model (SVM) cited the SVM model of reference 2 (Cortes C, Vapnik V. Support-vector networks [J]. Machine learning, 1995, 20 (3): 273-297.), and the Gaussian kernel was used in the kernel function of the SVM.
[0100] 2. Multilayer Perceptron Prediction Model (MLP)
[0101] Preprocessing of the experimental data set of each group is the same as the preprocessing of the experimental data set of the support vector machine prediction model (SVM).
[0102] The multi-layer perceptron prediction model (MLP) uses a 4-layer neural network, in which the first layer has an input dimension of 1024 and an output dimension of 512; the second layer has an input dimension of 512 and an output dimension of 256; the third layer has an input dimension of 256 and an output dimension of 64; the final output layer has an input dimension of 64 and an output dimension of 10. The activation functions used in each layer are shown in Table 3:
[0103] Table 3 Network structure of multilayer perceptron prediction model
[0104] Number of layers type Activation Function Input Dimensions Output Dimensions 1 Fully connected layer ReLU 1024 512 2 Fully connected layer ReLU 512 256 3 Fully connected layer ReLU 256 64 4 Output Layer Softmax 64 10
[0105] 3. Grain moisture content classification network model of the present invention
[0106] The experimental data set of each group is preprocessed using the method in step 2.2 of Example 1.
[0107] The experimental evaluation indicators are described as follows:
[0108] In the classification prediction of the detection problem, the prediction results of the model and the true labels of the samples are represented by a confusion matrix to represent four combinations, namely true positive (TP), false positive (FP), true negative (TN), and false negative (FN). The confusion matrix is shown in Table 4 below:
[0109] Table 4
[0110]
[0111] 1) Accuracy
[0112] Accuracy refers to the proportion of the total number of correct predictions made by the model. It is defined as follows:
[0113]
[0114] 2) Precision
[0115] Precision represents the proportion of correctly predicted positives to all predicted positives, and is defined as follows:
[0116]
[0117] 3) Recall
[0118] Recall represents the proportion of correctly predicted positives to all actual positives, and is defined as follows:
[0119]
[0120] 4) F1-score
[0121] The F1 score represents the harmonic mean of precision and recall, with a maximum of 1 and a minimum of 0. It is defined as follows:
[0122]
[0123] The detection performance of the above three algorithms under different room temperature conditions and different density conditions are shown in Table 5, Table 6 and Table 7:
[0124] Table 5 At room temperature 20℃, wheat bulk density 770kg / m 3 Algorithm detection performance under different conditions
[0125] Model Accuracy Accuracy Recall F1 value MLP 77.03% 79.88% 78.82% 78.93% SVM 80.90% 85.28% 79.54% 82.61% The present invention <![CDATA[ 92.47% ]]> <![CDATA[ 95.43% ]]> <![CDATA[ 94.14% ]]> <![CDATA[ 94.52% ]]>
[0126] Table 6 At room temperature 20℃, wheat bulk density 800kg / m 3 Algorithm detection performance under different conditions
[0127] Model Accuracy Accuracy Recall F1 value MLP 76.64% 78.54% 77.21% 77.36% SVM 80.90% 87.28% 79.54% 82.61% The present invention <![CDATA[ 93.26% ]]> <![CDATA[ 94.83% ]]> <![CDATA[ 92.19% ]]> <![CDATA[ 92.57% ]]>
[0128] Table 7 At room temperature 25℃, wheat bulk density 770kg / m 3 Algorithm detection performance under different conditions
[0129]
[0130]
[0131] It can be seen from the above results that the present invention can effectively identify the differences in moisture content inside wheat varieties of grain in a storage environment under different temperature conditions and different bulk density (density) conditions, which meets the requirements of online grain storage scenarios for online grain moisture detection that takes into account both detection efficiency and accuracy.
[0132] Finally, it should be noted that the above examples are only some specific embodiments of the present invention. Obviously, the present invention is not limited to the above embodiments, and there are many variations. All variations that can be directly derived or associated with the content disclosed by a person skilled in the art should be considered as the protection scope of the present invention.
Claims
1. A method for online moisture monitoring of grain in a grain depot based on millimeter wave radar, characterized in that : The millimeter wave radar is placed in the grain storage pile of the grain depot according to the five-point sampling rule, and the original echo data of the ADC sampling of each sampling point is obtained and sent to the host computer for data preprocessing, and then the preprocessed data Dc is input into the grain moisture content classification network for classification prediction, and the moisture prediction content of each sampling point is output and the results are displayed and stored in the host computer; The data preprocessing is to obtain the sampling data Dt after the original echo data sampled by the ADC is subjected to the frequency modulation pulse period average sampling operation; at the same time, the original echo data sampled by the ADC is subjected to the Fourier transform frequency domain feature extraction operation to obtain the frequency domain feature, and then subjected to the frequency modulation pulse period average sampling operation to obtain the sampling data Df; then the sampling data Dt and the sampling data Df are spliced on the frequency modulation pulse number dimension to obtain the preprocessed data Dc; The grain moisture content classification network includes a TCN time domain convolutional network and a multi-layer perceptron connected in sequence; The frequency modulation pulse period average sampling is specifically as follows: the average of the same sampling point of every 16 frequency modulation pulse periods is calculated using formula (1): (1) in, is the average value of the sampling points of every 16 frequency modulation pulse cycles, S n is the value of the sampling point corresponding to the nth frequency modulation pulse period within each period of calculating the mean value; The original data dimension of each frame of each category in the original echo data sampled by the ADC is 256×4×512. After formula (1), the processed data of 16×4×512 dimension is obtained. Then, the processed data of 16×4×512 dimension is spliced and expanded in the channel dimension (4) and the sampling point dimension (512) to obtain the sampled data Dt; The Fourier transform frequency domain feature extraction is to perform a finite-length discrete Fourier transform on 512 sampling points of the original echo data sampled by the ADC according to formula (2) to obtain processed data with a dimension of 256×4×512; (2) in, represents the data after discrete Fourier transform, Represents the digital signal sampled by the ADC, and N is the number of periodic points for discrete Fourier transform.
2. The method for online moisture monitoring of grain in a grain depot based on millimeter wave radar according to claim 1 is characterized in that: The training process of the grain moisture content classification network is as follows: collect N groups of grain samples with moisture contents arranged in equal intervals, use millimeter wave radar to collect 100 frames of original echo data of each group of grain samples, and use the moisture content of each group as the label of the 100 frames of original echo data of the group, so as to construct a data set for training and testing; Then, the preprocessed data Dc obtained by the data preprocessing is randomly divided into a training data set D_train and a test data set D_test according to a ratio of 8:2; The grain moisture content classification network is trained using the training data set D_train, the mean square error is used as the loss function, and the Adam optimizer is used for network parameter learning; the network parameter learning rate Learning_rate is set to 0.00025, 16 groups of data are input for each batch, and 1000 epochs are iterated for training; The test data set D_test is tested every 100 epochs, and the prediction error is calculated using the MSE loss function. If the MSE calculated on the current test data set D_test is the historical minimum, the current network parameter model file is saved. After completing the training and testing steps of 1000 epochs, the network model parameter file corresponding to the minimum MSE value calculated on the test data set D_test in history is taken as the network parameter model file of the grain moisture content classification network.
3. The method for online moisture monitoring of grain in a grain depot based on millimeter wave radar according to claim 2 is characterized in that: The TCN time domain convolutional network is the first layer of the grain moisture content classification network. The number of filters is 64, the kernel size of each convolutional layer is 3, the number of residual block stacks used is 2, and the expansion list is [1, 2, 4, 8...2 n ]; The multilayer perceptron is the second to fifth layers of the grain moisture content classification network. The second to fourth layers are all fully connected layers, and each layer is followed by a ReLU activation function. The second layer has an input dimension of 32×1024 and an output dimension of 1024; the third layer has an input dimension of 1024 and an output dimension of 256; the fourth layer has an input dimension of 256 and an output dimension of 64; the fifth layer is the network output layer, the activation function uses Softmax, the input dimension is 64, and the output dimension is 10.
4. The method for online moisture monitoring of grain in a grain depot based on millimeter wave radar according to claim 3 is characterized in that: The millimeter wave radar is arranged in a glass cylinder, with the plane where the transmitting antenna of the millimeter wave radar is located facing the food outside the cylinder, and the millimeter wave radar is separated from the four walls of the cylinder; The five-point sampling rule is to divide the grain pile into three storage layers: upper, middle and lower. Each storage layer is approximately a square of 50 square meters. Five sampling points are taken at the upper left, lower left, upper right, lower right and middle of the square, and the millimeter wave radar is respectively set at the five sampling points.
Citation Information
Patent Citations
Lip language recognition method based on broadband multi-channel millimeter wave radar
CN111856422A
Multi-target constant false alarm rate detection method based on deep neural network
CN113534120A