summaryrefslogtreecommitdiff
path: root/1430/CH6/EX6.17/exa6_17.sce
diff options
context:
space:
mode:
Diffstat (limited to '1430/CH6/EX6.17/exa6_17.sce')
-rw-r--r--1430/CH6/EX6.17/exa6_17.sce22
1 files changed, 22 insertions, 0 deletions
diff --git a/1430/CH6/EX6.17/exa6_17.sce b/1430/CH6/EX6.17/exa6_17.sce
new file mode 100644
index 000000000..3c7282760
--- /dev/null
+++ b/1430/CH6/EX6.17/exa6_17.sce
@@ -0,0 +1,22 @@
+// Example 6.17
+// AC Superposition Calculations
+// from figure 6.40(b),apply node equation we get
+V_c1=poly(0,'V_c1');
+P_1=(1/50+%i/10-%i/20)*V_c1-60/(%i*20); // Node equation
+V_c1=roots(P_1);
+// Now from figure 6.40(c)
+V_c2=poly(0,'V_c2');
+P_2=(1/50+%i/25-%i/8)*V_c2-(%i*3); // Node equation
+V_c2=roots(P_2);
+V_c1_m=abs(V_c1);
+phase_v_c1=atan(imag(V_c1),real(V_c1))*(180/%pi);
+V_c2_m=abs(V_c2);
+phase_v_c2=atan(imag(V_c2),real(V_c2))*(180/%pi);
+omega_1=5;
+omega_2=2;
+t=0:0.01:10;
+v_c=V_c1_m*cos(omega_1*t+phase_v_c1)+V_c2_m*cos(omega_2*t+phase_v_c2);
+plot(t,v_c,'r');
+xlabel('t');
+ylabel('v_c(t)')
+title('Voltage Waveform')