ps-1 manual

82
13BK1D0XX SPEC EXPERIMENT-1 AIM: To Develop MATLAB program for YBUS formation. SOFTWARE-REQUIRED: MATLAB:7.8 THEORY: Bus admittance is often used in power system studies. In most of the power system studies it is required to form y- bus matrix of the system by considering certain power system parameters depending upon the type of analysis. Y-bus may be formed by inspection method only if there is no mutual coupling between the lines. Every transmission line should be represented by p- equivalent. Shunt impedances are added to diagonal element corresponding to the buses at which these are connected. The off diagonal elements are unaffected. The equivalent circuit of Tap changing transformers is included while forming Y-bus matrix. FORMATION OF Y-BUS MATRIX: Generalized Y-bus = yii ……….. yid ydi ……… ydd where, Yii = Self admittance Ydi = Transfer admittance PROCEDURE: 1. Enter the command window of the MATLAB. 2. Create a new M – file by selecting File - New – M – File 3. Type and save the program in the editor window. 4. Execute the program by either pressing tools – Run. 5. View the results . 1 M.TECH EPS

Transcript of ps-1 manual

13BK1D0XX SPEC

EXPERIMENT-1

AIM: To Develop MATLAB program for YBUS formation.SOFTWARE-REQUIRED: MATLAB:7.8THEORY:Bus admittance is often used inpower systemstudies. In most of thepower systemstudies it is required to form y- bus matrix ofthe systemby considering certainpower systemparameters depending upon the type of analysis. Y-bus may be formed by inspectionmethod only if there is no mutualcouplingbetween the lines. Every transmission lineshould berepresentedby p- equivalent. Shunt impedances are added to diagonal element corresponding to the buses at which these are connected. The off diagonal elements are unaffected. The equivalent circuitof Tap changingtransformersis included while forming Y-bus matrix.

FORMATION OF Y-BUS MATRIX:Generalized Y-bus = yii .. yid ydi yddwhere, Yii = Self admittanceYdi =Transferadmittance

PROCEDURE:1. Enter the command window of the MATLAB.2. Create a new M file by selecting File - New M File3. Type and save the program in the editor window.4. Execute the program by either pressing tools Run.5. View theresults.PROGRAM:% loine data% bus bus R X 1/2B Tap% nl nr pu pu pulinedata=[1 2 0.02 0.04 0 1 1 3 0.01 0.03 0 1 2 3 0.0125 0.025 0 1];% This program obtains the Bus Admittance Matrix for power flow solutionj=sqrt(-1); i = sqrt(-1);nl = linedata(:,1); nr = linedata(:,2); R = linedata(:,3);X = linedata(:,4); Bc = j*linedata(:,5); a = linedata(:, 6);nbr=length(linedata(:,1)); nbus = max(max(nl), max(nr));Z = R + j*X; y= ones(nbr,1)./Z; %branch admittancefor n = 1:nbrif a(n) '); while nf nbus fprintf('Faulted bus No. must be between 1 & %g \n', nbus) nf = input('Enter Faulted Bus No. -> '); endfprintf('\nEnter Fault Impedance Zf = R + j*X in ')Zf = input('complex form (for bolted fault enter 0). Zf = ');fprintf(' \n')fprintf('Balanced three-phase fault at bus No. %g\n', nf)If = V0(nf)/(Zf + Zbus(nf, nf));Ifm = abs(If); Ifmang=angle(If)*180/pi;fprintf('Total fault current = %8.4f per unit \n\n', Ifm)%fprintf(' p.u. \n\n', Ifm)fprintf('Bus Voltages during fault in per unit \n\n')fprintf(' Bus Voltage Angle\n')fprintf(' No. Magnitude degrees\n')for n = 1:nbus if n==nf Vf(nf) = V0(nf)*Zf/(Zf + Zbus(nf,nf)); Vfm = abs(Vf(nf)); angv=angle(Vf(nf))*180/pi; else, Vf(n) = V0(n) - V0(n)*Zbus(n,nf)/(Zf + Zbus(nf,nf)); Vfm = abs(Vf(n)); angv=angle(Vf(n))*180/pi; end fprintf(' %4g', n), fprintf('%13.4f', Vfm),fprintf('%13.4f\n', angv)endfprintf(' \n')fprintf('Line currents for fault at bus No. %g\n\n', nf)fprintf(' From To Current Angle\n')fprintf(' Bus Bus Magnitude degrees\n')for n= 1:nbus %Ign=0; for I = 1:nbr if nl(I) == n | nr(I) == n if nl(I) ==n k = nr(I); elseif nr(I) == n k = nl(I); end if k==0 Ink = (V0(n) - Vf(n))/ZB(I); Inkm = abs(Ink); th=angle(Ink); %if th 0 fprintf(' G '), fprintf('%7g',n), fprintf('%12.4f', Inkm) fprintf('%12.4f\n', th*180/pi) elseif real(Ink) ==0 & imag(Ink) < 0 fprintf(' G '), fprintf('%7g',n), fprintf('%12.4f', Inkm) fprintf('%12.4f\n', th*180/pi) else, end Ign=Ink; elseif k ~= 0 Ink = (Vf(n) - Vf(k))/ZB(I)+BC(I)*Vf(n); %Ink = (Vf(n) - Vf(k))/ZB(I); Inkm = abs(Ink); th=angle(Ink); %Ign=Ign+Ink; %if th 0 fprintf('%7g', n), fprintf('%10g', k), fprintf('%12.4f', Inkm), fprintf('%12.4f\n', th*180/pi) elseif real(Ink) ==0 & imag(Ink) < 0 fprintf('%7g', n), fprintf('%10g', k), fprintf('%12.4f', Inkm), fprintf('%12.4f\n', th*180/pi) else, end else, end else, end end if n==nf fprintf('%7g',n), fprintf(' F'), fprintf('%12.4f', Ifm) fprintf('%12.4f\n', Ifmang) else, endend resp=0; while strcmp(resp, 'n')~=1 & strcmp(resp, 'N')~=1 & strcmp(resp, 'y')~=1 & strcmp(resp, 'Y')~=1 resp = input('Another fault location? Enter ''y'' or ''n'' within single quote -> '); if strcmp(resp, 'n')~=1 & strcmp(resp, 'N')~=1 & strcmp(resp, 'y')~=1 & strcmp(resp, 'Y')~=1 fprintf('\n Incorrect reply, try again \n\n'), end end if resp == 'y' | resp == 'Y' nf = 999; else ff = 0; endend % end for while

