summaryrefslogtreecommitdiff
path: root/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.k.Rajput5.ipynb
blob: 8895e3429e5ea650ac721bafe494b6827b5cd8f1 (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
{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#Chapter 5:Digital Instruments"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 5.1,Page No:338"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "frequency of the of the system = 4500.00\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "\n",
    "#variable declaration\n",
    "N   = 45;      #reading \n",
    "t   = 10*10**-3;      #Gated period in ms\n",
    "\n",
    "#calculations\n",
    "f  = N/float(t);\n",
    "\n",
    "#result\n",
    "print'frequency of the of the system = %3.2f'%f,'Hz';"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 5.2,Page No:339"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Resolution 0.0010\n",
      "Resolution for full scale range of 10V = 0.01 V\n",
      "possible error  = 0.015 V\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "\n",
    "#variable declaration\n",
    "n     = 3;      #number of full digits on 3 1/2 digit display \n",
    "fs    = 1;      #voltage in V\n",
    "fs1   = 10;     #voltage in V\n",
    "r     = 2;      #voltage reading in V\n",
    "fs3   = 5;\n",
    "\n",
    "#calculation\n",
    "R    = 1/float((10)**n);        #resolution\n",
    "R1   = R*fs;                    #resolution for full scale range of 1V\n",
    "R2   = fs1*R;                    #resolution for full scale range of 10V\n",
    "LSD   =fs3*R;                         #digit in the least siginificant digit in V\n",
    "e    = (((0.5)/float(100))*(r))+LSD;     #total possible error in V\n",
    "\n",
    "#result\n",
    "print'Resolution %3.4f'%R;\n",
    "print'Resolution for full scale range of 10V = %3.2f'%R2,'V';\n",
    "print'possible error  = %3.3f'%e,'V';\n",
    "\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example 5.3,Page No:340"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Resolution = 0.0001 \n",
      "There are 5 digit faces in 4 1/2 digt display ,so 16.95 would be displayed as 16.950\n",
      "Resolution = 0.0001 \n",
      "Hence 0.6564 will be displayed as 0.6564\n",
      "Resolution = 0.0010 \n",
      "Hence 0.6564 will be displayed as 0.656\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "\n",
    "#variable declaration\n",
    "n   = 4;     #numberof full digits \n",
    "fs  = 1;     #full scale range of 1V\n",
    "fs  = 1;     #full scale range of 10V\n",
    "\n",
    "\n",
    "#calculation\n",
    "R    = 1/float((10)**n);    #resolution\n",
    "R1    = fs*R;      #resolution on 1V in V\n",
    "R2    = fs1*R;      #resolution on 10V in V\n",
    "\n",
    "\n",
    "#result\n",
    "print'Resolution = %3.4f '%R;\n",
    "print'There are 5 digit faces in 4 1/2 digt display ,so 16.95 would be displayed as 16.950';\n",
    "print'Resolution = %3.4f '%R1;\n",
    "print'Hence 0.6564 will be displayed as 0.6564';\n",
    "print'Resolution = %3.4f '%R2;\n",
    "print'Hence 0.6564 will be displayed as 0.656';\n"
   ]
  }
 ],
 "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.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}