The TJ-II data acquisition group is responsible for providing resources for data acquisition and analysis in the TJ-II experimental environment. 'Resources' signifies digitizer channels properly programmed, data acquisition control, experimental data management, and develop-maintenance of software libraries devoted to data integration-retrieving.

In pulsed fusion devices, there are a set of systematic activities that are executed in a cyclical way during the production of discharges. Figure 1 shows the phases corresponding to the TJ-II device.




Figure 1: TJ-II data cycle

The first phase, named "Set-up", represents the set of actions to perform between shots, in order to programme the acquisition channels and to monitor control systems of diagnostics. The next step, "Discharge", includes all activities related to the shot production and data acquisition. In fusion, the measurement systems, or diagnostics in our terminology, translate their observations into electrical signals. The signals are sent to transient recorders in order to be able to study their temporal evolution. Data acquisition cards, in general, provide local storage for the collected data (in TJ-II, presently, we acquire between 30 and 60 Mbytes per discharge, what means, more or less, 20 GB per month).

After finishing the discharge, the step "Data transfer" begins. Just after the shot, the data are located in several subsystems and they must be integrated under a single data server in a temporary buffer to be used by the "pre-analysis" programs. The transmission must be finished in the least possible time (typically, a few seconds in TJ-II).

To perform computations with anyone of the data collected from any computer and any application, it is necessary to generate the "discharge file" in the data server as fast as possible [1]. This file, that is created in the "Data compression and storage" phase (from the temporary buffer), keeps all the information related to a discharge. The "discharge file" allows to unify the data writing in a common format independently on the acquisition instrumentation or configuration parameters. In this stage, in order to save storage, the information is also compacted [2] (The compaction rate in TJ-II can be over 80% without spectral distortion, i.e., the whole signal written in only a 20% of its actual size and we recover the initial samples with the original Fourier spectrum. The technique was patented by us some years ago).

In parallel with "Data compression and storage", also begins the stage "Pre-analysis". In general, a simple visual inspection of the signals provides enough information about the goodness of the measurements. From these observations, it is feasible to feed back the first phase of the cycle, and to configure for the next shot better parameters for both, device control and data acquisition. "Pre-analysis" programs are ad-hoc programs to observe plasma behaviour in a fast way.

When the "discharge file" has been built, begins the last step of the cycle, "Analysis". Each diagnostician analyses his data according to the proper codes to attain plasma parameters. Generally, these analysis programs read raw data, process them and feed databases which contain data with physical sense [3]. The raw data are read-only data, but the processed data can be modified. In TJ-II, the software libraries for data access are based on the RPC protocol, thus allowing its use from several platforms and operating systems (in particular we use UNIX, Linux and Windows) [4]. Of course, there is not temporal limit to perform calculations. However, sometimes it is important to perform some computations that allow to feed back the first phase of the cycle between shots (remember that the repetition period of discharges in TJ-II is more or less 10 m).

Figure 2 shows the local area network architecture for the TJ-II experimental systems and data servers. The data acquisition processes were built in a fully distributed way. We developed the AEDS synchronization system (Asynchronous Event Distribution System), which provides "soft synchronization" capabilities to the TJ-II environment. This system is used to broadcast operation messages to the experimental network [5].



Figure 2: Local area network arquitecture
 
Channel programming is accomplished from two different systems. A local data acquisition system allows channel configuration-monitoring only to computers linked to the local area network [6, 7, 8, 9]. Seven VXI mainframes and three CAMAC crates provide 392 general purpose data acquisition channels that form the so-called local data acquisition system. Data acquisition resources are controlled and managed by ad-hoc application software. VXI and CAMAC systems are controlled by a real-time operating system: VxWorks. The graphic user interface for digitizer set-up is shown in the figure 3.



Figure 3: GUI for channel configuration
																	

