Author Topic: Measuring transconductance of any circuit  (Read 5426 times)

0 Members and 1 Guest are viewing this topic.

Offline promachTopic starter

  • Frequent Contributor
  • **
  • Posts: 875
  • Country: us
Measuring transconductance of any circuit
« on: December 14, 2018, 01:32:44 am »
May I know if the following transconductance measurement test circuit is correct ?

I suspect that I need to use some derivative function because changing the mosfets width by a large factor does not change the gm result much at all.

However, my test circuit is simulated in AC, not DC, therefore I really confuse if I should use derivative function or not ?

Note: X1 is a CMOS inverter

« Last Edit: December 14, 2018, 01:34:29 am by promach »
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1133
  • Country: us
Re: Measuring transconductance of any circuit
« Reply #1 on: December 14, 2018, 02:39:58 am »
What is your end goal here?  Is this a step in solving a larger problem?

In small signal,
Vout = Vin * gm * Rout.

If you have Vin, Vout, and Rout, you calculate gm.  For your inverter, gm depends on the dc bias point.

You can simulate this using .ac but you want the frequency to be low enough so that there are no reactive effects.

 

Offline promachTopic starter

  • Frequent Contributor
  • **
  • Posts: 875
  • Country: us
Re: Measuring transconductance of any circuit
« Reply #2 on: December 14, 2018, 03:30:41 am »
Quote
What is your end goal here?  Is this a step in solving a larger problem?

See this inductor calculation especially the the small gm values

However, this forum thread is focused on checking whether my transconductance measurement circuit is correct or not.

Quote
For your inverter, gm depends on the dc bias point

OK, I will use this netlist instead for biasing the CMOS inverter in saturation mode for both mosfets.
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1133
  • Country: us
Re: Measuring transconductance of any circuit
« Reply #3 on: December 14, 2018, 02:32:23 pm »
Quote
What is your end goal here?  Is this a step in solving a larger problem?

See this inductor calculation especially the the small gm values

However, this forum thread is focused on checking whether my transconductance measurement circuit is correct or not.

Quote
For your inverter, gm depends on the dc bias point

OK, I will use this netlist instead for biasing the CMOS inverter in saturation mode for both mosfets.

This is helpful.  You need to simulate the entire circuit using dc operating point analysis (.op).  This will bias the inverter properly.  Then, simply look at the spice operating point output file.  It will give you the gm of all transistors.  For the inverter, you will sum the gm of each transistor and that is the total gm for the inverter.
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1133
  • Country: us
Re: Measuring transconductance of any circuit
« Reply #4 on: December 14, 2018, 02:42:52 pm »
Quote
This is helpful.  You need to simulate the entire circuit using dc operating point analysis (.op).  This will bias the inverter properly.  Then, simply look at the spice operating point output file.  It will give you the gm of all transistors.  For the inverter, you will sum the gm of each transistor and that is the total gm for the inverter.

For example...see attached.
 

Offline promachTopic starter

  • Frequent Contributor
  • **
  • Posts: 875
  • Country: us
Re: Measuring transconductance of any circuit
« Reply #5 on: December 15, 2018, 01:39:49 am »
Quote
For the inverter, you will sum the gm of each transistor and that is the total gm for the inverter.

This method only works for small circuit (where we have derived the transfer function for overall Gm)

Quote
simply look at the spice operating point output file.  It will give you the gm of all transistors.

I need overall Gm of a black-box circuit block, not the gm of every individual mosfets (this is not really helping since overall Gm is not a function of gm alone).

Furthermore, unlike in LTspice and Cadence. ngspice does not give user the gm value of each mosfets even after .op analysis.
« Last Edit: December 15, 2018, 01:48:38 am by promach »
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1133
  • Country: us
Re: Measuring transconductance of any circuit
« Reply #6 on: December 15, 2018, 03:09:15 am »
Quote
For the inverter, you will sum the gm of each transistor and that is the total gm for the inverter.

This method only works for small circuit (where we have derived the transfer function for overall Gm)

Quote
simply look at the spice operating point output file.  It will give you the gm of all transistors.

I need overall Gm of a black-box circuit block, not the gm of every individual mosfets (this is not really helping since overall Gm is not a function of gm alone).

Furthermore, unlike in LTspice and Cadence. ngspice does not give user the gm value of each mosfets even after .op analysis.

Are you solving a small-signal problem or a large-signal problem? (You said, earlier that it was SS...have you changed your mind?) Think about it.

If ngspice will not give you transconductances, then don't use it.  Use LTSpice.  Frankly, my money would be on ngspice giving gm values.  Hell, it has Berkeley Spice lineage!  ---read chapter 13 of ngspice manual---
« Last Edit: December 15, 2018, 03:37:08 am by Wimberleytech »
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1133
  • Country: us
Re: Measuring transconductance of any circuit
« Reply #7 on: December 15, 2018, 03:24:12 am »
"I need overall Gm of a black-box circuit block, not the gm of every individual mosfets (this is not really helping since overall Gm is not a function of gm alone)."

