MATLA井顿拉夫逊法算潮流分析
The function of this program is to use Newton, the rafson method
The % B1 matrix: 1, the first branchlease enter a number of directions: nl
= ');
% B1 is equal to [1, 2, 4 + 16i 0, 0, 0;
% 1, 3, 4 + 16i 0, 0, 0;
% 2, 3, 2 + 8i 0, 0, 0;
% 2, + I 0, 11/110, 1] % input (' please enter the matrix formed by the branch parameter: B1 = ');
% B2 is equal to [0, 0, 115, 0, 1;
% 0, 0, 110, 0, 2;
% 0, 20 + 4i 110, 0, 2;
% 0, 10 + 6i 100 2] % input (' please input the matrix of the parameters of each node: B2 = ');
%
Y = zeros (n); E = zeros (1, n); F = zeros (1, n); V = zeros (1, n);
Sida = zeros (1, n); S1 = zeros (nl);
The admittance matrix
For I = 1: nl % from 1 to n1
If B1 (I, 7) = 1 %
If B1 (I, 6) = = 0 % left (the first end) is on one side
P = B1 (I, 1); Q = B1 (I, 2);
The else % left node (the first end) is on the K side
P = B1 (I, 2); Q = B1 (I, 1);
The end
Y (p, q) = Y (p, q) - 1. / (B1 (I, 3) * B1 (I, 5)). % the diagonal element
Y of q, p is equal to Y of p, q. % the diagonal element
Y (q, q) = Y (q, q) + 1)/(B1 (I, 3) * B1 (I, 5) A 2); % diagonal element K side
Y (p) = Y (p) = Y (p) + 1. / B1 (I, 3) + B1 (I, 4); % diagonal element 1 + excitation admittance
"Else"
P = B1 (I, 1); Q = B1 (I, 2);
Y (p, q) = Y (p, q) - 1. / B1 (I, 3); % the diagonal element
Y of q, p is equal to Y of p, q. % the diagonal element
Y (q) = Y (q) = Y (q) + 1. / B1 (I, 3) + B1 (I, 4). / ; % diagonally equal to half of the line
Y (p) = Y (p) = Y (p) + 1. / B1 (I, 3) + B1 (I, 4). / ; % diagonally, half of the power of the line
The end
The end
Disp (' the admittance matrix Y = '); Disp (Y);
% given the initial node voltage and
given each node power injection
G = real (Y); B = imag (Y); The % decomposes the real and imaginary parts of the admittance matrix
For I = 1: n % given the real and imaginary parts of the initial voltage of each node
E (I) = real (B2 (I, 3));
F (I) = imag (B2 (I, 3));
V (I) = abs (B2 (I, 3));
MATLAB牛顿拉夫逊法算潮流分析 来自淘豆网m.daumloan.com转载请标明出处.