24
Load flow and stability Atef elemary EngE511 JAZAN UNIVERSITY COLLEGE OF ENGINEERING Electrical Engineering Department Experimental Lab of EngE 511 Electrical Power System 2 Prepared By Prof. Dr Atef El-Emary

JAZAN UNIVERSITY COLLEGE OF ENGINEERING …colleges.jazanu.edu.sa/sites/en/eng/Documents/EngE511_Electrical... · COLLEGE OF ENGINEERING Electrical Engineering Department ... Admittance

  • Upload
    ledien

  • View
    225

  • Download
    1

Embed Size (px)

Citation preview

Page 1: JAZAN UNIVERSITY COLLEGE OF ENGINEERING …colleges.jazanu.edu.sa/sites/en/eng/Documents/EngE511_Electrical... · COLLEGE OF ENGINEERING Electrical Engineering Department ... Admittance

Load flow and stability Atef elemary EngE511

JAZAN UNIVERSITY

COLLEGE OF ENGINEERING

Electrical Engineering Department

Experimental Lab of EngE 511

Electrical Power System 2

Prepared By

Prof. Dr Atef El-Emary

Page 2: JAZAN UNIVERSITY COLLEGE OF ENGINEERING …colleges.jazanu.edu.sa/sites/en/eng/Documents/EngE511_Electrical... · COLLEGE OF ENGINEERING Electrical Engineering Department ... Admittance

Load flow and stability Atef elemary EngE511

Contents 1) Admittance matrix formation by inspection 2) Load flow using Gauss-Seidel method based on P-Q bus 3) Load flow using Gauss-Seidel method based on P-V bus 4) Load flow using Newton-Raphson method based on P-V bus 5) Fast Decoupled load flow based on P-V bus 6) Steady State stability-1 7) Steady State stability-2 8) Transient stability -1 9) Transient stability -2

Page 3: JAZAN UNIVERSITY COLLEGE OF ENGINEERING …colleges.jazanu.edu.sa/sites/en/eng/Documents/EngE511_Electrical... · COLLEGE OF ENGINEERING Electrical Engineering Department ... Admittance

Load flow and stability Atef elemary EngE511

Lab1

Formation of YBUS By inspection

The one line diagram of a simple three bus power system is shown in figure with generation at bus 1. The magnitude of voltage at bus 1 is adjusted to 1.05 pu. The scheduled loads at buses 2 and 3 are as marked on the diagram. Line impedances are marked on a 100 MVA base and the line charging susceptances are neglected. Construct the bus admittance matrix

Page 4: JAZAN UNIVERSITY COLLEGE OF ENGINEERING …colleges.jazanu.edu.sa/sites/en/eng/Documents/EngE511_Electrical... · COLLEGE OF ENGINEERING Electrical Engineering Department ... Admittance

Load flow and stability Atef elemary EngE511

% Forming Bus Admittance Matrix % Line code % Bus bus R X 1/2 B = 1 for lines % nl nr p.u. p.u. p.u. > 1 or < 1 tr. tap at bus nl linedata=[1 2 0.02 0.04 0.00000 1 1 3 0.01 0.03 0.00000 1 2 3 0.0125 0.025 0.00000 1]; nl=linedata(:,1); nr=linedata(:,2); R=linedata(:,3); X=linedata(:,4); nbr=length(linedata(:,1)); nbus = max(max(nl), max(nr)); Z = R + j*X; %branch impedance y= ones(nbr,1)./Z %branch admittance Ybus=zeros(nbus,nbus); % initialize Ybus to zero for k = 1:nbr; % formation of the off diagonal elements if nl(k) > 0 & nr(k) > 0 Ybus(nl(k),nr(k)) = Ybus(nl(k),nr(k)) - y(k); Ybus(nr(k),nl(k)) = Ybus(nl(k),nr(k)); end end for n = 1:nbus % formation of the diagonal elements for k = 1:nbr if nl(k) == n | nr(k) == n Ybus(n,n) = Ybus(n,n) + y(k); else, end end end fprintf(' admittance matrix\n') for n5 = 1:nbus for n6 = 1:nbus fprintf('%9.3f',real(Ybus(n5,n6))),fprintf('%9.3f',imag(Ybus(n5,n6))) end end c=Ybus

Page 5: JAZAN UNIVERSITY COLLEGE OF ENGINEERING …colleges.jazanu.edu.sa/sites/en/eng/Documents/EngE511_Electrical... · COLLEGE OF ENGINEERING Electrical Engineering Department ... Admittance

