NROutline - S=V*conj(Ybus*V Power injections from(f(V,delta...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % ********************************************************* % Outline for Newton Raphson Method (both Full and Fast) % ********************************************************* % % Some tolerances, maximum iterations, etc. iter=0; % Iteration count maxiter=100; % Maximum number of iterations tolerance=.01; % Error tolerance % % Input system data and initial guess in proper format % including number of buses, etc. ng = ; % Number of generator buses npq = ; % Number of load buses n = ng+npq; % Number of buses Ybus= ; % Ybus G=real(Ybus); B=imag(Ybus); B P = [ ]; % Real power injections (unknown values set to 0), column vector Q = [ ]; % Reactive power injections (unknown values set to 0), column vector S = P +j*Q; % Specified voltages (unknown magnitudes set to 1 unknown angles set to 0) V=[ ]; delta= ; Vmag= ; V % Initial power flow for starting guess (will show this result in class)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: S=V.*conj(Ybus*V); % Power injections from (f(V,delta)+j*g(V,delta)) % % Initialize the error, mismatch vectors deltaP = ; deltaQ = ; error= ; e % Full NR updates while (error>tolerance) & (iter<maxiter) iter=iter+1; % Iteration count % Calculation of jacobian and inverse % Jacobian calculation do before while loop for Fast Decoupled Approximation J= ; Jinv=J^(-1); % update angles at PV and PQ buses delta = ; % update voltage magnitudes at PQ buses only Vmag = ; % Complex form of voltages V = Vmag.*(cos(delta)+j*sin(delta)); % Calculation of injections based on calculated voltage S = V.*conj(Ybus*V); % Error based on calculated voltage deltaP = ; deltaQ = ; error = ; % New error end e % Solution % Voltages Vmag= ; delta= ; % Injections S = diag(V)*conj(Ybus*V); % Calculation of line flows lineflows = l if (iter>=maxiter) disp('Did not converge') end;...
View Full Document

{[ snackBarMessage ]}

Page1 / 2

NROutline - S=V*conj(Ybus*V Power injections from(f(V,delta...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online