Alternative Detection of n = 1 Modes Slowing Down on ASDEX Upgrade

Featured Application: This article describes a physical based criterion to track the slowing down of n = 1 instabilities on the ASDEX upgrade (AUG) Tokamak. It can provide automatically the time instance of the locking of the instability in the frame of reference of the laboratory. Immediate applications are possible both in real time and o ﬀ -line, for mitigation and avoidance purposes respectively. Abstract: Disruptions in tokamaks are very often associated with the slowing down of magneto-hydrodynamic (MHD) instabilities and their subsequent locking to the wall. To improve the understanding of the chain of events ending with a disruption, a statistically robust and physically based criterion has been devised to track the slowing down of modes with toroidal mode numbers n = 1 and mostly poloidal mode number m = 2, providing an alternative and earlier detection tool compared to simple threshold based indicators. A database of 370 discharges of axially symmetric divertor experiment—upgrade (AUG) has been studied and results compared with other indicators used in real time. The estimator is based on a weighted average value of the fast Fourier transform of the perturbed radial n = 1 magnetic ﬁeld, caused by the rotation of the modes. The use of a carrier sinusoidal wave helps alleviating the spurious inﬂuence of non-sinusoidal magnetic perturbations induced by other instabilities like Edge localized modes (ELMs). The indicator constitutes a good candidate for further studies including machine learning approaches for mitigation and avoidance since, by deploying it systematically to evaluate the time instance for the expected locking, multi-machine databases can be populated. Furthermore, it can be thought as a contribution to a wider approach to dynamically tracking the chain of events leading to disruptions.


Introduction
The most promising and studied reactor configuration aimed at producing electricity from nuclear fusion is the Tokamak, in which specific mixtures of gases (hydrogen and its isotopes) are confined in a toroidal shaped chamber by a magnetic field having two main components: a toroidal and a poloidal one [1]. The magnetic topology associated to this configuration has been studied for decades [1][2][3].
The magnetically confined plasma is a challenging system, both under a physical and an engineering point of view, since it requires achieving high performances and stability at the same time. The latter, being the primary matter of concern for industrial applications, is often compromised by the so called plasma instabilities, whose occurrence can affect the performances and even cause the premature termination of the pulses; consequently, the study of their zoology in a plasma for fusion applications represents a wide branch of the existing literature [1][2][3][4].
Such instabilities change locally the magnetic topology and their dynamics can lead to dangerous events, having the potential to threat the safety and the operational continuity of a reactor: the so called disruptions. Endemic ones in Tokamaks, whose uncontrolled evolution has proven experimentally to cause the occurrence of the aforementioned catastrophic events, are the so called tearing modes [5][6][7].
Historically, the real time mitigation of disruptions has always been based on thresholds set on specific signals, whose "anomalous" behaviour has been considered as a marker of their imminent occurrence. Quite recently, another approach has been followed using machine learning techniques that have demonstrated to reach excellent performances [8,9], like APODIS on data of the Joint European Torus (JET), that has also been the first support vector machine based indicator to be implemented in real time. The latest generation of predictors have also demonstrated to be able of learning from a very few numbers of training data and to adapt their models when required [10,11], a key feature for their application on the next generation of devices like the International Thermonuclear Experimental Reactor (ITER).
However, the safe termination of a pulse, by the application of triggered mitigation responses, cannot be the definitive answer for the future: the next generation of devices can tolerate only a small number of even fully mitigated disruptions. Therefore, scientists moved from studying mitigation schemes to avoidance.
Avoiding a disruption is a challenging and still open issue due to the complexity, high nonlinearity and the huge number of mutual interactions between different phenomena in the plasma. While many paths can lead to a disruption, it has been observed experimentally that a few quantities are really informative shortly before it is going to occur. Among these, the locking of macroscopic magnetic modes, mentioned above, occurs in a wide percentage of disruptive pulses [4,5].
This article describes a new estimator based on the measurements of the perturbed radial magnetic field of the axially symmetric divertor experiment-upgrade (AUG from now on) to detect the slowing down of the aforementioned family of instabilities. This in order to assess an analytically simple and easy to implement tool to start tracking back the chain of events leading to the slowing down of a mode and consequently to a disruption. At the present stage, the suggested estimator is directly suitable for implementation in the control room (CR), while for offline purposes it can detect automatically the time instance at which the mode can be considered locked in the reference frame of the laboratory.
Section 2 defines in more details the problem, while Section 3 describes the new statistical estimator based on physical assumptions and aimed at the detection of the dynamic of the instabilities. Section 4 then provides the results obtained on a database built with 370 pulses of AUG, before landing to the conclusions in Section 5, where the future applications are also discussed.