Load flow and stability Atef elemary EngE511

Lab 2

Load Flow by Gauss – Seidel Method

The one line diagram of a simple three bus power system is shown in figure with generation at bus 1. The magnitude of voltage at bus 1 is adjusted to 1.05 pu. The scheduled loads at buses 2 and 3 are as marked on the diagram. Line impedances are marked on a 100 MVA base and the line charging susceptances are neglected. Required:

a) Using the Gauss-Seidel method, the phasor values of the voltage at the load buses 2 and 3 (P-Q buses) accurate to four decimal places.

b) Find the slack bus real and reactive power c) Determine the line flows and line losses. Construct a power flow diagram

showing the direction of line flow

Page 6: JAZAN UNIVERSITY COLLEGE OF ENGINEERING …colleges.jazanu.edu.sa/sites/en/eng/Documents/EngE511_Electrical... · COLLEGE OF ENGINEERING Electrical Engineering Department ... Admittance

Load flow and stability Atef elemary EngE511

% LF P-Q Buses % Lab 2 y12=10-j*20; y13=10-j*30; y23=16-j*32; V1=1.05+j*0; iter =0; S2=-2.566-j*1.102; S3=-1.386-j*.452; V2=1+j*0; V3=1+j*0; for I=1:10 iter=iter+1; V2 = (conj(S2)/conj(V2)+y12*V1+y23*V3)/(y12+y23); V3 = (conj(S3)/conj(V3)+y13*V1+y23*V2)/(y13+y23); disp([iter, V2, V3]) end V2= .98-j*.06; V3= 1-j*.05; I12=y12*(V1-V2); I21=-I12; I13=y13*(V1-V3); I31=-I13; I23=y23*(V2-V3); I32=-I23; S12=V1*conj(I12); S21=V2*conj(I21); S13=V1*conj(I13); S31=V3*conj(I31); S23=V2*conj(I23); S32=V3*conj(I32); I1221=[I12,I21] I1331=[I13,I31] I2332=[I23,I32] S1221=[S12, S21 (S12+S13) S12+S21] S1331=[S13, S31 (S31+S32) S13+S31] S2332=[S23, S32 (S23+S21) S23+S32]

Page 7: JAZAN UNIVERSITY COLLEGE OF ENGINEERING …colleges.jazanu.edu.sa/sites/en/eng/Documents/EngE511_Electrical... · COLLEGE OF ENGINEERING Electrical Engineering Department ... Admittance

Load flow and stability Atef elemary EngE511

Lab4

Load Flow by Newton Raphson Method

(Voltage Controlled)

The one line diagram of a simple three bus power system is shown in figure with generators at bus 1 and 3. The magnitude of voltage at bus 1 is adjusted to 1.05 pu. Voltage magnitude at bus 3 is fixed at 1.04 pu with a real power generation of 200 MW. A load consisting of 400 MW and 250 Mvar is taken from bus 2. Line impedances are marked in per unit on a 100MVA base, and the line charging susceptances are neglected. Obtain the power flow solution by Newton Raphson method including line flows and line losses.

Page 8: JAZAN UNIVERSITY COLLEGE OF ENGINEERING …colleges.jazanu.edu.sa/sites/en/eng/Documents/EngE511_Electrical... · COLLEGE OF ENGINEERING Electrical Engineering Department ... Admittance

Load flow and stability Atef elemary EngE511

% Lab 4

