1 Introduction

Breakout is a serious accident in continuous casting that not only damages the caster but also affects the quality of slabs and smooth production [1, 2]. Breakout is known as the rupture of weak shell and exudation of molten steel in the mold [3]. Many reasons can cause breakout, such as mold level fluctuation [4], large casting speed, or improper friction force. Near the mold meniscus [5], the shell will stick to the mold copper plate in virtue of poor lubrication [6], which results in the rupture of the shell and the appearance of breakout.

Existing breakout prediction methods can be divided into two categories: logical judgment [7] and artificial intelligence methods [8,9,10]. Although with certain accuracy, the methods suffer from the following defects: (i) they rely on parameter setting and sample making, which are greatly influenced by casting speed, steel grade, etc.; (ii) they are hard to accurately capture the time lag and temperature inversion characteristics of breakout. The above defects are primary factors of missing and false alarms, and the rapid changes of casting speed caused by missing and false alarms will seriously affect the surface and internal quality of slabs [11,12,13]. Consequently, effectively reducing the number of false alarms on the premise of avoiding missing alarms is crucial to the development of novel breakout prediction methods.

Based on the change of temperature measured by thermocouple (TC) installed on the mold copper plates, a breakout prediction system can monitor whether breakout occurs according to the heat transfer [14]. The temperature of TC possesses the time series characteristics of single TC and the spatial linkage characteristics of multiple TCs during the breakout. The time series characteristics of single TC exhibit a “rise-fall” with time, and the amplitude and change rate satisfy certain continuous change conditions. The spatial linkage characteristics of multiple TCs, which are ignored by existing prediction methods, refer to the alternating appearance of rise-fall characteristic. The time series characteristics of single TC and the spatial linkage characteristics of multiple TCs constitute the temperature timing characteristics of the breakout, which are vital to identification of distinct temperature modes.

In view of the similarity between the temperature timing characteristics of same modes is higher while the difference between that of different modes is larger, this work proposed a novel breakout prediction method based on dynamic time warping (DTW) and k-means clustering. DTW can effectively measure the similarity of temperature timing characteristics of breakout, and k-means can maximize the difference of that under breakout and normal casting conditions. Therefore, the combination of DTW and k-means clustering can effectively extract and distinguish the commonalities and differences between the temperature timing characteristics.

The rest of this paper is organized as follows: Section 2 reviews the mechanism of breakout and temperature characteristics of different patterns, followed by construction of timing characteristics in Section 3; Section 4 briefly discusses sample distance metric based on DTW; k-means and its introduction are detailed in Section 5; design of breakout prediction method based on clustering is elaborated in Section 6; Section 7 presents the test results of the proposed method; and finally, this paper is concluded with conclusions.

2 Mechanism of breakout and temperature variation characteristics

2.1 Mechanism of sticking breakout

Figure 1 shows the temperature change and the mechanism of sticking breakout. Under normal conditions, the temperature changes steadily with time and there is no significant fluctuation, as shown in Fig. 1(a). Along the casting direction, the thickness of strand shell and the heat resistance between the shell and mold increase. Therefore, the temperature of TCs in the lower row continuously decreases.

Fig. 1
figure 1

Sticking breakout mechanism. (a) The normal conditions. (b–e) The sticking point keeps moving down and passing through the thermocouples of first and second rows. (f) The breakout when the sticking point leaves the exit of mold

The temperature exhibits a typical rise-fall trend when sticking point occurs; i.e., the temperature rises by a certain amplitude and then falls over time. The rise-fall of temperature in the second row lags behind that in the first row in time, as observed in Fig. 1(b–e), which is called “time-lag phenomenon.” In some scenarios, the temperature in the lower row is higher than that in the upper row, known as “temperature inversion,” as shown in Fig. 1(e) and (f).

When the sticking point moves down along the casting direction and leaves the exit of the mold, the thin shell near the sticking point cannot support ferrostatic pressure and, subsequently, causes a breakout accident, as shown in Fig. 1(f).

2.2 Temperature variation characteristics

Figure 2 illustrates the temperature under distinct patterns. Figure 2a–e shows the temperature under normal conditions, which can be easily recognized by existing breakout prediction methods.

Fig. 2
figure 2

Comparison of temperature in different patterns. ae Temperatures in normal pattern. fj Temperatures in breakout pattern. ko Temperatures in false alarm pattern

The characteristics of the temperature under breakout patterns, such as change rate, amplitude, and the time of rise-fall, satisfy corresponding conditions, as shown in Fig. 2f–j. These characteristics can be extracted, induced, and identified, which constitute the basis of prediction methods based on logical judgment or neural networks.

When breakout prediction system (BPS) misjudged the temperature under normal casting conditions as that of breakout, the system will issue an incorrect alarm, which is called a false alarm. There are, of course, no breakout signs on the surface of corresponding slab. For example, the temperature of TCs in the upper and lower rows rises simultaneously in a short period of time. Alternatively, the temperature in the first row rises slightly while that of the second row rises quickly, as observed in Fig. 2k–o. Despite these patterns are similar to those of breakout, their characteristics are diverse, and what is more, they are not representative. In other words, the temperature of false alarm patterns does not have the typical time lag and temperature inversion characteristics.

3 Construction of temperature timing characteristics

Taking into consideration the real-time requirements of online detection and prediction, this study constructs the temperature timing characteristics from the first- and second-row temperatures which are nearest to the meniscus and more sensitive to breakout.

3.1 Temperature change rate difference

The change rate of temperature has a decisive effect on identifying the characteristics of single TC and can extract the temperature characteristics including rising/decreasing trend and amplitude. On the other hand, the change rate will scale the diverse ranges of temperature to the similar range, which is convenient for measuring the similarity or distance between different samples. The equation of change rate in temperature is

$$ {v}_{\left(\mathrm{row}\right)i}=\frac{T_{i+5}-{T}_i}{5},\kern0.5em i=1,2,\dots, 20 $$
(1)

where Ti is the temperature of the ith time increment.

Then, the difference of v(row 1) and v(row 2) is calculated to extract the spatial characteristics of multiple TCs, i.e., time lag and temperature inversion. The equation can be written as

$$ {v}_{\left(\mathrm{row}\ 1\hbox{--} \mathrm{row}\ 2\right)i}={v}_{\left(\mathrm{row}\ 1\right)i}-{v}_{\left(\mathrm{row}\ 2\right)i},\kern0.5em i=1,2,\dots, 20 $$
(2)

where v(row 1)i and v(row 2)i are the temperature change rate in the first- and second-row TCs.

3.2 Normalization of second-row temperature

The variation trend of the temperature of the second row is of great benefit to the identification of breakout from false alarms. However, the similarities of the breakout samples will be relatively low when the amplitudes of the temperature in the second row are diverse from each other. In this context, the second-row temperature is normalized to eliminate inconsistencies of amplitudes in the rising temperature. The temperatures are normalized as

$$ {\mathrm{nor}}_i=\frac{T_i-{T}_{\mathrm{min}}}{T_{\mathrm{max}}-{T}_{\mathrm{min}}},\kern0.5em i=1,2,\dots, 25 $$
(3)

where Tmin and Tmax are the minimum and maximum values of the temperature.

Equations (1)~(3) are used to extract the temperature timing characteristics, including the time series characteristics of single TC and the spatial linkage characteristics of multiple TCs, for constructing the timing characteristic samples.

Figure 3a and b denotes the timing characteristic samples obtained by processing the temperature in Fig. 2c. Figure 3c and d corresponds to Fig. 2i, and Fig. 3e and f corresponds to Fig. 2o. The dissimilarities between the constructed results are readily discernible.

Fig. 3
figure 3

Construction results of temperature in different patterns. a, b Construction results of temperatures in the normal pattern. c, d Construction results of temperatures in the breakout pattern. e, f Construction results of temperatures in the false alarm pattern

In this work, 30 breakout and 50 normal timing characteristic samples were constructed for training, and all the samples constituted the sample library Q.

4 Dynamic time warping and sample distance metric

In the real casting processes, the temperature change rate, amplitude, extreme, and lag interval of the same pattern are distinct, and the curves of normal, breakout, and false alarm temperature patterns differ from each other. Therefore, the conventional Euclidean distance cannot effectively measure their similarity, especially the breakout samples under different casting conditions. So, it is necessary to choose a proper distance measurement method to distinguish breakout and normal patterns for avoiding missing and false alarms.

4.1 Dynamic time warping

In view of its nonlinear mapping ability and flexibility of sequence alignment, DTW can effectively handle the sequence length and error matching limitations of the Euclidean distance [15,16,17]. Therefore, DTW exhibits excellent performance in many fields [18].

Assuming the two time series (P and Q), the DTW distance is computed by, first, finding the best alignment between them. The exact matching equation [19] is given by