Definition of the Problem
In the Introduction, it has been stated that the presence of magnetic islands in Tokamaks is quite endemic; in this section a few more details are provided, but a complete treatment is out of the scope of the article. The most common approach to describe the plasma in a magnetically confined configuration is of a charged fluid description called magneto-hydrodynamic (MHD). If the conductivity of the plasma is considered infinite, the approach is ideal, otherwise resistive. Generally, the ideal modes, or instabilities, grow faster than resistive ones and are more difficult energetically to excite [3].
The so called tearing modes then, i.e., magnetic island from now on, appear in both descriptions and are related to the local modification of the magnetic topology. The overall stability is driven by the radial gradient of the equilibrium toroidal current density and the so called resonant surfaces represent poles of the perturbed force equilibrium equation [1,3]. These resonant surfaces are located at the rational values of the safety factor q ∝ B φ B θ and consequently are usually indicated by q ∝ m n , where the integer "m" and "n" stand respectively for the number of toroidal and poloidal revolutions around the torus that a field line travels before reconnecting to itself [3].
On resonant surfaces it can be demonstrated that even small perturbations of the magnetic field dominate [2,3]. It is the case of the radial component of the magnetic field, defining both the width of the magnetic islands and their growth rate [2,3]. Such perturbations can be due to topological fluctuations of the plasma, but also to external field errors of few Gauss [1,4].
Theoretically, the proximity to the conducting wall stabilizes the mode but, at the same time, induces currents that tend to brake the mode itself [3]. It has been shown both experimentally and theoretically that the slower the rotation of a mode in the reference frame of the laboratory is, the faster its growth and the more dangerous it is.
Indeed, the mode rotates with the plasma and both its width and its growth rate τ gr depends of the angular frequency of the rotation (ω). If ωτ gr 1 the island does not grow fast enough to reach a dangerous level [3] and does not lock. This can be achieved by external sources of momentum, like the injections of neutral particles beams, to facilitate the rotation of the mode, or by increasing locally the electron density.
Typically, m/n = [1/1; 2/1] modes are observed both at AUG and JET and the m/n = 3/1 modes are also coupled with the aforementioned islands [6,7]. However, their coupled dynamics is still not completely understood and consequently, a good knowledge of the radial magnetic field is an important element to prevent disruptions to occur.
Six saddle coils are currently installed on AUG, as shown in Figure 1, on the high field side to measure the radial perturbation induced by rotating modes: two large saddle coils, each covering half of the torus (SAT west and SAT east ) toroidally and four more coils, since 2011 [7], each spanning π/2 of the torus (SATn, SATw, SATs and SATe) toroidally. Once integrated and filtered, the measurements of the two coils systems are used as an indicator to monitor the presence of a locked mode in real time. An anomalous behaviour of such time trace triggers disruption mitigation actions. The four coils are used instead to either induce or measure radial perturbations to the magnetic field for experimental purposes [7,12]. In the latter case, both the amplitude and the phase of the mode can be obtained. The so called tearing modes then, i.e., magnetic island from now on, appear in both descriptions and are related to the local modification of the magnetic topology. The overall stability is driven by the radial gradient of the equilibrium toroidal current density and the so called resonant surfaces represent poles of the perturbed force equilibrium equation [1,3]. These resonant surfaces are located at the rational values of the safety factor ∝ and consequently are usually indicated by ∝ , where the integer "m" and "n" stand respectively for the number of toroidal and poloidal revolutions around the torus that a field line travels before reconnecting to itself [3]. On resonant surfaces it can be demonstrated that even small perturbations of the magnetic field dominate [2,3]. It is the case of the radial component of the magnetic field, defining both the width of the magnetic islands and their growth rate [2,3]. Such perturbations can be due to topological fluctuations of the plasma, but also to external field errors of few Gauss [1,4].
Theoretically, the proximity to the conducting wall stabilizes the mode but, at the same time, induces currents that tend to brake the mode itself [3]. It has been shown both experimentally and theoretically that the slower the rotation of a mode in the reference frame of the laboratory is, the faster its growth and the more dangerous it is.
Indeed, the mode rotates with the plasma and both its width and its growth rate depends of the angular frequency of the rotation ( ). If ≫ 1 the island does not grow fast enough to reach a dangerous level [3] and does not lock. This can be achieved by external sources of momentum, like the injections of neutral particles beams, to facilitate the rotation of the mode, or by increasing locally the electron density. Typically, m/n = [1/1; 2/1] modes are observed both at AUG and JET and the m/n = 3/1 modes are also coupled with the aforementioned islands [6,7]. However, their coupled dynamics is still not completely understood and consequently, a good knowledge of the radial magnetic field is an important element to prevent disruptions to occur.
Six saddle coils are currently installed on AUG, as shown in Figure 1, on the high field side to measure the radial perturbation induced by rotating modes: two large saddle coils, each covering half of the torus (SATwest and SATeast) toroidally and four more coils, since 2011 [7], each spanning π/2 of the torus (SATn, SATw, SATs and SATe) toroidally. Once integrated and filtered, the measurements of the two coils systems are used as an indicator to monitor the presence of a locked mode in real time. An anomalous behaviour of such time trace triggers disruption mitigation actions. The four coils are used instead to either induce or measure radial perturbations to the magnetic field for experimental purposes [7,12]. In the latter case, both the amplitude and the phase of the mode can be obtained. The time integrated and calibrated measurements represent the signals of the radial component of the magnetic field collected into the toroidal portion spanned by the saddle coils. A priori, the equilibrium field is detected along with the perturbed one, so evaluating the difference, between two  [7]. A system composed by two saddle coils (SATwest and SATeast) has been upgraded in 2011 [7] adding four coils (Satn, Satw, Sate, Satw). (b) Poloidal cross sections with the coils location.
The time integrated and calibrated measurements represent the signals of the radial component of the magnetic field collected into the toroidal portion spanned by the saddle coils. A priori, the equilibrium field is detected along with the perturbed one, so evaluating the difference, between two π faced coils, allows taking into account the perturbations induced by odd numbers, the case of Appl. Sci. 2020, 10, 7891 4 of 14 interest for AUG, especially for the n = 1 modes. Further details can be found in the literature [4,7]. In the rest of the paper the subscripts n,s,e,w refer to the measurements from the above specified coils.
Following [3,4], the perturbed radial component of the magnetic can be written as: where χ = θ − n m φ is the helical angle and φ 0 the phase of the mode. In (1), the amplitude of the magnetic field is the main term defining the island width and the growth [3]. Using the system of coils described above, (2), (3) give [4]: where B ns r and B ew r stand for the integrated signal of the difference between the two measured time derivative signals of two π faced and coupled coils. The system at AUG is then able to detect the amplitude and the toroidal position of the mode [7].
The angular velocity (ω 0 ) and the frequency of the mode can be obtained by the derivative of the phase in (3), i.e ω 0 = dφ 0 dt . However, when the amplitudes of the radial perturbations (B ns r , B ew r ) due to the mode are small and the measurements are dominated by other effects, like those induced by instrumental behaviours, e.g., noise or drift, or by other physical phenomena even causing rapid fluctuations of the signals, then ω 0 (t) is strongly affected and the aforementioned derivation of ω 0 for the systematic tracking of the slowing down of the mode cannot practically be used.
A first alternative would consist of detecting directly the frequency of the mode from the fluctuations of the measured radial component. However, this approach would require cautiousness since it implies the knowledge of the proper rotational transform [3] of a specific observed mode as well as a manual intervention to identify the actual fluctuations. Consequently, it is not compatible with real time applications.
A possible way to address the problem is shown in the next section.

