Author Topic: Help in deriving Zin small-signal expression  (Read 7685 times)

0 Members and 1 Guest are viewing this topic.

Online promach

  • Frequent Contributor
  • **
  • Posts: 552
  • Country: us
Re: Help in deriving Zin small-signal expression
« Reply #25 on: May 22, 2018, 01:23:49 am »
Do you guys have any comments on the KCL equations I have set up in order to find out Rout2 expression which is Vx/Ix ?

Note: Vx is the test voltage at the output node at drain of M5 , while Ix is the test current source going into the output node

 

Offline The Electrician

  • Frequent Contributor
  • **
  • Posts: 571
  • Country: us
Re: Help in deriving Zin small-signal expression
« Reply #26 on: May 22, 2018, 02:29:50 pm »
One of the things I find most annoying about trying to help someone on a forum is when I ask a question whose answer is important to my ability to help, and the question is not answered.

I asked you in reply #22 and #24 what model you will be using, and you haven't answered.  I'm guessing that it's the model in reply #16, but you should acknowledge if that is true.

There is also a schematic in reply #16 from which I presume the model is derived.  There are aspects of the schematic that you haven't included in the model.  For example, the symbol Vss appears in the schematic, but not in the model.  Vss, or course, is AC ground for small signal purposes.

Look at your first equation; the last term in that equation is (Vx - Vss)/ro5.  You need to make sure that every voltage you have in any of your equations appears in the model.  Since Vss is small signal ground, it shouldn't appear in any equation anyway whether on not you show it on the model.  Get rid of it everywhere you used it.  It's connected to your reference node (ground), and it's value is zero.

Also, please label the voltages at the various nodes.  Label the voltage at node 1 as v1, the voltage at node 2 as v2, the voltage at node 3 as v3, and the voltage at the output node as vo.

Your model shows the output node as grounded, with Iout flowing into ground.  Nodal analysis calculates voltages at nodes that are not grounded. Show the output node driving a load resistance RL,  If you later need the current into ground (a short, in other words), you can let RL be zero ohms.

Show a model with the nodes labeled v1, v2, etc,. and rewrite the equations using those voltages.  For example, the first term in your node 2 equation is (Vss - Vs6)/Rs; this can't be right because neither end of Rs is connected to Vss on the schematic (never mind that you don't show Vss on the model as I already pointed out).  Remember that on the schematic Vss is actually ground for small signal purposes.  The current sources I1 and I2 don't provide  node 2 or node 3 with a signal carrying connection to Vss (ground).  The current sources (if ideal) are infinite impedances.  They only provide the DC conditions, and they have no effect on small signal behavior.

Look at the last term of the equation for node 2.  What is that item in the numerator?  It looks like VDS6.  Is that the voltage from drain to source of M6?  If so, don't represent it like that.  The voltage from drain to to source of M6 should be represented as v1-v2.  Use the symbols v1, v2, v3, and vo for voltages in the numerators of terms in your equations.

Since M5's gate is grounded, you could replace M5 with a fixed impedance.

Update your model as I've suggested and rewrite your equations.  Show the results here and we can continue from there.
« Last Edit: May 22, 2018, 02:32:26 pm by The Electrician »
 
The following users thanked this post: promach

Online promach

  • Frequent Contributor
  • **
  • Posts: 552
  • Country: us
Re: Help in deriving Zin small-signal expression
« Reply #27 on: May 22, 2018, 03:45:27 pm »
Quote
Since M5's gate is grounded, you could replace M5 with a fixed impedance.

What happen to the current source gm5*Vgs5 ?

Quote
Look at your first equation; the last term in that equation is (Vx - Vss)/ro5.

No, it is Vs5 instead of Vss

Quote
It looks like VDS6.  Is that the voltage from drain to source of M6?

Yes, you are right that it is Vds6

Quote
Your model shows the output node as grounded, with Iout flowing into ground.

That model is used for Gm2 transconductance

For output impedance Rout2, output node is not grounded. Note that Vx is the test voltage at the output node at drain of M5 , while Ix is the test current source going into the output node

« Last Edit: May 22, 2018, 03:48:34 pm by promach »
 

Offline The Electrician

  • Frequent Contributor
  • **
  • Posts: 571
  • Country: us
Re: Help in deriving Zin small-signal expression
« Reply #28 on: May 22, 2018, 07:52:18 pm »
Forget about replacing M5 with a resistor.  I made that comment before I looked carefully at where the source of M5 is connected.

Please do a new model image with the nodes labeled v1, v2, v3, vo and new equations using those designators.
 

Online promach

  • Frequent Contributor
  • **
  • Posts: 552
  • Country: us
Re: Help in deriving Zin small-signal expression
« Reply #29 on: May 23, 2018, 01:30:52 am »
Code: [Select]
node_1: V1/ro4 + gm4*V1 + (V1-V2)/ro6 + gm6*(0-V2) = 0

node_2: (V2-V1)/ro6 + (V2-V3)/Rs - gm6*(0-V2) = 0

node_3: (V3-V2)/Rs + (V3-Vx)/ro5 + gm5*V3 = 0

output_node: Ix - gm3*V1 - Vx/ro3 + gm5*V3 - (Vx-V3)/ro5 = 0

Note: Vx is the test voltage at the output node at drain of M5 , while Ix is the test current source going into the output node
 

Offline The Electrician

  • Frequent Contributor
  • **
  • Posts: 571
  • Country: us
Re: Help in deriving Zin small-signal expression
« Reply #30 on: May 24, 2018, 03:12:28 am »
Code: [Select]
node_1: V1/ro4 + gm4*V1 + (V1-V2)/ro6 + gm6*(0-V2) = 0

node_2: (V2-V1)/ro6 + (V2-V3)/Rs - gm6*(0-V2) = 0

node_3: (V3-V2)/Rs + (V3-Vx)/ro5 + gm5*V3 = 0

output_node: Ix - gm3*V1 - Vx/ro3 + gm5*V3 - (Vx-V3)/ro5 = 0

Note: Vx is the test voltage at the output node at drain of M5 , while Ix is the test current source going into the output node

It took me a while to realize that you are using P channel FETs for M3 and M4.  The text you linked to seems to be using only N channel FETs.  Given that, your equations look correct, but I have a few comments.

Since you will probably be using these equations for calculating other quantities, such as various gains, I wouldn't use a variable name Vx just for the purpose of calculating Rout2.  Leave the 4th node as vo.

You used the convention that current out of a node is positive for your first 3 equations, and used the opposite for the last equation.  Since you can just multiply the left side by -1 and that won't change the sign of the zero on the right side, it doesn't matter when you go to solve the equations.  But, I think that's a bad practice; choose a convention and stick to it.

If you later need to calculate gains, you will need to include Vin in the equations.  You might as well leave that in there now and just set Vin = 0 for the Rout2 calculation to avoid forgetting where Vin goes later.

Just set Ix equal to 1, and then the impedance at the vo node will be equal to (vo)/(1 amp).  In other words, when you inject 1 amp into the vo node, the expression for the voltage there is the same as the expression for the impedance there.

If I make the above changes, here are the equations as I have them, ready to solve:



Here's the solution:



What do you get for the expression at vo if you plug in some numbers for the various transconductances and resistances?  Does it make sense?
« Last Edit: May 24, 2018, 03:24:54 am by The Electrician »
 
The following users thanked this post: promach

Offline bson

  • Supporter
  • ****
  • Posts: 1898
  • Country: us
Re: Help in deriving Zin small-signal expression
« Reply #31 on: May 24, 2018, 08:27:12 am »




You know there's a function TeXForm[] in Mathematica?  E.g.:
Code: [Select]
%21 // TeXForm
\frac{\text{Rout2}}{\text{Gm1} \text{Gm2} \text{Rout1} \text{Rout2}+1}

Copy and paste, with $ $ (no space) before and after, e.g.:

