The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Simulators >> Circuit Simulators >> Computing Total Charge on a Node
https://designers-guide.org/forum/YaBB.pl?num=1172655940

Message started by alak323 on Feb 28th, 2007, 1:45am

Title: Computing Total Charge on a Node
Post by alak323 on Feb 28th, 2007, 1:45am

Is there a way to compute the total charge on a node using Spectre ?

An example (for the need) is a switched-capacitor system where one would be interested in the total charge on the virtual ground node (to verify that the total charge on the virtual ground node is indeed preserved through the various phases of operation of the switched-cap amplifier)

Title: Re: Computing Total Charge on a Node
Post by Geoffrey_Coram on Feb 28th, 2007, 4:25am

Some Spice simulators have a CAPTAB option that allows you to print the total capacitance on a node.  You could then multiply that by the voltage (q=CV) ... but I guess that only works if your capacitance is mainly linear.  It's probably non-linear enough that you wouldn't be able to properly verify charge conservation.

Title: Re: Computing Total Charge on a Node
Post by Croaker on Mar 19th, 2007, 11:11am

Does Spectre allow you to see capacitance at a node?  (I know you can see things like Cgs, Cds by checking the operating point.)

Title: Re: Computing Total Charge on a Node
Post by Andrew Beckett on Mar 19th, 2007, 3:22pm

Spectre's info analysis can output a captab. From spectre -h info:


Code:
1       what=oppoint      What parameters should be printed.  Possible values
                         are none, inst, models, input, output, nodes, all,
                         terminals, oppoint, captab, parameters, primitives,
                         subckts, assert, or allparameters.
...
Captab parameters
9       detail=node       How detailed should the capacitance table be.
                         Possible values are node, nodetoground or
                         nodetonode.
10      sort=name         How to sort the capacitance table.  Possible values
                         are name or value.
11      threshold=0 F     Threshold value for printing capacitances (ignore
                         capacitances smaller than this value).


So:


Code:
captab info what=captab where=file


In ADE, you can access this from the Options form on the DC analysis. There's a checkbox labelled "captab", and when enabled you can then set the other parameters listed above. Enable the DC operating point, and run the simulation. Some output appears in the log, but you can also do Results->Print->Capacitance Table afterwards.

Regards,

Andrew.


in your netlist would do it. There's also

Title: Re: Computing Total Charge on a Node
Post by Croaker on Mar 20th, 2007, 5:46am

This note seems like it got cut off.  Either way, it's helpful!  :)

Title: Re: Computing Total Charge on a Node
Post by Croaker on Mar 20th, 2007, 10:51am

Hmm, I see the captab stuff in the output log but the option results->print->capacitance table is greyed out?  Is there some setting I may be missing?

Title: Re: Computing Total Charge on a Node
Post by Croaker on Apr 5th, 2007, 11:23am

Hi, I read through the Spectre manual but am still a little confused as to how the CAPTAB feature works.  I made an inverter.  The results showed that the output node had 0 capacitance.  This is confusing...why is it zero?  However, it also reported that NM0:int_d and PM0:int_d had caps of 0.75 f and 0.91f, respectively.  Can I sum these to get the output node capacitance?

Thanks for the help!


Title: Re: Computing Total Charge on a Node
Post by Geoffrey_Coram on Apr 6th, 2007, 3:33am

int_d tells me that there is a drain resistor between the output node and the channels of the MOS devices.  I think this is a fundamental limitation of the CAPTAP approach: it only counts capacitance connected directly to the node, and doesn't take into account even a huge capacitor on the other side of a small resistor.

You could, of course, manually add up the capacitances you know are "connected" but that assumes that you know whether to use Cdg or Cgd and to include the junction and overlap capacitances.

The other approach would be to attach an ac current source to the output node and measure the ac voltage on the node.  Then, use
 I = (G + jC) V
to solve for the effective capacitance.

Title: Re: Computing Total Charge on a Node
Post by Croaker on Apr 6th, 2007, 6:49am

So int_d is the drain capacitance, but because the drain area has some resistance, this drain capacitance will not appear in the output node capacitance result?


Title: Re: Computing Total Charge on a Node
Post by Geoffrey_Coram on Apr 6th, 2007, 12:21pm

int_d is the "internal drain node" of the MOS model.  The value in the CAPTAB for that node should be the sum of all the capacitances (channel, overlap, junction) of the MOS.  CAPTAB only ever reports capacitances directly connected to a node (it probably reports the diagonal matrix elements of the capacitance matrix).

You can get a similar result by testing this circuit:

r1 (s 0) resistor r=1k
rs (s sint) resistor r=0.5
cs (sint 0) capacitor c=1n
rch (sint dint) resistor r=20
cd (dint 0) capacitor c=1n
rd (dint output) resistor r=0.1

The captab should show capacitances (of 1nF) on sint and dint, but nothing on output.

Title: Re: Computing Total Charge on a Node
Post by Croaker on Apr 6th, 2007, 6:23pm

Thanks, that was helpful!  

:)

The Designer's Guide Community Forum » Powered by YaBB 2.2.2!
YaBB © 2000-2008. All Rights Reserved.