summaryrefslogtreecommitdiff
path: root/1757/CH4
diff options
context:
space:
mode:
Diffstat (limited to '1757/CH4')
-rwxr-xr-x1757/CH4/EX4.1/EX4_1.sce23
-rwxr-xr-x1757/CH4/EX4.2/EX4_2.sce15
-rwxr-xr-x1757/CH4/EX4.3/EX4_3.sce15
-rwxr-xr-x1757/CH4/EX4.4/EX4_4.sce16
-rwxr-xr-x1757/CH4/EX4.5/EX4_5.sce17
-rwxr-xr-x1757/CH4/EX4.6/EX4_6.sce17
-rwxr-xr-x1757/CH4/EX4.7/EX4_7.sce17
-rwxr-xr-x1757/CH4/EX4.8/EX4_8.sce19
-rwxr-xr-x1757/CH4/EX4.9/EX4_9.sce17
9 files changed, 156 insertions, 0 deletions
diff --git a/1757/CH4/EX4.1/EX4_1.sce b/1757/CH4/EX4.1/EX4_1.sce
new file mode 100755
index 000000000..752dae98e
--- /dev/null
+++ b/1757/CH4/EX4.1/EX4_1.sce
@@ -0,0 +1,23 @@
+//Example 4.1 // For an op-amp circuit find a) closed loop gain Acl b) input impedance Zin c) output impedance Zo
+clc ;
+clear ;
+close ;
+ro = 85 ; // ohm
+A = 150*10^3 ; // ohm
+R2 = 350*10^3 ; // ohm // Feedback resistance
+R1 = 10*10^3 ; // ohm // Input resistance
+
+// a) closed loop gain
+// ACL = abs(Vo/Vin) = abs(R2/R1)
+ACL = abs(R2/R1) ;
+disp(' closed loop gain of an op-amp is = '+string(ACL)+' '); // 1/beta = ACL
+beta = (1/ACL) ;
+
+// b) the input impedance Zin
+Zin = R1 ;
+disp(' the input impedance Zin = '+string(Zin)+' ohm ');
+
+// c0 the output impedance Z0
+Z0 = (ro)/(1+(beta*A));
+disp(' the output impedance Z0 = '+string(Z0)+' ohm ');
+
diff --git a/1757/CH4/EX4.2/EX4_2.sce b/1757/CH4/EX4.2/EX4_2.sce
new file mode 100755
index 000000000..ba065d5c0
--- /dev/null
+++ b/1757/CH4/EX4.2/EX4_2.sce
@@ -0,0 +1,15 @@
+//Example 4.2 // Determine the differece voltage and open loop gain of an op-amp
+clc ;
+clear ;
+close ;
+V1 = -5 ; // volt // input voltage
+V2 = 5 ; // volt
+Vo = 20 ; //volt // output voltage
+
+// the difference voltage is given by
+ Vd = V2-V1 ;
+disp(' The difference voltage is = '+string(Vd)+' V ');
+
+// open loop gain
+A = (Vo/Vd);
+disp(' The open loop gain is = '+string(A)+' ');
diff --git a/1757/CH4/EX4.3/EX4_3.sce b/1757/CH4/EX4.3/EX4_3.sce
new file mode 100755
index 000000000..285922df0
--- /dev/null
+++ b/1757/CH4/EX4.3/EX4_3.sce
@@ -0,0 +1,15 @@
+//Example 4.3 // Determine the differece voltage and open loop gain of an op-amp
+clc ;
+clear ;
+close ;
+V1 = -5 ; // volt // input voltage
+V2 = 0 ; // volt // GND
+Vo = 20 ; //volt // output voltage
+
+// the difference voltage is given by
+ Vd = V2-V1 ;
+disp(' The difference voltage is = '+string(Vd)+' V ');
+
+// open loop gain
+A = (Vo/Vd);
+disp(' The open loop gain is = '+string(A)+' ');
diff --git a/1757/CH4/EX4.4/EX4_4.sce b/1757/CH4/EX4.4/EX4_4.sce
new file mode 100755
index 000000000..a4c7923fe
--- /dev/null
+++ b/1757/CH4/EX4.4/EX4_4.sce
@@ -0,0 +1,16 @@
+//Example 4.4 // Determine the differece voltage and open loop gain of an op-amp
+clc ;
+clear ;
+close ;
+V1 = 0 ; // volt // input voltage // GND
+V2 = 5 ; // volt
+Vo = 20 ; //volt // output voltage
+
+// the difference voltage is given by
+ Vd = V2-V1 ;
+disp(' The difference voltage is = '+string(Vd)+' V ');
+
+// open loop gain
+A = (Vo/Vd);
+disp(' The open loop gain is = '+string(A)+' ');
+
diff --git a/1757/CH4/EX4.5/EX4_5.sce b/1757/CH4/EX4.5/EX4_5.sce
new file mode 100755
index 000000000..c110fea47
--- /dev/null
+++ b/1757/CH4/EX4.5/EX4_5.sce
@@ -0,0 +1,17 @@
+//Example 4.5 // Determine the differece voltage and open loop gain of an op-amp
+clc ;
+clear ;
+close ;
+V1 = 5 ; // volt // input voltage // GND
+V2 = -5 ; // volt
+Vo = -20 ; //volt // output voltage
+
+// the difference voltage is given by
+ Vd = V2-V1 ;
+disp(' The difference voltage is = '+string(Vd)+' V ');
+
+// open loop gain
+A = (Vo/Vd);
+disp(' The open loop gain is = '+string(A)+' ');
+
+
diff --git a/1757/CH4/EX4.6/EX4_6.sce b/1757/CH4/EX4.6/EX4_6.sce
new file mode 100755
index 000000000..b674c6306
--- /dev/null
+++ b/1757/CH4/EX4.6/EX4_6.sce
@@ -0,0 +1,17 @@
+//Example4.6 // To find closed loop gain and output voltage Vo of an inverting op-amp
+clc;
+clear;
+close;
+R1 = 10 ; //kilo ohm // input resistance
+R2 = 25 ; // kilo ohm // feedback resistance
+Vin = 10 ; //volt // input voltage
+
+// Closed loop gain of an inverting op-amp
+Ac = -(R2/R1) ;
+disp('The Closed loop gain of an inverting op-amp is = '+string(Ac)+' ');
+Ac = abs(Ac);
+disp('The |Ac| Closed loop gain of an inverting op-amp is = '+string(Ac)+' ');
+
+// the output voltage of an inverting op-amp
+Vo = -(R2/R1)*Vin ;
+disp(' The output voltage of an inverting op-amp is = '+string(Vo)+' V ');
diff --git a/1757/CH4/EX4.7/EX4_7.sce b/1757/CH4/EX4.7/EX4_7.sce
new file mode 100755
index 000000000..52ca3b890
--- /dev/null
+++ b/1757/CH4/EX4.7/EX4_7.sce
@@ -0,0 +1,17 @@
+//Example4.7 // To find closed loop gain and output voltage Vo of an non-inverting op-amp
+clc;
+clear;
+close;
+R1 = 10 ; //kilo ohm // input resistance
+R2 = 25 ; // kilo ohm // feedback resistance
+Vin = 10 ; //volt // input voltage
+
+// Closed loop gain of an non-inverting op-amp
+Ac = 1+(R2/R1) ;
+Ac = abs(Ac);
+disp('The Closed loop gain of an non-inverting op-amp is = '+string(Ac)+' ');
+
+// the output voltage of an inverting op-amp
+Vo = (1+R2/R1)*Vin ;
+disp(' The output voltage of an non-inverting op-amp is = '+string(Vo)+' V ');
+
diff --git a/1757/CH4/EX4.8/EX4_8.sce b/1757/CH4/EX4.8/EX4_8.sce
new file mode 100755
index 000000000..b42f577e3
--- /dev/null
+++ b/1757/CH4/EX4.8/EX4_8.sce
@@ -0,0 +1,19 @@
+//Example4.8 // to find out closed loop gain and output voltage Vo
+clc;
+clear;
+close;
+R1 = 10 ; //kilo ohm // input resistance
+R3 = 10 ; //kilo ohm // input resistance
+R2 = 25 ; // kilo ohm // feedback resistance
+R4 = 25 ; // kilo ohm // feedback resistance
+Vin2 = 10 ; //volt // input voltage
+Vin1 = -10 ; //volt // input voltage
+
+// closed loop gain of differntial op-amp is given by
+Ac = (R2/R1) ;
+Ac = abs(Ac);
+disp('The closed loop gain of differntial op-amp is = '+string(Ac)+' ');
+
+// the output voltage of an non-inverting op-amp is given by
+Vo = (R2/R1)*(Vin2-Vin1) ;
+disp('The output voltage of an non-inverting op-amp is= '+string(Vo)+' V ');
diff --git a/1757/CH4/EX4.9/EX4_9.sce b/1757/CH4/EX4.9/EX4_9.sce
new file mode 100755
index 000000000..8526498fa
--- /dev/null
+++ b/1757/CH4/EX4.9/EX4_9.sce
@@ -0,0 +1,17 @@
+// Example4.9 // Determine the non-inverting input voltage
+clc;
+clear;
+close;
+R1 = 10 ; //kilo ohm // input resistance
+R2 = 25 ; //kilo ohm // feedback resistance
+Voh = 10 ; // volt //output voltage
+Vol = -10 ; // volt // output voltage
+
+// upper voltage
+V = (R1/(R1+R2)*Voh) ;
+disp(' The upper voltage is = '+string(V)+' V ');
+
+// Lower voltage
+V = (R1/(R1+R2)*Vol) ;
+disp(' The lower voltage is = '+string(V)+' V ');
+