Programme for L-G fault calculations% The program lgfault is designed for the single line-to-ground% fault analysis of a power system network. The program requires% the positive-, negative- and zero-sequence bus impedance matrices,% Zbus1 Zbus2,and Zbus0.The bus impedances matrices may be defined% by the user, obtained by the inversion of Ybus or it may be% determined either from the function Zbus = zbuild(zdata)% or the function Zbus = zbuildpi(linedata, gendata, yload).% The program prompts the user to enter the faulted bus number% and the fault impedance Zf. The prefault bus voltages are% defined by the reserved Vector V. The array V may be defined or% it is returned from the power flow programs lfgauss, lfnewton,% decouple or perturb. If V does not exist the prefault bus voltages% are automatically set to 1.0 per unit. The program obtains the% total fault current, bus voltages and line currents during the fault.%function lgfault(zdata0, Zbus0, zdata1, Zbus1, zdata2, Zbus2, V)if exist('zdata2') ~= 1zdata2=zdata1;else, endif exist('Zbus2') ~= 1Zbus2=Zbus1;else, endnl = zdata1(:,1); nr = zdata1(:,2);nl0 = zdata0(:,1); nr0 = zdata0(:,2);nbr=length(zdata1(:,1)); nbus = max(max(nl), max(nr));nbr0=length(zdata0(:,1));R0 = zdata0(:,3); X0 = zdata0(:,4);R1 = zdata1(:,3); X1 = zdata1(:,4);R2 = zdata1(:,3); X2 = zdata1(:,4);for k=1:nbr0 if R0(k)==inf | X0(k) ==inf R0(k) = 99999999; X0(k) = 99999999; else, endendZB1 = R1 + j*X1; ZB0 = R0 + j*X0;ZB2 = R2 + j*X2;if exist('V') == 1 if length(V) == nbus V0 = V; else, endelse, V0 = ones(nbus, 1) + j*zeros(nbus, 1);endfprintf('\nLine-to-ground fault analysis \n')ff = 999;while ff > 0nf = input('Enter Faulted Bus No. -> ');while nf nbus fprintf('Faulted bus No. must be between 1 & %g \n', nbus) nf = input('Enter Faulted Bus No. -> '); endfprintf('\nEnter Fault Impedance Zf = R + j*X in ')Zf = input('complex form (for bolted fault enter 0). Zf = ');fprintf(' \n')fprintf('Single line to-ground fault at bus No. %g\n', nf)a =cos(2*pi/3)+j*sin(2*pi/3);sctm = [1 1 1; 1 a^2 a; 1 a a^2];Ia0 = V0(nf)/(Zbus1(nf,nf)+Zbus2(nf, nf)+ Zbus0(nf, nf)+3*Zf); Ia1=Ia0; Ia2=Ia0;I012=[Ia0; Ia1; Ia2];Ifabc = sctm*I012;Ifabcm = abs(Ifabc);fprintf('Total fault current = %9.4f per unit\n\n', Ifabcm(1))fprintf('Bus Voltages during the fault in per unit \n\n')fprintf(' Bus -------Voltage Magnitude------- \n')fprintf(' No. Phase a Phase b Phase c \n')for n = 1:nbusVf0(n)= 0 - Zbus0(n, nf)*Ia0;Vf1(n)= V0(n) - Zbus1(n, nf)*Ia1;Vf2(n)= 0 - Zbus2(n, nf)*Ia2;Vabc = sctm*[Vf0(n); Vf1(n); Vf2(n)];Va(n)=Vabc(1); Vb(n)=Vabc(2); Vc(n)=Vabc(3);fprintf(' %5g',n)fprintf(' %11.4f', abs(Va(n))),fprintf(' %11.4f', abs(Vb(n)))fprintf(' %11.4f\n', abs(Vc(n)))endfprintf(' \n')fprintf('Line currents for fault at bus No. %g\n\n', nf)fprintf(' From To -----Line Current Magnitude---- \n')fprintf(' Bus Bus Phase a Phase b Phase c \n')for n= 1:nbus for I = 1:nbr if nl(I) == n | nr(I) == n if nl(I) ==n k = nr(I); elseif nr(I) == n k = nl(I); end if k ~= 0 Ink1(n, k) = (Vf1(n) - Vf1(k))/ZB1(I); Ink2(n, k) = (Vf2(n) - Vf2(k))/ZB2(I); else, end else, end end for I = 1:nbr0 if nl0(I) == n | nr0(I) == n if nl0(I) ==n k = nr0(I); elseif nr0(I) == n k = nl0(I); end if k ~= 0 Ink0(n, k) = (Vf0(n) - Vf0(k))/ZB0(I); else, end else, end end for I = 1:nbr if nl(I) == n | nr(I) == n if nl(I) ==n k = nr(I); elseif nr(I) == n k = nl(I); end if k ~= 0 Inkabc = sctm*[Ink0(n, k); Ink1(n, k); Ink2(n, k)]; Inkabcm = abs(Inkabc); th=angle(Inkabc); if real(Inkabc(1)) > 0 fprintf('%7g', n), fprintf('%10g', k), fprintf(' %11.4f', abs(Inkabc(1))),fprintf(' %11.4f', abs(Inkabc(2))) fprintf(' %11.4f\n', abs(Inkabc(3))) elseif real(Inkabc(1)) ==0 & imag(Inkabc(1)) < 0 fprintf('%7g', n), fprintf('%10g', k), fprintf(' %11.4f', abs(Inkabc(1))),fprintf(' %11.4f', abs(Inkabc(2))) fprintf(' %11.4f\n', abs(Inkabc(3))) else, end else, end else, end end if n==nf fprintf('%7g',n), fprintf(' F'), fprintf(' %11.4f', Ifabcm(1)),fprintf(' %11.4f', Ifabcm(2)) fprintf(' %11.4f\n', Ifabcm(3)) else, endendresp=0; while strcmp(resp, 'n')~=1 & strcmp(resp, 'N')~=1 & strcmp(resp, 'y')~=1 & strcmp(resp, 'Y')~=1 resp = input('Another fault location? Enter ''y'' or ''n'' within single quote -> '); if strcmp(resp, 'n')~=1 & strcmp(resp, 'N')~=1 & strcmp(resp, 'y')~=1 & strcmp(resp, 'Y')~=1 fprintf('\n Incorrect reply, try again \n\n'), end end if resp == 'y' | resp == 'Y' nf = 999; else ff = 0; endend % end for while%Ink0%Ink1%Ink2

