Design and implementation of Qt-based neutral beam injection control and monitoring system for negative ion sources
-
摘要: 为满足负离子源中性束注入系统对控制与监测功能的需求,设计了基于Qt的负离子源中性束注入控制与监测系统。针对传统基于NI-PXIe硬件与LabVIEW-FPGA架构系统存在的开发周期长、硬件成本高、扩展性不足等方面的问题,提出基于国产PXIe平台、Linux实时系统与Qt5.9框架的模块化控制方案。通过国产化硬件替代与Linux实时内核优化控制,结合C++面向对象编程开发多线程控制程序,攻克了高成本、低扩展性瓶颈。实验表明,该系统实现了微秒级同步精度,在提供更高的可扩展性和控制精度的情况下,控制与监测系统可以满足实验有关定时控制方面的需求。Abstract:
Background Neutral beam injection (NBI) systems are critical to fusion research and require precise control and monitoring of negative ion sources. Existing solutions often have limitations in terms of development efficiency and adaptability.Purpose This study aims to design and implement a cost-effective, highly scalable NBI control and monitoring system for negative ion sources. The system is specifically designed to address the inherent issues of traditional NI-PXIe hardware and LabVIEW-FPGA architectures, such as lengthy development cycles, high hardware costs, and limited scalability.Methods A modular control solution is proposed, utilizing a domestically produced PXIe platform, a Linux real-time system, and the Qt5.9 framework. By replacing imported components with locally sourced hardware and leveraging optimizations in the Linux real-time kernel, precise control is achieved. A multi-threaded control program is developed using C++ object-oriented programming to enhance system flexibility and overcome scalability limitations.Results Experimental verification confirmed that the system achieved microsecond-level synchronisation accuracy. Compared with traditional methods, this solution has significant advantages in scalability and control accuracy, meeting all experimental requirements for time-sensitive operations in negative ion source NBI.Conclusions The Qt-based system successfully addresses the limitations of traditional NBI control architectures in terms of cost and scalability. By adopting localized hardware, Linux real-time system, and modular C++ design, the system provides reliable performance for complex ion source experiments. This approach establishes a flexible framework that can adapt to further enhancements in future NBI systems. -
int first_positive_time = -1; if (start1 > 0) { first_positive_time = start1; } else if (peak1 > 0) { first_positive_time = start1; } else if (hold1 > 0) { first_positive_time = hold1; } else if (rise2 > 0) { first_positive_time = hold1; } else if (hold2 > 0) { first_positive_time = hold2; } else if (fall > 0) { first_positive_time = hold2; } if (i >= fall) { dovalue[channel]=false; aovalue[channel]=0; } else if (first_positive_time != -1 && i >= first_positive_time) { dovalue[channel]=true; aovalue[channel]=value; } else { dovalue[channel]=false; aovalue[channel]=0; } } if(ui->cbChannel_0->isChecked()){ QAOController::hAOTask->WriteSinglePoint(aovalue[0], 0); ConnectDO(dovalue[0],0); } if(ui->cbChannel_1->isChecked()){ QAOController::hAOTask->WriteSinglePoint(aovalue[1], 1); ConnectDO(dovalue[1],1); } for (int i = 0; i < sampletoup && !stopFlag; ++i) { QMutexLocker locker(&mutex); if (stopFlag) break; for (int chIndex = 0; chIndex < pChannels.size(); ++chIndex) { int ch = pChannels[chIndex];; double start1 = samplingRate * timePoints[ch][0]; double peak1 = samplingRate * timePoints[ch][1]; double hold1 = samplingRate * timePoints[ch][2]; double rise2 = samplingRate * timePoints[ch][3]; double hold2 = samplingRate * timePoints[ch][4]; double fall = samplingRate * timePoints[ch][5]; if (fall > sampletoup) fall = sampletoup; double value = 0.0; if (i < start1) { value = 0.0; } else if (i < peak1) { value = amplitudes[ch][0] * (i - start1) / (peak1 - start1); } else if (i < hold1) { value = amplitudes[ch][0]; } else if (i < rise2) { value = amplitudes[ch][0] + (amplitudes[channel][1] - amplitudes[channel][0]) * (i - hold1) / (rise2 - hold1); } else if (i < hold2) { value = amplitudes[ch][1]; } else if (i < fall) { double delta = (fall - hold2) > 0 ? (1.0 - (i - hold2) / (fall - hold2)) : 0; value = amplitudes[ch][1] * delta; } else { value = 0.0; } -
[1] Wan Yuanxi, Li Jiangang, Liu Yong, et al. Overview of the present progress and activities on the CFETR[J]. Nuclear Fusion, 2017, 57: 102009. doi: 10.1088/1741-4326/aa686a [2] Hemsworth R, Decamps H, Graceffa J, et al. Status of the ITER heating neutral beam system[J]. Nuclear Fusion, 2009, 49: 045006. doi: 10.1088/0029-5515/49/4/045006 [3] Song Yuntao, Wu Songtao, Li Jiangang, et al. Concept design of CFETR tokamak machine[J]. IEEE Transactions on Plasma Science, 2014, 42(3): 503-509. doi: 10.1109/TPS.2014.2299277 [4] 胡纯栋, 梁立振, 谢远来, 等. CFETR中性束注入系统概念设计[J]. 核聚变与等离子体物理, 2022, 42(4): 388-392Hu Chundong, Liang Lizhen, Xie Yuanlai, et al. Conceptual design of neutral beam injection system for CFETR[J]. Nuclear Fusion and Plasma Physics, 2022, 42(4): 388-392 [5] Hu Chundong. Conceptual design of neutral beam injection system for EAST[J]. Plasma Science and Technology, 2012, 14(6): 567-572. doi: 10.1088/1009-0630/14/6/30 [6] 胡纯栋, 许永建. EAST中性束注入器研制进展[J]. 核技术, 2015, 38: 110603Hu Chundong, Xu Yongjian. Development progresses of EAST neutral beam injector[J]. Nuclear Techniques, 2015, 38: 110603 [7] Hu Chundong, Xie Yahong, Xie Yuanlai, et al. Overview of development status for EAST-NBI system[J]. Plasma Science and Technology, 2015, 17(10): 817-825. doi: 10.1088/1009-0630/17/10/02 [8] 赵远哲, 胡纯栋, 谢远来, 等. CFETR NBI控制系统概念设计[J]. 核电子学与探测技术, 2021, 41(6): 1066-1073Zhao Yuanzhe, Hu Chundong, Xie Yuanlai, et al. Conceptual design of CFETR NBI control system[J]. Nuclear Electronics & Detection Technology, 2021, 41(6): 1066-1073 [9] 张亮, 王宾, 梁立振, 等. 中性束注入联锁保护系统设计[J]. 兰州文理学院学报(自然科学版), 2024, 38(3): 65-68Zhang Liang, Wang Bin, Liang Lizhen, et al. Design of neutral beam injection interlocking protection system[J]. Journal of Lanzhou University of Arts and Science (Natural Sciences), 2024, 38(3): 65-68 [10] 李洋, 胡纯栋, 郑长勇, 等. 射频负离子源分布式定时同步系统设计[J]. 核电子学与探测技术, 2021, 41(1): 178-182Li Yang, Hu Chundong, Zheng Changyong, et al. Design of distributed timing system for RF-driven negative ion source[J]. Nuclear Electronics & Detection Technology, 2021, 41(1): 178-182 [11] Liu Wei, Hu Chundong, Liang Lizhen, et al. Progress of the control system for negative ion source based neutral beam injector prototype at ASIPP[J]. Fusion Engineering and Design, 2021, 165: 112257. doi: 10.1016/j.fusengdes.2021.112257 [12] 李洋. 射频负离子源运行参数分析与性能预测研究[D]. 合肥: 中国科学技术大学, 2024Li Yang. Research on operation parameter analysis and performance prediction for RF-driven negative ion source[D]. Hefei: University of Science and Technology of China, 2024 [13] 段练, 刘智民, 宋士花, 等. 基于WinCC的负离子源中性束电源状态监控系统设计[J]. 核科学与工程, 2023, 43(2): 481-487Duan Lian, Liu Zhimin, Song Shihua, et al. Design of state monitoring system of the NNBI power system based on WinCC[J]. Nuclear Science and Engineering, 2023, 43(2): 481-487 [14] 李维斌, 王雅丽, 任青华, 等. 托卡马克脉冲电源实时控制系统设计[J]. 强激光与粒子束, 2019, 31: 096003 doi: 10.11884/HPLPB201931.190016Li Weibin, Wang Yali, Ren Qinghua, et al. Design of a real-time control system for pulse power supply in tokamak[J]. High Power Laser and Particle Beams, 2019, 31: 096003 doi: 10.11884/HPLPB201931.190016 [15] 舒先来, 刘智民, 谢亚红, 等. 基于射频功率调节的负离子源束流反馈控制研究[J]. 强激光与粒子束, 2022, 34: 116002 doi: 10.11884/HPLPB202234.220098Shu Xianlai, Liu Zhimin, Xie Yahong, et al. Research on beam feedback control of negative ion source based on RF power regulation[J]. High Power Laser and Particle Beams, 2022, 34: 116002 doi: 10.11884/HPLPB202234.220098 -
下载: