diff options
author | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
---|---|---|
committer | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
commit | 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch) | |
tree | dbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /3682/CH7 | |
parent | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff) | |
download | Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2 Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip |
initial commit / add all books
Diffstat (limited to '3682/CH7')
-rw-r--r-- | 3682/CH7/EX7.1/Ex7_1.sce | 42 | ||||
-rw-r--r-- | 3682/CH7/EX7.2/Ex7_2.sce | 36 | ||||
-rw-r--r-- | 3682/CH7/EX7.3/Ex7_3.sce | 26 | ||||
-rw-r--r-- | 3682/CH7/EX7.4/Ex7_4.sce | 43 | ||||
-rw-r--r-- | 3682/CH7/EX7.5/Ex7_5.sce | 44 | ||||
-rw-r--r-- | 3682/CH7/EX7.6/Ex7_6.sce | 18 | ||||
-rw-r--r-- | 3682/CH7/EX7.7/Ex7_7.sce | 39 | ||||
-rw-r--r-- | 3682/CH7/EX7.9/Ex7_9.sce | 30 |
8 files changed, 278 insertions, 0 deletions
diff --git a/3682/CH7/EX7.1/Ex7_1.sce b/3682/CH7/EX7.1/Ex7_1.sce new file mode 100644 index 000000000..11b803ed1 --- /dev/null +++ b/3682/CH7/EX7.1/Ex7_1.sce @@ -0,0 +1,42 @@ +// Exa 7.1
+
+clc;
+clear;
+
+// Given data
+
+n=2; // Second order Butterworth filter
+fL=1000; // Higher cut off frequency(Hz)
+
+// Solution
+
+printf('Let C = 0.1 μF. \n');
+C=0.1*10^-6; // Farads
+
+// Since fL = 1/(2 * %pi * R*C);
+// Therefore;
+R = 1/(2*%pi*fL*C);
+printf(' The calculated value of R = %.1f kΩ. \n',R/1000);
+
+printf(' From Table 7.1, for n=2, the damping factor alpha = 1.414.');
+alpha=1.414;
+A0 = 3-alpha;
+printf('\n Then the pass band gain A0 = %.3f. \n',A0);
+printf('\n');
+printf(' The transfer function of the normalized second order Butterworth filter is 1.586 ');
+printf('\n ----------------');
+printf('\n Sn^2+1.414*Sn+1');
+
+// Since Af= 1 + Rf/Ri = 1 + 0.586;
+printf('\n Since A0= 1.586 so Let Rf = 5.86 kΩ and Ri = 10 kΩ to make A0 = 1.586.' );
+
+printf(' \n The circiuit realized is as shown in Fig. 7.4 with component value as mentioned above.');
+
+printf('\n\n\n Frequency, f in Hz Gain magnitude in dB 20 log(vo/vi)\n');
+// Frequency Response
+x=[0.1*fL,0.2*fL,0.5*fL,1*fL,5*fL,10*fL]
+for i = 1:1:6
+ response(i) = 20*log10(A0/(sqrt(1+(fL/x(i))^4)));
+ printf(' %d %.2f \n',x(i),response(i));
+end
+
diff --git a/3682/CH7/EX7.2/Ex7_2.sce b/3682/CH7/EX7.2/Ex7_2.sce new file mode 100644 index 000000000..d1c1cd537 --- /dev/null +++ b/3682/CH7/EX7.2/Ex7_2.sce @@ -0,0 +1,36 @@ +// Exa 7.2
+
+clc;
+clear;
+
+// Given data
+
+n=4; // Fourth order Butterworth low-pass filter
+fH=1000; // Hz
+
+// Solution
+
+printf('Let C = 0.1 μF. \n');
+C=0.1*10^-6; // Farads
+// Since fH = 1/(2 * %pi * R*C);
+// Therefore;
+R = 1/(2*%pi*fH*C);
+printf(' The calculated value of R = %.1f kΩ. \n',R/1000);
+
+printf(' From Table 7.1, for n=4, we get two damping factors namely,\n alpha1 = 0.765 and alpha2 = 1.848.');
+alpha1=0.765;
+alpha2=1.848;
+A01 = 3-alpha1;
+A02 = 3-alpha2;
+printf('\n');
+printf('\n Then the pass band gain A01 = %.3f and A02 = %.3f. \n',A01,A02);
+printf('\n');
+printf(' The transfer function of the normalized second order low-pass Butterworth filter is 2.235 1.152 ');
+printf('\n ---------------- * ------------------');
+printf('\n Sn^2+0.765*Sn+1 Sn^2+1.848*Sn+1 ');
+
+// Since A01= 1 + Rf/Ri = 1 + 1.235;
+printf('\n Since A01= 2.235 so Let Rf1 = 12.35 kΩ and Ri1 = 10 kΩ to make A01 = 2.235.' );
+printf('\n Since A02= 1.152 so Let Rf2 = 15.20 kΩ and Ri1 = 100 kΩ to make A01 = 1.152.' );
+
+printf(' \n The circiuit realized is as shown in Fig. 7.7 with component value as mentioned above.');
diff --git a/3682/CH7/EX7.3/Ex7_3.sce b/3682/CH7/EX7.3/Ex7_3.sce new file mode 100644 index 000000000..18dc7fcb9 --- /dev/null +++ b/3682/CH7/EX7.3/Ex7_3.sce @@ -0,0 +1,26 @@ +// Exa 7.3
+
+clc;
+clear;
+
+// Given data
+
+Attn=40; // Attenuation in dB
+x=2; // x= ratio of W to Wh
+
+// Solution
+
+printf(' Using equation 7.26,\n');
+
+// 20*log(H(jw)/A0)=-40; // -ve since it is attenuation
+// gives
+// H(jw)/A0 = 10^-2 = 0.01
+// so
+// (0.01)^2 = 1/(1+2^(2*n));
+// or 2^2n = 10^4 - 1;
+// solving for n, we get
+
+n=log(10^(4) -1)/(2*log(2));
+printf(' The calculated value of n = %.2f. \n',n);
+printf(' Since order of filter must be an integer so, n = %d. \n',round(n));
+
diff --git a/3682/CH7/EX7.4/Ex7_4.sce b/3682/CH7/EX7.4/Ex7_4.sce new file mode 100644 index 000000000..9aaa28843 --- /dev/null +++ b/3682/CH7/EX7.4/Ex7_4.sce @@ -0,0 +1,43 @@ +// Exa 7.4
+
+clc;
+clear;
+
+// Given data
+
+n=2; // Second order Butterworth filter
+fH=1000; // Lower cut off frequency(Hz)
+
+// Solution
+
+printf('Let C = 0.1 μF. \n');
+C=0.1*10^-6; // Farads
+
+// Since fH = 1/(2 * %pi * R*C);
+// Therefore;
+R = 1/(2*%pi*fH*C);
+printf(' The calculated value of R = %.1f kΩ. \n',R/1000);
+
+printf(' From Table 7.1, for n=2, the damping factor alpha = 1.414.');
+alpha=1.414;
+A0 = 3-alpha;
+printf('\n Then the pass band gain A0 = %.3f. \n',A0);
+printf('\n');
+printf(' The transfer function of the normalized second order low-pass Butterworth filter is 1.586 ');
+printf('\n ----------------');
+printf('\n Sn^2+1.414*Sn+1');
+
+// Since Af= 1 + Rf/Ri = 1 + 0.586;
+printf('\n Since A0= 1.586 so Let Rf = 5.86 kΩ and Ri = 10 kΩ to make A0 = 1.586.' );
+
+printf(' \n The circiuit realized is as shown in Fig. 7.4 with component value as mentioned above.');
+
+printf('\n By considering minimum DC offset condition, the modified value of R and C comes out to be R = 1.85 kΩ and C=0.086 μF.');
+printf('\n\n\n Frequency, f in Hz Gain magnitude in dB 20 log(vo/vi)\n');
+// Frequency Response
+x=[0.1*fH,0.2*fH,0.5*fH,1*fH,5*fH,10*fH]
+for i = 1:1:6
+ response(i) = 20*log10(A0/(sqrt(1+(x(i)/fH)^4)));
+ printf(' %d %.2f \n',x(i),response(i));
+end
+
diff --git a/3682/CH7/EX7.5/Ex7_5.sce b/3682/CH7/EX7.5/Ex7_5.sce new file mode 100644 index 000000000..1697d26ae --- /dev/null +++ b/3682/CH7/EX7.5/Ex7_5.sce @@ -0,0 +1,44 @@ +// Exa 7.5
+
+clc;
+clear;
+
+// Given data
+
+// A wide-band pass filter
+fL=400; // Lower cutoff frequency(Hz)
+fH=2000; // Higher cutoff frequency(Hz)
+A0=4; // passband gain
+
+// Solution
+
+printf('Since, the pass band gain is 4. so each of LPF and HPF section may be designed to give gain of 2,\n that is Ao=1+ (Rf/Ri) = 2.\n So, Rf and Ri should be equal. \n Let Rf=Ri=10 kΩ for each of LPF and HPF sections.');
+
+disp("");
+disp("");
+disp("For HPF, fL=400 Hz.");
+printf(' Assume C2=0.01 μF. ');
+C2=0.01*10^-6; // Farads
+// Since fL= 1/(2*%pi*R2*C2);
+// Therefore
+R2= 1/(2*%pi*C2*fL);
+printf(' \n The calculated value of R = %.1f kΩ.',int(R2)/1000);
+
+disp("");
+disp("");
+disp("For LPF, fH=2000 Hz.");
+printf(' Assume C1=0.01 μF.');
+C1=0.01*10^-6; // Farads
+// Since fH= 1/(2*%pi*R1*C1);
+// Therefore
+R1= 1/(2*%pi*C1*fH);
+printf(' \n The calculated value of R = %.2f kΩ.',R1/1000);
+
+disp("");
+disp("");
+
+fo=sqrt(fL*fH);
+Q=fo/(fH-fL);
+
+printf(' The value of cutoff frequency = %.1f Hz.\n ',fo);
+printf('\n The quality factor = %.2f (<10) since wide passband filter.',Q);
diff --git a/3682/CH7/EX7.6/Ex7_6.sce b/3682/CH7/EX7.6/Ex7_6.sce new file mode 100644 index 000000000..47da97769 --- /dev/null +++ b/3682/CH7/EX7.6/Ex7_6.sce @@ -0,0 +1,18 @@ +// Exa 7.6
+
+clc;
+clear;
+
+// Given data
+
+// A notch filter
+fo=50; // cutoff frequency for notch filter(Hz)
+
+//Solution
+
+printf('As Given fo=50 Hz. Let C=0.1 μF.');
+C=0.1*10^-6; // Farads
+// since fo=1/(2*%pi*R*C);
+// Therefore R -
+R=1/(2*%pi*fo*C);
+printf(' \n For R/2, take two resistors of 31.8 k Ohms in parallel and for 2C,\n take two 0.1 mocroFarads capacitors in parallel to make the twin-T notch filter\n as shown in Fig. 7.15(a) on page no. 279 where resistors R1 and R2 are for adjustment of gain.\n ')
diff --git a/3682/CH7/EX7.7/Ex7_7.sce b/3682/CH7/EX7.7/Ex7_7.sce new file mode 100644 index 000000000..008edd6c0 --- /dev/null +++ b/3682/CH7/EX7.7/Ex7_7.sce @@ -0,0 +1,39 @@ +// Exa 7.7
+
+clc;
+clear;
+
+// Given data
+fH= 400; // Higher cutoff frequency(Hz)
+fL=2000; // lower cutoff frequency(Hz)
+Ao=2; // Pass band gain
+
+// Solution
+
+disp("For HPF, fL=2 kHz.");
+disp("Assume C2=0.1 μF. ");
+C2=0.1*10^-6; // Farads
+// Since fL= 1/(2*%pi*R*C2);
+// Therefore
+RL= 1/(2*%pi*C2*fL);
+printf(' The calculated value of R = %d Ω.',int(RL));
+printf('\n Let R = 800 Ω.');
+// Since Ao=Ao2 = 1+ (Rf/Ri);
+disp("Let Rf = Ri =10 kΩ(say) to give A02 of 2.");
+disp("");
+disp("");
+disp("For LPF, fL=400 Hz.");
+disp("Assume C1=0.1 μF. ");
+C1=0.1*10^-6; // Farads
+// Since fH= 1/(2*%pi*R*C1);
+// Therefore
+RF= 1/(2*%pi*C1*fH);
+printf(' The calculated value of R = %d Ω.',int(RF));
+printf('\n Let R = 4 kΩ.');..
+// Since Ao=Ao1 = 1+ (Rf/Ri);
+disp("Let Rf = Ri =10 kΩ(say) to give A01 of 2.");
+
+disp("");
+disp("");
+
+disp("The schematic arrangement and the frequency response is shown in figs. 7.16(a,b) on page no. 280.")
diff --git a/3682/CH7/EX7.9/Ex7_9.sce b/3682/CH7/EX7.9/Ex7_9.sce new file mode 100644 index 000000000..e4a98d7da --- /dev/null +++ b/3682/CH7/EX7.9/Ex7_9.sce @@ -0,0 +1,30 @@ +// Exa 7.9
+
+clc;
+clear;
+
+// Given data
+
+fo=10; // Hz
+
+// Solution
+
+disp(" For a switched capacitor integrator, assume fCK=1000 Hz.");
+fCK=1000; // Hz
+ disp(" From Eq. (7.129) on page no. 293, we get, ");
+ disp(" Cf/C1 =x= fCK/(2*%pi*fo). "); // x = ratio of Cf by C1
+x=fCK/(2*%pi*fo);
+disp(" Lets choose cF=15.9 pF.");
+cF=15.9*10^-12; // Farads
+C1=cF/x;
+printf(' By calculation C1 = %d pF.\n ',round(C1*10^12));
+disp(" For RC integrator, select R1=1.6*10^6 Ω.") ;
+R1=1.6*10^6; // Ω
+cF1=1/(2*%pi*R1*fo);
+printf(' By calculation cF = %d nF. \n',round(cF1*10^9));
+disp("");
+printf(' The values of R1 = 1.6 mHz and cF = 10nF are not quite practical for a monolothic circuit.\n From this, it is obvious that switched capacitor circuits are more practical so far as IC fabrication is concerned.\n So it can be seen that an SC integrator requires very low values of capacitance compared to lossy integrator.');
+disp("");
+printf(' If a resistor R2 is placed in parallel with the feedback capacitor cF of Fig. 7.26(a), a lossy or practical integrator is obtained. \n The transfer function for this circuit is given in Eq. (7.130) and (7.131) on page no. 294.' );
+
+printf('\n \n The switched capacitor implementation of Fig. 7.26(a) is shown in Fig. 7.26(b)\n where resistors R1 and R2 have been replaced by switched capacitors C1 and C2 and its MOS version is in Fig. 7.26(c).');
|