Skip to content

Closed-form networks ​

The parameters of standard networks in closed form: transmission lines, series and shunt elements, T and Π sections, attenuators, couplers, circulators, terminations and coupled lines, with the conversions between the even and odd, Maxwell and mutual descriptions of coupled lines. A network whose element values, an impedance, an admittance or an electrical length, are arrays over frequency gives one matrix per frequency, along the dimensions after the first two.

See network parameters to convert them and connections to join them, or the API overview for other topics.

JosephsonCircuits.CoupledLinesBasis Type
julia
CoupledLinesBasis(ZC, TI, TV, theta, U, lambda, S)

A simple structure to hold the output of ZC_basis_coupled_tlines.

source
JosephsonCircuits.ABCD_PiY! Method
julia
ABCD_PiY!(ABCD,Y1,Y2,Y3)

In-place version of ABCD_PiY.

Examples

julia
julia> JosephsonCircuits.ABCD_PiY!(zeros(Complex{Float64},2,2),1,2,4)
2×2 Matrix{ComplexF64}:
 1.5+0.0im  0.25+0.0im
 3.5+0.0im  1.25+0.0im
source
JosephsonCircuits.ABCD_PiY Method
julia
ABCD_PiY(Y1,Y2,Y3)

Return the ABCD matrix for a Pi network of admittances Y1, Y2, and Y3.

julia
o----Y3-----o
   |     |   
   Y1    Y2  
   |     |   
o-----------o

Examples

julia
julia> JosephsonCircuits.ABCD_PiY(1.0+0.0im,2.0+0.0im,4.0+0.0im)
2×2 Matrix{ComplexF64}:
 1.5+0.0im  0.25-0.0im
 3.5+0.0im  1.25+0.0im
source
JosephsonCircuits.ABCD_TZ! Method
julia
ABCD_TZ!(ABCD,Z1,Z2,Z3)

In-place version of ABCD_TZ.

Examples

julia
julia> JosephsonCircuits.ABCD_TZ!(ones(Complex{Float64},2,2),1,2,4)
2×2 Matrix{ComplexF64}:
 1.25+0.0im  3.5+0.0im
 0.25+0.0im  1.5+0.0im
source
JosephsonCircuits.ABCD_TZ Method
julia
ABCD_TZ(Z1,Z2,Z3)

Return the ABCD matrix for a T network of impedances Z1, Z2, and Z3.

julia
o--Z1-----Z2--o
       |       
      Z3       
       |       
o-------------o

Examples

julia
julia> JosephsonCircuits.ABCD_TZ(1.0+0.0im,2.0+0.0im,4.0+0.0im)
2×2 Matrix{ComplexF64}:
 1.25+0.0im  3.5+0.0im
 0.25-0.0im  1.5+0.0im
source
JosephsonCircuits.ABCD_attenuator_Pi! Method
julia
ABCD_attenuator_Pi!(ABCD, Zsource, Zload, attenuationdB)

In-place version of ABCD_attenuator_Pi.

Examples

julia
julia> ABCD = zeros(Float64,2,2);JosephsonCircuits.ABCD_attenuator_Pi!(ABCD,50.0,50.0,10.0)
2×2 Matrix{Float64}:
 1.73925    71.1512
 0.0284605   1.73925
source
JosephsonCircuits.ABCD_attenuator_Pi! Method
julia
ABCD_attenuator_Pi!(ABCD, Z0, attenuationdB)

In-place version of ABCD_attenuator_Pi.

Examples

julia
julia> ABCD = zeros(Float64,2,2);JosephsonCircuits.ABCD_attenuator_Pi!(ABCD,50.0,10.0)
2×2 Matrix{Float64}:
 1.73925    71.1512
 0.0284605   1.73925
source
JosephsonCircuits.ABCD_attenuator_Pi Method
julia
ABCD_attenuator_Pi(Zsource, Zload, attenuationdB)

Return the ABCD matrix for an attenuator with input impedance Zsource, output impedance Zload, and attenuation attenuationdB made with a Pi network of impedances Rx, Ry, and Rz.

julia
o----Rz-----o
   |     |   
   Rx    Ry  
   |     |   
o-----------o

A T and a Pi attenuator between the same impedances are the same two-port, so this is also the matrix of ABCD_attenuator_T, which gives it and its minimum attenuation.

Examples

julia
julia> JosephsonCircuits.ABCD_attenuator_Pi(50.0,50.0,10.0)
2×2 Matrix{Float64}:
 1.73925    71.1512
 0.0284605   1.73925
source
JosephsonCircuits.ABCD_attenuator_Pi Method
julia
ABCD_attenuator_Pi(Z0, attenuationdB)

Return the ABCD matrix for an attenuator with input and output impedance Z0 and attenuation attenuationdB made with a Pi network of impedances Rx, Ry, and Rz.

julia
o----Rz-----o
   |     |   
   Rx    Ry  
   |     |   
o-----------o

A T and a Pi attenuator between the same impedances are the same two-port, so this is also the matrix of ABCD_attenuator_T, which gives it and what a negative attenuation gives.

Examples

julia
julia> JosephsonCircuits.ABCD_attenuator_Pi(50.0,10.0)
2×2 Matrix{Float64}:
 1.73925    71.1512
 0.0284605   1.73925
source
JosephsonCircuits.ABCD_attenuator_T! Method
julia
ABCD_attenuator_T!(ABCD, Zsource, Zload, attenuationdB)

In-place version of ABCD_attenuator_T.

Examples

julia
julia> ABCD = zeros(Float64,2,2);JosephsonCircuits.ABCD_attenuator_T!(ABCD, 50.0, 50.0, 10.0)
2×2 Matrix{Float64}:
 1.73925    71.1512
 0.0284605   1.73925