Programme for L-L fault calculations% The program llfault is designed for the line-to-line% fault analysis of a power system network. The program requires% the positive- and negative-sequence bus impedance matrices,% Zbus1, and Zbus2.The bus impedances matrices may be defined% by the user, obtained by the inversion of Ybus or it may be% determined either from the function Zbus = zbuild(zdata)% or the function Zbus = zbuildpi(linedata, gendata, yload).% The program prompts the user to enter the faulted bus number% and the fault impedance Zf. The prefault bus voltages are% defined by the reserved Vector V. The array V may be defined or% it is returned from the power flow programs lfgauss, lfnewton,% decouple or perturb. If V does not exist the prefault bus voltages% are automatically set to 1.0 per unit. The program obtains the% total fault current, bus voltages and line currents during the fault.%function llfault(zdata1, Zbus1, zdata2, Zbus2, V)if exist('zdata2') ~= 1zdata2=zdata1;else, endif exist('Zbus2') ~= 1Zbus2=Zbus1;else, endnl = zdata1(:,1); nr = zdata1(:,2);R1 = zdata1(:,3); X1 = zdata1(:,4);R2 = zdata2(:,3); X2 = zdata2(:,4);ZB1 = R1 + j*X1; ZB2 = R2 + j*X2;nbr=length(zdata1(:,1)); nbus = max(max(nl), max(nr));if exist('V') == 1 if length(V) == nbus V0 = V; else, endelse, V0 = ones(nbus, 1) + j*zeros(nbus, 1);endfprintf('\nLine-to-line fault analysis \n')ff = 999;while ff > 0nf = input('Enter Faulted Bus No. -> ');while nf nbus fprintf('Faulted bus No. must be between 1 & %g \n', nbus) nf = input('Enter Faulted Bus No. -> '); endfprintf('\nEnter Fault Impedance Zf = R + j*X in ')Zf = input('complex form (for bolted fault enter 0). Zf = ');fprintf(' \n')fprintf('Line-to-line fault at bus No. %g\n', nf)a =cos(2*pi/3)+j*sin(2*pi/3);sctm = [1 1 1; 1 a^2 a; 1 a a^2];Ia0=0;Ia1 = V0(nf)/(Zbus1(nf,nf)+Zbus2(nf, nf)+Zf); Ia2=-Ia1;I012=[Ia0; Ia1; Ia2];Ifabc = sctm*I012;Ifabcm = abs(Ifabc);fprintf('Total fault current = %9.4f per unit\n\n', Ifabcm(2))fprintf('Bus Voltages during the fault in per unit \n\n')fprintf(' Bus -------Voltage Magnitude------- \n')fprintf(' No. Phase a Phase b Phase c \n')for n = 1:nbusVf0(n)= 0;Vf1(n)= V0(n) - Zbus1(n, nf)*Ia1;Vf2(n)= 0 - Zbus2(n, nf)*Ia2;Vabc = sctm*[Vf0(n); Vf1(n); Vf2(n)];Va(n)=Vabc(1); Vb(n)=Vabc(2); Vc(n)=Vabc(3);fprintf(' %5g',n)fprintf(' %11.4f', abs(Va(n))),fprintf(' %11.4f', abs(Vb(n)))fprintf(' %11.4f\n', abs(Vc(n)))endfprintf(' \n')fprintf('Line currents for fault at bus No. %g\n\n', nf)fprintf(' From To -----Line Current Magnitude---- \n')fprintf(' Bus Bus Phase a Phase b Phase c \n')for n= 1:nbus for I = 1:nbr if nl(I) == n | nr(I) == n if nl(I) ==n k = nr(I); elseif nr(I) == n k = nl(I); end if k ~= 0 Ink0(n, k) = 0; Ink1(n, k) = (Vf1(n) - Vf1(k))/ZB1(I); Ink2(n, k) = (Vf2(n) - Vf2(k))/ZB2(I); Inkabc = sctm*[Ink0(n, k); Ink1(n, k); Ink2(n, k)]; Inkabcm = abs(Inkabc); th=angle(Inkabc); if real(Inkabc(2)) < 0 fprintf('%7g', n), fprintf('%10g', k), fprintf(' %11.4f', abs(Inkabc(1))),fprintf(' %11.4f', abs(Inkabc(2))) fprintf(' %11.4f\n', abs(Inkabc(3))) elseif real(Inkabc(2)) ==0 & imag(Inkabc(2)) > 0 fprintf('%7g', n), fprintf('%10g', k), fprintf(' %11.4f', abs(Inkabc(1))),fprintf(' %11.4f', abs(Inkabc(2))) fprintf(' %11.4f\n', abs(Inkabc(3))) else, end else, end else, end end if n==nf fprintf('%7g',n), fprintf(' F'), fprintf(' %11.4f', Ifabcm(1)),fprintf(' %11.4f', Ifabcm(2)) fprintf(' %11.4f\n', Ifabcm(3)) else, endendresp=0; while strcmp(resp, 'n')~=1 & strcmp(resp, 'N')~=1 & strcmp(resp, 'y')~=1 & strcmp(resp, 'Y')~=1 resp = input('Another fault location? Enter ''y'' or ''n'' within single quote -> '); if strcmp(resp, 'n')~=1 & strcmp(resp, 'N')~=1 & strcmp(resp, 'y')~=1 & strcmp(resp, 'Y')~=1 fprintf('\n Incorrect reply, try again \n\n'), end end if resp == 'y' | resp == 'Y' nf = 999; else ff = 0; endend % end for while Programme for LL-G fault calculations% The program dlgfault is designed for the double line-to-ground% fault analysis of a power system network. The program requires% the positive-, negative- or zero-sequence bus impedance matrices,% Zbus1 Zbus2,and Zbus0. The bus impedances matrices may be defined% by the user, obtained by the inversion of Ybus or it may be% determined either from the function Zbus = zbuild(zdata)% or the function Zbus = zbuildpi(linedata, gendata, yload).% The program prompts the user to enter the faulted bus number% and the fault impedance Zf. The prefault bus voltages are% defined by the reserved Vector V. The array V may be defined or% it is returned from the power flow programs lfgauss, lfnewton,% decouple or perturb. If V does not exist the prefault bus voltages% are automatically set to 1.0 per unit. The program obtains the% total fault current, bus voltages and line currents during the fault.%function dlgfault(zdata0, Zbus0, zdata1, Zbus1, zdata2, Zbus2, V)if exist('zdata2') ~= 1zdata2=zdata1;else, endif exist('Zbus2') ~= 1Zbus2=Zbus1;else, endnl = zdata1(:,1); nr = zdata1(:,2);nl0 = zdata0(:,1); nr0 = zdata0(:,2);nbr=length(zdata1(:,1)); nbus = max(max(nl), max(nr));nbr0=length(zdata0(:,1));R0 = zdata0(:,3); X0 = zdata0(:,4);R1 = zdata1(:,3); X1 = zdata1(:,4);R2 = zdata2(:,3); X2 = zdata2(:,4);for k = 1:nbr0 if R0(k) == inf | X0(k) == inf R0(k) = 99999999; X0(k) = 999999999; else, endendZB1 = R1 + j*X1; ZB0 = R0 + j*X0;ZB2 = R2 + j*X2;if exist('V') == 1 if length(V) == nbus V0 = V; else, endelse, V0 = ones(nbus, 1) + j*zeros(nbus, 1);endfprintf('\nDouble line-to-ground fault analysis \n')ff = 999;while ff > 0nf = input('Enter Faulted Bus No. -> ');while nf nbus fprintf('Faulted bus No. must be between 1 & %g \n', nbus) nf = input('Enter Faulted Bus No. -> '); endfprintf('\nEnter Fault Impedance Zf = R + j*X in ')Zf = input('complex form (for bolted fault enter 0). Zf = ');fprintf(' \n')fprintf('Double line-to-ground fault at bus No. %g\n', nf)a =cos(2*pi/3)+j*sin(2*pi/3);sctm = [1 1 1; 1 a^2 a; 1 a a^2];Z11 = Zbus2(nf, nf)*(Zbus0(nf, nf)+ 3*Zf)/(Zbus2(nf, nf)+Zbus0(nf, nf)+3*Zf);Ia1 = V0(nf)/(Zbus1(nf,nf)+Z11);Ia2 =-(V0(nf) - Zbus1(nf, nf)*Ia1)/Zbus2(nf,nf);Ia0 =-(V0(nf) - Zbus1(nf, nf)*Ia1)/(Zbus0(nf,nf)+3*Zf);I012=[Ia0; Ia1; Ia2];Ifabc = sctm*I012; Ifabcm=abs(Ifabc);Ift = Ifabc(2)+Ifabc(3);Iftm = abs(Ift);fprintf('Total fault current = %9.4f per unit\n\n', Iftm)fprintf('Bus Voltages during the fault in per unit \n\n')fprintf(' Bus -------Voltage Magnitude------- \n')fprintf(' No. Phase a Phase b Phase c \n')for n = 1:nbusVf0(n)= 0 - Zbus0(n, nf)*Ia0;Vf1(n)= V0(n) - Zbus1(n, nf)*Ia1;Vf2(n)= 0 - Zbus2(n, nf)*Ia2;Vabc = sctm*[Vf0(n); Vf1(n); Vf2(n)];Va(n)=Vabc(1); Vb(n)=Vabc(2); Vc(n)=Vabc(3);fprintf(' %5g',n)fprintf(' %11.4f', abs(Va(n))),fprintf(' %11.4f', abs(Vb(n)))fprintf(' %11.4f\n', abs(Vc(n)))endfprintf(' \n')fprintf('Line currents for fault at bus No. %g\n\n', nf)fprintf(' From To -----Line Current Magnitude---- \n')fprintf(' Bus Bus Phase a Phase b Phase c \n')for n= 1:nbus for I = 1:nbr if nl(I) == n | nr(I) == n if nl(I) ==n k = nr(I); elseif nr(I) == n k = nl(I); end if k ~= 0 Ink1(n, k) = (Vf1(n) - Vf1(k))/ZB1(I); Ink2(n, k) = (Vf2(n) - Vf2(k))/ZB2(I); else, end else, end end for I = 1:nbr0 if nl0(I) == n | nr0(I) == n if nl0(I) ==n k = nr0(I); elseif nr0(I) == n k = nl0(I); end if k ~= 0 Ink0(n, k) = (Vf0(n) - Vf0(k))/ZB0(I); else, end else, end end for I = 1:nbr if nl(I) == n | nr(I) == n if nl(I) ==n k = nr(I); elseif nr(I) == n k = nl(I); end if k ~= 0 Inkabc = sctm*[Ink0(n, k); Ink1(n, k); Ink2(n, k)]; Inkabcm = abs(Inkabc); th=angle(Inkabc); if real(Inkabc(2)) < 0 fprintf('%7g', n), fprintf('%10g', k), fprintf(' %11.4f', abs(Inkabc(1))),fprintf(' %11.4f', abs(Inkabc(2))) fprintf(' %11.4f\n', abs(Inkabc(3))) elseif real(Inkabc(2)) ==0 & imag(Inkabc(2)) > 0 fprintf('%7g', n), fprintf('%10g', k), fprintf(' %11.4f', abs(Inkabc(1))),fprintf(' %11.4f', abs(Inkabc(2))) fprintf(' %11.4f\n', abs(Inkabc(3))) else, end else, end else, end end if n==nf fprintf('%7g',n), fprintf(' F'), fprintf(' %11.4f', Ifabcm(1)),fprintf(' %11.4f', Ifabcm(2)) fprintf(' %11.4f\n', Ifabcm(3)) else, endendresp=0; while strcmp(resp, 'n')~=1 & strcmp(resp, 'N')~=1 & strcmp(resp, 'y')~=1 & strcmp(resp, 'Y')~=1 resp = input('Another fault location? Enter ''y'' or ''n'' within single quote -> '); if strcmp(resp, 'n')~=1 & strcmp(resp, 'N')~=1 & strcmp(resp, 'y')~=1 & strcmp(resp, 'Y')~=1 fprintf('\n Incorrect reply, try again \n\n'), end end if resp == 'y' | resp == 'Y' nf = 999; else ff = 0; endend % end for whileRESULT:Finally, became familiar with modelling and analysis ofpower systemsunder faulted condition andto compute the fault level, post-fault voltages and currents for different types of faults, bothsymmetric and unsymmetric.

