*3.3. Problem Statement*

The aim is to forecast the operational relative-hardness. To do so, we need to label the datasets with the associated ORH category at data point. We know from Equation (1) that the ORH labelling process requires as input (i) the one-step forward differences on energy consumption (Δ*ECt*) and feed tonnage (Δ*FTt*), and (ii) a lambda (*λ*) value. In addition, we are interested in forecasting the ORH at different time supports.

Since the information is collected every 30 min, the upcoming energy consumption EC*t*+<sup>1</sup> and feed tonnage FT*t*+<sup>1</sup> at 0.5 h support are denoted simply as EC*t*+<sup>1</sup> and FT*t*+<sup>1</sup> in reference to EC(0.5 h) *t*+1 and FT(0.5 h) *<sup>t</sup>*+<sup>1</sup> , respectively. An upcoming EC and FT at 1 h support, EC(1 h) *<sup>t</sup>*+<sup>1</sup> and FT(1 h) *<sup>t</sup>*+<sup>1</sup> , are computed by averaging the next two energy consumption, EC*t*+<sup>1</sup> and EC*t*+2, and the two feed tonnage, FT*t*+<sup>1</sup> and FT*t*+2. Similarly, by averaging the upcoming ECs and FTs, different supports can be computed. Let **s** be the time support in hours, which represents the average over a temporal interval of a given duration, then EC(**s***h*) *<sup>t</sup>*+<sup>1</sup> and FT(**s***h*) *<sup>t</sup>*+<sup>1</sup> are calculated as:

$$\text{EC}\_{t+1}^{(\text{sh})} = \frac{\text{EC}\_{t+1} + ... + \text{EC}\_{t+2\mathbf{s}}}{\mathbf{2s}} \qquad \qquad \text{FT}\_{t+1}^{(\text{sh})} = \frac{\text{FT}\_{t+1} + ... + \text{FT}\_{t+2\mathbf{s}}}{\mathbf{2s}} \tag{2}$$

In this experiment, three different supports (**s***h*) are considered: 0.5, 2 and 8 h.

Figure 2 illustrates the ORH criteria using a half-hour time support on SAG mill 1 dataset. From the daily graph of EC(**0.5** <sup>h</sup>) *<sup>t</sup>* and FT(**0.5** <sup>h</sup>) *<sup>t</sup>* at the top, the graph of <sup>Δ</sup>EC(**0.5** <sup>h</sup>) *<sup>t</sup>* and <sup>Δ</sup>FT(**0.5** <sup>h</sup>) *<sup>t</sup>* are extracted and presented at the centre and bottom, respectively. Three different bands, corresponding to *λ*: 0.5, 1.0 and 1.5, are shown. The values that are above the band are considered as increasing, the ones below it are considered as decreasing and inside as undefined (relatively constant). The corresponding categories for EC and FT are used to define the operational relative-hardness (as in Table 1). It can be seen that, when *λ* increases, the proportions of hard and soft instances decrease. Since *λ* is an arbitrary parameter, a sensitivity analysis is performed in the range [0.5, 1.5] to capture its influence on the resulting LSTM accuracy to suitably learn to predict the ORH at the different time supports.

At each time *t* the input variables considered to predict ORH(**s***h*) *<sup>t</sup>*+<sup>1</sup> are FT*t*, BPr*<sup>t</sup>* and SSp*t*. To account for trends, and since FT and SSp are operational decisions, the differences FT*t*+1−FT*<sup>t</sup>* and SSp*t*+1−SSp*<sup>t</sup>* are also considered as inputs. Therefore, the dataset of predictors and output {**X**, **<sup>Y</sup>**} ∈ <sup>R</sup><sup>5</sup> <sup>×</sup> <sup>R</sup>, at each time support **s***h*, has samples {**x***t*, **y***t*}∈{**X**, **Y**} made by **x***<sup>t</sup>* = FT*t*, BPr*t*, SSp*t*, FT*t*+1−FT*t*, SSp*t*+1−SSp*<sup>t</sup>* and **y***<sup>t</sup>* = ORH(**s***h*) *t*+1 . We also tried several other combinations of input variables, but all led to results with lower quality. A temporal window of the previous four hours (previous eight consecutive data points) are used as input for training and testing the LSTM models.

**Figure 2.** SAG mill 1. Graphic representation of the relative-hardness inference criteria at 0.5 h time support. Daily graphs of energy consumption and feed tonnage (**top**), delta of energy consumption (**centre**), and delta of feed tonnage (**bottom**).