source
JosephsonCircuits.ABCD_attenuator_T! Method
julia
ABCD_attenuator_T!(ABCD, Z0, attenuationdB)

In-place version of ABCD_attenuator_T.

Examples

julia
julia> ABCD = zeros(Float64,2,2);JosephsonCircuits.ABCD_attenuator_T!(ABCD, 50.0, 10.0)
2×2 Matrix{Float64}:
 1.73925    71.1512
 0.0284605   1.73925
source
JosephsonCircuits.ABCD_attenuator_T Method
julia
ABCD_attenuator_T(Zsource, Zload, attenuationdB)

Return the ABCD matrix for an attenuator with input impedance Zsource, output impedance Zload, and attenuation attenuationdB made with a T network of impedances Ra, Rb, and Rc.

julia
o--Ra-----Rb--o
       |       
       Rc       
       |       
o-------------o

An attenuator between unequal impedances has a minimum attenuation, 20*log10(sqrt(rho-1)+sqrt(rho)) dB with rho the ratio of the larger impedance to the smaller, below which it would need negative resistances; a smaller attenuationdB throws an ArgumentError. A T and a Pi attenuator between the same impedances are the same two-port, so this is also the matrix of ABCD_attenuator_Pi. With A the voltage attenuation 10^(-attenuationdB/20), c = (1+A^2)/(2A) and s = (1-A^2)/(2A), it is [sqrt(Zsource/Zload)*c sqrt(Zsource*Zload)*s; s/sqrt(Zsource*Zload) sqrt(Zload/Zsource)*c].

Examples

julia
julia> JosephsonCircuits.ABCD_attenuator_T(50.0,50.0,10.0)
2×2 Matrix{Float64}:
 1.73925    71.1512
 0.0284605   1.73925
source
JosephsonCircuits.ABCD_attenuator_T Method
julia
ABCD_attenuator_T(Z0, attenuationdB)

Return the ABCD matrix for an attenuator with input and output impedance Z0 and attenuation attenuationdB made with a T network of impedances Ra, Rb, and Rc.

julia
o--Ra-----Rb--o
       |       
       Rc       
       |       
o-------------o

A T and a Pi attenuator between the same impedances are the same two-port, so this is also the matrix of ABCD_attenuator_Pi. With A the voltage attenuation 10^(-attenuationdB/20), it is [c Z0*s; s/Z0 c] with c = (1+A^2)/(2A) and s = (1-A^2)/(2A), the identity at zero attenuation. A negative attenuationdB is accepted: it gives the matched two-port of that gain, of the same form but not passive. The forms between a source and a load impedance refuse an attenuation below the least a passive network between them has, which between equal impedances is zero.

Examples

julia
julia> JosephsonCircuits.ABCD_attenuator_T(50.0,10.0)
2×2 Matrix{Float64}:
 1.73925    71.1512
 0.0284605   1.73925
source
JosephsonCircuits.ABCD_coupled_tline! Method
julia
ABCD_coupled_tline!(A, Z0e, Z0o, thetae, thetao)

In-place version of ABCD_coupled_tline.

Examples

julia
julia> JosephsonCircuits.ABCD_coupled_tline!(zeros(Complex{Float64},4,4),50,50,pi/4,pi/4)
4×4 Matrix{ComplexF64}:
 0.707107+0.0im             0.0+0.0im        …       0.0+0.0im
      0.0+0.0im        0.707107+0.0im                0.0+35.3553im
      0.0+0.0141421im       0.0+0.0im                0.0+0.0im
      0.0+0.0im             0.0+0.0141421im     0.707107+0.0im
source
JosephsonCircuits.ABCD_coupled_tline Method
julia
ABCD_coupled_tline(Z0e, Z0o, thetae, thetao)

Return the ABCD matrix for two coupled transmission lines described by even and odd mode phase delays thetae and thetao, and even and odd mode impedances Z0e and Z0o.

julia
thetae, Z0e
thetao, Z0o

V1, I1 -->  ======== <-- I3, V3
V2, I2 -->  ======== <-- I4, V4

[(V1+V2)/2, (I1+I2)/2] = ABCDe * [(V3+V4)/2, -(I3+I4)/2]
[(V1-V2)/2, (I1-I2)/2] = ABCDo * [(V3-V4)/2, -(I3-I4)/2]

[V1, V2, I1, I2] = ABCD_coupled_tline * [V3, V4, -I3, -I4]

Examples

julia
julia> JosephsonCircuits.ABCD_coupled_tline(50,50,pi/4,pi/4)
4×4 Matrix{ComplexF64}:
 0.707107+0.0im             0.0+0.0im        …       0.0+0.0im
      0.0+0.0im        0.707107+0.0im                0.0+35.3553im
      0.0+0.0141421im       0.0+0.0im                0.0+0.0im
      0.0+0.0im             0.0+0.0141421im     0.707107+0.0im
source
JosephsonCircuits.ABCD_seriesZ! Method
julia
ABCD_seriesZ!(ABCD,Z1)

In-place version of ABCD_seriesZ.

Examples

julia
julia> JosephsonCircuits.ABCD_seriesZ!(zeros(Complex{Float64},2,2),50)
2×2 Matrix{ComplexF64}:
 1.0+0.0im  50.0+0.0im
 0.0+0.0im   1.0+0.0im
source
JosephsonCircuits.ABCD_seriesZ Method
julia
ABCD_seriesZ(Z1)

Return the ABCD matrix for a series impedance Z1.

julia
o---Z1---o
          
          
o--------o

Examples

