MATLAB牛顿拉夫逊法算潮流分析.docMATLAB牛顿拉夫逊法算潮流分析ThefunctionofthisprogramistouseNewton,therafsonmethodThe%Blmatrix:1,thefirstbranchofthebranch;,terminal;Branchresistsnce;4,thecircuit(ortransformeradmittance);%5,thechangeofthebranch;ThebranchheadisattheKsideof1,1side0;The%7,line/transformerid(0/1)transformerparameteriscalculatedtotheendofthebranchwhentheendofthebranchisontheKside,0tothefirstend%B2matrix:1,powerofthenodegenerator;Theloadpowerofthenode:%3,PQnodevoltageinitialvalue,oragivenvalueofthebalaneenodeandPVnodevoltageTheconnectionofthecapacitor(inductance)oftheshuntcapacitance(inductance)isreceivedbythenode%5,nodeclassificationlabel:1isthebalaneenode(shouldbenumber1):2forthePQnode;3forPVnodes;Theclear;Isb=1;%input('pleaseenterthebalaneebusnodenumber:isb二');Pr=1e-5;%input('uracy:pr二');N二10;%input('pleaseenterthenumberofnodes:n二');Nl=10;%input');('pleaseenteranumberofdirections:nlBl1,0,[1,2,4,4,1,01,4,1,1,0,0,1,1,1,1,4,1,1,1,0,1,4,+-41100;2,3,+-4I1,0,0;4,5,+16i7eminus4i10;1,3,+-41100;6,4,+~4I1,0,0;7,+,,0,1;8,+,11/231,0,1;9,9,9,9,4,9,1,9,1,0,11,0,+]%input('pleaseenterthematrixformedbythebranchparameter:Bl二');B2isequalto0,0,,0,1;2200;2200;2200;2200;120,2313;0,,0,2;0,,0,2;0,,0,2;2)+%input('pleaseenterthematrixoftheparameterparametersofeachnode:B2二');%n二4;%input('pleaseenterthenumberofnodes:n二');%nl=4;%input('pleaseenteranumberofdirections:nl二’);%Blisequalto[1,2,4+16i0,0,0;%1,3,4+16i0,0,0;%2,3,2+8i0,0,0;%2,+4&02I0,11/110,1]%input('pleaseenterthematrixformedbythebranchparameter:Bl二');%B2isequalto[0,0,115,0,1;%0,0,110,0,2;%0,20+4i110,0,2;%0,10+6i1002]%input('pleaseinputthematrixoftheparametersofeachnode:B2二');Y二zeros(n);E二zeros(1,n);F=zeros(1,n):V二zeros(1,n);Sida二zeros(1,n);SI二zeros(nl);Theadmittancematrix——————————一For1=1:nl%from1tonlIfBl(I,7)二1%isononesideIfBl(I,6)二二0%left(thefirstend)P=Bl(I,1);Q=Bl(I,2);Theelse%leftnode(thefirs
MATLAB牛顿拉夫逊法算潮流分析 来自淘豆网m.daumloan.com转载请标明出处.