Professional Documents
Culture Documents
1 Funded
Book Description
Title: Feedback Circuits And Operational Amplifiers
Author: D. H. Horrocks
Publisher: Chapman And Hall
Edition: 2
Year: 1990
ISBN: 0-412-34270-7
Scilab numbering policy used in this document and the relation to the
above book.
Exa Example (Solved example)
Eqn Equation (Particular equation of the above book)
AP Appendix to Example(Scilab Code that is an Appednix to a particular
Example of the above book)
For example, Exa 3.51 means solved example 3.51 of this book. Sec 2.3 means
a scilab code whose theory is explained in Section 2.3 of the book.
Contents
List of Scilab Codes
12
16
23
25
28
31
2.1
2.2
3.1
3.2
3.3
4.1
4.2
4.3
4.4
5.1
5.2
5.4
5.5
5.6
6.1
6.2
6.4
7.1
7.2
7.4
7.5
8.1
8.2
8.3
9.1
9.2
9.3
feedback fraction . . . . . . . . . . . . . . . . . . . .
Expected variations in closed loop gain . . . . . . . .
Output voltage and gain of two stage amplifier . . .
single stage amplifier parameters . . . . . . . . . . .
Common mode rejection ratio and differential mode
input resistance of a feedback amplifier . . . . . . . .
input resistance of a feedback amplifier . . . . . . . .
parameters of a feedback amplifier . . . . . . . . . .
series voltage feedback circuit . . . . . . . . . . . . .
Voltage shunt feedback circuit . . . . . . . . . . . . .
amplifier parameters . . . . . . . . . . . . . . . . . .
closed loop current gain input output resistance . . .
Voltage shunt feedback circuit . . . . . . . . . . . . .
feed back fraction . . . . . . . . . . . . . . . . . . .
design values of an inverting amplifier . . . . . . . .
gain of a negative feedback amplifier . . . . . . . . .
non inverting amplifier . . . . . . . . . . . . . . . . .
Output voltage . . . . . . . . . . . . . . . . . . . . .
output offset voltage . . . . . . . . . . . . . . . . . .
inverting voltage amplifier . . . . . . . . . . . . . . .
Full power bandwith frequency . . . . . . . . . . . .
basic differential amplifier . . . . . . . . . . . . . . .
Instrumental amplifier . . . . . . . . . . . . . . . . .
wein bridge oscillator . . . . . . . . . . . . . . . . .
Design of phase shifter . . . . . . . . . . . . . . . . .
design of non inverting amplifier . . . . . . . . . . .
low pass second order filter . . . . . . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
5
6
8
9
10
12
12
13
14
16
17
18
20
22
23
23
24
25
25
26
27
28
29
29
31
32
33
Chapter 2
GENERAL PROPERTIES OF
FEEDBACK AMPLIFIERS
=10 )
Af =10
disp ( Af=(A) /(1+Ab ) ) // s t a n d a r d f o r m u l a f o r c l o s e d
loop gain
disp ( b =((A/ Af ) 1) ( 1 /A) )
b =(( A / Af ) -1) *(1/ A )
printf ( The v a l u e o f b i s %f ,b )
// i f , A becomes 900 a n g l e ( 30 d e g r e e s )
A =900* cos ( - %pi /6) + %i *900* sin ( - %pi /6)
disp ( I f , A becomes 900 a n g l e ( 30 d e g r e e s ) )
disp ( Af=(A) /((1+Ab ) ) ) // s t a n d a r d f o r m u l a f o r
closed loop gain
Af =( A ) /((1+ A * b ) )
5
17 r = real ( Af ) //To g e t r e a l p a r t o f Af
18 i = imag ( Af ) //To g e t i m a g i n a r y p a r t o f Af
19 printf ( The v a l u e o f Af i s ( %f )+ i ( %f ) ,r , i ) // t o
d i s p l a y v a l u e o f Af
20 t = tan ( i / r ) // t o g e t a n g l e i n r a d i a n s o f Af
21 t = t *180/ %pi // t o g e t a n g l e i n d e g r e e s
22 m = abs ( Af ) // t o g e t m a g n i t u d e o f Af
23 printf ( \n Af=% f a n g l e ( %f d e g r e e s ) ,m , t )
24 printf ( \n Af = 1 0 . 0 0 4 a n g l e ( 0 .3 2 d e g r e e s ) ) // r o u n d i n g
to 3 d i g i t s
//To c a l c u l a t e t h e e x p e c t e d v a r i a t i o n s i n c l o s e d
loop gain
disp ( Given : )
disp ( Af =10+0.2% o r 10 0.2% ) //To d i s p l a y g i v e n
values
disp ( >Af=10 and dAf / Af =0.2% )
disp ( The a v a i l a b l e a m p l i f i e r s a r e w i t h g a i n s
50 ,500 ,5000 )
disp ( dA/A=20% )
disp ( We have from f o r m u l a )
disp ( dAf / Af =(1/(1+Ab ) ) ( dA/A) ) // s t a n d a r d f o r m u l a
for closed loop gain
disp ( l e t f =0.2%=(dAf / Af ) , a=20%=(dA/A) , k=(1+Ab ) )
disp ( T h e r e f o r e we have : )
Af =10;
printf ( Af=%d\n , Af )
f =0.2/100;
printf ( f=%f\n ,f )
a =20/100;
printf ( a=%f ,a )
disp ( T h e r e f o r e , t h e a b o v e f o r m u l a becomes f =(1/ k ) a
)
6
18 k = a / f
19 printf ( T h e r e f o r e (1=Ab )>=%d , but , A=(1+Ab ) Af ,k )
20 l = k * Af // s t o r e p a r t i a l v a l u e
21 disp ( A>=k Af ) // g i v e n c o n d i t i o n
22 printf ( T h e r e f o r e we g o t t h e v a l u e o f A t o be >=%d
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
,l ) // d i s p l a y v a l u e o f A
printf ( \n T h e r e f o r e A=5000 s a t i s f i e s t h e o b t a i n e d
c o n d i t i o n . T h e r e f o r e A=5000 i s most e c o n o m i c a l )
A =5000
b =(( A / Af ) -1) *(1/ A )
printf ( The v a l u e o f b i s %f ,b )
disp ( P r a t i c a l v a l u e s o f A a r e 4 0 0 0 and 6 0 0 0 , s i n c e
dA/A=(+20%) and A=5000 )
disp ( T h e r e f o r e )
Afmin =(4000/(1+(4000* b ) ) ) // t o p r i n t r e s u l t
Afmax =(6000/(1+(6000* b ) ) ) // t o p r i n t r e s u l t
printf ( Afmin=%1 . 3 f , Afmin )
devAfmin =(1 -( Afmin / Af ) ) *100; // d e v i a t i o n o f Afmin
from Af
printf ( (%1 . 2 f p e r c e n t low ) , devAfmin ) // t o d i s p l a y
d e v i a t i o n from o r i g i n a l v a l u e
printf ( \n Afmax=%2 . 3 f , Afmax )
devAfmax =(1 -( Afmax / Af ) ) *100; // d e v i a t i o n o f Afmax
from Af
dev = abs ( devAfmax ) ; // n e g a t i v e v a l u e o f devAfmax
i n d i c a t e s Afmax i s g r e a t e r t h a n Af by a b s (
devAfmax )
printf ( (%1 . 2 f p e r c e n t h i g h ) , dev ) // t o d i s p l a y
d e v i a t i o n from o r i g i n a l v a l u e
Chapter 3
AMPLIFIERS WITHOUT
FEEDBACK
Scilab code Exa 3.1 Output voltage and gain of two stage amplifier
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// e x a m p l e 1 :
printf ( Given : )
disp ( The v a l u e o f Rin=Rout =100kohms , Rload=1kohm , Kv
=100 ) //To d i s p l a y g i v e n v a l u e s
Rin =100 // a s s i g n i n g g i v e n v a l u e s
Rout =100
Rload =1
Kv =100
disp ( A l l r e s i s t a n c e s a r e i n kohms )
disp ( The w h o l e two s t a g e a m p l i f i e r i s f e d by a
g e n e r a t o r h a v i n g a v o l t a g e o f Eg=1mV when no l o a d
and h a v i n g s e l f r e s i s t a n c e Rg=20kohms )
Eg =(1/1000) // Eg c o n v e r t e d t o v o l t s
Rg =20 // a l l r e s i s t a n c e s a r e i n kohms
disp ( S i n c e a m p l i f i e r s a r e i d e n t i c a l ) // g i v e n
disp ( Rin1=Rin )
disp ( Rin2=Rin )
disp ( Rout1=Rout )
8
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
disp ( Rout2=Rout )
Rin1 = Rin // a s s i g n i n g g i v e n v a l u e s
Rin2 = Rin
Rout1 = Rout
Rout2 = Rout
disp ( Vout2 i s g i v e n by e q u a t i o n )
disp ( Vout2 =(( Eg ) ( Rin1 / ( Rg+Rin1 ) ) ) ( Kv ) ( Rin2 / (
Rout1+Rin2 ) ) ( Kv ) ( Rload / ( Rout2+Rload ) ) )
Vout2 =(( Eg ) *( Rin1 /( Rg + Rin1 ) ) ) *( Kv ) *( Rin2 /( Rout1 + Rin2
) ) *( Kv ) *( Rload /( Rout2 + Rload ) ) // e q u a t i o n f o r Vout2
printf ( T h e r e f o r e Vout2=%f , Vout2 )
disp ( Vin i s g i v e n by e q u a t i o n )
disp ( Vin =(Eg ( Rin1 /Rg+Rin1 ) ) )
Vin =( Eg *( Rin1 /( Rg + Rin1 ) ) ) // E q u a t i o n f o r Vin
disp ( Now o v e r a l l g a i n )
disp ( Av=( Vout2 / Vin ) )
Av =( Vout2 / Vin ) // E q u a t i o n f o r Av
printf ( T h e r e f o r e Vout2=%f and o v e r a l l v o l t a g e g a i n
Av=%f , Vout2 , Av ) //To p r i n t t h e r e q u i r e d v a l u e s .
v o l t a g e c o n t r o l l e d v o l t a g e
source
4 rout =1000; // i n ohms
5 // l o a d r e s i s t a n c e Rload
6 Rload =4000; // i n ohms
7 C2 =50*(10** -12) ; // i n F a r a d s
8 disp ( Vout=Vin ( i n p u t v o l t a g e
c o u p l i n g ) Kv ( o u t p u t
v o l t a g e c o u p l i n g ) );
9 disp ( ( i ) Mid band g a i n ) ;
10 disp ( Av=(Vout / Vin )=Kv ( Rload / ( r o u t+Rload ) ) ) ;
11 Av = Kv *( Rload /( rout + Rload ) ) ;
9
fu /(10**6) ) ; // f u d i v i d e d by 1 0 6 t o c o n v e r t i n t o
MHz
24 printf ( ( i i i ) C o u p l i n g c a p a c i t a n c e C f o r f l t o be 10
Hz i s %1 . 2 f uF\n ,C *(10**6) ) ; // C m u l t i p l i e d by
1 0 6 by c o n v e r t t o m i c r o F a r a d s
Scilab code Exa 3.3 Common mode rejection ratio and differential mode
1
2
3
4
5
6
7
8
9
10
11
disp ( g i v e n : )
disp ( The v o l t a g e g e n e r a t e d by an t r a n s d u c e r which
i s c o n n e c t e d t o d i f f e r e n t i a l a m p l i f i e r i s Vdm=50
mV )
Vdm =50*(1/1000) //Vdm i n v o l t s
disp ( Vcm=5V )
Vcm =5
disp ( Vout s h o u l d be e q u a l t o 10V )
Vout =10
disp ( The unwanted o u t p u t component owing t o t h e
commonmode i n p u t i s t o be l e s s t h a n 1% o f t h e
wanted component i . e Voutcm=1% o f Voutdm )
Voutcm =(1/100) *10
printf ( Voutcm=%f , Voutcm )
10
Adm)=%d , Adm )
disp ( E q u a t i o n ( 1 ) can a l s o be u s e d f o r c a l c u l a t i n g
unwanted o u t p u t component )
disp ( Unwanted c o mp o n e n t s a r i s e when o p e r a t i n g i n
commonmode )
disp ( Acm=Voutcm /Vcm )
Acm = Voutcm / Vcm
printf ( Commonmode g a i n Acm=%f , Acm )
disp ( Now CMRR can be c a l c u l a t e d u s i n g r e l a t i o n )
disp ( CMRR=Adm/Acm )
CMRR = Adm / Acm
printf ( There f o r e CMRR o f a m p l i f i e r s h o u l d be
g r e a t e r t h a n o r e q u a l t o %f , CMRR )
printf ( CMRR&g t ;=%d , CMRR )
11
Chapter 4
FEEDBACK AMPLIFIER
CIRCUITS
f e e d b a c k i s a p p l i e d be
Zif
AB = Av * Bv ;
Zif = Rin *(1+ AB ) ; // Z i f i n Kohms
printf ( RESULTS : \ n ) ;
printf ( I n p u t r e s i s t a n c e a f t e r f e e d b a c k i s a p p l i e d
Z i f=%dKohms , Zif ) ;
12
// i n p u t i m p e d a n c e i n ohms
Rin =10000;
// Trans r e s i s t a n c e i n ohms
Rt =(10) ^(5) ;
// f e e d b a c k f r a c t i o n Bg
Bg =(10) ^( -3) ;
AB = Rt * Bg ;
// i n p u t i m p e d a n c e a f t e r f e e d b a c k i s a p p l i e d Z i f i n
ohms
9 Zif = Rin /(1+ AB ) ;
10 printf ( RESULTS : \ n ) ;
11 printf ( I n p u t i m p e d a n c e a f t e r f e e d b a c k a p p l i e d i s
Z i f=%d Ohms , Zif ) ;
1
2
3
4
5
6
7
8
// Trans r e s i s t a n c e R t f i n Kohms
Rtf =( -10) ;
// g i v e n
R1 =20; // i n Kohms
R2 =5;
Rc =1;
// t r a n s i s t o r p a r a m e t e r s i n kohms
hie =1;
hfe =0.1;
// f e e d b a c k f r a c t i o n Bg
Bg =1/ Rtf ;
R =( - Rtf ) ;
// i n p u t r e s i s t a n c e r i i n ohms
a =( R1 * R2 * hie ) /(( R1 * R2 ) +( R1 * hie ) +( R2 * hie ) ) ;
ri =( a ) ;
// Output r e s i s t a n c e i n ohms
ro =1000* Rc ;
b =( R1 * R2 ) /( R1 + R2 ) ;
// l e t
13
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
i1 =1;
ib = i1 * b /( b + hie ) ;
ic = hfe * ib ;
// o u t p u t v o l t a g e Vo
Vo =( - Rc * ic ) ;
Rt = Vo / i1 *1000;
// Feedback f a c t o r F
F =1+( Rt * Bg ) ;
// c l o s e d l o o p g a i n R t f
Rtf = Rt / F ;
// c l o s e d l o o p i n p u t r e s i s t a n c e r i f
rif = ri / F ;
// c l o s e d l o o p o u t p u t r e s i s t a n c e r o f
rof = ro / F ;
printf ( RESULTS\n ) ;
printf ( c l o s e d l o o p g a i n , R t f=%1 . 2 fKohms \n , Rtf ) ;
printf ( c l o s e d l o o p i n p u t r e s i s t a n c e r i f =%2 . 0 f Ohms\
n ,1000* rif ) ; // i n ohms
37 printf ( c l o s e d l o o p o u t p u t r e s i s t a n c e r o f=%d Ohms ,
rof ) ;
14
// f o r w a r d v o l t a g e g a i n Av
Av =(0.5) * hfe * Rc / hie ;
// f e e d b a c k f a c t o r F
F =(1+ Av * Bv ) ;
// c l o s e d l o o p g a i n Avf
Avf = Av / F ;
// i n p u t r e s i s t a n c e r i
ri =2* hie ;
// i n p u t r e s i s t a n c e a f t e r f e e d back r i f
rif = ri * F ;
// o u t p u t r e s i s t a n c e r o
ro = Rc ;
// o u t p u t r e s i s t a n c e a f t e r f e e d b a c k r o f
rof = ro / F ;
printf ( RESULTS\n ) ;
printf ( ( i ) v o l t a g e a m p l i f i c a t i o n Avf=%1 . 2 f , T h i s
a c c o r d s w i t h t h e p r e v i o u s v a l u e o f Avf=%d\n ,Avf ,
Avf1 ) ;
28 printf ( ( i i ) i n p u t r e s i s t a n c e a f t e r f e e d back r i f =%2
. 1 fKohms \n , rif /1000) ; // t o c o n v e r t ohms t o Kohms
29 printf ( ( i i i ) i n p u t r e s i s t a n c e a f t e r f e e d back r o f=
%dKohms\n , rof ) ; // t o c o n v e r t ohms t o Kohms
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
15
Chapter 5
MORE ABOUT FEEDBACK
AMPLIFIERS
// c a p t i o n : s h u n t v o l t a g e f e e d b a c k c i r c u i t
// e x a m p l e 5 . 1
printf ( Given : ) ;
printf ( R=10 Kohms , \ nR1=20Kohms , \ nR2=5Kohms , \ n h f e
=100Kohms , h i e =1Kohm , \ nRc=1Kohm ) ;
R =10000;
R1 =20000; // i n ohms
R2 =5000;
Rc =1000;
hfe =100;
Bg = -1/ R ;
hie =1000;
printf ( T h e r e f o r e Bg=%1 . 5 f \n , Bg ) ;
printf ( RT=i n p u t c u r r e n t c o u p l i n g f a c t o r h f e
e f f e c t i v e c d o l l e c t o r r e s i s t a n c e \n ) ;
printf ( RT=(R1 | | R2 | | R) / ( ( R1 | | R2 | | R)+h f e ) h f e ( Rc | | R)
\n ) ;
a =( R1 * R2 * R ) /(( R1 * R ) +( R * R2 ) +( R1 * R2 ) ) ;
b =( Rc * R ) /( Rc + R ) ;
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
3
4
5
6
7
8
9
10
11
12
17
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/( Rc + R1 + R2 ) ) / hie ;
C =1+( Av * Bv ) ;
// openl o o p i n p u t r e s i s t a n c e r i
ri = ri1 +( R1 * R2 /( R1 + R2 ) ) ;
// openl o o p o u t p u t r e s i s t a n c e r o
ro = Rc *( R1 + R2 ) /( Rc + R1 + R2 ) ;
// c l o s e d l o o p g a i n , Avf
disp ( c l o s e d l o o p g a i n , Avf=Av/C , where C=1+AvBv ) ;
Avf = Av / C ;
// c l o s e d l o o p i n p u t r e s i s t a n c e , r i f
disp ( c l o s e d l o o p i n p u t r e s i s t a n c e , r i f = r i C ) ;
rif = ri * C ;
// c l o s e d l o o p o u t p u t r e s i s t a n c e , r o f
disp ( c l o s e d l o o p o u t p u t r e s i s t a n c e , r o f=r o /C , where
C=1+AvBv ) ;
rof = ro / C ;
printf ( RESULTS : \ n ) ;
printf ( C l o s e d l o o p g a i n , Avf=%1 . 2 f ( p r e v i o u s l y 5 . 6 6 ) \
n , Avf ) ;
printf ( C l o s e d l o o p i n p u t r e s i s t a n c e , r i f =%2 . 1 f Kohms
( p r e v i o u s l y 3 5 . 3 Kohms ) \n , rif /1000) ; // d i v i d e d by
1 0 0 0 t o c o n v e r t t o Kohms
printf ( C l o s e d l o o p o u t p u t r e s i s t a n c e , r o f=%3 . 0 f Ohms
( p r e v i o u s l y 113 ohms ) \n , rof ) ;
Scilab code Exa 5.4 closed loop current gain input output resistance
1
2
3
4
5
6
7
8
// e x a m p l e 5 . 4
// Shunt c i r c u i t f e e d b a c k c o n f i g u r a t i o n // g i v e n
R1 =10000; // i n ohms
R2 =2000; // i n ohms
Rc1 =5000; // i n ohms
hie =1000; // i n ohms
hfe =100;
18
9 // u n l o a d e d f e e d b a c k f r a c t i o n B1
10 B1 = R2 /( R1 + R2 ) ;
11 disp ( open l o o p f o r w a r d c u r r e n t a m p l i f i c a t i o n A1=i o /
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
i );
iia =1; // l e t
disp ( i b=i n p u t c u r r e n t c o u p l i n g f a c t o r i i a ) ;
disp ( i b =(R1+R2 ) i i a / ( R1+R2+h i e ) ) ;
ib =( R1 + R2 ) * iia /( R1 + R2 + hie ) ;
disp ( V2=( h f e ) ( Rc1 | | r i 2 ) i b ) ;
disp ( r i 2 =h i e +(1+ h f e ) ( R1 | | R2 ) ) ;
ri2 = hie +(1+ hfe ) *( R1 * R2 /( R1 + R2 ) ) ;
V2 =( - hfe ) *( Rc1 * ri2 /( Rc1 + ri2 ) ) * ib ;
disp ( i o /V2=C=h f e / ( h i e +(1+ h f e ) ( R1 | | R2 ) ) ) ;
C = - hfe /( hie +(1+ hfe ) *( R1 * R2 /( R1 + R2 ) ) ) ;
disp ( Open l o o p c u r r e n t g a i n=A1=i o / i =( i b / i ) ( V2/ i b )
( i o /V2 ) ) ;
A1 =( ib / iia ) *( V2 / ib ) *( C ) ;
disp ( Openl o o p i n p u t r e s i s t a n c e , r i =(R1+R2 ) | | h i e ) ;
ri =( R1 + R2 ) * hie /( R1 + R2 + hie ) ;
disp ( Openl o o p o u t p u t r e s i s t a n c e r o a s s e e n by t h e
l o a d r e s i s t a n c e Rc2 i s i n f i n i t e l y l a r g e s i n c e t h e
load i s in s e r i e s with the i n f i n i t e l y l a r g e
c o l l e c t o r r e s i s t a n c e o f the t r a n s i s t o r . );
disp ( C l o s e d l o o p c u r r e n t g a i n , A1f=A1/(1+A1B1 ) ) ;
A1f = A1 /(1+ A1 * B1 ) ;
disp ( A1f ) ;
disp ( C l o s e d l o o p i n p u t r e s i s t a n c e , r i f = r i /(1+A1B1 )
);
rif = ri /(1+ A1 * B1 ) ;
disp ( rif ) ;
disp ( C l o s e d l o o p o u t p u t r e s i s t a n c e , r o f=r o (1+A1B1 ) ,
s i n c e ro i s i n f i n i t e l y large , the r o f i s a l s o
l a r g e i n f i n i t e l y . . );
printf ( RESULTS : \ n\n ) ;
printf ( A1f=%1 . 2 f , \ n\n , A1f ) ;
printf ( r i f =%2 . 1 f ohms , \ n\n , rif ) ; // a p p r o x i m a t e l y
printf ( r o f= i n f i n i t e \n\n ) ;
19
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
// i m p o r t a n t : I n t h i s e x a m p l e r o 1 v a l u e i s
c o n t r a d i c t i n g i n t e x t book , s o m e t i m e s t h e y u s e d 1
K0hm and s o m e t i m e s 4Kohms , t h e c o d e b e l o w u s e d r o 1
=2KOhms a s s p e c i f i e d i n q u e s t i o n
// e x a m p l e 5 . 5
// c a p t i o n : Shunt v o l t a g e f e e d b a c k c i r c u i t
// i n p u t r e s i s t a n c e r i 1
ri1 =1000; // i n ohms
// o u t p u t r e s i s t a n c e r o 1
ro1 =2000; // i n ohms
// t r a n s r e s i s t a n c e Kr
Kr = -10^6; // i n ohms
// Feedback r e s i s t o r R
R =10000; // i n ohms
// c u r r e n t s o u r c e Jg
Jg =0.001; // i n Amps
// s o u r c e i n t e r n a l r e s i s t a n c e r g
rg =2000; // i n ohms
// l o a d r e s i s t a n c e r l
rl =5000; // i n ohms
// u n l o a d e d f e e d b a c k f r a c t i o n
Bg = -1/ R ;
disp ( Unloaded f e e d b a c k f r a c t i o n , Bg=1/R ) ;
disp ( open l o o p g a i n , RTs=Vo/ Jg=i n p u t c u r r e n t
c o u p l i n g f a c t o r Kr o u t p u t v o l t a g e c o u p l i n g f a c t o r
);
RTs =(( rg * R /( rg + R ) ) /( ri1 +( rg * R /( rg + R ) ) ) ) * Kr *(( rl * R /(
rl + R ) ) /( ro1 +( rg * R /( rg + R ) ) ) ) ;
printf ( RTs=%d ohms , RTs /1000) ;
disp ( Openl o o p i n p u t r e s i s t a n c e , r i s =r g | | R | | r i 1 ) ;
ris = rg * R * ri1 /( rg * R + R * ri1 + rg * ri1 ) ;
printf ( \ n r i s =%d ohms , ris ) ;
20
Bg ) ) ;
rifs = ris /(1+ RTs * Bg ) ;
printf ( r i f s =%d Ohms , rifs ) ;
disp ( C l o s e d l o o p o u t p u t r e s i s t a n c e , r o f=r o s /(1+RTs
Bg ) ) ;
rofs = ros /(1+ RTs * Bg ) ;
printf ( r o f s =%2 . 1 f Ohms , rofs ) ;
printf ( RESULTS : \ n ) ;
Vout = RTfs * Jg ;
printf ( \n ( i ) The o u t p u t v o l t a g e=%1 . 2 f V , Vout ) ;
disp ( r i f s = r i f r g / ( r i f +r g )==> r i f =r g r i f s / ( rg r i f s ) )
;
rif = rg * rifs /( rg - rifs ) ;
printf ( \n ( i i ) The i n p u t r e s i s t a n c e s e e n by t h e
a c t u a l s i g n a l s o u r c e i s %2 . 1 f Ohms , rif ) ;
disp ( r o f s =r o f r l / ( r o f+ r l )==>r o f= r l r o f s / ( r l r o f s ) )
;
rof = rl * rofs /( rl - rofs )
printf ( \n ( i i i ) The o u t p u t r e s i s t a n c e s e e n by t h e
l o a d i s %2 . 1 f Ohms , rof ) ;
printf ( ( iV ) The c l o s e d l o o p g a i n o f t h e a m p l i f i e r ) ;
disp ( RTf=Vo/ i 1 , where )
disp ( i 1=c u r r e n t c o u p l i n g f a c t o r Jg=r g Jg / ( r g+ r i f ) )
;
RTf =( rg + rif ) * RTfs / rg ;
printf ( ( iV ) The c l o s e d l o o p g a i n o f t h e a m p l i f i e r
c i r c u i t i s %1 . 2 f Kohms , RTf /1000) ; // d i v i d e d by
1 0 0 0 t o c o n v e r t ohms t o Kohms .
21
// g i v e n
// c u r r e n t g a i n o f t r a n s i s t o r A
A =100;
// u p p e r h a l f power f r e q u e n c y f h
fh =2*(10^6) ; // i n Hz
// c l o s e d l o o p c u r r e n t g a i n A c l
Acl =10;
// band w i d t h BW
BW =10*(10^6) ; // i n Hz
// g a i n bandwidth p r o d u c t ABWp
ABWp = Acl * BW ; // i n Hz
// g a i n bandwidth p r o d u c t o f t r a n s i s t o r ABWpt
ABWpt = A * fh ; // i n Hz
printf ( The g a i n bandwidth p r o d u c t o f t h e t r a n s i s t o r
i s %d ( 1 0 8 ) , which i s g r e a t e r t h e minimum
r e q u i r e d i . e . %d ( 1 0 8 ) and t h e r e f o r e t h e
t r a n s i s t o r i s s u i t a b l e \n , ABWpt /(10^8) , ABWp
/(10^8) )
16 disp ( A c l=A/(1+AB)==&g t ; B =(1/A) (A/ Acl 1) \n ) ;
17 B =(1/ A ) *( A / Acl -1) ;
18 printf ( R e q u i r e d v a l u e o f B i s %1 . 2 f ,B ) ;
22
Chapter 6
THE OP AMPS BASIC
IDEAS AND CIRCUITS
Kohms ,R1 , R2 ) ;
23
gain A
5 R2 =10;
6 // C i r c u i t g a i n i n n e g a t i v e f e e d b a c k Av
7 Av = -( R2 / R1 ) *( A *( R1 /( R1 + R2 ) ) /(1+( A *( R1 /( R1 + R2 ) ) ) ) ) ;
8 printf ( C i r c u i t g a i n Av=%2 . 4 f , Av ) ;
Kohm ,R1 , R2 ) ;
24
Chapter 7
OP AMP NON IDEALITIES
/1000) ; // i n v o l t s
offset
e f f e c t s Vout
25
i s Vout=%d mV , Vout ) ;
g a i n and B=R1/R1+R2 ) ;
3 disp ( When AB&g t ;& g t ; 1 , Av=(R2/R1 )=Av1 ) ;
4 Av1 = Av ;
5 disp ( a b s (A)&g t ;& g t ; 1 + ( R2/R1 )=1+a b s ( Av1 ) ) ;
6 A =1+ abs ( Av1 ) ;
7 disp ( B e c a u s e t h e c r o s s o v e r p o i n t o c c u r s a t a
8
9
10
11
12
13
14
15
16
17
18
19
s i g n i f i c a n t l y h i g h e r f r e q u e n c y t h a n t h e dominant
f r e q u e n c y a t 10 Hz ) ;
disp ( The p h a s e a n g l e o f A i s v e r y c l o s e t o 90
d e g r e e s=%pi /2 r a d i a n s ) ;
disp ( U s i n g t h e j n o t a t i o n t h e g a i n A a t t h e
c r o s s o v e r p o i n t i s e q u a l t o %i 11 ) ;
A = %i *11;
disp ( 1+ a b s ( Av1 ) =(R1+R2 ) /R1 ) ;
Av =( -10) *( A /(1+ abs ( Av1 ) ) ) /(1+( A /(1+ abs ( Av1 ) ) ) ) ;
Av2 = abs ( Av ) ;
M = Av / Av2 ;
printf ( The c l o s e d l o o p g a i n a t t h e c r o s s o v e r
p o i n t i s t h u s r e d u c e d by a f a c t o r %f and
t h e r e f o r e p o i n t c o r r e s p o n d s t o u p p e r h a l f power
f r e q u e n c y which i s 90KHz ,M )
disp ( T h e r e f o r e f h =90KHz , f l =0KHz ) ;
fh =90; // i n KHz
fl =0; // i n KHz
disp ( Bandwidth BW=fh f l ) ;
26
20 BW = fh - fl ;
21 printf ( RESULTS : \ n ) ;
22 printf ( The c l o s e d l o o p bandwidth i s %d KHz , BW ) ;
6
7
8
9
10
27
Chapter 8
SELECTED OP AMP
APPLICATIONS
a m p l i f i e r Adm=(1+(R2/
R1 ) ) /(1+( R3/R4 ) ) \n ) ;
4 printf ( L e t ( R2/R1 )=A and ( R3/R4 )=B\n ) ;
5 printf ( T h e r e f o r e Adm=(1+A) /(1+B) \n ) ;
6 printf ( A=Adm, ) ;
7 printf ( g i v e s B=1/Adm\n ) ;
8 A = Adm ;
9 B =1/ Adm ;
10 printf ( By s u i t a b l e s e l e c t i o n o f r e s i s t o r s
11
12
13
14
15
16
s a y R1=R2
=1 Kohm ) ;
R1 =1; // i n Kohm
R3 =1;
R2 = Adm * R1 ;
R4 = Adm * R3 ;
printf ( \nRESULTS : \ n ) ;
printf ( R e a s o n a b l e s e t o f r e s i s t o r s R1=%d Kohm , R2=%d
Kohms , R3=%d Kohm , R4=%d Kohms . ,R1 , R2 , R3 , R4 ) ;
28
i t r e q u i r e s ( R2/R1 )
=10 Kohms and ( R4/R3 ) =10 Kohms\n )
printf ( T h e r e f o r e i f R1=R3=10 Kohms , t h e n R2=R4=100
kohms \n ) ;
R1 =10; // i n Kohms
R2 =100;
R3 =10;
R4 =100;
printf ( Adm=(1+2(Rb/Ra ) ) R4/R3\n ) ;
printf ( ( Rb/Ra )=B\n ) ;
printf ( Adm=(1+2B) R4/R3\n ) ;
B =(( Adm /( R4 / R3 ) ) -1) /2;
printf ( Rb/Ra=%1 . 1 f \n ,B ) ;
printf ( I f Ra=10 Kohms\n ) ;
Ra =10; // i n kohms
Rb = B * Ra ;
printf ( \nRESULTS : \ n ) ;
printf ( The v a l u e o f r e s i s t o r s a r e R1=%d Kohms , R2=%d
Kohms , R3=%d Kohms , R4=%d Kohms , Ra=%d Kohms , Rb=%d
Kohms ,R1 , R2 , R3 , R4 , Ra , Rb ) ;
29
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
printf ( C a p a c i t a n c e C , R e s i s t a n c e R and F r e q u e n c y f o
a r e r e l a t e d a s CR=1/(2 p i f o ) \n ) ;
printf ( I f CR=A\n ) ;
A =1/(2* %pi * fo ) ;
C =0.01*(10^ -6) ; // i n f a r a d s
R = A / C ; // i n ohms
B = R /1000; // t o c o n v e r t t o Kohms
printf ( Taking C=0.01 m i c r o f a r a d , we g e t R=%1 . 2 f
Kohms\n ,B ) ; // i n Kohms
printf ( Gain o f a noni n v e r t i n g a m p l i f i e r s h o u l d be
3 i . e . Av=1+(R1/R2 ) =3\n ) ;
printf ( T h i s g i v e s ( R1/R2 ) =2 , by s e l e c t i n g R2=10
Kohms , we g e t R1=20 Kohms\n ) ;
R2 =10;
R1 =20; // i n Kohms
printf ( The g a i n must be r e s t r i c t e d b e t w e e n 2 . 8 t o
3 . 2 , by s e l e c t i n g p r o p e r r e s i s t o r s Ra and Rb s u c h
t h a t R1=Ra | | Rb t h i s can be a c h i e v e d . \ n ) ;
printf ( These v a l u e s o f Ra and Rb comes o u t t o be Ra
=22Kohms and Rb=220Kohms\n ) ;
printf ( RESULTS : \ n ) ;
printf ( d e s i g n v a l u e s a r e R=%1 . 2 f Kohms , C=0.01
m i c r o F a r a d , Ra=22 Kohms , Rb=220 Kohms\n ,B ) ;
30
Chapter 9
FURTHER OP AMP
APPLICATIONS
12
13
14
// c a p t i o n : D e s i g n o f p h a s e s h i f t e r
// e x a m p l e 9 . 1
disp ( Given f r e q u e n c y f o =10 KHz , Vrms=5 V, p h i =10
d e g r e e s \n ) ;
disp ( Taking A=C3R4\n ) ;
phi =10; // i n d e g r e e s
fo =1000; // i n Hz
disp ( p h i =1802( a t a n ( 2 %pi f A) ) ) ;
A = tan ((180 -10) * %pi /(180*2) ) /(2* fo * %pi ) ;
printf ( T h e r e f o r e A=C3R4=%f s e c . \ n ,A ) ;
R4 =10000; // l e t ( i n ohms )
printf ( C3 and R4 v a l u e s a r e s e l e c t e d s u c h t h a t
t h e i r p r o d u c t e q u a l s o r g r e a t e r t h a n %f , The
a b o v e v a l u e s a r e p r e f e r a b l e f o r low c o s t and b i a s
c o m p e n s a t i o n ,A ) ;
C3 = A / R4 ;
printf ( \nC3=%f uF , C3 *10^6) ;
disp ( To l o w e r t h e c o s t o f d e s i g n , t h e p r e f e r r e d
v a l u e i s C31 =0.22 uF ) ;
31
18
19
20
21
Good m a t c h i n g t o o b t a i n a c c u r a t e u n i t y g a i n
modulus ) ;
printf ( RESULTS : \ n ) ;
printf ( ( i ) R e s i s t o r s , R1=R2=10Kohms\n ) ;
printf ( ( i i i ) R4=%d Kohms\n , R4 /1000) ; // d i v i d e d by
1 0 0 0 t o d i s p l a y i n Kohms
printf ( ( i i i ) C a p a c i t o r , C3=%1 . 2 f uF\n , C31 ) ;
// c a p t i o n : d e s i g n o f non i n v e r t i n g a m p l i f i e r
// t o d e s i g n a non i n v e r t i n g a m p l i f i e r
// midband g a i n Av
Av =100;
// i n p u t i m p e d a n c e Z i n
Zin =1000000; // i n ohms
// cut o f f f r e q u e n c i e s f l 1 and f l 2
fl1 =10; // i n Hz
fl2 =10; // i n Hz
// From p r o b l e m i t f o l l o w s
R3 = Zin ;
disp ( f l 2 =1/(2 %pi C2R3 ) ) ;
disp ( C2=1/(2 %pi f l 2 R3 ) ) ;
C2 =1/(2* %pi * fl2 * R3 ) ;
disp ( Av=1+(R2/R1 ) ) ;
disp ( B i a s c o m p e n s a t i o n can a l s o be o b t a i n e d by
t a k i n g R2=R3=1MHz ) ;
R2 = R3 ;
disp ( R1=1/(Av1) R2 ) ;
R1 =1/( Av -1) * R2 ;
printf ( R1=%1 . 1 f Kohms , p r e f e r r e d and s t a n d a r d v a l u e
i s 10Kohms\n , R1 /1000) ;
32
21 R = R1 ;
22 R1 =10000; // i n ohms
23 disp ( f l 1 =1/(2 %pi C1R3 ) ) ;
24 disp ( C1=1/(2 %pi f l 1 R3 ) ) ;
25 C1 =1/(2* %pi * fl1 * R1 ) ;
26 printf ( RESULTS : D e s i g n summary \n ) ;
27 printf ( R1=%1 . 1 f Kohms , p r e f e r r e d and s t a n d a r d v a l u e
i s 10Kohms\n ,R /1000) ;
28 printf ( R2=R3=%d Mohm\n , R3 /10**6) ; // d i v i d e d by 1 0 6
t o c o n v e r t t o Mohms
29 printf ( C1=%1 . 2 f uF but s t a n d a r d and p r e f e r r e d v a l u e
i s 2 . 2 uF\n , C1 *(10**6) ) ;
30 printf ( C2=%2 . 1 f nF but s t a n d a r d and p r e f e r r e d v a l u e
i s 22 uF\n , C2 *(10**9) ) ;
// c a p t i o n : low p a s s s e c o n d o r d e r f i l t e r
// t o d e s i g n a low p a s s s e c o n d o r d e r f i l t e r
// s i n c e i t i s b u t t e r w o r t h f i l t e r
Q =1/ sqrt (2) ;
Wo =100; // i n r a d / s e c .
H = -2;
bo = H ;
a1 =1/( Q * Wo ) ;
a2 =1/( Wo **2) ;
printf ( I t i s c o n v e n i e n t t o c h o o s e R=100Kohms\n ) ;
R =100; // i n Kohms
R3 = R ;
R4 = R ;
R1 = R4 /( - bo ) ;
a3 = R3 + R4 +(( R3 * R4 ) / R1 ) ;
C5 =( a1 / a3 ) *(10**6) ; // i n uF
C2 = a2 /( R3 * R4 * C5 ) *(10**9) ; // i n nF
printf ( RESULTS : \ n ) ;
33
19
34