Development of new synchronized data system for J-PARC RCS

In J-PARC 3 GeV Rapid Cycling Synchrotron, the synchronized data system with reflective memory was constructed. However, this system has been operated for more than 10 years, it is essential to take countermeasures against deterioration over time. In addition, this system is difficult to support the large data sizes that have been recently requested. Therefore, we proposed a new synchronized data generation method. The test bench for a new synchronized data system that implements the new method was configured and its performance was verified. This result leads to the development of a new synchronous data system based on data transfer via LAN. In this paper, we describe the outline of the new synchronized data generation method and the results of performance tests.


Introduction
The J-PARC 3 GeV Rapid Cycling Synchrotron (RCS) is a high-intensity accelerator that accelerates beams with different conditions in the MLF and MR [1].Therefore, it is essential to monitor/analyze the beam condition of every beam pulse.For this purpose, it is essential to provide synchronized data, which is a dataset of data measured with the same beam.In addition, the synchronized data of all beam pulses with no missing data is required to investigate the cause of an abnormal event.Therefore, a synchronized data system was developed at RCS for Beam Position (BPM), Beam Loss Monitor (BLM), etc.The current system successes to provide real-time synchronized data and archiving the synchronized data with no loss [2].With the synchronized data, we were able to realize beam commissioning and beam supplying, with minimized beam loss.
However, because the current system has been in more than 10 years operation, it is necessary to take countermeasures against deterioration over time.In addition, since the system is configured using Refractive Memory (RFM) with 128 MB, it is difficult to support synchronized data for larger sizes.Therefore, we have developed a new synchronized data system that has the same real-time performance as the current system and can treat the larger size data.

Current synchronized data system
Figure 1 shows the overview of the current synchronized data system for BLM of the RCS.RFM has a function that enables share of the memory space between the devices (nodes) connected to an RFM network by high-speed communication.This function allows each node to access other information and data in its RFM.The timing information provided by the J-PARC timing system includes beam ID, Type, MR count, and S count.The "beam ID" is counted up every 25 Hz by the timing system and indicates the number of the beam.The "Type" can be used as information indicating the destination of the beam extracted from the RCS.The "MR count" is counted up every 25 Hz and is reset every MR acceleration cycle.The value is repeated from 1 to n in the MR cycle; n=34 in the case of MR cycle = 1.36 s.The "S count" indicates the number of MR cycles, and it is counted up each time the MR count is reset by 1.
The "Information management VME", which is indispensable synchronized data generation, is made available to BLM synchronized data system by transferring the timing information every 25 Hz.In addition, instruction information to generate synchronized data efficiently is supplied to the BLM signal processing VMEs and a synchronized data generation computer via the RFM.About 100 BLMs are installed on the RCS ring, and the measured signals from each BLM are input to the "BLM signal processing VME", and it calculates the beam loss during the beam injection, acceleration, and extraction at RCS.Then, the calculated beam loss is stored in the specified RFM address according to the instruction information for each beam pulse [3].
The "synchronized data generation computer" generates synchronized data by collecting each BLM's beam loss data from the address indicated in the instruction information.For example, the computer receives the instruction information and it understand the address which is stored the latest data of the MLF beam.Then, by only collecting the data at the indicated address, the computer can generate the synchronized data for the beam destined to the MLF.The current system using RFM has provided realtime synchronized data and all 25 Hz data acquisition.This enables efficient beam commissioning with minimal beam loss in the RCS.

Development of new synchronized data system
A new synchronized data system that has the synchronized data generation function of the current system and enables the use of larger data has been developed.

Proposed synchronized data generation method via LAN
The new method enables efficient synchronized data generation by sending the required data, such as data with the same beam ID, from the measurement system.The schematic of the real-time synchronized data generation is as follows.
(1) Implement a function in the measurement system to send data to the synchronized data generation computer with reference to the timing information.Here, the measurement system consists of a management module and some measurement modules.(2) The needed timing information is input to management module.And the module supplies the timing information and the control command to all measurement modules.For example, a control command that indicates data send is supplied.(3) By working according to the control command of the management module, all measurement modules can send data with the same beam ID via LAN.
(4) Synchronized data generation computers receive data with the same beam ID.Therefore, it is possible to efficiently generate synchronized data with real-time performance.In addition, the measurement module implements the function to store 25 Hz data for periods of time.The management module supplies the measurement modules with commands at certain intervals to send the stored data in batches.In this way, the computer receives the data for the same beam pulses from all the measurement modules at once.Thus, synchronized data can be efficiently archived for all 25 Hz.

