Simulation of a nonlinear capacitor

A linear capacitor coupled with a linear resistor never discharges completely.

The formula itself may go undefined once the time exceeds the discharge time, but that just tells you that you need to tack another formula on to it, piecewise, namely v = 0 for all t > (discharge time).

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

Do you need to implement control loops in software?
"Applied Control Theory for Embedded Systems" gives you just what it says.
See details at http://www.wescottdesign.com/actfes/actfes.html
Reply to
Tim Wescott
Loading thread data ...

View in a fixed-width font such as Courier.

. . . . . i . ->

. .----------. v= i x R . | ^ | . | | | d 3 . +| | | and i= - -- (3 x v ) . --- / dt . C --- v \\ R . | / 2 dv . | | \\ so v = -9 x R x v x -- . | | | dt . | | | . '----------. . . . 2 dv dv . this becomes v + 9 x R x v x -- = v x ( 1 + 9 x R x v x -- )=0 . dt dt . . at each instant of time because although C is nonlinear the basic . . . laws of physics still apply to the circuit. . . . The above equation has only two possible solutions: . . . 1) v(t)=0 for all t, which is ruled out because we need v(0)=1 . . -------------- . | 2 . 2) v(t)= | 1 - ----- x t . \\| 9 x R . . . . 9 x R dv . at time t= ----- v=0, the v x ( 1 + 9 x R x v x -- )=0 . 2 dt . . 9 x R . equation still applies where t is now measured from ----- . 2 . . and since v(0)=0 the v(t)=0 solution does . . dv . apply, and the 1 + 9 x R x v x -- = 0 solution leads to an . dt . . an imaginary and extraneous result. . . . All of this can be condensed into: . . . . ---------------------- . | 2 . v(t)= | MAX(0,1 - ----- x t) t>=0 . \\| 9 x R . .

Reply to
Fred Bloggs

Nice swat on some twit who clearly deserved it.

Reply to
JosephKK

While it is true that LTSpice supports it, i believe that it is generic to all spice v.3

Reply to
JosephKK

Haven't a clue if that is over OP's head or not, but now i know who to call when the math is getting tough for me.

Reply to
JosephKK

I get the same result, but have a problem that v is imaginary for times greater than 0.9 sec. I guess the way to interpret this is that this "capacitor" really discharges to 0 V in a finite time, and simply remains 0 thereafter.

Mark

Reply to
redbelly

Hello Mark,

When the capacitor is discharged by the resistor, its energy is changed to heat in the resistor. That means that all the energy is lost.

E = 1/2*C*V^2

After V has become 0, E will be 0:

0 = 1/2*C*V^2

-> V remains 0V after the discharge.

Best regards, Helmut

Reply to
Helmut Sennewald

"JosephKK" schrieb im Newsbeitrag news: snipped-for-privacy@4ax.com...

Hello,

A nice wish regarding SPICE3, but it's not available there! I have the feeling there isn't much activity around SPICE3 since a decade.

Helmut

Reply to
Helmut Sennewald

The current base version from Berkeley is v.3f5. The initial development of v.3 included all kinds of added non-linear components changes and a complete set of linear or non-linear dependant sources.

Reply to
JosephKK

"JosephKK" schrieb im Newsbeitrag news: snipped-for-privacy@4ax.com...

Hello Joseph,

SPICE 3f5 is from 1997.

formatting link

Do you have any link about a manual-page with an arbitrary capacitor model? I couldn't find one.

Best regards, Helmut

Reply to
Helmut Sennewald

It does not seem to be listed on the Berkeley SPICE models page:

formatting link

but with a pair of non-linear dependant sources is should be pretty easy to make a macro for one. In fact they provide an annotated subcircuit for a non-linear capacitor in the non-linear source description.

Reply to
JosephKK

Newsbeitragnews: snipped-for-privacy@c65g2000hsa.googlegroups.com...

Hello Helmut,

Much of what you say is also true of standard linear capacitors, which of course do not go to zero volts in a finite time.

After reviewing my derivation, I found that as V --> 0, the current becomes infinitely large, thereby draining all the charge. At V=0, the differential equation I had come up with is no longer valid, so I guess it makes sense in a way that the solution is not valid for times beyond when V reaches 0.

Regards, Mark

Reply to
redbelly

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.