diff options
author | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
---|---|---|
committer | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
commit | 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch) | |
tree | dbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /1430/CH9/EX9.5/exa9_5.sce | |
parent | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff) | |
download | Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2 Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip |
initial commit / add all books
Diffstat (limited to '1430/CH9/EX9.5/exa9_5.sce')
-rw-r--r-- | 1430/CH9/EX9.5/exa9_5.sce | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/1430/CH9/EX9.5/exa9_5.sce b/1430/CH9/EX9.5/exa9_5.sce new file mode 100644 index 000000000..1109ac911 --- /dev/null +++ b/1430/CH9/EX9.5/exa9_5.sce @@ -0,0 +1,40 @@ +// Example 9.5
+// Transients in an AM Radio signal
+// From figure 9.16(a)
+omega=15;
+L=1;
+R=26;
+Z_L=%i*omega*L
+V_s1=complex(6,0); // Voltage source phasor t<0
+V_s2=complex(12,0); // Voltage source phasor t>0
+I=V_s1/(R+Z_L); // Current phasor for t<0
+V=Z_L*I; // Voltage phasor for t<0
+I_m=abs(I); // current phasor magnitude
+phase_I= atan(imag(I),real(I))*(180/%pi);
+V_m=abs(V);
+phase_V=atan(imag(V),real(V))*(180/%pi);
+// since current has continuity
+I_0=I_m*cos(atan(imag(I),real(I)));
+// the initial value of v(t)
+V_0=V_s2-R*I_0; // KVL
+// Phasor analysis for t>0
+I_F=I*2;
+V_F=V*2;
+tau=L/R; // time constant
+I_F_0=abs(I_F)*cos(atan(imag(I_F),real(I_F))); // initial condition
+V_F_0=abs(V_F)*cos(atan(imag(V_F),real(V_F))); // initial condition
+A_I= I_0-I_F_0;
+A_V=V_0-V_F_0;
+t=0:0.01:10;
+i=abs(I_F)*cos(omega*t+atan(imag(I),real(I)))+A_I*exp(-t/tau);
+v=abs(V_F)*cos(omega*t+atan(imag(V),real(V)))+A_V*exp(-t/tau);
+subplot(2,1,1)
+plot(t,i,'-g')
+xlabel('t')
+ylabel('i(t)')
+title('Current waveform')
+subplot(2,1,2)
+plot(t,v,'-r')
+xlabel('t')
+ylabel('v(t)')
+title('Voltage waveform')
|