Academic Journal of Science and Technology ISSN: 2771-3032 | Vol. 14, No. 1, 2025 80 New Architecture Design of Magnetic Field Monitoring System Based on HIAF Dongshuai Jin1, a, Jin Jin1, * 1School of Electrical Engineering, Northwest Minzu University, Lanzhou 730030, China asmxjds150@163.com, *Corresponding author: 2892785655@qq.com Abstract: The High-Intensity Heavy Ion Accelerator Facility (HIAF) is one of China's major scientific and technological infrastructure projects, aimed at providing an internationally leading research platform for nuclear physics, nuclear astrophysics, nuclear energy development, nuclear safety, and materials science. During the operation of HIAF, the high-precision measurement and control of magnetic fields are crucial for the stable operation of core equipment. To meet the high demands of HIAF for precision, real-time performance, and system autonomy in magnetic field measurement, this research designs and implements a high-precision magnetic field measurement system based on the LACCS (Large-scale Accelerator Cluster Control System) architecture. The system integrates advanced hardware and software designs, enabling it to efficiently and accurately complete distributed magnetic field measurement tasks, thus providing technical support for the smooth operation of HIAF. Keywords: HIAF, Magnetic field measurement system, Data processing, FPGA, ARM. 1. Introduction The High Intensity Heavy-ion Accelerator Facility (HIAF) is a landmark scientific research project in China's heavy-ion accelerator field. The project is built by the Institute of Modern Physics, Chinese Academy of Sciences, and is located in Huizhou City, Guangdong Province. It is one of the key contents of the "Medium- and Long-Term Plan for the Construction of National Major Scientific and Technological Infrastructure (2012-2030)" [1]. The project started construction in 2018, with a planned investment of RMB 1.67 billion and a construction period of 7 years. It aims to provide a world-leading accelerator facility for multiple disciplines such as nuclear physics, nuclear technology applications, and materials science. HIAF plans to build a next-generation high-current heavy ion accelerator with cutting-edge international technology. Its biggest highlight is that it can generate extremely unstable nuclides far from the stable line and provide low-energy heavy ion beams with the world's top current intensity [2]. At the same time, HIAF also has a pulsed heavy ion beam that can accelerate to an energy of 4.25 GeV/u per nucleon and is equipped with a world-class nuclear mass measurement spectrometer. With these features, HIAF can provide a wide range of experimental conditions to support heavy ion physics research such as the identification of new nuclides, the expansion of the nuclide map, and the precise measurement of the mass of short-lived atomic nuclei [3]. The perspective view of the HIAF three-dimensional structure is shown in Figure 1. Figure 1. Isometric perspective view of the HIAF underground tunnel and above-ground unit Multiple devices need to be installed on the heavy ion accelerator for monitoring tasks. During the operation of the heavy ion accelerator, the magnetic field, as one of the important physical parameters of the accelerator, directly determines the trajectory and motion state of the particles. The magnetic field in the accelerator not only needs to provide sufficient guidance and focusing force to maintain the stable operation of the particles, but also needs to accurately control its intensity and distribution to meet the needs of different experiments. In order to ensure the stability of the accelerator operation and the reliability of the experimental results, it is particularly important to measure the magnetic field in real time and accurately. This paper mainly designs the embedded system based on the new control architecture LACCS, and designs a GUI interface to facilitate the monitoring system and adjustment parameters. 81 2. Magnetic Field Measurement Method The main functions of the magnetic field in a heavy ion accelerator are as follows: Particle guidance and focusing: The magnetic field guides and focuses the particle beam through the deflection magnet and the quadrupole magnet to ensure that the particles move along the designed orbit. Energy selection and control: The strength of the magnetic field determines the deflection radius of the particles on the curved orbit, which is used to separate and select particles with specific energy. Beam quality optimization: Precise control of the magnetic field can reduce beam divergence, enhance the brightness of the accelerator and the measurement accuracy of the experiment [4]. Since the strength, distribution and stability of the magnetic field directly affect the performance and experimental results of the heavy ion accelerator, it is necessary to establish a high- precision magnetic field measurement system. This can not only provide data support for the commissioning and operation of the accelerator, but also provide a reference for subsequent experimental optimization and scientific research. In magnetic field measurement, in order to adapt to different application scenarios and accuracy requirements, a variety of measurement methods are often used. The following is a detailed introduction to the induction coil method, Hall sensor method and nuclear magnetic resonance (NMR) method. These three methods have their own characteristics and are important applications in heavy ion accelerator magnetic field measurement systems [5]. The induction coil method uses Faraday's law of electromagnetic induction to induce electromotive force through the movement of a conductor coil in a magnetic field or the change of a magnetic field, thereby measuring the magnetic field strength. This method has the advantages of simple structure and high sensitivity, and is particularly suitable for dynamic magnetic field measurement. However, for the measurement of static magnetic fields, the accuracy of the induction coil method is relatively low [6]. The Hall sensor method is based on the Hall effect, which states that when a conductive material is placed in a magnetic field perpendicular to the direction of the current, a transverse voltage proportional to the magnetic field strength is generated. Hall sensors are small in size, fast in response, and suitable for DC and low-frequency magnetic field measurements, so they are widely used in industry and scientific research [7]. However, their stability and linearity may be limited in high temperature and strong magnetic field environments. The nuclear magnetic resonance (NMR) method uses the effect of magnetic fields on atomic nuclear spins and infers the magnetic field strength by measuring the resonance frequency of nuclear spins in a magnetic field. This method has extremely high measurement accuracy and is suitable for measuring extremely weak magnetic fields. Therefore, it is widely used in basic physics research and medical imaging [8]. However, NMR equipment is complex and expensive, and is usually used in laboratories and specific application scenarios. The above three methods have their own advantages and disadvantages. According to different application requirements, you can choose the appropriate magnetic field measurement method to obtain the best measurement effect. This project mainly uses the induction coil method to measure the magnetic field. 3. Introduction and Analysis of System Design and Interface Design Methods 3.1. Introduction to LACCS Architecture The Large-scale Accelerator Complex Control System (LACCS) is a control system independently designed by the Institute of Modern Physics. It is an efficient and autonomous distributed control platform designed for control systems of large scientific research equipment, application accelerator devices and other types of devices. The system uses C/C++ language and builds a flexible and modular architecture based on the operating system API and standard library. The core feature lies in its embedded self-developed high-speed communication protocol, CVLink (Control Quantity Link Protocol), which not only supports multi-node real-time data transmission, but also achieves highly secure data encryption. The LACCS file structure is shown in Figure 2. The main development files used are FileDB database files, ControlsApp program design files, configs configuration files and LACCS startup programs. Figure 2. LACCS file structure 3.2. LACCS Design Architecture First, we will introduce the self-developed high-speed communication protocol CVLink of the LACCS system. CVLink is a custom distributed real-time control system data protocol based on the TCP/IP protocol and running on an Ethernet link. The data types in this protocol all use the custom data type control variable (Control Variable). This is referred to as CV in the article. The parameters that need to be sent and read back in the article must be stored in the database in the form of CV. The development of LACCS does not require very complex environment variable configuration. According to actual 82 needs, the main functions developed are as follows: defining LACCS file database, parameter sending and reading back, long data waveform acquisition and storage, user interface design, etc. LACCS development is mainly based on C and C++ languages. The specific overall development process is shown in Figure 3, which mainly includes LACCS program, CV control and LACCS GUI development. application  development BRAM LACCS GUI Deploy Send Read  back Write Read Figure 3. LACCS development process Before the embedded application is designed, it has been processed by FPGA. The software used for the design of FPGA program is Vivado, and the version must be compatible with the petalinux version of the customized system. The design structure of the core control module of the BRAM register that stores data is shown in Figure 4, where the input includes two clock signals clk, a trigger signal trigger, a data signal clr_flag and a reset signal rst. The output includes a 32- bit address signal addr, read enable en and write enable we, and the double buffer flag rd_flag of BRAM. BRAM is divided into two spaces that can be used as a double buffer, one space for writing and the other for reading. After writing is completed, the roles of the two spaces can be interchanged to achieve seamless data processing. In this way: reading and writing can be carried out simultaneously, avoiding read-write conflicts, improving data throughput, and increasing the robustness of the system. clk rst clr_flag[7:0] trigger clk_200MHz addr[31:0] en we rd_flag[31:0] Figure 4. BRAM control structure module 3.3. Application Design The application design structure is shown in Figure 5. After using the hardware bitstream file generated by FPGA and tailoring the Linux system through petalinux, the design application is used in the system, and after embedding the custom CV variables for variable control, it is transferred to the CV database. The database will interact with the interface, and finally realize the interaction between the interface and the underlying data. After the interface is implemented, it needs to be deployed, so that people without relevant development environment can also use the interface client for operation and control. petalinux cutting  system app CVDB LACCS GUI DEPLOYCV Figure 5. Application design process The main functions implemented by the application include data sending and reading back, file saving, waveform data reading and publishing, refresh time control, etc. 3.4. Graphical interface design LACCS GUI is based on Windows platform, requiring Windows 10 and above, Visual Studio 2022 and above, and C++ development environment for normal development. In the process, since multiple development boards are required to execute the same program at the same time, LACCS multi- process service is required to maintain normal operation. Multi-process service can effectively improve the parallel processing capability of the system, so that each development board can execute tasks independently, avoid the bottleneck of a single process, and improve the overall operation efficiency. Secondly, the multi-process architecture enhances the stability and reliability of the system. The failure of any process will not cause the collapse of the entire system, thereby improving the fault tolerance of the system. In addition, multi-process service facilitates the rational allocation and management of resources. Through communication and collaboration between processes, the modularization and task decomposition of complex tasks are realized, which is convenient for development and maintenance. In summary, LACCS multi-process service provides strong technical support for the development of magnetic field measurement system, and significantly optimizes the development process and system performance. The multi-process implementation logic is shown in Figure 6. 83 Start Main process (Main Screen) On‐premise servers Subprocess 2 Subprocess 1 2. Create 1. Launch 3. Open 5. Send other  commands 4. Connect to  servers 6. Send the command to open  the secondary sub‐interface 7. Open 9. Send other  commands   Figure 6. GUI multi-process implementation logic 4. Preliminary Experimental Results The initial interface after designing the interface and starting it is shown in the figure, which contains a variety of control quantities. It contains 10 data waveform outputs and control modes, sampling rate and other function buttons. As can be seen from Figure 7, the interface has successfully read the waveform of the first channel connected to the signal source, and other channels that are not connected to the signal source can read the noise in operation. Each channel is limited to a maximum of 1000 points. And the data of the control quantity is read, such as K and OFFSET of each channel, sampling rate and sampling time, etc. At this point, the preliminary development of the program has been completed. Figure 7. Preliminary implementation of the GUI interface 5. Conclusion The magnetic field measurement system is an indispensable system in the operation of the accelerator. In this paper, the application program and graphical interface of the magnetic field measurement system based on the embedded Linux operating system are preliminarily designed and implemented. This development process is implemented using the LACCS architecture. The system needs to work together through FPGA chips and ARM chips to complete the real-time acquisition and processing of magnetic field data. In order to meet the needs of high precision and real-time data, in the development of embedded software, relying on the LACCS architecture, functional modules such as data processing, data storage, and data publishing are designed and implemented. The CVLink protocol is used to complete the interaction between the program and the database, and the QT interface is successfully integrated for data display and operation, preliminarily realizing the process development of the entire complete project. By realizing rapid data processing and precise control in the embedded system, the design meets the needs of the magnetic field measurement system for high 84 precision and high real-time performance, and the system is stable and reliable with strong scalability. References [1] Yang J C, Xia J W, Xiao G Q, et al. High intensity heavy ion accelerator facility (HIAF) in China [J]. Nuclear Instruments and Methods in Physics Research Section B: Beam Interactions with Materials and Atoms, 2013, 317: 263-265. [2] Sheng L N, Zhang X H, Zhang J Q, et al. Ion-optical design of High energy FRagment Separator (HFRS) at HIAF [J]. Nuclear Instruments and Methods in Physics Research Section B: Beam Interactions with Materials and Atoms, 2020, 469: 1-9. [3] Ma X, Wen W Q, Zhang S F, et al. HIAF: New opportunities for atomic physics with highly charged heavy ions [J]. Nuclear Instruments and Methods in Physics Research Section B: Beam Interactions with Materials and Atoms, 2017, 408: 169-173. [4] Pannetier M, Fermon C, Le Goff G, et al. Femtotesla magnetic field measurement with magnetoresistive sensors [J]. Science, 2004, 304(5677): 1648-1650. [5] Haque M A, Rahad R, Faruque M O, et al. Numerical analysis of a metal-insulator-metal waveguide-integrated magnetic field sensor operating at sub-wavelength scales [J]. Sensing and Bio- Sensing Research, 2024, 43: 100618. [6] Wang G, Wu Y, Guan X, et al. Highly sensitive fiber vector magnetic field sensor based on an open-cavity Mach-Zehnder interferometer filled with magnetic fluid [J]. Sensors and Actuators A: Physical, 2025, 381: 116075. [7] Li W, Li Z, Han W, et al. Measured viscosity characteristics of Fe3O4 ferrofluid in magnetic and thermal fields [J]. Physics of Fluids, 2023, 35(1). [8] Islam M R, Khan M M I, Al Naser A M, et al. Design of a quad channel SPR-based PCF sensor for analyte, strain, temperature, and magnetic field strength sensing [J]. Optical and Quantum Electronics, 2022, 54(9): 563.