{ "metadata": { "name": "" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "

Chapter No 9 : MOS Transistors

" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 9.1, Page No 361" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#initialisation of variables\n", "V_TN = 0.7 #in V\n", "W = 45*10**-4 #in cm\n", "L = 4.0 #in \u00b5m\n", "L = L * 10**-4 #in cm\n", "t_ox = 450 #in \u00c5\n", "\n", "#CALCULATIONS\n", "t_ox = t_ox*10**-8 #in cm\n", "V_GS = 1.4 #in V\n", "Miu_n = 700 #in cm^2/V-s\n", "Epsilon_ox = (8.85*10**-14)*(3.9) #in F/cm\n", "k_n = (W*Miu_n*Epsilon_ox)/(2*L*t_ox) #A/V^2\n", "I_D = k_n*((V_GS-V_TN)**2) #in A\n", "k_n=k_n*10**3\n", "I_D=I_D*10**3\n", "\n", "#RESULTS\n", "print('The value of k_n is : =%.2f mA/V^2' %k_n)\n", "print('The current is =%.2f mA' %I_D)\n", "print('Approximation error')" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of k_n is : =0.30 mA/V^2\n", "The current is =0.15 mA\n", "Approximation error\n" ] } ], "prompt_number": 87 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 9.2, Page No 376" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "\n", "#initialisation of variables\n", "\n", "I_Don = 6.0 #in mA\n", "I_Don= I_Don*10**-3 #in A\n", "V_GSon = 8 #in V\n", "V_GSth = 3 #in V\n", "V_DD = 12.0 #in V\n", "R_D= 2*10**3 #in \u03a9\n", "\n", "#CALCULATIONS\n", "k= I_Don/(V_GSon-V_GSth)**2 #in A/V^2\n", "A= R_D**2 #assumed\n", "B= 2*R_D*V_GSth-2*R_D*V_DD-1/k #assumed\n", "C= (V_DD-V_GSth)**2 #assumed\n", "\n", "I_DQ= 0.0027940 #in A\n", "V_DSQ= V_DD-I_DQ*R_D #in V\n", "I_DQ=I_DQ*10**3\n", "\n", "#RESULTS\n", "print('The value of I_DQ is : =%.2f mA' %I_DQ)\n", "print('The value of V_DSQ is : =%.2f volts ' %V_DSQ)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of I_DQ is : =2.79 mA\n", "The value of V_DSQ is : =6.41 volts \n" ] } ], "prompt_number": 88 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 9.3 Page No 378" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "\n", "#initialisation of variables\n", "V_GS = 6.0 #in V\n", "I_D = 4.0 #in mA\n", "V_GSth = 2.0 #in V\n", "\n", "#CALCULATIONS\n", "V_DS = V_GS #in V\n", "V_DD = 2*V_DS #in V\n", "R_D = (V_DD-V_DS)/I_D #in k ohm\n", "\n", "\n", "#RESULTS\n", "print('The value of V_DD is =%.2f V ' %V_DD)\n", "print('The value of R_D is =%.2f k ohm' %R_D)\n", "print('The very high value for the gate to drain resistance is : 10 M\u03a9 ' )\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of V_DD is =12.00 V \n", "The value of R_D is =1.50 k ohm\n", "The very high value for the gate to drain resistance is : 10 M\u03a9 \n" ] } ], "prompt_number": 89 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 9.4, Page No 379" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "\n", "#initialisation of variables\n", "I_Don = 3*10**-3 \n", "V_GSon = 10.0 #in V\n", "V_GSth= 5.0 #in V\n", "R2= 18*10**6 #in \u03a9\n", "R1= 22*10**6 #in \u03a9\n", "R_S=820 #in \u03a9\n", "R_D=3*10**3 #in \u03a9\n", "V_DD= 40.0 #in V\n", "\n", "#CALCULATIONS\n", "V_G= V_DD*R2/(R1+R2) #in V\n", "k= I_Don/(V_GSon-V_GSth)**2 #in A/V**2\n", "A= R_S**2 #assumed\n", "B= 2*R_S*V_GSth-2*R_S*V_G-1/k #assumed\n", "C= (V_G-V_GSth)**2 #assumed\n", "I_D= 0.0067246 #in A\n", "I_DQ= I_D #in A\n", "V_GSQ= V_G-I_D*R_S #in V\n", "V_DSQ= V_DD-I_DQ*(R_D+R_S) #in V\n", "I_DQ=I_DQ*10**3\n", "\n", "\n", "#RESULTS\n", "print('The value of I_DQ is =%.2f mA' %I_DQ)\n", "print('The value of V_GSQ is =%.2f volts ' %V_GSQ)\n", "print('The value of V_DSQ is =%.2f volts ' %V_DSQ)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of I_DQ is =6.72 mA\n", "The value of V_GSQ is =12.49 volts \n", "The value of V_DSQ is =14.31 volts \n" ] } ], "prompt_number": 90 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 9.5 Page No 380" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "\n", "#initialisation of variables\n", "I_D= '0.3*(V_GS-V_P)^2' #given expression\n", "V_DD= 30.0 #in V\n", "V_P= 4 #in V\n", "R_GS = 1.2*10**6 #in \u03a9\n", "R_G = 1.2*10**6 #in \u03a9\n", "I_D= 1.2 #in mA\n", "\n", "#CALCULATIONS\n", "Req= R_GS/(R_GS+R_G) #in \u03a9\n", "R_D= 15.0 #in \u03a9\n", "A= (R_D*Req)**2 #assumed\n", "B= -(2*R_D*Req*(V_DD*Req-V_P)+1/0.3) #assumed\n", "C= (V_DD*Req-V_P)**2 #assumed\n", "I_DSQ= I_D #in mA\n", "V_GS= (V_DD-I_D*R_D) #in V\n", "V_DS= Req*V_GS #in V\n", "\n", "\n", "\n", "#RESULTS\n", "print('The value of I_DSQ is : =%.2f mA' %I_DSQ)\n", "print('The value of V_GS is : =%.2f volts ' %V_GS)\n", "print('The value of V_DS is : =%.2f volts ' %V_DS)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of I_DSQ is : =1.20 mA\n", "The value of V_GS is : =12.00 volts \n", "The value of V_DS is : =6.00 volts \n" ] } ], "prompt_number": 91 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 9.6 Page No 380" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "\n", "#initialisation of variables\n", "k = 0.1 #in mA/V^2\n", "V_T = 1.0 # in V\n", "R1 = 33.0 #in k ohm\n", "R2 = 21.0 #in k ohm\n", "V_DD = 6.0 #in V\n", "R_D = 18 #in k ohm\n", "\n", "#CALCULATIONS\n", "V_G = (R2/(R2+R1))*V_DD #in V\n", "V_S = 0 #in V\n", "V_GS = V_G-V_S #in V\n", "I_D = k*((V_GS-V_T)**2) #in mA\n", "V_DS = V_DD - (I_D*R_D) #in V\n", "V_DSsat = V_GS-V_T #in V\n", "\n", "#RESULTS\n", "print('The value of I_D is =%.2f mA ' %I_D)\n", "print('The value of V_DS(sat) is =%.2f V ' %V_DS)\n", "print('The value of V_DS(sat) is =%.2f V ' %V_DSsat)\n", "\n", "if V_DS > V_DSsat :\n", " print('MOSFET is in saturation region ')\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of I_D is =0.18 mA \n", "The value of V_DS(sat) is =2.80 V \n", "The value of V_DS(sat) is =1.33 V \n", "MOSFET is in saturation region \n" ] } ], "prompt_number": 92 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 9.8, Page No 382" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "\n", "#initialisation of variables\n", "R2 = 18.0 #in k ohm\n", "R1 = 33.0 #in k ohm\n", "V_DD = 6.0 #in V\n", "\n", "#CALCULATIONS\n", "V_G = (R2/(R1+R2))*V_DD #in V\n", "V_S = V_DD # in V\n", "V_SG = V_S-V_G #in V\n", "k = 0.1\n", "V_T = -1 #in V\n", "I_D = k*((V_SG+V_T)**2) #in mA\n", "R_D = 3.0 # in k ohm\n", "V_SD = V_DD - (I_D*R_D) #in V\n", "V_SDsat = V_SG+V_T #in V\n", "\n", "#RESULTS\n", "print('The value of V_SG is =%.2f V ' %V_SG)\n", "print('The value of I_D is =%.2f mA ' %I_D)\n", "print('The value of V_SD is =%.2f V ' %V_SD)\n", "print('The value of V_SD(sat) is =%.2f V ' %V_SDsat)\n", "\n", "if V_SD > V_SDsat :\n", " print('The p MOSFET is indeed biased in the saturation region')\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of V_SG is =3.88 V \n", "The value of I_D is =0.83 mA \n", "The value of V_SD is =3.51 V \n", "The value of V_SD(sat) is =2.88 V \n", "The p MOSFET is indeed biased in the saturation region\n" ] } ], "prompt_number": 93 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 9.9 Page No 384" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math \n", "\n", "#initialisation of variables\n", "V_G= 1.5 # in V\n", "V_P= -3.0 # in V\n", "R_S= 750.0 # in \u03a9\n", "R_D= 1800 #in \u03a9\n", "I_DSS= 6*10**-3 # in A\n", "V_DD= 18 #in V\n", "\n", "#CALCULATIONS\n", "A= R_S**2\n", "B=(2*R_S*(V_P-V_G)-V_P**2/I_DSS)\n", "C=(V_P-V_G)**2\n", "I_D= 0.0031170 #in A\n", "I_DQ= I_D #in A\n", "V_DS= V_DD-I_D*(R_D+R_S) # in V\n", "V_DSQ= V_DS # in V\n", "I_DQ=I_DQ*10**3\n", "\n", "#RESULTS\n", "print('The value of I_DQ is : =%.2f mA ' %I_DQ)\n", "print('The value of V_DSQ is : =%.2f volts ' %V_DSQ)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of I_DQ is : =3.12 mA \n", "The value of V_DSQ is : =10.05 volts \n" ] } ], "prompt_number": 94 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 9.10 Page No 384" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "\n", "#initialisation of variables\n", "V_GS = 4.0 #in V\n", "V_P = 2.0 #in V\n", "R2 = 10.0 #in k ohm\n", "R1 = 30.0 #in k ohm\n", "R_D= 2.5 #in kohm\n", "I_D= 15 #in mA\n", "\n", "#CALCULATIONS\n", "I_D= I_D*10**-3 #in A\n", "V_DD = 25 #in V\n", "V_G = (V_DD/R_D)*V_DD/(R1+R2) #in V\n", "R_S = (V_G-V_GS)/I_D # in ohm\n", "\n", "#RESULTS\n", "print('The value of R_S is =%.f ohm ' %R_S)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of R_S is =150 ohm \n" ] } ], "prompt_number": 95 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 9.11 Page No 385" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "\n", "#initialisation of variables\n", "k= 0.1 #in mA/V^2\n", "V_T= 1 # in V\n", "R2= 87*10**3 #in \u03a9\n", "R1= 110*10**3 # in \u03a9\n", "R_S=2 #in k\u03a9\n", "R_D=2 #in k\u03a9\n", "V_DD= 6 #in V\n", "V_SS= 6 #in V\n", "\n", "#CALCULATIONS\n", "V_G= (V_DD+V_SS)*R2/(R1+R2) # in V\n", "A= R_S**2 # assumed\n", "B= -(2*R_S*(V_G+V_SS-V_T)+1/k) # assumed\n", "C= (V_G+V_SS-V_T)**2 #assumed\n", "I_D= 2.6001587 # in mA\n", "\n", "\n", "#RESULTS\n", "print('The value of I_D is : =%.2f mA' %I_D)\n", "V_DS=V_DD+V_SS-I_D*R_D-I_D*R_S #in V\n", "print('The value of V_DS is : =%.2f volts' %V_DS)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of I_D is : =2.60 mA\n", "The value of V_DS is : =1.60 volts\n" ] } ], "prompt_number": 96 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example No 9.12 Page No 386" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "\n", "#initialisation of variables\n", "\n", "k = 0.16 #in mA/V^2\n", "V_T = 2.0 #in V\n", "I_D = 0.5 #in mA\n", "V_DD = 6.0 #in V\n", "V_SS = -6 #in V\n", "R_D = 10.0 #in k ohm\n", "\n", "#CALCULATIONS\n", "V_GS = V_T + (math.sqrt(I_D/k)) #in V\n", "R_S = 2 #in k ohm\n", "V_S = (I_D*R_S) - V_DD # in V\n", "V_G = V_GS+V_S # in V\n", "I = 0.1*I_D #in mA\n", "R2 = (V_G+V_DD)/I #in k ohm\n", "print('The value of R2 is =%.2f k ohm' %R2)\n", "R1 = (V_DD - V_G)/I #in k ohm\n", "print('The value of R1 is =%.2f k ohm' %R1)\n", "V_DS = (V_DD-V_SS) - (I_D*(R_S+R_D)) #in V\n", "print('The value of V_DS is =%.2f V' %V_DS)\n", "V_DSsat = V_GS-V_T # in V\n", "\n", "#RESULTS\n", "print('The value of V_DS(sat) is =%.2f V' %V_DSsat)\n", "if V_DS > V_DSsat :\n", " print('The MOSFET is in saturation region')\n", "\n", " # Note: The value of R1 is in k ohm but in the book it is wrong." ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of R2 is =95.36 k ohm\n", "The value of R1 is =144.64 k ohm\n", "The value of V_DS is =6.00 V\n", "The value of V_DS(sat) is =1.77 V\n", "The MOSFET is in saturation region\n" ] } ], "prompt_number": 97 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example No 9.13 Page No 387" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "\n", "#initialisation of variables\n", "V_DD = 6.0 #in V\n", "V_D = 3.0 #in V\n", "R_D = 10.0 #in k ohm\n", "\n", "#CALCULATIONS\n", "I_DQ = (V_DD-V_D)/R_D #in mA\n", "print('The value of I_DQ is =%.2f mA ' %I_DQ)\n", "V_T = 0.8 #in V\n", "k = 0.12 #in mA/V^2\n", "V_GS = math.sqrt(I_DQ/k) + V_T #in V\n", "V_S = -V_GS #in V\n", "V_DS = V_D-V_S #in V\n", "\n", "\n", "#RESULTS\n", "print('The value of V_DS is =%.2f V' %V_DS)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of I_DQ is =0.30 mA \n", "The value of V_DS is =5.38 V\n" ] } ], "prompt_number": 98 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example No 9.14 Page No 388" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "\n", "#initialisation of variables\n", "I_D = 0.3 # in mA\n", "k = 0.12 #in mA/V^2\n", "V_T = 1.0 #in V\n", "\n", "#CALCULATIONS\n", "V_GS = V_T + (math.sqrt(I_D/k)) #in V\n", "V_S = -V_GS #in V\n", "V_DD = 6.0 #in V\n", "V_D = 3.0 # in V\n", "I_DQ = 0.3 #in mA\n", "R_D = (V_DD-V_D)/I_DQ #in k ohm\n", "\n", "\n", "#RESULTS\n", "print('The value of R_D is =%.2f k ohm' %R_D)\n", "V_DS = V_D - V_S #in V\n", "print('The value of V_DS is =%.2f V' %V_DS)\n", "V_DSsat = V_GS - V_T #in V\n", "print('The value of V_DS(sat) is =%.2f V' %V_DSsat)\n", "if V_DS > V_DSsat :\n", " print('The MOSFET is in saturation region')" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of R_D is =10.00 k ohm\n", "The value of V_DS is =5.58 V\n", "The value of V_DS(sat) is =1.58 V\n", "The MOSFET is in saturation region\n" ] } ], "prompt_number": 99 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example No 9.15 Page No 389" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#initialisation of variables\n", "k= 0.05 #in mA/V^2\n", "V_T= 1 #in V\n", "V_DD= 6 # in V\n", "R_S= 9.1 #in k\u03a9\n", "I_D= 0.3631765 # in mA\n", "\n", "#CALCULATIONS\n", "A= R_S**2 # assumed\n", "B=-(2*V_DD*R_S+1/k) # assumed\n", "C= V_DD**2 #assumed\n", "V_GS= V_DD-I_D*R_S #in V\n", "V_DS= V_GS # in V\n", "\n", "#RESULTS\n", "print('The value of I_D is : =%.2f mA' %I_D)\n", "print('The value of V_GS is : =%.2f volts' %V_GS)\n", "print('The value of V_DS is : =%.2f volts' %V_DS)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of I_D is : =0.36 mA\n", "The value of V_GS is : =2.70 volts\n", "The value of V_DS is : =2.70 volts\n" ] } ], "prompt_number": 100 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example No 9.16 Page No 390" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#initialisation of variables\n", "k1= 0.01 #in mA/V^2\n", "k2= 0.05 #in mA/V^2\n", "V_DD= 5 # in V\n", "V_T1=1 # in V\n", "V_T2=1 # in V\n", "Vi= 5 #in V\n", "Vo= 0.3485163 # in V\n", "\n", "#CALCULATIONS\n", "A=(k1+k2)\n", "B=-(2*k1*(V_DD-V_T1)+2*k2*(Vi-V_T2))\n", "C=k1*(V_DD-V_T1)**2\n", "V_GS2= Vi # in V\n", "V_DS2= Vo # in V\n", "V_GS1= V_DD-Vo # in V\n", "I_D1= k1*(V_GS1-V_T1)**2 #in mA\n", "I_D2= I_D1 # in mA\n", "print('Part (i) For Vi = 5 V')\n", "print('The output voltage is : =%.2f volts' %Vo)\n", "print('The value of I_D1 is : =%.2f mA' %I_D1)\n", "print('The value of I_D2 is : =%.2f mA' %I_D2)\n", "# Analysis for Vi= 1.5V\n", "Vi= 1.5 #in V\n", "Vo= V_DD-V_T1-math.sqrt(k2/k1)*(Vi-V_T2) # in V\n", "I_D2= k2*(Vi-V_T2)**2 #in mA\n", "I_D1= I_D2 #in mA\n", "\n", "\n", "#RESULTS\n", "print('Part (ii) For Vi = 1.5 V')\n", "print('The output voltage is : =%.2f volts' %Vo)\n", "print('The value of I_D1 is : =%.2f mA' %I_D1)\n", "print('The value of I_D2 is : =%.2f mA' %I_D2)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Part (i) For Vi = 5 V\n", "The output voltage is : =0.35 volts\n", "The value of I_D1 is : =0.13 mA\n", "The value of I_D2 is : =0.13 mA\n", "Part (ii) For Vi = 1.5 V\n", "The output voltage is : =2.88 volts\n", "The value of I_D1 is : =0.01 mA\n", "The value of I_D2 is : =0.01 mA\n" ] } ], "prompt_number": 101 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example No 9.17 Page No 392" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#initialisation of variables\n", "k = 0.12 #in mA/V^2\n", "V_T = -2.5 #in V\n", "V_GS = 0\n", "\n", "#CALCULATIONS\n", "I_D = k*((V_GS-V_T)**2) #in mA\n", "print('The value of I_D is =%.2f mA' %I_D)\n", "V_DD = 6 #in V\n", "R_S = 4.7 #in k ohm \n", "V_DS = V_DD -(I_D*R_S) #in V\n", "print('The value of V_DS is =%.2f V' %V_DS)\n", "V_S = 0 # in V \n", "V_DSsat = V_S - V_T # in V\n", "\n", "\n", "#RESULTS\n", "print('The value of V_DS(sat) is =%.2f V' %V_DSsat)\n", "if V_DS < V_DSsat :\n", " print('The device is in the non saturation region')\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of I_D is =0.75 mA\n", "The value of V_DS is =2.47 V\n", "The value of V_DS(sat) is =2.50 V\n", "The device is in the non saturation region\n" ] } ], "prompt_number": 102 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example No 9.18 Page No 394" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "\n", "#initialisation of variables\n", "k4 = 0.125 #in mA/V^2\n", "k3 = k4 #in mA/V^2\n", "k2 = k4 #in mA/V^2\n", "k1 = 0.25 #in mA/V^2\n", "V_T1 = 0.8 # in V\n", "V_T2 = V_T1 # in V\n", "V_T3 = V_T1 #in V\n", "V_T4 = V_T1 #in V\n", "V_SS = -5 #in V\n", "V_DD = 5 #in V\n", "R_D = 10 #in k ohm\n", "\n", "#CALCULATIONS\n", "V_GS3 = ((math.sqrt(k4/k3) * (-V_SS - V_T4))+V_T3)/(1+math.sqrt(k4/k3)) #in V\n", "I_Q = k2*((V_GS3-V_T2)**2) #in mA\n", "I_D1 = I_Q #in mA\n", "V_GS1 = V_T1 + (math.sqrt(I_D1/k1)) #in V\n", "\n", "#RESULTS\n", "print('The value of V_GS1 is =%.2f V ' %V_GS1)\n", "V_DS2 = (-V_SS-V_GS1) #in V\n", "print('The value of V_DS2 is =%.2f V ' %V_DS2)\n", "V_DS1 = V_DD - (I_Q*R_D) - (V_SS + V_DS2) #in V\n", "print('The value of V_DS1 is =%.2f V' %V_DS1)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of V_GS1 is =2.00 V \n", "The value of V_DS2 is =3.00 V \n", "The value of V_DS1 is =3.39 V\n" ] } ], "prompt_number": 103 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example No 9.19 Page No 395" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "\n", "#initialisation of variables\n", "R2 = 20.0 # in k ohm\n", "R1 = 30.0 #in k ohm\n", "R_D = 20 # in k ohm\n", "\n", "#CALCULATIONS\n", "R_D=R_D*10**3 #in ohm\n", "V_DD = 5 #in V\n", "V_G = (R2/(R1+R2))*V_DD #in V\n", "V_S = 0 #in V\n", "V_GS = V_G #in V\n", "k = 100*10**-6 #in A/V^2\n", "V_T = 1 #in V\n", "I_DQ = k*((V_GS-V_T)**2) #in A\n", "\n", "\n", "#RESULTS\n", "V_DSQ = V_DD - (I_DQ*R_D) #in V \n", "print('The value of V_DSQ is =%.f V ' %V_DSQ)\n", "I_DQ=I_DQ*10**6\n", "print('The value of I_DQ is =%.f \u00b5A' %I_DQ)\n", "\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of V_DSQ is =3 V \n", "The value of I_DQ is =100 \u00b5A\n" ] } ], "prompt_number": 104 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example No 9.20 Page No 395" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#initialisation of variables\n", "V_P= -8 # in V\n", "R_S= 2.4 #in k\u03a9\n", "I_DSS= 8 #in mA\n", "V_DD= 20 #in V\n", "R_D= 6.2 #in k\u03a9\n", "I_D= 1.7668305 #in mA\n", "\n", "#CALCULATIONS\n", "A= R_S**2\n", "B=(2*R_S*(V_P)-V_P**2/I_DSS)\n", "C=(V_P)**2\n", "I_DQ= I_D #in mA\n", "V_GSQ= -I_D*R_S;\n", "V_D= V_DD-I_D*R_D #in V\n", "\n", "#RESULTS\n", "print('The value of I_DQ is : =%.2f mA' %I_DQ)\n", "print('The value of V_GSQ : =%.2f volts' %V_GSQ)\n", "print('The value of V_D is : =%.2f volts' %V_D)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of I_DQ is : =1.77 mA\n", "The value of V_GSQ : =-4.24 volts\n", "The value of V_D is : =9.05 volts\n" ] } ], "prompt_number": 105 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example No 9.21 Page No 396" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#initialisation of variables\n", "k= 75*10**-3 #in mA/V^2\n", "Vth= -0.8 #in V\n", "R2 = 100 #in k ohm\n", "R1 = 100 #in k ohm\n", "R_S= 6 # in k\u03a9\n", "R_D= 3 # in k\u03a9\n", "V_SS = 10 # in V\n", "V_S = 2.0602803\n", "\n", "#CALCULATIONS\n", "V_G = (R2/(R1+R2))*V_SS #in V\n", "V_GS= V_G-V_S #in V\n", "I_D= k*(V_GS-Vth)**2 # in V\n", "V_DS= -V_SS+I_D*(R_D+R_S) # in V\n", "V_D= I_D*R_D #in V\n", "\n", "#RESULTS\n", "print('The value of I_D is : =%.2f mA ' %I_D)\n", "print('The value of V_DS is =%.2f volts ' %V_DS)\n", "print('The value of V_D is : =%.2f volts' %V_D)\n", "print('The value of V_S is : =%.2f volts' %V_S)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of I_D is : =0.12 mA \n", "The value of V_DS is =-8.93 volts \n", "The value of V_D is : =0.36 volts\n", "The value of V_S is : =2.06 volts\n" ] } ], "prompt_number": 106 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example No 9.22 Page No 396" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "\n", "#initialisation of variables\n", "V_T = 1.0 # in V\n", "k = 160*10**-6 # in A/V^2\n", "I_DQ = 160*10**-6 # in A\n", "\n", "#CALCULATIONS\n", "V_GS = V_T + math.sqrt(I_DQ/k) #in V\n", "V_DD = 5 # in V\n", "V_DSQ = 3 # in V\n", "R_D = (V_DD - V_DSQ)/(I_DQ) # in ohm\n", "R_D = R_D * 10**-3 # in k ohm\n", "\n", "#RESULTS\n", "print('The value of R_D is =%.2f k ohm' %R_D)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of R_D is =12.50 k ohm\n" ] } ], "prompt_number": 107 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example No 9.23 Page No 397" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#initialisation of variables\n", "V_DD= 12 # in V\n", "V_T= 2 # in V\n", "kn= 0.5 # in mA/V^2\n", "R1 = 2.2 # in M ohm\n", "R2 = 1.8 # in M ohm\n", "R_S= 1.5 # in k\u03a9\n", "R_D= 3.9 # in k\u03a9\n", "I_D= 1.2237155 # in mA\n", "\n", "#CALCULATIONS\n", "V_G = (R2/(R1+R2))*V_DD # in V\n", "V_GS= V_G-I_D*R_S # V\n", "I_D= I_D-kn*(V_GS-V_T)**2 # in mA\n", "I_DQ= I_D #in mA\n", "V_DSQ= V_DD-I_D*(R_D+R_S) # in V\n", "\n", "#RESULTS\n", "print('The value of I_DQ is : =%.2f mA ' %I_DQ)\n", "print('The value of V_DSQ is : =%.2f volts' %V_DSQ)\n", "V_GS= V_G-I_D*R_S # V\n", "V_DSsat= V_GS-V_T # in V\n", "print('The value of V_DS %.2f is greater than the value of ' %V_DSQ)\n", "print('V_DSsat %.2f So the MOSFET is in saturation region ' %V_DSsat)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of I_DQ is : =-0.00 mA \n", "The value of V_DSQ is : =12.00 volts\n", "The value of V_DS 12.00 is greater than the value of \n", "V_DSsat 3.40 So the MOSFET is in saturation region \n" ] } ], "prompt_number": 108 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 9.24 Page No 397" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#initialisation of variables\n", "kn= 0.5 # in mA/V^2\n", "V_T= 1 # in V\n", "R2 = 40 # in k ohm\n", "R1 = 60 # in k ohm\n", "R_S= 1 # in k ohm\n", "R_D= 2 # in k ohm\n", "V_DD = 5 # in V\n", "V_SS = -5 # in V\n", "\n", "#CALCULATIONS\n", "V_R2 = (R2/(R2+R1))*(V_DD-V_SS) # in V\n", "V_G = V_R2 - V_DD # in V\n", "V_S= I_D*R_S+V_SS # in V\n", "V_GS= V_G-V_S # in V\n", "I_D= 1.3542487 # in mA\n", "I_DQ= I_D #in mA\n", "V_S= I_D*R_S+V_SS # in V\n", "V_GS= V_G-V_S # in V\n", "V_DSQ= V_DD-V_SS-I_D*(R_D+R_S) # in V\n", "\n", "#RESULTS\n", "print('The value of I_DQ is :=%.2f mA ' %I_DQ)\n", "print('The value of V_GS is : =%.2f volts ' %V_GS)\n", "print('The value of V_DSQ is : =%.2f volts' %V_DSQ)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of I_DQ is :=1.35 mA \n", "The value of V_GS is : =-1.35 volts \n", "The value of V_DSQ is : =5.94 volts\n" ] } ], "prompt_number": 109 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example No 9.25 Page No 398" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#initialisation of variables\n", "R_S1 = 100*10**-3 # in k ohm\n", "R_S2 = 100*10**-3 # k ohm\n", "R_S = R_S1+R_S2 #in k ohm\n", "R_D= 1.8 # in k ohm\n", "I_DSS= 12 # in mA\n", "Vp= -3.5 # in V\n", "V_DD= 22 # in V\n", "rd= 25 # in k ohm\n", "R_L= 47 # in k ohm\n", "I_D= 5.573521 # in mA\n", "\n", "#CALCULATIONS\n", "V_GS= -I_D*R_S # in V\n", "I_D= I_D-I_DSS*(1-V_GS/Vp)**2 # in mA\n", "print('The value of I_D is : =%.2f mA' %I_D)\n", "V_GS= -I_D*R_S # in V\n", "print('The value of V_GS is : =%.2f volts ' %V_GS)\n", "V_DS= V_DD-I_D*(R_D+R_S) # in V\n", "print('The value of V_DS is : =%.2f volts ' %V_DS)\n", "gmo= -2*I_DSS/Vp # in mS\n", "gm= gmo*(1-V_GS/Vp) # in mS\n", "miu= gm*rd\n", "Av= -miu*R_D*R_L/(R_D+R_L)/(rd+R_D*R_L/(R_D+R_L)+(1+miu)*R_S1)\n", "print('The value of Av is : =%.2f ' %Av)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of I_D is : =-0.000000 mA\n", "The value of V_GS is : =0.00 volts \n", "The value of V_DS is : =22.00 volts \n", "The value of Av is : =-6.76 \n" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example No 9.26 Page No 399" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#initialisation of variables\n", "V_T = 1 # in V\n", "k = 0.5 # in mA/V^2\n", "R2 = 40 # in k ohm\n", "R1 = 60 # in k ohm\n", "R_S= 1 # in k ohm\n", "R_D= 2 # in k ohm\n", "V_DD = 5 # in V\n", "V_G = (R2/(R2+R1))*V_DD # in V\n", "V_GS= V_G-I_D*R_S # in V\n", "I_D= 0.2679492 # in mA\n", "V_GS= V_G-I_D*R_S # in V\n", "V_DS= V_DD-I_D*(R_D+R_S) # in V\n", "\n", "#RESULTS\n", "print('The value of I_D in mA is : =%.2f ' %I_D)\n", "print('The value of V_GS in volts is :=%.2f ' %V_GS)\n", "print('The value of V_DS in volts is : =%.2f ' %V_DS)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of I_D in mA is : =0.27 \n", "The value of V_GS in volts is :=-0.27 \n", "The value of V_DS in volts is : =4.20 \n" ] } ], "prompt_number": 111 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example No 9.27 Page No 400" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#initialisation of variables\n", "R_D = 7.5 # in k ohm\n", "V_T = -0.8 # in V\n", "k = 0.2 # in mA/V^2\n", "R2 = 50 # in ohm\n", "R1 = 50 # in ohm\n", "V_DD = 5 # in V\n", "V_S = 5 # in V\n", "\n", "#CALCULATIONS\n", "V_G = (R2/(R2+R1))*V_DD # in V\n", "V_GS = V_G - V_S # in V\n", "I_D = k*((V_GS-V_T)**2) # in mA\n", "\n", "#RESULTS\n", "print('Drain current in is =%.2f mA' %I_D)\n", "V_SD = V_DD - (I_D*R_D) # in V\n", "print('Source to drain voltage is =%.2f V' %V_SD)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Drain current in is =3.53 mA\n", "Source to drain voltage is =-21.46 V\n" ] } ], "prompt_number": 112 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 9.28 Page No 400" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#initialisation of variables\n", "I_Don = 5*10**-3 # in A\n", "V_GSon = 6 # in V\n", "V_GSth = 3 # in V\n", "k = I_Don/(V_GSon-V_GSth)**2 # in A/V^2 \n", "R2 = 6.8 #in M ohm\n", "R1 = 10 #in M ohm\n", "R_S= 750 # in ohm\n", "R_D= 2.2*10**3 # in ohm\n", "V_DD = 24 # in V\n", "R_S = 750 # in ohm\n", "V_G= R2*V_DD/(R1+R2) # in V\n", "V_GS= V_G-I_D*R_S # in V\n", "I_D= I_D-k*(V_GS-V_GSth)**2\n", "I_D= 0.0049660 # in A\n", "I_DQ= I_D # in A\n", "V_GS= V_G-I_D*R_S # in V\n", "V_GSQ= V_GS # in V\n", "V_DSQ= V_DD-I_DQ*(R_D+R_S) # in V\n", "I_D=I_D*10**3\n", "\n", "#RESULTS\n", "print('The value of I_D is : =%.2f mA ' %I_D)\n", "print('The value of V_GSQ is : =%.2f volts ' %V_GSQ)\n", "print('The value of V_DSQ is : =%.2f volts ' %V_DSQ)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of I_D is : =4.97 mA \n", "The value of V_GSQ is : =5.99 volts \n", "The value of V_DSQ is : =9.35 volts \n" ] } ], "prompt_number": 113 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example No 9.29 Page No 401" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#initialisation of variables\n", "I_Don = 4*10**-3 # in A\n", "V_GSon = 6 # in V\n", "V_GSth = 3 # in V\n", "V_DS= 6 # in V\n", "I_D= I_Don # in A\n", "k = I_Don/((V_GSon-V_GSth)**2) # in A/V^2\n", "V_GS= I_D-k*(V_GS-V_GSth)**2\n", "V_GS= 6 # in V\n", "V_DD= 2*V_DS # in V\n", "R_D= (V_DD-V_GS)/I_D # in ohm\n", "\n", "\n", "#RESULTS\n", "print('The value of V_GS is : =%.f volts ' %V_GS)\n", "print('The value of V_DD is : =%.f volts ' %V_DD)\n", "print('The value of R_D is : =%.f k\u03a9' %R_D)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of V_GS is : =6 volts \n", "The value of V_DD is : =12 volts \n", "The value of R_D is : =1500 k\u03a9\n" ] } ], "prompt_number": 114 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example No 9.31 Page No 402" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#initialisation of variables\n", "V_DD = 5 # in V\n", "V_T= 1 # in V\n", "k= 1 # in mA/V^2\n", "R1 = 1 # in M ohm\n", "R2 = 1 # in M ohm\n", "R_S= 2 # in k ohm\n", "R_D= 2 # in k ohm\n", "I1 = V_DD/(R1+R2) # in A\n", "print('The value of I1 is : =%.2f \u00b5A' %I1)\n", "V_A = (R2/(R2+R1))*V_DD # in V\n", "print('The value of V_A and V_G is : =%.2f volts ' %V_A)\n", "I_D= 0.4243061\n", "V_C= I_D*R_S # in V\n", "V_GS= V_A-V_C # in V\n", "print('The value of I_D is : =%.2f mA' %I_D)\n", "V_B= V_DD-I_D*R_D # in V\n", "V_C= I_D*R_S # in V\n", "V_DS= V_B-V_C # in V\n", "\n", "#RESULTS\n", "print('The value of V_B is : =%.2f volts ' %V_B)\n", "print('The value of V_C is : =%.2f volts ' %V_C)\n", "print('The value of V_DS is : =%.2f volts' %V_DS)\n", "# Note: In the book, the calculated values are wrong, this is why the answer in the book is wrong.\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of I1 is : =2.00 \u00b5A\n", "The value of V_A and V_G is : =0.00 volts \n", "The value of I_D is : =0.42 mA\n", "The value of V_B is : =4.15 volts \n", "The value of V_C is : =0.85 volts \n", "The value of V_DS is : =3.30 volts\n" ] } ], "prompt_number": 115 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example No 9.32 Page No 403" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "\n", "#initialisation of variables\n", "I_DSS = 12 # in mA\n", "I_DSS= I_DSS*10**-3 # in A\n", "V_P = -3 # in V\n", "r_d = 45 # in k ohm\n", "\n", "#CALCULATIONS\n", "r_d= r_d*10**3 # in ohm\n", "g_m = I_DSS/abs(V_P) # in S\n", "#Part (i)\n", "R1 = 91 # in M ohm\n", "R1=R1*10**6 #in ohm\n", "R2 = 10 # in M ohm\n", "R2= R2*10**6 # in ohm\n", "Ri= R1*R2/(R1+R2) # in ohm\n", "Ri=Ri*10**6\n", "\n", "#RESULTS\n", "print('The value of Ri is : =%.f Mohm' %(Ri/(10**12)))\n", "#Part (ii)\n", "R_S = 1.1 #in k ohm\n", "R_S = R_S * 10**3 # in ohm\n", "R_o= (R_S*1/g_m)/(R_S+1/g_m) # in ohm\n", "print('The value of R_C is : =%.2f ohm' %R_o)\n", "\n", "# Part (iii)\n", "R_desh_o= R_o*r_d/(R_o+r_d) # in ohm\n", "print('The value of R_desh_o is : =%.2f ohm ' %R_desh_o)\n", "# Part (iv)\n", "Av= g_m*(R_S*r_d/(R_S+r_d))/(1+g_m*(R_S*r_d/(R_S+r_d)))\n", "print('The value of Av is : =%.2f ' %Av)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of Ri is : =9 Mohm\n", "The value of R_C is : =203.70 ohm\n", "The value of R_desh_o is : =202.79 ohm \n", "The value of Av is : =0.81 \n" ] } ], "prompt_number": 116 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example No 9.34 Page No 404" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#initialisation of variables\n", "V_S2 = -2 # in V\n", "V_GS2 = -V_S2 # in V\n", "\n", "#CALCULATIONS\n", "I_DS2 = (V_GS2-1)**2 # in mA\n", "I = 2 # in mA\n", "I_DS1 = I-I_DS2 # in mA\n", "\n", "#RESULTS\n", "print('The current flow through M1 MOSFET is =%.f mA' %I_DS1)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The current flow through M1 MOSFET is =1 mA\n" ] } ], "prompt_number": 117 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example No 9.35 Page No 404" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#initialisation of variables\n", "V_DD= 10 # in V\n", "I_D= 0.4*10**3 # in A\n", "W= 100 # in \u00b5m\n", "L= 10 # in \u00b5m\n", "uACox= 20 # in A/V**2\n", "Vt= 2 # in V\n", "R= 0.015\n", "V_GS= V_DD-I_D*R # in V\n", "\n", "#RESULTS\n", "print('The value of R is : =%.f k\u03a9 ' %(R*10**3))\n", "V_D= V_DD-I_D*R # in V\n", "print('The value of V_D is : =%.f volts ' %V_D)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of R is : =15 k\u03a9 \n", "The value of V_D is : =4 volts \n" ] } ], "prompt_number": 118 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example No 9.36 Page No 405" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#initialisation of variables\n", "V_GSth= 2 # in V\n", "k= 2*10**-4 # in A/V^2\n", "V_DD= 12 # in V\n", "R_D= 5*10**3 # in ohm\n", "I_D= 0.0014597\n", "\n", "#CALCULATIONS\n", "V_DS= V_DD-I_D*R_D # in V\n", "\n", "#RESULTS\n", "print('The value of V_DS is : =%.1f volts ' %V_DS)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of V_DS is : =4.7 volts \n" ] } ], "prompt_number": 119 } ], "metadata": {} } ] }