Research on Online Moisture Detector in Grain Drying Process Based on V / F Conversion

An online resistance grain moisture detector is designed, based on the model of the relationship between measurement frequency and grainmoisture and the nonlinear correctionmethod of temperature.The detector consists of lower computer, the core function of which is the sensing of grain resistance values which is based on V/F conversion, and upper computer, the core function of which is the conversion of moisture and frequency and the nonlinear correction of temperature. The performance of the online moisture detector is tested in a self-designed experimental system; the test and analysis results indicate that the precision and stability of the detector can reach the level of the similar products, which can be still improved.


Introduction
Grain moisture content is one of the key indexes of grain storage security and it is an important control index in the process of grain processing.The moisture content of new harvest grain is generally beyond the safe moisture content and thus is required to be dried.Real-time online dynamic measurement of grain moisture content is the precondition of the automatic control of all kinds of dryers in drying process.But in practice, the measurement stability of online grain moisture detector is unsatisfactory, due to the influence of several parameters, such as variety, region, environmental temperature, and humidity [1][2][3].Therefore, the online measurement of grain moisture has been a problem of the realization of automatic operation of grain dryers.
There are many methods of grain moisture detection, including drying method, resistance method, capacitance method, microwave method, and neutron method [4].Among the traditional grain moisture detection methods, "oven-drying method" is widely used.This method is accurate and time and electricity consuming and it is only suitable for laboratory to use and thus cannot meet the needs of the online moisture detection [5].In recent years, capacitive moisture detection method developed rapidly, but the measurement value is not only sensitive to temperature, but also very sensitive to the grain flow velocity and grain compactness in the dryer and many other factors in grain moisture measurement.And this method is limited to the sensor recalibration after long time use [6].Microwave method and neutron method have many advantages, such as high accuracy, fast speed, noncontact, noninvasive, and nondamage measurement and they easily realize the measurement of the grain internal moisture.But the measurement device is complex and high in price [7,8].
The self-designed online resistance grain moisture detector is a combination of signal detection, acquisition, and processing.To a certain extent, it has overcome many shortcomings of traditional ways, such as long measurement period, low precision, poor stability, complex measurement system, and high cost.And the nonlinear correction mathematical model of temperature compensation is applied to the process of data processing [9].The purpose of this paper is to improve the measurement precision and stability of the moisture detector through improving the design of moisture detector hardware circuit and the data processing method and thus meet the needs of moisture online detection and moisture automatic control in grain drying process.

Measuring Principle
Experimental studies have shown that the explicit function relation exists between grain moisture and its resistance.The resistance characteristics of grain are shown as follows [10].
(1) In a certain range of grain moisture content (about 9% to 20%), an approximately linear relationship between the logarithm of the resistance and moisture content is observed.(2) In the above moisture content range, the grain resistance value varies greatly.With the increase of moisture content, the resistance changes from as high as dozens of megohm to less than 1 megohm.However, below or above this range, the logarithmic linearization error is larger.(3) Grain temperature has a significant effect on its resistance, that is to say, the equivalent resistance of grain decreases with the rise of temperature.Experimental studies have shown that the impact on resistance when the temperature rises 1 ∘ C is equivalent to that when the moisture content increases 0.1%, that is, 0.1% (moisture content)/ ∘ C at normal temperature conditions(−10 ∘ C∼+50 ∘ C).
As a result, the correlation properties of grain resistance provide a design basis for the online resistance grain moisture detector on principle.

Resistance Signal Conversion
Unit.Moisture detector is shown in Figure 1, including lower computer determination part and upper computer display and control instrument.Lower computer mainly consists of two parts: electrode roller and shell.Among them, the electrode roller is a crush type electrode with fixed pressure.The crush type electrode roller is designed because a certain pressure needs to be exerted to crush the grain particles.In this way, the resistance signal which is detected by the electrode can reflect the internal moisture of grain.
When the moisture detector is working, the motor in the sampling mechanism drives electrode roller to do opposite rotation.Grains are squeezed by the roller electrodes.In the grain drying process, the roller squeezes the grains which scatter down from hoist hopper and the grain resistance is transported to the signal conditioning circuitry (including signal acquisition, signal amplification, and V/F conversion circuit unit) to process.The frequency signals which are positively related to the grain moisture content are obtained.The single-chip microcomputer is used to collect the frequency values.Through the mathematical model of moisture calibration and temperature nonlinear correction, the transformation of grain moisture content during the grain drying process is measured in real time.
Because the grain is approximately elliptical, that is, a round intermediate and slight cuspidal poles, therefore, in the process of extrusion, the changing rule of the contact area between the grain seeds and the electrode roller is the variation process from zero to maximum then to minimum.The pressure on the grain is also a variation process from minimum to maximum and then to minimum.And the corresponding resistance change curves of sampling circuit are from the maximum resistance (open circuit) to the minimum (maximum moisture content) and then to maximum (open circuit) [11].Therefore the frequency values are collected from minimum to maximum and then to minimum.The curves of the relationship between the measurement frequency values and measurement time when the grains with different moisture content pass through the roller are shown in Figure 2.

