summaryrefslogtreecommitdiff
path: root/Industrial_Instrumentation_by_K_Krishnaswamy_And_S_Vijayachitra/1-Temperature.ipynb
blob: c55f88b2e949819551232991e9ec44dcf33fdb23 (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
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
{
"cells": [
 {
		   "cell_type": "markdown",
	   "metadata": {},
	   "source": [
       "# Chapter 1: Temperature"
	   ]
	},
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.1: Temperature_Conversion.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// Example 1.1, page no-53\n",
"clear\n",
"clc\n",
"\n",
"c=-40\n",
"k=c+273\n",
"printf('\nK=%d°K', k)\n",
"F=((9/5)*c)+32\n",
"printf('\nF=%d°F',F)\n",
"R=((9/5)*c)+492\n",
"printf('\nR=%d°R',R)"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.2: percentage_Accuracy_and_Error.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// Example 1.2, page no-53\n",
"clear\n",
"clc\n",
"\n",
"span=1000\n",
"accuracy=1/100\n",
"err=span*accuracy\n",
"printf('(a)\nAs error can be either positive or negative ,\n the probable error at any point on the scale = %d°C',err)\n",
"max_scale=1200\n",
"Range_instr=max_scale+span\n",
"printf('\n(b)\nRange of the Instrument = %d°C',Range_instr)\n",
"meter_reading=700\n",
"per_of_err=(err/meter_reading)*100\n",
"printf('\n(c)\nPercentage of Error = ± %.2f%% ',per_of_err)"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.3: Two_wire_RTD.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// Example 1.3, page no-54\n",
"clear\n",
"clc\n",
"resi_per_leg=5\n",
"temp_coeff=0.385\n",
"R_due_to_leadwires=2*resi_per_leg\n",
"err=R_due_to_leadwires/temp_coeff\n",
"err=ceil(err)\n",
"printf('(a)\nThe contribution of 10 ohms lead wire resistance \nto the measurement error = %d°C',err)\n",
"temp_obj=200\n",
"temp_measured=temp_obj+err\n",
"per_of_err=((temp_measured-temp_obj)/temp_obj)*100\n",
"printf('\n(b)\nPercentage of Error = %d%%',per_of_err)"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.4: Thermocouple_temperature_measurement.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// Example 1.4, page no-54\n",
"clear\n",
"clc\n",
"\n",
"temp=2.022\n",
"millivolt_cor=37.325\n",
"op=millivolt_cor-temp\n",
"printf('Millivolt output available=% .3f',op)"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.5: Hot_junction_temperature_of_thermocouple.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// Example 1.5, page no-54\n",
"clear\n",
"clc\n",
"millivolt_cor=2.585\n",
"pot_reading=30.511\n",
"corrected_millivolt=pot_reading+millivolt_cor\n",
"printf('Temperature correspond to %.3f mV from the table = 600°C',corrected_millivolt)"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.6: Caliberation_of_an_instrument.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// Example 1.6, page no-54\n",
"clear\n",
"clc\n",
"ref_jun=100\n",
"mV_100=0.645\n",
"mV_1000=9.585\n",
"mV_1200=11.947\n",
"op1=mV_1000-mV_100\n",
"op2=mV_1200-mV_100\n",
"printf('Millivolt to be fed checking 1000 C = %.3f mV',op1)\n",
"printf('\nMillivolt to be fed checking 1200 C = %.3f mV',op2)"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.7: Wall_temperature_measurement.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// Example 1.7, page no-55\n",
"clear\n",
"clc\n",
"E_rec_pyro=0.95*0.85\n",
"T=1100/E_rec_pyro\n",
"printf('Pyrometer reading T = %.2f°C',T)"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.8: Thermocouple_output.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// Example 1.8, page no-55\n",
"clear\n",
"clc\n",
"//(a)\n",
"hot1_mV=41.29\n",
"cold1_mV=2.022\n",
"op1=hot1_mV-cold1_mV\n",
"\n",
"//(b)\n",
"hot2_mV=33.096\n",
"cold2_mV=2.585\n",
"op2=hot2_mV-cold2_mV\n",
"\n",
"//(c)\n",
"hot3_mV=11.947\n",
"cold3_mV=0.299\n",
"op3=hot3_mV-cold3_mV\n",
"\n",
"printf('(a)\nOutput Millivolt = %.3f',op1)\n",
"printf('\n(b)\nOutput Millivolt = %.3f',op2)\n",
"printf('\n(c)\nAs the wrongly formed thermocouples at J1 and J2 will always oppose\n the main millivolt output, the net output will be lower than normal value.\nOutput mV<%.3f',op3)"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.9: electtronic_temperature_transmitter.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// Example 1.9, page no-56\n",
"clear\n",
"clc\n",
"\n",
"Rl_ind=250\n",
"Rl_rec=250\n",
"load_connected= Rl_ind+Rl_rec\n",
"load_allowable=600\n",
"max_load_controller=load_allowable-load_connected\n",
"printf('(a)\nThe max load to the controller = %d ohms',max_load_controller)\n",
"\n",
"op_cont=600\n",
"total=Rl_ind+Rl_rec+load_allowable\n",
"extra_load=total-op_cont\n",
"printf('\n(b)\nExtra Load = %d ohms',extra_load)\n",
"\n",
"printf('\nAdditional Power Supply voltage required=10 V')\n",
"\n",
"printf('\nMinimum Power Supply Voltage=34 ')"
   ]
   }
],
"metadata": {
		  "kernelspec": {
		   "display_name": "Scilab",
		   "language": "scilab",
		   "name": "scilab"
		  },
		  "language_info": {
		   "file_extension": ".sce",
		   "help_links": [
			{
			 "text": "MetaKernel Magics",
			 "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
			}
		   ],
		   "mimetype": "text/x-octave",
		   "name": "scilab",
		   "version": "0.7.1"
		  }
		 },
		 "nbformat": 4,
		 "nbformat_minor": 0
}