资源地址:
29考虑特性分布的储能电站接入的电网多时间尺度源储荷协调调度策略MATLAB程序-日前日内实时+需求响应+协调调度-Matlab文档类资源-CSDN文库
参考文献:
考虑特性分布的储能电站接入的电网多时间尺度源储荷协调调度策略——金力
主要内容:
综合考虑抽水蓄能和电化学储能电站时间特性和DR资源的多时间尺度特性,对 2 种储能电站的出力特性进行分析,实现了日前调度计划的制定,并通过日内滚动与实时修正对新能源预测与负荷预测的不确定性 进行一定程度的抑制。程序注释全面!入门学习的不二选择!考虑弃风弃光等因素,参数细节与论文有细微差距,程序完美运行。
部分程序:
%潮流约束
baseMVA = 100;
bus = caseName.bus;
brch = caseName.branch;
f = brch(:,1);
t = brch(:,2);
x = brch(:,4);
nbus = size(bus,1);
nbrch = size(brch,1);
Cft = zeros(nbrch,nbus);
for ii=1:nbrch
Cft(ii,f(ii)) = 1;
Cft(ii, t(ii)) = -1;
end
Bf = zeros(nbrch,nbus);
for ii=1:nbrch
Bf(ii,f(ii)) = 1./x(ii);
Bf(ii,t(ii)) = -1./x(ii);
end
Bbus = Cft.' * Bf;
%% 生成Pbus
Mbg = getMbgMatrix(idg',bus);
Mbe = getMbdMatrix(ie,bus);
Mbw = getMbdMatrix(iw,bus);
Mbs = getMbdMatrix(is,bus);
Pbusone = [];
for ii = 1:T
Pbusone = [Pbusone, Mbg * Pgone(:,ii) + Mbs * Psone(1,ii) + Mbe * Perssone(1,ii) + ...
Mbw * Pwone(1,ii) - pload1(:,ii) - Ppdrone(:,ii) - Pidraone(:,ii) - Pidrbone(:,ii)-plossone(:,ii)];
end
%% 潮流平衡约束,弧度制,有名值
for ii = 1:T
con = [con, Pbusone(:,ii) == Bbus * thetaone(:,ii).*baseMVA];
end
%场景2
Pbustwo = [];
for ii = 1:T
Pbustwo = [Pbustwo, Mbg * Pgtwo(:,ii) + Mbs * Pstwo(1,ii) + Mbe * Persstwo(1,ii) + ...
Mbw * Pwtwo(1,ii) - pload1(:,ii) - Ppdrtwo(:,ii) - Pidratwo(:,ii) - Pidrbtwo(:,ii)-plosstwo(:,ii)];
end
%% 潮流平衡约束,弧度制,有名值
for ii = 1:T
con = [con, Pbustwo(:,ii) == Bbus * thetatwo(:,ii).*baseMVA];
end
%潮流约束
for j=1:T
d_thetaone(j,:) = thetaone(f,j) - thetaone(t,j);
pfone = d_thetaone(j,:)' ./ x .* baseMVA;
con = [con, -500 <= pfone <=500];
end
%场景2约束
for j=1:T
d_thetatwo(j,:) = thetatwo(f,j) - thetatwo(t,j);
pftwo = d_thetatwo(j,:)' ./ x .* baseMVA;
con = [con, -500 <= pftwo <=500];
end
con = [con,-pi <= thetaone <= pi,-pi <= thetatwo <= pi];
%DR约束
con=[con,-0.1.*pload1<=Ppdrone<=0.1.*pload1,sum(Ppdrone,2)==0];
con=[con,-0.1.*pload1<=Ppdrtwo<=0.1.*pload1,sum(Ppdrtwo,2)==0];
con=[con,-0.05.*pload1<=Pidraone+Pidrbone<=0.05.*pload1,-0.05.*pload1<=Pidrbone<=0.05.*pload1,-0.05.*pload1<=Pidraone<=0.05.*pload1,sum(Pidraone+Pidrbone,2)==0];
con=[con,-0.05.*pload1<=Pidratwo+Pidrbtwo<=0.05.*pload1,-0.05.*pload1<=Pidratwo<=0.05.*pload1,-0.05.*pload1<=Pidrbtwo<=0.05.*pload1,sum(Pidratwo+Pidrbtwo,2)==0];
%电储能约束
con=[con,Pech.*uerssone<=Perssone<=Pedis.*uerssone];
for i=1:T
con=[con,Se*socmin<=Se0+sum(Perssone(:,1:i),2)<=Se*socmax];
end
%场景2
con=[con,Pech.*uersstwo<=Persstwo<=Pedis.*uersstwo];
for i=1:T
con=[con,Se*socmin<=Se0+sum(Persstwo(:,1:i),2)<=Se*socmax];
end
%抽水蓄能
con=[con,Pwmin<=Psone<=Pwmax];
for i=1:T
con=[con,Vpmin<=Vs0+sum(Psone(:,1:i),2)<=Vpmax];
end
%场景2
con=[con,Pwmin<=Pstwo<=Pwmax];
for i=1:T
con=[con,Vpmin<=Vs0+sum(Pstwo(:,1:i),2)<=Vpmax];
end
运行结果: