A Course in Mechanical Measurements and Instrumentation_A. K. Sawhney and P. Sawhney



Comments



Description

Scilab Textbook Companion forA 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 August 4, 2014 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 1 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. 2 Contents List of Scilab Codes 4 2 Static Characteristics of Instruments and Measurement systems 12 3 Errors in Measurements and Their Statistical Analysis 25 4 Dynamic Characteristics of Instruments and Measurement systems 48 5 Primary Sensing Elements and Transducers 59 6 Signal Conditioning 84 7 Display Devices and recorders 100 8 Metrology 106 9 Pressure Measurements 111 3 . .18 calculating static error and static correction . . . . calculating true value of the temperature . . . calculating the noise output voltage of the amplifier . . . . . . . . . . . . . . . . calculating the power with uncertainity of one unit in voltage and current . . . . calculating the noise voltage . . .12 Exa 2. . . . . . . . . calculating the sum of resistances connected in series with uncertainity of one unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .16 Exa 2.6 2. . calculating Relative error expressed as a percentage of f sd. . . . . . . . . .7 2. . . . . . . . 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 . . 4 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 . . .9 Exa 2.10 Exa 2. . . .17 Exa 2. .1 Exa 2. . . . .2 Exa 2. . . . . . . .13 Exa 2. . .4 Exa 2. . . .List of Scilab Codes Exa 2. . . . . . . . . calculating the sum of resistances connected in series with appropriate number of significant figure . . . . . . calculating static error and static correction . . .3 Exa 2. . .14 Exa 2. . calculating the average force and range of error . . . . . . . . . . . . . . . . calculating the ratio of output signal to noise signal . . . . calculating the voltage drop with appropriate number of significant figure . . . . calculating the volume of the mercury thermometer .15 Exa 2. . .5 Exa Exa Exa Exa 2.8 2. . 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 sensitivity and deflection factor of wheatstone bridge . . . . Calculate apparent resistance actual resistance and error 5 20 20 21 21 21 22 22 23 23 24 25 25 26 26 27 27 28 28 29 30 30 31 31 32 33 33 34 34 . . . . . . . . . . . . . . . . . . . . .20 2. . . . . calculate the per unit change in the value of spring for different temperature ranges . . . . .13 Exa 3. . calculating the Resolution . . . . . . . . . . . calculating the reading of the multimeter and percentage error . . . . . . . . . . . .29 3. . . . . . . . . .9 Exa Exa Exa Exa 3. . . . . . . . . . . . . . . . . . . . Calculate the limiting error in percent . . . . . . . calculating the dead zone .22 2.4 3. . . . . . . . . . .25 Exa 2. . . . .18 calculating the maximum position deviation resistance deviation .23 2. . . . . . . . . calculating the maximum available power .19 Exa Exa Exa Exa 2. . . . . . . .Exa 2. .11 3. . .15 Exa 3.24 Exa 2. . . . . . .27 Exa 2. . . . . . . . . . . Calculate the percentage limiting error and range of resistance values . . . . . . Calculate the true power as a percentage of measured power . . . . . . . . . . . . . . calculating the actual value of current measured value of current and percentage error . . . . . . . . Calculate the magnitude and limiting error in ohm and in percentage of the resistance . . . . . . . . . . . . Calculate the magnitude of power and limiting error . . . . . . . . . . calculate the value of relative limiting error in resistance Calculate the guaranteed values of the resistance . .5 Exa 3. . . . . . . . . . .28 Exa Exa Exa Exa Exa Exa 2.8 Exa 3. . calculate the Volume and relative error . . .10 3. . . . calculate the power loss and relative error . . . . . .14 Exa 3. . . . . calculate the total resistance error of each register and fractional error of total resistance .17 Exa 3. . . . . . . calculating guarantee value of capacitance . . . . . Calculate the range of readings specified interms of fsd and true value . . . . . . . . . . . . . . . calculating the loading error . .7 Exa 3. . . . find the error . . calculating the reading of the multimeter and percentage error . . . . . . . calculating percentage limiting error . . . . . . . . . . . . . . . . . . . . . . . . . Calculate the magnitude of Force and limiting error . . . . . . . . . . . . . . .12 3. . . . . . . . . .2 3. . Calculate the range of readings . . . . . . . . . . . . . . . . . . . .1 3. .6 Exa 3.26 Exa 2. . . calculating the voltage across the oscilloscope . . . .3 3. . . . . . . . . . . . . . calculating the Resolution . . . . .16 Exa 3. . . . . .30 3. . . . . calculate power disipated and uncertaainity in power . . . . . . . . . calculate time to read half of the temperature difference Calculate the temperature after 10s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . determine value of total current considering errors as limiting errors ans as standrd deviations . . .1 4. . . . to find Cq and its possible errors . . . .29 3. . 6 35 35 36 37 37 38 38 39 39 40 40 41 42 42 43 44 44 45 45 46 47 48 48 49 49 49 50 50 . . . . . . . .8 4. . . . . . . . . . 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 . .19 Exa 3. Calculate the depth after one hour . . . to point out the reading that can be rejected by chavenets criterion . . . . . . . . to find the mean standard deviation probable error and range . .28 3. .41 4. . . . determine probable error in the computed value of resistnce . . . . . calculating the temperature . . . . . . .31 Exa 3. . . . . . . . . . .Exa 3. . . . . . . . . . . . . . . calculate standard deviation . . . . . . . . . . . . . . . . . . . . .20 Exa 3. .25 3. . . . . . . . . .9 Calculate apparent resistance actual resistance and error Calculate the error and percentage error in the measurement of deflection . . . . . . . . . . to find standard deviation and probability of error . .24 3. . . to calculate precision index of instrument . . . . .26 3. . . . . .27 3. . . . . to find no of 100 rsding exceed 30mm . . . . . . . . . . . . . to find no of expected readings . . . . . to calculate uncertainity in measurement . . . . . . to calculate uncertainity in power . . . . . . . . . . . . . .35 Exa 3. . . . .22 Exa 3. . . . . . . . .37 Exa 3. . . . . Calculate time constant . .21 Exa 3. . . . . . Calculate the temperature after 10s . . . . . . . . . . .39 Exa Exa Exa Exa Exa Exa Exa Exa Exa 3. . . . . to find probable no of resistors . . . . .40 3. . .5 4. . . .38 Exa 3. . . . . . . . .4 4. . . . . . .6 4. . . . . . to find the mean deviations from the mean Average deviation standard deviation and variance . . . . to find confidence interval for given confidence levels . . .34 Exa 3. . . . . . . . . .2 4. . to find no of rods of desired length . .32 Exa 3. to find uncertainity in combined resistance in both series and in parrallel . .23 Exa Exa Exa Exa Exa Exa Exa Exa 3. . . . . . . Calculate the value of resistance after 15s . . . . . . . . . . . . . . . . . . . . Calculating the maximum excitation voltage and the sensitivity . Calculate maximum value of indicated temperature and delay time . . . . . . . .18 Exa 4. . . . . . . . . Calculating the output voltage . . . . . Calculate the deflection at center . . . . . . . . . . . . . . . . . . .23 5. 7 51 51 52 53 53 54 54 55 55 56 56 57 58 58 59 59 60 60 61 61 61 62 62 63 63 63 64 64 . . . Calculate the natural frequency . . . . .2 5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .20 Exa Exa Exa Exa Exa Exa Exa 4. Calculate natural frequency and setteling time . . . . . . . . . . .11 Exa 4. .19 Exa 4. .3 5. . . . . . . determine damping ratio . Checking the suitability of the potentiometer . . . . . . . . . . . . . . . . . calculate the percentage change in value of the gauge resistance . . . . . . .5 Exa 5. . .1 5. Checking the suitability of the potentiometer . . . . .12 Exa 4. . . . . . . . . . . . . . . Calculate maximum and minimum value of indicated temperature phase shift time lag . . . . Calculating the displacement and resolution of the potentiometer . . . . . . . . .10 5.15 4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Calculating the resolution of the potentiometer . . Find the output . . . . . . . . . . . .16 4. . . . . . . . . . . . . . .14 4. . . . . . . . . . . . . . . . . . . Calculate the angle of twist . . Calculate the maximum allowable time constant and phase shift . .21 4. . . . . . . . . . . . . . . . . . . . . . .6 Exa 5. . . .4 Exa 5. . . . .14 Calculate the temperature at a depth of 1000 m . . . . . . . . . . Calculating the value of the resistance of the gauges . . Calculate damping ratio natural frequency frequency of damped oscillations time constant and steady state error for ramp signal . . . . . . plot the graph of error versus K . . . . . . . . . .7 Exa Exa Exa Exa Exa Exa 5. . . . . . . . Calculate time lag and ratio of output and input .11 5. . . . . . . . . . . . . . calculate the value of damping constant and frequency of damped oscillations . . . . . . . . . . . . . . . .13 Exa 5. . . . . . . .22 4. . . . . . . .Exa 4. .13 Exa Exa Exa Exa 4. . Calculate the frequency range .12 5. .10 Exa 4. . .8 5. Calculating the possion ratio . . . . .17 Exa 4. . Calculating the Gauge factor . . .9 5. . . . . . . . . Calculate the value of resistance at different values of time . . . . . . . Calculate the Torque . . . . . . . . determine the error . . . . . . . . . . . . . . . . . . find resistance . . . . . . . . . . . . . . . . . . . . . . . Calculate the resistance and the temperature . . . . . . Calculate the dielectric stress change in value of capacitance . . . . . . . . .15 5.42 5. . . . .21 5. . . . . . Calcating the series resistance and approximate error . . . .18 5. . . . . . 8 65 65 66 66 67 67 67 68 68 69 69 70 70 70 71 71 72 72 73 73 74 74 75 76 76 76 77 78 78 79 . Calculate the output voltage and charge sensitivity . . . . Calculate senstivity of the LVDT . calculating the frequencies of oscillation . . .35 Exa 5. . . . . . Calculate the value of the capacitance afte the application of pressure . . . . . . .29 5. . . .41 5. . Calculate the minimum frequency and phase shift . . . Calculate the force . . .43 Exa 5. . . . . . . . Calculate the linear approximation . . . . . . . . . . .Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa 5. . . . . . .40 5.23 5. . . . . . . . . . . . . .24 5. Calculate the percentage linearity . . . . . . . . . . . . . calculate the deflection maximum and minimum force calculating the sensitivity of the transducer . . .34 Exa 5. . . . . . . . . . . .45 Exa 5. . . .25 5. . . . . . . . .22 5. . . . . .32 5. .37 5. . . . . . .27 5. Calculate the change in frequency of the oscillator . . . . . . Calculate the change in capacitance and ratio . Calculate the strain charge and capacitance clc . . . . calculate op volatge . . .17 5. . .28 5. . Calculate the resistance . . . . .19 5. . . Calculate the values of resistance R1 and R2 . calculate sensitivity of the transducer high frequency sensitivity Lowest frequency Calculate external shunt capacitance and high frequency sensitivity after connecting the external shunt capacitance . . . . . . . . . . . . . . . .16 5.26 5. . . . . . . . . . calculate peak to peak voltage swing under open and loaded conditions calculate maximum change in crystal thickness . . . . . . . . . . . . . . . calculating the change in temperature . . Calculating the sensitivity and maximum output voltage Calculating the temperature . . . Calculate the resistance . . . . .30 5. . . Calculate the time . Calculate the value of time constant phase shift series resistance amplitude ratio and voltage sensitivity . . . . . .20 5. . . . . . . . . . .44 Exa 5. . . . . . . . .36 Exa Exa Exa Exa Exa 5.33 Exa 5. . . . . . .46 Calculating the change in length and the force applied Calculate the linear approximation . . . . . . . . . . .31 5. . . . . . . . . . . . calculating gain and feedback resistance . . . .3 6. . . . . . . . . . . . . . . . . . . . . . . . . calculate op volatge . . calculating Amplification factor . calculating the closed loop gain . . .2 6. .12 Exa 6. . Calculate maximum velocity of emitted photo electrons Calculate the resistance of the cell . . . . calculating minimum maximum time constants and value of frequencies . . . calcuating the passband gain and upper and lower cut off frequencies .8 6. . . . . . . Calculate incident power and cut off frequency .4 6. . . . . . . . . .17 6. Calculating Difference mode gain and output voltage . . . . . . . .22 6. . . . . . . . . . . . Calculating Difference mode Common mode gain and CMRR . . . . . . . . . . . . . .11 Exa 6. . . . . . . . . . . . .14 Exa 6. .16 Exa Exa Exa Exa Exa Exa Exa Exa 6. . . . . . . . . .49 5.21 6. . . . . . . . . . . . . . . .24 6. . . . .54 6. . . . calculating the current . . . . . . .48 5. .53 5. . . calculating output voltage due to offset voltage . . . . .47 5. . . .9 6. . . .20 6. . . . . . . . Calculate the threshold wavelength . .13 Exa 6. . . . . . . . . . . . . calculating the maximum output voltage . . . . calculating time constant and value of capacitance . . . Find the value of current . . . .50 5. . . . . . . .15 Exa 6. . . . . . Calculating the values of resistances . . . . . . . calculating output voltage due to offset voltage . . . . . . . . . . . . . . . 9 80 80 81 81 81 82 82 83 84 84 85 85 85 85 86 86 87 87 88 88 89 89 90 90 91 91 92 92 93 93 94 94 . . . . . . . . . . . . .7 6. . . . . Calculating the bridge output . . . . . . calculate the output voltage for different values of K .10 6. Calculating Signal to noise ratio and CMRR . . . .25 to prove time constant should be approximately 20T . . . . . . . .1 6. . . . . . . . . . . . . . . . . . . . . Calculating maximum permissible current through strain gauge supply voltage and Power dissipation in series resistance . .6 6. . . . . . . Calculating the resistance of unknown resistance . Calculate the internal resistance of cell and open circuit voltage . . . . . . calculating the resistance and output voltage . . . . .51 5. . Calculating sensitivity and output voltage . . .52 5. . . .5 6. . calculate the output voltage and sensitivity . . . calcuating the value of C . . . .23 6. . Calculating the value of resistance and capacitance . . . . . . . . . . . . . calculating feedback resistance . .19 6. . . .Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa 5. . . . . . . . . . . . . . . . . . calculating number of turns and current . . . . . . . . . . . .9 7. . . . . . . . .6 8. . . . . . .28 Exa 6. . calculate uncertainity in displacement . . . . . . . .29 Exa 6. .27 Exa 6. . . . . . . . . . . . . . . .30 Exa 6. . . . calculate seperation distance between two surfaces and angle of tilt . . calculating resolution . . . . Calculating the number of bits Value of LSB Quantization error minimum sampling rate Aperature time and dynamic range . . . .1 8. . . . .33 Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa 6. . . . . . calculating maximum error . . . . . . . . . Calculating the value of resistance and smallest output current . . . . . . . . . . . . . . . . Calculate the output of successive approximation A to D . .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 . . . . . . . . . . . . . . . . Calculate Pressure head . . . . . .7 9. . . . . . . calculating number density of the tape . . . . . . . . .34 7. . . . . . . .32 Exa 6. . . . . . Calculating the output voltage . . . . . calculate difference between height of workpieces and pile of slip gauges .7 7. . . . . . . . . . . . . . . .1 9. . . . . Calculate the change in thickness along its length .5 7. . . . . . . . . . . . . . . . . . . . . 10 95 95 96 96 96 97 98 98 99 100 100 101 102 102 102 103 103 104 104 106 107 108 108 109 109 109 111 112 112 113 113 . . . . . . . . . . . . . . . . . .3 9. .10 8. . calculating speed of the tape . . . . . . . . . . .4 7.3 7. . . . Calculating possible phase angles . . . . . . . . . . . . . . calculate height . . . . . . . calculate the sensitivity . . . . . . calculating the length of mean free path . . Calculating reference voltage and percentage change . . . . . . . . . . .2 8.26 Exa 6. . .8 7. . .2 9. . . . . . . .3 8. . . . . . . . . . . calculate error interms of pressure . . . . . . . calculate the arrangement of slip gauges . calculating resolution . . calculating frequency . . . to calculate op dc voltage . . . . calculating Total possible error and percentage error . . .4 9. Calculate Pressure of air source . . . . . . . . . . . . . . . . . . . . . . . . . . Calculating possible phase angles . . .Exa 6. . .31 Exa 6. .6 7. . . . . . . . . . .4 Exa 8. . . .2 7. . . . . . . . . . . . . . . .1 7. . . . . . . . . . . Calculate the difference in two diameters . . . . . .5 Exa Exa Exa Exa Exa Exa Exa 8. . . . . . . .Exa 9. . . calculate the optimum setting . . . . . . . . . . . . . . . . . . . .9 Exa Exa Exa Exa 9. . . . . . . . . . . . calculate damping factor time constant error and time lag calculate damping factor natural frequency time constant error and time lag . . . . . . calculate diameter of the tube . .15 Exa Exa Exa Exa Exa 9. .13 Exa 9.8 Exa 9. . . calculate attenuation .17 9.7 Exa 9. . . . . . . calculate the open circuit voltage . . . .18 9. . . . . . . . . . calculate the output voltage of bridge .19 9. . . . . . calculate amplification ratio and percentage error . .14 Exa 9. . . . . . . . calculate error . . . . . . . . . . . . . . . . . . . . . . calculate angle to which tube is incliend to horizontal calculate Length of scale angle to which tube is incliend to horizontal . . . . . . . . . . . .20 calculate angle to which tube is incliend to vertical . . 11 113 114 114 115 115 116 116 117 118 118 119 120 120 121 . . . . . . . . . . . . . . . . . . . .12 9. .16 9.11 9. . . . . . .10 9. . calculate value of counter weight required . . . . . . . . . . . . . . . . . calculate thickness of diaphram and natural frequency calculate the natural length of the spring and dispacement . . . . . . 50.43. e = Am . ’ S t a t i c C o r r e c t i o n (V)= ’ ) . ’ S t a t i c e r r o r (V)= ’ ) . Sc = . 3 disp ( ’ c a l c u l a t i n g s t a t i c e r r o r and s t a t i c c o r r e c t i o n 4 5 6 7 8 9 ’) Am = 127. disp (e .1 calculating static error and static correction 1 // c a l c u l a t i n g s t a t i c e r r o r and s t a t i c c o r r e c t i o n 2 clc .Chapter 2 Static Characteristics of Instruments and Measurement systems Scilab code Exa 2.e .2 calculating true value of the temperature 1 // 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 12 . Scilab code Exa 2. At = 127. disp ( Sc .At . 2 3 4 5 6 7 clc ; disp ( ’ 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 ; disp ( 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 2 3 4 5 6 7 8 9 10 11 12 13 // 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) clc ; disp ( ’ 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 ; disp (e , ’ A b s o l u t e e r r o r (V)= ’ ) ; Sc = - e ; disp ( Sc , ’ A b s o l u t e C o r r e c t i o n (V)= ’ ) ; RE =( e / At ) *100; disp ( 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; disp ( 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 1 // c a l c u l a t i n g 2 clc ; s t a t i c e r r o r and s t a t i c c o r r e c t i o n 13 3 4 5 6 7 8 9 disp ( ’ c a l c u l a t i n g s t a t i c e r r o r and s t a t i c c o r r e c t i o n ’) Am = 0.000161; At = 0.159*10^ -3; e = Am - At ; disp (e , ’ S t a t i c e r r o r (m3/ s )= ’ ) ; Sc = - e ; disp ( 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 // c a l c u l a t i n g maximum s t a t i c e r r o r 2 disp ( ’ c a l c u l a t i n g maximum s t a t i c e r r o r ’ ) ; 3 // Span o f t h e t h e r m o m e t e r ( d e g r e e C) 4 S =200 -150; 5 // A c c u r a c y o f t h e t h e r m o m e t e r ( i n t e r m s o f p e r c e n t a g e o f span ) 6 A =0.0025; 7 e= A*S; 8 disp (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 // 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 2 clc ; 3 disp ( ’ 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; 1 5 14 6 disp (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 2 3 4 5 6 7 8 9 10 11 12 // 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 clc ; disp ( ’ 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 ; disp ( 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 ; disp ( 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 2 3 4 5 6 7 // 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 clc ; disp ( ’ 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; disp ( Vn , ’ n o i s e V o l t a g e (mV)= ’ ) 15 10 calculating the ratio of output signal to noise signal 1 2 3 4 5 6 7 8 9 10 // c a l c u l a t i n g t h e r a t i o o f o u t p u t s i g n a l t o n o i s e signal clc . disp ( Sno . ’ N o i s e v o l t a g e (V)= ’ ) . ’ 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= ’ ) disp ( ’ 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.5. disp ( En . disp ( nf . ’ 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= ’ ) disp ( ’ 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. disp ( ’ The n o i s e v o l t a g e i s ’ ) Bw =100*10^3.Scilab code Exa 2. disp ( Snno . T =300. K =1. disp ( ’ 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. R =120. ’ 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 . ’ n o i s e F a c t o r= ’ ) nf =10* log10 ( F ) .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 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 // c a l c u l a t i n g t h e 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 // c a l c u l a t i n g t h e 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 // c a l c u l a t i n g t h e n o i s e f a c t o r and n o i s e f i g u r e clc .38*10^ -23. 16 . ’ n o i s e F i g u r e ( dB )= ’ ) Scilab code Exa 2. disp ( Sni . A =( K * T * R * Bw ) ^0. En =2* A . disp (F . R =( R1 + R2 + R3 ) .11 Eno =0.73. 12 disp ( Eno . ’ N o i s e v o l t a g e a t o u t p u t (V)= ’ ) . Fmax = F3 .13 calculating the sum of resistances connected in series with uncertainity of one unit 1 2 3 4 5 6 // c a l c u l a t i n g t h e sum o f r e s i s t a n c e s c o n n e c t e d i n s e r i e s w i t h u n c e r t a i n i t y o f one u n i t clc . ’ A v e r a g e r a n g e o f e r r o r (N)= ’ ) Scilab code Exa 2. 17 . Fmin = F1 . R3 =0. MaxR = Fmax . ’ A v e r a g e F o r c e (N) = ’ ) .08. ’ 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 = ’ ) . F2 =10. disp ( AvgR . F3 =10. F4 =10.10. 13 Ra = Eno / En . AvgR =( MaxR + MinR ) /2. disp ( Fav . R2 =2. Fav =( F1 + F2 + F3 + F4 ) /4. MinR = Fav . 14 disp ( Ra .12*10^ -3. R1 =72. Scilab code Exa 2.12 calculating the average force and range of error 1 2 3 4 5 6 7 8 9 10 11 12 13 14 // c a l c u l a t i n g t h e a v e r a g e f o r c e and r a n g e o f e r r o r clc .Fav . F1 =10.Fmin .11.03.612.3. 7 8 9 disp (R .7. P=V*I. 3 R1 =28. ’ Power (W) = ’ ) . I =1.16. disp ( ’ t h e r e s u l t a n t doutful figure ’) i s 16.15 calculating the sum of resistances connected in series with appropriate number of significant figure // c a l c u l a t i n g t h e sum o f r e s i s t a n c e s c o n n e c t e d i n s e r i e s w i t h a p p r o p r i a t e number o f s i g n i f i c a n t figure 2 clc . 1 5 6 R =( R1 + R2 ) . V =12. ’ sum o f r e s i s t a n c e s ( ohm ) = ’ ) . 18 .14 calculating the power with uncertainity of one unit in voltage and current 1 2 3 4 5 6 7 8 // c a l c u l a t i n g t h e power w i t h u n c e r t a i n i t y o f one u n i t i n v o l t a g e and c u r r e n t clc .34.624. 6 ohm w i t h 6 a s f i r s t doutful figure ’) Scilab code Exa 2. 7 disp (R . disp (P .2 W with 2 as f i r s t Scilab code Exa 2. disp ( ’ t h e r e s u l t a n t r e s i s t a n c e i s 7 5 . ’ sum o f 8 r e s i s t a n c e s ( ohm ) = ’ ) . 4 R2 =3. 19 . 4 I =4.9 disp ( ’ 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 o f the 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.27.37. ’ s e n s i t i v i t y (mm p e r ohm ) = ’ ) . ’ d e f l e c t i o n f a c t o r ( ohm p e r mm) = ’ ) . ’ v o l t a g e d r o p (V) = ’ ) . Mo =3. Df = Mi / Mo . Sen = Mo / Mi .17 calculating the sensitivity and deflection factor of wheatstone bridge 1 2 3 4 5 6 7 8 // c a l c u l a t i n g t h e s e n s i t i v i t y and d e f l e c t i o n f a c t o r of wheatstone bridge clc . 7 disp (E .16 calculating the voltage drop with appropriate number of significant figure // c a l c u l a t i n g t h e v o l t a g e d r o p w i t h a p p r o p r i a t e number o f s i g n i f i c a n t f i g u r e 2 clc . 3 R =31. disp ( Sen . disp ( Df . 1 5 6 E=I*R. Mi =7. 8 9 disp ( ’ 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. disp ( MRD .20 calculating the dead zone 1 // c a l c u l a t i n g t h e dead z o n e 2 clc . disp ( Vc . ’ 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 )= ’ ) .19 calculating the maximum position deviation resistance deviation 1 2 3 4 5 6 7 8 9 // c a l c u l a t i n g t h e maximum p o s i t i o n d e v i a t i o n . R =10000. ’ Maximum d i s p l a c e m e n t d e v i a t i o n ( ohm )= ’ ) . resistance deviation clc .8*10^3. MRD = Pl * R .25^2.18 calculating the volume of the mercury thermometer 1 2 3 4 5 6 7 // c a l c u l a t i n g t h e volume o f t h e m e r c u r y t h e r m o m e t e r clc . ’ Area o f m e r c u r y t h e r m o m e t e r ’ ) Lc =13. FSD =320. Ac =( %pi /4) *0. Scilab code Exa 2. disp ( Ac .001. Vc = Ac * Lc . MDD =( Pl * FSD ) . Pl =0.Scilab code Exa 2. 3 disp ( ’ s p a n s= ’ ) 20 . disp ( MDD . ’ 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. 999. ’ Dead z o n e ( d e g r e e C)= ’ ) . D =100. disp (R . Fs =200. 5 Dz =0. D =9999. SD = Fs / D . SD = Fs / D . ’ r e s o l u t i o n (V)= ’ ) Scilab code Exa 2. disp (R . 1 21 .24 calculating the reading of the multimeter and percentage error // c a l c u l a t i n g t h e r e a d i n g o f t h e m u l t i m e t e r and percentage error 2 clc .22 calculating the Resolution 1 2 3 4 5 6 7 // c a l c u l a t i n g t h e R e s o l u t i o n clc .00125* s . R = SD . ’ r e s o l u t i o n (V)= ’ ) Scilab code Exa 2. Fs =9. R = SD /10. Scilab code Exa 2.23 calculating the Resolution 1 2 3 4 5 6 7 // c a l c u l a t i n g t h e R e s o l u t i o n clc . 6 disp ( Dz .4 s =600. ’ 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 . ’ P e r c e n t a g e l o a d i n g e r r o r= ’ ) 22 .Eo ) / Eo ) *100. disp ( El .25 calculating the reading of the multimeter and percentage error 1 2 3 4 5 6 7 8 9 // c a l c u l a t i n g t h e r e a d i n g o f t h e m u l t i m e t e r and percentage error clc . Zo =10000. ’ P e r c e n t a g e e r r o r= ’ ) Scilab code Exa 2. ’ P e r c e n t a g e e r r o r= ’ ) Scilab code Exa 2. disp ( PE .Eo ) / Eo ) *100. disp ( El . El = Eo /(1+ Zo / Zl ) . disp ( El . Zo =1000. ’ 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 . El = Eo /(1+ Zo / Zl ) .3 4 5 6 7 8 9 Zl =20000. Zl =1000. El = Eo /(1+ Zo / Zl ) . Zl =20000.Eo ) / Eo ) *100. ’ 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 . Zo =200*200/400.26 calculating the loading error 1 2 3 4 5 6 7 8 9 // c a l c u l a t i n g t h e l o a d i n g e r r o r clc . Eo =100*200/400. Eo =6. Eo =6. disp ( PE . disp ( PE . 1 3 4 5 6 7 8 9 10 Eo =10 -((10*1000) /(1000+1000) ) . m e a s u r e d v a l u e o f c u r r e n t and p e r c e n t a g e e r r o r 2 clc . Io = Eo / Zo . f =100000.10 Ac =100+ PE .%i * Xc ) /( R . 11 disp ( Ac . ’ f r e q u e n c y= ’ ) Xc =1/(2* %pi * f * C ) . C =50*10^ -6. Il = Eo /( Zo + Zl ) . El = Eo /(1+ Zo / Zl ) . ’ 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 // c a l c u l a t i n g t h e a c t u a l v a l u e o f c u r r e n t . Zo =10*10^3. ’ A c c u r a c y= ’ ) Scilab code Exa 2. disp ( El . Zo =((1000*1000) /(1000+1000) ) +500. disp (f .27 calculating the voltage across the oscilloscope 1 2 3 4 5 6 7 8 9 10 11 12 13 // c a l c u l a t i n g t h e v o l t a g e a c r o s s t h e o s c i l l o s c o p e clc . ’ A c t u a l v a l u e o f c u r r e n t (A)= ’ ) Zl =100.%i * Xc ) . Zl =( R * . ’ Measured v a l u e o f c u r r e n t (A)= ’ ) 23 . disp ( Io . Eo =1. disp ( Il . R =10^6. 11 PE =(( Il . ’ P e r c e n t a g e l o a d i n g e r r o r= ’ ) Scilab code Exa 2. Il =5*10^ -9. Rl =6*10^6. Ro =( Eo / Il ) . 12 disp ( PE . ’ Maximum a v a i l a b l e Power (W)= ’ ) 24 . disp ( Pmax . Eo =80*10^ -3.Rl . Pmax =( Eo ^2) /(4* Ro ) .Io ) / Io ) *100.29 calculating the maximum available power 1 2 3 4 5 6 7 8 9 10 // c a l c u l a t i n g t h e maximum a v a i l a b l e power clc . Aal = As *(1 . disp ( Aau . ’ Upper l i m i t ( m i c r o F )= ’ ) . As = 1. 25 .05.01. Er =0. ’ Lower l i m i t ( m i c r o F )= ’ ) . Er =0.2 calculating percentage limiting error 1 2 3 4 5 // c a l c u l a t i n g p e r c e n t a g e l i m i t i n g e r r o r clc .Er ) . As = 150.Chapter 3 Errors in Measurements and Their Statistical Analysis Scilab code Exa 3.1 calculating guarantee value of capacitance 1 2 3 4 5 6 7 8 // c a l c u l a t i n g g u a r a n t e e v a l u e o f c a p a c i t a n c e clc . disp ( Aal . dA = As * Er . Scilab code Exa 3. Aau = As *(1+ Er ) . ’ p e r c e m t a g e l i m i t i n g e r r o r =+/− ’ ) 26 . ’ 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)= ’ ) 10 disp ( ’ 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 101W’ ) 7 Scilab code Exa 3. 7 Er =( dA / As1 ) *100.4 Calculate the limiting error in percent 1 2 3 4 5 6 // C a l c u l a t e t h e l i m i t i n g e r r o r i n p e r c e n t clc . 9 disp ( Etv .3 Calculate the range of readings 1 // C a l c u l a t e t h e r a n g e o f r e a d i n g s 2 clc . 4 TP =100. dA =0.05*5*10^ -6.5*10^ -6. 8 disp ( Er . 5 Efsd =(1/100) *1000. ’ 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 in 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)= ’ ) disp ( ’ 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 110W’ ) 8 Etv =(1/100) *100. 6 disp ( Efsd . As =2. ’ 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. disp ( Er . Er =( dA / As ) *100.6 As1 =75. 3 fsd =1000. ’ Upper v a l u e o f r a n g e ( kN/m2) ’) Scilab code Exa 3. d . R3_le =5* R3 /100. and t r u e v a l u e clc . R2_le =5* R2 /100. ’ Lower v a l u e o f r a n g e ( kN/m2) ’) Range_upper_value =100+ Error_true . d . 27 . disp ( Range_upper_value . disp ( ’ Range when s p e c i f i e d i n t e r m s o f f . s .Scilab code Exa 3. R1_le =5* R1 /100.5 Calculate the range of readings specified interms of fsd and true value 1 2 3 4 5 6 7 8 9 10 11 12 13 14 // C a l c u l a t e t h e r a n g e o f r e a d i n g s s p e c i f i e d i n t e r m s o f f .Error_true . disp ( Range_upper_value . s . R2 =75.6 Calculate the magnitude and limiting error in ohm and in percentage of the resistance 1 2 3 4 5 6 7 8 // C a l c u l a t e t h e m a g n i t u d e and l i m i t i n g e r r o r i n ohm and i n p e r c e n t a g e o f t h e r e s i s t a n c e clc . ’ Upper v a l u e o f r a n g e ( kN/m2) ’) disp ( ’ 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 . disp ( Range_lower_value . R3 =50. R1 =37.Error_fsd . ’ ) Error_fsd =1*1000/100 ’ Range_lower_value =100 . disp ( Range_lower_value . ’ Lower v a l u e o f r a n g e ( kN/m2) ’) Range_upper_value =100+ Error_fsd . ’ 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 )= ’ ) 13 Limiting_error_percentage = R_le *100/ R .9 R = R1 + R2 + R3 . 10 disp (R .5.7 calculate the value of relative limiting error in resistance 1 2 3 4 5 6 // c a l c u l a t e t h e v a l u e o f relative limiting error in r e s i s t a n c e clc .5.5. Rx = R2 * R3 / R1 . 12 disp ( R_le . R2_le_perunit =0. 5% R2 =1000. 3 R1 =100. Re_resistance =( Re_P +2* Re_I ) .8 Calculate the guaranteed values of the resistance 1 // C a l c u l a t e t h e g u a r a n t e e d v a l u e s o f t h e r e s i s t a n c e 2 clc .5. R3 =842. Re_P =1. disp ( Re_resistance . disp ( Rx . Re_I =1. ’ V a l u e o f r e s i s t a n c e ( ohm )= ’ ) 11 R_le = R1_le + R2_le + R3_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 ( p e r c e n t a g e )=+/− ’ ) Scilab code Exa 3. // R 1 l e p e r u n i t i n d i c a t e s dR1/R1 5 6 7 8 9 10 = 0 . R3_le_perunit =0. 14 disp ( Limiting_error_percentage . ’ V a l u e o f r e s i s t a n c e ( ohm )= ’ ) 28 . ’ t h e v a l u e o f relative limiting 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. 4 R1_le_perunit =0. 11 12 13 14 15 16 17 18 19 Rx_le_perunit = R1_le_perunit + R2_le_perunit + R3_le_perunit ; disp ( Rx_le_perunit , ’ 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 u n i t ( dRx/Rx )= ’ ) Er_Le = Rx_le_perunit * Rx /100; disp ( 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 )=+/− ’ ) disp ( ’ 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 ; disp ( G1 , G2 , ’ ’ ) Scilab code Exa 3.9 Calculate the percentage limiting error and range of resistance values 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 // C a l c u l a t e t h e p e r c e n t a g e l i m i t i n g e r r o r and r a n g e of resistance values clc ; disp ( ’ 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 d e c a d e a= ’ ) Er_a =4000*0.1/100; disp ( Er_a ) disp ( ’ 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; disp ( Er_b ) disp ( ’ 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; disp ( Er_c ) disp ( ’ 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; disp ( Er_d ) Er_total = Er_a + Er_b + Er_c + Er_d ; 29 16 17 18 19 20 21 Re_le_percentage = Er_total *100/4639; disp ( 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 ; disp ( Range_lower , ’ Lower v a l u e o f r a n g e ( ohm )= ’ ) Range_upper =4639+ Er_total ; disp ( 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 2 3 4 5 6 7 8 9 10 11 12 13 14 15 // C a l c u l a t e t h e m a g n i t u d e o f power and l i m i t i n g error clc ; F =4.58; L =397; R =1202*10^ -9; t =60; P =(2* %pi *9.81* F * L * R ) /( t *10^6) ; disp (P , ’ Magnitude o f power (W)= ’ ) dF_pu =0.02/ F ; // p e r u n i t e r r o r i n f o r c e dL_pu =1.3/ L ; // p e r u n i t e r r o r i n Length dR_pu =1/ R ; // p e r u n i t e r r o r i n r e v o l u t i o n dt_pu =0.5/ t ; // p e r u n i t e r r o r i n t i m e dP_pu = dF_pu + dL_pu + dR_pu + dt_pu ; dP_le = dP_pu * P ; disp ( 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 // C a l c u l a t e t h e m a g n i t u d e o f F o r c e and l i m i t i n g error 2 clc ; 1 30 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 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) ; disp (F , ’ Magnitude o f F o r c e (N)= ’ ) dE_pu =0/ E ; // p e r u n i t e r r o r i n E 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; disp ( 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 2 3 4 5 6 7 8 // c a l c u l a t e t h e power l o s s and r e l a t i v e e r r o r clc ; I =64*10^ -3; R =3200; P =( I ^2) * R ; disp (P , ’ Power (W)= ’ ) Re =2*0.75+0.2; disp ( 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 // C a l c u l a t e t h e 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 31 015. disp (R . dR2 = -0. ’ True v a l u e o f r e s i s t a n c e ( ohm )= ’ ) dR1 = 0. e r r o r o f e a c h r e g i s t e r and f r a c t i o n a l e r r o r o f t o t a l r e s i s t a n c e clc . R_true =1/((1/ R1 ) +(1/ R2 ) +(1/ R3 ) ) . dR3 =0. I_true = I *(1+0. disp ( R_effective .025* R1 . P_measured =( I ^2) * R . R3 =375.36* R2 . R2_effective = R2 + dR2 . ’ F r a c t i o n a l e r r o r ’ ) 32 . R2 =500.003) . R3_effective = R3 + dR3 . R_effective =1/((1/ R1_effective ) +(1/ R2_effective ) +(1/ R3_effective ) ) .14 calculate the total resistance error of each register and fractional error of total resistance 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 // c a l c u l a t e t h e t o t a l r e s i s t a n c e .4. R1 =250.R_effective ) / R_true . ’ 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 .012) .2 3 4 5 6 7 8 9 10 clc . ’ 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 (%)= ’ ) Scilab code Exa 3. R = P_true *100/ P_measured . R1_effective = R1 + dR1 . P_true =( I_true ^2) * R_true . R_true = R *(1 -0.014* R3 . disp ( R_true . disp ( Fractional_error . I =30. R =0. C =160*10^ -12.fr ) / fr . t h e Volume and r e l a t i v e e r r o r 33 . disp ( error . 3 disp ( ’ 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.1* C . fr_new =[1/(2* %pi ) ]*[1/( L_new * C_new ) ]^0.15 find the error 1 // 2 clc . ’ e r r o r= ’ ) Scilab code Exa 3. disp ( fr_new ) error =( fr_new .Scilab code Exa 3.5. 3 L =250. ’ e r r o r= ’ ) disp ( ’ 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.5. fr =[1/(2* %pi ) ]*[1/( L * C ) ]^0. C_new =(160*10^ -12) -0. disp ( error .5.1* C . fr_new =[1/(2* %pi ) ]*[1/( L_new * C_new ) ]^0. C_new =(160*10^ -12) +0.1* L .fr ) / fr .1* L . disp ( fr_new ) error =( fr_new . disp ( fr ) disp ( ’ 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.16 calculate the Volume and relative error 1 // c a l c u l a t e 2 clc . 1 34 .2 -0. ’ Volume (mm3)= ’ ) 7 Re =2*0.18 Calculate apparent resistance actual resistance and error // C a l c u l a t e a p p a r e n t r e s i s t a n c e . disp ( dK_pu ) Scilab code Exa 3. dK_pu =( dG_pu + dD_pu ) * d_th *100. a c t u a l r e s i s t a n c e and e r r o r 2 clc . 4 It =5*10^ -3. ’ R e l a t i v e e r r o r (%)= ’ ) Scilab code Exa 3. disp ( ’ 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. 3 Et =100. disp ( dK_pu ) disp ( ’ 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.17 calculate the per unit change in the value of spring for different temperature ranges 1 2 3 4 5 6 7 8 9 10 11 12 // c a l c u l a t e t h e p e r u n i t c h a n g e i n t h e v a l u e o f spring f o r d i f f e r e n t temperature ranges clc .5. 8 disp ( Re .4 d =50.8*10^ -6. dD_pu =11. 5 V =(( %pi /4) * d ^2) * L . 6 disp (V . dK_pu =( dG_pu + dD_pu ) * d_th *100. dG_pu = -240*10^ -6. Rt = Et / It . disp ( Rx .5 Rt = Et / It . ’ p e r c e n t a g e e r r o r= ’ ) Scilab code Exa 3. 11 disp ( Er_percentage . 8 Rx = Rt * Rv /( Rv .Rt ) . ’ 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 . ’ t r u e v a l u e o f r e s i s t a n c e ( ohm ) ’ ) 10 Er_percentage =[( Rt . Rx = Rt * Rv /( Rv . ’ p e r c e n t a g e e r r o r= ’ ) Scilab code Exa 3. b =20*10^ -3. 35 .20 Calculate the error and percentage error in the measurement of deflection 1 2 3 4 5 // C a l c u l a t e t h e e r r o r and p e r c e n t a g e e r r o r i n t h e measurement o f d e f l e c t i o n clc . It =800*10^ -3. disp ( Er_percentage . 9 disp ( Rx .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. a c t u a l r e s i s t a n c e and e r r o r clc . 6 disp ( Rt .19 Calculate apparent resistance actual resistance and error 1 2 3 4 5 6 7 8 9 10 11 // C a l c u l a t e a p p a r e n t r e s i s t a n c e .Rx ) / Rx ]*100.Rx ) / Rx ]*100. ’ 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 )= ’ ) 7 Rv =1000*150. l =0. disp ( Rt .2. Et =40. E =200*10^9. for i =1: n . a =0. 36 . disp ( Er_percentage . d e v i a t i o n s from t h e mean . F =1*9.21 to find the mean deviations from the mean Average deviation standard deviation and variance 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 // t o f i n d t h e mean . X = sum ( x ) .31/(1+. ’ s t a n d a r d d e v i a t i o n ( kHz ) ’ ) . ’ True v a l u e o f d e f l e c t i o n ’ ) x_indicated = D *10.6 7 8 9 10 11 12 13 14 15 16 d =5*10^ -3. ’ d e v i a t i o n s = ’ ) a = a +( abs ( d ( i ) ) ) end d_average = a / n . s = sqrt ( d_2 /( n -1) ) disp (s .x_true . ’ mean ( kHZ ) ’ ) .81.Mean disp ( d ( i ) . ’ e r r o r= ’ ) Er_percentage = Er *100/ x_true . ’ 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 . ’ A v e r a g e d e v i a t i o n ( kHz )= ’ ) d_2 = sum ( d ^2) . disp ( x_indicated . disp ( x_true .1* D ) . d ( i ) = x ( i ) . ’ P e r c e n t a g e e r r o r= ’ ) Scilab code Exa 3. n =8. s t a n d a r d d e v i a t i o n and v a r i a n c e clc . Mean = X / n . disp ( X /n . A v e r a g e d e v i a t i o n . disp ( d_average . x =[532 548 543 535 546 531 543 536]. disp ( Er . x_true = D * F . D =(4* l ^3) /( E * b * d ^3) . ’ s t a n d a r d d e v i a t i o n ( deg C) ’ ) . d_2 = sum ( d ^2) . ’ r a n g e ( deg C) ’ ) .min ( x ) .5 41.53 -. disp ( r1 . disp ( sqrt ( d_2 /( n -1) ) . prpobable e r r o r of 1 reading .03 -.6745* sqrt ( d_2 /( n -1) ) .7 42 41. 21 disp (V . disp ( X /n . p r o b a b l e e r r o r and r a n g e clc .22 to find the mean standard deviation probable error and range 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 // t o f i n d t h e mean .20 V = s ^2.03 . standard deviation of standard deviation 2 37 . s t a n d a r d d e v i a t i o n .17 .8]. disp ( max ( x ) .27 . X = sum ( x ) . Scilab code Exa 3.9 42 41. disp ( X ) . ’ p r o b a b l e e r r o r o f mean ( deg C) ’ ) . disp ( r1 / sqrt (n -1) . d =[ -. standard deviation . ’ 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) ’ ) . ’ 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) ’ ) .1 41.13 -. ’ v a r a i n c e ( kHZ ) 2= ’ ) Scilab code Exa 3.07 . disp ( sqrt ( d_2 / n ) . x =[41.17].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 // t o f i n d t h e a r i t h e m a t i c mean . s t a n d a r d d e v i a t i o n and p r o b a b l e e r r o r o f mean . ’ mean l e n g t h ( deg C) ’ ) .8 42 42.07 . n =10.03 -.9 42. r1 =. maen d e v i a t i o n . Scilab code Exa 3.4432 // a r e a u n d e r g a u s s i a n c u r v e c o r r e s p o n d i n g to t 8 n =2* A *1000. T =[397 398 399 400 401 402 403 404 405].* d ^2) / sum ( f ) ) . disp (.3 4 5 6 7 8 9 10 11 12 13 14 clc . ’ no o f r e s i s t o r s ’ ) .* d ^2) / sum ( f ) ) ) / sqrt ( sum ( f ) ) . // s t a n d a r d d e v i a t i o n t=x/o.6745* sqrt ( sum ( f .6745* sqrt ( sum ( f . ’ s t a n d a r d d e v i a t i o n o f mean ( deg C) ’ ) .78 -1. ’ 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) ’ ) .15. f =[1 3 12 23 37 16 4 2 2].22 4.* d ^2) / sum ( f ) ) . x =. 9 disp ( floor ( n ) .25 to find no of 100 rsding exceed 30mm 38 . A =. ’ mean d e v i a t i o n ( deg C) ’ ) . disp (( sqrt ( sum ( f .78 -. ’ s t a n d a r d d e v i a t i o n ( deg C) ’ ) .* f ) ) . // d e v i a t i o n o =.22 1. Scilab code Exa 3. ’ 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) ’ ) .* d ^2) / sum ( f ) ) ) / sqrt ( sum ( f ) ) .24 to find probable no of resistors 1 2 3 4 5 6 7 // t o f i n d p r o b a b l e no o f r e s i s t o r s clc .22].22 2. disp ( Tf / sum ( f ) . ’ mean temp ( deg C) ’ ) .* d ^2) / sum ( f ) ) ) / sqrt ( sum ( f ) *2) .* d ) / sum ( f ) . ’ p r o b a b l e e r r o r o f mean ( deg C) ’ ) .1. Tf = sum ( abs ( T .22 3.78 -2. disp ((.78 . disp ( sqrt ( sum ( f . disp ( sum ( f . disp (( sqrt ( sum ( f . d =[ -3. 10 nn =100 . p1 =. 3 r =2. o = r /.41. // 10< l e n g t h < 1 0 . 2 5 p=a/n.3413. ’ no o f r e a d i n g s e x c e e d ’ ) .3.4975. x =30 -26. // l e n g t h >10mm n2 =2000.5. // 9.n2 . A =. t=x/o.1 2 3 4 5 6 7 8 // t o f i n d no o f 100 r s d i n g e x c e e d 30mm clc . // mean v a l u e 2 6 . ’ t o t a l no o f r o d s ’ ) . // u s i n g p t1 = t *2. 2 5 a = n1 . // l e n g t h > 1 0 . // no o f r o d s n1 =12500.5 < l e n g t h <10 disp ( a + floor ( b ) . Scilab code Exa 3. Scilab code Exa 3. n =25000.floor ( n ) . b = p1 * n . // a r e a u n d e r g a u s s i a n c u r v e c o r r e s p o n d i n g t o t 9 n =2* A *100.6745. 11 disp ( nn /2 .27 to find standard deviation and probability of error 1 // t o f i n d s t a n d a r d d e v i a t i o n and p r o b a b i l i t y o f error 39 .26 to find no of rods of desired length 1 2 3 4 5 6 7 8 9 10 11 12 13 // t o f i n d no o f r o d s o f d e s i r e d l e n g t h clc . t =1. 5025. P =. Scilab code Exa 3.8.2. h =0. p =2*.2 3 4 5 6 7 8 9 10 11 12 clc . ’ s t n d a r d d e v i a t i o n ’ ) . t = x / sd .3708. 40 . t = x / sd . ’ no o f e x p e c t e d r e a d i n g s ’ ) . x =20. sd =1/( sqrt (2) * h ) .2. x =. t =. t =. sd = x / t . sd = x / t . x =1.04. disp (p . disp ( ceil (2* P * x ) . Scilab code Exa 3. x =2.4. disp ( sd .2743.28 to find no of expected readings 1 2 3 4 5 6 7 8 9 10 // t o f i n d no o f e x p e c t e d r e a d i n g s clc .29 to calculate precision index of instrument 1 2 3 4 5 6 // t o c a l c u l a t e p r e c i s i o n i n d e x o f i n s t r u m e n t clc . p =.675. ’ p r o b a b i l i t y o f e r r o r ’ ) . CI (3) = ci ( d (3) ) .7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 h =1/( sqrt (2) * sd ) .45. t =1.96. disp (h .p ) * n ) . t =(50 -44) / sd . ’ p r e c i s i o n i n d e x ’ ) .5 . rn = a /2. d =[. CI (2) = ci ( d (2) ) .26 3. ’ p r e c i s i o n i n d e x ’ ) . sd =(50 -44) / t . s =.9 .p1 . CI (4) = ci ( d (4) ) .99]. Scilab code Exa 3. n =8*30. P =.25].95 . p =. cl =[. h =1/( sqrt (2) * sd ) . function [ a ]= ci ( b ) a=s*b. ’ c o n f i d e n c e i n t e r v a l ’ ) .5 . endfunction CI (1) = ci ( d (1) ) .22. disp ( CI .5 .7 1. disp (h .30 to find confidence interval for given confidence levels 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 // t o f i n d c o n f i d e n c e i n t e r v a l f o r g i v e n c o n f i d e n c e levels clc . ’ no o f f a l s e a l a r m s ’ ) . // s e p t month no o f m e a s u r e m e n t s a =((. disp (a . 41 .83 2. // r e d u c e d no o f f a l s e a l a r m s p1 = rn / n . 197 .353 -1. 42 .96 then 15 disp ( x ( i ) .1 1.477 .157 -.283 -.3 5.313 . a = abs ( d ) / s . 13 14 if a ( i ) >1. disp ( a ) .33 5.31 to point out the reading that can be rejected by chavenets criterion 1 // t o p o i n t o u t t h e r e a d i n g t h a t can be r e j e c t e d by chavenets c r i t e r i o n 2 3 clc . ’ r e j e c t e d 16 end 17 end v a l u e ’ ).81 5 5.5 5.09 5.137]*10^ -3.75]*10^ -3. X = sum ( x ) / n .77 5.117 1. s = sqrt ( sum ( d ^2) /( n -1) ) .7].45 6. 5 y =[1.3 4.9 2.32 calculate standard deviation 1 // c a l c u l a t e s t a n d a r d d e v i a t i o n 2 3 clc .6 2.26 4. d =[ -. 6 7 8 9 10 11 12 for i =1:10 . n =10. Scilab code Exa 3. 4 x =[.3 3.027 .73 6.2 4 5].Scilab code Exa 3.64 5.163 . 4 x =[5.6 3.7 6. ’ I ’ ) .sum ( x ) ^2) ) * sdy . disp ( sa . Scilab code Exa 3. sa = sqrt ( n /( n * sum ( x ^2) . disp (I . ’ d I ’ ) .y ) ^2) ) . I2 =100.sum ( x ) ^2) ) . disp ( ’ 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 ’ ) . dI2 =5. I1 =200. disp (I .34 determine value of total current considering errors as limiting errors ans as standrd deviations 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 // d e t e r m i n e v a l u e o f t o t a l c u r r e n t c o n s i d e r i n g e r r o r s as l i m i t i n g e r r o r s ans as standrd deviations clc . 7 a =(( n * sum ( x .* y ) -( sum ( x ) * sum ( y ) ) ) /(( sum ( x ^2) * n ) . ’ s b ’ ) . sdx = sdy / a . disp ( ’ 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 ’ ) . dI =(( I1 / I ) *( dI1 / I1 ) +( I2 / I ) *( dI2 / I2 ) ) . I = I1 + I2 . 8 b =(( sum ( y ) * sum ( x ^2) -( sum ( x ) * sum ( x . dI1 =2. ’ s d I ’ ) .sum ( x ) ^2) ) * sdy . 9 10 11 12 13 14 15 16 sdy = sqrt ((1/ n ) * sum (( a * x +b . sb = sqrt ( sum ( x ^2) /( n * sum ( x ^2) . disp ( sb . 43 .sum ( x ) ^2) ) . sdI = sqrt ( dI1 ^2+ dI2 ^2) .6 n =6. disp ( sdI . ’ I ’ ) .* y ) ) ) /(( sum ( x ^2) * n ) . ’ s a ’ ) . disp ( dI *I . 37 to find Cq and its possible errors 1 2 3 4 5 6 7 8 9 10 11 12 13 // t o f i n d Cq and i t s possible errors clc . h =3. r_Rv = r_V / I .5. t =600. V =100. g =9. p =1000.23/ W . Cq = W /( t * p * A * sqrt (2* g * h ) ) .Scilab code Exa 3. r1 =2. ’ Cq ’ ) . 44 . Scilab code Exa 3. dW =. r_R = sqrt ( r_Rv ^2+ r_Ri ^2) . d =12.35 determine probable error in the computed value of resistnce 1 2 3 4 5 6 7 8 9 10 11 // d e t e r m i n e p r o b a b l e e r r o r i n t h e computed v a l u e o f resistnce clc . ’ r R ’ ) . disp ( Cq . r_Ri = V * r1 / I ^2. A =( %pi /4) * d ^2*10^ -6. disp ( r_R . W =392. r_V =12.66.81. I =10. 06. ’ %age s t a n d a r d d e v i a t i o n e r r o r ’ ) . disp (P . dA =2*.39 to find uncertainity in combined resistance in both series and in parrallel 1 // t o f i n d u n c e r t a i n i t y i n combined r e s i s t a n c e i n b o t h s e r i e s and i n p a r r a l l e l 2 3 clc . w_v =.1/100. dp =.14 15 16 17 18 19 20 21 22 23 24 dt =2/ t . I =5. Scilab code Exa 3.2. ’ power (W) d i s s i p a t e d ’ ) . 45 . V =110. dh =.38 calculate power disipated and uncertaainity in power 1 2 3 4 5 6 7 8 9 10 // c a l c u l a t e power d i s i p a t e d and u n c e r t a a i n i t y i n power clc . ’ %age a b s o l u t e e r r o r ’ ) . ’ u n c e r t a i n i t y i n power (%) ’ ) . dCq = Cq *( dW + dt + dp + dA + dg /2+ dh /2) .002. dg =. Scilab code Exa 3. disp ( dp *100/ P . disp ( sdCq *100/ Cq . disp ( dCq *100/ Cq .3. P = V * I . sdCq = Cq * sqrt ( dW ^2+ dt ^2+ dp ^2+4* dd ^2+.002.1/100. w_i =0.003/ h .25*( dg ^2+ dh ^2) ) . dd =. dp = sqrt (( w_v * I ) ^2+( w_i * V ) ^2) .2. b =50.5*1. wR2 =0. ’ 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 ) ’ ) .01. R = R1 + R2 .5. ’ u n c e r t a i n i t y i n measurement o f a r e a (m∗m) ’ ) . dR1 =1. R2 =50. dR2 =( R1 /( R1 + R2 ) ) -(( R1 * R2 ) /( R1 + R2 ) ^2) .03. 14 wL = sqrt (( wA ^2 -( l * wB ) ^2) / b ^2) . wR = sqrt (( dR1 * wR1 ) ^2+( dR2 * wR2 ) ^2) . ’ r e s i s t a n c e ( ohm ) ’ ) . . R = R1 * R2 *( R1 + R2 ) ^ -1. Scilab code Exa 3. l =150.40 to calculate uncertainity in measurement 1 2 3 4 5 6 7 8 // t o c a l c u l a t e u n c e r t a i n i t y i n measurement clc .4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 R1 =100. 13 wB =0. disp (R . disp ( wR . 46 l e n g t h ’ ). wR = sqrt (( dR1 * wR1 ) ^2+( dR2 * wR2 ) ^2) . disp ( ’ s e r i e s conn ’ ) . disp ( wR . 9 disp ( wA . ’ 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 ) ’ ) . 10 11 disp ( ’ when no c e r t a i n i t y i n measurement o f 12 wA =1.01. disp ( ’ p a r r a l l e l conn ’ ) . wA = l * dl . disp (R . dl =0.1. dR2 =1. dR1 =( R2 /( R1 + R2 ) ) -(( R1 * R2 ) /( R1 + R2 ) ^2) . disp ( ’ 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 ’ ). ’ r e s i s t a n c e ( ohm ) ’ ) . wR1 =. dI =0. 47 . E =100.41 to calculate uncertainity in power 1 2 3 4 5 6 7 8 9 10 11 12 13 14 // t o c a l c u l a t e u n c e r t a i n i t y i n power clc . Scilab code Exa 3.01. //P=Eˆ2/R disp ( dP . ’ u n c e r t a i n i t y i n measurement o f l e n g t h (m) ’ ) . ’ %age u n c e r t a i n i t y i n power measurement ’ ) . I =10.01. ’ %age u n c e r t a i n i t y i n power measurement ’ ) .01. //P=E∗ I disp ( dP .15 disp ( wL . dE =. R =10. dR =. dP = sqrt ( dE ^2+ dI ^2) *100. dP = sqrt (4* dE ^2+ dR ^2) *100. t / tc ) ]. 5 s ( d e g r e e C) ’ ) Scilab code Exa 4. th0 =100. ’ t e m p e r a t u r e a f t e r 1 .5. t =1. th = th0 *[1 .exp ( . disp ( th .5. tc =3. 5 s clc .1 calculating the temperature 1 2 3 4 5 6 7 // c a l c u l a t i n g t h e t e m p e r a t u r e a f t e r 1 .2 calculate time to read half of the temperature difference // c a l c u l a t e t i m e 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 2 clc . 1 48 .Chapter 4 Dynamic Characteristics of Instruments and Measurement systems Scilab code Exa 4. Rs =100. th0 =2. R0 =29. th0 =25. ’ 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.exp ( . disp ( th . t =15.5 Calculate the value of resistance after 15s 1 2 3 4 5 6 7 8 // C a l c u l a t e t h e v a l u e o f r e s i s t a n c e a f t e r 15 s clc . disp ( R_15 .6 Calculate the depth after one hour 49 .t / tc ) ].th0 ) *[ exp ( .3 4 5 6 7 tc =10/5. disp (t . t =10.tc * log (1 -( th / th0 ) ) .44. thi =150. th =1. tc =5. th = th0 +( thi . tc =6. t = .5. ’ 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 ) ’ ) Scilab code Exa 4.4 Calculate the temperature after 10s 1 2 3 4 5 6 7 8 // C a l c u l a t e t h e t e m p e r a t u r e a f t e r 10 s clc .t / tc ) ]. R_15 = Rs + R0 *[1 . ’ 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. 1 2 3 4 5 6 7 8 9 10 11 12 13 // C a l c u l a t e t h e d e p t h a f t e r one h o u r clc . t =3600. D =13.8 Calculate time constant 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 // C a l c u l a t e t i m e c o n s t a n t clc . Vb = S * Ac / alpha . disp ( Vb . ’ t h e d e p t h a f t e r one h o u r (m) ’ ) Scilab code Exa 4.18*10^ -3. Ac =( %pi /4) *(0.Ho ) * exp ( .t / tc ) . s =139. tc = R * C . C =0. Qm =0.9 Calculate the temperature after 10s 50 . H = Ho +( Hin . ’ t i m e c o n s t a n t ( s ) ’ ) Scilab code Exa 4.5.5.2.1.25) ^2. Qo =0. tc =( D * s * Vb *10^ -9) /( H * Ab *10^ -6) . H =12.56*10^3. alpha =0. disp ( tc . ’ volume o f b u l b (mm2) ’ ) Rb =[( Vb / %pi ) *(3/4) ]^(1/3) . Hin =1.2*10^ -3. Ab =4* %pi * Rb ^2. S =3. R = Hin / Qm .16*10^ -3. Ho =( Qo / K1 ) ^2. K1 = Qm /( Hin ) ^0. disp (H . 1 // C a l c u l a t e t h e t i m e c o n s t a n t 2 ess =5. disp ( thr .5.t / tc ) ) + Rin . disp ( Rt . ’ t i m e c o n s t a n t ( s ) ’ ) Scilab code Exa 4. 3 A =0. ’ 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. t =1.t /50) . 5 disp ( tc .11 Calculate the value of resistance at different values of time 1 2 3 4 5 6 7 8 9 10 11 12 13 // C a l c u l a t e t h e v a l u e o f r e s i s t a n c e a t d i f f e r e n t v a l u e s o f time clc . 4 tc = ess / A . p_duration = Gain * T . ’ 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. tc =5.10 Calculate the temperature at a depth of 1000 m 1 2 3 4 5 6 // C a l c u l a t e t h e 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 clc . Rt = p_duration *(1 .3925.005*( t -50) -0. thr = th0 -0. Rt = p_duration *(1 . ’ 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 )= ’ ) 51 . T =75.t / tc ) ) + Rin . th0 =20.1. Gain =0. Rin =100. t =2000.25* exp ( .exp ( .exp ( . disp ( Rt . Rt =( R_inc ) *[ exp ( -(t -3) /(5.5) ) ]+ Rin .5) ) ]+ Rin .14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 t =3. M =8*10^ -3. Rt = p_duration *(1 . disp ( Rt .12 calculate the value of damping constant and frequency of damped oscillations 1 2 3 4 5 6 7 8 9 10 11 // c a l c u l a t e t h e v a l u e o f damping c o n s t a n t and f r e q u e n c y o f damped o s c i l l a t i o n s clc . ’ 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/ms−1)= ’ ) eta =0.5) ) ]+ Rin . ’ 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 .exp ( . disp ( wd . K =1000. disp (B . ’ 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. disp ( ’ 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 ) .Rin .5. disp ( Rt .5.6. ’ 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.t / tc ) ) + Rin . t =5. ’ 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 )= ’ ) 52 . disp ( Rt .5) ) ]+ Rin . ’ 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. disp ( Rt .eta ^2) ^0. wd = wn *(1 . wn =( K / M ) ^0. Rt =( R_inc ) *[ exp ( -(t -3) /(5. Rt =( R_inc ) *[ exp ( -(t -3) /(5. Rt =( R_inc ) *[ exp ( -(t -3) /(5. ’ 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. disp ( Rt . Scilab code Exa 4. n a t u r a l f r e q u e n c y . disp ( tc .14 Calculate the natural frequency 1 // C a l c u l a t e t h e n a t u r a l 2 clc . 3 wn =2* %pi *30.13 Calculate damping ratio natural frequency frequency of damped oscillations time constant and steady state error for ramp signal 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 // C a l c u l a t e damping r a t i o . disp ( ’ f o r a ramp i n p u t o f 5V.5.5. ’ 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 ) ’ ) tc =1/ wn . J =0. disp ( ess . ’ t i m e c o n s t a n t ( s ) ’ ) ess =2* eta / wn . ’ ’ ) T_lag =2* eta * tc .5*10^ -6. disp ( eta . K =(40*10^ -6) /( %pi /2) . frequency 53 . ’ Time l a g ( s ) ’ ) Scilab code Exa 4.5) . B =5*10^ -6. f r e q u e n c y o f damped o s c i l l a t i o n s . disp ( T_lag . s t e a d y s t a t e e r r o r (V) =’) ess =5*2* eta / wn . eta = B /(2*( K * J ) ^0. disp ( 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. disp ( wd . ’ damping r a t i o = ’ ) wn =( K / J ) ^0. t i m e c o n s t a n t // and s t e a d y s t a t e e r r o r f o r ramp s i g n a l o f 5V/ s clc . 5 . . f = wn /(2* %pi ) . disp ( ’ But wn=(K/M) ˆ 0 . . K =403.36*10^ -3. disp (f . ’ s e t t e l i n g t i m e ( s ) ’ ) Scilab code Exa 4. 5 . . disp ( ’ f o r a f r e q u e n c y o f 25 Hz wn=(K/M +5∗10ˆ −3+5∗10ˆ −3) ˆ 0 . . . disp ( ts . . .7. ’ n a t u r a l f r e q u e n c y ( Hz ) ’ ) Scilab code Exa 4. . . . disp (M . . 5 . .5. ( i ) ’ ). . disp ( wn . . . . ( i i ) and ( i i i ) ’ ) M =6. wn =( K / M ) ^0. .6. ’ n a t u r a l f r e q u e n c y ( r a d / s e c ) ’ ) eta =0. . ( i i i ) ’ ) disp ( ’ on s o l v i n g ( i ) . M =30. . . ( i i ) ’ ) . . . ’K= ’ ) wn =( K / M ) ^0. 5 tc =60.15 Calculate natural frequency and setteling time 1 2 3 4 5 6 7 8 9 // C a l c u l a t e n a t u r a l f r e q u e n c y and s e t t e l i n g t i m e clc . 3 disp ( ’ when t i m e p e r i o d i s 600 s ’ ) 4 w =2* %pi /600. ts =4/( eta * wn ) .4 5 6 7 8 9 10 11 12 13 14 disp ( ’ f o r a f r e q u e n c y o f 30 Hz wn=(K/M+5∗10ˆ −3) ˆ 0 . ’M= ’ ) disp (K . .16 Calculate time lag and ratio of output and input 1 // C a l c u l a t e t i m e l a g and r a t i o o f o u t p u t and i n p u t 2 clc . K =60*10^3. 54 .5. . 05. ’ t i m e l a g ( s )= ’ ) M =1/((1+( w * tc ) ^2) ^0. ’ r a t i o o f o u t p u t and i n p u t= ’ ) disp ( ’ when t i m e p e r i o d i s 120 s ’ ) w =2* %pi /120. disp ( T_lag . tc =60.atan (2* %pi *100* tc ) ]*(180/ %pi ) .5. disp (M . disp ( ph . ’ t i m e l a g ( s )= ’ ) M =1/((1+( w * tc ) ^2) ^0.) Scilab code Exa 4. M =1 -0. ’ ’ ) disp ( ’ p h a s e s h i f t a t 100 Hz ( d e g r e e )= ’ ) ph =[ . ’ maximum a l l o w a b l e t i m e c o n s t a n t ( s ) ’ ) disp ( ’ p h a s e s h i f t a t 50 Hz ( d e g r e e )= ’ ) ph =[ . disp (M . w =2* %pi *100. disp ( T_lag .18 Calculate maximum value of indicated temperature and delay time 55 .6 7 8 9 10 11 12 13 14 15 16 T_lag =(1/ w ) * atan ( w * tc ) . ’ r a t i o o f o u t p u t and i n p u t= ’ ) Scilab code Exa 4.5) . tc ={[(1/ M ^2) -1]/( w ^2) }^0. disp ( tc .5) . T_lag =(1/ w ) * atan ( w * tc ) .17 Calculate the maximum allowable time constant and phase shift 1 2 3 4 5 6 7 8 9 10 11 12 // C a l c u l a t e t h e maximum a l l o w a b l e t i m e c o n s t a n t and phase s h i f t clc . disp ( ph .atan (2* %pi *50* tc ) ]*(180/ %pi ) . 4 d i s p ( ’ output =1/(1+(2*0. ’ Time l a g ( s ) ’ ) Scilab code Exa 4.5] sin [20 t .002) ^2) ^0. tc2 =20. 2 ) .2) ^2) ^0. disp ( M_temp .2) ^2) ^0. 0 0 2 ) .93 s i n ( 2 t − 2 1 .5] sin [2 t . 0 7 3 s i n ( 2 0 t −76) ’ ) 6 disp ( ’ when t c = 0 .5] sin [2 t .2) ]+3/(1+(2*0.5) ]*[1/((1+( w * tc2 ) ^2) ^0. 3 disp ( ’ when t c = 0 .002) ] ’) 8 disp ( ’ on s o l v i n g o u t p u t= 1 s i n ( 2 t − 0 . disp ( T_lag . tc1 =40.2) ] ’) disp ( ’ on s o l v i n g o u t p u t =0. M =[1/((1+( w * tc1 ) ^2) ^0.1 2 3 4 5 6 7 8 9 10 11 12 // C a l c u l a t e 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 and d e l a y t i m e clc .20 Calculate maximum and minimum value of indicated temperature phase shift time lag 56 . T_lag = ph / w .5) ]. w =2* %pi / T .002) ]+3/(1+(2*0. 8 ) + 0 .3 s i n ( 2 0 t −2. T =120.19 Find the output 1 // Find t h e o u t p u t 2 clc .5] sin [20 t . 7 d i s p ( ’ output =1/(1+(2*0.atan (20*0.atan (2*0.3) ’ ) 5 Scilab code Exa 4.002) ^2) ^0. M_temp = M *10. ’ 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 =[{ atan ( w * tc1 ) + atan ( w * tc2 ) }].atan (2*0. 2 3 ) +0.atan (20*0. w =2. M =1.5. disp ( T_max_indicated .u ^2) ^2]}/(2* u ) ^2]^0. Ai = T_mean . w =2* %pi /80. K =1. wn =( K / J ) ^0.5. disp ( T_min_indicated . disp ( eta . Time_lag = .21 determine damping ratio 1 2 3 4 5 6 7 8 9 10 // d e t e r m i n e damping r a t i o clc . time l a g clc . ’ 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)= ’ ) T_min_indicated = T_mean . eta =[{[1/( M ^2) ] -[(1 .1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 // C a l c u l a t e maximum and minimum v a l u e o f i n d i c a t e d temperature . T_max_indicated = T_mean + Ao . T_min =600. ’ damping r a t i o = ’ ) 57 . ’ Minimum 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 = . u = w / wn .atan ( w * tc ) . tc =10.Ao .ph / w .T_min . disp ( Time_lag .5. ’ Time l a g ( s ) ’ ) Scilab code Exa 4. T_mean =( T_max + T_min ) /2.5. T_max =640. phase s h i f t . Ao = Ai /{(1+( w * tc ) ^2) }^0. J =200*10^ -3.1. . .5 u ˆ2+0. 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. disp ( ’M= 1 /[ [ (1 − u ˆ 2 ) ˆ 2 ] + ( 2 ∗ u∗ e t a ) ˆ 2 ] ˆ 0 . disp ( Error . 9 . M =1/{[(1 .1. on s o l v i n g e q u a t i o n ( i ) we have ’) disp ( ’ u ˆ4 −0. ’ maximum v a l u e o f r a n g e ( Hz )= ’ ) disp ( ’ So . Error =( M -1) *100. . 9 1 6 ’ ) u =0. disp (f . 5 .6 t h e o u t p u t i s n o t 1 .56 u ˆ2 −0.22 Calculate the frequency range 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 // C a l c u l a t e t h e f r e q u e n c y r a n g e clc .173=0 ’ ) disp ( ’ 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 f o r f r e q u e n c y s o f o r e t a =0. . eta =0.23 determine the error 1 2 3 4 5 6 7 8 9 // d e t e r m i n e t h e e r r o r clc .66. ( i ) ’) disp ( ’ on s o l v i n g u ˆ4 −0. . fn =1000.Scilab code Exa 4. eta =0.234=0 ’ ) disp ( ’ on s o l v i n g u = 0 .6. 1 ’ ) disp ( ’Now l e t M= 0 . . u = w / wn .916. wn =4. ’ e r r o r (%)= ’ ) 58 . . . w =6. M =1.u ^2) ^2]+(2* eta * u ) ^2}^0. . f = u * fn . .5. D =15*10^ -3.Chapter 5 Primary Sensing Elements and Transducers Scilab code Exa 5. ’ 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. disp ( dm . dm =3*(1 .1 Calculate the deflection at center 1 2 3 4 5 6 7 8 9 10 11 12 // C a l c u l a t e t h e d e f l e c t i o n a t c e n t e r clc .v ^2) * D ^4* P /(256* E * t ^3) .5. E =200*10^9. P =300*10^3. sm =300*10^6. t =[3* D ^2* P /(16* sm ) ]^0. v =0. disp (t .2 Calculate the angle of twist 59 .28. ’ t h i c k n e s s (m)= ’ ) P =150*10^3. Rpl =10000/50. disp ( Dnormal . T =( E * b * t ^3) * th /(12* l ) . th = %pi /2. d =2*15*10^ -3. 60 . Rnormal =10000/2. ’ D i s p l a c e m e n t (mm)= ’ ) Rc2 = Rnormal -7560. disp (T .51*10^ -3. T =100. th =16* T /( %pi * G * d ^3) disp ( th . t =0. E =110*10^9. l =370*10^ -3. Dnormal = Rc1 / Rpl . Rc1 = Rnormal -3850.073*10^ -3. ’ a n g l e o f t w i s t ( r a d )= ’ ) Scilab code Exa 5. ’ C o n t r o l l i n g t o r q u e (Nm)= ’ ) Scilab code Exa 5. G =80*10^9.1 2 3 4 5 6 7 // C a l c u l a t e t h e a n g l e o f t w i s t clc . b =0.3 Calculate the Torque 1 2 3 4 5 6 7 8 9 10 // C a l c u l a t e t h e Torque clc .4 Calculating the displacement and resolution of the potentiometer 1 2 3 4 5 6 7 8 // C a l c u l a t i n g t h e d i s p l a c e m e n t and r e s o l u t i o n o f t h e potentiometer clc . R2 =75/125* Rtotal .5 plot the graph of error versus K 1 // p l o t t h e g r a p h o f e r r o r v e r s u s K 2 clc . ei =5. RAB =125. 4 V =[0 -0.174 -0. R4 =2500. eo =[( R2 / Rtotal ) -( R4 / Rtotal ) ]* ei . V ) 0]. ’ D i s p l a c e m e n t (mm)= ’ ) disp ( ’ 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. 3 K =[0 0.6 Calculating the output voltage 1 2 3 4 5 6 7 8 9 // C a l c u l a t i n g t h e o u t p u t v o l t a g e clc . disp ( Dnormal . Rtotal =5000.524 5 plot (K .9 10 11 Dnormal = Rc2 / Rpl . ’ R e s o l u t i o n (mm)= ’ ) Scilab code Exa 5. ’ o u t p u t v o l t a g e (V)= ’ ) Scilab code Exa 5.454 -0.25 0. Scilab code Exa 5. disp ( eo .75 1]. 13 disp ( Re .7 Calculating the maximum excitation voltage and the sensitivity 61 .5 0. Rm =10000. 3 Rwga =1/400. 4 Re = Rwga /5. mo =0. ’ S e n s i t i v i t y (V/ d e g r e e )= ’ ) Scilab code Exa 5.8. sm = sr / mo .8 Calculating the resolution of the potentiometer 1 // C a l c u l a t i n g t h e r e s o l u t i o n 2 clc . ’ Maximum e x c i t a t i o n v o l t a g e (V)= ’ ) S = ei /360. ’ r e s o l u t i o n r e q u i r e d= ’ ) 62 .9 Checking the suitability of the potentiometer 1 2 3 4 5 6 7 8 9 // C h e c k i n g t h e s u i t a b i l i t y o f t h e p o t e n t i o m e t e r clc . disp (S .1 2 3 4 5 6 7 8 9 10 // C a l c u l a t i n g t h e maximum e x c i t a t i o n v o l t a g e and the s e n s i t i v i t y clc . ’ R e s o l u t i o n (mm)= ’ ) of the potentiometer Scilab code Exa 5. disp ( ei . Rp = Rm /15. R = sm *1. P =5.5. sr =250. R =600. ei = ( P * R ) ^0. disp (R . ’ r e s o l u t i o n o f 1mm movement ’ ) Rq =300/1000. 5 disp ( Re . disp ( Rq . 5 disp (v . 6 PDa =1 -(10*10^ -3) *( th_pot -35) .10 disp ( ’ 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. ’ Power d i s s i p a t i o n a l l o w e d (W)= ’ ) 8 disp ( ’ 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. 4 disp ( Pd .2. ’ P o s s i o n s r a t i o = ’ ) Scilab code Exa 5. 1 63 .11 Calculating the possion ratio 1 // C a l c u l a t i n g t h e p o s s i o n ’ s r a t i o 2 clc . 7 disp ( PDa . 4 v =( Gf -1) /2. 3 Gf =4.10 Checking the suitability of the potentiometer 1 // C h e c k i n g t h e s u i t a b i l i t y o f t h e p o t e n t i o m e t e r 2 clc . 3 Pd =(10^2) /150. ’ Power d i s s i p a t i o n (W)= ’ ) 5 th_pot =80+ Pd *30*10^ -3.12 Calculating the value of the resistance of the gauges // C a l c u l a t i n g t h e v a l u e o f t h e r e s i s t a n c e o f t h e gauges 2 clc . ’ 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 = ’ ) Scilab code Exa 5.13 calculate the percentage change in value of the gauge resistance 1 2 3 4 5 6 7 8 // c a l c u l a t e t h e p e r c e n t a g e c h a n g e i n v a l u e o f t h e gauge r e s i s t a n c e clc . disp ( dR_nicrome .14 Calculating the Gauge factor 1 2 3 4 5 6 // C a l c u l a t i n g t h e Gauge f a c t o r clc . Gf =2. disp ( r_perunit . ’ 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. 64 . E =200*10^9. ’ c h a n g e i n 8 9 10 11 r e s i s t a n c e o f n i c k e l ( ohm )= ’) Gf =2. I =( b * d ^3) /12.1.02. dR_nicrome = Gf * R * strain .003. b =0. s =100*10^6.3 strain = -5*10^ -6. R =120. 4 Gf = -12. 7 disp ( dR_nickel . 5 R =120. strain = s / E . E =200*10^9. 6 dR_nickel = Gf * R * strain . d =0. r_perunit = Gf * strain *100. 152. Gf =( dR / R ) / strain . ’ Gauge f a c t o r = ’ ) Scilab code Exa 5.16 Calculate the linear approximation 65 .1. l =0. ’ F o r c e (N) ’ ) Scilab code Exa 5. R =120. disp (F .25. s = E * strain .15. s =( M * t ) /( I *2) . disp ( dl . dR =0. R =240. t =0. l =0.7 8 9 10 11 12 13 14 15 16 17 18 x =12. dl =( dR / R ) * l / Gf . A =4*10^ -4. disp ( Gf . F=s*A.013. Gf =2.2. ’ c h a n g e i n l e n g t h (m)= ’ ) strain = dl / l . F =3* E * I * x / l ^3. strain = s / E . M=F*x.15 Calculating the change in length and the force applied 1 2 3 4 5 6 7 8 9 10 11 12 13 14 // C a l c u l a t i n g t h e c h a n g e i n l e n g t h and t h e f o r c e applied clc .7*10^ -3. x =0.003. E =207*10^9. dR =0. 2.8.17 Calculate the linear approximation 1 2 3 4 5 6 7 8 9 10 11 // C a l c u l a t e t h e l i n e a r a p p r o x i m a t i o n clc . disp ( ath0 . 4 8 [ 1 + 0 .Rth1 ) /( th2 .5. ’ a l p h a a t o d e g r e e ( / d e g r e e C)= ’ ) disp ( ’ 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 .40. disp ( ath0 . Rth0 =589.18 Calculate the resistance and the temperature 1 // C a l c u l a t e t h e 2 clc .Rth1 ) /( th2 .th1 ) . Rth2 =605. r e s i s t a n c e and t h e t e m p e r a t u r e 66 . Rth1 =573. 5 [ 1 + 0 .1 2 3 4 5 6 7 8 9 10 11 // C a l c u l a t e t h e l i n e a r a p p r o x i m a t i o n clc . 0 0 1 8 2 ( th −115) ] ’ ) Scilab code Exa 5. th0 = th1 + th2 /2. 4 ath0 =0. Rth2 =6. Rth1 =4. th1 =30. ath0 =(1/ Rth0 ) *( Rth2 .th1 ) . ath0 =(1/ Rth0 ) *( Rth2 . ’ a l p h a a t o d e g r e e ( / d e g r e e C)= ’ ) disp ( ’ 5 . 0 0 8 5 ( th −45) ] ’ ) Scilab code Exa 5.52.00392. th1 =100. 3 Rth0 =100.48. th0 = th1 + th2 /2. th2 =60. th2 =130. Rth0 =5. th0 =50. 7 disp ( R65 . 6 R150 = Rth0 *[1+ ath0 * dth ]. 7 disp ( R150 . 4 ath0 =0.20 Calculate the time 1 2 3 4 5 6 7 // C a l c u l a t e t h e t i m e clc . ’ T e m p e r a t u r e ( d e g r e e C) ’ ) Scilab code Exa 5. 5 dth =150 -20. disp (t . 10 disp ( th . ’ r e s i s t a n c e a t 65 d e g r e e C( ohm )= ’ ) 8 9 th ={[(150/100) -1]/ ath0 }+25.5 dth =65 -25.00393.19 Calculate the resistance 1 // C a l c u l a t e t h e r e s i s t a n c e 2 clc .21 Calculate the resistance 1 // C a l c u l a t e t h e r e s i s t a n c e 67 . ’ t i m e ( s )= ’ ) Scilab code Exa 5. th =30. tc =120. 6 R65 = Rth0 *[1+ ath0 * dth ]. 3 Rth0 =10. ’ r e s i s t a n c e a t 150 d e g r e e C( ohm )= ’ ) Scilab code Exa 5. t = -120*[ log (1 -( th / th0 ) ) ]. R35 = R25 *[1+ ath * dth ]. 5 disp ( ’ 3980= a ∗ 3 9 8 0 ∗ exp ( b / 2 7 3 ) ’ ) 6 Rt50 =794. ’ R e s i s t a n c e a t 40 d e g r e e C ( ohm ) ’ ) 14 Rt100 =(30*10^ -6) *3980* exp (2843/373) . 8 disp ( ’ 794= a ∗ 3 9 8 0 ∗ exp ( b / 3 2 3 ) ’ ) 9 disp ( ’ on s o l v i n g ’ ) 10 disp ( ’ a =30∗10ˆ −6 ’ . 13 disp ( Rt40 . ’ 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. ’ b=2843 ’ ) 11 Ta40 =273+40. 5 disp ( dth . ath = -0. 15 disp ( Rt100 .23 calculating the change in temperature 1 // c a l c u l a t i n g t h e c h a n g e i n t e m p e r a t u r e 2 clc . 7 Ta50 =273+50. 3 Ro =3980. ’ 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. disp ( R35 . R25 =100.22 find resistance 1 // 2 clc . 4 Ta =273. 4 dth = th -70. 3 th =((1 -1800/2000) /0.2 3 4 5 6 7 clc . 12 Rt40 =(30*10^ -6) *3980* exp (2843/313) .05. dth =35 -25. ’ 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) ’ ) 68 .05) +70. disp ( f20 . f20 =1/(2* %pi * R20 * C ) . f25 =1/(2* %pi * R25 * C ) . disp ( f25 .Scilab code Exa 5.25 Calculating the sensitivity and maximum output voltage 1 2 3 4 5 6 // C a l c u l a t i n g t h e s e n s i t i v i t y and maximum o u t p u t voltage clc .24 calculating the frequencies of oscillation 1 2 3 4 5 6 7 8 9 10 11 12 // c a l c u l a t i n g t h e f r e q u e n c i e s o f clc .05*(25 -25) ) . ’ F r e q u e n c y o f o s c i l l a t i o n Hz ) ’ ) R25 =10000*(1 -0.05*(20 -25) ) . Se_thermocouple =500 -( -72) . ’ 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. f30 =1/(2* %pi * R30 * C ) . disp ( f30 .05*(30 -25) ) . ’ maximum o u t p u t v o l t a g e (V)= ’ ) 69 . C =500*10^ -12. ’ F r e q u e n c y o f o s c i l l a t i o n Hz ) ’ ) oscillation a t 20 d e g r e e C ( a t 25 d e g r e e C ( a t 30 d e g r e e C ( Scilab code Exa 5. disp ( Se_thermocouple . disp ( Vo . R20 =10000*(1 -0. ’ F r e q u e n c y o f o s c i l l a t i o n Hz ) ’ ) R30 =10000*(1 -0. Re =12.m.Scilab code Exa 5.i ) / i ]*800. Rm =50.3*10^ -3. disp ( Rs . f .27 Calcating the series resistance and approximate error 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 // C a l c a t i n g t h e s e r i e s r e s i s t a n c e and a p p r o x i m a t e error clc . ’ 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 .Re . AE =[( i1 .1*10^ -3. 4 Disp ( ET .i ) / i ]*800.00426*10. o f 10 ( d e g r e e C)= ’ ) Scilab code Exa 5. (mV) ’ ) 5 disp ( ’ 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 .07+0. i1 = E /( Rs + Re + Rm + R_change ) . Rs =( E / i ) -Rm . ’ 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. disp ( AE . AE =[( i1 .8. i1 = E /( Rs + Re + Rm ) . ’ s e r i e s r e s i s t a n c e ( ohm )= ’ ) Re =13. ’ R e q u i r e d e .28 Calculate the values of resistance R1 and R2 70 . E =33.26 Calculating the temperature 1 // C a l c u l a t i n g t h e t e m p e r a t u r e 2 clc . 8 7 mV i s 620 degree C ’) Scilab code Exa 5. disp ( AE . 3 ET =27. i =0. 112*10^ -3.29 Calculate the percentage linearity 1 // C a l c u l a t e t h e p e r c e n t a g e l i n e a r i t y 2 clc . E_1200 =11. // emf a t 20 d e g r e e C E_900 =8. ’ s e n s t i v i t y o f t h e LVDT (V/mm) ’ ) Af =250. E1 = E_900 . disp ( R1 .5) *100. ( i ) ’) disp ( ’ E2 = 1 . disp ( Se_LVDT . E_20 =0.1 2 3 4 5 6 7 8 9 10 11 12 13 14 // C a l c u l a t e t h e v a l u e s o f r e s i s t a n c e R1 and R2 clc .446*10^ -3.6. ’ p e r c e n t a g e l i n e a r i t y = ’ ) Scilab code Exa 5.946*10^ -3.5+R2 ) . R2 =762. 4 disp ( linearity_percentage . displacement =0. I n s t r u m e n t and 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 clc .5+R2 ) . Vo =2*10^ -3.E_20 . 08 ∗ R1 / ( R1+2.003/1. Se_LVDT = Vo / displacement . Se_instrument = Se_LVDT * Af .95.30 Calculate senstivity of the LVDT 1 2 3 4 5 6 7 8 // C a l c u l a t e s e n s t i v i t y o f t h e LVDT.E_20 . ( i i ) ’) disp ( ’ on s o l v i n g ( i ) and ( i i ) ’ ) R1 =5. E2 = E_1200 . 3 linearity_percentage =(0. 5 ) / ( R1+2. 0 8 ∗ ( R1 + 2 . ’ v a l u e o f r e s i s t a n c e R2 ( ohm )= ’ ) Scilab code Exa 5. disp ( ’ E1 =1. 71 . ’ v a l u e o f r e s i s t a n c e R1 ( ohm )= ’ ) disp ( R2 .5. Re_instrument =1*1/1000. F_max =10/ Se . maximum and minimum force clc .004. ’ d e f l e c t i o n (m) ’ ) DpF = x / F . disp (x .25. ’ maximum f o r c e (N) ’ ) disp ( Se . the s e n s i t i v i t y of the transducer 72 . ’ 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. E =200*10^9. ’ minimum f o r c e (N) ’ ) disp ( F_max .5*1000. Vo_min =50/5. b =0. ’ ’ ) Scilab code Exa 5.32 calculating the sensitivity of the transducer 1 // c a l c u l a t i n g 2 clc . I =(1/12) * b * t ^3.31 calculate the deflection maximum and minimum force 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 // c a l c u l a t e t h e d e f l e c t i o n . disp ( Re_instrument . x =( F * l ^3) /(3* E * I ) . F =25. F_min = Re / Se . ’ 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.9 10 11 12 13 disp ( Se_instrument . Re =(10/1000) *(2/10) . t =0. l =0. disp ( F_min . Se = DpF *0.02. w =25*10^ -3.25*10^ -3. disp ( Se . Se = -4* e0 * w / d . disp ( dfo .5*10^ -3. ’ 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.9*10^ -3.3 4 5 6 7 8 disp ( ’ p e r m i t t i v i t y o f t h e a i r e 0 =8. d2 =2. dfo = fo1 .85∗10ˆ −12 ’ ) e0 =8.5]* fo1 . d1 =3. ’ 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.34 Calculate the change in frequency of the oscillator 1 2 3 4 5 6 7 8 // C a l c u l a t e t h e c h a n g e i n f r e q u e n c y o f t h e oscillator clc .85*10^ -12. disp ( C2 . d1 =4. C1 =370*10^ -12. ’ c h a n g e i n f r e q u e n c y o f t h e o s c i l l a t o r ( Hz ) ’) 73 . d =0.33 Calculate the value of the capacitance afte the application of pressure 1 2 3 4 5 6 7 // C a l c u l a t e 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 application of pressure clc .fo2 . fo1 =100*10^3. C2 = C1 * d1 / d2 . fo2 =[( d2 / d1 ) ^0.7. d2 =3. M ^2) ]^0. ’ C a p a c i t a n c e ( F )= ’ ) l =(20*10^ -3) -(2*10^ -3) . ’ p h a s e s h i f t ( deg ) ’ ) 74 . p h a s e s h i f t . tc =(1/ w ) *[( M ^2) /(1 .1 -3) /2. D2 =3. M =0.C_new . ’ c h a n g e i n C a p a c i t a n c e ( F )= ’ ) Scilab code Exa 5.Scilab code Exa 5. disp ( tc . L_air =(3. D_stress =100/ L_air .95. c h a n g e i n v a l u e of capacitance clc . C_change =C . e0 =8. D1 =3. l =20*10^ -3. disp ( ph . disp (C . C =(2* %pi ) * e0 * l /( log ( D2 / D1 ) ) .35 Calculate the dielectric stress change in value of capacitance 1 2 3 4 5 6 7 8 9 10 11 12 13 14 // C a l c u l a t e t h e d i e l e c t r i c s t r e s s . s e r i e s r e s i s t a n c e . C_new =(2* %pi ) * e0 * l /( log ( D2 / D1 ) ) .5. a m p l i t u d e r a t i o and v o l t a g e sensitivity clc . w =2* %pi *20. disp ( C_change .1.36 Calculate the value of time constant phase shift series resistance amplitude ratio and voltage sensitivity 1 2 3 4 5 6 7 8 // C a l c u l a t e t h e v a l u e o f t i m e c o n s t a n t . ’ t i m e c o n s t a n t ( s ) ’ ) ph ={( %pi /2) -[ atan ( w * tc ) ]}*(180/ %pi ) .85*10^ -12. ’ 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 ’ ) 75 . C_change = C_new . Vs = Eb / x . e2 =8.01*10^ -3. ’ a m p l i t u d e r a t i o = ’ ) Eb =100. disp (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. e1 =1.2) .37 Calculate the change in capacitance and ratio 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 // C a l c u l a t e t h e c h a n g e i n c a p a c i t a n c e and r a t i o clc . Ratio =( C_change / C ) /(0. d1 =0. C_new =( e0 * A ) /(( d1_new / e1 ) +( d2 / e2 ) ) . disp ( Vs .C .02/0. Ratio =( C_change / C ) /(0. disp ( Ratio .2*10^ -3.5. d =0. C_change = C_new . C_new = e0 * A / d1 .2) .C . e0 =8. d2 =0.18*10^ -3. ’ v o l t a g e s e n s i t i v i t y (V/m) ’ ) Scilab code Exa 5.125*10^ -3. A =500*10^ -6. x =0.17*10^ -3.125*10^ -3) . ’ 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.85*10^ -12.19*10^ -3. d1_new =0.85*10^ -12*300*10^ -6) /(0. disp (M .9 10 11 12 13 14 15 16 17 C =(8. C = e0 * A / d . disp ( Ratio . C =( e0 * A ) /(( d1 / e1 ) +( d2 / e2 ) ) .02/0. R = tc / C . P = Eo /( g * t ) .Scilab code Exa 5.055.5*10^6. F=P*A.6*10^ -12. d=e*g. Eo =100. Eo = g * t * P . disp (F . A =25*10^ -6. g =0.055. g =0.5*10^ -3. t =1.40 Calculate the output voltage and charge sensitivity 1 2 3 4 5 6 7 8 9 10 // C a l c u l a t e t h e o u t p u t v o l t a g e and c h a r g e sensitivity clc . disp (d . ’ o u t p u t v o l t a g e (V)= ’ ) e =40.42 Calculate the strain charge and capacitance clc 1 // C a l c u l a t e t h e s t r a i n . c h a r g e and c a p a c i t a n c e 76 . t =2*10^ -3. ’ F o r c e (N)= ’ ) Scilab code Exa 5.41 Calculate the force 1 2 3 4 5 6 7 8 9 // C a l c u l a t e t h e f o r c e clc . disp ( Eo . P =1. ’ c h a r g e s e n s i t i v i t y (C/N)= ’ ) Scilab code Exa 5. A =100*10^ -6. F =5.43 calculate peak to peak voltage swing under open and loaded conditions calculate maximum change in crystal thickness 1 2 3 4 5 6 7 8 9 10 11 12 13 14 // c a l c u l a t e peak t o peak v o l t a g e s w i n g u n d e r open and l o a d e d c o n d i t i o n s // c a l c u l a t e 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 clc . Eo =( g * t * P ) . t =1. strain = P /(12*10^6) . C = Q / Eo . disp ( Eo_peak_to_peak . d1 =1*10^ -3.25*10^ -3. ’ C a p a c i t a n c e ( F )= ’ ) Scilab code Exa 5. er =5.2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 clc . t =1*10^ -3.85*10^ -12. ’ peak v o l t a g e s w i n g u n d e r open conditions ’) Rl =100*10^6. e0 =8. P=F/A. Q=d*F. ’ s t r a i n = ’ ) disp (Q .01.5*10^ -9. ’ c h a r g e (C)= ’ ) disp (C . d =2*10^ -12. Fmax =0. Eo_peak_to_peak =2* d * t * Fmax /( e0 * er * A ) . 77 . A =25*10^ -6. e =12. disp ( strain . g = d /( e ) . d =150*10^ -12. Cl =20*10^ -12. M ^2) ]^0. ’ 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. disp ( ph .15 16 17 18 19 20 21 Cp = e0 * er * A / d1 . 23 dt =2* Fmax * t /( A * E ) . 1 78 . w =(1/ tc ) *[( M ^2) /(1 . tc =1. ’ 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. ’ minimum f r e q u e n c y ( r a d / s ) ’ ) ph ={( %pi /2) -[ atan ( w * tc ) ]}*(180/ %pi ) . disp (w . disp ( El_peak_to_peak . ’ p h a s e s h i f t ( deg ) ’ ) Scilab code Exa 5. h i g h f r e q u e n c y s e n s i t i v i t y . m =[ w * Cp * Rl /[1+( w * C * Rl ) ^2]^0.5*10^ -3. Lowest f r e q u e n c y 2 // C a l c u l a t e e x t e r n a l s h u n t c a p a c i t a n c e and h i g h frequency s e n s i t i v i t y a f t e r connecting the e x t e r n a l shunt c a p a c i t a n c e 3 clc . w =1000.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 // c a l c u l a t e 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 . 24 disp ( dt . El_peak_to_peak =[2* d * t * Fmax /( e0 * er * A ) ]* m .44 Calculate the minimum frequency and phase shift 1 2 3 4 5 6 7 8 // C a l c u l a t e t h e minimum f r e q u e n c y and p h a s e s h i f t clc . C = Cp + Cl . M =0.5.5].95. ’ 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.46 calculate op volatge 1 2 3 4 5 6 7 // clc . Hf = Kq / C . Ce = C_new . disp (w . R =10^6. tc = R * C . t =2*10^ -3. K = Kq / Cp .C . C_new = tc / R . tc = R * C . w =(1/ tc ) *[( M ^2) /(1 . w =2* %pi * f . tc =(1/ w ) *[( M ^2) /(1 . ’ 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 ) ’ ) Hf_new = Kq / C_new .M ^2) ]^0. C =2500*10^ -12. disp ( Hf_new . disp (K . f = w /(2* %pi ) .95. d =100*10^ -12. C = Cp + Cc + Ca . Cp =1000*10^ -12. 79 . M =0. ’ 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. ’ minimum f r e q u e n c y ( s ) ’ ) disp ( ’ now f =10Hz ’ ) f =10. disp ( Ce .4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 Kq =40*10^ -3. ’ 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.M ^2) ]^0. Ca =50*10^ -12.5. disp ( Hf .5. 5.48 calculate op volatge 1 2 3 4 5 6 // clc .T / log ( el ) .t / tc ) ]/ C }. tc = . t =2*10^ -3. ’ 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 2 3 4 5 6 7 8 // t o p r o v e 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 20 T t o k e e p u n d e r s h o o t w i t h i n 5% clc .95. ’ v o l t a g e j u s t a f t e r t =2ms (mV) ’ ) disp ( ’ when t =10ms ’ ) t =10*10^ -3. disp ( el_after . ’ 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 *[ exp ( . 80 . B =0. el =0. T =1. T =2*10 e_10 =10^3*{ d * F *[ exp (( . disp ( tc . disp ( el .T / tc ) -1) ]*{ exp ( -(t . Kh = -1*10^ -6.t / tc ) -1]/ C }. ’ t i m e c o n s t a n t ’ ) disp ( ’ 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.T ) ) / tc }/ C } disp ( e_10 . disp ( ’ L e t T=1 ’ ) .1. el =10^3*{ d * F *[ exp ( .8 9 10 11 12 13 14 15 16 17 F =0. I =3. Ri =30.50 Calculate maximum velocity of emitted photo electrons 1 2 3 4 5 6 7 // C a l c u l a t e maximum v e l o c i t y o f e m i t t e d p h o t o electrons clc . ’ 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.2537*10^ -6) . 8 disp ( Eh . B_energy = E_imparted -4. t =10. ’ o u t p u t v o l t a g e (V) ’ ) Scilab code Exa 5.24*10^ -6/1.5.176*10^12. ’ T h r e s h o l d w a v e l e n g t h (m) ’ ) Scilab code Exa 5. disp (v .24*10^ -6) /(0. 3 Th_wavelength =1.8 ’ 4 disp ( Th_wavelength .51 Calculate the resistance of the cell 1 2 3 4 5 // C a l c u l a t e t h e r e s i s t a n c e o f t h e c e l l clc .30. E_imparted =(1. 81 . v =(2* B_energy * em_ratio ) ^0.7 Eh = Kh * I * B / t . Rf =100.49 Calculate the threshold wavelength 1 // C a l c u l a t e t h e t h r e s h o l d w a v e l e n g t h 2 clc . em_ratio =0. Ri ) *[1 . disp ( Vo .exp ( . I_power =250*0.52 Calculate incident power and cut off frequency 1 2 3 4 5 6 7 8 // C a l c u l a t e i n c i d e n t power and c u t o f f f r e q u e n c y clc . ’ c u t o f f f r e q u e n c y ( Hz ) ’ ) Scilab code Exa 5. I =2. Eo =0. ’ 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. disp ( fc .t / tc ) ]. Ri =( Eo / I ) -100. ’ 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)= ’ ) 82 .53 Calculate the internal resistance of cell and open circuit voltage 1 2 3 4 5 6 7 8 9 // C a l c u l a t e t h e i n t e r n a l r e s i s t a n c e o f c e l l and open c i r c u i t v o l t a g e clc . Rl =100.2*10^ -3. disp ( Ri . fc =1/(2* %pi * Rl * C ) . 8 disp ( Rt .2*10^ -6. C =2*10^ -12. ’ 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. 7 Rt = Ri +( Rf .33*[ log (25) / log (10) ].33.6 tc =72. ’ i n c i d e n t power (W) ’ ) Rl =10*10^3. disp ( I_power . Scilab code Exa 5. I =180. r =0. disp ( L_flux . ’ l u m n i o u s f l u x= ’ ) disp ( ’ 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 . A =1935*10^ -6.914. 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 ’ ) 83 . S_angle = A / r ^2. L_flux = I * S_angle .54 Find the value of current 1 2 3 4 5 6 7 8 9 // Find t h e v a l u e o f c u r r e n t clc . Avol =200000.2 calculating the closed loop gain 1 2 3 4 5 6 7 // c a l c u l a t i n g t h e c l o s e d l o o p g a i n clc . R1 =1*10^3. R1 =1. A =100. Scilab code Exa 6. ’ c l o s e d l o o p g a i n= ’ ) 84 .Chapter 6 Signal Conditioning Scilab code Exa 6. disp (A .A * R1 . A = -( Rf / R1 ) *(1/[1+(1/ Avol ) *(( R1 + Rf ) / R1 ) ]) . Rf = . disp ( Rf . Rf =10. ’ f e e d b a c k r e s i s t a n c e ( ohm )= ’ ) .1 calculating feedback resistance 1 2 3 4 5 6 // c a l c u l a t i n g f e e d b a c k r e s i s t a n c e clc . Rf =10. ’ 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. ’ s a t u r a t i o n v o l t a g e= ’ ) 5 Vom = Sa . R1 =1. ’ maximum o u t p u t v o l t a g e ’ ) Scilab code Exa 6.5 calculating Amplification factor 1 2 3 4 5 6 7 // c a l c u l a t i n g A m p l i f i c a t i o n f a c t o r clc . A = Rf / R1 . ’ A m p l i f i c a t i o n F a c t o r= ’ ) Scilab code Exa 6. disp ( Vo . disp (A .Vos *(1+ Rf / R1 ) .6 calculating output voltage due to offset voltage 85 . 4 disp ( Sa .4 calculating output voltage due to offset voltage 1 2 3 4 5 6 7 // c a l c u l a t i n g 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 clc .3 calculating the maximum output voltage 1 // c a l c u l a t i n g t h e maximum o u t p u t v o l t a g e 2 clc . 3 Sa =10. R1 =1. Vo = . Rf =10.Scilab code Exa 6. 6 disp ( Vom . Vos =5*10^ -3. 86 . A = Rf / R1 . disp ( Rf . ’ r e s i s t a n c e R1 ( K i l o −ohms )= ’ ) R2 = Rf /(0.7 calculating gain and feedback resistance 1 2 3 4 5 6 7 8 9 10 11 // c a l c u l a t i n g g a i n and f e e d b a c k r e s i s t a n c e clc . Rf =500. ’ Gain= ’ ) disp ( ’ I f m u l t i p l i e r i s 10 ’ ) A =10.8 Calculating the values of resistances 1 2 3 4 5 6 7 // C a l c u l a t i n g t h e v a l u e s o f r e s i s t a n c e s clc . disp (A . disp ( R1 . Rf =10. R1 = Rf / g . g =10. V2 = -2. R1 =1*10^3. disp ( Vo . Rf = A * R1 . ’ o u t p u t v o l t a g e (V)= ’ ) Scilab code Exa 6. V1 =1. Rf =100*10^3.5* g ) . Vo = -{[( Rf / R1 ) * V1 ]+[( Rf / R2 ) * V2 ]}.1 2 3 4 5 6 7 8 9 // c a l c u l a t i n g 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 clc . ’ f e e d b a c k r e s i s t a n c e (Ohm)= ’ ) Scilab code Exa 6. R1 =250. R2 =100. 8 disp ( R2 .V1 ) . Vo =300*10^ -3. disp ( Vo . Vo = Ad *( V2 .9 Calculating the value of resistance and capacitance 1 2 3 4 5 6 7 // C a l c u l a t i n g t h e v a l u e o f r e s i s t a n c e and capacitance clc . disp (R . disp ( Ad . V1 =3*10^ -3. ’ r e s i s t a n c e R1 ( K i l o −ohms )= ’ ) 9 R3 = Rf /(0. Voramp = -10.10 Calculating Difference mode gain and output voltage 1 2 3 4 5 6 7 8 9 10 11 12 // C a l c u l a t i n g D i f f e r e n c e mode g a i n and o u t p u t voltage clc . V2 =5*10^ -3.V1 . ’ d i f f e r e n c e mode g a i n= ’ ) V2 =155*10^ -3. 10 disp ( R3 . ’ v a l u e o f r e s i s t a n c e ( ohm )= ’ ) Scilab code Exa 6. ’ o u t p u t v o l t a g e (V)= ’ ) 87 . disp ( ’ 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. Ad = Vo / Vd . R =1*10^ -3*10^6.333* g ) . Vd = V2 . ’ r e s i s t a n c e R1 ( K i l o −ohms )= ’ ) Scilab code Exa 6. V1 =153*10^ -3. Vo =3. Vc =600*10^ -3. ’ S i g n a l t o N o i s e R a t i o= ’ ) 88 . ’ d i f f e r e n c e mode g a i n= ’ ) Vo =5*10^ -3. Ad =150. Vc =500*10^ -3.Scilab code Exa 6. disp ( SNR . disp ( CMRR . ’Common mode r e j e c t i o n r a t i o = ’ ) Scilab code Exa 6. Ac =0. disp ( Ac .04. Vos = Ad * Vd . V1 = -30*10^ -3. CMRR = Ad / Ac . Common mode g a i n and CMRR clc .V1 .11 Calculating Difference mode Common mode gain and CMRR 1 2 3 4 5 6 7 8 9 10 11 12 // C a l c u l a t i n g D i f f e r e n c e mode . Ac = Vo / Vc . ’Common mode g a i n= ’ ) CMRR = Ad / Ac . disp ( Ad . Von = Ac * Vc . SNR = Vos / Von . Vd =30*10^ -3. Ad = Vo / Vd . V2 =30*10^ -3. Vd = V2 .12 Calculating Signal to noise ratio and CMRR 1 2 3 4 5 6 7 8 9 10 11 12 13 // C a l c u l a t i n g S i g n a l t o n o i s e r a t i o and CMRR clc . Ci * Vi /( Eo * A ) . Eo =8. MNtc = 10^8*10*10^ -12.AR ^2) ^0.13 Calculating sensitivity and output voltage 1 2 3 4 5 6 7 8 9 10 11 // C a l c u l a t i n g s e n s i t i v i t y and o u t p u t v o l t a g e clc . ’ minimum f r e q u e n c y ( Hz ) ’ ) fmax =( AR ) /[2* %pi * MNtc *(1 .5]. MXtc = 10^10*1000*10^ -12. disp ( MXtc .14 calculating minimum maximum time constants and value of frequencies 1 2 3 4 5 6 7 8 9 10 11 // c a l c u l a t i n g minimum .5]. ’ s e n s i t i v i t y (V/mm)= ’ ) d =1*10^ -6. ’CMRR= ’ ) Scilab code Exa 6.14 15 disp ( CMRR . ’ o u t p u t v o l t a g e (V)= ’ ) Scilab code Exa 6. disp (K . Vo = K * d . disp ( fmax . ’ Minimum t i m e c o n s t a n t ( s ) ’ ) . K = . ’ Maximum f r e q u e n c y ( Hz ) ’ ) 89 . A =200*10^ -6. disp ( MNtc . ’ Maximum t i m e c o n s t a n t ( s ) ’ ) . fmin =( AR ) /[2* %pi * MXtc *(1 .85*10^ -12.AR ^2) ^0. disp ( Vo . Vi =10. AR =0. disp ( fmin .95. Ci =10*10^ -12. maximum t i m e c o n s t a n t s and value of frequencies clc . g ^2) ^0.01) *10^ -6. fcl =1/(2* %pi * C2 * R2 ) .Scilab code Exa 6. ’ c a p a c i t a n c e ( micro −F ) ’ ) Scilab code Exa 6. A = R2 /( R1 + R2 ) . w =2* %pi * f . disp ( fcl . disp ( fcu . g =0. C1 =100*10^ -12. disp (C . ’ t i m e c o n s t a n t ( s ) ’ ) R =10000. R2 =1*10^6. tc =(1 . C =( tc / R ) *10^6.5/( w * g ) . ’ u p p e r c u t o f f f r e q u e n c y ( Hz ) ’ ) 90 . ’ 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 ) .501. R1 =10*10^3. ’ g a i n= ’ ) C2 =(0.16 calcuating the passband gain and upper and lower cut off frequencies 1 2 3 4 5 6 7 8 9 10 11 12 // c a l c u a t i n g t h e p a s s b a n d g a i n and u p p e r & l o w e r cut o f f f r e q u e n c i e s clc . f =50.15 calculating time constant and value of capacitance 1 2 3 4 5 6 7 8 9 10 // c a l c u l a t i n g t i m e c o n s t a n t and v a l u e o f capacitance clc . disp ( tc . disp (A . Rb = K * Rt . ’ t h e v a l u e o f C ( F ) ’ ) Scilab code Exa 6.95 ’ ) eo =[( K * Rt / Rb ) /(1+( K * Rt / Rb ) ) ]* ei . disp ( Se . ’ s e n s i t i v i t y (V/ohm )= ’ ) 91 .19 calculate the output voltage and sensitivity 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 // c a l c u l a t e t h e o u t p u t v o l t a g e and s e n s i t i v i t y clc . disp ( Se . R =1*10^6. disp ( ’ When K=0.95. disp (C . K =1. ’ o u t p u t v o l t a g e (V)= ’ ) Se =( ei * Rb ) /[( Rb + K * Rt ) ^2].Scilab code Exa 6. Rt =100. fo =10*10^3. ei =10. C =1/(2* %pi * fo * R ) . disp ( eo . disp ( eo .17 calcuating the value of C 1 2 3 4 5 6 // c a l c u a t i n g t h e v a l u e o f C clc . ’ o u t p u t v o l t a g e (V)= ’ ) Se =( ei * Rb ) /[( Rb + K * Rt ) ^2]. disp ( ’ When K=1 ’ ) eo =[( K * Rt / Rb ) /(1+( K * Rt / Rb ) ) ]* ei . ’ s e n s i t i v i t y (V/ohm )= ’ ) K =0. 5.8.R2 * R3 ) /(( R1 + R3 ) *( R2 + R4 ) ) ]* ei . ei =12. R4 = R2 * R3 / R1 . ’ o u t p u t v o l t a g e (V)= ’ ) K =0. disp ( eo .Scilab code Exa 6. disp ( ’ When K=0. ei =100. disp ( eo .7.20 calculate the output voltage for different values of K 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 // c a l c u l a t e t h e o u t p u t v o l t a g e f o r d i f f e r e n t v a l u e s of K clc . ’ o u t p u t v o l t a g e (V)= ’ ) K =0. disp ( eo . ’ o u t p u t v o l t a g e (V)= ’ ) Scilab code Exa 6. R1 =120.25 ’ ) eo =[( K /6) /(1+( K /6) ) ]* ei . ’ o u t p u t v o l t a g e (V)= ’ ) K =0. disp ( ’ When K=0.6.5 ’ ) eo =[( K /6) /(1+( K /6) ) ]* ei .6 ’ ) eo =[( K /6) /(1+( K /6) ) ]* ei . K =0.8 ’ ) eo =[( K /6) /(1+( K /6) ) ]* ei . R2 =119. R4 =121.21 calculating the resistance and output voltage 1 2 3 4 5 6 7 8 9 // c a l c u l a t i n g t h e r e s i s t a n c e and o u t p u t v o l t a g e clc .25. 92 . eo =[( R1 * R4 .4. disp ( eo . disp ( ’ When K=0. R3 =119.2. disp ( ’ When K=0. ’ o u t p u t v o l t a g e (V) ’ ) disp ( ’ i f dR= −0.10 disp ( eo . eo =[( dR / R ) /(4+2*( dR / R ) ) ]* ei . im =0.05* R . ’ o u t p u t v o l t a g e (V) ’ ) Scilab code Exa 6. disp ( eo .05* R . dR =( im * R ^2) *(4*(1+ Rm / R ) ) / ei . ’ R e s i s t a n c e o f unknown r e s i s t o r ( ohm )= ’ ) 93 .23 Calculating the resistance of unknown resistance 1 2 3 4 5 6 7 8 9 10 11 12 // C a l c u l a t i n g t h e r e s i s t a n c e o f unknown r e s i s t a n c e clc . disp ( ’ i f dR=0. R =800. R2 =800. R1 = R + dR . disp ( eo . ei =6. R3 =800. eo =[( dR / R ) /(4+2*( dR / R ) ) ]* ei .8*10^ -6. ei =4.05R ’ ) dR =0. R =10000. ’ o u t p u t v o l t a g e (V)= ’ ) Scilab code Exa 6.05R ’ ) dR = -0. Rm =100. R4 =800. disp ( R1 .22 Calculating the bridge output 1 2 3 4 5 6 7 8 9 10 11 12 // C a l c u l a t i n g t h e b r i d g e o u t p u t clc . i =( P / R ) ^0. ’ c u r r e n t (A)= ’ ) Scilab code Exa 6. ’ open c i r c u i t v o l t a g e (V)= ’ ) Ro =[ R1 * R4 /( R1 + R4 ) ]+[ R2 * R3 /( R2 + R3 ) ]. R1 =1010. s u p p l y v o l t a g e // and 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 clc .Scilab code Exa 6. ’ maximum s u p p l y v o l t a g e (V)= ’ ) Rs =100.5. R =100. disp ( eo . disp ( ei . 94 .R2 * R3 ) /(( R1 + R3 ) *( R2 + R4 ) ) ]* ei . R4 =1000. ’ maximum p e r m i s s i b l e c u r r e n t (A)= ’ ) ei =2* i * R . Ps =10^2/ Rs . R2 =1000. eo =[( R1 * R4 .24 calculating the current 1 2 3 4 5 6 7 8 9 10 11 12 13 // c a l c u l a t i n g t h e c u r r e n t clc . R3 =1000. im = eo /( Ro + Rm ) . disp ( im . Rm =4000. ei =100.25 Calculating maximum permissible current through strain gauge supply voltage and Power dissipation in series resistance 1 2 3 4 5 6 7 8 9 10 11 // C a l c u l a t i n g maximum p e r m i s s i b l e c u r r e n t t h r o u g h s t r a i n gauge . P =250*10^ -3. disp (i . 27 Calculating the resolution of the instrument quantization error and decesion levels 1 2 3 4 5 6 7 8 9 10 // C a l c u l a t i n g t h e 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 .5/100) * dth * R . P =(0. ’ 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. disp ( Sem . eim =2*( P * R ) ^0.26 Calculating the maximum voltage sensitivity of the bridge 1 2 3 4 5 6 7 8 9 10 // C a l c u l a t i n g t h e maximum v o l t a g e s e n s i t i v i t y o f the bridge clc .12 disp ( Ps . R =1000. Q =10/2^ n . disp ( Reso . ’ 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. eom =( dR /(4* R ) ) * eim . disp ( Eq .5) . q u a n t i z a t i o n e r r o r and d e c e s i o n l e v e l s clc . Reso =10*10^ -3/10. Eq = Q /(2*3^0. ’ 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. dR =(4. ’ d e c e s i o n l e v e l s = ’ ) 95 .1. Sem = eom / dth . dth =0.5.1/0.2) *10^ -3. ’ q u a n t i z a t i o n e r r o r= ’ ) D =(2^ n ) -1. disp (D . E =10. 8 disp ( Wlsb . CVlsb =(2^ . disp ( PC . ’ P e r c e n t a g e c h a n g e = ’ ) Scilab code Exa 6. ER = E *256/255. PC = CVlsb *100/ E .28 Calculating the weight of MSB and LSB 1 // C a l c u l a t i n g t h e w e i g h t o f MSB and LSB 2 clc .n ) * ER . 4 b =5. disp ( ER .Scilab code Exa 6. ’ w e i g h t o f MSB (V)= ’ ) 7 Wlsb = Ra /2^ b .29 Calculating reference voltage and percentage change 1 2 3 4 5 6 7 8 9 // C a l c u l a t i n g r e f e r e n c e v o l t a g e and p e r c e n t a g e change clc . 5 Wmsb = Ra /2. 6 disp ( Wmsb . 3 Ra =10. ’ w e i g h t o f LSB (V)= ’ ) Scilab code Exa 6. ’ R e f e r e n c e v o l t a g e (V)= ’ ) n =8.30 Calculating the number of bits Value of LSB Quantization error minimum sampling rate Aperature time and dynamic range 96 . ’ V a l u e o f LSB (V) = ’ ) Eq = Q /(2*(3^0. ’ dynamic r a n g e ( db ) = ’ ) Scilab code Exa 6. ta =1/(2* %pi * fh ) * a . disp ( Dr . Q =10. V a l u e o f LSB . Imax =10*10^ -3. minimum s a m p l i n g r a t e A p e r a t u r e t i m e and dynamic r a n g e clc . LSB = E /2^ n . n =14. ’ Q u a n t i z a t i o n e r r o r (V) = ’ ) fh =1000. ’ number o f b i t s = ’ ) E =10. disp ( LSB . disp ( fs . ’ r e s i s t a n c e ( ohm )= ’ ) LSB = ER /[(2^( n -1) ) * R ]. ’ A p e r a t u r e t i m e ( s ) = ’ ) Dr =6* n . Q u a n t i z a t i o n e r r o r . R = ER *((2^ n ) -1) /[(2^( n -2) ) * Imax ].31 Calculating the value of resistance and smallest output current 1 2 3 4 5 6 7 8 9 // C a l c u l a t i n g t h e v a l u e o f r e s i s t a n c e and s m a l l e s t output cu r r en t clc . disp ( ta . disp (R . disp ( LSB .1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 // C a l c u l a t i n g t h e number o f b i t s . ER =10. ’ minimum s a m p l i n g r a t e ( Hz ) = ’ ) a =1/16384. disp (n . disp ( Eq . fs =5* fh .5) ) . n =6. ’ s m a l l e s t o u t p u t c u r r e n t (A) ’ ) 97 . Scilab code Exa 6. 2 1 7 > 3 . disp ( ’ s i n c e 3. Io = (10/10*10^3) *{1*1+1*0. disp ( ’ S e t d3=1 ’ ) Output =5/2^1. 8 disp ( Eo . 6 Rf =5000. disp ( ’ s i n c e 3 . 2 1 7 < 3 .33 Calculate the output of successive approximation A to D 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 // C a l c u l a t e t h e o u t p u t 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 clc .5+1*0. 5 s o d3=1 ’ ) disp ( ’ S e t d2=1 ’ ) Output =(5/2^1) +(5/2^2) . R =10000. disp ( ’ s i n c e 3 . 2 1 7 > 2 .25+0*0. 7 Eo = . ’ Output v o l t a g e (V)= ’ ) 1 2 3 4 5 Scilab code Exa 6. n =6.217 < 3 . 1 2 5 s o d1=1 ’ ) disp ( ’ S e t d0=1 ’ ) Output =(5/2^1) +(5/2^3) +(5/2^4) .Io * Rf .125+1*0.0625}*10^ -6. disp ( ’ s i n c e 3 . 7 5 s o d2=0 ’ ) disp ( ’ S e t d1=1 ’ ) Output =(5/2^1) +(5/2^3) .32 Calculating the output voltage // C a l c u l a t i n g t h e o u t p u t v o l t a g e clc . 4 3 7 5 s o d0=0 ’ ) disp ( ’ 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 = 1 0 1 0 ’ ) 98 . 99 . t =400. disp ( e_o .Scilab code Exa 6. v =20.34 to calculate op dc voltage 1 2 3 4 5 6 7 8 9 10 11 // t o c a l c u l a t e o / p dc v o l t a g e clc . R =1*10^3. i = C *100* v /( T ) . e_o = i * R . T = t /4. ’ o u t p u t v o l t a g e (V) ’ ) . C =1*10^ -6. disp (R . ’ R e s o l u t i o n o f t h e m e t e r= ’ ) .2 calculating resolution 1 // c a l c u l a t i n g 2 clc . ’ 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= ’ ) . 11 disp ( R2 . 10 R2 = VR1 * R . resolution 100 .Chapter 7 Display Devices and recorders Scilab code Exa 7. VR =1. disp ( R1 .1 calculating resolution // c a l c u l a t i n g r e s o l u t i o n clc . R =1/10^ N . 1 2 3 4 5 6 7 8 Scilab code Exa 7. N = 4. 9 VR1 =10. R1 = VR * R . ’ 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 1 V= ’ ) . 10.01. R1 = VR * R . 5 disp (R . disp ( 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= ’ ) . disp ( ’ 0 . 6 9 7 on 10V scale ’) Scilab code Exa 7. 6 9 7 3 w i l l be d i s p l a y e d a s 0 .005* R1 .005* R . ’ 0 . disp (V . ’ P e r c e n t a g e e r r o r= ’ ) 101 . disp ( TPE . 6 9 7 3 on 1V s c a l e ’) VR1 =10. disp ( R1 . TPE1 = V1 +0. disp ( PE . 6 disp ( ’ 1 2 . 4 R =1/10^ N . 9 8 0 on 10V s c a l e 7 8 9 10 11 12 13 14 ’) VR =1.01. 9 8 w i l l be d i s p l a y e d a s 1 2 . ’ 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 1 V= ’ ) .3 calculating Total possible error and percentage error 1 2 3 4 5 6 7 8 9 10 11 12 13 // c a l c u l a t i n g T o t a l p o s s i b l e e r r o r and p e r c e n t a g e error clc . 5 p e r c e n t o f t h e r e a d i n g ’ ) TPE = V +0. ’ T o t a l p o s s i b l e e r r o r (V)= ’ ) PE =( TPE1 /0. R =5. disp ( TPE1 . disp ( ’ 0 . V1 =0.3 N = 3. ’ T o t a l p o s s i b l e e r r o r (V)= ’ ) R1 =0. 6 9 7 3 w i l l be d i s p l a y e d a s 0 0 . R2 = VR1 * R . V =0. ’ R e s o l u t i o n o f t h e m e t e r= ’ ) .1) *100. 5 calculating maximum error 1 2 3 4 5 6 7 8 9 10 11 12 13 14 // c a l c u l a t i n g maximum e r r o r clc . LSD =1.00005* R . V =0. R =5*10^6. ’ f r e q u e n c y ( Hz )= ’ ) Scilab code Exa 7. N =034. ’ 0 . disp ( ME . ’ 0 . ME = V +1.6 calculating number of turns and current 1 // c a l c u l a t i n g number o f t u r n s and c u r r e n t 102 . ME = V +1. t =10*10^ -3. ’ Maximum e r r o r ( s e c )= ’ ) Scilab code Exa 7.4 calculating frequency 1 2 3 4 5 6 // c a l c u l a t i n g f r e q u e n c y clc . disp (V . V =0.Scilab code Exa 7. disp ( ME . disp (V . 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 )= ’ ) . 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 )= ’ ) . f=N/t. LSD =1. disp (f .00005* R . ’ Maximum e r r o r ( m i c r o s e c )= ’ ) R =500. B =4* J * K . 103 of the tape . ’B= ’ ) disp ( ’ 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. disp (S . G =( K * th + F ) / i . f =50000. disp (B .8 calculating number density of the tape 1 // c a l c u l a t i n g number d e n s i t y 2 clc . ’ 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. K =16*10^ -3. N = G /( B * l * d ) . D =8*10^ -3. ’ s p e e d (m/ s )= ’ ) Scilab code Exa 7.2*10^ -6. disp (A .7 calculating speed of the tape 1 2 3 4 5 6 // c a l c u l a t i n g s p e e d o f t h e t a p e clc .2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 clc . ’ number o f t u r n s= ’ ) i=F/G. A = D ^2. d =25*10^ -3. disp (i . ’A= ’ ) J =8*10^ -3.5*6. i =10*10^ -3. F =0. l =65*10^ -3.25. S = Lam *10^ -6* f . disp (N . Lam =2. 3 disp ( ’ 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 4 5 6 7 8 9 10 11 12 13 14 15 16 17 clockwise direction ’) Y1 =0. Y2 =5.3 ND =12000/1.5. PA = asind ( Y1 / Y2 ) .5. disp ( PA .9 Calculating possible phase angles 1 2 3 4 5 6 7 // C a l c u l a t i n g p o s s i b l e p h a s e a n g l e s clc . PA = asind ( Y1 / Y2 ) .25.5. Y2 =5. ’ p h a s e a n g l e ( d e g r e e ) ’ ) disp ( ’ 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.5. PA = asind ( Y1 / Y2 ) . Y1 =1. 4 disp ( ND .10 Calculating possible phase angles 1 // C a l c u l a t i n g p o s s i b l e p h a s e a n g l e s 2 clc . 104 . Y2 =5. ’ p h a s e a n g l e ( d e g r e e ) ’ ) Y1 =3. disp ( PA .5. disp ( PA . Y2 =5. disp ( PA . ’ p h a s e a n g l e ( d e g r e e ) ’ ) Y1 =2. ’ p h a s e a n g l e ( d e g r e e ) ’ ) Y1 =2. PA = asind ( Y1 / Y2 ) . ’ Number d e n s i t y ( numbers /mm) ’ ) Scilab code Exa 7. Y2 =2. 18 PA =180 -[ asind ( Y1 / Y2 ) ]. 19 disp ( PA . ’ p h a s e a n g l e ( d e g r e e ) ’ ) 105 . disp (R . disp (R . disp (R . disp ( Tp . ’ Reminder= ’ ) Tp =1. ’ d e s i r e d v a l u e= ’ ) Pb =4.20. disp ( Dd .005. disp ( Ttp .010. Dd =52. ’ t h o u s a n d b l o c k= ’ ) R =R .1 calculate the arrangement of slip gauges 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 // c a l c u l a t e t h e a r r a n g e m e n t o f s l i p g a u g e s clc . ’ H u n d e r t h s b l o c k= ’ ) R =R . ’ Reminder= ’ ) Ttp =2.215. 106 .Pb . disp ( Pb .Tp . ’ Reminder= ’ ) Up =4. ’ P r o t e c t e d b l o c k= ’ ) R = Dd . ’ Reminder= ’ ) Hp =1.Hp .Chapter 8 Metrology Scilab code Exa 8. disp (R . ’ t e n t h s b l o c k= ’ ) R =R .Ttp . disp ( Hp . 1 . disp ( x2 . Ps =200*10^3. ’ x1= ’ ) r =0.r ) /(2* a ) . x1 =(1.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 // c a l c u l a t e t h e s e n s i t i v i t y clc .22 disp ( Up . disp ( x1 .4* Ps / A2 .5. 28 disp (R .5. a =( d2 / d1 ^2) . x2 =(1.6.Up . r =0.8. ’ s e n s i t i v i t y = ’ ) 107 . d2 =0. S = hS * pS * pgS . ’ s o t h e r a n g e i s x (mm) ’ ) hS = %pi * d2 *10^ -3. ’ Reminder= ’ ) 25 Tp =40.5. a =( d2 / d1 ^2) . 26 disp ( Tp . d1 =0. d1 =0. ’ u n i t b l o c k= ’ ) 23 R =R . disp (S .r ) /(2* a ) .x2 .1 . ’ x2= ’ ) x = x1 .5. ’ Tens b l o c k= ’ ) 27 R =R . 24 disp (R .Tp . pgS =25*10^ -3/1000. A2 = %pi * d2 *10^ -6*( x1 + x2 ) /2. pS = -0. ’ Reminder= ’ ) Scilab code Exa 8. d2 =0. disp (x . lem =0. ’ s o t h e r a n g e i s x (mm) ’ ) d = -2* a . disp ( Wx .75.6.1 . ’ x1= ’ ) r =0.Scilab code Exa 8. x2 =(1.4 calculate difference between height of workpieces and pile of slip gauges 1 2 3 4 5 6 // c a l c u l a t e d i f f e r e n c e b e t w e e n 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 clc . ’ 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. Wr =12.644.3 calculate uncertainity in displacement 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 // c a l c u l a t e 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 Pi =70*10^3. Wx = Wr / d . ’ d i f f e r e n c e b e t w e e n 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 ) ’ ) 108 . disp ( x1 .1 . d2 =1. a =( d2 / d1 ^2) . disp ( x2 . x1 =(1.5/ Pi . disp (x . disp (d . ’ x2= ’ ) x = x1 .r ) /(2* a ) .9.x2 . d = N * lem /2.4.r ) /(2* a ) . d1 =0. N =12. r =0. disp ( th . L =50 -10. lem =546*10^ -9. ’ a n g l e o f t i l t ’ ) Scilab code Exa 8. ’ 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 ) ’ ) Scilab code Exa 8. N =5. d =( L * lem ) /(2* x ) .7 Calculate the change in thickness along its length 109 .5 calculate seperation distance between two surfaces and angle of tilt 1 2 3 4 5 6 7 8 9 // c a l c u l a t e 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 and a n g l e o f t i l t clc . disp (d .Scilab code Exa 8.6 Calculate the difference in two diameters 1 2 3 4 5 6 7 // C a l c u l a t e t h e d i f f e r e n c e i n two d i a m e t e r s clc . d =[(2* N -1) * lem *10^6]/4. lem =0. th = atan ( d / x ) . disp (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. x =20/12.6. 5) *0.509. disp ( Tg . Tg =2*(0. d =4.5.1 2 3 4 5 // C a l c u l a t e t h e 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 length clc .5 -2. ’ 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 − meter ) ’ ) 110 . disp ( mfp . mfp =22.1 calculating the length of mean free path 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 // c a l c u l a t i n g t h e l e n g t h o f mean f r e e p a t h clc .7*10^ -6* T / P .7*10^ -6* T / P . mfp =22.7*10^ -6* T / P . ’ 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 one t o r r (m) ’ ) P =133*10^ -3. disp ( mfp . T =273+20. disp ( 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 one a t m o s p h e r i c p r e s s u r e (m) ’ ) P =133. P =101. mfp =22.7*10^ -6* T / P . mfp =22. ’ 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 one i n c h o f w a t e r (m) ’ ) P =133*10^ -6. mfp =22. 111 is is is is .Chapter 9 Pressure Measurements Scilab code Exa 9.7*10^ -6* T / P .3*10^3.1. disp ( 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 one m i c r o m e t e r o f Hg (m) ’ ) P =249. h =200*10^ -6. R =288.56*10^3. ’ P r e s s u r e head (mm o f w a t e r ) ’ ) 112 .81. ’ 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.3 Calculate Pressure head 1 2 3 4 5 6 7 8 9 // C a l c u l a t e P r e s s u r e head clc . Pa = P + P1 .22*10^3. g =9. Ph = P /9.82*996. P =99.df ) *10^3.df ) .81. g =9. dm =0. ’ 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. disp ( Pa . df = P /( R * T ) .18 disp ( mfp . P = g * h *( dm . h =130*10^ -3. P1 = g * h *( dm .2 Calculate Pressure of air source 1 2 3 4 5 6 7 8 9 10 11 12 // C a l c u l a t e P r e s s u r e o f a i r s o u r c e clc . disp ( Ph .81. dm =13. T =273+25. df =1*10^3. P =8*133. d =2.81) . h = hn *(1+( d / D ) ^2) . e =( hn . hn = h /(1+( d / D ) ^2) . dm =13. D =50. g =9.81*( hn . ’ h e i g h t ’ ) Scilab code Exa 9. hn =250.Scilab code Exa 9. h = P /(800*9. d =4. D =25. disp ( eP . disp (h .h ) . ’ 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 2 3 4 5 6 7 // c a l c u l a t e a n g l e t o which t u b e i s i n c l i e n d t o vertical clc . P =133.h ) / h *100.81. 113 . eP =0. d =5.8*1000*9. R =10^ -3.6 calculate error interms of pressure 1 2 3 4 5 6 7 8 9 10 // c a l c u l a t e e r r o r i n t e r m s o f p r e s s u r e clc .4 calculate height 1 2 3 4 5 6 7 // c a l c u l a t e h i g h t clc .56*10^3. 8 D =20; 9 th = asind ( P /( g * dm * R *(1+( d / D ) ^2) ) ) ; 10 thV =90 - th ; 11 disp ( thV , ’ a n g l e t o which t u b e i s i n c l i e n d to v e r t i c a l ( degree ) ’) Scilab code Exa 9.8 calculate angle to which tube is incliend to horizontal 1 2 3 4 5 6 7 8 9 10 // c a l c u l a t e 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 clc ; 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) ) ) ; disp ( 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 2 3 4 5 6 7 8 // c a l c u l a t e Length o f s c a l e a n g l e t o which t u b e i s i n c l i e n d to h o r i z o n t a l clc ; P =500*9.81; g =9.81; d =8; a = ( %pi /4) * d ^2; A =1200; dm =0.8*10^3; 114 9 10 11 12 13 14 hn = P /( g * dm *(1+( a / A ) ) ) ; disp ( 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 ) ]) ) ; disp ( 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 2 3 4 5 6 7 8 9 10 11 // c a l c u l a t e d i a m e t e r o f t h e t u b e clc ; 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; disp (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 1 2 3 4 5 6 7 8 // c a l c u l a t e a m p l i f i c a t i o n r a t i o and p e r c e n t a g e error clc ; AR =1/(0.83 -0.8) ; disp ( 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; 115 9 PR =( a / A ) *100; 10 disp ( PR , ’ p e r c e n t a g e error ’) Scilab code Exa 9.12 calculate value of counter weight required 1 2 3 4 5 6 7 8 9 10 // c a l c u l a t e 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 clc ; 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 ) ) ; disp (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 2 3 4 5 6 7 8 9 10 11 // c a l c u l a t e damping f a c t o r , t i m e c o n s t a n t , e r r o r and t i m e l a g // c a l c u l a t e damping f a c t o r , n a t u r a l f r e q u e n c y , t i m e c o n s t a n t , e r r o r and t i m e l a g clc ; Mp1 =20/40; Mp2 =10/40; Mp3 =5/40; Eta =0.225; disp ( Eta , ’ damping f a c t o r ’ ) Td =1.2; wd =2* %pi / Td ; wn = wd /[(1 - Eta ^2) ^0.5]; 116 14 calculate thickness of diaphram and natural frequency 1 2 3 4 5 6 7 8 9 10 11 // c a l c u l a t e t h i c k n e s s o f diaphram and n a t u r a l frequency clc . disp ( ess51 . ’ n a t u r a l f r e q u e n c y ( Hz ) ’ ) 117 . P =7*10^6. disp (t . ’ new t i m e l a g ( s ) ’ ) .5) ^0. disp ( Eta1 . ’ New n a t u r a l f r e q u e n c y ( r a d / s ) ’ ) tc1 =1/ wn . disp ( Tlag1 . ’ e r r o r f o r 5mm/ s ramp (mm) ’ ) Tlag =2* Eta * tc .5) ^0. ess5 =5* ess . ’ New damping f a c t o r ’ ) Td =1.5. ’ new e r r o r f o r 5mm/ s ramp (mm) ’ ) Tlag1 = Tlag . ’ t i m e l a g ( s ) ’ ) Eta1 = Eta *(0. v =0. R =6.5. ’ t h i c k n e s s o f diaphram (mm) ’ ) ds =7800. fn =[2. E =200*10^9.25*10^ -3. disp ( fn .v ^2) /(16* E ) ]^0.25}*10^3. disp ( tc1 . disp ( wn1 .28. disp ( ess5 . disp ( tc . wn1 = wn *(0. t ={[9* P * R ^4*(1 . ’ t i m e c o n s t a n t ( s ) ’ ) ess =2* Eta / wn .5. ’ New t i m e c o n s t a n t ( s ) ’ ) ess51 = ess5 . Scilab code Exa 9.5* t /( %pi * R ^2) ]*[ E /(3* ds *(1 .12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 tc =1/ wn .v ^2) ) ]^0.2. disp ( Tlag . D = F1 / Ss .15 calculate the natural length of the spring and dispacement 1 2 3 4 5 6 7 8 9 10 11 12 13 // c a l c u l a t e t h e n a t u r a l l e n g t h o f t h e s p r i n g and dispacement clc . P =100*10^3.16 calculate the open circuit voltage 1 2 3 4 5 6 7 8 9 10 11 12 // c a l c u l a t e t h e open c i r c u i t v o l t a g e clc . Sta3 =( Sr . ’ d i s p l a c e m e n t (mm) ’ ) Scilab code Exa 9.5. Cs = F /3. P =200*10^3. Ls = Cs +40. 118 . Ss =3+2*. St =[3* P * R ^2* v /(8* t ^2) ]*{(1/ v +1) -(1/ v +3) *( r / R ) ^2}. disp ( Ls .v * St ) / E . disp (D . Sr =[3* P * R ^2* v /(8* t ^2) ]*{(1/ v +1) -(3/ v +1) *( r / R ) ^2}. r =60*10^ -3. t =1*10^ -3.v * St ) / E . F1 = P1 * A . ’ 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. E =200*10^9. F=P*A. R =70*10^ -3. Sta2 =( Sr . v =0.25. A =1500*10^ -6.Scilab code Exa 9. AolPtP = 2* Aol . disp ( D2 . Gf =1. Sr1 =[3* P * R ^2* v /(8* t ^2) ]*{(1/ v +1) -(3/ v +1) *( r0 / R ) ^2}. ’ 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) ’ ) disp ( ’ 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. disp ( D1 .v * St1 ) / E .Sta2 .13 14 15 16 17 18 19 20 21 r0 =10*10^ -3. disp ( D3 .17 calculate the optimum setting 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 // c a l c u l a t e t h e optimum s e t t i n g clc . eo =( Sta1 + Sta4 .8. ’ 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 1mV/mm (mm) ’ ) disp ( ’ 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. Sta1 =( Sr1 . D1 = AouPtP / Se1 . Aol =100*25*1/100. ei =12. Aou =700*25*1/100. AouPtP = 2* Aou . St1 =[3* P * R ^2* v /(8* t ^2) ]*{(1/ v +1) -(1/ v +3) *( r0 / R ) ^2}.Sta3 ) * Gf * ei /4. Sta4 =( Sr1 . ’ 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) ’ ) 119 . ’ o u t p u t v o l t a g e (V) ’ ) Scilab code Exa 9.v * St1 ) / E . Se1 =1. D3 = AouPtP / Se3 . disp ( eo . D2 = AouPtP / Se2 . disp ( D5 .19 calculate attenuation 1 // c a l c u l a t e 2 clc . attenuation 120 . ’ 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. ei =5. 20 D4 = AouPtP / Se4 . deo = dR * ei /(4* R1 ) disp ( deo .18 calculate the output voltage of bridge 1 2 3 4 5 6 7 8 9 // c a l c u l a t e t h e o u t p u t v o l t a g e o f b r i d g e clc . ’ 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) ’) disp ( ’ 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 ’ ) disp ( ’ 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. dR = R1 * b * dP . b =25*10^ -12. dP =(7000*10^3) -(100*10^3) . 3 T =273+20. ’ 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 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 100mV/mm (mm) ’) disp ( ’ 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. R1 =100. 21 disp ( D4 .18 disp ( ’ 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 ’ ) 19 Se4 =100. D5 = AouPtP / Se5 . f =1000.25*10^ -3. fn = wn /(2* %pi ) . L =0.5. d =1.u ^2) ^2]+[(2* eta * u ) ^2]}^0. R =287. u = f / fn . C =20.5*10^ -3) . mu =19.20 calculate error 1 2 3 4 5 6 7 8 9 10 // c a l c u l a t e e r r o r clc . disp ( %M .At * h ) . h =30*10^ -3.5*10^ -3) ^2]*(12. ’ e r r o r= ’ ) 121 . de = P /( R * T ) .5* %pi * r ) ) ) ^0. e = P2 . V =100*10^ -6.6.5. P2 =( At * h ^2) /( V .1*10^ -6.4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 P =101. wn = C * r *( %pi /( V *( L +0. disp (e . ’ a t t e n u a t i o n= ’ ) Scilab code Exa 9. P1 =( At * h ^2) / V . M =1/{[(1 .P1 . %M = M *100.04* T ^0.3*10^3. At =( %pi * d ^2) *10^ -6/4.5. eta =[2* mu /( de * C * r ^3) ]*[3* L * V / %pi ]^0. V = %pi *[(12.5. r =6.
Copyright © 2024 DOKUMEN.SITE Inc.