diff options
author | kinitrupti | 2017-05-12 18:53:46 +0530 |
---|---|---|
committer | kinitrupti | 2017-05-12 18:53:46 +0530 |
commit | 6279fa19ac6e2a4087df2e6fe985430ecc2c2d5d (patch) | |
tree | 22789c9dbe468dae6697dcd12d8e97de4bcf94a2 /sample_notebooks/harikagunturu/harikagunturu_version_backup/Chapter_4_Angle.ipynb | |
parent | d36fc3b8f88cc3108ffff6151e376b619b9abb01 (diff) | |
download | Python-Textbook-Companions-6279fa19ac6e2a4087df2e6fe985430ecc2c2d5d.tar.gz Python-Textbook-Companions-6279fa19ac6e2a4087df2e6fe985430ecc2c2d5d.tar.bz2 Python-Textbook-Companions-6279fa19ac6e2a4087df2e6fe985430ecc2c2d5d.zip |
Removed duplicates
Diffstat (limited to 'sample_notebooks/harikagunturu/harikagunturu_version_backup/Chapter_4_Angle.ipynb')
-rwxr-xr-x | sample_notebooks/harikagunturu/harikagunturu_version_backup/Chapter_4_Angle.ipynb | 666 |
1 files changed, 0 insertions, 666 deletions
diff --git a/sample_notebooks/harikagunturu/harikagunturu_version_backup/Chapter_4_Angle.ipynb b/sample_notebooks/harikagunturu/harikagunturu_version_backup/Chapter_4_Angle.ipynb deleted file mode 100755 index de7d514c..00000000 --- a/sample_notebooks/harikagunturu/harikagunturu_version_backup/Chapter_4_Angle.ipynb +++ /dev/null @@ -1,666 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Chapter 4 Angle Modulation" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Exa 4.1.A page.no: 286" - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "12000 the new deviation( in Hz)\n" - ] - } - ], - "source": [ - "Freq_dev=6; #Frequency Deviation in kHz\n", - "Vm=3; #Modulating Voltage in V\n", - "Dev=Freq_dev*10**3/Vm; \n", - "# for Vm=6V\n", - "Vm=6;\n", - "Freq_dev_new=Dev*Vm;\n", - "print Freq_dev_new,\"the new deviation( in Hz)\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Exa 4.1 page.no: 287" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Instantaneous Frequency(in Hz) at (t=0.4 ms)N = 100290.574948\n", - "Maximum Phase Deviation (in rad) = 3\n", - "MAximum Frequency Deiation (in Hz)= 300.0\n" - ] - } - ], - "source": [ - "from math import pi,cos\n", - "\n", - "t1=0.4;# time in ms\n", - "Ang_Freq =2*pi*10**5 +3*2*pi*100*cos(2*pi*100*(t1*10**(-3)));\n", - "Freq=Ang_Freq/(2*pi);\n", - "#change in answer due to calculation error in book\n", - "print \"Instantaneous Frequency(in Hz) at (t=0.4 ms)N = \",Freq\n", - "Max_pha_Dev=3; #max(3sin(2∗pi∗100t))\n", - "print \"Maximum Phase Deviation (in rad) = \",Max_pha_Dev\n", - "Max_fre_Dev=6*pi*100; #max(6∗pi∗100∗cos(2∗pi∗100t))\n", - "print \"MAximum Frequency Deiation (in Hz)= \",Max_fre_Dev/(2*pi)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Exa 4.2.A page.no: 287" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Power Dissipated (in W) is 9.375\n" - ] - } - ], - "source": [ - "from math import pi,sqrt\n", - "\n", - "Wc=8*10**(8);# Angular Frequency of Carrier Signal\n", - "fc=Wc/(2*pi);\n", - "Wm=1300;#Angular Frequency of Message Signal\n", - "fm=Wm/(2*pi);\n", - "B=3;#Modulation Index\n", - "R=12;\n", - "Vc_rms=15/sqrt(2);\n", - "Max_dev=B*fm;\n", - "Power=Vc_rms**(2)/R;\n", - "print \"Power Dissipated (in W) is \",Power" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Exa 4.2 page.no: 287" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Peak Frequency Deviation(in Hz) is 12000\n", - "modulation index 8.0\n" - ] - } - ], - "source": [ - "a=3;#amplitude in volts\n", - "Dev_sen=4;# deviation sensitivity in KHz/volts\n", - "fm=1.5;# frequency modulating signal in KHz\n", - "f=Dev_sen*10**(3)*3;#peak frequency deviation\n", - "B=f/(fm*10**3);\n", - "print \"Peak Frequency Deviation(in Hz) is \",f\n", - "print \"modulation index \",B" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Exa 4.3.A page.no: 289" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "The Bandwidth (in Hz) is 72000\n" - ] - } - ], - "source": [ - "fm=3; #Modulating Frequency in kHZ\n", - "Max_Dev=18; #MAximum Deviation in kHz\n", - "B=Max_Dev/fm; # modulation index 7\n", - "J=12;#from Bessel Table , for B=6\n", - "Bw=fm*J*2*10**(3);\n", - "print \"The Bandwidth (in Hz) is \",Bw" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Exa 4.3 page.no: 289" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Peak Phase Deviation( in rad) 8.75\n" - ] - } - ], - "source": [ - "Dev_sen=3.5 # Deviation Sensitivity in rad/volt\n", - "a=2.5; #amplitude in volts\n", - "B=a*Dev_sen; # Peak Phase Deviation\n", - "print \"Peak Phase Deviation( in rad) \",B" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Exa 4.4.A page.no: 290" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Maximum Frequency Deviation (in Hz) is 18000\n", - "Modulation Index is 5.99985864877\n" - ] - } - ], - "source": [ - "from math import pi\n", - "\n", - "Wm=18850;#Angular Frequency of message signal\n", - "fm=Wm/(2*pi);\n", - "a=3;# amplitude of message signal\n", - "Dev_sen=6;#Deviation Sensitivity in kHz/V\n", - "Max_Freq_Dev=a*Dev_sen*10**(3);\n", - "B=Max_Freq_Dev/(fm);\n", - "print \"Maximum Frequency Deviation (in Hz) is \",Max_Freq_Dev\n", - "print \"Modulation Index is \",B" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Exa 4.4 page.no: 291" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Deviation Sensitivity(in kHz/V) 1333\n", - "Modulation Index is 4\n", - "Deviation Sensitivity for 5V (in Hz) 6665\n", - "Modulation index 6\n", - "Deviation Sensitivity for 10V (in Hz) 13330\n", - "Modulation index is 33\n" - ] - } - ], - "source": [ - "a=3; #amplitude in Volts\n", - "Dev=4;# Deviation in kHz\n", - "fm=1;# modulating frequency in kHz\n", - "Dev_sen=Dev*10**(3)/a; #Deviation Sensitivity\n", - "B=Dev/fm; # Modulation Index\n", - "print \"Deviation Sensitivity(in kHz/V) \",Dev_sen\n", - "print \"Modulation Index is \",B\n", - "#a)\n", - "a=5;\n", - "Dev_sen_1=a*Dev_sen;\n", - "B=Dev_sen_1/(fm*10**(3));\n", - "print \"Deviation Sensitivity for 5V (in Hz) \",Dev_sen_1\n", - "print \"Modulation index\",B\n", - "#b)\n", - "a=10;\n", - "fm=400;\n", - "Dev_sen_2=a*Dev_sen;\n", - "B=Dev_sen_2/fm;\n", - "print \"Deviation Sensitivity for 10V (in Hz) \",Dev_sen_2\n", - "print \"Modulation index is \",B" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Exa 4.5.A page.no: 291" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "for B=2, The number of significant frequencies are 6\n", - "They are J1,J2,J3,J4,J5 and J6\n", - "Their amplitudes with carriers are \n", - "they are (in V) 1.792 4.616 2.824 1.032 0.272 0.056 0.008\n" - ] - } - ], - "source": [ - "print \"for B=2, The number of significant frequencies are 6\"\n", - "print \"They are J1,J2,J3,J4,J5 and J6\"\n", - "print \"Their amplitudes with carriers are \"\n", - "J0= 0.224*8;\n", - "J1= 0.577*8;\n", - "J2= 0.353*8;\n", - "J3= 0.129*8;\n", - "J4= 0.034*8;\n", - "J5= 0.007*8;\n", - "J6= 0.001*8;\n", - "print\"they are (in V)\",J0,J1,J2,J3,J4,J5,J6" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Exa 4.5 page.no: 292" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Bandwidth required (in Hz) 24000\n", - "According to Carsons rule , Bandwidth (in Hz) 36000\n" - ] - } - ], - "source": [ - "fm=3; #Modulating Frequency in kHZ\n", - "Max_dev=15;# Maximum Deviatin in kHZ\n", - "B=Max_dev/fm; \n", - "J=8; # Bessel table , the highest J coefficient\n", - "BW=J*fm*10**(3);#Bandwidth in kHz\n", - "BW1=2*(fm+Max_dev)*10**(3);# According to carson rule , BAndwidth\n", - "print \"Bandwidth required (in Hz) \",BW\n", - "print \"According to Carsons rule , Bandwidth (in Hz) \",BW1" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Exa 4.6.A page.no: 292" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Minimum Bandwidth (in Hz) is 72000\n", - "Approximate Minimum Bandwidth is 36000\n" - ] - } - ], - "source": [ - "Max_Freq_Dev=12; #Maximum Frequency Deviation in kHZ\n", - "fm=6; #Modulating frquency in kHz\n", - "B=Max_Freq_Dev/fm;# Modulation index 7\n", - "J=6;#From Bessel Table , for B=2\n", - "Bw=2*J*6*10**(3);\n", - "BW_carson=2*(fm + Max_Freq_Dev)*10**(3);\n", - "print \"Minimum Bandwidth (in Hz) is \",Bw\n", - "print \"Approximate Minimum Bandwidth is \",BW_carson" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Exa 4.6.A page.no: 283" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "For B=5 from the Bessel table ,The Bessel Function is taken upto J9\n", - "Hence the average power of the modulated signal (in W) is 9.936\n", - "Hence, the average power of the modulated signal is equal to \n", - "unmodulated carrier power\n" - ] - } - ], - "source": [ - "a=10; #Amplitude in V\n", - "Pt=a*(0.18**2 +2*(0.33**2+0.05**2+0.36**2+0.39**2+0.26**2+0.13**2+0.05**2+0.02**2+0.01**2))\n", - "print \"For B=5 from the Bessel table ,The Bessel Function is taken upto J9\"\n", - "print \"Hence the average power of the modulated signal (in W) is \",Pt\n", - "print \"Hence, the average power of the modulated signal is equal to \"\n", - "print \"unmodulated carrier power\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Exa 4.7.A page.no: 294" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Unmodulated Power Carrier ( in W) = 1\n", - "Total Power in modulated wave(in W)= 1.06767573333\n", - "Power in the modulated wave is equal to \n", - "power in the unmodulated wave \n" - ] - } - ], - "source": [ - "a=8;# amplitude in V\n", - "r=30; # resistance in ohms\n", - "Pc_unmodulated=a**2/(2*r);\n", - "Pt=1.792**2/(2*30)+2*(4.616)**2/(2*30)+2*(2.824**2)/(2*30) +2*(1.032) **2/(2*30) +2*(0.272) **2/(2*30) +2*(0.056)**2/(2*30)+2*(0.008)**2/(2*30);\n", - "# change in answer due to approximations in the book\n", - "print \"Unmodulated Power Carrier ( in W) = \",Pc_unmodulated\n", - "print \"Total Power in modulated wave(in W)= \",Pt\n", - "print \"Power in the modulated wave is equal to \"\n", - "print \"power in the unmodulated wave \" \n", - "#\"Small error due to rounded off values in Bessel functions\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Exa 4.7 page.no: 295" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "the Phase Modulation Function = 12.0*sin(3000.0*pi*t)\n", - "The Modulated Wave Function = 12.0*sin(3000.0*pi*t) + 8*cos(20000*pi*t)\n" - ] - } - ], - "source": [ - "from sympy import symbols,sin,cos\n", - "\n", - "t,pi=symbols('t,pi') \n", - "Pha_dev=3.; #Phase Deviation constant in rad/V 6\n", - "# Phase Modulation Function\n", - "Pha_function=Pha_dev*4*sin(2.*pi*1.5*10**3*t);\n", - "Mod_wave=8*cos(2*pi*10**4*t)+Pha_function\n", - "print \"the Phase Modulation Function = \",Pha_function\n", - "print \"The Modulated Wave Function = \",Mod_wave" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Exa 4.8 page.no: 295" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "The outputs of the balanced modulator for these parameters\n", - "are same as the inputs \n", - "They remain unaltered \n", - "At the output of the Multiplier , \n", - "Fc(in kHz)= 9600 , Fm(in kHz)= 10 , B= 6.0\n", - "Frequency Deviation ( in kHz)= 60\n" - ] - } - ], - "source": [ - "initial_Freq_Dev=5; # frequency in kHz\n", - "B_initial=0.5; #modulation index\n", - "fm_initial=10;# message signal frequency in kHz\n", - "fc_initial=800; # carrier frequency in kHz\n", - "print \"The outputs of the balanced modulator for these parameters\"\n", - "print \"are same as the inputs \"\n", - "print \"They remain unaltered \"\n", - "#at the output of the multiplier 14\n", - "m=12;# multiplication factor\n", - "final_Freq_Dev=initial_Freq_Dev*m;\n", - "B_final=0.5*m;\n", - "fm_final=10; #modulating signal remains unaltered\n", - "fc_final=800*m;\n", - "print \"At the output of the Multiplier , \"\n", - "print \"Fc(in kHz)= \",fc_final,\", Fm(in kHz)= \",fm_final,\", B= \",B_final\n", - "print \"Frequency Deviation ( in kHz)= \",final_Freq_Dev" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Exa 4.9.A page.no: 296" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "a) MAster Oscillator Centre Frequency(in MHz) = 4.008\n", - "b) Frequency Deviation at the output of modulator(in KHz)= 2.4\n", - "c)Devaition ratio at the output of modulator 0.24\n", - "d)deviation ratio at power amplifier 6.0\n" - ] - } - ], - "source": [ - "ft=100.2; #final carrier frequency in MHz\n", - "Freq_Dev_ft=60.;# Frequency Deviation in KHz at power amplifier\n", - "fm=10.;#modulating frequency in KHz\n", - "m=25.;#multiplication factor\n", - "#a)\n", - "fc=ft/25.;\n", - "#b)\n", - "Freq_Dev=Freq_Dev_ft/25;\n", - "#c)\n", - "B=Freq_Dev/fm;\n", - "#d)\n", - "Bt=B*m;\n", - "print \"a) MAster Oscillator Centre Frequency(in MHz) = \",fc\n", - "print \"b) Frequency Deviation at the output of modulator(in KHz)= \",Freq_Dev\n", - "print \"c)Devaition ratio at the output of modulator \",B\n", - "print \"d)deviation ratio at power amplifier\",Bt" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Exa 4.10.A page.no: 297" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "a) Frequency Deviation(in Hz)= 5954.92965855\n", - "b) Devaition Ratio= 5.95492965855\n", - "c) Phase Deviation( in rad)= 8\n", - "d) Bandwidth( in Hz)= 13909.8593171\n" - ] - } - ], - "source": [ - "from math import pi\n", - "\n", - "#f(t)=5cos(Wc∗t+3sin(2000∗t)+5sin(2000∗pi∗t)) 5\n", - "fm=2000*pi/(2*pi); #bandwidth is the highest frequency component\n", - "#a) \n", - "Freq_dev=(6000+10000*pi)/(2*pi); 11\n", - "#b)\n", - "B=Freq_dev/fm; \n", - "#c)\n", - "Phase_dev=8;#Highest value of[3sin(2000t)+5sin(2000∗ pi∗t)]\n", - "#d)\n", - "Bw= 2*(fm+Freq_dev);\n", - "print \"a) Frequency Deviation(in Hz)= \",Freq_dev\n", - "print \"b) Devaition Ratio= \",B\n", - "print \"c) Phase Deviation( in rad)= \",Phase_dev\n", - "print \"d) Bandwidth( in Hz)= \",Bw" - ] - } - ], - "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.10" - } - }, - "nbformat": 4, - "nbformat_minor": 0 -} |