summaryrefslogtreecommitdiff
path: root/1418/CH27/EX27.15/EX27_15.sce
blob: 2af02d656a794355b5db82bd10072e807956eb0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//EXAMPLE 27.15
//DC MACHINE

clc;
funcprot(0);

//Variable Initialisation
V1n=270;......//Terminal voltage of first generator on no-load in Volts
V1l=220;....//Terminal voltage of first generator on load in Volts
I1=35;.......//Load current of first current in Amperes
V2n=280;...//Terminal voltage of second generator on no-load in Volts
V2l=220;.....//Terminal voltage of second generator on load in Volts
I2=50;......//Load current of second generator in Amperes
Itl=60;.......//Total load in Amperes

//GENERATOR 1
VI1=V1n-V1l;......//Voltage drop for 35 A in Volts
Vda1=VI1/I1;......//Voltage drop per ampere

//GENERATOR 2
Vda2=(V2n-V2l)/I2;.....//Voltage drop per ampere

//Solving for current output of both the generators in Amperes
A=[-5 4.2;1 1];
B=[35;60];
ans=A\B;
r1=round(ans(1)*10)/10;......//Current output of first generator in Amperes
r2=round(ans(2)*10)/10;.....//Current output of second generator in Amperes

disp(r1,"Current output of first generator in Amperes:");
disp(r2,"Current output of second generator in Amperes:");

V=V2n-(Vda2)*r2;.......//Bus bar voltage in Volts
r3=round(V*10)/10;......//Rounding of decimal places
disp(r3,"Bus bar voltage in Volts:");

Po1=r3*r1/1000;.....//Output of first generator in Kilo Watts
Po2=r3*r2/1000;......//Output of second generator in Kilo Watts

r4=round(Po1*1000)/1000;...//Rounding of decimal places
r5=round(Po2*1000)/1000;..//Rounding of decimal places

disp(r4,"Output of first generator in Kilo Watts:");
disp(r5,"Output of second generator in Kilo Watts:");