Chapter 10 : Phase Locked Loops

Example 10.3 Page No : 520

In [2]:
import math 
#page 520
#problem 10.3

# Part (a)

#Input SNR SNR_ip
SNR_ip  =  1000.;

#Beta B
B  =  10.;

#Output SNR SNR_op
SNR_op  =  (1.5*(B**2)*SNR_ip)/(1 + (12*B/math.pi)*(SNR_ip)*math.exp(-0.5*(1/(B+1))*(SNR_ip)));

print 'Output SNR  is %.4f'%(10*math.log10(SNR_op)),' dB'

# Part (b)

#Input SNR SNR_ip
SNR_ip  =  10;

#Output SNR SNR_op
SNR_op  =  (1.5*(B**2)*SNR_ip)/(1 + (12*B/math.pi)*(SNR_ip)*math.exp(-0.5*(1/(B+1))*(SNR_ip)));

print 'Output SNR  is %.4f'%(10*math.log10(SNR_op)),' dB',
Output SNR  is 51.7609  dB
Output SNR  is 7.8968  dB

Example 10.5 Page No : 533

In [2]:
#Given reference frequency is fref  =  10 MHz
fref  =  10. * 10**6;

#Given step frequency is fstep  =  100 KHz
fstep  =  100. * 10**3;

#Division ratio M
M  =  fref/fstep;

#Required output frequency F  =  100.6 MHz
F  =  100.6 * 10**6;

N  =  F/fstep;

#Given P  =  64
P  =  64;

#Truncating value B  =  15
B  =  15;

A  =  N - P*B;

print 'The value of A is ',A
print 'The value of B is ',B
print 'The value of M is ',M
The value of A is  46.0
The value of B is  15
The value of M is  100.0

Example 10.7 Page No : 534

In [3]:
#Given reference frequency for PLL is fref  =  0.48 MHz
fref  =  0.48 * 10**6;

#Frequency divider N  =  2000
N  =  2000;

#Output Frequency fout
fout  =  fref*N;

#Output Frequency favg
favg  =  (2000*15 + 2001*1)*(0.48/16) * 10**6;

print 'Output frequency is ',fout,' Hz'

#Reference frequency is not subdivided before going to comparator and it is an integer divider in the feedback path the frequency resolution fres  =  0.48 * 10**6;
fres  =  0.48 * 10**6;

print 'Frequency resolution is ',fres,' Hz'
print 'Output frequency resolution is ',favg - fout,' Hz'
Output frequency is  960000000.0  Hz
Frequency resolution is  480000.0  Hz
Output frequency resolution is  30000.0  Hz