$$ dtw\left(P,Q\right)=\underset{W={w}_1,{w}_2,...,{w}_k,...,{w}_K}{\mathrm{argmin}}\sqrt{\sum \limits_{k=1,{w}_k=\left(i,j\right)}^K{\left({P}_i-{Q}_j\right)}^2} $$
(4)

where wk is the subscript of values in the sequences P and Q and Pi and Qj represent the matched values in P and Q.

The concept and calculation principle of DTW are shown in Fig. 4. P is [1, 2, 4, 5, 6, 7, 6, 5, 4, 3], and Q is [0, 1, 1, 2, 3, 5, 6, 4, 3, 2]. Although the waveforms of P and Q are similar, the characteristics on the time axis are not aligned. Figure 4a shows the Euclidean distance algorithm, and Fig. 4b shows the DTW distance algorithm. It can be seen from Fig. 4b that the sequences P and Q are warped and aligned in multiple places; i.e., P(2) and P(3) are warped and aligned to Q(4) and Q(5). P(5), P(6), and P(7) are warped and aligned to Q(7), etc. The table in Fig. 4c shows the results of calculation operation (the square of the absolute value of the difference) between the values after P and Q are warped.

Fig. 4
figure 4

ac The matching methods of Euclidean and DTW distance

The calculation process of Euclidean distance between sequences P and Q is

$$ \mathrm{Euclidean}\ \left(P,Q\right)=\sqrt{\sum \limits_{i=1}^k{\left({P}_i-{Q}_i\right)}^2}=\sqrt{1+1+9+9+9+4+0+1+1+1}=6.0 $$
(5)

The calculation process of DTW distance between sequences P and Q is

$$ dtw\left(P,Q\right)=\sqrt{1+0+0+0+1+0+0+1+0+1+0+0+1}=2.2 $$
(6)

It should be noted that the value-matching method is unique for the Euclidean distance, as indicated by the red arrows in Fig. 4c, while that of the DTW distance is not unique. Therefore, DTW uses the idea of dynamic programming to find the optimal value–matching method, as shown by the blue arrows in Fig. 4c. The distance calculated by this optimal value–matching method is the smallest. This smallest distance is called DTW distance, which indicates that DTW can reasonably and effectively measure the similarity of P and Q.

4.2 Sample distance metric

The corresponding two-segment numerical series, including v(row 1–row 2) and nor, are obtained after constructing each sample with timing characteristics. Hence, on the basis of Eqs. (1,2,3), the overall similarity or distance of the samples is measured by Eq. (7)

$$ {d}_{\mathrm{con}}\left({s}_1,{s}_2\right)= dtw\ \left({v}_{\left(\mathrm{row}\ 1-\mathrm{row}\ 2\right)1},{v}_{\left(\mathrm{row}\ 1-\mathrm{row}\ 2\right)2}\right)+ dtw\left({\mathrm{nor}}_1,{\mathrm{nor}}_2\right) $$
(7)

where dcon(s1, s2) represents the distance between s1 and s2. v(row  1 − row  2)1 and nor1 are the processing results corresponding to sample s1, whereas v(row  1 − row  2)2 and nor2 correspond to sample s1. dtw(w1, w2) denotes the DTW distance between w1 and w2.

5 k-means clustering

Clustering is a vital unsupervised learning method in the field of machine learning [20, 21], which divides data into multiple clusters according to the similarity among data objects [22]. The similarity in the same cluster is higher than that in different clusters after clustering [23]. k-means clustering only needs to set one parameter (k), and the clustering results are easy to understand. More than that, it can maximize the temperature differences between the breakout and normal conditions.

Given a sample library Q = {q1, q2, …, qm}, Q ∈ Rn, the k-means algorithm splits Q into k non-overlapping clusters {Q1, Q2, …, Qk} based on the similarity, where k is a predefined positive integer. Clusters can be represented by their centroids {μ1, μ2, …, μk}, where μidenotes the centroid of cluster Qi. Besides, clusters {Q1, Q2, …, Qk} must satisfy the following conditions:

  1. a.
    $$ {Q}_i\ne \varnothing, i=1,2,\dots, k $$
  2. b.
    $$ {Q}_i\cap {Q}_j=\varnothing, i\ne j,i,j=1,2,\dots, k $$
  3. c.
    $$ Q={\cup}_{l=1}^k{Q}_l,l=1,2,\dots, k $$

k-means clustering uses the sum of the squared error as a convergence condition to minimize the sum of the distances between all samples and their corresponding centroids [24]. The convergence criterion can be written as

