diff options
Diffstat (limited to 'Solid_State_Electronics_by_J_P_Agrawal/4-Small_signal_amplifiers.ipynb')
-rw-r--r-- | Solid_State_Electronics_by_J_P_Agrawal/4-Small_signal_amplifiers.ipynb | 741 |
1 files changed, 741 insertions, 0 deletions
diff --git a/Solid_State_Electronics_by_J_P_Agrawal/4-Small_signal_amplifiers.ipynb b/Solid_State_Electronics_by_J_P_Agrawal/4-Small_signal_amplifiers.ipynb new file mode 100644 index 0000000..ab2029e --- /dev/null +++ b/Solid_State_Electronics_by_J_P_Agrawal/4-Small_signal_amplifiers.ipynb @@ -0,0 +1,741 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 4: Small signal amplifiers" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.10: maximum_collector_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 4.10: \n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"format('v',6)\n", +"Bv=12;//battery voltage in V\n", +"P=2;// power in Watt\n", +"Ic=(P/Bv)*10^3;\n", +"disp(Ic,'The maximum collector current,Ic(mA) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.11: gai.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 4.11: \n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"del_ic=1;// in mA\n", +"del_ib=10;// in micro-A\n", +"del_Vbe=0.02;// in V\n", +"del_ib=10*10^-6;// in A\n", +"Rc=2;// in k-ohm\n", +"Rl=10;// in k-ohm\n", +"Beta=del_ic/(del_ib*10^3);//\n", +"format('v',5)\n", +"disp(Beta,'Current gain,Beta = ')\n", +"Ri=(del_Vbe/del_ib)*10^-3;\n", +"format('v',4)\n", +"disp(Ri,'Input impedence,Ri(k-ohm) = ')\n", +"Rac=Rc*Rl/(Rc+Rl);\n", +"format('v',5)\n", +"disp(Rac,'Effective load,Rac(k-ohm) = ')\n", +"Av=round(Beta*Rac/Ri);\n", +"format('v',4)\n", +"disp(Av,'Voltage gain,Av = ')\n", +"Ap=Beta*Av;\n", +"format('v',6)\n", +"disp(Ap,'power gain,Ap = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.12: output_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 4.12: \n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"Rc=10;// in k-ohm\n", +"Rl=10;// in k-ohm\n", +"Beta=100;\n", +"Ri=2.5;\n", +"Iv=2;// input voltage in mV\n", +"Rac=Rc*Rl/(Rc+Rl);\n", +"Av=round(Beta*Rac/Ri);\n", +"Ov=Av*Iv*10^-3;\n", +"format('v',4)\n", +"disp(Ov,'Output voltage,(V) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.13: gain_and_resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 4.13: \n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"format('v',5)\n", +"I=1;\n", +"hfe=46;\n", +"hoe=80*10^-6;// in mho\n", +"hre=5.4*10^-4;\n", +"hie=800;// in ohm\n", +"RL=5*10^3;// in ohm\n", +"Aie=hfe/(I+(hoe*RL));\n", +"Zie=hie-(hre*RL*Aie);\n", +"Ave=(Aie*RL)/Zie;\n", +"Rg=500;// in ohm\n", +"Zoe=((hie+Rg)/(hoe*(hie+Rg)-(hfe*hre)))/10^3;\n", +"Ape=Aie*Ave;\n", +"disp(Aie,'Current gain,Aie = ')\n", +"format('v',6)\n", +"disp(Zie,'Input resistance,Zie(ohm) = ')\n", +"disp(Ave,'Voltage gain,Ave = ')\n", +"format('v',5)\n", +"disp(Zoe,'Output resistance,Zoe(k-ohm) = ')\n", +"format('v',7)\n", +"disp(Ape,'Power gain,Ape = ')\n", +"//voltage gain and power gain are calculated wrong in the textbook" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.14: gain_and_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 4.14: \n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"A=100;//gain without feedback\n", +"Beta=1/25;//feed back ratio\n", +"Af=(A/(1+(Beta*A)));//gain with feedback\n", +"disp(Af,'(i) gain with feedback is ,=')\n", +"ff=Beta*A;//feedback factor\n", +"disp(ff,'feedback factor is,=')\n", +"vi=50;//mV\n", +"Vo=Af*vi*10^-3;//in V\n", +"disp(Vo,'output voltage is ,(V)=')\n", +"fv=Beta*Vo;//in V\n", +"format('v',5)\n", +"disp(fv,'feedback voltage is ,(V)=')\n", +"vin=vi*(1+Beta*A);//mV\n", +"disp(vin,'new increased input voltage is ,(mV)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.15: voltage_gai.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 4.15: \n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"A=1000;//gain without feedback\n", +"fctr=0.40;//gain reduction factor\n", +"Af=A-fctr*A;//gain with feedback\n", +"Beta=((A/Af)-1)/A;//feed back ratio\n", +"A2=800 ;//redued gain\n", +"Af2=((A2)/(1+(Beta*A2)));//\n", +"format('v',6)\n", +"disp(Af2,'(i) voltage gain is ,=')\n", +"prfb= ((A-A2)/A)*100;//percentage reduction without feedback\n", +"format('v',4)\n", +"disp(prfb,'(ii) percentage reduction without feedback is,(%)=')\n", +"prwfb= ((Af-Af2)/Af)*100;//percentage reduction without feedback\n", +"format('v',6)\n", +"disp(prwfb,'percentage reduction with feedback is,(%)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.16: small_change_in_gain.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 4.16: \n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"A=200;//gain without feedback\n", +"Beta=0.25;//feed back ratio\n", +"gc=10;//percent gain change\n", +"dA=gc/100;//\n", +"dAf= ((1/(1+Beta*A)))*dA;//\n", +"format('v',7)\n", +"disp(dAf,'small change in gain is,=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.17: input_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 4.17: \n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"format('v',5)\n", +"A=200;//gain without feedback\n", +"Beta=0.05;//feed back ratio\n", +"Af=(A/(1+(Beta*A)));//gain with feedback\n", +"disp(Af,' gain with negative feedback is ,=')\n", +"Dn=10;//percentage distortion\n", +"format('v',6)\n", +"Dn1=(Dn/(1+A*Beta));//percentage Distortion with negative feedback\n", +"ff=Beta*A;//feedback factor\n", +"vo=0.5;//initial output voltage\n", +"vi=A*vo;//in V\n", +"vin=vi/Af;//in V\n", +"disp(Dn1,'percentage Distortion with negative feedback is ,(%)=')\n", +"disp(vin,'new input voltage is ,(V)=')\n", +"//gain and input voltage are calculated wrong in the textbook " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.18: percentage_of_feedback.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 4.18: \n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"format('v',5)\n", +"A=50;//gain without feedback\n", +"Af=10;//gain with feedback\n", +"Beta=(((A/Af)-1)/A)*100;//feed back ratio\n", +"disp(Beta,' percentage of feedback is ,(%)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.19: band_width.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 4.19: \n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"format('v',5)\n", +"Bw=200;//bandwidth in kHz\n", +"vg=40;//dB\n", +"fb=5;//percentage negetive feedback\n", +"A=40;//gain without feedback\n", +"Beta=fb/100;//feed back ratio\n", +"Af=(A/(1+(Beta*A)));//gain with feedback\n", +"Bwf= (A*Bw)/Af;//Bandwidth with feedback\n", +"disp(Bwf,' new band-width is ,(kHz)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.1: voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 4.1: \n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"format('v',6)\n", +"Rc=4.7;// in ohm\n", +"Vcc=24;// in V\n", +"Ic=1.5;//in mA\n", +"//this is given as 15 mA in textbook which is wrong\n", +"Vce=Vcc-(Ic*Rc*10^-3*10^3);//in V\n", +"disp(Vce,'(i) Collector to emitter voltage,Vce(V) = ')\n", +"Ic1=0;//in A\n", +"Vce1=Vcc-Ic1*Rc;//in V\n", +"format('v',4)\n", +"disp(Vce1,'(ii) Collector to emitter voltage,Vce(V) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.20: percentage_reduction.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 4.20: \n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"format('v',5)\n", +"A=50;//gain without feedback\n", +"Af=25;//gain with feedback\n", +"Beta=(((A/Af)-1)/A);//feed back ratio\n", +"Ad=40;//new gain after ageing\n", +"Af1=(Ad/(1+(Beta*Ad)));//new gain with feedback\n", +"df=Af-Af1;// reduction in gain\n", +"pdf= (df/Af)*100;//percentage reduction in gain\n", +"disp(pdf,' percentage reduction in gain is ,(%)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.21: Av_and_beta.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 4.21: \n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"format('v',5)\n", +"Af=100;//gain with feeback\n", +"vi=50;//in mV\n", +"vi1=60;//in mV\n", +"AAf=vi1/vi;//\n", +"A=AAf*Af;//\n", +"Beta=(((A/Af)-1)/A);//feed back ratio\n", +"disp(A,'Av is ,=')\n", +"format('v',8)\n", +"disp(Beta,' feedback factor is,=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.2: vce.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 4.2: \n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"Beta=100;\n", +"Rb=200*10^3;// in ohm\n", +"Rc=1*10^3;// in ohm\n", +"Vcc=10;// in V\n", +"Ib=Vcc/Rb;// in A\n", +"Ic=Beta*Ib;//in A\n", +"Vce=Vcc-(Ic*Rc);\n", +"format('v',4)\n", +"disp(Vce,'Collector to emitter voltage,Vce(V) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.3: base_resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 4.3: \n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"format('v',6)\n", +"Vcc=20;// in V\n", +"Vbe=0.7;// in V\n", +"Rc=2;//in kilo-ohm\n", +"Icsat= Vcc/Rc;//in mA\n", +"Beta=200;//\n", +"Ib=(Icsat/Beta)*10^3;//in micro-A\n", +"Rb=((Vcc-Vbe)/(Ib))*10^3;//in kilo-ohm\n", +"disp('Rb < '+string(Rb)+' kilo-ohm')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.4: operating_point.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 4.4: \n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"Vcc=15;// in V\n", +"Rb=200;// in k-ohm\n", +"Rc=2;// in k-ohm\n", +"Beta=50;\n", +"Ib=(Vcc/(Rb*10^3+(Beta*Rc*10^3)))*10^6;//in micro-A\n", +"Ic=Beta*Ib*10^-3;//in mA\n", +"Vce=Vcc-(Ic*10^-3*(Rc*10^3));\n", +"format('v',4)\n", +"disp(Ic,'collector current,Ic(mA) = ')\n", +"disp(Vce,'Collector to emitter voltage,Vce(V) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.5: resistor.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 4.5: \n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"Vcc=15;// in V\n", +"Vce=6;// in V\n", +"Rc=3*10^3;// in ohm\n", +"Beta=50;\n", +"Ic=(Vcc-Vce)/Rc;\n", +"Ib=Ic/Beta;\n", +"Rb=((Vcc/Ib)-(Beta*Rc))*10^-3;\n", +"format('v',5)\n", +"disp(Rb,'The value of resistoe,Rb(k-ohm) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.6: operating_point.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 4.6: \n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"Vcc=12;// in V\n", +"Rb1=70;// in k-ohm\n", +"Rb2=70;// in k-ohm\n", +"Beta=50;\n", +"Rc=2;// in k-ohm\n", +"Ib=Vcc/((Rb1+Rb2+(Beta*Rc))*10^3);\n", +"Ic=Beta*Ib*10^3;\n", +"Vce=Vcc-(Ic*Rc);\n", +"format('v',4)\n", +"disp(Ic,'collector current,Ic(mA) = ')\n", +"disp(Vce,'Collector to emitter voltage,Vce(V) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.7: operating_point.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 4.7: \n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"Vcc=9;// in V\n", +"Rb=50;// in k-ohm\n", +"Rc=250;// in ohm\n", +"Re=500;// in ohm\n", +"Beta=80;\n", +"Ib=Vcc/(Rb*10^3+(Beta*Re));\n", +"Ic=Beta*Ib*10^3;\n", +"Vce=Vcc-(Ic*10^-3*(Rc+Re));\n", +"format('v',3)\n", +"disp(Ic,'collector current,Ic(mA) = ')\n", +"disp(Vce,'Collector to emitter voltage,Vce(V) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.8: operating_point.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 4.8: \n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"R2=4;// in k-ohm\n", +"R1=40;// in k-ohm\n", +"Vcc=22;// in V\n", +"Rc=10;// in k-ohm\n", +"Re=1.5;// in k-ohm\n", +"Vbe=0.5;// in V\n", +"Voc=R2*10^3*Vcc/((R1+R2)*10^3);\n", +"Ic=(Voc-Vbe)/(Re*10^3);\n", +"Vce=Vcc-(Rc+Re)*Ic*10^3;\n", +"format('v',5)\n", +"disp(Vce,'Collector to emitter voltage,Vce(V) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.9: maximum_collector_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 4.9: \n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"Bv=12;//battery voltage in V\n", +"Cl=6;//collector load in k-ohm\n", +"CC=Bv/Cl;\n", +"format('v',4)\n", +"disp(CC,'Collector current,(mA) = ')" + ] + } +], +"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 +} |