$$ \text{Limit}\left[\frac{\text{Rout1} \text{Rout2} s C_L+\text{Rout2}}{\text{Rout1} s C_L+\text{Gm1} \text{Gm2} \text{Rout1} \text{Rout2}+1},s\rightarrow 0\right] $$

$$ \frac{\text{Rout2}}{\text{Gm1} \text{Gm2} \text{Rout1} \text{Rout2}+1} $$

No need to fuss with screen captures...

Or, inline: \$ \frac{\text{Rout2}}{\text{Gm1} \text{Gm2} \text{Rout1} \text{Rout2}+1} \$
« Last Edit: May 24, 2018, 08:31:00 am by bson »
 
The following users thanked this post: promach

Offline The Electrician

  • Frequent Contributor
  • **
  • Posts: 571
  • Country: us
Re: Help in deriving Zin small-signal expression
« Reply #32 on: May 24, 2018, 04:01:11 pm »
I'm aware that Mathematica can produce TeX, but I prefer the appearance of the native Mathematica format.  The generated TeX has no spaces between variables, and it insists on having "\text" in front of every little thing.

You chose a fairly simple example, but see what Mathematica generates for my image in reply #30:



I don't mind pasting images.
« Last Edit: May 24, 2018, 04:02:55 pm by The Electrician »
 

Online promach

  • Frequent Contributor
  • **
  • Posts: 552
  • Country: us
Re: Help in deriving Zin small-signal expression
« Reply #33 on: May 24, 2018, 11:30:20 pm »
However, for gm and ro calculation for each mosfets, how do I obtain some transistor characteristic parameter such as uo and Cox from BSIM4 mosfet models ?

http://ngspice.sourceforge.net/external-documents/models/BSIM480_Manual.pdf

https://github.com/promach/frequency_trap/blob/development/modelcard.nmos

https://github.com/promach/frequency_trap/blob/development/modelcard.pmos

 

Offline The Electrician

  • Frequent Contributor
  • **
  • Posts: 571
  • Country: us
Re: Help in deriving Zin small-signal expression
« Reply #34 on: May 25, 2018, 01:44:33 am »
However, for gm and ro calculation for each mosfets, how do I obtain some transistor characteristic parameter such as uo and Cox from BSIM4 mosfet models ?

http://ngspice.sourceforge.net/external-documents/models/BSIM480_Manual.pdf

https://github.com/promach/frequency_trap/blob/development/modelcard.nmos

https://github.com/promach/frequency_trap/blob/development/modelcard.pmos

I can't help you here.  Perhaps danmc can help.
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1117
  • Country: us
Re: Help in deriving Zin small-signal expression
« Reply #35 on: May 25, 2018, 02:11:16 am »


I can't help you here.  Perhaps danmc can help.

I am jumping in on page 2 of this thread...have already done a promach torture test.

Take a look at CMOS Analog Circuit Design by Allen/Holberg  first edition, chapter 4, second edition Appendix B, third edition Appendix C.
Zero-field mobility is the same for all models...as is Cox.

You can download it here: https://archive.org/details/Allen2011CmosAnalogCircuitDesign3e

« Last Edit: May 25, 2018, 02:22:19 am by Wimberleytech »
 
The following users thanked this post: promach

Online promach

  • Frequent Contributor
  • **
  • Posts: 552
  • Country: us
Re: Help in deriving Zin small-signal expression
« Reply #36 on: May 26, 2018, 04:40:36 pm »
I am now reading https://archive.org/stream/Allen2011CmosAnalogCircuitDesign3e/allen%202011%20-%20cmos%20analog%20circuit%20design%203e#page/n673/mode/2up/search/appendix

Could you elaborate on "Zero-field mobility is the same for all models...as is Cox." ?  I am not very familiar with CMOS device details and I am bit confused with your sentence.
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1117
  • Country: us
