moisture content measurement based on optimal bp … · moisture content measurement based on...

4

Click here to load reader

Upload: dinhminh

Post on 23-Jun-2018

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Moisture Content Measurement Based on Optimal BP … · Moisture Content Measurement Based on Optimal BP ... algorithm to calibrate the measurement ... accurate and convergence speedy

Moisture Content Measurement Based on Optimal BP Arithmetic

Shen Yongliang,Zhao Jianhua

Abstract - How to reduce the measurement error caused by linear regression is the key in measuring tea moisture content with microwave transmission techniques. In this paper, an improved BP algorithm, which combines the genetic algorithm, is given for training artificial neural network to get the range of weights and thresholds. The method makes BP algorithm avoid getting into infinitesimal locally and has the merits of high prediction precision and rapid convergence. The results show that the mean squared error is 0.0116, the mean absolute error is 0.0738, the mean relative error is 0.1182 and the certain coefficient is 0.9863 between the predicted value and the real one. Index Terms - Moisture content; open microwave resonant; BP algorithm; genetic algorithm(GA)

I. INTRODUCTION

OISTURE content of tea is a key parameter in processing and managing. Measurement of the

moisture content on line is performed by using a free-space transmission technique. A sample holder was filled with tea and inserted between two horn antennas. As the wave propagates through the layer of tea, it is attenuated and the phase is shifted. The transmission technique has the merits in high precision, excellent quality of real time, detecting inner moisture content of the measured material with density independent and measuring on line for industry application. Reducing measurement error is a nodus in the relationship between attenuation or phase shift and moisture content ensured by a multiple linear regression.

In recent years, a lot of improved methods have been put forward for measurement error caused by applying multiple linear regression. But these methods mainly look for more accurate multiple linear regression factor, thus they can reduce the certain coefficient and mean squared error to minimum. It is a kind of feasible method to use BP (Back-Propagation) algorithm to calibrate the measurement result, but the conventional BP network has some inherent disadvantages such as the non-unique structure and extremely slow convergence property, for which it is unable to be prevent from getting into infinitesimal locally.

Shen Yongliang(1964-),male,associate professor, work in department of

Electronic Engineering in Hei Long Jiang University, Harbin , China . The main study directions are intelligent measurement and appearance. (telephone:0451-86608454,e-mail:[email protected]).

Zhao Jianhua(1952-), male, professor, work in department of Electronic Engineering in Hei Long Jiang University, Harbin,China.The main study directions are adaptive control. (e-mail:[email protected])

Hei Long Jiang University key lab for automatic control.

Education office fund item of Hei Long Jiang Province(10543031).

In moisture content measurement with transmission technique, the key problem is to diminish the measurement errors that brought by multiple linear regression, because these errors are main factors of determining the precision of the measuring system. When using BP algorithm to calibrate the measurement results, the initial weight values of neural network are given at random, therefore the training times and final weight values are slightly different each time, that is to say parameters-optimized process is not unique and the local is infinitesimal. In addition, the initial weight values have resulted in the training times increase for its "blindness", which lowers the convergence speed of the neural network. Experiments showed that measuring precision which is low with the coefficient of determination is 0.9607 and the mean squared error is 0.3805 between the real moisture and the predicted moisture content before calibrating. Therefore, it is suggested to utilize neural network based on GA and BP algorithm to calibrate the measurement results.

II. MOISTURE CONTENT MEASUREMENT ON THE BASE OF MICROWAVE TRANSMISSION TECHNIQUE

Moisture content is often defined on a wet basis as the ratio mass of water Wm to the total mass DW mm + , where

Dm is the mass of dry material. When expressed in percentage, the moisture content ψ of material can be written as

100%W

W D

mm m

ψ = ×+

(1)

When measuring the moisture content of tea with microwaves, the permittivity plays an important role. On the one hand, the two transmission parameters attenuation A and phase shift φ have relationship with the permittivity

of the material under test. On the other hand, there is a great difference between the dielectric properties of water and those of dry tea as the moisture content of tea varies with its permittivity. Therefore, connections can be obtained between attenuation A and phase shiftφ .

When an electromagnetic plane wave is transmitted through a dielectric tea of thickness d placed in holder, the attenuation A and phase shift φ for perpendicular incidence can be expressed as [1]

0

8.686 dA επ

λ ε

′′≈ ⋅

′ (2)

M

637

Page 2: Moisture Content Measurement Based on Optimal BP … · Moisture Content Measurement Based on Optimal BP ... algorithm to calibrate the measurement ... accurate and convergence speedy

( )0

360 1dφ ε

λ′≈ −

(3)

Where ε ′ is the dielectric constant and represents the ability of a material to store electric energy, and ε ′′ is the loss factor and represents the loss of electric-field energy in the material, and 0λ is the incident wavelength.

In general, applications based on the principle of a two-parameter measurement and the ratio Aφ , are limited to transmission techniques[2]. It is more attractive to define a density-independent calibration function that is directly related to the dielectric properties of the tea under test and therefore can be applied regardless of the measurement technique. So the density-independent calibration functionΨ when used in calibrating a measuring system operating at a single frequency can be simplified to[3]

