3.2  C: Capacitor

3.2.1  Syntax

Device

Cxxxxxxx n+ n– value
Cxxxxxxx n+ n– expression
Cxxxxxxx n+ n– value {IC=initial-voltage}
Cxxxxxxx n+ n– model {L=length} {W=width} {TEMP=temperature} {IC=initial-voltage}
.capacitor label n+ n– expression

Model (optional)

.model mname C {args}
.model mname TABLE {args}

3.2.2  Purpose

Capacitor, or general charge storage element.

3.2.3  Comments

N+ and n– are the positive and negative element nodes, respectively. Value is the capacitance in Farads.

The (optional) initial condition is the initial (time = 0) value of the capacitor voltage (in Volts). Note that the initial conditions (if any) apply only if the UIC option is specified on the transient command.

You may specify the value in any of these forms:
  1. A simple value. This is the capacitance in Farads.

  2. An expression, as described in the behavioral modeling chapter. The expression can specify the charge as a function of voltage, or the capacitance as a function of time.

  3. A model, as described in the behavioral modeling chapter. The table model describes a table of charge vs. voltage.

  4. A model, which calculates the capacitance as a function of length and width, referencing a .model statement of type C. This is compatible with the Spice-3 “semiconductor capacitor”.

3.2.4  C Model statement

A model statement may be used,, with model type C or Cap. The parameters are:
CJ = x
Junction bottom capacitance. (Farads / meter squared). (Default = 0.)

CJSW = x
Junction sidewall capacitance. (Farads / meter). (Default = 0.)

DEFW = x
Default width. (meters). (Default = 1e-6)

NARROW = x
Narrowing due to side etching. (meters). (Default = 0.)

TC1 = x
First order temperature coefficient. (Farads / degree C). (Default = 0.) (Not in Spice.)

TC2 = x
Second order temperature coefficient. (Farads / degree C squared). (Default = 0.) (Not in Spice.)

TNOM = x
Parameter measurement temperature. (degrees C.). (Default = 27.) (Not in Spice.)
Capacitance is computed by the formula:
capacitance = CJ * (L - NARROW) * (W - NARROW)
  + 2 * CJSW * (L + L - 2 * NARROW)
After the nominal value is calculated, it is adjusted for temperature by the formula:
value *= (1 + TC1 * (T-T0) + TC2 * (T-T0)^2)

3.2.5  Probes

The following probes (Transient, DC, and OP analysis) are available in addition to those available for all basic elements. See the print command for documentation.
DT
Time step. The internal time step used for this device for numerical integration. It is not necessarily the same as the global time step.

TIME
Time. The time of the most recent calculation of this device. It is not necessarily the same as the global time.

TIMEOLD
The time of the previous calculation of this device. It is not necessarily the same as the global time.

TIMEFUTURE
The latest recommended time for the next sample, as determined by this device. The actual time will probably be sooner than this.

DTREQUIRED
The required approximate maximum time step, usually based on truncation error estimation.

CHARGE
The charge stored in this capacitor, in Coulombs.

Q
The same as charge.

CAPACITANCE
The effective capacitance of this device. For a fixed capacitor, it be its value. For a nonlinear capacitor, it is the effective capacitance at this time, or ∂ q / ∂ v.

DCDT
The time derivative of capacitance. For a linear capacitor it will be zero.

DC
The change in capacitance compared to the previous sample. Its primary use is in debugging models and numerical problems. For a linear capacitor it will be zero.

DQDT
The time derivative of charge. Hopefully this is the same as current, but it is calculated a different way and can be used as an accuracy check.

DQ
The change in charge compared to the previous sample. Its primary use is in debugging models and numerical problems.