diff options
author | Prashant S | 2020-04-14 10:25:32 +0530 |
---|---|---|
committer | GitHub | 2020-04-14 10:25:32 +0530 |
commit | 06b09e7d29d252fb2f5a056eeb8bd1264ff6a333 (patch) | |
tree | 2b1df110e24ff0174830d7f825f43ff1c134d1af /Electronic_Devices_by_T_L_Floyd/10-Amplifier_Frequency_Response.ipynb | |
parent | abb52650288b08a680335531742a7126ad0fb846 (diff) | |
parent | 476705d693c7122d34f9b049fa79b935405c9b49 (diff) | |
download | all-scilab-tbc-books-ipynb-06b09e7d29d252fb2f5a056eeb8bd1264ff6a333.tar.gz all-scilab-tbc-books-ipynb-06b09e7d29d252fb2f5a056eeb8bd1264ff6a333.tar.bz2 all-scilab-tbc-books-ipynb-06b09e7d29d252fb2f5a056eeb8bd1264ff6a333.zip |
Initial commit
Diffstat (limited to 'Electronic_Devices_by_T_L_Floyd/10-Amplifier_Frequency_Response.ipynb')
-rw-r--r-- | Electronic_Devices_by_T_L_Floyd/10-Amplifier_Frequency_Response.ipynb | 579 |
1 files changed, 579 insertions, 0 deletions
diff --git a/Electronic_Devices_by_T_L_Floyd/10-Amplifier_Frequency_Response.ipynb b/Electronic_Devices_by_T_L_Floyd/10-Amplifier_Frequency_Response.ipynb new file mode 100644 index 0000000..9b7ee23 --- /dev/null +++ b/Electronic_Devices_by_T_L_Floyd/10-Amplifier_Frequency_Response.ipynb @@ -0,0 +1,579 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 10: Amplifier Frequency Response" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.10: input_RC_circuit_BJT.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//ex10.10\n", +"B_ac=125;\n", +"C_be=20*10^-12;\n", +"C_bc=2.4*10^-12;\n", +"R1=22*10^3;\n", +"R2=4.7*10^3;\n", +"R_E=470;\n", +"R_S=600;\n", +"R_L=2.2*10^3;\n", +"V_CC=10;\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*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=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", +"f_c=1/(2*%pi*R_in_tot*C_in_tot);\n", +"disp(R_in_tot, 'total resistance of circuit in ohms')\n", +"disp(C_in_tot,'total capacitance in farads')\n", +"disp(f_c,'critical frequency in hertz')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.11: Critical_frequency_BJT_output.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//ex10.11\n", +"C_bc=2.4*10^-12; //from previous question\n", +"A_v=99; //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*%pi*R_c*C_bc); //C_bc is almost equal to C_in_Miller\n", +"disp(R_c,'equivalent resistance in ohms')\n", +"disp(C_out_Miller,'equivalent capacitance in farads')\n", +"disp(f_c,'critical frequency in hertz')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.12: FET_capacitors.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//ex10.12\n", +"C_iss=6*10^-12;\n", +"C_rss=2*10^-12;\n", +"C_gd=C_rss;\n", +"C_gs=C_iss-C_rss;\n", +"disp(C_gd,'gate to drain capacitance in farads')\n", +"disp(C_gs,'gate to source capacitance in farads')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.13: Critical_frequency_FET_input.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//ex10.13;\n", +"C_iss=8*10^-12;\n", +"C_rss=3*10^-12;\n", +"g_m=6500*10^-6; //in Siemens\n", +"R_D=1*10^3;\n", +"R_L=10*10^6;\n", +"R_s=50;\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*%pi*C_in_tot*R_s);\n", +"disp(f_c,'critical frequency of input RC circuit in hertz')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.14: Critical_frequency_FET_input.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//ex10.14\n", +"C_gd=3*10^-12; //from previous question\n", +"A_v=6.5; //from previous question\n", +"R_d=1*10^3; //from previous question\n", +"C_out_Miller=C_gd*(A_v+1)/A_v;\n", +"f_c=1/(2*%pi*R_d*C_out_Miller);\n", +"disp(f_c,'critical frequency of the output circuit in hertz')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.15: Bandwidth.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//ex10.15\n", +"f_cu=2000;\n", +"f_cl=200;\n", +"BW=f_cu-f_cl;\n", +"disp(BW,'bandwidth in hertz')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.16: Bandwidth_transistor.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//ex10.16;\n", +"f_T=175*10^6; //in hertz\n", +"A_v_mid=50;\n", +"BW=f_T/A_v_mid;\n", +"disp(BW,'bandwidth in hertz')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.17: Bandwidth_2stage_amplifier.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//ex10.17\n", +"f_cl=1*10^3; //lower critical frequency of 2nd stage in hertz\n", +"f_cu=100*10^3; //upper critical frequency of 1st stage in hertz\n", +"BW=f_cu-f_cl;\n", +"disp(BW,'bandwidth in hertz')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.18: Bandwidth_2stage_amplifier.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//ex10.18\n", +"n=2; //n is the number of stages of amplifier\n", +"f_cl=500;\n", +"f_cu=80*10^3;\n", +"f_cl_new=f_cl/(sqrt(2^(1/n)-1));\n", +"f_cu_new=f_cu*(sqrt(2^(1/n)-1));\n", +"BW=f_cu_new-f_cl_new;\n", +"disp(BW,'bandwidth in hertz')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.1: Gain_in_decibel.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//ex10.1\n", +"//P out/P in=250;\n", +"A_p_dB=gain_in_decibel_power(250)\n", +"disp(A_p_dB,'Power gain when power gain is 250')\n", +"A_p_dB=gain_in_decibel_power(100)\n", +"disp(A_p_dB,'Power gain when power gain is 100')\n", +"A_v_dB=gain_in_decibel_voltage(10)\n", +"disp(A_v_dB,'Voltage gain when voltage gain is 10')\n", +"A_v_dB=gain_in_decibel_power(0.5)\n", +"disp(A_v_dB,'Power gain when voltage gain is 0.5')\n", +"A_v_dB=gain_in_decibel_voltage(0.707)\n", +"disp(A_v_dB,'Voltage gain when voltage gain is 0.707')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.2: Critical_frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//ex10.2\n", +"//input voltage=10V\n", +"//at -3dB voltage gain from table is 0.707\n", +"v_out=0.707*10;\n", +"disp(v_out,'output voltage in volts at -3dB gain')\n", +"//at -6dB voltage gain from table is 0.5\n", +"v_out=0.5*10;\n", +"disp(v_out,'output voltage in volts at -6dB gain')\n", +"//at -12dB voltage gain from table is 0.25\n", +"v_out=0.25*10;\n", +"disp(v_out,'output voltage in volts at -12dB gain')\n", +"//at -24dB voltage gain from table is 0.0625\n", +"v_out=0.0625*10;\n", +"disp(v_out,'output voltage in volts at -24dB gain')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.3: Lower_critical_frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//ex10.3\n", +"R_in=1*10^3;\n", +"C1=1*10^-6;\n", +"A_v_mid=100; //mid range voltage gain\n", +"f_c=1/(2*%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", +"disp(f_c,'lower critical frequency in hertz')\n", +"disp(attenuation,'attenuation at lower critical frequency')\n", +"disp(A_v,'gain at lower critical frequency')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.4: Voltage_gains.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//ex10.4\n", +"A_v_mid=100;\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", +"disp(A_v,'actual voltage gain at 1Hz frequency')\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", +"disp(A_v,'actual voltage gain at 100Hz frequency')\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", +"disp(A_v,'actual voltage gain at 10Hz frequency')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.5: Output_RC_circuit.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//ex10.5\n", +"R_C=10*10^3;\n", +"C3=0.1*10^-6;\n", +"R_L=10*10^3;\n", +"A_v_mid=50;\n", +"f_c=1/(2*%pi*(R_L+R_C)*C3);\n", +"disp(f_c,'lower critical frequency in hertz')\n", +"//at midrange capacitive reactance is zero\n", +"X_C3=0;\n", +"attenuation=R_L/(R_L+R_C); \n", +"disp(attenuation,'attenuation at midrange frequency')\n", +"//at critical frequency, capacitive reactance equals total resistance\n", +"X_C3=R_L+R_C;\n", +"attenuation=R_L/(sqrt((R_C+R_L)^2+X_C3^2));\n", +"disp(attenuation,'attenuation at critical frequency')\n", +"A_v=0.707*A_v_mid;\n", +"disp(A_v,'gain at critical frequency')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.6: Bypass_RC_circuit_BJT.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//ex10.6\n", +"B_ac=100;\n", +"r_e=12;\n", +"R1=62*10^3;\n", +"R2=22*10^3;\n", +"R_S=1*10^3;\n", +"R_E=1*10^3;\n", +"C2=100*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*%pi*R*C2);\n", +"disp(f_c,'critical frequency of bypass RC circuit in hertz')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.7: input_RC_circuit_FET.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//ex10.7\n", +"V_GS=-10;\n", +"I_GSS=25*10^-9;\n", +"R_G=10*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*%pi*R_in*C1);\n", +"disp(f_c,'critical frequency in hertz')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.8: Low_frequency_response_FET.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//ex10.8\n", +"V_GS=-12;\n", +"I_GSS=100*10^-9;\n", +"R_G=10*10^6;\n", +"R_D=10*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*%pi*R_in*C1);\n", +"disp(f_c_input,'critical frequency of input RC circuit in hertz')\n", +"f_c_output=1/(2*%pi*(R_D+R_L)*C2)\n", +"disp(f_c_output,'critical frequency of output RC circuit in hertz')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.9: Low_frequency_response_BJT.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//ex10.9\n", +"B_ac=100;\n", +"r_e=16;\n", +"R1=62*10^3;\n", +"R2=22*10^3;\n", +"R_S=600;\n", +"R_E=1*10^3;\n", +"R_C=2.2*10^3;\n", +"R_L=10*10^3;\n", +"C1=0.1*10^-6;\n", +"C2=10*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*%pi*(R_S+R_in)*C1);\n", +"disp(f_c_input,'input frequency in hertz')\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*%pi*R*C2);\n", +"disp(f_c_bypass,'critical frequency of bypass RC circuit in hertz')\n", +"f_c_output=1/(2*%pi*(R_C+R_L)*C3)\n", +"disp(f_c_output,'output frequency circuit in hertz')\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*log10(A_v); \n", +"disp(A_v_mid_dB,'overall voltage gain in dB')" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} |