A method for optimizing cutting parameters in CNC milling of inline power supply housing
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-13
- Publication Date
- 2026-08-14
AI Technical Summary
[0005]本发明的目的在于解决现有薄壁件铣削参数优化方法中仅考虑静态变形、忽略动态稳定性,以及传统动力学建模复杂、泛化能力差的缺陷,而提出一种能够同时考虑静态切削力与动态切削稳定性、利用神经网络预测模型实现高精度预测与多约束优化、在保证加工质量的前提下显著提升加工效率的切削参数优化方法
[0042]1、本发明首先通过神经网络建立切削力预测模型和切削稳定性预测模型,以大数据驱动方式刻画切削参数与轴向力、弯矩及弯矩方差之间的复杂非线性映射关系,避免了传统物理建模对精确动力学参数的依赖,提高了预测模型的适用性和泛化能力。在此基础上,以加工时间最小化为优化目标,将轴向力约束、弯矩约束和弯矩方差约束同时纳入优化模型,将多约束问题转化为无约束适应度函数,并通过粒子群算法进行全局寻优。该方法能够在保证切削力不超过安全阈值、切削过程保持稳定的前提下,最大限度地提升加工效率,实现了加工质量与加工效率的协同优化,克服了现有方法仅考虑静态变形或依赖复杂动力学建模的缺陷。
Smart Images

