summaryrefslogtreecommitdiff
path: root/1430/CH6/EX6.5/exa6_5.sce
diff options
context:
space:
mode:
Diffstat (limited to '1430/CH6/EX6.5/exa6_5.sce')
-rw-r--r--1430/CH6/EX6.5/exa6_5.sce18
1 files changed, 18 insertions, 0 deletions
diff --git a/1430/CH6/EX6.5/exa6_5.sce b/1430/CH6/EX6.5/exa6_5.sce
new file mode 100644
index 000000000..b05ef6260
--- /dev/null
+++ b/1430/CH6/EX6.5/exa6_5.sce
@@ -0,0 +1,18 @@
+// Example 6.5
+// Capacitor Calculation
+C=25*10^-6;// Farad
+omega= 4000;// Radian frequency (rad/s)
+V_m=30;// Magnitude of voltage phasor
+phase_v=20; // Phase of the voltage source
+Z_c=1/(%i*omega*C);// Impedance of the capacitor
+Y_c=1/Z_c; // Admittance of the capacitor
+I_m=abs(Y_c)*V_m; // Ohm's Law,Magnitude of current phasor
+phase_c=atan(imag(Y_c),real(Y_c))*(180/%pi);
+phase_i=phase_c+phase_v;
+x_i=I_m*cos((%pi*phase_i)/180);// X-component of current phasor
+y_i=I_m*sin((%pi*phase_i)/180);//Y-component of current phasor
+I_c=complex(x_i,y_i); // Rectangular form of current through capacitor
+disp(I_c,"Current phasor in Rectangular form(Amps)=")
+disp("Current phasor in Polar form")
+disp(I_m,"Magnitude=")
+disp(phase_i,"Phase(in degree)=")