Develop an automated data acquisition system for TPS correction magnet power supply

Taiwan Photon Source is a third-generation 3 GeV synchrotron light source. Since the successful operation of the first beamline in 2013, comprehensive long-term testing and acceptance work has been carried out to ensure the stable operation of various types of correction magnet power supplies, totalling 1038 units. To standardise and save workforce and time for the measurement of correction magnet power supplies, an automated data acquisition system platform for correction magnet power supplies was developed using LabVIEW. This platform integrates control interface cards, high-resolution digital voltmeters, and analysis instruments. It also includes linearization and calibration compensation for the multi-channel direct constant current transformer to ensure simultaneous measurement of 24 magnet power supplies. Furthermore, it can automatically generate test reports in Word format, saving significant human resources and time. This platform has verified TPS correction magnet power supplies before installation, reducing the failure rate. Regarding measurement results, the output current ripple for the DCCT version is within five ppm, while the shunt resistor version is within ten ppm. The long-term current stability is consistently within ten ppm. The development of the fully automated data acquisition system platform and the measurement of 1038 power supplies were completed in four months.


Introduction
The Taiwan Photon Source (TPS) is a renowned 3 GeV synchrotron light source, and various types of correction magnet power supplies (CMPS) are used for adjusting the magnetic fields of the accelerator in the TPS lattice design [1,2].Table 1 categorises these power supplies based on their application scenarios, magnetic properties, and feedback current sensing elements into DCCT (Direct Constant Current Transformer) and shunt resistor versions.They are configured according to the specifications and characteristics required for correction magnets, with 1038 units [3,4].The high-precision power system plays a crucial role in maintaining the stability and precise control of the magnetic fields in the accelerator, which directly impacts the performance of the synchrotron accelerator.Additionally, the bandwidth requirements for fast correction magnet power supplies for Fast Orbit Feedback (FOFB) within the TPS are considered [5][6][7][8].As different types of CMPS have varying load characteristics and cable lengths, testing is performed using various correction magnet loads and the actual cable lengths.This allows for direct adjustment of the compensation parameters for a batch of CMPS, reducing installation final tuning time.This paper aims to efficiently conduct testing for numerous CMPS, both in terms of quantity and variety, by designing an automated data acquisition system (ADAS) for correction magnet power supplies using LabVIEW.It utilises a multi-channel switcher to simultaneously switch 24 data sets, reducing the workload on analysis instruments, high-resolution digital voltmeters, testing time, and personnel.The critical functions of the testing interface include output current spectrum -1 -analysis, long-term output current stability measurement, extensive data processing, and automatic report generation.This significantly reduces the data processing burden on testing personnel.The following sections will delve into the architecture and interface design of ADAS [9][10][11][12].

Automated data acquisition system architecture
The architecture of the fully ADAS for correction magnet power supply units can be broadly categorised into several components, including system structure, instrument communication, and data channel configuration.The ADAS structure, as illustrated in figure 1 Ultimately, LabVIEW integrates data from the 24 CMPS units, automatically generating Microsoft (MS) Word reports, optimising efficiency and reducing the demands on human resources and measurement time.

Correction magnet power supply
In CMPS, analogue modulation is employed as the control scheme.The central circuit architecture utilises a full-bridge configuration that facilitates quickly altering the output current polarity.It employs -2 -MOSFETs as power-switching devices.DCCT and shunt resistor current sensors are individually used as feedback current components.After processing with PI compensators and incorporating a small bias voltage to enhance zero-current crossover characteristics, a 33 kHz PWM compensating voltage signal is generated.This signal is supplied to the HIP4081 IC for driving the power-stage MOSFETs.Subsequently, the output current is obtained after passing through LC filtering and dump loads.
Numerous interlock protections have been implemented to enhance safety, including over-voltage, over-current, over-temperature, and power-related safeguards.The design characteristics ensure that in the event of a fault, the system latches into a particular state to facilitate subsequent troubleshooting and record-keeping.In figure 2, you can observe the DCCT and shunt resistor versions of CMPS, each with critical specifications such as an output voltage of 48 volts, current range of ±10 amperes, output current ripple of 10 ppm, long-term output current stability within ±50 ppm, and a small-signal bandwidth of 2 kHz, among other performance parameters.The CMPS is controlled through the CPSC.CPSC is a control interface card characterized by multiple channels, high sampling rates, and 20-bit high resolution, consisting of ADC and DAC.It utilizes the IP TCP protocol for establishing communication with the EPICS, facilitating the creation of a control domain.CPSC allows for three CPSC sets to execute Process Variable (PV) name control commands, which are used to drive CMPS outputs and retrieve their status.

DCCT linearization calibration
Given the utilization of four sets of six-channel DCCTs, totaling 24 channels, as the current sensing elements in the measurement interface, ensuring the uniform linearity of DCCT for each channel is essential.To achieve this, fitting curves are employed to derive compensation equations, which are subsequently incorporated into the measurement interface for calibration, as depicted in figure 3. The upper image represents the state before calibration, while the lower one illustrates the results after applying fitting curve calibration.The linear error has improved from 0.2 A to 0.01 A, ensuring consistent linearity across all channels.

