Voltage sags evaluation studies

35
FACULTY OF ENGINEERING (INDUSTRIAL ELECTRONIC AND CONTROL) Semester II Academic Session 2016 POWER QUALITY IN INDUSTRY (KXGK6104) ASSIGNMENT #1: VOLTAGE SAGS EVALUATION STUDIES KHAIRI AHMED ELRMALI KGK1500011 SUBMITTED TO:DR. HAZLIE BIN MOKHLIS

Transcript of Voltage sags evaluation studies

Page 1: Voltage sags evaluation studies

FACULTY OF ENGINEERING

(INDUSTRIAL ELECTRONIC AND CONTROL)

Semester II Academic Session 2016

POWER QUALITY IN INDUSTRY (KXGK6104)

ASSIGNMENT #1:

VOLTAGE SAGS EVALUATION STUDIES

KHAIRI AHMED ELRMALI KGK1500011

SUBMITTED TO:DR. HAZLIE BIN MOKHLIS

SUBMITTED DATE: 4TH JUNE 2016

Given below is an IEEE test system of 14-bus network:

Page 2: Voltage sags evaluation studies

Based on the data system given,figure 1 and 2 below are the Y-admittance matrix and Z impedance matrix using MATLAB software. Here are some coding to obtain these matrices;

% Program to form Admittance And Impedance Bus Formation...% Bus bus R X B/2 distance% fr to p.u p.u p.ulinedata=[ 1 2 0.01938 0.05917 0.0528/2 12 1 5 0.05403 0.22304 0.0492/2 35 2 3 0.04699 0.19797 0.0438/2 20 2 4 0.05811 0.17632 0.0374/2 18 2 5 0.05695 0.17388 0.034/2 23 3 4 0.06701 0.17103 0.0346/2 19 4 5 0.01335 0.04211 0.0128/2 5 4 7 0 0.20912 0 0 4 9 0 0.55618 0 0 5 6 0 0.25202 0 0 6 11 0.09498 0.1989 0 24 6 12 0.12291 0.25581 0 61 6 13 0.06615 0.13027 0 23 7 8 0 0.17615 0 0

Page 3: Voltage sags evaluation studies

7 9 0 0.11001 0 0 9 10 0.03181 0.0845 0 16 10 14 0.12711 0.27038 0 22 10 11 0.08205 0.19207 0 16 12 13 0.22092 0.19988 0 21 13 14 0.17093 0.34802 0 30];

%==============///### calculate voltage sag ###///====== % bus voltage anglev_bus = [1 1.06 0 2 1.045 -4.98 3 1.01 -12.72 4 1.019 -10.33 5 1.02 -8.78 6 1.07 -14.22 7 1.062 -13.37 8 1.09 -13.36 9 1.056 -14.94 10 1.051 -15.1 11 1.057 -14.79 12 1.055 -15.07 13 1.05 -15.16 14 1.036 -16.04]; %==============### Generator data ###========== % generator X capacity gendata = [ 1 0.12 250 2 0.15 100 3 0.10 80 6 0.15 50 8 0.1 50 ]; base = 100; % nl=linedata(:,1); % From bus number..% nr=linedata(:,2); % To bus number...% R=linedata(:,3); % Resistance, R...% X=linedata(:,4); % Reactance, X...

nbranch=length(linedata(:,1)); % no. of branches...nbus=max(v_bus(:,1)); % no. of buses...Zline=R+j*X; % Z matrix... y=ones(nbranch,1)./Zline; % To get inverse of each element...Y=zeros(nbus,nbus); % Initialize YBus...

Page 4: Voltage sags evaluation studies

% Formation of the Off Diagonal Elements...for k=1:nbranch; Y(linedata(k,1),linedata(k,2))= -1/Zline(k); Y(linedata(k,2),linedata(k,1))= -1/Zline(k);end

