summaryrefslogtreecommitdiff
path: root/Electronic_Devices_/Chapter10.ipynb
diff options
context:
space:
mode:
authordebashisdeb2014-06-20 15:42:42 +0530
committerdebashisdeb2014-06-20 15:42:42 +0530
commit83c1bfceb1b681b4bb7253b47491be2d8b2014a1 (patch)
treef54eab21dd3d725d64a495fcd47c00d37abed004 /Electronic_Devices_/Chapter10.ipynb
parenta78126bbe4443e9526a64df9d8245c4af8843044 (diff)
downloadPython-Textbook-Companions-83c1bfceb1b681b4bb7253b47491be2d8b2014a1.tar.gz
Python-Textbook-Companions-83c1bfceb1b681b4bb7253b47491be2d8b2014a1.tar.bz2
Python-Textbook-Companions-83c1bfceb1b681b4bb7253b47491be2d8b2014a1.zip
removing problem statements
Diffstat (limited to 'Electronic_Devices_/Chapter10.ipynb')
-rw-r--r--Electronic_Devices_/Chapter10.ipynb929
1 files changed, 475 insertions, 454 deletions
diff --git a/Electronic_Devices_/Chapter10.ipynb b/Electronic_Devices_/Chapter10.ipynb
index 8864497b..696f96b2 100644
--- a/Electronic_Devices_/Chapter10.ipynb
+++ b/Electronic_Devices_/Chapter10.ipynb
@@ -1,719 +1,740 @@
{
"metadata": {
- "name": "Chapter_10"
- },
- "nbformat": 2,
+ "name": "",
+ "signature": "sha256:f003b1f1cd26176eb417b448a8cfca349700fbb49c6916dd3657fc77d5dd4cf3"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
- "cell_type": "markdown",
+ "cell_type": "markdown",
+ "metadata": {},
"source": [
"<h1>Chapter 10: Amplifier Frequency Response<h1>"
]
- },
+ },
{
- "cell_type": "markdown",
+ "cell_type": "markdown",
+ "metadata": {},
"source": [
"<h3>Example 10.1, Page Number: 311<h3>"
]
- },
+ },
{
- "cell_type": "code",
- "collapsed": false,
+ "cell_type": "code",
+ "collapsed": false,
"input": [
- "'''Gain in decibel'''",
- "",
- "import math",
- "#Pout/P in=250;",
- "A_p=250.0",
- "A_p_dB=10*math.log10(A_p)",
- "print('Power gain(dB) when power gain is 250 = %d'% math.ceil(A_p_dB));",
- "A_p=100.0",
- "A_p_dB=10*math.log10(A_p)",
- "print('Power gain(dB) when power gain is 100 = %d'%A_p_dB)",
- "A_p=10.0",
- "A_p_dB=20*math.log10(A_p)",
- "print('Voltage gain(dB) when Voltage gain is 10 = %d'%A_p_dB)",
- "A_p=0.50",
- "A_p_dB=10*math.log10(A_p)",
- "print('Power gain(dB) when voltage gain is 0.50 = %d'%A_p_dB)",
- "A_p=0.707",
- "A_p_dB=20*math.log10(A_p)",
+ "\n",
+ "import math\n",
+ "#Pout/P in=250;\n",
+ "A_p=250.0\n",
+ "A_p_dB=10*math.log10(A_p)\n",
+ "print('Power gain(dB) when power gain is 250 = %d'% math.ceil(A_p_dB));\n",
+ "A_p=100.0\n",
+ "A_p_dB=10*math.log10(A_p)\n",
+ "print('Power gain(dB) when power gain is 100 = %d'%A_p_dB)\n",
+ "A_p=10.0\n",
+ "A_p_dB=20*math.log10(A_p)\n",
+ "print('Voltage gain(dB) when Voltage gain is 10 = %d'%A_p_dB)\n",
+ "A_p=0.50\n",
+ "A_p_dB=10*math.log10(A_p)\n",
+ "print('Power gain(dB) when voltage gain is 0.50 = %d'%A_p_dB)\n",
+ "A_p=0.707\n",
+ "A_p_dB=20*math.log10(A_p)\n",
"print('Power gain(dB) when power gain is 0.707 = %d'%A_p_dB)"
- ],
- "language": "python",
+ ],
+ "language": "python",
+ "metadata": {},
"outputs": [
{
- "output_type": "stream",
- "stream": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
"text": [
- "Power gain(dB) when power gain is 250 = 24",
- "Power gain(dB) when power gain is 100 = 20",
- "Voltage gain(dB) when Voltage gain is 10 = 20",
- "Power gain(dB) when voltage gain is 0.50 = -3",
+ "Power gain(dB) when power gain is 250 = 24\n",
+ "Power gain(dB) when power gain is 100 = 20\n",
+ "Voltage gain(dB) when Voltage gain is 10 = 20\n",
+ "Power gain(dB) when voltage gain is 0.50 = -3\n",
"Power gain(dB) when power gain is 0.707 = -3"
]
}
- ],
+ ],
"prompt_number": 19
- },
+ },
{
- "cell_type": "markdown",
+ "cell_type": "markdown",
+ "metadata": {},
"source": [
"<h3>Example 10.2, Page Number: 313<h3>"
]
- },
+ },
{
- "cell_type": "code",
- "collapsed": false,
+ "cell_type": "code",
+ "collapsed": false,
"input": [
- "'''Gain in decibel'''",
- "",
- "",
- "#input voltage=10V",
- "#at -3dB voltage gain from table is 0.707",
- "v_out=0.707*10;",
- "print('output voltage in volts at -3dB gain = %.2f'%v_out)",
- "#at -6dB voltage gain from table is 0.5",
- "v_out=0.5*10;",
- "print('output voltage in volts at -6dB gain = %d'%v_out)",
- "#at -12dB voltage gain from table is 0.25",
- "v_out=0.25*10;",
- "print('output voltage in volts at -12dB gain = %.1f'%v_out)",
- "#at -24dB voltage gain from table is 0.0625",
- "v_out=0.0625*10;",
+ "\n",
+ "\n",
+ "\n",
+ "v_out=0.707*10;\n",
+ "print('output voltage in volts at -3dB gain = %.2f'%v_out)\n",
+ "#at -6dB voltage gain from table is 0.5\n",
+ "v_out=0.5*10;\n",
+ "print('output voltage in volts at -6dB gain = %d'%v_out)\n",
+ "#at -12dB voltage gain from table is 0.25\n",
+ "v_out=0.25*10;\n",
+ "print('output voltage in volts at -12dB gain = %.1f'%v_out)\n",
+ "#at -24dB voltage gain from table is 0.0625\n",
+ "v_out=0.0625*10;\n",
"print('output voltage in volts at -24dB gain = %.3f'%v_out)"
- ],
- "language": "python",
+ ],
+ "language": "python",
+ "metadata": {},
"outputs": [
{
- "output_type": "stream",
- "stream": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
"text": [
- "output voltage in volts at -3dB gain = 7.07",
- "output voltage in volts at -6dB gain = 5",
- "output voltage in volts at -12dB gain = 2.5",
+ "output voltage in volts at -3dB gain = 7.07\n",
+ "output voltage in volts at -6dB gain = 5\n",
+ "output voltage in volts at -12dB gain = 2.5\n",
"output voltage in volts at -24dB gain = 0.625"
]
}
- ],
+ ],
"prompt_number": 20
- },
+ },
{
- "cell_type": "markdown",
+ "cell_type": "markdown",
+ "metadata": {},
"source": [
"<h3>Example 10.3, Page Number: 316<h3>"
]
- },
+ },
{
- "cell_type": "code",
- "collapsed": false,
+ "cell_type": "code",
+ "collapsed": false,
"input": [
- "'''Lower critical frequency'''",
- "",
- "import math",
- "R_in=1.0*10**3;",
- "C1=1.0*10**-6;",
- "A_v_mid=100.0; #mid range voltage gain",
- "f_c=1/(2*math.pi*R_in*C1);",
- "#at f_c, capacitive reactance is equal to resistance(X_C1=R_in)",
- "attenuation=0.707;",
- "#A_v is gain at lower critical frequency",
- "A_v=0.707*A_v_mid;",
- "print('lower critical frequency = %f Hz'%f_c)",
- "print('attenuation at lower critical frequency =%.3f'%attenuation)",
+ "\n",
+ "import math\n",
+ "R_in=1.0*10**3;\n",
+ "C1=1.0*10**-6;\n",
+ "A_v_mid=100.0; #mid range voltage gain\n",
+ "f_c=1/(2*math.pi*R_in*C1);\n",
+ "#at f_c, capacitive reactance is equal to resistance(X_C1=R_in)\n",
+ "attenuation=0.707;\n",
+ "#A_v is gain at lower critical frequency\n",
+ "A_v=0.707*A_v_mid;\n",
+ "print('lower critical frequency = %f Hz'%f_c)\n",
+ "print('attenuation at lower critical frequency =%.3f'%attenuation)\n",
"print('gain at lower critical frequency = %.1f'%A_v)"
- ],
- "language": "python",
+ ],
+ "language": "python",
+ "metadata": {},
"outputs": [
{
- "output_type": "stream",
- "stream": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
"text": [
- "lower critical frequency = 159.154943 Hz",
- "attenuation at lower critical frequency =0.707",
+ "lower critical frequency = 159.154943 Hz\n",
+ "attenuation at lower critical frequency =0.707\n",
"gain at lower critical frequency = 70.7"
]
}
- ],
+ ],
"prompt_number": 21
- },
+ },
{
- "cell_type": "markdown",
+ "cell_type": "markdown",
+ "metadata": {},
"source": [
"<h3>Example 10.4, Page Number: 317<h3>"
]
- },
+ },
{
- "cell_type": "code",
- "collapsed": false,
+ "cell_type": "code",
+ "collapsed": false,
"input": [
- "'''Voltage gains'''",
- "",
- "A_v_mid=100.0;",
- "#At 1Hz frequency,voltage gain is 3 dB less than at midrange. At -3dB, the voltage is reduced by a factor of 0.707",
- "A_v=0.707*A_v_mid;",
- "print('actual voltage gain at 1Hz frequency = %.1f'%A_v)",
- "#At 100Hz frequency,voltage gain is 20 dB less than at critical frequency (f_c ). At -20dB, the voltage is reduced by a factor of 0.1",
- "A_v=0.1*A_v_mid;",
- "print('actual voltage gain at 100Hz frequency = %d'%A_v)",
- "#At 10Hz frequency,voltage gain is 40 dB less than at critical frequency (f_c). At -40dB, the voltage is reduced by a factor of 0.01",
- "A_v=0.01*A_v_mid;",
+ "\n",
+ "A_v_mid=100.0;\n",
+ "#At 1Hz frequency,voltage gain is 3 dB less than at midrange. At -3dB, the voltage is reduced by a factor of 0.707\n",
+ "A_v=0.707*A_v_mid;\n",
+ "print('actual voltage gain at 1Hz frequency = %.1f'%A_v)\n",
+ "#At 100Hz frequency,voltage gain is 20 dB less than at critical frequency (f_c ). At -20dB, the voltage is reduced by a factor of 0.1\n",
+ "A_v=0.1*A_v_mid;\n",
+ "print('actual voltage gain at 100Hz frequency = %d'%A_v)\n",
+ "#At 10Hz frequency,voltage gain is 40 dB less than at critical frequency (f_c). At -40dB, the voltage is reduced by a factor of 0.01\n",
+ "A_v=0.01*A_v_mid;\n",
"print('actual voltage gain at 10Hz frequency = %d'%A_v)"
- ],
- "language": "python",
+ ],
+ "language": "python",
+ "metadata": {},
"outputs": [
{
- "output_type": "stream",
- "stream": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
"text": [
- "actual voltage gain at 1Hz frequency = 70.7",
- "actual voltage gain at 100Hz frequency = 10",
+ "actual voltage gain at 1Hz frequency = 70.7\n",
+ "actual voltage gain at 100Hz frequency = 10\n",
"actual voltage gain at 10Hz frequency = 1"
]
}
- ],
+ ],
"prompt_number": 22
- },
+ },
{
- "cell_type": "markdown",
+ "cell_type": "markdown",
+ "metadata": {},
"source": [
"<h3>Example 10.5, Page Number: 319<h3>"
]
- },
+ },
{
- "cell_type": "code",
- "collapsed": false,
+ "cell_type": "code",
+ "collapsed": false,
"input": [
- "'''Output RC circuit'''",
- "",
- "import math",
- "R_C=10.0*10**3;",
- "C3=0.1*10**-6;",
- "R_L=10*10**3;",
- "A_v_mid=50;",
- "f_c=1/(2*math.pi*(R_L+R_C)*C3);",
- "print('lower critical frequency = %f Hz'%f_c)",
- "#at midrange capacitive reactance is zero",
- "X_C3=0;",
- "attenuation=R_L/(R_L+R_C); ",
- "print('attenuation at midrange frequency = %.1f'%attenuation)",
- "#at critical frequency, capacitive reactance equals total resistance",
- "X_C3=R_L+R_C;",
- "attenuation=R_L/(math.sqrt((R_C+R_L)**2+X_C3**2));",
- "print('attenuation at critical frequency = %f'%attenuation)",
- "A_v=0.707*A_v_mid;",
+ "\n",
+ "import math\n",
+ "R_C=10.0*10**3;\n",
+ "C3=0.1*10**-6;\n",
+ "R_L=10*10**3;\n",
+ "A_v_mid=50;\n",
+ "f_c=1/(2*math.pi*(R_L+R_C)*C3);\n",
+ "print('lower critical frequency = %f Hz'%f_c)\n",
+ "#at midrange capacitive reactance is zero\n",
+ "X_C3=0;\n",
+ "attenuation=R_L/(R_L+R_C); \n",
+ "print('attenuation at midrange frequency = %.1f'%attenuation)\n",
+ "#at critical frequency, capacitive reactance equals total resistance\n",
+ "X_C3=R_L+R_C;\n",
+ "attenuation=R_L/(math.sqrt((R_C+R_L)**2+X_C3**2));\n",
+ "print('attenuation at critical frequency = %f'%attenuation)\n",
+ "A_v=0.707*A_v_mid;\n",
"print('gain at critical frequency = %.2f'%A_v)"
- ],
- "language": "python",
+ ],
+ "language": "python",
+ "metadata": {},
"outputs": [
{
- "output_type": "stream",
- "stream": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
"text": [
- "lower critical frequency = 79.577472 Hz",
- "attenuation at midrange frequency = 0.5",
- "attenuation at critical frequency = 0.353553",
+ "lower critical frequency = 79.577472 Hz\n",
+ "attenuation at midrange frequency = 0.5\n",
+ "attenuation at critical frequency = 0.353553\n",
"gain at critical frequency = 35.35"
]
}
- ],
+ ],
"prompt_number": 23
- },
+ },
{
- "cell_type": "markdown",
+ "cell_type": "markdown",
+ "metadata": {},
"source": [
"<h3>Example 10.6, Page Number: 321<h3>"
]
- },
+ },
{
- "cell_type": "code",
- "collapsed": false,
+ "cell_type": "code",
+ "collapsed": false,
"input": [
- "'''Bypass RC circuit BJT'''",
- "",
- "import math",
- "B_ac=100.0;",
- "r_e=12.0;",
- "R1=62.0*10**3;",
- "R2=22.0*10**3;",
- "R_S=1.0*10**3;",
- "R_E=1.0*10**3;",
- "C2=100.0*10**-6;",
- "#Base circuit impedance= parallel combination of R1, R2, R_S",
- "R_th=(R1*R2*R_S)/(R1*R2+R2*R_S+R_S*R1);",
- "#Resistance looking at emitter",
- "R_in_emitter=r_e+(R_th/B_ac);",
- "#resistance of equivalent bypass RC is parallel combination of R_E,R_in_emitter",
- "R=(R_in_emitter*R_E)/(R_E+R_in_emitter);",
- "f_c=1/(2*math.pi*R*C2);",
+ "\n",
+ "import math\n",
+ "B_ac=100.0;\n",
+ "r_e=12.0;\n",
+ "R1=62.0*10**3;\n",
+ "R2=22.0*10**3;\n",
+ "R_S=1.0*10**3;\n",
+ "R_E=1.0*10**3;\n",
+ "C2=100.0*10**-6;\n",
+ "#Base circuit impedance= parallel combination of R1, R2, R_S\n",
+ "R_th=(R1*R2*R_S)/(R1*R2+R2*R_S+R_S*R1);\n",
+ "#Resistance looking at emitter\n",
+ "R_in_emitter=r_e+(R_th/B_ac);\n",
+ "#resistance of equivalent bypass RC is parallel combination of R_E,R_in_emitter\n",
+ "R=(R_in_emitter*R_E)/(R_E+R_in_emitter);\n",
+ "f_c=1/(2*math.pi*R*C2);\n",
"print('critical frequency of bypass RC circuit = %f Hz'%f_c)"
- ],
- "language": "python",
+ ],
+ "language": "python",
+ "metadata": {},
"outputs": [
{
- "output_type": "stream",
- "stream": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
"text": [
"critical frequency of bypass RC circuit = 75.893960 Hz"
]
}
- ],
+ ],
"prompt_number": 24
- },
+ },
{
- "cell_type": "markdown",
+ "cell_type": "markdown",
+ "metadata": {},
"source": [
"<h3>Example 10.7, Page Number:323<h3>"
]
- },
+ },
{
- "cell_type": "code",
- "collapsed": false,
+ "cell_type": "code",
+ "collapsed": false,
"input": [
- "'''input RC circuit FET'''",
- "",
- "import math",
- "V_GS=-10.0;",
- "I_GSS=25.0*10**-9;",
- "R_G=10.0*10**6;",
- "C1=0.001*10**-6;",
- "R_in_gate=abs((V_GS/I_GSS));",
- "R_in=(R_in_gate*R_G)/(R_G+R_in_gate);",
- "f_c=1/(2*math.pi*R_in*C1);",
+ "\n",
+ "import math\n",
+ "V_GS=-10.0;\n",
+ "I_GSS=25.0*10**-9;\n",
+ "R_G=10.0*10**6;\n",
+ "C1=0.001*10**-6;\n",
+ "R_in_gate=abs((V_GS/I_GSS));\n",
+ "R_in=(R_in_gate*R_G)/(R_G+R_in_gate);\n",
+ "f_c=1/(2*math.pi*R_in*C1);\n",
"print('critical frequency = %f Hz'%f_c)"
- ],
- "language": "python",
+ ],
+ "language": "python",
+ "metadata": {},
"outputs": [
{
- "output_type": "stream",
- "stream": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
"text": [
"critical frequency = 16.313382 Hz"
]
}
- ],
+ ],
"prompt_number": 25
- },
+ },
{
- "cell_type": "markdown",
+ "cell_type": "markdown",
+ "metadata": {},
"source": [
"<h3>Example 10.8, Page Number: 324<h3>"
]
- },
+ },
{
- "cell_type": "code",
- "collapsed": false,
+ "cell_type": "code",
+ "collapsed": false,
"input": [
- "'''Low frequency response FET'''",
- "",
- "import math",
- "V_GS=-12.0;",
- "I_GSS=100.0*10**-9;",
- "R_G=10.0*10**6;",
- "R_D=10.0*10**3;",
- "C1=0.001*10**-6;",
- "C2=0.001*10**-6;",
- "R_in_gate=abs((V_GS/I_GSS));",
- "R_in=(R_in_gate*R_G)/(R_G+R_in_gate);",
- "R_L=R_in; #according to question",
- "f_c_input=1/(2*math.pi*R_in*C1);",
- "print('critical frequency of input RC circuit = %f Hz'%f_c_input)",
- "f_c_output=1/(2*math.pi*(R_D+R_L)*C2)",
+ "\n",
+ "import math\n",
+ "V_GS=-12.0;\n",
+ "I_GSS=100.0*10**-9;\n",
+ "R_G=10.0*10**6;\n",
+ "R_D=10.0*10**3;\n",
+ "C1=0.001*10**-6;\n",
+ "C2=0.001*10**-6;\n",
+ "R_in_gate=abs((V_GS/I_GSS));\n",
+ "R_in=(R_in_gate*R_G)/(R_G+R_in_gate);\n",
+ "R_L=R_in; #according to question\n",
+ "f_c_input=1/(2*math.pi*R_in*C1);\n",
+ "print('critical frequency of input RC circuit = %f Hz'%f_c_input)\n",
+ "f_c_output=1/(2*math.pi*(R_D+R_L)*C2)\n",
"print('critical frequency of output RC circuit = %f Hz'%f_c_output)"
- ],
- "language": "python",
+ ],
+ "language": "python",
+ "metadata": {},
"outputs": [
{
- "output_type": "stream",
- "stream": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
"text": [
- "critical frequency of input RC circuit = 17.241786 Hz",
+ "critical frequency of input RC circuit = 17.241786 Hz\n",
"critical frequency of output RC circuit = 17.223127 Hz"
]
}
- ],
+ ],
"prompt_number": 26
- },
+ },
{
- "cell_type": "markdown",
+ "cell_type": "markdown",
+ "metadata": {},
"source": [
"<h3>Example 10.9, Page Number: 327<h3>"
]
- },
+ },
{
- "cell_type": "code",
- "collapsed": false,
+ "cell_type": "code",
+ "collapsed": false,
"input": [
- "'''Low frequency response BJT'''",
- "",
- "import math",
- "B_ac=100.0;",
- "r_e=16.0;",
- "R1=62.0*10**3;",
- "R2=22.0*10**3;",
- "R_S=600.0;",
- "R_E=1.0*10**3;",
- "R_C=2.2*10**3;",
- "R_L=10.0*10**3;",
- "C1=0.1*10**-6;",
- "C2=10.0*10**-6;",
- "C3=0.1*10**-6;",
- "#input RC circuit",
- "R_in=(B_ac*r_e*R1*R2)/(B_ac*r_e*R1+B_ac*r_e*R2+R1*R2);",
- "f_c_input=1/(2*math.pi*(R_S+R_in)*C1);",
- "print('input frequency = %f Hz'%f_c_input)",
- "#For bypass circuit; Base circuit impedance= parallel combination of R1, R2, R_S",
- "R_th=(R1*R2*R_S)/(R1*R2+R2*R_S+R_S*R1);",
- "#Resistance looking at emitter",
- "R_in_emitter=r_e+(R_th/B_ac);",
- "#resistance of equivalent bypass RC is parallel combination of R_E,R_in_emitter",
- "R=(R_in_emitter*R_E)/(R_E+R_in_emitter);",
- "f_c_bypass=1/(2*math.pi*R*C2);",
- "print('critical frequency of bypass RC circuit = %f Hz'%f_c_bypass)",
- "f_c_output=1/(2*math.pi*(R_C+R_L)*C3)",
- "print('output frequency circuit = %f Hz'%f_c_output)",
- "R_c=R_C*R_L/(R_C+R_L);",
- "A_v_mid=R_c/r_e;",
- "attenuation=R_in/(R_in+R_S);",
- "A_v=attenuation*A_v_mid; #overall voltage gain",
- "A_v_mid_dB=20*math.log10(A_v); ",
+ "\n",
+ "import math\n",
+ "B_ac=100.0;\n",
+ "r_e=16.0;\n",
+ "R1=62.0*10**3;\n",
+ "R2=22.0*10**3;\n",
+ "R_S=600.0;\n",
+ "R_E=1.0*10**3;\n",
+ "R_C=2.2*10**3;\n",
+ "R_L=10.0*10**3;\n",
+ "C1=0.1*10**-6;\n",
+ "C2=10.0*10**-6;\n",
+ "C3=0.1*10**-6;\n",
+ "#input RC circuit\n",
+ "R_in=(B_ac*r_e*R1*R2)/(B_ac*r_e*R1+B_ac*r_e*R2+R1*R2);\n",
+ "f_c_input=1/(2*math.pi*(R_S+R_in)*C1);\n",
+ "print('input frequency = %f Hz'%f_c_input)\n",
+ "#For bypass circuit; Base circuit impedance= parallel combination of R1, R2, R_S\n",
+ "R_th=(R1*R2*R_S)/(R1*R2+R2*R_S+R_S*R1);\n",
+ "#Resistance looking at emitter\n",
+ "R_in_emitter=r_e+(R_th/B_ac);\n",
+ "#resistance of equivalent bypass RC is parallel combination of R_E,R_in_emitter\n",
+ "R=(R_in_emitter*R_E)/(R_E+R_in_emitter);\n",
+ "f_c_bypass=1/(2*math.pi*R*C2);\n",
+ "print('critical frequency of bypass RC circuit = %f Hz'%f_c_bypass)\n",
+ "f_c_output=1/(2*math.pi*(R_C+R_L)*C3)\n",
+ "print('output frequency circuit = %f Hz'%f_c_output)\n",
+ "R_c=R_C*R_L/(R_C+R_L);\n",
+ "A_v_mid=R_c/r_e;\n",
+ "attenuation=R_in/(R_in+R_S);\n",
+ "A_v=attenuation*A_v_mid; #overall voltage gain\n",
+ "A_v_mid_dB=20*math.log10(A_v); \n",
"print('overall voltage gain in dB = %f'%A_v_mid_dB)"
- ],
- "language": "python",
+ ],
+ "language": "python",
+ "metadata": {},
"outputs": [
{
- "output_type": "stream",
- "stream": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
"text": [
- "input frequency = 773.916632 Hz",
- "critical frequency of bypass RC circuit = 746.446517 Hz",
- "output frequency circuit = 130.454871 Hz",
+ "input frequency = 773.916632 Hz\n",
+ "critical frequency of bypass RC circuit = 746.446517 Hz\n",
+ "output frequency circuit = 130.454871 Hz\n",
"overall voltage gain in dB = 38.042470"
]
}
- ],
+ ],
"prompt_number": 27
- },
+ },
{
- "cell_type": "markdown",
+ "cell_type": "markdown",
+ "metadata": {},
"source": [
"<h3>Example 10.10, Page Number: 330<h3>"
]
- },
+ },
{
- "cell_type": "code",
- "collapsed": false,
+ "cell_type": "code",
+ "collapsed": false,
"input": [
- "'''input RC circuit BJT'''",
- "",
- "import math",
- "B_ac=125.0;",
- "C_be=20.0*10**-12;",
- "C_bc=2.4*10**-12;",
- "R1=22.0*10**3;",
- "R2=4.7*10**3;",
- "R_E=470.0;",
- "R_S=600.0;",
- "R_L=2.2*10**3;",
- "V_CC=10.0;",
- "V_B=(R2/(R1+R2))*V_CC;",
- "V_E=V_B-0.7;",
- "I_E=V_E/R_E;",
- "r_e=25.0*10**-3/I_E;",
- "#total resistance of input circuit is parallel combination of R1,R2,R_s,B_ac*r_e",
- "R_in_tot=B_ac*r_e*R1*R2*R_S/(B_ac*r_e*R1*R2+B_ac*r_e*R1*R_S+B_ac*r_e*R2*R_S+R1*R2*R_S);",
- "R_c= 1100.0#R_C*R_L/(R_C+R_L)",
- "A_v_mid=R_c/r_e;",
- "C_in_Miller=C_bc*(A_v_mid+1)",
- "C_in_tot=C_in_Miller+C_be;",
- "C_in_tot=C_in_tot*10**10",
- "f_c=1/(2*math.pi*R_in_tot*C_in_tot);",
- "print('total resistance of circuit = %f Ohm'%R_in_tot)",
- "print('total capacitance = %f * 10^-10 F'%C_in_tot)",
+ "\n",
+ "import math\n",
+ "B_ac=125.0;\n",
+ "C_be=20.0*10**-12;\n",
+ "C_bc=2.4*10**-12;\n",
+ "R1=22.0*10**3;\n",
+ "R2=4.7*10**3;\n",
+ "R_E=470.0;\n",
+ "R_S=600.0;\n",
+ "R_L=2.2*10**3;\n",
+ "V_CC=10.0;\n",
+ "V_B=(R2/(R1+R2))*V_CC;\n",
+ "V_E=V_B-0.7;\n",
+ "I_E=V_E/R_E;\n",
+ "r_e=25.0*10**-3/I_E;\n",
+ "#total resistance of input circuit is parallel combination of R1,R2,R_s,B_ac*r_e\n",
+ "R_in_tot=B_ac*r_e*R1*R2*R_S/(B_ac*r_e*R1*R2+B_ac*r_e*R1*R_S+B_ac*r_e*R2*R_S+R1*R2*R_S);\n",
+ "R_c= 1100.0#R_C*R_L/(R_C+R_L)\n",
+ "A_v_mid=R_c/r_e;\n",
+ "C_in_Miller=C_bc*(A_v_mid+1)\n",
+ "C_in_tot=C_in_Miller+C_be;\n",
+ "C_in_tot=C_in_tot*10**10\n",
+ "f_c=1/(2*math.pi*R_in_tot*C_in_tot);\n",
+ "print('total resistance of circuit = %f Ohm'%R_in_tot)\n",
+ "print('total capacitance = %f * 10^-10 F'%C_in_tot)\n",
"print('critical frequency = %f Hz'%f_c)"
- ],
- "language": "python",
+ ],
+ "language": "python",
+ "metadata": {},
"outputs": [
{
- "output_type": "stream",
- "stream": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
"text": [
- "total resistance of circuit = 377.815676 Ohm",
- "total capacitance = 2.606290 * 10^-10 F",
+ "total resistance of circuit = 377.815676 Ohm\n",
+ "total capacitance = 2.606290 * 10^-10 F\n",
"critical frequency = 0.000162 Hz"
]
}
- ],
+ ],
"prompt_number": 28
- },
+ },
{
- "cell_type": "markdown",
+ "cell_type": "markdown",
+ "metadata": {},
"source": [
"<h3>Example 10.11, Page Number: 333<h3>"
]
- },
+ },
{
- "cell_type": "code",
- "collapsed": false,
+ "cell_type": "code",
+ "collapsed": false,
"input": [
- "'''Critical frequency BJT output'''",
- "",
- "import math",
- "C_bc=2.4*10**-12; #from previous question",
- "A_v=99.0; #from previous question",
- "R_C=2.2*10**3;",
- "R_L=2.2*10**3;",
- "R_c=R_C*R_L/(R_C+R_L);",
- "C_out_Miller=C_bc*(A_v+1)/A_v;",
- "f_c=1/(2*math.pi*R_c*C_bc); #C_bc is almost equal to C_in_Miller",
- "C_out_Miller=C_out_Miller*10**12",
- "print('equivalent resistance = %d Ohm'%R_c)",
- "print('equivalent capacitance =%f *10^-12 F'%C_out_Miller)",
+ "\n",
+ "import math\n",
+ "C_bc=2.4*10**-12; #from previous question\n",
+ "A_v=99.0; #from previous question\n",
+ "R_C=2.2*10**3;\n",
+ "R_L=2.2*10**3;\n",
+ "R_c=R_C*R_L/(R_C+R_L);\n",
+ "C_out_Miller=C_bc*(A_v+1)/A_v;\n",
+ "f_c=1/(2*math.pi*R_c*C_bc); #C_bc is almost equal to C_in_Miller\n",
+ "C_out_Miller=C_out_Miller*10**12\n",
+ "print('equivalent resistance = %d Ohm'%R_c)\n",
+ "print('equivalent capacitance =%f *10^-12 F'%C_out_Miller)\n",
"print('critical frequency =%f Hz'%f_c)"
- ],
- "language": "python",
+ ],
+ "language": "python",
+ "metadata": {},
"outputs": [
{
- "output_type": "stream",
- "stream": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
"text": [
- "equivalent resistance = 1100 Ohm",
- "equivalent capacitance =2.424242 *10^-12 F",
+ "equivalent resistance = 1100 Ohm\n",
+ "equivalent capacitance =2.424242 *10^-12 F\n",
"critical frequency =60285963.292385 Hz"
]
}
- ],
+ ],
"prompt_number": 29
- },
+ },
{
- "cell_type": "markdown",
+ "cell_type": "markdown",
+ "metadata": {},
"source": [
"<h3>Example 10.12, Page Number: 334<h3>"
]
- },
+ },
{
- "cell_type": "code",
- "collapsed": false,
+ "cell_type": "code",
+ "collapsed": false,
"input": [
- "'''FET capacitors'''",
- "",
- "C_iss=6.0*10**-12;",
- "C_rss=2.0*10**-12;",
- "C_gd=C_rss;",
- "C_gs=C_iss-C_rss;",
- "C_gd=C_gd*10**12",
- "C_gs=C_gs*10**12",
- "print('gate to drain capacitance = %.1f * 10^-12 F'%C_gd)",
+ "\n",
+ "C_iss=6.0*10**-12;\n",
+ "C_rss=2.0*10**-12;\n",
+ "C_gd=C_rss;\n",
+ "C_gs=C_iss-C_rss;\n",
+ "C_gd=C_gd*10**12\n",
+ "C_gs=C_gs*10**12\n",
+ "print('gate to drain capacitance = %.1f * 10^-12 F'%C_gd)\n",
"print('gate to source capacitance = %.1f * 10^-12 F'%C_gs)"
- ],
- "language": "python",
+ ],
+ "language": "python",
+ "metadata": {},
"outputs": [
{
- "output_type": "stream",
- "stream": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
"text": [
- "gate to drain capacitance = 2.0 * 10^-12 F",
+ "gate to drain capacitance = 2.0 * 10^-12 F\n",
"gate to source capacitance = 4.0 * 10^-12 F"
]
}
- ],
+ ],
"prompt_number": 30
- },
+ },
{
- "cell_type": "markdown",
+ "cell_type": "markdown",
+ "metadata": {},
"source": [
"<h3>Example 10.13, Page Number:335 <h3>"
]
- },
+ },
{
- "cell_type": "code",
- "collapsed": false,
+ "cell_type": "code",
+ "collapsed": false,
"input": [
- "'''Critical frequency FET input'''",
- "",
- "import math",
- "C_iss=8.0*10**-12;",
- "C_rss=3.0*10**-12;",
- "g_m=6500.0*10**-6; #in Siemens",
- "R_D=1.0*10**3;",
- "R_L=10.0*10**6;",
- "R_s=50.0;",
- "C_gd=C_rss;",
- "C_gs=C_iss-C_rss;",
- "R_d=R_D*R_L/(R_D+R_L);",
- "A_v=g_m*R_d;",
- "C_in_Miller=C_gd*(A_v+1);",
- "C_in_tot=C_in_Miller+C_gs;",
- "f_c=1/(2*math.pi*C_in_tot*R_s);",
+ "\n",
+ "import math\n",
+ "C_iss=8.0*10**-12;\n",
+ "C_rss=3.0*10**-12;\n",
+ "g_m=6500.0*10**-6; #in Siemens\n",
+ "R_D=1.0*10**3;\n",
+ "R_L=10.0*10**6;\n",
+ "R_s=50.0;\n",
+ "C_gd=C_rss;\n",
+ "C_gs=C_iss-C_rss;\n",
+ "R_d=R_D*R_L/(R_D+R_L);\n",
+ "A_v=g_m*R_d;\n",
+ "C_in_Miller=C_gd*(A_v+1);\n",
+ "C_in_tot=C_in_Miller+C_gs;\n",
+ "f_c=1/(2*math.pi*C_in_tot*R_s);\n",
"print('critical frequency of input RC circuit =%.3f *10^8 Hz'%(f_c*10**-8))"
- ],
- "language": "python",
+ ],
+ "language": "python",
+ "metadata": {},
"outputs": [
{
- "output_type": "stream",
- "stream": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
"text": [
"critical frequency of input RC circuit =1.158 *10^8 Hz"
]
}
- ],
+ ],
"prompt_number": 31
- },
+ },
{
- "cell_type": "markdown",
+ "cell_type": "markdown",
+ "metadata": {},
"source": [
"<h3>Example 10.14, Page Number: 336<h3>"
]
- },
+ },
{
- "cell_type": "code",
- "collapsed": false,
+ "cell_type": "code",
+ "collapsed": false,
"input": [
- "'''Critical frequency FET input'''",
- "",
- "import math",
- "C_gd=3.0*10**-12; #from previous question",
- "A_v=6.5; #from previous question",
- "R_d=1.0*10**3; #from previous question",
- "C_out_Miller=C_gd*(A_v+1)/A_v;",
- "f_c=1/(2*math.pi*R_d*C_out_Miller);",
+ "\n",
+ "import math\n",
+ "C_gd=3.0*10**-12; #from previous question\n",
+ "A_v=6.5; #from previous question\n",
+ "R_d=1.0*10**3; #from previous question\n",
+ "C_out_Miller=C_gd*(A_v+1)/A_v;\n",
+ "f_c=1/(2*math.pi*R_d*C_out_Miller);\n",
"print('critical frequency of the output circuit = %d Hz'%f_c)"
- ],
- "language": "python",
+ ],
+ "language": "python",
+ "metadata": {},
"outputs": [
{
- "output_type": "stream",
- "stream": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
"text": [
"critical frequency of the output circuit = 45978094 Hz"
]
}
- ],
+ ],
"prompt_number": 32
- },
+ },
{
- "cell_type": "markdown",
+ "cell_type": "markdown",
+ "metadata": {},
"source": [
"<h3>Example 10.15, Page Number: 339<h3>"
]
- },
+ },
{
- "cell_type": "code",
- "collapsed": false,
+ "cell_type": "code",
+ "collapsed": false,
"input": [
- "'''Bandwidth'''",
- "",
- "f_cu=2000.0;",
- "f_cl=200.0;",
- "BW=f_cu-f_cl;",
+ "\n",
+ "f_cu=2000.0;\n",
+ "f_cl=200.0;\n",
+ "BW=f_cu-f_cl;\n",
"print('bandwidth = %d Hz'%BW)"
- ],
- "language": "python",
+ ],
+ "language": "python",
+ "metadata": {},
"outputs": [
{
- "output_type": "stream",
- "stream": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
"text": [
"bandwidth = 1800 Hz"
]
}
- ],
+ ],
"prompt_number": 33
- },
+ },
{
- "cell_type": "markdown",
+ "cell_type": "markdown",
+ "metadata": {},
"source": [
"<h3>Example 10.16, Page Number: 340<h3>"
]
- },
+ },
{
- "cell_type": "code",
- "collapsed": false,
+ "cell_type": "code",
+ "collapsed": false,
"input": [
- "'''Bandwidth transistor'''",
- "",
- "f_T=175.0*10**6; #in hertz",
- "A_v_mid=50.0;",
- "BW=f_T/A_v_mid;",
+ "\n",
+ "f_T=175.0*10**6; #in hertz\n",
+ "A_v_mid=50.0;\n",
+ "BW=f_T/A_v_mid;\n",
"print('bandwidth = %d Hz'%BW)"
- ],
- "language": "python",
+ ],
+ "language": "python",
+ "metadata": {},
"outputs": [
{
- "output_type": "stream",
- "stream": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
"text": [
"bandwidth = 3500000 Hz"
]
}
- ],
+ ],
"prompt_number": 34
- },
+ },
{
- "cell_type": "markdown",
+ "cell_type": "markdown",
+ "metadata": {},
"source": [
"<h3>Example 10.17, Page Number: 341<h3>"
]
- },
+ },
{
- "cell_type": "code",
- "collapsed": false,
+ "cell_type": "code",
+ "collapsed": false,
"input": [
- "'''Bandwidth 2stage amplifier'''",
- "",
- "f_cl=1.0*10**3; #lower critical frequency of 2nd stage in hertz",
- "f_cu=100.0*10**3; #upper critical frequency of 1st stage in hertz",
- "BW=f_cu-f_cl;",
+ "\n",
+ "f_cl=1.0*10**3; #lower critical frequency of 2nd stage in hertz\n",
+ "f_cu=100.0*10**3; #upper critical frequency of 1st stage in hertz\n",
+ "BW=f_cu-f_cl;\n",
"print('bandwidth = %d Hz'%BW)"
- ],
- "language": "python",
+ ],
+ "language": "python",
+ "metadata": {},
"outputs": [
{
- "output_type": "stream",
- "stream": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
"text": [
"bandwidth = 99000 Hz"
]
}
- ],
+ ],
"prompt_number": 35
- },
+ },
{
- "cell_type": "markdown",
+ "cell_type": "markdown",
+ "metadata": {},
"source": [
"<h3>Example 10.18, Page Number: 341<h3>"
]
- },
+ },
{
- "cell_type": "code",
- "collapsed": false,
+ "cell_type": "code",
+ "collapsed": false,
"input": [
- "'''Bandwidth 2stage amplifier'''",
- "",
- "import math",
- "n=2.0; #n is the number of stages of amplifier",
- "f_cl=500.0;",
- "f_cu=80.0*10**3;",
- "f_cl_new=f_cl/(math.sqrt(2**(1/n)-1));",
- "f_cu_new=f_cu*(math.sqrt(2**(1/n)-1));",
- "BW=f_cu_new-f_cl_new;",
+ "\n",
+ "import math\n",
+ "n=2.0; #n is the number of stages of amplifier\n",
+ "f_cl=500.0;\n",
+ "f_cu=80.0*10**3;\n",
+ "f_cl_new=f_cl/(math.sqrt(2**(1/n)-1));\n",
+ "f_cu_new=f_cu*(math.sqrt(2**(1/n)-1));\n",
+ "BW=f_cu_new-f_cl_new;\n",
"print('bandwidth = %f Hz'%BW)"
- ],
- "language": "python",
+ ],
+ "language": "python",
+ "metadata": {},
"outputs": [
{
- "output_type": "stream",
- "stream": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
"text": [
"bandwidth = 50710.653245 Hz"
]
}
- ],
+ ],
"prompt_number": 36
}
- ]
+ ],
+ "metadata": {}
}
]
} \ No newline at end of file