EE 4770 Lecture Notes

Generated from file lsli02.dvi.

This page was generated using an imperfect translator. Text may be poorly positioned and mathematics will be barely readable. Illustrations will not show at all. If possible, view the PostScript or PDF versions of these notes.


02-1                                                                                               *
 *          02-1


                          Process State, Sensors, and Interfacing


       Function of sensors:  convert physical quantity to information.


           Information will (usually) be read by computer via an interface.


           Ultimately,  the  information,  in  the  desired  form,  will  be  stored  in  a
               memory location.



       The following steps are typical:


      1:   A transducer converts process state to a raw electrical quantity.


      2:   A conditioning circuit converts the raw electrical quantity into a useful
               electrical quantity.


      3:   An analog-to-digital converter (ADC) converts the useful electrical quan-
               tity to information.


      4:   A  buffer  and  interface  store,  format,  and  present  the  information  to  a
               computer.


      5:   An  interface  routine  reads  the  information,  converts  it  to  the  desired
               form, and stores it in the desired place.



02-1                      EE 4770 Lecture Transparency. Formatted 17:36, 23 January 1998 from lsli0*
 *2.                    02-1

02-2 * * 02-2 Process State and Process Variables The process state is the current condition of the process, down to in- finitesimal detail. The process variable is a part or characterization of a process state, usually in terms of a common measure. For example, consider a coffee maker. Process_state:_____amount of water in carafe, water temperature, chemical description of water in carafe, type of coffee beans, etc. Process_variable:______temperature of water. Process_variable_value:________70 ffiC. Characteristics It is impossible to know the complete process state (because of infinite detail). It is impossible to know the exact value of a process variable. A process variable value, however, can be determined to a high degree of precision. 02-2 EE 4770 Lecture Transparency. Formatted 17:36, 23 January 1998 from lsli0* *2. 02-2
02-3 * * 02-3 Dimensions Basics A process variable's value is usually expressed as the product of a number and a dimension. For example, let process variable T be the temperature of water in a coffee maker carafe. Then a value for T might be 60 ffiC. An equivalent value might be T = 333:15 K. Notation Dimensions will be written in Roman (upright) type. For example, mA , V, and m. Symbols representing values (variables) will be written in italic type: T , x, and R. Thus, 3V V means "three vee volts." 02-3 EE 4770 Lecture Transparency. Formatted 17:36, 23 January 1998 from lsli0* *2. 02-3
02-4 * * 02-4 Algebraic Manipulation of Dimensions In expressions, dimensions are manipulated in the same way as numbers and variables. For example: __3_km____ = 3_km__hr__ = 3_km__hr__ ___Mi____ = 3_ hr : 5 MPH 5 Mi 5 Mi 1:6 km 8 Graphs of Values Axes will be labeled with a symbol divided by a dimension. For example, x= V or R= k. The numbers on the axis are then dimensionless. 02-4 EE 4770 Lecture Transparency. Formatted 17:36, 23 January 1998 from lsli0* *2. 02-4
02-5 * * 02-5 Transducers Transducer: Device which converts a physical quantity from one form to an- other. Usually from: : : : : :a physical quantity which is a process variable to: : : : : :some useful electrical quantity. For example, a transducer might convert temperature to resistance. Transducer Modeling Mapping (function) from process variable to electrical quantity. Symbol Ht denotes the function. Let x be a process variable. Then Ht(x) is the output: : : : : :of the transducer with function Ht. 02-5 EE 4770 Lecture Transparency. Formatted 17:36, 23 January 1998 from lsli0* *2. 02-5
02-6 * * 02-6 Example A variable resistor can be used as a transducer. Consider a variable resistor which consists of a slider which can move over a distance of 15 mm while resistance varies linearly from 0 to 10 k. Process variable: position of slider, x. Mapping: Ht(x) = x 10_k_____15.mm Process variable value approximated from transducer output. Let y = Ht(x) where Ht and x are as above. Quantity y is a resistance. The position x is found by inverting Ht: H1t (y) = y 15_mm____10 k (In this case the process variable is not approximated.) The process of finding the inverse is equivalent to solving for x in the equation y = x 10_k_____15.mm 02-6 EE 4770 Lecture Transparency. Formatted 17:36, 23 January 1998 from lsli0* *2. 02-6
02-7 * * 02-7 Conditioning Circuits Purpose The output of a transducer is a raw electrical quantity. It might have to amplified or otherwise processed. This is done by conditioning circuits. Conditioning circuits might have to do one or more of the following: - Amplify a tiny voltage. - Convert resistance to voltage. - Detect tiny changes in resistance (e.g., 100:1 to 100:2 ). - Add an offset to the transducer output. - Correct for nonlinearities in the transducer function. - Other functions. Notation The symbol Hc will be used for the conditioning circuit's function. An amplifier is a simple conditioning circuit: Hc(v) = Av, where A, the gain, is a dimensionless number. For example, if x is a process variable, then Ht(x) is the transducer output and Hc(Ht(x)) is the conditioning-circuit output. Sensors The combination of transducer and conditioning circuit is referred to as a sensor. 02-7 EE 4770 Lecture Transparency. Formatted 17:36, 23 January 1998 from lsli0* *2. 02-7
02-8 * * 02-8 Analog to Digital Conversion Conditioning-circuit output is usually fed to an ADC. An analog-to-digital converter converts electrical quantities to informa- tion quantities. Input is usually a voltage, output is usually a binary number. Symbol HADC (v) will be used for an ADC function. Standard ADC Function Since most ADCs will convert voltage to integers a standard function will be used.: j v k HADC (h;b)(v) = __h(2b 1) ; where h is a voltage and b is an integer. This ADC would convert voltages in the range 0 to h (inclusive) to a binary number from 0 to 2b 1. For example, HADC (10 V;8)(5 V) = 127 and HADC (17 V;16) (1:3 V) = 5011 . 02-8 EE 4770 Lecture Transparency. Formatted 17:36, 23 January 1998 from lsli0* *2. 02-8
02-9 * * 02-9 Sampling, Buffering, and Interfacing Buffering is the short-term storing information. Two reasons for buffering the value of a process variable: The value of the variable at a particular time is needed. (The value is buffered at that time.) The value of a variable is only valid at certain times. (The value is buffered when it is valid.) The buffer itself can be a simple flip-flop, a register, a RAM, etc. Usually, the contents of the buffer will be read by a computer through an interface. The interface presents the buffered data to the computer in some stan- dard form. The computer is running some RT program. The RT program has one or more interface routines. The interface could tell the RT program that data is available by making an interrupt request. : : :or: : : An interface routine could read the buffer without being alerted by an external signal. For example, it might read the buffer every millisecond. Sampling is the process of reading a process variable at regular intervals. 02-9 EE 4770 Lecture Transparency. Formatted 17:36, 23 January 1998 from lsli0* *2. 02-9
02-10 * * 02-10 Interface Routine Here we will consider the ultimate destination of a process-variable value to be a memory location. The following is done to transfer a value from the interface to the memory location: 1: The interface routine makes a system call to read the interface. raw=readInterface(); 2: The interface routine, or some other code, applies a function, Hf to the value read. 3: The result is written into the memory location. theMemoryLocation=HsubF(raw); The function Hf puts the value into the final form. It may perform one or more of the following operations: - Convert the raw value to a floating-point quantity. (ADC output is usually an integer.) - Correct for any nonlinearities in the transducer or conversion circuit. - Convert the quantity to the desired dimensions. (E.g., meters, mi- crons.) In terms of the process variable, the final value written is: Hf(HADC (Hc(Ht(x)))) Once written, the value is read by the parts of the RT system that figure out what's going on. 02-10 EE 4770 Lecture Transparency. Formatted 17:36, 23 January 1998 from lsli* *02. 02-10
02-11 * * 02-11 The Conditioning Problem Archetypical Problem: Design a system to write variable procVar with H (x), the value of : : :in : : :, where process variable x is : : :, x can take values in the range [xmin ; xmax ] and where H (x) = . Example Problem: Design a system to write variable waterLevel with H (x), an integer giving the water level in meters, where process variable x is the water level in room 2161 CEBA, x can take on values in the range 5x [0 m; 1 m] and where H (x) = ____. m Solution Overview 1: Choose a transducer. A variable resistor connected to a float with cables. 2: Choose an ADC. Suppose an ADC with function HADC (5 V;8) is available. 3: Design a conversion circuit. This will convert resistance to voltage. 4: Design the buffer and interface. Details for this part will be skipped here. 5: Write the function for computing the final value. Easy, but tedious. 02-11 EE 4770 Lecture Transparency. Formatted 17:36, 23 January 1998 from lsli* *02. 02-11
02-12 * * 02-12 Example Problem Selection of The Transducer Use potentiometer: Construction: shaft that can rotate 6 radians. Three leads. Resistance between center and lower lead, __100 k, 6 where 2 [0; 6] is the shaft angle. Resistance between center and upper lead, 100 k __100 k. 6 Transfer function for center and lower lead, Hvr () = __100 k. 6 Use of Potentiometer Floats, guides, and cables will convert water level to shaft rotation. 6 These constructed so that = x _____. 1m Ht(x) = _x__m100 k. 02-12 EE 4770 Lecture Transparency. Formatted 17:36, 23 January 1998 from lsli* *02. 02-12
02-13 * * 02-13 The Conversion Circuit The output of the conversion circuit will be: Hc(Ht(x)) = Hc( x___m100 k): For correct operation, the input to the ADC must be in the range of 0 to 5 V. A variety of conversion circuits could be used. The simplest is a linear conversion from resistance to voltage. Hc(R) = ____R____1005kV. Hc(Ht(x)) = (x=_m)___100_k____1005kV. Hc(Ht(x)) = (x= m) 5 V. 02-13 EE 4770 Lecture Transparency. Formatted 17:36, 23 January 1998 from lsli* *02. 02-13
02-14 * * 02-14 ADC, Buffering, and Final Processing The ADC function is fixed at j v k j v k HADC (5 V;8)(v) = _____5(V28 1) = _____52V55 : j k HADC (5 V;8)(Hc(Ht(x))) = (x=_m)___5_V__52V55 = _x__m255 : The ADC output is clocked into a buffer and then transfered to the computer through an interface. Details of these parts will be covered later in the semester. 02-14 EE 4770 Lecture Transparency. Formatted 17:36, 23 January 1998 from lsli* *02. 02-14
02-15 * * 02-15 Finally, the interface routine converts the raw form into the desired 5x form: H (x) = ____. m Hf(HADC (5 V;8)(Hc(Ht(x)))) = H(x) Hf(b(x= m) 255c) = H(x) Define y = g(x) = b(x= m) 255c. Then x = g1 (y) ss y _m___255for x 2 [0 m; 1 m]. Then Hf(g(x)) = H(x) Hf(y) = H(g1 (y)) = H(y _m___255) = _5__my _m___255 = _y__51: The code fragment in the RT program is then: int raw; double waterLevel; raw=readInterface(); waterLevel=raw/51.0; : : :and we're done! 02-15 EE 4770 Lecture Transparency. Formatted 17:36, 23 January 1998 from lsli* *02. 02-15

ECE Home Page 4770 Home Page Up
David M. Koppelman - koppel@ee.lsu.edu
Modified 23 Jan 1998 17:40 (23:40 UTC)