julia
julia> JosephsonCircuits.ABCD_seriesZ(50.0+0.0im)
2×2 Matrix{ComplexF64}:
 1.0+0.0im  50.0+0.0im
 0.0+0.0im   1.0+0.0im
source
JosephsonCircuits.ABCD_shuntY! Method
julia
ABCD_shuntY!(ABCD,Y1)

In-place version of ABCD_shuntY.

Examples

julia
julia> JosephsonCircuits.ABCD_shuntY!(zeros(Complex{Float64},2,2),1/50)
2×2 Matrix{ComplexF64}:
  1.0+0.0im  0.0+0.0im
 0.02+0.0im  1.0+0.0im
source
JosephsonCircuits.ABCD_shuntY Method
julia
ABCD_shuntY(Y1)

Return the ABCD matrix for a shunt admittance Y1.

julia
o---------o
     |
     Y1
     |
o---------o

Examples

julia
julia> JosephsonCircuits.ABCD_shuntY(1/(50.0+0.0im))
2×2 Matrix{ComplexF64}:
  1.0+0.0im  0.0+0.0im
 0.02-0.0im  1.0+0.0im
source
JosephsonCircuits.ABCD_tline! Method
julia
ABCD_tline!(ABCD, Z0, theta)

In-place version of ABCD_tline.

Examples

julia
julia> JosephsonCircuits.ABCD_tline!(ones(Complex{Float64},2,2),50, pi/4)
2×2 Matrix{ComplexF64}:
 0.707107+0.0im             0.0+35.3553im
      0.0+0.0141421im  0.707107+0.0im
source
JosephsonCircuits.ABCD_tline Method
julia
ABCD_tline(Z0, theta)

Return the ABCD matrix for a transmission line described by phase delay theta in radians and characteristic impedance Z0 in Ohms.

julia
   theta, Z0  
o--========--o
              
              
o------------o

Examples

julia
julia> JosephsonCircuits.ABCD_tline(50, pi/4)
2×2 Matrix{ComplexF64}:
 0.707107+0.0im             0.0+35.3553im
      0.0+0.0141421im  0.707107+0.0im
source
JosephsonCircuits.A_coupled_tlines Method
julia
A_coupled_tlines(L,Cmaxwell,l,omega)

Returns the 2mx2m chain (ABCD) matrix for a port number symmetric multi-port network of m coupled transmission lines described by a symmetric mxm Maxwell inductance (per unit length) matrix L, a symmetric mxm Maxwell capacitance matrix (per unit length) Cmaxwell, a physical length l, and an angular frequency omega. For an array of angular frequencies omega, of any length, it returns a 2mx2mxn array of the chain matrices along its third dimension, as the other per frequency networks do.

julia
V_1, I_1 -->  ======== <-- I_{m+1}, V_{m+1}
V_2, I_2 -->  ======== <-- I_{m+2}, V_{m+2}
          .
          .
          .
V_m, I_m -->  ======== <-- I_n, V_n
              <---l-->

where n=2*m.

[V_1, ...V_m, I_1, ...I_m] = A_coupled_tlines * [V_{m+1}, ...V_n, -I_{m+1}, ...-I_n]

Examples

julia
Zeven = 51.0
Zodd = 49.0
neven = 1.1
nodd = 1.08
l = 3.5e-3
c = JosephsonCircuits.speed_of_light
omega = 2*pi*5e9

L, C = JosephsonCircuits.even_odd_to_maxwell(Zeven, Zodd, neven, nodd)
A1 = JosephsonCircuits.A_coupled_tlines(L,C,l,omega)
A2 = JosephsonCircuits.ABCD_coupled_tline(Zeven,Zodd,neven*omega/c*l,nodd*omega/c*l)
println(isapprox(A1,A2))

# output
true

References

Paul, Clayton R. Analysis of Multiconductor Transmission Lines, Second Edition. Wiley, 2008.

source
JosephsonCircuits.S_circulator_clockwise! Method
julia
S_circulator_clockwise!(S)

In-place version of S_circulator_clockwise, writing into S, a 3 x 3 matrix or an array of them.

source
JosephsonCircuits.S_circulator_clockwise Method
julia
S_circulator_clockwise()

Return the scattering parameter matrix of an ideal three port circulator which passes a wave from port 1 to port 2, from 2 to 3 and from 3 to 1.

source
JosephsonCircuits.S_circulator_counterclockwise! Method
julia
S_circulator_counterclockwise!(S)

In-place version of S_circulator_counterclockwise, writing into S, a 3 x 3 matrix or an array of them.

source
JosephsonCircuits.S_circulator_counterclockwise Method
julia
S_circulator_counterclockwise()

Return the scattering parameter matrix of an ideal three port circulator which passes a wave from port 1 to port 3, from 3 to 2 and from 2 to 1.

source
JosephsonCircuits.S_directional_coupler! Method
julia
S_directional_coupler!(S, α::Number, β::Number, θ::Number, ϕ::Number)

In-place version of S_directional_coupler, writing into S, a 4 x 4 matrix or an array of them.

source
JosephsonCircuits.S_directional_coupler Method
julia
S_directional_coupler(α::Number, β::Number, θ::Number, ϕ::Number)

Return the scattering parameter matrix for an ideal directional coupler with the convention that if a wave is input at port 1, then port 2 is the through, port 3 is the coupled port, and port 4 is the isolated port:

julia
                           _______
port 1 (input)    -->  ====|     |==== --> port 2 (through)
                           |     |
port 4 (isolated) <--  ====|     |==== --> port 3 (coupled)
                           -------

[0            α            exp(im\*θ)β 0;
 α            0            0            exp(im\*ϕ)β;
 exp(im\*θ)β 0            0            α;
 0            exp(im\*ϕ)β α            0]