Zbus1 =

0 + 0.1450i 0 + 0.1050i 0 + 0.1300i

0 + 0.1050i 0 + 0.1450i 0 + 0.1200i

0 + 0.1300i 0 + 0.1200i 0 + 0.2200i

Zbus0 =

0 + 0.1820i 0 + 0.0545i 0 + 0.1400i

0 + 0.0545i 0 + 0.0864i 0 + 0.0650i

0 + 0.1400i 0 + 0.0650i 0 + 0.3500i

Enter Faulted Bus No. -> 1Enter Fault Impedance Zf = R + j*X in complex form (for bolted fault enter 0). Zf = 0.1

Balanced three-phase fault at bus No. 1

Total fault current = 5.6773 per unit

Bus Voltages during fault in per unit

Bus Voltage Angle

No. Magnitude degrees

1 0.5677 -55.4077

2 0.6115 -33.6063

3 0.5741 -46.8769

Line currents for fault at bus No. 1

From To Current Angle

Bus Bus Magnitude degrees

G 1 3.2929 -55.4077

1 F 5.6773 -55.4077

G 2 2.3845 -55.4077

2 1 1.8167 -55.4077

2 3 0.5677 -55.4077

3 1 0.5677 -55.4077

Another fault location? Enter 'y' or 'n' within single quote -> 'y'

