summaryrefslogtreecommitdiff
path: root/Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter2.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter2.ipynb')
-rwxr-xr-xMicroelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter2.ipynb135
1 files changed, 135 insertions, 0 deletions
diff --git a/Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter2.ipynb b/Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter2.ipynb
new file mode 100755
index 00000000..0ae95a48
--- /dev/null
+++ b/Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter2.ipynb
@@ -0,0 +1,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": {}
+ }
+ ]
+} \ No newline at end of file