summaryrefslogtreecommitdiff
path: root/sample_notebooks/SufiyanSiddique
diff options
context:
space:
mode:
authorTrupti Kini2016-09-21 23:30:25 +0600
committerTrupti Kini2016-09-21 23:30:25 +0600
commita669cf65ee5039c931e66bc7c63d704562d92120 (patch)
treee5a19955ff8249307bb69c5558611a1b4533840f /sample_notebooks/SufiyanSiddique
parent1fbd700d1d6c5e71fb33132af597fabdc0f481f0 (diff)
downloadPython-Textbook-Companions-a669cf65ee5039c931e66bc7c63d704562d92120.tar.gz
Python-Textbook-Companions-a669cf65ee5039c931e66bc7c63d704562d92120.tar.bz2
Python-Textbook-Companions-a669cf65ee5039c931e66bc7c63d704562d92120.zip
Added(A)/Deleted(D) following books
A f_by_df/chapter03_16.ipynb A f_by_df/chapter03_16_1.ipynb A f_by_df/screenshots/1.png A f_by_df/screenshots/2.png A f_by_df/screenshots/3.png A f_by_df/screenshots/image.png A f_by_df/screenshots/image_1.png A f_by_df/screenshots/image_2.png A sample_notebooks/SufiyanSiddique/Chapter2.ipynb A sample_notebooks/chayas/DimensionsSystemUnits.ipynb
Diffstat (limited to 'sample_notebooks/SufiyanSiddique')
-rw-r--r--sample_notebooks/SufiyanSiddique/Chapter2.ipynb257
1 files changed, 257 insertions, 0 deletions
diff --git a/sample_notebooks/SufiyanSiddique/Chapter2.ipynb b/sample_notebooks/SufiyanSiddique/Chapter2.ipynb
new file mode 100644
index 00000000..7a4bda7a
--- /dev/null
+++ b/sample_notebooks/SufiyanSiddique/Chapter2.ipynb
@@ -0,0 +1,257 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 2 : Amplification"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "### Example 6.1, page 92"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 27,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ouput voltage of and amplifier = 15.2 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Initialisation\n",
+ "Ri=1000 #Input Resistance of amplifier in Ohm\n",
+ "Rs=100 #Output Resistance of sensor in Ohm\n",
+ "Rl=50 #Load Resistance\n",
+ "Ro=10 #Output Resistance of amplifier in Ohm\n",
+ "Av=10 #Voltage gain\n",
+ "Vs=2 #Sensor voltage\n",
+ "\n",
+ "#Calculation\n",
+ "Vi=(Ri*Vs)*(Rs+Ri)**-1 #Input Voltage of Amplifier\n",
+ "Vo=Av*Vi*Rl/(Ro+Rl) #Output Voltage of Amplifier\n",
+ "\n",
+ "#Result\n",
+ "print'Ouput voltage of and amplifier = %.1f V'%Vo\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "### Example 6.2, page 93"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Voltage Gain, Av = 8.35\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Initialisation\n",
+ "Vo=15.2 #Output Voltage of Amplifier\n",
+ "Vi=1.82 #Input Voltage of Amplifier\n",
+ "\n",
+ "#Calculation\n",
+ "Av=Vo/Vi #Voltage gain\n",
+ "\n",
+ "#Result\n",
+ "print'Voltage Gain, Av = %.2f'%Av"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "### Example 6.3, page 94"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ouput voltage of and amplifier = 20.0 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Initialisation\n",
+ "Av=10 #Voltage gain\n",
+ "Vi=2 #Input Voltage of Amplifier\n",
+ "Rl=50 #Load Resistance\n",
+ "Ro=0 #Output Resistance of amplifier in Ohm\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "Vo=Av*Vi*Rl/(Ro+Rl) #Output Voltage of Amplifier\n",
+ "\n",
+ "#Result\n",
+ "print'Ouput voltage of and amplifier = %.1f V'%Vo"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "### Example 6.4, page 96"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Output Power, Po = 4.6 W\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Initialisation\n",
+ "Vo=15.2 #Output Voltage\n",
+ "Rl=50 #Load Resistance\n",
+ "\n",
+ "#Calculation \n",
+ "Po=(Vo**2)/Rl #Output Power\n",
+ "\n",
+ "#Result\n",
+ "print'Output Power, Po = %.1f W'%Po"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "### Example 6.5, page 98"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 29,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Power Gain, Ap = 1395\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Initialisation\n",
+ "Vi=1.82 #Input Voltage of Amplifier\n",
+ "Ri=1000 #Input Resistance of amplifier in Ohm\n",
+ "Vo=15.2 #Output Voltage of Amplifier\n",
+ "Rl=50 #Load Resistance\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "Pi=(Vi**2)*Ri**-1 #Input Power in Watt\n",
+ "Po=(Vo**2)*Rl**-1 #Output Power in Watt\n",
+ "Ap=Po*Pi**-1 #Power Gain\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print'Power Gain, Ap = %d'%Ap\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "### Example 6.6, page 99"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 30,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Power Gain (dB) = 31.5 dB\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math \n",
+ "\n",
+ "#Initialisation\n",
+ "P=1400 #Power gain\n",
+ "\n",
+ "#Calculation\n",
+ "pdb=10*math.log10(P) #Power Gain in dB\n",
+ "\n",
+ "#Result\n",
+ "print'Power Gain (dB) = %.1f dB'%pdb\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": []
+ }
+ ],
+ "metadata": {
+ "anaconda-cloud": {},
+ "kernelspec": {
+ "display_name": "Python [Root]",
+ "language": "python",
+ "name": "Python [Root]"
+ },
+ "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.12"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}