Enter Faulted Bus No. -> 2

Enter Fault Impedance Zf = R + j*X in complex form (for bolted fault enter 0). Zf = 0.1

Balanced three-phase fault at bus No. 2

Total fault current = 5.6773 per unit

Bus Voltages during fault in per unit

Bus Voltage Angle

No. Magnitude degrees

1 0.6115 -33.6063

2 0.5677 -55.4077

3 0.5852 -41.3715

Line currents for fault at bus No. 2

From To Current Angle

Bus Bus Magnitude degrees

G 1 2.3845 -55.4077

1 2 1.8167 -55.4077

1 3 0.5677 -55.4077

G 2 3.2929 -55.4077

2 F 5.6773 -55.4077

3 2 0.5677 -55.4077Another fault location? Enter 'y' or 'n' within single quote -> 'y'

Enter Faulted Bus No. -> 3

Enter Fault Impedance Zf = R + j*X in complex form (for bolted fault enter 0). Zf = 0.1

Balanced three-phase fault at bus No. 3

Total fault current = 4.1380 per unit

Bus Voltages during fault in per unit

Bus Voltage Angle

No. Magnitude degrees

1 0.5567 -23.5688

2 0.5852 -20.5560

3 0.4138 -65.5560

Line currents for fault at bus No. 3

From To Current Angle

Bus Bus Magnitude degrees

G 1 2.1518 -65.5560

1 3 2.4828 -65.5560

G 2 1.9863 -65.5560

2 1 0.3310 -65.5560

2 3 1.6552 -65.5560

3 F 4.1380 -65.5560

EXPERIMENT-6

AIM:To become familiar with various aspects of the transient andsmallsignal stability analysis of Single-Machine infinite Bus (SMIB)system.

PROGRAM-REQUIRED: MATLAB:7.8

THEORY:Stability:Stability problem is concerned with the behaviour ofpower systemwhen it is subjected todisturbanceand isclassifiedintosmallsignal stability problem if the disturbances aresmalland transientstability problem when the disturbances are large.Transientstability:When apower systemis under steady state, the load plus transmission loss equals to the generation inthe system. Thegenerating unitsrun a synchronous speed andsystem frequency, voltage, current and power flows are steady. When a largedisturbancesuch asthree phasefault, loss of load, loss of generation etc., occurs the power balance is upset and the generating unitsrotors experience either acceleration or deceleration.The systemmay come back to a steady state condition maintaining synchronism or it may break into subsystems or one or more machinesmay pull out of synchronism. In the former casethe systemis said to be stable and in the later case it is said to be unstable.Smallsignal stability:When apower systemis under steady state, normal operating condition, the systemmay be subjected tosmalldisturbancessuch asvariation in load and generation, change in field voltage, change in mechanical toque etc., The nature ofsystemresponse tosmall disturbancedepends on the operating conditions, the transmissionsystemstrength, types of controllers etc. Instability that may result fromsmalldisturbancemay be of two forms,(i) Steady increase in rotor angle due to lack of synchronising torque.(ii) Rotor oscillations of increasing magnitude due to lack of sufficient dampingtorque.

