1.课题概述
基于仿射区间的分布式三相不对称配电网潮流算法matlab仿真。 基于仿射区间的,含分布式电源的配电网三相潮流算法,算法涉及仿射,三相,分布式电源注入等。
2.系统仿真结果
3.核心程序与模型
版本:MATLAB2022a
S0 = S;
k = 0;
Us = zeros(N,3,2*N+1+2*(Max_Iteration-1)*N);
TempUs = Us;
active = 2*N+1;
UsA = zeros(N,2*N+1+2*(Max_Iteration-1)*N);
TempUsA= UsA;
UsB = zeros(N,2*N+1+2*(Max_Iteration-1)*N);
TempUsB= UsB;
UsC = zeros(N,2*N+1+2*(Max_Iteration-1)*N);
TempUsC= UsC;
while k < Max_Iteration
k = k + 1;
%计算PI节点的Qk
if nPI > 0
QPI = [sqrt((DG(PINum,18)./I_base).^2.*abs(U(PIbus,2)).^2 - (DG(PINum,4)/P_base).^2),...
sqrt((DG(PINum,19)./I_base).^2.*abs(U(PIbus,3)).^2 - (DG(PINum,6)/P_base).^2),...
sqrt((DG(PINum,20)./I_base).^2.*abs(U(PIbus,4)).^2 - (DG(PINum,8)/P_base).^2)];
S(PIbus,2:4) = S0(PIbus,2:4) + QPI;
end
..................................................................
%考虑DG节点
if nPV > 0
UPVbus = U(PVbus,:);
DeltaUDG = [PVbus,real(UDG(:,2)-UPVbus(:,2)),real((UDG(:,3)-UPVbus(:,3))*exp(1i*2/3*pi)),real((UDG(:,4)-UPVbus(:,4))*exp(-1i*2/3*pi))];
DeltaQ = ZXinv*reshape(DeltaUDG(:,2:4)',size(Q,1)*size(Q,2),1);
%更新PV型DG的Q值
Q = Q + DeltaQ;
QMatr = reshape(Q,3,size(Q,1)*size(Q,2)/3)';
%检查 PV 节点的无功越界情况
for m = 1:nPV
for j = 1:3
if(QMatr(m,j) > DG(PVNum(m),10))
QMatr(m,j) = DG(PVNum(m),10);
elseif (QMatr(m,j) < DG(PVNum(m),11))
QMatr(m,j) = DG(PVNum(m),11);
end
end
end
Q = reshape(QMatr',size(Q,1)*size(Q,2),1);
end
end
A_infor(1,:)= maxreal1A(:);
A_infor(2,:)= -minreal1A(:);
A_infor(3,:)= maximag1A(:);
A_infor(4,:)= -minimag1A(:);
B_infor(1,:)= -maxreal1B(:);
B_infor(2,:)= minreal1B(:);
B_infor(3,:)= -maximag1B(:);
B_infor(4,:)= minimag1B(:);
C_infor(1,:)= -maxreal1C(:);
C_infor(2,:)= minreal1C(:);
C_infor(3,:)= maximag1C(:);
C_infor(4,:)= -minimag1C(:);
maxreal_phase1 = A_infor(1,:);
minreal_phase1 = A_infor(2,:);
maximag_phase1 = A_infor(3,:);
minimag_phase1 = A_infor(4,:);
maxreal_phase2 = B_infor(1,:);
minreal_phase2 = B_infor(2,:);
maximag_phase2 = B_infor(3,:);
minimag_phase2 = B_infor(4,:);
maxreal_phase3 = C_infor(1,:);
minreal_phase3 = C_infor(2,:);
maximag_phase3 = C_infor(3,:);
minimag_phase3 = C_infor(4,:);
%得到三相仿射的区间值
[V_abs_phase1,V_ang_phase1] = func_affine_result(maxreal_phase1,minreal_phase1,maximag_phase1,minimag_phase1,N);
[V_abs_phase2,V_ang_phase2] = func_affine_result(maxreal_phase2,minreal_phase2,maximag_phase2,minimag_phase2,N);
[V_abs_phase3,V_ang_phase3] = func_affine_result(maxreal_phase3,minreal_phase3,maximag_phase3,minimag_phase3,N);
figure;
subplot(321);
plot(V_abs_phase1(:,1),'b-s');
hold on;
plot(V_abs_phase1(:,2),'r-o');
hold on;
plot(mean(V_abs_phase1,2),'k');
hold off;
xlabel('节点数');
ylabel('幅度值');
title(['A Phase']);
legend('down bands','up bands','certain trend');
disp('A相幅度值');
V_abs_phase1
subplot(322);
plot(V_ang_phase1(:,1),'b-s');
hold on;
plot(V_ang_phase1(:,2),'r-o');
hold on;
plot(mean(V_ang_phase1,2),'k');
hold off;
xlabel('节点数');
ylabel('相位值');
title(['A Phase']);
legend('down bands','up bands','certain trend');
disp('A相相位值');
V_ang_phase1
subplot(323);
plot(V_abs_phase2(:,1),'b-s');
hold on;
plot(V_abs_phase2(:,2),'r-o');
hold on;
plot(mean(V_abs_phase2,2),'k');
hold off;
xlabel('节点数');
ylabel('幅度值');
title(['B Phase']);
legend('down bands','up bands','certain trend');
disp('B相幅度值');
V_abs_phase2
subplot(324);
plot(V_ang_phase2(:,1),'b-s');
hold on;
plot(V_ang_phase2(:,2),'r-o');
hold on;
plot(mean(V_ang_phase2,2),'k');
hold off;
xlabel('节点数');
ylabel('相位值');
title(['B Phase']);
legend('down bands','up bands','certain trend');
disp('B相相位值');
V_ang_phase2
subplot(325);
plot(V_abs_phase3(:,1),'b-s');
hold on;
plot(V_abs_phase3(:,2),'r-o');
hold on;
plot(mean(V_abs_phase3,2),'k');
hold off;
xlabel('节点数');
ylabel('幅度值');
title(['C Phase']);
legend('down bands','up bands','certain trend');
disp('C相幅度值');
V_abs_phase3
subplot(326);
plot(V_ang_phase3(:,1),'b-s');
hold on;
plot(V_ang_phase3(:,2),'r-o');
hold on;
plot(mean(V_ang_phase3,2),'k');
hold off;
xlabel('节点数');
ylabel('相位值');
title(['C Phase']);
legend('down bands','up bands','certain trend');
disp('C相相位值');
V_ang_phase3
fprintf(' 节点 A幅值下限 A幅值上限 B幅值下限 B幅值上限 C幅值下限 C幅值上限 A幅角下限 A幅角上限 B幅角下限 B幅角上限 C幅角下限 C幅角上限');
RR = [[1:33]',V_abs_phase1,V_abs_phase2,V_abs_phase3,V_ang_phase1,V_ang_phase2,V_ang_phase3]
%是否加入分布式电源的对比
load func\No_DG.mat
figure;
r1 = [a,abs(U(:,2))];
bar(r1);
axis([0,34,0.9,1]);
legend('不加DG','加DG');
title('A Phase');
figure;
r2 = [b,abs(U(:,3))];
bar(r2);
axis([0,34,0.9,1]);
legend('不加DG','加DG');
title('B Phase');
figure;
r3 = [c,abs(U(:,4))];
bar(r3);
axis([0,34,0.9,1]);
legend('不加DG','加DG');
title('C Phase');
fprintf('网损');
DeltaSL*1000*P_base
02_021m
- 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.
- 49.
- 50.
- 51.
- 52.
- 53.
- 54.
- 55.
- 56.
- 57.
- 58.
- 59.
- 60.
- 61.
- 62.
- 63.
- 64.
- 65.
- 66.
- 67.
- 68.
- 69.
- 70.
- 71.
- 72.
- 73.
- 74.
- 75.
- 76.
- 77.
- 78.
- 79.
- 80.
- 81.
- 82.
- 83.
- 84.
- 85.
- 86.
- 87.
- 88.
- 89.
- 90.
- 91.
- 92.
- 93.
- 94.
- 95.
- 96.
- 97.
- 98.
- 99.
- 100.
- 101.
- 102.
- 103.
- 104.
- 105.
- 106.
- 107.
- 108.
- 109.
- 110.
- 111.
- 112.
- 113.
- 114.
- 115.
- 116.
- 117.
- 118.
- 119.
- 120.
- 121.
- 122.
- 123.
- 124.
- 125.
- 126.
- 127.
- 128.
- 129.
- 130.
- 131.
- 132.
- 133.
- 134.
- 135.
- 136.
- 137.
- 138.
- 139.
- 140.
- 141.
- 142.
- 143.
- 144.
- 145.
- 146.
- 147.
- 148.
- 149.
- 150.
- 151.
- 152.
- 153.
- 154.
- 155.
- 156.
- 157.
- 158.
- 159.
- 160.
- 161.
- 162.
- 163.
- 164.
- 165.
- 166.
- 167.
- 168.
- 169.
- 170.
- 171.
- 172.
- 173.
- 174.
- 175.
- 176.
- 177.
- 178.
- 179.
- 180.
- 181.
- 182.
- 183.
- 184.
- 185.
- 186.
- 187.
- 188.
- 189.
4.系统原理简介
当只采用区间运算,得到的结果则有可能过于保守,而采用仿射运算后,本文方法能够得到更窄的不确定区域,从而得到更窄的区间。从如下的三个方面角度考虑:
a.基于区间算法的含分布式电源的配电网三相潮流算法,不过结果范围较大,过于保守。
b.基于仿射算法的含分布式电源的配电网三相潮流算法,其结果范围较小,效果较a更优。