idcappy
Extension module for python to calculate interdigital capacitor related things.
Install with pip
pip install idcappy
Install from source
Clone the repository and then in a terminal cd into \CapacitorCalculations\CapacitorCalculations and type
python setup.py install
Note: depending on your Python setup, you may need to replace python
with py
or python3
Documentation
This package includes functions which make calculating the capacitance for interdigital capacitors possible. From ref. (1) we can calculate the total capacitance of an interdigital capacitor on a substrate lying on a ground plane with a thin film of material grown on it with the following:
Where
and
The moduli,
Where
References
(1) Huey-Daw Wu, Zhihang Zhang, F. Barnes, C. M. Jackson, A. Kain and J. D. Cuchiaro, "Voltage tunable capacitors using high temperature superconductors and ferroelectrics," in IEEE Transactions on Applied Superconductivity, vol. 4, no. 3, pp. 156-160, Sept. 1994, doi: 10.1109/77.317831.
(2) S. S. Bedair and I. Wolff, "Fast, accurate and simple approximate analytic formulas for calculating the parameters of supported coplanar waveguides for (M)MIC's," in IEEE Transactions on Microwave Theory and Techniques, vol. 40, no. 1, pp. 41-48, Jan. 1992, doi: 10.1109/22.108321.
Example
import idcappy as icp
substrate_thickness = 500.0 # um
unit_cell = 20.0 # um
N = 50
finger_length = 1.0 # mm
epsr_silica = 3.9
film_thickness = 0.08 # um
epsr_film = 8.2
gap = 10.0 # um
k_air = icp.k_thick(gap, unit_cell)
k_sub = icp.k_thin(gap, substrate_thickness, unit_cell)
k_flm = icp.k_thin(gap, film_thickness, unit_cell)
cap_bare = icp.capacitance_bare_k(k_air, k_sub, N, finger_length, epsr_silica)
cap_total = icp.capacitance_total_k(k_air, k_sub, k_flm, epsr_film, N, finger_length, epsr_silica)
Functions
ellint_ratio(k: float) -> float
This is used to calculate comp_ellint1
from the cmath standard library. ellint_ratio_aprrox
.
k
: modulus
return:
ellint_inv_ratio(k: float) -> float
This is used to calculate comp_ellint1
from the cmath standard library.
k
: modulus
return:
ellint_ratio_approx(k: float) -> float
This is used to calculate
However, for very small
k
: modulus
return: small
k_thin(g: float, h: float, u: float) -> float
This is used to calculate the modulus g
, h
, and u
must be in the same length units, but this function doesn't care what units you use.
g
: the "gap distance"; i.e. the spacing between fingers.
h
: the height; i.e. the thickness of the material that is contributing to the function.
u
: the unit cell size; i.e. the spacing between fingers + the width of a finger.
return: modulus
k_thick(g: float, u: float) -> float
This is used to calculate the modulus g
and u
must have the same length units.
g
: the "gap distance"; i.e. the spacing between fingers.
u
: the unit cell size; i.e. the spacing between fingers + the width of a finger.
return: modulus
capacitance_bare(g: float, u: float, h_s: float, N: int, l: float, eps_s: float) -> float
This calculates the capacitance of an interdigital capacitor on a substrate of a single material based on the geometry of the capacitor and the substrate. g
, u
, and h_s
must have the same length units, while l
must be in mm.
g
: the "gap distance"; i.e. the spacing between fingers.
u
: the unit cell size; i.e. the spacing between fingers + the width of a finger.
h_s
: the thickness of the substrate.
N
: total number of fingers on the capacitor.
l
: length of a finger in mm.
eps_s
: relative dielectric constant
return: capacitance in pF
capacitance_bare_k(k_a: float, k_s: float, N: int, l: float, eps_s: float) -> float
This calculates the capacitance of an interdigital capacitor on a substrate of a single material based on the modulii l
must be in mm.
k_a
: modulus for air, calculated with k_thick()
k_s
: modulus for the substrate, calculated with k_thin()
N
: total number of fingers on the capacitor.
l
: length of a finger in mm.
eps_s
: relative dielectric constant
return: capacitance in pF
capacitance_geometric(g: float, h_f: float, u: float, N: int, l: float) -> float
Calculates a capacitance that is related to the geometry of the film. This aids in analyzing the films dielectric constant. g
, h_f
, and u
must have the same units.
g
: the "gap distance"; i.e. the spacing between fingers.
h_f
: the thickness of a thin film.
u
: the unit cell size; i.e. the spacing between fingers + the width of a finger.
N
: total number of fingers on the capacitor.
l
: length of a finger in mm.
return: capacitance in pF.
capacitance_geometric_k(k_f: float, N: int, l: float) -> float
Calculates the same as capacitance_geometric()
but takes
k_f
: modulus
N
: total number of fingers on the capacitor.
l
: length of a finger in mm.
return: capacitance in pF.
capacitance_total(g: float, h_f: float, eps_f: float, u: float, h_s: float, N: int, l: float, eps_s: float) -> float
Calculates the capacitance of an interdigtal capacitor on a substrate with a well characterized film grown on it. g
, h_f
, u
, and h_s
must all be in the same length units.
g
: the "gap distance"; i.e. the spacing between fingers.
h_f
: the thickness of a thin film.
eps_f
: the dielectric constant of the thin film.
u
: the unit cell size; i.e. the spacing between fingers + the width of a finger.
h_s
: the thickness of the substrate.
N
: total number of fingers on the capacitor.
l
: length of a finger in mm.
eps_s
: the dielectric constant of the substrate.
return: capacitance in pF.
capacitance_total_k(k_a: float, k_s: float, k_f: float, eps_f: float, h_s: float, N: int, l: float, eps_s: float) -> float
Calculates the capacitance of an interdigtal capacitor on a substrate with a well characterized film grown on it. This is the same as capacitance_total()
, except it uses the modulii instead of the geometric factors.
k_a
:
k_s
:
k_f
:
eps_f
: the dielectric constant of the thin film.
N
: total number of fingers on the capacitor.
l
: length of a finger in mm.
eps_s
: the dielectric constant of the substrate.
return: capacitance in pF.
dielectric_constant_relative(C_t: float, C_0: float, g: float, h_f: float, u: float, N: int, l: float) -> float
Calculate the dielectric constant of a thin film grown on an interdigital capacitor.
C_t
: measured total capacitance.
C_0
: measured capacitance before film was grown.
g
: the "gap distance"; i.e. the spacing between fingers.
h_f
: the thickness of a thin film.
u
: the unit cell size; i.e. the spacing between fingers + the width of a finger.
N
: total number of fingers on the capacitor.
l
: length of a finger in mm.
return:
dielectric_constant_relative_k(C_t: float, C_0: float, k_f: float, N: int, l: float) -> float
Calculate the dielectric constant of a thin film grown on an interdigital capacitor.
C_t
: measured total capacitance.
C_0
: measured capacitance before film was grown.
k_f
: modulus
N
: total number of fingers on the capacitor.
l
: length of a finger in mm.
return: