Improved Method for Modeling in Capacitive Grain Moisture Sensor

: Food is the material basis of human survival, food quality directly related to people's survival and life. Grains as the main food supply, its quality is also essential. Grain moisture of grain stored is an extremely important influence on the main character. However, the ambient temperature and the degree of compaction of grains have a strong nonlinear relationship between the analytic expression and difficult. Therefore the improved BP neural network was used to solve this problem. With improved orthogonal-optimizing method, the study showed that while the RBF nerve network’s weighing factors were obtained, the numbers of hidden units could be acquired. This method could avoid too few nerve elements that would result in low accuracy, or too many nerve elements that will result in “over learnt”. This method had been approved for its advantages over the ordinary methods with laboratory tests on grains of wheat, rice, corn, etc. Experimental results showed that application of the improved BP model, the measurement accuracy of wheat increased 62.0%, corn increased measurement accuracy of 66.2%, rice increased 66.7% accuracy


Introduction
Food is the material basis of human existence, food quality is directly related to the survival and life of the people. Our country is a large agricultural country, China's grain output this year to nearly 500 million tons [1][2][3] , in order to ensure the safe storage of grain , grain moisture should be slowed down to safe storage standards by timely grain drying after it is harvested.
There are factors affecting the use of capacitive moisture sensors measure the grain moisture, which is why the causes of error are more complicated. Major source of error for the sample moisture content is uneven, the error ambient temperature, humidity, dust, electromagnetic interference, and the introduction of mechanical vibration generated when the error detection data for the operation. The traditional model of polynomial curve fitting is established through extensive testing and observation, and the need to adopt three more times to fit the experiment, and the adaptability of the model is not strong, fitting accuracy is not high [4][5][6][7] .
Artificial neural network is a kind of imitation of biological information processing system of brain structure and function, compared with polynomial fitting, and its advantage is that it does not have to learn to be established, including the elimination of non-target parameters including analytic function [9][10] . Neural network learning samples are usually provided by the multi-dimensional calibration experimental data. In recent years, BP artificial neural network algorithms have been used to implement the non-linear fitting of measurement data and temperature compensation.

Probe Structure
This paper focuses on the neural network in moisture data acquisition system calibration advantages, you first need to set up the hardware for measurement. The capacitive sensor construction is shown in Fig1. In the sensing electrode and the drive electrode of the back surface of the substrate protective electrode is provided, the potential of the guard electrode and the sensing electrode, so as to reduce interference and parasitic capacitance. Where d is the width of the driving electrodes, referred to as a very wide; q is the distance between the two sensing electrodes, referred to as the pole pitch; drive plate and the distance between the sensor plate, L is the length of driving electrode and the sensing electrode, H cereal measured depth. Sensing electrodes during installation, and grain drying machinery combined into one, thus, it can be considered the width of the sensing electrode is infinite.
Because of the protection of the electrodes, the driving and sensing electrodes between the power line affected by the shape, assuming a power line between the two electrodes of an arc or elliptical arc curve to calculate the curve of the fringe field capacitance of the capacitor, there is clearly a large error. Therefore, for the capacitor shown in Fig 1, directly calculate the capacitance is very difficult to resolve.
In the experiment, the sensor plate is placed in a grounded container, using the measurement method given volume.

BP Neural Network
BP (Back Propagation) network was proposed in 1986 by a team of scientists led by Rumelhart and McCelland. It is a training multilayer feedforward network that was 3 widely used according to a former error back propagation algorithm for. BP neural network topology includes the input layer (input), hidden layer (hide layer) and output layer (output layer).
BP algorithm learning is composed by the forward spread of propagation and reverse spread of propagation. Learning process first began in forward propagation part in the information input by the input layer to the output layer hidden layer processing, this communication process with no influence each layer neurons, each neuron state on its next level only neurons affected state. If the result is not up to the expected output layer value, the learning process into reverse propagation part, even if the output error is returned to the original connection path to modify the weights of each layer neurons, the error signal continues to spread after the minimum [11][12][13][14].

BP Neural Network Model
The advantages of the network is that its generalization capabilities BP on nonlinear mapping ability and it has been proven the typical three-layer BP network model can be any rational function approximation theory. So the paper has designed a 3-layer BP network modeling functions to achieve the experimental data approximate relationship that mathematical modeling through BP network, handling the relationship between capacitance values, the standard temperature and moisture values. Model structure is shown in Fig 2. This experiment has two inputs (temperature, capacitance value) an output (grain moisture content). So the input layer design two neurons, respectively temperature and capacitance values. The output layer is a neuron for moisture content. For the hidden layer structure, after repeated experiments, the choice of the two hidden layers is better. The transfer function between the layers by Elman network design, the transfer function is Sigmod functions.
The neural network is being learned after the establishment of BP neural network in Matlab. The convergence is achieved after 89 iterations [15][16][17] . It was shown in

OLS Algorithm
Structure optimization of neural networks (ie, the number of hidden nodes selection) is always a difficulty. Hidden nodes numbers in the network structure are commonly large and easily make the network produce over study. OLS method in each orthogonal should use "a contribution to the new interest" criteria Orthogonal, when the OLS meet certain precision, the algorithm terminates, the number of orthogonal vector is then hidden layer nodes. OLS orthogonal method is generally used for the traditional Gram-Schmidt due to the shortcomings of traditional Gram-Schmidt rounding errors large [18][19][20][21] . So Gram-Schmidt method to further optimize the modified hidden layer network structure.
Modified Gram-Schmidt method makes the triangular matrix elements are not in columns but by line basis, so rounding error will be smaller.
The calculation steps are: (1) So that the number of samples equal to the number of hidden nodes N, when t = 1, calculate the repeat the cycle when t = h when looking for: For the hidden layer optimized points. Where in the selected tolerance, it is a parameter related to the degree of accuracy and the final balance of network complexity.

Confirmatory Analysis
To verify the data fusion technology and improved BP algorithm proposed to improve the detection accuracy of grain moisture effects on wheat, corn, rice cereal made three common detection comparative experiments.
First make learning samples produced three samples, then using conventional BP neural network, improved BP neural network method for data fusion calculations. The error range is shown in Table 1. In rice, for example, the neural network after the training is completed, the drawing of the surface shown in Fig 3, x-axis represents the temperature, y-axis represents the capacitance value, z-axis represents the water content.
We randomly selected verification test data set 283, and a capacitance value corresponding to the temperature obtained by the sensor device using the standard method from the standard moisture content of grain, and the temperature and the capacitance values into the computer, has been used by BP neural network output, the results shown in  Can be seen from Fig 4, the dot is measured by standard methods until a point substantially falls on the neural network generated by the fitting surfaces, after the conclusion of the data processing by the neural network after fitting of the aqueous and the moisture content ratio obtained by the standard method with a significant decrease in the average error, improve the measurement accuracy of 62.0% wheat, maize improved accuracy of 66.2%, to improve the accuracy of 66.7% rice, control accuracy can be achieved drying tower requirements.

Conclusion
The data confusion method of Radial Basis Function (RBF) nerve network is adopted in this study. With improved orthogonal-optimizing method, the study shows, while the RBF nerve network's weighing factors are obtained, the numbers of hidden units can be acquired. This method can avoid too few nerve elements that will result in low accuracy, or too many nerve elements that will result in "over learnt". This method has been approved for its advantages over the ordinary methods with laboratory tests on grains of wheat, rice, corn, etc.