Near infrared spectrum analysis method and system based on robust time-varying parameters

By adopting a robust time-varying parameter method in near-infrared spectral analysis, a multivariate linear time-varying parameter model is constructed and Bayesian robust parameter optimization is solved, and the problem of the existing technology being difficult to accurately perceive the time-varying changes in the production environment is improved. The prediction accuracy and application range of the model.

CN119438124APending Publication Date: 2025-02-14EAST CHINA UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411478133.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-22
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

The existing near-infrared spectral data analysis methods based on statistical learning and deep learning are difficult to perceive time-varying changes in complex production environments in real time and accurately, and cannot meet the real-time and accuracy requirements of actual production optimization and regulation.

Method used

Using near-infrared spectral analysis method based on robust time-varying parameters, a multivariate linear time-varying parameter model is constructed by collecting and preprocessing sample data, and using Bayesian robust parameter optimization, a robust parameter estimation of the time-varying parameter model is established to improve the Accuracy and robustness of predictive analyses.

Benefits of technology

The prediction accuracy of the near-infrared spectral analysis model in the actual detection and analysis process is improved, and the application range of near-infrared spectral analysis is expanded, so as to better adapt to time-varying changes in complex production environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119438124A_ABST
    Figure CN119438124A_ABST
Patent Text Reader

Abstract

The invention discloses a near infrared spectrum analysis method and system based on robust time-varying parameters, and the method comprises the steps: firstly collecting a sample, and obtaining the near infrared spectrum data of the sample and the corresponding physical and chemical attribute data; then preprocessing the collected near infrared spectrum data and the corresponding materialization attribute data, and constructing a sample spectrum sample library; then, constructing a multivariate linear time-varying parameter model by taking the near infrared spectrum data in the sample spectrum sample library as input and taking the corresponding materialization attribute data as output; and then solving the constructed multivariate linear time-varying parameter model to obtain time-varying regression parameters. And finally, according to the obtained time-varying regression parameters, constructing a time-varying parameter model at the current moment, and by taking the time-varying parameter model at the current moment as a prediction model, carrying out prediction based on the near infrared spectrum data of the actual production sample, and obtaining materialization attribute data corresponding to the actual production sample.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of spectral data analysis, and in particular to a near-infrared spectral analysis method and system based on robust time-varying parameters. Background Art

[0002] Near-infrared spectroscopy can effectively load the content and structural information of organic substances through molecular resonance. It has the characteristics of being fast, accurate, and non-destructive. Currently, analysis technology based on near-infrared spectroscopy has been widely used in the fields of petrochemicals, medicine, and food. However, the relationship between near-infrared spectral data and the chemical or physical properties of samples is usually not direct. The application of near-infrared analysis technology usually requires the selection of appropriate data analysis methods according to the purpose of analysis to establish a potential relationship model between spectral data and attribute data.

[0003] Most of the existing data-driven methods based on statistical learning and deep learning are aimed at establishing static prediction models. However, in complex measurement environments, factors such as changes in raw material properties, equipment aging, fluctuations in industrial parameters and environmental conditions cause the actual production process to be time-varying. Therefore, static models with fixed parameters cannot accurately perceive the underlying information of the production process in real time, that is, they cannot meet the real-time and accuracy requirements of actual production optimization and control. Summary of the invention

[0004] A brief summary of one or more aspects is given below to provide a basic understanding of these aspects. This summary is not an exhaustive overview of all conceived aspects, and is neither intended to identify the key or critical elements of all aspects nor to define the scope of any or all aspects. Its only purpose is to give some concepts of one or more aspects in a simplified form as a prelude to a more detailed description that will be given later.

[0005] The purpose of the present invention is to solve the above-mentioned problems and provide a near-infrared spectroscopy time-varying parameter modeling method, which can be widely used in petrochemical, pharmaceutical, agriculture, forestry, food and other industries. Combining the advantages of Bayesian robust parameter optimization, a robust parameter estimation of the time-varying parameter model is established to further improve the accuracy and robustness of time-varying parameter prediction analysis and increase the application scope of near-infrared spectroscopy analysis.

[0006] The technical solution of the present invention is:

[0007] The present invention provides a near-infrared spectroscopy analysis method based on robust time-varying parameters, comprising the following steps:

[0008] Step S1: Collect samples and obtain near-infrared spectrum data and corresponding physicochemical property data of the samples;

[0009] Step S2: preprocessing the collected near-infrared spectrum data and the corresponding physical and chemical property data to construct a sample spectrum sample library;

[0010] Step S3: constructing a multivariate linear time-varying parameter model with the near-infrared spectrum data in the sample spectrum sample library as input and the corresponding physicochemical property data as output;

[0011] Step S4: solving the parameters of the constructed multivariate linear time-varying parameter model to obtain time-varying regression parameters;

[0012] Step S5: construct a time-varying parameter model at the current moment according to the acquired time-varying regression parameters, and use the time-varying parameter model at the current moment as a prediction model to make predictions based on the near-infrared spectrum data of the actual production samples to obtain the physicochemical property data corresponding to the actual production samples.

