summaryrefslogtreecommitdiff
path: root/Principles_Of_Electronic_Communication_Systems/chapter7.ipynb
blob: c45874820663484f6c665ec3ebc97d5cd77180ca (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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
{
 "metadata": {
  "name": "",
  "signature": "sha256:13e4ad42742896befb0b329fd930804197555dd5705f1dd526b017e9117b7b00"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 7 Digital communication techniques"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 7.1 Page no 210"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "t = 71.4*10**-6\n",
      "\n",
      "#calculation\n",
      "f = 1/t\n",
      "fourth_harmonic = f*4\n",
      "min_sampling = 2*fourth_harmonic\n",
      "\n",
      "#Result\n",
      "print\"(a) The frequency of the signal is \",round(f/10**3,1),\"KHz\"\n",
      "print\"(b) The fourth harmonic is \",round(fourth_harmonic/10**3,0),\"KHz\"\n",
      "print\"(c) Minimum sampling rate is \",round(min_sampling/10**3,0),\"KHz\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a) The frequency of the signal is  14.0 KHz\n",
        "(b) The fourth harmonic is  56.0 KHz\n",
        "(c) Minimum sampling rate is  112.0 KHz\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 7.2 Page no 222"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "N = 14\n",
      "discrete_levels = 2.0**N\n",
      "\n",
      "#Calculation\n",
      "num_vltg_inc =2**N-1\n",
      "resolution = 12/discrete_levels \n",
      "\n",
      "#Result\n",
      "print\"(a) The numbedr of discrete levels that are represented using N number of bits are \",discrete_levels\n",
      "print\"(b) the number odf voltage increments required to divide the voltage range are \",num_vltg_inc\n",
      "print\"(c) Resolution of the digitization \",round(resolution*10**6,2),\"microvolt\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a) The numbedr of discrete levels that are represented using N number of bits are  16384.0\n",
        "(b) the number odf voltage increments required to divide the voltage range are  16383\n",
        "(c) Resolution of the digitization  732.42 microvolt\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 7.3 Page no 225"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "N =12\n",
      "SINAD1=78\n",
      "\n",
      "#Calculation\n",
      "SINAD2 = 6.02*N + 1.76\n",
      "ENOB =(SINAD1 -1.76)/6.02\n",
      "\n",
      "#Result\n",
      "print\"(a) The SINAD for 12 bit convertre is \",SINAD2,\"db\"\n",
      "print\"(b) The ENOB for the converter with SINAD of 78 dB is \",round(ENOB,2),\"bits\"   \n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a) The SINAD for 12 bit convertre is  74.0 db\n",
        "(b) The ENOB for the converter with SINAD of 78 dB is  12.66 bits\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 7.4 Page no 233"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Gievn\n",
      "Vm = 1.0\n",
      "Vin = 0.25\n",
      "mu =255\n",
      "\n",
      "#Calculation\n",
      "import math\n",
      "Vout = (Vm*log(1+mu*(Vin/Vm)))/log(1+mu)\n",
      "gain =Vout/Vin\n",
      "\n",
      "#Result\n",
      "print\"The output voltage of the compander \",round(Vout,2),\"volt\"\n",
      "print\"Gain of the compander is \",round(gain,0)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The output voltage of the compander  0.75 volt\n",
        "Gain of the compander is  3.0\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 7.5 Page no 234"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "Vin = 0.8\n",
      "Vm =1.0\n",
      "mu =255\n",
      "\n",
      "#Calculation\n",
      "import math\n",
      "Vout = (Vm*math.log(1+mu*(Vin/Vm)))/math.log(1+mu)\n",
      "gain =Vout/Vin\n",
      "\n",
      "#Result\n",
      "print\"The output voltage of the compander \",round(Vout,1),\"volt\"\n",
      "print\"Gain of the compander is \",round(gain,1)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The output voltage of the compander  1.0 volt\n",
        "Gain of the compander is  1.2\n"
       ]
      }
     ],
     "prompt_number": 14
    }
   ],
   "metadata": {}
  }
 ]
}