summaryrefslogtreecommitdiff
path: root/Electronic_Communication_by_D._Roddy/Chapter7_Receivers_1.ipynb
blob: bac80198df7cf89be7dd713e655666b302d2b5d6 (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
{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter7 Receivers"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 7.3.1,Pg.no.227"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The freq tuning range is 1005000 Hz to 2055000 Hz\n",
      "The tuning range ratio of oscillator is 2 ohm\n",
      "The capacitor tuning range ratio of oscillator is 4\n",
      "The tuning range ratio of RF−ckt is 2\n",
      "The capacitor tuning range ratio of RF−ckt is 4\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "fs_min=550*10**3\n",
    "fs_max=1600*10**3\n",
    "IF=455*10**3 \n",
    "#Determination of freq tuning ranges\n",
    "fo_min=fs_min+IF\n",
    "fo_max=fs_max+IF\n",
    "print 'The freq tuning range is',fo_min,'Hz to',fo_max,'Hz'\n",
    "Rf=(fo_max)/(fo_min)   #calculation of freq tuning range ratio\n",
    "print 'The tuning range ratio of oscillator is',Rf,'ohm'\n",
    "Rc=Rf**2               #calculation of capacitance tuning range ratio\n",
    "print 'The capacitor tuning range ratio of oscillator is',Rc\n",
    "#For RF section\n",
    "Rf1=fs_max/fs_min;\n",
    "print 'The tuning range ratio of RF−ckt is',Rf1\n",
    "Rc1=Rf1**2\n",
    "print 'The capacitor tuning range ratio of RF−ckt is',Rc1"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 7.4.1,Pg.no.230"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The Cs min is 84.0 *10^-12 F\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "Rco=8.463\n",
    "Rfo=2.909\n",
    "Rcs=4.182\n",
    "Rfo=2.045\n",
    "fo_max =2055.0*10**3\n",
    "fo_min=1005.0*10**3\n",
    "Cs_max=350.0\n",
    "#For the RF section\n",
    "Cs_min=Cs_max/Rcs\n",
    "Cs_min=round(Cs_min,0)\n",
    "print 'The Cs min is',Cs_min,'*10^-12','F'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 7.6.1,Pg.no.234"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Image freq is 1930.0 Hz\n",
      "Image rejection is -36.98\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "from math import sqrt\n",
    "IF=465.0  #IF in KHz\n",
    "fs=1000   #Tuning freq in KHz\n",
    "Q=50.0    #Quality factor\n",
    "#Oscillator freq fo is given as\n",
    "fo=fs+IF;\n",
    "#a) Image freq is given as\n",
    "fi=fo+IF\n",
    "print 'Image freq is',fi,'Hz'\n",
    "y=fi/fs-fs/fi\n",
    "#b) image rejection is given as\n",
    "Ar=1/sqrt(1+(y*Q)**2)\n",
    "Ar_dB=20*math.log10(Ar)\n",
    "Ar_dB=round(Ar_dB,2)\n",
    "print 'Image rejection is',Ar_dB"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 7.7.1,Pg.no.236"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The sum of frequencies are\n",
      "1860\n",
      "The difference of frequencies are\n",
      "950\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "fs=950        #in KHz\n",
    "IF=455        #in KHz\n",
    "m=[1,2]\n",
    "n=[1,2]\n",
    "f0=fs+IF\n",
    "print 'The sum of frequencies are'\n",
    "for i in range (1,2):\n",
    "        for j in range (1,2):\n",
    "                fu1=j/i *f0 + 1/i*IF\n",
    "                print fu1\n",
    "print 'The difference of frequencies are'\n",
    "for i in range (1,2):\n",
    "        for j in range (1,2):\n",
    "                fu2=j/i*f0 - 1/i*IF\n",
    "                print fu2"
   ]
  }
 ],
 "metadata": {
  "anaconda-cloud": {},
  "kernelspec": {
   "display_name": "Python [Root]",
   "language": "python",
   "name": "Python [Root]"
  },
  "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.11"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}