[0013] According to an embodiment of the near-infrared spectral analysis method based on robust time-varying parameters of the present invention, the near-infrared spectral data includes the wavelength of the near-infrared spectrum and the corresponding absorbance value; wherein, when the near-infrared spectral analysis method based on robust time-varying parameters preprocesses the collected near-infrared spectral data and the corresponding physicochemical property data, the collected near-infrared spectral data is subjected to abnormal sample removal, baseline correction and scattering correction, and the physicochemical property data is subjected to outlier analysis, thereby obtaining a cleaned spectral sample library.

[0014] According to an embodiment of the near-infrared spectral analysis method based on robust time-varying parameters of the present invention, the multivariate linear time-varying parameter model includes a time-varying process transfer equation and a data attribute mapping equation; wherein, when constructing the multivariate linear time-varying parameter model, the near-infrared spectral analysis method based on robust time-varying parameters first establishes a time-varying process transfer equation for characterizing the time-varying characteristics of the time-varying regression parameters of the multivariate linear time-varying parameter model, and then constructs an attribute mapping equation for characterizing the association between the near-infrared spectral data and the corresponding physicochemical attribute data using the near-infrared spectral data in the spectral sample library as input and the corresponding physicochemical attribute data as output, thereby obtaining a multivariate linear time-varying parameter model based on the sample spectral sample library.

[0015] According to an embodiment of the near-infrared spectroscopy analysis method based on robust time-varying parameters of the present invention, the near-infrared spectroscopy analysis method based on robust time-varying parameters describes the multivariate linear time-varying parameter model by the following formula:

[0016] β t =Aβ t-1 +w t

[0017]

[0018] β1=μ0+μ

[0019] Among them, β t represents the regression coefficient of the linear model at time t,

[0020] β1 represents the regression coefficient of the linear model at the initial time t=1,

[0021] A represents a transfer matrix,

[0022] w t represents the measurement noise at time t that follows a normal distribution with a mean of 0 and a variance of Γ.

[0023] y t Represents the physical and chemical property data corresponding to the near-infrared spectrum at time t,

[0024] represents the near-infrared spectrum data at time t,

[0025] T represents the transpose operation,

[0026] v t It means that the measurement error at time t follows a normal distribution with a mean of 0 and a variance of Λ.

[0027] μ0 represents the initial value of the regression coefficient,

[0028] μ represents the regression coefficient that follows a normal distribution with a mean of 0 and a variance of ∑0.

[0029] According to an embodiment of the near-infrared spectral analysis method based on robust time-varying parameters of the present invention, in step S4, when the near-infrared spectral analysis method based on robust time-varying parameters solves the time-varying regression parameters of the multivariate linear time-varying parameter model, firstly, based on the conditional independent distribution property between the regression parameters and the sum-product rule of Bayesian parameter inference, the model parameters of the multivariate linear time-varying parameter model are robustly estimated through the Bayesian formula, and then the robustly estimated model parameters are iteratively updated based on the Bayesian framework until the maximum number of iterations is reached and the calculation is stopped, thereby obtaining the time-varying regression parameters of the multivariate linear time-varying parameter model.

[0030] According to an embodiment of the near-infrared spectral analysis method based on robust time-varying parameters of the present invention, the model parameters of the multivariate linear time-varying parameter model include multivariate linear regression parameters, measurement errors and prediction errors. When solving the time-varying regression parameters of the multivariate linear time-varying parameter model of the near-infrared spectral analysis method based on robust time-varying parameters, firstly, based on the conditional independent distribution property between the regression parameters and the sum-product rule of Bayesian parameter inference, the calculation formulas of the multivariate linear regression parameters, measurement errors and prediction errors are determined by the Bayesian formula, and then based on the determined calculation formulas of the multivariate linear regression parameters, measurement errors and prediction errors, the model parameters of the multivariate linear time-varying parameter model are iteratively updated until the maximum number of iterations is reached and the calculation is stopped, thereby obtaining the time-varying regression parameters of the multivariate linear time-varying parameter model.

[0031] According to an embodiment of the near-infrared spectroscopy analysis method based on robust time-varying parameters of the present invention, the near-infrared spectroscopy analysis method based on robust time-varying parameters robustly estimates the model parameters of the multivariate linear time-varying parameter model through the following formula:

[0032]

[0033] ∝p(y1,...,y t-1 , β t-1 )p(y1,...,y t-1 , β t )

[0034] =p(y t |β t )∫p(β t |β t-1 )p(β t-1 |y1,...,y t-1 )dβ t-1

[0035] Where p represents the probability distribution,

[0036] β t represents the regression coefficient of the linear model at time t,

[0037] y t Represents the physical and chemical property data corresponding to the near-infrared spectrum at time t,

[0038] d indicates differential calculation.

[0039] According to an embodiment of the near-infrared spectroscopy analysis method based on robust time-varying parameters of the present invention, the near-infrared spectroscopy analysis method based on robust time-varying parameters iteratively updates the model parameters of the multivariate linear time-varying parameter model through the following formula:

[0040]

[0041] Where p represents the probability distribution,

[0042] β t represents the regression coefficient of the linear model at time t,

[0043] y t Represents the physical and chemical property data corresponding to the near-infrared spectrum at time t,

[0044] N represents normal distribution,

[0045] μ t represents the mean value of the model parameters at time t,