aaa = zeros(nbus,1); % Formation of Diagonal Elements....for k=1:nbus for l=1:nbranch if((k==linedata(l,1))||(k==linedata(l,2))) aaa(k,:)=1/(linedata(l,3)+linedata(l,4)*i+linedata(l,5)*i)+ aaa(k,:); Y(k,k)=aaa(k,:); end endend YY = Y; %========= To add generator sub-transient data into the Y matrixfor ia=1:nbus for ib = 1:length(gendata) if (ia == gendata(ib,1)) Y(ia,ia) = Y(ia,ia) + 1/(gendata(ib,2)*gendata(ib,3)/base) end endend Y; % Bus Admittance Matrix Z = inv(Y); % Bus Impedance Matrix

Page 5: Voltage sags evaluation studies

Figure 1: Y-admittance matrix(data workspace)

Page 6: Voltage sags evaluation studies

Figure 2: Z-impedance matrix (data workspace)

Question11. Calculate voltage sag at bus 5 and 14 when three-phase-fault occurs at each bus in the

system.The pre-fault voltage (per unit) of all buses are given below:

Page 7: Voltage sags evaluation studies

Voltage sag formula:

Data for the pre-fault voltage (p.u) of all the buses are convert into real and imaginary form;

Figure 4 is obtain from these coding below;% calculate anglefor ia = 1:nbus ang = v_bus(ia,3)*3.142/180; mag = v_bus(ia,2); [a,b] = pol2cart(ang,mag); v_bus_new(ia,:) = [a + b*i];end

Figure 3: Cartesian form

Figure 4 is obtain from these coding below;% voltage sag at 5 i_s = 5; for i_f = 1:nbus; V_val5(i_f,:) = v_bus_new(i_s,1) - v_bus_new(i_f,1)*Z(i_s,i_f)/Z(i_f,i_f);end V_val5

Figure 4 : voltage sag at 5

Figure5 is obtain from these coding below; % voltage sag at 14i_s = 14;

Page 8: Voltage sags evaluation studies

for i_f = 1:nbus; V_val14(i_f,:) = v_bus_new(i_s,1) - v_bus_new(i_f,1)*Z(i_s,i_f)/Z(i_f,i_f);end V_val14

Figure5: voltage sag at 14% %% polar formFigure 6 is obtain from these coding below; for ia=1:nbus [x1,y1] = cart2pol(real(V_val5(ia,1)),imag(V_val5(ia,1))); plot_y(ia,1) = y1; [x2,y2] = cart2pol(real(V_val14(ia,1)),imag(V_val14(ia,1))); plot_y(ia,2) = y2; end%

Vsag14Vsag5

1 2 3 4 5 6 7 8 9 10 11 12 13 140

0.5

1

1.5voltage sag at bus 5

line bus of system

volta

ge s

ag m

agni

tude

1 2 3 4 5 6 7 8 9 10 11 12 13 140

0.2

0.4

0.6

0.8

1

1.2

1.4voltage sag at bus 14

line bus of system

volta

ge s

ag m

agni

tude

Page 9: Voltage sags evaluation studies

Figure 6: Bar graph for both voltage sag at bus 5 and bus 14

Question2(a) Line 11 –10 and line 13 -14 is open.

Figure 7 and 8 are the Y-admittance and Z-impedance matrices when line 11-10 and line 13-14 are open

Page 10: Voltage sags evaluation studies

Figure 7: Y-admittance matrix when line 11-10 and line 13-14 is open

Page 11: Voltage sags evaluation studies

Figure 8: Z-impedance matrix when line 11-10 and line 13-14 is openFigure 9 and 10 are the values of both voltage sag at bus 5 and 14 respectively when the line 11-10 and line 13-14 are open.

Figure 9: Voltage sag at bus 5&14 when lines are open

1 2 3 4 5 6 7 8 9 10 11 12 13 140

0.5

1

1.5

system of 14-bus network

volta

ge s

ag m

agni

tude

Voltage sag at bus 5 line 11-10 & line 13-14 are open

1 2 3 4 5 6 7 8 9 10 11 12 13 140

0.2

0.4

0.6

0.8

1

1.2

1.4

system of 14 bus network

volta

ge s

ag m

agni

tude

voltage sag at 14 when line 10-11 and 13-14 are open

Page 12: Voltage sags evaluation studies

Figure 10: bar graph of voltage sag at bus 5&14 when lines are open

