資源簡介
基于直角坐標系的牛頓法潮流計算 linedata = [
1 4 0.1 0.4 0.01528 1;
1 3 0 0.3 0 1.1;
1 2 0.12 0.5 0.01920 1;
4 2 0.08 0.40 0.01413 1];
busdata = [
1 0 -0.30 -0.18 1 0;
4 0 -0.55 -0.13 1 0;
3 2 0.5 0 1.10 0;
2 1 0 0 1.05 0;];
代碼片段和文件信息
function?PowerFlowNRRec(linedatabusdataerror)
%節點標號無特殊要求
clc
if?nargin?1
%?linedata?=?[
%?1 2 0.1 0.4 0.01528?1;
%?1 3 0 0.3 0? 1.1;
%?1 4 0.12 0.5 0.01920?1;
%?2 4 0.08 0.40 0.01413?1];
%?busdata?=?[
%?1?0 -0.30? -0.18? 1???? 0;
%?2?0 -0.55? -0.13? 1? 0;
%?3?2 0.5??? 0 1.10 0;
%?4?1 0 0 1.05 0;];
linedata?=?[
1 4 0.1 0.4 0.01528?1;
1 3 0 0.3 0? 1.1;
1 2 0.12 0.5 0.01920?1;
4 2 0.08 0.40 0.01413?1];
busdata?=?[
1?0 -0.30? -0.18? 1???? 0;
4?0 -0.55? -0.13? 1? 0;
3?2 0.5??? 0 1.10 0;
2?1 0 0 1.05 0;];
end
if?nargin?3
error?=?10^-5;
end
clc
%優化節點排序
pqbus?=?find(busdata(:2)==0);
pvbus?=?find(busdata(:2)==2);
basebus?=?find(busdata(:2)==1);
bussort?=?[pqbus‘?pvbu
- 上一篇:matalab對0-9數字識別
- 下一篇:多項式回歸的matlab實現
評論
共有 條評論