# Capacitor

Linear capacitor in electrical systems

## Library

Electrical Elements

## Description

The Capacitor block models a linear capacitor, described with the following equation:

`$I=C\frac{dV}{dt}$`

where

 `I` Current `V` Voltage `C` Capacitance `t` Time

The Series resistance and Parallel conductance parameters represent small parasitic effects. The parallel conductance directly across the capacitor can be used to model dielectric losses, or equivalently leakage current per volt. The series resistance can be used to represent component effective series resistance (ESR) or connection resistance. Simulation of some circuits may require the presence of the small series resistance. For more information, see Modeling Best Practices.

Connections + and – are conserving electrical ports corresponding to the positive and negative terminals of the capacitor, respectively. The current is positive if it flows from positive to negative, and the voltage across the capacitor is equal to the difference between the voltage at the positive and the negative terminal, V(+) – V(–).

## Dialog Box and Parameters

### Parameters Tab

Capacitance

Capacitance, in farads. The default value is `1` µF.

Series resistance

Represents small parasitic effects. The series resistance can be used to represent component internal resistance. Simulation of some circuits may require the presence of the small series resistance. The default value is `1` µΩ.

Parallel conductance

Represents small parasitic effects. The parallel conductance directly across the capacitor can be used to model leakage current per volt. The default value is `0`.

### Variables Tab

Use the Variables tab in the block dialog box (or the Variables section in the block Property Inspector) 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.

## Ports

The block has the following ports:

`+`

Electrical conserving port associated with the capacitor positive terminal.

`-`

Electrical conserving port associated with the capacitor negative terminal.