diff options
Diffstat (limited to 'Fundamentals_of_Electronic_Devices_and_Circuits_by_J_B_Gupta')
10 files changed, 4829 insertions, 0 deletions
diff --git a/Fundamentals_of_Electronic_Devices_and_Circuits_by_J_B_Gupta/1-Crystal_Structure_Of_Materials.ipynb b/Fundamentals_of_Electronic_Devices_and_Circuits_by_J_B_Gupta/1-Crystal_Structure_Of_Materials.ipynb new file mode 100644 index 0000000..df747bf --- /dev/null +++ b/Fundamentals_of_Electronic_Devices_and_Circuits_by_J_B_Gupta/1-Crystal_Structure_Of_Materials.ipynb @@ -0,0 +1,709 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 1: Crystal Structure Of Materials" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.10: Density_of_free_electrons.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 1.10\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',10)\n", +"// Given data\n", +"rho_i = 0.47;// in ohm-m\n", +"sigma_i = 1/rho_i;// in S/m\n", +"miu_e = 0.39;// in m^2/V-s\n", +"miu_h = 0.19;// in m^2/V-s\n", +"e = 1.6*10^-19;// in C\n", +"//sigma_i = n_i*e*(miu_e+miu_h);\n", +"n_i = sigma_i/( e*(miu_e+miu_h) );// in /m^3\n", +"disp(n_i,'The density of electrons per m^3 is');\n", +"E = 10^4;\n", +"v_n = miu_e*E;// in m/s\n", +"disp(v_n,'The drift velocity for electrons in m/s is');\n", +"v_h = miu_h*E;// in m/s\n", +"disp(v_h,'The drift velocity for holes in m/s is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.11: Mobility_of_electrons_and_holes.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 1.11\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',10)\n", +"// Given data\n", +"rho = 3000;// in ohm-m\n", +"n = 1.1*10^6;// in /m^3\n", +"e = 1.6*10^-19;// in C\n", +"//miu_e = 3*miu_h (i)\n", +"// miu_e+miu_h = 1/(rho*e*n) (ii)\n", +"// From eq (i) and (ii)\n", +"miu_h = (1/(rho*e*n))/4;// in m^2/V-s\n", +"disp(miu_h,'The holes mobility in m^2/V-s is');\n", +"miu_e = 3*miu_h;// in m^2/V-s\n", +"disp(miu_e,'The electron mobility in m^2/V-s is');\n", +"\n", +"// Note: The calculated value of hole mobility is wrong ." + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.12: Conductivity_of_intrinsic_Ge.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 1.12\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',7)\n", +"// Given data\n", +"n_i = 2.5*10^13;// in /cm^3\n", +"miu_e = 3800;//in cm^2/V-s\n", +"miu_h = 1800;// in m^2/V-s\n", +"e = 1.6*10^-19;// in C\n", +"sigma_i = n_i*e*(miu_e+miu_h);// in (ohm-cm)^-1\n", +"disp(sigma_i,'The intrinsic conductivity in (ohm-cm)^-1 is');\n", +"n = 4.4*10^22;\n", +"impurity = 10^-7;\n", +"N_D = n*impurity;// in /cm^3\n", +"n = N_D;// in /cm^3\n", +"p = (n_i^2)/N_D;// in holes/cm^3\n", +"sigma_n = e*N_D*miu_e;// in (ohm-cm)^-1\n", +"disp(sigma_n,'The conductivity in N-type Ge semiconductor in (ohm-cm)^-1 is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.13: Electron_and_hole_drift_velocity.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 1.13\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',9)\n", +"// Given data\n", +"e = 1.6*10^-19;// in C\n", +"miu_e = 0.38;// in m^2/V-s\n", +"miu_h = 0.18;// in m^2/V-s\n", +"V = 10;// in V\n", +"l = 25;// in mm\n", +"l = l * 10^-3;// in m\n", +"w = 4;// in mm\n", +"w = w * 10^-3;// in m\n", +"t= 1.5*10^-3;// in m\n", +"E = V/l;// in V/m\n", +"v_e = miu_e*E;// in m/s\n", +"disp(v_e,'The electron drift velocity in m/s is');\n", +"v_h = miu_h*E;// in m/s\n", +"disp(v_h,'The hole drift velocity in m/s is');\n", +"n_i = 2.5*10^19;// in /m^2\n", +"sigma_i = n_i*e*(miu_e+miu_h);// in (ohm-cm)^-1\n", +"disp(sigma_i,'The interinsic conductivity of Ge in (ohm-cm)^-1 is');\n", +"A = w*t;// in m^2\n", +"I = sigma_i*E*A;// in A\n", +"I = I * 10^3;// in mA\n", +"disp(I,'The total current in mA is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.14: Ratio_of_electron_to_hole.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 1.14\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',7)\n", +"// Given data\n", +"I_electrons = 3/4;\n", +"I_holes= 1/4;\n", +"v_h = 1;\n", +"v_e = 3;\n", +"ratio = (I_electrons/I_holes)*(v_h/v_e);\n", +"disp(ratio,'Ratio of electrons to holes is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.15: Diffusion_coefficients_of_electrons.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 1.15\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6)\n", +"// Given data\n", +"miu_e = 0.17;// in m^2/V-s\n", +"miu_h = 0.025;// in m^2/V-s\n", +"e = 1.602*10^-19;// in C\n", +"T = 27;// in degree C\n", +"T = T + 273;// in K\n", +"kdas = 1.38*10^-23;// in J/K\n", +"De = miu_e*( (kdas*T)/e );// in m^-2/s\n", +"De = De * 10^4;// in cm^2/s\n", +"disp(De,'The diffusion coefficients of electrons in cm^2/s');\n", +"Dh = miu_h*( (kdas*T)/e );// in m^2/s\n", +"Dh = Dh * 10^4;// in cm^2/s\n", +"disp(Dh,'The diffusion coefficients of holes in cm^2/s');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.16: Intrinsic_carrier_concentration_in_Si.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 1.16\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',9)\n", +"// Given data\n", +"N = 3*10^25;// in /m^3\n", +"e = 1.602*10^-19;// in C\n", +"E_G = 1.1;// in eV\n", +"E_G = E_G*e;// in J\n", +"kdas = 1.38*10^-23;// in J/K\n", +"T = 300;// in K\n", +"miu_e = 0.14;// in m^2/V-s\n", +"miu_h = 0.05;// in m^2/V-s\n", +"n_i = N*(%e^((-E_G)/(2*kdas*T)));// in /m^3\n", +"disp(n_i,'The interinsic carrier concentration in /m^3 is');\n", +"sigma = n_i*e*(miu_e+miu_h);// in S/m\n", +"disp(sigma,'The conductivity of silicon in S/m is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.17: Mobility_of_electrons.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 1.17\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',7)\n", +"// Given data\n", +"Je = 360;// in A/cm^2\n", +"T = 300;// in K\n", +"d = 1.5;// in mm\n", +"d = d * 10^-1;// in cm\n", +"e = 1.6*10^-19;// in C\n", +"del = 2*10^18-5*10^17;// assumed\n", +"dnBYdx = del/d;\n", +"De = Je/(e*dnBYdx);// in cm^2/s\n", +"V_T = T/11600;\n", +"miu_e = De/V_T;// in cm^2/V-s\n", +"disp(miu_e,'The mobility of electrons in cm^2/V-s is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.18: New_position_of_Fermi_Level.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 1.18\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',7)\n", +"// Given data\n", +"E_CminusE_F = 0.24;// in eV\n", +"T = 300;// in K\n", +"T1 = 350;// in K\n", +"// E_CminusE_F = K*T*log(n_c/N_D) (i)\n", +"// E_CminusE_F1 =K*T1*log(n_C/N_D) (ii)\n", +"// From eq(i) and (ii)\n", +"E_CminusE_F1 = E_CminusE_F*(T1/T);// in eV\n", +"disp('The new position of the Fermi level lies '+string(E_CminusE_F1)+' eV below the conduction band')\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.19: New_position_of_Fermi_Level.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 1.19\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',5)\n", +"// Given data\n", +"E_FminusE_V = 0.39;// in eV\n", +"kT = 0.026;// in ev\n", +"//N_A1 = n_V * (%e^(-E_FminusE_V)/kT) (i)\n", +"// N_A2=3*N_A1=n_V * (%e^(-E_F2minusE_V)/kT) (ii)\n", +"//From eq(i) and (ii)\n", +"E_F2minusE_V = kT*(15-log(3));// in eV\n", +"disp(E_F2minusE_V,'The new position of fermi level in eV is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.1: Fraction_of_the_total_number_of_electrons.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 1.1\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',9);\n", +"// Given data\n", +"E_G = 0.72;// in eV\n", +"E_F = (1/2)*E_G;// in eV\n", +"k = 8.61*10^-5;// in eV/K\n", +"T = 300;// in K \n", +"// The fraction of the total number of electrons \n", +"n_C_by_n = 1/( 1 + (%e^((E_G-E_F)/(k*T))) );\n", +"disp(n_C_by_n,'The fraction of the total number of electrons is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.2: Ratio_of_electron_to_hole_concentration.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 1.2\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',7)\n", +"// Given data\n", +"n_i = 1.4*10^18;// in /m^3\n", +"N_D = 1.4*10^24;// in /m^3\n", +"n = N_D;// in /m^3\n", +"p = (n_i^2)/n;// in /m^3\n", +"// Ratio of electron to hole concentation,\n", +"ratio = n/p;\n", +"disp(ratio,'Ratio of electron to hole concentration is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.3: Resistivity_of_conductor.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 1.3\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',10)\n", +"// Given data\n", +"e = 1.6*10^-19;// in C\n", +"m = 9.1*10^-31;// in kg\n", +"miu_e = 7.04 * 10^-3;// in m^2/V-s\n", +"n = 5.8*10^28;// in /m^3\n", +"torque = (miu_e/e)*m;// in sec\n", +"disp(torque,'The relaxation time in sec is');\n", +"sigma = n*e*miu_e;\n", +"rho = 1/sigma ;// in ohm-m\n", +"disp(rho,'The resistivity of conductor in ohm-m is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.4: Relaxation_time_of_conducting_electorns.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 1.4\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',10)\n", +"// Given data\n", +"e = 1.601*10^-19;// in C\n", +"m = 9.107 * 10^-31;// in kg\n", +"E = 100;// in V/m\n", +"n = 6*10^28;// in /m^3\n", +"rho = 1.5*10^-8;// in ohm-m\n", +"sigma = 1/rho;\n", +"torque = (sigma*m)/(n*(e^2));// in second\n", +"disp(torque,'The relaxation time in second is');\n", +"format('v',6)\n", +"v = ((e*E)/m)*torque;// in m/s\n", +"disp(v,'The drift velocity in m/s is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.5: Charge_density_of_free_electrons.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 1.5\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',10)\n", +"// Given data\n", +"d = 2;// in mm\n", +"d = d * 10^-3;// in m\n", +"sigma = 5.8*10^7;// in S/m\n", +"miu_e = 0.0032;// in m^2/V-s\n", +"E = 20;// in mV/m;\n", +"E = E * 10^-3;// in V/m\n", +"e = 1.6*10^-19;// in C\n", +"n = sigma/(e*miu_e);// in /m^3\n", +"disp(n,'The charge density of free electrons in /m^3 is');\n", +"J = sigma*E;// in A/m^2\n", +"disp(J,'The current density in A/m^2 is');\n", +"format('v',6)\n", +"I = J * ( (%pi*(d^2))/4 );// in A\n", +"disp(I,'The current flowing in the wire in A is');\n", +"format('v',9)\n", +"v = miu_e*E;// in m/s\n", +"disp(v,'The electron drift velocity in m/s is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.6: Dopant_density.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 1.6\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',9)\n", +"// Given data\n", +"l = 1;// in cm\n", +"l = l * 10^-2;// in m\n", +"A = 1;// in mm^2\n", +"A = A * 10^-6;// in m^2\n", +"R = 100;// in ohm\n", +"rho = (R*A)/l;// in ohm-m\n", +"sigma = 1/rho;\n", +"e = 1.6*10^-19;// in C\n", +"miu_e = 1350;// in cm^2/V-s\n", +"miu_e = miu_e * 10^-4;// in m^2/V-s\n", +"n = sigma/(e*miu_e);// in /m^3\n", +"disp(n,'The dopant density in /m^3');\n", +"\n", +"// Note: The unit of the answer is wrong because 0.0463*10^23/m^3 = 4.63*10^21/m^3, not in /cm^3" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.7: Concentration_of_acceptor_atoms_required.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 1.7\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',9)\n", +"// Given data\n", +"R = 1;// in k ohm\n", +"R = R * 10^3;// in ohm\n", +"L = 400;// in µm\n", +"L = L * 10^-6;// in m\n", +"W = 20;// in µm\n", +"W = W * 10^-6;// in m\n", +"a = L*W;// in m^2\n", +"l = 4;// in mm\n", +"l = l * 10^-3;// in m\n", +"rho_i = (R*a)/l;// in ohm-m\n", +"sigma_i = 1/rho_i;// in S/m\n", +"e = 1.6*10^-19;// in C\n", +"miu_h = 480;// in cm^2/V-s\n", +"miu_h = miu_h * 10^-4;// in m^2/V-s\n", +"// sigma_i = p*e*miu_h;\n", +"p = sigma_i/(e*miu_h);// in /m^3\n", +"disp(p,'The concentration of acceptor atom in /m^3 is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.8: Drift_velocity.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 1.8\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',8)\n", +"// Given data\n", +"rho = 0.5;// in ohm-m\n", +"J = 100;// in A/m^2\n", +"miu_e = 0.4;// in m^2/V-s\n", +"e = 1.6*10^-19;// in C\n", +"sigma = 1/rho;\n", +"E = J/sigma;\n", +"v = miu_e*E;// in m/s\n", +"disp(v,'The drift velocity in m/s is');\n", +"D = 10;// distance of travel in µm\n", +"D = D * 10^-6;// in m\n", +"// Time taken by electron\n", +"t= D/v;// time taken in second \n", +"disp(t,'The time taken in second is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.9: Electron_and_hole_densities.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 1.9\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',9)\n", +"// Given data\n", +"rho = 0.039;// in ohm-cm\n", +"sigma_n = 1/rho;// in mho/cm\n", +"miu_e = 3600;// in cm^2/V-s\n", +"e = 1.602*10^-19;// in C\n", +"// sigma_n = n*e*miu_e = N_D*e*miu_e;\n", +"N_D = sigma_n/(e*miu_e);// in /cm^3\n", +"n = N_D;// in /cm^3\n", +"disp(n,'The electrons density per cm^3 is');\n", +"n_i = 2.5*10^13;// in /cm^3\n", +"p = (n_i^2)/n;// in /cm^3\n", +"disp(p,'The hole density per cm^3 is');" + ] + } +], +"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 +} diff --git a/Fundamentals_of_Electronic_Devices_and_Circuits_by_J_B_Gupta/10-Multivibrators.ipynb b/Fundamentals_of_Electronic_Devices_and_Circuits_by_J_B_Gupta/10-Multivibrators.ipynb new file mode 100644 index 0000000..26560f5 --- /dev/null +++ b/Fundamentals_of_Electronic_Devices_and_Circuits_by_J_B_Gupta/10-Multivibrators.ipynb @@ -0,0 +1,292 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 10: Multivibrators" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.1: Time_period_and_frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 10.1\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',5)\n", +"// Given data\n", +"R2 = 5;// in k ohm\n", +"R2 = R2 * 10^3;// in ohm\n", +"R1 = R2;// in ohm\n", +"R_B = R2;// in ohm\n", +"R4 = 0.4;// in k ohm\n", +"R4 = R4 * 10^3;// in ohm\n", +"R3 = R4;// in ohm\n", +"R_C = R4;// in ohm\n", +"C2 = 0.02;// in µF\n", +"C2 = C2 * 10^-6;// in F\n", +"C1 = C2;// in F\n", +"C = C2;// in F\n", +"T = 1.386*R_B*C;// in sec\n", +"T= T*10^3;// in ms\n", +"disp(T,'The time period in ms is');\n", +"f = 1/T;// in kHz\n", +"disp(f,'The frequency of circuit oscillation in kHz is');\n", +"Beta_min = R_B/R_C;//minimum value of transistor ß \n", +"disp(Beta_min,'The minimum value of transistor ß is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.2: Astable_multivibrator.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 10.2\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6)\n", +"// Given data\n", +"V_CC = 20;// in V\n", +"V_BB = 20;// in V\n", +"R_C2 = 1;// in k ohm\n", +"R_C2 = R_C2 * 10^3;// in ohm\n", +"R_C1 = R_C2;// in ohm\n", +"f = 500;// in Hz\n", +"h_fe = 50;// unit less\n", +"PW = 0.2;// in ms\n", +"PW = PW*10^-3;// in sec\n", +"V_CEsat = 0.3;// in V\n", +"V_BEsat = 0.7;// in V\n", +"I_CEsat= (V_CC-V_CEsat)/R_C1;// in A\n", +"I_Bmin= I_CEsat/h_fe;// in A\n", +"I_B= 1.5*I_Bmin;// in A\n", +"R= (V_BB-V_BEsat)/I_B;// in ohm\n", +"R= floor(R*10^-3);// in k ohm\n", +"R1=R;// in k ohm\n", +"R2= R1;// in k ohm\n", +"T= 1/f;// in sec\n", +"D_cycle= PW/T;\n", +"T2= D_cycle*T;//sec\n", +"T1= T-T2;// in sec\n", +"C1= T1/(0.693*R2);// in mF\n", +"C1= C1*10^3;// in µF\n", +"C2= T2/(0.693*R1);// in mF\n", +"C2= C2*10^3;// in µF\n", +"disp(R1,'The value of R1 in k ohm is : ')\n", +"disp(R2,'The value of R2 in k ohm is : ')\n", +"disp(C1,'The value of C1 in µF is : ')\n", +"disp(C2,'The value of C2 in µF is : ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.3: Check_up_the_saturation_of_the_transistor.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 10.3\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',7)\n", +"// Given data\n", +"V_CC = 12;// in V\n", +"R_B = 20;// in k ohm\n", +"R_B = R_B * 10^3;// in ohm\n", +"R_C = 2;// in k ohm\n", +"R_C = R_C * 10^3;// in ohm'\n", +"C = 0.1;// in µF\n", +"C = C * 10^-6;// in F\n", +"V_CEsat = 0.2;// in V\n", +"V_BEsat = 0.8;// in V\n", +"Beta = 50;// unit less\n", +"T =R_B*C*log( (2*V_CC-V_BEsat)/(V_CC-V_BEsat) );// in S\n", +"disp(T*10^3,'The input pulse in ms is');\n", +"I_Csat = (V_CC-V_CEsat)/R_C;// in A\n", +"I_Csat = I_Csat * 10^3;// in mA\n", +"// Beta = h_fe;\n", +"I_Bmin = I_Csat/Beta;// in mA\n", +"I_B = (V_CC-V_BEsat)/R_B;// in A\n", +"I_B = I_B * 10^3;// in mA\n", +"if I_B>I_Bmin then\n", +" disp('The value of I_B ('+string(I_B)+' mA) is greater than the value of I_Bmin ('+string(I_Bmin)+' mA).');\n", +" disp('Hence the transistor in saturaion ')\n", +"end" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.4: Component_value_of_monostable_mutivibrator.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 10.4\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6)\n", +"// Given data\n", +"T= 500*10^-6;// in sec\n", +"h_femin = 25;// unit less\n", +"I_CEsat = 5;// in mA\n", +"I_CEsat = I_CEsat * 10^-3;// in A\n", +"V_CC = 10;// in V\n", +"V_BB = 4;// in V\n", +"V_CEsat = 0.4;// in V\n", +"V_BEsat = 0.8;// in V\n", +"V_BEoff = -1;// in V\n", +"R_C2 = (V_CC-V_CEsat)/I_CEsat;// in ohm\n", +"R_C1= R_C2;// in ohm\n", +"disp(R_C1*10^-3,'The value of R_C1 in k ohm is');\n", +"disp(R_C2*10^-3,'The value of R_C2 in k ohm is');\n", +"I_B2min = I_CEsat/h_femin;// in A\n", +"I_B2actual = 1.5*I_B2min;// in A\n", +"R = (V_CC-V_BEsat)/(I_B2actual);// in ohm\n", +"disp(R*10^-3,'The value of R in k ohm is');\n", +"C= T/(0.693*R);// in F\n", +"disp(C*10^6,'The value of C in µF is : ')\n", +"R1= poly(0,'R1');\n", +"R2= 2.143*R1;// in ohm\n", +"// I_B1actual= (V_CC-V_BE1sat)/(R_C+R1) - (V_BE1sat+V_BB)/R2 and R2= 2.143*R1 so\n", +"R1= I_B2actual*R2*(R1+R_C1)-V_CC*R2+V_BEsat*R2+R1*V_BEsat+R1*V_BB+R_C1*V_BEsat+R_C1*V_BB;\n", +"R1= roots(R1);// in ohm\n", +"R1= R1(1);// in ohm\n", +"R1= R1*10^-3;// in kohm\n", +"R2= 2.143*R1;// in k ohm\n", +"disp(R1,'The value of R1 in kΩ is : ')\n", +"disp(R2,'The value of R2 in kΩ is : ')\n", +"R1= R1*10^3;// in ohm\n", +"R1C1= 1*10^-6;// in F\n", +"C1= R1C1/R1;// in F\n", +"C1= C1*10^12;// in pF\n", +"disp(C1,'The value of C1 in pF is : ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.5: Stable_current_and_voltages.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 10.5\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',5)\n", +"// Given data\n", +"V_CC = 10;// in V\n", +"V_BB = -10;// in V\n", +"R_C2 = 1.2* 10^3;// in ohm\n", +"R_C1 = R_C2;// in ohm\n", +"R_B1 = 39 * 10^3;// in ohm\n", +"R_B2 = R_B1;// in ohm\n", +"R2 = 10* 10^3;// in ohm\n", +"R1 = R2;// in ohm\n", +"h_fe = 30;// unit less\n", +"V_CE2sat = 0;// in V\n", +"I1 = (V_CC-V_CE2sat)/R_C2;// in A\n", +"I2 = (V_CE2sat-V_BB)/(R1+R_B2);// in A\n", +"I_C2 = I1-I2;// in A\n", +"I_B2min = I_C2/h_fe;// in A\n", +"V_C2 = 0;// in V\n", +"V_B1 = V_C2 - (I2*R1);// in V\n", +"V_B2 = 0;// in V\n", +"V_C1 = 10;// in V\n", +"I3 = (V_CC-V_C1)/R_C1;// in A\n", +"V_BE2sat = 0;// in V\n", +"I4 = (V_C1-V_BE2sat)/R2;// in A\n", +"I_D = I3-I4;// in A\n", +"I5 = (V_BE2sat-V_BB)/R_B1;// in A\n", +"I_B2actual = I4-I5;// in A\n", +"I_B2actual= I_B2actual*10^3;// in mA\n", +"I_C1 = 0;// in mA\n", +"I_B1 = 0;// in mA\n", +"I_C2= I_C2*10^3;// in mA\n", +"disp(V_C1,'The value of V_C1 in V is');\n", +"disp(V_C2,'The value of V_C2 in V is');\n", +"disp(V_B1,'The value of V_B1 in V is');\n", +"disp(V_B2,'The value of V_B2 in V is');\n", +"disp(I_C1,'The value of I_C1 in mA is');\n", +"disp(I_C2,'The value of I_C2 in mA is');\n", +"disp(I_B1,'The value of I_B1 in mA is');\n", +"disp(I_B2actual,'The value of I_B2 in mA is');" + ] + } +], +"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 +} diff --git a/Fundamentals_of_Electronic_Devices_and_Circuits_by_J_B_Gupta/2-Crystal_Structure_Of_Materials.ipynb b/Fundamentals_of_Electronic_Devices_and_Circuits_by_J_B_Gupta/2-Crystal_Structure_Of_Materials.ipynb new file mode 100644 index 0000000..5fbd1bf --- /dev/null +++ b/Fundamentals_of_Electronic_Devices_and_Circuits_by_J_B_Gupta/2-Crystal_Structure_Of_Materials.ipynb @@ -0,0 +1,128 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 2: Crystal Structure Of Materials" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.3: Density_of_copper_crystal.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 2.3\n", +"clc;\n", +"clear;\n", +"close;\n", +"// Given data\n", +"format('v',8)\n", +"r = 1.278;// in angstrum\n", +"At = 63.5;// atomic weight\n", +"N_A = 6.023*10^23;// Avagadro number\n", +"a = (4*r)/sqrt(2);// in angstrum\n", +"a = a * 10^-10;// in m\n", +"m = At/N_A;// in gm\n", +"m = m * 10^-3;// in kg\n", +"V = (a^3);// in m^3\n", +"n = 4;// number of atoms present in one unit cell of Cu\n", +"rho = (m*n)/V;// in kg/m^3\n", +"disp(rho,'The density of crystal in kg/m^3 is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.4: Interplaner_distance_in_a_crystal.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 2.4\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',5)\n", +"// Given data\n", +"lembda = 1.539;// in angstrum\n", +"theta = 22.5;// in degree\n", +"n = 1; // first order\n", +"// n*lembda = 2*d*sind(theta);\n", +"d = lembda/(2*sind(theta));// in angstrum\n", +"disp(d,'The interplaner distance in angstrum is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.5: Wavelength_of_X_ray.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 2.5\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6)\n", +"// Given data\n", +"n = 2;// second order\n", +"d = 0.4;// in nm\n", +"d = d * 10^-9;// in m\n", +"theta = 16.8/2;// in degree\n", +"// n*lembda = 2*d*sind(theta) (using Bragg's equation)\n", +"lembda = (2*d*sind(theta))/n;// in m\n", +"lembda = lembda * 10^10;// in angstrum\n", +"disp(lembda,'The wavelength of x-rays in angstrum is');" + ] + } +], +"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 +} diff --git a/Fundamentals_of_Electronic_Devices_and_Circuits_by_J_B_Gupta/3-Magnetic_Materials.ipynb b/Fundamentals_of_Electronic_Devices_and_Circuits_by_J_B_Gupta/3-Magnetic_Materials.ipynb new file mode 100644 index 0000000..6ed1e5c --- /dev/null +++ b/Fundamentals_of_Electronic_Devices_and_Circuits_by_J_B_Gupta/3-Magnetic_Materials.ipynb @@ -0,0 +1,171 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 3: Magnetic Materials" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.1: Hysteresis_loss_per_cubic_merter_per_cycle.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 3.1\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',7)\n", +"// Given data\n", +"x = 1000;// in AT/m assumed\n", +"y = 0.2;// in T assumed\n", +"a = 9.3;// area in cm^2 \n", +"// Hysteresis loss/m^3/cycle\n", +"H = a*x*y;// in J/m^3/cycle\n", +"disp(H,'Hysteresis loss per cubic meter per cycle in J/m^3/cycle is');\n", +"f = 50;// in Hz\n", +"// Hystersis loss per cubic meter at a frequency of 50Hz \n", +"h = H*f;// in W\n", +"h = h * 10^-3;// in kW\n", +"disp(h,'Hystersis loss per cubic meter at a frequency of 50Hz in kW is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.2: Hysteresis_loss.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 3.2\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6)\n", +"// Given data\n", +"a = 93;// in cm^2\n", +"x = 0.1;// in Wb/m^2\n", +"y = 50;// in AT/m\n", +"// Hysteresis loss/m^3/cycle \n", +"H = a*x*y;// in J/m^3/cycle\n", +"f = 65;// in Hz\n", +"V = 1500;// in cm^3\n", +"V = V * 10^-6;// in m^3\n", +"Ph = H*f*V;// in W\n", +"disp(Ph,'The hysteresis loss in W is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.3: Loss_of_energy.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 3.3\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',8)\n", +"// Given data\n", +"Eta =628;// in J/m^3\n", +"Bmax = 1.3;// in T\n", +"f = 25;// in Hz\n", +"m = 50;// in kg\n", +"rho = 7.8*10^3;// in kg/m^3\n", +"V = m/rho;// in m^3\n", +"H = round(Eta*(Bmax^1.6)*f*V);// Hystersis loss in J/s\n", +"H = H * 60 *60;// Hystersis loss in J/hour\n", +"disp(H,'The Hystersis loss per hour in J is');\n", +"h = Eta*(Bmax^1.6);// Hystersis loss/m^3/cycle\n", +"// h = x*y*area of B_H loop\n", +"x = 12.5;// in AT/m\n", +"y = 0.1;// in T\n", +"Area = h/(x*y);// in cm^2\n", +"format('v',5)\n", +"disp(Area,'The area of B-H loop in cm^2 is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.4: Eddy_current_loss.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 3.4\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',7)\n", +"// Given data\n", +"Pe1 = 1600;// in W\n", +"Bmax1 = 1.2;// in T\n", +"f1 = 50;// in Hz\n", +"Bmax2 = 1.5;// in T\n", +"f2 = 60;// in Hz\n", +"Pe2 = Pe1*(Bmax2/Bmax1)^2*(f2/f1)^2;// in W\n", +"disp(Pe2,'The eddy current loss in W is');" + ] + } +], +"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 +} diff --git a/Fundamentals_of_Electronic_Devices_and_Circuits_by_J_B_Gupta/4-Transistor_Amplifiers.ipynb b/Fundamentals_of_Electronic_Devices_and_Circuits_by_J_B_Gupta/4-Transistor_Amplifiers.ipynb new file mode 100644 index 0000000..adbf6ce --- /dev/null +++ b/Fundamentals_of_Electronic_Devices_and_Circuits_by_J_B_Gupta/4-Transistor_Amplifiers.ipynb @@ -0,0 +1,991 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 4: Transistor Amplifiers" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.10: Dynamic_output_resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 4.10\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',8)\n", +"// Given data\n", +"V1 = 10;// in V\n", +"V2 = 5;// in V\n", +"I1 = 5.8;// in mA\n", +"I2 = 5;// in mA\n", +"delV_C = V1-V2;// in V\n", +"delI_C = I1-I2;// in mA\n", +"r_out = delV_C/delI_C;// in k ohm\n", +"disp(r_out,'The dynamic output resistance in k ohm is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.11: Collector_emitter_voltage_and_base_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 4.11\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',5)\n", +"// Given data\n", +"V_CC = 8;// in V\n", +"I_CR_C = 0.5;// in V\n", +"R_C = 800;// in ohm\n", +"V_CE = V_CC - I_CR_C;// in V\n", +"disp(V_CE,'The collector emitter voltage in V is');\n", +"I_C = I_CR_C/R_C;// in A\n", +"Alpha = 0.96;// unit less\n", +"Beta = Alpha/(1-Alpha);\n", +"I_B = I_C/Beta;// in A\n", +"I_B = I_B * 10^6;// in µA\n", +"disp(I_B,'The Base current in µA is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.12: Bita_dc_and_leakage_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 4.12\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',5)\n", +"// Given data\n", +"I_E = 5;// in mA\n", +"I_C = 4.95;// in mA\n", +"I_CEO = 200;// in µA\n", +"I_B = I_E-I_C;// in mA\n", +"Beta_dc = I_C/I_B;// unit less\n", +"disp(Beta_dc,'The value of Beta_dc is');\n", +"Alpha_dc = Beta_dc/(1+Beta_dc);// unit less\n", +"I_CBO = I_CEO * (1-Alpha_dc);// in µA\n", +"disp(I_CBO,'The collector-to-base leakage cuurent in µA is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.13: IC_IE_ICEO_and_alpha.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 4.13\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6)\n", +"// Given data\n", +"I_B = 25;// in µA\n", +"I_B = I_B * 10^-6;// in A\n", +"I_CBO = 100;// in nA\n", +"I_CBO = I_CBO * 10^-9;// in A\n", +"Beta = 100;// unit less\n", +"I_C = (Beta*I_B) + ((Beta+1)*I_CBO);// in A\n", +"I_C= I_C*10^3;// in mA\n", +"disp(I_C,'The value of I_C in mA is');\n", +"I_C= I_C*10^-3;// in A\n", +"I_E = I_C + I_B;// in A\n", +"I_E= I_E*10^3;// in mA\n", +"disp(I_E,'The value of I_E in mA is');\n", +"I_E= I_E*10^-3;// in A\n", +"Alpha = Beta/(1+Beta);// unit less\n", +"disp(Alpha,'The value of Alpha is');\n", +"I_CEO = I_CBO/(1-Alpha);// in A\n", +"I_CEO = round(I_CEO *10^6);// in µA\n", +"disp(I_CEO,'The value of I_CEO in µA is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.14: h_parameters.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 4.14\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',7)\n", +"// Given data\n", +"R1= 4;// in ohm\n", +"R2= 8;// in ohm\n", +"R3= 8;// in ohm\n", +"i1= 1;// in A (assumed)\n", +"h11= R1+R2*R3/(R2+R3);// in ohm\n", +"disp(h11,'The value of h11 in ohm is : ')\n", +"i2= -1/2*i1;// in A\n", +"h21= i2/i1;// unit less\n", +"disp(h21,'The value of h21 is : ')\n", +"v2= 1;// in V (assumed)\n", +"i2= v2/(R3+R2);// in A\n", +"v1= v2/2;// in V\n", +"h12= v1/v2;// unit less\n", +"disp(h12,'The value of h12 is : ')\n", +"h22= i2/v2;// in s\n", +"disp(h22,'The value of h22 in s is : ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.15: Hybrid_parameters.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 4.15\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',9)\n", +"// Given data\n", +"Ib = 20;// in µA\n", +"Ib = Ib * 10^-6;// in A\n", +"I_C = 1;// in mA\n", +"I_C = I_C * 10^-3;// in A\n", +"Vbe = 22;// in mV\n", +"Vbe = Vbe * 10^-3;// in V\n", +"Vce = 0;// in V\n", +"h_ie = Vbe/Ib;// in ohm\n", +"h_ie = h_ie * 10^-3;// in k ohm\n", +"disp(h_ie,'The value of h_ie in k ohm is');\n", +"h_fe = I_C/Ib;// unit less\n", +"disp(h_fe,'The value of h_fe is');\n", +"Ib = 0;\n", +"Vbe = 0.25;// in mV\n", +"Vbe = Vbe * 10^-3;// in V\n", +"I_C = 30;// in µA\n", +"I_C = I_C * 10^-6;// in A\n", +"Vce = 1;// in V\n", +"h_re = Vbe/Vce;// unit less\n", +"disp(h_re,'The value of h_re is');\n", +"h_oe = I_C/Vce;// in S\n", +"h_oe = h_oe * 10^6;// in µS\n", +"disp(h_oe,'The value of h_oe in µS is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.16: Current_gain_and_input_impedance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 4.16\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6)\n", +"// Given data\n", +"h_fe = 50;// unit less\n", +"h_ie = 0.83;// in k ohm\n", +"h_ie = h_ie * 10^3;// in ohm\n", +"h_fb = -h_fe/(1+h_fe);// unit less\n", +"disp(h_fb,'The current gain is');\n", +"h_ib = h_ie/(1+h_fe);// in ohm\n", +"disp(h_ib,'The input impedance in ohm is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.17: Hybrid_parameters.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 4.17\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',7)\n", +"// Given data\n", +"h_ie = 2600;// in ohm\n", +"h_fe = 100;\n", +"h_re = 0.02*10^-2;\n", +"h_oe = 5*10^-6;// in S\n", +"h_ic = h_ie;// in ohm\n", +"disp(h_ic,'The value of h_ic in ohm is');\n", +"h_fc = -(1+h_fe);\n", +"disp(h_fc,'The value of h_fc is');\n", +"h_rc = 1 - h_re;\n", +"h_rc = 1;\n", +"disp(h_rc,'The value of h_rc is');\n", +"h_oc = h_oe;// in S\n", +"disp(h_oc,'The value of h_oc in S is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.18: Input_and_output_resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 4.18\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',5)\n", +"// Given data\n", +"h_ie = 1000;// in ohm\n", +"h_fe = 50;// unit less\n", +"h_re = 2.5*10^-4;// unit less\n", +"h_oe = 25*10^-6;// in A/V\n", +"R_L = 10;// in k ohm\n", +"R_L = R_L * 10^3;// in ohm\n", +"Rs = 100;// in ohm\n", +"Ai = -h_fe/(1 + (h_oe*R_L));// unit less\n", +"disp(Ai,'The current gain is');\n", +"Rin = h_ie - ( (h_re*h_fe)/(h_oe+(1/R_L)) );// in ohm\n", +"disp(Rin,'The input resistance in ohm is');\n", +"Av = Ai*(R_L/Rin);// unit less\n", +"disp(Av,'The voltage gain is');\n", +"Ais = Ai * (Rs/(Rin+Rs));// unit less\n", +"Avs = Av*(Rin/(Rin+Rs));// unit less\n", +"Gout = h_oe - ( (h_fe*h_re)/(h_ie+Rs) );// in S\n", +"Rout = 1/Gout;// in ohm\n", +"Rout = Rout * 10^-3;// in k ohm\n", +"disp(Rout,'The output resistance in k ohm is');\n", +"Ap = Avs*Ais;// unit less\n", +"disp(Ap,'The power gain is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.19: Ri_Ro_Av_Ai_and_Ap.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 4.19\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6)\n", +"// Given data\n", +"h_ie = 2;// in k ohm\n", +"h_ie = h_ie * 10^3;// in ohm\n", +"h_re = 2*10^-4;// unit less\n", +"h_fe = 50;// unit less\n", +"h_oe = 20*10^-6;// in A/V\n", +"R_L = 4;// in k ohm\n", +"R_L = R_L * 10^3;// in ohm\n", +"Rs = 200;// in ohm\n", +"Ai = -h_fe/( 1+(h_oe*R_L) );// unit less\n", +"disp(Ai,'The value of Ai is');\n", +"Ri = h_ie - ( (h_re*h_fe)/( h_oe+(1/R_L) ) );// in ohm\n", +"disp(Ri,'The value of Ri in ohm is');\n", +"//Av = -h_fe/( (h_oe + (1/R_L))*Rin ) = Ai*(R_L/Rin);\n", +"Av = Ai*(R_L/Ri);// unit less\n", +"disp(Av,'The value of Av is');\n", +"Gout = h_oe - ( (h_fe*h_re)/(h_ie+Rs) );// in S\n", +"Rout = 1/Gout;// in ohm\n", +"Rout = Rout * 10^-3;// in k ohm\n", +"disp(Rout,'The value of Rout in k ohm is');\n", +"Ais = Ai * (Rs/(Ri+Rs) );// unit less\n", +"Avs = Av * (Ri/(Ri+Rs));// unit less\n", +"Ap = Av*Ai;// unit less\n", +"disp(Ap,'The value of Ap is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.1: DC_and_AC_load_line.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 4.1\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',8)\n", +"// Given data\n", +"V_CC = 20;// in V\n", +"I_C= 2*10^-3;// in A\n", +"I_CQ= I_C;// in A\n", +"I_E=I_C;// in A\n", +"R_C = 3;// in k ohm\n", +"R_C = R_C * 10^3;// in ohm\n", +"R_L = 12;// in k ohm\n", +"R_L = R_L * 10^3;// in ohm\n", +"R_E = 2;// in k ohm \n", +"R_E = R_E * 10^3;// in ohm\n", +"V_CE=0:0.1:20;// in V\n", +"I_C_sat= (V_CC-V_CE)/(R_C+R_E)*10^3;// in mA\n", +"subplot(121)\n", +"plot(V_CE,I_C_sat);\n", +"xlabel('V_CE in volts')\n", +"ylabel('I_C in mA')\n", +"title('DC load line')\n", +"Rac= R_C*R_L/(R_C+R_L);// in ohm\n", +"V_CEQ= V_CC-I_CQ*(R_C+R_E);// in V\n", +"I_Csat= I_CQ+V_CEQ/Rac;// in A\n", +"I_Csat=I_Csat*10^3;// in mA\n", +"V_CEoff= V_CEQ+I_CQ*Rac;// in V\n", +"subplot(122)\n", +"plot([V_CEoff 0],[0,I_Csat])\n", +"xlabel('V_CE in volts')\n", +"ylabel('I_C in mA')\n", +"title('AC load line')\n", +"// Maximum peak output signal\n", +"POSmax= I_CQ*Rac;// in V\n", +"// Peak-to-peak value of output signal\n", +"PP_out_sig= 2*POSmax;// in V\n", +"disp(PP_out_sig,'Peak-to-peak value of output signal in volts is : ')\n", +"disp('DC and AC load line shown in figure.')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.20: Current_gain_and_overall_current_gain.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 4.20\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6)\n", +"// Given data\n", +"R_S = 200;// in ohm\n", +"R_L = 1200;// in ohm\n", +"h_ib = 24;// in ohm\n", +"h_rb = 4*10^-4;// unit less\n", +"h_fb = -0.98;// unit less\n", +"h_ob = 0.6;// in µA/V\n", +"h_ob = h_ob * 10^-6;// in A/V\n", +"Ai = -h_fb/(1+(h_ob*R_L));// unit less\n", +"disp(Ai,'The current gain is');\n", +"Ri = h_ib + (h_rb*Ai*R_L);// in ohm\n", +"disp(Ri,'The input impedance in ohm is');\n", +"Av = round((Ai*R_L)/Ri);// unit less\n", +"disp(Av,'The Voltage gain is');\n", +"Ais = (Ai*R_S)/(Ri+R_S);// unit less\n", +"disp(Ais,'The overall current gain is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.21: Voltage_gain_of_amplifier_circuit.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 4.21\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',5)\n", +"// Given data\n", +"g_m = 2500;// in µS\n", +"g_m = g_m * 10^-6;// in S\n", +"R_L = 12;// in k ohm\n", +"R_L = R_L * 10^3;// in ohm\n", +"//Av = -g_m*(r_d||R_D||R_L);\n", +"Av = -g_m*R_L;\n", +"disp(Av,'The voltage gain is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.22: Voltage_gain_and_output_resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 4.22\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6)\n", +"// Given data\n", +"R_D = 5;// in k ohm\n", +"R_D = R_D * 10^3;// in ohm\n", +"r_d = 35;// in k ohm\n", +"r_d = r_d * 10^3;// in ohm\n", +"miu = 50;// amplifier factor\n", +"g_m = miu/r_d;// in S\n", +"Av = -g_m*( (r_d*R_D)/(r_d+R_D) );\n", +"disp(Av,'The voltage gain is');\n", +"Rout = (R_D*r_d)/(R_D+r_d);// in ohm\n", +"Rout= Rout*10^-3;// in k ohm\n", +"disp(Rout,'The output resistance in k ohm is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.23: RD_and_Rs.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 4.23\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',5)\n", +"// Given data\n", +"V_GS = -1.0;// in V\n", +"V_DS = 4.0;// in V\n", +"I_DS = 1;// in mA\n", +"I_DS = I_DS * 10^-3;// in A\n", +"I_G = 0;// in A\n", +"R_G = 500;// in k ohm\n", +"R_G = R_G * 10^3;// in ohm\n", +"V_DD = 10;// in V\n", +"V_DS = 4;// in V\n", +"V_G = I_G*R_G;// in V\n", +"Vs = V_G-V_GS;// in V\n", +"R_S = Vs/I_DS;// in ohm\n", +"R_S= R_S*10^-3;// in k ohm\n", +"disp(R_S,'The value of R_S in k ohm is');\n", +"R_S= R_S*10^3;// in ohm\n", +"// V_DD = I_DD*R_D + V_DS+ I_DS*R_S = I_DS*(R_D+R_S) + V_DS\n", +"R_D = ((V_DD-V_DS)/I_DS)-R_S;// in ohm\n", +"R_D = R_D * 10^-3;// in k ohm\n", +"disp(R_D,'The value of R_D in k ohm is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.24: RD_and_Rs.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 4.24\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',5)\n", +"// Given data\n", +"V_GS = -1;// in V\n", +"V_DS = -4;// in V\n", +"I_DS = 1;// in mA\n", +"I_DS = I_DS * 10^-3;// in A\n", +"g_m = 5*10^-3;// in mhos\n", +"Rds = 20;// in k ohm\n", +"Rds = Rds * 10^3;// in ohm\n", +"R_S = 1;// in k ohm\n", +"R_S = R_S * 10^3;// in ohm\n", +"R_D = 5;// in k ohm\n", +"R_D = R_D * 10^3;// in ohm\n", +"//Av = Vout/Vin = -g_m*(r_d||R_D||R_L) = -g_m*((R_D*Rds)/(R_D+Rds));\n", +"Av = -g_m*((R_D*Rds)/(R_D+Rds));\n", +"disp(Av,'The voltage gain is');\n", +"R_G = 500;// in k ohm\n", +"R_G = R_G * 10^3;// in ohm\n", +"Rin = R_G;// in ohm\n", +"Rin= Rin*10^-3;// in k ohm\n", +"disp(Rin,'The value of Rin in k ohm is');\n", +"Rin= Rin*10^3;// in ohm\n", +"Rout = (R_D*Rds)/(R_D+Rds);// in ohm\n", +"Rout= Rout*10^-3;// in k ohm\n", +"disp(Rout,'The value of Rout in k ohm is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.25: Input_and_output_impedance_voltage_gain.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 4.25\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',5)\n", +"// Given data\n", +"R1 = 4;// in M ohm\n", +"R2 = 2;// in Mohm\n", +"R_G = (R1*R2)/(R1+R2);// in Mohm\n", +"Zin = R_G;// in Mohm\n", +"disp(Zin,'The input impedance in Mohm is');\n", +"R_S = 2.5;// in k ohm\n", +"R_S = R_S * 10^3;// in ohm\n", +"R_L = 25;// in k ohm\n", +"R_L = R_L * 10^3;// in ohm\n", +"g_m = 2500;// in µS\n", +"g_m = g_m * 10^-6;// in S\n", +"Zout = (R_S*(1/g_m))/(R_S+(1/g_m));// in ohm\n", +"disp(Zout,'The output impedance in ohm is');\n", +"Av = g_m*((R_S*R_L)/(R_S+R_L))/( 1+g_m*((R_S*R_L)/(R_S+R_L)) );// unite less\n", +"disp(Av,'The voltage gain is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.2: Voltage_gai.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 4.2\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6)\n", +"// Given data\n", +"delV_BE = 0.02;// in V\n", +"delI_B = 10;// in µA\n", +"delI_B = delI_B * 10^-6;// in A\n", +"delI_C = 1;// in mA\n", +"delI_C = delI_C * 10^-3;// in A\n", +"R_C = 5;// in k ohm\n", +"R_C = R_C * 10^3;// in ohm\n", +"R_L = 10;// in k ohm\n", +"R_L = R_L * 10^3;// in ohm\n", +"Zin = delV_BE/delI_B;// in ohm\n", +"Zin= Zin*10^-3;// in k ohm\n", +"disp(Zin,'The input impedance in k ohm is');\n", +"Zin= Zin*10^3;// in ohm\n", +"Beta = delI_C/delI_B;// unit less\n", +"disp(Beta,'The current gain is');\n", +"Rac = (R_C*R_L)/(R_C+R_L);// in ohm\n", +"Rac= Rac*10^-3;// in k ohm\n", +"disp(Rac,'The AC load resistance in k ohm is');\n", +"Rac= Rac*10^3;// in ohm\n", +"Rin = 2;// in k ohm\n", +"Rin = Rin * 10^3;// in ohm\n", +"Av = Beta*(Rac/Rin);\n", +"disp(Av,'The voltage gain is');\n", +"Ai = 100;// unit less\n", +"Ap = Av*Ai;// unit less\n", +"disp(Ap,'The power gain is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.3: Base_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 4.3\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',8)\n", +"// Given data\n", +"Alpha = 0.988;// unit less\n", +"I_E = 1.2;// in mA\n", +"I_E = I_E * 10^-3;// in A\n", +"I_CO = 0;// in A\n", +"I_C = Alpha*I_E + I_CO;// in A\n", +"I_B = I_E - I_C;// in A\n", +"I_B = I_B * 10^6;// in µA\n", +"disp(I_B,'The base current in µA is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.4: Alpha_Bita_and_IE.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 4.4\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',7)\n", +"// Given data\n", +"I_B = 45;// in µA\n", +"I_B = I_B * 10^-6;// in A\n", +"I_C = 5.45;// in mA\n", +"I_C = I_C * 10^-3;// in A\n", +"I_E = I_B+I_C;// in A\n", +"I_E= I_E*10^3;// in mA\n", +"disp(I_E,'The value of I_E in mA is');\n", +"I_E= I_E*10^-3;// in A\n", +"Alpha = I_C/I_E;// unit less\n", +"disp(Alpha,'The value of Alpha is');\n", +"format('v',5)\n", +"Beta = I_C/I_B;// unit less\n", +"disp(Beta,'The value of Beta is');\n", +"I_C = 10;// in mA\n", +"I_C = I_C * 10^-3;// in A\n", +"I_B = I_C/Beta;// in A\n", +"I_B = I_B * 10^6;// in µA\n", +"disp(I_B,'The required base current in µA is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.5: Dynamic_input_resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 4.5\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',8)\n", +"// Given data\n", +"delV_EB = 200;// in mV\n", +"delI_E = 5;// in mA\n", +"// Dynamic input resistance for CB configuration,\n", +"r_in = delV_EB/delI_E;// in ohm\n", +"disp(r_in,'The dynamic input resistance of transistor in ohm is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.6: Base_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 4.6\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',5)\n", +"// Given data\n", +"R_L = 4;// in k ohm\n", +"R_L = R_L * 10^3;// in ohm\n", +"V_across_RL = 3;// in V\n", +"I_C = V_across_RL/R_L;// in A\n", +"I_C = I_C * 10^3;// in mA\n", +"Alpha = 0.96;// unit less\n", +"I_E = I_C/Alpha;// in mA\n", +"I_B = I_E - I_C;// in mA\n", +"disp(I_B,'The base current in mA is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.7: Base_and_collector_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 4.7\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',8)\n", +"// Given data\n", +"I_E = 3;// in mA\n", +"I_CO = 10;// in µA\n", +"I_CO = I_CO * 10^-3;// in mA\n", +"Alpha = 0.98;// unit less\n", +"I_C = (Alpha*I_E) + I_CO;// in mA\n", +"disp(I_C,'The collector current in mA is');\n", +"I_B = I_E - I_C;// in mA\n", +"disp(I_B,'The base current in mA is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.8: Current_gain_and_base_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 4.8\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6)\n", +"// Given data\n", +"I_E = 2;// in mA\n", +"I_C = 1.97;// in mA\n", +"I_B = I_E-I_C;// in mA\n", +"disp(I_B,'The base current in mA is');\n", +"I_CO = 12.5;// in µA\n", +"I_CO = I_CO * 10^-3;// in mA\n", +"Alpha = (I_C-I_CO)/I_E;// unit less\n", +"disp(Alpha,'The current gain is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.9: Dynamic_input_resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 4.9\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',8)\n", +"// Given data\n", +"delV_BE = 250;// in mV\n", +"delV_BE = delV_BE * 10^-3;// in V\n", +"delI_B = 1;// in mA\n", +"delI_B = delI_B * 10^-3;// in A\n", +"r_in = delV_BE/delI_B;// in ohm\n", +"disp(r_in,'The dynamic input resistance in ohm is');" + ] + } +], +"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 +} diff --git a/Fundamentals_of_Electronic_Devices_and_Circuits_by_J_B_Gupta/5-Amplifier_Frequency_Response.ipynb b/Fundamentals_of_Electronic_Devices_and_Circuits_by_J_B_Gupta/5-Amplifier_Frequency_Response.ipynb new file mode 100644 index 0000000..1c10cb8 --- /dev/null +++ b/Fundamentals_of_Electronic_Devices_and_Circuits_by_J_B_Gupta/5-Amplifier_Frequency_Response.ipynb @@ -0,0 +1,460 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 5: Amplifier Frequency Response" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.10: The_midband_gain_and_upper_3_dB_frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 5.10\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',5)\n", +"// Given data\n", +"R_G = 3.9*10^6;// in ohm\n", +"R_L = 18*10^3;// in ohm\n", +"R_D = R_L;// in ohm\n", +"g_m = 2*10^-3;// in A/V\n", +"r_o = 250*10^3;// in ohm\n", +"Cgs = 1*10^-12;// in F\n", +"Cgd = 0.25*10^-12;// in F\n", +"Rsig = 50*10^3;// in ohm\n", +"A_VM =-R_G/(R_G+Rsig)*g_m*r_o*R_D*R_L/(r_o*R_D+R_D*R_L+R_L*r_o);\n", +"disp(A_VM,'The midband gain is');\n", +"RdasL = (r_o*R_D*R_L)/( (r_o*R_D) +(R_D*R_L)+(R_L*r_o) );// in ohm\n", +"Ceq = (1 + g_m*RdasL)*Cgd;// in F\n", +"Cin = Cgs+Ceq;// in F\n", +"f2 = 1/( 2*%pi*Cin*( (Rsig*R_G)/(Rsig+R_G) ) );// in Hz\n", +"f2 = f2 * 10^-3;// in kHz\n", +"disp(f2,'The upper 3dB frequency in kHz is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.1: fbita_and_bita.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 5.1\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6)\n", +"// Given data\n", +"Alpha_o = 0.978;// unit less\n", +"f_Alpha = 2.5;// in MHz\n", +"f_Beta = (1-Alpha_o)*f_Alpha;// in MHz\n", +"disp(f_Beta,'The value of f_Beta in MHz is');\n", +"Beta = (0.707*Alpha_o)/(1-Alpha_o);// unit less\n", +"disp(Beta,'The value of Beta is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.2: Cut_off_frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 5.2\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6)\n", +"// Given data\n", +"C =0.15;// in µF\n", +"C = C * 10^-6;// in F\n", +"R = 7.5;// in k ohm\n", +"R = R * 10^3;// in ohm\n", +"f1 = 1/(2*%pi*R*C);// in Hz\n", +"disp(f1,'The cutoff frequency in Hz is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.3: Voltage_gain_and_lower_cut_off_frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 5.3\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',5)\n", +"// Given data\n", +"R_S = 1;// in k ohm\n", +"R1 = 20;// in k ohm\n", +"R2 = 10;// in k ohm\n", +"R_C = 2;// in k ohm\n", +"R_E = 2;// in k ohm\n", +"R_L = 2;// in k ohm\n", +"V_BE = 0.7;// in V\n", +"V_T = 26*10^-3;// in V \n", +"Beta = 100;// unite less\n", +"V_CC = 15;// in V\n", +"Cin = 10;// in µF\n", +"C_E = 20;// in µF\n", +"Cout = 1;// in µF\n", +"V_B = R2/(R1+R2) *V_CC;// in V\n", +"//I_E = V_E/R_E = (V_B-V_BE)/(R_E*10^3);// in A\n", +"I_E = (V_B-V_BE)/(R_E*10^3);// in A\n", +"r_e = V_T/I_E;// in ohm\n", +"r_e= r_e*10^-3;// in k ohm\n", +"// Av = Vout/Vin = ( (-(R_C*R_L)/(R_C+R_L))/r_e );\n", +"Av = ( (-(R_C*R_L)/(R_C+R_L))/(r_e) );\n", +"Rin = (R1*R2*Beta*r_e)/((R1*R2)+(R2*Beta*r_e)+(Beta*r_e*R1));// in k ohm\n", +"Zin = Rin;// in k ohm\n", +"// Vin = (Rin/(Rin+R_S))*V_S;\n", +"Vin_by_V_S = Rin/(Rin+R_S);\n", +"Avi = Av*Vin_by_V_S;// unite less\n", +"disp(Avi,'The voltage gain is');\n", +"f_Li = 1/( 2*%pi*(R_S+Rin)*10^3*Cin*10^-6 );// in Hz\n", +"disp(f_Li,'The lower cutoff frequency in Hz is');\n", +"\n", +"// Note: The wrong value is putted of Rin to evaluating the value of f_Li, So there is some difference between coding and the answer of the book." + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.4: Lower_cut_off_frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 5.4\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6)\n", +"// Given data\n", +"Cin = 0.02*10^-6;// in F\n", +"Cout = 0.47*10^-6;// in F\n", +"Cs = 2.2*10^-6;// in F\n", +"Rsignal = 12*10^3;// in ohm\n", +"R_G = 2*10^6;// in ohm\n", +"R_D = 1.5*10^3;// in ohm\n", +"Rout = 1.5*10^3;// in ohm\n", +"Rs = 2*10^3;// in ohm\n", +"R_L = 2.7*10^3;// in ohm\n", +"I_DSS = 15*10^-3;// in A\n", +"V_P = -4;// in V\n", +"V_GSQ = -2;// in V\n", +"V_DD = 30;// in V\n", +"g_mo = (-2*I_DSS)/V_P;// in S\n", +"g_m = g_mo * (1-(V_GSQ/V_P));// in S\n", +"fLi = 1/( 2*%pi*(Rsignal+R_G)*Cin );// in Hz\n", +"fLo = 1/( 2*%pi*(Rout+R_L)*Cout );// in Hz\n", +"Req = (Rs*(1/g_m))/(Rs+(1/g_m));// in ohm\n", +"fLs = 1/(2*%pi*Req*Cs);// in Hz\n", +"disp(fLs,'The lower cutoff frequency in Hz is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.5: Input_capacitance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 5.5\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6)\n", +"// Given data\n", +"Ccb = 5;// in pF\n", +"Cbe = 12;// in pF\n", +"h_fe = 100;// unite less\n", +"h_ie = 1.5;// in k ohm\n", +"R_C = 12;// in k ohm\n", +"Av = (-h_fe/h_ie)*R_C;\n", +"Cin = Cbe + (1-Av)*Ccb;// in pF\n", +"disp(Cin,'The input capacitance in pF is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.6: Miller_capacitance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 5.6\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6)\n", +"// Given data\n", +"V_DD = 10;// in V\n", +"Cds = 0.5*10^-12;// in F\n", +"Cgs = 5*10^-12;// in F\n", +"Cgd = 4*10^-12;// in F\n", +"R_D = 2*10^3;// in ohm\n", +"I_DSS = 10*10^-3;// in A\n", +"V_P = -4;// in V\n", +"V_GSQ = -2;// in V\n", +"g_mo = (-2*I_DSS)/V_P;// in S\n", +"g_m = g_mo * (1-(V_GSQ/V_P));// in S\n", +"Av = -R_D*g_m;// circuit mid-frequency gain\n", +"// Miller capacitance\n", +"C_M = (1-Av)*Cgd;// in F\n", +"C_M= C_M*10^12;// in pF\n", +"disp(C_M,'The miller capacitance in pF is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.7: Value_of_gm.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 5.7\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6)\n", +"// Given data\n", +"I_C = 1;// in mA\n", +"V_T = 26;// in mV\n", +"g_m = I_C/V_T;// in S\n", +"disp(g_m*10^3,'The value of g_m in mS is');\n", +"h_fe = 224;// unit less\n", +"r_b_desh_e= h_fe/g_m;// in ohm\n", +"disp(r_b_desh_e*10^-3,'The value of r_b''e in k ohm is');\n", +"h_ie = 6;// in k ohm\n", +"h_ie = h_ie *10^3;// in ohm\n", +"r_b_desh_b= h_ie - r_b_desh_e;// in ohm\n", +"disp(r_b_desh_b,'The value r_b''b in ohm is');\n", +"fT = 80;// in MHz\n", +"fT = fT * 10^6;// in Hz\n", +"C_b_desh_c = 12;// in pF\n", +"C_b_desh_c = C_b_desh_c* 10^-12;// in F\n", +"C_b_desh_e= (g_m/(2*%pi*fT)) - C_b_desh_c;// in F\n", +"C_b_desh_e=C_b_desh_e*10^12;// in pF\n", +"disp(C_b_desh_e,'The value of C_b''e in pF is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.8: All_hybrid_parameters.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 5.8\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6)\n", +"// Given data\n", +"I_C = 10;// in mA\n", +"I_C = I_C * 10^-3;// in A\n", +"V_CE = 10;// in V\n", +"h_ie = 500;// in ohm\n", +"h_oe = 4*10^-5;// in A/V\n", +"h_fe = 100;// unit less\n", +"h_re = 10^-4;// unit less\n", +"V_T = 26;// in mV\n", +"V_T = V_T * 10^-3;// in V\n", +"g_m = I_C/V_T;// in S\n", +"g_m= g_m*10^3;// in mS\n", +"disp(g_m,'The value of g_m in mS is');\n", +"g_m= g_m*10^-3;// in S\n", +"r_b_desh_e = h_fe/g_m;// in ohm\n", +"disp(r_b_desh_e,'The value of r_b''e in ohm is');\n", +"r_b_desh_b = h_ie - r_b_desh_e;// in ohm\n", +"disp(r_b_desh_b,'The value of r_b''b in ohm is');\n", +"r_b_desh_c = r_b_desh_e/h_re;// in ohm\n", +"r_b_desh_c= r_b_desh_c *10^-6;// in M ohm\n", +"disp(r_b_desh_c,'The value of r_b''c in Mohm is');\n", +"r_b_desh_c= r_b_desh_c *10^6;// in ohm\n", +"g_b_desh_c = 1/r_b_desh_c;// unit less\n", +"g_ce = h_oe - (1+h_fe)*g_b_desh_c;// in S\n", +"format('v',11)\n", +"disp(g_ce,'The value of g_ce in S is');\n", +"Cob = 3;// in pF \n", +"Cbdasc = Cob;// in pF \n", +"disp(Cbdasc,'The value of C_b''c in pF is : ')\n", +"format('v',6)\n", +"fT = 50;// in MHz\n", +"fT = fT * 10^6;// in Hz\n", +"Cbdase = (g_m/(2*%pi*fT))-Cbdasc * 10^-12;// in F\n", +"Cbdase= Cbdase *10^12;// in pF\n", +"disp(Cbdase,'The value of C_b''e in pF is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.9: The_midband_gain_and_upper_3_dB_frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 5.9\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6)\n", +"// Given data\n", +"V_CC = 12;// in V\n", +"V_EE = V_CC;// in V\n", +"I = 1;// in mA\n", +"I = I * 10^-3;// in A\n", +"R_B = 120;// in k ohm\n", +"R_B = R_B * 10^3;// in ohm\n", +"R_C = 10;// in k ohm\n", +"R_C = R_C * 10^3;// in ohm\n", +"Rsig = 5;// in k ohm\n", +"Rsig = Rsig * 10^3;// in ohm\n", +"R_L = 5;// in k ohm\n", +"R_L = R_L * 10^3;// in ohm\n", +"Beta = 125;// unit less\n", +"V_A = 200;// in V\n", +"Cmiu = 1;// in pF\n", +"Cmiu = Cmiu * 10^-12;// in F\n", +"fT = 1000;// in MHz\n", +"fT = fT * 10^6;// in Hz\n", +"r_x = 50;// in ohm\n", +"V_T = 25;// in mV\n", +"V_T = V_T * 10^-3;// in V\n", +"g_m = I/V_T;// in A/V\n", +"r_pie = Beta/g_m;// in ohm\n", +"r_o = V_A/I;// in ohm\n", +"Cpie = (g_m/(2*%pi*fT))-Cmiu;// in F\n", +"RdasL = (r_o*R_C*R_L)/( (r_o*R_C)+(R_C*R_L)+(R_L*r_o) );// in ohm\n", +"Gm = g_m*RdasL;// unit less\n", +"R = (R_B*Rsig)/(R_B+Rsig);// in ohm \n", +"A_VM = (-R_B/(R_B+Rsig)) * (r_pie/(r_pie+r_x+R)) * Gm;\n", +"disp(A_VM,'The mid band gain is');\n", +"Avm = 20*log(abs(A_VM));// in dB \n", +"Cin = Cpie+Cmiu*(1+Gm);// in F\n", +"Rdassig = (r_pie*(r_x+R))/(r_pie+(r_x+R));// in ohm\n", +"f2 = 1/( 2*%pi*Cin*Rdassig);// in Hz\n", +"f2 = f2 * 10^-3;// in kHz\n", +"disp(f2,'The upper 3-dB frequency in kHz is');" + ] + } +], +"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 +} diff --git a/Fundamentals_of_Electronic_Devices_and_Circuits_by_J_B_Gupta/6-Feedback_Amplifiers.ipynb b/Fundamentals_of_Electronic_Devices_and_Circuits_by_J_B_Gupta/6-Feedback_Amplifiers.ipynb new file mode 100644 index 0000000..5f684ba --- /dev/null +++ b/Fundamentals_of_Electronic_Devices_and_Circuits_by_J_B_Gupta/6-Feedback_Amplifiers.ipynb @@ -0,0 +1,873 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 6: Feedback Amplifiers" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.10: Amount_of_feedback_in_dB.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 6.10\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',7)\n", +"// Given data\n", +"Af = -100;// unit less\n", +"Vin = 0.06;// in V\n", +"Vout = Af*Vin;// in V\n", +"Vin = 50;// in mV\n", +"Vin = Vin * 10^-3;// in V\n", +"A = Vout/Vin;// unit less\n", +"//Af = A/(1+(A*Beta));\n", +"Beta = (abs(A)-abs(Af))/(Af*A);// unit less\n", +"disp(Beta,'The value of ß is');\n", +"Amount = 20*log10(abs( 1/(1+(-Af*Beta)) ));// in dB\n", +"disp(Amount,'The Amount of feed back in dB is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.11: Change_in_overall_gain.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 6.11\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',4)\n", +"// Given data\n", +"A = 1000;// unit less\n", +"Beta = 0.002;// unit less\n", +"Af = A/(1+(A*Beta));// unit less\n", +"// When open-loop gain is reduced by \n", +"A_desh = (1-15/100)*A;// unit less\n", +"A_desh_f = A_desh/(1+(A_desh*Beta));// unit less\n", +"P = ((Af-A_desh_f)/Af)*100;// percentage change in overall gain in % \n", +"disp(P,'The change in overall gain in % is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.12: Feedback_ration_and_factor.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 6.12\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6)\n", +"// Given data\n", +"R_C = 2.5;// in k ohm\n", +"R_C = R_C * 10^3;// in ohm\n", +"R_E = 1;// in k ohm\n", +"R_E = R_E * 10^3;// in ohm\n", +"h_ie = 1.1;// in k ohm\n", +"h_ie = h_ie * 10^3;// in ohm\n", +"h_fe = 200;// unit less\n", +"Beta = 200;// unit less\n", +"A = round((-h_fe/h_ie)*R_C);// unit less\n", +"disp(A,'The voltage gain without feed back is');\n", +"Af = -R_C/R_E;// unit less\n", +"disp(Af,'The voltage gain with feed back is');\n", +"// Af = A/(1+(A*Beta));\n", +"Beta = (abs(A)-abs(Af))/(A*Af);// unit less\n", +"disp(Beta,'The feed back ratio is');\n", +"feedbackfactor = round(abs(A)*Beta);// unit less\n", +"disp(feedbackfactor,'The feed back factor is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.13: Av_and_bita.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 6.13\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',7)\n", +"// Given data\n", +"dAvByAv = 20/100;// variation in open loop gain\n", +"dAvf_by_Avf = 1/100;// variation in closed loop gain\n", +"BetaAv = (dAvByAv/dAvf_by_Avf)-1;// feedback factor\n", +"Avf = 100;//unit less\n", +"Av = Avf*(1+BetaAv);// open loop voltage gain\n", +"disp(Av,'The value of Av is');\n", +"Beta = ((Av/Avf)-1)/Av;// unit less\n", +"disp(Beta,'The value of ß is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.14: Percentage_change_in_closed_loop_gain.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 6.14\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6)\n", +"// Given data\n", +"Av =10000;// open loop gain\n", +"Beta = 1/10;// feedback ratio \n", +"Avf = Av/(1+(Av*Beta));// closed loop gain\n", +"dAvByAv = 50/100;// change in open loop gain\n", +"dAvByAvf = 1/(1+(Beta*Av))*dAvByAv*100;// change in closed loop gain in %\n", +"disp(dAvByAvf,'The percentage change in closed loop gain in % is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.15: Percentage_change_in_closed_loop_gain.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 6.15\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',5)\n", +"// Given data\n", +"BetaAvPlus1 = 10;// in dB\n", +"BetaAvPlus1 = 10^(BetaAvPlus1/20);// unit less\n", +"BetaAv = BetaAvPlus1 - 1;// unit less\n", +"dAvByAv = 0.05;// unit less\n", +"//Beta*Av = (dAvByAv/dAvfByAvf)-1;\n", +"dAvfByAvf = dAvByAv/( BetaAv+1 );// unit less\n", +"dAvfByAvf = dAvfByAvf * 100;// in %\n", +"disp(dAvfByAvf,'The percentage change in the closed loop gain in % is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.16: Open_and_closed_loop_gain.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 6.16\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',7)\n", +"// Given data\n", +"D = 10/100;// distortion without feedback\n", +"Df = 1/100;// distortion with feedback\n", +"Beta = 10/100;// feedback ratio\n", +"// Df = D/(1+(Beta*A));\n", +"A = ((D/Df)-1)/Beta;// open loop gain\n", +"disp(A,'The open loop gain is');\n", +"Af = A/(1+(Beta*A));// closed loop gain\n", +"disp(Af,'The closed loop gain is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.17: Distortion_of_the_amplifier.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 6.17\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',7)\n", +"// Given data\n", +"A = 150;// open loop voltage gain\n", +"Beta = 10/100;// feedback ratio\n", +"D = 5/100;// distortion without feedback\n", +"Df = D/(1+(Beta*A));// distortion with feedback\n", +"Df = Df * 100;// in %\n", +"disp(Df,'The distortion of the amplifier with feed back in % is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.18: Gain_and_output_voltage_with_feedback.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 6.18\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',7)\n", +"// Given data\n", +"D = 10/100;// distortion without feedback\n", +"Df = 1/100;// distortion with feedback\n", +"A = 200;// unit less\n", +"// Df = D/(1+(Beta*A));\n", +"Beta = ((D/Df)-1)/A;// unit less\n", +"Af = A/(1+(Beta*A));// unit less\n", +"disp(Af,'The gain voltage with feed back is');\n", +"Vs = 10;// in mV\n", +"Vs = Vs * 10^-3;// in V\n", +"Vout = Af*Vs;// in V\n", +"disp(Vout,'The output voltage with feed back in V is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.19: Required_input_signal.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 6.19\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',5)\n", +"// Given data\n", +"A = 1000;// open loop gain\n", +"D = 10/100;// distortion without feedback\n", +"Vs = 10;// in mV\n", +"Vs = Vs * 10^-3;// in V\n", +"BetaA = 40;// in dB\n", +"BetaA= 10^(BetaA/20);// unit less\n", +"Vdesh_s = Vs*(1+BetaA);// in V\n", +"disp(Vdesh_s,'The required input signal in V is');\n", +"Df = (D/(1+BetaA))*100;// in % \n", +"disp(Df,'The percentage second harmonic distortion in % is');\n", +"Af = A/(1+BetaA);// unit less\n", +"disp(Af,'The closed loop voltage gain is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.1: Voltage_gain_and_power_gain.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 6.1\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',8)\n", +"// Given data\n", +"Rs = 10;// in k ohm\n", +"Rs = Rs * 10^3;// in ohm\n", +"Rin = 10;// in ohm\n", +"Rout = 10;// in k ohm\n", +"Rout = Rout * 10^3;// in ohm\n", +"R_L = 10;// in ohm\n", +"Ai = 1000;// unit less\n", +"VinBY_Iin= Rin;// in ohm\n", +"VoutBY_Iin= Ai*Rout*R_L/(Rout+R_L);// in V\n", +"Av= VoutBY_Iin/VinBY_Iin;// unit less\n", +"disp(Av,'The voltage gain is : ')\n", +"Ai= (VoutBY_Iin/R_L)/((Rs+Rin)/Rs);// unit less\n", +"Ap= Av*Ai;// unit less\n", +"disp(Ap,'The power gain is : ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.20: Voltage_gain_and_input_output_resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 6.20\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',5)\n", +"// Given data\n", +"A = 300;// voltage gain\n", +"Rin = 1.5;// in k ohm\n", +"Rout = 50;// in k ohm\n", +"Beta = 1/15;// unit less\n", +"Af = A/(1+(Beta*A));// unit less\n", +"disp(Af,'The voltage gain is');\n", +"Rinf = (1+(Beta*A))*Rin;// in k ohm\n", +"disp(Rinf,'The input resistance in k ohm is');\n", +"Routf = Rout/(1+(Beta*A));// in k ohm\n", +"disp(Routf,'The output resistance in k ohm is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.21: Feedback_factor_and_percentage_change_in_overall_gain.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 6.21\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6)\n", +"// Given data\n", +"dA_ByA = 0.1;// change in gain of internal amplifier\n", +"A = 60;// in dB\n", +"A = A * 16.666;// unit less\n", +"Zo = 12;// in k ohm\n", +"Zo = Zo * 10^3;// in ohm\n", +"Zoutf = 600;// in ohm\n", +"Beta = ((Zo/Zoutf)-1)/A;// unit less\n", +"disp(Beta,'The value of feed back factor is');\n", +"dAf_byAf = 1/(1+(A*Beta))*(dA_ByA)*100;// change in overall gain in %\n", +"disp(dAf_byAf,'The percentage change in overall gain in % is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.22: Amplifier_voltage_gai.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 6.22\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6)\n", +"// Given data\n", +"D = 5/100;// distortion without feedback\n", +"A = 1000;// open loop voltage gain\n", +"Beta = 0.01;// feedback ratio\n", +"Af = A/(1+(Beta*A));// unit less\n", +"disp(Af,'The Amplifier voltage gain is');\n", +"f1 = 50;// in Hz\n", +"fdas1 = f1/(1+(Beta*A));// in Hz\n", +"disp(fdas1,'The lower cutoff frequency with feedback in Hz is');\n", +"f2 = 200;// in kHz\n", +"f2 = f2 * 10^3;// in Hz\n", +"fdas2 = f2*(1+(Beta*A));// in Hz\n", +"fdas2 = fdas2 * 10^-6;// in MHz\n", +"disp(fdas2,'The upper cutoff frequency with feedback in MHz is');\n", +"Df = (D/(1+(Beta*A)))*100;// in %\n", +"disp(Df,'The distortion with feed back in % is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.23: Feedback_factor_and_bandwidth.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 6.23\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',7)\n", +"// Given data\n", +"Avm = 1500;// midband gain\n", +"Avmf = 150;// midband gain with feedback\n", +"// Avmf = Avm/(1+(Beta*Avm));\n", +"BetaAvm = (Avm/Avmf)-1;// feedback factor\n", +"disp(BetaAvm,'The value of feed back factor is');\n", +"bandwidth = 4;// in MHz\n", +"BWf = (1+BetaAvm)*bandwidth;// in MHz\n", +"disp(BWf,'The band width with feedback in MHz is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.24: New_bandwidth_and_gain.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 6.24\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6)\n", +"// Given data\n", +"A = 100;//mid frequency gain\n", +"BW = 200;// in kHz\n", +"Beta = 5/100;// feedback ratio\n", +"BWf = (1+(Beta*A))*BW;// in kHz\n", +"BWf = BWf * 10^-3;// in MHz\n", +"disp(BWf,'The bandwidth with feedback in MHz is');\n", +"Af = A/(1+(Beta*A));// unit less\n", +"disp(Af,'The gain with feedback is');\n", +"BWf = 1000;// in kHz\n", +"Beta = ((BWf/BW)-1)/A*100;//feedback ratio in %\n", +"disp(Beta,'The amount of feedback in % is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.25: Input_impedance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 6.25\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',5)\n", +"// Given data\n", +"V_CC = 20;// in V\n", +"R1 = 10;// in k ohm\n", +"R1 = R1 * 10^3;// in ohm\n", +"R2 = 10;// in k ohm\n", +"R2 = R2 * 10^3;// in ohm\n", +"R_E = 9.3;// in k ohm\n", +"R_E = R_E * 10^3;// in ohm\n", +"R_L = 18.6;// in k ohm\n", +"R_L = R_L * 10^3;// in ohm\n", +"V2 = (V_CC/(R1+R2))*R2;// in V\n", +"V_BE = 0.7;// in V\n", +"Ve = V2-V_BE;// in V\n", +"Ie = Ve/R_E;// in A\n", +"V_T = 25*10^-3;// in V\n", +"rdase = V_T/Ie;// in ohm\n", +"RdasE = (R_E*R_L)/(R_E+R_L);// in ohm\n", +"Beta = 100;// unit less\n", +"Zinbase = Beta*(rdase+RdasE);// in ohm\n", +"Zin =R1*R2*Zinbase/(R1*R2+R2*Zinbase+Zinbase*R1);// in ohm\n", +"Zin= Zin*10^-3;// in k ohm\n", +"disp(Zin,'The input impedance in k ohm is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.2: Voltage_gai.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 6.2\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',7)\n", +"// Given data\n", +"Beta = 0.01;//feedback fraction\n", +"// Voltage gain with negative feedback\n", +"A = 3000;// unit less\n", +"Af = A/(1+(Beta*A));// unit less\n", +"disp(Af,'The voltage gain of the amplifier is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.3: Gain_of_a_negative_feedback_amplifier.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 6.3\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6)\n", +"// Given data\n", +"A = 75;// internal gain\n", +"Beta = 1/15;//feedback fraction\n", +"Af = A/(1+(Beta*A));// voltage gain with negative feedback\n", +"disp(Af,'The voltage gain with negative feedback is');\n", +"A_desh = 2*A;// unit less\n", +"A_desh_f = A_desh/(1+(Beta*A_desh));// unit less\n", +"disp(A_desh_f,'The new value of gain is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.4: Voltage_gain_with_feedback.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 6.4\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6)\n", +"// Given data\n", +"A = 40;// open loop voltage gain\n", +"Beta = 10/100;// feedback ratio\n", +"Af = A/(1+(Beta*A));// voltage gain with feedback\n", +"disp(Af,'The voltage gain with feedback is');\n", +"Amount = 20*log10(abs( 1/(1+(Beta*A)) ));// Amount of feedback in dB \n", +"disp(Amount,'Amount of feedback in dB is');\n", +"Loopgain = A*Beta;// unit less\n", +"disp(Loopgain,'The Loop gain is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.5: Gain_in_dB.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 6.5\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6)\n", +"// Given data\n", +"A = 60;// in dB\n", +"A = 10^(A/20);// unit less\n", +"Beta = 1/20;// feedback fraction\n", +"Af = A/(1+(Beta*A));// gain with feedback\n", +"Af = 20*log10(Af);// in dB \n", +"disp(Af,'The gain with feed back in dB is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.6: Gain_with_feedback.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 6.6\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',7)\n", +"// Given data\n", +"A = 2500;// open loop gain\n", +"// Desensitivity of transfer gain\n", +"trnsfr_gain_densitivity = 40;// in dB\n", +"trnsfr_gain_densitivity = 10^(trnsfr_gain_densitivity/20);\n", +"Af = A/trnsfr_gain_densitivity;// unit less\n", +"disp(Af,'The gain with feed back is');\n", +"I = A/Af;// assumed\n", +"disp('The input for same output will become '+string(I)+' times the input without feedback.')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.7: Feedback_factor.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 6.7\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',7)\n", +"// Given data\n", +"A = 60;// in dB\n", +"A = 10^(A/20);// unit less\n", +"Af = 40;// in dB\n", +"Af = 10^(Af/20);// unit less\n", +"// Af = A/(1+(A*Beta));\n", +"BetaIntoA = (A/Af)-1;// feedback factor\n", +"disp(BetaIntoA,'The feed back factor is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.8: Percentage_of_output.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 6.8\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6)\n", +"// Given data\n", +"A = 600;// unit less\n", +"Af = 50;// unit less\n", +"// Af = A/(1+(A*Beta));\n", +"Beta = ((A/Af)-1)/A;// unit less\n", +"//P = Vf/Vout = Beta*100;\n", +"P = Beta*100;// percentage of output voltage in % \n", +"disp(P,'The percentage of output voltage in % is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.9: Voltage_gain_without_feedback.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 6.9\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',7)\n", +"// Given data\n", +"Vout = 12.5;// in V\n", +"Vin = 0.25;// in V\n", +"Av = Vout/Vin;// unit less\n", +"disp(Av,'The voltage gain without feed back is ');\n", +"Vin = 1.5;// in V\n", +"Avf = round(Vout/Vin);// unit less\n", +"// Avf = Av/(1+(Beta*Av));\n", +"Beta = ((Av/Avf)-1)/Av;// unit less\n", +"Beta = Beta*100;// in %\n", +"disp(Beta,'The value of ß in % is');" + ] + } +], +"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 +} diff --git a/Fundamentals_of_Electronic_Devices_and_Circuits_by_J_B_Gupta/7-Oscillators.ipynb b/Fundamentals_of_Electronic_Devices_and_Circuits_by_J_B_Gupta/7-Oscillators.ipynb new file mode 100644 index 0000000..401ed2c --- /dev/null +++ b/Fundamentals_of_Electronic_Devices_and_Circuits_by_J_B_Gupta/7-Oscillators.ipynb @@ -0,0 +1,589 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 7: Oscillators" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.10: Percentage_by_parallel_resosnant_frequency_greater_than_series.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 7.10\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6)\n", +"// Given data\n", +"C = 0.04;// in pF\n", +"Cdesh = 2;// in pF\n", +"Per1 = (1/2)*(C/Cdesh)*100;// in %\n", +"Per2 = (sqrt(1+C/Cdesh)-1)*100;// in %\n", +"disp('Parallel resonant frequency is greater than series resonant frequency by '+string(Per2)+' %');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.11: Frequency_of_oscillations.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 7.11\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',5)\n", +"// Given data\n", +"R1 = 800;// in k ohm\n", +"R1 = R1 * 10^3;// in ohm\n", +"R2 = R1;// in ohm\n", +"R3 = R1;// in ohm\n", +"R = R1;// in ohm\n", +"C1 = 100;// in pF\n", +"C1 = C1 * 10^-12;// in F\n", +"C2 = C1;// in F\n", +"C3 = C1;// in F\n", +"C = C1;// in F\n", +"f_o = 1/(2*%pi*R*C*sqrt(6));// in Hz\n", +"disp(f_o,'The frequency of oscillation in Hz is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.12: Value_of_resistances.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 7.12\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6)\n", +"// Given data\n", +"C1 = 0.016;// in µF\n", +"C1 = C1 * 10^-6;// in F\n", +"C2 = C1;// in F\n", +"C3 = C1;// in F\n", +"C = C1;// in F\n", +"//f_o = 1/(2*%pi*R*C*sqrt(10));\n", +"f_o = 1;// in kHz\n", +"f_o = f_o * 10^3;// in Hz\n", +"R = 1/(2*%pi*f_o*C*sqrt(10));// in ohm\n", +"disp(R,'The value of resiatnce in ohm is');\n", +"disp('Standard value : 3.3 kohm')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.13: RC_elements_of_a_Wien_bridge_oscillator.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 7.13\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',5)\n", +"// Given data\n", +"f_o = 10;// in kHz\n", +"f_o = f_o * 10^3;// in Hz\n", +"R = 200;// in k ohm\n", +"R = R * 10^3;// in ohm\n", +"C = 1/(2*%pi*f_o*R);// in F\n", +"C=C*10^12;// in pF\n", +"disp(C,'The value of C in pF is');\n", +"R4 = R;// in ohm\n", +"R4= R4*10^-3;// in k ohm\n", +"disp(R4,'The value of R4 in k ohm is');\n", +"R3 = R4*2;// in k ohm\n", +"disp(R3,'The value of R3 in k ohm is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.14: RC_elements_of_a_Wien_bridge_oscillator.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 7.14\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',4)\n", +"// Given data\n", +"f = 15;// in kHz\n", +"f = f * 10^3;// in Hz\n", +"R = 200;// in k ohm\n", +"R = R * 10^3;// in ohm\n", +"C = 1/(2*%pi*f*R);// in F\n", +"C= C*10^12;// in pF\n", +"disp(C,'The value of C in pF is');\n", +"R4 = R;// in ohm\n", +"R4= R4*10^-3;// in k ohm\n", +"disp(R4,'The value of R4 in k ohm is');\n", +"R3 = R4*2;// in k ohm\n", +"disp(R3,'The value of R3 in k ohm is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.15: Frequency_of_oscillations.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 7.15\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',5)\n", +"// Given data\n", +"R1 = 20;// in k ohm\n", +"R1 = R1 * 10^3;// in ohm\n", +"R2 = R1;// in ohm\n", +"R = R1;// in ohm\n", +"C1 = 1000;// in pF\n", +"C1 = C1 * 10^-12;// in F\n", +"C2 = C1;// in F\n", +"C = C1;// in F\n", +"f = 1/(2*%pi*R*C);// in Hz\n", +"f= f*10^-3;// in kHz\n", +"disp(f,'The frequency of oscillations in kHz is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.16: Pulse_repetition_frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 7.16\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',5)\n", +"// Given data\n", +"R_E = 60;// in k ohm\n", +"R_E = R_E * 10^3;// in ohm\n", +"C = 0.25;// in µF\n", +"C = C * 10^-6;// in F\n", +"Eta = 0.65;\n", +"f = 1/(2.3*R_E*C*log10(1/(1-Eta)));// in Hz\n", +"disp(f,'The pulse repetition frequency in Hz is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.1: Frequency_of_oscillaiton.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 7.1\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',5)\n", +"// Given data\n", +"L = 29.3;// in µH\n", +"L = L * 10^-6;// in H\n", +"C = 450;// in pF\n", +"C = C * 10^-12;// in F\n", +"f_o = 1/( 2*%pi*(sqrt( L*C )) );// in Hz\n", +"f_o = f_o * 10^-6;// in MHz\n", +"disp(f_o,'The frequency of oscillation in MHz is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.2: Range_of_required_capacitor.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 7.2\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6)\n", +"// Given data\n", +"f_o = 100;// in kHz\n", +"f_o = f_o * 10^3;// in Hz\n", +"L = 100;//in µH\n", +"L = L * 10^-6;// in H\n", +"//Formula f_o = 1/( 2*%pi*(sqrt(L*C)) );\n", +"C1 = 1/(4*(%pi^2)*(f_o^2)*L);// in F\n", +"C1 = C1 * 10^12;// in pF\n", +"f_o = 1500;// in kHz\n", +"f_o = f_o * 10^3;// in Hz\n", +"C2 = 1/(4*(%pi^2)*(f_o^2)*L);// in F\n", +"C2 = C2 * 10^12;// in pF\n", +"disp('The range of variable capacitor is '+string(C2)+' pF to '+string(C1)+' pF')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.3: Transformer_winding_turn_ratio.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 7.3\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',7)\n", +"// Given data\n", +"V_CC = 12;// in V\n", +"Pout = 88;// in mW\n", +"Plosses = 8;// in mW\n", +"Pin = Pout+Plosses;// in mW\n", +"Pin = Pin * 10^-3;// in W\n", +"I_C = Pin/V_CC;// in A\n", +"Gm = 10;// in mA/V\n", +"Gm = Gm * 10^-3;// in A/V\n", +"V_B = I_C/Gm;// in V\n", +"ratio = V_CC/V_B;// Transformer winding turn ratio\n", +"disp(ratio,'The Transformer winding turn ratio is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.4: Operating_frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 7.4\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',5)\n", +"// Given data\n", +"L = 100;// in µH\n", +"L = L * 10^-6;// in H\n", +"C1 = 0.001;// in µF\n", +"C1 = C1 * 10^-6;// in F\n", +"C2 = 0.01;// in µF\n", +"C2 = C2 * 10^-6;// in F\n", +"f = (1/(2*%pi))*(sqrt( (1/(L*C1))+(1/(L*C2)) ));// in Hz\n", +"f = f * 10^-3;// in kHz\n", +"disp(f,'The opertaing frequency in kHz is');\n", +"Beta = C1/C2;// feedback fraction\n", +"disp(Beta,'The feed back fraction is');\n", +"Amin = 1/Beta;// minimum gain to sustain oscillations\n", +"disp(Amin,'The minimum gain to sustain oscillations is');\n", +"// A = R_C/R_E ;\n", +"R_C = 2.5;// in k ohm\n", +"R_C = R_C * 10^3;// in ohm\n", +"R_E = R_C/Amin;// in ohm\n", +"disp(R_E,'The emitter resistance in ohm is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.5: Range_of_inductance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 7.5\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6)\n", +"// Given data\n", +"f_o = 950;// in kHz\n", +"f_o = f_o *10^3;// in Hz\n", +"C1 = 100;// in pF\n", +"C1 = C1 * 10^-12;// in F\n", +"C2 = 7500;// in pF\n", +"C2 = C2 * 10^-12;// in F\n", +"//Formula f_o = (1/(2*Pi))*(sqrt( (1/(L*C1))+(1/(L*C2)) ));\n", +"L1 = (1/(4*(%pi^2)*(f_o^2)))*( (1/C1) + (1/C2) );// in H\n", +"L1 = L1 * 10^3;// in mH\n", +"f_o = 2050;// in kHz\n", +"f_o = f_o * 10^3;// in Hz\n", +"L2 = (1/(4*(%pi^2)*(f_o^2)))*( (1/C1) + (1/C2) );// in H\n", +"L2 = L2 * 10^3;// in mH\n", +"disp('The range of inductance values is : '+string(L2)+' mH to '+string(L1)+' mH');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.6: Frequency_of_oscillaiton.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 7.6\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',5)\n", +"// Given data\n", +"L1 = 30;// in mH\n", +"L1 = L1 * 10^-3;// in H\n", +"L2 = 1*10^-8;// in H\n", +"M = 0;// in H\n", +"L = L1+L2+(2*M);// in H\n", +"C = 100;// in pF\n", +"C = C * 10^-12;// in F\n", +"f_o = 1/(2*%pi*(sqrt( L*C )));// in Hz \n", +"f_o = f_o * 10^-3;// in kHz\n", +"disp(f_o,'The frequency of oscillation in kHz is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.7: Frequency_of_oscillations.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 7.7\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',5)\n", +"// Given data\n", +"L1 = 1;// in mH\n", +"L1 = L1 * 10^-3;// in H\n", +"L2 = 100;// in µH\n", +"L2 = L2 * 10^-6;// in H\n", +"M = 50;// in µH\n", +"M = M * 10^-6;// in H\n", +"C = 100;// in pF\n", +"C = C * 10^-12;// in F\n", +"L = L1+L2+(2*M);// in H\n", +"f_o = 1/(2*%pi*(sqrt( L*C )));// in Hz\n", +"f_o = f_o * 10^-3;// in kHz\n", +"disp(f_o,'The oscillation frequency in kHz is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.8: Resonance_frequencies.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 7.8\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',5)\n", +"// Given data\n", +"Rs = 5;// in k ohm\n", +"Rs =Rs * 10^3;// in ohm\n", +"Ls = 0.8;// in H\n", +"Cs = 0.08;// in pF\n", +"Cs = Cs * 10^-12;// in pF\n", +"C_P = 1;// in pF\n", +"C_P = C_P * 10^-12;// in F\n", +"f_s = 1/(2*%pi*(sqrt( Ls*Cs )));// in Hz\n", +"f_s = f_s * 10^-3;// in kHz\n", +"disp(f_s,'The series resonant frequency in kHz is');\n", +"f_p = (1/(2*%pi)) * (sqrt( (1+(Cs/C_P))/(Ls*Cs) ));// in Hz\n", +"f_p = f_p * 10^-3;// in kHz\n", +"disp(f_p,'The parallel resonant frequency in kHz is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.9: Value_of_inductance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 7.9\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',7)\n", +"// Given data\n", +"f_s = 1;// in MHz\n", +"f_s = f_s * 10^6;// in Hz\n", +"Cs = 0.1;// in pF\n", +"Cs = Cs * 10^-12;// in pF\n", +"// f_s = 1/(2*%pi*(sqrt( Ls*Cs )));\n", +"Ls = 1/(4*(%pi^2)*Cs*(f_s^2));// in H\n", +"disp(Ls,'The value of inductance in H is');" + ] + } +], +"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 +} diff --git a/Fundamentals_of_Electronic_Devices_and_Circuits_by_J_B_Gupta/8-Multistage_Amplifiers.ipynb b/Fundamentals_of_Electronic_Devices_and_Circuits_by_J_B_Gupta/8-Multistage_Amplifiers.ipynb new file mode 100644 index 0000000..7f6b1e2 --- /dev/null +++ b/Fundamentals_of_Electronic_Devices_and_Circuits_by_J_B_Gupta/8-Multistage_Amplifiers.ipynb @@ -0,0 +1,549 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 8: Multistage Amplifiers" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.10: Av2_and_Av1_and_Av_in_dB.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 8.10\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',5)\n", +"// Given data\n", +"V_CC = 12;// in V\n", +"r_e = 25;// in mV\n", +"r_e = r_e * 10^-3;// in V\n", +"R1 = 1.2;// in Mohm\n", +"R1 = R1 * 10^6;// in ohm\n", +"R3 = 1.2;// in Mohm\n", +"R3 = R3 * 10^6;// in ohm\n", +"R4 = 8;// in k ohm\n", +"R4 = R4 * 10^3;// in ohm\n", +"R5 = 24;// in k ohm\n", +"R5 = R5 * 10^3;// in ohm\n", +"Beta1 = 100;// unit less\n", +"Beta2 = 100;// unit less\n", +"I_B2 = V_CC/R3;// in A\n", +"I_C2 = Beta2*I_B2;// in A\n", +"I_E2 = I_C2;// in A\n", +"r_e2 = r_e/I_E2;// in ohm\n", +"Rac2 = (R4*R5)/(R4+R5);// in ohm\n", +"Av2 = -(Rac2/r_e2);//voltage gain of second stage \n", +"disp(Av2,'The voltage gain of second stage is');\n", +"Rac1 = (R3*(Beta2*r_e2))/(R3+(Beta2*r_e2));// in ohm\n", +"L = 1;// in H\n", +"f = 4;// in kHz\n", +"f = f * 10^3;// in Hz\n", +"X_L = 2*%pi*f*L;// in ohm\n", +"r_e1 = r_e2;// in ohm\n", +"Av1 = round(-Rac1/r_e1 );// voltage gain of first stage\n", +"disp(Av1,'The voltage gain of first stage at 4 kHz is');\n", +"Av = Av1*Av2;// overall voltage gain\n", +"Av = 20*log10(Av);// in dB\n", +"disp(Av,'The overall voltage gain in dB is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.11: Voltage_gain_and_input_resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 8.11\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6)\n", +"// Given data\n", +"V_CC = 25;// in V\n", +"R1 = 180;// in k ohm\n", +"R1 = R1*10^3;// in ohm\n", +"R2 = 20;// in k ohm\n", +"R2 = R2 * 10^3;// in ohm\n", +"R_C2 = 20;// in k ohm\n", +"R_C2 = R_C2 * 10^3;// in ohm\n", +"R_C1 = R_C2;// in ohm\n", +"R_E1 = 1.8;// in k ohm\n", +"R_E1 = R_E1 * 10^3;// in ohm\n", +"R_E2 = 4.3;// in k ohm\n", +"R_E2 = R_E2 * 10^3;// in ohm\n", +"R_L = 30;// in k ohm\n", +"R_L = R_L * 10^3;// in ohm\n", +"V_BE = 0.7;// in V\n", +"Beta2 = 50;// unit less\n", +"Beta1 = 50;// unit less\n", +"V_Th1 = (V_CC/(R1+R2))*R2;// in V\n", +"R_Th1 = (R1*R2)/(R1+R2);// in ohm\n", +"I_B = (V_Th1-V_BE)/( R_Th1+((Beta1+1)*R_E1) );// in A\n", +"I_E1 = (Beta1+1)*I_B;// in A\n", +"V_T = 25;// in mV\n", +"V_T = V_T * 10^-3;// in V\n", +"r_e1 = V_T/I_E1;// in ohm\n", +"I_C1 = I_E1;// in A\n", +"V_C1 = V_CC-(I_C1*R_C1);// in V\n", +"//V_E2 = V_B2-V_BE = V_C1-V_BE;// in V\n", +"V_E2 = V_C1-V_BE;// in V\n", +"I_E2 = V_E2/R_E2;// in A\n", +"r_e2 = V_T/I_E2;// in ohm\n", +"Rac2 = (R_C1*R_L)/(R_C1+R_L);// in ohm\n", +"Av2 = -Rac2/(r_e2+R_E2);// voltage gain of second stage \n", +"Rac1 = (R_C1*(Beta1*(r_e2+R_E2)))/(R_C1+(Beta1*(r_e2+R_E2)));// in ohm\n", +"Av1 = -Rac1/(r_e1+R_E1);// voltage gain of first stage \n", +"Av = Av1*Av2;// voltage gain\n", +"disp(Av,'The voltage gain is');\n", +"r_in = R1*R2*Beta1*(r_e1+R_E1)/( (R1*R2)+(R2*(Beta1*(r_e1+R_E1)))+((Beta1*(r_e1+R_E1))*R1) );// in ohm\n", +"r_in= r_in*10^-3;// in k ohm\n", +"disp(r_in,'The input resistance in k ohm is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.12: Voltage_gain_and_input_output_impedance_and_output_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 8.12\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6)\n", +"// Given data\n", +"I_DSS = 15;// in mA\n", +"I_DSS = I_DSS * 10^-3;// in A\n", +"V_P = -4;// in V\n", +"g_mo = (-2*I_DSS)/V_P;// in S\n", +"V_GSQ = -2;// in V\n", +"g_m = g_mo*( 1-(V_GSQ/V_P) );// in S\n", +"R_D = 2.7;// in k ohm\n", +"R_D = R_D * 10^3;// in ohm\n", +"Av1 = -g_m*R_D;// voltage gain of first stage\n", +"Av2 = Av1;// voltage gain of second stage\n", +"Av = Av1*Av2;// overall voltage gain\n", +"disp(Av,'The overall voltage gain is');\n", +"R_G = 2;// in Mohm\n", +"Rin = R_G;// in Mohm\n", +"disp(Rin,'The input impedance in Mohm is');\n", +"Rout = R_D;// in ohm\n", +"Rout= Rout*10^-3;// in k ohm\n", +"disp(Rout,'The output impedance in k ohm is');\n", +"Rout= Rout*10^3;// in ohm\n", +"Vin = 15;// in mV\n", +"Vin = Vin * 10^-3;// in V\n", +"Vout = Av*Vin;// in V\n", +"disp(Vout,'The output voltage in V is');\n", +"R_L = 15;// in k ohm\n", +"R_L = R_L * 10^3;// in ohm\n", +"V_L = (R_L/(Rout+R_L))*Vout;// in V\n", +"disp(V_L,'The output voltage across load resistance in V is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.13: Upper_and_lower_3dB_frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 8.13\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',7)\n", +"// Given data\n", +"f2 = 100;// in kHz\n", +"f_H = f2/(sqrt(2^(1/3)-1 ));// in kHz\n", +"disp(f_H,'The upper 3-dB frequency of each stage in kHz is');\n", +"f1 = 25;// in kHz\n", +"f_L = f1/(sqrt(2^(1/3)-1 ));// in kHz\n", +"disp(f_L,'The lower 3-dB frequency of each stage in kHz is');\n", +"\n", +"// Note: The value of upper 3-dB frequency in the book is not accurate and the calculated value of f_L is wrong. because 25 will be divided by 0.51 not multiplied." + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.14: Z_matrix_for_idential_T1_and_T2.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 8.14\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',5)\n", +"// Given data\n", +"R_E= 1;// in k ohm\n", +"h_ie= R_E;// in k ohm\n", +"h_fe= 100;// unit less\n", +"//V1= I1*[h_ie+(1+h_fe)*h_ie+(1+h_fe)^2*R_E]+I2*R_E (i)\n", +"//V2= I1*(1+h_fe)^2*R_E + I2*R_E (ii)\n", +"Z= [(h_ie+(1+h_fe)*h_ie+(1+h_fe)^2*R_E) R_E;(1+h_fe)^2*R_E R_E]\n", +"Z11= Z(1);// k ohm\n", +"Z21= Z(2);// k ohm\n", +"Z12= Z(3);// k ohm\n", +"Z22= Z(4);// k ohm\n", +"disp(Z11*10^-3,'The value of Z11 in M ohm is : ')\n", +"disp(Z12,'The value of Z12 in M ohm is : ')\n", +"disp(Z21*10^-3,'The value of Z21 in M ohm is : ')\n", +"disp(Z22,'The value of Z22 in M ohm is : ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.1: Overall_voltage_gain_in_dB.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 8.1\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',8)\n", +"// Given data\n", +"Av1 = 60;// voltage gain of first stage\n", +"Av2 = 100;// voltage gain of second stage \n", +"Av3 = 160;// voltage gain of third stage \n", +"Av= Av1*Av2*Av3;// overall voltage gain \n", +"Av_indB= 20*log10(Av);// overall voltage gain in dB\n", +"disp(Av_indB,'The overall voltage gain of the amplifier in dB is : ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.2: Voltage_gain_of_the_first_stage_in_dB.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 8.2\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6)\n", +"// Given data\n", +"Av = 80;// overall voltage gain in dB\n", +"Av2 = 20*log10(150);// voltage gain of second stage in dB\n", +"Av1= Av-Av2;//voltage gain of first stage in dB\n", +"disp(Av1,'The voltage gain of first stage in dB is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.3: Overall_voltage_gai.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 8.3\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',5)\n", +"// Given data\n", +"Av1 = -60;// voltage gain of first stage \n", +"R_C = 500;// in ohm\n", +"Rin = 1;// in k ohm\n", +"Rin = Rin * 10^3;// in ohm\n", +"h_fe = 50;// unit less\n", +"Av2 = -h_fe*(R_C/Rin);// voltage gain of second stage \n", +"Av = Av1*Av2;// overall voltage gain stage \n", +"disp(Av,'The overall voltage gain is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.4: Input_and_output_impedance_and_overall_voltage_gain.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 8.4\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6)\n", +"// Given data\n", +"R11 = 4;// in k ohm\n", +"R21 = 20;// in k ohm\n", +"h_ie = 1.1;// in k ohm\n", +"R_C1=4;// in k ohm\n", +"R22= 10;// in k ohm\n", +"R12= 2;// in k ohm\n", +"Zb = h_ie;// in k ohm\n", +"Zin = (R11*R21*Zb)/( (R11*R21)+(R21*Zb)+(Zb*R11) );// in k ohm\n", +"disp(Zin,'The input impedance in k ohm is');\n", +"h_oe = 0;// unit less\n", +"Q2 = %inf;// output impedance of transistor\n", +"R_C2 = 2;// in k ohm\n", +"// Zout= 1/h_oe || R_C2 = R_C2\n", +"Zout = R_C2;// in k ohm\n", +"disp(Zout,'The output impedance in k ohm is');\n", +"h_fe = 50;// unit less\n", +"R_L = 10;// in k ohm\n", +"Av2= -h_fe/h_ie*(R_C2*R_L/(R_C2+R_L));// voltage gain of second stage\n", +"Rac1= 1/(1/R_C1+1/R22+1/R12+1/h_ie);// in k ohm\n", +"Av1= -h_fe/h_ie*Rac1;// voltage gain of first stage\n", +"Av= Av1*Av2;// overall voltage gain \n", +"disp(Av,'The overall voltage gain is : ')\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.5: Input_and_output_impedance_voltage_gain.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 8.5\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6)\n", +"// Given data\n", +"R1 = 10;// in k ohm\n", +"R2 = 5;// in k ohm\n", +"Zb = 1;// in k ohm\n", +"Zin = (R1*R2*Zb)/( (R1*R2)+(R2*Zb)+(Zb*R1) );// in k ohm\n", +"disp(Zin,'The input impedance in k ohm is');\n", +"R_C1 = 2;// in k ohm\n", +"R_E1 = 2;// in k ohm\n", +"R_C2 = 2;// in k ohm\n", +"R_E2 = 2;// in k ohm\n", +"h_oe = 0;// unit less\n", +"Q2 = %inf;// output impedance of transistor\n", +"//Zout= 1/h_oe || R_C2\n", +"Zout = R_C2;// in k ohm\n", +"disp(Zout,'The output impedance in k ohm is');\n", +"h_fe = 100;// unit less\n", +"h_ie = 1;// in k ohm\n", +"R_ac=0.222;// in k ohm\n", +"Av2= -h_fe/h_ie*R_C2;// voltage gain of second stage\n", +"Rac1= 1/(1/R_C1+1/R1+1/R2+1/h_ie);// in k ohm\n", +"Av1= -h_fe/h_ie*R_ac;// voltage gain of first stage\n", +"Av= Av1*Av2;// overall voltage gain \n", +"disp(Av,'The overall voltage gain is : ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.7: Transformer_turn_ratio.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 8.7\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',5)\n", +"// Given data\n", +"Z_L = 16;// in ohm\n", +"Z_desh_L = 10;// in k ohm\n", +"Z_desh_L = Z_desh_L* 10^3;// in ohm\n", +"// a = N1/N2 = sqrt( ZdasL/Z_L );\n", +"a = sqrt( Z_desh_L/Z_L );// ratio of primary to secondary turns of step-down transformer\n", +"disp(a,'The transformer turm ratio is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.8: Transformer_turn_ratio.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 8.8\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',5)\n", +"// Given data\n", +"Z_L = 10;// in ohm\n", +"Z_desh_L = 1;// in k ohm\n", +"Z_desh_L = Z_desh_L * 10^3;// in ohm\n", +"Zs = Z_desh_L;// in ohm\n", +"// a = N1/N2 = sqrt(Z_desh_L/Z_L);\n", +"a = sqrt(Z_desh_L/Z_L);//turn ratio of the transformer \n", +"disp(a,'The turn ratio of the transformer is');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.9: Transformer_turn_ratio_and_load_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 8.9\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',5)\n", +"// Given data\n", +"Z_L = 25;// in ohm\n", +"Z_S = 10;// in k ohm\n", +"Z_S = Z_S * 10^3;// in k ohm\n", +"// Z_S = (a^2)*Z_L;\n", +"a = sqrt(Z_S/Z_L);//turn ratio of the transformer \n", +"disp(a,'The transformer turn ratio is');\n", +"//V2 = V1/a = Vs/a;\n", +"Vs = 8;// in V\n", +"V2 = Vs/a;// in V\n", +"V_L =V2;// in V\n", +"disp(V_L,'The load voltage in V is');" + ] + } +], +"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 +} diff --git a/Fundamentals_of_Electronic_Devices_and_Circuits_by_J_B_Gupta/9-Tuned_Amplifiers.ipynb b/Fundamentals_of_Electronic_Devices_and_Circuits_by_J_B_Gupta/9-Tuned_Amplifiers.ipynb new file mode 100644 index 0000000..62e473a --- /dev/null +++ b/Fundamentals_of_Electronic_Devices_and_Circuits_by_J_B_Gupta/9-Tuned_Amplifiers.ipynb @@ -0,0 +1,67 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 9: Tuned Amplifiers" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.1: Resonant_frequency_and_Q_factor_and_bandwidth.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Exa 9.1\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',5)\n", +"// Given data\n", +"R = 10;// in ohm\n", +"L = 20;// in mH\n", +"L = L * 10^-3;// in H\n", +"C = 0.05;// in µF\n", +"C = C * 10^-6;// in F\n", +"f_r = (1/(2*%pi))*sqrt( (1/(L*C)) - ((R^2)/(L^2)) );// in Hz\n", +"f_r = round(f_r * 10^-3);// in kHz\n", +"disp(f_r,'The resonant frequency in kHz is');\n", +"Q = (2*%pi*f_r*10^3*L)/R;//Q factor of the tank circuit\n", +"disp(Q,'The Q factor of the tank circuit is');\n", +"BW = (f_r*10^3)/Q;// in Hz\n", +"disp(BW,'The band width of the amplifier in Hz is');" + ] + } +], +"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 +} |