MATPOWER 手册(中文版) 版本 3.1b2
中国电力市场论坛(www.dlscbbs.net)翻译制作 一切版权归属原作者 2
目录
1 绪论 ..............................................................................................................................................3
什么是 MATPOWER? ...................................................................................................3
它从哪里来?...................................................................................................................3
2 开始 ..............................................................................................................................................3
2.1 系统要求 ...........................................................................................................................3
2.2 安装 ...................................................................................................................................4
2.3 执行电力常规潮流运算....................................................................................................4
2.4 执行最优潮流程序............................................................................................................4
2.5 获得帮助 ...........................................................................................................................4
3 技术规则 ......................................................................................................................................5
3.1 数据文件格式....................................................................................................................5
3.2 模型 ...................................................................................................................................8
交流模型(AC) .............................................................................................................8
直流公式(DC).............................................................................................................9
3.3 电力潮流 .........................................................................................................................10
3.4 最优潮流 .........................................................................................................................10
传统的交流 OPF 方程 ...................................................................................................12
基于最优化工具箱的 OPF 解法(constr)..................................................................13
基于线性规划的 OPF 解法(LPconstr) .....................................................................14
3.4.2 广义交流最优潮流解法...............................................................................................16
通用线性约束(一般线性约束).................................................................................17
通用成本函数.................................................................................................................18
通用 P-Q 容量曲线......................................................................................................19
可调度负荷.....................................................................................................................20
支路相角差限制.............................................................................................................22
问题数据转换.................................................................................................................22
附加线性约束的例子.....................................................................................................23
3.4.3 直流 OPF 方法 .............................................................................................................23
机组组合算法.................................................................................................................24
3.6 MATPOWER 选项 ...........................................................................................................24
3.7 文件汇总 .........................................................................................................................27
4 致谢 ............................................................................................................................................31
5 参考文献 ....................................................................................................................................31
PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.cn
MATPOWER 手册(中文版) 版本 3.1b2
中国电力市场论坛(www.dlscbbs.net)翻译制作 一切版权归属原作者 3
译者的话:
在做项目和实验的过程中,偶然使用到 MATPOWER 软件,发现该软件功能强大,但
是操作还是比较的复杂,而 MATPOWER 本身的说明文档还没有中文版本,因此,译者产
生了翻译用户手册的想法,促使了这个文档的诞生。
由于翻译时间仓促,这个版本几乎没有任何校正,还有大量的错误,随后会对原始版本
进行修正,恳请各位网友将错误发送到 wolflove941@163.com 或者直接登陆中国电力市场论
坛(www.dlscbbs.net)提出宝贵的意见。
1 绪论
什么是 MATPOWER?
MATPOWER 是一个基于 matlab m文件的组建包,用来解决电力潮流和优化潮流的问
题。它致力于为研究人员和教育从业者提供一种易于使用和可更新的仿真工具。Matpower
的设计理念是用尽可能简单、易懂,可更新的代码来实现最优秀的功能。MATPOWER 的主
页为:
http://www.pserc.cornell.edu/matpower/
它从哪里来?
MATPOWER 是 由 卡奈尔大学电气学院电力系统工程研究中心的 RAY D.
ZIMMENRman,CARLOS E.Murillo 和甘德强在 ROBERT THOMAS 的指导下开发出来的。
最初的基于 MATLAB 的电力潮流和最优潮流代码是为 POWERWEB 项目的需要而编写的。
谁能够使用它?
·MATPOWER 是完全免费的,任何人都可以使用。
·我们对 MATPOWER 的代码和作为特殊用途的可行性不作任何保障,授权与暗示。
·任何使用 MATPOWER 的 出 版 物都必须标注 MATPOWER
http://www.pserc.cornell.edu/matpower/。
·任何出于某种需要而对 MATLAB 进行的修改必须在适当的位置保留初始版权标志。
·MATPOWER 在没有书面许可的情况下不宜私自发布与转让。
·MATPOWER 改进版或源于 MATPOWER 的成果在没有书面许可的情况下不能私自转让或
发布。
2 开始
2.1 系统要求
·MATLAB 5.0 或以上版本
1
·MATLAB 最优化工具箱(一小部分最优潮流算法需要)
两者都可以从 MathWorks 获得(见 http://www.mathworks.com/)。
PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.cn
MATPOWER 手册(中文版) 版本 3.1b2
中国电力市场论坛(www.dlscbbs.net)翻译制作 一切版权归属原作者 4
2.2 安装
步骤一:到 MATPOWER 主页(http://www.pserc.cornell.edu/mathpower/)上按照下载指导下
载。
步骤二:解压下载的文件。
步骤三:将解压后的文件放到 MATLAB 的 PATH 路径下。
2.3 执行电力常规潮流运算
运行一个简单的在文件 case9.m 中有详细的说明 9 节点牛顿潮流,包括默认的运算法则
选项,以 matlab 的命令,输入:
>>runpf(‘case9’)
2.4 执行最优潮流程序
计算一个数据在 case30.m 文件中的 30 节点的最优潮流系统,以默认的算法选项,以
maitlab 的命令,输入:
>>runopf(‘case30’)
计算相同的系统,但是以关闭高耗机组处理的方式运行,输入:
>>runuopf(‘case30’)
2.5 获得帮助
当拥有 MATLAB 的内部函数和工具箱代码时,通过输入 help 加上命令或者 M-文件的
名称可以获得详细的函数说明,几乎所有的 MATPOWER 的 M-文件都有这样的文档。比
如,runopf 的帮助如下:
>> help runopf
RUNOPF Runs an optimal power flow.
[baseMVA, bus, gen, gencost, branch, f, success, et] = ...
runopf(casename, mpopt, fname, solvedcase)
Runs an optimal power flow and optionally returns the solved values in
the data matrices, the objective function value, a flag which is true if
the algorithm was successful in finding a solution, and the elapsed time
in seconds. All input arguments are optional. If casename is provided it
specifies the name of the input data file or struct (see also 'help
caseformat' and 'help loadcase') containing the opf data. The default
value is 'case9'. If the mpopt is provided it overrides the default
MATPOWER options vector and can be used to specify the solution
algorithm and output options among other things (see 'help mpoption' for
details). If the 3rd argument is given the pretty printed output will be
PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.cn
MATPOWER 手册(中文版) 版本 3.1b2
中国电力市场论坛(www.dlscbbs.net)翻译制作 一切版权归属原作者 5
appended to the file whose name is given in fname. If solvedcase is
specified the solved case will be written to a case file in MATPOWER
format with the specified name. If solvedcase ends with '.mat' it saves
the case as a MAT-file otherwise it saves it as an M-file.
MATPOWER 还提供许多想想用来选择算法和输出,输入
>>help mpoption
更多信息详见 3.6 节:MATPOWER 的选项。
3 技术规则
3.1 数据文件格式
MATPOWER 所用的所有数据文件均为 MATLAB 的 M 文件或者 MAT 文件,他们用来
定义和返回变量:baseMVA, bus,branch,gen,areas 和 gencost。变量 baseMVA 是 标量 ,
其他的都是矩阵。矩阵的每一行都对应于一个单一的母线,线路或者发电机组。列的数据类
似于标准的 IEEE 和 PTI 列的数据格式。MATPOWER 案例文件的规范细节可以在
caseformat.m 中看到:
>> help runopf
RUNOPF Runs an optimal power flow.
[baseMVA, bus, gen, gencost, branch, f, success, et] = ...
runopf(casename, mpopt, fname, solvedcase)
Runs an optimal power flow and optionally returns the solved values in
the data matrices, the objective function value, a flag which is true if
the algorithm was successful in finding a solution, and the elapsed time
in seconds. All input arguments are optional. If casename is provided it
specifies the name of the input data file or struct (see also 'help
caseformat' and 'help loadcase') containing the opf data. The default
value is 'case9'. If the mpopt is provided it overrides the default
MATPOWER options vector and can be used to specify the solution
algorithm and output options among other things (see 'help mpoption' for
details). If the 3rd argument is given the pretty printed output will be
appended to the file whose name is given in fname. If solvedcase is
specified the solved case will be written to a case file in MATPOWER
format with the specified name. If solvedcase ends with '.mat' it saves
the case as a MAT-file otherwise it saves it as an M-file.
>> help ceseformat
ceseformat.m not found.
PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.cn
评论0
最新资源