% Newton-Raphson method LF Voltage controlled V = [1.05; 1.0; 1.04]; d = [0; 0; 0]; Ps=[-4; 2.0]; Qs= -2.5; YB = [ 20-j*50 -10+j*20 -10+j*30 -10+j*20 26-j*52 -16+j*32 -10+j*30 -16+j*32 26-j*62]; Y= abs(YB); t = angle(YB); iter=0; pwracur = 0.00025; % Power accuracy DC = 10; % Set the maximum power residual to a high value while max(abs(DC)) > pwracur iter = iter +1 P=[V(2)*V(1)*Y(2,1)*cos(t(2,1)-d(2)+d(1))+V(2)^2*Y(2,2)*cos(t(2,2))+ ... V(2)*V(3)*Y(2,3)*cos(t(2,3)-d(2)+d(3)); V(3)*V(1)*Y(3,1)*cos(t(3,1)-d(3)+d(1))+V(3)^2*Y(3,3)*cos(t(3,3))+ ... V(3)*V(2)*Y(3,2)*cos(t(3,2)-d(3)+d(2))]; Q= -V(2)*V(1)*Y(2,1)*sin(t(2,1)-d(2)+d(1))-V(2)^2*Y(2,2)*sin(t(2,2))- ... V(2)*V(3)*Y(2,3)*sin(t(2,3)-d(2)+d(3)); J(1,1)=V(2)*V(1)*Y(2,1)*sin(t(2,1)-d(2)+d(1))+... V(2)*V(3)*Y(2,3)*sin(t(2,3)-d(2)+d(3)); J(1,2)=-V(2)*V(3)*Y(2,3)*sin(t(2,3)-d(2)+d(3)); J(1,3)=V(1)*Y(2,1)*cos(t(2,1)-d(2)+d(1))+2*V(2)*Y(2,2)*cos(t(2,2))+... V(3)*Y(2,3)*cos(t(2,3)-d(2)+d(3)); J(2,1)=-V(3)*V(2)*Y(3,2)*sin(t(3,2)-d(3)+d(2)); J(2,2)=V(3)*V(1)*Y(3,1)*sin(t(3,1)-d(3)+d(1))+... V(3)*V(2)*Y(3,2)*sin(t(3,2)-d(3)+d(2)); J(2,3)=V(3)*Y(2,3)*cos(t(3,2)-d(3)+d(2)); J(3,1)=V(2)*V(1)*Y(2,1)*cos(t(2,1)-d(2)+d(1))+... V(2)*V(3)*Y(2,3)*cos(t(2,3)-d(2)+d(3)); J(3,2)=-V(2)*V(3)*Y(2,3)*cos(t(2,3)-d(2)+d(3)); J(3,3)=-V(1)*Y(2,1)*sin(t(2,1)-d(2)+d(1))-2*V(2)*Y(2,2)*sin(t(2,2))-... V(3)*Y(2,3)*sin(t(2,3)-d(2)+d(3)); DP = Ps - P; DQ = Qs - Q; DC = [DP; DQ] J DX = J\DC d(2) =d(2)+DX(1);

Page 9: JAZAN UNIVERSITY COLLEGE OF ENGINEERING …colleges.jazanu.edu.sa/sites/en/eng/Documents/EngE511_Electrical... · COLLEGE OF ENGINEERING Electrical Engineering Department ... Admittance

Load flow and stability Atef elemary EngE511

d(3)=d(3) +DX(2); V(2)= V(2)+DX(3); V, d, delta =180/pi*d; end P1=V(1)^2*Y(1,1)*cos(t(1,1))+V(1)*V(2)*Y(1,2)*cos(t(1,2)-d(1)+d(2))+ V(1)*V(3)*Y(1,3)*cos(t(1,3)-d(1)+d(3)) Q1=-V(1)^2*Y(1,1)*sin(t(1,1))-V(1)*V(2)*Y(1,2)*sin(t(1,2)-d(1)+d(2))- V(1)*V(3)*Y(1,3)*sin(t(1,3)-d(1)+d(3)) Q3=-V(3)*V(1)*Y(3,1)*sin(t(3,1)-d(3)+d(1))-V(3)*V(2)*Y(3,2)*... sin(t(3,2)-d(3)+d(2))-V(3)^2*Y(3,3)*sin(t(3,3))

Page 10: JAZAN UNIVERSITY COLLEGE OF ENGINEERING …colleges.jazanu.edu.sa/sites/en/eng/Documents/EngE511_Electrical... · COLLEGE OF ENGINEERING Electrical Engineering Department ... Admittance

Load flow and stability Atef elemary EngE511

Lab 5

Fast Decoupled Load Flow

(Voltage Controlled)

The one line diagram of a simple three bus power system is shown in figure with generators at bus 1 and 3. The magnitude of voltage at bus 1 is adjusted to 1.05 pu. Voltage magnitude at bus 3 is fixed at 1.04 pu with a real power generation of 200 MW. A load consisting of 400 MW and 250 Mvar is taken from bus 2. Line impedances are marked in per unit on a 100MVA base, and the line charging susceptances are neglected. Obtain the power flow solution by Fast Decoupled load Flow method including line flows and line losses.

Page 11: JAZAN UNIVERSITY COLLEGE OF ENGINEERING …colleges.jazanu.edu.sa/sites/en/eng/Documents/EngE511_Electrical... · COLLEGE OF ENGINEERING Electrical Engineering Department ... Admittance

Load flow and stability Atef elemary EngE511

% Lab 5

