summaryrefslogtreecommitdiff
path: root/sample_notebooks/SandeshNaik
diff options
context:
space:
mode:
Diffstat (limited to 'sample_notebooks/SandeshNaik')
-rwxr-xr-xsample_notebooks/SandeshNaik/ch3.ipynb189
1 files changed, 189 insertions, 0 deletions
diff --git a/sample_notebooks/SandeshNaik/ch3.ipynb b/sample_notebooks/SandeshNaik/ch3.ipynb
new file mode 100755
index 00000000..2f2e44d3
--- /dev/null
+++ b/sample_notebooks/SandeshNaik/ch3.ipynb
@@ -0,0 +1,189 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:ab5dad51b8bb4848e05fe479e673fa81caef98b1e0130b3768c6e1580871f987"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 3: Negative Feedback"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.1, Page 75"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Aol=200;\n",
+ "f2_ol=10000; # in Hz\n",
+ "B=0.04;\n",
+ "\n",
+ "#Calculations&Results\n",
+ "Asp=Aol/(1+B*Aol);\n",
+ "print \"Asp %.2f \\n \"%Asp; #Result\n",
+ "print \"Approximately Asp =1/B equal to %.0f \\n\"%(1/B);#result\n",
+ "S=Aol/Asp;\n",
+ "print \"S =%.0f \\n\"%S;\n",
+ "f2_sp=f2_ol*S;\n",
+ "print \"f2_sp %.0f Hz\"%f2_sp; #Result"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Asp 22.22 \n",
+ " \n",
+ "Approximately Asp =1/B equal to 25 \n",
+ "\n",
+ "S =9 \n",
+ "\n",
+ "f2_sp 90000 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.2, Page 76"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Asp1=20.\n",
+ "Asp=10**(Asp1/20);\n",
+ "\n",
+ "#Calculations&Results\n",
+ "print \"Asp =%.0f\\n\"%Asp;#Result\n",
+ "#Rf/Ri=Asp-1;\n",
+ "print \"Rf/Ri=%.0f \\n\"%(Asp-1);#Result\n",
+ "print \"Rf must be 9 times larger than Ri. \\n There are many possibilities \";#Result"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Asp =10\n",
+ "\n",
+ "Rf/Ri=9 \n",
+ "\n",
+ "Rf must be 9 times larger than Ri. \n",
+ " There are many possibilities \n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.3, Page 82"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Zin_ol=300*10**3; #in Ohms\n",
+ "Zout=100; #in Ohms\n",
+ "Aol=50000.;\n",
+ "Zout_ol=100.;\n",
+ "Asp=100;\n",
+ "\n",
+ "#Calculations&Results\n",
+ "S=Aol/Asp;\n",
+ "print \"S = %.0f\"%S;#Result\n",
+ "Zin_sp=S*Zin_ol;\n",
+ "print \"Zin_sp = %.0f Ohm\"%Zin_sp;#Result\n",
+ "Zout_sp=Zout_ol/S;\n",
+ "print \"Zout_sp = %.1f Ohm\"%Zout_sp;#Result\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "S = 500\n",
+ "Zin_sp = 150000000 Ohm\n",
+ "Zout_sp = 0.2 Ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.4, Page 88"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "R1=9000; # in Ohm\n",
+ "R2=1000.; #in Ohm\n",
+ "\n",
+ "#Calculations&Results\n",
+ "B=R2/(R1+R2);\n",
+ "print \"B is %.2f\\n\"%B;#Result\n",
+ "#Aps=1/B;\n",
+ "Aps=(R1+R2)/R2;\n",
+ "print \"Aps = %.0f \\n \"%Aps;#Result"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "B is 0.10\n",
+ "\n",
+ "Aps = 10 \n",
+ " \n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file