summaryrefslogtreecommitdiff
path: root/Electonic_Devices_by_S_Sharma
diff options
context:
space:
mode:
authorprashantsinalkar2020-04-14 10:19:27 +0530
committerprashantsinalkar2020-04-14 10:23:54 +0530
commit476705d693c7122d34f9b049fa79b935405c9b49 (patch)
tree2b1df110e24ff0174830d7f825f43ff1c134d1af /Electonic_Devices_by_S_Sharma
parentabb52650288b08a680335531742a7126ad0fb846 (diff)
downloadall-scilab-tbc-books-ipynb-476705d693c7122d34f9b049fa79b935405c9b49.tar.gz
all-scilab-tbc-books-ipynb-476705d693c7122d34f9b049fa79b935405c9b49.tar.bz2
all-scilab-tbc-books-ipynb-476705d693c7122d34f9b049fa79b935405c9b49.zip
Initial commit
Diffstat (limited to 'Electonic_Devices_by_S_Sharma')
-rw-r--r--Electonic_Devices_by_S_Sharma/2-Energy_Bands_And_Charge_Carriers_in_Semiconductor.ipynb1009
-rw-r--r--Electonic_Devices_by_S_Sharma/3-Excess_Carriers_In_Semiconductors.ipynb816
-rw-r--r--Electonic_Devices_by_S_Sharma/4-Junctions.ipynb931
-rw-r--r--Electonic_Devices_by_S_Sharma/5-MOSFETs.ipynb1611
-rw-r--r--Electonic_Devices_by_S_Sharma/6-Bipolar_Junction_Transistor.ipynb1097
-rw-r--r--Electonic_Devices_by_S_Sharma/7-Optoelectonic_Devices.ipynb149
6 files changed, 5613 insertions, 0 deletions
diff --git a/Electonic_Devices_by_S_Sharma/2-Energy_Bands_And_Charge_Carriers_in_Semiconductor.ipynb b/Electonic_Devices_by_S_Sharma/2-Energy_Bands_And_Charge_Carriers_in_Semiconductor.ipynb
new file mode 100644
index 0000000..edbe464
--- /dev/null
+++ b/Electonic_Devices_by_S_Sharma/2-Energy_Bands_And_Charge_Carriers_in_Semiconductor.ipynb
@@ -0,0 +1,1009 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 2: Energy Bands And Charge Carriers in Semiconductor"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.10: Conductivity_of_pure_Si.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 2.10\n",
+"format('v',8)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"Mu_e = 1500;// in cm^2/volt sec\n",
+"Mu_h = 500;// in cm^2/volt sec\n",
+"n_i = 1.6 * 10^10;// in per cm^3\n",
+"e = 1.6 * 10^-19;// in C\n",
+"// The conductivity of pure semiconductor \n",
+"Sigma = n_i * (Mu_e + Mu_h) * e;// in mho/cm\n",
+"disp(Sigma,'The conductivity of pure semiconductor in mho/cm is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.11: Number_of_donor_atoms.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 2.11\n",
+"format('v',9)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"Rho = 10;// in Ω-cm\n",
+"Mu_d = 500;// in cm^2/v.s.\n",
+"e = 1.6*10^-19;// electron charge in C\n",
+"// The number of donor atom\n",
+"n_d = 1/(Rho * e * Mu_d);// in per cm^3\n",
+"disp(n_d,'The number of donor atom per cm^3 is ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.12: Conductivity_of_speciman.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Exa 2.12\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"//Given data\n",
+"AvagadroNumber = 6.02 * 10^23;// in atoms/gm.mole\n",
+"at_Ge = 72.6;// atom weight of Ge\n",
+"e = 1.6 * 10^-19;// in C\n",
+"D_Ge = 5.32;// density of Ge in gm/c.c\n",
+"Mu = 3800;// in cm^2/v.s.\n",
+"C_Ge = (AvagadroNumber/at_Ge) * D_Ge;// concentration of Ge atoms in per cm^3\n",
+"n_d = C_Ge/10^8;// in per cc\n",
+"Sigma = n_d * Mu * e;// in mho/cm\n",
+"disp(Sigma,'The conductivity in mho/cm is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.13: Mobility_of_electrons_in_Ge.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa2.13\n",
+"format('v',5)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"Rho = 0.3623 * 10^-3;// in Ohm m\n",
+"Sigma = 1/Rho;//in mho/m\n",
+"D = 4.42 * 10^28;// Ge density in atom/m^3\n",
+"n_d = D / 10^6;// in atom/m^3\n",
+"e = 1.6 * 10^-19;// in C\n",
+"// The mobility of electron in germanium \n",
+"Mu = Sigma/(n_d * e);// in m^2/V.sec\n",
+"disp(Mu,'The mobility of electron in germanium in m^2/V.sec is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.14: Density_and_mobility_of_holes.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Exa 2.14\n",
+"format('v',7)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"AvagadroNumber = 6.025 * 10^26;// in kg.Mole\n",
+"W = 72.59;// atomic weight of Ge\n",
+"D = 5.36 * 10^3;//density of Ge in kg/m^3\n",
+"Rho = 0.42;// resistivity in Ohm m\n",
+"e = 1.6 * 10^-19;// in C\n",
+"Sigma = 1/Rho;// in mho/m\n",
+"n = (AvagadroNumber/W) * D;// number of Ge atoms present per unit volume\n",
+"// Holes per unit volume, H = n*10^-6%\n",
+"H= n*10^-8;\n",
+"a=H;\n",
+"// Formula sigma= a*e*Mu_h\n",
+"Mu_h = Sigma/(a * e);// in m^2/V.sec\n",
+"disp(Mu_h,'Mobility of holes in m^2/V.sec is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.15: Current_produced.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Exa 2.15\n",
+"format('v',5)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"e = 1.6 * 10^-19;// in C\n",
+"n_i = 2 * 10^19;// in /m^3\n",
+"Mu_e = 0.36;// in m^2/v.s\n",
+"Mu_h = 0.17;// in m^2/v.s\n",
+"A = 1 * 10^-4;// in m^2\n",
+"V = 2;//in volts\n",
+"l = 0.3;// in mm\n",
+"l = l * 10^-3;// in m\n",
+"E=V/l;// in volt/m\n",
+"Sigma = n_i * e * (Mu_e + Mu_h);// in mho/m\n",
+"// J = I/A = Sigma * E\n",
+"I= Sigma*E*A;\n",
+"disp(I,'The current produced in a small germanium plate in amp is');\n",
+"\n",
+" "
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.16: Resistivity_of_doped_Ge.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 2.16\n",
+"format('v',9)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"D = 4.2 * 10^28;//density of Ge atoms per m^3\n",
+"N_d = D / 10^6;// per m^3\n",
+"e = 1.6 * 10^-19;// in C\n",
+"Mu_e = 0.36;// in m^2/V-sec\n",
+"// Donor concentration is very large as compared to intrinsic carrier concentration\n",
+"Sigma_n = N_d * e * Mu_e;// in mho/m (intrinsic concentration can be neglected)\n",
+"Rho_n = 1/Sigma_n;// in ohm m\n",
+"disp(Rho_n,'The resistivity of drop Ge in ohm m is ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.17: Current_produced_in_Ge_sample.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 2.17\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// given data\n",
+"e = 1.6 * 10^-19;// in C\n",
+"n_i = 1 * 10^19;// in per m^3\n",
+"Mu_e = 0.36;// in m^2/volt.sec\n",
+"Mu_h = 0.17;// in m^2/volt.sec \n",
+"A = 2;// in cm^2\n",
+"A = A * 10^-4;// im m^2\n",
+"t = 0.1;// in mm\n",
+"t = t * 10^-3;// in m\n",
+"V = 4;// in volts\n",
+"Sigma_i = n_i * e * (Mu_e + Mu_h);// in mho/m\n",
+"J = Sigma_i * (V/t);// in Amp/m^2\n",
+"// Current produced, I= J*A\n",
+"I = J * A;// in Amp\n",
+"disp(I,'The current produced in a Ge sample in Amp is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.18: Conductivity_of_pure_Si.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Exa 2.18\n",
+"format('v',8)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"e = 1.6 * 10^-19;// in C\n",
+"Mu_h = 500;// in cm^2/V.s.\n",
+"Mu_e = 1500;// in cm^2/V.s.\n",
+"n_i = 1.6 * 10^10;// in per cm^3\n",
+"// Conductivity of pure silicon at room temperature \n",
+"Sigma_i = n_i * e * ( Mu_h + Mu_e);// in mho/cm\n",
+"disp(Sigma_i,'Conductivity of pure silicon at room temperature in mho/cm is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.19: Hall_voltage_produced.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Exa 2.19\n",
+"format('v',9)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"//Given data\n",
+"l= 0.50*10^-2;// width of ribbon in m\n",
+"d= 0.10*10^-3;// thickness of ribbon in m\n",
+"A= l*d;// area of ribbon in m^2\n",
+"B = 0.8;// in Tesla\n",
+"D = 10.5;//density in gm/cc\n",
+"I = 2;// in amp\n",
+"q = 1.6 * 10^-19;// in C\n",
+"n=6*10^28;// number of elec. per m^3\n",
+"V_H = ( I * B * d)/(n * q * A);// in volts\n",
+"disp(V_H,'The hall Voltage produced in volts is');\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.1: Energy_gap.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 2.1\n",
+"format('v',7)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"lembda = 11000;// in Å\n",
+"lembda = lembda * 10^-10;// in m\n",
+"h = 6.625*10^-34;// Planck constant\n",
+"c = 3*10^8;//speed of light in m/s\n",
+"e = 1.6*10^-19;//charge of electron in C\n",
+"// Energy of the incident photon should at least be, h*v= Eg, so\n",
+"E_g = (h*c)/(lembda*e);// in eV\n",
+"disp(E_g,'The energy gap in eV is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.20: Hall_coefficient_and_mobility_of_electrons.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Exa 2.20\n",
+"format('v',8)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"l = 1;// in m\n",
+"d = 1;// in cm\n",
+"d = d * 10^-2;// in m\n",
+"W = 1;// in mm\n",
+"W = W * 10^-3;// in m\n",
+"A = d * W;// in m^2\n",
+"I= 1;// in A\n",
+"B = 1;// Tesla\n",
+"V_H = 0.074 * 10^-6;// in volts\n",
+"Sigma = 5.8 * 10^7;// in mho/m\n",
+"// The hall coefficient \n",
+"R_H = (V_H * A)/(B*I*d);// in m^3/c\n",
+"disp(R_H,'The hall coefficient in m^3/c is');\n",
+"// Mobility of electrons in copper \n",
+"Mu = Sigma * R_H;// in m^2/volt-sec\n",
+"disp(Mu,'The mobility of electrons in copper in m^2/volt-sec is ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.21: Concentration_of_holes_in_Si_crystals.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Exa2.21\n",
+"format('v',7)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"n_i = 1.4 * 10^18;// in /m^3\n",
+"n_D = 1.4 * 10^24;// in /m^3\n",
+"// Concentration of electrons\n",
+"n=n_D;// in /m^3\n",
+"p = n_i^2/n;// in /m^3\n",
+"// The ratio of electrons to hole concentration\n",
+"R = n/p;\n",
+"disp(R,'The ratio of electrons to hole concentration is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.22: Hall_angle.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Exa 2.22\n",
+"format('v',10)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"//Given data\n",
+"R = 9 * 10^-3;// in ohm-m\n",
+"R_H = 3.6 * 10^-4;// in m^3\n",
+"e = 1.6 * 10^-19;// in C\n",
+"Sigma = 1/R;// in (ohm-m)^-1\n",
+"Rho = 1/R_H;// in coulomb/m^3\n",
+"// Density of charge carriers \n",
+"n = Rho/e;// in /m^3\n",
+"disp(n,'Density of charge carriers per m^3 is');\n",
+"// Mobility of charge carriers \n",
+"Mu = Sigma * R_H;// in m^2/v-s\n",
+"disp(Mu,'Mobility of charge carriers in m^2/V-s is');\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.23: Current_density_in_speciman.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Exa 2.23\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"e = 1.6 * 10^-19;// in C\n",
+"R_H = 0.0145;// in m^3/coulomb\n",
+"Mu_e = 0.36;// in m^2/v-s\n",
+"E = 100;// in V/m\n",
+"n = 1/(e * R_H);// in /m^3\n",
+"// The current density of specimen \n",
+"J = n * e * Mu_e * E;// in A/m^2\n",
+"disp(J,'The current density of specimen in A/m^2 is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.24: Relaxation_time.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Exa 2.24\n",
+"format('v',9)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"//Given data\n",
+"Mu_e = 7.04 * 10^-3;// in m^2/v-s\n",
+"m = 9.1 * 10^-31;\n",
+"E_F = 5.5;// in eV\n",
+"n = 5.8 * 10^28;\n",
+"e = 1.6 * 10^-19;// in C\n",
+"// Relaxation Time \n",
+"Torque = (Mu_e/e) * m;// in sec\n",
+"disp(Torque,'Relaxation Time in sec is ');\n",
+"// Resistivity of conductor \n",
+"Rho = 1 /(n * e * Mu_e);// in ohm-m\n",
+"disp(Rho,'Resistivity of conductor in ohm-m is ');\n",
+"// Velocity of electrons with fermi-energy \n",
+"V_F = sqrt((2 * E_F * e)/m);// in m/s\n",
+"disp(V_F,'Velocity of electrons with fermi-energy in m/s is');\n",
+"\n",
+"//Note: The calculated value of Resistivity of conductor is wrong."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.25: Temperature.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Exa 2.25\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"E= 5.95;// in eV\n",
+"EF= 6.25;// in eV\n",
+"delE= 0.01;\n",
+" // delE= 1-1/(1+exp((E-EF)/KT))\n",
+"K=1.38*10^-23;// Boltzmann Constant in J/K\n",
+"// The temperature at which there is a 1 % probability that a state 0.30 eV below the Fermi energy level\n",
+"T = ((E-EF)/log(1/(1-delE) -1)*1.6*10^-19)/K;// in K\n",
+"disp(T,'The temperature in K is : ')\n",
+" "
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.26: Thermal_equilibrium_hole_concentration.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Exa 2.26\n",
+"format('v',9)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data \n",
+"N_V = 1.04 * 10^19;// in cm^-3\n",
+"T1 = 300;// in K\n",
+"T2 = 400;// in K\n",
+"del_E = 0.27;// in eV\n",
+"// The value of N_V at T=400 K,\n",
+"N_V = N_V * (T2/T1)^1.5;// in cm^-3\n",
+"KT = (0.0259) * (T2/T1);// in eV\n",
+"// The thermal equilibrium hole concentration in silicon \n",
+"P_o = N_V * exp(-(del_E)/KT);// in cm^-3\n",
+"disp(P_o,'The thermal equilibrium hole concentration in silicon in cm^-3 is ');\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.27: Required_doping_concentration.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Exa 2.27\n",
+"format('v',10)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"//Given data\n",
+"N_c = 2.8 * 10^19;\n",
+"N_V = 1.04 *10^19;\n",
+"T1 = 550;// in K\n",
+"T2 = 300;// in K\n",
+"E_g = 1.12;\n",
+"KT = (0.0259) ;\n",
+"n_i = sqrt(N_c *N_V *(T1/T2)^3* exp(-(E_g)/KT*T2/T1));// in cm^-3\n",
+"// n_o = N_d/2 + sqrt((N_d/2)^2 + (n_i)^2)\n",
+"// 1.05*N_d -N_d/2= sqrt((N_d/2)^2 + (n_i)^2)\n",
+"// Minimum donor concentration required \n",
+"N_d=sqrt((n_i)^2/((0.55)^2-1/4));\n",
+"disp(N_d,'Minimum donor concentration required in cm^-3 is'); \n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.28: Quasi_Fermi_energy_levels.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Exa 2.28\n",
+"format('v',7)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"//Given data\n",
+"T = 300;// in K\n",
+"n_o = 10^15;// in cm^-3\n",
+"n_i = 10^10;// in cm^-3\n",
+"p_o = 10^5;// in cm^-3\n",
+"del_n = 10^13;// in cm^-3\n",
+"del_p = del_n;// in cm^-3\n",
+"KT = 0.0259;// in eV\n",
+"delta_E1= KT*log(n_o/n_i);// value of E_F-E_Fi in eV\n",
+"delta_E2= KT*log((n_o+del_n)/n_i);// value of E_Fn-E_Fi in eV\n",
+"delta_E3= KT*log((p_o+del_p)/n_i);// value of E_Fi-E_Fp in eV\n",
+"disp(delta_E1,'The Fermi level for thermal equillibrium in eV is : ')\n",
+"disp(delta_E2,'The quase-Fermi level for electrons in non equillibrium in eV is : ')\n",
+"disp(delta_E3,'The quasi-Fermi level for holes in non equillibrium in eV is : ')\n",
+"disp('The quasi-Fermi level for electrons is above E_Fi ')\n",
+"disp('While the quasi-Fermi level for holes is below E_Fi')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.2: Wavelength.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 2.2\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"E_g = 0.75;// in eV\n",
+"e = 1.6*10^-19;// in C\n",
+"h = 6.63*10^-34;// in J\n",
+"c = 3*10^8;// in m/s\n",
+"//Formula E_g = (h*c)/(lembda*e);\n",
+"lembda = (h*c)/(E_g*e);// in m\n",
+"lembda = lembda * 10^10;// in Å\n",
+"disp(lembda,'The wavelength in Å is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.3: Position_of_Fermi_level.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Exa 2.3\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"del_E = 0.3;// in eV\n",
+"T1 = 300;// in K\n",
+"T2 = 330;// in K\n",
+"// del_E = K * T1 * log(N/N_c) where del_E= E_C-E_F\n",
+"// del_E1 = K * T2 * log(N/N_c) where del_E1= E_C-E_F at T= 330 °K\n",
+"del_E1 = del_E*(T2/T1);// in eV \n",
+"disp('The Fermi level will be '+string(del_E1)+' eV below the conduction band')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.4: Probability.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Exa 2.4\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('e',8)\n",
+"// Given data\n",
+"N_c = 2.8 * 10^19;// in cm^-3\n",
+"del_E = 0.25;// fermi energy in eV\n",
+"KT = 0.0259;// where K is Boltzmann constant\n",
+"f_F = exp(-(del_E)/KT);\n",
+"disp(f_F,'The probability in the conduction band is occupied by an electron is ');\n",
+"// Evaluation of electron concentration\n",
+"n_o = N_c * exp(-(del_E)/KT);// in cm^-3\n",
+"disp(n_o,'The thermal equilibrium electron concentration in cm^-3 is');\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.5: Thermal_equilibrium_hole_concentration.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Exa2.5\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',9)\n",
+"// Given data\n",
+"T1 = 300;// in K\n",
+"T2 = 400;// in K\n",
+"del_E = 0.27;// Fermi level in eV\n",
+"KT = (0.0259) * (T2/T1);// in eV\n",
+"N_v = 1.04 * 10^19;// in cm^-3\n",
+"N_v = N_v * (T2/T1)^(3/2);// in cm^-3 \n",
+"// Hole concentration\n",
+"p_o = N_v * exp(-(del_E)/KT);// in per cm^3\n",
+"disp(p_o,'The thermal equilibrium hole concentration per cm^3 is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.6: Mobility_of_electrons_in_copper.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 2.6\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',7)\n",
+"// Given data\n",
+"At = 63.5;// atomic weight\n",
+"Rho = 1.7*10^-6;// in ohm cm\n",
+"d = 8.96;// in gm/cc\n",
+"N_A = 6.02*10^23;// in /gm.mole\n",
+"e = 1.6*10^-19;// in C\n",
+"//Number of atoms of copper persent per unit volume\n",
+"n = (N_A/At)*d;\n",
+"Miu_e = 1/(Rho*n*e);// in cm^2/volt.sec\n",
+"disp(Miu_e,'The electron mobility in cm^2/volt-sec is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.7: Density_of_free_electrons.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 2.7\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',9)\n",
+"// Given data\n",
+"l = 0.1;// in m\n",
+"A = 1.7;// in mm^2\n",
+"A = A * 10^-6;// in m^2\n",
+"R = 0.1;// in ohm\n",
+"At = 63.5;// atomic weight\n",
+"N_A = 6.02*10^23;\n",
+"d = 8.96;// in gm/cc\n",
+"n = (N_A/At)*d;// in /cc\n",
+"n = n * 10^6;// in /m^3\n",
+"e = 1.6*10^-19;//electron charge in C\n",
+"// Resistivity of copper\n",
+"//Formula R = Rho*(l/A);\n",
+"Rho = (R*A)/l;// in ohm m\n",
+"// Conductivity of copper\n",
+"Sigma = 1/Rho;// in mho/m\n",
+"// Formula Sigma = n*e*Miu_e\n",
+"Miu_e = Sigma/(n*e);// in m^2/V.sec\n",
+"disp(Miu_e,'The mobility in m^2/V-sec is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.8: Drift_velocity.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 2.8\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',7)\n",
+"// Given data\n",
+"d = 10.5;// in gm/cc\n",
+"At = 108;// atomic weight\n",
+"N_A = 6.025*10^23;// in /gm mole\n",
+"r = 10^-3;// in m\n",
+"q = 1.6*10^-19;// in C\n",
+"// The number of electrons per unit volume\n",
+"n = (N_A/At)*d;// in /cm^3\n",
+"n = n * 10^6;// in /m^3\n",
+"A = %pi*((r)^2);// in m^2\n",
+"I = 2;// in A\n",
+"// Evaluation of drivt velocity with the help of current\n",
+"// I = q*n*A*V;\n",
+"V = I/(n*q*A);// in m/s\n",
+"disp(V,'The drift velocity in m/s is');\n",
+"\n",
+"// Note: Calculation in the book is wrong, so the answer in the book is wrong."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.9: Mobility_of_charge_carriers.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 2.9\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',8)\n",
+"// Given data\n",
+"d = 1.03;// in mm\n",
+"d = d *10^-3;// in m\n",
+"r = d/2;// in m\n",
+"R = 6.51;// in ohm\n",
+"l = 300;// in mm\n",
+"e = 1.6*10^-19;// electron charge in C\n",
+"n = 8.4*10^28;// in /m^3\n",
+"A = %pi*r^2;// cross section area\n",
+"//Formula R = Rho*(l/A);\n",
+"Rho = (R* A)/l;//in ohm m\n",
+"Sigma = 1/Rho;// in mho/m\n",
+"disp(Sigma,'The conductivity of copper in mho/m is');\n",
+"// Evaluation of mobility\n",
+"//Formula sigma = n*e*Miu_e\n",
+"Miu_e = Sigma/(n*e);// in m^2/V.sec\n",
+"disp(Miu_e,'The mobility in m^2/V-sec is');"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Electonic_Devices_by_S_Sharma/3-Excess_Carriers_In_Semiconductors.ipynb b/Electonic_Devices_by_S_Sharma/3-Excess_Carriers_In_Semiconductors.ipynb
new file mode 100644
index 0000000..d5a1e78
--- /dev/null
+++ b/Electonic_Devices_by_S_Sharma/3-Excess_Carriers_In_Semiconductors.ipynb
@@ -0,0 +1,816 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 3: Excess Carriers In Semiconductors"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.10: Ratio_of_donor_atoms_to_Si_atom.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 3.10\n",
+"format('v',8)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"Rho = 9.6 * 10^-2;// in ohm-m\n",
+"Sigma_n = 1/Rho;// in (ohm-m)^-1\n",
+"q = 1.6 * 10^-19;// in C\n",
+"Mu_n = 1300 * 10^-4;// in m^2/V-sec\n",
+"N_D = Sigma_n / (Mu_n * q);// in atoms/m^3\n",
+"A_D = 5*10^22;// Atom density in atoms/cm^3\n",
+"A_D = A_D * 10^6;// atoms/m^3\n",
+"R_si = N_D/A_D;// ratio\n",
+"disp(R_si,'The ratio of donor atom to silicon atom is');\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.11: Equillibrium_electron_and_hole_densities.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 3.11\n",
+"format('v',9)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"n_i = 1.5 * 10^10;// in per cm^3\n",
+"n_n = 2.25 * 10^15;// in per cm^3\n",
+"p_n = (n_i)^2/n_n;// in per cm^3\n",
+"disp(p_n,'The equilibrium electron per cm^3 is');\n",
+"h_n = n_n;// in cm^3\n",
+"disp(h_n,'Hole densities in per cm^3 is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.12: Carrier_concentration.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 3.12\n",
+"format('v',7)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"N_A = 2 * 10^16;// in atoms/cm^3\n",
+"N_D = 10^16;// in atoms/cm^3\n",
+"C_c = N_A-N_D;// C_c stands for Carrier concentration in /cm^3\n",
+"disp(C_c,'Carrier concentration per cm^3 is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.13: Generation_rate_due_to_irradiation.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 3.13\n",
+"format('v',7)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"del_n = 10^15;// in cm^3\n",
+"Torque_p = 10 * 10^-6;// in sec\n",
+"R_g = del_n/Torque_p;// in hole pairs/sec/cm^3\n",
+"disp(R_g,'The rate of generation of minority carrier in electron hole pairs/sec/cm^3 is ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.14: Mobility_of_minority_charge_carrier.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 3.14\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"v = 1/(20 * 10^-6);// in cm/sec\n",
+"E = 10;// in V/cm\n",
+"Mu= v/E;// in cm^2/V-sec\n",
+"disp(Mu,'The mobility of minority charge carrier in cm^2/V-sec is ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.15: Hall_and_electron_diffusion_current.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 3.15\n",
+"format('v',8)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"q = 1.6 * 10^-19;// in C\n",
+"N_D = 4.5 * 10^15;// in /cm^3\n",
+"del_p = 10^21;\n",
+"e=10;// in cm\n",
+"A = 1;// in mm^2\n",
+"A = A * 10^-14;// cm^2\n",
+"l = 10;// in cm\n",
+"Torque_p = 1;// in microsec\n",
+"Torque_p = Torque_p * 10^-6;// in sec\n",
+"Torque_n = 1;// in microsec\n",
+"Torque_n = Torque_n * 10^-6;// in sec\n",
+"n_i = 1.5 * 10^10;// in /cm^3\n",
+"D_n = 30;// in cm^2/sec\n",
+"D_p = 12;// in cm^2/sec\n",
+"n_o = N_D;// in /cm^3\n",
+"p_o = (n_i)^2/n_o;// in /cm^3\n",
+"disp(p_o,'Hole concentration at thermal equilibrium per cm^3 is');\n",
+"l_n = sqrt(D_n * Torque_n);// in cm\n",
+"disp(l_n,'Diffusion length of electron in cm is');\n",
+"l_p = sqrt(D_p * Torque_p);// in cm\n",
+"disp(l_p,'Diffusion length of holes in cm is');\n",
+"x=34.6*10^-4;// in cm\n",
+"dpBYdx = del_p *e;// in cm^4\n",
+"disp(dpBYdx,'Concentration gradient of holes at distance in cm^4 is');\n",
+"e1 = 1.88 * 10^1;// in cm\n",
+"dnBYdx = del_p * e1;// in cm^4 \n",
+"disp(dnBYdx,'Concentration gradient of electrons in per cm^4 is');\n",
+"J_P = -(q) * D_p * dpBYdx;// in A/cm^2\n",
+"disp(J_P,'Current density of holes due to diffusion in A/cm^2 is');\n",
+"J_n = q * D_n * dnBYdx;// in A/cm^2\n",
+"disp(J_n,'Current density of electrons due to diffusion in A/cm^2 is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.16: Energy_band_gap_of_semiconductor_material_used.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 3.16\n",
+"format('v',5)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"e= 1.6*10^-19;// electron charge in C\n",
+"h = 6.626 * 10^-34;// in J-s\n",
+"h= h/e;// in eV\n",
+"c = 3 * 10^8;// in m/s\n",
+"lembda = 5490 * 10^-10;// in m\n",
+"f = c/lembda;\n",
+"E = h * f;// in eV\n",
+"disp(E,'The energy band gap of the semiconductor material in eV is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.17: Current_density_in_Si.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 3.17\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"y2 = 6 * 10^16;// in /cm^3\n",
+"y1 = 10^17;// in /cm^3\n",
+"x2 = 2;// in µm\n",
+"x1 = 0;// in µm\n",
+"D_n = 35;// in cm^2/sec\n",
+"q = 1.6 *10^-19;// in C\n",
+"dnBYdx = (y2 - y1)/((x2-x1) * 10^-4);\n",
+"J_n = q * D_n * dnBYdx;// in A/cm^2\n",
+"disp(J_n,'The current density in silicon in A/cm^2 is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.18: Resistance_of_the_bar.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 3.18\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"q = 1.6 * 10^-19;// in C\n",
+"n_n = 5 * 10^20;// in /m^3\n",
+"n_n = n_n * 10^-6;// in cm^3\n",
+"Mu_n = 0.13;// in m^2/V-sec\n",
+"Mu_n = Mu_n * 10^4;// in cm^2/V-sec\n",
+"Sigma_n = q * n_n * Mu_n;// in (ohm-cm)^-1\n",
+"Rho = 1/Sigma_n;// in Ω-cm\n",
+"l = 0.1;// in cm\n",
+"A = 100;// µm^2\n",
+"A = A * 10^-8;// in cm^2\n",
+"R = Rho * (l/A);// in Ohm\n",
+"R=round(R*10^-6);// in MΩ\n",
+"disp(R,'The resistance of the bar in MΩ is'); "
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.19: Depletion_width.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 3.19\n",
+"format('v',5)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"t_d = 3;// total depletion in µm\n",
+"// The depletion width ,\n",
+"D = t_d/9;// in µm\n",
+"disp(D,'Depletion width in µm is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.1: Hole_concentration_at_equilibrium.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 3.1\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"N_d = 10^17;// atoms/cm^3\n",
+"n_i = 1.5 * 10^10;// in /cm^3\n",
+"n_o = 10^17;// in cm^3\n",
+"// p_o * n_o = (n_i)^2\n",
+"p_o = (n_i)^2 / n_o;//in holes/cm^3\n",
+"disp(p_o,'The hole concentration at equilibrium in holes/cm^3 is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.20: Minority_carrier_density.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 3.20\n",
+"format('v',8)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"n_i = 1.5 * 10^16;// in /m^3\n",
+"n_n = 5 * 10^20;// in /m^3\n",
+"p_n = (n_i)^2/n_n;// in /m^3\n",
+"disp(p_n,'The majority carrier density per m^3 is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.21: Collector_current_density.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 3.21\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"D_n = 25;// in cm^2/sec\n",
+"q = 1.6 * 10^-19;// in C\n",
+"y2 = 10^14;// in /cm^3\n",
+"y1 = 0;// in /cm^3\n",
+"x2 = 0;//in µm\n",
+"x1 = 0.5;// in µm\n",
+"x1 = x1 * 10^-4;// in cm\n",
+"dnBYdx = abs((y2-y1)/(x2-x1));// in /cm^4 \n",
+"// The collector current density \n",
+"J_n = q * D_n * (dnBYdx);// in /cm^4\n",
+"J_n = J_n * 10^-1;// in A/cm^2\n",
+"disp(J_n,'The collector current density in A/cm^2 is');\n",
+"\n",
+"// Note: In the book, the calculated value of dn by dx (2*10^19) is wrong. Correct value is 2*10^18 so the answer in the book is wrong."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.22: Band_gap.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Exa 3.22\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"h = 6.64 * 10^-34;// in J-s\n",
+"e= 1.6*10^-19;// electron charge in C\n",
+"c= 3 * 10^8;// in m/s\n",
+"lembda = 0.87;// in µm\n",
+"lembda = lembda * 10^-6;// in m\n",
+"E_g = (h * c)/lembda;// in J-s\n",
+"E_g= E_g/e;// in eV\n",
+"disp(E_g,'The band gap of the material in eV is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.23: Total_energy_absorbed_by_sample.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 3.23\n",
+"format('v',8)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"I_o = 10;// in mW\n",
+"e = 1.6 * 10^-19;// in J/eV\n",
+"hv = 2;// in eV\n",
+"hv1=1.43;// in eV\n",
+"alpha = 5 * 10^4;// in cm^-1\n",
+"l = 46;// in µm\n",
+"l = l * 10^-6;// in m\n",
+"I_t = round(I_o * exp(-(alpha) * l));// in mW\n",
+"AbsorbedPower= I_o-I_t;// in mW\n",
+"AbsorbedPower=AbsorbedPower*10^-3;// in W or J/s\n",
+"disp(AbsorbedPower,'The absorbed power in watt or J/s is');\n",
+"F= (hv-hv1)/hv;// fraction of each photon energy unit\n",
+"EnergyConToHeat= AbsorbedPower*F;// in J/s\n",
+"disp(EnergyConToHeat,'The amount of energy converted to heat per second in J/s is : ')\n",
+"A= (AbsorbedPower-EnergyConToHeat)/(e*hv1);\n",
+"disp(A,'The number of photon per sec given off from recombination events in photons/s is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.24: Hole_current.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 3.24\n",
+"format('v',9)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"Mu_p = 500;// in cm^2/V-sec\n",
+"kT = 0.0259;\n",
+"Toh_p = 10^-10;// in sec\n",
+"p_o = 10^17;// in cm^-3\n",
+"q= 1.6*10^-19;// in C\n",
+"A=0.5;// in square meter\n",
+"del_p = 5 * 10^16;// in cm^-3\n",
+"n_i= 1.5*10^10;// in cm^-3 \n",
+"D_p = kT * Mu_p;// in cm/s\n",
+"L_p = sqrt(D_p * Toh_p);// in cm\n",
+"x = 10^-5;// in cm\n",
+"p = p_o+del_p* %e^(x/L_p);// in cm^-3\n",
+"// p= n_i*%e^(Eip)/kT where Eip=E_i-F_p\n",
+"Eip= log(p/n_i)*kT;// in eV\n",
+"Ecp= 1.1/2-Eip;// value of E_c-E_p in eV\n",
+"Ip= q*A*D_p/L_p*del_p/%e^(x/L_p);// in A\n",
+"disp(Ip,'The hole current in A is : ')\n",
+"Qp= q*A*del_p*L_p;// in C\n",
+"disp(Qp,'The value of Qp in C is : ')\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.3: Position_of_Fermi_level.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 3.3\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"n_i = 1.5 * 10 ^10;// in /cm^3 for silicon\n",
+"N_d = 10^17;// in atoms/cm^3\n",
+"n_o = 10^17;// electrons/cm^3\n",
+"KT = 0.0259;\n",
+"// E_r - E_i = KT * log(n_o/n_i)\n",
+"del_E = KT * log(n_o/n_i);// in eV\n",
+"disp('The energy band for this type material is Ei + '+string(del_E)+' eV');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.4: Diffusion_coefficients_of_electrons_and_holes.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 3.4\n",
+"format('v',7)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"K = 1.38 * 10^-23;// in J/K\n",
+"T = 27;// in degree\n",
+"T = T + 273;// in K\n",
+"e = 1.6 * 10^-19;// in C\n",
+"Mu_e = 0.17;// in m^2/v-s\n",
+"Mu_e1 = 0.025;// in m^2/v-s\n",
+"D_n = ((K * T)/e) * Mu_e;// in m^2/s\n",
+"disp(D_n,'The diffusion coefficient of electrons in m^2/s is');\n",
+"D_p = ((K * T)/e) * Mu_e1;// in m^2/s\n",
+"disp(D_p,'The diffusion coefficient of holes in m^2/s is ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.5: Diffusion_length.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 3.5\n",
+"format('v',8)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"Mu_n = 0.15;// in m^2/v-s\n",
+"K = 1.38 * 10^-23; // in J/K\n",
+"T = 300;// in K\n",
+"del_n = 10^20;// in per m^3\n",
+"Toh_n = 10^-7;// in s\n",
+"e = 1.6 * 10^-19;// in C\n",
+"D_n = Mu_n * ((K * T)/e);// in m^2/s\n",
+"disp(D_n,'The diffusion coefficient in m^2/s is');\n",
+"L_n = sqrt(D_n * Toh_n);// in m \n",
+"disp(L_n,'The Diffusion length in m is');\n",
+"J_n = (e * D_n * del_n)/L_n;// in A/m^2\n",
+"disp(J_n,'The diffusion current density in A/m^2 is'); \n",
+"// Note : The value of diffusion coefficient in the book is wrong.\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.6: Concentration_of_holes_and_electrons.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 3.6\n",
+"format('v',8)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"Sigma = 0.1;// in (ohm-m)^-1\n",
+"Mu_n = 1300;\n",
+"n_i = 1.5 * 10^10;\n",
+"q = 1.6 * 10^-19;// in C\n",
+"n_n = Sigma/(Mu_n * q);// in electrons/cm^3\n",
+"n_n= n_n*10^6;// per m^3\n",
+"disp(n_n,'The concentration of electrons per m^3 is');\n",
+"p_n = (n_i)^2/n_n;// in per cm^3\n",
+"p_n = p_n * 10^6;// in per m^3\n",
+"disp(p_n,'The concentration of holes per m^3 is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.7: Electron_transit_time.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 3.7\n",
+"format('v',9)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"Mu_e = 0.13;// in m^2/v-s\n",
+"Mu_h = 0.05;// in m^2/v-s\n",
+"Toh_h = 10^-6;// in s\n",
+"L = 100;// in µm\n",
+"L = L * 10^-6;// in m\n",
+"V = 2;// in V\n",
+"t_n =L^2/(Mu_e * V);// in s\n",
+"disp(t_n,'Electron transit time in seconds is');\n",
+"p_g = (Toh_h/t_n) * (1 + Mu_h/Mu_e);//photo conductor gain \n",
+"disp(p_g,'Photo conductor gain is');\n",
+"\n",
+"// Note: There is a calculation error to evaluate the value of t_n. So the answer in the book is wrong"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.8: Resistivity_of_intrinsic_Ge.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 3.8\n",
+"format('v',5)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"//Given data\n",
+"n_i = 2.5 * 10^13;\n",
+"Mu_n = 3800;\n",
+"Mu_p = 1800;\n",
+"q = 1.6 * 10^-19;// in C\n",
+"Sigma = n_i * (Mu_n + Mu_p) * q;// in (ohm-cm)^-1\n",
+"Rho = 1/Sigma;// in ohm-cm\n",
+"Rho= round(Rho);\n",
+"disp(Rho,'The resistivity of intrinsic germanium in ohm-cm is');\n",
+"N_D = 4.4 * 10^22/(1*10^8);// in atoms/cm^3\n",
+"Sigma_n = N_D * Mu_n * q;// in (ohm-cm)^-1\n",
+"Rho_n = 1/Sigma_n;// in ohm-cm\n",
+"disp(Rho_n,'If a donor type impurity is added to the extent of 1 atom per 10^8 Ge atoms, then the resistivity drops in ohm-cm is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.9: Hole_and_electron_concentration.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 3.9\n",
+"format('v',8)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"n_i = 10^16;// in /m3\n",
+"N_D = 10^22;// in /m^3\n",
+"n = N_D;// in /m^3\n",
+"disp(n,'Electron concentration per m^3 is');\n",
+"p = (n_i)^2/n;// in /m^3\n",
+"disp(p,'Hole concentration per m^3 is');"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Electonic_Devices_by_S_Sharma/4-Junctions.ipynb b/Electonic_Devices_by_S_Sharma/4-Junctions.ipynb
new file mode 100644
index 0000000..3b4474b
--- /dev/null
+++ b/Electonic_Devices_by_S_Sharma/4-Junctions.ipynb
@@ -0,0 +1,931 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 4: Junctions"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.10: Width_of_the_depletion_layer.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Exa 4.10\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"//Given data\n",
+"A = 1;// in mm^2\n",
+"A = A * 10^-6;// in m^2\n",
+"N_A = 3 * 10^20;// in atoms/m^3\n",
+"q = 1.6 *10^-19;// in C\n",
+"V_o = 0.2;// in V\n",
+"epsilon_r=16;\n",
+"epsilon_o= 8.854*10^-12;// in F/m\n",
+"epsilon=epsilon_r*epsilon_o;\n",
+"// Part (a)\n",
+"V=-10;// in V\n",
+"// V_o - V = 1/2*((q * N_A )/epsilon) * W^2\n",
+"W = sqrt(((V_o - V) * 2 * epsilon)/(q * N_A));// m\n",
+"W= W*10^6;// in µm\n",
+"disp(W,'The width of the depletion layer for an applied reverse voltage of 10V in µm is ');\n",
+"W= W*10^-6;// in m\n",
+"C_T1 = (epsilon * A)/W;// in F\n",
+"C_T1= C_T1*10^12;// in pF\n",
+"// Part (b)\n",
+"V=-0.1;// in V\n",
+"W = sqrt(((V_o - V) * 2 * epsilon)/(q * N_A));// m\n",
+"W= W*10^6;// in µm\n",
+"disp(W,'The width of the depletion layer for an applied reverse voltage of 0.1V in µm is ');\n",
+"W= W*10^-6;// in m\n",
+"C_T2 = (epsilon * A)/W;// in F\n",
+"C_T2= C_T2*10^12;// in pF\n",
+"// Part (c)\n",
+"V=0.1;// in V\n",
+"W = sqrt(((V_o - V) * 2 * epsilon)/(q * N_A));// m\n",
+"W= W*10^6;// in µm\n",
+"disp(W,'The width of the depletion layer for an applied for a forward bias of 0.1V in µm is ');\n",
+"// Part (d)\n",
+"disp(C_T1,'The space charge capacitance for an applied reverse voltage of 10V in pF is');\n",
+"disp(C_T2,'The space charge capacitance for an applied reverse voltage of 0.1V in pF is');\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.11: Current_in_the_junction.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 4.11\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"I_o = 1.8 * 10^-9;// A\n",
+"v = 0.6;// in V\n",
+"Eta = 2;\n",
+"V_T = 26;// in mV\n",
+"V_T=V_T*10^-3;// in V\n",
+"// The current in the junction\n",
+"I = I_o *(%e^(v/(Eta * V_T)));// in A\n",
+"I= I*10^3;// in mA\n",
+"disp(I,'The current in the junction in mA is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.12: Forward_biasing_voltage.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 4.12\n",
+"format('v',7)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"I_o = 2.4 * 10^-14;\n",
+"I = 1.5;// in mA\n",
+"I=I*10^-3;// in A\n",
+"Eta = 1;\n",
+"V_T = 26;// in mV\n",
+"V_T= V_T*10^-3;// in V\n",
+"// The forward biasing voltage across the junction\n",
+"v =log((I + I_o)/I_o) * V_T;// in V\n",
+"disp(v,'The forward biasing voltage across the junction in V is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.13: Theoretical_diode_current.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 4.13\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"I_o = 10;// in nA\n",
+"// I = I_o * ((e^(v/(Eta * V_T))) - 1) as diode is reverse biased by large voltage\n",
+"// e^(v/(Eta * V_T)<< 1, so neglecting it\n",
+"I = I_o * (-1);// in nA\n",
+"disp(I,'The Diode current in nA is ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.14: Diode_dynamic_resistance.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 4.14\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"R = 4.5;// in ohm\n",
+"I = 44.4;// in mA\n",
+"I=I*10^-3;// in A\n",
+"V = R * I;// in V\n",
+"Eta = 1;\n",
+"V_T = 26;//in mV\n",
+"V_T=V_T*10^-3;// in V\n",
+"// Reverse saturation current,\n",
+"I_o = I/((%e^(V/(Eta * V_T))) -1);// in A\n",
+"// Dynamic resistance at 0.1 V forward bias\n",
+"V = 0.1;// in V\n",
+"// The diode dynamic resistance,\n",
+"r_f = (Eta * V_T)/(I_o * ((%e^(V/(Eta * V_T)))-1));// in ohm\n",
+"disp(r_f,'The diode dynamic resistance in Ω is');\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.15: DC_load_line_and_operating_point.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 4.15\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"V_D = 10;// in V\n",
+"// V_S = i*R_L + V_D\n",
+"V_S = V_D;// in V (i * R_L = 0)\n",
+"disp(V_S,'when diode is OFF, the voltage in volts is : ');\n",
+"R_L = 250;// in ohm\n",
+"I = V_S/R_L;// in A\n",
+"disp(I*10^3,'when diode is ON, the current in mA is');\n",
+"V_D= 0:0.1:10;// in V\n",
+"I= (V_S-V_D)/R_L*1000;// in mA\n",
+"plot(V_D,I)\n",
+"xlabel('V_D in volts');\n",
+"ylabel('Current in mA')\n",
+"title('DC load line');\n",
+"disp('DC load line shown in figure')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.16: AC_resistance_of_a_Ge_diode.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 4.16\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"V = 0.25;// in V\n",
+"I_o = 1.2;// in µA\n",
+"I_o = I_o * 10^-6;// in A\n",
+"V_T = 26;// in mV\n",
+"V_T = V_T * 10^-3;// in V\n",
+"Eta = 1;\n",
+"// The ac resistance of the diode \n",
+"r = (Eta * V_T)/(I_o * (%e^(V/(Eta * V_T))));// in ohm\n",
+"disp(r,'The ac resistance of the diode in ohm is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.17: Junction_potential.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 4.17\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"t = 4.4 * 10^22;// in total number of atoms/cm^3\n",
+"n = 1 * 10^8;// number of impurity\n",
+"N_A = t/n;// in atoms/cm^3\n",
+"N_A = N_A * 10^6;// in atoms/m^3\n",
+"N_D = N_A * 10^3;// in atoms/m^3\n",
+"V_T = 26;// in mV\n",
+"V_T = V_T * 10^-3;// in V\n",
+"n_i = 2.5 * 10^19;// in /cm^3\n",
+"// The junction potential\n",
+"V_J = V_T * log((N_A * N_D)/(n_i)^2);// in V\n",
+"disp(V_J,'The junction potential in V is')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.18: Dynamic_resistance.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 4.18\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"Eta = 1;\n",
+"I_o = 30;// in MuA\n",
+"I_o = I_o * 10^-6;// in A\n",
+"v = 0.2;// in V\n",
+"K = 1.381 * 10^-23;// in J/degree K \n",
+"T = 125;// in °C\n",
+"T = T + 273;// in K\n",
+"q = 1.6 * 10^-19;// in C\n",
+"V_T = (K*T)/q;// in V\n",
+"// The forward dynamic resistance,\n",
+"r_f = (Eta * V_T)/(I_o * (%e^(v/(Eta * V_T))));// in ohm\n",
+"disp(r_f,'The forward dynamic resistance in ohm is');\n",
+"// The Reverse dynamic resistance\n",
+"r_f1 = (Eta * V_T)/(I_o * (%e^(-(v)/(Eta * V_T))));// in ohm\n",
+"r_f1= r_f1*10^-3;// in k ohm\n",
+"disp(r_f1,'The Reverse dynamic resistance in kΩ is');\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.19: Width_of_the_depletion_layer.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 4.19\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"q = 1.6 * 10^-19;// in C\n",
+"N_A = 3 * 10^20;// in /m^3\n",
+"A = 1;// in µm^2\n",
+"A = A * 10^-6;// in m^2\n",
+"V = -10;// in V\n",
+"V_J = 0.25;// in V\n",
+"V_B = V_J - V;// in V\n",
+"epsilon_o = 8.854;// in pF/m\n",
+"epsilon_o = epsilon_o * 10^-12;// in F/m\n",
+"epsilon_r = 16;\n",
+"epsilon = epsilon_o * epsilon_r;\n",
+"// The width of depletion layer,\n",
+"W = sqrt((V_B * 2 * epsilon)/(q * N_A));// in m \n",
+"W=W*10^6;// in µm\n",
+"disp(W,'The width of depletion layer in µm is');\n",
+"W=W*10^-6;// in m\n",
+"// The space charge capacitance,\n",
+"C_T = (epsilon * A)/W;// in pF\n",
+"C_T=C_T*10^12;// in pF\n",
+"disp(C_T,'The space charge capacitance in pF is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.20: Barrier_capacitance_of_a_Ge_pn_junction.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 4.20\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"W = 2 * 10^-4;// in cm\n",
+"W = W * 10^-2;// in m\n",
+"A = 1;// in mm^2\n",
+"A = A * 10^-6;// in m^2\n",
+"epsilon_r = 16;\n",
+"epsilon_o = 8.854 * 10^-12;// in F/m\n",
+"epsilon = epsilon_r * epsilon_o;\n",
+"C_T = (epsilon * A)/W;// in F\n",
+"C_T= C_T*10^12;// in pF\n",
+"disp(C_T,'The barrier capacitance in pF is');\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.21: Diameter.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 4.21\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"C_T = 100;// in pF\n",
+"C_T=C_T*10^-12;// in F\n",
+"epsilon_r = 12;\n",
+"epsilon_o = 8.854 * 10^-12;// in F/m\n",
+"epsilon = epsilon_r * epsilon_o;\n",
+"Rho_p = 5;// in ohm-cm\n",
+"Rho_p = Rho_p * 10^-2;// in ohm-m\n",
+"V_j = 0.5;// in V\n",
+"V = -4.5;// in V\n",
+"Mu_p = 500;// in cm^2\n",
+"Mu_p = Mu_p * 10^-4;// in m^2\n",
+"Sigma_p = 1/Rho_p;// in per ohm-m\n",
+"qN_A = Sigma_p/ Mu_p;\n",
+"V_B = V_j - V;\n",
+"W = sqrt((V_B * 2 * epsilon)/qN_A);// in m\n",
+"//C_T = (epsilon * A)/W;\n",
+"A = (C_T * W)/ epsilon;// in m\n",
+"D = sqrt(A * (4/%pi));// in m\n",
+"D = D * 10^3;// in mm\n",
+"disp(D,'The diameter in mm is');\n",
+" "
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.22: Temperature_of_junction.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 4.22\n",
+"format('v',7)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"q = 1.6 * 10^-19;// in C\n",
+"Mu_p = 500;// in cm^2/V-sec\n",
+"Rho_p = 3.5;// in ohm-cm\n",
+"Mu_n = 1500;// in cm^2/V-sec\n",
+"Rho_n = 10;// in ohm-cm\n",
+"N_A = 1/(Rho_p * Mu_p * q);// in /cm^3\n",
+"N_D = 1/(Rho_n * Mu_n * q);// in /cm^3\n",
+"V_J = 0.56;// in V\n",
+"n_i = 1.5 * 10^10;// in /cm^3\n",
+"V_T = V_J/log((N_A * N_D)/(n_i)^2);// in V\n",
+"// V_T = T/11600\n",
+"T = V_T * 11600;// in K\n",
+"T = T - 273;// in °C\n",
+"disp(T,'The Temperature of junction in °C is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.23: Voltage.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 4.23\n",
+"format('v',7)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"V_T = 26;// in mV\n",
+"V_T = V_T * 10^-3;// in V\n",
+"Eta = 1;\n",
+"// I = -90% for Io, so\n",
+"IbyIo= 0.1;\n",
+"// I = I_o * ((e^(v/(Eta * V_T)))-1)\n",
+"V = log(IbyIo) * V_T;// in V\n",
+"disp(V,'The reverse bias voltage in volts is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.24: Reverse_saturation_current.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 4.24\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"R = 5;// in ohm\n",
+"I = 50;// in mA\n",
+"I=I*10^-3;// in A\n",
+"V = R * I;// in V\n",
+"Eta = 1;\n",
+"V_T = 26;// in mV\n",
+"V_T=V_T*10^-3;// in V\n",
+"// The reverse saturation current \n",
+"I_o = I/((%e^(V/(Eta * V_T))) - 1);// in A\n",
+"I_o= I_o*10^6;// in µA\n",
+"disp(I_o,'Reverse saturation current in µA is');\n",
+"I_o= I_o*10^-6;// in A\n",
+"v1 = 0.2;// in V\n",
+"// The dynamic resistance of the diode,\n",
+"r = (Eta * V_T)/(I_o * (%e^(v1/(Eta * V_T))));// in ohm\n",
+"disp(r,'Dynamic resistance of the diode in Ω is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.2: Tuning_range.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 4.2\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"C1= 5*10^-12;// in F\n",
+"C2= 5*10^-12;// in F\n",
+"L= 10*10^-3;// in H\n",
+"C_Tmin= C1*C2/(C1+C2);// in F\n",
+"f_omax= 1/(2*%pi*sqrt(L*C_Tmin));// in Hz\n",
+"C1= 50*10^-12;// in F\n",
+"C2= 50*10^-12;// in F\n",
+"C_Tmax= C1*C2/(C1+C2);// in F\n",
+"f_omin= 1/(2*%pi*sqrt(L*C_Tmax));// in Hz\n",
+"f_omax= f_omax*10^-6;// in MHz\n",
+"f_omin= f_omin*10^-3;// in kHz\n",
+"disp(f_omax,'The maximum value of resonant frequency in MHz is : ')\n",
+"disp(f_omin,'The minimum value of resonant frequency in kHz is : ')\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.3: Contact_difference_of_potential.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 4.3\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"t = 4.4 * 10^22;// total number of Ge atoms/cm^3\n",
+"n = 1 * 10^8;// number of impurity atoms\n",
+"N_A = t/n;// in atoms/cm^3\n",
+"N_A = N_A * 10^6;// in atoms/m^3\n",
+"N_D = N_A * 10^3;// in atoms/m^3\n",
+"n_i = 2.5 * 10^13;// in atoms/cm^3\n",
+"n_i = n_i * 10^6;// in atoms/m^3\n",
+"V_T = 26;//in mV\n",
+"V_T= V_T*10^-3;// in V\n",
+"// The contact potential for Ge semiconductor,\n",
+"V_J = V_T * log((N_A * N_D)/(n_i)^2);// in V\n",
+"disp(V_J,'The contact potential for Ge semiconductor in V is');\n",
+"// Part (b)\n",
+"t = 5* 10^22;// total number of Si atoms/cm^3\n",
+"N_A = t/n;// in atoms/cm^3\n",
+"N_A = N_A * 10^6;// in atoms/m^3\n",
+"N_D = N_A * 10^3;// in atoms/m^3\n",
+"n_i = 1.5 * 10^10;// in atoms/cm^3\n",
+"n_i = n_i * 10^6;// in atoms/m^3\n",
+"V_T = 26;//in mV\n",
+"V_T= V_T*10^-3;// in V\n",
+"// The contact potential for Si P-N junction,\n",
+"V_J = V_T * log((N_A * N_D)/(n_i)^2);// in V\n",
+"disp(V_J,'The contact potential for Si P-N junction in V is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.4: Height_of_the_potential_energy_barrier.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 4.4\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"V_T = 26;// in mV\n",
+"V_T=V_T*10^-3;// in V\n",
+"n_i = 2.5 * 10^13;\n",
+"Sigma_p = 1;\n",
+"Sigma_n = 1;\n",
+"Mu_n = 3800;\n",
+"q = 1.6 * 10^-19;// in C\n",
+"Mu_p = 1800;\n",
+"N_A = Sigma_p/(2* q * Mu_p);// in /cm^3\n",
+"N_D = Sigma_n /(q * Mu_n);// in /cm^3\n",
+"// The height of the energy barrier for Ge,\n",
+"V_J = V_T * log((N_A * N_D)/(n_i)^2);// in V\n",
+"disp(V_J,'For Ge the height of the energy barrier in V is');\n",
+"// For Si p-n juction\n",
+"n_i = 1.5 * 10^10;\n",
+"Mu_n = 1300;\n",
+"Mu_p = 500;\n",
+"N_A = Sigma_p/(2* q * Mu_p);// in /cm^3\n",
+"N_D = Sigma_n /(q * Mu_n);// in /cm^3\n",
+"// The height of the energy barrier for Si p-n junction,\n",
+"V_J = V_T * log((N_A * N_D)/(n_i)^2);// in V\n",
+"disp(V_J,'For Si p-n junction the height of the energy barrier in V is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.5: Forward_current.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Exa 4.5\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"Eta = 1;\n",
+"V_T = 26;// in mV\n",
+"V_T= V_T*10^-3;// in V\n",
+"//From equation of the diode current, I = I_o * (%e^(V/(Eta*V_T)) - 1) and I = -(0.9) * I_o\n",
+"V= log(1-0.9)*V_T;//voltage in V\n",
+"disp(V,'The voltage in volts is : ')\n",
+"// Part (ii)\n",
+"V1=0.05;// in V\n",
+"V2= -0.05;// in V\n",
+"// The ratio of the current for a forward bias to reverse bias \n",
+"ratio= (%e^(V1/(Eta*V_T))-1)/(%e^(V2/(Eta*V_T))-1)\n",
+"disp(ratio,'The ratio of the current for a forward bias to reverse bias is : ')\n",
+"// Part (iii)\n",
+"Io= 10;// in µA\n",
+"Io=Io*10^-3;// in mA\n",
+"//For \n",
+"V=0.1;// in V\n",
+"// Diode current\n",
+"I = Io * (%e^(V/(Eta*V_T)) - 1);// in mA\n",
+"disp(I,'For V=0.1 V , the value of I in mA is : ')\n",
+"//For \n",
+"V=0.2;// in V\n",
+"// Diode current\n",
+"I = Io * (%e^(V/(Eta*V_T)) - 1);// in mA\n",
+"disp(I,'For V=0.2 V , the value of I in mA is : ')\n",
+"//For \n",
+"V=0.3;// in V\n",
+"// Diode current\n",
+"I = Io * (%e^(V/(Eta*V_T)) - 1);// in mA\n",
+"disp(I*10^-3,'For V=0.3 V , the value of I in A is : ')\n",
+"disp('From three value of I, for small rise in forward voltage, the diode current increase rapidly')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.6: Anticipated_factor.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Exa 4.6\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"// Part (i)\n",
+"T1= 25;// in °C\n",
+"T2= 80;// in °C\n",
+"// Formula Io2= Io1*2^((T2-T1)/10)\n",
+"AntiFactor= 2^((T2-T1)/10);\n",
+"disp(round(AntiFactor),'Anticipated factor for Ge is : ')\n",
+"// Part (ii)\n",
+"T1= 25;// in °C\n",
+"T2= 150;// in °C\n",
+"AntiFactor= 2^((T2-T1)/10);\n",
+"disp(round(AntiFactor),'Anticipated factor for Si is : ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.7: Leakage_resistance.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Exa 4.7\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"I=5;// in µA\n",
+"V=10;// in V\n",
+"T1= 0.11;// in °C^-1\n",
+"T2= 0.07;// in °C^-1\n",
+"// Io+I_R=I (i)\n",
+"// dI_by_dT= dIo_by_dT (ii)\n",
+"// 1/Io*dIo_by_dT = T1 and 1/I*dI_by_dT = T2, So\n",
+"Io= T2*I/T1;// in µA\n",
+"I_R= I-Io;// in µA\n",
+"R= V/I_R;// in MΩ\n",
+"disp(R,'The leakage resistance in MΩ is : ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.8: Dynamic_resistance.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Exa 4.8\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"Eta = 1;\n",
+"T = 125;// in °C\n",
+"T = T + 273;// in K\n",
+"V_T = 8.62 * 10^-5 * 398;// in V\n",
+"I_o = 30;// in µA\n",
+"I_o= I_o*10^-6;// in A\n",
+"v = 0.2;// in V\n",
+"// The dynamic resistance in the forward direction \n",
+"r_f = (Eta * V_T)/(I_o * %e^(v/(Eta* V_T)));// in ohm\n",
+"disp(r_f,'The dynamic resistance in the forward direction in ohm is ');\n",
+"// The dynamic resistance in the reverse direction \n",
+"r_r = (Eta * V_T)/(I_o * %e^(-v/(Eta* V_T)));// in ohm\n",
+"r_r= r_r*10^-3;// in k ohm\n",
+"disp(r_r,'The dynamic resistance in the reverse direction in kohm is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.9: Barrier_capacitance.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 4.9\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"epsilon = 16/(36 * %pi * 10^11);// in F/cm\n",
+"A = 1 * 10^-2;\n",
+"W = 2 * 10^-4;\n",
+"// The barrier capacitance \n",
+"C_T = (epsilon * A)/W;// in F\n",
+"C_T= C_T*10^12;// in pF\n",
+"disp(C_T,'The barrier capacitance in pF is');"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Electonic_Devices_by_S_Sharma/5-MOSFETs.ipynb b/Electonic_Devices_by_S_Sharma/5-MOSFETs.ipynb
new file mode 100644
index 0000000..71c45d5
--- /dev/null
+++ b/Electonic_Devices_by_S_Sharma/5-MOSFETs.ipynb
@@ -0,0 +1,1611 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 5: MOSFETs"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.10: Necessary_value_of_Rs.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 5.10\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"V_GS = 4;// in V\n",
+"V_P = 2;// in V\n",
+"R2 = 10;// in k ohm\n",
+"R1 = 30;// in k ohm\n",
+"R_D= 2.5;// in kohm\n",
+"I_D= 15;// in mA\n",
+"I_D= I_D*10^-3;// in A\n",
+"V_DD = 25;// in V\n",
+"V_G = (V_DD/R_D)*V_DD/(R1+R2);// in V\n",
+"// The necessary value for R_S\n",
+"R_S = (V_G-V_GS)/I_D;// in ohm\n",
+"disp(R_S,'The value of R_S in ohm is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.11: ID_and_VDS.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 5.11\n",
+"format('v',5)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"k= 0.1;// in mA/V^2\n",
+"V_T= 1;// in V\n",
+"R2= 87*10^3;// in Ω\n",
+"R1= 110*10^3;// in Ω\n",
+"R_S=2;// in kΩ\n",
+"R_D=2;// in kΩ\n",
+"//R_D=3*10^3;// in Ω\n",
+"V_DD= 6;// in V\n",
+"V_SS= 6;// in V\n",
+"V_G= (V_DD+V_SS)*R2/(R1+R2);// in V\n",
+"// V_S= I_D*R_S-V_SS\n",
+"// V_GS= V_G-V_S= V_G+V_SS-(I_D*R_S)\n",
+"// I_D= k*[V_GS-V_T]^2 = k*[(V_G+V_SS-V_T)-(I_D*R_S)]^2\n",
+"//(I_D*R_S)^2- I_D*(2*R_S*(V_G+V_SS-V_T)+1/k) +(V_G+V_SS-V_T)^2\n",
+"A= R_S^2;// assumed\n",
+"B= -(2*R_S*(V_G+V_SS-V_T)+1/k);// assumed\n",
+"C= (V_G+V_SS-V_T)^2;// assumed\n",
+"I_D= [A B C]\n",
+"I_D= roots(I_D);// in mA\n",
+"I_D= I_D(2);// in mA\n",
+"disp(I_D,'The value of I_D in mA is : ')\n",
+"// Applying KVL to drain source loop, V_DD+V_SS= I_D*R_D+V_DS+I_D*R_S\n",
+"V_DS=V_DD+V_SS-I_D*R_D-I_D*R_S;// in V\n",
+"disp(V_DS,'The value of V_DS in volts is : ')\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.12: Designing_of_NMOS_CS_circuit.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 5.12\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"k = 0.16;// in mA/V^2\n",
+"V_T = 2;// in V\n",
+"I_D = 0.5;// in mA\n",
+"V_DD = 6;// in V\n",
+"V_SS = -6;// in V\n",
+"V_GS = V_T + (sqrt(I_D/k));// in V\n",
+"R_S = 2;// in k ohm\n",
+"V_S = (I_D*R_S) - V_DD;// in V\n",
+"V_G = V_GS+V_S;// in V\n",
+"I = 0.1*I_D;// in mA\n",
+"R2 = (V_G+V_DD)/I;// in k ohm\n",
+"disp(R2,'The value of R2 in k ohm is');\n",
+"R1 = (V_DD - V_G)/I;// in k ohm\n",
+"disp(R1,'The value of R1 in k ohm is');\n",
+"R_D = 10;// in k ohm\n",
+"V_DS = (V_DD-V_SS) - (I_D*(R_S+R_D));// in V\n",
+"disp(V_DS,'The value of V_DS in V is');\n",
+"V_DSsat = V_GS-V_T;// in V\n",
+"disp(V_DSsat,'The value of V_DS(sat) in V is');\n",
+"if V_DS>V_DSsat then\n",
+" disp('The MOSFET is in saturation region')\n",
+"end\n",
+"\n",
+"// Note: The value of R1 is in k ohm but in the book it is wrong."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.13: IDQ_and_VDS.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 5.13\n",
+"format('v',5)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"V_DD = 6;// in V\n",
+"V_D = 3;// in V\n",
+"R_D = 10;// in k ohm\n",
+"// The value of I_DQ can be find as,\n",
+"I_DQ = (V_DD-V_D)/R_D;// in mA\n",
+"disp(I_DQ,'The value of I_DQ in mA is');\n",
+"V_T = 0.8;// in V\n",
+"k = 0.12;// in mA/V^2\n",
+"// The value of Ground to Source voltage,\n",
+"V_GS = sqrt(I_DQ/k) + V_T;// in V\n",
+"V_S = -V_GS;// in V\n",
+"// The value of Drain to Source voltage,\n",
+"V_DS = V_D-V_S;// in V\n",
+"disp(V_DS,'The value of V_DS in V is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.14: The_region_of_operation.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 5.14\n",
+"format('v',5)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"I_D = 0.3;// in mA\n",
+"k = 0.12;// in mA/V^2\n",
+"V_T = 1;// in V\n",
+"V_GS = V_T + (sqrt(I_D/k));// in V\n",
+"V_S = -V_GS;// in V\n",
+"V_DD = 6;// in V\n",
+"V_D = 3;// in V\n",
+"I_DQ = 0.3;// in mA\n",
+"R_D = (V_DD-V_D)/I_DQ;// in k ohm\n",
+"disp(R_D,'The value of R_D in k ohm is');\n",
+"V_DS = V_D - V_S;// in V\n",
+"disp(V_DS,'The value of V_DS in V is');\n",
+"V_DSsat = V_GS - V_T;// in V\n",
+"disp(V_DSsat,'The value of V_DS(sat) in V is');\n",
+"if V_DS>V_DSsat then\n",
+" disp('The MOSFET is in saturation region')\n",
+"end"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.15: VDS_VGS_and_ID.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 5.15\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"k= 0.05;// in mA/V^2\n",
+"V_T= 1;// in V\n",
+"V_DD= 6;// in V\n",
+"R_S= 9.1;//in kΩ\n",
+"//V_GS= V_DD-I_D*R_S\n",
+"//I_D= k*(V_DD-I_D*R_S)^2\n",
+"//I_D^2*R_S^2-I_D*(2*V_DD*R_S+1/k)+V_DD^2\n",
+"A= R_S^2;// assumed\n",
+"B=-(2*V_DD*R_S+1/k);// assumed\n",
+"C= V_DD^2;// assumed\n",
+"I_D= [A B C];\n",
+"I_D= roots(I_D);// in mA\n",
+"I_D= I_D(2);// in mA\n",
+"V_GS= V_DD-I_D*R_S;// in V\n",
+"V_DS= V_GS;// in V\n",
+"disp(I_D,'The value of I_D in mA is : ')\n",
+"disp(V_GS,'The value of V_GS in volts is : ')\n",
+"disp(V_DS,'The value of V_DS in volts is : ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.16: All_dc_voltages.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 5.16\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"k1= 0.01;// in mA/V^2\n",
+"k2= 0.05;// in mA/V^2\n",
+"V_DD= 5;// in V\n",
+"V_T1=1;// in V\n",
+"V_T2=1;// in V\n",
+"// Analysis for Vi= 5V\n",
+"Vi= 5;// in V\n",
+"//I_D1= k1*(V_GS1-V_T1)^2 and I_D2= k2*(2*(V_GS2-V_T2)*V_DS2-V_DS2^2)\n",
+"// But V_GS2= Vi, V_DS2= Vo, V_GS1= V_DS1= V_DD-Vo\n",
+"//Vo^2*(k1+k2)-Vo*[2*k1*(V_DD-V_T1)+2*k2*(Vi-V_T2)]+k1*(V_DD-V_T1)^2\n",
+"A=(k1+k2);\n",
+"B=-[2*k1*(V_DD-V_T1)+2*k2*(Vi-V_T2)];\n",
+"C=k1*(V_DD-V_T1)^2;\n",
+"Vo= [A B C]\n",
+"Vo= roots(Vo);// in V\n",
+"Vo= Vo(2);// in V\n",
+"V_GS2= Vi;// in V\n",
+"V_DS2= Vo;// in V\n",
+"V_GS1= V_DD-Vo;// in V\n",
+"I_D1= k1*(V_GS1-V_T1)^2;// in mA\n",
+"I_D2= I_D1;// in mA\n",
+"disp('Part (i) For Vi = 5 V')\n",
+"disp(Vo,'The output voltage in volts is : ')\n",
+"disp(I_D1,'The value of I_D1 in mA is : ')\n",
+"disp(I_D2,'The value of I_D2 in mA is : ')\n",
+"// Analysis for Vi= 1.5V\n",
+"Vi= 1.5;// in V\n",
+"//I_D2= k2*(V_GS2-V_T2)^2 and I_D1= k1*(V_GS1-V_T1)^2\n",
+"// But V_GS2= Vi, V_DS2= Vo, V_GS1= V_DS1= V_DD-Vo\n",
+"//k2*(Vi-V_T2)^2= k1*(V_DD-Vo-V_T1)^2 or \n",
+"Vo= V_DD-V_T1-sqrt(k2/k1)*(Vi-V_T2);// in V\n",
+"I_D2= k2*(Vi-V_T2)^2;//in mA\n",
+"I_D1= I_D2;// in mA\n",
+"disp('Part (ii) For Vi = 1.5 V')\n",
+"disp(Vo,'The output voltage in volts is : ')\n",
+"disp(I_D1,'The value of I_D1 in mA is : ')\n",
+"disp(I_D2,'The value of I_D2 in mA is : ')\n",
+"\n",
+"\n",
+"\n",
+"\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.17: ID_and_VDS.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 5.17\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"k = 0.12;// in mA/V^2\n",
+"V_T = -2.5;// in V\n",
+"V_GS = 0;\n",
+"I_D = k*((V_GS-V_T)^2);// in mA\n",
+"disp(I_D,'The value of I_D in mA is');\n",
+"V_DD = 6;// in V\n",
+"R_S = 4.7;// in k ohm \n",
+"V_DS = V_DD -(I_D*R_S);// in V\n",
+"disp(V_DS,'The value of V_DS in V is '); \n",
+"V_S = 0;// in V \n",
+"V_DSsat = V_S - V_T;// in V\n",
+"disp(V_DSsat,'The value of V_DS(sat) in V is');\n",
+"if V_DS<V_DSsat then\n",
+" disp('The device is in the non saturation region')\n",
+"end"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.18: Various_voltage_and_current.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 5.18\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"k4 = 0.125;// in mA/V^2\n",
+"k3 = k4;// in mA/V^2\n",
+"k2 = k4;// in mA/V^2\n",
+"k1 = 0.25;// in mA/V^2\n",
+"V_T1 = 0.8;// in V\n",
+"V_T2 = V_T1;// in V\n",
+"V_T3 = V_T1;// in V\n",
+"V_T4 = V_T1;// in V\n",
+"V_SS = -5;// in V\n",
+"V_DD = 5;// in V\n",
+"R_D = 10;// in k ohm\n",
+"// Required formula, V_GS3 = ((sqrt(k4/k3) * (-V_SS - V_T4))+V_T3)/(1+sqrt(k4/k3))\n",
+"V_GS3 = ((sqrt(k4/k3) * (-V_SS - V_T4))+V_T3)/(1+sqrt(k4/k3));// in V\n",
+"// Calculation to evaluate the value of I_Q,\n",
+"I_Q = k2*((V_GS3-V_T2)^2);// in mA\n",
+"I_D1 = I_Q;// in mA\n",
+"// The value of V_GS1,\n",
+"V_GS1 = V_T1 + (sqrt(I_D1/k1));// in V\n",
+"disp(V_GS1,'The value of V_GS1 in V is');\n",
+"// The value of V_DS2,\n",
+"V_DS2 = (-V_SS-V_GS1);// in V\n",
+"disp(V_DS2,'The value of V_DS2 in V is');\n",
+"// The value of V_DS1,\n",
+"V_DS1 = V_DD - (I_Q*R_D) - (V_SS + V_DS2);// in V\n",
+"disp(V_DS1,'The value of V_DS1 in V is');\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.19: Q_point.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 5.19\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"R2 = 20;// in k ohm\n",
+"R1 = 30;// in k ohm\n",
+"R_D = 20;// in k ohm\n",
+"R_D=R_D*10^3;// in ohm\n",
+"V_DD = 5;// in V\n",
+"V_G = (R2/(R1+R2))*V_DD;// in V\n",
+"V_S = 0;// in V\n",
+"V_GS = V_G;// in V\n",
+"k = 100*10^-6;// in A/V^2\n",
+"V_T = 1;// in V\n",
+"// The value of I_DQ,\n",
+"I_DQ = k*((V_GS-V_T)^2);// in A\n",
+"I_DQ= I_DQ * 10^6;// in µA\n",
+"disp(I_DQ,'The value of I_DQ in µA is');\n",
+"I_DQ= I_DQ * 10^-6;// in A\n",
+"// The value of V_DSQ,\n",
+"V_DSQ = V_DD - (I_DQ*R_D);// in V \n",
+"disp(V_DSQ,'The value of V_DSQ in V is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.1: Current.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 5.1\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"V_TN = 0.7;// in V\n",
+"W = 45*10^-4;// in cm\n",
+"L = 4;// in µm\n",
+"L = L * 10^-4;// in cm\n",
+"t_ox = 450;// in Å\n",
+"t_ox = t_ox*10^-8;// in cm\n",
+"V_GS = 1.4;// in V\n",
+"Miu_n = 700;// in cm^2/V-s\n",
+"Epsilon_ox = (8.85*10^-14)*(3.9);// in F/cm\n",
+"// Conduction parameter can be expressed as,\n",
+"k_n = (W*Miu_n*Epsilon_ox)/(2*L*t_ox);// A/V^2\n",
+"k_n= k_n*10^3;// in mA/V^2\n",
+"disp(k_n,'The value of k_n in mA/V^2 is : ')\n",
+"k_n= k_n*10^-3;// in A/V^2\n",
+"// The drain current,\n",
+"I_D = k_n*((V_GS-V_TN)^2);// in A\n",
+"I_D= I_D*10^3;// in mA\n",
+"disp(I_D,'The current in mA is ');\n",
+"\n",
+"// Note: There is a calculation error to find the value of k_n, So the answer in the book is wrong"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.20: IDQ_VGSQ_and_VD.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 5.20\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"V_P= -8;// in V\n",
+"R_S= 2.4;// in kΩ\n",
+"//R_D= 1800;// in Ω\n",
+"I_DSS= 8;// in mA\n",
+"V_DD= 20;// in V\n",
+"R_D= 6.2;// in kΩ\n",
+"// V_GS= -I_D*R_S\n",
+"// I_D= I_DSS*(1-V_GS/V_P)^2 or I_DSS*(1-(-I_D*R_S)/V_P)^2\n",
+"//I_D^2*R_S^2+I_D*(2*R_S*(V_P-V_G)-V_P^2/I_DSS)+(V_P)^2\n",
+"A= R_S^2\n",
+"B=(2*R_S*(V_P)-V_P^2/I_DSS)\n",
+"C=(V_P)^2\n",
+"I_D= [A B C]\n",
+"// Evaluation fo I_D using by polynomial method\n",
+"I_D= roots(I_D);// in mA\n",
+"I_D= I_D(2);// in mA\n",
+"I_DQ= I_D;// in mA\n",
+"disp(I_DQ,'The value of I_DQ in mA is : ')\n",
+"// The value of V_GSQ\n",
+"V_GSQ= -I_D*R_S;// in V\n",
+"disp(V_GSQ,'The value of V_GSQ in volts ')\n",
+"// The value of V_D,\n",
+"V_D= V_DD-I_D*R_D;// in V\n",
+"disp(V_D,'The value of V_D in volts is : ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.21: ID_VD_VS_and_VG.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 5.21\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"k= 75*10^-3;//in mA/V^2\n",
+"Vth= -0.8;// in V\n",
+"R2 = 100;// in k ohm\n",
+"R1 = 100;// in k ohm\n",
+"R_S= 6;// in kΩ\n",
+"R_D= 3;// in kΩ\n",
+"V_SS = 10;// in V\n",
+"V_G = (R2/(R1+R2))*V_SS;// in V\n",
+"I_D= poly(0,'I_D');\n",
+"V_S= V_SS-I_D*R_S;// in V\n",
+"V_GS= V_G-V_S;//in V\n",
+"I_D= I_D-k*(V_GS-Vth)^2;\n",
+"I_D= roots(I_D);// in mA\n",
+"// For I_D(1), the V_DS will be positive, so discarding this\n",
+"I_D= I_D(2);// in mA\n",
+"V_DS= -V_SS+I_D*(R_D+R_S);// in V\n",
+"V_D= I_D*R_D;// in V\n",
+"V_S= I_D*R_S;// in V\n",
+"disp(I_D,'The value of I_D in mA is : ')\n",
+"disp(V_DS,'The value of V_DS in volts is : ')\n",
+"disp(V_D,'The value of V_D in volts is : ')\n",
+"disp(V_S,'The value of V_S in volts is : ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.22: Value_of_RD.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 5.22\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"V_T = 1;// in V\n",
+"k = 160*10^-6;// in A/V^2\n",
+"I_DQ = 160*10^-6;// in A\n",
+"V_GS = V_T + sqrt(I_DQ/k);// in V\n",
+"V_DD = 5;// in V\n",
+"V_DSQ = 3;// in V\n",
+"R_D = (V_DD - V_DSQ)/(I_DQ);// in ohm\n",
+"R_D = R_D * 10^-3;// in k ohm\n",
+"disp(R_D,'The value of R_D in k ohm is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.23: Q_point.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 5.23\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"V_DD= 12;// in V\n",
+"V_T= 2;// in V\n",
+"kn= 0.5;// in mA/V^2\n",
+"R1 = 2.2;// in M ohm\n",
+"R2 = 1.8;// in M ohm\n",
+"R_S= 1.5;// in kΩ\n",
+"R_D= 3.9;// in kΩ\n",
+"V_G = (R2/(R1+R2))*V_DD;// in V\n",
+"I_D= poly(0,'I_D')\n",
+"V_GS= V_G-I_D*R_S;// V\n",
+"// Evaluation the value of I_D by using polynomial method\n",
+"I_D= I_D-kn*(V_GS-V_T)^2;// in mA\n",
+"I_D= roots(I_D);// in mA\n",
+"I_D= I_D(2);// in mA\n",
+"I_DQ= I_D;// in mA\n",
+"// Evaluation the value of V_DSQ,\n",
+"V_DSQ= V_DD-I_D*(R_D+R_S);// in V\n",
+"disp(I_DQ,'The value of I_DQ in mA is : ')\n",
+"disp(V_DSQ,'The value of V_DSQ in volts is : ')\n",
+"V_GS= V_G-I_D*R_S;// V\n",
+"V_DSsat= V_GS-V_T;// in V\n",
+"disp('The value of V_DS ( '+string(V_DSQ)+' V ) is greater than the value of ')\n",
+"disp('V_DSsat ( '+string(V_DSsat)+' V ), So the MOSFET is in saturation region')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.24: IDSQ_VGSQ_and_VDSQ.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 5.24\n",
+"format('v',5)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"kn= 0.5;// in mA/V^2\n",
+"V_T= 1;// in V\n",
+"R2 = 40;// in k ohm\n",
+"R1 = 60;// in k ohm\n",
+"R_S= 1;// in k ohm\n",
+"R_D= 2;// in k ohm\n",
+"V_DD = 5;// in V\n",
+"V_SS = -5;// in V\n",
+"V_R2 = (R2/(R2+R1))*(V_DD-V_SS);// in V\n",
+"V_G = V_R2 - V_DD;// in V\n",
+"I_D= poly(0,'I_D');\n",
+"V_S= I_D*R_S+V_SS;// in V\n",
+"V_GS= V_G-V_S;// in V\n",
+"// Evaluation the value of I_D by using polynomial method,\n",
+"I_D=I_D-kn*(V_GS-V_T)^2;// in mA\n",
+"I_D= roots(I_D);// in mA\n",
+"// Discarding I_D(1), as it will result in a negative V_DS\n",
+"I_D= I_D(2);// in mA\n",
+"I_DQ= I_D;// in mA\n",
+"V_S= I_D*R_S+V_SS;// in V\n",
+"V_GS= V_G-V_S;// in V\n",
+"// The value of V_DSQ,\n",
+"V_DSQ= V_DD-V_SS-I_D*(R_D+R_S);// in V\n",
+"disp(I_DQ,'The value of I_DQ in mA is : ')\n",
+"disp(V_GS,'The value of V_GS in volts is : ')\n",
+"disp(V_DSQ,'The value of V_DSQ in volts is : ')\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.25: ID_VDS_VGS_and_Av.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 5.25\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"R_S1 = 100*10^-3;// in k ohm\n",
+"R_S2 = 100*10^-3;// in k ohm\n",
+"R_S = R_S1+R_S2;// in k ohm\n",
+"R_D= 1.8;// in k ohm\n",
+"I_DSS= 12;// in mA\n",
+"Vp= -3.5;// in V\n",
+"V_DD= 22;// in V\n",
+"rd= 25;// in k ohm\n",
+"R_L= 47;// in k ohm\n",
+"I_D= poly(0,'I_D');\n",
+"V_GS= -I_D*R_S;// in V\n",
+"// Evaluation the value of I_D by using polynomial method,\n",
+"I_D= I_D-I_DSS*(1-V_GS/Vp)^2;// in mA\n",
+"I_D= roots(I_D);// in mA\n",
+"// Discarding I_D(1), as it will give a negative result V_DS\n",
+"I_D= I_D(2);// in mA\n",
+"disp(I_D,'The value of I_D in mA is : ')\n",
+"// The value of V_GS,\n",
+"V_GS= -I_D*R_S;// in V\n",
+"disp(V_GS,'The value of V_GS in volts is : ')\n",
+"// The value of V_DS,\n",
+"V_DS= V_DD-I_D*(R_D+R_S);// in V\n",
+"disp(V_DS,'The value of V_DS in volts is : ')\n",
+"gmo= -2*I_DSS/Vp;// in mS\n",
+"gm= gmo*(1-V_GS/Vp);// in mS\n",
+"miu= gm*rd;\n",
+"// The value of Av,\n",
+"Av= -miu*R_D*R_L/(R_D+R_L)/(rd+R_D*R_L/(R_D+R_L)+(1+miu)*R_S1);\n",
+"disp(Av,'The value of Av is : ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.26: VGS_ID_and_VDS.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 5.26\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"V_T = 1;// in V\n",
+"k = 0.5;// in mA/V^2\n",
+"R2 = 40;// in k ohm\n",
+"R1 = 60;// in k ohm\n",
+"R_S= 1;// in k ohm\n",
+"R_D= 2;// in k ohm\n",
+"V_DD = 5;// in V\n",
+"V_G = (R2/(R2+R1))*V_DD;// in V\n",
+"I_D= poly(0,'I_D');\n",
+"V_GS= V_G-I_D*R_S;// in V\n",
+"// Evaluation the value of I_D by using polynomial method,\n",
+"I_D= I_D-k*(V_GS-V_T)^2;\n",
+"I_D= roots(I_D);// in mA\n",
+"// For I_D(1), V_DS will be negative , so discarding it\n",
+"I_D= I_D(2);// in mA\n",
+"// The value of V_GS,\n",
+"V_GS= V_G-I_D*R_S;// in V\n",
+"// The value of V_DS,\n",
+"V_DS= V_DD-I_D*(R_D+R_S);// in V\n",
+"disp(I_D,'The value of I_D in mA is : ')\n",
+"disp(V_GS,'The value of V_GS in volts is : ')\n",
+"disp(V_DS,'The value of V_DS in volts is : ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.27: Drain_current_and_source_to_drain_voltage.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 5.27\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"R_D = 7.5;// in k ohm\n",
+"V_T = -0.8;// in V\n",
+"k = 0.2;// in mA/V^2\n",
+"R2 = 50;// in ohm\n",
+"R1 = 50;// in ohm\n",
+"V_DD = 5;// in V\n",
+"V_S = 5;// in V\n",
+"V_G = (R2/(R2+R1))*V_DD;// in V\n",
+"V_GS = V_G - V_S;// in V\n",
+"I_D = k*((V_GS-V_T)^2);// in mA\n",
+"disp(I_D,'Drain current in mA is');\n",
+"V_SD = V_DD - (I_D*R_D);// in V\n",
+"disp(V_SD,'Source to drain voltage in V is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.28: IDQ_VGSQ_VD_and_VS.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 5.28\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"I_Don = 5*10^-3;// in A\n",
+"V_GSon = 6;// in V\n",
+"V_GSth = 3;// in V\n",
+"k = I_Don/(V_GSon-V_GSth)^2;// in A/V^2 \n",
+"R2 = 6.8;// in M ohm\n",
+"R1 = 10;// in M ohm\n",
+"R_S= 750;// in ohm\n",
+"R_D= 2.2*10^3;// in ohm\n",
+"V_DD = 24;// in V\n",
+"R_S = 750;// in ohm\n",
+"// Applying KVL for input circuit\n",
+"V_G= R2*V_DD/(R1+R2);// in V\n",
+"I_D= poly(0,'I_D');\n",
+"V_GS= V_G-I_D*R_S;// in V\n",
+"I_D= I_D-k*(V_GS-V_GSth)^2;\n",
+"I_D= roots(I_D);// in A\n",
+"I_D= I_D(2);// in A\n",
+"I_DQ= I_D;// in A\n",
+"V_GS= V_G-I_D*R_S;// in V\n",
+"V_GSQ= V_GS;// in V\n",
+"V_DSQ= V_DD-I_DQ*(R_D+R_S);// in V\n",
+"I_D= I_D*10^3;// in mA\n",
+"disp(I_D,'The value of I_D in mA is : ')\n",
+"disp(V_GSQ,'The value of V_GSQ in volts is : ')\n",
+"disp(V_DSQ,'The value of V_DSQ in volts is : ')\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.29: VDD_RD_and_VGS.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 5.29\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"I_Don = 4*10^-3;// in A\n",
+"V_GSon = 6;// in V\n",
+"V_GSth = 3;// in V\n",
+"V_DS= 6;// in V\n",
+"I_D= I_Don;// in A\n",
+"k = I_Don/((V_GSon-V_GSth)^2);// in A/V^2\n",
+"V_GS= poly(0,'V_GS')\n",
+"// Evaluation the value of V_GS by using polynomial method,\n",
+"V_GS= I_D-k*(V_GS-V_GSth)^2;\n",
+"V_GS= roots(V_GS);// in V\n",
+"V_GS= V_GS(1);// in V\n",
+"V_DD= 2*V_DS;// in V\n",
+"// V_GS= V_DD-I_D*R_D\n",
+"// Drain resistance,\n",
+"R_D= (V_DD-V_GS)/I_D;// in ohm\n",
+"R_D=R_D*10^-3;// in k ohm\n",
+"disp(V_GS,'The value of V_GS in volts is : ')\n",
+"disp(V_DD,'The value of V_DD in volts is : ')\n",
+"disp(R_D,'The value of R_D in kΩ is : ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.2: IDQ_and_VDSQ.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 5.2\n",
+"format('v',5)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"I_Don = 6;// in mA\n",
+"I_Don= I_Don*10^-3;// in A\n",
+"V_GSon = 8;// in V\n",
+"V_GSth = 3;// in V\n",
+"V_DD = 12;// in V\n",
+"R_D= 2*10^3;// in Ω\n",
+"k= I_Don/(V_GSon-V_GSth)^2;// in A/V^2\n",
+"// I_D= k*[V_GS-V_GSth]^2 but V_GS= V_DD-I_D*R_D, So\n",
+"// I_D= k*(V_DD-I_D*R_D-V_GSth)^2 or\n",
+"// I_D^2*R_D^2+I_D*(2*R_D*V_GSth-2*R_D*V_DD-1/k)+(V_DD-V_GSth)^2\n",
+"A= R_D^2;// assumed\n",
+"B= 2*R_D*V_GSth-2*R_D*V_DD-1/k;// assumed\n",
+"C= (V_DD-V_GSth)^2;// assumed\n",
+"// Evaluating the value of I_D \n",
+"root= [A B C]; \n",
+"root= roots(root);// in A\n",
+"disp('The value of I_D is : '+string(root(1)*10^3)+' mA or '+string(root(2)*10^3)+' mA')\n",
+"I_DQ= root(2);// in A\n",
+"disp(I_DQ*10^3,'The value of I_DQ in mA is : ')\n",
+"V_DSQ= V_DD-I_DQ*R_D;// in V\n",
+"disp(V_DSQ,'The value of V_DSQ in volts is : ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.30: Value_of_ID.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 5.30\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"I_DD= 20;// in mA\n",
+"R2 = 10;// in k ohm\n",
+"R1 = 30;// in k ohm\n",
+"R_S= 1.2;// in k ohm\n",
+"R_D= 500*10^-3;// in k ohm\n",
+"V_DD = 12;// in V\n",
+"Vp= -6;// in V\n",
+"V_G = (R2/(R2+R1))*V_DD;// in V\n",
+"I_D= poly(0,'I_D')\n",
+"V_GS= V_G-I_D*R_S;// in V\n",
+"// Evaluation the value of I_D by using polynomial method,\n",
+"I_D=I_D-I_DD*(1-V_GS/Vp)^2;\n",
+"I_D= roots(I_D);// in mA\n",
+"// For I_D(1), V_DS will be negative, so discarding it\n",
+"I_D= I_D(2);// in mA\n",
+"// The value of V_DS,\n",
+"V_DS= V_DD-I_D*(R_D+R_S);// in V\n",
+"// The value of V_D,\n",
+"V_D= V_DD-I_D*R_D;// in V\n",
+"// The value of V_S,\n",
+"V_S= V_D-V_DS;// in V\n",
+"disp(I_D,'The value of I_D in mA is : ')\n",
+"disp(V_DS,'The value of V_DS in volts is : ')\n",
+"disp(V_D,'The value of V_D in volts is : ')\n",
+"disp(V_S,'The value of V_S in volts is : ')\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.31: Voltages_at_all_nodes.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 5.31\n",
+"format('v',5)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"V_DD = 5;// in V\n",
+"V_T= 1;// in V\n",
+"k= 1;// in mA/V^2\n",
+"R1 = 1;// in M ohm\n",
+"R2 = 1;// in M ohm\n",
+"R_S= 2;// in k ohm\n",
+"R_D= 2;// in k ohm\n",
+"// Calculation of I1\n",
+"I1 = V_DD/(R1+R2);// in A\n",
+"disp(I1,'The value of I1 in µA is : ')\n",
+"// The value of V_A,\n",
+"V_A = (R2/(R2+R1))*V_DD;// in V\n",
+"disp(V_A,'The value of V_A and V_G in volts is : ')\n",
+"I_D= poly(0,'I_D');\n",
+"V_C= I_D*R_S;// in V\n",
+"V_GS= V_A-V_C;// in V\n",
+"// Evaluation the value of I_D by using polynomial method,\n",
+"I_D= I_D-k*(V_GS-V_T)^2;\n",
+"I_D= roots(I_D);// in mA\n",
+"// For I_D(1), V_DS will be negative, so discarding it\n",
+"I_D= I_D(2);// in mA\n",
+"disp(I_D,'The value of I_D in mA is : ')\n",
+"// The value of V_B,\n",
+"V_B= V_DD-I_D*R_D;// in V\n",
+"// The value of V_C,\n",
+"V_C= I_D*R_S;// in V\n",
+"// The value of V_DS,\n",
+"V_DS= V_B-V_C;// in V\n",
+"disp(V_B,'The value of V_B in volts is : ')\n",
+"disp(V_C,'The value of V_C in volts is : ')\n",
+"disp(V_DS,'The value of V_DS in volts is : ')\n",
+"\n",
+"// Note: In the book, the calculated values are not accurate, this is why the answer in the book is wrong."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.32: Av_Ri_Ro_and_Rodesh.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 5.32\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"I_DSS = 12;// in mA\n",
+"I_DSS= I_DSS*10^-3;// in A\n",
+"V_P = -3;// in V\n",
+"r_d = 45;// in k ohm\n",
+"r_d= r_d*10^3;// in ohm\n",
+"g_m = I_DSS/abs(V_P);// in S\n",
+"// Part (i)\n",
+"R1 = 91;// in M ohm\n",
+"R1=R1*10^6;//in ohm\n",
+"R2 = 10;// in M ohm\n",
+"R2= R2*10^6;// in ohm\n",
+"// Calculation to find the value of Ri\n",
+"Ri= R1*R2/(R1+R2);// in ohm\n",
+"Ri=Ri*10^-6;// in M ohm\n",
+"disp(Ri,'The value of Ri in Mohm is : ')\n",
+"// Part (ii)\n",
+"R_S = 1.1;// in k ohm\n",
+"R_S = R_S * 10^3;// in ohm\n",
+"// The value of R_o,\n",
+"R_o= (R_S*1/g_m)/(R_S+1/g_m);// in ohm\n",
+"disp(R_o,'The value of R_C in ohm is : ')\n",
+"// Part (iii)\n",
+"// The value of R_desh_o\n",
+"R_desh_o= R_o*r_d/(R_o+r_d);// in ohm\n",
+"disp(R_desh_o,'The value of R''o in ohm is : ');\n",
+"// Part (iv)\n",
+"// The voltage gain can be find as,\n",
+"Av= g_m*(R_S*r_d/(R_S+r_d))/(1+g_m*(R_S*r_d/(R_S+r_d)));\n",
+"disp(Av,'The value of Av is : ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.34: Current_flow_through_M1_MOSFET.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 5.34\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"V_S2 = -2;// in V\n",
+"V_GS2 = -V_S2;// in V\n",
+"I_DS2 = (V_GS2-1)^2;// in mA\n",
+"I = 2;// in mA\n",
+"// The current flow through M1 MOSFET,\n",
+"I_DS1 = I-I_DS2;// in mA\n",
+"disp(I_DS1,'The current flow through M1 MOSFET in mA is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.35: Value_of_R_and_VD.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 5.35\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"V_DD= 10;// in V\n",
+"I_D= 0.4*10^3;// in A\n",
+"W= 100;// in µm\n",
+"L= 10;// in µm\n",
+"uACox= 20;// in A/V^2\n",
+"Vt= 2;// in V\n",
+"R= poly(0,'R')\n",
+"V_GS= V_DD-I_D*R;// in V\n",
+"// Evaluation the value of R by using polynomial method,\n",
+"R= I_D-1/2*uACox*W/L*(V_GS-Vt)^2;\n",
+"R= roots(R);// in Mohm\n",
+"// For R(1), V_DS will be zero, so discarding it\n",
+"R= R(2);// in Mohm\n",
+"R=R*10^3;// in k ohm\n",
+"disp(R,'The value of R in kΩ is : ')\n",
+"R=R*10^-3;// in ohm\n",
+"// The value of V_D,\n",
+"V_D= V_DD-I_D*R;// in V\n",
+"disp(V_D,'The value of V_D in volts is : ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.36: ID_and_VDS.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 5.36\n",
+"format('v',5)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"V_GSth= 2;// in V\n",
+"k= 2*10^-4;// in A/V^2\n",
+"V_DD= 12;// in V\n",
+"R_D= 5*10^3;// in ohm\n",
+"I_D= poly(0,'I_D');\n",
+"V_DS= V_DD-I_D*R_D;// in V\n",
+"// Evaluation the value of I_D by using polynomial method,\n",
+"I_D= I_D-k*(V_DS-V_GSth)^2;\n",
+"I_D= roots(I_D);// in A\n",
+"// For I_D(1), V_DS will be negative, so discarding it\n",
+"I_D= I_D(2);// in A\n",
+"// The value of V_DS,\n",
+"V_DS= V_DD-I_D*R_D;// in V\n",
+"I_D= I_D*10^3;// in mA\n",
+"disp(I_D,'The value of I_D in mA is : ')\n",
+"disp(V_DS,'The value of V_DS in volts is : ')\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.3: Designing_of_biasing_circuit.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 5.3\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"V_GS = 6;// in V\n",
+"I_D = 4;// in mA\n",
+"V_GSth = 2;// in V\n",
+"V_DS = V_GS;// in V\n",
+"// For a good design\n",
+"V_DD = 2*V_DS;// in V\n",
+"disp(V_DD,'The value of V_DD in V is')\n",
+"R_D = (V_DD-V_DS)/I_D;// in k ohm\n",
+"disp(R_D,'The value of R_D in k ohm is ');\n",
+"disp('The very high value for the gate to drain resistance is : 10 MΩ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.4: IDQ_VGSQ_and_VDS.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 5.4\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"I_Don = 3*10^-3;\n",
+"V_GSon = 10;// in V\n",
+"V_GSth= 5;// in V\n",
+"R2= 18*10^6;// in Ω\n",
+"R1= 22*10^6;// in Ω\n",
+"R_S=820;// in Ω\n",
+"R_D=3*10^3;// in Ω\n",
+"V_DD= 40;// in V\n",
+"V_G= V_DD*R2/(R1+R2);// in V\n",
+"k= I_Don/(V_GSon-V_GSth)^2;// in A/V^2\n",
+"// V_G= V_GS+V_RS= V_GS+I_D*R_S or V_GS= V_G-I_D*R_S\n",
+"// I_D= k*[V_GS-V_GSth]^2 or \n",
+"// I_D= k*(V_G-I_D*R_D-V_GSth)^2 or\n",
+"// I_D^2*R_D^2+I_D*(2*R_D*V_GSth-2*R_D*V_DD-1/k)+(V_DD-V_GSth)^2\n",
+"A= R_S^2;// assumed\n",
+"B= 2*R_S*V_GSth-2*R_S*V_G-1/k;// assumed\n",
+"C= (V_G-V_GSth)^2;// assumed\n",
+"// Evaluating the value of I_D \n",
+"I_D= [A B C]\n",
+"I_D= roots(I_D);// in A\n",
+"I_D= I_D(2);// in A\n",
+"I_DQ= I_D;// in A\n",
+"I_DQ= I_DQ*10^3;// in mA\n",
+"disp(I_DQ,'The value of I_DQ in mA is : ')\n",
+"I_DQ= I_DQ*10^-3;// in A\n",
+"V_GSQ= V_G-I_D*R_S;// in V\n",
+"disp(V_GSQ,'The value of V_GSQ in volts is : ')\n",
+"V_DSQ= V_DD-I_DQ*(R_D+R_S);// in V\n",
+"disp(V_DSQ,'The value of V_DSQ in volts is : ')\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.5: IDSQ_VGSQ_and_VDSQ.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 5.5\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"I_D= '0.3*(V_GS-V_P)^2';// given expression\n",
+"V_DD= 30;// in V\n",
+"V_P= 4;// in V\n",
+"R_GS = 1.2*10^6;// in Ω\n",
+"R_G = 1.2*10^6;// in Ω\n",
+"Req= R_GS/(R_GS+R_G);// in Ω\n",
+"R_D= 15;// in Ω\n",
+"// V_DS= V_DD-I_D*R_D (applying KVL to drain circuit)\n",
+"// V_GS= Req*V_DS= (V_DD-I_D*R_D)*Req\n",
+"// from given expression\n",
+"//I_D^2*(R_D*Req)^2 - I_D*(2*R_D*Req*(V_DD*Req-V_P)+1/0.3 + (V_DD*Req-V_P)^2)\n",
+"A= (R_D*Req)^2;// assumed\n",
+"B= -(2*R_D*Req*(V_DD*Req-V_P)+1/0.3);// assumed\n",
+"C= (V_DD*Req-V_P)^2;// assumed\n",
+"// Evaluating the value of I_D\n",
+"I_D= [A B C]\n",
+"I_D= roots(I_D);// in mA\n",
+"I_D= I_D(2);// in mA\n",
+"I_DSQ= I_D;// in mA\n",
+"disp(I_DSQ,'The value of I_DSQ in mA is : ')\n",
+"V_GS= (V_DD-I_D*R_D);// in V\n",
+"disp(V_GS,'The value of V_GS in volts is : ')\n",
+"V_DS= Req*V_GS;// in V\n",
+"disp(V_DS,'The value of V_DS in volts is : ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.6: ID_and_VDS_and_region_of_operation.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 5.6\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"k = 0.1;// in mA/V^2\n",
+"V_T = 1;// in V\n",
+"R1 = 33;//in k ohm\n",
+"R2 = 21;// in k ohm\n",
+"V_DD = 6;// in V\n",
+"R_D = 18;// in k ohm\n",
+"V_G = (R2/(R2+R1))*V_DD;// in V\n",
+"V_S = 0;// in V\n",
+"V_GS = V_G-V_S;// in V\n",
+"I_D = k*((V_GS-V_T)^2);// in mA\n",
+"disp(I_D,'The value of I_D in mA is');\n",
+"V_DS = V_DD - (I_D*R_D);// in V\n",
+"disp(V_DS,'The value of V_DS in V is'); \n",
+"V_DSsat = V_GS-V_T;// in V\n",
+"disp(V_DSsat,'The value of V_DS(sat) in V is');\n",
+"if V_DS>V_DSsat then\n",
+" disp('MOSFET is in saturation region')\n",
+"end"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.7: DC_load_line_and_operating_point.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 5.7\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"V_DD= 6;// in V\n",
+"R_D= 18;// in kohm\n",
+"// for maximum value of I_D\n",
+"V_DS=0;// in V\n",
+"I_Dmax= (V_DD-V_DS)/R_D;// in mA\n",
+"// for maximum value of V_DS\n",
+"I_D=0;// in mA\n",
+"V_DSmax=V_DD-I_D*R_D;// in V\n",
+"V_DS= 0:0.1:V_DSmax;// in V\n",
+"I_D= (V_DD-V_DS)/R_D;// in mA\n",
+"plot(V_DS,I_D)\n",
+"xlabel('V_DS in volts')\n",
+"ylabel('I_D in mA')\n",
+"title('DC load line')\n",
+"disp('DC load line shown in figure');\n",
+"disp('Q-points are : 2.8V, 0.178 mA')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.8: Region_at_which_MOSFET_ia_biased.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 5.8\n",
+"format('v',5)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"R2 = 18;// in k ohm\n",
+"R1 = 33;// in k ohm\n",
+"V_DD = 6;// in V\n",
+"V_G = (R2/(R1+R2))*V_DD;// in V\n",
+"V_S = V_DD;// in V\n",
+"V_SG = V_S-V_G;// in V\n",
+"disp(V_SG,'The value of V_SG in V is');\n",
+"k = 0.1;\n",
+"V_T = -1;// in V\n",
+"I_D = k*((V_SG+V_T)^2);// in mA\n",
+"disp(I_D,'The value of I_D in mA is');\n",
+"R_D = 3;// in k ohm\n",
+"V_SD = V_DD - (I_D*R_D);// in V\n",
+"disp(V_SD,'The value of V_SD in V is');\n",
+"V_SDsat = V_SG+V_T;// in V\n",
+"disp(V_SDsat,'The value of V_SD(sat) in V is');\n",
+"if V_SD>V_SDsat then\n",
+" disp('The p MOSFET is indeed biased in the saturation region')\n",
+"end"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.9: IDQ_and_VDSQ.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 5.9\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"V_G= 1.5;// in V\n",
+"V_P= -3;// in V\n",
+"R_S= 750;// in Ω\n",
+"R_D= 1800;// in Ω\n",
+"I_DSS= 6*10^-3;// in A\n",
+"V_DD= 18;// in V\n",
+"// V_GS= V_G-I_D*R_S\n",
+"// I_D= I_DSS*(1-V_GS/V_P)^2 or I_DSS*(1-(V_G-I_D*R_S)/V_P)^2\n",
+"//I_D^2*R_S^2+I_D*(2*R_S*(V_P-V_G)-V_P^2/I_DSS)+(V_P-V_G)^2\n",
+"A= R_S^2;\n",
+"B=(2*R_S*(V_P-V_G)-V_P^2/I_DSS);\n",
+"C=(V_P-V_G)^2;\n",
+"// Evaluating the value of I_D by using polynomial\n",
+"I_D= [A B C]\n",
+"I_D= roots(I_D);// in A\n",
+"I_D= I_D(2);// in A\n",
+"I_DQ= I_D;// in A\n",
+"V_DS= V_DD-I_D*(R_D+R_S);// in V\n",
+"V_DSQ= V_DS;// in V\n",
+"disp(I_DQ*10^3,'The value of I_DQ in mA is : ')\n",
+"disp(V_DSQ,'The value of V_DSQ in volts is : ')"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Electonic_Devices_by_S_Sharma/6-Bipolar_Junction_Transistor.ipynb b/Electonic_Devices_by_S_Sharma/6-Bipolar_Junction_Transistor.ipynb
new file mode 100644
index 0000000..6bc891a
--- /dev/null
+++ b/Electonic_Devices_by_S_Sharma/6-Bipolar_Junction_Transistor.ipynb
@@ -0,0 +1,1097 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 6: Bipolar Junction Transistor"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.10: Base_resistor_and_stability_factor.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 6.10\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"Beta= 100;\n",
+"V_CC= 12;// in V\n",
+"V_BE= 0;// in V\n",
+"I_B= 0.3*10^-3;// in A\n",
+"R_C= 300;// in Ω\n",
+"// Applying KVL for input side, V_CC= I_B*R_B+V_BE or\n",
+"R_B= (V_CC-V_BE)/I_B;// in Ω\n",
+"R_B= R_B*10^-3;// in k ohm\n",
+"disp(R_B,'The value of base resistor in kΩ is : ')\n",
+"I_C= Beta*I_B;// in A\n",
+"// The collector to emitter voltage \n",
+"V_CE= V_CC-I_C*R_C;// in V\n",
+"disp(V_CE,'The collector to emitter voltage in V is : ')\n",
+"// The stability factor,\n",
+"S= 1+Beta;\n",
+"disp(S,'The stability factor is : ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.11: DC_bias_voltage.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 6.11\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"R_B= 400*10^3;// in Ω\n",
+"R_C= 2*10^3;// in Ω\n",
+"R_E= 1*10^3;// in Ω\n",
+"V_CC= 20;// in V\n",
+"Beta= 100;\n",
+"// Base current can be evaluated as,\n",
+"I_B= V_CC/(R_B+Beta*R_E);// in A\n",
+"// Collector current\n",
+"I_C= Beta*I_B;// in A\n",
+"// The collector to emitter voltage\n",
+"V_CE= V_CC-I_C*(R_C+R_E);// in V\n",
+"I_B= I_B*10^3;// in mA\n",
+"I_C= I_C*10^3;// in mA\n",
+"disp(I_B,'The value of base current in mA is : ')\n",
+"disp(I_C,'The value of collector current in mA is : ')\n",
+"disp(V_CE,'The collector to emitter voltage in V is : ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.12: Collector_current_collector_to_emitter_voltage_and_stability_factor.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 6.12\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"R_B= 180*10^3;// in Ω\n",
+"R_C= 820;// in Ω\n",
+"R_E= 200;// in Ω\n",
+"V_CC= 25;// in V\n",
+"V_BE= 0.7;// in V\n",
+"Beta= 80;\n",
+"// Collector current can be find as,\n",
+"I_C= (V_CC-V_BE)/(R_E+R_B/Beta);// in A\n",
+"// The collector to emitter voltage\n",
+"V_CE= V_CC-I_C*(R_C+R_E);// in V\n",
+"I_C=I_C*10^3;// in mA\n",
+"disp(I_C,'The value of collector current in mA is : ')\n",
+"disp(V_CE,'The collector to emitter voltage in V is : ')\n",
+"\n",
+"// Note: The calculated value of V_CE in the book is wrong."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.13: collector_current_and_stability_factor.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 6.13\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"R_B= 200*10^3;// in Ω\n",
+"R_C= 20*10^3;// in Ω\n",
+"V_CC= 20;// in V\n",
+"V_BE= 0.7;// in V\n",
+"Beta= 100;\n",
+"// The value of collector current\n",
+"I_C= (V_CC-V_BE)/(R_C+R_B/Beta);// in A\n",
+"// The collector to emitter voltage\n",
+"V_CE= V_CC-I_C*R_C;// in V\n",
+"// The stability factor\n",
+"S= (1+Beta)/(1+Beta*(R_C/(R_C+R_B)));\n",
+"I_C=I_C*10^3;// in mA\n",
+"disp(I_C,'The value of collector current in mA is : ')\n",
+"disp(V_CE,'The collector to emitter voltage in V is : ')\n",
+"disp(S,'The stability factor is : ')\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.14: IB_IC_VCE_and_stability.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 6.14\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"R_B= 100*10^3;// in Ω\n",
+"R_C= 10*10^3;// in Ω\n",
+"V_CC= 10;// in V\n",
+"V_BE= 0;// in V\n",
+"Beta= 100;\n",
+"// Base current can be evaluated as,\n",
+"I_B= (V_CC-V_BE)/(R_B+R_C*Beta);// in A\n",
+"// The value of collector current\n",
+"I_C= Beta*I_B;// in A\n",
+"// The collector to emitter voltage\n",
+"V_CE= V_CC-I_C*R_C;// in V\n",
+"// The stability factor,\n",
+"S= (1+Beta)/(1+Beta*(R_C/(R_C+R_B)));\n",
+"I_C=I_C*10^3;// in mA\n",
+"disp(I_C,'The value of collector current in mA is : ')\n",
+"disp(V_CE,'The collector to emitter voltage in V is : ')\n",
+"disp(S,'The stability factor is : ')\n",
+"\n",
+"// Note: The calculated value of S in the book is wrong."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.15: Emitter_and_collector_current_and_VCE.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 6.15\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"R_B= 50*10^3;// in Ω\n",
+"R_C= 1*10^3;// in Ω\n",
+"R_E= 5*10^3;// in Ω\n",
+"V_CC= 10;// in V\n",
+"V_EE= 10;// in V\n",
+"V_BE= 0.7;// in V\n",
+"V_E= -V_BE;// in V\n",
+"// The value of emitter current\n",
+"I_E= (V_EE-V_BE)/R_E;// in A\n",
+"// The collector current will be equal to emitter current\n",
+"I_C= I_E;// in A\n",
+"// The collector to emitter voltage\n",
+"V_CE= V_CC-I_C*R_C;// in V\n",
+"V_CE= V_CE-V_E;// in V\n",
+"I_C=I_C*10^3;// in mA\n",
+"I_E=I_E*10^3;// in mA\n",
+"disp(I_E,'The value of emitter current in mA is : ')\n",
+"disp(I_C,'The value of collector current in mA is : ')\n",
+"disp(V_CE,'The collector to emitter voltage in V is : ')\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.16: Change_in_Q_point.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 6.16\n",
+"format('v',5)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"R_B= 10*10^3;// in Ω\n",
+"R_C= 5*10^3;// in Ω\n",
+"R_E= 10*10^3;// in Ω\n",
+"Beta=50;\n",
+"V_CC= 20;// in V\n",
+"V_EE= 20;// in V\n",
+"V_BE= 0.7;// in V\n",
+"V_E= -V_BE;// in V\n",
+"// The value of I_E1,\n",
+"I_E1= (V_EE-V_BE)/(R_E+R_B/Beta);// in A\n",
+"I_C1= I_E1;// in A\n",
+"V_C= V_CC-I_C1*R_C;// in V\n",
+"V_CE1= V_C-V_E;// in V\n",
+"Beta= 100;\n",
+"V_BE= 0.6;// in V\n",
+"V_E= -V_BE;// in V\n",
+"// The value of I_E2,\n",
+"I_E2= (V_EE-V_BE)/(R_E+R_B/Beta);// in A\n",
+"I_C2= I_E2;// in A\n",
+"V_C= V_CC-I_C2*R_C;// in V\n",
+"V_CE2= V_C-V_E;// in V\n",
+"// The change in collector current\n",
+"delta_IC= (I_C2-I_C1)/I_C1*100;// in %\n",
+"// The change in collector to emitter voltage\n",
+"delta_V_CE= (V_CE1-V_CE2)/V_CE1*100;// in %\n",
+"disp(delta_IC,'The change in collector current in % is : ')\n",
+"disp(delta_V_CE,'The change in collector to emitter voltage in % is : ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.18: Value_of_alphaDC_and_emitter_current.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 6.18\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"I_CBO = 3;//in µA\n",
+"I_CBO= I_CBO*10^-3;// in mA \n",
+"I_C= 15;// in mA\n",
+"// But it is given that I_C= 99.5% of I_E, SO\n",
+"I_E= I_C/99.5*100;// in mA\n",
+"alpha_dc= I_C/I_E;\n",
+"disp(alpha_dc,'The value of alpha_dc is : ')\n",
+"disp(I_E,'The value of I_E in mA is : ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.19: IC_and_IB.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Exa 6.19\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"//Given data\n",
+"alpha_dc = 0.99;\n",
+"I_CBO = 10;// in µA\n",
+"I_CBO= I_CBO*10^-6;// in A\n",
+"I_E = 10;// in mA\n",
+"I_E= I_E*10^-3;// in A\n",
+"// The collector current can be find as,\n",
+"I_C = (alpha_dc * I_E) + I_CBO;// in A\n",
+"I_C=I_C*10^3;// in mA\n",
+"disp(I_C,'The value of I_C in mA is');\n",
+"I_C=I_C*10^-3;// in A\n",
+"// Calculation to find the value of base current\n",
+"I_B = I_E - I_C;// in A\n",
+"I_B = I_B * 10^6;// in µA\n",
+"disp(I_B,'The value of I_B in µA is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.1: Common_base_dc_current_gain.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 6.1\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"I_C= 5.10;// in mA\n",
+"I_E= 5.18;// in mA\n",
+"alpha= I_C/I_E;\n",
+"alpha_dc= alpha;\n",
+"disp(alpha_dc,'The common-base d.c. current gain is : ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.20: Base_current.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 6.20\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"alpha_dc = 0.99;\n",
+"I_C = 6;// in mA\n",
+"I_C= I_C*10^-3;// in A\n",
+"I_CBO = 15;// in µA\n",
+"I_CBO= I_CBO*10^-6;// in A\n",
+"// The emitter current,\n",
+"I_E = (I_C - I_CBO)/alpha_dc;// in A\n",
+"// The base current,\n",
+"I_B = I_E - I_C;// in A \n",
+"I_B=I_B*10^6;// in µA\n",
+"disp(I_B,'The value of I_B in µA is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.22: Emitter_current.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Exa 6.22\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"alpha_dc = 0.98;\n",
+"I_CBO = 12;// in µA\n",
+"I_CBO = I_CBO * 10^-6;// in A\n",
+"I_B = 120;// in µA\n",
+"I_B = I_B * 10^-6;// in A\n",
+"beta_dc = alpha_dc/(1-alpha_dc);\n",
+"I_E = ((1 + beta_dc) * I_B) + ((1 + beta_dc) * I_CBO);//in A\n",
+"I_E = I_E * 10^3;// in mA\n",
+"disp(I_E,'The value of I_E in mA is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.23: Region_of_operation.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Exa 6.23\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"bita= 100;\n",
+"V_BEsat= 0.8;// in V\n",
+"V_CEsat= 0.2;// in V\n",
+"V_BEact= 0.7;// in V\n",
+"V_CC = 10;// in V\n",
+"V_BB=5;// in V\n",
+"R_E = 2;// in kΩ\n",
+"R_C = 3;// in kΩ\n",
+"R_B= 50;// in kΩ\n",
+"// Applying KVL to collector loop\n",
+"// V_CC= I_Csat*R_C +V_CEsat +I_E*R_E and I_E= I_Csat+I_B, So\n",
+"//I_B= ((V_CC-V_CEsat)-(R_C+R_E)*I_Csat)/R_E; (i)\n",
+"// Applying KVL to base loop\n",
+"// V_BB-I_B*R_B -V_BEsat-I_E*R_E =0 and I_E= I_Csat+I_B, So\n",
+"//V_BB-V_BEsat= R_E*I_Csat + (R_B+R_E)*I_B (ii)\n",
+"// From eq (i) and (ii)\n",
+"I_B = ((V_BB-V_BEsat)*5- (V_CC-V_CEsat)*2) / ((R_B+R_E)*5 - R_E*2) ;// in mA\n",
+"I_Csat= ((V_CC-V_CEsat)-R_E*I_B)/(R_C+R_E);// in mA\n",
+"I_Bmin= I_Csat/bita;// in mA\n",
+"if I_B<I_Bmin then\n",
+" disp('Since the value of I_B ('+string(I_B*10^3)+'µA) is less than the value of I_Bmin ('+string(I_Bmin*10^3)+' µA)');\n",
+" disp('So the transistor is not in the saturation region. But it is conducting hence it can not be in cutoff.')\n",
+" disp('Therefore the transistor is in the active region')\n",
+"end"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.24: IB_IC_and_VCE.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Exa 6.24\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"Beta= 100;\n",
+"V_BEsat= 0.8;// in V\n",
+"V_CEsat= 0.2;// in V\n",
+"V_BEact= 0.7;// in V\n",
+"V_CC = 10;// in V\n",
+"V_BB=5;// in V\n",
+"R_E = 2;// in kΩ\n",
+"R_C = 3;// in kΩ\n",
+"R_B= 50;// in kΩ\n",
+"// Applying KVL to input loop\n",
+"// V_BB= I_B*R_B+(1+Beta)*I_B*R_E+V_BEact or \n",
+"I_B= (V_BB-V_BEact)/(R_B+(1+Beta)*R_E);// in mA\n",
+"// The collector current,\n",
+"I_C= Beta*I_B;// in mA\n",
+"// Applying KVL to collector circuit\n",
+"// V_CC= I_Csat*R_C +V_CEsat +(I_C+I_B)*R_E\n",
+"V_CEact= V_CC-I_B*R_E-I_C*(R_C+R_E);// in V\n",
+"// The base current,\n",
+"I_B= I_B*10^3;// in µA\n",
+"disp(I_B,'The value of I_B in µA is : ')\n",
+"disp(I_C,'The value of I_C in mA is : ')\n",
+"disp(V_CEact,'The value of V_CE in volts is : ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.25: Region_of_operation.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Exa 6.25\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"//Given data\n",
+"Beta = 100;\n",
+"V_CEsat = 0.2;// in V\n",
+"R_B = 150;// in k ohm\n",
+"R_C = 2;// in k ohm\n",
+"V_CC = 10;// in V\n",
+"V_BEsat = 0.8;// in V\n",
+"I_B = (V_CC - V_BEsat)/R_B;// in mA\n",
+"I_C = (V_CC - V_CEsat)/R_C;// in mA\n",
+"I_Bmin = I_C/Beta;// in mA\n",
+"I_B=I_B*10^3;// in µA\n",
+"I_Bmin=I_Bmin*10^3;// in µA\n",
+"if I_B>I_Bmin then\n",
+" disp('Since the value of I_B ('+string(I_B)+'µA) is greater than the value of I_Bmin ('+string(I_Bmin)+'µA)');\n",
+" disp('So the transistor is in the saturation region.')\n",
+"end"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.26: Value_of_VBB.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Exa 6.26\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"//Given data\n",
+"Beta = 100;\n",
+"V_CE = 0.2;//in V\n",
+"V_BE = 0.8;// in V\n",
+"R_C= 500;// in Ω\n",
+"R_B= 44*10^3;// in Ω\n",
+"R_E= 1*10^3;// in Ω\n",
+"V_CC= 15;// in V\n",
+"V_GE= -15;// in V\n",
+"// Applying KVL to collector circuit, V_CC-V_GE - I_Csat*R_C-V_CE-I_E*R_E=0, but I_Csat= Beta*I_Bmin and I_E= 1+Beta\n",
+"// Minimum value of base current,\n",
+"I_Bmin= (V_CC-V_GE-V_CE)/(R_C*Beta+(1+Beta)*R_E);// in A\n",
+"// Applying KVL to the base emitter circuit, V_BB-I_Bmin*R_B-V_BE-I_E*R_E + V_CC=0\n",
+"// The value of V_BB,\n",
+"V_BB= I_Bmin*R_B + V_BE + (1+Beta)*I_Bmin*R_E-V_CC;// in V\n",
+"I_Bmin= I_Bmin*10^3;//in mA\n",
+"disp(I_Bmin,'The value of I_B(min) in mA is : ')\n",
+"disp(V_BB,'The value of V_BB in volts is : ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.27: Minimum_value_of_RC_required.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 6.27\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"V_ECsat= 0.2;// in V\n",
+"V_CC= 10;// in V\n",
+"V_EBsat= 0.8;// in V\n",
+"\n",
+"// Part (i)\n",
+"Beta= 100;\n",
+"R_B= 220;// in kΩ\n",
+"// Applying KVL to collector circuit, V_CC= V_EC+ICRC\n",
+"ICRC= V_CC-V_ECsat;// in V\n",
+"// Applying KVL to input loop, V_CC= V_EBsat+I_B*R_B (i)\n",
+"I_B= (V_CC-V_EBsat)/R_B;// in mA\n",
+"I_C= Beta*I_B;// in mA\n",
+"R_Cmin= ICRC/I_C;// in kΩ\n",
+"disp(R_Cmin,'The minimum value of R_C in kΩ is : ')\n",
+"// Part (ii)\n",
+"R_C= 1.2;// in kΩ\n",
+"I_Csat= ICRC/R_C;// in mA\n",
+"I_B= I_Csat/Beta;// in mA\n",
+"// From eq (i)\n",
+"R_B= (V_CC-V_EBsat)/I_B;// in kΩ\n",
+"disp(R_B,'The maximum value of R_B in kΩ is : ')\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.28: Value_of_RE.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Exa 6.28\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"Beta= 100;\n",
+"V_BEsat= 0.8;// in V\n",
+"V_CEsat= 0.2;// in V\n",
+"V_BEact= 0.7;// in V\n",
+"V_CC = 10;// in V\n",
+"R_E = 1;// in kΩ\n",
+"R_C = 2;// in kΩ\n",
+"R_B= 100;// in kΩ\n",
+"Beta=100;\n",
+"alpha= Beta/(1+Beta);\n",
+"// Applying KVL to collector circuit\n",
+"// V_CC= I_Csat*R_C +V_CE +R_E*I_E\n",
+"// but I_E= alpha*I_Csat\n",
+"I_Csat= (V_CC-V_CEsat)/(R_C+R_E*alpha);// in mA\n",
+"I_Bmin= I_Csat/Beta;// in mA\n",
+"// Applying KVL to base loop\n",
+"// V_CC= I_B*R_B +V_BEsat +I_E*R_E\n",
+"// but I_E= I_Csat+I_B\n",
+"I_B= (V_CC-V_BEsat-I_Csat*R_E)/(R_B+R_E);// in mA\n",
+"I_B=I_B*10^3;// in µA\n",
+"disp(I_B,'The value of I_B in µA is : ')\n",
+"I_B=I_B*10^-3;// in mA\n",
+"I_Bmin= I_Bmin*10^3;// in µA\n",
+"disp(I_Bmin,'The minimum value of I_B in µA is : ')\n",
+"I_Bmin= I_Bmin*10^-3;// in mA\n",
+"if I_B>I_Bmin then\n",
+" disp('Since the value of I_B is greater than the value of I_Bmin, ')\n",
+" disp('Hence the transistor is in saturation .')\n",
+"end\n",
+"// The emitter current,\n",
+"I_E= (1+Beta)*I_Bmin;// in mA\n",
+"// The value of R_E\n",
+"R_E= (V_CC-V_BEact-I_Bmin*R_B)/I_E;// in kΩ\n",
+"disp(R_E,'The value of R_E in kΩ is : ')\n",
+"disp('So R_E should be greater than this value in order to bring the transistor just out of saturation ')\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.29: Collector_voltage.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 6.29\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"V_CC = 9;// in V\n",
+"V_BE = 0.8;// in V\n",
+"V_CE = 0.2;// in V\n",
+"R_B = 50;// in kΩ\n",
+"R_C=2;// in kΩ\n",
+"R_E = 1;// in kΩ\n",
+"Beta=70;\n",
+"// Applying KVL to input loop, V_CC= I_B*R_B +V_BE +I_E*R_E\n",
+"// V_CC- V_BE= (R_B+R_E)*I_B + R_E*I_C (i)\n",
+"// Applying KVL to output loop, V_CC= R_C*I_C +V_CE +I_C*R_E +I_B*R_E\n",
+"//I_B = ((V_CC- V_CE)-(R_C+R_E)*I_C)/R_E (ii)\n",
+"// From eq (i) and (ii)\n",
+"I_C= ( (V_CC- V_BE)-(R_B+R_E)* (V_CC- V_CE)/R_E)/(1-(R_B+R_E)*(R_C+R_E));// in mA\n",
+"I_B = ((V_CC- V_CE)-(R_C+R_E)*I_C)/R_E// in mA\n",
+"I_Bmin= I_C/Beta;// in mA\n",
+"if I_B>I_Bmin then\n",
+" disp('Since the value of I_B ('+string(I_B)+' mA) is greater than the value of I_Bmin ('+string(I_Bmin)+' mA)')\n",
+" disp('So the transistor is in saturation ')\n",
+"end\n",
+"V_C= V_CC-I_C*R_C;// in V\n",
+"disp(V_C,'The value of collector voltage in volts is : ')\n",
+"Beta= I_C/I_B;\n",
+"disp(Beta,'The minimum value of beta that will change the state of the trasistor is : ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.2: Base_current.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 6.2\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"alpha= 0.987;\n",
+"I_E= 10;// in mA\n",
+"// Formula alpha= I_C/I_E;\n",
+"I_C= alpha*I_E;// in mA\n",
+"I_B= I_E-I_C;// in mA\n",
+"disp(I_B,'The base current in mA is : ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.3: Value_of_IC_and_IB.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 6.3\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"alpha= 0.987;\n",
+"I_E= 10;// in mA\n",
+"// Formula alpha= I_C/I_E;\n",
+"I_C= alpha*I_E;// in mA\n",
+"I_B= I_E-I_C;// in mA\n",
+"disp(I_C,'The collector current in mA is : ')\n",
+"disp(I_B,'The base current in mA is : ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.4: Collector_and_base_current.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 6.4\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"Beta= 100;\n",
+"I_E= 10;// in mA\n",
+"alpha= Beta/(1+Beta);\n",
+"disp(alpha,'The value of alpha is : ')\n",
+"// Formula alpha= I_C/I_E;\n",
+"I_C= alpha*I_E;// in mA\n",
+"I_B= I_E-I_C;// in mA\n",
+"disp(I_C,'The collector current in mA is : ')\n",
+"disp(I_B,'The base current in mA is : ')\n",
+"\n",
+"// Note: The calculated value of alpha in the book is wrong, due to this the answer in the book is wrong."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.5: Value_of_alpha_and_bita.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 6.5\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"alpha= 0.950;\n",
+"Beta= alpha/(1-alpha);\n",
+"disp(Beta,'For alpha = 0.950, the value of beta is : ')\n",
+"Beta= 100;\n",
+"alpha= Beta/(1+Beta);\n",
+"disp(alpha,'For beta = 100, the value of alpha is : ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.6: Collector_and_base_current.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 6.6\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"I_E= 10;// in mA\n",
+"Beta= 100;\n",
+"alpha= Beta/(1+Beta);\n",
+"// Formula alpha= I_C/I_E;\n",
+"I_C= alpha*I_E;// in mA\n",
+"I_B= I_E-I_C;// in mA\n",
+"disp(I_B,'The base current in mA is : ')\n",
+"disp(I_C,'The collector current in mA is : ')\n",
+"\n",
+"// Note: In the book the calculated value of I_B is not correct, so the answer in the book is not accurate"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.7: DC_load_line.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 6.7\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"V_CC= 12;// in V\n",
+"R_C= 3;// in kΩ\n",
+"V_CE= 0:0.1:12;// in V\n",
+"I_C= (V_CC-V_CE)/R_C;// in mA\n",
+"plot(V_CE,I_C);\n",
+"xlabel('V_CE in volts')\n",
+"ylabel('I_C in mA')\n",
+"title('DC load line')\n",
+"disp('DC load line shown in figure.')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.8: Operating_point_and_stability_factor.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 6.8\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"bita= 100;\n",
+"V_CC= 6;// in V\n",
+"V_BE= 0.7;// in V\n",
+"R_B= 530*10^3;// in Ω\n",
+"R_C= 2*10^3;// in Ω\n",
+"// Applying KVL for input side, V_CC= I_B*R_B+V_BE or\n",
+"I_B= (V_CC-V_BE)/R_B;// in A\n",
+"I_C= bita*I_B;// in A\n",
+"// Applying KVL to output side, \n",
+"V_CE= V_CC-I_C*R_C;// in V\n",
+"S= 1+bita;\n",
+"disp('The operating point is : '+string(V_CE)+' V, '+string(I_C*10^3)+' mA')\n",
+"disp(S,'The stability factor is : ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.9: Collector_and_base_current.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 6.9\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"Beta= 75;\n",
+"V_CC= 20;// in V\n",
+"V_BE= 0;// in V\n",
+"R_B= 200*10^3;// in Ω\n",
+"R_C= 800;// in Ω\n",
+"// Applying KVL for input side, V_CC= I_B*R_B+V_BE or\n",
+"I_B= (V_CC-V_BE)/R_B;// in A\n",
+"I_B=I_B*10^6;// in µA\n",
+"disp(I_B,'The base current in µA is : ')\n",
+"I_B=I_B*10^-6;// in A\n",
+"// The collector current,\n",
+"I_C= Beta*I_B;// in A\n",
+"I_C=I_C*10^3;// in mA\n",
+"disp(I_C,'The collector current in mA is : ')\n",
+"I_C=I_C*10^-3;// in A\n",
+"// Applying KVL to output side, the collector to emitter voltage \n",
+"V_CE= V_CC-I_C*R_C;// in V\n",
+"disp(V_CE,'The collector to emitter voltage in V is : ')\n",
+"// The stability factor,\n",
+"S= 1+Beta;\n",
+"disp(S,'The stability factor is : ')"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Electonic_Devices_by_S_Sharma/7-Optoelectonic_Devices.ipynb b/Electonic_Devices_by_S_Sharma/7-Optoelectonic_Devices.ipynb
new file mode 100644
index 0000000..de77aa9
--- /dev/null
+++ b/Electonic_Devices_by_S_Sharma/7-Optoelectonic_Devices.ipynb
@@ -0,0 +1,149 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 7: Optoelectonic Devices"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.1: Component_value.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 7.1\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"O_V = 5;// output voltage in V\n",
+"V_D = 1.5;//voltage drop in V\n",
+"R = (O_V - V_D)/O_V;\n",
+"R = R * 10^3;// in ohm\n",
+"disp(R,'The resistance value in Ω is');\n",
+"disp('As this is not standard value, use R=680 Ω which is a standard value')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.2: Open_circuit_voltage.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 7.2\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"N_A = 7.5*10^24;// in atoms/m^3\n",
+"N_D = 1.5*10^22;// in atoms/m^3\n",
+"D_e = 25*10^-4;// in m^2/s\n",
+"D_h = 1*10^-3;// in m^2/s\n",
+"Torque_eo = 500;// in ns\n",
+"Torque_ho = 100;// in ns\n",
+"n_i = 1.5*10^16;// in /m^3\n",
+"e = 1.6*10^-19;// in C\n",
+"P_C = 12.5;// in mA/cm^2\n",
+"// Electron diffusion length\n",
+"L_e = sqrt(D_e*Torque_ho*10^-9);// in m\n",
+"L_e = L_e * 10^6;// in µm\n",
+"// hole diffusion length\n",
+"L_h = sqrt(D_h*Torque_ho*10^-9);// in m\n",
+"L_h = L_h * 10^6;// in µm\n",
+"// The value of J_s can be calculated as,\n",
+"J_s = e*((n_i)^2)*( (D_e/(L_e*10^-6*N_A)) + (D_h/(L_h*10^-6*N_D)) );// in A/m^2\n",
+"J_s = J_s * 10^3;// in A/cm^2\n",
+"V_T = 26;// in mV\n",
+"I_lembda = 12.5*10^-3;\n",
+"I_s = 2.4*10^-4;\n",
+"// Open circuit voltage \n",
+"V_OC = V_T*log( 1+(I_lembda/J_s) );// in mV\n",
+"V_OC = V_OC * 10^-3;// in V\n",
+"disp(V_OC,'Open circuit voltage in V is');\n",
+"\n",
+"// Note: There is calculation error to evaluate the value of VOC since 26*10^-3*log(1+12.5*10^-3/2.4*10^-4) calculated as 0.10318 not 0.522 V"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.3: Photocurrent_density.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 7.3\n",
+"format('v',6)\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"Phi_o = 1*10^21;// in m^-2s^-1\n",
+"Alpha = 1*10^5;// in m^-1\n",
+"W = 25;// in µm\n",
+"W =W * 10^-6;// in m\n",
+"e = 1.6*10^-19;// in C\n",
+"// At the front edge of intrinsic region, the generation rate of EHP\n",
+"G_L1 = Alpha*Phi_o;// in m^-3s^-1\n",
+"// At the back edge of intrinsic region, the generation rate of EHP\n",
+"G_L2 = Alpha*Phi_o*%e^( (-Alpha*W) );// in m^-3s^-1\n",
+"// Photo current density,\n",
+"J_L = e*Phi_o*(1-%e^(-Alpha*W));// in A/m^2\n",
+"J_L = J_L * 10^-1;// in mA/cm^2\n",
+"disp(J_L,'Photo current density in mA/cm^2 is');"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}