Instrument communication protocols
Communication protocols within the measurement interface can be categorized into two types.The first type utilizes the instrument's native GPIB protocol.After configuring dedicated IP addresses, simultaneous connections can be established with multiple measuring instruments.The primary tools used include Agilent 3488A in the Multiplexer, responsible for switching the output current of 24 CMPS units.Keithley K2002, an eight-1/2-bit DVM employed for recording long-term current stability.HP 35670A DSA measures the output current spectrum.All these instruments communicate through the GPIB protocol.
The second type involves control networks within the EPICS system.It uses PV names of CPSCs defined by the instrument control team to control the operation of CMPS units.The above overview outlines the communication protocols employed for the instruments in the measurement system.

Corrector magnet
In figure 4, we present the correction magnet loads set up in the ADAS measurement interface.Additionally, a variety of TPS correction magnets and impedance parameters are detailed in table 1.However, specific correction magnet loads, such as Dipole trim coils, Phase shifters, short straight section IDs, and long straight section IDs, are still unavailable for CMPS testing.As an interim solution, Type A correction magnets are employed for evaluating shunt resistor version CMPS measurements.Adjustments to compensator parameters will be performed when actual correction magnet loads become accessible.

Measurement interface design
In our research, we have utilised NI LabVIEW to develop a fully automated measurement interface to address the extensive need for measuring the output current characteristics of 1036 CMPS units.The measurement interface encompasses the following functions: integration of measurement instrument -4 -  When integrating multiple measurement instruments, it is essential to have a clear understanding of the role each device plays within the system.For instance, the Multiplexer employs the Agilent 3488A as a 24-to-1 signal switch selector.It requires the evaluation of appropriate switch wait times to prevent premature sampling by the DVM, which could lead to signal distortion.Regarding spectrum analysis, we use the Agilent 35670A DSA to perform Fourier transformations on the CMPS output current.This advanced signal analysis instrument allows for the pre-configuration of measurement parameters in the program to ensure consistency in each measurement.To record the long-term stability of CMPS output current, we use the Keithley 2002 instrument, an eight 1/2-bit DVM.It necessitates enough transient waiting times to ensure the captured current data during switching does not impact the output's contemporary characteristics.
-5 -Regarding data and file management, the primary challenge lies in efficiently categorising various magnet loads and data archiving and file naming for a wide range of magnet loads and data.This not only aids in establishing an effective file management system and database and saves time managing files.The automatic generation of MS Word report files occurs after complete data capture.The system arranges file names, images, statistical data, and measurement timestamps automatically based on pre-set Word layouts.This results in simultaneously generating 24 standardised Word report files, significantly reducing post-measurement data processing time.In figure 5, the flowchart illustrates the process of the automated measurement interface.Subsequent sections will provide detailed explanations.

Initial settings and file name
This section primarily focuses on the initial configuration of measurement instruments to ensure consistency in the conditions for each measurement.Additionally, since there is a need to measure 24 different CMPS units with distinct magnet loads in a single run, separate data folders are created for each magnet load type to store output current data and image files.Batch file naming and serial numbering simplify the often complex file naming conventions.Figure 6 illustrates the creation of measurement data folders based on different attributes, facilitating efficient file management within the system.-6 -

Start-up timing and warm-up
In figure 7, a daily temperature variation chart for the measurement laboratory is depicted.It's noticeable that the temperature fluctuation remains around 2 degrees throughout the day.As the long-term stability measurement requires accumulating data over eight hours, various factors such as the lab's open environment, personnel movement, and the influence of central air conditioning can cause temperature drift.Additionally, during regular working hours, there is a need to set up new CMPS for testing.Hence, to ensure temperature stability, the decision was made to initiate CMPS measurements at 8 PM when the environment is relatively stable.The CMPS is operated at full load with a 10-ampere current, and the laboratory doors are closed.After one hour of thermal equilibrium, subsequent measurements commence, guaranteeing consistent daily environmental temperature conditions.

Data acquisition
The acquisition of CMPS output current is achieved through four sets of six-channel DCCTs, totalling 24 sets.They are sequentially polled, with the Multiplexer switching the measured current to the DVM and DSA for analysis.Long-term current stability measurements are performed with a one-second interval for eight hours, while the output current spectrum is analysed for one CMPS every ten seconds.The DSA calculates bank power measurements to generate the total harmonic current distribution.

Generating word files
For the generation output current of CMPS MS Word report files, a fixed Word format layout is configured.Extracted file names, test times, current ripple graphs, long-term graphs, and other data are automatically populated into the Word template to create the report files.Figure 8 illustrates the layout of the MS Word file for CMPS output current performance, a process that significantly streamlines subsequent data organisation efforts.

