为实现中子感生瞬发伽马射线方法在线测量煤炭元素含量,采用C#编写了自动测量程序.采用File SystemWatcher监测谱文件的生成,利用StreamReader读取伽马能谱的数据,用五点二次平滑法平滑计数,利用11道计数和寻找峰位,通过线性回归方程计算碳、氢、氧的含量.自动测量程序不仅可以自动计算元素含量,还能自动控制中子探测器、多道脉冲分析器、伽马射线探测器和D-T中子发生器等硬件.现场测试结果表明,该程序自身问题引起的设备故障率几乎为零,每个伽马能谱的解析时间小于1s,能满足煤炭元素含量在线测量的要求.
In order to perform on-line coal element contents analysis based on NIPGA (Neutron Induced Prompt Gamma-ray Analysis), a program of C# for automatic control and parsing spectrum is compiled. FileSystemWatcher is used to watch whether a spectrum document is produced, whose data is read by StreamReader. Then the data is smoothed by a 5-point quadratic polynomial. The sum count of eleven channels is used for finding the peak position. The contents of carbon, hydrogen and oxygen in coal are computed by the linear regression equations. The program can compute the element contents and can control the hardware of the analyzer, such as neutron detector, Multi-channel pulse analyzer, gamma-ray detector and D-T neutron generator. On-line test results indicate that the equipment failure rate caused by the program is almost zero, and the time of parsing spectrum is less than 1 second which can meet the requirement of on-line coal element contents analysis.