summaryrefslogtreecommitdiff
path: root/Electronic_Communication_Systems_by_Roy_Blake/Chapter19.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'Electronic_Communication_Systems_by_Roy_Blake/Chapter19.ipynb')
-rw-r--r--Electronic_Communication_Systems_by_Roy_Blake/Chapter19.ipynb370
1 files changed, 370 insertions, 0 deletions
diff --git a/Electronic_Communication_Systems_by_Roy_Blake/Chapter19.ipynb b/Electronic_Communication_Systems_by_Roy_Blake/Chapter19.ipynb
new file mode 100644
index 00000000..38f17535
--- /dev/null
+++ b/Electronic_Communication_Systems_by_Roy_Blake/Chapter19.ipynb
@@ -0,0 +1,370 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 19 : Television"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1 : pg 703"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Level of video signals in IRE units 53.75 IRE units\n"
+ ]
+ }
+ ],
+ "source": [
+ " \n",
+ "# page no 703\n",
+ "# prob no 19.1\n",
+ "#calculate the level of video signals\n",
+ "#given\n",
+ "# In the given problem,a video signal has 50% of the maximum luminance level\n",
+ "#A black setup level of 7.5 IRE represents zero luminance,and 100 IRE is max brightness.\n",
+ "#Therefore the range from min to max luminnance has 100-7.5=92.5 units.\n",
+ "#Therefore the level is\n",
+ "#calculations\n",
+ "IRE = 7.5 + (0.5 * 92.5)\n",
+ "#results\n",
+ "print 'Level of video signals in IRE units',IRE,'IRE units'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2 : pg 704"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Horizontal blanking occupies 15.75 % of the signal\n",
+ "vertical blanking occupies 8.0 % of the signal\n",
+ "The active video is 77.51 %\n"
+ ]
+ }
+ ],
+ "source": [
+ " \n",
+ "# page no 704\n",
+ "# prob no 19.2\n",
+ "#calculate the horizontal, vertical blanking occupies\n",
+ "# part a) horizontal blanking\n",
+ "# Horizontal blanking occupies approximately 10 us of the 63.5 us duration of each line,\n",
+ "#given\n",
+ "Hztl_blnk = 10 / 63.5 * 100\n",
+ "#calculations and results\n",
+ "print 'Horizontal blanking occupies',round(Hztl_blnk,2),'%','of the signal'\n",
+ "# part b) vertical blanking\n",
+ "# Vertical blanking occupies approximately 21 lines per field or 42 lines per\n",
+ "# frame. A frame has 525 lines altogether,so\n",
+ "Vert_blnk = 42. / 525 * 100\n",
+ "print 'vertical blanking occupies',Vert_blnk,'%','of the signal'\n",
+ "# part c) active signal\n",
+ "# since 8% of the time is lost in vertical blanking, 92% of the time is\n",
+ "# involved in the tansmission of the active lines.\n",
+ "act_vid = (100 - Hztl_blnk) * (100 - Vert_blnk) / 100\n",
+ "print 'The active video is',round(act_vid,2),'%'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3 : pg 707"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The horizontal resolution in lines is 240.0 lines\n"
+ ]
+ }
+ ],
+ "source": [
+ " \n",
+ "# page no 707\n",
+ "# prob no 19.3\n",
+ "#calculate the horizontal resolution\n",
+ "# A typical low-cost monochrome receiver has a video bandwidth of 3MHz\n",
+ "#given\n",
+ "B = 3.# bandwidth in MHz\n",
+ "#calculations\n",
+ "# The horizontal resolution in lines is given as\n",
+ "L_h = B * 80\n",
+ "#results\n",
+ "print 'The horizontal resolution in lines is',L_h,'lines'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4 : pg 709"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The luminance signal is 0.384\n",
+ "The in-phase component of the color signal is -0.248\n",
+ "The quadrature component of the color signal is 0.082\n"
+ ]
+ }
+ ],
+ "source": [
+ " \n",
+ "# page no 709\n",
+ "# prob no 19.4\n",
+ "#given\n",
+ "#calculate the components of signal\n",
+ "# A RGB video signal has normalized values as\n",
+ "R=0.2;G=0.4;B=0.8;\n",
+ "#calculations and results\n",
+ "#The luminance signal is given as\n",
+ "Y=0.30*R+0.59*G+0.11*B;\n",
+ "print 'The luminance signal is',Y\n",
+ "#The in-phase component of the color signal is given as\n",
+ "I=0.60*R-0.28*G-0.32*B;\n",
+ "print 'The in-phase component of the color signal is',I\n",
+ "#The quadrature component of the color signal is given as\n",
+ "Q=0.21*R-0.52*G+0.31*B;\n",
+ "print 'The quadrature component of the color signal is',Q"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5 : pg 712"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "45.5625 % of the maximum transmitter power is used to transmit a black setup\n"
+ ]
+ }
+ ],
+ "source": [
+ " \n",
+ "# page no 712\n",
+ "# prob no 19.5\n",
+ "#refer table 19.1\n",
+ "#calculate the max transmitter power\n",
+ "#given\n",
+ "# The proportion in the table are voltage levels and have to be squared to get power.\n",
+ "# for black setup the voltage level is given as\n",
+ "#calculations\n",
+ "v = 0.675\n",
+ "#Therefore the power level as a fraction of the maximum transmitter power is\n",
+ "P_black_setup = v ** 2 * 100\n",
+ "#results\n",
+ "print P_black_setup,'%','of the maximum transmitter power is used to transmit a black setup'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6 : pg 728"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The input of Amp 1 is -20.0 dBmV\n",
+ "The output of Amp 1 is 20.0 dBmV\n",
+ "The input of Amp 2 is 5.0 dBmV\n",
+ "The output of Amp 2 is 30.0 dBmV\n",
+ "The input of Amp 3 is 8.0 dBmV\n",
+ "The output of Amp 3 is 28.0 dBmV\n",
+ "Signal strength at subscriber tap is 1.778 mV\n",
+ "The power at the end is -43.751 dBm\n"
+ ]
+ }
+ ],
+ "source": [
+ " \n",
+ "# page no 728\n",
+ "# prob no 19.6\n",
+ "# refer fig 19.27 of the page no 729\n",
+ "#calculate the output and input in all cases\n",
+ "#given\n",
+ "from math import log10\n",
+ "# from fig, we can write down the values directly as given\n",
+ "In1 = 100 * 10 ** -3#expressed in mV\n",
+ " #calculations and results\n",
+ "In1_dBmV = 20 * log10(In1 / 1)\n",
+ "print 'The input of Amp 1 is',In1_dBmV,'dBmV'\n",
+ "# this above calculated signal is applied to the input of the first\n",
+ "# amplifier,i.e. head-end signal processing\n",
+ "G1 = 40# gain of Amp 1 expressed in dB\n",
+ " # o/p level of Amp 1 is\n",
+ "Out1 = In1_dBmV + G1\n",
+ "print 'The output of Amp 1 is',Out1,'dBmV'\n",
+ "L = 15#expressed in dB\n",
+ "# The input level of Amp 2 is\n",
+ "In2_dBmV = Out1 - L\n",
+ "print 'The input of Amp 2 is',In2_dBmV,'dBmV'\n",
+ "G2 = 25#gain of Amp2 expressed in dB\n",
+ "# o/p level of Amp 2 is\n",
+ "Out2 = In2_dBmV + G2\n",
+ "print 'The output of Amp 2 is',Out2,'dBmV'\n",
+ "L1 = 10# loss in cable\n",
+ "L2 = 12#loss in directional coupler\n",
+ "# The input level of Amp 3 is\n",
+ "In3_dBmV = Out2 - L1 - L2\n",
+ "print 'The input of Amp 3 is',In3_dBmV,'dBmV'\n",
+ "G3 = 20#gain of Amp3 expressed in dB\n",
+ "Out3 = In3_dBmV + G3\n",
+ "print 'The output of Amp 3 is',Out3,'dBmV'\n",
+ "# There is further 3dB cable loss and 20dB loss in the tap\n",
+ "L3 = 3.#loss in cable\n",
+ "L4 = 20.# loss in tap\n",
+ "#signal strength at the tap is\n",
+ "Vdrop_dBmV = Out3 - L3 - L4\n",
+ "V_drop = 10 ** (Vdrop_dBmV / 20)# expressed in mV\n",
+ "print 'Signal strength at subscriber tap is',round(V_drop,3),'mV'\n",
+ "# Calculation of power into 75 ohm\n",
+ "R = 75.#expressed in ohm\n",
+ "Pdrop = (V_drop * 10 ** -3) ** 2 / R\n",
+ "Pdrop_dBm = 10 * log10(Pdrop / 10 ** -3)\n",
+ "print 'The power at the end is',round(Pdrop_dBm,3),'dBm'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7 : pg 731"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The interference would in 132.0 MHz to 126.0 MHz band\n",
+ "The bit rate for the signal is 110592000.0 bps\n"
+ ]
+ }
+ ],
+ "source": [
+ " \n",
+ "# page no 731\n",
+ "# prob no 19.7\n",
+ "#calculate bit rate and interference\n",
+ "#given\n",
+ "# In given problem a TV receiver is tuned to channel 6.\n",
+ "#All modern Rx uses a picture IF of 45.75 MHz with high-side injection of the signal into the cable.\n",
+ "# The picture carrier of channel 6 is at a frequency of 83.25MHz,so\n",
+ "ch = 6\n",
+ "Fc = 83.25# expressed in MHz\n",
+ "IF = 45.75#expressed in MHz\n",
+ "Nh = 640.\n",
+ "Nv = 480# resolution of digital video signal as 640*480 pixels\n",
+ "Rf = 30.#frame rate expressed in Hz\n",
+ "m = 8.# bits per sample\n",
+ "#calculations\n",
+ "f_lo = Fc + IF\n",
+ "a = f_lo + ch / 2\n",
+ "b = f_lo - ch / 2\n",
+ "# By using the product of Horizontal & vertical resolution, no of luminance\n",
+ "# pixels per frame are\n",
+ "Npl = Nh * Nv\n",
+ "# since each of the color signals has one-fourth the total no of luma pixels\n",
+ "Npt = 1.5 * Npl\n",
+ "#therefore bit rate is given as\n",
+ "fb = Npt * m * Rf\n",
+ "#results\n",
+ "print 'The interference would in',a,'MHz','to',b,'MHz','band'\n",
+ "print 'The bit rate for the signal is',fb,'bps'"
+ ]
+ }
+ ],
+ "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
+}