南京航空航天大学
硕士学位论文
基于LabVIEW的实时控制与仿真技术应用研究
姓名:王欢
申请学位级别:硕士
专业:航空宇航推进理论与工程
指导教师:张天宏
20081201
南京航空航天大学硕士学位论文
摘要
LabVIEW 作为一种功能强大的虚拟仪器开发环境得到了越来越广泛的应用。本文以增强系
统实时性及提高开发效率为目的,开展了基于 LabVIEW 的实时控制与仿真技术研究,并进行
了实验验证。
在实时仿真方面,提出了一种将 Matlab 和虚拟仪器结合起来开发实时仿真系统的方法。利
用 Matlab/Simulink 的实时代码生成工具箱(Real-time Workshop,RTW)将 Simulink 模型转化
为 C 代码,再通过动态链接库(Dynamic Link Library ,DLL)技术将 C 代码导入 LabVIEW 虚
拟仪器实时平台,实现实时仿真系统的快速开发。经电机模型仿真实例验证,该方法既可以充
分利用 Simulink 的建模优势,又可以发挥虚拟仪器技术在灵活的实时软硬件平台和丰富的人机
界面设计方面的优点,相对于传统的基于 C 语言开发实时仿真系统,该方法具有方便快捷的特
点。
在实时控制方面,分析了 Windows 环境下实时控制的几种方法,重点研究了基于 RTX 的
实时控制系统。构建了一种基于 RTX 和 LabVIEW 的实时控制系统,利用 RTX 扩展 Windows
实时性,利用 LabVIEW 开发人机界面,RTX 的实时任务和 LabVIEW 应用程序之间通过共享
内存及 DLL 技术关联。串口通信、数据采集及 PID 控制实例验证了系统的实时性。
最后分析了实时控制与仿真系统中的通信问题,介绍了 LabVIEW 的几种网络通信协议。
设计了基于 TCP/IP 的主从式应用系统,并对其实时性进行了验证。结果表明,该网络通信方式
可以满足局域网环境下系统的实时性和稳定性要求。
研究表明,将 LabVIEW 引入实时控制与仿真领域是可行的,不仅可以实现系统实时性,
还提高了开发效率。
关键词:虚拟仪器,LabVIEW,实时仿真,实时控制,Matlab/Simulink/RTW,RTX,网络通信
I
基于 LabVIEW 的实时控制与仿真技术应用研究
Abstract
As a powerful Virtual Instrument development environment, LabVIEW has been widely used in
industry. In order to enhance real-time performance of the system and improve the development
efficiency, the technology of real-time control and simulation based on LabVIEW is studied, and
verified by some tests.
In the respect of real-time simulation, an effective method is proposed, bines the
Matlab/Simulink and Virtual Instrument for the development of real-time simulation system. The
simulink blocks are converted into C code automatically by Real-time Workshop (RTW), which is a
toolbox of Matlab, the C code is imported into LabVIEW virtual instrumental real-time platform by
Dynamic Link Library (DLL) .The real-time simulation system can be developed rapidly in LabVIEW.
A motor example has verified that this method bine the advantages of Simulink modelisation
and Virtual Instrument’s strongpoint of flexible real-time platforms and abundant
基于LabVIEW的实时控制与仿真技术应用研究 来自淘豆网m.daumloan.com转载请标明出处.