目录
1 主要内容
2 部分代码
3 程序结果
4 下载链接
1 主要内容
程序以IEEE33节点为例,分析含sop的配电网优化,包括sop有功约束、无功约束和容量约束,非线性部分通过转换为旋转锥约束进行编程,并且包括33节点配电网潮流及对应电压、电流约束、OLTC约束等,程序是对《Coordinated Control Method of Voltage and Reactive Power for Active Distribution Networks Based on Soft Open Point》方法实现,里面还有更深一些的知识,包括OLTC和CB等部分内容,具体sop部分和文献《考虑分布式电源运行特性的有源配电网智能软开关sop规划方法》一致。
2 部分代码
%% 定义约束条件 Constraints=[]; %% SOP有功功率限制 (1) Constraints=[Constraints,x_p_sop1(1,:)+x_p_sop1(2,:)+x_p_sop1_loss(1,:)+...x_p_sop1_loss(2,:)==0]; Constraints=[Constraints,x_p_sop2(1,:)+x_p_sop2(2,:)+...x_p_sop2_loss(1,:)+x_p_sop2_loss(2,:)==0]; %% CBs操作限制(27、29) 33 Constraints=[Constraints,Q_CB==N_CB*q_CB]; Constraints=[Constraints,N_CB<=5]; Constraints=[Constraints,N_CB>=0]; %% 有功功率损耗(33) f_loss1=sum(r_ij'*x_Iij_square)*delta_T; Constraints=[Constraints,x_ui_square(1,:)==12.66^2]; %平衡节点每小时电压平方 f_loss2=sum(x_p_sop1_loss)*delta_T; f_loss3=sum(x_p_sop2_loss)*delta_T;Constraints=[Constraints,x_Iij_square>=0]; %% sop运行约束%(40,41)Constraints=[Constraints,0.02*sqrt(x_p_sop1(1,:).^2+x_q_sop1(1,:).^2)<=...x_p_sop1_loss(1,:)];%Constraints=[Constraints,(x_p_sop1(2,opt_num)^2+x_q_sop1(2,opt_num)^2)<=...% 2*(x_p_sop1_loss(2,opt_num)/(sqrt(2)*0.02))*(x_p_sop1_loss(2,opt_num)/(sqrt(2)* 0.02))];Constraints=[Constraints,0.02*sqrt(x_p_sop1(2,:).^2+x_q_sop1(2,:).^2)<=...x_p_sop1_loss(2,:)]; % Constraints=[Constraints,x_p_sop1(1,opt_num)+x_p_sop1(2,opt_num)==0]; Constraints=[Constraints,0.02*sqrt(x_p_sop2(1,:).^2+x_q_sop2(1,:).^2)<=...x_p_sop2_loss(1,:)];Constraints=[Constraints,0.02*sqrt(x_p_sop2(2,:).^2+x_q_sop2(2,:).^2)<=...x_p_sop2_loss(2,:)]; % Constraints=[Constraints,x_p_sop2(1,opt_num)+x_p_sop2(2,opt_num)==0];
程序代码标注了和文献公式的对应性,方便学习!