逯云杰
摘 要: 基于LabVIEW設(shè)計(jì)高機(jī)動(dòng)性裝備半物理測(cè)試平臺(tái)時(shí),對(duì)平臺(tái)需求的數(shù)字化模擬過(guò)程在非實(shí)時(shí)環(huán)境中進(jìn)行,與后續(xù)工作間存在脫節(jié),導(dǎo)致高機(jī)動(dòng)性裝備的半物理測(cè)試效果差。因此,設(shè)計(jì)基于RT?LAB的高機(jī)動(dòng)性裝備半物理測(cè)試平臺(tái)。其由上位機(jī)軟件以及硬件構(gòu)成。硬件模塊由平臺(tái)測(cè)試模塊、數(shù)據(jù)獲取模塊和邏輯操作模塊構(gòu)成。通過(guò)Simulink建模仿真平臺(tái)塑造裝備屬性模型,基于RT?LAB高質(zhì)量的硬件板卡支撐性能以及多核分布式并行運(yùn)算,完成高機(jī)動(dòng)性裝備半物理測(cè)試仿真。融入RT?LAB實(shí)時(shí)目標(biāo)機(jī),實(shí)現(xiàn)基于RT?LAB半物理的高機(jī)動(dòng)性裝備測(cè)試仿真。采用裝備的關(guān)鍵部件和429板卡,完成RT?LAB以及VxWorks操作系統(tǒng)下機(jī)載裝備的半物理聯(lián)合仿真。平臺(tái)實(shí)現(xiàn)部分設(shè)計(jì)軟件結(jié)構(gòu),給出高機(jī)動(dòng)性裝備動(dòng)力模型嵌入過(guò)程,采用Unity3D規(guī)劃裝備虛擬顯示模型,通過(guò)實(shí)時(shí)數(shù)據(jù)對(duì)VR模型的運(yùn)動(dòng)進(jìn)行控制,實(shí)現(xiàn)處理裝備虛擬展示。實(shí)驗(yàn)結(jié)果表明,所設(shè)計(jì)測(cè)試平臺(tái)可對(duì)裝備的電壓以及電感電流進(jìn)行平穩(wěn)、準(zhǔn)確測(cè)試。
關(guān)鍵詞: RT?LAB; 高機(jī)動(dòng)性裝備; 半物理測(cè)試; 目標(biāo)機(jī); 平臺(tái)設(shè)計(jì); 聯(lián)合仿真
中圖分類號(hào): TN304.05?34; TM46 文獻(xiàn)標(biāo)識(shí)碼: A 文章編號(hào): 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
飛機(jī)警示、簡(jiǎn)圖頁(yè)和控制功能等是機(jī)電綜合控制平臺(tái)的關(guān)鍵功能[1],傳統(tǒng)基于LabVIEW設(shè)計(jì)高機(jī)動(dòng)性裝備半物理測(cè)試平臺(tái)時(shí),對(duì)平臺(tái)需求的數(shù)字化模擬過(guò)程在非實(shí)時(shí)環(huán)境中進(jìn)行,同后續(xù)工作間存在脫節(jié)問(wèn)題,導(dǎo)致高機(jī)動(dòng)性裝備的半物理測(cè)試效果差[2]。隨著高機(jī)動(dòng)性裝備的智能化應(yīng)用領(lǐng)域逐漸提升,半物理仿真在裝備控制器的規(guī)劃以及應(yīng)用中具有較高的應(yīng)用價(jià)值。因此,設(shè)計(jì)基于RT?LAB的高機(jī)動(dòng)性裝備半物理測(cè)試仿真平臺(tái),融入RT?LAB實(shí)時(shí)目標(biāo)機(jī),將基于RT?LAB的半物理仿真應(yīng)用到高機(jī)動(dòng)性裝備綜合控制平臺(tái)內(nèi),降低飛機(jī)規(guī)劃的耗時(shí),增強(qiáng)飛機(jī)規(guī)劃安全性。
1.1 半物理仿真架構(gòu)
高機(jī)動(dòng)性裝備的半物理仿真系統(tǒng)的關(guān)鍵模塊是上位機(jī)軟件以及硬件,其仿真平臺(tái)如圖1所示。其中裝備控制器以及信號(hào)變換器是硬件的重要組成模塊,對(duì)控制器以及裝備動(dòng)力學(xué)模型間的信號(hào)進(jìn)行傳輸;半物理仿真主邏輯控制模塊、設(shè)備動(dòng)力學(xué)模型控制模塊、虛擬現(xiàn)實(shí)后操作模塊以及人機(jī)模塊共同組成平臺(tái)的軟件部分,對(duì)高機(jī)動(dòng)性裝備信號(hào)實(shí)施高效的控制和直觀描述[3]??傮w信號(hào)交互時(shí)上位機(jī)中的虛擬現(xiàn)實(shí)后操作模塊基于狀態(tài)信號(hào)以及管理信號(hào),驅(qū)動(dòng)高機(jī)動(dòng)性裝備的虛擬現(xiàn)實(shí)模型,完成裝備狀態(tài)的可視化描述[4]。
1.2 平臺(tái)關(guān)鍵硬件模塊
高機(jī)動(dòng)性裝備版物理測(cè)試平臺(tái)的重點(diǎn)內(nèi)容是實(shí)施半物理仿真分析,其由平臺(tái)測(cè)試模塊、數(shù)據(jù)獲取模塊和邏輯操作模塊構(gòu)成,如圖2所示[5]。
1.3 半物理測(cè)試仿真設(shè)計(jì)
基于RT?LAB的高機(jī)動(dòng)性裝備半物理仿真測(cè)試過(guò)程包括數(shù)字過(guò)程以及半物理過(guò)程。數(shù)字過(guò)程仿真策略如圖3所示。其基于RT?LAB仿真需求,將模塊分割成SM,SS及SC,它們分別是核心邏輯操作模塊、數(shù)據(jù)獲取模塊以及平臺(tái)檢測(cè)模塊和航電呈現(xiàn)模塊,通過(guò)RT?LAB中兩個(gè)運(yùn)算節(jié)點(diǎn)對(duì)SM以及SS實(shí)施并行運(yùn)算,SC采用以太網(wǎng)監(jiān)測(cè)邏輯操作模塊的運(yùn)算結(jié)果。
高機(jī)動(dòng)性裝備半物理過(guò)程仿真策略如圖4所示。能夠看出半物理仿真過(guò)程中采用的模型是邏輯操作模塊以及平臺(tái)檢測(cè)模塊實(shí)際機(jī)載裝備,仿真模型中還包括數(shù)據(jù)采集模塊,并且RT?LAB目標(biāo)機(jī)內(nèi)也運(yùn)行著數(shù)據(jù)采集模塊。機(jī)載部件以及目標(biāo)機(jī)間通過(guò)數(shù)據(jù)采集429板卡以及CAN總線實(shí)現(xiàn)數(shù)據(jù)交互[6],完成RT?LAB以及VxWorks操作系統(tǒng)下機(jī)載裝備的半物理聯(lián)合仿真。
2.1 半物理測(cè)試仿真實(shí)現(xiàn)流程
上位機(jī)內(nèi)部署RT?LAB以及Matlab軟件,RT?LAB與Matlab/Simulink進(jìn)行無(wú)縫關(guān)聯(lián),通過(guò)Simulink建模仿真平臺(tái)塑造裝備屬性模型,同時(shí)完成模型的實(shí)時(shí)化、劃分以及編譯等操作獲取C代碼,以太網(wǎng)向目標(biāo)機(jī)內(nèi)輸入C代碼。目標(biāo)機(jī)通過(guò)多核分布式并行運(yùn)算,完成高機(jī)動(dòng)性裝備的實(shí)物仿真[7],用圖5描述仿真流程圖。
2.2 塑造裝備虛擬現(xiàn)實(shí)模型
采用3ds MAX塑造坦克裝備模型,向Unity 3D場(chǎng)景輸入FBX格式的裝備模型,塑造裝備基礎(chǔ)場(chǎng)景[8],對(duì)腳本的編寫過(guò)程實(shí)施優(yōu)化,塑造好的坦克場(chǎng)景見(jiàn)圖6。
2.3 人機(jī)操作界面設(shè)計(jì)
虛擬顯示、DLL調(diào)控檢測(cè)、裝備控制器半物理仿真通信平臺(tái)、狀態(tài)信息存儲(chǔ)以及采集、傳感器檢測(cè)信息存儲(chǔ)和采集等是用戶界面的主要內(nèi)容[9],如圖7所示。
實(shí)驗(yàn)在Matlab/Simulink內(nèi)塑造2臺(tái)DC/DC變換器構(gòu)成的ISOP系統(tǒng),其輸入/輸出電壓是200 V以及150 V,電感是1.4 mH,變壓器原副邊匝比K=1∶1,開(kāi)關(guān)頻率是12 kHz。負(fù)載從60 Ω調(diào)整成30 Ω情況下的仿真波形如圖8所示。如果出現(xiàn)負(fù)載瞬時(shí)調(diào)整的情況,則兩個(gè)模塊輸入電壓被均衡分割,確保輸出電壓的平穩(wěn)性。受到下垂調(diào)控的有差調(diào)控屬性干擾,兩個(gè)模塊獲取的電壓存在一定的差異。負(fù)載是50 Ω以及30 Ω,[Vin1]與[Vin2]間的差值是4 V和2 V,誤差小于設(shè)置的閾值。50 Ω負(fù)載情況下,變壓器電壓以及電感電流情況如圖9所示。
輸入電壓出現(xiàn)瞬時(shí)波動(dòng)時(shí)的仿真波形如圖10所示。分析兩個(gè)圖能夠得出,不考慮下垂調(diào)控產(chǎn)生的誤差問(wèn)題,輸入電壓能夠被均衡分割,同時(shí)輸出平穩(wěn)的電壓。
本文設(shè)計(jì)基于RT?LAB的高機(jī)動(dòng)性裝備半物理測(cè)試平臺(tái),實(shí)現(xiàn)高機(jī)動(dòng)性裝備狀態(tài)的實(shí)時(shí)、準(zhǔn)確測(cè)試,以及裝備狀態(tài)的可視化展示,具有較高的應(yīng)用價(jià)值。
[1] 劉京斗,李小均,吳學(xué)智,等.基于RT?LAB的PET中間級(jí)直流變換器半實(shí)物仿真平臺(tái)設(shè)計(jì)[J].北京交通大學(xué)學(xué)報(bào),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半實(shí)物仿真平臺(tái)設(shè)計(jì)[J].電力電子技術(shù),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] 林潛,葛寶明,畢大強(qiáng),等.永磁同步電機(jī)控制硬件在環(huán)測(cè)試平臺(tái)的實(shí)現(xiàn)[J].電工電能新技術(shù),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] 孫誠(chéng)驍,吳帥軍,霍艷紅,等.基于RT?LAB的混動(dòng)車BMS硬件在環(huán)測(cè)試系統(tǒng)[J].電源技術(shù),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] 張思耀,吳靜,江昊,等.空間延遲容忍網(wǎng)絡(luò)半物理仿真平臺(tái)的設(shè)計(jì)和實(shí)現(xiàn)[J].電信科學(xué),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的儲(chǔ)能系統(tǒng)離網(wǎng)運(yùn)行控制策略研究[J].現(xiàn)代電力,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] 孫謙浩,宋強(qiáng),王裕,等.基于RT?LAB的高頻鏈直流變壓器實(shí)時(shí)仿真研究[J].電力系統(tǒng)保護(hù)與控制,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] 汪敏,歐陽(yáng)松,楊俊飛.基于RT?LAB的電力推進(jìn)船舶半物理仿真研究[J].船電技術(shù),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] 孫剛,時(shí)伯年,孫謙浩,等.基于RT?LAB的柔性直流配電保護(hù)系統(tǒng)的硬件在環(huán)測(cè)試[J].南方電網(wǎng)技術(shù),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.