CN105069504B - SCM Based BP neutral net Apple Mould Core discrimination model and method for building up thereof - Google Patents

SCM Based BP neutral net Apple Mould Core discrimination model and method for building up thereof Download PDF

Info

Publication number
CN105069504B
CN105069504B CN201510447612.XA CN201510447612A CN105069504B CN 105069504 B CN105069504 B CN 105069504B CN 201510447612 A CN201510447612 A CN 201510447612A CN 105069504 B CN105069504 B CN 105069504B
Authority
CN
China
Prior art keywords
value
fructus mali
mali pumilae
fruit
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510447612.XA
Other languages
Chinese (zh)
Other versions
CN105069504A (en
Inventor
张海辉
陈克涛
苏东
任传奇
张佐经
胡瑾
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Northwest A&F University
Original Assignee
Northwest A&F University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Northwest A&F University filed Critical Northwest A&F University
Priority to CN201510447612.XA priority Critical patent/CN105069504B/en
Publication of CN105069504A publication Critical patent/CN105069504A/en
Application granted granted Critical
Publication of CN105069504B publication Critical patent/CN105069504B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Investigating Or Analysing Materials By Optical Means (AREA)

Abstract

A kind of SCM Based BP neutral net Apple Mould Core discrimination model, model formation is: M=0.8350*y1‑2.6581*y2+0.9930*y3, as M < 0, illustrate that Fructus Mali pumilae exists mould cardiopathia, present invention also offers method for building up and the principle of this model, the foundation of model of the present invention fully relies on the magnitude of voltage and fruit footpath value got, based on LED, MSP430 processor, the design of hardware and software of the core devices such as photodiode, detection equipment is made to achieve miniaturization and low cost, the most also there is higher accuracy of detection, morbidity Fructus Mali pumilae can be sorted out timely and accurately when Fructus Mali pumilae is put in storage, the large area preventing Apple Mould Core pathogenic bacteria infects, significantly reduce the Fructus Mali pumilae sickness rate at storing process, there is low cost, simple to operate, stable and reliable operation, disease discrimination precision high, and the method can be used for fruit graded in production line, the most expansible Fast nondestructive evaluation being applied to other fruit interior quality.

Description

SCM Based BP neutral net Apple Mould Core discrimination model and method for building up thereof
Technical field
The invention belongs to agricultural technology field, particularly to a kind of SCM Based BP neutral net Fructus Mali pumilae Mould cardiopathia discrimination model and method for building up thereof.
Background technology
Apple Mould Core, also known as heartrot, is the Major Diseases of harm apple internal quality, the reddest richness The sickness rate of scholar's Fructus Mali pumilae is the highest, and general sickness rate is about 21%, especially fruit-bagged Fuji, its morbidity Rate is up to 43.5%-79.5%.The main period of Apple Mould Core morbidity is in fruit maturation phase and storage period. Early-mid ripening Fructus Mali pumilae most of appearances after maturation is gathered can not be identified, but comes into the market or in consumer's hands Morbidity fruit can not eat;After late variety enters fruit storehouse, may proceed to extension and morbidity in storage period, Make full fruit rot, have no edibility.Neurotoxin contained by mould cardiopathia have impact fertility, carcinogenic With the toxicological effect such as immunity, therefore, the detection of mould cardiopathia has become urgently to be resolved hurrily great of apple industry Problem.
Detection method research currently for Apple Mould Core is less, and its technology is mainly based upon the life of Fructus Mali pumilae The principles such as thing impedance operator, light characteristic and machine vision characteristic, wherein bio-impedance characteristic relate to defeated Enter parameter more;The detection mode that light characteristic many application all band light source is combined with spectrogrph, containing more Redundancy, system cost is high;It is complicated, time-consuming that Machine Vision Detection analyzes process, and there is no at present Appropriate detecting instrument is for the detection of mould cardiopathia.
Summary of the invention
In order to overcome the shortcoming of above-mentioned prior art, it is an object of the invention to provide a kind of based on single-chip microcomputer BP neutral net Apple Mould Core discrimination model and method for building up, have lossless, efficiency is high, fast Degree is fast, low cost, favorable reproducibility, sample facilitate without pretreatment, spectral measurement, are suitable for Site Detection With unique advantages such as on-line analyses.
To achieve these goals, the technical solution used in the present invention is:
A kind of SCM Based BP neutral net Apple Mould Core discrimination model, model formation is: M=-0.8350*y1-2.6581*y2+0.9930*y3, wherein, M represents final differentiation result, y1, y2, y3, x1, x2, x3It is intermediate variable, x1=(1.0e+003) * (0.4222*v-0.7352*d+0.3789), x2=(1.0e+003) * (0.0001*d-0.0004), x3=(1.0e+003) * (3.7529*v-0.2363*d-1.1318), v represent the fruit footpath value after normalization, and d represents and returns The opto-electronic conversion magnitude of voltage corresponding with spectral transmission value after one change, V=0.2+ (0.9-0.2) * (V-0)/(800-0), d=0.2+ (0.9-0.2) * (D-50)/(100-50), V represent former Begin fruit footpath value, and D represents the original opto-electronic conversion magnitude of voltage corresponding with spectral transmission value, as M < 0, says There is mould cardiopathia in bright Fructus Mali pumilae.
The method for building up of described SCM Based BP neutral net Apple Mould Core discrimination model, including Following steps:
Step 1, sets up sample data
Randomly choose 120 to number one by one without the Fructus Mali pumilae of open defect, in the environment of humiture is constant, Gather diameter value and the spectral transmission value of each Fructus Mali pumilae, then at caulom, cut Fructus Mali pumilae, it is determined whether have Mould cardiopathia, by diameter value and spectral transmission value collectively as sample data;
Step 2, sets up model
(1) 2 layers of BP network are used sample data point to be classified, in order to prevent only inputting absolute value mistake The neuron output caused greatly is saturated and ensures little not eaten of numerical value in output data, unifies dimension, First diameter value is normalized with spectral transmission value, normalization formula:
Z=z1+(z2-z1)*(x-xmin)/(xmax-xmin)
Wherein z1=0.2, z2=0.9, represent that the scope of data after normalization is 0.2 to 0.9;X represents and treats normalization Data;xmin、xmaxRepresent minimum and the maximum, i.e. original data range of original classification data sequence; Z represents the data after normalization;
(2) determining that in original classification data, Fructus Mali pumilae diameter value is in the range of 50mm to 100mm, spectrum is saturating Cross the opto-electronic conversion magnitude of voltage corresponding to value in the range of 0mv to 800mv;
(3) BP neural network object attribute: input vector is 2 dimensions, network hidden layer has 3 neurons, Output layer has 1 neuron, and the transmission function of hidden layer network is tanh S type activation primitive, output The transmission function of layer is linear activation primitive, and training function uses the gradient of error to decline back-propagation algorithm, Learning rate is set to 0.05, and target error is 1e-6;
(4) choose error in classification less than the network of target error, get input layer to the weights of hidden layer Matrix IW, input layer to the threshold matrix b1 of hidden layer, hidden layer to output layer weight matrix LW with And hidden layer is to the threshold matrix b2 of output layer, expression formula is as follows:
I W = ( 1.0 e + 003 ) * 0.4222 - 0.7352 0 0.0001 3.7529 - 0.2363
b 1 = ( 1.0 e + 003 ) * 0.3789 - 0.0004 - 1.1318
LW=[-0.8350-2.6581 0.9930]
B2=-0.5551
(5) setting a diameter of D of Fructus Mali pumilae to be verified, the opto-electronic conversion magnitude of voltage corresponding to spectral transmission value is V, Apple Mould Core differentiates that result is M, then can be calculated differentiation result M according to D, V-value, and If M>0, it is determined that result is healthy fruit, M<0, it is determined that result is disease fruit;
Wherein the calculating process of M is as follows:
First, input vector P normalization: d=0.2+ (0.9-0.2) * (D-50)/(100-50); V=0.2+ (0.9-0.2) * (V-0)/(800-0);
Diameter value after d Yu v represents normalization respectively in formula and opto-electronic conversion magnitude of voltage;
Secondly, network output valve: M=f is calculated2[LW*f1(IW*P+b1)+b2], wherein input vector P = v d , Mapping relations f 1 ( x ) = 1 - e - 2 x 1 + e - 2 x ; Mapping relationship f2(y)=y;
(6) BP neutral net intelligent algorithm discrimination model is converted to the discrimination formula that single-chip microcomputer can run, It specifically comprises the following steps that
First, conversion f1, and make O (IW*P+b1)1=f1(IW*P+b1)
O 1 = f 1 ( I W * P + b 1 ) = f 1 ( ( 1.0 e + 003 ) * 0.4222 - 0.7352 0 0.0001 3.7529 - 0.2363 * v d + ( 1.0 e + 003 ) * 0.3789 - 0.0004 - 1.1318 ) = f 1 ( ( 1.0 e + 003 ) * 0.4222 * v - 0.7352 * d + 0.3789 0.0001 * d - 0.0004 3.7529 * v - 0.2363 * d - 1.1318 )
Order:
x1=(1.0e+003) * (0.4222*v-0.7352*d+0.3789)
x2=(1.0e+003) * (0.0001*d-0.0004)
x3=(1.0e+003) * (3.7529*v-0.2363*d-1.1318)
y 1 = 1 - e - 2 x 1 1 + e - 2 x 1
y 2 = 1 - e - 2 x 2 1 + e - 2 x 2
y 3 = 1 - e - 2 x 3 1 + e - 2 x 3
Then:
O 1 = f 1 ( I W * P + b 1 ) = y 1 y 2 y 3
Secondly, M=f is converted2[LW*O1+b2]
M = f 2 &lsqb; L W * O 1 + b 2 &rsqb; = f 2 ( - 0.8350 - 2.6581 0.9930 * y 1 y 2 y 3 ) = - 0.8350 - 2.6581 0.9930 * y 1 y 2 y 3 = - 0.8350 * y 1 - 2.6581 * y 2 + 0.9930 * y 3
The acquisition mode of described spectral transmission value is:
Using the Apple Mould Core detection equipment of invention, centered by fruit stem, axle is every three sides of 120 degree To being acquired, each direction gathers 3 times, and averaged obtains spectral transmission Value Data.
In described gatherer process, light source wave band is 690-730nm.
In the present invention, utilize photoelectric switching circuit that described spectral transmission value is converted to magnitude of voltage.
Compared with prior art, the present invention based on visible ray-NIR transmittance spectroscopy, and narrow-band light source and Affect the Fructus Mali pumilae diameter of mould cardiopathia absorbance, morbidity Fructus Mali pumilae can be sorted out when Fructus Mali pumilae is put in storage timely and accurately, The large area preventing Apple Mould Core pathogenic bacteria infects, and significantly reduces the Fructus Mali pumilae morbidity at storing process Rate, has low cost, simple to operate, stable and reliable operation, disease discrimination precision high, and The method can be used for fruit graded in production line, for building " high yield, high-quality, efficiently, ecological, Safety " modern Apple Industry system provide the necessary technical support, the most expansible be applied to other fruit The Fast nondestructive evaluation of product interior quality.
Accompanying drawing explanation
Fig. 1 is the transmitted spectrum image curve figure of the mould cardiopathia fruit of different onset degree.
Fig. 2 is data acquisition equipment structural representation of the present invention.
Fig. 3 is Fructus Mali pumilae saddle top view in Fig. 2.
Fig. 4 is Fructus Mali pumilae saddle longitudinal sectional view in Fig. 2.
Fig. 5 is the module frame chart of discriminating device of the present invention.
Fig. 6 is the opto-electronic conversion flow chart of spectral transmission value of the present invention.
Fig. 7 is the instrumentation plan (initial position) of diameter value of the present invention.
Fig. 8 is the instrumentation plan (final position) of diameter value of the present invention.
Fig. 9 is data acquisition flow figure of the present invention.
Figure 10 is Fructus Mali pumilae health status scattergram in the sample data that the present invention gathers.
Detailed description of the invention
Embodiments of the present invention are described in detail below in conjunction with the accompanying drawings with embodiment.
Apple Mould Core spectral characteristic of the present invention and Cleaning Principle:
After Fructus Mali pumilae is fallen ill by mould cardiopathia infection process, its ventricle biological tissue molecule morphs, to spectrum Absorption, reflect and change with the effect such as scattering, owing to mould cardiopathia is fallen ill in ventricle, research uses thoroughly Penetrate mode, construct Apple Mould Core spectral response characteristic and seek platform.This platform is mainly by 4 50W Tungsten halogen lamp light source, marine optics spectrogrph USB2000+ and computer form.The response of spectrogrph Scope is 200nm to 1050nm, and resolution is 0.43nm;4 circular arrangements of tungsten halogen lamp light source, Its spectral band scope, from 300 to 2600nm, completely covers the wavelength band of Vis/NIR; Tungsten halogen lamp light source lower surface distance collimating mirror upper surface is 12cm.
Seeking platform based on Apple Mould Core spectral response characteristic, 500 apple sample, Herba Marsileae Quadrifoliae are chosen in test Really modes of emplacement is that fruit stem axial direction is vertical with light source direction of illumination, with fruit stem for the every 120 ° of directions of axis Measure five times, measure complete after sample is cut along at fruit stem, the health status of record Fructus Mali pumilae, use Image processing method calculates morbidity fruit onset area, accounts for the percentage ratio table of whole cross section area with onset area Levying occurring degree, the transmitted spectrum image of the mould cardiopathia fruit that test obtains 27 different onset degree is bent Line, as shown in Figure 1.
Test utilizes Matlab software, to totally 2048 dimension data in 184nm to 1035nm wave band, adopts Using correlation analysis method, result shows that ratio shared between 690-730nm is maximum, and therefore we extract Characteristic wave bands be 690-730nm, this wave band is that Fructus Mali pumilae produces to Apple Mould Core response best wave band After the cardiopathia that mildews pathological changes, the spectral absorption effect to this wave band is best, simultaneously because the difference of Fructus Mali pumilae diameter, Cause the distance of light spacing spectral receiver part, the i.e. change of light path, thus derivative spectomstry intensity is straight Connect decay, therefore according to above-mentioned principle, it is known that spectral absorbance values just can measure the mould heart of Fructus Mali pumilae with fruit footpath value The occurring degree of sick fruit.
Design of testing device process of the present invention is as follows:
1, mechanism's design
The measurement requirement of known spectra intensity in transmission and Fructus Mali pumilae diameter, research design Apple Mould Core is lossless The data acquisition equipment of detection, is first designed, as shown in Figure 2 its external form mechanism.This mechanism Mainly include detector body frame 7, Fructus Mali pumilae saddle 4, light source shelf, motor 1, leading screw 2, slide unit 3, The parts such as infrared switch type correlation tube fixing device 5, stroke-limit fixing rack for sensor 8, mechanism's design is wanted Ask guarantee light source center vertical with Fructus Mali pumilae saddle center align and distance scalable, design by Fructus Mali pumilae saddle 4 Being connected with slide unit 3, slide unit 3 can run under motor 1 drives in the vertical direction of leading screw 2, Body frame 7 top end is designed with infrared switch type correlation tube fixing device 5, for installation infrared switching mode correlation Pipe, it is ensured that tested apple sample and light source table identity distance fixed range, leading screw 2 lower end is designed with spacing row Journey fixing rack for sensor 8, is used for installing stroke limit sensor, it is ensured that Fructus Mali pumilae saddle declines every time and all locates In same position.
The present invention uses photodiode to receive transmitted spectrum intensity, and the photodiode 9 being packaged is pacified Being loaded in the centre bore of Fructus Mali pumilae saddle 4, design requires that photodiode 9 should be at a dark situation, protects The light intensity that card receives is entirely lit transmissive light light intensity, and Fructus Mali pumilae saddle 4 uses ladder platform to design, such as figure 3 and Fig. 4 show, adhering and sealing flexible shading material 10 on ladder platform, sample Fructus Mali pumilae is positioned over Fructus Mali pumilae torr On platform 4, upper strata flexible material deforms under Fructus Mali pumilae self gravitation pressure, and with lower floor's flexible material Laminating, thus realize a dark situation.
2, hardware designs
The present invention detects the hardware circuit MSP430F149 single-chip microcomputer with Texas Instruments as core processing Device, mainly by light source and driving module, spectral detection module, really footpath on-line measurement module, button mould Block and display module composition, design frame chart is as shown in Figure 5.
In light source and driving module thereof, light source uses the centre wavelength of 12 3W to be 710nm, half-wave Width is the LED light source of 25nm, and circuit connecting mode is 3 string 4 modes, and driving chip uses defeated Going out the PT4115 chip of current adjustment joint, single-chip microcomputer is adjusted by the pwm signal of output different duty The output electric current of joint PT4115, thus realize the stable quantitatively regulation of LED light source luminous intensity.
Spectral detection module is mainly photoelectric switching circuit.Electrooptical device uses THORLABS public The FDS1010 type photodiode of department, photoelectric conversion circuit such as Fig. 6 shows.First at photoelectric switching circuit Voltage input end use RC low pass filter, eliminate the high-frequency noise that brings of power supply, next uses fortune Put chip OP07 to be amplified by the voltage V0 of sampling resistor R3 end, terminate at output voltage Vout Filter capacitor, finally gets actually active magnitude of voltage.
Really footpath on-line measurement module use indirect measure, this on-line measurement device by motor 1, Leading screw 2, slide unit 3, infrared emission pipe 11 form with stroke limit sensitive switch 12 etc., its mid-infrared pair Penetrate pipe 11 and be installed on light shell outer cover, it is desirable to and the fixed distance parallel with LED array surface to ray 4mm;Stroke limit sensitive switch 12 is installed on main vertical frame, and to ray fixed distance H(120mm);Fructus Mali pumilae saddle 4 installed by slide unit 3, can back and forth movement, every time motion in vertical direction Initial position is the position of stroke limit sensitive switch 12, and Fructus Mali pumilae saddle 4 places apple sample After 13, slide unit 3 starts to run up, and stops after apple sample 13 upper surface cuts off infrared emission line, If now the position of slide unit 3 is final position and slide unit move distance is L, then Apples footpath result of calculation For D=(H-L).It is installed metering system such as Fig. 7 and Fig. 8 and shows.
It is mutual that key-press module mainly realizes with user with display module, and before instrument starts detection, user needs It configured, mainly select the place of production of tested sample Fructus Mali pumilae, kind and stored the time, joining Confirm after being set to merit to start detection, after detection, show testing result.
3, software design
Invention software mainly realizes the transmitted spectrum intensity of characteristic wave bands and the acquisition in fruit footpath, and mould cardiopathia is examined Survey instrument software flow such as Fig. 9, after instrument start, initialize LED light source array group, drive circuit, detection The I such as button, really calipers and light sensor O Interface device, after detection button is pressed, electricity Machine lead screw transmission drives Fructus Mali pumilae bearing to run supreme restraining position, gets Fructus Mali pumilae diameter value and puts Fructus Mali pumilae position In a suitable detection position, then output pwm signal sets output electric current, adjusts array of source Output intensity, after light source output is stable, controls spectral intensity detection module and obtains transmission value, finally locate The fruit footpath value obtained is substituted in discrimination model with transmitted intensity values by reason device, display output result of determination.
Wherein, it determines the foundation of model is as follows with verification method:
1, sample is chosen
Experiment Fructus Mali pumilae is Shaanxi Fuji apple, and the place of production is Qian County, Shaanxi, and Fructus Mali pumilae is stored in freezer after adopting In, storage temperature is 4 DEG C, and experiment Fructus Mali pumilae took out on May 1st, 2015 to be deposited under room temperature environment, Experiment is chosen size distribution uniform outer surface and is not damaged the Fructus Mali pumilae 120 with cicatrix, is cleaned up by epidermis, Number consecutively, experimental period is on May 8th, 2015.
2, data are gathered
Detecting instrument is mainly by obtaining the diameter of sample Fructus Mali pumilae, spectral transmission value and Fructus Mali pumilae morbidity state Set up Apple Mould Core discrimination model etc. data, software is set in and has detected rear output display fruit every time Footpath value and spectral transmission value, Fructus Mali pumilae modes of emplacement is that fruit stem axial direction is vertical with light source direction of illumination, real Test and each sample Fructus Mali pumilae is detected 9 times, with number label position for measuring position for the first time, clockwise Rotating every 120 ° to measure 3 times, after measurement, spectra re-recorded passes through value and fruit footpath value, and with transmission value The vertical in minimum measurement orientation is tangent plane cutting, records Fructus Mali pumilae health status, and wherein morbidity is designated as-1, Health is designated as 1.Experiment obtains 29 sick fruit data altogether, and 91 healthy fruits, if Figure 10 is sample Fructus Mali pumilae Health status scattergram, the most solid five-pointed star represents healthy fruit, and filled box represents mould cardiopathia fruit.
From this map analysis, it determines whether sample Fructus Mali pumilae falls ill belongs to classification problem, it is suitable therefore to select Classifying face can realize the differentiation of Apple Mould Core.Experiment 30 sick fruit data and 90 health respectively Fruit randomly selects 80% conduct modeling collection of gross sample number, and the sample of residue 20% collects as checking, therefore, Finally determine that healthy fruit 72, sick fruit 24, sum 96 are concentrated in modeling;Healthy fruit is concentrated in checking 18, sick fruit 6, sum 24.
3, model is set up
(1) 2 layers of BP network are used sample data point to be classified, in order to prevent only inputting absolute value mistake The neuron output caused greatly is saturated and ensures little not eaten of numerical value in output data, unifies dimension, First diameter data is normalized with transmission value data, normalization formula such as formula (1):
Z=z1+(z2-z1)*(x-xmin)/(xmax-xmin) (1)
Wherein z1=0.2, z2=0.9, represent that the scope of data after normalization is 0.2 to 0.9;X represents and treats normalization Data;xmin、xmaxRepresent minimum and the maximum, i.e. original data range of original classification data sequence;z Represent the data after normalization.
(2) according to market survey and experimental analysis determine in original classification data Fructus Mali pumilae diameter in the range of 50mm to 100mm, transmitted spectrum opto-electronic conversion magnitude of voltage is in the range of 0mv to 600mv.
(3) BP neural network object attribute is: input vector is 2 dimensions, and network hidden layer has 3 nerves Unit, output layer has 1 neuron, and the transmission function of hidden layer network is tanh S type activation primitive, The transmission function of output layer is linear activation primitive, and training function uses the gradient of error to decline back propagation Algorithm, learning rate is set to 0.05, and target error is 1e-6.
(4) choose the error preferable network of subclassification effect, get input layer to the weights square of hidden layer Battle array IW such as formula (2), the threshold matrix b1 such as formula (3) of input layer to hidden layer, hidden layer is to output layer Weight matrix LW such as formula (4), the threshold matrix b2 such as formula (5) of hidden layer to output layer.
I W = ( 1.0 e + 003 ) * 0.4222 - 0.7352 0 0.0001 3.7529 - 0.2363 - - - ( 2 )
b 1 = ( 1.0 e + 003 ) * 0.3789 - 0.0004 - 1.1318 - - - ( 3 )
LW=[-0.8350-2.6581 0.9930] (4)
B2=-0.5551 (5)
(5) set checking and integrate the fruit footpath of sample Fructus Mali pumilae as D, be V through spectral intensity opto-electronic conversion magnitude of voltage, Apple Mould Core differentiates that result is M, then can be calculated differentiation result M according to D, V-value, and if M>0, it is determined that result is healthy fruit, M<0, it is determined that result is disease fruit.
Wherein the calculating process of M is as follows:
A, input vector P normalization: d=0.2+ (0.9-0.2) * (D-50)/(100-50); V=0.2+ (0.9-0.2) * (V-0)/(800-0).
Fruit footpath after d Yu v represents normalization respectively in formula and opto-electronic conversion magnitude of voltage.
B, calculating network output valve: M=f2[LW*f1(IW*P+b1)+b2], wherein input vector P = v d , Mapping relations f 1 ( x ) = 1 - e - 2 x 1 + e - 2 x ; Mapping relationship f2(y)=y.
(6) BP neutral net intelligent algorithm discrimination model is converted to the discrimination formula that single-chip microcomputer can run, It specifically comprises the following steps that
A, conversion f1, and make O (IW*P+b1)1=f1(IW*P+b1)
O 1 = f 1 ( I W * P + b 1 ) = f 1 ( ( 1.0 e + 003 ) * 0.4222 - 0.7352 0 0.0001 3.7529 - 0.2363 * v d + ( 1.0 e + 003 ) * 0.3789 - 0.0004 - 1.1318 ) = f 1 ( ( 1.0 e + 003 ) * 0.4222 * v - 0.7352 * d + 0.3789 0.0001 * d - 0.0004 3.7529 * v - 0.2363 * d - 1.1318 )
Order:
x1=(1.0e+003) * (0.4222*v-0.7352*d+0.3789)
x2=(1.0e+003) * (0.0001*d-0.0004)
x3=(1.0e+003) * (3.7529*v-0.2363*d-1.1318)
y 1 = 1 - e - 2 x 1 1 + e - 2 x 1
y 2 = 1 - e - 2 x 2 1 + e - 2 x 2
y 3 = 1 - e - 2 x 3 1 + e - 2 x 3
The most above-mentioned formula can change into:
O 1 = f 1 ( I W * P + b 1 ) = y 1 y 2 y 3
B, conversion M=f2[LW*O1+b2]
M = f 2 &lsqb; L W * O 1 + b 2 &rsqb; = f 2 ( - 0.8350 - 2.6581 0.9930 * y 1 y 2 y 3 ) = - 0.8350 - 2.6581 0.9930 * y 1 y 2 y 3 = - 0.8350 * y 1 - 2.6581 * y 2 + 0.9930 * y 3
Therefore: known input fruit footpath value and transmitted spectrum opto-electronic conversion magnitude of voltage D and V, then based on single-chip microcomputer Apple Mould Core discrimination model program circuit as follows:
Obtain D and V;
D and v is obtained according to equation below normalization:
D=0.2+ (0.9-0.2) * (D-50)/(100-50)
V=0.2+ (0.9-0.2) * (V-0)/(800-0)
Intermediate variable x is calculated according to equation below1、x2、x3:
x1=(1.0e+003) * (0.4222*v-0.7352*d+0.3789)
x2=(1.0e+003) * (0.0001*d-0.0004)
x3=(1.0e+003) * (3.7529*v-0.2363*d-1.1318)
Intermediate variable y is calculated according to equation below1、y2、y3:
y 1 = 1 - e - 2 x 1 1 + e - 2 x 1
y 2 = 1 - e - 2 x 2 1 + e - 2 x 2
y 3 = 1 - e - 2 x 3 1 + e - 2 x 3
Finally according to formula M=-0.8350*y1-2.6581*y2+0.9930*y3Calculate M.
4, modelling verification and interpretation of result
The initial data of 24 sample Fructus Mali pumilaes of checking collection is brought in discrimination model, it determines result such as table 1:
Table 1 checking collection result of determination statistical table
H (health represents healthy fruit) in remarks table, S (sick represents disease fruit)
Having 1 as seen from the above table in 6 mould cardiopathia disease fruits and be mistaken for healthy fruit, 24 healthy fruits are all sentenced Fixed correct, the misjudged No. 180 sample Fructus Mali pumilaes of observation analysis find that the incidence type of this Fructus Mali pumilae is dry rot, really Core boring and symptom are slight, cause the Absorption to light source light spectrum little.
The foundation of model of the present invention fully relies on the voltage that invented Apple Mould Core detection equipment gets Value and fruit footpath value, software and hardware based on core devices such as LED, MSP430 processor, photodiodes Design so that detection equipment achieves miniaturization and low cost, the most also has higher accuracy of detection, This is big advantage and a breakthrough.

Claims (3)

  1. The method for building up of the most SCM Based BP neutral net Apple Mould Core discrimination model, model is public Formula is: M=-0.8350*y1-2.6581*y2+0.9930*y3, wherein, M represents final differentiation result, y 1 = 1 - e - 2 x 1 1 + e - 2 x 1 , y 2 = 1 - e - 2 x 2 1 + e - 2 x 2 , y 3 = 1 - e - 2 x 3 1 + e - 2 x 3 , y1, y2, y3, x1, x2, x3It is intermediate variable, x1=(1.0e+003) * (0.4222*v-0.7352*d+0.3789), x2=(1.0e+003) * (0.0001*d-0.0004), x3=(1.0e+003) * (3.7529*v-0.2363*d-1.1318), v represent the fruit footpath value after normalization, and d represents and returns The opto-electronic conversion magnitude of voltage corresponding with spectral transmission value after one change, V=0.2+ (0.9-0.2) * (V-0)/(800-0), d=0.2+ (0.9-0.2) * (D-50)/(100-50), V represent former Begin fruit footpath value, and D represents the original opto-electronic conversion magnitude of voltage corresponding with spectral transmission value, as M < 0, says There is mould cardiopathia in bright Fructus Mali pumilae, it is characterised in that method for building up comprises the steps:
    Step 1, sets up sample data
    Randomly choose 120 to number one by one without the Fructus Mali pumilae of open defect, in the environment of humiture is constant, Gather diameter value and the spectral transmission value of each Fructus Mali pumilae, then at caulom, cut Fructus Mali pumilae, it is determined whether have Mould cardiopathia, by diameter value and spectral transmission value collectively as sample data;
    Step 2, sets up model
    (1) 2 layers of BP network are used sample data point to be classified, in order to prevent only inputting absolute value mistake The neuron output caused greatly is saturated and ensures little not eaten of numerical value in output data, unifies dimension, First diameter value is normalized with spectral transmission value, normalization formula:
    Z=z1+(z2-z1)*(x-xmin)/(xmax-xmin)
    Wherein z1=0.2, z2=0.9, represent that the scope of data after normalization is 0.2 to 0.9;X represents and treats normalization Data;xmin、xmaxRepresent minimum and the maximum, i.e. original data range of original classification data sequence; Z represents the data after normalization;
    (2) determining that in original classification data, Fructus Mali pumilae diameter value is in the range of 50mm to 100mm, spectrum is saturating Cross the opto-electronic conversion magnitude of voltage corresponding to value in the range of 0mv to 600mv;
    (3) BP neural network object attribute: input vector is 2 dimensions, network hidden layer has 3 neurons, Output layer has 1 neuron, and the transmission function of hidden layer network is tanh S type activation primitive, output The transmission function of layer is linear activation primitive, and training function uses the gradient of error to decline back-propagation algorithm, Learning rate is set to 0.05, and target error is 1e-6;
    (4) choose error in classification less than the network of target error, get input layer to the weights of hidden layer Matrix IW, input layer to the threshold matrix b1 of hidden layer, hidden layer to output layer weight matrix LW with And hidden layer is to the threshold matrix b2 of output layer, expression formula is as follows:
    I W = ( 1.0 e + 003 ) * 0.4222 - 0.7352 0 0.0001 3.7529 - 0.2363
    b 1 = ( 1.0 e + 003 ) * 0.03789 - 0.0004 - 1.1318
    LW=[-0.8350-2.6581 0.9930]
    B2=-0.5551
    (5) setting a diameter of D of Fructus Mali pumilae to be verified, the opto-electronic conversion magnitude of voltage corresponding to spectral transmission value is V, Apple Mould Core differentiates that result is M, then can be calculated differentiation result M according to D, V-value, and If M>0, it is determined that result is healthy fruit, M<0, it is determined that result is disease fruit;
    Wherein the calculating process of M is as follows:
    First, input vector P normalization: d=0.2+ (0.9-0.2) * (D-50)/(100-50); V=0.2+ (0.9-0.2) * (V-0)/(800-0);
    Diameter value after d Yu v represents normalization respectively in formula and opto-electronic conversion magnitude of voltage;
    Secondly, network output valve: M=f is calculated2[LW*f1(IW*P+b1)+b2], wherein input vector P = v d , Mapping relationsMapping relationship f2(y)=y;
    (6) BP neutral net intelligent algorithm discrimination model is converted to the discrimination formula that single-chip microcomputer can run, It specifically comprises the following steps that
    First, conversion f1, and make O (IW*P+b1)1=f1(IW*P+b1)
    O 1 = f 1 ( I W * P + b 1 ) = f 1 ( ( 1.0 e + 003 ) * 0.4222 - 0.7352 0 0.0001 3.7529 - 0.2363 * v d + ( 1.0 e + 003 ) * 0.3789 - 0.0004 - 1.1318 ) = f 1 ( ( 1.0 e + 003 ) * 0.4222 * v - 0.7352 * d + 0.3789 0.0001 * d - 0.0004 3.7529 * v - 0.2363 * - 1.1318 )
    Order:
    x1=(1.0e+003) * (0.4222*v-0.7352*d+0.3789)
    x2=(1.0e+003) * (0.0001*d-0.0004)
    x3=(1.0e+003) * (3.7529*v-0.2363*d-1.1318)
    y 1 = 1 - e - 2 x 1 1 + e - 2 x 1
    y 2 = 1 - e - 2 x 2 1 + e - 2 x 2
    y 3 = 1 - e - 2 x 3 1 + e - 2 x 3
    Then:
    O 1 = f 1 ( I W * P + b 1 ) = y 1 y 2 y 3
    Secondly, M=f is converted2[LW*O1+b2]
    M = f 2 &lsqb; L W * O 1 + b 2 &rsqb; = f 2 ( - 0.8350 - 2.6581 0.9930 * y 1 y 2 y 3 ) = - 0.8350 - 2.6581 0.9930 * y 1 y 2 y 3 = - 0.8350 * y 1 - 2.6581 * y 2 + 0.9930 * y 3 .
  2. The most SCM Based BP neutral net Apple Mould Core discrimination model Method for building up, it is characterised in that in described gatherer process, light source wave band is 690-730nm.
  3. The most SCM Based BP neutral net Apple Mould Core discrimination model Method for building up, it is characterised in that utilize photoelectric switching circuit that described spectral transmission value is converted to voltage Value.
CN201510447612.XA 2015-07-27 2015-07-27 SCM Based BP neutral net Apple Mould Core discrimination model and method for building up thereof Active CN105069504B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510447612.XA CN105069504B (en) 2015-07-27 2015-07-27 SCM Based BP neutral net Apple Mould Core discrimination model and method for building up thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510447612.XA CN105069504B (en) 2015-07-27 2015-07-27 SCM Based BP neutral net Apple Mould Core discrimination model and method for building up thereof

Publications (2)

Publication Number Publication Date
CN105069504A CN105069504A (en) 2015-11-18
CN105069504B true CN105069504B (en) 2016-08-24

Family

ID=54498865

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510447612.XA Active CN105069504B (en) 2015-07-27 2015-07-27 SCM Based BP neutral net Apple Mould Core discrimination model and method for building up thereof

Country Status (1)

Country Link
CN (1) CN105069504B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105866050A (en) * 2016-05-24 2016-08-17 西北农林科技大学 Low-cost lossless and fast detecting equipment for apple moldy core
CN108537323B (en) * 2018-03-30 2022-04-19 滁州学院 Aluminum electrolytic capacitor roll core diameter calculation method based on artificial neural network

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007303940A (en) * 2006-05-10 2007-11-22 Mitsui Mining & Smelting Co Ltd Device and method for inspecting internal quality of vegetables and fruits

Also Published As

Publication number Publication date
CN105069504A (en) 2015-11-18

Similar Documents

Publication Publication Date Title
Teerachaichayut et al. Non-destructive prediction of total soluble solids, titratable acidity and maturity index of limes by near infrared hyperspectral imaging
CN105181642B (en) A kind of near infrared detection method of peanut quality and application
Zhu et al. Determining sugar content and firmness of ‘Fuji’apples by using portable near‐infrared spectrometer and diffuse transmittance spectroscopy
CN106000914A (en) Apple sorting device for on-line nondestructive test on moldy core
CN103948393B (en) A kind of near infrared no-wound detection method of blood constituent content and device
CN111157511B (en) Egg freshness nondestructive testing method based on Raman spectrum technology
CN104568824B (en) Shrimps grade of freshness detection method and device based on Vis/NIR
CN105866050A (en) Low-cost lossless and fast detecting equipment for apple moldy core
Xiang et al. Deep learning and hyperspectral images based tomato soluble solids content and firmness estimation
Moomkesh et al. Early detection of freezing damage in sweet lemons using Vis/SWNIR spectroscopy
CN108542402A (en) Blood sugar detecting method based on Self-organizing Competitive Neutral Net model and infrared spectrum
CN105069504B (en) SCM Based BP neutral net Apple Mould Core discrimination model and method for building up thereof
Nturambirwe et al. Detecting bruise damage and level of severity in apples using a contactless nir spectrometer
CN205719951U (en) Detect black box and utilize the lossless quick detection equipment of Apple Mould Core of this detection black box
Tian et al. Improving the prediction performance of soluble solids content (SSC) in kiwifruit by means of near-infrared spectroscopy using slope/bias correction and calibration updating
CN104931439B (en) Apple Mould Core detector
Srivastava et al. Data fusion for fruit quality authentication: combining non-destructive sensing techniques to predict quality parameters of citrus cultivars
Huang et al. Fusion models for detection of soluble solids content in mandarin by Vis/NIR transmission spectroscopy combined external factors
Chia et al. Pre-dispersive near-infrared light sensing in non-destructively classifying the brix of intact pineapples
Ning et al. Study on apple damage detecting method based on relaxation single-wavelength laser and convolutional neural network
CN116242791A (en) Apple moldy heart disease detection method integrating spectral morphological characteristics
Srivastava et al. Handheld, smartphone based spectrometer for rapid and nondestructive testing of citrus cultivars
CN105158178A (en) Rapid modeling method for detecting sugar content of navel orange based on spectral peak area in high spectral transmission technology
Li et al. Near-infrared spectroscopy for determining grain constituent contents at grain elevators
CN1789978A (en) Non-destructive detection method for quickly detecting inner quality of apple

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant