Chapter 4 : Communication Filters and Signal Transmission

Example 4.5 Page No : 120

In [5]:
import math 
from numpy import array,log10,sqrt

# Variables
f = array([500., 2000., 10000.]);    #frequency in Hz

# Calculations
Af = 1/sqrt(1+(f/1000)**8);   #Linear amplitude response
AdBf = 20*log10(Af);

# Results
print '   f,Hz     (Af)        (AdBf)'
for i in range(3):
    print ' %5i Hz   %.5f     %.3f dB'%(f[i],Af[i],AdBf[i])
   f,Hz     (Af)        (AdBf)
   500 Hz   0.99805     -0.017 dB
  2000 Hz   0.06238     -24.099 dB
 10000 Hz   0.00010     -80.000 dB

Example 4.6 Page No : 123

In [6]:
import math 

# Variables
L = 4.*10**-6;   #Henry
C = 9.*10**-12;  #Farad
R = 20.*10**3;    #ohm

# Calculations and Results
f0 = 1/(2*math.pi*math.sqrt(L*C));    #frequency in Hz
print 'a) The resonant frequency is f0 = %.2f  MHz'%(f0*10**-6)
Q = R*math.sqrt(C/L)
print ' b) The Q is %i'%(Q);
B = f0/Q;
print ' c) The 3-dB bandwidth is B = %i KHz'%(B*10**-3);
a) The resonant frequency is f0 = 26.53  MHz
 b) The Q is 30
 c) The 3-dB bandwidth is B = 884 KHz

Example 4.7 Page No : 125

In [7]:
# Variables
#misprinted example number
pulse_width = 2*10**-6;    #second
rise_time = 10*10**-9;      #second

# Calculations and Results
B = .5/pulse_width;       #in Hz
print 'a) The aproximate bandwidth for coarse reproduction is B = %i  KHz'%(B*10**-3)
B = .5/rise_time;
print ' b) The aproximate bandwidth for fine reproduction is B = %i  MHz'%(B*10**-6)
a) The aproximate bandwidth for coarse reproduction is B = 250  KHz
 b) The aproximate bandwidth for fine reproduction is B = 50  MHz