CN106124451B - A method of update the system and detection through the detection of packaging bag On-line near infrared analyzer - Google Patents

A method of update the system and detection through the detection of packaging bag On-line near infrared analyzer Download PDF

Info

Publication number
CN106124451B
CN106124451B CN201610792109.2A CN201610792109A CN106124451B CN 106124451 B CN106124451 B CN 106124451B CN 201610792109 A CN201610792109 A CN 201610792109A CN 106124451 B CN106124451 B CN 106124451B
Authority
CN
China
Prior art keywords
near infrared
target detection
detection component
modeling
sample
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
CN201610792109.2A
Other languages
Chinese (zh)
Other versions
CN106124451A (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.)
Upper Seabird And Hundred Million Electronics Technology Development Co Ltds
Original Assignee
Upper Seabird And Hundred Million Electronics Technology Development Co Ltds
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 Upper Seabird And Hundred Million Electronics Technology Development Co Ltds filed Critical Upper Seabird And Hundred Million Electronics Technology Development Co Ltds
Priority to CN201610792109.2A priority Critical patent/CN106124451B/en
Publication of CN106124451A publication Critical patent/CN106124451A/en
Application granted granted Critical
Publication of CN106124451B publication Critical patent/CN106124451B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/17Systems in which incident light is modified in accordance with the properties of the material investigated
    • G01N21/25Colour; Spectral properties, i.e. comparison of effect of material on the light at two or more different wavelengths or wavelength bands
    • G01N21/31Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry
    • G01N21/35Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry using infrared light
    • G01N21/359Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry using infrared light using near infrared light
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N2201/00Features of devices classified in G01N21/00
    • G01N2201/12Circuits of general importance; Signal processing
    • G01N2201/129Using chemometrical methods

