summaryrefslogtreecommitdiff
path: root/sample_notebooks/DeepTrambadia/Untitled0.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'sample_notebooks/DeepTrambadia/Untitled0.ipynb')
-rw-r--r--sample_notebooks/DeepTrambadia/Untitled0.ipynb154
1 files changed, 154 insertions, 0 deletions
diff --git a/sample_notebooks/DeepTrambadia/Untitled0.ipynb b/sample_notebooks/DeepTrambadia/Untitled0.ipynb
new file mode 100644
index 00000000..e23c7b5f
--- /dev/null
+++ b/sample_notebooks/DeepTrambadia/Untitled0.ipynb
@@ -0,0 +1,154 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:3090d4f2b3d4de5b787389193d1e9cb10abedd8dbc02a70d6ec597610190cdf7"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#example 2.13 page no.65\n",
+ "import math\n",
+ "\n",
+ "#initialization of variables\n",
+ "\n",
+ "E1=20 #supply voltage in V\n",
+ "E2=4 #second port voltage in V\n",
+ "Vd=0.7 #thresold voltage\n",
+ "R=2.2 #R in Kohm\n",
+ "\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "I = (E1-E2-Vd)/R\n",
+ "\n",
+ "print \"Diode D1 turn on and Diode D2 turn off\"\n",
+ "print \"the resultant current I is %.2fmA\" %(I)\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Diode D1 turn on and Diode D2 turn off\n",
+ "the resultant current I is 6.95mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#example 2.14 page no.66\n",
+ "import math\n",
+ "\n",
+ "#initialization of variables\n",
+ "E=12 #supply Voltage in V\n",
+ "Vd=0.3 #thresold voltage in V\n",
+ "\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "V0 = E-Vd\n",
+ "\n",
+ "print \"If initially both were 'on,'' the 0.7-V drop across the silicon diode would not match the 0.3 V \"\n",
+ "print \"across the germanium diode as required by the fact that the voltage across parallel elements must be the same\"\n",
+ "print \"The silicon diode will never have the opportunity to capture its required 0.7 V and therefore remains in its open-circuit state\"\n",
+ "print \"the resultant Voltage V0 is %.1fV\" % (V0)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "If initially both were 'on,'' the 0.7-V drop across the silicon diode would not match the 0.3 V \n",
+ "across the germanium diode as required by the fact that the voltage across parallel elements must be the same\n",
+ "The silicon diode will never have the opportunity to capture its required 0.7 V and therefore remains in its open-circuit state\n",
+ "the resultant Voltage V0 is 11.7V\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#example 2.15 page no.66\n",
+ "import math\n",
+ "\n",
+ "#initialization of variables\n",
+ "\n",
+ "E=20 #supply voltage in V\n",
+ "VT1=0.7 #thresold voltage\n",
+ "VT2=0.7 #thresold voltage\n",
+ "R1=3.3 #R in Kohm\n",
+ "R2=5.6 #R in Kohm\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "print \"Both Diodes will turn 'on'\"\n",
+ "print \"So diode voltage will appear over the resistance\"\n",
+ "\n",
+ "I1 = (VT2)/R1\n",
+ "\n",
+ "print \"the resultant current I2 is %.3fmA\" %(I1)\n",
+ "\n",
+ "print \"Applying Kirchhoff's voltage law around the indicated loop in the clockwise direction yields\"\n",
+ "\n",
+ "V2 = E-VT1-VT2\n",
+ "I2 = V2/R2\n",
+ "\n",
+ "print \"the voltage V2 =%.1fV\" %(V2)\n",
+ "print \"the current I2 =%.2fmA\"%(I2)\n",
+ "\n",
+ "#At hte bottom node (a)\n",
+ "\n",
+ "ID2=I2-I1\n",
+ "\n",
+ "print \"the current I2 =%.3fmA\" %(ID2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Both Diodes will turn 'on'\n",
+ "So diode voltage will appear over the resistance\n",
+ "the resultant current I2 is 0.212mA\n",
+ "Applying Kirchhoff's voltage law around the indicated loop in the clockwise direction yields\n",
+ "the voltage V2 =18.6V\n",
+ "the current I2 =3.32mA\n",
+ "the current I2 =3.109mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file