summaryrefslogtreecommitdiff
path: root/Electronic_Communication_Systems/Chapter7.ipynb
blob: 1d5a897b830de2f4982f088d61aa61130d718ede (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
{
 "metadata": {
  "name": "",
  "signature": "sha256:cd13dfdb6dd7420874a1c992512f922297a6fa769a755d9c2c04bb32f02bdf3a"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 7: Radio Transmitters and Receivers "
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 7.1, page no. 153"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variable Declaration\n",
      "fs1    = 1.00*pow(10,6)             # Sampling Frequency (Hz)\n",
      "fs2    = 25.00*pow(10,6)            # Sampling Frequency (Hz)\n",
      "fi     = 455.00*pow(10,3)           # Intermediate Frequency (Hz)\n",
      "Q      = 100.00                     # Loaded Q of the antenna coupling circuit                \n",
      "\n",
      "# Calculation\n",
      "import math                         # Math Library\n",
      "fsi1   = fs1+2*fi                   # Image Frequency (Hz)\n",
      "rho1   = fsi1/fs1-fs1/fsi1          # Constant 1\n",
      "alpha1 = math.sqrt(1+pow(Q*rho1,2)) # Rejection Ratio 1\n",
      "fsi2   = fs2+2*fi                   # Image Frequency (Hz) \n",
      "rho2   = fsi2/fs2-fs2/fsi2          # Constant 2\n",
      "alpha2 = math.sqrt(1+pow(Q*rho2,2)) # Rejection Ratio 2\n",
      "\n",
      "# Result\n",
      "print \"(a) Image Frequency, fsi   =\",fsi1/pow(10,3),\"kHz\"\n",
      "print \"                     rho   =\",round(rho1,3)\n",
      "print \"    Image Rejection, Alpha =\",round(alpha1,1)\n",
      "print \"(b) Image Frequency, fsi   =\",fsi2/pow(10,6),\"MHz\"\n",
      "print \"                     rho   =\",round(rho2,4)\n",
      "print \"    Image Rejection, Alpha =\",round(alpha2,2)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a) Image Frequency, fsi   = 1910.0 kHz\n",
        "                     rho   = 1.386\n",
        "    Image Rejection, Alpha = 138.6\n",
        "(b) Image Frequency, fsi   = 25.91 MHz\n",
        "                     rho   = 0.0715\n",
        "    Image Rejection, Alpha = 7.22\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 7.2, page no. 153"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variable Declaration\n",
      "alpha1   = 138.6                                 # Image Rejection From Example 7.1\n",
      "alpha2   = 7.22                                  # Image Rejection From Example 7.1\n",
      "rho      = 0.0715                                # Constant From Example 7.1\n",
      "Q        = 100.00                                # Loaded Q From Example 7.1\n",
      "fsi_dash = 1.91*pow(10,6)                        # Image Frequency (Hz)\n",
      "fs_dash  = 1.00*pow(10,6)                        # Sampling Frequency 1 (Hz)\n",
      "fs       = 25.00*pow(10,6)                       # Sampling Frequency 2 (Hz)\n",
      "\n",
      "\n",
      "# Calculation\n",
      "import math                                      # Math Library\n",
      "Q_dash   = math.sqrt(pow(alpha1/alpha2,2)-1)/rho # Loaded Q of the RF amplifier\n",
      "fi_dash  = (fsi_dash/fs_dash*fs-fs)/2            # Intermediate Frequency (Hz) \n",
      "\n",
      "# Result\n",
      "print \"(a) The Q of the circuit is\",round(math.sqrt(Q*Q_dash)),\", which is the geometric mean of\",round(Q),\"and\",round(Q_dash)\n",
      "print \"(b) Intermediate Frequency, fi_dash =\",round(fi_dash/pow(10,6),1),\"MHz\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a) The Q of the circuit is 164.0 , which is the geometric mean of 100.0 and 268.0\n",
        "(b) Intermediate Frequency, fi_dash = 11.4 MHz\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 7.3, page no. 164"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variable Declaration\n",
      "R1    = 110.00*pow(10,3)                # RESISTANCE 1 (Ohms)\n",
      "R2    = 220.00*pow(10,3)                # RESISTANCE 2 (Ohms)\n",
      "R3    = 470.00*pow(10,3)                # RESISTANCE 3 (Ohms)\n",
      "R4    = 1.00*pow(10,6)                  # RESISTANCE 4 (Ohms)\n",
      "\n",
      "# Calculation\n",
      "import math                             # Math Library\n",
      "Rc    = R1+R2                           # Resistance (Ohm)\n",
      "Zm    = R2*R3*R4/(R2*R3+R3*R4+R2*R4)+R1 # Impedance (Ohm)\n",
      "m_max = Zm/Rc                           # Maximum Modulation Index\n",
      "\n",
      "# Result\n",
      "print \"Maximum Modulation Index, m_max =\",round(m_max*pow(10,2)),\"%\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Maximum Modulation Index, m_max = 73.0 %\n"
       ]
      }
     ],
     "prompt_number": 4
    }
   ],
   "metadata": {}
  }
 ]
}