$$ \underset{Q}{\arg\ \min}\sum \limits_{i=1}^k\sum \limits_{q\in {Q}_i}{\left\Vert q-{\mu}_i\right\Vert}^2\le \mathrm{tol} $$
(8)

where q ∈ Q and tol is convergence accuracy.

6 Design of breakout prediction method based on clustering

6.1 Cluster centroid acquisition and pattern distinction

This paper sets k = 2 since there are only two temperature patterns in Q: breakout and normal conditions. k-means clustering was used to obtain the breakout cluster (cb) and normal cluster (cn) conditions from the sample library Q, as well as their centroids (μb and μn). The distribution of samples belonging to Q is shown in Fig. 5.

Fig. 5
figure 5

Clustering result of breakout and normal samples

In Fig. 5, the x-axis represents the product of the distance between the sample and the centroid of breakout cluster (μb) and the scaling factor (λ) obtained by Eq. (9), whereas the y-axis measures the distance between the sample and centroid of normal cluster (μn).

$$ {\lambda}_i={\exp}^{-\frac{f_i}{f_{\mathrm{avg}}}},\kern0.33em i=1,2,\dots, S $$
(9)

where λi ∈ (0, 1], fi is the amplitude of the first-row temperature, S is the number of breakout samples, \( {f}_{\mathrm{avg}}={\sum}_{i=1}^S{f}_i \) is the average of amplitudes of all breakout samples, and favg is calculated to be equal to 11 °C.

By introducing the scaling factor (λ), the breakout patterns can be clearly distinguished from that of normal casting conditions. For the breakout sample, the scaling factor (λ) obtained by Eq. (9) is less than 1. The larger the amplitude of the temperature sample, the smaller the scaling factor (λ). For the sample of normal casting conditions, the temperature amplitude is basically 0, so the corresponding scaling factor (λ) is 1. Therefore, Eq. (9) can scale the breakout samples to the adjacent region, while it can keep them away from the region where the samples under normal casting conditions locate.

In Fig. 5, all the distances between breakout samples and their own centroid (μb) are less than 5 after scaling, but the distances between them and μn are relatively large, i.e., 10–40. On the contrary, the distances between all the samples in the normal cluster and μb are greater than 10, whereas the distances to the center of their own cluster run from 2.5 to 20, which indicates that the breakout samples and the normal samples are obviously distributed in two different regions. The samples of the two patterns can be clearly distinguished from each other, laying the foundation of the pattern distinction lines.

As can be seen from Fig. 5, all of the breakout samples are gathered adjacent to each other in the same region, verifying the similarity of the temperature under the breakout mode. Therefore, it is possible to identify and detect the breakout samples by setting the breakout region. In order to avoid missing alarms and to minimize the number of false alarms, the pattern distinction lines are obtained by Eqs. (10) and (11) to define the breakout region

$$ {B}_{\mathrm{threshold}}={\omega}_{\mathrm{b}}\times \max \left\{{x}_{\mathrm{b}i}\right\} $$
(10)
$$ {N}_{\mathrm{threshold}}={\omega}_{\mathrm{n}}\times \min \left\{{y}_{\mathrm{b}i}\right\} $$
(11)

where max{xbi} and min{ybi} are the maximum abscissa and the minimum ordinate of the sample in breakout cluster (cb) in Fig. 5. ωb and ωn are the correction coefficients.

6.2 Determination of the optimum thresholds

In order to determine the thresholds ωb and ωn, the number of missing and false alarms is calculated with different combinations of ωb and ωn. The calculation results are shown in Figs. 6 and 7. As can be seen from Fig. 6, with the increase of ωb, the number of false alarm gradually increases. So, the better clustering effect is achieved with the smaller value of ωb. Figure 7 illustrates that with the decrease of ωn, the number of missing alarm gradually becomes zero when ωn = 0.9. Above all, under the premise of zero missing and minimum false alarm, ωb and ωn are set to 1.1 and 0.9, respectively.

Fig. 6
figure 6

The number of false alarm under different thresholds

Fig. 7
figure 7

The number of missing alarm under different thresholds

The maximum of xbi is obtained and is equal to 4.57, and the minimum of ybi is equal to 9.90. So, the value of pattern distinction lines of Bthreshold = 5.03 and Nthreshold = 8.91 is achieved.

6.3 Design of breakout prediction method

Figure 8 elaborates a flowchart of the breakout prediction test. Details of the test steps for breakout prediction are as follows:

  1. (1)

    Construct the temperature timing characteristics of test sample to get xnew;

  2. (2)

    Calculate the distances between xnew and μn and μb to obtain dn and db

