{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Chapter 8: DIGITAL MODULATION TECHNIQUES" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 8.10: probability_of_error.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Caption: probability of error\n", "//Example 8.10\n", "//page no 382\n", "//Find probability of error of FSK\n", "clc;\n", "clear;\n", "rb=300;//bit rate\n", "T=1/rb;\n", "A2N0=8000;\n", "//Pe=1/2*exp(-Eb/2N0);\n", "//Eb=A^2*T/2\n", "Pe=1/2*exp(-((A2N0*T)/4));//Probability of error non coherent FSK\n", "disp(Pe,'Probability of error is ');" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 8.11: probability_of_symbol_error.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Caption: probability of symbol error\n", "//Example 8.11\n", "//page no 383\n", "//Find probability of symbol error \n", "//assuming coherent detection\n", "clc;\n", "clear;\n", "rb=2.5*10^6//binary data rate\n", "N0=2*10^-20;//power spectral density of noise FSK system\n", "A=1*10^-6;//amplitude of received signal\n", "T=1/rb;\n", "Eb=(A^2*T)/2;// Eb=bit energy\n", "z=sqrt(Eb/(2*N0))\n", "Pe=1/2*erfc(z);//probability of symbol error\n", "disp(Pe,'probability of symbol error');//" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 8.1: probability_of_error.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "\n", "//Caption: probability of error\n", "//Example 8.1\n", "//page no 374\n", "//Find probability of bit error \n", "//AWGN is added to signal\n", "clc;\n", "clear;\n", "N0=2*10^-15;\n", "Ps1=1/2;\n", "Ps2=1/2;\n", "A=0.2*10^-3;\n", "T=2*10^-6;\n", "\n", "Eb=(A/sqrt(2))^2*T*Ps1+Ps2*0^2;//Eb=bit energy\n", "z=sqrt(Eb/N0);//Probability \n", "disp(z,'z = ');\n", "//Pe=(8)*10^(-4)//probability of error from the table\n", "Pe=1/2*erfc(z/sqrt(2));\n", "disp('probability of bit error when P(s1)=P(s2)=1/2 ');\n", "disp(Pe,'P(e)=');" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 8.2: peak_Amplitude.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Caption: peak Amplitude\n", "//Example 8.2\n", "//page no 374\n", "//Find peak Transmission pulseAmplitude\n", "clc;\n", "clear;\n", "NO=1.338*10^-5;\n", "Pe=2.055*10^-5;\n", "T=100*10^-6;\n", "//Pe=erfc(sqrt(Eb/(2*N0)));\n", "Eb=(2*2.9^2*NO);\n", "A=sqrt((Eb*2)/T);\n", "disp('Volts',A,'Transmission pulse Amplitude');" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 8.4: probability_of_error.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Caption: probability of error\n", "//Example 8.4\n", "//page no 377\n", "//Find probability of error\n", "clc;\n", "clear;\n", "A=1*10^-3;\n", "Tb=0.2*10^-3;\n", "fb=1/Tb;\n", "fc=5*fb;\n", "N0=2*10^-11;// power sepctral density\n", "\n", "Eb=(A^2*Tb)/2;//Eb=bit energy\n", "\n", "\n", "z=sqrt(Eb/N0);\n", "Pe=erfc(z)'//bit error probability\n", "disp('Error probability of PSK is ')\n", "disp(Pe,'P(e) =');" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 8.5: probability_bit_error.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Caption: probability bit error\n", "//Example 8.5\n", "//page no 378\n", "//Find bit error probability \n", "clc;\n", "clear;\n", "A=10*10^-3;\n", "T=10^-6;\n", "N0=10^-11;// power sepctral density\n", "\n", "Eb=(A^2*T)/2//Eb=bit energy\n", "\n", "z=sqrt(Eb/N0);//Probability of ASK\n", "Pe=erfc(z)'//bit error probability\n", "disp('bit error probability ')\n", "disp(Pe,'Pe =')" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 8.7: Amplitude.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Caption: amplitude\n", "//Example 8.7\n", "//page no 379\n", "//Find carrier amplitude\n", "clc;\n", "clear;\n", "Pe=10^-4;//probability of error of PSK\n", "N0=2*10^-10;\n", "//from table error function \n", "//Pe=erffc(z)\n", "z=2.6\n", "r=10^6;\n", "T=1/r;\n", " //z=sqrt(Eb/N0)\n", "Eb=N0*z^2; // Eb=bit energy\n", "A=sqrt((Eb*2)/T); //Eb=A^2*T/2\n", "disp('mV',A*1000,'Carrier Amplitude');" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 8.8: Carrier_power_and_Bandwidth.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "\n", "//Caption: Carrier power\n", "//Example 8.8\n", "//page no 382\n", "//Find Carrier power,Bandwidth\n", "clc;\n", "clear;\n", "Pe=10^-4;//probability of error of FSK\n", "r=1*10^6//tranasmitted rate\n", "N0=1*10^-7;//psd at input of the receiver\n", "//from table error function \n", "//Pe=erffc(z)\n", "z=3.71\n", "T=1/r;\n", " //z=sqrt(Eb/N0)\n", "//Eb=N0*z^2; // Eb=bit energy\n", "Ac=sqrt((z^2*2*N0)/T);\n", "\n", "AP=(Ac/sqrt(2))^2;//average carrier power\n", "disp('watts',AP,'Average carrier power =');\n", "BW=1/T;\n", "disp('MHz',BW*10^-6,'Channel Bandwidth =');" ] } ], "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 }