diff options
author | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
---|---|---|
committer | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
commit | 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch) | |
tree | dbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /3872/CH6/EX6.9/Ex6_9.sce | |
parent | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff) | |
download | Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2 Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip |
initial commit / add all books
Diffstat (limited to '3872/CH6/EX6.9/Ex6_9.sce')
-rw-r--r-- | 3872/CH6/EX6.9/Ex6_9.sce | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/3872/CH6/EX6.9/Ex6_9.sce b/3872/CH6/EX6.9/Ex6_9.sce new file mode 100644 index 000000000..4d8d8df14 --- /dev/null +++ b/3872/CH6/EX6.9/Ex6_9.sce @@ -0,0 +1,31 @@ +//Book - Power System: Analysis & Design 5th Edition
+//Authors - J. Duncan Glover, Mulukutla S. Sarma, and Thomas J. Overbye
+//Chapter - 6 ; Example 6.8
+//Scilab Version - 6.0.0 ; OS - Windows
+
+clc;
+clear;
+
+linedata=[2 4 0.0090 0.10 1.72 //Entering line data from table 6.2 & 6.3
+ 2 5 0.0045 0.05 0.88
+ 4 5 0.00225 0.025 0.44
+ 1 5 0.00150 0.02 0.00
+ 3 4 0.00075 0.01 0.00];
+
+sb= linedata(:,1);
+sb=linedata(:,1) //Starting bus number of all the lines stored in variable sb
+eb=linedata(:,2) //Ending bus number of all the lines stored in variable eb
+lz=linedata(:,3)+linedata(:,4)*%i; //lineimpedance=R+jX
+sa=linedata(:,5)*%i; //shunt admittance=jB since conductsnce G=0 for all lines
+nb=max(max(sb,eb));
+ybus=zeros(nb,nb);
+for i=1:length(sb)
+ m=sb(i);
+ n=eb(i);
+ ybus(m,m)=ybus(m,m)+1/lz(i)+sa(i)/2;
+ ybus(n,n)=ybus(n,n)+1/lz(i)+sa(i)/2;
+ ybus(m,n)=-1/lz(i);
+ ybus(n,m)=ybus(m,n);
+end
+disp(ybus(2,:),'The second row elements of Bus Admittance matrix are:')
+disp(ybus,'The Bus Admittance matrix is:')
|