powerflow.m

来自「这个程序是采用模块化的方式对潮流进行求解」· M 代码 · 共 33 行

M
33
字号
% 徐国丰的牛顿拉夫逊法——电力系统潮流计算的程序
clc;
clear;
global G B V delta P Q  n m nl myf bus line J l Y nodenum;
myf=fopen('D:\matlab\work\output.dat','wt');

format long 

 openfile;  % 打开文件读取数据
 newnode;   %节点重新编号

Y=y(bus,line); %利用y函数得到节点导纳矩阵Y
printY;
G=real(Y) ;
B=imag(Y) ;
V=bus(:,2);
delta=bus(:,3);
P=bus(:,4);
Q=bus(:,5);

run_NR; 
PowerResult;      %求出所有PV节点的无功注入Q和平衡节点的有功和无功功率注入
PowerLosses;      %线路损耗的求取,计算每条线路流过的功率

fclose(myf);
   






⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?