[0046] ∑ t represents the variance of the model parameters at time t.

[0047] According to an embodiment of the near-infrared spectroscopy analysis method based on robust time-varying parameters of the present invention, the near-infrared spectroscopy analysis method based on robust time-varying parameters updates the mean μ of the model parameters by the following method: t and variance∑ t :

[0048]

[0049]

[0050] μ t * =Aμ t-1

[0051]

[0052] ∑ t * =A∑ t-1 A+Γ

[0053] Among them, μ t * represents the posterior mean of the model regression coefficient at time t,

[0054] γ t represents an intermediate variable of the model at time t,

[0055] y t Represents the physical and chemical property data corresponding to the near-infrared spectrum at time t,

[0056] represents the near-infrared spectrum data at time t,

[0057] T represents the transpose operation,

[0058] x t represents the near infrared spectrum data at time t,

[0059] ∑ t * represents the posterior variance of the model regression coefficient at time t,

[0060] μ t-1 represents the mean of the model regression coefficient at time t-1,

[0061] Λ represents the variance of the model measurement error,

[0062] ∑ t-1 represents the variance of the model regression coefficient at time t-1,

[0063] A represents a transfer matrix,

[0064] Γ represents the measurement noise variance.

[0065] According to an embodiment of the near-infrared spectroscopy analysis method based on robust time-varying parameters of the present invention, the near-infrared spectroscopy analysis method based on robust time-varying parameters uses the EM algorithm to maximize the likelihood function to determine the model parameters θ={A, Γ, Λ, μ0, ∑0} of the multivariate linear time-varying parameter model, and the formula is as follows:

[0066]

[0067] Among them, Q(θ,θ old ) represents the Q function in the EM algorithm,

[0068] It means to calculate the expectation of the regression coefficient β.

[0069] p represents the probability distribution,

[0070] β represents the model regression coefficient,

[0071] θ represents the set of model parameters.

[0072] The present invention also provides a near-infrared spectroscopy analysis system based on robust time-varying parameters, characterized in that it includes a data acquisition module, a data processing module, a linear model construction module, a model parameter solving module and an attribute prediction module; wherein,

[0073] The data acquisition module is used to collect samples and obtain near-infrared spectrum data and corresponding physical and chemical property data of the samples;

[0074] The data processing module is used to pre-process the collected near-infrared spectrum data and the corresponding physical and chemical property data to build a sample spectrum sample library;

[0075] The linear model building module is used to build a multivariate linear time-varying parameter model with the near infrared spectrum data in the sample spectrum sample library as input and the corresponding physical and chemical property data as output;

[0076] The model parameter construction module is used to solve the parameters of the constructed multivariate linear time-varying parameter model and obtain the time-varying regression parameters;

[0077] The attribute prediction module is used to construct a time-varying parameter model at the current moment according to the acquired time-varying regression parameters, and use the time-varying parameter model at the current moment as a prediction model and make predictions based on the near-infrared spectral data of the actual production samples to obtain the physicochemical attribute data corresponding to the actual production samples.

[0078] The present invention also provides a computer readable medium storing a computer program code, wherein the computer program code implements the method as described above when executed by a processor.

[0079] The present invention also provides a near-infrared spectrum analysis device based on robust time-varying parameters, comprising:

[0080] a memory for storing instructions executable by a processor; and

[0081] A processor is used to execute the instructions to implement the method as described above.

[0082] Compared with the prior art, the present invention has the following beneficial effects: the present invention aims at the process time-varying problem caused by factors such as raw material characteristic changes, equipment aging, environmental conditions and industrial parameter changes, takes the near-infrared spectrum data in the sample spectrum sample library as input and the corresponding physicochemical property data as output to construct a multivariate linear time-varying parameter model as a near-infrared spectrum robust time-varying parameter model for prediction and analysis of the actual production process attributes, and proposes a robust parameter estimation method, by solving the parameters of the multivariate linear time-varying parameter model, obtaining the time-varying regression parameters of the model, and then using the obtained time-varying regression parameters to construct the time-varying parameter model at the current moment, and finally using the time-varying parameter model at the current moment as a prediction model and the near-infrared spectrum data of the actual production sample as input for prediction, thereby obtaining the physicochemical property data corresponding to the actual production sample. Compared with the prior art, the present invention effectively improves the prediction accuracy of the near-infrared spectrum analysis model in the actual detection and analysis process, which is conducive to improving the market competitiveness of enterprises. BRIEF DESCRIPTION OF THE DRAWINGS

[0083] The above features and advantages of the present invention can be better understood after reading the detailed description of the embodiments of the present disclosure in conjunction with the following drawings. In the drawings, the components are not necessarily drawn to scale, and components with similar related properties or features may have the same or similar reference numerals.

[0084] Figure 1 It is a flowchart showing the steps of an embodiment of a near-infrared spectroscopy analysis method based on robust time-varying parameters of the present invention.

[0085] Figure 2 1 is a spectrum diagram showing an embodiment of measured near-infrared spectrum data of the present invention.

[0086] Figure 3 It is a schematic diagram showing the relationship between the measured average spectrum and the regression coefficient of an embodiment of the multivariate linear time-varying parameter model of the present invention.

[0087] Figure 4 It is a schematic diagram showing the relationship between the regression coefficient at different wavelengths and the change of attribute data in one embodiment of the present invention.

[0088] Figure 5 It is a result schematic diagram showing an embodiment of the prediction result of physicochemical property data of the present invention.

[0089] Figure 6 It is a schematic diagram showing the result of an embodiment of the multivariate linear time-varying parameter model prediction error of the present invention.

[0090] Figure 7 1 is a system architecture diagram showing an embodiment of a near-infrared spectroscopy analysis system based on robust time-varying parameters of the present invention. DETAILED DESCRIPTION

[0091] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for the description of the embodiments. Obviously, the drawings described below are only some examples or embodiments of the present application. For ordinary technicians in this field, the present application can also be applied to other similar scenarios based on these drawings without creative work. Unless it is obvious from the language environment or otherwise explained, the same reference numerals in the figures represent the same structure or operation.

[0092] As shown in this application and claims, unless the context clearly indicates an exception, the words "a", "an", "an" and / or "the" do not refer to the singular and may also include the plural. Generally speaking, the terms "include" and "comprise" only indicate the inclusion of the steps and elements that have been clearly identified, and these steps and elements do not constitute an exclusive list. The method or device may also include other steps or elements.

[0093] Unless otherwise specifically stated, the relative arrangement, numerical expressions and numerical values ​​of the parts and steps set forth in these embodiments do not limit the scope of the present application. At the same time, it should be understood that, for ease of description, the sizes of the various parts shown in the accompanying drawings are not drawn according to the actual proportional relationship. The technology, method and equipment known to those of ordinary skill in the relevant field may not be discussed in detail, but in appropriate cases, the technology, method and equipment should be considered as a part of the authorization specification. In all examples shown and discussed here, any specific value should be interpreted as being merely exemplary, rather than as a limitation. Therefore, other examples of exemplary embodiments may have different values. It should be noted that similar reference numerals and letters represent similar items in the following drawings, so that once a certain item is defined in an accompanying drawing, it does not need to be further discussed in subsequent drawings.

[0094] When describing the embodiments of the present invention in detail, for the sake of convenience, the cross-sectional views showing the device structure will not be partially enlarged according to the general scale, and the schematic views are only examples, which should not limit the scope of protection of the present invention. In addition, in actual production, the three-dimensional dimensions of length, width and depth should be included.

[0095] In the description of the present application, it should be understood that the directions or positional relationships indicated by directional words such as "front, back, up, down, left, right", "lateral, vertical, perpendicular, horizontal" and "top, bottom" are usually based on the directions or positional relationships shown in the drawings, and are only for the convenience of describing the present application and simplifying the description. Unless otherwise specified, these directional words do not indicate or imply that the device or element referred to must have a specific direction or be constructed and operated in a specific direction, and therefore cannot be understood as limiting the scope of protection of the present application; the directional words "inside and outside" refer to the inside and outside relative to the contours of each component itself.

[0096] An embodiment of a near infrared spectroscopy analysis method based on robust time-varying parameters is disclosed herein. Figure 1 FIG. 1 is a flowchart showing an embodiment of a near infrared spectroscopy analysis method based on robust time-varying parameters of the present invention. Figure 1 ,The following is a detailed description of each step of the near infrared spectroscopy analysis method based on ,robust time varying parameters.

[0097] Step S1: Collect samples and obtain near-infrared spectrum data of the samples and corresponding physicochemical property data.

[0098] Step S2: pre-process the collected near-infrared spectrum data and the corresponding physicochemical property data to construct a sample spectrum sample library.

[0099] In this embodiment, the near infrared spectrum data includes the wavelength of the near infrared spectrum and the corresponding absorbance value. When collecting the physical and chemical property data corresponding to the near infrared spectrum data, it is necessary to measure under the current national standards.

[0100] Specifically, in this embodiment, the collected analysis samples need to fully reflect the representativeness, integrity and diversity of the analysis process, that is, to cover the samples of the production process as much as possible. When collecting data, all samples are first placed in a certain temperature laboratory. After the measured ambient temperature and the analysis sample temperature are stable, the near-infrared spectrum data of the samples are measured, and then the physicochemical indicators to be analyzed are determined according to the analysis requirements, and the physicochemical data and corresponding physicochemical property data of all samples are measured according to the relevant test standards. Among them, the physicochemical property data includes one or more of the relevant national requirements or the actual needs of the actual production process of the enterprise. When pre-processing the collected near-infrared spectrum data and the corresponding physicochemical property data, the collected near-infrared spectrum data is subjected to abnormal sample removal, baseline correction and scattering correction, and the physicochemical property data is subjected to outlier analysis, so as to obtain a cleaned sample spectrum sample library.

[0101] Step S3: construct a multivariate linear time-varying parameter model using the near-infrared spectrum data in the sample spectrum sample library as input and the corresponding physicochemical property data as output.

[0102] In this embodiment, after obtaining the cleaned sample spectrum sample library through the above steps, a multivariate linear time-varying parameter model is constructed with the near-infrared spectrum data in the sample spectrum sample library as input and the corresponding physicochemical property data as output. Among them, the multivariate linear time-varying parameter model includes a time-varying process transfer equation and a data attribute mapping equation. When constructing the multivariate linear time-varying parameter model, first establish a time-varying process transfer equation for characterizing the time-varying characteristics of the time-varying regression parameters of the multivariate linear time-varying parameter model, and then construct a data attribute mapping equation for characterizing the correlation between the near-infrared spectrum data and the corresponding physicochemical property data with the near-infrared spectrum data in the spectrum sample library as input and the corresponding physicochemical property data as output, thereby obtaining a multivariate linear time-varying parameter model based on the sample spectrum sample library, and realizing the time-varying parameterized representation of the prediction model by constructing the time-varying process transfer equation of the model parameters.

[0103] Specifically, in this embodiment, the multivariate linear time-varying parameter model and its time-varying parameters are described as follows:

[0104] β t =Aβ t-1 +w t

[0105]

[0106] β1=μ0+μ

[0107] Among them, β t represents the regression coefficient of the linear model at time t, β1 represents the regression coefficient of the linear model at time t = 1, A represents a transfer matrix, w t represents the measurement noise at time t that follows a normal distribution with a mean of 0 and a variance of Γ, y t Represents the physical and chemical property data corresponding to the near-infrared spectrum at time t, represents the near-infrared spectral data at time t, T represents the transposition operation, and v t represents the measurement error at time t that obeys the normal distribution with mean 0 and variance Λ, μ0 represents the initial value of the regression coefficient, and μ represents the regression coefficient that obeys the normal distribution with mean 0 and variance ∑0.

[0108] Step S4: Solve the time-varying regression parameters of the constructed multivariate linear time-varying parameter model to obtain the time-varying regression parameters.

[0109] In this embodiment, when solving the robust time-varying parameters of the multivariate linear time-varying parameter model, firstly, based on the conditional independent distribution property between the regression parameters and the sum-product rule of Bayesian parameter inference, the model parameters of the multivariate linear time-varying parameter model are robustly estimated through the Bayesian formula, and then the robustly estimated model parameters are iteratively updated based on the Bayesian framework until the maximum number of iterations is reached and the calculation is stopped, thereby obtaining the time-varying regression parameters of the multivariate linear time-varying parameter model.

[0110] Among them, the model parameters of the multivariate linear time-varying parameter model include multivariate linear regression parameters, measurement errors and prediction errors. When solving the parameters of the multivariate linear time-varying parameter model, we must first determine the calculation formulas of the multivariate linear regression parameters, measurement errors and prediction errors through the Bayesian formula based on the conditional independent distribution properties between the regression parameters and the sum-product rule of Bayesian parameter inference, and then iterate and update the model parameters of the multivariate linear time-varying parameter model based on the determined calculation formulas of the multivariate linear regression parameters, measurement errors and prediction errors until the maximum number of iterations is reached and the calculation is stopped, thereby obtaining the time-varying regression parameters of the multivariate linear time-varying parameter model.

[0111] Specifically, in this embodiment, the model parameters of the multivariate linear time-varying parameter model are robustly estimated as follows:

[0112]

[0113] ∝p(y1,...,y t-1 , β t-1 )p(y1,...,y t-1 , β t )

[0114] =p(yt |β t )∫p(β t |β t-1 )p(β t-1 |y1,...,y t-1 )dβ t-1

[0115] Among them, p represents the probability distribution, β t represents the regression coefficient of the linear model at time t, y t represents the physical and chemical property data corresponding to the near-infrared spectrum at time t, and d represents the differential calculation. For the model parameters of the multivariate linear time-varying parameter model, the following formula is used for iterative update:

[0116]

[0117] Among them, p represents the probability distribution, β t Represents the regression coefficient of the linear model at time t, y t represents the physical and chemical property data corresponding to the near-infrared spectrum at time t, N represents normal distribution, μ t represents the mean value of the model parameters at time t, ∑ t represents the variance of the model parameters at time t. For the mean μ of the model parameters t and variance∑ t , then the update formula is as follows:

[0118]

[0119]

[0120] μ t * =Aμ t-1

[0121]

[0122] ∑ t * =A∑ t-1 A+Γ

[0123] Among them, μ t * represents the posterior mean of the model regression coefficient at time t, γ t represents an intermediate variable of the model at time t, y t Represents the physical and chemical property data corresponding to the near-infrared spectrum at time t, represents the near-infrared spectral data at time t, T represents the transposition operation, x t represents the near infrared spectrum data at time t, ∑ t *Represents the posterior variance of the model regression coefficient at time t, μ t-1 represents the mean of the model regression coefficient at time t-1, Λ represents the variance of the model measurement error, ∑ t-1 represents the variance of the model regression coefficient at time t-1, A represents a transfer matrix, and Γ represents the measurement noise variance.

[0124] For the model parameters θ = {A, Γ, Λ, μ0, ∑0}, the EM algorithm can be used to maximize the likelihood function, and the formula is as follows:

[0125]

[0126] Among them, Q(θ,θ old ) represents the Q function in the EM algorithm, Indicates the expected calculation of the regression coefficient β, p represents the probability distribution, β represents a regression coefficient, and θ represents the model parameter set. Next, the parameters of the multivariate linear regression model are robustly solved, and the specific calculation is as follows:

[0127]

[0128]

[0129]

[0130]

[0131] Among them, calculation represents the mean of the regression coefficient β, represents the variance of the regression coefficient β, A^ represents the process transfer matrix of the time-varying parameter model, represents the variance of the measurement noise. <·> represents the expected calculation, T represents the transpose, T represents the sample time length, (·) -1 represents the inverse operation, β t represents the regression coefficient at time t.

[0132] Step S5: construct a time-varying parameter model at the current moment according to the acquired time-varying regression parameters, and use the time-varying parameter model at the current moment as a prediction model to make predictions based on the near-infrared spectrum data of the actual production samples to obtain the physicochemical property data corresponding to the actual production samples.

[0133] In this embodiment, after the time-varying regression parameters are obtained through the above steps, a time-varying parameter model at the current moment is constructed according to the obtained time-varying regression parameters, and the time-varying parameter model at the current moment is used as a prediction model to predict the spectrum collected in the actual production process based on the actual production sample as input, thereby obtaining the physicochemical property data corresponding to the actual production sample. The following is an example of the prediction of the side line yield in the crude oil refining process to further explain this embodiment in detail.

[0134] In this embodiment, the sideline yield of the crude oil refining process is predicted by the following steps:

[0135] Step 1: Based on Figure 2 The near-infrared spectrum data of the atmospheric and vacuum device sample measured by online near-infrared spectroscopy shown in the figure are used to obtain the yield of a certain component on the atmospheric pressure side as the corresponding physicochemical property data.

[0136] Step 2: Preprocess the collected near-infrared spectral data and physicochemical property data, and establish a corresponding sample spectral sample library database.

[0137] Step 4: Take the near-infrared spectrum data in the sample spectrum library as input and the corresponding physical and chemical property data as output multivariate linear time-varying parameter model. The regression coefficient and average spectrum of the multivariate linear time-varying parameter model are as follows: Figure 3 Finally, the robust parameter estimation of the time-varying parameter model is performed.

[0138] Step 4: Solve the parameters of the time-varying model. In this example, the model parameters θ = {A, Γ, Λ, μ0, Σ0} are initialized to 0.01, and the time-varying update of the characteristic peak corresponding to the spectrum is as follows: Figure 4 As shown.

[0139] Step 5: Based on the time-varying parameter model established in step 4, key attribute prediction analysis is realized. The specific results are as follows: Figure 5 As shown, the relevant prediction error is Figure 6 As shown. Figure 6 It can be seen that the measurement error mean of the method disclosed in the present invention is close to 0 and has a small amplitude, which can accurately predict the side line yield in the atmospheric and vacuum distillation device in real time and realize the accurate prediction and analysis of the side line yield.

[0140] This specification also discloses a near infrared spectroscopy analysis system based on robust time-varying parameters, Figure 7 FIG. 1 is a system architecture diagram showing an embodiment of a near infrared spectroscopy analysis system based on robust time-varying parameters of the present invention. Figure 7As shown, in this embodiment, the near-infrared spectral analysis system based on robust time-varying parameters includes a data acquisition module, a data processing module, a linear model construction module, a model parameter solving module and an attribute prediction module. Among them, the data acquisition module is used to collect samples and obtain the near-infrared spectral data and corresponding physicochemical property data of the samples. The data processing module is used to pre-process the collected near-infrared spectral data and the corresponding physicochemical property data to build a sample spectrum sample library. The linear model construction module is used to construct a multivariate linear time-varying parameter model with the near-infrared spectral data in the sample spectrum sample library as input and the corresponding physicochemical property data as output. The model parameter construction module is used to solve the parameters of the constructed multivariate linear time-varying parameter model to obtain time-varying regression parameters. The attribute prediction module is used to construct the time-varying parameter model at the current moment according to the acquired time-varying regression parameters, and use the time-varying parameter model at the current moment as a prediction model, based on the near-infrared spectral data of the actual production sample for prediction, and obtain the physicochemical property data corresponding to the actual production sample.

[0141] The present specification also provides a computer-readable medium storing a computer program code, which, when executed by a processor, implements the near-infrared spectroscopy analysis method based on robust time-varying parameters as described above.

[0142] This specification also provides a near-infrared spectroscopy analysis device based on robust time-varying parameters, including an instruction memory for storing instructions executable by a processor, and a processor for executing instructions in the instruction memory to implement the near-infrared spectroscopy analysis method based on robust time-varying parameters as described above.

[0143] The previous description of the disclosure is provided to enable any person skilled in the art to make or use the disclosure. Various modifications to the disclosure will be apparent to those skilled in the art, and the general principles defined herein may be applied to other variations without departing from the spirit or scope of the disclosure. Thus, the disclosure is not intended to be limited to the examples and designs described herein, but should be granted the widest scope consistent with the principles and novel features disclosed herein.

[0144] Those skilled in the art will further appreciate that the various illustrative logic blocks, modules, circuits, and algorithm steps described in conjunction with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or a combination of the two. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps are generally described above in terms of their functionality. Whether such functionality is implemented as hardware or software depends on the specific application and the design constraints imposed on the overall system. The technician may implement the described functionality in different ways for each specific application, but such implementation decisions should not be interpreted as resulting in a departure from the scope of the present invention.

[0145] The various illustrative logic blocks, modules, and circuits described in conjunction with the embodiments disclosed herein may be implemented or performed with a general purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein. A general purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. The processor may also be implemented as a combination of computing devices, such as a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in cooperation with a DSP core, or any other such configuration.

[0146] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software module may reside in a RAM memory, a flash memory, a ROM memory, an EPROM memory, an EEPROM memory, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to a processor so that the processor can read and write information from / to the storage medium. In an alternative, a storage medium may be integrated into a processor. The processor and the storage medium may reside in an ASIC. The ASIC may reside in a user terminal. In an alternative, the processor and the storage medium may reside in a user terminal as discrete components.

[0147] In one or more exemplary embodiments, the functions described may be implemented in hardware, software, firmware, or any combination thereof. If implemented as a computer program product in software, each function may be stored on or transmitted by a computer-readable medium as one or more instructions or codes. Computer-readable media include both computer storage media and communication media, including any medium that facilitates the transfer of a computer program from one place to another. Storage media may be any available medium that can be accessed by a computer. As an example and not limitation, such a computer-readable medium may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, disk storage or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of an instruction or data structure and can be accessed by a computer. Any connection is also properly referred to as a computer-readable medium. For example, if the software is transmitted from a website, a server, or other remote source using a coaxial cable, a fiber optic cable, a twisted pair, a digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwaves, the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwaves are included in the definition of the medium. Disk and disc as used herein include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk and Blu-ray disc, wherein disk often reproduces data magnetically, while disc reproduces data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.

Claims

1. A near infrared spectroscopy analysis method based on robust time-varying parameters, characterized in that: The following steps are involved: Step S1: Collect samples and obtain near-infrared spectrum data and corresponding physicochemical property data of the samples; Step S2: preprocessing the collected near-infrared spectrum data and the corresponding physical and chemical property data to construct a sample spectrum sample library; Step S3: constructing a multivariate linear time-varying parameter model with the near-infrared spectrum data in the sample spectrum sample library as input and the corresponding physicochemical property data as output; Step S4: solving the parameters of the constructed multivariate linear time-varying parameter model to obtain time-varying regression parameters; Step S5: construct a time-varying parameter model at the current moment according to the acquired time-varying regression parameters, and use the time-varying parameter model at the current moment as a prediction model to make predictions based on the near-infrared spectrum data of the actual production samples to obtain the physicochemical property data corresponding to the actual production samples.

2. The near-infrared spectroscopy analysis method based on robust time-varying parameters according to claim 1, characterized in that: The near-infrared spectral data includes the wavelength of the near-infrared spectrum and the corresponding absorbance value; wherein, when the near-infrared spectral analysis method based on robust time-varying parameters preprocesses the collected near-infrared spectral data and the corresponding physicochemical property data, the collected near-infrared spectral data is subjected to abnormal sample removal, baseline correction and scattering correction, and the physicochemical property data is subjected to outlier analysis, thereby obtaining a cleaned spectral sample library.

3. The near-infrared spectroscopy analysis method based on robust time-varying parameters according to claim 1 is characterized in that: The multivariate linear time-varying parameter model includes a time-varying process transfer equation and a data attribute mapping equation; wherein, when constructing a multivariate linear time-varying parameter model, the near-infrared spectral analysis method based on robust time-varying parameters first establishes a time-varying process transfer equation for characterizing the time-varying characteristics of the time-varying regression parameters of the multivariate linear time-varying parameter model, and then constructs an attribute mapping equation for characterizing the correlation between the near-infrared spectral data and the corresponding physicochemical attribute data using the near-infrared spectral data in the spectral sample library as input and the corresponding physicochemical attribute data as output, thereby obtaining a multivariate linear time-varying parameter model based on the sample spectral sample library.

4. The near-infrared spectroscopy analysis method based on robust time-varying parameters according to claim 3 is characterized in that: The near-infrared spectroscopy analysis method based on robust time-varying parameters describes the multivariate linear time-varying parameter model by the following formula: β t =Aβ t-1 +in t β1=μ0+μ Among them, β t represents the regression coefficient of the linear model at time t, β1 represents the regression coefficient of the linear model at the initial time t=1, A represents a transfer matrix, w t represents the measurement noise at time t that follows a normal distribution with a mean of 0 and a variance of Г. y t Represents the physical and chemical property data corresponding to the near-infrared spectrum at time t, represents the near-infrared spectrum data at time t, T represents the transpose operation, v t It means that the measurement error at time t follows a normal distribution with a mean of 0 and a variance of Λ. μ0 represents the initial value of the regression coefficient, μ represents the regression coefficient that follows a normal distribution with a mean of 0 and a variance of Σ0.

5. The near-infrared spectroscopy analysis method based on robust time-varying parameters according to claim 1, characterized in that: In step S4, when the near-infrared spectroscopy analysis method based on robust time-varying parameters solves the time-varying regression parameters of the multivariate linear time-varying parameter model, first, based on the conditional independent distribution property between the regression parameters and the sum-product rule of Bayesian parameter inference, the model parameters of the multivariate linear time-varying parameter model are robustly estimated through the Bayesian formula, and then the robustly estimated model parameters are iteratively updated based on the Bayesian framework until the maximum number of iterations is reached and the calculation is stopped, thereby obtaining the time-varying regression parameters of the multivariate linear time-varying parameter model.

6. The near-infrared spectroscopy analysis method based on robust time-varying parameters according to claim 5, characterized in that: The model parameters of the multivariate linear time-varying parameter model include multivariate linear regression parameters, measurement errors and prediction errors. When solving the time-varying regression parameters of the multivariate linear time-varying parameter model in the near-infrared spectroscopy analysis method based on robust time-varying parameters, firstly, based on the conditional independent distribution property between the regression parameters and the sum-product rule of Bayesian parameter inference, the calculation formulas of the multivariate linear regression parameters, measurement errors and prediction errors are determined through the Bayesian formula, and then the model parameters of the multivariate linear time-varying parameter model are iteratively updated based on the determined calculation formulas of the multivariate linear regression parameters, measurement errors and prediction errors until the maximum number of iterations is reached and the calculation is stopped, thereby obtaining the time-varying regression parameters of the multivariate linear time-varying parameter model.

7. The near-infrared spectroscopy analysis method based on robust time-varying parameters according to claim 5, characterized in that: The near-infrared spectroscopy analysis method based on robust time-varying parameters uses the following formula to robustly estimate the model parameters of the multivariate linear time-varying parameter model: ∝p(y1,…,y t-1 ,b t-1 )p(y1,…,y t-1 ,b t )=p(y t |b t )∫p(β t |b t-1 )p(β t-1 |y1,…,y t-1 )dβ t-1 Where p represents the probability distribution, β t represents the regression coefficient of the linear model at time t, y t Represents the physical and chemical property data corresponding to the near-infrared spectrum at time t, d indicates differential calculation.

8. The near-infrared spectroscopy analysis method based on robust time-varying parameters according to claim 5, characterized in that: The near-infrared spectroscopy analysis method based on robust time-varying parameters iteratively updates the model parameters of the multivariate linear time-varying parameter model through the following formula: Where p represents the probability distribution, β t represents the regression coefficient of the linear model at time t, y t Represents the physical and chemical property data corresponding to the near-infrared spectrum at time t, N represents normal distribution, μ t represents the mean value of the model parameters at time t, Σ t represents the variance of the model parameters at time t.

9. The near-infrared spectroscopy analysis method based on robust time-varying parameters according to claim 8, characterized in that: The near-infrared spectroscopy analysis method based on robust time-varying parameters updates the mean μ of the model parameters by the following method: t and variance Σ t : μ t * =Aμ t-1 S t * =AS t-1 A+G Among them, μ t * represents the posterior mean of the model regression coefficient at time t, γ t represents an intermediate variable of the model at time t, y t Represents the physical and chemical property data corresponding to the near-infrared spectrum at time t, represents the near-infrared spectrum data at time t, T represents the transpose operation, x t represents the near infrared spectrum data at time t, Σ t * represents the posterior variance of the model regression coefficient at time t, μ t-1 represents the mean of the model regression coefficient at time t-1, Λ represents the variance of the model measurement error, Σ t-1 represents the variance of the model regression coefficient at time t-1, A represents a transfer matrix, Г represents the measurement noise variance.

10. The near-infrared spectroscopy analysis method based on robust time-varying parameters according to claim 9, characterized in that: The near-infrared spectroscopy analysis method based on robust time-varying parameters uses the EM algorithm to maximize the likelihood function to determine the model parameters θ={A, Γ, Λ, μ0, Σ0} of the multivariate linear time-varying parameter model, and the formula is as follows: Among them, Q(θ,θ old ) represents the Q function in the EM algorithm, It means to calculate the expectation of the regression coefficient β. p represents the probability distribution, β represents the model regression coefficient, θ represents the set of model parameters.

11. A near infrared spectroscopy analysis system based on robust time-varying parameters, characterized in that: It includes data acquisition module, data processing module, linear model building module, model parameter solving module and attribute prediction module; among them, The data acquisition module is used to collect samples and obtain near-infrared spectrum data and corresponding physical and chemical property data of the samples; The data processing module is used to pre-process the collected near-infrared spectrum data and the corresponding physical and chemical property data to build a sample spectrum sample library; The linear model building module is used to build a multivariate linear time-varying parameter model with the near infrared spectrum data in the sample spectrum sample library as input and the corresponding physical and chemical property data as output; The model parameter construction module is used to solve the parameters of the constructed multivariate linear time-varying parameter model and obtain the time-varying regression parameters; The attribute prediction module is used to construct a time-varying parameter model at the current moment according to the acquired time-varying regression parameters, and use the time-varying parameter model at the current moment as a prediction model and make predictions based on the near-infrared spectral data of the actual production samples to obtain the physicochemical attribute data corresponding to the actual production samples.

12. A computer readable medium storing computer program code, characterized in that: The computer program code implements the method according to any one of claims 1 to 10 when executed by a processor.

13. A near infrared spectroscopy analysis device based on robust time-varying parameters, characterized in that: include: a memory for storing instructions executable by a processor; as well as A processor, configured to execute the instructions to implement the method according to any one of claims 1 to 10.