The Signal Processing Achievement Unit.
The signal processing achievement unit includes the design of moisture detector hardware circuit and software program.The system block diagram is shown in Figure 3.
The whole hardware circuit system consists of lower computer hardware and upper computer hardware circuit.Modular design method is used in order to debug and repair the circuit easily.Lower computer hardware circuit includes power supply module, signal acquisition module, the smallest single-chip microcomputer system, single-phase AC motor control module, temperature measurement module, and serial communication module.The upper computer hardware circuit includes key and display module, data storage module, and serial communication module.The hardware circuit block diagram is shown in Figure 4.Among them, the signal acquisition module comprises resistance detection circuit, signal amplification circuit, and V/F conversion circuit.The resistance detection circuit changes the traditional divider circuit mode [12] and the resistance value of grain is measured by using a Wheatstone bridge circuit according to the principle of the bridge balance, as shown in Figure 5.The measurement using the bridge method is of higher sensitivity and more accuracy.Meanwhile, in order to avoid unnecessary ac interference, the filter capacitors are added to both ends of the bridge arms.Compared to traditional A/D conversion circuit, V/F conversion circuit has its own filtering function; the accuracy of the obtained digital signal is higher.And there is only one interface which can complete frequency signal input conveniently between the V/F converter and single-chip microcomputer.Its interface is simple and less hardware resource is occupied [13].
Software design includes the lower and upper single-chip microcomputer system.Single-chip microcomputer software system is also designed by the structured and modular program design method.The program structure block diagram is shown in Figure 6  According to the function of the moisture detector, the work flow chart of upper single-chip microcomputer system is shown in Figure 7.
The program flow chart of lower computer system main is shown in Figure 8.To analyze the time sequence of procedures, the time sequence diagram is shown in Figure 9.As can be seen by the time sequence diagram, the execution time of the sampling and the data processing are included in the time of grain extrusion.Doing this can save measurement time effectively and improve measurement speed to meet the test requirements.
In the dynamic test data, in order to eliminate the data random fluctuation, some digital filtering algorithms are required in the process of data processing [14].In lower computer data processing subroutine, the methods of outlier eliminating and moving average filtering are adopted to process data.In addition, the moisture detector measures 100 grains and then gets a group of moisture values by calculating the average of 100 grain moisture values.This method of calculating the average from large sample can avoid the random interference and gross errors.

Test Materials.
The Jijing 66 rice which is produced in the northeast area is selected as test sample, which has full grain, bright color, no lesion, no crack, and no mildew.

Test Instruments and Equipment.
The experimental device mainly consists of self-developed and designed grain moisture comprehensive test system which is shown in Figure 10, self-designed online resistance grain moisture detector which is installed at the slot in the hoist, mounting plate and installation method as shown in Figure 11, PM-2500 type automatic single grain moisture detector which is produced by Japanese Kett Company, 202-00A type electric thermostatic oven, HX-100 type high speed crusher, precision electronic balance, and other equipment including aluminum sample boxes with cover, sample bags, a small spoon, and a brush, labels.

Test Method
A Self-developed and designed grain moisture comprehensive test system simulates the working state of the circulation grain dryer and grain circulates in the test bench under the action of hoist.Moisture detector relies on measuring grain which scatters down from hoppers in the hoist to gain the changes of grain moisture that is in the test bench.B Self-designed moisture detector works 12 hours continuously in the test bench.The electrode roller collects each 100 grains of rice then a group of frequency values is processed, calculated, and displayed and the frequency values are recorded.C Self-designed moisture detector measures each 5 times and PM-2500 moisture detector measures one time.
D Every 1 hour, the rice in the test bench is sampled.The laboratory drying method is adopted to measure the grain moisture content according to the moisture determination theory and specific operating procedures in GB/T5497-1985 "method for determination of grain and oilseeds moisture content." E The test results of the self-designed moisture detector, PM-2500, and laboratory drying method are compared.

Measurement Data Analysis.
Frequency measurement values of the self-designed moisture detector were compared with the actual moisture which was measured by the laboratory method and the relationship between them was shown in Figure 12.The mathematical model between measurement frequency and grain moisture content was established through this diagram.

The Formula Method of Nonlinear Temperature Compensation Calibration.
Because the temperature is one of the main factors influencing the measurement accuracy of grain moisture content, especially on the condition of high moisture measurement, the error reaches 6%∼8%.It cannot meet the requirements of practical application and nonlinear calibration of temperature must be conducted [15].
According to the test method of 3.3, the experiments were carried out twice.1150 times measuring values of the first test and 850 times measuring values of the second test were recorded.Firstly, the measurement values of the moisture detector without temperature compensation calibration and the results of laboratory drying method were compared.The test results were shown in Figure 13.The error of the test results was solved by 3 Sigma criteria.In test one, the error between moisture detector measurement values and the actual moisture was in −0.210%∼0.631%.In test two, the error between moisture detector measurement values and the actual moisture was in −0.636%∼0.758%.
As shown in Figure 14, the variation range of temperature during the process of test one was in 19 ∘ C∼23.5 ∘ C and the variation range of temperature during the process of test two was in 14 ∘ C∼19 ∘ C.
Through the analysis of experimental data, the parameter estimation method was adopted and the nonlinear correction formula of temperature was obtained after repeated calculation and comparison.Set up  1 ,  2 , . . .,   for the sample of overall .As the distribution function of overall , the form of (  , ; , , , , ) is In the formula:  is the moisture value after temperature compensation,   is the measurement moisture value  The measurement moisture values curves after temperature nonlinear correction were shown in Figure 15.The error of the test results was solved by 3 Sigma criteria.In test one, the error of the moisture detector measurement values was between −0.418% and 0.256%.In test two, the error of the moisture detector was between −0.469% and 0.527%.

Comparison and Analysis. The measurement results
of the self-designed moisture detector and PM-2500 were compared with laboratory drying method.The results were shown in Figure 16.The linear tuning function on the display and control instrument panel of PM-2500 was used to adjust the measurement values to the actual moisture values, as shown in Figure 17.The stability of the self-designed moisture detector and PM-2500 moisture meter was compared.By the calculation, in test one, the stability of PM-2500 between −0.5% and 0.5% was within 78.26% and the stability between −1% and 1% was within 98.70%.The stability of self-designed moisture meter between −0.5% and 0.5% was within 82.09% and the stability between −1% and 1% was within 99.83%.In test two, the stability of PM-2500 between −0.5% and 0.5% was within 56.25% and the stability between −1% and 1% was within 95.63%.The stability of self-designed moisture detector between −0.5% and 0.5% was within 76.88% and the stability between −1% and 1% was within 95.25%.

Conclusion
(1) In this paper, the online resistance grain moisture detector is designed, based on the model of the relationship between measurement frequency and grain moisture and the nonlinear correction method of temperature.The detector consists of lower computer, the core function of which is sensing of grain resistance values which is based on V/F conversion, and upper computer, the core function of which is the conversion of moisture and frequency and the nonlinear correction of temperature.
(2) Experimental study about grain flow has been done on the self-designed moisture testing system.The mathematical model of the relationship between the measurement frequency and grain moisture content is thus established.Meanwhile the nonlinear calibration model of temperature compensation is combined.The performance of moisture detector and the correctness and stability of the model have been tested.The results showed that the error of the detector is between −0.469% and 0.527%, the stability between −0.5% and 0.5% is within 76.88%, and stability between −1% and 1% is within 95.25%.
(3) Through the experiment on self-designed moisture test system, the precision, and the stability of the self-designed moisture detector and PM-2500 type automatic single grain moisture detector which is produced by Japanese Kett Company were compared.The results indicated that the precision and stability of the detector can reach the level of the similar products, which can be still improved.

Figure 1 :
Figure 1: The structure of moisture detector.

Figure 2 :Figure 3 :
Figure 2: The curves of the relationship between the measurement frequency values and time when the grains with different moisture content pass through the roller.

Figure 4 :
Figure 4: The hardware circuit block diagram.

Figure 7 :
Figure 7: Work flow chart of the upper computer.

Figure 8 :
Figure 8: Flow chart of lower computer main program.

Figure 9 :
Figure 9: The time sequence analysis diagram of MCU program.

Figure 10 :
Figure 10: Self-designed grain moisture comprehensive test system.

Figure 15 :
Figure 15: Comparison between moisture detector measurement values and the actual values after temperature compensation calibration.

Figure 16 :
Figure 16: Comparison of two methods measurement values.