节点文献

基于工业以太网的数控系统实时性问题研究

Research on Real-Time Performance for Computer Numerical Control System Based on Industrial Ethernet

【作者】 杨磊

【导师】 林浒;

【作者基本信息】 中国科学技术大学 , 计算机应用技术, 2014, 博士

【摘要】 数控系统作为集微电子、计算机、信息处理、自动检测、自动控制等高新技术于一体的制造业核心技术,一直都是工业控制和先进制造领域的研究热点,随着计算机科学、自动化、网络、通信技术的飞速发展,数控系统的发展同样日新月异,庞大的系统规模也朝着功能化、小型化的方向发展,集成化、智能化的程度也越来越高,并逐渐发展成为具有强实时要求的多任务控制系统。而实时性作为数控系统的一项重要性能指标,主要体现在数控系统对数据进行快速而准确的处理并及时作出响应,这对设备间实时通信同步精度以及系统中的任务执行效率提出了新的要求。由此可知,数控系统的实时性问题主要体现在以下两个方面:首先是数控系统中控制装置与现场设备之间实时通信的同步性。数控系统作为强实时控制系统,对时间的滞后性相当敏感,并且在系统运行过程中,控制装置持续不断地向现场设备传输控制指令与数据,主机与伺服驱动执行命令和状态反馈必须在同一个时刻进行,因此为了使得数据传输及时有效,必须保证各单元时间上的同步性,以满足系统对实时通信的精度要求。另一方面,为了实现高速高精的发展目标,数控系统需要快速而有效地对复杂而又庞大的操作任务进行实时处理。数控系统中的任务从功能性上划分,可以分为数据管理和运动控制两大部分。数据管理部分的任务包括数据显示、故障诊断、参数设置以及程序代码的输入与编辑等,这类任务不要求系统立即执行,对实时性要求不高,而运动控制类任务则主要包括:程序译码、刀具补偿、轨迹插补、位置控制等强实时性任务。针对系统中各类任务的不同实时性需求,目前已有大量的研究与调度方案,但是随着数控系统的进一步发展,如何解决多种实时类型的任务共存的问题已成为数控系统调度机制的关键所在,这也为数控系统实时性问题的研究带来了新的挑战。根据上述对数控系统实时性需求的分析,本文对数控系统中存在的实时性问题展开了深入的研究,研究内容主要包括时间同步和实时调度两个方面,其所涉及的核心技术主要包括数控系统实时通信与精确时间同步技术、混合任务系统的实时调度策略等。本文主要工作及研究成果包括:1.设计了一种基于双环总线的实时时间同步方法,该方法整合了基于双环结构的同步消息传输方案和主从站间的同步算法,充分发挥双向传输的优势,避免通信线路不必要的空载,同时对主从站中的时钟模型及相关模块进行优化并设计了双环结构下的同步消息报文结构,并对时间戳的传输延迟进行实时处理,以更好地支持数控系统中主从站之间的同步控制,在保证同步精确度的同时有效地提升了系统的实时性。2.提出了一种适用于数控系统的分布式同步机制,建立了一个基于工业以太网的同步功能模型,该模型针对同步过程中不同的功能需求,进行了特定的功能模块划分,以即时响应多种情况下的实时同步任务。同时,通过该同步模型针对同步任务在不同时段的功能需求进行了线程规划,提升了不同的时钟周期内的同步效率,保证了实时任务的即时执行,避免了抢占线程的情况发生,提高工业控制现场中分布式节点之间的同步效率。3.提出了一种适用于数控系统的实时统一调度框架,以满足数控系统对于加工任务及控制信号处理的实时性要求。该框架中整合了多种不同类型的服务器,通过将处理器时间划分为时间片,并设计了由时间片组成的轮转周期,将非硬实时任务插入到每一个轮转周期中强制执行,以同时满足系统对实时任务和非实时任务的执行需求,避免了系统高速运行时实时任务无法及时得到响应的情形,并设计了相应的服务保护机制,给出了防过载处理方法。同时根据数控系统中的任务特点及不同类型的服务器所面向的任务类型,对轮转周期的可行性和框架的可调度性进行了理论上的分析,给出了必要的定理及相关证明。为了验证其调度效果及运行效率,在多任务并发运行的实验环境下对框架中主要函数的时间开销进行了测量,测试结果表明在满足数控系统实时任务调度需求的前提下,该框架能够很好通过多种服务器对不同类型的任务进行有针对性的调度,并将系统开销控制在可接受的范围内,有效地实现了基于多种服务器类型的实时任务调度,在提升数控系统调度能力的同时,保证了数控系统的实时性与可靠性。4.提出了一种适用于数控系统中混合任务集的优化调度方法。该方法通过研究数控系统中多种不同任务的特点及相关时序约束,对实际加工过程中的任务建模,建立了混合任务集的描述模型,同时基于最短路径算法,将任务执行序列的选择问题转化为状态空间树中状态节点之间的最短路径问题,在满足任务各种约束条件的前提下,经优化调度算法调度得到数控系统中混合任务集的优化执行序列。为了验证该算法的实时性与调度效果,在多个实验环境下对该优化调度算法进行了系统而全面的测试与评估,结果表明该方法在有限的条件下能够有效提升混合任务集的调度成功率,保证数控系统内实时任务调度的可靠性,满足了数控系统对实时性的要求。基于上述工作,数控系统中控制装置与设备之间实时通信的同步性得到了增强,数据传输以及任务执行的时间精度有了很大的改善,而通过对系统内混合任务调度方法的研究,在满足任务间时序约束的前提下有效地实现了针对不同类型任务的实时调度策略,加强了数控系统在复杂任务环境下的实时处理能力,满足了数控系统对实时性的要求。

【Abstract】 As the key technology integrated with microelectronic, computer, information pro-cessing, etc. in manufacturing, CNC system is always a hotspot in the field of industrial control and advanced manufacturing. Along with the fast development of computer science, automation, network and communication, CNC system is also on rapid devel-opment, reducing its giant system scale to be highly functional, miniaturized, and more intelligent. Now CNC system has developed into a multi-task control system with hard real-time requirement, in which real time is one of key performance indicators, and re-quires to process the data effectively and make responses in a timely manner by raising new tough demands in synchronization precision and task execution efficiency.From what has been mentioned above, the real-time issue is problematic in two re-spects。First, the synchronicity of communication between the control device of CNC system and field devices should be guaranteed. As a hard real-time system, CNC sys-tem is sensitive to lags, that’s why synchronous characteristics of CNC system appear to be pretty important in real-time performance. In the runtime, control device in the system manages instruction and data transmission to field devices, and machine tools and servos have to execute the commands and provide status feedback simultaneously. So to guarantee the real-time performance of CNC system in real-time communication, the synchronization of devices in industrial control network has to be maintained. Sec-ond, to achieve the development objective of high speed and precision, CNC system has to process enormous amounts of complicated operation tasks effectively. Tasks in the system can be generally divided into two groups in functionality:data management and motion control. The former mainly consists of tasks like data display, fault diagnosing, parameter setting, code input and edit, etc. There is no need for these tasks with little requirement of real-time performance to be executed immediately. In contrast, the latter primarily comprises hard real-time tasks like decoding, tool compensation, interpola-tion, position control and so on. Aimed at various types of tasks, a lot of methods and schemes have been proposed to resolve scheduling problem. However, as CNC system further develops, the coexistence of different types of tasks with real-time requirements that differ from each other has been a chief issue of scheduling in the system. It brings new challenges to the study on real time of CNC system.According the analysis above, this paper studies the problems of real-time in CNC system, covering both time synchronization and real-time task scheduling. Key tech-nologies involved includes real-time communication and precise time synchronization in CNC system, real-time scheduling strategy for hybrid task system, and so on. The main contributions of the dissertation are described as following:1. A real-time time synchronization method for dual ring fieldbus in the CNC sys-tem is designed in this paper to support the synchronization control of stations in the CNC system. In this method a synchronizing message transmission scheme based on dual ring architecture and the synchronization algorithm between master and secondary stations are integrated. In the scheme, the clock models of both master and secondary stations are optimized by functional module partition and the stamp transmission based on the dual ring fieldbus is devised exclusively that improves transmitting efficiency. All the secondary stations can accomplish the consistent state with master station by updating clock discrepancy information in one communication cycle, it takes the ad-vantage of two-way transmitting and makes the best use of dual ring structure, so the real-time performance of the system can be promoted while retaining synchronization precision. To evaluate the performance, the costs of the method and errors during syn-chronizing are noted and analyzed in runtime environment. The results show that this method reduces communication cost and ensures the smoothness of synchronization process with low lag effects that will better support the synchronous control of CNC system.2. A synchronization scheme applying to CNC system is proposed based on the intermediate-level modeling for initial synchronization and periodical resynchroniza-tions with basic concurrency control and tight bounds to meet rising demands of syn-chronization precision in distributed nodes in LAN network. In this model, functional modules are partitioned by the varied requirements in synchronization process to sup-port instant response to syncing tasks. Several representative threads are designed and well scheduled to create a fast and efficient circumstance for communication between nodes that prevents the system from access collision. An experimental realization based on RT Linux kernel and corresponding measurements are accomplished. The results indicate that in a small-scale distributed environment, the nodes are able to be well syn-chronized during in the long run with hundreds of resynchronizations and the deviations are significantly limited in a reasonable range that increases the real-time performance of CNC system.3. A hierarchical scheduling framework for CNC system is constructed to manage different types of RT tasks uniformly based on round-piece scheduling algorithm. In hybrid real-time system, scheduling approach is required to ensure all hard RT tasks to be finished before the deadline with respect to real-time constraints but improve the quality of service of soft RT and non-RT tasks as well. The concept of Rotation Period is proposed to resolve this issue by forcibly assign time slices to non hard real-time tasks to prevent them from missing deadlines. The hierarchy of the framework is illustrated in detail and the issues of QoS control and overload protection are also in discussion. The feasibility of rotation period is proved and the schedulability of framework in different cases was validated, theoretical analysis and related proofs are given as well. To testify the effectiveness and evaluate the scheduling performance of this framework, a concur-rent runtime environment is designed to measure both overloads of major functions and satisfaction of time constraints of real-time tasks in comparison with existing methods. The results show that different types of tasks can be well scheduled under the execution demands in CNC system that effectively strengthen the real time and reliability of the system.4. An optimal scheduling algorithm is presented with the capability of synthesizing a multitude of types of tasks based on shortest-path strategy. In this work, the model of hybrid task system is introduced and the detail of the algorithm based on shortest path strategy is described based on the features of different machining tasks and cor-responding constraints. By transforming the question of task execution to the shortest path problem in states of space tree, the optimal scheduling algorithm is able to obtain the optimized sequence of hybrid tasks in CNC system. To more fully testify the effect, the algorithm is tested in both simulation and practical machining environment, and the scheduling result is compared with common RTOS. The results of tests show that op-timal scheduling algorithm can achieve better performance whatever on the stability of CNC system or the efficiency of task scheduling that satisfies the real-time requirement of CNC system.Based on contributions above, the synchronicity of communication between con-trol device and field devices has been enhanced, and the time accuracy in data transmis-sion and task execution also get improved. Through the research on characteristics of hybrid tasks in CNC system, real-time scheduling strategies for different types of tasks have been effectively utilized to promote task-handling ability of CNC system in com-plicated runtime environment on the premise of meeting various constraints of tasks. Thus, the real-time requirement of CNC system is well satisfied.

节点文献中: 

本文链接的文献网络图示:

本文的引文网络