Electronic – LTSpice capacitance dependend on voltage source

capacitanceltspicesimulationvoltage

I am looking for a way to change the value of a capacitance dependent on the voltage source of the circuit.

How do I create a voltage dependent capacitor in LT spice?

Edit:
Two capacitances in a row are connected to a voltage source. The voltage source has a defined slope of the voltage. One capacitance shall be dependend (nonlinear) on the current voltage that the voltage source outputs. Example:::: Voltage (Power supply)= 200V -> Capacitor_1 = 10uF :::: Voltage (Power supply)= 400V -> Capacitor_1 = 1uF

Best Answer

The behavioural elements include, besides the voltage and current, resistor, inductor, and capacitor. If you ran a quick search through the manual you would have found out quicker than it would have taken you to ask here: LTspice > Circuit Elements > C, bottom. Simply place a capacitor and add Q=<...> as the value. If the formula includes x, that signifies a derivative of the current, so your expression needs to be integrated first -- unless you don't need x, it can be done, for example external voltage, in your case.

So, for example, if you want your capacitance to vary according to \$\sin x\$, then you have to integrate that first, which gives you \$-cos x\$:

behcap

See the expression is -cos(x), whre x is the derivative of the current. The driving voltage is a unity ramp, which means the current through the capacitor is directly its value (I(C1)). The behavioural voltage is for confirmation, V(test), which shows the same sine. Here, for reasons of clarity, I avoided dividing by 2\$\pi\$, so that the current has a different amplitude; had I not, the current and the voltage would have overlapped and it would not have been clear.


Being a behavioural element, it is dependent on time and its effects, in LTspice, in addition to the derivative of the current you risk getting a lot of noise, so be careful what you wish for.