% Fast decoupled method, Voltage Controlled V1= 1.05; V2 = 1.0; V3 = 1.04; d1 = 0; d2 = 0; d3=0; Ps2=-4; Ps3 =2.0; Qs2= -2.5; YB = [ 20-j*50 -10+j*20 -10+j*30 -10+j*20 26-j*52 -16+j*32 -10+j*30 -16+j*32 26-j*62]; Y = abs(YB); t=angle(YB); B =[-52 32; 32 -62] Binv = inv(B) iter=0; pwracur = 0.0003; % Power accuracy DC = 10; % Set the max of power mismatch to a high value while max(abs(DC)) > pwracur iter = iter +1; P2= V2*V1*Y(2,1)*cos(t(2,1)-d2+d1)+V2^2*Y(2,2)*cos(t(2,2))+ ... V2*V3*Y(2,3)*cos(t(2,3)-d2+d3); P3= V3*V1*Y(3,1)*cos(t(3,1)-d3+d1)+V3^2*Y(3,3)*cos(t(3,3))+ ... V3*V2*Y(3,2)*cos(t(3,2)-d3+d2); Q2=-V2*V1*Y(2,1)*sin(t(2,1)-d2+d1)-V2^2*Y(2,2)*sin(t(2,2))- ... V2*V3*Y(2,3)*sin(t(2,3)-d2+d3); DP2 = Ps2 - P2; DP2V = DP2/V2; DP3 = Ps3 - P3; DP3V = DP3/V3; DQ2 = Qs2 - Q2; DQ2V = DQ2/V2; DC =[DP2; DP3; DQ2]; Dd = -Binv*[DP2V;DP3V]; DV = -1/B(1,1)*DQ2V; d2 =d2+Dd(1); d3 =d3+Dd(2); V2= V2+DV; angle2 =180/pi*d2; angle3 =180/pi*d3; R = [iter d2 d3 V2 DP2 DP3 DQ2]; disp(R) end Q3=-V3*V1*Y(3,1)*sin(t(3,1)-d3+d1)-V3^2*Y(3,3)*sin(t(3,3))- ... V3*V2*Y(3,2)*sin(t(3,2)-d3+d2); P1= V1^2*Y(1,1)*cos(t(1,1))+V1*V2*Y(1,2)*cos(t(1,2)-d1+d2)+ ... V1*V3*Y(1,3)*cos(t(1,3)-d1+d3); Q1=-V1^2*Y(1,1)*sin(t(1,1))-V1*V2*Y(1,2)*sin(t(1,2)-d1+d2)- ... V1*V3*Y(1,3)*sin(t(1,3)-d1+d3); S1=P1+j*Q1 Q3

Page 12: JAZAN UNIVERSITY COLLEGE OF ENGINEERING …colleges.jazanu.edu.sa/sites/en/eng/Documents/EngE511_Electrical... · COLLEGE OF ENGINEERING Electrical Engineering Department ... Admittance

Load flow and stability Atef elemary EngE511

Lab 3

Load flow using Gauss-Seidel based on voltage controlled bus

The one line diagram of a simple three bus power system is shown in figure with generators at bus 1 and 3. The magnitude of voltage at bus 1 is adjusted to 1.05 pu. Voltage magnitude at bus 3 is fixed at 1.04 pu with a real power generation of 200 MW. A load consisting of 400 MW and 250 Mvar is taken from bus 2. Line impedances are marked in per unit on a 100MVA base, and the line charging susceptances are neglected. Obtain the power flow solution by the Gauss- Seidel method including line flows and line losses.

Page 13: JAZAN UNIVERSITY COLLEGE OF ENGINEERING …colleges.jazanu.edu.sa/sites/en/eng/Documents/EngE511_Electrical... · COLLEGE OF ENGINEERING Electrical Engineering Department ... Admittance

Load flow and stability Atef elemary EngE511

% Lab 3

