南昌大学电力系统学科导论(双语)指导书.pdf
Laboratory:Electric Power System and Its AutomationThe Guide of ExperimentIntroduction to powersystemsInformation Engineering SchoolNanchang UniversitySep.2010CONTENTSEXPERIMENT 1Bus ADMITTANCE MATRIX.1/.Objective.12.Discussion.13.Mathmatics model.24.System Requirement.35.Procedure.46.Exercises.47.The flow chart.6EXPERIMENT 2.12Bus IMPEDANCE MATRIX.12I.Objective.122.Discussion.12Zbus CALCULATION.13CASE 1:Adding zb from a new bus p to the reference bus 0.14CASE 2:Adding zb from a new bus p to an existing bus k.14CASE 3:Adding zb from an existing bus k to the reference bus 0.15CASE 4:Adding zb from two existing buses j and k.16Comments on the algorithm.183.System Requirement.194.Procedure.795.Mathmatics model.196.Exercises.20Example 120Example 2.20EXPERIMENT 3.25SHORTCIRCUETCALCULATIONS WITH BUS IMPEDANCE MATRIX.251.Objective.252.Discussion.253.Mathmatics model.254.System Requirement.255.Procedure.256.Exercises.25EXAMPLE 3.27MATRIX METHODS FOR NETWORK SOLUTIONS.27EXAMPLE 3.8.30EXPERIMENT 4.39GAUSS-SEIDEL POWER FLOW.39/.Objective.392.Discussion.393.Mathmatics model.394.Gauss-Seidel Power Flow Solution.405.Line Flows and Losses.426.System Requirement.437.Procedure.438.Exercises.449.The flow chart of Gauss Seidel Power Flow(Quitted).449.Reference Progrom.45Experiment 1Bus Admittance MatrixEXPERIMENT 5.48NEWTON-RAPHSION POWER FLOW.481.Objective.482,Discussion.483.Mathmatics model.484.Newton-Raphsion Power Flow Solution.495.Line Flows and Losses.526.System Requirement.527.Procedure.528.Exercises.539.The flow chart of Newton Raphsion solution(Ommited).5410.Reference program.55EXPERIMENT 6.58FAST DECOUPLED POWER FLOW.581.Objective.582.Discussion.583.Mathmatics model.584.Fast Decoupled Fbwer Flow Solution.595.Line Flows and Losses.616.System Requirement.627.Procedure.628.Exercises.639.The flow chart of Fast Decoupled Power Flow(Omitted).6310.Reference Program.70APPENDIX 1 THE IMPEDANCE MATRIX ZBUS.72APPENDIX 2 YBUS MODIFICATIONS.84APPENDIX 3 MATRIX INVERSION LEMMA(矩阵求逆引理).85Experiment 1Hour:4Bus Admittance Matrix1.Objective To write a simple program in MATLAB for the algorithm of bus admittance matrix.2.DiscussionBus Admittance matrixThe node-voltage equation of an n-bus power system can be written in matrix form asOr(1)b u s=Ybu8VM8Where I is the column vector of the injected bus currents.V is the column vector ofbus busbus voltages measured from the reference node.Ybus is known as the bus admittancematrix.Calculation method:1.The diagonal element of each node is the sum of admittances connected to it.It isknown as the self-admittance or driving point admittance,i.e.,Page I Total 103Experiment 1Bus Admittance Matrix2.The off-diagonal element is equal to the negative of the admittance between thenodes.It is known as the mutual admittance or transfer admittance,i.e.4=3 (4Result:Base on the equations(3)and(4),the algorithm of bus admittance matrix can be usedto build the bus admittance matrix(Y).3.Mathmatics modelThe mathematics models of power system elements are two kinds,one istransmission line or cable and another is transformer,and they are equivalent into pitype equivalent circuit,and described as following:1)Transmission line or cableAccording to the Pi sectional circuit of transmission line or cable,we can get theelements of nodal Admittance matrix value,as the following&+jxFigure:The pi section equivalent circuit of transmission line or cable(6)网2)transformerZTThe Guide of Experiment of Short Circuit CalculationInformation Engineering SchoolAs show as the transformer circuit,we havey、匕k(9)/,=-M (10)According to equations(10)and(9),we have/y=(V -A:v,.)=V +(V -V,.)-V =+(v.-V,)J 7、)“7 J 1 7 J 7 J 7、,K2Z9=%+K“-KnZTl KZe(12)Assume YTZ/R)+jx uY=Y+(13)(14)(15)(16)=%4.System RequirementComputer with MATLAB 6 or above installed.Page 3 Total 103Experiment 1Bus Admittance Matrix5.Procedure1.0 Launch the MATLAB program.Figure 12.0 Go to FILE NEW M-file.Figure 23.0 Write a function Y=The_Node_Admittance_Matrix(T opostruct ureAndBranchPara)for theformation of the bus admittance matrix.4.0 TopostructureA ndBranchPara is the transmission line,cable and transformerinput data and contains five columns parameters.The first two columns are theline bus numbers and the remaining columns contain the line resistance andreactance in per-unit and transformer tap ratio or capacitor of transmission line.5.0 The function should return the bus admittance matrix.6.ExercisesUse the written function,Y=The_Node_Admittance_Matrix(TopostructureAndBranchPara)to obtain the Ybus of the following power system network:Q1.You are required to write the Ybus topological structure and parameter into a textfile.(Hint:use the matlab text compiler to write down the table 1 data,using thecomma to separate the parameters,and save it use the name of4_Power_System_Data.dbf)Q2.You are required to write out the program flow figure of forming a nodaladmittance matrix.Hint.You are required to compile a program to form the Ybus Matrix,the following值A工 在 后 优Information Engineering SchoolThe Guide of Experiment of Short Circuit Calculationprogram is a reference program to you.Figure:One-line diagram of power systemFor example,from the textbook“power system analysis No.2 edition 3 on page 61-62Table 1:Transformer and transmissssion Line dataFrom Bus#To Bus#R(p.u)X(p.u)B(p.u)or ratio KOthers120.10.4j0.015281300.31.1140.120.5j0.01920240.080.40J0.01413Page 5 Total 103Experiment 1Bus Admittance Matrix7.The flow chartFigure:The flow chart of Forming Nodal Admittance Matrix6 台 J /Information Engineering SchoolThe Guide of Experiment of Short Circuit Calculation-Reference 1%fu n ctio n OutPut=The_Node_Adinittance_Matrix(handles)%is a subroutine o f Pow erSystem CaIculationfu n ctio n OutPut=The_Node_Admittance_Matrix(handles)%the fo llo w in g program is open a data f i l e and get the Number o f%Node and Branch data to form a nodal addm ittance m atrix省the fo llo w in g code is open a f i l e and read the data o f power systemnetworkfnamepname=u ig e tfile(*.d b ff S e le c t the network param etred a ta-fileT);TopoSt ruetureAndBranchPara=csvread(fnam e);NumberOfBranchf NumberOfPara=size(TopoStructureAndBranchPara);Temporary1=max(TopoStructureAndBranchPara(:,1);Temporary2=max(TopoStructureAndBranchPara(:f 2);i f Temporaryl Temporary2NumberOfNode=Temporaryl;e lseNumber0fNode=Temporary2;end%The fo llo w in g program is to form the Nodal Adm ittance M atrix%and the Topologic stru c tu re and Branch Parametres are arranged%I,JfR,Xf C/Kf and pay a tte n tio n to the inpedence o f transform er is inthe%sid e o f Node J and the r a tio o f transform er 1:K is in the sid e o f NodeIfo r Ci r d eNumber1=1:NumberOfBranchfo r CircleNumber2=l:NumberOfBranchN odalAdm ittanceM atrix(Ci r d eNumber 1,Ci r d eNumber2)=0;endendfo r CircleNum ber=l:NumberOfBranchi f TopoStructureAndBranchPara(CircleNumber,5)0.85NodalAdm ittanceM atrix(TopoStructureAndBranchPara(TopoStructureAndBranchPara(Ci rdeN um ber,1)f TopoStructureAndBranchPara(CircleNumberf1)=.NodalAdm ittanceM atrix(TopoStructureAndBranchPara(TopoStructureAndBranchPara(Ci r d eNumber,1)f TopoStructureAndBranchPara(CircleNumberf1)+TopoStruct ureAndBranchPara(Ci r d eNumberf 5)八2/.(TopoStructureAndBranchPara(CircleNumberf3)+.j TopoSt ructureAndBranchPara(Ci r d eNumber f 4);Page 7 Total 103Experiment 1Bus Admittance MatrixN odalA dm ittanceM atrix(TopoStructureA ndB ranchP ara(Ci r d eNumberf2),TopoS tru c t ureAndBranchPara(C ircleN um berf2)=.N odalA dm ittanceM atrix(TopoStructureA ndB ranchP ara(C ircleN um ber,2),TopoStructureA ndB ranchP ara(C ircleN um ber,2)+.1/(TopoStructureAndBranchP ara(Ci r d eNumber,3)+j TopoStructureA ndB ranchPara(Ci r d eNumber,4);N odalA dm ittanceM atrix(TopoStructureA ndB ranchP ara(C ircleN um ber,1)fTopoStructureA ndB ranchP ara(C ircleN um ber,2)=,.N odalA dm ittanceM atrix(TopoStructureA ndB ranchP ara(Ci r d eNumberf1)f TopoS tru c t ureAndBranchPara(C ircleN um berf2).-TopoStructureA ndB ranchP ara(C ircleN um berf5)/.(TopoStructureAndBranchP ara(C ircleN um berf 3)-f-jTopoStructureAndBranchP ara(C ircleN um berf4);N odalA dm ittanceM atrix(TopoStructureA ndB ranchP ara(Ci r d eNumberf2),TopoStructureA ndB ranchP ara(C ircleN um berf1)=.N odalA dm ittanceM atrix(TopoStructureA ndB ranchP ara(C ircleN um ber,1),TopoStructureA ndB ranchP ara(C ircleN um berf2);e ls eN odalA dm ittanceM atrix(T opoStructureA ndB ranchP ara(Ci rdeN um ber1),TopoStructureA ndB ranchP ara(C ircleN um berf1)=.N odalA dm ittanceM atrix(TopoStructureAndBranchP ara(C ircleN um ber,1),TopoStructureA ndB ranchP ara(C ircleN um ber,1)十 ,+1/(TopoSt ru c t ureAndBranchPara(C ircleN um ber,3)-F.j TopoStruct ureAndBranchPara(C ircleN um berf 4)-hj TopoSt ructureA ndB ranchPara(Ci r d eNumberf 5);N odalA dm ittanceM atrix(T opoStructureA ndB ranchP ara(C ircleN um berf2),TopoStructureA ndB ranchP ara(C ircleN um ber/2)=.N odalA dm ittanceM atrix(TopoStructureA ndB ranchP ara(Ci r d eNumberf2),TopoStructureA ndB ranchP ara(C ircleN um berf2)+1/(TopoStructureA ndB ranchP ara(C ircleN um ber,3)+.j TopoStruct:ureAndBranchPara(C ircleN um berf 4)-i-j TopoSt ructureA ndB rancInformation Engineering SchoolThe Guide of Experiment of Short Circuit CalculationhPara(Ci r d eNumberf 5)N odalAdm ittanceM atrix(TopoStructureAndBranchPara(Ci r d eNumberf1),TopoStructureAndBranchPara(CircleNumber,2)=.NodalAdm ittanceM atrix(TopoStructureAndBranchPara(Ci r d eNumberf1)fTopoStructureAndBranchPara(CircleNumber,2).-1/(TopoStructureAndBranchPara(CircleNumberf3)+.jTopoStructureAndBranchPara(Ci r d eNumber,4);NodalAdm ittanceM atrix(TopoStructureAndBranchPara(CircleNumberf2),TopoStructureAndBranchPara(CirdeN um ber/1)=.NodalAdm ittanceM atrix(TopoStructureAndBranchPara(C irc工eNumber,1)f TopoStructureAndBranchPara(Ci r d eNumber 2);endendPage 9 Total 103Experiment 1Bus Admittance MatrixReference 2不一定要重新编写Matalab程序,可以在装上Matpower,其中的makeYbus.m”文件中的源码是最标准的生成导纳矩阵程序。Matpower可以下载得到,若实在找不到就给我你的邮箱,我发给你。这里先把文件的内容给你贴上。事先声明:这是从Matpower中拷下的,仅供教学交流之用,其他后果与本人无关。function Ybusf Yf,Yt=makeYbus(baseMVA9 bus,branch)%MAKEYBUS Builds the bus admittance matrix and branch admittance matrices.%Ybus,Yt=makeYbus(baseMVA,bus,branch)returns the full%bus admittance matrix(i.e.for all buses)and the matrices Yf and Yt%which,when multiplied by a complex voltage vector yield the vector%currents injected into each line from the from and to buses%respectively of each line.Does appropriate conversions to p.u.%MATPOWER%$Id:makeYbus.mfv 1.4 2004/08/23 20:56:42 ray Exp$%by Ray Zimmerman,PSERC Cornell%Copyright(c)19962004 by Power System Engineering Research Center(PSERC)%See http:/www.pserc.cornell.edu/matpower/for more info.%constantsj =sqrt(-l);nb=size(bus,1);%number of busesnl=size(branch,I);%number of lines%define named indices into bus,branch matricesPQ,PY REE NONE,BUSJ,BUS_TYPEf PD,纱,G S,BS,BUS_AREA,VM,.VAf BASE_KV9 ZONE,VMAX,VM1N,LAM_Pf LAM_Q,MU_VMAX,MU_VMIN=idx_bus;F_BUS9 T_BUS,BR_R,BR_X,BR_B,RATE_A,RATE_B,.RATEJC,TAP,SHIFT,BR_STATUSf PF,QFf PT,QTf MU_SFf MU_ST=idxjbrch;%check that bus numbers are equal to indices to bus(one set of bus numbers)if any(bus(:,BUS J)=l:nht)error(fbuses must appear in order by bus number)end%for each branch,compute the elements of the branch admittance matrix where%If Yff Yft Vf%I 1 =1 P I I%lt Ytf Ytt Vt%stat=hranch(:9 BR_STATUS);%ones at in-service branchesThe Guide of Experiment of Short Circuit Calculation信A工 荏*etInformation Engineering SchoolYs=stat J(branch(:9 BR_R)braneh(:,BR_X);%series admittanceBe=stat branch(:9 BR_B);%line charging susceptancetap=ones(nl,1);%default tap ratio=Ii=find(branch(:9 TAP);%indices of non-zero tap ratiostap(i)=braneh(if TAP);%assign non-zero tap ratiostap=tap.*exp(-jpi/180*branch(:,SHIFT);%add phase shiftersYtt=Ys+pBc/2;Yff=Ytt./(tap.*conj(tap);Yft=-Y s./conj(tap);Ytf=-Ys./tap;%compute shunt admittance%if Psh is the real power consumed by the shunt at V=1.0 p.u.%and Qsh is the reactive power injected by the shunt at V=L0 p.u.%then Psh-j Qsh=V*conj(Ysh V)-conj(Ysh)-G s-j Bs,%i.e.Ysh=Psh+j Qsh,so.Ysh=(bus(:9 GS)+j*bus(:,BS)/baseMVA;%vector of shunt admittances%build Ybusf=branch(:,F_BUS);t=branch(:,T_BUS);Cf=sparse(f9 l:nl,ones(nl,1),nb,nl);Ct-sparse(t,l:nl,ones(nl,1),nb,nl);Ybus=spdiags(Ysh,0,nb,nb)+.C f spduigs(Yff,0,/”,献)*+.Cf*spdiags(Yft,0,til,nl)*Ct1+.Ct*spdiags(Ytff 0,nl,nl)*Cf,+.Ct*spdiags(Ytt,0,nl,nl)*Ct;%listofnfromn buses%list of to buses%connection matrix for line&from buses%connection matrix for line&to buses%shunt admittance%YJf term of branch admittance%Yft term of branch admittance%Ytf term of branch admittance%Ytt term of branch admittance%Build Yf and Yt such that Yf*Vis the vector of complex branch currents injected%at each branchs,fromn bus,and Yt is the same for the nto bus endif nargout 1i=l:nlr;l:nlr;%double set of row indicesYf=sparser Yft);Yt=sparse f;tf Ytf;Ytt);endreturn;Page 11 Total 103Experiment 2Bus Impedance MatrixExperiment 2Hour:4Power GridBus Impedance Matrix1.Objective To write a simple program in MATLAB for the algorithm of bus impedance matrix.2.DiscussionBus Impedance matrixThe node-current equation of an n-bus power system can be written in matrix form asM lvz心一嗫=Z uZ 2 1Z”MrZ 江 Z lkZ 2 2 ZZ/2 Z77.2 ,ntZ”ZEz.Or,bus-Z bus I b usWhere lbus is the vector of the injected bus currents.(2)us is the vector of bus voltagesmeasured from the reference node.Z g is known as the bus impedance matrix.The Guide of Experiment of Short Circuit CalculationZbus CALCULATIONInformation Engineering SchoolThere are two major methods:1.Inversion of Ybus2.building algorithm3.LU factorization.Matrix inversion for very large-scale networks is very slow and avoided.On the otherhand,the Zbus building algorithm is the acceptable method for large networks.It is muchfaster and easier to update.Zbus Building AlgorithmThis is a very systematic way of forming Zbus and allow for easy implementation onthe digital computer.Advantages1.Easy to implement2.Avoids matrix inversion3.It is easy to handle Zbus modifications due to line switchings and changes innetwork topologySolution:Notation7 old乙bus existing matrix)乙 bus required 乙心(?matrix)i,jf k existing busesp a new bus(not in the original netwoik)bus Z bus 1 busThe addition of a branch of impedance zb falls into 4 categories as follows.Page 13 Total 103Experiment 2Bus Impedance MatrixCASE 1:Adding zb from a new bus p to the reference bus 0Here,Z黑:will be+matrix Injected current Ip will not change the bus voltages of the original networkThen,CASE 2:Adding zb from a new bus p to an existing bus kHere,Z:will be(n+lX+l)matrix Injected current Ip will change the bus voltages of the original network Injected current at bus k becomes Ik+1pThe Guide of Experiment of Short Circuit Calculation匕=匕+篦。Information Engineering SchoolThen,CASE 3:Adding zb from an existing bus k to the reference bus 0Here,Z黑will be nxn matrix This is a special case of CASE 2 except that Vp=0Then,Page 15 Total 103Experiment 2Bus Impedance Matrix_ 701d Z力(+N 加=/加-J ;-Z状+Z&Summary of Case 3 Proceed as in CASE 2