Add the gm of the pch and the nch transistors together to get the overall transconductance of the inverter.

 

Offline promachTopic starter

  • Frequent Contributor
  • **
  • Posts: 875
  • Country: us
Re: Measuring transconductance of any circuit
« Reply #8 on: December 15, 2018, 05:00:55 am »
Quote
it has Berkeley Spice lineage!  ---read chapter 13 of ngspice manual---

Huh ? Chapter 13 is about verilog-A model

Quote
Add the gm of the pch and the nch transistors together to get the overall transconductance of the inverter.

This method only works well for small circuit such as cmos inverter (where we have derived the transfer function for overall Gm)

Note the title of this forum thread again

Quote
Are you solving a small-signal problem or a large-signal problem?

The following is self-biasing for cmos inverter input such that both mosfets are in saturation mode.

« Last Edit: December 15, 2018, 05:32:10 am by promach »
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1133
  • Country: us
Re: Measuring transconductance of any circuit
« Reply #9 on: December 15, 2018, 01:41:41 pm »
Here is the chapter 13 reference: https://www.csd.uoc.gr/~hy121/2013a/datasheets/ngspice-user-manual.pdf

Do this.

Perform an operating point simulation.
Measure the voltage at Node A at full precision.
Break connection at wire B.
Add a voltage source (V1) to drive Node A with the value measured above.
Run another operating point simulation.
Measure the voltage at the output of the inverter to full precision.
Add a voltage source (V2) to drive the output of the inverter with the value just measured.
Convert the first voltage source (V1), above, to a SINE source with dc offset being the same as before. Set amplitude to 1mV.  Set frequency to 100 Hz.
Run a transient simulation.
Measure current in the second voltage source, V2.  This current divided by the input ac voltage is your GM.

I am pretty sure there is a better way to do this, and I will give it some thought, but this is one way.

This can be simplified by just making V2 the same dc value as V1 and skip the second operating-point simulation.  The results will be practically the same.

 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1133
  • Country: us
Re: Measuring transconductance of any circuit
« Reply #10 on: December 15, 2018, 04:19:36 pm »
Here is another way.

Build the test setup using current source and controlled source as shown.
Run transient analysis.
Measure the voltage at the input of the DUT.
Since I and V are known, calculate GM.
 
The following users thanked this post: promach

Offline promachTopic starter

  • Frequent Contributor
  • **
  • Posts: 875
  • Country: us
Re: Measuring transconductance of any circuit
« Reply #11 on: December 16, 2018, 01:16:32 am »
Quote
Build the test setup using current source and controlled source as shown

1) Is E1 a transconductance simulation element ? If yes, it seems not really practical to assign value of 100 to E1 ?

2) Any reason for using "sine" current source ?

3) Why transient analysis ? I suppose doing a DC sweep across Vin and doing derivative on Iout and Vin is the definition of Gm ?
« Last Edit: December 16, 2018, 01:29:41 am by promach »
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1133
  • Country: us
Re: Measuring transconductance of any circuit
« Reply #12 on: December 16, 2018, 01:26:30 am »
Quote
Build the test setup using current source and controlled source as shown

1) Is E1 a transconductance simulation element ? If yes, it seems not really practical to assign value of 100 to E1 ?
Why (Why not)?
E1 is functioning like an opamp.  Something higher than 100 would be better, but I was concerned about convergence.
Quote
2) Any reason for using "sine" current source ?
It is easy...it works
Quote
3) Why transient analysis ? I suppose doing a DC sweep across Vin and doing derivative on Iout and Vin is the definition of Gm ?
You do not need to do a derivative.  Measure delta voltage...you know the delta current.  Algebra.
 
The following users thanked this post: promach

Offline promachTopic starter

  • Frequent Contributor
  • **
  • Posts: 875
  • Country: us
Re: Measuring transconductance of any circuit
« Reply #13 on: December 16, 2018, 01:30:14 am »
Did you forget the capacitor which is the important component in a gyrator implementation of inductor ?
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1133
  • Country: us
Re: Measuring transconductance of any circuit
« Reply #14 on: December 16, 2018, 01:33:40 am »
Did you forget the capacitor which is the important component in a gyrator implementation of inductor ?

No.  I am calculating Gm.  Certainly Gm has some frequency dependence...you can factor that in when you pick the sine frequency. 

 

Offline promachTopic starter

  • Frequent Contributor
  • **
  • Posts: 875
  • Country: us
Re: Measuring transconductance of any circuit
« Reply #15 on: December 16, 2018, 01:52:00 am »
Quote
No.  I am calculating Gm.  Certainly Gm has some frequency dependence...you can factor that in when you pick the sine frequency.

Sorry, I still do not get why the capacitor is not included in the test circuit ?

Ideal Leq using gyrator implementation = CL*s/(Gm1*Gm2)

Are you saying that the sine frequency of the current source I1 helps to emulate a capacitor ?
« Last Edit: December 16, 2018, 01:56:07 am by promach »
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1133
  • Country: us
