logo

Section 1. Loading and Exploring the Data

We use the ETT-small.csv dataset for our analysis.

The ETT dataset records information such as the temperature of the transformer (oil temperature) and the load.

library(readr)
data <- read_csv("data/ETT-small.csv")
## Rows: 17420 Columns: 8
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## dbl  (7): HUFL, HULL, MUFL, MULL, LUFL, LULL, OT
## dttm (1): date
## 
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
head(data)
## # A tibble: 6 × 8
##   date                 HUFL  HULL  MUFL  MULL  LUFL  LULL    OT
##   <dttm>              <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 2016-07-01 00:00:00  5.83  2.01  1.60 0.462  4.20  1.34  30.5
## 2 2016-07-01 01:00:00  5.69  2.08  1.49 0.426  4.14  1.37  27.8
## 3 2016-07-01 02:00:00  5.16  1.74  1.28 0.355  3.78  1.22  27.8
## 4 2016-07-01 03:00:00  5.09  1.94  1.28 0.391  3.81  1.28  25.0
## 5 2016-07-01 04:00:00  5.36  1.94  1.49 0.462  3.87  1.28  21.9
## 6 2016-07-01 05:00:00  5.63  2.14  1.53 0.533  4.05  1.37  21.2
summary(data)
##       date                          HUFL              HULL       
##  Min.   :2016-07-01 00:00:00   Min.   :-22.706   Min.   :-4.756  
##  1st Qu.:2016-12-29 10:45:00   1st Qu.:  5.827   1st Qu.: 0.737  
##  Median :2017-06-28 21:30:00   Median :  8.774   Median : 2.210  
##  Mean   :2017-06-28 21:30:00   Mean   :  7.375   Mean   : 2.242  
##  3rd Qu.:2017-12-27 08:15:00   3rd Qu.: 11.788   3rd Qu.: 3.684  
##  Max.   :2018-06-26 19:00:00   Max.   : 23.644   Max.   :10.114  
##       MUFL              MULL              LUFL             LULL        
##  Min.   :-25.088   Min.   :-5.9340   Min.   :-1.188   Min.   :-1.3710  
##  1st Qu.:  3.296   1st Qu.:-0.2840   1st Qu.: 2.315   1st Qu.: 0.6700  
##  Median :  5.970   Median : 0.9590   Median : 2.833   Median : 0.9750  
##  Mean   :  4.300   Mean   : 0.8816   Mean   : 3.066   Mean   : 0.8569  
##  3rd Qu.:  8.635   3rd Qu.: 2.2030   3rd Qu.: 3.625   3rd Qu.: 1.2180  
##  Max.   : 17.341   Max.   : 7.7470   Max.   : 8.498   Max.   : 3.0460  
##        OT        
##  Min.   :-4.080  
##  1st Qu.: 6.964  
##  Median :11.396  
##  Mean   :13.325  
##  3rd Qu.:18.079  
##  Max.   :46.007

Section 2. Data Preparation

2.1 Load libraries

library(prophet)
## Loading required package: Rcpp
## Loading required package: rlang
library(readr)
library(dplyr)
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union

2.2 Load data

data <- read_csv("data/ETT-small.csv")
## Rows: 17420 Columns: 8
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## dbl  (7): HUFL, HULL, MUFL, MULL, LUFL, LULL, OT
## dttm (1): date
## 
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.

2.3 Prepare data for Prophet

prophet_data <- data %>%
  select(ds = date, y = OT)

2.4 Build Prophet model

m <- prophet(prophet_data)
## Disabling yearly seasonality. Run prophet with yearly.seasonality=TRUE to override this.

2.5 Make future dataframe for prediction

future <- make_future_dataframe(m, periods = 100)

2.6 Predict

forecast <- predict(m, future)

2.7 Plot forecast

plot(m, forecast)

Section 3. Project Explanation

What ETT-small means in this project?

The ETT-small dataset records information such as transformer temperature (oil temperature) and load. It is commonly used for time series forecasting, especially playing an important role in monitoring energy systems and predicting the future performance of electrical transformers.

Project Purpose

The main goal of this project is to perform time series forecasting on the transformer’s oil temperature (OT) using the Facebook Prophet model. The purpose is to explore and predict temperature trends, which can better assist in achieving preventive maintenance, fault detection, and performance monitoring of electrical equipment.

Visualizations & Analysis

The chart is generated in this project to analyze the trend and seasonality of oil temperature over time. The Prophet model is selected due to its strong ability to handle time-series data with clear trends and seasonal effects.

Through observations from the charts, the following insights are obtained:

  • There are clear seasonal patterns in the oil temperature data.
  • Periodic fluctuations are observed, which are likely caused by external factors such as workload, ambient temperature, and operational cycles.

Conclusion

By modeling the OT variable from the ETT-small dataset, we can better understand the operating patterns of transformers. At the same time, this helps predict potential anomalies that may occur, thereby ensuring the stability and reliability of the system.