Real-time data transfer in the TCV advanced plasma control system

5
Fusion Engineering and Design 81 (2006) 1939–1943 Real-time data transfer in the TCV advanced plasma control system A.P. Rodrigues a,, L. Pereira a , J.-M. Moret b , B.P. Duval b , C.A.F. Varandas a a Associa¸ ao Euratom/IST, Centro de Fus˜ ao Nuclear, Instituto Superior T´ ecnico, Av. Rovisco Pais, 1049-001 Lisboa, Portugal b Association Euratom/CRPP, Centre de Recherches de Physique des Plasmas, Lausanne, Switzerland Available online 15 May 2006 Abstract A high performance system, specially designed for real-time plasma control and event detection on fusion experiments has been developed by the Centro de Fus˜ ao Nuclear of the Instituto Superior T´ ecnico (CFN/IST). Presently it is being integrated into the advanced plasma control system of the TCV tokamak. It will substitute the PID controllers and the analogue G matrix of the actual control system with a digital control system based on DSPs to allow an easy change and configuration of the algorithms and parameters used for control. The digital control system needs to exchange a large amount of data among DSPs in every control cycle. The architecture of the digital system and the data transfer among DSPs are described in this paper. © 2006 Elsevier B.V. All rights reserved. Keywords: Real-time feedback control; Real-time parallel processing; Data transfer 1. Introduction Today’s magnetic-confinement nuclear fusion experiments require a whole set of features that are considerably hard to implement with existing control systems. Confinement performance, duration of the plasma, its shape, and the heating efficiency depend strongly on the architecture and processing capacity of the installed control system. This is why successful development of advanced operational regimes requires a modern real-time control system. Corresponding author. Tel.: +351 239410108; fax: +351 239824958. E-mail address: [email protected] (A.P. Rodrigues). In fact, plasma control must be fast, demanding con- siderable computation power; besides it needs an intel- ligent strategy for real-time decision making, which can only be achieved by a digitally programmable sys- tem. In the tokamak ` a configuration variable (TCV) of the Association EURATOM/Swiss Confederation, the existing analogue multiplier linear feedback control system is considerably limited regarding changing of algorithms and parameters. Presently several parts of the TCV control system are being upgraded. One of these is being replaced by a multi-DSP system specially designed for real-time plasma control and event detection. The multi-DSP sys- tem was developed by Centro de Fus˜ ao Nuclear of the 0920-3796/$ – see front matter © 2006 Elsevier B.V. All rights reserved. doi:10.1016/j.fusengdes.2006.04.003

Transcript of Real-time data transfer in the TCV advanced plasma control system

Page 1: Real-time data transfer in the TCV advanced plasma control system

Fusion Engineering and Design 81 (2006) 1939–1943

Real-time data transfer in the TCV advancedplasma control system

A.P. Rodrigues a,∗, L. Pereira a, J.-M. Moret b, B.P. Duval b, C.A.F. Varandas a

a Associacao Euratom/IST, Centro de Fusao Nuclear, Instituto Superior Tecnico, Av. Rovisco Pais, 1049-001 Lisboa, Portugalb Association Euratom/CRPP, Centre de Recherches de Physique des Plasmas, Lausanne, Switzerland

Available online 15 May 2006

Abstract

A high performance system, specially designed for real-time plasma control and event detection on fusion experiments hasbeen developed by the Centro de Fusao Nuclear of the Instituto Superior Tecnico (CFN/IST). Presently it is being integrated intothe advanced plasma control system of the TCV tokamak. It will substitute the PID controllers and the analogue G matrix of theactual control system with a digital control system based on DSPs to allow an easy change and configuration of the algorithmsand parameters used for control. The digital control system needs to exchange a large amount of data among DSPs in everycontrol cycle. The architecture of the digital system and the data transfer among DSPs are described in this paper.© 2006 Elsevier B.V. All rights reserved.

Keywords: Real-time feedback control; Real-time parallel processing; Data transfer

1

ecspsoda

f

0

. Introduction

Today’s magnetic-confinement nuclear fusionxperiments require a whole set of features that areonsiderably hard to implement with existing controlystems. Confinement performance, duration of thelasma, its shape, and the heating efficiency dependtrongly on the architecture and processing capacityf the installed control system. This is why successfulevelopment of advanced operational regimes requiresmodern real-time control system.

∗ Corresponding author. Tel.: +351 239410108;ax: +351 239824958.

E-mail address: [email protected] (A.P. Rodrigues).

In fact, plasma control must be fast, demanding con-siderable computation power; besides it needs an intel-ligent strategy for real-time decision making, whichcan only be achieved by a digitally programmable sys-tem.

In the tokamak a configuration variable (TCV) ofthe Association EURATOM/Swiss Confederation, theexisting analogue multiplier linear feedback controlsystem is considerably limited regarding changing ofalgorithms and parameters.

Presently several parts of the TCV control systemare being upgraded. One of these is being replaced bya multi-DSP system specially designed for real-timeplasma control and event detection. The multi-DSP sys-tem was developed by Centro de Fusao Nuclear of the

920-3796/$ – see front matter © 2006 Elsevier B.V. All rights reserved.doi:10.1016/j.fusengdes.2006.04.003

Page 2: Real-time data transfer in the TCV advanced plasma control system

1940 A.P. Rodrigues et al. / Fusion Engineering and Design 81 (2006) 1939–1943

Fig. 1. Present architecture of the TCV control.

Instituto Superior Tecnico (CFN/IST) [1], and it willallow the implementation of decision making and non-linear control algorithms.

We describe the architecture of the digital sys-tem and the real-time data transfer operation amongthe acquisition, processing and control (APC) chan-nels through the specially designed data mover bus(DMBUS).

2. Architecture of TCV control system

The existing TCV control system is based on theA, G, and M analogue matrices (Fig. 1), which rely onanalogue I/O with digital coefficients provided by dig-ital to analogue converters (DACs). The proportional,integral and differential (PID) controllers have fixedgain and the references and feed forward signals areimplemented with waveform generators. This architec-ture has no programming capability and therefore thechanging of control algorithms and the implementationof non-linear control algorithms are very difficult tasksto perform.

The advanced plasma control system (APCS) [2]architecture (Fig. 2) for the TCV consists of a mix ofdigital and analogue matrices. In this new system sev-

eral changes are being made. One of these changes isthe substitution of PID controllers and the matrix Gby a digital system based on two configurable arraysof interconnected, programmable digital signal proces-sors (DSPs). These DSPs can run real-time feedbackand feed forward control algorithms very fast. One ofthe DSP arrays (32 DSPs) performs the slow controlcycle (control of ECH power, shape and current, gasinjection and ECH launching), and the other array (fourDSPs) performs the fast control cycle (control of theplasma vertical position).

3. Architecture of the APCS digital controlsystem

The replacement system for the PID controllers andthe matrix G consists of nine VMEbus intelligent mod-ules (Fig. 3) [1] each one with four APC channels. EachAPC channel is made up of an analogue input, a float-ing point DSP [3,4] and an analogue output. The DSPsin the module share several resources through the mod-ule asynchronous global bus to store data, like FLASHmemory, DRAM and SRAM.

All DSPs in one board are interconnected via inde-pendent parallel buses (20MB/s). Each module has alsoan interface to the external event bus of the timingand event management system previously developedby CFN/IST [5].

In the TCV digital plasma control system (Fig. 4),3ntwIElrvcethbtVic

Fig. 2. Architecture of the APCS for TCV.

2 DSPs of eight different modules process the sig-als that were acquired and digitised by the respec-ive analogue inputs (12 bits), externally synchronisedith several digital signal processing algorithms, like

IR, FIR, IIR + non-linear, tracking, and custom made.very 25 �s (slow control cycle) the respective ana-

ogue output (14 bits) is updated with the processingesult from each DSP. This result and the respectivealue of the analogue input as well as some more cal-ulated data (32 bits) (the number of data to send byach DSP is configurable) are broadcast to all DSPs ofhe eight modules in one VME crate. This procedureas been implemented replacing the external event busy the DMBUS. The passive bus board is connected tohe rear of the P2 connector of the VMEbus using theMEbus custom pins. Although module control and

nterface of the new DMBUS are based on the sameircuit as the external event bus, the control signals

Page 3: Real-time data transfer in the TCV advanced plasma control system

A.P. Rodrigues et al. / Fusion Engineering and Design 81 (2006) 1939–1943 1941

Fig. 3. Block diagram of the intelligent module architecture.

have been redefined and reprogrammed in the interfacebus control CPLD. The four DSPs of a ninth modulein the same crate process, with PID algorithms, theacquired and digitised signals from the analogue inputs,update their analogue outputs and broadcast the resultsamong them every 5 �s (fast control cycle) through theintercommunication buses among DSPs in the module(Fig. 3).

An extra digital input/output board (XIO) has beenproduced in order to permit some digital signals of theDMBUS to be input and output via the front panel ofthe crate. These signals are used to provide externaland internal synchronisation of the DSPs as well as tomonitor some plasma control process status.

Finally an MDSplus [6] TDI sharable library wasdeveloped for Linux, running on a commercial VMEhost CPU. The library configures the intelligent mod-ules and the digital signal processing algorithms withthe settings for the current tokamak shot. It also man-ages and performs data collecting and storage in anMDSplus tree for post-shot analysis.

4. Architecture of the data mover bus

The architecture of the DMBUS (Fig. 4) is basedon an 18 bit parallel synchronous data bus and a fewcontrol signals. The interface of each module to thebus has two first-in-first-out (FIFO) memories, onefor receiving and one for transmitting data. The busaccess control signals are generated in a complex pro-grammable logic device (CPLD). In this CPLD are alsoimplemented 8 digital inputs and 8 digital open collec-tor outputs for general purpose.

Each module must be configured to belong to theDMBUS transfer chain and the left-most module in theVME crate that belongs to that chain is the DMBUSmaster, which has the function to initiate the data trans-fer. Every module receives all data that are sent to theDMBUS in the receiver FIFO, including data that aresent by itself. In each module there is only one DSPthat has the function of putting and getting data fromthe transmitter and receiver FIFOs. This DSP collectsfrom the other DSPs of the same module (through the

Page 4: Real-time data transfer in the TCV advanced plasma control system

1942 A.P. Rodrigues et al. / Fusion Engineering and Design 81 (2006) 1939–1943

Fig. 4. Architecture of the digital control system.

intercommunication buses) all data to be sent to thetransmitter FIFO, sorted in a predefined way (knownby every DSPs). In the DMBUS master module thisDSP starts the transfer process writing in a CPLD reg-ister. At this time, all data in the transmitter FIFO of themaster module are loaded automatically, in a clockedway, into the DMBUS data lines and to the receiverFIFO of all modules in the DMBUS chain. The fre-quency of the clock signal is 16 MHz.

The last word sent to the DMBUS in each mod-ule is marked up with ones on bits 16 and 17 (thesetwo bits are used for data transfer control). When thisword is loaded onto the bus data lines, a pulse on adaisy chain signal is generated passing the control ofthe bus to the next module in the DMBUS chain (theone to its right in the crate). Now, the next modulestarts to load the bus data lines with its own data.The process is repeated until the last word of the

last module is loaded into the receiver FIFO of everymodule.

In the meantime, the arriving data are being trans-ferred from the receiver FIFO to the SRAM in theglobal bus of each module by a direct memory access(DMA) channel. Thus, a look-up table with all datavalues of the slow control cycle is made available to allDSPs in each cycle.

In the slow control cycle the time it takes to finish a128 word data transfer in the DMBUS is 8 �s. This isthe case when 32 DSPs are configured in the DMBUSchain and when each DSP sends to the bus the cor-respondent analogue input (1 word, 16 bits), analogueoutput (1 word, 16 bits) and calculated data (2 words, 32bits). The overall time required from the beginning ofthe control cycle until the last data transferred becomesavailable to the last DSP in the array of DSPs is about10 �s.

Page 5: Real-time data transfer in the TCV advanced plasma control system

A.P. Rodrigues et al. / Fusion Engineering and Design 81 (2006) 1939–1943 1943

5. Conclusion

A very large computation power is achieved witha flexible and expansible DSP matrix for real-timeplasma control that permits an easier change of con-trol algorithms and parameters; it is configurable andremotely controlled.

The DMBUS has proved to be a good solution forthe data transfer broadcasting to all processors elementsof the digital system in the slow control cycle of theTCV APCS. The system can be expanded up to 12modules, meaning that an array of 48 interconnectedDSPs, 48 analogue inputs and 48 control signals canbe configured on the DMBUS.

This system can be used in fast control applicationswhere a considerable number of related control signalsare required with fast control cycle (around 20 �s).

Acknowledgements

This work has been carried out in the frame of theContract of Association between the European AtomicEnergy Community and Instituto Superior Tecnico(IST) and of the Contract of Associated Laboratory

between Fundacao para a Ciencia e Tecnologia (FCT)and IST. Financial support was also received fromthe Association EURATOM/Swiss Confederation. Thecontent of the publication is the sole responsibility ofthe authors and it does not necessarily represent theviews of the Commission of the European Union orFCT or their services.

References

[1] A.P. Rodrigues, C.M.B. Correia, C.A.F. Varandas, A high per-formance real-time plasma control and event detection DSPbased VME system, Fusion Eng. Des. 60 (3) (2002) 435–441.

[2] B.P. Duval, J.-M. Moret, Digital control system for the TCVtokamak, in: Proceedings of 14th IEEE-NPSS Real-Time 2005Conference, Stockholm, Sweden, June 4–10, 2005.

[3] Parallel Processing with the TMS320C4X (Literature numberfrom Texas Instruments SPRU031).

[4] TMS320C4X General Purpose Applications User’s Guide (Lit-erature number from Texas Instruments SPRU159).

[5] J. Sousa, A. Combo, A. Batista, C. Correia, C.A.F. Varandas, D.Trotman, J. Waterhouse, A distributed system for fast timing andevent management on the MAST experiment, Fusion Eng. Des.43 (1999) 407.

[6] MDSplus, http://www.mdsplus.org.