summaryrefslogtreecommitdiff
path: root/1757/CH7
diff options
context:
space:
mode:
Diffstat (limited to '1757/CH7')
-rwxr-xr-x1757/CH7/EX7.1/EX7_1.sce13
-rwxr-xr-x1757/CH7/EX7.10/EX7_10.sce18
-rwxr-xr-x1757/CH7/EX7.11/EX7_11.sce29
-rwxr-xr-x1757/CH7/EX7.12/EX7_12.sce39
-rwxr-xr-x1757/CH7/EX7.13/EX7_13.sce17
-rwxr-xr-x1757/CH7/EX7.14/EX7_14.sce27
-rwxr-xr-x1757/CH7/EX7.15/EX7_15.sce36
-rwxr-xr-x1757/CH7/EX7.2/EX7_2.sce20
-rwxr-xr-x1757/CH7/EX7.3/EX7_3.sce32
-rwxr-xr-x1757/CH7/EX7.4/EX7_4.sce16
-rwxr-xr-x1757/CH7/EX7.5/EX7_5.sce19
-rwxr-xr-x1757/CH7/EX7.6/EX7_6.sce11
-rwxr-xr-x1757/CH7/EX7.7/EX7_7.sce18
-rwxr-xr-x1757/CH7/EX7.8/EX7_8.sce29
-rwxr-xr-x1757/CH7/EX7.9/EX7_9.sce16
15 files changed, 340 insertions, 0 deletions
diff --git a/1757/CH7/EX7.1/EX7_1.sce b/1757/CH7/EX7.1/EX7_1.sce
new file mode 100755
index 000000000..b2f69114d
--- /dev/null
+++ b/1757/CH7/EX7.1/EX7_1.sce
@@ -0,0 +1,13 @@
+//Example7.1 // Design active low filter with cut-off frequency 10 KHz
+clc;
+clear;
+close;
+fc = 10 ; // KHz
+C = 0.01 ; //uF // we assume
+
+// the cut-off frequency of active low pass filter is defined as
+// fc = (1/2*%pi*R3*C);
+
+// R3 can be calculated as
+R3 = (1/(2*%pi*fc*C));
+disp('The resistor value is = '+string(R3)+' k ohm ');
diff --git a/1757/CH7/EX7.10/EX7_10.sce b/1757/CH7/EX7.10/EX7_10.sce
new file mode 100755
index 000000000..04c7ba47f
--- /dev/null
+++ b/1757/CH7/EX7.10/EX7_10.sce
@@ -0,0 +1,18 @@
+//Example7.10 // to design an active band pass filter with lower cut-off frequency 10 KHz an upper 50 KHZ
+clc;
+clear;
+close;
+fL = 10 ; // KHz
+fH = 50 ; // KHz
+C1 = 0.002 ; // nF
+C2 = 0.002 ; // nF
+
+// the lower cut-off frequency of band pass filter is
+// fL = 1/(2*%pi*R3*C1);
+R3 = 1/(2*%pi*fL*C1);
+disp('The resistance R3 Value is = '+string(R3)+' M ohm ');
+
+// The upper cut-off frequency of band pass filter is
+// fH = 1/(2*%pi*R6*C2);
+R6 = 1/(2*%pi*fH*C2);
+disp('The resistance R6 value is = '+string(R6)+' M ohm ');
diff --git a/1757/CH7/EX7.11/EX7_11.sce b/1757/CH7/EX7.11/EX7_11.sce
new file mode 100755
index 000000000..c381f501e
--- /dev/null
+++ b/1757/CH7/EX7.11/EX7_11.sce
@@ -0,0 +1,29 @@
+//Example7.11 // to design an active band pass filter with lower cut-off frequency 20 KHz an upper 40 KHZ
+clc;
+clear;
+close;
+fL = 20 ; // KHz
+fH = 40 ; // KHz
+// the inverting terminal resistance 2R1=R2 and 4R4=R5
+C1 = 0.001 ; // nF
+C2 = 0.001 ; // nF
+
+// the lower cut-off frequency of band pass filter is
+// fL = 1/(2*%pi*R3*C1);
+R3 = 1/(2*%pi*fL*C1);
+disp('The resistance R3 Value is = '+string(R3)+' M ohm ');
+
+// The upper cut-off frequency of band pass filter is
+// fH = 1/(2*%pi*R6*C2);
+R6 = 1/(2*%pi*fH*C2);
+disp('The resistance R6 value is = '+string(R6)+' M ohm ');
+
+// the desire pass band gain of filter is defined as
+R1 = 1 ; // M ohm we assume
+//we define inverting terminal resistance 2R1=R2
+R2 = 2 ; // M ohm
+// then
+R4 = 1 ; //M ohm
+R5 = 4 ; // M ohm
+Af = (1+(R2/R1))*(1+(R5/R4));
+disp('The desire pass band gain of filter is = '+string(Af)+' ');
diff --git a/1757/CH7/EX7.12/EX7_12.sce b/1757/CH7/EX7.12/EX7_12.sce
new file mode 100755
index 000000000..42b214239
--- /dev/null
+++ b/1757/CH7/EX7.12/EX7_12.sce
@@ -0,0 +1,39 @@
+
+//Example7.12 // to design an active band pass filter with lower cut-off frequency 20 KHz an upper 80 KHZ
+clc;
+clear;
+close;
+f = 100 ; // KHz the frequency of band pass filter
+fL = 20 ; // KHz
+fH = 80 ; // KHz
+// the inverting terminal resistance R1=0.5*R2 and R4=0.25*R5
+C1 = 0.001 ; // nF
+C2 = 0.001 ; // nF
+
+// the lower cut-off frequency of band pass filter is
+// fL = 1/(2*%pi*R3*C1);
+R3 = 1/(2*%pi*fL*C1);
+disp('The resistance R3 Value is = '+string(R3)+' M ohm ');
+
+// The upper cut-off frequency of band pass filter is
+// fH = 1/(2*%pi*R6*C2);
+R6 = 1/(2*%pi*fH*C2);
+disp('The resistance R6 value is = '+string(R6)+' M ohm '); // Round Off Error
+
+// the desire pass band gain of filter is defined as
+R1 = 1 ; // M ohm we assume
+//we define inverting terminal resistance R1=0.5*R2
+R2 = 2 ; // M ohm
+// then
+R4 = 1 ; //M ohm
+R5 = 4 ; // M ohm
+Af = (1+(R2/R1))*(1+(R5/R4));
+disp('The desire pass band gain of filter is = '+string(Af)+' ');
+
+// the magnitude of gain of band pass filter is given as
+A = Af*(f^2/(fL*fH))/((sqrt(1+(f/fL)^2))*(sqrt(1+(f/fH)^2)));
+disp('The magnitude of gain of band pass filter is = '+string(A)+' '); // Round Off Error
+
+//the phase angle of the filter
+Angle = 2*atand(%inf)-atand(f/fL)-atand(f/fH);
+disp('The phase angle of gain of band pass filter is = '+string(Angle)+' degree'); // Round Off Error
diff --git a/1757/CH7/EX7.13/EX7_13.sce b/1757/CH7/EX7.13/EX7_13.sce
new file mode 100755
index 000000000..c14125f21
--- /dev/null
+++ b/1757/CH7/EX7.13/EX7_13.sce
@@ -0,0 +1,17 @@
+//Example7.13 // to determine the output voltage of the precision rectifier circuit
+clc;
+clear;
+close;
+Vi = 10 ; //V i/p volt
+R1 = 20 ; // K ohm
+R2 = 40 ; // K ohm
+Vd = 0.7 ; // V the diode voltage drop
+
+// the output of the half wave precision rectifier is defined as
+// Vo = -(R2/R1)*Vi ; for Vi < 0
+// = 0 otherwise
+// i.e for Vi > 0
+// Vo = 0
+// for Vi < 0
+Vo = -(R2/R1)*Vi
+disp('The output of the half wave precision rectifier Vo is = '+string(Vo)+' V ');
diff --git a/1757/CH7/EX7.14/EX7_14.sce b/1757/CH7/EX7.14/EX7_14.sce
new file mode 100755
index 000000000..e9eb345ee
--- /dev/null
+++ b/1757/CH7/EX7.14/EX7_14.sce
@@ -0,0 +1,27 @@
+//Example7.14 // to determine the output voltage of the precision rectifier circuit for i/p voltage a) Vi = 5 b) Vi = -5
+clc;
+clear;
+close;
+Vi = 5 ; //V i/p volt
+R1 = 5 ; // K ohm
+R2 = 15 ; // K ohm
+Vd = 0.7 ; // V the diode voltage drop
+
+// the output of the half wave precision rectifier is defined as
+// Vo = -(R2/R1)*Vi ; for Vi < 0
+// = 0 otherwise
+
+// for Vi = 5 V
+// i.e for Vi > 0
+// Vo = 0
+// for Vi < 0
+Vo = -(R2/R1)*Vi;
+disp('The output of the half wave precision rectifier Vo is = '+string(Vo)+' V ');
+
+// for Vi = -5 V
+// i.e for Vi > 0
+// Vo = 0
+// for Vi < 0
+Vi =-5 ; // V
+Vo = -(R2/R1)*Vi;
+disp('The output of the half wave precision rectifier Vo is = '+string(Vo)+' V ');
diff --git a/1757/CH7/EX7.15/EX7_15.sce b/1757/CH7/EX7.15/EX7_15.sce
new file mode 100755
index 000000000..27147d77a
--- /dev/null
+++ b/1757/CH7/EX7.15/EX7_15.sce
@@ -0,0 +1,36 @@
+//Example7.15 // to determine the output voltage of the precision rectifier circuit for i/p voltage a) Vi = 7 b) Vi = -7
+clc;
+clear;
+close;
+Vi = 7 ; //V i/p volt
+R1 = 5 ; // K ohm
+R3 = 5 ; // K ohm
+R4 = 5 ; // K ohm
+R2 = 15 ; // K ohm
+R5 = 15 ; // K ohm
+Vd = 0.7 ; // V the diode voltage drop
+
+// the output of the full wave precision rectifier is defined as
+// Vo = -A*Vi ; for Vi < 0 equation 1
+// = A*Vi ; otherwise equation 2
+
+// or Vo = abs(A*Vi) ;
+
+// The gain of precision full wave rectifier
+A = (((R2*R5)/(R1*R3))-(R5/R4)) ;
+disp('The gain of precision full wave rectifier A is = '+string(A)+' ');
+
+
+// for Vi = 7 V the output voltage is
+Vi = 7 ;
+ Vo = -A*Vi ; // from equation 1
+ Vo = A*Vi ; // from equation 2
+Vo = abs(A*Vi) ;
+disp('The output voltage Vo is = '+string(Vo)+' V ');
+
+// for Vi = -7 V the output voltage is
+Vi = -7 ;
+ Vo = -A*Vi ; // from equation 1
+ Vo = A*Vi ; // from equation 2
+Vo = abs(A*Vi) ;
+disp('The output voltage Vo is = '+string(Vo)+' V ');
diff --git a/1757/CH7/EX7.2/EX7_2.sce b/1757/CH7/EX7.2/EX7_2.sce
new file mode 100755
index 000000000..eb4bec7fe
--- /dev/null
+++ b/1757/CH7/EX7.2/EX7_2.sce
@@ -0,0 +1,20 @@
+//Example7.2 // Design active low filter with cut-off frequency 15 KHz
+clc;
+clear;
+close;
+fc = 15*10^3 ; // Hz
+C = 0.1*10^-6 ; //F // we assume
+
+// the cut-off frequency of active low pass filter is defined as
+// fc = (1/2*%pi*R3*C);
+
+// R3 can be calculated as
+R3 = (1/(2*%pi*fc*C));
+disp('The resistor value is = '+string(R3)+' ohm ');
+
+// the pass band gain of filter is given by
+// Af = 1+(R2/R1);
+// assume that the inverting terminal resistor R2=0.5*R1;
+// in Af equation if we put R2=0.5R1 in R1 R1 cancellout each other
+Af = 1+(0.5)
+disp('The pass band gain is = '+string(Af)+' ');
diff --git a/1757/CH7/EX7.3/EX7_3.sce b/1757/CH7/EX7.3/EX7_3.sce
new file mode 100755
index 000000000..4e6a9894b
--- /dev/null
+++ b/1757/CH7/EX7.3/EX7_3.sce
@@ -0,0 +1,32 @@
+//Example7.3 // Design active low filter with cut-off frequency 20 KHz
+clc;
+clear;
+close;
+fc = 20 ; // KHz
+f = 100 ; // frequency of filter
+Af = 10 ; // desired pass band gain
+C = 0.05 ; //nF // we assume
+
+// the cut-off frequency of active low pass filter is defined as
+// fc = (1/2*%pi*R3*C);
+
+// R3 can be calculated as
+R3 = (1/(2*%pi*fc*C));
+disp('The resistor value is = '+string(R3)+' ohm ');
+
+// the pass band gain of filter is given by
+// Af = 1+(R2/R1);
+// assume that the inverting terminal resistor R1= 100 k ohm;
+R1 = 100 ; // k ohm
+R2 = (Af*R1)-R1;
+disp('The resistor R2 value is = '+string(R2)+' k ohm ');
+
+// the magnitude of an active low pass filter is given as
+A = Af/(sqrt(1+(f/fc)^2));
+disp('The magnitude of an active low pass filter is = '+string(A)+' ');
+
+//the phase angle of the filter
+Angle = -atand(f/fc);
+disp('The phase angle of the filter is = '+string(Angle)+' ');
+
+
diff --git a/1757/CH7/EX7.4/EX7_4.sce b/1757/CH7/EX7.4/EX7_4.sce
new file mode 100755
index 000000000..f2c9cde0a
--- /dev/null
+++ b/1757/CH7/EX7.4/EX7_4.sce
@@ -0,0 +1,16 @@
+//Example7.4 // to determine the cut-off frequency and pass band gain Af
+clc;
+clear;
+close;
+R1 = 1 ; // k ohm
+R2 = 12 ; // k ohm
+R3 = 1.2 ; // k ohm
+C = 0.05 ; //uF // we assume
+
+// the frequency of the first order low pass filter is defined as
+fc = (1/(2*%pi*R3*C));
+disp('The frequency of the first order low pass filter is = '+string(fc)+' KHz ');
+
+// the pass band gain of filter is given by
+Af =(1+R2/R1);
+disp('The pass band gain of filter is = '+string(Af)+'');
diff --git a/1757/CH7/EX7.5/EX7_5.sce b/1757/CH7/EX7.5/EX7_5.sce
new file mode 100755
index 000000000..989601ebe
--- /dev/null
+++ b/1757/CH7/EX7.5/EX7_5.sce
@@ -0,0 +1,19 @@
+//Example7.5 // to design a first order high pass filter with cut-off frequency 2KHz
+clc;
+clear;
+close;
+Af = 10 ;
+fc = 2 ; // KHz
+R3 = 2 ; //K ohm // we assume
+R1 = 10 ; // k ohm
+// the capacitor of high pass filter is given by
+C = 2*%pi*R3*fc;
+disp('The capacitor of high pass filter is = '+string(C)+' uF ');
+
+// the voltage gain of the high pass filter is
+// Af = 1+(R2/R1);
+R2 = R1*(Af-1);
+disp('The second resistor value is = '+string(R2)+' K ohm ');
+
+
+
diff --git a/1757/CH7/EX7.6/EX7_6.sce b/1757/CH7/EX7.6/EX7_6.sce
new file mode 100755
index 000000000..2cd1378dd
--- /dev/null
+++ b/1757/CH7/EX7.6/EX7_6.sce
@@ -0,0 +1,11 @@
+//Example7.6 // to design an active high pass filter with cut-off frequency 10KHz
+clc;
+clear;
+close;
+fc = 10 ; // KHz
+C = 0.01 ; //uF // we assume
+// the cut-off frequency of active high pass filter is given by
+// fc = 2*%pi*R3*C;
+// R3 can be calculated as
+R3 = (1/(2*%pi*fc*C));
+disp('The resistance R3 is = '+string(R3)+' K ohm ');
diff --git a/1757/CH7/EX7.7/EX7_7.sce b/1757/CH7/EX7.7/EX7_7.sce
new file mode 100755
index 000000000..a54cbd232
--- /dev/null
+++ b/1757/CH7/EX7.7/EX7_7.sce
@@ -0,0 +1,18 @@
+//Example7.7 // to design an active high pass filter with cut-off frequency 25KHz
+clc;
+clear;
+close;
+fc = 25 ; // KHz
+C = 0.1 ; //nF // we assume
+// the cut-off frequency of active high pass filter is given by
+// fc = 2*%pi*R3*C;
+// R3 can be calculated as
+R3 = (1/(2*%pi*fc*C));
+disp('The resistance R3 is = '+string(R3)+' ohm ');
+
+// the desire pass band gain of filter is given by
+//Af = 1+(R2/R1);
+// assume that the inverting terminal resistor R2=0.2*R1;
+// in Af equation if we put R2=0.2R1 in R1 R1 cancellout each other
+Af = 1+(0.2)
+disp('The pass band gain is = '+string(Af)+' ');
diff --git a/1757/CH7/EX7.8/EX7_8.sce b/1757/CH7/EX7.8/EX7_8.sce
new file mode 100755
index 000000000..8bd2a8540
--- /dev/null
+++ b/1757/CH7/EX7.8/EX7_8.sce
@@ -0,0 +1,29 @@
+
+//Example7.8 // to design an active high pass filter with cut-off frequency 20KHz
+clc;
+clear;
+close;
+Af = 15 ;
+fc = 20 ; //KHz
+f = 80 ; // KHz the frequency of filter
+C = 0.05 ; //nF // we assume
+// the cut-off frequency of active high pass filter is given by
+// fc = 2*%pi*R3*C;
+// R3 can be calculated as
+R3 = (1/(2*%pi*fc*C));
+disp('The resistance R3 is = '+string(R3*1000)+' K ohm '); // Round Off Error
+
+// the desire pass band gain of filter is given by
+//Af = 1+(R2/R1);
+// assume that the inverting terminal resistor R1=50 K ohm;
+R1 = 50 ; // K ohm
+R2 = (R1*Af)-(R1)
+disp('The resistance R2 is = '+string(R2)+' K ohm ');
+
+// the magnitude of an active high pass filter is given as
+A = Af*(f/fc)/(sqrt(1+(f/fc)^2));
+disp('The magnitude of an active high pass filter is = '+string(A)+' ');
+
+//the phase angle of the filter
+Angle = -atand(f/fc)+atand(%inf);
+disp('The phase angle of the filter is = '+string(Angle)+' degree'); // Round Off Error
diff --git a/1757/CH7/EX7.9/EX7_9.sce b/1757/CH7/EX7.9/EX7_9.sce
new file mode 100755
index 000000000..71e0ce712
--- /dev/null
+++ b/1757/CH7/EX7.9/EX7_9.sce
@@ -0,0 +1,16 @@
+//Example7.9 // to calculate upper and lower cut-off frequency of the band pass filter
+clc;
+clear;
+close;
+R1 = 10*10^3 ; //K ohm
+R2 = 10 ; //K ohm
+C1 = 0.1*10^-6 ; // uF
+C2 = 0.001 ; //uF
+
+// the lower cut-off frequency of band pass filter is
+fLC = 1/(2*%pi*R1*C1);
+disp('The lower cut-off frequency FLC of band pass filter is = '+string(fLC)+' Hz ');
+
+// The upper cut-off frequency of band pass filter is
+fUC = 1/(2*%pi*R2*C2);
+disp('The upper cut-off frequency FUC of band pass filter is = '+string(fUC)+' KHz ');