{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 10 : FET biasing"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10.1, Page No 381"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#initialisation of variables\n",
      "\n",
      "Vdd=22.0\n",
      "Rd=2.0*10**3\n",
      "\n",
      "#Calculations\n",
      "print(\"when Id=0\")\n",
      "Id=0\n",
      "Vds=Vdd-Id*Rd\n",
      "print('at point A Vds = %.2f V' %Vds)\n",
      "Vds=0\n",
      "Id=Vdd/Rd\n",
      "\n",
      "#Results\n",
      "print(\"when Vds=0\")\n",
      "print('at point A Id = %.2f mA' %(Id*10**3))"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "when Id=0\n",
        "at point A Vds = 22.00 V\n",
        "when Vds=0\n",
        "at point A Id = 11.00 mA\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10.4, Page No 387"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#initialisation of variables\n",
      "\n",
      "Idss=8.0*10**-3\n",
      "Vpmax=6.0\n",
      "Vgs=2.3\n",
      "Vgsmax=6\n",
      "\n",
      "#Calculations\n",
      "Id=Idss*(1-(Vgs/Vgsmax))**2\n",
      "Idss=4*10**-3\n",
      "Vp=3\n",
      "Idmin=Idss*(1-(Vgs/Vp))**2\n",
      "\n",
      "#Results\n",
      "print('at point A Idmin = %.2f mA' %(Idmin*10**3))"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "at point A Idmin = 0.22 mA\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10.6 Page No 393"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#initialisation of variables\n",
      "Vdd=25.0\n",
      "R2=1.0*10**6\n",
      "R1=3.8*10**6\n",
      "Rs=2.5*10**3\n",
      "Rd=2.5*10**3\n",
      "\n",
      "#Calculations\n",
      "Vg=(Vdd*R2)/(R1+R2)\n",
      "print(\"when Id=0\")\n",
      "Id=0\n",
      "Vgs=Vg-Id*Rs\n",
      "print(\" plot point A at Id=0\")\n",
      "print('at point A Vds = %.2f A/s' %Vds)\n",
      "Vgs=0\n",
      "Id=Vg/Rs\n",
      "print(\" plot point B Vgs=0\")\n",
      "print('at point A Id = %.2f A/s' %Id)\n",
      "Idmax=3*10**-3\n",
      "Idmin=2.3*10**-3\n",
      "Vdsmin=Vdd-Idmax*(Rd+Rs)\n",
      "Vdsmax=Vdd-Idmin*(Rd+Rs)\n",
      "\n",
      "#Results\n",
      "print('The value of Vdsmax = %.2f V' %(Vdsmax))"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "when Id=0\n",
        " plot point A at Id=0\n",
        "at point A Vds = 0.00 A/s\n",
        " plot point B Vgs=0\n",
        "at point A Id = 0.00 A/s\n",
        "The value of Vdsmax = 13.50 V\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10.7, Page No 401"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#initialisation of variables\n",
      "\n",
      "Id=3.0*10**-3\n",
      "Vgs=-2.3\n",
      "Vdsmin=10.0\n",
      "Vdd=25.0\n",
      "Vgsoff=-6\n",
      "Idss=8.0*10**-3\n",
      "\n",
      "#Calculations\n",
      "Vgs=Vgsoff*(1-math.sqrt(Id/Idss))\n",
      "Rd=(Vdd-Vdsmin)/Id\n",
      "\n",
      "#Results\n",
      "print('The value of Td = %.2f kohm' %(Rd/1000))"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The value of Td = 5.00 kohm\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10.8 Page No 403"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#initialisation of variables\n",
      "Id=3.0*10**-3\n",
      "Vds=10.0\n",
      "Vdd=25.0\n",
      "Vgs=2.3\n",
      "\n",
      "#Calculations\n",
      "Rs=Vgs/Id\n",
      "Rd=((Vdd-Vds)/Id)-Rs\n",
      "\n",
      "#Results\n",
      "print('The value of Rd = %.2f ohm' %(Rd/1000))"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The value of Rd = 4.23 ohm\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10.9 Page No 405"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#initialisation of variables\n",
      "Id=3.0*10**-3\n",
      "Vds=10.0\n",
      "Vdd=25.0\n",
      "Vg=5.2\n",
      "Vgsoff=-6\n",
      "Idss=8.0*10**-3\n",
      "R2=1.0*10**6\n",
      "\n",
      "#Calculations\n",
      "R=(Vdd-Vds)/Id#R=(Rs+Rd)/2\n",
      "Rd=R/2\n",
      "Rs=Rd\n",
      "Vgs=Id*Rs\n",
      "Vgs=Vgsoff*(1-math.sqrt(Id/Idss))\n",
      "Vs=Id*Rs\n",
      "Vg=Vs-(-Vgs)\n",
      "R1=((Vdd-Vg)*R2)/Vg\n",
      "\n",
      "#Results\n",
      "print('The value of R = %.2f Mohm' %(R1/10**6))"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The value of R = 3.83 Mohm\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10.11, Page No 412"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#initialisation of variables\n",
      "\n",
      "Vee=20.0\n",
      "Id=3.0*10**-3\n",
      "Vds=9.0\n",
      "Vbe=.7\n",
      "Vb=0\n",
      "Ve=Vee-Vbe\n",
      "\n",
      "#Calculations\n",
      "Re=Ve/Id\n",
      "Re=6.8*10**3#satnadard value\n",
      "Id=Ve/Re\n",
      "Idss=16*10**-3\n",
      "Vgsoff=-8\n",
      "Vgs=Vgsoff*(1-math.sqrt(Id/Idss))\n",
      "Vs=Vb-Vgs\n",
      "Vrd=Vee-Vds-Vs\n",
      "Rd=Vrd/Id\n",
      "\n",
      "#Results\n",
      "print('The value of Rd = %.2f V' %(Rd/1000))"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The value of Rd = 2.24 V\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10.12 Page No 415"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "#initialisation of variables\n",
      "Idss=5.0*10**-3\n",
      "Vgsoff=6.0\n",
      "Rs=3.3*10**3\n",
      "Vdd=20.0\n",
      "Rd=Rs\n",
      "\n",
      "#Calculations\n",
      "print(\"when Id=0 % Vgs=Vs=0\")\n",
      "Id=0\n",
      "Vgs=0\n",
      "Vs=0\n",
      "print(\" at point A universal transfer characteristic Id/Idss and Vgs/Vgsoff=0\")\n",
      "Id=1.5*10**-3\n",
      "Vgs=Id*Rs\n",
      "y=Id/Idss\n",
      "x=Vgs/Vgsoff\n",
      "print(\" point B the universal transfer charecteristic x=.825 and y=.3\")\n",
      "Id=.2*Idss\n",
      "Vds=Vdd-Id*(Rd+Rs)\n",
      "\n",
      "#Results\n",
      "print('The value of Vds = %.2f V' %(Vds))"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "when Id=0 % Vgs=Vs=0\n",
        " at point A universal transfer characteristic Id/Idss and Vgs/Vgsoff=0\n",
        " point B the universal transfer charecteristic x=.825 and y=.3\n",
        "The value of Vds = 13.40 V\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10.13 Page No 416"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#initialisation of variables\n",
      "\n",
      "Idss=9.0*10**-3\n",
      "Vgsoff=7.0\n",
      "Vdd=22.0\n",
      "R1=4.7*10**6\n",
      "R2=1.0*10**6\n",
      "Rs=2.7*10**3\n",
      "Rd=Rs\n",
      "\n",
      "#Calculations\n",
      "Vg=(Vdd*R2)/(R1+R2)\n",
      "print(\"when Vgs=0 % Vgs/Vgsoff=0\")\n",
      "Id=Vg/Rs\n",
      "print(\"when Vgs/Vgsoff=.5\")\n",
      "Vgs=.5*(-Vgsoff)\n",
      "Id=(Vg-Vgs)/Rs\n",
      "x=Id/Idss\n",
      "print(\" point Y on universal characteristic x=.3 and Vgs/Vgsoff=.5\")\n",
      "print(\"draw voltage divider bias line through X nad Y where bisa line intersect transfer curve\")\n",
      "Id=.29*Idss\n",
      "Vds=Vdd-Id*(Rd+Rs)\n",
      "\n",
      "#Results\n",
      "print('The value of Vds= %.2f V' %(Vds))"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "when Vgs=0 % Vgs/Vgsoff=0\n",
        "when Vgs/Vgsoff=.5\n",
        " point Y on universal characteristic x=.3 and Vgs/Vgsoff=.5\n",
        "draw voltage divider bias line through X nad Y where bisa line intersect transfer curve\n",
        "The value of Vds= 7.91 V\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10.14 Page No 419"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#initialisation of variables\n",
      "\n",
      "Vdd=40.0\n",
      "R2=1.0*10**6\n",
      "R1=5.6*10**6\n",
      "Rd=4.7\n",
      "\n",
      "#Calculations\n",
      "Vg=(Vdd*R2)/(R1+R2)\n",
      "print(\"from the point where the bias line intersect the transfer curve\")\n",
      "Id=6.2\n",
      "Vds=Vdd-Id*Rd\n",
      "\n",
      "#Results\n",
      "print('The value of Vds= %.2f V' %(Vds))"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "from the point where the bias line intersect the transfer curve\n",
        "The value of Vds= 10.86 V\n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10.16, Page No 422"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#initialisation of variables\n",
      "rDS=25.0\n",
      "Vgsoff=10.0\n",
      "Vds=200.0*10**-3\n",
      "Vdd=12.0\n",
      "\n",
      "#Calculations\n",
      "Id=Vds/rDS\n",
      "Rd=Vdd/Id\n",
      "Vi=-(Vgsoff+1)\n",
      "\n",
      "#Results\n",
      "print('The value of Vi= %.2f V' %(Vi))"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The value of Vi= -11.00 V\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10.17, Page No 424"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#initialisation of variables\n",
      "\n",
      "Vdd=50.0\n",
      "Rd=10.0\n",
      "R2=1.0*10**6\n",
      "rDS=0.25\n",
      "\n",
      "#Calculations\n",
      "Id=Vdd/Rd\n",
      "print(\" from transfer curve at Id=5 and Vgs=5.7\")\n",
      "Vgs=5.7\n",
      "R1=((Vdd-Vgs)*R2)/Vgs#use 6.8Mohm to make Vgs>5.7V to ensure that the FET is biased on\n",
      "Vds=Id*rDS\n",
      "\n",
      "#Results\n",
      "print('The value of Vds= %.2f V' %(Vds))"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " from transfer curve at Id=5 and Vgs=5.7\n",
        "The value of Vds= 1.25 V\n"
       ]
      }
     ],
     "prompt_number": 12
    }
   ],
   "metadata": {}
  }
 ]
}