Continuous and real-time data acquisition system for superconducting tokamaks HT-7 and TRIAM-1M

Continuous and real-time data acquisition system for superconducting tokamaks HT-7 and TRIAM-1M

Fusion Engineering and Design 81 (2006) 1621–1626 Continuous and real-time data acquisition system for superconducting tokamaks HT-7 and TRIAM-1M F. ...

126KB Sizes 2 Downloads 33 Views

Fusion Engineering and Design 81 (2006) 1621–1626

Continuous and real-time data acquisition system for superconducting tokamaks HT-7 and TRIAM-1M F. Wang a,∗ , J.R. Luo b , K. Nakamura a , K.N. Sato a , K. Hanada a , M. Sakamoto a , H. Idei a , S. Kawasaki a , H. Nakashima a b

a Kyushu University, 6-1 Kasuga-koen, Kasuga City, Fukuoka 816-8580, Japan Institute of Plasma Physics, Chinese Academy of Sciences, P.O. Box 1126, Hefei 230031, PR China

Received 31 January 2005; received in revised form 16 September 2005; accepted 16 September 2005 Available online 27 December 2005

Abstract Conventional data acquisition systems cannot deal with data acquisition for a long-time discharge of a nuclear fusion reactor. Thus, continuous data acquisition with a real-time data presentation during discharge must be developed. Two data acquisition systems, which include alternating CAMAC data acquisition and long-time PCI data acquisition, are designed for the longtime operation of HT-7 tokamak. Since an effective alternating mode is adopted, the alternating CAMAC data acquisition can accurately and continuously acquire data at a rate of 10 kHz. The acquired data is immediately transmitted to a data server and real-time results can be presented during the plasma discharge. As for the long-time PCI data acquisition, a special kind of PCI A/D card, which has a hard disk on board, is designed to collect data at a max speed of 200 kHz. Thus, the total sampling duration is only related to the capacity of the hard disk on board. These two types of data acquisitions were applied to HT-7 tokamak and a 250 s discharge was acquired. These data acquisition systems were also successfully demonstrated on a 2500 s plasma discharge on TRIAM-1M. This paper describes the two data acquisitions in detail. © 2005 Elsevier B.V. All rights reserved. Keywords: HT-7; TRIAM-1M; Data acquisition; CAMAC; PCI

1. Introduction Long discharges have been demonstrated on some fusion devices. For instance, in a HT-7 2004 experiment, a 250 s plasma was obtained, while TRIAM-1M ∗ Corresponding author. Tel.: +81 92 5837698; fax: +81 92 5736899. E-mail address: [email protected] (F. Wang).

0920-3796/$ – see front matter © 2005 Elsevier B.V. All rights reserved. doi:10.1016/j.fusengdes.2005.09.055

had a discharge of over 5 h. For a long-time operation of a fusion device, the data acquisition system must continuously run during the plasma discharge. Moreover, real-time data acquisition is indispensable for monitoring plasma behaviors and parameters during the discharge. Conventional data acquisition systems are usually adapted for short-time discharge, and their sampling rates and total acquiring durations are typically limited

1622

F. Wang et al. / Fusion Engineering and Design 81 (2006) 1621–1626

due to the restricted capacity of the storage media on board. If they are to be used for a long-time plasma discharge, a much slower sampling rate must be adopted, which decreases the accuracy and omits some detailed physical information of the signals. Furthermore, it is necessary to monitor important parameters of a plasma, and then change the operation during a long-time discharge, but conventional DAQ systems can only give the data acquisition results after each discharge and not during the procedure. Hence, conventional systems cannot deal with long-time data acquisition very well. The basic idea of long-time and real-time data acquisition is an alternating method. Normally these cards have two memory buffers on board, and when one is used to save data, the other transfers its data to a host computer or server by networking, but users hardly notice these details of the acquisition cards. We developed two types of data acquisition systems based on alternating modes for the long-time operation of HT-7 tokamak, including alternating CAMAC data acquisition and long-time PCI data acquisition [1,2].

utilized, the main features of the new alternating system are as follows: (1) the system can continuously collect data at maximum sampling rate of 10 kHz with 32 channels in one CAMAC crate. (2) To avoid data loss, the data overlaps using a locating pulse to address the overlapping points so that the separated data of the two A/D modules can be seamlessly and accurately merged. (3) Real-time results can be presented to a local computer and a data server by networking during a long-time plasma discharge. (4) Jorway 73A SCSI CAMAC Crate controller is adopted, which allows up to seven crates and is controlled by a personal computer using a SCSI bus with a maximum transfer rate of 2 MB/s. All the CAMAC A/D modules in the system are kinetic systems 4022. The main hardware specifications of this card are as follows: (1) 12-bit resolution; (2) sample rates to 250 kHz (one active channel), 31.25 kHz (eight active channels); (3) excellent dynamic accuracy; (4) pre-trigger, post-trigger; (5) external clock input connector. 2.1. Basic principle

