{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Chapter 7: Frequency Response" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 7.10: Calculate_bandwidth_and_capacitance.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clear;\n", "clc;\n", "//Example 7.10\n", "fT=500;\n", "Ic=1;\n", "b=100;\n", "Vt=0.026;\n", "C2=0.3*10^-12;\n", "fB=fT/b;\n", "printf('\nbandwidth=%.3f MHz\n',fB)\n", "gm=Ic/Vt;\n", "printf('\ntransconductance=%.3f mA/V\n',gm)\n", "fT=500000000;\n", "gm=38.5*0.001;\n", "C1=gm/(fT*2*%pi)-C2;\n", "printf('\ncapacitance =%3.2eF\n',C1)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 7.12: Determine_the_unity_gain_bandwidth.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clear;\n", "clc;\n", "//Example 7.12\n", "Kn=0.25;\n", "Vtn=1;\n", "Cgd=0.04*10^-3;\n", "Cgs=0.2*10^-3;\n", "Vgs=3;\n", "gm=2*Kn*(Vgs-Vtn);\n", "printf('\ntransconductance =%.3fmA/V\n',gm)\n", "fT=gm/(2*%pi*(Cgd+Cgs));\n", "printf('\nunity gain bandwidth=%.f MHz\n',fT)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 7.13: Determine_the_Miller_capacitance_and_cutoff_frequency.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clear;\n", "clc;\n", "//Example 7.13\n", "gm=1;\n", "Cgd=0.04;\n", "Rl=10;\n", "Cgs=0.2;\n", "Cm=Cgd*(1+gm*Rl);\n", "printf('\nMiller capacitance=%.3f pF\n',Cm)\n", "Cm=0.44*0.001;//nF\n", "Cgs=0.2*0.001;//nF\n", "fT=gm/(2*%pi*(Cgs+Cm));\n", "printf('\ncutoff frequency=%.3f MHz\n',fT)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 7.14: Determine_the_upper_corner_frequency_and_midband_gain.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clear;\n", "clc;\n", "//Example 7.14\n", "V1=5;\n", "V=-5;\n", "Rs=0.1;\n", "Rb=40;\n", "R2=5.72;\n", "Re=0.5;\n", "Rc=5;\n", "Rl=10;\n", "b=150;\n", "Vbe=0.7;\n", "C1=35*10^-3;\n", "C2=4;\n", "Vt=0.026;\n", "Icq=1.02;\n", "r=b*Vt/Icq;\n", "printf('\nsmall signal parameter=%.2f KOhm\n',r)\n", "gm=Icq/Vt;\n", "printf('\ntransconductance=%.3f mA/V\n',gm)\n", "Cm=C2*(1+gm*Rc*Rl/(Rc+Rl));\n", "printf('\nMiller capacitance=%.3f pF\n',Cm)\n", "Cm=527*10^-3;\n", "x=Rb*Rs/(Rb+Rs);\n", "y=r*x/(r+x);\n", "fH=1/(2*%pi*y*(C1+Cm));\n", "printf('\nupper corner frequency =%.2fMHz\n',fH)\n", "t=Rb*r/(Rb+r);\n", "p=Rc*Rl/(Rc+Rl);\n", "Av=gm*p*t/(t+Rs);\n", "printf('\nmidband gain=%.2f\n',Av)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 7.15: Determine_the_upper_corner_frequency_and_midband_gain.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clear;\n", "clc;\n", "//Example 7.15\n", "V1=5;\n", "V=-5;\n", "Rs=0.1;\n", "R1=40;\n", "R2=5.72;\n", "Re=0.5;\n", "Rc=5;\n", "Rl=10;\n", "b=150;\n", "Vbe=0.7;\n", "C1=35;\n", "C2=4;\n", "Vt=0.026;\n", "Icq=1.02;\n", "gm=39.2;\n", "r=3.82;\n", "x=Re*Rs/(Re+Rs);\n", "t=r/(1+b);\n", "y=t*x/(t+x);\n", "Tp=y*C1;\n", "printf('\ntime constant=%.3f ns\n',Tp)\n", "Tp=0.679*10^-3;//micro sec\n", "f=1/(2*%pi*Tp);\n", "printf('\nupper frequency =%.3fMHz\n',f)\n", "T=C2*Rc*Rl/(Rc+Rl);\n", "printf('\ntime constant=%.3f ns\n',T)\n", "T=13.3*10^-3;//micro sec\n", "f=1/(2*%pi*T);\n", "printf('\nupper frequency=%.2f MHz\n',f)\n", "x=Rc*Rl/(Rc+Rl);\n", "y=Re*t/(Re+t);\n", "Av=gm*x*(y/(y+Rs));\n", "printf('\nmidband voltage gain=%.2f \n',Av)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 7.16: Determine_the_upper_corner_frequency_and_midband_gain.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clear;\n", "clc;\n", "//Example 7.16\n", "V1=5;\n", "V=-5;\n", "Rs=0.1;\n", "R1=42.5;\n", "R2=20.5;\n", "R3=28.3;\n", "Re=5.4;\n", "Rc=5;\n", "Rl=10;\n", "b=150;\n", "Vbe=0.7;\n", "C1=35;\n", "C2=4;\n", "Vt=0.026;\n", "Icq=1.02;\n", "gm=39.2;\n", "r=3.820;\n", "Rb=R2*R3/(R2+R3);\n", "x=Rb*r/(Rb+r);\n", "y=Rs*x/(x+Rs);\n", "Tp=y*(C1+2*C2);\n", "printf('\ntime constant=%.3f ns\n',Tp)\n", "Tp=Tp*10^-3;//micro sec\n", "f=1/(2*%pi*Tp);\n", "printf('\n3dB frequency =%0.3fMHz\n',f)\n", "T=C2*Rc*Rl/(Rc+Rl);\n", "printf('\ntime constant=%.2f ns\n',T)\n", "T=T*0.001;//micro sec\n", "f=1/(2*%pi*T);\n", "printf('\nupper frequency=%.3f MHz\n',f)\n", "x=Rc*Rl/(Rc+Rl);\n", "y=Rb*r/(Rb+r);\n", "Av=gm*x*(y/(y+Rs));\n", "printf('\nmidband voltage gain=%.f \n',Av)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 7.17: Determine_the_frequency_of_a_zero_and_a_pole.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clear;\n", "clc;\n", "//Example 7.17\n", "V1=5;\n", "V=-5;\n", "Rs=0.1;\n", "R1=40;\n", "R2=5.720;\n", "Re=0.5;\n", "Rc=5;\n", "Rl=10;\n", "b=150;\n", "Vbe=0.7;\n", "C1=35;\n", "C2=4;\n", "Vt=0.026;\n", "Icq=1.02;\n", "gm=39.2;\n", "r=3.820;\n", "t=r/(1+b);\n", "t=t*0.001;\n", "f=1/(2*%pi*C1*t);\n", "printf('\nthe zero occurs at this frequency=%.2f MHz\n',f)\n", "x=1+gm*Re*Rl/(Re+Rl);\n", "Rb=R1*R2/(R1+R2)\n", "d=x*r;\n", "y=d*Rb/(d+Rb);\n", "t=y*Rs/(y+Rs);\n", "Tp=t*(C2+C1/x);\n", "printf('\ntime constant=%.2f ns\n',Tp)\n", "Tp=Tp*10^-3;//micro sec\n", "f=1/(2*%pi*Tp);\n", "printf('\n3dB frequency=%.f MHz\n',f)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 7.1: Determine_the_corner_frequencies_and_maximum_magnitude_asymptotes.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clear;\n", "clc;\n", "//Example 7.1\n", "Rs=1000;\n", "Rp=10000;\n", "Cs=1*10^-6;\n", "Cp=3*10^-12;\n", "Ts=(Rs+Rp)*Cs;\n", "printf('\ntime constant=%.3f s\n',Ts)\n", "f=1/(2*%pi*Ts);\n", "printf('\ncorner frequency=%.2f Hz\n',f)\n", "x=20*log10(Rp/(Rp+Rs));\n", "printf('\nmaximum magnitude =%.3fdB\n',x)\n", "Rp=10;//KOhm\n", "Rs=1;//Kohm\n", "Cp=3;//pF\n", "Tp=Cp*Rs*Rp/(Rs+Rp);\n", "printf('\ntime constant=%.3f ns\n',Tp)\n", "Tp=2.73*10^-3;//micro sec\n", "f=1/(2*%pi*Tp);\n", "printf('\ncorner frequency =%.2fMHz\n',f)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 7.2: Determine_the_corner_frequencies_and_bandwidth.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clear;\n", "clc;\n", "//Example 7.2\n", "Rs=1000;\n", "Rp=10000;\n", "Cs=1*10^-6;\n", "Cp=3*10^-12;\n", "Ts=(Rs+Rp)*Cs;\n", "printf('\nopen circuit time constant=%.3f s\n',Ts)\n", "Rs=1;//KOhm\n", "Rp=10;//KOhm\n", "Cp=3;//pF\n", "Tp=Cp*Rs*Rp/(Rs+Rp);\n", "printf('\nshort circuit time constant=%.3f ns\n',Tp)\n", "fL=1/(2*%pi*Ts);\n", "printf('\ncorner frequency fL=%.2f Hz\n',fL)\n", "Tp=2.73*10^-3;//microsec\n", "fH=1/(2*%pi*Tp);\n", "printf('\ncorner frequency fH=%.3f MHz\n',fH)\n", "fL=14.5*10^-6;//MHz\n", "fbw=fH-fL;\n", "printf('\nbandwidth =%.3fMHz\n',fbw)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 7.3: Determine_the_corner_frequencies_and_maximum_gain.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clear;\n", "clc;\n", "//Example 7.3\n", "R1=51.2;\n", "R2=9.6;\n", "Rc=2;\n", "Re=.4;\n", "Rsi=.1;\n", "Vt=0.026;\n", "Cc=1;\n", "Vcc=10;\n", "Vbe=0.7;\n", "b=100;\n", "Rb=8.08;\n", "Icq=1.81;\n", "gm=Icq/Vt;\n", "printf('\ntransconductance=%.3f mA/V\n',gm)\n", "r=b*Vt/Icq;\n", "printf('\ndiffusion resistance=%.2f KOhm\n',r)\n", "x=r+(1+b)*Re;\n", "y=x*R2/(x+R2);\n", "Ri=y*R1/(R1+y);\n", "printf('\ninput resistance=%.3f KOhm\n',Ri)\n", "Ts=(Rsi+Ri)*Cc;\n", "printf('\ntime constant=%.3f ms\',Ts)\n", "Ts=6.87*10^-3;//Sec\n", "fL=1/(2*%pi*Ts);\n", "printf('\ncorner frequency fL=%.3f Hz\n',fL)\n", "Rib=r+(1+b)*Re;\n", "printf('\nRib=%.3f KOhm\n',Rib)\n", "Av=(gm*r*Rc/(Rsi+Ri))*Rb/(Rb+Rib);\n", "printf('\nsmall signal voltage gain=%.2f\n',Av)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 7.4: Design_the_circuit.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clear;\n", "clc;\n", "//Example 7.4\n", "fL=20*10^-3;//KHz\n", "Rd=6.7;\n", "Rl=10;\n", "Ts=1/(2*%pi*fL);\n", "printf('\ntime constant=%.3f ms\n',Ts)\n", "Cc=Ts/(Rd+Rl);\n", "printf('\ncoupling capacitance=%.3f microF\n',Cc)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 7.5: Determine_3dB_frequency.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clear;\n", "clc;\n", "//Example 7.5\n", "b=100;\n", "Vbe=0.7;\n", "Rs=500;\n", "Rb=100000;\n", "Re=10000;\n", "Rl=10000;\n", "Va=120;\n", "Ccc2=1*10^-6;\n", "Icq=0.838*0.001;\n", "r=3100;//small signal parameter\n", "gm=32.2*0.001;\n", "ro=143000;\n", "x=(r+Rs*Rb/(Rs+Rb))/(1+b);\n", "y=ro*x/(ro+x);\n", "Ro=Re*y/(Re+y);\n", "printf('\noutput resistance of emitter=%.2f Ohm\n',Ro)\n", "Ts=(Ro+Rl)*Ccc2;\n", "printf('\ntime constant=%.2f s\n',Ts)\n", "fL=1/(2*%pi*Ts);\n", "printf('\n3dB frequency=%.2f Hz\n',fL)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 7.6: Determine_the_corner_frequencies_and_maximum_gain.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clear;\n", "clc;\n", "//Example 7.6\n", "Rs=3.2;\n", "Rd=10;\n", "Rl=20;\n", "Cl=10;\n", "Vtp=-2;\n", "Kp=0.25;\n", "Idq=0.5;\n", "Vsgq=3.41;\n", "Vsdq=3.41;\n", "gm=2*Kp*(Vsgq+Vtp);\n", "printf('\ntransconductance =%.3fmA/V\n',gm)\n", "Tp=Cl*Rd*Rl/(Rd+Rl);\n", "printf('\ntime constant=%.3f ns\n',Tp)\n", "Tp=66.7*10^-3;//micro sec\n", "fH=1/(2*%pi*Tp);\n", "printf('\ncorner frequency=%.2f MHz\n',fH)\n", "Av=(gm*Rd*Rl/(Rd+Rl))/(1+gm*Rs);\n", "printf('\nmaximum small signal voltage gain=%.2f\n',Av)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 7.7: Determine_the_mid_gain_corner_frequencies_and_bandwidth_of_a_circuit.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clear;\n", "clc;\n", "//Example 7.7\n", "Vbe=0.7;\n", "b=100;\n", "Re=.5;\n", "Rc=5;\n", "Rl=10;\n", "R1=40;\n", "Cc=10;\n", "R2=5.7;\n", "Rs=.1;\n", "Vt=0.026;\n", "Icq=0.99;\n", "gm=Icq/Vt;\n", "printf('\ntransconductance=%.3f mA/V\n',gm)\n", "r=b*Vt/Icq;\n", "printf('\ndiffusion resistance=%.2f KOhm\n',r)\n", "Ri=r+(1+b)*Re;\n", "printf('\ninput resistance=%.2f KOhm\n',Ri)\n", "x=Rc*Rl/(Rc+Rl);\n", "y=R1*R2/(R1+R2);\n", "t=y*Ri/(y+Ri);\n", "Av=gm*r*x*(y/(y+Ri))*(1/(Rs+t));\n", "printf('\nmaximum small signal voltage gain=%.2f\n',Av)\n", "Ts=(Rs+t)*Cc;\n", "printf('\ntime constant=%.3f ms\n',Ts)\n", "Ts=46.6*0.001;//sec\n", "Cl=15;\n", "Tp=x*Cl;\n", "printf('\ntime constant=%.3f ns\n',Tp)\n", "fL=1/(2*%pi*Ts);\n", "printf('\nlower corner frequency=%.2f Hz\n',fL)\n", "Tp=50*10^-3;//micro sec\n", "fH=1/(2*%pi*Tp);\n", "printf('\nupper corner frequency=%.2f MHz\n',fH)\n", "fL=3.4*10^-6;//MHz\n", "fbw=fH-fL;\n", "printf('\nbandwidth =%.2fMHz\n',fbw)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 7.8: Determine_the_corner_frequencies_and_limiting_horizontal_asymptotes.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clear;\n", "clc;\n", "//Example 7.8\n", "Re=4;\n", "Rc=2;\n", "Rs=0.5;\n", "Vt=0.026;\n", "Ce=1*10^-3;\n", "V1=5;\n", "Icq=1.06;\n", "V2=-5;\n", "b=100;\n", "Vbe=0.7;\n", "gm=Icq/Vt;\n", "printf('\ntransconductance =%.2fmA/V\n',gm)\n", "r=b*Vt/Icq;\n", "printf('\ndiffusion resistance=%.2f KOhm\n',r)\n", "Ta=Re*Ce;\n", "printf('\ntime constant Ta=%ef s\n',Ta)\n", "Tb=(Re*Ce*(Rs+r))/(Rs+r+(1+b)*Re);\n", "printf('\ntime constant Tb=%e s\n',Tb)\n", "fA=1/(2*%pi*Ta);\n", "printf('\ncorner frequency =%.2fHz\n',fA)\n", "Tb=2.9*0.01;//msec\n", "fB=1/(2*%pi*Tb);\n", "printf('\ncorner frequency =%.2fkHz\n',fB)\n", "Av=(gm*r*Rc)/(Rs+r+(1+b)*Re);\n", "printf('\nlimiting low frequency horizontal asymptote=%.2f\n',Av)\n", "Av=gm*r*Rc/(Rs+r);\n", "printf('\nnlimiting high frequency horizontal asymptote=%.2f\n',Av)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 7.9: Determine_3dB_frequency.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clear;\n", "clc;\n", "//Example 7.9\n", "r=2600;\n", "C1=2*10^-6;\n", "C2=0.1*10^-6;\n", "fB=1/(2*%pi*r*(C1+C2));\n", "printf('\n3dB frequency=%.2f MHz\n',fB)" ] } ], "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 }