用户名: 密码: 验证码:
分布式实时仿真中间件RSI的设计与实现
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
近年来,随着计算机技术、信息技术和系统技术的飞速发展,计算机仿真的应用领域不断拓宽,国民经济发展特别是军事需求的强大推动,促使计算机仿真在理论和实践两方面都走上了快速发展的道路。当前,计算机仿真已广泛应用于航空、航天、船舶、汽车、交通运输、军事、化工、生物、医学、社会经济系统等自然科学与社会科学的各个领域,其重要性已广为人知。随着计算机仿真应用领域的不断扩大,计算机仿真需要解决的问题也越来越复杂,许多问题靠单个仿真系统已无法解决,必须依靠多个仿真系统进行联合协同仿真,因此,分布式仿真已成为计算机仿真领域的前沿和热点之一。
    与传统的单个系统仿真相比,分布式仿真的关键问题是多个仿真系统间的互操作问题,为此,美国军方曾先后提出DIS(Distributed Interactive Simulation)和HLA(High Level Architecture)等应用于分布式交互仿真的标准,旨在促进仿真应用的互操作性和仿真资源的可重用性。这些标准相应的实现策略满足了大规模军事仿真的需要。然而,在民用方面,对于一般的企业和科研机构来说,要想完全按照DIS或HLA标准开发出一整套仿真运行支撑软件耗资是巨大的,因此并不是一个最佳的选择。同时,从技术角度考虑,DIS和HLA的提出均起源于军事方面的仿真需求,对于满足其他行业中小型的分布式仿真应用来说,这些标准往往显得过于庞大和繁杂;从用户角度考虑,特定领域的工作人员,他们更希望使用为他们定制的、符合他们现有工作模式且易学、易用、易维护的软件产品。
    我们的课题来源于吉林大学汽车动态模拟国家重点实验室“驾驶模拟器”的研制开发项目。该模拟器是开发型驾驶模拟器,在其上面进行的汽车动态仿真实验属连续系统实时仿真范畴。我们从中抽象出连续系统实时仿真的共性特征,在分布式的网络环境下,提出并实现了一个仿真运行支撑框架(Real-Time Simulation Infrastructure, 简称RSI),并定义了在该框架环境下仿真模型编制的接口规则。RSI的设计采用当今成熟的中间件技术的设计理念,在满足系统对高实时性要求的同时,将具体的仿真功能实现、仿真运行管理和底层通信传输三者分离,必将给用户的使用带来极大的方便,扩大仿真的应用范围,使之能够走出实验室,向国内产业界推广。
    本文所做工作主要集中在以下方面:
    基于汽车动态模拟国家重点实验室关于“人—车—环境闭环系统”仿真的基本需求,按照实验室提出的实时仿真运行机制的总体构想,设计和开发了一个用于分布式实时仿真的中间件——RSI (Real-Time Simulation Infrastructure)。RSI是面向实时应用的仿真运行支撑环境,虽来源于汽车动力
    
    
    学仿真,但不囿于汽车动力学仿真,对于其他的分布式交互仿真应用来说,有一定的推广价值。
    根据汽车动力学仿真模型的编写规则,提出了能够部署于RSI的仿真模型的开发规范,并将该规范用标准的XML Schema进行描述。提出将仿真模型以服务的形式向客户提供,用基于XML的“仿真模型描述语言”定义服务。为方便模型开发人员编写仿真服务,我们开发了一个从C语言接口到“仿真模型描述语言”的“服务接口自动生成器”。
    进行了将其他多种成熟的应用软件与RSI挂接的研究,如Oracle数据库,控制系统设计分析软件Matlab,多体动力学建模仿真工具ADMAS, 有限元分析软件PATRAN和NASTRAN。
    
    经过系统集成和测试,我们得出结论:仿真运行支撑环境RSI能够满足分布式实时仿真的应用需求,该系统具有如下基本功能:
    仿真运行管理:RSI的基本功能是提供仿真的运行支撑环境,负责仿真开始、配置、运行、控制、监控、结束等仿真全生命周期的管理工作。
    时钟管理:时钟是分布式实时仿真最基本的构件之一,RSI提供系统的实时时钟,负责时钟信号的触发,多机时钟的同步;为实时仿真提供精确的时间管理服务。
    资源管理:支持仿真资源安全的共享与重用、动态加载、实时互操作、动态调度与优化运行。
    目录服务:负责仿真过程中对目录、节点列表、资源列表等全局信息的查询和维护。
    消息服务:提供高品质的消息服务,包括一对一、一对多的消息传递功能。为用户外挂模型提供发布消息的调用接口,用户模型可以方便的调用该接口向仿真联邦内指定的联邦成员或所有的联邦成员发布消息,即提供消息的单播、多播和广播功能;并构造了消息队列,支持多点对单点消息发送时的事务处理。
    远程控制与访问:支持基于Internet的远程控制与访问功能。提供两种访问控制方法:(1)基于Web页面的方式与(2)基于控制命令的方式。
    统一的仿真模型接口标准:RSI提供了贴近用户、简单方便、符合专业领域工程师开发模式的仿真模型接口标准。仿真模型被包装成服务,以动态链接库的形式在RSI中运行,接口采用XML进行描述。
    支持大规模数据实时传输:支持多种数据类型的大规模数据在分布式异构平台环境下实时、高速、可靠的传输。
    高度可集成性:提供面向仿真应用领域的、支持仿真工程全生命周期协同开发应用的各类支撑工具和建模仿真工具集。
    鲁棒性:RSI具有很强的鲁棒性,完善的异常处理与容错机制。
    具有分布性、开放性、动态性、可扩展性和灵活性。
    
    
    相对?
Recently, with the high-speed development of computer technology, information technology and system technology, the application fields of computer simulation become much wider, and with the development of national economics, especially martial demands powerfully impelled computer simulation growing fast. Now, computer simulation has been widely applied in natural science such as aviation, spaceflight, shipping, automobile, traffic, military affairs, chemistry, biology, medicine, social economic system, etc and all aspects of social science, and its importance has been known abroad. With the computer simulation constantly extending, the problems need to be solved is becoming more complex, many of which should be co-simulated by multi-simulation system instead of a single simulation system. Distributed interactive simulation has become an advance and hot field in computer simulation.
    
    Compared with simulation on single system, the key of distributed simulation is about inter-operation among multi-simulation system. American military has put forward DIS (Distributed Interactive Simulation) and HLA (High Level Architecture), the standard applied in distributed mutual simulation. It aims at promoting inter-operation and reuse of simulation resources. The corresponding strategy implementation the standards meet the requirement of large-scale military simulation. However, common civil corporation and scientific-research institution can’t afford to develop a run-time infrastructure of simulation completely according to the DIS and HLA standards. Meanwhile, considering from technology, DIS and HLA are both derived from simulation demands on military. Those standards are too enormous and multifarious to fit the demand of small companies in other fields; considering from users, people in special field expect software fitting their special work pattern, being used easily.
    
    Our problem comes from a project on “driving simulator” in state key laboratory of automobile dynamic simulation (ADSL) of Jilin University. The simulator is a driving simulator used for researching and developing, on which automobile dynamic simulation experiment is a continuous system-level real-time simulation. We have abstracted the commonness about system-level real-time
    
    
    simulation, put forward and realized a Real-Time Simulation Infrastructure (RSI), defined interface rules for simulation model programming under this infrastructure. RSI has been designed with successful middle-components technology, which meets a highly real-time demand, separates the realization of simulation functions、management of simulating and essential communication, brings users much convenience, expands simulation applies from laboratory to civil industry.
    
    We study the problems below:
    In terms of the basic requirement of ADSL about “people―automobile―environment close-loop system”, based on the wholly conceive on real-time simulation running mechanism risen by our laboratory, we developed a middle-component RSI(Real-Time Simulation Infrastructure). RSI is a simulation infrastructure facing real-time applications. Though it comes from automobile dynamic simulation, it is not limited to this simulation, and valuable to other distributed mutual simulation.
    In terms of programming rules of automobile dynamic simulation models, we have put forward a standard that can be deployed in RSI simulation models, and described it with standard XML Schema. Simulation models are provided to client with the form of service, which is defined by “simulation model describe language” based on XML. We have developed a “service interface auto-builder” from interface of C to “simulation model describe language”.
    We have managed to join RSI and other successful applications together, such as Oracle Database, Matlab--a software in designing and analyzing the control system, ADMAS—a multi-body dynamic modeling simulating tool, PATRAN and NASTRAN—software in finite element analyzing.
    
    After system integration and testing, we conclude that: RSI is able to meet the require
引文
IEEE 1516.X 系列标准
    李伯虎 等 SBA支撑环境技术的研究 系统仿真学报 2004年2月
    郭云芳、欧阳玲、刘继美 编著 《计算机仿真技术》 1991年
    熊光楞、彭毅等编著 《先进仿真技术与仿真环境》 国防工业出版社
    1997年
    http://hla.dmso.mil/
    http://www.hlalabworks.com/
    陈晓波、熊光楞、郭斌、张和明 基于HLA的多领域建模研究
    系统仿真学报 2003年11月
    黄志军、曾斌 基于HLA的传统仿真软件集成技术研究 系统仿真学报
    2003年1月
    李妮、彭晓源、刘杰 计算网格及其在虚拟样机协同环境中的应用探讨
    系统仿真学报 2004年2月
    周彦、戴剑伟 主编 《HLA仿真程序设计》 2002年
    柴晓路、梁宇奇 编著 《Web Services技术、架构和应用》
    (美)W.Richard Stevens 著 《TCP/IP详解 卷1:协议》 机械工业出版
    社 2000年
    (美)Jeffrey Richter著 《Windows 核心编程》 机械工业出版社
    1999年
    (美)Anthony Jones Jim Ohlund 著 《Windows网络编程技术》 机械工业出版社 1999年
    (美)W.Richard Stevens 著 《UNIX网络编程》 清华大学出版社
    1999年
    (美)W.Richard Stevens 著 《UNIX环境高级编程》 机械工业出版社
    2000年
    (美)David R.Butenhof 著 《POSIX 多线程程序设计》 中国电力出版社
    2003年
     尤晋元、史美林 编著 《Windows操作系统原理》 机械工业出版社
    2001年
    
     Stanley B.Lippman 著 《C++ Primer》 中国电力出版社 2002年
     侯俊杰 著 《深入浅出MFC(第2版)》 华中科技大学出版社 2001年
    (美)Subrahmanyam Allamaraju 著 《J2EE服务器端高级编程》 2001年
     张晓莉 汽车驾驶模拟器实时仿真虚拟系统开发 吉林大学硕士学位论 文 2002年

© 2004-2018 中国地质图书馆版权所有 京ICP备05064691号 京公网安备11010802017129号

地址:北京市海淀区学院路29号 邮编:100083

电话:办公室:(+86 10)66554848;文献借阅、咨询服务、科技查新:66554700