diff options
Diffstat (limited to 'Basic_Electronics_and_Linear_Circuits/ch2.ipynb')
-rw-r--r-- | Basic_Electronics_and_Linear_Circuits/ch2.ipynb | 157 |
1 files changed, 157 insertions, 0 deletions
diff --git a/Basic_Electronics_and_Linear_Circuits/ch2.ipynb b/Basic_Electronics_and_Linear_Circuits/ch2.ipynb new file mode 100644 index 00000000..ea7aa645 --- /dev/null +++ b/Basic_Electronics_and_Linear_Circuits/ch2.ipynb @@ -0,0 +1,157 @@ +{
+ "metadata": {
+ "name": "ch2"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 2:Current and Voltage Source"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.1 Page no.39"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Example 2.1\n",
+ "# Obtain Equivalent Current Source Representaion from Given Voltage Source Representation in fig 2.16\n",
+ "\n",
+ "#Voltage Source or Thevenin's Representaion (Series Voltage Source & Resistor\n",
+ "Vs=2 #V open circuit voltage\n",
+ "Rs=1 #ohm . internal impedence\n",
+ "#Current Source or Norton's Representaion (Parallel Current Source & Resistor\n",
+ "Is=Vs/Rs #Ampere, short circuit current\n",
+ "#result\n",
+ "print \"The Short Circuit Current Value is \",Is,\"A\"\n",
+ "print \"The Source Impedence Value is \",Rs,\"ohm\"\n",
+ "print \"The Current Source & Source Impedance are connected in Parallel.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.2 Page no.40"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Example 2.2\n",
+ "# Obtain Equivalent Voltage Source Representaion from Given Current Source Representation\n",
+ "\n",
+ "#Current Source or Norton's Representaion (Parallel Current Source & Resistor)\n",
+ "Is=0.2 #Amperes\n",
+ "Zs=100 #Ohms\n",
+ "#Voltage Source or Thevenin's Representaion (Series Voltage Source & Resistor)\n",
+ "Vs=Is*Zs #Volts\n",
+ "# Results \n",
+ "print \"The Open Circuit Voltage is \",Vs,\"V\"\n",
+ "print \"The Source Impedence Value is \",Zs,\"ohm\"\n",
+ "print \"The Voltage Source & Source Impedance are connected in Series.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.3 Page no.40"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Example 2.3\n",
+ "#Program to Calculate Current in a Branch by Using Current Source Representation \n",
+ "#Verify the Circuit's Result for its equivalence with Voltage Source Representation\n",
+ "\n",
+ "#Given Circuit Data\n",
+ "Is=1.5*10**(-3) #Amperes ,source current\n",
+ "Zs=2000 #Ohms, resistance connected to the loads\n",
+ "Z1=10000 #Ohms , load resistance 1\n",
+ "Z2=40000 #Ohms load resistance 2\n",
+ "#Calculation for Current Source Representation\n",
+ "Zl=Z1*Z2/(Z1+Z2)\n",
+ "I2=Is*Zs/(Zs+Zl)\n",
+ "I4I=I2*Z1/(Z1+Z2) #Using Current Divider Rule\n",
+ "\n",
+ "#Calculation for Current Source Representation\n",
+ "Vs=Is*Zs #Open Circuit Volatge\n",
+ "I=Vs/(Zs+Zl)\n",
+ "I4V=I*Z1/(Z1+Z2) #Using Current Divider Rule\n",
+ "# Results \n",
+ "print \"The Load Current using Current Source Representaion is I4I = \",I4I,\"A\"\n",
+ "print \"The Load Current using Voltage Source Representaion is I4V = \",I4V,\"A\"\n",
+ "print \"I4I==I4V so\"\n",
+ "print \" Both Results are same.\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.4 Page no.45"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Example 2.4\n",
+ "# Obtain Output Voltage Vo from Given A.C. Equivalent of an Amplifier using a Transistor\n",
+ "\n",
+ "#Given Circuit Data\n",
+ "#Input Side\n",
+ "Vs=0.01 #V ,dc voltage\n",
+ "Rs=1000 # ohm, resistance\n",
+ "#Output Side resistance\n",
+ "Ro1=20000 #ohm, 20 kOhms\n",
+ "Ro2=2000 # Ohms\n",
+ "\n",
+ "#Calculation\n",
+ "i=Vs/Rs #Input Current\n",
+ "Io=100*i #Output Current\n",
+ "Il=Io*Ro1/(Ro1+Ro2) #Using Current Divider Rule\n",
+ "Vo=Il*Ro2 #Output Volatge\n",
+ "\n",
+ "# Result\n",
+ "print \"The Output Voltage Vo = \",round(Vo,3),\"V\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file |