The directional coupler is specified by the real coefficients α, β such that α²+β² = 1 and the real phases θ, ϕ which satisfy the condition θ + ϕ = π ± 2_n_π.

The scattering parameter matrix is unitary. Arbitrary phases can be applied to any of the ports (eg. by connecting a lossless transmission line).

The voltage coupling coefficient c is a real number where α = √(1-c^2) and β = c. The coupling in dB is defined as C = -20*log10(c).

  • A symmetric directional coupler has θ = ϕ = π/2.

  • An anti-symmetric directional coupler has θ = 0 and ϕ = π.

  • A symmetric hybrid coupler (a 90 degree or quadrature hybrid) has c = 1/√2

and θ = ϕ = π/2.

  • An anti-symmetric hybrid coupler (a magic-T hybrid or a rat-race hybrid or

a 180 degree hybrid) has c = 1/√2 and θ = 0, ϕ = π.

References

Pozar, D. M. Microwave Engineering (4 ed.). John Wiley & Sons (2011) ISBN 9780470631553.

source
JosephsonCircuits.S_directional_coupler_antisymmetric! Method
julia
S_directional_coupler_antisymmetric!(S, couplingdB::Number)

In-place version of S_directional_coupler_antisymmetric, writing into S.

source
JosephsonCircuits.S_directional_coupler_antisymmetric Method
julia
S_directional_coupler_antisymmetric(couplingdB::Number)

Return the scattering parameter matrix for an ideal anti-symmetric directional coupler with the convention that if a wave is input at port 1, then port 2 is the through, port 3 is the coupled port, and port 4 is the isolated port:

julia
                           _______
port 1 (input)    -->  ====|     |==== --> port 2 (through)
                           |     |
port 4 (isolated) <--  ====|     |==== --> port 3 (coupled)
                           -------

[0            α            exp(im\*θ)β 0;
 α            0            0            exp(im\*ϕ)β;
 exp(im\*θ)β 0            0            α;
 0            exp(im\*ϕ)β α            0]

where α = √(1-c^2) and β = c and c is the voltage coupling coefficient which is related to the coupling in dB as c = 10^(-couplingdB/20). The anti-symmetric directional coupler has θ = 0 and ϕ = π.

References

Pozar, D. M. Microwave Engineering (4 ed.). John Wiley & Sons (2011) ISBN 9780470631553.

source
JosephsonCircuits.S_directional_coupler_symmetric! Method
julia
S_directional_coupler_symmetric!(S, couplingdB::Number)

In-place version of S_directional_coupler_symmetric, writing into S.

source
JosephsonCircuits.S_directional_coupler_symmetric Method
julia
S_directional_coupler_symmetric(couplingdB::Number)

Return the scattering parameter matrix for an ideal symmetric directional coupler with the convention that if a wave is input at port 1, then port 2 is the through, port 3 is the coupled port, and port 4 is the isolated port:

julia
                           _______
port 1 (input)    -->  ====|     |==== --> port 2 (through)
                           |     |
port 4 (isolated) <--  ====|     |==== --> port 3 (coupled)
                           -------

[0            α            exp(im\*θ)β 0;
 α            0            0            exp(im\*ϕ)β;
 exp(im\*θ)β 0            0            α;
 0            exp(im\*ϕ)β α            0]

where α = √(1-c^2) and β = c and c is the voltage coupling coefficient which is related to the coupling in dB as c = 10^(-couplingdB/20). The symmetric directional coupler has θ = ϕ = π/2.

References

Pozar, D. M. Microwave Engineering (4 ed.). John Wiley & Sons (2011) ISBN 9780470631553.

source
JosephsonCircuits.S_hybrid_coupler_antisymmetric! Method
julia
S_hybrid_coupler_antisymmetric!(S)

In-place version of S_hybrid_coupler_antisymmetric, writing into S.

source
JosephsonCircuits.S_hybrid_coupler_antisymmetric Method
julia
S_hybrid_coupler_antisymmetric()

Return the scattering parameter matrix for an ideal anti-symmetric hybrid (3 dB) coupler (a magic-T hybrid or a rat-race hybrid or a 180 degree hybrid) with the convention that if a wave is input at port 1, then port 2 is the through, port 3 is the coupled port, and port 4 is the isolated port:

julia
                           _______
port 1 (input)    -->  ====|     |==== --> port 2 (through)
                           |     |
port 4 (isolated) <--  ====|     |==== --> port 3 (coupled)
                           -------

[0            α            exp(im\*θ)β 0;
 α            0            0            exp(im\*ϕ)β;
 exp(im\*θ)β 0            0            α;
 0            exp(im\*ϕ)β α            0]

where α = β = 1/√2 and θ = 0 and ϕ = π for an anti-symmetric hybrid (3 dB) coupler.

References

Pozar, D. M. Microwave Engineering (4 ed.). John Wiley & Sons (2011) ISBN 9780470631553.

source
JosephsonCircuits.S_hybrid_coupler_symmetric! Method
julia
S_hybrid_coupler_symmetric!(S)

In-place version of S_hybrid_coupler_symmetric, writing into S.

source
JosephsonCircuits.S_hybrid_coupler_symmetric Method
julia
S_hybrid_coupler_symmetric()

Return the scattering parameter matrix for an ideal symmetric hybrid (3 dB) coupler (a 90 degree or quadrature hybrid) with the convention that if a wave is input at port 1, then port 2 is the through, port 3 is the coupled port, and port 4 is the isolated port:

julia
                           _______
port 1 (input)    -->  ====|     |==== --> port 2 (through)
                           |     |
port 4 (isolated) <--  ====|     |==== --> port 3 (coupled)
                           -------

