The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Simulators >> Circuit Simulators >> AC simulation and deriv of DC
https://designers-guide.org/forum/YaBB.pl?num=1287738738

Message started by aaron_do on Oct 22nd, 2010, 2:12am

Title: AC simulation and deriv of DC
Post by aaron_do on Oct 22nd, 2010, 2:12am

Hi all,


I am doing some simple simulations on a transistor, where I the transistor is setup up with a DC voltage across the gate-source and a DC voltage across the drain source. VGS is set to 0.7 V, and I run a DC sweep with VDS going from 0 to 1 V. To find gds, I plot the derivative of the current coming out of the drain. After that, I applied a small signal to the drain on top of VDS, and to find gds, I simply plot the AC (0.1 Hz) current flowing out of the drain. However, I found that the two resutls are not quite equal when VDS is small. What is the reason for this? Shouldn't they be equal?

i.e. gds found from AC analysis is not equal to dIDS/dVDS.


thanks,
Aaron

Title: Re: AC simulation and deriv of DC
Post by Geoffrey_Coram on Oct 22nd, 2010, 5:16am

Probably your ac frequency is small enough that the capacitance isn't affecting you (you could check 0.01 Hz and see if you get the same answer as 0.1 Hz).

I was going to suggest that gds is not equal to dIDS/dVDS because of the resistors inside the MOS model (RD, RG, RS), but that's applies to gds as reported by the model, not the way you compute it.

How small is VDS?  How small are your sweep steps?  Have you considered how floating-point precision affects your answer?

Title: Re: AC simulation and deriv of DC
Post by aaron_do on Oct 22nd, 2010, 7:53am

thanks for the reply. I just used the automatic settings for the sweep steps. I'll try finer steps when I get the chance. VDS is swept from 0 to 1 V. I don't really follow you about the floating-point precision. Could you elaborate? I figure it has something to do with the additional capacitances in the AC model.


thanks,
Aaron

Title: Re: AC simulation and deriv of DC
Post by Geoffrey_Coram on Oct 25th, 2010, 11:09am

The usual formula for derivative is f(x2)-f(x1)/(x2 - x1)

Suppose you took a step of 1pV, so that at the end of the sweep, x2 = 1V and x1 = 1V - 1pV.  Now, what do you get when you compute x2-x1?  It might not be exactly 1.000000000 pV.

Title: Re: AC simulation and deriv of DC
Post by Geoffrey_Coram on Oct 25th, 2010, 11:09am

Another thing, depending on your simulator: do you have a BYPASS option?  Spice3f5 has it, and what happens is the model code says, hey, the voltage you're asking for is "close enough" to the voltage I just evaluated at, so I'll just give you that answer again.

Title: Re: AC simulation and deriv of DC
Post by aaron_do on Oct 25th, 2010, 6:57pm

Hi,


thanks for all the help. I see what you mean by the precision of the simulation.

Finally had the chance to redo the simulations. As you say, it was the sweep step settings. When I increased the number of steps, the results were much closer.


thanks,
Aaron

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