summaryrefslogtreecommitdiff
path: root/2444/CH4/EX4.1/ex4_1.sce
blob: dd82b5bdc519d7f5e300b3dbb80f3a697aa80351 (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
// Exa 4.1
clc;
clear;
close;
format('v',8)
// Given data
V_CC = 20;// in V
I_C= 2*10^-3;// in A
I_CQ= I_C;// in A
I_E=I_C;// in A
R_C = 3;// in k ohm
R_C = R_C * 10^3;// in ohm
R_L = 12;// in k ohm
R_L = R_L * 10^3;// in ohm
R_E = 2;// in k ohm 
R_E = R_E * 10^3;// in ohm
V_CE=0:0.1:20;// in V
I_C_sat= (V_CC-V_CE)/(R_C+R_E)*10^3;// in mA
subplot(121)
plot(V_CE,I_C_sat);
xlabel("V_CE in volts")
ylabel("I_C in mA")
title("DC load line")
Rac= R_C*R_L/(R_C+R_L);// in ohm
V_CEQ= V_CC-I_CQ*(R_C+R_E);// in V
I_Csat= I_CQ+V_CEQ/Rac;// in A
I_Csat=I_Csat*10^3;// in mA
V_CEoff= V_CEQ+I_CQ*Rac;// in V
subplot(122)
plot([V_CEoff 0],[0,I_Csat])
xlabel("V_CE in volts")
ylabel("I_C in mA")
title("AC load line")
// Maximum peak output signal
POSmax= I_CQ*Rac;// in V
// Peak-to-peak value of output signal
PP_out_sig= 2*POSmax;// in V
disp(PP_out_sig,"Peak-to-peak value of output signal in volts is : ")
disp("DC and AC load line shown in figure.")