# Real-Time Detection of Overloads on the Plasma-Facing Components of Wendelstein 7-X
## 3 Image Analysis
### Thermal Overload Detection Algorithm  
The Thermal Overload Detection algorithm must trigger a stop operation (i.e., stop of heating power) before the maximum operational surface temperature of the PFCs is exceeded. The system has a delay time because of the processing and the time needed to stop the heating systems. To compensate for this delay and to anticipate when an overload would occur, it predicts the surface temperature using a transient model (Equation (1)) [12]. Equation (1) approximates the temperature increase \(\Delta T\) given the heat flux \(q\) [kW/m\({}^{2}\)] and a time interval \(\Delta t\) [s]. \(C_{m}\) is a material-dependent constant (\(C_{m}=\pi\cdot\lambda\cdot\rho\cdot C_{p}/4\times 10^{-6}\) [s(kW)\({}^{2}\)/(m\({}^{4}\) K\({}^{2}\))], where \(\lambda\) is the diffusion coefficient, \(\rho\) the material density and \(C_{p}\) the specific heat capacity). \[\Delta T=q\sqrt{\frac{\Delta t}{C_{m}}} \tag{1}\]  
This model is valid for uncooled as well as cooled components before reaching the steady-state temperature or during fast transient heat loads when the heat propagates into the material down to the actively cooled heat sink. Close to the steady-state, however, this model overestimates the increase in the surface temperature, resulting in a conservative assessment. In any case, no overload can occur in steady-state conditions. The system triggers an alarm when the temperature reaches the threshold \(T_{th}\) defined by Equation (2). This threshold depends on the temperature limit \(T_{limit}\), the current heat flux \(q\) and a given reaction time (\(t_{r}=0.16\) s; see Figure 9 for a justification of this value). \[T_{th}=T_{limit}-q\sqrt{\frac{t_{r}}{C_{m}}} \tag{2}\]  
The system estimates the current heat flux and predicts the temperature evolution in the next 0.16 s according to the transient model and sets the temperature threshold for each frame. It is required, however, to process one frame and stop the heating systems in less time (\(t_{max\_delay}=0.11\) s) allowing a 50 ms of safety margin. The safety margin is subtracted to allow for the uncertainty of the prediction. The temperature evolution is predicted using a model which is valid for 1-dimensional semi-infinite solids. This is, of  
Figure 8: The system calibrates and analyses each frame of a pulse. The calibrated images are analysed by the Thermal Overload Detection algorithm. If there is risk of overload of the PFCs, the system sends an alarm to the interlock to stop operation. The total delay of the pipeline must be less than 110 ms, including the stopping of the heating systems. The scene model and the emissivity correction map provide the thermal properties of the imaged components and their temperature limits. A surface layer map is used to adjust the risk in presence of surface layers. The non-uniformity correction (NUC), emissivity correction map, and surface layer map are updated periodically with dedicated procedures. course, an approximated model. Furthermore, the measurement of the heat flux is also very noisy, resulting in a prediction with high uncertainty. The safety margin value of 50 ms is a parameter of the system and it has been derived experimentally from the current data and it may need further adjustment in future campaigns. According to this, the Thermal Overload Detection algorithm is designed as follows:  
1. After the acquisition and calibration of the thermal image \(T\), the image is filtered to avoid false alarms due to remaining uncorrected bad pixels and noise coming from neutrons. It is clear that hot pixels can trigger false alarms, but also cold pixels must be removed as they can suddenly become hot, creating an apparent (false) peak of heat flux. This may lower the threshold in excess, triggering a false alarm. We remove hot pixels with a spatial filter, a morphological opening with a structuring element of 3 \(\times\) 3 pixels and 8-connectivity. Cold pixels are removed by a complementary morphological closing followed by a reconstruction [14].