blob: 0562848e1057287879001050c0673ec264e19911 (
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
|
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 25 // read it as example 24 in the book on page 2.78
disp("CHAPTER 2");
disp("EXAMPLE 25");
//VARIABLE INITIALIZATION
V=350 //Amplitude in Volts
f=50 //frquency in Hz
t1=0.005 //sec after wave becomes zero again
t2=0.008 //sec after waves passes tgrough 0 in -ve direction
//SOLUTION
//e=Esinwt
//solution (a)
//RAmplitude at 1/600 second after it becomes zero
w=f*2*%pi; //angular speed
v1=V*sin(w*t1);
disp("SOLUTION (a)");
disp(sprintf("Voltage after %f sec is %3f A", t1,v1));
disp(" ");
//solution (b)
//since wave will pass in -ve direction after half period
hp=1/(2*f); //half period, the point where sine beomes zero again after origin
t=hp+t2;
v2=V*sin(w*t);
disp("SOLUTION (b)");
disp(sprintf("The voltage would be %f V %3f sec", v2,t));
//
//END
|