Capacitor
Linear or nonlinear capacitor with optional tolerance, operational limits and
fault behavior
Description
The Capacitor block lets you model linear, nonlinear
(tablebased), and frequencydependent capacitors, including polar capacitors.
Optionally, you can also model the following effects:
You can turn these modeling options on and off independently of each other. When all
the additional options are turned off, the component behavior is identical to the
Simscape™ Foundation library Capacitor block.
In its simplest form, the Capacitor block models a
linear capacitor, described with the following equation:
where:
I is the current.
C is the capacitance.
V is the voltage.
t is the time.
To model a nonlinear or polar capacitor, set the Capacitance model
parameter to Lookup table
and provide a lookup
table of capacitancevoltage values:
For polar capacitors, where this lookup table is asymmetric with respect to
the applied terminal voltage, set the Symmetric CV table
parameter to No  use CV data
asis
.
For other types of nonlinear capacitor, ensure symmetry of the capacitance
with regards to the applied terminal voltage by setting the Symmetric
CV table parameter to Yes  use voltage magnitude
when computing C
.
To model a frequencydependent capacitor with resistive and dielectric losses, set the
Capacitance model parameter to Dielectric
relaxation
(Debye)
.
The Debye relaxation model considers a collection of noninteracting dipoles in the
frequency domain. The result is in terms of a complex permittivity. The real (𝜖′) and
imaginary (𝜖′′) parts of the complex permittivity are given by the equations:
where 𝜔 is the radial frequency, 𝜖_{∞} is the
real permittivity at very high frequency, 𝜖_{𝑠} is the real
permittivity at low frequency and 𝜏 is the relaxation time constant.
In the timedomain, the characteristic equation for a capacitor in the Debye model is
where 𝐶_{𝑠} is the lowfrequency capacitance,
𝛼 = 𝜖_{∞}/𝜖_{𝑠}, 𝑞 is the charge, 𝑖 is the
current and 𝑣 is the voltage across the capacitor.
Most datasheets do not provide explicit values for the complex permittivity nor for
the relaxation time; however, often the dissipation factor is provided at two
frequencies. The parameters 𝛼 and 𝜏 may be derived from these values as described by
the equations:
where 𝜔_{1} and 𝜔_{2} are
two different frequencies, and DF_{1} and
DF_{2} are the dissipation factors
calculated at said frequencies, respectively.
The argument of the square root must be positive for a valid parameterization in the
Debye model.
Tolerances
You can apply tolerances to the nominal value you provide for the
Capacitance parameter. Datasheets typically provide a
tolerance percentage for a given capacitor type. The table shows how the block
applies tolerances and calculates capacitance based on the selected
Tolerance application option.
Option  Capacitance Value 

None — use nominal
value
 C 
Random tolerance
 Uniform distribution: C · (1 –
tol + 2·
tol·
rand ) Gaussian distribution:
C · (1 + tol
· randn /
nSigma) 
Apply maximum tolerance
value
 C · (1 + tol
) 
Apply minimum tolerance
value
 C · (1 – tol
) 
In the table,
C is the Capacitance parameter
value, nominal capacitance.
tol is the fractional tolerance, Capacitance
tolerance (%) /100.
nSigma is the value you provide for the
Number of standard deviations for quoted tolerance
parameter.
rand
and randn
are standard
MATLAB^{®} functions for generating uniform and normal distribution
random numbers.
Note
If you choose the Random tolerance
option and you
are in "Fast Restart" mode, the random tolerance value is updated on every
simulation if at least one between the fractional tolerance,
tol, or the Number of standard deviations for
quoted tolerance, nSigma, is set to Runtime
and is defined with a variable (even if you do not modify that variable).
Operating Limits
You can specify operating limits in terms of maximum working voltage and the
maximum (instantaneous) power dissipation in the series resistance and in the
parallel conductance of the capacitor.
For polar capacitors, you can define the working voltage range in such a way that
the block provides a warning, or an error, if the polarity of the applied voltage
becomes incorrect.
When an operating limit is exceeded, the block can either generate a warning or
stop the simulation with an error. For more information, see Operating Limits.
Faults
Instantaneous changes in capacitor parameters are unphysical. Therefore, when the
Capacitor block enters the faulted state, the
capacitance, resistance, and conductance transition to their faulted values over a
period of time, according to the following formula:
CurrentValue =
FaultedValue – (
FaultedValue –
UnfaultedValue ) · sech
(∆t / τ)  (1) 
where:
The block can trigger the start of fault transition:
You can enable or disable these trigger mechanisms separately, or use them
together if more than one trigger mechanism is required in a simulation. When more
than one mechanism is enabled, the first mechanism to trigger the fault transition
takes precedence. In other words, component fails no more than once per simulation.
You can also choose whether to issue an assertion when a fault occurs, by using
the Reporting when a fault occurs parameter. The assertion can
take the form of a warning or an error. By default, the block does not issue an
assertion.
Variables
Use the Variables section of the block interface to set
the priority and initial target values for the block variables prior to
simulation. For more information, see Set Priority and Initial Target for Block Variables.
The Capacitor voltage variable lets you specify a
highpriority target for the initial capacitor voltage at the start of simulation.
Ports
Conserving
expand all
+
— Positive terminal
electrical
Electrical conserving port associated with the capacitor positive
voltage.

