The CircuitAnalysis.jl module provides tools to assist in circuit analysis. The goal is to make the API simple, clear, and succinct.
The module includes:
- Dispatchable "value tag" wrapper objects to identify values, and simplify API.
- Unit conversion tools (V, I, W, V/V, I/I, W/W, dB, dBm, dBW).
NOTE: The API is not yet fully consistent.
TImpedance
{DATATYPE}
: Tags data as an impedance value (facilitates dispatch).TAdmittance
{DATATYPE}
: Tags data as an admittance value (facilitates dispatch).TInductance
{DATATYPE}
: Tags data as an inductance value (facilitates dispatch).TCapacitance
{DATATYPE}
: Tags data as an capacitance value (facilitates dispatch).
Value Tags
impedance
(::Number)
: Creates aTImpedance
tag to "type" the provided value.admittance
(::Number)
: Creates aTAdmittance
tag to "type" the provided value.inductance
(::Number)
: Creates aTInductance
tag to "type" the provided value.capacitance
(::Number)
: Creates aTCapacitance
tag to "type" the provided value.
impedance
(...)
: Computes element impedance & returnsTImpedance
tagged value.impedance(::TCapacitance; f=[::Number/Vector/...])
: ComputesZcap
@ givenf
.impedance(::TInductance; f=[::Number/Vector/...])
: ComputesZind
@ givenf
.admittance
(...)
: Computes element impedance & returnsTAdmittance
tagged value.admittance(::TCapacitance; f=[::Number/Vector/...])
: ComputesYcap
@ givenf
.admittance(::TInductance; f=[::Number/Vector/...])
: ComputesYind
@ givenf
.
dB20
(v)
: Returns20*log10(|v|)
.dB10
(v)
: Returns10*log10(v)
.dB
(v, u::Symbol)
, where u ∈ {:Wratio, :Vratio, :Iratio}dBm
(v, u::Symbol)
, where u ∈ {:W, :VRMS, :Vpk}dBW
(v, u::Symbol)
, where u ∈ {:W, :VRMS, :Vpk}Vpk
(v, u::Symbol, R=[RESVAL])
, where u ∈ {:W, :VRMS}Ipk
(v, u::Symbol, R=[RESVAL])
, where u ∈ {:W, :IRMS}VRMS
(v, u::Symbol, R=[RESVAL])
, where u ∈ {:W, :Vpk}IRMS
(v, u::Symbol, R=[RESVAL])
, where u ∈ {:W, :Ipk}
Examples of the CircuitAnalysis.jl capabilities can be found under the sample directory.
- Small library of functions.
Extensive compatibility testing of CircuitAnalysis.jl has not been performed. The module has been tested using the following environment(s):
- Linux / Julia-1.1.1 (64-bit)
The CircuitAnalysis.jl module is not yet mature. Expect significant changes.
This software is provided "as is", with no guarantee of correctness. Use at own risk.