Você está na página 1de 131

M

Scilab Textbook Companion for


A Course In Mechanical Measurements And
Instrumentation
by A. K. Sawhney And P. Sawhney1
Created by
Parul
Instrumentation
Electrical Engineering
Thapar University
College Teacher
Dr. Sunil K Singla
Cross-Checked by

September 23, 2015

1 Funded

by a grant from the National Mission on Education through ICT,


http://spoken-tutorial.org/NMEICT-Intro. This Textbook Companion and Scilab
codes written in it can be downloaded from the Textbook Companion Project
section at the website http://scilab.in

Book Description
Title: A Course In Mechanical Measurements And Instrumentation
Author: A. K. Sawhney And P. Sawhney
Publisher: Dhanpat Rai, New Delhi
Edition: 12
Year: 2001
ISBN: 8177000233

Scilab numbering policy used in this document and the relation to the
above book.
Exa Example (Solved example)
Eqn Equation (Particular equation of the above book)
AP Appendix to Example(Scilab Code that is an Appednix to a particular
Example of the above book)
For example, Exa 3.51 means solved example 3.51 of this book. Sec 2.3 means
a scilab code whose theory is explained in Section 2.3 of the book.

Contents
List of Scilab Codes

2 Static Characteristics of Instruments and Measurement systems

3 Errors in Measurements and Their Statistical Analysis

19

4 Dynamic Characteristics of Instruments and Measurement


systems
44
5 Primary Sensing Elements and Transducers

56

6 Signal Conditioning

83

7 Display Devices and recorders

100

8 Metrology

106

9 Pressure Measurements

111

List of Scilab Codes


Exa 2.1
Exa 2.2
Exa 2.3
Exa 2.4
Exa 2.5

Exa
Exa
Exa
Exa

2.6
2.7
2.8
2.9

Exa 2.10
Exa 2.12
Exa 2.13
Exa 2.14
Exa 2.15
Exa 2.16
Exa 2.17
Exa 2.18

calculating static error and static correction . . . . . .


calculating true value of the temperature . . . . . . .
calculating Relative error expressed as a percentage of f
sd. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
calculating static error and static correction . . . . . .
calculating maximum static error Span of the thermometer degree C Accuracy of the thermometer in terms of
percentage of span . . . . . . . . . . . . . . . . . . . .
calculating the pressure for a dial reading of 100 . . .
calculating the noise output voltage of the amplifier .
calculating the noise voltage . . . . . . . . . . . . . . .
calculating the signal to noise ratio at input calculating
the signal to noise ratio at output calculating the noise
factor and noise figure . . . . . . . . . . . . . . . . . .
calculating the ratio of output signal to noise signal . .
calculating the average force and range of error . . . .
calculating the sum of resistances connected in series
with uncertainity of one unit . . . . . . . . . . . . . .
calculating the power with uncertainity of one unit in
voltage and current . . . . . . . . . . . . . . . . . . .
calculating the sum of resistances connected in series
with appropriate number of significant figure . . . . .
calculating the voltage drop with appropriate number
of significant figure . . . . . . . . . . . . . . . . . . . .
calculating the sensitivity and deflection factor of wheatstone bridge . . . . . . . . . . . . . . . . . . . . . . .
calculating the volume of the mercury thermometer . .

5
5
6
6

7
7
8
8

9
10
10
11
11
12
12
13
13

Exa 2.19
Exa
Exa
Exa
Exa

2.20
2.22
2.23
2.24

Exa 2.25
Exa 2.26
Exa 2.27
Exa 2.28
Exa
Exa
Exa
Exa
Exa
Exa

2.29
3.1
3.2
3.3
3.4
3.5

Exa 3.6
Exa 3.7
Exa 3.8
Exa 3.9
Exa
Exa
Exa
Exa

3.10
3.11
3.12
3.13

Exa 3.14
Exa 3.15
Exa 3.16
Exa 3.17
Exa 3.18

calculating the maximum position deviation resistance


deviation . . . . . . . . . . . . . . . . . . . . . . . . .
calculating the dead zone . . . . . . . . . . . . . . . .
calculating the Resolution . . . . . . . . . . . . . . . .
calculating the Resolution . . . . . . . . . . . . . . . .
calculating the reading of the multimeter and percentage error . . . . . . . . . . . . . . . . . . . . . . . . .
calculating the reading of the multimeter and percentage error . . . . . . . . . . . . . . . . . . . . . . . . .
calculating the loading error . . . . . . . . . . . . . . .
calculating the voltage across the oscilloscope . . . . .
calculating the actual value of current measured value
of current and percentage error . . . . . . . . . . . . .
calculating the maximum available power . . . . . . .
calculating guarantee value of capacitance . . . . . . .
calculating percentage limiting error . . . . . . . . . .
Calculate the range of readings . . . . . . . . . . . . .
Calculate the limiting error in percent . . . . . . . . .
Calculate the range of readings specified interms of fsd
and true value . . . . . . . . . . . . . . . . . . . . . .
Calculate the magnitude and limiting error in ohm and
in percentage of the resistance . . . . . . . . . . . . .
calculate the value of relative limiting error in resistance
Calculate the guaranteed values of the resistance . . .
Calculate the percentage limiting error and range of resistance values . . . . . . . . . . . . . . . . . . . . . .
Calculate the magnitude of power and limiting error .
Calculate the magnitude of Force and limiting error .
calculate the power loss and relative error . . . . . . .
Calculate the true power as a percentage of measured
power . . . . . . . . . . . . . . . . . . . . . . . . . . .
calculate the total resistance error of each register and
fractional error of total resistance . . . . . . . . . . . .
find the error . . . . . . . . . . . . . . . . . . . . . . .
calculate the Volume and relative error . . . . . . . . .
calculate the per unit change in the value of spring for
different temperature ranges . . . . . . . . . . . . . .
Calculate apparent resistance actual resistance and error
5

14
14
14
15
15
16
16
17
17
18
19
19
20
20
21
21
22
22
23
24
25
26
26
27
27
28
29
29

Exa 3.19
Exa 3.20
Exa 3.21
Exa 3.22
Exa 3.23

Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa

3.24
3.25
3.26
3.27
3.28
3.29
3.30
3.31

Exa 3.32
Exa 3.34
Exa 3.35
Exa 3.37
Exa 3.38
Exa 3.39
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa

3.40
3.41
4.1
4.2
4.4
4.5
4.6
4.8
4.9

Calculate apparent resistance actual resistance and error


Calculate the error and percentage error in the measurement of deflection . . . . . . . . . . . . . . . . . . . .
to find the mean deviations from the mean Average deviation standard deviation and variance . . . . . . . .
to find the mean standard deviation probable error and
range . . . . . . . . . . . . . . . . . . . . . . . . . . .
to find the arithematic mean maen deviation standard
deviation prpobable error of 1 reading standard deviation and probable error of mean standard deviation of
standard deviation . . . . . . . . . . . . . . . . . . . .
to find probable no of resistors . . . . . . . . . . . . .
to find no of 100 rsding exceed 30mm . . . . . . . . .
to find no of rods of desired length . . . . . . . . . . .
to find standard deviation and probability of error . .
to find no of expected readings . . . . . . . . . . . . .
to calculate precision index of instrument . . . . . . .
to find confidence interval for given confidence levels .
to point out the reading that can be rejected by chavenets
criterion . . . . . . . . . . . . . . . . . . . . . . . . . .
calculate standard deviation . . . . . . . . . . . . . . .
determine value of total current considering errors as
limiting errors ans as standrd deviations . . . . . . . .
determine probable error in the computed value of resistnce . . . . . . . . . . . . . . . . . . . . . . . . . . .
to find Cq and its possible errors . . . . . . . . . . . .
calculate power disipated and uncertaainity in power .
to find uncertainity in combined resistance in both series
and in parrallel . . . . . . . . . . . . . . . . . . . . . .
to calculate uncertainity in measurement . . . . . . . .
to calculate uncertainity in power . . . . . . . . . . . .
calculating the temperature . . . . . . . . . . . . . . .
calculate time to read half of the temperature difference
Calculate the temperature after 10s . . . . . . . . . .
Calculate the value of resistance after 15s . . . . . . .
Calculate the depth after one hour . . . . . . . . . . .
Calculate time constant . . . . . . . . . . . . . . . . .
Calculate the temperature after 10s . . . . . . . . . .
6

30
30
31
32

32
33
34
34
35
35
36
37
37
38
39
39
40
41
41
42
43
44
44
45
45
46
46
47

Exa 4.10
Exa 4.11
Exa 4.12
Exa 4.13

Exa
Exa
Exa
Exa

4.14
4.15
4.16
4.17

Exa 4.18
Exa 4.19
Exa 4.20
Exa
Exa
Exa
Exa
Exa
Exa
Exa

4.21
4.22
4.23
5.1
5.2
5.3
5.4

Exa 5.5
Exa 5.6
Exa 5.7
Exa
Exa
Exa
Exa
Exa
Exa

5.8
5.9
5.10
5.11
5.12
5.13

Exa 5.14

Calculate the temperature at a depth of 1000 m . . . .


Calculate the value of resistance at different values of
time . . . . . . . . . . . . . . . . . . . . . . . . . . . .
calculate the value of damping constant and frequency
of damped oscillations . . . . . . . . . . . . . . . . . .
Calculate damping ratio natural frequency frequency of
damped oscillations time constant and steady state error
for ramp signal . . . . . . . . . . . . . . . . . . . . . .
Calculate the natural frequency . . . . . . . . . . . . .
Calculate natural frequency and setteling time . . . .
Calculate time lag and ratio of output and input . . .
Calculate the maximum allowable time constant and
phase shift . . . . . . . . . . . . . . . . . . . . . . . .
Calculate maximum value of indicated temperature and
delay time . . . . . . . . . . . . . . . . . . . . . . . .
Find the output . . . . . . . . . . . . . . . . . . . . .
Calculate maximum and minimum value of indicated
temperature phase shift time lag . . . . . . . . . . . .
determine damping ratio . . . . . . . . . . . . . . . . .
Calculate the frequency range . . . . . . . . . . . . . .
determine the error . . . . . . . . . . . . . . . . . . .
Calculate the deflection at center . . . . . . . . . . . .
Calculate the angle of twist . . . . . . . . . . . . . . .
Calculate the Torque . . . . . . . . . . . . . . . . . . .
Calculating the displacement and resolution of the potentiometer . . . . . . . . . . . . . . . . . . . . . . . .
plot the graph of error versus K . . . . . . . . . . . . .
Calculating the output voltage . . . . . . . . . . . . .
Calculating the maximum excitation voltage and the
sensitivity . . . . . . . . . . . . . . . . . . . . . . . . .
Calculating the resolution of the potentiometer . . . .
Checking the suitability of the potentiometer . . . . .
Checking the suitability of the potentiometer . . . . .
Calculating the possion ratio . . . . . . . . . . . . . .
Calculating the value of the resistance of the gauges .
calculate the percentage change in value of the gauge
resistance . . . . . . . . . . . . . . . . . . . . . . . . .
Calculating the Gauge factor . . . . . . . . . . . . . .
7

47
47
48

49
50
50
51
52
52
53
53
54
54
55
56
56
57
57
58
58
59
59
59
60
60
61
61
62

Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa

5.15
5.16
5.17
5.18
5.19
5.20
5.21
5.22
5.23
5.24
5.25
5.26
5.27
5.28
5.29
5.30
5.31
5.32
5.33

Exa 5.34
Exa 5.35
Exa 5.36
Exa
Exa
Exa
Exa
Exa

5.37
5.40
5.41
5.42
5.43

Exa 5.44
Exa 5.45

Exa 5.46

Calculating the change in length and the force applied


Calculate the linear approximation . . . . . . . . . . .
Calculate the linear approximation . . . . . . . . . . .
Calculate the resistance and the temperature . . . . .
Calculate the resistance . . . . . . . . . . . . . . . . .
Calculate the time . . . . . . . . . . . . . . . . . . . .
Calculate the resistance . . . . . . . . . . . . . . . . .
find resistance . . . . . . . . . . . . . . . . . . . . . .
calculating the change in temperature . . . . . . . . .
calculating the frequencies of oscillation . . . . . . . .
Calculating the sensitivity and maximum output voltage
Calculating the temperature . . . . . . . . . . . . . . .
Calcating the series resistance and approximate error .
Calculate the values of resistance R1 and R2 . . . . .
Calculate the percentage linearity . . . . . . . . . . . .
Calculate senstivity of the LVDT . . . . . . . . . . . .
calculate the deflection maximum and minimum force
calculating the sensitivity of the transducer . . . . . .
Calculate the value of the capacitance afte the application of pressure . . . . . . . . . . . . . . . . . . . . . .
Calculate the change in frequency of the oscillator . .
Calculate the dielectric stress change in value of capacitance . . . . . . . . . . . . . . . . . . . . . . . . . . .
Calculate the value of time constant phase shift series
resistance amplitude ratio and voltage sensitivity . . .
Calculate the change in capacitance and ratio . . . . .
Calculate the output voltage and charge sensitivity . .
Calculate the force . . . . . . . . . . . . . . . . . . . .
Calculate the strain charge and capacitance clc . . . .
calculate peak to peak voltage swing under open and
loaded conditions calculate maximum change in crystal
thickness . . . . . . . . . . . . . . . . . . . . . . . . .
Calculate the minimum frequency and phase shift . . .
calculate sensitivity of the transducer high frequency
sensitivity Lowest frequency Calculate external shunt
capacitance and high frequency sensitivity after connecting the external shunt capacitance . . . . . . . . .
calculate op volatge . . . . . . . . . . . . . . . . . . .
8

62
63
63
64
64
65
65
65
66
66
67
67
67
68
69
69
70
70
71
71
72
72
73
74
74
75

75
76

77
78

Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa

5.47
5.48
5.49
5.50
5.51
5.52
5.53
5.54
6.1
6.2
6.3
6.4
6.5
6.6
6.7
6.8
6.9
6.10
6.11

Exa 6.12
Exa 6.13
Exa 6.14
Exa 6.15
Exa 6.16
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa

6.17
6.19
6.20
6.21
6.22
6.23
6.24
6.25

to prove time constant should be approximately 20T .


calculate op volatge . . . . . . . . . . . . . . . . . . .
Calculate the threshold wavelength . . . . . . . . . . .
Calculate maximum velocity of emitted photo electrons
Calculate the resistance of the cell . . . . . . . . . . .
Calculate incident power and cut off frequency . . . .
Calculate the internal resistance of cell and open circuit
voltage . . . . . . . . . . . . . . . . . . . . . . . . . .
Find the value of current . . . . . . . . . . . . . . . .
calculating feedback resistance . . . . . . . . . . . . .
calculating the closed loop gain . . . . . . . . . . . . .
calculating the maximum output voltage . . . . . . . .
calculating output voltage due to offset voltage . . . .
calculating Amplification factor . . . . . . . . . . . . .
calculating output voltage due to offset voltage . . . .
calculating gain and feedback resistance . . . . . . . .
Calculating the values of resistances . . . . . . . . . .
Calculating the value of resistance and capacitance . .
Calculating Difference mode gain and output voltage .
Calculating Difference mode Common mode gain and
CMRR . . . . . . . . . . . . . . . . . . . . . . . . . .
Calculating Signal to noise ratio and CMRR . . . . . .
Calculating sensitivity and output voltage . . . . . . .
calculating minimum maximum time constants and value
of frequencies . . . . . . . . . . . . . . . . . . . . . . .
calculating time constant and value of capacitance . .
calcuating the passband gain and upper and lower cut
off frequencies . . . . . . . . . . . . . . . . . . . . . .
calcuating the value of C . . . . . . . . . . . . . . . .
calculate the output voltage and sensitivity . . . . . .
calculate the output voltage for different values of K .
calculating the resistance and output voltage . . . . .
Calculating the bridge output . . . . . . . . . . . . . .
Calculating the resistance of unknown resistance . . .
calculating the current . . . . . . . . . . . . . . . . . .
Calculating maximum permissible current through strain
gauge supply voltage and Power dissipation in series resistance . . . . . . . . . . . . . . . . . . . . . . . . . .
9

78
79
79
80
80
80
81
81
83
83
84
84
84
85
85
86
86
86
87
88
88
89
89
90
90
90
91
92
92
93
93

94

Exa 6.26
Exa 6.27
Exa 6.28
Exa 6.29
Exa 6.30

Exa 6.31
Exa 6.32
Exa 6.33
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa

6.34
7.1
7.2
7.3
7.4
7.5
7.6
7.7
7.8
7.9
7.10
8.1
8.2
8.3
8.4

Exa 8.5
Exa
Exa
Exa
Exa
Exa
Exa
Exa

8.6
8.7
9.1
9.2
9.3
9.4
9.6

Calculating the maximum voltage sensitivity of the bridge


Calculating the resolution of the instrument quantization error and decesion levels . . . . . . . . . . . . . .
Calculating the weight of MSB and LSB . . . . . . . .
Calculating reference voltage and percentage change .
Calculating the number of bits Value of LSB Quantization error minimum sampling rate Aperature time and
dynamic range . . . . . . . . . . . . . . . . . . . . . .
Calculating the value of resistance and smallest output
current . . . . . . . . . . . . . . . . . . . . . . . . . .
Calculating the output voltage . . . . . . . . . . . . .
Calculate the output of successive approximation A to
D . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
to calculate op dc voltage . . . . . . . . . . . . . . . .
calculating resolution . . . . . . . . . . . . . . . . . .
calculating resolution . . . . . . . . . . . . . . . . . .
calculating Total possible error and percentage error .
calculating frequency . . . . . . . . . . . . . . . . . . .
calculating maximum error . . . . . . . . . . . . . . .
calculating number of turns and current . . . . . . . .
calculating speed of the tape . . . . . . . . . . . . . .
calculating number density of the tape . . . . . . . . .
Calculating possible phase angles . . . . . . . . . . . .
Calculating possible phase angles . . . . . . . . . . . .
calculate the arrangement of slip gauges . . . . . . . .
calculate the sensitivity . . . . . . . . . . . . . . . . .
calculate uncertainity in displacement . . . . . . . . .
calculate difference between height of workpieces and
pile of slip gauges . . . . . . . . . . . . . . . . . . . .
calculate seperation distance between two surfaces and
angle of tilt . . . . . . . . . . . . . . . . . . . . . . . .
Calculate the difference in two diameters . . . . . . . .
Calculate the change in thickness along its length . . .
calculating the length of mean free path . . . . . . . .
Calculate Pressure of air source . . . . . . . . . . . . .
Calculate Pressure head . . . . . . . . . . . . . . . . .
calculate height . . . . . . . . . . . . . . . . . . . . . .
calculate error interms of pressure . . . . . . . . . . .
10

94
95
95
96

96
97
97
98
98
100
100
101
102
102
102
103
104
104
104
106
107
108
108
109
109
110
111
112
112
113
113

Exa 9.7
Exa 9.8
Exa 9.9
Exa
Exa
Exa
Exa

9.10
9.11
9.12
9.13

Exa 9.14
Exa 9.15
Exa
Exa
Exa
Exa
Exa

9.16
9.17
9.18
9.19
9.20

calculate angle to which tube is incliend to vertical . .


calculate angle to which tube is incliend to horizontal
calculate Length of scale angle to which tube is incliend
to horizontal . . . . . . . . . . . . . . . . . . . . . . .
calculate diameter of the tube . . . . . . . . . . . . . .
calculate amplification ratio and percentage error . . .
calculate value of counter weight required . . . . . . .
calculate damping factor time constant error and time
lag calculate damping factor natural frequency time constant error and time lag . . . . . . . . . . . . . . . . .
calculate thickness of diaphram and natural frequency
calculate the natural length of the spring and dispacement . . . . . . . . . . . . . . . . . . . . . . . . . . .
calculate the open circuit voltage . . . . . . . . . . . .
calculate the optimum setting . . . . . . . . . . . . . .
calculate the output voltage of bridge . . . . . . . . .
calculate attenuation . . . . . . . . . . . . . . . . . . .
calculate error . . . . . . . . . . . . . . . . . . . . . .

11

113
114
114
115
115
116

116
117
118
118
119
120
121
121

Chapter 2
Static Characteristics of
Instruments and Measurement
systems

Scilab code Exa 2.1 calculating static error and static correction
1 blue//blue blue c a l c u l a t i n g blue blue s t a t i c blue blue e r r o r

blue blueandblue blue s t a t i c blue blue c o r r e c t i o n


2 redclc ;
3 reddisp ( c a l c u l a t i n g
4
5
6
7
8
9

s t a t i c e r r o r and s t a t i c

correction )
Am = 127.50;
At = 127.43;
e = Am - At ;
reddisp (e , S t a t i c e r r o r (V)= ) ;
Sc = - e ;
reddisp ( Sc , S t a t i c C o r r e c t i o n (V)= ) ;

Scilab code Exa 2.2 calculating true value of the temperature

12

1 blue//blue blue c a l c u l a t i n g blue blue t r u e blue blue v a l u e


2
3
4
5
6
7

blue blue o f blue blue t h e blue blue t e m p e r a t u r e


redclc ;
reddisp ( c a l c u l a t i n g t r u e v a l u e o f t h e t e m p e r a t u r e )
Am = 95.45;
Sc = -0.08;
At = Am + Sc ;
reddisp ( At , True T e m p e r a t u r e ( D e g r e e C)= ) ;

Scilab code Exa 2.3 calculating Relative error expressed as a percentage


of f s d
1 blue//blue blue c a l c u l a t i n g blue blue R e l a t i v e blue blue e r r o r

2
3
4
5
6
7
8
9
10
11
12
13

blue blue ( blue e x p r e s s e d blue blue a s blue blueablue


blue p e r c e n t a g e blue blue o f blue blue f blue . blue s blue . blued
blue )
redclc ;
reddisp ( c a l c u l a t i n g R e l a t i v e e r r o r ( e x p r e s s e d a s a
percentage of f . s . d) )
Am = 1.46;
At =1.50;
e = Am - At ;
reddisp (e , A b s o l u t e e r r o r (V)= ) ;
Sc = - e ;
reddisp ( Sc , A b s o l u t e C o r r e c t i o n (V)= ) ;
RE =( e / At ) *100;
reddisp ( RE , R e l a t i v e E r r o r i n t e r m s o f t r u e v a l u e ( i n
p e r c e n t a g e )= ) ;
REF =( e /2.5) *100;
reddisp ( REF , R e l a t i v e E r r o r i n t e r m s o f t r u e v a l u e ( i n
p e r c e n t a g e )= ) ;

Scilab code Exa 2.4 calculating static error and static correction
13

1 blue//blue blue c a l c u l a t i n g blue blue s t a t i c blue blue e r r o r

blue blueandblue blue s t a t i c blue blue c o r r e c t i o n


2 redclc ;
3 reddisp ( c a l c u l a t i n g
4
5
6
7
8
9

s t a t i c e r r o r and s t a t i c
correction )
Am = 0.000161;
At = 0.159*10^ -3;
e = Am - At ;
reddisp (e , S t a t i c e r r o r (m3/ s )= ) ;
Sc = - e ;
reddisp ( Sc , S t a t i c C o r r e c t i o n (m3/ s )= ) ;

Scilab code Exa 2.5 calculating maximum static error Span of the thermometer degree C Accuracy of the thermometer in terms of percentage of
span
1 blue//blue c a l c u l a t i n g blue bluemaximumblue blue s t a t i c blue
2
3
4
5

6
7
8