FORMULA:

PROCEDURE:1. Enter the command window of the MATLAB.2. Create a new M file by selecting File - New M File3. Type and save the program.4. Execute the program by either pressing tools Run5. View theresults.

EXERCISE:1. A 60Hz synchronous generator having inertia H = 5 constant J/MVA and a direct axistransientreactance Xd1 = 0.3 per unit is connected to an infinite bus through a purelyreactive circuit as shown in figure. Reactances are marked on the diagram on a commonsystembase.The generatoris delivering real power Pe = 0.8 per unit and Q = 0.074per unit to the infinite bus at a voltage of V = 1 per unit.

a) A temporary three-phasefault occurs at the sending end of the line at point F.Whenthe fault is cleared, both lines are intact. Determine the critical clearing angle andthe critical fault clearing time.b) Verify the result using MATLAB program.PROGRAM:% 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 barPm = 0.8; E = 1.17; V = 1.0;X1 = 0.65; X2 = inf; X3 = 0.65;

function eacfault(Pm, E, V, X1, X2, X3)if exist('Pm')~=1Pm = input('Generator output power in p.u. Pm = '); else, endif exist('E')~=1E = input('Generator e.m.f. in p.u. E = '); else, endif exist('V')~=1V = input('Infinite bus-bar voltage in p.u. V = '); else, endif exist('X1')~=1X1 = input('Reactance before Fault in p.u. X1 = '); else, endif exist('X2')~=1X2 = input('Reactance during Fault in p.u. X2 = '); else, endif exist('X3')~=1X3 = input('Reactance aftere Fault in p.u. X3 = '); else, endPe1max = 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, enddc=acos(cosdc);if dc > dmaxfprintf('No critical clearing angle could be found.\n') fprintf('System can remain stable during this disturbance.\n\n') return else, endPmx=[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];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 == inffprintf('\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, endelse, end%clcfprintf('\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~=0fprintf('Critical clearing time = %7.3f sec. \n\n', tc)else, endh = 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), gridTitle('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;CASE-II

Pm = 0.8; E = 1.17; V = 1.0;X1 = 0.65; X2 = 1.8; X3 = 0.8;eacfault(Pm, E, V, X1, X2, X3)

RESULT:Finally,became familiar with various aspects of thetransientandsmallsignal stability analysis of Single-Machine-Infinite Bus (SMIB)system.

EXPERIMENT-7

AIM:

To perform PSPICE simulation on the following converter circuits.

a) Single phase full converter with R load

b) Single phase full converter with R-L load

c) Single phase full converter with R-L-E load

APPARATUS:

PSPICE software

CIRCUIT DIAGRAM FOR R LOAD:

SUB CIRCUIT:

PROGRAM FOR R LOAD:

SINGLE PHASE FULL CONVERTER WITH R LOADVS 1 2 SIN(0 169.7 50)

VG1 3 7 PULSE(0 10 1666.6US 1NS 1NS 100US 20MS)

VG2 6 2 PULSE(0 10 1666.6US 1NS 1NS 100US 20MS)

VG3 4 7 PULSE(0 10 11666.6US 1NS 1NS 100US 20MS)

VG4 5 1 PULSE(0 10 11666.6US 1NS 1NS 100US 20MS)

XT1 1 7 3 7 SCR

XT2 0 2 6 2 SCR

XT3 2 7 4 7 SCR

XT4 0 1 5 1 SCR

R 7 0 10OHM

.SUBCKT SCR 1 2 3 2

S1 1 5 6 2 SMOD

RG 3 4 50OHM

VX 4 2 DC 0V

VY 5 7 DC 0V

DT 7 2 DMOD

RT 6 2 1OHM

CT 6 2 10UF

F1 2 6 POLY(2) VX VY 0 50 11

.MODEL SMOD VSWITCH (RON=0.0125 ROFF=10E+5 VON=0.5V VOFF=0V)

.MODEL DMOD D(IS=2.2F-15 BV=1800V TT=0)

.ENDS SCR

.TRAN 1US 60MS

.PROBE

.END

CIRCUIT DIAGRAM FOR R-L LOAD:

SUB CIRCUIT:

PROGRAM FOR R-L LOAD:

SINGLE PHASE FULL CONVERTER WITH R-L LOAD

VS 1 2 SIN(0 169.7 50)

VG1 3 7 PULSE(0 10 1666.6US 1NS 1NS 100US 20MS)

VG2 6 2 PULSE(0 10 1666.6US 1NS 1NS 100US 20MS)

VG3 4 7 PULSE(0 10 11666.6US 1NS 1NS 100US 20MS)

VG4 5 1 PULSE(0 10 11666.6US 1NS 1NS 100US 20MS)

XT1 1 7 3 7 SCR

XT2 0 2 6 2 SCR

XT3 2 7 4 7 SCR

XT4 0 1 5 1 SCR

R 7 8 10OHM

L 8 0 10MH

.SUBCKT SCR 1 2 3 2

S1 1 5 6 2 SMOD

RG 3 4 50OHM

VX 4 2 DC 0V

VY 5 7 DC 0V

DT 7 2 DMOD

RT 6 2 1OHM

CT 6 2 10UF

F1 2 6 POLY(2) VX VY 0 50 11

.MODEL SMOD VSWITCH (RON=0.0125 ROFF=10E+5 VON=0.5V VOFF=0V)

.MODEL DMOD D(IS=2.2F-15 BV=1800V TT=0)

.ENDS SCR

.TRAN 1US 60MS

.PROBE

.END

CIRCUIT DIAGRAM FOR R-L-E LOAD:

SUB CIRCUIT:

PROGREM FOR R-L-E LOAD:

SINGLE PHASEFULL CONVERTER WITH RLE-LOAD

VS 1 2 SIN(0 169.7 50)

VG1 3 7 PULSE(0 10 1666.6US 1NS 1NS 100US 20MS)

VG2 6 2 PULSE(0 10 1666.6US 1NS 1NS 100US 20MS)

