The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Apr 24th, 2024, 7:06pm
Pages: 1
Send Topic Print
Use of ddx in Verilog-A (Read 49 times)
Sitansu
New Member
*
Offline



Posts: 5

Use of ddx in Verilog-A
Apr 27th, 2016, 10:57pm
 
In my model, charge of a nonlinear capacitor is given as Q=f(V2,V3)*Vc where V2, V3 are terminal or bias voltages and Vc is the voltage across capacitor. Current through capacitor can be given as I=ddt(Q). Can I also write I=ddx(Q,V2)*ddt(V2)+ddx(Q,V3)*ddt(V3)+f(V2,V3)*ddt(Vc)?
Whenever I am replacing 1st expression by the second expression, my AC results matches but transient result do not match. Is it wrong to use ddx or is there any restriction in verilog-a for using ddx?
Back to top
 
 
View Profile   IP Logged
Ken Kundert
Global Moderator
*****
Offline



Posts: 2384
Silicon Valley
Re: Use of ddx in Verilog-A
Reply #1 - Apr 28th, 2016, 11:32am
 
Your equations are correct in a differential equation sense, but they are inaccurate in a finite-difference sense. Transient analysis uses finite-differences to approximate derivatives. Your second equation is only approximate when using finite differences. You should not use it.

Also, I suspect that first equation is also wrong. It is certainly wrong if you believe f represents the capacitance. I recommend that you read Modeling Varactors.

-Ken
Back to top
 
« Last Edit: Apr 30th, 2016, 1:36am by Ken Kundert »  
View Profile WWW   IP Logged
Sitansu
New Member
*
Offline



Posts: 5

Re: Use of ddx in Verilog-A
Reply #2 - Apr 28th, 2016, 9:47pm
 
Thank you Ken,

I might have written Q=c*V here, but in verilog I am not writing it as I=c*ddt(V). I always use I=ddt(Q). So in reality there is nothing like C in my equation. I just use the word capacitor for easy communication.
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.