blue e r r o r
reddisp ( c a l c u l a t i n g maximum s t a t i c e r r o r ) ;
blue//blueSpanblue blue o f blue blue t h e blue blue t h e r m o m e t e r
blue ( blue d e g r e e blue blueCblue )
S =200 -150;
blue//blue A c c u r a c y blue blue o f blue blue t h e blue
blue t h e r m o m e t e r blue ( blue i n blue blue t e r m s blue blue o f
blue blue p e r c e n t a g e blue blue o f blue blue s p a n blue )
A =0.0025;
e= A*S;
reddisp (e , Maximum S t a t i c e r r o r ( d e g r e e C)= ) ;

Scilab code Exa 2.6 calculating the pressure for a dial reading of 100

14

1 blue//blue blue c a l c u l a t i n g blue blue t h e blue blue p r e s s u r e

blue blue f o r blue blueablue blue d i a l blue blue r e a d i n g


blue blue o f blue blue100
2 redclc ;
3 reddisp ( c a l c u l a t i n g t h e p r e s s u r e f o r a d i a l r e a d i n g
o f 100 )
4 P =((27.58 -6.895) /150) *100+6.895;
5
6 reddisp (P , p r e s s u r e

f o r a d i a l r e a d i n g o f 1 0 0 ( kN/m2)=

);

Scilab code Exa 2.7 calculating the noise output voltage of the amplifier
1 blue//blue blue c a l c u l a t i n g blue blue t h e blue blue n o i s e blue

2
3
4
5
6
7
8
9
10
11
12

blue o u t p u t blue blue v o l t a g e blue blue o f blue blue t h e blue


blue a m p l i f i e r
redclc ;
reddisp ( c a l c u l a t i n g t h e n o i s e o u t p u t v o l t a g e o f t h e
amplifier )
Bw =100*10^3;
Sn =7*10^ -21;
R =50*10^3;
A =( Sn * R * Bw ) ^0.5;
En =2* A ;
reddisp ( En , N o i s e v o l t a g e a t i n p u t (V)= ) ;
Ga =100;
Eno = En * Ga ;
reddisp ( Eno , N o i s e v o l t a g e a t o u t p u t (V)= ) ;

Scilab code Exa 2.8 calculating the noise voltage


1 blue//blue blue c a l c u l a t i n g blue blue t h e blue blue n o i s e blue

blue v o l t a g e
15

2
3
4
5
6
7

redclc ;
reddisp ( c a l c u l a t i n g t h e n o i s e v o l t a g e )
Sn =20;
Vs =3;
Vn = Vs /( Sn ) ^0.5;
reddisp ( Vn , n o i s e V o l t a g e (mV)= )

Scilab code Exa 2.9 calculating the signal to noise ratio at input calculating the signal to noise ratio at output calculating the noise factor and noise
figure
1 blue//blue blue c a l c u l a t i n g blue blue t h e blue blue s i g n a l

3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

blue blue t o blue blue n o i s e blue blue r a t i o blue blue a t blue


blue i n p u t
blue//blue blue c a l c u l a t i n g blue blue t h e blue blue s i g n a l
blue blue t o blue blue n o i s e blue blue r a t i o blue blue a t blue
blue o u t p u t
blue//blue c a l c u l a t i n g blue blue t h e blue blue n o i s e blue
blue f a c t o r blue blueandblue blue n o i s e blue blue f i g u r e
redclc ;
reddisp ( s i g n a l t o n o i s e r a t i o a t i n p u t )
Sni =(3*10^ -6/(1*10^ -6) ) ^2;
reddisp ( Sni , s i g n a l t o n o i s e r a t i o a t i n p u t= )
reddisp ( s i g n a l t o n o i s e r a t i o a t o u t p u t )
Sno =(60*10^ -6/(20*10^ -6) ) ^2;
reddisp ( Sno , s i g n a l t o n o i s e r a t i o a t o u t p u t= )
reddisp ( New s i g n a l t o n o i s e r a t i o a t o u t p u t )
Snno =(60*10^ -6/(25*10^ -6) ) ^2;
reddisp ( Snno , s i g n a l t o n o i s e r a t i o a t o u t p u t= )
F = Sni / Snno ;
reddisp (F , n o i s e F a c t o r= )
nf =10*redlog10 ( F ) ;
reddisp ( nf , n o i s e F i g u r e ( dB )= )

16

Scilab code Exa 2.10 calculating the ratio of output signal to noise signal
1 blue//blue blue c a l c u l a t i n g blue blue t h e blue blue r a t i o blue

2
3
4
5
6
7
8
9
10
11
12
13
14

blue o f blue blue o u t p u t blue blue s i g n a l blue blue t o blue


blue n o i s e blue blue s i g n a l
redclc ;
reddisp ( The n o i s e v o l t a g e i s )
Bw =100*10^3;
K =1.38*10^ -23;
T =300;
R =120;
A =( K * T * R * Bw ) ^0.5;
En =2* A ;
reddisp ( En , N o i s e v o l t a g e (V)= ) ;
Eno =0.12*10^ -3;
reddisp ( Eno , N o i s e v o l t a g e a t o u t p u t (V)= ) ;
Ra = Eno / En ;
reddisp ( Ra , R a t i o o f s i g n a l v o t a g e t o N o i s e v o l t a g e =
);

Scilab code Exa 2.12 calculating the average force and range of error
1 blue//blue c a l c u l a t i n g blue blue t h e blue blue a v e r a g e blue

2
3
4
5
6
7
8

blue f o r c e blue blueandblue blue r a n g e blue blue o f blue


blue e r r o r
redclc ;
F1 =10.03;
F2 =10.10;
F3 =10.11;
F4 =10.08;
Fav =( F1 + F2 + F3 + F4 ) /4;
reddisp ( Fav , A v e r a g e F o r c e (N) = ) ;
17

9 Fmax = F3 ;
10 MaxR = Fmax - Fav ;
11 Fmin = F1 ;
12 MinR = Fav - Fmin ;
13 AvgR =( MaxR + MinR ) /2;
14 reddisp ( AvgR , A v e r a g e r a n g e o f

e r r o r (N)= )

Scilab code Exa 2.13 calculating the sum of resistances connected in series with uncertainity of one unit
1 blue//blue c a l c u l a t i n g blue blue t h e blue bluesumblue blue o f

blue blue r e s i s t a n c e s blue blue c o n n e c t e d blue blue i n blue


blue s e r i e s blue blue w i t h blue blue u n c e r t a i n i t y blue
blue o f blue blueoneblue blue u n i t
redclc ;
R1 =72.3;
R2 =2.73;
R3 =0.612;
R =( R1 + R2 + R3 ) ;
reddisp (R , sum o f r e s i s t a n c e s ( ohm ) = ) ;

2
3
4
5
6
7
8
9 reddisp ( t h e

as f i r s t

r e s u l t a n t r e s i s t a n c e i s 7 5 . 6 ohm w i t h 6
doutful figure )

Scilab code Exa 2.14 calculating the power with uncertainity of one unit
in voltage and current
1 blue//blue c a l c u l a t i n g blue blue t h e blue bluepowerblue

blue w i t h blue blue u n c e r t a i n i t y blue blue o f blue blueone


blue blue u n i t blue blue i n blue blue v o l t a g e blue blueand
blue blue c u r r e n t
2 redclc ;
3 V =12.16;
18

4
5
6
7
8

I =1.34;
P=V*I;
reddisp (P , Power (W) = ) ;
reddisp ( t h e r e s u l t a n t
doutful figure )

i s 16.2 W with 2 as f i r s t

Scilab code Exa 2.15 calculating the sum of resistances connected in series with appropriate number of significant figure
1 blue//blue c a l c u l a t i n g blue blue t h e blue bluesumblue blue o f

blue blue r e s i s t a n c e s blue blue c o n n e c t e d blue blue i n blue


blue s e r i e s blue blue w i t h blue blue a p p r o p r i a t e blue
bluenumberblue blue o f blue blue s i g n i f i c a n t blue
blue f i g u r e
2 redclc ;
3 R1 =28.7;
4 R2 =3.624;
5
6 R =( R1 + R2 ) ;
7 reddisp (R , sum o f r e s i s t a n c e s ( ohm ) = ) ;
8
9 reddisp ( t h e r e s u l t a n t r e s i s t a n c e i s 3 2 . 3 ohm a s one

of the r e s i s t a n c e i s accurate to three


significant figure )

Scilab code Exa 2.16 calculating the voltage drop with appropriate number of significant figure
1 blue//blue c a l c u l a t i n g blue blue t h e blue blue v o l t a g e blue

blue d r o p blue blue w i t h blue blue a p p r o p r i a t e blue


bluenumberblue blue o f blue blue s i g n i f i c a n t blue
blue f i g u r e
19

2
3
4
5
6
7
8
9

redclc ;
R =31.27;
I =4.37;
E=I*R;
reddisp (E , v o l t a g e d r o p (V) = ) ;
reddisp ( t h e v o l t a g e d r o p i s 137 V a s one o f t h e
r e s i s t a n c e i s accurate to three s i g n i f i c a n t
figure )

Scilab code Exa 2.17 calculating the sensitivity and deflection factor of
wheatstone bridge
1 blue//blue c a l c u l a t i n g blue blue t h e blue blue s e n s i t i v i t y

2
3
4
5
6
7
8

blue blueandblue blue d e f l e c t i o n blue blue f a c t o r blue


blue o f blue blue w h e a t s t o n e blue blue b r i d g e
redclc ;
Mo =3;
Mi =7;
Sen = Mo / Mi ;
reddisp ( Sen , s e n s i t i v i t y (mm p e r ohm ) = ) ;
Df = Mi / Mo ;
reddisp ( Df , d e f l e c t i o n f a c t o r ( ohm p e r mm) = ) ;

Scilab code Exa 2.18 calculating the volume of the mercury thermometer
1 blue//blue c a l c u l a t i n g blue blue t h e blue bluevolumeblue
2
3
4
5

blue o f blue blue t h e blue blue m e r c u r y blue blue t h e r m o m e t e r


redclc ;
Ac =( %pi /4) *0.25^2;
reddisp ( Ac , Area o f m e r c u r y t h e r m o m e t e r )
Lc =13.8*10^3;
20

6 Vc = Ac * Lc ;
7 reddisp ( Vc , Volume o f m e r c u r y t h e r m o m e t e r (mm3) )

Scilab code Exa 2.19 calculating the maximum position deviation resistance deviation
1 blue//blue c a l c u l a t i n g blue blue t h e blue bluemaximumblue

2
3
4
5
6
7
8
9

blue p o s i t i o n blue blue d e v i a t i o n blue , blue


blue r e s i s t a n c e blue blue d e v i a t i o n
redclc ;
Pl =0.001;
FSD =320;
R =10000;
MDD =( Pl * FSD ) ;
reddisp ( MDD , Maximum d i s p l a c e m e n t d e v i a t i o n ( d e g r e e )=
);
MRD = Pl * R ;
reddisp ( MRD , Maximum d i s p l a c e m e n t d e v i a t i o n ( ohm )= ) ;

Scilab code Exa 2.20 calculating the dead zone


1 blue//blue c a l c u l a t i n g blue blue t h e blue bluedeadblue
2
3
4
5
6

blue z o n e
redclc ;
reddisp ( s p a n s= )
s =600;
Dz =0.00125* s ;
reddisp ( Dz , Dead z o n e ( d e g r e e C)= ) ;

Scilab code Exa 2.22 calculating the Resolution


21

1
2
3
4
5
6
7

blue//blue c a l c u l a t i n g blue blue t h e blue blue R e s o l u t i o n


redclc ;
Fs =200;
D =100;
SD = Fs / D ;
R = SD /10;
reddisp (R , r e s o l u t i o n (V)= )

Scilab code Exa 2.23 calculating the Resolution


1
2
3
4
5
6
7

blue//blue c a l c u l a t i n g blue blue t h e blue blue R e s o l u t i o n


redclc ;
Fs =9.999;
D =9999;
SD = Fs / D ;
R = SD ;
reddisp (R , r e s o l u t i o n (V)= )

Scilab code Exa 2.24 calculating the reading of the multimeter and percentage error
1 blue//blue c a l c u l a t i n g blue blue t h e blue blue r e a d i n g blue

2
3
4
5
6
7
8
9

blue o f blue blue t h e blue blue m u l t i m e t e r blue blueandblue


blue p e r c e n t a g e blue blue e r r o r
redclc ;
Zl =20000;
Zo =10000;
Eo =6;
El = Eo /(1+ Zo / Zl ) ;
reddisp ( El , R e a d i n g o f t h e m u l t i m e t e r (V)= )
PE =(( El - Eo ) / Eo ) *100;
reddisp ( PE , P e r c e n t a g e e r r o r= )
22

Scilab code Exa 2.25 calculating the reading of the multimeter and percentage error
1 blue//blue c a l c u l a t i n g blue blue t h e blue blue r e a d i n g blue

2
3
4
5
6
7
8
9

blue o f blue blue t h e blue blue m u l t i m e t e r blue blueandblue


blue p e r c e n t a g e blue blue e r r o r
redclc ;
Zl =20000;
Zo =1000;
Eo =6;
El = Eo /(1+ Zo / Zl ) ;
reddisp ( El , R e a d i n g o f t h e m u l t i m e t e r (V)= )
PE =(( El - Eo ) / Eo ) *100;
reddisp ( PE , P e r c e n t a g e e r r o r= )

Scilab code Exa 2.26 calculating the loading error


1 blue//blue c a l c u l a t i n g blue blue t h e blue blue l o a d i n g blue
2
3
4
5
6
7
8
9
10
11

blue e r r o r
redclc ;
Zl =1000;
Zo =200*200/400;
Eo =100*200/400;
El = Eo /(1+ Zo / Zl ) ;
reddisp ( El , R e a d i n g o f t h e m u l t i m e t e r (V)= )
PE =(( El - Eo ) / Eo ) *100;
reddisp ( PE , P e r c e n t a g e l o a d i n g e r r o r= )
Ac =100+ PE ;
reddisp ( Ac , A c c u r a c y= )

23

Scilab code Exa 2.27 calculating the voltage across the oscilloscope
1 blue//blue c a l c u l a t i n g blue blue t h e blue blue v o l t a g e blue
2
3
4
5
6
7
8
9
10
11
12
13

blue a c r o s s blue blue t h e blue blue o s c i l l o s c o p e


redclc ;
C =50*10^ -6;
f =100000;
reddisp (f , f r e q u e n c y= )
Xc =1/(2* %pi * f * C ) ;
R =10^6;
Zl =( R * - %i * Xc ) /( R - %i * Xc ) ;
Eo =1;
Zo =10*10^3;
El = Eo /(1+ Zo / Zl ) ;
reddisp ( El , R e a d i n g o f t h e m u l t i m e t e r (V)= )

Scilab code Exa 2.28 calculating the actual value of current measured
value of current and percentage error
1 blue//blue c a l c u l a t i n g blue blue t h e blue blue a c t u a l blue

blue v a l u e blue blue o f blue blue c u r r e n t blue , blue


blue m e a s u r e d blue blue v a l u e blue blue o f blue blue c u r r e n t
blue blueandblue blue p e r c e n t a g e blue blue e r r o r
2 redclc ;
3
4
5
6
7
8
9
10
11
12

Eo =10 -((10*1000) /(1000+1000) ) ;


Zo =((1000*1000) /(1000+1000) ) +500;
Io = Eo / Zo ;
reddisp ( Io , A c t u a l v a l u e o f c u r r e n t (A)= )
Zl =100;
Il = Eo /( Zo + Zl ) ;
reddisp ( Il , Measured v a l u e o f c u r r e n t (A)= )
PE =(( Il - Io ) / Io ) *100;
reddisp ( PE , P e r c e n t a g e l o a d i n g e r r o r= )
24

Scilab code Exa 2.29 calculating the maximum available power


1 blue//blue c a l c u l a t i n g blue blue t h e blue bluemaximumblue

blue a v a i l a b l e blue bluepower


2 redclc ;
3
4
5
6
7
8
9
10

Eo =80*10^ -3;
Il =5*10^ -9;
Rl =6*10^6;
Ro =( Eo / Il ) - Rl ;
Pmax =( Eo ^2) /(4* Ro ) ;
reddisp ( Pmax , Maximum a v a i l a b l e Power (W)= )

25

Chapter 3
Errors in Measurements and
Their Statistical Analysis

Scilab code Exa 3.1 calculating guarantee value of capacitance


1 blue//blue blue c a l c u l a t i n g blue blue g u a r a n t e e blue
2
3
4
5
6
7
8

blue v a l u e blue blue o f blue blue c a p a c i t a n c e


redclc ;
As = 1;
Er =0.05;
Aau = As *(1+ Er ) ;
reddisp ( Aau , Upper l i m i t ( m i c r o F )= ) ;
Aal = As *(1 - Er ) ;
reddisp ( Aal , Lower l i m i t ( m i c r o F )= ) ;

Scilab code Exa 3.2 calculating percentage limiting error


1 blue//blue blue c a l c u l a t i n g blue blue p e r c e n t a g e blue

blue l i m i t i n g blue blue e r r o r


2 redclc ;
3 As = 150;
26

4
5
6
7
8

Er =0.01;
dA = As * Er ;
As1 =75;
Er =( dA / As1 ) *100;
reddisp ( Er , P e r c e n t a g e l i m i t i n g e r r o r = ) ;

Scilab code Exa 3.3 Calculate the range of readings


1 blue//blue blue C a l c u l a t e blue blue t h e blue blue r a n g e blue
2
3
4
5
6
7
8
9
10

blue o f blue blue r e a d i n g s


redclc ;
fsd =1000;
TP =100;
Efsd =(1/100) *1000;
reddisp ( Efsd , m a g n i t u d e o f E r r o r when s p e c i f i e d i n
t e r m s o f f u l l s c a l e d e f l e c t i o n (w)= )
reddisp ( Thus t h e m e t e r w i l l r e a d b e t w e e n 90W and 110
W )
Etv =(1/100) *100;
reddisp ( Etv , m a g n i t u d e o f E r r o r when s p e c i f i e d i n
t e r m s o f t r u e v a l u e (w)= )
reddisp ( Thus t h e m e t e r w i l l r e a d b e t w e e n 99W and 101
W )

Scilab code Exa 3.4 Calculate the limiting error in percent


1 blue//blue blue C a l c u l a t e blue blue t h e blue blue l i m i t i n g
2
3
4
5
6

blue blue e r r o r blue blue i n blue blue p e r c e n t


redclc ;
dA =0.05*5*10^ -6;
As =2.5*10^ -6;
Er =( dA / As ) *100;
reddisp ( Er , p e r c e m t a g e l i m i t i n g e r r o r =+/ )
27

Scilab code Exa 3.5 Calculate the range of readings specified interms of
fsd and true value
1 blue//blue blue C a l c u l a t e blue blue t h e blue blue r a n g e blue

2
3
4
5
6
7
8
9
10
11
12
13
14

blue o f blue blue r e a d i n g s blue blue s p e c i f i e d blue


blue i n t e r m s blue blue o f blue blue f blue . blue s blue . blued
blue . blue blueandblue blue t r u e blue blue v a l u e
redclc ;
reddisp ( Range when s p e c i f i e d i n t e r m s o f f . s . d . )
Error_fsd =1*1000/100
Range_lower_value =100 - Error_fsd ;
reddisp ( Range_lower_value , Lower v a l u e o f r a n g e ( kN/
m2) )
Range_upper_value =100+ Error_fsd ;
reddisp ( Range_upper_value , Upper v a l u e o f r a n g e ( kN/
m2) )
reddisp ( Range when s p e c i f i e d i n t e r m s o f True v a l u e )
Error_true =1*100/100
Range_lower_value =100 - Error_true ;
reddisp ( Range_lower_value , Lower v a l u e o f r a n g e ( kN/
m2) )
Range_upper_value =100+ Error_true ;
reddisp ( Range_upper_value , Upper v a l u e o f r a n g e ( kN/
m2) )

Scilab code Exa 3.6 Calculate the magnitude and limiting error in ohm
and in percentage of the resistance
1 blue//blue blue C a l c u l a t e blue blue t h e blue blue m a g n i t u d e

blue blueandblue blue l i m i t i n g blue blue e r r o r blue blue i n


blue blueohmblue blueandblue blue i n blue blue p e r c e n t a g e
blue blue o f blue blue t h e blue blue r e s i s t a n c e
28

2
3
4
5
6
7
8
9
10
11
12
13
14

redclc ;
R1 =37;
R1_le =5* R1 /100;
R2 =75;
R2_le =5* R2 /100;
R3 =50;
R3_le =5* R3 /100;
R = R1 + R2 + R3 ;
reddisp (R , V a l u e o f r e s i s t a n c e ( ohm )= )
R_le = R1_le + R2_le + R3_le ;
reddisp ( R_le , L i m i t i n g V a l u e o f r e s i s t a n c e ( ohm )= )
Limiting_error_percentage = R_le *100/ R ;
reddisp ( Limiting_error_percentage , L i m i t i n g V a l u e o f
r e s i s t a n c e ( p e r c e n t a g e )=+/ )

Scilab code Exa 3.7 calculate the value of relative limiting error in resistance
1 blue//blue blue c a l c u l a t e blue blue t h e blue blue v a l u e blue

2
3
4
5
6

blue o f blue blue blue r e l a t i v e blue blue l i m i t i n g blue


blue e r r o r blue blue i n blue blue r e s i s t a n c e
redclc ;
Re_P =1.5;
Re_I =1;
Re_resistance =( Re_P +2* Re_I ) ;
reddisp ( Re_resistance , t h e v a l u e o f
relative
l i m i t i n g e r r o r o f r e s i s t a n c e i n p e r c e n t a g e (+/)=
)

Scilab code Exa 3.8 Calculate the guaranteed values of the resistance

29

1 blue//blue blue C a l c u l a t e blue blue t h e blue blue g u a r a n t e e d

2
3
4

5
6
7
8
9
10
11

blue blue v a l u e s blue blue o f blue blue t h e blue


blue r e s i s t a n c e
redclc ;
R1 =100;
R1_le_perunit =0.5; blue//blue blue R 1 l e p e r u n i t blue
blue i n d i c a t e s blue bluedR1blue/blueR1blue blue=blue
blue 0 . 5 blue%
R2 =1000;
R2_le_perunit =0.5;
R3 =842;
R3_le_perunit =0.5;
Rx = R2 * R3 / R1 ;
reddisp ( Rx , V a l u e o f r e s i s t a n c e ( ohm )= )
Rx_le_perunit = R1_le_perunit + R2_le_perunit +
R3_le_perunit ;

12
13 reddisp ( Rx_le_perunit , L i m i t i n g V a l u e o f
14
15
16
17
18
19

resistance

p e r u n i t ( dRx/Rx )= )
Er_Le = Rx_le_perunit * Rx /100;
reddisp ( Er_Le , L i m i t i n g V a l u e o f r e s i s t a n c e ( ohm )=+/
)
reddisp ( G u a r a n t e e v a l u e o f t h e r e s i s t a n c e ( ohm )= )
G1 = Rx + Er_Le ;
G2 = Rx - Er_Le ;
reddisp ( G1 , G2 , )

Scilab code Exa 3.9 Calculate the percentage limiting error and range of
resistance values
1 blue//blue blue C a l c u l a t e blue blue t h e blue blue p e r c e n t a g e

blue blue l i m i t i n g blue blue e r r o r blue blueandblue


