summaryrefslogtreecommitdiff
path: root/3682/CH5
diff options
context:
space:
mode:
Diffstat (limited to '3682/CH5')
-rw-r--r--3682/CH5/EX5.1/Ex5_1.sce60
-rw-r--r--3682/CH5/EX5.2/Ex5_2.sce22
-rw-r--r--3682/CH5/EX5.3/Ex5_3.sce33
-rw-r--r--3682/CH5/EX5.4/Ex5_4.sce25
4 files changed, 140 insertions, 0 deletions
diff --git a/3682/CH5/EX5.1/Ex5_1.sce b/3682/CH5/EX5.1/Ex5_1.sce
new file mode 100644
index 000000000..e9cdfade4
--- /dev/null
+++ b/3682/CH5/EX5.1/Ex5_1.sce
@@ -0,0 +1,60 @@
+// Exa 5.1
+
+clc;
+clear;
+
+// Given data
+
+// A comparator as shown in FIg. 5.7(a)
+Aol=50000; // open loop gain of op-amp
+Vz=9; // Volts
+Vd=0.7; // cutoff voltage
+
+// Solution
+
+// case 1
+printf(' Since AOL = ∞ , even a small positive or negative voltage at the input drives the output to +- Vsat. \n This causes Vz1 or Vz2 to break down, giving output voltage vo = +-(Vz+Vd)= ');
+Vsat = Vz+Vd;
+printf(' %.1f V. \n The same is shown in Graphic Window No. 0 \n', Vsat);
+Vi= [-1:0.1:1];
+for i=1:21
+ if(Vi(i)<0)
+ Vo(i)=-Vsat;
+ elseif(Vi(i)==0)
+ Vo(i)=Vsat;
+ else
+ Vo(i)=Vsat;
+
+ end
+ end
+set(gca(),"grid",[1,1]);
+a=gca(); // Handle on axes entity
+a.x_location = "origin";
+a.y_location = "origin";
+plot2d2(Vi,Vo);
+title('Transfer curve for ideal op-amp condition',"color","blue","fontsize",3);
+
+
+// case 2
+
+DellVi = Vsat/Aol; // Zener breaks down after +-Dell_Vi
+scf(1);
+Vi= [-1:0.1:1];
+for i=1:21
+ if(Vi(i)<0)
+ Vo(i)=-Vsat;
+ elseif(Vi(i)==0)
+ Vo(i)=DellVi;
+ else
+ Vo(i)=Vsat;
+
+ end
+end
+set(gca(),"grid",[1,1]);
+a=gca(); // Handle on axes entity
+a.x_location = "origin";
+a.y_location = "origin";
+plot(Vi,Vo,'ro-');
+title('Transfer curve for practical op-amp condition',"color","blue","fontsize",3);
+
+printf(' \n\n Now since, ∇Vi = %.3f mV. The zeners break down after +- %.3f mV \n as shown in the transfer curve depicted in Graphic Windows No. 1',DellVi*1000,DellVi*1000);
diff --git a/3682/CH5/EX5.2/Ex5_2.sce b/3682/CH5/EX5.2/Ex5_2.sce
new file mode 100644
index 000000000..71777492e
--- /dev/null
+++ b/3682/CH5/EX5.2/Ex5_2.sce
@@ -0,0 +1,22 @@
+// Exa 5.2
+
+clc;
+clear;
+
+// Given data
+
+// Circuit of Schmitt trigger
+
+R2=100; // Ohms
+R1=50*10^3; // Ohms
+Vref=0; //Volts
+Vi=1; // peak to peak(Volts)
+Vsat=14;// sSaturation voltage (Volts)
+
+// Solution
+
+printf('Using Equations (5.1) and (5.2), we get calculated values as follows -\n ' );
+Vut=(R2*Vsat)/(R1+R2);
+printf(' Upper threshold voltage (VUT) = %d mV. \n ',round(Vut*1000));
+Vlt=(R2*-Vsat)/(R1+R2);
+printf(' Lower threshold voltage (VLT) = %d mV. \n ',round(Vlt*1000));
diff --git a/3682/CH5/EX5.3/Ex5_3.sce b/3682/CH5/EX5.3/Ex5_3.sce
new file mode 100644
index 000000000..360ede9a5
--- /dev/null
+++ b/3682/CH5/EX5.3/Ex5_3.sce
@@ -0,0 +1,33 @@
+// Exa 5.3
+
+clc;
+clear;
+
+// Given data
+
+// A Schmitt trigger as shown in fig. 5.9- circuit for example 5.3
+
+VUT=0; // Upper threshold(V)
+VH=0.2; // Hysteresis width(V)
+F=1000; // Hz
+Vpp=4; // peak to peak voltage(V)
+
+// Solution
+
+// Since VH=VUT-VLT
+VLT=VUT-VH;
+
+// From fig. 5.9, the angle θ can be calculated as
+// VLT = (Vpp/2)* sin(%pi+ θ);
+// Rearranging above equation
+Theta = asin(VLT/-(Vpp/2)); // in radians
+T= 1/F; // Time period(sec)
+
+// wTθ = 2*%pi*F*Tθ = 0.1
+// Rearranging
+Ttheta= Theta/(2*%pi*F);
+
+T1=T/2 + Ttheta;
+T2=T/2 - Ttheta;
+
+printf('The duration of positive pulse(T1) = %.3f msec and duration of negative pulse(T2) = %.3f msec. \n ',T1*1000,T2*1000);
diff --git a/3682/CH5/EX5.4/Ex5_4.sce b/3682/CH5/EX5.4/Ex5_4.sce
new file mode 100644
index 000000000..3f7828a3b
--- /dev/null
+++ b/3682/CH5/EX5.4/Ex5_4.sce
@@ -0,0 +1,25 @@
+// Exa 5.4
+
+clc;
+clear;
+
+// Given data
+
+// Phase shift oscillator as given in Fig. 5.15
+
+F=100; // Oscillation frequency(Hz)
+
+
+// Solution
+
+printf(' Let C=0.1 microFarads, then from Eq. (5.25) we can get value of R. \n ');
+R = 1/(sqrt(6)*2*%pi*10^-7*F);
+
+printf(' The value of R as calculated = %.2f kΩ. \n ',R/1000);
+
+printf(' To prevent overloading of the amplifier by RC network, R1 <= 10*R. \n');
+R1=10*R;
+printf(' Therefore R1 = %d kΩ. \n ',round(R1/1000));
+// Since Rf = 29*R1;
+Rf= 29*round(R1/1000); // kΩ
+printf(' Since Rf = 29*R1, therefore value of Rf = %d kΩ. \n ',Rf);