MATPOWER在电力系统潮流计算中的应用MATPOWER是一个用MATLAB的M文件编写,用来解决电力系统潮流计算和优化潮流计算问题的软件包。MATPOWER特点是简单、易懂且程序代码公开,这为电力系统专业学生深入学习和理解掌握潮流计算中的难点(如节点导纳矩阵、算法及迭代过程等)提供了一个开放、便捷的平台。下面是MATPOWE4.0在电力系统潮流计算中的一个具体实例,仅供学习电力系统专业的读者参考。读者利用MATPOWER进行潮流计算时,结构体mpc各字段的形式可参照case2_5.m进行编写。图12机5节点系统对图1的2机5节点系统(具体参数参见:现代电力系统分析-王锡凡),按“version2”格式编写成的case2_5.m的程序清单如下:functionmpc=case2_5%MATPOWERCaseFormat:Version2mpc.version='2';%%------PowerFlowData------%%%%systemMVAbasempc.baseMVA=100;%%Busdata%bus_itypePdQdGsBsareaVmVabaseKVzoneVmaxVminmpc.bus=[11160800011010011.10.94;212001000011010011.10.94;313701300011010011.10.94;42000011.05010011.10.94;53000011.05010011.10.94;];%%generatordata%busPgQgQmaxQminVgmbasestatusPmaxPminmpc.gen=[4500099990-99991.0510016000;50099990-99991.0510016000;];%%branchdata%fbustbusrxbrataArataBrataCratioanglestatusangminangmaxmpc.branch=[210.040.250.5000001-360360;310.10.350000001-360360;320.080.30.5000001-360360;3500.0300001.0501-360360;2400.01500001.0501-360360;];Return当采用牛顿—拉夫逊法计算case2_5.m交流电网潮流时,在MATLAB的名令窗口输入以下命令即可runpf('case2_5')计算输出结果如下:MATPOWERVersion4.0,07-Feb-2011--ACPowerFlow(Newton)Newton'smethodpowerflowconvergedin5iterations.Convergedin0.04seconds=====================================================================SystemSummary=====================================================================Howmany?Howmuch?P(MW)Q(MVAr)---------------------------------------------------------------------Buses5TotalGenCapacity1200.0-19998.0to199980.0Generators2On-lineCapacity1200.0-19998.0to199980.0CommittedGens2Generation757.9411.2Loads3Load730.0310.0Fixed3Fixed730.0310.0Dispatchable0Dispatchable0.0of0.00.0Shunts0Shunt(inj)0.00.0Branches5Losses(I^2*Z)27.94204.78Transformers2BranchCharging(inj)——103.5Inter-ties0TotalInter-tieFlow0.00.0Areas1MinimumMaximum---------------------------------------------------------------------VoltageMagnitude0.862p.u.@bus11.078p.u.@bus2VoltageAngle-4.78deg@bus121.84deg@bus4PLosses(I^2*R)-13.81MW@line3-2QLosses(I^2*X)-73.98MVAr@line2-1=====================================================================BusData=====================================================================BusVoltageGenerationLoad#Mag(pu)Ang(deg)P(MW)Q(MVAr)P(MW)Q(MVAr)----------------------------------------------------10.862-4.779--160.0080.0021.07817.854--200.00100.0031.036-4.282--370.00130.0041.05021.843500.00181.31--51.0500.000257.94229.94-----------------------------------------------------------------------Total:757.94411.25730.00310.00=====================================================================BranchData=====================================================================BrnchFromToFromBusInjectionToBusInjectionLoss(I^2*Z)#BusBusP(MW)Q(MVAr)P(MW)Q(MVAr)P(MW)Q(MVAr)---------------------------------------------------------------------121158.4567.26-146.62-40.9111.83773.9823115.6847.13-13.38-39.092.2978.04332-127.7420.32141.55-24.4313.80951.78435-257.94-197.45257.94229.940.00032.49524-500.00-142.82500.00181.310.00038.49--------------------------Total:27.943204.78最后向读者介绍几款常用的潮流计算软件:1.MATLAB的M文件编写的MATPOWER4.1;2.中国电力科学研究院的PASAP;3.美国Bonnevile电力局的BPA;4.美国PTI公司的PSS/E;5.美国电力科学研究院的ETMSP。