Title of Invention: Apparatus and methods for controlling sensor signal hysteresis
Abstract: Apparatus for producing an output signal responsive to a sensor signal having a unit for setting desired hysteresis values and desired reference values of the sensor signal, aunit for detecting whether the sensor signal has a positive or negative slope with respect to time, a unit for triggering one logical signal when the sensor signal has a positive slope and also exceeds one reference value minus a first hysteresis value, and a unit for triggering another logical signal when the sensor signal has a negative slope and also falls below the sum of a second reference value and a second hysteresis value. The apparatus and method may have more than two reference values and/or more than two hysteresis values simultaneously. The apparatus may be implemented by an embedded microcomputer of conventional type, programmed to perform the signal-processing disclosed. The steps of the process and initial values of the reference values and hysteresis values may be stored in a read-only memory. The method for controlling an output signal responsive to a sensor signal includes steps of setting first and second hysteresis values, setting first and second reference values of the sensor signal, detecting whether the sensor signal has a positive or negative slope with respect to time, triggering a first logical signal when the sensor signal has a positive slope and also exceeds the first reference value minus the first hysteresis value, and triggering a second logical signal when the sensor signal has a negative slope and also falls below the sum of the second reference value and the second hysteresis value. Both reference values and hysteresis values are preferably made programmable by a user. When more than two reference values and/or more than two hysteresis values are used simultaneously, each of those values is programmable.
Detailed Description: Part PAC: DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
Part PAL: Copyrighted materials
Part PAR: A portion of the disclosure of this patent document contains material that is subject to copyright protection. The copyright owner has no objection to the facsimile reproduction by anyone of the patent disclosure, as it appears in the U.S. Patent and Trademark Office files or records, but otherwise reserves all copyright rights whatsoever.
Part PAR_2: FIGS. 1-4 illustrate various possible sensor-signal situations that can occur in practice. FIG. 1 shows an analog signal 10 susceptible to processing by apparatus made in accordance with the invention, and an output signal 20 provided by apparatus made in accordance with the invention. The dotted horizontal lines 30, 40, 50, 60, 70, and 80 in FIG. 1 are explained hereinbelow. The portion of analog signal 10 marked with a circle 90 would cause a false output signal in the absence of hysteresis control. FIG. 2 shows an analog signal 100 for a typical bar code with negligible variation in background signal and good signal-to-noise ratio, and an output signal 110 derived from analog signal 100 by detecting the sensor signal's crossings of threshold voltage 120, set between the low voltage 130 and the high voltage 140 of sensor analog signal 100. Such a signal is relatively easy to decode. To obtain a decodable signal, the apparatus determines the range between low level 130 and high level 140, and sets the threshold level 120 within that range between them (e.g. midway between 130 and 140). FIG. 3 shows an analog sensor signal 150 for a typical bar code with negligible variation in background signal, but poor signal-to-noise ratio. Analog signal 150 varies between a low level (160) and a high level (170). If the same approach were taken as was used for FIG. 2, a threshold level 180 would be set between 160 and 170. However, there are potential problem areas of signal 150 (circled at 190 and 200), where the signal crosses threshold level 180 due to noise fluctuations, which would cause false triggering of the output signal at 190 and 200. Control signal 210 in FIG. 3 is derived from analog signal 150 using hysteresis control, in which low hysteresis level 220 and high hysteresis level 230 shown in FIG. 3 are set by a predetermined ratio based on the difference between low signal level 160 and high signal level 170. Transitions of output signal 210 are triggered by high hysteresis level 230 when signal 150 is rising (positive slope) and by by low hysteresis level 220 when signal 150 is falling (negative slope). If background compensation is also required, the hysteresis levels can be adjusted with time, as determined by keeping track of a running average of low value 160 and a running average of high value 170. FIG. 4 shows an analog sensor signal 240 for a bar code with non-negligible variation in background signal and good signal-to-noise ratio. Output signal 250 in FIG. 4 is determined in the same manner as in FIG. 3, using analog signal low level 260, high level 270, nominal threshold 265, low hysteresis level 280 and high hysteresis level 290. If the background variation is as shown in FIG. 4, some states cannot be decoded. In order to get consistent decoding, the background must vary slowly in comparison to the bar and space frequencies, and/or the bar and space signal amplitude must exceed the background variation amplitude.
Part PAR_3: Returning to FIG. 1, the levels marked with horizontal dotted lines are identified as follows: a low hysteresis level 30 and high hysteresis level 50 are set about CAL-LO reference level 40; a low hysteresis level 60 and high hysteresis level 80 are set about CAL-HI reference level 70. Output signal 20 is triggered when sensor signal 10 crosses high hysteresis level 50 while rising, when sensor signal 10 crosses high hysteresis level 80 while rising, when sensor signal crosses low hysteresis level 60 while falling, and when sensor signal 10 crosses low hysteresis level 30 while falling.
Part PAR_4: The preferred embodiments of the invention will be described first in terms of the methods used in the invention, and then in terms of the apparatus implementing those methods. The overall method of the invention for controlling hysteresis of an output signal responsive to a sensor signal involves both hysteresis values and reference values of the sensor signal.
Part PAR_5: Multiple reference values (e.g. more than two) and multiple hysteresis values may be used and can be very useful for some applications. For example, a single bar code may have two or more different backgrounds of different color or reflectivity. Particular instances of this problem occur when a bar code is printed over a multicolored background, or when an accidental smudge darkens the background of a portion of a bar code, while having a negligible effect on the printed bars themselves. In some methods and apparatus of the prior art, providing multiple reference values and/or multiple hysteresis values would require adding hardware, such as an additional hardware comparator for each added threshold value. As will be clear from the following description, adding additional reference values and/or hysteresis values can be accomplished in the present invention by programming, without added hardware. The additional reference values and/or hysteresis values may be made simultaneously effective, since the sensor signal is converted to digital form, and multiple simultaneous comparisons can be made without introducing significant delays. For clarity and simplicity of exposition, the following description is expressed in terms of only two reference values and two hysteresis values.
Part PAR_6: The overall method of the invention for controlling hysteresis of an output signal responsive to a sensor signal is shown in FIG. 5. Steps of the process are denoted by references S1, S2, . . . , S6. The method includes the steps of setting desired hysteresis values (S1), setting desired reference values of the sensor signal (S2), detecting whether the sensor signal has a positive or negative time slope (S3), triggering a certain logical signal (S4) when the sensor signal has a positive slope and also exceeds a predetermined reference value minus a first hysteresis value, and triggering another logical signal (S5) when the sensor signal has a negative slope and also falls below the sum of a second predetermined reference value and a second hysteresis value. An output signal is gated (S6) according to a predetermined logical combination of the two logical signals. Computer instructions (source code) to implement a specific simple example of the method on a digital microprocessor type of computer is listed in the Appendix below. The example shown in the Appendix is expressed in instructions for a Motorola MC68HC7 microprocessor. The first and second reference values of the sensor signal may be chosen to be equal. Similarly, the hysteresis values may be the same or may be different from each other, depending on the application. The example shown in the Appendix uses a single hysteresis value (R.sub.-- HVAL). Those skilled in the art will be able, without substantial experimentation, to express methods equivalent to that shown in the Appendix by using other instruction sets for similar microprocessors, or by using higher level languages, and/or using other known computer processors.
Part PAR_7: FIG. 6 shows apparatus made in accordance with the invention for implementing the method of FIG. 5. In general the system (generally denoted by reference numeral 300) for automatically controlling hysteresis of a sensor signal in accordance with the invention has means 310 for setting desired predetermined hysteresis values, means 320 for setting desired predetermined reference values of the sensor signal, means 330 for detecting whether the sensor signal has a positive or negative slope with respect to time, means 340 for triggering a logical signal when the sensor signal has a positive slope and also exceeds one predetermined reference value minus a first hysteresis value, and means 350 for triggering another logical signal when the sensor signal has a negative slope and also falls below the sum of a second predetermined reference value and a second hysteresis value. The system has a memory 400, and portions (410, 420) of the memory are used for storing digital representations of the desired hysteresis values, while other portions (430, 440) of the memory are used for storing digital representations of the desired w reference values. The system preferably includes a user-programmable microprocessor 500 for modifying the digital representations of the desired reference values and the desired hysteresis values, and for performing the comparisons and logical decisions outlined above in the description of the methods of the invention. As is known in the art, the microprocessor 500 may be pre-programmed for a particular sensor application, and the program of microprocessor instructions, along with the initial parameter values or "constants" such as reference values and hysteresis values, may be stored in a read-only memory 510 or in a portion 450 of memory 400. In this type of application, the microprocessor is commonly referred to as an "embedded controller." System 300 may also include conventional inputs and outputs, such as a keyboard, display, etc. (not shown), and other conventional features as required by the application.
Part PAR_8: FIG. 7 shows a flow chart illustrating a particular simplified method performed in accordance with the invention. The sequence of operations depicted in FIG. 7 is suitable for sensor signal situations similar to that shown in FIG. 2.
Part PAR_9: The invention will be further clarified by considering the following example, which is intended to be purely exemplary of the use of the invention. Hysteresis control using the methods and apparatus of the present invention may be usefully employed in an authentication system such as any of the systems described in U.S. Pat. Nos. 5,418,855, 5,548,106, and 5,574,790 to Liang et al., all assigned to the same assignee as the present invention. The entire disclosure of each of these patents is incorporated herein by reference. In one embodiment in U.S. Pat. No. 5,418,855, for example, the primary sensor is a photodetector such as a PIN photodiode, whose analog output is amplified, filtered, and synchronously detected, using a lock-in amplifier, amplified by a buffer amplifier, and fed to an analog-to-digital converter (ADC). The digital signal may be processed by the methods and apparatus disclosed herein to produce output signals responsive to the sensor analog signal. The ADC may have an output of eight bits, for example, or any number of bits depending on the desired resolution. If one bit of resolution of an eight bit ADC is 20 mV, for example, and the hysteresis limits in millivolts are set at 0 mV, 40 mV, 80 mV, and 160 mV, then the hysteresis limits correspond to 0, 2, 4, and 8 bits of ADC resolution. The output signals can include logical signals indicating reliably whether the current analog sensor signal is within a desired or acceptable range bounded by low and high calibration limits of the authentication apparatus, and whether the hysteresis is within acceptable limits. Logical signals provided by the apparatus may be used to operate relays that control other apparatus, and/or the logical signals may be used to control indicators such a light-emitting diodes (LEDs) to indicate to a user the outcome of the signal-processing. As is known in the art, control relays may be electromagnetic relays, solid-state relays, or any conventional type of actuator, and these may be electrically isolated from the apparatus of the invention by the use of transformers, capacitors, optical couplers, or the like, as appropriate to the particular application.
Part PAR_10: From the foregoing description of particular embodiments, one skilled in the art can easily ascertain the essential characteristics of this invention, and without departing from the spirit and scope thereof, can make various changes and modifications of the invention to adapt it to various usages and conditions. Other embodiments of the invention will be apparent to those skilled in the art from a consideration of this specification or from practice of the invention disclosed herein. For example, the apparatus and methods may be adapted to provide improved reading of one- or two-dimensional bar codes, matrix codes, OCR-readable characters, or other indicia having backgrounds of non-uniform or varying illumination, color, transparency, refractive index, fluorescence, or reflectivity. It is intended that the specification and examples be considered as exemplary only, with the true scope and spirit of the invention being defined by the appended claims and their legal equivalents.
Part TBL: __________________________________________________________________________ APPENDIX TO THE SPECIFICATION __________________________________________________________________________ ************************************************************************** ******* LDA CUR.sub.-- READ ; Get current sensor reading LSRA ; Make positive divided by 2 (relaxes tolerance) BEQ L10 ; Exactly 0 * ; tolerance and simplifies math SUB LOW.sub.-- CAL ; Subtract LOW.sub.-- CAL BPL L20 ; Reading above lower limit * Reading is at or below LOW.sub.-- CAL * L10 EQU * LDA LAST.sub.-- RD ; See what the last state was BEQ L15 ; If zero then reading was not within range * ; so no need to check for hysteresis * ; otherwise something was read and in range so LDA CUR.sub.-- READ ; Get current sensor reading again LSRA ; Make positive divided by 2 ADD R.sub.-- HVAL ; Add in hysteresis now SUB LOW.sub.-- CAL ; Subtract LOW.sub.-- CAL again BPL L30 ; Reading is within hysteresis limit * ; BR = Indicate the reading is within range ; else, the reading went below the threshold L15 EQU * LDA #$FF ; Set condition for below CAL-LOW JMP LIM.sub.-- EXIT ; Return * * Test for reading above the high calibration level * L20 EQU * LDA CUR.sub.-- READ ; Get current sensor reading LSRA ; Make positive and divide by 2 SUB HIGH.sub.-- CAL ; Subtract HIGH.sub.-- CAL BLS L30 ; BR if reading is at or below high range * * Reading is above the high range * LDA LAST.sub.-- RD ; See what the last state was BEQ L25 ; If zero then the reading was not in range * ; previously -- no need to test for hysteresis LDA CUR.sub.-- READ ; Get current sensor reading again LSRA ; Make positive divided by 2 SUB R.sub.-- HVAL ; Subtract hysteresis and SUB HIGH.sub.-- CAL ; subtract HIGH.sub.-- CAL BLS L30 ; BR if reading is at or below high range * L25 EQU * LDA #$FF ; Set condition for out of range JMP LIM.sub.-- EXIT ; Return L30 EQU * * * Reading is within range * CLRA ; Set condition for good read * LIM.sub.-- EXIT EQU * RTS ; Return ************************************************************************** ******* __________________________________________________________________________


{'bibliographic_information': "{'Patent Number': '059230240', 'Series Code': '8', 'Application Number': '9389261', 'Application Type': '1', 'Art unit': '286', 'Application Filing Date': '19971002', 'Title of Invention': 'Apparatus and methods for controlling sensor signal hysteresis', 'Issue Date': '19990713', 'Number of Claims': '27', 'Exemplary Claim Number(s)': '1', 'Primary Examiner': 'Le; Thien Minh', 'Number of Drawing Sheets': '6', 'Number of figures': '7'}", 'source_file': './grant/1999/pftaps19990713_wk28.txt', 'source_data': 'USPTO-Grant'}