[0            α            exp(im\*θ)β 0;
 α            0            0            exp(im\*ϕ)β;
 exp(im\*θ)β 0            0            α;
 0            exp(im\*ϕ)β α            0]

where α = β = 1/√2 and θ = ϕ = π/2 for a symmetric hybrid (3 dB) coupler.

References

Pozar, D. M. Microwave Engineering (4 ed.). John Wiley & Sons (2011) ISBN 9780470631553.

source
JosephsonCircuits.S_match! Method
julia
S_match!(S::AbstractArray)

Return the scattering parameters for a N port ideal match. Overwrite S with the output.

Examples

julia
julia> JosephsonCircuits.S_match!(ones(1,1))
1×1 Matrix{Float64}:
 0.0

julia> JosephsonCircuits.S_match!(ones(1,1,2))
1×1×2 Array{Float64, 3}:
[:, :, 1] =
 0.0

[:, :, 2] =
 0.0
source
JosephsonCircuits.S_open! Method
julia
S_open!(S::AbstractArray)

Return the scattering parameters for a N port ideal open. Overwrite S with the output.

Examples

julia
julia> JosephsonCircuits.S_open!(ones(1,1))
1×1 Matrix{Float64}:
 1.0

julia> JosephsonCircuits.S_open!(ones(2,2))
2×2 Matrix{Float64}:
 1.0  0.0
 0.0  1.0
source
JosephsonCircuits.S_short! Method
julia
S_short!(S::AbstractArray)

Return the scattering parameters for a N port ideal short. Overwrite S with the output.

Examples

julia
julia> JosephsonCircuits.S_short!(ones(1,1))
1×1 Matrix{Float64}:
 -1.0

julia> JosephsonCircuits.S_short!(ones(2,2))
2×2 Matrix{Float64}:
 -1.0   0.0
  0.0  -1.0
source
JosephsonCircuits.S_splitter! Method
julia
S_splitter!(S::AbstractArray)

Return the scattering parameters for a N port ideal lossless symmetrical reciprocal network. Overwrite S with the output.

Examples

julia
julia> JosephsonCircuits.S_splitter!(ones(2,2))
2×2 Matrix{Float64}:
 0.0  1.0
 1.0  0.0

julia> JosephsonCircuits.S_splitter!(ones(3,3))
3×3 Matrix{Float64}:
 -0.333333   0.666667   0.666667
  0.666667  -0.333333   0.666667
  0.666667   0.666667  -0.333333
source
JosephsonCircuits.Y_C! Method
julia
Y_C!(Y, C, w)

In place version of Y_C, writing into Y.

source
JosephsonCircuits.Y_C Method
julia
Y_C(Cmaxwell,w)

The admittance matrix Y for a network of capacitors is the Maxwell capacitance matrix Cmaxwell times im*w.

source
JosephsonCircuits.Y_PiY! Method
julia
Y_PiY!(Y,Y1,Y2,Y3)

In-place version of Y_PiY.

Examples

julia
julia> JosephsonCircuits.Y_PiY!(zeros(Complex{Float64},2,2),1.0,2.0,4.0)
2×2 Matrix{ComplexF64}:
  5.0+0.0im  -4.0+0.0im
 -4.0+0.0im   6.0+0.0im
source
JosephsonCircuits.Y_PiY Method
julia
Y_PiY(Y1,Y2,Y3)

Return the admittance matrix for a Pi network of admittances Y1, Y2, and Y3.

julia
o----Y3-----o
   |     |   
   Y1    Y2  
   |     |   
o-----------o

Examples

julia
julia> JosephsonCircuits.Y_PiY(1.0+0.0im,2.0+0.0im,4.0+0.0im)
2×2 Matrix{ComplexF64}:
  5.0+0.0im  -4.0-0.0im
 -4.0-0.0im   6.0+0.0im
source
JosephsonCircuits.Y_invL! Method
julia
Y_invL!(Y, invL, w)

In place version of Y_invL, writing into Y.

source
JosephsonCircuits.Y_invL Method
julia
Y_invL(invL,w)

The admittance matrix Y for a network of inductors and mutual inductors is the inverse invL of its inductance matrix divided by im*w.

source
JosephsonCircuits.Y_seriesY! Method
julia
Y_seriesY!(Y,Y1)

In-place version of Y_seriesY.

Examples

julia
julia> JosephsonCircuits.Y_seriesY!(zeros(Complex{Float64},2,2),1/50)
2×2 Matrix{ComplexF64}:
  0.02+0.0im  -0.02+0.0im
 -0.02+0.0im   0.02+0.0im
source
JosephsonCircuits.Y_seriesY Method
julia
Y_seriesY(Y1)

Return the Y matrix for a series admittance Y1.

julia
o---Y1---o
          
          
o--------o

Examples

julia
julia> JosephsonCircuits.Y_seriesY(1/(50.0+0.0im))
2×2 Matrix{ComplexF64}:
  0.02-0.0im  -0.02+0.0im
 -0.02+0.0im   0.02-0.0im
source
JosephsonCircuits.ZC_basis_coupled_tlines Method
julia
ZC_basis_coupled_tlines(L, Cmaxwell)

Return the characteristic impedance matrix ZC and eigenbasis for current TI and voltage TV from the inductance per unit length matrix L and Maxwell capacitance per unit length matrix Cmaxwell.

Arguments

  • L: inductance per unit length matrix.

  • Cmaxwell: Maxwell capacitance per unit length matrix.

