Spectral calculation reconstruction method

By using the sliding window module to sample and segment the spectral data in the spectral calculation reconstruction method, the problem of excessive number of input and output nodes of the ANN model is solved, and the model is streamlined and efficiently trained, maintaining wide spectrum and high spectrum Resolution reconstruction effect.

CN119397157APending Publication Date: 2025-02-07SUZHOU LOW LIGHT LEVEL ELECTRONIC FUSION TECH RES INST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411370077.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-06
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

When existing spectral calculation reconstruction methods process wide spectrum, high resolution spectrum, the number of input and output nodes of the ANN model is too large, resulting in difficulty in model training and slow convergence.

Method used

The sliding window module is used to sample the vector after the dimension is raised, to reduce the number of input nodes of the ANN model, and to simplify the scale of the ANN model by merging the segmented spectrum.

Benefits of technology

The number of input and output nodes of the ANN model is significantly reduced, the model structure is simplified, the ease of model training and convergence speed are improved, while maintaining the wide spectrum and high resolution reconstruction effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119397157A_ABST
    Figure CN119397157A_ABST
Patent Text Reader

Abstract

The invention relates to a spectrum calculation reconstruction method, which comprises a dimension raising module, a sliding window module and an ANN module, the method comprises the following steps: S1, firstly, carrying out dimension raising on an intensity vector # imgabs1 # obtained by sampling by adopting a pseudo-inverse matrix # imgabs0 # of R, and converting the intensity vector # imgabs1 # into # imgabs3 # from # imgabs2 # in a dimension raising manner; s2, adopting a sliding window module to perform sliding sampling on # imgabs4 # with a fixed window length w and a sliding step length p; the result of each sampling is # imgabs5 #, and i represents the ith window; s3, constructing an artificial neural network model by taking # imgabs6 # obtained by each sampling window as input; the # imgabs7 # is used as the input of an ANN model, the segmented spectral data Swi is used as the output of the ANN model, and the training model fits the nonlinear relation between the # imgabs8 # and the segmented spectral data Swi; and S4, the trained ANN model can be used as a spectrum calculation reconstruction algorithm. According to the method, a sliding window is adopted to sample vectors after dimension raising, the sampled vectors serve as output of an ANN model, and segmented reconstructed spectrums are obtained through reasoning of the ANN model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of spectrometers, and in particular to a spectrum calculation and reconstruction method. Background Art

[0002] As an important analytical tool, spectrometers are widely used in various fields of scientific research and industrial production. According to the working principle, traditional spectral analysis equipment includes dispersion spectrometers and Fourier transform spectrometers, which are usually composed of discrete optical components and mechanical parts. This leads to an increase in the size of the spectrometer and an increase in structural complexity, which in turn causes an increase in manufacturing costs. These factors limit the promotion and popularization of traditional spectrometers in portable applications such as on-site detection and wearables. In order to meet the needs of various applications, it is urgent to develop new spectrometers that are small in size, highly integrated, low in cost, and easy to use. As a new spectral measurement technology, computational reconstruction spectrometer combines front-end optical design with back-end signal processing, and uses computational technology to approximate or "reconstruct" the incident light spectrum, showing great potential in reducing costs, reducing volume, and improving flexibility.

[0003] The basic principle of computational reconstruction spectrometer is to sample the incident light through a specific sampling unit, and use the measurement data obtained after sampling to reconstruct the complete spectral information through computational methods. Common sampling units include multimode optical fiber, random medium, filter array, etc. Let the light intensity information after sampling be D, the sampling matrix be R, and the incident spectrum be S, then the process of spectral reconstruction is the process of solving equation (1): (1) Where M is the number of sampling channels, and N is the number of discretized wavelength points used in system calibration. Commonly used algorithms for spectral reconstruction include compressed sensing, regularization methods, and deep learning.

[0004] Existing technical solutions: Sensors 2018, 18(2), 644; https: / / doi.org / 10.3390 / s18020644 NatureCommunications,2023,14(1):6376.https: / / doi.org / 10.1038 / s41467-023-42197-3. Sensors 2020, 20(3), 594; https: / / doi.org / 10.3390 / s20030594 The compressed sensing algorithm sparsely represents the solved S on a specific basis function Φ, such as Gaussian function, discrete cosine transform, etc., to obtain S=Φ·x, where x is a sparse vector. Then, algorithms such as orthogonal matching pursuit are used to solve x and finally obtain S.

[0005] The regularization method transforms the solution of equation (1) into the equation: (2) The solution is obtained, where α is the regularization coefficient. The selection of the regularization coefficient is determined by the cross-validation method, and the nonlinear optimization algorithm is used to solve equation (2) to obtain the reconstructed spectrum S.

