summaryrefslogtreecommitdiff
path: root/sample_notebooks/Vedantam Lakshmi Manasa/Mathematical_Foundation.ipynb
blob: a514cecbc386288a127b95134a246c59493a8c24 (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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter 17:Advanced Electdrical Controls For Fluid Power Systems"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Example 17.1 pgno:610"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "  Results:  \n",
      "\n",
      " The repeatable error of system is  in. 0.00138\n"
     ]
    }
   ],
   "source": [
    "# Aim:To determine the system accuracy of electrohydraulic servo system\n",
    "# Given:\n",
    "# servo valve gain:\n",
    "G_SV=0.15; #(in^3/s)/mA\n",
    "# cylinder gain:\n",
    "G_cyl=0.20; #in/in^3\n",
    "# feedback transducer gain:\n",
    "H=4; #V/in\n",
    "# weight of load:\n",
    "W=1000; #lb\n",
    "# mass of load:\n",
    "M=2.59; #lb.(s^2)/in\n",
    "# volume of oil under compression:\n",
    "V=50; #in^3\n",
    "# system deadband:\n",
    "SD=4; #mA\n",
    "# bulk modulus of oil:\n",
    "beta1=175000; #lb/in^2\n",
    "# cylinder piston area:\n",
    "A=5; #in^2# Solutions:\n",
    "# natural frequency of the oil,\n",
    "om_H=A*(((2*beta1)/(V*M))**0.5); #rad/s\n",
    "# value of open-loop gain,\n",
    "open_loop=om_H/3; #/s\n",
    "# amplifier gain,\n",
    "G_A=open_loop/(G_SV*G_cyl*H); #mA/V\n",
    "# repeatable error,\n",
    "RE=SD/(G_A*H); #in\n",
    "\n",
    "# Results:\n",
    "print\"\\n  Results:  \"\n",
    "print\"\\n The repeatable error of system is  in.\",round(RE,5)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 17.2 pgno:610"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "  Results:  \n",
      "\n",
      " The repeatable error of system is  cm. 0.00352\n"
     ]
    }
   ],
   "source": [
    "# Aim:To determine the system accuracy of in SI units\n",
    "# Given:\n",
    "# servo valve gain:\n",
    "G_SV=2.46; #(cm**3/s)/mA\n",
    "# cylinder gain:\n",
    "G_cyl=0.031; #cm/cm**3\n",
    "# feedback transducer gain:\n",
    "H=4; #V/cm\n",
    "# mass of load:\n",
    "M=450; #kg\n",
    "# volume of oil:\n",
    "V=819; #cm**3\n",
    "# system deadband:\n",
    "SD=4; #mA\n",
    "# bulk modulus of oil:\n",
    "beta1=1200; #MPa\n",
    "# cylinder piston area:\n",
    "A=32.3; #cm**2\n",
    "from math import ceil\n",
    "# Solutions:\n",
    "# natural frequency of the oil,\n",
    "om_H=(A*10**-4)*(((2*beta1*10**6)/(V*10**-6*M))**0.5); #rad/s\n",
    "# value of open-loop gain,\n",
    "open_loop=om_H/3; #/s\n",
    "# amplifier gain,\n",
    "G_A=open_loop/(G_SV*G_cyl*H); #mA/V\n",
    "# repeatable error,\n",
    "RE=SD/(G_A*H); #cm\n",
    "# rounding off the above answer,\n",
    "RE=round(RE)+(round(ceil((RE-round(RE))*100000))/100000); #cm\n",
    "\n",
    "# Results:\n",
    "print\"\\n  Results:  \"\n",
    "print\"\\n The repeatable error of system is  cm.\",RE"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Chapter 17.3 pgno:612"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "  Results:  \n",
      "\n",
      " The tracking error of system is  in. 0.104\n",
      "\n",
      " The tracking error of system in SI Unit is  cm. 0.264\n"
     ]
    }
   ],
   "source": [
    "# Aim:Refer Example 14-3 for Problem Description\n",
    "# Given:\n",
    "# servo valve current saturation:\n",
    "I=300.; #mA\n",
    "# amplifier gain:\n",
    "G_A=724.; #mA/V\n",
    "# feedback transducer gain:\n",
    "H=4.; #V/in\n",
    "# feedback transducer gain in metric units\n",
    "H1=1.57; #V/cm# Solutions:\n",
    "# tracking error,\n",
    "TE=I/(G_A*H); #in\n",
    "# tracking error,\n",
    "TE1=I/(G_A*H1); #cm\n",
    "\n",
    "# Results:\n",
    "print\"\\n  Results:  \"\n",
    "print\"\\n The tracking error of system is  in.\",round(TE,3)\n",
    "print\"\\n The tracking error of system in SI Unit is  cm.\",round(TE1,3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "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.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}