New Approach for the Slowing Down Detection and Comparison with On-Line Estimator at AUG
For real time applications the new methodology herein suggested to track the slowing down of a mode is based on the fast Fourier transform (FFT) of the signals and is described in Section 3.1. Section 3.2 illustrates how the estimator can be applied to detect the presence of a mode rotating so slow to be considered as locked. Before describing the approach however, it has to be recalled what stated in the previous section. At AUG, the two coil system, composed by the SAT west and SAT east saddle coils, is used to evaluate a mode lock indicator for real time application (MAX:DISRTRIG). Two different thresholds are set in order to trigger different actions in real time and consequently to prevent a disruption to occur. The lower threshold (0.25 V) is used in the feedback network in control room (CR) to start a controlled ramp down for a safe landing of the pulse; the higher one (0.35 V) instead, in case the previous actions have not given the desired results, is used to open the mitigation valves. From now on, the previously mentioned thresholds of the indicator used in CR will be labelled as DISRTRIG25 or DISRTRIG35, respectively.

Alternative Approach for Real Time Tracking of the n = 1 Modes and Authomatical Offline Detection of It's Locking
Without any rotating mode, the measured radial perturbation are expected to be around zero and the FFT spectra of B ns r and B ew r show basically the effect of the intrinsic noise on the measurements. When a mode rotates, then slows down before eventually locking, it dominates the spectra. The slower and the wider the mode, the higher the amplitude of the spectrum at low frequencies. Consequently, the first step is the evaluation of the weighted average frequency of rotation of the mode for each measured radial perturbations: Spectra are evaluated considering the signals in a sliding time window of 50 ms previous to the time instance considered. In (4), (5) f i is the i-th frequency of the spectrum and I ns,ew (t, f i ) stands for the intensity at the frequency f i at the time instance t.
It is then possible to evaluate an average frequency of rotation from (4) and (5) as: An example of the different behaviours of the spectra at two different time instances is reported in Figure 2: one at which there is no mode or at which it rotates at a frequency higher than half of the inverse of the sampling rate of the coils (5 kHz) in Figure 2a, and another one 50 ms before the time instance of the disruption in Figure 2b. It should be stated that the higher limit for the detection of the rotating modes is 5kHz instead of 10 kHz because of the Nyquist theorem. The sampling frequency of the measurements at 10 kHz is also due to the actual damping induced by the wall, shielding the coils and behaving "de facto" as a low-pass filter. In Figure 2a, the spectra are almost flat and the average frequency is around 2.5 kHz, while in Figure 2b  spectra. The slower and the wider the mode, the higher the amplitude of the spectrum at low frequencies. Consequently, the first step is the evaluation of the weighted average frequency of rotation of the mode for each measured radial perturbations: Spectra are evaluated considering the signals in a sliding time window of 50ms previous to the time instance considered. In (4), (5) is the i-th frequency of the spectrum and , ( , ) stands for the intensity at the frequency at the time instance t. It is then possible to evaluate an average frequency of rotation from (4) and (5) as: An example of the different behaviours of the spectra at two different time instances is reported in Figure 2: one at which there is no mode or at which it rotates at a frequency higher than half of the inverse of the sampling rate of the coils (5kHz) in Figure 2a, and another one 50 ms before the time instance of the disruption in Figure 2b. It should be stated that the higher limit for the detection of the rotating modes is 5kHz instead of 10kHz because of the Nyquist theorem. The sampling frequency of the measurements at 10 kHz is also due to the actual damping induced by the wall, shielding the coils and behaving "de facto" as a low-pass filter. In Figure 2a, the spectra are almost flat and the average frequency is around 2.5 kHz, while in Figure 2b  Considering what stated in the previous section, (6) cannot filter any influence of instabilities like the edge localized mode (ELMs). The dynamics of ELMs is linked to a relaxation process of the plasma and their influence on magnetic perturbations has been experimentally observed [3]. Figure  3b shows an example of a ELMy phase on the signals derived from the coils. As consequence of the currents flowing through Scrape off Layer field lines and the conducting divertor itself, ELMs can be clearly observed as strong spikes [12] in the measured inner divertor shunt current, as shown in Figure 3a. Figure 4 shows instead the spectra during the ELMy phase shown in Figure 3. Considering what stated in the previous section, (6) cannot filter any influence of instabilities like the edge localized mode (ELMs). The dynamics of ELMs is linked to a relaxation process of the plasma and their influence on magnetic perturbations has been experimentally observed [3]. Figure 3b shows an example of a ELMy phase on the signals derived from the coils. As consequence of the currents flowing through Scrape off Layer field lines and the conducting divertor itself, ELMs can be clearly observed as strong spikes [12] in the measured inner divertor shunt current, as shown in Figure 3a. Figure 4 shows instead the spectra during the ELMy phase shown in Figure 3.  (a) (b) (c) Figure 4. Illustrative spectra obtained from Bew and Bns for the pulse 30492 that has also been shown in Figure 3. (a,b): ELMy spectra without a rotating mode -evaluated averaging the spectra obtained from 4.0s to 4.5s with a time window of 50ms-(c) spectra close to the disruption = 7.516 (with the same scale of (b)) -evaluated averaging the spectra obtained from 7.465s to 7.515 with a time window of 50ms.
In Figure 4a,b, even if ELMs show a broadband spectrum not peaked at the low frequencies observed by the slowing down of the mode, they cause oscillations in (6) and consequently the indicator follows the averaged frequency evaluated by the FFT. To avoid this bias, a driving sinusoidal functions has been added to the radial measurements Bew and Bns in a post-processing phase:  (a) (b) (c) Figure 4. Illustrative spectra obtained from Bew and Bns for the pulse 30492 that has also been shown in Figure 3. (a,b): ELMy spectra without a rotating mode -evaluated averaging the spectra obtained from 4.0s to 4.5s with a time window of 50ms-(c) spectra close to the disruption = 7.516 (with the same scale of (b)) -evaluated averaging the spectra obtained from 7.465s to 7.515 with a time window of 50ms.
In Figure 4a,b, even if ELMs show a broadband spectrum not peaked at the low frequencies observed by the slowing down of the mode, they cause oscillations in (6) and consequently the indicator follows the averaged frequency evaluated by the FFT. To avoid this bias, a driving sinusoidal functions has been added to the radial measurements Bew and Bns in a post-processing phase: . Illustrative spectra obtained from Bew and Bns for the pulse 30492 that has also been shown in Figure 3. (a,b): ELMy spectra without a rotating mode -evaluated averaging the spectra obtained from 4.0 s to 4.5 s with a time window of 50 ms-(c) spectra close to the disruption t disr = 7.516s (with the same scale of (b)) -evaluated averaging the spectra obtained from 7.465 s to 7.515s with a time window of 50 ms.
In Figure 4a,b, even if ELMs show a broadband spectrum not peaked at the low frequencies observed by the slowing down of the mode, they cause oscillations in (6) and consequently the indicator follows the averaged frequency evaluated by the FFT. To avoid this bias, a driving sinusoidal functions has been added to the radial measurements Bew and Bns in a post-processing phase: A sensitivity study, has been performed and it suggests to set an amplitude of A 0 = 1mT and a frequency of ν 0 = ω 0 2π = 2.5 kHz. Figure 5 reports an example of the behaviour of the average frequency (6) of rotation of the mode for the pulse 30735 varying the amplitude A 0 . A too small amplitude cannot damp the effects of unwanted perturbations on the magnetics, like A 0 = 0, while a too high one is almost insensitive to any perturbation, like A 0 = 10mT.
A sensitivity study, has been performed and it suggests to set an amplitude of A = 1 and a frequency of ν = =2.5 kHz. Figure 5 reports an example of the behaviour of the average frequency (6) of rotation of the mode for the pulse 30735 varying the amplitude A . A too small amplitude cannot damp the effects of unwanted perturbations on the magnetics, like A = 0, while a too high one is almost insensitive to any perturbation, like A = 10 . The main effect of the added sinusoidal function is to lock the average frequency of rotation of the mode (6) to a reference value, ν , when no mode can be observed or when it rotates at a frequency higher than 5 kHz, like in Figure 6, for the pulse 30492. When a mode appears, starts slowing down and growing, the influence in the (4,5) averages of the sinusoidal frequency ν becomes negligible and the indicator tracks the mode. A clearer drop in frequency with respect to the basic signal, can be observed indeed at 7s and in this case, it is enough for recognizing the slowing down with the estimator suggested.
All the results reported in the following sections have been obtained using the just mentioned corrections, i.e., starting from the advanced signals in (7).
It is worth saying that, for the purposes of this work, the phase has been set arbitrarily to be zero. Indeed, the FFT is independent from its choice and thus the average frequency (6) of rotation of the mode. For the same reason, it can be also set to be equal to . This would ease the evaluation of the radial field amplitude in (2).  The main effect of the added sinusoidal function is to lock the average frequency of rotation of the mode (6) to a reference value, ν 0 , when no mode can be observed or when it rotates at a frequency higher than 5 kHz, like in Figure 6, for the pulse 30492. When a mode appears, starts slowing down and growing, the influence in the (4,5) averages of the sinusoidal frequency ν 0 becomes negligible and the indicator tracks the mode. A clearer drop in frequency with respect to the basic signal, can All the results reported in the following sections have been obtained using the just mentioned corrections, i.e., starting from the advanced signals in (7).
It is worth saying that, for the purposes of this work, the phase ψ 0 has been set arbitrarily to be zero. Indeed, the FFT is independent from its choice and thus the average frequency (6) of rotation of the mode. For the same reason, it can be also set to be equal to π 2 . This would ease the evaluation of the radial field amplitude in (2).

