WO2023108514A1 - 茶叶近红外光谱分析中谱峰自动检测与重构方法及系统 - Google Patents
茶叶近红外光谱分析中谱峰自动检测与重构方法及系统 Download PDFInfo
- Publication number
- WO2023108514A1 WO2023108514A1 PCT/CN2021/138605 CN2021138605W WO2023108514A1 WO 2023108514 A1 WO2023108514 A1 WO 2023108514A1 CN 2021138605 W CN2021138605 W CN 2021138605W WO 2023108514 A1 WO2023108514 A1 WO 2023108514A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- spectral
- block
- tea
- reconstruction
- matrix
- Prior art date
Links
- 230000003595 spectral effect Effects 0.000 title claims abstract description 84
- 238000000034 method Methods 0.000 title claims abstract description 46
- 238000001514 detection method Methods 0.000 title claims abstract description 28
- 238000010183 spectrum analysis Methods 0.000 title claims abstract description 13
- 241001122767 Theaceae Species 0.000 title claims 16
- 238000010521 absorption reaction Methods 0.000 claims abstract description 20
- 230000006870 function Effects 0.000 claims abstract description 19
- 238000002329 infrared spectrum Methods 0.000 claims abstract description 11
- 238000012216 screening Methods 0.000 claims abstract description 7
- 239000011159 matrix material Substances 0.000 claims description 51
- 238000004364 calculation method Methods 0.000 claims description 24
- 238000001228 spectrum Methods 0.000 claims description 14
- 238000004458 analytical method Methods 0.000 claims description 12
- 238000005259 measurement Methods 0.000 claims description 11
- 230000006835 compression Effects 0.000 claims description 7
- 238000007906 compression Methods 0.000 claims description 7
- 238000012937 correction Methods 0.000 claims description 3
- 238000005457 optimization Methods 0.000 claims description 3
- 244000269722 Thea sinensis Species 0.000 abstract description 35
- 235000013616 tea Nutrition 0.000 abstract description 32
- 230000008569 process Effects 0.000 abstract description 7
- 235000009569 green tea Nutrition 0.000 abstract description 4
- 230000006872 improvement Effects 0.000 description 9
- 238000010586 diagram Methods 0.000 description 4
- 238000011156 evaluation Methods 0.000 description 4
- 238000004445 quantitative analysis Methods 0.000 description 3
- RYYVLZVUVIJVGH-UHFFFAOYSA-N caffeine Chemical compound CN1C(=O)N(C)C(=O)C2=C1N=CN2C RYYVLZVUVIJVGH-UHFFFAOYSA-N 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- LPHGQDQBBGAPDZ-UHFFFAOYSA-N Isocaffeine Natural products CN1C(=O)N(C)C(=O)C2=C1N(C)C=N2 LPHGQDQBBGAPDZ-UHFFFAOYSA-N 0.000 description 1
- 238000004497 NIR spectroscopy Methods 0.000 description 1
- 150000001413 amino acids Chemical class 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 235000013361 beverage Nutrition 0.000 description 1
- 229960001948 caffeine Drugs 0.000 description 1
- VJEONQKOZGKCAK-UHFFFAOYSA-N caffeine Natural products CN1C(=O)N(C)C(=O)C2=C1C=CN2C VJEONQKOZGKCAK-UHFFFAOYSA-N 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 150000002337 glycosamines Chemical class 0.000 description 1
- 230000008676 import Effects 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000000877 morphologic effect Effects 0.000 description 1
- 150000008442 polyphenolic compounds Chemical class 0.000 description 1
- 235000013824 polyphenols Nutrition 0.000 description 1
- 238000004451 qualitative analysis Methods 0.000 description 1
- 230000001953 sensory effect Effects 0.000 description 1
- 238000004611 spectroscopical analysis Methods 0.000 description 1
- 239000000126 substance Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/17—Systems in which incident light is modified in accordance with the properties of the material investigated
- G01N21/25—Colour; Spectral properties, i.e. comparison of effect of material on the light at two or more different wavelengths or wavelength bands
- G01N21/31—Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry
- G01N21/35—Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry using infrared light
- G01N21/359—Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry using infrared light using near infrared light
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/17—Systems in which incident light is modified in accordance with the properties of the material investigated
- G01N21/25—Colour; Spectral properties, i.e. comparison of effect of material on the light at two or more different wavelengths or wavelength bands
- G01N21/31—Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry
- G01N21/35—Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry using infrared light
- G01N21/3563—Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry using infrared light for analysing solids; Preparation of samples therefor
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/17—Systems in which incident light is modified in accordance with the properties of the material investigated
- G01N21/25—Colour; Spectral properties, i.e. comparison of effect of material on the light at two or more different wavelengths or wavelength bands
- G01N21/31—Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry
- G01N21/35—Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry using infrared light
- G01N21/3577—Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry using infrared light for analysing liquids, e.g. polluted water
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N33/00—Investigating or analysing materials by specific methods not covered by groups G01N1/00 - G01N31/00
- G01N33/02—Food
- G01N33/14—Beverages
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/30—Computing systems specially adapted for manufacturing
Definitions
- the invention relates to the technical field of spectral analysis, in particular to a method and system for automatic detection and reconstruction of spectral peaks in near-infrared spectral analysis of tea.
- Tea is currently one of the most important beverages in China.
- the classification of tea quality is related to various indicators such as tea polyphenols, caffeine, amino acids, and sugar.
- people's grasp of the quality of each process in tea processing mainly depends on the senses Evaluation, the lack of quantitative processing evaluation standards, the judgment of the quality of processed products mainly adopts the method of sensory evaluation, lack of a digital rapid evaluation method that takes into account the main chemical components and external morphological characteristics, as China's import and export
- the existing identification methods based on experience are no longer suitable for large-scale and high-precision analysis requirements.
- near-infrared spectroscopy has the characteristics of no pollution in the detection process, low cost, and short detection cycle. It has been widely used in the analysis of tea-related industries.
- the performance of the analysis model depends on the validity of the modeling data. The existence of irrelevant variables will destroy the characteristics of the data, so it is necessary to perform the necessary feature selection operation on the spectral data before the quantitative analysis.
- the widely used sparse reconstruction methods mainly include Group Lasso, Block Orthogonal Matching Pursuit, sparse Bayesian learning and block sparse Bayesian learning methods, among which the most promising one is the sparse reconstruction based on block sparse Bayesian learning.
- Reconstruction method although this method can effectively avoid the problem of solving the norm and introduce a block structure, it does not consider the randomness of determining and dividing the position and size of the block, and does not accurately determine the position of the spectral peak. Dividing into blocks can easily lead to the phenomenon that the characteristic variables of the spectral peak position are sparse, resulting in inaccurate reconstruction results.
- the present invention proposes a method and system for automatic detection and reconstruction of spectral peaks in near-infrared spectral analysis of tea to solve the problems in the prior art.
- the object of the present invention is to propose a method and system for automatic detection and reconstruction of spectral peaks in the near-infrared spectrum analysis of tea leaves. Judging the number and position of spectral peaks in the near-infrared spectrum, so that the spectral peak features can be accurately reconstructed and selected, avoiding the problems of incorrect reconstruction and loss in the algorithm reconstruction process, and based on sparse reconstruction and automatic detection of spectral peaks
- the strategy can realize the feature selection of absorption peaks in near-infrared spectral data with multiple overlapping peaks.
- a method for automatic detection and reconstruction of spectral peaks in tea near-infrared spectral analysis comprising the following steps:
- Step 1 First collect the tea samples to be tested, then obtain the near-infrared spectral data of the tea samples, and form the original data;
- Step 2 first obtain the original data, and then initialize the parameters of the block sparse Bayesian learning method including the correlation coefficient ⁇ , the number of iterations T, the noise variance ⁇ , the symmetric positive semi-definite matrix ⁇ and the relative error ⁇ of the correlation coefficient;
- Step 3 Calculate the absorption peak position in the spectrum based on the first-order deviation and the second-order deviation according to the spectral characteristics in the original data;
- Step 4 Calculate the peak width of the spectral peak based on the half-height based on the calculated absorption peak position
- Step 5 Calculate the symmetric positive semidefinite matrix, correlation structure matrix and correlation coefficient of the block according to the sparsity control coefficient of each block;
- Step 6 Calculate the error value of each block in the original data based on the cost function, and filter the sparse blocks;
- Step 7 Calculate the expectation and variance of the spectral posterior probability
- Step 8 Use the minimized cost function to solve the hyperparameters, and update the noise variance ⁇ in the initialization parameters;
- Step nine calculate the relative error of the block correlation coefficient and the current iteration number, if the relative error is less than the set error coefficient n or the current iteration number is greater than the set iteration number T, then go to step ten, otherwise go to step five;
- Step 10 Use the expectation of the spectral posterior probability to determine the final tea sparsely reconstructed data and output it.
- a further improvement is: in the second step, the optimization function of the block sparse Bayesian learning method is as follows:
- I represents the identity matrix
- y represents the compression matrix of the spectrum
- measurement matrix is the variance matrix of all blocks, expressed as:
- ⁇ 0 diag ⁇ 1 ⁇ 1 ,..., ⁇ i ⁇ i ,..., ⁇ g ⁇ g ⁇
- ⁇ i represents the block correlation coefficient of the i-th block
- B i represents the structure matrix of the i-th block.
- step 3 the determination calculation of the spectral peak position is as follows:
- ⁇ x j and ⁇ 2 x j are the first-order deviation and second-order deviation of the spectral peak apex x j , respectively.
- step 4 the calculation of the spectral peak width is as follows:
- n and m are the indices of x n and x m respectively, and the relative height difference H is expressed as follows:
- x i and x k are the starting and ending points of the spectral peaks, respectively.
- a further improvement is: in the fifth step, the symmetric positive semidefinite matrix, the correlation structure matrix and the correlation coefficient are expressed as follows:
- d i is the size of the ith block.
- the posterior probability expectation is calculated as follows:
- ⁇ x ⁇ 0 ⁇ T ( ⁇ + ⁇ 0 ⁇ T ) -1 y
- y is expressed as the compression matrix of the spectrum obtained through the measurement matrix ⁇ .
- ⁇ (t) is the correlation coefficient for the t-th iteration.
- the sample collection module is used to collect tea samples, obtain tea near-infrared spectral data, and form raw data;
- the parameter initialization module is used to obtain the original data, and initializes the parameters of the block sparse Bayesian learning method.
- the initialization parameters include: correlation coefficient ⁇ , number of iterations T, noise variance ⁇ , symmetric positive semidefinite matrix ⁇ and correlation coefficient relative error ⁇ ;
- the spectral peak position calculation module is used to determine the position of the absorption peak according to the first-order and second-order deviations of the spectral data
- the spectral peak width calculation module is used to determine the peak width according to the half-height of the absorption peak
- a correlation coefficient calculation module is used to calculate the sparsity control coefficient of each block to obtain the correlation coefficient
- a screening module used to calculate the error value of each block according to the cost function, and to filter sparse blocks
- Expectation and variance calculation module used for obtaining expectation and variance according to the posterior probability distribution of spectrum
- a noise variance update module used to solve hyperparameters according to the minimized cost function, to obtain a noise variance update
- Judgment module used to calculate the relative error of the block correlation coefficient and the current iteration number, if the relative error is less than the set error coefficient n or the current iteration number is greater than the set iteration number T, then exit the judgment, otherwise call the calculation block correlation coefficient and block again
- the screening module performs the calculation of sparse reconstruction
- the data correction module is used to use the expectation of the spectral posterior probability to determine the final tea sparse reconstruction data and output it.
- the present invention adopts the block sparse Bayesian learning method of automatically detecting the position of the spectral peak and determining the peak width to accurately judge the number and position of the spectral peaks of the near-infrared spectrum, thereby being able to accurately reconstruct and select the spectral peak
- the peak characteristics avoid the problems of wrong reconstruction and loss in the algorithm reconstruction process, and the strategy based on sparse reconstruction and automatic detection of spectral peaks can realize the feature selection of absorption peaks of near-infrared spectral data with multiple overlapping peaks, thereby achieving high precision
- the automatic detection and reconstruction of the absorption peaks of the near-infrared spectrum data of green tea is conducive to expanding the accuracy of tea detection grades and market trade.
- Fig. 1 is a schematic flow chart of the method of Embodiment 1 of the present invention.
- Fig. 2 is a schematic diagram of the tea spectral data of Example 1 of the present invention.
- Fig. 3 is a schematic diagram of the leaf absorption peak determination and reconstruction results in Embodiment 1 of the present invention.
- Fig. 4 is a schematic diagram of the comparison of analysis results of different reconstruction methods in Embodiment 1 of the present invention.
- FIG. 5 is a schematic diagram of the system structure of Embodiment 2 of the present invention.
- the present embodiment provides a method for automatic detection and reconstruction of spectral peaks in tea near-infrared spectral analysis, including the following steps:
- Step 1 First collect the tea samples to be tested, then obtain the near-infrared spectral data of the tea samples, and form the original data.
- the collected green tea spectral data is The sugar content data is
- Step 2 First obtain the original data, and then initialize the parameters of the block sparse Bayesian learning method including the correlation coefficient ⁇ , the number of iterations ⁇ , the noise variance ⁇ , the symmetric positive semi-definite matrix ⁇ and the relative error ⁇ of the correlation coefficient.
- the block sparse Bayesian learning method optimization function is as follows:
- I represents the identity matrix
- y represents the compression matrix of the spectrum
- measurement matrix is the variance matrix of all blocks, expressed as:
- ⁇ 0 diag ⁇ 1 ⁇ 1 ,..., ⁇ i ⁇ i ,..., ⁇ g ⁇ g ⁇
- ⁇ i represents the block correlation coefficient of the i-th block
- B i represents the structure matrix of the i-th block
- Step 3 According to the spectral features in the original data, calculate the absorption peak position in the spectrum based on the first-order deviation and the second-order deviation. The calculation of the determination of the spectral peak position is as follows:
- ⁇ x j and ⁇ 2 x j are the first-order deviation and second-order deviation of the spectral peak apex x j , respectively;
- Step 4 According to the calculated absorption peak position, calculate the peak width of the spectral peak based on the half-height.
- the calculation of the spectral peak width is expressed as follows:
- n and m are the indices of x n and x m respectively, and the relative height difference H is expressed as follows:
- x i and x k are the starting point and the end point of the spectral peak respectively;
- Step 5 Calculate the symmetric positive semidefinite matrix, correlation structure matrix and correlation coefficient of the block according to the sparsity control coefficient of each block.
- the symmetric positive semidefinite matrix, correlation structure matrix and correlation coefficient are expressed as follows:
- Step 6 Calculate the error value of each block in the original data based on the cost function, and filter the sparse blocks.
- the cost function error is calculated as follows:
- Step 7 Calculate the expectation and variance of the posterior probability of the spectrum, and the expectation of the posterior probability is calculated as follows:
- y is expressed as the compression matrix of the spectrum obtained through the measurement matrix ⁇ ;
- Step 8 Use the minimized cost function to solve the hyperparameters, and update the noise variance ⁇ in the initialization parameters, and calculate the expression:
- Step nine calculate the relative error of the block correlation coefficient and the current iteration number, if the relative error is less than the set error coefficient n or the current iteration number is greater than the set iteration number T, then go to step ten, otherwise go to step five, the relative error Judgment conditions are expressed as follows:
- ⁇ (t) is the correlation coefficient of the t-th iteration
- Step 10 Use the expectation of the spectral posterior probability to determine the final tea sparsely reconstructed data and output it.
- the sugar content of the tea leaves is predicted, specifically: when using sparse Bayesian learning (SBL), the expected update formula of the spectral posterior probability is expressed as:
- Block SBL Block Sparse Bayesian Learning
- ⁇ x ⁇ 0 ⁇ T ( ⁇ + ⁇ 0 ⁇ T ) -1 y
- y is expressed as the compression matrix of the spectrum obtained through the measurement matrix ⁇ ;
- the quantitative analysis index for sugar prediction is the coefficient of determination, specifically expressed as:
- z i represents the real value
- np represents the number of samples in the prediction set.
- np 47. It can be obtained by comparing the above-mentioned method with the commonly used sparse reconstruction method SBL.
- the method provided by the present invention can realize high-precision green tea near-infrared spectrum Automatic detection and reconstruction of data absorption peaks.
- this embodiment provides a system for automatic detection and reconstruction of spectral peaks in near-infrared spectral analysis of tea, including:
- the sample collection module is used to collect tea samples, obtain tea near-infrared spectral data, and form raw data;
- the parameter initialization module is used to obtain the original data, and initializes the parameters of the block sparse Bayesian learning method.
- the initialization parameters include: correlation coefficient ⁇ , number of iterations T, noise variance ⁇ , symmetric positive semidefinite matrix ⁇ and correlation coefficient relative error ⁇ ;
- the spectral peak position calculation module is used to determine the position of the absorption peak according to the first-order and second-order deviations of the spectral data
- the spectral peak width calculation module is used to determine the peak width according to the half-height of the absorption peak
- a correlation coefficient calculation module is used to calculate the sparsity control coefficient of each block to obtain the correlation coefficient
- a screening module used to calculate the error value of each block according to the cost function, and to filter sparse blocks
- Expectation and variance calculation module used for obtaining expectation and variance according to the posterior probability distribution of spectrum
- a noise variance update module used to solve hyperparameters according to the minimized cost function, to obtain a noise variance update
- Judgment module used to calculate the relative error of the block correlation coefficient and the current iteration number, if the relative error is less than the set error coefficient n or the current iteration number is greater than the set iteration number T, then exit the judgment, otherwise call the calculation block correlation coefficient and block again
- the screening module performs the calculation of sparse reconstruction
- the data correction module is used to use the expectation of the spectral posterior probability to determine the final tea sparse reconstruction data and output it.
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)
- Engineering & Computer Science (AREA)
- Food Science & Technology (AREA)
- Medicinal Chemistry (AREA)
- Investigating Or Analysing Materials By Optical Means (AREA)
Abstract
一种茶叶近红外光谱分析中谱峰自动检测与重构方法及系统,该方法包括:先采集原始光谱数据,再初始化参数,接着计算吸收峰的位置和宽度,随后更新相关系数并筛选稀疏块,然后计算代价函数及期望,之后判定终止条件,最后输出重构数据。采用自动检测谱峰位置和确定峰宽的块稀疏贝叶斯学习方法能够准确地判断近红外光谱的谱峰数量和位置,从而能够准确地重构选取出谱峰特征,避免了算法重构过程出现误重构、有丢失的问题,且基于稀疏重构和谱峰自动检测的策略能够实现多重叠峰近红外光谱数据的吸收峰特征选取,进而实现高精度绿茶近红外光谱数据吸收峰自动检测与重构,有利于扩大茶叶检测等级精度及市场贸易。
Description
本发明涉及光谱分析技术领域,尤其涉及茶叶近红外光谱分析中谱峰自动检测与重构方法及系统。
茶叶目前是我国最重要的饮品之一,茶叶品质等级划分与其内含的茶多酚、咖啡碱、氨基酸、糖分等多种指标相关,长期以来,人们对于茶叶加工中各个工序质量的掌握主要依赖感官审评,缺乏量化的加工评价标准,对于加工后产品质量的判别主要是采用感官审评的方法,缺乏一种对主要化学成分和外部形态特点兼顾的、数字化快速评价方法,随着我国进出口贸易的不断开展及人民物质需求的不断提高,对于产业等级划分和品质鉴别提出更加精细的分析要求,现有的基于经验的鉴别方法已经不适用大规模、高精度的分析要求。
近红外光谱技术作为光谱学的一个重要分支,具有检测过程无污染、成本低、检测周期短等特点,已在茶叶相关产业分析中得到广泛应用,但在实际分析过程中,由于光谱数据的高维性、共线性和谱峰数量的有限性,使获得所采集的全波长范围光谱数据存在大量无关的特征变量,根据比尔-朗伯定律,分析模型的性能取决于建模数据的有效性,无关变量的存在将破坏数据特征,因此在定量分析之前需要对光谱数据进行必要的特征选择操作。
目前应用较广的稀疏重构方法主要有Group Lasso、Block Orth ogonal Matching Pursuit、稀疏贝叶斯学习和块稀疏贝叶斯学习方 法,其中应用最具前景的是基于块稀疏贝叶斯学习的稀疏重构方法,该方法虽然能够有效避免求解范数的问题且引入了块结构的方式,但并未考虑在确定和划分块的位置和大小的随机性问题,并且未准确的确定谱峰位置而划分块,容易导致谱峰位置特征变量被稀疏的现象,从而导致重构结果不准确,针对含有多个重叠峰的茶叶近红外光谱数据,如何精准地选取谱峰特征变量对于茶叶定性、定量分析过程至关重,因此,本发明提出茶叶近红外光谱分析中谱峰自动检测与重构方法及系统以解决现有技术中存在的问题。
发明内容
针对上述问题,本发明的目的在于提出茶叶近红外光谱分析中谱峰自动检测与重构方法及系统,该方法采用自动检测谱峰位置和确定峰宽的块稀疏贝叶斯学习方法能够准确的判断近红外光谱的谱峰数量和位置,从而能够准确的重构选取出谱峰特征,避免了算法重构过程出现误重构、有丢失的问题,且基于稀疏重构和谱峰自动检测的策略能够实现多重叠峰近红外光谱数据的吸收峰特征选取。
为了实现本发明的目的,本发明通过以下技术方案实现:茶叶近红外光谱分析中谱峰自动检测与重构方法,包括以下步骤:
步骤一:先采集待检测茶叶样本,再获取茶叶样本的近红外光谱数据,并形成原始数据;
步骤二:先获取原始数据,再初始化包含相关系数γ、迭代次数Τ、噪声方差λ、对称半正定矩阵Α以及相关系数相对误差η的块稀疏贝叶斯学习方法参数;
步骤三:根据原始数据中的光谱特征,基于一阶偏差和二阶偏差来计算光谱中的吸收峰位置;
步骤四:根据计算得到的吸收峰位置,基于半峰高计算谱峰的峰宽;
步骤五:根据每个块的稀疏度控制系数计算块的对称半正定矩阵、相关性结构矩阵和相关系数;
步骤六:基于代价函数计算原始数据中每个块的误差值,并筛选稀疏块;
步骤七:计算光谱后验概率的期望和方差;
步骤八:利用最小化代价函数求解超参数,并更新初始化参数中的噪声方差λ;
步骤九:计算块相关系数的相对误差及当前迭代次数,若相对误差小于设定误差系数η或当前迭代次数大于设定迭代次数Τ,则转至步骤十,否则转至步骤五;
步骤十:利用光谱后验概率的期望,确定最终的茶叶稀疏重构数据并输出。
进一步改进在于:所述步骤二中,块稀疏贝叶斯学习方法优化函数如下:
L=log|λΙ+ΩΣ
0Ω
T|+y
T(λΙ+ΩΣ
0Ω
T)
-1y
Σ
0=diag{γ
1Β
1,…,γ
iΒ
i,…,γ
gΒ
g}
其中,γ
i表示第i个块的块相关系数,B
i表示第i个块的结构矩阵。
进一步改进在于:所述步骤三中,谱峰位置确定计算如下:
Δx
j=x
j-x
j-1
Δ
2x
j=Δx
j-Δx
j-1
s.t.Δx
j=0 and Δ
2x
j<0
其中,Δx
j和Δ
2x
j分别是谱峰顶点x
j的一阶偏差和二阶偏差。
进一步改进在于:所述步骤四中,谱峰宽度的计算表示如下:
其中,n和m分别是x
n和x
m的索引,相对高度差H表示如下:
其中,x
i和x
k分别是谱峰的起始点和终止点。
进一步改进在于:所述步骤五中,对称半正定矩阵、相关性结构矩阵和相关系数表示如下:
进一步改进在于:所述步骤六中,代价函数误差计算如下:
L=log|λΙ+ΩΣ
0Ω
T|+y
T(λΙ+ΩΣ
0Ω
T)
-1y
进一步改进在于:所述步骤七中,后验概率期望计算如下:
μ
x=Σ
0Ω
T(λΙ+ΩΣ
0Ω
T)
-1y
其中,y表示为经过测量矩阵Ω得到光谱的压缩矩阵。
进一步改进在于:所述步骤九中,相对误差判断条件表示如下:
其中,γ
(t)是第t次迭代的相关系数。
茶叶近红外光谱分析中谱峰自动检测与重构系统,包括:
样本采集模块,用于采集茶叶样本,获取茶叶近红外光谱数据,形成原始数据;
参数初始化模块,用于获取原始数据,并初始化块稀疏贝叶斯学习方法参数,初始化参数包含:相关系数γ、迭代次数Τ、噪声方差λ、对称半正定矩阵Α以及相关系数相对误差η;
谱峰位置计算模块,用于根据光谱数据的一阶、二阶偏差确定吸收峰的位置;
谱峰宽度计算模块,用于根据吸收峰的半峰高确定峰宽;
相关系数计算模块,用于计算每个块的稀疏度控制系数,得到相关系数;
筛选模块,用于根据代价函数计算每个块的误差值,并筛选稀疏块;
期望和方差计算模块,用于根据光谱的后验概率分布,得到期望和方差;
噪声方差更新模块,用于根据最小化代价函数求解超参数,得到噪声方差更新;
判断模块,用于计算块相关系数的相对误差及当前迭代次数,若相对误差小于设定误差系数η或当前迭代次数大于设定迭代次数Τ,则退出判断,否则重新调用计算块相关系数和块筛选模块进行稀疏重构的计算;
数据校正模块,用于利用光谱后验概率的期望,确定最终的茶叶稀疏重构数据并输出。
本发明的有益效果为:本发明采用自动检测谱峰位置和确定峰宽的块稀疏贝叶斯学习方法能够准确的判断近红外光谱的谱峰数量和位置,从而能够准确的重构选取出谱峰特征,避免了算法重构过程出现误重构、有丢失的问题,且基于稀疏重构和谱峰自动检测的策略能够实现多重叠峰近红外光谱数据的吸收峰特征选取,进而实现高精度绿茶近红外光谱数据吸收峰自动检测与重构,有利于扩大茶叶检测等级精度及市场贸易。
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这 些附图获得其他的附图。
图1是本发明实施例一的方法流程示意图;
图2是本发明实施例一的茶叶光谱数据示意图;
图3是本发明实施例一的叶吸收峰确定及重构结果示意图;
图4是本发明实施例一的不同重构方法分析结果对比示意图;
图5是本发明实施例二的系统结构示意图。
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
实施例一
参见图1、图2、图3、图4,本实施例提供了茶叶近红外光谱分析中谱峰自动检测与重构方法,包括以下步骤:
步骤二:先获取原始数据,再初始化包含相关系数γ、迭代次数Τ、噪声方差λ、对称半正定矩阵Α以及相关系数相对误差η的块稀疏贝叶斯学习方法参数,初始化参数设置为:迭代次数Τ=100,噪声方差λ=10
-2,相关系数γ=0,相对误差η=10
-8及测量矩阵Ω=rand();
块稀疏贝叶斯学习方法优化函数如下:
L=log|λΙ+ΩΣ
0Ω
T|+y
T(λΙ+ΩΣ
0Ω
T)
-1y
Σ
0=diag{γ
1Β
1,…,γ
iΒ
i,…,γ
gΒ
g}
其中,γ
i表示第i个块的块相关系数,B
i表示第i个块的结构矩阵;
步骤三:根据原始数据中的光谱特征,基于一阶偏差和二阶偏差来计算光谱中的吸收峰位置,谱峰位置确定计算如下:
Δx
j=x
j-x
j-1
Δ
2x
j=Δx
j-Δx
j-1
s.t.Δx
j=0 and Δ
2x
j<0
其中,Δx
j和Δ
2x
j分别是谱峰顶点x
j的一阶偏差和二阶偏差;
步骤四:根据计算得到的吸收峰位置,基于半峰高计算谱峰的峰宽,谱峰宽度的计算表示如下:
其中,n和m分别是x
n和x
m的索引,相对高度差H表示如下:
其中,x
i和x
k分别是谱峰的起始点和终止点;
步骤五:根据每个块的稀疏度控制系数计算块的对称半正定矩阵、相关性结构矩阵和相关系数,对称半正定矩阵、相关性结构矩阵和相关系数表示如下:
步骤六:基于代价函数计算原始数据中每个块的误差值,并筛选稀疏块,代价函数误差计算如下:
L=log|λΙ+ΩΣ
0Ω
T|+y
T(λΙ+ΩΣ
0Ω
T)
-1y
步骤七:计算光谱后验概率的期望和方差,后验概率期望计算如下:
μ=Σ
0Ω
T(λΙ+ΩΣ
0Ω
T)
-1y
其中,y表示为经过测量矩阵Ω得到光谱的压缩矩阵;
步骤九:计算块相关系数的相对误差及当前迭代次数,若相对误差小于设定误差系数η或当前迭代次数大于设定迭代次数Τ,则转至步骤十,否则转至步骤五,,相对误差判断条件表示如下:
其中,γ
(t)是第t次迭代的相关系数;
步骤十:利用光谱后验概率的期望,确定最终的茶叶稀疏重构数据并输出。
基于输出的茶叶稀疏重构数据,对茶叶进行糖分预测,具体为:当采用稀疏贝叶斯学习(SBL)时,光谱后验概率的期望更新公式表示为:
当采用块稀疏贝叶斯学习(Block SBL)时,期望更新公式表示为:
μ
x=Σ
0Ω
T(λΙ+ΩΣ
0Ω
T)
-1y
其中,y表示为经过测量矩阵Ω得到光谱的压缩矩阵;
糖分预测定量分析指标为决定系数,具体表示为:
其中,z
i表示真实值,
表示预测值,
为样本均值,n
p表示预测集样本数,本实施例中n
p=47,对上述方法与常用的稀疏重构方法SBL进行对比可得,本发明提供的方法能够实现高精度绿茶近红外光谱数据吸收峰自动检测与重构。
实施例二
参见图5,本实施例提供了茶叶近红外光谱分析中谱峰自动检测与重构系统,包括:
样本采集模块,用于采集茶叶样本,获取茶叶近红外光谱数据,形成原始数据;
参数初始化模块,用于获取原始数据,并初始化块稀疏贝叶斯学习方法参数,初始化参数包含:相关系数γ、迭代次数Τ、噪声方差λ、对称半正定矩阵Α以及相关系数相对误差η;
谱峰位置计算模块,用于根据光谱数据的一阶、二阶偏差确定吸收峰的位置;
谱峰宽度计算模块,用于根据吸收峰的半峰高确定峰宽;
相关系数计算模块,用于计算每个块的稀疏度控制系数,得到相关系数;
筛选模块,用于根据代价函数计算每个块的误差值,并筛选稀疏块;
期望和方差计算模块,用于根据光谱的后验概率分布,得到期望和方差;
噪声方差更新模块,用于根据最小化代价函数求解超参数,得到噪声方差更新;
判断模块,用于计算块相关系数的相对误差及当前迭代次数,若相对误差小于设定误差系数η或当前迭代次数大于设定迭代次数Τ,则退出判断,否则重新调用计算块相关系数和块筛选模块进行稀疏重构的计算;
数据校正模块,用于利用光谱后验概率的期望,确定最终的茶叶稀疏重构数据并输出。
以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。
Claims (9)
- 茶叶近红外光谱分析中谱峰自动检测与重构方法,其特征在于,包括以下步骤:步骤一:先采集待检测茶叶样本,再获取茶叶样本的近红外光谱数据,并形成原始数据;步骤二:先获取原始数据,再初始化包含相关系数γ、迭代次数Τ、噪声方差λ、对称半正定矩阵Α以及相关系数相对误差η的块稀疏贝叶斯学习方法参数;步骤三:根据原始数据中的光谱特征,基于一阶偏差和二阶偏差来计算光谱中的吸收峰位置;步骤四:根据计算得到的吸收峰位置,基于半峰高计算谱峰的峰宽;步骤五:根据每个块的稀疏度控制系数计算块的对称半正定矩阵、相关性结构矩阵和相关系数;步骤六:基于代价函数计算原始数据中每个块的误差值,并筛选稀疏块;步骤七:计算光谱后验概率的期望和方差;步骤八:利用最小化代价函数求解超参数,并更新初始化参数中的噪声方差λ;步骤九:计算块相关系数的相对误差及当前迭代次数,若相对误差小于设定误差系数η或当前迭代次数大于设定迭代次数Τ,则转至步骤十,否则转至步骤五;步骤十:利用光谱后验概率的期望,确定最终的茶叶稀疏重构数 据并输出。
- 根据权利要求1所述的茶叶近红外光谱分析中谱峰自动检测与重构方法,其特征在于:所述步骤三中,谱峰位置确定计算如下:Δx j=x j-x j-1Δ 2x j=Δx j-Δx j-1s.t.Δx j=0 andΔ 2x j<0其中,Δx j和Δ 2x j分别是谱峰顶点x j的一阶偏差和二阶偏差。
- 根据权利要求1所述的茶叶近红外光谱分析中谱峰自动检测与重构方法,其特征在于:所述步骤七中,后验概率期望计算如下:μ x=Σ 0Ω T(λΙ+ΩΣ 0Ω T) -1y其中,y表示为经过测量矩阵Ω得到光谱的压缩矩阵。
- 茶叶近红外光谱分析中谱峰自动检测与重构系统,其特征在于,包括:样本采集模块,用于采集茶叶样本,获取茶叶近红外光谱数据,形成原始数据;参数初始化模块,用于获取原始数据,并初始化块稀疏贝叶斯学习方法参数,初始化参数包含:相关系数γ、迭代次数Τ、噪声方差λ、对称半正定矩阵Α以及相关系数相对误差η;谱峰位置计算模块,用于根据光谱数据的一阶、二阶偏差确定吸收峰的位置;谱峰宽度计算模块,用于根据吸收峰的半峰高确定峰宽;相关系数计算模块,用于计算每个块的稀疏度控制系数,得到相关系数;筛选模块,用于根据代价函数计算每个块的误差值,并筛选稀疏块;期望和方差计算模块,用于根据光谱的后验概率分布,得到期望和方差;噪声方差更新模块,用于根据最小化代价函数求解超参数,得到噪声方差更新;判断模块,用于计算块相关系数的相对误差及当前迭代次数,若相对误差小于设定误差系数η或当前迭代次数大于设定迭代次数Τ,则退出判断,否则重新调用计算块相关系数和块筛选模块进行稀疏重 构的计算;数据校正模块,用于利用光谱后验概率的期望,确定最终的茶叶稀疏重构数据并输出。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US18/192,733 US20230243744A1 (en) | 2021-12-14 | 2023-03-30 | Method and system for automatically detecting and reconstructing spectrum peaks in near infrared spectrum analysis of tea |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111526109.5 | 2021-12-14 | ||
CN202111526109.5A CN114216877B (zh) | 2021-12-14 | 2021-12-14 | 茶叶近红外光谱分析中谱峰自动检测与重构方法及系统 |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US18/192,733 Continuation US20230243744A1 (en) | 2021-12-14 | 2023-03-30 | Method and system for automatically detecting and reconstructing spectrum peaks in near infrared spectrum analysis of tea |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2023108514A1 true WO2023108514A1 (zh) | 2023-06-22 |
Family
ID=80701734
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2021/138605 WO2023108514A1 (zh) | 2021-12-14 | 2021-12-16 | 茶叶近红外光谱分析中谱峰自动检测与重构方法及系统 |
Country Status (3)
Country | Link |
---|---|
US (1) | US20230243744A1 (zh) |
CN (1) | CN114216877B (zh) |
WO (1) | WO2023108514A1 (zh) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117150387A (zh) * | 2023-11-01 | 2023-12-01 | 奥谱天成(厦门)光电有限公司 | 拉曼光谱峰拟合方法、介质、设备及装置 |
CN117214125B (zh) * | 2023-11-09 | 2024-01-26 | 南京盛略科技有限公司 | 一种基于检测光纤的液体成分检测系统及方法 |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2009014700A (ja) * | 2007-01-31 | 2009-01-22 | Osaka Univ | 緑茶の品質予測方法 |
KR20100001401A (ko) * | 2008-06-27 | 2010-01-06 | 대한민국(관리부서:농촌진흥청) | 근적외선 분광분석법을 이용한 차나무 생엽의 비파괴분석방법 |
CN103247034A (zh) * | 2013-05-08 | 2013-08-14 | 中国科学院光电研究院 | 一种基于稀疏光谱字典的压缩感知高光谱图像重构方法 |
CN105067550A (zh) * | 2015-07-30 | 2015-11-18 | 中北大学 | 基于分块稀疏贝叶斯优化的红外光谱波长选择方法 |
CN111307751A (zh) * | 2020-03-18 | 2020-06-19 | 安徽大学 | 茶叶近红外光谱分析中谱图基线校正方法、系统、检测方法 |
CN111896495A (zh) * | 2020-08-05 | 2020-11-06 | 安徽大学 | 基于深度学习与近红外光谱太平猴魁产地甄别方法及系统 |
-
2021
- 2021-12-14 CN CN202111526109.5A patent/CN114216877B/zh active Active
- 2021-12-16 WO PCT/CN2021/138605 patent/WO2023108514A1/zh unknown
-
2023
- 2023-03-30 US US18/192,733 patent/US20230243744A1/en not_active Abandoned
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2009014700A (ja) * | 2007-01-31 | 2009-01-22 | Osaka Univ | 緑茶の品質予測方法 |
KR20100001401A (ko) * | 2008-06-27 | 2010-01-06 | 대한민국(관리부서:농촌진흥청) | 근적외선 분광분석법을 이용한 차나무 생엽의 비파괴분석방법 |
CN103247034A (zh) * | 2013-05-08 | 2013-08-14 | 中国科学院光电研究院 | 一种基于稀疏光谱字典的压缩感知高光谱图像重构方法 |
CN105067550A (zh) * | 2015-07-30 | 2015-11-18 | 中北大学 | 基于分块稀疏贝叶斯优化的红外光谱波长选择方法 |
CN111307751A (zh) * | 2020-03-18 | 2020-06-19 | 安徽大学 | 茶叶近红外光谱分析中谱图基线校正方法、系统、检测方法 |
CN111896495A (zh) * | 2020-08-05 | 2020-11-06 | 安徽大学 | 基于深度学习与近红外光谱太平猴魁产地甄别方法及系统 |
Also Published As
Publication number | Publication date |
---|---|
US20230243744A1 (en) | 2023-08-03 |
CN114216877B (zh) | 2023-03-10 |
CN114216877A (zh) | 2022-03-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2023108514A1 (zh) | 茶叶近红外光谱分析中谱峰自动检测与重构方法及系统 | |
CN105630743A (zh) | 一种光谱波数的选择方法 | |
CN111855608A (zh) | 基于融合特征波长选择算法的苹果酸度近红外无损检测方法 | |
CN115409131B (zh) | 基于spc过程管控系统的生产线异常检测方法 | |
CN111896495A (zh) | 基于深度学习与近红外光谱太平猴魁产地甄别方法及系统 | |
CN111474137A (zh) | 一种基于卷积神经网络的柑橘糖度无损检测方法 | |
CN113076692B (zh) | 一种反演叶片氮素含量的方法 | |
CN117851979B (zh) | 基于近红外光谱技术的氢氧化钙浓度检测方法 | |
CN105738311A (zh) | 一种基于近红外光谱技术的苹果甜度无损快速检测方法 | |
CN114414521A (zh) | 基于红外多光谱传感器的牛奶主要成分测量方法 | |
CN109839362A (zh) | 基于渐进式去噪技术的红外光谱定量分析方法 | |
CN107290299B (zh) | 一种实时无损检测桃的糖度和酸度的方法 | |
CN115169751B (zh) | 一种提高中药饮片的养护质量的方法及系统 | |
CN110567887A (zh) | 一种基于光谱成像和深度学习技术的干茧茧层丝胶溶失率的无损检测方法 | |
CN114062305B (zh) | 基于近红外光谱和1D-In-Resnet网络的单籽粒品种鉴定方法及系统 | |
CN116152194A (zh) | 一种物体缺陷检测方法、系统、设备及介质 | |
WO2021253874A1 (zh) | 卷烟主流烟气光谱数据的感官评价方法 | |
CN112881333B (zh) | 一种基于改进免疫遗传算法的近红外光谱波长筛选方法 | |
CN113177188B (zh) | 一种基于光谱新特征的反演叶片叶绿素含量的方法 | |
CN113933247A (zh) | 一种水果成熟度检测模型的构建方法 | |
CN117556245B (zh) | 一种四甲基氢氧化铵生产过滤杂质检测方法 | |
CN115901677B (zh) | 具有更新机制的硝酸-硝酸铵溶液中硝酸铵浓度预测方法 | |
CN113870265B (zh) | 一种工业零件表面缺陷检测方法 | |
CN111024557B (zh) | 一种纸页吸水性软测量方法 | |
CN114414524A (zh) | 快速检测航空煤油性质的方法 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 21967650 Country of ref document: EP Kind code of ref document: A1 |