blue r a n g e blue blue o f blue blue r e s i s t a n c e blue blue v a l u e s
2 redclc ;
3 reddisp ( d e c a d e a i s s e t a t 4 0 0 0 ohm , so , e r r o r i n
30

4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

d e c a d e a= )
Er_a =4000*0.1/100;
reddisp ( Er_a )
reddisp ( d e c a d e b i s s e t a t 600 ohm , so , e r r o r i n
d e c a d e b= )
Er_b =600*0.1/100;
reddisp ( Er_b )
reddisp ( d e c a d e c i s s e t a t 30 ohm , so , e r r o r i n
d e c a d e c= )
Er_c =30*0.1/100;
reddisp ( Er_c )
reddisp ( d e c a d e d i s s e t a t 9 ohm , so , e r r o r i n d e c a d e
d= )
Er_d =9*0.1/100;
reddisp ( Er_d )
Er_total = Er_a + Er_b + Er_c + Er_d ;
Re_le_percentage = Er_total *100/4639;
reddisp ( Re_le_percentage , P e r c e n t a g e R e l a t i v e
l i m i t i n g e r r o r= )
Range_lower =4639 - Er_total ;
reddisp ( Range_lower , Lower v a l u e o f r a n g e ( ohm )= )
Range_upper =4639+ Er_total ;
reddisp ( Range_upper , u p p e r v a l u e o f r a n g e ( ohm )= )

Scilab code Exa 3.10 Calculate the magnitude of power and limiting error
1 blue//blue blue C a l c u l a t e blue blue t h e blue blue m a g n i t u d e

2
3
4
5
6
7

blue blue o f blue bluepowerblue blueandblue blue l i m i t i n g


blue blue e r r o r
redclc ;
F =4.58;
L =397;
R =1202*10^ -9;
t =60;
P =(2* %pi *9.81* F * L * R ) /( t *10^6) ;
31

8 reddisp (P , Magnitude o f power (W)= )


9 dF_pu =0.02/ F ; blue//blue blue p e r blue blue u n i t blue
10
11
12
13
14
15

blue e r r o r blue blue i n blue blue f o r c e


dL_pu =1.3/ L ; blue//blue blue p e r blue blue u n i t blue
blue e r r o r blue blue i n blue blue Length
dR_pu =1/ R ; blue//blue blue p e r blue blue u n i t blue blue e r r o r
blue blue i n blue blue r e v o l u t i o n
dt_pu =0.5/ t ; blue//blue blue p e r blue blue u n i t blue
blue e r r o r blue blue i n blue blue t i m e
dP_pu = dF_pu + dL_pu + dR_pu + dt_pu ;
dP_le = dP_pu * P ;
reddisp ( dP_le , Magnitude o f l i m i t i n g e r r o r i n power (
W) )

Scilab code Exa 3.11 Calculate the magnitude of Force and limiting error
1 blue//blue blue C a l c u l a t e blue blue t h e blue blue m a g n i t u d e

2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

blue blue o f blue blue F o r c e blue blueandblue blue l i m i t i n g


blue blue e r r o r
redclc ;
E =200*10^9;
L =25*10^ -3;
b =4.75*10^ -3;
d =0.9*10^ -3;
I =( b * d ^3) /12;
x =2.5*10^ -3;
F =(3* E * I * x ) /( L ^3) ;
reddisp (F , Magnitude o f F o r c e (N)= )
dE_pu =0/ E ; blue//blue blue p e r blue blue u n i t blue blue e r r o r
blue blue i n blue blueE
db_pu =0.0075/ b ;
dd_pu =0.0075/ d ;
dx_pu =0.025/ x ;
dL_pu =0.025/ L ;
dF_pu = ( dE_pu + db_pu +3* dd_pu + dx_pu +3* dL_pu ) *10^ -3;
32

17
18 reddisp ( dF_pu , l i m i t i n g

e r r o r i n f o r c e (N)=+/ )

Scilab code Exa 3.12 calculate the power loss and relative error
1 blue//blue blue c a l c u l a t e blue blue t h e blue bluepowerblue
2
3
4
5
6
7
8

blue l o s s blue blueandblue blue r e l a t i v e blue blue e r r o r


redclc ;
I =64*10^ -3;
R =3200;
P =( I ^2) * R ;
reddisp (P , Power (W)= )
Re =2*0.75+0.2;
reddisp ( Re , R e l a t i v e e r r o r (%)= )

Scilab code Exa 3.13 Calculate the true power as a percentage of measured power
1 blue//blue blue C a l c u l a t e blue blue t h e blue blue t r u e blue

2
3
4
5
6
7
8
9
10

bluepowerblue blue a s blue blueablue blue p e r c e n t a g e blue


blue o f blue blue m e a s u r e d blue bluepower
redclc ;
I =30.4;
R =0.015;
I_true = I *(1+0.012) ;
R_true = R *(1 -0.003) ;
P_true =( I_true ^2) * R_true ;
P_measured =( I ^2) * R ;
R = P_true *100/ P_measured ;
reddisp (R , t r u e power a s a p e r c e n t a g e o f m e a s u r e d
power (%)= )

33

Scilab code Exa 3.14 calculate the total resistance error of each register
and fractional error of total resistance
1 blue//blue c a l c u l a t e blue blue t h e blue blue t o t a l blue

2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

blue r e s i s t a n c e blue , blue blue e r r o r blue blue o f blue


blue e a c h blue blue r e g i s t e r blue blueandblue
blue f r a c t i o n a l blue blue e r r o r blue blue o f blue blue t o t a l
blue blue r e s i s t a n c e
redclc ;
R1 =250;
R2 =500;
R3 =375;
R_true =1/((1/ R1 ) +(1/ R2 ) +(1/ R3 ) ) ;
reddisp ( R_true , True v a l u e o f r e s i s t a n c e ( ohm )= )
dR1 = 0.025* R1 ;
dR2 = -0.36* R2 ;
dR3 =0.014* R3 ;
R1_effective = R1 + dR1 ;
R2_effective = R2 + dR2 ;
R3_effective = R3 + dR3 ;
R_effective =1/((1/ R1_effective ) +(1/ R2_effective ) +(1/
R3_effective ) ) ;
reddisp ( R_effective , E f f e c t i v e v a l u e o f r e s i s t a n c e (
ohm )= )
Fractional_error =( R_true - R_effective ) / R_true ;
reddisp ( Fractional_error , F r a c t i o n a l e r r o r )

Scilab code Exa 3.15 find the error


1 blue//
2 redclc ;

34

3 reddisp ( When a l l
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

t h e c o m p o n en t s have 0% e r r o r t h e n
r e s o n a n t f r e q u e n c y ( Hz ) )
L =160*10^ -6;
C =160*10^ -12;
fr =[1/(2* %pi ) ]*[1/( L * C ) ]^0.5;
reddisp ( fr )
reddisp ( When a l l t h e c o m p o n en t s have +10% e r r o r t h e n
r e s o n a n t f r e q u e n c y ( Hz ) )
L_new =(160*10^ -6) +0.1* L ;
C_new =(160*10^ -12) +0.1* C ;
fr_new =[1/(2* %pi ) ]*[1/( L_new * C_new ) ]^0.5;
reddisp ( fr_new )
rederror =( fr_new - fr ) / fr ;
reddisp (rederror , e r r o r= )
reddisp ( When a l l t h e c o m p o n en t s have 10% e r r o r t h e n
r e s o n a n t f r e q u e n c y ( Hz ) )
L_new =(160*10^ -6) -0.1* L ;
C_new =(160*10^ -12) -0.1* C ;
fr_new =[1/(2* %pi ) ]*[1/( L_new * C_new ) ]^0.5;
reddisp ( fr_new )
rederror =( fr_new - fr ) / fr ;
reddisp (rederror , e r r o r= )

Scilab code Exa 3.16 calculate the Volume and relative error
1 blue//blue blue c a l c u l a t e blue blue t h e blue blueVolumeblue
2
3
4
5
6
7
8

blueandblue blue r e l a t i v e blue blue e r r o r


redclc ;
L =250;
d =50;
V =(( %pi /4) * d ^2) * L ;
reddisp (V , Volume (mm3)= )
Re =2*0.2 -0.5;
reddisp ( Re , R e l a t i v e e r r o r (%)= )

35

Scilab code Exa 3.17 calculate the per unit change in the value of spring
for different temperature ranges
1 blue//blue blue c a l c u l a t e blue blue t h e blue blue p e r blue

2
3
4
5
6
7
8
9
10
11
12

blue u n i t blue blue c h a n g e blue blue i n blue blue t h e blue


blue v a l u e blue blue o f blue blue s p r i n g blue blue f o r blue
blue d i f f e r e n t blue blue t e m p e r a t u r e blue blue r a n g e s
redclc ;
dG_pu = -240*10^ -6;
dD_pu =11.8*10^ -6;
reddisp ( f o r t e m p e r a t u r e c h a n g e o f 20 d e g r e e C t o 50
d e g r e e C (%) = )
d_th =30;
dK_pu =( dG_pu + dD_pu ) * d_th *100;
reddisp ( dK_pu )
reddisp ( f o r t e m p e r a t u r e c h a n g e o f 20 d e g r e e C t o 50
d e g r e e C (%) = )
d_th = -70;
dK_pu =( dG_pu + dD_pu ) * d_th *100;
reddisp ( dK_pu )

Scilab code Exa 3.18 Calculate apparent resistance actual resistance and
error
1 blue//blue blue C a l c u l a t e blue blue a p p a r e n t blue

2
3
4
5
6

blue r e s i s t a n c e blue , blue blue a c t u a l blue blue r e s i s t a n c e


blue blueandblue blue e r r o r
redclc ;
Et =100;
It =5*10^ -3;
Rt = Et / It ;
reddisp ( Rt , a p p a r e n t v a l u e o f r e s i s t a n c e ( ohm )= )
36

7
8
9
10
11

Rv =1000*150;
Rx = Rt * Rv /( Rv - Rt ) ;
reddisp ( Rx , t r u e v a l u e o f r e s i s t a n c e ( ohm ) )
Er_percentage =[( Rt - Rx ) / Rx ]*100;
reddisp ( Er_percentage , p e r c e n t a g e e r r o r= )

Scilab code Exa 3.19 Calculate apparent resistance actual resistance and
error
1 blue//blue blue C a l c u l a t e blue blue a p p a r e n t blue

2
3
4
5
6
7
8
9
10
11

blue r e s i s t a n c e blue , blue blue a c t u a l blue blue r e s i s t a n c e


blue blueandblue blue e r r o r
redclc ;
Et =40;
It =800*10^ -3;
Rt = Et / It ;
reddisp ( Rt , a p p a r e n t v a l u e o f r e s i s t a n c e ( ohm )= )
Rv =1000*150;
Rx = Rt * Rv /( Rv - Rt ) ;
reddisp ( Rx , t r u e v a l u e o f r e s i s t a n c e ( ohm ) )
Er_percentage =[( Rt - Rx ) / Rx ]*100;
reddisp ( Er_percentage , p e r c e n t a g e e r r o r= )

Scilab code Exa 3.20 Calculate the error and percentage error in the measurement of deflection
1 blue//blue C a l c u l a t e blue blue t h e blue blue e r r o r blue blueand

blue blue p e r c e n t a g e blue blue e r r o r blue blue i n blue


blue t h e blue bluemeasurementblue blue o f blue
blue d e f l e c t i o n
2 redclc ;
3 l =0.2;
4 E =200*10^9;
37

5
6
7
8
9
10
11
12
13
14
15
16

b =20*10^ -3;
d =5*10^ -3;
D =(4* l ^3) /( E * b * d ^3) ;
F =1*9.81;
x_true = D * F ;
reddisp ( x_true , True v a l u e o f d e f l e c t i o n )
x_indicated = D *10.31/(1+.1* D ) ;
reddisp ( x_indicated , I n d i c a t e d v a l u e o f d e f l e c t i o n )
Er = x_indicated - x_true ;
reddisp ( Er , e r r o r= )
Er_percentage = Er *100/ x_true ;
reddisp ( Er_percentage , P e r c e n t a g e e r r o r= )

Scilab code Exa 3.21 to find the mean deviations from the mean Average
deviation standard deviation and variance
1 blue//blue t o blue blue f i n d blue blue t h e blue bluemeanblue ,

blue d e v i a t i o n s blue bluefromblue blue t h e blue bluemean


blue , blue blue A v e r a g e blue blue d e v i a t i o n blue , blue
blue s t a n d a r d blue blue d e v i a t i o n blue blueandblue
blue v a r i a n c e
2
3
4
5
6
7
8
9
10
11
12
13
14
15

redclc ;
x =[532 548 543 535 546 531 543 536];
X =redsum ( x ) ;
n =8;
a =0;
Mean = X / n ;
reddisp ( X /n , mean ( kHZ ) ) ;
redfor i =1: n ,
d ( i ) = x ( i ) - Mean
reddisp ( d ( i ) , d e v i a t i o n s = )
a = a +(redabs ( d ( i ) ) )
redend
d_average = a / n ;
38

16
17
18
19
20
21

reddisp ( d_average , A v e r a g e d e v i a t i o n ( kHz )= )


d_2 =redsum ( d ^2) ;
s =redsqrt ( d_2 /( n -1) )
reddisp (s , s t a n d a r d d e v i a t i o n ( kHz ) ) ;
V = s ^2;
reddisp (V , v a r a i n c e ( kHZ ) 2= )

Scilab code Exa 3.22 to find the mean standard deviation probable error
and range
1 blue//blue t o blue blue f i n d blue blue t h e blue bluemeanblue ,

blue s t a n d a r d blue blue d e v i a t i o n blue , blue blue p r o b a b l e


blue blue e r r o r blue blueandblue blue r a n g e
2
3
4
5
6
7
8
9
10
11
12
13
14
15

redclc ;
x =[41.7 42 41.8 42 42.1 41.9 42 41.9 42.5 41.8];
X =redsum ( x ) ; reddisp ( X ) ;
d =[ -.27 .03 -.17 .03 .13 -.07 .03 -.07 .53 -.17];
d_2 =redsum ( d ^2) ;
n =10;
reddisp ( X /n , mean l e n g t h ( deg C) ) ;
reddisp (redsqrt ( d_2 / n ) , s t a n d a r d d e v i a t i o n ( i f d a t a i s
i n f i n i t e ) ( deg C) ) ;
reddisp (redsqrt ( d_2 /( n -1) ) , s t a n d a r d d e v i a t i o n ( deg C)
);
r1 =.6745*redsqrt ( d_2 /( n -1) ) ;
reddisp ( r1 , p r o b a b l e e r r o r o f 1 r e a d i n g ( deg C) ) ;
reddisp ( r1 /redsqrt (n -1) , p r o b a b l e e r r o r o f mean ( deg C
) );
reddisp (redmax ( x ) -redmin ( x ) , r a n g e ( deg C) ) ;

39

Scilab code Exa 3.23 to find the arithematic mean maen deviation standard deviation prpobable error of 1 reading standard deviation and probable
error of mean standard deviation of standard deviation
1 blue//blue t o blue blue f i n d blue blue t h e blue blue a r i t h e m a t i c

blue bluemeanblue , blue bluemaenblue blue d e v i a t i o n blue ,


blue s t a n d a r d blue blue d e v i a t i o n blue , blue blue p r p o b a b l e
blue blue e r r o r blue blue o f blue blue1blue blue r e a d i n g
blue , blue blue s t a n d a r d blue blue d e v i a t i o n blue blueand
blue blue p r o b a b l e blue blue e r r o r blue blue o f blue bluemean
blue , blue blue s t a n d a r d blue blue d e v i a t i o n blue blue o f
blue blue s t a n d a r d blue blue d e v i a t i o n
2
3
4
5
6
7
8
9
10
11
12

13
14

redclc ;
T =[397 398 399 400 401 402 403 404 405];
f =[1 3 12 23 37 16 4 2 2];
Tf =redsum (redabs ( T .* f ) ) ;
reddisp ( Tf /redsum ( f ) , mean temp ( deg C) ) ;
d =[ -3.78 -2.78 -1.78 -.78 .22 1.22 2.22 3.22 4.22];
reddisp (redsum ( f .* d ) /redsum ( f ) , mean d e v i a t i o n ( deg C)
);
reddisp (redsqrt (redsum ( f .* d ^2) /redsum ( f ) ) , s t a n d a r d
d e v i a t i o n ( deg C) ) ;
reddisp (.6745*redsqrt (redsum ( f .* d ^2) /redsum ( f ) ) ,
p r o b a b l e e r r o r o f 1 r e a d i n g ( deg C) ) ;
reddisp ((.6745*redsqrt (redsum ( f .* d ^2) /redsum ( f ) ) ) /
redsqrt (redsum ( f ) ) , p r o b a b l e e r r o r o f mean ( deg C)
);
reddisp ((redsqrt (redsum ( f .* d ^2) /redsum ( f ) ) ) /redsqrt (
redsum ( f ) ) , s t a n d a r d d e v i a t i o n o f mean ( deg C) ) ;
reddisp ((redsqrt (redsum ( f .* d ^2) /redsum ( f ) ) ) /redsqrt (
redsum ( f ) *2) , s t a n d a r d d e v i a t i o n o f s t a n d a r d
d e v i a t i o n ( deg C) ) ;

Scilab code Exa 3.24 to find probable no of resistors


40

1 blue//blue t o blue blue f i n d blue blue p r o b a b l e blue bluenoblue

blue o f blue blue r e s i s t o r s


2
3
4
5
6
7

redclc ;
x =.15; blue
blue//blue d e v i a t i o n
o =.1; blue
blue//blue s t a n d a r d blue blue d e v i a t i o n
t=x/o;
A =.4432 blue
blue//blue a r e a blue blue u n d e r blue
blue g a u s s i a n blue blue c u r v e blue blue c o r r e s p o n d i n g blue
blue t o blue blue t
8 n =2* A *1000;
9 reddisp (redfloor ( n ) , no o f r e s i s t o r s ) ;

Scilab code Exa 3.25 to find no of 100 rsding exceed 30mm


1 blue//blue t o blue blue f i n d blue bluenoblue blue o f blue blue100

blue blue r s d i n g blue blue e x c e e d blue blue30bluemm


2
3 redclc ;
4 x =30 -26.3; blue

blue//bluemeanblue blue v a l u e blue

blue 2 6 . 3
r =2.5;
o = r /.6745;
t=x/o;
A =.3413;blue//blue a r e a blue blue u n d e r blue blue g a u s s i a n
blue blue c u r v e blue blue c o r r e s p o n d i n g blue blue t o blue
blue t
9 n =2* A *100;
10 nn =100 -redfloor ( n ) ;
11 reddisp ( nn /2 , no o f r e a d i n g s e x c e e d ) ;
5
6
7
8

Scilab code Exa 3.26 to find no of rods of desired length


41

1 blue//blue t o blue blue f i n d blue bluenoblue blue o f blue

blue r o d s blue blue o f blue blue d e s i r e d blue blue l e n g t h


2
3
4
5
6
7
8
9
10
11
12
13

redclc ;
n =25000; blue
blue//bluenoblue blue o f blue blue r o d s
n1 =12500; blue//blue l e n g t h blue>10bluemm
n2 =2000; blue
blue//blue l e n g t h blue > 1 0 . 2 5
a = n1 - n2 ; blue
blue//blue10<blue l e n g t h blue < 1 0 . 2 5
p=a/n;
t =1.41; blue
blue//blue u s i n g blue bluep
t1 = t *2;
p1 =.4975;
b = p1 * n ; blue
blue//blue9.5 <blue l e n g t h blue<10
reddisp ( a +redfloor ( b ) , t o t a l no o f r o d s ) ;

Scilab code Exa 3.27 to find standard deviation and probability of error
1 blue//blue t o blue blue f i n d blue blue s t a n d a r d blue

blue d e v i a t i o n blue blueandblue blue p r o b a b i l i t y blue


blue o f blue blue e r r o r
2
3
4
5
6
7
8
9
10
11
12

redclc ;
p =.2;
x =.8;
t =.5025;
sd = x / t ;
reddisp ( sd , s t n d a r d d e v i a t i o n ) ;
x =1.2;
t = x / sd ;
p =2*.2743;
reddisp (p , p r o b a b i l i t y o f e r r o r ) ;

Scilab code Exa 3.28 to find no of expected readings


42

1 blue//blue t o blue blue f i n d blue bluenoblue blue o f blue

blue e x p e c t e d blue blue r e a d i n g s


2
3
4
5
6
7
8
9
10

redclc ;
x =20;
h =0.04;
sd =1/(redsqrt (2) * h ) ;
t = x / sd ;
P =.3708;
reddisp (redceil (2* P * x ) , no o f e x p e c t e d r e a d i n g s ) ;

Scilab code Exa 3.29 to calculate precision index of instrument


1 blue//blue t o blue blue c a l c u l a t e blue blue p r e c i s i o n blue

blue i n d e x blue blue o f blue blue i n s t r u m e n t


2
3
4
5
6
7
8
9
10
11

redclc ;
t =.675;
x =2.4;
sd = x / t ;
h =1/(redsqrt (2) * sd ) ;
reddisp (h , p r e c i s i o n i n d e x ) ;
t =(50 -44) / sd ;
p =.45;
n =8*30; blue
blue//blue s e p t blue bluemonthblue blueno
blue blue o f blue blue m e a s u r e m e n t s
12 a =((.5 - p ) * n ) ;
13 reddisp (a , no o f f a l s e a l a r m s ) ;
14
15 rn = a /2; blue

blue//blue r e d u c e d blue bluenoblue blue o f


blue blue f a l s e blue blue a l a r m s
16 p1 = rn / n ;
17 P =.5 - p1 ;
18 t =1.96;
43

19 sd =(50 -44) / t ;
20 h =1/(redsqrt (2) * sd ) ;
21 reddisp (h , p r e c i s i o n i n d e x ) ;

Scilab code Exa 3.30 to find confidence interval for given confidence levels
1 blue//blue t o blue blue f i n d blue blue c o n f i d e n c e blue

blue i n t e r v a l blue blue f o r blue blue g i v e n blue


blue c o n f i d e n c e blue blue l e v e l s
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

redclc ;
cl =[.5 .9 .95 .99];
s =.22;
d =[.7 1.83 2.26 3.25];
redfunction [ a ]= ci ( b )
a=s*b;
redendfunction
CI (1) = ci ( d (1) ) ;
CI (2) = ci ( d (2) ) ;
CI (3) = ci ( d (3) ) ;
CI (4) = ci ( d (4) ) ;
reddisp ( CI , c o n f i d e n c e i n t e r v a l ) ;

Scilab code Exa 3.31 to point out the reading that can be rejected by
chavenets criterion
1 blue//blue t o blue blue p o i n t blue blue o u t blue blue t h e blue

blue r e a d i n g blue blue t h a t blue bluecanblue bluebeblue


blue r e j e c t e d blue bluebyblue blue c h a v e n e t s blue
blue c r i t e r i o n
2

44

3 redclc ;
4 x =[5.3 5.73 6.77 5.26 4.33 5.45 6.09 5.64 5.81
5

5.75]*10^ -3;
d =[ -.313 .117 1.157 -.353 -1.283 -.163 .477 .027
.197 .137]*10^ -3;
n =10;
X =redsum ( x ) / n ;
s =redsqrt (redsum ( d ^2) /( n -1) ) ;
a =redabs ( d ) / s ;reddisp ( a ) ;

