As the Bipolar Junction Transistor (BJT) with three terminals, each called the base B, collector C, and emitter E, the Field‐Effect Transistor (FET) is also a semiconductor device with three terminals, each called the gate G, drain D, and source S. In contrast with the BJT that operates with both types of charge carriers, holes and electrons, the FET is a ‘unipolar’ device that works with only one type of carriers, holes or electrons. While the BJT can basically be modeled as a current‐controlled current source (in the forward‐active region) since its collector current iC depends on its base current iB, the FET can basically be modeled as a voltage(field)‐controlled current source (in the saturation region) since its drain current iD depends on its gate‐to‐source voltage vGS. Table 4.1 shows a rough comparison between BJTs and FETs.
Table 4.1 BJT versus FET.
FET (Field Effect Transistor) | BJT (Bipolar Junction Transistor) | |
Voltage‐operated device | Current‐operated device | |
Input resistance | Large | Small in CE/CB configurations |
Output resistance | Large | Small |
Power dissipation | Low | High |
Noise | Low | Medium |
Switching time | Very fast | Fast |
Robustness to static charge | Low (more destructible) | High |
Thermal stability | Better | |
Fabricability | FET can be more easily fabricated with higher density in a smaller space. It can also be connected as R or C, which makes possible the design of systems consisting of only FETs with no other elements. |
Two types of FET are most widely used, junction‐gate device called JFET (Junction FET) and insulated‐gate device called MOSFET (Metal‐Oxide‐Semiconductor FET).
There are two basic configurations of junction field effect transistor, the n‐channel JFET and the p‐channel JFET. As shown in Figures 4.1.1 and 4.1.2, an n/p‐channel JFET consists of a lightly doped n/p‐type semiconductor channel and a highly doped P(P+)/N(N+)‐type semiconductor gate. Figure 4.2(a) and (b) show typical drain (output) and transfer characteristic curves of a JFET, respectively. There are three regions (operation modes) besides the breakdown region:
When 0 < vDS ≤ vGS −
Vt with Vt < vGS < 0 (for an n‐channel JFET), the drain current will be
with [A/V2]: transconductance coefficient or conduction parameter
where Vt [V], called the threshold, pinch‐off, or pinch‐down voltage, is such a value of vGS that the drain current iD drops to zero if vGS ≤ Vt (for an n‐channel JFET) or vGS ≥ Vt (for a p‐channel JFET). λ [V‐
1] is the channel length modulation (CLM) parameter, typically ranging from 0.005 to 0.02 V‐
1, which accounts for the variation of transconductance coefficient with vDS. IDSS [A], called the drain‐to‐source saturation current or zero bias (gate voltage) drain current, is the value of the drain current at vDS = −
Vt (with vGS = 0).
Why is this region named ‘ohmic region’? Because the JFET in the region acts like a voltage‐controlled resistor whose resistance is determined by vGS. Since iD can be large depending on vGS even with a very low vDS, the JFET operating in this region can be viewed as a closed switch with the on‐drain resistance rDS,ON.
When 0 ≤ vGS − Vt ≤ vDS < Vbreakdown (for an n‐channel MOSFET), the drain current is determined as
Note that the boundary between the ohmic and saturation regions plotted as a line of triangle (∇) symbols is described by
If vGS ≤ Vt (for an n‐channel JFET) or vGS ≥ Vt (for a p‐channel JFET), the leakage drain current IDS,OFF and the gate cutoff current IGSS flow between the drain/gate and the source of an FET. However, the currents are about 1 pA or less than that even under high voltage, the FET can be viewed as an open switch.
If the magnitude of the voltage across any two terminals exceeds a certain value, it may cause avalanche breakdown across the gate junction. As can be seen from the drain (output) characteristics in Figure 4.2(a), the breakdown voltage between drain and source becomes lower as the reverse‐bias gate voltage (|vGS|) increases in magnitude where the breakdown voltage BVDSS with vGS = 0 is specified in the manufacturers' datasheets.
Figure 4.3(a) and (b) shows the high/low frequency small‐signal (AC) models of an FET operating in the saturation region, respectively, where ro[Ω]: incremental resistance between D and S (called the output resistance) is the reciprocal of the slope of the output characteristic (Figure 4.2(a)) at the operating (bias) point Q:
gm[S]: transconductance (gain) is the slope of the transfer characteristic (Figure 4.2(b)) at the operating point Q:
VA[V]: channel modulation voltage or Early voltage normally in the range of 20 ~ 200 V
Note that the parameters KP, lambda, Vto, Cgd, and Cgs of the PSpice model for a JFET represent Kp, λ, Vt, Cgd, and Cgs, respectively, as can be seen from the PSpice Model Editor window (opened by selecting the device and clicking on Edit > PSpice:Model from the top menu bar in the Schematic Window) or the PSpice simulation output file. Also, the operating point information in the PSpice simulation output file obtained from the Bias Point analysis shows the parameters GM and GDS, each representing gm and 1/ro.
Let us consider the JFET circuit of Figure 4.4(a1) where the voltage appearing across RS is fed back to bias the JFET. Note that RS should be chosen large enough to make vGS < 0 so that the gate‐channel(source) junction can be reverse‐biased for normal operation. To analyze this circuit, let us apply Kirchhoff's voltage law (KVL) to the G‐S loop to write the load line equation and solve it to find iD as
Then, assuming that the FET will be in the saturation region, we equate this to the drain current Eq. (4.1.2) with λ ≈ 0:
where vG = 0, RD = 1 kΩ, RS = 500 Ω, VDD = 10 V, VSS = −
1 V, Kp = 2.608 × 10‐
3 A/V2, Vt = −
3 V, and IDSS = . We solve Eq. (4.1.6) to find VGS,Q = −
1.17 V and substitute it for vGS into Eq. (4.1.5) to get ID,Q = 4.35 mA, which is supported by the operating point Q = (VGS,Q, ID,Q) = (‐
1.17 V, 4.35 mA) obtained from the load line analysis shown in Figure 4.4(b). We can substitute ID,Q = 4.35 mA into the KVL equation for the D‐S loop to find VDS,Q:
These computations can be done by running the following MATLAB statements:
>>vG=0; RD=1000; RS=500; VDD=10; VSS=-1; Kp=2.608e-3;
Vt=-3; IDSS=Kp/2*Vt^2
>>x=roots([Kp/2 1/RS-Kp*Vt Kp/2*Vt^2+(VSS-vG)/RS]); % Eq. (4.1.6)
>>VGSQ=x(find((Vt<x&x<vG-VSS)|(Vt>x&x>vG-VSS)))
VGSQ = -1.1740
>>IDQ=(vG-VSS-VGSQ)/RS % Eq. (4.1.5)
IDQ = 0.0043
>>VDSQ=VDD-VSS-(RD+RS)*IDQ % Eq. (4.1.7)
VDSQ = 4.4780
As an alternative, the MATLAB function ‘FET_DC_analysis()
’ (that was made to analyze the standard FET biasing circuits using a voltage divider as depicted in Figure 4.4(a2)) can be used as follows:
>>R1=1e12; R2=1e5; [VGQ,VSQ,VDQ,VGSQ,VDSQ,IDQ,mode]=...
FET_DC_analysis([VDD VSS],R1,R2,RD,RS,Kp,Vt);
Analysis Results
VDD VGQ VSQ VDQ IDQ
10.00 0.00 1.17 5.65 4.35e-003
in the saturation mode
Here, note the following:
‐
VSS should be selected (see Figure 4.2(b)):
If neither of them turns out to be inside the interval [Vt, vG−VSS], the JFET must be in the cutoff region.
Now, let us consider a question: “What if neither of the two roots of Eq. (4.1.6) satisfies this inequality?” In this case, the JFET must operate in the ohmic region where the circuit can be analyzed by finding the solution of Eq. (4.1.1) with the relations Eqs. (4.1.5) and (4.1.7) substituted for vGS and vDS, respectively:
Since this equation is also a quadratic equation, the larger one of its two roots should be taken where it is supposed to satisfy
The whole computational process of analyzing the standard n‐channel FET biasing circuit shown in Figure 4.4(a2) has been cast into the above MATLAB function ‘FET_DC_analysis()
’. Likewise, the following MATLAB function ‘FET_PMOS_DC_analysis()
’ has been composed to analyze typical (DC driven) p‐channel FET biasing circuits.
Before ending this section, let us consider how the FET analysis considering the effect of the CLM parameter λ should be performed when λ is not negligibly small where the value of the voltage vG at node G is assumed to be given in the circuit of Figure 4.4(a2). In such a case, a set of two KVL equations in vGS and vDS, one for the path GSJ‐RS‐VSS and the other for the path VDD‐RD‐DSJ‐RS‐VSS, should be solved:
where iD(vDS, vGS) is determined by Eqs. (4.1.1) or (4.1.2) depending on the operation mode of the FET and implemented by the following MATLAB function ‘iD_NMOS_at_vDS_vGS()
’. This set of nonlinear equations can be solved by using the MATLAB function ‘fsolve()
’ as implemented in the above modified version of ‘FET_DC_analysis0()
’.
A MOSFET, with the gate electrode insulated by an oxidized metal layer, can be fabricated to operate as either a depletion‐mode or enhancement‐mode FET. The MOSFET has a very high input resistance owing to the insulated gate. Due to the very thin gate, MOS devices can easily be damaged by ESD ( electro static discharge), requiring special precautions.
Figures 4.5.1‐4.5.5 show the basic structures and symbols of n/p‐channel enhancement and depletion types of MOSFET. Figure 4.6(a) shows typical drain (output) characteristic curves of a MOSFET, where the variables of the horizontal and vertical axes are vDS/vSD and iD/‐
iD, respectively, for n/p‐channel MOSFETs. Figure 4.6(b) shows typical transfer characteristic curves of n/p‐channel enhancement and depletion types of MOSFET, where the sign of the threshold (gate) voltage Vt for n/p‐channel is +/‐
or ‐
/+ depending on whether the type of MOSFET is enhancement or depletion. Note that the voltage polarities and current directions for an n‐channel MOSFET (NMOS) and a p‐channel MOSFET (PMOS) are opposite to each other.
As depicted in Figure 4.6(a), there are three regions (operation modes) besides the breakdown region. Since the operational characteristics of depletion‐type MOSFETs (d‐MOSFETs) are the same with JFETs, we are going to look over the characteristics of enhancement‐mode MOSFETs (e‐MOSFETs) only:
When 0 < vDS ≤ vGS −
Vt with |Vt| < |vGS| (for an NMOS), the drain current is determined as
where Kp[A/V2]: conduction parameter or transconductance coefficient, μn[m2/V/s]: mobility of electrons or positive holes in the channel, COX [F/m2]: gate‐to‐channel capacitance per unit area due to the gate oxide, L/W: aspect ratio with length L and width W of the channel, λ [V‐
1]: channel length modulation (CLM) parameter
When 0 ≤ vGS‐
Vt ≤ vDS < Vbreakdown (for an NMOS), the drain current is determined as
The boundary between the ohmic and saturation regions (with vDS = vGS‐
Vt) is described by
If vGS ≤ Vt (for an NMOS) or vGS ≥ Vt (for a PMOS), the MOSFET will be cut off like an open switch.
Note that Eqs. (4.1.1) and (4.1.2) and Eqs. (4.1.13a) and (4.1.13b), each describing the i‐v relationships of JFET and MOSFET, are identical except for the definition of the conduction parameter Kp and that is why the above MATLAB function ‘FET_DC_analysis()
’ can be used for the DC analysis of FET circuits whether the FET is a JFET or a MOSFET.
Table 4.2 summarizes the circuit symbols and i‐v relationships of JFET and MOSFET.
Table 4.2 Circuit symbols and i‐v relationships of JFET and MOSFET.
FET type | n‐Channel | p‐Channel | ||||
JFET | Enhancement MOSFET | Depletion MOSFET | JFET | Enhancement MOSFET | Depletion MOSFET | |
Circuit symbols | ||||||
Threshold voltage Vt | − | + | − | + | − | − |
Conduction constant Kp | Process conduction parameter |
Process conduction parameter | ||||
Turn‐on condition | vGS > Vt and vDS > 0 | vSG > |Vt| and vSD > 0 | ||||
Triode region (Ohmic mode) | vGD = vG − vD > Vt > 0 | vDG = vD − vG > |Vt| | ||||
with overdrive voltage vOV = vGS − Vt | (4.1.13a) with overdrive voltage vOV = vSG − |Vt| | |||||
Saturation region (Pinch‐off mode) | vGD = vG − vD ≤ Vt | vDG = vD − vG ≤ |Vt| | ||||
iD ≅ Kp(vGS − Vt)2/2 | iD ≅ Kp (vSG − |Vt|)2/2(4.1.13b) |
Let us consider the standard FET biasing circuit of Figure 4.7(a1) where the NMOS is biased by the voltage divider consisting of VDD‐R1‐R2. To analyze the circuit, we replace the voltage divider by its Thevenin equivalent as shown in Figure 4.7(a2) and write the following equation by equating the two expressions for the drain current, i.e. one from the KVL equation for the VGG‐GSJ‐RS loop and the other from Eq. (4.1.13b) with λ = 0 as
where VDD = 12 V, R1 = 4 kΩ, R2 = 8 kΩ, RD = 2 kΩ, Rs = 10 kΩ, VGG = VDDR2/(R1 + R2) = 8 V, Kp = 2 × 10‐
5 A/V2, and Vt = 1 V. We solve this equation to get VGS,Q = 5.75 V and ID,Q = 0.225 mA, which conforms with the operating point Q = (VGS,Q, ID,Q) = (5.75 V, 0.225 mA) obtained from the load line analysis shown in Figure 4.7(b). Then we substitute ID,Q = 0.225 mA for iD into the KVL equation for the D‐S loop to find VDS,Q:
These hand calculations can be done by running the following MATLAB statements:
>>R1=4000; R2=8000; RD=2e3; RS=1e4; VDD=12; Kp=2e-5; Vt=1;
FET_DC_analysis(VDD,R1,R2,RD,RS,Kp,Vt);
which yields
VDD VGQ VSQ VDQ IDQ
12.00 8.00 2.25 11.55 2.25e-004
in the saturation mode with VGD,Q= -3.55[V]<=Vt=1.00
If you want to locate the operating point Q = (VGS,Q, ID,Q) on the iD‐vDS characteristic curve of the NMOS M1 from the viewpoint of load line analysis, run the following MATLAB script “elec04f08.m” to get Figure 4.8.
These results can be supported by the Bias Point analysis using the PSpice. After running the OrCAD/PSpice project ‘elec04f09.opj’ with the schematic (Figure 4.9(a)), you can click PSpice > View_Output_File on the top menu bar of the Schematic window to see the simulation results shown in Figure 4.9(b). The parameters of PSpice parts MbreakN (enhancement n‐channel)/MbreakND (depletion n‐channel) (referred to as ‘NMOS’/‘NMOS_d’) can be edited as shown in the PSpice Model Editor (Figure 4.9(c1)) opened by selecting the part (to let it pink‐colored) and then clicking Edit > PSpice:Model on the top menu bar of the Schematic window.
Alternatively, you can create a new PSpice model for FET in the following steps:
There is one thing to note about the transconductance gain gm, which is one of the AC model parameters for an FET. The PSpice Simulation output file (Figure 4.9(b)) shows that the value of gm(GM) is 9.49 × 10‐
5, as can be computed by using Eq. (4.1.4b):
Figure 4.13(a) shows a diode‐connected e‐NMOS with its drain and gate short‐circuited. Its iD‐(vDS=vGS) characteristic can be obtained graphically as the dotted line shown in Figure 4.13(c1) from the locus of points with vDS = vGS and also mathematically by substituting vGS = vDS into Eq. (4.1.13b) (for the saturation mode):
Note that with vDS = vGS, Eq. (4.1.4a) and the reciprocal of Eq. (4.1.4b) conform with each other so that a diode‐connected e‐NMOS can be regarded as just a nonlinear resistor with the small‐signal (incremental or dynamic) resistance
Figure 4.13(a) also shows a diode‐connected d‐NMOS with its source and gate short‐circuited, whose iD‐vDS characteristic can be obtained as the dotted line shown in Figure 4.13(c2) from the locus of points with vGS = 0 where its current is limited unlike an e‐NMOS. These examples imply that a MOSFET can be used as a nonlinear resistor. The theoretical iD‐vDS characteristics of the e‐NMOS/d‐NMOS circuits turn out to agree with the PSpice simulation results shown in Figure 4.13(b).
Consider the circuit of Figure 4.14(a) where the FET M1 is said to be ‘diode‐connected’ or ‘connected in diode configuration’ since its source and gate terminals are short‐circuited so that it behaves like a diode. For proper operation of the circuit, the two FETs M1 and M2 must be matched in the sense that they have identical conduction parameters Kp, threshold voltages Vt, and CLM parameters λ. Let us analyze the circuit, which is called a current mirror because the currents of the two matched FETs sharing the same vGS are equal. Noting that since vGD1 = 0 ≤ Vt, M1 (with vGS1 > 0) operates always in the saturation mode, its drain current can be determined by solving
This yields
where A = R2 = 1, B = ‐
2{R(V1 − Vt1) + 1/Kp1} = ‐
18, and C = (V1 − Vt1)2 = 64. Here, ID1=13.123 mA has been dumped because it does not satisfy even the turn‐on condition vGS1 = V1 − RID1 = 9 − 13.123 > Vt1 = 1[V]. Thus, since vGS1 = vGS2 and Vt1 = Vt2, the output current will be
This analysis result conforms with the PSpice simulation result (with DC Sweep analysis) shown in Figure 4.14(d). Note that considering the effect of the CLM parameter, the current transfer ratio or current gain, also called the mirror ratio, can be written as
Let us analyze the circuit of Figure 4.14(b) where the three matched FETs have identical threshold voltages Vt and CLM parameters λ, but possibly different conduction parameters {Kp1, Kp2, Kp3}. Since M1 and M3 are diode connected so that vGDk = 0 ≤ Vt for k = 1 and 3, they operate always in the saturation mode (with vGSk > Vt by V1) and thus their drain currents can be expressed as
We can apply KCL at nodes 1 and 2 to write
Once we have solved this set of two nonlinear Eqs. (4.1.24a,b) for v1 and v2 (by using the MATLAB function ‘fsolve()
’), we can use Eqs. (4.1.22), (4.1.23), or (4.1.13b) to find the output current iOb = iD2 as long as vGD2 = v1 − V2 < Vt so that M2 is saturated. If vGD2 = v1 − V2 ≥ Vt (so that M2 is in the tride region), Eq. (4.1.13a) should be used to find iOb, as implemented by the MATLAB function ‘iD_NMOS_at_vDS_vGS()
’. This solution process for the current mirror of Figure 4.14(b) has been cast into the above MATLAB function ‘FET3_current_mirror()
’.
The two current mirrors of Figure 4.14(a) and (b) have the same output resistance:
Their minimum output voltage, called the compliance voltage, required to keep M2 in saturation is
To use the above function ‘FET3_current_mirror()
’ for analyzing the current mirror of Figure 4.14(b), we can run the following statements:
>>Kp=1e-3; Vt=1; lambda=2e-3; R=1e3; V1=9;
V2s=[0:0.01:40]; V12=[V1 V2s];
[io,ID1,v,Ro,Vomin]= ...
FET3_current_mirror(Kp,Vt,lambda,R,V12);
plot(V2s,io, Vomin*[1 1],[0 io(end)],'r:')
to get the graph for the output current iOb versus V2 = 0 ~ 40 V like the corresponding PSpice simulation result shown in Figure 4.14(d).
To analyze the current mirror of Figure 4.14(c) with a current source I, we run
>>I=3e-3;
[io,ID1,v,Ro,Vomin]= ...
FET3_current_mirror(Kp,Vt,lambda,I,V12);
plot(V2s,io, Vomin*[1 1],[0 io(end)],'r:')
to get the graph for the output current iOc versus V2 = 0 ~ 40 V like the corresponding PSpice simulation result shown in Figure 4.14(d).
If R = 0, it is not so difficult to derive the analytical expression of v1 even if Kp1≠ Kp3. In this case, we solve Eq. (4.1.25a) for v1 with v2=V1 and Eqs. (4.1.24a,b):
to get
The output current iOb can be determined from Eqs. (4.1.13b) or (4.1.13a) (with vGS = v1 and vDS = V2) depending on whether vGD = v1 −V2 < Vt or vGD = v1 − V2 ≥ Vt so that M2 operates in the saturation or triode region.
The following MATLAB script “elec04f14.m” can be run to get the plot of the output currents iOa, iOb, and iOc versus V2 = 0 ~ 40 V for the three current mirrors shown in Figure 4.14(a‐c), as depicted in Figure 4.14(d).
Just like the BJT inverter of Figure 3.27 introduced in Section 3.1.10, let us consider an FET inverter (shown in Figure 4.16(a)) using an FET/resistor as a driver/load, respectively. To get its voltage transfer characteristic (VTC), suppose that the input voltage vi increases from 0 to VDD. While vi = vGS ≤ Vt, the NMOS is cut off with iD = 0 so that vo = VDD. As vi = vGS > Vt, the NMOS enters the saturation region where the output voltage is determined depending on the input voltage as
When vi = vGS increases over vDS + Vt so that vGD = vGS ‐
vDS > Vt, the NMOS enters the triode region where the input–output relationship is
The VTC curve in Figure 4.16(b) is based on these two input–output relationships, each for saturation/triode regions. The transition point T between the saturation and triode segments on the VTC can be determined from vGD = vGS‐
vDS = vi ‐
vo = Vt together with Eq. (4.1.35). That is, we can substitute vGS = Vt + vDS into Eq. (4.1.35) to write
and use the quadratic formula to solve this quadratic equation for the point T = (VIT,VOT) as
The switching threshold voltage VM, also called the midpoint voltage, can be found by substituting vGS = VM and vDS = VM into the input‐output relationship Eq. (4.1.35) (for the saturation region) and solving it for VM as
Also, VIL (the maximum input voltage that can be interpreted as “0”) (at point A in Figure 4.16(b)) and the corresponding output voltage VOH (the minimum output voltage that can be interpreted as “1”) can be determined by setting the derivative of Eq. (4.1.35) w.r.t. vGS to ‐
1:
VIH (the minimum input voltage that can be interpreted as “1”) (at point B in Figure 4.16(b)) and the corresponding output voltage VOL (the maximum output voltage that can be interpreted as “0”) can be determined by setting the derivative of Eq. (4.1.37) to ‐
1:
function [VIL,VIH,VOL,VOH,VM,VIT,VOT,VLH,NML,NMH,PDavg,vo1,iD1]=...
NMOS_inverter(Kp,Vt,RD,VDD,vi1)
% Analyze an NMOS inverter consisting of an NMOS and RD between VDD and D
% to find the output vo1 to an input vi1 and plot its VTC
% Vt = Threshold (Pinch-off) voltage, Kp = mu*Cox*(W/L)
% vo1: Output voltage(s) for input voltage(s) vi=vi1
% iD1: Drain current(s) for input voltage(s) vi=vi1
% Copyleft: Won Y. Yang, [email protected], CAU for academic use only
if nargin<5, vi1=0; end
dvi=1e-3; vis=[0:dvi:VDD]; % Full range of the input vi
VOT=(sqrt(2*Kp*RD*VDD+1)-1)/Kp/RD; % Boundary between sat/triode
VIT=VOT+Vt; % Eq. (4.1.30)
[vos,iDs]=vo_iD_NMOS_inverter(Kp,Vt,RD,VIT,VDD,vis);
[VIL,VIH,VOL,VOH,VM,NML,NMH,VL,PDavg]= ...
find_pars_of_inverter(vis,vos,iDs,VDD);
VH=VDD; % The highest output voltage
if nargin>4&sum(vi1>0&vi1<=VDD)>0 % If you want vo for vi1
for i=1:length(vi1)
[dmin,imin] = min(abs(vis-vi1(i)));
vo1(i)=vos(imin); iD1(i)=iDs(imin);
end
else
vo1=vos; iD1 = iDs;
end
fprintf(‘ VIL=%6.3f, VIH=%6.3f, VOL=%6.3f, VOH=%6.3f, VM=%6.3f,
VIT=%6.3f, VOT=%6.3f, VOE=%6.3f’, VIL,VIH,VOL,VOH,VM,VIT,VOT,VOE);
fprintf(‘ Noise Margin: NM_L=%6.3f and NM_H=%6.3f’, NML,NMH);
fprintf(‘ Output signal swing: VOL(%6.2f)~VOH(%6.2f) = %6.2f[V]’,
VOL,VOH,VOH-VOL);
fprintf(‘ Average power dissipated=%10.3e[mW] ’, PDavg*1e3);
% Plot the VTC curve
plot(vis,vos, [VIL VM VIH],[VOH VM VOL],’ro’)
hold on, plot([Vt VIT VH],[VH VOT VL],’r^’)
function [vo,iD]=vo_iD_NMOS_inverter(Kp,Vt,RD,VIT,VDD,vi)
for n=1:length(vi)
if vi(n)<=Vt, vo(n)=VDD; iD(n)=0; % Cutoff region
elseif vi(n)<=VIT % Saturation region
iD(n)=Kp/2*(vi(n)-Vt).^2; vo(n)=VDD-RD*iD(n); % Eq. (4.1.35)
else % Triode region
a=Kp*RD/2; b=-(Kp*RD*(vi(n)-Vt)+1); c=VDD;
vo(n) = (-b-sqrt(b^2-4*a*c))/2/a; % Eq. (4.1.36)
iD(n) = (VDD-vo(n))/RD;
end
end
Note that the high/low and absolute noise margins are defined by Eqs. (3.1.64) and (3.1.65) as
It may be useful for establishing your overview of the inverter analysis to see that the slope of the VTC (for the saturation region) is ‐
KpRD (vGS –
Vt) and also that the points A = (VIL,VOH), M = (VM, VM), T = (VIT, VOT), B = (VIH, VOL), and E = (VOH, VOE) on the VTC can be located on the (pink) load line intersecting the corresponding vDS‐iD characteristic curves of the NMOS in Figure 4.16(c).
The above MATLAB function ‘NMOS_inverter()
’ uses another function ‘vDS_vGS_ NMOS_inverter()
’ (implementing Eqs. (4.1.35) and (4.1.36)) to get the set of output voltage vo of an NMOS inverter for vi = 0 ~ VDD, uses another function ‘find_pars_of_inverter()
’ (Section 3.1.10) to find the inverter parameters, and then plots the VTC of the inverter.
Determine the values of RD and Kp for the e‐NMOS circuit of Figure 4.16(a) so that it dissipates a power of Pmax = 0.4 mW at a low output voltage of vo,min = 0.04 V where VDD = 2 V and the device parameters of the NMOS are Vt = 1 V and λ = 0. Plot the VTC of the designed inverter.
First, from the power specification, the drain current for vo = 0.04 V can be determined as
Then, the value of RD is determined as
Now, noting that the input voltage must be as high as VDD to result in such a low output voltage as 0.04 V (in the triode region), we use Eq. (4.1.13a) to determine the value of Kp so that the drain current can be 0.2 mA for vo = vDS = 0.04 V and vi = vGS = VDD = 2 V:
You can run the following MATLAB script “elec04e05.m” to plot the VTC and get the parameters of the designed inverter.
%elec04e05.m
% To solve Example 4.5
VDD=2; RD=1e4; Kp=5e-3; Vt=1; % Circuit and NMOS device parameters
[VIL,VIH,VOL,VOH,VM,VIT,VOT,VLH,NML,NMH,PDavg]=...
NMOS_inverter(Kp,Vt,RD,VDD)
This yields the VTC as depicted in Figure 4.16(b) and the following results:
VIL= 1.020, VIH= 1.307, VOL= 0.163, VOH= 1.990, VM= 1.181
NML= 0.857, NMH= 0.683, VOE= 0.040, Pavg= 0.196[mW]
Why is the value of Pavg about half of the power specification, Pmax = 0.4 mW? Because it is the average value of the power for on/off periods.
Figure 4.17(a) shows an e‐NMOS inverter, that is an NMOS inverter using a diode‐connected enhancement NMOS M2 (with its gate‐drain short‐circuited) as a load resistor where vGD2 = 0 < Vt2 so that M2 is always in saturation with the drain current (common to the two NMOSs):
Note that we can write a KVL equation in iD (for path VDD‐DS2‐DS1) or a KCL equation in vDS2 (at node S2‐D1) as
where the LHS of each equation corresponds to the (nonlinear) load curve (of M2 with Vt2 = 1 [V]), which is plotted as the red line together with the iD‐vDS1 characteristic curves of M1 with Vt1 = 1 [V] in Figure 4.17(b).
To get its transfer characteristic, suppose that the input voltage vi increases from 0 to VDD. While vi = vGS1 ≤ Vt1, M1 is cut off with iD = 0 so that vo = VDD ‐
vGS2 = VDD‐
Vt2 since vGS2 stays at Vt2 as long as iD = 0, as described by point A in the VTC shown in Figure 4.17(c). As vi = vGS > Vt1, M1 enters the saturation region where the drain current can be expressed as
and the output voltage vo can be determined in terms of vi by equating this with Eq. (4.1.45) for iD2:
This linear saturation mode (with slope −Kpr) continues till vo becomes low enough to make vGD1 = vi − vo ≥ Vt1 so that M1 knocks on the door to the triode region, as described by point T:
If vi increases over VIT, M1 enters the triode region where the drain current can be expressed as
and the output voltage vo can be determined in terms of vi by equating Eqs. (4.1.45) and (4.1.51):
Based on these two input‐output relationships (each for the saturation/triode region), we can plot the VTC as depicted in Figure 4.17(c). The VTC can be regarded as having been obtained by taking the values of (vGS1, vDS1) at the operating points, i.e. the intersection points of the load curve of M2 with the drain characteristic curves of M1 for each value of vi = vGS1. Figure 4.17(d) shows the VTC obtained from the PSpice simulation, which is quite similar to that (Figure 4.17(c)) obtained from the theoretical analysis.
The switching threshold voltage VM, also called the midpoint voltage, can be found by substituting vi = VM and vi = VM into the input–output relationship Eq. (4.1.48) (for the saturation region) and solving it for VM as
How about VIL (the maximum input voltage that can be interpreted as “0”) and the corresponding output voltage VOH (the minimum output voltage that can be interpreted as “1”)? Unlike the case of the NMOS inverter with a resistive load, it can't be determined as a point of slope ‐
1 because the slope of the VTC abruptly changes from zero to ‐
Kpr. Instead, we determine (VIL, VOH) at the turn‐on point A in Figure 4.17(c):
VIH (the minimum input voltage that can be interpreted as “1”) (at point B in Figure 4.17(c)) and the corresponding output voltage VOL (the maximum output voltage that can be interpreted as “0”) can be determined by setting the derivative of dvi/dvo (rather than dvo/dvi for a technical reason) to ‐
1:
The processes of using these formulas to find the parameters and plotting the VTC have been cast into the following MATLAB function ‘NMOS2e_inverter()
’. To analyze the NMOS inverter of Figure 4.17(a), all you need to do is to run the following MATLAB statements:
>>VDD=6; Vt1=1; Vt2=1; Kp1=1e-3; Kp2=0.1e-3;
Kp12=[Kp1 Kp2]; Vt12=[Vt1 Vt2]; NMOS2e_inverter(Kp12,Vt12,VDD);
This will yield the following analysis result and the VTC as depicted in Figure 4.17(c), which conforms with that (in Figure 4.17(d)) obtained from PSpice simulation:
VIL= 1.00, VIH= 2.39, VOL= 0.90, VOH= 5.00, VM= 1.96, VIT= 2.20, VOT= 1.20
Noise Margin: NML= 0.10 and NM= 2.61, Average power = 3.330e+00[mW]
function [VIL,VIH,VOL,VOH,VM,VIT,VOT,VLH,NML,NMH,PDavg,vios]=...
NMOS2e_inverter(Kp12,Vt12,VDD)
% To find the parameters of an NMOS inverter with another e-NMOS as load
% Kp12=[Kp1 Kp2], Vt12=[Vt1 Vt2]: Threshold (Pinch-off) voltage
% Copyleft: Won Y. Yang, [email protected], CAU for academic use only
if numel(Vt12)>1, Vt1=Vt12(1); Vt2=Vt12(2);
else Vt1=Vt12; Vt2=Vt12; end
if numel(Kp12)>1, Kp1=Kp12(1); Kp2=Kp12(2);
else Kp1=Kp12; Kp2=Kp12; end
Kpr2=Kp1/Kp2; Kpr=sqrt(Kpr2);
% Transition point (VIT,VOT)
VOT=(VDD-Vt2)/(1+Kpr); VIT=VOT+Vt1; % Eq. (4.1.50)
VIL=Vt1; VOH=VDD-Vt2; % Eq. (4.1.55a,b)
VH=VOH; % Just let VH=VOH (The highest output voltage)
% Cutoff Segment of VTC
dv=0.001; vi_cutoff=0:dv:Vt1; vo_cutoff = VH*ones(size(vi_cutoff));
Nc=numel(vi_cutoff);
% Saturation Segment of VTC
vi_sat = VIL:dv:VIT; % Saturation region
vo_sat = VDD-Vt2-Kpr*(vi_sat-Vt1); % Eq. (4.1.48)
% Alternative to find vo_sat for saturation segment of VTC
a1=1; b1=-2*(VDD-Vt2); c1=(VDD-Vt2)^2-Kpr^2*(vi_sat-Vt1).^2;
vo_sat0 = -b1/2-sqrt((b1/2)^2-a1*c1); % Eq. (4.1.48)
discrepancy_sat=norm(vo_sat0-vo_sat)/norm(vo_sat)
% Triode Segment of VTC
vi_tri=VIT:dv:VDD+1; % Triode region
a2=1+Kpr2; b2=-2*((VDD-Vt2)+Kpr2*(vi_tri-Vt1)); c2=(VDD-Vt2)^2;
vo_tri = (-b2-sqrt(b2.^2-4*a2*c2))/2/a2; % Eq. (4.1.53)
% Put all the segments together
vis=[vi_cutoff vi_sat vi_tri]; vos=[vo_cutoff vo_sat vo_tri];
vios = [vis; vos];
% To find the inverter parameters
VM = (VDD-Vt2+Kpr*Vt1)/(1+Kpr); % Eq. (4.1.54)
VOL = (VDD-Vt2)/sqrt(1+3*Kpr2); % Eq. (4.1.56a)
VIH = (VDD-VOL-Vt2)^2/2/Kpr2/VOL + VOL/2 +Vt1; % Eq. (4.1.56b)
VL = vos(ceil((VH-vis(1))/dv)); % vo to vi=VH (Virtual lowest output)
NMH = VOH-VIH; NML = VIL-VOL; % Eq. (4.1.43a,b)
IDD = Kp2/2*(VDD-VL-Vt2)^2;
PDavg = VDD*IDD/2; % Average power for on-off periods
fprintf(' VIL=%6.3f, VIH=%6.3f, VOL=%6.3f, VOH=%6.3f, VM=%6.3f,
VIT=%6.3f, VOT=%6.3f', VIL,VIH,VOL,VOH,VM,VIT,VOT);
fprintf(' Noise Margin: NM_L=%6.3f and NM_H=%6.3f', NML,NMH);
fprintf(' Average power = %10.3e[mW] ', PDavg*1e3);
% To plot the VTC
plot(vis,vos, [VIL VM VIH],[VOH VM VOL],'ro')
hold on, plot([Vt1 VIT VH],[VH VOT VL],'r^')
Figure 4.18(a) shows a d‐NMOS inverter, that is an NMOS inverter using a depletion NMOS M2 (with its gate‐source short‐circuited) as a load resistor where vGS2= 0 > Vt2 so that iD2= iD1= iD is determined by vDS2=VDD‐
vDS1 = VDD‐
vo as
The (nonlinear) load curve (of M2 with Vt2= −
1 [V]) is plotted as the pink line together with the iD‐vDS1 characteristic curves of M1 with Vt1 = 1 [V] in (b). Note that the load curve and the iD‐vDS1 characteristic curve of M1 for vGS1 = Vt1 ‐
Vt2 = 2 are symmetric about vDS1 = VDD/2 because they can be switched to each other by substituting vDS2 = VDD ‐
vDS1.
To get its transfer characteristic, suppose that the input voltage vi increases from 0 to VDD. While vi = vGS1 ≤ Vt1, M1 is cut off with iD = 0 while M2 is turned on, but with vDS2 = 0 (by Eq. (4.1.57b)) so that vo = VDD ‐
vDS2 = VDD. As vi = vGS1 > Vt1, M2/M1 enter the triode/saturation region where the drain current can be expressed as
and the output voltage vo can be determined in terms of vi by equating this with Eq. (4.1.57b):
From Figure 4.18(b), we can see that during this mode, the operating point moves upward from point S (via point A) along the semiparabolic load curve. When will this mode stop and M2 enter the saturation mode? It is when vGD2 = vSD2 = vDS1‐
VDD = Vt2 so that vo = vDS1 = VDD + Vt2 = VOT2. At this point T2, we have
When will this mode stop and M1 enter the triode mode? It is when vGD1 = vGS1 ‐
vDS1 = vi ‐
vo = Vt1. The output voltage vo at this point T can be determined by substituting vi = vo + Vt1 into Eq. (4.1.51) as
function [VIL,VIH,VOL,VOH,VM,VIT,VOT,VLH,NML,NMH,PDavg,vios]=...
NMOS2d_inverter(Kp12,Vt12,VDD)
% To find all the parameters of an NMOS inverter with a d-NMOS as load
% Kp12=[Kp1 Kp2], Vt12=[Vt1 Vt2]: Threshold (Pinch-off) voltage
% Copyleft: Won Y. Yang, [email protected], CAU for academic use only
Kp1=Kp12(1); Kp2=Kp12(2); Vt1=Vt12(1); Vt2=Vt12(2);
Kpr2=Kp1/Kp2; Kpr=sqrt(Kpr2);
% Transition point (VIT,VOT)
VIT=Vt1+abs(Vt2)/Kpr; IDT=Kp2*Vt2^2/2; % Eq. (4.1.60)
dv=0.001; vis=[0:dv:VIT VIT:dv:VDD];
for n=1:length(vis)
vi=vis(n);
if vi<Vt1, iDs(n)=0; vos(n)=VDD;
elseif vi<VIT % M1/M2: saturation/triode - % Eq. (4.1.59)
iDs(n)=Kp1/2*(vi-Vt1)^2; A=Kp2; B=2*Kp2*Vt2; C=2*iDs(n);
vDS2=(-B-sqrt(B^2-4*A*C))/2/A; %vDS2 = min(roots([A B C]));
vos(n)=VDD-vDS2;
elseif vi>VIT % M1/M2: triode/saturation - Eq. (4.1.63)
iDs(n)=Kp2/2*Vt2^2; A=Kp1; B=2*Kp1*(Vt1-vi); C=2*iDs(n);
vos(n)=(-B-sqrt(B^2-4*A*C))/2/A; %vos(n) = min(roots([A B C]));
else % M1/M2: saturation/saturation - % Eqs. (4.1.60,61)
iDs(n)=IDT;
VOT=sqrt(2/Kp1*IDT); % Transition point of M1 between SAT/Triode
VOT2=VDD+Vt2; % Transition point of M2 between Triode/SAT
vos(n) = (VOT+VOT2)/2;
end
end
vios=[vis; vos]; [VIL,VIH,VOL,VOH,VM,NML,NMH,VL,PDavg]= ...
find_pars_of_inverter(vis,vos,iDs,VDD);
VH=VDD; VLH=[VL VH]; % The lowest/highest output voltages
% To plot the VTC
plot(vis,vos, [VIL VM VIH],[VOH VM VOL],'ro')
hold on, plot([Vt1 VIT VH],[VH VOT VL],'r^')
Noting that the input voltage vi at this point is the same as VIT (Eq. (4.1.60)) despite the different values of vo, we can see that when vi = VIT, vo may change abruptly between VOT and VOT2 = VDD + Vt2. The midpoint is determined as the constant value of vi along this SAT‐SAT segment:
As vi = vGS1 increases over VIT, M1 enters the triode region while M2 continues to be in saturation so that their drain currents can be expressed as
and the output voltage vo can be determined in terms of vi by equating these two equations:
Based on the two input‐output relationships (Eqs. (4.1.59) and (4.1.63)), we can plot the VTC as depicted in Figure 4.18(c). The process of using these formulas to plot the VTC has been cast into the above MATLAB function ‘NMOS2d_inverter()
’, which uses the MATLAB function ‘find_pars_ of_inverter()
’ (Section 3.1.10) to find the values of the inverter parameters such as VIL/VOH, VIH/VOL (at the two points with the slope of the VTC equal to ‐
1), and VM (at the midpoint).
To analyze the NMOS inverter of Figure 4.18(a), all you need to do is to run the following MATLAB statements:
>>VDD=5; Vt1=1; Vt2=-1; Kp1=1e-3; Kp2=1e-3;
Kp12=[Kp1 Kp2]; Vt12=[Vt1 Vt2]; NMOS2d_inverter(Kp12,Vt12,VDD);
This will yield the following analysis result and the VTC as depicted in Figure 4.18(c), which conforms with that (in Figure 4.18(d)) obtained from PSpice simulation:
VIL= 1.708, VIH= 2.155, VOL= 0.577, VOH= 4.706, VM= 2.000
NML= 1.131, NMH= 2.551, VL= 0.127, Pavg= 1.250[mW]
Comparing Figures 4.17(c) and 4.18(c), note that the VTC of a d‐NMOS inverter has a steeper transition region and, accordingly, higher noise margins than an e‐NMOS inverter.
Figure 4.19(a) shows a CMOS (Complementary MOSFET) inverter using NMOS and PMOS fabricated on the same chip where both gates/drains are tied to the input/output, respectively, and the sources of Mp(PMOS)/Mn(NMOS) are connected to VDD/GND, respectively. Figure 4.19(b) shows the (blue‐lined) iD‐vDSn characteristic curves of Mn depending on vGSn and the (red‐lined) iD – (vSDp = VDD‐
vDSn) characteristic curves of Mp depending on vSGp = VDD ‐
vi. A rough VTC of the inverter can be plotted by connecting the operating points (vSGn = vi, vDSn = vo) {S, A, T2, T1, …}, i.e. the intersection points of the characteristic curve of Mn (for vGSn = 0~1, 1.5, 2, 2.5, 3, 3.5, and 4 ~ 5 V) with that of Mp (for vSGp = VDD‐
vi = 5~4, 3.5, 3, 2.5, 2, 1.5, and 1 ~ 0 V), as illustrated in Figure 4.19(b) and (c). Figure 4.19(d) shows the VTC obtained from the PSpice simulation.
Noting from Figure 4.19(b) and (c) that the operating point moves around the five regions I, II, III, IV, and V as the input voltage vi (applied to the common gate) varies from zero to VDD, let us analyze the inverter to find out the analytical expression of the VTC together with the transition points from a region to another region where the conduction parameters and threshold (turn‐on) voltages of the PMOS/NMOS are KpP/KpN and VtP/VtN, respectively. To this aim, we start from computing the value Vm of the input voltage vi (belonging to region III) at which both Mp and Mn operate in the saturation region by equating the drain currents of Mp and Mn described by Eq. (4.1.13b) (with λ = 0 for simplicity):
This will be used as the boundary values of vi between regions II and III or III and IV (see Figure 4.19(c)).
When 0 ≤ vi = vGSn ≤ VtN, Mn remains OFF while Mp conducts not in the saturation region but in the ohmic (triode) region because the off‐transistor Mn keeps Mp from conducting as much as it could with vSGp = VDD‐
vi ≥ |VtP|. Since the resistance of the off‐transistor Mn is much greater than that of the on‐transistor Mp, almost the whole VDD applies to Mn so that the output voltage is vo ≈ VDD.
When VtN < vi ≤ Vm, Mn/Mp are assumed to be in the saturation/ohmic regions, respectively (see Figure 4.19(b)) and the operating point is computed by equating the drain currents of Mp and Mn that are described by Eqs. (4.1.13b) (with λ = 0 for simplicity) and (4.1.13a), respectively:
If the (larger) root of this quadratic equation satisfies vo > vi ‐
VtP, the assumption is right. Otherwise, i.e. if
then Mp enters the saturation region and this is region III where both Mp and Mn operate in the saturation mode. The boundary between regions II and III is denoted by the pink line corresponding to vo = vi ‐
VtP in Figure 4.19(c).
The inverter stays in Region III (with Mp and Mn saturated) as long as the saturation condition of Mn is satisfied, i.e. if
function [VIL,VIH,VOL,VOH,Vm,VIT1,VOT1,VIT2,VOT2,VLH,NML,NMH,PDavg]=...
CMOS_inverter(KNP,VtNP,VDD,Kg)
% To find all the parameters of a CMOS inverter.
% KNP = [KN'(WN/LN) KP'(WP/LP)]
% VtNP = [VtN VtP]: Threshold (Pinch-off) voltages of NMOS/PMOS
% Copyleft: Won Y. Yang, [email protected], CAU for academic use only
if nargin<4, Kg=0; end
if numel(KNP)>1, KN=KNP(1); KP=KNP(2); else KN=KNP; KP=KNP; end
if numel(VtNP)>1, VtN=VtNP(1); VtP=VtNP(2); else VtN=VtNP; VtP=-VtNP; end
Kr2=KN/KP; Kr=sqrt(Kr2); % Ratio between conduction parameters of Mn and Mp
VOL=0; VOH=VDD; VH=VOH; % The lowest/highest output voltage
Vm=(VDD+VtP+Kr*VtN)/(1+Kr); % Eq. (4.1.65)
VIT2=Vm; VOT2=Vm-VtP; VIT1=Vm; VOT1=Vm-VtN; % Boundary points of Region III
dv=0.001; vis=[0:dv:VDD]; % Input voltage range
for n=1:length(vis)
vi=vis(n);
if vi<VtN, iDs(n)=0; vos(n)=VDD; % Mn OFF, Mp in ohmic region (Region I)
elseif vi<=Vm % Mn/Mp are saturation/ohmic region (Region II)
B=2*(VtP-vi); C=Kr2*(vi-VtN)^2+VDD*(2*(vi-VtP)-VDD); %Eq. (4.1.66)
vos(n)=(-B+sqrt(max(B^2-4*C,0)))/2; iDs(n)=KN/2*(vi-VtN)^2;
elseif vi<=VDD+VtP % Mp/Mn=saturation/triode (Region IV)
B=2*(VtN-vi); C=(VDD-vi+VtP)^2/Kr2; % Eq. (4.1.69)
vos(n)=(-B-sqrt(max(B^2-4*C,0)))/2; iDs(n)=KP/2*(VDD-vi+VtP)^2;
else iDs(n)=0; vos(n)=0; % Mn in triode region, Mp OFF (Region V)
end
% Here, Region III (Mp/Mn: sat) doesn't have to be taken care of
% since at most only a single value of vi=Vm can belong to that region.
end
[VIL,VIH,VOL,VOH,VM,NML,NMH,VL,PDavg]= ...
find_pars_of_inverter(vis,vos,iDs,VDD);
if Kg>0
subplot(221)
plot(vis,vos), hold on
plot([VIL VM VIH],[VOH VM VOL],'ro', [VtN VH],[VH VL],'r^')
title('VTC of a CMOS inverter')
subplot(222)
plot(vis,iDs), title('Drain current of the CMOS inverter'), grid on
end
%elec04f19.m
VDD=5; VtN=1; VtP=-1; KN=1e-3; KP=1e-3;
KNP=[KN KP]; VtNP=[VtN VtP];
Kg=2; % To plot the graphs
[VIL,VIH,VOL,VOH,Vm,VIT1,VOT1,VIT2,VOT2,VLH,NML,NMH,PDavg]=...
CMOS_inverter(KNP,VtNP,VDD,Kg);
If vi increases further enough to break the above condition, i.e. vo < vi ‐
VtN, Mn enters the ohmic region (see Figure 4.19(b)) and the operating point is computed by equating the drain currents of Mp (in the saturation region) and Mn (in the ohmic region) that are described by Eqs. (4.1.13b) (with λ = 0 for simplicity) and (4.1.13a), respectively:
The (smaller) root of this quadratic equation will be vo as long as vi≤ vDD+
VtP.
While Mn is still in the ohmic region, Mp will be OFF if
Then almost the whole VDD applies to Mp (with much larger resistance) so that vo ≈ 0.
The process of finding the output voltage of the CMOS inverter to the whole range of the input has been cast into the above MATLAB function ‘CMOS_inverter()
’. We have run the above MATLAB script “elec04f19.m” to get not only the following values of the inverter parameters
VIL = 2.1250, VIH = 2.8750, VOL = 0.3750, VOH = 4.6250,
VIT2 = 2.5000, VOT2 = 3.5000, Vm = 2.5000, VIT1 = 2.5000, VOT1 = 1.5000,
NML = 1.7500, NMH = 1.7500, PDavg = 0.0028
but also the VTC and the drain current of the inverter as depicted in Figures 4.19(c) and 4.20(a), respectively. As can be seen from the VTC in Figure 4.19(c), the lowest/highest output voltage levels are 0/VDD so that the CMOS inverter has the maximum output swing. This, together with the symmetry of the VTC, is the reason why a CMOS inverter can have wide noise margins.
Figure 4.20(b) shows the drain current of the inverter obtained from the PSpice simulation, which is quite similar to Figure 4.20(a). What is implied by the current curve(s) in Figure 4.20? The current (drawn from the supply voltage source VDD) is zero when the CMOS inverter is in its output‐high/low state so that the CMOS gate can power down in its static condition, which is one of the major advantages of CMOS configuration.
One more thing to note before closing this section is that a formula to determine the geometry ratio K from the given values of VDD, Vm (the boundary value of the input voltage between regions II and III or regions III and IV), VtP (the threshold voltage of PMOS), and VtN (the threshold voltage of NMOS) can be derived from Eq. (4.1.65) as
Figure 4.21(a) and (b) shows a source‐coupled (in the sense that the source terminals of the two FETs are connected) or differential (in the sense that its output varies with the differential input vd = vGS1‐
vGS2) pair. To analyze this circuit, we assume that the two FETs have identical conduction parameters Kp and threshold voltages Vt, and both of them operate in the saturation mode so that we can use Eq. (4.1.13b) (with λ = 0 for ignoring the CLM effect) to write their approximate drain currents as
Thus, the difference between their square roots can be written as
Also, we apply KCL at node 3 (S1‐S2) to write
Subtracting the square of Eq. (4.1.73) from Eq. (4.1.74) yields
Thus, iD1 and iD2 can be found from the two roots of the quadratic equation:
where these drain currents are depicted in Figure 4.21(b). Then we can write the (differential) output voltage as
This differential output voltage vo, together with vo1 and vo2, is shown in Figure 4.21(c). From Figure 4.21 and Eqs. (4.1.76) and (4.1.77), note the following:
On the other hand, if vd < ‐
1.5, we have
It is implied that a large swing of the differential input vd = ± makes the two FETs M1/M2 operate as a closed or an open switch, producing two distinct levels of differential output vo depending on whether vd = or vd = ‐
.
The small‐signal input‐output relationship of the differential pair can be derived by substituting Eqs. (4.1.72a,b) directly into Eq. (4.1.77):
Note that the differential (mode) voltage gain ‐
gmRD can be regarded as the voltage gain (Eq. (4.2.6b)) of a common‐source (CS) amplifier with RS1 = 0 and RL = ∞. Note also that if vo1 or vo2, instead of vo, is taken as the output, the differential voltage gain gmRD is halved:
The amplifying/switching properties are extensively used in analog/digital circuits, respectively. That is why the source‐coupled differential pair is one of the most important configurations employed in ICs.
To analyze the FET differential pair circuit in Figure 4.21(a), we can apply KCL at nodes 1, 2, and 3 to write
where iDk (vGSk, vDSk) is defined by Eqs. (4.1.13a,b) as
The process of solving this set of equations to find v = [v1 v2 v3] for vd = ‐
Vdm~ + Vdm and plotting vo = v1‐
v2, iD1, iD2 (together with their analytic values computed by Eqs. (4.1.79) and (4.1.83)) versus vd has been cast into the following MATLAB function ‘FET_differential()
’. We can run
>>Kp=5e-3; Vt=1; lambda=0; ISS=5e-3; RD=1e3; VDD=5; Vdm=1.5;
dvd=Vdm/1000;
vds=[-Vdm:dvd:Vdm];
FET_differential(Kp,Vt,lambda,ISS,RD,VDD,vds);
to get the graphs of iD1, iD2, and vo as depicted in Figure 4.21(b) and (c).
function [vo1s,vo2s,iD1s,iD2s]= ... FET_differential(Kp,Vt,lambda,ISS,RD,VDD,vds)
% Analyze an FET differential (source-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 FETs, 2 resistors RD1=RD2=RD, and an I-src ISS.
% vds : Range of differential input vd
% Copyleft: Won Y. Yang, [email protected], CAU for academic use only
if nargin<6, Vdm=1.5*sqrt(ISS/Kp); dvd=Vdm/1000; vds=[-Vdm:dvd:Vdm]; end options=optimset('Display','off','Diagnostics','off');
iD=@(vGS,vDS)Kp*(1+lambda*vDS).*((vGS-Vt).^2/2.*(vGS>=Vt).*(vGS-vDS<Vt)
+((vGS-Vt).*vDS-vDS.^2/2).*(vGS>=Vt).*(vGS-vDS>=Vt)); % Eq. (4.1.83)
id2 = vds.*sqrt(max(Kp*(ISS-Kp*vds.^2/4),0)); % Eq. (4.1.76): iD1-iD2
idms=find(id2==min(id2)); idm1=idms(1); id2(1:idm1)=min(id2);
idms=find(id2==max(id2)); idm2=idms(end); id2(idm2:end)=max(id2);
iD1s_a=(ISS+id2)/2; iD2s_a=(ISS-id2)/2; % Eq. (4.1.76a,b)
v1_a=VDD-RD*iD1s_a; v2_a=VDD-RD*iD2s_a; vo_a=v1_a-v2_a;
for n=1:length(vds)
vd = vds(n);
eq=@(v)[VDD-v(1)-RD*iD(vd-v(3),v(1)-v(3))
VDD-v(2)-RD*iD(-v(3),v(2)-v(3)) % Eq. (4.1.82)
(iD(vd-v(3),v(1)-v(3))+iD(-v(3),v(2)-v(3))-ISS)*1e3];
if ~exist('v'), v0=[v1_a(1) v2_a(1) v3_a(1)]; % Initial guess
else v0=v;
end
%Here, the first values of analytical solutions are used as the initial
% guess for the numerical solution of Eq. (4.1.80) with vd(1).
[v,fe]=fsolve(eq,v0,options);
vo1s(n)=v(1); vo2s(n)=v(2); v3s(n)=v(3); vos(n)=v(1)-v(2); % Eq. (4.1.77)
iD1s(n)=iD(vd-v(3),v(1)-v(3)); iD2s(n)=iD(-v(3),v(2)-v(3));
end
Figure 4.22(a)‐(c) shows a two‐input CMOS NOR gate, a two‐input CMOS NAND gate, and a CMOS (bidirectional) transmission gate together with their truth tables where the substrates of the PMOS(Mp) and NMOS(Mn) are connected to the most positive/negative potentials (that are VDD/GND), respectively. The transmission gate makes possible the tristate output or wired‐or connection in CMOS circuits and can be used as building blocks for logic circuitry such as a D flip‐flop. Figure 4.23 shows a 256 × 8 bit (256 bytes) NMOS ROM chip where each one of the 256 bytes stored in the memory can be selected by the word line, which is set to High depending on the 8‐bit address code input to the 8‐input 128‐output decoder.
Here are some comparisons of CMOS and NMOS gates:
If an FET is used for the purpose of small‐signal amplification, it is supposed to be operating in the saturation region (for the range of input signal vGS = VGS,Q + vgs around VGS,Q at the bias point Q) where its drain current is expressed by
and additionally, its small‐signal component id can be approximated linearly in terms of vgs:
In order for this linear approximation to be valid, the last term of degree 2 must be negligibly small:
so that
This section deals with three configurations of FET amplifier, i.e. the CS (common‐source) amplifier, the CD (common‐drain) amplifier (called a source follower), and the CG (common‐gate) amplifier.
Figure 4.24 shows a CS FET amplifier and its low‐frequency AC equivalent where the FET has been replaced by the equivalent in Figure 4.3(b). Let us find the input resistance, voltage gain, and output resistance. The formulas have been implemented in the MATLAB function ‘FET_CS_analysis()
’.
Since the gate current of the FET is almost zero, the equivalent resistance seen from the input side (see Figure 4.24(b1)) is
To find the voltage gain, we write the node equation for the circuit of Figure 4.24(b1) as
Noting that vi = vg = Ri vs/(Rs + Ri), we can write the voltage gains, i.e. the ratios of the output voltage vo to the source voltage vs and the input voltage vi as
To find the (Thevenin) equivalent resistance seen from the load side, we need to remove the (independent) voltage source vs by short‐circuiting it as depicted in Figure 4.24(c). Then, with the test voltage vT applied across RD, we write the drain current id as
Since the test current iT flowing out of vT is the sum of id and :
Therefore, the output resistance turns out to be
function [VGQ,VSQ,VDQ,IDQ,Av,Ri,Ro,gm,ro,Vom,vsmax]= ...
FET_CS_analysis(VDD,Rs,R1,R2,RD,RS,RL,Kp,Vt,lambda,Vsm)
% Copyleft: Won Y. Yang, [email protected], CAU for academic use only
if nargin<11, Vsm=0.01; end
if nargin<10, lambda=0; end % CLM parameter
if length(RS)==1, RS1=0; RS2=RS; else RS1=RS(1); RS2=RS(2); end
[VGQ,VSQ,VDQ,VGSQ,VDSQ,IDQ,mode,gm,ro]= ...
FET_DC_analysis(VDD,R1,R2,RD,RS,Kp,Vt,lambda);
if R1<=30, Ri=R2; else Ri=parallel_comb([R1 R2]); end % Eq. (4.2.5)
RDL=parallel_comb([RD RL]); mug=gm*ro;
if ro<inf, ro_mug1_RS1=ro+(mug+1)*RS1; Av=-mug*RDL/(RDL+ro_mug1_RS1);
else ro_mug1_RS1=inf; Av=-gm*RDL;
end
Ro = parallel_comb([ro_mug1_RS1 RD]); % Eq. (4.2.7)
Avi=1/(Rs/Ri+1); Gv=Avi*Av; % Eq. (4.2.6)
fprintf(' Ri=%8.2f[kOhm], Ro=%6.0f[Ohm] Gv=Ri/(Rs+Ri)xAv =%5.2f x%8.2f
=%8.2f with Kp=%5.2f[mA/V^2], gm=%8.3f[mS], ro=%8.3f[kOhm] ', ...
Ri/1e3,Ro,Avi,Av,Gv,Kp*1e3,gm*1e3,ro/1e3)
Vom=Gv*Vsm; vsmax=0.2*(1+gm*RS1)*(VGSQ-Vt)/Avi; % Eq. (4.2.9)
if strcmp(mode(1:3),'sat')~=1
fprintf(' This AC analysis is invalid since the FET is not
in the saturation region '); return;
end
if abs(Vom/RDL)>=0.99*IDQ
fprintf(' Possibly crash into cutoff region since |Av*Vsm/RDL(%9.4fmA)|
>=|IDQ|(%9.4fmA) ', abs(Av*Vsm/RDL)*1e3,abs(IDQ)*1e3);
end
if abs(VDSQ)-abs(Vom)<abs(VGSQ-Vt) % Eq. (4.1.9) Sat condition not met
fprintf(' Possibly violate the ohmic region since |VDSQ|-|Av*Vsm|
(%6.3f)<|VGSQ-Vt|(%6.3f) ',abs(VDSQ)-abs(Av*Vsm),abs(VGSQ-Vt));
end
Noting that if ro is very large in Figure 4.24(b1),
the maximum small‐signal input satisfying the condition (4.2.3) for linear amplification can be determined as
Consider the CS FET amplifiers in Figure 4.25(a1) and (a2) where VDD = 12 V, Rs = 1 kΩ, R1 = 2.2 MΩ, R2 = 1.5 MΩ, RD = 22 kΩ, RS1 = 6 kΩ, RS2 = 6 kΩ, RL = 100 kΩ, Kp = 0.5 mA/V2, Vt = 1 V, and λ = 0.01 V‐
1.
%elec04e06.m
VDD=12; Rs=1e3; R1=22e5; R2=15e5; RD=22e3; RL=1e5;
Kp=0.5e-3; Vt=1; lambda=0.01; RS=[6e3 6e3]; RS2=[0 sum(RS)];
[VGQ,VSQ,VDQ,IDQ,Av1,Ri1,Ro1,gm1,ro1,Vom1,vsmax1]= ...
FET_CS_analysis(VDD,Rs,R1,R2,RD,RS,RL,Kp,Vt,lambda) % for (a1)
[VGQ2,VSQ2,VDQ2,IDQ2,Av2,Ri2,Ro2,gm2,ro2,Vom2,vsmax2]= ...
FET_CS_analysis(VDD,Rs,R1,R2,RD,RS2,RL,Kp,Vt,lambda) % for (a2)
gmRS1=[1+gm1*RS(1) 1+gm2*RS2(1)], vsmax=[vsmax1 vsmax2]
To find the values of the amplifier parameters, Ri, Ro, Av = vo/vi, and Gv = vo/vs, and determine the maximum small‐signal input vs,max allowing linear amplification for the two circuits, we run the above MATLAB script “elec04e06.m” to get
VDD VGQ VSQ VDQ IDQ
12.00 4.86 2.90 6.68 2.42e-04
in the saturation mode with VGD,Q= -1.82[V] (Vt=1.00)
Ri= 891.89 kOhm, Ro= 21723 Ohm % for (a1)
Gv=Ri/(Rs+Ri)xAv= 1.00 x -2.22 = -2.22 with gm=0.501[mS], ro=429kOhm
Ri= 891.89 kOhm, Ro= 20928 Ohm % for (a2)
Gv=Ri/(Rs+Ri)xAv= 1.00 x -8.67 = -8.66 with gm=0.501[mS], ro=429kOhm
gmRS1 = [4.0048 1.0000], vsmax = [0.7738 0.1932]
These DC + AC analysis results are supported by the PSpice simulation results shown in Figure 4.25(a1), (a2), and (c). As can be guessed from Eqs. (4.2.6b) (Av inversely proportional to 1 + gmRS1) and (4.2.9) (vs,max ≈ vi,max proportional to 1 + gmRS1), the voltage gain of (a2) is about 4 times that of (a1) while vs,max of (a2) is about 1/4 times that of (a1). Thus, the two amplifiers (a1) and (a2) will not differ much in the sweep range of their output voltage vo that can be amplified linearly without distortion.
Figure 4.26 shows a CD FET amplifier and its low‐frequency AC equivalent where the FET has been replaced by the equivalent in Figure 4.3(b). Let us find the input resistance, voltage gain, and output resistance. The formulas have been implemented in the MATLAB function ‘FET_CD_analysis()
’.
Since the gate current of the FET is almost zero, the input resistance is
To find the voltage gain Av = vo /vi, we write the node equation for the circuit of Figure 4.26(b1) as
Thus, we have the voltage gains as
function [VGQ,VSQ,VDQ,IDQ,Av,Ri,Ro,gm,ro,Vom,vsmax]=
FET_CD_analysis(VDD,Rs,R1,R2,RD,RS,RL,Kp,Vt,lambda,Vsm)
% If D with RD~=0 is AC grounded, RD should be given as [0 RD].
% Copyleft: Won Y. Yang, [email protected], CAU for academic use only
RD1=RD(1); RS1=RS(1);
[VGQ,VSQ,VDQ,VGSQ,VDSQ,IDQ,mode,gm,ro]= ...
FET_DC_analysis(VDD,R1,R2,RD,RS,Kp,Vt,lambda);
if R1<=30, Ri=R2;
else Ri=parallel_comb([R1 R2]); % Eq. (4.2.10)
end
gm1=gm/(1+RD1/ro); ro1=ro+RD1; % Against the case where RD is nonzero.
RSL=parallel_comb([RS1 RL]); RdsSL=parallel_comb([ro1 RSL]);
Ro=parallel_comb([1/gm1 RS1 ro1]); % Eq. (4.2.12)
Av=gm1*RdsSL/(1+gm1*RdsSL); Avi=1/(Rs/Ri+1);
Gv=Avi*Av; % Eq. (4.2.11)
Vom=Gv*Vsm;
vsmax=0.2*(1+gm1*RdsSL)*(VGSQ-Vt)/Avi; % Eq. (4.2.13)
fprintf(' Ri=%8.2f kOhm, Ro=%6.0f Ohm Gv=Ri/(Rs+Ri)xAv =%7.4f x%8.4f
=%8.4f', Ri/1e3,Ro,Avi,Av,Gv)
if strcmp(mode(1:3),'sat')~=1
fprintf(' This AC analysis is invalid since the FET isn't saturated ');
return;
end
if abs(Av*Vsm/RSL)>=IDQ, fprintf(' Possibly crash into cutoff '); end
if abs(VDSQ)-Av*Vsm<abs(VGSQ-Vt) % Eq. (4.1.9) is not met
fprintf(' Possibly violate the ohmic region ');
end
This implies that if Rs ≪ Ri and gm (ro||Rs||RL) ≫ 1, the output voltage is almost equal to the input and source voltages and that is why the CD amplifier is called a voltage follower.
To find the output resistance, we remove the (independent) voltage source, vi, by short‐circuiting it as depicted in Figure 4.26(c). Then, with the test current iT applied to the output port, we can get
Noting that if ro is very large in Figure 4.26(b1),
we can write the maximum small‐signal input satisfying the condition (4.2.3) for linear amplification as
Consider the CD FET amplifier in Figure 4.27(a) where VDD = 12 V, Rs = 1 kΩ, R1 = 2.2 MΩ, R2 = 1.5 MΩ, RD = 0 kΩ, RS = 12 kΩ, RL = 100 kΩ, Kp = 0.5 mA/V2, Vt = 1 V, and λ = 0.01 V‐
1.
%elec04e07.m
VDD=12; Rs=1e3; R1=22e5; R2=15e5; RD=0; RS=12e3; RL=1e5; Vsm=0.2;
Kp=0.5e-3; Vt=1; lambda=0.01;
[VGQ,VSQ,VDQ,IDQ,Av1,Ri,Ro,gm,ro,Vom,vsmax]= ...
FET_CD_analysis(VDD,Rs,R1,R2,RD,RS,RL,Kp,Vt,lambda);
fprintf('vsmax =%10.3e[V] ',vsmax);
To find the values of the amplifier parameters Ri, Ro, Av = vo/vi, and Gv = vo/vs, and determine the maximum small‐signal input vs,max allowing linear amplification for the circuit, we run the above MATLAB script “elec04e07.m” to get
VDD VGQ VSQ VDQ IDQ
12.00 4.86 2.92 12.00 2.43e-04
in the saturation mode with VGD,Q= -7.14[V] (Vt=1.00)
gm= 0.515[mS], ro= 448.241[kOhm]
Ri= 891.89 kOhm, Ro= 1665 Ohm
Gv=Ri/(Rs+Ri)xAv = 0.9989 x 0.8435 = 0.8426
vsmax = 1.209e+00[V]
These DC + AC analysis results are supported by the PSpice simulation results shown in Figure 4.27(c1) and (c2). As can be guessed from Eqs. (4.2.11) and (4.2.12), the voltage gain, less than 1, may increase toward 1 and the output resistance Ro, smaller than 1/gm, may become smaller as the transconductance gm (Eq. (4.1.4b)) (proportional to ID,Q) increases.
Figure 4.28 shows a CG amplifier and its low‐frequency AC equivalent where the FET has been replaced by the equivalent in Figure 4.3(b). Let us find the input resistance, voltage gain, and output resistance. The formulas have been implemented in the MATLAB function ‘FET_CG_analysis()
’.
To find the input resistance, we apply a test voltage source vs between node s and GND (as depicted in Figure 4.28(c)) and then write the relationship of vs and is as
This implies that the equivalent resistance of the FET between node s and GND is Rsg. Thus, the input resistance is the parallel combination of RS and Rsg:
Since (during the process of computing Ri) the current through RD||RL caused by vs was found to be
the output voltage (across RD||RL) can be expressed as
Thus, taking account of vi = Ri vsig/(Rs + Ri), we can write the voltage gains, i.e. the ratios of the output voltage vo to the source voltage vsig and the input voltage vi as
To find the output resistance, we remove the (independent) voltage source vi by short‐circuiting it. Then, we can write the output resistance as
Since |vi| = |vg| = |vgs|, the maximum small‐signal input satisfying the condition (4.2.3) for linear amplification can be determined as
function [VGQ,VSQ,VDQ,IDQ,Av,Ri,Ro,gm,ro,Vom,vsmax]= ...
FET_CG_analysis(VDD,Rs,R1,R2,RD,RS,RL,Kp,Vt,lambda,Vsm)
% Copyleft: Won Y. Yang, [email protected], CAU for academic use only
[VGQ,VSQ,VDQ,VGSQ,VDSQ,IDQ,mode,gm,ro]= ...
FET_DC_analysis(VDD,R1,R2,RD,RS,Kp,Vt,lambda);
RS1=RS(1); RDL=parallel_comb([RD RL]); Rsg=(ro+RDL)/(1+gm*ro);
if R1<=30, Ri=R2; else Ri=parallel_comb([RS1 Rsg]); end % Eq. (4.2.15)
Ro=parallel_comb([(1+gm*ro)*parallel_comb([Rs RS1])+ro RD]); % Eq. (4.2.17)
Av=RDL/Rsg; Avi=1/(Rs/Ri+1); % Eq. (4.2.16b)
Gv=Avi*Av; % Eq. (4.2.16a)
Vom=Gv*Vsm; vsmax=0.2*(VGSQ-Vt)/Avi; % Eq. (4.2.18)
fprintf(' Ri=%8.2f[kOhm], Ro=%6.0f[Ohm] Gv=Ri/(Rs+Ri)xAv =%5.2f x
%8.2f =%8.2f ', Ri/1e3,Ro,Avi,Av,Gv,Kp*1e3,gm*1e3,ro/1e3)
if strcmp(mode(1:3),'sat')~=1
fprintf('/nThis AC analysis is invalid since the FET isn't saturated ');
return;
end
if abs(VDSQ)-Av*Vsm<abs(VGSQ-Vt) % Eq. (4.1.9) is not met
fprintf(' Possibly violate the ohmic region ');
end
Consider the CG FET amplifier in Figure 4.29(a) where VDD = 12 V, Rs = 2 kΩ, R1 = 2.2 MΩ, R2 = 1.5 MΩ, RD = 22 kΩ, RS = 12 kΩ, RL = 100 kΩ, Kp = 0.5 mA/V2, Vt = 1 V, and λ = 0.01 V‐
1.
%elec04e08.m
VDD=12; Rs=2e3; R1=22e5; R2=15e5; RD=22e3; RS=12e3; RL=1e5; Vsm=5e-3;
Kp=0.5e-3; Vt=1; lambda=0.01;
[VGQ,VSQ,VDQ,IDQ,Av1,Ri,Ro,gm,ro,Vom,vsmax]= ...
FET_CG_analysis(VDD,Rs,R1,R2,RD,RS,RL,Kp,Vt,lambda)
fprintf('vsmax =%10.4fmV ',vsmax*1e3);
To find the values of the amplifier parameters Ri, Ro, Av = vo/vi, and Gv = vo/vs, and determine the maximum small‐signal input vs,max allowing linear amplification for the circuit, we run the above MATLAB script “elec04e08.m” to get
VDD VGQ VSQ VDQ IDQ
12.00 4.86 2.90 6.68 2.42e-04
in the saturation mode with VGD,Q= -1.82[V] (Vt=1.00)
gm= 0.501[mS], ro= 429.481[kOhm]
Ri= 1.766[kOhm], Ro= 21411[Ohm]
Gv=Ri/(Rs+Ri)xAvoxRL/(Ro+RL) =0.4690 x ( 10.57x0.8236= 8.707) = 4.083
vsmax = 810.2108mV
These DC + AC analysis results are supported by the PSpice simulation results shown in Figure 4.29(a), (c1), and (c2). As can be guessed from Eq. (4.2.15), the input resistance Ri is small so that the overall voltage gain Gv = vo/vs can be substantially lower than the terminal voltage gain Av = vo/vi.
Figure 4.30(a) shows a CS amplifier with an enhancement NMOS driver MD and an enhancement NMOS load ML, which is diode connected with its gate and drain short‐circuited so that it can act like a nonlinear resistor. The drain (output) characteristic curves of MD (for several values of vGS) are plotted as solid lines while the iD,L−vDS,L and iD,L−vDS,D=VDD−vDS,L relationships of ML (with vGS,L = vDS,L) are plotted as the lines of square/circle symbols, respectively, in Figure 4.30(b) where the conduction parameter Kp, threshold voltage Vt, and CLM parameter λ of MD and ML are
From the locus of dynamic operating points obtained from the intersections of the (pink solid) load line and the characteristic curves of MD (for several values of vi = vGS,D), the graphs of iD(t) = iD,L(t) = iD,D(t) and vo(t) = vDS,D(t) for the sinusoidal input vi(t) = Vsm sin (2000πt) (with Vsm = 0.5 or 1) applied to the G‐S terminals of MD have been plotted as the green and red lines in Figure 4.30(b).
Note that the intersection of the load line of ML and the characteristic curve of MD for a certain value of the input vGS,D = vi (>Vt,D) can analytically be obtained as follows:
function [VGQ,VSQ,VDQ,IDQ,vo,iD,gm,ro]=
FET_CS_NMOSe(VDD,Rs,R1,R2,RL,Kp,Vt,lambda,vi)
% Copyleft: Won Y. Yang, [email protected], CAU for academic use only
KpD=Kp(1); KpL=Kp(end); VtD=Vt(1); VtL=Vt(end);
if lambda(1)>1, lambda=1./lambda; end
lambdaD=lambda(1); lambdaL=lambda(end);
if nargin<9, vi=0; else vi=[vi 0]; end % 0 for finding the Q point
Ri=R1*R2/(R1+R2); VGQ=VDD*R2/(R1+R2); VSQ=0; VGSQ=VGQ-VSQ; B=2*(VtL-VDD);
for n=1:length(vi)
vGSn = VGQ + vi(n)/(Rs/Ri+1);
C=(VDD-VtL)^2-KpD/KpL*(vGSn-VtD)^2; % Eq. (4.2.20)
D=B^2-4*C; % Discriminant of Eq. (4.2.20)
if D<=0 % vGSn<VtD
fprintf('Driver FET is OFF for vGS(%5.2f)<=VtD(%5.2f) ', vGSn,VtD);
iD(n)=0; vo(n)=VDD; continue;
end
von=(-B-sqrt(D))/2; iDn=KpD/2*(vGSn-VtD)^2;
if von<vGSn-VtD % vGD,D=vGS,D-vDS,D=vGSn-von>Vt ?
A=1+KpD/KpL; B1=B+2*KpD/KpL*(VtD-vGSn); C=(VDD-VtL)^2; % Eq. (4.2.21)
von=(-B1-sqrt(B1^2-4*A*C))/2/A; iDn=KpL/2*(VDD-von-VtL)^2;
fprintf('Driver FET is ohmic with vGD(%5.2f)>Vt(%5.2f) ...
for vi(%4d)=%5.2f ', vGSn-von,VtD,n,vi(n));
end
vo(n)=von; iD(n)=iDn;
end
VDSQ=von; VDQ=VDSQ+VSQ; IDQ=iDn; vo=vo(1:end-1); iD=iD(1:end-1);
gm=KpD*(VGQ-VtD)*(1+lambdaD*VDSQ); ro=1/lambdaD/abs(IDQ); % Eq. (4.1.4)
if VDSQ<sqrt(2*IDQ/KpD)|VDSQ>VDD-VtL
fprintf(' Linear AC analysis is invalid for FET isn''t saturated! ');
end
‐
Vt,D so that vGD,D = vGS,D‐
vDS,D >Vt,D, we assume that MD is in the ohmic region and find the smaller one of the two roots of the following quadratic equation:
This process of analyzing the CS amplifier with an enhanced FET load has been cast into the above MATLAB function ‘FET_CS_NMOSe()
’. We can run the following MATLAB script “do_FET_CS_NMOSe.m” to plot the output vo(t) to the input vi(t) = 0.5 sin (2000πt) for t = 0 ~ 1 ms like the PSpice simulation result shown in Figure 4.30(c).
%do_FET_CS_NMOSe.m
VDD=18; Rs=100; R1=1e5; R2=1e5; RL=1e6; Vsm=0.5;
tf=1e-3; t=tf/180*[0:180]; w=2000*pi; vi=Vsm*sin(w*t);
Kp=[2e-5 2e-5]; Vt=[1 1]; lambda=1e-2; % Eq. (4.2.14)
[VGQ,VSQ,VDQ,IDQ,vo,iD]= ...
FET_CS_NMOSe(VDD,Rs,R1,R2,RL,Kp,Vt,lambda,vi);
subplot(221), plot(t,vi, t,vo-(VDQ-VSQ),'r'), grid on
Figure 4.31(a) shows a CS amplifier with an enhancement NMOS driver MD and a depletion NMOS load ML, which is diode connected with its gate and source short‐circuited so that it can act like a current‐limited nonlinear resistor. The drain (output) characteristic curves of MD (for several values of vGS) are plotted as blue lines while the iD,L – vDS,L and iD,L – vDS,D = VDD – vDS,L relationships of ML (with vGS,L = 0) are plotted as the lines of square/circle symbols, respectively, in Figure 4.31(b) where the conduction parameter Kp, threshold voltage Vt, and CLM parameter λ of MD and ML are
From the locus of dynamic operating points obtained from the intersections of the (pink solid) load line and the characteristic curves of MD (for several values of vi = vGS), the graphs of iD(t) = iD,L(t) = iD,D(t) and vo(t) = vDS,D(t) for the sinusoidal input vi(t) = Vsm sin (2000πt) (with Vsm = 0.5 or 1) applied to the G‐S terminals of MD can be plotted as the green and red lines, respectively, in Figure 4.31(b).
Note that the intersection of the load line of ML and the characteristic curve of MD for a certain value of the input vGS,D = vi (>Vt,D) can analytically be found as follows:
function [VGQ,VSQ,VDQ,IDQ,vo,iD,gm,ro]= ...
FET_CS_NMOSd(VDD,Rs,R1,R2,RL,Kp,Vt,lambda,vi)
% Copyleft: Won Y. Yang, [email protected], CAU for academic use only
KpD=Kp(1); KpL=Kp(end); VtD=Vt(1); VtL=Vt(end);
if lambda(1)>1, lambda=1./lambda; end
lambdaD=lambda(1); lambdaL=lambda(end);
Ri=parallel_comb([R1 R2]); % Input resistance
VGQ=VDD*R2/(R1+R2); VSQ=0; VGSQ=VGQ-VSQ;
if nargin<9, vi=0; else vi=[vi 0]; end % 0 for finding the Q point
for n=1:length(vi)
vGSn = VGQ + vi(n)/(Rs/Ri+1);
num=VtL^2*(1+lambdaL*VDD)-KpD/KpL*(vGSn-VtD)^2;
den=lambdaD*KpD/KpL*(vGSn-VtD)^2+lambdaL*VtL^2; % Eq. (4.2.23)
von=num/den; iDn=KpL/2*VtL^2*(1+lambdaL*(VDD-von));
if von<vGSn-VtD % vGD,D=vGS,D-vDS,D=vGSn-von>Vt ?
fprintf('MD is ohmic: vGD(%5.2f)<Vt(%5.2f) ',vGSn-von,VtD);
iDn=KpL/2*VtL^2; B=2*(VtD-vGSn); C=iDn/KpD; % Eq. (4.2.24)
von=(-B-sqrt(B^2-4*C))/2;
elseif von>VDD+VtL % vGD,L=vSD,L=vDS,D-VDD=von-VDD>VtL ?
fprintf('ML is ohmic: vGD(%5.2f)>Vt(%5.2f) ', von-VDD,VtL);
iDn=KpD/2*(vGSn-VtD)^2; B=-2*(VDD+VtL); C=iDn/KpL+VDD*(2*VtL+VDD); % Eq. (4.2.25)
von=(-B+sqrt(B^2-4*C))/2;
end
vo(n)=von; iD(n)=iDn;
end
VDSQ=vo(n); VDQ=VDSQ+VSQ; IDQ=iD(n);
vo=vo(1:end-1); iD=iD(1:end-1);
gm=KpD*(VGQ-VtD)*(1+lambdaD*VDSQ); ro=1/lambdaD/abs(IDQ); % Eq. (4.1.4)
if VDSQ<VGSQ-VtD
fprintf(' Linear AC analysis is invalid since driver FET is ohmic ');
elseif VDSQ>VDD+VtL
fprintf(' Linear AC analysis is invalid since load FET is ohmic ');
end
‐
vDS,L = ‐
(VDD − vDS,D) > Vt,L, the following equation should be solved on the assumption that ML is in the ohmic region:
where the larger one of the two roots should be taken as the value of vo because the smaller one must be invalid.This process of analyzing the CS amplifier with a depletion FET load has been cast into the above MATLAB function ‘FET_CS_NMOSd()
’.
An alternative to analyze the circuit of Figure 4.31(a) is to solve the KCL at node 1:
where vGS,D = VGSQ,D + vi with VGSQ,D = VDDR2/(R1 + R2) and iDk(vGSk, vDSk) is defined as Eq. (4.1.83). This algorithm can be implemented by replacing the for loop of the above MATLAB function ‘FET_CS_NMOSd()
’ by the following block of statements:
iD_vGS_vDS=@(vGS,vDS,Kp,Vt)Kp/2*(vGS-Vt).^2.*(vGS>=Vt).*(vGS-vDS<Vt)
+ Kp*((vGS-Vt).*vDS-vDS.^2/2).*(vGS>=Vt).*(vGS-vDS>=Vt); % Eq. (4.1.83)
for n=1:length(vi)
vGSn = VGSQ + vi(n)*Ri/(Rs+Ri); % Eq. (4.2.26)
eq=@(v)(iD_vGS_vDS(0,VDD-v,KpL,VtL)-iD_vGS_vDS(vGSn,v,KpD,VtD))*1e6;
if n<2, v0=VDD/2; else v0=vo_(n-1); end
vo_(n)=fsolve(eq,v0); % Solution of Eq. (4.2.26)
iD_(n)=iD_vGS_vDS(vGSn,vo_(n),KpD,VtD);
end
discrepancy_vo = norm(vo-vo_)/norm(vo)
Isn't it interesting that this simple algorithm of solving just one (seemingly nonlinear) equation can replace the above individual quadratic equation approach?
We can run the following MATLAB script “do_FET_CS_NMOSd.m” to plot the output vo(t) to the input vi(t) = 0.5 sin (2000πt) for t = 0 ~ 1 ms like the PSpice simulation result shown in Figure 4.31(c).
%do_FET_CS_NMOSd.m
VDD=18; Rs=100; R1=1e5; R2=1e5; RL=1e6; Vsm=1;
tf=1e-3; t=tf/180*[0:180]; w=2000*pi; vi=Vsm*sin(w*t);
Kp=[2e-5 2e-5]; Vt=[1 -10]; lambda=[1e-2 1e-2]; % Eq. (4.2.22)
[VGQ,VSQ,VDQ,IDQ,vo,iD]= ...
FET_CS_NMOSd(VDD,Rs,R1,R2,RL,Kp,Vt,lambda,vi);
subplot(222), plot(t,vi, t,vo-(VDQ-VSQ),'r'), grid on
Table 4.3 lists the formulas for finding the input/output resistances, voltage gain, and maximum small‐signal input (for linear amplification) of the CS/CD/CG amplifiers. It also shows the conditions to be met by the coupling/bypass capacitors, whose AC impedances have been assumed to be negligibly small (for a frequency range of interest) compared with the equivalent impedance seen from their two terminals for AC analysis (see Section 14.7 of [J-1]).Note that finding the input/output resistance of a CG configuration requires the input/output resistance of the next/previous stage corresponding to its load/source resistance RL/Rs as implied by Eqs. (4.2.15) and (4.2.17). That is why, for a systematic analysis of a multistage amplifier containing one or more CG 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 to the last/first stage, the input/output resistance of the next/previous stage is nothing but the load/source resistance.
Each of the formulas listed in Table 4.3 has been coded in MATLAB as follows so that they can be called individually as symbolic expressions whenever and wherever needed. For instance, the formula for the voltage gain Av can be recalled by typing ‘Av_CS’ at the MATLAB prompt.
function [Av,Avo,Gv,Ri,Ro]=Av_CS(ro_,RS_)
% Put 0 as the 1st input argument ro_ if ro=inf.
% Put 0 as the 2nd input argument RS_ if RS=0.
syms gm ro Rs RG RD RS RL
Ri=RG; % Eq. (4.2.5)
RDL=parallel_comb([RD RL]);
if nargin>0&ro_==0
Ro=RD; % Eq. (4.2.7)
if nargin>1&RS_==0, Av=-gm*RDL; % Eq. (4.2.6)
else Av=-gm*RDL/(1+gm*RS); % Eq. (4.2.6)
end
else % if ro is finite
if nargin>1&RS_==0, gmroRS=ro;
else gmroRS=ro+(1+gm*ro)*RS;
end
Ro=parallel_comb([RD gmroRS]); % Eq. (4.2.7)
Av=-gm*ro*RDL/(RDL+gmroRS); % Eq. (4.2.6)
end
Avi=1/(Rs/Ri+1); AvL=1/(Ro/RL+1); Avo=Av/AvL;
Gv=Avi*Av;
if nargout<1
fprintf(' Av = '); pretty(simplify(Av))
fprintf(' Avo = '); pretty(simplify(Avo))
fprintf(' Gv = '); pretty(simplify(Gv))
end
function Ri=Ri_CS()
syms RG
Ri=RG; % Eq. (4.2.5)
function Ro=Ro_CS(ro_,RS_)
% Put 0 as the 1st input argument ro_ if ro=inf.
% Put 0 as the 2nd input argument RS_ if RS=0.
syms gm ro Rs RG RD RS RL
if nargin>0&ro_==0
Ro=RD; % Eq. (4.2.7)
else % if ro is finite
if nargin>1&RS_==0, gmroRS=ro;
else gmroRS=ro+(1+gm*ro)*RS;
end
Ro=parallel_comb([RD gmroRS]); % Eq. (4.2.7)
end
if nargout<1
fprintf(' Ro = '); pretty(simplify(Ro))
end
function Ri=Ri_CD(ro_)
% Put 0 as the 1st input argument ro_ if ro=inf.
syms RG
Ri=RG; % Eq. (4.2.9)
function Ro=Ro_CD(ro_)
% Put 0 as the 1st input argument ro_ if ro=inf.
syms gm ro Rs RG RD RS RL
if nargin>0&ro_==0, ro=inf; end
Ro=parallel_comb([1/gm RS ro]); % Eq. (4.2.17)
if nargout<1, pretty(simplify(Ro)), end
function [Av,Avo,Gv,Ri,Ro]=Av_CD(ro_)
% Put 0 as the 1st input argument ro_ if ro=inf.
syms gm ro Rs RG RD RS RL
RSL=parallel_comb([RS RL]);
if nargin>0&ro_==0
gm1=gm; ro1=inf; % Against the case where RD is nonzero.
else % if ro is finite
gm1=gm/(1+RD/ro); ro1=ro+RD;
end
Ro1SL=parallel_comb([ro1 RSL]); Ro1S=parallel_comb([ro1 RS]);
Ro=parallel_comb([1/gm1 RS ro1]); Ri=RG; % Eq. (4.2.10)
Av=gm1*Ro1SL/(1+gm1*Ro1SL); % Eq. (4.2.11b)
Avi=1/(Rs/Ri+1); AvL=1/(Ro/RL+1);
Avo=Av/AvL; Avo_=gm1*Ro1S/(1+gm1*Ro1S);
discrepancy = simplify(Avo-Avo_)
Gv=Avi*Av; % Eq. (4.2.16a)
if nargout<1
fprintf(' Av = '); pretty(simplify(Av))
fprintf(' Avo = '); pretty(simplify(Avo))
fprintf(' Gv = '); pretty(simplify(Gv))
end
function [Av,Avo,Gv,Ri,Ro]=Av_CG(ro_)
% Put 0 as the 1st input argument ro_ if ro=inf.
syms gm ro Rs RG RD RS RL
RDL=parallel_comb([RD RL]); RDLo=RD;
if nargin>0&ro_==0
Rsg=1/gm; Ro=RD; % Eq. (4.2.17)
else % if ro is finite
Rsg=(ro+RDL)/(1+gm*ro); Rsgo=(ro+RDLo)/(1+gm*ro);
Ro=parallel_comb([(1+gm*ro)*parallel_comb([Rs RS])+ro
RD]); % Eq. (4.2.17)
end
Ri=parallel_comb([RS Rsg]); % Eq. (4.2.15)
Av=RDL/Rsg; Avo=RDLo/Rsgo; Avi=1/(Rs/Ri+1); % Eq. (4.2.16b)
Gv=Avi*Av; % Eq. (4.2.16a)
if nargout<1
fprintf(' Av = '); pretty(simplify(Av))
fprintf(' Avo = '); pretty(simplify(Avo))
fprintf(' Gv = '); pretty(simplify(Gv))
end
function Ri=Ri_CG(ro_)
% Put 0 as the 1st input argument ro_ if ro=inf.
syms gm ro RG RD RS RL
RDL=parallel_comb([RD RL]);
if nargin>0&ro_==0, Rsg=1/gm;
else Rsg=(ro+RDL)/(1+gm*ro); % if ro is finite
end
Ri=parallel_comb([RS Rsg]); % Eq. (4.2.15)
if nargout<1, pretty(simplify(Ri)), end
function Ro=Ro_CG(ro_)
% Put 0 as the 1st input argument ro_ if ro=inf.
syms gm ro Rs RG RD RS RL
if nargin>0&ro_==0, Ro=RD; % Eq. (4.2.17)
else % if ro is finite
Ro=parallel_comb([(1+gm*ro)*parallel_comb([Rs RS])+ro
RD]); %Eq. (4.2.17)
end
if nargout<1, pretty(simplify(Ro)), end
Let the device parameters of every FET in Figure 4.32 be Kp = 0.5 mA/V2, Vt = 1 V, and λ = 10‐
4 V‐
1 in common.
First, set the values of the circuit and device parameters as given:
>>Kp=0.5e-3; Vt=1; lambda=1e-4; % Device parameters
VDD=12; Rs=1e3; RL=100e3; Vsm=1e-3; % Circuit parameters
R11=2.2e6; R12=1.5e6; RD1=22e3; RS1=12e3; % for Stage 1
R21=25e6; R22=100e6; RD2=0; RS2=8e3; % for Stage 2
Then, we analyze the (last) stage (of CD configuration) with the assumption of Rs2 = 0 (because the output resistance Ro1 of the previous stage has not yet been determined) to just find its input resistance Ri2, which is to be used as the load resistance RL1 of the previous stage:
>>Rs2=0; RL2=RL; % Rs2=Ro1 has not yet been determined.
[VG2Q,VS2Q,VD2Q,ID2Q,Av2,Ri2,Ro2,gm2,ro2,Vo2m,vs2max]= ...
FET_CD_analysis(VDD,Rs2,R21,R22,RD2,RS2,RL2,Kp,Vt,lambda);
Then, we analyze the previous (first) stage (of CS configuration) with RL1 = Ri2 (obtained here):
>>Rs1=Rs; RL1=Ri2;
[VG1Q,VS1Q,VD1Q,ID1Q,Av1,Ri1,Ro1,gm1,ro1,vs1max]= ...
FET_CS_analysis(VDD,Rs1,R11,R12,RD1,RS1,RL1,Kp,Vt,lambda);
This yields
Analysis Results
VDD VGQ VSQ VDQ IDQ
12.00 4.86 2.88 6.71 2.40e-04
Ri= 891.89[kOhm], Ro= 21988[Ohm]
Gv=Ri/(Rs+Ri)xAvoxRL/(Ro+RL)=0.999 x ( -10.78x0.9989= -10.77) = -10.76
Noting that the first stage has been analyzed with the true values of Rs1 = Rs and RL1 = Ri2 to yield the proper values of every amplifier parameter, we reanalyze the (last) stage (of CD configuration) with Rs2 = Ro1 (obtained just above):
>>Rs2=Ro1;
[VG2Q,VS2Q,VD2Q,ID2Q,Av2,Ri2,Ro2,gm2,ro2,vs2max]= ...
FET_CD_analysis(VDD,Rs2,R21,R22,RD2,RS2,RL,Kp,Vt,lambda);
This yields
Analysis Results
VDD VGQ VSQ VDQ IDQ
12.00 9.60 6.76 12.00 8.45e-04
Ri=20000.00[kOhm], Ro= 957[Ohm]
Gv=Ri/(Rs+Ri)xAvoxRL/(Ro+RL)=0.999 x (0.8803x0.9905=0.8719) = 0.8710
Then, we multiply the voltage gains (Avn's) of every stage including that of the voltage divider at stage 0 (of the input source) to find the overall voltage gain as
>>Gv=Ri1/(Rs+Ri1)*Av1*Av2
Gv = -9.3806
This implies that the overall voltage gain of the CS‐CD stage is ‐
9.38 as confirmed by the PSpice simulation result Gv,s = ‐
18.76 mV/2 mV = ‐
9.38 in Figure 4.32(b). This is greater than that (‐
8.66) of the CS stage (in Figure 4.25(a2)) (see Example 4.6) despite the additional CD stage whose voltage gain is less than one by itself. (Q) Why is that?
Since the circuit of (a2) is the same as (a1) except for the nonexistence of CL1, R21, and R22, the values of the circuit and device parameters set for (a1) can be used as they have been set. Noting that due to the direct coupling, the gate voltage of M2 equals the drain voltage of M1, i.e. VG2,Q = VD1,Q, we should first perform the DC analysis of stage 1 by using ‘FET_DC_analysis()
’ to determine VD1,Q :
>>[VG1Q,VS1Q,VD1Q,VGS1Q,VDS1Q,ID1Q,mode]= ...
FET_DC_analysis(VDD,R11,R12,RD1,RS1,Kp,Vt,lambda);
Then, we analyze the (last) stage (of CD configuration) with the assumption of Rs2 = 0 (because the output resistance Ro1 of the previous stage has not yet been determined) to just find its input resistance Ri2, which is to be used as the load resistance RL1 of the previous stage:
>>Rs2=0; vG2=VD1Q; RG2=1e8; RL2=RL; % Rs2=Ro1 is not yet determined.
[VG2Q,VS2Q,VD2Q,ID2Q,Av2,Ri2,Ro2,gm2,ro2,Vo2m,vs2max]= ...
FET_CD_analysis(VDD,Rs2,vG2,RG2,RD2,RS2,RL2,Kp,Vt,lambda);
Here, we have used ‘FET_CD_analysis()
’ with the third/fourth input arguments VD1,Q (obtained above)/108 in place of R1/R2 to analyze stage 2 where 108 (a very large value of resistance corresponding to R1||R2 = ∞) will be assigned as the value of Ri2 inside ‘FET_CD_analysis()
’.
Then, we analyze the previous (first) stage (of CS configuration) with RL1 = Ri2 (obtained just above):
>>Rs1=Rs; RL1=Ri2;
[VG1Q,VS1Q,VD1Q,ID1Q,Av1,Ri1,Ro1,gm1,ro1,vs1max]= ...
FET_CS_analysis(VDD,Rs1,R11,R12,RD1,RS1,RL1,Kp,Vt,lambda);
This yields
Analysis Results
VDD VGQ VSQ VDQ IDQ
12.00 4.86 2.88 6.71 2.40e-04
Ri= 891.89[kOhm], Ro= 21988[Ohm]
Gv=Ri/(Rs+Ri)xAvoxRL/(Ro+RL)=0.999x(-10.78x0.9998= -10.78) = -10.77
Noting that the first stage has been analyzed with the true values of Rs1 = Rs and RL1 = Ri2 to yield the proper values of every amplifier parameter, we reanalyze the (last) stage (of CD configuration) with Rs2 = Ro1 (obtained just above):
>>Rs2=Ro1; %vG2=VD1Q; RG2=1e8;
[VG2Q,VS2Q,VD2Q,ID2Q,Av2,Ri2,Ro2,gm2,ro2,vs2max]= ...
FET_CD_analysis(VDD,Rs2,vG2,RG2,RD2,RS2,RL,Kp,Vt,lambda);
This yields
Analysis Results with vG= 6.71[kOhm], RG=100000.00[kOhm]
VDD VGQ VSQ VDQ IDQ
12.00 6.71 4.25 12.00 5.32e-04
Ri=100000.00[kOhm], Ro= 1170[Ohm]
Gv=Ri/(Rs+Ri)xAvoxRL/(Ro+RL) =0.9998 x (0.8537x0.9884=0.8438) = 0.8436
Then, we multiply the voltage gains (Avn's) of every stage including that of the voltage divider at stage 0 (of the input source) to find the overall voltage gain as
>>Gv=Ri1/(Rs+Ri1)*Av1*Av2
Gv = -9.0860
These MATLAB analysis results conform with the PSpice simulation results shown in Figure 4.32(a2) and (b).
Note that while the direct coupling saves a capacitor and two resistors without impairing the voltage gain, a level shifter (using positive/negative DC voltages) may have to be used to compensate the bias level change that may occur due to the lack of DC isolation between stages that would allow independent design of the biasing circuit of each individual stage.
Consider the three‐stage amplifier of CS‐CE‐CD configuration in Figure 4.33 where the two FETs are both depletion‐type NMOSs with device parameters Kp = 10 mA/V2, Vt = ‐
1 V, and λ = 10‐
4 V‐
1 in common and the device parameters of the NPN‐BJT are βF = 150, βR = 1, βAC = 150, and VA = 104 V. Find the values of the amplifier parameters Ri1, Ro1, Av1, Ri2, Ro2, Av2, Ri3, Ro3, Av3, and Gv = vo/vs.
First, set the values of the circuit and device parameters as given:
>>Kp=10e-3; Vt=-1; lambda=1e-4; beta=[150 1 150]; VA=1e4;
VDD=15; Rs=10e3; RL=10e3; Vsm=1e-5;
R11=1e10; R12=1e5; RD1=620; RS1=[0 200]; % for Stage 1
R21=78e3; R22=22e3; RC2=4.7e3; RE2=[0 1.5e3]; % for Stage 2
R31=4e6; R32=12e6; RD3=0; RS3=10e3; % for Stage 3
Then, we analyze the (last) stage (of CD configuration) with the assumption of Rs3 = 0 (because the output resistance Ro2 of the previous stage has not yet been determined) to just find its input resistance Ri3, which is to be used as the load resistance RL2 of the previous stage:
>>Rs3=0; RL3=RL; % Rs3=Ro2 has not yet been determined.
[VG3Q,VS3Q,VD3Q,ID3Q,Av3,Ri3,Ro3,gm3,ro3,Vo3m,vs3max]=...
FET_CD_analysis(VDD,Rs3,R31,R32,RD3,RS3,RL3,Kp,Vt,lambda);
This yields
Ri= 3000.00 kOhm, Ro= 202 Ohm
Then, we analyze the previous (second) stage (of CE configuration) with RL2 = Ri3 (obtained just above):
>>Rs2=0; RL2=Ri3; rb2=0; % Rs2=Ro1 has not yet been determined.
[VB2Q,VE2Q,VC2Q,IB2Q,IE2Q,IC2Q,Av2,Ai2,Ri2,Ro2,gm2,rbe2,ro2]=...
BJT_CE_analysis(VDD,rb2,Rs2,R21,R22,RC2,RE2,RL2,beta,Vsm,VA);
This yields
Ri= 2.12 kOhm, Ro= 4696 Ohm
Then, we analyze the previous (first) stage (of CS configuration) with Rs1 = Rs and RL1 = Ri2 (obtained just above):
>>Rs1=Rs; RL1=Ri2;
[VG1Q,VS1Q,VD1Q,ID1Q,Av(1),Ri(1),Ro(1),gm1,ro1,vs1max]=...
FET_CS_analysis(VDD,Rs1,R11,R12,RD1,RS1,RL1,Kp,Vt,lambda);
This yields
VDD VGQ VSQ VDQ IDQ
15.00 0.00 0.38 13.81 1.91e-03
in the saturation mode with gm= 6.187[mS], ro=5238.819[kOhm]
Ri= 100.00 kOhm, Ro= 620 Ohm
Gv=Ri/(Rs+Ri)xAv = 0.91 x -2.97 = -2.70
Noting that the first stage has been analyzed with the true values of Rs1 = Rs and RL1 = Ri2 to yield the proper values of every amplifier parameter, we reanalyze the (second) stage (of CE configuration) with Rs2 = Ro1 (the output resistance of the previous stage obtained just above) and RL2 = Ri3 (the input resistance of the next stage obtained above):
>>Rs2=Ro(1); % Now that Rs2=Ro1 has been determined.
[VB2Q,VE2Q,VC2Q,IB2Q,IE2Q,IC2Q,Av(2),Ri(2),Ro(2)]=...
BJT_CE_analysis(VDD,rb2,Rs2,R21,R22,RC2,RE2,RL2,beta,Vsm,VA);
This yields
VCC VEE VBB VBQ VEQ VCQ IBQ IEQ ICQ
15.00 0.00 3.30 3.12 2.42 7.48 1.07e-05 1.61e-03 1.60e-03
in the forward-active mode with VCE,Q= 5.06[V]
where gm= 61.916[mS], rbe= 2423[Ohm], ro=6247.69[kOhm]
Ri= 2.12 kOhm, Ro= 4696 Ohm
Gv=Ri/(Rs+Ri)xAv= 0.774 x -290.33 = -224.71
Then, we analyze the (last) stage (of CD configuration) with Rs3 = Ro2 (the output resistance of the previous stage obtained just above) and RL3 = RL:
>>Rs3=Ro(2); % Now that Rs3=Ro2 has been determined.
[VG3Q,VS3Q,VD3Q,ID3Q,Av(3),Ri(3),Ro(3),gm3,ro3,Vo3m,vs3max]=...
FET_CD_analysis(VDD,Rs3,R31,R32,RD3,RS3,RL3,Kp,Vt,lambda);
This yields
VDD VGQ VSQ VDQ IDQ
15.00 11.25 11.77 15.00 1.18e-03
in the saturation mode with gm= 4.852[mS], ro=8502.536[kOhm]
Ri= 3000.00 kOhm, Ro= 202 Ohm
Gv=Ri/(Rs+Ri)xAv = 1.00 x 0.96 = 0.96
Lastly, we multiply the voltage gains (Avn's) of every stage including that of the voltage divider at stage 0 (of the input source) to find the overall voltage gain as
>>Gv=Ri(1)/(Rs+Ri(1))*prod(Av)
Gv = 752.4930
This implies that the overall voltage gain of the three‐stage amplifier is 752 as confirmed by the PSpice simulation result Gv,s = 15.028 mV/0.02 mV = 751.4 in Figure 4.33(b). We can see that the DC analysis results obtained using the MATLAB functions are also close to those obtained from the PSpice simulation results shown on the schematic in Figure 4.33(a) and (c).
Consider the cascode amplifier of CS‐CG configuration in Figure 4.34 where the two FETs are both enhancement‐type NMOSs with device parameters Kp = 10 mA/V2, Vt = 1 V, and λ = 10‐
4 V‐
1 in common. Find the values of the amplifier parameters Ri, Ro, and Gv = vo/vs.
First, to perform the DC analysis of the circuit, we assume that the two NMOSs operate in the saturation mode and write the KCL equations at nodes 2, 4, and 5:
Noting that V3 = VDD(R2 + R3)/(R1 + R2 + R3) = 12 × (1 + 1)/(2 + 1 + 1) = 6 V and V1 = VDDR3/(R1 + R2 + R3) = 12 × 1/(2 + 1 + 1) = 3 V, we can solve the last equality to get v2 as
Then, we solve the second equality in Eq. (E4.11.1) to get v4 as
Then, we get v5 from the first equality in Eq. (E4.11.1) as
To find v2, v4, and v5 in this way, we run the following MATLAB statements:
>>Kp=10e-3; Vt=1; lambda=1e-4; % Device parameters
VDD=12; Rs=1e3; RL=10e3; R1=2e5; R2=1e5; R3=1e5; RD=3e3; RS=1e3;
V3=VDD*(R2+R3)/(R1+R2+R3); V1=VDD*R3/(R1+R2+R3);
A=Kp/2; B=-(Kp*(V1-Vt)+1/RS); C=Kp/2*(V1-Vt)^2;
V2=(-B-sqrt(B^2-4*A*C))/2/A; V4=V3-V1+V2;
IDQ=Kp/2*(V3-V4-Vt)^2; V5=VDD-RD*IDQ; % Eqs.(E4.11.2,3,4)
>>fprintf('V2=%6.2fV, V4=%6.2fV, V5=%6.2fV,
IDQ=%6.3fmA ', V2,V4,V5,IDQ*1e3)
This yields
V2= 1.46V, V4= 4.46V, V5= 7.62V, ID= 1.460mA
which conforms with the PSpice simulation results shown in the PSpice schematic of Figure 4.34(a). Here, before going into the AC analysis, we should check if the two NMOSs operate in the saturation:
Now, to perform the AC analysis, we use Eqs. (4.1.4b,a) to find the transconductances and output resistances of the two FETs:
>>VGS1Q=V1-V2; VDS1Q=V4-V2;
gm1=Kp*(VGS1Q-Vt)*(1+lambda*VDS1Q); ro1=1/lambda/abs(IDQ);
VGS2Q=V3-V4; VDS2Q=V5-V4;
gm2=Kp*(VGS2Q-Vt)*(1+lambda*VDS2Q); ro2=1/lambda/abs(IDQ);
fprintf('gm1=%7.4fmS, ro1=%8.2fkOhm, gm2=%7.4fmS,
ro2=%8.2fkOhm ', gm1*1e3,ro1/1e3,gm2*1e3,ro2/1e3)
This yields
gm1= 5.4047mS, ro1= 6850.78kOhm, gm2= 5.4048mS, ro2= 6850.78kOhm
Then, we use Eq. (4.2.15) to find the input resistance of the last stage (stage 2) of CG configuration as
Then, we use Eq. (4.2.5) to find the input resistance of stage 1 of CS configuration as
We also use Eqs. (4.2.7) and (4.2.6b) with RD1 = ∞, RS1 = 0, and RL1 = Ri2 to find the output resistance and voltage gain of stage 1 (CS) as
Then, we use Eqs. (4.2.16b) and (4.2.17) with Rs = Ro1 to find the voltage gain and output resistance of stage 2 (CG) as
Thus, the overall voltage gain can be found as
Note that if λ = 0 so that ro1 = ∞ and ro2 = ∞, the overall voltage gain will be
This does not differ from the voltage gain (Eq. (4.2.6) with RS1 = 0) of a single CS amplifier. Then, what is the CG stage for? It is expected to increase the frequency bandwidth.
This process of analyzing an FET cascode circuit as shown in Figure 4.34(a) has been cast into the following MATLAB function ‘FET_cascode()
’.
function [VG1Q,VS1Q,VD1Q,VG2Q,VD2Q,IDQ,Av,Ri,Ro,gm,ro,vo,iD]= ...
FET_cascode(VDD,Rs,R1,R2,R3,RS,RD,RL,Kp,Vt,lambda,vi)
% analyzes an FET cascode circuit of CS-CG like Fig. 4.34(a).
% Copyleft: Won Y. Yang, [email protected], CAU for academic use only
if length(VDD)==2, VSS=VDD(2); VDD=VDD(1); else VSS=0; end
if length(RS)==2, RS1=RS(1); RS2=RS(2); else RS1=0; RS2=RS; end
% DC analysis to find the Q-point
VG2Q=VDD*(R2+R3)/(R1+R2+R3); VG1Q=VDD*R3/(R1+R2+R3); RS=sum(RS);
A=Kp/2; B=-(Kp*(VG1Q-Vt)+1/RS); C=Kp/2*(VG1Q-Vt)^2+VSS/RS;
VS1Q=(-B-sqrt(B^2-4*A*C))/2/A; VD1Q=VG2Q-VG1Q+VS1Q;
IDQ=Kp/2*(VG1Q-VS1Q-Vt)^2; VD2Q=VDD-RD*IDQ; % Eqs.(E4.11.2,3,4)
VGS1Q=VG1Q-VS1Q; VGS2Q=VG2Q-VD1Q; VGD1Q=VG1Q-VD1Q; VGD2Q=VG2Q-VD2Q;
% If both FETs are not in saturation, AC analysis is not meaningful.
if VGD1Q>Vt|VGD2Q>Vt
if VGD1Q>Vt, fprintf('M1 is ohmic: VGD1Q(%5.2f)>Vt ',VGD1Q); end
if VGD2Q>Vt, fprintf('M2 is ohmic: VGD2Q(%5.2f)>Vt ',VGD2Q); end
fprintf('The linear AC analysis is not meaningful ');
end
% AC analysis
[gm(1),ro(1)]=gmro_FET(IDQ,VGS1Q,Kp,Vt,lambda);
[gm(2),ro(2)]=gmro_FET(IDQ,VGS2Q,Kp,Vt,lambda);
Ri2=1/gm(2); % Input resistance of stage 2 Eq. (4.2.15)
Ri=parallel_comb([R2 R3]); % Input resistance of stage 1 Eq. (4.2.5)
gmro1RS1=(gm(1)*ro(1)+1)*RS1; RD1=inf; RDRL1=parallel_comb([RD1 Ri2]);
Ro1=parallel_comb([RD ro(1)+gmro1RS1]); % Eq. (4.2.7)
Av(1)=-gm(1)*ro(1)*RDRL1/(RDRL1+ro(1)+gmro1RS1); % Eq. (4.2.6b)
RDRL2=parallel_comb([RD RL]);
Rs2=Ro1; RS2=inf; RsRS2=parallel_comb([Rs2 RS2]);
Av(2)=(1+gm(2)*ro(2))*RDRL2/(RDRL2+ro(2)); % Eq. (4.2.16b)
Ro=parallel_comb([RD (1+gm(2)*ro(2))*RsRS2+ro(2)]); % Eq. (4.2.17)
Av0=1/(Rs/Ri+1); Gv=Av0*prod(Av); % Overall voltage gain
for n=1:length(vi)
vGS1n=VGS1Q + vi(n)*Av0;
iD(n)=Kp/2*(vGS1n-Vt)^2*(1+lambda*(VD1Q-VS1Q)); vo(n)=VD1Q-RD*iD(n);
end
function [gm,ro]=gmro_FET(ID,VGS,Kp,Vt,lambda)
if abs(Vt)>0.01
if lambda>=100, lambda=1/lambda; end % lambda must be VA
gm=2*ID/(VGS-Vt); % Transconductance by Eq. (4.1.4b)
ro=1/lambda/abs(ID); % Output resistance by Eq. (4.1.4a)
else % gmro_FET(VGS,Kp,Vt,lambda)
lambda=Vt; Vt=Kp; Kp=VGS; VGS=ID; % If ID is not given,
if length(VGS)>1, VDS=VGS(2); VGS=VGS(1); else VDS=0; end
gm=Kp*(VGS-Vt)*(1+lambda*VDS); % Transconductance by Eq. (4.1.4b)
ro=2/lambda/Kp/(VGS-Vt)^2; % Output resistance by Eq. (4.1.4a)
end
For the amplifier whose AC equivalent is shown in Figure 4.35(a), find the input/output resistances (Ri/Ro) and the voltage gain Av = vo/vs in terms of gm1, gm2, ro1, ro2, and RL.
It is obvious that Ri = ∞ since no current flows into/from terminal g1 however large vs may be. To find the voltage gain, we draw the equivalent (with the FETs replaced by the model in Figure 4.3(b)) as depicted in Figure 4.35(b1) and write a set of two node equations (in two unknowns vd1 and vo) as
We can solve this set of equations to find vd1, vo, and then the voltage gain:
On the other hand, to find the output resistance, we draw the equivalent as depicted in Figure 4.35(b2) and write a node equation (in unknown vd1) as
We can solve this equation to find vd1 and Ro = vT/iT:
%elec04e12.m
syms gm gm1 gm2 ro ro1 ro2 ro1 Rs RD RS RL
% To find the voltage gain
vT=1; % Test input voltage
Y=[1/ro1+1/ro2+gm2 -1/ro2; -1/ro2-gm2 1/ro2+1/RL];
v=Y[-gm1*vT; 0]; % solve Eq. (E4.12.1)
vd1=v(1); vo=v(2); Av=vo/vT; % Eq. (E4.12.2)
fprintf(' Av= '); pretty(simplify(Av))
% Output resistance
vd1=vT/ro2/(1/ro1+1/ro2+gm2);
iT=-gm2*vd1+(vT-vd1)/ro2; % Eq. (E4.12.3)
Ro=vT/iT; % Eq. (E4.12.4)
fprintf(' Ro= '); pretty(simplify(Ro))
% Using MATLAB functions
Ri2=subs(Ri_CG,{gm,ro,RD,RS},{gm2,ro2,inf,inf}) % Ri of stage 2
% Output resistance
Ro1=subs(Ro_CS,{gm,ro,Rs,RD,RS},{gm1,ro1,inf,inf,0})
Roa=subs(Ro_CG,{gm,ro,Rs,RD,RS},{gm2,ro2,Ro1,inf,inf})
discrepancy_Ro=simplify(Ro-Roa)
% Voltage gain
Av1=subs(Av_CS,{gm,ro,Rs,RD,RS,RL},{gm1,ro1,0,inf,0,Ri2});
Av2=subs(Av_CG,{gm,ro,Rs,RD,RS},{gm2,ro2,Ro1,inf,inf});
Ava=Av1*Av2
discrepancy_Av=simplify(Av-Ava)
Alternatively, we can use the MATLAB functions like ‘Ri_CG()
’, ‘Av_CS()
’, etc. to obtain the same results by running the above MATLAB script “elec04e12.m”.
Note that in determining whether a resistance in a CS/CD/CG amplifier circuit should be set to zero or infinity for removal, it may be helpful to compare the circuit with the corresponding model in Figures 4.24, 4.26, and 4.28, respectively.
For the amplifier whose AC equivalent is shown in Figure 4.36, find the input/output resistances (Ri/Ro) and the voltage gain Av = vo/vs in terms of gmk's and rok's, and RL on the assumption that gmkrok ≫ 1.
It is obvious that Ri = ∞. We can use Eq. (E4.12.6) to get the output resistance:
We can use Eq. (E4.12.3) with Ro = RoN and RL = RoP to get the voltage gain:
This section will show how a CS amplifier (illustrated in Figure 4.37) can be designed to achieve a desired voltage gain Av,d and a desired input resistance Ri,d, i.e. how the values of resistors constituting the circuit can be determined to make the voltage gain and input resistance as desired.
As with the CE amplifier discussed in Section 3.4.1, to maximize the AC swing of output voltage vo along the AC load line, it may be good to set the drain current ID,Q and drain‐to‐source voltage VDS,Q of FET at the operating point Q as half the maximum drain current and about one‐third of VDD, respectively:
The gate‐to‐source voltage VGS,Q at the operating point can be found from Eq. (4.1.2) or (4.1.13b) with λ = 0 as
Then, RD and RS are determined in different ways depending on whether the biasing circuit consists of one resistor (R2 or R1 as shown in Figure 4.37(a) or (b)) or two resistors R1‐R2 (constituting a voltage divider as shown in Figure 4.37(c)):
Noting that iG = 0 and vG = 0/VDD for (a)/(b), we apply KVL to the G‐S loop to determine RS as
Then, RD is determined so that RD and RS share the rest of VDD, i.e. VDD −VDS,Q = (1 − KC)VDD:
The value of resistor R1 or R2 is determined as the desired input resistance.
It will also be good for maximizing the AC swing of output voltage vo along the AC load line to determine such a value of RD that the iD intercept of the AC load line can be about 2ID,Q:
Here, RS1, which is a part of the AC resistance RAC = RS1 + (RD||RL), has been neglected because it is presumably much less than (RD||RL) and has not yet been determined.
Then, RS is determined so that RS and RD can share the rest of VDD, i.e. VDD − VDS,Q = (1 − KC)VDD:
On the condition that the gate voltage does not exceed VDD, i.e.
we determine the values of resistances R1 and R2 so that their parallel combination equals the desired input resistance Ri,d:
However, if the inequality (4.3.7) is not satisfied, we should let VG =VDD together with
and adjust ID,Q to the value satisfying Eqs. (4.3.2) and (4.3.7) with VG = VDD, i.e. the (smaller) root of the following quadratic equation:
Also, RS and RD should be recomputed using Eqs. (4.3.5) and (4.3.6) with the new value of ID,Q obtained as the root of Eq. (4.3.10).
Now, with the output (drain‐source) resistance ro and transconductance gm:
Eq. (4.2.6b) is used to determine the dual source resistance [RS1, RS2] so that the desired voltage gain can be achieved:
function [R1,R2,RD,RS1,RS2,PRs]= ...
FET_CS_design(VDDSS,Kp,Vt,lambda,Avd,Rid,IDQ,RL,KC)
% Design a CS amp with given Avd & Rid (possibly as [Rid VG] with VG)
% at Q=(VDSQ=KC*VDD,IDQ)
% Set Rid=[Rid VG] to fix VG.
% Copyleft: Won Y. Yang, [email protected], CAU for academic use only
if nargin<9, KC=1/3; end % design parameter s.t. VDSQ=KC*VDD;
if length(VDDSS)>1, VSS=VDDSS(2); else VSS=0; end; VDD=VDDSS(1);
VDS=VDD-VSS; VDSQ=KC*VDS; Rid0=Rid;
VGSQ=Vt+sign(IDQ)*sqrt(2*abs(IDQ/Kp)); % Eq. (4.3.2)
if length(Rid)>1
VG=Rid(2); Rid=Rid(1); RS=(VG-VGSQ)/IDQ; % Eq. (4.3.3)
RD=max((1-KC)*VDS/IDQ-RS,10); % Eq. (4.3.4)
K1=(VDD-VG)/VDD; K2=VG/VDD; R1=min(Rid/K2,1e10); R2=min(Rid/K1,1e10);
else
RD=max(1/(IDQ/VDSQ-1/RL),10); % Eq. (4.3.5)
RS=max((1-KC)*VDS/IDQ-RD,10); % Eq. (4.3.6)
VG=RS*IDQ+VGSQ; % Eq. (4.3.7)
if abs(vG)<abs(VDD)
R1=Rid*VDD/VG; R2=Rid*VDD/(VDD-VG); % Eq. (4.3.8)
else
vG=VDD; R1=Rid; R2=1e10; % Eq. (4.3.9)
A=RS^2; B=-2*(RS*(VDS-Vt)+1/Kp); C=(VDS-Vt)^2;
IDQ=(-B-sqrt(B^2-4*A*C))/2/A; % Eq. (4.3.10)
RD=max(1/(IDQ/VDSQ-1/RL),10); % Eq. (4.3.5)
RS=max((1-KC)*VDS/IDQ-RD,10); % Eq. (4.3.6)
end
end
gm=Kp*(VGSQ-Vt)*(1+lambda*VDSQ); ro=1/lambda/abs(IDQ); % Eq. (4.1.4)
mug=gm*ro; RDL=parallel_comb([RD RL]);
RS1=max((mug*RDL/(abs(Avd))-RDL-ro)/(mug+1),0); % Eq. (4.3.12a)
RS2=RS-RS1; % Eq. (4.3.12b)
PR1=(VDD-VG)^2/R1; PR2=VG^2/R2; PRD=RD*IDQ^2;
PRS1=RS1*IDQ^2; PRS2=RS2*IDQ^2; PRs=[PR1 PR2 PRD PRS1 PRS2] % Eq. (4.3.13)
if RS<=10|RD<=10
if abs(Avd)<mug*RDL/(RDL+ro)
disp('Try again with smaller/larger values of IDQ/VDD')
[R1,R2,RD,RS1,RS2,PRs]= ...
FET_CS_design(VDDSS,Kp,Vt,lambda,Avd,VG,Rid0,0.9*IDQ,RL,KC);
else
error('Avd is too large to achieve; try with higher VDD or another TR
having bigger gm.')
end
else
disp('Design Results')
disp(' R1 R2 RD RS1 RS2 Avd')
fprintf('%8.0f %8.0f %8.0f %8.0f %8.0f %8.2f ', R1,R2,RD,RS1,RS2,Avd)
end
Note that the minimum power ratings of R1, R2, RC, RS1, and RS2 should be
This process of designing a CS amplifier with a specified voltage gain Av,d and a desired input resistance Ri,d has been cast into the above MATLAB function ‘FET_CS_design()
’ where the default value of design constant KC is 1/3.
Let us use the MATLAB function ‘FET_CS_design()
’ to design the four‐resistor biasing network for a CS amplifier using an NMOS IRF150 so that it can operate with a desired voltage gain Av,d = −20 (for a load resistance of RL = 50 kΩ) and an input resistance Ri,d=100 kΩ at an operating point Q=(VDS,Q, ID,Q)= (VDD/3,0.3 mA) where the device parameters of the FET are Kp = 3.08 A/V2 and Vt = 2.831 V and a VDD = 18 V‐source is available for biasing the FET. To this end, we run the following script “design_CS_IRF150.m”:
%design_CS_IRF150.m
clear
VDD=18; RL=5e4; % DC voltage source and load resistance
Avd=20; Rid=1e5; % Design specifications
KC=1/3; IDQ=3e-4; % Design parameters
Kp=3.08; Vt=2.831; lambda=0.0075; % lambda=1/rds/IDQ=1/444.4e3/3e-4
[R1,R2,RD,RS1,RS2]= ...
FET_CS_design(VDD,Kp,Vt,lambda,Avd,Rid,IDQ,RL,KC);
Rs=50; Vsm=0.01; % Resistance/Amplitude of the AC input voltage source
[VGQ,VSQ,VDQ,IDQ,Av,Ri,Ro]= ...
FET_CS_analysis (VDD,Rs,R1,R2,RD,[RS1 RS2],RL,Kp,Vt,lambda,Vsm);
This yields
>>design_CS_IRF150
Design Results
R1 R2 RD RS1 RS2 Avd
371520 136830 33333 977 5690 20.00
Analysis Results
VDD VGQ VSQ VDQ IDQ
18.00 4.84 2.00 8.00 3.00e-004
in the saturation mode with VGD,Q= -3.15[V] (Vt=2.83)
gm= 43.948[mS], ro= 464.368[kOhm]
Ri= 100.00 kOhm, Ro= 33279 Ohm
Gv=Ri/(Rs+Ri)xAvoxRL/(Ro+RL) = 0.9995x(-33.30x0.6004=-19.99) = -19.98
Here, from the PSpice model opened by selecting the part IRF150 and clicking Edit > PSpice:Model from the top menu bar of the PSpice Schematic window or from the PSpice simulation output file (Figure 4.38(b)), we see KP = 20.53E−06, L = 2E−06, W = 0.3, Vto = 2.831, and RDS = 444.4E+03, which can be interpreted as meaning
The above results mean the following values of the resistances of designed CS amplifier:
The script uses ‘FET_CS_analysis()
’ (Section 4.2.1) for analyzing the designed circuit to get the DC analysis result:
and the AC analysis result: Gv = −19.98, Ri = 100 kΩ, and Ro = 33.3 kΩ.
Figure 4.38(a) and (b) shows the PSpice schematic of the designed CS amplifier and its simulation results where the overall voltage gain has turned out to be Gv,PSpice = −1.9887/99.725 m ≈ −19.94 as required by the design specification. It is implied that the MATLAB design and analysis functions have worked well.
Design a four‐resistor biasing network for a CS amplifier using an NMOS whose device parameters are Kp = 60 mA/V2, Vt = 1.73 V, and λ = 4.17 × 10−5 V−1 so that it can operate with a desired voltage gain Av,d = −20 (for a load resistance of RL = 50 kΩ) and an input resistance Ri,d = 100 kΩ at an operating point Q = (VDS,Q, ID,Q) = (VDD/3, 0.5 mA) where a VDD = 18 V‐source is available for biasing the FET.
To this end, we run the following script “elec04e14.m,” which yields
>>elec04e14
Design Results
R1 R2 RD RS1 RS2 Avd
301793 149556 15789 471 7740 20.00
Analysis Results
VDD VGQ VSQ VDQ IDQ
18.00 5.96 4.11 10.11 5.00e-004
in the saturation mode with gm= 7.747[mS], ro=47973.445[kOhm]
Ri= 100.00kOhm, Ro= 15788Ohm
Gv=Ri/(Rs+Ri)xAvoxRL/(Ro+RL) =0.9995x(-26.31x0.7600=-20.00)= -19.99
%elec04e14.m
VDD=18; RL=5e4; % DC voltage source and load resistance
Rs=50; Vsm=0.01; % Resistance/Amplitude of the AC input voltage source
Avd=20; Rid=1e5; % Design specifications
KC=1/3; IDQ=5e-4; % Design parameters
Kp=0.06; Vt=1.73; lambda=4.17e-5;
[R1,R2,RD,RS1,RS2]= ... FET_CS_design(VDD,Kp,Vt,lambda,Avd,Rid,IDQ,RL,KC);
Rs=50; Vsm=0.1; % Resistance and Amplitude of the AC input voltage source
[VGQ,VSQ,VDQ,IDQ,Av,Ri,Ro]= ...
FET_CS_analysis(VDD,Rs,R1,R2,RD,[RS1 RS2], RL,Kp,Vt,lambda,Vsm);
The above analysis results mean the following values of the resistances of designed CS amplifier:
The script uses ‘FET_CS_analysis()
’ for analyzing the designed circuit to get the DC analysis result:
and the AC analysis result: Gv = −20.16, Ri = 100 kΩ, and Ro = 15.8 kΩ.
Figure 4.39(a) and (b) shows the PSpice schematic of the designed CS amplifier and its simulation results where the overall voltage gain turns out to be Gv,PSpice = −2.0003/0.1 ≈ −20 as required by the design specification. It is implied that the MATLAB design and analysis functions have worked well.
This section will show how a CD amplifier with RD = 0 (as shown in Figure 4.40) can be designed to achieve a desired input resistance Ri,d, i.e. how the values of resistors constituting the circuit can be determined to yield a desired input resistance.
As with the CS amplifier discussed in Section 4.3.1, to maximize the AC swing of output voltage vo along the AC load line, it may be good to set the draincurrent ID,Q and drain‐to‐source voltage VDS,Q of FET at the operating point Q as half the maximum drain current and about one‐third of VDD, respectively:
The source resistance RS can be determined as
Also, the gate‐to‐source voltage VGS,Q at the operating point can be determined from Eq. (4.1.1b) or (4.1.13b) as
Then, the node voltage VG,Q at the gate terminal can be obtained as
If VG,Q ≤ VDD, the values of resistors R1 and R2 can be determined so that their parallel combination equals the desired input resistance Ri,d:
Otherwise, i.e. if VG,Q > VDD (which is impossible), we set VG,Q = VDD and
If you want to find the new operating point, the KCL equation at node S,
should be solved for vS, yielding VS,Q and consequently,
Now, suppose the resulting voltage gain Av turns out to be intolerably smaller than 1 and/or the resulting output resistance Ro is quite larger than you expected. Should we increase or decrease the drain current ID,Q to improve the values of Av and Ro? To find the answer to this question, let us recollect the formulas for determining Av and Ro of a CD amplifier:
Noting from Eqs. (4.3.19)?> and (4.3.28) that as ID,Q increases, RS decreases, and gm increases, we can tell that a larger value of ID,Q will help to increase Av (Eq. (4.3.26)) and decrease Ro (Eq. (4.3.27)).
The above process of designing a CD amplifier with a desired input resistance Ri,d has been cast into the following MATLAB function ‘FET_CD_design()
’.
function [R1,R2,RS,PRs,IDQ]=...
FET_CD_design(VDDSS,Kp,Vt,lambda,Rid,IDQ,RL,KC)
% Design a CD amplifier with RD=0 which has a given value of Rid
% at Q=(VDSQ=KC*(VDD-VSS),IDQ) where Ri=R1||R2 and Ro=(1/gm)||RS.
% Copyleft: Won Y. Yang, [email protected], CAU for academic use only
if nargin<8, KC=1/3; end % Design parameter s.t. VDSQ=KC*(VDD-VSS);
if nargin<7, RL=1e10; end % No load
if length(VDDSS)>1, VSS=VDDSS(2); else VSS=0; end
VDD=VDDSS(1);
VDSQ=KC*(VDD-VSS); % Eq. (4.3.18b)
RS=(VDD-VSS-VDSQ)/IDQ; % Eq. (4.3.19)
VGSQ=Vt+sign(IDQ)*sqrt(2*abs(IDQ/Kp)); % Eq. (4.3.20)
VG=VSS+RS*IDQ+VGSQ; % Eq. (4.3.21)
if VG<VDD
R1=Rid*VDD/VG; R2=Rid*VDD/(VDD-VG); % Eq. (4.3.22)
else
VG=VDD; R1=Rid; R2=1e10; % Eq. (4.3.23)
iD=@(vGS,vDS)Kp*(1+lambda*vDS).*((vGS-Vt).^2/2.*(vGS>=Vt).*(vGS-vDS<Vt)
+((vGS-Vt).*vDS-vDS.^2/2).*(vGS>=Vt).*(vGS-vDS>=Vt)); % Eq. (4.1.13)
options=optimset('Display','off','Diagnostics','off');
eq=@(v)v-RS*iD(VG-v,VDD-v)-VSS; % Eq. (4.3.24)
v0=(VG+VSS)/2;
VS=fsolve(eq,v0,options);
IDQ1=iD(VG-VS,VDD-VS); % Eq. (4.3.25)
VDSQ1=VDD-VS;
fprintf(' Q=(IDQ,VDSQ)=(%6.3fmA,%6.3fV) has been adjusted to
(%6.3fmA,%6.3fV) ', IDQ,VDSQ,IDQ1,VDSQ1);
end
PRs=[(VDD-VG)^2/R1 VG^2/R2 RS*IDQ^2]; % Power ratings of R1,R2,and RS
fprintf('Design results at Q=(IDQ,VDSQ)=(%6.3fmA,%6.3fV)',
IDQ*1e3,VDSQ);
disp(' R1 R2 RS')
fprintf('%8.0fOhm %8.0fOhm %6.0fOhm ', R1,R2,RS)
Design a biasing network for a CD amplifier with RD = 0 (as shown in Figure 4.40) using an NMOS whose device parameters are Kp = 60 mA/V2, Vt = 1.73 V, and λ = 4.17 × 10−5 V−1 so that it can have a desired input impedance Ri,d = 100 kΩ at an operating point Q = (VDS,Q, ID,Q) = (VDD/3, 0.05 mA) where a VDD = 18 V‐source is available for biasing the FET.
We first run the following MATLAB statements:
>>VDD=18; RL=5e3; % DC voltage source and load resistance
Rid=1e5; KC=1/3; IDQ=5e-5; % Design spec and Design parameters
Kp=0.06; Vt=1.73; lambda=4.17e-5; % Device parameters
[R1,R2,RS]=FET_CD_design(VDD,Kp,Vt,lambda,Rid,IDQ,RL,KC);
This yields
Design results at Q=(IDQ,VDSQ)=( 0.050mA, 6.000V)
R1 R2 RS
130711Ohm 425615Ohm 240000Ohm
Based on this design result, we let R1 = 131 kΩ, R2 = 426 kΩ, and RS = 240 kΩ and use ‘FET_CD_analysys()
’ to perform the DC + AC analysis of the designed CD amplifier:
>>Rs=50; R1=131e3; R2=426e3; RD=0;
[VGQ,VSQ,VDQ,IDQ,Av,Ri,Ro]= ...
FET_CD_analysis(VDD,Rs,R1,R2,RD,RS,RL,Kp,Vt,lambda);
This yields
Analysis Results with R1= 131kOhm, R2= 426kOhm, RD= 0Ohm, RS=240000Ohm
VDD VGQ VSQ VDQ IDQ
18.00 13.77 12.00 18.00 5.00e-05
in the saturation mode with VGD,Q= -4.23[V] (Vt=1.73)
gm= 2.449[mS], ro=479904.587[kOhm]
Ri= 100.19[kOhm], Ro= 408[Ohm]
Gv=Ri/(Rs+Ri)xAvoxRL/(Ro+RL) =0.9995 x (0.9983x0.9246=0.9231) = 0.9226
This analysis result conforms with the PSpice simulation result shown in Figure 4.41. You can try with a larger value of ID,Q, say, 0.5 mA, to increase the voltage gain Av.
In this section, we will find the transfer function G(s) = Vo(s)/Vi(s) and frequency response G(jω) for a CS amplifier, a CD amplifier, and a CG amplifier with the FET replaced by the high‐frequency small‐signal model shown in Figure 4.3(a).
Figure 4.42(a) and (b) shows a CS 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 4.42(b), a set of three node equations in V1 = Vg, V2 = Vd, and V3 = Vs 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 g to 0. This equation can be rearranged into a solvable form with all the unknown/known terms on the LHS/RHS as
and solved for V1, V2, and V3. Then, the transfer function and frequency response can be found:
This process to find the transfer function and frequency response has been cast into the following MATLAB function ‘FET_CS_xfer_ftn()
’.
Note the following about the internal capacitances of an FET, i.e. the gate‐to‐source capacitance Cgs, the gate‐to‐drain capacitance (sometimes called the overlap capacitance) Cgd, and the drain‐to‐source capacitance Cds ([S-1]):
where Cgs0/Cgd0[F]: zero‐bias gate‐source/gate‐drain junction capacitances, respectively, VGS,Q/VGD,Q[V]: quiescent gate‐source/gate‐drain voltages, respectively, m(Mj): gate p‐n grading coefficient (SPICE default = 0.5), and Vb(Pb): gate junction (barrier) potential, typically 0.6 V (SPICE default = 1 V).
Referring to Figure 4.43, four break (pole or corner) frequencies determining roughly the frequency response magnitude can be determined as [R-2]
function [Gs,Av,Ri,Ro,Cgs,Cgd,gm,ro,Gw]=...
FET_CS_xfer_ftn(VDD,Rs,Cs,R1,R2,RD,RS,CS,CL,RLCLL,
Kp,Vt,lambda,CVbm,w)
%To find the transfer function/frequency response of a CS amplifier
% CVbm=[Cgs0,Cgd0,Cds,Vb,m]% with Cgs0|Cgd0: Zero-bias GSJ|GDJ capacitances
% Vb: Gate junction (barrier) potential
% m : Gate p-n grading coefficient
% Copyleft: Won Y. Yang, [email protected], CAU for academic use only
Cgs0=CVbm(1); Cgd0=CVbm(2); Cds=CVbm(3); Vb=CVbm(4); m=CVbm(5);
RG=parallel_comb([R1 R2]); RL=RLCLL(1);
if numel(RLCLL)<2, CLL=0; else CLL=RLCLL(2); end
syms s; ZL=parallel_comb([RL 1/s/CLL]); % Eq. (4.4.2f)
if length(RS)==1, RS1=0; RS2=RS; else RS1=RS(1); RS2=RS(2); end
[VGQ,VSQ,VDQ,IDQ,Av,Ri,Ro,gm,ro]= ...
FET_CS_analysis(VDD,Rs,R1,R2,RD,RS,RL,Kp,Vt,lambda);
Cgs=Cgs0/(1+abs(VGQ-VSQ)/Vb)^m; Cgd=Cgd0/(1+abs(VGQ-VDQ)/Vb)^m; % Eq. (4.4.5)
sCs=s*Cs; sCS=s*CS; sCL=s*CL; sCgs=s*Cgs; sCgd=s*Cgd; sCds=s*Cds;
YD=1/parallel_comb([RD 1/sCL+ZL]); Ys=1/(Rs+1/sCs); % Eq. (4.4.2d,e)
if sum(RS)>0
YS=1/(RS1+1/(1/RS2+sCS)); % Admittance at terminal S
Y=[Ys+1/RG+sCgs+sCgd -sCgd -sCgs;
-sCgd+gm sCgd+1/ro+sCds+YD -1/ro-sCds-gm;
-sCgs-gm -1/ro-sCds sCgs+1/ro+sCds+YS+gm]; % Eq. (4.4.3)
V=Y[Ys; 0; 0];
else
Y=[Ys+1/Ri+sCgs+sCgd -sCgd;
-sCgd+gm sCgd+1/ro+sCds+YD];
V=Y[Ys; 0];
end
Gs=V(2)*ZL/(ZL+1/sCL); % Transfer function Vo(s)/Vs(s)
if nargin>14, Gw=subs(Gs,'s',j*w); % Frequency responseelse Gw=0; end
Note the following about these four break frequencies:
Note also that Ri/Ro are the input/output resistances of the CS amplifier, respectively, and Cm/Cn are the Miller equivalent capacitances for capacitor Cgd seen from the input/output side, respectively (Eq. (1.4.2):
The following MATLAB function ‘break_freqs_of_CS()
’ uses Eqs. (4.4.6a,b,c,d) to find the four break frequencies.
function fc=break_freqs_of_CS ... (Rs,Cs,CL,RL,CLL,Cgd,Cgs,Cds,Av,Ri,Ro,ro)
% To find the 4 break frequencies of a CS amplifier
RsRi=parallel_comb([Rs Ri]);
RoRL=parallel_comb([Ro RL]);
Cm=Cgd*(1-Av); Cn=Cgd*(1-1/Av); % Eq. (4.4.7a,b)
fc(1)=1/2/pi/Cs/(Rs+Ri); % Eq. (4.4.6a)
fc(2)=1/2/pi/CL/(Ro+RL); % Eq. (4.4.6b)
fc(3)=1/2/pi/(Cgs+Cm)/RsRi; % Eq. (4.4.6c)
fc(4)=1/2/pi/(CLL+Cn)/RoRL; % Eq. (4.4.6d)
Consider the CS circuit in Figure 4.44(a) where VDD = 12 V, Rs = 1 kΩ, Cs = 1 μF, R1 = 2.2 MΩ, R2 = 1.5 MΩ, RD = 22 kΩ, RS1 = 6 kΩ, RS2 = 6 kΩ, CS = 10 μF, CL = 1 μF, RL = 100 kΩ, and CLL = 0.1 nF, and the FET parameters are Kp = 0.5 mA/V2, Vt = 1 V, λ = 0.01 V−1, Cgs0 = 10 pF, Cgd0 = 1 pF, Cds = 0 F, Vb = 1 V, and m = 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 upper 3 dB frequency.
We can use the MATLAB function ‘FET_CS_xfer_ftn()
’ to find the frequency response and plot its magnitude curve (as shown in Figure 4.44(c)) by running the following MATLAB statements:
>>VDD=12; Rs=1e3; R1=22e5; R2=15e5; RD=22e3; RS=[6e3 6e3];
RL=1e5; Cs=1e-6; CS=1e-5; CL=1e-6; CLL=1e-10; RLCLL=[RL CLL];
Kp=5e-4; Vt=1; lambda=0.01; % Device parameters
Cgs0=1e-11; Cgd0=1e-12; Cds=0; Vb=1; m=0.5; CVbm=[Cgs0 Cgd0 Cds Vb m];
f=logspace(0,8,801); w=2*pi*f; % Frequency range
[Gs,Av,Ri,Ro,Cgs,Cgd,gm,ro]=... FET_CS_xfer_ftn(VDD,
Rs,Cs,R1,R2,RD,RS,CS,CL,RLCLL,Kp,Vt,lambda,CVbm);
syms s; Gw=subs(Gs,s,j*w); % Frequency response
GmagdB=20*log10(abs(Gw)+1e-10); Gmax=max(GmagdB);
semilogx(f,GmagdB, f([1 end]),[0 0],'k'), hold on
fc=break_freqs_of_CS(Rs,Cs,CL,RL,CLL,Cgd,Cgs,Cds,Av,Ri,Ro,ro)
fprintf(' fc1=%12.3e, fc2=%12.3e, fc3=%12.3e, fc4=%12.3e,
and fc5=%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 4.44(c) and the values of the four break frequencies as follows:
fc1= 1.782e-01, fc2= 1.308e+00, fc3= 2.062e+07, fc4= 8.842e+04
from which we can take the third highest frequency fc4 = 88.4 kHz as a rough estimate of the upper 3 dB frequency.
Figure 4.45(a) and (b) shows a CD 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 4.45(b), a set of three node equations in V1 = Vg, V2 = Vs, and V3 = Vd can be set up as
function [Gs,Av,Ri,Ro,Cgs,Cgd,gm,ro,Gw]= FET_CD_xfer_ftn ...
(VDD,Rs,Cs,R1,R2,RD,RS,CS,CL,RLCLL,Kp,Vt,lambda,CVbm,w)
%To find the transfer function/frequency response of a CD amplifier
% CVbm=[Cgs0,Cgd0,Cds,Vb,m] % with Cgs0|Cgd0: Zero-bias GSJ|GDJ capacitances
% Vb: Gate junction (barrier) potential
% m : Gate p-n grading coefficient
% Copyleft: Won Y. Yang, [email protected], CAU for academic use only
Cgs0=CVbm(1); Cgd0=CVbm(2); Cds=CVbm(3);
if numel(CVbm)<4, Vb=1; m=0.5; else Vb=CVbm(4); m=CVbm(5); end
RG=parallel_comb([R1 R2]); RL=RLCLL(1);
if numel(RLCLL)<2, CLL=0; else CLL=RLCLL(2); end
syms s; ZL=parallel_comb([RL 1/s/CLL]); % Eq. (4.4.9e)
if length(RS)==1, RS1=0; RS2=RS; else RS1=RS(1); RS2=RS(2); end
[VGQ,VSQ,VDQ,IDQ,Av,Ri,Ro,gm,ro]= ...
FET_CD_analysis(VDD,Rs,R1,R2,RD,RS,RL,Kp,Vt,lambda);
Cgs=Cgs0/(1+abs(VGQ-VSQ)/Vb)^m; % Eq. (4.4.5a)
Cgd=Cgd0/(1+abs(VGQ-VDQ)/Vb)^m; % Eq. (4.4.5b)
sCs=s*Cs; sCS=s*CS; sCL=s*CL; sCgs=s*Cgs; sCgd=s*Cgd; sCds=s*Cds;
Ys=1/(Rs+1/sCs); YS=1/parallel_comb([RS ZL]);
if RD>0
Y=[Ys+1/Ri+sCgs+sCgd -sCgs -sCgd;
-sCgs-gm sCgs+1/ro+sCds+YS+gm -1/ro-sCds;
-sCgd-gm -1/ro-sCds-gm sCgd+1/RD+1/ro+sCds]; % Eq. (4.4.8)
V=Y[Ys; 0; 0];
else
Y=[Ys+1/Ri+sCgs+sCgd -sCgs;
-sCgs-gm sCgs+1/ro+sCds+YS+gm];
V=Y[Ys; 0];
end
Gs=V(2)*ZL/(ZL+1/sCL); % Transfer function Vo(s)/Vs(s)
if nargin>14, Gw=subs(Gs,'s',j*w); % Frequency response
else Gw=0; end
where
Solving this set of equations, we can find the transfer function and frequency response:
This process to find the transfer function and frequency response has been cast into the above MATLAB function ‘FET_CD_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 CD amplifier, respectively, and Cm/Cn are the Miller equivalent capacitances for capacitor Cbe seen from the input/output side, respectively (Eq. (1.4.2)):
Note that Eq. (4.4.11) is just like Eq. (4.4.6) with Cgd and Cgs switched.
The following MATLAB function ‘break_freqs_of_CD()
’ uses Eqs. (4.4.11a,b,c,d) to find the four break frequencies:
function fc=break_freqs_of_CD(Rs,Cs,CL,RL,CLL,Cgd, Cgs,Cds,Av,Ri,Ro)
% To find the 4 break frequencies of a CD amplifier
RsRi=parallel_comb([Rs Ri]); RoRL=parallel_comb([Ro RL]);
Cm=Cgs*(1-Av); % Eq. (4.4.12a)
Cn=Cgs*(1-1/Av); % Eq. (4.4.12b)
fc(1)=1/2/pi/Cs/(Rs+Ri); % Eq. (4.4.11a)
fc(2)=1/2/pi/CL/(Ro+RL); % Eq. (4.4.11b)
fc(3)=1/2/pi/(Cgd+Cm)/RsRi; % Eq. (4.4.11c)
fc(4)=1/2/pi/(CLL+Cn)/RoRL; % Eq. (4.4.11d)
Consider the CD circuit in Figure 4.46(a) where VDD = 12 V, Rs = 1 kΩ, Cs = 1 μF, R1 = 2.2 MΩ, R2 = 1.5 MΩ, RD = 22 kΩ, RS = 12 kΩ, CL = 0.1 μF, RL = 100 kΩ, and CLL = 0.1 nF, and the FET parameters are Kp = 0.5 mA/V2, Vt = 1 V, λ = 0.01 V‐
1, Cgs0 = 1 F, Cgd0 = 1 pF, Cds = 0 F, Vb = 1 V, and m = 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 upper 3 dB frequency.
We can use the MATLAB function ‘FET_CD_xfer_ftn()
’ to find the frequency response and plot its magnitude curve (as shown in Figure 4.46(c)) by running the following MATLAB statements:
>>Kp=5e-4; Vt=1; lambda=0.01;
Cgd0=1e-12; Cgs0=1e-11; Cds=0; Vb=1; m=0.5; CVbm=[Cgs0 Cgd0 Cds Vb m];
VDD=12; Rs=1e3; Cs=1e-6; R1=22e5; R2=15e5; RD=0; RS=12e3; CS=0;
CL=1e-7; RL=1e5; CLL=1e-9; RLCLL=[RL CLL];
f=logspace(0,8,801); w=2*pi*f;
[Gs,Av,Ri,Ro,Cgs,Cgd,gm,ro]= FET_CD_xfer_ftn ... (VDD,Rs,Cs,R1,R2,RD,RS,CS,CL,RLCLL,Kp,Vt,lambda,CVbm);
syms s; Gw=subs(Gs,'s',j*w); % Frequency response
GmagdB=20*log10(abs(Gw)+1e-5); Gmax=max(GmagdB);
semilogx(f,GmagdB, f([1 end]),[0 0],'k'), hold on
fc=break_freqs_of_CD(Rs,Cs,CL,RL,CLL,Cgd,Cgs,Cds,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 4.46(c) and the values of the four break frequencies as follows:
fc1= 1.782e-01, fc2= 1.565e+01, fc3= 1.262e+08, fc4= 9.731e+04
from which we can take the third highest frequency fc4 = 97.3 kHz as a rough estimate of the upper 3 dB frequency.
Figure 4.47(a) and (b) shows a CG 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 G(ate) is not AC grounded via a capacitor CG, we should let CG = 0 as shown in Figure 4.47(b). For the equivalent circuit shown in Figure 4.47(b), a set of three node equations in V1 = Vs, V2 = Vd, and V3 = Vg can be set up as
function [Gs,Av,Ri,Ro,Cgs,Cgd,gm,ro,Gw]= FET_CG_xfer_ftn ...
(VDD,Rs,Cs,R1,R2,CG,RD,RS,CL,RLCLL,Kp,Vt,lambda,CVbm,w)
%To find the transfer function/frequency response of a CG amplifier
% RLCLL=[RL CLL] with RL and CLL in parallel
% CVbm=[Cgs0,Cgd0,Cds,Vb,m] with Cgs0|Cgd0: Zero-bias GSJ|GDJ capacitances
% Vb: Gate junction (barrier) potential
% m : Gate p-n grading coefficient
% Copyleft: Won Y. Yang, [email protected], CAU for academic use only
Cgs0=CVbm(1); Cgd0=CVbm(2); Cds=CVbm(3);
if numel(CVbm)<4, Vb=1; m=0.5; else Vb=CVbm(4); m=CVbm(5); end
RL=RLCLL(1); if numel(RLCLL)<2, CLL=0; else CLL=RLCLL(2); end
syms s; ZL=parallel_comb([RL 1/s/CLL]);
[VGQ,VSQ,VDQ,IDQ,Av,Ri,Ro,gm,ro]= ...
FET_CG_analysis(VDD,Rs,R1,R2,RD,RS,RL,Kp,Vt,lambda);
Cgs=Cgs0/(1+abs(VGQ-VSQ)/Vb)^m; Cgd=Cgd0/(1+abs(VGQ-VDQ)/Vb)^m;%Eq. (4.4.5)
sCs=s*Cs; sCG=s*CG; sCL=s*CL; sCgs=s*Cgs; sCgd=s*Cgd; sCds=s*Cds;
RG=parallel_comb([R1 R2]); Ys=1/(Rs+1/sCs); YS=Ys+1/RS; % Eq. (4.4.14b,c)
YG=1/RG+sCG; YD=1/parallel_comb([RD ZL+1/sCL]); % Eq. (4.4.14d,e)
if RG>0&CG<0.1
Y=[YS+sCgs+1/ro+sCds+gm -1/ro-sCds -sCgs-gm;
-1/ro-sCds-gm 1/ro+sCds+sCgd+YD -sCgd+gm;
-sCgs -sCgd sCgs+YG+sCgd]; % Eq. (4.4.13)
V=Y[Ys; 0; 0];
else % If RG=0 or CG is so large that RG can be AC-shorted
Y=[YS+sCgs+1/ro+sCds+gm -1/ro-sCds;
-1/ro-sCds-gm 1/ro+sCds+sCgd+YD]; % Eq. (4.4.13)
V=Y[Ys; 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
where
Solving this set of equations, we can find the transfer function and frequency response:
This process to find the transfer function and frequency response has been cast into the above MATLAB function ‘FET_CG_xfer_ftn()
’.
There are five break (pole or corner) frequencies determining roughly the frequency response magnitude:
where Ri/Ro are the input/output resistances of the CG amplifier, respectively.
The following MATLAB function ‘break_freqs_of_CG()
’ uses Eqs. (4.4.16a,b,c,d,e) to find the five break frequencies:
function fc=break_freqs_of_CG(Rs,Cs,R1,R2,RD,RS,CL,RL,CLL,Cgd, Cgs,Ri,Ro)
% To find the 4 break frequencies of a CG amplifier
RG=parallel_comb([R1 R2]);
RsRi=parallel_comb([Rs Ri]); RoRL=parallel_comb([Ro RL]);
fc(1)=1/2/pi/Cs/(Rs+Ri); % Eq. (4.4.16a)
fc(2)=1/2/pi/CL/(Ro+RL); % Eq. (4.4.16b) fc(3)=1/2/pi/Cgs/(parallel_comb([Rs RS])+RG); % Eq. (4.4.16c) fc(4)=1/2/pi/Cgd/(parallel_comb([RD RL])+RG); % Eq. (4.4.16d)
fc(5)=1/2/pi/CLL/RoRL; % Eq. (4.4.16e)
Consider the CG circuit in Figure 4.48(a) where VDD=12 V, Rs=1 kΩ, Cs=1 μF, R1 = 2.2 MΩ, R2 = 1.5 MΩ, RD = 22 kΩ, RS = 12 kΩ, CL = 0.1 μF, RL = 100 kΩ, CLL = 0.1 nF, and the FET parameters are Kp = 0.5 mA/V2, Vt = 1 V, λ = 0.01 V−1, Cgs0 = 10 pF, Cgd0 = 1 pF, Cds = 0 F, Vb = 1 V, and m = 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 ‘FET_CG_xfer_ftn()
’ to find the frequency response and plot its magnitude curve (as Figure 4.48(c)) by running the following MATLAB statements:
>>Kp=5e-4; Vt=1; lambda=0.01;
Cgd0=1e-12; Cgs0=1e-11; Cds=0; Vb=1; m=0.5; CCC=[Cgs0 Cgd0 Cds Vb m];
VDD=12; Rs=2e3; Cs=1e-5; R1=22e5; R2=15e5; RD=22e3; RS=12e3; RL=1e5;
CG=0; CL=1e-6; RL=1e5; CLL=1e-10; RLCLL=[RL CLL];
f=logspace(0,8,801); w=2*pi*f;
[Gs,Av,Ri,Ro,Cgs,Cgd,gm,ro]=...
FET_CG_xfer_ftn(VDD,Rs,Cs,R1,R2,CG,RD,RS,CL,RLCLL,Kp,Vt,lambda,CCC);
syms s; Gw=subs(Gs,'s',j*w); % Frequency response
GmagdB=20*log10(abs(Gw)+1e-5); Gmax=max(GmagdB);
semilogx(f,GmagdB, f([1 end]),[0 0],'k'), hold on
fc=break_freqs_of_CG(Rs,Cs,R1,R2,RD,RS,CL,RL,CLL,Cgd,Cgs,Ri,Ro);
fprintf(' fc1=%12.3e, fc2=%12.3e, fc3=%12.3e, fc4=%12.3e,
fc4=%12.3e ', fc);
This yields Figure 4.48(c) and the values of the five break frequencies as follows:
fc1= 4.226e+00, fc2= 1.311e+00, fc3= 3.067e+04, fc4= 2.937e+05,
fc5= 9.025e+04
from which we can take the second/third highest frequencies fc1 = 4.23 Hz and fc3 = 30.7 kHz as rough estimates of the lower/upper 3 dB frequencies, respectively.
In this section, let us see the time response of a basic FET inverter (as shown in Figure 4.16(a) or 4.49(b)) to logic low‐to‐high and high‐to‐low input transitions where low‐to‐high and high‐to‐low propagation delays due to the internal parasitic capacitances between the terminals of the FET can be observed. Note that the effect of the internal parasitic capacitances becomes conspicuous as the frequency or slope of the input increases, while negligible for a DC or low‐frequency input.
Figure 4.49(a) shows a simple DC or large‐signal Spice model of an FET where iD(vGS,vDS) is defined as Eq. (4.1.83) and
Figure 4.49(c) shows a DC equivalent of the inverter (Figure 4.49(b)) with the FET replaced by its large‐signal model (Figure 4.49(a)). Like the MATLAB function ‘BJT_inverter_dynamic()
’ for the BJT inverter (Figure 3.67(b)), a process of solving the FET inverter to find the output vo(t) to an input vi(t) has been cast into the following MATLAB function ‘FET_inverter_dynamic()
’. Note that the drain resistor RD and the (internal) capacitance (Cgd + Cbd) affect how long it takes for Cgd and Cbd to be charged up to VDD, via the time constant during the rising period of vo(t).
function [vo,vCgd,vCbd,iD]=FET_inverter_dynamic(Kp,Vt,lambda, CVbm,RD,VDD,vi,dt)
% Analyze an FET inverter to find the output vo to an input vi
% which consists of an FET and a resistor RD between VDD and D.
% CVbm=[Cgd0,Cbd0,Vb,m] with Cgd0|Cbd0: Zero-bias GDJ|BDJ capacitances
% Vb: Gate junction (barrier) potential
% m : Gate p-n grading coefficient
% vo: Output voltage(s) for input voltage(s) vi
% Copyleft: Won Y. Yang, [email protected], CAU for academic use only
Cgd0=CVbm(1); Cbd0=CVbm(2);
if numel(CVbm)<3, Vb=0.8; m=0.5; else Vb=CVbm(3); m=CVbm(4); end
iDv=@(vGS,vDS)max(Kp*(vGS>=Vt).*(1+lambda*vDS).*((vGS-Vt).^2/2 ...
.*(vGS-vDS<Vt) +((vGS-Vt).*vDS-vDS.^2/2).*(vGS-vDS>=Vt)), ...
0); % Eq. (4.1.83)
vCgd(1)=VDD; vCbd(1)=VDD;
for n=1:length(vi)
vo(n)=vCbd(n); v1(n)=vi(n)+vCgd(n);
Cgd=Cgd0/(1+abs(vi(n)-vo(n))/Vb)^m; % Eq. (4.4.5)
Cbd=Cbd0/(1+abs(vo(n))/Vb)^m;
iD(n)=iDv(vi(n),vo(n));
iCn=(VDD-vo(n))/RD-iD(n);
iCgd(n)=iCn*Cgd/(Cgd+Cbd); iCbd(n)=iCn*Cbd/(Cgd+Cbd);
vCbd(n+1)=vCbd(n)+iCbd(n)*dt/Cbd;
vCgd(n+1)=vCgd(n)+iCgd(n)*dt/Cgd;
end
vCgd=vCgd(1:n); vCbd=vCbd(1:n); vo=vo(1:n);
Consider the FET inverter in Figure 4.50(a) where VDD = 5 V, RD = 10 kΩ, and the FET parameters are Kp = 5 mA/V2, Vt = 1 V, λ = 10‐
4 V‐
1, Cgd0 = 10−15 F, Cbd0 = 10−14 F, Vb(Pb) = 0.8 V, and m(Mj) = 0.5. Use the above MATLAB function ‘FET_inverter_dynamic()
’ to find the output vo(t) to an input vi(t) plotted as the dotted line in Figure 4.50(b) or (c) and plot it for t = 0∼1 ns.
To this end, we can run the following MATLAB script “elec04e17.m” to see the plot of vi(t) and vo(t) as shown in Figure 4.50(c). The time constant during the rising period of vo(t) is roughly estimated as
%elec04e19.m
% To find the dynamic response of an FET amplifier
VDD=5; RD=10000; % Circuit parameters
Kp=5e-3; Vt=1; lambda=1e-4; Cgd0=1e-15; Cds0=1e-14; % Device parameters
Vb=0.8; m=0.5; % Barrier potential and Gate p-n grading coefficient
CVbm=[Cgd0 Cds0 Vb m];
dt=1e-14; t=[0:100000]*dt; % Time range
ts= [0 2 3 5 6 12 13 15 16 20]/2*1e4*dt;
vis=[0 0 VDD VDD 0 0 VDD VDD 0 0];
vi=interp1(ts,vis,t); % PWL input
[vo,iD]=FET_inverter_dynamic(Kp,Vt,lambda,CVbm,RD,VDD,vi,dt);
plot(t,vi,'r', t,vo)
Figure 4.51(a) shows three NMOS inverters, one with no load, one with a purely capacitive load, and one with an RC load. About Figure 4.51(b) showing their input and outputs, note the following:
Figure 4.52(a) shows two CMOS (Complementary MOSFET) inverters, one with no load and one with an RC load. About Figure 4.52(b1)/(b2) showing their input and outputs and Figure 4.52(c1)/(c2) showing the currents through Mn and Mp, note the following:
How nice it is of a CMOS inverter to have the (‘rail‐to‐rail’) output swing equal to its input swing with almost no propagation delay and very little static power! That is a primary reason why CMOS has become the most used technology to be implemented in Very Large‐Scale Integration (VLSI) chips.
(Hint)
>>VDD=12; VG=0; RG=680e3; RD=2e3; RS=1e3;
Vt=-5; IDSS=5e-3; Kp=2*IDSS/Vt^2;
BETA=Kp/2 % SPICE parameter FET_DC_analysis(VDD,VG,RD,RS,Kp,Vt);
(Hint)
>>VDD=15; R1=1e6; R2=5e5; RD=3e3; RS=1500;
Vt=-4; IDSS=8e-3; Kp=2*IDSS/Vt^2; BETA=Kp/2
FET_DC_analysis(VDD,R1,R2,RD,RS,Kp,Vt);
Noting that it depends on
whether the JFET operates in the saturation or triode region, answer the following questions:
perform the PSpice simulation (with Bias Point analysis type) for the two JFET circuits to check the validity of the circuit analyses done in (a) and (b).
Consider the JFET circuit in Figure P4.2 where the device parameters of the NJF J are IDSS = 12.3 mA/V2, Vt = −3.5 V, and λ = 0. Determine the values of RD and RS so that ID = 1 mA and VDS = 3 V. Check the validity of your design result by using the MATLAB function ‘FET_DC_analysis()
’ and/or PSpice.
(Hint)
>>VDD=5; VSS=-5; R1=330e3; R2=180e3; RD=2e4; RS=3900;
Kp=32e-5; Vt=1.2; lambda=0;
[VGQ,VSQ,VDQ,VGSQ,VDSQ,IDQ,mode]= ...
FET_DC_analysis(VDD-VSS,R1,R2,RD,RS,Kp,Vt,lambda);
fprintf('VG=%6.2fV, VD=%6.2fV, VS=%6.2fV, ID=%8.3fmA ',...
VGQ+VSS,VDQ+VSS,VSQ+VSS,IDQ*1e3);
%elec04p03c.m
clear,clf
VDD=5; VSS=-5; VG=?; RG=50e3; RD=7500; RS=4700; % Circuit parameters
Kp=0.5e-3; Vt=1.2; lambda=0; % Device parameters
[VGQ,VSQ,VDQ,VGSQ,VDSQ,IDQ,mode]= ...
FET_DC_analysis([VDD V??],VG,RD,RS,Kp,Vt,lambda);
vGSs=VGSQ+[-2:0.01:2]; vDSs=[0:0.01:VDD-VSS];
% To plot the load line on the iD-vGS characteristic curve
iDs_vGS=Kp/2*(vGSs-Vt).^2.*(vGSs>Vt);
subplot(221), plot(vGSs,iDs_vGS, vGSs,(VGQ-VSS-V???)/R?,'r')
hold on, plot(VGSQ,IDQ,'ro'), axis([vGSs([1 end]) 0 1.2e-3])
% To plot the load line on the iD-vDS characteristic curve
iDs_vDS=iD_NMOS_at_vDS_vGS(vDSs,VGS?,Kp,Vt,lambda);
subplot(222) plot(vDSs,iDs_vDS, vDSs,(VDD-VSS-v???)/(R?+R?),'r')
hold on, plot(VDSQ,IDQ,'ro')
(Hint)
>>VDD=5; R1=160e3; R2=200e3; RS=8.2e3; RD=12e3;
Kp=2e-4; Vt=-0.4; lambda=0; % Device parameters
FET_PMOS_DC_analysis(VDD,R1,R2,RS,RD,Kp,Vt,lambda);
Consider the MOSFET circuit in Figure P4.5 where the device parameters of the NMOS M1 are Kp = 1 mA/V2, Vt = 1.2 V, and λ = 0. Determine the values of RD, RS, R1, and R2 so that ID = 0.4 mA, VD = 6 V, VDS = 3.1 V, and Ri = 100 kΩ. Check the validity of your design result by using the MATLAB function ‘FET_DC_analysis()
’ and/or PSpice.
Consider the two NMOS circuits in Figure P4.6 where the device parameters of the enhancement NMOS (e‐NMOS) M1 and the depletion NMOS (d‐NMOS) M2 are Kp1 = 0.02 mA/V2, Vt1 = 1 V, λ1 = 0 and Kp2 = 0.02 mA/V2, Vt2 = −3 V, λ2 = 0, respectively.
%elec04p06.m
vDSs=[0:0.001:8]; % Range of vDS to plot the graphs on
Kp1=0.02e-3; Vt1=1; lam1=0; Kp2=0.02e-3; Vt2=-3; lam2=0;
iDs1=iD_NMOS_at_vDS_vGS(vDSs,v??s,Kp1,Vt1,lam1); % for M1 with vGS=vDS
iDs2=iD_NMOS_at_vDS_vGS(vDSs,?,Kp2,Vt2,lam2); % for M1 with vGS=0
plot(vDSs,iDs1,'g', vDSs,iDs2,'r'), grid on, legend('iD1','iD2')
R1=40e3; R2=40e3;
VDD=8; iDLs=(VDD-vDSs)/R1; % Load line common to M1 and M2
% Load line approach to find the Q-points from the intersections
% between the two characteristic curves and the identical load line
[fmin1,imin1]=min(abs(iDs1-iDLs)); IDQ1=iDLs(imin1); VDSQ1=vDSs(imin1);
[fmin2,imin2]=min(abs(iDs2-iDLs)); IDQ2=iDLs(imin2); VDSQ2=vDSs(imin2);
hold on, plot(vDSs,iDLs, VDSQ1,IDQ1,'go', VDSQ2,IDQ2,'ro')
xlabel('v_{DS}[V]'), ylabel('i_D'), title('i_D vs. v_{DS}')
text(VDSQ1-0.3,IDQ1+7e-6,['Q1=(' num2str(VDSQ1,'%4.2fV') ','
num2str(IDQ1*1e3,'%6.3fmA') ')'])
text(VDSQ2-0.3,IDQ2-5e-6,['Q2=(' num2str(VDSQ2,'%4.2fV') ','
num2str(IDQ2*1e3,'%6.3fmA') ')'])
axis([vDSs([1 end]) 0 max(iDLs)])
% Nonlinear equation approach using 'fsolve()'
eq1=@(vDS)VDD-???-R*iD_NMOS_at_vDS_vGS(vDS,???,Kp1,Vt1,lam1);
VDSQ1_=fsolve(eq1,VDD/2); IDQ1_=iD_NMOS_at_vDS_vGS(VDSQ1,?????,Kp1,Vt1,lam1);
[VDSQ1 VDSQ1_], [IDQ1 IDQ1_]
eq2=@(vDS)VDD-vDS-?*iD_NMOS_at_vDS_vGS(vDS,?,Kp2,Vt2,lam2);
VDSQ2_=fsolve(eq2,VDD/2); IDQ2_=iD_NMOS_at_vDS_vGS(VDSQ2,?,Kp2,Vt2,lam2);
[VDSQ2 VDSQ2_], [IDQ2 IDQ2_]
fsolve()
’ to solve the following KCL equations:
where iDk(vGSk,vDSk) is defined as Eq. (4.1.83) and implemented by the MATLAB function ‘iD_NMOS_at_vDS_vGS()
’ (see the end of Section 4.1.1), which is stored in a separate m‐file named “iD_NMOS_at_vDS_vGS.m.” If helpful, complete and run the corresponding part of the above MATLAB script “elec04p06.m” to find the operating points for M1/M2.
Consider the cascode current mirror circuit in Figure P4.7 where the four NMOSs have the device parameters Kp = 1 mA/V2, Vt = 1 V, and λ = 2 mV−1 in common.
where iDk(vGSk,vDSk) is defined as Eq. (4.1.83) and implemented by the MATLAB function ‘iD_NMOS_at_vDS_vGS()
’ (see the end of Section 4.1.1). If a current source I is connected into node 3, how will Eq. (P4.7.1c) be changed?
function [io,ID1,v,Ro,Vomin]= ...
FET4_current_mirror_cascode(Kps,Vt,lambda,R,V12)
% To analyze a cascade 4-FET current mirror like Fig. P4.7(a)
% with R (resistor) or I (current source)
% If 0<R<1, it will be regarded as a current source I=R with R=inf.
% Copyleft: Won Y. Yang, [email protected], CAU for academic use only
V1=V12(1); if length(V12)>1, V2s=V12(2:end); else V2s=V12; end
if length(Kps)<4, Kps=repmat(Kps(1),1,4); end
iDvGS_GDs=@(vGS,Kp,Vt)Kp/2*(vGS-Vt).^2.*(1+lambda*vGS).*(vGS>Vt);
% This is the iD-(vGS=vDS) characteristic of an FET with G-D shorted.
options=optimset('Display','off','Diagnostics','off');
n0=1; % To determine the index of V2s closest to V1
for n=1:length(V2s)
V2=V2s(n);
if n>1&(V2-V1)*(V2s(n-1)-V1)<=0, n0=n; end %Index of V2s closest to V1
if R>=1|R==0, RL=R;
eq=@(v)[iDvGS_GDs(v(?)-v(?),Kps(3),Vt)-iDvGS_GDs(v(?),Kps(1),Vt);
(iD_NMOS_at_vDS_vGS(V2-v(2),v(?)-v(2),Kps(4),Vt,lambda)...
-iD_NMOS_at_vDS_vGS(v(?),v(1),Kps(2),Vt,lambda));
V1-R*iDvGS_GDs(v(?)-v(1),Kps(3),Vt)-v(3)]; % Eq. (P4.7.1)
else I=R; RL=inf;
eq=@(v)[iDvGS_GDs(v(3)-v(1),Kps(3),Vt)-iDvGS_GDs(v(1),Kps(1),Vt);
(iD_NMOS_at_vDS_vGS(V2-v(?),v(3)-v(?),Kps(4),Vt,lambda)-...
iD_NMOS_at_vDS_vGS(v(2),v(?),Kps(2),Vt,lambda));
I-iDvGS_GDs(v(3)-v(?),Kps(3),Vt)]*1e4; % Eq. (P4.7.2)
end
v0=[V1/4 V1/3 2/3*V1]; % Initial guess for v=[v1 v2 v3]
v=fsolve(eq,v0,options); vs(n,:)=v;
ID1=iDvGS_GDs(v(?),Kps(1),Vt);
io(n)=iD_NMOS_at_vDS_vGS(v(2),v(?),Kps(2),Vt,lambda);
end
Io=io(n0); V2=V2s(n0); v=vs(n0,:); % Values of io, V2, vs when V2=V1.
gm2=2*Io/(v(1)-Vt); ro2=1/lambda/Io; % Eqs.(4.1.4b,a) for M2
gm4=2*Io/(v(3)-v(?)-Vt); ro4=1/lambda/Io; % Eqs.(4.1.4b,a) for M4
Ro=ro2+ro4+gm4*ro2*ro4; % Eq. (P4.7.4)
Vomin=v(3)-Vt;
fprintf('Io=%8.4f[mA], ID1=%8.4f[mA],v1=%5.2f[V],v2=%5.2f[V],
v3=%5.2f[V], Ro=%9.1f[kOhm] ',Io*1e3,ID1*1e3,v(1),v(2),v(3),
Ro/1e3);
We can solve this equation and find the output resistance:
where no current flows in the left part with no source so that v3 = vd3 = vg3 = vg4 = 0 and v1 = vs3 = vd1 = vg1 = vg2 = 0.
(Q) In the small‐signal equivalent shown in Figure P4.7(c), why have M1 and M3 been modeled by just a resistor of 1/gm (with no current source) unlike M2 and M4?
FET4_current_mirror_cascode()
’, which implements Eqs. (P4.7.1/2) and (P4.7.4) for analyzing a cascode current mirror (excited by a voltage source V1 or a reference current source I) and finding its output resistance. Use the MATLAB function to find the output current io versus V2 = 0:0.01:40 and plot it. Also, find the output resistance Ro (when V2 = 9 V) of the current mirror (shown in Figure P4.7(a)) two times, once when it is excited by a voltage source V1 of 9 V (with a resistance R of 1 kΩ) and once when it is excited by a current source of I = 2.5 mA.Is it close to that obtained in (c)?
Consider the CMOS inverter in Figure 4.19(a) where VDD = 10 V and the NMOS/PMOS have the device parameters KpN = 200 μA/V2, VtN = 2 V, KpP = 80 μA/V2, VtP = −2 V, and λ = 0.
Differentiating both sides w.r.t. vi and substituting dvo/dvi = −1 yields
Use the MATLAB function ‘fsolve()
’ to solve this set of two equations and find (VIL,VOH) by running the following statements:
>>VDD=10; KN=2e-4; KP=8e-5; VtN=2; VtP=-2; Kr2=KN/KP; Kr=sqrt(Kr2)
Vm=(VDD+VtP+Kr*VtN)/(1+Kr); % Eq. (4.1.65)
eq_VIL=...
@(v)[(VDD-v(1)+VtP)*(VDD-v(2))-(VDD-v(2))^2/2-Kr2*(v(1)-VtN)^2/2;
v(2)-(VDD+v(1)-VtP+Kr2*(v(1)-VtN))/2]; % Eq. (P4.8.1a,b)
v=fsolve(eq_VIL,[Vm Vm]); VIL=v(1), VOH=v(2)
Check if these values conform with those obtained by using Eq. (16.61) or (16.63) of [N-1] depending on KpN/KpP = 1 or not:
and substituting vi = VIL into Eq. (P4.8.1b):
>>VIL_Neamen=(VtN+(VDD+VtP-VtN)/(Kr2-1)*(2*sqrt(Kr2/(Kr2+3))-1))...
*(Kr~=1) + (Kr==1)*(VtN+3/8*(VDD+VtP-VtN)); %Eq. (P4.8.2)
VOH_Neamen=((1+Kr2)*VIL_Neamen+VDD-Kr2*VtN-VtP)/2; % Eq. (P4.8.1b)
[VIL VIL_Neamen VOH VOH_Neamen] % Do they conform each other?
Differentiating both sides w.r.t. vi and substituting dvo/dvi = −1 yields
We can use the MATLAB function ‘fsolve()
’ to solve this set of two equations and find (VIH,VOL) by running the following statements:
>>eq_VIH=@(v)[Kr2*((v(1)-VtN)*v(2)-v(2)^2/2)-(VDD-v(1)+VtP)^2/2;
v(2)+((VDD-v(1)+VtP)/Kr2-v(1)+VtN)/2]; % Eq. (P4.8.3a,b)
v=fsolve(eq_VIH,[Vm Vm]); VIH=v(1), VOL=v(2)
Check if these values conform with those obtained by using Eq. (16.66) or (16.69) of [N-1] depending on KpN/KpP = 1 or not:
and substituting vi = VIH into Eq. (P4.8.3b):
>>VIH_Neamen=(VtN+(VDD+VtP-VtN)/(Kr2-1)*(2*Kr2/sqrt(3*Kr2+1)-1))...
*(Kr~=1) + (Kr==1)*(VtN+5/8*(VDD+VtP-VtN)); %Eq. (P4.8.4)
VOL_Neamen=(VIH_Neamen*(1+1/Kr2)-VtN-(VDD+VtP)/Kr2)/2; %(P4.8.3b)
[VIH VIH_Neamen VOL VOL_Neamen] % Do they conform each other?
%elec04p08.m
% Analyzes a CMOS inverter (Neamen, pp1173-1175)
clear, clf
VDD=10; KN=20e-5; VtN=2; KP=8e-5; VtP=-2;
KNP=[KN K?]; VtNP=[Vt? VtP];
subplot(221)
Kg=2; % To plot the graphs
[VIL,VIH,VOL,VOH,VM,VIT1,VOT1,VIT2,VOT2,VLH,NML,NMH,PDavg]=...
CMOS_inverter(KNP,????,VDD,Kg);
% Plot the iD-vDS characteristic curve and load line
vis=[VIL VIT2 VM VIT1 VIH VOH]; iDmax=2.5e-3;
vOVNs=vis-VtNP(1); vSGPs=VDD-vis;
vDSs1=[VOH VOT2 VM VOT1 VOL VLH(1)];
iDs1 = iD_NMOS_at_vDS_vGS(VDD-vDSs1,vSGPs,KP,abs(VtP));
subplot(222)
CMOS_inverter_iD_vDS(KNP,VtNP,VDD,vOVNs,iDmax,[vDSs1; iDs1]);
function CMOS_inverter_iD_vDS(KNP,VtNP,VDD,vOVs,iDmax,vDSiDs)
% To plot the iD-vDS characteristics of CMOS inverter
if nargin<5, iDmax=0.5e-3; end
if numel(KNP)>1, KN=KNP(1); KP=KNP(2); else KN=KNP; KP=KNP; end
if numel(VtNP)>1, VtN=VtNP(1); VtP=VtNP(2); else VtN=VtNP; VtP=VtNP; end
if nargin<4|isempty(vOVs), vOVs = [0:VDD-VtN]; end
dvDS=VDD/1000; vDSs=[0:dvDS:VDD]; di=iDmax/30;
% Boundaries between triode/saturation regions for Mn and Mp
plot(vDSs,KN/2*vDSs.^2,'b:', vDSs,KP/2*(VDD-vDSs).^2,'r:');
legend('Boundary of Mn between triode/saturation regions', ...
'Boundary of Mp between triode/saturation regions')
hold on
for i=1:length(vOVs)
vGS = VtN + vOVs(i);
iDNs = iD_NMOS_at_vDS_vGS(vDSs,vGS,KN,VtN);
iDPs = iD_NMOS_at_vDS_vGS(VDD-vDSs,VDD-vGS,KP,abs(VtP));
plot(vDSs,iDNs, vDSs,iDPs,'r');
text(VDD/2+1.2,max(iDNs)+di,['v_{GSn}=' num2str(vGS,'%5.2f') 'V'])
text(VDD/2-2.4,max(iDPs)+di, ...
['v_{SGp}=' num2str(VDD-vGS,'%5.2f') 'V'])
end
xlabel('v_{DS}'), ylabel('i_D'); axis([0 VDD 0 iDmax])
if nargin>5&~isempty(vDSiDs) % Operating point, etc
plot(vDSiDs(1,:),vDSiDs(2,:),'ro','Markersize',5);
end
Consider the CMOS differential pair loaded by a current mirror in Figure P4.9.1(a) where VDD = 6 V, VGG = 4 V, VSS = 2 V, and the NMOS/PMOS have the device parameters KpN = 2 mA/V2, VtN = 1 V, KpP = 2 mA/V2, VtP = −1 V, and λ = 0.02 V−1.
where iD1(vGS1,vDS1) = iD2(vGS2,vDS2) = iDn(vGS,vDS) and iD3(vSG3,vSD3) = iD4(vSG4,vSD4) = iDp(vSG,vSD), defined as Eq. (4.1.83), can be implemented by the MATLAB function handles ‘iDn()
’ and ‘iDp()
’, respectively, in the MATLAB function ‘FET_differential_loaded_ by_current_mirror()
’ below.
function [v1s,v2s,v3s,iD1s,iD2s,Av,Ro]=...
FET_differential_loaded_by_current_mirror(Kp,Vt,lam,VDD,vds)
% Analyze an FET differential pair loaded by a 2-FET current mirror
% (to find v1,v2,v3,iD1, and iD2 to a range vds of differential input vd
% and plot them vs. vds or t if vds is given as [vds; t].)
% Copyleft: Won Y. Yang, [email protected], CAU for academic use only
if numel(Kp)<2, KpN=Kp; KpP=Kp; else KpN=Kp(1); KpP=Kp(2); end
if numel(Vt)<2, VtN=Vt; VtP=-Vt; else VtN=Vt(1); VtP=Vt(2); end
if length(VDD)<3, error('VDD must be given as [VDD VGG VSS]!'); end
VSS=VDD(3); VGG=VDD(2); VDD=VDD(1);
IS=KpN/2*(VSS-VtN^2)^2;
options=optimset('Display','off','Diagnostics','off');
iDn=@(vGS,vDS)KpN/2*(vGS-VtN).^2*(1+lam*vDS).*(vGS>VtN) ...
.*(vGS-vDS<VtN)+ KpN*((vGS-VtN).*vDS-vDS.^2/2)*(1+lam*vDS) ...
.*(vGS>VtN).*(vGS-vDS>=VtN);
iDp=@(vSG,vSD)KpP/2*(vSG+VtP).^2*(1+lam*vSD).*(vSG>VtPa) ...
.*(vSG-vSD<VtPa)+ KpP*((vSG+VtP).*vSD-vSD.^2/2)*(1+lam*vSD)
.*(vSG+VtP>0).*(vSG-vSD>=VtPa);
if size(vds,1)==2, t=vds(2,:); vds=vds(1,:); end
lvds=length(vds);
for n=1:lvds
vd = vds(n);
eq=@(v)[iDp(VDD-v(?),VDD-v(1))-iDn(VGG+vd-v(3),v(?)-v(3))
iDp(VDD-v(1),VDD-v(?))-iDn(VGG-v(3),v(2)-v(?)) % Eq. (P4.9.1)
iDn(VGG+vd-v(3),v(?)-v(3))+iDn(VGG-v(?),v(2)-v(3)) ...
-iDn(VSS,v(?))]*1e4;
if vd<=0
if ~exist('v'), v0=VDD/6*[4 2 1]; else v0=v; end % Initial guess
else if vd<=0.02, v0=VDD/6*[4 5.5 1]; else v0=v; end % Initial guess
end
v = fsolve(eq,v0,options);
v1s(n)=v(1); v2s(n)=v(2); v3s(n)=v(3); v12s(n)=v(1)-v(2);
iD1s(n)=iDn(VGG+vd-v(3),v(1)-v(3)); iD2s(n)=iDn(VGG-v(3),v(2)-v(3));
iD5s(n)=iDn(VSS,v(3));
end
im=ceil(lvds/2); ID1=iD1s(im); ID2=iD2s(im);
V1=v1s(im); V2=v2s(im); VSS=v3s(im);
gm1=2*ID1/(VGG-VSS-Vt?); ro2=1/lam/ID2; % Eqs.(4.1.4b,a) for M2
gm2=2*ID2/(VGG-VSS-VtN); ro4=1/lam/ID?; % Eqs.(4.1.4b,a) for M4
gm3=2*ID1/(VDD-V1?Vt?); ro3=1/lam/ID?; % Eqs.(4.1.4b,a) for M3
Ro=1/(1/ro2+1/ro4); % Output resistance Eq. (P4.9.2)
Av=-gm1*Ro; % Voltage gain - Eq. (P4.9.3)
if nargout==0
if ~exist('t')
subplot(221), plot(vds,iD1s, vds,iD2s,'r', vds,iD5s,'g:')
legend('iD1','iD2','iD5'); xlabel('v_d'); ylabel('i_D');
axis([vds([1 end]) -0.1*IS 1.1*IS]), grid on
subplot(222) plot(vds,v12s, vds,v1s,'g:', vds,v2s,'r', vds,v3s,'m:')
legend('v12','v1','v2','v3'); xlabel('v_d'); ylabel('v_o');
axis([vds([1 end]) min(vos)-0.5 max(v2s)+0.5]), grid on
if size(vds,1)==2, t=vds(2,:); vds=vds(1,:); end
else
subplot(223), plot(t,iD1s, t,iD2s,'r'), legend('iD1(t)','iD2(t)');
subplot(224)
plot(t,vds, t,vos,'r', t,v2s-mean(v2s),'r', t,Av*vds,'m:')
legend('vd(t)','vo(t)','v2(t)-mean(v2(t))');
end
fprintf('Ro=%10.2f[kOhm] and Av=%8.2f ', Ro/1e3,Av);
end
%elec04p09.m
Kp=2e-3; Vt=1; lambda=0.02; R=100e3;
VDD=6; VGG=4; VSS=2; VDDs=[VDD VGG VSS];
% Please place the average value of vd at the center of vds.
Vdm=1.5; dvd=Vdm/100; vds=[-Vdm:dvd:Vdm]; % Differential input vd
% To plot v1, v2, and v3 vs. vds,
FET_differential_loaded_by_current_mirror(Kp,Vt,lambda,VDDs,vds);
% To plot vd(t) and v2(t) vs. t,
f=1e3; dt=1/f/360; t=[0:360]*dt; Vdm=1e-3; vds=[Vdm*sin(2*pi*f*t); t];
FET_differential_loaded_by_current_mirror(Kp,Vt,lambda,VDDs,vds);
complete the above MATLAB function ‘FET_differential_loaded_by_current_mirror()
’, which solves Eq. (P4.9.1) for v1, v2, and v3, and also uses Eqs. (P4.9.2,3) to find the output resistance and voltage gain.
FET_ differential_loaded_by_current_mirror()
’ two times, once with the fifth input argument vds = [−1.5 : 0.015 : 1.5] to plot iD1/iD2 versus vd on a graph (as depicted in Figure P4.9.1(b1)) and v1/v2/v3 versus vd on another graph (as depicted in Figure P4.9.1(b2)), and once the fifth input argument vds = [vd(t); t] (t = 0 : 1 μs : 3 ms) to plot vd(t)/Avvd(t)/vo(t) = v2(t)‐
mean(v2(t)) versus t on another graph (as depicted in Figure P4.9.2(a1)) where vd(t) = sin (2000πt) [mV]. You will see not only the related graphs but also the theoretical values of the output resistance and voltage gain.
Consider the JFET circuit in Figure P4.10(a) where the JFET has the device parameters BETA = Kp/2 = 0.75 mA/V2, VTO = Vt = −4 V, and λ = 0.008 V−1.
FET_CS_analysis()
’ to analyze the circuit three times, once with RD = 2.7 kΩ and RS = 2.7 kΩ (case A), once with RD = 2.7 kΩ and RS = 5 kΩ (case B), and once with RD = 3.5 kΩ and RS = 5 kΩ (case C). Then, run it to find the overall voltage gain Gv = vo/vi for the three cases. Noting that the three output voltage waveforms in Figure P4.10(c) have been obtained from PSpice simulations for the three cases with the small‐signal input vi(t) = 0.1 sin (2000πt), identify which one of voa(t), vob(t), and voc(t) corresponds to the output voltage of three cases A, B, and C, respectively.
%elec04p10.m
Kp=1.5e-3; Vt=-4; lambda=8e-3; %IDSS=12e-3; Kp=2*IDSS/Vt^2; BETA=Kp/2
disp('With RD=2.7kOhm and RS=2.7kOhm')
VDD=20; Rs=1e3; R1=200e4; R2=100e4; RD=2700; RS=2700; RL=4e3;
FET_CS_analysis(VDD,Rs,R1,R2,RD,[0 ??],RL,Kp,Vt,lambda);
disp('With RD=5kOhm and RS=2.7kOhm')
RS=5000; FET_CS_analysis(VDD,Rs,R1,R2,RD,[? RS],RL,Kp,Vt,lambda);
disp('With RD=3.5kOhm and RS=5kOhm')
RD=3500; FET_CS_analysis(VDD,Rs,R1,R2,RD,[0 RS],RL,Kp,Vt,lambda);
%elec04p11.m
VDD=10; Rs=0; R1=160e3; R2=40e3; RD=9e3; RS=1e3; RL=Inf;
Vt=0.8; lambda=0; Kps=[1.6 2]*1e-3;
% With no bypass capacitor in parallel with RS
for n=1:numel(Kps)
fprintf(' With Kp=%6.4fmA/V^2 and Vt=%5.2fV,', [Kps(n)*1e3 Vt]);
FET_CS_analysis(VDD,Rs,R1,R2,RD,[RS ?],RL,Kps(n),Vt,lambda);
end
% With Kp=2 and a bypass capacitor CSc in parallel with RS
fprintf(' With Kp=%6.4fmA/V^2, Vt=%5.2fV, and C in parallel with RS',
[Kps(2)*1e3 Vt]);
FET_CS_analysis(VDD,Rs,R1,R2,RD,[? RS],RL,Kps(2),Vt,lambda);
Consider the MOSFET circuit in Figure P4.11(a) where the NMOS has the device parameters Kp = 2 mA/V2, Vt = 0.8 V, and λ = 0 V−1.
FET_CS_analysis()
’ to analyze the circuit three times, once with Kp = 1.6 mA/V2 and without a bypass capacitor CSc in parallel with RSc (case A), once with Kp = 2 mA/V2 and without CSc (case B), and once with Kp = 2 mA/V2 and CSc in parallel with RSc (case C). Then, run it to find the voltage gain Gv = vo/vi for the three cases.Consider the MOSFET circuit in Figure P4.12(a) where the NMOS has the device parameters Kp = 1 mA/V2, Vt = 1 V, and λ = 0.025 V−1.
FET_CD_analysis()
’ to analyze the circuit three times, once with RD = 20 kΩ and RS = 20 kΩ (case A), once with RD = 35 kΩ and RS = 20 kΩ (case B), and once with RD = 20 kΩ and RS = 35 kΩ (case C). Then, run it to find the voltage gain Gv = vo/vi and the input/output resistances for the three cases. Do the changes of the voltage gain and the input/output resistances due to the change of RD or RS conform with your expectation based on Eqs. (4.2.11a), (4.2.12), and (4.2.10)?
%elec04p12.m
clear, clf
VDD=10; Rs=1e3; R1=200e3; R2=200e3; RL=1e6;
Kp=1e-3; Vt=1; lambda=0.025; % Device parameters
for n=1:3
if n==1, RD=20e3; RS=20e3; % Case A
elseif n==2, RD=35e3; RS=20e3; % Case B
else RD=20e3; RS=35e3; % Case C
end
FET_CD_analysis(VDD,Rs,R1,R2,RD,RS,RL,Kp,Vt,lambda);
end
Consider the MOSFET circuit in Figure P4.13(a1) or (a2) where the NMOS has the device parameters Kp = 1 mA/V2, Vt = 1 V, and λ = 0.01 V−1. Complete and run the following MATLAB script “elec04p13.m” to find the voltage gain Gv = vo/vi and the input/output resistances. Then see if they conform with the PSpice simulation results shown in Figure P4.13(b1) and (b2).
%elec04p13.m
% For Problem 4.13
% Circuit parameters
VDD=10; Rs=1e3; R1=2e7; R2=2e7; RD=35e3; RS=35e3; RL=1e6;
Kp=1e-3; Vt=1; lambda=0.01; % Device parameters
FET_C?_analysis(VDD,Rs,R1,R2,RD,RS,RL,Kp,Vt,lambda);
Consider the two‐stage MOSFET circuit in Figure P4.14(a) where the device parameters of the NMOSs M1 and M2 are Kp1 = 1 mA/V2, Vt1 = 1.2 V, λ1 = 0 V−1, Kp2 = 0.4 mA/V2, Vt2 = 1.2 V, and λ2 = 0 V−1. Noting that the input resistance Ri2 of stage 2 is infinite so that stage 1 (consisting of M1, R11, R21, RD1, and RSc) can be analyzed first, independently of stage 2 (consisting of M2 and RSc2), complete and run the following MATLAB script “elec04p14.m” to find the overall voltage gain Gv = vo/vi and the overall input/output resistances. Then see if they conform with the PSpice simulation results shown in Figure P4.14(b).
%elec04p14.m
clear, clf
VDD=10; Rs=4e3; RL=4e3; % DC power supply, Source/Load resistances
Kp1=1e-3; Vt1=1.2; lambda1=0; % Device parameters of M1
Kp2=0.4e-3; Vt2=1.2; lambda2=0; % Device parameters of M2
% Since RL1=Ri2 to Stage 1 is infinite, Stage can be analyzed
% independently of Stage 2.
% Analysis of Stage 1
Rs1=Rs; R11=383e3; R21=135e3; RD1=161e2; RS1=[? ????]; RL1=???;
[VGQ1,VSQ1,VDQ1,IDQ1,Av(1),Ri(1),Ro(1)]= ...
FET_CS_analysis(VDD,Rs1,R11,R21,RD1,RS1,RL1,Kp1,Vt1,lambda1);
% Analysis of Stage 2
Rs2=Ro(?); VG2=V???; RG2=Inf; RD2=0; RS2=8e3; RL2=RL;
[VGQ2,VSQ2,VDQ2,IDQ2,Av(2),Ri(2),Ro(2)]= ...
FET_CD_analysis(VDD,Rs2,VG2,RG2,RD2,RS2,RL2,Kp2,Vt2,lambda2);
Gv=Ri(1)/(Rs+Ri(1))*prod(??) % Global voltage gain
RI=Ri(?), RO=Ro(???) % Global input/output resistances
% From PSpice simulation
Gv_PSpice=127.4/20, Ri_PSpice=20/200.28e-6, Ro_PSpice=20/15.165e-3
%elec04p15.m
% Problem 4.15 : Analysis of a two-stage (CS-CD) amplifier
clear
VDD=10; Rs=0; RL=1e4; % DC power supply, Source/Load resistances
Vsm=0.01; % AC signal source voltage
Kp1=2e-3; Vt1=0.8; lambda1=0; % Device parameters
Kp2=1e-3; Vt2=1; lambda2=0;
% Provisional analysis of Stage 2 to find Ri(2) with Rs2=0 and RL2=RL
Rs2=?; R12=2e5; R22=2e5; RD2=2e4; RS2=35e3; RL2=R?;
[VGQ2,VSQ2,VDQ2,IDQ2,Av2,Ri2,Ro2]=...
FET_CD_analysis(VDD,Rs2,R12,R22,RD2,RS2,RL2,Kp2,Vt2,lambda2);
% Analysis of Stage 1 with RL1=Ri2
Rs1=??; R11=160e3; R21=40e3; RD1=9e3; RS1=[0 ???]; RL1=R??;
[VGQ1,VSQ1,VDQ1,IDQ1,Av(1),Ri(1),Ro(1)]= ...
FET_CS_analysis(VDD,Rs1,R11,R21,RD1,RS1,RL1,Kp1,Vt1,...
lambda1,Vsm);
% Analysis of Stage 2 with Rs2=Ro(1)
Rs2=Ro(?); Vsm2=Av(1)*Vsm;
[VGQ2,VSQ2,VDQ2,IDQ2,Av(2),Ri(2),Ro(2)]=...
FET_CD_analysis(VDD,Rs2,R12,R22,RD2,RS2,RL2,Kp2,Vt2,...
lambda2,Vsm2);
RI=Ri(?), RO=Ro(??d) % Overall input/output resistances
Gv_global=R?/(R?+RI)*prod(??) % Global voltage gain
Consider the MOSFET circuit in Figure P4.15(a) where the device parameters of the NMOSs M1 and M2 are Kp1 = 2 mA/V2, Vt1 = 0.8 V, λ1 = 0 V−1, Kp2 = 1 mA/V2, Vt2 = 1 V, and λ2 = 0 V−1. Noting that in general the analysis of a multistage amplifier needs performing a provisional backward analysis (starting from the last stage with the overall load resistance RL) to determine the input resistances of each stage and then performing a forward analysis (starting from the first stage with the overall source resistance Rs) to determine the voltage gain and output resistances of each stage, complete the above MATLAB script “elec04p15.m” so that it can use the MATLAB function ‘FET_CD_ analysis()
’ to analyze stage 2, ‘FET_CS_analysis()
’ to analyze stage 1, and ‘FET_CD_ analysis()
’ to analyze stage 2 again. Run it to find the overall voltage gain Gv = vo/vi and the overall input/output resistances RI/RO. Compare the overall voltage gain Gv with that obtained from the PSpice simulation (shown in Figure P4.15(b)) to see how close they are. Explain how the voltage gain has become larger than that of the single‐stage amplifier without the stage 2 (of CD configuration) whose voltage gain is less than 1 (Problem 4.12).
Consider the MOSFET circuit in Figure P4.16(a) where the device parameters of the NMOSs M1/M3 are Kp = 1 mA/V2, Vt = 1 V, λ = 0.01 V−1 in common, and those of the NPN‐BJT Q2 are βF = 100, βR = 1, VA = 100 V, and Is = 10−16 V. Noting that in general the analysis of a multistage amplifier needs performing a provisional backward analysis (starting from the last stage with the overall load resistance RL) to determine the input resistances of each stage and then performing a forward analysis (starting from the first stage with the overall source resistance Rs) to determine the voltage gain and output resistances of each stage, complete the following MATLAB script “elec04p16.m” so that it can use the MATLAB function ‘FET_CD_analysis()
’ to analyze stage 3 (of CD configuration), ‘BJT_CE_analysis()
’ to analyze stage 2 (of CE configuration), and ‘FET_CS_analysis()
’
%elec04p16.m
% Problem 4.16 : Analysis of a 3-stage (CS-CE-CD) amplifier
VDD=15; VCC=VDD; % DC supply voltage sources
Vsm=1e-3; % AC source voltage amplitude
Rs=1e4; RL=1e4; % Source and Load resistances
% Device parameters
Kp=1e-3; Vt=1; lambda=0.01; % Enhancement-type NMOS M1 and M3
BETAF2=100; BETAR2=1; betaAC2=BETAF2; Is=1e-16; VA2=100; rb2=0; % BJT Q2
beta2=[BETAF2,BETAR2,betaAC2,Is];
% Provisional analysis of Stage 3 to find Ri3 with Rs3=0 and RL3=RL
Rs3=0; R13=2e6; R23=2e6; RD3=0; RS3=35e3; RL3=R?;
[VGQ3,VSQ3,VDQ3,IDQ3,Av3,Ri3,Ro3]=...
FET_CD_analysis(VDD,Rs3,R13,R23,RD3,RS3,RL3,Kp,Vt,lambda);
% Analysis of Stage 2 with Rs2=0 and RL2=Ri3
Rs2=0; rb2=0; R12=2e5; R22=2e5; RC2=2500; RE2=[0 2500]; RL2=Ri?;
[VBQ2,VEQ2,VCQ2,IBQ2,IEQ2,ICQ2,Av2,Ai2,Ri2,Ro2,gm2,rbe2,ro2]=...
BJT_CE_analysis(VCC,rb2,Rs2,R12,R22,RC2,RE2,RL2,beta2);
% Analysis of Stage 1 with Rs1=Rs and RL=Ri2
Rs1=R?; R11=1e6; R21=2e6; RD1=1e3; RS1=[0 ???]; RL1=Ri?;
[VGQ1,VSQ1,VDQ1,IDQ1,Av(1),Ri(1),Ro(1)]=...
FET_CS_analysis(VDD,Rs1,R11,R21,RD1,RS1,RL1,Kp,Vt,lambda,Vsm);
% Analysis of Stage 2
Rs2=Ro(?); RL2=Ri?; Vsm2=Av(1)*Vsm;
[VBQ2,VEQ2,VCQ2,IBQ2,IEQ2,ICQ2,Av(2),Ai2,Ri(2),Ro(2)]=...
BJT_CE_analysis(VCC,rb2,Rs2,R12,R22,RC2,RE2,RL2,beta2,Vsm2,VA2);
% Analysis of Stage 3
Rs3=Ro(?); RL3=R?; Vsm3=prod(Av(1:2))*Vsm;
[VGQ3,VSQ3,VDQ3,IDQ3,Av(3),Ri(3),Ro(3)]=...
FET_CD_analysis(VDD,Rs3,R13,R23,RD3,RS3,RL3,Kp,Vt,lambda,Vsm3);
RI=Ri(1), RO=Ro(end) % Overall input/output resistances
Gv_global=RI/(Rs+??)*prod(??) % Global voltage gain
to analyze stage 1 (of CS configuration), ‘BJT_CE_analysis()
’ to analyze stage 2, and ‘FET_CD_analysis()
’ to analyze stage 3. Run it to find the overall voltage gain Gv = vo/vi and the overall input/output resistances RI/RO. Compare the overall voltage gain Gv with that obtained from the PSpice simulation (shown in Figure P4.16(b1)) to see how close they are.
Consider the FET cascode amplifier circuits in Figure P4.17 where the NMOSs have the device parameters Kp = 1 mA/V2, Vt = 1 V, and λ = 10−4 V−1 in common.
FET_cascode()
’ to analyze the circuit designed in (a). Run it to find the voltage gain Gv = vo/vi and the input/output resistances Ri/Ro.%elec04p17.m
% Problem 4.17 : Analysis of a cascode amplifier
VDD=5; VSS=-5; % DC supply voltage sources
Kp=1e-3; Vt=1; lambda=1e-4; % Device parameters
Vim=1e-3; t=[0:1e-6:3e-3]; vi=Vim*sin(2*pi*1000*t); % Small-signal input
disp('(a)')
Rs=1e3; R1=???e3; R2=???e3; R3=???e3; RS=8e3; RD=?e3; RL=1e5;
[VG1Q,VS1Q,VD1Q,VG2Q,VD2Q,IDQ,Av,Ri,Ro,gm,ro,vo,iD]= ...
FET_cascode([VDD VSS],Rs,R1,R2,R3,RS,RD,RL,Kp,Vt,lambda,vi);
Gva=Ri/(Rs+Ri)*prod(Av);
fprintf('Gv=%7.2f, Ri=%8.2sfkOhm, Ro=%7.1fOhm ', Gva,Ri/1e3,Ro);
clf, subplot(121), plot(t,vi, t,vo-mean(vo),'g')
disp('(b)')
VDD=VDD-VSS; VSS=0; % This will raise every node voltage by –VSS.
Rs=1e3; R1=???e3; R2=???e3; R3=???e3; RS=?e3; RD=?e3; RL=1e5;
[VG1Q,VS1Q,VD1Q,VG2Q,VD2Q,IDQ,Av,Ri,Ro,gm,ro,vo,iD]= ...
FET_cascode([VDD VSS],Rs,R1,R2,R3,RS,RD,RL,Kp,Vt,lambda,vi);
Gvb=Ri/(Rs+Ri)*prod(Av);
fprintf('Gv=%7.2f, Ri=%8.2fkOhm, Ro=%7.1fOhm ', Gvb,Ri/1e3,Ro);
hold on, plot(t,vo-mean(vo),'r')
Consider the (self‐biased) CS JFET amplifier circuit of Figure P4.18(a) where the conduction parameter, threshold voltage, and CLM parameter of the JFET are KP= 20 mA/V2, Vt= −6.25 V, and λ= 10−4V−1, respectively.
(Hint) Complete and run the following MATLAB script “elec04p18.m”:
%elec04p18.m
Avd=??; Kp=0.02; Vt=-6.25; lambda=1e-4; VDD=18;
VDSQd=?; IDQd=????; VG=?; RL=5e4; Rid_VG=[??? VG]; KC=VDSQd/???;
[R1,R2,RD,RS1,RS2]= ...
FET_CS_design(VDD,Kp,Vt,lambda,Avd,Rid_VG,IDQd,RL,KC);
% Here, the 6th input argument Rid has been set as [Rid VG]
% to fix vG=VG=0 as given in Fig. P4.18(a).
Vsm=0.01; Rs=50; RL=5e4;
[VGQ,VSQ,VDQ,IDQ,Av]=...
FET_C?_analysis(VDD,Rs,R1,R2,RD,[RS1 RS2],RL,Kp,Vt,lambda,Vsm);
(Note) If the MATLAB function ‘FET_CS_design()
’ turns out to work for this problem, it implies that the function can be used to design CS JFET amplifiers as well as CS MOSFET amplifiers.
Consider the CS MOSFET amplifier circuit of Figure P4.19(a) where the conduction parameter, threshold voltage, and CLM parameter of the MOSFET (IRF150) are KP = KPW/L = 20.53μ × 0.3/2μ = 3.08 A/V2, Vt = 2.831 V, and λ = 2.2 mV−1, respectively.
%elec04p19.m
Avd=10; Kp=3.08; Vt=2.831; lambda=2.2e-3; VDD=18;
IDQd=1e-3; VG=VDD; RL=5e4; Rid_VG=[1e5 ??]; KC=1/7;
[R1,R2,RD,RS1,RS2]= ...FET_CS_design(VDD,Kp,Vt,lambda,Avd,??????,IDQd,RL,KC);
% Here, the 6th input argument Rid has been set as [Rid VDD]
% to fix vG=VDD as given in Fig. P4.19(a).
Vsm=0.01; Rs=50; RL=5e4;
[VGQ,VSQ,VDQ,IDQ,Av]=...
FET_C?_analysis(VDD,Rs,R1,R2,RD,[RS1 RS2],RL,Kp,Vt,lambda,Vsm);
(Hint) Complete and run the above MATLAB script “elec04p19.m”.
Consider the CS MOSFET amplifier circuit of Figure 4.36(a) where the conduction parameter, threshold voltage, and CLM parameter of the MOSFET (IRF150) are KP = KPW/L = 20.53μ × 0.3/2μ = 3.08 A/V2, Vt = 2.831 V, and λ = 0.0075 mV−1, respectively. Let us see how the location of (static) operating point depending on the design constants such as ID,Q and VDS,Q affects the distortion of the output voltage waveform (to an AC input vs(t)=Vsmsin(2000πt) with Vsm= 0.3 V) caused by the (dynamic) operating point infringing on the ohmic or cutoff region.
FET_CS_analysis()
’ to analyze the designed circuit with the source/load resistance of Rs = 50 Ω/RL = 50 kΩ. Does it give you any warning message of ohmic/cutoff regions to be trespassed on? Perform the PSpice simulation with Time Domain analysis to see the output voltage to an AC input vs(t) = Vsm sin (2000πt) (with Vsm = 0.3 V) as shown in Figure P4.20(b). Does any distortion of vo(t) agree with the warning message given by the MATLAB analysis?FET_CS_analysis()
’ to analyze the designed circuit with the source/load resistance of Rs = 50 Ω/RL = 50 kΩ. Does it give you any warning message of ohmic/cutoff regions to be trespassed on? Perform the PSpice simulation with Time Domain analysis to see the output voltage to an AC input vs(t) = Vsm sin (2000πt) (with Vsm = 0.3 V) as shown in Figure P4.20(c).FET_CS_analysis()
’ to analyze the designed circuit with the source/load resistance of Rs = 50 Ω/RL = 50 kΩ. Does it give you any warning message of ohmic/cutoff regions to be trespassed on? Perform the PSpice simulation with Time Domain analysis to see the output voltage to an AC input vs(t) = Vsm sin (2000πt) (with Vsm = 0.3 V) as shown in Figure P4.20(d). Does any distortion of vo(t) agree with the warning message given by the MATLAB analysis?FET_CS_analysis()
’ to analyze the designed circuit with the source/load resistance of Rs = 50 Ω/RL = 50 kΩ. Does it give you any warning message of ohmic/cutoff regions to be trespassed on? Perform the PSpice simulation with Time Domain analysis to see the output voltage to an AC input vs(t) = Vsm sin (2000πt) (with Vsm = 0.3 V) as shown in Figure P4.20(e). Does any distortion of vo(t) agree with the warning message given by the MATLAB analysis?Consider the FET cascode amplifier with PSpice schematic and simulation result on the frequency response in Figure P4.21(a) and (b), respectively, where VDD = 12 V, Rs = 50 Ω, Cs = 100 μF, R1 = 200 kΩ, R2 = 100 kΩ, R3 = 100 kΩ, RS = 1 kΩ, CS = 100 μF, CG = 100 μF, RD = 3 kΩ, CL = 100 μF, RL = 100 kΩ, CLL = 0.1 nF, and the parameters of the enhancement type NMOSs are Kp = 10 mA/V2, Vt = 1 V, and λ = 10−4 V−1, Cgs0 = 10 pF, Cgd0 = 1 pF, and Cds = 0 F.
FET_cascode_DC_analysis()
’, which performs the DC analysis to determine the node voltages and drain currents at the operating point.
function [VGS1Q,VGD1Q,ID1Q,VGS2Q,VGD2Q,ID2Q]=...
FET_cascode_DC_analysis(VDD,R123,RD,RS,Kp,Vt,lambda)
% To do DC analysis of an FET cascode (CS-CG) amplifier in Fig. P4.21(a)
% Note that VDD can be given as [VDD VSS].
% Copyleft: Won Y. Yang, [email protected], CAU for academic use only
if numel(VDD)<2, VSS=0; else VSS=VDD(2); VDD=VDD(1); end
Kp1=Kp(1); Kp2=Kp(end); Vt1=Vt(1); Vt2=Vt(end);
lambda1=lambda(1); lambda2=lambda(end);
R1=R123(1); R2=R123(2); R3=R123(3); R_123=R1+R2+R3;
V1=VSS+R3/R_123*(VDD-VSS);
V3=V1+R2/R_123*(VDD-VSS);
options=optimset('Display','off','Diagnostics','off');
iD1=@(vGS,vDS)iD_NMOS_at_vDS_vGS(vDS,vGS,Kp1,Vt1,lambda1); %Eq. (4.1.83)
iD2=@(vGS,vDS)iD_NMOS_at_vDS_vGS(vDS,vGS,Kp2,Vt2,lambda2); %Eq. (4.1.83)
% A set of node equations in v=[V2 V4 V5]:
eq=@(v)[iD1(V1-v(?),v(?)-v(1))-(v(?)-VSS)/RS; % KCL at node 2
iD2(V3-v(?),v(?)-v(2))-iD1(V1-v(1),v(2)-v(1)); % KCL at node 4
(VDD-v(?))/RD-iD2(V3-v(2),v(3)-v(2))]*1e3; % KCL at node 5
v0=[V1-Vt1 V3-Vt2 (V3+VDD)/2]; % Initial guess for v=[V2 V4 V5]
v=fsolve(eq,v0,options);
VGS1Q=V1-v(1); VGD1Q=V1-v(2);
VGS2Q=V3-v(2); VGD2Q=V3-v(3);
ID1Q=iD1(V1-v(1),v(2)-v(1));
ID2Q=iD2(V3-v(2),v(3)-v(2));
FET_cascode_xfer_ftn()
’, which solves a set of 3, 4, or 5 node equations for the high‐frequency small‐signal equivalent (Figure P4.21(d)) depending on whether or not nodes 2/3 are AC grounded via capacitors CSC/CG, respectively, to find the transfer function G(s) = Vo(s)/Vs(s) of the cascade amplifier.FET_cascode_DC_analysis()
’), then based on the DC analysis result, use ‘FET_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 P4.21(c).
%elec04p21.m
% To find the frequency response of an FET cascode (CS-CG) amplifier
% Circuit parameters
VDD=12; Rs=50; Cs=1e-4; R1=200e3; R2=100e3; R3=100e3; R123=[R1 R2 R3];
RD=3e3; RS=1e3; CS=1e-4; RL=1e4; CG=1e-4; CL=1e-4; RL=1e4; CLL=1e-10; RLCLL=[RL CLL]; %CG=1; %CL=1; % Without CL
% Device parameters for the two FETs M1 and M2
Kp=0.01; Vt=1; lambda=1e-4; %1e-8;
Cgd0=1e-12; Cgs0=1e-11; Cds=0; CCC=[Cgs0,Cgd0,Cds]; %rds=rds;
f=logspace(0,8,801); w=2*pi*f; % Frequency range
[Gs,fc]=... FET_cascode_xfer_ftn(VDD,Rs,Cs,R123,RD,RS,
CS,CG,CL,RLCLL,Kp,Vt,lambda,CCC);
syms s; Gw=subs(Gs,'s',j*w); % Frequency response
GmagdB=20*log10(abs(Gw)+1e-5); Gmax=max(GmagdB);
semilogx(f,GmagdB, f([1 end]),[0 0],'k'), 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,ro1,gm2,ro2]=FET_cascode_xfer_ftn(VDD,Rs,Cs,
R123,RD,RS,CS,CG,CL,RLCLL,Kp,Vt,lambda,CCC,Vb,m)
%To find the transfer function of an FET cascode amplifier in Fig. 4.21(a)
% R123=[R1 R2 R3]
% RLCLL=[RL CLL] with RL and CLL in parallel
% CCC=[Cgs0,Cgd0,Cds] with Cgs0|Cgd0: Zero-bias GSJ|GDJ capacitances
% Vb: Gate junction (barrier) potential
% m : Gate p-n grading coefficient
% Copyleft: Won Y. Yang, [email protected], CAU for academic use only
if nargin<16, m=0.5; end % Gate p-n grading coefficient
if nargin<15, Vb=1; end % Gate junction (barrier) potential
if nargin<14, CCC=[0 0 0]; end
Cgs01=CCC(1,1); Cgd01=CCC(1,2); Cds1=CCC(1,3);
Cgs02=CCC(end,1); Cgd02=CCC(end,2); Cds2=CCC(end,3);
Vt1=Vt(1); Vt2=Vt(end); Kp1=Kp(1); Kp2=Kp(end);
lambda1=lambda(1); lambda2=lambda(end);
RL=RLCLL(1); if numel(RLCLL)<2, CLL=0; else CLL=RLCLL(2); end
R1=R123(1); R2=R123(2); R3=R123(3);
[VGS1Q,VGD1Q,ID1Q,VGS2Q,VGD2Q,ID2Q]= ...
FET_cascode_DC_analysis(VDD,R123,RD,RS,Kp,Vt,lambda);
[gm1,ro1]=gmro_FET(ID1Q,VGS1Q,Kp1,Vt1,lambda1);
[gm2,ro2]=gmro_FET(ID2Q,VGS2Q,Kp2,Vt2,lambda2);
Cgs1=Cgs01/(1+abs(VGS1Q)/Vb)^m; Cgd1=Cgd01/(1+abs(VGD1Q)/Vb)^m; %Eq. (4.4.5)
Cgs2=Cgs02/(1+abs(VGS2Q)/Vb)^m; Cgd2=Cgd02/(1+abs(VGD2Q)/Vb)^m; %Eq. (4.4.5)
syms s; sCs=s*Cs; sCS=s*CS; sCG=s*CG; sCL=s*CL;
sCgs1=s*Cgs1; sCgd1=s*Cgd1; sCds1=s*Cds1;
sCgs2=s*Cgs2; sCgd2=s*Cgd2; sCds2=s*Cds2;
Zs=Rs+1/sCs; Ys=1/Zs; RG=parallel_comb([R2 R3]);
ZL=parallel_comb([RL 1/s/CLL]);
ZD=parallel_comb([RD 1/sCL+ZL]); YD=1/ZD;
YG1=Ys+1/RG; YS=(1/RS+sCS)*(CS<1); % Admittance at terminal S
RG2=parallel_comb([R1 R2+R3]); YG2=(1/RG2+sCG)*(CG<1); % Admittance at G2
if (RS>1&CS<1)&(CG<1)
Y=[YG1+sCgs1+sCgd1 -sCgs1 -sCgd1 0 0;
-sCgs1-gm1 sCgs1+1/ro1+sCds1+YS+gm1 -1/ro1-sCds1 0 0;
-sCgd1+gm1 -1/ro1-sCds1-gm1 sCgd1+1/ro1+sCds1+sCgs2+1/ro2+sCds2+gm2
-sCgs2-gm2 -1/ro2-sCds2;
0 0 -sCgs2 sCgs2+sCgd2+YG2 -sCgd2;
0 0 -1/ro2-sCds2-gm2 -sCgd2+gm2 1/ro2+sCds2+sCgd2+YD];
V=Y[Ys; 0; 0; 0; 0];
elseif (RS>1&CS<1)&(CG>=1)
Y=[YG1+sCgs1+sCgd1 -sCgs1 -sCgd1 0;
-sCgs1-gm1 sCgs1+1/ro1+sCds1+YS+gm1 -1/ro1-sCds1 0;
-sCgd1+gm1 -1/ro1-sCds1-gm1 sCgd1+1/ro1+sCds1+sCgs2+1/ro2+sCds2+gm2
-1/ro2-sCds2;
0 0 -1/ro2-sCds2-gm2 1/ro2+sCds2+sCgd2+YD];
V=Y[Ys; 0; 0; 0];
elseif (RS<=1|CS>=1)&(CG<1)
Y=[YG1+sCgs1+sCgd1 -1/ro1-sCgd1 0 0;
-sCgd1+gm1 sCgd1+1/ro1+sCds1+sCgs2+1/ro2+sCds2+gm2 -sCgs2-gm2
-1/ro2-sCds2;
0 -sCgs2 sCgs2+sCgd2+YG2 -sCgd2;
0 -1/ro2-sCds2-gm2 -sCgd2+gm2 1/ro2+sCds2+sCgd2+YD];
V=Y[Ys; 0; 0; 0];
else %if (RS<=1|CS>=1)&(CG>=1)
Y=[YG1+sCgs1+sCgd1 -1/ro1-sCgd1 0;
-sCgd1+gm1 sCgd1+1/ro1+sCds1+sCgs2+1/ro2+sCds2+gm2 -1/ro2-sCds2;
0 -1/ro2-sCds2-gm2 1/ro2+sCds2+sCgd2+YD];
V=Y[Ys; 0; 0];
end
Gs=V(end)*ZL/(??+1/sCL); % Transfer function G(s)=Vo(s)/Vi(s) with Vi(s)=1
Ri(1)=RG; Ro(1)=ro1; % Eqs.(E4.11.7), (E4.11.8)
RDL=parallel_comb([RD RL]);
Av(2)=(1+gm2*ro2)*RDL/(ro2+RDL); % Eq. (E4.11.10) or (4.2.16b)
Ri(2)=(ro2+RD)/(1+gm2*ro2); % Eq. (4.2.15)
Ro(2)=parallel_comb([RD (1+gm2*ro2)*Ro(1)+ro2]); % Eq. (E4.11.11)
Av(1)=-gm1*ro1*Ri(2)/(Ri(2)+ro1); % Eq. (E4.11.9)
Cgd=[Cgd1 Cgd2]; Cgs=[Cgs1 Cgs2]; Cds=[Cds1 Cds2];
fc=break_freqs_of_FET_cascode(Rs,Cs,CL,RL,CLL,Cgd,Cgs,Cds,Av,Ri,Ro)
function fc=break_freqs_of_FET_cascode(Rs,Cs,CL,RL,CLL,Cgd,Cgs,
Cds,Av,Ri,Ro)
% To find the 6 break frequencies of an FET cascode amplifier
RsRi1=parallel_comb([Rs Ri(1)]); Ro1Ri2=parallel_comb([Ro(1) Ri(2)]);
Ro2RL=parallel_comb([Ro(2) RL]);
Cm1=Cgd(1)*(1-Av(1)); Cn1=Cgd(1)*(1-1/Av(1)); % Eq. (4.4.7a,b)
Cm2=Cds(2)*(1-Av(2)); Cn2=Cds(2)*(1-1/Av(2)); % Eq. (4.4.7a,b)
fc(1)=1/2/pi/Cs/(Rs+Ri(1)); fc(2)=1/2/pi/CL/(Ro(2)+RL);
fc(3)=1/2/pi/(Cgs(1)+Cm1)/RsRi1; fc(4)=1/2/pi/(Cds(1)+Cgs(1)+Cm2)/Ro1Ri2;
fc(5)=1/2/pi/(Cn2+Cgd(2))/Ro(2); fc(6)=1/2/pi/CLL/Ro2RL;
FET_cascode_DC_analysis()
’ in (c)?Consider the FET inverter in Figure P4.22(a) where VDD = 12 V, RD = 10 kΩ, RD1 = 10 kΩ, and the FET parameters are Kp = 5 mA/V2, Vt = 1 V, λ = 10−4 V−1, Cgs0 = 10 fF, Cgd0 = 1 fF, Cbd0 = 10 fF or 20 fF for M1, and Kp = 5 mA/V2, Vt = 1 V, λ = 10−4 V−1, Cgs0 = 10 fF, Cgd0 = 1 fF, Cbd0 = 10 fF for M2.
Figure P4.22(b1) and (b2) shows the input/output voltage waveforms obtained from PSpice simulation, each with Cbd = 10 fF and 20 fF for M1, respectively. Referring to Section 4.5 and Figure P4.22(b1‐b2), explain how a larger value of Cbd makes a longer time constant of vo1 during its rising period.
3.137.174.23