summaryrefslogtreecommitdiff
path: root/Principles_Of_Electronic_Communication_Systems/chapter11.ipynb
blob: 015bcc799d8d2c2aaf68c524c7f9ef41c2e04286 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
{
 "metadata": {
  "name": "",
  "signature": "sha256:8bd5af3b2acf26b36843842ce0fbb28501e7f5eae117a0af6c810fe6d60c2891"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 11 The Transmission of binary data in communication systems"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 11.1 Page no 392"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "t=0.0016\n",
      "No_words=256.0\n",
      "bits_word = 12.0\n",
      "\n",
      "#Calculation\n",
      "tword= t/No_words\n",
      "tbit = tword/bits_word\n",
      "bps =1/tbit\n",
      "\n",
      "#Result\n",
      "print\"(a) The time duration of the word \",tword*10**8,\"microsecond\"\n",
      "print\"(b) The time duration of the one bit is \",round(tbit*10**8,4),\"microseconds\"\n",
      "print\"(c) The speed of transmission is \",bps/10**5,\"kbps\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a) The time duration of the word  625.0 microsecond\n",
        "(b) The time duration of the one bit is  52.0833 microseconds\n",
        "(c) The speed of transmission is  19.2 kbps\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 11.2 Page no 400"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "B=12.5*10**3\n",
      "SN_dB= 25\n",
      "\n",
      "#Calculation\n",
      "import math\n",
      "C_th = 2*B\n",
      "SN=316.2\n",
      "C =B*3.32*log10(SN+1)\n",
      "N= 2**(C/(2.0*B))\n",
      "\n",
      "#Result\n",
      "print\"(a) The maximum theorotical data rate is \",C_th/10**3,\"kbps\"\n",
      "print\"(b) The maximum theorotical capacity of channel is \",round(C/10**3,1),\"Kbps\"\n",
      "print\"(c) The number of levels needed to acheive maximum speed are \",round(N,2)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a) The maximum theorotical data rate is  25.0 kbps\n",
        "(b) The maximum theorotical capacity of channel is  103.8 Kbps\n",
        "(c) The number of levels needed to acheive maximum speed are  17.78\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 11.3 Page no 430"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "block =512\n",
      "packets =8\n",
      "BER = 2*10**-4\n",
      " \n",
      "#Calculation\n",
      "avg_errors = block*packets*8*BER\n",
      "\n",
      "print\"Average number of errors are \",avg_errors\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Average number of errors are  6.5536\n"
       ]
      }
     ],
     "prompt_number": 3
    }
   ],
   "metadata": {}
  }
 ]
}