summaryrefslogtreecommitdiff
path: root/sample_notebooks/YogeshPatil
diff options
context:
space:
mode:
authorhardythe12015-07-03 12:23:43 +0530
committerhardythe12015-07-03 12:23:43 +0530
commit5a86a20b9de487553d4ef88719fb0fd76a5dd6a7 (patch)
treedb67ac5738a18b921d9a8cf6e86f402703f30bdf /sample_notebooks/YogeshPatil
parent37d315828bbfc0f5cabee669d2b9dd8cd17b5154 (diff)
downloadPython-Textbook-Companions-5a86a20b9de487553d4ef88719fb0fd76a5dd6a7.tar.gz
Python-Textbook-Companions-5a86a20b9de487553d4ef88719fb0fd76a5dd6a7.tar.bz2
Python-Textbook-Companions-5a86a20b9de487553d4ef88719fb0fd76a5dd6a7.zip
add/remove books
Diffstat (limited to 'sample_notebooks/YogeshPatil')
-rwxr-xr-xsample_notebooks/YogeshPatil/EDC_By_K_L_Kishore_Chapter_7.ipynb499
1 files changed, 499 insertions, 0 deletions
diff --git a/sample_notebooks/YogeshPatil/EDC_By_K_L_Kishore_Chapter_7.ipynb b/sample_notebooks/YogeshPatil/EDC_By_K_L_Kishore_Chapter_7.ipynb
new file mode 100755
index 00000000..703182db
--- /dev/null
+++ b/sample_notebooks/YogeshPatil/EDC_By_K_L_Kishore_Chapter_7.ipynb
@@ -0,0 +1,499 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 7 : Feedback Amplifiers"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.1 page no-402"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# determination of various parameters of feedback amplifiers\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Av=-100\n",
+ "B=0.01\n",
+ "\n",
+ "#Calculations\n",
+ "Avd=Av/(1-B*Av)\n",
+ "v1d=10**-3 \n",
+ "V0=Avd*v1d*1000\n",
+ "Vx=B*V0\n",
+ "V1=v1d+Vx\n",
+ "\n",
+ "#Result\n",
+ "print(\"V1=%.3f\\nV1d=%.3f\\nThis is negative feedback because, v1<v1_dash\\n\"%( V1,v1d))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "V1=-0.499\n",
+ "V1d=0.001\n",
+ "This is negative feedback because, v1<v1_dash\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.2 page no-403"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#percentage variation in Avdash\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Av=-100\n",
+ "Avd=-50\n",
+ "Avnew=-200\n",
+ "B=0.01\n",
+ "\n",
+ "# Calculations\n",
+ "Avdnew=Avnew/(1-B*Avnew)\n",
+ "avchange=(-Avdnew)-(-Avd)\n",
+ "var=avchange*100/(-Avd)\n",
+ "\n",
+ "#Result\n",
+ "print(\"Variation = %.1f%%\"%var)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Variation = 33.3%\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.3 page no-403"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# reverse transmission factor and gain with feedback\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "dA=100.0\n",
+ "A=1000.0\n",
+ "dAf=0.1\n",
+ "Af=100.0\n",
+ "\n",
+ "#Calculations\n",
+ "#(a)\n",
+ "B=(((dA/A)*(Af/dAf))-1)/A\n",
+ "#(b)\n",
+ "Aff=A/(1+B*A)\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a)\\nBeta=%.3f\"%B)\n",
+ "print(\"\\n(b)\\nAf=%d\"%Aff)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)\n",
+ "Beta=0.099\n",
+ "\n",
+ "(b)\n",
+ "Af=10\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.4 page no-404"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Improvement in stability\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "S=0.1\n",
+ "Sdash=0.01\n",
+ "Avdash=100.0\n",
+ "\n",
+ "#Calculations\n",
+ "k=S/Sdash # k=1+BAv\n",
+ "Av=Avdash*k\n",
+ "B=(k-1)/Av\n",
+ "\n",
+ "#Result\n",
+ "print(\"By providing negative feedback,with\\nBeta = %.3f\\nwe can improve the stability to 1%%.\"%B)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "By providing negative feedback,with\n",
+ "Beta = 0.009\n",
+ "we can improve the stability to 1%.\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.5 page no-404"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Overall gain and reverse transmission factor\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Av=500.0\n",
+ "D=5.0\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "Ddash=0.1\n",
+ "B=((D/Ddash)-1)/(Av)\n",
+ "Avdash=-Av/(1+B*Av)\n",
+ "\n",
+ "#Result\n",
+ "print(\"Av_dash = %.0f\"%Avdash)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Av_dash = -10\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.6 page no-405"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# different parameters with and without negative feedback\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vs=150.0\n",
+ "A=10000.0\n",
+ "Vs2=130.0\n",
+ "A2=8000.0\n",
+ "\n",
+ "\n",
+ "#Calcualtions\n",
+ "V0=A*Vs\n",
+ "Afb=10000.0/80.0\n",
+ "B=((A/Afb)-1)/A\n",
+ "V02=A2*Vs\n",
+ "Afb2=A2/(1+(B*A2))\n",
+ "sg=(A-A2)*100/A\n",
+ "sgf=(Afb-Afb2)*100/Afb\n",
+ "\n",
+ "#Result\n",
+ "print(\"Beta =%.4f\"%B)\n",
+ "print(\"%% stability of gain without feedback=%.0f%%\\n%% stability of gain with feedback=%.4f%%\"%(sg,sgf))\n",
+ "print(\"Therefore, with neative feedbaclk stability is improved.\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Beta =0.0079\n",
+ "% stability of gain without feedback=20%\n",
+ "% stability of gain with feedback=0.3115%\n",
+ "Therefore, with neative feedbaclk stability is improved.\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.7 page no-409"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Avf, Rof and Rif for the voltage series feedback\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Rs=0\n",
+ "hfe=50.0\n",
+ "hie =1.100\n",
+ "hre=0\n",
+ "hoe=0\n",
+ "r5=2.2000\n",
+ "r7=3.3000\n",
+ "r3=33.0\n",
+ "r1=0.1\n",
+ "r2=10.0\n",
+ "r9=2.2\n",
+ "R1=0.98\n",
+ "r6=2.2\n",
+ "R0=2.0\n",
+ "\n",
+ "#Calculations\n",
+ "#Rl =R5 is in parallel with R7,R8 and h1e2\n",
+ "Rl1=(r5*r3*r7*hie)/((r5*r3*r7)+(hie*r3*r7)+(r5*hie*r7)+(r5*r3*hie))\n",
+ "Rl2=(r9*(r1+r2))/(r9+(r1+r2))\n",
+ "Re=(r1*r6)/(r1+r6)\n",
+ "Av1=-(hfe*Rl1)/(hie+(1+hfe)*0.098) # The voltage gain AV1 of Q\n",
+ "Av2=(-hfe*Rl2)/hie # Voltage gain AY2 of transistor Q2\n",
+ "Av=Av1*Av2 # Voltage gain Ay of the two stages is cascade without feedback\n",
+ "B=r1/(r1+r2)\n",
+ "K=Av*B\n",
+ "D=1+K\n",
+ "Avf=Av/D\n",
+ "Ri=hie+(1+hfe)*Re # Input resistance without external feedback\n",
+ "Ridash=Ri*D\n",
+ "Rof=R0/D # Output resistance without feedback\n",
+ "\n",
+ "#Result\n",
+ "print(\"Rl1_dash=%f\"%Rl1)\n",
+ "print(\"Rl2=%f = 2 KOhm(approx)\"%Rl2)\n",
+ "print(\"Re=%f kohm = %.0f ohm\"%(Re,math.ceil(Re*1000)))\n",
+ "print(\"Av1 = %.2f\\nAv2 = %.2f\"%(Av1,Av2))\n",
+ "print(\"Avf = %d\"%Avf)\n",
+ "print(\"Ri_dash = %f K Ohm\"%Ridash)\n",
+ "print(\"Rof_dash=%f K Ohm\"%Rof)\n",
+ "#Though the calculations are same as given in book answers \n",
+ "#do not match with the answers given in the Book."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rl1_dash=0.589286\n",
+ "Rl2=1.806504 = 2 KOhm(approx)\n",
+ "Re=0.095652 kohm = 96 ohm\n",
+ "Av1 = -4.83\n",
+ "Av2 = -82.11\n",
+ "Avf = 80\n",
+ "Ri_dash = 29.462595 K Ohm\n",
+ "Rof_dash=0.405820 K Ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.8 page no-414"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# current series feedack\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Rc1 =3.0\n",
+ "Rc2 =0.500\n",
+ "Re2 = 0.05\n",
+ "Rdash=1.2\n",
+ "Rs = 1.2\n",
+ "hfe = 50.0\n",
+ "hie = 1.1 \n",
+ "hre=0\n",
+ "hre =0\n",
+ "\n",
+ "#Calculations\n",
+ "Ai=-hfe # EmItter follower\n",
+ "Ri2=hie+(1+hfe)*(Re2*Rdash/(Re2+Rdash))\n",
+ "k1=-Rc1/(Rc1+Ri2)\n",
+ "k1=math.ceil(k1*1000)\n",
+ "k1=k1/1000\n",
+ "R=Rs*(Rdash+Re2)/(Rs+(Rdash+Re2))\n",
+ "k2=R/(R+hie)\n",
+ "k2=math.floor(k2*1000)\n",
+ "k2=k2/1000\n",
+ "AI=Ai*k1*k2*hfe\n",
+ "B=Re2/(Re2+Rdash)\n",
+ "D=(1+B*AI)\n",
+ "Adash=AI/(1+B*AI)\n",
+ "Avdash=Adash*Rc2/Rs\n",
+ "Ri=R*hie/(R+hie) # Ri = Input resistance without feedback\n",
+ "Ridash=Ri/D\n",
+ "Rol=Rc2 # RoL =Ro in parallel with RC2 = RC2 and Ro is large\n",
+ "Rldash= Rol*D/D # with feedback considering RL\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print(\"AI=%d\\nBeta=%.2f\\nAi_dash=%.1f\\nAv_dash=%.2f\"%(AI,B,Adash,Avdash))\n",
+ "print(\"Ri=%f K Ohm\\nRl_dash=%.2f K Ohm\"%(Ri,Rldash))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "AI=408\n",
+ "Beta=0.04\n",
+ "Ai_dash=23.6\n",
+ "Av_dash=9.82\n",
+ "Ri=0.393325 K Ohm\n",
+ "Rl_dash=0.50 K Ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.9 page no-423"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# calculation of Avf and Rif for given circuit\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Rc=4.0\n",
+ "Rb=40.0\n",
+ "Rs=10.0\n",
+ "hie=1.1\n",
+ "hfe=50.0\n",
+ "hre=0\n",
+ "hoe=0\n",
+ "\n",
+ "#Calculations\n",
+ "Rcdash=Rc*Rb/(Rc+Rb)\n",
+ "R=Rs*Rb/(Rs+Rb)\n",
+ "Rm=-hfe*Rcdash*R/(R+hie)\n",
+ "Rm=math.floor(Rm)\n",
+ "B=-1/(Rb)\n",
+ "D=1+B*Rm\n",
+ "Rmdash=Rm/D\n",
+ "Avdash=Rmdash/Rs\n",
+ "Ri=R*hie/(R+hie)\n",
+ "Ridash=Ri/D\n",
+ "\n",
+ "#Result\n",
+ "print(\"Transresistance Rm=%d k\"%Rm)\n",
+ "print(\"Beta=%.3f mA/V\\nRm_dash=%dk Ohm\\nAv_dash=%f\\nRi=%f k Ohm\"%(B,Rmdash,Avdash,Ri))\n",
+ "print(\"Ri_dash=%f kOhm\"%Ridash)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Transresistance Rm=-160 k\n",
+ "Beta=-0.025 mA/V\n",
+ "Rm_dash=-32k Ohm\n",
+ "Av_dash=-3.200000\n",
+ "Ri=0.967033 k Ohm\n",
+ "Ri_dash=0.193407 kOhm\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file