Returns

  • ZC: characteristic impedance matrix.

  • TI: matrix which transforms mode currents to currents, I = TI_Im. Computed from TI = U_theta*S.

  • TV: matrix which transforms mode voltages to voltages, V = TV_Vm. Computed from TV = U_inv(theta)*S.

  • theta: Diagonal matrix with the square roots of the eigenvalues of Cmaxwell along the diagonals.

  • U: eigenvectors of Cmaxwell.

  • lambda: Diagonal matrix with the square roots of the eigenvalues of theta_Ut_L_U_theta along the diagonals. lambda is related to the propagation constant, gamma, as gamma^2 = -omega^2*lambda^2.

  • S: eigenvectors of theta_Ut_L_U_theta.

Examples

julia
Zeven = 51.0
Zodd = 49.0
neven = 1.1
nodd = 1.08
c = JosephsonCircuits.speed_of_light

L, C = JosephsonCircuits.even_odd_to_maxwell(Zeven, Zodd, neven, nodd)
b = JosephsonCircuits.ZC_basis_coupled_tlines(L,C)
@show b.ZC
@show b.TI
@show b.TV
@show Matrix(b.theta)
@show b.U
@show Matrix(b.lambda)
@show b.S
println(isapprox(Zeven,b.ZC[1,1]+b.ZC[1,2]))
println(isapprox(Zodd,b.ZC[1,1]-b.ZC[1,2]))
println(isapprox(neven,b.lambda[2,2]*c))
println(isapprox(nodd,b.lambda[1,1]*c))

# output
b.ZC = [49.999999999999986 0.9999999999999929; 0.9999999999999929 49.999999999999986]
b.TI = [-6.063012846509498e-6 -5.997716107132906e-6; 6.063012846509498e-6 -5.997716107132906e-6]
b.TV = [-82467.25063230767 -83365.06614665617; 82467.25063230767 -83365.06614665617]
Matrix(b.theta) = [8.48205146197092e-6 0.0; 0.0 8.574394996376037e-6]
b.U = [-0.7071067811865475 -0.7071067811865475; -0.7071067811865475 0.7071067811865475]
Matrix(b.lambda) = [3.6024922281400425e-9 0.0; 0.0 3.669205047179673e-9]
b.S = [0.0 1.0; 1.0 0.0]
true
true
true
true

References

Paul, Clayton R. Analysis of Multiconductor Transmission Lines, Second Edition. Wiley, 2008.

source
JosephsonCircuits.Z_L! Method
julia
Z_L!(Z, L, w)

In place version of Z_L, writing into Z.

source
JosephsonCircuits.Z_L Method
julia
Z_L(L,w)

Return the impedance matrix Z of a network of inductors and mutual inductors, im*w times its inductance matrix L.

source
JosephsonCircuits.Z_TZ! Method
julia
Z_TZ!(Z,Z1,Z2,Z3)

In-place version of Z_TZ.

Examples

julia
julia> JosephsonCircuits.Z_TZ!(ones(Complex{Float64},2,2),1,2,4)
2×2 Matrix{ComplexF64}:
 5.0+0.0im  4.0+0.0im
 4.0+0.0im  6.0+0.0im
source
JosephsonCircuits.Z_TZ Method
julia
Z_TZ(Z1,Z2,Z3)

Return the impedance matrix for a T network of impedances Z1, Z2, and Z3.

julia
o--Z1-----Z2--o
       |       
      Z3       
       |       
o-------------o

Examples

julia
julia> JosephsonCircuits.Z_TZ(1.0+0.0im,2.0+0.0im,4.0+0.0im)
2×2 Matrix{ComplexF64}:
 5.0+0.0im  4.0+0.0im
 4.0+0.0im  6.0+0.0im
source
JosephsonCircuits.Z_canonical_coupled_line_circuits Method
julia
Z_canonical_coupled_line_circuits(i::Int, Z0e, Z0o, thetae, thetao)

Return the impedance matrix for the i'th canonical coupled line circuit, as a function of the even mode phase delay thetae in radians, the odd mode phase delay thetao in radians, the even mode characteristic impedance Z0e in Ohms, and the odd mode characteristic impedance Z0o in Ohms.

  1. low pass
julia
   gnd--==========
1--> o--==========--o <--2
  1. band pass
julia
   gnd--==========--o <--2
1--> o--==========--gnd
  1. band pass
julia
        ==========--o <--2
1--> o--==========
  1. band pass
julia
1--> o--==========--gnd
2--> o--==========
  1. all pass
julia
        ==========
1--> o--==========--o  <--2
  1. all pass
julia
   gnd--==========--gnd
1--> o--==========--o  <--2
  1. all pass
julia
1--> o--==========--|
2--> o--==========--|
  1. all stop
julia
   gnd--==========--o  <--2
1--> o--==========
  1. all stop
julia
1--> o--==========--gnd
2--> o--==========--gnd
  1. all stop
julia
1--> o--==========
2--> o--==========

Examples

julia
julia> JosephsonCircuits.Z_canonical_coupled_line_circuits(3,50.0,30.0,pi/4,pi/3)
2×2 Matrix{ComplexF64}:
 0.0-33.6603im  0.0-18.0348im
 0.0-18.0348im  0.0-33.6603im

References

E. M. T. Jones, "Coupled-Strip-Transmission-Line Filters and Directional Couplers," in IRE Transactions on Microwave Theory and Techniques, vol. 4, no. 2, pp. 75-81, April 1956, doi: 10.1109/TMTT.1956.1125022.

Pozar, D. M. Microwave Engineering (4 ed.). John Wiley & Sons (2011) ISBN 9780470631553.

source
JosephsonCircuits.Z_coupled_tline! Method
julia
Z_coupled_tline!(Z, Z0e, Z0o, thetae, thetao)

In-place version of Z_coupled_tline.

Examples