( )fa

εξ

ε ε ε′′

=′ ′ ′′−

(4)

Consequently, the moisture content Ψ is fully defined in terms of dielectric properties of the tea,

C Bψ ξ= + (5)

Fig.1 the nonlinear relationship between A and φ

Fig.2 relationship between predictedψ and realψ by multiple linear

regression

Where af is a frequency factor independent of moisture content and temperature, C and B are linear regression coefficients.

The function about moisture content ψ can be obtained integrating formulae (2) and (3)

0

0

360 ( )1563.48360 4.343 f f

d AC B Tdd a A aψ

λφ φλ

= ++ − +

(6)

Where the attenuation A and phase shift φ are the transmission parameters obtained when measuring, d is the thickness of detected tea, the two coefficients C and

fa can be gotten by linear regression. ( )B T is a function

on temperature T which can be confirmed by considering the effects that temperature has on the measurement result, and the temperature can be compensated with measurement.

Fig.2 indicates the difference between the predicted moisture content predictedψ and the real moisture content

realψ of tea, from which we can find out that there is a large error between them. In this paper, an improved BP algorithm is utilized to calibrate the measuring results in order to reform the measurement precision.

III. IMPROVED BP NEURAL NETWORK CALIBRATION ALGORITHM

BP network is a nonlinear mapping artificial neural network, which can approach any continuous function of closed region with one hidden layer[4]. BP network with three layers can model process of calibrating the result of measuring tea moisture content. The network can be used to proofread the measurement results. Although the higher prediction precision of BP network[5][6], the non-unique configuration and extraordinarily slow convergence are the big obstacle in its application expanding to the prediction real-time and mass samples.

GA is a parallel global search arithmetic based on natural selection and genetic law which has very strong macroscopical search ability and full scope of optimization. It can overcome disadvantages owned by the traditional BP arithmetic when calibrating the measurement result. Consequently, we can obtain the range of weight values by means of using GA to train the network and then BP arithmetic to resolve accurately. In the end, the trained network can avoid getting into infinitesimal locally. The training degree and final weight values and training rapidity are also ameliorated at the same time. A. Improve the Convergence Speed of BP Algorithm

The learning process of the network is divided into two commutative parts by BP algorithm, namely forward propagation and back propagation. If the sum of squared error outputted by the forward propagation couldn’t reach the predicted precision, it will correct the weight values and

638

Page 3: Moisture Content Measurement Based on Optimal BP … · Moisture Content Measurement Based on Optimal BP ... algorithm to calibrate the measurement ... accurate and convergence speedy

threshold of each layer’s nerve cells along negative gradient of errors. Repeat such work until the global sum of squared error of the network accords with the predicted precision. BP algorithm is based on the steepest decent method. Because of its disadvantages of getting into infinitesimal locally, slow convergence and effect of oscillation, the inertial moments need be added to weight vectors[7], namely:

( ) ( )1ij j i ijw t o w tηδ α∆ + = + ∆ (7)

Where ( )1ijw t∆ + , ( )ijw t∆ denote the modified value of weight for the t+1 times and the t times iteration respectively; α ,η are scale factors indicating the sum of squared error’s negative gradient against the weight values in BP algorithm.

Using the mentioned method accelerates the convergence of the network and more or less reduces the probability of getting into infinitesimal locally. In order to expedite the convergence speed more, variable step method for optimization is adopted.

0 ( 1) ( ) 10 ( 1) ( ) 1

E t tE t t

η η ϕ ϕη η β β

∆ > + = ⋅ > ∆ > + = ⋅ >

+ =+ =

(8)

Here E∆ is the variable for the sum of squared error; ϕ and β are scale factors. B. Feed-forward Network Based on GA and BP Algorithm

Modifying the initial weight values makes network avoid getting into infinitesimal locally. Whereas the slow convergence and effect of oscillation are almost led by the network when it is trained, relapsing into infinitesimal locally later. The above question can be solved by using GA to search some weight values in the rough as the initial weight values for BP algorithm. GA has excellences such as strong global search ability, easy for use, better robust and parallel processing. Making use of the genetic algorithm can overcome disadvantages of BP algorithm. Combining GA with BP algorithm to form a kind of mixed algorithm can optimize the network. Training begins with the GA for searching the optimization to reduce the search range, afterwards using BP network to optimize.

The detailed steps are as follows: ①Initializing the network and colony, providing the parameter of training; normalizing every input vector, the formula is.

[ ]min( ) max( ) min( ) 0.9 0.05j i i iV V V V − − ⋅ + (9)

The Initial weight values of network are a group of random number within [-1,1]; ②Calculating the sum of squared error, and, if it reaches the anticipated value GAε then turns to ④; ③genetic manipulation produces the new individual and eliminates the parent individual, turning to ②;

④BP iterative calculating (the number of times is limited), if having not reached the appointed precision BPε ,

namely BPε < GAε , then turns to ③; ⑤Outputting the weight values and threshold at this moment, finishing training; ⑥Calculating the instance with the weight value, threshold value at this moment, and reducing the result of calculation according to the normalization formula, predicting.

