(C) Capacitor Statement
Capacitors in PLECS Spice support initial conditions, temperature dependence, and parasitic series/parallel resistances. Furthermore, nonlinear capacitors with user-defined charge functions are supported.
Linear Capacitor
Cname pos neg capacitance <IC=ic> <TC1=tc1> <TC2=tc2> <TEMP=temp> <M=m>
Cname pos neg modelName <capacitance> <L=l> <W=w> <IC=ic> <TC1=tc1> <TC2=tc2> <TEMP=temp> <M=m>
.MODEL modelName C <NAME=value ...>
Cname pos neg capacitance <IC=ic> <TC=tc1<,tc2>> <TEMP=temp> <M=m>
Cname pos neg modelName <capacitance> <L=l> <W=w> <IC=ic> <TC=tc1<,tc2>> <TEMP=temp> <M=m>
Cname pos neg <capacitance> modelName <L=l> <W=w> <IC=ic> <TC=tc1<,tc2>> <TEMP=temp> <M=m>
.MODEL modelName C <NAME=value ...>
The TC instance parameter is followed by one or two temperature coefficients. Internally, we map these values onto TC1 and TC2.
The device type
Cmust be specified in the model statement.The capacitance can also be set as the model parameter
CAP. If it’s defined in both the model and the instance, the instance value is used.You can customize this model by providing a list of model parameter (name-value format) at the end of the .MODEL statement.
Instance Parameters
Parameter |
Description |
Default Value |
|---|---|---|
IC |
Initial voltage across the capacitor |
none |
TC1 |
Temperature coefficient for CAP (first order correction) |
\(0\,^\circ\text{C}^{-1}\) |
TC2 |
Temperature coefficient for CAP (second order correction) |
\(0\,^\circ\text{C}^{-2}\) |
TEMP |
Device temperature |
\(27\,^\circ\text{C}\) |
M |
Number of parallel devices |
\(1\) |
L |
Length of the semiconductor capacitor |
\(0\, \text{m}\) |
W |
Width of the semiconductor capacitor |
DEFW |
The default value for
Lis not permitted. Thus, a nonzero value must be set either in the instance statement or as a model parameter.
Model Parameters
Parameter |
Description |
Default Value |
|---|---|---|
T_ABS |
Device temperature |
\(27\,^\circ\text{C}\) |
CAP |
Capacitance |
\(0\, \text{F}\) |
CJ |
Bottom junction capacitance |
\(0\, \text{F}/\text{m}^2\) |
CJSW |
Sidewall junction capacitance |
\(0\, \text{F}/\text{m}\) |
DEFW |
Default width of the semiconductor capacitor |
\(10^{-6}\, \text{m}\) |
NARROW |
Narrowing due to the etching process |
\(0\, \text{m}\) |
You can specify the instance parameters
TC1,TC2,L, andWas model parameters too. If both are provided, the instance values take priority.The instance parameter
TEMPoverwrites the model parameterT_ABS.When the capacitance is specified either in the instance statement or through the parameter
CAP, the parametersL,W,CJ,CJSW,DEFW, andNARROWare ignored.The parameters
CAP,CJ, andCJSWare temperature-corrected usingTC1andTC2.
Linear Capacitor with Parasitic Elements
PLECS Spice supports a model of a linear capacitor with equivalent series resistance (RSER) and an additional resistance (RPAR) connected in parallel with the series combination of the ideal capacitor and the series resistor.
Cname pos neg capacitance <M=m> <RSER=rser> <RPAR=rpar>
Cname pos neg modelName <capacitance> <L=l> <W=w> <TC1=tc1> <TC2=tc2> <TEMP=temp> <M=m> <RSER=rser> <RPAR=rpar>
Cname pos neg modelName <capacitance> <L=l> <W=w> <TC=tc1<,tc2>> <TEMP=temp> <M=m> <RSER=rser> <RPAR=rpar>
.MODEL modelName C <NAME=value ...>
We support all the instance and model parameters defined above with the exception of IC.
Instance Parameters
Parameter |
Description |
Default Value |
|---|---|---|
M |
Number of parallel devices |
\(1\) |
RSER |
Series resistance |
\(0\,\Omega\) |
RPAR |
Parallel resistance |
\(+\infty\,\Omega\) |
Note
Initial conditions are not supported for linear capacitors with parasitic elements.
Charge-based Capacitor
Cname pos neg Q={function body}
Cname pos neg Q=function body
Cname pos neg Q={5*x}; Equivalent to: Cname pos neg Q={5*V(pos,neg)}
If exactly one
=is included, everything to the right of=is treated as function body.Unless defined as parameter,
xis replaced by the voltage across the capacitor.
Examples
Csnub n1 n2 100n
Cesr n3 n4 10u RSER=0.01
Cvar n5 n6 Q={1e-9*V(n5,n6)*(1+0.1*V(n5,n6)^2)}