{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Chapter 25 : Fiber Optic Systems" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1 : pg 919" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The system margin is 7.011 dB\n" ] } ], "source": [ " \n", "# page no 919\n", "# prob no 25_1\n", "#calculate the system margin\n", "#given\n", "from math import log10\n", "span_length = 40#in km\n", "Pin_mW = 1.5\n", "signal_strength_dBm = -25\n", "fiber_length = 2.5#in km\n", "loss_per_slice_dB = 0.25\n", "f_loss_dB_per_km = 0.3\n", "loss_connector_dB = 4\n", "#calculations\n", "Pin_dBm = 10 * log10(Pin_mW)\n", "splices = span_length / fiber_length - 1\n", "fiber_loss = span_length * f_loss_dB_per_km\n", "splice_loss = splices * loss_per_slice_dB\n", "T_loss = fiber_loss + splice_loss + loss_connector_dB\n", "P_out = Pin_dBm - T_loss\n", "sys_margin = P_out - signal_strength_dBm\n", "#results\n", "print 'The system margin is',round(sys_margin,3),'dB'" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2 : pg 921" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The maximum permissible value for the pulse-spreading constant is 2.22 ns/km\n" ] } ], "source": [ " \n", "# page no 921\n", "# prob no 25_2\n", "#calculate the max permissible value\n", "#given\n", "L=45;#in km\n", "dt=100.;#in ns\n", "#calculations\n", "#The maximum permissible value for the pulse-spreading constant is \n", "D=dt/L;\n", "#results\n", "print 'The maximum permissible value for the pulse-spreading constant is',round(D,2),'ns/km'" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 3 : pg 922" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "a) The maximum bit rate for NRZ 0.00743 GHz\n", "b) The maximum bit rate for NRZ 0.00371 GHz\n" ] } ], "source": [ " \n", "# page no 922\n", "# prob no 25_3\n", "#calculate the max bitrate in both cases#given\n", "#given\n", "from math import sqrt\n", "L=45.;\n", "T_Rtx=50.; T_Rrx=75.; T_Rf=100.;\n", "#calculations and results\n", "T_RT=sqrt(T_Rtx**2 + T_Rrx**2 + T_Rf**2);\n", "# a) for NRZ\n", "fb=1/T_RT;\n", "print 'a) The maximum bit rate for NRZ',round(fb,5),'GHz'\n", "# b) for RZ\n", "fb=1/(2*T_RT);\n", "print 'b) The maximum bit rate for NRZ',round(fb,5),'GHz'" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4 : pg 924" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Dispersion is 1.0 ns/km\n", "Total rise time is 5.0 ns\n" ] } ], "source": [ " \n", "# page no 924\n", "# prob no 25_4\n", "#calculate the total rise time and dispersion\n", "#given\n", "Bl=500.;#in MHz-km\n", "L=5.;#in km\n", "#calculations and results\n", "# using the bandwidth-distance product formula dispersion is given as\n", "D=500/Bl;\n", "print 'Dispersion is',D,'ns/km'\n", "# Total rise time is given as\n", "T_rt= D*L;\n", "print 'Total rise time is',T_rt,'ns'" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 5 : pg 924" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The maximum acceptable dispersion is 0.139 ns/km\n", "The bandwidth-distance product is 3608.439 MHz-km\n" ] } ], "source": [ " \n", "# page no 924\n", "# prob no 25_5\n", "#calculate the max acceptable dispersion and bandwidth-distance product\n", "#given\n", "from math import sqrt\n", "T_Rrx=3.*10**-9;\n", "T_Rtx=2.*10**-9;\n", "fb=100.*10**6;#in bps\n", "L=25;#in km\n", "#calculations and results\n", "T_RT = 1/(2*fb)\n", "# we have to compute rise time therefore\n", "T_rf= sqrt(T_RT**2 - T_Rtx**2 - T_Rrx**2)\n", "# dispersion per km is\n", "D= T_rf/L;\n", "print 'The maximum acceptable dispersion is',round(D/10**-9,3),'ns/km'\n", "# using the bandwidth-distance product\n", "Bl=500/D;\n", "print 'The bandwidth-distance product is',round(Bl*10**-9,3),'MHz-km'" ] } ], "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 }