Laser drilling roughness prediction method based on improved IPSO optimization BP
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENYANG AEROSPACE UNIVERSITY
- Filing Date
- 2026-05-14
- Publication Date
- 2026-08-07
AI Technical Summary
但传统仿真方法计算量大、周期长,不适用于实际生产过程;而标准BP神经网络存在收敛速度慢、易陷入局部最优、初始权值和阈值选择敏感等问题,导致预测精度和稳定性不足
[0040]采用上述技术方案所产生的有益效果在于:本发明提供的基于改进IPSO优化BP的激光打孔粗糙度预测方法,选取激光功率、脉冲频率和焦点位置偏差构建样本数据集,构建BP神经网络模型,将样本数据集输入BP神经网络模型,采用改进粒子群算法IPSO优化BP神经网络模型的初始权值和阈值,得到BP神经网络模型的最优权值和最优阈值;将最优权值和最优阈值赋值给BP神经网络模型,得到神经网络预测模型,实现了微孔表面粗糙度的预计,为工艺参数优化提供有效指导,减少实验试错,降低加工成本,解决了激光加工钛合金TC4微孔过程中表面粗糙度难以实时、准确预测的问题。
Smart Images

Figure CN122528627A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of laser processing and intelligent manufacturing technology, and in particular relates to a laser drilling roughness prediction method based on improved IPSO optimized BP. Background Technology
[0002] Laser drilling technology, with its advantages of high precision, high speed, and strong material adaptability, has been widely used in aerospace, precision instruments, and automotive manufacturing. The surface roughness of the micro-hole is one of the key indicators for measuring the quality of laser drilling, directly affecting the fatigue strength, sealing performance, and service life of the parts.
[0003] However, laser drilling is a complex nonlinear process involving multi-physics coupling, and the surface quality of the microhole is affected by the coupling of multiple process parameters such as laser power, pulse frequency, and focal point position deviation. Currently, surface roughness is mainly obtained through offline inspection after processing, making it difficult to achieve accurate real-time online prediction.
[0004] In existing technologies, some researchers have attempted to predict surface roughness using finite element simulation or traditional backpropagation (BP) neural networks. However, traditional simulation methods are computationally intensive and time-consuming, making them unsuitable for actual production processes. Standard BP neural networks suffer from slow convergence, susceptibility to local optima, and sensitivity to initial weights and threshold selection, resulting in insufficient prediction accuracy and stability. Therefore, a method capable of efficiently and accurately predicting the surface roughness of laser-drilled surfaces is urgently needed. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides a laser drilling roughness prediction method based on improved IPSO and optimized BP, comprising the following steps:
[0006] Multiple process parameters for laser drilling are selected, preprocessed, and a sample dataset is constructed based on the preprocessed process parameters.
[0007] A BP neural network model is constructed. The sample dataset is input into the BP neural network model, and the network structure parameters of the BP neural network model are optimized by using the improved particle swarm optimization algorithm (IPSO) to obtain the optimal network structure parameters of the BP neural network model.
[0008] The optimal network structure parameters are assigned to the BP neural network model, and the BP neural network model is trained again using the sample dataset to obtain the trained BP neural network model.
[0009] Predicting the surface roughness of micropores based on a trained BP neural network prediction model.
[0010] Furthermore, the plurality of process parameters include at least laser power, pulse frequency, and focal position deviation;
[0011] The preprocessing includes denoising, outlier handling, improved normalization, and feature selection.
[0012] The specific method for constructing a sample dataset based on preprocessed process parameters is as follows:
[0013] The preprocessed process parameters are used as input features, and the surface roughness values of the micropores obtained based on the preprocessed process parameters are used as output labels to construct a sample dataset, which is then divided into a training set and a test set.
[0014] Furthermore, the BP neural network model includes an input layer, a hidden layer, and an output layer; wherein the number of nodes in the input layer is equal to the number of process parameters.
[0015] Furthermore, the specific method for optimizing the network structure parameters of the BP neural network model using the improved particle swarm optimization (IPSO) algorithm is as follows:
[0016] Set the maximum number of iterations K; randomly generate a particle swarm, including N particles of dimension D; the position vector of each particle represents a set of network structure parameters of the BP neural network model, and set the legal range of the network structure parameters;
[0017] A multi-objective integrated fitness function is established based on the prediction error, network structure parameters, and regularization penalty term of the BP neural network on the training set. The fitness value of each particle is calculated based on the multi-objective integrated fitness function.
[0018] The velocity and position of each particle are updated based on the weight and fitness value. The historical best position of each particle after each iteration is recorded, and the maximum position in the population is selected as the global best position.
[0019] Once the preset maximum number of iterations or fitness value is met, the globally optimal particle is decoded to determine the optimal network structure parameters of the BP neural network model.
[0020] Furthermore, the network structure parameters include weights, thresholds, learning rate, and the number of hidden layer nodes.
[0021] Furthermore, the multi-objective comprehensive fitness function established based on the prediction error, network structure parameters, and regularization penalty term of the BP neural network on the training set is shown in the following formula:
[0022] ;
[0023] in, Mean square error, The mean square error weighting coefficient is... For learning rate, For the desired learning rate, The learning rate weighting coefficient. This represents the number of hidden layer nodes. The desired number of hidden layer nodes. The weighting coefficient for the number of hidden layer nodes. For regularization terms, This is the weight coefficient for the regularization term.
[0024] Furthermore, the specific method for updating the velocity and position of each particle based on the network structure parameters and fitness value is as follows:
[0025] The particle velocity and position update rules are set based on the weights and fitness values in the network structure parameters, as shown in the following formula:
[0026] ;
[0027] ;
[0028] in, For the number of iterations, For weights, The first acceleration coefficient, This is the second acceleration coefficient; and A random number between [0,1] For the first In the next iteration, particles speed Dimensional components; For the first In the next iteration, particles Location dimensional components, For particles The historical best position; For the first The global optimal position in the next iteration;
[0029] Adjusting weights based on an adaptive nonlinear inertia weight adjustment strategy And adjust the first and second acceleration coefficients based on the adaptive learning factor;
[0030] Set a threshold for stalled iterations; if continuous... If the fitness value of the population satisfies the stagnation iteration threshold, then a chaotic perturbation is applied to the global optimal position.
[0031] Furthermore, the specific method for adjusting the weights based on the adaptive nonlinear inertial weight adjustment strategy is as follows:
[0032] The weights are updated based on the valid range of the weights and the number of iterations, as shown in the following formula:
[0033] ;
[0034] in, For the first The weights for the next iteration. The upper limit of the legal range of weights. This is the lower bound of the legal range for the weights. It is a non-linear adjustment index.
[0035] Furthermore, the specific method for adjusting the first and second acceleration coefficients based on the adaptive learning factor is as follows:
[0036] Set the initial and final values of the first and second acceleration coefficients respectively, and update the first acceleration coefficient according to the number of iterations. Second acceleration coefficient As shown in the formula below:
[0037] ;
[0038] ;
[0039] in, For the first The first acceleration factor in the next iteration This is the initial value of the first acceleration coefficient. This is the final value of the first acceleration coefficient. For the first The second acceleration factor in the next iteration This is the initial value of the second acceleration coefficient. This is the final value of the first acceleration coefficient.
[0040] The beneficial effects of adopting the above technical solution are as follows: The laser drilling roughness prediction method based on improved IPSO optimized BP provided by this invention selects laser power, pulse frequency and focus position deviation to construct a sample dataset, constructs a BP neural network model, inputs the sample dataset into the BP neural network model, and uses the improved particle swarm optimization algorithm (IPSO) to optimize the initial weights and thresholds of the BP neural network model to obtain the optimal weights and thresholds of the BP neural network model; assigning the optimal weights and thresholds to the BP neural network model, a neural network prediction model is obtained, realizing the prediction of micro-hole surface roughness, providing effective guidance for process parameter optimization, reducing experimental trial and error, reducing processing costs, and solving the problem of difficulty in real-time and accurate prediction of surface roughness during laser processing of titanium alloy TC4 micro-holes. Attached Figure Description
[0041] Figure 1Flowchart of the laser drilling roughness prediction method based on improved IPSO and optimized BP provided in Embodiment 1 of the present invention;
[0042] Figure 2 The flowchart of the improved particle swarm optimization algorithm provided in Embodiment 1 of this invention;
[0043] Figure 3 The simulation results based on the training set provided in Embodiment 1 of this invention are shown in the figure.
[0044] Figure 4 The simulation results based on the test set provided in Embodiment 1 of this invention are shown in the figure.
[0045] Figure 5 A comparison chart of measured roughness values, model predicted values, and simulation values provided in Embodiment 1 of the present invention. Detailed Implementation
[0046] The specific implementation methods of this application will be further described in detail below with reference to the accompanying drawings and embodiments.
[0047] Example 1:
[0048] This embodiment provides a laser drilling roughness prediction method based on improved IPSO and optimized BP, such as... Figure 1 As shown, it includes the following steps:
[0049] Step 1: Select multiple process parameters, preprocess the selected process parameters, construct a sample dataset based on the preprocessed process parameters, and divide the sample dataset into a training set and a test set;
[0050] Several key process parameters that significantly affect the surface roughness of laser-drilled holes are selected. These parameters undergo preprocessing, including noise reduction, outlier removal, improved normalization, and feature selection. Based on the preprocessed process parameters as input features, and the micro-hole surface roughness values obtained based on these parameters as output labels, a sample dataset is constructed and divided into training and testing sets. The process parameters include at least: laser power (W), pulse frequency (Hz), and focal position deviation (mm).
[0051] By combining the above process parameters at different levels, multiple sets of parameter combinations and their corresponding surface roughness values are obtained through simulation or experimentation, thus constructing a sample dataset. The sample data is divided into a training set and a test set.
[0052] Step 2: Construct a BP neural network model, including an input layer, hidden layers, and an output layer;
[0053] This embodiment uses a 3-6-1 three-layer structure to construct a three-layer feedforward BP neural network model, including an input layer, a hidden layer, and an output layer. The input layer includes 3 nodes, the hidden layer includes 6 nodes, and the output layer includes 1 node.
[0054] The number of input layer nodes is equal to the number of input features. In this embodiment, the number of input layer neurons and the number of process parameters are both 3. The number of output layer neurons is 1, which is used to output the predicted surface roughness value. The number of hidden layer neurons is determined by trial and error or empirical formula, preferably 6.
[0055] Step 3: Optimize the initial weights and thresholds of the BP neural network model using the improved particle swarm optimization algorithm (IPSO) to obtain the optimal weights and thresholds of the BP neural network model;
[0056] The improved particle swarm optimization (IPSO) algorithm, based on the standard particle swarm optimization (PSO) algorithm, adopts an adaptive nonlinear inertial weight adjustment strategy to dynamically adjust the global and local search capabilities according to the iteration process; introduces an adaptive learning factor to balance the particle's own cognition and the group's social information; establishes a chaotic perturbation strategy to automatically perturb the optimal position when the algorithm stagnates, avoiding premature convergence; and establishes a fitness function with a regularized penalty term to suppress overfitting of the BP neural network.
[0057] like Figure 2 As shown, the improved particle swarm optimization algorithm in this embodiment includes the following steps:
[0058] S1 initialization: Randomly generate a particle swarm consisting of N particles of dimension D; the position vector of each particle represents a set of network structure parameters of the BP neural network model; set the maximum number of iterations K;
[0059] Network structure parameters include weights Threshold Learning rate and the number of hidden layer nodes The weight parameters, threshold parameters, learning rate parameters, and number of hidden layer nodes of the BP network structure are incorporated into the same optimization space. An integrated structure-parameter optimal solution is obtained through IPSO global search, avoiding errors introduced by human experience. During the optimization process, legal interval constraints are applied to each parameter to ensure the generation of an effective network structure, avoid ineffective iterations, and improve optimization efficiency. In this embodiment, weights are set... The legal range is , The upper limit of the weight, Set the lower limit of the weights; set the threshold. The legal range is , The upper limit of the threshold, Set the lower limit of the threshold; set the learning rate. The legal range is , This is the upper limit of the learning rate. Set the lower bound for the learning rate; set the number of hidden layer nodes. The legal range is , This represents the upper limit of the number of hidden layer nodes. This is the lower limit for the number of hidden layer nodes;
[0060] S2 Fitness Calculation: Based on the prediction error of the BP neural network on the training set, network structure parameters, and regularization penalty term, a multi-objective comprehensive fitness function is established to calculate the fitness value of each particle.
[0061] The multi-objective comprehensive fitness function established in this embodiment based on the prediction error of the BP neural network on the training set, network structure parameters, and regularization penalty term is shown in the following formula:
[0062] ;
[0063] in, Mean square error, The mean square error weighting coefficient is... For the desired learning rate, The learning rate weighting coefficient. The desired number of hidden layer nodes. The weighting coefficient for the number of hidden layer nodes. For regularization terms, The regularization term weight coefficient;
[0064] By constructing a multi-objective integrated fitness function, which comprehensively considers prediction error, network complexity, and learning rate stability, prediction accuracy and generalization ability are improved simultaneously.
[0065] S3 Individual Optimal and Global Optimal Update: Based on the fitness value, update the velocity and position of each particle, record the historical optimal position of each particle after each iteration, and select the maximum position in the population as the global optimal position;
[0066] The rules for updating the particle's velocity and position are shown in the following formula:
[0067] ;
[0068] ;
[0069] in, For the number of iterations, and This is the acceleration coefficient; and A random number between [0,1] For the first In the next iteration, particles speed Dimensional components; For the first In the next iteration, particles Location dimensional components, For particles The historical best position; For the first The global optimal position in the next iteration.
[0070] In this embodiment, an adaptive nonlinear inertia weight adjustment strategy is established to adjust the weights. The update rule for the adaptive nonlinear inertial weight adjustment strategy is as follows: The global and local search capabilities are dynamically adjusted according to the iteration process.
[0071] ;
[0072] in, For the first The weights for the next iteration. It is a non-linear adjustment index;
[0073] Adjusting weights based on an adaptive nonlinear inertia weight adjustment strategy In the early stages of iteration, the weights When the weights are relatively large, the primary goal is to perform a broad global search. Larger weights give particles stronger exploration capabilities, allowing them sufficient speed and momentum to traverse the entire solution space, preventing the algorithm from converging prematurely to a local optimum, and laying a good foundation for subsequent fine-grained searches, thus ensuring a global search. In the later stages of iteration, the weights... At this point, the optimal solution region has been largely identified, and the search needs to transition to a local fine-tuning phase. Smaller inertia weights reduce the particle's step size, allowing for precise adjustments near the optimal solution, thus improving solution accuracy. This also effectively avoids later-stage oscillations caused by excessively large weights, ensuring a local fine-tuning search. Dynamic adjustments based on the particle's current fitness value prevent premature convergence.
[0074] Building upon this foundation, a dynamic fine-tuning mechanism based on the current fitness value of particles is further introduced. The adaptive nonlinear inertial weight adjustment strategy does not simply decrease linearly with the number of iterations, but rather makes local adjustments based on the particle's fitness performance: for particles with poor fitness values, their weights are appropriately increased to give them stronger exploration capabilities and allow them to escape the current unfavorable regions; for particles with good fitness values, their weights are appropriately decreased to allow them to explore more thoroughly near their current optimal position, accelerating convergence.
[0075] This embodiment introduces an adaptive learning factor to balance particle self-cognition and group social information, and accelerates the coefficient. and The update rules are as follows:
[0076] ;
[0077] ;
[0078] in, For the first The first acceleration factor in the next iteration This is the initial value of the first acceleration coefficient. This is the final value of the first acceleration coefficient. For the first The second acceleration factor in the next iteration This is the initial value of the second acceleration coefficient. This is the final value of the first acceleration coefficient;
[0079] Set a threshold for stalled iterations; if continuous If the fitness value of the population satisfies the stagnation iteration threshold G, then a chaotic perturbation is applied to the global optimal position gbest, as shown in the following formula:
[0080] ;
[0081] in, It is a chaotic sequence. For chaotic perturbation weights, The globally optimal position after applying chaotic perturbation;
[0082] S4 Iteration Termination: After reaching the preset maximum number of iterations or meeting the fitness value requirements, the globally optimal particle is decoded into the optimal weights and optimal threshold of the BP neural network model;
[0083] In this embodiment, the population size in the improved particle swarm optimization algorithm is set to N=10, the maximum number of iterations is K=50 (or 300), the initial acceleration coefficients are c1=c2=2, the initial inertia weights are ω=0.6, and the initial random factors are r1=r2=0.2.
[0084] Step 4: Assign the optimal initial weights and optimal thresholds to the BP neural network model, and train the BP neural network model again to obtain the trained IPSO-BP neural network prediction model.
[0085] Assign the optimal initial weights and thresholds obtained in step three to the BP neural network model, train the BP neural network model using the training set in step one, and further fine-tune the network parameters through the backpropagation algorithm until the preset training accuracy or maximum number of training iterations is achieved, thus obtaining the trained IPSO-BP neural network prediction model.
[0086] Step 5: Predict surface roughness based on the trained IPSO-BP neural network prediction model;
[0087] The laser drilling process parameters to be predicted (laser power, pulse frequency, and focus position deviation) are input into the trained IPSO-BP neural network model, and the model output is the corresponding predicted value of the micro-hole surface roughness.
[0088] This embodiment uses laser processing of micro-holes in titanium alloy TC4 as an example to describe in detail the proposed surface roughness prediction method. Three parameters are selected as input features: laser power, pulse frequency, and focal position deviation. Each parameter has three levels, as shown in the table below. A total of 27 parameter combinations were obtained through a full factorial experimental design.
[0089] Table 1. Parameter Combinations at Different Levels
[0090]
[0091] The surface roughness values of the micropores corresponding to each set of parameters were obtained through finite element simulation or preliminary experiments. 22 of the 27 sets of samples were used as the training set, and the remaining 5 sets were used as independent test sets.
[0092] A backpropagation (BP) neural network model is established, consisting of a 3-node input layer, 6-node hidden layers, and a 1-node output layer. The BP neural network model is then trained, following the procedure described below. Figure 2 As shown, the BP neural network model in this embodiment meets the accuracy requirements on the 7th training iteration, and the validation set reaches the minimum mean squared error (0.10729) on the fourth iteration, indicating successful convergence of the BP neural network model. The fitting performance of the BP neural network model's predicted output to the target value on the training set, validation set, test set, and overall dataset shows that the Pearson correlation coefficient R is greater than 0.85 on all datasets, indicating excellent model fitting.
[0093] This embodiment conducts simulation experiments based on both the training and test sets, and the simulation results are as follows: Figure 3 and Figure 4 As shown, simulation experiments compared the simulated values of five test set samples with the predicted values of the IPSO-BP model. The results show that the relative error of the predicted values is between 4.73% and 6.89%, demonstrating extremely high prediction accuracy.
[0094] The IPSO-BP neural network prediction model exhibits excellent prediction performance on the test set. Figure 3 The results show that, for 22 sets of training data, nearly 90% of the predicted values highly match the actual values, demonstrating the excellent overall fit of the IPSO-BP neural network prediction model. Further detailed error analysis... Figure 4 As shown in Table 2, for the five key test samples, the relative error of all samples falls within a narrow range of 4.73%-6.89%, indicating good prediction stability.
[0095] To verify the actual effectiveness of the BP neural network model, under the same processing conditions, three sets of parameter combinations that were not involved in training were randomly selected, as shown in Table 2 below, and actual laser drilling experiments were conducted. The surface roughness of the microholes was measured using a profilometer.
[0096] Table 2. Parameter combinations not involved in training
[0097]
[0098] The measured roughness values were compared with the model predictions and simulation values, and the results are as follows: Figure 5 As shown in Table 3.
[0099] Table 3 Comparison of measured roughness values with model predictions and simulation values
[0100]
[0101] The predicted values have small errors compared to the simulated values (3.78%~7.61%), which is in line with expectations. The relative errors between the predicted values and the actual measured values are 6.88%, 7.39%, and 8.50%, respectively, all less than 9%, proving that the prediction method in this embodiment can effectively predict the surface roughness of the actual laser drilling process with high accuracy.
[0102] This embodiment fully demonstrates that the laser drilling roughness prediction method based on improved IPSO and optimized BP proposed in this invention has the characteristics of high accuracy and strong generalization ability, and can be reliably used to guide the optimization of process parameters in actual production, significantly reducing the cost of experimental trial and error.
[0103] Example 2:
[0104] This embodiment proposes an electronic device, including: one or more processors, and a memory, wherein the memory is used to store instructions, and when the instructions are executed by the one or more processors, the one or more processors execute the laser drilling roughness prediction method based on improved IPSO optimized BP.
[0105] The electronic device may be a mobile phone, computer, or tablet computer, etc., and includes a memory and a processor. The memory stores a computer program, which, when executed by the processor, implements the laser drilling roughness prediction method based on improved IPSO optimized BP as described in the embodiments. It is understood that the electronic device may also include input / output (I / O) interfaces and communication components.
[0106] The processor is used to execute all or part of the steps in the laser drilling roughness prediction method based on improved IPSO optimized BP as described in the above embodiments. The memory is used to store various types of data, which may include, for example, instructions for any application or method in the electronic device, as well as application-related data.
[0107] The processor can be implemented as an Application Specific Integrated Circuit (ASIC), Digital Signal Processor (DSP), Programmable Logic Device (PLD), Field Programmable Gate Array (FPGA), controller, microcontroller, microprocessor, or other electronic components, and is used to execute the laser drilling roughness prediction method based on improved IPSO optimized BP described in the above embodiments.
[0108] Example 3:
[0109] This embodiment proposes a computer-readable storage medium that stores executable instructions. When these instructions are executed, if they are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium.
[0110] The computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the laser drilling roughness prediction method based on improved IPSO optimized BP described in various embodiments of this application.
[0111] The aforementioned storage media include: flash memory, hard disks, multimedia cards, card-type memory (e.g., SD (Secure Digital Memory Card) or DX (Memory Data Register, MDR) memory), random access memory (RAM), static random-access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic storage, disks, optical discs, servers, APP (Application) app stores, and other media capable of storing program verification codes. These media store computer programs, which, when executed by a processor, can implement the various steps of the laser drilling roughness prediction method based on improved IPSO and optimized BP as described above.
[0112] Example 4:
[0113] This embodiment proposes a computer program product, including a computer program or instructions, which, when executed by a processor, implements the laser drilling roughness prediction method based on improved IPSO optimized BP.
[0114] Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a computer program product.
[0115] The various embodiments in this application are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.
[0116] The scope of protection of this application is not limited to the embodiments described above. Obviously, those skilled in the art can make various modifications and variations to this disclosure without departing from the scope and spirit of this disclosure. If such modifications and variations fall within the scope of this disclosure and its equivalents, then the intent of this disclosure also includes these modifications and variations.
Claims
1. A laser drilling roughness prediction method based on improved IPSO and optimized BP, characterized in that, Includes the following steps: Multiple process parameters for laser drilling are selected, preprocessed, and a sample dataset is constructed based on the preprocessed process parameters. A BP neural network model is constructed. The sample dataset is input into the BP neural network model, and the network structure parameters of the BP neural network model are optimized by using the improved particle swarm optimization algorithm (IPSO) to obtain the optimal network structure parameters of the BP neural network model. The optimal network structure parameters are assigned to the BP neural network model, and the BP neural network model is trained again using the sample dataset to obtain the trained BP neural network model. Predicting the surface roughness of micropores based on a trained BP neural network model.
2. The laser drilling roughness prediction method based on improved IPSO and optimized BP according to claim 1, characterized in that, The multiple process parameters include at least laser power, pulse frequency, and focal position deviation; The preprocessing includes denoising, outlier handling, improved normalization, and feature selection. The specific method for constructing a sample dataset based on preprocessed process parameters is as follows: The preprocessed process parameters are used as input features, and the surface roughness values of the micropores obtained based on the preprocessed process parameters are used as output labels to construct a sample dataset, which is then divided into a training set and a test set.
3. The laser drilling roughness prediction method based on improved IPSO and optimized BP according to claim 1, characterized in that, The BP neural network model includes an input layer, a hidden layer, and an output layer; wherein the number of nodes in the input layer is equal to the number of process parameters.
4. The laser drilling roughness prediction method based on improved IPSO and optimized BP according to claim 1, characterized in that, The specific method for optimizing the network structure parameters of the BP neural network model using the improved particle swarm optimization algorithm (IPSO) is as follows: Set the maximum number of iterations K; randomly generate a particle swarm, including N particles of dimension D; the position vector of each particle represents a set of network structure parameters of the BP neural network model, and set the legal range of the network structure parameters; A multi-objective integrated fitness function is established based on the prediction error, network structure parameters, and regularization penalty term of the BP neural network on the training set. The fitness value of each particle is calculated based on the multi-objective integrated fitness function. The velocity and position of each particle are updated based on the network structure parameters and fitness value. The historical best position of each particle after each iteration is recorded, and the maximum position in the population is selected as the global best position. Once the preset maximum number of iterations or fitness value is met, the globally optimal particle is decoded and determined as the optimal network structure parameters for the BP neural network model.
5. The laser drilling roughness prediction method based on improved IPSO and optimized BP according to claim 4, characterized in that, The network structure parameters include weights, thresholds, learning rate, and the number of hidden layer nodes.
6. The laser drilling roughness prediction method based on improved IPSO and optimized BP according to claim 5, characterized in that, The multi-objective integrated fitness function established based on the prediction error, network structure parameters, and regularization penalty term of the BP neural network on the training set is shown in the following formula: ; in, Mean square error, The mean square error weighting coefficient is... For learning rate, For the desired learning rate, The learning rate weighting coefficient. This represents the number of hidden layer nodes. The desired number of hidden layer nodes. The weighting coefficient for the number of hidden layer nodes. For regularization terms, This is the weight coefficient for the regularization term.
7. The laser drilling roughness prediction method based on improved IPSO optimized BP according to claim 6, characterized in that, The specific method for updating the velocity and position of each particle based on network structure parameters and fitness values is as follows: The particle velocity and position update rules are set based on the weights and fitness values in the network structure parameters, as shown in the following formula: ; ; in, For the number of iterations, For weights, The first acceleration coefficient, This is the second acceleration coefficient; and A random number between [0,1] For the first In the next iteration, particles speed Dimensional components; For the first In the next iteration, particles Location dimensional components, For particles The historical best position; For the first The global optimal position in the next iteration; Adjusting weights based on an adaptive nonlinear inertia weight adjustment strategy And adjust the first and second acceleration coefficients based on the adaptive learning factor; Set a threshold for stalled iterations; if continuous... If the fitness value of the population satisfies the stagnation iteration threshold, then a chaotic perturbation is applied to the global optimal position.
8. The laser drilling roughness prediction method based on improved IPSO optimized BP according to claim 7, characterized in that, The specific method for adjusting the weights based on the adaptive nonlinear inertia weight adjustment strategy is as follows: The weights are updated based on the valid range of the weights and the number of iterations, as shown in the following formula: ; in, For the first The weights for the next iteration. The upper limit of the legal range of weights. This is the lower bound of the legal range for the weights. It is a non-linear adjustment index.
9. The laser drilling roughness prediction method based on improved IPSO and optimized BP according to claim 7, characterized in that, The specific method for adjusting the first and second acceleration coefficients based on the adaptive learning factor is as follows: Set the initial and final values of the first and second acceleration coefficients respectively, and update the first acceleration coefficient according to the number of iterations. Second acceleration coefficient As shown in the formula below: ; ; in, For the first The first acceleration factor in the next iteration This is the initial value of the first acceleration coefficient. This is the final value of the first acceleration coefficient. For the first The second acceleration factor in the next iteration This is the initial value of the second acceleration coefficient. This is the final value of the first acceleration coefficient.