summaryrefslogtreecommitdiff
path: root/Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter2.ipynb
blob: 0ae95a48738aac81d030ba763f805e773a32ad60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
{

 "metadata": {

  "name": "",

  "signature": "sha256:9248ce0e9925b4b2a2db19b4a563a9dcd0c2615021a9c00f051f93b7c452821b"

 },

 "nbformat": 3,

 "nbformat_minor": 0,

 "worksheets": [

  {

   "cells": [

    {

     "cell_type": "heading",

     "level": 1,

     "metadata": {},

     "source": [

      "Chapter02:Operational Amplifiers"

     ]

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex2.1:pg-72"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "# Example 2.1 : Closed loop and open loop gain\n",

      "# Consider inverting configuration\n",

      "\n",

      "# 2.1a\n",

      "R_1=1000.0; # (ohm)\n",

      "R_2=100*10.0**3; # (ohm)\n",

      "A=10**3; # (V/V)\n",

      "print A,\"= A (V/V)\"\n",

      "G=-R_2/R_1/(1+(1+R_2/R_1)/A);\n",

      "print round(-G,2),\"= G\"\n",

      "e=(-G-(R_2/R_1))/(R_2/R_1)*100;\n",

      "print round(e,2),\"= e (%)\"\n",

      "v_1=0.1; # (V)\n",

      "v_1=G*v_1/A;\n",

      "print round(v_1*1000,2),\"= v_1 (mV)\"\n",

      "A=10**4; # (V/V)\n",

      "print A,\"= A (V/V)\"\n",

      "G=-R_2/R_1/(1+(1+R_2/R_1)/A);\n",

      "print round(-G,2),\"= G\"\n",

      "e=(-G-(R_2/R_1))/(R_2/R_1)*100;\n",

      "print round(e,2),\"= e (%)\"\n",

      "v_1=0.1; # (V)\n",

      "v_1=G*v_1/A;\n",

      "print round(v_1*1000,3),\"= v_1 (mV)\"\n",

      "A=10**5; # (V/V)\n",

      "print A,\"= A (V/V)\"\n",

      "G=-R_2/R_1/(1+(1+R_2/R_1)/A);\n",

      "print round(-G,2),\"= G\"\n",

      "e=(-G-(R_2/R_1))/(R_2/R_1)*100;\n",

      "print round(e,2),\"= e (%)\"\n",

      "v_1=0.1; # (V)\n",

      "v_1=G*v_1/A;\n",

      "print round(v_1*1000,3),\"= v_1 (mV)\"\n",

      "\n",

      "# 2.1b\n",

      "A=50000; # (V/V)\n",

      "print A,\"= A (V/V)\"\n",

      "G=-R_2/R_1/(1+(1+R_2/R_1)/A);\n",

      "print round(-G,2),\"= G\"\n",

      "print \"Thus a -50% change in the open loop gain results in only -0.1% in the closed loop gain\""

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "1000 = A (V/V)\n",

        "90.83 = G\n",

        "-9.17 = e (%)\n",

        "-9.08 = v_1 (mV)\n",

        "10000 = A (V/V)\n",

        "99.0 = G\n",

        "-1.0 = e (%)\n",

        "-0.99 = v_1 (mV)\n",

        "100000 = A (V/V)\n",

        "99.9 = G\n",

        "-0.1 = e (%)\n",

        "-0.1 = v_1 (mV)\n",

        "50000 = A (V/V)\n",

        "99.8 = G\n",

        "Thus a -50% change in the open loop gain results in only -0.1% in the closed loop gain\n"

       ]

      }

     ],

     "prompt_number": 6

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex2.3:pg-88"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "# Example 2.3 : Design instrumentation amplifier\n",

      "R_2=1-50000-1/1000.0+50;\n",

      "print round(-R_2/1000.0,1),\"= R_2 (Kohm)\"\n",

      "R_1=-2*R_2/999;\n",

      "print round(R_1),\"= R_1 (ohm)\""

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "49.9 = R_2 (Kohm)\n",

        "100.0 = R_1 (ohm)\n"

       ]

      }

     ],

     "prompt_number": 10

    }

   ],

   "metadata": {}

  }

 ]

}