Figure CN122569178A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of CNC milling technology, specifically relating to a CNC milling method for an inline power supply housing, and more specifically to a method for optimizing cutting parameters in CNC milling of an inline power supply housing based on neural networks and particle swarm optimization. Background Technology
[0002] In the aviation and aerospace fields, to meet the requirements of lightweight aircraft and high space utilization, inline power supply housings often adopt an integral thin-walled structure. During CNC milling, these parts have poor rigidity, and if the cutting parameters (such as spindle speed, feed rate, depth of cut, etc.) are not selected properly, elastic deformation and chatter are likely to occur, leading to decreased machining accuracy, deterioration of surface quality, and poor machining stability, while also limiting the improvement of machining efficiency.
[0003] Currently, the optimization of cutting parameters for thin-walled aerospace parts mainly relies on empirical parameters, trial-and-error methods, or static optimization methods based on finite element analysis. However, these methods have significant shortcomings: on the one hand, the cutting process is affected by the coupling of multiple parameters, and traditional mathematical models cannot accurately characterize the complex nonlinear relationship between cutting parameters, cutting forces, and machining deformation; on the other hand, most existing methods only consider the deformation problem caused by static cutting forces, ignoring the dynamic stability of the cutting system, which leads to chatter during machining, thereby affecting surface quality and tool life.
[0004] To address the aforementioned issues, existing research has attempted to employ data-driven methods such as neural networks for cutting force prediction. For instance, Chinese invention patent CN111563301A discloses a method for optimizing milling parameters in thin-walled parts. This method uses a backpropagation neural network to predict machining deformation and optimizes machining time and cutting energy consumption. However, this method only focuses on deformation caused by static cutting forces and does not address dynamic chatter stability, making it difficult to guarantee the stability and surface quality of the machining process. Another Chinese invention patent CN112859590A discloses a method for optimizing turning chatter cutting parameters based on workpiece deformation. This method obtains a stable cutting region by establishing a turning chatter model. However, this method relies on precise dynamic parameters and idealized assumptions, resulting in complex modeling, difficulty in parameter acquisition, and limited applicability to milling thin-walled parts. Summary of the Invention
[0005] The purpose of this invention is to address the shortcomings of existing milling parameter optimization methods for thin-walled parts, which only consider static deformation and ignore dynamic stability, as well as the complexity and poor generalization ability of traditional dynamic modeling. Instead, this invention proposes a cutting parameter optimization method that can simultaneously consider static cutting force and dynamic cutting stability, utilize neural network prediction models to achieve high-precision prediction and multi-constraint optimization, and significantly improve machining efficiency while ensuring machining quality.
[0006] To achieve the above objectives, the technical solution provided by this invention is:
[0007] A method for optimizing cutting parameters in CNC milling of inline power supply housings is provided, including the following steps:
[0008] Step 1: Obtain sample data of cutting parameters for the inline power supply housing. The cutting parameters include spindle speed, axial depth of cut, radial depth of cut, feed per tooth, feed rate, approach angle, and exit angle. Collect the axial force, bending moment, and variance of the peak bending moment corresponding to each cutting parameter to construct a dataset containing input features and output labels.
[0009] Step 2: Establish a first prediction model based on a neural network as the cutting force prediction model. The input layer of the first prediction model includes spindle speed, axial depth of cut, radial depth of cut, feed per tooth, feed rate, entry angle and exit angle. The output layer includes axial force and bending moment. Train the first prediction model using the dataset constructed in Step 1 to obtain the trained cutting force prediction model.
[0010] Step 3: Establish a second prediction model based on a neural network as the cutting stability prediction model. The input layer of the second prediction model includes spindle speed, axial depth of cut, radial depth of cut, feed per tooth, feed rate, entry angle and exit angle. The output layer includes bending moment variance. The second prediction model is trained using the dataset constructed in Step 1 to obtain the trained cutting stability prediction model.
[0011] Step 4: Establish a multi-constraint cutting parameter optimization model and construct a fitness function: Minimize machining time as the optimization objective, spindle speed, feed per tooth, axial depth of cut, and radial depth of cut as decision variables, and cutting speed constraint, feed rate constraint, axial cutting force constraint, cutting bending moment constraint, and cutting stability constraint as constraints. The axial cutting force constraint and cutting bending moment constraint are calculated by calling the cutting force prediction model trained in Step 2 to obtain the axial force and bending moment, while the cutting stability constraint is calculated by calling the cutting stability prediction model trained in Step 3 to obtain the bending moment variance. The optimization model is then mapped to a fitness function.
[0012] Step 5: Iteratively solve the fitness function using the particle swarm optimization algorithm: Initialize the particle swarm, with each particle's position corresponding to a set of cutting parameters; in each iteration, calculate the fitness value of each particle based on the fitness function constructed in Step 4, update the individual optimal solution and the global optimal solution, and update the particle's velocity and position; repeat the iteration until the termination condition is met, and output the cutting parameter combination corresponding to the global optimal solution as the optimized cutting parameters.
[0013] Furthermore, in step 2, the first prediction model is a three-layer neural network, whose hidden layers include a first hidden layer and a second hidden layer; the first hidden layer includes 64 neurons, and the second hidden layer includes 32 neurons.
[0014] Furthermore, in step 4, the processing time Represented as:
[0015]
[0016]
[0017] In the formula, The time required to cut the material. Empty trip time To assist with operation time, The total volume of the chips. Main spindle speed The number of cutting teeth. The feed per tooth. Radial cutting depth, This is the axial cutting depth.
[0018] Furthermore, in step 4, the constraints include:
[0019] Cutting speed constraints: ,
[0020] Feed rate constraint: ,
[0021] Cutting axial force constraint:
[0022] Cutting moment constraint:
[0023] Cutting stability constraints:
[0024] In the formula, The axial cutting depth, Radial cutting depth, Main spindle speed The feed per tooth. For cutting speed, The diameter of the cutting tool. and These are the minimum and maximum spindle speeds, respectively. The number of cutting teeth. For feed rate, and These represent the minimum and maximum feed per tooth, respectively. The axial force output by the cutting force prediction model. The maximum axial force is set. The bending moment is output by the cutting force prediction model. For the set maximum bending moment, The bending moment variance is output by the cutting stability prediction model. This is the maximum value of the set moment variance.
[0025] Furthermore, in step 4, the fitness function is constructed using the penalty function method as follows:
[0026]
[0027] In the formula, For processing time, The axial cutting depth, Radial cutting depth, Main spindle speed The feed per tooth. As a penalty factor, For the first Inequality constraint functions, denoted as the number of inequality constraints.
[0028] Furthermore, in step 5, the velocity update formula for the particle swarm optimization algorithm is:
[0029]
[0030] The position update formula is:
[0031]
[0032] In the formula, For particle serial numbers, For the number of iterations, For inertial weights, and These are individual learning factors and group learning factors, respectively. and for Random numbers in an interval For particles In the In the nth iteration 3D velocity vector For particles In the In the nth iteration A dimensional position vector, For particles In the In the nth iteration Dimension's historical best position For the group in the first In the nth iteration The historical best position of dimensionality.
[0033] Furthermore, in step 5, the inertia weight Adaptive adjustment strategy adopted:
[0034]
[0035] In the formula, and These are the maximum and minimum inertia weights, respectively. This represents the maximum number of iterations.
[0036] Furthermore, individual learning factors and group learning factor Adaptive adjustment strategy adopted:
[0037]
[0038]
[0039] In the formula, and These are the lower and upper limits of the individual learning factor, respectively. and These are the lower and upper limits of the group learning factor, respectively. It is a constant less than 1.
[0040] Furthermore, in step 1, the dataset is acquired using a two-stage data acquisition strategy of orthogonal experiment and single-factor fine scanning: firstly, orthogonal experiment is used to achieve balanced coverage of the multi-cutting parameter combination space with fewer experiments to obtain the global variation characteristics of cutting force; then, single-factor fine scanning experiment is used to sample key variables at high resolution to enhance the characterization of continuous variation patterns.
[0041] The advantages of this invention are:
[0042] 1. This invention first establishes a cutting force prediction model and a cutting stability prediction model through neural networks. Using a big data-driven approach, it characterizes the complex nonlinear mapping relationship between cutting parameters and axial force, bending moment, and bending moment variance, avoiding the dependence of traditional physical modeling on precise dynamic parameters and improving the applicability and generalization ability of the prediction model. Based on this, with minimizing machining time as the optimization objective, axial force constraints, bending moment constraints, and bending moment variance constraints are simultaneously incorporated into the optimization model, transforming the multi-constraint problem into an unconstrained fitness function, and performing global optimization using a particle swarm optimization algorithm. This method can maximize machining efficiency while ensuring that the cutting force does not exceed a safe threshold and the cutting process remains stable, achieving synergistic optimization of machining quality and efficiency, and overcoming the shortcomings of existing methods that only consider static deformation or rely on complex dynamic modeling.
[0043] 2. Experimental verification shows that the neural network prediction model constructed in this invention has high prediction accuracy: the maximum prediction error for axial force is -7.49%, and the minimum prediction error is -0.02%; the maximum prediction error for bending moment is 11.89%, and the minimum prediction error is 0.75%; the maximum prediction error for bending moment variance is 13.2%, and the minimum prediction error is -0.35%. These data indicate that this invention can provide reliable constraint inputs for cutting parameter optimization.
[0044] 3. In specific engineering applications, the optimized cutting parameters of this invention were used to mill the inline power supply housing. The cutting bending moment was reduced from 7.37 Nm to 6.8 Nm, effectively reducing the machining deformation of thin-walled parts. Simultaneously, while ensuring machining stability and quality, machining efficiency was improved by 19.25%, demonstrating significant engineering application value. Attached Figure Description
[0045] The above and other features and advantages of the present invention will become more readily understood from the following description with reference to the accompanying drawings, in which:
[0046] Figure 1 This is an overall flowchart of the method for optimizing the cutting parameters of CNC milling of a linear power supply housing according to an embodiment of the present invention;
[0047] Figure 2 This is a diagram of the neural network structure for predicting cutting force in an embodiment of the present invention;
[0048] Figure 3 This is a graph showing the convergence of the predicted axial force value with the number of training rounds in an embodiment of the present invention;
[0049] Figure 4 This is a graph showing the convergence of the predicted bending moment value with the number of training rounds in an embodiment of the present invention;
[0050] Figure 5This is a schematic diagram of the peak bending moment points identified in an embodiment of the present invention, wherein (a) is the original bending moment signal and the peak bending moment points identified by the find_peaks function; (b) is a partial enlarged view of (a);
[0051] Figure 6 This is a graph showing the convergence of the predicted bending moment variance with the number of training rounds in an embodiment of the present invention;
[0052] Figure 7 This is a convergence process diagram of the particle swarm optimization algorithm for finding the optimal solution in an embodiment of the present invention, wherein (a) is the distribution state diagram of the first generation particle swarm in the parameter space; (b) is the distribution state diagram of the 91st generation particle swarm in the parameter space; (c) is the distribution state diagram of the 121st generation particle swarm in the parameter space; and (d) is the distribution state diagram of the 151st generation particle swarm in the parameter space. Detailed Implementation
[0053] The present invention will now be described in detail with reference to the accompanying drawings and exemplary embodiments thereof. It should be noted that the following detailed description of the present invention is for illustrative purposes only and is not intended to limit the scope of the invention.
[0054] This invention provides a method for optimizing cutting parameters in CNC milling of inline power supply housings. This method automatically selects the optimal cutting parameters through an intelligent optimization algorithm while ensuring machining quality (reducing cutting deformation and suppressing cutting chatter), thereby improving machining efficiency.
[0055] The following reference Figure 1 A detailed description is provided of a method for optimizing cutting parameters in CNC milling of an inline power supply housing, which is an exemplary embodiment of the present invention. The method comprises five main steps: Step S1, acquiring sample data of cutting parameters and constructing a dataset; Step S2, establishing and training a first prediction model (cutting force prediction model) based on a neural network; Step S3, establishing and training a second prediction model (cutting stability prediction model) based on a neural network; Step S4, establishing a multi-constraint cutting parameter optimization model and constructing a fitness function; Step S5, using a particle swarm optimization algorithm to iteratively solve the problem and output the optimized cutting parameters.
[0056] Step S1: Construct the dataset
[0057] First, obtain sample data of cutting parameters. Cutting parameters include spindle speed. Axial depth of cut Radial depth of cut Feed per tooth Feed rate Angle of entry and cut-out angle Simultaneously, the axial force corresponding to each cutting parameter is collected. Bending moment and the variance of the peak bending moment This led to the construction of a dataset containing input features (7 cutting parameters) and output labels (axial force, bending moment, and bending moment variance).
[0058] To efficiently acquire high-quality training data, this embodiment employs a two-stage data acquisition strategy of orthogonal experiments and single-factor fine scanning. First, orthogonal experiments are used to achieve balanced coverage of the multi-cutting parameter combination space with fewer experiments, obtaining the global variation characteristics of the cutting force. As shown in Table 1, the orthogonal experiments included nine levels for rotational speed (2000-6000 rpm), nine levels for feed rate (200-400 mm / min), nine levels for axial depth of cut (2-4 mm), and nine levels for radial depth of cut (0.2-0.6 mm), totaling 81 orthogonal cutting experiments. Based on this, single-factor fine scanning experiments were used to sample key variables at high resolution, enhancing the characterization of continuous variation patterns. As shown in Table 2, within the rotational speed range of 2000-8500 rpm, a gradient was applied every 500 rpm, with six levels for feed per tooth (0.01-0.035 mm / z), and a fixed axial depth of cut of 2 mm and radial depth of cut of 0.2 mm, resulting in 84 cutting experiments. Of the 165 sets of data mentioned above, 155 sets were randomly selected as training data, and the remaining 10 sets were used as test data. This data collection strategy balances experimental efficiency with the breadth and accuracy of model building, effectively improving the fitting accuracy and generalization ability of the subsequent prediction model.
[0059] Table 1
[0060]
[0061] Table 2
[0062]
[0063] Step S2: Establish and train the cutting force prediction model
[0064] like Figure 2 As shown, a cutting force prediction model based on a three-layer neural network is established. The input layer of this neural network includes seven neurons: spindle speed, axial depth of cut, radial depth of cut, feed per tooth, feed rate, approach angle, and exit angle. The hidden layers include a first hidden layer and a second hidden layer. In this embodiment, the first hidden layer has 64 neurons, and the second hidden layer has 32 neurons. The output layer includes two neurons: axial force and bending moment. The ReLU function is used as the activation function.
[0065] Then, the first prediction model is trained using the dataset constructed in step S1. The training process uses the Adam optimizer and the loss function is the mean squared error, resulting in a well-trained cutting force prediction model.
[0066] During training, the convergence of the predicted axial force value with the number of training rounds is as follows: Figure 3 As shown in the figure, the number of training rounds was set to 400 based on the convergence plot. Table 3 shows the comparison between the predicted and measured axial force values. The maximum prediction error for axial force was -7.49%, and the minimum prediction error was -0.02%. The convergence of the predicted bending moment with the number of training rounds is shown in the figure. Figure 4 As shown in Table 4, the comparison between the predicted and measured bending moment values shows that the maximum prediction error is 11.89% and the minimum prediction error is 0.75%. These data indicate that the cutting force prediction model constructed in this embodiment has high prediction accuracy and can accurately reflect the complex nonlinear relationship between cutting parameters and axial force and bending moment.
[0067] Table 3
[0068]
[0069] Table 4
[0070]
[0071] Step S3: Establish and train the cutting stability prediction model
[0072] The stability during the cutting process directly affects the surface finish and tool life. This embodiment uses the variance of the peak bending moment to characterize cutting stability; the smaller the bending moment variance, the more stable the cutting process. Specifically, the peak points in the bending moment signal are identified using the SciPy library function `scipy.signal.find_peaks`. Figure 5 The original bending moment signal and the identified peak bending moment points are shown. The bending moment variance can be obtained by calculating the variance of these peak points. .
[0073] Based on this, a cutting stability prediction model based on a three-layer neural network is established. The input layer of this neural network also includes seven neurons: spindle speed, axial depth of cut, radial depth of cut, feed per tooth, feed rate, approach angle, and exit angle. The hidden layer structure is the same as the cutting force prediction model in step 2, with 64 neurons in the first hidden layer and 32 neurons in the second hidden layer. The output layer includes one neuron for bending moment variance. The ReLU function is used as the activation function.
[0074] Then, using the dataset constructed in step S1 (with the output label being the moment variance), the second prediction model is trained using the Adam optimizer and the mean squared error loss function to obtain the trained cutting stability prediction model.
[0075] The convergence of the predicted moment variance with the number of training rounds is as follows: Figure 6 As shown in Table 5, the comparison between the predicted and measured values of the bending moment variance shows that the maximum prediction error is 13.2% and the minimum prediction error is -0.35%. This indicates that the cutting stability prediction model constructed in this embodiment can accurately predict the bending moment variance under different combinations of cutting parameters, thereby providing reliable stability constraints for subsequent optimization.
[0076] Table 5
[0077]
[0078] Step S4: Establish a multi-constraint cutting parameter optimization model and construct a fitness function.
[0079] This step focuses on improving production efficiency by adjusting the spindle speed. Feed per tooth Axial depth of cut Radial depth of cut The cutting parameters were optimized, with the goal of reducing machining time. (s) Constraints include factors such as cutting speed, feed rate, cutting force, and cutting stability. Specifically, it is divided into the following sub-steps.
[0080] Step S4.1: Establish the objective function
[0081] The total machining time during the entire milling process It mainly consists of three parts: the time required to cut the material. Empty trip time and other auxiliary operations The time required for (e.g., tool installation) is expressed as:
[0082]
[0083] Among them, the time required to cut the material The calculation formula is:
[0084]
[0085] In the formula, The total volume of the chips. This refers to the number of cutting teeth. This embodiment only applies to... Optimize.
[0086] Step S4.2: Determine the constraints
[0087] (1) Cutting speed constraint: The cutting speed must be within the range of commonly used cutting speeds for titanium alloy machining, expressed as:
[0088]
[0089]
[0090] In the formula, For cutting speed, The diameter of the cutting tool. and These represent the minimum and maximum spindle speeds, respectively. In this embodiment, the cutting speed range for the titanium alloy is 30–100 m / min.
[0091] (2) Feed rate constraint: The feed rate should be within the range of feed rates commonly used for machining titanium alloys, expressed as:
[0092]
[0093]
[0094] In the formula, and These represent the minimum and maximum feed per tooth, respectively. In this embodiment, the feed rate range for finish milling of titanium alloy workpieces is 0.01–0.04 mm / z.
[0095] (3) Cutting axial force constraint: The cutting axial force must be less than the maximum axial force of the machine tool spindle or the set axial force, expressed as:
[0096]
[0097] In the formula, The axial force is the output of the cutting force prediction model trained in step S2. The maximum axial force is set to 1000 N in this embodiment.
[0098] (4) Cutting moment constraint: The cutting moment must be less than the maximum bending moment of the machine tool spindle or the set bending moment, expressed as:
[0099]
[0100] In the formula, The bending moment is the output of the cutting force prediction model trained in step S2. The maximum bending moment is set to 5 Nm in this embodiment.
[0101] (5) Cutting stability constraint: The stability of the cutting process is described by the peak value variance of the bending moment. It is necessary to ensure that the bending moment variance is less than a set value, which is expressed as:
[0102]
[0103] In the formula, The bending moment variance is the output of the cutting stability prediction model trained in step S3. The maximum value of the bending moment variance is set, and in this embodiment, the value is taken as... .
[0104] Step S4.3: Mapping the objective function to the fitness function
[0105] Based on the above constraints, a penalty function method is used to construct a corresponding penalty function, which is then added to the objective function. This transforms the constrained optimization problem into an unconstrained one, while ensuring that the solution of the new objective function remains consistent with the solution of the original objective function. The constructed fitness function is as follows:
[0106]
[0107] In the formula, This is the penalty factor for inequality constraints. For the first Inequality constraint functions, A vector consisting of decision variables. To determine the number of inequality constraints, this embodiment... .
[0108] During the iteration process, for solutions that do not violate the constraints, ,at this time In other words, the fitness value equals the processing time; if a constraint is violated, a penalty term is applied, increasing the fitness value and thus eliminating the device during the optimization process. In this way, the particle swarm optimization algorithm can automatically search for the optimal solution that simultaneously satisfies all constraints and has the shortest processing time.
[0109] Step S5: Iterative solution using the particle swarm optimization algorithm
[0110] The fitness function constructed in step S4 is solved iteratively using the particle swarm optimization (PSO) algorithm. The core of the PSO algorithm is the velocity and position of the particles. Let the... The position vector of each particle Corresponding to a set of cutting parameters (decision variables), the velocity vector This indicates the direction and distance of particle movement. Each particle records its optimal position found during the search. (Local optimal solution), the swarm record shows the optimal position found by all particles. (Global optimal solution).
[0111] The speed update formula is:
[0112]
[0113] The position update formula is:
[0114]
[0115] In the formula, For particle serial numbers, This represents the current iteration number. For inertial weights, and These are individual learning factors and group learning factors, respectively. and for Random numbers in an interval For particles In the In the nth iteration 3D velocity vector For particles In the In the nth iteration A dimensional position vector, For particles In the In the nth iteration Dimension's historical best position For the group in the first In the nth iteration The historical best position of dimensionality.
[0116] The particle swarm optimization (PSO) algorithm parameters in this embodiment are set as shown in Table 6: population size 200, maximum number of iterations. =200, Inertia Weight Range Individual learning factor range Group learning factor range The penalty factor α = 1000.
[0117] Table 6
[0118]
[0119] To ensure that the algorithm has good global exploration capabilities in the early stages of the search and good local exploration capabilities in the later stages, this embodiment adopts an adaptive strategy to adjust the inertia weight and learning factor.
[0120] The adaptive adjustment formula for inertia weight is:
[0121]
[0122] In the formula, and These represent the maximum and minimum inertia weights, respectively. As the number of iterations increases, the inertia weights decrease linearly, thus allowing the particle swarm to gradually transition from a large-scale initial exploration to a smaller, more refined search in the later stages.
[0123] The adaptive adjustment formula for the learning factor is:
[0124]
[0125]
[0126] In the formula, and These are the lower and upper limits of the individual learning factor, respectively. and These are the lower and upper limits of the group learning factor, respectively. This is a constant less than 1, and in this embodiment, it is set to 0.7. This adjustment strategy results in a larger individual learning factor and a smaller group learning factor in the early stages of iteration, which is beneficial for maintaining particle diversity; and a smaller individual learning factor and a larger group learning factor in the later stages of iteration, which is beneficial for particles to converge to the global optimum.
[0127] The specific iterative process of the particle swarm optimization algorithm is as follows:
[0128] (1) Initialize the algorithm parameters (set according to Table 6), and initialize the velocity and position of the particle swarm to zero vectors.
[0129] (2) Initialize the population: Randomly generate the initial positions of the particles (corresponding to a set of cutting parameters), and calculate the fitness value of each particle according to the fitness function in step S4. Initialize individual optimal and global optimal .
[0130] (3) Determine the termination condition: If the maximum number of iterations (200 generations) is reached or the difference in fitness value between two iterations is less than the set threshold, then stop the iteration and output the current optimal solution; otherwise, continue.
[0131] (4) Update particle position and velocity: Update the position and velocity of each particle according to the velocity update formula and position update formula above, and recalculate the fitness value of each particle. .
[0132] (5) Finding local optima: Compare the fitness values of the current particles. Its historical best fitness value ,like Then update Set the current position and update. .
[0133] (6) Finding the global optimum: comparing the performance of each particle With the global optimal fitness value ,like Then update Set the position of the particle and update it. .
[0134] (7) Update inertia weights and learning factors: Update according to the adaptive adjustment formula , and Return to step (3) and continue iterating.
[0135] Figure 7 The convergence states of the particle swarm optimization (PSO) algorithm in the process of finding the optimal solution are illustrated. (a) shows the random distribution of the first-generation particle swarm in the parameter space; (b) shows the distribution at generation 91, where particles begin to converge towards a center; (c) shows the distribution at generation 121, where the vast majority of particles cluster in a relatively small area; and (d) shows the distribution at generation 151, where the particle swarm clusters near the optimal solution. Finally, the combination of cutting parameters corresponding to the global optimal solution is output as the optimized cutting parameters.
[0136] This embodiment focuses on the finishing stage of an inline power supply housing (deep cavity, thin wall structure). Since a higher spindle speed and a smaller feed per tooth should be selected during the finishing stage to reduce cutting forces and ensure machining quality, and the axial depth of cut can be determined based on the workpiece allowance, the decision variable in this optimization problem is only the spindle speed. and feed per tooth Table 7 shows a comparison of the cutting parameters before and after optimization: Original parameters: spindle speed 2160 rpm, feed per tooth 0.0463 mm / z; Optimized parameters: spindle speed 3980 rpm, feed per tooth 0.03 mm / z, corresponding to an increase in feed rate from 400 mm / min to 477 mm / min. Machining was performed using the optimized cutting parameters, meeting all constraints (axial force ≤ 1000 N, bending moment ≤ 5 Nm, bending moment variance ≤ 5). Under the premise of optimization, the processing efficiency was improved by 19.25%. At the same time, the cutting bending moment was reduced from 7.37 Nm to 6.8 Nm, effectively reducing the processing deformation of thin-walled parts.
[0137] Table 7
[0138]
[0139] This invention accurately characterizes the nonlinear relationship between cutting parameters and axial force, bending moment, and bending moment variance through a neural network prediction model. It simultaneously incorporates static deformation (axial force and bending moment) and dynamic stability (bending moment variance) into the optimization framework, achieving synergistic optimization of machining quality and efficiency. The constructed prediction model can be continuously trained and updated based on actual machining data, adapting to different machining conditions and material conditions for thin-walled structural parts, and possesses high engineering practical value and promising prospects for widespread application.
[0140] Finally, it should be noted that the features mentioned and / or shown in the above description of exemplary embodiments of the present invention can be combined in the same or similar manner with one or more other embodiments, combined with or substituted for corresponding features in other embodiments. These combined or substituted technical solutions should also be considered to be included within the scope of protection of the present invention.
Claims
1. A method for optimizing cutting parameters in CNC milling of an inline power supply housing, characterized in that, Includes the following steps: Step 1: Obtain sample data of cutting parameters for the inline power supply housing. The cutting parameters include spindle speed, axial depth of cut, radial depth of cut, feed per tooth, feed rate, approach angle, and exit angle. Collect the axial force, bending moment, and variance of the peak bending moment corresponding to each cutting parameter to construct a dataset containing input features and output labels. Step 2: Establish a first prediction model based on a neural network as the cutting force prediction model. The input layer of the first prediction model includes spindle speed, axial depth of cut, radial depth of cut, feed per tooth, feed rate, entry angle and exit angle. The output layer includes axial force and bending moment. Train the first prediction model using the dataset constructed in Step 1 to obtain a trained cutting force prediction model. Step 3: Establish a second prediction model based on a neural network as a cutting stability prediction model. The input layer of the second prediction model includes spindle speed, axial depth of cut, radial depth of cut, feed per tooth, feed rate, entry angle and exit angle, and the output layer includes bending moment variance. The second prediction model is trained using the dataset constructed in Step 1 to obtain a trained cutting stability prediction model. Step 4: Establish a multi-constraint cutting parameter optimization model and construct a fitness function: Minimize machining time as the optimization objective, spindle speed, feed per tooth, axial depth of cut, and radial depth of cut as decision variables, and cutting speed constraint, feed rate constraint, axial cutting force constraint, cutting bending moment constraint, and cutting stability constraint as constraints; wherein, the axial cutting force constraint and cutting bending moment constraint are calculated by calling the cutting force prediction model trained in Step 2 to obtain the axial force and bending moment, and the cutting stability constraint is calculated by calling the cutting stability prediction model trained in Step 3 to obtain the bending moment variance; map the optimization model to a fitness function; Step 5: Iteratively solve the fitness function using the particle swarm optimization algorithm: Initialize the particle swarm, with each particle's position corresponding to a set of cutting parameters; in each iteration, calculate the fitness value of each particle according to the fitness function constructed in Step 4, update the individual optimal solution and the global optimal solution, and update the particle's velocity and position; repeat the iteration until the termination condition is met, and output the cutting parameter combination corresponding to the global optimal solution as the optimized cutting parameters.
2. The method for optimizing cutting parameters in CNC milling of a linear power supply housing according to claim 1, characterized in that, In step 2, the first prediction model is a three-layer neural network, whose hidden layers include a first hidden layer and a second hidden layer; the first hidden layer includes 64 neurons, and the second hidden layer includes 32 neurons.
3. The method for optimizing cutting parameters in CNC milling of a linear power supply housing according to claim 1, characterized in that, In step 4, the processing time Represented as: In the formula, The time required to cut the material. Empty trip time To assist with operation time, The total volume of the chips. Main spindle speed The number of cutting teeth. The feed per tooth. Radial cutting depth, This is the axial cutting depth.
4. The method for optimizing cutting parameters in CNC milling of a linear power supply housing according to claim 1, characterized in that, In step 4, the constraints include: Cutting speed constraints: , Feed rate constraints: , Cutting axial force constraint: Cutting moment constraint: Cutting stability constraints: In the formula, The axial cutting depth, Radial cutting depth, Main spindle speed The feed per tooth. For cutting speed, The diameter of the cutting tool. and These are the minimum and maximum spindle speeds, respectively. The number of cutting teeth. For feed rate, and These represent the minimum and maximum feed per tooth, respectively. The axial force output by the cutting force prediction model is... The maximum axial force is set. The bending moment is output by the cutting force prediction model. For the set maximum bending moment, The bending moment variance is the output of the cutting stability prediction model. This is the maximum value of the set moment variance.
5. The method for optimizing cutting parameters in CNC milling of a linear power supply housing according to claim 1, characterized in that, In step 4, the fitness function is constructed using the penalty function method as follows: In the formula, For processing time, The axial cutting depth, Radial cutting depth, Main spindle speed The feed per tooth. As a penalty factor, For the first Inequality constraint functions, denoted as the number of inequality constraints.
6. The method for optimizing cutting parameters in CNC milling of a linear power supply housing according to claim 1, characterized in that, In step 5, the velocity update formula of the particle swarm algorithm is: The position update formula is: In the formula, For particle serial numbers, For the number of iterations, For inertial weights, and These are individual learning factors and group learning factors, respectively. and for Random numbers in an interval For particles In the In the nth iteration 3D velocity vector For particles In the In the nth iteration A dimensional position vector, For particles In the In the nth iteration Dimension's historical best position For the group in the first In the nth iteration The historical best position of dimensionality.
7. The method for optimizing cutting parameters in CNC milling of a linear power supply housing according to claim 6, characterized in that, In step 5, the inertial weight Adaptive adjustment strategy adopted: In the formula, and These are the maximum and minimum inertia weights, respectively. This represents the maximum number of iterations.
8. The method for optimizing cutting parameters in CNC milling of a linear power supply housing according to claim 6, characterized in that, The individual learning factor and group learning factor Adaptive adjustment strategy adopted: In the formula, and These are the lower and upper limits of the individual learning factor, respectively. and These are the lower and upper bounds of the group learning factor, respectively. It is a constant less than 1.
9. The method for optimizing cutting parameters in CNC milling of a linear power supply housing according to any one of claims 1 to 8, characterized in that, In step 1, the dataset is acquired using a two-stage data acquisition strategy of orthogonal experiment and single-factor fine scanning: firstly, orthogonal experiment is used to achieve balanced coverage of the multi-cutting parameter combination space with fewer experiments, thereby obtaining the global variation characteristics of the cutting force; Then, high-resolution sampling of key variables was performed through single-factor fine scanning experiments to enhance the characterization of continuous change patterns.
Citation Information
Patent Citations
Milling parameter optimization method for thin-walled workpiece
CN111563301A
Turning flutter cutting parameter optimization method and system based on workpiece deformation
CN112859590A