Re: Help in deriving Zin small-signal expression
« Reply #37 on: May 27, 2018, 11:47:54 pm »
I am now reading https://archive.org/stream/Allen2011CmosAnalogCircuitDesign3e/allen%202011%20-%20cmos%20analog%20circuit%20design%203e#page/n673/mode/2up/search/appendix

Could you elaborate on "Zero-field mobility is the same for all models...as is Cox." ?  I am not very familiar with CMOS device details and I am bit confused with your sentence.

There are many models that have been developed for MOS transistors over the years.  Some parameters used in models have significance or meaning only within that model.  U0 and Cox are physical parameters that do not depend on the model.  So, any model that needs a value for U0 and/or Cox will use the same values as any other model.
 
The following users thanked this post: promach

Online promach

  • Frequent Contributor
  • **
  • Posts: 552
  • Country: us
Re: Help in deriving Zin small-signal expression
« Reply #38 on: May 28, 2018, 03:09:34 am »
Quote
U0 and Cox are physical parameters that do not depend on the model.

Why would this be the case ?

Besides, in this case, how do I obtain the value of U0 and Cox ?
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1117
  • Country: us
Re: Help in deriving Zin small-signal expression
« Reply #39 on: May 28, 2018, 06:36:21 pm »
Quote
U0 and Cox are physical parameters that do not depend on the model.

Why would this be the case ?
U0 is carrier mobility.  Yes, it depends on crystal orientation and perhaps other things, but most circuit-simulation models start with a value for mobility at zero field and adjust that value as a function of temperature, electric field, and other stuff. 

Same for Cox.  It is essentially e/tox where e is permitivity.  So e, is e, tox is the oxide thickness grown over the gate channel.

Quote
Besides, in this case, how do I obtain the value of U0 and Cox ?
Cox can be measured directly using several devices with appropriate geometries.  U0 can be measured indirectly as well.
 
The following users thanked this post: promach

Online promach

  • Frequent Contributor
  • **
  • Posts: 552
  • Country: us
Re: Help in deriving Zin small-signal expression
« Reply #40 on: May 29, 2018, 02:21:15 am »
Quote
In saturation region:
Cgs= (2/3)WLC'ox
Cox=WL*C'ox

I found the above in one other forum. Why would Cox be different when it is not in saturation region ?

Besides, U0 could be found directly inside the model itself as in https://github.com/imr/ngspice/blob/master/examples/xspice/table/modelcards/modelcard.nmos#L55

 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1117
  • Country: us
Re: Help in deriving Zin small-signal expression
« Reply #41 on: May 29, 2018, 01:18:26 pm »
Quote
In saturation region:
Cgs= (2/3)WLC'ox
Cox=WL*C'ox

I found the above in one other forum. Why would Cox be different when it is not in saturation region ?

Because in saturation, the charge in the channel (inversion layer) varies from the source to the drain.  This is because the electric field is decreasing in magnitude as you get closer to the drain.  For a non-saturated transistor, the charge in the inversion layer is closer to constant across the channel.  Of course, these are APPROXIMATIONS.  Simulators use a more thorough charge-storage model than this simple relationship.
Quote
Besides, U0 could be found directly inside the model itself as in https://github.com/imr/ngspice/blob/master/examples/xspice/table/modelcards/modelcard.nmos#L55
Somebody had to put it there!
 

Online promach

  • Frequent Contributor
  • **
  • Posts: 552
  • Country: us
Re: Help in deriving Zin small-signal expression
« Reply #42 on: May 30, 2018, 04:05:03 pm »
Do you guys have any idea how to compute value of Cox using https://github.com/imr/ngspice/blob/master/examples/xspice/table/modelcards/modelcard.nmos ?

Could anyone show ?
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1117
  • Country: us
Re: Help in deriving Zin small-signal expression
« Reply #43 on: May 30, 2018, 04:21:36 pm »
Do you guys have any idea how to compute value of Cox using https://github.com/imr/ngspice/blob/master/examples/xspice/table/modelcards/modelcard.nmos ?

Could anyone show ?

EPSROX*8.854e-12/TOXE
 
The following users thanked this post: promach

Online promach

  • Frequent Contributor
  • **
  • Posts: 552
  • Country: us
Re: Help in deriving Zin small-signal expression
« Reply #44 on: June 02, 2018, 01:11:03 am »
Cox = e0*er / Tox

Where is the missing parameter "area" ? I suppose capacitance equation is something like C = e*A/d

Besides, someone told me that calculating gm and ro by hand will not be very useful. What do you guys think ?

No matter what, using wxmaxima software, I have also came up with the extremely long expression of Vout/Iout which I am still not quite sure how I would use it effectively. Almost all parameters are both in nominator and denominator of the expression, this makes mosfet sizing decision very difficuly indeed.


\[ node\_1: V1/ro4 + gm4*V1 + (V1-V2)/ro6 + gm6*(Vin-V2) = 0\$ \]

\[ node\_2: (V2-V1)/ro6 + (V2-V3)/Rs - gm6*(Vin-V2) = 0\$ \]

\[ node\_3: (V3-V2)/Rs + (V3-Vout)/ro5 + gm5*V3 = 0\$ \]

\[output\_node: -Iout + gm3*V1 + Vout/ro3 - gm5*V3 + (Vout-V3)/ro5 = 0\$ \]

\[ sol: linsolve([node\_1, node\_2, node\_3, output\_node], [Vout, Iout, V1, V2, V3])\$ \]

\[ Rout: Vout/Iout,sol,factor; \]


\[
\frac{ (\mathit{ro3} (\mathit{Rs}\, \mathit{gm4}\, \mathit{gm5}\, \mathit{gm6}\, \mathit{ro4}\, \mathit{ro5}\, \mathit{ro6}+\mathit{gm4}\, \mathit{gm6}\, \mathit{ro4}\, \mathit{ro5}\, \mathit{ro6}+\mathit{gm4}\, \mathit{gm5}\, \mathit{ro4}\, \mathit{ro5}\, \mathit{ro6}+\mathit{Rs}\, \mathit{gm5}\, \mathit{gm6}\, \mathit{ro5}\, \mathit{ro6}+\mathit{gm6}\, \mathit{ro5}\, \mathit{ro6}+\mathit{gm5}\, \mathit{ro5}\, \mathit{ro6}+\mathit{Rs}\, \mathit{gm4}\, \mathit{gm6}\, \mathit{ro4}\, \mathit{ro6}+\mathit{gm4}\, \mathit{ro4}\, \mathit{ro6}+\mathit{Rs}\, \mathit{gm6}\, \mathit{ro6}+\mathit{ro6}+\mathit{Rs}\, \mathit{gm4}\, \mathit{gm5}\, \mathit{ro4}\, \mathit{ro5}+\mathit{gm5}\, \mathit{ro4}\, \mathit{ro5}+\mathit{gm4}\, \mathit{ro4}\, \mathit{ro5}+\mathit{Rs}\, \mathit{gm5}\, \mathit{ro5}+\mathit{ro5}+\mathit{Rs}\, \mathit{gm4}\, \mathit{ro4}+\mathit{ro4}+\mathit{Rs})) }

 { (\mathit{Rs}\, \mathit{gm4}\, \mathit{gm5}\, \mathit{gm6}\, \mathit{ro4}\, \mathit{ro5}\, \mathit{ro6}+\mathit{gm4}\, \mathit{gm6}\, \mathit{ro4}\, \mathit{ro5}\, \mathit{ro6}+\mathit{gm4}\, \mathit{gm5}\, \mathit{ro4}\, \mathit{ro5}\, \mathit{ro6}+\mathit{Rs}\, \mathit{gm5}\, \mathit{gm6}\, \mathit{ro5}\, \mathit{ro6}+\mathit{gm6}\, \mathit{ro5}\, \mathit{ro6}+\mathit{gm5}\, \mathit{ro5}\, \mathit{ro6}+\mathit{gm4}\, \mathit{gm6}\, \mathit{ro3}\, \mathit{ro4}\, \mathit{ro6}+\mathit{gm3}\, \mathit{gm6}\, \mathit{ro3}\, \mathit{ro4}\, \mathit{ro6}+\mathit{Rs}\, \mathit{gm4}\, \mathit{gm6}\, \mathit{ro4}\, \mathit{ro6}+\mathit{gm4}\, \mathit{ro4}\, \mathit{ro6}+\mathit{gm6}\, \mathit{ro3}\, \mathit{ro6}+\mathit{Rs}\, \mathit{gm6}\, \mathit{ro6}+\mathit{ro6}+\mathit{Rs}\, \mathit{gm4}\, \mathit{gm5}\, \mathit{ro4}\, \mathit{ro5}+\mathit{gm5}\, \mathit{ro4}\, \mathit{ro5}+\mathit{gm4}\, \mathit{ro4}\, \mathit{ro5}+\mathit{Rs}\, \mathit{gm5}\, \mathit{ro5}+\mathit{ro5}+\mathit{gm4}\, \mathit{ro3}\, \mathit{ro4}+\mathit{gm3}\, \mathit{ro3}\, \mathit{ro4}+\mathit{Rs}\, \mathit{gm4}\, \mathit{ro4}+\mathit{ro4}+\mathit{ro3}+\mathit{Rs}) }
\]
« Last Edit: June 02, 2018, 01:21:22 am by promach »
 

