Journal of System Simulation ›› 2026, Vol. 38 ›› Issue (8): 2364-2378.doi: 10.16182/j.issn1004731x.joss.25-0932
• Papers • Previous Articles
Zheng Huiji, Wang Guangsen, Liu Qing, Wang Kang, Wang Zhiwei, Zhang Zhenyu, Wang Shuo, Liu Zhu
Received:2025-09-26
Revised:2025-11-19
Online:2026-08-28
Published:2026-08-31
Contact:
Liu Qing
CLC Number:
Zheng Huiji, Wang Guangsen, Liu Qing, Wang Kang, Wang Zhiwei, Zhang Zhenyu, Wang Shuo, Liu Zhu. Design and Implementation of HDRT Real-time Simulation System[J]. Journal of System Simulation, 2026, 38(8): 2364-2378.
Table 1
Related configurations affecting exclusive real-time optimization
| 目录 | 命令 | 描述 |
|---|---|---|
| 内核编译选项 | CONFIG_NO_HZ=y CONFIG_NO_HZ_COMMON=y CONFIG_NO_HZ_FULL=y | 支持nohz_full模式,结合内核启动参数nohz_full=core_list使用,关闭指定实时CPU核心空闲和单个任务运行时的tick中断 |
| CONFIG_CPU_ISOLATION=y | 支持CPU隔离,结合内核启动参数isolcpus=core_list使用,将指定CPU核心从调度算法中移除 | |
| CONFIG_PREEMPT=y | 使能抢占式内核(PREEMPT_RT) | |
| 内核启动参数 | isolcpus=core_list | 将指定CPU核心从调度算法中移除 |
| nohz_full=core_list | 关闭指定实时CPU核心空闲和单个任务运行时的tick中断 | |
| tsc=reliable | 避免TSC时钟校准功能导致的tcik中断 | |
| mce=off | 避免机器检查异常功能导致的tick中断 | |
| 用户层工具 | echo 1>/proc/irq/*/smp_affinity | 设置IRQ亲和性到指定核心 |
| taskset-pc 0/proc/* | 将系统非实时进程迁移到非实时CPU核心 | |
| echo performance>/sys/devices/system/cpu/cpu*/cpufreq/scaling_governor | 设置CPU频率调节器为性能模式,避免造成性能抖动 | |
| echo-1>/proc/sys/kernel/sched_rt_runtime_us | 避免限制实时核心的CPU时间片导致tick中断 | |
echo 0>/sys/devices/system/cpu/*/online echo 1>/sys/devices/system/cpu/*/online | 重启实时CPU,通过热插拔CPU,强制将该CPU上的部分定时器软中断等迁移到非实时CPU上[ |
Table 2
Comparison of simulation signal monitoring tools provided by HDRT simulation system
| 采样工具 | 显示位置及格式 | 采样方式 | 采样频率限制因素 |
|---|---|---|---|
| 上位机管理软件 | 上位机文件或图像 | HDTarget实时任务缓存记录,非实时任务通过UDP上传上位机 | 网络和图像渲染速度 |
| HDWriteFile模块 | HDTarget文件 | HDTarget实时任务缓存记录,非实时任务写入本地文件 | 内存写入文件速度 |
| Get_Signal模块 | 上位机Simulink信号 | HDTarget实时任务缓存记录,上位机Simulink模块通过TCP读取 | 网络与Simulink数据处理速度 |
| [1] | 刘伟, 夏敏学, 梁晨鹏. 高压直挂大容量电池储能系统实时仿真及控制研究[J]. 电力系统保护与控制, 2024, 52(14): 154-166. |
| Liu Wei, Xia Minxue, Liang Chenpeng. Real-time Simulation and Control of a Large Capacity Bettery Energy Storage System Directly Connecting to a High-voltage Grid Without a Transformer[J]. Power System Protection and Control, 2024, 52(14): 154-166. | |
| [2] | 洪泽华, 潘洪涛, 陆志沣, 等. 半实物仿真系统可信度评估方法对比研究[J]. 电子技术, 2015, 44(9): 1-5. |
| Hong Zehua, Pan Hongtao, Lu Zhifeng, et al. The Comparative Study for the Credibility Evaluation Method of Hardware-in-the-loop System[J]. Electronic Technology, 2015, 44(9): 1-5. | |
| [3] | 孙瑞松. 基于RT-LAB的微电网运行控制硬件在环仿真[J]. 电气工程学报, 2019, 14(4): 85-92. |
| Sun Ruisong. Hardware in the Loop Simulation on the Operation Control of Microgrid Based on RT-LAB[J]. Journal of Electrical Engineering, 2019, 14(4): 85-92. | |
| [4] | 孙冰. 一种基于RTDS的小电流接地选线装置的分析与改进[D]. 西安: 西安石油大学, 2024. |
| Sun Bing. Analysis and Improvement of a Small Current Grounding Line Selection Device Based on RTDS[D]. Xi'an: Xi'an Shiyou University, 2024. | |
| [5] | 闫松. 混合动力汽车动态能量管理策略及硬件在环仿真研究[D]. 青岛: 青岛大学, 2020. |
| [6] | 张淼. 基于麒麟操作系统的实时仿真平台关键技术研究[D]. 长沙: 国防科技大学, 2017. |
| Zhang Miao. Research on Key Technologies of Real-time Simulation Platform Based on Kylin Operating System[D]. Changsha: National University of Defense Technology, 2017. | |
| [7] | 张晓龙. 基于Linux/RTAI的嵌入式系统半物理仿真研究[D]. 武汉: 华中科技大学, 2014. |
| Zhang Xiaolong. Study on Hardware-in-loop Simulation Based on Linux/RTAI Embedded System[D]. Wuhan: Huazhong University of Science and Technology, 2014. | |
| [8] | 冉印. 面向Linux的实时仿真平台关键技术研究[D]. 武汉: 华中科技大学, 2022. |
| Ran Yin. Research on Key Technologies of Real-time Simulation Platform for Linux[D]. Wuhan: Huazhong University of Science and Technology, 2022. | |
| [9] | 王钦盛. 基于FPGA的微电网电力电子设备实时仿真技术研究[D]. 哈尔滨: 哈尔滨工业大学, 2024. |
| Wang Qinsheng. Research on Real-time Simulation Technology of Microgrid Power Electronic Equipment Based on FPGA[D]. Harbin: Harbin Institute of Technology, 2024. | |
| [10] | Wu Zhuanhao, Kaushik Anirudh, Patel Hiren. High Performance and Predictable Shared Last-level Cache for Safety-critical Systems[J]. ACM Transactions on Embedded Computing Systems, 2024, 23(6): 97. |
| [11] | 马可. 面向实时操作系统的实时性分析方法研究[D]. 成都: 电子科技大学, 2022. |
| Ma Ke. Research on Real-time Analysis Method for Real-time Operating System[D]. Chengdu: University of Electronic Science and Technology of China, 2022. | |
| [12] | 刘小龙, 徐丹, 陈丽丽, 等. 一种基于Simulink系统分区并行计算的Speedgoat HIL测试系统研究[C]//2024年中国汽车工程学会年会论文集. 北京: 机械工业出版社, 2024: 219-222. |
| Liu Xiaolong, Xu Dan, Chen Lili, et al. Research on Speedgoat HIL Testing System Based on System Partitioning for Concurrent Execution of Simulink[C]//SAECCE2024-IEE023. Beijing: China Machine Press, 2024: 219-222. | |
| [13] | 李旭, 刘金华, 潘敏. 基于dSPACE仿真系统的永磁同步直线电机驱动器的研制[J]. 电气时代, 2024(12): 123-127. |
| [14] | 王效亮, 张芳, 曾宪科, 等. 基于NI实时控制器的六自由度平台测控系统设计与实现[J]. 计算机测量与控制, 2019, 27(2): 24-28, 33. |
| Wang Xiaoliang, Zhang Fang, Zeng Xianke, et al. Design and Implementation of a Six-degree Platform Control System Based on NI Real Time Controller[J]. Computer Measurement & Control, 2019, 27(2): 24-28, 33. | |
| [15] | 任攀, 张舒涵, 胡娟. 基于Mworks的洁净室压差运行调节仿真研究[J]. 上海节能, 2025(4): 599-606. |
| Ren Pan, Zhang Shuhan, Hu Juan. Simulation Analysis of Differential Pressure Operating Ad-justment in Clean Room Based on Mworks[J]. Shanghai Energy Conservation, 2025(4): 599-606. | |
| [16] | 邓晨, 陈功, 敖厚军, 等. 拦截弹复合控制半实物仿真系统设计与实现[J]. 北京航空航天大学学报, 2025, 51(12): 4178-4187. |
| Deng Chen, Chen Gong, Ao Houjun, et al. Design and Implementation of a Hardware-in-the-loop Simulation System for Interceptor Composite Control[J]. Journal of Beijing University of Aeronautics and Astronautics, 2025, 51(12): 4178-4187. | |
| [17] | Reghenzani Federico, Massari Giuseppe, Fornaciari William. The Real-time Linux Kernel: A Survey on PREEMPT_RT[J]. ACM Computing Surveys, 2019, 52(1): 18. |
| [18] | Madden M M. Challenges Using Linux as a Real-time Operating System[C]//AIAA Scitech 2019 Forum. Reston: AIAA, 2019: AIAA 2019-0502. |
| [19] | Chou C H, Bhuyan L N, Wong D. μDPM: Dynamic Power Management for the Microsecond Era[C]//2019 IEEE International Symposium on High Performance Computer Architecture (HPCA). Piscataway: IEEE, 2019: 120-132. |
| [20] | Deng Zhaomeng, Zhang Ziqi, Li Ding, et al. Interference-free Operating System: A 6 Years' Experience in Mitigating Cross-core Interference in Linux[C]//2024 IEEE Real-Time Systems Symposium (RTSS). Piscataway: IEEE, 2024: 308-321. |
| [21] | The Kernel Development Community. Reducing OS Jitter Due to Per-cpu Kthreads[EB/OL]. [2025-04-09]. . |
| [22] | Sohal P, Bechtel M, Mancuso R, et al. A Closer Look at Intel Resource Director Technology (RDT)[C]//Proceedings of the 30th International Conference on Real-Time Networks and Systems. New York: Association for Computing Machinery, 2022: 127-139. |
| [23] | Vaidyanathan K, Panda D K. Benefits of I/O Acceleration Technology (I/OAT) in Clusters[C]//2007 IEEE International Symposium on Performance Analysis of Systems & Software. Piscataway: IEEE, 2007: 220-229. |
| [24] | Ménard Sylvain. RT-LAB Version 11.1 User Guide[EB/OL]. [2025-04-09]. . |
| [1] | Liu Ruihua, Wang Tongwei, Ma Zan. MBSE Design and Approach-phase Operational Simulation of BDSBAS Airborne Receiver [J]. Journal of System Simulation, 2026, 38(7): 1815-1831. |
| [2] | Zhang Xu, Liu Ke, Chen Mingyu. Simulation Platform Based on SoC-FPGA Clusters for CXL-ethernet Heterogeneous Interconnection [J]. Journal of System Simulation, 2026, 38(7): 2037-2052. |
| [3] | Duan Yuxian, Deng Hanqiang, Zhang Jiarui, Huang Jian, Zhang Shijia. Resilience Modeling Method for Combat System-of-systems Based on Hypernetwork and Game Theory [J]. Journal of System Simulation, 2026, 38(7): 1870-1886. |
| [4] | Wang Shaoping, Zhang Chao, Li Ni, Cui Yong, Zhao Yongjia, Quan Quan. Exploration and Practice of Talent Cultivation System for System Modeling and Simulation [J]. Journal of System Simulation, 2026, 38(6): 1485-1490. |
| [5] | Yan Dong, Yang Hanzhe, Jiang Fangfang, Liu Chengbao, Zhang Peng. Design and Application of Collaborative Simulation System for Satellite Constellation Flight Missions [J]. Journal of System Simulation, 2026, 38(4): 1067-1079. |
| [6] | Li Junhui, Sun Songtao, Liu Fei. Research on Strong Real-time Synchronisation Algorithm for LVC Co-simulation [J]. Journal of System Simulation, 2025, 37(9): 2301-2314. |
| [7] | Hu Tianxiang, Ye Hui, Yang Xiaofei. Construction of a Digital Twin-based Ship Manufacturing Workshop Monitoring System [J]. Journal of System Simulation, 2025, 37(2): 517-528. |
| [8] | Su Xiaoting, Zhang Xiaowei, Tian Yi, Li Qi, Wang Shuaihao. Research on Time Sequence Design Method of Dynamic Simulation Scene for Starlight Navigation [J]. Journal of System Simulation, 2025, 37(11): 2946-2955. |
| [9] | Xu Jian, Liu Gaofeng, Zhao Yijian, Zheng Zili, Yan Huanying. The Synchronous Grasping Method of Virtual-real Assembly Robot Based on Digital Twin [J]. Journal of System Simulation, 2024, 36(9): 2181-2192. |
| [10] | Dou Jianbin, Wang Xiaobing, Yang Hongjian, Gao Yulong. Design and application of Hardware-in-the-loop Simulation System for Infrared Imaging Guide Missile Test and Evaluation [J]. Journal of System Simulation, 2024, 36(2): 522-532. |
| [11] | Chang Xiaofei, Jiao Jiayue, Chen Kang, Fu Wenxing, Yan Jie. Overall Scheme Design and Integration Testing of Hardware-in-the-loop Simulation of Guidance and Control System [J]. Journal of System Simulation, 2024, 36(1): 83-96. |
| [12] | Tianzheng Wang, Jian Tang, Heng Xia, Junfei Qiao. Hardware-in-the-loop Simulation Platform of Loop Control for Municipal Solid Waste Incineration Process [J]. Journal of System Simulation, 2023, 35(2): 241-253. |
| [13] | Liu Zihan, Hou Lingxiao, Li Yang, Wang Zhiguang, Zhang Wulong. An Automatic Code Generation Method for Generic Real-time Hardware-in-the-loop Simulation Based on Custom Wizard [J]. Journal of System Simulation, 2023, 35(10): 2279-2287. |
| [14] | Lu BaiHong, Zhao Jianjun, Liu Gesan. The Research and Implementation of Film Virtual Photography Harware-in-the-loop Simulation [J]. Journal of System Simulation, 2021, 33(8): 1938-1946. |
| [15] | Ren Fushen, Sun Yaqi, Hu Qing, Li Zhaoliang, Sun Pengyu, Fan Yukun. Hardware-in-the-Loop Simulation System for Underwater Vehicle Based on Unity3D [J]. Journal of System Simulation, 2020, 32(8): 1546-1555. |
| Viewed | ||||||
|
Full text |
|
|||||
|
Abstract |
|
|||||