6
7
8
9
10
11
12 redfor i =1:10 ,
13
14 redif a ( i ) >1.96 redthen
15
reddisp ( x ( i ) , r e j e c t e d
16 redend
17
redend

v a l u e );

Scilab code Exa 3.32 calculate standard deviation


1
2
3
4
5
6
7

blue//blue c a l c u l a t e blue blue s t a n d a r d blue blue d e v i a t i o n

redclc ;
x =[.9 2.3 3.3 4.5 5.7 6.7];
y =[1.1 1.6 2.6 3.2 4 5];
n =6;
a =(( n *redsum ( x .* y ) -(redsum ( x ) *redsum ( y ) ) ) /((redsum ( x
^2) * n ) -redsum ( x ) ^2) ) ;
8 b =((redsum ( y ) *redsum ( x ^2) -(redsum ( x ) *redsum ( x .* y ) ) ) /((
redsum ( x ^2) * n ) -redsum ( x ) ^2) ) ;
9
10 sdy =redsqrt ((1/ n ) *redsum (( a * x +b - y ) ^2) ) ;
11 sdx = sdy / a ;
12
13 sa =redsqrt ( n /( n *redsum ( x ^2) -redsum ( x ) ^2) ) * sdy ;

45

14 sb =redsqrt (redsum ( x ^2) /( n *redsum ( x ^2) -redsum ( x ) ^2) ) *

sdy ;
15 reddisp ( sa , s a ) ;
16 reddisp ( sb , s b ) ;

Scilab code Exa 3.34 determine value of total current considering errors
as limiting errors ans as standrd deviations
1 blue//blue d e t e r m i n e blue blue v a l u e blue blue o f blue

blue t o t a l blue blue c u r r e n t blue blue c o n s i d e r i n g blue


blue e r r o r s blue blue a s blue blue l i m i t i n g blue blue e r r o r s
blue blue a n s blue blue a s blue blue s t a n d r d blue
blue d e v i a t i o n s
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

redclc ;
I1 =200;
I2 =100;
dI1 =2;
dI2 =5;
I = I1 + I2 ;
dI =(( I1 / I ) *( dI1 / I1 ) +( I2 / I ) *( dI2 / I2 ) ) ;
reddisp ( e r r o r c o n s i d e r e d a s l i m i t i n g e r r o r s ) ;
reddisp (I , I ) ;
reddisp ( dI *I , d I ) ;
sdI =redsqrt ( dI1 ^2+ dI2 ^2) ;
reddisp ( e r r o r c o n s i d e r e d a s s t a n d a r d d e v i a t i o n s ) ;
reddisp (I , I ) ;
reddisp ( sdI , s d I ) ;

Scilab code Exa 3.35 determine probable error in the computed value of
resistnce

46

1 blue//blue d e t e r m i n e blue blue p r o b a b l e blue blue e r r o r blue

blue i n blue blue t h e blue bluecomputedblue blue v a l u e blue


blue o f blue blue r e s i s t n c e
2
3
4
5
6
7
8
9
10
11

redclc ;
r_V =12;
I =10;
r_Rv = r_V / I ;
V =100;
r1 =2;
r_Ri = V * r1 / I ^2;
r_R =redsqrt ( r_Rv ^2+ r_Ri ^2) ;
reddisp ( r_R , r R ) ;

Scilab code Exa 3.37 to find Cq and its possible errors


1 blue//blue t o blue blue f i n d blue blueCqblue blueandblue

blue i t s blue blue p o s s i b l e blue blue e r r o r s


2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

redclc ;
d =12.5;
A =( %pi /4) * d ^2*10^ -6;
W =392;
t =600;
p =1000;
g =9.81;
h =3.66;
Cq = W /( t * p * A *redsqrt (2* g * h ) ) ;
reddisp ( Cq , Cq ) ;
dW =.23/ W ;
dt =2/ t ;
dp =.1/100;
dA =2*.002;
dg =.1/100;
dh =.003/ h ;
47

19 dd =.002;
20 dCq = Cq *( dW + dt + dp + dA + dg /2+ dh /2) ;
21 reddisp ( dCq *100/ Cq , %age a b s o l u t e e r r o r ) ;
22
23 sdCq = Cq *redsqrt ( dW ^2+ dt ^2+ dp ^2+4* dd ^2+.25*( dg ^2+ dh ^2)

);
24 reddisp ( sdCq *100/ Cq , %age s t a n d a r d d e v i a t i o n e r r o r ) ;

Scilab code Exa 3.38 calculate power disipated and uncertaainity in power
1 blue//blue c a l c u l a t e blue bluepowerblue blue d i s i p a t e d blue

blueandblue blue u n c e r t a a i n i t y blue blue i n blue bluepower


2
3
4
5
6
7
8
9
10

redclc ;
V =110.2;
I =5.3;
P = V * I ;reddisp (P , power (W) d i s s i p a t e d ) ;
w_v =.2;
w_i =0.06;
dp =redsqrt (( w_v * I ) ^2+( w_i * V ) ^2) ;
reddisp ( dp *100/ P , u n c e r t a i n i t y i n power (%) ) ;

Scilab code Exa 3.39 to find uncertainity in combined resistance in both


series and in parrallel
1 blue//blue t o blue blue f i n d blue blue u n c e r t a i n i t y blue blue i n

blue bluecombinedblue blue r e s i s t a n c e blue blue i n blue


blue b o t h blue blue s e r i e s blue blueandblue blue i n blue
blue p a r r a l l e l
2
3 redclc ;
4 R1 =100;
5 R2 =50;

48

6
7
8
9
10
11
12
13
14
15
16
17
18

wR1 =.1;
wR2 =0.03;
reddisp ( s e r i e s conn ) ;
R = R1 + R2 ;reddisp (R , r e s i s t a n c e ( ohm ) ) ;
dR1 =1;
dR2 =1;
wR =redsqrt (( dR1 * wR1 ) ^2+( dR2 * wR2 ) ^2) ;reddisp ( wR ,
u n c e r t a i n i t y i n r e s i s t a n c e ( ohm ) ) ;
reddisp ( p a r r a l l e l conn ) ;
R = R1 * R2 *( R1 + R2 ) ^ -1;reddisp (R , r e s i s t a n c e ( ohm ) ) ;
dR1 =( R2 /( R1 + R2 ) ) -(( R1 * R2 ) /( R1 + R2 ) ^2) ;
dR2 =( R1 /( R1 + R2 ) ) -(( R1 * R2 ) /( R1 + R2 ) ^2) ;
wR =redsqrt (( dR1 * wR1 ) ^2+( dR2 * wR2 ) ^2) ;reddisp ( wR ,
u n c e r t a i n i t y i n r e s i s t a n c e ( ohm ) ) ;

Scilab code Exa 3.40 to calculate uncertainity in measurement


1 blue//blue t o blue blue c a l c u l a t e blue blue u n c e r t a i n i t y blue

blue i n blue bluemeasurement


2
3
4
5
6
7
8

redclc ;
l =150;
dl =0.01;
b =50;
wA = l * dl ;
reddisp ( when no u n c e r t a i n i t y i n measurement o f
l e n g t h );
9 reddisp ( wA , u n c e r t a i n i t y i n measurement o f a r e a (mm)
);

10
11 reddisp ( when no c e r t a i n i t y

);
12 wA =1.5*1.5;
13 wB =0.01;
49

i n measurement o f l e n g t h

14 wL =redsqrt (( wA ^2 -( l * wB ) ^2) / b ^2) ;


15 reddisp ( wL , u n c e r t a i n i t y i n measurement o f

l e n g t h (m)

);

Scilab code Exa 3.41 to calculate uncertainity in power


1 blue//blue t o blue blue c a l c u l a t e blue blue u n c e r t a i n i t y blue

blue i n blue bluepower


2
3
4
5
6
7
8
9
10

redclc ;
E =100;
dE =.01;
I =10;
dI =0.01;
R =10;
dR =.01;
dP =redsqrt (4* dE ^2+ dR ^2) *100; blue
blue//bluePblue=
blueEblue2/blueR
11 reddisp ( dP , %age u n c e r t a i n i t y i n power measurement ) ;
12
13 dP =redsqrt ( dE ^2+ dI ^2) *100; blue

blue//bluePblue=blueE
blueblue I
14 reddisp ( dP , %age u n c e r t a i n i t y i n power measurement ) ;

50

Chapter 4
Dynamic Characteristics of
Instruments and Measurement
systems

Scilab code Exa 4.1 calculating the temperature


1 blue//blue blue c a l c u l a t i n g blue blue t h e blue
2
3
4
5
6
7

blue t e m p e r a t u r e blue blue a f t e r blue blue 1 . 5 blue blue s


redclc ;
th0 =100;
t =1.5;
tc =3.5;
th = th0 *[1 -redexp ( - t / tc ) ];
reddisp ( th , t e m p e r a t u r e a f t e r 1 . 5 s ( d e g r e e C) )

Scilab code Exa 4.2 calculate time to read half of the temperature difference
1 blue//blue blue c a l c u l a t e blue blue t i m e blue blue t o blue

blue r e a d blue blue h a l f blue blue o f blue blue t h e blue


51

2
3
4
5
6
7

blue t e m p e r a t u r e blue blue d i f f e r e n c e


redclc ;
tc =10/5;
th =1;
th0 =2;
t = - tc *redlog (1 -( th / th0 ) ) ;
reddisp (t , Time t o r e a d h a l f o f t h e t e m p e r a t u r e
difference ( s ) )

Scilab code Exa 4.4 Calculate the temperature after 10s


1 blue//blue blue C a l c u l a t e blue blue t h e blue blue t e m p e r a t u r e
2
3
4
5
6
7
8

blue blue a f t e r blue blue10blue s


redclc ;
th0 =25;
thi =150;
t =10;
tc =6;
th = th0 +( thi - th0 ) *[redexp ( - t / tc ) ];
reddisp ( th , t h e t e m p e r a t u r e a f t e r 10 s ( d e g r e e C) )

Scilab code Exa 4.5 Calculate the value of resistance after 15s
1 blue//blue blue C a l c u l a t e blue blue t h e blue blue v a l u e blue
2
3
4
5
6
7
8

blue o f blue blue r e s i s t a n c e blue blue a f t e r blue blue15blue s


redclc ;
R0 =29.44;
Rs =100;
t =15;
tc =5.5;
R_15 = Rs + R0 *[1 -redexp ( - t / tc ) ];
reddisp ( R_15 , v a l u e o f r e s i s t a n c e a f t e r 15 s ( ohm ) )
52

Scilab code Exa 4.6 Calculate the depth after one hour
1 blue//blue blue C a l c u l a t e blue blue t h e blue blue d e p t h blue
2
3
4
5
6
7
8
9
10
11
12
13

blue a f t e r blue blueoneblue blue h o u r


redclc ;
Qm =0.16*10^ -3;
Hin =1.2;
K1 = Qm /( Hin ) ^0.5;
Qo =0.2*10^ -3;
Ho =( Qo / K1 ) ^2;
R = Hin / Qm ;
C =0.1;
tc = R * C ;
t =3600;
H = Ho +( Hin - Ho ) *redexp ( - t / tc ) ;
reddisp (H , t h e d e p t h a f t e r one h o u r (m) )

Scilab code Exa 4.8 Calculate time constant


1
2
3
4
5
6
7
8
9
10
11
12
13

blue//blue C a l c u l a t e blue blue t i m e blue blue c o n s t a n t


redclc ;
S =3.5;
Ac =( %pi /4) *(0.25) ^2;
alpha =0.18*10^ -3;
Vb = S * Ac / alpha ;
reddisp ( Vb , volume o f b u l b (mm2) )
Rb =[( Vb / %pi ) *(3/4) ]^(1/3) ;
Ab =4* %pi * Rb ^2;
D =13.56*10^3;
s =139;
H =12;
53

14 tc =( D * s * Vb *10^ -9) /( H * Ab *10^ -6) ;


15 reddisp ( tc , t i m e c o n s t a n t ( s ) )

Scilab code Exa 4.9 Calculate the temperature after 10s


1 blue//blue blue C a l c u l a t e blue blue t h e blue blue t i m e blue
2
3
4
5

blue c o n s t a n t
ess =5;
A =0.1;
tc = ess / A ;
reddisp ( tc , t i m e c o n s t a n t ( s ) )

Scilab code Exa 4.10 Calculate the temperature at a depth of 1000 m


1 blue//blue blue C a l c u l a t e blue blue t h e blue blue t e m p e r a t u r e

2
3
4
5
6

blue blue a t blue blueablue blue d e p t h blue blue o f blue


blue 1 0 0 0 blue bluem
redclc ;
th0 =20;
t =2000;
thr = th0 -0.005*( t -50) -0.25*redexp ( - t /50) ;
reddisp ( thr , t e m p e r a t u r e a t a d e p t h o f 1 0 0 0 m ( d e g r e e
C) )

Scilab code Exa 4.11 Calculate the value of resistance at different values
of time
1 blue//blue blue C a l c u l a t e blue blue t h e blue blue v a l u e blue

blue o f blue blue r e s i s t a n c e blue blue a t blue blue d i f f e r e n t


blue blue v a l u e s blue blue o f blue blue t i m e
54

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

redclc ;
Gain =0.3925;
T =75;
p_duration = Gain * T ;
tc =5.5;
Rin =100;
t =1;
Rt = p_duration *(1 -redexp ( - t / tc ) ) + Rin ;
reddisp ( Rt , V a l u e o f r e s i s t a n c e a f t e r 1 s ( ohm )= )
t =2;
Rt = p_duration *(1 -redexp ( - t / tc ) ) + Rin ;
reddisp ( Rt , V a l u e o f r e s i s t a n c e a f t e r 2 s ( ohm )= )
t =3;
Rt = p_duration *(1 -redexp ( - t / tc ) ) + Rin ;
reddisp ( Rt , V a l u e o f r e s i s t a n c e a f t e r 3 s ( ohm )= )
R_inc = Rt - Rin ;
t =5;
Rt =( R_inc ) *[redexp ( -(t -3) /(5.5) ) ]+ Rin ;
reddisp ( Rt , V a l u e o f r e s i s t a n c e a f t e r 5 s ( ohm )= )
t =10;
Rt =( R_inc ) *[redexp ( -(t -3) /(5.5) ) ]+ Rin ;
reddisp ( Rt , V a l u e o f r e s i s t a n c e a f t e r 10 s ( ohm )= )
t =20;
Rt =( R_inc ) *[redexp ( -(t -3) /(5.5) ) ]+ Rin ;
reddisp ( Rt , V a l u e o f r e s i s t a n c e a f t e r 20 s ( ohm )= )
t =30;
Rt =( R_inc ) *[redexp ( -(t -3) /(5.5) ) ]+ Rin ;
reddisp ( Rt , V a l u e o f r e s i s t a n c e a f t e r 30 s ( ohm )= )

Scilab code Exa 4.12 calculate the value of damping constant and frequency of damped oscillations
1 blue//blue blue c a l c u l a t e blue blue t h e blue blue v a l u e blue

blue o f blue bluedampingblue blue c o n s t a n t blue blueand


blue blue f r e q u e n c y blue blue o f blue bluedampedblue
55

2
3
4
5
6
7
8
9
10
11

blue o s c i l l a t i o n s
redclc ;
M =8*10^ -3;
K =1000;
wn =( K / M ) ^0.5;
reddisp ( f o r c r i t i c a l l y damped s y s t e m e t a =1 )
B =2*( K * M ) ;
reddisp (B , Damping c o n s t a n t f o r c r i t i c a l l y damped
s y s t e m (N/ms1)= )
eta =0.6;
wd = wn *(1 - eta ^2) ^0.5;
reddisp ( wd , f r e q u e n c y o f damped o s c i l l a t i o n s ( r a d / s )=
)

Scilab code Exa 4.13 Calculate damping ratio natural frequency frequency
of damped oscillations time constant and steady state error for ramp signal
1 blue//blue blue C a l c u l a t e blue bluedampingblue blue r a t i o

3
4
5
6
7
8
9
10
11
12

blue , blue blue n a t u r a l blue blue f r e q u e n c y blue , blue


blue f r e q u e n c y blue blue o f blue bluedampedblue
blue o s c i l l a t i o n s blue , blue blue t i m e blue blue c o n s t a n t
blue//blue blueandblue blue s t e a d y blue blue s t a t e blue
blue e r r o r blue blue f o r blue bluerampblue blue s i g n a l blue
blue o f blue blue5blueVblue/blue s
redclc ;
K =(40*10^ -6) /( %pi /2) ;
J =0.5*10^ -6;
B =5*10^ -6;
eta = B /(2*( K * J ) ^0.5) ;
reddisp ( eta , damping r a t i o = )
wn =( K / J ) ^0.5;
reddisp ( wn , n a t u r a l f r e q u e n c y ( r a d / s e c ) )
wd = wn *(1 -( eta ) ^2) ^0.5;
reddisp ( wd , f r e q u e n c y o f damped o s c i l l a t i o n s ( r a d / s )
)
56

13
14
15
16
17
18
19
20

tc =1/ wn ;
reddisp ( tc , t i m e c o n s t a n t ( s ) )
ess =2* eta / wn ;
reddisp ( f o r a ramp i n p u t o f 5V, s t e a d y s t a t e e r r o r (
V) = )
ess =5*2* eta / wn ;
reddisp ( ess , )
T_lag =2* eta * tc ;
reddisp ( T_lag , Time l a g ( s ) )

Scilab code Exa 4.14 Calculate the natural frequency


1 blue//blue blue C a l c u l a t e blue blue t h e blue blue n a t u r a l blue
2
3
4
5
6
7
8
9
10
11
12
13
14

blue blue f r e q u e n c y
redclc ;
wn =2* %pi *30;
reddisp ( f o r a f r e q u e n c y o f 30 Hz wn=(K/M+510 3)
0 . 5 . . . . . . . . . ( i ) );
reddisp ( But wn=(K/M) 0 . 5 . . . . . . . . . ( i i ) ) ;
reddisp ( f o r a f r e q u e n c y o f 25 Hz wn=(K/M
+510 3+510 3) 0 . 5 . . . . . . . . . ( i i i ) )
reddisp ( on s o l v i n g ( i ) , ( i i ) and ( i i i ) )
M =6.36*10^ -3;
K =403.6;
reddisp (M , M= )
reddisp (K , K= )
wn =( K / M ) ^0.5;
f = wn /(2* %pi ) ;
reddisp (f , n a t u r a l f r e q u e n c y ( Hz ) )

Scilab code Exa 4.15 Calculate natural frequency and setteling time

57

1 blue//blue blue C a l c u l a t e blue blue n a t u r a l blue

2
3
4
5
6
7
8
9

blue f r e q u e n c y blue blueandblue blue s e t t e l i n g blue


blue t i m e
redclc ;
K =60*10^3;
M =30;
wn =( K / M ) ^0.5;
reddisp ( wn , n a t u r a l f r e q u e n c y ( r a d / s e c ) )
eta =0.7;
ts =4/( eta * wn ) ;
reddisp ( ts , s e t t e l i n g t i m e ( s ) )

Scilab code Exa 4.16 Calculate time lag and ratio of output and input
1 blue//blue blue C a l c u l a t e blue blue t i m e blue blue l a g blue

2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

blueandblue blue r a t i o blue blue o f blue blue o u t p u t blue


blueandblue blue i n p u t
redclc ;
reddisp ( when t i m e p e r i o d i s 600 s )
w =2* %pi /600;
tc =60;
T_lag =(1/ w ) *redatan ( w * tc ) ;
reddisp ( T_lag , t i m e l a g ( s )= )
M =1/((1+( w * tc ) ^2) ^0.5) ;
reddisp (M , r a t i o o f o u t p u t and i n p u t= )
reddisp ( when t i m e p e r i o d i s 120 s )
w =2* %pi /120;
tc =60;
T_lag =(1/ w ) *redatan ( w * tc ) ;
reddisp ( T_lag , t i m e l a g ( s )= )
M =1/((1+( w * tc ) ^2) ^0.5) ;
reddisp (M , r a t i o o f o u t p u t and i n p u t= )

58

Scilab code Exa 4.17 Calculate the maximum allowable time constant and
phase shift
1 blue//blue blue C a l c u l a t e blue blue t h e blue bluemaximumblue

2
3
4
5
6
7
8
9
10
11
12

blue a l l o w a b l e blue blue t i m e blue blue c o n s t a n t blue


blueandblue blue p h a s e blue blue s h i f t
redclc ;
M =1 -0.05;
w =2* %pi *100;
tc ={[(1/ M ^2) -1]/( w ^2) }^0.5;
reddisp ( tc , maximum a l l o w a b l e t i m e c o n s t a n t ( s ) )
reddisp ( p h a s e s h i f t a t 50 Hz ( d e g r e e )= )
ph =[ -redatan (2* %pi *50* tc ) ]*(180/ %pi ) ;
reddisp ( ph , )
reddisp ( p h a s e s h i f t a t 100 Hz ( d e g r e e )= )
ph =[ -redatan (2* %pi *100* tc ) ]*(180/ %pi ) ;
reddisp ( ph ,)

Scilab code Exa 4.18 Calculate maximum value of indicated temperature


and delay time
1 blue//blue blue C a l c u l a t e blue bluemaximumblue blue v a l u e

2
3
4
5
6
7
8
9
10
11

blue blue o f blue blue i n d i c a t e d blue blue t e m p e r a t u r e blue


blueandblue blue d e l a y blue blue t i m e
redclc ;
T =120;
w =2* %pi / T ;
tc1 =40;
tc2 =20;
M =[1/((1+( w * tc1 ) ^2) ^0.5) ]*[1/((1+( w * tc2 ) ^2) ^0.5) ];
M_temp = M *10;
reddisp ( M_temp , maximum v a l u e o f i n d i c a t e d
t e m p e r a t u r e ( d e g r e e C) )
ph =[{redatan ( w * tc1 ) +redatan ( w * tc2 ) }];
T_lag = ph / w ;
59

12 reddisp ( T_lag , Time l a g ( s ) )

Scilab code Exa 4.19 Find the output


1 blue//blue blueFindblue blue t h e blue blue o u t p u t
2 redclc ;
3 reddisp ( when t c = 0 . 2 ) ;
4 d i s p ( output =1/(1+(2*0.2) ^2) ^0.5]redsin [2 t -redatan

5
6
7

(2*0.2) ]+3/(1+(2*0.2) ^2) ^0.5]redsin [20 t -redatan


(20*0.2) ] )
reddisp ( on s o l v i n g
o u t p u t =0.93 s i n ( 2 t 2 1 . 8 ) + 0 . 0 7 3
s i n ( 2 0 t 76) )
reddisp ( when t c = 0 . 0 0 2 ) ;
d i s p ( output =1/(1+(2*0.002) ^2) ^0.5]redsin [2 t -redatan
(2*0.002) ]+3/(1+(2*0.002) ^2) ^0.5]redsin [20 t redatan (20*0.002) ] )
reddisp ( on s o l v i n g
o u t p u t= 1 s i n ( 2 t 0 . 2 3 ) +0.3 s i n
(20 t 2.3) )

Scilab code Exa 4.20 Calculate maximum and minimum value of indicated temperature phase shift time lag
1 blue//blue C a l c u l a t e blue bluemaximumblue blueandblue

2
3
4
5
6
7
8

blueminimumblue blue v a l u e blue blue o f blue blue i n d i c a t e d


blue blue t e m p e r a t u r e blue , blue blue p h a s e blue blue s h i f t
blue , blue blue t i m e blue blue l a g
redclc ;
T_max =640;
T_min =600;
T_mean =( T_max + T_min ) /2;
Ai = T_mean - T_min ;
w =2* %pi /80;
tc =10;
60

9 Ao = Ai /{(1+( w * tc ) ^2) }^0.5;


10 T_max_indicated = T_mean + Ao ;
11 reddisp ( T_max_indicated , Maximum v a l u e o f

indicated

t e m p e r a t u r e ( d e g r e e C)= )
12 T_min_indicated = T_mean - Ao ;
13 reddisp ( T_min_indicated , Minimum v a l u e o f

indicated

t e m p e r a t u r e ( d e g r e e C)= )
14 ph = -redatan ( w * tc ) ;
15 Time_lag = - ph / w ;
16 reddisp ( Time_lag , Time l a g ( s ) )

Scilab code Exa 4.21 determine damping ratio


1
2
3
4
5
6
7
8
9
10

blue//blue blue d e t e r m i n e blue bluedampingblue blue r a t i o


redclc ;
w =2;
K =1.5;
J =200*10^ -3;
wn =( K / J ) ^0.5;
u = w / wn ;
M =1.1;
eta =[{[1/( M ^2) ] -[(1 - u ^2) ^2]}/(2* u ) ^2]^0.5;
reddisp ( eta , damping r a t i o = )

Scilab code Exa 4.22 Calculate the frequency range


1 blue//blue blue C a l c u l a t e blue blue t h e blue blue f r e q u e n c y
2
3
4
5

blue blue r a n g e
redclc ;
eta =0.6;
fn =1000;
M =1.1;
61

6 reddisp ( M= 1 /[ [ (1 u 2 ) 2 ] + ( 2 u e t a ) 2 ] 0 . 5 ;

. . . . . . . . . . ( i ) )
7 reddisp ( on s o l v i n g u 4 0.5 u 2+0.173=0 )
8 reddisp ( t h e a b o v e e q u a t i o n g i v e s i m a g i n a r y v a l u e s

9
10
11
12
13
14
15

f o r f r e q u e n c y s o f o r e t a =0.6 t h e o u t p u t i s n o t
1.1 )
reddisp ( Now l e t M= 0 . 9 , on s o l v i n g e q u a t i o n ( i ) we
have )
reddisp ( u 4 0.56 u 2 0.234=0 )
reddisp ( on s o l v i n g u = 0 . 9 1 6 )
u =0.916;
f = u * fn ;
reddisp (f , maximum v a l u e o f r a n g e ( Hz )= )
reddisp ( So , t h e r a n g e o f t h e f r e q u e n c y i s from 0 t o
916 Hz )

Scilab code Exa 4.23 determine the error


1
2
3
4
5
6
7
8
9

blue//blue blue d e t e r m i n e blue blue t h e blue blue e r r o r


redclc ;
w =6;
wn =4;
u = w / wn ;
eta =0.66;
M =1/{[(1 - u ^2) ^2]+(2* eta * u ) ^2}^0.5;
Error =( M -1) *100;
reddisp ( Error , e r r o r (%)= )

62

Chapter 5
Primary Sensing Elements and
Transducers

Scilab code Exa 5.1 Calculate the deflection at center


1 blue//blue blue C a l c u l a t e blue blue t h e blue blue d e f l e c t i o n
2
3
4
5
6
7
8
9
10
11
12

blue blue a t blue blue c e n t e r


redclc ;
D =15*10^ -3;
P =300*10^3;
sm =300*10^6;
t =[3* D ^2* P /(16* sm ) ]^0.5;
reddisp (t , t h i c k n e s s (m)= )
P =150*10^3;
v =0.28;
E =200*10^9;
dm =3*(1 - v ^2) * D ^4* P /(256* E * t ^3) ;
reddisp ( dm , d e f l e c t i o n a t c e n t e r f o r P r e s s u r e o f 150
kN/m2(m)= )

Scilab code Exa 5.2 Calculate the angle of twist


63

1 blue//blue blue C a l c u l a t e blue blue t h e blue blue a n g l e blue


2
3
4
5
6
7

blue o f blue blue t w i s t


redclc ;
T =100;
G =80*10^9;
d =2*15*10^ -3;
th =16* T /( %pi * G * d ^3)
reddisp ( th , a n g l e o f t w i s t ( r a d )= )

Scilab code Exa 5.3 Calculate the Torque


1
2
3
4
5
6
7
8
9
10

blue//blue blue C a l c u l a t e blue blue t h e blue blueTorque


redclc ;
E =110*10^9;
t =0.073*10^ -3;
b =0.51*10^ -3;
l =370*10^ -3;
th = %pi /2;
T =( E * b * t ^3) * th /(12* l ) ;
reddisp (T , C o n t r o l l i n g t o r q u e (Nm)= )

Scilab code Exa 5.4 Calculating the displacement and resolution of the
potentiometer
1 blue//blue C a l c u l a t i n g blue blue t h e blue blue d i s p l a c e m e n t

2
3
4
5
6

blue blueandblue blue r e s o l u t i o n blue blue o f blue blue t h e


blue blue p o t e n t i o m e t e r
redclc ;
Rnormal =10000/2;
Rpl =10000/50;
Rc1 = Rnormal -3850;
Dnormal = Rc1 / Rpl ;
64

reddisp ( Dnormal , D i s p l a c e m e n t (mm)= )


Rc2 = Rnormal -7560;
Dnormal = Rc2 / Rpl ;
reddisp ( Dnormal , D i s p l a c e m e n t (mm)= )
reddisp ( s i n c e one d i s p l a c e m e n t i s p o s i t i v e and o t h e r
i s n e g a t i v e s o two d i s p l a c e m e n t s a r e i n t h e
opposite direction )
12 Re =10*1/200;
13 reddisp ( Re , R e s o l u t i o n (mm)= )

7
8
9
10
11

Scilab code Exa 5.5 plot the graph of error versus K


1 blue//blue blue p l o t blue blue t h e blue blue g r a p h blue blue o f
2
3
4
5

blue blue e r r o r blue blue v e r s u s blue blueK


redclc ;
K =[0
0.25
0.5
0.75
1];
V =[0
-0.174
-0.454
-0.524
0];
redplot (K , V )

Scilab code Exa 5.6 Calculating the output voltage


1 blue//blue C a l c u l a t i n g blue blue t h e blue blue o u t p u t blue
2
3
4
5
6
7
8
9

blue v o l t a g e
redclc ;
RAB =125;
Rtotal =5000;
R2 =75/125* Rtotal ;
R4 =2500;
ei =5;
eo =[( R2 / Rtotal ) -( R4 / Rtotal ) ]* ei ;
reddisp ( eo , o u t p u t v o l t a g e (V)= )

65

Scilab code Exa 5.7 Calculating the maximum excitation voltage and the
sensitivity
1 blue//blue blue C a l c u l a t i n g blue blue t h e blue bluemaximum

2
3
4
5
6
7
8
9
10

blue blue e x c i t a t i o n blue blue v o l t a g e blue blueandblue


blue t h e blue blue s e n s i t i v i t y
redclc ;
Rm =10000;
Rp = Rm /15;
R =600;
P =5;
ei = ( P * R ) ^0.5;
reddisp ( ei , Maximum e x c i t a t i o n v o l t a g e (V)= )
S = ei /360;
reddisp (S , S e n s i t i v i t y (V/ d e g r e e )= )

Scilab code Exa 5.8 Calculating the resolution of the potentiometer


1 blue//blue blue C a l c u l a t i n g blue blue t h e blue blue r e s o l u t i o n
2
3
4
5

blue blue o f blue blue t h e blue blue p o t e n t i o m e t e r


redclc ;
Rwga =1/400;
Re = Rwga /5;
reddisp ( Re , R e s o l u t i o n (mm)= )

Scilab code Exa 5.9 Checking the suitability of the potentiometer


1 blue//blue blue C h e c k i n g blue blue t h e blue blue s u i t a b i l i t y

blue blue o f blue blue t h e blue blue p o t e n t i o m e t e r


66

2
3
4
5
6
7
8
9
10

redclc ;
mo =0.8;
sr =250;
sm = sr / mo ;
R = sm *1;
reddisp (R , r e s o l u t i o n o f 1mm movement )
Rq =300/1000;
reddisp ( Rq , r e s o l u t i o n r e q u i r e d= )
reddisp ( s i n c e t h e r e s o l u t i o n o f p o t e n t i o m e t e r i s
h i g h e r than the r e s o l u t i o n r e q u i r e d so i t i s
s u i t a b l e f o r the a p p l i c a t i o n )

Scilab code Exa 5.10 Checking the suitability of the potentiometer


1 blue//blue blue C h e c k i n g blue blue t h e blue blue s u i t a b i l i t y
2
3
4
5
6
7
8

blue blue o f blue blue t h e blue blue p o t e n t i o m e t e r


redclc ;
Pd =(10^2) /150;
reddisp ( Pd , Power d i s s i p a t i o n (W)= )
th_pot =80+ Pd *30*10^ -3;
PDa =1 -(10*10^ -3) *( th_pot -35) ;
reddisp ( PDa , Power d i s s i p a t i o n a l l o w e d (W)= )
reddisp ( S i n c e power d i s s i p a t i o n i s h i g h e r t h a n t h e
d i s s i p a t i o n allowed so p o t e n t i o m e t e r i s not
suitable )

Scilab code Exa 5.11 Calculating the possion ratio


1 blue//blue blue C a l c u l a t i n g blue blue t h e blue blue p o s s i o n

blue blue s blue blue r a t i o


2 redclc ;
3 Gf =4.2;
4 v =( Gf -1) /2;

67

5 reddisp (v , P o s s i o n s r a t i o = )

Scilab code Exa 5.12 Calculating the value of the resistance of the gauges
1 blue//blue blue C a l c u l a t i n g blue blue t h e blue blue v a l u e blue

2
3
4
5
6
7
8
9
10
11

blue o f blue blue t h e blue blue r e s i s t a n c e blue blue o f blue


blue t h e blue blue g a u g e s
redclc ;
strain = -5*10^ -6;
Gf = -12.1;
R =120;
dR_nickel = Gf * R * strain ;
reddisp ( dR_nickel , c h a n g e i n r e s i s t a n c e o f n i c k e l ( ohm
)= )
Gf =2;
R =120;
dR_nicrome = Gf * R * strain ;
reddisp ( dR_nicrome , c h a n g e i n r e s i s t a n c e o f n i c r o m e (
ohm )= )

Scilab code Exa 5.13 calculate the percentage change in value of the gauge
resistance
1 blue//blue blue c a l c u l a t e blue blue t h e blue blue p e r c e n t a g e

2
3
4
5
6
7
8

blue blue c h a n g e blue blue i n blue blue v a l u e blue blue o f


blue blue t h e blue blue g a u g e blue blue r e s i s t a n c e
redclc ;
s =100*10^6;
E =200*10^9;
strain = s / E ;
Gf =2;
r_perunit = Gf * strain *100;
reddisp ( r_perunit , P e r c e n t a g e c h a n g e i n r e s i s t a n c e = )
68

Scilab code Exa 5.14 Calculating the Gauge factor


1 blue//blue C a l c u l a t i n g blue blue t h e blue blueGaugeblue
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

blue f a c t o r
redclc ;
b =0.02;
d =0.003;
I =( b * d ^3) /12;
E =200*10^9;
x =12.7*10^ -3;
l =0.25;
F =3* E * I * x / l ^3;
x =0.15;
M=F*x;
t =0.003;
s =( M * t ) /( I *2) ;
strain = s / E ;
dR =0.152;
R =120;
Gf =( dR / R ) / strain ;
reddisp ( Gf , Gauge f a c t o r = )

Scilab code Exa 5.15 Calculating the change in length and the force applied
1 blue//blue blue C a l c u l a t i n g blue blue t h e blue blue c h a n g e

blue blue i n blue blue l e n g t h blue blueandblue blue t h e blue


blue f o r c e blue blue a p p l i e d
2 redclc ;
3 dR =0.013;
4 R =240;
69

5
6
7
8
9
10
11
12
13
14

l =0.1;
Gf =2.2;
dl =( dR / R ) * l / Gf ;
reddisp ( dl , c h a n g e i n l e n g t h (m)= )
strain = dl / l ;
E =207*10^9;
s = E * strain ;
A =4*10^ -4;
F=s*A;
reddisp (F , F o r c e (N) )

Scilab code Exa 5.16 Calculate the linear approximation


1 blue//blue blue C a l c u l a t e blue blue t h e blue blue l i n e a r blue
2
3
4
5
6
7
8
9
10
11

blue a p p r o x i m a t i o n
redclc ;
th1 =30;
th2 =60;
th0 = th1 + th2 /2;
Rth1 =4.8;
Rth2 =6.2;
Rth0 =5.5;
ath0 =(1/ Rth0 ) *( Rth2 - Rth1 ) /( th2 - th1 ) ;
reddisp ( ath0 , a l p h a a t o d e g r e e ( / d e g r e e C)= )
reddisp ( 5 . 5 [ 1 + 0 . 0 0 8 5 ( th 45) ] )

Scilab code Exa 5.17 Calculate the linear approximation


1 blue//blue blue C a l c u l a t e blue blue t h e blue blue l i n e a r blue

blue a p p r o x i m a t i o n
2 redclc ;
3 th1 =100;
4 th2 =130;

70

5 th0 = th1 + th2 /2;


6 Rth1 =573.40;
7 Rth2 =605.52;
8 Rth0 =589.48;
9 ath0 =(1/ Rth0 ) *( Rth2 - Rth1 ) /( th2 - th1 ) ;
10 reddisp ( ath0 , a l p h a a t o d e g r e e ( / d e g r e e C)= )
11 reddisp ( L i n e a r a p p r o x i m a t i o n i s : Rth=

5 8 9 . 4 8 [ 1 + 0 . 0 0 1 8 2 ( th 115) ] )

Scilab code Exa 5.18 Calculate the resistance and the temperature
1 blue//blue blue C a l c u l a t e blue blue t h e blue blue r e s i s t a n c e
2
3
4
5
6
7
8
9
10

blue blueandblue blue t h e blue blue t e m p e r a t u r e


redclc ;
Rth0 =100;
ath0 =0.00392;
dth =65 -25;
R65 = Rth0 *[1+ ath0 * dth ];
reddisp ( R65 , r e s i s t a n c e a t 65 d e g r e e C( ohm )= )
th ={[(150/100) -1]/ ath0 }+25;
reddisp ( th , T e m p e r a t u r e ( d e g r e e C) )

Scilab code Exa 5.19 Calculate the resistance


1
2
3
4
5
6
7

blue//blue blue C a l c u l a t e blue blue t h e blue blue r e s i s t a n c e


redclc ;
Rth0 =10;
ath0 =0.00393;
dth =150 -20;
R150 = Rth0 *[1+ ath0 * dth ];
reddisp ( R150 , r e s i s t a n c e a t 150 d e g r e e C( ohm )= )
71

Scilab code Exa 5.20 Calculate the time


1
2
3
4
5
6
7

blue//blue blue C a l c u l a t e blue blue t h e blue blue t i m e


redclc ;
th =30;
th0 =50;
tc =120;
t = -120*[redlog (1 -( th / th0 ) ) ];
reddisp (t , t i m e ( s )= )

Scilab code Exa 5.21 Calculate the resistance


1
2
3
4
5
6
7

blue//blue blue C a l c u l a t e blue blue t h e blue blue r e s i s t a n c e


redclc ;
R25 =100;
ath = -0.05;
dth =35 -25;
R35 = R25 *[1+ ath * dth ];
reddisp ( R35 , r e s i s t a n c e a t 35 d e g r e e C( ohm )= )

Scilab code Exa 5.22 find resistance


1
2
3
4
5
6
7

blue//
redclc ;
Ro =3980;
Ta =273;
reddisp ( 3980= a 3 9 8 0 exp ( b / 2 7 3 ) )
Rt50 =794;
Ta50 =273+50;
72

8
9
10
11
12
13
14
15

reddisp ( 794= a 3 9 8 0 exp ( b / 3 2 3 ) )


reddisp ( on s o l v i n g )
reddisp ( a =3010 6 , b=2843 )
Ta40 =273+40;
Rt40 =(30*10^ -6) *3980*redexp (2843/313) ;
reddisp ( Rt40 , R e s i s t a n c e a t 40 d e g r e e C ( ohm ) )
Rt100 =(30*10^ -6) *3980*redexp (2843/373) ;
reddisp ( Rt100 , R e s i s t a n c e a t 100 d e g r e e C ( ohm ) )

Scilab code Exa 5.23 calculating the change in temperature


1 blue//blue blue c a l c u l a t i n g blue blue t h e blue blue c h a n g e
2
3
4
5

blue blue i n blue blue t e m p e r a t u r e


redclc ;
th =((1 -1800/2000) /0.05) +70;
dth = th -70;
reddisp ( dth , c h a n g e i n t e m p e r a t u r e ( d e g r e e C) )

Scilab code Exa 5.24 calculating the frequencies of oscillation


1 blue//blue blue c a l c u l a t i n g blue blue t h e blue
2
3
4
5
6
7
8
9
10

blue f r e q u e n c i e s blue blue o f blue blue o s c i l l a t i o n


redclc ;
C =500*10^ -12;
R20 =10000*(1 -0.05*(20 -25) ) ;
f20 =1/(2* %pi * R20 * C ) ;
reddisp ( f20 , F r e q u e n c y o f o s c i l l a t i o n a t 20 d e g r e e C
( Hz ) )
R25 =10000*(1 -0.05*(25 -25) ) ;
f25 =1/(2* %pi * R25 * C ) ;
reddisp ( f25 , F r e q u e n c y o f o s c i l l a t i o n a t 25 d e g r e e C
( Hz ) )
R30 =10000*(1 -0.05*(30 -25) ) ;
73

11 f30 =1/(2* %pi * R30 * C ) ;


12 reddisp ( f30 , F r e q u e n c y o f

o s c i l l a t i o n a t 30 d e g r e e C

( Hz ) )

Scilab code Exa 5.25 Calculating the sensitivity and maximum output
voltage
1 blue//blue blue C a l c u l a t i n g blue blue t h e blue

2
3
4
5
6

blue s e n s i t i v i t y blue blueandblue bluemaximumblue


blue o u t p u t blue blue v o l t a g e
redclc ;
Se_thermocouple =500 -( -72) ;
reddisp ( Se_thermocouple , S e n s i t i v i t y o f t h e r m o c o u p l e
( m i c r o V/ d e g r e e C)= )
Vo = Se_thermocouple *100*10^ -6;
reddisp ( Vo , maximum o u t p u t v o l t a g e (V)= )

Scilab code Exa 5.26 Calculating the temperature


1 blue//blue blue C a l c u l a t i n g blue blue t h e blue
2
3
4
5

blue t e m p e r a t u r e
redclc ;
ET =27.07+0.8;
Disp ( ET , R e q u i r e d e .m. f . (mV) )
reddisp ( t e m p e r a t u r e c o r r e s p o n d i n g t o 2 7 . 8 7 mV i s 620
degree C )

Scilab code Exa 5.27 Calcating the series resistance and approximate error

74

1 blue//blue blue C a l c a t i n g blue blue t h e blue blue s e r i e s blue

2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

blue r e s i s t a n c e blue blueandblue blue a p p r o x i m a t e blue


blue e r r o r
redclc ;
Rm =50;
Re =12;
E =33.3*10^ -3;
i =0.1*10^ -3;
Rs =( E / i ) -Rm - Re ;
reddisp ( Rs , s e r i e s r e s i s t a n c e ( ohm )= )
Re =13;
i1 = E /( Rs + Re + Rm ) ;
AE =[( i1 - i ) / i ]*800;
reddisp ( AE , a p p r o x i m a t e e r r o r due t o r i s e i n
r e s i s t a n c e o f 1 ohm i n Re ( d e g r e e C)= )
R_change =50*0.00426*10;
i1 = E /( Rs + Re + Rm + R_change ) ;
AE =[( i1 - i ) / i ]*800;
reddisp ( AE , a p p r o x i m a t e e r r o r due t o r i s e i n Temp . o f
10 ( d e g r e e C)= )

Scilab code Exa 5.28 Calculate the values of resistance R1 and R2


1 blue//blue blue C a l c u l a t e blue blue t h e blue blue v a l u e s blue

2
3
4
5
6
7
8
9

blue o f blue blue r e s i s t a n c e blue blueR1blue blueandblue


blueR2
redclc ;
E_20 =0.112*10^ -3;blue//blue blueemfblue blue a t blue blue20
blue d e g r e e blue blueC
E_900 =8.446*10^ -3;
E_1200 =11.946*10^ -3;
E1 = E_900 - E_20 ;
E2 = E_1200 - E_20 ;
reddisp ( E1 =1. 08 R1 / ( R1+2.5+R2 ) ;
( i ) )
reddisp ( E2 = 1 . 0 8 ( R1 + 2 . 5 ) / ( R1+2.5+R2 ) ;
( i i ) )
75

10
11
12
13
14

reddisp ( on s o l v i n g ( i ) and ( i i ) )
R1 =5.95;
R2 =762.6;
reddisp ( R1 , v a l u e o f r e s i s t a n c e R1 ( ohm )= )
reddisp ( R2 , v a l u e o f r e s i s t a n c e R2 ( ohm )= )

Scilab code Exa 5.29 Calculate the percentage linearity


1 blue//blue blue C a l c u l a t e blue blue t h e blue blue p e r c e n t a g e

blue blue l i n e a r i t y
2 redclc ;
3 linearity_percentage =(0.003/1.5) *100;
4 reddisp ( linearity_percentage , p e r c e n t a g e l i n e a r i t y = )

Scilab code Exa 5.30 Calculate senstivity of the LVDT


1 blue//blue blue C a l c u l a t e blue blue s e n s t i v i t y blue blue o f

2
3
4
5
6
7
8
9
10
11
12

blue blue t h e blue blueLVDTblue , blue blue I n s t r u m e n t blue


blueandblue blue r e s o l u t i o n blue blue o f blue
blue i n s t r u m e n t blue blue i n blue bluemm
redclc ;
displacement =0.5;
Vo =2*10^ -3;
Se_LVDT = Vo / displacement ;
reddisp ( Se_LVDT , s e n s t i v i t y o f t h e LVDT (V/mm) )
Af =250;
Se_instrument = Se_LVDT * Af ;
reddisp ( Se_instrument , s e n s t i v i t y o f i n s t r u m e n t (V/mm
) )
sd =5/100;
Vo_min =50/5;
Re_instrument =1*1/1000;
76