Comparison Between the New Established Estimators and Criterion for Real Time Application
The first immediate and practical use of the estimator deals with the detection of a drop of the rotation of a mode so steep to lead to locking. To perform this task, the following criterion has been set: Equation (8) represents the actual implementation of the estimator (6) for the detection of the slowing down of the rotating modes with n = 1. Evaluating (6) at each time instance, if the value t i falls below a threshold that is equal to the average value of the frequencies measured in the time interval from t 0 to t i , minus Z times the standard deviation of the values in the same time interval described, then the mode is considered as locked. The criterion in (8) is robust enough to follow the dynamics of the mode, without suffering of sporadic fluctuations, but at the same time is also enough sensible to the occurrence of significant changes due to an actual increase or decrease of the rotation of the mode. This rule has been compared with the threshold based indicators used at AUG. An illustrative example of the tests performed has been reported in Figure 7.
Appl. Sci. 2020, 10, x FOR PEER REVIEW 9 of 14 disruption at 7.516 s. A n = 2 mode oscillates at a frequency higher than 5 kHz before 7.0 s; from that instant onward an evident activity can be observed also due to n = 1. (d) Evaluation of the averaged estimator (6) considering or not the driving sinusoidal function. It can be observed how the added term locks the signal to a stable reference. The black dashed line provides the time instance of the disruption.

