A method for predicting composite hose life loss
Through the improved BP neural network prediction model IHOA-BP, combined with the hiking optimization algorithm to optimize hidden layer parameters, considering a variety of influencing factors, the problem of inefficient prediction of composite hose life is solved, and higher prediction accuracy and adaptability are achieved , reducing maintenance costs.
Patent Information
- Application Number
- CN202411443678.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2044-10-16
AI Technical Summary
The existing composite hose life prediction methods are inefficient in handling complex environments, making it difficult to accurately predict life loss, resulting in equipment safety and maintenance costs.
IHOA-BP, an improved BP neural network prediction model, is used to optimize the hidden layer weight and initial threshold value in combination with hiking optimization algorithm. The number of nodes in the input layer is 6, the hidden layer is 15, and the output layer is used to predict the life of the composite hose. Loss value, considering key characteristic factors such as temperature, humidity, light, pH and compression strength.
It improves the accuracy and calculation efficiency of composite hose life prediction, can reasonably arrange maintenance and replacement cycles, reduce maintenance costs, and adapt to changes in different usage environments.
Smart Images

Figure CN118966027B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of data prediction and relates to a method for predicting the life loss of a composite hose. Background Art
[0002] Composite hoses are widely used in industries such as industry and petrochemicals. Their performance and service life are directly related to the safety and stability of the equipment. Therefore, the necessity of life loss prediction is mainly reflected in the following aspects: Composite hoses are prone to aging, cracking and other problems in extreme environments. Timely prediction of their life loss can prevent accidents and ensure the safety of equipment and personnel; secondly, through life loss prediction, the maintenance and replacement cycle of the hose can be reasonably arranged to avoid high repair costs caused by premature replacement or sudden failures; finally, by accurately predicting the life of composite hoses, manufacturers can optimize product design and material selection to further improve the durability and service life of the hose.
[0003] Publication No. CN116858666A discloses a composite hose internal pressure sealing layer life assessment method based on actual working conditions, which conducts accelerated immersion aging tests on the internal pressure sealing layer material to establish an aging life model for the internal pressure sealing layer material. In recent years, with the development of big data and machine learning, hose life prediction models based on a variety of data collection and analysis methods have gradually emerged. For example, real-time hose usage data is collected through sensors, combined with historical data, and a life loss prediction model is established through deep learning or optimization algorithms.
[0004] Hiking Optimization Algorithm (HOA) is a new meta-heuristic optimization technique inspired by hiking activities, especially the process of navigating in complex terrain, which echoes the complex landscape in optimization problems. HOA is inspired by how hikers cope with diverse and challenging terrains, which reflects the various complexities in the optimization problem of BP neural network prediction model when predicting the life loss of composite hoses. The algorithm simulates a hiking expedition in which agents (hikers) work together to find the optimal path, similar to finding the global optimal solution in optimization problems. The performance of HOA depends largely on the appropriate setting of parameters, such as hiker speed and scanning factor. Improper parameter settings will lead to inefficient algorithms or fail to effectively avoid local optimality. Summary of the invention
[0005] In response to the problems involved in the background technology, the present invention proposes a method for predicting the life loss of a composite hose. By inputting the key characteristic factor data that affects the service life of the composite hose into an improved BP neural network prediction model, the life loss rate of the composite hose is output, the prediction accuracy of the service life of the composite hose is improved, the maintenance and replacement cycle of the hose is reasonably arranged, and the high maintenance costs caused by premature replacement or sudden failure are avoided. The improved BP neural network prediction model is recorded as IHOA-BP.
[0006] The technical solution adopted by the present invention to solve its technical problem is: a composite hose life loss prediction method, including a key characteristic factor data set affecting the service life of the composite hose and an improved BP neural network prediction model; the specific steps include:
[0007] Step 1: collect key characteristic factors that affect the service life of the composite hose, quantify each of the key characteristic factors to form a complete characteristic factor data set, and pre-process the characteristic factor data set.
[0008] Step 2: construct an improved BP neural network prediction model IHOA-BP, which includes an input layer, a hidden layer and an output layer. Specifically, the improved hiking optimization algorithm is used to optimize the hidden layer weight β and the initial threshold α of the standard BP neural network prediction model, and the optimal hidden layer weight and the optimal initial threshold The improved BP neural network prediction model is obtained by using the standard BP neural network prediction model.
[0009] Step three, the preprocessed characteristic factor data set is divided into a training set and a test set, wherein the training set is used to train the improved BP neural network prediction model, and the test set is used for the improved BP neural network prediction model to predict the life loss of the composite hose.
[0010] Step 4: Input the test set into the trained improved BP neural network prediction model until the maximum number of iterations is reached, and output the predicted composite hose life loss value.
[0011] Specifically, the key characteristic factors that affect the service life of the composite hose include the use environment and usage method of the composite hose. The six key characteristic factors specifically include: the temperature, light, humidity and pH of the environment in which the composite hose is located, the compression force during the use of the composite hose, and the strength of the composite hose material.
[0012] Specifically, high temperature environment will accelerate the aging process of composite hoses and shorten their service life. The temperature of the medium should be controlled during use to prevent the hoses from being in a high temperature state for a long time. Corrosive environments of strong acids and alkalis will damage the composite hoses and affect their service life. Ultraviolet rays have a destructive effect on rubber materials and will accelerate the aging of composite hoses. Long-term bending and excessive compression will damage the composite hoses and shorten their service life.
[0013] Specifically, for each characteristic factor, find the corresponding quantitative index to accurately reflect the influence of the factor on the life of the composite hose, specifically: temperature is quantified by degrees Celsius, compression strength is quantified by megapascals (MPa); anti-aging performance is expressed by the percentage decrease in material strength after aging test; light intensity is quantified by the unit of watts per square meter (W / m²); the humidity of the environment is quantified by the percentage of relative humidity (%RH); pH value is used to quantify acidity and alkalinity, ranging from 0 to 14, 7 is neutral; tensile strength is used to quantify the strength of the material, in megapascals (MPa).
[0014] Specifically, the quantified characteristic factors form a complete characteristic factor data set, with a total of N groups of samples, as shown in the following table. A1 to AN, B1 to BN, C1 to CN, D1 to DN, E1 to EN, and F1 to FN in the table are characteristic factor data. The characteristic factor data set is preprocessed, specifically including: processing abnormal data and filling missing data; normalizing the features of different units to make them at the same magnitude, specifically: for a given characteristic factor data , scale it to the range of [0, 1] through Min-Max normalization to obtain the normalized feature factor data .
[0015] Sample No. Temperature (℃) Light intensity (W / m²) Humidity (%RH) pH Tensile strength (MPa) Compression strength (MPa) 1 A1 B1 C1 D1 E1 F1 ... ... ... ... ... ... ... N AN BN CN DN EN FN .
[0016] Specifically, in the complete feature factor data set, N groups of samples, each sample contains n feature factors. The abnormal data in the complete feature factor data set is deleted, and the data of the feature factor where the abnormal data is located will be missing. For the jth feature factor There are NK data, where K is the number of missing data for the jth feature factor; the missing data is filled by calculating the average value of the feature factors without missing data in the complete feature factor data set. , then for all The missing values on filling.
[0017] Specifically, an improved BP neural network prediction model IHOA-BP is established. The number of input layer nodes corresponds to the number of key characteristic factors and is set to 6. The number of output layer nodes is 1, which is used to output the predicted composite hose life loss value. The IHOA-BP hidden layer has 15 layers in total. The improved BP neural network prediction model uses an improved hiking optimization algorithm to optimize the hidden layer weights w and initial threshold α of the standard BP neural network prediction model. The optimal hidden layer weights and the optimal initial threshold , where IHOA-BP includes input layer, hidden layer and output layer. Used to connect the input layer and the hidden layer; Used for hidden layer; the improved hiking optimization algorithm includes: proposing a strategy for dynamically adjusting the scanning factor based on the ratio of the relative distance between the traveler and the leader, and using the strategy to improve the hiking optimization algorithm (HOA).
[0018] Specifically, the strategy of dynamically adjusting the scanning factor based on the ratio of the relative distance between the traveler and the leader is as follows:
[0019] Step 1: Calculate the position of the i-th traveler in the t-th iteration With leader position The relative ratio of the distance between ; The leader is the traveler corresponding to the minimum fitness value;
[0020] (1);
[0021] In formula (1), t is the current iteration number, i is the current traveler, i=1,2,...,N, N is the maximum number of travelers, is the position of the i-th traveler With leader position The distance between is the benchmark distance, which is the average distance between all travelers and the leader at the beginning;
[0022] Step 2: Use linear interpolation method based on relative proportion To improve the scanning factor, the mathematical model is:
[0023] (2);
[0024] In formula (2), is the improved scanning factor of the i-th traveler, is the maximum value of the improved scan factor, is the minimum value of the improved scan factor, kIt is a parameter that controls the distance effect weight, with a value of 0.5, and T is the maximum number of iterations.
[0025] Specifically, the improved scanning factor is used to establish a mathematical model of traveler position update of the improved hiking optimization algorithm. The specific method is as follows:
[0026] S41. Tobler hiking function is used to simulate the process in which individual travelers of the improved hiking optimization algorithm adjust their speed according to the steepness of the terrain. The speed mathematical model is:
[0027] (3);
[0028] In formula (3), is the initial velocity of the ith traveler, is the terrain slope of the initial position of the i-th traveler, and the mathematical model is: ;in, is the difference in terrain height, the distance covered by the traveler;
[0029] S42, using the improved scanning factor, a mathematical model for updating the traveler's speed is established according to formula (4), so that the individual travelers maintain an appropriate distance from the leader;
[0030] (4);
[0031] In formula (4), is the speed of the i-th traveler at the t-th iteration, is the speed of the i-th traveler at the t-1th iteration, is a number uniformly distributed in the range [0,1]; For the leadership position, is the improved scanning factor of the i-th traveler, is the position of the i-th traveler in the t-th iteration;
[0032] S43, updating the traveler position of the improved hiking optimization algorithm by the speed of the i-th traveler in the t-th iteration, the mathematical model is:
[0033] (5);
[0034] In formula (5), is the position of the i-th traveler in the t-th iteration, is the position of the i-th traveler in the t+1-th iteration, is the speed of the i-th traveler at the t-th iteration;
[0035] S44. Formula (6) is used to constrain the boundary of the latest position of the i-th traveler. The mathematical model of the boundary constraint is:
[0036] (6);
[0037] In formula (6), is the new position of the i-th traveler at the t+1-th iteration, The lower bound of the positions allowed for the improved hiking optimization algorithm, Upper bounds on allowed positions for the improved hiking optimization algorithm.
[0038] Specifically, the traveler position update mathematical model of the improved hiking optimization algorithm is used to optimize the hidden layer weights w and the initial threshold α of the standard BP neural network prediction model. The specific steps are:
[0039] S21, first map the traveler's position to the hidden layer weight w and initial threshold α of the standard BP neural network prediction model, and each traveler's position vector It contains all the parameters that need to be optimized in the standard BP neural network prediction model. The search process of the improved hiking optimization algorithm is to search for the optimal hidden layer weight and initial threshold combination in the search space. The mathematical model is:
[0040] {β}_{i}=\left [ {{w}_{i,1},{w}_{i,2},...,{w}_{i,D},{α}_{i,1},{α}_{i,2},...,{α}_{i,d}} \right ] (7);
[0041] In formula (7), i=1,2,3,...,N max ,N max is the size of the travelers, D is the number of hidden layer weights w, d is the number of initial thresholds α, to is the hidden layer weight value of the standard BP neural network prediction model, to is the initial threshold of the standard BP neural network prediction model;
[0042] S22. Set the improved hiking optimization algorithm including the size N of the travelers max , problem dimension dim, search space upper bound ub 、 The search space lower bound lb and the maximum number of iterations T, the maximum value of the improved scan factor and the minimum value of the improved scan factor ; Initialize the position of each traveler of the improved hiking optimization algorithm, the mathematical model is:
[0043] (8);
[0044] In formula (8), is the position of the i-th traveler in the t-th iteration, and rand is a random number between 0 and 1;
[0045] S23, using the fitness function to calculate the root mean square error of the life loss prediction value of the composite hose output by the improved BP neural network prediction model, that is, the fitness value, to evaluate the quality of each traveler position, that is, the accuracy of the hidden layer weight w and the initial threshold α; record the traveler position corresponding to the minimum fitness value;
[0046] S24, compare the current number of iterations t with the maximum number of iterations T. If t>T, the traveler position corresponding to the current minimum fitness value, i.e. the leader position Decoded into optimal hidden layer weights and the optimal initial threshold ; Otherwise execute S25;
[0047] S25, updating the traveler's position using a traveler's position updating mathematical model of an improved hiking optimization algorithm;
[0048] S26. Increase the current iteration number t by 1, and return to execute S23.
[0049] Specifically, the fitness function The mathematical model is:
[0050] (9);
[0051] In formula (9), N is the number of samples in the complete feature factor data set, c is the current number of samples, is the predicted life loss value of the cth sample, is the actual life loss value of the cth sample.
[0052] Compared with other methods, the beneficial effects of the present invention are embodied in the following aspects: the present invention utilizes the improved HOA algorithm to dynamically adjust the scanning factor, enhances the balance of the HOA algorithm in global search and local development, accelerates the convergence speed and accuracy of the IHOA-BP model, and improves the overall calculation efficiency, thereby improving the accuracy of the prediction of the life loss of the composite hose; by accurately predicting the life loss of the composite hose, the maintenance and replacement cycle of the hose can be reasonably arranged to avoid the high maintenance costs caused by premature replacement or sudden failure; the model of the present invention takes into account a variety of key characteristic factors that affect the life of the composite hose, such as temperature, humidity, light intensity, pH, tensile strength, etc., so that the model can adapt to different usage environments and improve the accuracy and adaptability of the prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 Flow chart of the life loss prediction method for composite hoses.
[0054] Figure 2 This is a comparison chart of the predicted fitness values of the improved BP neural network prediction model and the standard BP neural network prediction model.
[0055] Figure 3 Comparison chart of output loss values predicted by the improved BP neural network prediction model and the standard BP neural network prediction model for training set.
[0056] Figure 4 Fit a prediction plot for all samples.
[0057] Figure 5 This is a comparison chart of the predicted values of life loss of composite hoses output by the improved BP neural network prediction model and the standard BP neural network prediction model.
[0058] Figure 6 This is a comparison chart of the error between the predicted values of life loss of composite hoses output by the improved BP neural network prediction model and the standard BP neural network prediction model. DETAILED DESCRIPTION
[0059] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0060] See also Figure 1-Figure 6 The present invention provides a technical solution, including a theoretical modeling and Matlab programming of a composite hose life loss prediction method, wherein the theoretical modeling is specifically implemented as follows Figure 1-Figure 2 As shown, it includes steps one to four.
[0061] Step 1: collect key characteristic factors that affect the service life of the composite hose, quantify each of the key characteristic factors to form a complete characteristic factor data set, and pre-process the characteristic factor data set.
[0062] Furthermore, the key characteristic factors that affect the service life of the composite hose include the use environment and method of use of the composite hose. The six key characteristic factors specifically include: the temperature, light, humidity and pH of the environment in which the composite hose is located, the compression force during the use of the composite hose, and the strength of the composite hose material.
[0063] Furthermore, for each characteristic factor, the corresponding quantitative index is found to accurately reflect the influence of the factor on the life of the composite hose, specifically: temperature is quantified by degrees Celsius, compression strength is quantified by megapascals (MPa); anti-aging performance is expressed by the percentage decrease in material strength after aging test; light intensity is quantified by the unit of watts per square meter (W / m²); the humidity of the environment is quantified by the percentage of relative humidity (%RH); the pH value is used to quantify the acidity and alkalinity, ranging from 0 to 14, 7 is neutral; the tensile strength is used to quantify the strength of the material, the unit is megapascals (MPa).
[0064] Sample No. Temperature (℃) Light intensity (W / m²) Humidity (%RH) pH Tensile strength (MPa) Compression strength (MPa) 1 A1 B1 C1 D1 E1 F1 ... ... ... ... ... ... ... N AN BN CN DN EN FN .
[0065] Furthermore, the quantified characteristic factors are used to form a complete characteristic factor data set, with a total of N groups of samples, as shown in the table above. A1 to AN, B1 to BN, C1 to CN, D1 to DN, E1 to EN, and F1 to FN in the table are characteristic factor data. The characteristic factor data set is preprocessed, specifically including: processing abnormal data and filling missing data; normalizing the characteristics of different units to make them at the same magnitude, specifically: for a given characteristic factor data , scale it to the range of [0, 1] through Min-Max normalization to obtain the normalized feature factor data , the mathematical model is:
[0066] (10);
[0067] In formula (10), is the maximum value of the given feature factor data, is the minimum value of the given feature factor data.
[0068] Furthermore, for the N groups of samples in the complete feature factor data set, each sample contains n feature factors. If the abnormal data in the complete feature factor data set is deleted, the data of the feature factor where the abnormal data is located will be missing. For the jth feature factor There are NK data, where K is the number of missing data of the jth feature factor; the missing data are filled by calculating the average value of the feature factor without missing data in the complete feature factor data set according to formula (11): , the mathematical model is:
[0069] (11);
[0070] In formula (11), c is the current sample number, is the data value of the jth characteristic factor of the cth sample;
[0071] Then, according to formula (12), The missing values on For the empty part, use the average value Filling, the mathematical model is:
[0072] (12).
[0073] Step 2: construct an improved BP neural network prediction model IHOA-BP, which includes an input layer, a hidden layer and an output layer. Specifically, the improved hiking optimization algorithm is used to optimize the hidden layer weight β and the initial threshold α of the standard BP neural network prediction model, and the optimal hidden layer weight and the optimal initial threshold The improved BP neural network prediction model is obtained by using the standard BP neural network prediction model.
[0074] Furthermore, an improved BP neural network prediction model IHOA-BP is established. The number of input layer nodes corresponds to the number of key characteristic factors and is set to 6. The number of output layer nodes is 1, which is used to output the predicted composite hose life loss value. The IHOA-BP hidden layer has 15 layers in total. The improved BP neural network prediction model uses an improved hiking optimization algorithm to optimize the hidden layer weights w and initial threshold α of the standard BP neural network prediction model. The optimal hidden layer weights and the optimal initial threshold , where IHOA-BP includes input layer, hidden layer and output layer. Used to connect the input layer and the hidden layer; For hidden layers.
[0075] Furthermore, a strategy is proposed to dynamically adjust the scanning factor based on the ratio of the relative distance between the traveler and the leader, and the hiking optimization algorithm (HOA) is improved by step1-step2. Specifically:
[0076] Step 1: Calculate the position of the i-th traveler in the t-th iteration With leader position The relative ratio of the distance between ; The leader is the traveler corresponding to the minimum fitness value;
[0077] (1);
[0078] In formula (1), t is the current iteration number, i is the current traveler, i=1,2,...,N, N is the maximum number of travelers, is the position of the i-th traveler With leader position The distance between is the benchmark distance, which is the average distance between all travelers and the leader at the beginning;
[0079] Step 2: Use linear interpolation method based on relative proportion To improve the scanning factor, the mathematical model is:
[0080] (2);
[0081] In formula (2), is the improved scanning factor of the i-th traveler, is the maximum value of the improved scan factor, is the minimum value of the improved scan factor, k It is a parameter that controls the distance effect weight, with a value of 0.5, and T is the maximum number of iterations.
[0082] Furthermore, the improved scanning factor is used to establish a mathematical model of travelers' position updates in the improved hiking optimization algorithm. The specific method is as follows:
[0083] S41. Tobler hiking function is used to simulate the process in which individual travelers of the improved hiking optimization algorithm adjust their speed according to the steepness of the terrain. The speed mathematical model is:
[0084] (3);
[0085] In formula (3), is the initial velocity of the ith traveler, is the terrain slope of the initial position of the i-th traveler, and the mathematical model is: ;in, is the difference in terrain height, the distance covered by the traveler;
[0086] S42, using the improved scanning factor, a mathematical model for updating the traveler's speed is established according to formula (4), so that the individual travelers maintain an appropriate distance from the leader;
[0087] (4);
[0088] In formula (4), is the speed of the i-th traveler at the t-th iteration, is the speed of the i-th traveler at the t-1th iteration, is a number uniformly distributed in the range [0,1]; For the leadership position, is the improved scanning factor of the i-th traveler, is the position of the i-th traveler in the t-th iteration;
[0089] S43, updating the traveler position of the improved hiking optimization algorithm by the speed of the i-th traveler in the t-th iteration, the mathematical model is:
[0090] (5);
[0091] In formula (5), is the position of the i-th traveler in the t-th iteration, is the position of the i-th traveler in the t+1-th iteration, is the speed of the i-th traveler at the t-th iteration;
[0092] S44. Formula (6) is used to constrain the boundary of the latest position of the i-th traveler. The mathematical model of the boundary constraint is:
[0093] (6);
[0094] In formula (6), is the new position of the i-th traveler at the t+1-th iteration, The lower bound of the positions allowed for the improved hiking optimization algorithm, Upper bounds on allowed positions for the improved hiking optimization algorithm.
[0095] Furthermore, the traveler position update mathematical model of the improved hiking optimization algorithm is used to optimize the hidden layer weights w and the initial threshold α of the standard BP neural network prediction model. The specific steps are as follows:
[0096] S21, first map the traveler's position to the hidden layer weight w and initial threshold α of the standard BP neural network prediction model, and each traveler's position vector It contains all the parameters that need to be optimized in the standard BP neural network prediction model. The search process of the improved hiking optimization algorithm is to search for the optimal hidden layer weight and initial threshold combination in the search space. The mathematical model is:
[0097] {β}_{i}=\left [ {{w}_{i,1},{w}_{i,2},...,{w}_{i,D},{α}_{i,1},{α}_{i,2},...,{α}_{i,d}} \right ] (7);
[0098] In formula (7), i=1,2,3,...,N max ,N max is the size of the travelers, D is the number of hidden layer weights w, d is the number of initial thresholds α, to is the hidden layer weight value of the standard BP neural network prediction model, to is the initial threshold of the standard BP neural network prediction model;
[0099] S22. Set the improved hiking optimization algorithm including the size N of the travelers max , problem dimension dim, search space upper bound ub 、 The search space lower bound lb and the maximum number of iterations T, the maximum value of the improved scan factor and the minimum value of the improved scan factor ; Initialize the position of each traveler of the improved hiking optimization algorithm, the mathematical model is:
[0100] (8);
[0101] In formula (8), is the position of the i-th traveler in the t-th iteration, and rand is a random number between 0 and 1;
[0102] S23, using the fitness function to calculate the root mean square error of the life loss prediction value of the composite hose output by the improved BP neural network prediction model, that is, the fitness value, to evaluate the quality of each traveler position, that is, the accuracy of the hidden layer weight w and the initial threshold α; record the traveler position corresponding to the minimum fitness value; fitness function The mathematical model is:
[0103] (9);
[0104] In formula (9), N is the number of samples in the complete feature factor data set, c is the current number of samples, is the predicted life loss value of the cth sample, is the actual life loss value of the cth sample;
[0105] S24, compare the current number of iterations t with the maximum number of iterations T. If t>T, the traveler position corresponding to the current minimum fitness value, i.e. the leader position Decoded into optimal hidden layer weights and the optimal initial threshold ; Otherwise execute S25;
[0106] S25, updating the traveler's position using a traveler's position updating mathematical model of an improved hiking optimization algorithm;
[0107] S26. Increase the current iteration number t by 1, and return to execute S23.
[0108] Step three, the preprocessed characteristic factor data set is divided into a training set and a test set, wherein the training set is used to train the improved BP neural network prediction model, and the test set is used for the improved BP neural network prediction model to predict the life loss of the composite hose.
[0109] Furthermore, the preprocessed feature factor data set is randomly divided into a training set and a test set in a ratio of 8 to 2, and the improved BP neural network prediction model is trained using the training set.
[0110] Step 4: Input the test set into the trained improved BP neural network prediction model until the maximum number of iterations is reached, and output the predicted composite hose life loss value.
[0111] Furthermore, a method for predicting the life loss of a composite hose is programmed in Matlab. First, a standard BP neural network prediction model is constructed, and the training parameters are set, including: number of training times net.trainParam.epochs = 50; target error net.trainParam.goal = 1e-4; learning rate net.trainParam.lr = 0.01; closing the window net.trainParam.showWindow = 0; setting the number of input layer nodes inputnum = size(6, 1) of the standard BP neural network prediction model, recorded as 6, the number of hidden layer nodes hiddennum = 15; the number of output layer nodes outputnum = size(1, 1); recorded as 1; 100 groups of key characteristic factors affecting the service life of the composite hose are sorted into an Excel table and input into the standard BP neural network prediction model; further, the size N of the travelers of the improved hiking optimization algorithm is set max =30, problem dimension dim=inputnum*hiddennum+hiddennum*outputnum+hiddennum+outputnum, search space upper bound ub=100 、 The search space lower bound lb=-1 and the maximum number of iterations T=60, the maximum value of the improved scan factor =3 and the minimum value of the improved scan factor =1, the standard hiking optimization algorithm (HOA) is introduced for comparison, and the parameter settings are consistent with the improved hiking optimization algorithm. The optimal hidden layer weights obtained by the standard hiking optimization algorithm (HOA) and the improved hiking optimization algorithm are and the optimal initial threshold Assign the standard BP neural network prediction model, denormalize the predicted output value, and calculate the root mean square error of the output composite hose life loss prediction value. The output is as follows: Figures 2 to 6 result.
[0112] like Figure 2 As shown in the figure, the fitness value comparison between the improved BP neural network prediction model and the standard BP neural network prediction model. It can be seen from the figure that the fitness value of the improved hiking optimization algorithm (IHOA) decreases rapidly in the early iterations, and is close to convergence when the number of iterations is about 5, and the fitness value tends to be stable, and the stable value is 14.6115. In contrast, the fitness value of the standard hiking optimization algorithm (HOA) decreases slowly, the initial fitness value is high, and it gradually tends to be stable after about 15 iterations, and the final fitness value is 18.7563, which shows that IHOA can quickly find a better solution during the optimization process and has stronger convergence. In summary, when optimizing the hidden layer weights and initial thresholds of the standard BP neural network prediction model, the improved hiking optimization algorithm (IHOA) not only converges faster than the standard HOA algorithm, but also has a lower fitness value, showing higher prediction accuracy and better optimization effect.
[0113] like Figure 3 As shown, a comparison chart of the predicted output loss values of the improved BP neural network prediction model trained with 80 training sets and the standard BP neural network prediction model is shown. The solid line represents the actual loss of the composite hose, the dotted line represents the prediction result of the composite hose loss by the BP neural network optimized by the standard hiking optimization algorithm (HOA), and the dotted line represents the prediction result of the composite hose loss by the BP neural network optimized by the improved hiking optimization algorithm (IHOA). It can be seen from the figure that the prediction result of IHOA-BP follows the actual loss value more closely, and the fluctuation trend of the predicted value of IHOA-BP is closer to the actual loss value, indicating that the IHOA-BP method proposed in the present invention is effective in improving the prediction accuracy of the life loss of composite hoses. In contrast, the standard HOA-BP model has a large deviation from the true value in some samples, especially when predicting drastic changes in loss, showing problems of large prediction error and inconsistent fluctuation.
[0114] like Figure 4 As shown in the figure, all samples are fitted with prediction graphs. From the fitted prediction graphs, it can be found that the prediction results of IHOA-BP are close to the true values in most samples, and the fitting line reflects the overall linear trend, indicating that the IHOA-BP model can roughly capture the trend of the key characteristic factor data affecting the service life of the composite hose.
[0115] like Figure 5As shown in the figure, the actual loss value is compared with the prediction results of two different models (HOA-BP and IHOA-BP). It can be seen from the figure that the life loss prediction value of the composite hose of the HOA-BP model deviates significantly from the actual value in multiple samples, especially in places where the loss value changes greatly (such as around sample 6 and sample 10), the prediction performance of HOA-BP is quite different from the actual one; the life loss prediction value of the composite hose of the IHOA-BP model is closer to the actual loss value, especially in the range of sample 6 to sample 10, the performance of IHOA-BP is significantly better than HOA-BP, and the predicted fluctuation trend is closer to the actual loss value. Comprehensive analysis shows that the IHOA-BP model can better capture the fluctuation of loss compared with the HOA-BP model, especially in places with drastic changes, IHOA-BP is closer to the true value, showing higher prediction accuracy, and the fluctuation of the prediction result curve of IHOA-BP in the sample is more consistent with the fluctuation of the true value, indicating that the improved IHOA algorithm has a stronger balance ability in global and local search, and can better adapt to the changing trend of complex data.
[0116] like Figure 6 As shown in the figure, it reflects the error performance of the improved BP neural network prediction model (IHOA-BP) and the standard BP neural network prediction model (HOA-BP) in the prediction of composite hose loss. The prediction error of the HOA-BP model can be seen to have large fluctuations, especially near samples 5, 10 and 15, where the error value has a large deviation, and the error range fluctuates between -60 and 40, which shows that the prediction effect of the HOA-BP model on these samples is poor and the error is large; compared with HOA-BP, the error fluctuation of IHOA-BP is significantly smaller. Although there are large errors in some samples (such as near samples 5 and 10), its error range is smaller overall, and most of the error values are concentrated between -40 and 20, showing better stability and accuracy. Comprehensive analysis shows that the prediction error of the improved IHOA-BP model on most samples is significantly smaller than that of the standard HOA-BP model, indicating that the IHOA-BP model is more stable and accurate in loss prediction. By reducing the prediction error, the IHOA-BP model can provide more reliable composite hose life loss prediction results.
Claims
1. A composite hose life loss prediction method, characterized in that: It includes a data set of key characteristic factors that affect the service life of composite hoses and an improved BP neural network prediction model. The specific steps are as follows: Step 1: Collect key characteristic factors that affect the service life of the composite hose, quantify each of the key characteristic factors to form a complete characteristic factor data set, and pre-process the characteristic factor data set; Step 2: construct an improved BP neural network prediction model IHOA-BP, which includes an input layer, a hidden layer and an output layer. Specifically, the improved hiking optimization algorithm is used to optimize the hidden layer weight β and the initial threshold α of the standard BP neural network prediction model, and the optimal hidden layer weight and the optimal initial threshold The improved BP neural network prediction model is obtained by using the standard BP neural network prediction model; the improved hiking optimization algorithm includes: proposing a strategy for dynamically adjusting the scanning factor based on the ratio of the relative distance between the traveler and the leader, and using the strategy to improve the scanning factor of the hiking optimization algorithm (HOA), specifically: Step 1: Calculate the position of the i-th traveler in the t-th iteration With leader position The relative ratio of the distance between ; The leader is the traveler corresponding to the minimum fitness value; (1); In formula (1), t is the current iteration number, i is the current traveler, i=1,2,...,N, N is the maximum number of travelers, is the position of the i-th traveler With leader position The distance between is the benchmark distance, which is the average distance between all travelers and the leader at the beginning; Step 2: Use linear interpolation method based on relative proportion To improve the scanning factor, the mathematical model is: (2); In formula (2), is the improved scanning factor of the i-th traveler, is the maximum value of the improved scan factor, is the minimum value of the improved scan factor, k is the parameter that controls the distance influence weight, the value is 0.5, and T is the maximum number of iterations; Step 3, the pre-processed characteristic factor data set is divided into a training set and a test set, wherein the training set is used to train the improved BP neural network prediction model, and the test set is used to predict the life loss of the composite hose using the improved BP neural network prediction model; Step 4: Input the test set into the trained improved BP neural network prediction model until the maximum number of iterations is reached, and output the predicted composite hose life loss value.
2. A composite hose life loss prediction method according to claim 1, characterized in that: The key characteristic factors affecting the service life of the composite hose include the use environment and use method of the composite hose, specifically including: the temperature, light, humidity and pH of the environment in which the composite hose is located, the strength of the composite hose material and the compression force of the composite hose during use.
3. A composite hose life loss prediction method according to claim 2, characterized in that: In step 1, the characteristic factor data set is preprocessed, specifically: N groups of samples in the complete characteristic factor data set, each sample contains n characteristic factors, the abnormal data in the complete characteristic factor data set is deleted, the data of the characteristic factor where the abnormal data is located will be missing, and for the jth characteristic factor There are NK data, where K is the number of missing data for the jth feature factor; the missing data is filled by calculating the average value of the feature factors without missing data in the complete feature factor data set. , then for all The missing values on filling.
4. A composite hose life loss prediction method according to claim 3, characterized in that: The number of input layer nodes of the IHOA-BP corresponds to the number of key characteristic factors, which is set to 6. The number of output layer nodes is 1, which is used to output the predicted composite hose life loss value. The IHOA-BP hidden layer has 15 layers in total; the optimal hidden layer weight Used to connect the input layer and the hidden layer; the optimal initial threshold For hidden layers.
5. A composite hose life loss prediction method according to claim 1, characterized in that: Using the improved scanning factor, a mathematical model for updating the traveler's speed is established according to formula (4), so that the individual travelers maintain an appropriate distance from the leader. (4); In formula (4), is the speed of the i-th traveler at the t-th iteration, is the speed of the i-th traveler at the t-1th iteration, is a number uniformly distributed in the range [0,1]; For the leadership position, is the improved scanning factor of the i-th traveler, is the position of the i-th traveler in the t-th iteration; the traveler position of the improved hiking optimization algorithm is updated by the speed of the i-th traveler in the t-th iteration, and the mathematical model is: (5); In formula (5), is the position of the i-th traveler in the t-th iteration, is the position of the i-th traveler in the t+1-th iteration, is the speed of the i-th traveler at the t-th iteration.
6. A composite hose life loss prediction method according to claim 5, characterized in that: The improved mathematical model of traveler position update of hiking optimization algorithm is used to optimize the hidden layer weight w and initial threshold α of the standard BP neural network prediction model. The specific steps are as follows: S21, first map the traveler's position to the hidden layer weight w and initial threshold α of the standard BP neural network prediction model, and each traveler's position vector It contains all the parameters that need to be optimized in the standard BP neural network prediction model. The search process of the improved hiking optimization algorithm is to search for the optimal hidden layer weight and initial threshold combination in the search space. The mathematical model is: (7); In formula (7), i=1,2,3,...,N max ,N max is the size of the travelers, D is the number of hidden layer weights w, d is the number of initial thresholds α, to is the hidden layer weight value of the standard BP neural network prediction model, to is the initial threshold of the standard BP neural network prediction model; S22. Set the improved hiking optimization algorithm including the size N of the travelers max , problem dimension dim, search space upper bound ub 、 The search space lower bound lb and the maximum number of iterations T, the maximum value of the improved scan factor and the minimum value of the improved scan factor ; Initialize the position of each traveler of the improved hiking optimization algorithm, the mathematical model is: (8); In formula (8), is the position of the i-th traveler in the t-th iteration, and rand is a random number between 0 and 1; S23, using the fitness function to calculate the root mean square error of the life loss prediction value of the composite hose output by the improved BP neural network prediction model, that is, the fitness value, evaluate the quality of each traveler position, that is, the accuracy of the hidden layer weight w and the initial threshold α; record the traveler position corresponding to the minimum fitness value; the fitness function f is: (9); In formula (9), N is the number of samples in the complete feature factor data set, c is the current number of samples, is the predicted life loss value of the cth sample, is the actual life loss value of the cth sample; S24, compare the current number of iterations t with the maximum number of iterations T. If t>T, the traveler position corresponding to the current minimum fitness value, i.e. the leader position Decoded into optimal hidden layer weights and the optimal initial threshold ; Otherwise execute S25; S25, updating the traveler's position using a traveler's position updating mathematical model of an improved hiking optimization algorithm; S26. Increase the current iteration number t by 1, and return to execute S23.
Citation Information
Cited By
Method and system for predicting life loss of petroleum conveying and transferring hose
CN119720808A
Method and system for predicting life loss of petroleum transfer hose
CN119720808B
