blob: ab6e481e11206b16b03512f5ac1947c3d4d5b645 (
plain)
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
|
//chapter 20
//example 20.5
//page 651
clear;
clc ;
//given
Eb=200;//battery voltage mV
es=0;//signal voltage V
Rl=80;//load resistance in ohm
Ed=Eb+es;
Id=2;//diode current mA
Er=(Eb+es);
Il1=Er/Rl;//load current mA
Ib1=Id+Il1;//battery current mA
es=100;//mV
Ed=Eb+es;
Id=1;
Il2=Ed/Rl;
Ib2=Id+Il2;
deitaIl=Il2-Il1;//change in Il
deltaIb=Ib2-Ib1;//change in Ib
es=-100;//mV
Ed=Eb+es;
Id=3;
Il3=Ed/Rl;
Ib3=Id+Il3;
deltaIl= Il3 - Il1;//change in Il
deltaIb=Ib3-Ib1;//change in Ib
//current gain
io=deltaIl;
is=deltaIb;
Ai=io/is;
//op voltage
deltaEr=es;
eo=deltaEr;
//voltage gain
Av=eo/es;
//power gain
Ap=Ai*Av;
printf("\ncurrent gain=%d\nvoltage gain=%d\npower gain=%d",Ai,Av,Ap)
|