Figure 11 : comparison between voltage sag at bus 5&14 \Q2 cont....

(b) Generator at bus 6 and 8 are taken out from the system.

Figure 12 and 13 are the Y-admittance and Z-impedance when generator at bus 6 and 8 are taken out from the system.

1 2 3 4 5 6 7 8 9 10 11 12 13 140

0.2

0.4

0.6

0.8

1

1.2

1.4

system 14 bus network

volta

ge m

agni

tude

comparison between voltage sag at 14 present lines & open lines

1 2 3 4 5 6 7 8 9 10 11 12 13 140

0.5

1

1.5

system of 14 bus network

volta

ge s

ag m

agni

tude

Comparison between valtage sag at 5 present lines & open lines

Page 13: Voltage sags evaluation studies

Figure12: Y-admittance when generator at bus 6 and bus 8 are taken out from system

Page 14: Voltage sags evaluation studies

Figure13: Z-impedance when generator at bus 6 and bus 8 are taken out from system

Figure 14 and 15 are the values of voltage sag at bus 5 and 14 respectively when the generator 6 and 8 are taken out from the system.

Page 15: Voltage sags evaluation studies

Figure 14: voltage sag at bus 5 and 14 when generator are taken out

Figure 15 : comparison between voltage sag at bus 5&14

Question 3

*Short circuit event = 5 events/100km/year

Figure 16 is obtain from these coding below; for ia =1:nbranch

1 2 3 4 5 6 7 8 9 10 11 12 13 140

0.5

1

1.5

2

2.5

system of 14 bus network

volta

ge s

ag m

agni

tude

comparison between voltage sag at bus 5 present & generator taken out

1 2 3 4 5 6 7 8 9 10 11 12 13 140

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

2Comparison between voltage sag at 14 present & generator taken out

system of 14 bus network

volta

ge s

ag m

agni

tude

Page 16: Voltage sags evaluation studies

Event_data(ia,:) = [linedata(ia,:) linedata(ia,6)*5/100];end Event_data

Figure 16 :Expected V sag frequency

Estimation of voltage sag on a line can be calculated as the average of voltage sag between the two connected busses Figure 17 average of voltage sag between the two connected busses occurred at bus 5 & bus 14 for each lines. is obtain from these coding below; for ia = 1:nbranch Vol_Event_data5(ia,1)= (V_val5(linedata(ia,1),1) + V_val5(linedata(ia,2),1))/2;

Page 17: Voltage sags evaluation studies

Vol_Event_data14(ia,1)= (V_val14(linedata(ia,1),1) + V_val14(linedata(ia,2),1))/2; end for ia = 1:nbranch [x1,y1] = cart2pol (real(Vol_Event_data5(ia,1)),imag(Vol_Event_data5(ia,1))); V_event5(ia,1) = y1; [x1,y1] = cart2pol (real(Vol_Event_data14(ia,1)),imag(Vol_Event_data14(ia,1))); V_event14(ia,1) = y1; end Event_val = [linedata(:,1) linedata(:,2) Event_data(:,7) V_event5(:,1) V_event14(:,1)];

Figure 17 average of voltage sag occurred at bus 5 & bus 14 for each lines.

Page 18: Voltage sags evaluation studies

Estimation of voltage event under 50% of the nominal 1.0 p.u a year for Bus 5: Voltage sag < 0.5 : To obtain from these coding below”ib=1;ic=1; for ia=1:nbranch if(Event_val(ia,4)<0.5) %VOLTAGE AS SEEN AT BUS 5 store5(ib,:) = [Event_val(ia,1:4)]; ib = ib +1; end

Events_under_50_bus_5 = sum(store5(:,3))

Estimation of voltage event = 0.6 + 1.75 + 0.9 + 1.15 + 0.25 = 4.6500

Events_under_50_bus_5 =

4.6500

Estimation of voltage event under 50% of the nominal 1.0 p.u a year for Bus 14: Voltage sag < 0.5 : To obtain from these coding below”ib=1;ic=1; for ia=1:nbranch if(Event_val(ia,5)<0.5) %VOLTAGE AS SEEN ATBUS 14 store14(ic,:) = [Event_val(ia,1:3) Event_val(ia,5)]; ic = ic +1; endend