Recently, the TJ-II remote participation system (RPS) has been developed [10, 11, 12]. It was designed to extend to INTERNET the working capabilities provided in the TJ-II local environment, i.e., tracking the TJ-II operation, monitoring/programming data acquisition and control systems, and accessing databases. The TJ-II RPS was based on web and Java technologies because of their open character, security properties and technological maturity. A web server acts as a communication front-end between remote participants and local TJ-II elements. From the server side, web services are provided by means of resources supplied by JSP pages. The client part makes use of web browsers and ad-hoc Java applications. The operation requires the use of a distributed authentication and authorization system. This development employs the PAPI System [13].

Software related to remote participation was designed following a three-tier model (Figure 4) [14]. The first tier (Client Tier) groups client software containing only user interface code (web pages and Java applications). The second tier (Middle Tier) is based on web servers and includes code for authentication, authorization and query processing. The third tier (Data Tier) consists of a relational database server for managing configurations.

 

Figure 4: Remote participation system software architecture


The software that controls data acquisition systems and control systems executes on the respective systems [15]. They are LabVIEW applications running under the Windows 2000 Operating System. These applications also follow the three tiers software model described previously. All interplay between users and systems is carried out through the Data Tier. This architecture avoids that the data acquisition system controllers provide access control, database support or graphic user interface resources. Therefore, the computation capabilities of these systems can mainly be devoted to data handling.

Figure 5 summarizes the TJ-II remote participation system architecture. This architecture is a consequence of the PAPI system which considers two independent elements: the authentication server (AS) and the point of access (PoA) that is in charge of authorization tasks. Several PoAs can coexist, although, at present, only one PoA is defined in the TJ-II environment.

 


Figure 5: TJ-II remote participation system architecture


We developed a visual data analysis application based on X-Window/Motif. All TJ-II signals can be visualized as it is shown in the figure 6.

 


Figure 6: GUI for visual data analysis

 

Multiprocessor architectures are being applied for data acquisition in the TJ-II remote participation environment. These save on computational resources in the main controller while also providing extra calculation power (even for real-time requirements). In addition, 4GL user programs can be downloaded on-line to a multiprocessor data acquisition system [16, 17]. After developing a simulation platform [18], a multiprocessor system was implemented [19], showing that it is possible to increase the processing capabilities of a PXI standard system by adding one or more commercial processing cards and developing the specific software modules that allow the communication between the processing cards and the rest of the system. At present, this development is being adapted to the requirements of the TJ-II bolometry diagnostic. Eighty digitisation channels take signals from a PXI system whose slot-0 controller (NI-8176) executes Linux. A processing card (CC8-BLUES from EKF System), which is devoted to fast computations, is located in a peripheral slot. The system controller and the processing card use Red Hat Linux 9, kernel 2.4.22, with real time capabilities (ADEOS patch; RTAI 24.1.12). LabView software can be downloaded on-line to the processing card.

 
References

[1] J. Vega, C. Crémy, E. Sánchez, A. Portas, J. A. Fábregas y R. Herrera. “Data management in the TJ-II multilayer database”. Fusion Engineering and Design, 48 (2000) Pag. 69.

[2] J. Vega, C. Crémy, E. Sánchez, A. Portas, S. Dormido. “Encoding technique for a high data compaction in data bases of fusion devices”. Review of Scientific Instruments, Vol. 67, No. 12, Pag. 4154, Dic. 1996.

[3] E. Sánchez, A. B. Portas y J. Vega. “A relational database for physical data from TJ-II discharges”. Fusion Engineering and Design, 60 (2002) Pag. 341-346.

[4]: E. Sánchez, J. Vega, C. Crémy and A. Portas. “Accessing TJ-II data with remote procedure call”.  Review of Scientific Instruments, Vol. 72, No. 1, Pags. 525-529, Ene. 2001. J.  Vega, E.  Sánchez,  A. 
Portas, M. Ochando, A. Mollinedo, J. Muñoz, M. Ruiz, E. Barrera, S. López. “A distributed synchronization system for the TJ-II local area network”. Fusion Engineering and Design, 71 (2004) Pag. 117-121.
[5] J. Vega, E. Sánchez, A. Portas, M. Ochando, A. Mollinedo, J. Muñoz, M. Ruiz, E. Barrera, S. López. “A distributed synchronization system for the TJ-II local area network”. Fusion Engineering and Design,
71(2004) Pag. 117-121.

