The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Apr 16th, 2024, 2:18pm
Pages: 1
Send Topic Print
Why do derivatives in swept-dc get inaccurate for smaller stepsizes? (Read 3331 times)
exp
New Member
*
Offline



Posts: 9

Why do derivatives in swept-dc get inaccurate for smaller stepsizes?
Oct 03rd, 2016, 10:41pm
 
I would like to obtain linearity (IIP3) from swept dc analysis.
The circuit is a simple NMOS operated as a switch and nonlinearity is Ron nonlinearity.
Source has a voltage source with series resistance Rs and drain is grounded. Drain current is measured via ccvs.

The coefficients are obtained from

c1 = value(deriv(v("/vout")) 0)
c3 = value((deriv(deriv(deriv(v("/vout"))))/6) 0)

and IIP3 = dB10(4/3*abs(c1/c3))+10

Hoewever, contrary to common wisdom, results get worse when the stepsize is decreased. A closer look shows that the traces become noisier.

For an example, see attached deriv3.pdf which shows the noise trace with step size 10uV and the less noisier one with 100uV.

Why is this and how can it be avoided?

How can I get reliable and accurate c1/c3/IIP3 values from swept DC analysis?

Thank you!!
esp

Back to top
 
View Profile   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1998
Massachusetts, USA
Re: Why do derivatives in swept-dc get inaccurate for smaller stepsizes?
Reply #1 - Oct 4th, 2016, 9:46am
 
Have you tried changing the tolerances?

But you may be running into issues with numerical precision of computer arithmetic.
Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   IP Logged
exp
New Member
*
Offline



Posts: 9

Re: Why do derivatives in swept-dc get inaccurate for smaller stepsizes?
Reply #2 - Oct 4th, 2016, 9:55am
 
Hi,

Yes, tightened tolerances (reltol, iabstol, vabstol) and no difference.

I thought about numerical issues BUT: With stepsize=50uV? Can't be. And: In a swept DC, the different runs are indenepdent. Huge fluctuations do not make sense.

I tried it with both SpectreRF and AFS. Same!

I also found the problem becomes more pronounces if I add a series resistance to the nonlinear resistor (MOSFET). Makes no sense to me.

For better understanding: Here is the simple setup:





Back to top
 

circuit_004.png
View Profile   IP Logged
Ken Kundert
Global Moderator
*****
Offline



Posts: 2384
Silicon Valley
Re: Why do derivatives in swept-dc get inaccurate for smaller stepsizes?
Reply #3 - Oct 4th, 2016, 12:49pm
 
Fundamentally trying to take a triple derivative is a bad idea. The smallest errors get amplified, amplified, and then amplified again.

Find another way that does not involve triple derivatives.

-Ken
Back to top
 
 
View Profile WWW   IP Logged
exp
New Member
*
Offline



Posts: 9

Re: Why do derivatives in swept-dc get inaccurate for smaller stepsizes?
Reply #4 - Oct 4th, 2016, 1:08pm
 
Thanks, Ken!

So are you saying I should forget about obtaining linearity from swept-dc in the first place? (by definition, it involves tripe derivatives).

My issue is that qpss/shooting+qpac, qpss/hb+qpac, hb, ... all give me non-monotonic (and hence non trustworthy) IIP3 curves. Even after tightening all tolerances to the maximum with simplistic circuits. It may be the models (however, it is a PSP-like model, so the known VDS0->0 cannot be an issue) but I cannot change the models. That was the reason to go to a simple DC sweep first.

Do you have any other idea how to extract IIP3 if swept-dc, hb, shooting fails?
(tran+dft would be an option but it takes too long and much fine tuning)

Thank you!
exp
Back to top
 
 
View Profile   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.