Landscapes

  • Physics & Mathematics (AREA)
  • Spectroscopy & Molecular Physics (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Biochemistry (AREA)
  • General Health & Medical Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Immunology (AREA)
  • Pathology (AREA)
  • Investigating Or Analysing Materials By Optical Means (AREA)

Abstract

The invention discloses a kind of update the systems for carrying out On-line near infrared analyzer detection to product through packaging bag, and the update the system includes: target detection component content correction model modeling unit, for establishing target detection component content correction model based on modeling sample;Target detection ingredient amending unit is connect with target detection component content correction model modeling unit, for calculating the target detection component content of sample to be tested based on target detection component content correction model.The technical scheme is that when to quickly being detected using On-line near infrared analyzer instrument progress mass product, it is proposed since this technical problem of test error can be caused across packaging bag detection, it is by providing a update the system, correct this error, to guarantee that the difference caused by product packaging does not influence the target detection component content of the finally sample to be tested via on-line nir system output, the true value of the target detection component content close to product to be measured of maximum possible.

Description

Correction system and detection method for online near-infrared detection through packaging bag
Technical Field
The invention belongs to the field of analysis and detection, and particularly relates to a correction system and a detection method for performing near-infrared detection on a product through a packaging bag.
Background
The near infrared spectrum is electromagnetic radiation wave between visible light and middle infrared, and the American society for testing and materials defines the near infrared spectral region as a region of 780-2526 nm, which is the first non-visible region found in the absorption spectrum. The near-infrared broad spectrum region is consistent with the frequency combination of the vibration of the hydrogen-containing group (O-H, N-H, C-H) in the organic molecule and the absorption region of each level of frequency multiplication, the characteristic information of the hydrogen-containing group in the organic molecule in the sample can be obtained by scanning the near-infrared spectrum of the sample, and the analysis of the sample by using the near-infrared spectrum technology has the advantages of convenience, rapidness, high efficiency, accuracy, lower cost, no damage to the sample, no consumption of chemical reagents and no environmental pollution.
The near infrared spectrum contains a large amount of substance information, and due to the characteristics of rapidness and no damage, the near infrared spectrum is widely applied to the fields of medicines, foods, tobaccos and the like, particularly the field of threshing and redrying of tobacco leaves. The quality of raw materials or products is an important basic stone with stable quality of finished products, and the accurate, rapid and convenient acquisition of the quality of the raw materials is crucial to the control of the quality of the raw materials in large-scale industrial production. The raw products used in these industries are typically packaged in sacks or other bags, and in the detection of large-scale raw materials, a bag of raw materials or products is typically sampled and detected by a laboratory spectrometer, but this method has the disadvantages of hysteresis, slow speed due to the need to open the bag, and small sample size, which is not representative, and weakens the practical utility of detecting, counting, blending, and controlling the quality of the raw products before production.
In the actual detection of large-scale raw materials, the specifications of the packaging bags are relatively uniform, and the materials and gaps are relatively regular, so that the near infrared spectrum can penetrate through the gaps of the packaging bags to detect and obtain the physical and chemical information of the tobacco products in the packaging bags. For example, the conventional packaging bags used for containing raw tobacco leaves in the tobacco industry are burlap bags. There is no prior art that provides accurate near infrared inspection of products outside of the package without removing the package.
Disclosure of Invention
Aiming at the defects in the prior art, the invention provides a correction system and a detection method for performing online near-infrared detection on a product through a packaging bag, so as to overcome the defect of error of an online near-infrared test result caused by the difference of sample specifications and noise of an external environment in the prior art.
In order to solve the above problems and other problems, the present invention is implemented by a technical solution comprising:
a correction system for on-line near-infrared detection of a product through a package, the correction system comprising:
the target detection component content correction model modeling unit is used for establishing a target detection component content correction model based on a modeling sample;
the target detection component correction unit is connected with the target detection component content correction model modeling unit and is used for calculating the target detection component content of the sample to be detected based on the target detection component content correction model;
wherein, the target detection component content correction model is as follows:
Yprediction=APredictionBQ,
Wherein,
YpredictionThe content of the target detection component of the product to be detected which is obtained after the correction and detected through the packaging bag is the content of the target detection component of the product to be detected displayed on the online near-infrared detector;
ApredictionA scoring matrix of near infrared spectrum obtained by a sample to be tested through an online near infrared instrument and a packaging bag;
q is a load matrix of a concentration matrix Y consisting of target detection component contents obtained by testing n modeling samples by a laboratory near-infrared analyzer;
B=(ATA)-1ATand Y, wherein A is a scoring matrix of a matrix X consisting of near infrared spectrum data obtained by testing the n modeling samples through an online near infrared transmission packaging bag, and Y is a concentration matrix consisting of target detection component contents obtained by testing the n modeling samples through a laboratory near infrared analyzer.
Preferably, the correction system further comprises:
and the modeling sample screening unit is connected with the target detection component content correction model modeling unit and is used for screening the modeling sample.
Preferably, the modeling sample screening unit includes:
the modeling sample removing subunit is used for removing the modeling sample with the abnormal near infrared spectrum data obtained by the online near infrared transmission packaging bag test, the abnormal modeling sample refers to the modeling sample with the vector length larger than a set value a, and the vector length of the modeling sample is calculated by adopting the following formula:
m wavelength points in the near infrared spectrum corresponding to each modeling sample,
Li: for the length of the vector for the ith modeled sample,
xk(i) representing the value of the near infrared spectrum of the ith modeled sample at the kth wavelength point,
the near infrared spectra of all modeled samples are the mean of the values at the kth wavelength,
skthe variance of the values of the near infrared spectra of all modeled samples at the kth wavelength point,
a≤0.15,k=1,2,…,m。
preferably, the correction system further comprises: and the near infrared spectrum preprocessing subunit is connected with the target detection component content correction model modeling unit and is used for performing noise reduction processing on the modeling sample near infrared spectrum data obtained by the online near infrared spectrum test.
Preferably, the noise reduction processing comprises a first derivative processing of the near infrared spectrum or/and a scattering correction processing of the near infrared spectrum.
The invention also discloses a method for carrying out online near-infrared detection on products through the packaging bag, which comprises the following steps:
establishing a target detection component content correction model by utilizing a modeling sample, wherein the target detection component content correction model is as follows:
Yprediction=APredictionBQ,
Wherein,
YpredictionThe content of the target detection component of the product to be detected which is obtained after the correction and detected through the packaging bag is the content of the target detection component of the product to be detected displayed on the online near-infrared detector;
ApredictionA scoring matrix of near infrared spectrum obtained by a sample to be tested through an online near infrared instrument and a packaging bag;
q is a load matrix of a concentration matrix Y consisting of target detection component contents obtained by testing n modeling samples by a laboratory near-infrared analyzer;
B=(ATA)-1ATy, wherein A is a scoring matrix of a matrix X consisting of near infrared spectrum data obtained by testing n modeling samples through an online near infrared transmission packaging bag, and Y is a concentration matrix consisting of target detection component contents obtained by testing n modeling samples through a laboratory near infrared analyzer;
and obtaining a scoring matrix of the near infrared spectrum of the sample to be detected, which is obtained by the test of the online near infrared instrument through the packaging bag, and calculating the content of the target detection component of the sample to be detected based on the target detection component content correction model.
Preferably, a modeling sample screening step is further included in establishing the target detection component content correction model by using the modeling sample.
Preferably, the step of modeling sample screening comprises: rejecting modeling samples with abnormal near infrared spectrum data, wherein the abnormal modeling samples mean that the vector length of the modeling samples is greater than a set value a, and the vector length of the modeling samples is calculated by adopting the following formula:
m wavelength points in the near infrared spectrum corresponding to each modeling sample,
Li: for the length of the vector for the ith modeled sample,
xk(i) representing the value of the near infrared spectrum of the ith modeled sample at the kth wavelength point,
the near infrared spectra of all modeled samples are the mean of the values at the kth wavelength,
skthe variance of the values of the near infrared spectra of all modeled samples at the kth wavelength point,
a≤0.15,k=1,2,…,m。
more preferably, in order to ensure that the sample obtained by sampling is not an abnormal sample, the above steps may be repeated a plurality of times to reject the abnormal sample as much as possible.
Preferably, the method further comprises the step of carrying out noise reduction processing on the modeling sample near infrared spectrum data obtained by the online near infrared spectrum test before establishing the target detection component content correction model.
Preferably, the noise reduction processing comprises a first derivative processing of the near infrared spectrum or/and a scattering correction processing of the near infrared spectrum.
In the actual modeling process, modeling and analyzing all near infrared spectrum data of a plurality of samples are huge data processing projects, so that the labor intensity is increased, but the modeling and analyzing are not necessary. In actual operation, point values which can reach a certain resolution are mostly adopted for modeling. That is, the near infrared spectrum data is divided into m point values according to the length of the abscissa wavelength, and each sample corresponds to m transmittance values, that is, each sample is an m-dimensional space vector. If there are i modeling samples, the transmittance values of the i modeling samples at the wavelengths form a matrix with i rows and m columns, in the process of establishing the correction model, the matrix with i rows and m columns is processed, partial least squares regression modeling is performed by combining the content of the target detection component of the modeling samples obtained by near infrared test in a laboratory, so as to finally obtain a relation model between the online near infrared spectrum data of the modeling samples and the content of the target detection component, and the model is used for correcting the online near infrared spectrometer so as to obtain the accurate content of the target detection component of the sample to be detected.
Preferably, the near infrared spectrum data of the product in the invention is 780-2526 cm-1Transmittance over wavenumber.
The method can be used for continuously testing products by using the online near-infrared transmission packaging bag in the fields of textile, tobacco, paper making and food to obtain the content of the target test component.
The on-line near infrared instrument provided by the invention can be used for continuously and portably testing on-line products, such as portable near infrared instruments and the like.
The technical scheme of the invention is provided for solving the technical problem that the detection across the packaging bag can cause the detection error when the online near-infrared analyzer is used for quickly detecting large-scale products, and the error is corrected by providing a correction system, so that the content of the target detection component of the sample to be detected, which is finally output by the online near-infrared analyzer, is not influenced by the difference caused by product packaging, and the content is close to the true value of the target detection component of the product to be detected to the greatest extent. The on-line continuous detection device is particularly suitable for on-line continuous detection of large-scale products containing packaging bags, not only solves the problem of troublesome operation caused by frequent removal of the packaging bags for sampling, but also reduces the labor intensity of workers.
Drawings
FIG. 1 is a graph of the raw near infrared spectrum of a sample obtained from a direct test of an impervious bale using an on-line near infrared spectrometer.
FIG. 2 is a raw near infrared spectrum of a sample obtained by transmission pockmark testing using an on-line near infrared spectrometer.
FIG. 3 is a two-dimensional distribution plot of samples obtained from the impervious and pervious bale tests using an online near-infrared spectrometer.
Fig. 4 is a distribution diagram of the content of the target detection component of the sample to be detected obtained by the target detection component correction system of the present invention and the content of the target detection component of the sample to be detected obtained by near infrared in the laboratory when the gunny bag is not penetrated.
FIG. 5 is a distribution diagram of the content of the target detection component of the sample to be measured obtained by the target detection component correction system of the present invention and the content of the target detection component of the sample to be measured obtained by near infrared in the laboratory when the gunny bag is penetrated.
FIG. 6 is a schematic diagram of an embodiment of a correction system for on-line near-infrared detection of products through a packaging bag according to the present invention.
FIG. 7 is a flowchart of a method for testing the content of a target detection component of a product to be tested, which is performed by the correction system for online near-infrared detection of the product through the packaging bag in FIG. 6.
FIG. 8 is a schematic diagram of another embodiment of a correction system for on-line near-infrared detection of products through a package in accordance with the present invention.
FIG. 9 is a flowchart of a method for testing the content of a target detection component of a product to be tested, which is performed by the correction system for online near-infrared detection of the product through the packaging bag in FIG. 8.
Detailed Description
The invention is described below with the aid of specific examples. In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced without some of these specific details. Furthermore, it should be understood that the invention is not limited to the specific embodiments described. Rather, it is contemplated that the present invention may be practiced with any combination of the following features, whether or not they relate to different embodiments. Accordingly, the following examples and advantages are illustrative only and are not to be construed as limitations on the claims except where explicitly recited in a claim.
As shown in fig. 6, the present embodiment discloses a correction system 100 for online near-infrared detection of products through packaging bags, the correction system comprising:
a target detection component content correction model modeling unit 110 configured to establish a target detection component content correction model based on the modeled sample;
the target detection component correction unit 120 is connected with the target detection component content correction model modeling unit and is used for calculating the target detection component content of the sample to be detected based on the target detection component content correction model;
wherein, the target detection component content correction model is as follows:
Yprediction=APredictionBQ,
Wherein,
YpredictionThe content of the target detection component of the product to be detected which is obtained after the correction and detected through the packaging bag is the content of the target detection component of the product to be detected displayed on the online near-infrared detector;
ApredictionA scoring matrix of near infrared spectrum obtained by a sample to be tested through an online near infrared instrument and a packaging bag;
q is a load matrix of a concentration matrix Y consisting of target detection component contents obtained by testing n modeling samples by a laboratory near-infrared analyzer;
B=(ATA)-1ATand Y, wherein A is a scoring matrix of a matrix X consisting of near infrared spectrum data obtained by testing the n modeling samples through an online near infrared transmission packaging bag, and Y is a concentration matrix consisting of target detection component contents obtained by testing the n modeling samples through a laboratory near infrared analyzer.
In a preferred embodiment, as shown in fig. 8, the correction system further comprises:
and the modeling sample screening unit 130 is connected with the target detection component content correction model modeling unit and is used for screening the modeling sample.
Specifically, the modeling sample screening unit includes:
the modeling sample removing subunit 131 for removing the modeling sample with the abnormal near infrared spectrum data obtained by the online near infrared transmission packaging bag test is used for removing the modeling sample with the abnormal near infrared spectrum data, the abnormal modeling sample refers to the modeling sample with the vector length larger than a set value a, and the vector length of the modeling sample is calculated by adopting the following formula:
m wavelength points in the near infrared spectrum corresponding to each modeling sample,
Li: for the length of the vector for the ith modeled sample,
xk(i) representing the value of the near infrared spectrum of the ith modeled sample at the kth wavelength point,
the near infrared spectra of all modeled samples are the mean of the values at the kth wavelength,
skthe variance of the values of the near infrared spectra of all modeled samples at the kth wavelength point,
a≤0.15,k=1,2,…,m。
in a preferred embodiment, as shown in fig. 8, the correction system further comprises: and the near infrared spectrum preprocessing subunit 132 is connected with the target detection component content correction model modeling unit and is used for performing noise reduction processing on the near infrared spectrum data of the modeling sample obtained by the online near infrared spectrum test.
Specifically, the noise reduction processing comprises performing first derivative processing on the near infrared spectrum or/and performing scattering correction processing on the near infrared spectrum.
As shown in fig. 7, this embodiment also discloses a method corresponding to the correction system shown in fig. 6, that is, a method for performing online near-infrared detection on a product through a packaging bag, including the following steps:
establishing a target detection component content correction model S110 by using the modeling sample, wherein the target detection component content correction model is as follows:
Yprediction=APredictionBQ,
Wherein,
YpredictionIs passing throughThe corrected target detection component content of the product to be detected penetrating through the packaging bag is the target detection component content of the product to be detected displayed on the online near-infrared detector;
ApredictionA scoring matrix of near infrared spectrum obtained by a sample to be tested through an online near infrared instrument and a packaging bag;
q is a load matrix of a concentration matrix Y consisting of target detection component contents obtained by testing n modeling samples by a laboratory near-infrared analyzer;
B=(ATA)-1ATy, wherein A is a scoring matrix of a matrix X consisting of near infrared spectrum data obtained by testing n modeling samples through an online near infrared transmission packaging bag, and Y is a concentration matrix consisting of target detection component contents obtained by testing n modeling samples through a laboratory near infrared analyzer;
and obtaining a scoring matrix of the near infrared spectrum of the sample to be detected, which is obtained by the test of the online near infrared instrument through the packaging bag, and calculating the target detection component content of the sample to be detected based on the target detection component content correction model S120.
In a more specific embodiment, the specific process of obtaining a modeling sample and performing an online near infrared spectroscopy test on the modeling sample is as follows:
taking 150 tobacco leaf samples as modeling samples, specifically tobacco leaves provided by Huahuan International tobacco Co., Ltd, and the packaging bags are sacks. And detecting the model sample by using an online near-infrared spectrometer of Carl Zeiss through the packaging bag to obtain the online near-infrared spectrum of each model sample. More preferably, the test may be repeated several times for each modeled sample, and the average spectrum of several times is used as the modeled sample to obtain the online near infrared spectrum data by the online near infrared spectrum transmission package detection.
In the actual modeling process, modeling and analyzing all near infrared spectrum data of a plurality of modeling samples is a huge data project, which increases labor intensity, but is not necessary. In practical operation, a certain amount of point values which can reach a certain resolution on the near-infrared spectrogram can be selected for modeling. And (3) dividing the near infrared spectrum data into m point values according to the length of the abscissa wavelength on average, wherein each sample corresponds to m transmittance values, namely each sample is an m-dimensional space vector. If there are i modeling samples, the transmittance values of the i modeling samples at the wavelengths form a matrix with i rows and m columns, in the process of establishing the correction model, the matrix with i rows and m columns is processed, partial least squares regression modeling is performed by combining the content of the target detection component of the modeling samples obtained by near infrared test in a laboratory, so as to finally obtain a relation model between the online near infrared spectrum data of the modeling samples and the content of the target detection component, and the model is used for correcting the online near infrared spectrometer so as to obtain the accurate content of the target detection component of the sample to be detected. More specifically, m is 256 in this embodiment, and when modeling, the transmittance values corresponding to 256 wavelengths of the 150 tobacco modeling samples form data of 150 rows and 256 columns.
As shown in fig. 9, the present embodiment further discloses a method corresponding to the correction system shown in fig. 8, where the method further includes a modeling sample screening step S130 when the modeling sample is used to establish the target detection component content correction model.
Specifically, the modeling sample screening step includes: removing the modeling sample S131 with the exception of the near infrared spectrum data
The modeling sample means that the vector length of the modeling sample is greater than a set value a, and the vector length of the modeling sample is calculated by adopting the following formula:
m wavelength points in the near infrared spectrum corresponding to each modeling sample,
Li: for the length of the vector for the ith modeled sample,
xk(i) representing the value of the near infrared spectrum of the ith modeled sample at the kth wavelength point,
the near infrared spectra of all modeled samples are the mean of the values at the kth wavelength,
skthe variance of the values of the near infrared spectra of all modeled samples at the kth wavelength point,
a is less than or equal to 0.15, k is 1, 2, …, m. The value of a can be set according to the product characteristics and the elimination requirement of the product during modeling, and can be 0.15,0.1 or 0.05.
More preferably, in order to ensure that the sample obtained by sampling is not an abnormal sample, the above steps may be repeated a plurality of times to reject the abnormal sample as much as possible.
In a more specific embodiment of the invention, a is taken to be 0.05. After rejecting 12 abnormal modeling samples, 138 modeling samples remained.
In a more preferred embodiment, the method further includes a step S132 of performing noise reduction processing on the near infrared spectrum data of the modeling sample obtained by the online near infrared spectrum test before establishing the target detection component content correction model. More specifically, the noise reduction process includes a first derivative process on the near infrared spectrum or/and a scattering correction process on the near infrared spectrum. The scattering correction can eliminate the scattering influence caused by tobacco leaf particle uneven distribution and different sizes, the accuracy of the scattering correction model is improved to a limited extent, but the complexity of the model can be reduced, the essence of the scattering correction is a linear correction method, and the scattering correction is mainly based on a statistical method to correct linear transformation of near infrared spectrum data to be processed due to scattering. The first derivative preprocessing can eliminate the drift of the baseline, has the effect of improving the model accuracy, but can increase the complexity of the model. In this embodiment, the first derivative preprocessing is implemented by using an SG derivation method with a smooth point of 13, using a moving window polynomial fit for derivation, replacing the central point of the window with a derivative, and moving the window by only one data point at a time until all 256 data points of the spectrum are derived.
The near infrared spectrum data after the abnormal modeling samples are removed and the noise reduction pretreatment is carried out on the near infrared spectrum and the content of target detection components obtained by the laboratory near infrared test of the modeling samples construct a model S110 according to a partial least squares regression method. In this embodiment, the target component to be tested is nicotine content, salt and alkali content and the like in the tobacco, which can be obtained by an online near-infrared spectrometer. More specifically, the present example is nicotine content.
In modeling, a KS random method can also be adopted to further randomly select modeling samples for model building, in this embodiment, KS is randomly applied to 138 tobacco samples to select 109 samples for partial least squares regression modeling, that is, a matrix X composed of 256 data on near infrared spectrum data obtained by an online near infrared spectrometer through a packaging bag test and a column matrix Y of corresponding nicotine content are adopted for partial least squares regression modeling of the 109 tobacco samples.
More specifically, the algorithm of the partial least squares regression method is as follows:
in the formula, X is a matrix consisting of 256 data on near infrared spectrum data obtained by testing n samples through a packaging bag by adopting an online near infrared spectrometer; in the embodiment, n is 109;
y is a column matrix formed by nicotine content obtained by testing of a laboratory near-infrared spectrometer corresponding to n samples, tk(n × 1) is the number XA scoring matrix of k principal factors; p is a radical ofk(1 xm) a load matrix that is the kth principal factor of the X matrix; wherein n is the number of rows of the scoring matrix; m is the column number of the load matrix; f is the number of major factors;
a and U are respectively the scoring matrices of X and Y, P and Q are respectively the loading matrices of X and Y, EXAnd EYFitting residual matrixes of partial least squares regression (PLS) of X and Y, respectively, and then performing linear regression of a and U according to the principle of partial least squares: u ═ AB, B ═ ATA)-1ATY; in prediction, the score A of the sample scoring matrix is first obtained according to PPredictionThen, the predicted value Y of the column matrix corresponding to the sample is obtained by the following formulaPrediction=APredictionBQ。
In the modeling process, the residual matrix E is initially ignoredXAnd EYAnd after the intermediate parameters are solved, the residual error matrix is solved.
The specific process is as follows: when the number of initial main factors f is 1:
for X ═ APTLeft by ATThen, right-multiplying by P to obtain:
for Y ═ UQTLeft by UTThen both sides are divided by QTObtaining:taking the concentration matrix Y as the initial iteration value of U, replacing A with U, and according to the equation: x ═ UWTCalculate W, whose solution is:w is a weight vector of X; and (3) solving a scoring matrix A of X after the weight is normalized, wherein the equation is as follows: AW ═ XTThe solution is:and substituting A for U to calculate a load matrix Q of Y, wherein the equation is as follows: Y-AQT(ii) a The solution is as follows:and (3) after normalizing the load matrix Q, solving a score matrix U of Y, wherein the equation is as follows: y ═ UQT(ii) a The solution is as follows:then, the U replaces A to return to the beginning to calculate WTFrom WTCalculation of A1Iterate so repeatedly if A has converged, i.e. if A-A1||≤10-6Stopping iteration if the A is less than the predetermined threshold; otherwise, returning to continuously solving the weight vector W of the X until the obtained score matrix of the X is converged; and solving a load matrix P of X according to the converged A, wherein the equation is as follows: x is APT(ii) a The solution is as follows:normalizing the load matrix P to obtain a score matrix A of X, wherein A is A and P is; the normalized weight vector W ═ W | | | P |; computing the intrinsic relationship between A and URecalculating residual matrix EX=X-APT;EY=Y-UQT=Y-BAQT(ii) a Finally with EXIn place of X, EYReturning to the initial step of finding the weight vector W of X instead of Y, and so on to find W, A, P, U, Q, B of the main factor of X, Y, and finally, through an interactive test methodThe iteration stops when the optimal number of main factors f is determined.
The correction model for obtaining the content of the target detection component comprises the following steps:
Yprediction=APredictionBQ,
Wherein,
YpredictionThe content of the target detection component of the product to be detected which is obtained after the correction and detected through the packaging bag is the content of the target detection component of the product to be detected displayed on the online near-infrared detector;
ApredictionA scoring matrix of near infrared spectrum obtained by a sample to be tested through an online near infrared instrument and a packaging bag;
q is a load matrix of a concentration matrix Y consisting of target detection component contents obtained by testing n modeling samples by a laboratory near-infrared analyzer;
B=(ATA)-1ATand Y, wherein A is a scoring matrix of a matrix X consisting of near infrared spectrum data obtained by testing the n modeling samples through an online near infrared transmission packaging bag, and Y is a concentration matrix consisting of target detection component contents obtained by testing the n modeling samples through a laboratory near infrared analyzer.
In order to verify the accuracy of the correction system provided by the invention, the nicotine content obtained by directly testing the laboratory near infrared spectrum data of the tobacco samples of the 150 tobacco samples without penetrating through the packaging bag and the spectrum data obtained by the online near infrared spectrum are also tested, abnormal samples are removed according to the same steps, and the online near infrared spectrum data are subjected to noise reduction treatment; and constructing a target component content correction model Y to be measured when the tobacco leaf sample is directly tested in the impervious packaging bag according to a partial least square methodPrediction 1=APrediction 1B1Q1
Table 1 shows the comparison of the predicted nicotine content obtained from the modified model without pockmarks, i.e. without passing through the packaging bags, with the actual nicotine content predicted by a laboratory near-infrared device. The chemical values in the table are the nicotine content.
TABLE 1
Table 2 shows the comparison of the predicted nicotine content obtained from the target assay component content correction model established in the case of pockmark-containing, i.e. tobacco sample testing through the pockmark, with the actual nicotine content obtained from testing with a laboratory near-infrared device. The chemical values in table 2 are the nicotine content.
TABLE 2
The two correction systems are applied to an online near infrared spectrometer, and sample spectra of different producing areas, different parts and different time are respectively used for verifying the model. In this embodiment, 27 samples of online near infrared spectra collected at 10 am, 11 am, 12 am, 1 am, and 7 am from north of Hu Yichang C2F, Danong Liaoning C2F, Heilongjiang Van C2L, Hunan West C2F, and Ganxi C2F are used to verify the model.
Table 3 shows the comparison of the predicted nicotine content obtained by model processing of the on-line near infrared data of 27 samples without pockmarks, i.e. without directly inspecting the samples through the packaging bags, with the nicotine content obtained by quantitative analysis using a laboratory near infrared instrument.
TABLE 3
Table 4 shows the comparison of the predicted nicotine content obtained from the online near infrared data of 27 samples processed by the model with the nicotine content obtained from the quantitative analysis using a laboratory near infrared instrument, in the case of permeation through the packaging bag containing the jute bags.
TABLE 4
The results of comparative analysis of the data in tables 3 and 4 are shown in table 5.
TABLE 5
As can be seen from table 5, the nicotine content predicted by the pockmark-containing model is smaller and more stable than the nicotine content predicted by the pockmark-free model. The average relative error is 1.29 less than that of the latter; the error of the predicted mean value of the former and the mean value of the real chemical value is 0.03, and the error of the predicted mean value of the latter and the mean value of the real chemical value is 0.07. Through the comparison, the model disclosed by the invention is applied to an online near-infrared instrument, so that the product can be subjected to online near-infrared detection directly through a packaging bag without isolating the packaging bag of the product, and an accurate product chemical value can be obtained.
The technical scheme of the invention is provided for solving the technical problem that the detection across the packaging bag can cause the detection error when the online near-infrared analyzer is used for quickly detecting large-scale products, and the error is corrected by providing a correction system, so that the content of the target detection component of the sample to be detected, which is finally output by the online near-infrared analyzer, is not influenced by the difference caused by product packaging, and the content is close to the true value of the target detection component of the product to be detected to the greatest extent. The on-line continuous detection device is particularly suitable for on-line continuous detection of large-scale products containing packaging bags, not only solves the problem of troublesome operation caused by frequent removal of the packaging bags for sampling, but also reduces the labor intensity of workers.
The foregoing embodiments are merely illustrative of the principles and utilities of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or change the above-mentioned embodiments without departing from the spirit and scope of the present invention. Accordingly, it is intended that all equivalent modifications or changes which can be made by those skilled in the art without departing from the spirit and technical spirit of the present invention be covered by the claims of the present invention.

