节点文献
CAN网络控制系统的智能调度研究
Intelligent Scheduling of CAN Networked Control System
【作者】 周时莹;
【导师】 秦贵和;
【作者基本信息】 吉林大学 , 计算机应用技术, 2009, 博士
【摘要】 综合考虑控制性能和网络运行性能,对CAN网络控制系统进行智能调度,通过合理的分配网络资源来提高控制的有效性和传输的实时性,是解决CAN协议通过优先级仲裁竞争总线的机制所产生相关问题的有效手段。本文的主要研究内容包括:(1)针对传统CAN网络控制系统调度算法不能兼顾实时性和公平性的情况,提出了一种基于网络运行状态的动态调度策略,使用队列调度器来调度网络控制系统中的数据,用于确定网络中各节点发送数据的优先级、发送时刻和时间间隔。提出了融合DRR算法的DPQ机制和基于带宽占用比率的DRR改进算法,在对网络上的数据进行调度的时候,综合考虑到优先级、各级别队列的带宽占用比率、数据产生时间和最后截止期,在保证网络带宽资源公平分配的基础上,有效地减小了高优先级数据的传输延迟,提高了整个网络控制系统的实时性能。(2)为了优化CAN网络控制系统中网络带宽和系统控制性能的折中关系,设计了一种基于限制部分子控制系统的带宽占用比率的带宽优化管理器,在网络带宽资源受限的情况下,通过选择由控制性能和网络传输性能共同决定的综合性能较好的子控制系统,采用自回归模型确定不影响其待发数据帧实时传输的前提条件,通过降低该系统待发数据帧的优先级来限制其带宽占用量。这种带宽优化管理器能够根据当前网络运行状态,动态优化网络资源的分配和管理,以提高网络控制系统的控制性能和网络传输性能。(3)在开源仿真软件NS2的内核中加入CAN网络协议模块,能够针对CAN协议进行网络控制系统的建模,并能够进行网络传输的模拟试验。
【Abstract】 With the gradually improved of the industrial application request, making an intelligent control on CAN networked control system for improving the real-time performance, the fairness and the control performance of the CAN network is one hot spot of the scientific research currently.From the view of the resource scheduling, the paper has put forward an intelligent scheduling algorithm based on network’s priority scheduling and also a different solution on the optimization of network resource and the control performance. The main content of the research is described followed.(1)Study on the problem of the collaborative design on the CAN networked control system’s real-time and fairness.A dynamic scheduling strategy has been proposed because the traditional CAN networked control system scheduling algorithm do not give consideration to both the real-time and the fairness. It uses the queue scheduler to schedule the data form the network conttrol system, and the priority, transmit time and the time interval of the transmitting data of the node in the network system can be confirmed. The queue scheduling device is composed of data received module, queue storage module, scheduling algorithm execution module and output scheduling mudule. The data received module detects the network status of each node in the network and stores the basic information of the data frames which set up a transmit request into four different priority queues, which are in the queue storage module, by using the algorithm idea of DPQ. The queue storage module is a storage mechanism to keep four queues with the same length. The four queues are used for storing the related information of the data frames with different priorities, such as emergency, strong real-time, soft real-time and non-real-time. The scheduling algorithm execution module executes the improved Modified Deficit Round Robin scheduling algorithm(MDRR), and distributes different dequeue quantity for different queues by the requirement of the network resource of the waiting data in the queue. The network status analysis algorithm calculates the network throughput currently and the network ratio occupied by the data stream with different priorities. The dequeue frames confirme algorithm calculates the number of the transmit data frames for each queue at the next operation moment. The output scheduling mudule uses the output of the dequeue frames confirmed algorithm, extracts the corresponding quantity of the data frames from each queue, puts the extracted data frames to the intrenal waiting queue, carries the dequeue schedule by the EDF algorithm, and transmits the data frames with the most recent deadline. The DPQ mechanism merged DRR algorithm and the improved DRR algorithm baesd on the bandwidth occupied ratio comprehensively consider the priority, the bandwidth occupied ratio of different priority queues, the data generated time and the dealine when it schedules the data in the network. After comparing with common CAN scheduling strategy, DPQ scheduling strategy and PP scheduling strategy, we can see that the queue scheduling device can reduce the delay of transmitting the high prioriy data effectively and improve the real-time performance of the whole network system on the basis of distributing the network bandwidth resource equally.(2)Research on the bandwidth optimization management of CAN networked control system.In order to compromise the relationship between network bandwidth optimization and control performance, designed a bandwidth optimization manager based on the limit of some sub-control system bandwidth occupancy rate, in the case of network bandwidth resource-constrained, dynamic allocation of bandwidth resources for the network control system, optimizing the overall performance of network control system, at the same time to save the limited network resources. Bandwidth optimization manager is composed by network status monitoring module, network status analysis module and network status adjustment module. Network status monitoring module is used for obtaining network status, receives running status information of each sub-control system sysi periodically, useing network data transmission delay brought by number i sub-control system at previous monitoring time, calculates integral of absolute value of each sub-control system error at the current monitoring time, and sends necessary parameters of network status analysis module and network status adjustment module. According to AIEi (t ){ AIEi (t ),i∈Sysj} of all sub-control system sysi in each sub-network system Sys j, network status analysis module calculates control performance indication QoC j(t ) of each Sys j at current time. Then according to the network transmission delay and current time sampling period of at previous time, calculates bandwidth requirement of sysiSys j at current time, which is used for network transmission performance indication RoB j( t ). And then calculates weight sum of the two as the general performance indication. Selects the sub-network system Sys j with the maximal IV j( t ), send j to network status adjustment module. In the Sys j with the best general performance, network status adjustment module selects the sub-control system of which control performance is higher than the average, deferring the first time bus competition of its waitting for sending data, that is, lowering the priority of the data frame. network status adjustment module node is constitutes by restrictions node selection algorithm and defer time calculation algorithm. Restrictions node selection algorithm selects which control performance is higher than the average from sysisysi Sys j, defer time calculation algorithm utilizes data frame transmission delay of previous monitoring cycle which have known in the memory, constructs the transmission delay auto-regressive model, pre-estimates data frame transmission delay of at current monitoring time, according to the deadline , calculates the latest bus competition time of this data frame, and return to as adjustment parameters which need to adjust priorities. Without affecting real-time transmission of sub-control system which has good general performance, this method reduces the priority of wait for sending data frame to limit their bandwidth usage. Simulation and comparison this method with fixed bandwidth allocation method, the results show that, The method can effectively allocation bandwidth, improve system performance, as the same time also be able to reduce the bandwidth requirement, and save network resources.(3)Adding CAN network protocol to the kernel of open-source simulation software NS2, can model network control system for the CAN protocol, and be able to carry out the simulation experimentation of network transmission.At present, CAN networks simulation software is relatively expensive and the code does not open, the function of scheduling algorithm simulation is weak. To facilitate the simulation of scheduling algorithms, improving the speed of development, and reducing development costs, this paper modifies the Ethernet protocol in the NS2. Change the Ethernet transmission frame to two different frame format defined in CAN metwork protocol version CAN2.0B, there are standard frame contained 11 identifier and expansion frame contained 29 identifier. Change Ethernet Carrier Sense Multiple Access/Collision Detection (CSMA/CD) method to the CSMA/CA in the CAN bus, and process conflict detection before sending the data. Through adding priority code in the identifier field, to avoid conflicts using arbitration priority. If there are more than one node need to use the bus, and the bus is free at this time, then process arbitration according to priority of each node. Priority value smaller its priority will be higher. The node that arbitration success will obtain the bus, and be able to send a message. The node that arbitration failed will be receive status, and wait for arbitration when the next bus free.