# Chapter 10 - Digital Multiplexers¶

## Example 1 - pg 469¶

In [1]:
#calculate the minimum value of permissible sampling rate

#given
X_1 = 4.*10**3#first analog signal in Hz
X_2 = 4.5*10**3#second analog signal in Hz

#calculation
#the highest frequency cmponent of the composite signal consisting among two signal is X_2
f_sMIN = 2*X_2;

print "The minimum value of permissible sampling rate (kHz) = ",f_sMIN/1000.

The minimum value of permissible sampling rate (kHz) =  9.0


## Example 2 - pg 469¶

In [2]:
#calculate the signalling rate and minimum channel bandwidth

#given
X_1 = 6.*10**3#Nyquist rate in Hz obtained the table
X_2 = 2.*10**3#Nyquist rate in Hz obtained the table
X_3 = 2.*10**3#Nyquist rate in Hz obtained the table
X_4 = 2.*10**3#Nyquist rate in Hz obtained the table

#calculations
s = 2000#speed of rotation
X1 = 3*s#number of samples produced per second for first signal
X2 = 1*s#number of samples produced per second for second signal
X3 = X2#number of samples produced per second for third signal
X3 = X2#number of samples produced per second for fourth signal
SR = X1 + 3*X2#signalling rate
BW = .5*SR#minimum channel bandwidth

#results
print "If the sampling commutator rotates at the rate of 2000 rotations per second the the signals X_1,X_2,X_3,X_4 will be sampled at their Nyquist rate"
print "Signalling rate (samples per second) = ",SR
print "Minimum channel bandwidth (Hz) = ",BW

If the sampling commutator rotates at the rate of 2000 rotations per second the the signals X_1,X_2,X_3,X_4 will be sampled at their Nyquist rate
Signalling rate (samples per second) =  12000
Minimum channel bandwidth (Hz) =  6000.0


## Example 3 - pg 470¶

In [3]:
#calculate the sampling rate and Nyquist rate

#given
SR = 8000.#sampling rate in samples per second
T = 1.*10**-6#pulse duration
f = 3.4*10**3#highest frequency component

#calculations
#second case
NR = 2.*f#Nyquist rate of sampling
T2 = 1./NR#time taken for one rotation of commutator

#results
print "sampling rate for first condition = ",SR
print "There are 24 voice signals + 1 synchronizing pulse"
print "Pulse width of each voice channel and synchronizing pulseis 1 microseconds "
print "Now, time taken by the commutator for 1 rotation =1/8000 = 125*10**-6 seconds"
print "Number of pulses produced in one rotation = 24 + 1 = 25"
print "Therefore, the leading edges of the pulses are at 125/25 = 5*10^-6 seconds distance"
print "Nyquist rate for second condition (kHz) = ",NR/1000.
print "Time taken for one rotation of commutator (museconds) = ",round(T2*10**6,2)
print "Therefore, 147*10**-6 seconds corresponds to 25 pulses"
print "therefore, 1 pulse corresponds to 5.88*10^-6 seconds"
print "As the pulse width of each pulse is 1*10^-6 seconds, the spacing between adjacent pulses will be 4.88*10**-6 seconds\n and if we assume tou = 0 then the spacing between the adjacent pulses will be 5.88*10**-6 seconds "

sampling rate for first condition =  8000.0
There are 24 voice signals + 1 synchronizing pulse
Pulse width of each voice channel and synchronizing pulseis 1 microseconds
Now, time taken by the commutator for 1 rotation =1/8000 = 125*10**-6 seconds
Number of pulses produced in one rotation = 24 + 1 = 25
Therefore, the leading edges of the pulses are at 125/25 = 5*10^-6 seconds distance
Nyquist rate for second condition (kHz) =  6.8
Time taken for one rotation of commutator (museconds) =  147.06
Therefore, 147*10**-6 seconds corresponds to 25 pulses
therefore, 1 pulse corresponds to 5.88*10^-6 seconds
As the pulse width of each pulse is 1*10^-6 seconds, the spacing between adjacent pulses will be 4.88*10**-6 seconds
and if we assume tou = 0 then the spacing between the adjacent pulses will be 5.88*10**-6 seconds


## Example 4 - pg 471¶

In [4]:
#calculate the Signaling rate and minimum channel bandwidth

#given
N = 6.#number of channels
f_m = 5.*10**3#bandwidth of each channel

#calculations
SR1= 2*f_m#minimum sampling rate
SR = N*SR1#sampling rate
BW =N*f_m#minimum channel bandwidth

#results
print "Signaling rate (Kbits per second) = ",SR/1000.
print "Minimum channel bandwidth (kHz) = ",BW/1000.

Signaling rate (Kbits per second) =  60.0
Minimum channel bandwidth (kHz) =  30.0


## Example 6 - pg 476¶

In [5]:
#calculate the number of framing plus signaling bits per frame

#given
channel=64*10**3 #kb/s
bitrate=2.048*10**6 #bits/sec

#calculations
fs_min=channel*2
x=bitrate/fs_min

#results
print 'No. of bits per frame = ',x

No. of bits per frame =  16.0