— Negative terminal
electrical
Electrical conserving port associated with the capacitor negative
voltage.
Parameters
expand all
Main
Capacitance model
— Capacitor type
Constant
(default)  Lookup table
 Dielectric relaxation (Debye)
Select the type of capacitor:
Constant
— Model a linear
capacitor, with nominal capacitance defined by the
Capacitance parameter value. This is
the default.
Lookup table
— Model a
nonlinear capacitor, where the nominal capacitance value changes
based on the value of applied terminal voltage.
Dielectric relaxation (Debye)
—Model a frequencydependent capacitor with resistive and
dielectric losses.
Capacitance
— Nominal capacitance
1e6
F
(default)
The nominal capacitance value for linear capacitor, or the
lowfrequency capacitance in the Debye parameterization.
Dependencies
This parameter is visible only when you select
Constant
or Dielectric
relaxation (Debye)
for the Capacitance
model parameter.
Capacitance values
— Vector of capacitance values
[1e05, 1e06]
F
(default)  positive vector
The vector of capacitance values, for table lookup based on the
corresponding voltage value. Capacitance values must be greater than 0.
The vector length must be the same as the voltage vector length.
Dependencies
This parameter is visible only when you select Lookup
table
for the Capacitance
model parameter.
Corresponding voltage values
— Input vector of voltage values
[0, 10]
V
(default)
The input vector of voltage values for tablebased capacitance
calculation. The vector length must be greater than or equal to 2, and
the values must be strictly monotonic, either increasing or
decreasing.
Dependencies
This parameter is visible only when you select Lookup
table
for the Capacitance
model parameter.
Symmetric CV table
— Table data
Yes  use voltage magnitude when
computing C
(default)  No  use CV data asis
Specify how to use the table data:
Yes  use voltage magnitude when computing
C
— Use this option to ensure symmetry
of the capacitance with regards to the applied terminal voltage.
This is the default.
No  use CV data asis
—
Use this option to model polar capacitors. For example, with
default parameter values for tablebased capacitance, applied
voltage of –10 V would produce nominal capacitance of 1e6 F.
However, if you select No  use CV data
asis
for the Symmetric CV
table parameter, the resulting capacitance value
is 1e5 F, because the block uses the nearest input value for
extrapolation.
Dependencies
This parameter is visible only when you select Lookup
table
for the Capacitance
model parameter.
Frequencies for specifying dissipation factors [f1 f2]
— Frequencies for dissipation factors calculation
[1, 10]
kHz
(default)
Frequencies at which the dissipation factors [DF1
DF2] are calculated, in kHz.
Dependencies
This parameter is visible only when you select
Dielectric relaxation (Debye)
for the
Capacitance model parameter.
Dissipation factors (%) at f1 and f2 [DF1 DF2]
— Dissipation factors at f1 and f2
[.8, 1.2]
(default)
Ratio between the equivalent series resistance and the capacitive
reactance, or the tangent of the loss angle. Dissipation factors are a
common metric for capacitors.
Dependencies
This parameter is visible only when you select
Dielectric relaxation (Debye)
for the
Capacitance model parameter.
Capacitance tolerance (%)
— Capacitor tolerance
5
(default)
The capacitor tolerance as defined on the manufacturer datasheet. For
tablebased capacitors, this tolerance is applied to the entire table at
once.
Tolerance application
— Tolerance application
None — use nominal
value
(default)  Random tolerance
 Apply maximum tolerance value
 Apply minimum tolerance value
