summaryrefslogtreecommitdiff
path: root/Electronic_Instrumentation_and_Measurements/Chapter6.ipynb
blob: 82ed6e02f60d3251456b24780718b9a1f3a4a221 (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
{
 "metadata": {
  "name": "",
  "signature": "sha256:3cc9d2c4c0d6a493cdaa2dbc9383ef800411a8ab69ddf373e977319372599f8f"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter6 - Digital Frequency Meter"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6.17.1 - page6-26"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Desired gate time\n",
      "#Given data :\n",
      "r=0.1         #in Hz\n",
      "D=1/r         #in seconds\n",
      "print \"The desired gate time, D = \", D,\" seconds\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The desired gate time, D =  10.0  seconds\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6.17.2 - page6-27"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Error in measurement\n",
      "f1=1.0 # in Mhz\n",
      "f2=200.0 #in kHz\n",
      "per=(200*10**-3)*100 # percentage error that printlay may indicate 4 micro seconds or 6 micro seconds\n",
      "per1=(1/50.0)*100 #percentage error after 10 times improvement\n",
      "print \"Display may indicate 4 us or 6 us, percentage error is \", per,\" %\"\n",
      "print \"Percentage error after 10 times improvement is \", per1,\" %\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Display may indicate 4 us or 6 us, percentage error is  20.0  %\n",
        "Percentage error after 10 times improvement is  2.0  %\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6.17.3 - page6-27"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#  Measurement Accuracy\n",
      "#Given data :\n",
      "f=400.0         #Hz\n",
      "time_accuracy=10**-8         # seconds\n",
      "display_accuracy=1         #(+ve or -Ve)\n",
      "t=10         # seconds\n",
      "period=1/f*10**3          #ms\n",
      "Accuracy= 1+((period)/10)         #ms\n",
      "print \"accuracy is \u00b1\",Accuracy,\" ms\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "accuracy is \u00b1 1.25  ms\n"
       ]
      }
     ],
     "prompt_number": 7
    }
   ],
   "metadata": {}
  }
 ]
}