逯云杰



摘 要: 基于LabVIEW設計高機動性裝備半物理測試平臺時,對平臺需求的數字化模擬過程在非實時環境中進行,與后續工作間存在脫節,導致高機動性裝備的半物理測試效果差。因此,設計基于RT?LAB的高機動性裝備半物理測試平臺。其由上位機軟件以及硬件構成。硬件模塊由平臺測試模塊、數據獲取模塊和邏輯操作模塊構成。通過Simulink建模仿真平臺塑造裝備屬性模型,基于RT?LAB高質量的硬件板卡支撐性能以及多核分布式并行運算,完成高機動性裝備半物理測試仿真。融入RT?LAB實時目標機,實現基于RT?LAB半物理的高機動性裝備測試仿真。采用裝備的關鍵部件和429板卡,完成RT?LAB以及VxWorks操作系統下機載裝備的半物理聯合仿真。平臺實現部分設計軟件結構,給出高機動性裝備動力模型嵌入過程,采用Unity3D規劃裝備虛擬顯示模型,通過實時數據對VR模型的運動進行控制,實現處理裝備虛擬展示。實驗結果表明,所設計測試平臺可對裝備的電壓以及電感電流進行平穩、準確測試。
關鍵詞: RT?LAB; 高機動性裝備; 半物理測試; 目標機; 平臺設計; 聯合仿真
中圖分類號: TN304.05?34; TM46 文獻標識碼: A 文章編號: 1004?373X(2018)16?0183?04
Abstract: During the design of the semi?physical test platform based on LabVIEW for high mobility equipment, the digital simulation process required by the platform is performed in the non real?time environment, resulting in disconnection with subsequent work, and poor semi?physical testing effect of high mobility equipment. Therefore, a semi?physical test platform based on RT?LAB is designed for high mobility equipment. The platform is composed of upper computer software and hardware. The hardware consists of platform test module, data acquisition module, and logic operation module. The equipment attribute model is shaped on the Simulink modeling simulation platform. The semi?physical test simulation based on high?quality support performance of the hardware board card of the RT?LAB and multi?core distributed parallel computation is accomplished for high mobility equipment. The real?time RT?LAB target machine is fused to realize the semi?physical test simulation based on the RT?LAB for high mobility equipment. The semi?physical joint simulation of the airborne equipment is accomplished under the RT?LAB and VxWorks operating systems by utilizing the key components of the equipment and the 429 board card. Part of the designed software structure is realized on the platform. The embedding process of the high mobility equipment dynamic model is given. The Unity3D is adopted to plan the virtual display model of the equipment. The motion of the VR model is controlled by real?time data to realize the virtual exhibition of post?processing equipment. The experimental results show that the designed test platform can test the voltage and inductive current of the equipment smoothly and accurately.
Keywords: RT?LAB; high mobility equipment; semi?physical test; target machine; platform design; joint simulation
飛機警示、簡圖頁和控制功能等是機電綜合控制平臺的關鍵功能[1],傳統基于LabVIEW設計高機動性裝備半物理測試平臺時,對平臺需求的數字化模擬過程在非實時環境中進行,同后續工作間存在脫節問題,導致高機動性裝備的半物理測試效果差[2]。隨著高機動性裝備的智能化應用領域逐漸提升,半物理仿真在裝備控制器的規劃以及應用中具有較高的應用價值。因此,設計基于RT?LAB的高機動性裝備半物理測試仿真平臺,融入RT?LAB實時目標機,將基于RT?LAB的半物理仿真應用到高機動性裝備綜合控制平臺內,降低飛機規劃的耗時,增強飛機規劃安全性。
1.1 半物理仿真架構
高機動性裝備的半物理仿真系統的關鍵模塊是上位機軟件以及硬件,其仿真平臺如圖1所示。其中裝備控制器以及信號變換器是硬件的重要組成模塊,對控制器以及裝備動力學模型間的信號進行傳輸;半物理仿真主邏輯控制模塊、設備動力學模型控制模塊、虛擬現實后操作模塊以及人機模塊共同組成平臺的軟件部分,對高機動性裝備信號實施高效的控制和直觀描述[3]。總體信號交互時上位機中的虛擬現實后操作模塊基于狀態信號以及管理信號,驅動高機動性裝備的虛擬現實模型,完成裝備狀態的可視化描述[4]。
1.2 平臺關鍵硬件模塊
高機動性裝備版物理測試平臺的重點內容是實施半物理仿真分析,其由平臺測試模塊、數據獲取模塊和邏輯操作模塊構成,如圖2所示[5]。
1.3 半物理測試仿真設計
基于RT?LAB的高機動性裝備半物理仿真測試過程包括數字過程以及半物理過程。數字過程仿真策略如圖3所示。其基于RT?LAB仿真需求,將模塊分割成SM,SS及SC,它們分別是核心邏輯操作模塊、數據獲取模塊以及平臺檢測模塊和航電呈現模塊,通過RT?LAB中兩個運算節點對SM以及SS實施并行運算,SC采用以太網監測邏輯操作模塊的運算結果。
高機動性裝備半物理過程仿真策略如圖4所示。能夠看出半物理仿真過程中采用的模型是邏輯操作模塊以及平臺檢測模塊實際機載裝備,仿真模型中還包括數據采集模塊,并且RT?LAB目標機內也運行著數據采集模塊。機載部件以及目標機間通過數據采集429板卡以及CAN總線實現數據交互[6],完成RT?LAB以及VxWorks操作系統下機載裝備的半物理聯合仿真。
2.1 半物理測試仿真實現流程
上位機內部署RT?LAB以及Matlab軟件,RT?LAB與Matlab/Simulink進行無縫關聯,通過Simulink建模仿真平臺塑造裝備屬性模型,同時完成模型的實時化、劃分以及編譯等操作獲取C代碼,以太網向目標機內輸入C代碼。目標機通過多核分布式并行運算,完成高機動性裝備的實物仿真[7],用圖5描述仿真流程圖。
2.2 塑造裝備虛擬現實模型
采用3ds MAX塑造坦克裝備模型,向Unity 3D場景輸入FBX格式的裝備模型,塑造裝備基礎場景[8],對腳本的編寫過程實施優化,塑造好的坦克場景見圖6。
2.3 人機操作界面設計
虛擬顯示、DLL調控檢測、裝備控制器半物理仿真通信平臺、狀態信息存儲以及采集、傳感器檢測信息存儲和采集等是用戶界面的主要內容[9],如圖7所示。
實驗在Matlab/Simulink內塑造2臺DC/DC變換器構成的ISOP系統,其輸入/輸出電壓是200 V以及150 V,電感是1.4 mH,變壓器原副邊匝比K=1∶1,開關頻率是12 kHz。負載從60 Ω調整成30 Ω情況下的仿真波形如圖8所示。如果出現負載瞬時調整的情況,則兩個模塊輸入電壓被均衡分割,確保輸出電壓的平穩性。受到下垂調控的有差調控屬性干擾,兩個模塊獲取的電壓存在一定的差異。負載是50 Ω以及30 Ω,[Vin1]與[Vin2]間的差值是4 V和2 V,誤差小于設置的閾值。50 Ω負載情況下,變壓器電壓以及電感電流情況如圖9所示。
輸入電壓出現瞬時波動時的仿真波形如圖10所示。分析兩個圖能夠得出,不考慮下垂調控產生的誤差問題,輸入電壓能夠被均衡分割,同時輸出平穩的電壓。
本文設計基于RT?LAB的高機動性裝備半物理測試平臺,實現高機動性裝備狀態的實時、準確測試,以及裝備狀態的可視化展示,具有較高的應用價值。
[1] 劉京斗,李小均,吳學智,等.基于RT?LAB的PET中間級直流變換器半實物仿真平臺設計[J].北京交通大學學報,2017,41(2):117?122.
LIU Jingdou, LI Xiaojun, WU Xuezhi, et al. Design of hardware?in?the?loop simulation platform for PET intermediate level DC/DC converter based on RT?LAB [J]. Journal of Beijing Jiaotong University, 2017, 41(2): 117?122.
[2] 張冀川,徐家斌,童亦斌,等.基于RT?LAB的MMC半實物仿真平臺設計[J].電力電子技術,2016,50(3):26?28.
ZHANG Jichuan, XU Jiabin, TONG Yibin, et al. Design of rapid control prototype platform for MMC based on RT?LAB [J]. Power electronics, 2016, 50(3): 26?28.
[3] 林潛,葛寶明,畢大強,等.永磁同步電機控制硬件在環測試平臺的實現[J].電工電能新技術,2014,33(3):76?80.
LIN Qian, GE Baoming, BI Daqiang, et al. Hardware?in?the?loop platform for permanent magnet synchronous machine control [J]. Advanced technology of electrical engineering and energy, 2014, 33(3): 76?80.
[4] 孫誠驍,吳帥軍,霍艷紅,等.基于RT?LAB的混動車BMS硬件在環測試系統[J].電源技術,2017,41(8):1174?1176.
SUN Chengxiao, WU Shuaijun, HUO Yanhong, et al. Hardware in loop system for BMS of hybrid vehicle based on RT?LAB [J]. Chinese journal of power sources, 2017, 41(8): 1174?1176.
[5] 張思耀,吳靜,江昊,等.空間延遲容忍網絡半物理仿真平臺的設計和實現[J].電信科學,2016,32(7):82?89.
ZHANG Siyao, WU Jing, JIANG Hao, et al. Design and implementation of semi?physical simulation platform in space delay tolerant network [J]. Telecommunications science, 2016, 32(7): 82?89.
[6] 朱觀煒,譚偉璞,閆濤,等.基于RT?LAB的儲能系統離網運行控制策略研究[J].現代電力,2016,33(6):33?36.
ZHU Guanwei, TAN Weipu, YAN Tao, et al. Islanded operation control strategy for battery energy storage system based on RT?LAB [J]. Modern electric power, 2016, 33(6): 33?36.
[7] 孫謙浩,宋強,王裕,等.基于RT?LAB的高頻鏈直流變壓器實時仿真研究[J].電力系統保護與控制,2017,45(5):80?87.
SUN Qianhao, SONG Qiang, WANG Yu, et al. Real?time simulation research of high frequency link DC solid state transform based on RT?LAB [J]. Power system protection and control, 2017, 45(5): 80?87.
[8] 汪敏,歐陽松,楊俊飛.基于RT?LAB的電力推進船舶半物理仿真研究[J].船電技術,2016,36(4):77?80.
WANG Min, OUYANG Song, YANG Junfei. RT?LAB?based semi?physical simulation of an electric propulsion ship [J]. Marine electric & electronic engineering, 2016, 36(4): 77?80.
[9] ZHANG X, ZHENG F, ZHANG J, et al. Study on the grid adaptability test for photovoltaic inverter based on RT?LAB simulator [C]// Proceedings of International Conference on Renewable Power Generation. Beijing: IET, 2016: 5?15.
[10] 孫剛,時伯年,孫謙浩,等.基于RT?LAB的柔性直流配電保護系統的硬件在環測試[J].南方電網技術,2016,10(4):23?29.
SUN Gang, SHI Bonian, SUN Qianhao, et al. RT?LAB based HIL test for protection system of MMC based DC distribution network [J]. Southern power system technology, 2016, 10(4): 23?29.