# Simulation and Catastrophe Detection of Spontaneous Combustion Processes in Suffide Ores
## 2 Materials and Methods
### Catastrophe Detection by Sample Entropy  
Catastrophe theory is a method used to analyze time series data to identify significant changes and estimate critical points, such as mutation points. In the context of the spontaneous combustion of sulfide ore, we employ catastrophe detection techniques to understand the temperature changes throughout the entire unsteady process. This approach involves analyzing data sequences obtained through wavelet decomposition and reconstruction from a system dynamics perspective. By applying methods such as time series catastrophe detection and nonlinear feature parameter extraction, we can identify hidden catastrophe points in the transition zones of different stages and determine the corresponding temperatures at these critical points.  
Sample Entropy (SampEn) is a parameter that characterizes the complexity of a time series, representing the probability of new pattern generation in a nonlinear dynamical system, thereby quantitatively assessing the system's complexity. The specific calculation steps are as follows [43]:  
Assume the original time series is [\(x_{(1)}\), \(x_{(2)}\),...., \(x_{(N)}\)]. To perform phase space reconstruction with an embedding dimension of mmm, a set of mmm-dimensional vectors can be constructed as follows:  
\[X(i)=\left[x(i),x(i+1),\ldots\ldots,x(i+m-1)\right]\,,i=1,2,\ldots\ldots,N-m+1 \tag{3}\]  
The Euclidean distance \(\mathrm{d}[X(i),X(j)]\) is defined as the maximum difference among the corresponding elements of \(X(i)\) and \(X(j)\), as shown in Equation (4).  
\[\mathrm{d}[X(i),X(j)]=\max_{0\leq k\leq m-1}[|x(i+k)-x(j+k)|] \tag{4}\]  
Assume a tolerance \(r\) and count the number of vectors \(X(i)\) for which \(\mathrm{d}[X(i),X(j)]<r\), denoted as \(n_{i}^{m}(r)\). Calculate the ratio of this count to the total number of vectors \(n\)-\(m\), denoted as \(C_{i}^{m}(r)\), as shown in Equation (5).  
\[C_{i}^{m}(r)=\frac{n_{i}^{m}(r)}{n-m+1}\,,\,i=1,2,\ldots\ldots,n-m+1 \tag{5}\]  
Calculate the average of \(C_{i}^{m}(r)\) over all \(i\), denoted as \(C^{m}(r)\), as shown in Equation (6).  
\[C^{m}(r)=\frac{1}{N-m+1}\sum_{i=1}^{N-m+1}C_{i}^{m}(r) \tag{6}\]Let the embedding dimension \(m\) increase to \(m=m+1\), and repeat steps (3)-(6) to obtain \(C^{m+1}(r)\). Finally, define sample entropy (SampEn) as shown in Equation (7).  
\[\text{SampEn}(m,r)=\ln\left[\frac{C^{m}(r)}{C^{m+1}(r)}\right] \tag{7}\]  
Catastrophe detection by sample entropy combines sample entropy with the sliding window technique. It utilizes a window to extract subsequences from a time series and calculates their SampEn values. Then, new subsequences are obtained by gradually sliding the window with a chosen step size, and their SampEn values are calculated. This process continues until the sliding window traverses the entire sequence. Finally, a sequence of SampEn values is obtained, and the curve of this sequence is plotted. One can identify the interval or point of catastrophe by analyzing the curve.  
To improve the accuracy of catastrophe point localization and facilitate comparative analysis, preprocessing the high-frequency reconstructed sequence is required before applying the catastrophe detection method for temperature detection. This preprocessing includes sequence extension and standardization. This study employs the cubic spline interpolation method to expand the high-frequency reconstructed sequence at each measurement point, and the expanded sequence length after the expansion is 1500. The extended sequence is then standardized through the range normalization method, which allows for a temperature time series appropriate for catastrophe detection.