ltspice:variable_capacitor
Table of Contents
Variable capacitor
Stan Zurek, Variable capacitor, Encyclopedia Magnetica, E-Magnetica.pl |
![]() |
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! → → → | PayPal | ← ← ← Help us with just $0.10 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)

S. Zurek, E-Magnetica.pl, CC-BY-4.0
References
ltspice/variable_capacitor.txt · Last modified: 2023/06/17 22:22 by 127.0.0.1