Measurement results
In figure 9, we present the completed CMPS automated measurement platform capable of simultaneously testing the output current characteristics of 24 CMPS units and generating reports.Two automated measurement platforms were installed in the laboratory, as shown in figure 10.In figure 10(a), Type A, B, and C correction magnets are used as test loads, while in figure 10(b), a combined correction coil of sextuple magnets as loads, including horizontal, vertical, and skew magnet coils.Operating both measurement systems concurrently enables the testing of 48 CMPS units, significantly reducing the time required for measurements.

Output current ripple
Utilising the high-resolution 1600-line scan DSA, we analysed the harmonic components of the output current in DCCT version CMPS within the frequency range of 0 to 12.8 kHz.The harmonic content of the output current is depicted in figure 11.It can be observed that at 4.3 kHz, CMPS exhibits a maximum current ripple of 103.5 μA, while at 6.98 kHz, a maximum current ripple of 92.178 μA is evident.No oscillations are observed at other frequency points, maintaining total harmonic distortion of the output current within 0.1 mA peak-to-peak.

Statistical analysis
The total number of TPS CMPS power converters tested upon completion is 896 units, excluding retests.The specification for output current stability in CMPS requires it to be within ±200 ppm.
-10 -However, most of the production current stability falls within ±10 ppm, with only about 7.25% exceeding ±10 ppm but well within the acceptable range of ±200 ppm.Additionally, 14% falls into the category of output current stability exceeding ±10 ppm due to CMPS failures, requiring retesting.Reasons for retesting and failures include unstable current output, overheating components, poor contact with control ICs, and circuit malfunctions, among others.After subsequent maintenance and adjustments, all testing requirements were successfully met.
In figure 13, a comparison of output current ripple between DCCT and shunt resistor types is presented, demonstrating that DCCT outperforms the shunt type in terms of output contemporary ripple characteristics.Furthermore, as shown in figure 14 for long-term stability testing, performance is similar in the range, but overall, DCCT outperforms the shunt type.From the design of the measurement system to the completion of the testing work, a total of 4 months was expended, resulting in the generation of 1038 pages of measurement reports.

Conclusions
The development of an ADAS for the comprehensive testing of a large number and variety of CMPS in the TPS has been successfully achieved.This system, implemented using LabVIEW, effectively streamlines the testing process, reduces the workload for test personnel, and ensures the stable and precise operation of the CMPS.ADAS provides essential functionality for CMPS testing, including output current spectrum analysis, long-term output current stability measurement, large-scale data processing, and automatic report generation.The linearization and calibration of the 24-channel DCCT were performed to ensure data accuracy.The ADAS, in combination with multi-channel switching, facilitates simultaneous data acquisition for 24 sets of CMPS, reducing the reliance on -11 -analysis instruments and minimizing testing time.Moreover, the integrated features of ADAS ensure the standardization of the CMPS testing process, leading to time and labour savings.
With ADAS, the TPS team can effectively verify the performance and reliability of CMPS before installation, contributing to the overall stability and precision of the accelerator's magnetic fields.The successful development and implementation of ADAS were completed in four months, allowing for the streamlined testing of 1038 CMPS units in the TPS.This system has proven to be an asset in the TPS facility's continuous improvement and maintenance efforts.
, employs a LabVIEW GUI program interface.It utilises the Experimental Physics and Industrial Control System (EPICS) control system of the instrument control team to manage the Correction Power Supply Control Cards (CPSC) and three sets, totalling 24 CMPS.Four groups of DCCT capture current signals from each channel.These current signals are then processed through a Multiplexer and analysed using an eight-1/2-bit Digital Voltmeter (DVM) and Dynamic Signal Analysis (DSA) for assessing current stability and spectral characteristics.

Figure 1 .
Figure 1.The architecture of the automated measurement platform system.

Figure 2 .
Figure 2. Photos of TPS CMPS: the left is the shunt resistor version, and the right is the DCCT version.

Figure 3 .
Figure 3.The upper image represents the DCCT data before calibration, while the lower print displays the data after calibration using the fitting curve compensated.

Figure 4 .
Figure 4. Type A, B and C of correction magnet with DCCT.

Figure 5 .
Figure 5.The process flowchart of the automated measurement interface.

Figure 6 .
Figure 6.Measurement data folders with files.

Figure 7 .
Figure 7.A daily temperature variation chart in the measurement laboratory.

Figure 8 .
Figure 8. Layout of MS Word file for CMPS output current.

Figure 9 .Figure 10 .
Figure 9. Propose a config setting page for the automated measurement platform.

Figure 11 .
Figure 11.Output current spectrum analysis of the CMPS.

Figure 12
Figure 12 illustrates the Long-Term Stability Measurement of CMPS Output Current.The upper graph displays the superior thermal equilibrium time for the DCCT version compared to the shunt resistor version in the lower chart.The shunt resistor version, being resistive, requires a longer time to reach thermal equilibrium.However, it is evident that the variation in output current ripple remains within 0.1 mA over 8 hours.The output current stability is maintained within ±5 ppm, showcasing exceptional current stability.

Figure 12 .
Figure 12.Output current stability of the CMPS during 8 hours.

Table 1 .
The various types of correction magnets power supplies.