Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
sparrowzz
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
sgool
sparrowzz
Commits
9ba4ce81
Commit
9ba4ce81
authored
Jul 02, 2025
by
dongshufeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor:add more file
parent
1f10d76a
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
86 行增加
和
0 行删除
+86
-0
rspower/examples/test_newtonpf.txt
+12
-0
rspower/lib/make_sbus.txt
+34
-0
rspower/lib/make_sdzip.txt
+30
-0
rspower/lib/newtonpf.txt
+10
-0
没有找到文件。
rspower/examples/test_newtonpf.txt
0 → 100644
查看文件 @
9ba4ce81
#include ../data/case14.txt
#include ../lib/idx_gen.txt
#include ../lib/idx_bus.txt
#include ../lib/idx_brch.txt
#include ../lib/make_y_bus.txt
#include ../lib/dsbus_dv.txt
#include ../lib/make_jac.txt
#include ../lib/make_sdzip.txt
Ybus = make_y_bus(baseMVA, bus, branch);
return make_sdzip(baseMVA, bus, 1);
\ No newline at end of file
rspower/lib/make_sbus.txt
0 → 100644
查看文件 @
9ba4ce81
//MAKESBUS Builds the vector of complex bus power injections.
// SBUS = MAKESBUS(BASEMVA, BUS, GEN)
// SBUS = MAKESBUS(BASEMVA, BUS, GEN, MPOPT, VM)
// SBUS = MAKESBUS(BASEMVA, BUS, GEN, MPOPT, VM, SG)
// returns the vector of complex bus power injections, that is, generation
// minus load. Power is expressed in per unit. If the MPOPT and VM arguments
// are present it evaluates any ZIP loads based on the provided voltage
// magnitude vector. If VM is empty, it assumes nominal voltage. If SG is
// provided, it is a complex ng x 1 vector of generator power injections in
// p.u., and overrides the PG and QG columns in GEN, using GEN only for
// connectivity information.
//
// [SBUS, DSBUS_DVM] = MAKESBUS(BASEMVA, BUS, GEN, MPOPT, VM)
// With two output arguments, it computes the partial derivative of the
// bus injections with respect to voltage magnitude, leaving the first
// return value SBUS empty. If VM is empty, it assumes no voltage dependence
// and returns a sparse zero matrix.
//
// See also MAKEYBUS.
// MATPOWER
// Copyright (c) 1996-2016, Power Systems Engineering Research Center (PSERC)
// by Ray Zimmerman, PSERC Cornell
//
// This file is part of MATPOWER.
// Covered by the 3-clause BSD License (see LICENSE file for details).
// See https://matpower.org for more info.
// define named indices into bus, gen matrices
fn make_sbus(baseMVA, bus, gen, mpopt, Vm, Sg) {
nb = size(bus, 1);
}
\ No newline at end of file
rspower/lib/make_sdzip.txt
0 → 100644
查看文件 @
9ba4ce81
//MAKESDZIP Builds vectors of nominal complex bus power demands for ZIP loads.
// SD = MAKESDZIP(BASEMVA, BUS, MPOPT) returns a struct with three fields,
// each an nb x 1 vectors. The fields 'z', 'i' and 'p' correspond to the
// nominal p.u. complex power (at 1 p.u. voltage magnitude) of the constant
// impedance, constant current, and constant power portions, respectively of
// the ZIP load model.
//
// Example:
// Sd = makeSdzip(baseMVA, bus, mpopt);
// MATPOWER
// Copyright (c) 2015-2016, Power Systems Engineering Research Center (PSERC)
// by Shrirang Abhyankar
// and Ray Zimmerman, PSERC Cornell
//
// This file is part of MATPOWER.
// Covered by the 3-clause BSD License (see LICENSE file for details).
// See https://matpower.org for more info.
fn make_sdzip(baseMVA, bus, mpopt) {
pw = [1, 0, 0];
qw = [1, 0, 0];
pd = slice(bus, [0], [PD-1,PD]);
qd = slice(bus, [0], [QD-1,QD]);
z = (pd * get(pw,2) + c(0,1) * qd * get(qw,2)) / baseMVA;
i = (pd * get(pw,1) + c(0,1) * qd * get(qw,1)) / baseMVA;
p = (pd * get(pw,0) + c(0,1) * qd * get(qw,0)) / baseMVA;
return p;
}
\ No newline at end of file
rspower/lib/newtonpf.txt
查看文件 @
9ba4ce81
...
...
@@ -35,5 +35,14 @@
// See https://matpower.org for more info.
fn newtonpf(Ybus, Sbus, V0, ref, pv, pq, mpopt) {
// options
tol = get(mpopt, 0);
max_it = get(mpopt, 1);
// initialize
converged = 0;
i = 0;
V = V0;
Va = angle(V);
Vm = abs(V);
}
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论