{"title": "Real-Time Control of a Tokamak Plasma Using Neural Networks", "book": "Advances in Neural Information Processing Systems", "page_first": 1007, "page_last": 1014, "abstract": "", "full_text": "Real-Time Control of a Tokamak Plasma \n\nUsing Neural Networks \n\nChris M Bishop \n\nNeural Computing Research Group \nDepartment of Computer Science \n\nAston University \n\nBirmingham, B4 7ET, U.K. \n\nc.m .bishop@aston .ac.uk \n\nPaul S Haynes, Mike E U Smith, Tom N Todd, \n\nDavid L Trotman and Colin G Windsor \n\nAEA Technology, Culham Laboratory, \n\nOxfordshire OX14 3DB \n\n(Euratom/UKAEA Fusion Association) \n\nAbstract \n\nThis paper presents results from the first use of neural networks \nfor the real-time feedback control of high temperature plasmas in \na tokamak fusion experiment. The tokamak is currently the prin(cid:173)\ncipal experimental device for research into the magnetic confine(cid:173)\nment approach to controlled fusion. \nIn the tokamak, hydrogen \nplasmas, at temperatures of up to 100 Million K, are confined \nby strong magnetic fields. Accurate control of the position and \nshape of the plasma boundary requires real-time feedback control \nof the magnetic field structure on a time-scale of a few tens of mi(cid:173)\ncroseconds. Software simulations have demonstrated that a neural \nnetwork approach can give significantly better performance than \nthe linear technique currently used on most tokamak experiments. \nThe practical application of the neural network approach requires \nhigh-speed hardware, for which a fully parallel implementation of \nthe multilayer perceptron, using a hybrid of digital and analogue \ntechnology, has been developed. \n\n\f1008 \n\nC. Bishop, P. Haynes, M. Smith, T. Todd, D. Trotman, C. Windsor \n\n1 \n\nINTRODUCTION \n\nFusion of the nuclei of hydrogen provides the energy source which powers the sun. \nIt also offers the possibility of a practically limitless terrestrial source of energy. \nHowever, the harnessing of this power has proved to be a highly challenging prob(cid:173)\nlem. One of the most promising approaches is based on magnetic confinement of a \nhigh temperature (107 - 108 Kelvin) plasma in a device called a tokamak (from the \nRussian for 'toroidal magnetic chamber') as illustrated schematically in Figure 1. \nAt these temperatures the highly ionized plasma is an excellent electrical conduc(cid:173)\ntor, and can be confined and shaped by strong magnetic fields. Early tokamaks \nhad plasmas with circular cross-sections, for which feedback control of the plasma \nposition and shape is relatively straightforward. However, recent tokamaks, such as \nthe COMPASS experiment at Culham Laboratory, as well as most next-generation \ntokamaks, are designed to produce plasmas whose cross-sections are strongly non(cid:173)\ncircular. Figure 2 illustrates some of the plasma shapes which COMPASS is de(cid:173)\nsigned to explore. These novel cross-sections provide substantially improved energy \nconfinement properties and thereby significantly enhance the performance of the \ntokamak. \n\nz \n\nR \n\nFigure 1: Schematic cross-section of a tokamak experiment show(cid:173)\ning the toroidal vacuum vessel (outer D-shaped curve) and plasma \n(shown shaded). Also shown are the radial (R) and vertical (Z) co(cid:173)\nordinates. To a good approximation, the tokamak can be regarded \nas axisymmetric about the Z-axis, and so the plasma boundary can \nbe described by its cross-sectional shape at one particular toroidal \nlocation. \n\nUnlike circular cross-section plasmas, highly non-circular shapes are more difficult to \nproduce and to control accurately, since currents through several control coils must \nbe adjusted simultaneously. Furthermore, during a typical plasma pulse, the shape \nmust evolve, usually from some initial near-circular shape. Due to uncertainties \nin the current and pressure distributions within the plasma, the desired accuracy \nfor plasma control can only be achieved by making real-time measurements of the \nposition and shape of the boundary, and using error feedback to adjust the currents \nin the control coils. \n\nThe physics of the plasma equilibrium is determined by force balance between the \n\n\fReal-Time Control of Tokamak Plasma Using Neural Networks \n\n1009 \n\ncircle \n\nellipse \n\nO-shape \n\nbean \n\nFigure 2: Cross-sections of the COMPASS vacuum vessel showing \nsome examples of potential plasma shapes. The solid curve is the \nboundary of the vacuum vessel, and the plasma is shown by the \nshaded regions. \n\nthermal pressure of the plasma and the pressure of the magnetic field, and is rel(cid:173)\natively well understood. Particular plasma configurations are described in terms \nof solutions of a non-linear partial differential equation called the Grad-Shafranov \n(GS) equation. Due to the non-linear nature of this equation, a general analytic \nsolution is not possible. However, the GS equation can be solved by iterative nu(cid:173)\nmerical methods, with boundary conditions determined by currents flowing in the \nexternal control coils which surround the vacuum vessel. On the tokamak itself it \nis changes in these currents which are used to alter the position and cross-sectional \nshape of the plasma. Numerical solution of the GS equation represents the stan(cid:173)\ndard technique for post-shot analysis of the plasma, and is also the method used \nto generate the training dataset for the neural network, as described in the next \nsection. However , this approach is computationally very intensive and is therefore \nunsuitable for feedback control purposes. \n\nFor real-time control it is necessary to have a fast (typically:::; 50J.lsec.) determi(cid:173)\nnation of the plasma boundary shape. This information can be extracted from a \nvariety of diagnostic systems, the most important being local magnetic measure(cid:173)\nments taken at a number of points around the perimeter of the vacuum vessel. \nMost tokamaks have several tens or hundreds of small pick up coils located at care(cid:173)\nfully optimized points around the torus for this purpose. We shall represent these \nmagnetic signals collectively as a vector m . \n\nFor a large class of equilibria, the plasma boundary can be reasonably well repre(cid:173)\nsented in terms of a simple parameterization, governed by an angle-like variable B, \ngiven by \n\nR(B) \nZ(B) \n\nRo + a cos(B + 8 sinB) \nZo + a/\\,sinB \n\n(1) \n\nwhere we have defined the following parameters \n\n\f1010 \n\nC. Bishop, P. Haynes, M. Smith, T. Todd, D. Trotman, C. Windsor \n\nRo \nZo \na \nK \n6 \n\nradial distance of the plasma center from the major axis of the torus, \nvertical distance of the plasma center from the torus midplane, \nminor radius measured in the plane Z = Zo, \nelongation, \ntriangularity. \n\nWe denote these parameters collectively by Yk. The basic problem which has to be \naddressed, therefore, is to find a representation for the (non-linear) mapping from \nthe magnetic signals m to the values of the geometrical parameters Yk, which can \nbe implemented in suitable hardware for real-time control. \n\nThe conventional approach presently in use on many tokamaks involves approxi(cid:173)\nmating the mapping between the measured magnetic signals and the geometrical \nparameters by a single linear transformation. However, the intrinsic non-linearity \nof the mappings suggests that a representation in terms of feedforward neural net(cid:173)\nworks should give significantly improved results (Lister and Schnurrenberger, 1991; \nBishop et a/., 1992; Lagin et at., 1993). Figure 3 shows a block diagram of the \ncontrol loop for the neural network approach to tokamak equilibrium control. \n\nNeural \nNetwork \n\nFigure 3: Block diagram of the control loop used for real-time \nfeedback control of plasma position and shape. \n\n2 SOFTWARE SIMULATION RESULTS \n\nThe dataset for training and testing the network was generated by numerical so(cid:173)\nlution of the GS equation using a free-boundary equilibrium code. The data base \ncurrently consists of over 2,000 equilibria spanning the wide range of plasma po(cid:173)\nsitions and shapes available in COMPASS. Each equilibrium configuration takes \nseveral minutes to generate on a fast workstation. The boundary of each configu(cid:173)\nration is then fitted using the form in equation 1, so that the equilibria are labelled \nwith the appropriate values of the shape parameters. Of the 120 magnetic signals \navailable on COMPASS which could be used to provide inputs to the network, a \n\n\fReal-Time Control o/Tokamak PLasma Using Neural Networks \n\n1011 \n\nsubset of 16 has been chosen using sequential forward selection based on a linear \nrepresentation for the mapping (discussed below) . \nIt is important to note that the transformation from magnetic signals to flux surface \nparameters involves an exact linear invariance. This follows from the fact that, if all \nof the currents are scaled by a constant factor, then the magnetic fields will be scaled \nby this factor, and the geometry of the plasma boundary will be unchanged. It is \nimportant to take advantage of this prior knowledge and to build it into the network \nstructure, rather than force the network to learn it by example. We therefore \nnormalize the vector m of input signals to the network by dividing by a quantity \nproportional to the total plasma current. Note that this normalization has to be \nincorporated into the hardware implementation of the network, as will be discussed \nin Section 3. \n\n4 \n\n01 2 \nc .5. \nCIS \n:E \n1iI \n~ -2 \n::J \n\n0- \u00b0 \n\n-4 \n\n2 \n\n01 c .5. \n:E \u00b0 \n~ \n1iI \nCD c \n::J \n\n-2 \n\n1.2 \n\ngo.8 \n.5. \n0-\nCIS \n:E \n1iI0.4 \nCD c \n::J \n\n\u00b0 \n\nDatabase \n\nDatabase \n\nDatabase \n\n4 \n\n2 \n\n-2 \n\n-4 \n\n~ \n\n~ \u00b0 \n\nCD \nZ \n~ \n:::I \nCD z \n\n1.2 \n\n~O.8 \n~ \nCD z \n~O.4 \n:::I \nCD \nZ \n\n\u00b0 \n\n.2 \n\n.2 \n\nDatabase \n\nDatabase \n\nDatabase \n\nFigure 4: Plots of the values from the test set versus the values \npredicted by the linear mapping for the 3 equilibrium parameters, \ntogether with the corresponding plots for a neural network with 4 \nhidden units. \n\nThe results presented in this paper are based on a multilayer perceptron architecture \nhaving a single layer of hidden units with 'tanh' activation functions , and linear \noutput units. Networks are trained by minimization of a sum-of-squares error using \na standard conjugate gradients optimization algorithm, and the number of hidden \n\n\fJ012 \n\nC. Bishop, P. Haynes, M. Smith, T. Todd, D. Trotman, C. Windsor \n\nunits is optimized by measuring performance with respect to an independent test \nset. Results from the neural network mapping are compared with those from the \noptimal linear mapping, that is the single linear transformation which minimizes \nthe same sum-of-squares error as is used in the neural network training algorithm, \nas this represents the method currently used on a number of present day tokamaks. \n\nInitial results were obtained on networks having 3 output units, corresponding to \nthe values of vertical position ZQ, major radius RQ, and elongation K; these being \nparameters which are of interest for real-time feedback control. The smallest nor(cid:173)\nmalized test set error of 11.7 is obtained from the network having 16 hidden units. \nBy comparison, the optimal linear mapping gave a normalized test set error of 18.3. \nThis represents a reduction in error of about 30% in going from the linear mapping \nto the neural network. Such an improvement, in the context of this application, is \nvery significant. \n\nFor the experiments on real-time feedback control described in Section 4 the cur(cid:173)\nrently available hardware only permitted networks having 4 hidden units, and so we \nconsider the results from this network in more detail. Figure 4 shows plots of the \nnetwork predictions for various parameters versus the corresponding values from \nthe test set portion of the database. Analogous plots for the optimal linear map \npredictions versus the database values are also shown. Comparison of the corre(cid:173)\nsponding figures shows the improved predictive capability of the neural network, \neven for this sub-optimal network topology. \n\n3 HARDWARE IMPLEMENTATION \n\nThe hardware implementation of the neural network must have a bandwidth of 2: \n20 kHz in order to cope with the fast timescales of the plasma evolution. It must \nalso have an output precision of at least (the the analogue equivalent of) 8 bits in \norder to ensure that the final accuracy which is attainable will not be limited by the \nhardware system. We have chosen to develop a fully parallel custom implementation \nof the multilayer perceptron, based on analogue signal paths with digitally stored \nsynaptic weights (Bishop et al., 1993). A VME-based modular construction has \nbeen chosen as this allows flexibility in changing the network architecture, ease of \nloading network weights, and simplicity of data acquisition. Three separate types \nof card have been developed as follows: \n\n\u2022 Combined 16-input buffer and signal normalizer. \n\nThis provides an analogue hardware implementation of the input normal(cid:173)\nization described earlier. \n\u2022 16 x 4 matrix multiplier \n\nThe synaptic weights are produced using 12 bit frequency-compensated \nmultiplying DACs (digital to analogue converters) which can be configured \nto allow 4-quadrant multiplication of analogue signals by a digitally stored \nnumber. \n\n\u2022 4-channel sigmoid module \n\nThere are many ways to produce a sigmoidal non-linearity, and we have \nopted for a solution using two transistors configured as along-tailed-pair, \n\n\fReal-Time Control of Tokamak Plasma Using Neural Networks \n\n1013 \n\nto generate a 'tanh ' sigmoidal transfer characteristic. The principal draw(cid:173)\nback of such an approach is the strong temperature sensitivity due to the \nappearance of temperature in the denominator of the exponential transistor \ntransfer characteristic. An elegant solution to this problem has been found \nby exploiting a chip containing 5 transistors in close thermal contact. Two \nof the transistors form the long-tailed pair, one of the transistors is used \nas a heat source, and the remaining two transistors are used to measure \ntemperature. External circuitry provides active thermal feedback control, \nand stability to changes in ambient temperature over the range O\u00b0C to 50\u00b0C \nis found to be well within the acceptable range. \n\nThe complete network is constructed by mounting the appropriate combination \nof cards in a VME rack and configuring the network topology using front panel \ninterconnections. The system includes extensive diagnostics, allowing voltages at \nall key points within the network to be monitored as a function of time via a series \nof multiplexed output channels. \n\n4 RESULTS FROM REAL-TIME FEEDBACK CONTROL \n\nFigure 5 shows the first results obtained from real-time control of the plasma in \nthe COMPASS tokamak using neural networks. The evolution of the plasma elon(cid:173)\ngation, under the control of the neural network, is plotted as a function of time \nduring a plasma pulse. Here the desired elongation has been preprogrammed to \nfollow a series of steps as a function of time. The remaining 2 network outputs \n(radial position Ro and vertical position Zo) were digitized for post-shot diagnosis , \nbut were not used for real-time control. The solid curve shows the value of elonga(cid:173)\ntion given by the corresponding network output, and the dashed curve shows the \npost-shot reconstruction of the elongation obtained from a simple 'filament' code, \nwhich gives relatively rapid post-shot plasma shape reconstruction but with limited \naccuracy. The circles denote the elongation values given by the much more accurate \nreconstructions obtained from the full equilibrium code. The graph clearly shows \nthe network generating the required elongation signal in close agreement with the \nreconstructed values. The typical residual error is of order 0.07 on elongation values \nup to around 1.5. Part of this error is attributable to residual offset in the integra(cid:173)\ntors used to extract magnetic field information from the pick-up coils, and this is \ncurrently being corrected through modifications to the integrator design. An addi(cid:173)\ntional contribution to the error arises from the restricted number of hidden units \navailable with the initial hardware configuration. While these results represent the \nfirst obtained using closed loop control, it is clear from earlier software modelling of \nlarger network architectures (such as 32- 16-4) that residual errors of order a few % \nshould be attainable. The implementation of such larger networks is being persued, \nfollowing the successes with the smaller system. \n\nAcknowledgements \n\nWe would like to thank Peter Cox, Jo Lister and Colin Roach for many useful \ndiscussions and technical contributions. This work was partially supported by the \nUK Department of Trade and Industry. \n\n\f1014 \n\nC. Bishop, P. Haynes, M. Smith, T. Todd, D. Trotman, C. Windsor \n\n1.8 \n\nshot 9576 \n\nC) \n\nc: o \n~ 14 \nc: o as \n\n\u2022 \n\n1.0 \n\n0.0 \n\n0.1 \n\n0.2 \n\ntime (sec.) \n\nFigure 5: Plot of the plasma elongation K. as a function of time \nduring shot no. 9576 on the COMPASS tokamak, during which the \nelongation was being controlled in real-time by the neural network. \n\nReferences \n\nBishop C M, Cox P, Haynes P S, Roach C M, Smith M E U, Todd T N and Trotman \nD L, 1992. A neural network approach to tokamak equilibrium control. In Neural \nNetwork Applications, Ed. J G Taylor, Springer Verlag, 114-128. \n\nBishop C M, Haynes P S, Roach C M, Smith ME U, Todd T N, and Trotman D L. \n1993. Hardware implementation of a neural network for plasma position control in \nCOMPASS-D. In Proceedings of the 17th. Symposium on Fusion Technology, Rome, \nItaly. 2 997-1001. \n\nLagin L, Bell R, Davis S, Eck T, Jardin S, Kessel C, Mcenerney J, Okabayashi \nM, Popyack J and Sauthoff N. 1993. Application of neural networks for real-time \ncalculations of plasma equilibrium parameters for PBX-M, In Proceedings of the \n17th. Symposium on Fusion Technology, Rome, Italy. 21057-106l. \n\nLister J Band Schnurrenberger H. 1991. Fast non-linear extraction of plasma \nparameters using a neural network mapping. Nuclear Fusion. 31, 1291-1300. \n\n\f", "award": [], "sourceid": 1005, "authors": [{"given_name": "Chris", "family_name": "Bishop", "institution": null}, {"given_name": "Paul", "family_name": "Haynes", "institution": null}, {"given_name": "Mike", "family_name": "Smith", "institution": null}, {"given_name": "Tom", "family_name": "Todd", "institution": null}, {"given_name": "David", "family_name": "Trotman", "institution": null}, {"given_name": "Colin", "family_name": "Windsor", "institution": null}]}