The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Modeling >> Behavioral Models >> charge conservation problem in capacitor model
https://designers-guide.org/forum/YaBB.pl?num=1257707985

Message started by applecore on Nov 8th, 2009, 11:19am

Title: charge conservation problem in capacitor model
Post by applecore on Nov 8th, 2009, 11:19am

I am puzzled by a charge conservation problem of capacitor, and tried a spectre simulation to solve it. What I did is to put an ideal capacitor and an ideal inductor in parallel, set an initial current in inductor, and ran a transient.  The tank oscillates, of cause, but with a decaying magnitude. Then I tried the code in

http://www.designers-guide.org/Modeling/varactors.pdf

by replacing the nonlinear q = c0∗v + c1∗v1∗ln(cosh((v – v0)/v1)); to a linear q=c0*v. It turns out that this model has the same result as the schematic view result. So I assume this model has same problem with the schematic model, NOT conserving charge. What is the solution then? How to model a charge conserving capacitor?

Thanks~~~~
Ji

Title: Re: charge conservation problem in capacitor model
Post by Ken Kundert on Nov 9th, 2009, 9:28am

For an explanation of what you are seeing, check out "4.2.2.3 Artificial Numerical Damping" starting on page 147 of "The Designer's Guide to Spice and Spectre" http://www.designers-guide.org/Books/dg-spice. To get rid of the effect, switch the transient integration method to trapezoidal (Spectre transient option 'method=traponly').

-Ken

Title: Re: charge conservation problem in capacitor model
Post by applecore on Nov 13th, 2009, 4:26pm

Dr. Kundert,
Thank you for the reply! I found my answer with your help! The voltage dependent capacitor (varactor) distributes energy to harmonicas, and the oscillation decades if no energy is injected to the tank (gm cell).


Regards,
Ji

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