Claims (7)

1. A correction system for on-line near-infrared inspection of products through gunny bags, the correction system comprising:
the target detection component content correction model modeling unit is used for establishing a target detection component content correction model based on a modeling sample;
the target detection component correction unit is connected with the target detection component content correction model modeling unit and is used for calculating the target detection component content of the product to be detected based on the target detection component content correction model;
wherein, the target detection component content correction model is as follows:
Yprediction=APredictionBQ,
Wherein,
YpredictionThe content of the target detection component of the product to be detected, which is obtained after correction and detected by penetrating through the gunny bag, is the content of the target detection component of the product to be detected, which is displayed on the online near-infrared detector;
ApredictionA scoring matrix of near infrared spectrum obtained by a product to be tested through a gunny bag test by an online near infrared instrument;
q is a load matrix of a concentration matrix Y consisting of target detection component contents obtained by testing n modeling samples by a laboratory near-infrared analyzer;
B=(ATA)-1ATy, wherein A is a matrix X consisting of near infrared spectrum data obtained by testing n modeling samples through online near infrared transmission gunny bags, and Y is a concentration matrix consisting of target detection component contents obtained by testing n modeling samples through a laboratory near infrared analyzer;
the correction system further comprises: the modeling sample screening unit is connected with the target detection component content correction model modeling unit and is used for screening the modeling sample;
the modeling sample screening unit includes:
the modeling sample removing subunit is used for removing the modeling sample with the abnormal near infrared spectrum data, which is obtained by the online near infrared transmission gunny bag test, wherein the abnormal modeling sample refers to the modeling sample with the vector length larger than a set value a,
the vector length of the modeled sample is calculated using the following formula:
m wavelength points in the near infrared spectrum corresponding to each modeling sample,
Li: vector length for the ith modeled sampleThe degree of the magnetic field is measured,
xk(i) representing the value of the near infrared spectrum of the ith modeled sample at the kth wavelength point,
the near infrared spectra of all modeled samples are the mean of the values at the kth wavelength,
skthe variance of the values of the near infrared spectra of all modeled samples at the kth wavelength point,
a≤0.15,k=1,2,…,m。
2. the rework system of claim 1, wherein the rework system further comprises: and the near infrared spectrum preprocessing subunit is connected with the target detection component content correction model modeling unit and is used for performing noise reduction processing on the modeling sample near infrared spectrum data obtained by the online near infrared spectrum test.
3. The modification system according to claim 2, wherein said noise reduction process comprises a first derivative process on the near infrared spectrum or/and a scatter correction process on the near infrared spectrum.
4. A method for carrying out on-line near-infrared detection on products through gunny bags comprises the following steps:
establishing a target detection component content correction model by utilizing a modeling sample, wherein the target detection component content correction model is as follows:
Yprediction=APredictionBQ,
Wherein,
YpredictionThe content of the target detection component of the product to be detected, which is obtained after correction and detected by penetrating through the gunny bag, is the content of the target detection component of the product to be detected, which is displayed on the online near-infrared detector;
ApredictionIs permeated by an on-line near infrared instrument for a product to be measuredA matrix of near infrared spectra obtained by bale testing;
q is a load matrix of a concentration matrix Y consisting of target detection component contents obtained by testing n modeling samples by a laboratory near-infrared analyzer;
B=(ATA)-1ATy, wherein A is a scoring matrix of a matrix X consisting of near infrared spectrum data obtained by the online near infrared transmission gunny bag test of n modeling samples, and Y is a concentration matrix consisting of target detection component contents obtained by the test of the laboratory near infrared analyzer of the n modeling samples;
obtaining a matrix of near infrared spectrums of the products to be detected, which are obtained by an online near infrared instrument through gunny bag testing, and calculating the content of the target detection component of the products to be detected based on a target detection component content correction model;
the modeling sample screening step comprises: eliminating the modeling sample with abnormal near infrared spectrum data, wherein the abnormal modeling sample means that the vector length of the modeling sample is greater than a set value a,
the vector length of the modeled sample is calculated using the following formula:
m wavelength points in the near infrared spectrum corresponding to each modeling sample,
Li: for the length of the vector for the ith modeled sample,
xk(i) representing the value of the near infrared spectrum of the ith modeled sample at the kth wavelength point,
the near infrared spectra of all modeled samples are the mean of the values at the kth wavelength,
skthe variance of the values of the NIR spectra of all modeled samples at the kth wavelength, a ≦ 0.15, k ≦ 1, 2, …, m.
5. The method of claim 4, further comprising a modeling sample screening step in establishing the corrected model of the content of the target assay component using the modeling sample.
6. The method of claim 4, further comprising the step of denoising the modeled sample near infrared spectral data obtained from the online near infrared spectral test prior to establishing the target detection component content correction model.
7. The method of claim 6, wherein the noise reduction process comprises a first derivative process on the near infrared spectrum or/and a scatter correction process on the near infrared spectrum.
CN201610792109.2A 2016-08-31 2016-08-31 A method of update the system and detection through the detection of packaging bag On-line near infrared analyzer Active CN106124451B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610792109.2A CN106124451B (en) 2016-08-31 2016-08-31 A method of update the system and detection through the detection of packaging bag On-line near infrared analyzer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610792109.2A CN106124451B (en) 2016-08-31 2016-08-31 A method of update the system and detection through the detection of packaging bag On-line near infrared analyzer

Publications (2)

Publication Number Publication Date
CN106124451A CN106124451A (en) 2016-11-16
CN106124451B true CN106124451B (en) 2019-09-27

Family

ID=57271045

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610792109.2A Active CN106124451B (en) 2016-08-31 2016-08-31 A method of update the system and detection through the detection of packaging bag On-line near infrared analyzer

Country Status (1)

Country Link
CN (1) CN106124451B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3385703B1 (en) 2017-04-07 2024-09-04 Greentropism Improved spectroscopic device and method for sample characterization

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100458413C (en) * 2004-09-15 2009-02-04 中国农业大学 Method for establishing relevance model of glass bottled food component and food detecting method
CN1696660A (en) * 2005-04-05 2005-11-16 中国药品生物制品检定所 Method and equipment for identifying medication by using near infrared spectral analysis
CN100529731C (en) * 2005-04-05 2009-08-19 中国药品生物制品检定所 Drug distinguishing near infrared spectrum analysis method and apparatus
CN102998278A (en) * 2012-11-27 2013-03-27 马应龙药业集团股份有限公司 Method capable of determining dried alum and/or chlorogenic acid content in Jinxuan washing powder online
CN103487384B (en) * 2013-10-15 2016-01-27 无锡艾科瑞思产品设计与研究有限公司 Based on the packed paddy composition method for quick of near infrared spectrum

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
ANALYSIS OF TOTAL NITROGEN IN TROPICAL SOILS WITH NEAR-INFRARED SPECTROSCOPY (NIRS) AND CHEMOMETRICS;Aaron Jarquín-Sánchez et al;《AGROCIENCIA》;20110930;摘要、第654页右栏最后第1段至第662页右栏最后1段以及图1-6和表1-3 *
基于聚乙烯膜包装奶酪成分的NIRS检测研究;皮付伟等;《光谱学与光谱分析》;20081031;第28卷(第10期);第2321-2324页 *

Also Published As

Publication number Publication date
CN106124451A (en) 2016-11-16

Similar Documents

Publication Publication Date Title
CN101915744B (en) Near infrared spectrum nondestructive testing method and device for material component content
CN101564199B (en) New homogenizing production control type threshing and redrying method
CN104020127B (en) A kind of near infrared spectrum is utilized quickly to measure the method for inorganic elements in Nicotiana tabacum L.
Huang et al. Improved generalization of spectral models associated with Vis-NIR spectroscopy for determining the moisture content of different tea leaves
CN108802000A (en) A kind of lossless quick cholecalciferol-cholesterol content quantitative method based on the full spectrum analysis of Raman
CN105067531A (en) Mango quality nondestructive detection method and mango quality nondestructive detection apparatus
CN108169165B (en) Maltose mixture quantitative analysis method based on terahertz spectrum and image information fusion
CN105092579A (en) Mango quality non-destructive testing device
Westerhaus et al. Quantitative analysis
CN106053383A (en) Near-infrared online detection method for tobacco processing process
Prades et al. Methodology for cork plank characterization (Quercus suber L.) by near-infrared spectroscopy and image analysis
CN104132908A (en) Method for determining equilibrium moisture content of tobacco leaf
CN109374548A (en) A method of quickly measuring nutritional ingredient in rice using near-infrared
CN105717066A (en) Near-infrared spectrum recognition model based on weighting association coefficients
CN104596979A (en) Method for measuring cellulose of reconstituted tobacco by virtue of near infrared reflectance spectroscopy technique
CN105223140A (en) The method for quickly identifying of homology material
CN113030007B (en) Method for rapidly testing quality stability of tobacco essence based on similarity learning algorithm
CN106124451B (en) A method of update the system and detection through the detection of packaging bag On-line near infrared analyzer
CN110210005A (en) A kind of spectrum wave number selection method of no reference value
CN106338526B (en) A kind of correction model and detection method based on microwave moisture instrument
CN106729798A (en) A kind of Chinese medicine disinfection system
CN107167447A (en) The method for blending apple fumet content in cider is calculated using near-infrared spectrum technique
CN113075197A (en) Method for rapidly detecting adulteration content of corn flour in white pepper powder
CN105866060A (en) Method for quickly measuring content of thickener in milk beverage through near-infrared spectrometry
CN104596974A (en) Method for measuring paper process reconstituted tobacco filling value via near infrared diffuse reflection spectroscopy

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant