朱天泽 曹剑馨 孙海洋



摘 要:利用MATLAB/Sinulink软件中的Stateflow工具箱,搭建基金会现场总线控制系统的仿真平台。通过此仿真平台,对FF总线系统性能进行分析,分析结果与FF总线通信特征相一致,验证了仿真模型的可行性,此模型可以为协议的改进提供理论基础,更为实际工程应用提供指导。
关键词:控制系统 仿真 分析
Simulation and Analysis of FF Bus Control System
Zhu Tianze,Cao Jianxin,Sun Haiyang
Abstract:The article uses the Stateflow toolbox in MATLAB/Sinulink software to build a simulation platform for the foundation fieldbus control system. Through this simulation platform, the performance of the FF bus system is analyzed, and the analysis results are consistent with the communication characteristics of the FF bus, verifying the feasibility of the simulation model. This model can provide a theoretical basis for the improvement of the protocol and provide guidance for practical engineering applications.
Key words:control system, emulation, analysis
1 引言
基金会现场总线(Foundation Fieldbus),简称 FF,是一种双向的、多站点式、串行的总线系统。
本文在分析FF总线协议工作机制的基础上,搭建FF总线系统仿真平台。基于此仿真平台,对FF总线系统中负载的变化对网络吞吐量和数据传输平均延迟的影响进行了分析。
2 FF总线协议工作机制
FF总线采用的是令牌传递的总线控制方式。
进行周期性通信时,当监测到某个设备发布信息的时间到来时,链路活动调度器LAS就会向该设备发送强制数据CD,接收到此强制数据帧的设备会立刻使用此令牌向链路上发布数据帧。
在周期性通信的时间间隔内,通过链路活动调度器LAS向设备发送令牌PT的方式,给予设备发送非周期信息的机会。
3 FF总线控制系统的仿真平台
仿真平台中搭建的通信部分模块如图1所示,调度部分模块如图2所示。
本文中假定具有变送器功能的现场设备具备LAS功能。
在图1中,三个“buffer”用来分别存放三种优先级的非周期性数据。 “Communication”状态中,“start”状态代表节点此时没有数据需要接收,当总线上有信息需要发送时,Busstate会被置为1,此条件会触发节点状态转移至“Receive-frame”状态,节点开始接收数据帧。……