{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter No.7 : Equalization diversity and channel coding"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example no 7.3 Page no. 373"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" The maximum Doppler shift = 66.67 Hz\n",
"\n",
" The coherence time of the channel = 6.35 ms\n",
"\n",
" The maximum number of symbols that could be transmitted with symbol rate 24.3 ksymbols/sec = 154 symbols\n"
]
}
],
"source": [
"from __future__ import division\n",
"from math import pi,sqrt\n",
"# To determine a)the maximum Doppler shift b)the coherence time of the channel c)the maximum number of symbolsthat could be transmitted\n",
"\n",
"\n",
"#Given data\n",
"f=900*10**6# # Carrier frequency in Hz\n",
"c=3*10**8# # Speed of ligth in air (m/s)\n",
"v=80# # Velocity of mobile in km/hr\n",
"v=v*(5/18)# # Velocity of mobile in m/s\n",
"lamda=c/f# # Carrier wavelength in meter\n",
"\n",
"# a)To determine the maximum Doppler shift\n",
"fd=v/lamda# # The maximum Doppler shift in Hz\n",
"\n",
"# b)To determine the coherence time of the channel\n",
"Tc=sqrt(9/(16*pi*fd**2))# # The coherence time of the channel\n",
"# Answer is varrying due to round-off error\n",
"\n",
"# c)To determine the maximum number of symbols that could be transmitted with symbol rate 24.3 ksymbols/sec\n",
"Rs=24.3*10**3# # Symbol rate in symbols/sec\n",
"Nb=Tc*Rs# # The maximum number of transmitted symbols\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n The maximum Doppler shift = %0.2f Hz'%(fd)#\n",
"print '\\n The coherence time of the channel = %0.2f ms'%(Tc*10**3)#\n",
"print '\\n The maximum number of symbols that could be transmitted with symbol rate 24.3 ksymbols/sec = %0.0f symbols'%(Nb)#"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example no 7.4 Page no. 383"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" Probability that the SNR will drop below 10dB when 4 branch diversity is used = 0.000082\n",
"\n",
" Probability that the SNR will drop below 10dB when single branch diversity is used = 0.095\n",
"\n",
" \n",
" From above results, it is observed that without diversity the SNR drops below the specified threshold with a probability that is three orders of magnitude greater \n",
" than if four branch diversity is used.\n"
]
}
],
"source": [
"from __future__ import division\n",
"from math import exp\n",
"# To determine probability that the SNR will drop below threshold SNR\n",
"\n",
"\n",
"# Given data\n",
"M1=4# # Number of branch diversity\n",
"M2=1# # Number of branch diversity\n",
"gamm=10# # Specified SNR threshold in dB\n",
"gamm=10**(gamm/10)# # Specified SNR threshold\n",
"Gamma=20# # Average SNR in dB\n",
"Gamma=10**(Gamma/10)# # Average SNR\n",
"\n",
"# Probability that the SNR will drop below 10dB when 4 branch diversity is used\n",
"P4=(1-exp(-gamm/Gamma))**M1# # Probability that the SNR will drop below 10dB\n",
"\n",
"# Probability that the SNR will drop below 10dB when single branch diversity is used\n",
"P1=(1-exp(-gamm/Gamma))**M2# # Probability that the SNR will drop below 10dB\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n Probability that the SNR will drop below 10dB when 4 branch diversity is used = %0.6f'%(P4)#\n",
"print '\\n Probability that the SNR will drop below 10dB when single branch diversity is used = %0.3f'%(P1)#\n",
"print '\\n \\n From above results, it is observed that without diversity the SNR drops below the specified threshold with a probability that is three orders of magnitude greater \\n than if four branch diversity is used.'"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.9"
}
},
"nbformat": 4,
"nbformat_minor": 0
}