diff options
Diffstat (limited to 'Electronic_Devices_and_Circuits_by_D_C_Kulshreshtha')
14 files changed, 4359 insertions, 0 deletions
diff --git a/Electronic_Devices_and_Circuits_by_D_C_Kulshreshtha/1-Introduction_to_Electronics.ipynb b/Electronic_Devices_and_Circuits_by_D_C_Kulshreshtha/1-Introduction_to_Electronics.ipynb new file mode 100644 index 0000000..00c8a26 --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_D_C_Kulshreshtha/1-Introduction_to_Electronics.ipynb @@ -0,0 +1,210 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 1: Introduction to Electronics" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.1: Find_the_range_of_tolerance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Find the range of tolerance\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"\n", +"//color coding\n", +"orange=3;\n", +"gold=5;\n", +"yellow=4;\n", +"violet=7;\n", +"//band pattern\n", +"band1=yellow;\n", +"band2=violet;\n", +"band3=orange;\n", +"band4=gold;\n", +"//resistor color coding\n", +"r=(band1*10+band2)*10^(band3);\n", +"tol=r*(band4/100)//tolerance\n", +"ulr=r+tol;//upper limit of resistance\n", +"llr=r-tol;//lower limit of resistance\n", +"printf('The Range of resistance is %.2f kΩ to %.2f kΩ',llr/1000,ulr/1000);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.2: Find_the_range_of_tolerance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Find the range of tolerance\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"\n", +"//color coding\n", +"blue=6;\n", +"gold=-1;\n", +"gray=8;\n", +"silver=10;\n", +"//band pattern\n", +"band1=gray;\n", +"band2=blue;\n", +"band3=gold;\n", +"band4=silver;\n", +"//resistor color coding\n", +"r=(band1*10+band2)*10^(band3);\n", +"tol=r*(band4/100)//tolerance\n", +"ulr=r+tol;//upper limit of resistance\n", +"llr=r-tol;//lower limit of resistance\n", +"printf('The Range of resistance is %.2f Ω to %.2f Ω',llr,ulr);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.3: Find_the_equivalent_current_source.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"//Find the equivalent current source\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"Vs=2;//Volts //dc voltage source\n", +"Rs=1;//ohm //internal resistance\n", +"Rl=1;//ohm //load resistance\n", +"Ise=Vs/Rs;//ampere //equivalent current source\n", +"\n", +"// In accordance to figure 1.23a\n", +"Il1=Ise*(Rs/(Rs+Rl));//using current divider concept\n", +"Vl1=Il1*Rl;\n", +"printf('\nIn accordance to figure 1.23a \n');\n", +"printf('The Load current (current source) Il= %dA\n',Il1);\n", +"printf('The Load voltage (current source) Vl= %dV\n\n',Vl1);\n", +"\n", +"// In accordance to figure 1.23b\n", +"Vl2=Vs*(Rs/(Rs+Rl));//using voltage divider concept\n", +"Il2=Vl2/Rl;\n", +"printf('\nIn accordance to figure 1.23b \n');\n", +"printf('The Load voltage (voltage source) Vl= %dV\n',Vl2);\n", +"printf('The Load current (voltage source) Il= %dA\n\n',Il2);\n", +"printf('Therefore they both provide same voltage and current to load');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.4: Find_percentage_variation_in_load_current_and_load_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"//Find percentage variation in load current and load voltage\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"Vs=10;//volt//Supply voltage\n", +"Rs=100;//ohm//internal resistance\n", +"\n", +"// In accordance to figure 1.24a\n", +"//For 1Ω - 10 Ω\n", +"Rl11=1;//ohm//min extreme value of Rl\n", +"Rl12=10;//ohm//max extreme value of Rl\n", +"Il11=Vs/(Rs+Rl11);\n", +"Il12=Vs/(Rs+Rl12);\n", +"Pi1=(Il11-Il12)*100/Il11;//Percentage variation in current\n", +"Vl11=Il11*Rl11;\n", +"Vl12=Il12*Rl12;\n", +"Pv1=(Vl12-Vl11)*100/Vl12;//Percentage variation in voltage\n", +"printf('\nIn accordance to figure 1.24a \n');\n", +"printf('Percentage variation in Current(1-10 Ω) %.2f percent\n',Pi1);\n", +"printf('Percentage variation in Voltage(1-10 Ω) %.1f percent\n\n',Pv1);\n", +"\n", +"// In accordance to figure 1.24b\n", +"//For 1kΩ - 10kΩ\n", +"Rl21=1000;//ohm//min extreme value of Rl\n", +"Rl22=10000;//ohm//max extreme value of Rl\n", +"Il21=Vs/(Rs+Rl21);\n", +"Il22=Vs/(Rs+Rl22);\n", +"Pi2=(Il21-Il22)*100/Il21;//Percentage variation in current\n", +"Vl21=Il21*Rl21;\n", +"Vl22=Il22*Rl22;\n", +"Pv2=(Vl22-Vl21)*100/Vl22;//Percentage variation in voltage\n", +"printf('\nIn accordance to figure 1.24b \n');\n", +"printf('Percentage variation in Current(1-10 Ω) %d percent \n',Pi2);\n", +"printf('Percentage variation in Voltage(1-10 Ω) %.1f percent \n\n',Pv2);\n", +"// In book the percentage variation in voltage(1kΩ-10kΩ) is 9 percent due to \n", +"// the incorrect value of Il22 i.e. 0.000999 Amp correct value is 0.0009901 Amp" + ] + } +], +"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/Electronic_Devices_and_Circuits_by_D_C_Kulshreshtha/10-Feedback_in_Amplifiers.ipynb b/Electronic_Devices_and_Circuits_by_D_C_Kulshreshtha/10-Feedback_in_Amplifiers.ipynb new file mode 100644 index 0000000..f939871 --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_D_C_Kulshreshtha/10-Feedback_in_Amplifiers.ipynb @@ -0,0 +1,333 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 10: Feedback in Amplifiers" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.10: Calculate_the_percentage_of_negative_feedback_to_input.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Calculate the percentage of negative feedback to input\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"\n", +"Adb=60;//dB //internal gain in dB\n", +"A=10^(Adb/(20)); //taking antilog\n", +"Ro=12*10^3;//ohm //output resistance\n", +"Rof=600;//ohm\n", +"B=(Ro/Rof-1)/A;\n", +"printf('The percentage of negative feedback to input= %.1f percent',B*100);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.1: Determine_the_gain_of_feedback_amplifier.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Determine the gain of feedback amplifier\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"\n", +"A=100; //internal gain\n", +"B=0.1;//feedback factor\n", +"Af=A/(1+A*B);\n", +"printf('The gain of feedback amplifier %.2f',Af);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.2: Determine_the_gain_of_feedback_amplifier_in_dB.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Determine the gain of feedback amplifier in dB\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"\n", +"Ad=60;//dB //internal gain in dB\n", +"A=10^(Ad/20); //internal gain\n", +"B=1/20;//feedback factor\n", +"Af=A/(1+A*B);\n", +"Afd=20*log10(Af);\n", +"printf('The gain of feedback amplifier %.2f dB',Afd);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.3: Calculate_the_percentage_of_output_fed_back_to_input.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Calculate the percentage of output fed back to input\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"\n", +"A=600; //internal gain\n", +"Af=50; //gain of feedback amplifier\n", +"B=(A/Af-1)/A;\n", +"printf('The percentage of output fed back to input= %.3f percent',B*100);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.4: Calculate_the_internal_gain_and_percentage_of_output_fed_back_to_input.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Calculate the internal gain and percentage of output fed back to input\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"\n", +"Af=80; //gain of feedback amplifier\n", +"Vi=0.05;//V //input with feedback\n", +"Vi_=4*10^-3;//V //input without feedback\n", +"Vo_=Af*Vi;\n", +"A=Vo_/Vi_;\n", +"printf('The internal gain is %.0f\n',A);\n", +"B=(A/Af-1)/A;\n", +"printf('The percentage of output fed back to input= %.2f percent',B*100);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.5: Calculate_the_gain_with_and_without_feedback_and_feedback_factor.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Calculate the gain with and without feedback and feedback factor\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"\n", +"Vo_=5;//V //output voltage\n", +"Vi=0.2;//V //input with feedback\n", +"Vi_=0.05;//V //input without feedback\n", +"A=Vo_/Vi_;\n", +"Af=Vo_/Vi;\n", +"printf('The gain without feedback is %.0f\n',A);\n", +"printf('The gain with feedback is %.0f\n',Af);\n", +"B=(A/Af-1)/A;\n", +"printf('The feedback factor= %.0f percent',B*100);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.6: Calculate_the_gain_of_feedback_amplifier_and_feedback_factor.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Calculate the gain of feedback amplifier and feedback factor\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"\n", +"A=100; //internal gain\n", +"N=20;//dB //negative feedback\n", +"B=(10^(-N/(-20))-1)/A; //taking antilog\n", +"Af=A/(1+A*B);\n", +"printf('The feedback factor= %.0f percent\n',B*100);\n", +"printf('The gain of the feedback amplifier is %.0f\n',Af);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.7: Calculate_percentage_change_in_the_overall_gain.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Calculate percentage change in the overall gain\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"\n", +"A=1000; //internal gain\n", +"N=40;//dB //negative feedback\n", +"D=10^((-N)/-20); //D=(1+AB) desensitivity\n", +"dA_A=10;//percent //dA/A\n", +"dAf_Af=dA_A/D; //dAf/Af\n", +"printf('The percentage change in the overall gain= %.1f percent',dAf_Af);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.8: Calculate_percentage_change_in_the_overall_gain.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Calculate percentage change in the overall gain\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"\n", +"Adb=60;//dB //internal gain in dB\n", +"B=0.005; //feedback factor\n", +"A=10^(Adb/(20)); //taking antilog\n", +"dA_A=-12;//percent //dA/A\n", +"D=(1+A*B); //D=(1+AB) desensitivity\n", +"dAf_Af=dA_A/D; //dAf/Af\n", +"printf('The percentage change in the overall gain reduces by %.1f percent',-dAf_Af);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.9: Determine_the_input_resistance_of_feedback_amplifier.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Determine the input resistance of feedback amplifier\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"\n", +"A=250; //internal gain\n", +"B=0.1;//feedback factor\n", +"Ri=1.1*10^3;//ohm //input resistance\n", +"Rif=Ri*(1+A*B);\n", +"printf('The input resistance of feedback amplifier %.1f kΩ',Rif/1000);\n", +"//The ans in book is incorrect due to use of (2+A*B) instead of (1+A*B) the ans in book is 29.7 kΩ" + ] + } +], +"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/Electronic_Devices_and_Circuits_by_D_C_Kulshreshtha/11-Tuned_Voltage_Amplifiers.ipynb b/Electronic_Devices_and_Circuits_by_D_C_Kulshreshtha/11-Tuned_Voltage_Amplifiers.ipynb new file mode 100644 index 0000000..b1914b5 --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_D_C_Kulshreshtha/11-Tuned_Voltage_Amplifiers.ipynb @@ -0,0 +1,154 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 11: Tuned Voltage Amplifiers" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.1: EX11_1.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Calculate frequency and impedance and current and voltage across each element at resonance\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"\n", +"R=12;//ohm\n", +"L=200*10^-6;//H\n", +"C=300*10^-12;//F\n", +"Vs=9;//V\n", +"fo=1/(2*%pi*sqrt(L*C));\n", +"Z=R; //impedance\n", +"printf('The Resonant frequency= %.1f kHz\n',fo/1000);\n", +"printf('The impedance Z= %.0f Ω\n',Z);\n", +"\n", +"Io=Vs/R;\n", +"printf('The Source current= %.2f A\n',Io);\n", +"\n", +"Vl=Io*(2*%pi*fo*L);\n", +"Vc=Io/(2*%pi*fo*C);\n", +"Vr=Io*R;\n", +"printf('The voltage across the inductor =%.1f V\n',Vl);\n", +"printf('The voltage across the capacitor =%.1f V\n',Vc);\n", +"printf('The voltage across the resistor =%.0f V\n',Vr);\n", +"//There is a slight variation in voltage across capacitor due to the approaximation" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.2: EX11_2.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Calculate frequency and impedance and current at resonance and current in coil and capacitor\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"\n", +"R=10;//ohm\n", +"L=100*10^-6;//H\n", +"C=100*10^-12;//F\n", +"Vs=10;//V\n", +"fo=1/(2*%pi*sqrt(L*C));\n", +"Zp=L/(C*R); //impedance\n", +"printf('The Resonant frequency= %.3f MHz\n',fo/10^6);\n", +"printf('The impedance Z= %.0f kΩ\n',Zp/1000);\n", +"\n", +"Io=Vs/Zp;\n", +"printf('The Source current= %.0f uA\n',Io*10^6);\n", +"\n", +"Xl=(2*%pi*fo*L);\n", +"Xc=1/(2*%pi*fo*C);\n", +"Z1=sqrt(Xl^2+R^2);\n", +"Z2=Xc;\n", +"Ic=Vs/Z2;\n", +"Il=Ic;\n", +"printf('The current in the coil = %.0f mA\n',Il*1000);\n", +"printf('The current in the capacitor = %.0f mA\n',Ic*1000);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.3: Calculate_impedance_and_quality_factor_and_bandwidth.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Calculate impedance and quality factor and bandwidth\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"\n", +"R=10;//ohm\n", +"L=150*10^-6;//H\n", +"C=100*10^-12;//F\n", +"fo=1/(2*%pi*sqrt(L*C));\n", +"Zp=L/(C*R); //impedance\n", +"printf('The impedance Z= %.0f kΩ\n',Zp/1000);\n", +"\n", +"Xl=(2*%pi*fo*L);\n", +"Q=Xl/R;\n", +"BW=fo/Q;\n", +"printf('The Quality factor of the circuit =%.1f \n',Q);\n", +"printf('The Band width of the circuit =%.1f kHz\n',BW/1000);" + ] + } +], +"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/Electronic_Devices_and_Circuits_by_D_C_Kulshreshtha/12-Sinusoidal_Oscillators.ipynb b/Electronic_Devices_and_Circuits_by_D_C_Kulshreshtha/12-Sinusoidal_Oscillators.ipynb new file mode 100644 index 0000000..a0efb53 --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_D_C_Kulshreshtha/12-Sinusoidal_Oscillators.ipynb @@ -0,0 +1,191 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 12: Sinusoidal Oscillators" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.1: Calculate_frequency_of_oscillations.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Calculate frequency of oscillations\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"\n", +"L=55*10^-6;//H\n", +"C=300*10^-12;//F\n", +"fo=1/(2*%pi*sqrt(L*C));\n", +"printf('The frequency of oscillations= %.0f kHz\n',fo/1000);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.2: Calculate_frequency_of_oscillations_and_feedback_factor_and_voltage_gain.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Calculate frequency of oscillations and feedback factor and voltage gain\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"\n", +"function [z]=prll(r1,r2)//Function for the parallel combination of resistor\n", +" z=r1*r2/(r1+r2);\n", +"endfunction\n", +"\n", +"//given\n", +"C1=0.001*10^-6;//F\n", +"C2=0.01*10^-6;//F\n", +"L=15*10^-6;//H\n", +"C=prll(C1,C2);\n", +"fo=1/(2*%pi*sqrt(L*C));\n", +"printf('The frequency of oscillations= %.2f MHz\n',fo/10^6);\n", +"B=C1/C2;\n", +"Amin=1/B;\n", +"printf('The feedback factor of the circuit =%.1f \n',B);\n", +"printf('The circuit needs a minimum voltage gain of %.0f',Amin);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.3: Calculate_frequency_of_oscillations.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Calculate frequency of oscillations\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"\n", +"R=10*10^3;//ohm\n", +"C=0.01*10^-6;//F\n", +"fo=1/(2*%pi*R*C*sqrt(6));\n", +"printf('The frequency of oscillations= %.1f Hz\n',fo);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.4: Calculate_frequency_of_oscillations.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Calculate frequency of oscillations\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"\n", +"R=22*10^3;//ohm\n", +"C=100*10^-12;//F\n", +"fo=1/(2*%pi*R*C);\n", +"printf('The frequency of oscillations= %.2f KHz\n',fo/1000);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.5: Determine_the_series_and_parallel_resonant_frequencies.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Determine the series and parallel resonant frequencies\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"\n", +"function [z]=prll(r1,r2)//Function for the parallel combination of resistor\n", +" z=r1*r2/(r1+r2);\n", +"endfunction\n", +"\n", +"//given\n", +"\n", +"L=3;//H\n", +"Cm=10*10^-12;//F\n", +"Cs=0.05*10^-12;//F\n", +"fs=1/(2*%pi*sqrt(L*Cs));\n", +"printf('The series resonant frequency =%.0f kHz\n',fs/1000);\n", +"\n", +"Cp=prll(Cm,Cs);\n", +"fp=1/(2*%pi*sqrt(L*Cp));\n", +"printf('The parallel resonant frequency =%.0f kHz',fp/1000);" + ] + } +], +"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/Electronic_Devices_and_Circuits_by_D_C_Kulshreshtha/14-Operational_Amplifiers.ipynb b/Electronic_Devices_and_Circuits_by_D_C_Kulshreshtha/14-Operational_Amplifiers.ipynb new file mode 100644 index 0000000..7a735fa --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_D_C_Kulshreshtha/14-Operational_Amplifiers.ipynb @@ -0,0 +1,188 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 14: Operational Amplifiers" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.1: Calculate_voltage_gain_and_input_and_output_resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Calculate voltage gain and input and output resistance\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"\n", +"R1=20*10^3;//ohm\n", +"Rf=2000*10^3;//ohm\n", +"Acl=-Rf/R1;\n", +"Ricl=R1;\n", +"Ro=0;\n", +"printf('The voltage gain= %.0f\n',Acl);\n", +"printf('The input resistance =%.0f kΩ\n',R1/1000);\n", +"printf('The output resistance =%.0f Ω\n',Ro);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.2: Find_the_output_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Find the output voltage\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"\n", +"R1=20*10^3;//ohm\n", +"Rf=2000*10^3;//ohm\n", +"v1=4;//V\n", +"v2=3.8;//V\n", +"vo=v2*(1+Rf/R1)-(Rf/R1)*v1;\n", +"printf('The output voltage= %.1f V',vo);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.4: Design_an_adder_circuit_using_an_op_amp.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Design an adder circuit using an op amp\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"\n", +"//Vo=-(V1+10*V2+100*V3)\n", +"Rf=100*10^3;//ohm\n", +"C1=1; //coefficient of V1\n", +"C2=10; //coefficient of V2\n", +"C3=100; //coefficient of V3\n", +"R1=Rf/C1;\n", +"R2=Rf/C2;\n", +"R3=Rf/C3;\n", +"printf('R1 = %.0f kΩ\n',R1/1000);\n", +"printf('R2 = %.0f kΩ\n',R2/1000);\n", +"printf('R3 = %.0f kΩ\n',R3/1000);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.5: Calculate_CMRR_in_dB.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Calculate CMRR in dB\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"\n", +"Ad=100; //differential mode gain\n", +"Ac=0.01; //common mode gain\n", +"CMRR=20*log10(Ad/Ac);\n", +"printf('The CMRR in dB %.0f dB',CMRR);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.6: Calculate_the_output_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Calculate the output voltage\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"\n", +"Ad=2000; //differential mode gain\n", +"CMRR=10000;\n", +"V1=10^-3;//V\n", +"V2=0.9*10^-3;//V\n", +"Vd=V1-V2;\n", +"Vc=(V1+V2)/2;\n", +"Vo=Ad*Vd*(1+Vc/(CMRR*Vd));\n", +"printf('The output voltage is %.2f mV',Vo*1000);" + ] + } +], +"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/Electronic_Devices_and_Circuits_by_D_C_Kulshreshtha/15-Electronic_Instruments.ipynb b/Electronic_Devices_and_Circuits_by_D_C_Kulshreshtha/15-Electronic_Instruments.ipynb new file mode 100644 index 0000000..ffd29fa --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_D_C_Kulshreshtha/15-Electronic_Instruments.ipynb @@ -0,0 +1,281 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 15: Electronic Instruments" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.1: Calculate_shunt_resistance_and_multiplying_factor.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Calculate shunt resistance and multiplying factor\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"\n", +"Im=5*10^-3;//A\n", +"Rm=20;//ohm\n", +"I=5;//A\n", +"Rsh=Rm*Im/(I-Im);\n", +"n=I/Im;\n", +"printf('Shunt resistance= %.5f Ω\n',Rsh);\n", +"printf('Multiplying factor= %.0f',n);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.2: Calculate_shunt_resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Calculate shunt resistance\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"\n", +"//At I= 1 mA\n", +"I1=1*10^-3;//A\n", +"Im=0.1*10^-3;//A\n", +"Rm=500;//ohm\n", +"Rsh=Rm*Im/(I1-Im);\n", +"printf('Shunt resistance= %.4f Ω\n',Rsh);\n", +"\n", +"\n", +"//At I= 1 mA\n", +"I2=10*10^-3;//A\n", +"Rsh=Rm*Im/(I2-Im);\n", +"printf('Shunt resistance= %.4f Ω\n',Rsh);\n", +"\n", +"\n", +"//At I= 1 mA\n", +"I3=100*10^-3;//A\n", +"Rsh=Rm*Im/(I3-Im);\n", +"printf('Shunt resistance= %.4f Ω\n',Rsh);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.3: Caluclate_the_series_resistance_to_convert_it_into_voltmeter.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Caluclate the series resistance to convert it into voltmeter\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"\n", +"Im=100*10^-6;//A\n", +"Rm=100;//ohm\n", +"V=100;//V\n", +"Rs=V/Im-Rm;\n", +"printf('The value of series resistance is %.1f kΩ',Rs/1000);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.4: Calculate_multiplier_resistance_and_voltage_multiplying_factor.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Calculate multiplier resistance and voltage multiplying factor\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"\n", +"Im=50*10^-6;//A\n", +"Rm=1000;//ohm\n", +"V=50;//V\n", +"Rs=V/Im-Rm;\n", +"printf('The value of multiplier resistance is %.0f kΩ\n',Rs/1000);\n", +"Vm=Im*Rm;\n", +"n=V/Vm;\n", +"printf('Voltage multiplying factor =%.0f',n);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.5: Calculate_reading_and_error_of_each_voltmeter.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Calculate reading and error of each voltmeter\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"\n", +"function [z]=prll(r1,r2)//Function for the parallel combination of resistor\n", +" z=r1*r2/(r1+r2);\n", +"endfunction\n", +"\n", +"//given\n", +"\n", +"S_A=1000;// Ω/V //sensitivity\n", +"S_B=20000;// Ω/V //sensitivity\n", +"R=50;//V //range of voltmeter\n", +"Vs=150;//V //Supply\n", +"R1=100*10^3;//ohm\n", +"R2=50*10^3;//ohm\n", +"Vt=Vs*(R2/(R1+R2));\n", +"\n", +"//Voltmeter A\n", +"Ri1=S_A*R;\n", +"Rxy_A=prll(Ri1,R2); //total resistance at X and Y\n", +"V1=Vs*(Rxy_A/(Rxy_A+R1));\n", +"printf('The voltmeter indicates %.0f V\n',V1);\n", +"\n", +"//Voltmeter B\n", +"Ri2=S_B*R;\n", +"Rxy_B=prll(Ri2,R2); //total resistance at X and Y\n", +"V2=Vs*(Rxy_B/(Rxy_B+R1));\n", +"printf('The voltmeter indicates %.2f V\n',V2);\n", +"\n", +"e1=(Vt-V1)*100/Vt;\n", +"e2=(Vt-V2)*100/Vt;\n", +"printf('The error in the reading of voltmeter A = %.0f percent\n',e1);\n", +"printf('The error in the reading of voltmeter A = %.1f percent',e2);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.6: Determine_rms_value_of_the_ac_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Determine rms value of the ac voltage\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"\n", +"l=8.3;//cm //length of the trace\n", +"D=5;// V/cm //deflection sensitivity\n", +"Vpp=l*D;\n", +"Vrms=Vpp/(2*sqrt(2));\n", +"printf('The rms value of the ac voltage %.2f V',Vrms);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.7: Determine_rms_value_and_frequency_of_the_sine_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Determine rms value and frequency of the sine voltage\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"\n", +"l=3.5;//cm //length of the trace\n", +"D=2;// V/cm //deflection sensitivity\n", +"Vpp=l*D;\n", +"Vrms=Vpp/sqrt(2);\n", +"printf('The rms value of the sine voltage = %.2f V\n',Vrms);\n", +"x=4;// cm //one cycle length on x axis\n", +"t=0.5*10^-3;// s/cm //timebase setting\n", +"T=x*t;\n", +"f=1/T;\n", +"printf('The frequency of the sine voltage = %.1f kHz',f/1000);" + ] + } +], +"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/Electronic_Devices_and_Circuits_by_D_C_Kulshreshtha/2-Semiconductor_Physics.ipynb b/Electronic_Devices_and_Circuits_by_D_C_Kulshreshtha/2-Semiconductor_Physics.ipynb new file mode 100644 index 0000000..34aa4a2 --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_D_C_Kulshreshtha/2-Semiconductor_Physics.ipynb @@ -0,0 +1,96 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 2: Semiconductor Physics" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.1: Calculate_the_conductivity_and_resistivity_of_germanium.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Calculate the conductivity and resistivity of germanium\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"q=1.6*10^-19;//Coulomb //charge of an electron\n", +"ni=2.5*10^19;//per m^3 //concentration\n", +"un=0.36;//m^2/Vs //mobility of electron\n", +"up=0.17;//m^2/Vs //mobility of holes\n", +"con=q*ni*(un+up); //conductivity\n", +"res=(1/con); //resistivity\n", +"printf('The conductivty is %.2f S/m \n',con);\n", +"printf('The resistivity is %.2f Ωm',res);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.2: Determine_the_conductivity_of_extrinsic_semiconductor.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Determine the conductivity of extrinsic semiconductor\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"e=1.6*10^-19;//Coulomb //charge of an electron\n", +"ni=1.5*10^16;//per m^3 //concentration\n", +"un=0.13;//m^2/Vs //mobility of electron\n", +"up=0.05;//m^2/Vs //mobility of holes\n", +"Si=5*10^28;//per m^3 //atomic density in silicon\n", +"dop=(1/(2*10^8)); //concentration of an antimony per silicon atoms\n", +"Nd=dop*Si;//per m^3 //donor concentraion\n", +"n=Nd;//per m^3 //free electron concentration\n", +"p=(ni^2/Nd);//per m ^3 // hole concentration\n", +"con=e*(n*un+p*up);\n", +"printf('The conductivty is %.1f S/m \n',con);" + ] + } +], +"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/Electronic_Devices_and_Circuits_by_D_C_Kulshreshtha/3-Semiconductor_Diode.ipynb b/Electronic_Devices_and_Circuits_by_D_C_Kulshreshtha/3-Semiconductor_Diode.ipynb new file mode 100644 index 0000000..f765fd6 --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_D_C_Kulshreshtha/3-Semiconductor_Diode.ipynb @@ -0,0 +1,546 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 3: Semiconductor Diode" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.10: find_dc_power_supplied_to_load_and_efficiency_and_PIV_rating_of_the_diode.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//find dc power supplied to load and efficiency and PIV rating of the diode\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"rf=2;//Ω//Dynamic forward resistance\n", +"Rs=5;//Ω//resistaqnce of secondary\n", +"Rl=25;//Ω//Load resistance\n", +"Idc=0.1;//A//dc current to a load\n", +"Pdc=Idc^2*Rl; //dc power\n", +"n=(81.2*Rl)/(Rl+rf+Rs); //efficiency\n", +"Im=(%pi*Idc)/2; //peak value current\n", +"Vm=Im*(Rl+rf+Rs); //peak voltage\n", +"Vlm=Vm-Im*(rf+Rs); //peak voltage across load\n", +"PIV=Vm+Vlm;\n", +"printf('The dc power supplied to the load is %.2f W\n',Pdc);\n", +"printf('Efficiency = %.2f percent\n',n);\n", +"printf('The peak inverse voltage is %.2f V',PIV);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.11: EX3_11.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Calculate output voltage and current through load and voltage across series resistor and current and power dissipated in zener diode\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"Vi=110;//V //input voltage\n", +"Rl=6*10^3;// ohm //load resistance\n", +"Rs=2*10^3;//ohm //series resistance\n", +"Vz=60;//V //Zener voltage\n", +"V=Vi*Rl/(Rs+Rl);\n", +"\n", +"//This V>Vz therefore Zener diode is ON\n", +"\n", +"Vo=Vz; //output voltage\n", +"Il=Vo/Rl; //Current through load resistance\n", +"Vs=Vi-Vo; //Voltage drop across the series resistor\n", +"Is=Vs/Rs //current through the series resistor\n", +"Iz=Is-Il ///By applying kirchhoff's law\n", +"Pz=Vz*Iz //Power dissipated accross zener diode\n", +"\n", +"printf('The output voltage is %.0f V\n',Vo);\n", +"printf('The current through load resistance is %.0f mA\n',Il*1000);\n", +"printf('Voltage across series resistor is %.0f V\n',Vs)\n", +"printf('Current in zener diode is %.0f mA\n',Iz*1000)\n", +"printf('Power dissipated by zener diode %.0f mW',Pz*1000);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.12: Calculate_max_and_min_values_of_zener_diode_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"//Calculate max and min values of zener diode current\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"Vimin=80;//V //minimum input voltage\n", +"Vimax=120;//V //maximum input voltage\n", +"Rl=10*10^3;// ohm //load resistance\n", +"Rs=5*10^3;//ohm //series resistance\n", +"Vz=50;//V //Zener voltage\n", +"V=Vimin*Rl/(Rs+Rl);\n", +"\n", +"//This V>Vz therefore Zener diode is ON\n", +"\n", +"//For minimum value of zener diode\n", +"\n", +"Vo=Vz; //output voltage\n", +"Vs=Vimin-Vo; //Voltage drop across the series resistor\n", +"Is=Vs/Rs //current through the series resistor\n", +"Il=Vo/Rl; //Current through load resistance\n", +"Izmin=Is-Il;\n", +"printf('\nMinimum values of zener diode current is %.0f mA\n',Izmin*1000);\n", +"\n", +"//For maximum value of zener diode\n", +"\n", +"Vo=Vz; //output voltage\n", +"Vs=Vimax-Vo; //Voltage drop across the series resistor\n", +"Is=Vs/Rs //current through the series resistor\n", +"Il=Vo/Rl; //Current through load resistance\n", +"Izmax=Is-Il;\n", +"printf('Maximum values of zener diode current is %.0f mA',Izmax*1000);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.13: determine_value_of_the_series_resistor_and_wattage_rating.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//determine value of the series resistor and wattage rating\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"Vi=12;//V //input voltage\n", +"Vz=7.2;//V //Zener voltage\n", +"Izmin=10*10^-3;//A //min current through zener diode\n", +"Ilmax=100*10^-3;//A //max current through load\n", +"Ilmin=12*10^-3;//A //min current through load\n", +"\n", +"Vs=Vi-Vz; //Voltage drop across the series resistor\n", +"Is=Izmin+Ilmax; //Current through the series resistor\n", +"Rs=Vs/Is;\n", +"printf('The series resistor so that 10mA current flow through zener diode is %.1f Ω\n',Rs);\n", +"\n", +"Izmax=Is-Ilmin; //max zener through zener diode\n", +"Pmax=Izmax*Vz;\n", +"printf('The maximum wattage rating is %.1f mW',Pmax*1000);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.14: Find_the_capacitance_of_a_varactor_diode.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Find the capacitance of a varactor diode\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"C=5;//pf//capcitance of varactor diode at V=4V\n", +"V=4;//V\n", +"K=C*sqrt(4);\n", +"\n", +"//When bias voltage is increased upto 6 V\n", +"Vn=6;//V//new bias voltage\n", +"Cn=K/(sqrt(Vn));\n", +"printf('Capacitance (At 6 V ) = %.3f pf',Cn);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.1: find_the_value_of_threshold_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//find the value of threshold voltage\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"t1=25;//°C//initial temperature\n", +"t2=100;//°C//final temperature\n", +"V=2*10^-3;//V per celsius degree//decrease in barrier potential per degree\n", +"V0=0.7//V//Potential at normal temperature\n", +"Vd=(t2-t1)*V;//decrease in barrier potential\n", +"Vt=V0-Vd;//threshold volatge at 100°C\n", +"printf('Threshold volatge at 100°C = %.2f V',Vt);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.2: detrenmine_dc_resistance_of_silicon_diode.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//detrenmine dc resistance of silicon diode\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"\n", +"//At Id = 2 mA\n", +"Id=2*10^-3;//Ampere//diode current\n", +"Vd=0.5;//V//voltage(from given curve)\n", +"Rf=(Vd/Id);\n", +"printf('The dc resistance is %d Ω\n',Rf);\n", +"\n", +"//At Id = 20 mA\n", +"Id=20*10^-3;//Ampere//diode current\n", +"Vd=0.75;//V//voltage(from given curve)\n", +"Rf=(Vd/Id);\n", +"printf('The dc resistance is %.1f Ω\n',Rf);\n", +"\n", +"//At Vd = - 10 V \n", +"Id=-2*10^-6;//Ampere//diode current(from given curve)\n", +"Vd=-10;//V//voltage\n", +"Rf=(Vd/Id);\n", +"printf('The dc resistance is %d MΩ\n',Rf/10^6);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.3: determine_dc_and_ac_resistance_of_silicon_diode.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//determine dc & ac resistance of silicon diode\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"Id=20*10^-3;//A//diode current\n", +"Vd=0.75;//V// as given in the V-I graph\n", +"Rf=Vd/Id;\n", +"printf('The dc resistance of diode is %.1f Ω\n',Rf);\n", +"\n", +"//From Graph the values of dynamic voltage and current are\n", +"//which is equal to MN and NL repectively (in graph)\n", +"del_Vd=(0.8-0.68);//V\n", +"del_Id=(40-0)*10^-3;//A\n", +"rf=del_Vd/del_Id;\n", +"printf('The ac resistance of the diode is %d Ω',rf)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.4: determine_ac_resistance_of_silicon_diode.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//determine ac resistance of silicon diode\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"\n", +"//At Id =10mA\n", +"Id=10;//mA\n", +"rf=25/Id;\n", +"printf('The ac resistance of the diode is(At Id= 10mA) %.1f Ω\n',rf)\n", +"\n", +"//At Id =20mA\n", +"Id=20;//mA\n", +"rf=25/Id;\n", +"printf('The ac resistance of the diode is(At Id= 20mA) %.2f Ω',rf)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.5: Find_current_through_diode.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Find current through diode\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"Vt=0.3;//V//Threshold voltage\n", +"rf=25;//ohm// average resistance\n", +"\n", +"//assuming it to be ideal\n", +"//from fig 3.19\n", +"Vaa=10;//V//supply\n", +"R1=45;//ohm\n", +"R2=5;//ohm\n", +"Vab=Vaa*R2/(R1+R2);\n", +"//Vab>Vt therefore diode is forward bias and no current flow through R2\n", +"Idi=Vaa/R1; //for ideal\n", +"printf('The diode current (for ideal) is %.0f mA\n',Idi*1000);\n", +"\n", +"//assuming it to be real\n", +"//Thevenin's equivalent circuit parameters of fig 3.19\n", +"Vth=Vaa*R2/(R1+R2);\n", +"Rth=R1*R2/(R1+R2);\n", +"Idr=(Vth-Vt)/(Rth+rf); //for real\n", +"printf('The diode current (for real) is %.1f mA',Idr*1000);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.6: Find_current_through_resistance_in_given_figure.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Find current through resistance in given figure\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"\n", +"//From fig\n", +"Vaa=20;//V//supply\n", +"Vt=0.7;//V//threshold voltage of diode\n", +"rf=5;//ohm //forward resistance\n", +"R=90;//ohm//given resistor\n", +"\n", +"//Diode D1 and D4 are forward bias and D2 and D3 are reverse biased\n", +"\n", +"Vnet=Vaa-Vt-Vt;\n", +"Rt=R+rf+rf;\n", +"I=Vnet/Rt;\n", +"printf('Current through 90 ohm resistor is %.0f mA',I*1000);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.7: Find_current_drawn_by_the_battery.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Find current drawn by the battery\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"\n", +"//From fig\n", +"Vaa=10;//V//supply\n", +"R1=100;//ohm\n", +"R2=100;//ohm\n", +"\n", +"//Forward Bias\n", +"Id=Vaa/R1;\n", +"printf('Current drawn from battery (forward bias) %.1f A\n',Id);\n", +"\n", +"//Reverse Bias\n", +"Rnet=R1+R2;\n", +"Id=Vaa/Rnet;\n", +"printf('Current drawn from battery (reverse bias) %.2f A',Id);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.8: EX3_8.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//determine dc current through load and rectification efficiency and peak inverse voltage\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"TR=31/2;//Turn ratio of the transformer\n", +"rf=20;//Ω//Dynamic forward resistance\n", +"Rl=1000;//Ω//Load resistance\n", +"Vt=0.66;//V//Threshold voltage of diode\n", +"V=220;//V//input voltage of transformer\n", +"Vp=sqrt(2)*220//V//peak value of primary voltage\n", +"Vm=(1/TR)*Vp;\n", +"Im=(Vm-Vt)/(rf+Rl);\n", +"Idc=Im/%pi;\n", +"n=40.6/(1+rf/Rl);\n", +"printf('The dc current through load is %d mA\n',Idc*1000);\n", +"printf('The rectification efficiency is %.1f percent\n',n);\n", +"printf('Peak inverse voltage =Vm = %.2f V\n',Vm)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.9: determine_dc_voltage_across_load_and_peak_inverse_voltage_across_each_diode.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//determine dc voltage across load and peak inverse voltage across each diode\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"TR=12/1;//Turn ratio of the transformer\n", +"V=220;//V//input voltage of transformer\n", +"Vp=sqrt(2)*220//V//peak value of primary voltage\n", +"Vm=(1/TR)*Vp;\n", +"Vdc=(2*Vm)/%pi;\n", +"printf('The dc voltage across load %.1f V\n',Vdc);\n", +"printf('Peak inverse voltage (for bridge rectifier) = %.1f V\n',Vm);\n", +"printf('Peak inverse voltage (for centre tap rectifier) = %.2f V\n',2*Vm);" + ] + } +], +"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/Electronic_Devices_and_Circuits_by_D_C_Kulshreshtha/4-Bipolar_Junction_Transistors.ipynb b/Electronic_Devices_and_Circuits_by_D_C_Kulshreshtha/4-Bipolar_Junction_Transistors.ipynb new file mode 100644 index 0000000..25c3508 --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_D_C_Kulshreshtha/4-Bipolar_Junction_Transistors.ipynb @@ -0,0 +1,355 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 4: Bipolar Junction Transistors" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.10: calculate_ac_current_gain_in_CE_and_CC_configuration.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//calculate ac current gain in CE and CC configuration\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"a=0.99;\n", +"B=a/(1-a);\n", +"printf('The ac current gain in CE configuration is %.0f\n',B);\n", +"y=1+B;\n", +"printf('The ac current gain in CC configuration is %.0f',y);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.1: determine_the_collector_and_base_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//determine the collector and base current\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"a=0.98;//dc alpha\n", +"Ie=5*10^-3;//A//emitter current\n", +"Ico=2*10^-6;//A//collector reverse leakage current\n", +"Ic=a*Ie+Ico;\n", +"Ib=Ie-Ic;\n", +"printf('The collector current is %.3f mA\n',Ic*1000);\n", +"printf('The base current is %.0f uA',Ib*10^6);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.2: determine_the_base_and_collector_current_and_exact_and_approax_dc_alpha.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//determine the base and collector current and exact and approax dc alpha \n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"Ie=8.4*10^-3//A//emitter current\n", +"Icbo=0.1*10^-6;//A//reverse leakage current\n", +"Ib=0.008*Ie;//A//base current\n", +"Ic=Ie-Ib;\n", +"Icinj=Ic-Icbo;\n", +"a0=Icinj/Ie;\n", +"a=Ic/Ie;\n", +"printf('Base current is %.1f uA\n',Ib*10^6);\n", +"printf('Collector current %.4f mA\n',Ic*1000);\n", +"printf('Exact value of alphha = %.7f\n',a0);\n", +"printf('Approax value of alpha = %.3f',a);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.3: Determine_the_base_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Determine the base current\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"a=0.96; //dc alpha\n", +"Rc=2*10^3;//ohm //resistor across collector\n", +"Vc=4;//V //Voltage drop across the collector resistor\n", +"Ic=Vc/Rc; //Colletor current\n", +"Ie=Ic/a; //Emmiter current\n", +"Ib=Ie-Ic; //Base current\n", +"printf('The base current is %.0f uA',Ib*10^6)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.4: determine_dynamic_input_resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//determine dynamic input resistance\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"Ie=2;//mA\n", +"Vcb=10;//V\n", +"\n", +"//Taking points around Ie & Vcb from graph\n", +"del_Ie=(2.5-1.5)*10^-3;//A\n", +"\n", +"//corresponding change in Veb\n", +"del_Veb=(0.9-0.8);//V\n", +"rib=del_Veb/del_Ie;\n", +"printf('The dynamic input resistance of transistor is %.0f Ω',rib);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.5: find_dc_current_gain_in_common_emitter_configuration.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//find dc current gain in common emitter configuration\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"a=0.98;//dc current gain in common base configuration\n", +"B=a/(1-a);\n", +"printf('The dc current gain in common emitter configuration is %.0f',B);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.6: calculate_ac_alpha_and_beta.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//calculate ac alpha and beta\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"ic=0.995//mA//Emitter current change\n", +"ie=1//mA//collector current change\n", +"a=ic/ie;\n", +"B=a/(1-a);\n", +"printf('The ac alpha is %.3f\n',a)\n", +"printf('The common emitter ac current gain is %.0f',B);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.7: Calculate_beta_and_Iceo_and_exact_and_approax_collector_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Calculate beta and Iceo and exact and approax collector current\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"a0=0.992;//dc current gain in common base configuration\n", +"Icbo=48*10^-9;//A\n", +"Ib=30*10^-6;//A//base current\n", +"B=a0/(1-a0);\n", +"Iceo=Icbo/(1-a0);\n", +"printf('Beta= %.0f\n',B);\n", +"printf('Iceo= %0.f uA\n',Iceo*10^6);\n", +"Ic=B*Ib+Iceo;\n", +"Ica=B*Ib;//approax\n", +"printf('Exact collector current %.3f mA\n',Ic*1000);\n", +"printf('Approax collector current %.2f mA',Ica*1000);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.8: determine_dynamic_input_resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//determine dynamic input resistance\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"Vbe=0.75;//V\n", +"Vce=2;//V\n", +"\n", +"//Taking points around Vbe=0.75V from graph\n", +"del_Vbe=(0.98-0.9);//V\n", +"\n", +"//corresponding change in ib\n", +"del_ib=(68-48)*10^-6;//A\n", +"\n", +"rie=del_Vbe/del_ib;\n", +"printf('The dynamic input resistance of transistor is %.0f kΩ',rie/1000);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.9: determine_dynamic_input_resistance_and_dc_and_ac_current_gain.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//determine dynamic input resistance and dc and ac current gain\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"Ib=30*10^-6;//A\n", +"Vce=10;//V\n", +"Ic=3.6*10^-3;//A //from graph\n", +"\n", +"//Taking points around Vce = 10V from graph\n", +"del_Vce=(12.5-7.5);//V\n", +"\n", +"//corresponding change in ic\n", +"del_ic=(3.7-3.5)*10^-3;//A\n", +"\n", +"roe=del_Vce/del_ic;\n", +"printf('The dynamic output resistance of transistor is %.0f kΩ\n',roe/1000);\n", +"\n", +"//dc current gain\n", +"Bo=Ic/Ib;\n", +"printf('The dc current gain is %.0f\n',Bo);\n", +"\n", +"//ac current gain\n", +"\n", +"del_ic=(4.7-2.5)*10^-3; //the collector current change is from 3.5mA to 4.7mA as we can see from graph when we change ib from 40mA to 20mA\n", +"del_ib=(40-20)*10^-6;\n", +"B=del_ic/del_ib;\n", +"printf('The ac current gain is %.0f\n',B);" + ] + } +], +"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/Electronic_Devices_and_Circuits_by_D_C_Kulshreshtha/5-Field_Effect_Transistors.ipynb b/Electronic_Devices_and_Circuits_by_D_C_Kulshreshtha/5-Field_Effect_Transistors.ipynb new file mode 100644 index 0000000..7b747d7 --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_D_C_Kulshreshtha/5-Field_Effect_Transistors.ipynb @@ -0,0 +1,301 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 5: Field Effect Transistors" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.1: Calculate_saturation_voltage_and_saturation_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Calculate saturation voltage and saturation current\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"Vp=-4//V //pinch off voltage\n", +"Idss=12*10^-3;//A //drain to source current with gate shorted\n", +"Vgs=-2;//V //gate to source voltage\n", +"Vds=Vgs-Vp;\n", +"Id=Idss*(Vds/Vp)^2;\n", +"printf('Saturation Voltage is %.0f V\n',Vds);\n", +"printf('Saturation current is %.0f mA',Id*10^3);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.2: Find_the_value_of_drain_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Find the value of drain current\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"Vgso=-5;//V //gate to source cut off voltage\n", +"Idss=20*10^-3;//A //drain to source current with gate shorted\n", +"\n", +"//At vgs = -2 V\n", +"vgs=-2;//V input voltage\n", +"id=Idss*(1-(vgs/Vgso))^2; //Schockley's equation\n", +"printf('Drain current is (At vgs = -2 V) %.1f mA\n',id*10^3);\n", +"\n", +"//At vgs = -4 V\n", +"vgs=-4;//V input voltage\n", +"id=Idss*(1-(vgs/Vgso))^2; //Schockley's equation\n", +"printf('Drain current is (At vgs = -4 V) %.1f mA\n',id*10^3);\n", +"\n", +"//At vgs = -8 V\n", +"printf('Drain current is 0 A (At vgs = -8 V) because gate is biased beyond cut off ');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.3: Calculate_Vgs_and_Vds_saturation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Calculate Vgs and Vds saturation\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"Vp=5//V //pinch off voltage\n", +"Idss=-15*10^-3;//A //drain to source current with gate shorted\n", +"Id=-3*10^-3;//A //saturation current\n", +"Vgs=Vp*(1-sqrt(Id/Idss));\n", +"Vds=Vgs-Vp;\n", +"printf('The gate to source voltage (Vgs) is %.3f V\n',Vgs);\n", +"printf('The saturation voltage is Vds(sat)= %.3f V',Vds);\n", +"\n", +"// THe value of Vgs = 2.115V and Vds= -2.885V in book because of the calculation error" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.4: Calculate_drain_current_Id_for_N_channel.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Calculate drain current Id for N channel\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"Vp=5//V //pinch off voltage\n", +"Idss=18*10^-3;//A //drain to source current with gate shorted\n", +"\n", +"//For Vgs= - 3 V\n", +"Vgs=-3;//V\n", +"Id=Idss*(1-(Vgs/(-Vp)))^2;\n", +"printf('The drain current Id(For Vgs= -3V) = %.2f mA\n',Id*10^3);\n", +"\n", +"//For Vgs= 2.5 V\n", +"Vgs=2.5;//V\n", +"Id=Idss*(1-(Vgs/(-Vp)))^2;\n", +"printf('The drain current Id(For Vgs= 2.5V) = %.1f mA',Id*10^3);\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.5: Calculate_drain_current_Id_for_P_channel.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Calculate drain current Id for P channel\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"Vp=-5//V //pinch off voltage\n", +"Idss=18*10^-3;//A //drain to source current with gate shorted\n", +"\n", +"//For Vgs= -3V\n", +"Vgs=-3;//V\n", +"Id=Idss*(1-(Vgs/(-Vp)))^2;\n", +"printf('The drain current Id (For Vgs= -3V) = %.2f mA\n',Id*10^3);\n", +"\n", +"//For Vgs= 2.5V\n", +"Vgs=2.5;//V\n", +"Id=Idss*(1-(Vgs/(-Vp)))^2;\n", +"printf('The drain current Id (For Vgs= 2.5V) = %.1f mA',Id*10^3);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.6: Find_the_value_of_drain_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Find the value of drain current\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"Vt=2;//V //threshold voltage\n", +"K=0.25*10^-3;// A/V^2 //conductivity parameter\n", +"Vgs=3;//V //gate supply\n", +"Vds=2;//V //saturation voltage\n", +"Vdsm=Vgs-Vt; //minimum voltage required to pinch off\n", +"\n", +"// Vds > Vdsm therefore the device is in saturation region\n", +"\n", +"Id=K*(Vgs-Vt)^2;\n", +"printf('The drain current is %.2f mA',Id*1000);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.7: Find_the_value_of_Id.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Find the value of Id\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"Vt=1.5;//V //threshold voltage\n", +"Id=2*10^-3;//A\n", +"Vgs=3;//V //gate supply\n", +"Vds=5;//V //saturation voltage\n", +"Vdsm=Vgs-Vt; //minimum voltage required to pinch off\n", +"\n", +"// Vds > Vdsm therefore the device is in saturation region\n", +"\n", +"// Calculating K\n", +"K=Id/((Vgs-Vt)^2); // A/V^2 //conductivity parameter\n", +"\n", +"//Calculating Id for Vgs= 5 V and Vds= 6 V\n", +"Vgs=5;//V //gate supply\n", +"Vds=6;//V //saturation voltage\n", +"Id=K*((Vgs-Vt)^2);\n", +"printf('The drain current is %.2f mA',Id*1000);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.8: Calculate_the_dynamic_drain_resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Calculate the dynamic drain resistance\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"gm=200*10^-6;//S trans conductance\n", +"u=80;// amplification factor\n", +"rd=u/gm;\n", +"printf('The dynamic drain resistance is %.0f kΩ',rd/1000);" + ] + } +], +"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/Electronic_Devices_and_Circuits_by_D_C_Kulshreshtha/6-Transistor_Biasing_and_Stabilization.ipynb b/Electronic_Devices_and_Circuits_by_D_C_Kulshreshtha/6-Transistor_Biasing_and_Stabilization.ipynb new file mode 100644 index 0000000..0521c2c --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_D_C_Kulshreshtha/6-Transistor_Biasing_and_Stabilization.ipynb @@ -0,0 +1,603 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 6: Transistor Biasing and Stabilization" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.10: Determine_the_collector_current_at_two_different_B.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Determine the collector current at two different B\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"\n", +"//At B=50\n", +"\n", +"B=50; //dc beta\n", +"Rc=2;//ohm //resistor connected to collector\n", +"Re=1000;//ohm //resistor connected to emitter\n", +"Rb=300*10^3;//ohm //resistor connected to base\n", +"Vcc=9;//V //Voltage supply across the collector resistor\n", +"Ib=Vcc/(Rb+B*Re); //Base current\n", +"Ic=B*Ib; //Colletor current\n", +"printf('the collector current at (B=50)= %.3f mA\n',Ic*1000);\n", +"\n", +"//At B=150\n", +"\n", +"B1=150; //dc beta\n", +"Ib1=Vcc/(Rb+B1*Re); //Base current\n", +"Ic1=B1*Ib1; //Colletor current\n", +"printf('the collector current at (B=150)= %.0f mA\n',Ic1*1000);\n", +"printf('The factor at which collector current increases %.2f',Ic1/Ic);\n", +"\n", +"//IN BOOK Ic(AT B=50)= 1.25 mA and Ic1/Ic=2.4 DUE TO APPROAXIMATION" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.11: Calculate_Q_point_in_voltage_divider.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Calculate Q point in voltage divider\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"B=100; //dc beta\n", +"Rc=2*10^3;//ohm //resistor connected to collector\n", +"R1=10*10^3;//ohm //voltage divider resistor 1\n", +"R2=1*10^3;//ohm //voltage divider resistor 2\n", +"Re=200;//ohm //resistor connected to emitter\n", +"Vcc=10;//V //Voltage supply across the collector resistor\n", +"Vbe=0.3;//V //base to emitter voltage\n", +"\n", +"I=Vcc/(R1+R2); //current through voltage divider\n", +"Vb=I*R2; //voltage at base\n", +"Ve=Vb-Vbe;\n", +"Ie=Ve/Re;\n", +"Ic=Ie //approaximating Ib is nearly equal to 0\n", +"Vc=Vcc-Ic*Rc;\n", +"Vce=ceil(Vc)-Ve; \n", +"printf('The Q point is (%.1f V, %.0f mA)',Vce,Ic*1000);\n", +"\n", +"Ibc=I/20; //critical value of base current\n", +"Ib=Ic/B; //actual base current\n", +"\n", +"//Since Ib < Ibc, hence assumption is alright" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.12: Solve_the_voltage_divider_accurately_by_applying_thevenins_theorem.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"//Solve the voltage divider accurately by applying thevenin's theorem\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"B=100; //dc beta\n", +"Rc=2*10^3;//ohm //resistor connected to collector\n", +"R1=10*10^3;//ohm //voltage divider resistor 1\n", +"R2=1*10^3;//ohm //voltage divider resistor 2\n", +"Re=200;//ohm //resistor connected to emitter\n", +"Vcc=10;//V //Voltage supply across the collector resistor\n", +"Vbe=0.3;//V //base to emitter voltage\n", +"\n", +"Vth=Vcc*R2/(R1+R2);\n", +"Rth=R1*R2/(R1+R2);\n", +"\n", +"printf('\nThevenin equivalent voltage Vth = %.5f V',Vth);\n", +"printf('\nThevenin equivalent resistance Rth = %.2f ohm',Rth);\n", +"\n", +"Ib=(Vth-Vbe)/(Rth+(1+B)*Re);\n", +"Ic=B*Ib;\n", +"Ie=Ic+Ib;\n", +"Vce=Vcc-Ic*Rc-Ie*Re; \n", +"printf('\nThe accurate value of Ic = %.5f mA',Ic*10^3);\n", +"printf('\nThe accurate value of Vce = %.6f V',Vce);\n", +"Icp=3*10^-3; // Current calculated by voltage divider in previous example\n", +"Vcep=3.4; // Voltage calculated by voltage divider in previous example\n", +"Err_Ic=(Ic-Icp)*100/Ic;\n", +"Err_Vce=(Vce-Vcep)*100/Vce;\n", +"printf('\nError in Ic= %.1f percent\n',Err_Ic);\n", +"printf('Error in Vce= %.0f percent',Err_Vce);\n", +"\n", +"// The errors and The accurate values are different \n", +"// because of the approaximation in Vth and Rth in book\n", +"\n", +"// In Book Ic = 2.8436 mA and Vce = 3.73839 V\n", +"// Error in Ic = -5.5% \n", +"// Error in Vce = +9% \n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.13: determine_the_Q_point_for_the_emitter_bias_circuit.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//determine the Q point for the emitter bias circuit\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"B=100; //dc beta\n", +"Rc=5*10^3;//ohm //resistor connected to collector\n", +"Rb=10*10^3;//ohm //resistor connected to base\n", +"Re=10*10^3;//ohm //resistor connected to emitter\n", +"Vcc=12;//V //Voltage supply across the collector resistor\n", +"Vee=15;//V //supply at emitter\n", +"Ie=Vee/Re;\n", +"Ic=Ie;\n", +"Vce=Vcc-Ic*Rc;\n", +"printf('The Q point is (%.1f V, %.1f mA)',Vce,Ic*1000);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.14: Calculate_Vgs_and_Rs.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Calculate Vgs and Rs\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"\n", +"Vp=2;//V\n", +"Idss=1.75*10^-3;//A //drain current at Vgs=0\n", +"Vdd=24;//V //drain to supply source\n", +"Id=1*10^-3;//A //drain current\n", +"Vgs=(-Vp)*(1-sqrt(Id/Idss));\n", +"Rs=abs(Vgs)/Id;\n", +"printf('Vgs = %.3f V\n',Vgs);\n", +"printf('Rs = %.0f Ω',Rs);\n", +" " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.1: Determine_the_Q_point.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Determine the Q point\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"B=50; //dc beta\n", +"Rc=2.2*10^3;//ohm //resistor connected to collector\n", +"Rb=270*10^3;//ohm //resistor connected to base\n", +"Vcc=9;//V //Voltage supply across the collector resistor\n", +"Vbe=0.7;//V //base to emitter voltage\n", +"Ib=(Vcc-Vbe)/Rb; //Base current\n", +"Ic=B*Ib; //Colletor current\n", +"Ics=Vcc/Rc; //Colletor saturation current\n", +"\n", +"//Actual Ic is the smaller of the above two values\n", +"\n", +"Vce=Vcc-Ic*Rc;\n", +"printf('The Q point is (%.2f V, %.1f mA)',Vce,Ic*1000);\n", +"//In book Vce = 5.7 V because of approaximation" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.2: Determine_the_Q_point.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Determine the Q point\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"B=150; //dc beta\n", +"Rc=1*10^3;//ohm //resistor connected to collector\n", +"Rb=100*10^3;//ohm //resistor connected to base\n", +"Vcc=10;//V //Voltage supply across the collector resistor\n", +"Vbe=0.7;//V //base to emitter voltage\n", +"Ib=(Vcc-Vbe)/Rb; //Base current\n", +"Ic=B*Ib; //Colletor current\n", +"Ics=Vcc/Rc; //Colletor saturation current\n", +"\n", +"//Actual Ic is the smaller of the above two values i.e. Ic(sat) and since the transistor is in saturation mode therefore Vce will become 0\n", +"\n", +"Vce=0;\n", +"printf('The Q point is (%d V, %.0f mA)',Vce,Ics*1000);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.3: Determine_Rb_and_percentage_change_in_collector_current_due_to_temperature_rise.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Determine Rb and percentage change in collector current due to temperature rise\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"\n", +"//Calculating the base resistance\n", +"B=20; //dc beta\n", +"Rc=1*10^3;//ohm //resistor connected to collector\n", +"Ic=1*10^-3;//A //collector current\n", +"Vcc=6;//V //Voltage supply across the collector resistor\n", +"Vbe=0.3;//V //for germanium\n", +"Icbo=2*10^-6;//A //collector to base leakage current\n", +"\n", +"Ib=(Ic-(1+B)*Icbo)/B;\n", +"Rb=(Vcc-Vbe)/Ib;\n", +"\n", +"printf('The value of resistor Ib is %.4f kΩ = 120 kΩ \n',Rb/1000);\n", +"\n", +"Rb=120*10^3;//ohm approax\n", +"\n", +"//Now when temperature rise\n", +"Icbo=10*10^-6;//A //collector to base leakage current\n", +"B=25; //dc beta\n", +"Ic1=B*Ib+(B+1)*Icbo; //changed collector current\n", +"perc=(Ic1-Ic)*100/Ic; //percentage increase\n", +"printf('The percentage change in collector current is %.0f percent',perc);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.4: Determine_the_Q_point_at_two_different_B.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Determine the Q point at two different B\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"\n", +"//At B=50\n", +"\n", +"B=50; //dc beta\n", +"Rc=2*10^3;//ohm //resistor connected to collector\n", +"Rb=300*10^3;//ohm //resistor connected to base\n", +"Vcc=9;//V //Voltage supply across the collector resistor\n", +"Ib=Vcc/Rb; //Base current\n", +"Ic=B*Ib; //Colletor current\n", +"Ics=Vcc/Rc; //Colletor saturation current\n", +"\n", +"//Actual Ic is the smaller of the above two values\n", +"\n", +"Vce=Vcc-Ic*Rc;\n", +"printf('The Q point (At B=50) is (%.0f V, %.1f mA)\n',Vce,Ic*1000);\n", +"\n", +"//At B=150\n", +"\n", +"B1=150; //dc beta\n", +"Ic1=B*Ib; //Colletor current\n", +"Ics1=Vcc/Rc; //Colletor saturation current\n", +"\n", +"//Actual Ic is the smaller of the above two values i.e. Ic(sat) and since the transistor is in saturation mode therefore Vce will become 0\n", +"\n", +"Vce=0;\n", +"printf('The Q point (At B=150) is (%d V, %.1f mA)\n',Vce,Ics*1000);\n", +"\n", +"printf('The factor at which collector current increases %.0f',Ics1/Ic);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.5: determine_Q_point_in_collector_to_base_bias_circuit.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//determine Q point in collector to base bias circuit\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"B=100; //dc beta\n", +"Rc=500;//ohm //resistor connected to collector\n", +"Rb=500*10^3;//ohm //resistor connected to base\n", +"Vcc=10;//V //Voltage supply across the collector resistor\n", +"Ib=Vcc/(Rb+B*Rc); //Base current\n", +"Ic=B*Ib; //Colletor current\n", +"Ics=Vcc/Rc; //Colletor saturation current\n", +"\n", +"//Actual Ic is the smaller of the above two values\n", +"\n", +"Vce=Vcc-(Ic+Ib)*Rc;\n", +"printf('The Q point is (%.1f V, %.1f mA)',Vce,Ic*1000);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.6: EX6_6.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Calculate the collector current and change in it if B is changed by three times of previous B\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"B=50; //dc beta\n", +"Rc=2*10^3;//ohm //resistor connected to collector\n", +"Rb=300*10^3;//ohm //resistor connected to base\n", +"Vcc=9;//V //Voltage supply across the collector as it is PNP so taking positive\n", +"Ib=Vcc/(Rb+B*Rc); //Base current\n", +"Ic=B*Ib; //Colletor current\n", +"printf('Collector current (B=50)= %.3f mA\n',Ic*1000);\n", +"//Now B=150\n", +"B=3*B; //three times of previous B\n", +"Ib1=Vcc/(Rb+B*Rc); //Base current\n", +"Ic1=B*Ib1; //Colletor current\n", +"printf('Collector current (B=150)= %.2f mA\n',Ic1*1000);\n", +"printf('The factor at which collector current increases %.0f',Ic1/Ic);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.7: Calculate_the_value_of_all_three_current_Ie_and_Ic_and_Ib.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Calculate the value of all three current Ie and Ic and Ib\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"B=90; //dc beta\n", +"Rc=1*10^3;//ohm //resistor connected to collector\n", +"Rb=500*10^3;//ohm //resistor connected to base\n", +"Re=500;//ohm //resistor connected to emitter\n", +"Vcc=9;//V //Voltage supply across the collector resistor\n", +"Ib=Vcc/(Rb+B*Re); //Base current\n", +"Ic=B*Ib; //Colletor current\n", +"Ie=Ic+Ib; //Emitter current\n", +"printf('Base current = %.1f uA \nCollector current = %.3f mA \nEmitter current = %.4f mA',Ib*10^6,Ic*10^3,Ie*10^3);\n", +" " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.8: Calculate_max_and_min_value_of_emitter_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Calculate max and min value of emitter current\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"\n", +"//At B=50\n", +"\n", +"B=50; //dc beta\n", +"Rc=75;//ohm //resistor connected to collector\n", +"Re=100;//ohm //resistor connected to emitter\n", +"Rb=10*10^3;//ohm //resistor connected to base\n", +"Vcc=6;//V //Voltage supply across the collector resistor\n", +"Vbe=0.3;//V //for germanium\n", +"Ib=(Vcc-Vbe)/(Rb+(1+B)*Re); //Base current\n", +"Ie=(1+B)*Ib;\n", +"Vce=Vcc-(Rc+Re)*Ie\n", +"printf('Minimum emitter current %.2f mA\n',Ie*10^3);\n", +"printf('The collector to emitter volatge is %.2f V\n',Vce);\n", +"\n", +"//At B=300 \n", +"\n", +"B1=300; //dc beta\n", +"Ib1=(Vcc-Vbe)/(Rb+(1+B1)*Re); //Base current\n", +"Ie1=(1+B1)*Ib1;\n", +"Vce1=Vcc-(Rc+Re)*Ie1\n", +"//Here Vce1= -1.4874 V but can never have negative voltage because Ie1 is wrong as it can't be more than saturation value therefore\n", +"Ie1=Vcc/(Rc+Re);\n", +"\n", +"//And Vce=0 V\n", +"\n", +"Vce1=0;//V\n", +"printf('Maximum emitter current %.2f mA\n',Ie1*10^3);\n", +"printf('The collector to emitter volatge(saturation) is %.0f V\n',Vce1);\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.9: Determine_the_value_of_base_resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Determine the value of base resistance\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"\n", +"B=100; //dc beta\n", +"Rc=200;//ohm //resistor connected to collector\n", +"Re=500;//ohm //resistor connected to emitter\n", +"Vcc=9;//V //Voltage supply across the collector as it is PNP so taking positive\n", +"Vce=4.5;//V //Collector to emitter voltage\n", +"Ic=(Vcc-Vce)/(Rc+Re);\n", +"Ib=Ic/B;\n", +"Rb=(Vcc-B*Re*Ib)/Ib;\n", +"printf('The value of base resistance is %.0f kΩ',Rb/1000);\n", +" " + ] + } +], +"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/Electronic_Devices_and_Circuits_by_D_C_Kulshreshtha/7-Small_Signal_Single_Stage_Amplifier.ipynb b/Electronic_Devices_and_Circuits_by_D_C_Kulshreshtha/7-Small_Signal_Single_Stage_Amplifier.ipynb new file mode 100644 index 0000000..6e45c5a --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_D_C_Kulshreshtha/7-Small_Signal_Single_Stage_Amplifier.ipynb @@ -0,0 +1,519 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 7: Small Signal Single Stage Amplifier" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.10: Determine_the_small_signal_voltage_gain_and_input_and_output_resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Determine the small signal voltage gain and input and output resistance\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"\n", +"Rd=2*10^3;//ohm\n", +"rd=100*10^3;//ohm\n", +"Rg=1*10^6;//ohm\n", +"gm=2*10^-3;//S\n", +"Av=-gm*(rd*Rd/(rd+Rd));\n", +"Ri=Rg;\n", +"Ro=rd*Rd/(rd+Rd);\n", +"printf('The small signal voltage gain = %.0f\ninput resistance= %.0f MΩ\noutput resistance = %.0f kΩ',Av,Ri/10^6,Ro/1000);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.11: Determine_the_small_signal_voltage_gain_and_input_and_output_resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Determine the small signal voltage gain and input and output resistance\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"\n", +"R1=500*10^3;//ohm\n", +"R2=50*10^3;//ohm\n", +"Rd=5*10^3;//ohm\n", +"Rs=100;//ohm\n", +"Rl=5*10^3;//ohm\n", +"gm=1.5*10^-3;//S\n", +"rd=200*10^3;//ohm\n", +"Rg=R1*R2/(R1+R2);\n", +"Rac=Rd*Rl/(Rd+Rl);\n", +"Av=-gm*Rac;\n", +"Ri=Rg;\n", +"Ro=(rd*Rac/(rd+Rac));\n", +"printf('The small signal voltage gain = %.2f\ninput resistance= %.2f kΩ\noutput resistance = %.1f kΩ',Av,Ri/1000,Ro/1000);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.12: Calculate_the_voltage_gain_of_the_FET.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Calculate the voltage gain of the FET\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"\n", +"Idss=8*10^-3;//A\n", +"Vp=4;//V\n", +"rd=25*10^3;//ohm\n", +"Rd=2.2*10^3;//ohm //by the help of figure\n", +"Vgs=-1.8;//V\n", +"gmo=2*Idss/(abs(Vp));\n", +"gm=gmo*(1-(Vgs/(-Vp)));\n", +"Av=-gm*(rd*Rd/(rd+Rd));\n", +"printf('The voltage gain of the FET %.2f',Av);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.1: EX7_1.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Calculate max current and check will the capacitor act as short for given frequency\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"\n", +"C=100*10^-6;//Farad\n", +"Rs=1*10^3;//ohm\n", +"Rl=4*10^3;//ohm\n", +"Vs=1;//V\n", +"Imax=Vs/(Rs+Rl);\n", +"fc=1/(2*%pi*(Rs+Rl)*C) //critical frequency\n", +"fh=10*fc; //Border frequency\n", +"printf('Maximum current is %.0f uA\n',Imax*10^6);\n", +"printf('fh = %.2f Hz\n',fh);\n", +"printf('As long as source frequency is greater than %.2f Hz, the coupling capacitor acts like an ac short for 20Hz to 20kHz.',fh)\n", +"\n", +"//In book Imax is 200mA but there is misprinting of 'm' in mA it should be uA" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.2: EX7_2.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Check whether the capacitor is an effective bypass for the signal currents of lowest frequency 20 Hz\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"\n", +"C=100*10^-6;//Farad\n", +"Rs=1*10^3;//ohm\n", +"Rl=4*10^3;//ohm\n", +"f=20;//Hz //lowest frequency\n", +"Xc=1/(2*%pi*f*C) //reactance of capacitor at 20Hz\n", +"Rth=Rs*Rl/(Rs+Rl); //Thevenin's equivalent resistance\n", +"printf('Xc < Rth/10 = %.1f Ω < %.1f Ω is satisfied\n',Xc,Rth/10);\n", +"printf('The capacitor of 100uF will work as a good bypass for frequencies greater than 20 Hz ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.3: Calculate_the_value_of_capacitor_required.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Calculate the value of capacitor required\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"\n", +"Rs1=20*10^3;//ohm\n", +"Rs2=30*10^3;//ohm\n", +"Rl1=40*10^3;//ohm\n", +"Rl2=80*10^3;//ohm\n", +"Rl3=80*10^3;//ohm\n", +"Rth=Rs1*Rs2/(Rs1+Rs2); //Thevenin's equivalent resistance\n", +"Rl_=Rl2*Rl3/(Rl2+Rl3);\n", +"Rl=Rl1*Rl_/(Rl1+Rl_); //Equivalent load\n", +"f=50;//Hz //lowest frequency\n", +"R=Rth+Rl;\n", +"C=10/(2*%pi*f*R)\n", +"printf('The required value of coupling capacitor is %.0f uF',C*10^6);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.4: Calculate_voltage_and_current_gain_and_input_and_output_resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Calculate voltage and current gain and input and output resistance\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"\n", +"function [z]=prll(r1,r2)//Function for the parallel combination of resistor\n", +" z=r1*r2/(r1+r2);\n", +"endfunction\n", +"\n", +"//given\n", +"\n", +"//DC analysis\n", +"Vcc=12;//V\n", +"Rb=200*10^3;//ohm\n", +"Rc=1*10^3;//ohm\n", +"B=100;// beta\n", +"Ib=Vcc/Rb;\n", +"Ic=B*Ib;\n", +"Icsat=Vcc/Rc;\n", +"Vce=Vcc-Ic*Rc;\n", +"printf('The Q point of DC analysis= (%.0f V, %.0f mA)\n',Vce,Ic*1000);\n", +"\n", +"//AC analysis\n", +"Rl=1*10^3;//ohm\n", +"hfe=B;\n", +"hie=2*10^3;//ohm\n", +"hoe_1=40*10^3;//ohm // 1/hoe\n", +"Rac=prll(Rc,Rl);\n", +"Av=-hfe*Rac/hie;\n", +"printf('The voltage gain = %.0f\n',Av);\n", +"\n", +"//Siince (1/hoe) > Rac therefore entire current will flows through Rac\n", +"Io=-100*Ib;\n", +"Ac=Io/Ib;\n", +"printf('The current gain = %.0f\n',Ac);\n", +"\n", +"Ri=prll(Rb,hie);\n", +"Ro=prll(Rl,prll(Rc,hoe_1));\n", +"printf('The input resistance= %.0f kΩ\n',Ri/1000);\n", +"printf('The output resistance= %.1f kΩ',Ro/1000);\n", +"\n", +"//In book the voltage gain is 25 due to skipping of '-' in printing" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.5: Solve_previous_example_using_hybrid_pie_model.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Solve previous example using hybrid pie model\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"function [z]=prll(r1,r2)//Function for the parallel combination of resistor\n", +" z=r1*r2/(r1+r2);\n", +"endfunction\n", +"\n", +"//given\n", +"\n", +"Vcc=12;//V\n", +"Rb=200*10^3;//ohm\n", +"Rc=1*10^3;//ohm\n", +"Rl=1*10^3;//ohm\n", +"B=100;// beta\n", +"hie=2*10^3;//ohm\n", +"hoe_1=40*10^3;//ohm // 1/hoe\n", +"\n", +"Ib=Vcc/Rb;\n", +"Ic=B*Ib;\n", +"Rac=prll(Rc,Rl);\n", +"gm=Ic/(25*10^-3);\n", +"rpi=B/gm;\n", +"ri=hie;\n", +"rb=ri-rpi;\n", +"ro=hoe_1;\n", +"Vi=poly(0,'Vi'); //let the input be Vi\n", +"Vpi=Vi*rpi/(rpi+rb);\n", +"Vo=-gm*Vpi*Rac; //output voltage\n", +"Av=Vo/Vi;\n", +"printf('The voltage gain ');\n", +"disp(Av);\n", +"//In book voltage gain is -24.96 due to appraoximation" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.6: Determine_the_value_of_output_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Determine the value of output voltage\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"\n", +"Vcc=12;//V\n", +"Rb=150*10^3;//ohm\n", +"Rc=5*10^3;//ohm\n", +"B=200;// beta\n", +"hie=2*10^3;//ohm\n", +"ro=60*10^3;//ohm // 1/hoe\n", +"Vi=1*10^-3;//V\n", +"Ib=Vcc/Rb;\n", +"Ic=B*Ib;\n", +"Icsat=Vcc/Rc;\n", +"// Icsat < Ic therefore transistor is in saturation mode and outpuut voltage wil be zero\n", +"Vo=0;\n", +"printf('The output voltage= %.0f V',Vo);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.7: Calculate_voltage_gain_and_input_resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Calculate voltage gain and input resistance\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"\n", +"function [z]=prll(r1,r2)//Function for the parallel combination of resistor\n", +" z=r1*r2/(r1+r2);\n", +"endfunction\n", +"\n", +"//given\n", +"R1=75*10^3;//ohm\n", +"R2=7.5*10^3;//ohm\n", +"Rc=4.7*10^3;//ohm\n", +"Re=1.2*10^3;//ohm\n", +"Rl=12*10^3;//ohm\n", +"B=150;\n", +"ri=2*10^3;//ohm\n", +"Vcc=15;//V\n", +"Vb=Vcc*R2/(R1+R2);\n", +"Ve=Vb; //since Vbe=0\n", +"Ie=Ve/Re;\n", +"Ic=Ie;\n", +"Icsat=Vcc/(Rc+Re);\n", +"// Ic < Icsat therefore transistor is in active mode\n", +"Vce=Vcc-Ic*(Rc+Re);\n", +"printf('The Q point of DC analysis= (%.1f V, %.3f mA)\n',Vce,Ic*1000);\n", +"\n", +"Rac=prll(Rc,Rl);\n", +"Av=-B*Rac/ri;\n", +"printf('The voltage gain = %.1f\n',Av);\n", +"Ri_=prll(ri,R2);\n", +"printf('The input resistance= %.2f kΩ\n',Ri_/1000);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.8: Calculate_the_value_of_gm_at_different_values_of_Vgs.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"//Calculate the value of gm at different values of Vgs\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"\n", +"Idss=8*10^-3;//A\n", +"Vp=4;//V\n", +"//At Vgs= -0.5 V\n", +"Vgs= -0.5;//V\n", +"gmo=2*Idss/(abs(Vp));\n", +"gm=gmo*(1-(Vgs/(-Vp)));\n", +"printf('gmo = %.0f mS\n',gmo*1000);\n", +"printf('gm (At Vgs = -0.5V) =%.1f mS\n',gm*1000);\n", +"\n", +"//At Vgs= -1.5 V\n", +"Vgs= -1.5;//V\n", +"gmo=2*Idss/(abs(Vp));\n", +"gm=gmo*(1-(Vgs/(-Vp)));\n", +"printf('gm (At Vgs = -1.5V) =%.1f mS\n',gm*1000);\n", +"\n", +"//At Vgs= -2.5 V\n", +"Vgs= -2.5;//V\n", +"gmo=2*Idss/(abs(Vp));\n", +"gm=gmo*(1-(Vgs/(-Vp)));\n", +"printf('gm (At Vgs = -2.5V) =%.1f mS\n',gm*1000);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.9: Find_the_output_signal_voltage_of_the_amplifier.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Find the output signal voltage of the amplifier\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"\n", +"Rd=12*10^3;//ohm\n", +"Rg=1*10^6;//ohm\n", +"Rs=1*10^3;//ohm\n", +"Cs=25*10^-6;//F\n", +"u=80; //amplification factor\n", +"rd=200*10^3;//ohm\n", +"Vi=0.1;//V\n", +"f=1*10^3;//Hz //input frequency\n", +"Xcs=1/(2*%pi*f*Cs);\n", +"//This is much smaller than Rs therefore it is bypassed\n", +"\n", +"gm=u/rd;\n", +"Av=gm*(rd*Rd/(rd+Rd));\n", +"Vo=Av*Vi;\n", +"printf('The output voltage is %.3f V',Vo);" + ] + } +], +"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/Electronic_Devices_and_Circuits_by_D_C_Kulshreshtha/8-Multistage_Amplifiers.ipynb b/Electronic_Devices_and_Circuits_by_D_C_Kulshreshtha/8-Multistage_Amplifiers.ipynb new file mode 100644 index 0000000..5d5517d --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_D_C_Kulshreshtha/8-Multistage_Amplifiers.ipynb @@ -0,0 +1,340 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 8: Multistage Amplifiers" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.1: Express_the_gain_in_decibel.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Express the gain in decibel\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"\n", +"//Powere gain of 1000\n", +"Pg1=1000;\n", +"Pgd1=10*log10(Pg1);\n", +"printf('Power gain (in dB)= %.0f dB\n',Pgd1);\n", +"\n", +"//Voltage gain of 1000\n", +"Vg1=1000;\n", +"Vgd1=20*log10(Vg1);\n", +"printf('Voltage gain (in dB)= %.0f dB\n',Vgd1);\n", +"\n", +"//Powere gain of 1/100\n", +"Pg2=1/100;\n", +"Pgd2=10*log10(Pg2);\n", +"printf('Power gain (in dB)= %.0f dB\n',Pgd2);\n", +"\n", +"//Voltage gain of 1/100\n", +"Vg2=1/100;\n", +"Vgd2=20*log10(Vg2);\n", +"printf('Voltage gain (in dB)= %.0f dB\n',Vgd2);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.2: Determine_power_and_voltage_gain.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"//Determine power and voltage gain\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"\n", +"//For Gain = 10 dB\n", +"G=10;//dB\n", +"Pg1=10^(G/10); //taking antilog\n", +"Vg1=10^(G/20); //taking antilog\n", +"printf('\nFor Gain = %.0f dB',G)\n", +"printf('\nPower gain ratio = %.0f \n',Pg1);\n", +"printf('Voltage gain ratio = %.2f \n',Vg1);\n", +"\n", +"//For Gain 3 dB\n", +"G=3;//dB\n", +"Pg2=10^(G/10); //taking antilog\n", +"Vg2=10^(G/20); //taking antilog\n", +"printf('\nFor Gain = %.0f dB\n',G)\n", +"printf('Power gain ratio = %.0f \n',Pg2);\n", +"printf('Voltage gain ratio = %.3f \n',Vg2);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.3: Calculate_the_overall_voltage_gai.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Calculate the overall voltage gain\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"\n", +"A1=80\n", +"A2=50\n", +"A3=30\n", +"Ad=20*log10(A1)+20*log10(A2)+20*log10(A3);;\n", +"\n", +"//Alternatively\n", +"A=A1*A2*A3;\n", +"Ad=20*log10(A);\n", +"printf('The Voltage gain is %.2f dB',Ad);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.4: Calculate_quiescent_output_voltage_and_small_signal_voltage_gain.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Calculate quiescent output voltage and small signal voltage gain\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"\n", +"//At input Voltage =3V\n", +"Vi1=3;//V //input voltage\n", +"Vbe=0.7;//V\n", +"B=250;\n", +"Vcc=10;//V //Supply\n", +"Re1=1*10^3;//ohm\n", +"Rc1=3*10^3;//ohm\n", +"Re2=2*10^3;//ohm\n", +"Rc2=4*10^3;//ohm\n", +"Vb1=Vi1; //Voltage at the base of transistor T1\n", +"Ve1=Vb1-Vbe; //Voltage at the emitter of transistor T1\n", +"Ie1=Ve1/Re1;\n", +"Ic1=Ie1;\n", +"Vc1=Vcc-Ic1*Rc1;\n", +"Vb2=Vc1;\n", +"Ve2=Vb2-Vbe;\n", +"Ie2=Ve2/Re2;\n", +"Ic2=Ie2;\n", +"Vo1=Vcc-Ic2*Rc2;\n", +"printf('The quiescent output voltage(At input Voltage =3 V ) is %.1f V\n',Vo1);\n", +"\n", +"//At input Voltage =3.2 V\n", +"Vi2=3.2;//V //input voltage\n", +"Vb1=Vi2; //Voltage at the base of transistor T1\n", +"Ve1=Vb1-Vbe; //Voltage at the emitter of transistor T1\n", +"Ie1=Ve1/Re1;\n", +"Ic1=Ie1;\n", +"Vc1=Vcc-Ic1*Rc1;\n", +"Vb2=Vc1;\n", +"Ve2=Vb2-Vbe;\n", +"Ie2=Ve2/Re2;\n", +"Ic2=Ie2;\n", +"Vo2=Vcc-Ic2*Rc2;\n", +"printf('The quiescent output voltage (At input Voltage =3.2 V) is %.1f V\n',Vo2);\n", +"\n", +"//Small Signal input and output voltage\n", +"vi=Vi2-Vi1;\n", +"vo=Vo2-Vo1;\n", +"Av=vo/vi;\n", +"printf('The small signal voltage gain is %.0f ',Av)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.5: Calculate_the_maximum_voltage_gain_and_bandwidth_of_multistage_amplifier.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Calculate the maximum voltage gain and bandwidth of multistage amplifier\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//FUNCTIONS\n", +"\n", +"function [z]=prll(r1,r2)//Function for the parallel combination of resistor\n", +" z=r1*r2/(r1+r2);\n", +"endfunction\n", +"\n", +"//given\n", +"rin=10*10^6;//ohm //input resistance of JFET\n", +"Rd=10*10^3;//ohm\n", +"Rs=500;//ohm\n", +"Rg=470*10^3;//ohm\n", +"Rl=470*10^3;//ohm\n", +"Cc=0.01*10^-6;//Farad\n", +"Csh=100*10^-12;//Farad\n", +"Cs=50*10^-6;//Farad\n", +"rd=100*10^3;//ohm\n", +"gm=2*10^-3;//S\n", +"Rac2=prll(Rd,Rl);\n", +"Rac1=prll(Rd,Rg);\n", +"Req=prll(rd,prll(Rd,Rl));\n", +"Am=ceil(gm*Req);\n", +"Am2=Am*Am; //Voltage gain of two stage amplifier\n", +"printf('Voltage gain of two stage amplifier= %.0f\n',Am2);\n", +"R_=prll(rd,Rd)+prll(Rg,rin);\n", +"f1=1/(2*%pi*Cc*R_); //lower cutoff frequency\n", +"f1_=f1/(sqrt(sqrt(2)-1));\n", +"f2=1/(2*%pi*Csh*Req); //upper cutoff frequency\n", +"f2_=f2*(sqrt(sqrt(2)-1));\n", +"BW=f2_-f1_;\n", +"printf('Bandwidth= %.1f kHz',BW/1000);\n", +"\n", +"//There is a slight error in f1 due to use of R'(here R_)=479 kΩ and in f2 due to approaximation of Req there is a slight variation" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.6: Calculate_the_midband_voltage_gain_and_bandwidth_of_cascade_amplifier.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Calculate the midband voltage gain and bandwidth of cascade amplifier\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"Am=8; //midband voltage gain of individual MOSFET\n", +"BW=500*10^3//Hz\n", +"f2=BW;\n", +"n=4;\n", +"A2m=Am^n;\n", +"f2_=f2*(sqrt((2^(1/n))-1));\n", +"printf('Midband voltage gain = %.0f\n',A2m);\n", +"printf('Overall Bandwidth= %.1f kHz',f2_/1000);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.7: Calculate_the_input_and_output_impedance_and_voltage_gain.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Calculate the input and output impedance and voltage gain\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//FUNCTIONS\n", +"\n", +"function [z]=prll(r1,r2)//Function for the parallel combination of resistor\n", +" z=r1*r2/(r1+r2);\n", +"endfunction\n", +"\n", +"hie=1.1*10^3;//ohm = rin\n", +"hfe=120;// = B\n", +"\n", +"//the values of Rac2, Zi, Zo are as per diagram\n", +"Rac2=prll(3.3*10^3,2.2*10^3);\n", +"Rac1=prll(6.8*10^3,prll(56*10^3,prll(5.6*10^3,1.1*10^3)));\n", +"Zi=prll(5.6*10^3,prll(56*10^3,1.1*10^3));\n", +"Zo=prll(3.3*10^3,2.2*10^3);\n", +"\n", +"printf('Input Resistance = %.3f kΩ\nOutput Resistance = %.2f kΩ\n',Zi/1000,Zo/1000);\n", +"\n", +"Am2=-hfe*Rac2/(hie);\n", +"Am1=-hfe*Rac1/(hie);\n", +"Am=Am1*Am2;\n", +"Am=20*log10(Am);\n", +"printf('The Overall Voltage gain is %.2f dB',Am);" + ] + } +], +"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/Electronic_Devices_and_Circuits_by_D_C_Kulshreshtha/9-Power_Amplifiers.ipynb b/Electronic_Devices_and_Circuits_by_D_C_Kulshreshtha/9-Power_Amplifiers.ipynb new file mode 100644 index 0000000..0e42087 --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_D_C_Kulshreshtha/9-Power_Amplifiers.ipynb @@ -0,0 +1,242 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 9: Power Amplifiers" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.1: Determine_the_turns_ratio_of_the_transformer.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Determine the turns ratio of the transformer\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"\n", +"Rl=8;//ohm\n", +"Rl_=5*10^3;//ohm\n", +"TR=sqrt(Rl_/Rl); //Turns ratio\n", +"printf('Turns Ratio= %.0f : 1',TR);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.2: Determine_the_output_impedance_of_the_transistor.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Determine the output impedance of the transistor\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"\n", +"TR=16/1; //turn ratio\n", +"Rl=4;//ohm //loudspeaker impedance\n", +"ro=(TR^2)*Rl;\n", +"printf('The output impedance of the transistor %.0f Ω',ro);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.3: Determine_the_efficiency_of_a_single_ended_transformer.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"//Determine the efficiency of a single ended transformer\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"\n", +"Vceq=10;//V //supply voltage\n", +"\n", +"//At Vp=10V\n", +"Vp=10;//V\n", +"Vce_max1=Vceq+Vp;\n", +"Vce_min1=Vceq-Vp;\n", +"n1=50*((Vce_max1-Vce_min1)/(Vce_max1+Vce_min1))^2;\n", +"printf('Efficiency (At Vp = 10V)= %.0f percent\n',n1);\n", +"\n", +"//At Vp=5V\n", +"Vp=5;//V\n", +"Vce_max2=Vceq+Vp;\n", +"Vce_min2=Vceq-Vp;\n", +"n2=50*((Vce_max2-Vce_min2)/(Vce_max2+Vce_min2))^2;\n", +"printf('Efficiency (At Vp = 5V)= %.1f percent\n',n2);\n", +"\n", +"//At Vp=1V\n", +"Vp=1;//V\n", +"Vce_max3=Vceq+Vp;\n", +"Vce_min3=Vceq-Vp;\n", +"n3=50*((Vce_max3-Vce_min3)/(Vce_max3+Vce_min3))^2;\n", +"printf('Efficiency (At Vp = 1V)= %.1f percent\n',n3);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.4: Determine_input_and_output_power_and_efficiency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Determine input and output power and efficiency\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"\n", +"Vcc=20;//V //supply voltage\n", +"Rl=4;//Ω\n", +"Vp=15;//V\n", +"Ip=Vp/Rl;\n", +"Idc=Ip/%pi;\n", +"Pi=Vcc*Idc;\n", +"Po=((Vp/2)^2)/Rl;\n", +"n=100*Po/Pi;\n", +"printf('Input power %.2f W\n',Pi);\n", +"printf('Output power %.2f W\n',Po);\n", +"printf('Efficiency = %.0f percent\n',n);\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.5: Calculate_the_percentage_increase_in_output_power.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Calculate the percentage increase in output power\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"\n", +"D=0.2;//harmonic distortion\n", +"P=(1+D^2);//Total power increase\n", +"\n", +"//percent increase= (Pi*(1+D^2)-Pi)*100/Pi;\n", +"//taking out and cancelling Pi\n", +"PI=(P-1)*100;\n", +"printf('The percentage increase in output power= %.0f percent',PI);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.6: EX9_6.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Calculate harmonic distortion and percentage increase in output voltage due to this\n", +"clear;\n", +"clc;\n", +"//soltion\n", +"//given\n", +"\n", +"I1=60;//A\n", +"I2=6;//A\n", +"I3=1.2;//A\n", +"I4=0.6;//A\n", +"D2=I2/I1;\n", +"D3=I3/I1;\n", +"D4=I4/I1;\n", +"printf('The Harmonic distortion of each component\nD2= %.0f percent\nD3= %.0f percent\nD4= %.0f percent\n',D2*100,D3*100,D4*100);\n", +"\n", +"D=sqrt((D2)^2+(D3)^2+(D4)^2);\n", +"printf('The Total Harmonic distortion = %.0f percent\n',D*100);\n", +"P=(1+D^2);//Total power increase\n", +"\n", +"//percent increase= (Pi*(1+D^2)-Pi)*100/Pi;\n", +"//taking out and cancelling Pi\n", +"PI=(P-1)*100;\n", +"printf('The percentage increase in output power= %.0f percent',PI);" + ] + } +], +"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 +} |