# Patent

## Title
Noise-driven recovery of a digital pulse stream

## Abstract

Provided is a method and system for noise-driven recovery of a digital pulse stream. The method includes receiving initial parameters including the base characteristics of a pulse signal, the characteristics including the minimum pulse interval. An incoming analog signal is converted to a digital signal and sampled a predetermined number of times at intervals less than the minimum pulse interval to record a set of minimum signal values. The incoming signal is also sampled a predetermined number of times at intervals less than the minimum pulse interval to record a set of maximum signal values. At least the first greatest value from the set of maximum signal values is discarded. Each set is averaged to provide an average minimum value and an average maximum value. Based on these values at least one threshold value is then determined, and the digital pulse stream is identified based on the threshold values. The method is repetitive, continually re-determining the threshold values so as to adapt to changes in the incoming signal. A system for performing the method is also provided.

## Background
FIELD
This invention relates generally to the field of digital signal reception, and more specifically to noise-driven recovery of a digital pulse stream.
BACKGROUND
There has been a long-standing need for the capability of transmitting information rapidly and coherently from one location to another. Typically, the transmission of such information is performed either by way of a radio broadcast signal or by providing a signal through a conduit such as a wire.
Initially, signal transmission and reception was performed entirely with analog equipment. For example, a carrier radio signal of a specific frequency can be used to transmit voice, music and video signal information by amplitude and/or frequency modulation. By tuning to the specific frequency with a receiver, an interested party can receive the information.
Although effective, analog signals can and do suffer from a number of technical shortcomings. It is becoming increasingly more common to transform traditional analog information into digital form prior to or commensurate with transmission. Represented as a series of data bits such as logical “0” and “1” it is possible to achieve both high fidelity and perfect reproduction, depending of course on the choice of sampling rate.
Transmission of information in digital form is easily accomplished through the use of pulses. By adopting a convention, the presence of a pulse may be taken to be a logical “1”, the absence of the pulse being a logical “0”. Although the radio wave carrying the signal may be a traditional analog carrier wave, it is the pulse modulation in the wave that is being sent and received which corresponds to the digital information.
In an ideal setting with minimal noise, a comparator with a fixed threshold could be used to determine the presence and absence of each pulse in a detected signal. However, the real world is often far from ideal. Typically, an automatic gain control (ACG) device is used in connection with an RF receiver to collect the pulse signal. The AGC measures the signal energy in the receiver's passband, and adjusts the gain (within the constraints of an RC time constant) to normalize it to the receiver's output voltage range. In the case of an amplitude-modulated pulse signal, if the pulse signal is the dominant signal in the passband, the gain of the AGC will change with the pulse amplitude, keeping the amplitude of the detected pulses normalized to the receiver's output voltage range.
Unfortunately, the noise component in the signal comes from other sources and tends to remain constant as pulse amplitudes change. Since the noise amplitude is also altered by the AGC gain change, the effect is to change the output signal-to-noise ratio (S/N). This moves the ideal conversion threshold to various positions in the output voltage range, making a fixed conversion threshold impractical. Even worse, if no pulse signal is present, or if it fades away, noise becomes the dominant signal and the AGC will increase the gain until full-amplitude noise is produced. This condition can overload back-end processing with false pulses. Additionally, co-channel interference can appear as noise in the output, also making the S/N ratio variable. All of these phenomena can frustrate the recovery of patterns/information from the pulses in the received signal.
One partial solution to the afore mentioned problems has been to provide an intermediate step designed to separate the pulse signal from the noise. This step is performed as an analog process, typically using a low pass filter/rectifier that is intended to filter out the pulses and return an integrated form of the noise, i.e. an integrated voltage level. This integrated voltage level is offset and used as a threshold by an analog comparator that compares the integrated output with the original signal to provide a digital pulse stream. Although such a process does work, there are several significant drawbacks.
For example, situations exist where the presence or absence of a signal may not be known a priori at a specific frequency. In these cases, noise-only signals may be input to the processing system. Subsequent processing of noise-only signals can and will result in false detections and can flood back-end signal processing circuitry with erroneous information.
Further, if the strength of the desired signal varies, the ability of the analog system to adjust is not very robust. The signal may be lost intermittently and not recognized for processing, or once again erroneous noise may flood the system.
Hence, there is a need for a method of noise-driven recovery of a digital pulse stream that overcomes one or more of the technical problems as stated above.
SUMMARY
This invention provides a method and system for noise-driven recovery of a digital pulse stream.
In particular, and by way of example only, according to one embodiment of the present invention, provided is a method for noise-driven recovery of a digital pulse stream. This method includes receiving initial digital pulse stream parameters including the base characteristics of a pulse signal. These characteristics include at least the minimum pulse interval. The signal is sampled a predetermined number of times at intervals smaller than the minimum pulse interval to record a set of minimum signal values and a set of maximum signal values. The recorded set of minimum values is averaged to provide an average minimum value. From the set of maximum values, at least the first highest maximum value is discarded from the set of maximum signal values and the remaining maximum values are averaged to provide an average maximum value. At least one threshold value is established for a signal pulse based on the minimum and maximum average values, and the digital pulse stream is identified based on the threshold values.
In yet another embodiment, provided is a system for noise-driven recovery of a digital pulse stream, including: an analog to digital converter for converting an incoming analog signal to a digital signal; an envelope detector for detecting a maximum signal value and a minimum signal value of the digital signal in a sample cycle; a digital threshold comparator for comparing the digital signal to at least one adaptively determined threshold value; a microcontroller coupled to the envelope detector to receive the detected maximum. signal value and minimum signal value from the envelope detector, the microcontroller operable to control a window timer structured and arranged to initiate a new sample cycle, the microcontroller coupled to the threshold comparator and operable to provide the threshold comparator with the at least one adaptively determined threshold value for the detection of a digital pulse stream based on the threshold value, the adaptively determined threshold value determined from the maximum and minimum signal values as detected in a predetermined number of cycle windows.