2. Alternating CAMAC data acquisition CAMAC modules have been widely used in the past and there are about 100 CAMAC modules in the data system of HT-7, but today many new state-ofthe-art data acquisition hardware systems are available. For economic reasons, utilizing the existing CAMAC devices for long-time data acquisition is desirable and these devices are used under the following conditions [5]: (1) at a very low sampling rate; (2) in an iterative operation by one module [5]; (3) as an event-driven trigger system; (4) in alternating operations by two modules [3,4]. Only (4) corresponds to the long-time and real-time data acquisition operations [5]. In this operation mode, two A/D modules alternatively acquire data from the same input signal, but to avoid losing data, there must be a short overlapping period between the data acquisition duration of the two modules. Otherwise, the acquired data will not be exact. The basic concept of “cyclic processing” for data acquisition and continuous monitoring was introduced in 1994 and this type of system has been adopted in some nuclear fusion devices [3,4]. Compared to the former system where the sampling rate is about 10 Hz, the data does not overlap, and network functions are not

Fig. 1 shows the basic principle of this alternating mode. Each diagnostic signal is divided into two branches and each branch is inputted into an A/D channel, either A/D 1 or A/D 2. Initially, trigger 1 triggers A/D 1 and the acquired data is stored in memory-1. Just before memory-1 is full, trigger 2 triggers A/D 2 and the data is stored in memory-2. While data is being acquired by A/D 2, the data in memory-1 is transferred

Fig. 1. Principle of the alternating mode.

F. Wang et al. / Fusion Engineering and Design 81 (2006) 1621–1626

1623

to a local computer or a data server for presentation. Alternately, these processes are repeated until the discharge is terminated [1,2]. The locating pulse in Fig. 1 is used to process the overlapping data, which is described in Section 2.4.

of one A/D module is 32,768 ms. Thus, we chose 3.2 s as the switching time T of trigger sequence and 768 ms as the overlapping time T1.

2.2. Trigger sequence

In the alternating system, data acquisition is executed by a periodic switching action from an external trigger signal. Overlapping is adopted to avoid losing data as described in Section 2.2. Thus, we must locate the overlapping points to complete the data merger. A locating pulse is used to process the overlapping data generated by the trigger device. The overlapping data is sent into the first channel of each 4022 module, as shown in Fig. 1, which only causes a short delay from trigger signal (Td < 768 ms, i.e. 10 ms) as shown in Fig. 2. By simply calculating the rising edge or falling edge of the locating pulse in the software, the overlapping data position can be rapidly determined. This method is easily processed and precise.

An alternating external trigger source should be used in the alternating mode, but CAMAC trigger modules lack this function. Thus, a special trigger device based on a complex programmable logic device (CPLD), which can provide periodic and regular triggers to control and switch the alternating data acquisition, was designed. Fig. 2 shows the trigger sequence where T is the switching time, which should be an integral multiple of the external clock period. At point A, A/D 1 stops sampling. T1 is the overlapping time of A/D 1 and A/D 2. During T2, data transfer, data storage, and CAMAC module initialization should be completed for the next A/D 1 cycle. In the CAMAC data acquisition mode, the LAM signal is recognized from the order of the station number in the CAMAC crate. Then, a computer reads the acquired data from the A/D module. Thus, the sampling rate is restricted by the data transferring speed from CAMAC to the host computer. In the alternating mode, the number of A/D modules that can be equipped into a crate is determined based on the sampling rate (3). By conducting numerous tests, we know that four pairs of kinetic systems 4022 modules are suitable for each CAMAC crate if the sampling rate for each channel is 100 ␮s. In this case, the total sampling duration

2.3. Overlapping process

2.4. Demonstration on TRIAM-1M The alternating CAMAC data acquisitions were applied to a HT-7 2004 experiment where a 250 s plasma discharge was acquired. To test the alternating CAMAC data acquisitions in the steady-state operation, we upgraded and demonstrated it on TRIAM-1M tokamak. Fig. 3 shows the system structure. For HT-7 the longest discharge duration was less than 5 min. Hence, the acquired data was saved in the memory of the host PC. However, this is not possible for TRIAM-1M since the longest discharge exceeds

Fig. 2. Trigger sequence of alternating CAMAC data acquisition system.

1624

F. Wang et al. / Fusion Engineering and Design 81 (2006) 1621–1626

Fig. 3. Structure of alternating CAMAC data acquisition.

5 h. As we know that it is difficult to reduce the transfer time from CAMAC to PC, we adopted a multithreading technique to simultaneously take full advantage of all available host PC resources. Thus, we achieved a faster process speed and throughput. With the multithreading technique, it is possible for a real-time display and presentation. Then, the alternating data acquisition system can be used for the steady-state operation of tokamaks. The alternating CAMAC data acquisition program was developed with a Windows Operating System and the Jorway 73A SCSI CAMAC Crate Controller driver of Fermilab Computing Division. Fig. 4 shows the software diagram. The three saving threads have different objectives. Thread A transfers the data to a real-time monitoring computer by networking. Thread B transfers the data to a data server for real-time data distribution, while Thread C saves the data to a local hard disk as a backup. All these network communications are based on the TCP/IP API socket technique.

