diff options
Diffstat (limited to 'Electronic_Communication_Systems_by_Roy_Blake/Chapter2.ipynb')
-rw-r--r-- | Electronic_Communication_Systems_by_Roy_Blake/Chapter2.ipynb | 473 |
1 files changed, 473 insertions, 0 deletions
diff --git a/Electronic_Communication_Systems_by_Roy_Blake/Chapter2.ipynb b/Electronic_Communication_Systems_by_Roy_Blake/Chapter2.ipynb new file mode 100644 index 00000000..7e10b30b --- /dev/null +++ b/Electronic_Communication_Systems_by_Roy_Blake/Chapter2.ipynb @@ -0,0 +1,473 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 2 : Radio Frequency Circuits" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1 : pg 50" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "a)The resonant frequency is 4.5 MHz\n", + "The bandwidth is 300.0 kHz\n" + ] + } + ], + "source": [ + "#page no 50\n", + "#calculate the resonant frequency and bandwidth\n", + "#prob no 2.1\n", + "from math import pi,sqrt\n", + "#Given:\n", + "#Refer the fig 2.6 of page 50. L1=25uH;C1=50pF\n", + "L1=25.*10**-6;C1=50.*10**-12;Q=15;\n", + "#calculations\n", + "#A) The resonent freqency is given as\n", + "fo=(1/(2*pi*sqrt(L1*C1)));\n", + "#B) The bandwidth is given as \n", + "B=fo/Q;\n", + "#results\n", + "print 'a)The resonant frequency is ',round(fo/10**6,2),'MHz'\n", + "print 'The bandwidth is ',round(B/1000.),'kHz'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2 : pg 62" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "1)The operating frequency is 5.03 MHz\n", + "2)Operating gain -10.0\n", + "The -ve sign denotes a phase inversion\n", + "3)Operating gain 0.2\n" + ] + } + ], + "source": [ + "#page no 62\n", + "# prob no. 2.2\n", + "#calculate the operating frequency, gain\n", + "from math import pi,sqrt\n", + "# Given : Hartley oscillators L=10uH; C=100pF\n", + "L=10.*10**-6; C=100.*10**-12;N1=10;N2=100.\n", + "#calculations and results\n", + "# A)The operating frequency is \n", + "fo=1/(2.*pi*sqrt(L*C));\n", + "print '1)The operating frequency is',round(fo/10**6,2),'MHz'\n", + "# The feedback fraction is given by\n", + "B=-N1/N2;\n", + "#Operating gain is given as \n", + "A=1/B;\n", + "print '2)Operating gain',A\n", + "print 'The -ve sign denotes a phase inversion'\n", + "#B) The operating frequency is same as in part A)\n", + "N1=20;N2=80.;\n", + "# The feedback fraction is given by\n", + "B=(N1+N2)/N1;\n", + "#Operating gain is given as \n", + "A=1./B;\n", + "print '3)Operating gain',A" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 : pg 66" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The effective capacitance (pF)= 9.09\n", + "1)The operating frequency is 52.8 Hz\n", + "The feedback fraction is -0.1\n", + "The feedback fraction is 0.0909\n" + ] + } + ], + "source": [ + "# page no 66\n", + "#prob no 2.3\n", + "#calculate the operating frequency and feedback fraction\n", + "from math import pi,sqrt\n", + "#Given:\n", + "C1=10.*10**-12; C2=100.*10**-12; L=1*10**-6;\n", + "#calculations and results\n", + "# The effective capacitance is \n", + "CT=(C1*C2)/(C1+C2);\n", + "# The operating frequency is \n", + "f0=1/(2*pi*sqrt(L*CT));\n", + "print 'The effective capacitance (pF)=',round(CT*10**12,2);\n", + "print '1)The operating frequency is',round(f0/10**6,1),'Hz'\n", + "# The feedback fraction is given approximately by\n", + "B=-C1/C2; \n", + "print 'The feedback fraction is',B\n", + "# For the common-base ckt, the op-freq is same but the feedback fraction willbe different.\n", + "C1=100*10**-12; C2=10*10**-12;\n", + "# It is given by \n", + "B=C2/(C1+C2);\n", + "print 'The feedback fraction is',round(B,4)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4 : pg 68" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The effective total capacitance is 9.01 pF\n", + "The operating freq is 53.03 MHz\n" + ] + } + ], + "source": [ + "# page no 68\n", + "#prob no 2.4\n", + "#caclculate the effective total capacitance and operating frequency\n", + "#Refer fig 2.22\n", + "from math import pi,sqrt\n", + "#Given:\n", + "c1=1000.;c2=100.;c3=10.;#all values are in pf\n", + "#calculations and results\n", + "#The effective total capacitance\n", + "Ct=1/((1/c1)+(1/c2)+(1/c3));\n", + "print 'The effective total capacitance is',round(Ct,2),'pF'\n", + "CT=Ct*10**-12;L=10**-6;\n", + "#The operating freq is\n", + "f0=1/(2*pi*sqrt(L*CT));\n", + "print 'The operating freq is',round(f0/10**6,2),'MHz'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5 : pg 70" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The resonent freq is 1.78 MHz\n", + "The tuning voltage is 7.5 V\n" + ] + } + ], + "source": [ + "# page no 70\n", + "#prob no 2.5\n", + "#calculate the resonant freq and tuning voltage\n", + "from math import sqrt,pi\n", + "#Given:\n", + "C=80*10**-12; L= 100*10**-6;\n", + "#calculations\n", + "#Part a) The resonent frequency is \n", + "f0=1/(2*pi*sqrt(L*C));\n", + "# Part b) In this part the circuit is resonate on doubling the frequency,therefore\n", + "f1=2*f0;\n", + "# from the equation of resonent frequency \n", + "C1=1/(4*(pi*f1)**2*L);\n", + "# Now for tuning voltage we have to use equation C1=Co/sqrt(1+2V)\n", + "Co=C;\n", + "# after solving the expression\n", + "v=((Co/C1)**2 -1)/2;\n", + "#results\n", + "print 'The resonent freq is',round(f0/10**6,2),'MHz'\n", + "print 'The tuning voltage is ',v,'V'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7 : pg 76" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The output frequencies at the output of square-law mixer are : 21.0 MHz 1.0 MHz\n" + ] + } + ], + "source": [ + "\n", + "#page no 76\n", + "#calculate the output frequencies\n", + "#problem 2.7\n", + "#Given:\n", + "# all frequencies are in MHz\n", + "f1=11.;f2=10;\n", + "#calculations\n", + "# output frequencies at the output of square-law mixer\n", + "a=f1+f2;\n", + "b=f1-f2;\n", + "#results\n", + "print 'The output frequencies at the output of square-law mixer are : ',a,'MHz ',b,'MHz'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8 : pg 85" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The capture range is 4.0 MHz\n", + "The lock range is 8.0 MHz\n", + "The freq at which the lock is acquired, moving downward in freq is 14.0 MHz\n", + "Lock will be lost on the way down at 8.0 MHz\n" + ] + } + ], + "source": [ + "#page no 85\n", + "#calculate the capture range, lock range, frequency\n", + "#problem no. 2.8\n", + "# all the frequencies are in MHz\n", + "#Given:\n", + "freq_free_run =12.; \n", + "freq_lock1 =10.;\n", + "freq_lock2 =16.;\n", + "#calculations and results\n", + "# capture range is approximately twice the difference between the free-running freq and the freq at which lock is first achieved\n", + "capture_range =2*(freq_free_run - freq_lock1 );\n", + "print 'The capture range is ',capture_range,'MHz'\n", + "# lock range is approximately twice the the difference between the freq where lock is lost and free-running freq\n", + "lock_range = 2*(freq_lock2 - freq_free_run);\n", + "print 'The lock range is ',lock_range,'MHz'\n", + "# The PLL freq response id approximate symmetrical.\n", + "#This means the free-running freq is in the center of the lock range and capture range. Therefore\n", + "freq_lock_acquired = freq_free_run + (capture_range/2);\n", + "freq_lock_lost = freq_free_run - capture_range\n", + "print 'The freq at which the lock is acquired, moving downward in freq is ',freq_lock_acquired,'MHz'\n", + "print 'Lock will be lost on the way down at',freq_lock_lost,'MHz'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9 : pg 86" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The values of N at high end is 170.0\n", + "The values of N at low end is 54.0\n" + ] + } + ], + "source": [ + "#page no 86\n", + "#calculate the values of N at high and low ends\n", + "# prob no 2.9\n", + "# refer fig 2.38\n", + "#Given:\n", + "#Here we are using a 10MHz crystal, it will be necessar to devide it by a factor to get 10kHz\n", + "f_osc = 10.*10**6; f_ref=10.*10**3;f0_1=540.*10**3;f0_2=1700.*10**3;\n", + "#calculations\n", + "Q=f_osc/f_ref;\n", + "# we have to specify the range of values of N. Find N at each and of the tuning range\n", + "N1=f0_1/f_ref;\n", + "N2=f0_2/f_ref;\n", + "#results\n", + "print 'The values of N at high end is',N2\n", + "print 'The values of N at low end is',N1" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10 : pg 89" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The step size that would have been obtained without prescaling 10000.0 Hz\n" + ] + } + ], + "source": [ + "#page no 89\n", + "# prob no 2.10\n", + "# refer fig 2.40\n", + "#Given:\n", + "P=10.;f_ref=10.*10**3;M=10.;\n", + "#consider \n", + "N=1.;\n", + "#calculations\n", + "# With a fixed-modulus prescalar, the min freq step is \n", + "step_size=M*f_ref;\n", + "# With the two-modulus system, let the main divider modulus N remain constant & \n", + "#increase the modulus m to (m+1) to find how much the freq changes.\n", + "# for 1st case, o/p freq \n", + "fo=(M+N*P)*f_ref;\n", + "# for 2nd case where leave N alone but changes M to M+1, new o/p freq \n", + "fo_=(M+1+N*P)*f_ref;\n", + "# The difference is \n", + "f= fo_-fo;\n", + "#results\n", + "print 'The step size that would have been obtained without prescaling',f,'Hz'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11 : pg 91" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The output frequencies are 10.2 MHz 12.0 MHz\n", + "The step size is 20.0 kHz\n" + ] + } + ], + "source": [ + "#page no 91\n", + "#prob no 2.11\n", + "#refer fig 2.42\n", + "#Given:\n", + "f_ref= 20.*10**3;\n", + "f_osc= 10.*10**6;\n", + "N1=10;N2=100.;\n", + "#calculations\n", + "f0=(N1*f_ref) + f_osc;\n", + "f1=(N2*f_ref) + f_osc;\n", + "step_size=(f1-f0)/(N2-N1);\n", + "#results\n", + "print 'The output frequencies are',f0/10**6,'MHz',f1/10**6,'MHz'\n", + "print 'The step size is',step_size/1000.,'kHz'" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} |