summaryrefslogtreecommitdiff
path: root/2372/CH1/EX1.1/ex1.sce
diff options
context:
space:
mode:
Diffstat (limited to '2372/CH1/EX1.1/ex1.sce')
-rw-r--r--2372/CH1/EX1.1/ex1.sce35
1 files changed, 35 insertions, 0 deletions
diff --git a/2372/CH1/EX1.1/ex1.sce b/2372/CH1/EX1.1/ex1.sce
new file mode 100644
index 000000000..96ceeb59e
--- /dev/null
+++ b/2372/CH1/EX1.1/ex1.sce
@@ -0,0 +1,35 @@
+clc;
+clear;
+data=[0 2 6; // column 1 and 2 for specifying the
+ 2 6 5; // time interval in hours
+ 6 9 10; // column 3 representing Load in MW
+ 9 12 15;
+ 12 14 12;
+ 14 16 14;
+ 16 18 16;
+ 18 20 18;
+ 20 22 16;
+ 22 23 12;
+ 23 24 6;];
+P=data(:,3);
+Dt=data(:,2)-data(:,1);
+W=P'*Dt;
+Pavg=W/sum(Dt);
+peak=max(P);
+LF=Pavg/peak*100;
+mprintf('avg load,Pavg=%4.2f MW\n',Pavg);
+mprintf('Peak load,Peak=%3.1f MW\n',peak);
+mprintf('load factor,LF=Pavg/Peak=%4.2f',LF);
+r=1;
+for(i=1:11)
+ x=data(i,1)+1;
+ y=data(i,2);
+ for(j=x:y)
+ bard(r)=data(i,3);
+ r=r+1;
+ end
+end
+bar(bard);
+xlabel("Time(in hrs)-->");
+ylabel("Power,P(in MW)-->");
+title("Daily load cycle based on given data");