Spatial Straightness Error Evaluation with Improved Whale Optimization Algorithm
-
摘要: 空间直线度误差评定计算问题本质上属于非线性优化问题,采用传统的数学计算方法很难对其进行求解,且求解精度不高,而智能优化算法在求解该类问题具有较大的优势。因此,本文提出将改进鲸鱼优化算法应用于空间直线度误差评定,该方法满足最小区域条件。首先建立了空间直线度评定的最小区域法数学模型,得出空间直线度目标函数;其次阐述了基本鲸鱼优化算法的原理,并针对其不足,对鲸鱼优化算法的3方面进行改进,采用拉丁超立方体抽样方法初始化种群,增强了种群多样性,将非线性收敛因子取代基本鲸鱼优化算法中的线性收敛因子,并将非线性惯性权重引入鲸鱼优化算法中。通过仿真测试,该算法在收敛速度、精度和稳定性都得到了有效提高,最后,通过两个空间直线度误差评定实例进行验证,结果表明,改进的鲸鱼优化算法在评定精度上要比两端点连线法、鲸鱼优化算法、遗传算法和粒子群算法等算法都更具优势。Abstract: The spatial straightness error evaluation calculation problem is essentially a nonlinear optimization one, which is difficult to solve with the traditional mathematical calculation methods; its solution accuracy is not high. The intelligent optimization algorithm has great advantages in solving such problems. Therefore, we propose to apply the improved whale optimization algorithm to the spatial straightness error evaluation. Our method satisfies the minimum area condition. First, the mathematical model of the minimum area method for spatial straightness error evaluation is established, thus obtaining the objective function of spatial straightness. Secondly, the principles of the basic whale optimization algorithm are explained. Its shortcomings are addressed; three aspects of whale optimization algorithm are improved. The population using the Latin hypercube sampling are initialized; the population diversity is enhanced. The nonlinear convergence factor is replaced with the linear convergence factor in the basic whale optimization algorithm. The nonlinear inertia weight is introduced into the whale optimization algorithm. The simulation results show that the algorithm has been effectively improved in convergence speed, accuracy and stability. It is also verified by two examples of spatial straightness error evaluation. The results show that the improved whale optimization algorithm has more advantages in evaluation accuracy than the two-point connection method, the whale optimization algorithm, the genetic algorithm and the particle swarm optimization algorithm.
-
表 1 测试函数
测试函数 取值范围 [-100, 100] [-10, 10] [-100, 100] [-1.28, 1.28] [-600, 600] [-5.12, 5.12] [-32, 32] [-50, 50] 表 2 测试结果对比
测试函数 测试指标 GA PSO WOA LTWWOA F1 平均值 31.443 6 125.938 6.642 6×10-162 0 标准差 8.386 13.828 8 4.164 3×10-161 0 最优值 30 85.548 8 6.292 9×10-179 0 最差值 82.979 7 154.153 9 2.632 4×10-160 0 F2 平均值 31 65.535 8 7.648 1×10-107 0 标准差 0 13.905 4 2.430 7×10-106 0 最优值 31 43.238 9 6.411 6×10-118 0 最差值 31 105.202 5 1.232 1×10-105 0 F3 平均值 9 455.013 4 356.937 8 15 744.962 5 0 标准差 0.060 37 74.856 4 7 153.820 7 0 最优值 9 455 230.844 4 3 607.605 8 0 最差值 9 455.364 9 544.441 9 29 521.250 9 0 F4 平均值 465.437 9 105.245 8 0.001 292 3 5.29×10-5 标准差 0.406 91 24.0792 0.001 273 8 4.536 3×10-5 最优值 465.008 4 52.04 4.355 1×10-5 7.315 2×10-7 最差值 466.588 0 154.568 4 0.005 503 9 0.000 190 61 F5 平均值 0.938 92 1.028 9 0.002 574 0 标准差 0.067 599 0.007 618 2 0.012 596 0 最优值 0.791 31 0.99 497 0 0 最差值 1.134 1.037 2 0.075 482 0 F6 平均值 30.006 2 360.850 3 1.421 1×10-15 0 标准差 0.035 683 26.753 7 8.987 7×10-15 0 最优值 30 285.257 7 0 0 最差值 30.225 2 405.724 8 5.684 3×10-14 0 F7 平均值 3.931 5 8.376 5 4.263 3×10-15 1.065 8×10-15 标准差 1.270 6 0.314 36 2.662 3×10-15 7.841 6×10-16 最优值 3.625 4 7.529 5 8.881 8×10-16 8.881 8×10-16 最差值 11.610 7 8.953 7.993 6×10-15 4.440 9×10-15 F8 平均值 9.966 9 4.515 5 0.004 837 3 0.001 781 4 标准差 0.585 3 0.568 01 0.010 527 0.002 145 1 最优值 8.799 5 3.261 4 0.000 378 93 0.000 275 26 最差值 11.666 4 5.385 3 0.062 538 0.010 195 表 3 原始坐标数据[15]
测点序号 X Y Z 1 10.000 15.000 20.000 2 40.301 35.000 30.200 3 70.600 55.009 40.400 4 100.900 75.000 50.600 5 131.200 95.001 60.800 6 161.500 115.000 71.000 7 191.800 135.010 81.200 8 222.100 155.005 91.400 9 252.400 175.000 101.602 10 282.700 195.000 111.800 11 313.000 215.000 122.000 12 343.300 235.010 132.200 13 373.600 255.010 142.400 14 403.900 275.000 152.600 表 4 各算法直线度结果
mm 参数 LTWWOA WOA GA HTLBO[3] x0 103.54839 58.46724 155.38652 -12.5650 y0 76.75263 46.99606 110.96807 0.1100 z0 51.49137 36.31444 68.93953 12.4046 l 24.76429 12.58836 25.07976 28.3221 m 16.34613 8.309167 16.55434 18.6945 n 8.336645 4.237768 8.443056 9.5342 直线度 0.0090666 0.0092802 0.011429 0.009152 表 5 各截面中心坐标实验数据
mm 截面 X Y Z 1 9.660 9 -13.735 9 0 2 9.583 9 -13.888 8 20 3 9.427 3 -13.963 2 40 4 9.385 5 -14.102 2 60 5 9.186 3 -14.069 3 80 6 9.086 0 -14.212 8 100 7 9.028 7 -14.297 5 120 表 6 各算法评定直线度结果
mm 参数及直线度 LTWWOA WOA PSO GA 两端点连线法 x0 9.3737 9.6108 9.3671 9.4303 9.3448 y0 -14.0215 -13.8260 -14.0257 -13.9553 -14.0167 z0 53.76701 4.88237 55.57465 39.24996 60 l -0.9225 -0.9136 -1.1520 -0.2770 -0.00527 m -0.67591 -0.73056 -0.88046 -0.25016 -0.00468 n 168.8505 182.8542 189.5971 58.96425 0.99998 直线度 0.14550 0.14872 0.15384 0.15807 0.1894 -
[1] 中华人民共和国国家质量监督检验检疫总局, 中国国家标准化管理委员会. GB/T 11336-2004直线度误差检测[S]. 北京: 中国标准出版社, 2004General Administration of Quality Supervision, Inspection and Quarantine of the People's Republic of China, Standardization Administration. GB/T 11336-2004 Measurement of departures from straightness[S]. Beijing: Standards Press of China, 2004 (in Chinese) [2] 张达敏, 徐航, 王依柔, 等. 嵌入Circle映射和逐维小孔成像反向学习的鲸鱼优化算法[J]. 控制与决策, 2021, 36(5): 1173-1180 https://www.cnki.com.cn/Article/CJFDTOTAL-KZYC202105017.htmZHANG D M, XU H, WANG Y R, et al. Whale optimization algorithm for embedded Circle mapping and one-dimensional oppositional learning based small hole imaging[J]. Control and Decision, 2021, 36(5): 1173-1180 (in Chinese) https://www.cnki.com.cn/Article/CJFDTOTAL-KZYC202105017.htm [3] 陈君宝, 王宸, 王生怀. 基于变步长天牛须搜索算法的空间直线度误差评定[J]. 工具技术, 2018, 52(8): 136-138 https://www.cnki.com.cn/Article/CJFDTOTAL-GJJS201808055.htmCHEN J B, WANG C, WANG S H. Research on evaluation method of spatial straightness for variable step beetle antennae search algorithm[J]. Tool Engineering, 2018, 52(8): 136-138 (in Chinese) https://www.cnki.com.cn/Article/CJFDTOTAL-GJJS201808055.htm [4] 杨洋, 李明, 顾京君, 等. 混合教与学算法在空间直线度评定中的应用[J]. 计量学报, 2018, 39(1): 15-19 doi: 10.3969/j.issn.1000-1158.2018.01.04YANG Y, LI M, GU J J, et al. Application of hybrid teaching-learning-based optimization algorithm in spatial straightness evaluation[J]. Acta Metrologica Sinica, 2018, 39(1): 15-19 (in Chinese) doi: 10.3969/j.issn.1000-1158.2018.01.04 [5] 温银萍. 动态步长细菌觅食法评定液压缸直线度误差研究[J]. 煤矿机械, 2017, 38(10): 32-34 https://www.cnki.com.cn/Article/CJFDTOTAL-MKJX201710011.htmWEN Y P. Research on dynamic step-size bacteria foraging optimization algorithm for evaluation of hydraulic cylinder axis straightness error[J]. Coal Mine Machinery, 2017, 38(10): 32-34 (in Chinese) https://www.cnki.com.cn/Article/CJFDTOTAL-MKJX201710011.htm [6] 杨俊超. 正方网格迭代寻优评定深孔轴线直线度[J]. 科学技术与工程, 2017, 17(18): 209-215 doi: 10.3969/j.issn.1671-1815.2017.18.032YANG J C. Drawing square meshes circularly to hunt for the optimal baseline for evaluating straightness error of deep hole axis[J]. Science Technology and Engineering, 2017, 17(18): 209-215 (in Chinese) doi: 10.3969/j.issn.1671-1815.2017.18.032 [7] MIRJALILI S, LEWIS A. The whale optimization algorithm[J]. Advances in Engineering Software, 2016, 95: 51-67 doi: 10.1016/j.advengsoft.2016.01.008 [8] 高卫峰, 刘三阳, 黄玲玲. 受启发的人工蜂群算法在全局优化问题中的应用[J]. 电子学报, 2012, 40(12): 2396-2403 doi: 10.3969/j.issn.0372-2112.2012.12.007GAO W F, LIU S Y, HUANG L L. Inspired artificial bee colony algorithm for global optimization problems[J]. Acta Electronica Sinica, 2012, 40(12): 2396-2403 (in Chinese) doi: 10.3969/j.issn.0372-2112.2012.12.007 [9] 史栩屹, 李明, 韦庆钥. 二次插值鲸鱼优化算法在圆柱度误差评定中的应用[J]. 计量与测试技术, 2019, 46(2): 58-60 https://www.cnki.com.cn/Article/CJFDTOTAL-JLYS201902021.htmSHI X Y, LI M, WEI Q Y. Application of quadratic interpolation whale optimization algorithm in cylindricity error evaluation[J]. Metrology & Measurement Technique, 2019, 46(2): 58-60 (in Chinese) https://www.cnki.com.cn/Article/CJFDTOTAL-JLYS201902021.htm [10] SHI Y, EBERHART R. A modified particle swarm optimizer[C]//Proceedings of 1998 IEEE International Conference on Evolutionary Computation Proceedings. IEEE World Congress on Computational Intelligence. Anchorage: IEEE, 1998: 69-73 [11] 钟明辉, 龙文. 一种随机调整控制参数的鲸鱼优化算法[J]. 科学技术与工程, 2017, 17(12): 68-73 doi: 10.3969/j.issn.1671-1815.2017.12.012ZHONG M H, LONG W. Whale optimization algorithm based on stochastic adjustment control parameter[J]. Science Technology and Engineering, 2017, 17(12): 68-73 (in Chinese) doi: 10.3969/j.issn.1671-1815.2017.12.012 [12] 徐红波, 陈国华, 王新华. 改进粒子群优化的LSSVM结构损伤评定[J]. 振动、测试与诊断, 2012, 32(3): 432-436 doi: 10.3969/j.issn.1004-6801.2012.03.015XU H B, CHEN G H, WANG X H. Structure damage evaluation based on LSSVM optimized by improved particle swarm optimization algorithm[J]. Journal of Vibration, Measurement & Diagnosis, 2012, 32(3): 432-436 (in Chinese) doi: 10.3969/j.issn.1004-6801.2012.03.015 [13] 李会荣, 高岳林, 李济民. 一种非线性递减惯性权重策略的粒子群优化算法[J]. 商洛学院学报, 2007, 21(4): 16-20 doi: 10.3969/j.issn.1674-0033.2007.04.006LI H R, GAO Y L, LI J M. A particle swarm optimization algorithm with the strategy of nonlinear decreasing inertia weight[J]. Journal of Shangluo University, 2007, 21(4): 16-20 (in Chinese) doi: 10.3969/j.issn.1674-0033.2007.04.006 [14] 王涛, CHELLALI R. 非线性权重和收敛因子的鲸鱼算法[J]. 微电子学与计算机, 2019, 36(1): 11-15 https://www.cnki.com.cn/Article/CJFDTOTAL-WXYJ201901003.htmWANG T, CHELLALI R. Whale optimization algorithm with nonlinear weight and convergence factor[J]. Microelectronics & Computer, 2019, 36(1): 11-15 (in Chinese) https://www.cnki.com.cn/Article/CJFDTOTAL-WXYJ201901003.htm [15] 廖平, 喻寿益. 基于遗传算法的空间直线度误差的求解[J]. 中南工业大学学报, 1998, 29(6): 586-588 https://www.cnki.com.cn/Article/CJFDTOTAL-ZNGD806.020.htmLIAO P, YU S Y. A method of calculating 3-D line error using genetic algorithms[J]. Journal of Central South University Technology, 1998, 29(6): 586-588 (in Chinese) https://www.cnki.com.cn/Article/CJFDTOTAL-ZNGD806.020.htm