diff options
Diffstat (limited to 'Basic_Electrical_Engineering/Chapter11.ipynb')
-rwxr-xr-x | Basic_Electrical_Engineering/Chapter11.ipynb | 929 |
1 files changed, 929 insertions, 0 deletions
diff --git a/Basic_Electrical_Engineering/Chapter11.ipynb b/Basic_Electrical_Engineering/Chapter11.ipynb new file mode 100755 index 00000000..e9007ce3 --- /dev/null +++ b/Basic_Electrical_Engineering/Chapter11.ipynb @@ -0,0 +1,929 @@ +{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 11: RESONANCE IN AC CIRCUITS"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.1,Page number: 315"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the resonant frequency,quality factor,voltage across each element in a series RLC circuit.\"\"\"\n",
+ "\n",
+ "from math import sqrt,pi,pow\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R=12.0 #Resistance of resistor(in Ohms)\n",
+ "L=0.15 #Self-inductance of inductor(in Henry)\n",
+ "C=100e-06 #Capacitance of capacitor(in Farads) \n",
+ "V=100.0 #Voltage(rms) of ac source(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "resonant_freq=1/(2.0*pi*sqrt(L*C))\n",
+ "I_max=V/R\n",
+ "freq_c=(sqrt((1.0/(L*C))-(0.5*pow((R/L),2))))/(2.0*pi)\n",
+ "freq_l=1.0/(sqrt((L*C)-(0.5*pow((R*C),2)))*2*pi)\n",
+ "cap_rea=1.0/(2.0*pi*freq_l*C)\n",
+ "ind_rea=2.0*pi*round(freq_l,2)*L\n",
+ "Q=cap_rea/R\n",
+ "Vr=V\n",
+ "Vl=Q*V\n",
+ "Vc=Vl\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The Resonant frequency(at which the circuit current becomes maximum) is %.2f Hz.\" %(resonant_freq)\n",
+ "print \"(b)The maximum current supplied by the source is %.2f A.\" %(I_max)\n",
+ "print \"(c)The frequency at which voltage across the capacitor is maximum is %.2f Hz.\" %(freq_c)\n",
+ "print \"(d)The frequency at which voltage across the inducttor is maximum is %.2f Hz.\" %(freq_l)\n",
+ "print \"(e)The inductive reactance is %.2f Ohms.\" %(ind_rea)\n",
+ "print \"(f)The capacitive reactance is %.2f Ohms.\" %(cap_rea)\n",
+ "print \"(g)The quality factor of the circiut is %.2f.\" %(Q)\n",
+ "print \"(h)The voltage drop across resistor is %.2f V.\" %(Vr)\n",
+ "print \" The voltage drop across inductor is %.2f V.\" %(Vl)\n",
+ "print \" The voltage drop across capacitor is %.2f V.\" %(Vc) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The Resonant frequency(at which the circuit current becomes maximum) is 41.09 Hz.\n",
+ "(b)The maximum current supplied by the source is 8.33 A.\n",
+ "(c)The frequency at which voltage across the capacitor is maximum is 40.10 Hz.\n",
+ "(d)The frequency at which voltage across the inducttor is maximum is 42.12 Hz.\n",
+ "(e)The inductive reactance is 39.70 Ohms.\n",
+ "(f)The capacitive reactance is 37.79 Ohms.\n",
+ "(g)The quality factor of the circiut is 3.15.\n",
+ "(h)The voltage drop across resistor is 100.00 V.\n",
+ " The voltage drop across inductor is 314.91 V.\n",
+ " The voltage drop across capacitor is 314.91 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.2,Page number: 316"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the capacitance value to give resonance in a series RLC circuit. \"\"\"\n",
+ "\n",
+ "from math import pi,sqrt,pow\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "res_freq=50.0 #Resonant frequency(in Hertz)\n",
+ "L=0.5 #Self-inductance of inductor(in Henry)\n",
+ "R=4.0 #Resistance of resistor(in Ohms)\n",
+ "V=100.0 #Voltage of the supply(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "C=1/(pow((2*pi*res_freq),2)*L)\n",
+ "I_max=V/R\n",
+ "V_L=I_max*(2*pi*res_freq*L)\n",
+ "V_C=V_L\n",
+ "Q=(2.0*pi*res_freq*L)/R\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The capacitance to give resonance is %e F.\" %(C)\n",
+ "print \"(b)The voltage across the inductor is %.2f V.\" %(V_L)\n",
+ "print \" The voltage across the capacitor is %.2f V.\" %(V_C)\n",
+ "print \"(c)The quality factor of the circuit is %.2f.\" %(Q)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The capacitance to give resonance is 2.026424e-05 F.\n",
+ "(b)The voltage across the inductor is 3926.99 V.\n",
+ " The voltage across the capacitor is 3926.99 V.\n",
+ "(c)The quality factor of the circuit is 39.27.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.3,Page number: 317 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the inductance,the circuit current and the voltage across the capacitor under resonance.\"\"\"\n",
+ "\n",
+ "from math import pi,pow\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "res_freq=175e03 #Resonant frequency(in Hertz) \n",
+ "V=0.85 #Voltage applied(in Volts)\n",
+ "Q=50.0 #Quality factor of the coil\n",
+ "C=320e-012 #Capacitance of the capacitor(in Farads)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "L=1/(pow((2*pi*res_freq),2)*C)\n",
+ "ind_rea=2*pi*res_freq*L\n",
+ "R=ind_rea/Q\n",
+ "Io=V/R\n",
+ "Vc=Q*V\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The value of inductance is %e H.\" %(L)\n",
+ "print \"The circuit current is %e A.\" %(Io)\n",
+ "print \"The voltage across the capacitor under resonance is %.2f V.\" %(Vc)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of inductance is 2.584724e-03 H.\n",
+ "The circuit current is 1.495398e-02 A.\n",
+ "The voltage across the capacitor under resonance is 42.50 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.4,Page number: 317"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current at the resonant frequency and the energy stored by inductor.\"\"\"\n",
+ "\n",
+ "from math import pow,pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "res_freq=5e03 #Resonant frequency(in Hertz)\n",
+ "L=1e-03 #Self-inductance of the inductor(in Henry)\n",
+ "V=120.0 #Voltage of the supply(in Volts)\n",
+ "R=2.0 #Resistance of the coil(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "C=1/(pow((2*pi*res_freq),2)*L)\n",
+ "I_max=V/R\n",
+ "\"\"\" U=0.5*L*I*I=L*Irms*Irms\"\"\"\n",
+ "U=L*I_max*I_max\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The required value of capacitance is %e F.\" %(C)\n",
+ "print \"(a)The current at the resonance frequency is %.2f A.\" %(I_max)\n",
+ "print \"(b)The maximum instantaneous energy is %.2f J.\" %(U)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The required value of capacitance is 1.013212e-06 F.\n",
+ "(a)The current at the resonance frequency is 60.00 A.\n",
+ "(b)The maximum instantaneous energy is 3.60 J.\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.5,Page number: 318"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the resonance frequency and the quality factor for the overall circuit.\"\"\"\n",
+ "\n",
+ "from math import sqrt,pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R1=0.51 #Resistor of the resistor-1(in Ohms) \n",
+ "R2=1.3 #Resistor of the resistor-2(in Ohms) \n",
+ "R3=0.24 #Resistor of the resistor-3(in Ohms)\n",
+ "L1=32e-03 #Self-inductance of the inductor-1(in Henry)\n",
+ "L2=15e-03 #Self-inductance of the inductor-2(in Henry)\n",
+ "C1=25e-06 #Capacitance of the capacitor-1(in Farads)\n",
+ "C2=62e-06 #Capacitance of the capacitor-2(in Farads)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Req=R1+R2+R3\n",
+ "Leq=L1+L2\n",
+ "Ceq=(C1*C2)/(C1+C2)\n",
+ "res_freq=1/(2*pi*sqrt(Leq*Ceq))\n",
+ "Q=(sqrt(Leq/Ceq))/Req\n",
+ "Q1=(2*pi*res_freq*L1)/R1\n",
+ "Q2=(2*pi*res_freq*L2)/R2\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The resonance frequency is %.2f Hz.\" %(res_freq)\n",
+ "print \"(b)The quality factor of the overall circuit is %.2f.\" %(Q)\n",
+ "print \"(c)The quality factor of coil-1 is %.2f.\" %(Q1)\n",
+ "print \"(d)The quality factor of coil-2 is %.2f.\" %(Q2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The resonance frequency is 173.93 Hz.\n",
+ "(b)The quality factor of the overall circuit is 25.05.\n",
+ "(c)The quality factor of coil-1 is 68.57.\n",
+ "(d)The quality factor of coil-2 is 12.61.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.6,Page number: 320"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the half-power frequencies of a series ac circuit.\"\"\"\n",
+ "\n",
+ "from math import pow,sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "bandwidth=75e03 #Bandwidth of the resonant circuit(in Hertz) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "pro=pow((150e03),2)\n",
+ "sum=sqrt(pow(bandwidth,2)+(4*pro))\n",
+ "f2=(sum+bandwidth)/2.0\n",
+ "f1=(sum-bandwidth)/2.0\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"Lower Half-power frequency is %e Hz.\" %(f1)\n",
+ "print \"Upper Half-power frequency is %e Hz.\" %(f2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Lower Half-power frequency is 1.171165e+05 Hz.\n",
+ "Upper Half-power frequency is 1.921165e+05 Hz.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.7,Page number: 324"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the line current,quality factor and the dynamic impedance of a series-parallel ac circuit.\"\"\"\n",
+ "\n",
+ "from math import pi,sqrt,pow\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "L=200e-06 #Self-inductance of the inductor coil(in Henry) \n",
+ "res_freq=1e06 #Resonant frequency(in Hertz)\n",
+ "R=20.0 #Resistance of the coil(in Ohms)\n",
+ "Rs=8e03 #Series resistance(in Ohms)\n",
+ "V=230.0 #Voltage(rms) of the supply(in Volts) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "C=1/(pow((2*pi*res_freq),2)*L)\n",
+ "XL=2*pi*res_freq*L\n",
+ "Q=XL/R\n",
+ "Zo=L/(C*R)\n",
+ "Z=Zo+Rs\n",
+ "I=V/Z\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The value of capacitance to cause resonance is %e F.\" %(C)\n",
+ "print \"(b)The Q factor of the circuit is %.5f.\" %(Q)\n",
+ "print \"(c)The dynamic impedance of the parallel resonant circuit is %.2f Ohms.\" %(Zo)\n",
+ "print \"(d)The total line current is %e A.\" %(I) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The value of capacitance to cause resonance is 1.266515e-10 F.\n",
+ "(b)The Q factor of the circuit is 62.83185.\n",
+ "(c)The dynamic impedance of the parallel resonant circuit is 78956.84 Ohms.\n",
+ "(d)The total line current is 2.644990e-03 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.8,Page number: 325"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the resonant frequency,Q-factor and bandwidth of a practical parallel resonant circuit.\"\"\"\n",
+ "\n",
+ "from math import pow,sqrt,pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R=150.0 #Resistance of the coil(in Ohms)\n",
+ "L=0.24 #Self-inductance of the coil(in Henry)\n",
+ "C=3e-06 #Capacitance of the capacitor(in Farads)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "res_freq=(sqrt(1-((R*R*C)/L)))/(2*pi*sqrt(L*C))\n",
+ "Q=(2*pi*res_freq*L)/R\n",
+ "BW=res_freq/Q\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The resonant frequency is %.2f Hz.\" %(res_freq)\n",
+ "print \"The quality factor is %.2f.\" %(Q)\n",
+ "print \"The bandwidth is %.2f Hz.\" %(BW)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The resonant frequency is 159.02 Hz.\n",
+ "The quality factor is 1.60.\n",
+ "The bandwidth is 99.47 Hz.\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.9,Page number: 326"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the source frequency and the current supplied by the source.\"\"\"\n",
+ "\n",
+ "from math import sqrt,pi,pow,degrees\n",
+ "from cmath import phase\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=125.0 #Voltage of the source(in Volts)\n",
+ "C=20.5e-06 #Capacitance of the capacitor(in Farads)\n",
+ "R=1.06 #Resistance of the coil(in Ohms)\n",
+ "L=25.4e-03 #Inductance of the coil(in Henry)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "fo=1.0/(2*pi*sqrt(L*C))\n",
+ "Io=V/R\n",
+ "V_L=Io*(2*pi*fo*L)\n",
+ "V_C=V_L\n",
+ "X_L=(2*pi*fo*L)\n",
+ "Z_coil=R+(1j*X_L)\n",
+ "V_coil=Io*Z_coil\n",
+ "I=300.0/X_L\n",
+ "R_new=V/I\n",
+ "Rx=R_new-R\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a) (i)The source frequency is %.2f Hz, and\\n (ii)The current supplied by the source is %.2f A.\\n\" %(fo,Io)\n",
+ "print \"(b) (i)The voltage across the capacitor is %.2f V and\" %(V_C)\n",
+ "print \" (ii)The voltage across the coil is %.2f V at an angle of %.2f degrees.\\n\" %(abs(V_coil),degrees(phase(V_coil)))\n",
+ "print \"(c)The resistance that must be connected in series with the circuit to limit the capacitor voltage to 300V is %.3f Ohms.\" %(Rx)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) (i)The source frequency is 220.56 Hz, and\n",
+ " (ii)The current supplied by the source is 117.92 A.\n",
+ "\n",
+ "(b) (i)The voltage across the capacitor is 4150.92 V and\n",
+ " (ii)The voltage across the coil is 4152.80 V at an angle of 88.28 degrees.\n",
+ "\n",
+ "(c)The resistance that must be connected in series with the circuit to limit the capacitor voltage to 300V is 13.607 Ohms.\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.10,Page number: 326"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the maximum instantaneous energy stored in the inductor.\"\"\"\n",
+ "\n",
+ "from math import pow,pi,sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R=3.0 #Resistance of the coil(in Ohms)\n",
+ "L=12e-03 #Self-inductance of the coil(in Henry)\n",
+ "fo=9e03 #Resonant frequency(in Hertz)\n",
+ "V=240.0 #Supply voltage(in Volts) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "C=1.0/(pow((2*pi*fo),2)*L)\n",
+ "Io=V/R\n",
+ "ener=0.5*L*Io*Io\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The value of capacitance to be connected in series with the coil is %e F.\" %(C)\n",
+ "print \"The maximum instantaneous energy stored in the inductor is %.2f J.\" %(ener)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of capacitance to be connected in series with the coil is 2.605998e-08 F.\n",
+ "The maximum instantaneous energy stored in the inductor is 38.40 J.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.11,Page number: 327"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the parameters of a series RLC circuit.\"\"\"\n",
+ "\n",
+ "from math import pi,sqrt,pow\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "fo=10e03 #Resonant frequency(in Hertz)\n",
+ "BW=1e03 #Bandwidth(in HErtz)\n",
+ "P=15.3 #Power drawn(in Watts)\n",
+ "V=200.0 #Voltage of generator(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "V_R=V\n",
+ "R=(V_R*V_R)/P\n",
+ "\"\"\" Q=fo/BW=(2*pi*fo*L)/R; Q=Quality factor of the circuit. \"\"\"\n",
+ "L=R/(2*pi*BW)\n",
+ "C=1.0/(pow((2*pi*fo),2)*L)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The parameters of the circuit are:\\n R=%.2f Ohms,\\n L=%.3f H,\\n C=%e F.\" %(R,L,C)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The parameters of the circuit are:\n",
+ " R=2614.38 Ohms,\n",
+ " L=0.416 H,\n",
+ " C=6.087677e-10 F.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.12,Page number: 327"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the half-power frequencies and the circuit current.\"\"\"\n",
+ "\n",
+ "from math import sqrt,pi,pow\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "fo=200.0 #Resonant frequency(in Hertz)\n",
+ "V=400.0 #Voltage of the source(in Volts)\n",
+ "R=20e-03 #Resistance of the coil(in Ohms)\n",
+ "L=6e-03 #Inductance of the coil(in Henry)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "C=1.0/(pow((2*pi*fo),2)*L)\n",
+ "Io=V/R\n",
+ "X_C=1.0/(2*pi*fo*C)\n",
+ "V_C=Io*X_C\n",
+ "Im=sqrt(2)*Io\n",
+ "U_max=0.5*L*Im*Im\n",
+ "Q=(2*pi*fo*L)/R\n",
+ "BW=fo/Q\n",
+ "f1=fo-(BW/2.0)\n",
+ "f2=fo+(BW/2.0)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The capacitance of the capacitor is %e F.\" %(C)\n",
+ "print \"(b)The circuit current is %.2f kA.\" %(Io/1000)\n",
+ "print \"(c)The voltage across the capacitor is %.2f kV.\" %(V_C/1000)\n",
+ "print \"(d)The maximum energy stored in the coil is %.2f MJ.\" %(U_max/1000000)\n",
+ "print \"(e)The lower half-power frequency is %.3f Hz and the upper half-power frequency is %.3f Hz.\" %(f1,f2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The capacitance of the capacitor is 1.055429e-04 F.\n",
+ "(b)The circuit current is 20.00 kA.\n",
+ "(c)The voltage across the capacitor is 150.80 kV.\n",
+ "(d)The maximum energy stored in the coil is 2.40 MJ.\n",
+ "(e)The lower half-power frequency is 199.735 Hz and the upper half-power frequency is 200.265 Hz.\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.13,Page number: 327"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the bandwidth,resonant frequency,inductance and capacitance.\"\"\"\n",
+ "\n",
+ "from math import pi,pow,sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R=1e03 #Resistance of the resistor(in Ohms)\n",
+ "f1=20e03 #Lower half-power frequency(in Hertz) \n",
+ "f2=100e03 #Upper half-power frequency(in Hertz)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "BW=f2-f1\n",
+ "res_freq=sqrt(f1*f2)\n",
+ "Q=res_freq/BW\n",
+ "L=(Q*R)/(2*pi*res_freq)\n",
+ "C=1.0/(pow((2*pi*res_freq),2)*L)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The bandwidth is %.2f kHz.\" %(BW/1000.0)\n",
+ "print \"(b)The resonant frequency is %.2f kHz.\" %(res_freq/1000.0)\n",
+ "print \"(c)The inductance is %e H.\" %(L)\n",
+ "print \"(d)The capacitance is %e F.\" %(C)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The bandwidth is 80.00 kHz.\n",
+ "(b)The resonant frequency is 44.72 kHz.\n",
+ "(c)The inductance is 1.989437e-03 H.\n",
+ "(d)The capacitance is 6.366198e-09 F.\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.14,Page number: 328"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the power at half-power frequencies.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R=5.0 #Resistance of resistor(in Ohms)\n",
+ "V=20.0 #Voltage of the source(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Zo=R\n",
+ "Io=V/Zo\n",
+ "Po=(Io*Io)*R\n",
+ "P_half=Po/2.0\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The power at half-power frequencies is %.2f W.\" %(P_half) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The power at half-power frequencies is 40.00 W.\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.15,Page number: 328"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the half-power frequencies and the quality factor.\"\"\"\n",
+ "\n",
+ "from math import pi,pow,sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "res_freq=100.0 #Resonant frequency(in Hertz)\n",
+ "V=240.0 #Voltage of the source(in Volts)\n",
+ "R=55e-03 #Resistance of the coil(in Ohms)\n",
+ "L=7e-03 #Self-inductance of the coil(in Henry)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "C=1.0/(pow((2*pi*res_freq),2)*L)\n",
+ "Q=(2*pi*res_freq*L)/R\n",
+ "BW=res_freq/Q\n",
+ "f1=res_freq-(BW/2.0)\n",
+ "f2=res_freq+(BW/2.0)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The value of the capacitance is %e F.\" %(C)\n",
+ "print \"(b)The quality factor of the circuit is %.2f.\" %(Q)\n",
+ "print \"(c)The lower half-power frequency is %.2f Hz and The upper half-power frequency is %.2f Hz.\" %(f1,f2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The value of the capacitance is 3.618614e-04 F.\n",
+ "(b)The quality factor of the circuit is 79.97.\n",
+ "(c)The lower half-power frequency is 99.37 Hz and The upper half-power frequency is 100.63 Hz.\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.16,Page number: 328"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the resonance frequency and the effective resistance at resonance.\"\"\"\n",
+ "\n",
+ "from math import sqrt,pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R=20.0 #Resistance of the coil(in Ohms)\n",
+ "L=0.2 #Inductance of the coil(in Henry)\n",
+ "C=100e-06 #Capacitance of the capacitor(in Farads)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "res_freq=sqrt(1-((R*R*C)/L))/(2*pi*sqrt(L*C))\n",
+ "Zo=L/(C*R)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The frequency at which the circuit behaves as a non-inductive reactance is %.2f Hz.\" %(res_freq)\n",
+ "print \"The effective resistance at resonance is %.2f Ohms.\" %(Zo) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The frequency at which the circuit behaves as a non-inductive reactance is 31.83 Hz.\n",
+ "The effective resistance at resonance is 100.00 Ohms.\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.17,Page number: 328"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the quality factor at the upper tuning frequency.\"\"\"\n",
+ "\n",
+ "from math import sqrt,pow,pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "L=20e-06 #Self-inductance of the coil(in Henry)\n",
+ "fo_1=570e03 #Lower tuning frequency(in Hertz) \n",
+ "fo_2=1560e03 #Upper tuning frequency(in Hertz)\n",
+ "Q1=50.0 #Quality factor at the lower tuning frequency\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "C1=1.0/(pow((2*pi*fo_1),2)*L)\n",
+ "C2=1.0/(pow((2*pi*fo_2),2)*L)\n",
+ "R=(2*pi*fo_1*L)/Q1\n",
+ "BW=fo_1/Q1\n",
+ "Q2=(2*pi*fo_2*L)/R\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The range of tuning capacitor is from %.3f nF to %.3f nF.\" %((C2*1e09),(C1*1e09))\n",
+ "print \"(b)The resistance of the coil is %.3f Ohms and the bandwidth of the circuit is %.3f kHz.\" %(R,(BW/1000))\n",
+ "print \"(c)The quality factor of the circuit at the upper tuning frequency is %.3f.\" %(Q2) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The range of tuning capacitor is from 0.520 nF to 3.898 nF.\n",
+ "(b)The resistance of the coil is 1.433 Ohms and the bandwidth of the circuit is 11.400 kHz.\n",
+ "(c)The quality factor of the circuit at the upper tuning frequency is 136.842.\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file |