# A Robust Conformal Framework for IoT-Based Predictive Maintenance
## 2 Time Series Analysis in Predictive Maintenance  
At the juncture between AI and IoT in the field of PdM, the data ensemble is the pivotal starting point in PdM data modeling by integrating historical and real-time data to form a rich dataset that underpins the PdM strategy. Through the meticulous data workflow presented in Figure 2, the IoT platforms offer sophisticated data processing techniques to synchronize and merge data flowing from multiple machines. Additionally, the platform ensures the applicability of AI models, which can access all necessary information for accurate prediction. Figure 2: Data workflow in real-time IoT environment: sensors, ingestion, and data processing. Through this comprehensive data structure, the development of predictive models that can accurately forecast potential machine failures using a time series analysis framework empowers organizations to make timely and informed maintenance decisions. The last critical data processing step is transforming raw time series data into a format suitable for predictive analysis. The primary techniques utilized in this context are sliding windows and lagged variables. The sliding window technique processes time series data by employing a fixed-size window that traverses the data points sequentially, capturing contiguous subsets of the original series. Mathematically, given a time series \(X=\{x_{1},x_{2},\ldots,x_{n}\}\) and a window size \(w\), the subsets analyzed are presented in the following equations. \[(x_{i},x_{i+1},\ldots,x_{i+w-1}),\quad\text{for each $i=1,\ldots,n-w+1$} \tag{1}\]  
The choice of window size is critical since a too-small window might miss significant trends. In contrast, a window that is too large could oversmooth essential data fluctuations, so it should be adequately regulated by the previous correlation analysis. Similar to the sliding window, the lagged variables approach is also particularly practical in capturing the temporal dynamics. It works by shifting the time series backward by one or more periods, making it suitable for those predictive models that do not operate with a three-dimensional data batch structure. The process is mathematically described as:  
\[X_{t-\text{shift}}=\{x_{i-\text{shift }}|\ i=1,\ldots,n\} \tag{2}\]  
where shift is the number of periods the data is moved backward. This technique emphasizes shifting data feature-wise, offering an alternative to the three-dimensional data structure typically formed by the batches in the sliding window approach. Focusing on the PdM practices, the main aim of this research is to predict the RUL with its progressive failure process. However, one principal peculiarity regarding PdM practices is the absence of a specific target value, as highlighted by [24]. Their work emphasizes that degradation modeling always relies on inferring the target variable from historical data rather than having explicit labels for failure events. Health prognostics is one of the core tasks in CBM, which aims to predict the RUL of machinery based on the historical and ongoing degradation trends observed through condition monitoring information [25; 26; 27]. In machinery, a prognostic program generally consists of four technical processes, i.e., data acquisition, health indicator (HI) construction, health stage (HS) division, and RUL prediction. It is crucial in PdM to model the target variable (e.g., RUL or degradation state), as this forms the foundation for training predictive models and establishing CI around the predictions. Among the various techniques of RUL extraction, linear modeling is often used in the early stages of RUL estimation, where degradation trends are generally used in simple linear assumptions. This linear degradation modeling can be refined through survival analysis, which provides a probabilistic framework for estimating the time until failure, defining an early RUL value, and then truncating the linear RUL value, defining \"in-control regions\".