Page 19: Voltage sags evaluation studies

Events_under_50_bus_14= sum(store14(:,3)) % script fileEstimation of voltage event = 1.2 + 1.15 + 0.8 + 1.1 + 0.8 + 1.5 = 6.55Events_under_50_bus_14 = % script file

6.5500

Estimation of voltage event under 50%Question 4

1. Based on the analysis the number of voltage sag at bus 5 and bus 14 according to the sag magnitude level as in the following table (% nominal 1.0 pu).

Vsag (%) 0-10 10-20 20 - 30 30- 40 40 - 50 50- 60 60 70 70- 80 80 - 90 90- 100 Number of sag at

bus 53.50 1.15 0 0 0 0 0 1.0 0.95 0

Number of sag at bus 14

0 1.10 1.5 1.15 2.8 4.1 0.0 4.65 0.0 1.0

%% less than 10 percentib=1;ic=1; for ia=1:nbranch if(Event_val(ia,4)<0.1) store5_10(ib,:) = [Event_val(ia,1:4)]; ib = ib +1; end if(Event_val(ia,5)<0.1) store14_10(ic,:) = [Event_val(ia,1:3) Event_val(ia,5)]; ic = ic +1;

1 2 3 4 5 60

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8voltage event under 50% for Bus 5 & Bus 14

bus network

aver

age

volta

ge s

ag

Page 20: Voltage sags evaluation studies

endend if (ib <2) b5_10 = 0;else b5_10 = sum(store5_10(:,3));end if (ic <2 ) b14_10 = 0;else b14_10 = sum(store14_10(:,3));End

Q5

By analyzing from the above graph we have seen that in Figure below on the estimation of voltage event under 50% of the nominal a year for both bus 5 and 14, given that the value estimation for bus 5 is lower than the value estimation of bus 14 which is 4.65 and 6.55 respectively. To place a factory manufacturing electronic components, the place at bus 5 is more suitable place rather than at bus 14 since it gives lower voltage sags under the voltage event.

Page 21: Voltage sags evaluation studies

Q6 The number of voltage sags that can occur at your facility depends on where you're located, the characteristics of your utility's distribution system (underground vs. overhead, lengths of the distribution feeder circuits, and number of feeders), lightning level in the area, number of trees adjacent to the power lines, and several other factors.

For improve lines and area in proper stability, we should arrange some methods and steps thus system will back on its stability though fault is occurred in other lines. We have introduces capacitor bank or Super Capacitor in the transmission lines

Magnetic synthesizers, which are 3-phase devices that take advantage of their 3-phase magnetics to provide improved voltage sag support and regulation.

Useful link-http://ecmweb.com/content/dealing-voltage-sags-your-facility

Page 22: Voltage sags evaluation studies

clear allclc% Program to form Admittance And Impedance Bus Formation...% Bus bus R X B/2 distance% fr to p.u p.u p.ulinedata = [1 2 0.01938 0.05917 0.0528/2 12 1 5 0.05403 0.22304 0.0492/2 35 2 3 0.04699 0.19797 0.0438/2 20 2 4 0.05811 0.17632 0.0374/2 18 2 5 0.05695 0.17388 0.034/2 23 3 4 0.06701 0.17103 0.0346/2 19 4 5 0.01335 0.04211 0.0128/2 5 4 7 0 0.20912 0 0 4 9 0 0.55618 0 0 5 6 0 0.25202 0 0 6 11 0.09498 0.1989 0 24 6 12 0.12291 0.25581 0 61 6 13 0.06615 0.13027 0 23 7 8 0 0.17615 0 0 7 9 0 0.11001 0 0 9 10 0.03181 0.0845 0 16 10 14 0.12711 0.27038 0 22 10 11 0.08205 0.19207 0 16 12 13 0.22092 0.19988 0 21 13 14 0.17093 0.34802 0 30]; %==============///### calculate voltage sag ###///====== % bus voltage anglev_bus = [1 1.06 0 2 1.045 -4.98 3 1.01 -12.72 4 1.019 -10.33

