硕士学位论文
连续小线段前瞻插补算法的设计与实现
DESIGN AND IMPLEMENTATION OF
LOOK-AHEAD INTERPOLATION FOR
CONTINUOUS SHORT BLOCKS
田林
哈尔滨工业大学
2012 年 12 月
国内图书分类号:TG659 学校代码:10213
国际图书分类号:621 密级:公开
工学硕士学位论文
连续小线段前瞻插补算法的设计与实现
硕 士 研 究 生 : 田林
导 师 : 于刚 副教授
申 请 学 位 : 工学硕士
学 科 : 机械电子工程
所 在 单 位 : 深圳研究生院
答 辩 日 期 : 2012 年 12 月
授予学位单位 : 哈尔滨工业大学
Classified Index: T G659
U.D.C: 621
Dissertation for the Master Degree in Engineering
DESIGN AND IMPLEMENTATION OF
LOOK-AHEAD INTERPOLATION FOR
CONTINUOUS SHORT BLOCKS
Candidate:
Supervisor:
Academic Degree Applied for:
Speciality:
Affiliation:
Date of Defence:
Degree-Conferring-Institution:
Tian Lin
Associate Prof. Yu Gang
Master of Engineering
Mechatronics Engineering
Shenzhen Graduate School
December, 2012
Harbin Institute of Technology
哈尔滨工业大学工学硕士学位论文
摘 要
在一些不平滑的曲线及复杂型面加工中,通常采用连续小线段来拟合。
对于连续小线段的加工,容易出现机床振动,插补过切等严重问题,从而
导致加工的效率较低,加工精度不高。在该领域,国外已有大批学者从事
该方向的研究。而国内,在该方向的研究起步较晚,技术实力非常有限。
本文中从二维角度出发,研究平面连续小线段插补算法,并将该算法应用
到运动控制卡中。对于完善运动控制卡的插补功能,提高其应用 领域,发
展民族工业具有非常重要的实际意义。
在理论研究上,本文将连续小线段插补划分为三大块内容。首先,通
过对 S 形曲线速度规划和其它速度规划的优缺点研究及对小线段插补速度
规划特征的深入研究,本文提出并建立了非对称 S 形曲线速度规划的算法
模型。而且针对插补过程中遇到的超短线段,采用本文提出的非对称 S 形
曲线速度算法,能获得更高的插补最大速度。从实验验证中得到采用本文
的非对称 S 形曲线速度规划可以得到更高的插补效率。其次,通过对常用
过渡方法的优缺点及拐点过渡的研究。本文在理论上提出了一种新的拐角
过渡方法,即复合型过渡法。在该过渡法的基础上实现的小线段插补能在
高精度范围内获得更高的拐角过渡速度。再次,通过对前瞻控制的研究,
本文将该控制方法应用到连续小线段插补中。它通过预读小线段来发现并
处理危险点,有效平衡了效率和精度的矛盾关系,使得连续小线段的插补
效率得到很大的提高。
当算法移植到运动控制卡中调试时,通过本文设计的 NC 译码器来处
理原始 G 代码信息,将其转换为前瞻插补能够识别的信息。本文在软件系
统中设计 FIFO 缓存器用来实现预处理信息的存储。插补系统采用粗插补
与精插补相结合的方法来提高插补精度,软件实现粗插补,即时间分割法
插补。
最后通过仿真验证,得出结论:与非前瞻性控制连续小线段插补方法
比较,前瞻控制提高了连续小线段插补的精度和效率。
关键词:连续小线段;前瞻性控制;非对称 S 型曲线速度规划;拐点过渡
-I-
哈尔滨工业大学工学硕士学位论文
Abstract
Micro-lines are often used to fit some kinds of rough curve or complex type
surface. And when machining these micro-lines, its easy to produce some serious
situation, such as the lower efficient, the higher error and so on. So this field is
very worth to study deeply. Compared with many abroad researcher working on
this field from the last century , only a few researcher study on it, and many of
them just study on the level of theory and is poor of put theory into practice. In
this paper, I study
look-ahead
interpolation of micro-lines
in view of
two-dimension, including theory innovation and practical application on Motion
Control Card, which is helpfull to improve funcitons of Motion Control Card and
develop the national industry.
From the view of theory, the look-ahead interpolation of continuous
micro-lines is divided into three parts. The first, based on the deep study on
strengthes and shorts of velocity planning of S curve and other curves, especiall y,
velocity planning to micro-lines interpolation, this paper puts forward and builds
an model of velocity planning of asymmetric S curve. And face to super short
lines,a higher speed can be got by it. And the result of simulink powerful proves
that this method can get a higher speed of interpolation. The second, according to
studying on the corner smooth handle. The paper puts forward a new method for
corner smooth handle, namely compound handle. And the result of simulink
proves a higher transition speed in corner between two lines can be got. The last,
based on the study of lool-ahead control, the paper puts the control into
interpolation of micro-lines, which perfectly balannces the relationship of
efficiency and accuracy of interpolation by discoverying and reasonable handling
dangerous points by pretreating micro-lines, and achieve the higher efficient
interpolation.
When the interpolation is transpanted into Motion Control Card to debug, G
code is translated into these information which can be read by Look -ahead
interpolation by NC Decoder. And the software build a FIFO to save these
information and pretreatment data. The whole interpolation system is divided
into rough interpolation and fine interpolation. And the rough interpolation,Time
Dividing Interpolation, is realized by software.
Based on the result of simulation, this conclusion can be produced that
Look-ahead control can reduce error and increase average speed, compared with
-II-
哈尔滨工业大学工学硕士学位论文
no Look-ahead control.
Keywords: continuous micro-lines, look-ahead control, velocity planning of S
curve, corner smooth handle
-III-
哈尔滨工业大学工学硕士学位论文
目录
摘 要 ................................................................................................................... I
ABSTRACT ........................................................................................................ II
第 1 章 绪论 ........................................................................................................ 1
1.1 课题背景.................................................................................................... 1
1.2 本课题研究的目的及意义 ......................................................................... 3
1.3 连续小线段前瞻插补的国内外研究现状及发展趋势 .............................. 4
1.4 本课题的主要研究内容 ............................................................................ 6
第 2 章 非对称 S 形曲线速度控制 ..................................................................... 7
2.1 引言 ........................................................................................................... 7
2.2 非对称 S 形曲线速度规划算法的意义 ..................................................... 7
2.3 对称 S 形速度规划研究 ............................................................................ 8
2.4 非对称 S 形曲线速度控制 ........................................................................ 9
2.5 非对称 S 形曲线速度控制算法实现 ....................................................... 11
2.5.1 超小直线段处理 ............................................................................... 11
2.5.2 非对称 S 曲线算法实现条件 ............................................................ 12
2.6 算法分析.................................................................................................. 16
2.7 本章小结.................................................................................................. 18
第 3 章 拐角过渡建模及衔接速度研究 ............................................................ 19
3.1 引言 ......................................................................................................... 19
3.2 拐角过渡模型的意义 .............................................................................. 19
3.3 拐角过渡处理模型建立 .......................................................................... 19
3.3.1 第 I 类型夹角过渡模型 .................................................................... 20
3.3.2 第 II 类型夹角过渡模型 ................................................................... 21
3.3.3 第 III 类型夹角过渡模型 .................................................................. 23
3.4 拐角最优速度求解 .................................................................................. 27
3.4.1 最大加速度限制 ............................................................................... 27
3.4.2 曲率和弓高误差限制 ........................................................................ 27
3.4.3 最优拐点速度确定 ............................................................................ 28
3.5 线段长度对拐角速度限制 ....................................................................... 28
-IV-
哈尔滨工业大学工学硕士学位论文
3.6 算法分析.................................................................................................. 29
3.7 本章小结.................................................................................................. 31
第 4 章 LOOK-AHEAD 控制及其插补器的设计 ............................................ 32
4.1 引言 ......................................................................................................... 32
4.2 数据缓存器设计 ...................................................................................... 32
4.3 NC 译码器设计 ........................................................................................ 34
4.4 插补器设计 .............................................................................................. 35
4.4.1 粗插补 ............................................................................................... 35
4.4.2 精插补 ............................................................................................... 36
4.5 Look-ahead 控制实现流程 ....................................................................... 37
4.5.1 Look-ahead 控制的顺序运算 ............................................................. 37
4.5.2 Look-ahead 控制的逆运算 ................................................................. 38
4.6 本章小结.................................................................................................. 39
第 5 章 连续小线段前瞻插补实验及分析 ........................................................ 40
5.1 引言 ......................................................................................................... 40
5.2 Matlab 仿真实验....................................................................................... 40
5.2.1 实验一:四段式连续线段插补实验验证 ......................................... 40
5.2.2 实验二:连续小线段拟合小蜜蜂图案插补实验 ............................. 44
5.3 本章小结.................................................................................................. 49
结论.................................................................................................................... 50
参考文献 ............................................................................................................ 51
哈尔滨工业大学学位论文原创性声明及使用授 权说明 ................................... 54
致谢.................................................................................................................... 55
-V-