Chapter 6 : Microwave Components

Example 6.2 Page No : 200

In [1]:
import math 


Beeta = 34.3                   #in rad/m
# S=[0,0.5*math.e**(%i*53.13);0.5*math.e**(%i*53.13),0];
# S'=[0,0.5*math.e**(%i*53.13-x);0.5*math.e**(%i*53.13-x),0];
#For S12& S21 to be real ,
x = 53.5                       #in degrees

#calculations
x_rad = 53.5*math.pi/180
l = x_rad/Beeta

#---output---#
print 'distance (in cm)=',round(l*100,4)
distance (in cm)= 2.7223

Example 6.3 Page No : 205

In [3]:
import math 


D = 30                           #in dB
VSWR = 1
C = 10
                                 #p1_p4 = p1/p4

#calculations
p1_p4 = 10**(C/-10)
S_41 = round(math.sqrt(p1_p4),4)
S_14 = S_41                     #As matched & lossless
S_31 = round(S_41**2/10**(D/10),4)
S_11 = round((VSWR-1)/(VSWR+1),4)
S_22 = S_11
S_44 = S_11
S_33 = S_11
S_21 = round(math.sqrt(1-0.1-10**-4),4)
S_12 = S_21
S_34 = round(math.sqrt(1-0.1-10**-4),4)
S_43 = S_34
S_24 = round(math.sqrt(1-0.1-S_34**2),4)
S_42 = S_24
S_23 = S_41
S_32 = S_23
S_13 = S_31
S=[[S_11,S_12,S_13,S_14],[S_21,S_22,S_23,S_24],[S_31,S_32,S_33,S_34],[S_41,S_42,S_43,S_44]]



#---output---#
print 'Required Scattering Parameters are \n', S
Required Scattering Parameters are 
[[0.0, 0.9486, 0.0001, 0.3162], [0.9486, 0.0, 0.3162, 0.0126], [0.0001, 0.3162, 0.0, 0.9486], [0.3162, 0.0126, 0.9486, 0.0]]

Example 6.4 Page No : 206

In [4]:
import math 



a_2 = 0
a_3 = 0
a_1 = 32                                            #in mW

#calculations
b_1 = (a_1/2**2)+(a_2/-2)+(a_3/math.sqrt(2))
b_2 = (a_1/(-2)**2)+(a_2/-2)+(a_3/math.sqrt(2))
b_3 = (a_1/2)+(a_2/math.sqrt(2))+(a_3/-math.sqrt(2))



#---output---#
print 'Power at port1(in mW)=',b_1
print 'Power at port2(in mW) =',b_2
print 'Power at port3(in mW) =',b_3
Power at port1(in mW)= 8.0
Power at port2(in mW) = 8.0
Power at port3(in mW) = 16.0

Example 6.5 Page No : 214

In [5]:
import math


b_1 = 20
b_2 = 20

#calculations
p_1 = abs((60-50)/(60+50))
p_2 = abs((75-50)/(75+50))
P_1 = b_1*(1-p_1**2)/2
P_2 = b_2*(1-p_2**2)/2

#---output---#
print 'Power in port1 (in mW) =',round(P_1,4)
print 'Power in port2 (in mW) =',P_2
Power in port1 (in mW) = 10.0
Power in port2 (in mW) = 10

Example 6.6 Page No : 222

In [6]:
import math 


p_1 = 0.5
p_2 = 0.6
p_4 = 0.8
b_1 = 0.6566
b_2 = 0.7576
b_3 = 0.6536
b_4 = 0.00797

#calculations
a_1 = p_1*b_1
a_2 = p_2*b_2
a_3 = 1                               #in Watts
a_4 = p_4*b_4


#---output---#
print 'Power at port 1(in W)=',round(b_1**2,4)
print 'Power at port 2(in W)=',round(b_2**2,4)
print 'Power at port 3(in W)=',round(b_3**2,4)
print 'Power at port 4(in W)=',b_4**2
Power at port 1(in W)= 0.4311
Power at port 2(in W)= 0.574
Power at port 3(in W)= 0.4272
Power at port 4(in W)= 6.35209e-05

Example 6.7 Page No : 227

In [12]:
import math 

In_loss = 0.5                         #in dB
Isolation = 30                        #in dB
S_11 = 0
S_22 = 0

#calculations
S_21 = 10**(-In_loss/20) 
S_12 = 10**(-Isolation/20)
S = [S_11,S_12,S_21,S_22]

#output
print 'Scattering matrix = [',
for k in S:
    print round(k,4),"," ,
print ']'
Scattering matrix = [ 0.0 , 0.01 , 0.9441 , 0.0 , ]

Example 6.9 Page No : 228

In [13]:
import math 



VSWR = 1
In_loss = 0.5                                    #in dB
Isolation = 20                                   #in dB

#calculations
S_12 = round(10**(-Isolation/20),4)
S_21 = round(10**(-In_loss/20),4)
S_23 = S_12
S_31 = S_12
S_32 = S_21
S_13 = S_21
p=round((VSWR-1)/(VSWR+1),4)
S_11 = p
S_22 = p
S_33 = p
S = [S_11,S_12,S_13],[S_21,S_22,S_23],[S_31,S_32,S_33]


#---output---#
print 'Scattering matrix =',S
Scattering matrix = ([0.0, 0.1, 0.9441], [0.9441, 0.0, 0.1], [0.1, 0.9441, 0.0])

Example 6.10 Page No : 232

In [14]:
import math 


In_loss = 0.5                       #insertion loss(in dB)
C = 20                              #in dB
D = 35                              #in dB
Pi = 90                             #in Watts

#calculations
Pi_Pf = 10**(C/10)
Pf = Pi/Pi_Pf
Pf_Pb = 10**(D/10)
Pb = Pf/Pf_Pb
P_rec = (Pi-Pf-Pb)                                  #Power received (in Watts)
P_rec_dB = 10*math.log(Pi/P_rec)/math.log(10)
P_rec_eff = P_rec_dB-In_loss                        #Effective power received (in dB)


#---output---#
print 'Effective power received (in dB)=',round(P_rec_eff,4)
Effective power received (in dB)= -0.5

Example 6.11 Page No : 239

In [15]:
import math 


S_13 = 0.1
S_14 = 0.05

#calculations
C = -20*math.log(S_13)/math.log(10)
D = 20*math.log(S_13/S_14)/math.log(10)
I = C+D

#---output---#
print 'Coupling (in dB) =',round(C,4)
print 'Directivity (in dB)) =',round(D,4)
print 'Isolation (in dB) =',round(I,4)
Coupling (in dB) = 20.0
Directivity (in dB)) = 6.0206
Isolation (in dB) = 26.0206

Example 6.12 Page No : 245

In [16]:
import math


D=3                          #distance of seperation(in cm)


#calculations
w_l=2*D                      #wavelength
d2_d1=2.5                    #d2-d1(in m)
S=w_l/(math.pi*d2_d1*10**-1)

#---output---#
print 'VSWR =',round(S,4)
VSWR = 7.6394

Example 6.13 Page No : 252

In [17]:
import math 


#---variables
w_l=7.2                    #wavelength (in cm)
x=10.5-9.3

#calculations
Phase_shift=(2*math.pi*x)/(w_l)

#---output---#
print 'Phase Shift (in degree) =',round(Phase_shift*180/math.pi,4)
Phase Shift (in degree) = 60.0