It is comparatively felicitous for the initial weight values to take value within [-1,1]. When the initial weight values region is large, if GAε takes the lesser, it will result in the times of training increasing, but has little effect on the final results. On the contrary, if GAε takes larger, it will cause the bigger weight values range and affect the network’s normalization capacity.

In this paper, the mixed algorithm, which comes from combining GA and BP algorithm, is used to train BP network, so as to make the calibration course of measuring tea with microwave resonator optimization global and accurate and convergence speedy.

It is inadvisable to take excessive training for the infinitesimal sum of squared error, which will enlarge the range of weight values and result in the predicted error increasing. At the same time proper number of hidden layers is needed. If the number is few that it is hard to train and if the number is many that it will annihilate the law of samples. The size of predicted precision relates to steady degree of the array series. If the series is steady then the prediction is accurate; on the contrary, the predicted value needs certain time to reach the extremum of actual value because the precision of the network takes the sum of squared error as standard. As the initial weight values are confirmed by BP network, the training times and final weight values are different each time. The weight values array of the network is within some range after the global training with GA which is settled by the mixed algorithm in the paper.

Fig.3 The topological framework structure of the neural network of

measuring moisture content with microwave resonator

In Fig.3, a network is established according to the characteristic parameters of resonator and the moisture content of tea under test when the mixed algorithm is used to calibrate the moisture content of tea with microwave

639

Page 4: Moisture Content Measurement Based on Optimal BP … · Moisture Content Measurement Based on Optimal BP ... algorithm to calibrate the measurement ... accurate and convergence speedy

resonator. Utilize the attenuation A and phase shift φ and moisture content ψ as samples obtained from large number of experiments to train the network and then take measurement with the trained network.

IV. EXPERIMENT AND CONCLUSION

Some tea with certain moisture content is loaded to the window of open microwave resonator in the course of experiment. Take 10 values in the range of 0% ~ 10.3% and have measurements for 10 times. The initial data is normalized into [-1,1] to accelerate the constringency of the network. According to the attenuation A and phase shift φ , each moisture content is gotten with vector network analyzers HP8150B.

The network is trained with 100 groups of data obtained from the experiment. The topological framework structure of the neural network is (2,8,1), crossover ratio is 0.94Cp = ,mutation ration is 0.04mp = , objective sum of

squared error is GAε =0.75. The initial learning rate is

(0) 0.012η = ,learning rise rate is 1.04ϕ = ,learning decent rate is 0.76β = .Outer g GA iterates 142 times and BP algorithm iterates 7256 times with the sum of squared error is 0.01999768. The moisture content is measured with the obtained weight values and threshold. The result shows that the mean squared error and the coefficient of determination between the calibrated value and the real value have been improved much compared with non-calibration, shown as Fig.4 and table I.

Fig.4 The relationship between predictedψ and realψ with the artificial

neural network calibration

Table I Before using ANNs

the mean squared error 0.3805 the mean absolute error 0.4390 the mean relative error 0.1941 the coefficient of determination 0.9607

After using ANNs the mean squared error 0.0116 the mean absolute error 0.0738 the mean relative error 0.1182 the coefficient of determination 0.9863

The feed-forward neural network based on GA and BP algorithm prevents the traditional BP algorithm from getting into infinitesimal locally and keeps high prediction precision. Compared with the results without calibration by neural network, its interpretation precision and scientific anticipation have been improved greatly. The squared error and coefficient of determination between measurement values and real values are 0.0116 and 0.9863 respectively.

REFERENCES [1] SamirTrabelsi, Andrzej W. Krazsewski, Stuart O.Nelson, “ A

Microwave Method for On-line Determination of Bulk Density and Moisture Content of Particulate Materials ” , Transactions on Instrumentation and Measurement, vol 47, vo. 1, pp. 127-132, February 1998.

[2] Ki-Bok Kim, Jong-Heon Kim, Seung Seok Lee,“Measurement of Grain Mositure Content Using Microwave Attenuation at 10.5GHz and Moisture Density” , Transactions on Instrumentation and Measurement, vol 51, no. 1, pp. 72-77, February 2002.

[3] SamirTrabelsi, Andrzej W. Krazsewski, Stuart O.Nelson,“ New Density-Independent Calibration Function for Microwave Sensing of Moisture Content in Particulate Materials ” , Transactions on Instrumentation and Measurement, vol 47, no. 3, pp. 613-622, June 1998.

[4] Hecht.Nielsen R., Neurocomputing, Addison.Wesley, 1990 . [5] Philip G. Bartley, Ronald W. McClendon, “Moisture determination

with an Artificial Neural Network from microwave measurement on wheat”,IEEE instrumentation and Measurement Technology Conference, pp. 19-21, May 1997.

[6] Wu Xiao, “The Application of Artificial Neural Network (ANN) in Rainstorm Forecasting”, Intelligent Controlling and Intelligent Automatization, Science Press, BeiJing, 1993.

[7] Rumelhart D B, Hinton G E, “Learning internal representations by error propagation in parallel distributed processing: explorations in microstructure of cognition I”, MA: MIT Press, Cambridge, 1986.

640