Prediction of Resistance Spot Welding Parameters by Bayes-XGBoost and Particle Swarm Optimization
-
摘要: 电阻点焊是多种因素交互作用的复杂过程。该过程的复杂性加上数据规模小和工艺不稳定问题使得难以建立精确的数学模型来对电阻点焊参数进行预测。该文提出一种将贝叶斯极限梯度提升机(Bayes-XGBoost)与粒子群优化(PSO)算法结合的方法,对厚度为0.15 mm的镍片和0.4 mm的不锈钢电池正极帽选取合适的样本特征和样本组合;利用极限梯度提升机(XGBoost)的非线性切分能力和防控过拟合机制对点焊工艺参数进行正向训练,并引入贝叶斯优化为梯度提升机选取最佳超参数;利用粒子群优化算法的全局寻优能力,对可变目标值的工艺参数进行反向预测,从而得到最优工艺参数。电阻点焊实验表明该方法比文中其他对比算法具有较强的综合性能,能够有效辅助点焊工艺。Abstract: Resistance spot welding is a complex process in which many factors interact. Given the small size of data sets available and the complex nature of unstable processes, it is difficult to establish an accurate mathematical model to predict the parameters of resistance spot welding. An optimal computing method for solving this problem is presented. The method combines Bayes-XGBoost with the Particle Swarm Optimization (PSO) algorithm to select suitable features and to enable the optimal combinations of samples for 0.15 mm nickel sheets and for 0.4 mm stainless steel battery positive caps; The non-linear slicing ability and anti-overfitting mechanism of eXtreme Gradient Boosting (XGBoost) are used to train forward spot welding parameters; and Bayesian optimization is applied to the XGBoost's optimal parameter selection. The method uses the global optimization feature of Particle Swarm Optimization (PSO) to predict the backward process parameters with variable target values such that the optimal process parameters are obtained. Compared with other algorithms mentioned in this paper, this method offers more comprehensive performance and possesses better capabilities to effectively assist in the spot welding process, which are demonstrated by the resistance spot welding experiments performed.
-
表 1 Bayes-XGBoost+粒子群算法
输入: 工艺参数及结果值、需求值 输出: 预测的工艺参数 步骤1 读入训练数据,对数据做归一化和切分。 步骤2 初始化参数集合,使用贝叶斯优化搜寻XGBoost的参数。 步骤2.1 输入参数到高斯模型,输入样本到XGBoost模型; 步骤2.2 XGBoost进行最优化分裂,直到满足停止条件; 步骤2.3 若满足误差要求则停止迭代,否则通过提取函数选
择参数进行步骤2.1。步骤3 初始化粒子群,设定目标函数,进行粒子群寻优。 步骤3.1 计算微粒适应度值。 步骤3.2 计算个体和群体的历史最优位置、最优适应度值。 步骤3.3 更新微粒速度和位置,若满足终止条件则停止迭
代,否则进行步骤3.1。表 2 参数范围
参数 焊接压力(N) 焊接电压1(V) 焊接电压2(V) 焊接时间1(ms) 焊接时间2(ms) 范围 20, 23, 25, 27, 35 2.2, 2.3, 2.5, 3.0 2.3, 2.5, 2.7, 3.2 1, 2, 3, 4 1, 2, 3, 4 表 3 XGBoost参数集合
名称 意义 范围 Eta 特征权重缩减系数 (0.01, 0.3) Max_depth 最大树深 (2, 16) Min_child_weight 最小叶子权重和 (0.1, 10) Lambda L1 正则化项 (0,10) Alpha L2 正则化项 (0, 10) Gamma 最小损失函数下降值 (0, 20) Sample 特征采样比例 (0.5, 1.0) 表 4 XGBoost参数
参数 Eta Max_depth Min_child_weight Lambda Alpha Gamma Samplee 数值 0.05 10 6 0.4 0.2 2 0.6 表 5 模型预测结果
算法 TRAIN-MAE TEST-MAE RF 0.0345 0.0389 BP 0.0291 0.0381 Grid-XGBoost 0.0416 0.0314 Bayes-XGBoost 0.0232 0.0151 表 6 算法的误差
算法 RMSE TIC RF+粒子群 4.3125 0.0351 BP+粒子群 6.7281 0.0495 Grid-XGBoost+粒子群 2.7634 0.0166 Bayes-XGBoost+粒子群 1.8355 0.0109 表 7 算法的准确率
算法 准确率 RF+粒子群 0.9089 BP+粒子群 0.8845 Grid-XGBoost+粒子群 0.9651 Bayes-XGBoost+粒子群 0.9752 表 8 算法所用时间
算法 时间 RF+粒子群 3 min 09 s BP+粒子群 1 min 53 s Grid-XGBoost+粒子群 1 min 36 s Bayes-XGBoost+粒子群 1 min 12 s -
姚杞, 李洋, 罗震, 等. 永磁体磁场对铝合金电阻点焊力学性能及微观组织的影响[J]. 焊接学报, 2016, 37(4): 52–56.YAO Qi, LI Yang, LUO Zhen, et al. Impact of external magnetic field generated by permanent magnet on mechanical property and microstructure of aluminum alloy resistance spot weld[J]. Transactions of the China Welding Institution, 2016, 37(4): 52–56. PANDA B N, RAJU BABHUBALENDRUNI M V A, BISWAL B B, et al. Application of artificial intelligence methods to spot welding of commercial aluminum sheets (B. S. 1050)[M]. DAS K N, DEEP, K, PANT M, et al. Proceedings of Fourth International Conference on Soft Computing for Problem Solving. New Delhi, India: Springer, 2015: 21–32. doi: 10.1007/978-81-322-2217-0_3. PANDEY A K, KHAN M I, and MOEED K M. Optimization of resistance spot welding parameters using Taguchi method[J]. International Journal of Engineering Science and Technology (IJEST) , 2013, 5(2): 234–241. doi: 10.13140/2.1.4002.1767 ARUNCHAI T, SONTHIPERMPOON K, APICHAYAKUL P, et al. Resistance spot welding optimization based on artificial neural network[J]. International Journal of Manufacturing Engineering, 2014, 2014: 154784. doi: 10.1155/2014/154784 PASHAZADEH H, GHEISARI Y, and HAMEDI M. Statistical modeling and optimization of resistance spot welding process parameters using neural networks and multi-objective genetic algorithm[J]. Journal of Intelligent Manufacturing, 2016, 27(3): 549–559. doi: 10.1007/s10845-014-0891-x WAN Xiaodong, WANG Yuanxun, ZHAO Dawei, et al. A comparison of two types of neural network for weld quality prediction in small scale resistance spot welding[J]. Mechanical Systems and Signal Processing, 2017, 93: 634–644. doi: 10.1016/j.ymssp.2017.01.028 王先逵, 赵杰. 基于函数连接网络的焊接结构工艺过程智能识别系统[J]. 计算机集成制造系统-CIMS, 1995(2): 44–46. doi: 10.13196/j.cims.1995.02.47.wangxk.011WANG Xiankui and ZHAO Jie. The intelligent recognition of Weiding structure process plans by means of the Functionai link net[J]. Computer Integrated Manufacturing Systems, 1995(2): 44–46. doi: 10.13196/j.cims.1995.02.47.wangxk.011 赵大伟, 梁东杰, 王元勋. 基于回归分析的钛合金微电阻点焊焊接工艺优化[J]. 焊接学报, 2018, 39(4): 79–83. doi: 10.12073/j.hjxb.2018390100ZHAO Dawei, LIANG Dongjie, and WANG Yuanxun. Optimization of micro resistance spot welding process of titanium alloy based on regression analysis[J]. Transactions of the China Welding Institution, 2018, 39(4): 79–83. doi: 10.12073/j.hjxb.2018390100 高星鹏, 陈峰, 王宇盛, 等. 基于遗传算法与神经网络微电阻点焊工艺参数优化[J]. 宇航材料工艺, 2018, 48(3): 33–37. doi: 10.12044/j.issn.1007-2330.2018.03.007GAO Xingpeng, CHEN Feng, WANG Yusheng, et al. Optimization of micro resistance spot welding process parameters based on genetic algorithm and neural network[J]. Aerospace Materials &Technology, 2018, 48(3): 33–37. doi: 10.12044/j.issn.1007-2330.2018.03.007 刘伟, 郭猛. 基于LPSO与BP神经网络电阻点焊工艺参数建模优化[J]. 组合机床与自动化加工技术, 2016(2): 138–140. doi: 10.13462/j.cnki.mmtamt.2016.02.039LIU Wei and GUO Meng. The modeling and optimization of resistance spot welding process parameters based on LPSO and BP neural network[J]. Modular Machine Tool &Automatic Manufacturing Technique, 2016(2): 138–140. doi: 10.13462/j.cnki.mmtamt.2016.02.039 舒服华, 王志辉. 基于蚁群神经网络的电阻点焊工艺参数优化[J]. 焊接, 2007(2): 39–42. doi: 10.3969/j.issn.1001-1382.2007.02.009SHU Fuhua and WANG Zhihui. Resistance of spot welding parameter optimization based on ANN and COA[J]. Welding &Joining, 2007(2): 39–42. doi: 10.3969/j.issn.1001-1382.2007.02.009 徐锋, 方彦军. 基于贝叶斯优化XGBoost的现场校验仪误差预测[J]. 电测与仪表, 2019, 56(18): 120–125. doi: 10.19753/j.issn1001-1390.2019.018.017XU Feng and FANG Yanjun. Error prediction of field calibrator based on Bayesian optimization XGBoost[J]. Electrical Measurement &Instrumentation, 2019, 56(18): 120–125. doi: 10.19753/j.issn1001-1390.2019.018.017 王慧芳, 张晨宇. 采用极限梯度提升算法的电力系统电压稳定裕度预测[J]. 浙江大学学报: 工学版, 2020, 54(3): 606–613. doi: 10.3785/j.issn.1008-973X.2020.03.022WANG Huifang and ZHANG Chenyu. Prediction of voltage stability margin in power system based on extreme gradient boosting algorithm[J]. Journal of Zhejiang University:Engineering Science, 2020, 54(3): 606–613. doi: 10.3785/j.issn.1008-973X.2020.03.022 唐红亮, 吴柏林, 胡旺, 等. 基于粒子群优化的地震应急物资多目标调度算法[J]. 电子与信息学报, 2020, 42(3): 737–745. doi: 10.11999/JEIT190277TANG Hongliang, WU Bolin, HU Wang, et al. Earthquake emergency resource multiobjective schedule algorithm based on particle swarm optimization[J]. Journal of Electronics &Information Technology, 2020, 42(3): 737–745. doi: 10.11999/JEIT190277 翁克瑞, 刘淼, 刘钱. TPE-XGBOOST与LassoLars组合下PM2.5浓度分解集成预测模型研究[J]. 系统工程理论与实践, 2020, 40(3): 748–760. doi: 10.12011/1000-6788-2018-2060-13WENG Kerui, LIU Miao, and LIU Qian. An integrated prediction model of PM2.5 concentration based on TPE-XGBOOST and LassoLars[J]. Systems Engineering-Theory &Practice, 2020, 40(3): 748–760. doi: 10.12011/1000-6788-2018-2060-13 PIETA G, DOS SANTOS J, STROHAECKER T R, et al. Optimization of friction spot welding process parameters for AA2198-T8 sheets[J]. Materials and Manufacturing Processes, 2014, 29(8): 934–940. doi: 10.1080/10426914.2013.811727 CHEN Tianqi and GUESTRIN C. XGBoost: A scalable tree boosting system[C]. The 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, San Francisco California, USA, 2016: 785–794. doi: 10.1145/2939672.2939785. SHAHRIARI B, SWERSKY K, WANG Ziyu, et al. Taking the human out of the loop: A review of bayesian optimization[J]. Proceedings of the IEEE, 2016, 104(1): 148–175. doi: 10.1109/JPROC.2015.2494218 SNOEK J, RIPPEL O, SWERSKY K, et al. Scalable Bayesian optimization using deep neural networks[C]. The 32nd International Conference on Machine Learning, Lille, France, 2015: 2171-2180. 殷礼胜, 唐圣期, 李胜, 等. 基于整合移动平均自回归和遗传粒子群优化小波神经网络组合模型的交通流预测[J]. 电子与信息学报, 2019, 41(9): 2273–2279. doi: 10.11999/JEIT181073YIN Lisheng, TANG Shengqi, LI Sheng, et al. Traffic flow prediction based on hybrid model of auto-regressive integrated moving average and genetic particle swarm optimization wavelet neural network[J]. Journal of Electronics &Information Technology, 2019, 41(9): 2273–2279. doi: 10.11999/JEIT181073 丛雯珊, 余岚, 沃江海. 基于粒子群算法的宽带真延时方向图栅瓣抑制方法[J]. 电子与信息学报, 2019, 41(7): 1698–1704. doi: 10.11999/JEIT180719CONG Wenshan, YU Lan, and WO Jianghai. A grating lobe suppression method of wideband real time delay pattern based on particle swarm optimization algorithm[J]. Journal of Electronics &Information Technology, 2019, 41(7): 1698–1704. doi: 10.11999/JEIT180719 SAHU P K and PAL S. Multi-response optimization of process parameters in friction stir welded AM20 magnesium alloy by Taguchi grey relational analysis[J]. Journal of Magnesium and Alloys, 2015, 3(1): 36–46. doi: 10.1016/j.jma.2014.12.002 宇慧平, 杨柳, 韩长录, 等. 拉剪载荷下超高强度钢点焊残余应力试验[J]. 焊接学报, 2015, 36(8): 75–78.YU Huiping, YANG Liu, HAN Changlu, et al. Experimental study on welding residual stresses in ultrahigh strength sheet with tensile and shear load[J]. Transactions of the China Welding Institution, 2015, 36(8): 75–78.