blob: 252c383195d1d9e5289bad8928b712a8e905683e (
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
|
// Regulation at laggiing leading and unity power factors
clc;
clear;
ol=0.01;// Ohmic loss is 1% of the output
// Output = V*I; Ohmic loss =(I^2)*R
//(I*R)/V = 0.01
rd=0.05; // Reactance drop is 5% of the output voltage
// Power Factors
pf1=0.8;// lag
pf2=1; // unity
pf3=0.8;// lead
deff('y=angle(x)','y=acosd(x)');// Function to find out the angle
// Angles
t1=angle(pf1);// Positive sign as it is lagging
t2=angle(pf2);
t3=-angle(pf3); // Minus sign as it is leading
deff('a=vr(b)','a=((ol*cosd(b))+(rd*sind(b)))*100');// Function to find out voltage regulation
printf('The voltage regulation percentages is as follows \n')
printf('a) For 0.8 p.f lag = %f percent \n',vr(t1))
printf('b) For unity p.f = %f percent \n',vr(t2))
printf('c) For 0.8 p.f lead = %f percent \n',vr(t3))
|