BRIEF DESCRIPTION OF THE DRAWINGS
FIG. 1 is a conceptual rendering of a pulse signal on a noise signal;
FIG. 2 is a conceptual rendering of the combined pulse and noise signals as shown in FIG. 1;
FIG. 3 is a block diagram of a system for performing noise-driven recovery of a digital pulse stream in accordance with at least one embodiment;
FIG. 4 is a flow diagram of a method of noise-driven recovery of the digital pulse stream shown in FIGS. 1 and 2 in accordance with at least one embodiment;
FIG. 5 is a flow diagram further detailing the determination of threshold values as introduced in the flow diagram of FIG. 4; and
FIG. 6 is a flow diagram of the method of signal detection based on the threshold values provided by the method in FIG. 4.



DETAILED DESCRIPTION
Before proceeding with the detailed description, it is to be appreciated that the present teaching is by way of example only, not by limitation. The concepts herein are not limited to use or application with a specific method of recovery of a digital pulse stream. Thus, although the instrumentalities described herein are for the convenience of explanation, shown and described with respect to exemplary embodiments, it will be appreciated that the principles herein may be applied equally in other types of methods involving noise-driven recovery of a digital pulse stream.
FIG. 1. conceptually illustrates a digital pulse stream, also referred to as a pulse signal 100 intermixed with background noise 102. The pulse signal 100 is characterized by stream of digital pulses illustrated as pulse peaks 104. The background noise 102 may be other signals meaningful to other parties, white noise provided by source or sources unknown, or combinations thereof. For the purposes of the disclosed method, the identification of the noise 102 is key to the identification of the pulse signal 100. For purposes of simplicity, background noise 102 is represented as noise signal 102A and 102B. Further, pulse signal 100 is illustrated as having a uniform and repeating pattern for ease of illustration.
As indicated, the noise 102 occupies an envelope 106 having a minimum value Nmin and a maximum value Nmax. The lower edge of the envelope of the pulse signal 100 is generally in the middle of the noise 102, with each pulse peak 104 noticeably above the Nmax value of the noise envelope. As shown, the pulse signal 100 is characterized by a series of pulses that rise above the Nmax value.
It is of course understood and appreciated that the pulse signal 100 and the noise 102 combine as a single signal; however, they are illustrated as separate elements in FIG. 1 for ease of discussion and illustration. FIG. 2 is a conceptual illustration of such a combined signal 200 superimposed for comparison. The combined signal 200 has an envelope 202 having a minimum value Smin and a maximum value Smax.
FIG. 3 is a block diagram of a system 300 for performing noise-driven recovery of a digital pulse stream in accordance with at least one embodiment. As shown, there is an analog to digital (A/D) converter 302, an envelope detector 304 having a maximum detector 306 and a minimum detector 308, a microcontroller 310, a window timer 312, and a threshold comparator 314. In at least one embodiment, an input selector 316 is also provided.
Moreover, in at least one embodiment, the incoming signal 200 (consisting of the pulse signal 100 and noise 102, see FIG. 2) is processed by AID converter 302. The digital output signal is then evaluated by the envelope detector 304. Having a maximum value detector 306 and a minimum value detector 308, the envelope detector 304 reports the maximum Smax and minimum Smin values to the microcontroller 310. Through a method further described below, the microcontroller 310 controls window timer 312 and provides rising threshold and falling threshold values to threshold comparator 314. The threshold comparator 314 is designed to accommodate hysteresis, usually with a value similar to the noise envelope. The hysteresis of the rising threshold and falling threshold help the threshold comparator 314 avoid oscillation, such as may be caused by noise when the pulse signal passes the vicinity of the threshold.
In at least one embodiment, the threshold comparator 314 is a Pulse Event Processor (PEP) utilizing two separate Analog-to-TTL (Transistor Transistor Logic) converter functions or ATCs. The input voltage range is between 0 and +5 VDC, and the input impedance is 91±5% ohms Each ATC utilizes an 8-bit flash A/D converter to digitize the analog inputs. Either a 4.0 or an 8.0 MHZ clock can be used to provide the two A/D converters, and in at least one embodiment, a 4.0 MHz clock is used.
With respect to the input voltage range, initially five volts correspond to a data value of two hundred fifty five (255) and zero volts correspond to a data value of zero (0). For the purposes of pulse signal detection, by general convention the presence of a pulse indicates a logical one (1) whereas the absence of a pulse indicates a logical zero (0). An alternative convention may also be adopted.
In at least one embodiment, an input selector 316 is also provided immediately in line following the A/D converter 302. Coupled to the microcontroller 310, the input selector 316 permits self diagnostics with a test signal input as provided by the microcontroller 310. Various microcontroller devices and signal envelope detector devices are known and recognized by those skilled in the art of signal processing. The precise choice of components is a matter of design preference as they are known and commonly available.
As will now be discussed with the aid of the flow diagram in FIG. 4, the method for noise-driven recovery of a digital pulse stream is an advantageously dynamic process continually updating the threshold values utilized to indicate the presence or absence of a signal pulse. In at least one embodiment, the method as described in FIG. 4 is implemented using a system 300 as described with respect to FIG. 3.
FIG. 4 presents a flow diagram that, in connection with FIGS. 1 and 2 presents a method for noise-driven recovery of a digital pulse stream in accordance with at least one embodiment. It will be appreciated that the described method need not be performed in the order herein described, but that this description is merely exemplary of at least one preferred method of noise-driven recovery of a digital pulse stream.
As shown in FIG. 4, the method typically commences with the system receiving initial parameters including the base characteristics of the pulse signal, shown in block 400. These initial parameters include the minimum pulse interval, such as, for example ten milliseconds. As is further described below, the initial parameters may also include user supplied data corresponding to: a rising scaling factor (SFr); a falling scaling factor (SFf); a Clamp value, a Clip value and a predetermined number to establish a set of sampled signal values. In at least one embodiment, the Clamp and Clip values are voltage values. As is further described below, the Clamp value is a voltage value that serves as a temporary substitute value when the incoming signal in digital form has a low value. Similarly, the Clip value is a voltage value that serves as a temporary substitute value when the incoming signal in digital form has a high value.
Referring back to FIG. 1, a cycle window interval, as illustrated by two sample windows 130 and 132, is established so as to minimize the probability of capturing a pulse 104. Moreover, the cycle window interval is established so as to have a high probability of measuring the noise 102. Specifically, the cycle window is established to be equal to or less than the minimum pulse interval, shown in block 402. In at least one embodiment, the cycle window is set to be one eighth of the minimum pulse interval. In at least one embodiment, the duration of the pulse is also supplied as an initial parameter. In such embodiments, the cycle window is established to be not less than the duration of the pulse.
With respect to FIGS. 1 and 2, the maximum pulse interval is shown as spacing 120. A cycle window is represented as interval 130, intervals 130A ̃130H providing the eight cycles to establish a preferred set. It is understood and appreciated that the cycle intervals could be substantially greater than the maximum pulse interval, such as a multiple of a factor of two or greater. An advantage of the signal-driven recovery method is that it is adaptive to changes in both the noise 102 and pulse signal 100. When the cycle window 130 is set with excessively large periods, the adaptive nature of the method may be hampered. As such, in at least one embodiment the cycle window is established to be no shorter than one maximum pulse interval 120, and not equal to or greater than two maximum pulse intervals 120.
Due to the probability of capturing a pulse signal, it is an advantageous property of at least one embodiment of the noise driven recovery of the digital signal pulse to sample a predetermined number of cycles and discard at least the highest set of recorded values as further described below. In at least one embodiment, the predetermined number of cycles to establish a set of sampled signal values is ten.
As indicated in block 404 of FIG. 4, sampling of the signal now commences. Initially, the cycle count is set to n=1. For each instance of a cycle n, the minimum and maximum voltages of the signal 200 are recorded as Vmin and Vmax respectively, shown in blocks 408, 410 as driven by the evaluation of the cycle window, shown as decision 412. The ATCs as introduced above are used to measure the Vmin and Vmax of the input signal 200 during each cycle.
Upon elapse of the cycle window, the cycle count n is incremented by one, shown in block 414. The cycle count is then evaluated, shown in decision 416, to see if the predetermined number of set values have been collected. As stated above, in at least one embodiment, the preferred number of cycles is ten. However, as pulse signals are only recognized in Vmax values, it is actually not necessary to obtain ten Vmin values. Therefore, in at least one embodiment, after n exceeds a value of eight, as evaluated in decision 416, the collection of Vmin values is halted with the collection of Vmax values continuing until n exceeds a value of ten, as evaluated in decision 416.
With respect to FIGS. 1 and 2 it is appreciated that intervals 130A ̃130H and 130J occur during periods of noise, and only 1301 captures a pulse. Similarly, 132A, 132C ̃132G and 132I ̃132J occur during periods of noise with 132B and 132H each capturing a pulse. As a result, the majority of recorded values in the record set of Vmax for either set of intervals are representative of the maximum value of noise. A record of the set of Vmin values and the set of Vmax values is maintained in a queue or database for each threshold update cycle. Upon commencing a new threshold update, the previously recorded set values are replaced by the new values.
With a set of Vmax and Vmin values now established, the threshold values for the signal detection are now established, as indicated in block 420. The process then cycles again to reset the cycle count to n=1 as shown in block 406. More specifically, the noise-driven signal recovery of a digital pulse stream is an adaptive process continually re-determining the threshold values so as to determine the presence of the digital pulse despite changes in the incoming signal 200. As the cycle windows for the samples are of short duration, and as shown in FIGS. 1 and 2 nearly an entire cycle set may occur within the minimum pulse interval 120, changes in the incoming signal 200 will be rapidly detected and accounted for in establishing threshold values.
The process of establishing threshold values indicated by block 420 are further illustrated in the flow diagram of FIG. 5. An average of the minimum recorded values, Vminavg, is determined as shown in block 500. As stated above, the noise-driven recovery of the digital pulse stream advantageously accounts for the possibility of a pulse signal being sampled during a cycle window. To achieve this, in at least one embodiment the first highest maximum value is identified and discarded from the set of maximum signal values, with the remaining values being averaged to provide Vmaxavg.
In an alternative preferred embodiment, the first and second highest maximum values are identified from the set of Vmax values, and then discarded, shown in block 502. Where the number of Vmax samples collected is ten, as described above, this leaves a set of eight, with a low probability that any pulse signals remain among the Vmax values of the set. These remaining Vmax values are then averaged to provide Vmaxavg, as shown in block 504.
The average of the noise envelope is then calculated as Venvavg=(Vmaxavg +Vminavg)/2, as shown in block 506. With the midpoint of the noise envelope determined and Vmaxavg, the difference therebetween (Vdiff) is calculated as Vdiff=Vmaxavg-Venvavg, shown in block 508. Vdiff corresponds to the peak to peak amplitude of the signal 200 consisting primarily of noise 102, during the cycle set.
With respect to FIG. 2 and the rendering of the combined signal 200, there is significant variation in the actual signal peaks 206 corresponding to the digital pulse peaks. However, as illustrated in the model shown, in the absence of a digital pulse, the combined signal 200 (consisting primarily of noise 102) is consistently within the bounds of Nmax and Nmin.
In at least one embodiment, a predetermined percentage of Vmaxavg is used to establish the threshold for recognition of a pulse, such as for example one hundred ten percent (110%). More specifically, as Vminavg and Vmaxavg define the noise envelope boundaries, any variation in the incoming signal 200 above the Vmaxavg value is likely a digital pulse, and may be identified as such.
It is understood and appreciated that in most situations there will be some minor fluctuation, otherwise known as chatter, as the incoming signal 200 varies above and below the threshold setting established as a simple percentage of Vmaxavg. To alleviate this, a rising threshold value (Vrthr) and a falling threshold value (Vfthr) are determined by the actions within dotted block 510. Specifically, Vrthr and Vfthr provide hysteresis to further aid in the proper determination of the noise envelope and the detection of the signal pulse.
Without hysteresis, a small amount of noise or interference when combined with the input signal can cause undesirable rapid changes between the two output states of the comparator. By using a threshold comparator 314 with hysteresis (Vrthr and Vfthr) the oscillation, i.e. chatter, is prevented. In at least one embodiment, the hysteresis values of Vrthr and Vfthr are applied as positive feedback to the comparator, one trip point for the rising input voltage (Vrthr) and one for the falling input voltage (Vfthr). When the comparator's input voltages are equal, the hysteresis values cause one input to move quickly past the other, thereby removing the input voltages from the region where oscillation occurs.
As this process is repetitive, it is of course realized that the values can and likely will change over time due to variances in the incoming signal 200. This adaptive ability to change threshold values in response to changes in the incoming combined signal 200 is an advantageous feature of at least one embodiment of the method and system for noise-driven recovery of a digital signal.
In at least one embodiment, two additional values are utilized to insure that errant values are not inadvertently provided to the system, specifically a Clamp voltage and a Clip voltage. When Vdiff approaches a low value indicating a small envelope 202 for the signal 200, a purposefully selected artificial low value, i.e. the Clamp voltage, is substituted for the scaling factor and Vdiff in the determination of Vrthr and Vfthr. When the envelope 202 of the signal 200 rises to a sufficient size, the Clamp voltage is no longer substituted. The point at which the Clamp value is to be substituted is a user defined value.
Specifically as shown in FIG. 5, in at least one embodiment, Vdiff is multiplied by a user supplied scaling factor (SFr) and compared to the Clamp value, as shown in decision block 512. If the result is greater than the Clamp voltage value, Vrthr is determined by the equation of Vrthr=(SFr)×Vdiff+Vmaxavg, as shown in block 514. If the result is less than the Clamp voltage value, Vrthr determined by the equation of Vrthr=Clamp+Vmaxavg, shown in block 516.
It is also possible for the input signal 200 to reach the maximum input value. Similar to the Clamp voltage, the Clip voltage value is provided to provide a temporary artificial upper boundary for Vrthr when such a maximum value would otherwise occur. Specifically, Vrthr is compared to the Clip voltage value as shown in decision 518. If Vrthr is greater than the Clip voltage, Vrthr is set to be equal to the Clip voltage, as shown in block 520.
The falling scalar, Vfthr, is determined in a similar process. Specifically, Vdiff is multiplied by-a user supplied scaling factor (SFf) and compared to the Clamp value, as shown in decision block 522. If the result is greater than the Clamp voltage value, Vfthr is determined by the equation of Vfthr=(SFf)×Vdiff+Vmaxavg, as shown in block 524. If the result is less than the Clamp voltage value, Vfthr determined by the equation of Vfthr=Clamp+Vmaxavg, shown in block 526.
As in the case of Vrthr, Vfthr is evaluated against the Clip voltage value as well, shown in decision block 528. If Vfthr is greater than the Clip, Vfthr is set to be equal to the Clip, as shown in block 530.
In at least one embodiment, the rising threshold, Vrthr, is used when the ATC output is low. Similarly, the falling threshold, Vfthr, is used when the ATC output is high. As such, the Vrthr and Vfthr values provide a user-adjustable amount of voltage hysteresis in the ATCs so as to avoid chatter and more precisely detect the true presence of a digital pulse in the incoming signal.
This method of determining threshold values for the noise-driven recovery of the digital pulse stream is and on going and repetitive process. More specifically, these values are determined independently from the actual process of identifying the digital signal illustrated in the flow diagram of FIG. 6.
The search for the signal initially commences with the receipt of the adaptively determined threshold values from the process as shown and described with respect to FIG. 4 and FIG. 5, shown in block 600. The incoming signal is then searched for instances which exceed the threshold values, shown in block 602 and decision 604. In response to the signal exceeding the threshold, an output pulse signal is provided, shown in block 606, else the process cycles back to block 600 receive and revise the threshold settings, if new values have been determined. Following the output of the pulse signal in block 606, decision 608 permits the search to end, or to cycle back to block 600.
As the threshold settings for the noise envelope are continuously re-evaluated and reset, and the cycle window is of a duration shorter than the minimum pulse interval, the noise-driven recovery of the digital signal pulse is advantageously adaptive and precise in responding to any changes in the incoming signal 200.
In addition to the conceptually represented system depicted in FIG. 3 above, in at least one embodiment, the method for noise-driven recovery of a digital pulse stream is implemented with a computer system. The computer system may be a commercially available system, such as a desktop workstation unit provided by IBM, Dell Computers, Gateway, Apple, Sun Micro Systems, or other computer system provider and is equipped with a signal processing capability, such as by a commercially available sound card. Those skilled in the art will understand and appreciate that physical composition of components and component interconnections comprising computer system, and select a computer system suitable for the performing the method of signal driven recovery of the digital pulse stream.
When computer system is activated, preferably an operating system will load into main memory as part of the boot strap startup sequence and ready the computer system for operation. At the simplest level, and in the most general sense, the tasks of an operating system fall into specific categories—process management, device management (including application and user interface management) and memory management.
In such a computer system, the central processing unit (CPU) is operable to perform one or more of methods of noise-driven recovery of the digital pulse stream as described above. Those skilled in the art will understand that a computer-readable medium on which is a computer program for noise-driven recovery of the digital pulse stream may be provided to the computer system. The form of the medium and language of the program are understood to be appropriate for the computer system. Utilizing the memory stores, such as for example one or more hard drives and main system memory, the operable CPU will read the instructions provided by the computer program and operate to perform the noise-driven recovery of the digital pulse stream as described above.
Changes may be made in the above methods, systems and structures without departing from the scope hereof. It should thus be noted that the matter contained in the above description and/or shown in the accompanying drawings should be interpreted as illustrative and not in a limiting sense. The following claims are intended to cover all generic and specific features described herein, as well as all statements of the scope of the present method, system and structure, which, as a matter of language, might be said to fall therebetween.

