summaryrefslogtreecommitdiff
path: root/1430/CH10/EX10.2/exa10_2.sce
diff options
context:
space:
mode:
Diffstat (limited to '1430/CH10/EX10.2/exa10_2.sce')
-rw-r--r--1430/CH10/EX10.2/exa10_2.sce21
1 files changed, 21 insertions, 0 deletions
diff --git a/1430/CH10/EX10.2/exa10_2.sce b/1430/CH10/EX10.2/exa10_2.sce
new file mode 100644
index 000000000..d7eeffde1
--- /dev/null
+++ b/1430/CH10/EX10.2/exa10_2.sce
@@ -0,0 +1,21 @@
+// Example 10.2
+// Calculations with Complex Frequency
+L=1;
+R=5;
+C=1/10;
+omega=4;
+V=complex(0,20);// Voltage phasor
+s=complex(-2,4);// complex frequency
+//from s-domain diagram , figure 10.2(b)
+Z=s*L+R/(s*C*R+1); // Terminal impedance
+Y=1/Z; // Terminal Admittance
+I=Y*V; // Current phasor
+I_m=abs(I);
+phase_I=atan(imag(I),real(I)); // in radian
+t=0:0.1:10
+i=I_m*exp(real(s)*t).*cos(omega*t-phase_I)
+disp(I,"Current Phasor(Amps)=")
+plot(t,i)
+xlabel('t')
+ylabel('i(t)')
+title("Current Waveform")