diff options
author | Trupti Kini | 2016-03-11 23:30:11 +0600 |
---|---|---|
committer | Trupti Kini | 2016-03-11 23:30:11 +0600 |
commit | 2be8c9a4fe3e8680634083e03085ec4133f22e12 (patch) | |
tree | 87f273631fb46ee30a9f2258a2fcb6a87dbb050d /Linear_Integrated_Circuit_by_M._S._Sivakumar/Ch7.ipynb | |
parent | 8b45c91b0d1cc1bf93d8653912e7068004eda3eb (diff) | |
download | Python-Textbook-Companions-2be8c9a4fe3e8680634083e03085ec4133f22e12.tar.gz Python-Textbook-Companions-2be8c9a4fe3e8680634083e03085ec4133f22e12.tar.bz2 Python-Textbook-Companions-2be8c9a4fe3e8680634083e03085ec4133f22e12.zip |
Added(A)/Deleted(D) following books
A College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch15.ipynb
A College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch16.ipynb
A College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch17.ipynb
A College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch18.ipynb
A College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch19.ipynb
A College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch20.ipynb
A College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch21.ipynb
A College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch22.ipynb
A College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch23.ipynb
A College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch24.ipynb
A College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch25.ipynb
A College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch26.ipynb
A College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch27.ipynb
A College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch28.ipynb
A College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch29.ipynb
A College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/Ch30.ipynb
A College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/screenshots/1RefractionOfLaserLight.png
A College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/screenshots/2PropertiesOfImage.png
A College_Physics_(volume_2)_by_R._A._Serway_and_J._S._Faughn/screenshots/3PositionOf1DarkFringe.png
A Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/Chapter9_7.ipynb
A Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/chapter1_7.ipynb
A Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/chapter2_7.ipynb
A Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/chapter3_7.ipynb
A Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/chapter4_7.ipynb
A Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/chapter6_7.ipynb
A Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/chapter7_7.ipynb
A Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/chapter8_7.ipynb
A Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/chapter_5_7.ipynb
A Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/screenshots/1.2_2.png
A Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/screenshots/3.7_2.png
A Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/screenshots/6.7_2.png
A Linear_Integrated_Circuit_by_M._S._Sivakumar/Ch11.ipynb
A Linear_Integrated_Circuit_by_M._S._Sivakumar/Ch12.ipynb
A Linear_Integrated_Circuit_by_M._S._Sivakumar/Ch13.ipynb
A Linear_Integrated_Circuit_by_M._S._Sivakumar/Ch14.ipynb
A Linear_Integrated_Circuit_by_M._S._Sivakumar/Ch3.ipynb
A Linear_Integrated_Circuit_by_M._S._Sivakumar/Ch4.ipynb
A Linear_Integrated_Circuit_by_M._S._Sivakumar/Ch5.ipynb
A Linear_Integrated_Circuit_by_M._S._Sivakumar/Ch6.ipynb
A Linear_Integrated_Circuit_by_M._S._Sivakumar/Ch7.ipynb
A Linear_Integrated_Circuit_by_M._S._Sivakumar/Ch8.ipynb
A Linear_Integrated_Circuit_by_M._S._Sivakumar/Ch9.ipynb
A Linear_Integrated_Circuit_by_M._S._Sivakumar/screenshots/BiasingVoltage.png
A Linear_Integrated_Circuit_by_M._S._Sivakumar/screenshots/InOutCrrnt.png
A Linear_Integrated_Circuit_by_M._S._Sivakumar/screenshots/inAndOutCurrnt.png
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/Chapter10.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/Chapter28.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/Chapter29.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter1.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter11.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter12.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter13.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter14.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter15.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter16.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter17.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter18.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter19.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter2.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter20.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter21.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter22.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter23.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter24.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter25.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter26.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter27.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter3.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter4.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter5.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter6.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter7.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter8.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter9.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/screenshots/image_1.png
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/screenshots/image_2.png
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/screenshots/image_3.png
A sample_notebooks/KhushbuPattani/chapter1_1.ipynb
Diffstat (limited to 'Linear_Integrated_Circuit_by_M._S._Sivakumar/Ch7.ipynb')
-rw-r--r-- | Linear_Integrated_Circuit_by_M._S._Sivakumar/Ch7.ipynb | 722 |
1 files changed, 722 insertions, 0 deletions
diff --git a/Linear_Integrated_Circuit_by_M._S._Sivakumar/Ch7.ipynb b/Linear_Integrated_Circuit_by_M._S._Sivakumar/Ch7.ipynb new file mode 100644 index 00000000..b665ce02 --- /dev/null +++ b/Linear_Integrated_Circuit_by_M._S._Sivakumar/Ch7.ipynb @@ -0,0 +1,722 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 7 Filters and Rectifiers" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.1 Pg 232" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The resistor value is = 1.59 k ohm \n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "from math import pi, sqrt\n", + "# Design active low filter with cut-off frequency 10 kHz\n", + "fc = 10 # # kHz\n", + "C = 0.01 # #uF # we assume\n", + "\n", + "# the cut-off frequency of active low pass filter is defined as\n", + "# fc = (1/2*pi*R3*C)#\n", + "\n", + "# R3 can be calculated as\n", + "R3 = (1/(2*pi*fc*C))#\n", + "print 'The resistor value is = %0.2f'%R3,' k ohm '" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.2 Pg 233" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The resistor value is = 106 ohm \n", + "The pass band gain is = 1.50 \n" + ] + } + ], + "source": [ + " # Design active low filter with cut-off frequency 15 kHz\n", + "fc = 15*10**3 # # Hz \n", + "C = 0.1*10**-6 # #F # we assume\n", + "\n", + "# the cut-off frequency of active low pass filter is defined as\n", + "# fc = (1/2*pi*R3*C)#\n", + "\n", + "# R3 can be calculated as\n", + "R3 = (1/(2*pi*fc*C))#\n", + "print 'The resistor value is = %0.f'%R3,' ohm '\n", + "\n", + "# the pass band gain of filter is given by\n", + "# Af = 1+(R2/R1)#\n", + "# assume that the inverting terminal resistor R2=0.5*R1#\n", + "# in Af equation if we put R2=0.5R1 in R1 R1 cancellout each other \n", + "Af = 1+(0.5)\n", + "print 'The pass band gain is = %0.2f'%Af,' '" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.3 Pg 234" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The resistor value is = 159 Kohm \n", + "The resistor R2 value is = 900.00 k ohm \n", + "The magnitude of an active low pass filter is = 1.96 \n", + "The phase angle of the filter is = -78.69 \n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "# Design active low filter with cut-off frequency 20 kHz\n", + "fc = 20 # # kHz \n", + "f = 100 # # frequency of filter\n", + "Af = 10 # # desired pass band gain\n", + "C = 0.05 # #nF # we assume\n", + "\n", + "# the cut-off frequency of active low pass filter is defined as\n", + "# fc = (1/2*pi*R3*C)#\n", + "\n", + "# R3 can be calculated as\n", + "R3 = (1/(2*pi*fc*1e3*C*1e-9))/1e3 # Kohm\n", + "print 'The resistor value is = %0.f'%R3,' Kohm '\n", + "\n", + "# the pass band gain of filter is given by\n", + "# Af = 1+(R2/R1)#\n", + "# assume that the inverting terminal resistor R1= 100 k ohm#\n", + "R1 = 100 # # k ohm\n", + "R2 = (Af*R1)-R1#\n", + "print 'The resistor R2 value is = %0.2f'%R2,' k ohm '\n", + "\n", + "# the magnitude of an active low pass filter is given as\n", + "A = Af/(sqrt(1+(f/fc)**2))#\n", + "print 'The magnitude of an active low pass filter is = %0.2f'%A,' '\n", + "\n", + "#the phase angle of the filter\n", + "from math import atan , degrees\n", + "Angle = -degrees(atan(f/fc))#\n", + "print 'The phase angle of the filter is = %0.2f'%Angle,' '" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.4 Pg 236" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The frequency of the first order low pass filter is = 2.65 kHz \n", + "The pass band gain of filter is = 13.00 \n" + ] + } + ], + "source": [ + " # to determine the cut-off frequency and pass band gain Af\n", + "R1 = 1 # # k ohm\n", + "R2 = 12 # # k ohm\n", + "R3 = 1.2 # # k ohm\n", + "C = 0.05 # #uF # we assume\n", + "\n", + "# the frequency of the first order low pass filter is defined as\n", + "fc = (1/(2*pi*R3*C))#\n", + "print 'The frequency of the first order low pass filter is = %0.2f'%fc,' kHz '\n", + "\n", + "# the pass band gain of filter is given by\n", + "Af =(1+R2/R1)#\n", + "print 'The pass band gain of filter is = %0.2f'%Af,''" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.5 Pg 236" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The capacitor of high pass filter is = 25.13 uF \n", + "The second resistor value is = 90.00 K ohm \n" + ] + } + ], + "source": [ + " # to design a first order high pass filter with cut-off frequency 2kHz\n", + "Af = 10 #\n", + "fc = 2 # # kHz \n", + "R3 = 2 # #K ohm # we assume\n", + "R1 = 10 # # k ohm\n", + "# the capacitor of high pass filter is given by\n", + "C = 2*pi*R3*fc#\n", + "print 'The capacitor of high pass filter is = %0.2f'%C,' uF '\n", + "\n", + "# the voltage gain of the high pass filter is\n", + "# Af = 1+(R2/R1)#\n", + "R2 = R1*(Af-1)#\n", + "print 'The second resistor value is = %0.2f'%R2,' K ohm '" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.6 Pg 237" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The resistance R3 is = 1.59 K ohm \n" + ] + } + ], + "source": [ + " # to design an active high pass filter with cut-off frequency 10kHz\n", + "fc = 10 # # kHz \n", + "C = 0.01 # #uF # we assume\n", + "# the cut-off frequency of active high pass filter is given by\n", + "# fc = 2*pi*R3*C#\n", + "# R3 can be calculated as\n", + "R3 = (1/(2*pi*fc*C))#\n", + "print 'The resistance R3 is = %0.2f'%R3,' K ohm '" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.7 Pg 238" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The resistance R3 is = 64 Kohm \n", + "The pass band gain is = 1.20 \n" + ] + } + ], + "source": [ + "# to design an active high pass filter with cut-off frequency 25kHz\n", + "fc = 25 # # kHz \n", + "C = 0.1 # #nF # we assume\n", + "# the cut-off frequency of active high pass filter is given by\n", + "# fc = 2*pi*R3*C#\n", + "# R3 can be calculated as\n", + "R3 = (1/(2*pi*fc*1e3*C*1e-9)) / 1e3 # Kohm\n", + "print 'The resistance R3 is = %0.f'%R3,' Kohm '\n", + "\n", + "# the desire pass band gain of filter is given by \n", + "#Af = 1+(R2/R1)#\n", + "# assume that the inverting terminal resistor R2=0.2*R1#\n", + "# in Af equation if we put R2=0.2R1 in R1 R1 cancellout each other \n", + "Af = 1+(0.2)\n", + "print 'The pass band gain is = %0.2f'%Af,' '" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.8 Pg 239" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The resistance R3 is = 159 K ohm \n", + "The resistance R2 is = 700.00 K ohm \n", + "The magnitude of an active high pass filter is = 14.55 \n", + "The phase angle of the filter is = 14.04 degree\n" + ] + } + ], + "source": [ + "## # to design an active high pass filter with cut-off frequency 20kHz \n", + "Af = 15 #\n", + "fc = 20 # #kHz\n", + "f = 80 # # kHz the frequency of filter \n", + "C = 0.05 # #nF # we assume\n", + "# the cut-off frequency of active high pass filter is given by\n", + "# fc = 2*pi*R3*C#\n", + "# R3 can be calculated as\n", + "R3 = (1/(2*pi*fc*C))#\n", + "print 'The resistance R3 is = %0.f'%(R3*1000),' K ohm ' # Round Off Error\n", + "\n", + "# the desire pass band gain of filter is given by \n", + "#Af = 1+(R2/R1)#\n", + "# assume that the inverting terminal resistor R1=50 K ohm#\n", + "R1 = 50 # # K ohm\n", + "R2 = (R1*Af)-(R1)\n", + "print 'The resistance R2 is = %0.2f'%R2,' K ohm '\n", + "\n", + "# the magnitude of an active high pass filter is given as\n", + "A = Af*(f/fc)/(sqrt(1+(f/fc)**2))#\n", + "print 'The magnitude of an active high pass filter is = %0.2f'%A,' '\n", + "\n", + "#the phase angle of the filter\n", + "from numpy import inf\n", + "Angle = degrees(-atan(f/fc)+atan(inf))\n", + "print 'The phase angle of the filter is = %0.2f'%Angle,' degree' # Round Off Error" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.9 Pg 241" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The lower cut-off frequency FLC of band pass filter is = 159.2 Hz \n", + "The upper cut-off frequency FUC of band pass filter is = 15.92 kHz \n" + ] + } + ], + "source": [ + "# to calculate upper and lower cut-off frequency of the band pass filter\n", + "R1 = 10*10**3 # #K ohm\n", + "R2 = 10 # #K ohm\n", + "C1 = 0.1*10**-6 # # uF\n", + "C2 = 0.001 # #uF\n", + "\n", + "# the lower cut-off frequency of band pass filter is\n", + "fLC = 1/(2*pi*R1*C1)#\n", + "print 'The lower cut-off frequency FLC of band pass filter is = %0.1f'%fLC,' Hz '\n", + "\n", + "# The upper cut-off frequency of band pass filter is\n", + "fUC = 1/(2*pi*R2*C2)#\n", + "print 'The upper cut-off frequency FUC of band pass filter is = %0.2f'%fUC,' kHz '" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.10 Pg 242" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The resistance R3 Value is = 7.96 M ohm \n", + "The resistance R6 value is = 1.59 M ohm \n" + ] + } + ], + "source": [ + "# to design an active band pass filter with lower cut-off frequency 10 kHz an upper 50 kHz\n", + "fL = 10 # # kHz\n", + "fH = 50 # # kHz\n", + "C1 = 0.002 # # nF\n", + "C2 = 0.002 # # nF\n", + "\n", + "# the lower cut-off frequency of band pass filter is\n", + "# fL = 1/(2*pi*R3*C1)#\n", + "R3 = 1/(2*pi*fL*C1)#\n", + "print 'The resistance R3 Value is = %0.2f'%R3,' M ohm '\n", + "\n", + "# The upper cut-off frequency of band pass filter is\n", + "# fH = 1/(2*pi*R6*C2)#\n", + "R6 = 1/(2*pi*fH*C2)#\n", + "print 'The resistance R6 value is = %0.2f'%R6,' M ohm '" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.11 Pg 243" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The resistance R3 Value is = 7.96 M ohm \n", + "The resistance R6 value is = 3.98 M ohm \n", + "The desire pass band gain of filter is = 15 \n" + ] + } + ], + "source": [ + "# to design an active band pass filter with lower cut-off frequency 20 kHz an upper 40 kHz\n", + "fL = 20 # # kHz\n", + "fH = 40 # # kHz\n", + "# the inverting terminal resistance 2R1=R2 and 4R4=R5\n", + "C1 = 0.001 # # nF\n", + "C2 = 0.001 # # nF\n", + "\n", + "# the lower cut-off frequency of band pass filter is\n", + "# fL = 1/(2*pi*R3*C1)#\n", + "R3 = 1/(2*pi*fL*C1)#\n", + "print 'The resistance R3 Value is = %0.2f'%R3,' M ohm '\n", + "\n", + "# The upper cut-off frequency of band pass filter is\n", + "# fH = 1/(2*pi*R6*C2)#\n", + "R6 = 1/(2*pi*fH*C2)#\n", + "print 'The resistance R6 value is = %0.2f'%R6,' M ohm '\n", + "\n", + "# the desire pass band gain of filter is defined as\n", + "R1 = 1 # # M ohm we assume\n", + "#we define inverting terminal resistance 2R1=R2\n", + "R2 = 2 # # M ohm\n", + "# then\n", + "R4 = 1 # #M ohm\n", + "R5 = 4 # # M ohm\n", + "Af = (1+(R2/R1))*(1+(R5/R4))#\n", + "print 'The desire pass band gain of filter is = %d'%Af,' '" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.12 Pg 244" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The resistance R3 Value is = 7.96 M ohm \n", + "The resistance R6 value is = 1.99 M ohm \n", + "The desire pass band gain of filter is = 15.00 \n", + "The magnitude of gain of band pass filter is = 11.49 \n", + "The phase angle of gain of band pass filter is = 50 degree\n" + ] + } + ], + "source": [ + "# to design an active band pass filter with lower cut-off frequency 20 kHz an upper 80 kHz\n", + "f = 100 # # kHz the frequency of band pass filter\n", + "fL = 20 # # kHz\n", + "fH = 80 # # kHz\n", + "# the inverting terminal resistance R1=0.5*R2 and R4=0.25*R5\n", + "C1 = 0.001 # # nF\n", + "C2 = 0.001 # # nF\n", + "\n", + "# the lower cut-off frequency of band pass filter is\n", + "# fL = 1/(2*pi*R3*C1)#\n", + "R3 = 1/(2*pi*fL*C1)#\n", + "print 'The resistance R3 Value is = %0.2f'%R3,' M ohm '\n", + "\n", + "# The upper cut-off frequency of band pass filter is\n", + "# fH = 1/(2*pi*R6*C2)#\n", + "R6 = 1/(2*pi*fH*C2)#\n", + "print 'The resistance R6 value is = %0.2f'%R6,' M ohm ' # Round Off Error\n", + "\n", + "# the desire pass band gain of filter is defined as\n", + "R1 = 1 # # M ohm we assume\n", + "#we define inverting terminal resistance R1=0.5*R2\n", + "R2 = 2 # # M ohm\n", + "# then\n", + "R4 = 1 # #M ohm\n", + "R5 = 4 # # M ohm\n", + "Af = (1+(R2/R1))*(1+(R5/R4))#\n", + "print 'The desire pass band gain of filter is = %0.2f'%Af,' '\n", + "\n", + "# the magnitude of gain of band pass filter is given as\n", + "A = Af*(f**2/(fL*fH))/((sqrt(1+(f/fL)**2))*(sqrt(1+(f/fH)**2)))#\n", + "print 'The magnitude of gain of band pass filter is = %0.2f'%A,' ' # Round Off Error\n", + "\n", + "#the phase angle of the filter\n", + "from numpy import inf\n", + "Angle = degrees(2*atan(inf)-atan(f/fL)-atan(f/fH))\n", + "print 'The phase angle of gain of band pass filter is = %0.f'%Angle,'degree' # Round Off Error" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.13 Pg 247" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The output of the half wave precision rectifier Vo is = -20.00 V \n" + ] + } + ], + "source": [ + " # to determine the output voltage of the precision rectifier circuit\n", + "Vi = 10 # #V i/p volt\n", + "R1 = 20 # # K ohm\n", + "R2 = 40 # # K ohm\n", + "Vd = 0.7 # # V the diode voltage drop\n", + "\n", + "# the output of the half wave precision rectifier is defined as\n", + "# Vo = -(R2/R1)*Vi # for Vi < 0\n", + "# = 0 otherwise\n", + "# i.e for Vi > 0\n", + "# Vo = 0\n", + "# for Vi < 0\n", + "Vo = -(R2/R1)*Vi\n", + "print 'The output of the half wave precision rectifier Vo is = %0.2f'%Vo,' V '" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.14 Pg 247" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The output of the half wave precision rectifier Vo is = -15.00 V \n", + "The output of the half wave precision rectifier Vo is = 15.00 V \n" + ] + } + ], + "source": [ + "# to determine the output voltage of the precision rectifier circuit for i/p voltage a) Vi = 5 b) Vi = -5\n", + "Vi = 5 # #V i/p volt\n", + "R1 = 5 # # K ohm\n", + "R2 = 15 # # K ohm\n", + "Vd = 0.7 # # V the diode voltage drop\n", + "\n", + "# the output of the half wave precision rectifier is defined as\n", + "# Vo = -(R2/R1)*Vi # for Vi < 0\n", + "# = 0 otherwise\n", + "\n", + "# for Vi = 5 V\n", + "# i.e for Vi > 0\n", + "# Vo = 0\n", + "# for Vi < 0\n", + "Vo = -(R2/R1)*Vi#\n", + "print 'The output of the half wave precision rectifier Vo is = %0.2f'%Vo,' V '\n", + "\n", + "# for Vi = -5 V\n", + "# i.e for Vi > 0\n", + "# Vo = 0\n", + "# for Vi < 0\n", + "Vi =-5 # # V\n", + "Vo = -(R2/R1)*Vi#\n", + "print 'The output of the half wave precision rectifier Vo is = %0.2f'%Vo,' V '" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.15 Pg 248" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The gain of precision full wave rectifier A is = 6.00 \n", + "The output voltage Vo is = 42.00 V \n", + "The output voltage Vo is = 42.00 V \n" + ] + } + ], + "source": [ + " # to determine the output voltage of the precision rectifier circuit for i/p voltage a) Vi = 7 b) Vi = -7\n", + "Vi = 7 # #V i/p volt\n", + "R1 = 5 # # K ohm\n", + "R3 = 5 # # K ohm\n", + "R4 = 5 # # K ohm\n", + "R2 = 15 # # K ohm\n", + "R5 = 15 # # K ohm\n", + "Vd = 0.7 # # V the diode voltage drop\n", + "\n", + "# the output of the full wave precision rectifier is defined as\n", + "# Vo = -A*Vi # for Vi < 0 equation 1\n", + "# = A*Vi # otherwise equation 2\n", + "\n", + "# or Vo = abs(A*Vi) #\n", + "\n", + "# The gain of precision full wave rectifier\n", + "A = (((R2*R5)/(R1*R3))-(R5/R4)) #\n", + "print 'The gain of precision full wave rectifier A is = %0.2f'%A,' '\n", + "\n", + "\n", + "# for Vi = 7 V the output voltage is\n", + "Vi = 7 #\n", + "Vo = -A*Vi # # from equation 1\n", + "Vo = A*Vi # # from equation 2\n", + "Vo = abs(A*Vi) #\n", + "print 'The output voltage Vo is = %0.2f'%Vo,' V '\n", + "\n", + "# for Vi = -7 V the output voltage is\n", + "Vi = -7 #\n", + "Vo = -A*Vi # # from equation 1\n", + "Vo = A*Vi # # from equation 2\n", + "Vo = abs(A*Vi) #\n", + "print 'The output voltage Vo is = %0.2f'%Vo,' V '" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} |