File size: 2,037 Bytes
b2dda40
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
---
title: SARIMAX Model for Energy Consumption Prediction
description: >-
  This model predicts energy consumption based on meteorological data and
  historical usage.
license: gpl
---
# SARIMAX Model for Energy Consumption Prediction

## Description
This SARIMAX model predicts energy consumption over a 48-hour period based on meteorological data and historical energy usage from 2021 to 2023. It utilizes time series data from a transformer station and incorporates both time-based and weather-related variables to enhance prediction accuracy.

## Model Details
**Model Type:** SARIMAX (Seasonal ARIMA with exogenous variables)  
**Data Period:** 2021-2023  
**Variables Used:**
- `Lastgang`: Energy consumption data
- `StundenwertStrahlung`: Hourly radiation
- `Globalstrahlung_15Min`: Global radiation every 15 minutes
- `StrahlungGeneigteFläche`: Radiation on inclined surfaces
- `TheorPVProd`: Theoretical photovoltaic production
- `Direktnormalstrahlung`: Direct normal radiation
- `Schönwetterstrahlung`: Clear sky radiation
- `Lufttemperatur`: Air temperature
- `Lastgang_Moving_Average`: Moving average of energy consumption
- `Lastgang_First_Difference`: First difference of energy consumption

## Features
The model splits the data into training and testing sets, with the last 192 data points (equivalent to 48 hours at 15-minute intervals) designated as the test dataset. It defines target variables (`Lastgang`) and explanatory variables including hourly and daily patterns as well as derived features from the consumption data. The dataset includes preprocessed features such as scaled energy consumption (`Lastgang`), and weather-related features.

## Installation and Execution
To run this model, you need Python along with the following libraries:
- `pandas`
- `numpy`
- `matplotlib`
- `statsmodels`
- `scikit-learn`
- `pmdarima`
- `psutil`

### Steps to Execute the Model:
1. **Install Required Packages**

2. **Load your Data**

3.  **Preprocess the data according to the specifications**

4.  **Run the Script**