Clamping parameter optimization method based on neural network and penalty PSO
By combining a BP neural network with a penalized PSO algorithm, an optimization objective function with penalized constraints is constructed, which solves the problem of multiple performance constraints in clamping parameter optimization, realizes a fast and accurate optimal parameter combination, improves the uniformity and stability of clamping parameters, and is suitable for complex clamping engineering design.
Patent Information
- Application Number
- CN202511101426.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-07
- Publication Date
- 2025-11-14
AI Technical Summary
Existing particle swarm optimization algorithms struggle to effectively combine multiple performance constraints when dealing with clamping parameter optimization, resulting in low optimization efficiency and difficulty in guaranteeing global optimum, especially when specific requirements need to be met for indicators such as stress, strain, and uniformity.
By combining a backpropagation neural network with a penalized particle swarm optimization (PSO) algorithm, an optimization objective function with penalty constraints is constructed. The neural network is used to predict performance indicators and a penalty mechanism is introduced to guide the PSO algorithm to find the optimal parameter combination, ensuring that the constraints of multiple performance indicators are met and the optimization results are practical for engineering applications.
It enables the rapid and accurate finding of the optimal combination of clamping parameters under multiple performance constraints, ensuring that the optimization results conform to engineering practice, improving the uniformity and stability of clamping parameters, avoiding stress/strain concentration, and improving machining accuracy and part life.
Smart Images

Figure CN120951484A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of clamping process optimization technology, specifically to a clamping parameter optimization method based on neural networks and penalty PSO. Background Technology
[0002] In complex clamping engineering design and manufacturing processes, system performance is often influenced by the combined effects of multiple clamping input parameters, and these parameters may exhibit nonlinear coupling relationships. Finding a set of optimal clamping input parameters quickly and accurately to achieve overall optimality while satisfying specific performance constraints is a challenging problem. Traditional optimization methods, such as particle swarm optimization (PSO), genetic algorithm (GA), or experience-based adjustments, are inefficient and struggle to guarantee global optimality. While machine learning models such as neural networks can effectively learn and predict the input-output relationships of complex systems, combining these predictive models with optimization algorithms, especially under multiple performance constraints (e.g., stress and strain must not exceed allowable values, and uniformity must meet specific requirements), remains a key research focus. Therefore, imposing constraints on the PSO algorithm to optimize the output results, thereby quickly and accurately finding a set of optimal input parameter combinations, is a crucial approach to solving the optimal parameter combination problem in complex engineering.
[0003] Among existing optimization algorithms, the Parametric Optimization Search (PSO) algorithm, as an efficient global optimization algorithm, has been widely applied to parameter optimization problems. However, when dealing with constrained optimization problems, the standard PSO algorithm usually requires the introduction of additional constraint handling mechanisms. Simple constraint handling methods, such as discarding infeasible solutions, may reduce search efficiency, while more complex mechanisms require careful design. Currently, there is still room for improvement in how to effectively integrate domain knowledge regarding expectations for specific performance indicators and inviolable red lines into the optimization objective of PSO to guide the optimization direction and obtain optimization results that better reflect engineering realities. Summary of the Invention
[0004] To address the problems in existing technologies, this invention provides a method for optimizing clamping parameters based on neural networks and penalized PSO, aiming to utilize the swarm intelligence characteristics of PSO to find the optimal parameter combination and ensure the engineering practicality of the optimization results.
[0005] A method for optimizing clamping parameters based on neural networks and penalized PSO includes the following steps:
[0006] Step 1: Construct and obtain a trained BP neural network model that can predict several key performance output indicators based on a set of input parameters; the input parameters are process or design variables.
[0007] Step 2: Select some or all of the key performance output indicators. Based on the expected characteristics and preset ideal value range of each key performance output indicator, standardize each key performance output indicator to obtain normalized indicators. Then, perform weighted summation of the normalized indicators with preset weights to obtain the basic comprehensive performance indicators.
[0008] Step 3: For a specific key performance output indicator, set its allowable upper limit threshold; when the key performance output indicator exceeds its corresponding threshold, calculate the corresponding penalty term; the size of the penalty term is proportional to the square of the degree to which the threshold is exceeded, and multiplied by the corresponding penalty coefficient, and the sum of all individual penalty terms constitutes the total penalty term.
[0009] Step 4: Combine the basic comprehensive performance index with the total penalty term to construct an optimization objective function with penalty constraints;
[0010] Step 5: The constrained particle swarm optimization algorithm initializes a swarm of particles, with each particle's position representing a set of input parameters. Within a preset parameter range, it iteratively updates the particle's velocity and position to search for the optimal solution. In each iteration, based on each particle's current position, it uses the key performance indicators output by the BP neural network model, and then calculates the fitness using a penalized objective function. The constrained particle swarm optimization algorithm updates the particle state based on the individual particle's historical best and the global historical best until the termination condition is met, outputting the optimal combination of input parameters that maximizes the fitness.
[0011] Furthermore, the input parameters include clamping support force, clamping positioning force, number of interval points and number of layers, and the key performance output indicators include maximum stress, stress uniformity in the X / Y / Z directions, maximum strain, strain uniformity in the X / Y / Z directions, first natural frequency, second natural frequency and third natural frequency.
[0012] Furthermore, the BP neural network model is a multilayer perceptron network structure with an input layer, several hidden layers, and an output layer.
[0013] Further, this includes: output indicators for each key performance level. Standardization depends on the key performance output metric. The expected characteristics, and restrict all normalized indices to the [0,1] interval;
[0014] For an indicator where the smaller the expected value, the better, i.e., maximum stress Maximum strain ;
[0015]
[0016] For an indicator where a higher expected value is better, i.e., uniformity and first-order natural frequency ;
[0017]
[0018] in, For normalized indicators, To measure key performance output indicators Perform truncation and ensure its value is within the range. , ]Inside, .
[0019] Further, the optimization objective function with penalty constraints. for:
[0020]
[0021] in, Based on comprehensive performance indicators, This is the total penalty item.
[0022] Furthermore, in step 5, for each particle... Its location is And represents a set of input parameters, with a speed of ; in the In this iteration, the update formulas for particle velocity and position are:
[0023]
[0024] in, It is inertial weight. and All are learning factors. and All are random numbers between [0,1]. It is a particle The optimal position found so far. It is the optimal position found by the entire population at present, which is composed of all particles.
[0025] Furthermore, the termination condition is that the iteration continues until the maximum number of iterations is reached.
[0026] The beneficial effects of this invention are as follows: It effectively combines particle swarm optimization (PSO) with neural networks, introduces a comprehensive performance index, and constructs a comprehensive objective function that can comprehensively evaluate multiple performance aspects and guide the optimization direction. Simultaneously, it can apply dynamic penalties to behaviors that violate constraints, and finally utilizes the swarm intelligence characteristics of PSO to find the optimal parameter combination. This method efficiently handles the hard constraints of multiple performance indicators during the optimization process, ensuring the engineering practicality of the optimization results. Attached Figure Description
[0027] Figure 1 This is a flowchart of the present invention;
[0028] Figure 2 This is a schematic diagram of the neural network prediction model structure;
[0029] Figure 3 A flowchart for calculating basic comprehensive performance indicators;
[0030] Figure 4 This is a schematic diagram of the penalty function mechanism;
[0031] Figure 5 The overall block diagram of the parameter optimization system based on neural networks and penalized constraint PSO is shown below.
[0032] Figure 6 This is a convergence trend chart for PSO and CPSO. Detailed Implementation
[0033] The present invention will now be described in detail with reference to the accompanying drawings. Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention. The directional terms such as left, center, right, top, and bottom in the embodiments of the present invention are only relative concepts or referenced to the normal use state of the product, and should not be considered restrictive.
[0034] A method for optimizing clamping parameters based on neural networks and penalized PSO, such as Figure 1 As shown, it includes the following steps:
[0035] Step 1: Using historical or simulation data, construct and obtain a trained BP neural network model, such as... Figure 2 As shown, the BP neural network model is a multilayer perceptron network structure with an input layer, several hidden layers, and an output layer, enabling it to predict several key performance output indicators based on a set of input parameters; the input parameters include the clamping force. (N), clamping and positioning force (N), number of interval points (number) and number of layers (Layer) and other process or design variables, key performance output indicators include maximum stress Stress uniformity in the X / Y / Z directions Maximum strain Strain uniformity in the X / Y / Z directions First-order natural frequency Second-order natural frequency and third-order natural frequency Simultaneously load the input data normalization parameters. and output data normalization parameters Define the upper and lower bounds of the input variables. ,For example: : [-1000, 1000]N, : [-10, 10]N, [1, 5] : [2, 8];
[0036] Step 2: Select some or all of the key performance output indicators. Based on the expected characteristics and preset ideal value range of each key performance output indicator, standardize each key performance output indicator to obtain normalized indicators. Then, perform weighted summation of the normalized indicators with preset weights to obtain the basic comprehensive performance indicators.
[0037] The preset weights are pre-defined. In this embodiment, the preset weights are evenly distributed, meaning there are 5 predictor variables, each with a preset weight of 0.2. The top 9 outputs from the key performance indicators are selected to calculate the basic comprehensive performance index. Let these 9 outputs be Each output Each has its predefined range of values. , ];
[0038] First of all, Perform truncation to ensure its value is within [ , ]Inside:
[0039]
[0040] right Normalization is performed, and the normalization method depends on the expected characteristics of the indicator:
[0041] For an indicator where the smaller the expected value, the better, i.e., maximum stress Maximum strain :
[0042]
[0043] For an indicator where a higher expected value is better, i.e., uniformity and first-order natural frequency :
[0044]
[0045] if Approaching 0, then After processing by equations (2) and (3) above, all All are restricted to the interval [0,1];
[0046] Basic comprehensive performance indicators These are the normalized indicators Weighted sum:
[0047]
[0048] in, These are preset weights; basic comprehensive performance indicators The calculation process is shown in Figure 3;
[0049] Step 3: For specific key performance indicators (KPIs), set an allowable upper threshold; when a KPI exceeds its corresponding threshold, calculate the corresponding penalty term; the magnitude of the penalty term is proportional to the square of the degree to which the threshold is exceeded, and multiplied by the corresponding penalty coefficient. The sum of all individual penalty terms constitutes the total penalty term; specifically:
[0050] Define the following constraint threshold: the maximum allowable stress value is The maximum allowable strain value is The maximum allowable uniformity value is ,For example Pa, , ;
[0051] As shown in Figure 4, when the key performance output indicators Not exceeding the preset threshold At that time, penalty items It is zero; and when Penalty item when exceeding the threshold With excess The square of the term exhibits a quadratic nonlinear growth relationship, reflecting the quantitative penalty for the degree of constraint violation; the penalty term Calculated according to the following rules:
[0052] Maximum stress penalty :
[0053]
[0054] in, It is a penalty factor for exceeding stress and strain limits, for example, ;
[0055] Maximum strain penalty :
[0056]
[0057] Regarding stress uniformity punish :
[0058]
[0059] in, It is the penalty coefficient for exceeding the uniformity limit; for example, ;
[0060] Regarding strain uniformity punish :
[0061]
[0062] Total penalty items for:
[0063]
[0064] Step 4: Combine the basic comprehensive performance index with the total penalty term to construct an optimization objective function with penalty constraints;
[0065] Optimization objective function with penalty constraints for:
[0066]
[0067] in, Based on comprehensive performance indicators, The total penalty term; since standard PSO is typically designed as a minimization problem, the actual objective function passed to the PSO algorithm is... The goal is to minimize ;
[0068] Step 5: The Constrained Particle Swarm Optimization (CPSO) algorithm initializes a swarm of particles, with each particle's position representing a set of input parameters. Within a preset parameter range, it iteratively updates the particle's velocity and position to search for the optimal solution. In each iteration, based on each particle's current position, the algorithm uses the key performance indicators output by the BP neural network model, and then calculates the fitness using a penalty-constrained optimization objective function. The Constrained Particle Swarm Optimization algorithm updates the particle state based on the individual particle's historical best and the global historical best until the termination condition is met, outputting the optimal combination of input parameters that maximizes the fitness. Specifically:
[0069] For each particle Its location is And represents a set of input parameters, with a speed of ; in the In this iteration, the update formulas for particle velocity and position are:
[0070]
[0071] in, It is inertial weight. and All are learning factors. and All are random numbers between [0,1]. It is a particle The current optimal position (i.e., the historical optimal position of an individual particle). It is the current optimal position found by the entire population (i.e., the global historical optimal position), and the entire population consists of all particles; the CPSO algorithm has preset upper and lower bounds on the input variables. The search proceeds iteratively until the maximum number of iterations is reached or other stopping criteria are met, ultimately outputting an output that... smallest , Right now Maximum. The overall process of the parameter optimization method based on neural network prediction and penalized particle swarm optimization is as follows: Figure 5 As shown, the algorithm includes an input parameter module, a data preprocessing module, a neural network prediction module, a data postprocessing module, an objective function calculation module, a particle swarm optimizer module, and a result output module, which together constitute a closed-loop feedback system for parameter optimization.
[0072] The CPSO algorithm outputs the optimal parameter combination. Then use By using a neural network model to predict again, detailed performance indicators are obtained and compared with the constraints to verify the effectiveness of the optimization results.
[0073] Figure 6 The optimization results of the PSO and CPSO algorithms are compared. The PSO algorithm converges on the 40th iteration, achieving the global optimum in its basic comprehensive performance index. The corresponding optimal parameter combination is: clamping support force of -786.3237N, clamping positioning force of -1.079N, number of interval points of 5, and number of layers of 8. However, in practical engineering applications, this solution for the support force does not meet the requirements of engineering practice. In contrast, the CPSO optimization algorithm converges in the 41st iteration, and the constrained comprehensive performance index reaches the global optimum. The corresponding optimal parameter combination is: clamping support force of 19.8193N, clamping positioning force of -7.3236N, number of interval points of 3, and number of layers of 6. The results show that, under the condition that the number of iterations and the comprehensive performance index are not much different, the CPSO optimization algorithm can effectively generate support force and positioning force values that meet the engineering constraints.
[0074] To evaluate the performance of the CPSO algorithm proposed in this invention, it was compared with the PSO algorithm in the problem of optimizing clamping parameters for thin-walled parts. The results are shown in Table 1.
[0075] Table 1 Comparison of optimization effects between PSO and CPSO
[0076]
[0077] As can be seen, the maximum stress value obtained by the standard PSO algorithm is as high as -12473.86556 Pa, whose absolute value far exceeds the yield strength of typical thin-walled materials, indicating that the workpiece may undergo significant local plastic deformation, which does not meet the requirements of engineering applications. In contrast, the CPSO algorithm, with its effective stress upper limit constraint and penalty mechanism, precisely controls the maximum stress value at 79998.3204 Pa, allowing it to converge to the edge of the preset constraint threshold without triggering the penalty, fully verifying its accuracy and effectiveness in controlling key performance indicators. In terms of maximum strain, since the optimization results of both algorithms do not exceed the preset penalty threshold, they show a high degree of consistency. However, in the core stress and strain uniformity indicators, the CPSO algorithm shows an overwhelming advantage: its optimized anisotropic stress uniformity and strain uniformity indicators, and it should be noted that the closer the stress and strain uniformity are to 1.00, the better they reflect the dispersion and equilibrium of the stress and strain fields inside the workpiece. Compared with the results of the PSO algorithm, both achieved a significant improvement of about 90%. This result demonstrates that the clamping parameters optimized by the CPSO algorithm can significantly promote the dispersion and equalization of the internal stress and strain fields of the workpiece, effectively suppressing stress / strain concentration. This is crucial for improving machining accuracy, stability, and part service life. In summary, the CPSO algorithm not only strictly adheres to engineering allowable constraints but also far surpasses the standard PSO in improving the uniformity of key mechanical property distribution, confirming the superiority and engineering practical value of the optimization strategy proposed in this invention.
[0078] In practical applications, we first consider the upper and lower bounds of the optimization parameters, then set different penalty coefficients as needed, and finally optimize them using the CPSO algorithm to obtain the optimal combination parameters under the constraints.
[0079] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for optimizing clamping parameters based on neural networks and penalized PSO, characterized in that: Includes the following steps: Step 1: Construct and obtain a trained BP neural network model that can predict several key performance output indicators based on a set of input parameters; the input parameters are process or design variables. Step 2: Select some or all of the key performance output indicators. Based on the expected characteristics and preset ideal value range of each key performance output indicator, standardize each key performance output indicator to obtain normalized indicators. Then, perform weighted summation of the normalized indicators with preset weights to obtain the basic comprehensive performance indicators. Step 3: Set the upper limit of the allowed threshold for specific key performance output indicators; When the key performance output metric exceeds its corresponding threshold, a corresponding penalty term is calculated. The size of the penalty term is proportional to the square of the degree to which the threshold is exceeded, and multiplied by the corresponding penalty coefficient. The sum of all individual penalty terms constitutes the total penalty term. Step 4: Combine the basic comprehensive performance index with the total penalty term to construct an optimization objective function with penalty constraints; Step 5: The constrained particle swarm optimization algorithm initializes a group of particles, with the position of each particle representing a set of input parameters. Within a preset range of parameter values, it searches for the optimal solution by iteratively updating the velocity and position of the particles. In each iteration, based on the current position of each particle, the key performance output index is used by the BP neural network model, and then the fitness is calculated through the optimization objective function with penalty constraints. The constrained particle swarm optimization algorithm updates the particle state based on the individual particle's historical best and the global historical best until the termination condition is met, and outputs the optimal combination of input parameters that maximizes the fitness.
2. The clamping parameter optimization method based on neural networks and penalized PSO according to claim 1, characterized in that: Input parameters include clamping support force, clamping positioning force, number of interval points and number of layers. Key performance output indicators include maximum stress, stress uniformity in the X / Y / Z directions, maximum strain, strain uniformity in the X / Y / Z directions, first natural frequency, second natural frequency and third natural frequency.
3. The clamping parameter optimization method based on neural networks and penalized PSO according to claim 1, characterized in that: The BP neural network model is a multilayer perceptron network structure with an input layer, several hidden layers, and an output layer.
4. The clamping parameter optimization method based on neural networks and penalized PSO according to claim 1, characterized in that: Key performance output indicators Standardization depends on the key performance output metric. The expected characteristics, and restrict all normalized indices to the [0,1] interval; For an indicator where the smaller the expected value, the better, i.e., maximum stress Maximum strain ; ; For an indicator where a higher expected value is better, i.e., uniformity and first-order natural frequency ; ; in, For normalized indicators, To measure key performance output indicators Perform truncation and ensure its value is within the range. , ]Inside, .
5. The clamping parameter optimization method based on neural networks and penalized PSO according to claim 1, characterized in that: Optimization objective function with penalty constraints for: ; in, Based on comprehensive performance indicators, This is the total penalty item.
6. The clamping parameter optimization method based on neural networks and penalized PSO according to claim 1, characterized in that: In step 5, for each particle Its location is And represents a set of input parameters, with a speed of ; in the In this iteration, the update formulas for particle velocity and position are: ; in, It is inertial weight. and All are learning factors. and All are random numbers between [0,1]. It is a particle The optimal position found so far. It is the optimal position found by the entire population at present, which is composed of all particles.
7. The clamping parameter optimization method based on neural networks and penalized PSO according to claim 1, characterized in that: The termination condition is that the iteration continues until the maximum number of iterations is reached.
Citation Information
Cited By
Transformer model construction method and system based on detection impedance matrix
CN121787344A