3. Long-time PCI data acquisition As mentioned above, the maximum data sampling rate of the alternating CAMAC data acquisition method

is 10 kHz with a kinetic systems 4022 module, which is insufficient for plasma dynamic behavior observations. Hence, a long-time PCI data acquisition was designed to continuously acquire data at high-speeds [1,2]. Its main features are as follows: (1) this card is based on PCI 2.2 standards and can be easily used on a PC with Windows, Linux, or another operating system; (2) sampling rate: maximum to 200 kS/s per signal, 16 channels, resolution: 12 bit; (3) IDE hard disks on board are designed as storage media instead of as memory. Thus, all the data is directly stored in disks on board without using the host PC data bus. Consequently, high speeds and long-times are possible. 3.1. System principle Fig. 5 shows the principle of the PCI data acquisition. The A/D card is inserted into the PCI slot and connected to the hard disks via a 40-pin IDE cable to save the data. When data acquisition begins, the data is initially acquired and saved to buffer A. When buffer A is full, the acquired data is saved into buffer B, while simultaneously transferring the data in buffer A to the hard disk on board with a given format. When buffer B is full, the data from the A/D converter is shipped

F. Wang et al. / Fusion Engineering and Design 81 (2006) 1621–1626

Fig. 4. Software diagram of alternating CAMAC data acquisition system.

Fig. 5. Principle of long-time PCI data acquisition.

1625

1626

F. Wang et al. / Fusion Engineering and Design 81 (2006) 1621–1626

Table 1 Data size and time of the PCI data acquisition Discharge duration

Data size (16 channels)

Read time (min)

Write time (min)

Transfer time (min)

Total time (min)

250 s (HT-7) 2500 s (TRIAM-1M)

50 M × 16 channels = 800 MB 500 M × 16 channels = 8 GB

3 22

3 12

2 12

10 49

into buffer A while the data in buffer B is transferred to the hard disk. These processes continue under the control of the main system logic based on the FPGA of the A/D cards. During data acquisition, the host PC is completely idle since it does not control the A/D card. After data acquisition, the host PC collects all the data from the hard disks on board and transfers the data to the local PC hard disk. In theory, the maximum speed of the PCI is 133 MB/s, which is much faster than the IDE. Hence, the maximum sampling rate depends on the speed of the IDE. For ATA 100 and a 5400 rpm hard disk, the maximum sampling rate is 200 kS/s and the total sampling duration only depends on the capacity of the hard disk on board. For instance, for a 40 GB hard disk, 16 channels/1 card, 100 kS/s, the total sampling duration is about 4 h. Furthermore, the duration can be increased by using larger hard disks.

Therefore, the upgraded system is suitable for steadystate operations, which we will demonstrate in our next experiment. 4. Summary Two data acquisition systems were designed for long-time operations of nuclear fusion. They have been successfully demonstrated during a 40 min plasma discharge. To use the existing CAMAC devices, an alternating CAMAC data acquisition is superior for longtime data acquisition and real-time data presentation even for a steady-state operation. The long-time PCI system is a good solution for minute high-speed data acquisition. However, it is unsuitable for steady-state operations. Acknowledgements

3.2. Demonstration on TRIAM-1M We demonstrated the acquisition system on TRIAM-1M. The host PC for data acquisition is a Dell PC with a P4, a 3.0 GHz CPU, 1 GB RAM, SATA 150 RAID0 200 GB hard disk, and a Windows XP operating system. The data server is a professional Turbo Linux server with raid disks, which are connected into 100 M LAN. For a discharge of several minutes, the system works well. Although the data is continuously collected at a high sampling rate, it takes a long time to read, process, transfer, and save this huge amount of data in a steady state (i.e. 30 min). Table 1 provides an example of the data size and time for PCI data acquisition in one shot. The steady-state operation is inconvenient. Thus, we have upgraded the PCI data acquisition and added a real-time data transferring function. The collected data is transferred to a hard disk on an A/D card, transferred to the data server by networking, and then the data on the hard disk is backed up to the local data server.

The authors are grateful to all the members of the Computer Application Department at ASIPP and the TRIAM Experimental Group for their help and collaboration.

References [1] J.R. Luo, H.Z. Wang, Z.S. Ji, L. Zhu, F. Wang, Y. Shu, The distributed control and data system in HT-7 Tokamak, IEEE Trans. Nucl. Sci. 49 (2002) 496–500. [2] J.R. Luo, L. Zhu, H.Z. Wang, Towards steady-state operational design for the data and PF control systems of the HT-7U, Nucl. Fusion 43 (2003) 862–869. [3] E. Jotaki, S. Itoh, Continuous monitoring and data acquisition system for steady-state tokamak operation, Fusion Technol. 27 (1995) 171–175. [4] E. Jotaki, S. Itoh, A data acquisition method against unpredictable events during long-time discharges and its application to the TRIAM-1M Tokamak experiment, Fusion Technol. 32 (1997) 487–492. [5] H. Nakanishi, Steady-state data acquisition method for LHD diagnostics, Fusion Eng. Des. 66–68 (2003) 827–832.