Chapter 1 : Introduction

Example 1.1 Page No : 4

In [15]:
# Variables
c = 3*10**8;     #in m/s
f = 1.*10**6;     #in Hz

# Calculations
lembda = c/f;

# Results
print 'Wavelength (in m):',lembda
Wavelength (in m): 300.0

Example 1.2 Page No : 4

In [16]:
# Variables
c = 3*10**8;     #in m/s
f = 100.*10**6;     #in Hz

# Calculations
lembda = c/f;

# Results
print 'Wavelength (in m):',lembda
Wavelength (in m): 3.0

Example 1.3 Page No : 9

In [17]:
import math 

# Variables
G = 175.;     #absolute gain

# Calculations
Gdb = 10*math.log10(175);   #decibell gain

# Results
print 'The decibell power gain is:',Gdb,'dB'
The decibell power gain is: 22.4303804869 dB

Example 1.4 Page No : 9

In [18]:
# Variables
Gdb = 28.;   #decibell gain

# Calculations
G = 10**(Gdb/10);  #Absolute power gain

# Results
print 'The absolute power gain is:',G
The absolute power gain is: 630.95734448

Example 1.5 Page No : 10

In [19]:
# Variables
Gdb = 28.;   #decibell gain

# Calculations
G = 10**(Gdb/10);  #Absolute power gain
Av = G**0.5;  #Voltage gain

# Results
print 'The voltage gain is:',Av
The voltage gain is: 25.1188643151

Example 1.6 Page No : 10

In [20]:
import math 

# Variables
G = 0.28; #Absolute gain
P1 = 1;  
P2 = .28;  #28 % of input power

# Calculations and Results
Gdb = 10*math.log10(G);
print 'Decibell gain is',Gdb,'dB'

Ldb = 10*math.log10(P1/P2); #dB loss
print 'Decibell loss is:',Ldb,'dB'
Decibell gain is -5.52841968658 dB
Decibell loss is: 5.52841968658 dB

Example 1.7 Page No : 11

In [21]:
import math 

# Variables
PmW = 100.; #power in mW

# Calculations and Results
PdBm = 10*math.log10(PmW/1);  #P in dBm level
print '(a).   Power in dBm level is:',PdBm,'dBm'

PdBW = PdBm-30;  #P in dBW level
print '(b).   Power in dBW level is:',PdBW,'dBW'

PdBf = PdBm+120;  #Pin dBf level
print '(c)   Power in dBf level is:',PdBf,'dBf'
(a).   Power in dBm level is: 20.0 dBm
(b).   Power in dBW level is: -10.0 dBW
(c)   Power in dBf level is: 140.0 dBf

Example 1.8 Page No : 13

In [22]:
import math 

# Variables
G1 = 5000.;
L = 2000.;
G2 = 400.;

# Calculations and Results
G = G1*(1/L)*G2;   #Absolute gain
print '(a)  Net absolute gain is:',G

GdB = 10*math.log10(G);  #System decibell gain
print '(b)  System Decibel gain is:',GdB,'dB'

G1dB = 10*math.log10(G1);
LdB = 10*math.log10(L);
G2dB = 10*math.log10(G2);
print ('(c)   Individual stage gains are:');
print 'G1dB = ',G1dB
print 'LdB = ',LdB
print 'G2dB = ',G2dB

GdB = G1dB-LdB+G2dB;
print 'The net dB gain is:',GdB,'dB'
(a)  Net absolute gain is: 1000.0
(b)  System Decibel gain is: 30.0 dB
(c)   Individual stage gains are:
G1dB =  36.9897000434
LdB =  33.0102999566
G2dB =  26.0205999133
The net dB gain is: 30.0 dB

Example 1.9 Page No : 13

In [23]:
import math 

# Variables
G1 = 5000.;
L = 2000.;
G2 = 400.;
Ps = 0.1;  #in mW

# Calculations and Results
P1 = G1*Ps;  #in mW
print '(a)  Power level P1 is:',P1,'mW'