Page 23: Voltage sags evaluation studies

5 1.02 -8.78 6 1.07 -14.22 7 1.062 -13.37 8 1.09 -13.36 9 1.056 -14.94 10 1.051 -15.1 11 1.057 -14.79 12 1.055 -15.07 13 1.05 -15.16 14 1.036 -16.04]; %==============### Generator data ###========== % generator X capacity gendata = [1 0.12 250 2 0.15 100 3 0.10 80 6 0.15 50 8 0.1 50]; base = 100; % nl=linedata(:,1); % From bus number..% nr=linedata(:,2); % To bus number...R=linedata(:,3); % Resistance, R...X=linedata(:,4); % Reactance, X...nbranch=length(linedata(:,1)); % no. of branches...nbus=max(v_bus(:,1)); % no. of buses...Zline=R+j*X; % Z matrix... y=ones(nbranch,1)./Zline; % To get inverse of each element...Y=zeros(nbus,nbus); % Initialise YBus... % Formation of the Off Diagonal Elements...for k=1:nbranch; Y(linedata(k,1),linedata(k,2))= -1/Zline(k); Y(linedata(k,2),linedata(k,1))= -1/Zline(k);end aaa = zeros(nbus,1); % Formation of Diagonal Elements....for k=1:nbus for l=1:nbranch if((k==linedata(l,1))||(k==linedata(l,2))) aaa(k,:)=1/(linedata(l,3)+linedata(l,4)*i+linedata(l,5)*i)+ aaa(k,:); Y(k,k)=aaa(k,:); end endend YY = Y; %========= To add generator sub-transient data into the Y matrixfor ia=1:nbus for ib = 1:length(gendata) if (ia == gendata(ib,1))

Page 24: Voltage sags evaluation studies

Y(ia,ia) = Y(ia,ia) + 1/(gendata(ib,2)*gendata(ib,3)/base); end endend Y; % Bus Admittance Matrix Z = inv(Y); % Bus Impedance Matrix % calculate anglefor ia = 1:nbus ang = v_bus(ia,3)*3.142/180; mag = v_bus(ia,2); [a,b] = pol2cart(ang,mag); v_bus_new(ia,:) = [a + b*i];end

%% Q 1 /// voltage sag calculation for faulted bus ////% voltage sag at 5 and 14 i_s = 5; for i_f = 1:nbus; %V_val5(i_f,:) = v_bus(i_s,2) - v_bus(i_f,2)*Z(i_s,i_f)/Z(i_f,i_f); V_val5(i_f,:) = v_bus_new(i_s,1) - v_bus_new(i_f,1)*Z(i_s,i_f)/Z(i_f,i_f);end V_val5; i_s = 14; for i_f = 1:nbus; %V_val10(i_f,:) = v_bus(i_s,2) - v_bus(i_f,2)*Z(i_s,i_f)/Z(i_f,i_f); V_val14(i_f,:) = v_bus_new(i_s,1) - v_bus_new(i_f,1)*Z(i_s,i_f)/Z(i_f,i_f);end V_val14;% % %% polar form for ia=1:nbus [x1,y1] = cart2pol(real(V_val5(ia,1)),imag(V_val5(ia,1))); plot_y(ia,1) = y1; [x2,y2] = cart2pol(real(V_val14(ia,1)),imag(V_val14(ia,1))); plot_y(ia,2) = y2;

Page 25: Voltage sags evaluation studies