Re: Measuring transconductance of any circuit
« Reply #16 on: December 16, 2018, 02:14:57 am »
Quote
No.  I am calculating Gm.  Certainly Gm has some frequency dependence...you can factor that in when you pick the sine frequency.

Sorry, I still do not get why the capacitor is not included in the test circuit ?

Ideal Leq using gyrator implementation = CL*s/(Gm1*Gm2)

Are you saying that the sine frequency of the current source I1 helps to emulate a capacitor ?

In your equation...is Gm1 a function of the capacitor??

No, the sine is not emulating a capacitor.
 

Offline promachTopic starter

  • Frequent Contributor
  • **
  • Posts: 875
  • Country: us
Re: Measuring transconductance of any circuit
« Reply #17 on: December 16, 2018, 02:31:07 am »
Quote
In your equation...is Gm1 a function of the capacitor??

The answer is no. Gm1 is the overall transconductance of cmos inverter. Gm1 is independent of capacitor. Same applies to Gm2
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1133
  • Country: us
Re: Measuring transconductance of any circuit
« Reply #18 on: December 16, 2018, 02:33:40 am »
Quote
In your equation...is Gm1 a function of the capacitor??

The answer is no. Gm1 is the overall transconductance of cmos inverter. Gm1 is independent of capacitor. Same applies to Gm2

Great!  We are making progress.  That is why my method to calculate Gm has no reactive components.
« Last Edit: December 16, 2018, 01:45:58 pm by Wimberleytech »
 

Offline promachTopic starter

  • Frequent Contributor
  • **
  • Posts: 875
  • Country: us
Re: Measuring transconductance of any circuit
« Reply #19 on: December 16, 2018, 01:12:17 pm »
Quote
That is why my method to calculate Gm has on reactive components.

Investigate the Gm blocks separately as suggested by the forum title itself
This is my personal opinion as of now but please bear in mind that I could be wrong as well
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1133
  • Country: us
Re: Measuring transconductance of any circuit
« Reply #20 on: December 16, 2018, 01:20:38 pm »
Quote
That is why my method to calculate Gm has on reactive components.

Investigate the Gm blocks separately as suggested by the forum title itself
This is my personal opinion as of now but please bear in mind that I could be wrong as well

That is perfectly fine to do them separately.  What I have shown you, is a method to simulate and find the Gm of any block.  I have already shown you an example using the inverter.  Here is the diff stage.
 
The following users thanked this post: promach

Offline promachTopic starter

  • Frequent Contributor
  • **
  • Posts: 875
  • Country: us
Re: Measuring transconductance of any circuit
« Reply #21 on: December 16, 2018, 04:55:26 pm »
Why use voltage source for E1 (or E2) negative input terminal ?

Why use current source for E1 (or E2) positive input terminal ?
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1133
  • Country: us
Re: Measuring transconductance of any circuit
« Reply #22 on: December 16, 2018, 05:18:35 pm »
Why use voltage source for E1 (or E2) negative input terminal ?

Why use current source for E1 (or E2) positive input terminal ?

Does this help?
 
The following users thanked this post: promach

Offline promachTopic starter

  • Frequent Contributor
  • **
  • Posts: 875
  • Country: us
Re: Measuring transconductance of any circuit
« Reply #23 on: December 17, 2018, 01:27:29 am »
Sorry for my post here, but it "seems" like you are still not measuring the overall transconductance of a circuit block separately (and independently) without using any feedback circuit (which is the opamp or E1/E2 in your previous post).

I understand that you need to set up the DC operating point from the "feedback" test circuit to emulate the actual gyrator, but if that is the case , you "seems" to miss out the capacitor.

Please correct me if I am wrong in any ways.
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1133
  • Country: us
Re: Measuring transconductance of any circuit
« Reply #24 on: December 17, 2018, 02:36:43 am »
Sorry for my post here, but it "seems" like you are still not measuring the overall transconductance of a circuit block separately (and independently) without using any feedback circuit (which is the opamp or E1/E2 in your previous post).

I understand that you need to set up the DC operating point from the "feedback" test circuit to emulate the actual gyrator, but if that is the case , you "seems" to miss out the capacitor.

Please correct me if I am wrong in any ways.
I set up a Gm analysis test for EACH block (the inverter and the diffamp).  Your gyrator analysis requires these two Gms.  NO CAPACITOR.  The gyrator macro block has the capacitor.  The equations call out Gm1 and Gm2 and a capacitor, CL.

Gm1 does not depend on CL
Gm2 does not depend on CL

The gyrator which includes Gm1 and Gm2 and CL certainly depends on CL.

The feedback circuit I am using is a TEST CIRCUIT.  It is simply measuring the GM of the block (DUT) it is testing.  It has NOTHING to do with the gyrator function itself.  It is exactly the same as you measuring a resistor with a DVM so that you know what its value is to be used in another circuit.  the DVM is not the final circuit...it is the TEST circuit.  The final circuit is where the resistor is placed.

 
The following users thanked this post: promach


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf