Optimization method of steel fairlead roller casting based on sparrow search algorithm and neural network coupling
By combining the sparrow search algorithm and neural network, the casting process of the guide roller was optimized, solving the casting defect problem and achieving efficient improvement in casting quality and reduction in cost.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- FUZHOU UNIV
- Filing Date
- 2025-01-08
- Publication Date
- 2026-06-12
Smart Images

Figure CN119830760B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of casting technology, and in particular to an optimization method for casting steel cable rollers coupled with a sparrow search algorithm and a neural network. Background Technology
[0002] As a basic ship mooring device, guide rollers are used to help ships lower or retrieve anchor chains or cables. These rollers typically need to withstand high tensile and frictional forces and adapt to various weather conditions and marine environments, thus requiring high performance from this component. Stainless steel guide rollers have a relatively complex overall structure, with thicker walls at the flange and thinner walls at the bottom. In actual casting production, this makes them highly susceptible to defects such as shrinkage cavities, hot cracks, etc., leading to a decrease in strength and rigidity. Furthermore, long-term use may result in cracks, significantly reducing the casting yield.
[0003] Currently, in actual production, cable guide rollers typically rely on the production experience of technicians to improve process parameters and continuously conduct trial production and adjustments, resulting in long product development cycles and high costs. Furthermore, due to the complexity and uncertainty of the casting process, the adjusted and trial-and-error process may not be the optimal solution.
[0004] Therefore, this invention proposes a method for optimizing the casting process of stainless steel guide rollers by coupling a sparrow search algorithm and a neural network. Compared with traditional process parameter optimization methods, this method converges rapidly and yields accurate results when optimizing nonlinear casting process parameters. It can help enterprises reduce development costs and improve production efficiency while ensuring the quality of finished castings. Summary of the Invention
[0005] This invention addresses the problem that relying on experience to adjust process parameters during the actual production of cable guide rollers is insufficient to effectively eliminate casting defects, resulting in poor finished product quality and high development costs. It proposes an optimization method for steel cable guide roller casting that couples a sparrow search algorithm with a neural network. This optimization method can effectively improve the forming quality of stainless steel cable guide rollers, reduce casting defects, and simultaneously reduce development costs and increase production efficiency.
[0006] The present invention adopts the following technical solution.
[0007] An optimization method for casting steel cable rollers coupled with a sparrow search algorithm and a neural network, characterized by 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: Establishing the BP neural network model and verifying its goodness of fit;
[0011] Step 4: Solve the optimization problem using the Sparrow Search algorithm to obtain the optimal process parameters.
[0012] The steel cable guide roller is made of stainless steel. Step one specifically involves: creating a three-dimensional model of the cable guide roller casting system in three-dimensional design software, converting the three-dimensional model to a different format, and importing it into casting numerical simulation software to create a numerical simulation model of the stainless steel cable guide roller. In step one, the process of creating the numerical simulation model includes model repair and inspection, mesh generation, and defining materials, properties, and boundary conditions.
[0013] In step one, after establishing the numerical simulation model, the results obtained from the simulation 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 two is executed; if they are inconsistent, the numerical simulation model is adjusted until the two match.
[0014] In step one, the three-dimensional model of the cable guide roller casting system includes the casting, mold, gating system, and reinforcing ribs, such as... Figure 2 As shown;
[0015] When building the model, the 3D model was imported into the casting numerical simulation software in STP format for model repair and inspection, mesh generation, and definition of 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 firing 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 guide roller has a diameter of 140mm, a width of 190mm, a shaft diameter of 30mm, and a maximum load capacity of approximately 1000kg.
[0017] In step two, multiple casting process parameters are selected as optimization variables and their optimization objectives are determined. After determining the value range of each optimization variable, multiple sets 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 casting process parameters that can be artificially controlled during the casting process, including pouring temperature, shell firing temperature, pouring speed, and shell thickness. The optimization objectives are casting quality indicators, 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 two, four process parameters are selected as optimization variables: pouring temperature, shell firing temperature, pouring speed, and shell thickness. The optimization target is the volume of shrinkage porosity and other defects in the casting. The smaller the value of the shrinkage porosity and other defects, the better the quality of the casting.
[0020] Multiple sets of experiments were arranged through orthogonal experiments. The process parameters corresponding to each set of experiments were substituted into the numerical simulation model established in step one to calculate the volume value of shrinkage porosity defects.
[0021] In step three, the steps for establishing the BP neural network model include initializing network parameters, forward propagation, calculating loss, and backpropagation. The sample inputs of the neural network model are casting temperature, shell firing temperature, casting speed, and shell thickness, and the output is the volume of shrinkage cavities. The goodness of fit is judged by the relative error between the predicted value and the actual value output by the neural network model.
[0022] In the BP neural network model of step three, the number of nodes in the hidden layer is determined according to the formula. In the formula: 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 number of hidden layer nodes ranges from 3 to 14. By substituting different numbers of hidden layer nodes, we obtain the mean square error of different values. The one with the smallest mean square error is selected as the number of hidden layer nodes.
[0024] When l=7, the mean square error reaches its minimum value of 3.48×10. -2 At this point, the fitting accuracy is highest. The final number of hidden layer nodes was determined to be 7, and a 4-7-1-1 type neural network model was established, with the following topology: Figure 4 As 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 training iterations are set to 1000, the learning rate to 0.1, and the minimum error of the training objective is 1 × 10⁻⁶. -6 Of the 34 sets of experimental data, 24 sets were randomly selected for training and the remaining 10 sets were used for testing.
[0027] Because the variables in the dataset vary considerably, the mapminmax function is used to normalize the sample data, and the result is as follows: Figure 5 As shown;
[0028] Coefficient of determination R 2 The value is 0.95055, which is close to 1, indicating that the prediction error of this neural network model is small and the fitting accuracy is high.
[0029] In step four, the established BP neural network is used as a mapping model between casting process parameters and casting quality indicators. The sparrow search algorithm is used to solve the optimization problem and determine the optimal combination of process parameters.
[0030] The simplified mathematical model for this optimization problem is shown in the following equation:
[0031]
[0032] In the formula, W min X1 is the input pouring temperature, X2 is the shell firing temperature, X3 is the pouring speed, and X4 is the shell thickness.
[0033] When using the sparrow search algorithm to solve this optimization problem, the location information of the sparrow is represented by the values of each process parameter. The optimal fitness of the sparrow corresponds to the smallest volume of shrinkage porosity defects, which means the best quality of the finished casting.
[0034] When solving the sparrow search algorithm, the search domain is optimized by simulating sparrow 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, vigilant ratio, and safety threshold ST. The process includes the following steps.
[0035] Step (1): Initialize the sparrow search algorithm parameters, 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 vigilants is 20%, and the safety threshold ST is 0.8.
[0037] Assume population X N There are N individual sparrows, and each sparrow's position represents a combination of process parameters:
[0038]
[0039] In the formula, X N Let m be the sparrow population location matrix, and m be the variable dimension of the optimization problem. In this step, the variables of the optimization problem include X1 casting temperature, X2 shell firing temperature, X3 casting speed, and X4 shell thickness. Therefore, the variable dimension m is set to 4.
[0040] Fitness matrix F of sparrow population X :
[0041]
[0042] In the formula, f is the individual fitness value, which describes the quality of the solution corresponding to the position of each sparrow. When the fitness value is optimal, the casting quality under the corresponding combination of process parameters is the best.
[0043] Step (2): Calculate and sort the individual fitness values, and find the individual with the best fitness value and its position;
[0044] During the optimization of process parameters, boundary constraints need to be applied to the sparrow positions to ensure that each process parameter remains within a certain range. The lower limit of the variable is set as lb=[1550, 1030, 1, 8], and the upper limit of the variable is set as ub=[1590, 1070, 3, 12]. The fitness of the updated sparrow positions is evaluated to ensure that all positions are within the boundary range before the fitness value is calculated to ensure that all calculations are based on effective combinations of process parameters.
[0045] Step (3): Select the sparrow with the best fitness value as the searcher according to the sorting, and the other sparrows as producers, and update their positions.
[0046] Based on different foraging characteristics, sparrow populations are divided into forkers, producers, and vigilants. Forkers have better individual fitness values, are able to prioritize food resources and provide foraging directions for the population, and their position updates are shown in the following formula.
[0047]
[0048] In the formula, t is the current iteration number, and X is... p,q Let represent the position of the p-th sparrow in the q-th dimension, α be a random number ranging from (0, 1], B be a random number following a normal distribution, V be a 1×m matrix with all elements being 1, and t be a random number. max Let ST ∈ [0.5,1] and R2 ∈ [0,1], representing the safety value and warning value, respectively. When ST > R2, it means the current foraging environment is relatively safe, and the searchers can further expand the search area; when ST ≤ R2, it means that some sparrows have noticed the potential danger and sent a warning signal to the population, at which point the entire sparrow population will migrate to other safe areas to forage.
[0049] Let the sparrows other than the foragers be the producers. Producers also participate in foraging behavior. When they find a better foraging location, they will abandon the current foraging and go to the better location. Their location update is shown in the following formula.
[0050]
[0051] In the formula, Xt worst is the worst position of the population in the t-th iteration, Xt+1 best is the best position of the population in the (t+1)-th iteration, and D is a 1×m matrix with elements of 1 or -1; when p > N / 2, it means that the p-th producer has not found food, that is, the fitness value is poor, and will go to other areas to forage; when p ≤ N / 2, the p-th producer will forage near the current best position;
[0052] Step (4): Randomly select 20% of the sparrows in the population as watchdogs and update their positions;
[0053] In each iteration, 20% of the sparrows in the population will be randomly selected as the proportion of sparrows that are aware of danger, so that they have the warning function and their position and fitness will be updated. The position update of the vigilant is shown in the following formula.
[0054]
[0055] In the formula, C is a random number ranging from [-1, 1], and β is the step size control coefficient, which is a random number that follows a normal distribution with a variance of 1 and a mean of 0. f is a very small constant to avoid the denominator being zero. p f is the individual fitness value. w The global optimal fitness value; when f p =f w When f indicates that the sparrow in the center is aware of danger, it will randomly move closer to nearby sparrows to reduce its risk of being preyed upon; p ≠f w This indicates that the sparrow is on the edge of the population and is vulnerable to predation, requiring it to move to a safe area.
[0056] Step (5): Fitness calculation. If the maximum number of iterations is satisfied, the optimal fitness value and the corresponding sparrow position information are output.
[0057] If the result does not meet the conditions, repeat steps (2) to (5) until a combination of process parameters that meets the requirements is obtained.
[0058] The purpose of this invention is to address the problem that relying on experience to adjust process parameters in the current actual production of cable guide rollers is insufficient to effectively eliminate casting defects, resulting in poor quality of finished castings and high development costs. This invention proposes an optimization method for the casting process of stainless steel cable guide rollers that couples a sparrow search algorithm with a neural network. This optimization method can effectively improve the forming quality of stainless steel cable guide rollers, reduce casting defects, and simultaneously reduce development costs and increase production efficiency.
[0059] Compared with the prior art, the present invention and its preferred embodiments have the following beneficial effects:
[0060] This invention proposes a method for optimizing the casting process of stainless steel cable rollers by coupling a sparrow search algorithm and a neural network. By combining numerical simulation with intelligent optimization algorithms, the method predicts defects in castings and reduces the probability of defects. This solves the problem that the current casting production process relies on the experience of engineers, effectively reduces the development and trial production costs of enterprises, improves production efficiency, and ensures the quality of finished castings. Attached Figure Description
[0061] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments:
[0062] Appendix Figure 1 This is a schematic flowchart of the method of the present invention;
[0063] Appendix Figure 2 This is a schematic diagram of a three-dimensional model of the cable guide roller casting and casting system of the present invention;
[0064] Appendix Figure 3 This is a schematic diagram comparing the simulation and actual performance of the cable guide roller casting of the present invention;
[0065] Appendix Figure 4 This is a schematic diagram of the BP neural network structure of the present invention;
[0066] Appendix Figure 5 This is a schematic diagram comparing the predicted and actual values of the shrinkage porosity defect volume in this invention.
[0067] Appendix Figure 6 This is a schematic diagram of the basic process of the sparrow search algorithm of the present invention;
[0068] Appendix Figure 7 This is a schematic diagram of the iterative convergence curve of the sparrow search algorithm of the present invention;
[0069] Appendix Figure 8 This is a schematic diagram comparing the distribution of shrinkage porosity and other defects in castings using the optimized process scheme (right part) and the initial process scheme (left part) of this invention. Detailed Implementation
[0070] As shown in the figure, the optimization method for casting steel guide cable rollers coupled with the sparrow search algorithm and neural network is characterized by the following steps;
[0071] Step 1: Establish a numerical simulation model;
[0072] Step 2: Determine the optimization variables and orthogonal experimental design;
[0073] Step 3: Establishing the BP neural network model and verifying its goodness of fit;
[0074] Step 4: Solve the optimization problem using the Sparrow Search algorithm to obtain the optimal process parameters.
[0075] The steel cable guide roller is made of stainless steel. Step one specifically involves: creating a three-dimensional model of the cable guide roller casting system in three-dimensional design software, converting the three-dimensional model to a different format, and importing it into casting numerical simulation software to create a numerical simulation model of the stainless steel cable guide roller. In step one, the process of creating the numerical simulation model includes model repair and inspection, mesh generation, and defining materials, properties, and boundary conditions.
[0076] In step one, after establishing the numerical simulation model, the results obtained from the simulation 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 two is executed; if they are inconsistent, the numerical simulation model is adjusted until the two match.
[0077] In step one, the three-dimensional model of the cable guide roller casting system includes the casting, mold, gating system, and reinforcing ribs, such as... Figure 2 As shown;
[0078] When building the model, the 3D model was imported into the casting numerical simulation software in STP format for model repair and inspection, mesh generation, and definition of 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 firing 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.
[0079] In the model, the guide roller has a diameter of 140mm, a width of 190mm, a shaft diameter of 30mm, and a maximum load capacity of approximately 1000kg.
[0080] Macroscopic observation of the casting revealed significant shrinkage porosity and cavitation defects at the bottom of the working surface. Simulation analysis confirmed the presence of these defects at the bottom of the working surface and within the casting itself, mirroring the location of these defects in actual factory-produced castings. Figure 3 As shown, the reliability of the simulation parameter settings in this simulation can be proven.
[0081] In step two, multiple casting process parameters are selected as optimization variables and their optimization objectives are determined. After determining the value range of each optimization variable, multiple sets of experiments are arranged using orthogonal experimental design, and the corresponding casting quality indicators are calculated through numerical simulation models.
[0082] The optimization variables are casting process parameters that can be artificially controlled during the casting process, including pouring temperature, shell firing temperature, pouring speed, and shell thickness. The optimization objectives are casting quality indicators, including defect volume and equivalent stress value. The smaller the defect volume of the casting, the better the quality of the finished casting.
[0083] In step two, four process parameters are selected as optimization variables: pouring temperature, shell firing temperature, pouring speed, and shell thickness. The optimization target is the volume of shrinkage porosity and other defects in the casting. The smaller the value of the shrinkage porosity and other defects, the better the quality of the casting.
[0084] Multiple sets of experiments were arranged through orthogonal experiments. The process parameters corresponding to each set of experiments were substituted into the numerical simulation model established in step one to calculate the volume value of shrinkage porosity defects.
[0085] The casting process is quite complex, with key process parameters including shell thickness, pouring speed, pouring temperature, shell firing temperature, filling time, and filling pressure. Different combinations of these parameters affect the quality of the formed parts. We selected four process parameters—pouring temperature, shell firing temperature, pouring speed, and shell thickness—as optimization variables.
[0086] The optimization objective is to reduce the volume of shrinkage porosity and voids in the casting; a smaller shrinkage porosity and voids volume indicates better casting quality. An orthogonal experimental design with 4 factors and 5 levels is used, and the orthogonal array L is used to design the scheme. 25 (5 4 Experiments with different factors and levels were arranged, as shown in Table 1:
[0087] Table 1. Factor Level Table for Orthogonal Experiment
[0088]
[0089] Twenty-five orthogonal experimental setups were conducted, and the process parameters corresponding to each experimental setup were substituted into the numerical simulation model established in step one to calculate the volume of shrinkage porosity defects. Simultaneously, to ensure the accuracy of subsequent model training, the uniform distribution of sample data, and to improve the model's generalization ability, a uniform experimental table U9(9) was consulted. 6 In addition to the original 25 sets of experiments, 9 sets of homogenization experiments were added. The results of the orthogonal experiments and the supplementary homogenization experiments are shown in Table 2:
[0090] Table 2 Results of Orthogonal Experiment and Homogenization Supplementary Experiment
[0091]
[0092] In step three, the steps for establishing the BP neural network model include initializing network parameters, forward propagation, calculating loss, and backpropagation. The sample inputs of the neural network model are casting temperature, shell firing temperature, casting speed, and shell thickness, and the output is the volume of shrinkage cavities. The goodness of fit is judged by the relative error between the predicted value and the actual value output by the neural network model.
[0093] In the BP neural network model of step three, the number of nodes in the hidden layer is determined according to the formula. In the formula: 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;
[0094] In this step, the number of hidden layer nodes ranges from 3 to 14. By substituting different numbers of hidden layer nodes, we obtain the mean square error of different values. The one with the smallest mean square error is selected as the number of hidden layer nodes.
[0095] When l=7, the mean square error reaches its minimum value of 3.48×10. -2 At this point, the fitting accuracy is highest. The final number of hidden layer nodes was determined to be 7, and a 4-7-1-1 type neural network model was established, with the following topology: Figure 4 As shown.
[0096] After establishing the BP neural network, the LM algorithm is called as the training function;
[0097] When training the BP neural network, the training iterations are set to 1000, the learning rate to 0.1, and the minimum error of the training objective is 1 × 10⁻⁶. -6 Of the 34 sets of experimental data, 24 sets were randomly selected for training and the remaining 10 sets were used for testing.
[0098] Because the variables in the dataset vary considerably, the mapminmax function is used to normalize the sample data, and the result is as follows: Figure 5 As shown;
[0099] Coefficient of determination R 2 The value is 0.95055, which is close to 1, indicating that the prediction error of this neural network model is small and the fitting accuracy is high.
[0100] In step four, the established BP neural network is used as a mapping model between casting process parameters and casting quality indicators. The sparrow search algorithm is used to solve the optimization problem and determine the optimal combination of process parameters.
[0101] The simplified mathematical model for this optimization problem is shown in the following equation:
[0102]
[0103] In the formula, W min X1 is the input pouring temperature, X2 is the shell firing temperature, X3 is the pouring speed, and X4 is the shell thickness.
[0104] When using the sparrow search algorithm to solve this optimization problem, the location information of the sparrow is represented by the values of each process parameter. The optimal fitness of the sparrow corresponds to the smallest volume of shrinkage porosity defects, which means the best quality of the finished casting.
[0105] When solving the sparrow search algorithm, the search domain is optimized by simulating sparrow 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, vigilant ratio, and safety threshold ST. The process includes the following steps.
[0106] Step (1): Initialize the sparrow search algorithm parameters, sparrow population size, and location information;
[0107] 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 vigilants is 20%, and the safety threshold ST is 0.8.
[0108] Assume population X N There are N individual sparrows, and each sparrow's position represents a combination of process parameters:
[0109]
[0110] In the formula, X N Let m be the sparrow population location matrix, and m be the variable dimension of the optimization problem. In this step, the variables of the optimization problem include X1 casting temperature, X2 shell firing temperature, X3 casting speed, and X4 shell thickness. Therefore, the variable dimension m is set to 4.
[0111] Fitness matrix F of sparrow population X :
[0112]
[0113] In the formula, f is the individual fitness value, which describes the quality of the solution corresponding to the position of each sparrow. When the fitness value is optimal, the casting quality under the corresponding combination of process parameters is the best.
[0114] Step (2): Calculate and sort the individual fitness values, and find the individual with the best fitness value and its position;
[0115] During the optimization of process parameters, boundary constraints need to be applied to the sparrow positions to ensure that each process parameter remains within a certain range. The lower limit of the variable is set as lb=[1550, 1030, 1, 8], and the upper limit of the variable is set as ub=[1590, 1070, 3, 12]. The fitness of the updated sparrow positions is evaluated to ensure that all positions are within the boundary range before the fitness value is calculated to ensure that all calculations are based on effective combinations of process parameters.
[0116] Step (3): Select the sparrow with the best fitness value as the searcher according to the sorting, and the other sparrows as producers, and update their positions.
[0117] Based on different foraging characteristics, sparrow populations are divided into forkers, producers, and vigilants. Forkers have better individual fitness values, are able to prioritize food resources and provide foraging directions for the population, and their position updates are shown in the following formula.
[0118]
[0119] In the formula, t is the current iteration number, and X is... p,q Let represent the position of the p-th sparrow in the q-th dimension, α be a random number ranging from (0, 1], B be a random number following a normal distribution, V be a 1×m matrix with all elements being 1, and t be a random number. max Let ST ∈ [0.5,1] and R2 ∈ [0,1], representing the safety value and warning value, respectively. When ST > R2, it means the current foraging environment is relatively safe, and the searchers can further expand the search area; when ST ≤ R2, it means that some sparrows have noticed the potential danger and sent a warning signal to the population, at which point the entire sparrow population will migrate to other safe areas to forage.
[0120] Let the sparrows other than the foragers be the producers. Producers also participate in foraging behavior. When they find a better foraging location, they will abandon the current foraging and go to the better location. Their location update is shown in the following formula.
[0121]
[0122] In the formula, Xt worst is the worst position of the population in the t-th iteration, Xt+1 best is the best position of the population in the (t+1)-th iteration, and D is a 1×m matrix with elements of 1 or -1; when p > N / 2, it means that the p-th producer has not found food, that is, the fitness value is poor, and will go to other areas to forage; when p ≤ N / 2, the p-th producer will forage near the current best position;
[0123] Step (4): Randomly select 20% of the sparrows in the population as watchdogs and update their positions;
[0124] In each iteration, 20% of the sparrows in the population will be randomly selected as the proportion of sparrows that are aware of danger, so that they have the warning function and their position and fitness will be updated. The position update of the vigilant is shown in the following formula.
[0125]
[0126] In the formula, C is a random number ranging from [-1, 1], and β is the step size control coefficient, which is a random number that follows a normal distribution with a variance of 1 and a mean of 0. f is a very small constant to avoid the denominator being zero. p f is the individual fitness value. w The global optimal fitness value; when f p =f w When f indicates that the sparrow in the center is aware of danger, it will randomly move closer to nearby sparrows to reduce its risk of being preyed upon; p ≠f w This indicates that the sparrow is on the edge of the population and is vulnerable to predation, requiring it to move to a safe area.
[0127] Step (5): Fitness calculation. If the maximum number of iterations is satisfied, the optimal fitness value and the corresponding sparrow position information are output.
[0128] If the result does not meet the conditions, repeat steps (2) to (5) until a combination of process parameters that meets the requirements is obtained.
[0129] Figure 7 The convergence of the optimal fitness value during the Sparrow Search algorithm optimization process shows that the fitness value gradually decreases with the increase of the number of iterations. After multiple iterations, the fitness value approaches 0.726, yielding the optimal combination of process parameters: casting temperature 1089℃, shell firing temperature 1069℃, and casting speed 1 kg∙s. -1 With a shell thickness of 9mm, the predicted volume of shrinkage cavities is 0.726cm³. 3 .
[0130] Numerical simulations were performed based on the optimal combination of process parameters, and the results are shown in Table 3. The relative error between the predicted and actual values of shrinkage porosity defect volume is 4.3%, which demonstrates the reliability of this optimization method.
[0131] Table 3 Comparison of results between initial and optimized process schemes
[0132]
[0133] After optimization, the volume of shrinkage porosity defects in the casting is 0.696 cm³. 3 Compared with the initial combination of process parameters, it was reduced by 77.29%. Figure 8 This diagram shows a comparison of the distribution of shrinkage porosity and shrinkage cavity defects between the initial process scheme (left part) and the optimized process scheme (right part). The volume of defects in the casting is significantly reduced after optimization, and the location of defects in the casting is transferred from the working surface of the product to the gating system, which has an overall effect on optimizing the quality of the finished casting.
[0134] The specific embodiments of the present invention have been described above. It should be understood that the present invention is not limited to the specific embodiments described above, and those skilled in the art can make various modifications or variations within the scope of the claims, which do not affect the essence of the present invention.
[0135] All parts not covered in this invention are the same as or can be implemented using existing technologies.
Claims
1. An optimization method for casting steel cable rollers coupled with a sparrow search algorithm and a neural network, characterized in that: Includes the following steps; Step 1: Establish a numerical simulation model; Step 2: Determine the optimization variables and orthogonal experimental design; Step 3: Establishing the BP neural network model and verifying its goodness of fit; Step 4: Solve the optimization problem using the Sparrow Search algorithm to obtain the optimal process parameters; In step two, multiple casting process parameters are selected as optimization variables and their optimization objectives are determined. After determining the value range of each optimization variable, multiple sets of experiments are arranged using orthogonal experimental design, and the corresponding casting quality indicators are calculated through numerical simulation models. The optimization variables are casting process parameters that can be artificially controlled during the casting process, including pouring temperature, shell firing temperature, pouring speed, and shell thickness. The optimization objectives are casting quality indicators, including defect volume and equivalent stress value. The smaller the defect volume of the casting, the better the quality of the finished casting. In step three, the steps for establishing the BP neural network model include initializing network parameters, forward propagation, calculating loss, and back propagation. The sample inputs of the neural network model are casting temperature, shell firing temperature, casting speed, and shell thickness, and the output is the volume of shrinkage cavities. The goodness of fit is judged by the relative error between the predicted value and the actual value output by the neural network model. In the BP neural network model of step three, the number of nodes in the hidden layer is determined according to the formula. In the formula: 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 number of hidden layer nodes ranges from 3 to 14. By substituting different numbers of hidden layer nodes, we obtain the mean square error of different values. The one with the smallest mean square error is selected as the number of hidden layer nodes. After establishing the BP neural network, the LM algorithm is called as the training function; When training a BP neural network, the mapminmax function is used to normalize the sample data. In step four, the established BP neural network is used as a mapping model between casting process parameters and casting quality indicators. The sparrow search algorithm is used to solve the optimization problem and determine the optimal combination of process parameters. The simplified mathematical model for this optimization problem is shown in the following equation: wherein W min is the corresponding defect volume output value, X1 is the input pouring temperature, X2 is the mold shell baking temperature, X3 is the pouring speed, and X4 is the mold shell thickness; When using the sparrow search algorithm to solve this optimization problem, the location information of the sparrow is represented by the values of each process parameter. The optimal fitness of the sparrow corresponds to the smallest volume of shrinkage porosity defects, which means the best quality of the finished casting.
2. The method for optimizing steel cable roller casting by coupling the sparrow search algorithm and neural network according to claim 1, characterized in that: The steel cable guide roller is made of stainless steel. Step one specifically involves: creating a three-dimensional model of the cable guide roller casting system in three-dimensional design software, converting the three-dimensional model to a different format, and importing it into casting numerical simulation software to create a numerical simulation model of the stainless steel cable guide roller. In step one, the process of creating the numerical simulation model includes model repair and inspection, mesh generation, and defining materials, properties, and boundary conditions. In step one, after establishing the numerical simulation model, the results obtained from the simulation 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 two is executed; if they are inconsistent, the numerical simulation model is adjusted until the two match.
3. The method for optimizing steel cable roller casting by coupling the sparrow search algorithm and neural network according to claim 1, characterized in that: In step one, the three-dimensional model of the cable guide roller casting system includes the casting, mold, gating system, and reinforcing ribs; When building the model, the 3D model is imported into the casting numerical simulation software in STP format for model repair and inspection, mesh generation, and definition of materials, properties and boundary conditions. Among them, 316L stainless steel is selected for the casting material, zircon refractory material is selected for 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 method for optimizing steel cable roller casting by coupling the sparrow search algorithm and neural network according to claim 1, characterized in that: In step two, four process parameters are selected as optimization variables: pouring temperature, shell firing temperature, pouring speed, and shell thickness. The optimization target is the volume of shrinkage porosity and other defects in the casting. The smaller the value of the shrinkage porosity and other defects, the better the quality of the casting. Multiple sets of experiments were arranged through orthogonal experiments. The process parameters corresponding to each set of experiments were substituted into the numerical simulation model established in step one to calculate the volume value of shrinkage porosity defects.
5. The method for optimizing steel cable roller casting by coupling the sparrow search algorithm and neural network according to claim 1, characterized in that: When solving the sparrow search algorithm, the search domain is optimized by simulating the foraging and anti-predation behavior of sparrows. 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. The process includes the following steps; Step (1): Initialize the sparrow search algorithm parameters, sparrow population size, and location information; Assume population X N There are N individual sparrows, and each sparrow's position represents a combination of process parameters: In the formula, X N Let m be the sparrow population location matrix, and m be the variable dimension of the optimization problem. In this step, the variables of the optimization problem include X1 casting temperature, X2 shell firing temperature, X3 casting speed, and X4 shell thickness. Therefore, the variable dimension m is set to 4. Fitness matrix F of sparrow population X : In the formula, f is the individual fitness value, which describes the quality of the solution corresponding to the position of each sparrow. When the fitness value is optimal, the casting quality under the corresponding combination of process parameters is the best. Step (2): Calculate and sort the individual fitness values, and find the individual with the best fitness value and its position; During the optimization of process parameters, boundary constraints need to be applied to the position of the sparrow to ensure that each process parameter is always kept within the predetermined range. The lower limit of the variable is set as lb=[1550, 1030, 1, 8], and the upper limit of the variable is set as ub=[1590, 1070, 3, 12]. The updated sparrow positions are evaluated for fitness to ensure that all positions are within the boundary range before fitness values are calculated to ensure that all calculations are based on effective combinations of process parameters. Step (3): Select the sparrow with the best fitness value as the searcher according to the sorting, and the other sparrows as producers, and update their positions. Based on different foraging characteristics, sparrow populations are divided into forkers, producers, and vigilants. Forkers have better individual fitness values, are able to prioritize food resources and provide foraging directions for the population, and their position updates are shown in the following formula. In the formula, t is the current iteration number, and X is... p,q Let represent the position of the p-th sparrow in the q-th dimension, α be a random number ranging from (0, 1], B be a random number following a normal distribution, V be a 1×m matrix with all elements being 1, and t be a random number. max The maximum number of iterations is given by ST∈[0.5,1] and R2∈[0,1], which are the safety value and the warning value, respectively. When ST>R2, it means that the current foraging environment is relatively safe and the searchers further expand the search range. When ST≤R2, it means that some sparrows have noticed the potential danger and sent a warning signal to the population. At this time, the entire sparrow population will migrate to other safe areas to forage. Let the sparrows other than the foragers be the producers. Producers also participate in foraging behavior. When they find a better foraging location, they will abandon the current foraging and go to the better location. Their location update is shown in the following formula. In the formula, Xt worst is the worst position of the population in the t-th iteration, Xt+1 best is the best position of the population in the (t+1)-th iteration, and D is a 1×m matrix with elements of 1 or -1; when p > N / 2, it means that the p-th producer has not found food, that is, the fitness value is poor, and will go to other areas to forage; when p ≤ N / 2, the p-th producer will forage near the current best position; Step (4): Randomly select 20% of the sparrows in the population as watchdogs and update their positions; In each iteration, 20% of the sparrows in the population will be randomly selected as the proportion of sparrows that are aware of danger, so that they have the warning function and their position and fitness will be updated. The position update of the vigilant is shown in the following formula. In the formula, C is a random number ranging from [-1, 1], and β is the step size control coefficient, which is a random number that follows a normal distribution with a variance of 1 and a mean of 0. f is a very small constant to avoid the denominator being zero. p f is the individual fitness value. w The global optimal fitness value; when f p =f w When f indicates that the sparrow in the center is aware of danger, it will randomly move closer to nearby sparrows to reduce its risk of being preyed upon; p ≠f w This indicates that the sparrow is on the edge of the population and is vulnerable to predation, requiring it to move to a safe area. Step (5): Fitness calculation. If the maximum number of iterations is satisfied, the optimal fitness value and the corresponding sparrow position information are output. If the result does not meet the conditions, repeat steps (2) to (5) until a combination of process parameters that meets the requirements is obtained.