end% %% Question 3 for ia =1:nbranch Event_data(ia,:) = [linedata(ia,:) linedata(ia,6)*5/100];end Event_data for ia = 1:nbranch Vol_Event_data5(ia,1)= (V_val5(linedata(ia,1),1) + V_val5(linedata(ia,2),1))/2; Vol_Event_data14(ia,1)= (V_val14(linedata(ia,1),1) + V_val14(linedata(ia,2),1))/2; end for ia = 1:nbranch [x1,y1] = cart2pol (real(Vol_Event_data5(ia,1)),imag(Vol_Event_data5(ia,1))); V_event5(ia,1) = y1; [x1,y1] = cart2pol (real(Vol_Event_data14(ia,1)),imag(Vol_Event_data14(ia,1))); V_event14(ia,1) = y1; end Event_val = [linedata(:,1) linedata(:,2) Event_data(:,7) V_event5(:,1) V_event14(:,1)]; ib=1;ic=1; for ia=1:nbranch if(Event_val(ia,4)<0.5) %VOLTAGE AS SEEN AT BUS 5 store5(ib,:) = [Event_val(ia,1:4)]; ib = ib +1; end if(Event_val(ia,5)<0.5) %VOLTAGE AS SEEN AT BUS 14 store14(ic,:) = [Event_val(ia,1:3) Event_val(ia,5)]; ic = ic +1; endend Events_under_50_bus_5 = sum(store5(:,3)) Events_under_50_bus_14= sum(store14(:,3))% % %%Question 4 %% less than 10 percent ib=1;ic=1; for ia=1:nbranch if(Event_val(ia,4)<0.1) store5_10(ib,:) = [Event_val(ia,1:4)];

Page 26: Voltage sags evaluation studies

ib = ib +1; end if(Event_val(ia,5)<0.1) store14_10(ic,:) = [Event_val(ia,1:3) Event_val(ia,5)]; ic = ic +1; end end if (ib <2) b5_10 = 0; else b5_10 = sum(store5_10(:,3));end if (ic <2 ) b14_10 = 0;else b14_10 = sum(store14_10(:,3));end

%% between 10 - 20 percentib=1;ic=1; for ia=1:nbranch if(Event_val(ia,4)>0.1 && Event_val(ia,4)<0.2) store5_20(ib,:) = [Event_val(ia,1:4)]; ib = ib +1; end if(Event_val(ia,5)>0.1 && Event_val(ia,5)<0.2) store14_20(ic,:) = [Event_val(ia,1:3) Event_val(ia,5)]; ic = ic +1; endend if (ib <2) b5_20 = 0; else b5_20 = sum(store5_20(:,3));end if (ic <2 ) b14_20 = 0;else b14_20 = sum(store14_20(:,3));end %% between 20 - 30 percentib=1;ic=1;

Page 27: Voltage sags evaluation studies

for ia=1:nbranch if(Event_val(ia,4)>0.2 && Event_val(ia,4)<0.3) store5_30(ib,:) = [Event_val(ia,1:4)]; ib = ib +1; end if(Event_val(ia,5)>0.2 && Event_val(ia,5)<0.3) store14_30(ic,:) = [Event_val(ia,1:3) Event_val(ia,5)]; ic = ic +1; endend if (ib <2) b5_30 = 0; else b5_30 = sum(store5_30(:,3));end if (ic <2 ) b14_30 = 0;else b14_30 = sum(store14_30(:,3));end %% between 30 - 40 percentib=1;ic=1; for ia=1:nbranch if(Event_val(ia,4)>0.3 && Event_val(ia,4)<0.4) store5_40(ib,:) = [Event_val(ia,1:4)]; ib = ib +1; end if(Event_val(ia,5)>0.3 && Event_val(ia,5)<0.4) store14_40(ic,:) = [Event_val(ia,1:3) Event_val(ia,5)]; ic = ic +1; endend if (ib <2) b5_40 = 0; else b5_40 = sum(store5_40(:,3));end if (ic <2 ) b14_40 = 0;else b14_40 = sum(store14_40(:,3));end%% between 40 - 50 percentib=1;ic=1;for ia=1:nbranch

Page 28: Voltage sags evaluation studies