Comparison Between the New Established Estimators and Criterion for Real Time Application
The first immediate and practical use of the estimator deals with the detection of a drop of the rotation of a mode so steep to lead to locking. To perform this task, the following criterion has been set: Equation (8) represents the actual implementation of the estimator (6) for the detection of the slowing down of the rotating modes with n = 1. Evaluating (6) at each time instance, if the value falls below a threshold that is equal to the average value of the frequencies measured in the time interval from to , minus Z times the standard deviation of the values in the same time interval described, then the mode is considered as locked. The criterion in (8) is robust enough to follow the dynamics of the mode, without suffering of sporadic fluctuations, but at the same time is also enough sensible to the occurrence of significant changes due to an actual increase or decrease of the rotation of the mode. This rule has been compared with the threshold based indicators used at AUG. An illustrative example of the tests performed has been reported in Figure 7.  Figure 7 reports the estimator in (6) in blue. Considering the vertical lines, standing for the time instances at which the different estimators considered have triggered an alarm and in red the time instance at which the disruption occurred, it can be observed how the described estimator increases the possibility of detecting earlier in time the presence of a locked mode with respect to the ones actually used in CR. The parameter Z has been set to "−4" to increase the confidence value of the detection.

Statistics of the Results
The frequency indicator has been tested on a population of 370 discharges of AUG. The disruptive pulses are 177, from 30303 to 30826 and the not-disruptive pulses are 193, from 30300 to 30824.
An immediate application of (6) according to the rule in (8) deals with the determination of the time instance at which a mode can be considered as locked in the frame of reference of the laboratory.  Figure 7 reports the estimator in (6) in blue. Considering the vertical lines, standing for the time instances at which the different estimators considered have triggered an alarm and in red the time instance at which the disruption occurred, it can be observed how the described estimator increases the possibility of detecting earlier in time the presence of a locked mode with respect to the ones actually used in CR. The parameter Z has been set to "−4" to increase the confidence value of the detection.