julia
julia> JosephsonCircuits.Z_coupled_tline!(zeros(Complex{Float64},4,4),50,50,pi/4,pi/4)
4×4 Matrix{ComplexF64}:
 0.0-50.0im     0.0-0.0im      0.0-70.7107im  0.0-0.0im
 0.0-0.0im      0.0-50.0im     0.0-0.0im      0.0-70.7107im
 0.0-70.7107im  0.0-0.0im      0.0-50.0im     0.0-0.0im
 0.0-0.0im      0.0-70.7107im  0.0-0.0im      0.0-50.0im
source
JosephsonCircuits.Z_coupled_tline Method
julia
Z_coupled_tline(Z0e, Z0o, thetae, thetao)

Return the impedance matrix for two coupled transmission lines described even and odd mode impedances Z0e and Z0o and by even and odd mode phase delays thetae and thetao.

julia
thetae, Z0e
thetao, Z0o

V1, I1 -->  ======== <-- I3, V3
V2, I2 -->  ======== <-- I4, V4

[(V1+V2)/2, (I1+I2)/2] = ABCDe * [(V3+V4)/2, -(I3+I4)/2]
[(V1-V2)/2, (I1-I2)/2] = ABCDo * [(V3-V4)/2, -(I3-I4)/2]

[V1, V2, V3, V4] = Z_coupled_tline * [I1, I2, I3, I4]

Examples

julia
julia> JosephsonCircuits.Z_coupled_tline(50,50,pi/4,pi/4)
4×4 Matrix{ComplexF64}:
 0.0-50.0im     0.0-0.0im      0.0-70.7107im  0.0-0.0im
 0.0-0.0im      0.0-50.0im     0.0-0.0im      0.0-70.7107im
 0.0-70.7107im  0.0-0.0im      0.0-50.0im     0.0-0.0im
 0.0-0.0im      0.0-70.7107im  0.0-0.0im      0.0-50.0im
source
JosephsonCircuits.Z_invC! Method
julia
Z_invC!(Z, invC, w)

In place version of Z_invC, writing into Z.

source
JosephsonCircuits.Z_invC Method
julia
Z_invC(invCmaxwell,w)

The impedance matrix Z for a network of capacitors is the inverse of the Maxwell capacitance matrix invCmaxwell divided by im*w.

source
JosephsonCircuits.Z_shuntZ! Method
julia
Z_shuntZ!(Z,Z1)

In-place version of Z_shuntZ.

Examples

julia
julia> JosephsonCircuits.Z_shuntZ!(zeros(Complex{Float64},2,2),50)
2×2 Matrix{ComplexF64}:
 50.0+0.0im  50.0+0.0im
 50.0+0.0im  50.0+0.0im
source
JosephsonCircuits.Z_shuntZ Method
julia
Z_shuntZ(Z1)

Return the Z matrix for a shunt impedance Z1.

julia
o---------o
     |
     Z1
     |
o---------o

Examples

julia
julia> JosephsonCircuits.Z_shuntZ(50.0+0.0im)
2×2 Matrix{ComplexF64}:
 50.0+0.0im  50.0+0.0im
 50.0+0.0im  50.0+0.0im
source
JosephsonCircuits.Z_tline! Method
julia
Z_tline!(Z, Z0, theta)

In-place version of Z_tline.

Examples

julia
julia> JosephsonCircuits.Z_tline!(ones(Complex{Float64},2,2),50, pi/4)
2×2 Matrix{ComplexF64}:
 0.0-50.0im     0.0-70.7107im
 0.0-70.7107im  0.0-50.0im
source
JosephsonCircuits.Z_tline Method
julia
Z_tline(Z0, theta)

Return the impedance matrix for a transmission line described by a characteristic impedance Z0 in Ohms and phase delay theta in radians

julia
   theta, Z0  
o--========--o
              
              
o------------o

Examples

julia
julia> JosephsonCircuits.Z_tline(50, pi/4)
2×2 Matrix{ComplexF64}:
 0.0-50.0im     0.0-70.7107im
 0.0-70.7107im  0.0-50.0im
source
JosephsonCircuits.canonical_coupled_line_circuits Method
julia
canonical_coupled_line_circuits(i::Int, Z0e, Z0o, ne, no)

Return the lumped element model of the canonical coupled line circuit i of Z_canonical_coupled_line_circuits, for lines much shorter than a wavelength, from the even and odd mode impedances Z0e, Z0o and mode indices ne, no: a named tuple of the element values the model has, among the inductances L1, L2, the mutual inductance M and the capacitances C1, C2, Cm, each per unit length of the lines. The circuits 3, 8, 9 and 10 have a model.

L1, L2 and M are the self and mutual inductances of the two ports: at low frequency the impedance matrix of the circuit of length l is im*w*l*[L1 M; M L2] plus its capacitive part. In the circuits 3 and 10, C1 and C2 are the capacitances of each line to ground, the even mode capacitance ne/(c*Z0e), and Cm the capacitance between the lines, half the difference of the odd and the even mode capacitances.

source
JosephsonCircuits.coupling_to_even_odd Method
julia
coupling_to_even_odd(couplingdB, Z0)

Return the even and odd mode impedances Zeven and Zodd for a directional coupler made from two coupled transmission lines with coupling in dB couplingdB and system characteristic impedance Z0.

Examples

julia
julia> JosephsonCircuits.coupling_to_even_odd(20.0,50.0)
(Zeven = 55.27707983925667, Zodd = 45.22670168666455)
source
JosephsonCircuits.even_odd_to_coupling Method
julia
even_odd_to_coupling(Zeven, Zodd)

Return the coupling in dB couplingdB and system characteristic impedance Z0 for a directional coupler made from two coupled transmission lines with even and odd mode impedances Zeven and Zodd.

Examples