Offline The Electrician

  • Frequent Contributor
  • **
  • Posts: 571
  • Country: us
Re: Help in deriving Zin small-signal expression
« Reply #45 on: June 02, 2018, 03:13:34 am »
If M3 and M4 are identical, and M5 and M6 are identical, that fact will reduce the size of the expression, but you will probably have to plug in some numbers and see what you get.
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1117
  • Country: us
Re: Help in deriving Zin small-signal expression
« Reply #46 on: June 03, 2018, 08:26:18 pm »
Cox = e0*er / Tox

Where is the missing parameter "area" ? I suppose capacitance equation is something like C = e*A/d


No, for transistor models, Cox has units of f/m2

In the simulator, area is derived from the transistor instantiation line (e.g., W and L).
 
The following users thanked this post: promach

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1117
  • Country: us
Re: Help in deriving Zin small-signal expression
« Reply #47 on: June 03, 2018, 08:32:25 pm »

Besides, someone told me that calculating gm and ro by hand will not be very useful. What do you guys think ?


It is reasonable to calculate gm by hand...assuming a long-channel device (as opposed to short channel), but ro is a crap shoot by hand.  You can do rough approximations in the design process but must rely on the simulator to do a better job.  Designs should never depend on an accurate ro anyway.  In fact, you should not depend on an accurate anything other than matching.
 

Online promach

  • Frequent Contributor
  • **
  • Posts: 552
  • Country: us
Re: Help in deriving Zin small-signal expression
« Reply #48 on: June 04, 2018, 01:17:43 am »
Quote
It is reasonable to calculate gm by hand...assuming a long-channel device (as opposed to short channel), but ro is a crap shoot by hand.

What do you think about http://asco.sourceforge.net/doc/ASCO.html#SECTION00220000000000000000 ?

or in general  http://ngspice.sourceforge.net/docs/ngspice-manual.pdf#page=435 ?
 

Online promach

  • Frequent Contributor
  • **
  • Posts: 552
  • Country: us
Re: Help in deriving Zin small-signal expression
« Reply #49 on: July 05, 2018, 09:21:04 pm »
Is it possible to derive the absolute numerical value of lambda(λ) from the mosfet model files ? Could anyone show how to do so ?

Alternatively, could I just use https://github.com/imr/ngspice/blob/master/examples/xspice/table/modelcards/modelcard.nmos#L38 directly ?

Besides, what does  TOXE = 1.8E-009  actually give ?  1.8*10^(-9) ? I asked this because I saw  LC = 5E-9  in the same file


« Last Edit: July 05, 2018, 09:34:20 pm by promach »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf