目录
一、研究背景
用电峰谷时期的电量供需不平衡状态在目前仍是一项十分严峻的问题。随着智能电网构建的推进,近年来智能量测终端大量投入使用,中国**计划“十三五”期间全国范围内安装2.3 亿块智能电表,用户的用电数据得以实时采集,反映更多的用户用电规律,这为了解用户的用电特性,提高负荷预测精 度、识别用户用电模式、评估需求响应潜力、指导电价制定等提供了基础。
二、研究方法:
聚类分析作为一种被广泛应用的数据挖掘算法,逐步应用到智能用电领域。在数据挖掘中,海量数据的有效聚类分析是重要 的研究内容,通过对用户负荷数据的分析,可识别用 户用电模式,为用户调节潜力的分析提供依据。用户 用电行为的变化受到诸多因素的影响,本文基于实际 的负荷数据对电力用户进行聚类分析,将负荷曲线特 性相似的分为同一类,相异的分为不同类,对用户的 用电行为进行分析。本文以k-means聚类算法为例对光伏出力场景进行分析。
三、算例分析
数据:蒙特卡洛法随机生成的
四、源程序(主函数)
clc;clear all;
filename = '光伏出力.xlsx';
SS= xlsread(filename);
k=size(SS,1);
max_b=max(SS,[],2);
min_b=min(SS,[],2);
for h=1:1:k
a(h,1)=sum(SS(h,:))/(max_b(h)*24);
end
for i=[1:1:size(SS,1)]
for j=[1:1:24]
one_b(i,j)=SS(i,j)/max_b(i);
end
end
SampleData = one_b;
cluster_num=6;
data=SampleData;
[index_cluster,cluster] = kmeans_func(data,cluster_num);
figure(1)
for ii=1:1:k
if index_cluster(1,ii)==1
plot(1:24,data(ii,:),'color',[0.5 0.5 0.5],'LineWidth',2)
hold on
end
end
plot(1:24,cluster(1,:),'r','LineWidth',2)
figure(2)
for ii=1:1:k
if index_cluster(1,ii)==2
plot(1:24,data(ii,:),'color',[0.5 0.5 0.5],'LineWidth',2)
hold on
end
end
plot(1:24,cluster(2,:),'r','LineWidth',2)
figure(3)
for ii=1:1:k
if index_cluster(1,ii)==3
plot(1:24,data(ii,:),'color',[0.5 0.5 0.5],'LineWidth',2)
hold on
end
end
plot(1:24,cluster(3,:),'r','LineWidth',2)
figure(4)
for ii=1:1:k
if index_cluster(1,ii)==4
plot(1:24,data(ii,:),'color',[0.5 0.5 0.5],'LineWidth',2)
hold on
end
end
plot(1:24,cluster(4,:),'r','LineWidth',2)
figure(5)
for ii=1:1:k
if index_cluster(1,ii)==5
plot(1:24,data(ii,:),'color',[0.5 0.5 0.5],'LineWidth',2)
hold on
end
end
plot(1:24,cluster(5,:),'r','LineWidth',2)
figure(6)
for ii=1:1:k
if index_cluster(1,ii)==6
plot(1:24,data(ii,:),'color',[0.5 0.5 0.5],'LineWidth',2)
hold on
end
end
plot(1:24,cluster(6,:),'r','LineWidth',2)
五、运行结果
本文内容来源于网络,仅供参考学习,如内容、图片有任何版权问题,请联系处理,24小时内删除。