Fig. 8
figure 8

Flowchart of breakout prediction test

$$ {d}_{\mathrm{n}}={d}_{\mathrm{con}}\left({x}_{\mathrm{n}\mathrm{ew}},{\mu}_{\mathrm{n}}\right) $$
(12)
$$ {d}_{\mathrm{b}}={d}_{\mathrm{con}}\left({x}_{\mathrm{new}},{\mu}_{\mathrm{b}}\right)\times \lambda $$
(13)
  1. (3)

    Estimate whether dn and db meet the following conditions at the same time:

$$ {d}_{\mathrm{n}}>{N}_{\mathrm{threshold}}\kern0.5em \mathrm{and}\kern0.5em {d}_{\mathrm{b}}<{B}_{\mathrm{threshold}} $$
  1. (4)

    If yes, a breakout alarm will be released and the casting speed should be reduced immediately; if not, return to steps (1)~(3) to deal with the next sample

7 Results and discussion

To verify the validity and accuracy of the proposed method described in Section 6, 120 test samples reported by BPS, including 50 normal, 20 breakout, and 50 false alarm temperature samples, were used for this purpose. Calculate the distances dn and db of each test sample. If dn is greater than Nthreshold and db is less than Bthreshold, the corresponding test sample is considered to be a breakout sample; otherwise, it is considered to be a normal sample.

The test results are stated in Figs. 9, 10, and 11. Light-colored circles are breakout training samples, and light-colored squares are normal training samples. The two lines are the pattern distinction lines x = 5.03 and y = 8.91. The shaded area is the breakout region mentioned in Section 6, which is the basis of judging whether a sample denotes breakout or not.

Fig. 9
figure 9

Test results of normal samples

Fig. 10
figure 10

Test results of breakout samples

Fig. 11
figure 11

Test results of false alarm samples

From Fig. 9, it is clear that all the normal test samples are located to the right of the line x = 5.03, so they are not breakout samples. The test samples and training samples are located in the same area, which shows that the proposed method is consistent with BPS in identifying normal samples.

Figure 10 demonstrates the results of the breakout test samples. All 20 breakout samples are located in the breakout region. Thus, they are identified as breakout samples according to the method described in Section 6, which is consistent with BPS. In addition, 50 breakout samples, including training and testing, cover large-scale process parameters during continuous casting, i.e., casting speed and steel grade. They are converged on the left of breakout region, implying that the proposed method can extract and distinguish the characteristics of breakout on the premise of overcoming the influence of casting process on temperature. As consequence, it is evidenced that the combination of k-means and DTW is adequate to predict breakout.

The 50 false alarm samples misjudged by BPS were tested, and the results are shown as blue rhombuses in Fig. 11. All 50 false alarm samples lie above the line y = 8.91, but eight of them are located to the left of x = 5.03. In other words, eight false alarm samples cannot be accurately and effectively identified. Hence, the number of false alarms could be decreased from 50 to 8, leading to an 84% reduction in number.

In Figs. 9, 10, and 11, it is readily discernible that the range and limit of the breakout and normal clusters can be obviously separated using the pattern distinction lines after k-means clustering. The confusion matrix and performance comparison with BPS are shown in Table 1. It is worth mentioning that the performance of the two methods is the same for breakout and normal patterns. In other words, the different patterns can be captured and identified accurately and effectively. However, when the temperature samples vary from the typical patterns, the proposed method shows excellent performance compared with BPS, which indicates that the false alarm rate can be significantly reduced while guaranteeing a 100% correct alarm rate.

Table 1 The confusion matrix and performance comparison with BPS

8 Conclusion

Although the breakout prediction methods based on logic judgment and neural networks have certain prediction accuracy, they rely heavily on parameter setting and sample making and cannot accurately extract the time lag and inversion characteristics of breakout temperature, resulting in an increase in false alarms. In view of this, the present work extracts the timing characteristics of raw temperature without human intervention in temporal and spatial perspectives, constructs the samples containing timing characteristics, and then proposes a new breakout prediction method based on k-means clustering and DTW, in which the distances between the samples and the centroids are calculated by DTW and the k-means clustering algorithm is used to obtain the clusters’ centroids of samples and distinguish the breakout and normal casting conditions. The proposed method reduces the number of false alarms from 50 to 8 on the premise of ensuring a 100% correct alarm rate compared with BPS. The results show that k-means clustering and DTW have great potential in breakout prediction, which lays a foundation for the use of machine learning methods to identify and detect abnormalities in the continuous casting process.