1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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);
|