#Variable declaration
ToCH=960.;# Total available channels
Cellarea=6.; #in km^2
Covarea=2000.;#in km^2
N1=4.; # Cluster Size
N2=7.; #Cluster Size
#Calculations
Area1=N1*Cellarea;#for N=4
Area2=N2*Cellarea;#For N=7
No_of_clusters1=round(Covarea/Area1);
No_of_clusters2=round(Covarea/Area2);
No_of_CH1=ToCH/N1; # No of channels with cluster size 4
No_of_CH2=ToCH/N2; # No of channels with cluster size 7
SysCap1=No_of_clusters1*ToCH;
SysCap2=No_of_clusters2*ToCH;
#Results
print 'System Capacity with cluster size 4 is %d channels'%SysCap1
print 'Number of clusters for covering total area with N equals 4 are %d'%No_of_clusters1
print 'System Capacity with cluster size 7 is %d channels'%SysCap2
#Variable declaration
S_IAMP=18.;# S/I ratio in dB
S_IGSM=12.;# S/I ratio in dB
PPL=4.; # propogation path loss coefficient
#Calculations
# Using Equation 5.16 on page no 132, we get
N_AMP=(1./3)*((6*10**(0.1*S_IAMP))**(2/PPL));#reuse factor for AMPS
N_GSM=(1./3)*((6*10**(0.1*S_IGSM))**(2/PPL));#reuse factor for GSM
#Result
print 'Reuse Factor for AMP system is N = %.3f = approx %d \n'%(N_AMP,N_AMP+1);
print 'Reuse Factor for GSM system is N = %.3f = approx %d \n'%(N_GSM,N_GSM+1);
import math
#Variable declaration
VCH=395.;#Total voice channels
CallHT=120.;#average call holding time in sec
Blocking=0.02;# 2%
PPL=4.; #propogation path loss coefficient
N1=4. #reuse factor
N2=7.; #reuse factor
N3=12.; #reuse factor
#Calculations&Results
No_of_VCH1=VCH/N1; #for reuse factor N1
No_of_VCH2=VCH/N2; #for reuse factor N2
No_of_VCH3=VCH/N3; #for reuse factor N3
print 'NO of voice channels for N=4 are %d'%(round(No_of_VCH1));
print 'NO of voice channels for N=7 are %d'%(round(No_of_VCH2));
print 'NO of voice channels for N=12 are %d\n'%(round(No_of_VCH3));
TrafLoad1=87.004;
Carryload1=(1-Blocking)*TrafLoad1;
TrafLoad2=45.877;
Carryload2=(1-Blocking)*TrafLoad2;
TrafLoad3=24.629;
Carryload3=(1-Blocking)*TrafLoad3;
# To find cell capacity
Ncall1=Carryload1*3600/CallHT;#Calls per hour per cell
Ncall2=Carryload2*3600/CallHT;
Ncall3=Carryload3*3600/CallHT;
print 'calls per hour per cell for N=4 are %d'%(round(Ncall1));
print 'calls per hour per cell for N=7 are %d'%(round(Ncall2));
print 'calls per hour per cell for N=12 are %d \n'%(Ncall3);
# To find S BY I
# N=(1/3)[6*(S/I)]**(2/PPL)
S_I1=10*(PPL/2)*(math.log10(N1)-math.log10(1./3)-(2./PPL)*math.log10(6));#Mean S/I (dB)
S_I2=10*(PPL/2)*(math.log10(N2)-math.log10(1./3)-(2./PPL)*math.log10(6));
S_I3=10*(PPL/2)*(math.log10(N3)-math.log10(1./3)-(2./PPL)*math.log10(6));
print 'Mean S/I(dB) for N=4 is %.1f'%S_I1
print 'Mean S/I(dB) for N=7 is %.1f'%S_I2
print 'Mean S/I(dB) for N=12 is %.1f'%S_I3
import math
#Variable declaration
spectrum=12.5*10**6; #in Hz
CHBW=200*10**3;#in Hz
N=4.;#reuse factor
Blocking=0.02; # 2%
callHT=120.;#average call holding time in sec
PPL=4.;#propogation path loss coefficient
CntrlCH=3.; #No of control channels
Ts=8.; # No of voice channels per RF channel
#Calculations&Results
No_ofVCH=((spectrum*Ts)/(CHBW*N))-CntrlCH;
print 'No of voice channels for N=4 are %d'%(No_ofVCH)
TrafLoad=110.;
CarryLoad=(1-Blocking)*TrafLoad;
Ncall=CarryLoad*3600/callHT;
print 'Calls per hour per cell for N=4 are %d calls/hour/cell \n '%(round(Ncall));
S_I=10*(PPL/2)*(math.log10(N)-math.log10(1./3)-(2./PPL)*math.log10(6));
print 'Mean S/I(dB) for N=4 is %.1f dB \n '%(S_I)
import math
#Variable declaration
VCH=395.;#Total allocated voice channels
CHBW=30.; # in kHz
Spectrum=12.5; # in MHz
CallHT=120.; #Average call holding time in sec
Blocking=0.02; # 2%
PL=40.; #slope of path loss in dBperdecade
#Calculations&Results
print "We consider only the first tier interferers and neglect the effects of cochannel interference from the second and other higher tiers."
#FOR 120degree sectorization
#N=4
VCH11=(VCH/(4*3));
OffLoad11=24.629; # Offered traffic load per sector from Erlang-B table(Appendix A)
Load_site11=3*OffLoad11;
CarLoad11=(1-Blocking)*Load_site11;
Calls_hr_site11=CarLoad11*3600/CallHT;
R11=math.sqrt(CarLoad11/0.52);
Seff11=CarLoad11/(2.6*Spectrum*R11**2);
S_I11=PL*math.log10(math.sqrt(3*4))-10*math.log10(2);
#N=7
VCH12=(VCH/(3*7));
OffLoad12=12.341; # Offered traffic load per sector from Erlang-B table(Appendix A)
Load_site12=3*OffLoad12;
CarLoad12=(1-Blocking)*Load_site12;
Calls_hr_site12=CarLoad12*3600/CallHT;
R12=math.sqrt(CarLoad12/0.52);
Seff12=CarLoad12/(2.6*Spectrum*R12**2);
S_I12=PL*math.log10(math.sqrt(3*7))-10*math.log10(2);
#N=12
VCH13=VCH/(3*12);
OffLoad13=5.842; # Offered traffic load per sector from Erlang-B table(Appendix A)
Load_site13=3*OffLoad13;
CarLoad13=(1-Blocking)*Load_site13;
Calls_hr_site13=CarLoad13*3600/CallHT;
R13=math.sqrt(CarLoad13/0.52);
Seff13=CarLoad13/(2.6*Spectrum*R13**2);
S_I13=PL*math.log10(math.sqrt(3*12))-10*math.log10(2);
#For omnidirectional
#N=4
VCH21=VCH/(4);
OffLoad21=87.004; # Offered traffic load per sector from Erlang-B table(Appendix A)
Load_site21=OffLoad21;
CarLoad21=(1-Blocking)*Load_site21;
Calls_hr_site21=CarLoad21*3600/CallHT;
R21=math.sqrt(CarLoad21/0.52);
Seff21=CarLoad21/(2.6*Spectrum*R21**2);
S_I21=PL*math.log10(math.sqrt(3*4))-10*math.log10(6);
#N=7
VCH22=VCH/(7);
OffLoad22=46.817; # Offered traffic load per sector from Erlang-B table(Appendix A)
Load_site22=OffLoad22;
CarLoad22=(1-Blocking)*Load_site22;
Calls_hr_site22=CarLoad22*3600/CallHT;
R22=math.sqrt(CarLoad22/0.52);
Seff22=CarLoad22/(2.6*Spectrum*R22**2);
S_I22=PL*math.log10(math.sqrt(3*7))-10*math.log10(6);
#N=12
VCH23=VCH/(12);
OffLoad23=24.629; # Offered traffic load per sector from Erlang-B table(Appendix A)
Load_site23=OffLoad23;
CarLoad23=(1-Blocking)*Load_site23;
Calls_hr_site23=CarLoad23*3600/CallHT;
R23=math.sqrt(CarLoad23/0.52);
Seff23=CarLoad23/(2.6*Spectrum*R23**2);
S_I23=PL*math.log10(math.sqrt(3*12))-10*math.log10(6);
# For 60degree Sectorization
#N=3
VCH31=VCH/(6*3);
OffLoad31=14.902; # Offered traffic load per sector from Erlang-B table(Appendix A)
Load_site31=6*OffLoad31;
CarLoad31=(1-Blocking)*Load_site31;
Calls_hr_site31=CarLoad31*3600/CallHT;
R31=math.sqrt(CarLoad31/0.52);
Seff31=CarLoad31/(2.6*Spectrum*R31**2);
S_I31=PL*math.log10(math.sqrt(3*3))-10*math.log10(1);
#N=4
VCH32=VCH/(6*4);
OffLoad32=10.656; # Offered traffic load per sector from Erlang-B table(Appendix A)
Load_site32=6*OffLoad32;
CarLoad32=(1-Blocking)*Load_site32;
Calls_hr_site32=CarLoad32*3600/CallHT;
R32=math.sqrt(CarLoad32/0.52);
Seff32=CarLoad32/(2.6*Spectrum*R32**2);
S_I32=PL*math.log10(math.sqrt(3*4))-10*math.log10(1);
#N=7
VCH33=VCH/(6*7);
OffLoad33=5.084; # Offered traffic load per sector from Erlang-B table(Appendix A)
Load_site33=6*OffLoad33;
CarLoad33=(1-Blocking)*Load_site33;
Calls_hr_site33=CarLoad33*3600/CallHT;
R33=math.sqrt(CarLoad33/0.52);
Seff33=CarLoad33/(2.6*Spectrum*R33**2);
S_I33=PL*math.log10(math.sqrt(3*7))-10*math.log10(1);
#N=12
VCH34=VCH/(6*12);
OffLoad34=2.227; # Offered traffic load per sector from Erlang-B table(Appendix A)
Load_site34=6*OffLoad34;
CarLoad34=(1-Blocking)*Load_site34;
Calls_hr_site34=CarLoad34*3600/CallHT;
R34=math.sqrt(CarLoad34/0.52);
Seff34=CarLoad34/(2.6*Spectrum*R34**2);
S_I34=PL*math.log10(math.sqrt(3.*12))-10*math.log10(1);
print 'For Omnidirectional Calls_per_hour_per_cellsite Mean S_I ratio SpecrtalEfficiency'
print 'For N=4 %d %.1f %.3f\n'%(Calls_hr_site21,S_I21,Seff21);
print 'For N=7 %d %.1f %.3f\n'%(Calls_hr_site22,S_I22,Seff22);
print 'For N=12 %d %.1f %.3f\n'%(Calls_hr_site23,S_I23,Seff23);
print 'For 120deg sector Calls_per_hour_per_cellsite Mean S_I ratio SpecrtalEfficiency\n'
print 'For N=4 %d %.1f %.3f\n'%(Calls_hr_site11,S_I11,Seff11);
print 'For N=7 %d %.1f %.3f\n'%(Calls_hr_site12,S_I12,Seff12);
print 'For N=12 %d %.1f %.3f\n'%(Calls_hr_site13,S_I13,Seff13);
print 'For 60 deg Sector Calls_per_hour_per_cellsite Mean S_I ratio SpecrtalEfficiency\n'
print 'For N=3 %d %.1f %.3f\n'%(Calls_hr_site31,S_I31,Seff31);
print 'For N=4 %d %.1f %.3f\n'%(Calls_hr_site32,S_I32,Seff32);
print 'For N=7 %d %.1f %.3f\n'%(Calls_hr_site33,S_I33,Seff33);
print 'For N=12 %d %.1f %.3f\n'%(Calls_hr_site34,S_I34,Seff34);