Sparrow search algorithm and neural network coupled steel fairlead casting optimization method
The casting process parameters of the cable guide roller are optimized through the method of coupling sparrow search algorithm and neural network, and the problems of many defects and poor quality of finished products in the casting process are solved, and an efficient and economical casting process is achieved, and the production efficiency and finished product quality are improved.
Patent Information
- Application Number
- CN202510030586.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-08
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2045-01-08
Smart Images

Figure CN119830760A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of casting, in particular to a steel cable guide roller casting optimization method coupled with a sparrow search algorithm and a neural network. Background Art
[0002] As a basic ship mooring equipment, the cable roller is used to help ships lower or retrieve anchor chains or cables from the ship. This type of roller usually needs to withstand high-strength tension and friction, and be able to adapt to a variety of weather conditions and marine environments, so the performance requirements of this component are relatively high. The overall structure of the stainless steel cable roller is relatively complex, with thicker walls at the flange and thinner walls at the bottom. In the actual casting production process, it is very easy to produce shrinkage holes, thermal cracks and other defects, resulting in a decrease in its strength and rigidity, and cracks may form in long-term use, greatly reducing the qualified rate of castings.
[0003] At present, in actual production, cable guide rollers usually rely on the production experience of technicians to improve process parameters and continuously conduct trial production adjustments, which makes the product development cycle long and the cost high. At the same time, due to the complexity and uncertainty of the casting process, the process solution after trial and error adjustment may not be the optimal solution.
[0004] Therefore, the present invention proposes a stainless steel cable guide roller casting process optimization method that couples a sparrow search algorithm with a neural network. Compared with the traditional process parameter optimization method, this method converges quickly and produces accurate results when optimizing nonlinear casting process parameter inputs. It can help companies reduce development costs and improve production efficiency while ensuring the quality of finished castings. Summary of the invention
[0005] In view of the problems that it is difficult to effectively eliminate casting defects by adjusting process parameters based on experience in the actual production process of cable guide rollers, the quality of finished castings is poor, and the development cost is high, the present invention proposes a steel cable guide roller casting optimization method coupling a sparrow search algorithm and a neural network. The optimization method can effectively improve the molding quality of stainless steel cable guide rollers, reduce casting defects, and at the same time reduce development costs and improve production efficiency.
[0006] The present invention adopts the following technical solutions.
[0007] The steel cable guide roller casting optimization method coupled with a sparrow search algorithm and a neural network is characterized in that it comprises the following steps;
[0008] Step 1: Establish a numerical simulation model;
[0009] Step 2: Determine the optimization variables and orthogonal experimental design;
[0010] Step 3: BP neural network model establishment and goodness of fit verification;
[0011] Step 4: Solve the optimization problem through the sparrow search algorithm to obtain the optimal process parameters.
[0012] The steel cable guide roller is made of stainless steel. Step 1 is specifically as follows: a three-dimensional model of a cable guide roller casting system is established in a three-dimensional design software, and the three-dimensional model is converted into a format and imported into a casting numerical simulation software to establish a numerical simulation model of the stainless steel cable guide roller. In step 1, the establishment process of the numerical simulation model includes model repair and inspection, meshing, and definition of materials, properties, and boundary conditions.
[0013] In the step 1, after the numerical simulation model is established, the simulation results are compared with the castings actually produced in the factory to determine whether the location and size of the casting defects are consistent. If they are consistent, step 2 is executed; if they are inconsistent, the numerical simulation model is adjusted until the two are consistent.
[0014] In step 1, the three-dimensional model of the cable guide roller casting system includes castings, molds, runners and reinforcement ribs, such as Figure 2 As shown;
[0015] When building the model, the three-dimensional model was imported into the casting numerical simulation software in stp format to repair and check the model, divide the mesh, and define the materials, properties and boundary conditions. Among them, the casting material was 316L stainless steel, the shell material was zircon refractory material, the shell thickness was 10mm, the interface heat transfer coefficient was set to 750W / (m2·K), the shell roasting temperature was 1050℃, the casting was poured in the positive X direction under gravity, the pouring temperature was 1570℃, the pouring speed was 2kg / s, and the cooling method was air cooling.
[0016] In the model, the diameter of the cable guide roller is 140mm, the width is 190mm, the shaft diameter is 30mm, and the maximum load-bearing weight is about 1000kg.
[0017] In step 2, multiple casting process parameters are selected as optimization variables, and their optimization targets are determined. After determining the value range of each optimization variable, multiple groups of experiments are arranged using orthogonal experimental design, and the corresponding casting quality indicators are calculated through numerical simulation models;
[0018] The optimization variables are the casting process parameters that can be artificially controlled during the casting process, including pouring temperature, shell roasting temperature, pouring speed, and shell thickness. The optimization target is the casting quality index, including defect volume and equivalent stress value. The smaller the defect volume of the casting, the better the quality of the finished casting.
[0019] In step 2, four process parameters, namely, pouring temperature, shell baking temperature, pouring speed and shell thickness, are selected as optimization variables; the optimization target is the shrinkage and shrinkage defect volume of the casting, and the smaller the shrinkage and shrinkage defect volume value, the better the casting quality;
[0020] Multiple groups of experiments are arranged through orthogonal experiments, and the process parameter combinations corresponding to each group of experiments are substituted into the numerical simulation model established in step 1 to calculate the volume value of shrinkage defects.
[0021] In the step three, the steps of establishing the BP neural network model include initializing network parameters, forward propagation, calculating losses and back propagation; the sample inputs of the neural network model are pouring temperature, shell baking temperature, pouring speed, shell thickness, and the output is the volume of shrinkage defects; the goodness of fit is tested by judging the relative error between the predicted value output by the neural network model and the actual value.
[0022] In the BP neural network model of step 3, the number of nodes in the hidden layer is calculated according to the formula Determine, where: l is the number of nodes in the hidden layer, m is the number of nodes in the input layer, n is the number of nodes in the output layer, and k is a constant ranging from 0 to 12;
[0023] In this step, the value range of the number of hidden layer nodes is 3-14. By substituting different numbers of hidden layer nodes, different values of mean square errors are obtained, and the one with the smallest mean square error is selected as the number of hidden layer nodes;
[0024] When l = 7, the minimum mean square error is 3.48×10 -2 , the fitting accuracy is the highest at this time. Finally, the number of hidden layer nodes is determined to be 7, and a 4-7-1-1 neural network model is established. Its topological structure is as follows Figure 4 shown.
[0025] After establishing the BP neural network, the LM algorithm is called as the training function;
[0026] When training the BP neural network, the number of training times is set to 1000, the learning rate is 0.1, and the minimum error of the training target is 1×10 -6 , randomly select 24 groups of data from the 34 groups of experimental data as training samples, and the remaining 10 groups of data are used as test samples;
[0027] Since the variables in the data set vary greatly, the mapminmax function is used to normalize the sample data. The results are as follows: Figure 5 As shown;
[0028] Coefficient of determination R 2 It is 0.95055, which is close to 1, indicating that the prediction error of the neural network model is small and the fitting accuracy is high.
[0029] In step 4, the established BP neural network is used as a mapping model between casting process parameters and casting quality indicators, and the sparrow search algorithm is used to solve the optimization problem to determine the optimal process parameter combination;
[0030] The simplified mathematical model of the optimization problem is shown as follows:
[0031]
[0032] Where W min is the corresponding defect volume output value, X1 is the input pouring temperature, X2 is the shell baking temperature, X3 is the pouring speed, and X4 is the shell thickness;
[0033] When the sparrow search algorithm is used to solve the optimization problem, the position information of the sparrow is represented by the values of each process parameter. The optimal fitness of the sparrow corresponds to the smallest shrinkage and shrinkage cavity defect volume, that is, the quality of the finished casting is the best.
[0034] When the sparrow search algorithm is solved, the optimization is performed in the search domain by simulating the sparrow's foraging and anti-predation behaviors; the sparrow search algorithm used needs to set the population size N, variable dimension m, maximum number of iterations, searcher ratio, guard ratio and safety threshold ST; including the following process steps;
[0035] Step (1), initializing the sparrow search algorithm parameters, the sparrow population size and location information;
[0036] The population size N is 30, the variable dimension m is 4, the maximum number of iterations is 100, the proportion of searchers is 20%, the proportion of guards is 20%, and the safety threshold ST is 0.8;
[0037] Assume that population X N There are N sparrow individuals, and each sparrow position represents a combination of process parameters:
[0038] Where, X N is the position matrix of the sparrow population, m is the variable dimension of the optimization problem. In this step, the variables of the optimization problem include X1 pouring temperature, X2 shell roasting temperature, X3 pouring speed, and X4 shell thickness, so the variable dimension m is set to 4;
[0039] The fitness value matrix F of the sparrow population X :
[0040]
[0041] Where f is the individual fitness value, which is used to describe the quality of the solution corresponding to the position of each sparrow. When the fitness value is optimal, the casting quality under the corresponding process parameter combination is the best.
[0042] Step (2), calculate and sort the individual fitness values, find the individuals with the best fitness values and their positions; in the process of optimizing process parameters, it is necessary to impose boundary constraints on the sparrow positions to ensure that each process parameter is always kept within a certain range, set the variable lower limit lb = [1550103018], and the variable upper limit ub = [15901070312]; perform fitness evaluation on the updated sparrow positions to ensure that all positions are within the boundary range, and then perform fitness value calculation to ensure that all calculations are based on valid process parameter combinations;
[0043] Step (3), according to the ranking, select the sparrow with the best fitness value as the searcher, and the other sparrows as producers, and update their positions;
[0044] According to different foraging characteristics, the sparrow population is divided into searchers, producers and guards; the individual fitness value of the searcher is better, which can obtain food resources first and provide foraging direction for the population. Its position update is shown in the following formula;
[0045]
[0046] In the formula, t is the current iteration number, X p,q is the position information of the pth sparrow in the population in the qth dimension, α is a random number in the range of (0, 1], B is a random number that obeys the normal distribution, V is a 1×m matrix with all elements being 1, t max is the maximum number of iterations, ST∈[0.5,1], R2∈[0,1], are the safety value and warning value respectively. When ST>R2, it means that the current foraging environment is relatively safe, and the searcher can further expand the search range; when ST≤R2, it means that some sparrows have detected potential dangers and sent warning signals to the population, at which time the entire sparrow population will migrate to other safe areas for foraging;
[0047] Assume that sparrows other than searchers are producers. Producers also participate in foraging behavior. When they find a better foraging location, they will give up the current foraging and go to the better location. Their position update is shown in the following formula;
[0048]
[0049] In the formula, is the global worst position of the population at the tth iteration, is the global optimal position of the population at the t+1th iteration, and D is a 1×m matrix with elements of 1 or -1; when p>N / 2, it means that the pth producer has not found food, that is, the fitness value is poor, and it will go to other areas to forage; when p≤N / 2, the pth producer will forage near the current optimal position;
[0050] Step (4), randomly select 20% of the sparrows from the population as sentinels and update their positions;
[0051] In each iteration, 20% of the sparrows will be randomly selected from the population as the proportion of sparrows that are aware of the danger, so that they have the early warning function and update their positions and fitness. The position update of the alerter is shown in the following formula;
[0052]
[0053] In the formula, C is a random number with a value range of [-1, 1], β is the step size control coefficient, which is a normal distribution random number with a variance of 1 and a mean of 0, ε is a very small constant to avoid the denominator being zero, and f p is the individual fitness value, f w is the global optimal fitness value; when f p =f w When f , it means that the sparrows at the center are aware of the danger and will randomly move closer to nearby sparrows to reduce the risk of being preyed upon; when f p ≠f w When , it means that the sparrow individual is at the edge of the population and is easily preyed on, so it needs to move to a safe area;
[0054] Step (5), fitness calculation, if the maximum number of iterations is met, then the optimal fitness value and the corresponding sparrow position information are output;
[0055] When the result does not meet the conditions, repeat steps (2) to (5) until a process parameter combination that meets the requirements is obtained.
[0056] The purpose of the present invention is to address the problems that it is difficult to effectively eliminate casting defects by adjusting process parameters based on experience in the actual production process of cable guide rollers, the quality of finished castings is poor, and the development cost is high. A stainless steel cable guide roller casting process optimization method coupling a sparrow search algorithm and a neural network is proposed. The optimization method can effectively improve the molding quality of stainless steel cable guide rollers, reduce casting defects, and at the same time reduce development costs and improve production efficiency.
[0057] Compared with the prior art, the present invention and its preferred embodiment have the following beneficial effects:
[0058] The present invention proposes a stainless steel cable guide roller casting process optimization method that couples a sparrow search algorithm with a neural network. By combining numerical simulation with an intelligent optimization algorithm, defects of castings are predicted and the probability of defects in castings is reduced. This solves the problem that the current casting production process relies on the experience of engineers, can effectively reduce the development and trial production costs of enterprises, improve production efficiency, and ensure the quality of finished castings. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments:
[0060] Attached Figure 1 It is a schematic diagram of the process of the present invention;
[0061] Attached Figure 2 It is a schematic diagram of a three-dimensional model of a cable guide roller casting and a pouring system of the present invention;
[0062] Attached Figure 3 It is a schematic diagram of the comparison between the simulation and the actual of the cable guide roller casting of the present invention;
[0063] Attached Figure 4 This is a schematic diagram of the BP neural network structure of the present invention;
[0064] Attached Figure 5 A schematic diagram showing the comparison between the predicted value and the actual value of the shrinkage cavity defect volume of the present invention;
[0065] Attached Figure 6 It is a basic flow chart of the sparrow search algorithm of the present invention;
[0066] Attached Figure 7 It is a schematic diagram of the iterative convergence curve of the sparrow search algorithm of the present invention;
[0067] Attached Figure 8 Schematic diagram comparing the distribution of shrinkage and shrinkage defects in castings of the optimized process scheme of the present invention (right part) and the initial process scheme (left part). DETAILED DESCRIPTION
[0068] As shown in the figure, the steel cable guide roller casting optimization method coupled with the sparrow search algorithm and the neural network is characterized by comprising the following steps;
[0069] Step 1: Establish a numerical simulation model;
[0070] Step 2: Determine the optimization variables and orthogonal experimental design;
[0071] Step 3: BP neural network model establishment and goodness of fit verification;
[0072] Step 4: Solve the optimization problem through the sparrow search algorithm to obtain the optimal process parameters.
[0073] The steel cable guide roller is made of stainless steel. Step 1 is specifically as follows: a three-dimensional model of a cable guide roller casting system is established in a three-dimensional design software, and the three-dimensional model is converted into a format and imported into a casting numerical simulation software to establish a numerical simulation model of the stainless steel cable guide roller. In step 1, the establishment process of the numerical simulation model includes model repair and inspection, meshing, and definition of materials, properties, and boundary conditions.
[0074] In the step 1, after the numerical simulation model is established, the simulation results are compared with the castings actually produced in the factory to determine whether the location and size of the casting defects are consistent. If they are consistent, step 2 is executed; if they are inconsistent, the numerical simulation model is adjusted until the two are consistent.
[0075] In step 1, the three-dimensional model of the cable guide roller casting system includes castings, molds, runners and reinforcement ribs, such as Figure 2 As shown;
[0076] When building the model, the three-dimensional model was imported into the casting numerical simulation software in stp format to repair and check the model, divide the mesh, and define the materials, properties and boundary conditions. Among them, the casting material was 316L stainless steel, the shell material was zircon refractory material, the shell thickness was 10mm, the interface heat transfer coefficient was set to 750W / (m2·K), the shell roasting temperature was 1050℃, the casting was poured in the positive X direction under gravity, the pouring temperature was 1570℃, the pouring speed was 2kg / s, and the cooling method was air cooling.
[0077] In the model, the diameter of the cable guide roller is 140mm, the width is 190mm, the shaft diameter is 30mm, and the maximum load-bearing weight is about 1000kg.
[0078] From a macroscopic observation, it is found that the casting has obvious shrinkage defects at the bottom of the working surface. Through simulation, it is found that there are shrinkage defects at the bottom of the working surface and inside the casting, which is consistent with the defect position of the casting actually produced by the factory, such as Figure 3 As shown, the reliability of the simulation parameter settings can be proved.
[0079] In step 2, multiple casting process parameters are selected as optimization variables, and their optimization targets are determined. After determining the value range of each optimization variable, multiple groups of experiments are arranged using orthogonal experimental design, and the corresponding casting quality indicators are calculated through numerical simulation models;
[0080] The optimization variables are the casting process parameters that can be artificially controlled during the casting process, including pouring temperature, shell roasting temperature, pouring speed, and shell thickness. The optimization target is the casting quality index, including defect volume and equivalent stress value. The smaller the defect volume of the casting, the better the quality of the finished casting.
[0081] In step 2, four process parameters, namely, pouring temperature, shell baking temperature, pouring speed and shell thickness, are selected as optimization variables; the optimization target is the shrinkage and shrinkage defect volume of the casting, and the smaller the shrinkage and shrinkage defect volume value, the better the casting quality;
[0082] Multiple groups of experiments are arranged through orthogonal experiments, and the process parameter combinations corresponding to each group of experiments are substituted into the numerical simulation model established in step 1 to calculate the volume value of shrinkage defects.
[0083] The casting process is relatively complex, and the main process parameters include shell thickness, pouring speed, pouring temperature, shell baking temperature, filling time and filling pressure, etc. The combination of different process parameters will affect the molding quality of the parts. The four process parameters of pouring temperature, shell baking temperature, pouring speed and shell thickness are selected as optimization variables.
[0084] The optimization target is the shrinkage and shrinkage defect volume of the casting. The smaller the shrinkage and shrinkage defect volume value, the better the casting quality. The orthogonal test method is used to design a 4-factor 5-level scheme, and the orthogonal table L 25 (5 4 ) Arrange experiments with different factors and levels, as shown in Table 1:
[0085] Table 1 Orthogonal test factor level table
[0086]
[0087] Through orthogonal experiments, 25 groups of experiments were arranged, and the process parameter combinations corresponding to each group of experiments were substituted into the numerical simulation model established in step 1 to calculate the volume value of shrinkage and shrinkage defects. At the same time, in order to ensure the accuracy of subsequent model training, the uniform distribution of sample data and improve the generalization ability of the model, the uniform test table U9(9 6 ), 9 groups of homogenization tests were added to the original 25 groups of tests. The results of the orthogonal test and the homogenization supplementary test are shown in Table 2:
[0088] Table 2 Results of orthogonal test and homogenization supplementary test
[0089]
[0090]
[0091] In the step three, the steps of establishing the BP neural network model include initializing network parameters, forward propagation, calculating losses and back propagation; the sample inputs of the neural network model are pouring temperature, shell baking temperature, pouring speed, shell thickness, and the output is the volume of shrinkage defects; the goodness of fit is tested by judging the relative error between the predicted value output by the neural network model and the actual value.
[0092] In the BP neural network model of step 3, the number of nodes in the hidden layer is calculated according to the formula Determine, where: l is the number of nodes in the hidden layer, m is the number of nodes in the input layer, n is the number of nodes in the output layer, and k is a constant ranging from 0 to 12;
[0093] In this step, the value range of the number of hidden layer nodes is 3-14. By substituting different numbers of hidden layer nodes, different values of mean square errors are obtained, and the one with the smallest mean square error is selected as the number of hidden layer nodes;
[0094] When l = 7, the minimum mean square error is 3.48×10 -2 , the fitting accuracy is the highest at this time. Finally, the number of hidden layer nodes is determined to be 7, and a 4-7-1-1 neural network model is established. Its topological structure is as follows Figure 4 shown.
[0095] After establishing the BP neural network, the LM algorithm is called as the training function;
[0096] When training the BP neural network, the number of training times is set to 1000, the learning rate is 0.1, and the minimum error of the training target is 1×10 -6 , randomly select 24 groups of data from the 34 groups of experimental data as training samples, and the remaining 10 groups of data are used as test samples;
[0097] Since the variables in the data set vary greatly, the mapminmax function is used to normalize the sample data. The results are as follows: Figure 5 As shown;
[0098] Coefficient of determination R 2 It is 0.95055, which is close to 1, indicating that the prediction error of the neural network model is small and the fitting accuracy is high.
[0099] In step 4, the established BP neural network is used as a mapping model between casting process parameters and casting quality indicators, and the sparrow search algorithm is used to solve the optimization problem to determine the optimal process parameter combination;
[0100] The simplified mathematical model of the optimization problem is shown as follows:
[0101]
[0102] Where W min is the corresponding defect volume output value, X1 is the input pouring temperature, X2 is the shell baking temperature, X3 is the pouring speed, and X4 is the shell thickness;
[0103] When the sparrow search algorithm is used to solve the optimization problem, the position information of the sparrow is represented by the values of each process parameter. The optimal fitness of the sparrow corresponds to the smallest shrinkage and shrinkage cavity defect volume, that is, the quality of the finished casting is the best.
[0104] When the sparrow search algorithm is solved, the optimization is performed in the search domain by simulating the sparrow's foraging and anti-predation behaviors; the sparrow search algorithm used needs to set the population size N, variable dimension m, maximum number of iterations, searcher ratio, guard ratio and safety threshold ST; including the following process steps;
[0105] Step (1), initializing the sparrow search algorithm parameters, the sparrow population size and location information;
[0106] The population size N is 30, the variable dimension m is 4, the maximum number of iterations is 100, the proportion of searchers is 20%, the proportion of guards is 20%, and the safety threshold ST is 0.8;
[0107] Assume that population X N There are N sparrow individuals, and each sparrow position represents a combination of process parameters:
[0108] Where, X N is the position matrix of the sparrow population, m is the variable dimension of the optimization problem. In this step, the variables of the optimization problem include X1 pouring temperature, X2 shell roasting temperature, X3 pouring speed, and X4 shell thickness, so the variable dimension m is set to 4;
[0109] The fitness value matrix F of the sparrow population X :
[0110]
[0111] Where f is the individual fitness value, which is used to describe the quality of the solution corresponding to the position of each sparrow. When the fitness value is optimal, the casting quality under the corresponding process parameter combination is the best.
[0112] Step (2), calculate and sort the individual fitness values, find the individuals with the best fitness values and their positions; in the process of optimizing process parameters, it is necessary to impose boundary constraints on the sparrow positions to ensure that each process parameter is always kept within a certain range, set the variable lower limit lb = [1550103018], and the variable upper limit ub = [15901070312]; perform fitness evaluation on the updated sparrow positions to ensure that all positions are within the boundary range, and then perform fitness value calculation to ensure that all calculations are based on valid process parameter combinations;
[0113] Step (3), according to the ranking, select the sparrow with the best fitness value as the searcher, and the other sparrows as producers, and update their positions;
[0114] According to different foraging characteristics, the sparrow population is divided into searchers, producers and guards; the individual fitness value of the searcher is better, which can obtain food resources first and provide foraging direction for the population. Its position update is shown in the following formula;
[0115]
[0116] In the formula, t is the current iteration number, X p,q is the position information of the pth sparrow in the population in the qth dimension, α is a random number in the range of (0, 1], B is a random number that obeys the normal distribution, V is a 1×m matrix with all elements being 1, t max is the maximum number of iterations, ST∈[0.5,1], R2∈[0,1], are the safety value and warning value respectively. When ST>R2, it means that the current foraging environment is relatively safe, and the searcher can further expand the search range; when ST≤R2, it means that some sparrows have detected potential dangers and sent warning signals to the population, at which time the entire sparrow population will migrate to other safe areas for foraging;
[0117] Assume that sparrows other than searchers are producers. Producers also participate in foraging behavior. When they find a better foraging location, they will give up the current foraging and go to the better location. Their position update is shown in the following formula;
[0118]
[0119] In the formula, is the global worst position of the population at the tth iteration, is the global optimal position of the population at the t+1th iteration, and D is a 1×m matrix with elements of 1 or -1; when p>N / 2, it means that the pth producer has not found food, that is, the fitness value is poor, and it will go to other areas to forage; when p≤N / 2, the pth producer will forage near the current optimal position;
[0120] Step (4), randomly select 20% of the sparrows from the population as sentinels and update their positions;
[0121] In each iteration, 20% of the sparrows will be randomly selected from the population as the proportion of sparrows that are aware of the danger, so that they have the early warning function and update their positions and fitness. The position update of the alerter is shown in the following formula;
[0122]
[0123] In the formula, C is a random number with a value range of [-1, 1], β is the step size control coefficient, which is a normal distribution random number with a variance of 1 and a mean of 0, ε is a very small constant to avoid the denominator being zero, and f p is the individual fitness value, f w is the global optimal fitness value; when f p =f w When f , it means that the sparrows at the center are aware of the danger and will randomly move closer to nearby sparrows to reduce the risk of being preyed upon; when f p ≠f w When , it means that the sparrow individual is at the edge of the population and is easily preyed on, so it needs to move to a safe area;
[0124] Step (5), fitness calculation, if the maximum number of iterations is met, then the optimal fitness value and the corresponding sparrow position information are output;
[0125] When the result does not meet the conditions, repeat steps (2) to (5) until a process parameter combination that meets the requirements is obtained.
[0126] Figure 7 The figure shows the convergence of the optimal fitness value in the process of the sparrow search algorithm. It can be seen that as the number of iterations increases, the fitness value gradually decreases. After multiple iterations, the fitness value tends to 0.726, and the optimal process parameter combination is obtained: pouring temperature 1089℃, shell baking temperature 1069℃, pouring speed 1kg·s -1 , shell thickness is 9mm, at this time the predicted value of shrinkage cavity defect volume is 0.726cm 3 .
[0127] Numerical simulation was carried out based on the optimal process parameter combination, and the results are shown in Table 3. The relative error between the predicted value and the actual value of the shrinkage cavity defect volume is 4.3%, which can illustrate the reliability of this optimization method.
[0128] Table 3 Comparison of initial and optimized process results
[0129]
[0130] After optimization, the shrinkage cavity defect volume of the casting is 0.696cm 3 , a reduction of 77.29% compared with the initial process parameter combination. Figure 8 The figure is a schematic diagram comparing the distribution of shrinkage and shrinkage defects between the initial process solution (left part) and the optimized process solution (right part). The defect volume of the optimized casting is significantly reduced, and the defect location of the casting is transferred from the product working surface to the pouring system, which has an overall optimizing effect on the quality of the finished casting.
[0131] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art may make various modifications or variations within the scope of the claims, which do not affect the essence of the present invention.
[0132] The parts not involved in the present invention are the same as the prior art or can be implemented by using the prior art.
Claims
1. A steel cable guide roller casting optimization method coupled with a sparrow search algorithm and a neural network, characterized in that: The steps include: Step 1: Establish a numerical simulation model; Step 2: Determine the optimization variables and orthogonal experimental design; Step 3: BP neural network model establishment and goodness of fit verification; Step 4: Solve the optimization problem through the sparrow search algorithm to obtain the optimal process parameters.
2. The steel cable guide roller casting optimization method coupled with a sparrow search algorithm and a neural network according to claim 1 is characterized in that: The steel cable guide roller is made of stainless steel. Step 1 is specifically as follows: a three-dimensional model of a cable guide roller casting system is established in a three-dimensional design software, and the three-dimensional model is converted into a format and imported into a casting numerical simulation software to establish a numerical simulation model of the stainless steel cable guide roller. In step 1, the establishment process of the numerical simulation model includes model repair and inspection, meshing, and definition of materials, properties, and boundary conditions. In the step 1, after the numerical simulation model is established, the simulation results are compared with the castings actually produced in the factory to determine whether the location and size of the casting defects are consistent. If they are consistent, step 2 is executed; if they are inconsistent, the numerical simulation model is adjusted until the two are consistent.
3. The steel cable guide roller casting optimization method coupled with a sparrow search algorithm and a neural network according to claim 2 is characterized in that: In step 1, the three-dimensional model of the cable guide roller casting system includes castings, molds, runners and reinforcement ribs; When building the model, the three-dimensional model is imported into the casting numerical simulation software in stp format to perform model repair and inspection, mesh division, and definition of materials, properties, and boundary conditions. Among them, 316L stainless steel is selected as the casting material, and zircon refractory material is selected as the shell material. The casting is poured in the positive X direction under the action of gravity, and the cooling method is air cooling.
4. The steel cable guide roller casting optimization method of sparrow search algorithm and neural network coupling according to claim 2 is characterized in that: In step 2, multiple casting process parameters are selected as optimization variables, and their optimization targets are determined. After determining the value range of each optimization variable, multiple groups of experiments are arranged using orthogonal experimental design, and the corresponding casting quality indicators are calculated through numerical simulation models; The optimization variables are the casting process parameters that can be artificially controlled during the casting process, including pouring temperature, shell roasting temperature, pouring speed, and shell thickness. The optimization target is the casting quality index, including defect volume and equivalent stress value. The smaller the defect volume of the casting, the better the quality of the finished casting.
5. The method for optimizing steel cable guide roller casting by coupling the sparrow search algorithm and the neural network according to claim 4 is characterized in that: In step 2, four process parameters, namely, pouring temperature, shell baking temperature, pouring speed and shell thickness, are selected as optimization variables; the optimization target is the shrinkage and shrinkage defect volume of the casting, and the smaller the shrinkage and shrinkage defect volume value, the better the casting quality; Multiple groups of experiments are arranged through orthogonal experiments, and the process parameter combinations corresponding to each group of experiments are substituted into the numerical simulation model established in step 1 to calculate the volume value of shrinkage defects.
6. The method for optimizing steel cable guide roller casting by coupling the sparrow search algorithm and the neural network according to claim 5, characterized in that: In the step three, the steps of establishing the BP neural network model include initializing network parameters, forward propagation, calculating losses and back propagation; the sample inputs of the neural network model are pouring temperature, shell baking temperature, pouring speed, shell thickness, and the output is the volume of shrinkage defects; the goodness of fit is tested by judging the relative error between the predicted value output by the neural network model and the actual value.
7. The method for optimizing steel cable guide roller casting by coupling the sparrow search algorithm and the neural network according to claim 6 is characterized in that: In the BP neural network model of step 3, the number of nodes in the hidden layer is calculated according to the formula Determine, where: l is the number of nodes in the hidden layer, m is the number of nodes in the input layer, n is the number of nodes in the output layer, and k is a constant ranging from 0 to 12; In this step, the value range of the number of hidden layer nodes is 3-14. By substituting different numbers of hidden layer nodes, different values of mean square errors are obtained, and the one with the smallest mean square error is selected as the number of hidden layer nodes.
8. The method for optimizing steel cable guide roller casting by coupling the sparrow search algorithm and the neural network according to claim 7, characterized in that: After establishing the BP neural network, the LM algorithm is called as the training function; When training the BP neural network, the mapminmax function is used to normalize the sample data.
9. The method for optimizing steel cable guide roller casting by coupling the sparrow search algorithm and the neural network according to claim 6, characterized in that: In step 4, the established BP neural network is used as a mapping model between casting process parameters and casting quality indicators, and the sparrow search algorithm is used to solve the optimization problem to determine the optimal process parameter combination; The simplified mathematical model of the optimization problem is shown as follows: Where W min is the corresponding defect volume output value, X1 is the input pouring temperature, X2 is the shell baking temperature, X3 is the pouring speed, and X4 is the shell thickness; When the sparrow search algorithm is used to solve the optimization problem, the position information of the sparrow is represented by the values of each process parameter. The optimal fitness of the sparrow corresponds to the smallest shrinkage and shrinkage cavity defect volume, that is, the quality of the finished casting is the best.
10. The method for optimizing steel cable guide roller casting by coupling the sparrow search algorithm and the neural network according to claim 9, characterized in that: When the sparrow search algorithm is solved, the optimization is performed in the search domain by simulating the sparrow's foraging and anti-predation behaviors; the sparrow search algorithm used needs to set the population size N, the variable dimension m, the maximum number of iterations, the proportion of searchers, the proportion of guards and the safety threshold ST; The process steps include: Step (1), initializing the sparrow search algorithm parameters, the sparrow population size and location information; Assume that population X N There are N sparrow individuals, and each sparrow position represents a combination of process parameters: Where, X N is the position matrix of the sparrow population, m is the variable dimension of the optimization problem. In this step, the variables of the optimization problem include X1 pouring temperature, X2 shell roasting temperature, X3 pouring speed, and X4 shell thickness, so the variable dimension m is set to 4; The fitness value matrix F of the sparrow population X : In the formula, f is the individual fitness value, which is used to describe the quality of the solution corresponding to the position of each sparrow. When the fitness value is optimal, the casting quality under the corresponding process parameter combination is the best; Step (2), calculate and sort the individual fitness values, and find the individual with the best fitness value and its position; In the process of optimizing process parameters, it is necessary to set boundary constraints on the sparrow positions to ensure that each process parameter is always within the predetermined range. Set the variable lower limit lb = [1550103018] and the variable upper limit ub = [15901070312]; perform fitness evaluation on the updated sparrow positions to ensure that all positions are within the boundary range, and then calculate the fitness value to ensure that all calculations are based on valid process parameter combinations; Step (3), according to the ranking, select the sparrow with the best fitness value as the searcher, and the other sparrows as producers, and update their positions; According to different foraging characteristics, the sparrow population is divided into searchers, producers and guards; the individual fitness value of the searcher is better, which can obtain food resources first and provide foraging direction for the population. Its position update is shown in the following formula; In the formula, t is the current iteration number, X p,q is the position information of the pth sparrow in the population in the qth dimension, α is a random number in the range of (0, 1], B is a random number that obeys the normal distribution, V is a 1×m matrix with all elements being 1, t max is the maximum number of iterations, ST∈[0.5,1], R2∈[0,1], are the safety value and warning value respectively. When ST>R2, it means that the current foraging environment is relatively safe, and the searcher can further expand the search range; when ST≤R2, it means that some sparrows have detected potential dangers and sent warning signals to the population, at which time the entire sparrow population will migrate to other safe areas for foraging; Assume that sparrows other than searchers are producers. Producers also participate in foraging behavior. When they find a better foraging location, they will give up the current foraging and go to the better location. Their position update is shown in the following formula; In the formula, is the global worst position of the population at the tth iteration, is the global optimal position of the population at the t+1th iteration, and D is a 1×m matrix with elements of 1 or -1; when p>N / 2, it means that the pth producer has not found food, that is, the fitness value is poor, and it will go to other areas to forage; when p≤N / 2, the pth producer will forage near the current optimal position; Step (4), randomly select 20% of the sparrows from the population as sentinels and update their positions; in each iteration, randomly select 20% of the sparrows from the population as the proportion of sparrows aware of danger, so that they have an early warning function and update their positions and fitness. The position update of the sentinels is shown in the following formula; In the formula, C is a random number with a value range of [-1, 1], β is the step size control coefficient, which is a normal distribution random number with a variance of 1 and a mean of 0, ε is a very small constant to avoid the denominator being zero, and f p is the individual fitness value, f w is the global optimal fitness value; when f p =f w When f , it means that the sparrows at the center are aware of the danger and will randomly move closer to nearby sparrows to reduce the risk of being preyed upon; when f p ≠f w When , it means that the sparrow individual is at the edge of the population and is easily preyed on, so it needs to move to a safe area; Step (5), fitness calculation, if the maximum number of iterations is met, then the optimal fitness value and the corresponding sparrow position information are output; When the result does not meet the conditions, repeat steps (2) to (5) until a process parameter combination that meets the requirements is obtained.
Citation Information
Patent Citations
Air quality index prediction method based on improved sparrow search algorithm optimization
CN115374689A
Two-stage optimized extrusion casting process parameter optimization design method
CN116522747A
Direct current (DC) / DC converter fault diagnosis method and system based on improved sparrow search algorithm
US20230394316A1
Cited By
Centrifugal casting process parameter optimization method based on neural network and casting equipment
CN121234782A