[6] J. Vega, C. Crémy, E. Sánchez, A. Portas. “The TJ-II data acquisition system: an overview”. Fusion Engineering and Design, 43 (1999) Pag. 309.

[7] C. Crémy, J. Vega, C. M. Dulya, E. Sánchez, A. Portas. “Multiprocessor architecture to handle TJ-II VXI-based digitization channels”. Review of Scientific Instruments, Vol. 70, No. 1, Pag. 513, Ene. 1999

[8] C. M. Dulya, C. Crémy, J. Vega, E. Sánchez, A. Portas. “Applying object oriented concepts to online data acquisition”. Review of Scientific Instruments, Vol. 70, No. 1, Pag. 517, Ene. 1999.

[9] J. L. de Pablos, P. Olmos, J. Vega y S. Dormido. “Improvements in the treatment of signals used for plasma diagnostics”. IEEE Transactions on Nuclear Science. Vol. 43, No. 1, Pag. 229, Febrero 1996.

[10] A. López, J. Vega, A. Montoro, E. Sánchez, J. Encabo, A. Portas, R. Balbín, J. M. Fontdecaba, J. A. Jiménez, J. Dies and the TJ-II Team. “Software and hardware developments for remote participation in TJ-II operation. Proof of concept using the NPA diagnostic”. Fusion Engineering and Design, 60 (2002) Pag. 487-492.

[11] J. Vega, E. Sánchez, A. López, A. Portas, M. Ochando, A. Mollinedo, A. Sánchez, M. Ruiz, S. López y E. Barrera. “Design of the TJ-II remote participation system”. Review of Scientific Instruments, Vol,
ol. 74, No. 3, Pags. 1773-1777, Marzo. 2003.

[12] J. Vega, E. Sánchez, A. López, A. Portas, M. Ochando, E. Ascasíbar, A. Mollinedo, J. A, Muñoz, A. Sánchez, M. Ruiz, E. Barrera, S. López, R. Castro, D. López. “Present status of the TJ-II remote participation system”. Enviado a Fusion Engineering and Design.

[13] R. Castro-Rojo et al. Computer Networks. Vol. 37, No. 6 (December 2001) 703-710

[14] J. Vega, E. Sánchez, A. Portas, M. Ruiz, E. Barrera, S. López. “A multi-tier approach for data acquisition programming in the TJ-II remote participation system”. Review of Scientific Instruments, Vol. 75, No. 10, Pags. 4251-4253, Octubre. 2004.

[15] E. Sánchez, A. Portas, J. Vega, J. M. Agudo, K. J. McCarthy, M. Ruiz, E. Barrera, S. López. “Autonomous acquisition systems for TJ-II: controlling instrumentation with a 4th Generation Language”. Fusion Engineering and Design, 71 (2004) Pag. 123-127.

[16] E. Barrera, M. Ruiz , S. López, J. Vega , E. Sánchez. “Data processing in fusion experiments with remote participation”. Review of Scientific Instruments, Vol. 74, No. 3, Pags. 1791-1794, Marzo. 2003.

[17] M. Ruiz, E. Barrera, S. López, J. Vega, E. Sánchez, D. Machón, A. Marqueta. “Real time data acquisition and processing platform for fusion experiments with remote participation”. Fusion Engineering and Design, 71 (2004) Pag. 135-140.

[18] E. Barrera, M. Ruiz, S. López, J. Vega, E. Sánchez. “Simulation platform for remote participants in fusion experiments”. Fusion Engineering and Design, 71 (2004) Pag. 269-274.

[19] M. Ruiz, S. López, E. Barrera, J. Vega, E. Sánchez. “A distributed real time data processing architecture for the TJ-II data acquisition system”. Review of Scientific Instruments, Vol. 75, No. 10, Pags. 4261-4264, Octubre. 2004.