{ "metadata": { "name": "", "signature": "sha256:d4ffda068787fb0974622fa8de40f7d54b5df2a00735e870e01cb9df45be78f9" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "CHAPTER 16 : MODULATION AND DEMODULATION" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 16.2 : Page number 416-417\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Variabledeclaration\n", "V_pp_max=16.0; #Maximum peak-to-peak voltage of an AM wave, mV\n", "V_pp_min=4.0; #Minimum peak-to-peak voltage of an AM wave, mV\n", "\n", "#Calculation\n", "Vmax=V_pp_max/2; #Maximum voltage of AM wave, mV\n", "Vmin=V_pp_min/2; #Minimum voltage of AM wave, mV\n", "m=(Vmax-Vmin)/(Vmax+Vmin); #Modulation factor.\n", "\n", "#Result\n", "print(\"The modulation factor=%.1f.\"%m);\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The modulation factor=0.6.\n" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 16.3 : Page number 417\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Variable declaration\n", "Es=50.0; #signalvoltage amplitude, V\n", "Ec=100.0; #Carrier voltage amplitude, V\n", "\n", "\n", "#Calculation\n", "m=Es/Ec; #Modulation factor\n", "\n", "#Result\n", "print(\"Modulation factor=%.1f.\"%m);\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Modulation factor=0.5.\n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 16.4 : Page number 419\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Variable declaration\n", "fc=2500.0; #Carrier frequency, kHz\n", "f1=50.0; #Lower frequency of the audio signal, Hz\n", "f2=15000.0; #Upper frequency of the audio signal, Hz\n", "\n", "#Calculation\n", "fl_usb=fc+(f1/1000); #Lower frequency of upper sideband, kHz\n", "fu_usb=fc+(f2/1000); #Upper frequency of upper sideband, kHz\n", "\n", "fu_lsb=fc-(f1/1000); #Lower frequency of upper sideband, kHz\n", "fl_lsb=fc-(f2/1000); #Upper frequency of upper sideband, kHz\n", "\n", "#Since, f1=50Hz is negligible with respect to f2=15000Hz,\n", "BW=(fc+(f2/1000))-(fc-(f2/1000)); #Bandwidth, kHz\n", "\n", "#Result\n", "print(\"The upper sideband=%.2fkHz to %dkHz.\"%(fl_usb,fu_usb));\n", "print(\"The lower sideband=%dkHz to %.2fkHz.\"%(fl_lsb,fu_lsb));\n", "print(\"The bandwidth=%dkHz\"%BW);\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The upper sideband=2500.05kHz to 2515kHz.\n", "The lower sideband=2485kHz to 2499.95kHz.\n", "The bandwidth=30kHz\n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 16.5 : Page number 420\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "from math import pi\n", "\n", "#Variable declaration\n", "EC=5.0; #Carrier amplitude, V\n", "m=0.6; #modulation factor\n", "ws=6280.0; #angular frequency of signal, radians/s\n", "wc=211*10**4; #angular frequency of carrier, radians/s\n", "\n", "#Calculation\n", "fs=(ws/(2*pi))/1000; #Signal frequency, kHz\n", "fc=(wc/(2*pi))/1000; #Carrier frequency, kHz\n", "\n", "#(i)\n", "Max_amp=EC+m*EC; #Maximum amplitude of AM wave, V\n", "Min_amp=EC-m*EC; #Minimum amplitude of AM wave, V\n", "\n", "#(ii)\n", "frequency_components=[fc-fs,fc,fc+fs]; #frequency components, kHz\n", "amplitudes=[m*EC/2,EC,m*EC/2]; #Corresponding amplitudes, V\n", "\n", "#Result\n", "print(\"(i) The maximum and minimum amplitudes of AM wave=%dV and %dV.\"%(Max_amp,Min_amp));\n", "print(\"(ii) The frequency components of the AM wave=%.0f,%.0f,%.0f.\"%(frequency_components[0],frequency_components[1],frequency_components[2]));\n", "print(\" The corresponding amplitudes are =%.1fV, %dV, %.1fV.\"%(amplitudes[0],amplitudes[1],amplitudes[2]));\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "(i) The maximum and minimum amplitudes of AM wave=8V and 2V.\n", "(ii) The frequency components of the AM wave=335,336,337.\n", " The corresponding amplitudes are =1.5V, 5V, 1.5V.\n" ] } ], "prompt_number": 4 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 16.6 : Page number 420-421\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Variable declaration\n", "fc=1000.0; #Carrier frequency, kHz\n", "fs=5.0; #Signal frequency, kHz\n", "m=0.5; #Modulation factor\n", "EC=100.0; #Amplitude of the carrier, V\n", "\n", "#Calculation\n", "f_lsb=fc-fs; #Lower sideband frequency,kHz\n", "f_usb=fc+fs; #Upper sideband frequency, kHz\n", "Amplitude=m*EC/2; #Amplitude of each sideband, V\n", "\n", "#Result\n", "print(\"The lower and upper sideband frequencies are=%dkHz and %dkHz.\"%(f_lsb,f_usb));\n", "print(\"The amplitude of each sideband =%dV\"%Amplitude);\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The lower and upper sideband frequencies are=995kHz and 1005kHz.\n", "The amplitude of each sideband =25V\n" ] } ], "prompt_number": 5 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 16.7 : Page number 421\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Variable declaration\n", "EC=10.0; #Carrier amplitude, V\n", "ES=6.0; #Signal amplitude, V\n", "fc=10.0; #Carrier frequency, MHz\n", "fs=5/1000.0; #Signal frequency. MHz\n", "\n", "#Calculation\n", "#(i)\n", "m=ES/EC; #Modulation factor\n", "\n", "#(ii)\n", "f_lsb=fc-fs; #Lower sideband frequency,MHz\n", "f_usb=fc+fs; #Upper sideband frequency, MHz\n", "\n", "#(iii)\n", "Amplitude=m*EC/2; #Amplitude of each sideband, V\n", "\n", "\n", "#Result\n", "print(\"(i) The modulation factor=%.1f.\"%m);\n", "print(\"(ii) The lower and upper sideband frequencies are=%.3fMHz and %.3fMHz.\"%(f_lsb,f_usb));\n", "print(\"(iii) The amplitude of each sideband =%dV\"%Amplitude);\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "(i) The modulation factor=0.6.\n", "(ii) The lower and upper sideband frequencies are=9.995MHz and 10.005MHz.\n", "(iii) The amplitude of each sideband =3V\n" ] } ], "prompt_number": 6 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 16.8 : Page number 423\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Variable declaration\n", "Pc=500.0; #Carrier power, W\n", "m=1.0; #Modulation factor\n", "\n", "\n", "#Calculation\n", "#(i)\n", "Ps=(1/2.0)*m**2*Pc; #Sideband power, W\n", "\n", "#(ii)\n", "PT=Pc+Ps; #Power of AM wave, W\n", "\n", "#Result\n", "print(\"(i) The power in sidebands=%dW\"%Ps);\n", "print(\"(ii) The power of AM wave=%dW\"%PT);\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "(i) The power in sidebands=250W\n", "(ii) The power of AM wave=750W\n" ] } ], "prompt_number": 8 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Exmaple 16.9 : Page number 423\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Variable declaration\n", "Pc=50.0; #Power of carrier, kW\n", "\n", "#Calculation\n", "#(i)\n", "m=80/100.0; #Modulation factor\n", "Ps=(1/2.0)*m**2*Pc; #Sideband Power, kW\n", "print(\"(i) The sideband power for 80%% modulation=%dkW.\"%Ps);\n", "\n", "#(ii)\n", "m=10/100.0; #Modulation factor\n", "Ps=(1/2.0)*m**2*Pc; #Sideband Power, kW\n", "print(\"(ii) The sideband power for 10%% modulation=%.2fkW.\"%Ps);\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "(i) The sideband power for 80% modulation=16kW.\n", "(ii) The sideband power for 10% modulation=0.25kW.\n" ] } ], "prompt_number": 12 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 16.10 : Page number 423-424\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Variable declaration\n", "Pc=40.0; #Carrier power, kW\n", "m=100/100.0; #Modulation index\n", "amplifier_eff=72/100.0; #Efficiency of modulated RF amplifier\n", "\n", "\n", "#Calculation\n", "#(i)Carrier power remains same after modulation\n", "\n", "#(ii)\n", "Ps=(1/2.0)*(m**2)*Pc; #Sideband power\n", "P_audio=Ps/amplifier_eff; #Required audio power, kW\n", "\n", "#Result\n", "print(\"(i) The carrier power=%dkW.\"%Pc);\n", "print(\"(ii) The required audio power=%.1fkW.\"%P_audio);\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "(i) The carrier power=40kW.\n", "(ii) The required audio power=27.8kW.\n" ] } ], "prompt_number": 14 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 16.11 : Page number 424\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Variable declaration\n", "fs=1.0; #Signal frequency, kHz\n", "fc=500.0; #Carrier frequency, kHz\n", "\n", "\n", "#Calculation\n", "#(i)\n", "sideband_f=[fc-fs,fc+fs]; #Sideband frequencies, kHz\n", "\n", "#(ii)\n", "BW=(fc+fs)-(fc-fs); #Bandwidth required, kHz\n", "\n", "#Result\n", "print(\"(i) The sideband frequencies=%dkHz and %dkHz.\"%(sideband_f[0],sideband_f[1]));\n", "print(\"(ii) The bandwidth required=%dkHz\"%BW);\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "(i) The sideband frequencies=499kHz and 501kHz.\n", "(ii) The bandwidth required=2kHz\n" ] } ], "prompt_number": 15 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 16.12 : Page number 424\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from math import sqrt\n", "\n", "#Variable declaration\n", "IC=8.0; #Antenna current due to carrier,A\n", "m=40/100.0; #Modulation index\n", "\n", "#Calculation\n", "#Since, Ps=(1/2)*m\u00b2*Pc and PT=Pc+Ps (Total_power=carrier_power+signal_power)\n", "#that implies, (PT/Pc)=1+(m\u00b2/2),\n", "#So, square_of(Total_current/Carrier_current)=(IT/IC)\u00b2=1+(m\u00b2/2).\n", "IT=IC*sqrt(1+(m**2/2.0)); #Total current, A\n", "\n", "\n", "#Result\n", "print(\"The total antenna current=%.2fA.\"%IT);\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The total antenna current=8.31A.\n" ] } ], "prompt_number": 17 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 16.13 : Page number 424\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from math import sqrt\n", "\n", "#Variable declaration\n", "IC=8.0; #Antenna current when only carrier is sent, A\n", "IT=8.93; #Total antenna current, A\n", "\n", "\n", "#Calculation\n", "#Since, Ps=(1/2)*m\u00b2*Pc and PT=Pc+Ps (Total_power=carrier_power+signal_power)\n", "#that implies, (PT/Pc)=1+(m\u00b2/2),\n", "#So, square_of(Total_current/Carrier_current)=(IT/IC)\u00b2=1+(m\u00b2/2).\n", "m=sqrt((((IT/IC)**2)-1)*2)*100; #The %age of modulation\n", "\n", "#Result\n", "print(\"The %%age of modulation=%.1f%%.\"%m);\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The %age of modulation=70.1%.\n" ] } ], "prompt_number": 18 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 16.14 : Page number 425\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from math import sqrt\n", "\n", "#Variable declaration\n", "Vc=100.0; #Carrier voltage, V\n", "V_T=110.0; #The total voltage after modulation, V\n", "\n", "#Calculation\n", "#Since, Ps=(1/2)*m\u00b2*Pc and PT=Pc+Ps (Total_power=carrier_power+signal_power)\n", "#that implies, (PT/Pc)=1+(m\u00b2/2),\n", "#So, square_of(Total_voltage/Carrier_voltage)=(V_T/Vc)\u00b2=1+(m\u00b2/2).\n", "m=sqrt((((V_T/Vc)**2)-1)*2); #The %age of modulation\n", "\n", "#Result\n", "print(\"The modulation index =%.3f.\"%m);\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The modulation index =0.648.\n" ] } ], "prompt_number": 19 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 16.15 : Page number 425-426\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Variable declaration\n", "Vc=5.0; #Carrier voltage, V\n", "V_lsb=2.5; #Lower sideband component, V\n", "V_usb=2.5; #Upper sideband component, V\n", "R=2.0; #Resistor driven by AM wave, k\u03a9\n", "\n", "#Calculation\n", "#Since, power=(r.m.s_voltage)\u00b2/resistance\n", "#(i)\n", "Pc=round((0.707*Vc)**2/R,2); #Carrier power mW\n", "\n", "#(ii)\n", "P_lower=round((0.707*V_lsb)**2/R,3); #Power delivered by lower sideband, mW\n", "\n", "#(iii)\n", "P_upper=round((0.707*V_usb)**2/R,3); #Power delivered by upper sideband, mW\n", "\n", "P_T=round(Pc+P_lower+P_upper,3); #Total power delivered by the AM wave, mW\n", "\n", "#Result\n", "print(\"(i) The carrier power=%.2fmW\"%Pc);\n", "print(\"(ii) The power delivered by lower sideband=%.3fmW\"%P_lower);\n", "print(\"(iii) The power delivered by upper sideband=%.3fmW\"%P_upper);\n", "print(\"The total power delivered by the AM wave=%.3fmW\"%P_T);\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "(i) The carrier power=6.25mW\n", "(ii) The power delivered by lower sideband=1.562mW\n", "(iii) The power delivered by upper sideband=1.562mW\n", "The total power delivered by the AM wave=9.374mW\n" ] } ], "prompt_number": 20 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 16.16 : Page number 428\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from math import sqrt\n", "from math import pi\n", "\n", "#Variable declaration\n", "wc=6e08; #Carrier angular frequency, rad/s\n", "ws=1250.0; #Signal angular frequency, rad/s\n", "mf=5; #Modulation index\n", "Ec=12.0; #Carrier amplitude, V\n", "R=10.0; #Resistor, \u03a9\n", "\n", "#Calculation\n", "#(i)\n", "fc=wc/(2*pi); #Carrier frequency, Hz\n", "\n", "#(ii)\n", "fs=ws/(2*pi); #Signal frequency, Hz\n", "\n", "#(iv)\n", "delta_f=mf*fs; #Maximum frequency deviation, Hz\n", "\n", "#(v)\n", "P=(Ec/sqrt(2))**2/R; #Power dissipated, W\n", "\n", "#Result\n", "print(\"(i) The carrier frequency=%.1fe06 Hz.\"%(fc/10**6));\n", "print(\"(ii) The signal frequency=%.0f Hz.\"%fs);\n", "print(\"(iii) The modulation index=%d.\"%mf);\n", "print(\"(iv) The maximum frequency deviation=%.0fHz.\"%delta_f);\n", "print(\"(v) The power dissipated=%.1fW.\"%P);\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "(i) The carrier frequency=95.5e06 Hz.\n", "(ii) The signal frequency=199 Hz.\n", "(iii) The modulation index=5.\n", "(iv) The maximum frequency deviation=995Hz.\n", "(v) The power dissipated=7.2W.\n" ] } ], "prompt_number": 21 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 16.17 : Page number 428-429\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from math import pi\n", "\n", "#Variable declaration\n", "fc=25.0; #Carrier frequency, MHz\n", "fs=400.0; #Signal frequency, Hz\n", "Ec=4.0; #Carrier amplitude, V\n", "delta_f=10.0; #Maximum frequency deviation, kHz\n", "\n", "#Calculation\n", "wc=2*pi*fc*10**6; #Carrier angular frequency, rad/s\n", "ws=2*pi*fs; #Signal angular frequency, rad/s\n", "mf=delta_f*1000/fs; #Modulation index\n", "\n", "\n", "#Result\n", "print(\"e=%dcos(%.2et + %dsin%dt)\"%(Ec,wc,mf,ws));\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "e=4cos(1.57e+08t + 25sin2513t)\n" ] } ], "prompt_number": 22 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 16.18 : Page number 429\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Variable declaration\n", "delta_f=50.0; #Maximum frequency deviation, kHz\n", "fs=5.0; #Modulating frequency, kHz\n", "\n", "#Calculation\n", "mf=delta_f/fs; #Modulation index\n", "\n", "#Result\n", "print(\"The modulation index=%d\"%mf);\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The modulation index=10\n" ] } ], "prompt_number": 23 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 16.19 : Page number 429\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Variable declaration\n", "fc=1000.0; #Carrier frequency, kHz\n", "fs=15.0; #Modulating frequency, kHz\n", "\n", "#Calculation\n", "first_3_usb_f=[fc+fs,fc+2*fs,fc+3*fs]; #First three upper sideband frequncies, kHz\n", "first_3_lsb_f=[fc-fs,fc-2*fs,fc-3*fs]; #First three lowerr sideband frequncies, kHz\n", "\n", "\n", "#Result\n", "print(\"The first three upper sideband frequencies=%dkHz ,%dkHz and %dkHz.\"%(first_3_usb_f[0],first_3_usb_f[1],first_3_usb_f[2]));\n", "print(\"The first three lower sideband frequencies=%dkHz ,%dkHz and %dkHz.\"%(first_3_lsb_f[0],first_3_lsb_f[1],first_3_lsb_f[2]));\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The first three upper sideband frequencies=1015kHz ,1030kHz and 1045kHz.\n", "The first three lower sideband frequencies=985kHz ,970kHz and 955kHz.\n" ] } ], "prompt_number": 24 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 16.20 : Page number 429\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Variable declaration\n", "fs=15.0; #Modulating frequency, kHz\n", "delta_f=75.0; #Maximum frequency deviation, kHz\n", "\n", "#Calculation\n", "BW=2*(delta_f+fs); #Bandwidth, kHz\n", "\n", "#Result\n", "print(\"The bandwidth of the FM signal=%dkHz.\"%BW);\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The bandwidth of the FM signal=180kHz.\n" ] } ], "prompt_number": 25 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 16.21 : Page number 429\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Variable declaration\n", "k=75.0; #Frequency deviation constant, kHz/V\n", "Es=2.0; #Amplitude of signal, V\n", "\n", "\n", "#Calculation\n", "delta_f=k*Es; #Maximum frequency deviation, kHz\n", "\n", "#Result\n", "print(\"The maximum frequency deviation=%dkHz.\"%delta_f);\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The maximum frequency deviation=150kHz.\n" ] } ], "prompt_number": 26 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 16.22 : Page number 429-430\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Variable declaration\n", "fs1=500.0; #First audio frequency, Hz\n", "fs2=200.0; #Second audio frequency (decreased), Hz\n", "Es=2.4; #AF voltage, V\n", "delta_f1=4.8; #Frequency deviation,kHz\n", "\n", "#Calculation\n", "k=delta_f1/Es; #Frequency deviation constant, kHz/V\n", "Es=7.2; #AF voltage, V (increased)\n", "delta_f2=k*Es; #2nd frequency deviation, kHz\n", "Es=10.0; #AF voltage, V (increased)\n", "delta_f3=k*Es; #3rd frequency deviation, kHz\n", "\n", "mf1=delta_f1/(fs1/1000); #Modulation index in 1st case\n", "mf2=delta_f2/(fs1/1000); #Modulation index in 2nd case\n", "mf3=delta_f3/(fs2/1000); #Modulation index in 3rd case\n", "\n", "#Result\n", "print(\"The frequency deviation in second case=%.1fkHz.\"%delta_f2);\n", "print(\"The frequency deviation in third case=%dkHz.\"%delta_f3);\n", "print(\"The modulation index in 1st case=%.1f\"%mf1);\n", "print(\"The modulation index in 2nd case=%.1f\"%mf2);\n", "print(\"The modulation index in 3rd case=%d\"%mf3);\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The frequency deviation in second case=14.4kHz.\n", "The frequency deviation in third case=20kHz.\n", "The modulation index in 1st case=9.6\n", "The modulation index in 2nd case=28.8\n", "The modulation index in 3rd case=100\n" ] } ], "prompt_number": 27 }, { "cell_type": "code", "collapsed": false, "input": [], "language": "python", "metadata": {}, "outputs": [] } ], "metadata": {} } ] }