summaryrefslogtreecommitdiff
path: root/Electrical_Network_by_R._Singh/Chapter10.ipynb
blob: 6306573f1ea5d468d4fd84a9175440936fe9b0ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
{
 "metadata": {
  "name": "",
  "signature": "sha256:9cb18a31e319c2d8b43a0064401876d651a2153725c525211c52ac1687dd288c"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter10-Network Functions"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex35-pg10.35"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "## Network Functions : example 10.35 : (pg 10.35)\n",
      "import math\n",
      "m=(2./(math.sqrt(2.)*math.sqrt(10.)));\n",
      "a=90.;\n",
      "x=(a-math.atan(3.)*57.3-math.atan(1)*57.3);\n",
      "print(\"\\nF(s) =(4s/s^2+2s+2) = 4s/(s+1-j)*(s+1-j)\");\n",
      "print(\"\\n At s=j2\");\n",
      "##pmag = phasor magnitudes\n",
      "print(\"\\n|F(j2)|=Product of pmag from all zeros to j2/Product of pmag from all poles to j2\");\n",
      "print\"%s %.2f %s\"%(\"\\n = \",m,\"\");\n",
      "print\"%s %.2f %s\"%(\"\\nf(w) = atand(2/0)-atand(3)-atand(1)= \",x,\" degrees\");"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        "F(s) =(4s/s^2+2s+2) = 4s/(s+1-j)*(s+1-j)\n",
        "\n",
        " At s=j2\n",
        "\n",
        "|F(j2)|=Product of pmag from all zeros to j2/Product of pmag from all poles to j2\n",
        "\n",
        " =  0.45 \n",
        "\n",
        "f(w) = atand(2/0)-atand(3)-atand(1)=  -26.57  degrees\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex36-pg10.35"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "## Network Functions : example 10.36 : (pg 10.35 & 10.36)\n",
      "\n",
      "import math\n",
      "m=((5.*math.sqrt(17.))/(math.sqrt(20.)*4.));\n",
      "a=90.;\n",
      "w=(math.atan(4.)*57.3+math.atan(4/3.)*57.3-(a)-math.atan(4/2.)*57.3);\n",
      "print(\"\\nF(s) = (s+1)(s+3)/s(s+2))\");\n",
      "print(\"\\nAt s=j4\");\n",
      "##vmag = vector magnitudes\n",
      "print(\"\\nPrduct of vmag from all zeros to j4/ Product of vmag from all poles to j4\");\n",
      "print\"%s %.2f %s\"%(\"\\n =\",m,\"\");\n",
      "print(\"\\nphi(w)= atand(4)+atand(4/3)-atand(4/0)-atand(4/2)\");\n",
      "print\"%s %.2f %s\"%(\"\\n = \",w,\" degrees\");"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        "F(s) = (s+1)(s+3)/s(s+2))\n",
        "\n",
        "At s=j4\n",
        "\n",
        "Prduct of vmag from all zeros to j4/ Product of vmag from all poles to j4\n",
        "\n",
        " = 1.15 \n",
        "\n",
        "phi(w)= atand(4)+atand(4/3)-atand(4/0)-atand(4/2)\n",
        "\n",
        " =  -24.34  degrees\n"
       ]
      }
     ],
     "prompt_number": 2
    }
   ],
   "metadata": {}
  }
 ]
}