Statistics of the Results
The frequency indicator has been tested on a population of 370 discharges of AUG. The disruptive pulses are 177, from 30303 to 30826 and the not-disruptive pulses are 193, from 30300 to 30824.
An immediate application of (6) according to the rule in (8) deals with the determination of the time instance at which a mode can be considered as locked in the frame of reference of the laboratory. Such estimates have been compared with those provided by indicator based on the two coils system and currently in use at AUG, to test its application for disruption prediction and mitigation. Table 1 provides a comparison between the statistics obtained from the actual triggers working at AUG and (6). Considering the disruptive cases in Table 1, "detected" stands for the number of pulses during which a disruption occurred and that, according to the two indicators, has a locked mode. The word "missed" instead stands for the fact that a disruption occurred, but the indicators did not detect a locked mode. Finally, "early" means a locked mode has been detected, but too soon from the disruption to be considered a relevant cause of it, i.e., at least 1 s in advance. This latter case is actually important for the DISRTRIG25, 35 signals, less for (6) because it is possible that a mode rotates at a frequency close to its locking, but then starts rotating again.
The latter category has been studied further to estimate the limits of (6). Results have been summarized in Table 2. Table 2. "Early" category study regarding the disruptive pulses. The table reports the comparison between the threshold based indicators, currently used in control room at AUG, and the estimator in (6), used for the tracking of the dynamic of the mode.

