In [2]:

```
# Variable Declaration
Zo = 75 # Characteristic Impedance (Ohms)
C = 69.00*pow(10,-12) # Nominal Capacitance (F/m)
Di = 0.584*pow(10,-3) # Inner core diameter (m)
k = 2.23 # Dielectric Constant
# Calculation
import math # Math Library
L = pow(Zo,2)*C # Inductance per meter (H/m)
Do = Di*pow(10,Zo*math.sqrt(k)/138) # Outer core diameter (m)
# Result
print "Inductance per meter, L =",round(L/pow(10,-6),3),"uH/m"
print "Outer Diameter, D =",round(Do/pow(10,-3),2),"mm"
```

In [3]:

```
# Variable Declaration
s = 1 # Assumed s (m)
d = s # Condition for minimum Zo (m)
# Calculation
import math # Math Library
Zo_min = 276*math.log10(2*s/d) # Minimum value of characteristic impedance (Ohms)
# Result
print "The minimum value of characteristic impedance, Zo_min =",round(Zo_min),"Ohms"
```

In [4]:

```
# Variable Declaration
Zo = 2000 # Characteristic Impedance (Ohms)
Di = 0.025*pow(10,-3) # Inner cable diameter (m)
k = 2.56 # Dielectric Constant
# Calculation
import math # Math Library
Do = Di*pow(10,Zo*math.sqrt(k)/138) # Outer conductor diameter (m)
# Result
print "Outer Diameter, D =",round(Do/pow(10,18),2),"* 10^(15) km or",round(Do/(9.44*pow(10,15))),"light years"
```

In [5]:

```
# Variable Declaration
Zo = 200 # Characteristic Impedance of main line (Ohms)
Zl = 300 # Load Impedance (Ohms)
# Calculation
import math # Math Library
Zo1 = math.sqrt(Zo*Zl) # Characteristic impedance of the quarter wave transformer (Ohms)
# Result
print "Characteristic impedance of the quarter wave transformer, Zo1 =",round(Zo1),"Ohms"
```

In [6]:

```
# Variable Declaration
Zl = complex(200,75) # Load Impedance (Ohms)
Zo = 300 # Characteristic Impedance (Ohms)
# Calculation
import math # Math Library
Yl = 1/Zl # Admittance (Mho)
Bstub = 1/Yl.imag # Reactance of the Stub (Ohms)
Gl = Yl.real # Real Part of Admittance (Mho)
Rl = 1/Gl # Resistance (Ohms)
Zo1 = math.sqrt(Zo*Rl) # Characteristic impedance of the quarter wave transformer (Ohms)
# Result
print "Reactance of the stub, Bstub =",round(Bstub,1),"Ohms"
print "Characteristic impedance of the quarter wave transformer, Zo1 =",round(Zo1),"Ohms"
```

In [7]:

```
# Variable Declaration
Y = complex(0.004,0.002) # Load Susceptance (Ohms)
Yo = 0.0033 # Ohms - Characteristic Admittance (Ohms)
f = 150*pow(10,6) # Operating Frequency (Hz)
vc = 3*pow(10,8) # Speed of light in vacuum (m/s)
# Calculation
import math # Math Library
y = Y/Yo # Normalized susceptance required to cancel loads normalized susceptance
Lambda = vc/f # Wavelength (m)
Length = 0.337*Lambda # Length from Smith Chart (m)
# Result
print "Normalized susceptance required to cancel loads normalized susceptance = +j *",round(y.imag,2)
print "Length =",round(Length*100,1),"cm"
```

In [8]:

```
# Variable Declaration
Z = complex(100,50) # Load Impedance (Ohms)
Zo = 75 # Characteristic Impedance (Ohms)
# Calculation
import math # Math Library
z = Z/Zo # Normalized Load Impedance (Ohms)
Zg = 39.8 # Resistance at Distance = 0.184* Lambda, from Smith Chart (Ohms)
Zo_dash = math.sqrt(Zg*Zo) # Impedance of the transformer (Ohms)
# Result
print "(a) From Smith Chart the Distance = 0.184 * Lambda"
print "(b) Zo_dash for the transformer, Zo' =",round(Zo_dash,1),"Ohms"
```

In [9]:

```
# Variable Declaration
Z = complex(450,-600) # Load Impedance (Ohms)
Zo = 300 # Characteristic Impedance (Ohms)
# Calculation
import math # Math Library
z = Z/Zo # Normalized Load Impedance (Ohms)
s = 4.6 # Standing Wave Ratio
L = 1/(2*math.pi)*math.atan(math.sqrt(s)/(s-1)) # (* Lambda) Stub Length (m)
# Result
print "Normalized load Impedance = ",z
print "From Smith Chart the Distance to the stub = 0.130 * Lambda"
print "Stub Length =",round(L,3),"* Lambda"
```

In [10]:

```
# Variable Declaration
Z = complex(450,-600) # Load Impedance (Ohms)
Zo = 300 # Characteristic Impedance (Ohms)
f1 = 10 # Old frequency (MHz)
f2 = 12 # New frequency (MHz)
# Calculation
import math # Math Library
z = Z/Zo # Normalized Load Impedance (Ohms)
z1 = z.imag * f1/f2 # Intermediate Impedance (Ohms)
z = complex(z.real,z1) # Normalized Load Impedance (Ohms)
s = 4.6 # Standing Wave Ratio
L = 1/(2*math.pi)*math.atan(math.sqrt(s)/(s-1))*f2/f1 # (* Lambda')Stub Length (m)
# Result
print "Normalized load Impedance = ",z
print "From Smith Chart the Distance to the stub = 0.156 * Lambda'"
print "Stub Length =",round(L,3),"* Lambda'"
print "From Smith chart SWR = 2.2"
```

In [11]:

```
# Variable Declaration
Z = 200.00 # Load Impedance (Ohms)
Zo = 300.00 # Characteristic Impedance (Ohms)
# Calculation
import math # Math Library
z = Z/Zo # Normalized Load Impedance (Ohms)
L1_by_Lambda = 0.311 # Ratio from Smith Chart
L2_by_Lambda1 = L1_by_Lambda*1.1 # Ratio
# Result
print "(a) Normalized load Impedance = ",round(z,2)
print " From Smith Chart the Distance to the stub = 0.11 * Lambda"
print " From Smith Chart the Length of stub = 0.311 * Lambda"
print "(b) New Length of stub =",round(L2_by_Lambda1,3),"* Lambda'"
print " From Smith chart SWR = 1.3"
```