Overview of the new synchronized data system configuration
A new synchronized data system that implements the proposed method was designed for BLM, and a test bench was configured.An outline of the test bench configuration is shown in figure 2. The new synchronized data system consists of a management module, four measurement modules, and a synchronized data generation computer.Each data is transferred via LAN (Ethernet).The protocol uses SiTCP, which was developed for multi-channel, high-speed data acquisition systems typical of highenergy physics experiments [4].Signals and information that need to avoid delays, such as timing signals used by the measurement module, are distributed by electrical signals.Figure 3 shows the developed management module and measurement module.Table 1 shows the main specifications of each module.and it can be shared by cascade connection.It is estimated that the TTL signal can be supplied to all measurement modules within 0.5 ms.
In addition, via LAN, the management module is set by a computer to MR count as a condition to send data.When the specified MR count is received, the management module supplies the control command to send data.
When the measured signals from the BLM are input, one measurement module can process four BLM signals.The measurement module calculates the beam loss from the BLM signal for one beam pulse of the RCS (acceleration time: 20 ms) every 1 ms, for a total of 20 points.The beam loss is calculated for all beam pulses.The control command to send data is received, the measurement module sends the data to the synchronized data generation computer via LAN.The array data including the timing information of the measured beams, such as beam ID, and the data of the four BLMs is sent to the computer.For all 25 Hz data acquisition, a function was implemented to send data for four BLMs to the synchronized data generation computer when the S count is counted up, which means every MR cycle.
The synchronized data generation computer (Lenovo ThinkPad E560: CPU i7-6500, 16 GB memory, 1 GbE/port, 1000Base-T) summarizes the data from the four measurement modules, which are sent at each specified MR count, into one dataset and supplies it as EPICS waveforms as real-time synchronized data.At this time, the synchronized data generation computer can supply synchronized data that distinguishes the destination based on the "Type" in the sent data header.In the same way, for 25 Hz all data collection, the data received each S count increment is summarized and saved as 25 Hz all data.

Performance test of the new synchronized data system
The purpose of this test is to confirm that it is possible to generate synchronized data that summarize the data with the same beam ID and destination (Type) by the proposed method.Timing signals and timing information were received from the J-PARC accelerator's timing system.The MR cycle was 1.36 s during this test.
First, the synchronized data generation with real-time performance was tested.In the test, we set the measurement module to send data with an MR count of 1. Figure 4 shows an example of the generated synchronized data output as a csv file.This figure shows that the data transmitted by each module (ADC01 to 04) is the data at "MR count = 1" as a set.It also shows that the other timing information has the same value.This result indicates that the synchronized data is correctly generated.The processing time of the synchronized data generation computer was 0.9 ms.In the long-term operation test, the processing time was 0.5 to 0.9 ms.From this, we consider the processing time to be 1 ms.This time is for 4 modules (16 BLMs).Therefore, it is assumed that processing about 100 BLMs would require approximately 6 times as much time.If the processing time is 2 times longer, taking the margin into account, the time needed to process data for all BLMs would be about 12 ms.Since an update cycle of about 1 s is sufficient for the monitoring data, this indicates that synchronized data generation with sufficient real-time performance is possible.Next, all 25 Hz data acquisition was tested.The measurement module was set to send data for one MR cycle at a time when the S count was counted up.The results confirmed that one summarized data of the same S count was sent from each measurement module.The processing time for archiving all 25 Hz data of the four modules was 36 ms.Assuming the same way, it would take two times as long, it is considered that all 25 Hz data of about 100 BLMs can be saved in 0.5 s.Since the MR cycle is 1.36 s, this indicates that it is possible to achieve data with no missing data.The results show that the synchronized data system by the proposed method is realizable.

Conclusion
Since the J-PARC RCS accelerates beams with different conditions, it is essential to use synchronized data.In this paper, we propose a synchronized data generation method based on data transfer via LAN.The proposed method implements a function to send data using timing information to the measurement system that consists of a management module and some measurement module, which enables efficient synchronized data generation at the computer that receives data.A test bench implementing this method was developed and its performance was verified.As a result, it was found to be possible to generate synchronized data with real-time performance and to archive all 25 Hz data without any missing data.These results indicate that the proposed method can be used to develop a new synchronized data system.We are planning to test this system in an actual environment and aim at the early start of its utilization in the J-PARC RCS.

Figure 1 .
Figure 1.Overview of the current synchronized data.
, 16 bit) The beam ID, Type, MR count, and S count are input to the management module as timing information by TTL signals.A 12 MHz master clock and a 25 Hz reference trigger are also input to synchronize with the timing system.The management module supplies the input timing information and the control command to all measurement modules at 25 Hz by TTL signal.The TTL signals input into the measurement module

Figure 2 .
Figure 2. Outline of the test bench configuration.Figure 3. Picture of modules.

Figure 3 .
Figure 2. Outline of the test bench configuration.Figure 3. Picture of modules.

Figure 4 .
Figure 4. Example of the generated synchronized data.

Table 1 .
Main specifications of modules.