summaryrefslogtreecommitdiff
path: root/Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter16.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter16.ipynb')
-rw-r--r--Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter16.ipynb215
1 files changed, 215 insertions, 0 deletions
diff --git a/Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter16.ipynb b/Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter16.ipynb
new file mode 100644
index 00000000..7a471548
--- /dev/null
+++ b/Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter16.ipynb
@@ -0,0 +1,215 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 16: Power in AC Circuits"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16.1, Page 329"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a) Apparent power, S = 250 VA\n",
+ "(b) Power Factor = 0.866\n",
+ "(c) Active Power, P = 216.5\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Initialisation\n",
+ "V=50 #Voltage\n",
+ "I=5 #Current in Ampere r.m.s\n",
+ "phase=30 #in degrees\n",
+ "\n",
+ "#Calculation \n",
+ "S=V*I #apparent power\n",
+ "pf=math.cos(phase*math.pi/180) #power factor\n",
+ "apf=S*pf #active power\n",
+ "\n",
+ "#Result\n",
+ "print'(a) Apparent power, S = %d VA'%S\n",
+ "print'(b) Power Factor = %.3f'%pf\n",
+ "print'(c) Active Power, P = %.1f'%apf"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16.2, Page 331"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " Apparent Power, P = 2000 W\n",
+ " Active Power, P = 1500 W\n",
+ " Reactive Power, Q = 1322 var\n",
+ " Current I = 8.33 A\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Initialisation\n",
+ "pf=0.75 #power factor\n",
+ "S=2000 #apparent power in VA\n",
+ "V=240 #Voltage in volts\n",
+ "\n",
+ "#Calculation \n",
+ "apf=S*pf #active power\n",
+ "sin=math.sqrt(1-(pf**2)) \n",
+ "Q=S*sin #Reactive Power\n",
+ "I=S*V**-1 #Current\n",
+ "#Result\n",
+ "print' Apparent Power, P = %d W'%S\n",
+ "print' Active Power, P = %d W'%apf\n",
+ "print' Reactive Power, Q = %d var'%Q\n",
+ "print' Current I = %.2f A'%I"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16.3, Page 333"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " Apparent Power, S = 1500 W\n",
+ " Active Power, P = 1500 W\n",
+ " Reactive Power, Q = 1322 var\n",
+ " Current I = 6.25 A\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Initialisation\n",
+ "pf=0.75 #power factor\n",
+ "S=1500 #apparent power in W\n",
+ "V=240 #Voltage in volts\n",
+ "P1 = 2000 #apparent power\n",
+ "P2 = 1500 #active power\n",
+ "Q = 1322 #reactive power\n",
+ "I = 8.33 #current in amp\n",
+ "f=50 #frequency in hertz\n",
+ "\n",
+ "#Calculation \n",
+ "Xc=V**2/Q #reactive capacitance\n",
+ "C=1/(Xc*2*math.pi*f) #capacitance\n",
+ "I=S*V**-1 #current\n",
+ "\n",
+ "#Result\n",
+ "print' Apparent Power, S = %d W'%S\n",
+ "print' Active Power, P = %d W'%apf\n",
+ "print' Reactive Power, Q = %d var'%Q\n",
+ "print' Current I = %.2f A'%I"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16.4, Page 335"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Zl = (50+20j)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#Initialisation\n",
+ "Zo=complex(50,-20) #complex form of output impedance\n",
+ "\n",
+ "#Calculation \n",
+ "Zl=np.conjugate(Zo) #complex form of Load impedance\n",
+ "\n",
+ "#Result\n",
+ "print'Zl = %s'%Zl"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+ "source": []
+ }
+ ],
+ "metadata": {
+ "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
+}