summaryrefslogtreecommitdiff
path: root/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper08.ipynb
diff options
context:
space:
mode:
authorThomas Stephen Lee2015-08-28 16:53:23 +0530
committerThomas Stephen Lee2015-08-28 16:53:23 +0530
commit4a1f703f1c1808d390ebf80e80659fe161f69fab (patch)
tree31b43ae8895599f2d13cf19395d84164463615d9 /Analog_Integrated_Circuits_by_J._B._Gupta/Chaper08.ipynb
parent9d260e6fae7328d816a514130b691fbd0e9ef81d (diff)
downloadPython-Textbook-Companions-4a1f703f1c1808d390ebf80e80659fe161f69fab.tar.gz
Python-Textbook-Companions-4a1f703f1c1808d390ebf80e80659fe161f69fab.tar.bz2
Python-Textbook-Companions-4a1f703f1c1808d390ebf80e80659fe161f69fab.zip
add books
Diffstat (limited to 'Analog_Integrated_Circuits_by_J._B._Gupta/Chaper08.ipynb')
-rw-r--r--Analog_Integrated_Circuits_by_J._B._Gupta/Chaper08.ipynb175
1 files changed, 175 insertions, 0 deletions
diff --git a/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper08.ipynb b/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper08.ipynb
new file mode 100644
index 00000000..f81cf886
--- /dev/null
+++ b/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper08.ipynb
@@ -0,0 +1,175 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:78d18a14b78f673f5bd74601b5a29612b95caf61b293886366daec703c0960a4"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter-8 Non-Linear Circuits"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.2 - Page 258"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from numpy import pi\n",
+ "# Given data \n",
+ "R1= 5 # in k\u03a9\n",
+ "R2= 10.0 # in k\u03a9\n",
+ "V_peak= R1*R2/(R1+R2) # in V\n",
+ "Vav= V_peak/pi # in V\n",
+ "print \"Peak value of V1 = %0.2f V\" %V_peak\n",
+ "print \"Average value of Vo = %0.2f V\" %Vav"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Peak value of V1 = 3.33 V\n",
+ "Average value of Vo = 1.06 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.7 - Page 268"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "from __future__ import division\n",
+ "from math import exp\n",
+ "# Given data \n",
+ "t= 0 \n",
+ "Vc= 0 # in volts\n",
+ "Vo= 5 # in volts\n",
+ "R= 10 # in 2 \u03a9 (assume)\n",
+ "RC= 1 # (assume)\n",
+ "R3= 2*R # in \u03a9\n",
+ "R2= 3*R # in \u03a9\n",
+ "# From equation : T= 2*Rf*C*log[1+2*R3/R2]\n",
+ "T= 2*RC*math.log(1+2*R3/R2) \n",
+ "Vc_t= 2 # in volts\n",
+ "t= T/2 \n",
+ "#Voltage across capacitor,\n",
+ "# Vc_t= Vco*[1-%e**(-t/ReqC)]= 1/5*(VR+4*Vo)*[1-%e**(-t/4*RC/5)]\n",
+ "VR= Vc_t*5/(1-exp((-t/(4*RC/5))))-4*Vo \n",
+ "print \"The value of VR = %0.2f volts\" %VR"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of VR = -4.69 volts\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.9 - Page 270"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "# Given data\n",
+ "# Part (c)\n",
+ "R1= 150 # in \u03a9\n",
+ "R2= 68*10**3 # in \u03a9\n",
+ "Vin= 50*10**-3 # in V\n",
+ "Vsat= 14 # in V\n",
+ "Vpositive= Vsat*(R1/(R1+R2)) # in V\n",
+ "V_UT= Vpositive # in V\n",
+ "Vpositive= -Vsat*(R1/(R1+R2)) # in V\n",
+ "V_LT= Vpositive # in V\n",
+ "print \"The value of V_UT = %0.4f V\" %V_UT\n",
+ "print \"The value of V_LT = %0.4f V\" %V_LT"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of V_UT = 0.0308 V\n",
+ "The value of V_LT = -0.0308 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.10 - Page 271"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data \n",
+ "V_UT= 5 # in V\n",
+ "V_LT= -5 # in V\n",
+ "# Hysteresis voltage,\n",
+ "Vhy= V_UT-V_LT # in V\n",
+ "print \"The hysteresis voltage = %0.f V\" %Vhy"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The hysteresis voltage = 10 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file