P2 = P1/L;  #in mW
print 'Line output power P2:',P2,'mW'

Po = G2*P2;  #in mW
print 'System output power Po:',Po,'mW'

PsdBm = 10*math.log10(Ps/1);
G1dB = 10*math.log10(G1);
LdB = 10*math.log10(L);
G2dB = 10*math.log10(G2);

print ('(b)  Output power power levels in dBm are');
P1dBm = PsdBm+G1dB;
print 'P1(dBm) = ',P1dBm,'dBm'

P2dBm = P1dBm-LdB;
print 'P2(dBm) = ',P2dBm,'dBm'

PodBm = P2dBm+G2dB;
print 'Po(dBm) = ',PodBm,'dBm'
(a)  Power level P1 is: 500.0 mW
Line output power P2: 0.25 mW
System output power Po: 100.0 mW
(b)  Output power power levels in dBm are
P1(dBm) =  26.9897000434 dBm
P2(dBm) =  -6.02059991328 dBm
Po(dBm) =  20.0 dBm

Example 1.10 Page No : 14

In [25]:
import math 

def voltage(PdBm):
    P = 1*10**(-3)*(10**(PdBm/10));
    return (75*P)**0.5;

# Variables
S = 10.;  #dBm
G1 = 13.;  #dB
L1 = 26.;  #dB
G2 = 20.;  #dB
L2 = 29.;  #dB

# Calculations and Results
print '(a)  The output levels are',
PdBm = S;
V = voltage(PdBm);
print PdBm,'1. Signal source in dBm:',PdBm,'in Volts : ',V

PdBm = S+G1;
V = voltage(PdBm);
print '2. Line Amplifier in dBm:',PdBm,'in Volts : ',V

PdBm = S+G1-L1;
V = voltage(PdBm);
print '3. Cable section A in dBm:',PdBm,'in Volts : ',V

PdBm = S+G1-L1+G2;
V = voltage(PdBm);
print '4. Booster amplifier in dBm:',PdBm,'in Volts : ',V

PdBm = S+G1-L1+G2-L2;
V = voltage(PdBm);
print '5. Cable section B in dBm:',PdBm,'in Volts : ',V
print ('(b).  The output power to get a voltage of 6V'),
V = 6.;   #volts
R = 75.;  #ohm
Po = (V**2)/R;
print Po,'W';
PodBm = 10*math.log10(Po*1000/1);
print 'power in dBm',PodBm,'dBm'

GrdB = PodBm-PdBm;
print 'The required gain is',GrdB,'dB'
(a)  The output levels are 10.0 1. Signal source in dBm: 10.0 in Volts :  0.866025403784
2. Line Amplifier in dBm: 23.0 in Volts :  3.86839338256
3. Cable section A in dBm: -3.0 in Volts :  0.193878937799
4. Booster amplifier in dBm: 17.0 in Volts :  1.93878937799
5. Cable section B in dBm: -12.0 in Volts :  0.0687908430214
(b).  The output power to get a voltage of 6V 0.48 W
power in dBm 26.8124123738 dBm
The required gain is 38.8124123738 dB

Example 1.11 Page No : 17

In [27]:
import math 

# Variables
P = 5.;   #In mW
N = 100.*10**-6;  #in mW

# Calculations and Results
S2N = P/N;
print '(a)    Absolute signal to noise ratio :',S2N

S2NdB = 10*math.log10(S2N);
print '(b)   dB signal to noise ratio is:',S2NdB,'dB'

PdBm = 10*math.log10(P/1);
print '(c)    Signal Power is',PdBm,'dBm'

NdBm = 10*math.log10(N/1);
print 'Noise power is',NdBm,'dBm'

S2NdB = PdBm-NdBm;
print 'Decinel S/N ratio is',S2NdB,'dB'
(a)    Absolute signal to noise ratio : 50000.0
(b)   dB signal to noise ratio is: 46.9897000434 dB
(c)    Signal Power is 6.98970004336 dBm
Noise power is -40.0 dBm
Decinel S/N ratio is 46.9897000434 dB