if(Event_val(ia,4)>0.4 && Event_val(ia,4)<0.5) store5_50(ib,:) = [Event_val(ia,1:4)]; ib = ib +1; end if(Event_val(ia,5)>0.4 && Event_val(ia,5)<0.5) store14_50(ic,:) = [Event_val(ia,1:3) Event_val(ia,5)]; ic = ic +1; endend if (ib <2) b5_50 = 0; else b5_50 = sum(store5_50(:,3));end if (ic <2 ) b14_50 = 0;else b14_50 = sum(store14_50(:,3));end%% between 50 - 60 percentib=1;ic=1;for ia=1:nbranch if(Event_val(ia,4)>0.5 && Event_val(ia,4)<0.6) store5_60(ib,:) = [Event_val(ia,1:4)]; ib = ib +1; end if(Event_val(ia,5)>0.5 && Event_val(ia,5)<0.6) store14_60(ic,:) = [Event_val(ia,1:3) Event_val(ia,5)]; ic = ic +1; endend if (ib <2) b5_60 = 0; else b5_60 = sum(store5_60(:,3));end if (ic <2 ) b14_60 = 0;else b14_60 = sum(store14_60(:,3));end %% between 60 - 70 percentib=1;ic=1; for ia=1:nbranch if(Event_val(ia,4)>0.6 && Event_val(ia,4)<0.7)

Page 29: Voltage sags evaluation studies

store5_70(ib,:) = [Event_val(ia,1:4)]; ib = ib +1; end if(Event_val(ia,5)>0.6 && Event_val(ia,5)<0.7) store14_70(ic,:) = [Event_val(ia,1:3) Event_val(ia,5)]; ic = ic +1; endendif (ib <2) b5_70 = 0; else b5_70 = sum(store5_70(:,3));end if (ic <2 ) b14_70 = 0;else b14_70 = sum(store14_70(:,3));end %% between 70 - 80 percentib=1;ic=1; for ia=1:nbranch if(Event_val(ia,4)>0.7 && Event_val(ia,4)<0.8) store5_80(ib,:) = [Event_val(ia,1:4)]; ib = ib +1; end if(Event_val(ia,5)>0.7 && Event_val(ia,5)<0.8) store14_80(ic,:) = [Event_val(ia,1:3) Event_val(ia,5)]; ic = ic +1; endendif (ib <2) b5_80 = 0; else b5_80 = sum(store5_80(:,3));end if (ic <2 ) b14_80 = 0;else b14_80 = sum(store14_80(:,3));end%% between 80 - 90 percentib=1;ic=1; for ia=1:nbranch if(Event_val(ia,4)>0.8 && Event_val(ia,4)<0.9) store5_90(ib,:) = [Event_val(ia,1:4)]; ib = ib +1;

Page 30: Voltage sags evaluation studies

end if(Event_val(ia,5)>0.8 && Event_val(ia,5)<0.9) store14_90(ic,:) = [Event_val(ia,1:3) Event_val(ia,5)]; ic = ic +1; end end if (ib <2) b5_90 = 0; else b5_90 = sum(store5_90(:,3));end if (ic <2 ) b14_90 = 0;else b14_90 = sum(store14_90(:,3));end %% between 90 - 100 percentib=1;ic=1; for ia=1:nbranch if(Event_val(ia,4)>0.9 && Event_val(ia,4)<1) store5_100(ib,:) = [Event_val(ia,1:4)]; ib = ib +1; end if(Event_val(ia,5)>0.9 && Event_val(ia,5)<1) store14_100(ic,:) = [Event_val(ia,1:3) Event_val(ia,5)]; ic = ic +1; end end if (ib <2) b5_100 = 0; else b5_100 = sum(store5_100(:,3));end if (ic <2 ) b14_100 = 0;else b14_100 = sum(store14_100(:,3));end bus_5_sags = [b5_10 b5_20 b5_30 b5_40 b5_50 b5_60 b5_70 b5_80 b5_90 b5_100]bus_14_sags = [b14_10 b14_20 b14_30 b14_40 b14_50 b14_60 b14_70 b14_80 b14_90 b14_100]%% display for question 4

Page 31: Voltage sags evaluation studies

fprintf ('| Bus number | 0-10 | 10-20 | 20-30 | 30-40 | 40-50 | 50-60 | 60-70 | 70-80 | 80-90 | 90-100 |\n')fprintf ('| Bus_5 | %.3f | %.3f | %.3f | %.3f | %.3f | %.3f | %.3f | %.3f | %.3f | %.3f |\n',bus_5_sags)fprintf ('| Bus_14 | %.3f | %.3f | %.3f | %.3f | %.3f | %.3f | %.3f | %.3f | %.3f | %.3f |\n',bus_14_sags)