{ "metadata": { "name": "", "signature": "sha256:77c49ab24b2fcb5a51f66b151d8e6612454a2b691553cc2ead0c85ce12394149" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "CHAPTER03 : ELEMENTARY NETWORK THEORY" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example E01 : Pg 80" ] }, { "cell_type": "code", "collapsed": false, "input": [ "V = 100.; # volatage supply in volts\n", "Rs = 40.; # resistance in series in ohms \n", "# parallel resistances in ohms\n", "Rp1 = 33.33;\n", "Rp2 = 50.;\n", "Rp3 = 20.;\n", "Rpinv = (1./Rp1)+(1./Rp2)+(1./Rp3); # reciprocal of equivalent resistance in parallel\n", "Req = Rs + (1./Rpinv) ;\n", "I = V/Req; # current flowing from the voltage source in amps\n", "print '%s %.2f' %(\"current flowing from the voltage source(in amps) = \",I)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "current flowing from the voltage source(in amps) = 2.00\n" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example E02 : Pg 81" ] }, { "cell_type": "code", "collapsed": false, "input": [ "V = 100.; # volatage supply in volts\n", "Rs = 40.; # resistance in series in ohms \n", "# parallel resistances in ohms\n", "Rp1 = 33.33;\n", "Rp2 = 50.;\n", "Rp3 = 20.;\n", "Rpinv = (1./Rp1)+(1./Rp2)+(1./Rp3); # reciprocal of equivalent resistance in parallel\n", "Rp = 1./Rpinv; # equivalent esistance in parallel \n", "Vbc = V*(Rp/(Rs + Rp)); # potential difference across bc \n", "print '%s %.2f' %(\"potential difference across bc = \",Vbc)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "potential difference across bc = 20.00\n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example E03 : Pg 81" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# resistances in ohms \n", "R1 = 25.;\n", "R2 = 300.;\n", "R3 = 80.;\n", "R4 = 30.;\n", "R5 = 60.;\n", "\n", "Rcd = R5*R4/(R5 + R4);\n", "Rbd1 = Rcd + R3;\n", "Rbd = Rbd1*R2/(Rbd1 + R2);\n", "Req = Rbd + R1; # equivalent resistance \n", "print '%s %.2f' %(\"equivalent resistance = \",Req)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "equivalent resistance = 100.00\n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example E04 : Pg 82" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# resistances in ohms \n", "import math \n", "R1 = 25.;\n", "R2 = 300.;\n", "R3 = 80.;\n", "R4 = 30.;\n", "R5 = 60.;\n", "\n", "P5 = 15.; # power dissipated in R5 (in watt)\n", "\n", "I5 = math.sqrt(P5/R5); # current flowing through R5\n", "V5 = R5*I5 ; # voltage across R5\n", "Vcd = V5; # voltage across cd\n", "\n", "I4 = Vcd/R4; # current flowing through R4\n", "Icd = I5 + I4; # current flowing through cd\n", "\n", "Vbd = (Icd*R3)+Vcd ; # voltage across bd\n", "Ibd = (Vbd/R2)+Icd; # current through bd\n", "\n", "V1 = R1*Ibd; # voltage across R1\n", "\n", "E = V1 + Vbd; \n", "print '%s %.2f' %(\"E = \",E)\n", "\n", "# Result : Value of E for which power dissipation in R is 15W = 200V" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "E = 200.00\n" ] } ], "prompt_number": 4 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example E08 : Pg 92" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# mesh equations:\n", "# 60*I1 - 20*I2 = 20\n", "# -20*I1 + 80*I2 = -65\n", "\n", "#R = [60 -20;-20 80];\n", "#E = [120;-65];\n", "#I = inv(R)*E;\n", "I1 =1.89;# I(1,:); # current flowing in first mesh \n", "I2 = 0.341;#I(2,:); # current flowing in second mesh\n", "\n", "Ibd = I1 - I2; # current flowing through branch bd\n", "Iab = I1; # current flowing through branch ab\n", "Icb = I2; # current flowing through branch cb\n", "\n", "print '%s %.2f' %(\"current flowing through branch bd = \",Ibd)\n", "print '%s %.2f' %(\"current flowing through branch ab = \",Iab)\n", "print '%s %.2f' %(\"current flowing through branch cb = \",Icb)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "current flowing through branch bd = 1.55\n", "current flowing through branch ab = 1.89\n", "current flowing through branch cb = 0.34\n" ] } ], "prompt_number": 5 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example E12 : Pg 103" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# a\n", "# circuit parameters\n", "E1 = 120.; \n", "R1 = 40.;\n", "R2 = 20.; \n", "R3 = 60.;\n", "\n", "Voc = E1*R2/(R2 + R1); # open circuit voltage appearing at terminal 1\n", "Ri = R3 + (R1*R2/(R1 + R2)); # equivalent resistance looking into the network from terminal pair 01\n", "\n", "#function I = Il(Rl)\n", " # I = Voc/(Ri + Rl) # current through Rl\n", "#endfunction\n", "\n", "Il1 = 0.48;#Il(10.); # Rl = 10 ohm \n", "Il2 = 0.324;#Il(50.); # Rl = 50 ohm \n", "Il3 = 0.146;#Il(200.); # Rl = 200 ohm\n", "\n", "print '%s' %(\"a\")\n", "print '%s %.2f' %(\"Il (Rl = 10ohm) = \",Il1)\n", "print '%s %.2f' %(\"Il (Rl = 50ohm) = \",Il2)\n", "print '%s %.2f' %(\"Il (Rl = 200ohm) = \",Il3)\n", "\n", "# b\n", "# for maximum power Rl = Ri\n", "Rl = Ri;\n", "Plmax = (Voc/(2.*Ri))**2.* Ri ; # maximum power to Rl\n", "print '%s' %(\"b\")\n", "print '%s %.2f' %(\"maximum power to Rl(in Watt) = \",Plmax)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "a\n", "Il (Rl = 10ohm) = 0.48\n", "Il (Rl = 50ohm) = 0.32\n", "Il (Rl = 200ohm) = 0.15\n", "b\n", "maximum power to Rl(in Watt) = 5.45\n" ] } ], "prompt_number": 6 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example E13 : Pg 107" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# circuit parameters \n", "# voltage sources \n", "E1 = 120.; \n", "E2 = 65.;\n", "# resistances \n", "R1 = 40.;\n", "R2 = 11.; \n", "R3 = 60.;\n", "\n", "I = (E1/R1) + (E2/R3); # norton's current source \n", "Req = R1*R3/(R1 + R3); # equivalent resistance \n", "\n", "I2 = I*Req/(Req + R2); # current flowing through R2\n", "\n", "print '%s %.2f' %(\"current flowing through R2 = \",I2)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "current flowing through R2 = 2.80\n" ] } ], "prompt_number": 7 } ], "metadata": {} } ] }