Prediction method of bending forming parameters of hairpin structure of flat wire motor based on machine learning
By constructing a span prediction model based on a machine learning method, the angle deviation problem in the flat wire motor hairpin winding forming process was solved, high-precision span prediction and production efficiency were achieved, and process consistency and model robustness were improved.
Patent Information
- Application Number
- CN202511054979.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-30
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2045-07-30
AI Technical Summary
During the bending process of the hairpin windings of flat-wire motors, differences in material properties, fluctuations in process parameters, and changes in equipment status lead to deviations between the forming angle and the target angle, affecting the 3D mold forming accuracy and welding quality, increasing assembly difficulty, and even causing product scrapping.
A machine learning-based method is used to select feature parameters and objective functions to construct a span prediction model. The Lasso regression model is used for data analysis and prediction to automatically screen key features and reduce molding errors.
High-precision span prediction is achieved, with the error controlled within ±0.1 mm, which improves production efficiency and process consistency, shortens the time for model switching and molding machine adjustment, and enhances the stability and on-site applicability of the model.
Smart Images

Figure CN120561894B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method for predicting the bending forming parameters of a hairpin winding of a flat wire motor of a new energy vehicle, and in particular to a method for predicting the bending forming parameters of a hairpin structure of a flat wire motor based on machine learning, belonging to the technical field of new energy motor manufacturing. Background Art
[0002] Flat wire motors are widely used in new energy vehicle drive systems. Their hairpin windings are typically made of enameled wire, which boasts high conductivity and excellent mechanical properties. During the wire bending process, the actual forming angle often deviates from the target angle due to various factors, including material property variations, fluctuations in process parameters, and changes in equipment status. This deviation directly impacts the subsequent three-dimensional (3D) die forming accuracy, leading to increased difficulty in 3D assembly of the hairpin winding and poor welding quality, which in turn impacts the overall performance of the motor and, in severe cases, may even render the product scrapped. Therefore, precisely controlling the 2D angle and span of the hairpin winding to minimize forming errors is a pressing issue in the production of flat wire motor hairpin windings. Summary of the Invention
[0003] To address the above problems, the present invention provides a method for predicting the bending forming parameters of the flat wire motor hairpin structure based on machine learning, which overcomes the span and angle deviations caused by material rebound and process parameter changes in the 2D bending forming stage of the flat wire motor stator hairpin winding.
[0004] The present invention solves the technical problem by adopting the following technical solutions:
[0005] The method for predicting the bending forming parameters of the hairpin structure of a flat wire motor based on machine learning includes the following steps:
[0006] Step 1: Select several sets of enameled wire hairpin winding bending parameters, each set of parameters includes the first straight line segment , the second straight line segment , the third straight line segment , the fourth straight line segment , first bending angle , second bending angle , the third bending angle and the first height , second height ;
[0007] Step 2: Add the third straight line segment , second bending angle , the third bending angle Set as the characteristic parameter, that is, the input of the prediction model, the first straight line segment and the fourth straight line segment The span between is set as the objective function, i.e. the output of the model;
[0008] Step 3: Bend the enameled wire hairpin winding into the first straight line segment , the second straight line segment , the fourth straight line segment , first bending angle and the first height , second height To fix the parameters, conduct bending forming experiments and obtain the third straight line segment , second bending angle , the third bending angle and experimental data of span;
[0009] Step 4: Preprocess the acquired experimental data;
[0010] Step 5: Perform linear correlation analysis on the processed data to verify whether the processed data is linearly related. Specific analysis methods include: scatter plot analysis, Pearson correlation coefficient calculation, and linear regression test. These methods can comprehensively predict the relationship between the data and provide a basis for subsequent modeling and analysis;
[0011] Step 6: After preprocessing the sample data and verifying the existence of a significant linear relationship, a span prediction model is constructed based on seven regression methods.
[0012] Compared with the prior art, the present invention has the following beneficial effects:
[0013] 1. High-precision prediction: By introducing the Lasso regression model, the present invention achieves span prediction MSE ≤ 0.00071 mm² and R² ≥ 0.9962 in 5-fold cross-validation, and can control the span prediction error within ±0.1 mm;
[0014] 2. Model simplicity and robustness: L1 regularization automatically removes redundant features and only retains 、 Two,enhanced the stability and field applicability of the model;
[0015] 3. Improved process consistency: As the main control parameter, As a compensation amount, it can quickly converge to the optimal process value, reducing the geometric deviation of the molded parts and the rework rate;
[0016] 4. The traditional experience method and trial and error method require an average of 5-6 adjustments to achieve qualified results after forming a hairpin winding. The prediction method can be completed within 1-2 times, which can greatly improve the time efficiency of switching hairpin winding models, forming and adjusting machines.
[0017] 5. Good scalability: The present invention can be seamlessly integrated with online visual measurement and adaptive control technologies, and can be extended to 3D post-molding parameter prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 This is a flow chart of a method for predicting bending forming parameters of a flat wire motor hairpin structure based on machine learning;
[0019] Figure 2 This is the 2D forming geometric dimension drawing of the hairpin winding of the flat wire motor;
[0020] Figure 3 is the independent variable Scatter plot with the span of the target variable;
[0021] Figure 4 Independent variable Scatter plot with the span of the target variable;
[0022] Figure 5 is the independent variable Scatter plot with the span of the target variable;
[0023] Figure 6 It is the prediction result graph of the model;
[0024] Figure 7 is the prediction error result graph; DETAILED DESCRIPTION
[0025] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.
[0026] 1. See Figure 1-7 The method for predicting the bending forming parameters of the flat wire motor hairpin structure based on machine learning in this specific embodiment includes the following steps:
[0027] Step 1: Select several sets of enameled wire hairpin winding bending parameters, each set of parameters includes the first straight line segment , the second straight line segment , the third straight line segment , the fourth straight line segment , first bending angle , second bending angle , the third bending angle and the first height , second height ;
[0028] Step 2: Add the third straight line segment , second bending angle , the third bending angle Set as the characteristic parameter, that is, the input of the prediction model, the first straight line segment and the fourth straight line segment The span between is set as the objective function, i.e. the output of the model;
[0029] Step 3: Bend the enameled wire hairpin winding into the first straight line segment , the second straight line segment , the fourth straight line segment , first bending angle and the first height , second height To fix the parameters, conduct bending forming experiments and obtain the third straight line segment , second bending angle , the third bending angle and experimental data of span;
[0030] Step 4: Preprocess the acquired experimental data;
[0031] Step 5: Perform linear correlation analysis on the processed data to verify whether the processed data is linearly related. Specific analysis methods include: scatter plot analysis, Pearson correlation coefficient calculation, and linear regression test. These methods can comprehensively predict the relationship between the data and provide a basis for subsequent modeling and analysis;
[0032] Step 6: After preprocessing the sample data and verifying the existence of a significant linear relationship, a span prediction model is constructed based on seven regression methods.
[0033] Example:
[0034] The machine learning-based method for predicting the bending forming parameters of the flat wire motor hairpin structure uses data collected by FAW Mould Manufacturing Co., Ltd. during the 2D forming production process of the flat wire motor hairpin winding of new energy vehicles. The enameled wire used is a data set with a specification of 4.1mm×2.4mm, which verifies the effectiveness and superiority of the proposed method. During the production process, the process parameters such as straight segments, different bending angles and heights are precisely set and adjusted, and the key process parameters and geometric features of the forming process are collected, thus covering the typical forming conditions in actual production. The main features include the first straight segment , the second straight line segment , the third straight line segment , the fourth straight line segment , first bending angle , second bending angle , the third bending angle and the first height , second height ,like Figure 2 shown.
[0035] During the prediction process, the collected data is first subjected to the linear correlation analysis of step 5. The analysis process is as follows:
[0036] (1) Scatter plot
[0037] This method selects the main parameter variables 、 、 and target variable span, and draw scatter plots between these variables. Each point in the graph represents a set of observation data, and the horizontal and vertical axes represent the values of the independent and dependent variables respectively. By observing the shape of the scatter plot, we can preliminarily infer whether there is a linear or nonlinear relationship between the variables. Figure 3 From the scatter plot of features and target variables, 、 、 There is a strong positive linear relationship between the data points and the span, and the data points are distributed very regularly. Further Pearson correlation analysis and regression modeling can better verify this relationship and establish an accurate prediction model.
[0038] (2) Pearson correlation coefficient
[0039] To further explore the linear influence of each geometric feature on the target variable “span”, this method calculates the third straight line segment , second bending angle , the third bending angle Pearson correlation coefficient between and span. Pearson correlation coefficient Describes the strength and direction of the linear correlation between two continuous variables, and its value range is [-1, 1]. The closer the absolute value is to 1, the stronger the linear correlation is; closer to 0, the weaker the linear correlation is. This method uses formula (1) for calculation:
[0040] (1)
[0041] : Pearson correlation coefficient, indicating the variable and The strength and direction of the linear correlation between :No. of samples variable value, :No. The y variable value of the sample, : The mean of the variable is calculated as , : The mean of the variable is calculated as , : The total number of sample data, : The summation symbol indicates that the summation operation is performed on all samples.
[0042] This formula calculates the variable and The Pearson correlation coefficient is a measure of the strength of the relationship between two variables by multiplying the product of the deviations (i.e., the difference between each sample value and its mean). The denominator is the product of the standard deviations, which ensures that the value of the Pearson correlation coefficient is between [-1, 1], reflecting the linear correlation between the variables.
[0043] Table 1 Pearson correlation coefficient matrix results
[0044] <![CDATA[b3]]> <![CDATA[d2]]> <![CDATA[d3]]> span <![CDATA[b3]]> 1.000000 0.925221 -0.992599 0.999909 <![CDATA[d2]]> 0.925221 1.000000 -0.918698 0.926189 <![CDATA[d3]]> -0.992599 -0.918698 1.000000 -0.992658 span 0.999909 0.926189 -0.992658 1.000000
[0045] The calculation results are shown in Table 1. According to the Pearson correlation coefficient matrix, the following conclusions can be drawn:
[0046] Pearson correlation analysis shows that there is a strong linear relationship between span and geometric features, where and It is the core influencing factor of span. High collinearity needs to be addressed through regularization or feature selection, laying the foundation for the subsequent establishment of a robust prediction model and the formulation of an accurate forming process control strategy.
[0047] (3) Linear regression test
[0048] 1) Univariate Linear Regression
[0049] The univariate model is of the form
[0050] (2)
[0051] in To predict the span, is a single independent variable ( 、 or ), and are the intercept and regression coefficient respectively. The regression results are shown in Table 2.
[0052] Table 2 Univariate linear regression results
[0053] <![CDATA[R 2 ]]> Regression coefficient <![CDATA[b3-span linear regression]]> 0.9998186875103009 1.11425905 <![CDATA[d2-span linear regression]]> 0.8578258594694010 1.56410403 <![CDATA[d3-span linear regression]]> 0.9853690652430046 -1.78647573
[0054] From the results of univariate regression, we can see that The linear relationship with span is very close ( close to 1), indicating It is the most critical variable in span prediction. The negative correlation with span is also very significant ( Higher), indicating The change of is significantly inversely related to the span. Although it is also positively correlated with span, its explanatory strength ( ≈ 0.858) is relatively weak and may be more affected by other factors.
[0055] 2) Multiple Linear Regression
[0056] In practical applications, in order to more fully explain the variation of span, all three geometric features are 、 and At the same time, the regression model is incorporated. This can effectively consider the joint impact of various features on the span, thereby improving the accuracy of span prediction and the explanatory power of the model. The expression of the multiple linear regression model is as follows:
[0057] (3)
[0058] in: is the predicted span value (target variable), 、 and are independent variables, representing the third straight line segment, the second bending angle, and the third bending angle, respectively. is the intercept term, which represents the value of the span when all independent variables are zero. 、 and is the regression coefficient, which indicates the strength of the linear relationship between the independent variable and the dependent variable.
[0059] According to the regression analysis results, the following multiple regression results are obtained, as shown in Table 3:
[0060] Table 3 Multiple linear regression results
[0061]
[0062] The results of multiple regression showed that the model It reached 0.99983, indicating that These three variables can almost completely explain the variation in span. The specific analysis is as follows:
[0063] The coefficient is 1.09578 and the span increases by about 1.10 units. This shows that when other indicators remain unchanged, For every 1 unit increase, the span increases by approximately 1.10 units. The coefficient is 0.01230. The effect of span is negligible, increasing by 1 unit It only increases the span by about 0.0123 units. This coefficient is very small, indicating that The effect on span is minimal, increasing by 1 unit It only increases the span by about 0.0123 units. The coefficient is -0.01785. The effect of span is also very small, with an increase of 1 unit , the span is reduced by approximately 0.0179: Similarly, The effect on span is also small, with each additional unit , the span decreases by approximately 0.01785 units.
[0064] The combination of these analytical methods confirms, from various perspectives, that the data exhibits a strong linear relationship within the current range. Therefore, the use of a linear model to explain and predict span is both reasonable and effective, providing a solid foundation for subsequent model application and process adjustments.
[0065] According to the linear correlation of the data analyzed in step 5, the seven regression methods in step 6 are used to construct a span prediction model. The specific analysis is as follows:
[0066] To achieve robust and reliable model predictions, this method employs a 5-fold cross-validation strategy for training and testing all regression models. This approach ensures the independence of each test set, avoiding the accidental bias introduced by a single split, while also fully utilizing limited data resources. By averaging multiple training and testing cycles, it effectively reduces prediction error, improving the fairness of model comparisons and the robustness of the results. Figure 6 Table 4 and Table 4 respectively give the prediction result curves of each model and the corresponding prediction data:
[0067] like Figure 6As shown, the predicted curves of each model closely match the true value, with only slight differences at extreme values. Specifically, the true span fluctuates slightly between approximately 58 mm and 60.5 mm. Lasso regression fits the true curve almost perfectly, with only minimal deviation near the peak of the ninth sample, demonstrating its robustness advantage achieved through feature selection using L1 regularization. ElasticNet and OLS regression also closely follow the true curve, with ElasticNet achieving a comparable fit to OLS by combining L1 and L2 regularization. Ridge regression only slightly underestimates the true span by approximately –0.3 mm at the highest point, reflecting the L2 penalty that shrinks the regression coefficients, making it more conservative with respect to extreme values. Random forest regression and support vector regression (SVR) reproduce the overall trend, but their predictions are slightly smoothed at locations with sharp span changes, indicating that nonlinear models are not sensitive to subtle linear fluctuations. Gradient boosting regression is more sensitive to noise at this data scale, resulting in slightly larger prediction errors than other models at plateaus and turning points. Overall, the prediction curves of all models effectively capture the changing trend of span with the sample sequence.
[0068] Table 4 Model prediction results data
[0069] Sample sequence True value OLS prediction Ridge Forecast Lasso prediction ElasticNet Prediction Random Forest Prediction Gradient Boosting Prediction SVR prediction 1 58.31 58.261972 58.307594 58.296461 58.301858 58.2796 58.280154 58.257945 2 59.07 59.069033 59.066113 59.061076 59.062802 59.0708 59.070165 59.072493 3 58.54 58.539389 58.558203 58.561176 58.560626 58.5438 58.549849 58.531448 4 58.78 58.778719 58.788765 58.786870 58.787835 58.7832 58.789064 58.775310 5 59.34 59.340049 59.323427 59.317354 59.319050 59.3346 59.331045 59.348293 6 59.07 59.069033 59.066113 59.061076 59.062802 59.0708 59.070165 59.072493 7 58.71 58.709359 58.721837 58.721482 58.721958 58.7114 58.721157 58.704352 8 58.07 58.069190 58.102772 58.118227 58.113562 58.0801 58.040315 58.066832 9 58.75 58.749554 58.760228 58.759449 58.760026 58.7465 58.740147 58.745364 10 58.90 58.787713 58.532300 58.911317 58.759636 58.6761 58.595796 58.685337
[0070] As shown in Table 4 for the predicted and true values of ten samples, we can see that most models closely tracked small fluctuations in the span during prediction. With the exception of a few extreme samples, all prediction errors remained within ±0.03, demonstrating highly consistent linear fit. Specifically, OLS is simple and efficient, with particularly low fitting errors for intermediate samples, but slightly underestimates the fit for extremely large and small samples (such as sequence 10). Ridge, due to L2 regularization, generally underestimates extreme values. Lasso, leveraging the sparsifying properties of L1 regularization, achieves the lowest error for both general and extreme samples, achieving the best performance. ElasticNet follows closely behind, combining the advantages of L1 / L2, offering both variable selection and coefficient stability. In comparison, Random Forest and SVR can capture subtle nonlinear trends and are somewhat robust to noise and outliers, but their prediction accuracy is slightly lower than that of the optimal linear model. Gradient Boosting Regression is more sensitive to noise at this data scale, resulting in higher overall error. In terms of comprehensive performance and stability, Lasso regression performs best in the span prediction task of this study: it not only provides the lowest average prediction error, but also reduces the risk of overfitting through automatic feature selection.
[0071] To further compare the prediction performance of different models, this method also compared the model prediction errors and calculated the mean square error (MSE) and determination coefficient (R2 );
[0072] The calculation formula of MSE is:
[0073] (4)
[0074] in: is the number of samples (number of data points), It is a sample The true value of is the model predicted value.
[0075] Coefficient of determination ( ), also known as goodness of fit, is used to measure the degree to which the model fits the data and indicates the ability of the independent variable to explain the changes in the dependent variable. The value of is between 0 and 1. The closer the value is to 1, the better the model fits the data.
[0076] The calculation formula is:
[0077] (5)
[0078] in: It is a sample The true value of is the model prediction value; is the true value The mean of is the number of samples.
[0079] The prediction error results of the above machine model are shown in Table 5. Figure 7 As shown, it can be seen that there are certain differences in the performance of different regression models: Lasso regression has the smallest error (MSE=0.000710) and the highest goodness of fit ( =0.996153), the model performs best. OLS regression is stable. It reaches 0.994986, but its MSE is 0.000926, slightly higher than Lasso. ElasticNet regression has the following advantages: error (MSE=0.000874) and goodness of fit ( =0.995262) is very close to Lasso. In contrast, the error of Ridge regression is larger (MSE=0.002029). The performance of the two nonlinear models, random forest and SVR, is similar, with MSE of 0.001005 and 0.001266 respectively. The results are 0.994646 and 0.993144, which are better at capturing nonlinear relationships, but the overall effect is slightly lower than that of Lasso. The error of gradient boosting regression is the largest (MSE=0.001885). The lowest value (0.989914) is the weakest among all the methods. In summary, Lasso regression has the lowest MSE and the highest It performs the best among all models and effectively avoids overfitting through L1 regularization; OLS and ElasticNet are second, with similar performance; Random Forest and SVR perform well in capturing complex relationships and follow closely behind; Gradient Boosting Regression fails to surpass other models.
[0080] Table 5 Performance prediction indicators of each regression model (comparison of machine model prediction errors)
[0081] Prediction Model MSE <![CDATA[R 2 ]]> OLS 0.000926 0.994986 Ridge 0.002029 0.989046 Lasso 0.000710 0.996153 ElasticNet 0.000874 0.995262 Random Forest 0.001005 0.994646 Gradient Boosting 0.001885 0.989914 SVR 0.001266 0.993144
[0082] This paper introduces Lasso regression to establish a span prediction model, automatically screening key features, and significantly improving the simplicity and robustness of the model. Experiments have shown that the proposed method achieves excellent prediction accuracy in a five-fold cross-validation, effectively controlling the span error within ±0.1 mm during the CNC trial production phase. Compared with traditional experience, the average cycle time for switching the hairpin winding model and forming machine adjustment is shortened by 70%-80%, significantly improving the consistency and production efficiency of hairpin forming. Further feature contribution analysis shows that The main influencing factors are Secondly, The impact is small, the control direction of key parameters is clarified, and an efficient and feasible optimization direction is provided for the hairpin winding bending process.
Claims
1. A method for predicting the bending parameters of the hairpin structure of a flat wire motor based on machine learning, which is characterized by The steps include: Step 1: Select multiple sets of enameled wire hairpin winding bending parameters, each set of parameters includes the first straight line segment , the second straight line segment , the third straight line segment , the fourth straight line segment , first bending angle , second bending angle , the third bending angle and the first height , second height ; Step 2: Add the third straight line segment , second bending angle , the third bending angle Set as the characteristic parameter, that is, the input of the prediction model, the first straight line segment and the fourth straight line segment The span between is set as the objective function, i.e. the output of the model; Step 3: Bend the enameled wire hairpin winding into the first straight line segment , the second straight line segment , the fourth straight line segment , first bending angle and the first height , second height To fix the parameters, conduct bending forming experiments and obtain the third straight line segment , second bending angle , the third bending angle and experimental data of span; Step 4: Preprocess the acquired experimental data; Step 5: Perform linear correlation analysis on the processed data to verify whether the processed data is linearly related. Specific analysis methods include: scatter plot analysis, Pearson correlation coefficient calculation, and linear regression test. These methods can comprehensively predict the relationship between the data and provide a basis for subsequent modeling and analysis; Step 6: After preprocessing the sample data and verifying the existence of a significant linear relationship, a span prediction model is constructed based on seven regression methods.
2. The method for predicting bending parameters of a flat wire motor hairpin structure based on machine learning according to claim 1, characterized in that: The analysis method in step 5 includes: scatter plot analysis, Pearson correlation coefficient calculation, and linear regression test. The specific analysis is as follows: (1) Scatter plot This method selects the parameter variable 、 、 and target variable span, and draw scatter plots between these variables respectively; each point in the figure represents a set of observation data, and the horizontal and vertical axes represent the values of the independent variable and the dependent variable respectively; by observing the shape of the scatter plot, we can preliminarily infer whether there is a linear or nonlinear relationship between the variables; from the scatter plot of the feature and the target variable, 、 、 There is a strong positive linear relationship between the data points and the span, and the distribution of the data points is very regular. Through further Pearson correlation analysis and regression model, a prediction model is established. (2) Pearson correlation coefficient Calculate the third straight line segment , second bending angle , the third bending angle Pearson correlation coefficient between and span; Pearson correlation coefficient Describes the strength and direction of the linear correlation between two continuous variables. Its value range is [−1, 1]. The closer the absolute value is to 1, the stronger the linear correlation is; the closer it is to 0, the weaker the linear correlation is. This method uses formula (1) for calculation: (1) : Pearson correlation coefficient, indicating the variable and The strength and direction of the linear correlation between :No. of samples variable value, :No. The y variable value of the sample, : The mean of the variable is calculated as , : The mean of the variable is calculated as , : The total number of sample data, : Summation symbol, indicating the summation operation of all samples; This formula calculates the variable and The sum of the products of the deviations is used to measure the strength of the relationship between the two variables. The denominator is the product of the standard deviations, which ensures that the value of the Pearson correlation coefficient is between [−1, 1], reflecting the linear correlation between the variables. The Pearson correlation analysis shows that there is a very strong linear relationship between the span and the geometric characteristics. (3) Linear regression test 1) Univariate Linear Regression The univariate model is of the form (2) in To predict the span, is a single independent variable, and are the intercept and regression coefficient respectively; from the results of univariate regression, The linear relationship between the span and the It is the most critical variable in span prediction; The negative correlation with span is also very significant, indicating that The change of is inversely related to the span; Although it is also positively correlated with span, its explanatory power is relatively weak and may be more affected by other factors; 2) Multiple Linear Regression All three geometric features 、 and At the same time, the regression model is included; considering the joint influence of each feature on the span, the expression of the multiple linear regression model is as follows: (3) in: is the predicted span value, 、 and are independent variables, representing the third straight line segment, the second bending angle and the third bending angle respectively. is the intercept term, which represents the value of the span when all independent variables are zero. 、 and is the regression coefficient, which indicates the strength of the linear relationship between the independent variable and the dependent variable; the multiple regression results show that the model It reached 0.99983; the specific analysis is as follows: The coefficient is 1.09578 and the span increases by 1.10 units; this indicates that when other indicators remain unchanged, For every 1 unit increase, the span increases by 1.10 units; The coefficient is 0.01230. The effect of span is negligible, increasing by 1 unit It only increases the span by 0.0123 units; this coefficient is very small, indicating that The effect on span is minimal, increasing by 1 unit It only increases the span by 0.0123 units; The coefficient is -0.01785. The effect of span is also very small, with an increase of 1 unit , the span decreases by 0.0179: Similarly, for every 1 unit increase , the span decreases by 0.01785 units.
3. The method for predicting bending parameters of a flat wire motor hairpin structure based on machine learning according to claim 1, characterized in that: The seven regression methods in step 6 are used to construct a span prediction model. The specific analysis is as follows: A 5-fold cross-validation strategy was used to train and test all regression models. Through the averaging process of multiple training and testing, the prediction error was effectively reduced, and the fairness of model comparison and the robustness of the results were improved. The prediction curves of each model highly overlap with the true value, with only slight differences at the extreme values. Specifically, the true span fluctuates slightly within the range of approximately 58 mm to 60.5 mm. Lasso regression almost completely fits the true curve, with only very slight deviations near the peak of the ninth sample, reflecting its robustness advantage brought by feature selection through L1 regularization. ElasticNet regression and OLS regression also closely follow the true curve. ElasticNet achieves a fit comparable to OLS while taking into account both L1 and L2 regularization. Ridge regression only slightly underestimates the span at the highest point, which reflects that the L2 penalty shrinks the regression coefficients, making it conservative with extreme value changes. Random forest regression and support vector regression can reproduce the overall trend of change, but their prediction curves are slightly smoothed at the point where the span changes dramatically, indicating that the nonlinear model is not sensitive enough to subtle linear fluctuations. Gradient boosting regression is more sensitive to noise at this data scale, resulting in slightly larger prediction deviations for plateaus and turning points than other models. The model's predicted values and true values for all ten samples closely tracked minor fluctuations in the span. With the exception of a few extreme samples, all prediction errors remained within ±0.03, demonstrating highly consistent linear fit. Specifically, OLS is simple and efficient, with particularly low fitting errors for intermediate samples, but exhibits slight underestimation for extremely large and small samples. Ridge, due to L2 regularization, generally underestimates extreme values. Lasso, leveraging the sparsifying properties of L1 regularization, achieves the lowest error for both general and extreme samples, resulting in the best performance. ElasticNet follows closely behind, combining the advantages of L1 and L2, offering both variable selection and coefficient stability. In comparison, random forest and SVR can capture subtle nonlinear trends and exhibit a certain degree of robustness to noise and outliers, but their prediction accuracy falls slightly short of the optimal linear model. Gradient boosting regression is more sensitive to noise at this data scale, resulting in higher overall error. Lasso regression performs best in this study's span prediction task, offering the lowest average prediction error and reducing the risk of overfitting through automatic feature selection. In order to further compare the prediction performance of different models, this method also compared the model prediction errors and calculated the mean square error and determination coefficient of each model. The calculation formula of MSE is: (4) in: is the number of samples, It is a sample The true value of is the model prediction value; The coefficient of determination, also known as goodness of fit, is used to measure how well the model fits the data and indicates the ability of the independent variable to explain the changes in the dependent variable; The value of is between 0 and 1. The closer the value is to 1, the better the model fits the data. The calculation formula is: (5) in: It is a sample The true value of is the model prediction value; is the true value The mean of is the number of samples; According to the analysis of the prediction error results, there are certain differences in the performance of different regression models: Lasso regression has the smallest error and the highest goodness of fit, and the model performance is the best; OLS regression is stable, It reaches 0.994986, but its MSE is 0.000926, slightly higher than Lasso; ElasticNet regression is very close to Lasso in terms of error and fit; in contrast, Ridge regression has a larger error, The performance of the two nonlinear models, random forest and SVR, is similar, with MSE of 0.001005 and 0.001266 respectively. The values of 0.994646 and 0.993144 are respectively. Although they can capture nonlinear relationships well, the overall effect is slightly lower than that of Lasso. The error of gradient boosting regression is the largest. The lowest and weakest performance; Lasso regression with the lowest MSE and the highest It performs the best among all models and effectively avoids overfitting through L1 regularization; OLS and ElasticNet are second, with similar performance; Random Forest and SVR perform well in capturing complex relationships; Gradient Boosting Regression fails to surpass other models.
Citation Information
Patent Citations
A method for predicting concrete durability based on data mining and artificial intelligence algorithm
AU2020101854A4
Plate bending forming method, device and system and computer readable storage medium
CN113941624A