In [1]:

```
#page no.133
op=15.
l=2.
n=2.
l1=n*l#connector loss
l2=3.#coaxial cable loss
tl=l1+l2#total loss
ip=op-tl#input=output-total loss
print '%s %s %d %s' %('signal level at the i/p of the antenna is =','+',ip,'dBm')
```

In [2]:

```
#page no. 136
import math
ci=18.
CI=10.**((ci)/10.)
q=(6*(CI))**0.25
K=math.ceil(q*q/3)#cluster size
print'%s %d' %('minimum cluster size is K =',K)
k=7
q1=math.sqrt(3*k)
c1i1=q1**4/6
C1I1=10*math.log10(c1i1)
if (C1I1<20):
print('cluster size cannot meet the desired C/I requirement')
C2I2=10**(20/10)
q2=(6*C2I2)**0.25
k1=math.ceil((q2)**2/3)
print'%s %d' %('nearest valid cluster size is K =',k1)
else:
print('cluster size determined is adequate')
```

In [3]:

```
#page no. 139
import math
Y=4.#path loss exponent
N=6.
K=7.
q=math.sqrt(3.*K)
CI=(2.*(q-1.)**(-Y)+2.*q**(-Y)+2.*(q+1.)**(-Y))**(-1.)#C/I for omnidirectional operating cell
CIdB=10.*math.log10(CI)
print'%s %d %s' %('co-channel interfernce ratio C/I for K=7 is =',CIdB,'dB')
K1=9.
q1=math.sqrt(3.*K1)
CI1=(2.*(q1-1.)**(-Y)+2.*q1**(-Y)+2.*(q1+1.)**(-Y))**(-1.)
CI1dB=10.*math.log10(CI1)
print'%s %.1f %s' %('co-channel interfernce ratio C/I for K=9 is =',CI1dB,'dB')
K2=12.
q2=math.sqrt(3.*K2)
CI2=(2.*(q2-1.)**(-Y)+2.*q2**(-Y)+2.*(q2+1.)**(-Y))**(-1.)
CI2dB=10.*math.log10(CI2)
print'%s %.1f %s' %('co-channel interfernce ratio C/I in dB for K=12',CI2dB,'dB')
if (CIdB<18) :
print('K=7 is imperfect')
else :
print('K=7 is perfect')
#end
if (CI1dB<18):
print('K=9 is imperfect')
else:
print('K=9 is perfect')
#end
if (CI2dB<18) :
print('K=12 is imperfect')
else:
print('K=12 is perfect')
#end
```

In [4]:

```
#page no.142
import math
N=2.
Y=4.
K=7.
q=math.sqrt(3*K)
CI=((q**(-Y)+(q+0.7)**(-Y)))**(-1)#C/I for 3-sector
CIdB=10*math.log10(CI)
print'%s %.1f %s' %('worst case signal to co-channel interfernce ratio C/I is =',CIdB,'dB')
```

In [5]:

```
#page no.143
import math
N=2
Y=4
K=4
q=math.sqrt(3*K)
CI=((q**(-Y)+(q+0.7)**(-Y)))**(-1)#C/I for 3-sector
CIdB=10*math.log10(CI)
print'%s %d %s' %('worst case C/I is',round(CIdB),'dB')
if CIdB>18 :
a= CIdB-6
if a>18 :
print('K=4 is adequate system as C/I is still geater than 18dB after considering the practical conditions with reductions of 6dB ')
else :
print('K=4 is inadequate system as C/I is smaller than 18dB after considering the practical conditions with reductions of 6dB ')
#end
else:
print('K=4 is inadequate system as C/I is less than the minimum required value of 18dB ')
#end
```

In [6]:

```
#page no.145
import math
N=1.
Y=4.
K=7.
q=math.sqrt(3.*K)
CI=((q+0.7)**(-Y))**(-1.)#C/I for 6-sector
CIdB=10.*math.log10(CI)
print'%s %d %s' %('signal to co-channel interfernce ratio C/I is =',round(CIdB),'dB')
```

In [7]:

```
#page no. 146
import math
N=1.
Y=4.
K=4.
q=math.sqrt(3.*K)
CI=((q+0.7)**(-Y))**(-1)#C/I for 6-sector
CIdB=10.*math.log10(CI)
print'%s %.2f %s' %('signal to co-channel interfernce ratio C/I is =',CIdB,'dB')
if CIdB>18 :
a= CIdB-6
if a>18:
print('K=4 is adequate system as C/I is still geater than 18dB after considering the practical conditions with reductions of 6dB ')
else :
print('K=4 is inadequate system as C/I is smaller than 18dB after considering the practical conditions with reductions of 6dB ')
#end
else:
print('K=4 is inadequate system as C/I is less than the minimum required value of 18dB ')
#end
```

In [8]:

```
#page no.146
CIdB=15.
CI=10.**(CIdB/10.)
q=(6.*(CI))**0.25
K=q*q/3.
if K >4:
K=7.
print'%s %d' %('optimum value of K for an omnidirectional antenna design is K =',K)
q1=(CI**0.25-0.7)
k=q1*q1/3.
if k<3:
k=3
#end
print'%s %d' %('practical value of K for 6-sector 60deg. directionl antenna design is K =',k)
```

In [9]:

```
#page no. 148
N=312.
K=7.
Nspc=3.
Ntcpc=N/K
Ntcps=Ntcpc/Nspc#number of traffic channels per sector
print'%s %.f' %('number of traffic channels per sector for System A is =',Ntcps)
N1=312.
K1=4.
Nspc1=6.
Ntcpc1=N1/K1
Ntcps1=Ntcpc1/Nspc1#number of traffic channels per sector
print'%s %.f' %('number of traffic channels per sector for System B is =',Ntcps1)
```