您好,欢迎访问三七文档
当前位置:首页 > 行业资料 > 能源与动力工程 > 电力系统分析大作业matlab三机九节点潮流计算报告
电力系统分析大作业一、设计题目本次设计题目选自课本第五章例5-8,美国西部联合电网WSCC系统的简化三机九节点系统,例题中已经给出了潮流结果,计算结果可以与之对照。取ε=0.00001。二、计算步骤第一步,为了方便编程,修改节点的序号,将平衡节点放在最后。如下图:第二步,这样得出的系统参数如下表所示:第三步,形成节点导纳矩阵。92132745683第四步,设定初值:01)0(6)0(5)0(4)0(3)0(2)0(1UUUUUU;0)0(8)0(7QQ,0)0(8)0(7。第五步,计算失配功率)0(1P=0,)0(2P=-1.25,)0(3P=-0.9,)0(4P=0,)0(5P=-1,)0(6P=0,)0(7P=1.63,)0(8P=0.85;)0(1Q=0.8614,)0(2Q=-0.2590,)0(3Q=-0.0420,)0(4Q=0.6275,)0(5Q=-0.1710,)0(6Q=0.7101。显然,5108614.0|},max{|iiQP。第六步,形成雅克比矩阵(阶数为14×14)第七步,解修正方程,得到:)0(1-0.0371,)0(2-0.0668,)0(3-0.0628,)0(40.0732,)0(50.0191,)0(60.0422,)0(70.1726,)0(80.0908;)0(1U0.0334,)0(2U0.0084,)0(3U0.0223,)0(4U0.0372,)0(5U0.0266,)0(6U0.0400。从而)1(1-0.0371,)1(2-0.0668,)1(3-0.0628,)1(40.0732,)1(50.0191,)1(60.0422,)1(70.1726,)1(80.0908;)1(1U1.0334,)1(1U1.0084,)1(1U1.0223,)1(1U1.0372,)1(1U1.0266,)1(1U1.0400。然后转入下一次迭代。经三次迭代后5510101845.0|},max{|iiQP。迭代过程中失配功率的变化情况如下表:k0123Δ=P10-0.01060.00010.0000000845Δ=P2-1.250.03790.00050.0000000896Δ=P3-0.90.04390.00050.0000000778Δ=P40-0.0421-0.0012-0.0000003421Δ=P5-10.0610.00090.0000001845Δ=P60-0.0269-0.0007-0.0000001631Δ=P71.63-0.0579-0.0004-0.0000000278Δ=P80.85-0.0336-0.0002-0.0000000103Δ=Q10.8614-0.0501-0.0004-0.0000000561Δ=Q2-0.259-0.0714-0.0012-0.0000002774Δ=Q3-0.042-0.0424-0.0006-0.0000001236Δ=Q40.6275-0.1875-0.0021-0.0000003279Δ=Q5-0.171-0.0241-0.0004-0.0000000805Δ=Q60.7101-0.0828-0.0007-0.0000000799max1.630.0610.00090.0000001845迭代过程中节点电压变化情况如下表:kU1U2U3U4U5U6011111111.03341.00841.02231.03721.02661.040021.02590.99581.01281.02591.01601.032431.02580.99561.01271.02581.01591.0324迭代收敛后各节点的电压和功率:kUθPQ11.0258-2.21680.00000.000020.9956-3.9888-1.2500-0.500031.0127-3.6874-0.9000-0.300041.02583.71970.00000.000051.01590.7275-1.0000-0.350061.03241.96670.00000.000071.02509.28001.63000.066581.02504.66480.8500-0.108691.04000.00000.71640.2705同课本上给出的潮流相比较,结果完全一致,证明计算过程与程序编写正确。最后得出迭代收敛后各支路的功率和功率损耗:ijPijQijIijPjiQjiIjiPLQL120.40940.22890.4572-0.4068-0.38690.56390.0026-0.1579130.30700.01030.2995-0.3054-0.16540.34300.0017-0.155124-0.8432-0.11310.85450.8662-0.08380.84840.0230-0.196936-0.5946-0.13460.60200.6082-0.18070.61460.0135-0.3153450.7638-0.00800.7447-0.7590-0.10700.75460.0048-0.1150三、源程序及注释由于计算流程比较简单,所以编写程序过程中没有采用模块化的形式,直接按顺序一步步进行。disp('【节点数:】');[n1]=xlsread('input.xls','A3:A3')%节点数disp('【支路数:】');[n]=xlsread('input.xls','B3:B3')%支路数disp('【精度:】');Accuracy=xlsread('input.xls','B4:B4')%精度[branch]=xlsread('input.xls','E4:K12');[node]=xlsread('input.xls','M4:S12');Data_B1=branch;%支路参数Data_B2=node;%节点参数T1=zeros(n,2);T2=zeros(n1,3);i=sqrt(-1);formatshortforj=1:nT1(j,1)=Data_B1(j,3)+Data_B1(j,4)*1i;T1(j,2)=Data_B1(j,5)*1i;endforj=1:n1T2(j,1)=Data_B2(j,1)+Data_B2(j,2)*1i;T2(j,2)=Data_B2(j,3)+Data_B2(j,4)*1i;endB1=zeros(n,6);B2=zeros(n1,5);forj=1:nB1(j,1)=Data_B1(j,1);B1(j,2)=Data_B1(j,2);B1(j,3)=T1(j,1);B1(j,4)=T1(j,2);B1(j,5)=Data_B1(j,6);B1(j,6)=Data_B1(j,7);endforj=1:n1B2(j,1)=T2(j,1);B2(j,2)=T2(j,2);B2(j,3)=Data_B2(j,5);56-0.2410-0.24300.33680.24180.03120.23620.0009-0.2118910.71640.27050.7363-0.7164-0.23920.73630.00000.0312741.63000.06651.5916-1.63000.09181.59160.00000.1583860.8500-0.10860.8360-0.85000.14960.83600.00000.0410B2(j,4)=Data_B2(j,6);B2(j,5)=Data_B2(j,7);enddisp('【支路参数矩阵:】');B1%显示支路参数矩阵disp('【节点参数矩阵:】');B2%显示节点参数矩阵%以上为从excel中导入初值的程序Y=zeros(n1);fori=1:nifB1(i,6)==0%不含变压器的支路p=B1(i,1);q=B1(i,2);Y(p,q)=Y(p,q)-1/B1(i,3);Y(q,p)=Y(p,q);Y(p,p)=Y(p,p)+1/B1(i,3)+0.5*B1(i,4);Y(q,q)=Y(q,q)+1/B1(i,3)+0.5*B1(i,4);else%含有变压器的支路p=B1(i,1);q=B1(i,2);Y(p,q)=Y(p,q)-1/(B1(i,3)*B1(i,5));Y(q,p)=Y(p,q);Y(p,p)=Y(p,p)+1/B1(i,3);Y(q,q)=Y(q,q)+1/(B1(i,5)^2*B1(i,3));endenddisp('【导纳矩阵:】');Y%显示导纳矩阵m=0;fori=1:n1ifB2(i,5)==2m=m+1;endendm%PQ节点个数l=0;fori=1:n1ifB2(i,5)==1l=l+1;endendl%PV节点个数Mismatch_power=zeros(l+m*2,1);fori=1:n1-1Pj=0;forj=1:n1Pj=Pj+(B2(i,3)*B2(j,3)*(real(Y(i,j))*cos(B2(i,4)-B2(j,4))+imag(Y(i,j))*sin(B2(i,4)-B2(j,4))));endMismatch_power(i,1)=real(B2(i,1))-real(B2(i,2))-Pj;endfork=n1:(l+m*2)Qj=0;forj=1:n1Qj=Qj+B2((k-n1+1),3)*B2(j,3)*(real(Y((k-n1+1),j))*sin(B2((k-n1+1),4)-B2(j,4))-imag(Y((k-n1+1),j))*cos(B2((k-n1+1),4)-B2(j,4)));endMismatch_power(k,1)=imag(B2((k-n1+1),1))-imag(B2((k-n1+1),2))-Qj;end%Mismatch_power%计算失配功率times=0;while(max(Mismatch_power)Accuracy)fori=1:(n1-1)Pj=0;forj=1:n1Pj=Pj+B2(i,3)*B2(j,3)*(real(Y(i,j))*cos(B2(i,4)-B2(j,4))+imag(Y(i,j))*sin(B2(i,4)-B2(j,4)));endMismatch_power(i,1)=real(B2(i,1))-real(B2(i,2))-Pj;endfork=n1:(l+m*2)Qj=0;forj=1:n1Qj=Qj+B2((k-n1+1),3)*B2(j,3)*(real(Y((k-n1+1),j))*sin(B2((k-n1+1),4)-B2(j,4))-imag(Y((k-n1+1),j))*cos(B2((k-n1+1),4)-B2(j,4)));endMismatch_power(k,1)=imag(B2((k-n1+1),1))-imag(B2((k-n1+1),2))-Qj;enddisp('【当前迭代次数:】');timesdisp('【失配功率:】');Mismatch_powerJacobian=zeros(l+m*2);%雅克比矩阵7*7%————————————————————————————————————Hfori=1:(n1-1)forj=1:(n1-1)ifi==jP_H=0;fork=1:n1P_H=P_H+B2(i,3)*B2(k,3)*(real(Y(i,k))*sin(B2(i,4)-B2(k,4))-imag(Y(i,k))*cos(B2(i,4)-B2(k,4)));endJacobian(i,i)=P_H-B2(i,3)*B2(i,3)*(0-imag(Y(i,i)));elseJacobian(i,j)=0-B2(i,3)*B2(j,3)*(real(Y(i,
本文标题:电力系统分析大作业matlab三机九节点潮流计算报告
链接地址:https://www.777doc.com/doc-4818736 .html