13 reddisp ( Re_instrument , r e s o l u t i o n

o f i n s t r u m e n t i n mm

Scilab code Exa 5.31 calculate the deflection maximum and minimum force
1 blue//blue blue c a l c u l a t e blue blue t h e blue blue d e f l e c t i o n

2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

blue , blue bluemaximumblue blueandblue blueminimumblue


blue f o r c e
redclc ;
b =0.02;
t =0.004;
I =(1/12) * b * t ^3;
F =25;
l =0.25;
E =200*10^9;
x =( F * l ^3) /(3* E * I ) ;
reddisp (x , d e f l e c t i o n (m) )
DpF = x / F ;
Se = DpF *0.5*1000;
Re =(10/1000) *(2/10) ;
F_min = Re / Se ;
F_max =10/ Se ;
reddisp ( F_min , minimum f o r c e (N) )
reddisp ( F_max , maximum f o r c e (N) )
reddisp ( Se , )

Scilab code Exa 5.32 calculating the sensitivity of the transducer


1 blue//blue blue c a l c u l a t i n g blue blue t h e blue

blue s e n s i t i v i t y blue blue o f blue blue t h e blue


blue t r a n s d u c e r
2 redclc ;
3 reddisp ( p e r m i t t i v i t y o f t h e a i r e 0 =8.8510 12 )
77

4
5
6
7
8

e0 =8.85*10^ -12;
w =25*10^ -3;
d =0.25*10^ -3;
Se = -4* e0 * w / d ;
reddisp ( Se , s e n s i t i v i t y o f t h e t r a n s d u c e r ( F/m)= )

Scilab code Exa 5.33 Calculate the value of the capacitance afte the application of pressure
1 blue//blue blue C a l c u l a t e blue blue t h e blue blue v a l u e blue

2
3
4
5
6
7

blue o f blue blue t h e blue blue c a p a c i t a n c e blue blue a f t e


blue blue t h e blue blue a p p l i c a t i o n blue blue o f blue
blue p r e s s u r e
redclc ;
C1 =370*10^ -12;
d1 =3.5*10^ -3;
d2 =2.9*10^ -3;
C2 = C1 * d1 / d2 ;
reddisp ( C2 , t h e v a l u e o f t h e c a p a c i t a n c e a f t e t h e
a p p l i c a t i o n o f p r e s s u r e ( F )= )

Scilab code Exa 5.34 Calculate the change in frequency of the oscillator
1 blue//blue blue C a l c u l a t e blue blue t h e blue blue c h a n g e blue

2
3
4
5
6
7

blue i n blue blue f r e q u e n c y blue blue o f blue blue t h e blue


blue o s c i l l a t o r
redclc ;
fo1 =100*10^3;
d1 =4;
d2 =3.7;
fo2 =[( d2 / d1 ) ^0.5]* fo1 ;
dfo = fo1 - fo2 ;
78

8 reddisp ( dfo , c h a n g e i n f r e q u e n c y o f t h e

oscillator (

Hz ) )

Scilab code Exa 5.35 Calculate the dielectric stress change in value of capacitance
1 blue//blue blue C a l c u l a t e blue blue t h e blue blue d i e l e c t r i c

2
3
4
5
6
7
8
9
10
11
12
13
14

blue blue s t r e s s blue , blue blue c h a n g e blue blue i n blue


blue v a l u e blue blue o f blue blue c a p a c i t a n c e
redclc ;
L_air =(3.1 -3) /2;
D_stress =100/ L_air ;
e0 =8.85*10^ -12;
l =20*10^ -3;
D2 =3.1;
D1 =3;
C =(2* %pi ) * e0 * l /(redlog ( D2 / D1 ) ) ;
reddisp (C , C a p a c i t a n c e ( F )= )
l =(20*10^ -3) -(2*10^ -3) ;
C_new =(2* %pi ) * e0 * l /(redlog ( D2 / D1 ) ) ;
C_change =C - C_new ;
reddisp ( C_change , c h a n g e i n C a p a c i t a n c e ( F )= )

Scilab code Exa 5.36 Calculate the value of time constant phase shift series resistance amplitude ratio and voltage sensitivity
1 blue//blue C a l c u l a t e blue blue t h e blue blue v a l u e blue blue o f

blue blue t i m e blue blue c o n s t a n t blue , blue p h a s e blue


blue s h i f t blue , blue blue s e r i e s blue blue r e s i s t a n c e blue ,
blue blue a m p l i t u d e blue blue r a t i o blue blueandblue
blue v o l t a g e blue blue s e n s i t i v i t y
2 redclc ;
3 M =0.95;
79

4
5
6
7
8
9
10
11
12
13
14
15
16
17

w =2* %pi *20;


tc =(1/ w ) *[( M ^2) /(1 - M ^2) ]^0.5;
reddisp ( tc , t i m e c o n s t a n t ( s ) )
ph ={( %pi /2) -[redatan ( w * tc ) ]}*(180/ %pi ) ;
reddisp ( ph , p h a s e s h i f t ( deg ) )
C =(8.85*10^ -12*300*10^ -6) /(0.125*10^ -3) ;
R = tc / C ;
reddisp (R , s e r i e s r e s i s t a n c e ( ohm ) )
M =1/(1+(1/(2* %pi *5* tc ) ^2) ) ^0.5;
reddisp (M , a m p l i t u d e r a t i o = )
Eb =100;
x =0.125*10^ -3;
Vs = Eb / x ;
reddisp ( Vs , v o l t a g e s e n s i t i v i t y (V/m) )

Scilab code Exa 5.37 Calculate the change in capacitance and ratio
1 blue//blue C a l c u l a t e blue blue t h e blue blue c h a n g e blue blue i n
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

blue blue c a p a c i t a n c e blue blueandblue blue r a t i o


redclc ;
e0 =8.85*10^ -12;
A =500*10^ -6;
d =0.2*10^ -3;
C = e0 * A / d ;
d1 =0.18*10^ -3;
C_new = e0 * A / d1 ;
C_change = C_new - C ;
Ratio =( C_change / C ) /(0.02/0.2) ;
reddisp ( Ratio , r a t i o o f p e r u n i t c h a n g e o f
c a p a c i t a n c e to per u n i t change o f diaplacement )
d1 =0.19*10^ -3;
e1 =1;
d2 =0.01*10^ -3;
e2 =8;
C =( e0 * A ) /(( d1 / e1 ) +( d2 / e2 ) ) ;
80

17 d1_new =0.17*10^ -3;


18 C_new =( e0 * A ) /(( d1_new / e1 ) +( d2 / e2 ) ) ;
19 C_change = C_new - C ;
20 Ratio =( C_change / C ) /(0.02/0.2) ;
21 reddisp ( Ratio , r a t i o o f p e r u n i t c h a n g e o f

c a p a c i t a n c e to per u n i t change o f diaplacement )

Scilab code Exa 5.40 Calculate the output voltage and charge sensitivity
1 blue//blue blue C a l c u l a t e blue blue t h e blue blue o u t p u t blue

2
3
4
5
6
7
8
9
10

blue v o l t a g e blue blueandblue blue c h a r g e blue


blue s e n s i t i v i t y
redclc ;
g =0.055;
t =2*10^ -3;
P =1.5*10^6;
Eo = g * t * P ;
reddisp ( Eo , o u t p u t v o l t a g e (V)= )
e =40.6*10^ -12;
d=e*g;
reddisp (d , c h a r g e s e n s i t i v i t y (C/N)= )

Scilab code Exa 5.41 Calculate the force


1
2
3
4
5
6
7
8
9

blue//blue blue C a l c u l a t e blue blue t h e blue blue f o r c e


redclc ;
g =0.055;
t =1.5*10^ -3;
Eo =100;
P = Eo /( g * t ) ;
A =25*10^ -6;
F=P*A;
reddisp (F , F o r c e (N)= )
81

Scilab code Exa 5.42 Calculate the strain charge and capacitance clc
1 blue//blue blue C a l c u l a t e blue blue t h e blue blue s t r a i n blue ,
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

blue blue c h a r g e blue blueandblue blue c a p a c i t a n c e


redclc ;
A =25*10^ -6;
F =5;
P=F/A;
d =150*10^ -12;
e =12.5*10^ -9;
g = d /( e ) ;
t =1.25*10^ -3;
Eo =( g * t * P ) ;
strain = P /(12*10^6) ;
Q=d*F;
C = Q / Eo ;
reddisp ( strain , s t r a i n = )
reddisp (Q , c h a r g e (C)= )
reddisp (C , C a p a c i t a n c e ( F )= )

Scilab code Exa 5.43 calculate peak to peak voltage swing under open
and loaded conditions calculate maximum change in crystal thickness
1 blue//blue blue c a l c u l a t e blue bluepeakblue blue t o blue

bluepeakblue blue v o l t a g e blue blue s w i n g blue blue u n d e r


blue blueopenblue blueandblue blue l o a d e d blue
blue c o n d i t i o n s
2 blue//blue blue c a l c u l a t e blue bluemaximumblue blue c h a n g e
blue blue i n blue blue c r y s t a l blue blue t h i c k n e s s
3 redclc ;
4 d =2*10^ -12;
82

5
6
7
8
9
10
11

t =1*10^ -3;
Fmax =0.01;
e0 =8.85*10^ -12;
er =5;
A =100*10^ -6;
Eo_peak_to_peak =2* d * t * Fmax /( e0 * er * A ) ;
reddisp ( Eo_peak_to_peak , peak v o l t a g e s w i n g u n d e r
open c o n d i t i o n s )
Rl =100*10^6;
Cl =20*10^ -12;
d1 =1*10^ -3;
Cp = e0 * er * A / d1 ;
C = Cp + Cl ;
w =1000;
m =[ w * Cp * Rl /[1+( w * C * Rl ) ^2]^0.5];
El_peak_to_peak =[2* d * t * Fmax /( e0 * er * A ) ]* m ;

12
13
14
15
16
17
18
19
20
21 reddisp ( El_peak_to_peak , peak v o l t a g e s w i n g u n d e r

loaded conditions )
22 E =90*10^9;
23 dt =2* Fmax * t /( A * E ) ;
24 reddisp ( dt , maximum c h a n g e i n c r y s t a l t h i c k n e s s (m) )

Scilab code Exa 5.44 Calculate the minimum frequency and phase shift
1 blue//blue blue C a l c u l a t e blue blue t h e blue blueminimumblue
2
3
4
5
6
7
8

blue f r e q u e n c y blue blueandblue blue p h a s e blue blue s h i f t


redclc ;
M =0.95;
tc =1.5*10^ -3;
w =(1/ tc ) *[( M ^2) /(1 - M ^2) ]^0.5;
reddisp (w , minimum f r e q u e n c y ( r a d / s ) )
ph ={( %pi /2) -[redatan ( w * tc ) ]}*(180/ %pi ) ;
reddisp ( ph , p h a s e s h i f t ( deg ) )

83

Scilab code Exa 5.45 calculate sensitivity of the transducer high frequency
sensitivity Lowest frequency Calculate external shunt capacitance and high
frequency sensitivity after connecting the external shunt capacitance
1 blue//blue c a l c u l a t e blue blue s e n s i t i v i t y blue blue o f blue

3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

blue t h e blue blue t r a n s d u c e r blue , blue blue h i g h blue


blue f r e q u e n c y blue blue s e n s i t i v i t y blue , blue blueLowest
blue blue f r e q u e n c y
blue//blue blue C a l c u l a t e blue blue e x t e r n a l blue blue s h u n t
blue blue c a p a c i t a n c e blue blueandblue blue h i g h blue
blue f r e q u e n c y blue blue s e n s i t i v i t y blue blue a f t e r blue
blue c o n n e c t i n g blue blue t h e blue blue e x t e r n a l blue
blue s h u n t blue blue c a p a c i t a n c e
redclc ;
Kq =40*10^ -3;
Cp =1000*10^ -12;
K = Kq / Cp ;
reddisp (K , s e n s i t i v i t y o f t h e t r a n s d u c e r (V/m) )
Cc =300*10^ -12;
Ca =50*10^ -12;
C = Cp + Cc + Ca ;
Hf = Kq / C ;
reddisp ( Hf , h i g h f r e q u e n c y s e n s i t i v i t y (V/m) )
R =1*10^6;
tc = R * C ;
M =0.95;
w =(1/ tc ) *[( M ^2) /(1 - M ^2) ]^0.5;
f = w /(2* %pi ) ;
reddisp (w , minimum f r e q u e n c y ( s ) )
reddisp ( now f =10Hz )
f =10;
w =2* %pi * f ;
tc =(1/ w ) *[( M ^2) /(1 - M ^2) ]^0.5;
C_new = tc / R ;
84

24 Ce = C_new - C ;
25 reddisp ( Ce , e x t e r n a l s h u n t c a p a c i t a n c e ( F ) )
26 Hf_new = Kq / C_new ;
27 reddisp ( Hf_new , new v a l u e o f h i g h f r e q u e n c y

s e n s i t i v i t y (V/m) )

Scilab code Exa 5.46 calculate op volatge


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

blue//
redclc ;
R =10^6;
C =2500*10^ -12;
tc = R * C ;
t =2*10^ -3;
d =100*10^ -12;
F =0.1;
el =10^3*{ d * F *[redexp ( - t / tc ) ]/ C };
reddisp ( el , v o l t a g e j u s t b e f o r e t =2ms (mV) )
el_after =10^3*{ d * F *[redexp ( - t / tc ) -1]/ C };
reddisp ( el_after , v o l t a g e j u s t a f t e r t =2ms (mV) )
reddisp ( when t =10ms )
t =10*10^ -3;
T =2*10
e_10 =10^3*{ d * F *[redexp (( - T / tc ) -1) ]*{redexp ( -(t - T ) ) / tc
}/ C }
17 reddisp ( e_10 , o u t p u t v o l t a g e 10 ms a f t e r t h e
a p p l i c a t i o n o f i m p u l s e (mV) )

Scilab code Exa 5.47 to prove time constant should be approximately 20T
1 blue//blue blue t o blue blue p r o v e blue blue t i m e blue

blue c o n s t a n t blue blue s h o u l d blue bluebeblue


blue a p p r o x i m a t e l y blue blue20blueTblue blue t o blue
85

2
3
4
5
6
7
8

blue k e e p blue blue u n d e r s h o o t blue blue w i t h i n blue blue5


blue%
redclc ;
reddisp ( L e t T=1 ) ;
T =1;
el =0.95;
tc = - T /redlog ( el ) ;
reddisp ( tc , t i m e c o n s t a n t )
reddisp ( a s T=1 s o t i m e c o n s t a n t s h o u l d be
a p p r o x i m a t e l y e q u a l t o 20T )

Scilab code Exa 5.48 calculate op volatge


1
2
3
4
5
6
7
8

blue//
redclc ;
Kh = -1*10^ -6;
I =3;
B =0.5;
t =2*10^ -3;
Eh = Kh * I * B / t ;
reddisp ( Eh , o u t p u t v o l t a g e (V) )

Scilab code Exa 5.49 Calculate the threshold wavelength


1 blue//blue blue C a l c u l a t e blue blue t h e blue blue t h r e s h o l d

blue blue w a v e l e n g t h
2 redclc ;
3 Th_wavelength =1.24*10^ -6/1.8
4 reddisp ( Th_wavelength , T h r e s h o l d w a v e l e n g t h (m) )

86

Scilab code Exa 5.50 Calculate maximum velocity of emitted photo electrons
1 blue//blue blue C a l c u l a t e blue bluemaximumblue blue v e l o c i t y

2
3
4
5
6
7

blue blue o f blue blue e m i t t e d blue blue p h o t o blue


blue e l e c t r o n s
redclc ;
E_imparted =(1.24*10^ -6) /(0.2537*10^ -6) ;
B_energy = E_imparted -4.30;
em_ratio =0.176*10^12;
v =(2* B_energy * em_ratio ) ^0.5;
reddisp (v , maximum v e l o c i t y o f e m i t t e d p h o t o
e l e c t r o n s (m/ s ) )

Scilab code Exa 5.51 Calculate the resistance of the cell


1 blue//blue blue C a l c u l a t e blue blue t h e blue blue r e s i s t a n c e
2
3
4
5
6
7
8

blue blue o f blue blue t h e blue blue c e l l


redclc ;
Ri =30;
Rf =100;
t =10;
tc =72;
Rt = Ri +( Rf - Ri ) *[1 -redexp ( - t / tc ) ];
reddisp ( Rt , r e s i s t a n c e o f t h e c e l l (K ohm ) )

Scilab code Exa 5.52 Calculate incident power and cut off frequency
1 blue//blue C a l c u l a t e blue blue i n c i d e n t blue bluepowerblue

blueandblue blue c u t blue blue o f f blue blue f r e q u e n c y


2 redclc ;
3 I_power =250*0.2*10^ -6;
4 reddisp ( I_power , i n c i d e n t power (W) )

87

5
6
7
8

Rl =10*10^3;
C =2*10^ -12;
fc =1/(2* %pi * Rl * C ) ;
reddisp ( fc , c u t o f f f r e q u e n c y ( Hz ) )

Scilab code Exa 5.53 Calculate the internal resistance of cell and open
circuit voltage
1 blue//blue blue C a l c u l a t e blue blue t h e blue blue i n t e r n a l

2
3
4
5
6
7
8
9

blue blue r e s i s t a n c e blue blue o f blue blue c e l l blue blueand


blue blueopenblue blue c i r c u i t blue blue v o l t a g e
redclc ;
I =2.2*10^ -3;
Eo =0.33;
Rl =100;
Ri =( Eo / I ) -100;
reddisp ( Ri , i n t e r n a l r e s i s t a n c e o f c e l l ( ohm ) )
Vo =0.33*[redlog (25) /redlog (10) ];
reddisp ( Vo , open c i r c u i t v o l t a g e f o r a r a d i a n t
i n c i d e n c e o f 25 W/m2 (V)= )

Scilab code Exa 5.54 Find the value of current


1 blue//blue blueFindblue blue t h e blue blue v a l u e blue blue o f
2
3
4
5
6
7
8

blue blue c u r r e n t
redclc ;
A =1935*10^ -6;
r =0.914;
S_angle = A / r ^2;
I =180;
L_flux = I * S_angle ;
reddisp ( L_flux , l u m n i o u s f l u x= )
88

9 reddisp ( C o r r e s p o n d i n g t o l u m n i o u s f l u x o . 4 1 7 lm and

a l o a d r e s i s t a n c e o f 800 ohm t h e c u r r e n t i s 120


m i c r o Ampere )

89

Chapter 6
Signal Conditioning

Scilab code Exa 6.1 calculating feedback resistance


1 blue//blue blue c a l c u l a t i n g blue blue f e e d b a c k blue
2
3
4
5
6

blue r e s i s t a n c e
redclc ;
A =100;
R1 =1*10^3;
Rf = - A * R1 ;
reddisp ( Rf , f e e d b a c k r e s i s t a n c e ( ohm )= ) ;

Scilab code Exa 6.2 calculating the closed loop gain


1 blue//blue blue c a l c u l a t i n g blue blue t h e blue blue c l o s e d
2
3
4
5
6
7

blue blue l o o p blue blue g a i n


redclc ;
Rf =10;
R1 =1;
Avol =200000;
A = -( Rf / R1 ) *(1/[1+(1/ Avol ) *(( R1 + Rf ) / R1 ) ]) ;
reddisp (A , c l o s e d l o o p g a i n= )
90

Scilab code Exa 6.3 calculating the maximum output voltage


1 blue//blue blue c a l c u l a t i n g blue blue t h e blue bluemaximum
2
3
4
5
6

blue blue o u t p u t blue blue v o l t a g e


redclc ;
Sa =10;
reddisp ( Sa , s a t u r a t i o n v o l t a g e= )
Vom = Sa ;
reddisp ( Vom , maximum o u t p u t v o l t a g e )

Scilab code Exa 6.4 calculating output voltage due to offset voltage
1 blue//blue blue c a l c u l a t i n g blue blue o u t p u t blue blue v o l t a g e
2
3
4
5
6
7

blue bluedueblue blue t o blue blue o f f s e t blue blue v o l t a g e


redclc ;
Vos =5*10^ -3;
Rf =10;
R1 =1;
Vo = - Vos *(1+ Rf / R1 ) ;
reddisp ( Vo , o u t p u t v o l t a g e due t o o f f s e t v o l t a g e (V)=
)

Scilab code Exa 6.5 calculating Amplification factor


1 blue//blue blue c a l c u l a t i n g blue blue A m p l i f i c a t i o n blue

blue f a c t o r
2 redclc ;
3
4 Rf =10;

91

5 R1 =1;
6 A = Rf / R1 ;
7 reddisp (A , A m p l i f i c a t i o n F a c t o r= )

Scilab code Exa 6.6 calculating output voltage due to offset voltage
1 blue//blue blue c a l c u l a t i n g blue blue o u t p u t blue blue v o l t a g e
2
3
4
5
6
7
8
9

blue bluedueblue blue t o blue blue o f f s e t blue blue v o l t a g e


redclc ;
V1 =1;
V2 = -2;
Rf =500;
R1 =250;
R2 =100;
Vo = -{[( Rf / R1 ) * V1 ]+[( Rf / R2 ) * V2 ]};
reddisp ( Vo , o u t p u t v o l t a g e (V)= )

Scilab code Exa 6.7 calculating gain and feedback resistance


1 blue//blue blue c a l c u l a t i n g blue blue g a i n blue blueandblue

blue f e e d b a c k blue blue r e s i s t a n c e


2 redclc ;
3
4
5
6
7
8
9
10
11

Rf =100*10^3;
R1 =1*10^3;
A = Rf / R1 ;
reddisp (A , Gain= )
reddisp ( I f m u l t i p l i e r i s 10 )
A =10;
Rf = A * R1 ;
reddisp ( Rf , f e e d b a c k r e s i s t a n c e (Ohm)= )

92

Scilab code Exa 6.8 Calculating the values of resistances


1 blue//blue blue C a l c u l a t i n g blue blue t h e blue blue v a l u e s
2
3
4
5
6
7
8
9
10

blue blue o f blue blue r e s i s t a n c e s


redclc ;
g =10;
Rf =10;
R1 = Rf / g ;
reddisp ( R1 , r e s i s t a n c e R1 ( K i l o ohms )= )
R2 = Rf /(0.5* g ) ;
reddisp ( R2 , r e s i s t a n c e R1 ( K i l o ohms )= )
R3 = Rf /(0.333* g ) ;
reddisp ( R3 , r e s i s t a n c e R1 ( K i l o ohms )= )

Scilab code Exa 6.9 Calculating the value of resistance and capacitance
1 blue//blue blue C a l c u l a t i n g blue blue t h e blue blue v a l u e blue

2
3
4
5
6
7

blue o f blue blue r e s i s t a n c e blue blueandblue


blue c a p a c i t a n c e
redclc ;
Voramp = -10;
reddisp ( i f v o l t a g e s o u r c e i s 10V t h e n RC= 1 ms and
i f C=1 micro F )
C =1;
R =1*10^ -3*10^6;
reddisp (R , v a l u e o f r e s i s t a n c e ( ohm )= )

Scilab code Exa 6.10 Calculating Difference mode gain and output voltage
93

1 blue//blue blue C a l c u l a t i n g blue blue D i f f e r e n c e blue

2
3
4
5
6
7
8
9
10
11
12

bluemodeblue blue g a i n blue blueandblue blue o u t p u t blue


blue v o l t a g e
redclc ;
V2 =5*10^ -3;
V1 =3*10^ -3;
Vo =300*10^ -3;
Vd = V2 - V1 ;
Ad = Vo / Vd ;
reddisp ( Ad , d i f f e r e n c e mode g a i n= )
V2 =155*10^ -3;
V1 =153*10^ -3;
Vo = Ad *( V2 - V1 ) ;
reddisp ( Vo , o u t p u t v o l t a g e (V)= )

Scilab code Exa 6.11 Calculating Difference mode Common mode gain
and CMRR
1 blue//blue blue C a l c u l a t i n g blue blue D i f f e r e n c e blue

2
3
4
5
6
7
8
9
10
11
12

bluemodeblue , blue blueCommonblue bluemodeblue blue g a i n


blue blueandblue blueCMRR
redclc ;
Vo =3;
Vd =30*10^ -3;
Ad = Vo / Vd ;
reddisp ( Ad , d i f f e r e n c e mode g a i n= )
Vo =5*10^ -3;
Vc =500*10^ -3;
Ac = Vo / Vc ;
reddisp ( Ac , Common mode g a i n= )
CMRR = Ad / Ac ;
reddisp ( CMRR , Common mode r e j e c t i o n r a t i o = )

94

Scilab code Exa 6.12 Calculating Signal to noise ratio and CMRR
1 blue//blue blue C a l c u l a t i n g blue blue S i g n a l blue blue t o blue
2
3
4
5
6
7
8
9
10
11
12
13
14
15

blue n o i s e blue blue r a t i o blue blueandblue blueCMRR


redclc ;
V2 =30*10^ -3;
V1 = -30*10^ -3;
Vd = V2 - V1 ;
Ad =150;
Vos = Ad * Vd ;
Ac =0.04;
Vc =600*10^ -3;
Von = Ac * Vc ;
SNR = Vos / Von ;
CMRR = Ad / Ac ;
reddisp ( SNR , S i g n a l t o N o i s e R a t i o= )
reddisp ( CMRR , CMRR= )

Scilab code Exa 6.13 Calculating sensitivity and output voltage


1 blue//blue blue C a l c u l a t i n g blue blue s e n s i t i v i t y blue
2
3
4
5
6
7
8
9
10
11

blueandblue blue o u t p u t blue blue v o l t a g e


redclc ;
Ci =10*10^ -12;
Vi =10;
Eo =8.85*10^ -12;
A =200*10^ -6;
K = - Ci * Vi /( Eo * A ) ;
reddisp (K , s e n s i t i v i t y (V/mm)= )
d =1*10^ -6;
Vo = K * d ;
reddisp ( Vo , o u t p u t v o l t a g e (V)= )

95

Scilab code Exa 6.14 calculating minimum maximum time constants and
value of frequencies
1 blue//blue blue c a l c u l a t i n g blue blueminimumblue , blue

2
3
4
5
6
7
8
9
10
11

bluemaximumblue blue t i m e blue blue c o n s t a n t s blue blueand


blue blue v a l u e blue blue o f blue blue f r e q u e n c i e s
redclc ;
MXtc = 10^10*1000*10^ -12;
reddisp ( MXtc , Maximum t i m e c o n s t a n t ( s ) ) ;
MNtc = 10^8*10*10^ -12;
reddisp ( MNtc , Minimum t i m e c o n s t a n t ( s ) ) ;
AR =0.95;
fmin =( AR ) /[2* %pi * MXtc *(1 - AR ^2) ^0.5];
reddisp ( fmin , minimum f r e q u e n c y ( Hz ) )
fmax =( AR ) /[2* %pi * MNtc *(1 - AR ^2) ^0.5];
reddisp ( fmax , Maximum f r e q u e n c y ( Hz ) )

Scilab code Exa 6.15 calculating time constant and value of capacitance
1 blue//blue blue c a l c u l a t i n g blue blue blue t i m e blue

2
3
4
5
6
7
8
9
10

blue c o n s t a n t blue blueandblue blue v a l u e blue blue o f blue


blue c a p a c i t a n c e
redclc ;
g =0.501;
f =50;
w =2* %pi * f ;
tc =(1 - g ^2) ^0.5/( w * g ) ;
reddisp ( tc , t i m e c o n s t a n t ( s ) )
R =10000;
C =( tc / R ) *10^6;
reddisp (C , c a p a c i t a n c e ( micro F ) )

96

Scilab code Exa 6.16 calcuating the passband gain and upper and lower
cut off frequencies
1 blue//blue blue c a l c u a t i n g blue blue t h e blue blue p a s s b a n d

2
3
4
5
6
7
8
9
10
11
12

blue blue g a i n blue blueandblue blue u p p e r blue blue&blue


blue l o w e r blue blue c u t blue blue o f f blue blue f r e q u e n c i e s
redclc ;
R1 =10*10^3;
R2 =1*10^6;
A = R2 /( R1 + R2 ) ;
reddisp (A , g a i n= )
C2 =(0.01) *10^ -6;
C1 =100*10^ -12;
fcl =1/(2* %pi * C2 * R2 ) ;
reddisp ( fcl , l o w e r c u t o f f f r e q u e n c y ( Hz ) )
fcu =1/(2* %pi * R1 * C1 ) ;
reddisp ( fcu , u p p e r c u t o f f f r e q u e n c y ( Hz ) )

Scilab code Exa 6.17 calcuating the value of C


1 blue//blue blue c a l c u a t i n g blue blue t h e blue blue v a l u e blue
2
3
4
5
6

blue o f blue blueC


redclc ;
R =1*10^6;
fo =10*10^3;
C =1/(2* %pi * fo * R ) ;
reddisp (C , t h e v a l u e o f C ( F ) )

Scilab code Exa 6.19 calculate the output voltage and sensitivity
97

1 blue//blue blue c a l c u l a t e blue blue t h e blue blue o u t p u t blue


2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

blue v o l t a g e blue blueandblue blue s e n s i t i v i t y


redclc ;
Rt =100;
K =1;
Rb = K * Rt ;
ei =10;
reddisp ( When K=1 )
eo =[( K * Rt / Rb ) /(1+( K * Rt / Rb ) ) ]* ei ;
reddisp ( eo , o u t p u t v o l t a g e (V)= )
Se =( ei * Rb ) /[( Rb + K * Rt ) ^2];
reddisp ( Se , s e n s i t i v i t y (V/ohm )= )
K =0.95;
reddisp ( When K=0.95 )
eo =[( K * Rt / Rb ) /(1+( K * Rt / Rb ) ) ]* ei ;
reddisp ( eo , o u t p u t v o l t a g e (V)= )
Se =( ei * Rb ) /[( Rb + K * Rt ) ^2];
reddisp ( Se , s e n s i t i v i t y (V/ohm )= )

Scilab code Exa 6.20 calculate the output voltage for different values of
K
1 blue//blue blue c a l c u l a t e blue blue t h e blue blue o u t p u t blue

2
3
4
5
6
7
8
9
10
11

blue v o l t a g e blue blue f o r blue blue d i f f e r e n t blue


blue v a l u e s blue blue o f blue blueK
redclc ;
ei =100;
K =0.25;
reddisp ( When K=0.25 )
eo =[( K /6) /(1+( K /6) ) ]* ei ;
reddisp ( eo , o u t p u t v o l t a g e (V)= )
K =0.5;
reddisp ( When K=0.5 )
eo =[( K /6) /(1+( K /6) ) ]* ei ;
reddisp ( eo , o u t p u t v o l t a g e (V)= )
98

12
13
14
15
16
17
18
19

K =0.6;
reddisp ( When K=0.6 )
eo =[( K /6) /(1+( K /6) ) ]* ei ;
reddisp ( eo , o u t p u t v o l t a g e (V)= )
K =0.8;
reddisp ( When K=0.8 )
eo =[( K /6) /(1+( K /6) ) ]* ei ;
reddisp ( eo , o u t p u t v o l t a g e (V)= )

Scilab code Exa 6.21 calculating the resistance and output voltage
1 blue//blue blue c a l c u l a t i n g blue blue t h e blue blue r e s i s t a n c e
2
3
4
5
6
7
8
9
10

blue blueandblue blue o u t p u t blue blue v o l t a g e


redclc ;
R2 =119;
R3 =119.7;
R1 =120.4;
R4 = R2 * R3 / R1 ;
R4 =121.2;
ei =12;
eo =[( R1 * R4 - R2 * R3 ) /(( R1 + R3 ) *( R2 + R4 ) ) ]* ei ;
reddisp ( eo , o u t p u t v o l t a g e (V)= )

Scilab code Exa 6.22 Calculating the bridge output


1 blue//blue blue C a l c u l a t i n g blue blue t h e blue blue b r i d g e
2
3
4
5
6
7

blue blue o u t p u t
redclc ;
ei =6;
R =10000;
reddisp ( i f dR=0.05R )
dR =0.05* R ;
eo =[( dR / R ) /(4+2*( dR / R ) ) ]* ei ;
99

8
9
10
11
12

reddisp ( eo , o u t p u t v o l t a g e (V) )
reddisp ( i f dR= 0.05R )
dR = -0.05* R ;
eo =[( dR / R ) /(4+2*( dR / R ) ) ]* ei ;
reddisp ( eo , o u t p u t v o l t a g e (V) )

Scilab code Exa 6.23 Calculating the resistance of unknown resistance


1 blue//blue blue C a l c u l a t i n g blue blue t h e blue blue r e s i s t a n c e
2
3
4
5
6
7
8
9
10
11
12

blue blue o f blue blueunknownblue blue r e s i s t a n c e


redclc ;
R2 =800;
R3 =800;
R4 =800;
Rm =100;
R =800;
ei =4;
im =0.8*10^ -6;
dR =( im * R ^2) *(4*(1+ Rm / R ) ) / ei ;
R1 = R + dR ;
reddisp ( R1 , R e s i s t a n c e o f unknown r e s i s t o r ( ohm )= )

Scilab code Exa 6.24 calculating the current


1
2
3
4
5
6
7
8
9

blue//blue blue c a l c u l a t i n g blue blue t h e blue blue c u r r e n t


redclc ;
R2 =1000;
R3 =1000;
R1 =1010;
R4 =1000;
ei =100;
eo =[( R1 * R4 - R2 * R3 ) /(( R1 + R3 ) *( R2 + R4 ) ) ]* ei ;
reddisp ( eo , open c i r c u i t v o l t a g e (V)= )
100

10
11
12
13

Ro =[ R1 * R4 /( R1 + R4 ) ]+[ R2 * R3 /( R2 + R3 ) ];
Rm =4000;
im = eo /( Ro + Rm ) ;
reddisp ( im , c u r r e n t (A)= )

Scilab code Exa 6.25 Calculating maximum permissible current through


strain gauge supply voltage and Power dissipation in series resistance
1 blue//blue blue C a l c u l a t i n g blue bluemaximumblue

2
3
4
5
6
7
8
9
10
11
12

blue p e r m i s s i b l e blue blue c u r r e n t blue blue t h r o u g h blue


blue s t r a i n blue bluegauge blue , blue blue s u p p l y blue
blue v o l t a g e
blue//blue blueandblue bluePowerblue blue d i s s i p a t i o n blue
blue i n blue blue s e r i e s blue blue r e s i s t a n c e
redclc ;
R =100;
P =250*10^ -3;
i =( P / R ) ^0.5;
reddisp (i , maximum p e r m i s s i b l e c u r r e n t (A)= )
ei =2* i * R ;
reddisp ( ei , maximum s u p p l y v o l t a g e (V)= )
Rs =100;
Ps =10^2/ Rs ;
reddisp ( Ps , Power d i s s i p a t i o n i n s e r i e s r e s i s t a n c e (W
) )

Scilab code Exa 6.26 Calculating the maximum voltage sensitivity of the
bridge
1 blue//blue blue C a l c u l a t i n g blue blue blue t h e blue

bluemaximumblue blue v o l t a g e blue blue s e n s i t i v i t y blue


blue o f blue blue t h e blue blue b r i d g e
2 redclc ;
101

3
4
5
6
7
8
9
10

P =(0.1/0.2) *10^ -3;


R =1000;
eim =2*( P * R ) ^0.5;
dth =0.1;
dR =(4.5/100) * dth * R ;
eom =( dR /(4* R ) ) * eim ;
Sem = eom / dth ;
reddisp ( Sem , maximum v o l t a g e s e n s i t i v i t y o f t h e
b r i d g e (V)= )

Scilab code Exa 6.27 Calculating the resolution of the instrument quantization error and decesion levels
1 blue//blue blue C a l c u l a t i n g blue blue t h e blue blue r e s o l u t i o n

2
3
4
5
6
7
8
9
10

blue blue o f blue blue t h e blue blue i n s t r u m e n t blue , blue


blue q u a n t i z a t i o n blue blue e r r o r blue blueandblue
blue d e c e s i o n blue blue l e v e l s
redclc ;
Reso =10*10^ -3/10;
reddisp ( Reso , r e s o l u t i o n o f t h e i n s t r u m e n t= )
n =10;
Q =10/2^ n ;
Eq = Q /(2*3^0.5) ;
reddisp ( Eq , q u a n t i z a t i o n e r r o r= )
D =(2^ n ) -1;
reddisp (D , d e c e s i o n l e v e l s = )

Scilab code Exa 6.28 Calculating the weight of MSB and LSB
1 blue//blue blue C a l c u l a t i n g blue blue t h e blue blue w e i g h t

blue blue o f blue blueMSBblue blueandblue blueLSB


2 redclc ;
3 Ra =10;
102

4 b =5;
5 Wmsb = Ra /2;
6 reddisp ( Wmsb , w e i g h t o f MSB (V)= )
7 Wlsb = Ra /2^ b ;
8 reddisp ( Wlsb , w e i g h t o f LSB (V)= )

Scilab code Exa 6.29 Calculating reference voltage and percentage change
1 blue//blue blue C a l c u l a t i n g blue blue r e f e r e n c e blue

2
3
4
5
6
7
8
9

blue v o l t a g e blue blueandblue blue p e r c e n t a g e blue


blue c h a n g e
redclc ;
E =10;
ER = E *256/255;
reddisp ( ER , R e f e r e n c e v o l t a g e (V)= )
n =8;
CVlsb =(2^ - n ) * ER ;
PC = CVlsb *100/ E ;
reddisp ( PC , P e r c e n t a g e c h a n g e = )

Scilab code Exa 6.30 Calculating the number of bits Value of LSB Quantization error minimum sampling rate Aperature time and dynamic range
1 blue//blue blue C a l c u l a t i n g blue blue t h e blue bluenumber

2
3
4
5

blue blue o f blue blue b i t s blue , blue blue V a l u e blue blue o f


blue blueLSBblue , blue blue Q u a n t i z a t i o n blue blue e r r o r
blue , blueminimumblue blue s a m p l i n g blue blue r a t e blue
blue A p e r a t u r e blue blue t i m e blue blueandblue bluedynamic
blue blue r a n g e
redclc ;
n =14;
reddisp (n , number o f b i t s = )
E =10;
103

6
7
8
9
10
11
12
13
14
15
16
17
18

Q =10;
LSB = E /2^ n ;
reddisp ( LSB , V a l u e o f LSB (V) = )
Eq = Q /(2*(3^0.5) ) ;
reddisp ( Eq , Q u a n t i z a t i o n e r r o r (V) = )
fh =1000;
fs =5* fh ;
reddisp ( fs , minimum s a m p l i n g r a t e ( Hz ) = )
a =1/16384;
ta =1/(2* %pi * fh ) * a ;
reddisp ( ta , A p e r a t u r e t i m e ( s ) = )
Dr =6* n ;
reddisp ( Dr , dynamic r a n g e ( db ) = )

Scilab code Exa 6.31 Calculating the value of resistance and smallest output current
1 blue//blue blue C a l c u l a t i n g blue blue t h e blue blue v a l u e blue

2
3
4
5
6
7
8
9

blue o f blue blue r e s i s t a n c e blue blueandblue blue s m a l l e s t


blue blue o u t p u t blue blue c u r r e n t
redclc ;
ER =10;
n =6;
Imax =10*10^ -3;
R = ER *((2^ n ) -1) /[(2^( n -2) ) * Imax ];
reddisp (R , r e s i s t a n c e ( ohm )= )
LSB = ER /[(2^( n -1) ) * R ];
reddisp ( LSB , s m a l l e s t o u t p u t c u r r e n t (A) )

Scilab code Exa 6.32 Calculating the output voltage


1 blue//blue blue C a l c u l a t i n g blue blue t h e blue blue o u t p u t

blue blue v o l t a g e
104

2
3
4
5

redclc ;
n =6;
R =10000;
Io = (10/10*10^3)
*{1*1+1*0.5+1*0.25+0*0.125+1*0.0625}*10^ -6;
6 Rf =5000;
7 Eo = - Io * Rf ;
8 reddisp ( Eo , Output v o l t a g e (V)= )

Scilab code Exa 6.33 Calculate the output of successive approximation A


to D
1 blue//blue blue C a l c u l a t e blue blue t h e blue blue o u t p u t blue

2
3
4
5
6
7
8
9
10
11
12
13
14
15

blue o f blue blue s u c c e s s i v e blue blue a p p r o x i m a t i o n blue


blueAblue/blueD
redclc ;
reddisp ( S e t d3=1 )
Output =5/2^1;
reddisp ( s i n c e 3 . 2 1 7 > 2 . 5 s o d3=1 )
reddisp ( S e t d2=1 )
Output =(5/2^1) +(5/2^2) ;
reddisp ( s i n c e 3.217 < 3 . 7 5 s o d2=0 )
reddisp ( S e t d1=1 )
Output =(5/2^1) +(5/2^3) ;
reddisp ( s i n c e 3 . 2 1 7 > 3 . 1 2 5 s o d1=1 )
reddisp ( S e t d0=1 )
Output =(5/2^1) +(5/2^3) +(5/2^4) ;
reddisp ( s i n c e 3 . 2 1 7 < 3 . 4 3 7 5 s o d0=0 )
reddisp ( Output o f s u c c e s s i v e a p p r o x i m a t i o n A/D =
1010 )

Scilab code Exa 6.34 to calculate op dc voltage


105

1 blue//blue t o blue blue c a l c u l a t e blue blueoblue/bluepblue

bluedcblue blue v o l t a g e
2
3
4
5
6
7
8
9
10
11

redclc ;
t =400;
T = t /4;
C =1*10^ -6;
v =20;
i = C *100* v /( T ) ;
R =1*10^3;
e_o = i * R ;
reddisp ( e_o , o u t p u t v o l t a g e (V) ) ;

106

Chapter 7
Display Devices and recorders

Scilab code Exa 7.1 calculating resolution


blue//blue blue c a l c u l a t i n g blue blue r e s o l u t i o n
redclc ;
N = 4;
R =1/10^ N ;
reddisp (R , R e s o l u t i o n o f t h e m e t e r= ) ;
VR =1;
R1 = VR * R ;
reddisp ( R1 , R e s o l u t i o n o f t h e m e t e r f o r v o l t a g e r a n g e
1V= ) ;
9 VR1 =10;
10 R2 = VR1 * R ;
11 reddisp ( R2 , R e s o l u t i o n o f t h e m e t e r f o r v o l t a g e r a n g e
10V= ) ;
1
2
3
4
5
6
7
8

Scilab code Exa 7.2 calculating resolution


1 blue//blue blue c a l c u l a t i n g blue blue r e s o l u t i o n
2 redclc ;

107

3
4
5
6
7
8
9
10
11
12
13
14

N = 3;
R =1/10^ N ;
reddisp (R , R e s o l u t i o n o f t h e m e t e r= ) ;
reddisp ( 1 2 . 9 8 w i l l be d i s p l a y e d a s 1 2 . 9 8 0 on 10V
scale )
VR =1;
R1 = VR * R ;
reddisp ( R1 , R e s o l u t i o n o f t h e m e t e r f o r v o l t a g e r a n g e
1V= ) ;
reddisp ( 0 . 6 9 7 3 w i l l be d i s p l a y e d a s 0 . 6 9 7 3 on 1V
scale )
VR1 =10;
R2 = VR1 * R ;
reddisp ( R2 , R e s o l u t i o n o f t h e m e t e r f o r v o l t a g e r a n g e
10V= ) ;
reddisp ( 0 . 6 9 7 3 w i l l be d i s p l a y e d a s 0 0 . 6 9 7 on 10V
scale )

Scilab code Exa 7.3 calculating Total possible error and percentage error
1 blue//blue blue c a l c u l a t i n g blue blue T o t a l blue blue p o s s i b l e

2
3
4
5
6
7
8
9
10
11
12
13

blue blue e r r o r blue blueandblue blue p e r c e n t a g e blue


blue e r r o r
redclc ;
R =5;
V =0.005* R ;
reddisp (V , 0 . 5 p e r c e n t o f t h e r e a d i n g )
TPE = V +0.01;
reddisp ( TPE , T o t a l p o s s i b l e e r r o r (V)= )
R1 =0.10;
V1 =0.005* R1 ;
TPE1 = V1 +0.01;
reddisp ( TPE1 , T o t a l p o s s i b l e e r r o r (V)= )
PE =( TPE1 /0.1) *100;
reddisp ( PE , P e r c e n t a g e e r r o r= )
108

Scilab code Exa 7.4 calculating frequency


1
2
3
4
5
6

blue//blue blue c a l c u l a t i n g blue blue f r e q u e n c y


redclc ;
N =034;
t =10*10^ -3;
f=N/t;
reddisp (f , f r e q u e n c y ( Hz )= )

Scilab code Exa 7.5 calculating maximum error


1
2
3
4
5
6
7
8
9
10
11
12
13
14

blue//blue blue c a l c u l a t i n g blue bluemaximumblue blue e r r o r


redclc ;
R =5*10^6;
V =0.00005* R ;
reddisp (V , 0 . 0 0 5 p e r c e n t o f t h e r e a d i n g ( m i c r o s e c )= )
;
LSD =1;
ME = V +1;
reddisp ( ME , Maximum e r r o r ( m i c r o s e c )= )
R =500;
V =0.00005* R ;
reddisp (V , 0 . 0 0 5 p e r c e n t o f t h e r e a d i n g ( s e c )= ) ;
LSD =1;
ME = V +1;
reddisp ( ME , Maximum e r r o r ( s e c )= )

Scilab code Exa 7.6 calculating number of turns and current

109

1 blue//blue blue c a l c u l a t i n g blue bluenumberblue blue o f blue


2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

blue t u r n s blue blueandblue blue c u r r e n t


redclc ;
D =8*10^ -3;
A = D ^2;
reddisp (A , A= )
J =8*10^ -3;
K =16*10^ -3;
B =4* J * K ;
reddisp (B , B= )
reddisp ( s i n c e A<B s o t h e i n s t r u m e n t i s u n d e r d a n p e d )
th =(100* %pi ) /180;
i =10*10^ -3;
F =0.2*10^ -6;
G =( K * th + F ) / i ;
l =65*10^ -3;
d =25*10^ -3;
N = G /( B * l * d ) ;
reddisp (N , number o f t u r n s= )
i=F/G;
reddisp (i , c u r r e n t r e q u i r e d t o o v e r c o m e f r i c t i o n (A)
)

Scilab code Exa 7.7 calculating speed of the tape


1 blue//blue blue c a l c u l a t i n g blue blue s p e e d blue blue o f blue
2
3
4
5
6

blue t h e blue blue t a p e


redclc ;
Lam =2.5*6.25;
f =50000;
S = Lam *10^ -6* f ;
reddisp (S , s p e e d (m/ s )= )

110

Scilab code Exa 7.8 calculating number density of the tape


1 blue//blue blue c a l c u l a t i n g blue bluenumberblue blue d e n s i t y

blue blue o f blue blue t h e blue blue t a p e


2 redclc ;
3 ND =12000/1.5;
4 reddisp ( ND , Number d e n s i t y ( numbers /mm) )

Scilab code Exa 7.9 Calculating possible phase angles


1 blue//blue blue C a l c u l a t i n g blue blue p o s s i b l e blue blue p h a s e
2
3
4
5
6
7

blue blue a n g l e s
redclc ;
Y1 =1.25;
Y2 =2.5;
PA = asind ( Y1 / Y2 ) ;
reddisp ( PA , p h a s e a n g l e ( d e g r e e ) )
reddisp ( p o s s i b l e a n g l e a r e 30 d e g r e e and 330 d e g r e e
)

Scilab code Exa 7.10 Calculating possible phase angles


1 blue//blue blue C a l c u l a t i n g blue blue p o s s i b l e blue blue p h a s e
2
3
4
5
6
7
8
9

blue blue a n g l e s
redclc ;
reddisp ( i f s p o t g e n e r a t i n g p a t t e r n moves i n t h e
clockwise direction )
Y1 =0;
Y2 =5;
PA = asind ( Y1 / Y2 ) ;
reddisp ( PA , p h a s e a n g l e ( d e g r e e ) )
Y1 =2.5;
Y2 =5;
111

10
11
12
13
14
15
16
17
18
19

PA = asind ( Y1 / Y2 ) ;
reddisp ( PA , p h a s e a n g l e ( d e g r e e ) )
Y1 =3.5;
Y2 =5;
PA = asind ( Y1 / Y2 ) ;
reddisp ( PA , p h a s e a n g l e ( d e g r e e ) )
Y1 =2.5;
Y2 =5;
PA =180 -[ asind ( Y1 / Y2 ) ];
reddisp ( PA , p h a s e a n g l e ( d e g r e e ) )

112

Chapter 8
Metrology

Scilab code Exa 8.1 calculate the arrangement of slip gauges


1 blue//blue blue c a l c u l a t e blue blue t h e blue blue a r r a n g e m e n t
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

blue blue o f blue blue s l i p blue blue g a u g e s


redclc ;
Dd =52.215;
reddisp ( Dd , d e s i r e d v a l u e= )
Pb =4;
reddisp ( Pb , P r o t e c t e d b l o c k= )
R = Dd - Pb ;
reddisp (R , Reminder= )
Tp =1.005;
reddisp ( Tp , t h o u s a n d b l o c k= )
R =R - Tp ;
reddisp (R , Reminder= )
Hp =1.010;
reddisp ( Hp , H u n d e r t h s b l o c k= )
R =R - Hp ;
reddisp (R , Reminder= )
Ttp =2.20;
reddisp ( Ttp , t e n t h s b l o c k= )
R =R - Ttp ;
reddisp (R , Reminder= )
113

21
22
23
24
25
26
27
28

Up =4;
reddisp ( Up , u n i t b l o c k= )
R =R - Up ;
reddisp (R , Reminder= )
Tp =40;
reddisp ( Tp , Tens b l o c k= )
R =R - Tp ;
reddisp (R , Reminder= )

Scilab code Exa 8.2 calculate the sensitivity


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

blue//blue blue c a l c u l a t e blue blue t h e blue blue s e n s i t i v i t y


redclc ;
Ps =200*10^3;
r =0.6;
d2 =0.5;
d1 =0.5;
a =( d2 / d1 ^2) ;
x1 =(1.1 - r ) /(2* a ) ;
reddisp ( x1 , x1= )
r =0.8;
d2 =0.5;
d1 =0.5;
a =( d2 / d1 ^2) ;
x2 =(1.1 - r ) /(2* a ) ;
reddisp ( x2 , x2= )
x = x1 - x2 ;
reddisp (x , s o t h e r a n g e i s x (mm) )
hS = %pi * d2 *10^ -3;
A2 = %pi * d2 *10^ -6*( x1 + x2 ) /2;
pS = -0.4* Ps / A2 ;
pgS =25*10^ -3/1000;
S = hS * pS * pgS ;
reddisp (S , s e n s i t i v i t y = )

114

Scilab code Exa 8.3 calculate uncertainity in displacement


1 blue//blue blue c a l c u l a t e blue blue u n c e r t a i n i t y blue blue i n
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

blue blue d i s p l a c e m e n t
Pi =70*10^3;
r =0.4;
d2 =1.6;
d1 =0.75;
a =( d2 / d1 ^2) ;
x1 =(1.1 - r ) /(2* a ) ;
reddisp ( x1 , x1= )
r =0.9;
x2 =(1.1 - r ) /(2* a ) ;
reddisp ( x2 , x2= )
x = x1 - x2 ;
reddisp (x , s o t h e r a n g e i s x (mm) )
d = -2* a ;
Wr =12.5/ Pi ;
Wx = Wr / d ;
reddisp ( Wx , u n c e r t a i n i t y i n d i s p l a c e m e n t (mm) )

Scilab code Exa 8.4 calculate difference between height of workpieces and
pile of slip gauges
1 blue//blue blue c a l c u l a t e blue blue d i f f e r e n c e blue

2
3
4
5

blue b e t w e e n blue blue h e i g h t blue blue o f blue


blue w o r k p i e c e s blue blueandblue blue p i l e blue blue o f blue
blue s l i p blue blue g a u g e s
redclc ;
N =12;
lem =0.644;
d = N * lem /2;
115

6 reddisp (d , d i f f e r e n c e

between h e i g h t o f w o r k p i e c e s
and p i l e o f s l i p g a u g e s ( micro m e t e r ) )

Scilab code Exa 8.5 calculate seperation distance between two surfaces
and angle of tilt
1 blue//blue blue c a l c u l a t e blue blue s e p e r a t i o n blue

2
3
4
5
6
7
8
9

blue d i s t a n c e blue blue b e t w e e n blue bluetwoblue


blue s u r f a c e s blue blueandblue blue a n g l e blue blue o f blue
blue t i l t
redclc ;
N =5;
lem =546*10^ -9;
d =[(2* N -1) * lem *10^6]/4;
reddisp (d , s e p e r a t i o n d i s t a n c e b e t w e e n two s u r f a c e s (
micro m e t e r ) )
x =75;
th =redatan ( d / x ) ;
reddisp ( th , a n g l e o f t i l t )

Scilab code Exa 8.6 Calculate the difference in two diameters


1 blue//blue blue C a l c u l a t e blue blue t h e blue blue d i f f e r e n c e
2
3
4
5
6
7

blue blue i n blue bluetwoblue blue d i a m e t e r s


redclc ;
x =20/12;
L =50 -10;
lem =0.6;
d =( L * lem ) /(2* x ) ;
reddisp (d , d i f f e r e n c e i n d i a m e t e r s o f t h e r o l l e r s (
micro m e t e r ) )

116

Scilab code Exa 8.7 Calculate the change in thickness along its length
1 blue//blue blue C a l c u l a t e blue blue t h e blue blue c h a n g e blue

2
3
4
5

blue i n blue blue t h i c k n e s s blue blue a l o n g blue blue i t s blue


blue l e n g t h
redclc ;
d =4.5 -2.5;
Tg =2*(0.5) *0.509;
reddisp ( Tg , c h a n g e i n t h i c k n e s s a l o n g i t s l e n g t h (
micro m e t e r ) )

117

Chapter 9
Pressure Measurements

Scilab code Exa 9.1 calculating the length of mean free path
1 blue//blue blue c a l c u l a t i n g blue blue t h e blue blue l e n g t h
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

blue blue o f blue bluemeanblue blue f r e e blue blue p a t h


redclc ;
T =273+20;
P =101.3*10^3;
mfp =22.7*10^ -6* T / P ;
reddisp ( mfp , l e n g t h o f mean f r e e p a t h when p r e s s u r e
i s one a t m o s p h e r i c p r e s s u r e (m) )
P =133;
mfp =22.7*10^ -6* T / P ;
reddisp ( mfp , l e n g t h o f mean f r e e p a t h when p r e s s u r e
i s one t o r r (m) )
P =133*10^ -3;
mfp =22.7*10^ -6* T / P ;
reddisp ( mfp , l e n g t h o f mean f r e e p a t h when p r e s s u r e
i s one m i c r o m e t e r o f Hg (m) )
P =249.1;
mfp =22.7*10^ -6* T / P ;
reddisp ( mfp , l e n g t h o f mean f r e e p a t h when p r e s s u r e
i s one i n c h o f w a t e r (m) )
P =133*10^ -6;
118

17 mfp =22.7*10^ -6* T / P ;


18 reddisp ( mfp , l e n g t h o f mean f r e e p a t h when p r e s s u r e

i s 10 3 m i c r o m e t e r o f Hg (m) )

Scilab code Exa 9.2 Calculate Pressure of air source


1 blue//blue C a l c u l a t e blue blue P r e s s u r e blue blue o f blue
2
3
4
5
6
7
8
9
10
11
12

blue a i r blue blue s o u r c e


redclc ;
T =273+25;
P =99.22*10^3;
R =288;
df = P /( R * T ) ;
dm =0.82*996;
g =9.81;
h =200*10^ -6;
P1 = g * h *( dm - df ) *10^3;
Pa = P + P1 ;
reddisp ( Pa , P r e s s u r e o f a i r s o u r c e (N/m2) )

Scilab code Exa 9.3 Calculate Pressure head


1
2
3
4
5
6
7
8
9

blue//blue C a l c u l a t e blue blue P r e s s u r e blue bluehead


redclc ;
df =1*10^3;
dm =13.56*10^3;
g =9.81;
h =130*10^ -3;
P = g * h *( dm - df ) ;
Ph = P /9.81;
reddisp ( Ph , P r e s s u r e head (mm o f w a t e r ) )

119

Scilab code Exa 9.4 calculate height


1
2
3
4
5
6
7

blue//blue blue c a l c u l a t e blue blue h i g h t


redclc ;
hn =250;
d =5;
D =25;
h = hn *(1+( d / D ) ^2) ;
reddisp (h , h e i g h t )

Scilab code Exa 9.6 calculate error interms of pressure


1 blue//blue blue c a l c u l a t e blue blue e r r o r blue blue i n t e r m s
2
3
4
5
6
7
8
9
10

blue blue o f blue blue p r e s s u r e


redclc ;
P =8*133;
h = P /(800*9.81) ;
d =2;
D =50;
hn = h /(1+( d / D ) ^2) ;
e =( hn - h ) / h *100;
eP =0.8*1000*9.81*( hn - h ) ;
reddisp ( eP , e r r o r i n t e r m s o f p r e s s u r e (N/m2) )

Scilab code Exa 9.7 calculate angle to which tube is incliend to vertical
1 blue//blue blue c a l c u l a t e blue blue a n g l e blue blue t o blue

bluewhichblue blue t u b e blue blue i s blue blue i n c l i e n d blue


blue t o blue blue v e r t i c a l
120

2
3
4
5
6
7
8
9
10
11

redclc ;
P =133;
g =9.81;
dm =13.56*10^3;
R =10^ -3;
d =4;
D =20;
th = asind ( P /( g * dm * R *(1+( d / D ) ^2) ) ) ;
thV =90 - th ;
reddisp ( thV , a n g l e t o which t u b e i s i n c l i e n d t o
v e r t i c a l ( degree ) )

Scilab code Exa 9.8 calculate angle to which tube is incliend to horizontal
1 blue//blue blue c a l c u l a t e blue blue a n g l e blue blue t o blue

2
3
4
5
6
7
8
9
10

bluewhichblue blue t u b e blue blue i s blue blue i n c l i e n d blue


blue t o blue blue h o r i z o n t a l
redclc ;
P =9.81;
g =9.81;
dm =0.864*10^3;
R =4*10^ -3;
d =2;
D =20;
th = asind ( P /( g * dm * R *(1+( d / D ) ^2) ) ) ;
reddisp ( th , a n g l e t o which t u b e i s i n c l i e n d t o
horizontal ( degree ) )

Scilab code Exa 9.9 calculate Length of scale angle to which tube is incliend to horizontal
1 blue//blue blue c a l c u l a t e blue blue Lengthblue blue o f blue

blue s c a l e blue blue a n g l e blue blue t o blue bluewhichblue


121

2
3
4
5
6
7
8
9
10
11
12
13
14

blue t u b e blue blue i s blue blue i n c l i e n d blue blue t o blue


blue h o r i z o n t a l
redclc ;
P =500*9.81;
g =9.81;
d =8;
a = ( %pi /4) * d ^2;
A =1200;
dm =0.8*10^3;
hn = P /( g * dm *(1+( a / A ) ) ) ;
reddisp ( hn , Length o f s c a l e (m) )
R =0.6;
P1 =50*9.81;
th = asind ( P1 /( g * dm * R *[1+( a / A ) ]) ) ;
reddisp ( th , a n g l e t o which t u b e i s i n c l i e n d t o
horizontal ( degree ) )

Scilab code Exa 9.10 calculate diameter of the tube


1 blue//blue blue c a l c u l a t e blue blue d i a m e t e r blue blue o f blue
2
3
4
5
6
7
8
9
10
11

blue t h e blue blue t u b e


redclc ;
P =100*10^3;
g =9.81;
di =10*10^ -3;
D =40*10^ -3;
A = ( %pi /4) * D ^2;
dm =13.6*10^3;
a = A /[ P /( dm * g * di ) -1];
d =(4* a / %pi ) ^0.5*10^3;
reddisp (d , d i a m e t e r o f t h e t u b e (mm) )

Scilab code Exa 9.11 calculate amplification ratio and percentage error
122

1 blue//blue blue c a l c u l a t e blue blue a m p l i f i c a t i o n blue


2
3
4
5
6
7
8
9
10

blue r a t i o blue blueandblue blue p e r c e n t a g e blue blue e r r o r


redclc ;
AR =1/(0.83 -0.8) ;
reddisp ( AR , A m p l i f i c a t i o n r a t i o )
D =50*10^ -3;
A = ( %pi /4) * D ^2;
d =6*10^ -3;
a = ( %pi /4) * d ^2;
PR =( a / A ) *100;
reddisp ( PR , p e r c e n t a g e e r r o r )

Scilab code Exa 9.12 calculate value of counter weight required


1 blue//blue blue c a l c u l a t e blue blue v a l u e blue blue o f blue
2
3
4
5
6
7
8
9
10

blue c o u n t e r blue blue w e i g h t blue blue r e q u i r e d


redclc ;
P =981;
g =9.81;
d =500*10^ -3;
A = ( %pi /4) *(10*10^ -3) ^2;
R =275*10^ -3;
th =30;
W = A * d * P /(2* g * R * sind ( th ) ) ;
reddisp (W , v a l u e o f c o u n t e r w e i g h t r e q u i r e d ( kg ) )

Scilab code Exa 9.13 calculate damping factor time constant error and
time lag calculate damping factor natural frequency time constant error and
time lag
1 blue//blue blue c a l c u l a t e blue bluedampingblue blue f a c t o r

blue , blue blue t i m e blue blue c o n s t a n t blue , blue blue e r r o r


blue blueandblue blue t i m e blue blue l a g
123

2 blue//blue blue c a l c u l a t e blue bluedampingblue blue f a c t o r

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

blue , blue blue n a t u r a l blue blue f r e q u e n c y blue , blue


blue t i m e blue blue c o n s t a n t blue , blue blue e r r o r blue
blueandblue blue t i m e blue blue l a g
redclc ;
Mp1 =20/40;
Mp2 =10/40;
Mp3 =5/40;
Eta =0.225;
reddisp ( Eta , damping f a c t o r )
Td =1.2;
wd =2* %pi / Td ;
wn = wd /[(1 - Eta ^2) ^0.5];
tc =1/ wn ;
reddisp ( tc , t i m e c o n s t a n t ( s ) )
ess =2* Eta / wn ;
ess5 =5* ess ;
reddisp ( ess5 , e r r o r f o r 5mm/ s ramp (mm) )
Tlag =2* Eta * tc ;
reddisp ( Tlag , t i m e l a g ( s ) )
Eta1 = Eta *(0.5) ^0.5;
reddisp ( Eta1 , New damping f a c t o r )
Td =1.2;
wn1 = wn *(0.5) ^0.5;
reddisp ( wn1 , New n a t u r a l f r e q u e n c y ( r a d / s ) )
tc1 =1/ wn ;
reddisp ( tc1 , New t i m e c o n s t a n t ( s ) )
ess51 = ess5 ;
reddisp ( ess51 , new e r r o r f o r 5mm/ s ramp (mm) )
Tlag1 = Tlag ;
reddisp ( Tlag1 , new t i m e l a g ( s ) ) ;

Scilab code Exa 9.14 calculate thickness of diaphram and natural frequency
1 blue//blue blue c a l c u l a t e blue blue t h i c k n e s s blue blue o f

124

2
3
4
5
6
7
8
9
10
11

blue bluediaphramblue blueandblue blue n a t u r a l blue


blue f r e q u e n c y
redclc ;
P =7*10^6;
R =6.25*10^ -3;
v =0.28;
E =200*10^9;
t ={[9* P * R ^4*(1 - v ^2) /(16* E ) ]^0.25}*10^3;
reddisp (t , t h i c k n e s s o f diaphram (mm) )
ds =7800;
fn =[2.5* t /( %pi * R ^2) ]*[ E /(3* ds *(1 - v ^2) ) ]^0.5;
reddisp ( fn , n a t u r a l f r e q u e n c y ( Hz ) )

Scilab code Exa 9.15 calculate the natural length of the spring and dispacement
1 blue//blue blue c a l c u l a t e blue blue t h e blue blue n a t u r a l blue

2
3
4
5
6
7
8
9
10
11
12
13

blue l e n g t h blue blue o f blue blue t h e blue blue s p r i n g blue


blueandblue blue d i s p a c e m e n t
redclc ;
P =100*10^3;
A =1500*10^ -6;
F=P*A;
Cs = F /3;
Ls = Cs +40;
reddisp ( Ls , n a t u r a l l e n g t h o f s p r i n g (mm) )
P1 =10*10^3;
F1 = P1 * A ;
Ss =3+2*.5;
D = F1 / Ss ;
reddisp (D , d i s p l a c e m e n t (mm) )

Scilab code Exa 9.16 calculate the open circuit voltage


125

1 blue//blue blue c a l c u l a t e blue blue t h e blue blueopenblue


2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

blue c i r c u i t blue blue v o l t a g e


redclc ;
P =200*10^3;
R =70*10^ -3;
v =0.25;
t =1*10^ -3;
r =60*10^ -3;
E =200*10^9;
Sr =[3* P * R ^2* v /(8* t ^2) ]*{(1/ v +1) -(3/ v +1) *( r / R ) ^2};
St =[3* P * R ^2* v /(8* t ^2) ]*{(1/ v +1) -(1/ v +3) *( r / R ) ^2};
Sta2 =( Sr - v * St ) / E ;
Sta3 =( Sr - v * St ) / E ;
r0 =10*10^ -3;
Sr1 =[3* P * R ^2* v /(8* t ^2) ]*{(1/ v +1) -(3/ v +1) *( r0 / R ) ^2};
St1 =[3* P * R ^2* v /(8* t ^2) ]*{(1/ v +1) -(1/ v +3) *( r0 / R ) ^2};
Sta1 =( Sr1 - v * St1 ) / E ;
Sta4 =( Sr1 - v * St1 ) / E ;
Gf =1.8;
ei =12;
eo =( Sta1 + Sta4 - Sta2 - Sta3 ) * Gf * ei /4;
reddisp ( eo , o u t p u t v o l t a g e (V) )

Scilab code Exa 9.17 calculate the optimum setting


1 blue//blue blue c a l c u l a t e blue blue t h e blue blueoptimumblue
2
3
4
5
6
7
8
9

blue s e t t i n g
redclc ;
Aou =700*25*1/100;
Aol =100*25*1/100;
AouPtP = 2* Aou ;
AolPtP = 2* Aol ;
Se1 =1;
D1 = AouPtP / Se1 ;
reddisp ( D1 , d e f l e c t i o n o f s c r e e n c o r r e s p o n d i n g t o
126

10

11
12
13
14
15
16
17

18
19
20
21

22
23
24
25

26
27

maximum p r e s s u r e f o r s e n s i t i v i t y o f 1mV/mm (mm) )


reddisp ( s i n c h t h e l e n g t h o f t h e s c r e e n i s 100mm s o
waveform i s o u t o f r a n g e and h e n c e s e n s i t i v i t y
s e t t i n g o f 1mV/mm s h o u l d n o t be u s e d )
Se2 =5;
D2 = AouPtP / Se2 ;
reddisp ( D2 , d e f l e c t i o n o f s c r e e n c o r r e s p o n d i n g t o
maximum p r e s s u r e f o r s e n s i t i v i t y o f 5mV/mm (mm) )
reddisp ( d e l e c t i o n i s w i t h i n t h e r a n g e )
Se3 =20;
D3 = AouPtP / Se3 ;
reddisp ( D3 , d e f l e c t i o n o f s c r e e n c o r r e s p o n d i n g t o
maximum p r e s s u r e f o r s e n s i t i v i t y o f 20mV/mm (mm)
)
reddisp ( d e l e c t i o n i s w i t h i n t h e r a n g e )
Se4 =100;
D4 = AouPtP / Se4 ;
reddisp ( D4 , d e f l e c t i o n o f s c r e e n c o r r e s p o n d i n g t o
maximum p r e s s u r e f o r s e n s i t i v i t y o f 100mV/mm (mm)
)
reddisp ( d e l e c t i o n i s w i t h i n t h e r a n g e )
Se5 =500;
D5 = AouPtP / Se5 ;
reddisp ( D5 , d e f l e c t i o n o f s c r e e n c o r r e s p o n d i n g t o
maximum p r e s s u r e f o r s e n s i t i v i t y o f 500mV/mm (mm)
)
reddisp ( d e l e c t i o n i s w i t h i n t h e r a n g e )
reddisp ( s i n c e t h e s e n s i t i v i t y o f 5mV/mm g i v e s h i g h e r
d e f l e c t i o n s o i t i s t h e optimum s e n s i t i v i t y )

Scilab code Exa 9.18 calculate the output voltage of bridge


1 blue//blue blue c a l c u l a t e blue blue t h e blue blue o u t p u t blue

blue v o l t a g e blue blue o f blue blue b r i d g e


2 redclc ;

127

3
4
5
6
7
8
9

dP =(7000*10^3) -(100*10^3) ;
b =25*10^ -12;
R1 =100;
dR = R1 * b * dP ;
ei =5;
deo = dR * ei /(4* R1 )
reddisp ( deo , o u t p u t v o l t a g e o f b r i d g e (V) )

Scilab code Exa 9.19 calculate attenuation


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

blue//blue blue c a l c u l a t e blue blue a t t e n u a t i o n


redclc ;
T =273+20;
P =101.3*10^3;
R =287;
de = P /( R * T ) ;
C =20.04* T ^0.5;
r =6.25*10^ -3;
L =0.6;
V = %pi *[(12.5*10^ -3) ^2]*(12.5*10^ -3) ;
wn = C * r *( %pi /( V *( L +0.5* %pi * r ) ) ) ^0.5;
fn = wn /(2* %pi ) ;
f =1000;
u = f / fn ;
mu =19.1*10^ -6;
eta =[2* mu /( de * C * r ^3) ]*[3* L * V / %pi ]^0.5;
M =1/{[(1 - u ^2) ^2]+[(2* eta * u ) ^2]}^0.5;
%M = M *100;
reddisp ( %M , a t t e n u a t i o n= )

Scilab code Exa 9.20 calculate error


1 blue//blue blue c a l c u l a t e blue blue e r r o r

128

2
3
4
5
6
7
8
9
10

redclc ;
d =1;
At =( %pi * d ^2) *10^ -6/4;
V =100*10^ -6;
h =30*10^ -3;
P1 =( At * h ^2) / V ;
P2 =( At * h ^2) /( V - At * h ) ;
e = P2 - P1 ;
reddisp (e , e r r o r= )

129

Você também pode gostar