{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Chapter 4: Angle Modulation" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.10_A: Angle_Modulation.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc;\n", "clear;\n", "\n", "//f(t)=5cos(Wc*t+3sin(2000*t)+5sin(2000*pi*t))\n", "\n", "fm=2000*%pi/(2*%pi); //bandwidth is the highest frequency component\n", "\n", "//a)\n", "\n", "Freq_dev=(6000+10000*%pi)/(2*%pi);\n", "\n", "//b)\n", "\n", "B=Freq_dev/fm;\n", "\n", "//c)\n", "Phase_dev=8;//Highest value of[3sin(2000t)+5sin(2000*pi*t)]\n", "\n", "//d)\n", "Bw= 2*(fm+Freq_dev);\n", "\n", "disp(Freq_dev,' a) Frequency Deviation(in Hz)=');\n", "disp(B,' b) Devaition Ratio=');\n", "disp(Phase_dev,' c) Phase Deviation( in rad)=');\n", "disp(Bw,' d) Bandwidth( in Hz)=')" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.1_A: Frequency_Deviation.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "\n", "clc;\n", "clear;\n", "Freq_dev=6; //Frequency Deviation in kHz\n", "Vm=3; //Modulating Voltage in V\n", "\n", "Dev=Freq_dev*10^(3)/Vm;\n", "\n", "// for Vm=6V\n", "\n", "Vm=6;\n", "Freq_dev_new=Dev*Vm;\n", "\n", "disp(Freq_dev_new,'the new deviation( in Hz)');" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.1: phase_and_frequency_deviation.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc;\n", "clear;\n", "\n", "t=0:0.01:1; \n", "Freq=2*%pi*10^(5)+3*2*%pi*100*cos(2*%pi*100*(t));//Phase=2*%pi*10^(5)*t+3*sin(2*%pi*100*t);\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", "\n", "//change in answer due to calculation error in book\n", "disp(Freq,'Instantaneous Frequency(in Hz) at (t=0.4ms)N =');\n", "\n", "\n", "Max_pha_Dev=3; //max(3sin(2*%pi*100t))\n", "\n", "disp(Max_pha_Dev,' Maximum Phase Deviation(in rad) =');\n", " \n", "Max_fre_Dev=6*%pi*100;//max(6*pi*100*cos(2*pi*100t))\n", "\n", "\n", "\n", "disp(Max_fre_Dev/(2*%pi),'MAximum Frequency Deiation(in Hz)');" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.2_A: Power_in_FM_system.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc;\n", "clear;\n", "Wc=8*10^(8);// Angular Frequency of Carrier Signal\n", "fc=Wc/(2*%pi);\n", "\n", "Wm=1300;//Angular Frequency of Message Signal\n", "fm=Wm/(2*%pi);\n", "\n", "B=3;//Modulation Index\n", "R=12;\n", "Vc_rms=15/sqrt(2);\n", "\n", "Max_dev=B*fm; \n", "Power=Vc_rms^(2)/R;\n", "\n", "disp(Power,'Power Dissipated (in W) is');" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.2: Peak_Frequency_Deviation.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc;\n", "clear;\n", "a=3;//amplitude in volts\n", "Dev_sen=4;// deviation sensitivity in KHz/volts\n", "fm=1.5;// frequency modulating signal in KHz\n", "\n", "f=Dev_sen*10^(3)*3;//peak frequency deviation\n", "B=f/(fm*10^3);\n", "\n", "disp(f,'Peak Frequency Deviation( in Hz) ');\n", "disp(B,'modulation index ');" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.3_A: BAndwidth_of_FM.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc;\n", "clear;\n", "fm=3; //Modulating Frequency in kHZ\n", "Max_Dev=18; //MAximum Deviation in kHz\n", " \n", " B=Max_Dev/fm; //modulation index\n", " \n", " J=12;//from Bessel Table, for B=6\n", " Bw=fm*J*2*10^(3);\n", " \n", " disp(Bw,'The Bandwidth (in Hz) is') ;" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.3: Peak_Phase_Deviatio.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc;\n", "clear;\n", "Dev_sen=3.5;// Deviation Sensitivity in rad/volt\n", "a=2.5;// amplitude in volts\n", "\n", "B=a*Dev_sen; //Peak Phase Deviation\n", "\n", "disp(B,'Peak Phase Deviation( in rad)');" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.4_A: Peak_Deviation_in_FM.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc;\n", "clear;\n", "Wm=18850;//Angular Frequency of message signal\n", "fm=Wm/(2*%pi);\n", "a=3;// amplitude of message signal\n", "\n", "Dev_sen=6;//Deviation Sensitivity in kHz/V\n", "Max_Freq_Dev=a*Dev_sen*10^(3);\n", "\n", "B=Max_Freq_Dev/(fm);\n", "\n", "disp(Max_Freq_Dev,'Maximum Frequency Deviation(in Hz)');\n", "disp(B,'Modulation Index');" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.4: Frequency_Modulation.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc;\n", "clear;\n", "a=3; //amplitude in Volts\n", "Dev=4;// Deviation in kHz\n", "fm=1;// modulating frequency in kHz\n", "\n", "Dev_sen=Dev*10^(3)/a; //Deviation Sensitivity\n", "B=Dev/fm; // Modulation Index\n", "\n", "disp(Dev_sen,'Deviation Sensitivity(in kHz/V)');\n", "disp(B,'Modulation Index');\n", "\n", "//a)\n", "a=5;\n", "Dev_sen_1=a*Dev_sen;\n", "B=Dev_sen_1/(fm*10^(3));\n", "\n", "disp(Dev_sen_1,'Deviation Sensitivity for 5V (in Hz)');\n", "disp(B,'Modulation index');\n", "\n", "\n", "//b)\n", "a=10;\n", "fm=400;\n", "Dev_sen_2=a*Dev_sen;\n", "B=Dev_sen_2/fm;\n", "\n", "\n", "disp(Dev_sen_2,'Deviation Sensitivity for 10V (in Hz)');\n", "disp(B,'Modulation index');" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.5_A: side_frequencies_and_Aplitudes.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc;\n", "clear;\n", "disp('for B=2, The number of significant frequencies are 6');\n", "disp('They are J1,J2,J3,J4,J5 and J6');\n", "disp('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", "disp(J6, J5,J4,J3,J2,J1,J0,'they are (in V)');" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.5: CArson_Bandwidth.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc;\n", "clear;\n", "fm=3; //Modulating Frequency in kHZ\n", "Max_dev=15;// Maximum Deviatin in kHZ\n", "\n", "B=Max_dev/fm;\n", "\n", "J=8; // Bessel table,the highest J coefficient\n", "BW=J*fm*10^(3);//Bandwidth in kHz\n", "\n", "BW1=2*(fm+Max_dev)*10^(3);// According to carson rule, BAndwidth\n", "\n", "disp(BW,'Bandwidth required (in Hz)');\n", "disp(BW1,'According to Carsons rule, Bandwidth(in Hz)');" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.6_A: Carson_Bandwidth.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc;\n", "clear;\n", "Max_Freq_Dev=12; //Maximum Frequency Deviation in kHZ\n", "fm=6; //Modulating frquency in kHz\n", "\n", "B=Max_Freq_Dev/fm;// Modulation index\n", "\n", "J=6;//From Bessel Table, for B=2\n", "\n", "Bw=2*J*6*10^(3);\n", "BW_carson=2*(fm + Max_Freq_Dev)*10^(3);\n", "\n", "disp(Bw,' Minimum Bandwidth (in Hz) is');\n", "disp(BW_carson,' Approximate Minimum Bandwidth according to carson rule( in Hz) is');" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.6: Average_Power_of_signal.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc;\n", "clear;\n", "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", "\n", "disp(' For B=5 from the Bessel table,The Bessel Function is taken upto J9');\n", "disp(Pt,' Hence the average power of the modulated signal (in W) is');\n", "disp('Hence, the average power of the modulated signal is equal to ');\n", "disp('unmodulated carrier power');" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.7_A: Unmodulated_Carrier_Power.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc;\n", "clear;\n", "a=8;// amplitude in V\n", "r=30; //resistance in ohms\n", "\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", "\n", "// change in answer due to approximations in the book\n", "\n", "disp(Pc_unmodulated,'Unmodulated Power Carrier(in W)=');\n", "disp(Pt,'Total Power in modulated wave(in W)=');\n", "disp('Power in the modulated wave is equal to');\n", "disp('power in the unmodulated wave');\n", "disp('Small error due to rounded off values in Bessel functions');" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.7: Phase_Modulatio.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc;\n", "clear;\n", "syms t pi;\n", "\n", "Pha_dev=3; //Phase_Deviation constant in rad/V\n", "\n", "// Phase Modulation Function \n", "\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", "\n", "disp( Pha_function,'the Phase Modulation Function = ');\n", "\n", "disp(Mod_wave ,'The Modulated Wave Function = ');" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.8_A: Balanced_Modulator.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc;\n", "clear;\n", "\n", "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", "\n", "disp('The outputs of the balanced modulator for these parameters');\n", "disp('are same as the inputs');\n", "disp('They remain unaltered');\n", "\n", "//at the output of the multiplier\n", "\n", "m=12;// multiplication factor\n", "\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", "\n", "disp('At the output of the Multiplier,');\n", "disp(fc_final,'Fc(in kHz)=',fm_final,'Fm(in kHz)=',B_final,'B=');\n", "disp(final_Freq_Dev,' Frequency Deviation(in kHz)=');" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.9_A: Frequency_Deviation.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc;\n", "clear;\n", "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", "\n", "//a)\n", "fc=ft/25;\n", "\n", "//b)\n", "Freq_Dev=Freq_Dev_ft/25;\n", "\n", "//c)\n", "B=Freq_Dev/fm;\n", "\n", "//d)\n", "Bt=B*m;\n", "\n", "disp(fc,'a) MAster Oscillator Centre Frequency(in MHz) =');\n", "disp(Freq_Dev, 'b) Frequency Deviation at the output of modulator(in KHz)=');\n", "disp(B,'c)Devaition ratio at the output of modulator');\n", "disp(Bt,'d)deviation ratio at power amplifier');" ] } ], "metadata": { "kernelspec": { "display_name": "Scilab", "language": "scilab", "name": "scilab" }, "language_info": { "file_extension": ".sce", "help_links": [ { "text": "MetaKernel Magics", "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" } ], "mimetype": "text/x-octave", "name": "scilab", "version": "0.7.1" } }, "nbformat": 4, "nbformat_minor": 0 }