summaryrefslogtreecommitdiff
path: root/Electronics_Devices_And_Circuits_by_S_Salivahanan/4-Semiconductor_Diodes.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'Electronics_Devices_And_Circuits_by_S_Salivahanan/4-Semiconductor_Diodes.ipynb')
-rw-r--r--Electronics_Devices_And_Circuits_by_S_Salivahanan/4-Semiconductor_Diodes.ipynb678
1 files changed, 678 insertions, 0 deletions
diff --git a/Electronics_Devices_And_Circuits_by_S_Salivahanan/4-Semiconductor_Diodes.ipynb b/Electronics_Devices_And_Circuits_by_S_Salivahanan/4-Semiconductor_Diodes.ipynb
new file mode 100644
index 0000000..ebb67f3
--- /dev/null
+++ b/Electronics_Devices_And_Circuits_by_S_Salivahanan/4-Semiconductor_Diodes.ipynb
@@ -0,0 +1,678 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 4: Semiconductor Diodes"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.10: resistivity_and_resistance_and_the_voltage_of_the_doped_germanium.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 4.10.\n",
+"clc\n",
+"format(8)\n",
+"ND=(4.2*10^28)/10^6\n",
+"disp(ND,'Density of added impurity atoms is, ND(atoms/m^3) = ')\n",
+"ni=2.5*10^19\n",
+"format(10)\n",
+"p=ni^2/ND\n",
+"disp('Also, n = ND')\n",
+"disp(p,'Therefore, p(m^-3) = ni^2 / n = ni^2 / ND =')\n",
+"disp('Here, as p << n, p may be neglected.')\n",
+"q=1.6*10^-19\n",
+"un=0.38\n",
+"sigma=q*ND*un\n",
+"disp(sigma,'Therefore, sigma(S/m) = q*ND*un =')\n",
+"format(9)\n",
+"rho=1/sigma\n",
+"disp(rho,'Therefore, resistivity, rho(ohm-m) = 1 / sigma =')\n",
+"format(5)\n",
+"L=5*10^-3\n",
+"A=5*10^-6\n",
+"R=(rho*L)/A^2\n",
+"R1=R*10^-3\n",
+"disp(R1,'Resistance, R(k.ohm) = rho*L / A =')\n",
+"I=10^-6\n",
+"V=R*I\n",
+"V1=V*10^3\n",
+"disp(V1,'Voltage drop, V(mV) = RI =')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.11: calculate_Va_and_Eo.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 4.11.\n",
+"clc\n",
+"q=1.6*10^-19\n",
+"ni=2.5*10^13\n",
+"up=1800\n",
+"un=3800\n",
+"VT=0.026\n",
+"rho=6\n",
+"format(9)\n",
+"NA=1/(6*q*up)\n",
+"disp('(a) Resistivity, rho = 1 / sigma = 1 / NA*q*up = 6 ohm-cm')\n",
+"disp(NA,'Therefore, NA(1/cm^3) = 1 / 6*q*up =')\n",
+"ND=1/(4*q*un)\n",
+"disp(ND,'Similarly, ND(1/cm^3) = 1 / 4*q*un =')\n",
+"format(7)\n",
+"Va=VT*log((ND*NA)/ni^2)\n",
+"disp(Va,'Therefore, Va(V) = VT*ln(ND*NA / ni^2) =')\n",
+"disp(Va,'Hence, Eo(eV) = ')\n",
+"Va1=0.026*log((2*ND*2*NA)/ni^2)\n",
+"disp(Va1,'(b) Vo(V) = 0.026*ln(2*ND*2*NA / ni^2) =')\n",
+"disp(Va1,'Therefore, Eo(eV) = ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.12: current_flowing_in_the_diode.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 4.12.\n",
+"clc\n",
+"format(7)\n",
+"Ia=0.3*10^-6\n",
+"VF=0.15\n",
+"I=Ia*((%e^(40*VF))-1)\n",
+"I1=I*10^6\n",
+"disp('The current flowing through the PN diode under forward bias is,')\n",
+"disp(I1,'I(uA) = Io*(e^40*VF - 1) =')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.13: calculate_the_diode_current.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 4.13.\n",
+"clc\n",
+"format(7)\n",
+"VF=0.6\n",
+"T=298\n",
+"Io=10^-5\n",
+"eta=2\n",
+"VT=T/11600\n",
+"disp('The volt-equivalent of the temperature(T) is,')\n",
+"disp(VT,'VT(V) = T / 11600 = ')\n",
+"format(6)\n",
+"I=Io*((%e^((VF/(eta*VT))))-1)\n",
+"disp(I,'Therefore, the diode current, I(A) = Io*e^((VF/eta*VT)-1) =')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.14: determine_eta.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 4.14\n",
+"clc\n",
+"format(5)\n",
+"disp('The diode current, I=Io*((e^((q*V)/(eta*k*T)))-1)')\n",
+"disp('Therefore, 0.6*10^-3 = Io*((e^((q*V)/(eta*k*T)))-1) = Io*(e^((q*V)/(eta*k*T)))')\n",
+"disp(' = Io*e^(400/25*eta) = Io*e^(16/eta) Eq.1')\n",
+"disp('Also, 20*10^-3 = Io*e^(500/25*eta) = Io*e^(20/eta) Eq.2')\n",
+"disp('Dividing Eq.2 by Eq.1, we get')\n",
+"disp('100/3 = e^(4/eta)')\n",
+"disp('Taking natural logarithms on both sides, we get')\n",
+"disp(' loge (100/3) = 4 / eta')\n",
+"disp(' 3.507 = 4 / eta')\n",
+"eta=4/log(100/3)\n",
+"disp(eta,'Therefore, eta = ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.15: the_voltage_in_a_germanium_PN_junction_diode.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 4.15.\n",
+"clc\n",
+"format(5)\n",
+"disp('The current of PN junction diode is,')\n",
+"disp('I = Io*(e^(V/VT)-1)')\n",
+"disp('Therefore, -0.09*Io = Io*(e^(V/VT)-1)')\n",
+"disp('where VT = T/11600 = 26mV')\n",
+"disp(' -0.9 = e^(V/0.026) - 1')\n",
+"disp(' 0.1 = e^(V/0.026)')\n",
+"VT=0.026\n",
+"V=log(0.1)*VT\n",
+"disp(V,'Therefore, V(V) = ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.16: forward_resistance_of_PN_junction_diode.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 4.16.\n",
+"clc\n",
+"format(6)\n",
+"I=5*10^-3\n",
+"T=300\n",
+"disp('Forward resistance of a PN junction diode, rf = (eta*VT)/I where VT = T/11600 and eta = 2 for silicon')\n",
+"disp('Therefore, rf = 2*(T/11600) / 5*10^-3')\n",
+"eta=2 //for silicon\n",
+"rf=600/(11600*5*10^-3)\n",
+"disp(rf,' rf(ohm) = ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.17: Calculating_the_saturation_current.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 4.17.\n",
+"clc\n",
+"format(6)\n",
+"Io1=7.5*10^-6\n",
+"T1=27\n",
+"T2=127\n",
+"disp('The saturation current at 400 K is,')\n",
+"disp('Io2 = Io1 * 2^((T2-T1)/10)')\n",
+"disp(' = 7.5*10^-6 * 2^(127-27/10)')\n",
+"Io2=Io1*(2^((T2-T1)/10))\n",
+"I=Io2*10^3\n",
+"disp(I,'Io2(mA) = ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.1: intrinsic_conductivity_for_both_germanium_and_silicon.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 4.1.\n",
+"clc\n",
+"un1=3800 //mobility of free electrons in pure germanium\n",
+"up1=1800 //mobility of free holes in pure germanium\n",
+"un2=1300 //mobility of free electrons in pure silicon\n",
+"up2=500 //mobility of free holes in pure silicon\n",
+"q=1.6*10^-19\n",
+"nig=2.5*10^13\n",
+"nis=1.5*10^10\n",
+"format(7)\n",
+"sigma1=q*nig*(un1+up1)\n",
+"disp('(i) The intrinsic conductivity for germanium,')\n",
+"disp(sigma1,'sigmai(S/cm) = q*ni*(un+up) = ')\n",
+"format(8)\n",
+"sigma2=q*nis*(un2+up2)\n",
+"disp('(ii) The intrinsic conductivity for silicon,')\n",
+"disp(sigma2,'sigmai(S/cm)= q*ni*(un+np) =')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.2: new_position_of_the_fermi_level.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example. 4.2.\n",
+"clc\n",
+"disp('The Fermi level in an N-type material is given by')\n",
+"disp('Ef = Ec - k*T*ln(Nc/Nd)')\n",
+"disp('(Ec - Ef) = k*T*ln(Nc/Nd)')\n",
+"disp('At T = 300 K,')\n",
+"disp('0.3 = 300*k*ln(Nc/Nd) Eq.1')\n",
+"disp('Similarly,')\n",
+"disp('(Ec - Ef1) = 360*k*ln(Nc/Nd) Eq.2')\n",
+"disp('Eq.2 divided by Eq.1 gives,')\n",
+"disp('(Ec - Ef1)/0.3 = 360/300')\n",
+"disp('Therefore, (Ec - Ef1) = (360/300) x 0.3')\n",
+"q=(360/300)*0.3\n",
+"disp(q,'Ec - Ef1= ')\n",
+"disp('Hence, the new position of the Fermi level lies 0.36 eV below the conduction level')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.3: new_position_of_the_Fermi_level_for_different_temperatures.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 4.3.\n",
+"clc\n",
+"disp('The Fermi level in a P-type material is given by')\n",
+"disp('Ef = Ev + k*T*ln(Nv/Na)')\n",
+"disp('Therefore, (Ef - Ev) = k*T*ln(Nv/Na)')\n",
+"disp('At T=300 K, 0.3 = 300*k*ln(Nv-Na) Eq.1')\n",
+"disp('(a) At T=350 K, (Ef1 - Ev) = 350*k*ln(Nv/Na) Eq.2')\n",
+"disp('Hence, from the above Eq.2 and Eq.1,')\n",
+"disp('(Ef1 - Ev)/0.3 = 350/300')\n",
+"q1=(350/300)*0.3\n",
+"disp('eV',q1,'Therefore, (Ef1 - Ev) = (350/300)*0.3 = ')\n",
+"disp('(b) At T=400 K, (Ef2 - Ev) = 400*k*ln(Nv/Na) Eq.3')\n",
+"disp('Hence, from the above Eq.3 and Eq.1,')\n",
+"disp('(Ef2 - Ev)/0.3 = 400/300')\n",
+"q2=(400/300)*0.3\n",
+"disp(q2,'Therefore, (Ef2 - Ev) = (400/300)*0.3 = ') // in eV"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.4: new_position_of_Fermi_level.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 4.4.\n",
+"clc\n",
+"format(6)\n",
+"disp('In an N-type material, the concentration of donor atoms is given by')\n",
+"disp('ND = NC*e^(-(EC - EF)/k*T)')\n",
+"disp('Let initially ND = ND0, EF = EF0 and EC - EF0 = 0.2 eV')\n",
+"disp('Therefore, ND0 = NC*e^(-0.2/0.025) = NC*e^-8')\n",
+"disp('(a) When ND = 4ND0 and EF = EF1, then')\n",
+"disp('4*ND0 = NC*e^(-(EC-EF1)/0.025) = NC*e^-40(EC - EF1)')\n",
+"disp('Therefore, 4*NC*e^-8 = NC*e^-40(EC - EF1)')\n",
+"disp('Therefore, 4 = e^(-40*(EC - EF1)+8)')\n",
+"disp('Taking natural logarithm on both sides, we get')\n",
+"disp('ln 4 = -40(EC - EF1) + 8')\n",
+"q1=(8-log(4))/40\n",
+"disp(q1,'EC - EF1(in eV) = ')\n",
+"disp('(b) When ND=8*ND0 and EF = EF2, then')\n",
+"disp('ln 8 = -40*(EC - EF2) + 8')\n",
+"q2=(8-log(8))/40\n",
+"disp(q2,'EC - EF2(in eV) = ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.5: new_position_of_Fermi_level.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 4.5.\n",
+"clc\n",
+"disp('In an P-type material, the concentration of acceptor atoms is given by')\n",
+"disp('NA = NV*e^(-(EF - EV)/k*T)')\n",
+"disp('Let initially NA = NA0, EF = EF0 and EF0 - EV = 0.4 eV')\n",
+"disp('Therefore, NA0 = NV*e^(-0.4/0.025) = NV*e^-16')\n",
+"disp('(a) When NA = 0.5*NA0 and EF = EF1, then')\n",
+"disp('0.5*NA0 = NV*e^(-(EF1-EV)/0.025) = NV*e^-40(EF1 - EV)')\n",
+"disp('Therefore, 0.5*NV*e^-16 = NV*e^-40(EF1 - EV)')\n",
+"disp('Therefore, 0.5 = e^(-40*(EF1 - EV)+16)')\n",
+"disp('Taking natural logarithm on both sides, we get')\n",
+"disp('ln (0.5) = -40(EF1 - EV) + 16')\n",
+"q1=(16-log(0.5))/40\n",
+"disp(q1,'EF1 - EV(in eV) = ')\n",
+"disp('(b) When NA=4*NA0 and EF = EF2, then')\n",
+"disp('ln 4 = -40*(EF2 - EV) + 16')\n",
+"q2=(16-log(4))/40\n",
+"disp(q2,'EF2 - EV(in eV) = ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.6: conductivity_of_silicon.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 4.6.\n",
+"clc\n",
+"ni=1.5*10^10\n",
+"un=1300\n",
+"up=500\n",
+"q=1.6*10^-19\n",
+"nos=5*10^22\n",
+"disp('(a) In intrensic condition, n=p=ni')\n",
+"disp('Hence, sigma_i = q*ni*(un+up)')\n",
+"format(8)\n",
+"sigma_i = q*ni*(un+up)\n",
+"disp(sigma_i,'sigma_i(S/cm) = ')\n",
+"disp('(b) Number of silicon atoms/cm^3 = 5*10^22')\n",
+"ND=5*10^22/10^8\n",
+"disp(ND,'Hence, ND(cm^-3) = ')\n",
+"disp('Further, n = ND')\n",
+"disp('Therefore, p = ni^2/n = ni^2/ND')\n",
+"p=ni^2/ND\n",
+"disp(p,'p(cm^-3) = ') // wrong answer in textbook\n",
+"disp('Thus p << n. Hence p may be neglected while calculating the conductivity.')\n",
+"disp('Hence, sigma = n*q*un = ND*q*un')\n",
+"sigma=ND*q*un\n",
+"disp(sigma,'sigma(S/cm) = ')\n",
+"NA=(5*10^22)/(5*10^7)\n",
+"disp(NA,'(c) NA(cm^-3) = ')\n",
+"disp('Further, p = NA')\n",
+"disp('Hence, n = ni^2/p = ni^2/NA')\n",
+"n=ni^2/NA\n",
+"disp(n,'n(cm^-3)= ')\n",
+"disp('Thus p >> n. Hence n may be neglected while calculating the conductivity.')\n",
+"disp('Hence, sigma = p*q*up = NA*q*up')\n",
+"sigma1=NA*q*up\n",
+"disp(sigma1,'sigma(S/cm) = ')\n",
+"disp('(d) With both types of impurities present simultaneously, the net acceptor impurity density is,')\n",
+"Na=NA-ND\n",
+"disp(Na,'Na(cm^-3) = NA - ND = ')\n",
+"disp('Hence, sigma = Na*q*up')\n",
+"sigma2=Na*q*up\n",
+"disp(sigma2,'sigma(S/cm) = ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.7: resistivity_of_germanium.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 4.7.\n",
+"clc\n",
+"ni=2.5*10^13\n",
+"un=3800\n",
+"up=1800\n",
+"nog=4.4*10^22\n",
+"q=1.6*10^-19\n",
+"format(8)\n",
+"sigma=q*ni*(un+up)\n",
+"disp('(a) n = p = ni = 2.5*10^13 cm^-3')\n",
+"disp(sigma,'Therefore, conductivity(S/cm), sigma = q*ni*(un+np) =')\n",
+"format(6)\n",
+"rho=1/sigma\n",
+"disp(rho,'Hence, resistivity(ohm-cm) rho = 1 / sigma =')\n",
+"format(8)\n",
+"ND=(4.4*10^22)/10^7\n",
+"disp(ND,'(b) ND(cm^-3) = ')\n",
+"format(9)\n",
+"p=ni^2/ND\n",
+"disp('Also, n = ND')\n",
+"disp(p,'Therefore, p(holes/cm^3) = ni^2 / n = ni^2 / ND =')\n",
+"disp('Here, as n >> p, p can be neglected.')\n",
+"format(6)\n",
+"sigma1=ND*q*un\n",
+"disp(sigma1,'Therefore, conductivity(S/cm), sigma = n*q*un = ND*q*un =')\n",
+"rho1=1/sigma1\n",
+"disp(rho1,'Hence, resistivity(ohm-cm), rho = 1 / sigma =')\n",
+"format(8)\n",
+"NA=(4.4*10^22)/10^8\n",
+"disp(NA,'(c) NA(cm^-3) = ')\n",
+"disp('Also, p = NA')\n",
+"format(9)\n",
+"n=ni^2/NA\n",
+"disp(n,'Therefore, n(electrons/cm^3) = ni^2 / p = ni^2 / NA =')\n",
+"format(7)\n",
+"sigma2=NA*q*up\n",
+"disp('Here, as p >> n, n may be neglected. Then,')\n",
+"disp(sigma2,'Conductivity(S/cm), sigma = p*q*up = NA*q*up =')\n",
+"format(5)\n",
+"rho2=1/sigma2\n",
+"disp(rho2,'Hence, resistivity(ohm-cm), rho = 1 / sigma = ')\n",
+"format(9)\n",
+"disp('(d) with both p and n type impurities present,')\n",
+"disp(' ND = 4.4*10^15 cm^-3 and NA = 4.4*10^14 cm^-3')\n",
+"disp('Therefore, the net donor density ND'' is')\n",
+"Nd=ND-NA\n",
+"disp(Nd,'ND''(cm^-3) = (ND - NA) =')\n",
+"disp('Therefore, effective n = ND'' = 3.96*10^15 cm^-3')\n",
+"format(10)\n",
+"p1=ni^2/Nd\n",
+"disp(p1,'p(cm^-3) = ni^2 / N''D =')\n",
+"disp('Here again p(= ni^2 / N''D) is very small compared with N''D and may be neglected in calculating the effective conductivity.')\n",
+"format(6)\n",
+"sigma3=Nd*q*un\n",
+"disp(sigma3,'Therefore, conductivity(S/cm), sigma = ND''*q*un =')\n",
+"rho3=1/sigma3\n",
+"disp(rho3,'Hence, resistivity(ohm-cm), rho = 1 / sigma =')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.8: otal_conduction_current_density.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 4.8\n",
+"clc\n",
+"un=1250\n",
+"up=475\n",
+"q=1.6*10^-19\n",
+"sigma_i=1/(25*10^4)\n",
+"format(9)\n",
+"ni=1/((25*10^4)*(1.6*10^-19)*(1250+475))\n",
+"disp(' sigma_i = qni(un+up) = 1 / 25*10^4')\n",
+"disp(ni,'Therefore, ni = sigma_i / q(un+up) =')\n",
+"format(7)\n",
+"ND=(4*10^10)-10^10\n",
+"disp(ND,'Net donor density, ND(= n)(in cm^-3) = ')\n",
+"p=ni^2/ND\n",
+"disp(p,'Hence, p(cm^-3) = ni^2 / ND =')\n",
+"format(8)\n",
+"sigma=(1.6*10^-19)*((1250*3*10^10)+(475*0.7*10^10))\n",
+"disp(sigma,'Hence, sigma = q*(n*un + p*up) =')\n",
+"format(11)\n",
+"J=6.532*4*10^-6\n",
+"disp(J,'Therefore, total conduction current density, J(A/cm^2) = sigma*E =')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.9: concentration_of_holes_and_electrons.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 4.9.\n",
+"clc\n",
+"ni=1.5*10^10\n",
+"un=1300\n",
+"up=500\n",
+"q=1.6*10^-19\n",
+"sigma=300\n",
+"disp('(a) Concentration in N-type silicon')\n",
+"format(10)\n",
+"n=sigma/(q*un)\n",
+"disp('The conductivity of an N-type Silicon is sigma = q*n*un')\n",
+"disp(n,'Concentratoin of electrons, n(cm^-3) = sigma / q*un =')\n",
+"p=ni^2/n\n",
+"disp(p,'Hence, concentration of holes, p(cm^-3) = ni^2 / n =')\n",
+"disp('(b) Concentration in P-type silicon')\n",
+"p=sigma/(q*up)\n",
+"disp('The conductivity of a P-type Silicon is sigma = q*p*up')\n",
+"disp(p,'Hence, concentratoin of holes, p(cm^-3) = sigma / q*up =')\n",
+"n=ni^2/p\n",
+"disp(n,'and concentration of electrons, n(cm^-3) = ni^2 / p =')"
+ ]
+ }
+],
+"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
+}