%LF Voltage control y12=10-j*20; y13=10-j*30; y23=16-j*32; y33=y13+y23; V1=1.05+j*0; format long iter =0; S2=-4.0-j*2.5; P3 = 2; V2=1+j*0; Vm3=1.04; V3=1.04+j*0; for I=1:10; iter=iter+1 E2 = V2; E3=V3; V2 = (conj(S2)/conj(V2)+y12*V1+y23*V3)/(y12+y23) DV2 = V2-E2 Q3 = -imag(conj(V3)*(y33*V3-y13*V1-y23*V2)) S3 = P3 +j*Q3; Vc3 = (conj(S3)/conj(V3)+y13*V1+y23*V2)/(y13+y23) Vi3 = imag(Vc3); Vr3= sqrt(Vm3^2 - Vi3^2); V3 = Vr3 + j*Vi3 DV3=V3-E3 end format short I12=y12*(V1-V2); I21=-I12; I13=y13*(V1-V3); I31=-I13; I23=y23*(V2-V3); I32=-I23; S12=V1*conj(I12); S21=V2*conj(I21); S13=V1*conj(I13); S31=V3*conj(I31); S23=V2*conj(I23); S32=V3*conj(I32); I1221=[I12,I21] I1331=[I13,I31] I2332=[I23,I32] S1221=[S12, S21 (S12+S13) S12+S21] S1331=[S13, S31 (S31+S32) S13+S31] S2332=[S23, S32 (S23+S21) S23+S32]

Page 14: JAZAN UNIVERSITY COLLEGE OF ENGINEERING …colleges.jazanu.edu.sa/sites/en/eng/Documents/EngE511_Electrical... · COLLEGE OF ENGINEERING Electrical Engineering Department ... Admittance

Load flow and stability Atef elemary EngE511

Lab 6

Steady State Stability

A 60 c/s synchronous generator having inertia constant H = 9.94 MJ/MVA and a transient reactance Xd

\ = 0.3 pu is connected to an infinite bus through a purely reactive circuit as shown in figure below. Reactances are marked on the diagram on a common system base. The generator is delivering real power of 0.6 pu, 0.8 power factor lagging to the infinite bus at a voltage of V = 1 pu. Assume the per unit damping power coefficient is D = 0.138, consider a small disturbance of Δδ = 10o = 0.1745 radian. For example, the breakers open and then quickly close. Obtain equations describing the motion of the rotor angle and the generator frequency.

Page 15: JAZAN UNIVERSITY COLLEGE OF ENGINEERING …colleges.jazanu.edu.sa/sites/en/eng/Documents/EngE511_Electrical... · COLLEGE OF ENGINEERING Electrical Engineering Department ... Admittance

Load flow and stability Atef elemary EngE511

% Lab 6 E = 1.35, V= 1.0; H= 9.94; X=0.65; Pm=0.6; D=0.138; f0 = 60; Pmax = E*V/X, d0 = asin(Pm/Pmax) % Max. power Ps = Pmax*cos(d0) % Synchronizing power coefficient wn = sqrt(pi*60/H*Ps) % Undamped frequency of oscillation z = D/2*sqrt(pi*60/(H*Ps)) % Damping ratio wd = wn*sqrt(1-z^2), fd = wd/(2*pi) %Damped frequency oscill. tau = 1/(z*wn) % Time constant th = acos(z) % Phase angle theta Dd0 = 10*pi/180; % Initial angle in radian t = 0:.01:3; Dd = Dd0/sqrt(1-z^2)*exp(-z*wn*t).*sin(wd*t + th); d = (d0+Dd)*180/pi; % Load angle in degree Dw = -wn*Dd0/sqrt(1-z^2)*exp(-z*wn*t).*sin(wd*t); f = f0 + Dw/(2*pi); % Frequency in Hz figure(1), subplot(2,1,1), plot(t, d), grid xlabel('t, sec'), ylabel('Delta, degree') subplot(2,1,2), plot(t,f), grid xlabel('t, sec'), ylabel('f, Hz') subplot(111) % using initial function state space equation A = [0 1; -wn^2 -2*z*wn]; % wn, z and t are defined earlier Dp=0.2; du= 3.79; % small step change in power input B = [0; 0]; % Column B zero-input C = [1 0; 0 1]; % Unity matrix defining output y as x1 and x2 D = [0; 0]; Dx0 = [Dd0; 0]; % Zero initial cond., Dd0 is defined earlier [y,x]= initial(A, B, C, D, Dx0, t); Dd = x(:, 1); Dw = x(:, 2); % State variables x1 and x2 d = (d0 + Dd)*180/pi; % Load angle in degree f = f0 + Dw/(2*pi); % Frequency in Hz figure(2), subplot(2,1,1), plot(t, d), grid xlabel('t, sec'), ylabel('Delta, degree') subplot(2,1,2), plot(t, f), grid xlabel('t, sec'), ylabel('f, Hz'), subplot(111)

Page 16: JAZAN UNIVERSITY COLLEGE OF ENGINEERING …colleges.jazanu.edu.sa/sites/en/eng/Documents/EngE511_Electrical... · COLLEGE OF ENGINEERING Electrical Engineering Department ... Admittance

