Summary of the invention
In view of the above-mentioned problems, being store the present invention provides a kind of based on cell neural network and the fruit juice of electronic nose feature extraction
Hiding phase detection algorithm is measured in real time the fruit juice during fruit storage, qualitative change or lesion occurs, and improves fruit and saves
Reliability.
In order to achieve the above objectives, the specific technical solution that the present invention uses is as follows:
A kind of juice storage phase detection algorithm based on cell neural network and electronic nose feature extraction, key are:
S1: fruit juice gas sample is obtained;
S2: building fruit juice gas electronic nose monitors system, and carries out odor detection to fruit juice gas sample, obtains fruit juice gas
Body original response data set;
S3: screening sensor;Sensor is screened using X binary parameters, obtains labeled sensor group, the sensing
The collected data of device group are label response data sets, and are arranged in response matrix M × N;
S4: cell neural network template of the selection with unknown parameter establishes band unknown parameter according to response matrix is arranged in
Fruit juice gas cell neural network;The label response data sets of step S3 are input to the fruit juice gas cell with unknown parameter
Characteristic point label is carried out in neural network, obtains sensor characteristics point;
S5: using enhanced krill colony optimization algorithm, seeks optimal value to all unknown parameters, and to all the sensors spy
Sign point carries out feature extraction, obtains corresponding cell neural network template and corresponding cell neural network;
S6: the classifying quality obtained according to sensor characteristics point tests the ability in feature extraction of cell neural network
Card.
Further, it obtains fruit juice gas sample in step sl to be arranged in vaporizer, which includes fruit juice
Container, which is provided with venthole and one end of appendix connects, and the other end of the appendix protrudes into the electronics
Nose monitors in the monitoring chamber of system.
Wherein, when making fruit juice, the fruit of the same similar maturity of arbitrary extracting X kg;It is squeezed the juice, is passed through using cold press technique
It is packed into vaporizer after filtering, sterilizing;Every N minutes stirring is primary.Fruit gas is sent into electronic nose monitoring system from appendix
It monitors in chamber.
Further, the sensor in fruit juice gas electronic nose monitoring system in step s 2 needs to pre-process:
S21: being exposed to clean air Q minutes for all the sensors, to obtain detection baseline;
S22: fruit juice gas sample is introduced in the monitoring chamber of the electronic nose monitoring system, the duration is P minutes;
Return step S21.Q, P is set according to actual needs.
Before each sampling test, self-test is carried out to fruit juice gas electronic nose monitoring system, to the power of sensor array
Then the preheated one-section time carries out normal odor detection.In the detection process, it is sensed using smell acquisition software real-time display
Response curve of the device array to orange juice smell.
Wherein, the environmental factor in setting fruit juice gas electronic nose monitoring system is also needed.Wherein at least include environment temperature,
Humidity.
Further, when screening sensor, when setting the binary number of corresponding sequence digit as 1, then labeled as choosing
In the sensor;Labeled as 0, then labeled as unselected.
Further, the fruit juice gas cell neural network in step S4 with unknown parameter are as follows:
I=1,2 ..., M, j=1,2 ..., N;
xij(t) be cell neural network any cell C (i, j) state value, primary condition xij(0)=0;
uijIt is cell neural network any cell C (i, j) input, wherein static input | uij|≤1;
yij(t) be cell neural network any cell C (i, j) output;
A(i,j;k,l),B(i,j;K, l), I be cell neural network cell C (k, l) C (i, j) template;
A is a feedback template, and B is a control cloned template, and I is threshold value, is threshold value unknown parameter;
The state of each unit and output are related to the unit for being connected to it, for each cell C (i, j), below
Set Nr(i, j) can be defined as name R neighborhood;
Nr(i,j)
=C (k.l) :=max (| (k-i) |, | l-j |)≤r, 1≤k≤M, 1≤l≤N,
Wherein, radius of neighbourhood r is positive integer, is the index for indicating cell position, i.e. GU Generic Unit to (i, j) and (k, l)
And its row and column of adjacent cells within a grid.
Therefore, for cell arrangement in the R neighborhood of C (i, j), size is (2r+1) × (2r+1) grid.
Further, in step S4, cell neural network type includes that single mode plate cell neural network and multi-template are thin
Born of the same parents' neural network;
When for single mode plate cell neural network:
When multi-template cell neural network:
Wherein i is the sequence number of sensor, and j is j-th of sampled point of i-th of sensor;I=1,2 ... M;M≤X;J=
1,2,…1024;When X is screening sensor, the digit of binary number;M is template number, equal with the sensor number of screening;
'+' and '-' are for marking time sequencing;
x1、x2、x3, b be control the unknown control parameter of cloned template;A is the unknown control parameter for feeding back template.
Further, it in step S4, feeds back unknown in unknown control parameter a, the control cloned template B in template A
Control parameter x1、x2、x3, b, Existence restraint condition between threshold value I:
Further, in step s 5, unknown parameter is selected using enhanced krill colony optimization algorithm,
In, unknown parameter includes feeding back the unknown control parameter a in template A, the unknown control parameter x in control cloned template B1、x2、
x3, b, threshold value I;
The specific steps of step S5 are as follows:
Step (a): sensor representative was carried out using the X bit generated by enhanced krill colony optimization algorithm
Filter;
Step (b): the response that sensor obtains is aligned in response matrix M × N of cell neural network input;
Step (c): if selection multi-template cell neural network, response matrix M × N input cell neural network, make to ring
Answer the corresponding template of any sensor of matrix M × N;
If selecting single mode plate, all the sensors are used for using the same template;The parameter of the same template is by enhanced
Krill colony optimization algorithm optimizes;
Step (d): the sensor characteristics point of cell neural network is handled, to obtain feature extraction result;
Step (e): feature extraction result is input in classifier to obtain discrimination, and excellent using enhanced krill group
Change the parameter that algorithm carrys out Optimum Classification device;
Step (f): it repeats the above steps to obtain overall optimal parameter;It obtains and is most suitable for what each sensor characteristics were extracted
Cell neural network template.
Further, enhanced krill colony optimization algorithm step are as follows:
Step 1: initialization initializes the number of iterations, enables I=1;And NP krill population P is initialized, set speed of looking for food
Vf, maximally diffuse speed Dmax, maximum induced velocity Nmax, maximum number of iterations MI;
Step 2: fitness calculates;Its grade of fit is calculated according to the initial position of each krill krill population;
Step 3: as I < MI, all krill populations are ranked up according to grade of fit;And to krill population execute with
Lower motion calculation:
It is looked for food using the krill population movement of other individual inductions, realizes movement physical diffusion;
According to formulaCalculate decision weights factor dxi/dt;
Ni, Fi and Di indicate movement of looking for food, and the physical diffusion by other krill populations and krill population i is influenced;The
One movement Fi includes two parts: current foodstuff position and the information in relation to previous position;Realize crossing operation symbol;
Update the position of the krill population in search space;And it is calculated according to the new position of krill population and new is suitble to
Degree;I=I+1 is enabled, step 1 is returned.
Beneficial effects of the present invention: it experiments have shown that the behavioral characteristics of electronic nose sensor response have more distinction, is input to
Effect in classifier is more preferable than traditional characteristic extracting method.Cell neural network devises the template applied to electric nasus system
With data preprocessing method, solve the problems, such as that the electronic nose sensor response of time series is not available cell neural network.
This method can be applied to various fruit and fruit juice, and in addition to the detection of storage period, it can be also used for detecting different processing classes
Type, fruit juice concn and other information, this is conducive to following fruit classification fruit juice production industry quality.It may be supervisor
The quality inspection of structure provides reference.
Specific embodiment
Specific embodiment and working principle of the present invention will be described in further detail with reference to the accompanying drawing.
A kind of juice storage phase detection algorithm based on cell neural network and electronic nose feature extraction, can be in conjunction with Fig. 1
Find out, committed step are as follows:
S1: fruit juice gas sample is obtained;In the present embodiment, it by taking orange blossom as an example, is analyzed.
It obtains fruit juice gas sample in step sl to be arranged in vaporizer, which includes juice container, the fruit juice
Container is provided with venthole and one end of appendix connects, and the other end of the appendix protrudes into the electronic nose monitoring system
It monitors in chamber.
Wherein, when making fruit juice, the fruit of the same similar maturity of arbitrary extracting 5kg;It is squeezed the juice, is passed through using cold press technique
It is packed into vaporizer after filter, sterilizing;Stirring in every 15 minutes is primary.Fruit gas is sent into the prison of electronic nose monitoring system from appendix
It surveys in chamber.
As it can be seen from table 1 as shown in table 1 to the analysis of orange blossom fragrance component.
1 orange blossom analysis of aroma components table of table
S2: building fruit juice gas electronic nose monitors system, and carries out odor detection to fruit juice gas sample, obtains fruit juice gas
Body original response data set;
The sensor in fruit juice gas electronic nose monitoring system in step s 2 needs to pre-process:
S21: being exposed to clean air 5 minutes for all the sensors, to obtain detection baseline;
S22: fruit juice gas sample is introduced in the monitoring chamber of the electronic nose monitoring system, the duration is 7 minutes;
Return step S21.
Wherein, in fruit juice gas electronic nose monitoring system, see Table 2 for details for the sensitive features distribution of each gas sensor.
The sensitive prime characteristic of 2 gas sensor of table
Note: the response of these sensors is nonspecific.Other than the sensitive prime gas in table 2, they may be also
To other gas sensitizations.
Wherein, the temperature and humidity of gas electronic nose monitoring system detection chamber is set as 25 DEG C and 40% first.
Further, when screening sensor, when setting the binary number of corresponding sequence digit as 1, then labeled as choosing
In the sensor;Labeled as 0, then labeled as unselected.
S3: screening sensor;Sensor is screened using 15 binary parameters, obtains labeled sensor group, the biography
The collected data of sensor group are label response data sets, and are arranged in response matrix M × N;It is detailed in Fig. 3
S4: cell neural network template of the selection with unknown parameter establishes band unknown parameter according to response matrix is arranged in
Fruit juice gas cell neural network;The label response data sets of step S3 are input to the fruit juice gas cell with unknown parameter
Characteristic point label is carried out in neural network, obtains sensor characteristics point;
Fig. 4 shows a simple two dimension CNN structure, and square indicates unity element, and the line between unit indicates single
Interaction between member.As far as we know, each unit is connected solely to the nearest-neighbors in network, and adjacent cell is straight
Connect interaction.Due to the duration dynamic transmission of CNN, there is indirect influence between the cell not being directly connected to.It is any to choose
One representational cell, which is connected thereto, under, left and right, upper left, lower-left, upper right and lower right list
First lattice.The cell at 4 angles will be connected to 3 adjacent cells, and remaining peripheral cells will be connected to 5 cells.Each cell
It is a nonlinear dynamic system, state is related with input, output and dynamics rule.
Further, the fruit juice gas cell neural network in step S4 with unknown parameter are as follows:
I=1,2 ..., M, j=1,2 ..., N;
xij(t) be cell neural network any cell C (i, j) state value, primary condition xij(0)=0;
uijIt is cell neural network any cell C (i, j) input, wherein static input | uij|≤1;
yij(t) be cell neural network any cell C (i, j) output;
A(i,j;k,l),B(i,j;K, l), I be cell neural network cell C (k, l) C (i, j) template;
A is a feedback template, and B is a control cloned template, and I is threshold value, is threshold value unknown parameter;
The state of each unit and output are related to the unit for being connected to it, for each cell C (i, j), below
Set Nr(i, j) can be defined as name R neighborhood;
Nr(i,j)
=C (k.l) :=max (| (k-i) |, | l-j |)≤r, 1≤k≤M, 1≤l≤N,
Wherein, radius of neighbourhood r is positive integer, is the index for indicating cell position, i.e. GU Generic Unit to (i, j) and (k, l)
And its row and column of adjacent cells within a grid.
Therefore, for cell arrangement in the R neighborhood of C (i, j), size is (2r+1) × (2r+1) grid.Cytocidal action
The working principle of network is as shown in figure 5, output function is as shown in Figure 6.
In step S4, cell neural network type includes single mode plate cell neural network and multi-template cell neural network;
When for single mode plate (single-template) cell neural network:
When multi-template (multi-template) cell neural network:
Wherein i is the sequence number of sensor, as shown in fig. 7, j is j-th of sampled point of i-th of sensor;
I=1,2 ... M;M≤X;J=1,2 ... 1024;When X is screening sensor, the digit of binary number;M is template
Number is equal with the sensor number of screening;
'+' and '-' are for marking time sequencing;
x1、x2、x3, b be control the unknown control parameter of cloned template;A is the unknown control parameter for feeding back template.
In conjunction with table 3, in step S4, the unknown control parameter a in template A, the unknown control in control cloned template B are fed back
Parameter x1、x2、x3, b, Existence restraint condition between threshold value I:
Further, in step s 5, unknown parameter is selected using enhanced krill colony optimization algorithm,
In, unknown parameter includes feeding back the unknown control parameter a in template A, the unknown control parameter x in control cloned template B1、x2、
x3, b, threshold value I;
The details for the parameter that table 3 needs to optimize
S5: using enhanced krill colony optimization algorithm, seeks optimal value to all unknown parameters, and to all the sensors spy
Sign point carries out feature extraction, obtains corresponding cell neural network template and corresponding cell neural network;The tool of step S5
Body step are as follows:
Step (a): sensor representative was carried out using the X bit generated by enhanced krill colony optimization algorithm
Filter;
Step (b): the response that sensor obtains is aligned in response matrix M × N of cell neural network input;
Step (c): if selection multi-template cell neural network, response matrix M × N input cell neural network, make to ring
Answer the corresponding template of any sensor of matrix M × N;
If selecting single mode plate, all the sensors are used for using the same template;The parameter of the same template is by enhanced
Krill colony optimization algorithm optimizes;
Step (d): the sensor characteristics point of cell neural network is handled, to obtain feature extraction result;
In conjunction with Fig. 7 as can be seen that have multiple characteristic points labeled when marker characteristic point, such as density bullet in Fig. 7
Point is labeled characteristic point, but ideally, is that these labeled characteristic points are represented with a value, in conjunction with Fig. 8,
Using the maximum value for calculating all characteristic points, minimum value, average value and difference, maximum value, minimum value, average value and difference are exactly special
Sign extracts result.
Step (e): feature extraction result is input in classifier to obtain discrimination, and excellent using enhanced krill group
Change the parameter that algorithm carrys out Optimum Classification device;
The orange blossom used in the present embodiment has 4 kinds of storage periods, so each sample corresponds to 4 kinds of different labels 1
23 4. these sample datas, either training data and test data input after classifier, and classifier judges out them
Label, the label that classifier is judged and true tag comparison, can obtain discrimination.And it is excellent using enhanced krill group
Change the parameter that algorithm carrys out Optimum Classification device.
Step (f): it repeats the above steps to obtain overall optimal parameter;It obtains and is most suitable for what each sensor characteristics were extracted
Cell neural network template.
Further, enhanced krill colony optimization algorithm step are as follows:
Step 1: initialization initializes the number of iterations, enables I=1;And NP krill population P is initialized, set speed of looking for food
Vf, maximally diffuse speed Dmax, maximum induced velocity Nmax, maximum number of iterations MI;
Step 2: fitness calculates;Its grade of fit is calculated according to the initial position of each krill krill population;
Step 3: as I < MI, all krill populations are ranked up according to grade of fit;And to krill population execute with
Lower motion calculation:
It is looked for food using the krill population movement of other individual inductions, realizes movement physical diffusion;
According to formulaCalculate decision weights factor dxi/dt;
Ni, FiAnd DiExpression is looked for food movement, and the physical diffusion by other krill populations and krill population i is influenced;First
A movement FiIncluding two parts: current foodstuff position and in relation to the information of previous position;Realize crossing operation symbol;
Update the position of the krill population in search space;And it is calculated according to the new position of krill population and new is suitble to
Degree;I=I+1 is enabled, step 1 is returned.
S6: the classifying quality obtained according to sensor characteristics point tests the ability in feature extraction of cell neural network
Card.
The feature extraction result and support vector machines (SVM) of CNN, radial basis function (RBF), core linear discriminant analysis
(KLDA) three kinds of classical taxonomy devices combine.Enhanced krill colony optimization algorithm (EKH) is used for parameter optimization.Each program repeats
10 times, wherein optimum is the final result of each classifier, and the results are shown in Table 4, describes test data (Acc_
Test) and training data (Acc_train), it is evident that when being marked with CNN, characteristic point has good dynamic characteristic with area
Divide the Storage period of orange blossom.Fig. 8 shows that test data concentrates the recognition accuracy of different value.Average value is than other processing methods
More comprehensively, the dynamic characteristic and optimum performance that can be responded with representative sensor.
Therefore, compared with other feature extracting methods, average value is derived from feature as sensor response characteristic.Such as preceding institute
It states, they are in response to maximum value (Max), integrate (Integral), curve matching (Curve Fitting), principal component analysis
(PCA) and core principle component analysis (KPCA).Then we use support vector machines (SVM), radial basis function neural network
(RBFNN), the effect of these feature extractions is compared in core linear discriminant analysis (KLDA) as classifier.The results are shown in Table 5.
As can be seen that CNN feature extraction effect is substantially better than other algorithms, as shown in Figure 9.
The nicety of grading of different characteristic point shows table (%) after the processing of 4 cell neural network of table
The classification accuracy (%) that 5 different characteristic of table is extracted
It is shown above the result is that being obtained from multi-template CNN.In addition, the performance test of single mode plate CNN is as follows.Single mode plate
It is as shown in table 6 with the recognition effect of multi-template CNN.
It may be seen that single template version of CNN can be a bit weaker, but compared with other schemes shown in Fig. 10, it is still
With good ability in feature extraction.
The result shows that CNN can be applied to electronic nose feature extraction field, it is proposed by the present invention that there is good identification essence
Degree.Again it is apparent that CNN outstanding image-capable can be applied to electronic nose feature extraction field, the spy based on CNN
Sign extraction algorithm helps to improve the accuracy of electronic nose identification.
The classification accuracy (%) of 6 single mode plate of table and multi-template CNN
It should be pointed out that the above description is not a limitation of the present invention, the present invention is also not limited to the example above,
Variation, modification, addition or the replacement that those skilled in the art are made within the essential scope of the present invention, are also answered
It belongs to the scope of protection of the present invention.