Early Category (tot disr. Pulses 177)
Frequency Estimator in (6) Using the Rule in (8)  Table 2 summarize what stated above. The total number of triggered "early" assessments has been divided in two categories: those induced by a slowing down mode, that later in the pulse starts spinning again ("early by actual slowing down and recovery") and those induced by fluctuations in the measured signals by spurious MHD events, usually huge ELMs ("early induced by a MHD Instability"). This latter case, in fact, had to be expected because even if the driving sinusoidal function used in (6) allows improving the performance at least of a 25% with respect to the unbiased estimator, it cannot deal with all kind of induced perturbations on the saddle coils. Very large ELMs can occur and they might induce a wrong assessment and consequently, deceive the interpretation about the physical phenomenon involved. For this reason, a sensitivity study has been performed on the optimal Z parameter to set.
Concerning the statistics in Table 2, setting a relatively low Z value, e.g., Z = −1.96, the actual number of undetected events ("missed") is 0. At the same time, the number of "early" is high, 30, even if 7 of them are due to modes that slow down and then start rotating again.
Lowering the threshold to Z = −2.5 the number of the "early" events decreases because more events are correctly classified as "detected" locked modes. This is due to the fact that the number of "early induced by a MHD Instability" decreases.
By lowering further the Z, e.g., reaching Z = −3, it is also possible to classify correctly the pulses with a slowing down rotating mode that later in the discharge starts rotating again. Consequently, the number of "detected" increases again. At the same time, however, the threshold becomes so restrictive that for two pulses no mode has been detected as locked, and consequently, the statistics of "missed" increases.
To summarize then, a trade-off between sensitivity to the slowing down detection of a n = 1 mode and specificity has to be considered, but the estimator is physically coherent with the expectation. Figure 8 reports an example of the pulse 30445 showing a 2/1 mode that slows down between 1.15 s and 1.4 s and then accelerates again.
In Figure 8, the dynamics of the 2/1 tearing instability can be clearly observed, an interpretation supported by the spectrogram in Figure 8b. The electron cyclotron emission (ECE) allows assessing the presence of a q = 2/1 island with resonant surface between R~1.909m and R~1.968 m. This pulse is particularly exemplificative, since changing the Z threshold from Z = −2.5 to Z = −3, the time instance at which the indicator (6) detects a locked mode moves from t~1.288s, when it actually had slowed down before starting rotating again, to t = 7.569 s, shortly before the disruption. Table 1 shows also the results obtained for the not-disruptive cases. It can be seen how, increasing the confidence by increasing Z, less pulses are considered to have a locked instability. However, the results regarding the disruptive pulses and the analysis reported in Table 2 have to be considered at the same time to assess a trade-off between detected locked modes and missed ones. In fact, while for the not-disruptive pulses the use of the highest Z = −5 would be suggested, taking also into account the disruptive analysis in the same Table 1 and the study in Table 2, the use of Z = −4 emerges as more appropriate choice because of the fact that moving from Z = −4 to Z = −5 both the number of detected pulses decreases slightly and also the number of missed ones increases slightly. Considering a value of Z = −4 then, competitive performances are obtained with (6) with respect to the first estimator used in CR, DISRTRIG25.
However, always according to Table 1, the number of detected locked modes for disruptive pulses increases using (6) and the number of missed ones decreases dramatically with respect to the DISRTRIG25V and DISRTRIG35V.
Finally, Table 3 reports the estimates of the main parameters drawn from the log-distribution of the time interval between the raise of exception warnings, due to DISRTRIG25V and DISRTRIG35V, for the disruptive pulses and the estimates of the locking by (6) with respect to the time instance of the disruption. It can be observed how, even if the standard deviations are large, the mode of the distribution falls at a value that is ten times higher in the case of the time intervals evaluated according to (6) with respect to the ones obtained using the CR indicator.
To summarize then, a trade-off between sensitivity to the slowing down detection of a n = 1 mode and specificity has to be considered, but the estimator is physically coherent with the expectation. Figure 8 reports an example of the pulse 30445 showing a 2/1 mode that slows down between 1.15 s and 1.4 s and then accelerates again.  (8); (b) Mirnov coil spectrogram in the time window considered. As it can be seen a n = 1 mode slows down, almost locks to the wall and then starts rotating again.
In Figure 8, the dynamics of the 2/1 tearing instability can be clearly observed, an interpretation supported by the spectrogram in Figure 8b. The electron cyclotron emission (ECE) allows assessing the presence of a q = 2/1 island with resonant surface between R~1.909m and R~1.968 m. This pulse is particularly exemplificative, since changing the Z threshold from Z = −2.5 to Z = −3, the time instance at which the indicator (6) detects a locked mode moves from t ~ 1.288s, when it actually had slowed down before starting rotating again, to t = 7.569 s, shortly before the disruption. Table 1 shows also the results obtained for the not-disruptive cases. It can be seen how, , mean( f (t ∈ [t 0 , t i−1 ])), std( f (t ∈ [t 0 , t i−1 ])); t i ) obtained from Equation (8); (b) Mirnov coil spectrogram in the time window considered. As it can be seen a n = 1 mode slows down, almost locks to the wall and then starts rotating again. Moreover, the choice of a robust estimate for the assessment of a locked mode with Z = −4 provides and earlier warning time of 23ms on average with respect to the DISRTRIG25.