Load flow and stability Atef elemary EngE511

Lab 7

Steady State stability

The generator of lab 6 is operating in the steady state at δo = 16.79o when the input power is increased by a small amount ΔP = 0.2 pu. The generator excitation and the infinite bus bar voltage are E' = 1.35 pu and V= 1.0 pu.

a) Obtain the step response for the rotor angle and the generator frequency b) Obtain the response using MATLAB step function c) Obtain a SIMULINK block diagram representation of the state space model

and simulate to obtain the response.

Page 17: JAZAN UNIVERSITY COLLEGE OF ENGINEERING …colleges.jazanu.edu.sa/sites/en/eng/Documents/EngE511_Electrical... · COLLEGE OF ENGINEERING Electrical Engineering Department ... Admittance

Load flow and stability Atef elemary EngE511

%Lab 7

%(a) Fault at the sending end. Both lines intact when fault is cleared Pm = 0.8; E= 1.17; V = 1.0; X1 = 0.65; X2 = inf; X3 = 0.65; eacfault(Pm, E, V, X1, X2, X3) %(b) Fault at the mid-point of one line. Faulted line is isolated X2 = 1.8; X3 = 0.8; eacfault(Pm, E, V, X1, X2, X3)

function eacfault(Pm, E, V, X1, X2, X3) % This program obtains the power angle curves for a one-machine system % before fault, during fault and after the fault clearance. % The equal area criterion is applied to find the critical clearing angle % for the machine to stay synchronized to the infinite bus bar % if exist('Pm')~=1 Pm = input('Generator output power in p.u. Pm = '); else, end if exist('E')~=1 E = input('Generator e.m.f. in p.u. E = '); else, end if exist('V')~=1 V = input('Infinite bus-bar voltage in p.u. V = '); else, end if exist('X1')~=1 X1 = input('Reactance before Fault in p.u. X1 = '); else, end if exist('X2')~=1 X2 = input('Reactance during Fault in p.u. X2 = '); else, end if exist('X3')~=1 X3 = input('Reactance aftere Fault in p.u. X3 = '); else, end Pe1max = E*V/X1; Pe2max=E*V/X2; Pe3max=E*V/X3; delta = 0:.01:pi; Pe1 = Pe1max*sin(delta); Pe2 = Pe2max*sin(delta); Pe3 = Pe3max*sin(delta); d0 =asin(Pm/Pe1max); dmax = pi-asin(Pm/Pe3max); cosdc = (Pm*(dmax-d0)+Pe3max*cos(dmax)-Pe2max*cos(d0))/(Pe3max-Pe2max); if abs(cosdc) > 1 fprintf('No critical clearing angle could be found.\n') fprintf('system can remain stable during this disturbance.\n\n') return else, end dc=acos(cosdc); if dc > dmax fprintf('No critical clearing angle could be found.\n') fprintf('System can remain stable during this disturbance.\n\n') return else, end Pmx=[0 pi-d0]*180/pi; Pmy=[Pm Pm]; x0=[d0 d0]*180/pi; y0=[0 Pm]; xc=[dc dc]*180/pi; yc=[0 Pe3max*sin(dc)]; xm=[dmax dmax]*180/pi; ym=[0 Pe3max*sin(dmax)];

Page 18: JAZAN UNIVERSITY COLLEGE OF ENGINEERING …colleges.jazanu.edu.sa/sites/en/eng/Documents/EngE511_Electrical... · COLLEGE OF ENGINEERING Electrical Engineering Department ... Admittance

Load flow and stability Atef elemary EngE511

d0=d0*180/pi; dmax=dmax*180/pi; dc=dc*180/pi; x=(d0:.1:dc); y=Pe2max*sin(x*pi/180); y1=Pe2max*sin(d0*pi/180); y2=Pe2max*sin(dc*pi/180); x=[d0 x dc]; y=[Pm y Pm]; xx=dc:.1:dmax; h=Pe3max*sin(xx*pi/180); xx=[dc xx dmax]; hh=[Pm h Pm]; delta=delta*180/pi; if X2 == inf fprintf('\nFor this case tc can be found from analytical formula. \n') H=input('To find tc enter Inertia Constant H, (or 0 to skip) H = '); if H ~= 0 d0r=d0*pi/180; dcr=dc*pi/180; tc = sqrt(2*H*(dcr-d0r)/(pi*60*Pm)); else, end else, end %clc fprintf('\nInitial power angle = %7.3f \n', d0) fprintf('Maximum angle swing = %7.3f \n', dmax) fprintf('Critical clearing angle = %7.3f \n\n', dc) if X2==inf & H~=0 fprintf('Critical clearing time = %7.3f sec. \n\n', tc) else, end h = figure; figure(h); fill(x,y,'m') hold; fill(xx,hh,'c') plot(delta, Pe1,'-', delta, Pe2,'r-', delta, Pe3,'g-', Pmx, Pmy,'b-', x0,y0, xc,yc, xm,ym), grid Title('Application of equal area criterion to a critically cleared system') xlabel('Power angle, degree'), ylabel(' Power, per unit') text(5, 1.07*Pm, 'Pm') text(50, 1.05*Pe1max,['Critical clearing angle = ',num2str(dc)]) axis([0 180 0 1.1*Pe1max]) hold off;