## Claims

1. A method for noise driven recovery of a digital pulse stream, comprising:
receiving initial parameters including the base characteristics of a pulse stream, the characteristics including the minimum pulse interval;
setting a cycle window interval;
sampling a signal with an analog to digital converter a predetermined number of times at intervals of a first predetermined number of times within the cycle window to record a set of minimum signal values;
sampling the signal a second predetermined number of times within the cycle window to record a set of maximum signal values;
identifying a first and a second highest value from the set of maximum signal values;
discarding the first and the second highest values from the set of maximum signal values;
averaging the set of minimum signal values to provide an average minimum signal value (Vminavg);
averaging the remaining members of the set of maximum signal values to provide an average maximum signal value (Vmaxavg);
establishing at least a rising and a falling threshold value for a signal pulse of the digital pulse stream based on the minimum and maximum average values; and
identifying the digital pulse stream within the signal based on the rising and falling threshold values as hysteresis thresholds;
wherein a difference between the rising and the falling threshold values is proportional to a difference between the average minimum and average maximum values;
wherein the initial information further includes a user supplied rising scaling factor (SFr) and a user supplied falling scaling factor (SFf, a Clip voltage value and a Clamp voltage value;
wherein establishing the at rising and falling threshold value includes:
determining the difference (Vdiff) between the average maximum value and the average noise envelope value,
determining the rising threshold (Vrthr), and
determining the falling threshold (Vfthr); and
wherein the rising threshold is determined by the equation Vrthr=(SFr)*Vdiff+Vmaxavg.

2. The method of claim 1, wherein the falling threshold is determined by the equation Vfthr=(SFf)*Vdiff+Vmaxavg.

3. A method for noise driven recovery of a digital pulse stream in a system, comprising:
receiving initial parameters including the base characteristics of a pulse stream, the characteristics including the minimum pulse interval;
setting a cycle window interval;
sampling a signal with an analog to digital converter a predetermined number of times at intervals of a first predetermined number of times within the cycle window to record a set of minimum signal values;
sampling the signal a second predetermined number of times within the cycle window to record a set of maximum signal values;
identifying a first and a second highest value from the set of maximum signal values;
discarding the first and the second highest values from the set of maximum signal values;
averaging the set of minimum signal values to provide an average minimum signal value (Vminavg);
averaging the remaining members of the set of maximum signal values to provide an average maximum signal value (Vmaxavg);
establishing at least a rising and a falling threshold value for a signal pulse of the digital pulse stream based on the minimum and maximum average values; and
identifying the digital pulse stream within the signal based on the rising and falling threshold values as hysteresis thresholds;
wherein a difference between the rising and the falling threshold values is proportional to a difference between the average minimum and average maximum values; and
wherein the initial information further includes a user supplied rising scaling factor (SFr) and a user supplied falling scaling factor (SFf), a Clip voltage value and a Clamp voltage value; and
wherein the falling threshold is determined by the equation Vfthr=(SFf)*Vdiff+Vmaxavg.