2. 北京市机电研究院有限责任公司,北京 100027
2. Beijing Mechanical & Electronical Technology Research Institute, Ltd., Beijing 100027, China
机械制造走进千家万户,与生产生活和国防安全领域息息相关,人们对现代制造业的要求也越来越高[1]。为了提高加工精度,人们常常采用误差防止和误差补偿2种方案[2-3]。误差防止法聚焦于提升机床的设计与制造精度,往往要耗费许多人力和物力,大幅增加了零件的制造成本[4-7]。而误差补偿法则是将机床误差量转移到数控机床的本体运动或加工过程,通过反向抵消机床的原始误差,使零件的加工精度得到提高[8-10]。该方法在现有机床零部件的制造水平和装配工艺的基础上,强调以实际检测或者理论分析的手段,获取机床误差模型,再通过软硬件来提高精度[11]。研究人员大多通过误差补偿法来提高机床加工精度。
误差补偿根据软硬件、动静态和实时性等条件可分为多种形式[11]。本文利用三坐标测量机测量六边形凹槽表面部分点的三坐标,进而得到对应点的轮廓误差;基于对轮廓误差的分解,提出了一种静态非实时的软件补偿方案。
1 误差补偿方案介绍 1.1 误差来源数控机床的误差源有空间几何误差、热变形误差及载荷误差等多种误差[12-15]。其中有60%~70%归结于几何误差、热变形误差、载荷误差和刀具误差[16-18]。这些误差使加工中心的实际铣削轨迹与理想轨迹产生偏移[10-11],生成轮廓误差[19]。
1.2 修改NC数据补偿法可将修改CAD/CAM软件的误差补偿方法分为3种:修改CAD模型、修改CAM模型和修改NC数据。前2种方法需要提供误差数据点的信息和工艺参数,流程较为烦琐,在实际生产中应用较少。修改NC数据法则较为方便可靠,分为计算误差、坐标修正和程序添加3个步骤。误差数据在这一过程中被充分利用,所以该方法补偿精度高、通用性好和可操作性强。该方法也是目前数控机床软件误差补偿的首选方法,原理如图 1所示。
|
| 图 1 修改NC数据补偿原理图 |
1.3 “镜像”反变形误差补偿法[20]
机床几何误差、热误差和工件安装误差等会影响零件的制造精度,而采用“镜像”反变形误差补偿法,可以抵消部分影响。一般而言,用补偿后的代码加工而得到的零件,尺寸精度都得到改善[20]。
1.3.1 轮廓误差计算三坐标测头顺着法线方向触碰零件表面,呈现实际轮廓测量点云。如图 2所示,实际加工点Pa相对于理论曲面的轮廓误差表示如下:
| $ \begin{gathered} \Delta E=\left\|P_{\mathrm{a}} P_{\mathrm{g}}\right\|= \\ \sqrt{\left(x_{\mathrm{a}}-x_{\mathrm{g}}\right)^2+\left(y_{\mathrm{a}}-y_{\mathrm{g}}\right)^2+\left(z_{\mathrm{a}}-z_{\mathrm{g}}\right)^2.} \end{gathered} $ | (1) |
|
| 图 2 轮廓误差计算 |
其中:Pg是Pa在理论曲面轮廓上的投影点,(xa, ya, za)是Pa的坐标,(xg, yg, zg)是Pg的坐标,n为Pg处的法向量。
对于理想曲面为一已知平面方程的平面的情况,轮廓误差d可以通过点到平面的距离公式方便获得,
| $ d=\frac{|A x+B y+C z+D|}{\sqrt{A^2+B^2+C^2}}. $ | (2) |
其中Ax+By+Cz+D=0为该平面的方程。
1.3.2 测量点云的“镜像”反变形“镜像”反变形是指把测量点顺着法线方向反向移动两个轮廓误差距离,求得“镜像”补偿点。如图 3所示,“镜像”补偿点Pc表示如下:
| $ \left\{\begin{array}{l} x_{\mathrm{c}}=x_{\mathrm{a}}-2 \Delta E \cdot n_x \\ y_{\mathrm{c}}=y_{\mathrm{a}}-2 \Delta E \cdot n_y \\ z_{\mathrm{c}}=z_{\mathrm{a}}-2 \Delta E \cdot n_z \end{array}\right.. $ | (3) |
|
| 图 3 误差补偿方法示意图 |
其中:(xc, yc, zc)是Pc的坐标,(nx, ny, nz)是n的坐标。
2 基于轮廓误差的NC数据补偿方法 2.1 误差测量和分解数控机床的误差源在零件上的直接反馈是轮廓误差。对轮廓误差补偿是提高加工精度的重要方法[21-24],补偿效果通常优于跟踪误差补偿[25]。本文研究对象是一个正六边形凹槽,三维模型如图 4所示。
|
| 图 4 凹槽的三维模型 |
如图 4所示,表层的六边形边长是25.98 mm,底层的六边形边长是17.32 mm。面A与水平面的夹角为45°,表面到底面的深度是7.5 mm。
加工机床为立式加工中心TONTEC-VCM1100,加工材料为铝合金6061。采用硬质合金立铣刀,刀具直径为6 mm,齿数为2。工件的长和宽均为85 mm,高为18 mm。先对工件进行粗加工,留0.1 mm的余量。然后进行精加工,主轴转速为6 500 r/min,进给速度为1 000 mm/min,切深为0.1 mm。如图 4所示,每一层的加工方向为逆时针方向,即1→2→3→4→5→6,以切削0.1 mm为一层,由表及里共75层。
加工后得到的零件如图 5所示。通过三坐标测量机测量零件的6个面,从A到F,每个面的中线附近选取60个点,共360个点的三坐标。测量范围第1—30层。利用点到平面的距离公式,计算轮廓误差。对同一层点的轮廓误差取平均值,作为该层的轮廓误差。
|
| 图 5 加工后所得零件 |
如图 6所示,对于实际表面成形点P,其轮廓误差为ε,通过刀位点减去误差向量MP(|MP|=c),得到新的刀位点,此时表面成形点落在M上,轮廓误差得以减小。由几何关系得到
| $ \left|\boldsymbol{M M}_1\right|=\frac{|\boldsymbol{M P}|}{2}=\frac{\sqrt{2}}{2} \varepsilon, $ | (4) |
| $ \left|\boldsymbol{M M}_2\right|=\frac{\sqrt{3}}{2}|\boldsymbol{M P}|=\frac{\sqrt{6}}{2} \varepsilon . $ | (5) |
|
| 图 6 轮廓误差补偿示意图 |
|
| 图 7 误差向量分解 |
定义补偿倍率m=(mx, my)以方便后续的程序设计,各面对应的数值如表 1所示。
| 平面 | mx | my |
| A | ||
| B | ||
| C | 0 | |
| D | ||
| E | ||
| F | 0 |
2.2 误差补偿
本文选择对原刀位点连线的中点做补偿,即先求前后2个刀位点的中点,再用中点减去误差向量,得到修正后的坐标。NC代码原有的刀位点不变,插入中点的修正坐标作为新的刀位点,误差补偿过程如图 8所示。
|
| 图 8 误差补偿流程图 |
采用C++语言编程来实现NC数据修改[26]。以六边形凹槽(见图 4)的加工为例, 其补偿前后的NC代码如表 2所示,补偿后的刀位点明显增多。
| 补偿前 | 补偿后 |
| N22 G94 G1 Z-0.1 F1000. | N22 G94 G1 Z-0.1 F1000. |
| N24 G41 X17.359 Y10.301 D2 | N24 G41 X17.359 Y10.301 D2 |
| N26 X18.5 | N26 X18.5 |
| N28 G3 X19.4 Y11.201 R0.9 F280. | N28 G3 X19.4 Y11.201 R0.9 F280. |
| N30 G1 X0. Y22.401 F1000. | G1 X9.78313 Y16.945 F1000 |
| N30 G1 X0. Y22.401 F1000. | |
| X-9.78141 Y16.942 | |
| N32 X-19.4 Y11.201 | N32 X-19.4 Y11.201 |
| N34 Y-11.201 | X-19.5739 Y0 |
| N36 X0. Y-22.401 | N34 Y-11.201 |
| N38 X19.4 Y-11.201 | X-9.78389 Y-16.9463 |
| N40 Y11.201 | N36 X0. Y-22.401 |
| X9.7839 Y-16.9463 | |
| N38 X19.4 Y-11.201 | |
| X19.5627 Y0 | |
| N40 Y11.201 | |
| … | … |
采用与补偿前实验相同尺寸和材料的毛坯作为工件。先粗加工后精加工,并采用与补偿前相同的主轴速度和进给速度等工艺参数。精加工过程中执行补偿后的NC代码,所得到的零件如图 9所示。由于轮廓误差数据的来源是第1—30层,因此仅对第1—30层进行补偿。
|
| 图 9 对刀位点中点进行补偿后的零件 |
测量了A~F每个面中线附近的22个点,一共132个点。计算每个被测点的轮廓误差,并对同一层点的轮廓误差取平均值,作为该层的轮廓误差。如图 10所示,随着层数的变大,轮廓误差也会越来越大,而后趋于平稳,这是因为随着加工过程的推进,机床的温度场发生变化,引起热误差上升,从而使得轮廓误差上升。当温度场达到稳态时,轮廓误差也会归于平稳。
|
| 图 10 补偿前后的各面轮廓误差的绝对值对比 |
将补偿前后各面轮廓误差绝对值的最大值(在本文中,轮廓误差绝对值的最大值简称轮廓误差最大值)汇总见表 3。不难发现,补偿前所有测点的轮廓误差最大值达0.807 mm,而补偿后降到0.419 mm。各面降低幅度的最大值为56.8%,这意味着六边形凹槽加工的精度得到提高。
| 平面 | 补偿前/mm | 补偿后/mm | 降低幅度/% |
| A | 0.799 | 0.419 | 47.6 |
| B | 0.807 | 0.413 | 48.8 |
| C | 0.785 | 0.339 | 56.8 |
| D | 0.761 | 0.334 | 56.1 |
| E | 0.773 | 0.362 | 53.2 |
| F | 0.786 | 0.382 | 51.4 |
该方法还可用于在相同机床上加工出由直线路径构成的形状。对所测132个点的位置,加工方向和轮廓误差值等进行建模分析,可以拟合得到机床加工时在x、y、z这3个方向上的误差表达式并编写相关软件。当在同一机床加工新零件时,输入原始的NC代码,就能输出新的NC代码用于加工,提高加工精度[27]。该方法对曲线或曲面类型零件加工的适用性还有待研究。
3 结论本文利用三坐标测量机测量六边形凹槽表面上部分点的三坐标,从而得到轮廓误差值。通过“镜像”反变形法和轮廓误差分解,对原NC数据中的刀位点连线中点处进行补偿,得到新的NC数据。补偿后的零件,轮廓误差绝对值最大值的降低幅度达56.8%,加工精度得到明显改善。该方法也适用于加工由直线路径构成的形状。然而,离线补偿将误差的检测和补偿分隔开来,前后环境的不一致也会引入新的误差,补偿过程的准确性有待考究。下阶段将考虑对轮廓误差的实时获取和补偿,来实现更大幅度的精度改善。
| [1] |
YANG H, WANG Z, ZHANG T, et al. A review on vibration analysis and control of machine tool feed drive systems[J]. The International Journal of Advanced Manufacturing Technology, 2020, 107(1): 503-525. |
| [2] |
ZHAO J, LIU Y, LI Q. Research on error synthetical modeling of multi-functional composite five-axis CNC machine tool[C]// IEEE International Conference on Mechatronics and Automation. Harbin, China: IEEE, 2016: 1814-1821.
|
| [3] |
LI X, LI D, LAO Y, et al. Overview of machine tool error detection technology[J]. Journal of Physics Conference Series, 2020, 1550: 032152. DOI:10.1088/1742-6596/1550/3/032152 |
| [4] |
LEI L, ZHANG N, CAI P. Development of real-time prediction module for precision and error of CNC system finishing[J]. Journal of Physics: Conference Series, 2020, 1601(6): 062009. DOI:10.1088/1742-6596/1601/6/062009 |
| [5] |
CHEN J G, WANG X C. Research on thermal error compensation technology of CNC machine tool under real cutting condition[C]// IEEE 4th Advanced Information Management, Communicates, Electronic and Automation Control Conference (IMCEC). Chongqing, China: IEEE, 2021, 4: 324-330.
|
| [6] |
LIU K, LIU Y, SUN M, et al. Comprehensive thermal compensation of the servo axes of CNC machine tools[J]. International Journal of Advanced Manufacturing Technology, 2016, 85(9): 2715-2728. |
| [7] |
LIU H, XIANG H, CHEN J, et al. Measurement and compensation of machine tool geometry error based on Abbe principle[J]. International Journal of Advanced Manufacturing Technology, 2018, 98(9): 2769-2774. |
| [8] |
CUI G, LU Y, GAO D, et al. A novel error compensation implementing strategy and realizing on Siemens 840D CNC systems[J]. International Journal of Advanced Manufacturing Technology, 2012, 61(5): 595-608. |
| [9] |
LIU Y, MIAO E, LIU H, et al. Robust machine tool thermal error compensation modelling based on temperature-sensitive interval segmentation modelling technology[J]. International Journal of Advanced Manufacturing Technology, 2020, 106(1): 655-669. |
| [10] |
MAREŠ M, HOREJŠ O, HAVLÍK L. Thermal error compensation of a 5-axis machine tool using indigenous temperature sensors and CNC integrated Python code validated with a machined test piece[J]. Precision Engineering, 2020, 66: 21-30. DOI:10.1016/j.precisioneng.2020.06.010 |
| [11] |
朱赤洲. 数控机床三维空间误差建模及补偿技术研究[D]. 南京: 南京航空航天大学, 2012. ZHU C Z. Research on modeling and compensation technique for 3-Dimension volumetric errors of CNC machine tools[D]. Nanjing: Nanjing University of Aeronautics and Astronautics, 2012. (in Chinese) |
| [12] |
ABDULSHAHED A M, LONGSTAFF A P, FLETCHER S, et al. Thermal error modelling of a gantry-type 5-axis machine tool using a grey neural network model[J]. Journal of Manufacturing Systems, 2016, 41: 130-142. DOI:10.1016/j.jmsy.2016.08.006 |
| [13] |
LI J, XIE F, LIU X J. Geometric error modeling and sensitivity analysis of a five-axis machine tool[J]. International Journal of Advanced Manufacturing Technology, 2016, 82(9-12): 2037-2051. DOI:10.1007/s00170-015-7492-5 |
| [14] |
CHEN S H, TSAI Y L. The machine-tool temperature variation measurement and compensation using regression analysis method[C]// International Conference on Advanced Materials for Science and Engineering (ICAMSE). Taiwan, China: IEEE, 2016: 673-676.
|
| [15] |
DING S, HUANG X, YU C, et al. Novel method for position-independent geometric error compensation of five-axis orthogonal machine tool based on error motion[J]. International Journal of Advanced Manufacturing Technology, 2016, 83(5-8): 1069-1078. DOI:10.1007/s00170-015-7642-9 |
| [16] |
LIU P, YAO X, GE G, et al. A dynamic linearization modeling of thermally induced error based on data-driven control for CNC machine tools[J]. International Journal of Precision Engineering and Manufacturing, 2021, 22(2): 241-258. DOI:10.1007/s12541-020-00463-0 |
| [17] |
雒驼. 四轴卧式加工中心的几何误差补偿研究[D]. 北京: 北京工业大学, 2012. LUO T. Research on geometric error compensation of horizontal CNC machine tools[D]. Beijing: Beijing University of Technology, 2012. (in Chinese) |
| [18] |
朱绍维. 复杂零件五轴铣削加工精度预测与补偿技术研究[D]. 成都: 西南交通大学, 2013. ZHU S W. Research on machining accuracy prediction and compensation technique for five-axis milling of complex parts[D]. Chengdu: Southwest Jiaotong University, 2013. (in Chinese) |
| [19] |
范开国. 数控机床多误差元素综合补偿及应用[D]. 上海: 上海交通大学, 2012. FAN K G. Comprehensive compensation and application for multi-error elements on CNC machine[D]. Shanghai: Shanghai Jiao Tong University, 2012. (in Chinese) |
| [20] |
马文魁. 复杂曲面加工误差补偿方法与关键技术研究[D]. 天津: 天津大学, 2016. MA W K. Research on the methods and key technologies for sculpture surface machining error compensation[D]. Tianjin: Tianjin University, 2016. (in Chinese) |
| [21] |
LOU Y, MENG H, YANG J, et al. Task polar coordinate frame-based contouring control of biaxial systems[J]. IEEE Transactions on Industrial Electronics, 2013, 61(7): 3490-3501. |
| [22] |
CHEN H R, CHENG M Y, WU C H, et al. Real time parameter based contour error estimation algorithms for free form contour following[J]. International Journal of Machine Tools and Manufacture, 2016, 102: 1-8. DOI:10.1016/j.ijmachtools.2015.11.009 |
| [23] |
PI S W, LIU Q, LIU Q T. A novel dynamic contour error estimation and control in high-speed CNC[J]. International Journal of Advanced Manufacturing Technology, 2018, 96(1-4): 547-560. DOI:10.1007/s00170-018-1629-2 |
| [24] |
WU J, XIONG Z, DING H. Integral design of contour error model and control for biaxial system[J]. International Journal of Machine Tools and Manufacture, 2015, 89: 159-169. DOI:10.1016/j.ijmachtools.2014.11.011 |
| [25] |
关立文. 五轴联动数控机床精度测评技术与标准[J]. 中国科技成果, 2016, 17(15): 19-21. GUAN L W. Accuracy evaluation technology and standard of five-axis linkage NC machine tool[J]. China Science and Technology Achivements, 2016, 17(15): 19-21. (in Chinese) |
| [26] |
于长有, 张丽. 基于修改NC数据的数控机床误差补偿技术研究[J]. 巢湖学院学报, 2018, 20(3): 80-84. YU C Y, ZHANG L. Research on error compensation technology of NC machine tool based on modifying NC data[J]. Journal of Chaohu College, 2018, 20(3): 80-84. (in Chinese) |
| [27] |
刘洋. 精密机床直线运动误差分析与补偿[D]. 重庆: 重庆理工大学, 2013. LIU Y. Analysis and compensation of linear motion errors of precision machine tool[D]. Chongqing: Chongqing University of Technology, 2013. (in Chinese) |


