summaryrefslogtreecommitdiff
path: root/83/CH5/EX5.3/example_5_3.sce
blob: 195c0b5c0b2cb91c1a4d53f3d4e319e8b5e718b6 (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
//Chapter 5
//Example 5.3
//page 135
//problem with mixed end condition
clc;clear;
Vr=3000; //receiving end voltage
pfs=0.8; //sending end power factor
Ps=2000*10^3; //sending end active power
z=0.4+%i*0.4; //series impedance
Ss=Ps/pfs; //sending end VA 
Qs=Ss*sqrt(1-pfs^2); //sending end reacive power

//by substituting all the values to the equation (iii)
deff('[y]=fx(I)',"y=(Vr^2)*(I^2)+2*Vr*(I^2)*(real(z)*((Ps-real(z)*(I^2))/Vr)+imag(z)*((Qs-imag(z)*(I^2))/Vr))+(abs(z))^2*(I^4)-(Ss^2)");
I=fsolve(100,fx);

pfR=(Ps-real(z)*(I^2))/(Vr*I); //Cos(phi_r)
Pr=Vr*I*pfR;
Vs=(Ps/(I*pfs));

printf('\nLoad Current |I|= %0.2f A',I);
printf('\nLoad Pr=%d W',Pr);
printf('\nReceiving end power factor=%0.2f',pfR);
printf('\nSupply Voltage=%0.2fV',Vs);