summaryrefslogtreecommitdiff
path: root/1430/CH6/EX6.3/exa6_3.sce
blob: 46ccd29940379667a61e02f9e89ee73f4edfa91b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Example 6.3
// Parallel Network with an AC Voltage Source
v_m=30; // Magnitude of voltage phasor
omega=4000; // radian frequency
phase_v=20; // Phase angle in degree
Z_r= 5; // Impedance of Resistance
C= 25*10^-6; // Capacitance
Z_c= 1/(%i*omega*C);// Impedance of Capacitance
i_r=v_m/Z_r; // Ohm's Law in Phasor form
i_c=v_m/abs(Z_c); // Ohm's Law in Phasor form
phase_r= phase_v;
phase_c=phase_v-(-90);
x_r=i_r*cos((%pi/180)*phase_r);
y_r=i_r*sin((%pi/180)*phase_r);
I_r=complex(x_r,y_r);
x_c=i_c*cos((%pi/180)*phase_c);
y_c=i_c*sin((%pi/180)*phase_c);
I_c=complex(x_c,y_c);
I=I_r+I_c;
disp(I,"Resultant Steady-state input current in rectangular form(Amps)=")