Conclusions
In this paper, an estimator based on the FFT of the integrated radial perturbation of the magnetic field at AUG has been described to track the slowing down of n = 1 instabilities, using only 10kHz signals of four saddle coils. The frequency estimator for the n = 1 modes has been boosted with a sinusoidal stabilizing function allowing to balance the effects of other MHD instabilities like ELMs.
The estimator suggested depends on the choice of a statistical threshold to determine whether a mode has locked. The preliminary analysis described in this paper suggests the choice of Z = −4.
When applied to the detection of locked modes in disruptive and not-disruptive pulses of a database of 370 discharges of AUG, the statistics show how the performances exceed the ones obtained from the threshold based indicator used currently for the real time detection of the locking of the mode, suggesting a possible improvement in the prediction of at least 23 ms on average, if applied in real time, and a factor ten on the assertion time between the assumed locking of the instability and the disruption itself, i.e., from 3.5 ms to 35 ms.
In particular, the estimator outperforms the actual threshold based indicators set at 0.25 V to detect a locked mode on disruptive pulses and at the same time it has competitive performances regarding the not-disruptive discharges.
However, the estimator has been intended for avoidance studies mainly, i.e for off-line analysis. Further investigations will be devoted to this scope, trying to identify the causes of locking modes, by starting tracing back the dynamics of the modes; in other words, to study the possible chains of events leading to a locked mode induced disruption to occur. At the same time, it has to be considered that different physical processes, like TEM-type instabilities [13], can lead to similar perturbations of n = 1 MHD modes on the considered measurements and cannot be at the present stage differentiated with the estimator described in this article. Future efforts will be then devoted to studying the chains of events for avoidance studies. One of the possible chains involves the effects of MARFEs and their dynamics, which can induce islands and consequently lead to a locked mode in the reference frame of the laboratory.