A method for predicting the water content of oil in the lubrication system of mechanical equipment
By using the CNN-BiLSTM-Attention network model in the prediction of lubricating oil moisture content, combined with technical means of outlier value removal, noise removal and principal component analysis, the problem of insufficient prediction accuracy and rate in the prior art is solved, and the rapid and accurate prediction of oil moisture content changes is achieved.
Patent Information
- Application Number
- CN202411608810.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-12
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2044-11-12
AI Technical Summary
The prior art has problems of insufficient accuracy and rate when predicting changes in lubricant moisture content and equipment wear, and it is difficult to timely identify lubricant deterioration trends and signs of increased equipment wear.
The oil moisture content prediction method based on CNN-BiLSTM-Attention is adopted. By obtaining historical data of multi-dimensional characteristics of oil, outliers and noise removal are performed, dimensionality reduction is reduced by principal component analysis, and data is input into the CNN-BiLSTM-Attention network model for prediction.
Fast and accurate prediction of changes in oil moisture content is achieved, and the lubricant oil deterioration trend and signs of intensified equipment wear can be identified in a timely manner, which improves the accuracy and robustness of the prediction.
Smart Images

Figure CN119128529B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of oil detection, and in particular to a method for predicting the water content of oil in a lubrication system of mechanical equipment. Background Art
[0002] Friction and wear are one of the most common failure modes of mechanical equipment, causing huge losses to the society and economy, including energy waste, increased carbon dioxide emissions, and environmental pollution. As a key component of mechanical equipment, lubricating oil has multiple functions such as reducing friction, reducing wear, cooling and cleaning, preventing rust, and reducing noise. However, the performance of lubricating oil will gradually decline over time. If the quality does not meet the standards, it will lead to insufficient lubrication of the equipment, which will affect the stable operation of the entire system and even pose a safety hazard.
[0003] With the rapid development of modern industry, the failure rate in lubrication systems or hydraulic systems has increased significantly, of which about 70% are related to oil contamination. Water is one of the main contamination factors of lubricating oil, and its influence cannot be ignored. When water and oil are mixed, acidic substances will be formed, which will cause corrosion of metal parts and reduce the service life of equipment; water and oil will form emulsions, which will destroy the uniformity of the oil. Emulsions not only reduce the lubrication performance of the oil, but also affect the viscosity of the oil, making it unable to effectively form a lubricating film, thereby increasing friction and wear, leading to abnormal wear of equipment and accidents.
[0004] In order to effectively manage the quality of lubricating oil and equipment wear, it is particularly important to adopt advanced prediction technology. Traditional time series prediction models have some limitations in predicting changes in oil water content. The models established in previous studies usually only focus on the changes in water content over time, ignoring the influence of other oil indicators. At the same time, the output of the models established in previous studies only focuses on the changes in oil water content at the next moment, so it is impossible to predict the changes in oil water content over a longer time span. In addition, traditional time series prediction models have weak processing capabilities for complex nonlinear relationships and high-dimensional data, making it difficult to model long-term dependencies and not easy to adapt to rapid changes in the environment. In contrast, in order to address these limitations, many time series prediction methods based on machine learning and deep learning have been developed in recent years, such as recurrent neural networks (RNN), long short-term memory networks (LSTM), convolutional neural networks (CNN), etc. These methods can better handle complex time series patterns and nonlinear relationships, and improve the accuracy and robustness of predictions. Therefore, they have significant advantages in predicting lubricating oil deterioration trends and abnormal equipment wear.
[0005] However, the current time series prediction methods based on machine learning and deep learning have poor speed and accuracy, and cannot timely and accurately identify changes in the water content of lubricating oil and signs of increased equipment wear. Therefore, a method for predicting the water content of the oil in the lubrication system of mechanical equipment is needed to solve the above problems. Summary of the invention
[0006] The present invention provides a method for predicting the water content of oil in a lubrication system of mechanical equipment, which can quickly and accurately predict the water content of oil.
[0007] According to a method for predicting the water content of oil in a mechanical equipment lubrication system of the present invention, the method comprises the following steps:
[0008] S1, obtaining a historical data set of multi-dimensional characteristics of oil, arranging them in chronological order according to oil characteristics and time, and making a data set 1;
[0009] S2, remove outliers in data set 1 by isolation forest and remove data noise by discrete wavelet transform to produce data set 2;
[0010] S3, using principal component analysis to reduce the dimension of data set 2, eliminating redundant features of multidimensional data, and making data set 3;
[0011] S4, converting data set 3 into the input and output sequence of supervised learning by lagging, and then normalizing it to produce data set 4;
[0012] S5. Input data set 4 into the CNN-BiLSTM-Attention network model to predict the water content of oil and obtain the best prediction result.
[0013] Preferably, in S1, the oil historical data set comes from the online monitoring system of the ball mill gearbox, data is collected once a minute, and the average value is calculated every hour, with a total of 1,300 sets of samples; the oil characteristics include oil physical and chemical information, oil ferromagnetic abrasive particle information and oil non-ferromagnetic abrasive particle information;
[0014] The physical and chemical information of the oil includes temperature, water content, dynamic viscosity, density and dielectric constant;
[0015] The oil ferromagnetic wear particle information includes the first-level ferromagnetic particle number of 40μm to 99μm, the second-level ferromagnetic particle number of 100μm to 199μm, the third-level ferromagnetic particle number of 200μm to 299μm, the fourth-level ferromagnetic particle number of 300μm to 399μm, the fifth-level ferromagnetic particle number ≥400μm and the total number of ferromagnetic particles;
[0016] The oil non-ferromagnetic wear particle information includes the first-level number of non-ferromagnetic particles 150μm~199μm, the second-level number of non-ferromagnetic particles 200μm~299μm, the third-level number of non-ferromagnetic particles 300μm~399μm, the fourth-level number of non-ferromagnetic particles 400μm~499μm, the fifth-level number of non-ferromagnetic particles ≥500μm and the total number of non-ferromagnetic particles;
[0017] The data of the fourth-level number of ferromagnetic particles, the fifth-level number of ferromagnetic particles, the fourth-level number of non-ferromagnetic particles, and the fifth-level number of non-ferromagnetic particles are always 0 and are directly removed. The original oil data has a total of 13 dimensions. The data are arranged in chronological order according to the oil characteristics and the time of data collection to produce data set 1.
[0018] Preferably, in S2, the outlier removal of the data set 1 by the isolation forest is divided into a training phase and an evaluation phase. The training phase is to construct an isolation tree by the sample data set, and the evaluation phase is to obtain the anomaly score of the instance. After the outliers of the data set 1 are removed, the data noise is removed by wavelet transform. The specific steps include:
[0019] S2.1. In the training phase, n data are extracted from data set 1 to form sub-data set D. n , D n All dimensions of D are recorded as a set M, a dimension l is randomly selected from the set M, and then a split point t is randomly selected on the selected dimension l. This split point t is randomly selected between the minimum and maximum values on the dimension l. D n Divide into two parts, recursively repeat the above steps on each subset until the tree reaches the predetermined maximum depth d and the data can no longer be split, that is, the child node contains only one data, forming an isolated tree; repeat the above steps to generate k isolated trees, and k isolated trees form an isolated forest; the depth of the tree reflects the degree of isolation of the sample point in the feature space, and the path length of the sample in the tree is used to determine whether it is an outlier. Samples with short paths are abnormal;
[0020] In the scoring stage, the k isolated trees obtained in the training stage are used to calculate the anomaly score of each sample point in the data set to evaluate the anomaly of the data; each isolated tree assigns a path length h(x) to each sample point in the data set as the anomaly score, and the anomaly score of the sample point x is calculated using formula (1):
[0021]
[0022] in, is the number of samples used to train each isolated tree; E[h(x)] is the average path length of data point x in the isolation forest; is the normalization factor, which is used to normalize the path length of the recorded data point x;
[0023] S2.2 After removing the outliers from data set 1, the oil data is subjected to discrete wavelet transform and decomposed into feature items and noise items containing different characteristics, so that the signal can be represented and processed in both the time domain and the frequency domain, and is calculated using formulas (2) and (3); the db4 wavelet is selected as the wavelet function, and the data after outliers are removed is decomposed into three layers; the first layer of wavelet decomposition decomposes the original sample signal into an approximate component cA1 and a detail component cD1, the second layer of wavelet decomposition decomposes the approximate component cA1 obtained in the first layer into an approximate component cA2 and a detail component cD2 in the second layer, and the third layer of wavelet decomposition decomposes the approximate component cA2 obtained in the second layer into an approximate component cA3 and a detail component cD3 in the third layer; then the obtained wavelet coefficients are subjected to soft threshold processing; the wavelet coefficients after threshold processing are resynthesized into a denoised signal, i.e., data set 2;
[0024]
[0025] Where x(n) is the original signal, is the scaling function, is the wavelet function, c j (k) and d j (k) represent the low-frequency and high-frequency coefficients respectively.
[0026] As a preferred embodiment, in S3, principal component analysis is used to reduce the dimension of data set 2 to remove redundant features of multidimensional data; first, formula (4) is used to standardize data set 2 to construct a standardized matrix X p ; Then use formula (5) to calculate X p The correlation coefficient matrix R of is obtained to verify that most parameters have strong correlation; the eigenvalue and eigenvector of R are calculated using formula (6); finally, the principal component contribution rate is calculated using formula (7) and the cumulative contribution rate is calculated using formula (8); the water content of the oil, the second-level number of ferromagnetic particles, the third-level number of ferromagnetic particles, density and dielectric constant are used as new features to form data set 3;
[0027]
[0028] Among them, x ij is the original data value, indicating the original value of the i-th sample on the j-th feature; n is the number of samples, is the mean of the jth feature; is the sample standard deviation; X ij is the standardized data value, which means the standardized value of the i-th sample on the j-th feature;
[0029]
[0030] Among them, X is the standardized data matrix; X T The transpose of the standardized data matrix; R is the correlation coefficient matrix;
[0031] |λ i -R|=0 (6)
[0032] Among them, λ i is the i-th eigenvalue;
[0033]
[0034] in, is the contribution rate, η i is the cumulative contribution rate, λ k is the kth eigenvalue and m is the total number.
[0035] Preferably, in S4, data set 3 is converted into input and output sequences of supervised learning by means of lag, and data with a lag step length of 24h is grouped as input, and the subsequent output time series data with a length of 48h is used as output, thereby realizing the prediction of the water content of the oil in the next 48h; then, Min-Max normalization processing is performed, and the data is scaled to between [-1,1]; then 80% of the converted data set is used as a training set, and 20% is used as a test set, and finally data set 4 is made.
[0036] Preferably, in S5, the CNN-BiLSTM-Attention network model structure is as follows: first, the preprocessed data is converted into 3D data with a shape of [number of samples, time steps, number of features] as input samples; then, a one-dimensional convolutional layer is used to extract local features of the time series data, and 128 filters are set, each with a kernel size of 3; in order to reduce the dimension of the output of the convolutional layer, a pooling layer with a window size of 2×2 is set, and its result is passed to the BiLSTM layer. The BiLSTM layer is designed to capture the long-term dependencies of the input sequence, where each unidirectional LSTM layer contains 32 units; the output of the BiLSTM layer is passed to the Attention layer, which dynamically calculates the attention weight of each time step to help the model learn the importance of data at different times to the predicted value; then, the output is passed to the Dropout layer to reduce the risk of overfitting; finally, the predicted result of the water content of the oil is output through the fully connected layer, the output layer contains one neuron, and uses ReLU as the activation function.
[0037] As a preferred method, in S5, the CNN-BiLSTM-Attention network model uses mean square error MSE as the loss function and is trained with the Adam optimizer. During the training process, the learning rate is automatically adjusted using the ReduceLROnPlateau function, and the early stopping mechanism is implemented through the EarlyStopping function to avoid overfitting of the model.
[0038] The beneficial effects of the present invention are:
[0039] The present invention provides a method for predicting the water content of oil based on CNN-BiLSTM-Attention, which uses the isolation forest technology to eliminate outliers in the data and effectively removes data noise through wavelet transform. The data is reduced in dimension using principal component analysis, and the linear trend of the data is eliminated using the first-order difference method. CNN extracts the local spatial features of the oil data, BiLSTM extracts the time dependency of the oil data, and the Attention layer dynamically calculates the attention weight of each time step based on the output of the BiLSTM layer, helping the model learn the importance of data at different times to the predicted value. Through the above raw data preprocessing and prediction model structure, the present invention can achieve rapid and accurate prediction of changes in the water content of oil at future times, and has practical application value. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 It is a flow chart of a method for predicting the water content of oil in a lubrication system of mechanical equipment in an embodiment;
[0041] Figure 2 This is a schematic diagram of the isolation forest process in the embodiment;
[0042] Figure 3 This is a schematic diagram of discrete wavelet change decomposition in the embodiment;
[0043] Figure 4 It is the oil parameter correlation heat map in the embodiment;
[0044] Figure 5 This is a schematic diagram of the principal component analysis process in the embodiment;
[0045] Figure 6 This is a structural diagram of the CNN-BiLSTM-Attention model in the embodiment;
[0046] Figure 7 This is a diagram showing the prediction results of the oil water content prediction model in the embodiment;
[0047] Figure 8 Graph showing the evaluation index of the oil water content prediction model in the embodiment. DETAILED DESCRIPTION
[0048] In order to further understand the content of the present invention, the present invention is described in detail in conjunction with the accompanying drawings and embodiments. It should be understood that the embodiments are only for explaining the present invention and are not intended to limit it.
[0049] Example
[0050] like Figure 1 As shown, this embodiment provides a method for predicting the water content of oil in a lubrication system of mechanical equipment, which includes the following steps:
[0051] S1, obtaining a historical data set of multi-dimensional characteristics of oil, arranging them in chronological order according to oil characteristics and time, and making a data set 1;
[0052] The oil historical data set comes from the online monitoring system of the ball mill gearbox. The data is collected once a minute and the average value is calculated every hour, with a total of 1,300 sets of samples. The oil characteristics include the physical and chemical information of the oil, the ferromagnetic wear particle information of the oil, and the non-ferromagnetic wear particle information of the oil.
[0053] The physical and chemical information of the oil includes temperature, water content, dynamic viscosity, density and dielectric constant;
[0054] The oil ferromagnetic wear particle information includes the first-level ferromagnetic particle number of 40μm to 99μm, the second-level ferromagnetic particle number of 100μm to 199μm, the third-level ferromagnetic particle number of 200μm to 299μm, the fourth-level ferromagnetic particle number of 300μm to 399μm, the fifth-level ferromagnetic particle number ≥400μm and the total number of ferromagnetic particles;
[0055] The oil non-ferromagnetic wear particle information includes the first-level number of non-ferromagnetic particles 150μm~199μm, the second-level number of non-ferromagnetic particles 200μm~299μm, the third-level number of non-ferromagnetic particles 300μm~399μm, the fourth-level number of non-ferromagnetic particles 400μm~499μm, the fifth-level number of non-ferromagnetic particles ≥500μm and the total number of non-ferromagnetic particles;
[0056] The data of the fourth-level number of ferromagnetic particles, the fifth-level number of ferromagnetic particles, the fourth-level number of non-ferromagnetic particles, and the fifth-level number of non-ferromagnetic particles are always 0 and are directly removed. The original oil data has a total of 13 dimensions. The data are arranged in chronological order according to the oil characteristics and the time of data collection to produce data set 1.
[0057] S2, remove outliers in data set 1 by isolation forest and remove data noise by discrete wavelet transform to produce data set 2;
[0058] In S2, the outlier removal of dataset 1 by isolation forest is divided into a training phase and an evaluation phase. The training phase is to construct an isolation tree through the sample dataset, and the evaluation phase is to obtain the anomaly score of the instance. After the outliers of dataset 1 are removed, the data noise is removed by wavelet transform. The specific steps include:
[0059] S2.1. In the training phase, n data are extracted from data set 1 to form sub-data set D. n , D n All dimensions of D are recorded as a set M, a dimension l is randomly selected from the set M, and then a split point t is randomly selected on the selected dimension l. This split point t is randomly selected between the minimum and maximum values on the dimension l. D n Divide into two parts, recursively repeat the above steps on each subset until the tree reaches the predetermined maximum depth d and the data can no longer be split, that is, the child node contains only one data (that is, the child node contains only one data), forming an isolated tree; repeat the above steps to generate k isolated trees, and k isolated trees form an isolated forest; the depth of the tree reflects the degree of isolation of the sample point in the feature space, and the path length of the sample in the tree is used to determine whether it is an outlier. Samples with short paths are abnormal;
[0060] In the scoring stage, the k isolated trees obtained in the training stage are used to calculate the anomaly score of each sample point in the data set to evaluate the anomaly of the data; each isolated tree assigns a path length h(x) to each sample point in the data set as the anomaly score, and the anomaly score of the sample point x is calculated using formula (1): This is used to assess data anomalies:
[0061]
[0062] in, is the number of samples used to train each isolated tree; E[h(x)] is the average path length of data point x in the isolation forest; is the normalization factor, which is used to normalize the path length of the recorded data point x; Isolation Forest Process Diagram, such as Figure 2 As shown;
[0063] S2.2 After removing the outliers from data set 1, the oil data is subjected to discrete wavelet transform and decomposed into feature items and noise items containing different characteristics, so that the signal can be represented and processed in both the time domain and the frequency domain. Formulas (2) and (3) are used for calculation; db4 wavelet is selected as the wavelet function, and the data after outliers are removed is decomposed into three layers. The discrete wavelet change decomposition diagram is as follows: Figure 3As shown; the first layer of wavelet decomposition decomposes the original sample signal into approximate wavelet coefficients cA1 and detail wavelet coefficients cD1; the second layer of wavelet decomposition decomposes the approximate wavelet coefficients cA1 obtained in the first layer into approximate wavelet coefficients cA2 and detail wavelet coefficients cD2 in the second layer; the third layer of wavelet decomposition decomposes the approximate wavelet coefficients cA2 obtained in the second layer into approximate wavelet coefficients cA3 and detail wavelet coefficients cD3 in the third layer; then the obtained wavelet coefficients are subjected to soft threshold processing; the wavelet coefficients subjected to threshold processing are resynthesized into the denoised signal, i.e., data set 2;
[0064]
[0065] Where x(n) is the original signal, is the scaling function, is the wavelet function, c j (k) and d j (k) represent the low-frequency and high-frequency coefficients respectively.
[0066] S3, using principal component analysis to reduce the dimension of data set 2, eliminating redundant features of multidimensional data, and making data set 3;
[0067] In S3, principal component analysis is used to reduce the dimension of data set 2 and remove the redundant features of multidimensional data. First, formula (4) is used to standardize data set 2 to construct a standardized matrix X p ; Then use formula (5) to calculate X p The correlation coefficient matrix R is used to draw the oil parameter correlation heat map as shown in Figure 4 As shown, most parameters have strong correlation. In order to simplify the complexity of the model, it is necessary to reduce the dimension of the data and remove redundant features. Formula (6) is used to calculate the eigenvalue and eigenvector of R. Finally, formula (7) is used to calculate the principal component contribution rate and formula (8) is used to calculate the cumulative contribution rate. The flowchart of principal component analysis is shown in the figure. Figure 5 As shown; among them, the contribution rate of principal component 1 reaches 0.76, the contribution of principal component 2 is 0.1, and the cumulative contribution rate is ≥85%; the component matrix obtained by principal component analysis, as shown in Table 1, the water content of the oil, the second-grade number of ferromagnetic particles and the third-grade number of ferromagnetic particles have the greatest influence on principal component 1; while the density and dielectric constant of the oil have the greatest influence on principal component 2; therefore, the water content of the oil, the second-grade number of ferromagnetic particles, the third-grade number of ferromagnetic particles, the density and the dielectric constant are the main influencing factors of this embodiment; as the input features of the prediction model of the water content of the oil; the water content of the oil, the second-grade number of ferromagnetic particles, the third-grade number of ferromagnetic particles, the density and the dielectric constant are used as new features to form data set 3;
[0068]
[0069] Among them, xij is the original data value, indicating the original value of the i-th sample on the j-th feature; n is the number of samples, is the mean of the jth feature; is the sample standard deviation; X ij is the standardized data value, which means the standardized value of the i-th sample on the j-th feature;
[0070]
[0071] Among them, X is the standardized data matrix; X T The transpose of the standardized data matrix; R is the correlation coefficient matrix;
[0072] |λ i -R|=0 (6)
[0073] Among them, λ i is the i-th eigenvalue;
[0074]
[0075] in, is the contribution rate, η i is the cumulative contribution rate, λ k is the kth eigenvalue and m is the total number.
[0076] Table 1 Component matrix obtained by principal component analysis
[0077]
[0078]
[0079] S4, converting data set 3 into the input and output sequence of supervised learning by lagging, and then normalizing it to produce data set 4;
[0080] In S4, data set 3 is converted into the input and output sequence of supervised learning by means of lag, and the data with a lag step length of 24h is grouped as input, and the subsequent output time series data length is 48h as output, thereby realizing the prediction of the water content of the oil in the next 48h; then, Min-Max normalization processing is performed, and the data is scaled to between [-1,1]; then 80% of the converted data set is used as a training set, and 20% as a test set, and finally data set 4 is made.
[0081] S5. Input data set 4 into the CNN-BiLSTM-Attention network model to predict the water content of oil and obtain the best prediction result;
[0082] In S5, the CNN-BiLSTM-Attention network model structure is as follows Figure 6 As shown in the figure; first, the preprocessed data is converted into 3D data with the shape of [number of samples, time steps, number of features] as the input sample; then, a one-dimensional convolution layer is used to extract the local features of the time series data, and 128 filters are set, and the kernel size of each filter is 3; in order to reduce the dimension of the output of the convolution layer, a pooling layer with a window size of 2×2 is set, and its result is passed to the BiLSTM layer. The BiLSTM layer is designed to capture the long-term dependencies of the input sequence, where each unidirectional LSTM layer contains 32 units; the output of the BiLSTM layer is passed to the Attention layer, which dynamically calculates the attention weight of each time step to help the model learn the importance of data at different times to the predicted value; then, the output is passed to the Dropout layer to reduce the risk of overfitting; finally, the prediction result of the water content of the oil is output through the fully connected layer. The output layer contains one neuron and uses ReLU as the activation function.
[0083] In S5, the CNN-BiLSTM-Attention network model uses mean square error (MSE) as the loss function and is trained with the Adam optimizer. During the training process, the ReduceLROnPlateau function is used to automatically adjust the learning rate, and the EarlyStopping function is used to implement the early stopping mechanism to avoid overfitting of the model.
[0084] The test set oil data is input into the trained oil water content prediction model for prediction, and the obtained oil water content prediction value is compared with the true value in the test set. Figure 7 The figure shows a comparison between the model prediction value (Prediction) and the true value (Original). It can be seen from the figure that the gap between the predicted value and the true value is small, indicating that the constructed oil water content prediction model has a good prediction effect on the future water content value in the oil.
[0085] This embodiment selects the root mean square error (RMSE), mean absolute error (MAE), mean absolute percentage error (MAPE) and R 2 To evaluate the performance and prediction effect of the model. RMSE is an evaluation indicator used to measure the degree of error dispersion between the true value and the predicted value; MAE is used to measure the average absolute deviation between the predicted value and the true value; MAPE is used to measure the average percentage error between the predicted value and the true value; R 2Statistical indicators used to measure the goodness of fit of regression models. The closer RMSE, MAE, and MAPE are to 0, the better the model effect is. 2 The closer the value is to 1, the better the model effect is.
[0086] Figure 8 This is the evaluation index diagram of the oil water content prediction model, where the RMSE is 0.02, the MAE is 0.012, and the MAPE is 0.008. Most of them are close to 0, while R 2 It reaches 93.47%. Therefore, from the above model evaluation index size, it can be concluded that the model has high prediction accuracy and good robustness, and can achieve rapid and accurate prediction of the changes in oil water content in the future, providing reliable technical support for oil monitoring and control.
[0087] The present invention and its embodiments are described schematically above, and the description is not restrictive. The drawings show only one embodiment of the present invention, and the actual structure is not limited thereto. Therefore, if a person skilled in the art is inspired by it and designs a structural method and an embodiment similar to the technical solution without creativity without departing from the purpose of the invention, they shall all fall within the protection scope of the present invention.
Claims
1. A method for predicting the water content of oil in a mechanical equipment lubrication system, characterized in that: The following steps are involved: S1, obtaining a historical data set of multi-dimensional characteristics of oil, arranging them in chronological order according to oil characteristics and time, and making a data set 1; In S1, the oil historical data set comes from the online monitoring system of the ball mill gearbox. Data is collected once a minute and the average value is calculated every hour, with a total of 1,300 sets of samples. The oil characteristics include the physical and chemical information of the oil, the ferromagnetic wear particle information of the oil, and the non-ferromagnetic wear particle information of the oil. The physical and chemical information of the oil includes temperature, water content, dynamic viscosity, density and dielectric constant; The oil ferromagnetic wear particle information includes the first-level ferromagnetic particle number of 40μm to 99μm, the second-level ferromagnetic particle number of 100μm to 199μm, the third-level ferromagnetic particle number of 200μm to 299μm, the fourth-level ferromagnetic particle number of 300μm to 399μm, the fifth-level ferromagnetic particle number ≥400μm and the total number of ferromagnetic particles; The oil non-ferromagnetic wear particle information includes the first-level number of non-ferromagnetic particles 150μm~199μm, the second-level number of non-ferromagnetic particles 200μm~299μm, the third-level number of non-ferromagnetic particles 300μm~399μm, the fourth-level number of non-ferromagnetic particles 400μm~499μm, the fifth-level number of non-ferromagnetic particles ≥500μm and the total number of non-ferromagnetic particles; The data of the fourth-level number of ferromagnetic particles, the fifth-level number of ferromagnetic particles, the fourth-level number of non-ferromagnetic particles, and the fifth-level number of non-ferromagnetic particles are always 0, so they are directly removed. The original oil data has a total of 13 dimensions. The data are arranged in the order of oil characteristics and data collection time to create data set 1; S2, remove outliers in data set 1 by isolation forest and remove data noise by discrete wavelet transform to produce data set 2; S3, using principal component analysis to reduce the dimension of data set 2, eliminating redundant features of multidimensional data, and making data set 3; S4, converting data set 3 into the input and output sequence of supervised learning by lagging, and then normalizing it to produce data set 4; S5. Input data set 4 into the CNN-BiLSTM-Attention network model to predict the water content of oil and obtain the best prediction result.
2. The method for predicting the water content of oil in a mechanical equipment lubrication system according to claim 1, characterized in that: In S2, the outlier removal of dataset 1 by isolation forest is divided into a training phase and an evaluation phase. The training phase is to construct an isolation tree through the sample dataset, and the evaluation phase is to obtain the anomaly score of the instance; After removing the outliers in data set 1, the data noise is removed by wavelet transform. The specific steps include: S2.
1. In the training phase, n data are extracted from data set 1 to form sub-data set D. n , D n All dimensions of are recorded as set M, a dimension l is randomly selected from the set M, and then a split point t is randomly selected on the selected dimension l. This split point t is randomly selected between the minimum and maximum values on the dimension l. D n Divide into two parts, recursively repeat the above steps on each subset until the tree reaches the predetermined maximum depth d and the data can no longer be split, that is, the child node contains only one data, forming an isolated tree; repeat the above steps to generate k isolated trees, and k isolated trees form an isolated forest; the depth of the tree reflects the degree of isolation of the sample point in the feature space, and the path length of the sample in the tree is used to determine whether it is an outlier. Samples with short paths are abnormal; In the scoring stage, the k isolated trees obtained in the training stage are used to calculate the anomaly score of each sample point in the data set to evaluate the anomaly of the data; each isolated tree assigns a path length h(x) to each sample point in the data set as the anomaly score, and the anomaly score of the sample point x is calculated using formula (1): in, is the number of samples used to train each isolated tree; E[h(x)] is the average path length of data point x in the isolation forest; is the normalization factor, which is used to normalize the path length of the recorded data point x; S2.2 After removing the outliers from data set 1, the oil data is subjected to discrete wavelet transform and decomposed into feature items and noise items containing different characteristics, so that the signal can be represented and processed in both the time domain and the frequency domain, and is calculated using formulas (2) and (3); the db4 wavelet is selected as the wavelet function, and the data after outliers are removed is decomposed into three layers; the first layer of wavelet decomposition decomposes the original sample signal into an approximate component cA1 and a detail component cD1, the second layer of wavelet decomposition decomposes the approximate component cA1 obtained in the first layer into an approximate component cA2 and a detail component cD2 in the second layer, and the third layer of wavelet decomposition decomposes the approximate component cA2 obtained in the second layer into an approximate component cA3 and a detail component cD3 in the third layer; then the obtained wavelet coefficients are subjected to soft threshold processing; the wavelet coefficients after threshold processing are resynthesized into a denoised signal, i.e., data set 2; Where x(n) is the original signal, is the scaling function, is the wavelet function, c j (k) and d j (k) represent the low-frequency and high-frequency coefficients respectively.
3. The method for predicting the water content of oil in a mechanical equipment lubrication system according to claim 2, characterized in that: In S3, principal component analysis is used to reduce the dimension of data set 2 and remove the redundant features of multidimensional data. First, formula (4) is used to standardize data set 2 to construct a standardized matrix X p ; Then use formula (5) to calculate X p The correlation coefficient matrix R verifies that most parameters have strong correlation; The eigenvalue and eigenvector of R are calculated using formula (6); finally, the principal component contribution rate is calculated using formula (7) and the cumulative contribution rate is calculated using formula (8); the water content of the oil, the second-level number of ferromagnetic particles, the third-level number of ferromagnetic particles, the density and the dielectric constant are used as new features to form data set 3; Among them, x ij is the original data value, indicating the original value of the i-th sample on the j-th feature; n is the number of samples, is the mean of the jth feature; is the sample standard deviation; X ij is the standardized data value, which means the standardized value of the i-th sample on the j-th feature; Among them, X is the standardized data matrix; X T The transpose of the standardized data matrix; R is the correlation coefficient matrix; |l i -R|=0 (6) Among them, λ i is the i-th eigenvalue; in, is the contribution rate, η i is the cumulative contribution rate, λ k is the kth eigenvalue and m is the total number.
4. The method for predicting the water content of oil in a mechanical equipment lubrication system according to claim 3 is characterized by: In S4, data set 3 is converted into the input and output sequence of supervised learning by means of lag, and the data with a lag step length of 24h is grouped as input, and the subsequent output time series data length is 48h as output, thereby realizing the prediction of the water content of the oil in the next 48h; then, Min-Max normalization processing is performed, and the data is scaled to between [-1,1]; then 80% of the converted data set is used as a training set, and 20% as a test set, and finally data set 4 is made.
5. The method for predicting the water content of oil in a mechanical equipment lubrication system according to claim 4, characterized in that: In S5, the CNN-BiLSTM-Attention network model structure is as follows: First, the preprocessed data is converted into 3D data with a shape of [number of samples, time steps, number of features] as the input sample; then, a one-dimensional convolution layer is used to extract the local features of the time series data, and 128 filters are set, and the kernel size of each filter is 3; in order to reduce the dimension of the output of the convolution layer, a pooling layer with a window size of 2×2 is set, and its result is passed to the BiLSTM layer. The BiLSTM layer is designed to capture the long-term dependencies of the input sequence, where each unidirectional LSTM layer contains 32 units; the output of the BiLSTM layer is passed to the Attention layer, which dynamically calculates the attention weight of each time step to help the model learn the importance of data at different times to the predicted value; then, the output is passed to the Dropout layer to reduce the risk of overfitting; finally, the prediction result of the water content of the oil is output through the fully connected layer. The output layer contains one neuron and uses ReLU as the activation function.
6. A method for predicting the water content of oil in a mechanical equipment lubrication system according to claim 5, characterized in that: In S5, the CNN-BiLSTM-Attention network model uses mean square error (MSE) as the loss function and is trained with the Adam optimizer. During the training process, the ReduceLROnPlateau function is used to automatically adjust the learning rate, and the EarlyStopping function is used to implement the early stopping mechanism to avoid overfitting of the model.
Citation Information
Patent Citations
LSTM-based model and method for simulating and predicting runoff of inland river in arid region
CN118246354A