Case Study: Electrical Load Prediction using MATLAB (ENEL890AO)

Verified

Added on  2023/06/10

|8
|797
|125
Case Study
AI Summary
This case study focuses on predicting electrical load using computational methods in electrical engineering. The assignment involves processing raw temperature and demand data from Duquense Light and Pittsburgh weather sources. The solution, developed in MATLAB, includes loading, cleaning, and synchronizing data, specifically addressing the alignment of timestamps between demand and weather files. The analysis computes maximum demand and temperature for each day, and incorporates other features such as dewpoint, humidity, pressure, and wind speed. The MATLAB code performs data interpolation, feature extraction, and graphical visualizations to illustrate relationships between variables like temperature and demand. The case study demonstrates the practical application of data preprocessing techniques and feature engineering in the context of electrical load prediction, providing a comprehensive solution to the problem.
Document Page
2018
INSTITUTIONAL AFFILIATION
ENEL890AO
COMPUTATIONAL METHODS IN ELECTRICAL ENGINEERING
CASE STUDY I
ELECTRICAL LOAD PREDICTION
STUDENT NAME
STUDENT ID NUMBER
PROFESSOR (TUTOR)
DATE OF SUBMISSION
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Preliminary Part...............................................................................................................................1
STEP 1: Loading and cleaning up the Data.................................................................................1
STEP 2: synchronize the timestamp............................................................................................1
STEP 3: MAXIMUM DEMAND AND MAXIMUM TEMPERATURE FOR EACH DAY....1
STEP 4: COMPUTATION OF OTHER FEATURES................................................................2
Preliminary Part
... Matlab optimization
clear
close all
clc
STEP 1: Loading and cleaning up the Data
load('inputs761030\weather.mat');
load('inputs761030\windspeed.mat');
load('inputs761030\conditions.mat');
load('inputs761030\UTCtimestamp.mat');
load('inputs761030\temperature.mat');
load('inputs761030\pressure.mat');
load('inputs761030\humidity.mat');
load('inputs761030\dewpoint.mat');
load('inputs761030\demandtimestamp.mat');
load('inputs761030\demand.mat');
load('inputs761030\demandData.mat');
STEP 2: synchronize the timestamp
% Demand and Weather files do not match up, they need to correspond
New_Match=interp1(weather,demand,'linear');
STEP 3: MAXIMUM DEMAND AND MAXIMUM TEMPERATURE FOR EACH
DAY
year 2008
%calling the converter function
tz=0;
t1=New_Match(:,1);
dv_weather=utc_to_datevec(t1, tz);
Document Page
% Defining the UTC timestamp as year, month, day, hour, minutes, second
% yr=dv_weather(:,1);
% month=dv_weather(:,2);
% day=dv_weather(:,3);
% hour=dv_weather(:,4);
% min=dv_weather(:,5);
% sec=dv_weather(:,6);
new_Temp=New_Match(:,2);
figure(1)
plot(demand,new_Temp,'b*','LineWidth',1);
hold on
xlabel('Timestamp (YY-MM-DD-HR-MN-Sec)');
ylabel('Temperature Vs. Demand');
title('Plot of Maximum Temperature vs Demand');
grid on
indexmax=find(max(new_Temp)==new_Temp);
xmax=demand(indexmax);
ymax=new_Temp(indexmax);
% indicating on the plot
strmax = ['Maximum = ',num2str(ymax)];
text(xmax,ymax,strmax,'HorizontalAlignment','right');
Document Page
STEP 4: COMPUTATION OF OTHER FEATURES
new_dp=New_Match(:,3);
new_humidity=New_Match(:,4);
new_pressure=New_Match(:,5);
new_wspd=New_Match(:,6);
new_cndtn=New_Match(:,7);
%part ii
figure(3)
xmean=mean(t1);
ymean=mean(new_dp);
grid on
% indicating on the plot
scatter(t1, new_pressure,'+');
hold on
plot(xmean,ymean,'+r','LineWidth',3);
stravg = ['Average = ',num2str(ymean)];
text(xmean,ymean,stravg,'HorizontalAlignment','right');
hold off
grid on
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
%part iii
%graphical illustrations of the minimum and average values
% finding the regression factor
I=abs(new_humidity)>1.5*std(new_humidity);
outliers=excludedata(xmax,ymax,'indices',I);
figure(4)
xmean=mean(t1);
ymean=mean(new_humidity);
grid on
% indicating on the plot
scatter(t1, new_humidity,'g')
hold on
plot(xmean,ymean,'+r','LineWidth',3)
stravg = ['Average = ',num2str(ymean)];
text(xmean,ymean,stravg,'HorizontalAlignment','right');
hold off
grid on
% part iv
%graphical illustrations of the minimum and average values
% finding the regression factor
figure(5)
xmean=mean(t1);
ymean=mean(new_pressure);
grid on
% indicating on the plot
scatter(t1, new_pressure,'o');
hold on
plot(xmean,ymean,'+r','LineWidth',3)
stravg = ['Average = ',num2str(ymean)];
text(xmean,ymean,stravg,'HorizontalAlignment','right');
hold off
grid on
%part v
figure(6)
xmean=mean(t1);
ymean=mean(new_wspd);
grid on
% indicating on the plot
scatter(t1, new_wspd,'*','LineWidth',0.5);
hold on
Document Page
plot(xmean,ymean,'+r','LineWidth',3);
stravg = ['Average = ',num2str(ymean)];
text(xmean,ymean,stravg,'HorizontalAlignment','right');
hold off
grid on
Document Page
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
chevron_up_icon
1 out of 8
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]