User Tools

Site Tools


ltspice:variable_capacitor

Variable capacitor

Stan Zurek, Variable capacitor, Encyclopedia Magnetica, E-Magnetica.pl
Go to: LTspice.

Variable capacitance can be created by using the LTspice in-built variables for capacitors: $Q$ - electric charge (C), and $x$ - voltage across the capacitor (V).1)

"Linear" model (valid only for Vmax < V capacitor!)

LTspice directive with parameters:

.params LINEAR=1 C0=10n Csat=1n Vtra=10 Vth=15 Vmax=Vth+0.5*Vtra

And instead of the value of the capacitor use:

Q=x*{C0}-0.5*x**2*({C0}-{Csat})/{Vmax}

Non-linear tanh model

LTspice directive with parameters:

.params LINEAR=1 C0=10n Csat=1n Vtra=10 Vth=15 Vmax=Vth+0.5*Vtra

And instead of the value of the capacitor use:

Q=x*({C0+Csat})/2+({Csat-C0})/4*{Vtra}*ln(cosh((x-{Vth})*2/{Vtra}))
Definitions of variables for the non-linear tanh model2) Copyright © AnalogDialogue
* Helpful page? Support us!

All we need is just $0.25 per month. Come on… ;-)
Performance of the two models - note that the “linear” model fails if voltage on capacitor exceeds the Vmax parameter (arrow); decreasing current through the capacitors indicate their decreasing values with increased DC voltage (the AC component is the same, so for a fixed capacitor the AC component in the current would also be the same)

References

ltspice/variable_capacitor.txt · Last modified: 2021/08/18 10:44 by stan_zurek

Disclaimer: This website is provided only for educational purposes. In no event the providers can be held liable to any party for direct, indirect, special, incidental, or consequential damages arising out of the use of this information.
Privacy and cookie policy (GDPR, etc.)