Disclosure of Invention
Aiming at the problems in the related art, the invention provides a data-driven quality modeling method based on an industrial Internet platform, so as to overcome the technical problems in the prior related art.
For this purpose, the invention adopts the following specific technical scheme:
a data-driven quality modeling method based on an industrial internet platform, the method comprising the steps of:
s1, collecting different system data based on an industrial Internet platform, and uniformly summarizing the data;
s2, carrying out data preprocessing on the acquired data;
s3, selecting auxiliary variables according to a process principle and process characteristics, and performing dimension reduction on the auxiliary variables by adopting a principal component analysis method;
s4, constructing a key product quality prediction model based on a data driving modeling strategy;
s5, performing deviation correction and model parameter correction on the established prediction model.
Further, the data preprocessing of the collected data includes the following steps:
s201, merging and storing the acquired data to obtain sample data;
s202, abnormal data elimination and filtering processing are carried out on the sample data, and data are normalized.
Further, the calculation formula for fusing the collected data is as follows:
wherein h is1q Indicating that the business system is at t1q Data collected at the moment;
h2q indicating that the production system is at t2q Data collected at the moment;
εh1 representing the acquired data h1q Root mean square error of (a);
εt1 indicating time t1q Root mean square error of (a);
εh2 representing the acquired data h2q Root mean square error of (a);
εt2 indicating time t2q Root mean square error of (a);
hq representing the business system and the production system at tq And collecting the data fusion result at the moment.
Furthermore, the sample data is subjected to abnormal data rejection and is subjected to screening treatment by adopting a 3 sigma judgment principle, and the specific steps are as follows;
assuming that n auxiliary variables in the sample data are x, the sequence of x is x1 ,x2 ,…,xi (i=1, 2,3 … n), and the average value x and standard deviation σ thereof are calculated:
if the auxiliary variable x in the sample satisfies the following formula:
then the sample is removed as an abnormal sample, the 3 sigma judgment processing is sequentially carried out on other auxiliary variables in the sample, and the screened sample is selected into a modeling sample set;
further, the sample data is filtered to obtain a sample by the following formula
And (3) carrying out average filtering:
X(t)=(X(t-T/2)+X(t-T/2+Tc )+…+X(t))
…+X(t-T/2+Tc )+X(t+T/2)/(T/Tc )
wherein t represents a sampling time;
t represents a filtering time constant;
Tc representing the sampling period.
Further, the normalizing the data normalizes the sample data to [ y ] by the following formulamin ,ymax ]:
y=[ymin ,ymax ]*(x-xmin )/(xmax -xmin )+ymin
Wherein y ismin ,ymax Representing the upper and lower bounds of the normalized target;
xmax ,xmin representing the current variable value as upper and lower bounds.
Further, the main component analysis method comprises the following calculation steps:
1) Normalizing the original sample data and forming a normalization matrix:
let m-dimensional random vector x= (X)1 ,X2 ,…,Xn )T For n samples Xi =(Xi1 ,Xi2 ,…,Xim )T (i=1, 2,3 … m), T is the superscript of the matrix transpose, form the sample matrix, normalize the sample matrix, average the samples:
sample variance:
the normalized data are:
wherein, (i=1, 2,3 … m; k=1, 2,3 … n),
form a standardized matrix X (Xik );
2) Sample correlation coefficient matrix is calculated for standard price matrix:
wherein r isij Elements representing row i, column j of matrix R, (i, j=1, 2,3 … m);
3) Determining the main components:
solving characteristic equation |R-lambda I of sample correlation matrix Rm M eigenvectors are obtained by =0, wherein λ represents eigenvalues, I represents an identity matrix, and R is a symmetric matrix, eigenvalues are obtained by jacobian method, and the eigenvalues are obtained according toDetermining the value of p to make the information utilization rate up to above 85% to obtain p main components, for every lambdaj (j=1, 2,3 … p) solve the equation set rb=λj b Unit feature vector->b represents a feature vector set;
4) Converting the standardized index variable into a main component:
wherein U is1 Called first principal component, U2 Called second principal component, Um Called the m-th principal component;
5) And comprehensively evaluating the m main components, and carrying out weighted summation on the m main components to obtain a final evaluation value, wherein the weight is the variance contribution rate of each main component.
Furthermore, the key product quality prediction model constructed based on the data-driven modeling strategy adopts an algorithm in a machine learning algorithm library built in an industrial Internet platform, and models by combining the preprocessed data.
Further, the performing offset correction by the prediction model includes: in the running process of the model, new data are adopted to correct the model, and a deviation correction method is adopted to correct the model according to the model prediction error, wherein the calculation formula of the deviation correction method is as follows:
wherein,representing the output value of the model after correction at the current moment;
representing a predicted value output by the current time model;
k represents a correction coefficient;
y (t-1) andrepresenting the real value at the previous moment and the predicted value output by the model;
t represents a sampling time;
the correction coefficient is obtained by dividing the model error of the current period and the model error of the previous period:
wherein Y (t)i ) Representing data within a current time period;
representing an average value of the predicted values in the current period;
Y(ti -t) represents data in a previous period;
Ym (ti -t) represents the median value of the predictions in the previous period;
K=median(Ki ) Will Ki And obtaining the correction coefficient by taking the average value.
Further, the performing model parameter correction by the prediction model includes: taking deviation between the model output value and the actual value as an optimization target, and optimizing key parameters of the model by adopting a genetic algorithm based on historical data, wherein the optimization target is as follows:
the beneficial effects of the invention are as follows:
1. industrial data are acquired based on an industrial Internet platform, so that the problem of data island existing in chemical enterprises can be solved, and the data value of different systems is fully mined.
2. Based on the data-driven modeling method of the industrial Internet platform, the built-in machine learning algorithm library comprises dozens of mainstream algorithms, so that the model can be better adapted to frequent changes of working conditions.
3. The method provided by the invention can greatly reduce the requirements of factories on measuring equipment, and has important significance for improving the product quality, promoting energy conservation and consumption reduction and accelerating the digital transformation of enterprises.
4. The method provided by the invention can predict the key indexes of chemical raw materials and products in real time, avoids the problems of long time consumption, difficult detection or incapability of detection of certain indexes and the like, and saves a great amount of time and resources.
Detailed Description
For the purpose of further illustrating the various embodiments, the present invention provides the accompanying drawings, which are a part of the disclosure of the present invention, and which are mainly used to illustrate the embodiments and, together with the description, serve to explain the principles of the embodiments, and with reference to these descriptions, one skilled in the art will recognize other possible implementations and advantages of the present invention, wherein elements are not drawn to scale, and like reference numerals are generally used to designate like elements.
According to an embodiment of the invention, a data-driven quality modeling method based on an industrial Internet platform is provided.
The invention will now be further described with reference to the accompanying drawings and detailed description, as shown in fig. 1-4, a data-driven quality modeling method based on an industrial internet platform according to an embodiment of the invention, the method comprising the steps of:
s1, collecting different system data based on an industrial Internet platform, and uniformly summarizing the data;
specifically, the collected data comprise quality index data of a quality service system and real-time production data of a production system;
s2, carrying out data preprocessing on the acquired data;
s3, selecting auxiliary variables according to a process principle and process characteristics, and performing dimension reduction on the auxiliary variables by adopting a principal component analysis method;
specifically, the principal component analysis method is a dimension reduction method which is widely applied, and on the basis of retaining data information as much as possible, a variance-covariance structure of a group of variables is explained by replacing a plurality of random variables with a few mutually uncorrelated comprehensive factors and essentially a plurality of linear combinations of the group of variables. The weight of each main component is determined by the contribution rate of the main component and objectively determined by the information of the data, so that the defect that the subjective weighting method manually determines the weight is overcome;
s4, constructing a key product quality prediction model based on a data driving modeling strategy;
specifically, the data driving model is a process model based on a large amount of process data and a machine learning algorithm, and benefits from massive real-time process data and experimental analysis data brought by a chemical enterprise distributed control system and a laboratory information management system, so that the process model can be established by deep mining of the data through the machine learning algorithm. The data driving model needs fewer process mechanisms in the training stage, has the advantages of small calculated amount, high solving speed, high accuracy in the data range established by the model and the like in the using stage, achieves good effects in various process modeling tasks, and achieves wide attention of students;
s5, performing deviation correction and model parameter correction on the established prediction model.
In one embodiment, the data preprocessing of the collected data comprises the steps of:
s201, merging and storing the acquired data to obtain sample data;
s202, abnormal data elimination and filtering processing are carried out on the sample data, and data are normalized.
In one embodiment, the calculation formula for fusing the acquired data is as follows:
wherein h is1q Indicating that the business system is at t1q Data collected at the moment;
h2q indicating that the production system is at t2q Data collected at the moment;
εh1 representing the acquired data h1q Root mean square error of (a);
εt1 indicating time t1q Root mean square error of (a);
εh2 representing the acquired data h2q Root mean square error of (a);
εt2 indicating time t2q Root mean square error of (a);
hq representing the business system and the production system at tq And collecting the data fusion result at the moment.
In one embodiment, the sample data is subjected to abnormal data rejection and is subjected to screening processing by adopting a 3 sigma judgment principle, and the specific steps are as follows;
assuming that n auxiliary variables in the sample data are x, the sequence of x is x1 ,x2 ,…,xi (i=1, 2,3 … n), and the average value x and standard deviation σ thereof are calculated:
if the auxiliary variable x in the sample satisfies the following formula:
then the sample is removed as an abnormal sample, the 3 sigma judgment processing is sequentially carried out on other auxiliary variables in the sample, and the screened sample is selected into a modeling sample set;
in one embodiment, the sample data is filtered to average filter the samples by the following formula:
X(t)=(X(t-T/2)+X(t-T/2+Tc )+…+X(t))
…+X(t-T/2+Tc )+X(t+T/2)/(T/Tc )
wherein t represents a sampling time;
t represents a filtering time constant;
Tc representing the sampling period.
In one embodiment, the normalizing the data normalizes the sample data to [ y ] by the following formulamin ,ymax ]:
y=[ymin ,ymax ]*(x-xmin )/(xmax -xmin )+ymin
Wherein y ismin ,ymax Representing the upper and lower bounds of the normalized target;
xmax ,xmin representing the current variable value as upper and lower bounds.
In one embodiment, the principal component analysis is calculated as follows:
1) Normalizing the original sample data and forming a normalization matrix:
let m-dimensional random vector x= (X)1 ,X2 ,…,Xn )T For n samples Xi =(Xi1 ,Xi2 ,…,Xim )T (i=1, 2,3 … m), T is the superscript of the matrix transpose, form the sample matrix, normalize the sample matrix, average the samples:
sample variance:
the normalized data are:
wherein, (i=1, 2,3 … m; k=1, 2,3 … n),
form a standardized matrix X (Xik );
2) Sample correlation coefficient matrix is calculated for standard price matrix:
wherein r isij Elements representing row i, column j of matrix R, (i, j=1, 2,3 … m);
3) Determining the main components:
solving characteristic equation |R-lambda I of sample correlation matrix Rm M eigenvectors are obtained by =0, wherein λ represents eigenvalues, I represents an identity matrix, and R is a symmetric matrix, eigenvalues are obtained by jacobian method, and the eigenvalues are obtained according toDetermining the value of p to make the information utilization rate up to above 85% to obtain p main components, for every lambdaj (j=1, 2,3 … p) solve the equation set rb=λj b Unit feature vector->b represents a feature vector set;
4) Converting the standardized index variable into a main component:
wherein U is1 Called first principal component, U2 Called second principal component, Um Called the m-th principal component;
5) And comprehensively evaluating the m main components, and carrying out weighted summation on the m main components to obtain a final evaluation value, wherein the weight is the variance contribution rate of each main component.
In one embodiment, the modeling strategy based on data driving builds a key product quality prediction model by adopting an algorithm in a machine learning algorithm library built in an industrial internet platform, and combining the preprocessed data for modeling
Specifically, the data driving model adopts dozens of mainstream algorithms in a machine learning algorithm library, such as an artificial neural network, a least square support vector machine and the like;
the artificial neural network is a mathematical model for performing distributed parallel information processing by simulating the behavior characteristics of the biological neural network. The network relies on the complexity of the system, and achieves the purpose of information processing by adjusting the relationship of interconnection among a large number of nodes. The artificial neural network has self-learning and self-adapting capabilities, can analyze the internal relation and rules of the two through a group of input and output data which are provided in advance and correspond to each other, and finally forms a complex nonlinear system function through the rules. Each input connection of the neuron has a synaptic connection strength, represented by a connection weight, through which the signal to be generated is amplified, each input quantity corresponding to an associated weight. The processing unit quantizes the weighted inputs, and then adds the weighted values to calculate the output.
In artificial neural networks, the ability and efficiency of the network to solve problems is largely dependent on the activation function employed by the network, in addition to the network architecture. The selection of the activation function has a great influence on the convergence speed of the network, and the selection of the activation function should be different for different practical problems. The usual activation functions are in the following forms:
threshold function:
wherein p represents a dependent variable of the threshold function;
x represents a dependent variable of a threshold function;
this function is also commonly referred to as a step function. When the step function is adopted as the activation function, the output of the neuron is 1 or 0 at the moment, and the excitation or inhibition of the neuron is reflected;
linear function: y=kx+b
Wherein y represents a dependent variable of a linear function;
x represents a dependent variable of a linear function;
k represents the slope of the linear function;
b represents the intercept of the linear function;
the function can be used as an activation function of the output neuron when the output result is any value;
logarithmic sigmoid function:
wherein x represents the dependent variable of the sigmoid function;
the output of the logarithmic S-shaped function is between 0 and 1, and is often required to be selected for outputting signals in the range of 0 to 1, which is the most widely used activation function in neurons;
hyperbolic tangent sigmoid function:
wherein x represents a dependent variable of a hyperbolic tangent sigmoid function;
the hyperbolic tangent sigmoid function is similar to a smoothed step function, has the same shape as a logarithmic sigmoid function, is symmetrical about the origin, has an output between-1 and 1, and is often required to be used for outputting signals in the range of-1 to 1.
The least square support vector machine algorithm changes inequality constraint in the traditional support vector machine into equality constraint, and takes the sum of squares of errors as a loss function of training, so that solving the quadratic programming problem in the support vector machine is converted into solving the linear equation set problem, and the solving speed is increased;
the LSSVM optimization problem can be described by the following system of equations:
wherein L represents a loss function;
omega represents a weight vector;
gamma represents an adjustable function;
ei representing an error vector;
xi representing input data;
yi representing output data;
representing a mapping function;
b represents a deviation vector;
t represents a transpose;
i represents the position of the data (i=1 to n);
n represents the total number of training data;
s.t represents a constraint abbreviation;
solving the optimization problem by adopting a Lagrangian method:
least squares supportThe expression form of the vector machine isThe invention adopts kernel function as radial basis kernel function, < ->Wherein k (x)i ,yi ) As a kernel function, ai Representing the lagrangian multiplier. e, ei Representing an error vector; n represents the total number of training data; i represents the position of the data (i=1 to n);
in one embodiment, the predictive model performing bias correction includes: in the running process of the model, new data are adopted to correct the model, and a deviation correction method is adopted to correct the model according to the model prediction error, wherein the calculation formula of the deviation correction method is as follows:
wherein,representing the output value of the model after correction at the current moment;
representing a predicted value output by the current time model;
k represents a correction coefficient;
y (t-1) andrepresenting the real value at the previous moment and the predicted value output by the model;
t represents a sampling time;
the correction coefficient is obtained by dividing the model error of the current period and the model error of the previous period:
wherein Y (t)i ) Representing data within a current time period;
representing an average value of the predicted values in the current period;
Y(ti -t) represents data in a previous period;
Ym (ti -t) represents the median value of the predictions in the previous period;
K=median(Ki ) Will Ki And obtaining the correction coefficient by taking the average value.
In one embodiment, the predictive model making model parameter corrections includes: taking deviation between the model output value and the actual value as an optimization target, and optimizing key parameters of the model by adopting a genetic algorithm based on historical data, wherein the optimization target is as follows:
genetic algorithms start the search process from a set of randomly generated initial solutions, called populations. Each individual in the population is a solution to the problem, called a chromosome. These chromosomes evolve continuously in subsequent iterations, called inheritance. The genetic algorithm is realized mainly through crossover, mutation and selection operation. Crossover or mutation operations generate the next generation of chromosomes, called offspring. Chromosome quality is measured by fitness. A certain number of individuals are selected from the previous generation and the next generation according to the fitness, and the individuals are used as the next generation group to continue to evolve, so that after a plurality of generations, the algorithm converges to the best chromosome, which is likely to be the optimal solution or suboptimal solution of the problem. The concept of fitness is used in genetic algorithms to measure how well optimal solutions are likely to be achieved in the calculation of the negligence of individual individuals in a population. The function that measures fitness of an individual is called a fitness function. The definition of fitness functions is generally related to a specific solution problem.
The main operation procedure of the genetic algorithm using three genetic operators (selection operator, crossover operator and mutation operator) is as follows:
a. initializing: setting an evolution algebra counter v=0; setting a maximum evolution algebra V; randomly generating H individuals as an initial population Q (0);
b. individual evaluation: calculating the fitness of individuals in the group Q (V);
c. selection operation: applying a selection operator to the population;
d. crossover operator: acting on the population;
e. and (3) mutation operation: acting mutation operators on the group, and obtaining a next generation group Q (v+1) after the group Q (v) is subjected to selection, crossing and mutation operation;
f. judging a termination condition: if V is less than or equal to V, then: v=v+1, go to step b; if V > V, taking the individual with the greatest fitness obtained in the evolution process as the optimal solution to output, and terminating the calculation.
In summary, by means of the technical scheme, the industrial data are collected based on the industrial internet platform, so that the problem of data island existing in chemical enterprises can be solved, and the data value of different systems can be fully mined; based on the data-driven modeling method of the industrial Internet platform, the built-in machine learning algorithm library comprises dozens of mainstream algorithms, so that the model can be better adapted to frequent changes of working conditions; the method provided by the invention can greatly reduce the requirements of factories on measuring equipment, and has important significance for improving the product quality, promoting energy conservation and consumption reduction and accelerating the digital transformation of enterprises; the method provided by the invention can predict the key indexes of chemical raw materials and products in real time, avoids the problems of long time consumption, difficult detection or incapability of detection of certain indexes and the like, and saves a great amount of time and resources.
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather is intended to cover all modifications, equivalents, alternatives, and improvements that fall within the spirit and scope of the invention.