julia
julia> JosephsonCircuits.even_odd_to_coupling(55.0,45.0)
(couplingdB = 20.0, Z0 = 49.749371855331)
source
JosephsonCircuits.even_odd_to_maxwell Method
julia
even_odd_to_maxwell(Zeven, Zodd, neven, nodd)

Return the inductance matrix and Maxwell capacitance matrix for two coupled transmission lines with even and odd mode impedances Zeven, Zodd and even and odd mode indices neven, nodd.

Examples

julia
L1 = [1.1 0.1;0.1 1.1]
C1 = [2.0 -0.4;-0.4 2.0]
L2, C2 = JosephsonCircuits.even_odd_to_maxwell(JosephsonCircuits.maxwell_to_even_odd(L1,C1)...)
isapprox(L1,L2) && isapprox(C1,C2)

# output
true
source
JosephsonCircuits.even_odd_to_mutual Method
julia
even_odd_to_mutual(Zeven, Zodd, neven, nodd)

Return the inductance matrix and mutual capacitance matrix for two coupled transmission lines with even and odd mode impedances Zeven, Zodd and even and odd mode indices neven, nodd.

Examples

julia
L1 = [1.1 0.1;0.1 1.1]
C1 = [1.6 0.4;0.4 1.6]
L2, C2 = JosephsonCircuits.even_odd_to_mutual(JosephsonCircuits.mutual_to_even_odd(L1,C1)...)
isapprox(L1,L2) && isapprox(C1,C2)

# output
true
source
JosephsonCircuits.maxwell_combine Method
julia
maxwell_combine(n::Int, d::AbstractDict)

Return the Maxwell capacitance matrix for an n terminal system from the Maxwell capacitance matrices for sets of terminals stored in the dictionary d. The dictionary keys are tuples of the terminal numbers for the capacitance matrices, of any lengths, and the values are the capacitance matrices. An entry given by several matrices is the mean of their values, and an entry given by none is zero.

Examples

julia
julia> JosephsonCircuits.maxwell_combine(3, Dict((1,2)=>[1.0 2.0;4.0 5.0],(1,3)=>[1.0 3.0;7.0 9.0],(2,3)=>[5.0 6.0;8.0 9.0]))
3×3 Matrix{Float64}:
 1.0  2.0  3.0
 4.0  5.0  6.0
 7.0  8.0  9.0

julia> JosephsonCircuits.maxwell_combine(3, Dict((1,2,3)=>[1.0 2.0 3.0;4.0 5.0 6.0;7.0 8.0 9.0]))
3×3 Matrix{Float64}:
 1.0  2.0  3.0
 4.0  5.0  6.0
 7.0  8.0  9.0
source
JosephsonCircuits.maxwell_to_even_odd Method
julia
maxwell_to_even_odd(L, Cmaxwell)

Return the even and odd mode impedances and the even and odd mode indices from the inductance matrix L and the Maxwell capacitance matrix Cmaxwell of two identical coupled lines: both must be symmetric 2 by 2 matrices with equal diagonal entries, which is not checked.

Examples

julia
C = [1.0e-12 1.0e-13;1.0e-13 1.0e-12]
L = [1.0e-9 1.0e-10;1.0e-10 1.0e-9]
Zeven, Zodd, neven, nodd = JosephsonCircuits.maxwell_to_even_odd(L,C)
@show Zeven
@show Zodd
@show neven
@show nodd
;

# output
Zeven = 31.622776601683796
Zodd = 31.622776601683796
neven = 0.010428296918824038
nodd = 0.008532242933583305
source
JosephsonCircuits.maxwell_to_mutual Method
julia
maxwell_to_mutual(Cmaxwell::AbstractMatrix)

Return the mutual capacitance matrix from the Maxwell capacitance matrix Cmaxwell.

The Maxwell capacitance Cmaxwell is the relationship between charge and voltage on each node, Q = C V or dQi/dVj = C_ij where C is the Maxwell capacitance matrix.

Each element of the mutual capacitance matrix Cmutual is the value of a physical capacitor placed between two nodes in a circuit or between a node and ground.

Examples

julia
julia> C = [1.0 -0.1;-0.1 2.0];JosephsonCircuits.maxwell_to_mutual(C)
2×2 Matrix{Float64}:
 0.9  0.1
 0.1  1.9
source
JosephsonCircuits.mutual_to_even_odd Method
julia
mutual_to_even_odd(L, Cmutual)

Return the even and odd mode impedances and the even and odd mode indices from the inductance matrix L and the mutual capacitance matrix Cmutual.

Examples

julia
C = [1.0e-12 1.0e-13; 1.0e-13 1.0e-12]
L = [1.0e-9 1.0e-10; 1.0e-10 1.0e-9]
Zeven, Zodd, neven, nodd = JosephsonCircuits.mutual_to_even_odd(L,C)
@show Zeven
@show Zodd
@show neven
@show nodd
;

# output
Zeven = 33.166247903554
Zodd = 27.386127875258307
neven = 0.0099429909816438
nodd = 0.009852185508991206
source
JosephsonCircuits.mutual_to_maxwell Method
julia
mutual_to_maxwell(C::AbstractMatrix)

Return the Maxwell capacitance matrix from the mutual capacitance matrix C.

The Maxwell capacitance Cmaxwell is the relationship between charge and voltage on each node, Q = C V or dQi/dVj = C_ij where C is the Maxwell capacitance matrix.

Each element of the mutual capacitance matrix Cmutual is the value of a physical capacitor placed between two nodes in a circuit or between a node and ground.

Examples

julia
julia> C = [0.9 0.1;0.1 1.9];JosephsonCircuits.mutual_to_maxwell(C)
2×2 Matrix{Float64}:
  1.0  -0.1
 -0.1   2.0
source