**&XUYHVEHORQJLQJWRWKHFDOLEUDWLRQVDPSOH**

**Figure 3.** Daily curves of energy consumption in HVAC facilities of the Panama City's store. The natural control limits are estimated from the curves belonging to the calibration sample, which have been shown which (Phase I).

From this reference sample and based on the simulation study corresponding to the control chart based on the functional depths (see Section **??**), the mode functional depth and the weighed method for outlier detection are used. Additionally, a significance level of *α* = 0.025 is used for the estimation of the LCL from *B* = 500 bootstrap resamples, a smoothing coefficient *γ* = 0.8, and a percentage of Trimming *trim* = 0.05, which allows obtaining an envelope of 95% of the deepest curves. The advantage of this procedure of detecting atypical curves in the Phase I control chart based on functional data is its flexibility to adapt to a wide variety of real problems, by regulating its parameters (*γ* and *trim*).

The left panel of the Figure **??** shows the original gray curves, the estimate of the median (blue curve), the functional trimmed mean (red curve) and the envelope corresponding to the 95% of the deepest curves, which is plotted in red. The curves detected as anomalous are shown in gray and dotted in black. After the mentioned atypical energy consumption curves are identified, they are removed from any calculation related to the estimation of the natural control limits, given that their assignable causes have been identified (causes apart from the randomness of the data). Subsequently, the process is repeated according to an iterative scheme until atypical curves associated with assignable causes are not identified.

Figure **??** shows the functional approximation of the rank control chart, where each datum or point accounts for a daily curve of energy consumption in HVAC. The first 23 points represent the HVAC energy consumption curves for August, whereas the next 21 points represent the energy consumption curves of September.

**Figure 4. Left** panel: Curves of daily energy consumption in HVAC facilities of the Panama City's store. The figure identifies curves detected as anomalies as well as functional position measurements. **Right** panel: Control chart corresponds to Phase I; they facilitate the detection of anomalous curves, thus eliminating the assignable causes of variation. The depths of each of the daily consumption curves and the natural control limit are shown.

In this first iteration, the previously identified curves are detected as anomalous. Their structure corresponds to an assignable cause of variation (see Section **??**). They correspond to 11, 21, 22 and 29 September. However, in this iteration, the anomalous curve corresponding to 27 September has been not detected. Additionally, the curves corresponding to 23 August, 20 and 26 September are detected. Moreover, the data depth corresponding to the curves from 19 September are very small—they are outside the lower control limit and thus they are identified as out-of-control states. The assignable cause corresponding to this behavior is that the air conditioning was being shut off half an hour earlier than usual.

In the next iteration, the following daily consumption curves are detected as out-of-control or anomalous: 4 August, 15, 19, 25 and 27 September. In this iteration, the HVAC energy consumption curve of 27 September and those corresponding to the last days of September are identified; the timing of HVAC shutdown was changed for the latter part of September. Finally, energy consumption curves are not detected as anomalous after the second iteration (see Figure **??**).

**Figure 5.** Under-control process (HVAC energy consumption is stabilized). **Left** panel: daily HVAC energy consumption curves in the Panama City store, showing the envelope corresponding to 95% of deeper curves. **Right** panel: control chart for Phase I based on functional data depth.

The process began with 44 curves, of which 9 (in the first iteration) and 5 (in the second iteration) curves were identified as anomalous. Of these 14 energy consumption curves, 2 and 12 curves correspond to August and September, respectively. Hence, the calibration sample comprises days in August and September, until 18 September. The current performance of energy efficiency of HVAC installation has been characterized through this reference or calibration sample. The next step is to detect changes (from the reference HVAC performance) in the HVAC system. This task belongs to Phase II control charts.

After Phase I, the Phase II control charts based on functional data, also called monitoring phase, is performed. Therefore, the sample to be monitored comprises days corresponding to October in which the HVAC facilities of the apparel store were operated at regular times. This is in consideration of the fact that a leak in the air conditioning circuit was recorded in mid-October, especially after the HVAC consumption began to rise. This behavior can be observed in Figure **??**; it plots the monitored sample as well as the curves of the calibration sample and their 95% envelope, which is estimated in Phase I.

Figure **??** shows that the HVAC energy consumption, the CTQ variable for the energy efficiency of HVAC installations, is out of control. The assignable cause is the leak in the air conditioning system. In order to rectify the anomalous operation of the HVAC installations, on 1 November, a provisional repair was performed. These actions produced a decrease in the HVAC energy consumption and attenuated peak energy consumption corresponding to the start-up (see the energy consumption curves before 11:00). Consequently, the consumption of the HVAC facilities in November is slightly different from that of August and September, which account for the calibration sample. However, this energy consumption resumes its rise between 17 and 20 October.

These changes can be observed in Figure **??** wherein it is observed that the HVAC energy consumption corresponding to the monitored sample is characterized by a greater variability than that corresponding to the calibration or reference sample. The results of the application of the rank control chart show that the process is out-of-control both for the monitoring samples of October and November. In October, the assignable cause is the fault in HVAC facilities, whereas the assignable cause in November is the change in the process due to repair activities that deals on a decreasing in HVAC energy consumption.
