{ "metadata": { "name": "", "signature": "sha256:3a4ef8be1017f129a0421c21819212b5457aab0abc06690d5c2563f72500374f" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 11: Measurement of Voltages and Currents" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 11.1, Page 209" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Initialisation\n", "t=0.02 #time period in seconds from diagram\n", "v1=7 #peak voltage from diagram\n", "\n", "\n", "#Calculation\n", "f=1*t**-1 #frequency in Hz\n", "v2=2*v1 # Peak to Peak Voltage\n", "\n", "#Result\n", "print'Frequency = %d Hz\\n'%f\n", "print'Peak to Peak Voltage = %d V\\n'%v2\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Frequency = 50 Hz\n", "\n", "Peak to Peak Voltage = 14 V\n", "\n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 11.2, Page 210" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "#Initialisation\n", "t=0.05 #time period in seconds from diagram\n", "v1=10 #peak voltage from diagram\n", "\n", "\n", "#Calculation\n", "f1=1*t**-1 #frequency in Hz\n", "w1=2*math.pi*f1 #Angular velocity\n", "\n", "#Result\n", "print'%d sin %.1ft Hz\\n'%(v1,w1)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "10 sin 125.7t Hz\n", "\n" ] } ], "prompt_number": 26 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 11.3, Page 211" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "#Initialisation\n", "t=0.1 #time period in seconds from diagram\n", "v1=10 #peak voltage from diagram\n", "t1=25*10**-3\n", "\n", "#Calculation\n", "f1=1*t**-1 #frequency in Hz\n", "w1=2*math.pi*f1 #Angular velocity\n", "phi=-(t1*t**-1)*360 #phase angle\n", "\n", "#Result\n", "print'phi = %d degree'%phi\n", "print'%d sin %dt%d Hz\\n'%(v1,round(w1),phi)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "phi = -90 degree\n", "10 sin 63t-90 Hz\n", "\n" ] } ], "prompt_number": 24 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 11.4, Page 215" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "#Initialisation\n", "v1=5 #constant 5V\n", "r=10 #resistance in Ohm\n", "vrms=5 #sine wave of 5 V r.m.s\n", "vp=5 #5 V peak\n", "\n", "#Calculation\n", "p=(v1**2)*r**-1 #Power in watts\n", "p2=(vrms**2)*r**-1 #Power avarage in watts\n", "a=(vp*math.sqrt(2)**-1)**2\n", "p3=a*r**-1 #Power avarage in watts \n", "\n", "#Result\n", "print'(1) P = %.1f W\\n'%p\n", "print'(2) Pav = %.1f W\\n'%p2\n", "print'(3) Pav = %.2f W\\n'%p3" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "(1) P = 2.5 W\n", "\n", "(2) Pav = 2.5 W\n", "\n", "(3) Pav = 1.25 W\n", "\n" ] } ], "prompt_number": 27 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 11.5, Page 220" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Initialisation\n", "fsd1=50*10**-3 #full scale defelction of ammeter in Ampere\n", "fsd2=1*10**-3 #full scale defelction of moving coil meter in Ampere\n", "Rm=25 #resistance of moving coil meter in Ohms\n", "\n", "#Calculation\n", "Rsm=fsd1*fsd2**-1 #sensitivity factor\n", "Rsh=Rm*49**-1 #shunt resistor\n", "\n", "#Result\n", "print'Therefore, Resistor = %d mOhm\\n'%round(Rsh*10**3)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Therefore, Resistor = 510 mOhm\n", "\n" ] } ], "prompt_number": 10 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 11.6, Page 222" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Initialisation\n", "fsd1=50 #full scale defelction of voltmeter in Volts\n", "fsd2=1*10**-3 #full scale defelction of moving coil meter in Ampere\n", "Rm=25 #resistance of moving coil meter in Ohms\n", "\n", "#Calculation\n", "Rsm=fsd1*fsd2**-1\n", "Rse=Rsm-Rm\n", "\n", "#Result\n", "print'Rse = %.3f KOhm\\n'%(Rse*10**-3)\n", "print'Therefore, Resistor ~ %d KOhm\\n'%round(Rse*10**-3)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Rse = 49.975 KOhm\n", "\n", "Therefore, Resistor ~ 50 KOhm\n", "\n" ] } ], "prompt_number": 5 }, { "cell_type": "code", "collapsed": false, "input": [], "language": "python", "metadata": {}, "outputs": [] } ], "metadata": {} } ] }