Continue to Site

# How to make a capacitance variable with voltage in LTpice?

#### Flyback

##### Well-Known Member
Hi,
How to make a capacitance variable with voltage in LTpice?

You presumably do a .param {capacitance} = (V(aaa) - V(bbb)) * 10nF
?
But that doesnt work

#### Attachments

• variable cap.asc
679 bytes · Views: 56
The value of a parameter must be known before the simulation begins. A parameter can be .step'ped, but each step is a new simulation. You may find some happiness in defining a capacitor in terms of charge. Check the LTspice Help file.

C. Capacitor
There is also a general nonlinear capacitor available. Instead of specifying the capacitance, one writes an expression for the charge.
LTspice will compile this expression and symbolically differentiate it with respect to all the variables, finding the partial derivative's that correspond to capacitances.
Syntax: Cnnn n1 n2 Q=<expression> [ic=<value>] [m=<value>]
There is a special variable, x, that means the voltage across the device. Therefore, a 100pF constant capacitance can be written as
Cnnn n1 n2 Q=100p*x

If you want a real part there are a couple of "Varicap" diodes in the library > diode> type>Varactor.

All diodes have max capacitance at 0V and decrease with reverse voltage in a logarithmic fashion. Varactor diodes are more precisely controlled for this attribute and specified by the C ratio and value at two voltages.

A high resistor value is used for biasing and large C is used in series when used to block the DC.

Generally the bigger the current rating or smaller Rs, or bigger power rating, the bigger the C(0V) capacitance.

Hi,
How to make a capacitance variable with voltage in LTpice?

You presumably do a .param {capacitance} = (V(aaa) - V(bbb)) * 10nF
?
But that doesnt work
Specify Q=10n*X for the value attribute

Replies
2
Views
1K
Replies
19
Views
5K
Replies
11
Views
10K
Replies
1
Views
966
Replies
13
Views
5K