Matpower疑惑解答
疑惑
- Gs、Bs都表示的是与母线并联的电导和电纳值,而b 表示的是线路的等效电路的电纳值,二者一样吗?可以互相转换吗?
- 变压器的问题
变比表示的是哪一头比哪一头。还有拥有变压器的支路所用的r、x、b都是经过Π型等效变换以后的,还是未经变换的? - 编号问题
branch 中的起始节点和终止节点互换的话会影响结果的数值吗?是只会影响符号吗,还是说大小也会变化?generator和bus 中的编号顺序是怎么确定的? - 发电机的问题
如果说平衡节点连着发电机还连着一个负荷,这种情况下,generator中的输出有功无功功率Pg 和 Qg 如何表示?
解答
- 在电路图上节点并联的电导和电纳和线路上的等效电路的电纳确实是连接在同一节点的,从电路图上看,他们好像是可以合并为一个值的,但是在matpower中,二者泾渭分明,不可合并。且注意,在计算b的时候,要计算该线路的总电纳值,即要将Π型等效电路的两条腿上的电纳值加起来。
- k:1=Vf:Vt(Vf,Vt分别表示起始节点和终止节点的电压值),即变压器支路只能够由起始节点向终止节点进行归算。
r,x,b都是未经过Π型等效变换的。 - branch互换起始节点和终止节点(除了带发电机的支路)不影响结果,只会影响符号,由于符号,注入为正,流出为负,所以对结果无影响。
带发电机的支路不能够互换起始节点和终止节点。必须是由起始节点向终止节点进行归算,也可以说是由低压侧向高压侧进行归算。 - 这种平衡节点既连着发电机又连着负荷的,我觉得应该在bus中用Pd和Qd表示负荷需要的功率(正值),在generator 用Pg和Qg表示发电机发出的功率,因为是平衡节点,发电机发出的功率未知,所以一般是0。
算例
1.以浙大的《电力系统分析 韩祯祥主编 第五版》的例3.3为例
case5b_2g.m文件:
function mpc = case5b_2g
%CASE5b_2g Power flow data for 5 bus, 2 gen case
%浙大的电力系统分析例3.3
% MATPOWER
%% MATPOWER Case Format : Version 2
mpc.version = '2';
%%----- Power Flow Data -----%%
%% system MVA base
mpc.baseMVA = 100;
%% bus data
% bus_i type Pd Qd Gs Bs area Vm Va baseKV zone Vmax Vmin
mpc.bus = [
1 1 160 80 0 0 1 1 0 100 1 1.1 0.9;
2 1 200 100 0 0 1 1 0 100 1 1.1 0.9;
3 1 370 130 0 0 1 1 0 100 1 1.1 0.9;
4 2 0 0 0 0 1 1.05 0 100 1 1.1 0.9;
5 3 0 0 0 0 1 1.05 0 100 1 1.1 0.9;
];
%% generator data
% bus Pg Qg Qmax Qmin Vg mBase status Pmax Pmin Pc1 Pc2 Qc1min Qc1max Qc2min Qc2max ramp_agc ramp_10 ramp_30 ramp_q apf
mpc.gen = [
5 0 0 10000 -10000 1.05 100 1 0 0 0 0 0 0 0 0 0 0 0 0 0;
4 500 0 10000 -10000 1.05 100 1 0 0 0 0 0 0 0 0 0 0 0 0 0;
];
%% branch data
% fbus tbus r x b rateA rateB rateC ratio angle status angmin angmax
mpc.branch = [
2 4 0 0.015 0 250 250 250 1.05 0 1 -360 360;
3 2 0.08 0.3 0.5 250 250 250 0 0 1 -360 360;
3 5 0 0.03 0 250 250 250 1.05 0 1 -360 360;
2 1 0.04 0.25 0.5 250 250 250 0 0 1 -360 360;
1 3 0.1 0.35 0 250 250 250 0 0 1 -360 360;
];
运行:
runpf(‘case5b_2g’)
输出结果:
>> runpf('case5b_2g')
MATPOWER Version 6.0, 16-Dec-2016 -- AC Power Flow (Newton)
Newton's method power flow converged in 5 iterations.
Converged in 0.00 seconds
================================================================================
| System Summary |
================================================================================
How many? How much? P (MW) Q (MVAr)
--------------------- ------------------- ------------- -----------------
Buses 5 Total Gen Capacity 0.0 -20000.0 to 20000.0
Generators 2 On-line Capacity 0.0 -20000.0 to 20000.0
Committed Gens 2 Generation (actual) 757.9 411.2
Loads 3 Load 730.0 310.0
Fixed 3 Fixed 730.0 310.0
Dispatchable 0 Dispatchable -0.0 of -0.0 -0.0
Shunts 0 Shunt (inj) -0.0 0.0
Branches 5 Losses (I^2 * Z) 27.94 204.78
Transformers 2 Branch Charging (inj) - 103.5
Inter-ties 0 Total Inter-tie Flow 0.0 0.0
Areas 1
Minimum Maximum
------------------------- --------------------------------
Voltage Magnitude 0.862 p.u. @ bus 1 1.078 p.u. @ bus 2
Voltage Angle -4.78 deg @ bus 1 21.84 deg @ bus 4
P Losses (I^2*R) - 13.81 MW @ line 3-2
Q Losses (I^2*X) - 73.98 MVAr @ line 2-1
================================================================================
| Bus Data |
================================================================================
Bus Voltage Generation Load
# Mag(pu) Ang(deg) P (MW) Q (MVAr) P (MW) Q (MVAr)
----- ------- -------- -------- -------- -------- --------
1 0.862 -4.779 - - 160.00 80.00
2 1.078 17.854 - - 200.00 100.00
3 1.036 -4.282 - - 370.00 130.00
4 1.050 21.843 500.00 181.31 - -
5 1.050 0.000* 257.94 229.94 - -
-------- -------- -------- --------
Total: 757.94 411.25 730.00 310.00
================================================================================
| Branch Data |
================================================================================
Brnch From To From Bus Injection To Bus Injection Loss (I^2 * Z)
# Bus Bus P (MW) Q (MVAr) P (MW) Q (MVAr) P (MW) Q (MVAr)
----- ----- ----- -------- -------- -------- -------- -------- --------
1 2 4 -500.00 -142.82 500.00 181.31 0.000 38.49
2 3 2 -127.74 20.32 141.55 -24.43 13.809 51.78
3 3 5 -257.94 -197.45 257.94 229.94 0.000 32.49
4 2 1 158.45 67.26 -146.62 -40.91 11.837 73.98
5 1 3 -13.38 -39.09 15.68 47.13 2.297 8.04
-------- --------
Total: 27.943 204.78
2.以《电力系统分析 夏道止编 第三版》的例4.3为例
case4b_2g.m文件:
function mpc = case4b_2g
%CASE4GS Power flow data for 4 bus, 2 gen case.
% MATPOWER
%% MATPOWER Case Format : Version 2
mpc.version = '2';
%%----- Power Flow Data -----%%
%% system MVA base
mpc.baseMVA = 100;
%% bus data
% bus_i type Pd Qd Gs Bs area Vm Va baseKV zone Vmax Vmin
mpc.bus = [
1 1 0 0 0 0 1 1 0 110 1 1.1 0.9;
2 1 50 24.6 0 0.05 1 1 0 38.5 1 1.1 0.9;
3 2 0 0 0 0 1 1.05 0 110 1 1.1 0.9;
4 3 15 10 0 0 1 1.05 0 110 1 1.1 0.9;
];
%% generator data
% bus Pg Qg Qmax Qmin Vg mBase status Pmax Pmin Pc1 Pc2 Qc1min Qc1max Qc2min Qc2max ramp_agc ramp_10 ramp_30 ramp_q apf
mpc.gen = [
4 0 0 10000 -10000 1.05 100 1 0 0 0 0 0 0 0 0 0 0 0 0 0;
3 20 0 10000 -10000 1.05 100 1 0 0 0 0 0 0 0 0 0 0 0 0 0;
];
%% branch data
% fbus tbus r x b rateA rateB rateC ratio angle status angmin angmax
mpc.branch = [
4 1 0.173554 0.330579 0.017243*2 250 250 250 0 0 1 -360 360;
4 3 0.260331 0.495868 0.025864*2 250 250 250 0 0 1 -360 360;
3 1 0.130165 0.247934 0.012932*2 250 250 250 0 0 1 -360 360;
2 1 0 0.166667 0 250 250 250 1.128205 0 1 -360 360;
];
运行:
runpf(‘case4b_2g’)
输出结果:
>> runpf('case4b_2g')
MATPOWER Version 6.0, 16-Dec-2016 -- AC Power Flow (Newton)
Newton's method power flow converged in 4 iterations.
Converged in 0.04 seconds
================================================================================
| System Summary |
================================================================================
How many? How much? P (MW) Q (MVAr)
--------------------- ------------------- ------------- -----------------
Buses 4 Total Gen Capacity 0.0 -20000.0 to 20000.0
Generators 2 On-line Capacity 0.0 -20000.0 to 20000.0
Committed Gens 2 Generation (actual) 67.8 34.0
Loads 2 Load 65.0 34.6
Fixed 2 Fixed 65.0 34.6
Dispatchable 0 Dispatchable -0.0 of -0.0 -0.0
Shunts 1 Shunt (inj) -0.0 0.1
Branches 4 Losses (I^2 * Z) 2.76 11.36
Transformers 1 Branch Charging (inj) - 11.9
Inter-ties 0 Total Inter-tie Flow 0.0 0.0
Areas 1
Minimum Maximum
------------------------- --------------------------------
Voltage Magnitude 0.970 p.u. @ bus 1 1.050 p.u. @ bus 4
Voltage Angle -9.23 deg @ bus 2 0.00 deg @ bus 4
P Losses (I^2*R) - 1.38 MW @ line 4-1
Q Losses (I^2*X) - 6.10 MVAr @ line 2-1
================================================================================
| Bus Data |
================================================================================
Bus Voltage Generation Load
# Mag(pu) Ang(deg) P (MW) Q (MVAr) P (MW) Q (MVAr)
----- ------- -------- -------- -------- -------- --------
1 0.970 -3.876 - - - -
2 1.039 -9.231 - - 50.00 24.60
3 1.050 -1.841 20.00 19.64 - -
4 1.050 0.000* 47.76 14.40 15.00 10.00
-------- -------- -------- --------
Total: 67.76 34.04 65.00 34.60
================================================================================
| Branch Data |
================================================================================
Brnch From To From Bus Injection To Bus Injection Loss (I^2 * Z)
# Bus Bus P (MW) Q (MVAr) P (MW) Q (MVAr) P (MW) Q (MVAr)
----- ----- ----- -------- -------- -------- -------- -------- --------
1 4 1 27.12 10.10 -25.73 -10.99 1.384 2.64
2 4 3 5.65 -5.70 -5.55 0.18 0.094 0.18
3 3 1 25.55 19.47 -24.27 -19.66 1.286 2.45
4 2 1 -50.00 -24.55 50.00 30.64 0.000 6.10
-------- --------
Total: 2.765 11.36
3.算例分析
我在算这两个算例的时候,又发现了一个问题:带变压器的支路,是向高压侧归算还是低压侧归算?浙大韩祯祥老师的书中例题有两个变压器支路,分别向两侧归算;而夏道止老师的书中例题有一个变压器支路,是向高压侧归算的。
我的理解是,变压器支路向靠着发电机近的那一侧进行归算,发电机侧一般是高压侧,所以说是向高压侧进行归算。
参考链接
链接: link.
百度文库的一个总结,写的挺明白的,对于学习matpower挺有用。