Select how to apply tolerance during simulation:
None — use nominal value
— The block does not apply tolerance, uses the nominal
capacitance value. This is the default.
Random tolerance
— The block
applies random offset to the capacitance value, within the
tolerance value limit. You can choose Uniform or Gaussian
distribution for calculating the random number by using the
Tolerance distribution
parameter.
Apply maximum tolerance value
— The capacitance is increased by the specified tolerance
percent value.
Apply minimum tolerance value
— The capacitance is decreased by the specified tolerance
percent value.
Tolerance distribution
— Tolerance distribution type
Uniform
(default)  Gaussian
Select the distribution type:
Dependencies
This parameter is visible only when you select Random
tolerance
for the Tolerance
application parameter.
Number of standard deviations for quoted tolerance
— Number of standard deviations for quoted tolerance
4
(default)
Number of standard deviations for calculating the Gaussian random
number.
Dependencies
This parameter is visible only when you select
Gaussian
for the Tolerance
distribution parameter.
Series resistance
— Series resistance
1e6
Ohm
(default)
Simulation of some circuits may require the presence of the small
series resistance. Equivalent series resistance (ESR) is sometimes
specified on manufacturer datasheets. If not, you can define this
resistance for a linear capacitor via the dissipation factor (DF), which
is also shown on many datasheets. The relationship is DF
= 2π·
f
·
C
·
ESR
, where f
is signal
frequency. For a Debye capacitor, the Dissipation
factors (%) at f1 and f2 [DF1 DF2] are corrected for this
additional series resistance prior to computing 𝛼 and 𝜏.
Parallel conductance
— Parallel leakage path
0
1/Ohm
(default)
Parallel leakage path associated with the capacitor. For capacitors
connected in series, the presence of a small parallel conductance can
help with convergence.
Averaging period for power logging
— Averaging period for power logging
0
s
(default)
Averaging period for power logging, in s.
Note
If this parameter is set to 0
, the output is
the instantaneous power.
Dependencies
This parameter is visible only when you select
Dielectric relaxation (Debye)
for the
Capacitance model parameter.
Operating Limits
Enable operating limits
— Enable operating limits
No
(default)  Yes
Select Yes
to enable reporting when the operational
limits are exceeded. The associated parameters become visible on the
Operating Limits tab to let you select the
reporting method and specify the operating limits in terms of power and
working voltage.
Reporting if operating limits exceeded
— Report behavior
Warn
(default)  Error
Select what happens when an operating limit is exceeded:
Working voltage range
— Working voltage range
[25, 25]
V
(default)
Range of voltage values allowed for normal block operation, specified
as a vector of size 2.
Power rating
— Maximum instantaneous power dissipation
1
W
(default)
Maximum instantaneous power dissipation in the resistance and
conductance elements associated with the capacitor.
Faults
Enable faults
— Enable faults
No
(default)  Yes
Select Yes
to enable faults modeling. The
associated Faults parameters become visible to let
you select the reporting method and specify the trigger mechanism
(temporal or behavioral). You can enable these trigger mechanisms
separately or use them together. The default value is
No
.
Reporting when a fault occurs
— Report behavior
None
(default)  Warn
 Error
Choose whether to issue an assertion when a fault occurs:
None
— The block does not
issue an assertion. This is the default.
Warn
— The block issues a
warning.
Error
— Simulation stops
with an error.
Faulted capacitance as % of unfaulted
— Faulted capacitance as % of unfaulted
100
(default)
Relative change in the capacitance when the block is in the faulted
state, as compared to the unfaulted state. For tablebased capacitances,
the relative change is applied to all elements of the vector. The
default value is 100
, which means that the faulted
capacitance is equal to the unfaulted capacitance.
Faulted series resistance
— Faulted series resistance
1e3
Ohm
(default)
Equivalent series resistance of the capacitor when the block is in the
faulted state.
Faulted parallel conductance
— Faulted parallel conductance
0
(default) 
1/Ohm
Parallel leakage conductance of the capacitor when the block is in the
faulted state.
Fault transition time constant
— Fault transition time constant
1e3
s
(default)
Time constant associated with the transition to the faulted state, as
described in Faults.
Enable temporal fault trigger
— Timebased fault triggering
No
(default)  Yes
Select Yes
to enable timebased fault
triggering.
Simulation time for fault event
— Simulation time for fault event
1
s
(default)
Set the simulation time at which you want the block to start entering
the fault state.
Dependencies
This parameter is visible only when you select
Yes
for the Enable temporal fault
trigger parameter.
Enable behavioral fault trigger
— Behavioral fault triggering
No
(default)  Yes
Select Yes
to enable behavioral fault
triggering.
Permissible voltage range
— Minimum and maximum permissible voltage
[100, 100]
V
(default)
Specify the minimum and maximum permissible voltage. If the voltage
value is outside this range for longer than the Time to fail
when exceeding voltage range parameter value, then the
block starts entering the fault state.
Dependencies
This parameter is visible only when you select
Yes
for the Enable behavioral fault
trigger parameter.
Time to fail when exceeding voltage range
— Time to fail when exceeding voltage range
1
s
(default)
Set the maximum length of time that the voltage can be outside the
permissible voltage range without triggering the fault.
Dependencies
This parameter is visible only when you select
Yes
for the Enable behavioral fault
trigger parameter.
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.
Introduced in R2016a