Data-driven gear transmission life optimization method and device and storage medium
Through the data-driven method, using metaheuristic algorithms and random forest prediction models, the combination of variables to be optimized for gears is optimized, which solves the time and space difficulties in gear transmission life optimization, achieves more efficient design and manufacturing, and extends the gear transmission life.
Patent Information
- Application Number
- CN202510004775.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-02
- Publication Date
- 2025-05-06
AI Technical Summary
The prior art faces time and space difficulties in optimizing gear transmission life, and the huge solution space leads to low design and manufacturing efficiency.
Using a data-driven method, the combination of variables to be optimized for gears is optimized through metaheuristic algorithms and random forest prediction models to achieve optimization of gear transmission life.
Within feasible time and space, find the solution as close to the best possible solution, improve gear design and manufacturing efficiency, and extend the gear transmission life.
Smart Images

Figure CN119940053A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a data-driven gear transmission life optimization method, a computer device and a storage medium. Background Art
[0002] Gears are important components in the mechanical transmission process. Gear sets can achieve functions such as changing speed, torque and direction of movement. They are widely used in various mechanical systems and play a key role. The fatigue life of gears directly determines the life of the entire mechanical system, so it is very important to optimize the fatigue life of gears in gear design. Designing high-quality gears for specific operating conditions can effectively extend the service life of mechanical equipment and ensure the safety and reliability of equipment.
[0003] Since gears have a certain mechanical structure, are manufactured using specific materials and processes, and work in a certain environment, a gear will have multiple parameters in terms of gear structure, material process, and working conditions. These parameters will affect the transmission life of the gear. The transmission life of the gear can be predicted by a known combination of parameter values, or a specific combination of parameter values can be designed to achieve the expected transmission life of the gear, thereby optimizing the gear transmission life. However, these parameters have different values, which will form a huge number of value combinations, that is, the solution space is very large, which will bring time and space difficulties to the optimization of gear transmission life. Summary of the invention
[0004] In view of the current technical problems such as time and space difficulties in optimizing the life of gear transmissions, the purpose of the present invention is to provide a data-driven gear transmission life optimization method, a computer device and a storage medium.
[0005] In one aspect, an embodiment of the present invention includes a data-driven gear transmission life optimization method, the data-driven gear transmission life optimization method comprising the following steps:
[0006] Obtaining a variable combination to be optimized of the gear to be optimized; the variable combination to be optimized includes a plurality of variables to be optimized;
[0007] Performing multiple initialization assignments on the variable combination to be optimized to obtain multiple particles; the particles include a position vector and a velocity vector, and the initial values of the position vector and the velocity vector are obtained by the initialization assignment;
[0008] Perform multiple rounds of iterative updating processes on each particle until an iterative end condition is met; in any round of iterative updating process, update the individual optimal position of each particle and the global optimal position of all particles, and update the position vector and the velocity vector of each particle according to the updated individual optimal position and the global optimal position;
[0009] According to the execution results of each round of the iterative update process, the optimal value of the combination of variables to be optimized is determined.
[0010] Further, the obtaining of the combination of variables to be optimized of the gear to be optimized includes:
[0011] The normal modulus, helix angle, rotation speed, torque, lubricant viscosity and sine wave roughness amplitude are respectively used as the variables to be optimized;
[0012] The variables to be optimized are used to form the variable combination to be optimized.
[0013] Furthermore, performing multiple rounds of iterative updating processes on each particle until an iteration end condition is met includes:
[0014] Set an upper limit on the number of iterations;
[0015] After each round of the iterative update process is executed, the total number of rounds of the iterative update process that have been executed is counted;
[0016] When the total number of rounds is equal to or greater than the upper limit of the number of iteration rounds, it is determined that the iteration end condition is met;
[0017] When the total number of rounds is less than the upper limit of the number of iteration rounds, it is determined that the iteration end condition is not met.
[0018] Further, updating the individual optimal position of each particle and the global optimal position of all particles includes:
[0019] For any particle, the position vectors of the particle updated in all the iterative update processes that have been executed are obtained, a fitness function is executed, and the fitness function value corresponding to each position vector is obtained, and the position vector with the largest corresponding fitness function value is used as the individual optimal position of the particle after the update;
[0020] The position vectors of each particle updated in all the iterative update processes that have been executed are obtained, a fitness function is executed, and the fitness function value corresponding to each position vector is obtained, and the position vector with the largest corresponding fitness function value is used as the updated global optimal position.
[0021] Further, the execution of the fitness function includes:
[0022] Build a random forest prediction model;
[0023] For any of the position vectors, the position vector is input into the random forest prediction model for processing, life prediction data output by the random forest prediction model is obtained, and the life prediction data is used as the fitness function value corresponding to the position vector.
[0024] Furthermore, the establishment of a random forest prediction model includes:
[0025] Obtain multiple optimization variable sample data and multiple gear fatigue life sample data to form a training data set;
[0026] Establishing a plurality of feature subsets respectively; the feature subsets include a plurality of partitioning features;
[0027] For any of the feature subsets, a portion of the training data set is obtained to form a training data subset, and the training data subset is divided according to each of the division features in the feature subset, so as to establish a corresponding regression tree;
[0028] The random forest prediction model is constructed with all the regression trees.
[0029] Further, updating the position vector and the velocity vector of each particle according to the updated individual optimal position and the global optimal position includes:
[0030] According to the formula
[0031] V i new =w·V i +c1·r1·(P i -X i )+c2·r2·(GX i ), if V i new <V i max
[0032] V i new =V i max , if V i new ≥V i max
[0033] Calculate; where V i new It is iThe updated velocity vector of each particle is w is the inertia weight, V i It is i The velocity vector of the particle before updating, P i It is i The individual optimal position of particles after update, G is the updated global optimal position, c1 and c2 is the learning factor, r1 and r2 is a random number, V i max The upper speed limit.
[0034] Further, updating the position vector and the velocity vector of each particle according to the updated individual optimal position and the global optimal position includes:
[0035] According to the formula
[0036] X i new =X i +V i new
[0037] Calculate; where X i It is i The position vector of the particle before updating, It is i The updated position vector of each particle.
[0038] On the other hand, an embodiment of the present invention also includes a computer device, including a memory and a processor, the memory is used to store at least one program, and the processor is used to load at least one program to execute the data-driven gear transmission life optimization method in the embodiment.
[0039] On the other hand, an embodiment of the present invention also includes a computer-readable storage medium, which stores a program executable by a processor. When the program executable by the processor is executed by the processor, it is used to execute the data-driven gear transmission life optimization method in the embodiment.
[0040] The beneficial effects of the present invention are as follows: the data-driven gear transmission life optimization method in the embodiment realizes a meta-heuristic algorithm, which can fully search the huge solution space and find a solution that is as close to the optimal solution as possible, so as to obtain the optimal value of a suitable combination of variables to be optimized to guide the design and manufacture of gears, which is conducive to obtaining gears with longer transmission life; since the meta-heuristic algorithm is realized, it is possible to find a solution to the combination of variables to be optimized within a feasible time and space range, thereby improving the design and manufacturing efficiency of the gears. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 A schematic diagram of the steps of a data-driven gear transmission life optimization method in an embodiment;
[0042] Figure 2 A schematic flow chart of a data-driven gear transmission life optimization method using a random forest prediction model in an embodiment;
[0043] Figure 3 Schematic diagram of the structure and principle of the random forest prediction model in the embodiment. DETAILED DESCRIPTION
[0044] Terminology explanation:
[0045] Data-driven is a decision-making method based on data analysis and processing. It collects, analyzes and mines large amounts of data to extract valuable information, thereby predicting future trends, supporting decision-making or optimizing processes. Data-driven methods usually rely on statistics, machine learning, meta-heuristic algorithms and other technologies, and can discover potential laws and patterns from data without clear rules or intuition.
[0046] Regression Tree is a decision tree used for regression problems. The process of building a regression tree mainly includes selecting features for partitioning and recursively splitting data until a certain stopping condition is reached.
[0047] Random Forest (RF) is a machine learning algorithm based on the idea of ensemble learning. It performs classification or regression by constructing a large number of decision trees. Each decision tree is constructed by randomly selecting training data and features, and the final prediction result is obtained by integrating the results of multiple trees.
[0048] In this embodiment, the gear transmission life is the number of working cycles when the gear is predicted or actually fails, which can also be called fatigue life. For the optimization of gear transmission life, an optimization algorithm or a meta-heuristic algorithm can be considered. The optimization algorithm is a deterministic optimization method, including linear programming, integer programming, Newton's method, etc. The optimization algorithm can definitely find the optimal solution to the problem. The optimization algorithm is mostly used for structured and analyzable problems, requiring the objective function, constraints, etc. of the problem to be known. When dealing with large-scale problems in complex scenarios, it is not easy to achieve such conditions, and the computing resources are required to be high. The meta-heuristic algorithm is an algorithm based on intuitive phenomena or empirical constructions in the real world, such as simulated annealing algorithms, genetic algorithms, particle swarm algorithms, etc. These algorithms cannot guarantee the optimal solution, but can give a feasible solution to the problem at an acceptable computing time and space, and make it as close to the optimal as possible. The meta-heuristic algorithm is more flexible and suitable for complex and difficult-to-model problems, and is suitable for problems with a large solution space and no precise analytical method. In the problem of gear fatigue life optimization, due to the large number of design parameters and the large solution space, it is difficult to give an analytical objective function and constraint equation, and it is more suitable to use a meta-heuristic algorithm.
[0049] Based on the above principles, in this embodiment, a data-driven gear transmission life optimization method is provided. Figure 1 , the data-driven gear transmission life optimization method includes the following steps:
[0050] S1. Obtaining a variable combination to be optimized for the gear to be optimized;
[0051] S2. Perform multiple initialization assignments on the combination of variables to be optimized to obtain multiple particles; the particles include a position vector and a velocity vector, and the initial values of the position vector and the velocity vector are obtained by the initialization assignment;
[0052] S3. Perform multiple rounds of iterative update processes on each particle until the iteration end condition is met; in any round of iterative update process, update the individual optimal position of each particle and the global optimal position of all particles, and update the position vector and velocity vector of each particle according to the updated individual optimal position and global optimal position;
[0053] S4. Determine the optimal value of the combination of variables to be optimized based on the execution results of each round of iterative update process.
[0054] Steps S1-S4 are a meta-heuristic algorithm, whose goal is to determine the optimal value of the combination of variables to be optimized, that is, to determine the specific values of multiple variables to be optimized of the gear to be optimized. By manufacturing the gear according to the specific values of these variables to be optimized, a longer gear transmission life can be expected.
[0055] In step S1, the gear to be optimized can be a certain gear or a certain model of gear, and each variable to be optimized of the gear to be optimized is a parameter describing the gear to be optimized from the perspectives of gear structure, material process and working conditions. In this embodiment, after correlation analysis, parameters such as normal module, helix angle, rotation speed, torque, lubricant viscosity and sine wave roughness amplitude are selected as variables to be optimized to form a combination of variables to be optimized. Among them, normal module and helix angle are parameters of gear structure, lubricant viscosity and sine wave roughness amplitude are parameters of material process, and rotation speed and torque are parameters of working conditions.
[0056] In step S2, the combination of variables to be optimized is initialized and assigned multiple times to obtain multiple particles. For example, when parameters such as normal modulus, helix angle, rotation speed, torque, lubricant viscosity and sine wave roughness amplitude are selected as variables to be optimized, the combination of variables to be optimized can be expressed as a 6-dimensional vector in the form of (normal modulus, helix angle, rotation speed, torque, lubricant viscosity, sine wave roughness amplitude), and this 6-dimensional vector can be regarded as a vector representing the position of a particle in the search space, that is, a position vector, and the derivative of this 6-dimensional vector with respect to time (where the time offset can be 1) can be regarded as a vector representing the velocity of a particle in the search space, that is, a velocity vector.
[0057] In step S2, since the combination of variables to be optimized can be expressed in the form of position vectors and velocity vectors, the combination of variables to be optimized can be randomly initialized multiple times, and each initialization assignment will obtain a position vector and velocity vector with specific values, so that each initialization assignment can be initialized to generate a particle. In this embodiment, the combination of variables to be optimized can be initialized 50 times to generate a particle swarm including 50 particles. In this embodiment, the position vector X of the ith particle is i and the velocity vector V i Respectively expressed as:
[0058] X i =[x i1 ,x i2 ,K,x i6 ]
[0059] V i =[v i1 ,v i2 ,K,v i6 ]
[0060] Since it has been initialized, X i and V i All have initial values, and step S3 can be executed to iteratively update the position vector X of each particle. i and the velocity vector V i .
[0061] In step S3, multiple rounds of iterative updating process are performed. Figure 2 After each round of iterative update process is completed, it is determined whether the iteration end condition is met. If the iteration end condition is not met, the next round of iterative update process is executed; if the iteration end condition is met, the next round of iterative update process is no longer executed, the execution of all iterative update processes is terminated, and step S4 is executed.
[0062] In this embodiment, the principle of each round of iterative updating process in step S3 is the same, so one round, for example, the kth round of iterative updating process may be taken as an example for description.
[0063] In the kth round of iterative update process, the individual optimal position of each particle and the global optimal position of all particles are obtained. In this embodiment, in each round of iterative update process, for any particle, the fitness function value of the particle can be calculated according to the position vector of the particle, wherein the larger the fitness function value is, the closer the position vector of the particle is to the optimal solution. Since the goal of this embodiment can be to maximize the transmission life of the gear to be optimized, the specific form of the fitness function value can be the transmission life of the gear to be optimized, and the fitness function f() used to calculate the fitness function value can be a function that predicts the transmission life of the gear to be optimized according to the position vector of the particle.
[0064] In the k-th round of iterative update process, each particle has its individual optimal position. For example, the individual optimal position of the ith particle represents the position vector that can make its fitness function value the largest in all the iterative update processes that have been executed. That is, we can find the fitness function value of the ith particle in the first round of iterative update process, the fitness function value of the second round of iterative update process... the fitness function value of the k-th round of iterative update process, and obtain a total of k fitness function values. Find the maximum value of these k fitness function values, and use the position vector that can calculate this maximum value through the fitness function f() as the individual optimal position of the ith particle after update in the k-th round of iterative update process.
[0065] Specifically, for the i-th particle, if it is known that its individual optimal position determined by the previous k-1 rounds of iterative update process is P i , in the kth round of iterative update process, the position vector of the i-th particle before the update is X i , and can be calculated according to the fitness function f() to get f(X i )>f(P i ), then in the kth round of iterative update process, the individual optimal position P i Update to X i , that is, Pi =X i ; On the contrary, if the calculation results in f(X i )≤f(P i ), then in the kth round of iterative update, the individual optimal position P is maintained i constant.
[0066] In the k-th round of iterative update process, there is a global optimal position G. This global optimal position G represents the position vector that can maximize the fitness function value of all 50 particles in all the iterative update processes that have been executed. That is, we can find the fitness function values of all 50 particles in the first round of iterative update process, the fitness function values of all 50 particles in the second round of iterative update process... The fitness function values of all 50 particles in the k-th round of iterative update process, a total of 50k fitness function values are obtained, and the maximum value of these 50k fitness function values is found, and the position vector that can calculate this maximum value through the fitness function f() is used as the updated global optimal position G in the k-th round of iterative update process.
[0067] Specifically, if it is known that the global optimal positions determined by the previous k-1 rounds of iterative update process are X1, X2, ..., X N In the kth round of iterative update, f(X1), f(X2)…f(X N ), and find the maximum value f(X K )=max(f(X1),d(X2)…f(X N )), find the maximum value f(X K ) holds true for the position vector X K , as the updated global optimal position G, that is, G = X K .
[0068] In the kth round of iterative update process, after obtaining the updated global optimal position G and the updated individual optimal position of each particle (for example, the updated individual optimal position P of the i-th particle i ), the position vector and velocity vector of each particle can be further updated. For example, for the i-th particle, the formula
[0069] V i new =w·V i +c1·r1·(P i -X i )+c2·r2·(GX i ), if V i new <V imax
[0070] V i new =V i max , if V i new ≥V i max
[0071] Calculate. Among them, V i new It is i The updated velocity vector of each particle is w is the inertia weight, V i It is i The velocity vector of the particle before updating, P i It is i The individual optimal position of each particle after update, G is the updated global optimal position, c1 and c2 is the learning factor, r1 and r2 is a random number, V i max The upper speed limit.
[0072] In this embodiment, the inertia weight w The influence of the particle's current velocity vector on the update can be controlled, which helps the particle maintain a certain inertia and reduce the possibility of falling into a local optimum. w The size of is set to 0.5.
[0073] In this embodiment, the learning factor c1 and c2 You can control how particles are attracted to the individual optimal position and the global optimal position. If you want the particles to further explore the individual optimal position, then c1 Set it larger; if you want the particle to explore the direction of the current global optimal position, then c2 Set larger. c1 and c2 Set to 5 and 0.5 respectively.
[0074] In this embodiment, r1 and r2 It is a random number uniformly distributed in the interval [0,1], which is used to increase the randomness of the algorithm and avoid falling into the local optimum.
[0075] In this embodiment, the speed upper limit value V i max The updated velocity vector V of the i-th particle can be limited i newThe size of the particle velocity is too large to reduce the possibility of missing the optimal solution.
[0076] In the kth round of iterative update process, after updating the velocity vectors of each particle (for example, i The updated velocity vector V of the particle i new )After that, update the position vector of each particle.
[0077] For example, for the ith particle, we can use the formula
[0078] X i new =X i +V i new
[0079] Calculate; where X i It is i The position vector of the particle before updating, It is i The updated position vector of each particle.
[0080] In this embodiment, if k=1, that is, in the first round of iterative update process, since there is no previous round of iterative update process, there is no data such as the individual optimal position, the global optimal position, the particle position vector, and the particle velocity vector updated in the previous round of iterative update process, and random values can be used to replace these data.
[0081] After the kth round of iterative update process is executed, it is determined whether the iteration end condition is met. In this embodiment, the iteration end condition can be set to "k reaches the upper limit of the number of iteration rounds k". max ", that is, if k ≥ k max , then it is determined that the iteration end condition is met and the entire iterative update process is terminated; if k < k max , then it is determined that the iteration end condition is not met, and then the k+1th round of iterative update process is executed.
[0082] In this embodiment, it is assumed that a total of R rounds of iterative update processes are performed, and each round of iterative update process will obtain an updated position vector of each particle. In the case of a total of 50 particles, a total of 50R position vectors will be obtained. In step S4, the global optimal solution can be found in all 50R position vectors as the optimized value of the combination of variables to be optimized; or the global optimal solution can be found in the 50 position vectors updated in the last round of iterative update process as the optimized value of the combination of variables to be optimized.
[0083] Specifically, the position vector can be input into the fitness function f() to calculate the fitness function value, and the maximum value among these fitness function values can be found, and the position vector that can obtain the maximum value is used as the optimization value of the combination of variables to be optimized. In this embodiment, the position vector as the optimization value of the combination of variables to be optimized is actually a specific value of a 6-dimensional vector in the form of (normal modulus, helix angle, rotation speed, torque, lubricant viscosity, sine wave roughness amplitude). Designing and manufacturing gears according to the specific values of these parameters is conducive to obtaining gears with longer transmission life.
[0084] The data-driven gear transmission life optimization method in this embodiment implements a meta-heuristic algorithm, which can fully search the huge solution space and find a solution that is as close to the optimal solution as possible, so as to obtain the optimal value of a suitable combination of variables to be optimized to guide the design and manufacture of gears, which is conducive to obtaining gears with longer transmission life; since the meta-heuristic algorithm is implemented, it is possible to find the solution of the combination of variables to be optimized within a feasible time and space range, thereby improving the design and manufacturing efficiency of the gears.
[0085] In this embodiment, during each round of iterative updating in step S3, a fitness function f() is used to calculate a fitness function value according to the position vector of the particle. The meaning of the fitness function value can be to predict the transmission life of the gear to be optimized with the corresponding parameter value according to the position vector of the particle. Therefore, in this embodiment, the transmission life prediction model of the gear to be optimized can be used as the fitness function f().
[0086] If the physical model is used as the fitness function f() for gear life prediction, there are problems such as large amount of calculation, long time consumption, and difficulty in convergence. There is less exploration and application of fatigue life sample data. In order to achieve gear life prediction, the design parameters can only be limited to a small range based on experience, and the meta-heuristic algorithm cannot give full play to its ability to search the solution space. If the problem is simplified and analytical constraints and objective functions are established, and a deterministic optimization method is used to solve the fitness function f(), the solution space will also be huge in the complex case of multiple working conditions and hot mixed lubrication.
[0087] In this embodiment, a data-driven approach can be considered to obtain the fitness function f(). Specifically, the gear fatigue life data samples are first organized into a data set, and a random forest model composed of multiple regression trees is trained to predict fatigue life. Random forests have strong generalization capabilities and can learn distribution characteristics from samples to quickly and accurately predict the fatigue life of gears; they can also obtain better prediction results when data samples are limited. Through the integration of multiple regression trees, each regression tree is trained on a different random subset of the training set, and the random forest model can reduce the overfitting problem and improve the accuracy of the model. The trained random forest model has advantages in speed and accuracy, and can be used as the fitness function or objective function of the metaheuristic algorithm.
[0088] Based on the above principle, in this embodiment, Figure 2 As shown, before executing steps S1-S4, first execute steps P1-P4 to establish a random forest prediction model, and use the random forest prediction model as the fitness function f(), which is applied to the iterative update process of executing step S3 to predict the transmission life of the gear to be optimized according to the position vector.
[0089] In this embodiment, the structure and principle of the random forest prediction model are as follows: Figure 3 See Figure 2 , the steps to build a random forest prediction model include:
[0090] P1. Obtain multiple optimization variable sample data and multiple gear fatigue life sample data to form a training data set;
[0091] P2. Establish multiple feature subsets respectively;
[0092] P3. For any feature subset, obtain a part of the training data set to form a training data subset, divide the training data subset according to each partition feature in the feature subset, and thus establish a corresponding regression tree;
[0093] P4. Construct a random forest prediction model using all regression trees.
[0094] In step P1, the optimized variable sample data and the combination of variables to be optimized have the same data structure, that is, the optimized variable sample data are also data of normal modulus, helix angle, rotation speed, torque, lubricant viscosity, sine wave roughness amplitude, etc. Specifically, for a gear with a known transmission life, its life can be collected to obtain gear fatigue life sample data, and its normal modulus and other data can be collected to obtain optimized variable sample data. By collecting from multiple gears, multiple optimized variable sample data and multiple gear fatigue life sample data can be obtained.
[0095] In step P1, after obtaining the optimized variable sample data and the gear fatigue life sample data, these data can be normalized. Specifically, since the order of magnitude of the six dimensions such as the normal modulus and the helix angle in the optimized variable sample data is relatively close, and the order of magnitude of the gear fatigue life sample data and the optimized variable sample data is quite different, the gear fatigue life sample data can be logarithmically processed. After the processing is completed, the multiple optimized variable sample data and the multiple gear fatigue life sample data are randomly divided into training data sets. D and test dataset T , the division ratio is 8:2. That is, the training data set D and test dataset T It includes multiple optimization variable sample data and corresponding multiple gear fatigue life sample data.
[0096] Step P2. Establish multiple feature subsets respectively, and each feature subset corresponds to a regression tree. Specifically, when constructing a regression tree, select a certain dimension of features in the input for node division. In order to increase the diversity between different regression trees and reduce the variance of the life prediction model, all 6 features in the input vector (normal modulus, helix angle, rotation speed, torque, lubricant viscosity and sine wave roughness amplitude) are not used as possible node division basis. Instead, 4 features are randomly selected when constructing each regression tree to establish feature subsets, which are used as the node division basis of the regression tree. For example, for the first regression tree, the four features of normal modulus, torque, lubricant viscosity and sine wave roughness amplitude are randomly selected to establish a feature subset; for the second regression tree, the four features of helix angle, rotation speed, torque and sine wave roughness amplitude are randomly selected to establish a feature subset; for the third regression tree, the four features of normal modulus, rotation speed, torque and sine wave roughness amplitude are randomly selected to establish a feature subset...
[0097] In step P3, a sub-training data set is constructed for each regression tree. In order to increase the diversity between different regression trees, the construction of the sub-training data set of the i-th regression tree is taken as an example. Di When you use only the training data set obtained in step P1 D 80% of the data is obtained by randomly extracting from the training data set, and this original sub-training data set is called Di0 Assuming the original sub-training dataset Di0 Include n samples, drawn with replacement using the bootstrap method n samples, forming a training data subset for the i-th regression tree Di .
[0098] For any feature subset, a part of the training data set is obtained to form a training data subset, and the training data subset is divided according to each division feature in the feature subset, so as to establish a corresponding regression tree;
[0099] In step P3, each regression tree is constructed. The regression tree is constructed using a top-down greedy recursive scheme. Top-down means starting from all training samples, the training samples are continuously divided into two intervals from the current position. The greedy idea means that each division only considers the current optimal one and does not look back to consider the previous division. The goal of each division is to find the division feature xj and dividing point s The residual sum of squares (RSS) of the partitioned regression tree is minimized. The partition feature is one of the four input features. For example, the first regression tree is one of the normal modulus, torque, lubricant viscosity, and sine wave roughness amplitude. The partition point is a value within the corresponding feature value range. Taking the jth regression tree as an example, assuming that the jth regression tree has the partition feature xj and dividing point s , the two areas after division are:
[0100] R1(j,s)={x|x j <s}
[0101] R2(j,s)={x|x j ≥s}
[0102] The residual sum of squares is calculated as follows:
[0103]
[0104] in, are the prediction results of the j-th regression tree for the optimized variable sample data under the two newly divided areas, yi is the true value of the training sample in the corresponding divided area, that is, the gear fatigue life sample data. The jth regression tree divides the feature area X into J non-overlapping areas R1, ..., R J , for each region R j The samples in give the same prediction result, that is, the average value of the true value of all training samples (gear fatigue life sample data) in this area, and the formula is as follows:
[0105]
[0106] where y i In region R j The true value of the training sample in is the gear fatigue life sample data, and n is the region R j The number of training samples in .
[0107] The partitioning is continued until the information gain of a certain partition is lower than the set threshold or the j-th regression tree reaches the maximum depth limit, and the construction of the j-th regression tree is completed.
[0108] In this embodiment, increasing the depth of the regression tree can improve the model performance, but too much depth will bring problems such as high computational overhead and high memory consumption. Considering the comprehensive performance and efficiency, the maximum depth of each regression tree is set to 10. The loss function adopts the root mean square error loss function, and the expression is as follows:
[0109]
[0110] in, is the predicted value of the regression tree model in the i-th training sample, yi is the corresponding true value. The calculation formula of information gain Gain is as follows:
[0111]
[0112] Where G is the gradient sum of the current partition node, H is the Hessian matrix sum of the current partition node, G L ,G R are the gradients of the left and right child nodes, H L ,H R are the Hessian matrices of the left and right child nodes and γ is the minimum information gain threshold, which is set to 0.5. L ,G R ,H L ,H R The expression is as follows:
[0113]
[0114] Among them, g i is the gradient of the loss function with respect to the predicted value, h i It is the second-order derivative of the loss function to the predicted value, namely the Hessian matrix, and its expression is as follows:
[0115]
[0116] In this embodiment, a total of 300 regression trees are established, and these regression trees form a random forest prediction model. X , if the input vector X The input is processed by the random forest prediction model. The output of the random forest prediction model is shown as follows:
[0117]
[0118] Where M is the total number of regression trees, The input vector for the i-th regression tree XThe processing result.
[0119] After building the random forest prediction model, you can use the mean absolute error (MAE) and R 2 The scores are used as the evaluation indicators of test prediction accuracy, and the expressions are as follows:
[0120]
[0121] in, is the predicted value of the model in the i-th test sample, yi is the corresponding truth value, is the average value of the true value of the test set samples, N is the test set size.
[0122] Calculate the prediction value of the random forest prediction model on the test set and truth value y The root mean square error value is used to determine whether the performance of the random forest prediction model meets the standard. When the MAE value is less than 0.05, R 2 When the score is greater than 0.9, the random forest prediction model is considered to meet the standard and can be used as the fitness function () of the particle swarm algorithm in S3. The predicted value of the random forest model is used to represent the fitness function value of the individual.
[0123] In this embodiment, by using the random forest prediction model as the fitness function f(), the two data-driven methods of the meta-inspiration algorithm and the random forest prediction model can be used in combination, which can give full play to the potential of the model, consider the influence of various parameters such as gear structure, material process and working conditions, and design high-quality gears for specific scenarios in a targeted manner.
[0124] The data-driven gear transmission life optimization method in this embodiment adopts a data-driven method. First, the gear fatigue life data samples are sorted into a data set, and a random forest model composed of multiple regression trees is trained to predict fatigue life. Random forest has a strong generalization ability, can learn distribution characteristics from samples, and quickly and accurately predict the fatigue life of gears; it can also obtain better prediction results when the data samples are limited. Through the integration of multiple regression trees, each regression tree is trained on a different random subset of the training set, and the random forest model can reduce the overfitting problem and improve the accuracy of the model. The trained random forest model has advantages in speed and accuracy, and can be used as the fitness function or objective function of the metaheuristic algorithm. The optimization algorithm then uses the particle swarm algorithm in the metaheuristic algorithm to fully search the huge solution space and find a solution as close to the optimal as possible. The comprehensive use of two data-driven methods can give full play to the potential of the model, consider the influence of multiple parameters such as gear structure, material process and working conditions, and design high-quality gears for specific scenarios in a targeted manner.
[0125] A computer program for executing the data-driven gear transmission life optimization method in the present embodiment can be written and written into a computer device or storage medium. When the computer program is read out and executed, the data-driven gear transmission life optimization method in the present embodiment is executed, thereby achieving the same technical effect as the data-driven gear transmission life optimization method in the embodiment.
[0126] It should be noted that, unless otherwise specified, when a feature is referred to as being "fixed" or "connected" to another feature, it may be directly fixed or connected to the other feature, or it may be indirectly fixed or connected to the other feature. In addition, the descriptions of up, down, left, right, etc. used in the present disclosure are only relative to the relative positional relationship of the components of the present disclosure in the accompanying drawings. The singular forms of "a", "" and "the" used in the present disclosure are also intended to include the plural forms, unless the context clearly indicates other meanings. In addition, unless otherwise defined, all technical and scientific terms used in this embodiment have the same meaning as those generally understood by those skilled in the art. The terms used in the specification of this embodiment are only for describing specific embodiments and are not intended to limit the present invention. The term "and / or" used in this embodiment includes any combination of one or more related listed items.
[0127] It should be understood that, although the term first, second, third etc. may be adopted to describe various elements in the present disclosure, these elements should not be limited to these terms. These terms are only used to distinguish the same type of elements from each other. For example, without departing from the scope of the present disclosure, the first element may also be referred to as the second element, and similarly, the second element may also be referred to as the first element. The use of any and all examples or exemplary language ("for example", "such as" etc.) provided by the present embodiment is only intended to better illustrate embodiments of the present invention, and unless otherwise required, the scope of the present invention will not be limited.
[0128] It should be appreciated that embodiments of the present invention may be implemented or enforced by computer hardware, a combination of hardware and software, or by computer instructions stored in a non-transitory computer-readable memory. The method may be implemented in a computer program using standard programming techniques - including a non-transitory computer-readable storage medium configured with a computer program, wherein the storage medium so configured causes the computer to operate in a specific and predefined manner - according to the methods and drawings described in the specific embodiments. Each program may be implemented in a high-level procedural or object-oriented programming language to communicate with a computer system. However, if desired, the program may be implemented in assembly or machine language. In any case, the language may be a compiled or interpreted language. In addition, the program may be run on a programmed dedicated integrated circuit for this purpose.
[0129] In addition, the operations of the process described in this embodiment may be performed in any suitable order, unless otherwise indicated in this embodiment or otherwise clearly contradicted by the context. The process described in this embodiment (or variations and / or combinations thereof) may be performed under the control of one or more computer systems configured with executable instructions, and may be implemented as a code (e.g., executable instructions, one or more computer programs, or one or more applications) executed on one or more processors in common, by hardware or a combination thereof. A computer program includes a plurality of instructions that may be executed by one or more processors.
[0130] Further, the method can be implemented in any type of computing platform that is operably connected to a suitable computer, including but not limited to a personal computer, a minicomputer, a mainframe, a workstation, a network or distributed computing environment, a separate or integrated computer platform, or in communication with a charged particle tool or other imaging device, etc. Various aspects of the present invention can be implemented in machine-readable code stored on a non-transitory storage medium or device, whether removable or integrated into a computing platform, such as a hard disk, an optical read and / or write storage medium, a RAM, a ROM, etc., so that it can be read by a programmable computer, and when the storage medium or device is read by the computer, it can be used to configure and operate the computer to perform the process described herein. In addition, the machine-readable code, or part thereof, can be transmitted via a wired or wireless network. When such media includes instructions or programs that implement the above steps in conjunction with a microprocessor or other data processor, the invention of this embodiment includes these and other different types of non-transitory computer-readable storage media. When programmed according to the methods and techniques of the present invention, the present invention also includes the computer itself.
[0131] The computer program can be applied to input data to perform the functions of the present embodiment, thereby converting the input data to generate output data stored in a non-volatile memory. The output information can also be applied to one or more output devices such as a display. In a preferred embodiment of the present invention, the converted data represents a physical and tangible object, including a specific visual depiction of the physical and tangible object produced on the display.
[0132] The above are only preferred embodiments of the present invention. The present invention is not limited to the above embodiments. As long as the technical effects of the present invention are achieved by the same means, any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included in the scope of protection of the present invention. Within the scope of protection of the present invention, its technical solutions and / or implementation methods may have various modifications and changes.
Claims
1. A data-driven gear transmission life optimization method, characterized in that: The data-driven gear transmission life optimization method includes: Obtaining a variable combination to be optimized of the gear to be optimized; the variable combination to be optimized includes a plurality of variables to be optimized; Performing multiple initialization assignments on the variable combination to be optimized to obtain multiple particles; the particles include a position vector and a velocity vector, and the initial values of the position vector and the velocity vector are obtained by the initialization assignment; Perform multiple rounds of iterative updating processes on each particle until an iterative end condition is met; in any round of iterative updating process, update the individual optimal position of each particle and the global optimal position of all particles, and update the position vector and the velocity vector of each particle according to the updated individual optimal position and the global optimal position; According to the execution results of each round of the iterative update process, the optimal value of the combination of variables to be optimized is determined.
2. The data-driven gear transmission life optimization method according to claim 1, characterized in that: The step of obtaining a combination of variables to be optimized for the gear to be optimized includes: The normal modulus, helix angle, rotation speed, torque, lubricant viscosity and sine wave roughness amplitude are respectively used as the variables to be optimized; The variables to be optimized are used to form the variable combination to be optimized.
3. The data-driven gear transmission life optimization method according to claim 1, characterized in that: The performing of multiple rounds of iterative updating processes on each particle until an iteration end condition is met includes: Set an upper limit on the number of iterations; After each round of the iterative update process is executed, the total number of rounds of the iterative update process that have been executed is counted; When the total number of rounds is equal to or greater than the upper limit of the number of iteration rounds, it is determined that the iteration end condition is met; When the total number of rounds is less than the upper limit of the number of iteration rounds, it is determined that the iteration end condition is not met.
4. The data-driven gear transmission life optimization method according to claim 1, characterized in that: The updating of the individual optimal position of each particle and the global optimal position of all particles comprises: For any particle, the position vectors of the particle updated in all the iterative update processes that have been executed are obtained, a fitness function is executed, and the fitness function value corresponding to each position vector is obtained, and the position vector with the largest corresponding fitness function value is used as the individual optimal position of the particle after the update; The position vectors of each particle updated in all the iterative update processes that have been executed are obtained, a fitness function is executed, and the fitness function value corresponding to each position vector is obtained, and the position vector with the largest corresponding fitness function value is used as the updated global optimal position.
5. The data-driven gear transmission life optimization method according to claim 4, characterized in that: The execution fitness function comprises: Build a random forest prediction model; For any of the position vectors, the position vector is input into the random forest prediction model for processing, life prediction data output by the random forest prediction model is obtained, and the life prediction data is used as the fitness function value corresponding to the position vector.
6. The data-driven gear transmission life optimization method according to claim 5, characterized in that: The random forest prediction model is established, comprising: Obtain multiple optimization variable sample data and multiple gear fatigue life sample data to form a training data set; Establishing a plurality of feature subsets respectively; the feature subsets include a plurality of partitioning features; For any of the feature subsets, a portion of the training data set is obtained to form a training data subset, and the training data subset is divided according to each of the division features in the feature subset, so as to establish a corresponding regression tree; The random forest prediction model is constructed with all the regression trees.
7. The data-driven gear transmission life optimization method according to claim 4, characterized in that: The updating of the position vector and the velocity vector of each particle according to the updated individual optimal position and the global optimal position comprises: According to the formula V i new =w·V i +c1·r1·(P i -X i )+c2·r2·(GX i ), if V i new <V i max V i new =V i max , if V i new ≥V i max Calculate; where V i new It is i The updated velocity vector of each particle is w is the inertia weight, V i It is i The velocity vector of the particle before updating, P i It is i The individual optimal position of particles after update, G is the updated global optimal position, c1 and c2 is the learning factor, r1 and r2 is a random number, V i max The upper speed limit.
8. The data-driven gear transmission life optimization method according to claim 7, characterized in that: The updating of the position vector and the velocity vector of each particle according to the updated individual optimal position and the global optimal position comprises: According to the formula X i new =X i +V i new Calculate; where X i It is i The position vector of the particle before updating, X i new It is i The updated position vector of each particle.
9. A computer device, characterized in that: It comprises a memory and a processor, the memory is used to store at least one program, and the processor is used to load at least one program to execute the data-driven gear transmission life optimization method described in any one of claims 1-8.
10. A computer-readable storage medium storing a program executable by a processor, characterized in that: The processor-executable program is used to execute the data-driven gear transmission life optimization method described in any one of claims 1-8 when executed by the processor.