Transistor stands for ‘transfer’ + ‘resistor’, meaning that the basic operation of a transistor is to transfer an input signal from a resistor to another resistor. Transistors are broadly classified into two groups, i.e. Bipolar Junction Transistors (BJTs) and Field Effect Transistors (FETs). The two groups of transistors are further classified as depicted in Figure 3.1.
The (NPN/PNP) BJT is a three‐terminal device formed from two P‐N junctions (like diodes) which share a common (P/N‐type) semiconductor and is widely used for various purposes including amplification and switching.
Figure 3.2(a1)/(a2), (b1)/(b2), and (c1)/(c2) shows the symbols, the basic structures, and the Ebers‐Moll models for NPN/PNP types of BJT, respectively. According to the Ebers‐Moll models, the emitter and collector currents of NPN/PNP‐BJTs are described as
where the typical values of ISE (reverse saturation current of B‐E junction) and ISC = αFISE/αR (reverse saturation current of B‐C junction) are in the order of 10−15∼10−12 and those of αF and αR are as follows:
Note that the forward and reverse saturation leakage currents are the same as each other and the transistor saturation current IS:
We can use these equations to write the relations between the emitter current iE and the collector current iC as
where IEO = (1 − αFαR)ISE/ICO = (1 − αFαR)ISC is the reverse emitter/collector current, which flows through the B‐E/B‐C junction when the junction is highly reverse biased and the collector/emitter terminal is open so that iC = 0/iE = 0, respectively.
Also, we can apply Kirchhoff's Current Law (KCL) to the BJT or the closed surface including its three terminals to write
Noting that the reverse emitter/collector currents IEO/ICO are negligibly small, the relationships among the three currents iC, iE, and iB of NPN‐BJT with vBE ≥ 0.7 (forward biased) and vBC < 0.4 (not forward biased enough) can be written as
According to [H-2], the collector and base currents of an NPN‐BJT can be expressed as
where IS = αFIES, ISC = IS/αR (typically within 10IS), and VA is the Early voltage, whose typical value is 10∼100 V. Here, compared with Eq. (3.1.1), the additional term proportional to vCE/VA has been included to account for the Early effect (also called the base‐width modulation effect) that IS increases as increasing vCE results in a decrease in the effective base width of BJT. Noting that based on these equations, the collector current iC can be expressed in terms of vCE, vBE, and iB as
we can run the following MATLAB script “plot_iC_vs_vCE.m” to plot iC versus vCE (with vBE = 0.7 V) for several values of iB as shown in Figure 3.3 where the (dotted) extrapolation of every iC curve intersects the vCE‐axis at common point vCE = −VA.
Table 3.1 shows the four operation modes (regions) of NPN‐BJT(Si) determined by the bias conditions of B‐E and B‐C junctions. Note the following:
To analyze BJT circuits, we need to define the following parameters for the forward‐/reverse‐active mode:
Table 3.1 Operation modes (regions) of NPN–BJT (Si) with VTD = 0.5 V.
Operation mode | Forward‐active | Cut‐off | Saturation | Reverse‐active | |
Bias condition | B‐E | Forward (vBE ≥ VTD) | Reverse (vBE < VTD) | Forward (vBE ≥ VTD) | Reverse (vBE < 0.4) |
B‐C | Reverse (vBC < 0.4) | Reverse (vBC < 0) | Forward (vBC ≥ 0.4) | Forward (vBC ≥ VTD) | |
Functions | Current‐controlled current source iC = −αFiE, vBE = 0.7 V | Open switch | Closed switch vBE = 0.7 V vCE = 0.2 V | Roles of E and C terminals switched iE = −αRiC |
<CE (Common‐Emitter), forward large‐signal (DC) current gain>
<CB (Common‐Base), forward large‐signal (DC) current gain>
<CE (Common‐Emitter), forward small‐signal (AC or incremental) current gain>
<CB (Common‐Base), forward small‐signal (AC or incremental) current gain>
<CE (Common‐Emitter), reverse large‐signal (DC) current gain>
<CB (Common‐Base), reverse large‐signal (DC) current gain>
Figure 3.4(a) shows a common‐base (CB) NPN‐BJT circuit in which the input is applied to the BEJ (B‐E junction) and the output is available from the BCJ (B‐C junction) so that the base terminal is common between the input and the output. Note that since the BEJ/BCJ are forward/reverse biased, we can expect the BJT to operate in the forward‐active mode (Table 3.1). Also, note that since the BEJ and BCJ are nonlinear resistors, we may have to apply the load line analysis for both the B‐E loop and the B‐C loop.
To perform a comparatively exact analysis considering the nonlinearity of the circuit, we draw the load line on the B‐E characteristic curve (Figure 3.4(b)) where the load line equation can be obtained by applying KVL around the B‐E loop:
The intersection of the load line with the B‐E characteristic curve is the operating (bias) point QE:
where it does not matter which one of many B‐E characteristic curves with different values of vCB is used to determine the operating point because B‐E characteristic curve varies little with vCB. Then we draw the load line on the B‐C characteristic curve (Figure 3.4(c)) where the load line equation can be obtained by applying KVL around the B‐C loop:
The intersection of the load line with the B‐C emitter characteristic curve for −iE = 9.3 mA gives the operating point QC:
To be strict, unless the B‐E characteristic curve varies little with vCB, we should relocate QC with the B‐E characteristic curve for vCB = 5.35 V and repeat the same process iteratively. Then this theoretical analysis becomes time‐consuming even for such a simple circuit. However, as a practical means, when the BEJ (B‐E junction) is surely forward biased, we often set the BEJ voltage as
and instead of performing the load line analysis for the B‐E loop, use Eqs. (3.1.12), (3.1.6c), (3.1.9b), and (3.1.14) together with βF = 186 (BETADC from the PSpice simulation output file or databook) to obtain the following:
Now, to perform the PSpice simulation, we create an OrCAD/PSpice project named, say, “CB_BJT.opj,” compose the schematic as depicted in Figure 3.4(a), make a Simulation Settings dialog box (with Bias Point analysis type) as depicted in Figure 3.4(d), and run it to get the PSpice simulation output some part of which is shown in Figure 3.4(e). The Bias Point analysis result can also be made seen in the schematic (Figure 3.4(a)) by clicking on the ‘Enable Bias Voltage Display’ and ‘Enable Bias Current Display’ buttons in the tool bar above the Schematic Editor window.
Figure 3.5(a) shows a common‐emitter (CE) NPN‐BJT circuit in which the input is applied to the BEJ (B‐E junction) and the output is available from the CEJ (C‐E junction) so that the emitter terminal is common between the input and the output. Note that we can expect the BJT to operate in the forward‐active mode since the BEJ/BCJ are forward/reverse biased (Table 3.1).
To perform a comparatively exact analysis considering the nonlinearity of the circuit, we do the following:
Most often, as a more practical means instead of the load line analysis, we use Eqs. (3.1.6c), (3.1.18), and (3.1.19) together with βF = 184 (BETADC from the PSpice simulation output file or databook) to obtain the following:
Whichever of the graphical or analytical methods we may use, we need to check if vCE > 0.3 V so that the BJT will not enter the saturation mode. If vCE turned out to be not greater than 0.3 V, then we would have to set vCE = vCE,sat = 0.2 V and use Eq. (3.1.19) to find the collector current iC.
Now, to perform the PSpice simulation, we create an OrCAD/PSpice project named, say, “CE_BJT.opj,” compose the schematic as depicted in Figure 3.5(a), make a Simulation Settings dialog box (with Bias Point analysis type) as depicted in Figure 3.4(d), and run it to get the PSpice simulation result as shown in Figure 3.5(c), which is a part of the PSpice simulation output file that can be seen by selecting View>Output_File from the top menu bar. The Bias Point analysis result can also be made seen in the schematic (Figure 3.5(a)) by clicking on the ‘Enable Bias Voltage Display’ and ‘Enable Bias Current Display’ buttons in the tool bar above the Schematic Editor window.
Figure 3.6(a)/(b)/(c)/(d) shows the large‐signal (DC) models of an NPN‐BJT for the forward‐active/saturation/reverse‐active/cut‐off modes, respectively. Figure 3.7(a) shows a typical (DC driven) BJT biasing circuit. Figure 3.7(b)/(c)/(d) shows its equivalents with the BEJ biasing side replaced by its Thevenin equivalent and with the BJT replaced by its model in the forward‐active/saturation/reverse‐active mode, respectively.
The above MATLAB function ‘BJT_DC_analysis()
’ can be used to analyze NPN‐BJT biasing circuits (driven by DC sources) and find the values of VB,Q, VE,Q, VC,Q, IB,Q, IE,Q, and IC,Q (voltages/currents at/through the base, emitter, and collector terminals) at the operating point. Note the following about its usage:
Likewise, the above MATLAB function ‘BJT_PNP_DC_analysis()
’ has been composed to analyze typical (DC driven) PNP‐BJT biasing circuits.
Instead of the (linear) large‐signal model as in Figure 3.6, the exponential model of an NPN‐BJT based on Eq. (3.1.7) (with VA = ∞ to exclude the Early effect) can be used to write KVL equations in vBE and vBC along the two paths VCC‐RC‐CBJ‐BEJ‐RE‐VEE and VCC‐RC‐CBJ‐RB‐VBB (for the NPN‐BJT circuit in Figure 3.8(a)) as
where
Also, KVL equations in vEB and vCB can be written along the two paths VEE‐RE‐EBJ‐BCJ‐RC‐VCC and VBB‐RB‐BCJ‐RC‐VCC (for the PNP‐BJT circuit in Figure 3.8(b)) as
where
The following MATLAB function ‘BJT_DC_analysis_exp()
’ can be used to analyze an NPN‐BJT biasing circuit (based on the exponential model) and find the values of VB,Q, VE,Q, VC,Q, IB,Q, IE,Q, and IC,Q (voltages/currents at/through the base, emitter, and collector terminals) at the operating point. Note the following about ‘BJT_DC_analysis_exp()
’:
beta
.beta
is expected to be given as [±βF βR IS].Consider the three‐BJT circuit in Figure 3.16(a) where the device parameters of the BJTs Q1, Q2, and Q3 are βF = 100, βR = 1, and Is = 10−14 A in common.
First, noting that the Q1‐Q2 part of the circuit is identical to the circuit of Figure 3.15(a), we copy all the analysis results of Example 3.7 except for VC2, because the current through RC2 decreases from IC2 by IB3. To find IB3, we assume that Q3 also operates in the forward‐active mode (with vBE3 = 0.7 V) and write the KVL equation (in IB3) along the path RC2‐vBE3‐RE3 as
which can be solved for IB3 as
Thus, we can find
Now we check if Q2 and Q3 operate in the forward‐active region:
This implies that Q2 and Q3 operate in the forward‐active region.
BJT_DC_analysis()
’ for the analysis of the Q3 part.
Regarding Q3 as driven by the Thevenin equivalent consisting of VBB3 = VC20 = RC2IC2 (with Q3 unconnected) and RB3 = RC2, we run the following MATLAB statements for the analysis of the Q3 (NPN‐BJT) part:
>>VCC3=10; RC2=3e3; IC2=1.27e-03; % From the solution of Example 3.7
VBB3=RC2*IC2; RB3=RC2; RC3=0; RE3=5e3; betaF=100; betaR=1;
BJT_DC_analysis(VCC3,VBB3,RB3,RC3,RE3,[betaF betaR]);
to get the following analysis result for the Q3 part:
VCC VEE VBB VBQ VEQ VCQ IBQ IEQ ICQ
10.00 0.00 3.81 3.79 3.09 10.00 6.12e-06 6.18e-04 6.12e-04
in the forward-active mode with VCE,Q= 6.91[V],
Alternatively, we can use the exponential model to set up the KVL equations (in vBE1, vBC1, vEB2, vCB2, vBE3, and vBC3) along the six paths VCC1‐RC1‐vCB1‐RB1‐VBB1, VBB1‐RB1‐vBE1‐RE1, VCC1‐RC1‐vBC2‐RC2, VEE2‐RE2‐vEB2‐vBC2‐RC2, VCC3‐vCB3‐RC2, and VCC3‐vCB3‐vBE3‐RE3 as
This set of nonlinear equations in an unknown vector v = [vBE1 vBC1 vEB2 vCB2 vBE3 vBC3] can be solved by using the MATLAB function ‘fsolve()
’ as shown in the following script “elec03e08.m”:
%elec03e08.m
betaF=100; betaR=1; alphaR=betaR/(betaR+1); Is=1e-14; Isc=Is/alphaR; VT=25e-3; % BJT parameters
VCC1=10; VEE2=10; VCC3=10;
R1=127e3; R2=127e3; RC1=1e3; RE1=1.5e3; RE2=1e3; RC2=3e3; RC3=0; RE3=5e3;
VBB1=VCC1*R2/(R1+R2); RB1=parallel_comb([R1 R2]);
% Exponential model based approach
iC=@(v)Is*exp(v(1)/VT)-Isc*exp(v(2)/VT);
iB=@(v)Is/betaF*exp(v(1)/VT)+Isc/(betaR+1)*exp(v(2)/VT);
% Eq. (E3.8.8) with v=[vBE1 vBC1 vEB2 vCB2 vBE3 vBC3]
eq=@(v)[VCC1-VBB1+v(2)-RC1*(iC(v(1:2))-iB(v(3:4)))+RB1*iB(v(1:2));
VBB1-RB1*iB(v(1:2))-v(1)-RE1*(iC(v(1:2))+iB(v(1:2)));
VCC1+v(4)-RC1*(iC(v(1:2))-iB(v(3:4)))– RC2*(iC(v(3:4))-iB(v(5:6)));
VEE2-v(3)+v(4)-RE2*(iC(v(3:4))+iB(v(3:4)))−RC2*(iC(v(3:4))-iB(v(5:6)));
VCC3+v(6)-RC2*(iC(v(3:4))-iB(v(5:6)));
VCC3+v(6)-v(5)-RE3*(iC(v(5:6))+iB(v(5:6)))];
options=optimset('Display','off','Diagnostics','off');
v0 = [0.7; 0.4; 0.7; 0.4; 0.7; 0.4]; % Initial guess for v
v = fsolve(eq,v0,options);
VBE1=v(1), VBC1=v(2), VEB2=v(3), VCB2=v(4), VBE3=v(5), VBC3=v(6)
IB1Q = iB(v(1:2)), IC1Q = iC(v(1:2))
IB2Q = iB(v(3:4)), IC2Q = iC(v(3:4))
IB3Q = iB(v(5:6)), IC3Q = iC(v(5:6))
VC1Q = VCC1-RC1*(IC1Q-IB2Q), VB1Q=VC1Q+VBC1, VE1Q=VB1Q-VBE1
VE2Q = VEE2-RE2*(IC2Q+IB2Q), VB2Q=VE2Q-VEB2, VC2Q=VB2Q+VCB2
VC3Q = VCC3-RC3*IC3Q, VB3Q=VC3Q+VBC3, VE3Q=VB3Q-VBE3
A part of the results obtained from running this script is as follows:
IC1Q=0.0020, IC2Q=0.0014, IC3Q=6.7745e-4
VC1Q=VB2Q=7.9907, VB1Q=3.7155, VE1Q=3.0647
VC2Q=VB3Q=4.0446, VE2Q=8.6315
VC3Q=10, VE3Q=3.4211
We draw the PSpice schematic (Figure 3.16(b)) where the device parameters of the NPN‐BJTs Q1, Q3 (QbreakN), and PNP‐BJT Q2 (QbreakP) have been set in the PSpice Model Editor window as shown in Figure 3.14(b2). The simulation results obtained by performing Bias Point analysis are shown in the schematic.
Consider the two‐BJT circuit in Figure 3.17(a) where the device parameters of the BJTs Q1 and Q2 are βF = 100, βR = 1, and Is = 10−14 A in common.
First, as done in Example 3.7, we assume that Q1 operates in the forward‐active region (with vBE1 = 0.7 V) and try to find IB1, IC1, IE1, VE1, VC1, etc. as
Since this implies that Q1 may be in the saturation mode, we assume vCE1 = 0.2 V (referring to Example 3.6), write the KCL equation (in VC1) at Q1, and solve it to find
where IB2 has been assumed to be small enough to make iRC1 ≈ IC1.
Although we can proceed further in this way to find VC2, why not use the MATLAB functions ‘BJT_DC_analysis()
’/‘BJT_PNP_DC_analysis()
’ to analyze the Q1/Q2 part, respectively? As done in Example 3.7b, we run the following MATLAB statements:
>>betaF=100; betaR=1; VCC1=10; VEE2=10;
R1=10e3; R2=10e3; RC1=1.8e3; RE1=1.32e3; RE2=20e3; RC2=19.8e3;
[VB1,VE1,VC1,IB1,IE1,IC1,mode1]=...
BJT_DC_analysis(VCC1,R1,R2,RC1,RE1,[betaF betaR]);
VBB2=VEE2-RC1*IC1; RB2=RC1;
[VB2,VE2,VC2,IB2,IE2,IC2,mode2]=...
BJT_PNP_DC_analysis(VEE2,VBB2,RB2,RE2,RC2,[betaF betaR]);
to get
VCC VEE VBB VBQ VEQ VCQ IBQ IEQ ICQ
10.00 0.00 5.00 4.87 4.17 4.37 2.67e-05 3.16e-03 3.13e-03
in the saturation mode with VCE,Q= 0.20[V]
VEE VCC VBB VBQ VEQ VCQ IBQ IEQ ICQ
10.00 0.00 4.37 4.37 5.07 4.87 7.56e-07 2.47e-04 2.46e-04
in the saturation mode with VEC,Q= 0.20[V]
Alternatively, as done in Example 3.7b, we can use the exponential model to set up a set of KVL equations (in vBE1, vBC1, vEB2, and vCB2) and solve it by running the following MATLAB script:
%elec03e09.m
clear
betaF=100; betaR=1; alphaR=betaR/(betaR+1);
Is=1e-14; Isc=Is/alphaR; VT=25e-3; % BJT parameters
VCC1=10; VEE2=10;
R1=10e3; R2=10e3; RC1=1.8e3; RE1=1.32e3; RE2=20e3; RC2=19.8e3;
VBB1=VCC1*R2/(R1+R2); RB1=parallel_comb([R1 R2]);
iC = @(v)Is*exp(v(1)/VT)-Isc*exp(v(2)/VT);
iB = @(v)Is/betaF*exp(v(1)/VT)+Isc/(betaR+1)*exp(v(2)/VT);
eq=@(v)[VCC1-VBB1+v(2)-RC1*(iC(v(1:2))-iB(v(3:4)))+RB1*iB(v(1:2));
VBB1-RB1*iB(v(1:2))-v(1)-RE1*(iC(v(1:2))+iB(v(1:2)));
VCC1+v(4)-RC1*(iC(v(1:2))-iB(v(3:4)))-RC2*iC(v(3:4));
VEE2-v(3)+v(4)-RE2*(iC(v(3:4))+iB(v(3:4)))-RC2*iC(v(3:4))];
options=optimset('Display','off','Diagnostics','off');
v0 = [0.7; 0.4; 0.7; 0.4]; %Initial guess for v=[vBE1 vBC1 vEB2 vCB2]
v = fsolve(eq,v0,options);
VBE1=v(1), VBC1=v(2), VEB2=v(3), VCB2=v(4)
IB1Q = iB(v(1:2)), IC1Q = iC(v(1:2))
IB2Q = iB(v(3:4)), IC2Q = iC(v(3:4))
VC1Q=VCC1-RC1*(IC1Q-IB2Q), VB1Q=VC1Q+VBC1, VE1Q=VB1Q-VBE1
VE2Q = VEE2-RE2*(IC2Q+IB2Q), VB2Q=VE2Q-VEB2, VC2Q=VB2Q+VCB2
vCE1Q = VC1Q-VE1Q, vEC2Q = VE2Q-VC2Q
IC1Q=0.0031, IC2Q=2.4564e-04
VC1Q=VB2Q=4.3742, VB1Q=4.8377, VE1Q=4.1759, VE2Q=4.9730, VC2Q=4.8637
vCE1Q = 0.1983, vEC2Q = 0.1093
We draw the PSpice schematic as Figure 3.17(c) and perform the Bias Point analysis to get the simulation results shown in the schematic.
Figure 3.18(a)/(b) shows the high/low frequency small‐signal (AC) models of an NPN‐BJT for the forward‐active mode, respectively, where
For the analysis of BJT circuits, the following three steps are taken where Table 3.2 shows the notations representing the DC/AC components and total solutions:
|
Table 3.2 Symbols representing DC and AC variables
DC components at operating point Q | AC components | DC + AC components | |||
Instantaneous values | r.m.s. values | Instantaneous values | r.m.s. values | ||
Base current | IB,Q | ib | Ib | iB | IB |
Voltage across C‐E junction | VCE,Q | vce | Vce | vCE | VCE |
To see how the above procedure can be applied, let us consider the BJT circuit in Figure 3.19.1(a) where the roles of the three capacitors are as follows:
Note that Cs and CL are called coupling or blocking capacitors while CE is called a bypass capacitor. Whatever they are called, all of the capacitors are commonly supposed to provide a very large/small impedance (or reactance XC = 1/ωC) for DC(ω = 0)/AC(ω > 0) signals like being virtually open (XC = ∞)/short(XC = 0)‐circuited where ω represents the frequency of the input signal.
Now, along the procedure listed in the above box, we take the following steps:
>>VCC=10; betaF=180; betaR=6;
R1=104000; R2=104000; RC=200; RE=[50 250];
BJT_DC_analysis(VCC,R1,R2,RC,RE,[betaF,betaR]);
VCC VEE VBB VBQ VEQ VCQ IBQ IEQ ICQ
10.00 0.00 5.00 2.90 2.20 8.54 4.05e-005 7.32e-003 7.28e-003
in the forward-active mode with VCE,Q= 6.35
function [VBQ,VEQ,VCQ,IBQ,IEQ,ICQ,Av,Ai,Ri,Ro,gm,rbe,ro]=
BJT_CE_analysis(VCC,rb,Rs,R1,R2,RC,RE,RL,beta,Vsm,VA,T)
% Vsm = Amplitude of the AC input signal applied to base terminal through Cs
% Copyleft: Won Y. Yang, [email protected], CAU for academic use only
if nargin<12, T=27; end % Ambient temperature
if nargin<11, VA=1e4; end % Early voltage
l_beta=length(beta); % bF may have been given as [betaF betaR betaAC Is]
if l_beta<3, betaAC=beta(1); bF=beta; % bF=[betaF betaR]
else betaAC=beta(3); bF=beta(1:2); if l_beta>3, bF=[bF beta(4)]; end
end
[VBQ,VEQ,VCQ,IBQ,IEQ,ICQ,mode]=BJT_DC_analysis(VCC,R1,R2,RC,RE,bF);
RE1=RE(1);
if R1>20, RB=parallel_comb([R1 R2]); else RB=R2; end % R1=VBB?
[gm,rbe,re,ro]=gmrbero_BJT(ICQ,betaAC,VA,T);
if Rs==0, Rs=0.01; end
RCL= parallel_comb([RC RL]);
if RE1>=1
Y=[(1+gm*rbe)/(rb+rbe)+1/RE1+1/ro -1/ro; % gm*rbe=betaAC
-1/ro-gm*rbe/(rb+rbe) 1/ro+1/RCL];
vec = Y[1+gm*rbe;-gm*rbe]/(rb+rbe); % Eq. (3.1.39a)
Av=vec(2);
else
Av=-gm*rbe/(rb+rbe)*parallel_comb([ro RCL]); % Eq. (3.1.39b)
end
RbeE = rb+rbe+(betaAC+1)*RE1;
Ri = parallel_comb([RB RbeE]); % Eq. (3.2.1)
Ro = parallel_comb([RC ro]); % Eq. (3.2.4)
Ai = -betaAC*RC/(RC+RL); % Eq. (3.2.2)
Gv=Av/(Rs/Ri+1); % Eq. (3.1.40)
if nargin>9 & abs(Vsm)>0
Ibm = Vsm/(Rs+RbeE);
if Ibm>=IBQ, fprintf(' Possibly crash into the cutoff region since
Ibm(%6.2fuA)>IBQ(%6.2fuA) ',Ibm*1e6,IBQ*1e6); end
if abs(Gv*Vsm-(1+betaAC)*Ibm*RE1)>=VCQ-VEQ-0.3 % Eq. (3.1.47)
fprintf(' Possibly violate the saturation region since |Av*Vsm-
(1+betaAC)*Ibm*RE1(%5.2f)|>VCQ-VEQ-0.3(%5.2f) ',
abs(Av*Vsm-(1+betaAC)*Ibm*RE1), VCQ-VEQ-0.3);
end
end
fprintf(' Ri=%9.3f[kOhm], Ro=%8.0f[Ohm] Gv=Ri/(Rs+Ri)xAv = %6.3fx%
8.2f =%8.2f ', Ri/1e3,Ro,1/(Rs/Ri+1),Av,Gv);
function [gm,rbe,re,ro]=gmrbero_BJT(ICQ,beta,VA,VT)
if VT>0.1, VT=(273+VT)/11605; end % considering VT as T
gm=abs(ICQ)/VT; rbe=beta/gm; re=rbe/(beta+1); ro=VA/abs(ICQ); %(3.1.26-28)
If we assume that R1, R2, and ro are so large (compared with other resistors) as to be negligible as parallel elements, we can approximate the AC equivalent as Figure 3.19.1(d) so that we can write the (small‐signal) base current ib, collector current ic, and output voltage vo as
The DC/AC analysis procedure, which has been cast into the MATLAB function ‘BJT_CE_analysis()
’ listed above, can be carried out by running the following statements:
>>VCC=10; Vsm=0.02; rb=10; betaF=180; betaR=6; betaAC=194;
Rs=50; R1=104000; R2=104000; RC=200; RE=[50 250]; RL=10000;
BJT_CE_analysis(VCC,rb,Rs,R1,R2,RC,RE,RL,[betaF betaR betaAC],Vsm);
This yields the following result that conforms with that obtained above:
gm= 281.664[mS], rbe= 689[Ohm], ro= 1373[kOhm]
Gv=Ri/(Rs+Ri)xAv = 0.994 x -3.64 = -3.62
Figure 3.20(a), (b), and (c) shows the PSpice schematic of the BJT circuit in Figure 3.19.1(a), its simulation result of the input/output voltage waveforms, and a part of simulation output file containing the netlist and the bias (operating) point information, respectively. Note that the voltage gain can be computed from the ratio between the negative/positive peak values of input/output signals shown in the Probe Cursor box as
where the negative sign indicates a phase shift of 180° between the input and the output.
Now, consider the following question:
Won’t the voltage gain and/or the linear input‐output relationship be changed when the amplitude (vsm) of the AC input voltage vs increases?
To find out the answer to this question, let us make a soft experiment of increasing vsm to 0.3 V, 1 V, and 1.5 V. The PSpice simulation results are depicted in Figure 3.21(a), (b), and (c), which show that the upper part of the output voltage waveform is distorted for vsm = 1 V and both the upper and lower parts of the output voltage waveform are distorted for vsm = 1.5 V. (This explains the meaning of ‘small‐signal’, illustrating that the small‐signal analysis result based on the linear approximation is valid only within a certain range of the input signal.) Why is that? To understand why the upper and/or lower parts of the output voltage waveform to large inputs are distorted, we should use the load line analysis by drawing the DC load line to determine the operating point Q and drawing the AC load line at the operating point Q (see Figure 3.22(a)) if there exists a (bypass) capacitor (like CE) connected in parallel with the emitter resistor RE2 (see Figure 3.19.1(a) or 3.20(a)).
Note that the equations of the DC/AC load lines are obtained by applying KVL through VCC‐RC‐vCE‐RE as
where the bypass capacitor CE is assumed to have a negligibly small reactance 1/ωCE like a short‐circuit for the input signal frequency ω and the (negative) emitter current −iE is assumed to be (almost) equal to the collector current iC since the base current is negligibly small compared with the collector/emitter currents.
Note also that the AC input moves the instantaneous operating point along the AC load line around the quiescent operating point Q, i.e. the intersection of the DC load line and the CE characteristic curve corresponding to the base current iB determined by the DC biasing circuit. With this background knowledge, Figure 3.22(a) together with b‐d shows how iC (the collector current) and vCE (the collector‐to‐emitter voltage) vary with the variation of iB due to the AC signal. About Figure 3.22, there are several observations to make:
vsm (V) | VCC (V) | R1 (kΩ) | R2 (kΩ) | RC (Ω) | RE1 (Ω) | RE2 (Ω) | IB,Q (μA) | IC,Q (mA) | VCE,Q (V) | Remark | |
(1) | 1.5 | 10 | 104 | 104 | 200 | 50 | 250 | 40 | 7.37 | 6.3 | Cutoff, Sat |
(2) | 1.5 | 10 | 104 | 104 | 200 | 200 | 250 | 32.1 | 5.83 | 6.19 | Cutoff |
(3) | 1.5 | 10 | 104 | 104 | 200 | 200 | 100 | 40 | 7.37 | 6.3 | Normal |
(4) | 1.5 | 10 | 104 | 104 | 400 | 200 | 100 | 40.4 | 7.31 | 4.87 | Normal |
The PSpice simulation results of the circuit in Figure 3.19.1(a) or 3.20(a) are depicted in Figure 3.23, which supports the observations stated above. Figure 3.23(a1)/(b1) shows the simulation results and load line analysis for the circuit with RC = 200 Ω, RE1 = 50 Ω, and RE2 = 250 Ω, respectively. Figure 3.23(a2)/(b2) shows the simulation results and load line analysis for the circuit with RC = 200 Ω, RE1 = 200 Ω, and RE2 = 250 Ω, respectively, supporting the observation that increasing RE1 (with the voltage gain Av decreased) will move the operating point Q left downwards, but will decrease the maximum variations of vce and ic more abruptly so that the possibility of the BJT to trespass on the saturation region and/or crash into the cutoff region can decrease. Figure 3.23(a3)/(b3) shows the simulation results and load line analysis for the circuit with RC = 200 Ω, RE1 = 200 Ω, and RE2 = 100 Ω, respectively, supporting the observation that decreasing RE2 (with the voltage gain Av unaffected) will move the operating point Q right upwards so that the possibility of the BJT to trespass on the saturation region and/or crash into the cutoff region can decrease. Figure 3.23(a4)/(b4) shows the simulation results and load line analysis for the circuit with RC = 400 Ω, RE1 = 200 Ω, and RE2 = 100 Ω, respectively, implying that increasing RC may increase the voltage gain Av without trespassing on the saturation region or crashing into the cutoff region thanks to the increase of linearity margin secured by increasing RE1 and decreasing RE2.
Can the possibility of a BJT to trespass on the saturation region or crash into the cutoff region be predicted by the MATLAB function ‘BJT_CE_analysis()
’? Let us try it for the above four cases:
>>VCC=10; Vsm=1.5; rb=10; betaF=180; betaR=6; betaAC=194;
Rs=50; R1=104e3; R2=104e3; RC=200; RE=[50 250]; RL=1e4; % (1)
BJT_CE_analysis(VCC,rb,Rs,R1,R2,RC,RE,RL,[betaF betaR betaAC],Vsm);
VCC VEE VBB VBQ VEQ VCQ IBQ IEQ ICQ
10.00 0.00 5.00 2.90 2.20 8.54 4.05e-05 7.32e-03 7.28e-03
in the forward-active mode with VCE,Q= 6.35
gm= 281.664[mS], rbe= 689[Ohm], ro= 1373[kOhm]
Possibly crash into the cutoff region
Possibly violate the saturation region
Gv=Ri/(Rs+Ri)xAv = 0.994 x -3.64 = -3.62
>>Rs=50; R1=104e3; R2=104e3; RC=200; RE=[200 250]; RL=1e4; % (2)
BJT_CE_analysis(VCC,rb,Rs,R1,R2,RC,RE,RL,[betaF betaR betaAC],Vsm);
VCC VEE VBB VBQ VEQ VCQ IBQ IEQ ICQ
10.00 0.00 5.00 3.32 2.62 8.84 3.22e-05 5.83e-03 5.80e-03
in the forward-active mode with VCE,Q= 6.22
gm= 224.360[mS], rbe= 865[Ohm], ro= 1724[kOhm]
Possibly crash into the cutoff region
Gv=Ri/(Rs+Ri)xAvo = 0.998 x -0.95 = -0.95
>>Rs=50; R1=104e3; R2=104e3; RC=200; RE=[200 100]; RL=1e4; % (3)
BJT_CE_analysis(VCC,rb,Rs,R1,R2,RC,RE,RL,[betaF betaR betaAC],Vsm);
VCC VEE VBB VBQ VEQ VCQ IBQ IEQ ICQ
10.00 0.00 5.00 2.90 2.20 8.54 4.05e-05 7.32e-03 7.28e-03
in the forward-active mode with VCE,Q= 6.35
gm= 281.664[mS], rbe= 689[Ohm], ro= 1373[kOhm]
Gv=Ri/(Rs+Ri)xAv = 0.998 x -0.96 = -0.96
>>Rs=50; R1=104e3; R2=104e3; RC=400; RE=[200 100]; RL=1e4; % (4)
BJT_CE_analysis(VCC,rb,Rs,R1,R2,RC,RE,RL,[betaF betaR betaAC],Vsm);
VCC VEE VBB VBQ VEQ VCQ IBQ IEQ ICQ
10.00 0.00 5.00 2.90 2.20 7.09 4.05e-05 7.32e-03 7.28e-03
in the forward-active mode with VCE,Q= 4.89
gm= 281.664[mS], rbe= 689[Ohm], ro= 1373[kOhm]
Gv=Ri/(Rs+Ri)xAv = 0.998 x -1.88 = -1.88
For the four cases, the MATLAB function ‘BJT_CE_analysis()
’ seems to have worked well in terms of its prediction about the possibility of the BJT to be saturated or cut off.
Now, to find the DC power of the BJT for the last case by using MATLAB, run the following MATLAB statements:
>>[VBQ,VEQ,VCQ,IBQ,IEQ,ICQ,Av]=BJT_CE_analysis(VCC,rb,Rs,R1,R2,RC,RE,
RL, [betaF betaR betaAC],Vsm);
>>PQ_DC=(VCQ-VEQ)*ICQ+(VBQ-VEQ)*IBQ % DC power of BJT Q
PQ_DC= 0.0356 % 35.6mW
The instantaneous (DC + AC) power of the BJT can easily be found as depicted in Figure 3.24(b2) by running the PSpice schematic (Figure 3.24(a2)) with a power (W) marker placed at the center of the device. Why is the instantaneous power pQ(t) always below the DC power PQ,DC =35.6 mW of BJT? It is because vce ic < 0 (Figure 3.24(b1)) so that the AC power of the BJT is negative, implying that the BJT Q is acting as an AC source (active element) supplying an AC power to the other parts.
Consider the circuit of Figure 3.25(a) where the BJT Q1 is said to be diode‐connected’ or ‘connected in diode configuration’ since its collector and base terminals are short‐circuited so that it behaves like a diode. Why is a BJT used as a diode? It is for efficiency of fabricating integrated circuit (IC) with matched devices. For proper operation of the circuit, the two BJTs Q1 and Q2 must be matched in the sense that they have identical current gains (αF,βF) and characteristic curves.
Let us analyze the circuit of Figure 3.25(a), which is called a current mirror because the currents of the two matched BJTs sharing the same vBE are equal. Assume that the voltage sources V1 and V2 forward‐bias the B‐E junctions and reverse‐bias the B‐C junctions (vBC < 0.4) of both BJTs to let them operate in the forward‐active mode so that vBE1 = vBE2 = 0.7 V and
Noting that the voltage at node 1 (the lump of terminals C1‐B1‐B2) is vBE1 = 0.7 V, we apply KCL at the node to write
which yields the output current as
This is supported by the PSpice simulation result (with Bias Point analysis) listed in Figure 3.25(a), which shows that the current iC2 supplied by the current mirror is constant as about 1.4 mA for different values of V2 and, therefore, the current mirror can be used as a current source.
Let us analyze the circuit of Figure 3.25(b), which is also called a circuit mirror because the currents of the two matched BJTs Q1 and Q2 are equal. Assume that the voltage sources V1 and V2 forward‐bias the B‐E junctions and reverse‐bias the B‐C junctions (vBC < 0.4) of the three BJTs to let them operate in the forward‐active mode so that vBE1 = vBE2 = vBE3 = 0.7 V and
Noting that the voltage at node 1 (the lump of terminals E3‐B1‐B2) is vBE1 = 0.7 V and the voltage at node 2 (the lump of terminals C1‐B3) is vBE1 + vBE3 = 1.4 V, we can write
This yields the output current as
This is supported by the PSpice simulation result (with Bias Point analysis) listed in Figure 3.25(b), which shows that the current iC2 supplied by the current mirror is constant as about 1.35 mA for different values of V2 and, therefore, the current mirror can be used as a current source.
Let us compare the sensitivities of iC2 w.r.t. βF for the two current sources:
This implies that the current mirror (b) has smaller sensitivity of the output current iC2 w.r.t. βF (roughly proportional to ) compared with that of the current mirror (a) (roughly proportional to ).
Now, to analyze the 3‐BJT current mirror (Figure 3.26(a)) and that with R replaced by a current source I (Figure 3.26(b)) by using the exponential model, we apply KCL at nodes 1 and 2 to write
where iCk(vBEk, vBCk) and iBk(vBEk, vBCk) are defined by Eqs. (3.1.23a,b), and iEk(·,·) = iBk(·,·) + iCk(·,·) for all k. The following MATLAB function ‘BJT3_current_mirror()
’ solves the set of Eqs. (3.1.62a,b) for circuit (a) or Eqs. (3.1.62a,c) for circuit (b) depending on whether the value of the third input argument R is greater than or equal to 1 or not. It returns the output current io = iC2 and v = [v1 v2] for possibly several values of V2 (given as the second to last elements of the fourth input argument V12). For instance, we can solve the circuit of Figure 3.25(b) to get io for V1 = 15 V and V2 = {1, 5, 10, 20, 40} by running the following MATLAB statements:
>>R=1e4; Is=1e-14; io=BJT3_current_mirror([100 1],Is,R,[15 1 5 10 20 40])
function [io,vs]=BJT3_current_mirror(betaF,Is,R,V12,VT)
% Analyze a current mirror consisting of 3 BJTs and an R or I-source
% If R<1, it will be regarded as a current source I=R.
% Copyleft: Won Y. Yang, [email protected], CAU for academic use only
if nargin<5, VT=(273+27)/11605; end % Thermal voltage
if length(betaF)<2, betaR=1; else betaR=betaF(2); betaF=betaF(1); end
if length(Is)<2, VA=inf; else VA=Is(2); Is=Is(1); end
V1=V12(1); if length(V12)>1, V2s=V12(2:end); else V2s=V12; end
alphaR=betaR/(betaR+1); Isc=Is/alphaR; % Collector-Base saturation current
options=optimset('Display','off','Diagnostics','off');
iC = @(v)Is*exp(v(1)/VT)-Isc*exp(v(2)/VT); % Eq. (3.1.23a) with v=[vBE vBC]
iB = @(v)Is/betaF*exp(v(1)/VT)+Isc/(betaR+1)*exp(v(2)/VT); % Eq. (3.1.23b)
iE = @(v)Is*(1+1/betaF)*exp(v(1)/VT)-Isc*betaR/(betaR+1)*exp(v(2)/VT);
for n=1:length(V2s)
V2=V2s(n);
if R>=1 % Eq. (3.1.62a,b) with a resistor
eq=@(v)[iE([v(2)-v(1) v(1)-V1])-iB([v(1) v(1)-v(2)])-iB([v(1) v(1)-V2]);
V1-v(2)-R*(iB([v(2)-v(1) v(2)-V1])+iC([v(1) v(1)-v(2)]))];
else I=R; % Eq. (3.1.62a,c) with a current source
eq=@(v)[iE([v(2)-v(1) v(2)-V1])-iB([v(1) v(1)-v(2)])-iB([v(1) v(1)-V2]);
I-iB([v(2)-v(1) v(2)-V1])-iC([v(1) v(1)-v(2)])]*1e3;
end
v0=[0.7 0.4]; % Initial guess
v=fsolve(eq,v0,options); vs(n,:)=v; io(n)=iC([v(2) v(2)-V2]);
end
Figure 3.27(a1)/(a2) shows the PSpice schematics of BJT inverter for Transient/DC_Sweep analysis. Figure 3.27(b1) shows the input and output voltage waveforms of the inverter (obtained from the Transient analysis) where the input 1(high)/0(low) drives the BJT into the saturation/cutoff mode so that the output vo = vCE can go to logic 0(low)/1(high) with high‐to‐low/low‐to‐high propagation delay tpHL/tpLH that are defined as the times between the 50% input and 50% output.
Note that in order for the BJT to go back and forth between the saturation and cutoff modes, the collector current iC,sat in the saturation mode should be less than βF times the base current iB:
This condition can easily be satisfied by taking a small RB and a large RC. But the following should be noted:
Figure 3.27(b2) shows the input(vi)‐output(vo) relationship, called the VTC (voltage transfer characteristic), of the inverter (obtained from the DC Sweep analysis). In the VTC, the output low/high levels VOH/VOL are defined as the minimum/maximum values of output vo corresponding to logic 1/0, respectively and VIH/VIL are defined as the minimum/maximum values of input vs that can be interpreted as logic 1/0, respectively, where VIL/VOH are the input/output at point A with slope of −1 and VIH/VOL are the input/output at point B with slope of −1. Also, we define the midpoint M as the intersection of the VTC and line vo = vi, which can be thought of as the boundary at which the inverter switches its output from one state to the other.
Figure 3.28(a) shows a practical VTC together with an ideal VTC. As measures of how much the gate can tolerate the variation of signal levels without causing any erroneous logical state, Figure 3.28(b1)/(b2) shows the high and low noise margins for practical/ideal VTCs where the high and low noise margins are defined as
What are the physical meanings of the high/low noise margins? As can be seen in Figure 3.28(b1) or (b2), the high/low noise margin means how much the high(1)/low(0) signal can decrease/increase without being mistaken for a low(0)/high(1) signal by the next‐stage (load) gate (the same kind of inverter), i.e. without misleading (mistakenly driving) the load inverter into the cutoff/saturation mode like a low/high voltage. The absolute noise margin is defined as the smaller of the two noise margins:
Note that the noise immunity measured by the absolute noise margin is maximized by the ideal VTC with abrupt switching at VIL = VIH = (VOL + VOH)/2, which has maximum logic swing from V(0) to V(1), but no transition region.
To analyze the BJT inverter circuit in Figure 3.27(a1) by using the exponential model, we can apply KVL around the two meshes to write
where iC(vBE, vBC) and iB(vBE, vBC) are defined by Eqs. (3.1.23a,b).
function [VIL,VIH,VOL,VOH,VM,NML,NMH,Pavg,vo1,iC1]=... BJT_inverter(betaF,Is,RB,RC,VCC,vi1,VT)
% Plot the VTC of a BJT inverter (with no output argument)
% which consists of an NPN-BJT and resistors RB/RC between vi/VCC and B/C.
% Copyleft: Won Y. Yang, [email protected], CAU for academic use only
if nargin<7, VT=(273+27)/11605; end % Thermal voltage
if length(betaF)<2, betaR=1; else betaR=betaF(2); betaF=betaF(1); end
alphaR=betaR/(betaR+1); Isc=Is/alphaR; % CB saturation current
dvi=5e-3; vis=[0:dvi:VCC]; vCE_sat=0.2;
options=optimset('Display','off','Diagnostics','off');
iC = @(v)Is*exp(v(1)/VT)-Isc*exp(v(2)/VT); % Eq. (3.1.23a) with v=[vBE vBC]
iB = @(v)Is/betaF*exp(v(1)/VT)+Isc/(betaR+1)*exp(v(2)/VT); % Eq. (3.1.23b)
for n=1:length(vis)
vi = vis(n);
if vi>=0.4 % v = [vBE vBC]
eq = @(v)[vi-v(1)-RB*iB(v); VCC-RC*iC(v)+v(2)-v(1)]; % Eq. (3.1.66)
if ~exist('v'), v0=[0.7 0.4]; else v0=v; end % Initial guess
v = fsolve(eq,v0,options);
vos(n)=v(1)-v(2); iCs(n)=(VCC-vos(n))/RC; % Eqs. (3.1.67),(3.1.66b)
else vos(n)=VCC; iCs(n)=0; % Cutoff mode
end
end
[VIL,VIH,VOL,VOH,VM,NML,NMH,VL,Pavg]=... find_pars_of_inverter(vis, vos,iCs,VCC);
if nargout==0|nargin<6
plot(vis,vos,[VIL VM VIH],[VOH VM VOL],'ro');
end
if nargin>5 % If you want vo1 for vi1
for i=1:length(vi1)
[dmin,imin]=min(abs(vis-vi1(i)));
vo1(i)=vos(imin); iC1(i)=iCs(imin);
end
else vo1=vos; iC1=iCs;
end
function [VIL,VIH,VOL,VOH,VM,NML,NMH,VL,Pavg]=...
find_pars_of_inverter(vis,vos,is,Vs,VH)
if nargin<5, VH=Vs; end % Highest output voltage
dvs=abs(diff(vis)); dv=min(dvs(find(dvs>1e-6)));
[pks,locs]=findpeaks(1./abs(diff([vos(1) vos])+dv));
[pks,inds]=sort(pks,'descend'); inds1=locs(inds(1:2));
[VLH,inds2]=sort(vis(inds1)); % Points with slope=-1
VIL=VLH(1); VIH=VLH(2); VOH=vos(inds1(inds2(1))); VOL=vos(inds1(inds2(2)));
NML = VIL-VOL; NMH = VOH-VIH; % Eq. (3.1.64)
[em,imin]=min(abs(vis-vos)); VM=vis(imin); % Midpoint
[em,imin]=min(abs(vis-VH)); VL=vos(imin); % Virtual lowest output
Pavg=Vs*mean([max(is) min(is)]); % Average power for on-off periods
Once we solve this set of equations to find vBE and vBC for a given value of the input voltage vi, we can find the output voltage vo as
The process of solving Eq. (3.1.66) to find vo for vi = 0~VCC, finding VIL,VIH,VOL, VOH, and VM, and plotting vo versus vi has been cast into the above MATLAB function ‘BJT_inverter()
’. We can run the following script “plot_VTC_BJT_inverter.m” (which uses ‘BJT_inverter()
’)
%plot_VTC_BJT_inverter.m
VCC=5; RB=1e4; RC=1e3;
betaF=180; betaR=6; Is=1e-14;
[VIL,VIH,VOL,VOH,VM,NML,NMH,Pavg]=...
BJT_inverter([betaF betaR],Is,RB,RC,VCC)
to get the VTC as shown in Figure 3.28(a) and the inverter parameter values as
VIL = 0.565, VIH= 0.990, VOL= 0.151, VOH= 4.971, VM= 0.920
NML = 0.414, NMH= 3.981, VL = 0.031
Pavg= 12.423[mW]
Figure 3.29(a) shows an emitter‐coupled (in the sense that the emitter terminals of the two BJTs are connected) or differential (in the sense that its output varies with the differential input vd = vBE1 − vBE2) pair. To analyze this circuit, we assume that both BJTs operate in the forward‐active mode so that we can use Eq. (3.1.1b) to write their approximate collector/emitter currents as
Then their ratios can be approximately written as
Also, we apply KCL at the node E1‐E2 to write
Combining Eqs. (3.1.69) and (3.1.70) yields the expression of each collector current as
where these collector currents are depicted in Figure 3.29(b). Then we can write the (differential) output voltage as
This differential output voltage vo, together with vo1 and vo2, is shown in Figure 3.29(c). From Figure 3.29 and Eqs. (3.1.71a,b) and (3.1.72), note the following:
To analyze the BJT differential pair circuit in Figure 3.29(a), we can apply KCL at nodes 1, 2, and 3 to write
where iCk(vBEk, vBCk) and iBk(vBEk, vBCk) are defined by Eqs. (3.1.23a,b). The process of solving this set of equations to find v = [v1 v2 v3] for vd = −Vdm~Vdm and plotting vo = v1 − v2, iC1, iC2 (together with their analytic values computed by Eqs. (3.1.72,74) versus vd has been cast into the following MATLAB function ‘BJT_differential()
’. We can run
>>betaF=100; betaR=1; Is=1e-14; IEE=10e-3; RC=1e3; VCC=12;
BJT_differential([betaF betaR],Is,IEE,RC,VCC);
to get the graphs of iC1, iC2, and vo as shown in Figure 3.29(b) and (c).
function [vo1s,vo2s,iC1s,iC2s]=BJT_differential(betaF,Is,IEE,RC,VCC,Vdm)
% Analyze an NPN-BJT differential (emitter-coupled) pair
% (to find the outputs vo1/vo2 to a range of differential input vd=-Vdm~Vdm
% and plot its VTC in case of no output argument)
% which consists of 2 NPN-BJTs, 2 resistors RC1=RC2=RC, and an I-src IEE.
% Copyleft: Won Y. Yang, [email protected], CAU for academic use only
VT=(273+27)/11605; % Thermal voltage
if nargin<6, Vdm=4*VT; end
dvd=Vdm/100; vds=[-Vdm:dvd:Vdm]; % Differential input
if length(betaF)<2, betaR=1; else betaR=betaF(2); betaF=betaF(1); end
alphaF=betaF/(1+betaF); alphaR=betaR/(betaR+1);
Isc=Is/alphaR; % Collector-Base saturation current
options=optimset('Display','off','Diagnostics','off');
iC = @(v)Is*exp(v(1)/VT)-Isc*exp(v(2)/VT); % Eq. (3.1.23a) with v=[vBE vBC]
iE = @(v)Is*(1+1/betaF)*exp(v(1)/VT)-Isc*betaR/(betaR+1)*exp(v(2)/VT);
for n=1:length(vds)
vd = vds(n);
eq=@(v)[VCC-v(1)-RC*iC([vd-v(3) vd-v(1)])
VCC-v(2)-RC*iC([0-v(3) 0-v(2)])
iE([vd-v(3) vd-v(1)])+iE([0-v(3) 0-v(2)])-IEE]; % Eq. (3.1.75)
if ~exist('v'), v0=[VCC VCC/2 -0.7]; else v0=v; end % Initial guess
v = fsolve(eq,v0,options);
vo1s(n)=v(1); vo2s(n)=v(2); vos(n)=v(1)-v(2); % Eq. (3.1.72)
iC1s(n)=iC([vd-v(3) vd-v(1)]); iC2s(n)=iC([-v(3) -v(2)]);
end
iC1s_a=alphaF*IEE./(1+(exp(-vds/VT))); % Eq. (3.1.71a)
iC2s_a=alphaF*IEE./(1+(exp(vds/VT))); % Eq. (3.1.71b)
if nargout==0
subplot(211)
plot(vds,iC1s,'g', vds,iC2s,'r', vds,iC1s_a,'k:', vds,iC2s_a,'b:')
legend('iC1','iC2','iC1_a','iC2_a'); xlabel('v_d'); ylabel('i_C');
vos_a=(exp(-vds/VT)-1)./(1+exp(-vds/VT))*alphaF*IEE*RC; % Eq. (3.1.72)
subplot(212) plot(vds,vos,'g', vds,vo1s,'r', vds,vo2s, vds,vos_a,'k:')
legend('vo','vo1','vo2','vo_a'); xlabel('v_d'); ylabel('v_o');
end
This section deals with several configurations of BJT amplifier, i.e. the CE (common‐emitter) amplifier, the CC (common‐collector) amplifier (called an emitter follower), the CB (common‐base) amplifier, and cascaded or compound multistage amplifier.
Figure 3.30 shows a CE amplifier and its low‐frequency AC equivalent (which is the same as Figure 3.19.1(d)) where the BJT has been replaced by the equivalent in Figure 3.18(b), and the biasing resistances R1||R2 and BJT output resistance ro are assumed to be so large as to be negligible as parallel resistors. Let us find the input resistance, current gain, voltage gain, and output resistance.
To find the input resistance, i.e. the equivalent resistance seen from the source side, we apply KVL for the left mesh (denoted in a gray closed curve) with RB = R1||R2 neglected to write
This yields the input resistance as
The output current io through the load resistor RL can be expressed as
Thus, the current gain, i.e. the ratio of the output current io to the input current ii = ib is
The overall voltage gain, i.e. the ratio of the output voltage vo to the source voltage vs is
To find the (Thevenin) equivalent resistance seen from the load side, we need to remove the (independent) voltage source vs by short‐circuiting it. Then no current flows of itself so that we have ib = 0, vbe = 0, and ic = 0 even if a test voltage or current source is applied to the output port. Therefore, the output resistance turns out to be
This AC analysis process to find Ri, Ro, Ai, and Av has been included in the MATLAB function ‘BJT_CE_analysis()
’ presented in Section 3.1.8. If a current source supplying a BJT with its DC emitter current IE,Q is given instead of the biasing circuit as depicted in Figure 3.31(a), the following MATLAB function ‘BJT_CE_analysis_I()
’ can be used for the AC analysis.
function [Av,Ai,Ri,Ro,gm,rbe,ro,vsm,vom]=...
BJT_CE_analysis_I(Rs,RB,RC,RE,RL,IEQ,beta,VA,T,vbem)
% To analyze CE amplifier biased by IEQ
% beta = [betaAC rb] if a nonzero base resistance is given.
% If the 10th input argument vbem (maximum vbe such that the BJT operated
% in the linear region) is given, the following outputs will be returned.
% vsm = Max amplitude of vs ensuring the linear operation of BJT.
% vom = Max amplitude of vo when the BJT operates in the linear operation.
% Copyleft: Won Y. Yang, [email protected], CAU for academic use only
if nargin<9, T=27; end % Ambient temperature
if nargin<8, VA=1e4; end % Early voltage
if length(beta)>1, rb=beta(2); beta=beta(1); else rb=0; end
if length(RB)>1, RB=parallel_comb(RB); end
if sum([Rs RB RC RE RL rb]<0), error('Resistance must be positive!'); end
ICQ = IEQ*beta/(beta+1); % Collector current at the bias point
[gm,rbe,re,ro]=gmrbero_BJT(ICQ,beta,VA,T);
RbeE = rbe + (beta+1)*RE(1);
Ri = parallel_comb([RB RbeE]); % Eq. (3.2.1)
Ro = parallel_comb([RC ro]); % Eq. (3.2.4)
Ai = -beta/(1+RL/RC); % Eq. (3.2.2)
Avo = -beta*Ro/RbeE; % Eq. (3.2.3) with neither RL nor ro
Av = Avo/(Ro/RL+1); % Eq. (3.2.3) with RL, but without considering ro
Gv = Av/(Rs/Ri+1); % Taking Rs into consideration
if nargout<1
fprintf(' gm=ICQ/VT=%8.3f[mS], re=1/gm=%6.0f[Ohm], rbe=beta/gm=
%6.0f [Ohm], ro=VA/ICQ=%7.2f[kOhm] ', gm*1e3,re,rbe,ro/1e3);
fprintf(' Ri=RB||RbeE=%8.2f kOhm, Ro=RC||ro=%6.0f Ohm', Ri/1e3,Ro);
fprintf(' Av=-beta*Ro/RbeE x RL/(Ro+RL) =%8.2f x%5.2f =%8.2f
Gv=Ri/(Rs+Ri)xAv =%5.3f xAv =%8.2f ', Avo,RL/(Ro+RL),Av,Ri/(Rs+Ri),Gv);
end
if nargin<10, vbem = NaN; end
vsm=(Rs/Ri+1)*RbeE/rbe*vbem; vom=abs(Gv)*vsm;
We can use the values of β, rb, rbe, and ro obtained in Section 3.1.8 (Eqs. (3.1.35‐38)) for the AC analysis as follows:
This AC analysis can also be done by using the MATLAB function ‘BJT_CE_analysis()
’ although the results will be slightly different since ro is taken into consideration in the MATLAB function:
>>VCC=10; Vsm=0.02; rb=10; betaF=180; betaR=6; betaAC=194;
Rs=50; R1=104000; R2=104000; RC=200; RE=[50 250]; RL=10000;
BJT_CE_analysis(VCC,rb,Rs,R1,R2,RC,RE,RL,[betaF betaR betaAC],Vsm);
Running these MATLAB statements yields
Results of analysis using the PWL model
with betaF= 180, betaR= 6.0
and R1= 104.00[kOhm], R2= 104.00[kOhm], RC= 200[Ohm], RE=300[Ohm]
VCC VEE VBB VBQ VEQ VCQ IBQ IEQ ICQ
10.00 0.00 5.00 2.90 2.20 8.54 4.05e-05 7.32e-03 7.28e-03
in the forward-active mode with VCE,Q= 6.35[V]
where beta_forced = ICQ/IBQ = 180.00 with beta = 180.00
gm= 281.664[mS], rbe= 689[Ohm], ro= 1373.39[kOhm]
Ri= 8.701 kOhm, Ro= 200 Ohm
Gv=Ri/(Rs+Ri)xAvoxRL/(Ro+RL) = 0.994 x -3.71 x 0.980 = -3.62
Since the circuit of Figure 3.31(b) is the same as that of Figure 3.19.1(a) or 3.30(a) dealt with in (a) (except for the current source I) and the value of the current source for biasing the BJT is equal to the DC emitter current IE,Q = 7.32 mA (obtained in Section 3.1.8), we will get the same AC analysis results as in part (a) by using the MATLAB function ‘BJT_CE_analysis_I()
’ (without having to do the DC analysis):
>>VCC=10; Vsm=0.02; rb=10; betaAC=194;
Rs=50; RB=52000; RC=200; RE=[50 250]; RL=10000; IEQ=7.32e-3;
BJT_CE_analysis_I(Rs,RB,RC,RE,RL,IEQ,[betaAC rb]);
Running these MATLAB statements yields
gm=ICQ/VT= 281.710[mS], re=1/gm= 4[Ohm], rbe=beta/gm= 689[Ohm], ro=VA/ICQ= 1373.16[kOhm]
Ri=RB||RbeE= 8.700 kOhm, Ro=RC||ro= 200 Ohm
Av=-beta*Ro/RbeE x RL/(Ro+RL) = -3.71 x 0.98 = -3.64
Gv=Ri/(Rs+Ri)xAv =0.994 xAv = -3.62
The theoretical values of Ri, Ro, and Av are close to not only those for the circuit of Figure 3.19.1(a) calculated in (a) but also those obtained from the PSpice simulation as shown in Figure 3.31(c):
Figure 3.32 shows a CC amplifier and its low‐frequency AC equivalent where the BJT has been replaced by the equivalent in Figure 3.18(b) and the BJT output resistance ro is assumed to be so large as to be negligible as a parallel resistor. Let us find the input resistance, current gain, voltage gain, and output resistance.
To find the input resistance from the relationship between vi = vb and ii, we express the voltages at nodes e and b in terms of ib as
This yields the equivalent resistance Rb seen from terminals b‐G as
so that we can write the input resistance (including RB = R1||R2) as
The output current io through the load resistor RL can be expressed as
Thus, the current gain, i.e. the ratio of the output current io to the input current ii = ib is
The voltage gain (with Rs = 0) is
The overall voltage gain, i.e. the ratio of the output voltage vo to the source voltage vs is
where Ri is given by Eq. (3.2.5). This implies that if Rs ≪ Ri and rb + rbe ≪ (β + 1)(RE||RL), the output voltage is almost equal to the source voltage and that is why the CC amplifier is called an emitter follower or buffer amplifier.
function [VBQ,VEQ,VCQ,IBQ,IEQ,ICQ,Av,Ai,Ri,Ro,gm,rbe,ro]=...
BJT_CC_analysis(VCC,rb,Rs,R1,R2,RC,RE,RL,beta,Vsm,VA,T)
% R1,R2 can be replaced by VBB,RB if VBB-RB is connected to the base.
% If beta=[betaF betaR betaAC], large-signal model-based analysis
% If beta=[betaF betaR betaAC Is], the exponential model-based analysis
% Copyleft: Won Y. Yang, [email protected], CAU for academic use only
if nargin<12, T=27; end % Ambient temperature
if nargin<11, VA=1e4; end % Early voltage
if sum([rb Rs R1 R2 RC RE RL]<0), error('Resistance must be positive!'); end
l_beta=length(beta);
if l_beta<3, betaAC=beta(1); bF=beta; % bF=[betaF betaR]
else betaAC=beta(3); bF=beta(1:2); % bF=[betaF betaR betaAC ..]
if l_beta>3, bF=[bF beta(4)]; end % bF=[betaF betaR betaAC Is]
end
[VBQ,VEQ,VCQ,IBQ,IEQ,ICQ,mode]=BJT_DC_analysis(VCC,R1,R2,RC,RE,bF);
if strcmp(mode,'forward-active')==0
fprintf(' AC analysis is impossible in BJT_CC_analysis()
because the BJT is in the saturation mode! ');
Av=NaN; Ai=NaN; Ri=NaN; Ro=NaN; gm=NaN; rbe=NaN; ro=NaN;
return;
end
RE1=RE(1);
if R1>20, RB=parallel_comb([R1 R2]); else RB=R2; end % R1=VBB?
if RE1<1, error('RE1 of CC amplifier (e-follower) may not be zero!'); end
[gm,rbe,re,ro]=gmrbero_BJT(ICQ,betaAC,VA,T);
RsB=parallel_comb([Rs RB]);
RELo=parallel_comb([RE RL ro]);
betaRELo=(betaAC+1)*RELo; rbebetaRELo=rb+rbe+betaRELo;
Av=betaRELo/rbebetaRELo; % Eq. (3.2.7a)
RbeEL = rb+rbe+(betaAC+1)*REL;
REpRL = RE1*RL_Av/(RE1+RL_Av);
if nargin>9 & abs(Vsm)>0
Ibm = Vsm/Rs/rbebetaRELo/(1/Rs+1/RB+1/rbebetaRELo);
if Ibm>=IBQ, fprintf(' Possibly crash into the cutoff region '); end
if abs(Gv*Vsm)>=VCQ-VEQ-0.2 % Eq. (3.1.47)
fprintf(' Possibly violate the saturation region ');
end
end
Ri=parallel_comb([RB RbeEL]); % Eq. (3.2.5)
Ro=parallel_comb([RE1 (RsB+rb+rbe)/(betaAC+1)]); % Eq. (3.2.8)
Ai=(betaAC+1)*RB*RE1/((RB+rb+rbe)*(RE1+RL)+(betaAC+1)*RE1*RL);
% Eq. (3.2.6)
Gv=Av/(Rs/Ri+1); % Eq. (3.2.7b) considering Rs
fprintf(' gm=%8.3f[mS], rbe=%6.0f[Ohm], ro=%7.2f[kOhm] ',
gm*1e3,rbe,ro/1e3)
fprintf(' Ri=%9.3f[kOhm], Ro=%6.0f[Ohm] Gv=Ri/(Rs+Ri)xAv =%5.3f x
%8.3f =%8.3f ', Ri/1e3,Ro,1/(Rs/Ri+1),Av,Gv);
To find the (Thevenin) equivalent resistance seen from the load side, we remove the (independent) voltage source vs by short‐circuiting it and apply a test voltage source VT to the output port. Then, the base current ib and the test current IT through VT are computed as
Thus, we find the output resistance as
The emitter follower has a very low output resistance (3.2.8), which enables the circuit to provide its load with much current without paying much attention to the loading effect. It also has a very high input resistance (3.2.5), which enables the circuit to save the current provided by its source (driver). In short words, the emitter follower is modest enough not to burden its source as well as generous to its load. (Isn’t the emitter follower praiseworthy? Who can blame such a nice guy for not amplifying the voltage?) That is the main feature of emitter follower with an almost unity voltage gain.
Consider the CC circuit in Figure 3.33(a) where VCC = 15 V, rb = 0 Ω, Rs = 20 kΩ, R1 = 345 kΩ, R2 = 476 kΩ, RC = 4 kΩ, RE = 5940 Ω, RL = 1 kΩ, βF = 100, βR = 1, βAC = 100, and VA = 100 V. Find Ri, Ro, Av = vo/vi, and Gv = vo/vs and compare the value of Gv with that obtained from PSpice simulation.
We can use the values of rbe = 2586 Ω and ro = 104 kΩ (obtained by using the MATLAB function ‘BJT_DC_analysis()
’ and ‘gmrbero_BJT()
’ in ‘BJT_CC_analysis()
’) for the AC analysis as follows:
This AC analysis can also be done by using the above MATLAB function ‘BJT_CC_analysis()
’ although the results will be slightly different since ro is taken into consideration:
>>VCC=15; Vsm=0.001; rb=0; betaF=100; betaR=1; betaAC=betaF;
Rs=2e4; R1=345e3; R2=476e3; RC=4e3; RE=5.94e3; RL=1e3;
BJT_CC_analysis(VCC,rb,Rs,R1,R2,RC,RE,RL,[betaF,betaR,betaAC],Vsm);
If the CC circuit is biased by a current source of IEQ = 1 mA, run the MATLAB function ‘BJT_CC_analysis_I()
’ as
>>IEQ=0.001; RB=parallel_comb([R1 R2]);
BJT_CC_analysis_I(Rs,RB,RC,RE,RL,IEQ,[betaAC rb]); % Alternative
Running the above MATLAB statements yields
Results of analysis using the PWL model
with betaF= 100, betaR= 1.0
and R1= 345.00[kOhm], R2= 476.00[kOhm], RC= 4000[Ohm], RE= 5940[Ohm]
VCC VEE VBB VBQ VEQ VCQ IBQ IEQ ICQ
15.00 0.00 8.70 6.70 6.00 11.00 1.00e-05 1.01e-03 1.00e-03
in the forward-active mode with VCE,Q= 5.00[V]
where beta_forced = ICQ/IBQ = 100.00 with beta = 100.00
gm= 38.669[mS], rbe= 2586[Ohm], ro= 10003.67[kOhm]
Ri= 61.606 kOhm, Ro= 199 Ohm
Gv=Ri/(Rs+Ri)xAv= 0.755 x 0.97 = 0.73
function [Av,Ai,Ri,Ro,gm,rbe,ro,vsm,vom]=...
BJT_CC_analysis_I(Rs,RB,RC,RE,RL,IEQ,beta,VA,T,vbem)
% To analyze CC amplifier given IEQ
% beta = [beta rb] if a nonzero base resistance is given.
% If the 10th input argument vbem (maximum vbe such that the BJT operated
% in the linear region) is given, the following outputs will be returned.
% vsm = Max amplitude of vs ensuring the linear operation of BJT.
% vom = Max amplitude of vo when the BJT operates in the linear operation.
% Copyleft: Won Y. Yang, [email protected], CAU for academic use only
if nargin<9, T=27; end % Ambient temperature
if nargin<8, VA=1e4; end % Early voltage
if length(RB)>1, RB=parallel_comb(RB); end
if length(beta)>1, rb=beta(2); beta=beta(1); else rb=0; end
% If there is no RB/RE, they must be given as very large values like 1e10.
if sum([Rs RB RC RE RL rb]<0), error('Resistance must be positive!'); end
ICQ = IEQ*beta/(beta+1); % Collector current at the bias point
[gm,rbe,re,ro]=gmrbero_BJT(ICQ,beta,VA,T);
RsB=parallel_comb([Rs RB]); REL=parallel_comb([RE RL]);
RbeEL = rb+rbe+(beta+1)*REL;
Ri=parallel_comb([RB RbeEL]); % Eq. (3.2.5)
Ro=parallel_comb([RE (RsB+rbe)/(beta+1)]); % Eq. (3.2.8)
Ai = (beta+1)*RB*RE/((RB+rbe)*(RE+RL)+(beta+1)*RE*RL); % Eq. (3.2.6)
Av = REL/(re+REL); % Eq. (3.2.7)
Gv = Av/(Rs/Ri+1); % Considering Rs
if nargout<1
fprintf(' gm=ICQ/VT=%8.3f[mS], re=1/gm=%6.0f[Ohm], rbe=beta/gm=
%6.0f[Ohm], ro=VA/ICQ=%7.2f[kOhm] ', gm*1e3,re,rbe,ro/1e3);
fprintf(' Ri=RB||{rbe+(beta+1)(RE||RL)}=%9.2f kOhm,
Ro=RE||[{(Rs||RB)+rbe}/(beta+1)]=%6.0f Ohm', Ri/1e3,Ro);
fprintf(' Av=(RE||RL)/(re+(RE||RL))=%8.3f, Gv=Ri/(Rs+Ri)xAv =
%5.3f xAv =%8.3f ', Av,Ri/(Rs+Ri),Gv);
end
if nargin<10, vbem = NaN; end
vsm = (Rs/Ri+1)*RbeEL/rbe*vbem; vom = Gv*vsm;
These values of Ri and Gv are close to the PSpice simulation results shown in Figure 3.33(b2):
As listed above, we have the MATLAB function ‘BJT_CC_analysis_I()
’, which can be used for the AC analysis of a CC circuit biased by a DC current source IE,Q.
Figure 3.34.1 shows a CB amplifier and its low‐frequency AC equivalent where the BJT has been replaced by the equivalent in Figure 3.18(b) and the BJT output resistance ro is assumed to be so large as to be negligible as a parallel resistor. Let us find the input resistance, current gain, voltage gain, and output resistance.
To find the input resistance from the relationship between vi = ve and ii, we apply KCL at node c to write
Thus, we can find the input resistance as
This input resistance is very small compared with that (Eq. (3.2.1)) of CE amplifier and that (Eq. (3.2.5)) of CC amplifier.
The current through the emitter resistor RE can be expressed in terms of the base current ib through rbe‐rb‐RB (connected in parallel with RE) as
Applying KCL at node e yields the expression of the input current ii in terms of ib as
The output current io through the load resistor RL can be expressed as
Thus, the current gain, i.e. the ratio of the output current io to the input current ii is
To find the voltage gain Av = vo/vi (with Rs = 0), we apply KCL at node c (of the circuit in Figure 3.34.1(b)) to write the node equation and solve it as
The overall voltage gain, i.e. the ratio of the output voltage vo to the source voltage vs is
where Ri is given by Eq. (3.2.9).
function [VBQ,VEQ,VCQ,IBQ,IEQ,ICQ,Av,Ai,Ri,Ro,gm,rbe,ro]=...
BJT_CB_analysis(VCC,rb,Rs,R1,R2,RC,RE,RL,beta,Vsm,VA,T)
% R1,R2 can be replaced by VBB,RB if VBB-RB is connected to the base.
% If beta=[betaF betaR betaAC], large-signal model-based analysis
% If beta=[betaF betaR betaAC Is], the exponential model-based analysis
% Copyleft: Won Y. Yang, [email protected], CAU for academic use only
if nargin<12, T=27; end % Ambient temperature
if nargin<11, VA=1e4; end % Early voltage
if sum([rb Rs R1 R2 RC RE RL]<0), error('Resistance must be positive!'); end
l_beta=length(beta);
if l_beta<3, betaAC=bF(1); bF=beta; % beta=[betaF betaR]
else betaAC=beta(3); bF=beta(1:2); % beta=[betaF betaR betaAC ..]
if l_beta>3, bF=[bF beta(4)]; end % beta=[betaF betaR betaAC Is]
end
[VBQ,VEQ,VCQ,IBQ,IEQ,ICQ,mode]=BJT_DC_analysis(VCC,R1,R2,RC,RE,bF);
if strcmp(mode,'forward-active')==0
fprintf(' AC analysis is impossible in BJT_CB_analysis()
because the BJT is in the saturation mode! ');
Av=NaN; Ai=NaN; Ri=NaN; Ro=NaN; gm=NaN; rbe=NaN; ro=NaN; return;
end
RE1=RE(1);
if R1>20, RB=parallel_comb([R1 R2]); else RB=R2; end % R1=VBB?
[gm,rbe,re,ro]=gmrbero_BJT(ICQ,betaAC,VA,T);
RCL=parallel_comb([RC RL]); RbeB=rb+rbe+RB;
Av=(1/ro+betaAC/RbeB)/(1/ro+1/RCL); % Eq. (3.2.11a)
Ri = parallel_comb([RE1 RbeB/(betaAC+1)]); % Eq. (3.2.9)
ro1=ro+parallel_comb([Rs RE1 RbeB])*(1+betaAC/RbeB*ro);
Ro = parallel_comb([RC ro1]); % Eq. (3.2.12)
Ai = betaAC*RC*RE1/(RC+RL)/(RbeB+(betaAC+1)*RE1); % Eq. (3.2.10)
Gv = Av/(Rs/Ri+1); % Eq. (3.2.11b)
if nargin>9 & abs(Vsm)>0 % Detailed AC analysis
Ibm = Vsm/Rs/RbeB/(1/Rs+1/RE1+(betaAC+1)/RbeB); % Eq. (3.1.38)
if Ibm>=IBQ, fprintf(' Possibly crash into the cutoff region ');
end
if abs(Gv*Vsm+RbeB*Ibm)>=VCQ-VEQ-0.2 % Eq. (3.1.39)
fprintf(' Possibly violate the saturation region ');
end
end
fprintf(' gm=%8.3f[mS], rbe=%6.0f[Ohm], ro=%7.2f[kOhm] ',
gm*1e3,rbe, ro/1e3)
fprintf(' Ri=%9.3f[kOhm], Ro=%6.0f[Ohm] Gv=Ri/(Rs+Ri)xAv=%7.3f x%8.2f
=%8.2f ', Ri/1e3,Ro,1/(Rs/Ri+1),Av,Gv);
To find the equivalent resistance seen from the load side, we remove the (independent) voltage source vs by short‐circuiting it, make a I‐to‐V source transformation of the dependent current source βib into the voltage source βibro in series with ro as shown in Figure 3.34.2. Then we apply a test current source of iT = 1 A and find the voltage across it:
This process for analyzing a CB amplifier to find their input/output resistances and voltage/current gains has been cast into the above MATLAB function ‘BJT_CB_analysis()
’ and the following one ‘BJT_CB_analysis_I()
’ for the case where the amplifier is excited by current source.
function [Av,Ai,Ri,Ro,gm,rbe,ro,vsm,vom]=...
BJT_CB_analysis_I(Rs,RB,RC,RE,RL,IEQ,beta,VA,T,vbem)
% To analyze CB amplifier given IEQ
% beta = [beta rb] if a nonzero base resistance is given.
% If the 10th input argument vbem (maximum vbe such that the BJT operated
% in the linear region) is given, the following outputs will be returned.
% vsm = Max amplitude of vs ensuring the linear operation of BJT.
% vom = Max amplitude of vo when the BJT operates in linear operation.
% Copyleft: Won Y. Yang, [email protected], CAU for academic use
if nargin<9, T=27; end % Ambient temperature
if nargin<8, VA=1e4; end % Early voltage
if length(RB)>1, RB=parallel_comb(RB); end
if length(beta)>1, rb=beta(2); beta=beta(1); else rb=0; end
% If there is no RB/RE, they must be given as very large values like 1e10.
if sum([Rs RB RC RE RL rb]<0), error('Resistance must be positive!'); end
ICQ = IEQ*beta/(beta+1); % Collector current at the bias point
[gm,rbe,re,ro]=gmrbero_BJT(ICQ,beta,VA,T);
RbeB=rb+rbe+RB; RE1=RE(1);
Ri = parallel_comb([RE1 RbeB/(beta+1)]); % Eq. (3.2.9)
%Ro = parallel_comb([RC ro]); % Eq. (3.2.12)
ro1= ro+parallel_comb([Rs RE RbeB])*(1+beta/RbeB*ro);
Ro = parallel_comb([RC ro1]); % Eq. (3.2.12)
Ai = beta*RC*RE/(RC+RL)/(RB+rbe+(beta+1)*RE1); % Eq. (3.2.10)
Avo= beta*Ro/RbeB; % Eq. (3.2.11a) with no RL
Av = Avo/(Ro/RL+1); % Eq. (3.2.3) considering RL
Gv = Av/(Rs/Ri+1); % Eq. (3.2.11b) Considering Rs
if nargout<1
fprintf(' gm=ICQ/VT=%8.3f[mS],re=1/gm=%6.0f[Ohm],rbe=beta/gm=
%6.0f[Ohm], ro=VA/ICQ=%7.2f[kOhm] ', gm*1e3,re,rbe,ro/1e3);
fprintf(' Ri=RE||{(RB+rbe)/(beta+1)}=%9.3f kOhm, Ro=RC||ro=%6.0f
88Ohm', Ri/1e3,Ro);
fprintf(' Av=-alpha*Ro/(re+RE)xRL/(Ro+RL)=%8.2f x%5.2f =%8.2f,
Gv=Ri/(Rs+Ri)xAv =%5.3f xAv =%8.2f ', vo,RL/(Ro+RL),Av,
Ri/(Rs+Ri),Gv);
end
if nargin>9, vsm=(Rs+Ri)/re*vbem; vom=Gv*vsm;
else vsm=NaN; vom=NaN; end
Consider the CB circuit in Figure 3.35(a) where VCC = 15 V, rb = 0 Ω, Rs = 1 kΩ, R1 = 26.2 kΩ, R2 = 16.2 kΩ, RC = 10 kΩ, RE = 19.8 Ω, RL = 10 kΩ, βF = 100, βR = 1, βAC = 100, and VA = 104 V. Find Ri, Ro, Av = vo/vi, and Gv = vo/vs, and compare their values with those obtained from PSpice simulation.
We can use the values of rbe = 10 327 Ω and ro = 399.47 kΩ (obtained by using the MATLAB function ‘BJT_DC_analysis()
’ and ‘gmrbero_BJT()
’) for the AC analysis as follows:
This AC analysis can also be done by using the above MATLAB function ‘BJT_CB_analysis()
’ although the results will be slightly different since ro is taken into consideration:
>>VCC=15; Vsm=0.001; rb=0; betaF=100; betaR=1; betaAC=betaF;
Rs=1e3; R1=26.2e3; R2=16.2e3; RC=10e3; RE=19.8e3; RL=1e4;
BJT_CB_analysis(VCC,rb,Rs,R1,R2,RC,RE,RL,[betaF,betaR,betaAC],Vsm);
If the CB circuit is biased by a current source of IEQ = 251 μA, run the MATLAB function ‘BJT_CB_analysis()
’ with IEQ
and RB=
R1||R2 in place of R1
and R2
or ‘BJT_CB_analysis_I()
’ as follows:
>>IEQ=253e-6; RB=parallel_comb([R1 R2]); % Alternative
BJT_CB_analysis_I(Rs,RB,RC,RE,RL,IEQ,[betaAC rb]); % Another alternative
Running these MATLAB statements yields
Results of analysis using the PWL model
with betaF= 100, betaR= 1.0
and R1= 26.20[kOhm], R2= 16.20[kOhm], RC= 10000[Ohm], RE= 19800[Ohm]
VCC VEE VBB VBQ VEQ VCQ IBQ IEQ ICQ
15.00 0.00 5.73 5.71 5.01 12.50 2.50e-06 2.53e-04 2.50e-04
in the forward-active mode with VCE,Q= 7.49[V]
where beta_forced = ICQ/IBQ = 100.00 with beta = 100.00
gm= 9.684[mS], rbe= 10327[Ohm], ro= 39947.48[kOhm]
Ri= 0.199kOhm, Ro= 10000Ohm
Gv=Ri/(Rs+Ri)xAv= 0.166 x 24.58 = 4.09
These values of Ri, Ro, and Gv are close to the PSpice simulation results shown in Figure 3.35(b2) and (c2):
where in Figure 3.35(b2), an AC (sine‐wave) voltage source of 1 mV is applied at the output terminal to find the output resistance Ro from the voltage‐current relationship:
The next section will show how the MATLAB functions presented above can be used to analyze a multistage amplifier.
Table 3.3 lists the formulas for finding the input/output resistances, voltage gain, and current gain of the CE/CC/CB amplifiers.
Note that to find the input/output resistance of a CC configuration requires the input/output resistance of the next/previous stage corresponding to its load/source resistance RL/Rs as implied by Eq. (3.2.5)/(3.2.8). That is why, for a systematic analysis of a multistage amplifier containing one or more CC configurations, we should find the input/output resistance of each stage, starting from the last/first stage backwards/forwards to the first/last stage where the load resistance to each stage except the last one is the input resistance of the next stage and the source resistance to each stage except the first one is the output resistance of the previous stage.
Table 3.3 Characteristics of Common‐Emitter/Common‐Collector/Common‐Base (CE/CC/CB) amplifiers.
CE | CC | CB | |
Ri | RB||{rb + rbe + (β + 1)RE1} (3.2.1) |
RB||{rb + rbe + (β+1)(RE||RL)} (3.2.5) | (3.2.9) |
Ro | RC||ro ≈ RC (3.2.4) | (3.2.8) | RC‖ro1 (3.2.12) |
Av | (3.2.3) | () | () |
Ai | (3.2.2) | (3.2.6) | (3.2.10) |
function [Av,Avo,Gv,Ri,Ro]=Av_CE(ro_,RE_,RC_)
% Put 1 as the 1st input argument ro_ if ro~=inf.
% Put 0 as the 2nd input argument RE_ if RE=0.
% Put 0 as the 3rd input argument RC_ if RC=inf.
syms b rb rbe ro Rs RB RC RE RL
if nargin>1&RE_==0, RE=0; end
if nargin>2&RC_==0, RC=inf; end
RCL=parallel_comb([RC RL]); vi=1;
if nargin>0&ro_>0,
if RE==0
Ri=parallel_comb([RB rbe]); Av=-b/rbe*parallel_comb([ro RCL]);
else
Y=[(b+1)/rbe+1/RE+1/ro -1/ro;
-1/ro-b/rbe 1/ro+1/RCL];
vec=Y[(b+1)/rbe; -b/rbe]; ve=vec(1); vc=vec(2);
ib=(vi-ve)/rbe; Ri=parallel_comb([RB vi/ib]); Av=vc;
end
else
ro=inf; rbeRE=rbe+(b+1)*RE;
Ri=parallel_comb([RB rbeRE]); % Eq. (3.2.1)
Av=-b*RCL/rbeRE; % Eq. (3.2.3)
end
Ro=parallel_comb([RC ro]); % Eq. (3.2.4)
Avi=1/(Rs/Ri+1); AvL=1/(Ro/RL+1);
Avo=Av/AvL; %Avo=-b*RC/(rbe+(b+1)*RE);
if nargout<1, fprintf(' Av = '); pretty(simplify(Av)); end
function Ri=Ri_CE(ro_,RE_,RC_)
% Put 1 as the 1st input argument ro_ if ro~=inf.
% Put 0 as the 2nd input argument RE_ if RE=0.
% Put 0 as the 3rd input argument RC_ if RC=inf.
if nargin>2, [Av,Avo,Gv,Ri]=Av_CE(ro_,RE_,RC_);
elseif nargin>1, [Av,Avo,Gv,Ri]=Av_CE(ro_,RE_);
elseif nargin>0, [Av,Avo,Gv,Ri]=Av_CE(ro_);
else [Av,Avo,Gv,Ri]=Av_CE;
end
function Ro=Ro_CE(ro_)
% Put 1 as the 1st input argument ro_ if ro~=inf.
syms ro RC
if nargin<1|ro_==0, ro=inf; end
Ro=parallel_comb([RC ro]); % Eq. (3.2.4)
if nargout<1, fprintf(' Ro = '); pretty(simplify(Ro)); end
function [Av,Avo,Gv,Ri,Ro]=Av_CC(ro_,RE_)
% Put 0 as the 1st input argument ro_ if ro=inf.
% Put 0 as the 2nd input argument RE_ if RE=inf.
syms b rbe ro Rs RB RE RL
if nargin>0&ro_==0, ro=inf; end
if nargin>1&RE_==0, RE=inf; end
REL=parallel_comb([ro RE RL]);
b1REL=(b+1)*REL; RsB=parallel_comb([Rs RB]);
Ri=parallel_comb([RB rbe+b1REL]); % Eq. (3.2.5)
Av=b1REL/(rbe+b1REL); % from Eq. (3.2.7)
Avi=1/(Rs/Ri+1); Avo=(b+1)*RE/(rbe+(b+1)*RE); % Eq. (3.2.7): Open-loop gain
Gv=Avi*Av;
function Ri=Ri_CC(ro_,RE_)
syms b rbe RB RE RL
if nargin>1, [Av,Avo,Gv,Ri]=Av_CC(ro_,RE_);
elseif nargin>0, [Av,Avo,Gv,Ri]=Av_CC(ro_);
else [Av,Avo,Gv,Ri]=Av_CC;
end
function Ro=Ro_CC()
syms b rbe ro Rs RB RE RL
RsB=parallel_comb([Rs RB]);
Ro=parallel_comb([RE (RsB+rbe)/(b+1)]); % Eq. (3.2.8)
if nargout<1, fprintf(' Ro = '); pretty(simplify(Ro)); end
function [Av,Avo,Gv,Ri,Ro]=Av_CB(ro_,RE_)
% Put 1 as the 1st input argument ro_ if ro~=inf.
% Put 0 as the 2nd input argument RE_ if RE=inf.
syms b rbe ro Rs RB RC RE RL
if nargin>1&RE_==0, RE=inf; end
RCL=parallel_comb([RC RL]);
if nargin>0&ro_>0
RLroRB=(RL+ro)*(rbe+RB)/(RL+rbe+RB+(b+1)*ro);
Ri=parallel_comb([RE RLroRB]); % Eq. (3.2.9)
ro1=ro+parallel_comb([Rs RE rbe+RB])*(1+b*ro/(rbe+RB));
Av=(1+b*ro/(rbe+RB))/(1+ro/RCL); % Eq. (3.2.11)
else ro=inf; ro1=inf;
Ri=parallel_comb([RE (rbe+RB)/(b+1)]); % Eq. (3.2.9)
Av=b*RCL/(rbe+RB); % Eq. (3.2.11)
end
Ro=parallel_comb([RC ro1]); % Eq. (3.2.12)
Avi=1/(Rs/Ri+1); AvL=1/(Ro/RL+1); Avo=Av/AvL; % Eq. (3.2.11)
Gv=Avi*Av;
function Ri=Ri_CB(ro_,RE_)
% Put 1 as the 1st input argument ro_ if ro~=inf.
% Put 0 as the 2nd input argument RE_ if RE=inf.
syms b rbe ro Rs RB RE RC RL
if nargin>1&RE_==0, RE=inf; end
if nargin<1|ro_==0, ro=inf; end
RCL=parallel_comb([RC RL]);
VT=1; ib=-VT/(rbe+RB);
vc=(VT/ro-b*ib)/(1/ro+1/RCL);
IT=-(b+1)*ib-(vc-VT)/ro;
Ri=parallel_comb([RE VT/IT]);
if nargout<1, fprintf(' Ri = '); pretty(simplify(Ri)); end
function Ro=Ro_CB(ro_,RE_)
% Put 0 as the 1st input argument ro_ if ro=inf.
% Put 0 as the 2nd input argument RE_ if RE=inf.
syms b rbe ro Rs RB RC RE
if nargin>1&RE_==0, RE=inf; end
if nargin>0&ro_==0, ro1=inf;
else ro1=ro+parallel_comb([Rs RE rbe+RB])*(1+b*ro/(rbe+RB));
end
Ro=parallel_comb([RC ro1]); % Eq. (3.2.12)
if nargout<1, fprintf(' Ro = '); pretty(simplify(Ro)); end
Each of the formulas listed in Table 3.3 has been coded in MATLAB as above so that they can be called individually as symbolic expressions whenever and wherever needed.
Let us consider the CE amplifier of Figure 3.36(a1) where the device parameters of the NPN‐BJT Q1 are βF = 100, βR = 1, βAC = 100, VA = 104 V, and rb = 0 Ω. Its PSpice simulation result is shown in Figure 3.36(b1) where the overall voltage gain turns out to be
Note that the theoretical value of the overall voltage gain is
This can be obtained by running the following MATLAB statements:
>>rb=0; betaF=100; betaR=1; betaAC=100;
VCC=10; Vsm=0.01; beta=[betaF betaR betaAC];
Rs=1e4; RL=1e3; R11=7e4; R12=3e4; RC1=5e3; RE1=[0 5e3]; Rs1=Rs; RL1=RL;
BJT_CE_analysis(VCC,rb,Rs1,R11,R12,RC1,RE1,RL1,beta,Vsm);
which yields
VCC VEE VBB VBQ VEQ VCQ IBQ IEQ ICQ
10.00 0.00 3.00 2.91 2.21 7.81 4.37e-06 4.42e-04 4.37e-04
in the forward-active mode with VCE,Q= 5.61[V]
gm= 16.915[mS], rbe= 5912[Ohm], ro= 22869.57[kOhm]
Ri= 4.613 kOhm, Ro= 4999 Ohm
Gv=Ri/(Rs+Ri)xAv= 0.316 x -14.10 = -4.45
Figure 3.36(a2) and (b2) shows a CE‐CC amplifier and its PSpice simulation result where the p‐p (peak‐to‐peak) value of the overall AC output voltage has turned out to be 20.5 times that of the AC input voltage. To analyze this multistage amplifier (containing a stage of CC configuration), we first find the input resistance of each stage, starting from the last stage backwards to the first stage:
>>rb=0; betaF=100; betaR=1; betaAC=100;
VCC=10; Vsm=0.01; Rs=1e4; RL=1e3; beta=[betaF betaR betaAC];
R21=4e4; R22=6e4; RC2=0; RE2=5e3;
% Find Ri, Av, and Ai of Stage 2/1 starting from last one
Rs2=0; RL2=RL; [VBQ,VEQ,VCQ,IBQ,IEQ,ICQ,Av2,Ai2,Ri2,Ro2_0]= ...
BJT_CC_analysis(VCC,rb,Rs2,R21,R22,RC2,RE2,RL2,beta);
R11=7e4; R12=3e4; RC1=5e3; RE1=[0 5e3]; Rs1=Rs; RL1=Ri2; Vsm0=Vsm;
[VBQ,VEQ,VCQ,IBQ,IEQ,ICQ,Av1,Ai1,Ri1,Ro1]= ...
BJT_CE_analysis(VCC,rb,Rs1,R11,R12,RC1,RE1,RL1,beta,Vsm0);
% Now, analyze each stage forwards from the 2nd one
Rs2=Ro1; Vsm1=Ri1/(Rs+Ri1)*Av1*Vsm0
[VBQ,VEQ,VCQ,IBQ,IEQ,ICQ,Av2,Ai2,Ri2,Ro2]= ...
BJT_CC_analysis(VCC,rb,Rs2,R21,R22,RC2,RE2,RL2,beta,Vsm1);
Vom=Av2*Vsm1, Gv = Vom/Vsm, Ri1/(Rs+Ri1)*Av1*Av2
Running these statements yields
VCC VEE VBB VBQ VEQ VCQ IBQ IEQ ICQ
10.00 0.00 3.00 2.91 2.21 7.81 4.37e-06 4.42e-04 4.37e-04
gm= 16.915[mS], rbe= 5912[Ohm], ro= 22869.57[kOhm] % Stage 1 of CE
Ri= 4.613kOhm, Ro= 5912Ohm, Gv=Ri/(Rs+Ri)xAv= 0.316 x -66.79 = -21.09
Vsm1 = -0.2109
VCC VEE VBB VBQ VEQ VCQ IBQ IEQ ICQ
10.00 0.00 6.00 5.76 5.06 10.00 1.00e-05 1.01e-03 1.00e-03
gm= 38.756[mS], rbe= 2580[Ohm], ro= 9981.13[kOhm] % Stage 2 of CC
Ri= 18.799kOhm, Ro= 66 Ohm, Gv=Ri/(Rs+Ri)xAv= 0.79 x 0.97 = 0.77
Gv = -20.4588 %Overall voltage gain of the CE-CC amplifier
This implies that the overall voltage gain of the CE‐CC stage is −20.5 (as confirmed by the PSpice simulation result Gv,s=−409.1 mV/20 mV=−20.5 in Figure 3.36(b2)), which is much greater than that (−4.45) of the CE stage (Eq. (3.2.14)) despite the additional CC stage whose voltage gain is less than one by itself.
Figure 3.37(a) and (b) shows a three‐stage BJT amplifier consisting of CE‐CE‐CC configurations and its PSpice simulation result where the overall voltage gain has turned out to be Gv,s = 6.64. To analyze this multistage amplifier (containing a CC configuration), we first find the input resistance of each stage, starting from the last stage backwards to the first stage:
>>VCC=20; Vsm=5e-3; rb=0; betaF=100; betaR=1; betaAC=100; Is=1e-16;
Rs=100; RL=1e4; % Source resistance and Load resistance
R31=5e4; R32=5e4; RC3=0; RE3=200; beta=[betaF,betaR,betaAC,Is];
R21=1e5; R22=1e5; RC2=200; RE2=100;
R11=1e5; R12=1e5; RC1=1e3; RE1=[250 50];
Rs3=0; RL3=RL; [VBQ,VEQ,VCQ,IBQ,IEQ,ICQ,Av3,Ai3,Ri3,Ro3_0]= ...
BJT_CC_analysis(VCC,rb,Rs3,R31,R32,RC3,RE3,RL3,beta);
Rs2=0; RL2=Ri3; [VBQ,VEQ,VCQ,IBQ,IEQ,ICQ,Av2,Ai2,Ri2,Ro2_0]= ...
BJT_CE_analysis(VCC,rb,Rs2,R21,R22,RC2,RE2,RL2,beta);
Rs1=Rs; RL1=Ri2; Vsm0=Vsm;
[VBQ,VEQ,VCQ,IBQ,IEQ,ICQ,Av1,Ai1,Ri1,Ro1]= ...
BJT_CE_analysis(VCC,rb,Rs1,R11,R12,RC1,RE1,RL1,beta,Vsm0);
where the load resistance RL and the input resistances Ri3/Ri2 of stage 3/2 have been put as the load resistances of stage 3 and 2/1, successively and respectively. Note that 0 has been put as the third input argument (corresponding to Rs3/Rs2) of ‘BJT_CC_analysis()
’/‘BJT_CE_analysis()
’ for stage 3/2 because their source or input resistances are not yet known. That is why the output resistance of the CC stage (to be computed by Eq. (3.2.8) depending on Rs) is not expected to have been found properly. However, the source resistance Rs has properly been put as the third input argument of ‘BJT_CE_analysis()
’ for stage 1. Running the above MATLAB statements yields the following:
Result of provisional analysis for Stage 3
VCC VEE VBB VBQ VEQ VCQ IBQ IEQ ICQ
20.00 0.00 10.00 4.94 4.09 20.00 2.02e-04 2.04e-02 2.02e-02
in the forward-active mode with VCE,Q= 15.91[V]
where beta_forced = ICQ/IBQ = 100.00 where beta = 100.00
gm= 782.947[mS], rbe= 128[Ohm], ro= 494.07[kOhm]
Ri= 11.088[kOhm], Ro= 1[Ohm]
Gv=Ri/(Rs+Ri)xAv= 1.000x 0.99 = 0.99 % Not yet meaningful
Result of provisional analysis for Stage 2
VCC VEE VBB VBQ VEQ VCQ IBQ IEQ ICQ
20.00 0.00 10.00 2.38 1.54 16.95 1.52e-04 1.54e-02 1.52e-02
in the forward-active mode with VCE,Q= 15.41[V]
where beta_forced = ICQ/IBQ = 100.00 where beta = 100.00
gm= 589.311[mS], rbe= 170[Ohm], ro= 656.42[kOhm]
Ri= 8.520[kOhm], Ro= 200[Ohm]
Gv=Ri/(Rs+Ri)xAv= 1.000x -1.91 = -1.91 % Not yet meaningful
Results of analysis for Stage 1
VCC VEE VBB VBQ VEQ VCQ IBQ IEQ ICQ
20.00 0.00 10.00 4.29 3.46 8.59 1.14e-04 1.15e-02 1.14e-02
in the forward-active mode with VCE,Q= 5.13[V]
where beta_forced = ICQ/IBQ = 100.00 where beta = 100.00
gm= 441.426[mS], rbe= 227[Ohm], ro= 876.33[kOhm]
Ri= 16.877[kOhm], Ro= 999[Ohm]
Gv=Ri/(Rs+Ri)xAv= 0.994x -3.51 = -3.49
Then, to find the overall voltage gain, we multiply the product of the voltage gains of every stage with the voltage gain of the front voltage divider as
>>Gv=Ri1/(Rs+Ri1)*Av1*Av2*Av3
ans = 6.6374
How close this is to the PSpice simulation result (6.63) shown in Figure 3.37(b)!
Now, to find the output resistance of the last stage of CC, starting from the first stage forwards to the last stage, we use ‘BJT_CE_analysis()
’ (with Rs1 = Rs and RL1 = Ri2), ‘BJT_CE_analysis()
’ (with Rs2 = Ro1 and RL2 = Ri3), and ‘BJT_CC_analysis()e
’ (with Rs3 = Ro2 and RL3 = RL) for stage 1, 2, and 3, respectively. Here, the analysis of stage 1 does not have to be repeated since it has already been taken care of above.
>>Rs2=Ro1; RL2=Ri3; Vsm1=Av1*Vsm;
[VBQ,VEQ,VCQ,IBQ,IEQ,ICQ,Av2,Ai2,Ri2,Ro2]= ...
BJT_CE_analysis(VCC,rb,Rs2,R21,R22,RC2,RE2,RL2,beta,Vsm1);
Rs3=Ro2; RL3=RL; Vsm2=Av2*Vsm1;
BJT_CC_analysis(VCC,rb,Rs3,R31,R32,RC3,RE3,RL3,beta,Vsm2);
These MATLAB statements can be run to yield the following:
Results of analysis for Stage 2
Ri= 8.520[kOhm], Ro= 200[Ohm]
Results of analysis for Stage 3
Ri= 11.088 kOhm, Ro= 3 Ohm
All the above MATLAB statements have been put into the MATLAB function ‘CE_CE_CC()
’ so that it can be run by typing the following at the MATLAB prompt:
>>Rs=100; RL=1e4; Vsm=5e-3; VCC=20;
[Gv,Avs,Ais,Ris,Ros]=CE_CE_CC(Rs,RL,Vsm,VCC)
Note the following about it:
BJT_CC_analysis()
’, ‘BJT_CE_analysis()
’, and ‘BJT_CE_analysis()
’ with their third/eigth input arguments Rs3=0/RL3=RL, Rs2=0/RL2=Ri3, and Rs1=Rs/RL1=Ri2, respectively, have been run backwards starting from the last stage. Then the overall voltage gain can be computed as above.function [Gv,Avs,Ais,Ris,Ros,Vom]=CE_CE_CC(Rs,RL,Vsm,VCC)
rb=0; betaF=100; betaR=1; betaAC=100; VA=1e4; Is=1e-16;
R11=1e5; R12=1e5; RC1=1000; RE1=[250 50]; R21=1e5; R22=1e5; RC2=200; RE2=100;
R31=5e4; R32=5e4; RC3=0; RE3=200; beta=[betaF,betaR,betaAC,Is];
% Find Ri, Av, and Ai of Stage 3/2/1 starting from last one.
Rs3=0; RL3=RL; [VBQ,VEQ,VCQ,IBQ,IEQ,ICQ,Av3,Ai3,Ri3,Ro3_0]= ...
BJT_CC_analysis(VCC,rb,Rs3,R31,R32,RC3,RE3,RL3,beta);
Rs2=0; RL2=Ri3; [VBQ,VEQ,VCQ,IBQ,IEQ,ICQ,Av2,Ai2,Ri2,Ro2_0]= ...
BJT_CE_analysis(VCC,rb,Rs2,R21,R22,RC2,RE2,RL2,beta);
Rs1=Rs; RL1=Ri2; Vsm0=Vsm;
[VBQ,VEQ,VCQ,IBQ,IEQ,ICQ,Av1,Ai1,Ri1,Ro1]= ...
BJT_CE_analysis(VCC,rb,Rs1,R11,R12,RC1,RE1,RL1,beta,Vsm0,VA);
Gv=Ri1/(Rs+Ri1)*Av1*Av2*Av3; Avs=[Av1 Av2 Av3]; Ais=[Ai1 Ai2 Ai3];
fprintf(' Gv=Ri/(Rs+Ri)*Av1*Av2*Av3=%4.2fx%8.3fx%8.3fx%8.3f=%9.3f ', ...
Ri1/(Rs+Ri1),Av1,Av2,Av3,Gv)
% You don't have to go further unless you want to get Ro of each stage
% because Avs of all stages have already and properly been obtained.
Rs2=Ro1; RL2=Ri3; Vsm1=Ri1/(Rs+Ri1)*Av1*Vsm;
[VBQ,VEQ,VCQ,IBQ,IEQ,ICQ,Av2,Ai2,Ri2,Ro2]= ...
BJT_CE_analysis(VCC,rb,Rs2,R21,R22,RC2,RE2,RL2,beta,Vsm1,VA);
Rs3=Ro2; RL3=RL; Vsm2=Av2*Vsm1;
[VBQ,VEQ,VCQ,IBQ,IEQ,ICQ,Av3,Ai3,Ri3,Ro3]= ...
BJT_CC_analysis(VCC,rb,Rs3,R31,R32,RC3,RE3,RL3,beta,Vsm2,VA);
Vom=Av3*Vsm2; Ris=[Ri1 Ri2 Ri3]; Ros=[Ro1 Ro2 Ro3];
The hand calculations to find the input/output resistances can be done as follows:
Figure 3.38 shows the PSpice simulation result for measuring the overall output resistance Ro3, which yields the measured value of Ro3 as 10/2.7951 = 3.58 Ω.
Now, let us consider what will happen if we remove the third stage of CC (emitter follower) configuration to make a two‐stage amplifier as depicted in Figure 3.39(a). Then the output voltage across RL = 100 kΩ will become a bit higher as depicted in Figure 3.39(b1), which can be thought of as a natural result from omitting the CC stage with voltage gain Av3 = 0.98 < 1. However, will we have a similar result even for a smaller load resistor like RL = 100 Ω? To our surprise, the PSpice simulation result for RL = 100 Ω depicted in Figure 3.39(b2) shows that the output voltage of the two‐stage amplifier has become much lower than that of the three‐stage amplifier, which reveals the potential value of the CC stage. What is the strength of the CC stage to reduce the loading effect so that the voltage drop due to a larger load (with smaller resistance) can be very small? It is the large input resistance and the small output resistance of CC stage compared with those of CE stage as mentioned in Section 3.2.2. That is why we are willing to pay the extra cost of equipping an amplifier with a CC stage as the last one even if it may lower the output voltage a bit for a normal load.
To use MATLAB for showing the strength of CC stage, we can compose the following MATLAB function ‘CE_CE()
’ with RL as an input argument, which analyzes the two‐stage amplifier consisting of CE‐CE stages. Then we run it and the above MATLAB function ‘CE_CE_CC()
’ with RL = 100:
>>Rs=100; RL=100; Vsm=0.01; VCC=20;
Gv1=CE_CE(Rs,RL,Vsm,VCC), Gv2=CE_CE_CC(Rs,RL,Vsm,VCC)
which yields
Gv1 = 2.2669 Gv2 = 6.4350
This shows that as the load becomes larger, i.e. as RL becomes smaller, the role of a CC stage to reduce the loading effect becomes more remarkable.
function [Gv,Avs,Ais,Ris,Ros,Vom]=CE_CE(Rs,RL,Vsm,VCC)
rb=0; betaF=100; betaR=1; betaAC=100; VA=1e4; Is=1e-16;
beta=[betaF,betaR,betaAC,Is]
R21=1e5; R22=1e5; RC2=200; RE2=100;
R11=1e5; R12=1e5; RC1=1000; RE1=[250 50];
% Find Ri, Av, and Ai of Stage 2/1 starting from last one.
Rs2=0; RL2=RL; [VBQ,VEQ,VCQ,IBQ,IEQ,ICQ,Av2,Ai2,Ri2,Ro2_0]= ...
BJT_CE_analysis(VCC,rb,Rs2,R21,R22,RC2,RE2,RL2,beta);
Rs1=Rs; RL1=Ri2; Vsm0=Vsm;
[VBQ,VEQ,VCQ,IBQ,IEQ,ICQ,Av1,Ai1,Ri1,Ro1]= ...
BJT_CE_analysis(VCC,rb,Rs1,R11,R12,RC1,RE1,RL1,beta,Vsm0,VA);
Gv=Ri1/(Rs+Ri1)*Av1*Av2; Avs=[Av1 Av2]; Ais=[Ai1 Ai2];
fprintf(' Gv=Ri/(Rs+Ri)*Av1*Av2=%4.2fx%8.3fx%8.3f=%9.3f ', ...
Ri1/(Rs+Ri1),Av1,Av2,Gv)
% Now, analyze each stage forwards from the 2nd one to find their Ros.
Rs2=Ro1; RL2=RL; Vsm1=Ri1/(Rs+Ri1)*Av1*Vsm;
[VBQ,VEQ,VCQ,IBQ,IEQ,ICQ,Av2,Ai2,Ri2,Ro2]= ...
BJT_CE_analysis(VCC,rb,Rs2,R21,R22,RC2,RE2,RL2,beta,Vsm1,VA);
Vom=Av2*Vsm1; Ris=[Ri1 Ri2]; Ros=[Ro1 Ro2];
Figure 3.40(a)/(b) shows CC‐CE (Darlington) amplifiers using two NPN/PNP BJTs, respectively. The amplifiers can be used to achieve a large current gain since the overall output current is the sum of the two BJT collector currents:
Figure 3.40(c) shows a CC‐CC (Darlington) amplifier using two NPN BJTs. This amplifier can also be used to achieve a large current gain since the overall output current is the emitter current of the second BJT:
Figure 3.40(d) shows a CE‐CB (cascode) amplifier using two NPN BJTs. Its output current and output voltage across the collector resistor RC are
Thus, the current/voltage gains are
Not only the voltage/current gains but also the input/output resistances are close to those of the CE amplifier (with RE = 0, RB = ∞, and RC in place of RC||RL) discussed in Section 3.2.1. Then what is the additional BJT for? Compared with the single‐stage CE amplifier, the load resistance of the first CE stage is the input resistance of the second CB stage, which is so small that the possibility of Q1 to enter the saturation region can be reduced. That is one of the advantages that we gain from the additional (second) BJT.
It may be interesting and convenient to use the MATLAB functions listed above for deriving, say, Eq. (3.2.22) (the voltage gain of the CE‐CB (cascode) amplifier shown in Figure 3.40(d)) as follows:
>>syms b b1 b2 ro ro1 ro2 rbe rbe1 rbe2 Rs RB RC RE RL
Ri2=subs(Ri_CB,{b,rbe,RB,RE},{b2,rbe2,0,inf})
%Input resistance from last
Ri1=subs(Ri_CE,{rbe,RB,RE},{rbe1,inf,0})
Ro1=subs(Ro_CE,RC,inf); % Output resistance from the first stage
Ro2=subs(Ro_CB,{b,rbe,Rs,RB,RE},{b2,rbe2,Ro1,0,inf})
Av1=subs(Av_CE,{b,rbe,RC,RE,RL},{b1,rbe1,inf,0,Ri2})
Av2=subs(Av_CB,{b,rbe,RB,RE,RL},{b2,rbe2,0,inf,inf})
Ri=Ri1; Ro=Ro2; % Overall input and output resistances
Gv=Ri/(Rs+Ri1)*Av1*Av2
where the output resistance Ro1 of stage 1 (CE) has been put as the source resistance Rs2 of stage 2 (CB) to find the output resistance Ro2 of stage 2 and the input resistance Ri2 of stage 2 has been put as the load resistance RL1 of stage 1 to find the voltage gain Av1 of stage 1. Running these statements yields the overall input/output resistances and voltage gain as
Ri1 = rbe1 % The input resistance of the first stage
Ro2 = RC % The output resistance of the last stage
Gv = -(RC*b1*b2)/((Rs + rbe1)*(b2 + 1)) % see Eq. (3.2.22)
This result conforms with Eq. (3.2.22). On the other hand, if we consider the (internal) output resistance ro (due to the Early effect) of each BJT, we can run the following statements:
>>Ri2=subs(Ri_CB(1),{b,ro,rbe,RB,RE,RL},{b2,ro2,rbe2,0,inf,inf})
Ri=limit(limit(limit(subs(Ri_CE(1),rbe,rbe1),RB,inf),RC,inf),RE,0)
Ro1=subs(Ro_CE(1),{ro,RC},{ro1,inf});
Ro=subs(Ro_CB(1),{b,ro,rbe,Rs,RB,RC,RE},{b2,ro2,rbe2,Ro1,0,inf,inf})
Av1=limit(limit(subs(Av_CE(1),{b,ro,rbe},{b1,ro1,rbe1}),RL,Ri2),RE,0)
Av2=subs(Av_CB(1),{b,ro,rbe,RB,RE,RL},{b2,ro2,rbe2,0,inf,inf})
Gv=Av1*Av2; % Overall voltage gain with Rs=0
Gvo=limit(Gv,RC,inf); % Overall onen-loop voltage gain with RC=inf
pretty(simplify(Gvo))
to get the overall input/output resistances and voltage gain of the CE‐CB amplifier with Rs = 0 and RC = ∞ (open) as
Ri = rbe1
Ro = ro2 + ((b2*ro2)/rbe2 + 1)/(1/rbe2 + 1/ro1)
b1 ro1 (rbe2 + b2 ro2)
- - - - - - - - - - - - - - -% comparable to the results in Sec. 7.5.6 of [S-2]
rbe1 (rbe2 + ro1)
This implies
Note that 1 has been put as the first input argument of the MATLAB functions such as ‘Ri_CB()
’ to include the effect of ro. Note also that the MATLAB function ‘limit()
’ is more useful than ‘subs()
’ for substituting a zero or an infinity into a complicated MATLAB expression.
Consider the cascode (CE-CB) amplifier in Figure 3.41(a) where the device parameters of the BJTs Q1 and Q2 are rb = 0 Ω, βF = 100, βR = 1, βAC = 100, VA = 104 V, and VT = 25.9 mV. Find the overall voltage gain Gv = vo/vs and see how close it is to that obtained from PSpice simulation.
Assuming that Q1 and Q2 operate in the forward‐active mode so that IC1 = βFIB1 = IE2 = (βF + 1)IB2, IB2 = αFIB1 = βFIB1/(βF + 1), we write a set of two KVL equations (in two unknowns IB1 and IR2) along the path R1‐R2‐R3 and the mesh R3‐BEJ1‐RE and solve it as
Thus, we have IC1 = βFIB1 = 0.649 mA and IC2 = αFIC1 = 0.99 × 0.649 = 0.643 mA so that
Then we use Eq. (3.2.22) to find the overall voltage gain as
All these calculations can be done by using MATLAB as follows:
>>betaF=100; betaR=1; betaAC=100; T=27; VT=(27+273)/11605;
VA=1e4; alphaF=betaF/(betaF+1); VBE1=0.7; VBE2=0.7;
VCC=12; Rs=50; R1=100e3; R2=100e3; R3=50e3; RC=3e3; RE=2e3; RL=5e3;
Z = [R1*alphaF-R3 R1+R2+R3; -(betaF+1)*RE-R3 R3];
I = Z[VCC; VBE1]; % Eq. (E3.13.1)
IB1=I(1); IC1=betaF*IB1, IE1=IB1+IC1; IC2=alphaF*IC1, IB2=IC2/betaF;
[gm1,rbe1,re1,ro1]=gmrbero_BJT(IC1,betaF,VA,VT); gm1, rbe1
Av = betaF*alphaF*parallel_comb([RC RL])/(Rs+rbe1) % Eq. (E3.13.3)
For the amplifier whose AC equivalent is shown in Figure 3.42(a), find the input/output resistances and the overall voltage gain Gv = vo/vs in terms of β1, β2, rbe1, rbe2, Rs, and RE where gmk = βk/rbek.
To find the input resistance and the voltage gain, we draw the equivalent (with the BJTs replaced by the model in Figure 3.18(b)) as depicted in Figure 3.42(b1) and write a set of two node equations (in two unknowns ve1 and vo) as
%elec03e14.m
syms b b1 b2 rbe rbe1 rbe2 gm1 gm2 ro ro1 ro2 Rs RB RC RE RL
% To find the input resistance and voltage gain
vT=1; % Test input voltage
Y=[gm1+1/rbe1+1/ro1+1/rbe2 -1/rbe2;
-gm2-1/rbe2 gm2+1/rbe2+1/RE+1/ro2];
v=Y[vT*(1/rbe1+gm1); 0]; % solve Eq. (E3.14.1)
ve1=v(1); vo=v(2); iT=(vT-ve1)/rbe1;
% Input resistance
Ri=vT/iT; Ri=subs(Ri,{gm1,gm2},{b1/rbe1,b2/rbe2});
% Input resistance (starting from the last stage possibly with RL)
Ri2=subs(Ri_CC(1),{b,rbe,ro,RB,RE,RL},{b2,rbe2,ro2,inf,RE,inf});
Ria=subs(Ri_CC(1),{b,rbe,ro,RB,RE,RL},{b1,rbe1,ro1,inf,inf,Ri2});
simplify(Ri-Ria)
Rib=limit(limit(Ri,ro1,inf),ro2,inf); % With ro1=inf and ro2=inf
fprintf(' Ri= '); pretty(simplify(Rib))
% Voltage gain
Av=vo/vT;
Av=subs(Av,{gm1,gm2},{b1/rbe1,b2/rbe2});
Gv=simplify(Ri/(Rs+Ri)*Av); % Overall voltage gain
Av1=subs(Av_CC(1),{b,rbe,ro,RB,RE,RL},{b1,rbe1,ro1,inf,inf,Ri2});
Av2=subs(Av_CC(1),{b,rbe,ro,RB,RE,RL},{b2,rbe2,ro2,inf,RE,inf});
Gva=Ria/(Rs+Ria)*Av1*Av2; % Overall voltage gain
simplify(Gv-Gva)
Avb=limit(limit(Av,ro1,inf),ro2,inf); % With ro1=inf and ro2=inf
Gvb=simplify(Rib/(Rs+Rib)*Avb);
fprintf(' Gv= '); pretty(simplify(Gvb))
% Output resistance
ve1=vT/rbe2/((1+gm1*rbe1)/(Rs+rbe1)+1/ro1+1/rbe2);
iT=vT*(1/ro2+1/RE)+(vT-ve1)*(1/rbe2+gm2);
Ro=vT/iT;
Ro=subs(Ro,{gm1,gm2},{b1/rbe1,b2/rbe2});
% Output resistance (starting from the 1st stage with Rs)
Ro1=subs(Ro_CC(1),{b,rbe,ro,Rs,RB,RE},{b1,rbe1,ro1,Rs,inf,inf});
Roa=subs(Ro_CC(1),{b,rbe,ro,Rs,RB,RE},{b2,rbe2,ro2,Ro1,inf,RE});
simplify(Ro-Roa)
Rob=limit(limit(Ro,ro1,inf),ro2,inf);
fprintf(' Ro= '); pretty(simplify(Rob))
We can solve this set of equations to find ve1, vo, iT = (vT − ve1)/rbe1, Ri = vT/iT, and Av = vo/vT. If we assume that ro1 = ∞ and ro2 = ∞, we can obtain
On the other hand, to find the output resistance, we draw the equivalent as depicted in Figure 3.42(b2) and write a node equation (in unknown ve1) as
We can solve this equation to find ve1 and Ro = vT/iT. If we assume that ro1 = ∞ and ro2 = ∞, we can obtain
Alternatively, we can use the MATLAB functions ‘Ri_CC()
’, ‘Av_CC()
’, and ‘Ro_CC()
’ to obtain the same results by running the above MATLAB script “elec03e14.m”:
Ri= RE + rbe1 + rbe2 + RE b1 + RE b2 + b1 rbe2 + RE b1 b2
Gv= RE (b1 + 1) (b2 + 1)
--------------------------------------------------
RE + Rs + rbe1 + rbe2 + RE b1 + RE b2 + b1 rbe2 + RE b1 b2
Ro= RE (Rs + rbe1 + rbe2 + b1 rbe2)
---------------------------------------------------
RE + Rs + rbe1 + rbe2 + RE b1 + RE b2 + b1 rbe2 + RE b1 b2
Consider the CC‐CE amplifier in Figure 3.43 where the device parameters of the BJTs Q1 and Q2 are rb = 0 Ω, βF = 100, βR = 1, βAC = 100, VA = 108 V, and VT = 25.9 mV. Find the overall input/output resistances and voltage gain Gv = vo/vs and see how close they are to those obtained from PSpice simulation.
The exponential‐model‐based DC analysis and the AC analysis can be performed by running the following MATLAB script “elec03e15.m”:
%elec03e15.m
bF=100; bR=1; aR=bR/(bR+1); Is=1e-14; Isc=Is/aR;
T=27; VT=(T+273)/11605; VA=1e8;
VCC=12; R1=20e6; R2=50e6; VBB=VCC*R2/(R1+R2); RE=20e3;
% Exponential-model-based DC analysis
iC=@(v)Is*exp(v(1)/VT)-Isc*exp(v(2)/VT); % Eq. (3.1.23a)
iB=@(v)Is/bF*exp(v(1)/VT)+Isc/(bR+1)*exp(v(2)/VT); % Eq. (3.1.23b)
iE=@(v)iB(v)+iC(v);
eq=@(v)[VCC-v(1)-R1*(v(1)/R2+iB([v(1)-v(2) v(1)-VCC]));
(iE([v(1)-v(2) v(1)-VCC])-iB([v(2)-v(3) v(2)-VCC]))*1e6;
v(3)-RE*iE([v(2)-v(3) v(2)-VCC])]; % Node equations in v1,v2,v3
v0 = VBB-[0 0.7 1.4]; % Initial guess for v=[v1 v2 v3]
v = fsolve(eq,v0) % Solution to the set of node equations
VBE1=v(1)-v(2); VBC1=v(1)-VCC; VBE2=v(2)-v(3); VBC2=v(2)-VCC;
IC1Q=iC([VBE1 VBC1]), IC2Q=iC([VBE2 VBC2])
% AC analysis
[gm1,rbe1_,re1_,ro1_]=gmrbero_BJT(IC1Q,bF,VA,VT)
[gm2,rbe2_,re2_,ro2_]=gmrbero_BJT(IC2Q,bF,VA,VT)
Rs_=500; RB_=parallel_comb([R1 R2]); RE_=20e3; RL_=10e3; b1_=bF; b2_=bF;
syms b b1 b2 rbe rbe1 rbe2 ro ro1 ro2 Rs RB RC RE RL
% Input resistance (starting from the last stage with RL)
Ri2=subs(Ri_CC,{b,rbe,RB,RE,RL},{b2_,rbe2_,inf,RE_,RL_}); Ri2=eval(Ri2);
Ri1=subs(Ri_CC,{b,rbe,RB,RE,RL},{b1_,rbe1_,RB_,inf,Ri2}); Ri=eval(Ri1)
% Output resistance (starting from the 1st stage with Rs)
Ro1=subs(Ro_CC,{b,rbe,Rs,RB,RE},{b1_,rbe1_,Rs_,RB_,inf}); Ro1=eval(Ro1);
Ro2=subs(Ro_CC,{b,rbe,Rs,RB,RE},{b2_,rbe2_,Ro1,inf,RE_}); Ro=eval(Ro2)
% Voltage gain
Av1=subs(Av_CC,{b,rbe,RB,RE,RL},{b1_,rbe1_,RB_,inf,Ri2}); Av1=eval(Av1);
Av2=subs(Av_CC,{b,rbe,RB,RE,RL},{b2_,rbe2_,inf,RE_,RL_}); Av2=eval(Av2);
Gv=Ri/(Rs_+Ri)*Av1*Av2
% PSpice simulation results
Ri_pspice=100e-6/8.6465e-12-Rs_, Ro_pspice=100e-6/676.34e-9
Gv_pspice=97.806e-6/100e-6
For the two amplifiers whose AC equivalents are shown in Figure 3.44, find the input/output resistances (Ri/Ro) and the overall voltage gain Gv = vo/vs in terms of β1, β2, rbe1, rbe2, ro1, ro2, Rs, and RL where gmk = βk/rbek, but assume ro1 = ro2 = ∞ for Ri and Gv, and assume ro1 = ro2 ≫ rbe1 = rbe2 ≫ Rs and β1 = β2 ≫ 1 for Ro.
For the amplifier in Figure 3.44(a), we can run the following MATLAB script “elec03e16a.m” to get
%elec03e16a.m
syms b b1 b2 rbe rbe1 rbe2 ro ro1 ro2 Rs RB RC RE RL
Ri2=subs(Ri_CE,{b,rbe,RB,RC,RE},{b2,rbe2,inf,inf,0});
Ri=subs(Ri_CC,{b,rbe,RB,RC,RE,RL},{b1,rbe1,inf,0,inf,Ri2})
Av1=subs(Av_CC,{b,rbe,RB,RC,RE,RL},{b1,rbe1,inf,0,inf,Ri2});
Av2=subs(Av_CE,{b,rbe,RB,RC,RE},{b2,rbe2,inf,inf,0});
Gv=eval(Ri/(Rs+Ri)*Av1*Av2); % Overall gain
pretty(simplify(Gv))
Ro1=subs(Ro_CC(1),{b,rbe,ro,RB,RE},{b1,rbe1,ro1,inf,inf})
Ro=subs(Ro_CE(1),{b,rbe,ro,Rs,RB,RC,RE},{b2,rbe2,ro2,Ro1,inf,inf,0})
For the amplifier in Figure 3.44(b), we can run the following MATLAB script “elec03e16b.m” to get
%elec03e16b.m
syms b b1 b2 rbe rbe1 rbe2 ro ro1 ro2 Rs RB RC RE RL
Ri2=subs(Ri_CB,{b,rbe,RB,RC,RE},{b2,rbe2,0,inf,inf});
Ri=subs(Ri_CC,{b,rbe,RB,RC,RE,RL},{b1,rbe1,inf,0,inf,Ri2})
Av1=subs(Av_CC,{b,rbe,RB,RC,RE,RL},{b1,rbe1,inf,0,inf,Ri2});
Av2=subs(Av_CB,{b,rbe,RB,RC,RE},{b2,rbe2,0,inf,inf});
Gv=Ri/(Rs+Ri)*Av1*Av2; % Overall gain
pretty(simplify(Gv))
Ro1=subs(Ro_CC(1),{b,rbe,ro,RB,RE},{b1,rbe1,ro1,inf,inf})
Ro=subs(Ro_CB(1),{b,rbe,ro,Rs,RB,RC,RE},{b2,rbe2,ro2,Ro1,0,inf,inf})
Note that to remove a resistance in the formulas for Ri, Ro, Av, … due to its nonexistence in a circuit, it is enough to set its value to 0/∞ if it is series-/parallel-combined with other resistance(s) without having to compare the circuit with the corresponding model in Fig. 3.30/3.32/3.34.1.
This section will discuss the DTL (Diode‐Transistor Logic) NAND gate, TTL (Transistor‐Transistor Logic) NAND gate, and ECL (Emitter‐Coupled Logic) OR/NOR gate.
Figure 3.45 shows a basic DTL NAND gate consisting of a diode AND gate cascaded with a BJT inverter where the binary inputs vi1 and vi2 are supposed to be one of the two voltage levels corresponding to low (logic 0) and high (logic 1):
Let us look over several aspects of the DTL NAND gate.
To check if the circuit operates as a NAND gate, let us consider the following two cases:
Since this voltage is not high enough to turn on the two series‐connected diodes D1‐D2 and the B‐E junction of Q, the two diodes will be off so that iR2 = 0, vBE = 0, and iB = 0, which forces the BJT Q to be in the cutoff mode. Then the output voltage will be
since iRC = 0 so that vRC = RCiRC = 0 as long as no output current flows into the next‐stage (load) gate(s). This state of high output voltage is most probably true if the next‐stage gates are the same gates, since the current through the reverse‐biased diodes in the next‐stage gate will not be much. However, if the number of next‐stage (load) gates exceeds a certain number (called the output‐high fan‐out), then the state of high output voltage may be jeopardized. Here are a couple of QAs:
(A1) With only one diode, say, D1, we still have vY = 5 V (high) since vP = 0.9 V is not high enough to turn on the diodes D1 and the B‐E junction of Q. However, if vP ≥ 0.9 + 0.3 [V] due to some noise, then the result will differ. Another diode D2 has been inserted additionally to increase the high (logic 1) noise margin so that the high output can be less affected by the noise.
(A2) Since the series‐connected diodes D1‐D2 are off, the current through R1
will flow back into the previous stage, which is supposed to be in the saturation mode. This current will be the basis for determining the output‐low fan‐out (of the previous gate) because it may increase the collector current of BJT Q−1 (of the previous stage) so that Q−1 can get out of the saturation mode to enter the forward‐active region. Note that the output‐high/low fan‐outs of a gate are the maximum numbers of load gates of similar design that can be connected to the output of the (driver) gate without affecting its high/low output, respectively.
In this case, all the input diodes will be off so that the voltage source VCC can turn on the two series‐connected diodes D1‐D2 and make the B‐E junction of BJT Q forward‐biased. Then the BJT Q will be in the forward‐active or saturation mode. Suppose Q is in the forward‐active mode. Then the voltages at nodes B and P will be
respectively so that the current through R1 and the current through RB are
respectively. Thus, we can subtract iRB from iR1 to get the base current of Q as
and, accordingly, find the collector current of Q and the collector‐to‐emitter voltage (equal to the output voltage) as
However, this implies that Q cannot be in the forward‐active mode. Therefore, we suppose that Q is in the saturation mode so that the collector‐to‐emitter voltage is
Then, on the assumption that no current flows from the next stage into Q, the collector current will be
The voltages at nodes B and P will be
respectively, so that the current through R1 and the current through R2 are
respectively. Thus, we can subtract iRB from iR1 to get the base current of Q as
Here is a QA:
When the output voltage is low, i.e. vY = VCE,sat = 0.2 V with the BJT Q (in the current stage) saturated, it can let the input diode of a load gate (connected to the output node Y) forward‐biased so that the current through R1 of a load gate (in the next stage)
can flow back (sink) into the BJT Q of the current stage in addition to the existing collector current (Eq. (3.3.11)) coming through RC. Therefore, if the number of similar load gates connected to the output node Y is N, the maximum collector current of Q will be
From the condition that this maximum collector current should be less than βFiB in order to keep Q saturated, we can determine the output‐low fan‐out of the basic NAND gate as the minimum integer satisfying the above inequality (3.3.17):
How about the output‐high fan‐out of the DTL gate? When the output is high, it can let the input diodes of the load gates reverse‐biased and then the additional current flowing through RC and going into the next stage is just the sum of the reverse leakage currents that is not so large as to put a limitation on the fan‐out.
If there were no connection through RB between node B and ground so that iRB = 0, the base current iB = iR1 − iRB would be larger so that the fan‐out determined by Eq. (3.3.18) could be increased. Then, what is the pull‐down resistor RB for? Its role is to decrease the turn‐off time (saturation‐to‐cutoff switching time) by providing another path (in parallel with the BE junction of Q) for the reverse base current so that excess minority carriers can be removed quickly from the base while Q enters the cutoff mode from the saturation mode. Note that a smaller value of the pull‐down resistor RB makes the turn‐off time shorter, but on the other hand, it decreases the base current iB = iR1− iRB, reducing the driving capability (measured by fan‐out).
Table 3.4 and Figure 3.46 show the (piecewise linear) VTC of the DTL NAND gate depicted in Figure 3.45. Figure 3.46 also shows the low/high noise margins NML/NMH defined as the maximum widths of the range in which the input voltage can vary without changing the high/low output voltage. Note that the (dotted) VTC for the gate using only one diode between nodes P and B implies that saving one diode results in a considerable reduction of the low noise margin NML.
Table 3.4 Voltage transfer characteristic (VTC) of a DTL NAND gate.
Region | Range of vi [V] | vP [V] | vB [V] | D1‐D2 | Q | vY [V] |
1 | 0∼0.5 = | vi + VD, on 0.7∼1.2 |
0 | OFF | Cutoff | 5.0 |
2 | 0.5∼1.3 = | vi + VD, on 1.2∼2.0 |
0∼0.5 | OFF | Cutoff | 5.0 |
3 | 1.3∼1.7 = | vi + VD, on~VD, offset 2.0∼2.2 | 0.5∼0.8 | ON | Forward‐active | 5.0–0.2 |
4 | 1.7∼5.0 | VBE, sat + 2VD, on 2.2 V |
0.8 | ON | Saturated | 0.2 |
Figure 3.47 shows a basic TTL NAND gate using two BJTs where the multiple BEJs (BE junctions) of BJT Q1 replace the input diodes and the BCJ (BC junction) of BJT Q1 replaces the diode D1 of the DTL NAND gate. Note that the input clamping diodes are placed to keep the input voltages from going below −0.7 V so that Q1 can be protected from any large negative input voltage.
To check if the circuit operates as a NAND gate, let the forward/reverse DC current gains be
respectively, and consider the following two cases:
In this case, the BEJ of Q1 connected to the low input will be forward‐biased through R1 by the voltage source VCC, but Q1 will be not in the forward‐active mode but in the saturation mode because its collector current cannot be as large as βFiB1 = βF(VCC − VBE1,on)/R1 due to the back‐to‐back connection of the BCJ of Q1 and BEJ of Q2. Then we have vCE1 = VCE,sat = 0.2 V so that
Since this voltage is not high enough to forward‐bias the BEJ of Q2, the BJT Q2 will be in the cutoff mode. Then the output voltage will be
since iR2 = 0 so that vR2 = R2iR2 = 0 as long as no output current flows into the load gate(s) (in the next stage). This state of high output voltage is most probably true if the load gates are the same kind of gates, since the current through the reverse‐biased BEJ of in the load gate will not be much. Then the current through R1
will flow back into the previous stage, possibly annoying its BJT , which is supposed to be in the saturation mode.
In this case, the BEJ/BCJ of Q1 are reverse‐/forward‐biased so that the BJT Q1 can be in the reverse‐active mode where the roles of emitter and collector are switched. Then the collector current of Q1 will be
Assume that the BJT Q2 is saturated by accepting this current as its base current. Then we have
If no load current flows back from the next stage into Q2, the collector current of Q2 will be
which turns out to be less than . This justifies our assumption that Q2 is saturated. Thus, we can rest assured that the output voltage is low:
Consider the BJT circuit in Figure 3.48(a) where the device parameters of the BJTs Q1 and Q2 are βF = 100, βR = 1, and Is = 10−15 in common.
We can run the following MATLAB script “elec03e17.m” to plot vBE1, iC1 = −iB2, and vo = vCE2 for the input voltage vi = 0∼2 [V] as shown in Figure 3.48(b). Also, we can perform the PSpice simulation to plot vBE1, iC1= −iB2, and vo = vCE2 for vi = 0∼2 [V].
%elec03e17.m
betaF=100; betaR=1; alphaR=betaR/(betaR+1);
Is=1e-15; Isc=Is/alphaR; T=27; VT=(T+273)/11605; % BJT parameters
VCC=5; R1=4e3; R2=1.4e3; vis=[0:0.01:2];
iC=@(v)Is*exp(v(1)/VT)-Isc*exp(v(2)/VT); % Eq. (3.1.23a)
iB=@(v)Is/betaF*exp(v(1)/VT)+Isc/(betaR+1)*exp(v(2)/VT); % Eq. (3.1.23b)
options=optimoptions('fsolve','TolX',1e-6,'Display','off');
for n=1:numel(vis)
vi=vis(n); % A set of node equations in v=[vB1 vC1=vB2 vC2]
eq=@(v,vi)[VCC-R1*iB([v(1)-vi v(1)-v(2])-v(1); % KCL at node 1
(iC([v(1)-vi v(1)-v(2)])+iB([v(2) v(2)-v(3)]))*1e6; % KCL at node 2
VCC-R2*iC([v(2) v(2)-v(3)])-v(3)]; % KCL atnode 3
if n<2, v0=vi+[0.7 1 2]; else v0=v; end % Initial guess for v
[v,err(n,:)]=fsolve(eq,v0,options,vi);
vos(n)=v(3); vBE1s(n)=v(1)-vi; iCs(n)=iC([v(1)-vi v(1)-v(2)]);
end
subplot(221), plot(vis,iCs), grid on
subplot(223), plot(vis,vos,'r', vis,vBE1s), grid on
Figure 3.49 shows a TTL NAND gate using three BJTs where compared with the basic TTL NAND gate of Figure 3.47, Q3 increases not only the fan‐out (by raising the overall current gain) but also the noise margin since the BEJ of Q3 provides an additional diode offset voltage (like D2 in the TTL NAND gate). Let us look over several aspects of the TTL NAND gate.
To check if the gate operates as a NAND gate, let us consider the following two cases:
In this case, the BEJ of Q1 connected to the low input will be forward‐biased through R1 by the voltage source VCC, but Q1 will be not in the forward‐active mode but in the saturation mode because its collector current cannot be as large as βFiB1 = βF(VCC − VBE1,on)/R1 due to the back‐to‐back connection of the BCJ of Q1 and BEJ of Q2. Then we have vCE1 = VCE,sat = 0.2 V so that
Since this voltage is not high enough to forward‐bias the BEJs of Q2 and Q3, the two BJTs will be in the cutoff mode. Then the output voltage will be
since iRC = 0 so that vRC = RCiRC = 0 as long as no output current flows into the load gate(s) (in the next stage). This state of high output voltage is most probably true if the load gates are the same gates, since the current through the reverse‐biased BEJ of (of the next stage) in the load gate will not be much. Then the current through R1
will flow back into the driver gate (in the previous stage), possibly annoying its BJT , which is supposed to be in the saturation mode.
In this case, the BEJ/BCJ of Q1 are reverse‐/forward‐biased so that the BJT Q1 can be in the reverse‐active mode where the roles of emitter and collector are switched. Then the collector current of Q1 will be
Assume that Q2 and Q3 are saturated by accepting iB2 = −iC1 and iB3 = iE2−iRB, respectively, as their base currents. Then we have
If no load current flows back from the next stage into Q3, the collector current of Q3 will be
Since iC2 < βFiB2 and iC3 < βFiB3, Q2 and Q3 turn out to be saturated (as we assumed) so that we can rest assured of the low output voltage:
In Figure 3.50, suppose the output voltage of the driver gate is high, i.e. vY = VCC = 5 V with Q2 and Q3 cutoff, which can drive the BJTs (connected to the output node Y), , and of the load gate (in the next stage) into the reverse‐active, saturation, and saturation modes, respectively. Then the load current (flowing into the load gate) equal to the emitter current of can be obtained as
If the number of load gates connected to the output node Y is N, the current through RC of the driver gate is , which will decrease the output voltage as
In order for the output voltage vY not to be lower than the minimum output voltage 3 V (corresponding to logic 1) for all the voltage drop due to the loading effect, the following condition should be met:
Therefore the output‐high fan‐out of the TTL NAND gate of Figure 3.49 is 7.
In Figure 3.50, suppose the output voltage of the driver gate is low, i.e. vY = VCE,sat = 0.2 V with the BJT Q saturated, which can drive the BJTs (connected to the output node Y), , and of the load gate (in the next stage) into the saturation, cutoff, and cutoff modes, respectively. Then the load current (flowing from the load gate) equal to the (negative) emitter current of can be obtained as
If the number of load gates connected to the output node Y is N, the collector current iC3 of Q3 in the driver gate will be
In order for Q3 not to exit the saturation mode, the following condition should be met:
This implies that the output‐low fan‐out of the TTL NAND gate of Figure 3.49 is 54. Therefore, the fan‐out of the TTL NAND gate is 9, which is the lower of the output‐low and output‐high fan‐outs.
Consider again the TTL NAND gate of Figure 3.49 or 3.50 where CL denotes the capacitive load consisting of parasitic capacitances of wires and reverse‐biased diodes (of the load gates). The capacitive load CL may cause a long low‐to‐high transition time (as can be seen from Figure 3.27(b1)) since it must be charged from VCE,sat = 0.2 to VCC = 5.0 by the current through RC. A smaller RC reduces the output delay, but also results in a more power dissipation of (VCC −VCE,sat)2/RC when the output is low, i.e. vY = VCE,sat.
To resolve this dilemma, the (passive) pull‐up resistor RC is made into an active pull‐up circuit by inserting a BJT Q4 (together with a diode D) between RC and Q3 as depicted in Figure 3.51. The circuit is called a TTL NAND gate with a totem‐pole output stage where totem poles are ancient traditional sculptures that were carved as the emblem of a family or clan by the Northwest American Indian tribes. Since its logic function is the same with the previous NAND gates, let us focus on the role of the totem‐pole output stage consisting of Q4‐D‐Q3, especially during the low‐to‐high transition of the output voltage vY.
First, let all the inputs of the gate be high. Then the BJTs Q1, Q2, and Q3 will be in the reverse‐active, saturation, and saturation modes, respectively, so that the output voltage can be
What difference does the additional BJT(Q4)‐diode(D) pair make in comparison with RC alone? It is expected to cut off the current iRC so that RC can dissipate no power during the low state of the output. Such an expectation comes true because the voltage difference between B4 and C3 (or Y)
is not high enough to turn on Q4‐D. (It would be not the case without D.)
Now, suppose that at least one of the inputs becomes low. Then the BJTs Q1, Q2, and Q3 operate in the saturation, cutoff, and cutoff modes, respectively, so that the voltage vB4 = vC2 can be pulled up high via R2 enough to turn on (saturate) Q4‐D where the output voltage (across CL) will remain at 0.2 V for the moment since the capacitor voltage cannot change instantaneously. Then CL will be charged by the emitter current of Q4 (saturated)
till iE4 becomes almost zero and accordingly, Q4 and D are just at the cut‐in condition with vBE4=VBE,offset=0.6 and vD=VD,offset=0.5 so that the output will reach
(A4)
In Figure 3.51, suppose the output voltage of the driver gate is high, i.e. vY = 3.9 V with Q2/Q3/Q4 (in the current stage) cutoff/cutoff/saturated~cut‐in, which lets the load current of (Eq. (3.3.43)) flow into N load gates in the next stage. The BJT Q4 is supposed to use its emitter current iE4 = βFiB4 to supply this load current while the output voltage obtained by subtracting the voltage drops R2iR2 = R2iB4, VBE4,sat, and VD,on from VCC should be higher than the minimum output voltage 3 V (corresponding to logic 1):
Therefore, the output‐high fan‐out of the TTL NAND gate with a totem‐pole output stage of Figure 3.51 is 133. Compare this with Eq. (3.3.45) for the NAND gate without the totem‐pole output stage.
In Figure 3.51, suppose the output voltage of the driver gate is low, i.e. vY = VCE,sat = 0.2 V with Q2/Q3/Q4 (in the current stage) saturated/saturated/cutoff. In order for the saturation mode of Q3 not to be disturbed by the load current (flowing from the load gate), the condition described by Eq. with iRC = 0 should be satisfied:
Compare this with Eq. (3.3.48) for the NAND gate without the totem‐pole output stage.
Figure 3.52(a)/(b) shows the PSpice schematic and its simulation result (for Transient Analysis with maximum stepsize 1 ns) of the TTL NAND gate with a totem‐pole output stage depicted in Figure 3.51. Here are several observations about the simulation result (Figure 3.52(b)) where one of the two input voltages is fixed as 4 V(HIGH) and the other v1(t) is a rectangular pulse plotted as a green line:
The output impedance of the TTL NAND gate (with totem‐pole output stage) is very low irrespective of whether its output is HIGH or LOW. In most cases, the low output impedance is desired because it contributes towards improving the fan‐out capability by reducing the loading effect. However, in the case of bus contention where different gates attempt to drive a wired‐OR output (as depicted in Figure 3.53(a)) into different logic states, the low output impedance is not good because it may cause an excessive current to flow from HIGH‐output gates to LOW‐output gates. Against such a happening, open‐collector outputs (as depicted in Figure 3.53(b)) can be used where each one of the gates with an open‐collector output drives the wired‐OR output LOW if it wants a LOW output; otherwise it lets its output float (leaving up to other gates’ decision) so that the wired‐OR output can be pulled up HIGH (via an external pull‐up resistor connected to VCC) only when no gate pulls down the output by asserting LOW.
Another measure against bus contention is to use the tristate output illustrated in Figure 3.53(c) where if the (low‐active) Disable input is 0.2 V (LOW), the BJTs Q1, Q2, and Q3 are in the saturation, cutoff, and cutoff modes, respectively, and the diode D is ON so that vB4=vDis+vD,ON=0.2+0.7=0.9[V]. This voltage will turn on just Q4‐R4 so that vB5=vB4−0.7=0.2[V]. This voltage is not sufficient to turn on Q5. Thus, both Q3 and Q5 are OFF so that the gate can let its output float with a very high output resistance when is low. Otherwise, i.e. if is high, the gate performs a usual NAND function. This gate is said to have a tristate or three‐state output because it presents three outputs, i.e. HIGH, LOW, and FLOAT (high impedance) states. The input is used to select only one gate among the gates that are wired‐OR connected. Note that the tristate outputs must be pulled up or down to keep the output from being floated, i.e. indeterminate or in the high impedance (Hi‐Z) state when all the drivers are disabled.
Figure 3.54 shows an ECL (Emitter‐Coupled Logic) OR/NOR gate, which consists of a differential amplifier using emitter‐coupled pair (Section 3.1.11), a reference voltage supplier, and a level shifter. Compared with the TTL family, the ECL family achieves very fast switching and short propagation delays by keeping the BJTs in the forward‐active mode (away from the saturation mode) so that there can be no excessive stored charge to remove quickly. However, it exhibits more power consumption, reduced noise margin, smaller voltage swing, and higher fan‐out capability.
Here is a rough analysis of the ECL circuit in Figure 3.54, which is designed to have all the BJTs operate in the forward‐active mode although the two input BJTs Q1 and Q2 may be saturated when the corresponding input voltage vi1/vi2 is much higher than Vref = 2.25 [V] supplied to the base B3 of Q3. The reference voltage supplier consisting of RC4‐Q4‐R4‐Q8‐R8 supplies the nodes B3 and B7 with
The BJT Q7, given vB7 = 1.15 [V] at its base terminal B7, produces its emitter current
so that Q7 makes the current iC7 = αFiRE/(1 + αF) ≈ 1.75 [mA] through Q1|Q2|Q3‐Q7‐RE like a current source of 1.75 [mA]. This current iC7 ≈ 1.75 [mA] will flow through RC (with Q1 and/or Q2 in the forward‐active mode and Q3 in the cutoff mode) if any one of the two inputs vi1 and vi2 is higher than vB4 = 2.25[V]= Vref; otherwise, i.e. none of the inputs is higher than vB4 = 2.25[V] = Vref, the current iC7 ≈ 1.75 [mA] will flow through RC3 (with Q1 and Q2 in the cutoff mode and Q3 in the forward‐active mode). In the former case, the emitter voltages of Q5 and Q6 will be
In the latter case, the emitter voltages of Q5 and Q6 will be
As an exception, when the input voltage vi1/vi2 is much higher than Vref = 2.25[V] (supplied to the base B3 of Q3), the corresponding BJT Q1|Q2 will be saturated with vCE ≤ 0.2[V] so that vNOR will rise with the input voltage vi:
This rough analysis results are supported by the VTC that is obtained from the PSpice simulation (with DC Sweep analysis type) and depicted in Figure 3.55(b1). Note that the input voltages vi1/vi2 applied to the ECL gates should never be much higher than Vref = 2.25 [V] to keep the BJTs Q1|Q2 from being saturated.
Figure 3.55(b2) shows the power dissipations of each part that are obtained by attaching the Power Markers (Probes) to the parts or using the Trace>Add_Trace menu. For example, to see the sum of the powers dissipated by the reference voltage supplier (consisting of RC4‐Q4‐R4‐Q3‐RC4), you should type the following expression into the Trace Expression field in the lower part of the Add Traces dialog box opened by selecting the Trace>Add Trace menu in the PSpice A/D (Probe) Window (see Appendix D.2.8):
W(RC4)+W(Q4)+W(R4)+W(Q8)+W(R8) |
The power curve of Q1|Q2 plotted in gray tells us that Q1|Q2 will dissipate less power if they transit from the forward‐active mode into the saturation mode as the corresponding input voltages applied to their base terminals become much higher than Vref = 2.25[V].
This section will show how a CE amplifier (Figure 3.30(a)) with a desired voltage gain Av,d or CC amplifier (Figure 3.32(a)) with a desired input resistance Ri,d can be designed, i.e. how the values of resistors constituting the circuits can be determined to satisfy the design specification.
To maximize the AC swing of output voltage vo along the AC load line (see Figure 3.56.2) of CE amplifier (Figure 3.56.1(a)), it may be good to set the collector current IC,Q and collector‐to‐emitter voltage VCE,Q of BJT at the operating point Q as half the maximum collector current and about one third of VCC, respectively, and also to determine such a value of RC that the iC intercept of the AC load line can be about 2IC,Q:
Here, RE1, which is a part of the AC resistance , has been neglected because it is presumably much less than (RC||RL) as well as has not yet been determined.
Then, in the DC equivalent circuit, the emitter and collector resistors are supposed to share the voltage drop VCC−VCE,Q = (1−KC)VCC:
where
Now, to determine the resistances R1 and R2 of DC biasing circuit (Figure 3.56.1(b)), we let the equivalent base resistance RB=R1||R2 be 1/10 times the equivalent emitter resistance (βF+1)RE:
Then, the equivalent base voltage source VBB and the biasing resistances R1 and R2 are determined as follows:
Now, with the transconductance gm and base‐emitter resistance rbe
Eq. (3.2.3) is used to determine the dual emitter resistance [RE1, RE2] so that the desired voltage gain Av,d can be achieved:
Note that the minimum power ratings of R1, R2, RC, RE1, and RE2 should be
This procedure of designing a CE amplifier with a specified voltage gain Av,d gain has been cast into the following MATLAB function ‘BJT_CE_design()
’ where the default values of design constant Kc and ambient temperature T are set to 1/3 and 27 [oC], respectively.
function [R1,R2,RC,RE1,RE2,PRs]= ...
BJT_CE_design(VCC,beta,rb,AvdRB,ICQ,RL,T,Kc)
% Design a CE amp with given Avd (possibly & RB) at Q=(VCEQ=KC*VCC,ICQ).
% Avd_RB=Avd or [Avd RB]
% Output: PRs=[PR1 PR2 PRC PRE1 PRE2]: Power ratings of R1,R2,RC,RE1,RE2
% Copyleft: Won Y. Yang, [email protected], CAU for academic use only
if nargin<8, Kc=1/3; end % Design constant s.t. VCQ=Kc*VCC;
if nargin<7, T=27; end % Ambient temperature
betaF=beta(1); if numel(beta)>1, betaAC=beta(2); else betaAC=betaF; end VCEQ=Kc*VCC; % Eq. (3.4.1)
RC=max(1/(ICQ/VCEQ-1/RL),10); RE=(1-Kc)*VCC/ICQ-RC; % Eq. (3.4.2,3)
IEQ=(betaF+1)*ICQ/betaF; IBQ=ICQ/betaF; % Eq. (3.4.4)
Avd=AvdRB(1);
if numel(AvdRB)>1, RB=AvdRB(2); else RB=(betaF+1)*RE/10; end % Eq. (3.4.5)
VBEQ=0.7; VBB=RE*IEQ+VBEQ+RB*IBQ; % Eq. (3.4.6)
R1=RB/VBB*VCC; R2=RB/(VCC-VBB)*VCC; % Eq. (3.4.7a,b)
gm=ICQ*11605/(273+T); rbe=betaF/gm; % Eq. (3.4.8)
RE1=max((betaAC*parallel_comb([RC RL])/abs(Avd)-rb-rbe)/(betaAC+1),0);
RE2=RE-RE1; % Eq. (3.4.9)
PR1=(VCC-VBB)^2/R1; PR2=VBB^2/R2; PRC=RC*ICQ^2;
PRE1=RE1*IEQ^2; PRE2=RE2*IEQ^2; % Eq. (3.4.10)
PRs=[PR1 PR2 PRC PRE1 PRE2]; % Power ratings of R1,R2,RC,RE1, and RE2
if RE2<10
if RC>10&(abs(Avd)<betaAC*parallel_comb([RC RL])/(rb+rbe))
disp('Try again with smaller/larger values of ICQ/VCC')
[R1,R2,RC,RE1,RE2,PRs]= ...
BJT_CE_design(VCC,beta,rb,AvdRB,0.9*ICQ,RL,T,Kc);
else error('Try with a higher VCC or another TR having a larger beta.')
end
else
disp('Design Results')
disp(' R1 R2 RC RE1 RE2 Avd')
fprintf('%8.0f %8.0f %8.0f %8.0f %8.0f %8.0f ', R1,R2,RC,RE1,RE2,Avd)
end
%design_CE_BJT.m
betaF=189; betaR=6; betaAC=189; rb=10; VA=100;
VCC=18; Vsm=0.1; Rs=50; RL=10000;
Avd=20; ICQ=0.02; % Design parameters
[R1,R2,RC,RE1,RE2]=BJT_CE_design(VCC,[betaF betaAC],rb,Avd,ICQ,RL);
[VBQ,VEQ,VCQ,IBQ,IEQ,ICQ,Av]=BJT_CE_analysis(VCC,rb,Rs,R1,R2,RC, ...
[RE1 RE2],RL,[betaF,betaR,betaAC],Vsm,VA);
To use the function for designing a CE BJT (Q2N2222) amplifier with voltage gain Av,d = ‐
20, we run the above MATLAB script “design_CE_BJT.m,” which yields
>>design_CE_BJT
Design Results
R1 R2 RC RE1 RE2 Avd
13945 9147 309 14 277 20
Results of analysis using the PWL model
VCC VEE VBB VBQ VEQ VCQ IBQ IEQ ICQ
18.00 0.00 7.13 6.55 5.85 11.81 1.06e-04 2.01e-02 2.00e-02
gm= 773.667[mS], rbe= 244[Ohm], ro= 5.00[kOhm]
Gv=Ri/(Rs+Ri)xAv= 0.974 x -19.88 = -19.37
These results mean the following values of the resistances of designed CE amplifier:
where the BJT parameters, the source/load resistances, and VCC are given as
The results of using ‘BJT_CE_analysis()
’ (see Section 3.2.1) to analyze the designed circuit are
with the expected voltage gain −19.37, transconductance gm = 0.774, and BEJ resistance rbe = 244 Ω.
Figure 3.57(a) and (b) shows the PSpice schematic of the designed CE amplifier and its simulation results. Although the resulting voltage gain Av,PSpice = −3.7172/0.2 = −18.6 is somewhat smaller than Av,d = −20 required by the design specification, the difference is not so big as to damage the reliability of the MATLAB design and analysis functions.
Let us consider how to determine the values of resistors constituting the CC amplifier (Figure 3.58(a)) such that the input resistance (Eq. (3.2.5)) has a given value Ri,d.
To maximize the AC swing of output voltage vo, it may be good to let the C‐E junction and RE share the applied voltage VCC half and half (at the operating point Q) in the DC equivalent circuit (Figure 3.58(b) or (c)) so that
KVL around the VBB‐RB‐0.7 V‐VE loop yields
From Eqs. (3.4.15b) and (3.4.16), we can have the expressions of RE and RB in terms of IC,Q as
function [R1,R2,RE,PRs]=BJT_CC_design(VCC,beta,rb,RidVBB,RL,T,ICmax)
%Design a CC amp with given Rid (possibly & VBB) at Q=(VCEQ=KC*VCC,ICQ).
% Output: PRs=[PR1 PR2 PRE]: Power ratings of R1, R2, RE
% Copyleft: Won Y. Yang, [email protected], CAU for academic use only
if nargin<7, ICmax=0.8; end % Maximum collector current
if nargin<6, T=27; end % Ambient temperature
betaF=beta(1); if numel(beta)>1, betaAC=beta(2); else betaAC=betaF; end
Rid=RidVBB(1); if numel(RidVBB)>1, VBB=RidVBB(2); else VBB=VCC; end
IC=[1/100:1/1000:1]*ICmax; % Range of collector current
REs=VCC/2./IC; %Eq. (3.4.17a)
RBs=betaF*(VCC/2-0.7)./IC; % Eq. (3.4.17b)
gms=IC*11605/(273+T); rbes=betaF./gms; % Eq. (3.4.8)
Ris=(betaAC+1)*REs*RL./(REs+RL)+rb+rbes; % Eq. (3.2.5)
[tmp,i]=min(abs(RBs.*Ris./(RBs+Ris)-Rid)); % Eq. (3.4.14)
ICQ=IC(i); IBQ=ICQ/betaF; IEQ=(betaF+1)*IBQ;
RE=REs(i); RB=RBs(i); Ri=Ris(i); VB=VBB-RB*IBQ;
R1=min(RB/VBB*VCC,1e9); R2=min(RB/(VCC-VBB)*VCC,1e9); % Eq. (3.4.7a,b)
PRs=[(VCC-VB)^2/R1 VB^2/R2 RE*IEQ^2]; % Power ratings of R1 and RE
if i==1 % ICQ=ICmax/100
disp('Try again with another BJT with larger current gain beta!')
else disp('Design Results'), disp(' R1 RE Rid ICQ')
fprintf('%8.0f %8.0f %8.0f %8.5f ', R1,RE,Rid,ICQ)
end
where R2 has been assumed to be open‐circuited to maximize the range of RB. Then it is key to choose IC,Q from the range (IC,max/100, IC,max/2) such that Eq. (3.4.14) with Eqs. (3.4.17a,b) can be satisfied. Once such a value of IC,Q is determined, the resistances RE, R1=RB, the resulting input resistance Ri, and the output resistance Ro can be computed using Eqs. where Eqs. (3.4.14) (or Eq. (3.2.5)) and (3.2.8) have been coded in the MATLAB function ‘BJT_CC_analysis()
’. However, if IC,Q turns out to be small enough to endanger the swing of AC collector current, i.e.
then another BJT with larger current gain βF should be used. This procedure of designing a CC amplifier with a specified input resistance Ri,d has been cast into the above MATLAB function ‘BJT_CC_design()
’ where the default values of IC,max and ambient temperature T are set to 0.8 and 27[°C], respectively.
%design_CC_BJT.m
betaF=200; betaR=6; betaAC=200; rb=10; VA=100;
VCC=18; Vsm=0.01; Rs=50; RC=0; RL=5000;
Rid=5e4; RidVBB=[Rid VCC]; % Desired input resistance wnd VBB=VCC
[R1,R2,RE]=BJT_CC_design(VCC,[betaF betaAC],rb,RidVBB,RL);
[VBQ,VEQ,VCQ,IBQ,IEQ,ICQ,Av,Ai,Ri,Ro]=BJT_CC_analysis(VCC,rb,Rs,
R1,R2, RC,RE,RL,[betaF,betaR,betaAC],Vsm,VA);
To use the function for designing a CC BJT (Q2N2222) amplifier with input resistance, Ri,d = 50 kΩ, we run the above MATLAB script “design_CC_BJT.m,” which yields
>>design_CC_BJT
Design Results
R1 RE Rid ICQ
98810 536 50000 0.01680
Analysis Results
VCC VBQ VEQ VCQ IBQ IEQ ICQ
18.00 9.72 9.02 18.00 8.38e-005 1.68e-002 1.68e-002
in the forward-active mode with VCE,Q= 8.98
Ri= 47.175[kOhm], Ro= 2[Ohm]
Gv=Ri/(Rs+Ri)xAv = 0.999 x 1.00 = 1.00
These results mean the following values of the resistances of the designed CC amplifier:
where the BJT parameters, the source/load resistances, and VCC are given as
The results of using ‘BJT_CC_analysis()
’ (see Section 3.2.2) to analyze the designed circuit are
'Is the input resistance Ri = 47.175 kΩ of designed CC amplifier close to Ri,d = 50 kΩ?
Figure 3.59(a) and (b) shows the PSpice schematics and their simulation results for measuring the input/output resistances of the designed circuit. The PSpice measured input resistance Ri,PSpice = Vs/Is − Rs = 0.1 V/1.984 μA − 50 Ω = 50.35 kΩ is very close to Ri,d = 50 kΩ required by the design specification. The PSpice measured output resistance Ro,PSpice = 0.1 V/62.793 mA = 1.59 Ω is close to Ro = 1.8 Ω predicted by the MATLAB analysis result.
In this section, we will find the transfer function G(s) = Vo(s)/Vi(s) and frequency response G(jω) for a CE amplifier, a CC amplifier, and a CB amplifier with the BJT replaced by the high‐frequency small‐signal model shown in Figure 3.18(a).
Figure 3.60(a) and (b) shows a CE amplifier circuit and its high‐frequency small‐signal equivalent, respectively, where one more load capacitor CLL, in addition to the output capacitor CL, is connected in parallel with the load resistor RL. For the equivalent circuit shown in Figure 3.60(b), a set of three node equations in V1, V2 = Vc, and V3 = Ve can be set up as
where
Here, INt and YB are the values of Norton current source and admittance looking back into the source part from terminals 1 to 0 as shown in Figure 3.60(c1) and (c2). This equation can be rearranged into a solvable form with all the unknown terms on the LHS as
and solved for V1, V2, and V3. Then the transfer function and frequency response can be found as
This process to find the transfer function and frequency response has been cast into the following MATLAB function ‘BJT_CE_xfer_ftn()
’.
function [Gs,Av,Ri,Ro,Gw,Cbe,Cbc]=...
BJT_CE_xfer_ftn(VCC,Rs,Cs,R1,R2,RC,RECE,CL,RLCLL,beta,CVbm,rb,VA,T,w)
%To find the transfer function/frequency response of a CE amplifier
% RECE=[RE1 RE2 CE], RLCLL=[RL CLL] with RL and CLL in parallel
% beta=[betaF betaR betaAC]
% CVbm=[Cbe0,Cbc0,Vb,m]: BEJ|BCJ zero-base capacitance, Junction potential
% Copyleft: Won Y. Yang, [email protected], CAU for academic use only
if nargin<14, T=27; end % Ambient temperature
if nargin<13, VA=1e4; end
if nargin<, rb=0; end
Cbe0=CVbm(1); Cbc0=CVbm(2);
if numel(CVbm)<3, Vb=0.7; m=0.5; else Vb=CVbm(3); m=CVbm(4); end
RL=RLCLL(1); if numel(RLCLL)<2, CLL=0; else CLL=RLCLL(2); end
if length(RECE)==1, RE1=0; RE2=RECE; CE=0;
elseif length(RECE)==2, RE1=RECE(1); RE2=RECE(2); CE=0;
else RE1=RECE(1); RE2=RECE(2); CE=RECE(3);
end
syms s; ZL=parallel_comb([RL 1/s/CLL]); RE=[RE1 RE2]; Vsm=0.001;
[VBQ,VEQ,VCQ,IBQ,IEQ,ICQ,Av,Ai,Ri,Ro,gm,rbe,ro]=...
BJT_CE_analysis(VCC,rb,Rs,R1,R2,RC,RE,RL,beta,Vsm,VA,T);
Cbe=Cbe0/(1-(VBQ-VEQ)/Vb)^m; Cbc=Cbc0/(1-(VBQ-VCQ)/Vb)^m; % Eq. (3.5.5)
sCs=s*Cs; sCE=s*CE; sCL=s*CL; sCbe=s*Cbe; sCbc=s*Cbc;
Zs=Rs+1/sCs; Ys=1/Zs; % Eq. (3.5.2c)
RB=parallel_comb([R1 R2]); GB=1/RB;
YC=1/parallel_comb([RC ZL+1/sCL]); % Admittance at terminal C (Eq. (3.5.2d))
YB=1/(1/(Ys+GB)+rb); % Admittance at terminal B
if RE1+RE2>0
YE=1/(RE1+1/(1/RE2+sCE)); % Admittance at terminal E (Eq. (3.5.2e))
Y=[YB+1/rbe+sCbe+sCbc -sCbc -1/rbe-sCbe;
-sCbc+gm sCbc+1/ro+YC -1/ro-gm;
-1/rbe-sCbe-gm -1/ro 1/rbe+sCbe+1/ro+YE+gm];
V=Y[RB/(Zs+RB)*YB; 0; 0]; % Eq. (3.5.3) with Eq. (3.5.2a)
else % without RE
Y=[YB+1/rbe+sCbe+sCbc -sCbc; -sCbc+gm sCbc+1/ro+YC];
V=Y[RB/(Zs+RB)*YB; 0];
end
Gs=V(2)*ZL/(1/sCL+ZL); % Transfer function Vo(s)/Vs(s) Eq. (3.5.4)
if nargin>14, Gw=subs(Gs,'s',j*w); else Gw=0; end % Frequency response
Note the following about the internal capacitances of a BJT, the base‐to‐emitter capacitance Cbe, the base‐to‐collector capacitance Cbc, and the collector‐to‐emitter capacitance Cce [W-7]:
Referring to Figure 3.61, four break (pole or corner) frequencies determining roughly the frequency response magnitude can be determined as [R-2]
Note the following about these four break frequencies:
Note also that Ri/Ro are the input/output resistances of the CE amplifier, respectively, and Cm/Cn are the Miller equivalent capacitances for capacitor Cbc seen from the input/output sides, respectively (see Eq. (1.4.2)):
The following MATLAB function ‘break_freqs_of_CE()
’ uses Eqs. (3.5.6a,b) to find the four break frequencies:
function fc=break_freqs_of_CE(Rs,Cs,CL,RL,CLL,Cbc,Cbe,Av,Ri,Ro)
% To find the 4 break frequencies of a CE amplifier
RsRi=parallel_comb([Rs Ri]); RoRL=parallel_comb([Ro RL]);
Cm=Cbc*(1-Av); % Eq. (3.5.7a)
Cn=Cbc*(1-1/Av); % Eq. (3.5.7b)
fc(1)=1/2/pi/Cs/(Rs+Ri); % Eq. (3.5.6a)
fc(2)=1/2/pi/CL/(Ro+RL); % Eq. (3.5.6b)
fc(3)=1/2/pi/(Cbe+Cm)/RsRi; % Eq. (3.5.6c)
fc(4)=1/2/pi/(CLL+Cn)/RoRL; % Eq. (3.5.6d)
Consider the CE circuit in Figure 3.62(a) where VCC = 12 V, Rs = 1 kΩ, Cs = 1 μF, R1 = 300 kΩ, R2 = 160 kΩ, RC = 22 kΩ, RE1 = 3 kΩ, RE2 = 10 kΩ, CE = 10 μF, CL = 1 μF, RL = 100 kΩ, CLL = 1 nF, and the BJT parameters are βF=100, βR = 1, βAC=100, VA=104 V, Is = 10−14 A, rb = 0 Ω, Cbe(Cje)=10 pF, Cbc(Cjc)=1pF, Vb(Vj) = 0.7 V, and m(Mj) = 0.5. Plot the frequency response for f = 1∼100 MHz and see how close it is to the PSpice simulation result. Also estimate the lower and upper 3 dB frequencies.
We can use the MATLAB function ‘BJT_CE_xfer_ftn()
’ to find the frequency response and plot its magnitude curve (as Figure 3.62(c)) by running the following MATLAB statements:
>>VCC=12; Rs=1e3; R1=3e5; R2=160e3; RC=22e3; RE=[3e3 10e3]; RL=1e5;
rb=0; Cs=1e-6; CE=1e-5; CL=1e-6; CLL=1e-8;
Is=1e-14; betaF=100; betaR=1; betaAC=betaF;
Cbe0=1e-11; Cbc0=1e-12; Vb=0.7; m=0.5; VA=1e4; T=27;
beta=[betaF betaR betaAC Is]; CVbm=[Cbe0 Cbc0 Vb m];
RECE=[RE CE]; RLCLL=[RL CLL]; % CL|CLL=Inf|0; without CL|CLL
f=logspace(0,8,801); w=2*pi*f; % Frequency range
[Gs,Av,Ri,Ro,Gw,Cbe,Cbc]=...
BJT_CE_xfer_ftn(VCC,Rs,Cs,R1,R2,RC,RECE,CL,RLCLL,beta,CVbm,rb,VA,T,w);
GmagdB=20*log10(abs(Gw)+1e-10); % Frequency response magnitude in dB
semilogx(f,GmagdB), hold on; Gmax=max(GmagdB);
fc=break_freqs_of_CE(Rs,Cs,CL,RL,CLL,Cbc,Cbe,Av,Ri,Ro);
fprintf(' fc1=%12.3e, fc2=%12.3e, fc3=%12.3e, and fc4=%12.3e ', fc);
semilogx(fc(1)*[1 1],[0 Gmax-3],'b:', fc(2)*[1 1],[0 Gmax-3],'g:',
fc(3)*[1 1],[0 Gmax-3],'r:', fc(4)*[1 1],[0 Gmax-3],'m:')
This yields Figure 3.62(c) and the values of the four break frequencies as follows:
fc1= 2.007e+00, fc2= 1.305e+00, fc3= 4.956e+06, and fc4= 8.829e+02
from which we can get rough estimates of the lower/upper 3 dB frequencies as the second/third highest frequencies fcl = 2 Hz and fcu = 883 Hz, respectively.
Figure 3.63(a) and (b) shows a CC amplifier circuit and its high‐frequency small‐signal equivalent, respectively, where one more load capacitor CLL, in addition to the output capacitor CL, is connected in parallel with the load resistor RL. For the equivalent circuit shown in Figure 3.63(b), a set of three node equations in V1, V2 = Ve, and V3 = Vc can be set up as
where
function [Gs,Av,Ri,Ro,Gw,Cbe,Cbc]=...
BJT_CC_xfer_ftn(VCC,Rs,Cs,R1,R2,RC,RE,CL,RLCLL,beta,CVbm,rb,VA,T,w)
%To find the transfer function/frequency response of a CC amplifier
% RLCLL=[RL CLL] with RL and CLL in parallel
% CVbm=[Cbe0,Cbc0,Vb,m]: BEJ|BCJ zero-base capacitances, Junction potential
% Copyleft: Won Y. Yang, [email protected], CAU for academic use only
if nargin<14, T=27; end % Ambient temperature
if nargin<13, VA=1e4; end
if nargin<12, rb=0; end
Cbe0=CVbm(1); Cbc0=CVbm(2);
if numel(CVbm)<3, Vb=0.7; m=0.5; else Vb=CVbm(3); m=CVbm(4); end
RL=RLCLL(1); if numel(RLCLL)<2, CLL=0; else CLL=RLCLL(2); end
syms s; ZL=parallel_comb([RL 1/s/CLL]); Vsm=0.001;
[VBQ,VEQ,VCQ,IBQ,IEQ,ICQ,Av,Ai,Ri,Ro,gm,rbe,ro]=...
BJT_CC_analysis(VCC,rb,Rs,R1,R2,RC,RE,RL,beta,Vsm,VA,T);
Cbe=Cbe0/(1-(VBQ-VEQ)/Vb)^m; Cgd=Cgd0/(1-(VBQ-VCQ)/Vb)^m; % Eq. (3.5.5)
sCs=s*Cs; sCL=s*CL; sCbe=s*Cbe; sCbc=s*Cbc;
Zs=Rs+1/sCs; Ys=1/Zs; % Eq. (3.5.8c)
RB=parallel_comb([R1 R2]); GB=1/RB;
YE=1/parallel_comb([RE ZL+1/sCL]); % Admittance at terminal C (Eq. (3.5.9d))
YB=1/(1/(Ys+GB)+rb); % Admittance at terminal B
if RC>0
Y=[YB+1/rbe+sCbe+sCbc -1/rbe-sCbe -sCbc;
-1/rbe-sCbe-gm 1/rbe+sCbe+1/ro+YE+gm -1/ro;
-sCbc+gm-1/ro-gm sCbc+1/ro+1/RC];
V=Y[RB/(Zs+RB)*YB; 0; 0]; % Eq. (3.5.8) with Eq. (3.5.9a)
else % without RC
Y=[YB+1/rbe+sCbe+sCbc -1/rbe-sCbe;
-1/rbe-sCbe-gm 1/rbe+sCbe+1/ro+YE+gm];
V=Y[RB/(Zs+RB)*YB; 0];
end
Gs=V(2)*ZL/(ZL+1/sCL); % Transfer function Vo(s)/Vs(s)
if nargin>14, Gw=subs(Gs,'s',j*w); else Gw=0; end % Frequency response
Solving this set of equations, we can find the transfer function and frequency response as
This process to find the transfer function and frequency response has been cast into the above MATLAB function ‘BJT_CC_xfer_ftn()
’.
There are four break (pole or corner) frequencies determining roughly the frequency response magnitude:
where Ri/Ro are the input/output resistances of the CC amplifier, respectively, and Cm/Cn are the Miller equivalent capacitances for capacitor Cbe seen from the input/output side, respectively (see Eq. (1.4.2)):
Note that Eq. (3.5.11) is just like Eq. (3.5.6) with Cbc and Cbe switched.
The following MATLAB function ‘break_freqs_of_CC()
’ uses Eqs. (3.5.11a,b) to find the four break frequencies:
function fc=break_freqs_of_CC(Rs,Cs,CL,RL,CLL,Cbc,Cbe,Av,Ri,Ro)
% To find the 4 break frequencies of a CC amplifier
RsRi=parallel_comb([Rs Ri]); RoRL=parallel_comb([Ro RL]);
Cm=Cbe*(1-Av); % Eq. (3.5.12a)
Cn=Cbe*(1-1/Av); % Eq. (3.5.12b)
fc(1)=1/2/pi/Cs/(Rs+Ri); % Eq. (3.5.11a)
fc(2)=1/2/pi/CL/(Ro+RL); % Eq. (3.5.11b)
fc(3)=1/2/pi/(Cbc+Cm)/RsRi; % Eq. (3.5.11c)
fc(4)=1/2/pi/(CLL+Cn)/RoRL; % Eq. (3.5.11d)
Consider the CE circuit in Figure 3.60(a) where VCC = 12 V, Rs = 1 kΩ, Cs = 1 μF, R1 = 300 kΩ, R2 = 160 kΩ, RC = 0 kΩ, RE = 13 kΩ, CL = 1 μF, RL = 100 kΩ, CLL = 1 nF, and the BJT parameters are βF = 100, βR = 1, βAC = 100, VA = 104 V, Is = 10−14 A, rb = 0 Ω, Cbe(Cje) = 10 pF, Cbc(Cjc) = 1 pF, Vb(Vj) = 0.7 V, and m(Mj) = 0.5. Plot the frequency response for f = 1∼100 MHz and estimate the lower and upper 3 dB frequencies.
We can use the MATLAB function ‘BJT_CC_xfer_ftn()
’ to find the frequency response and plot its magnitude curve (as Figure 3.64(c)) by running the following MATLAB statements:
>>VCC=12; Rs=1e3; R1=3e5; R2=160e3; RC=0; RE=13e3; RL=1e5;
Cs=1e-6; CL=1e-6; CLL=1e-8;
betaF=100; betaR=1; betaAC=betaF; Is=1e-14;
rb=0; Cbe0=1e-11; Cbc0=1e-12; Vb=0.7; m=0; VA=1e4; T=27;
beta=[betaF betaR betaAC Is]; CVbm=[Cbe0 Cbc0 Vb m];
RLCLL=[RL CLL]; % CL|CLL=Inf|0; without CL|CLL
f=logspace(0,8,801); w=2*pi*f; % Frequency range
[Gs,Av,Ri,Ro,Gw,Cbe,Cbc]= BJT_CC_xfer_ftn...
(VCC,Rs,Cs,R1,R2,RC,RE,CL,RLCLL,beta,CVbm,rb,VA,T,w);
GmagdB=20*log10(abs(Gw)+1e-10); % Frequency response magnitude in dB
semilogx(f,GmagdB), hold on; Gmax=max(GmagdB);
fc=break_freqs_of_CC(Rs,Cs,CL,RL,CLL,Cbc,Cbe,Av,Ri,Ro);
fprintf(' fc1=%12.3e, fc2=%12.3e, fc3=%12.3e, and fc4=%12.3e ',fc);
semilogx(fc(1)*[1 1],[0 Gmax-3],'b:', fc(2)*[1 1],[0 Gmax-3],'g:',
fc(3)*[1 1],[0 Gmax-3],'r:', fc(4)*[1 1],[0 Gmax-3],'m:')
This yields Figure 3.64(c) and the values of the four break frequencies as follows:
fc1= 1.644e+00, fc2= 1.590e+00, fc3= 2.974e+08, and fc4= 1.437e+05
from which we can get rough estimates of the lower/upper 3 dB frequencies as the second/third highest frequencies fcl=1.644 Hz and fcu=143.7 kHz, respectively.
Figure 3.65(a) and (b) shows a CB amplifier circuit and its high‐frequency small‐signal equivalent, respectively, where one more load capacitor CLL, in addition to the output capacitor CL, is connected in parallel with the load resistor RL. Note that if the terminal B(ase) is not AC grounded via a capacitor CB, we should let CB = 0 in Figure 3.65(b). For the equivalent circuit shown in Figure 3.65(b), a set of three node equations in V1 = Ve, V2 = Vc, and V3 = Vb can be set up as
where
function [Gs,Av,Ri,Ro,Gw,Cbe,Cbc,gm,rbe,ro]=...
BJT_CB_xfer_ftn(VCC,Rs,Cs,R1,R2,CB,RC,RE,CL,RLCLL,beta,CVbm,rb,VA,T,w)
%To find the transfer function/frequency response of a CB amplifier
% CB must be set to 0 if B is not AC grounded via a capactor CB.
% RLCLL=[RL CLL] with RL and CLL in parallel
% CVbm=[Cbe0,Cbc0,Vb,m]: BEJ|BCJ zero-base capacitances, Junction potential
% Copyleft: Won Y. Yang, [email protected], CAU for academic use only
if nargin<15, T=27; end % Ambient temperature
if nargin<14, VA=1e4; end
if nargin<13, rb=0; end
Cbe0=CVbm(1); Cbc0=CVbm(2);
if numel(CVbm)<3, Vb=0.7; m=0.5; else Vb=CVbm(3); m=CVbm(4); end
RL=RLCLL(1); if numel(RLCLL)<2, CLL=0; else CLL=RLCLL(2); end
syms s; ZL=parallel_comb([RL 1/s/CLL]); Vsm=0.001;
[VBQ,VEQ,VCQ,IBQ,IEQ,ICQ,Av,Ai,Ri,Ro,gm,rbe,ro]=...
BJT_CB_analysis(VCC,rb,Rs,R1,R2,RC,RE,RL,beta,Vsm,VA,T);
Cbe=Cbe0/(1-(VBQ-VEQ)/Vb)^m; Cgd=Cgd0/(1-(VBQ-VCQ)/Vb)^m; % Eq. (3.5.5)
sCs=s*Cs; sCL=s*CL; sCbe=s*Cbe; sCbc=s*Cbc; sCB=s*CB;
Zs=Rs+1/sCs; Ys=1/Zs;
RB=parallel_comb([R1 R2]); ZB=parallel_comb([RB 1/sCB]);
GE=1/RE; YE=Ys+GE;
YC=1/parallel_comb([RC 1/sCL+ZL]); % Impedance at terminal C
if rb+RB>0&CB<0.1
Y=[YE+sCbe+1/rbe+1/ro+gm -1/ro -sCbe-1/rbe-gm;
-1/ro-gm 1/ro+sCbc+YC -sCbc+gm;
-sCbe-1/rbe -sCbc sCbe+1/rbe+1/(rb+ZB)+sCbc];
V=Y[Ys; 0; 0]; % Eq. (3.5.13)
else % If rb=0 and (RB=0 or CB is so large that RB can be AC-shorted)
Y=[YE+sCbe+1/rbe+1/ro+gm -1/ro; -1/ro-gm 1/ro+sCbc+YC];
V=Y[Ys; 0];
end
Gs=V(2)*ZL/(ZL+1/sCL); % Transfer function Vo(s)/Vs(s)
if nargin>15, Gw=subs(Gs,'s',j*w); else Gw=0; end % Frequency response
Solving this set of equations, we can find the transfer function and frequency response as
This process to find the transfer function and frequency response has been cast into the above MATLAB function ‘BJT_CB_xfer_ftn()
’.
There are four break (pole or corner) frequencies determining roughly the frequency response magnitude:
where Ri/Ro are the input/output resistances of the CB amplifier, respectively, and
The following MATLAB function ‘break_freqs_of_CB()
’ uses Eqs. (3.5.16a,b) to find the four break frequencies:
function fc=break_freqs_of_CB(Rs,Cs,CL,RL,CLL,Cbc,Cbe,Av,Ri,Ro,Rbe)
% To find the 4 break frequencies of a CB amplifier
% Rbe = parallel_comb([RE+rb+RB rbe]) by Eq. (3.5.17)
RsRi=parallel_comb([Rs Ri]); RoRL=parallel_comb([Ro RL]);
fc(1)=1/2/pi/Cs/(Rs+Ri); fc(2)=1/2/pi/CL/(Ro+RL); % Eq. (3.5.16a,b)
fc(3)=1/2/pi/Cbe/Rbe; fc(4)=1/2/pi/CLL/RoRL; % Eq. (3.5.16c,d)
Consider the CB circuit in Figure 3.66(a) where VCC = 12 V, Rs = 1 kΩ, Cs = 1 μF, R1 = 300 kΩ, R2 = 160 kΩ, RC = 22 kΩ, RE = 13 kΩ, CL = 1 μF, RL = 100 kΩ, CLL=1 nF, and the BJT parameters are βF=100, βR=1, βAC=100, VA=104 V, Is = 10−14 A, rb = 0 Ω, Cbe(Cje) = 10 pF, Cbc(Cjc) = 1 pF, Vb(Vj) = 0.7 V, and m(Mj) = 0.5.
We can use the MATLAB function ‘BJT_CB_xfer_ftn()
’ to find the frequency response and plot its magnitude curve (as Figure 3.66(c)) by running the following MATLAB statements:
>>VCC=12; Rs=1e3; R1=3e5; R2=160e3; RC=22e3; RE=13e3; RL=1e5;
Cs=1e-6; CL=1e-6; CLL=1e-8; RLCLL=[RL CLL]; CB=0;
% CL|CLL=Inf|0; without CL|CLL
rb=0; betaF=100; betaR=1; betaAC=betaF; Is=1e-14;
Cbe0=1e-11; Cbc0=1e-12; Vb=0.7; m=0.5; VA=1e4; T=27;
beta=[betaF betaR betaAC Is]; CVbm=[Cbe0 Cbc0 Vb m];
f=logspace(0,8,801); w=2*pi*f; % Frequency range
[Gs,Av,Ri,Ro,Gw,Cbe,Cbc]= BJT_CB_xfer_ftn ...
(VCC,Rs,Cs,R1,R2,CB,RC,RE,CL,RLCLL,beta,CVbm,rb,VA,T,w);
GmagdB=20*log10(abs(Gw)+1e-10); % Frequency response magnitude [dB]
semilogx(f,GmagdB), hold on; Gmax=max(GmagdB);
This yields Figure 3.66(c). Then, to estimate the lower and upper 3 dB frequencies, run the following MATLAB statements:
>>RB=parallel_comb([R1 R2]);
Rbe=parallel_comb([RE+rb+RB*(CB<1) rbe]); % Eq. (3.5.17)
% If CB does not exist, its value should be set to 1 or larger.
fc=break_freqs_of_CB(Rs,Cs,CL,RL,CLL,Cbc,Cbe,Av,Ri,Ro,Rbe);
fprintf(' fc1=%12.3e, fc2=%12.3e, fc3=%12.3e, and fc4=%12.3e ',
fc); semilogx(fc(1)*[1 1],[0 Gmax-3],'b:', fc(2)*[1 1],[0 Gmax-3],'g:',
fc(3)*[1 1],[0 Gmax-3],'r:', fc(4)*[1 1],[0 Gmax-3],'m:')
This yields the four break frequencies as
fc1= 7.786e+01, fc2= 1.305e+00, fc3= 5.714e+05, and fc4= 8.830e+02
From these, we can get rough estimates of the lower/upper 3 dB frequencies as the second/third highest frequencies fcl = 77.86 Hz and fcu = 883 Hz, respectively.
Looking into the MATLAB function ‘break_freqs_of_CB()
’, we can see that fc4 stems from CLL. Interested readers are recommended to change CLL into 0.1 nF and see how the upper 3 dB frequency is changed.
In this section, let us see the time response of a basic BJT inverter (as shown in Figure 3.27(a1) or 3.67(b)) to logic low‐to‐high and high‐to‐low input transitions. About Figure 3.27(b1) illustrating the low‐to‐high and high‐to‐low propagation delays, one might wonder what makes the circuit seemingly not having any dynamic elements such as capacitors or inductors exhibit a dynamic time response to the piece wisely constant input. It stems from internal parasitic capacitances between the terminals of the BJT, whose effect becomes conspicuous as the frequency or slope of the input increases, while negligible for a DC or low‐frequency input.
Figure 3.67(a) shows a simple DC or large‐signal Spice model of a BJT where iC(vBE,vBC) and iB(vBE,vBC) are defined as Eqs. (3.1.23a,b), respectively, and
function [vo,vCbc,vCbe,iC,iB]=...BJT_inverter_dynamic(beta,Is,CC,RBb,RC,VCC,vi,dt,VT)
% Analyze an NPN-BJT inverter to find the output vo to an input vi
% which consists of an NPN-BJT and resistors RB/RC between vi/VCC and B/C.
% beta=[betaF betaR]; CC=[Cbe Cbc]; RBb=[RB rb]
% vo: Output voltage(s) to the input voltage(s) vi
betaF=beta(1); if numel(betaF)<2, betaR=1; else betaR=beta(2); end
Cbe=CC(1); Cbc=CC(2);
RB=RBb(1); if numel(RBb)<2, rb=0; else rb=RBb(2); end
alphaR=betaR/(betaR+1); Isc=Is/alphaR; % Collector-Base saturation current
iCv=@(vBE,vBC)Is*exp(vBE/VT)-Isc*exp(vBC/VT); % Eq. (3.1.23a)
iBv=@(vBE,vBC)Is/betaF*exp(vBE/VT)...+Isc/(betaR+1)*exp(vBC/VT); %Eq. (3.1.23b)
vCbc(1)=VCC; vCbe(1)=0; vB(1)=vi(1); % Initialize
for n=1:length(vi)
v1(n)=vCbe(n); vo(n)=v1(n)+vCbc(n); vBC(n)=vB(n)-vo(n); %Eq. (3.6.2a,b,d)
iC(n)=iCv(vB(n),vBC(n)); iB(n)=iBv(vB(n),vBC(n));
vB(n+1)=v1(n)+rb*iB(n); % Eq. (3.6.2c)
iCbc(n)=(VCC-vo(n))/RC-iC(n); % Eq. (3.6.1a)
vCbc(n+1)=vCbc(n)+iCbc(n)*dt/Cbc; % Eq. (3.6.3a)
iCbe(n)=(vi(n)-v1(n))/(RB+rb)+iCbc(n)-iB(n); % Eq. (3.6.1b)
vCbe(n+1)=vCbe(n)+iCbe(n)*dt/Cbe; % Eq. (3.6.3b)
end
vCbc=vCbc(1:n); vCbe=vCbe(1:n); % make the size of vCbc|vCbe the same as vi
Figure 3.67(c) shows a DC equivalent of the inverter (Figure 3.67(b)) with the BJT replaced by its large‐signal model (Figure 3.67(a)). To solve the circuit in a numerical way, we should know the following:
where
A process of solving the inverter to find the output vo(t) to an input vi(t) (based on these equations) has been cast into the above MATLAB function ‘BJT_inverter_dynamic()
’. Note the following about the dynamic behavior of the inverter:
Note that the time constant of an RC circuit, i.e. the time taken for its transient response to reach 63.2% of its final value, is RC where R/C is the equivalent resistance/capacitance seen from C/R.
Consider the BJT inverter in Figure 3.68(a) where VCC = 12 V, RB = 1 kΩ, RC = 10 kΩ, and the BJT parameters are βF = 100, βR = 1, Is = 10−14 A, rb = 0 Ω, VA = ∞ V, Cbe(Cje) = 10 pF, and Cbc(Cjc) = 1 pF. Use the above MATLAB function ‘BJT_inverter_dynamic()
’ to find the output vo(t) to an input vi(t) plotted as the dotted line in Figure 3.68(b) or (c) and plot it for t = 0~0.2 μs.
To this end, we can complete the following MATLAB script “elec03e21.m” and run it to see the plot of vi(t) and vo(t) as shown in Figure 3.68(c). The time constant during the rising period of vo(t) is estimated as
%elec03e21.m
% To find the dynamic response of a BJT amplifier
VCC=5; RB=1e3; RC=10e3; % Circuit parameters
betaF=100; betaR=1; Is=1e-14; rb=0; % Device parameters
Cbe=1e-11; Cbc=1e-12; beta=[betaF betaR]; CC=[Cbe Cbc];
dt=1e-12; t=[0:200000]*dt; % Time range
ts=[0 2 3 5 6 12 13 15 16 20]*1e4*dt;
vis=[0 0 VCC VCC 0 0 VCC VCC 0 0];
vi=interp1(ts,vis,t); % PWL (piecewise linear) input
[vo,vCbc,vCbe,iC,iB]= ...
BJT_inverter_dynamic(beta,Is,CC,[RB rb],RC,VCC,vi,dt);
plot(t,vi,'r', t,vo)
Figure 3.69(a) shows three BJT inverters, one with no load, one with a purely capacitive load, and one with an RC load. About Figure 3.69(b) showing their input and outputs, note the following:
Consider the BJT biasing circuit in Figure P3.1.1(a) where the device parameters of the BJT Q1 are βF = 154, βR = 6.092, and Is(saturation current) = 14.34−15 A.
BJT_DC_analysis(VCC,R1,R2,RC,RE,[betaF,betaR]);
and once (based on the exponential model) by using
BJT_DC_analysis(VCC,R1,R2,RC,RE,[betaF,betaR,Is]);
BJT_DC_analysis(VCC,R1,R2,RC,RE,[betaF,betaR]);
and once (based on the exponential model) by using
BJT_DC_analysis(VCC,R1,R2,RC,RE,[betaF,betaR,Is]);
Consider the BJT biasing circuit in Figure P3.2.1(a) where the device parameters of the BJT Q1 are βF = 154, βR = 6.092, and Is(saturation current) = 14.34−15 A. Note that the roles of the collector and emitter terminals of a BJT are switched when the BJT is reverse biased.
BJT_DC_analysis(VCC,R1,R2,RC,RE,[betaF,betaR]);
or
BJT_DC_analysis(VCC,VBB,RB,RC,RE,[betaF,betaR]);
and once (based on the exponential model) by using
BJT_DC_analysis_exp(VCC,R1,R2,RC,RE,[betaF,betaR,Is]);
BJT_DC_analysis(VCC,R1,R2,RC,RE,[betaF,betaR]);
and once (based on the exponential model) by using
BJT_DC_analysis(VCC,R1,R2,RC,RE,[betaF,betaR,Is]);
Consider the PNP‐BJT biasing circuit in Figure P3.3.1(a) where the device parameters of the PNP‐BJT Q1 are βF = 100, βR = 1, and Is(saturation current) = 10 × 10−15 A, respectively.
BJT_PNP_DC_analysis(VEE,R1,R2,RE,RC,[betaF,betaR]);
and once (based on the exponential model) by using
BJT_DC_analysis_exp([VCC VEE],R1,R2,RC,RE, -[betaF, betaR,Is]);
BJT_PNP_DC_analysis(VEE,R1,R2,RE,RC,[betaF,betaR]);
and once (based on the exponential model) by using
BJT_DC_analysis_exp([VCC VEE],R1,R2,RC,RE, -[betaF, betaR,Is]);
BJT_PNP_DC_analysis(VEE,R1,R2,RE,RC,[betaF,betaR]);
and once (based on the exponential model) by using
BJT_DC_analysis_exp([VCC VEE],R1,R2,RC,RE,
[betaF,betaR,Is]);
Consider the two‐BJT circuit in Figure P3.4(a) where the device parameters of the BJTs Q1 and Q2 are βF = 100, βR = 1, and Is = 10−14 A in common.
BJT_PNP_DC_analysis()
’/ ‘BJT_DC_analysis()
’ to analyze the Q1/Q2 part, respectively. To this end, run the following MATLAB statements:
%elec03p04.m
clear
betaF=100; betaR=1; alphaR=betaR/(betaR+1);
Is=1e-14; Isc=Is/alphaR; VT=25e-3; % BJT parameters
VEE1=10; VCC2=10; R1=3e5; R2=2e5; RE1=55e2; RC1=5e3; RC2=4e3; RE2=4e3;
% To find the equivalent of the voltage divider biasing circuit
VBB1=VEE1*R2/(R1+R2); RB1=parallel_comb([R1 R2]);
% Exponential model based approach
iC=@(v)Is*exp(v(1)/VT)-Isc*exp(v(2)/VT);
iB=@(v)Is/betaF*exp(v(1)/VT)+Isc/(betaR+1)*exp(v(2)/VT);
% Eq. (S3.4.15) with v=[vEB1 vCB1 vBE2 vBC2]
eq=@(v)[VEE1-VBB1-v(?)-RE1*(iC(v(1:2))+iB(v(1:2)))-RB1*iB(v(1:2));
VBB1+RB1*iB(v(1:2))+v(?)-RC1*(iC(v(1:2))-iB(v(?:?)));
VCC2+v(?)-RC2*iC(v(3:4))-RC1*(iC(v(?:?))-iB(v(3:4)));
VCC2+v(?)-v(3)-RC2*iC(v(3:4))-RE2*(iC(v(3:4))+iB(v(3:4)))];
options=optimset('Display','off','Diagnostics','off');
v0 = [0.7; 0.4; 0.7; 0.4]; % Initial guess for v=[vEB1 vCB1 vBE2 vBC2]
v = fsolve(eq,v0,options);
VEB1=v(1), VCB1=v(2), VBE2=v(3), VBC2=v(4)
IB1Q = iB(v(1:2)), IC1Q = iC(v(1:2))
IB2Q = iB(v(3:4)), IC2Q = iC(v(3:4))
VE1Q = VEE1-RE1*(IC1Q+IB1Q), VB1Q=VE1Q-VEB1, VC1Q=VB1Q+VCB1
VC2Q = VCC2-RC2*IC2Q, VB2Q=VC2Q+VBC2, VE2Q=VB2Q-VBE2
VEC1Q = VE1Q-VC1Q, VCE2Q=VC2Q-VE2Q
>>betaF=100; betaR=1; Is=1e-14; beta=[betaF betaR];
VEE1=10; VCC2=10; R1=3e5; R2=2e5;
RE1=55e2; RC1=5e3; RC2=4e3; RE2=4e3;
[VB1,VE1,VC1,IB1,IE1,IC1,mode1]= ...
BJT_PNP_DC_analysis(VEE1,R1,R2,RE1,RC1,beta);
VBB2=???; RB2=???; % Thevenin equivalent of Q1 seen from B2
BJT_DC_analysis(VCC2,VBB2,RB2,RC2,RE2,beta);
Also, referring to the MATLAB script “elec03e07.m,” complete the above script “elec03p04.m” and run it to do the exponential‐model‐based analysis.
Table P3.4 MATLAB analysis and PSpice simulation results of BJT circuit in Figure P3.4(a).
IC1 | VEC1 | IC2 | VCE2 | |
PWL model based analysis | 0.785 mA | |||
Exponential‐model‐based analysis | 1.65 V | 3.42 V | ||
PSpice simulation | 0.808 mA |
Consider the three‐BJT circuit in Figure P3.5(a) where the device parameters of the BJTs Q1, Q2, and Q3 are βF = 100, βR = 1, and Is = 10−14 A in common.
Table P3.5 MATLAB analysis and PSpice simulation results of the BJT circuit in Figure P3.5(a).
IC1 (mA) | VEC1 (V) | IC2 (mA) | VCE2 (V) | IC3 (mA) | VCE3 (V) | |
PWL‐model‐based analysis | 0.785 | 1.76 | 0.788 | 3.69 | 0.438 | 5.37 |
Exponential‐model‐based analysis | 0.795 | 1.65 | 0.819 | 3.42 | 0.475 | 4.98 |
PSpice simulation | 0.790 | 1.70 | 0.808 | 3.51 | 0.464 | 5.10 |
BJT_PNP_DC_analysis()
’ for the analysis of the Q3 part.function [vs,iis,ios,iC1s,iC2s,iB1s,iB2s] = ...
BJT2_complementary(vis, Ri,RL,VCC,beta,Is)
% To analyze a complementary BJT pair circuit which consists of
% NPN/PNP-BJTs and resistors Ri/RL between vi/E and B/GND.
VT=25e-3; betaF=beta(1); betaR=beta(2);
alphaR=betaR/(betaR+1); Isc=Is/alphaR; % CB saturation current
V1=VCC(1); V2=VCC(2);
iC=@(v)Is*exp(v(1)/VT)-Isc*exp(v(2)/VT); % Eq. (3.1.23a)
iB=@(v)Is/betaF*exp(v(1)/VT)+ ...Isc/(betaR+1)*exp(v(2)/VT);%Eq. (3.1.23b)
iE = @(v)Is*(1+1/betaF)*exp(v(1)/VT)- ... Isc*betaR/(betaR+1)*exp(v(2)/VT);
options=optimset('Display','off','Diagnostics','off');
for n=1:length(vis)
vi=vis(n); v0=[vi/4 vi/8]; % Initial guess
eq = @(v)[vi-Ri*(iB([v(?)-v(2),v(1)-V1]) ...
-iB([v(?)-v(1),V2-v(1)]))-v(1);
v(2)-RL*(iE([v(1)-v(2),v(?)-V1]) ...
-iE([v(2)-v(1),V2-v(?)]))]; % Eq. (P3.6.2)
[v,fe] = fsolve(eq,v0,options); vs(n,:)=v;
iB1s(n)=iB([v(1)-v(2),v(1)-V1]); iC1s(n)=iC([v(1)-v(2),v(1)-V1]);
iB2s(n)=iB([v(2)-v(1),V2-v(1)]); iC2s(n)=iC([v(2)-v(1),V2-v(1)]); iis(n)=(vi-v(?))/Ri; ios(n)=v(?)/RL;
end
Consider the complementary BJT pair circuit in Figure P3.6.1(a) where the device parameters of the NPN‐/PNP‐BJTs Q1/Q2 are βF = 100, βR = 1, and Is (saturation current) = 10 × 10−15 A. Note that the Kirchhoff's voltage law (KVL) along the mesh B1‐E1‐E2‐B2 yields
This implies that both vBE1 and vEB2 cannot be positive so that Q1 and Q2 cannot be simultaneously conducting.
BJT2_complementary()
’ to analyze the circuit and use it to get ii, io, and vo for vi = {10, 5, 0,−5,−10} by running the following MATLAB statements:
>>Ri=1e4; RL=1e3; betaF=100; betaR=1;
Is=1e-14; beta=[betaF betaR];
VCC1=5; VCC2=-5; VCC=[VCC1 VCC2]; vis=[10 5 0 -5 -10];
[vs,iis,ios]=BJT2_complementary(vis,Ri,RL,VCC,beta,Is);
fprintf(' vi v1 vo ii io ')
disp([vis' vs iis' ios'])
BJT2_complementary()
’) for vi = [−10:0.02:10]V to get the two graphs shown in Figure P3.6.2, respectively.BJT3_current_mirror()
’ presented in Section 3.1.9, compose a MATLAB function ‘BJT2_current_mirror()
’ and use it to get io = iC2 for V1 = 15 V and V2 = {1, 5, 10, 20, 40} by running the following MATLAB statements:
>>betaF=100; betaR=1; Is=1e-14; beta=[betaF betaR];
R=1e4; V1=15; V2=[1 5 10 20 40];
io=BJT2_current_mirror(beta,Is,R,[V1 V2])
This is supported by the PSpice simulation result (with DC Sweep analysis) shown in Figure P3.7(b). However, why is the output current negative for V2 < 0.66 V?
BJT3_current_mirror()
’ presented in Section 3.1.9, compose a MATLAB function ‘BJT3_current_mirror_Wilson()
’ to analyze the current mirror of Figure P3.7(a) and use it to get the plot of io = iC3 versus V2 = {0:0.01: 40} for V1 = 15 V.function [io,v]=BJT3_current_mirror_Wilson(betaF,Is,R,V12,VT)
% Analyze a Wilson current mirror consisting of 3 BJTs and an R or I-source
% If R<1, it will be regarded as a current source.
% Copyleft: Won Y. Yang, [email protected], CAU for academic use only
if nargin<5, VT=(273+27)/11605; end % Thermal voltage
if length(betaF)<2, betaR=1; else betaR=betaF(2); betaF=betaF(1); end
if length(Is)<2, VA=inf; else VA=Is(2); Is=Is(1); end
V1=V12(1); if length(V12)>1, V2s=V12(2:end); else V2s=V12; end
alphaR=betaR/(betaR+1); Isc=Is/alphaR; % CB saturation current
options=optimset('Display','off','Diagnostics','off');
iC = @(v)Is*exp(v(1)/VT)-Isc*exp(v(2)/VT); % Eq. (3.1.23a) with v=[vBE vBC]
iB = @(v)Is/betaF*exp(v(1)/VT)+Isc/(betaR+1)*exp(v(2)/VT); % Eq. (3.1.23b)
iE = @(v)Is*(1+1/betaF)*exp(v(1)/VT)- ...Isc*betaR/(betaR+1)*exp(v(2)/VT);
for n=1:length(V2s)
V2=V2s(n);
if R>=1 % Eq. (3.1.62a,b) with a resistor
eq=@(v)[iE([v(2)-v(1) v(2)-V2])-iB([v(1) v(1)-v(2)])-iE([v(1) 0]);
V1-v(2)-R*(iB([v(2)-v(1) v(2)-V2])+iC([v(1) v(1)-v(2)]))];
else I=R; % Eq. (3.1.62a,c) with a current source
eq=@(v)[iE([v(2)-v(1) v(2)-V2])-iB([v(1) v(1)-v(2)])-iE([v(1) 0]);
I-iB([v(2)-v(1) v(2)-V2])-iC([v(1) v(1)-v(2)])]*1e5;
end
if n<2, if V2<0.7, v0=[0 0.7]; else v0=[0.7 1.4]; end
else v0=v; % Initial guess
end
v=fsolve(eq,v0,options); vs(n,:)=v; io(n)=iC([v(2)-v(1) v(2)-V2]);
end
Consider the BJT inverter in Figure P3.8(a) or 3.27(a) where the device parameters of the NPN‐BJT Q are βF = 100, βR = 1, and Is (saturation current) = 10 × 10−15 A.
BJT_inverter()
’ presented in Section 3.1.10 to plot the VTCs and their linear approximations for RB = 10 kΩ/20 kΩ where RC = 1 kΩ and VCC = 5 V as shown in Figure P3.8(b).
%elec03p08b.m
clear, clf
VCC=5; RC=1e3;
betaF=100; betaR=1; Is=1e-14;
RBs=[1e4 2e4]; gss='rgb';
dvi=5e-3; vis=[0:dvi:VCC];
VBE=0.65;
for n=1:length(RBs)
RB=RBs(n);
[VIL,VIH,VOL,VOH,VM,NML,NMH,PCavg,vos]= ...
BJT_inverter([betaF betaR],Is,RB,RC,VCC,vis);
vis1=[VBE VIH];
vos1 = VCC-betaF*R?/R?*(vis1-VBE); %Eq. (P3.8.1)
hold on, plot(vis,???,gss(n), vis1,????,':')
end
Consider the two BJT differential pairs, called emitter‐coupled logic (ECL), each in Figure P3.9(a1) and (a2) where the device parameters of all the NPN‐BJTs are βF = 100, βR = 1, and Is (saturation current) = 10 × 10−15A in common.
function [vo1s,vo2s,iC1s,iC2s]=ECL1(betaF,Is,RC,IEE,Vref,VEE,vis)
% Analyze an ECL (Fig. P3.9(a1)) consisting of 2 NPN-BJTs
% Copyleft: Won Y. Yang, [email protected], CAU for academic use only
VT=(273+27)/11605; VBE=0.7; % Thermal voltage
if nargin<7, dvi=VT/10; vis=Vref+[-12*VT:dvi:12*VT]; end % Input
if length(betaF)<2, betaR=1; else betaR=betaF(2); betaF=betaF(1); end
alphaF=betaF/(1+betaF); alphaR=betaR/(betaR+1);
Isc=Is/alphaR; % CB(Collector-Base) saturation current
option=optimset('Display','off','Diagnostics','off');
iC = @(v)Is*exp(v(1)/VT)-Isc*exp(v(2)/VT);
% Eq. (3.1.23a) with v=[vBE vBC]
iB = @(v)Is/betaF*exp(v(1)/VT)+Isc/(betaR+1)*exp(v(2)/VT);
% Eq. (E3.1.23b)
iE = @(v)Is*(1+1/betaF)*exp(v(1)/VT)- ...
Isc*betaR/(betaR+1)*exp(v(2)/VT);
for n=1:length(vis)
vi = vis(n);
eq=@(v)[-v(?)-RC*iC([vi-v(3) vi-v(?)]); % Eq. (P3.9.2)
-v(?)-RC*iC([Vref-v(3) Vref-v(?)]);
(iE([vi-v(?) vi-v(1)])+iE([Vref-v(?) Vref-v(2)])-IEE)*1e4];
if ~exist('v') % Initial guess
if vi>Vref, v12=-RC*[alphaF 1-alphaF]*IEE; v3=vi-VBE;
else v12=-RC*[1-alphaF alphaF]*IEE; v3=Vref-VBE;
end
v0=[v12 v3];
else v0=v;
end
v = fsolve(eq,v0,option);
vo1s(n)=v(1); vo2s(n)=v(2);
vos(n)=v(1)-v(2); % Eq. (3.1.72)
iC1s(n)=iC([vi-v(3) vi-v(1)]);
iC2s(n)=iC([Vref-v(3) Vref-v(2)]);
end
if nargout==0|nargin<7
subplot(221)
vo1s_a=-alphaF*IEE*RC./(1+exp(-(vis-Vref)/VT)); % Eq. (3.1.72)
vo2s_a=-alphaF*IEE*RC./(1+exp((vis-Vref)/VT)); % Eq. (3.1.72)
plot(vis,vo1s,'r', vis,vo2s, vis,vo1s_a,'k:', vis,vo2s_a,'m:')
legend('vo1','vo2');
xlabel('v_i(Input)'); ylabel('v_o'); grid on
end
function [vo1s,vo2s,iC1s,iC2s]= ...
ECL2(betaF,Is,RC,R,IEE,Vref,VEE,vis)
% Analyze an ECL (Fig.P3.9(a2)) consisting of 4 NPN-BJTs
% Copyleft: Won Y. Yang, [email protected], CAU for academic use only
VT=(273+27)/11605; VBE=0.7; VBE1=0.6; % Thermal voltage
if nargin<8, dvi=VT/10; vis=Vref+[-12*VT:dvi:12*VT]; end % Input
if length(betaF)<2, betaR=1; else betaR=betaF(2); betaF=betaF(1); end
alphaF=betaF/(1+betaF); alphaR=betaR/(betaR+1);
Isc=Is/alphaR; % CB(Collector-Base) saturation current
option=optimset('Display','off','Diagnostics','off');
iC = @(v)Is*exp(v(1)/VT)-Isc*exp(v(2)/VT);
% Eq. (3.1.23a) with v=[vBE vBC]
iB = @(v)Is/betaF*exp(v(1)/VT)+Isc/(betaR+1)*exp(v(2)/VT);
% Eq. (3.1.23b)
iE = @(v)Is*(1+1/betaF)*exp(v(1)/VT)-...
Isc*betaR/(betaR+1)*exp(v(2)/VT);
for n=1:length(vis)
vi = vis(n);
eq=@(v)[v(?)-VEE-R*iE([v(3)-v(?) v(3)]);
v(?)-VEE-R*iE([v(4)-v(?) v(4)]); % Eq. (P3.9.3)
-v(?)-RC*(iC([vi-v(5) vi-v(?)])+iB([v(?)-v(1) v(?)]));
-v(?)-RC*(iC([Vref-v(5) Vref-v(?)])+iB([v(4)-v(2) v(4)]));
(iE([vi-v(?) vi-v(3)])+iE([Vref-v(?) Vref-v(4)])-IEE)*1e4];
if ~exist('v') % Initial guess
if vi>Vref, v34=-RC*[alphaF 1-alphaF]*IEE; v12=v34-VBE; v5=vi-VBE;
else v34=-RC*[1-alphaF alphaF]*IEE; v12=v34-VBE; v5=Vref-VBE;
end
v0=[v12 v34 v5];
else v0=v;
end
[v,fe] = fsolve(eq,v0,option);
vo1s(n)=v(1); vo2s(n)=v(2); vos(n)=v(1)-v(2); % Eq. (3.1.72)
iC1s(n)=iC([vi-v(5) vi-v(3)]); iC2s(n)=iC([Vref-v(5) Vref-v(4)]);
end
if nargout==0|nargin<8
subplot(222)
vo1s_a=-alphaF*IEE*RC./(1+exp(-(vis-Vref)/VT))-VBE1; % Eq. (3.1.72)
vo2s_a=-alphaF*IEE*RC./(1+exp((vis-Vref)/VT))-VBE1; % Eq. (3.1.72)
plot(vis,vo1s,'r', vis,vo2s, vis,vo1s_a,'k:', vis,vo2s_a,'m:')
legend('vo1','vo2'); xlabel('v_i(Input)'); ylabel('v_o');
end
where iCk(vBEk,vBCk) and iBk(vBEk,vBCk) are defined by Eqs. (3.1.23a,b), and iEk(˖,˖) = iBk(˖,˖) + iCk(˖,˖) for all k. Then complete the above MATLAB function ‘ECL1()
’ so that it can analyze the ECL and run the following statements to plot the output waveforms as shown in Figure P3.9(b1).
>>betaF=100; betaR=1; Is=1e-14; RC=2e3; IEE=3e-4;
Vref=-0.9; VEE=-5.2;
ECL1([betaF betaR],Is,RC,IEE,Vref,VEE);
where iCk(vBEk,vBCk) and iBk(vBEk,vBCk) are defined by Eqs. (3.1.23a,b), and iEk(+,+) = iBk(+,+) + iCk(+,+) for all k. Then complete the above MATLAB function ‘ECL2()
’ so that it can analyze the ECL and run the following statements to plot the output waveforms as shown in Figure P3.9(b2).
>>betaF=100; betaR=1; Is=1e-14; RC=2e3; IEE=3e-4; Vref=-0.9; VEE=-5.2;
RC=2e3; R=42e3; IEE=3e-4; Vref=-0.9; VEE=-5.2;
ECL2([betaF betaR],Is,RC,R,IEE,Vref,VEE);
Consider the CB amplifier in Figure P3.10(a1) or (a2) where the device parameters of the NPN‐BJT are βF = 100, βR = 1, βAC = 100, rb = 0 Ω, and Is = 10 × 10−15 A.
%elec03p10.m
clear
BETAF=100; BETAR=1; betaAC=BETAF; rb=0; VA=1e4; % BJT parameters
beta=[betaF,betaR,betaAC];
VCC=15; Vsm=1e-3; Rs=1e3; RL=1e4; % Source/load resistances
R1=26.2e3; R2=16.2e3; RC=10e3; RE=19.8e3; % Bias circuit
% For DC analysis using the PWL model of BJT
[VBQ,VEQ,VCQ,IBQ,IEQ,ICQ,Av,Ai,Ri,Ro,gm,rbe,ro]=...
BJT_CB_analysis(VCC,rb,Rs,R1,R2,RC,RE,RL,beta,Vsm,VA);
% For DC analysis using the exponential model of BJT
[VBQ,VEQ,VCQ,IBQ,IEQ,ICQ,Av,Ai,Ri,Ro,gm,rbe,ro]=...
BJT_CB_analysis(VCC,rb,Rs,R1,R2,RC,RE,RL,[beta Is],Vsm,VA);
Consider the CC amplifier in Figure P3.11(a1) or (a2) where the device parameters of the NPN‐BJT are βF = 100, βR = 1, βAC = 100, rb = 0 Ω, and Is = 10 × 10−15 A.
%elec03p11.m
clear
betaF=100; betaR=1; betaAC=100; rb=0; Is=1e-14; VA=1e4;
beta=[betaF,betaR,betaAC]; % BJT parameters
VCC=15; Vsm=1e-3; Rs=2e4; RL=1e3;
R1=345e3; R2=476e3; RC=4e3; RE=5.94e3;% Bias circuit
% For DC analysis using the PWL model of BJT
[VBQ,VEQ,VCQ,IBQ,IEQ,ICQ,Av,Ai,Ri,Ro,gm,rbe,ro]=...
BJT_CC_analysis(VCC,rb,Rs,R1,R2,RC,RE,RL,beta,Vsm,VA);
% For DC analysis using the exponential model of BJT
[VBQ,VEQ,VCQ,IBQ,IEQ,ICQ,Av,Ai,Ri,Ro,gm,rbe,ro]=...
BJT_CC_analysis(VCC,rb,Rs,R1,R2,RC,RE,RL,[beta Is],Vsm,VA);
Consider the two‐stage BJT amplifier in Figure P3.12(a) where the device parameters of the NPN‐BJT Q are βF = 100, βR = 1, βAC = 100, and rb = 0 Ω. Complete the following MATLAB script “elec03p12.m” and run it to find the overall voltage gain Gv and output resistance Ro2.
%elec03p12.m
rb=0; betaF=100; betaR=1; betaAC=100; VA=1e4;
beta=[betaF,betaR,betaAC];
VCC=15; Vsm=1e-5; Rs=5e3; RL=2e3; % Source/load resistances
R11=1e5; R12=5e4; RC1=6800; RE1=[0 3925];
R21=1e5; R22=5e4; RC2=6800; RE2=[0 3925];
% Find Ri, Av, and Ai of Stage 2/1 starting from last one.
Rs2=?; RL2=??; [VBQ,VEQ,VCQ,IBQ,IEQ,ICQ,Avs(2),Ai2,Ri2,Ro2]= ...
BJT_CE_analysis(VCC,rb,Rs2,R21,R22,RC2,RE2,RL2,beta);
fprintf(' 1st stage of CE')
Rs1=??; RL1=???; Vsm0=Avs(2)*Vsm;
[VBQ,VEQ,VCQ,IBQ,IEQ,ICQ,Avs(1),Ai1,Ri1,Ro1]= ...
BJT_CE_analysis(VCC,rb,Rs1,R11,R12,RC1,RE1,RL1,beta,Vsm0,VA);
fprintf(' Overall')
Gv=Ri1/(Rs+???)*prod(???); Vom=Gv*Vsm
fprintf(' Gv=Ri/(Rs+Ri)*Av1*Av2=%4.2fx%8.3fx%8.3f ...
=%9.3f ', Ri1/(Rs+Ri1),Avs(1),Avs(2),Gv)
Consider the three‐stage BJT amplifier in Figure P3.13.1(a) where the device parameters of all the NPN‐BJTs are βF = 100, βR = 1, βAC = 100, rb = 0 Ω, and Is = 1 × 10−16 A in common. Note that the first two stages are identical to those of the amplifier in Figure P3.13(a), whose overall voltage gain and output resistance are Gv12 = 1329.8 and Ro2 = 6795 Ω, respectively.
%elec03p13.m
rb=0; betaF=100; betaR=1; betaAC=100; Is=1e-16; VA=1e4;
beta=[betaF,betaR,betaAC]; % beta=[betaF,betaR,betaAC,Is];
VCC=15; Vsm=1e-5; Rs=5e3; RL=2e3; % Source/load resistances
R11=1e5; R12=5e4; RC1=6800; RE1=[0 3925];
R21=1e5; R22=5e4; RC2=6800; RE2=[0 3925];
R31=5e4; R32=5e4; RC3=0; RE3=200;
Rs3=0; RL3=??; [VBQ,VEQ,VCQ,IBQ,IEQ,ICQ,Av3,Ai3,Ri3,Ro3_0]= ...
BJT_CC_analysis(VCC,rb,Rs3,R31,R32,RC3,RE3,RL3,beta);
Rs2=0; RL2=???; [VBQ,VEQ,VCQ,IBQ,IEQ,ICQ,Av2,Ai2,Ri2,Ro2_0]= ...
BJT_CE_analysis(VCC,rb,Rs2,R21,R22,RC2,RE2,RL2,beta);
fprintf(' 1st stage of CE')
Rs1=??; RL1=???; Vsm0=Vsm;
[VBQ,VEQ,VCQ,IBQ,IEQ,ICQ,Av1,Ai1,Ri1,Ro1]= ...
BJT_CE_analysis(VCC,rb,Rs1,R11,R12,RC1,RE1,RL1,beta,Vsm0,VA);
fprintf(' 2nd stage of CE')
Rs2=???; RL2=???; Vsm1=Ri1/(Rs+Ri1)*Av1*Vsm;
[VBQ,VEQ,VCQ,IBQ,IEQ,ICQ,Av2,Ai2,Ri2,Ro2]= ...
BJT_CE_analysis(VCC,rb,Rs2,R21,R22,RC2,RE2,RL2,beta,Vsm1,VA);
fprintf(' 3rd stage of CC')
Rs3=???; RL3=??; Vsm2=Av2*Vsm1;
[VBQ,VEQ,VCQ,IBQ,IEQ,ICQ,Av3,Ai3,Ri3,Ro3]= ...
BJT_CC_analysis(VCC,rb,Rs3,R31,R32,RC3,RE3,RL3,beta,Vsm2,VA);
Vom=Av3*Vsm2, Gv=Ri1/(Rs+Ri1)*Av1*Av2*Av3;
fprintf(' Gv=Ri/(Rs+Ri)*Av1*Av2*Av3=%4.2fx%8.3fx%8.3fx%8.3f...
=%9.3f ', Ri1/(Rs+Ri1),Av1,Av2,Av3,Gv)
Consider the CE BJT amplifier circuit of Figure 3.52.1(a) where the forward DC/AC current gains, reverse DC current gain, and base resistance of the BJT are βF = 162/βAC = 176, βR = 6, and rb = 10 Ω, respectively.
(Hint) How about running the following MATLAB statements?
>>bF=162; bR=6; bAC=176; rb=10; T=27; % Device constants
VCC=12; Rs=50; RL=5e4; % Circuit constants
Avd=20; VCEQd=3; KC=VCEQd/VCC;
ICQd=2e-3; % Design constants [R1,R2,RC,RE1,RE2]=...
BJT_CE_design(VCC,[bF bAC],rb,Avd,ICQd,RL,T,KC);
Vsm=0.1; beta=[bF bR bAC];
[VBQ,VEQ,VCQ,IBQ,IEQ,ICQ,Av]=...
BJT_CE_analysis(VCC,rb,Rs,R1,R2,RC,[RE1 RE2],RL,beta,Vsm)
BJT_CE_analysis()
’ (with the input voltage amplitude Vsm = 0.15/0.2 given as the 10th input argument) give you appropriate warning messages about the possibility of saturation or cutoff regions?Consider the BJT cascode amplifier with PSpice schematic and simulation result on the frequency response in Figure P3.15(a) and (b), respectively, where VCC = 12 V, Rs = 50 Ω, Cs = 100 μF, R1 = 100 kΩ, R2 = 100 kΩ, R3 = 50 kΩ, RE = 2 kΩ, CE = 100 μF, CB = 100 μF, RC = 3 kΩ, CL = 1 μF, RL = 100 kΩ, CLL = 1 nF, and the values of the BJT parameters of the (high‐frequency) small‐signal equivalent in Figure P3.15(d) (based on the model in Figure 3.18) are βF = 100, βR = 1, βAC = 100, VA = 104 V, Is = 10−14 A, rb = 0 Ω, Cbe(Cje) = 10 pF, and Cbc(Cjc) = 1 pF.
BJT_cascode_DC_analysis()
‘, which performs the DC analysis of the BJT cascade amplifier to determine the node voltages and base/collector currents at the operating point.function [v,IB1Q,IC1Q,IB2Q,IC2Q]=...
BJT_cascode_DC_analysis(VCC,R123,RC,RE,beta,T)
%To do DC analysis of a Cascode (CE-CB) amplifier in Fig. 3.41(a)
% VCC =[VCC VEE], R123=[R1 R2 R3]
% beta=[betaF1 betaR1 Is1; betaF2 betaR2 Is2]
% Copyleft: Won Y. Yang, [email protected], CAU for academic use only
if nargin<6, T=27; end; VT=(273+T)/11605;
if 0<T&T<0.1, VT=T; end
if numel(VCC)<2, VEE=0; else VEE=VCC(2); VCC=VCC(1); end
bF1=beta(1,1); bR1=beta(1,2); Is1=beta(1,3);
bF2=beta(end,1); bR2=beta(end,2); Is2=beta(end,3);
aR1=bR1/(bR1+1); Isc1=Is1/aR1; % Collector-Base saturation current
aR2=bR2/(bR2+1); Isc2=Is2/aR2;
R1=R123(1); R2=R123(2); R3=R123(3);
iC1=@(v)Is1*exp(v(1)/VT)-Isc1*exp(v(2)/VT);
% Eq. (3.1.23a) with v=[vBE vBC]
iB1=@(v)Is1/bF1*exp(v(1)/VT)+Isc1/(bR1+1)*exp(v(2)/VT);
'% Eq. (3.1.23b)
iE1=@(v)Is1*(1+1/bF1)*exp(v(1)/VT)-Isc1*bR1/(bR1+1)*exp(v(2)/VT);
iC2=@(v)Is2*exp(v(1)/VT)-Isc2*exp(v(2)/VT); % Eq. (3.1.23a) with v=[vBE vBC]
iB2=@(v)Is2/bF2*exp(v(1)/VT)+Isc2/(bR2+1)*exp(v(2)/VT); % Eq. (3.1.23b)
iE2=@(v)Is2*(1+1/bF2)*exp(v(1)/VT)-Isc2*bR2/(bR2+1)*exp(v(2)/VT);
% A set of (nonlinear) node equations in v=[v1 v2 v3 v4 v5]:
eq=@(v)[(v(3)-v(?))/R2-(v(?)-VEE)/R3-...iB1([v(?)-v(2) v(?)-v(4)]);
% node 1
iE1([v(1)-v(?) v(1)-v(4)])-(v(?)-VEE)/RE; % node 2
iE2([v(?)-v(4) v(?)-v(5)])-iC1([v(1)-v(2) v(1)-v(4)]); % node 3
(VCC-v(3))/R1-(v(3)-v(1))/R2-iB2([v(3)-v(?) v(3)-v(5)]); % node 4
(VCC-v(?))/RC-iC2([v(3)-v(4) v(3)-v(?)])]*1e3; % node 5
% Initial guess for the node voltage vector v=[v1 v2 v3 v4 v5]:
R_123=R1+R2+R3; v10=VCC*R3/R_123; v30=VCC*(R2+R3)/R_123;
v0=[v10 v10-0.7 v30 v30-0.7 (VCC+v30)/2];
% Solve the set of (nonlinear) node equations in v.
options=optimset('Display','off','Diagnostics','off');
v=fsolve(eq,v0,options); % Node voltages at the operating point
% Base/collector currents for Q1 and Q2:
IB1Q=iB1([v(1)-v(2) v(1)-v(4)]); IB2Q=iB2([v(3)-v(4) v(3)-v(5)]);
IC1Q=iC1([v(1)-v(2) v(1)-v(4)]); IC2Q=iC2([v(3)-v(4) v(3)-v(5)]);
%elec03p15.m
% To find the frequency response of a BJT Cascode (CE-CB) amplifier
% Circuit parameters
VCC=12; Rs=50; R1=100e3; R2=100e3; R3=50e3; RC=3e3; RE=2e3; RL=1e4;
Cs=1e-6; CE=1e-4; CE=inf; CB=1e-4; CL=1e-6; CLL=1e-12; R123=[R1 R2 R3];
% Device parameters for the two BJTs Q1 and Q2
Is=1e-14; betaF=100; betaR=1; betaAC=betaF; beta=[betaF betaR betaAC Is];
rb1=0; rb2=0; Cbe1=10e-12; Cbe2=10e-12; Cbc1=1e-12; Cbc2=1e-12;
rb=[rb1; rb2]; CC=[Cbe1 Cbc1; Cbe2 Cbc2]; RLCLL=[RL CLL]; VA=1e4; T=27;
f=logspace(0,8,801); w=2*pi*f; % Frequency range
[Gs,fc]=BJT_cascode_xfer_ftn(VCC,Rs,Cs,R123,RC,RE,...
CE,CB,CL,RLCLL,beta,CC,rb,VA,T);
Gw=subs(Gs,s,?*w); % Frequency response = Transfer function with s=jw
GmagdB=20*log10(abs(Gw)+1e-10); Gmax=max(GmagdB);
semilogx(f,GmagdB), hold on
semilogx(fc(1)*[1 1],[0 Gmax-3],'b:', ... fc(6)*[1 1],[0 Gmax-3],'k:')
text(fc(1),-10,'f_{c1}'); ... text(fc(6),-10,'f_{c6}');
function [Gs,fc,gm1,rbe1,ro1,gm2,rbe2,ro2]= BJT_cascode_xfer_ftn...
(VCC,Rs,Cs,R123,RC,RE,CE,CB,CL,RLCLL,beta,CC,rb,VA,T)
%To find the transfer function of Cascode (CE-CB) amplifier in Fig. P3.15a
% R123=[R1 R2 R3]
% RLCLL=[RL CLL] with RL and CLL in parallel
% beta=[betaF1 betaR1 betaAC1 Is1; betaF2 betaR2 betaAC2 Is2]
% CC=[Cbe1 Cbc1; Cbe2 Cbc2]: BEJ|BCJ capacitances
% Copyleft: Won Y. Yang, [email protected], CAU for academic use only
if nargin<15, T=27; end
if T>=0.1; VT=(273+T)/11605; else VT=T; end % Thermal voltage
if nargin<14, VA=1e4; end; VA1=VA(1); VA2=VA(end); ;
if nargin<13, rb=0; end; rb1=rb(1); rb2=rb(end);
if nargin<12, CC=[0 0]; end
Cbe1=CC(1,1); Cbe2=CC(end,1); Cbc1=CC(1,2); Cbc2=CC(end,2);
if size(beta,2)<3
error('The 11th input argument beta must have [betaF betaR
betaAC Is]!');
elseif size(beta,2)==3, beta(:,4)=beta(:,3); beta(:,3)=beta(:,1);
end
bF1=beta(1,1); bR1=beta(1,2); bAC1=beta(1,3); Is1=beta(1,4);
bF2=beta(end,1); bR2=beta(end,2); bAC2=beta(end,3); Is2=beta(end,4);
RL=RLCLL(1); if numel(RLCLL)<2, CLL=0; else CLL=RLCLL(2); end
[VQs,IB1Q,IC1Q,IB2Q,IC2Q]=...
BJT_cascode_DC_analysis(VCC,R123,RC,RE,beta(:,[1 2 4]),T);
[gm1,rbe1,re1,ro1]=gmrbero_BJT(IC1Q,bF1,VA1,VT);
[gm2,rbe2,re2,ro2]=gmrbero_BJT(IC2Q,bF2,VA2,VT);
syms s; sCs=s*Cs; sCE=s*CE; sCL=s*CL;
sCbe1=s*Cbe1; sCbc1=s*Cbc1; sCbe2=s*Cbe2; sCbc2=s*Cbc2;
Zs=Rs+1/sCs; Ys=1/Zs; RB=parallel_comb([R2 R3]); GB=1/RB;
ZL=parallel_comb([RL 1/s/CLL]); % Load impedance
YC=1/parallel_comb([RC 1/sCL+ZL]); % Admittance at terminal C
YB=1/(1/(Ys+GB)+rb1); % Admittance at terminal B
YE=(1/RE+sCE)*(CE<inf); % Admittance at terminal E
% Node equations for the high-freq equivalent circuit in Fig. P3.15(d)
if rb2>0
Y=[YB+1/rbe?+sCbe?+sCbc? -YB-1/rbe?-sCbe? -sCbc? 0 0;
-YB-1/rbe?-sCbe?-gm? YB+1/rbe?+sCbe?+1/ro1+YE+gm? -1/ro? 0 0;
-sCbc?+gm? -1/ro?-gm? sCbc?+1/ro?+1/rbe?+sCbe?+1/ro?+gm? ...
-1/rbe?-sCbe?-gm? -1/ro2;
0 0 -1/rbe?-sCbe? 1/rbe?+sCbe?+1/rb?+sCbc? -sCbc?;
0 0 1/ro?-gm? -sCbc?+gm? sCbc?+1/ro?+YC];
V=Y[RB/(Zs+RB)*YB; 0; 0; 0; 0];
else
Y=[YB+1/rbe?+sCbe?+sCbc? -YB-1/rbe?-sCbe? -sCbc? 0;
-YB-1/rbe?-sCbe?-gm? YB+1/rbe?+sCbe?+1/ro?+YE+gm? -1/ro? 0;
-sCbc1+gm? -1/ro?-gm? sCbc?+1/ro?+1/rbe?+sCbe?+1/ro?+gm? -1/ro?;
0 0 1/ro?-gm? sCbc?+1/ro?+YC];
V=Y[RB/(Zs+RB)*YB; 0; 0; 0];
end
Gs=V(end)*??/(ZL+1/sCL); % Transfer ftn G(s)=Vo(s)/Vs(s) with Vs(s)=1
Av(1)=-gm1*ro1; Ri(1)=parallel_comb([RB rb1+rbe1]); Ro(1)=ro1; RCL=parallel_comb([RC RL]); Av(2)=(1+gm2*ro2)*RCL/(ro2+RCL);
Ri(2)=parallel_comb([rbe2 (ro2+RC)/(1+gm2*ro2)]);
Ro(2)=parallel_comb([ro2+rbe2+rb2 RC]);
Cbc=[Cbc1 Cbc2]; Cbe=[Cbe1 Cbe2]; ro=[ro1 ro2];
fc=break_freqs_of_BJT_cascode(Rs,Cs,CL,RL,CLL,Cbc,Cbe,Av,Ri,Ro);
function fc=...
break_freqs_of_BJT_cascode(Rs,Cs,CL,RL,CLL,Cbc,Cbe,Av,Ri,Ro)
% To find the 6 break frequencies of a BJT Cascade amplifier
RsRi1=parallel_comb([Rs Ri(1)]);
Ro1Ri2=parallel_comb([Ro(1) Ri(2)]);
Ro2RL=parallel_comb([Ro(2) RL]);
Cm1=Cbc(1)*(1-Av(1)); % Eq. (3.5.6a)
Cn1=Cbc(1)*(1-1/Av(1)); % Eq. (3.5.6b)
fc(1)=1/2/pi/Cs/(Rs+Ri(1));
fc(2)=1/2/pi/CL/(Ro(2)+RL);
fc(3)=1/2/pi/(Cbe(1)+Cm1)/RsRi1;
fc(4)=1/2/pi/Cbe(1)/Ro1Ri2;
fc(5)=1/2/pi/Cbc(2)/Ro(2);
fc(6)=1/2/pi/CLL/Ro2RL;
BJT_cascode_xfer_ftn()
’, which solves a set of four or five node equations for the high‐frequency small‐signal equivalent (Figure P3.15(d)) (depending on rbe=0 or not) to find the transfer function G(s) = Vo(s)/Vs(s) of the cascade amplifier.BJT_cascode_DC_analysis()
’), then based on the DC analysis result, use ‘BJT_cascode_xfer_ftn()
’ to find the transfer function G(s), and plot the frequency response magnitude 20log10|G(jω)| [dB] of the cascade amplifier versus f = 1∼100 MHz as shown in Figure P3.15(c).BJT_cascode_DC_analysis()
’ in (c)?Consider the BJT inverter in Figure P3.16(a) where VCC = 12 V, RB = 1 kΩ, RC = 5 kΩ, RC1 = 5 kΩ, and the BJT parameters are
Figure P3.16(b1) and (b2) shows the input/output voltage waveforms obtained from PSpice simulations, each with Cbc1=1 pF and 10 pF for Q1, respectively. Referring to Section 3.6 and Figure P3.16(b1‐b2), answer the following questions:
3.15.151.32