Page 19: JAZAN UNIVERSITY COLLEGE OF ENGINEERING …colleges.jazanu.edu.sa/sites/en/eng/Documents/EngE511_Electrical... · COLLEGE OF ENGINEERING Electrical Engineering Department ... Admittance

Load flow and stability Atef elemary EngE511

Simulink of Lab 7

Demux

DU=60*pi/(H*0.2) Sum

Sum

Simulink Block Diagram with step input disturbance, Lab 7

1/(2*pi )

rps to HZfrequency

60

f0

16.79

del ta0 delta

Step

x' = Ax+Bu y = Cx+Du

State-Space

180/pi

Rad to degree

Page 20: JAZAN UNIVERSITY COLLEGE OF ENGINEERING …colleges.jazanu.edu.sa/sites/en/eng/Documents/EngE511_Electrical... · COLLEGE OF ENGINEERING Electrical Engineering Department ... Admittance

Load flow and stability Atef elemary EngE511

Lab 8

Transient Stability

In the system of lab 7 a three phase fault at the middle of one line is cleared by isolating the faulted circuit simultaneously at both ends.

a) The fault is cleared in 0.3 second. Obtain the numerical solution of the swing equation for 1.0 second using the modified Euler method with a step size of Δt = 0.01 second. From the swing curve, determine the system stability.

b) Repeat part if fault is cleared in 0.5 second. c) Obtain a SIMULINK block diagram model for the swing equation, and

simulate for a fault clearing time of 0.3 and 0.5 second. Repeat the simulation until a critical clearing time is obtained.

Page 21: JAZAN UNIVERSITY COLLEGE OF ENGINEERING …colleges.jazanu.edu.sa/sites/en/eng/Documents/EngE511_Electrical... · COLLEGE OF ENGINEERING Electrical Engineering Department ... Admittance

Load flow and stability Atef elemary EngE511

Lab 8 %(a) Fault at the sending end. Both lines intact when fault is cleared Pm = 0.8; E= 1.17; V = 1.0; X1 = 0.65; X2 = inf; X3 = 0.65; eacfault(Pm, E, V, X1, X2, X3) %(b) Fault at the mid-point of one line. Faulted line is isolated X2 = 1.8; X3 = 0.8; eacfault(Pm, E, V, X1, X2, X3)

omga dot omga

Simulink of Lab 8

To change clearing time change tolerance time from switch (Ex: 0.3, 0.4 and 0.5 seconds )

1.46258*sin(u)

fault cl earSwitch

Step

180/pi

Rad to degree

Omga1s

Integrator1

1s

Integrator

pi*60/5

Gain1

0.65*sin(u)

During Fault

Delta

Clock

Page 22: JAZAN UNIVERSITY COLLEGE OF ENGINEERING …colleges.jazanu.edu.sa/sites/en/eng/Documents/EngE511_Electrical... · COLLEGE OF ENGINEERING Electrical Engineering Department ... Admittance

Load flow and stability Atef elemary EngE511

Lab 9 Transient Stability Based on 3 Phase Fault

A 60 c/s synchronous generator having inertia constant H = 5 MJ/MVA and a direct axis transient reactance Xd

\ = 0.3 pu is connected to an infinite bus through a purely reactive circuit as shown in figure below. Reactances are marked on the diagram on a common system base. The generator is delivering real power Pe = 0.8 pu and Q = 0.074 pu to the infinite bus as a voltage of V = 1 pu

a) A temporary 3 phase fault occurs at the sending of the line at point F. when the fault is cleared, both lines are intact. Determine the critical clearing angle and the critical fault clearing time.

b) A 3 phase fault occurs at the middle of one of the lines, the fault is cleared and the faulted line is isolated. Determine the critical clearing angle

Page 23: JAZAN UNIVERSITY COLLEGE OF ENGINEERING …colleges.jazanu.edu.sa/sites/en/eng/Documents/EngE511_Electrical... · COLLEGE OF ENGINEERING Electrical Engineering Department ... Admittance

Load flow and stability Atef elemary EngE511

Lab 9

Pm=0.8; E= 1.17; V= 1.0; X1=0.65; X2=1.8; X3= 0.8 %function eacfault(Pm, E, V, X1, X2, X3) % This program obtains the power angle curves for a one-machine system % before fault, during fault and after the fault clearance. % The equal area criterion is applied to find the critical clearing angle % for the machine to stay synchronized to the infinite bus bar % if exist('Pm')~=1 Pm = input('Generator output power in p.u. Pm = '); else, end if exist('E')~=1 E = input('Generator e.m.f. in p.u. E = '); else, end if exist('V')~=1 V = input('Infinite bus-bar voltage in p.u. V = '); else, end if exist('X1')~=1 X1 = input('Reactance before Fault in p.u. X1 = '); else, end if exist('X2')~=1 X2 = input('Reactance during Fault in p.u. X2 = '); else, end if exist('X3')~=1 X3 = input('Reactance aftere Fault in p.u. X3 = '); else, end Pe1max = E*V/X1; Pe2max=E*V/X2; Pe3max=E*V/X3; delta = 0:.01:pi; Pe1 = Pe1max*sin(delta); Pe2 = Pe2max*sin(delta); Pe3 = Pe3max*sin(delta); d0 =asin(Pm/Pe1max); dmax = pi-asin(Pm/Pe3max); cosdc = (Pm*(dmax-d0)+Pe3max*cos(dmax)-Pe2max*cos(d0))/(Pe3max-Pe2max); if abs(cosdc) > 1 fprintf('No critical clearing angle could be found.\n') fprintf('system can remain stable during this disturbance.\n\n') return else, end dc=acos(cosdc); if dc > dmax fprintf('No critical clearing angle could be found.\n') fprintf('System can remain stable during this disturbance.\n\n') return else, end Pmx=[0 pi-d0]*180/pi; Pmy=[Pm Pm]; x0=[d0 d0]*180/pi; y0=[0 Pm]; xc=[dc dc]*180/pi; yc=[0 Pe3max*sin(dc)]; xm=[dmax dmax]*180/pi; ym=[0 Pe3max*sin(dmax)]; d0=d0*180/pi; dmax=dmax*180/pi; dc=dc*180/pi; x=(d0:.1:dc); y=Pe2max*sin(x*pi/180); y1=Pe2max*sin(d0*pi/180); y2=Pe2max*sin(dc*pi/180); x=[d0 x dc];

Page 24: JAZAN UNIVERSITY COLLEGE OF ENGINEERING …colleges.jazanu.edu.sa/sites/en/eng/Documents/EngE511_Electrical... · COLLEGE OF ENGINEERING Electrical Engineering Department ... Admittance

Load flow and stability Atef elemary EngE511

y=[Pm y Pm]; xx=dc:.1:dmax; h=Pe3max*sin(xx*pi/180); xx=[dc xx dmax]; hh=[Pm h Pm]; delta=delta*180/pi; if X2 == inf fprintf('\nFor this case tc can be found from analytical formula. \n') H=input('To find tc enter Inertia Constant H, (or 0 to skip) H = '); if H ~= 0 d0r=d0*pi/180; dcr=dc*pi/180; tc = sqrt(2*H*(dcr-d0r)/(pi*60*Pm)); else, end else, end %clc fprintf('\nInitial power angle = %7.3f \n', d0) fprintf('Maximum angle swing = %7.3f \n', dmax) fprintf('Critical clearing angle = %7.3f \n\n', dc) if X2==inf & H~=0 fprintf('Critical clearing time = %7.3f sec. \n\n', tc) else, end h = figure; figure(h); fill(x,y,'m') hold; fill(xx,hh,'c') plot(delta, Pe1,'-', delta, Pe2,'r-', delta, Pe3,'g-', Pmx, Pmy,'b-', x0,y0, xc,yc, xm,ym), grid Title('Application of equal area criterion to a critically cleared system') xlabel('Power angle, degree'), ylabel(' Power, per unit') text(5, 1.07*Pm, 'Pm') text(50, 1.05*Pe1max,['Critical clearing angle = ',num2str(dc)]) axis([0 180 0 1.1*Pe1max]) hold off;