VG3 4 7 PULSE(0 10 11666.6US 1NS 1NS 100US 20MS)

VG4 5 1 PULSE(0 10 11666.6US 1NS 1NS 100US 20MS)

XT1 1 7 3 7 SCR

XT2 0 2 6 2 SCR

XT3 2 7 4 7 SCR

XT4 0 1 5 1 SCR

R 7 8 10OHM

L 8 9 10MH

VE 9 0 DC 5V

.SUBCKT SCR 1 2 3 2

S1 1 5 6 2 SMOD

RG 3 4 50OHM

VX 4 2 DC 0V

VY 5 7 DC 0V

DT 7 2 DMOD

RT 6 2 1OHM

CT 6 2 10UF

F1 2 6 POLY(2) VX VY 0 50 11

.MODEL SMOD VSWITCH (RON=0.0125 ROFF=10E+5 VON=0.5V VOFF=0V)

.MODEL DMOD D(IS=2.2F-15 BV=1800V TT=0)

.ENDS SCR

.TRAN 1US 60MS

.PROBE

.ENDRESULT FOR R LOAD:

RESULT FOR R-L LOAD: RESULT FOR R-L-E LOAD:

EXPERIMENT-8AIM: To Develop MATLAB model for Sinusoidal Pulse Width Modulation.

SOFTWARE REQUIRED:MATLAB-(SIMULINK)-7.8Theory:

Bipolar PWM Modulation Approach

Bipolar PWM switching is a classical switching scheme for single-phase inverter. The switch pairs (T1, T4) and (T2, T3) in Figure 6.2 on the different legs are switched on and off simultaneously. This results a bipolar voltage output Vout because there is no zero output voltage state exists. The output waveform is the same as the point voltage V in Figure 1.2 but the amplitude doubles. The principle of bipolar PWM can be summarized in equation 2.1:

When

When

Figure 2.0 gives a demonstration of bipolar modulation approach with parameters mi=0.8 and mf=15. From the figure we know that VBO is exactly the reverse of VAO at any time, so there is no zero state in the output voltage Vout=VAO-VBO, which makes output signal bipolar. In this bipolar PWM modulation scheme, if the frequency modulation ratio is selected to be odd, the output waveform Vout will be odd and half-wave symmetry with origin. This results a disappearance of all the even harmonics in Vout. OPERATION OF UNIPOLAR SINUSOIDAL PWM TECHNIQUEIn a unipolar PWM modulation, the switch pairs (T1, T4) and (T2, T3) in inverter H-bridge are not switched simultaneously as in the bipolar approach. Instead, the leg A and B in Figure 6.3 are controlled independently by the comparison of two control signals Vcontrol1 and Vcontrol2 with the same carrier signal. Figure 2.2 illustrates the unipolar

PWM switching scheme and output voltage at mi=0.8 and mf=12

.

Figure 6.3 Unipolar PWM scheme and output

The switching algorithm of unipolar PWM is given in equation below: Vout=Vd when T1,T4 is on

Vout=-Vd when T2,T4 is on

Vout=0 when T1,T3 or T2,T4 From the above Figure 2.1 it is quite clear that the output voltage changes between 0 and +Vd or between 0 and - Vd in each half fundamental period, so this PWM scheme is called unipolar PWM. The voltage change at each switching transition is Vd in comparison with the 2Vd voltage change in bipolar PWM approach. Also in this PWM approach, it is possible to choose the frequency modulation ratio mf as even number to cancel the harmonic components at the switching frequency (fs ). OPERATION OF MODIFIED UNIPOLAR SINUSOIDAL PWM TECHNIQUE

A modified unipolar PWM approach, which is quite different from the traditional bipolar or unipolar PWM schemes, is presented in this section. The two legs in the H- Bridge of the single-phase inverter are switched at different frequencies: leg A is switched at the fundamental frequency f1 while leg B is switched at the carrier frequency fs , which is much higher than f1. This PWM switching scheme establishes an unbalanced switching speed between two legs of the inverter. It also generates a unipolar output voltage that changes between 0 and +Vdor between 0 and -Vd. Figure 6.4 is a demonstration of this modified unipolar PWM approach with parameters mi=0.8 and mf =15. To obtain odd and half-wave symmetry of the output voltage to suppress the even number harmonics, the frequency modulation ratio should be chosen as an odd integer in this PWM approach.

Modified unipolar PWM scheme and outputThe modified unipolar approach has the advantage of reducing high frequency electrical magnetic interference (EMI).As shown in Figure 6.4, unlike the previous two PWM approaches, the modulation signal Vcontrol in this modified unipolar PWM approach is a discontinuous signal.SIMULINK DIAGRAM:

RESULT

EXPERIMENT-9Aim: Developing MATLAB model for Closed Loop Speed Control of Separately Excited D.C

Motor.

Theory:The principle of speed control for dc motors is developed from the basic emf equation of the motors. Torque, flux current, induced emf, and speed are normalized to present the motor characteristics. Two types of control arc available: armature control and field control. These methods arc combined to yield a wide range of speed control. The torque-speed characteristics of the motor are discussed for both directions of rotation and delivering both motoring and regenerating torques in any direction of rotation. Such an operation, known as four quadrant operation, has a unique set of requirements on the input voltage and current to the dc motor armature and field. These requirements are identified for specifying the power stage [8]. Modern power converters constitute the

power stage for variable-speed dc drives. These power converters are chosen for a particular application depending on a number of factors such as cost, input power source, harmonics, power factor, noise, and speed of response Controlled-bridge rectifiers fed from single-phase and three-phase ac supply are considered in this chapter. The theory, operation and control of the three-phase controlled-bridge rectifier is considered in detail

because of its wide-spared use. A model for the power Converter is derived for use in simulation and controller design. Two and four quadrant dc motor drives and their control are developed.