[0006] The deep learning algorithm reconstructs the input and output data of the spectrometer through known calculations and trains the artificial neural network (ANN) model to fit the nonlinear relationship between the input and output data, thereby obtaining a black box model that can reconstruct the spectrum.

[0007] However, the spectral accuracy reconstructed by the compressed sensing algorithm depends on the selected basis function. It is more accurate for sparse spectrum reconstruction, but has a larger error for complex spectrum reconstruction. The regularization method balances the reconstruction error of sparse spectrum and continuous spectrum by adding L1 norm and L2 norm regularization terms about S, but it requires a specific nonlinear optimization algorithm to solve equation (2), which is slow. Moreover, the selection of its regularization coefficient often depends on the prior knowledge of the spectrum to be measured. In recent years, deep learning methods have been increasingly used in the field of spectral computation and reconstruction, but ordinary deep learning algorithms use simple multi-layer feedforward ANN models, whose input nodes and output nodes are directly related to the number of wavelength points of the reconstructed spectrum (the ratio of spectral bandwidth to resolution). When the spectral range to be measured is large and the resolution is high, the corresponding number of spectral points can be as high as tens of thousands or even higher, and the number of single-layer nodes of the corresponding ANN model can also be as high as tens of thousands, which leads to the model being too large and the network being too wide, making it difficult to train. Summary of the invention

[0008] In order to achieve the purpose of the present invention, the technical solution adopted by the present invention is: a spectrum calculation and reconstruction method, including: a dimension-raising module, a sliding window module and an ANN module; S1: First use the pseudo-inverse matrix of R The sampled intensity vector To upgrade the dimension, Up-dimensional conversion to ; S2: Using a sliding window module, with a fixed window length w and sliding step size p Sliding sampling is performed; the result of each sampling is , where i represents the i-th window; S3: obtained by each sampling window As input, an artificial neural network model is constructed; As the input of the ANN model, the segmented spectral data S wi As the output of the ANN model, the training model is fitted and the segmented spectral data S wi The nonlinear relationship between S4: The trained ANN model can be used as a spectral calculation and reconstruction algorithm.

[0009] Preferably, the output of the ANN model is a reconstructed spectrum corresponding to the sampling window , multiple Merge in the order of sliding window sampling to obtain a complete reconstructed spectrum .

[0010] Preferably, the ANN model is a multi-layer feedforward artificial neural network.

[0011] Preferably, the segmented spectral data Swi is a segment of spectral data with a length w intercepted from the original spectral data S according to the window width and sampling position of the sliding window sampling.

[0012] Preferably, where the pseudo-inverse matrix of R It can be calculated by singular value decomposition method; The dimension-raising operation is to perform the intensity vector of length M Left multiply matrix , and get a vector of length N .

[0013] Preferably, when training the ANN model, the model needs to be trained based on a known data set first.

[0014] Preferably, a certain amount of known spectral data S and corresponding ; The original spectral data S is cut into multiple segmented spectral data S according to the window width and sampling position of the sliding window wi , as the output of ANN; With the corresponding slave vector The sliding sampling As input to ANN; The error back propagation algorithm is used to train the ANN model so that the ANN model can be established and the segmented input spectrum S wi The functional relationship between them.

[0015] Compared with the prior art, the present invention has the following beneficial effects: The present invention adopts a sliding window to sample the vector after dimension increase, and the sampled vector is used as the output of the ANN model, and the segmented reconstructed spectrum is obtained through the reasoning of the ANN model. Compared with directly using the ANN model to reconstruct the spectrum, the processing process of the sliding window significantly reduces the length of the vector at the input end of the ANN model, thereby reducing the number of input nodes of the ANN model. At the same time, the output end of the ANN model in the present invention corresponds to a segmented spectrum, and its vector length is also much smaller than the length of the original spectrum, so the number of output nodes of the ANN model can also be greatly reduced. When the number of input and output nodes of the ANN model is reduced, the number of nodes in the middle hidden layer is also reduced accordingly, so the entire ANN model is streamlined, the model parameter amount is reduced, and the model is easier to train and converges easily. At the same time, by merging the method of segmented spectra, the total number of wavelength points of the reconstructed spectrum will not be reduced, and wide spectrum and high resolution spectrum reconstruction can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 It is a schematic diagram of the principle of a spectrum reconstruction algorithm; Figure 2 This is a schematic diagram of the principle of the dimension-upgrading module; Figure 3 This is a schematic diagram of sliding window sampling with a window length of 4 and a step size of 1; Figure 4 Schematic diagram of the ANN model with reduced number of input and output nodes. DETAILED DESCRIPTION

[0017] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0018] Example: like Figures 1 to 4 As shown, the present invention provides a technical solution: a spectrum calculation and reconstruction method, including: a dimension-raising module, a sliding window module and an ANN module; S1: First use the pseudo-inverse matrix of R The sampled intensity vector To upgrade the dimension, Up-dimensional conversion to ; Among them, the pseudo-inverse matrix of R It can be calculated by the singular value decomposition method.

[0019] Among them, the dimension-raising operation is to perform the intensity vector with a length of M. Left multiply matrix , and get a vector of length N .

[0020] S2: Using a sliding window module, with a fixed window length w and sliding step size p Sliding sampling is performed; the result of each sampling is , where i represents the i-th window; S3: obtained by each sampling window As input, an artificial neural network model is constructed; As the input of the ANN model, the segmented spectral data S wi As the output of the ANN model, the training model is fitted and the segmented spectral data S wi The nonlinear relationship between Among them, the segmented spectral data S wi , is a segment of spectral data with a length of w intercepted from the original spectral data S according to the window width and sampling position of the sliding window sampling.

[0021] The output of this ANN model is a reconstructed spectrum corresponding to the sampling window. , and finally multiple Merge in the order of sliding window sampling to obtain a complete reconstructed spectrum , ANN can be a multi-layer feed-forward artificial neural network.

[0022] S4: The trained ANN model can be used as a spectral calculation and reconstruction algorithm.

[0023] First, a certain amount of known spectral data S and the corresponding ; It is cut into multiple segmented spectral data S according to the window width and sampling position of the sliding window wi , as the output of ANN; With the corresponding slave vector The sliding sampling As input to ANN; The error back propagation algorithm is used to train the ANN model so that the ANN model can be established and the segmented input spectrum S wi Functional relationship between .

[0024] When training the ANN model, the model needs to be trained based on a known data set. First, collect a certain amount of known spectral data S and the corresponding Then, the spectral data S is cut into multiple segmented spectral data S according to the window width and sampling position of the sliding window. wi , as the output of ANN.

[0025] With the corresponding slave vector The sliding sampling As the input of ANN. Finally, the error back propagation algorithm is used to train the ANN model so that the ANN model is established. and the segmented input spectrum S wi Functional relationship between The trained ANN model can be used as a spectral calculation and reconstruction algorithm.

[0026] Through such a design, with the help of sliding window sampling, the number of input nodes and output nodes of the ANN model is reduced from N to w, which greatly reduces the number of nodes in the ANN network, streamlines the scale of the model, facilitates model training, and improves the model convergence ability.

[0027] The embodiments of the present invention disclose preferred embodiments, but are not limited thereto. A person skilled in the art can easily understand the spirit of the present invention based on the above embodiments and make different extensions and changes. However, as long as they do not deviate from the spirit of the present invention, they are all within the protection scope of the present invention.

Claims

1. A spectrum calculation and reconstruction method, characterized in that: include: Dimensionality upgrade module, sliding window module and ANN module; S1: First use the pseudo-inverse matrix of R The sampled intensity vector To upgrade the dimension, Up-dimensional conversion to ; S2: Using a sliding window module, with a fixed window length w and sliding step size p Sliding sampling is performed; the result of each sampling is , where i represents the i-th window; S3: obtained by each sampling window As input, an artificial neural network model is constructed; As the input of the ANN model, the segmented spectral data S wi As the output of the ANN model, the training model is fitted and the segmented spectral data S wi The nonlinear relationship between S4: The trained ANN model can be used as a spectral calculation and reconstruction algorithm.

2. The spectral calculation and reconstruction method according to claim 1, characterized in that: The output of the ANN model is a reconstructed spectrum corresponding to the sampling window. , multiple Merge in the order of sliding window sampling to obtain a complete reconstructed spectrum .

3. The spectral calculation and reconstruction method according to claim 1, characterized in that: The ANN model is a multi-layer feedforward artificial neural network.

4. The spectrum calculation and reconstruction method according to claim 1, characterized in that: The segmented spectral data S wi , is a segment of spectral data with a length of w intercepted from the original spectral data S according to the window width and sampling position of the sliding window sampling.

5. The spectrum calculation and reconstruction method according to claim 1, characterized in that: The pseudo-inverse matrix of R It can be calculated by singular value decomposition method; The dimension-raising operation is to perform the intensity vector of length M Left multiply matrix , and get a vector of length N .

6. The spectrum calculation and reconstruction method according to claim 1, characterized in that: When training the ANN model, the model needs to be trained based on a known data set first.

7. The spectrum calculation and reconstruction method according to claim 6, characterized in that: Collect a certain amount of known spectral data S and the corresponding ; The original spectral data S is cut into multiple segmented spectral data S according to the window width and sampling position of the sliding window wi , as the output of ANN; With the corresponding slave vector The sliding sampling As input to ANN; The error back propagation algorithm is used to train the ANN model so that the ANN model can be established and the segmented input spectrum S wi The functional relationship between them.