CAN网络层次化动态调度策略设计与实现  被引量:2

Hierarchical Dynamic Scheduling Algorithm Design and Implementation in CAN Network

在线阅读下载全文

作  者:邵椿与 李晓娟[1] 史涤霏 张笑搏 王瑞[1] 关永[1] SHAO Chun-yu;LI Xiao-juan;SHI Di-fei;ZHANG Xiao-bo;WANG Rui;GUAN Yong(Beijing Key Laboratory of Electronic System Reliability Technology,Capital Normal University,Beijing 100048,China;Honours College,Capital Normal University,Beijing 100048,China)

机构地区:[1]首都师范大学信息工程学院高可靠嵌入式系统技术北京市工程研究中心电子系统可靠性重点实验室,北京100048 [2]首都师范大学燕都学院,北京100048

出  处:《小型微型计算机系统》2022年第6期1141-1146,共6页Journal of Chinese Computer Systems

基  金:国家重点研发计划项目(2019YFB1309900)资助;国家自然科学基金项目(61977040,61876111)资助;科技创新服务能力建设项目(00620530290073)资助;首都师范大学交叉科学研究项目(0062155087)资助.

摘  要:CAN总线是一种基于消息的事件触发通信服务,主要应用于汽车、机器人等实时通信系统.CAN总线上有多个节点互相独立工作,当多个节点访问总线时出现消息碰撞,由于CAN总线采用按位仲裁算法决定节点访问总线的优先级,导致低优先级节点访问失败,而高优先级节点继续传输消息,这种方式导致低优先级节点饥饿现象而丢失消息,因此CAN总线调度算法随之被提出.目前调度策略已从静态发展到动态,但是随着节点的增多,系统维护和调度难度增加,单条总线调度策略难以维持系统性能需要.因此本文考虑将系统中的节点挂载到多条CAN总线上构成CAN网络,针对CAN网络提出了一种层次化的动态调度算法,将节点优先级仲裁分为:单条总线本地优先级仲裁和系统全局优先级仲裁,确定系统优先级最高的节点,使其进行数据传输.利用MATLAB中的Stateflow工具,建立分层动态调度模型,依据CAN总线数据传输机制和仲裁机制,设计实现了节点模块、总线模块、函数模块等,在总线模块实现了两级调度.实验结果表明,本算法在增加了节点总数目的基础上,满足高优先级节点传输且避免了低优先级节点的饿死现象.CAN bus is a message-based event-triggered communication service,which is mainly used in real-time communication systems such as automobiles and robots.There are many nodes working independently on CAN bus,and messages crash when multiple nodes access the bus.Because CAN bus uses algorithm that arbitrates bit-by-bit to determine the priority of nodes accessing the bus,the low-priority nodes fail to access,while the high-priority node continues to transmit messages.This way leads to starvation of low-priority nodes and loss of messages,so the CAN bus scheduling algorithm is proposed.At present,the scheduling strategy has developed from static to dynamic,but with the increase of the number of nodes,the difficulty of system maintenance and scheduling increases,and the single bus scheduling strategy is difficult to maintain the performance of system.Therefore,this paper considers mounting the nodes in the system on multiple CAN buses to form a CAN network.In this paper,a hierarchical dynamic scheduling algorithm is proposed for CAN network,which groups arbitration of priority of nodes into two parts:arbitration of local priority in single bus and arbitration of global priority in system,then determines the node with the highest priority in system for data transmission.By using Stateflow tool in MATLAB,a model with hierarchical dynamic scheduling is established.According to the data transmission mechanism and arbitration mechanism of CAN bus,The node module,bus module,function module,etc.are designed and implemented,and two-level scheduling is realized in the bus module.Results of experiment show that the algorithm can satisfy the transmission of high-priority nodes and avoid starvation of low-priority nodes on the basis of increasing the total number of nodes.

关 键 词:CAN总线 两级仲裁 层次化动态调度 Stateflow建模 

分 类 号:TP301[自动化与计算机技术—计算机系统结构]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象