Speed control techniques of separately excited dc motor: The speed of a separately excited dc motor could be varied from zero to rated speed mainly by varying armature voltage in the constant torque region. Whereas in the constant power region, field flux should be reduced to achieve speed above the rated speed. The motor drives a mechanical load characterized by inertia J, friction coefficient Dm, and load torque TL. The specifications of the dc motor are detailed as follows:Specifications

Shaft power 5 hp

Rated voltage 240 V

Armature resistance 0.6 _

Armature inductance 0.012 H

Field resistance 240 _

Field inductance 120 H

Total inertia (J) 1 kgm2

Viscous friction coefficient (B) 0.02 Nms

Coulomb friction torque (Tf) 0 Nma) Modeling and control of SEDM using MATLAB/SimPowerSystems: Fig. 1 shows the speed control circuit of an armature controlled separately excited dc motor using chopper circuit, and in Fig. its MATLLAB/SimPowerSystems model[31] is shown. It consists of a separately excited dc motor fed by a DC source through a chopper circuit. A single GTO thyristor with its control circuit and a free-wheeling diode form the chopper circuit. The motor drives a mechanical load characterized by inertia J, friction coefficient B, and load torque TL. The control circuit consists of a speed control loop and a current control loop. A proportional-integral (PI) controlled speed control loop senses the actual speed of the motor and compares it with the reference speed to determine the reference armature current required by the motor. One may note that any variation in the actual speed is a measure of the armature current required by the motor. The current control loop consists of a hysteresis current controller (HCC). The block diagram of a hysteresis current controller is shown in Fig.HCC is used to generate switching patterns required for the chopper circuit by comparing the actual current being drawn by the motor with the reference current. A positive pulse is generated if the actual current is less than reference armature current, whereas a negative pulse is produced if the actual current exceeds reference current.Hysteresis current control is a method of controlling a power electronic converter so that an output current is generated which follows a reference current waveform. A hysteresis current controller is implemented with a closed loop control. The difference

between the desired current, and the current being injected is used to control the switching of the chopper circuit. When the error reaches an upper limit namely upper hysteresis limit, GTO is switched to force the current the current down. On the other hand when the error reaches the lower hysteresis limit, a positive pulse is produced to increase the current. The minimum and maximum values of the error signal are emin and emax. The range of the error signal, emax-emin, directly controls the amount of ripple in the output current and is called the hysteresis band. Thus the armature current is forced to stay within the hysteresis band determined by the upper and lower hysteresis limits.

b) Modeling and control of SEDM using Simulink model: The speed control circuit of a SEDM using Simulink is shown in Fig. , where

VtSupply voltage (V)

EbBack emf (V)

RaArmature resistance ( )

LaArmature inductance (H)

RfField resistance ( )

LfField inductance (H)

IfField current (A)

IaArmature current (A)

wmSpeed (rad/s)

JRotor inertia of motot (kgm2)

DmViscous friction of motor (Nms)

In Fig.4, the GTO is modeled using a switch. The switch block has three inputs: the middle input controls which of the two other inputs is routed to the output. If the control input is one, 240 V is routed to the output, on the other hand if the control input is zero, a zero will be routed to the output.

\

Results:

Speed controller system based on NARMA-L2 controller has been successfully developed using MATLAB to control the speed of a separately excited dc motor.EXPERIMENT-10AIM: Simulation of RLC Circuit using PSPICE

APPARATUS:

PSPICE software

Theory:Linear Inductors in PSpiceThe next passive element we add to our parts list is the linear inductor. This part name begins with the letter, L, in column 1 of the source listing. Be aware that PSpice enables this part to access a nonlinear model description. That will be explained in a later tutorial. For now, our inductor model is a linear device incapable of saturation.The inductor stores energy in its magnetic field. This makes it necessary to be able to specify its initial current in a simulation. Although we can include inductors in DC circuit simulations, there is usually little advantage in doing so because the inductor behaves as a short circuit under steady-state DC excitation. In steady-state AC simulations the inductor behaves as an imaginary impedance. We do not specify initial current in an inductor in either of those steady-state conditions. However, when imulating transient operations, we often need to specify this initial current

The figure shown above shows the circuit symbol for an inductor with node designations of "1" and "2," n initial current of 2.5 A, and a value of 50 mH. An appropriate code listing for entering this element nto a PSpice circuit file is:

Note hat the initial current is assumed to flow from the first node in the node list through the inductor owards the second node in the node list. If there is a need to change the direction of this initial current, either reverse the order of the nodes in the node list or place a minus sign in front of the value of the nitial current. For better readability, the above line could be written as:

"H" for henrys and the "A" for amps will be ignored by PSpice.

Linear Capacitors in PSpiceThe capacitor is the second energy storing circuit component we add to our parts list. We will assume hat the capacitor is ideal in the sense of being linear and lossless. Since it can store energy, PSpice povides a method for specifying the initial voltage across the capacitor. This is useful for simulations of tansient behavior of circuits with capacitors. The figure shown below illustrates a capacitor with node designations and an initial voltage of 20 from node 4 to node 5. The part name for a capacitor must start with the letter C.

An appropriate code listing to represent this capacitor in a PSpice listing is:

The capacitance of the above element is 50F. This can be represented as "50u" in PSpice. (See PSpice utorial No. 1 for a description of the system for metric prefixes in PSpice.) Note that the polarity of the iitial voltage (as shown) is such that the positive side is the first node in the list with the negative side on the second node in the list. To reverse the polarity of the initial voltage for the simulation, either reverse the order of the nodes in the node list or place a minus sign in front of the value in the "IC=" phrase. For better clarity, the above capacitor could be coded as:

PSpice would ignore the "F" for farads and the "V" for volts.Circuit diagram:

Programe:

60 Hz AC Circuit

Vs 1 0 AC 120V 0

R 1 2 0.5

L 2 3 3.183mH

C 3 0 132.8uF

.AC LIN 1 60 60

.PRINT AC VM(3) VP(3) IM(Rm) IP(Rm) IM(Cx) IP(Cx)

.END

38

M.TECH EPS

_1237455442.unknown

_1237455472.unknown

_1237455489.unknown

_1237455329.unknown