diff options
Diffstat (limited to '1430')
251 files changed, 3820 insertions, 0 deletions
diff --git a/1430/CH1/EX1.1/exa1_1.sce b/1430/CH1/EX1.1/exa1_1.sce new file mode 100644 index 000000000..0af113a66 --- /dev/null +++ b/1430/CH1/EX1.1/exa1_1.sce @@ -0,0 +1,10 @@ +// Example 1.1
+// charge Transfer and Average Current
+function[i]=f(t)
+ i=10*sin(%pi*t/2)
+endfunction // Current as a function of time
+q_T=intg(0,6,f); // Total charge is given by integrating area under the curve of // current vs time
+i_av=q_T/6;
+disp(q_T,"total charge Transfer is(in coulombs) =")
+disp(i_av,"Average current is (in Amps)=")
+
diff --git a/1430/CH1/EX1.1/exa1_1.txt b/1430/CH1/EX1.1/exa1_1.txt new file mode 100644 index 000000000..79b375c23 --- /dev/null +++ b/1430/CH1/EX1.1/exa1_1.txt @@ -0,0 +1,11 @@ +
+ -->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 1\exa1.1.sce', -1)
+
+ total charge Transfer is(in coulombs) =
+
+ 12.732395
+
+ Average current is (in Amps)=
+
+ 2.1220659
+
diff --git a/1430/CH1/EX1.10/exa1_10.sce b/1430/CH1/EX1.10/exa1_10.sce new file mode 100644 index 000000000..a657319ae --- /dev/null +++ b/1430/CH1/EX1.10/exa1_10.sce @@ -0,0 +1,10 @@ +// Example 1.10
+// Design of a Biasing Circuit
+// from figure 1.34, Applying KVL in left loop we get,
+v_a=12-4-5;//Voltage drop across R_a
+R_a=v_a/(20*10^-3);// Value of resistor R_a
+// Current through R_b
+i_b=(20-16)*(10^-3);
+R_b=5/i_b;//Value of resistor R_b
+disp(R_a,"Value of Resistor R_a(in Ohms)=")
+disp(R_b,"Value of Resistor R_b(in Ohms)=")
diff --git a/1430/CH1/EX1.10/exa1_10.txt b/1430/CH1/EX1.10/exa1_10.txt new file mode 100644 index 000000000..d96739659 --- /dev/null +++ b/1430/CH1/EX1.10/exa1_10.txt @@ -0,0 +1,12 @@ +
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 1\exa1.10.sce', -1)
+
+ Value of Resistor R_a(in Ohms)=
+
+ 150.
+
+ Value of Resistor R_b(in Ohms)=
+
+ 1250.
+
diff --git a/1430/CH1/EX1.2/exa1_2.sce b/1430/CH1/EX1.2/exa1_2.sce new file mode 100644 index 000000000..20ee7bda4 --- /dev/null +++ b/1430/CH1/EX1.2/exa1_2.sce @@ -0,0 +1,12 @@ +// Example 1.2
+// Capacity of a Battery
+p=12*4; // Instantaneous power consumed by the headlight (in Watt)
+w_T=48*60; // Energy supplied in one minute (in joule)
+q_T=w_T/12; // Total charge passing through the headlight in one minute(in coulombs)
+w_stored= 5*10^6;// Energy stored in battery(in Joules)
+q_stored=w_stored/12;
+Capacity=q_stored/3600;
+disp(w_T,"Energy supplied in one minute(in Joule)=")
+disp(q_T,"Charge transfer in one minute(in Coulumbs)=")
+disp(q_stored,"Total charge stored in Battery(in Coulumbs)=")
+disp(Capacity,"Capacity of Battery (in Ah)=")
diff --git a/1430/CH1/EX1.2/exa1_2.txt b/1430/CH1/EX1.2/exa1_2.txt new file mode 100644 index 000000000..70f166fe3 --- /dev/null +++ b/1430/CH1/EX1.2/exa1_2.txt @@ -0,0 +1,20 @@ +
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 1\exa1.2.sce', -1)
+
+ Energy supplied in one minute(in Joule)=
+
+ 2880.
+
+ Charge transfer in one minute(in Coulumbs)=
+
+ 240.
+
+ Total charge stored in Battery(in Coulumbs)=
+
+ 416666.67
+
+ Capacity of Battery (in Ah)=
+
+ 115.74074
+
diff --git a/1430/CH1/EX1.3/exa1_3.sce b/1430/CH1/EX1.3/exa1_3.sce new file mode 100644 index 000000000..3d00f33f0 --- /dev/null +++ b/1430/CH1/EX1.3/exa1_3.sce @@ -0,0 +1,8 @@ +// Example 1.3
+// Magnitude Manipulations
+P_max=20; // Maximum power rating of the device
+V_max=50; // Maximum voltage rating of the device in kV
+i_max=P_max/(V_max*10^3);// Maximum current that can be drawn from the device
+disp(P_max,"Maximum power rating of the device(in Watt)=")
+disp(V_max,"Maximum voltage rating of the device(in kV)=")
+disp(i_max,"Maximum current through the device(in Amps)=")
diff --git a/1430/CH1/EX1.3/exa1_3.txt b/1430/CH1/EX1.3/exa1_3.txt new file mode 100644 index 000000000..ff1a60a1c --- /dev/null +++ b/1430/CH1/EX1.3/exa1_3.txt @@ -0,0 +1,16 @@ +
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 1\exa1.3.sce', -1)
+
+ Maximum power rating of the device(in Watt)=
+
+ 20.
+
+ Maximum voltage rating of the device(in kV)=
+
+ 50.
+
+ Maximum current through the device(in Amps)=
+
+ 0.0004
+
diff --git a/1430/CH1/EX1.4/exa1_4.sce b/1430/CH1/EX1.4/exa1_4.sce new file mode 100644 index 000000000..fea2ed7bc --- /dev/null +++ b/1430/CH1/EX1.4/exa1_4.sce @@ -0,0 +1,6 @@ +// Example 1.4
+// Current and power calculation with help of i-v curve
+i=5; // i-v curve of Headlight and battery intersects at a point where i=5A
+v=12; //i-v curve of headlight and battery intersects at a point where v=12V
+p=v*i;//Power comsumed by the Headlight
+disp(p,"Power consumed by the Headlight (in Watt)=")
diff --git a/1430/CH1/EX1.4/exa1_4.txt b/1430/CH1/EX1.4/exa1_4.txt new file mode 100644 index 000000000..dbc246f1e --- /dev/null +++ b/1430/CH1/EX1.4/exa1_4.txt @@ -0,0 +1,7 @@ +
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 1\exa1.4.sce', -1)
+
+ Power consumed by the Headlight (in Watt)=
+
+ 60.
+
diff --git a/1430/CH1/EX1.5/exa1_5.sce b/1430/CH1/EX1.5/exa1_5.sce new file mode 100644 index 000000000..b87f41402 --- /dev/null +++ b/1430/CH1/EX1.5/exa1_5.sce @@ -0,0 +1,9 @@ +// Example 1.5
+// Voltage and Power Calculation
+i=4*10^-3; // Value of Current source
+R=5*10^3;// Value of series resistor
+// from ohm's law
+v=R*i; // Voltage across the Resistor
+p=v*i;// Power dissipated by the resistor
+disp(v,"Voltage across the resistor(in Volts)=")
+disp(p,"Power dissipated by the resistor(in Watt)=")
diff --git a/1430/CH1/EX1.5/exa1_5.txt b/1430/CH1/EX1.5/exa1_5.txt new file mode 100644 index 000000000..d1983181d --- /dev/null +++ b/1430/CH1/EX1.5/exa1_5.txt @@ -0,0 +1,11 @@ +
+ -->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 1\exa1.5.sce', -1)
+
+ Voltage across the resistor(in Volts)=
+
+ 20.
+
+ Power dissipated by the resistor(in Watt)=
+
+ 0.08
+
diff --git a/1430/CH1/EX1.6/exa1_6.sce b/1430/CH1/EX1.6/exa1_6.sce new file mode 100644 index 000000000..49bb7e8e2 --- /dev/null +++ b/1430/CH1/EX1.6/exa1_6.sce @@ -0,0 +1,11 @@ +// Example 1.6
+// A Strain Gauge
+function[delta_R]=Change_in_Resistance(R,delta_l,l) // R= Unstrained Resistance,delta_l= Change in length,l= Original Length
+ delta_R=2*R*(delta_l/l)
+endfunction
+// Exercise 1.10 to demonstrate example 1.6
+L=100;
+delta_L=0.1;
+Radius=0.002;
+delta_R=Change_in_Resistance(Radius,delta_L,L);
+disp(delta_R,"Change in Resistance(in Ohms)=")
diff --git a/1430/CH1/EX1.6/exa1_6.txt b/1430/CH1/EX1.6/exa1_6.txt new file mode 100644 index 000000000..3f82d773b --- /dev/null +++ b/1430/CH1/EX1.6/exa1_6.txt @@ -0,0 +1,7 @@ +
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 1\exa1.6.sce', -1)
+
+ Change in Resistance(in Ohms)=
+
+ 0.000004
+
diff --git a/1430/CH1/EX1.7/exa1_7.sce b/1430/CH1/EX1.7/exa1_7.sce new file mode 100644 index 000000000..634c13691 --- /dev/null +++ b/1430/CH1/EX1.7/exa1_7.sce @@ -0,0 +1,24 @@ +// Example 1.7
+// A Transistor Circuit
+// Enclosing the Transistor with a supernode and using KCL we get i_b as
+i_b=(10.5*10^-3)-(10*10^-3);
+// Applying KVL for the Loop CEBC we get
+v_ce=1+6;
+i_4=10*10^-3; // from the figure 1.29
+v_3=1; // from the figure 1.29
+// at node D
+i_1=i_4+(2*10^-3);
+// at node A
+i_3=(2*10^-3)-i_b;
+// Loop DCEFD
+v_4=9-v_ce
+// Loop AFDA
+v_2=v_3-9;
+disp(i_b,"Current in the Base of the Transistor,i_b(in Amps)=")
+disp(v_ce," Volatge across Collector-Emitter terminal,v_ce(in Volts)=")
+disp(i_4,"current through the Branch DC, i_4(in Amps)=")
+disp(v_3,"Voltage across the branch AF,v_3(in Volts)")
+disp(i_1,"Current through the Voltage source,i_1(in Amps)=")
+disp(i_3,"current through the branch AF,i_3(in Amps)=")
+disp(v_4,"Voltage across the Branch DC,v_4(in Volts)=")
+disp(v_2,"Voltage across the Current Source,v_2(in Volts)=")
diff --git a/1430/CH1/EX1.7/exa1_7.txt b/1430/CH1/EX1.7/exa1_7.txt new file mode 100644 index 000000000..34e1c1fdb --- /dev/null +++ b/1430/CH1/EX1.7/exa1_7.txt @@ -0,0 +1,36 @@ +
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 1\exa1.7.sce', -1)
+
+ Current in the Base of the Transistor,i_b(in Amps)=
+
+ 0.0005
+
+ Volatge across Collector-Emitter terminal,v_ce(in Volts)=
+
+ 7.
+
+ current through the Branch DC, i_4(in Amps)=
+
+ 0.01
+
+ Voltage across the branch AF,v_3(in Volts)
+
+ 1.
+
+ Current through the Voltage source,i_1(in Amps)=
+
+ 0.012
+
+ current through the branch AF,i_3(in Amps)=
+
+ 0.0015
+
+ Voltage across the Branch DC,v_4(in Volts)=
+
+ 2.
+
+ Voltage across the Current Source,v_2(in Volts)=
+
+ - 8.
+
+
diff --git a/1430/CH1/EX1.8/exa1_8.sce b/1430/CH1/EX1.8/exa1_8.sce new file mode 100644 index 000000000..4ec9b7864 --- /dev/null +++ b/1430/CH1/EX1.8/exa1_8.sce @@ -0,0 +1,15 @@ +// Example 1.8
+// Series and Parallel Source Connections
+// From figure 1.32(a)
+v_x=10; // Voltage across two terminal passive device
+i_x=2.5;// Current across two terminal passive device
+// Applying KVL around the loop
+v_r=12-v_x;// Voltage across the Series resistor
+//Since Series resistor carries the same current as carried by unknown two terminal
+//device we get,
+R_ser=v_r/i_x;
+// from figure 1.32(b)
+i_R=3-i_x; // Current through the Parallel Resistor
+R_par=v_x/i_R;
+disp(R_ser,"Value of Series connected resistor(in Ohms)=")
+disp(R_par,"Value of Parallel connected resistor(in Ohms)=")
diff --git a/1430/CH1/EX1.8/exa1_8.txt b/1430/CH1/EX1.8/exa1_8.txt new file mode 100644 index 000000000..1c2941f08 --- /dev/null +++ b/1430/CH1/EX1.8/exa1_8.txt @@ -0,0 +1,11 @@ +
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 1\exa1.8.sce', -1)
+
+ Value of Series connected resistor(in Ohms)=
+
+ 0.8
+
+ Value of Parallel connected resistor(in Ohms)=
+
+ 20.
+
diff --git a/1430/CH1/EX1.9/exa1_9.sce b/1430/CH1/EX1.9/exa1_9.sce new file mode 100644 index 000000000..9d9cf20eb --- /dev/null +++ b/1430/CH1/EX1.9/exa1_9.sce @@ -0,0 +1,21 @@ +// Example 1.9
+//Calculating Branch Variables
+// From fig 1.33
+v_4=24;
+i_4=v_4/8; // current through 8 Ohm resistor
+v_3=7*i_4;
+// Applying KVL around the Loop on the right
+v_2=v_3+v_4;// Voltage across Current source
+v_1=v_2-25;// voltage across 10 Ohm resistor
+i_2=v_2/9;//Current across 9 Ohm resistor
+i_1=-v_1/10;// Current across 10 Ohm resistor
+p_v=25*i_1;// Power supplied by the Voltage Source
+i_s=i_2+i_4-i_1;// Current supplied by current source
+// Power supplied by Current source is given by,
+p_i=v_2*i_s;
+// Power Dissipated aross various Resistors
+p_r=10*(i_1)^2+9*(i_2)^2+7*(i_4)^2+8*(i_4)^2;
+disp(i_s,"Current supplied by Current source(in Amps)=")
+disp(p_v,"Power supplied by Voltage source(in Watt)=")
+disp(p_i,"Power supplied by Current source(in Watt)=")
+disp(p_r,"Power Dissipated across various Resistors(in Watt)=")
diff --git a/1430/CH1/EX1.9/exa1_9.txt b/1430/CH1/EX1.9/exa1_9.txt new file mode 100644 index 000000000..aa201b9a4 --- /dev/null +++ b/1430/CH1/EX1.9/exa1_9.txt @@ -0,0 +1,20 @@ +
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 1\exa1.9.sce', -1)
+
+ Current supplied by Current source(in Amps)=
+
+ 10.
+
+ Power supplied by Voltage source(in Watt)=
+
+ - 50.
+
+ Power supplied by Current source(in Watt)=
+
+ 450.
+
+ Power Dissipated across various Resistors(in Watt)=
+
+ 400.
+
diff --git a/1430/CH10/EX10.1/exa10_1.sce b/1430/CH10/EX10.1/exa10_1.sce new file mode 100644 index 000000000..e72853269 --- /dev/null +++ b/1430/CH10/EX10.1/exa10_1.sce @@ -0,0 +1,16 @@ +// Example 10.1
+// A complex-Frequency Waveform
+// we want the complex frequency waveform representation of
+// i(t)=200*exp(-5*t).*cos(30*t+60)mA
+// Examining the above expression
+I_m=200*10^-3;
+sigma=-5;
+omega=30;
+phase_i=60; // In degree
+x_I=I_m*cos(phase_i*(%pi/180));
+y_I=I_m*sin(phase_i*(%pi/180));
+I=complex(x_I,y_I); // Current Phasor
+s=complex(sigma,omega);
+disp("Complex-frequency representation")
+disp(I,"Current phasor(Amps)=")
+disp(s,"Complex-frequency")
diff --git a/1430/CH10/EX10.1/exa10_1.txt b/1430/CH10/EX10.1/exa10_1.txt new file mode 100644 index 000000000..6e6a54efe --- /dev/null +++ b/1430/CH10/EX10.1/exa10_1.txt @@ -0,0 +1,15 @@ +
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 10\exa10_1.sce', -1)
+
+ Complex-frequency representation
+
+ Current phasor(Amps)=
+
+ 0.1 + 0.1732051i
+
+ Complex-frequency
+
+ - 5. + 30.i
+
+
diff --git a/1430/CH10/EX10.11/exa10_11.sce b/1430/CH10/EX10.11/exa10_11.sce new file mode 100644 index 000000000..d30c60cf0 --- /dev/null +++ b/1430/CH10/EX10.11/exa10_11.sce @@ -0,0 +1,32 @@ +//Example 10.11
+// Scaling Calculations
+C=25*10^-9;
+R=2000;
+L=40*10^-3;
+s=%s;
+Z=s*L+1/(s*C+1/R);
+// H=I_L/V_s =1/Z ; // Required Network function
+H=1/Z;
+// since resistance is affected only by the magnitude of scale factor k_m is choosen such that R_cap will be a small integer value
+k_m=0.005;
+R_cap=0.005*(2000);// Scaled Resistance
+// L_cap=(k_m/k_f)*L , this equation is suggesting to choose k_f= k_m*L
+k_f=k_m*L;
+L_cap=(k_m*L)/k_f; // Scaled inductance
+C_cap=C/(k_m*k_f); // Scaled Capacitance
+// Network function for the scaled network calculated on the same base as above
+s_c=poly(0,'s_c')
+num=(s_c+4);
+den=(s_c^2+4*s_c+40);
+H_cap=num/den;
+K_cap=1;
+z_cap=roots(num);
+p_cap=roots(den);
+//hence poles and zeros for original network function will be
+z_1=z_cap/k_f;
+p_1=p_cap/k_f;
+// Gain factor is given by
+K=k_m/k_f;
+disp(K,"Gain for original tranfer function=")
+disp(z_1,"Zeros for original transfer function=")
+disp(p_1,"Poles for original transfer function=")
diff --git a/1430/CH10/EX10.11/exa10_11.txt b/1430/CH10/EX10.11/exa10_11.txt new file mode 100644 index 000000000..fa6b9e399 --- /dev/null +++ b/1430/CH10/EX10.11/exa10_11.txt @@ -0,0 +1,18 @@ +
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 10\exa10_11.sce', -1)
+
+ Gain for original tranfer function=
+
+ 25.
+
+ Zeros for original transfer function=
+
+ - 20000.
+
+ Poles for original transfer function=
+
+ - 10000. + 30000.i
+ - 10000. - 30000.i
+
+
diff --git a/1430/CH10/EX10.2/exa10_2.jpg b/1430/CH10/EX10.2/exa10_2.jpg Binary files differnew file mode 100644 index 000000000..dca3f2192 --- /dev/null +++ b/1430/CH10/EX10.2/exa10_2.jpg 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")
diff --git a/1430/CH10/EX10.2/exa10_2.txt b/1430/CH10/EX10.2/exa10_2.txt new file mode 100644 index 000000000..30a455698 --- /dev/null +++ b/1430/CH10/EX10.2/exa10_2.txt @@ -0,0 +1,7 @@ +
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 10\exa10_2.sce', -1)
+
+ Current Phasor(Amps)=
+
+ 4.8 - 6.4i
diff --git a/1430/CH10/EX10.8/exa10_8.sce b/1430/CH10/EX10.8/exa10_8.sce new file mode 100644 index 000000000..4ae2c7320 --- /dev/null +++ b/1430/CH10/EX10.8/exa10_8.sce @@ -0,0 +1,11 @@ +//Example 10.8
+// Pole-Zero Pattern of a Fifth Order Network
+s=poly(0,'s')
+num=s^4+16*s^3+164*s^2;
+K=-5;
+den=(s+32)*(s^2+36)*(s^2+40*s+400)
+H=(num*K)/den;// transfer functions
+z=roots(num); // zeros of network
+p=roots(den);// poles of network
+disp(z,"Zeros of network functions=")
+disp(p,"Poles of network functions=")
diff --git a/1430/CH10/EX10.8/exa10_8.txt b/1430/CH10/EX10.8/exa10_8.txt new file mode 100644 index 000000000..354058b39 --- /dev/null +++ b/1430/CH10/EX10.8/exa10_8.txt @@ -0,0 +1,19 @@ +
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 10\exa10_8.sce', -1)
+
+ Zeros of network functions=
+
+ - 8. + 10.i
+ - 8. - 10.i
+ 0
+ 0
+
+ Poles of network functions=
+
+ - 32.
+ - 20. + 0.0000009i
+ - 20. - 0.0000009i
+ 1.332D-15 + 6.i
+ 1.332D-15 - 6.i
+
diff --git a/1430/CH10/EX10.9/exa10_9.sce b/1430/CH10/EX10.9/exa10_9.sce new file mode 100644 index 000000000..b3d3fd2bf --- /dev/null +++ b/1430/CH10/EX10.9/exa10_9.sce @@ -0,0 +1,11 @@ +//Example 10.9
+// Calculations with s-plane Vectors
+s=%s;
+num=-6*s; // Numerator of transfer
+den=s^2+12*s+45; // Denominator
+X=complex(10,0); // Input signal phasor
+s_0=complex(-4,3)// complex frequency
+H_s=(num)/(den)// Transfer-function of the network
+H_s_0=horner(H_s,s_0);
+Y=H_s_0*X; // forced response phasor
+disp(Y,"Forced response phasor")
diff --git a/1430/CH10/EX10.9/exa10_9.txt b/1430/CH10/EX10.9/exa10_9.txt new file mode 100644 index 000000000..8543463d3 --- /dev/null +++ b/1430/CH10/EX10.9/exa10_9.txt @@ -0,0 +1,8 @@ +
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 10\exa10_9.sce', -1)
+
+ Forced response phasor
+
+ - 7.5 - 22.5i
+
diff --git a/1430/CH11/EX11.1/exa11_1.jpg b/1430/CH11/EX11.1/exa11_1.jpg Binary files differnew file mode 100644 index 000000000..054a44c0f --- /dev/null +++ b/1430/CH11/EX11.1/exa11_1.jpg diff --git a/1430/CH11/EX11.1/exa11_1.sce b/1430/CH11/EX11.1/exa11_1.sce new file mode 100644 index 000000000..a1b9ee28b --- /dev/null +++ b/1430/CH11/EX11.1/exa11_1.sce @@ -0,0 +1,25 @@ +// Example 11.1
+// A Frequency-Selective Network
+// v_in(t)=10*cos(20*t)+10*cos(300*t)
+R=8;
+L=0.2;
+s=%s;
+H_s= R/(s*L+R); // H(s)=V_out/V_in , applying KVL in figure 11.1
+// Selecting input frequency to
+omega1= 20;
+H_omega1= horner(H_s,%i*omega1);
+a_omega1=abs(H_omega1);// amplitude ratio
+theta1_r=atan(imag(H_omega1),real(H_omega1)); // Phase shift in radian
+theta1_d=atan(imag(H_omega1),real(H_omega1))*(180/%pi); // Phase shift in degree
+// Selecting input frequency to
+omega2=300;
+H_omega2= horner(H_s,%i*omega2);
+a_omega2=abs(H_omega2);// amplitude ratio
+theta2_d=atan(imag(H_omega2),real(H_omega2))*(180/%pi);// Phase shift in degree
+theta2_r=atan(imag(H_omega2),real(H_omega2));// Phase shift in radians
+t=0:0.001:5
+v_out=a_omega1*10*cos(omega1*t+theta1_r)+a_omega2*10*cos(omega2*t+theta2_r)
+plot(t,v_out);
+xlabel('t');
+ylabel('v_out(t)')
+title('Steady State Output Voltage Waveform')
diff --git a/1430/CH11/EX11.10/exa11_10.jpg b/1430/CH11/EX11.10/exa11_10.jpg Binary files differnew file mode 100644 index 000000000..4fcef4082 --- /dev/null +++ b/1430/CH11/EX11.10/exa11_10.jpg diff --git a/1430/CH11/EX11.10/exa11_10.sce b/1430/CH11/EX11.10/exa11_10.sce new file mode 100644 index 000000000..7f97adc3b --- /dev/null +++ b/1430/CH11/EX11.10/exa11_10.sce @@ -0,0 +1,8 @@ +// Example 11.10
+//Bode Plot of a Narrowband Filter
+s=%s;
+num=20*s;
+den=(s^2+20*s+10^4)
+H_s=num/den; // Transfer function of given filter
+h1=syslin('c',H_s);
+bode(h1);
diff --git a/1430/CH11/EX11.13/exa11_13.sce b/1430/CH11/EX11.13/exa11_13.sce new file mode 100644 index 000000000..403359989 --- /dev/null +++ b/1430/CH11/EX11.13/exa11_13.sce @@ -0,0 +1,31 @@ +// Example 11.13
+// Op-Amp Circuit for a Lowpass Filter
+f_co=15.9*10^3; // Hertz
+Q3=0.618;
+Q5=1.618;
+K=80; // Overall gain
+// Approximately equal distribution of total gain
+K1=5;
+K3=4;
+K5=4;
+R_mu=1000; // assume
+R_F1=(5-1)*R_mu; // VAlues of feedback Resistors
+R_F3=(4-1)*R_mu;
+R_F5=R_F3;
+C=10^-9; // Appropriate choice
+R=1/(2*%pi*f_co*C); // For 1st order stage
+// For 2nd stage
+r=R;
+K_i=4;
+// Thus the resistor for the stage with Q3
+R1=2*Q3*r/(1+sqrt(4*Q3^2*(K_i-2)+1));
+R2=r^2/R1;
+// Thus the resistor for the stage with Q5
+R3=2*Q5*r/(1+sqrt(4*Q5^2*(K_i-2)+1));
+R4=r^2/R3;
+disp(C,"Capacitor for all the stages(Farad)=")
+disp(R,"Resistor for the 1st order stage(Ohms)=")
+disp(R1,"Resistor for the 2nd order stage with Q3(Ohms)=")
+disp(R2,"Resistor for the 2nd order stage with Q3(Ohms)=")
+disp(R3,"Resistor for the 3rd order stage with Q5(Ohms)=")
+disp(R4,"Resistor for the 3rd order stage with Q5(Ohms)=")
diff --git a/1430/CH11/EX11.13/exa11_13.txt b/1430/CH11/EX11.13/exa11_13.txt new file mode 100644 index 000000000..bd7080db0 --- /dev/null +++ b/1430/CH11/EX11.13/exa11_13.txt @@ -0,0 +1,29 @@ +
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 11\exa11_13.sce', -1)
+
+ Capacitor for all the stages(Farad)=
+
+ 1.000D-09
+
+ Resistor for the 1st order stage(Ohms)=
+
+ 10009.745
+
+ Resistor for the 2nd order stage with Q3(Ohms)=
+
+ 4105.1307
+
+ Resistor for the 2nd order stage with Q3(Ohms)=
+
+ 24407.26
+
+ Resistor for the 3rd order stage with Q5(Ohms)=
+
+ 5698.3433
+
+ Resistor for the 3rd order stage with Q5(Ohms)=
+
+ 17583.179
+
+
diff --git a/1430/CH11/EX11.3/exa11_3.jpg b/1430/CH11/EX11.3/exa11_3.jpg Binary files differnew file mode 100644 index 000000000..65fbc881c --- /dev/null +++ b/1430/CH11/EX11.3/exa11_3.jpg diff --git a/1430/CH11/EX11.3/exa11_3.sce b/1430/CH11/EX11.3/exa11_3.sce new file mode 100644 index 000000000..3f7a756bc --- /dev/null +++ b/1430/CH11/EX11.3/exa11_3.sce @@ -0,0 +1,19 @@ +// Example 11.3
+// Frequency-Response Calcuations
+s=%s;
+num=20*(s+25)
+den=s^2+20*s+500;
+omega=[0:1:1000]; // diffrent value of frequency for frequency respose plot
+H_s=num/den; // Given transfer function
+H_omega=horner(H_s,%i*omega);
+a_omega=abs(H_omega);
+theta=atan(imag(H_omega),real(H_omega))*(180/%pi);
+subplot(2,1,1)
+plot(omega,a_omega,'-g')
+xlabel('omega')
+ylabel('a_omega')
+title('Frequency-response curve')
+subplot(2,1,2)
+plot(omega,theta,'-r')
+xlabel('omega')
+ylabel('theta')
diff --git a/1430/CH11/EX11.4/exa11_4.sce b/1430/CH11/EX11.4/exa11_4.sce new file mode 100644 index 000000000..590bc8ea8 --- /dev/null +++ b/1430/CH11/EX11.4/exa11_4.sce @@ -0,0 +1,14 @@ +// Example 11.4
+// Parallel Filter Network
+// From figure 11.9 ,Let us assume values for R ,omega and C for illustration
+R=50;
+C=0.01*10^-6;
+omega=50;
+s=%s;
+H_s= R/(R+1/(s*C)); // H(s)=I_C/I_in, can be found using current divider
+H_omega=horner(H_s,%i*omega)
+// Comparing this transfer function with first-order highpass filter we get
+K=1;
+omega_cutf=1/(R*C);
+disp(K,"Gain=")
+disp(omega_cutf,"Cutoff Frequency(rad/s)=")
diff --git a/1430/CH11/EX11.4/exa11_4.txt b/1430/CH11/EX11.4/exa11_4.txt new file mode 100644 index 000000000..7a8cf2bd8 --- /dev/null +++ b/1430/CH11/EX11.4/exa11_4.txt @@ -0,0 +1,14 @@ +
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 11\exa11_4.sce', -1)
+
+ Gain=
+
+ 1.
+
+ Cutoff Frequency(rad/s)=
+
+ 2000000.
+
+
+
+
diff --git a/1430/CH11/EX11.5/exa11_5.jpg b/1430/CH11/EX11.5/exa11_5.jpg Binary files differnew file mode 100644 index 000000000..87d1e8f24 --- /dev/null +++ b/1430/CH11/EX11.5/exa11_5.jpg diff --git a/1430/CH11/EX11.5/exa11_5.sce b/1430/CH11/EX11.5/exa11_5.sce new file mode 100644 index 000000000..3de7387c9 --- /dev/null +++ b/1430/CH11/EX11.5/exa11_5.sce @@ -0,0 +1,36 @@ +// Example 11.5
+// Design of a Lowpass Filter
+f_co=4000; // In Hertz
+R_L=200;
+R_s=50;
+// Using node equation in figure 11.10
+// (1/R_s+1/R_L+s*C)*V_out=(1/R_s)*V_s;
+// V_out/V_s=H(s)=(K*omega_co)/(s+omega_co)---equation (1)
+// Comparing equation (1) with low pass filter equation we get,
+K=(1/R_s)/(1/R_s+1/R_L);
+omega_co=2*%pi*f_co;
+C=1/(omega_co*(1/R_s+1/R_L));
+R_eq=(R_s*R_L)/(R_s+R_L);
+tau=R_eq*C;
+// design testing
+// Model for voice signal is 3kHz sinusoid with V_m=5V
+// so total input signal will become
+// v_s(t)=5*cos(omega1*t)+0.5*cos(omega2*t)
+omega1=2*%pi*3000;
+omega2=2*%pi*16000;
+// using equation for Low pass filter we get
+H_omega1=(K*omega_co)/(%i*omega1+omega_co);
+H_omega2=(K*omega_co)/(%i*omega2+omega_co);
+a_omega1=abs(H_omega1);
+theta1_r=atan(imag(H_omega1),real(H_omega1));
+a_omega2=abs(H_omega2);
+theta2_r=atan(imag(H_omega2),real(H_omega2));
+t=0:0.0001:0.01;
+v_out=a_omega1*5*cos(omega1*t+theta1_r)+a_omega2*0.5*cos(omega2*t+theta2_r);
+v_s=5*cos(omega1*t)+0.5*cos(omega2*t)
+plot(t,v_out,t,v_s,'-g')
+xlabel('t')
+ylabel('v_out(t)')
+title('Voltage Waveform')
+h1=legend(['v_out';'v_s'])
+disp("waveform Shows that whistle amplitude has been cut down to 3% of the voice signal at the input")
diff --git a/1430/CH11/EX11.5/exa11_5.txt b/1430/CH11/EX11.5/exa11_5.txt new file mode 100644 index 000000000..170746317 --- /dev/null +++ b/1430/CH11/EX11.5/exa11_5.txt @@ -0,0 +1,7 @@ +
+ -->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 11\exa11_5.sce', -1)
+
+ waveform Shows that whistle amplitude has been cut down to 3% of the voice signal at the in
+ put
+
+
diff --git a/1430/CH11/EX11.6/exa11_6.sce b/1430/CH11/EX11.6/exa11_6.sce new file mode 100644 index 000000000..276d86b99 --- /dev/null +++ b/1430/CH11/EX11.6/exa11_6.sce @@ -0,0 +1,17 @@ +// Example 11.6
+// Design of a Bandpass filter
+L=1*10^-3;
+R_w=1.2;
+B=2*%pi*2*250; // Bandwidth
+omega_0=2*%pi*20*10^3;
+Q=omega_0/B; // quality factor
+f_l=20000-250;
+f_u=20000+250;
+f_0=sqrt(f_l*f_u);
+Q_par=Q;
+C=1/(omega_0^2*L); // Required value of Capacitor
+R_par=L/(C*R_w); // Parallel equivalent of winding resistance
+R_eq=Q*omega_0*L;
+R=(R_eq*R_par)/(R_par-R_eq);
+disp(C,"Required value of C (Farad)=")
+disp(R,"Required value of R(Ohms)=")
diff --git a/1430/CH11/EX11.6/exa11_6.txt b/1430/CH11/EX11.6/exa11_6.txt new file mode 100644 index 000000000..b88384550 --- /dev/null +++ b/1430/CH11/EX11.6/exa11_6.txt @@ -0,0 +1,13 @@ +
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 11\exa11_6.sce', -1)
+
+ Required value of C (Farad)=
+
+ 6.333D-08
+
+ Required value of R(Ohms)=
+
+ 8133.2029
+
+
diff --git a/1430/CH11/EX11.7/exa11_7.sce b/1430/CH11/EX11.7/exa11_7.sce new file mode 100644 index 000000000..3d2451d84 --- /dev/null +++ b/1430/CH11/EX11.7/exa11_7.sce @@ -0,0 +1,20 @@ +// Example 11.7
+// Design of an Active Filter
+f_l=200;
+f_u=4000;
+// f_l=1/(2*%pi*R1*C1) and f_u=1/(2*%pi*R_F*C_F)
+// which limits the value of capacitance to
+// 5nF<C_1<500nF and 0.25nF<C_F<25nF
+// R_F= 1/(omega_u*C_F) and R_1=1/(omega_l*C_1)
+// K=C_1/(20*C_F)
+// thus i can increase the midband gain by taking large value for C_1 and small value for C_F
+// thus we choose standard values for capacitors
+C_1= 100*10^-9;
+C_F=1*10^-9;
+R_1=1/(2*%pi*f_l*C_1);
+R_F=1/(2*%pi*f_u*C_F);
+//Which gives
+K=R_F/R_1;
+disp("Required value for resistors are(in Ohms)")
+disp(R_1,"R_1=")
+disp(R_F,"R_F=")
diff --git a/1430/CH11/EX11.7/exa11_7.txt b/1430/CH11/EX11.7/exa11_7.txt new file mode 100644 index 000000000..ed3d255d5 --- /dev/null +++ b/1430/CH11/EX11.7/exa11_7.txt @@ -0,0 +1,14 @@ +
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 11\exa11_7.sce', -1)
+
+ Required value for resistors are(in Ohms)
+
+ R_1=
+
+ 7957.7472
+
+ R_F=
+
+ 39788.736
+
diff --git a/1430/CH11/EX11.8/exa11_8.jpg b/1430/CH11/EX11.8/exa11_8.jpg Binary files differnew file mode 100644 index 000000000..ca003140b --- /dev/null +++ b/1430/CH11/EX11.8/exa11_8.jpg diff --git a/1430/CH11/EX11.8/exa11_8.sce b/1430/CH11/EX11.8/exa11_8.sce new file mode 100644 index 000000000..1106fd8e4 --- /dev/null +++ b/1430/CH11/EX11.8/exa11_8.sce @@ -0,0 +1,5 @@ +// Example 11.8
+// An Illustrative Bode Plot
+s=poly(0,'s');
+h=syslin('c',(s+200)^2/(10*s^2))
+bode(h)
diff --git a/1430/CH11/EX11.9/exa11_9.jpg b/1430/CH11/EX11.9/exa11_9.jpg Binary files differnew file mode 100644 index 000000000..0467d32af --- /dev/null +++ b/1430/CH11/EX11.9/exa11_9.jpg diff --git a/1430/CH11/EX11.9/exa11_9.sce b/1430/CH11/EX11.9/exa11_9.sce new file mode 100644 index 000000000..50e513a10 --- /dev/null +++ b/1430/CH11/EX11.9/exa11_9.sce @@ -0,0 +1,8 @@ +// Example 11.9
+// Frequency Response of a Bandpass Amplifier
+s=poly(0,'s');
+num=20000*s;
+den=(s+100)*(s+400);
+H_s=num/den; // Bandpass amplifier transfer function
+h1=syslin('c',H_s);
+bode(h1)
diff --git a/1430/CH13/EX13.10/exa13_10.jpg b/1430/CH13/EX13.10/exa13_10.jpg Binary files differnew file mode 100644 index 000000000..d6c3c1820 --- /dev/null +++ b/1430/CH13/EX13.10/exa13_10.jpg diff --git a/1430/CH13/EX13.10/exa13_10.sce b/1430/CH13/EX13.10/exa13_10.sce new file mode 100644 index 000000000..63e266d34 --- /dev/null +++ b/1430/CH13/EX13.10/exa13_10.sce @@ -0,0 +1,26 @@ +// Example 13.10
+// Step Response
+// From figure 13.9(a)
+t=0:0.01:10
+L=1;
+R=2;
+C=1/16;
+// from figure 13.9(b)
+s=%s;
+Z_s=s+32/(2*s+16);
+H_s=1/(Z_s); // Network transfer function
+V_s=1/s;// Laplace transform of Voltage source
+I_s=H_s*V_s; // Transform of the step response
+pfe=pfss(I_s); // Partial fraction expansion
+
+// Inverse Laplace transform of pfe(1)
+i_1=0.5;
+
+// Inverse Laplace Transfrom of pfe(2)
+i_2=-(0.5*exp(-4*t)+t.*exp(-4*t))
+
+i=i_1+i_2;
+plot(t,i)
+xlabel('t')
+ylabel('i(t)')
+title("Step Response")
diff --git a/1430/CH13/EX13.11/exa13_11.jpg b/1430/CH13/EX13.11/exa13_11.jpg Binary files differnew file mode 100644 index 000000000..ceb0847fe --- /dev/null +++ b/1430/CH13/EX13.11/exa13_11.jpg diff --git a/1430/CH13/EX13.11/exa13_11.sce b/1430/CH13/EX13.11/exa13_11.sce new file mode 100644 index 000000000..ece7f1f38 --- /dev/null +++ b/1430/CH13/EX13.11/exa13_11.sce @@ -0,0 +1,24 @@ +// Example 13.11
+// Zero-State AC Response
+t=0:0.01:10
+s=%s;
+H_s=(s+8)/(s+4)^2;// Network transfer function
+V_s=(50*s)/(s^2+64); // Laplace transform of voltage source
+I_s=H_s*V_s;
+pfe=pfss(I_s);
+I_N_s=pfe(2); // Natural response in s-domain
+// Taking inverse laplace transform of pfe(2) we get,
+i_N=-exp(-4*t)-10*t.*exp(-4*t);
+
+// For Forced response component
+V_S=complex(50,0); // Voltage source phasor
+H=horner(H_s,%i*8);
+I=H*V_S;
+I_m=abs(I);
+phase_I=atan(imag(I),real(I));
+i_F=I_m*cos(8*t+phase_I);
+i=i_N+i_F;
+plot(t,i);
+xlabel('t')
+ylabel('i(t)')
+title('Zero-state ac Response Waveform')
diff --git a/1430/CH13/EX13.12/exa13_12.jpg b/1430/CH13/EX13.12/exa13_12.jpg Binary files differnew file mode 100644 index 000000000..0d770815c --- /dev/null +++ b/1430/CH13/EX13.12/exa13_12.jpg diff --git a/1430/CH13/EX13.12/exa13_12.sce b/1430/CH13/EX13.12/exa13_12.sce new file mode 100644 index 000000000..61bbd7d43 --- /dev/null +++ b/1430/CH13/EX13.12/exa13_12.sce @@ -0,0 +1,29 @@ +// Example 13.12
+// Calculating a Zero-Input Response
+L=2;
+R=20;
+C=1/200;
+s=%s;
+// for t<0
+i_L_bef=6;
+v_C_bef=20*i_L_bef;
+// for t>0 ,figure 13.13(b)
+
+//Applying Mesh equation for I_L_s
+I_L_s=(12+120/s)/(2*s+20+100/s);
+// I_L_s has the form (Bs+C)/(s^2+2*alpha*s+omega_0^2) comparing these equations
+// we get
+B=6;
+C=60;
+alpha=5;
+omega_o=50
+beta=5;
+K=complex(6,-6);
+K_m=abs(K);
+phase_K=atan(imag(K),real(K))
+t=0:0.001:5;
+i_L=K_m*exp(-alpha*t).*cos(beta*t+phase_K); // t>=0
+plot(t,i_L)
+xlabel('t')
+ylabel('i_L(t)')
+title('Current Waveform')
diff --git a/1430/CH13/EX13.13/exa13_13.jpg b/1430/CH13/EX13.13/exa13_13.jpg Binary files differnew file mode 100644 index 000000000..e20cd4694 --- /dev/null +++ b/1430/CH13/EX13.13/exa13_13.jpg diff --git a/1430/CH13/EX13.13/exa13_13.sce b/1430/CH13/EX13.13/exa13_13.sce new file mode 100644 index 000000000..4f29e103d --- /dev/null +++ b/1430/CH13/EX13.13/exa13_13.sce @@ -0,0 +1,30 @@ +// Example 13.13
+// Calculating a Complex Response
+L=0.5;
+R=5;
+C=1/40;
+s=%s;
+v_s1=20; //t<0
+v_s2=-20; // t>=0
+// from figure 13.14(a), for t<0
+i_L_bef=v_s1/R;
+v_C_bef=20;
+// Laplace transform of the input signal for t>=0
+V_s=-20/s;
+
+// Inspection of figure 13.13(b) yields the systematic node equation
+// (s/40+1/5+1/(0.5*s))*V_C_s=(2-20/s)/(0.5*s)+0.5
+num=20*(s^2+8*s-80);
+den=(s*(s^2+8*s+80));
+V_C_s=num/den; // Voltage across capacitor
+pfe=pfss(V_C_s); // Partial fraction expansion
+t=0:0.001:10
+// inverse Laplace tranform of pfe(1)
+v_C1=-20;
+// inverse Laplace transform of pfe(2)
+v_C2=20*sqrt(5)*exp(-4*t).*cos(8*t-(%pi/180)*(26.6));
+v_C=v_C1+v_C2; // t>0
+plot(t,v_C)
+xlabel('t')
+ylabel('v_C(t)')
+title("Capacitor Voltage Waveform")
diff --git a/1430/CH13/EX13.16/exa13_16.jpg b/1430/CH13/EX13.16/exa13_16.jpg Binary files differnew file mode 100644 index 000000000..f9579b68c --- /dev/null +++ b/1430/CH13/EX13.16/exa13_16.jpg diff --git a/1430/CH13/EX13.16/exa13_16.sce b/1430/CH13/EX13.16/exa13_16.sce new file mode 100644 index 000000000..6e91b4760 --- /dev/null +++ b/1430/CH13/EX13.16/exa13_16.sce @@ -0,0 +1,22 @@ +// Example 13.16
+// Impulsive Zero -State Response
+C_1=1/20;
+C_2=1/20;
+R=5;
+L=1;
+s=%s;
+Z_s=1/(s*C_1)+1/((s*C_2)+1/R+1/(s*L)); // Overall impedance of the circuit
+V_s=80/s;
+I_s=V_s/Z_s;
+t=0:0.01:10
+pfe=pfss(I_s);
+// Taking inverse Laplace transfrom we get
+// Inverse laplace transform of pfe(1)
+i_1=4.80*exp(-t).*cos(3*t-((%pi*33.7)/180));
+//inverse laplace of pfe(2)
+i_2=2;
+i=i_1+i_2;
+plot(t,i)
+xlabel('t')
+ylabel('i(t)')
+title("Current waveform")
diff --git a/1430/CH13/EX13.5/exa13_5.jpg b/1430/CH13/EX13.5/exa13_5.jpg Binary files differnew file mode 100644 index 000000000..ac03a39ac --- /dev/null +++ b/1430/CH13/EX13.5/exa13_5.jpg diff --git a/1430/CH13/EX13.5/exa13_5.sce b/1430/CH13/EX13.5/exa13_5.sce new file mode 100644 index 000000000..70ab20b30 --- /dev/null +++ b/1430/CH13/EX13.5/exa13_5.sce @@ -0,0 +1,24 @@ +// Example 13.5
+// Inversion of a Third-order Function
+R=12;
+L=1;
+C=1/20;
+I_1=-2;
+I_2=2;
+s=%s;
+num=I_1*s^2+(R/L)*I_1*s+I_2/(L*C);
+den=s*(s^2+(R/L)*s+1/(L*C));
+I_s=num/den;
+pfe=pfss(I_s);
+// From partial fraction expansion
+A_1=2;
+A_2=-5;
+A_3=1;
+s=roots(den);
+// Taking the inverse Laplace transform we get
+t=0:0.001:10
+i=2*exp(s(3)*t)+A_2*exp(s(2)*t)+A_3*exp(s(1)*t)
+plot(t,i)
+xlabel('t')
+ylabel('i(t)')
+title('Current Waveform')
diff --git a/1430/CH13/EX13.6/exa13_6.jpg b/1430/CH13/EX13.6/exa13_6.jpg Binary files differnew file mode 100644 index 000000000..64df3be12 --- /dev/null +++ b/1430/CH13/EX13.6/exa13_6.jpg diff --git a/1430/CH13/EX13.6/exa13_6.sce b/1430/CH13/EX13.6/exa13_6.sce new file mode 100644 index 000000000..e0456e7c4 --- /dev/null +++ b/1430/CH13/EX13.6/exa13_6.sce @@ -0,0 +1,25 @@ +// Example 13.6
+// Inversion with complex Poles
+s=%s;
+t=0:0.001:10
+num=15*s^2-16*s-7;
+den=(s+2)*(s^2+6*s+25);
+F_s=num/den;
+pfe=pfss(F_s); // partial fraction of the transfer function
+// from pfe(1) we get
+B=10;
+C=-66;
+alpha=3;// from pfe(1)
+beta=sqrt(25-9);//Comparing the denominator of pfe(1) with standard 2nd orderequation
+// Now
+K=B+(%i*(alpha*B-C))/beta;
+// From inverse Laplace Transfrom of pfe(2) we get
+f1=5*exp(-2*t)
+K_m=abs(K); // Magnitude of K
+phase_K=atan(imag(K),real(K));
+g=K_m*exp(-alpha*t).*cos(beta*t+phase_K);
+f=f1+g;
+plot(t,f)
+xlabel('t')
+ylabel('f(t)')
+title('Function Waveform')
diff --git a/1430/CH13/EX13.7/exa13_7.jpg b/1430/CH13/EX13.7/exa13_7.jpg Binary files differnew file mode 100644 index 000000000..39de9871e --- /dev/null +++ b/1430/CH13/EX13.7/exa13_7.jpg diff --git a/1430/CH13/EX13.7/exa13_7.sce b/1430/CH13/EX13.7/exa13_7.sce new file mode 100644 index 000000000..a126e2e5d --- /dev/null +++ b/1430/CH13/EX13.7/exa13_7.sce @@ -0,0 +1,20 @@ +//Example 13.7
+// Inversion with a Triple pole
+s=%s;
+num=-s^2-2*s+14;
+den=(s+4)^3*(s+5);
+F=num/den;
+pfe=pfss(F)
+t=0:0.001:10
+// Inverse Laplace transform of pfe(2)
+f1=1*%e^(-5*t);
+
+// Inverse Laplace transform of pfe(1)
+f2=-exp(-4*t)+3*(t.*t).*exp(-4*t);
+
+f=f1+f2;// t>=0;
+plot(t,f);
+xlabel('t');
+ylabel('f(t)');
+title("Function Waveform")
+
diff --git a/1430/CH13/EX13.8/exa13_8.jpg b/1430/CH13/EX13.8/exa13_8.jpg Binary files differnew file mode 100644 index 000000000..5c2a26755 --- /dev/null +++ b/1430/CH13/EX13.8/exa13_8.jpg diff --git a/1430/CH13/EX13.8/exa13_8.sce b/1430/CH13/EX13.8/exa13_8.sce new file mode 100644 index 000000000..f0ad8cb85 --- /dev/null +++ b/1430/CH13/EX13.8/exa13_8.sce @@ -0,0 +1,22 @@ +// Example 13.8
+// Inversion with Time delay
+s=%s;
+// x(t)=20*u(t)40*u(t-3)
+// time domain analysis for the response y(t) yields the DE
+// y'(t)-5*y(t)=-x(t)=-20*u(t)+40*u(t-3)--equation (1)
+// after taking Laplace transform of equation (1)
+disp("Y(s)=(-20+40*exp(-3*s))/(s*(s-5)");
+disp("=> Y(s)= F1_s-2*F1_s*exp(-3*t)")
+F1_s= -20/(s*(s-5));
+pfe=pfss(F1_s);
+
+// Taking inverse Laplace of pfe, we get
+f1=4-4*exp(5*t);
+
+t=0:0.001:5;
+//from expansion of Y(s)
+y=4-4*exp(5*t)-(8-8*exp(5*(t-3))); // Using Time delay property , t>=0
+plot(t,y)
+xlabel('t')
+ylabel('y(t)')
+title('Function Waveform')
diff --git a/1430/CH13/EX13.8/exa13_8.txt b/1430/CH13/EX13.8/exa13_8.txt new file mode 100644 index 000000000..971ca0be4 --- /dev/null +++ b/1430/CH13/EX13.8/exa13_8.txt @@ -0,0 +1,8 @@ +
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 13\exa13_8.sce', -1)
+
+ Y(s)=(-20+40*exp(-3*s))/(s*(s-5)
+
+ => Y(s)= F1_s-2*F1_s*exp(-3*t)
+
+
diff --git a/1430/CH14/EX14.1/exa14_1.sce b/1430/CH14/EX14.1/exa14_1.sce new file mode 100644 index 000000000..db0c51e2a --- /dev/null +++ b/1430/CH14/EX14.1/exa14_1.sce @@ -0,0 +1,25 @@ +// Example 14.1
+// From figure 14.7(a)
+// Let us assume some Values to R's and C for illustration purpose
+R=5;
+C=0.1*10^-6;
+s=%s;
+// Conductance matrix from figure 14.7(b)
+Y_11=s*C+1/R;
+Y_12=-s*C;
+Y_21=Y_12;
+Y_22=Y_11;
+Y=[Y_11,Y_12;Y_21,Y_22];
+delta=det(Y);
+// Solving matrix equation
+// Y*[V_1;V_2]=[I_1;I_2]
+// On application of Cramer's Rule we get
+// V_1=(Y_22/delta)*I_1-(Y_12/delta)*I_2 ----equqtion(1)
+//V_2=-(Y_21/delta)*I_1+(Y_11/delta)*I_2 ----equation(2)
+// comparing above equations with z-parameter matrix equation
+z_11=Y_11/delta;
+z_22=z_11;
+z_12=-Y_12/delta;
+z_21=z_12;
+Z=[z_11,z_12;z_21,z_22];
+disp(Z,"Z-Parameters=")
diff --git a/1430/CH14/EX14.1/exa14_1.txt b/1430/CH14/EX14.1/exa14_1.txt new file mode 100644 index 000000000..be7439385 --- /dev/null +++ b/1430/CH14/EX14.1/exa14_1.txt @@ -0,0 +1,15 @@ +
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 14\exa14_1.sce', -1)
+
+ Z-Parameters=
+
+ 0.2 + 1.000D-07s 1.000D-07s
+ ---------------- ----------------
+ 0.04 + 4.000D-08s 0.04 + 4.000D-08s
+
+ 1.000D-07s 0.2 + 1.000D-07s
+ ---------------- ----------------
+ 0.04 + 4.000D-08s 0.04 + 4.000D-08s
+
+
diff --git a/1430/CH14/EX14.10/exa14_10.sce b/1430/CH14/EX14.10/exa14_10.sce new file mode 100644 index 000000000..fde52cd0c --- /dev/null +++ b/1430/CH14/EX14.10/exa14_10.sce @@ -0,0 +1,15 @@ +// Example 14.10
+// A Mid- frequency Transistor Amplifier
+H=[1000,10^-3;50,0.1*10^-3]; // Given H-parameter matrix
+delta_h=det(H);
+A_i=-25
+// Working with impedances and admittances given in figure 14.22 we get,
+R_L=poly(0,'R_L');
+Z_i_s=(0.05*R_L+1)/(0.1*R_L+1);
+H_i_s=50/(0.1*R_L+1);
+R_s=2000;
+r=-(R_s*H_i_s)/(R_s+Z_i_s);
+p=r+25;
+// solving for p we get the value for R_L
+R_L=4000;
+disp(R_L,"Required Value of Laod resistance(Ohms)=")
diff --git a/1430/CH14/EX14.10/exa14_10.txt b/1430/CH14/EX14.10/exa14_10.txt new file mode 100644 index 000000000..bcb7143d9 --- /dev/null +++ b/1430/CH14/EX14.10/exa14_10.txt @@ -0,0 +1,9 @@ +
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 14\exa14_10.sce', -1)
+
+ Required Value of Laod resistance(Ohms)=
+
+ 4000.
+
+
diff --git a/1430/CH14/EX14.11/exa14_11.sce b/1430/CH14/EX14.11/exa14_11.sce new file mode 100644 index 000000000..9ab2aa8e3 --- /dev/null +++ b/1430/CH14/EX14.11/exa14_11.sce @@ -0,0 +1,11 @@ +// Example 14.11
+// A Cascode Amplifier
+R_s=2000;
+R_L=4000;
+T_a=[-10^-3 ,-20;-2*10^-6,-0.02]; // Given H parameters for Transistor a
+T_b=T_a; // Given H parameters for Transistor b
+T_ab=T_a*T_b;
+Z_i=(T_ab(1)*R_L+T_ab(3))/(T_ab(2)*R_L+T_ab(4));
+H_i=-1/(T_ab(2)*R_L+T_ab(4));
+A_i= (-R_s*H_i)/(R_s+Z_i);
+disp(A_i,"Gain of Cascade amplifier=")
diff --git a/1430/CH14/EX14.11/exa14_11.txt b/1430/CH14/EX14.11/exa14_11.txt new file mode 100644 index 000000000..c8452d668 --- /dev/null +++ b/1430/CH14/EX14.11/exa14_11.txt @@ -0,0 +1,9 @@ +
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 14\exa14_11.sce', -1)
+
+ Gain of Cascade amplifier=
+
+ 1111.1111
+
+
diff --git a/1430/CH14/EX14.2/exa14_2.sce b/1430/CH14/EX14.2/exa14_2.sce new file mode 100644 index 000000000..69c8c99a3 --- /dev/null +++ b/1430/CH14/EX14.2/exa14_2.sce @@ -0,0 +1,17 @@ +//Example 14.2
+//z Parameter by the Direct Method
+// From figure 14.8(b)
+// We set i_2=0
+// v_1=(10+50)*i_1 ---equation(1)
+// v_x=50*i_1 ---equation(2)
+// v_2=v_x-3*v_x=-2*50*i_1---equation(3)
+// z_11=v_1/i_1 and z_21=v_2/i_1
+z_11=60;
+z_21=-100;
+// Now we set i_1=0
+//v_1=v_x=50*i_2
+//v_2=v_x-3*v_x=-2*50*i_2; thus
+z_12=50;
+z_22=-100;
+Z=[z_11,z_12;z_21,z_22];
+disp(Z,"Z-parameter by direct method=")
diff --git a/1430/CH14/EX14.2/exa14_2.txt b/1430/CH14/EX14.2/exa14_2.txt new file mode 100644 index 000000000..8ebd297d4 --- /dev/null +++ b/1430/CH14/EX14.2/exa14_2.txt @@ -0,0 +1,9 @@ +
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 14\exa14_2.sce', -1)
+
+ Z-parameter by direct method=
+
+ 60. 50.
+ - 100. - 100.
+
+
diff --git a/1430/CH14/EX14.4/exa14_4.sce b/1430/CH14/EX14.4/exa14_4.sce new file mode 100644 index 000000000..79430e7c8 --- /dev/null +++ b/1430/CH14/EX14.4/exa14_4.sce @@ -0,0 +1,25 @@ +// Example 14.4
+// Y parameter by the indirect method
+// from figure 14.15(a) let us assume values for R's and C for illustration
+R=50;
+G=1/R;
+C=0.1*10^-6;
+s=%s;
+
+// From figure 14.15(b),Applying KCL at both the nodes we get,
+disp("I_1=V_1/R+(V_1-V_2)/(1/(s*C))")
+disp("=>I_1=(G+s*C)*V_1-s*C*V_2 -----equation(1)")
+disp("I_2=V_2/R+(V_2-V_1)/(1/(s*C))")
+disp("=>I_2=-s*C*V_1+(G+s*C)*V_2-----equation(2)")
+
+// Comapring above equations with these equations,
+// I_1=y_11*V_1+y_12*V_2
+// I_2=y_21*V_1+y_22*V_2
+
+// On comparison we get
+y_11=G+s*C;
+y_22=y_11;
+y_12=-s*C;
+y_21=y_12;
+Y=[y_11,y_12;y_21,y_22];
+disp(Y,"Required Y Parameters=")
diff --git a/1430/CH14/EX14.4/exa14_4.txt b/1430/CH14/EX14.4/exa14_4.txt new file mode 100644 index 000000000..a9271c7fc --- /dev/null +++ b/1430/CH14/EX14.4/exa14_4.txt @@ -0,0 +1,18 @@ +
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 14\exa14_4.sce', -1)
+
+ I_1=V_1/R+(V_1-V_2)/(1/(s*C))
+
+ =>I_1=(G+s*C)*V_1-s*C*V_2 -----equation(1)
+
+ I_2=V_2/R+(V_2-V_1)/(1/(s*C))
+
+ =>I_2=-s*C*V_1+(G+s*C)*V_2-----equation(2)
+
+ Required Y Parameters=
+
+ 0.02 + 1.000D-07s - 1.000D-07s
+
+ - 1.000D-07s 0.02 + 1.000D-07s
+
diff --git a/1430/CH14/EX14.5/exa14_5.sce b/1430/CH14/EX14.5/exa14_5.sce new file mode 100644 index 000000000..26a8d8087 --- /dev/null +++ b/1430/CH14/EX14.5/exa14_5.sce @@ -0,0 +1,20 @@ +// Example 14.5
+// Y Parameters by the Direct Method
+R=10;
+C=1/40;
+s=%s;
+// From figure 14.16(b) ,V_2=0;
+disp("I_1=(s*C)*V_1---equation(1)")
+disp("I_2=2(s*C)*V_1--equation(2)")
+// From equation 1 & 2 we get
+y_11=s*C;
+y_21=2*s*C;
+
+// From figure 14.16(c),V_1=0;
+disp("I_1=-(s*C)*V_2---equation(3)")
+disp("I_2=3*I_1-I_1+V_2/10---equation(4)")
+// From equation 3 & 4 we get
+y_12=-s*C;
+y_22=(2-s)/20;
+Y=[y_11,y_12;y_21,y_22];
+disp(Y,"Required Y parameter=")
diff --git a/1430/CH14/EX14.5/exa14_5.txt b/1430/CH14/EX14.5/exa14_5.txt new file mode 100644 index 000000000..b81e25e86 --- /dev/null +++ b/1430/CH14/EX14.5/exa14_5.txt @@ -0,0 +1,19 @@ +
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 14\exa14_5.sce', -1)
+
+ I_1=(s*C)*V_1---equation(1)
+
+ I_2=2(s*C)*V_1--equation(2)
+
+ I_1=-(s*C)*V_2---equation(3)
+
+ I_2=3*I_1-I_1+V_2/10---equation(4)
+
+ Required Y parameter=
+
+ 0.025s - 0.025s
+
+ 0.05s 0.1 - 0.05s
+
+
diff --git a/1430/CH14/EX14.6/exa14_6.sce b/1430/CH14/EX14.6/exa14_6.sce new file mode 100644 index 000000000..002700c64 --- /dev/null +++ b/1430/CH14/EX14.6/exa14_6.sce @@ -0,0 +1,20 @@ +//Examples 14.6
+//Calculating h parameter
+// From figure 14.18(a)
+R=10;
+C=1/40;
+s=%s;
+// for calculating h-parameter ,with V_2=0;
+disp("V_1=(1/(s*C))*I_1---equation(1)")
+disp("I_2=3*I_1-I_1--- equation(2)")
+//From equation 1 & 2
+h_11=1/(s*C);
+h_21=2;
+
+// Now I_1=0;
+disp("V_1=V_2---equation(3)")
+disp("V_2=R*I_2---equation(4)")
+// form equation(3)& (4)
+h_12=1; h_22=0.1;
+H=[h_11,h_12;h_21,h_22];
+disp(H,"Required H-Parameter=")
diff --git a/1430/CH14/EX14.6/exa14_6.txt b/1430/CH14/EX14.6/exa14_6.txt new file mode 100644 index 000000000..980848fe1 --- /dev/null +++ b/1430/CH14/EX14.6/exa14_6.txt @@ -0,0 +1,22 @@ +
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 14\exa14_6.sce', -1)
+
+ V_1=(1/(s*C))*I_1---equation(1)
+
+ I_2=3*I_1-I_1--- equation(2)
+
+ V_1=V_2---equation(3)
+
+ V_2=R*I_2---equation(4)
+
+ Required H-Parameter=
+
+ 1 1
+ ----- -
+ 0.025s 1
+
+ 2 0.1
+ - ---
+ 1 1
+
diff --git a/1430/CH14/EX14.7/exa14_7.sce b/1430/CH14/EX14.7/exa14_7.sce new file mode 100644 index 000000000..98b0ede1a --- /dev/null +++ b/1430/CH14/EX14.7/exa14_7.sce @@ -0,0 +1,25 @@ +// Example 14.7
+// Calculating ABCD Parameters
+R=10;
+C=1/40;
+s=%s;
+// from figure 14.19(a),
+I_2=0;
+disp("I_1-3*I_1=V_2/10")
+disp("=> I_1=-0.005*V_2---equation(1)")
+disp("V_1=V_2+(1/(s*C)*I_1)")
+disp("=> V_1=(1-2/s)*V_2---equation(1)")
+//from equation 1 & 2
+A=1-2/s;
+C=-0.05;
+
+//with V_2=0
+disp("I_1-3*I_1=-I_2")
+disp("=> I_1=0.5*I_2---equation(3)")
+disp("V_1=(1/(s*C))*I_1")
+disp("=> V_1=(20/s)*I_2---equation(4)")
+// from equation 3 & 4
+B=-20/s;
+D=-0.5;
+T=[A,B;C,D];
+disp(T,"Required ABCD Parameters=")
diff --git a/1430/CH14/EX14.7/exa14_7.txt b/1430/CH14/EX14.7/exa14_7.txt new file mode 100644 index 000000000..b701de6ed --- /dev/null +++ b/1430/CH14/EX14.7/exa14_7.txt @@ -0,0 +1,33 @@ + ans =
+
+ 1.
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 14\exa14_7.sce', -1)
+
+ I_1-3*I_1=V_2/10
+
+ => I_1=-0.005*V_2---equation(1)
+
+ V_1=V_2+(1/(s*C)*I_1)
+
+ => V_1=(1-2/s)*V_2---equation(1)
+
+ I_1-3*I_1=-I_2
+
+ => I_1=0.5*I_2---equation(3)
+
+ V_1=(1/(s*C))*I_1
+
+ => V_1=(20/s)*I_2---equation(4)
+
+ Required ABCD Parameters=
+
+ - 2 + s - 20
+ ----- ---
+ s s
+
+ - 0.05 - 0.5
+ ---- ---
+ 1 1
+
+-->diary(0)
diff --git a/1430/CH14/EX14.9/exa14_9.sce b/1430/CH14/EX14.9/exa14_9.sce new file mode 100644 index 000000000..8f39952c2 --- /dev/null +++ b/1430/CH14/EX14.9/exa14_9.sce @@ -0,0 +1,18 @@ +// Example 14.9
+// Calculating a Transfer Function
+// From figure 14.21 and ABCD parameters that we found in example 14.7 we have,
+
+// since V_1=V_s
+// Z_s=0;
+s=%s;
+disp("H(s)=I_2/V_1")
+disp("=> H(s)=-1/A*Z_L+B")
+A=1-2/s;
+B=-20/s;
+Z_L=2.5*s// Assume
+H_s=-1/(A*Z_L+B);
+P_s=(s^2-2*s-8); // denominator of H_s
+p=roots(P_s);
+disp(H_s,"Transfer function=")
+disp(P_s,"Characteristic polynomial=")
+disp(p,"Poles of transfer function=")
diff --git a/1430/CH14/EX14.9/exa14_9.txt b/1430/CH14/EX14.9/exa14_9.txt new file mode 100644 index 000000000..5bce56c42 --- /dev/null +++ b/1430/CH14/EX14.9/exa14_9.txt @@ -0,0 +1,26 @@ +
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 14\exa14_9.sce', -1)
+
+ H(s)=I_2/V_1
+
+ => H(s)=-1/A*Z_L+B
+
+ Transfer function=
+
+ - s
+ -------------
+ 2
+ - 20 - 5s + 2.5s
+
+ Characteristic polynomial=
+
+ 2
+ - 8 - 2s + s
+
+ Poles of transfer function=
+
+ 4.
+ - 2.
+
+
diff --git a/1430/CH15/EX15.7/exa15_7.jpg b/1430/CH15/EX15.7/exa15_7.jpg Binary files differnew file mode 100644 index 000000000..99662efc0 --- /dev/null +++ b/1430/CH15/EX15.7/exa15_7.jpg diff --git a/1430/CH15/EX15.7/exa15_7.sce b/1430/CH15/EX15.7/exa15_7.sce new file mode 100644 index 000000000..9c0177269 --- /dev/null +++ b/1430/CH15/EX15.7/exa15_7.sce @@ -0,0 +1,33 @@ +// Example 15.7
+// Calculating the Zero-Input Response
+t=0:0.01:10;
+s=%s;
+n=2;
+r=2;
+A=[-8,-5;3,0];
+C=[6,10;0,-2];
+q_1_bef=2; //q_1(0^-)
+q_2_bef=-4;//q_2(0^-)
+q_bef=[2;-4]; // q(0^-)
+I=eye(2,2)
+W=s*I-A;
+// Taking adjoint of W i.e. adj[s*I-A]
+W_adj=[s,-5;3 ,s+8]
+P_s=det(W);
+phi_s=W_adj/P_s // Resolvent matrix
+// Transform of the state vector
+Q_s=phi_s*q_bef;
+// Writing down two elements of Q_s
+Q_s1=(2*s+20)/P_s;
+q_1=7*exp(-3*t)-5*exp(-5*t);// inverse laplace transform of Q_s1
+Q_s2=(-4*s-26)/P_s;
+q_2=-7*exp(-3*t)+3*exp(-5*t); // inverse laplace transform of Q_s2
+// y=C*q=[6,10;0,-2]*[q_1;q_2]=[6*q1+10*q2;-2*q2]
+y_1=6*q_1+10*q_2;
+y_2=-2*q_2;
+plot(t,y_1,'-g',t,y_2,'-r')
+xlabel('t');
+ylabel('y');
+title('Signal Waveform')
+h1=legend(['y_1';'y_2']);
+
diff --git a/1430/CH15/EX15.8/exa15_8.jpg b/1430/CH15/EX15.8/exa15_8.jpg Binary files differnew file mode 100644 index 000000000..fac2c37ed --- /dev/null +++ b/1430/CH15/EX15.8/exa15_8.jpg diff --git a/1430/CH15/EX15.8/exa15_8.sce b/1430/CH15/EX15.8/exa15_8.sce new file mode 100644 index 000000000..562f6923e --- /dev/null +++ b/1430/CH15/EX15.8/exa15_8.sce @@ -0,0 +1,36 @@ +// Example 15.8
+// Calculating the Complete Response
+// Considering the circuit of example 15.7
+k=2;
+t=0:0.001:5;
+s=%s;
+B=[-8,0;3,1];
+D=[0,0;2,0];
+E=[0];
+W_adj=[s,-5;3,s+8]; // adj[s*I-A]
+P_s=(s+3)*(s+5); // characteristic polynomials
+q_1_bef=2;//q_1(0^-)
+q_2_bef=-4;//q_2(0^-)
+x_2=0;
+// x_1=10*t;
+q_bef=[2;-4];
+X_s=[10/s^2;0];
+//The Transformed state vector is
+Q_s=(1/P_s)*(W_adj)*{q_bef+B*X_s};
+// Writing down two elements of Q_s
+Q_s1=(2*s^3+20*s^2-80*s-150)/((s^2)*(s+3)*(s+5));
+//inverse laplace transform of Q_s1
+q_1=-10*t+12*exp(-3*t)-10*exp(-5*t);
+Q_s2=(-4*s^2-26*s+30)/(s*(s+3)*(s+5));
+// inverse laplace transform of Q_s2
+q_2= 2-12*exp(-3*t)+6*exp(-5*t);
+
+// Since E=0, the resulting output are given by
+// y=C*q+D*x , from which
+y_1=6*q_1+10*q_2;
+y_2=-2*q_2+20*t;
+plot(t,y_1'-r',t,y_2,'-g')
+xlabel('t')
+ylabel('y(t)')
+title("Siganl Waveform")
+h1=legend(['y_1';'y_2'])
diff --git a/1430/CH15/EX15.9/exa15_9.jpg b/1430/CH15/EX15.9/exa15_9.jpg Binary files differnew file mode 100644 index 000000000..4c2f22114 --- /dev/null +++ b/1430/CH15/EX15.9/exa15_9.jpg diff --git a/1430/CH15/EX15.9/exa15_9.sce b/1430/CH15/EX15.9/exa15_9.sce new file mode 100644 index 000000000..d7d059c5f --- /dev/null +++ b/1430/CH15/EX15.9/exa15_9.sce @@ -0,0 +1,26 @@ +// Example 15.9
+// Calculating the Zero-State Response
+s=%s;
+t=0:0.001:5;
+// From Transfer function Matrix equation i.e.
+//P(s)*H(s)=C*adj[s*I-A]*B+P(s)*[D+s*E]
+// Substituting various Matrices into the above equations we get
+P_s= (s+3)*(s+5)
+W=[6,10;0,-2]*[s,-5;3,s+8]*[-8,0;3,1]+(P_s)*[0,0;2,0];
+H_s=W/P_s;
+
+//To obtain the Zero-state outputs produced by x1(t)=u(t) and x2(t)=0
+X_s=[1/s;0]; // Laplace transform of input matrix
+Y_s=H_s*X_s;
+// Writing down two elements of Y_s
+Y_1=-18/(s*(s+3));
+// taking inverse laplace of Y_1
+y1= -6+6*exp(-3*t);
+Y_2=(2*s^2+10*s+30)/(s*(s+3)*(s+5));
+// taking inverse laplace of Y_2
+y2=2-3*exp(-3*t)+exp(-5*t);
+plot(t,y1,'-r',t,y2,'-g')
+xlabel('t')
+ylabel('y(t)')
+title('Signal Waveform')
+h1=legend(['y1';'y2']);
diff --git a/1430/CH2/EX2.1/exa2_1.sce b/1430/CH2/EX2.1/exa2_1.sce new file mode 100644 index 000000000..0d08cd6e7 --- /dev/null +++ b/1430/CH2/EX2.1/exa2_1.sce @@ -0,0 +1,10 @@ +// Example 2.1
+// Audio Volume Control
+// It is given that amplifier draws no input current i.e i_W= 0
+// From figure 2.4, v_in(t) is related to v_s(t) by voltage divider expression
+R_AW=poly(0,'R_AW');
+p=R_AW/(5000)-0.6
+R_AW=roots(p);
+// v_in=(R_AW*v_s(t))/5000, it is required that v_out(t)=60v_s(t)
+// from above two relation we get v_in(t)=0.6v_s(t), using this relation we get R_AW
+disp(R_AW,"Value of potentiometer resistance(in Ohms)=")
diff --git a/1430/CH2/EX2.1/exa2_1.txt b/1430/CH2/EX2.1/exa2_1.txt new file mode 100644 index 000000000..f3c3878ac --- /dev/null +++ b/1430/CH2/EX2.1/exa2_1.txt @@ -0,0 +1,8 @@ +
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 2\exa2.1.sce', -1)
+
+ Value of potentiometer resistance(in Ohms)=
+
+ 3000.
+
diff --git a/1430/CH2/EX2.10/exa2_10.sce b/1430/CH2/EX2.10/exa2_10.sce new file mode 100644 index 000000000..25ed65f57 --- /dev/null +++ b/1430/CH2/EX2.10/exa2_10.sce @@ -0,0 +1,11 @@ +// Example 2.10
+// Superposition Calculations
+// First we find the contibution to i_1 from 30-V Source
+// From Figure 2.21(b)
+i_1_1=30/(6+4+2);// Ohm's Law
+// From Figure 2.22(c)
+i_1_2=(4*3)/((6+2)+4); // Current Divider
+// From Figure 2.22(d)
+i_1_3=-(6*8)/(6+(2+4)); // Current Divider
+i_1= i_1_1+i_1_2+i_1_3; // Net Current when all the Sources are active
+disp(i_1,"Net Current when all the sources are active(in Amps)=")
diff --git a/1430/CH2/EX2.10/exa2_10.txt b/1430/CH2/EX2.10/exa2_10.txt new file mode 100644 index 000000000..54a45b453 --- /dev/null +++ b/1430/CH2/EX2.10/exa2_10.txt @@ -0,0 +1,8 @@ +
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 2\exa2.10.sce', -1)
+
+ Net Current when all the sources are active(in Amps)=
+
+ - 0.5
+
diff --git a/1430/CH2/EX2.11/exa2_11.sce b/1430/CH2/EX2.11/exa2_11.sce new file mode 100644 index 000000000..6dffa28d0 --- /dev/null +++ b/1430/CH2/EX2.11/exa2_11.sce @@ -0,0 +1,10 @@ +// Example 2.11
+// Superposition with a Controlled Source
+// From figure 2.22(b)
+i_1_1=30/(6*9+(4+2));// Contribution of 30-V Source
+// From figure 2.22(c), Applying KVL in bottom Loop we get,
+// 6*(9i_1_2)+4(i_1_2-3)+2*i_1_2=0
+i_1_2=0.2;
+// When Both independent sources active,the value of i_1 is given by the sum
+i_1=i_1_1+i_1_2;
+disp(i_1,"The Value of i_1 is(in Amps)=")
diff --git a/1430/CH2/EX2.11/exa2_11.txt b/1430/CH2/EX2.11/exa2_11.txt new file mode 100644 index 000000000..6728597a8 --- /dev/null +++ b/1430/CH2/EX2.11/exa2_11.txt @@ -0,0 +1,8 @@ +
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 2\exa2.11.sce', -1)
+
+ The Value of i_1 is(in Amps)=
+
+ 0.7
+
diff --git a/1430/CH2/EX2.12/exa2_12.sce b/1430/CH2/EX2.12/exa2_12.sce new file mode 100644 index 000000000..d7b39c5f8 --- /dev/null +++ b/1430/CH2/EX2.12/exa2_12.sce @@ -0,0 +1,10 @@ +// Example 2.12
+// Thevenin Parameter from a v-i Curve
+// From v-i curve obtained from Pspice simulation we get two equations,
+x=[1 0.981;1 0.128]\[-0.491;-6.395]//Matrix Method for solving simultaneous equations
+v_oc=x(1,1);// Open-Circuit Voltage
+R_t=x(2,1);// Thevinin Resistance
+i_sc=v_oc/R_t;// Short Circuit Current
+disp(v_oc,"Open Circuit Voltage(in Volts)=")
+disp(i_sc,"Short Circuit Current(in Amps)=")
+disp(R_t,"Thevenin Resistance(in Ohms)=")
diff --git a/1430/CH2/EX2.12/exa2_12.txt b/1430/CH2/EX2.12/exa2_12.txt new file mode 100644 index 000000000..05638aee5 --- /dev/null +++ b/1430/CH2/EX2.12/exa2_12.txt @@ -0,0 +1,16 @@ +
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 2\exa2.12.sce', -1)
+
+ Open Circuit Voltage(in Volts)=
+
+ - 7.2809461
+
+ Short Circuit Current(in Amps)=
+
+ - 1.0519389
+
+ Thevenin Resistance(in Ohms)=
+
+ 6.9214537
+
diff --git a/1430/CH2/EX2.13/exa2_13.sce b/1430/CH2/EX2.13/exa2_13.sce new file mode 100644 index 000000000..3b9dc8676 --- /dev/null +++ b/1430/CH2/EX2.13/exa2_13.sce @@ -0,0 +1,17 @@ +// Example 2.13
+// Equivalent Source Networks
+//From Figure 2.28(b)
+v_oc= (20*50)/(5+20);// Open Circuit Voltage =======> equation 1
+//From Figure 2.28(c)
+i_sc=50/5; // Short Circuit Current ========> equation 2
+// From equation 1 & 2
+R_t=v_oc/i_sc;// Thevenin Resistance
+v=24;// Voltage across R_l_1
+// From figure 2.28(d)
+// Using Voltage Divider, (R_l_1*40)/(4+R_l_1)=24.
+R_l_1=6;
+//From figure 2.28(e)
+// Using Current Divider , (4*10)/(4+R_l_2)=8.
+R_l_2=1;
+disp(R_l_1,"Design Value of R_1 when v=24 (in Ohms)=")
+disp(R_l_2,"Design Value of R_1 when i=8(in Ohms)=")
diff --git a/1430/CH2/EX2.13/exa2_13.txt b/1430/CH2/EX2.13/exa2_13.txt new file mode 100644 index 000000000..3cbba4e26 --- /dev/null +++ b/1430/CH2/EX2.13/exa2_13.txt @@ -0,0 +1,12 @@ +
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 2\exa2.13.sce', -1)
+
+ Design Value of R_1 when v=24 (in Ohms)=
+
+ 6.
+
+ Design Value of R_1 when i=8(in Ohms)=
+
+ 1.
+
diff --git a/1430/CH2/EX2.14/exa2_14.sce b/1430/CH2/EX2.14/exa2_14.sce new file mode 100644 index 000000000..d11ca11be --- /dev/null +++ b/1430/CH2/EX2.14/exa2_14.sce @@ -0,0 +1,18 @@ +//Example 2.14
+// Calculating Thevenin Parameters
+// From Figure 2.31(b)
+v_x_1=0; // Applying KVL in Middle loop
+i_x_1=0;// From Ohm's Law
+i_sc=3*10^-3; // From KCL
+// For Calculating R_t
+// From figure 2.31(c)
+// v_x=-0.25v_t
+//i_x=-0.125v_t
+//i_t=i_x + v_t/40=-0.1v_s
+// R_t=v_t/i_t
+R_t=-(1*10^3)/0.1; // From equations mentioned above
+v_oc=R_t*i_sc; // Relation between thevenin Parameters
+disp(i_sc,"Short Circuit Current of Thevenin Network(in Amps)=")
+disp(R_t,"Thevenin Resistance(in Ohms)=")
+disp(v_oc,"Open Circuit Voltage of Thevenin Network(in Volts)=")
+
diff --git a/1430/CH2/EX2.14/exa2_14.txt b/1430/CH2/EX2.14/exa2_14.txt new file mode 100644 index 000000000..7b5a28606 --- /dev/null +++ b/1430/CH2/EX2.14/exa2_14.txt @@ -0,0 +1,16 @@ +
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 2\exa2.14.sce', -1)
+
+ Short Circuit Current of Thevenin Network(in Amps)=
+
+ 0.003
+
+ Thevenin Resistance(in Ohms)=
+
+ - 10000.
+
+ Open Circuit Voltage of Thevenin Network(in Volts)=
+
+ - 30.
+
diff --git a/1430/CH2/EX2.15/exa2_15.sce b/1430/CH2/EX2.15/exa2_15.sce new file mode 100644 index 000000000..e44fee2c8 --- /dev/null +++ b/1430/CH2/EX2.15/exa2_15.sce @@ -0,0 +1,11 @@ +// Example 2.15
+// Circuit Reduction by Source Conversion
+//From Figure 2.34(b)
+i_s=18; // Value of Current Source
+g_m=0.25; // Transconductance of VCCS
+G_eq=1/4+1/6+1/12;
+R_eq=1/G_eq; // Equivalent Resistance
+// Using KCL at Upper Node
+// v_2=2(18-0.25v_2)
+v_2=36/1.5;
+disp(v_2,"Voltage across 6-Ohm Resistor(in Volts)=")
diff --git a/1430/CH2/EX2.15/exa2_15.txt b/1430/CH2/EX2.15/exa2_15.txt new file mode 100644 index 000000000..1329c0ac8 --- /dev/null +++ b/1430/CH2/EX2.15/exa2_15.txt @@ -0,0 +1,8 @@ +
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 2\exa2.15.sce', -1)
+
+ Voltage across 6-Ohm Resistor(in Volts)=
+
+ 24.
+
diff --git a/1430/CH2/EX2.16/exa2_16.sce b/1430/CH2/EX2.16/exa2_16.sce new file mode 100644 index 000000000..fe0ccee1b --- /dev/null +++ b/1430/CH2/EX2.16/exa2_16.sce @@ -0,0 +1,10 @@ +// Example 2.16
+// Thevenin Network via Source Conversions
+// After Applying all Source conversion,Series & Parallel Reductions
+v_oc=-6;// Open Circuit Voltage , from figure 2.35(b)
+R_t=10;// Thevenin Resistance
+R_l=2; // Load Resistance
+i=6/(10+2); // Ohm's Law
+disp(v_oc,"Open Circuit Voltage of Thevenin Network(in Volts)=")
+disp(R_t,"Thevenin Resistance(in Ohms)=")
+disp(i,"Load Current(in Amps)=")
diff --git a/1430/CH2/EX2.16/exa2_16.txt b/1430/CH2/EX2.16/exa2_16.txt new file mode 100644 index 000000000..7176a56cc --- /dev/null +++ b/1430/CH2/EX2.16/exa2_16.txt @@ -0,0 +1,16 @@ +
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 2\exa.2.16.sce', -1)
+
+ Open Circuit Voltage of Thevenin Network(in Volts)=
+
+ - 6.
+
+ Thevenin Resistance(in Ohms)=
+
+ 10.
+
+ Load Current(in Amps)=
+
+ 0.5
+
\ No newline at end of file diff --git a/1430/CH2/EX2.2/exa2_2.sce b/1430/CH2/EX2.2/exa2_2.sce new file mode 100644 index 000000000..0ffe31320 --- /dev/null +++ b/1430/CH2/EX2.2/exa2_2.sce @@ -0,0 +1,11 @@ +// Example 2.2
+// Parallel Resistance Calculations
+// From Figure 2.6(a)
+i_x=2; // Current through unknown resistance R_x
+G_par= 1/12+ 1/24+1/8 ; // Equivalent conductance for three resistors of value 12ohms, // 24ohms & 8ohms.
+R_par=1/G_par; // Equivalent Resistance of those three resistors.
+// Using Ohm's Law and KCL
+v= R_par*(10-i_x);
+R_x= v/i_x;// Ohm's law
+disp(v,"Voltage across unknown Resistor(in Volts)=")
+disp(R_x,"Resistance across unknown Resistor(in Ohms)=")
diff --git a/1430/CH2/EX2.2/exa2_2.txt b/1430/CH2/EX2.2/exa2_2.txt new file mode 100644 index 000000000..69b4c8291 --- /dev/null +++ b/1430/CH2/EX2.2/exa2_2.txt @@ -0,0 +1,11 @@ +
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 2\exa2.2.sce', -1)
+
+ Voltage across unknown Resistor(in Volts)=
+
+ 32.
+
+ Resistance across unknown Resistor(in Ohms)=
+
+ 16.
+
diff --git a/1430/CH2/EX2.3/exa2_3.sce b/1430/CH2/EX2.3/exa2_3.sce new file mode 100644 index 000000000..6eb367cbe --- /dev/null +++ b/1430/CH2/EX2.3/exa2_3.sce @@ -0,0 +1,18 @@ +// Example 2.3
+// Available Ohmic Heating Power in Electric Grill unit
+// From figure 2.7 we know,
+R_1=12; // Resistive element 1
+R_2=24; // Resistive element 2
+v_s=120; // Voltage source
+// Switch allows one of the four resistance values given below,
+R_par= (R_1*R_2)/(R_1+R_2); // Parallel Combination
+// Individual Values of Resiators and their series combination given below
+R_ser=R_1+R_2;
+P_min=v_s^2/(R_ser); // Minimum power dissipation
+P_max=v_s^2/(R_par);// Maximum power dissipation
+// Intermediate Values of Power consumption
+P_1=v_s^2/R_1; // Power dissipated in R_1
+P_2=v_s^2/R_2; // Power dissipated in R_2
+disp(P_min,"Minimum power dissipated in Grill(in Watt)=")
+disp(P_max,"Maximum power dissipated in Grill(in Watt)=")
+disp(P_1,"&",P_2,"Intermediate values of power dissipation(in Watt)=")
diff --git a/1430/CH2/EX2.3/exa2_3.txt b/1430/CH2/EX2.3/exa2_3.txt new file mode 100644 index 000000000..4c76498ef --- /dev/null +++ b/1430/CH2/EX2.3/exa2_3.txt @@ -0,0 +1,21 @@ +
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 2\exa2.3.sce', -1)
+
+ Minimum power dissipated in Grill(in Watt)=
+
+ 400.
+
+ Maximum power dissipated in Grill(in Watt)=
+
+ 1800.
+
+ Intermediate values of power dissipation(in Watt)=
+
+ 600.
+
+ &
+
+ 1200.
+
+
diff --git a/1430/CH2/EX2.4/exa2_4.sce b/1430/CH2/EX2.4/exa2_4.sce new file mode 100644 index 000000000..39e8a342a --- /dev/null +++ b/1430/CH2/EX2.4/exa2_4.sce @@ -0,0 +1,20 @@ +// Example 2.4
+// Ladder Calculations
+//From figure 2.8(a)
+v_s=40; // Value of Voltage source
+R_par=((20*20)/(20+20))*10^3;//Equivalent resistance of two parallel 20k ohms resistors
+R_ser=(4+5+6)*10^3;//Equivalent resistance of three series resistances.
+//from figure 2.8(b)
+R_eq= 2*10^3+ ((10*15)/(10+15))*10^3;
+//The entire ladder reduces to single equivalent resistance R_eq
+// From figure 2.8(c)
+i=v_s/R_eq;// Terminal Current
+p=v_s*i;// total Power dissipated
+// from figure 2.8(b), using KVL in Left loop
+v_x=40-(2*10^3)*i; // Voltage across 20k ohm resistor
+// form figure 2.8(a),Using three-resistor voltage divider
+v_y=(5*v_x)/(4+5+6);// Voltage across 5k ohm resistor
+disp(i,"Terminal Current(in Amps)=")
+disp(p,"Total Power dissipated in Circuit(in Watt)=")
+disp(v_x,"Voltage across 20k ohm resistor(in Volts)=")
+disp(v_y,"Voltage across 5k ohm resistor(in Volts)=")
diff --git a/1430/CH2/EX2.4/exa2_4.txt b/1430/CH2/EX2.4/exa2_4.txt new file mode 100644 index 000000000..787cdb686 --- /dev/null +++ b/1430/CH2/EX2.4/exa2_4.txt @@ -0,0 +1,20 @@ +
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 2\exa2.4.sce', -1)
+
+ Terminal Current(in Amps)=
+
+ 0.005
+
+ Total Power dissipated in Circuit(in Watt)=
+
+ 0.2
+
+ Voltage across 20k ohm resistor(in Volts)=
+
+ 30.
+
+ Voltage across 5k ohm resistor(in Volts)=
+
+ 10.
+
diff --git a/1430/CH2/EX2.6/exa2_6.sce b/1430/CH2/EX2.6/exa2_6.sce new file mode 100644 index 000000000..68cc244fb --- /dev/null +++ b/1430/CH2/EX2.6/exa2_6.sce @@ -0,0 +1,15 @@ +//Example 2.6
+// Amplifier with a Field-Effect Transistor
+//g_m=5*(10^-3); // Transconductance of voltage controlled current source
+
+function[v_out]=FET(v_in)
+g_m=5*(10^-3);
+v_g=(5/6)*v_in;// from figure 2.15,using Voltage divider in Left loop
+i_out=-g_m*v_g;// Using KCL in right Loop node
+v_out=(6*10^3)*i_out;// Output voltage of Amplifier
+endfunction
+
+// For Example take v_in= 1 volt
+V_in=1;
+V_out=FET(V_in);
+disp(V_out,"Output Voltage of this amplifier(in Volts)=")
diff --git a/1430/CH2/EX2.6/exa2_6.txt b/1430/CH2/EX2.6/exa2_6.txt new file mode 100644 index 000000000..514f61cdb --- /dev/null +++ b/1430/CH2/EX2.6/exa2_6.txt @@ -0,0 +1,8 @@ +
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 2\exa2.6.sce', -1)
+
+ Output VOltage of this amplifier(in Volts)=
+
+ - 25.
+
diff --git a/1430/CH2/EX2.7/exa2_7.sce b/1430/CH2/EX2.7/exa2_7.sce new file mode 100644 index 000000000..0e73a2edd --- /dev/null +++ b/1430/CH2/EX2.7/exa2_7.sce @@ -0,0 +1,14 @@ +// Example 2.7
+// Analysis with a VCVS(Voltage controlled Voltage Source)
+// From Figure 2.16(a)
+disp("Call the function VCVS with input argument v_s")
+function[i_1]=VCVS(v_s)
+// Applying KVL on Right-hand loop we get v_2=3*i_1
+//Applying KCL at Upper node yields, i=1.5i_1
+// Using KVL in Left Loop
+i_1=v_s/(4*(1.5)+3);// v_s=4*i+v_2
+endfunction
+// For Example let us assume the value of v_s= 9 volts
+V_s=9;
+I_1=VCVS(V_s);
+disp(I_1,"Current through 10-ohm resistance(in Amps)=")
diff --git a/1430/CH2/EX2.7/exa2_7.txt b/1430/CH2/EX2.7/exa2_7.txt new file mode 100644 index 000000000..db27567bb --- /dev/null +++ b/1430/CH2/EX2.7/exa2_7.txt @@ -0,0 +1,10 @@ +
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 2\exa2.7.sce', -1)
+
+ Call the function VCVS with input argument v_s
+
+ Current through 10-ohm resistance(in Amps)=
+
+ 1.
+
diff --git a/1430/CH2/EX2.8/exa2_8.sce b/1430/CH2/EX2.8/exa2_8.sce new file mode 100644 index 000000000..244103d69 --- /dev/null +++ b/1430/CH2/EX2.8/exa2_8.sce @@ -0,0 +1,17 @@ +// Example 2.8
+// Equivalent Resistance with a VCCS(Voltage controlled Current Source)
+function[R_eq]=VCCS(R,g_m)
+// From figure 2.19, applying KCL at upper node
+// i= i_R - i_c= (v/R)-(g_m*v) = ((1-g_m*R)*v )/R
+if R*g_m == 1 then
+ R_eq= %inf; // Circuits behaves like an open circuit
+ else
+R_eq= R/(1-g_m*R);// Equivalent Resistance of the circuit
+end
+endfunction
+// For Example take g_m= 2 and R = 0.5
+funcprot(0);
+g_m= 2;
+R= 0.5;
+R_eq= VCCS(R,g_m);
+disp(R_eq,"Equivalent Resistance of the circuit(in Ohms)=")
diff --git a/1430/CH2/EX2.8/exa2_8.txt b/1430/CH2/EX2.8/exa2_8.txt new file mode 100644 index 000000000..3cad5a95c --- /dev/null +++ b/1430/CH2/EX2.8/exa2_8.txt @@ -0,0 +1,7 @@ +
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 2\exa2.8.sce', -1)
+
+ Equivalent Resistance of the circuit(in Ohms)=
+
+ Inf
diff --git a/1430/CH2/EX2.9/exa2_9.sce b/1430/CH2/EX2.9/exa2_9.sce new file mode 100644 index 000000000..64912a997 --- /dev/null +++ b/1430/CH2/EX2.9/exa2_9.sce @@ -0,0 +1,23 @@ +// Example 2.9
+// Analysis of Ladder Network Using Proportionality Principle
+// From figure 2.20
+i_1=1; // Assumption
+v_1=12*i_1;
+// Working backward toward the source using Ohm's and Kirchhoff's Laws,
+v_2=v_1/4; // Virtual Voltage across 6 ohm resistor
+i_2=v_2/6; // Virtual Current through 6 ohm resistor
+i=i_1+i_2; // Virtual Current through Independent Voltage source
+v_3=4*i;// Virtual Voltage across 3 Ohm resistor
+v_s= v_3+v_2;// Virtual Value of Independent Voltage source
+v_s_cap=72;// Actual Value of Independent Voltage source
+K=v_s_cap/v_s;
+// Actual Values of Variables are
+i_cap=K*i;
+v_2_cap=K*v_2;
+i_1_cap=K*i_1;
+R_eq= v_s_cap/i_cap; //Equivalent resistance of teh Ladder Network
+disp(i_cap,"Current through Independent Voltage Source(in Amps)=")
+disp(v_2_cap,"Voltage across 6 Ohm Resistor(in Volts)=")
+disp(i_1_cap,"Current through 12 Ohm Resistor(in Amps)=")
+disp(R_eq,"Equivalent Resistance of the Network(in Ohms)=")
+
diff --git a/1430/CH2/EX2.9/exa2_9.txt b/1430/CH2/EX2.9/exa2_9.txt new file mode 100644 index 000000000..990764c88 --- /dev/null +++ b/1430/CH2/EX2.9/exa2_9.txt @@ -0,0 +1,21 @@ +
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 2\exa2.9.sce', -1)
+
+ Current through Independent Voltage Source(in Amps)=
+
+ 12.
+
+ Voltage across 6 Ohm Resistor(in Volts)=
+
+ 24.
+
+ Current through 12 Ohm Resistor(in Amps)=
+
+ 8.
+
+ Equivalent Resistance of the Network(in Ohms)=
+
+ 6.
+
+
diff --git a/1430/CH3/EX3.1/exa3_1.sce b/1430/CH3/EX3.1/exa3_1.sce new file mode 100644 index 000000000..302bfc505 --- /dev/null +++ b/1430/CH3/EX3.1/exa3_1.sce @@ -0,0 +1,11 @@ +// Example 3.1
+// Model of a Battery
+v_s=6; // Terminal voltage of Battery when i=0
+R_s= -(6.0-5.8)/(0-0.05);// Slope Resistance from v-i curve
+// Setting v>= 0.9v_s=5.4 V
+// Using Ohm's Law and above mentioned conditions we get
+// 5.4=(6*R_L)/(4+R_L)
+R_L=(5.4*4)/0.6;// Minimum value of Load resistance for treating Battery as a
+// ideal voltage source
+// R_L >=36 Ohms
+disp(R_L,"Minimum value of Load Resistance(in Ohms)=")
diff --git a/1430/CH3/EX3.1/exa3_1.txt b/1430/CH3/EX3.1/exa3_1.txt new file mode 100644 index 000000000..b74bccbf5 --- /dev/null +++ b/1430/CH3/EX3.1/exa3_1.txt @@ -0,0 +1,6 @@ +-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 3\exa3.1.sce', -1)
+
+ Minimum value of Load Resistance(in Ohms)=
+
+ 36.
+
diff --git a/1430/CH3/EX3.10/exa3_10.sce b/1430/CH3/EX3.10/exa3_10.sce new file mode 100644 index 000000000..cf2b9b3bb --- /dev/null +++ b/1430/CH3/EX3.10/exa3_10.sce @@ -0,0 +1,10 @@ +//Example 3.10
+// Analog Multimeter Design
+V_fs=120*10^-3; // d'Arsonval Parameter
+I_fs=200*10^-6; // d'Arsonval Parameter
+// Movement's Resistance
+R_m=V_fs/I_fs;
+R_v=((5000-120)*(600))/120;// Multiplier Resistance
+R_a=600/((30000/200)-1); // Shunt Resistance
+disp(R_v,"Design Value for Multiplier resistor(in Ohms)=")
+disp(R_a,"Design Value for Shunt resistor(in Ohms)=")
diff --git a/1430/CH3/EX3.10/exa3_10.txt b/1430/CH3/EX3.10/exa3_10.txt new file mode 100644 index 000000000..e2523202d --- /dev/null +++ b/1430/CH3/EX3.10/exa3_10.txt @@ -0,0 +1,10 @@ + -->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 3\exa3.10.sce', -1)
+
+ Design Value for Multiplier resistor(in Ohms)=
+
+ 24400.
+
+ Design Value for Shunt resistor(in Ohms)=
+
+ 4.0268456
+
diff --git a/1430/CH3/EX3.11/exa3_11.sce b/1430/CH3/EX3.11/exa3_11.sce new file mode 100644 index 000000000..7c0eb0f44 --- /dev/null +++ b/1430/CH3/EX3.11/exa3_11.sce @@ -0,0 +1,13 @@ +// Example 3.11
+// Estimating Voltage Measurement Error
+V_u_min=7.40-0.03*10; // Minimum value of measured voltage
+V_u_max=7.40+0.03*10;// Maximum value of measured voltage
+R_vm=20000*10; // Total input resistance of voltmeter
+// thevenin equivalent resistance R= (R_x*5000)/(R_x+5000)<=5000
+R=5000; // Maximum value of thevenin resistance
+// Upper bound on the actual voltage is
+V_act_u=(1+R/R_vm)*7.70;
+// Lower bound on the actual voltage corresponds to R/R_vm=0
+V_act_l=(1+0)*7.10;
+disp(V_act_u,"Upper bound on the actual Voltage reading(in Volts)=")
+disp(V_act_l,"Lower bound on the actual voltage readind(in Volts)=")
diff --git a/1430/CH3/EX3.11/exa3_11.txt b/1430/CH3/EX3.11/exa3_11.txt new file mode 100644 index 000000000..7ae1f6e6b --- /dev/null +++ b/1430/CH3/EX3.11/exa3_11.txt @@ -0,0 +1,11 @@ +
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 3\exa3.11.sce', -1)
+
+ Upper bound on the actual Voltage reading(in Volts)=
+
+ 7.8925
+
+ Lower bound on the actual voltage readind(in Volts)=
+
+ 7.1
+
diff --git a/1430/CH3/EX3.12/exa3_12.sce b/1430/CH3/EX3.12/exa3_12.sce new file mode 100644 index 000000000..34aba89dd --- /dev/null +++ b/1430/CH3/EX3.12/exa3_12.sce @@ -0,0 +1,14 @@ +// Example 3.12
+// Strain Measurement with a Wheatstone Bridge
+// form Figure 3.41
+R_1=1000;
+R_2=100;
+R=625;
+delta_R=0;
+// R_u=(R_2/R_1)*R
+R_u=(100/1000)*625;
+// After strain is applied , the bridge is rebalanced by ajusting th esecond potentiometer to delta_R=2.4
+delta_R_u=(100/1000)*2.4;
+// Strain is defined as s=delta_l/l
+s=delta_R_u/(2*R_u); // Strain meaasured with the help of Wheatstone Bridge
+disp(s,"Strain Measured with the help of wheatstone Bridge=")
diff --git a/1430/CH3/EX3.12/exa3_12.txt b/1430/CH3/EX3.12/exa3_12.txt new file mode 100644 index 000000000..bbd377381 --- /dev/null +++ b/1430/CH3/EX3.12/exa3_12.txt @@ -0,0 +1,7 @@ +
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 3\exa3.12.sce', -1)
+
+ Strain Measured with the help of wheatstone Bridge=
+
+ 0.00192
+
diff --git a/1430/CH3/EX3.2/exa3_2.sce b/1430/CH3/EX3.2/exa3_2.sce new file mode 100644 index 000000000..d8eed010e --- /dev/null +++ b/1430/CH3/EX3.2/exa3_2.sce @@ -0,0 +1,5 @@ +// Example 3.2
+// A Paradox Resolved
+// From figure 3.4(c)
+i=((40+20)*(10^-3))/(5+10);// Applying KVL in figure 3.4(c)
+disp(i,"Circuit Current(in Amps)=")
diff --git a/1430/CH3/EX3.2/exa3_2.txt b/1430/CH3/EX3.2/exa3_2.txt new file mode 100644 index 000000000..46d0cc33f --- /dev/null +++ b/1430/CH3/EX3.2/exa3_2.txt @@ -0,0 +1,6 @@ +-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 3\exa3.2', -1)
+
+ Circuit Current(in Amps)=
+
+ 0.004
+
diff --git a/1430/CH3/EX3.3/exa3_3.sce b/1430/CH3/EX3.3/exa3_3.sce new file mode 100644 index 000000000..4f5b5ece2 --- /dev/null +++ b/1430/CH3/EX3.3/exa3_3.sce @@ -0,0 +1,13 @@ +// Example 3.3
+// Calculating Power Transfer and Efficiency
+v_s=120; // Open Circuit Voltage
+R_s=0.2+4.8;// Source resistance
+R_L=5; // From Maximum Power transfer theorem
+P_max=(120)^2/(4*5); // Maximum Power Transfered
+P_hp=P_max/746;// Maximum Power in Horsepower
+i=120/(5+4.8+0.2);// Current in circuit
+P_s=(i)^2*5;// Power dissipated in Source
+Eff=P_max/(P_max+P_s); // Power Transfer Efficiency
+disp(P_max,"Maximum Power Transfered(in Watt)=")
+disp(P_hp,"Maximum Power Transfered(in Horsepower)=")
+disp(Eff,"Power Transfer Efficiency =")
diff --git a/1430/CH3/EX3.3/exa3_3.txt b/1430/CH3/EX3.3/exa3_3.txt new file mode 100644 index 000000000..c6380f37b --- /dev/null +++ b/1430/CH3/EX3.3/exa3_3.txt @@ -0,0 +1,16 @@ +
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 3\exa3.3', -1)
+
+ Maximum Power Transfered(in Watt)=
+
+ 720.
+
+ Maximum Power Transfered(in Horsepower)=
+
+ 0.9651475
+
+ Power Transfer Efficiency =
+
+ 0.5
+
+
diff --git a/1430/CH3/EX3.4/exa3_4.sce b/1430/CH3/EX3.4/exa3_4.sce new file mode 100644 index 000000000..cf2b9b3bb --- /dev/null +++ b/1430/CH3/EX3.4/exa3_4.sce @@ -0,0 +1,10 @@ +//Example 3.10
+// Analog Multimeter Design
+V_fs=120*10^-3; // d'Arsonval Parameter
+I_fs=200*10^-6; // d'Arsonval Parameter
+// Movement's Resistance
+R_m=V_fs/I_fs;
+R_v=((5000-120)*(600))/120;// Multiplier Resistance
+R_a=600/((30000/200)-1); // Shunt Resistance
+disp(R_v,"Design Value for Multiplier resistor(in Ohms)=")
+disp(R_a,"Design Value for Shunt resistor(in Ohms)=")
diff --git a/1430/CH3/EX3.4/exa3_4.txt b/1430/CH3/EX3.4/exa3_4.txt new file mode 100644 index 000000000..7057f5b46 --- /dev/null +++ b/1430/CH3/EX3.4/exa3_4.txt @@ -0,0 +1,11 @@ +
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 3\exa3.4.sce', -1)
+
+ Design Value for Multiplier resistor(in Ohms)=
+
+ 24400.
+
+ Design Value for Shunt resistor(in Ohms)=
+
+ 4.0268456
+
diff --git a/1430/CH4/EX4.1/exa4_1.sce b/1430/CH4/EX4.1/exa4_1.sce new file mode 100644 index 000000000..4501bd5da --- /dev/null +++ b/1430/CH4/EX4.1/exa4_1.sce @@ -0,0 +1,15 @@ +// Example 4.1
+// Node Analysis with One Unknown
+// From figure 4.3
+G_11=1/6+1/(5+7)+1/4; // Sum of all conductance connected at node 1
+i_s1=18/6+(-60/4); // Net equivalent source current into node 1
+ // From node equation G_11*v_1=i_s1
+ v_1=i_s1/G_11; // Node voltage v_1
+ // Using Ohm's Law
+ i_a=(18-v_1)/6; //Current through 6-Ohm resistor
+ i_b=v_1/(5+7);// Current through 5-Ohm resistor
+ i_c=(v_1-(-60))/4; // Current through 4-Ohm resistor
+ disp(v_1,"Node Voltage(in Volts)=")
+ disp(i_a,"Branch Current through 6-Ohms(in Amps)=")
+ disp(i_b,"BRanch Current through 5-Ohms(in Amps)=")
+ disp(i_c,"Branch Current through 4-Ohms(in Amps)=")
diff --git a/1430/CH4/EX4.1/exa4_1.txt b/1430/CH4/EX4.1/exa4_1.txt new file mode 100644 index 000000000..c1131cfba --- /dev/null +++ b/1430/CH4/EX4.1/exa4_1.txt @@ -0,0 +1,19 @@ +
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 4\exa4.1.sce', -1)
+
+ Node Voltage(in Volts)=
+
+ - 24.
+
+ Branch Current through 6-Ohms(in Amps)=
+
+ 7.
+
+ BRanch Current through 5-Ohms(in Amps)=
+
+ - 2.
+
+ Branch Current through 4-Ohms(in Amps)=
+
+ 9.
+
diff --git a/1430/CH4/EX4.10/exa4_10.sce b/1430/CH4/EX4.10/exa4_10.sce new file mode 100644 index 000000000..1cdb677ea --- /dev/null +++ b/1430/CH4/EX4.10/exa4_10.sce @@ -0,0 +1,16 @@ +// Example 4.10
+// Mesh Analysis with a CCCS
+// By inspection of figure 4.34,we find the resistance matrix to be
+R=[10+4,-4;-4,4+7+3];
+// i_a= i_1-i_2
+//v_s=[6;(-24*i_1+24*i_2)]
+//v_s=[6;0]+[0,0;-24,24]*[i_1;i_2] -------equation 1
+// Comparing Equation 1 with , [v_s]=[v_s_tilda]+[R_tilda]*[i]
+v_s_tilda=[6;0];
+R_tilda=[0,0;-24,24];
+// using Equation [R-R_tilda]*[i]=[v_s_tilda]
+i=(R-R_tilda)\v_s_tilda;
+i_1=i(1,1);
+i_2=i(2,1);
+disp(i_1,"Current in Mesh 1(in Amps)=")
+disp(i_2,"Current in Mesh 2(in Amps)=")
diff --git a/1430/CH4/EX4.10/exa4_10.txt b/1430/CH4/EX4.10/exa4_10.txt new file mode 100644 index 000000000..31e054b52 --- /dev/null +++ b/1430/CH4/EX4.10/exa4_10.txt @@ -0,0 +1,11 @@ +
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 4\exa4.10.sce', -1)
+
+ Current in Mesh 1(in Amps)=
+
+ 1.
+
+ Current in Mesh 2(in Amps)=
+
+ 2.
+
diff --git a/1430/CH4/EX4.11/exa4_11.sce b/1430/CH4/EX4.11/exa4_11.sce new file mode 100644 index 000000000..6a0b5f521 --- /dev/null +++ b/1430/CH4/EX4.11/exa4_11.sce @@ -0,0 +1,15 @@ +// Example 4.11
+// Mesh Analysis of a Current Amplifier
+R=[37 -1 0;-1 41 -4;0 -4 19]; // Resistance matrix
+//v_a=6*i_1 , v_b=4*(i_3-i_2)
+// [v_s]=[30*i_s;0;0]+[0 0 0;-864 0 0 ; 0 96 -96]*[i_1;i_2;i_3]
+i_s=10^-3; // Assumption
+R_tilda=[0 0 0;-864 0 0;0 96 -96];
+v_s_tilda=[30*i_s;0;0];
+// Using Equation, [R-R_tilda][i]=[v_s_tilda]
+i=(R-R_tilda)\v_s_tilda
+i_1=i(1,1);
+i_2=i(2,1);
+i_3=i(3,1);
+A_i=i_3/i_s; // Gain Of Current Amplifier
+disp(A_i,"Gain of Current Amplifier is=")
diff --git a/1430/CH4/EX4.11/exa4_11.txt b/1430/CH4/EX4.11/exa4_11.txt new file mode 100644 index 000000000..460cf4438 --- /dev/null +++ b/1430/CH4/EX4.11/exa4_11.txt @@ -0,0 +1,7 @@ +
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 4\exa4.11.sce', -1)
+
+ Gain of Current Amplifier is=
+
+ - 10.
+
diff --git a/1430/CH4/EX4.16/exa4_16.sce b/1430/CH4/EX4.16/exa4_16.sce new file mode 100644 index 000000000..aaecd40e5 --- /dev/null +++ b/1430/CH4/EX4.16/exa4_16.sce @@ -0,0 +1,16 @@ +// Example 4.16
+// Transformation of a Resistive Bridge
+// From figure 4.49(b)
+R_a=3;// Resistances of Wye Network
+R_b=12;
+R_c=4;
+R_2=(R_a*R_b)+(R_c*R_b)+(R_a*R_c);
+// Equivalent Delta Resistances are,
+R_ab=R_2/R_c;
+R_bc=R_2/R_a;
+R_ca=R_2/R_b;
+// From Figure 4.49(c)
+R_par_1=(R_bc*8)/(R_bc+8);// Combining R_bc & 8
+R_par_2=(R_ca*2)/(R_ca+2);// Combining R_ca & 2
+R_eq=(24*(R_par_1+R_par_2))/(24+R_par_2+R_par_1);// Equivalent Resistance
+disp(R_eq,"Equivalent Resistance of the network(in Ohms)=")
diff --git a/1430/CH4/EX4.16/exa4_16.txt b/1430/CH4/EX4.16/exa4_16.txt new file mode 100644 index 000000000..da513ee90 --- /dev/null +++ b/1430/CH4/EX4.16/exa4_16.txt @@ -0,0 +1,6 @@ +
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 4\exa4.16.sce', -1)
+
+ Equivalent Resistance of the network(in Ohms)=
+
+ 6.
diff --git a/1430/CH4/EX4.2/exa4_2.sce b/1430/CH4/EX4.2/exa4_2.sce new file mode 100644 index 000000000..75238a12b --- /dev/null +++ b/1430/CH4/EX4.2/exa4_2.sce @@ -0,0 +1,25 @@ +// Example 4.2
+// Matrix Node Analysis with two Unknowns
+// From figure 4.6
+G_11= 1/6+1/15+1/12+1/60; // Sum of conductance connected to node 1
+G_22=1/5+1/12+1/60;// Sum of conductance connected to node 2
+G_12=1/12+1/60;
+G_21=G_12; //Equivalent conductance connecting node 1 & 2
+// Conductance matrix is given by
+G=[G_11,-G_12;-G_21,G_22];
+i_s11=30/6+1;// Net Equivalent source current into node 1
+i_s21=50/5-1;// Net Equivalent source current into node 2
+i_s=[i_s11;i_s21]; // Current Vector
+// Using Matrix node Equation G*v=i
+v=G\i_s;
+v_1=v(1,1);
+v_2=v(2,1);
+v_12=v_1-v_2; // Voltage across current source
+i_a=(30-v_1)/6;// Current through 30 source
+i_b=(50-v_2)/5; // Current through 50V source
+p_50= 50*i_b;// Power supplied by 50V source
+p_30=30*i_a;// Power supplied by 30V source
+p_1=v_12*1;// Power supplied by 1A current source
+disp(p_50,"Power supplied by 50V source(in Watt)=")
+disp(p_30,"Power supplied by 30V source(in Watt)=")
+disp(p_1,"Power supplied by 1A source(in Watt)=")
diff --git a/1430/CH4/EX4.2/exa4_2.txt b/1430/CH4/EX4.2/exa4_2.txt new file mode 100644 index 000000000..d51b6d15b --- /dev/null +++ b/1430/CH4/EX4.2/exa4_2.txt @@ -0,0 +1,15 @@ +
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 4\exa4.2.sce', -1)
+
+ Power supplied by 50V source(in Watt)=
+
+ 100.
+
+ Power supplied by 30V source(in Watt)=
+
+ 0.
+
+ Power supplied by 1A source(in Watt)=
+
+ - 10.
+
diff --git a/1430/CH4/EX4.3/exa4_3.sce b/1430/CH4/EX4.3/exa4_3.sce new file mode 100644 index 000000000..ea0cad621 --- /dev/null +++ b/1430/CH4/EX4.3/exa4_3.sce @@ -0,0 +1,24 @@ +// Example 4.3
+// Matrix Node Analysis with Three Unknown
+// From Figure 4.7
+G_11= 1/4+1/2+1/10; // Sum of Conductance at node 1
+G_12=1/10// Equivalent Conductance connecting node 1 & 2
+G_13= 0; // Equivalant Conductance connecting node 1 & 3
+G_21=G_12; // Symmetry Property of Conductance Matrix
+G_22= 1/10+1/5; // Sum of conductance at node 2
+G_23=1/5; // Equivalent Conductance connecting node 2 & 3
+G_31=G_13; // Symmetry Property of Conductance Matrix
+G_32=G_23; // Symmetry Property of Conductance Matrix
+G_33=1/5+1/20; // Sum of Conductance at node 3
+G=[G_11,-G_12,-G_13;-G_21,G_22,-G_23;-G_31,-G_32,G_33]; // Conductance Matrix
+i_s11= 30/2+3; // Net Equivalent source current into node 1
+i_s21= -1; // Net Equivalent source current into node 2
+i_s31=-3; // Net Equivalent source current into node 3
+i_s=[i_s11;i_s21;i_s31]; // Current Vector
+v=G\i_s;
+v_1=v(1,1);
+v_2=v(2,1);
+v_3=v(3,1);
+disp(v_1," Voltage at node 1(in Volts)=")
+disp(v_2,"Voltage at node 2(in Volts)=")
+disp(v_3," Voltage at node 3(in Volts)=")
diff --git a/1430/CH4/EX4.3/exa4_3.txt b/1430/CH4/EX4.3/exa4_3.txt new file mode 100644 index 000000000..f55ccf33d --- /dev/null +++ b/1430/CH4/EX4.3/exa4_3.txt @@ -0,0 +1,15 @@ +
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 4\exa4.3.sce', -1)
+
+ Voltage at node 1(in Volts)=
+
+ 20.
+
+ Voltage at node 2(in Volts)=
+
+ - 10.
+
+ Voltage at node 3(in Volts)=
+
+ - 20.
+
diff --git a/1430/CH4/EX4.4/exa4_4.sce b/1430/CH4/EX4.4/exa4_4.sce new file mode 100644 index 000000000..19e46e7f1 --- /dev/null +++ b/1430/CH4/EX4.4/exa4_4.sce @@ -0,0 +1,22 @@ +// Example 4.4
+// Matrix Node Analysis with source Conversion
+// From figure 4.11(a), The floating 48V source with series resistance has been converted into a current source with parallel resistance
+// From figure 4.11(b),
+G_11=1/4+1/2+1; // Sum of conductance at node 1
+G_12=1; // Equivalent conductance between node 1 & 2
+G_21=G_12; // Symmetry Property of Conductance matrix
+G_22=1/3+1+1/6; // Sum of conductance at node 2
+G=[G_11,-G_12;-G_21,G_22]; // Conductance Matrix
+i_s11=-24/4; // Equivalent source current at node 1
+i_s21=15/3+(-24)/6+48/6;// Equivalent source current at node 2
+i_s=[i_s11;i_s21]; // Current Matrix
+// Using Matrix Node Equation
+// G*v=i
+v=G\i_s;
+v_1=v(1,1);
+v_2=v(2,1);
+i_a=(15-v_2)/(3*10^3);// Current through 3-kOhm resistor
+i_b=-v_1/(2*10^3); // Current through 2-kOhm resistor
+disp(v_1,v_2)
+disp(i_a,"Current through 3-kOhm resistor(in Amps)=")
+disp(i_b,"Current through 2-kOhm resistor(in Amps)=")
diff --git a/1430/CH4/EX4.4/exa4_4.txt b/1430/CH4/EX4.4/exa4_4.txt new file mode 100644 index 000000000..a1e32e7a1 --- /dev/null +++ b/1430/CH4/EX4.4/exa4_4.txt @@ -0,0 +1,44 @@ + ans =
+
+ 1.
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 4\exa4.4.sce', -1)
+
+ Current through 3-kOhm resistor(in Amps)=
+
+ 0.0005385
+
+ Current through 2-kOhm resistor(in Amps)=
+
+ 0.0055385
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 4\exa4.4.sce', -1)
+
+ 13.384615
+
+ - 11.076923
+
+ Current through 3-kOhm resistor(in Amps)=
+
+ 0.0005385
+
+ Current through 2-kOhm resistor(in Amps)=
+
+ 0.0055385
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 4\exa4.4.sce', -1)
+
+ 6.
+
+ - 5.075D-16
+
+ Current through 3-kOhm resistor(in Amps)=
+
+ 0.003
+
+ Current through 2-kOhm resistor(in Amps)=
+
+ 2.538D-19
+
+-->exit
+-->exec('SCI/etc/scilab.quit','errcatch',-1);quit;
diff --git a/1430/CH4/EX4.5/exa4_5.sce b/1430/CH4/EX4.5/exa4_5.sce new file mode 100644 index 000000000..f9f6da522 --- /dev/null +++ b/1430/CH4/EX4.5/exa4_5.sce @@ -0,0 +1,16 @@ +// Example 4.5
+// Node analysis with a Supernode
+// From figure 4.15, Applying KCL at Supernode
+disp("((v_1-30)-v_2)/2-1+(v_1-v_2)/10+(v_1-50)/5=0 -------- Equation 1")
+//Applying KCL at node 2
+disp("(v_2-v_1)/10+(v_2-(v_1-30))/2+v_2-7=0 --------- Equation 2")
+disp("Rearrangement then yields a pair of equations in standard form,")
+disp("0.8v_1-0.6v_2=26")
+disp("-0.6v_1+1.6v_2=-8")
+G=[0.8,-0.6;-0.6,1.6]; // Conductance Matrix
+i=[26;-8]; // Current Matrix
+v=G\i;
+v_1=v(1,1);
+v_2=v(2,1);
+disp(v_1,"Voltage at Node 1(in Volts)=")
+disp(v_2,"Voltage at Node 2(in Volts)=")
diff --git a/1430/CH4/EX4.5/exa4_5.txt b/1430/CH4/EX4.5/exa4_5.txt new file mode 100644 index 000000000..03f5dbb40 --- /dev/null +++ b/1430/CH4/EX4.5/exa4_5.txt @@ -0,0 +1,21 @@ +
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 4\exa4.5.sce', -1)
+
+ ((v_1-30)-v_2)/2-1+(v_1-v_2)/10+(v_1-50)/5=0 -------- Equation 1
+
+ (v_2-v_1)/10+(v_2-(v_1-30))/2+v_2-7=0 --------- Equation 2
+
+ Rearrangement then yields a pair of equations in standard form,
+
+ 0.8v_1-0.6v_2=26
+
+ -0.6v_1+1.6v_2=-8
+
+ Voltage at Node 1(in Volts)=
+
+ 40.
+
+ Voltage at Node 2(in Volts)=
+
+ 10.
+
diff --git a/1430/CH4/EX4.6/exa4_6.sce b/1430/CH4/EX4.6/exa4_6.sce new file mode 100644 index 000000000..3dd315c1a --- /dev/null +++ b/1430/CH4/EX4.6/exa4_6.sce @@ -0,0 +1,24 @@ +// Example 4.6
+// Matrix Mesh Analysis with Two Unknowns
+// From Figure 4.22(a)
+R_11=6+15; // Sum of Resistance around the mesh 1
+R_12=15;// Equivalent Resistance shared by mesh 1 & 2
+R_21=R_12; // Symmetry Property of Resistance Matrix
+R_22=15+5+(60*12)/(60+12); // Sum of Resistance around the mesh 2
+R=[R_11,-R_12;-R_21,R_22]; // Resistance Matrix
+v_s_11=30; // Net Equivalent source Voltage that drives i_1 in mesh 1.
+v_s_21=-50-(60*12)/(60+12); // Net Equivalent source Voltage that drives i_2 in mesh 2
+v_s=[v_s_11;v_s_21]; // Voltage Vector
+// Form Matrix Mesh Equation R*i=v
+i=R\v_s; // Current Vector
+i_1=i(1,1);
+i_2=i(2,1);
+p_50=50*(-i_2);// Power supplied by 50V source
+p_30=30*i_1;// Power supplied by 30V source
+v_a=(60*12*(1+i_2))/(60+12); // Voltage across 1A current source
+disp(i_1,"Current in Mesh 1(in Amps)=")
+disp(i_2,"Current in mesh 2(in Amps)=")
+disp(p_50,"Power supplied by 50V source(in Watt)=")
+disp(p_30,"Power supplied by 30V source(in Watt)=")
+disp(v_a,"Voltage across Current source(in Volts=")
+
diff --git a/1430/CH4/EX4.6/exa4_6.txt b/1430/CH4/EX4.6/exa4_6.txt new file mode 100644 index 000000000..17b6d6637 --- /dev/null +++ b/1430/CH4/EX4.6/exa4_6.txt @@ -0,0 +1,23 @@ +
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 4\exa4.6.sce', -1)
+
+ Current in Mesh 1(in Amps)=
+
+ 0.
+
+ Current in mesh 2(in Amps)=
+
+ - 2.
+
+ Power supplied by 50V source(in Watt)=
+
+ 100.
+
+ Power supplied by 30V source(in Watt)=
+
+ 0.
+
+ Voltage across Current source(in Volts=
+
+ - 10.
+
diff --git a/1430/CH4/EX4.7/exa4_7.sce b/1430/CH4/EX4.7/exa4_7.sce new file mode 100644 index 000000000..d05ca4903 --- /dev/null +++ b/1430/CH4/EX4.7/exa4_7.sce @@ -0,0 +1,25 @@ +// Example 4.7
+// Matrix Mesh Analysis with Three Unknown
+// From Figure 4.23
+R_11= 10+8+3; // Sum of Resistance around mesh 1
+R_12=3; // Equivalent Resistance shared by mesh 1 & 2
+R_13=0; // Equivalent resistance shared by mesh 1 & 3
+R_21=R_12; // Symmetry Property of Resistance Matrix
+R_22=3+6;// Sum of resistance around mesh 2
+R_23=6; // Equivalent Resistance shared by mesh 2 & 3
+R_31=R_13;// Symmetry Property of Resistance Matrix
+R_32=R_23;// symmetry Property of Resistance Matrix
+R_33=6+1;// Sum of resistance around mesh 3
+R=[R_11,-R_12,-R_13;-R_21,R_22,-R_23;-R_31,-R_32,R_33]; // Resistance Matrix
+v_s_11= 20+10*4;// Net Equivalent Source Voltage Driving current i_1 in Mesh 1
+v_s_21=12;// Net Equivalent Source Voltage Driving current i_2 in Mesh 2
+v_s_31=-20;// Net Equivalent Source Voltage Driving current i_3 in Mesh 3
+v_s=[v_s_11;v_s_21;v_s_31];// Voltage Vector
+// Using Matrix Node Equation, R*i=v
+i=R\v_s; // Current Vector
+i_1=i(1,1);
+i_2=i(2,1);
+i_3=i(3,1);
+disp(i_1*10^-3,"Current in Mesh 1(in Amps)=")
+disp(i_2*10^-3,"Current in Mesh 2(in Amps)=")
+disp(i_3*10^-3,"Current in Mesh 3(in Amps)=")
diff --git a/1430/CH4/EX4.7/exa4_7.txt b/1430/CH4/EX4.7/exa4_7.txt new file mode 100644 index 000000000..4b5e62db5 --- /dev/null +++ b/1430/CH4/EX4.7/exa4_7.txt @@ -0,0 +1,15 @@ +
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 4\exa4.7.sce', -1)
+
+ Current in Mesh 1(in Amps)=
+
+ 0.003
+
+ Current in Mesh 2(in Amps)=
+
+ 0.001
+
+ Current in Mesh 3(in Amps)=
+
+ - 0.002
+
diff --git a/1430/CH4/EX4.8/exa4_8.sce b/1430/CH4/EX4.8/exa4_8.sce new file mode 100644 index 000000000..fe4f7238c --- /dev/null +++ b/1430/CH4/EX4.8/exa4_8.sce @@ -0,0 +1,20 @@ +// Rxample 4.8
+// Matrix Mesh Analysis with Source Conversion
+// From figure 4.27(c)
+R_11=4+2+8; // Sum of resistance around mesh 1
+R_12=2; // Equivalent Meshes shared by mesh 1 & 2
+R_21=R_12; // Symmetry Property of Reistance matrix
+R_22=6+2+10; // Sum of reistance around mesh 2
+R=[R_11,-R_12;-R_21,R_22]; // Resistance Matrix
+v_s_11=20+8*7; // Net Equivalent Source Voltage that drives current i_1 in Mesh 1
+v_s_21=18+6*7; // Net Equivalent Source Voltage that drives current i_2 in Mesh 2
+v=[v_s_11;v_s_21]; // Voltage Vector
+// Using Matrix Mesh Equation, R*i=v
+i=R\v; // Current Vector
+i_1=i(1,1);
+i_2=i(2,1);
+v_a=8*(7-i_1);// Ohm's Law
+i_x=3-i_2; //from KCL
+i_b=7+i_x; // from KCL
+disp(v_a,"Voltage across 8-Ohm Resistor(in Volts)=")
+disp(i_b,"Current through 6-Ohm Resistor(in Amps)=")
diff --git a/1430/CH4/EX4.8/exa4_8.txt b/1430/CH4/EX4.8/exa4_8.txt new file mode 100644 index 000000000..ff24ffa74 --- /dev/null +++ b/1430/CH4/EX4.8/exa4_8.txt @@ -0,0 +1,11 @@ +
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 4\exa4.8.sce', -1)
+
+ Voltage across 8-Ohm Resistor(in Volts)=
+
+ 8.
+
+ Current through 6-Ohm Resistor(in Amps)=
+
+ 6.
+
diff --git a/1430/CH4/EX4.9/exa4_9.sce b/1430/CH4/EX4.9/exa4_9.sce new file mode 100644 index 000000000..00debd3c2 --- /dev/null +++ b/1430/CH4/EX4.9/exa4_9.sce @@ -0,0 +1,8 @@ +// Example 4.9
+// Mesh Analysis with a Supernode
+// From figure 4.31, Applying KVL in Supermesh we get,
+disp("6*(i_1-5)+10*i_1+3*(i_1+4)-20=0")
+// Rearrangements gives
+disp("(6+10+3)*i_1=6*5-(3*4)+20")
+i_1=linsolve((6+10+3),-((6*5)-(3*4)+20))// Linear equation solver
+disp(i_1,"Current through the Upper Portion of the Supermesh(in Amps)=")
diff --git a/1430/CH4/EX4.9/exa4_9.txt b/1430/CH4/EX4.9/exa4_9.txt new file mode 100644 index 000000000..d830d694a --- /dev/null +++ b/1430/CH4/EX4.9/exa4_9.txt @@ -0,0 +1,10 @@ +
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 4\exa4.9.sce', -1)
+
+ 6*(i_1-5)+10*i_1+3*(i_1+4)-20=0
+
+ (6+10+3)*i_1=6*5-(3*4)+20
+
+ Current through the Upper Portion of the Supermesh(in Amps)=
+
+ 2.
diff --git a/1430/CH5/EX5.1/exa5_1.jpg b/1430/CH5/EX5.1/exa5_1.jpg Binary files differnew file mode 100644 index 000000000..f6a667b17 --- /dev/null +++ b/1430/CH5/EX5.1/exa5_1.jpg diff --git a/1430/CH5/EX5.1/exa5_1.sce b/1430/CH5/EX5.1/exa5_1.sce new file mode 100644 index 000000000..0c28f64d0 --- /dev/null +++ b/1430/CH5/EX5.1/exa5_1.sce @@ -0,0 +1,41 @@ +// Example 5.1
+// Capacitor Waveforms
+t_1= 0:0.001:0.01;
+t_2= 0.01:0.001:0.03;
+t_3= 0.03:0.001:0.06;
+v_1= 20*sin(50*%pi*t_1);
+v_2=20;
+v_3=-20*sin(50*%pi*t_3);
+// Current Equations Can be obtained by using the relation i = C(dv/dt)
+i_1=3*%pi*cos(50*%pi*t_1)*10^-3;
+i_2=0;
+i_3=-3*%pi*cos(50*%pi*t_3)*10^-3;
+// Power Equations can be obtained by using the relation p=v*i
+p_1=v_1.*i_1;
+p_2=20*0;
+p_3=v_3.*i_3;
+// Energy stored can be obtained by using the relation w=0.5*C*v^2
+C=60*10^-6;
+w_1=0.5*C*[20*sin(50*%pi*t_1)]^2;
+w_2=0.5*C*400;
+w_3=0.5*C*[20*sin(50*%pi*t_3)]^2;
+subplot(2,2,1)
+plot(t_1,v_1,'-r',t_2,v_2,'-r',t_3,v_3,'-r')
+xlabel('t(ms)');
+ylabel('V');
+title("Voltage");
+subplot(2,2,2)
+plot(t_1,i_1,'-g',t_2,i_2,'-g',t_3,i_3,'-g')
+xlabel('t(ms)');
+ylabel('i(mA)');
+title("Current");
+subplot(2,2,3)
+plot(t_1,p_1,'-y',t_2,p_2,'-y',t_3,p_3,'-y')
+xlabel('t(ms)');
+ylabel('P(mW)');
+title("Power");
+subplot(2,2,4)
+plot(t_1,w_1,'-m',t_2,w_2,'-m',t_3,w_3,'-m')
+xlabel('t(ms)');
+ylabel('w(mJ)');
+title("Stored Energy");
diff --git a/1430/CH5/EX5.12/exa5_12.jpg b/1430/CH5/EX5.12/exa5_12.jpg Binary files differnew file mode 100644 index 000000000..83197380b --- /dev/null +++ b/1430/CH5/EX5.12/exa5_12.jpg diff --git a/1430/CH5/EX5.12/exa5_12.sce b/1430/CH5/EX5.12/exa5_12.sce new file mode 100644 index 000000000..62e047825 --- /dev/null +++ b/1430/CH5/EX5.12/exa5_12.sce @@ -0,0 +1,16 @@ +// Example 5.12
+// Complete response calculations
+// From figure 5.21(b)
+R=4;
+L=0.1;
+function i_dot= fun(t,i)
+ i_dot= 4000*sin(280*t)-40*i;
+endfunction
+i_0=0;
+t_0=0;
+t=0:0.001:0.225;
+i=ode(i_0,t_0,t,fun);
+plot(t,i);
+xlabel('t');
+ylabel('i(t)')
+title("Complete response i(t)")
diff --git a/1430/CH5/EX5.2/exa5_2.jpg b/1430/CH5/EX5.2/exa5_2.jpg Binary files differnew file mode 100644 index 000000000..243e97aad --- /dev/null +++ b/1430/CH5/EX5.2/exa5_2.jpg diff --git a/1430/CH5/EX5.2/exa5_2.sce b/1430/CH5/EX5.2/exa5_2.sce new file mode 100644 index 000000000..d380e3be2 --- /dev/null +++ b/1430/CH5/EX5.2/exa5_2.sce @@ -0,0 +1,30 @@ +// Example 5.2
+// Waveform Generation in a Hazard Blinker
+// From figure 5.7(a) and(b)
+// Lamp will remain OFF initially and draws no current as long as v < 80V
+t_1=poly(0,'t_1');
+v_1=(1*10^-3)/(50*10^-6)*(t_1);// Using Current-Voltage relation
+// When v_1 becomes 80 V The lamp then goes ON.
+p_1=-80+v_1;
+t_1=roots(p_1);
+t_2=poly(0,'t_2');
+// This dischrge continues till v_2=40
+v_2=80-80*(t_2-t_1);
+p_2=-40+80-80*(t_2-t_1);
+t_2=roots(p_2);
+//With the lamp OFF,the capacitor is again charged by current source but starting form 40V
+t_3=poly(0,'t_3');
+v_3=40+((1*10^-3)/(50*10^-6))*(t_3-t_2);
+p_3=-80+v_3;
+t_3=roots(p_3);
+t_11=0:0.10:t_1;
+v_11=horner(v_1,t_11);
+t_22=t_1:0.10:t_2;
+v_22=horner(v_2,t_22);
+t_33=t_2:0.10:t_3;
+v_33=horner(v_3,t_33);
+plot(t_11,v_11,'-g',t_22,v_22,'-g',t_33,v_33,'-g')
+xlabel('t');
+ylabel('v(t)')
+title('Waveform of Hazard blinker')
+disp("This Waveform will continues periodically thereafter")
diff --git a/1430/CH5/EX5.2/exa5_2.txt b/1430/CH5/EX5.2/exa5_2.txt new file mode 100644 index 000000000..8087a3227 --- /dev/null +++ b/1430/CH5/EX5.2/exa5_2.txt @@ -0,0 +1,6 @@ +
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 5\exa5.2.sce', -1)
+
+ This Waveform will continues periodically thereafter
+
diff --git a/1430/CH5/EX5.4/exa5_4.sce b/1430/CH5/EX5.4/exa5_4.sce new file mode 100644 index 000000000..a217a2949 --- /dev/null +++ b/1430/CH5/EX5.4/exa5_4.sce @@ -0,0 +1,21 @@ +//Example 5.4
+// Calculation for Series Capacitors
+// Following Conditions at t=0
+C_1=3*10^-6;
+C_2=6*10^-6;
+v_1=10;
+q_1=C_1*v_1;
+v_2=-10;
+q_2=C_2*v_2;
+v=v_1+v_2;
+// We will calculate the new conditions at t1 > 0 When a source is connected to
+// the terminals establishes v(t1)=30V
+C_ser=(3*6)/(3+6)*(10^-6);
+v_1_t1= 10 +(C_ser/C_1)*(30-0); // Voltage Divider Relation
+q_1_t1=C_1*v_1_t1;// Charge voltage relationship
+v_2_t1=-10+(C_ser/C_2)*(30-0);
+q_2_t1=C_2*v_2_t1;
+disp(v_1_t1,"Voltage across 3-micro farad capacitor(in Volts)=");
+disp(q_1_t1,"Charge on 3-micro farad capacitor(in Coulomb)=");
+disp(v_2_t1,"Voltage across 6-micro farad capacitor(in Volts)=");
+disp(q_2_t1,"Charge across 6-micro farad capacitor(in Coulomb)=");
diff --git a/1430/CH5/EX5.4/exa5_4.txt b/1430/CH5/EX5.4/exa5_4.txt new file mode 100644 index 000000000..09a0b8999 --- /dev/null +++ b/1430/CH5/EX5.4/exa5_4.txt @@ -0,0 +1,20 @@ +
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 5\exa5.4.sce', -1)
+
+ Voltage across 3-micro farad capacitor(in Volts)=
+
+ 30.
+
+ Charge on 3-micro farad capacitor(in Coulomb)=
+
+ 0.00009
+
+ Voltage across 6-micro farad capacitor(in Volts)=
+
+ 0.
+
+ Charge across 6-micro farad capacitor(in Coulomb)=
+
+ 0.
+
\ No newline at end of file diff --git a/1430/CH5/EX5.5/exa5_5.jpg b/1430/CH5/EX5.5/exa5_5.jpg Binary files differnew file mode 100644 index 000000000..4e5b08ab3 --- /dev/null +++ b/1430/CH5/EX5.5/exa5_5.jpg diff --git a/1430/CH5/EX5.5/exa5_5.sce b/1430/CH5/EX5.5/exa5_5.sce new file mode 100644 index 000000000..cbdcfcdb4 --- /dev/null +++ b/1430/CH5/EX5.5/exa5_5.sce @@ -0,0 +1,24 @@ +// Example 5.5
+// Inductor Waveform
+t=poly(0,'t');
+i=-(2*10^4)*t+2;
+t_1=0:10^-7:10^-6;
+i_1=horner(i,t_1);
+// Form the current voltage relation of inductor
+v=(50*10^-3)*(-2/10^-4);
+p=v*i_1; // Instantaneous power delivered to the load
+subplot(3,1,1)
+plot(t_1,i_1,'-r')
+xlabel('t(sec)')
+ylabel('i(Amps)')
+title('Current Wavefrom')
+subplot(3,1,2)
+plot(t_1,v,'-r')
+xlabel('t(sec)')
+ylabel('v(volts)')
+title('Voltage Wavefrom')
+subplot(3,1,3)
+plot(t_1,p,'-r')
+xlabel('t(sec)')
+ylabel('P(Watts)')
+title('Power Wavefrom')
diff --git a/1430/CH5/EX5.6/exa5_6.sce b/1430/CH5/EX5.6/exa5_6.sce new file mode 100644 index 000000000..ca6526fe2 --- /dev/null +++ b/1430/CH5/EX5.6/exa5_6.sce @@ -0,0 +1,17 @@ +//Example 5.6
+// DC Steady-state Analysis
+// Under DC steady-state means inductor acts as a short circuit while the
+// Capacitor acts as an open circuit
+//Form figure 5.17(b)
+i_l=30/(20+40);// Ohm's Law
+v_c= (40*30)/(20+40); // Voltage divider relationship
+//Energy stored in capacitor
+w_c=0.5*(5*10^-6)*400;
+//Energy stored in Inductor
+w_l=0.5*(16*10^-3)*(0.5)^2;
+// total energy stored in the circuit is
+w=w_l+w_c;
+disp(i_l,"Current through the inductor(in Amps)=");
+disp(v_c,"Voltage across the capacitor(in Volts)=");
+disp(w_l,"Energy stored in inductor(Joules)=");
+disp(w_c,"Energy stored in Capacitor(Joules)=");
diff --git a/1430/CH5/EX5.6/exa5_6.txt b/1430/CH5/EX5.6/exa5_6.txt new file mode 100644 index 000000000..9ebe8f713 --- /dev/null +++ b/1430/CH5/EX5.6/exa5_6.txt @@ -0,0 +1,20 @@ +
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 5\exa5.6.sce', -1)
+
+ Current through the inductor(in Amps)=
+
+ 0.5
+
+ Voltage across the capacitor(in Volts)=
+
+ 20.
+
+ Energy stored in inductor(Joules)=
+
+ 0.002
+
+ Energy stored in Capacitor(Joules)=
+
+ 0.001
+
diff --git a/1430/CH5/EX5.9/exa5_9.jpg b/1430/CH5/EX5.9/exa5_9.jpg Binary files differnew file mode 100644 index 000000000..64c508e56 --- /dev/null +++ b/1430/CH5/EX5.9/exa5_9.jpg diff --git a/1430/CH5/EX5.9/exa5_9.sce b/1430/CH5/EX5.9/exa5_9.sce new file mode 100644 index 000000000..9090fb256 --- /dev/null +++ b/1430/CH5/EX5.9/exa5_9.sce @@ -0,0 +1,16 @@ +// Example 5.9
+// Capacitor discharge
+// From Figure 5.25
+R=2*10^6;
+C=300*10^-6;
+v_0=1000; // Initial condition
+i_0=0; // Initial condition
+function v_n_dot=f(t,v_n)
+ v_n_dot= -v_n/(C*R);
+endfunction
+t=0:5000;
+v_n=ode(v_0,i_0,t,f);
+plot(t,v_n);
+xlabel('t');
+ylabel('v_n(t)')
+title('Decaying Exponential waveform v_n(t)=1000*exp(-t/600)');
diff --git a/1430/CH6/EX6.11/exa6_11.sce b/1430/CH6/EX6.11/exa6_11.sce new file mode 100644 index 000000000..8d9f887b3 --- /dev/null +++ b/1430/CH6/EX6.11/exa6_11.sce @@ -0,0 +1,23 @@ +// Example 6.11
+// Application of an AC Norton Network
+// from figure 6.25(a)
+V_m=10; // Voltage phasor Magnitude
+omega=5000; // Radian Frequency (rad/s)
+V=complex(10,0); // Voltage Phasor in rectangular form
+Z_R=280; // Ohms
+Z_C=-%i*20;
+Z_L=%i*40;
+Z_t=(Z_L*Z_R)/(Z_L+Z_R)+Z_C; // thevenin resistance
+V_oc= (Z_R*V)/(Z_R+Z_L);
+I_sc= V_oc/Z_t; // Relation Between thevenin's parameter
+Y_t=1/Z_t; // Admittance
+// Let Y= G + i*B
+// Y_eq= Y_t+Y= (0.014+G)+i(B-0.048)
+// for |Y_eq| to be minimum
+G=0;
+B=0.048;
+Y=G+%i*B;
+Z=1/Y;
+Y_eq= Y_t+Y;
+V=I_sc/Y_eq;
+disp(V,"Resultant terminal Voltage in rectangular form(Volts)=")
diff --git a/1430/CH6/EX6.11/exa6_11.txt b/1430/CH6/EX6.11/exa6_11.txt new file mode 100644 index 000000000..2138663b0 --- /dev/null +++ b/1430/CH6/EX6.11/exa6_11.txt @@ -0,0 +1,9 @@ +
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 6\exa6.11.sce', -1)
+
+ Resultant terminal Voltage in rectangular form(Volts)=
+
+ 5. - 35.i
+
+
diff --git a/1430/CH6/EX6.12/exa6_12.sce b/1430/CH6/EX6.12/exa6_12.sce new file mode 100644 index 000000000..e8d351c73 --- /dev/null +++ b/1430/CH6/EX6.12/exa6_12.sce @@ -0,0 +1,23 @@ +//Example 6.12
+// systematic AC Mesh Analysis
+V_m=30;// Voltage Phasor magnitude
+phase_v=60;
+I_m=1; // current Phasor magnitude
+phase_i=0;
+Z_R=10;
+omega=10; // Radian frequency (rad/s)
+L=2; // Henry
+C=0.01;//Farad
+Z_L=%i*omega*L;
+Z_C=1/(%i*omega*C);
+Z=(Z_R*Z_L)/(Z_R+Z_L)+Z_C; // Sum of the impedance around the mesh
+x_v=V_m*cos((%pi/180)*phase_v);
+y_v=V_m*sin((%pi/180)*phase_v);
+V=complex(x_v,y_v);// Voltage Phasor in Rectangular form
+V_s=V-I_m*Z_C;
+I_1= V_s/Z; // Ohm's Law
+I_1_m=abs(I_1);
+phase_i_1=atan(imag(I_1),real(I_1))*(180/%pi);
+disp("Current in Polar form(Amps)")
+disp(I_1_m,"Magnitude=")
+disp(phase_i_1,"Phase(in Degree)=")
diff --git a/1430/CH6/EX6.12/exa6_12.txt b/1430/CH6/EX6.12/exa6_12.txt new file mode 100644 index 000000000..b5272f588 --- /dev/null +++ b/1430/CH6/EX6.12/exa6_12.txt @@ -0,0 +1,13 @@ +
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 6\exa6.12.sce', -1)
+
+ Current in Polar form (Amps)
+
+ Magnitude=
+
+ 3.8982243
+
+ Phase(in Degree)=
+
+ 104.23916
diff --git a/1430/CH6/EX6.15/exa6_15.sce b/1430/CH6/EX6.15/exa6_15.sce new file mode 100644 index 000000000..4496c7d71 --- /dev/null +++ b/1430/CH6/EX6.15/exa6_15.sce @@ -0,0 +1,15 @@ +// Example 6.15
+// Series Resonance Design
+// From the given Design specification
+V_m=100;
+omega_0=5000;
+Q_ser=10;
+L=0.4; // Henry
+V_C_m=Q_ser*V_m;
+C=1/(omega_0^2*L)// From the condition of series resonance
+R=(omega_0*L)/Q_ser;
+// When we build the circuit with this specifications we find that that Q_ser=8
+// So there must have some significant winding resistance R_w
+R_w=250-200;
+// So we need to replace 200-Ohm resistor with 150-Ohm so as to get 1kV sinusoid
+disp(R_w,"Winding Resistance(Ohms)=")
diff --git a/1430/CH6/EX6.15/exa6_15.txt b/1430/CH6/EX6.15/exa6_15.txt new file mode 100644 index 000000000..08fdc7f92 --- /dev/null +++ b/1430/CH6/EX6.15/exa6_15.txt @@ -0,0 +1,8 @@ +
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 6\exa6.15.sce', -1)
+
+ Winding Resistance(Ohms)=
+
+ 50.
+
+
diff --git a/1430/CH6/EX6.16/exa6_16.sce b/1430/CH6/EX6.16/exa6_16.sce new file mode 100644 index 000000000..2820437e9 --- /dev/null +++ b/1430/CH6/EX6.16/exa6_16.sce @@ -0,0 +1,21 @@ +// Example 6.16
+// Parallel Resonance Calculations
+omega_0=5000; // Parallel resonant frequency
+L=10^-2; // Henry
+R_w=2.5;// Ohms
+R=250;// Ohms
+C=1/(omega_0^2*L);
+R_par=L/(C*R_w);
+// from figure 6.39(b)
+R_eq= (R*R_par)/(R+R_par);
+I=complex(40*10^-3,0);
+V=R_eq*I;
+I_1=V/R_par;
+Q_par=R_eq/(omega_0*L);
+I_C=%i*Q_par*I;
+I_2=I_1-I_C;
+disp(V,"Voltage phasor in rectangular form(Volts)=")
+disp(I_1,"Source current phasor in rectangular form(Amps)=")
+disp(I_C,"Current phasor(through Capacitor)in rectangular form(Amps)=")
+disp(I_2,"Current phasor(through inductor)in rectangular form(Amps)=")
+
diff --git a/1430/CH6/EX6.16/exa6_16.txt b/1430/CH6/EX6.16/exa6_16.txt new file mode 100644 index 000000000..6f6e45764 --- /dev/null +++ b/1430/CH6/EX6.16/exa6_16.txt @@ -0,0 +1,21 @@ +
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 6\exa6.16.sce', -1)
+
+ Voltage phasor in rectangular form(Volts)=
+
+ 8.
+
+ Source current phasor in rectangular form(Amps)=
+
+ 0.008
+
+ Current phasor(through Capacitor)in rectangular form(Amps)=
+
+ 0.16i
+
+ Current phasor(through inductor)in rectangular form(Amps)=
+
+ 0.008 - 0.16i
+
+
diff --git a/1430/CH6/EX6.17/exa6_17.jpg b/1430/CH6/EX6.17/exa6_17.jpg Binary files differnew file mode 100644 index 000000000..0f2acc81f --- /dev/null +++ b/1430/CH6/EX6.17/exa6_17.jpg 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')
diff --git a/1430/CH6/EX6.2/exa6_2.sce b/1430/CH6/EX6.2/exa6_2.sce new file mode 100644 index 000000000..f14941def --- /dev/null +++ b/1430/CH6/EX6.2/exa6_2.sce @@ -0,0 +1,15 @@ +// Example 6.2
+// Calculations with Complex Numbers
+A=complex(8,3);
+B=complex(0,100);
+C=complex(3,-4);
+// Since we need to compute D= A+B/C
+T=B/C;
+D=A+T;
+mag= abs(D);
+theta_d=atan(imag(D),real(D))
+disp(D,"In rectangular form=");
+disp("In polar form=");
+disp(mag,"Magnitude");
+disp((theta_d*180)/%pi,"Phase angle(in degree)="); // Conversion from radian to
+// degree
diff --git a/1430/CH6/EX6.2/exa6_2.txt b/1430/CH6/EX6.2/exa6_2.txt new file mode 100644 index 000000000..15f29a2d3 --- /dev/null +++ b/1430/CH6/EX6.2/exa6_2.txt @@ -0,0 +1,18 @@ +
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 6\exa6.2.sce', -1)
+
+ In rectangular form=
+
+ - 8. + 15.i
+
+ In polar form=
+
+ Magnitude
+
+ 17.
+
+ Phase angle(in degree)=
+
+ 118.07249
+
\ No newline at end of file diff --git a/1430/CH6/EX6.3/exa6_3.sce b/1430/CH6/EX6.3/exa6_3.sce new file mode 100644 index 000000000..46ccd2994 --- /dev/null +++ b/1430/CH6/EX6.3/exa6_3.sce @@ -0,0 +1,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)=")
diff --git a/1430/CH6/EX6.3/exa6_3.txt b/1430/CH6/EX6.3/exa6_3.txt new file mode 100644 index 000000000..37257a7c6 --- /dev/null +++ b/1430/CH6/EX6.3/exa6_3.txt @@ -0,0 +1,9 @@ +
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 6\exa6.3.sce', -1)
+
+ Resultant Steady-state input current in rectangular form(Amps)=
+
+ 4.6120953 + 4.8711987i
+
+
diff --git a/1430/CH6/EX6.4/exa6_4.sce b/1430/CH6/EX6.4/exa6_4.sce new file mode 100644 index 000000000..cf58d9fee --- /dev/null +++ b/1430/CH6/EX6.4/exa6_4.sce @@ -0,0 +1,18 @@ +// Example 6.4
+// Parallel Network with an AC Current source
+// Let us assume that voltage phasor is being represent by V, Its magnitude by
+// V_m and its phase by 'phase' variable.
+I=complex(3,0);// Current source phasor
+R=5; //Ohms
+C=25*10^-6;// Farads
+omega=4000; // (rad/s)
+Z_r=5;
+Z_c=1/(%i*omega*C);
+Z_par=(Z_r*Z_c)/(Z_r+Z_c);
+V=I*Z_par; // Voltage phasor in rectangular form
+V_m=abs(V);
+phase=(atan(imag(V),real(V))*180)/%pi;
+disp(V,"Voltage phasor in rectangular form(Volts)=")
+disp("Voltage phasor in polar form")
+disp(V_m,"Magnitude=")
+disp(phase,"Phase (in degree)=")
diff --git a/1430/CH6/EX6.4/exa6_4.txt b/1430/CH6/EX6.4/exa6_4.txt new file mode 100644 index 000000000..594e0d7f6 --- /dev/null +++ b/1430/CH6/EX6.4/exa6_4.txt @@ -0,0 +1,18 @@ +
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 6\exa6.4.sce', -1)
+
+ Voltage phasor in rectangular form(Volts)=
+
+ 12. - 6.i
+
+ Voltage phasor in polar form
+
+ Magnitude=
+
+ 13.416408
+
+ Phase (in degree)=
+
+ - 26.565051
+
\ No newline at end of file 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)=")
diff --git a/1430/CH6/EX6.5/exa6_5.txt b/1430/CH6/EX6.5/exa6_5.txt new file mode 100644 index 000000000..c52677603 --- /dev/null +++ b/1430/CH6/EX6.5/exa6_5.txt @@ -0,0 +1,19 @@ +
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 6\exa6.5.sce', -1)
+
+ Current phasor in Rectangular form(Amps)=
+
+ - 1.0260604 + 2.8190779i
+
+ Current phasor in Polar form
+
+ Magnitude=
+
+ 3.
+
+ Phase(in degree)=
+
+ 110.
+
+
diff --git a/1430/CH6/EX6.6/exa6_6.sce b/1430/CH6/EX6.6/exa6_6.sce new file mode 100644 index 000000000..da2eab1fa --- /dev/null +++ b/1430/CH6/EX6.6/exa6_6.sce @@ -0,0 +1,22 @@ +// Example 6.6
+// Impedance Analysis of a parallel RC Circuit
+// From figure 6.17
+R=5; // Ohms
+C=25*10^-6; // Farad
+omega=4000; // radian frequency
+V_m=30; // Magnitude of voltage phasor
+phase_v=20; // In degree
+Z_r=5; // Impedance of Resistor
+Z_c=1/(%i*omega*C);
+Z_par=(Z_r*Z_c)/(Z_r+Z_c);
+Y_par=1/Z_par; // Equivalent Admittance
+x_v=V_m*cos((%pi*phase_v)/180);
+y_v=V_m*sin((%pi*phase_v)/180);
+V=complex(x_v,y_v);
+I=V*Y_par;// Current phasor in rectangular form
+I_m=abs(I); // Current phasor magnitude
+phase_i=atan(imag(I),real(I))*(180/%pi); // Phase angle of current phasor
+disp(I,"Current phasor in rectangular form(Amps)=")
+disp("In polar form=")
+disp(I_m,"Magnitude=")
+disp(phase_i,"Phase angle(in degree)=")
diff --git a/1430/CH6/EX6.6/exa6_6.txt b/1430/CH6/EX6.6/exa6_6.txt new file mode 100644 index 000000000..078efc238 --- /dev/null +++ b/1430/CH6/EX6.6/exa6_6.txt @@ -0,0 +1,18 @@ +
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 6\exa6.6.sce', -1)
+
+ Current phasor in rectangular form(Amps)=
+
+ 4.6120953 + 4.8711987i
+
+ In polar form=
+
+ Magnitude=
+
+ 6.7082039
+
+ Phase angle(in degree)=
+
+ 46.565051
+
\ No newline at end of file diff --git a/1430/CH6/EX6.8/exa6_8.jpg b/1430/CH6/EX6.8/exa6_8.jpg Binary files differnew file mode 100644 index 000000000..dd8805895 --- /dev/null +++ b/1430/CH6/EX6.8/exa6_8.jpg diff --git a/1430/CH6/EX6.8/exa6_8.sce b/1430/CH6/EX6.8/exa6_8.sce new file mode 100644 index 000000000..a0063d1d9 --- /dev/null +++ b/1430/CH6/EX6.8/exa6_8.sce @@ -0,0 +1,36 @@ +// Example 6.8
+// AC Ladder Calculations
+I_m=10; // Magnitude of current phasor
+phase_i=0; // Phase angle of current phasor
+omega=50000; // Radian frequency (rad/s)
+L= 200*10^-3;//Henry
+C=2*10^-9; // Farad
+Z_R1=40000;
+Z_R2=5000;
+Z_L= %i*omega*L;
+Z_C=1/(%i*omega*C);
+Z_eq1=(Z_R2*Z_C)/(Z_R2+Z_C);
+Z_eq2= Z_L+Z_eq1;
+Z_eq=(Z_R1*Z_eq2)/(Z_R1+Z_eq2);
+I=complex(I_m,0); // current phasor in Rectangular form
+V=Z_eq*I;// Voltage phasor
+V_L=(Z_L*V)/(Z_L+Z_eq1);// Voltage phasor across inductor
+V_C=(Z_eq1*V)/(Z_L+Z_eq1);// Voltage phasor across capacitor
+V_m=abs(V);
+phase_v=atan(imag(V),real(V))*(180/%pi);
+V_L_m=abs(V_L);
+phase_v_l=atan(imag(V_L),real(V_L))*(180/%pi);
+V_C_m=abs(V_C);
+phase_v_c=atan(imag(V_C),real(V_C))*(180/%pi);
+t=0:0.5:10;
+v=V_m*cos(omega*t+atan(imag(V),real(V)));
+v_l=V_L_m*cos(omega*t+atan(imag(V_L),real(V_L)));
+v_c=V_C_m*cos(omega*t+atan(imag(V_C),real(V_C)));
+plot(t,v,'-r',t,v_l,'-g',t,v_c,'b')
+xlabel('t')
+ylabel('v')
+title('Voltage Waveform')
+h1=legend(['v(t)';'v_l(t)';'v_c(t)']);
+disp(V,"Voltage Phasor in rectangular form(Volts)=")
+disp(V_L,"Voltage Phasor across inductor in rectangular form(Volts)=")
+disp(V_C,"Voltage Phasor across capacitor in rectangular form(Volts)=")
diff --git a/1430/CH6/EX6.9/exa6_9.jpg b/1430/CH6/EX6.9/exa6_9.jpg Binary files differnew file mode 100644 index 000000000..88fd33964 --- /dev/null +++ b/1430/CH6/EX6.9/exa6_9.jpg diff --git a/1430/CH6/EX6.9/exa6_9.sce b/1430/CH6/EX6.9/exa6_9.sce new file mode 100644 index 000000000..81df6c32d --- /dev/null +++ b/1430/CH6/EX6.9/exa6_9.sce @@ -0,0 +1,32 @@ +// Example 6.9
+// AC Network With a Controlled Source
+// Form figure 6.22(b)
+V_m=20; // Voltage phasor magnitude
+phase_v=0; // voltage phasor phase
+omega=1000; // Radian frequency (rad/s)
+Z_R1=6;
+Z_R2=12;
+C=250*10^-6; // Farad
+L=8*10^-3; // Henry
+Z_C=1/(%i*omega*C);
+Z_L=%i*omega*L;
+// Using Proportionality Method
+I_2=complex(1,0); // Assumption
+V_x=Z_L*I_2; // Ohm's law in phasor form
+V_1=(Z_L+Z_R2)*I_2; // Ohm's law in phasor form
+I_1=V_1/Z_C;
+I_assumed=I_1+I_2; // KCL
+V_assumed=Z_R1*I_assumed-3*V_x+V_1
+// Hence input impedance
+Z=V_assumed/I_assumed;
+V=complex(V_m,0); // Actual Voltage phasor
+I=V/Z;
+I_1_actual=(I_1/I_assumed)*I;
+I_1_actual_m=abs(I_1_actual);
+phase_i_1_actual=atan(imag(I_1_actual),real(I_1_actual)); // Phase in radian
+t=0:0.1:10;
+plot(t,I_1_actual_m*cos(omega*t+phase_i_1_actual))
+xlabel("t")
+ylabel("i_1(t)")
+title('Current Waveform')
+disp(I_1_actual,"Current phasor in rectangular form(Amps)=")
diff --git a/1430/CH6/EX6.9/exa6_9.txt b/1430/CH6/EX6.9/exa6_9.txt new file mode 100644 index 000000000..9e994b52f --- /dev/null +++ b/1430/CH6/EX6.9/exa6_9.txt @@ -0,0 +1,7 @@ +
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 6\exa6.9.sce', -1)
+
+ Current phasor in rectangular form(Amps)=
+
+ - 3. + 11.i
+
diff --git a/1430/CH7/EX7.1/exa7_1.sce b/1430/CH7/EX7.1/exa7_1.sce new file mode 100644 index 000000000..b3b3db530 --- /dev/null +++ b/1430/CH7/EX7.1/exa7_1.sce @@ -0,0 +1,21 @@ +// Example 7.1
+// AC Power Calculations
+// From Example 6.8 we already found that,
+Z=complex(4.8,6.4);
+V_m=80;
+V_c_m=40;
+I_m=10*10^-3;
+// The total average power supplied by the source is,
+R_omega=4.8*10^3;
+R1=40*10^3;
+R2=5*10^3;
+P=0.5*R_omega*I_m^2; // Average Power
+// This power is actually dissipated by 40kohm and 5kohm resistor
+P_R1= V_m^2/(2*R1);
+P_R2=V_c_m^2/(2*R2);
+disp(P,"Total Average Power Dissipation(in Watt)=")
+disp(P_R1,"Power dissipated across 40kohm(in Watt)=")
+disp(P_R2,"Power dissipated across 5kohm(in Watt)=")
+if P==(P_R1+P_R2) then
+disp("This shows average power dissipation in the due to all resistors")
+end
diff --git a/1430/CH7/EX7.1/exa7_1.txt b/1430/CH7/EX7.1/exa7_1.txt new file mode 100644 index 000000000..bcd452fb2 --- /dev/null +++ b/1430/CH7/EX7.1/exa7_1.txt @@ -0,0 +1,16 @@ +
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 7\exa7.1.sce', -1)
+
+ Total Average Power Dissipation(in Watt)=
+
+ 0.24
+
+ Power dissipated across 40kohm(in Watt)=
+
+ 0.08
+
+ Power dissipated across 5kohm(in Watt)=
+
+ 0.16
+
\ No newline at end of file diff --git a/1430/CH7/EX7.10/exa7_10.sce b/1430/CH7/EX7.10/exa7_10.sce new file mode 100644 index 000000000..caf788de3 --- /dev/null +++ b/1430/CH7/EX7.10/exa7_10.sce @@ -0,0 +1,30 @@ +// Example 7.10
+// Calculation of Wattmeter Readings
+// Assuming phase_a= 0;
+V_ab_m= 780; // Line voltage
+phase_ab= 30; // in degree
+I_a_m=30; // in Amphere
+phase_a=-36.9;//in degree
+V_cb_m= 780;
+phase_cb=90;
+I_c_m=30;
+phase_c=83.1;
+x_ab=V_ab_m*cos(phase_ab*(%pi/180))
+y_ab=V_ab_m*sin(phase_ab*(%pi/180))
+V_ab=complex(x_ab,y_ab); // Line voltage a-b in rectangular form
+x_a=I_a_m*cos(phase_a*(%pi/180))
+y_a=I_a_m*sin(phase_a*(%pi/180))
+I_a=complex(x_a,y_a); // Line current in rectangular form
+x_cb=V_cb_m*cos(phase_cb*(%pi/180))
+y_cb=V_cb_m*sin(phase_cb*(%pi/180))
+V_cb=complex(x_cb,y_cb);
+x_c=I_c_m*cos(phase_c*(%pi/180))
+y_c=I_c_m*sin(phase_c*(%pi/180))
+I_c=complex(x_c,y_c);
+P_1=real(V_ab*I_a');
+P_2=real(V_cb*I_c');
+// So
+P=P_1+P_2;
+Q=sqrt(3)*abs(P_2-P_1);
+disp(P,"Total Average power supplied by generator(in Watts)=")
+disp(Q,"Reactive power supplied by the generator(in VAr)=")
diff --git a/1430/CH7/EX7.10/exa7_10.txt b/1430/CH7/EX7.10/exa7_10.txt new file mode 100644 index 000000000..8926749ab --- /dev/null +++ b/1430/CH7/EX7.10/exa7_10.txt @@ -0,0 +1,12 @@ +
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 7\exa7.10.sce', -1)
+
+ Total Average power supplied by generator(in Watts)=
+
+ 32411.21
+
+ Reactive power supplied by the generator(in VAr)=
+
+ 24335.025
+
diff --git a/1430/CH7/EX7.11/exa7_11.sce b/1430/CH7/EX7.11/exa7_11.sce new file mode 100644 index 000000000..c7d389d97 --- /dev/null +++ b/1430/CH7/EX7.11/exa7_11.sce @@ -0,0 +1,44 @@ +// Example 7.11
+// Calculation for an Unbalanced Delta Load
+// From figure 7.29(a) , Given Parameters
+V_l=900;
+Z_aA=5;
+Z_bB=5;
+Z_cC=5;
+Z_AB=30;
+Z_BC=complex(60,60);
+Z_CA=complex(0,30);
+// Applying Delta-wye Transform equations
+Z_sum= Z_AB +Z_BC+Z_CA;
+Z_A= (Z_AB*Z_CA)/Z_sum;
+Z_B= (Z_BC*Z_AB)/Z_sum;
+Z_C= (Z_BC*Z_CA)/Z_sum;
+// Adding 5-Ohm series resistance in each line gives the total equivalent wye
+// Impedance
+Z_a=Z_A+5;
+Z_b=Z_B+5;
+Z_c=Z_C+5;
+// V_ab is taken as a phase reference
+V_ab=complex(V_l,0);
+V_bc_m=V_l;
+phase_bc=-120;
+x_bc=V_bc_m*cos(phase_bc*(%pi/180));
+y_bc=V_bc_m*sin(phase_bc*(%pi/180));
+V_bc=complex(x_bc,y_bc);
+Z=[Z_a+Z_b,-Z_b;-Z_b,Z_b+Z_c];
+V=[V_ab;V_bc];
+I=Z\V;
+I_1=I(1);
+I_2=I(2);
+// From equation 7.54(b) in textbook
+I_a=I_1;
+I_b=I_2-I_1;
+I_c=-I_2;
+P=real(Z_a)*abs(I_a)^2+real(Z_b)*abs(I_b)^2+real(Z_c)*abs(I_c)^2;
+Q=imag(Z_a)*abs(I_a)^2+imag(Z_b)*abs(I_b)^2+imag(Z_c)*abs(I_c)^2;
+pf=P/sqrt(P^2+Q^2);
+disp(I_a,"Line current in branch a(in Amps)=")
+disp(I_b,"Line current in branch b(in Amps)=")
+disp(I_c,"Line current in branch c(in Amps)=")
+disp(P,"Real power supplied by generator(in Watts)=")
+disp(Q,"Reactive Power supplied by generator(in VAr)=")
diff --git a/1430/CH7/EX7.11/exa7_11.txt b/1430/CH7/EX7.11/exa7_11.txt new file mode 100644 index 000000000..a14e3fbb6 --- /dev/null +++ b/1430/CH7/EX7.11/exa7_11.txt @@ -0,0 +1,25 @@ +
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 7\exa7.11.sce', -1)
+
+ Line current in branch a(in Amps)=
+
+ 4.656319 - 16.749055i
+
+ Line current in branch b(in Amps)=
+
+ - 30.787662 - 5.768358i
+
+ Line current in branch c(in Amps)=
+
+ 26.131343 + 22.517413i
+
+ Real power supplied by generator(in Watts)=
+
+ 33500.377
+
+ Reactive Power supplied by generator(in VAr)=
+
+ 25308.679
+
+
diff --git a/1430/CH7/EX7.2/exa7_3.sce b/1430/CH7/EX7.2/exa7_3.sce new file mode 100644 index 000000000..3860f4df1 --- /dev/null +++ b/1430/CH7/EX7.2/exa7_3.sce @@ -0,0 +1,18 @@ +// Example 7.3
+// Power Transfer from an Oscillator
+V_rms=1.2;
+Z_s=complex(6,8)*10^3;
+Z=conj(Z_s); // Matched Load Impedance
+P_max=V_rms^2/(4*real(Z));// Maximum availble power
+// If load has a fixed ratio X/R= -7/24 then,
+c=poly(0,'c');
+Z_1= complex(24,-7)*c;// New value of
+// Since |Z_1|=|Z_s|
+q=abs(Z_1)-abs(Z_s);
+c=roots(q);
+Z_1=horner(Z_1,c);
+// Resulting Load Power
+P= real(Z_1)*V_rms^2/(abs(Z_s+Z_1))^2;
+Eff= real(Z_1)/(real(Z_s)+real(Z_1))
+disp(P,"Resulting Load Power(in Watt)=")
+disp(Eff,"Transfer Efficiency=")
diff --git a/1430/CH7/EX7.2/exa7_3.txt b/1430/CH7/EX7.2/exa7_3.txt new file mode 100644 index 000000000..06ac63299 --- /dev/null +++ b/1430/CH7/EX7.2/exa7_3.txt @@ -0,0 +1,13 @@ +
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 7\exa7.3.sce', -1)
+
+ Resulting Load Power(in Watt)=
+
+ 0.0000511
+
+ Transfer Efficiency=
+
+ 0.6153846
+
+
diff --git a/1430/CH7/EX7.4/exa7_4.sce b/1430/CH7/EX7.4/exa7_4.sce new file mode 100644 index 000000000..56c441e2c --- /dev/null +++ b/1430/CH7/EX7.4/exa7_4.sce @@ -0,0 +1,20 @@ +// Example 7.4
+// Power-Transfer Efficiency
+// from figure 7.8
+V_rms=300; // Volts
+R_s=2;// Ohms
+Z_R= 20;
+Z_C= -%i*10;
+Z_RC=(Z_C*Z_R)/(Z_C+Z_R);
+// Total impedance seen by source
+Z=R_s+Z_RC;
+I_rms=V_rms/(abs(Z)); // RMS value of current
+P=real(Z)*I_rms^2;// Real Power
+Q= imag(Z)*I_rms^2; // Reactive Power
+P_s= R_s*I_rms^2;
+P_L=real(Z_RC)*I_rms^2;
+// Power transfer efficiency
+Eff=P_L/P;
+disp(I_rms,"RMS valur of current(in Amps)=")
+disp(P,"Real Power(in Watts)=")
+disp(Q,"Reactive Power(in VAr)=")
diff --git a/1430/CH7/EX7.4/exa7_4.txt b/1430/CH7/EX7.4/exa7_4.txt new file mode 100644 index 000000000..c30efeaa9 --- /dev/null +++ b/1430/CH7/EX7.4/exa7_4.txt @@ -0,0 +1,16 @@ +
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 7\exa7.4.sce', -1)
+
+ RMS valur of current(in Amps)=
+
+ 30.
+
+ Real Power(in Watts)=
+
+ 5400.
+
+ Reactive Power(in VAr)=
+
+ - 7200.
+
diff --git a/1430/CH7/EX7.5/exa7_5.sce b/1430/CH7/EX7.5/exa7_5.sce new file mode 100644 index 000000000..9f902f6b5 --- /dev/null +++ b/1430/CH7/EX7.5/exa7_5.sce @@ -0,0 +1,29 @@ +// Example 7.5
+// Designing Power-Factor Correction
+// From figure 7.10(a)
+V_rms=500; // Volts
+f=60; // Radian Frequency (rad/s)
+omega=377; // (rad/s)
+P_1=48*10^3; // Watts
+pf_1=0.60; // Lagging
+P_2=24*10^3;// Watts
+pf_2=0.96; // Leading
+// For Load 1
+S_1= P_1/pf_1; // apparent power
+Q_1=sqrt(S_1^2-P_1^2); // Reactive power
+I_1= S_1/V_rms; // RMS current drawn by load 1
+// For Load 2
+S_2=P_2/pf_2; // apparent power
+Q_2=-sqrt(S_2^2-P_2^2); // Reactive power
+I_2= S_2/V_rms; // RMS current drawn by load 2
+P_12= P_1+P_2;
+Q_12=Q_1+Q_2;
+S_12= sqrt(P_12^2+Q_12^2);
+I_12=S_12/V_rms;
+pf_12=P_12/abs(S_12);
+// With reference to table 7.3
+P_C=0;
+Q_C=-Q_12;
+V_C=V_rms;
+C=-Q_C/(omega*abs(V_C)^2);
+disp(C,"Value of Capacitance for unity power factor(in Farad)=")
diff --git a/1430/CH7/EX7.5/exa7_5.txt b/1430/CH7/EX7.5/exa7_5.txt new file mode 100644 index 000000000..c74a23516 --- /dev/null +++ b/1430/CH7/EX7.5/exa7_5.txt @@ -0,0 +1,8 @@ +
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 7\exa7.5.sce', -1)
+
+ Value of Capacitance for unity power factor(in Farad)=
+
+ 0.0006048
+
diff --git a/1430/CH7/EX7.6/exa7_6.sce b/1430/CH7/EX7.6/exa7_6.sce new file mode 100644 index 000000000..9938e212c --- /dev/null +++ b/1430/CH7/EX7.6/exa7_6.sce @@ -0,0 +1,27 @@ +// Example 7.6
+// Improving Power-Transfer Efficiency
+// From figure 7.12
+Z1= complex(4,15); // Impedance of Transmission line
+Z2=complex(20,40); // Load Impedance
+// Total series impedance without power-factor correction
+Z_1= Z1+Z2;
+V_rms_s=4800; // RMS value of Voltage source
+I_rms= V_rms_s/(abs(Z_1));// RMS load current
+V_rms= abs(Z2)*I_rms;// RMS load voltage
+S=Z_1*I_rms^2; // Complex power supplied by the source
+Eff_1=real(Z2)/(real(Z2)+real(Z1));
+// Let us assume the susceptance of Capacitor be S=omega*C
+S= poly(0,'S');
+Y_eq= %i*S+1/Z2;
+A=imag(Y_eq);
+S=roots(A);
+Y_eq=horner(Y_eq,S);
+Z_eq=1/Y_eq;
+// Impedance seen by source,
+Z_2=Z_eq+Z_1;
+I_rms1=V_rms_s/(abs(Z_2)); // New RMS Load Current
+V_rms1=Z_2*I_rms; // New RMS Load Voltage
+S=Z_2*I_rms^2; // New Complex power supplied by th source
+Eff_2=real(Z_eq)/(real(Z1)+real(Z_eq));
+disp(Eff_1,"Power Transfer Efficiency before pf correction=")
+disp(Eff_2,"Power Transfer Efficiency after pf correction=")
diff --git a/1430/CH7/EX7.6/exa7_6.txt b/1430/CH7/EX7.6/exa7_6.txt new file mode 100644 index 000000000..315339105 --- /dev/null +++ b/1430/CH7/EX7.6/exa7_6.txt @@ -0,0 +1,13 @@ +
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 7\exa7.6.sce', -1)
+
+ Power Transfer Efficiency before pf correction=
+
+ 0.8333333
+
+ Power Transfer Efficiency after pf correction=
+
+ 0.9615385
+
+
diff --git a/1430/CH7/EX7.7/exa7_7.jpg b/1430/CH7/EX7.7/exa7_7.jpg Binary files differnew file mode 100644 index 000000000..32e742c0b --- /dev/null +++ b/1430/CH7/EX7.7/exa7_7.jpg diff --git a/1430/CH7/EX7.7/exa7_7.sce b/1430/CH7/EX7.7/exa7_7.sce new file mode 100644 index 000000000..6feedc6b3 --- /dev/null +++ b/1430/CH7/EX7.7/exa7_7.sce @@ -0,0 +1,21 @@ +// Example 7.7
+// Calculating Line Voltage
+V_a_m=15*10^3;// Volts
+phase_a=90; // Degree
+V_l=sqrt(3)*V_a_m; // The RMS line voltage
+// From figure 7.19(c)
+phase_ab=phase_a+30;
+phase_bc=phase_ab-120;
+phase_ca=phase_ab+120;
+V_peak=sqrt(2)*V_l; // converting RMS value to peak value
+// for omega= 10;
+omega=100;
+t=0:1:50;
+v_ab=V_peak*cos(omega*t+phase_ab);
+v_bc=V_peak*cos(omega*t+phase_bc);
+v_ca=V_peak*cos(omega*t+phase_ca);
+plot(t,v_ab,'-r',t,v_bc,'-g',t,v_ca,'-y');
+xlabel('t');
+ylabel('v(t)');
+title('Voltage Waveform');
+h1=legend(['v_ab';'v_bc';'v_ca']);
diff --git a/1430/CH7/EX7.8/exa7_8.sce b/1430/CH7/EX7.8/exa7_8.sce new file mode 100644 index 000000000..64a153be1 --- /dev/null +++ b/1430/CH7/EX7.8/exa7_8.sce @@ -0,0 +1,18 @@ +// Example 7.8
+// Three-Phase Circuit with Line Impedance
+V_ab_m=45*10^3; // Volts
+Z_l=complex(0.5,3); // Each transmission line impedance
+Z=complex(4.5,9); // Load impedance
+V_l_m=V_ab_m // Line voltage
+V_phi=V_ab_m/sqrt(3); // Phase voltage
+Z_Y=Z_l+Z; // total phase impedance
+I_l=V_phi/(abs(Z_Y));
+P= 3*real(Z_Y)*(I_l)^2; // Real power generated by source
+Q= 3*imag(Z_Y)*(I_l)^2; // Reactive power generated by source
+P_L=3*real(Z)*I_l^2; // Real power that reaches the load
+Eff=P_L/P;
+disp(I_l,"RMS line current(in Amps)=")
+disp(P,"Real power generated by source(in Watt)= ")
+disp(Q,"Reactive power generated by source(in VAr)=")
+disp(P_L,"Real power that reaches the load(in Watt)=")
+disp(Eff,"Power transfer Efficiency=")
diff --git a/1430/CH7/EX7.8/exa7_8.txt b/1430/CH7/EX7.8/exa7_8.txt new file mode 100644 index 000000000..b475cebec --- /dev/null +++ b/1430/CH7/EX7.8/exa7_8.txt @@ -0,0 +1,24 @@ +
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 7\exa7.8.sce', -1)
+
+ RMS line current(in Amps)=
+
+ 1998.5202
+
+ Real power generated by source(in Watt)=
+
+ 59911243.
+
+ Reactive power generated by source(in VAr)=
+
+ 1.438D+08
+
+ Real power that reaches the load(in Watt)=
+
+ 53920118.
+
+ Power transfer Efficiency=
+
+ 0.9
+
diff --git a/1430/CH7/EX7.9/exa7_9.sce b/1430/CH7/EX7.9/exa7_9.sce new file mode 100644 index 000000000..1504575ac --- /dev/null +++ b/1430/CH7/EX7.9/exa7_9.sce @@ -0,0 +1,29 @@ +// Example 7.9
+// Power-Factor Correction with Parallel Loads
+V_l=780; // Generator Line voltage
+f=60; // Cyclic frequency (Hz)
+Z1_del= complex(30,60); // Load 1; balanced delta impedance
+Z2_wye=complex(30,0);// Load 2; balanced wye with impedance
+// Equivalent wye impedance of the delta load is ,
+Z1_wye=Z1_del/3;
+// Potential at equivalent neutral N1 of the delta load equals the potential at
+// N2 in the wye load
+// Hence from figure 7.24(b)
+Z_wye=(Z1_wye*Z2_wye)/(Z1_wye+Z2_wye);// Equivalent wye impedance per phase
+V_phi= V_l/sqrt(3); // Phase voltage from line voltage
+I_rms=V_phi/abs(Z_wye); // RMS current for one phase of the combined load
+P_phi=real(Z_wye)*I_rms^2; // Real power
+Q_phi=imag(Z_wye)*I_rms^2; // Reactive power
+// For balanced condition ,the three capacitor must be equal and arranged in a
+// delta or wye configuration
+C_del=Q_phi/(2*%pi*f*V_l^2); // For delta configuration
+C_wye= 3*C_del; // For wye configuration
+Q_C=-Q_phi; // Condition for connecting capacitor
+// Total Average power supplied by the generator
+P=3*P_phi;
+I_l=P/(sqrt(3)*V_l);// RMS line current
+disp(C_del,"Capacitance for power factor correction in delta configuration(in farad)=")
+disp(C_wye,"Capacitance for power factor correction in wye configuration(in farad)=")
+disp(P,"Total average power supplied by the generator(in Watt)=")
+disp(I_l,"RMS line current(in Amps)=")
+// NOTE- Computed Values for C_del and C_wye in Textbook is wrong.
diff --git a/1430/CH7/EX7.9/exa7_9.txt b/1430/CH7/EX7.9/exa7_9.txt new file mode 100644 index 000000000..4a6b86e43 --- /dev/null +++ b/1430/CH7/EX7.9/exa7_9.txt @@ -0,0 +1,21 @@ +
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 7\exa7.9.sce', -1)
+
+ Capacitance for power factor correction in delta configuration(in farad)=
+
+ 0.0000354
+
+ Capacitance for power factor correction in wye configuration(in farad)=
+
+ 0.0001061
+
+ Total average power supplied by the generator(in Watt)=
+
+ 32448.
+
+ RMS line current(in Amps)=
+
+ 24.017771
+
+
diff --git a/1430/CH8/EX8.1/exa8_1.sce b/1430/CH8/EX8.1/exa8_1.sce new file mode 100644 index 000000000..9b9c250aa --- /dev/null +++ b/1430/CH8/EX8.1/exa8_1.sce @@ -0,0 +1,23 @@ +// Example 8.1
+// Analysis of a Transformer Circuit
+// Form figure 8.4(a)
+N=3; // Ideal step-up transformer
+V=complex(60,0);
+omega=5000;// Radian frequency (rad/s)
+Z_R=90; // Ohms
+C=10*10^-6; // Farad
+Z_C=1/(%i*omega*C);
+// From frequency domain diagram 8.4(b)
+V_1=V;
+V_2=3*V;
+I_R=(3*V_1)/Z_R; // Ohm's law for AC circuits
+I_C=(V_1-V_2)/Z_C // Ohm's Law
+I_2=I_C-I_R; // KCL
+I=I_C-3*I_2;// KCL
+Z=V/I;
+P=0.5*real(Z)*abs(I)^2;
+P_R=0.5*Z_R*abs(I_R)^2;
+disp(P,"Average power supplied by the source(in Watts)=")
+disp(P_R,"Average power dissipated by 90-Ohm resistor(in Watts)=")
+disp("All the power from source is transferrd to the resistor")
+
diff --git a/1430/CH8/EX8.1/exa8_1.txt b/1430/CH8/EX8.1/exa8_1.txt new file mode 100644 index 000000000..17e1d43b4 --- /dev/null +++ b/1430/CH8/EX8.1/exa8_1.txt @@ -0,0 +1,14 @@ +
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 8\exa8.1.sce', -1)
+
+ Average power supplied by the source(in Watts)=
+
+ 180.
+
+ Average power dissipated by 90-Ohm resistor(in Watts)=
+
+ 180.
+
+ All the power from source is transferrd to the resistor
+
diff --git a/1430/CH8/EX8.2/exa8_2.sce b/1430/CH8/EX8.2/exa8_2.sce new file mode 100644 index 000000000..1e8d8cb42 --- /dev/null +++ b/1430/CH8/EX8.2/exa8_2.sce @@ -0,0 +1,29 @@ +// Example 8.2
+// Power Transmission with Transformers
+// From figure 8.8(a)
+P=15000; // Watts ; Objective of the problem
+R_S=2;//source resistance
+R_L=3;// Load resistance
+I_out_m=sqrt(2*P/3);
+V_out_m=R_L*I_out_m;
+I_m=I_out_m; // Line current
+V_s_m=(R_L+R_S)*I_m; // Ohm's Law
+Eff=R_L/(R_L+R_S);
+P_S=0.5*2*I_m^2; // Power waste in transmission line
+// Now Form modified circuit 8.8(b)
+phase_i_out=0; // in degree
+I_out=complex(I_out_m,0);
+V_out=complex(V_out_m,0);
+// Now we will refer both th source and the load into the middle section with transmission line
+R_L_ref=4^2*R_L;// Load resistance referred to the primary
+Eff_new=R_L_ref/(R_L_ref+R_S);
+N=poly(0,'N')
+I_m_new=(V_s_m*N)/(R_L_ref+R_S);
+a=I_m_new-I_out_m/4;
+N=roots(a);
+I_m_new=horner(I_m_new,N)
+P_S_new=0.5*2*I_m_new^2;
+phase_I_new=phase_i_out;
+I_in=complex(I_m_new,0)*N;
+disp(Eff,"Power transfer efficiency without transformer(in Watt)=")
+disp(Eff_new,"Power transfer efficiency with transformer(in Watt)=")
diff --git a/1430/CH8/EX8.2/exa8_2.txt b/1430/CH8/EX8.2/exa8_2.txt new file mode 100644 index 000000000..727527092 --- /dev/null +++ b/1430/CH8/EX8.2/exa8_2.txt @@ -0,0 +1,12 @@ +
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 8\exa8.2.sce', -1)
+
+ Power transfer efficiency without transformer(in Watt)=
+
+ 0.6
+
+ Power transfer efficiency with transformer(in Watt)=
+
+ 0.96
+
diff --git a/1430/CH8/EX8.3/exa8_3.jpg b/1430/CH8/EX8.3/exa8_3.jpg Binary files differnew file mode 100644 index 000000000..24f0a879d --- /dev/null +++ b/1430/CH8/EX8.3/exa8_3.jpg diff --git a/1430/CH8/EX8.3/exa8_3.sce b/1430/CH8/EX8.3/exa8_3.sce new file mode 100644 index 000000000..f6315b07e --- /dev/null +++ b/1430/CH8/EX8.3/exa8_3.sce @@ -0,0 +1,28 @@ +// Example 8.3
+// Transformer-coupled Oscillator
+// From figure 8.9(a)
+V_m=12;//Magnitude of voltage source
+omega=50000;// radial frequency (rad/s)
+R_s=1000;//
+V_s=20;// DC source
+Z_C=1/(%i*omega*0.1*10^-6);
+R=500;
+// from figure 8.9(b)
+// referring the ac source to the secondary ,as shown in figure 8.9(b)
+N=1/2;
+R_s_new=N^2*R_s;
+I=complex((N*12)/(N^2*R_s),0);
+// using node equations
+V_out=I/(1/R+1/Z_C+1/R_s_new);
+I_out=(1/Z_C+1/R)*V_out;
+I_in1=N*I_out;// Ac component of primary current
+I_in2=-V_s/R_s; // DC component of primary current
+I_in1_m=abs(I_in1);
+phase_I_in1=atan(imag(I_in1),real(I_in1))*(180/%pi);
+// by superposition total primary current will be
+t=0:0.5:100
+I_in=I_in1_m*cos(omega*t+phase_I_in1) + I_in2;
+plot(t,I_in)
+xlabel('t')
+ylabel('i_in(t)')
+title('Current Waveform')
diff --git a/1430/CH8/EX8.4/exa8_4.sce b/1430/CH8/EX8.4/exa8_4.sce new file mode 100644 index 000000000..351c7e6da --- /dev/null +++ b/1430/CH8/EX8.4/exa8_4.sce @@ -0,0 +1,17 @@ +// Example 8.4
+// Impedance Matching with a Transformer
+omega=10^5;
+R_L=500 ;
+I_s_m=100*10^-3;
+Z_s=(400*(-%i*200))/(400-%i*200); // from figure 8.10(a)
+V_s_m=abs(Z_s)*I_s_m;
+// From figure 8.10(b),load impedance referred to the primary
+// Turn ratio
+N=sqrt(500/80); // from condition of impedance matching
+L=(160*N^2)/omega;// from condition of impedance matching
+P_max=(V_s_m/sqrt(2))^2/(4*real(Z_s));
+// Load reactance will be
+X_L=%i*omega*L;
+disp(X_L,"Load reactance for maximum power transfer(Ohms)=")
+disp(N,"Turn ratio for maximum power transfer=")
+disp(P_max,"Maximum power transferred(Watts)=")
diff --git a/1430/CH8/EX8.4/exa8_4.txt b/1430/CH8/EX8.4/exa8_4.txt new file mode 100644 index 000000000..091a5635a --- /dev/null +++ b/1430/CH8/EX8.4/exa8_4.txt @@ -0,0 +1,17 @@ +
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 8\exa8_4.sce', -1)
+
+ Load reactance for maximum power transfer(Ohms)=
+
+ 1000.i
+
+ Turn ratio for maximum power transfer=
+
+ 2.5
+
+ Maximum power transferred(Watts)=
+
+ 0.5
+
+
diff --git a/1430/CH8/EX8.6/exa8_6.sce b/1430/CH8/EX8.6/exa8_6.sce new file mode 100644 index 000000000..5977e2455 --- /dev/null +++ b/1430/CH8/EX8.6/exa8_6.sce @@ -0,0 +1,18 @@ +// Example 8.6
+// Comparison of a real and ideal Transformer
+// form figure 8.21
+omegaL_1=100;
+omegaM=490;
+omegaL_2=2500;
+Z=200;
+N=sqrt(omegaL_2/omegaL_1)
+// since omegaL_2>>|Z| and k=0.98 the transformer will act almost like an ideal transformer
+k=omegaM/sqrt(omegaL_1*omegaL_2);
+// Let us denote I_out/I_in = I_gain
+// V_out/V_in=V_gain
+I_gain=(%i*omegaM)/(%i*omegaL_2+Z);
+Z_in=(%i*omegaL_1*Z+(omegaM)^2-(omegaL_1*omegaL_2))/(%i*omegaL_2+Z);
+V_gain=(%i*omegaM*Z)/(%i*omegaL_1*Z+(omegaM)^2-(omegaL_1*omegaL_2));
+disp(I_gain,"Current gain=")
+disp(Z_in,"Input impedance(Ohms)=")
+disp(V_gain,"Voltage gain=")
diff --git a/1430/CH8/EX8.6/exa8_6.txt b/1430/CH8/EX8.6/exa8_6.txt new file mode 100644 index 000000000..120b822d8 --- /dev/null +++ b/1430/CH8/EX8.6/exa8_6.txt @@ -0,0 +1,17 @@ +
+
+-->exec('C:\Users\sangeet\Documents\Scilab\Circuits\Chapter 8\exa8_6.sce', -1)
+
+ Current gain=
+
+ 0.1947536 + 0.0155803i
+
+ Input impedance(Ohms)=
+
+ 7.6343402 + 4.5707472i
+
+ Voltage gain=
+
+ 3.9356639 - 1.9481537i
+
+
diff --git a/1430/CH9/EX9.1/exa9_1.jpg b/1430/CH9/EX9.1/exa9_1.jpg Binary files differnew file mode 100644 index 000000000..9aa3a6d32 --- /dev/null +++ b/1430/CH9/EX9.1/exa9_1.jpg diff --git a/1430/CH9/EX9.1/exa9_1.sce b/1430/CH9/EX9.1/exa9_1.sce new file mode 100644 index 000000000..5e11a0e9d --- /dev/null +++ b/1430/CH9/EX9.1/exa9_1.sce @@ -0,0 +1,25 @@ +// Example 9.1
+// Zero-Input Response of an RL circuit
+// From figure 9.5
+L=60*10^-3;
+R_eq=40+10;// Equivalent resistance
+tau=L/R_eq; // Time constant
+// Let us denote y(0^-) by y_bef and y(0^+) by y_aft
+i_bef= 25/10; // t<0 , under steady state conditions
+// form the continuity equation of inductor current we get
+i_aft=i_bef;
+v_bef=25;
+t=0:0.0001:0.01;
+i=i_aft*%e^(-t/tau); // t>0
+v=-40*i; // t>0
+subplot(2,1,1)
+plot(t,i,'r');
+xlabel('t')
+ylabel('i(t)')
+title('Current Waveform of inductor')
+subplot(2,1,2)
+plot(t,v,'-g')
+xlabel('t')
+ylabel('v(t)')
+title('Voltage Waveform across 40-Ohm resistance')
+
diff --git a/1430/CH9/EX9.11/exa9_11.jpg b/1430/CH9/EX9.11/exa9_11.jpg Binary files differnew file mode 100644 index 000000000..1178d5523 --- /dev/null +++ b/1430/CH9/EX9.11/exa9_11.jpg diff --git a/1430/CH9/EX9.11/exa9_11.sce b/1430/CH9/EX9.11/exa9_11.sce new file mode 100644 index 000000000..c3c60fcea --- /dev/null +++ b/1430/CH9/EX9.11/exa9_11.sce @@ -0,0 +1,32 @@ +//Example 9.11
+// Underdamped Zero-Input Response
+// form figure 9.25
+L=0.1;
+R=5;
+C=1/640;
+alpha=R/(2*L);
+omega_0=sqrt(1/(L*C));
+//Characteristic Values
+p1=-alpha+sqrt(alpha^2-omega_0^2);
+omega_d=sqrt(omega_0^2-alpha^2);
+p2=p1'; // Complex conjugate
+V_s1=30; // t<0
+V_s2=0;//t>0
+// using initial conditions we find
+i_L_aft=0;// i(0^+)=0
+i_L_aft_d=-30/L; // i'(0^+)=0
+I_ss= 0; // when capacitor becomes fully charge before t<0
+//Using complex matrix equation
+P=[1,1;p1,p2];
+I=[i_L_aft-I_ss;i_L_aft_d]
+A=P\I
+A_1=A(1);
+A_1_m=abs(A_1);
+phase_A_1=atan(imag(A_1),real(A_1))*(180/%pi);
+t=0:0.001:0.5
+i_L=2*A_1_m*exp(-alpha*t).*cos(omega_d*t+phase_A_1);
+plot(t,i_L)
+xlabel('t')
+ylabel('i_L(t)')
+title('Current Waveform')
+
diff --git a/1430/CH9/EX9.12/exa9_12.jpg b/1430/CH9/EX9.12/exa9_12.jpg Binary files differnew file mode 100644 index 000000000..e74a421fa --- /dev/null +++ b/1430/CH9/EX9.12/exa9_12.jpg diff --git a/1430/CH9/EX9.12/exa9_12.sce b/1430/CH9/EX9.12/exa9_12.sce new file mode 100644 index 000000000..9005a8d17 --- /dev/null +++ b/1430/CH9/EX9.12/exa9_12.sce @@ -0,0 +1,46 @@ +// Example 9.12
+// Step Response with variable damping
+V_s1=0; // Voltage source value for t<0
+V_s2=30;//Voltage source value for t>0
+L=0.1;
+C=1/640;
+omega_0=sqrt(1/(L*C));
+v_C_aft=0; // v_C(0^+)=0;
+v_C_aft_d=0; // v_C'(0^+)=0;
+V_ss=30;
+// for Overdamped Response
+// Let
+R=34;
+alpha=R/(2*L);
+p1=-alpha+sqrt(alpha^2-omega_0^2)
+p2=-alpha-sqrt(alpha^2-omega_0^2)
+P=[1,1;p1,p2];// coefficients of A's matrix
+V=[v_C_aft-V_ss;v_C_aft_d];// initial conditions and excitations
+A=P\V;
+A_1=A(1);
+A_2=A(2);
+t=0:0.001:0.5
+v_C=V_ss+A_1*exp(p1*t)+A_2*exp(p2*t);// t>0
+// for Underdamped Response
+// Let
+R1=5;
+alpha1=R1/(2*L);
+p3=-alpha1+sqrt(alpha1^2-omega_0^2);
+p4=-alpha1-sqrt(alpha1^2-omega_0^2);
+omega_d=sqrt(omega_0^2-alpha1^2);
+P1=[1,1;p3,p4];
+V1=[v_C_aft-V_ss;v_C_aft_d];
+A1=P1\V1
+A_3=A1(1);
+v_C1=V_ss+2*abs(A_3)*exp(-alpha1*t).*cos(omega_d*t+atan(imag(A_3),real(A_3)));
+// for Critically Damped Response
+R2=sqrt(6400/25);
+alpha2=R2/(2*L);
+A_4=v_C_aft-V_ss;
+A_5=v_C_aft_d+alpha2*A_4;
+v_C2=V_ss+A_4*exp(-alpha2*t)+A_5*t.*exp(-alpha2*t);
+plot(t,v_C,t,v_C1,t,v_C2)
+xlabel('t')
+ylabel('v_c(t)')
+title('Step Response with variable damping')
+h1=legend(['Overdamped';'Underdamped';'Critically damped'])
diff --git a/1430/CH9/EX9.2/exa9_2.jpg b/1430/CH9/EX9.2/exa9_2.jpg Binary files differnew file mode 100644 index 000000000..f355c8068 --- /dev/null +++ b/1430/CH9/EX9.2/exa9_2.jpg diff --git a/1430/CH9/EX9.2/exa9_2.sce b/1430/CH9/EX9.2/exa9_2.sce new file mode 100644 index 000000000..fe2aa6625 --- /dev/null +++ b/1430/CH9/EX9.2/exa9_2.sce @@ -0,0 +1,19 @@ +// Example 9.2
+// Step response of an RC circuit
+C=50*10^-6;
+R_eq=(3000*6000)/(3000+6000); // From figure 9.10(a)
+v_oc=(6*12)/(3+6);
+tau=R_eq*C;
+t=0:0.0001:1
+v=v_oc*(1-exp(-t/tau)); // t>0
+i=(v_oc-v)/(R_eq); // t>0
+subplot(2,1,1)
+plot(t,v,)
+xlabel('t')
+ylabel('v(t)')
+title('Voltage waveform across capacitor')
+subplot(2,1,2)
+plot(t,i)
+xlabel('t')
+ylabel('i(t)')
+title('Current waveform across capacitor')
diff --git a/1430/CH9/EX9.3/exa9_3.jpg b/1430/CH9/EX9.3/exa9_3.jpg Binary files differnew file mode 100644 index 000000000..808e99fdf --- /dev/null +++ b/1430/CH9/EX9.3/exa9_3.jpg diff --git a/1430/CH9/EX9.3/exa9_3.sce b/1430/CH9/EX9.3/exa9_3.sce new file mode 100644 index 000000000..fe74a9bed --- /dev/null +++ b/1430/CH9/EX9.3/exa9_3.sce @@ -0,0 +1,25 @@ +// Example 9.3
+// Analysis of a Relay Driver
+R_eq=10+15; // from figure 9.13(a)
+L=400*10^-3;
+tau=L/R_eq;
+V=5; // DC voltage source
+I_ss=5/25; // steady state value of current in the circuit
+t=0:10^-3:30*10^-3;
+i_L1=I_ss*(1-%e^(-t/tau)); // 0<t<=30*10^-3;
+// the relay closes at time t1 when i_L1(t1)=150*10^-3;
+// Solving equation 200*(1-%e^(-t1/16))=150;
+t1= -tau*log(1-150/200);
+i_L2_peak= I_ss*(1-exp(-30/16)); // Value of current at the end of the pulse
+// After the pulse is over,the exponential decay of the current becomes
+t3=0.030:0.001:0.05
+i_L2=i_L2_peak*exp(-(t3-30*10^-3)/tau);
+// the relay then opens at t2 when i_L2(t2)=40*10^-3;
+// solving equation 169*exp(-t2/16)=40;
+t2= (30*10^-3)-tau*log(40/169)
+t_int=t2-t1;
+plot(t,i_L1,t3,i_L2)
+xlabel('t')
+ylabel('i_L(t)')
+title('Current Waveform')
+disp(t_int,"Relay remains closed over the interval(sec)=");
diff --git a/1430/CH9/EX9.4/exa9_4.jpg b/1430/CH9/EX9.4/exa9_4.jpg Binary files differnew file mode 100644 index 000000000..f725e52f8 --- /dev/null +++ b/1430/CH9/EX9.4/exa9_4.jpg diff --git a/1430/CH9/EX9.4/exa9_4.sce b/1430/CH9/EX9.4/exa9_4.sce new file mode 100644 index 000000000..812fd98b3 --- /dev/null +++ b/1430/CH9/EX9.4/exa9_4.sce @@ -0,0 +1,43 @@ +//Example 9.4
+// Sequential switched transients
+// form figure 9.14(a)
+// using symbols y(0^-)=y_bef and y(0^+)=y_aft
+v_bef=0;
+i_bef=0;
+C=100*10^-6; // Farad
+V_0=0; // voltage continuity of capacitor
+I_0= (-16-V_0)/(8000); // using KVL in figure 9.14(b)
+// By DC steady-state analysis,v(t) and i(t) head for the values,
+V_ss=(24*(-16))/(8+24);
+I_ss=-(16*10^-3)/(8+24);
+// supressing the 16V source
+R_eq=(8000*24000)/(8000+24000);
+tau=R_eq*C // Time constant
+t=0:0.0001:1
+v=V_ss+(V_0-V_ss)*exp(-t/tau); // 0<t<=1s
+i=I_ss+(I_0-I_ss)*exp(-t/tau); // 0<t<=1s
+t1=1; // for t= 1
+v_1=V_ss+(V_0-V_ss)*exp(-t1/tau);
+i_1=I_ss+(I_0-I_ss)*exp(-t1/tau);
+// Now the circuit is driven by two dc sources
+// Equivalent circuit is shown in figure 9.14(c)
+V_0_n=v_1; // Voltage continuity of capacitor
+I_0_n=(14.4 -V_0_n)/(4.8*10^3);
+V_ss_n=(24*14.4)/(4.8+24);
+I_ss_n=14.4/((4.8+24)*10^3);
+R_eq_n=((4.8*24)*10^3)/(4.8+24);
+tau_n=R_eq_n*C; // New time constant
+t2=1:0.0001:3
+v_n=V_ss_n+(V_0_n-V_ss_n)*exp(-(t2-1)/0.4);
+i_n=I_ss_n+(I_0_n-I_ss_n)*exp(-(t2-1)/0.4);
+subplot(2,1,1)
+plot(t,v,'-g',t2,v_n,'-g')
+xlabel('t')
+ylabel('v(t)')
+title('Voltage Waveform')
+subplot(2,1,2)
+plot(t,i,'-r',t2,i_n,'-r')
+xlabel('t')
+ylabel('i(t)')
+title('Current Waveform')
+
diff --git a/1430/CH9/EX9.5/exa9_5.jpg b/1430/CH9/EX9.5/exa9_5.jpg Binary files differnew file mode 100644 index 000000000..495bde00e --- /dev/null +++ b/1430/CH9/EX9.5/exa9_5.jpg 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')
diff --git a/1430/CH9/EX9.8/exa9_8.jpg b/1430/CH9/EX9.8/exa9_8.jpg Binary files differnew file mode 100644 index 000000000..9567ea802 --- /dev/null +++ b/1430/CH9/EX9.8/exa9_8.jpg diff --git a/1430/CH9/EX9.8/exa9_8.sce b/1430/CH9/EX9.8/exa9_8.sce new file mode 100644 index 000000000..c92e03958 --- /dev/null +++ b/1430/CH9/EX9.8/exa9_8.sce @@ -0,0 +1,25 @@ +//Example 9.8
+// Natural Response of a Series LRC Circuit
+// From figure 9.17
+L=0.1;
+R=14;
+C=1/400;
+// Since Excitation is zero by definition of natural response ,we set v_s'=0 in standard 2nd order diffrential equation
+// homogeneneous differential equation will be
+// i_L''+(R/L)*i_L'+(1/(L*C))*i_L=0
+s=%s;
+p=s^2+(R/L)*s+(1/(L*C)); // characteristic equation
+//comparing this equation with standard 2nd order diffrential equation we get
+alpha=R/(2*L);
+omega=sqrt(1/(L*C));
+r=roots(p); // roots of characteristic equation
+// Let us assume values for A's
+A_1= -5;
+A_2= 7;
+t=0:0.001:0.1;
+i_l=A_1*exp(r(2)*t)+A_2*exp(r(1)*t);
+plot(t,i_l) // typical plot of Overdamped Response
+xlabel('t')
+ylabel('i_l(t)')
+title("Overdamped Response of series LRC circuit")
+
diff --git a/1430/CH9/EX9.9/exa9_9.jpg b/1430/CH9/EX9.9/exa9_9.jpg Binary files differnew file mode 100644 index 000000000..b6d901b4a --- /dev/null +++ b/1430/CH9/EX9.9/exa9_9.jpg diff --git a/1430/CH9/EX9.9/exa9_9.sce b/1430/CH9/EX9.9/exa9_9.sce new file mode 100644 index 000000000..8c62d3e37 --- /dev/null +++ b/1430/CH9/EX9.9/exa9_9.sce @@ -0,0 +1,42 @@ +//Example 9.9
+// Natural response of a Phase-Shift Oscillator
+// Continued from textbook example 9.7
+C=2*10^-6;
+R=100;
+L=10*10^-3;
+K=poly(0,'K'); // Variable gain K
+alpha=(R/(2*L))*(L/(R^2*C)+1-K);
+omega_0=sqrt(2/(L*C));
+K=roots(alpha);
+alpha=horner(alpha,K)
+// Since this is the case of underdamped response
+//Assume value for A_1 for illustration
+A1=complex(0,1.974)
+A1_m=abs(A1);
+phase_A1=atan(imag(A1),real(A1));
+t=0:0.01:1
+t1=0:0.0001:0.02
+v_out1=2*A1_m*cos(omega_0*t+phase_A1) // Underdamped response case1
+K1=1; // New value of gain
+alpha1=(R/(2*L))*(L/(R^2*C)+1-K1);
+omega_d1=sqrt(omega_0^2-alpha1^2);
+v_out2=2*A1_m*%e^(-alpha1*t1).*cos(omega_d1*t1+phase_A1);
+K2=2;
+alpha2=(R/(2*L))*(L/(R^2*C)+1-K2);
+omega_d2=sqrt(omega_0^2-alpha2^2)
+v_out3=2*A1_m*%e^(-alpha2*t1).*cos(omega_d2*t1+phase_A1)
+subplot(3,1,1)
+plot(t,v_out1)
+xlabel('t')
+ylabel('v_out1(t)')
+title('Underdamped case 1')
+subplot(3,1,2)
+plot(t1,v_out2)
+xlabel('t')
+ylabel('v_out1(t)')
+title('Underdamped case 2')
+subplot(3,1,3)
+plot(t1,v_out3)
+xlabel('t')
+ylabel('v_out1(t)')
+title('Underdamped case 3')
|