Abstract:
A process for maximizing the instruction processing efficiency of a digital computer for the purpose of calculating rotational speed wherein the calculation of speed is based upon speed signals generated by a tachometer. By (1) counting the quantity of the speed signals received during a fixed sampling period, and (2) recording the occurrence time of these speed signals only as necessary for the calculation of rotational speed, the invention improves over known methods in that it does not record the occurrence time of all speed signals, but rather records the occurrence time of only those speed signals necessary for the calculation. The invention accomplishes this by (a) anticipating when the speed signals necessary for the speed calculation will be generated (and subsequently received by the digital computer) and (b) recording the occurrence times only when it is anticipated that these necessary edges will be received by the digital computer.

Description:
BACKGROUND OF THE INVENTION 
     This invention relates to a method for detecting the speed of a rotating member such as the wheel of a vehicle. Typically in order to sense the rotational speed of a rotating member, such as the wheel of a vehicle, a tachometer is provided that generates a signal having a frequency directly proportional to the rotational speed. The tachometer may take the form of a toothed ring rotated by the rotating member, the rotation of the ring being sensed by an adjacently located electromagnetic sensor. The electromagnetic sensor provides a pulse each time the toothed ring, and hence the vehicle wheel, rotates 1/N of one revolution where N is the number of teeth on the toothed ring. Each pulse may directly comprise the speed signal or alternatively may be shaped into a square wave speed signal. Given the relationship between the rotation of the toothed ring and the rotation of the vehicle wheel, the number of speed signals generated during a fixed time interval is directly proportional to the rotational speed of the rotating wheel. Similarly, the elapsed time between each of successive speed signals is inversely proportional to the rotational speed of the wheel. 
     There are many known methods for processing the speed signal. In one known method, described in U S Patent number 4,799,178 assigned to the assignee of this invention, the occurrence time of each speed signal and the number of speed signals generated during a fixed period of time are recorded. Utilizing the aforementioned relationships between a) the elapsed time between successive speed signals, b) the number of speed signals generated during a fixed sampling interval and c) the rotational speed of the rotating member, the rotational speed of the wheel is calculated at the end of each fixed sampling interval using the number of speed signals counted during the current sampling interval, the occurrence time of the last counted speed signal of the current sampling interval and the occurrence time of the next-to-last counted speed signal of the previous sampling interval. In this method the accuracy of the calculation is maximized by extending the calculation interval over a time greater than the sampling interval. 
     Typically, once the digital computer calculates rotational speed, that calculated speed is utilized as a variable in a vehicle control algorithm. For example, an antilock brake control system can use wheel speed to determine wheel slip and wheel acceleration. These parameters are then monitored, and wheel brake pressure is cyclically decreased and increased to avoid incipient wheel lock and provide higher braking efficiency and improved vehicle stability. The primary task for an antilock brake computer, therefore, is the modulation of wheel brake pressure, while the computation of wheel speed is an ancillary, albeit necessary, task. 
     Speed signal processing efficiency is a measure of the amount of time expended by the calculation device, such as a digital computer, in the calculation of rotational speeds versus the amount of time expended by the device in the performance of its other tasks. Since counting speed signals and recording the occurrence times for these signals involves a fixed amount of processing time per speed signal, processing efficiency using solely the method disclosed in US Patent 4,799,178 decreases as the number of speed signals being utilized in the speed calculation increases. Conversely, however, calculation accuracy increases as the amount of data (i.e. the number of speed signals) utilized in the speed calculation increases. Simply stated, the recording of edge occurrence times for every speed signal received while counting the number of speed signals received requires a great deal of processing time. This processing time in turn diverts the attention of the digital computer from its other functions and thereby sets an effective limit of processing capability. This limit is directly proportional to the rotational speed of the rotating member, and hence is directly proportional to the frequency of the occurrence of speed signals. Beyond this limit, the digital computer devotes too much processing time to the calculation of rotational speed to adequately service its other critical tasks. Speed processing efficiency could be increased by reducing the number of speed signals generated by the tachometer (i.e. fewer teeth of the toothed ring). However, that would sacrifice calculation accuracy. Similarly, the fixed sampling period could be decreased. But that would result in lower calculation resolution. Ideally, to maximize accuracy as well as processing efficiency, a speed calculation method should count and record the occurrence time of only those speed signals necessary to the calculation without compromising the accuracy or resolution of that calculation. 
     SUMMARY OF THE INVENTION 
     This invention discloses a process for maximizing the instruction processing efficiency of the digital computer for the purpose of calculating rotational speed of a rotating member by (1) counting the quantity of the speed signals received during a fixed sampling period, and (2) recording the occurrence time of these speed signals only as necessary for the calculation of rotational speed. The invention improves over the known methods in that it does not record the occurrence time of all speed signals, but rather records the occurrence time of only those speed signals necessary for the calculation. The invention accomplishes this by (a) anticipating when the necessary speed signals, or edges, for the speed calculation will be generated (and subsequently received by the digital computer) and (b) recording the occurrence times only when it is anticipated that these necessary edges will be received by the digital computer. By improving the speed processing efficiency, the digital computer has more time available to perform its other primary and critical tasks. Thus, a system using this invention in the calculation of rotational speeds, through its greater speed processing efficiency, may be improved to: perform more vehicle control tasks within the same period of time, operate at higher speeds or process all of its necessary tasks within a shorter control cycle thereby increasing control accuracy. 
    
    
     DESCRIPTION OF THE DRAWINGS 
     This invention may be better understood by referencing the following description of the preferred embodiment and the drawings in which: 
     FIG. 1 is a symbolic diagram of the digital computer and tachometer interface circuitry; 
     FIGS. 2 and 4 are flow charts detailing the operation of the digital computer; and 
     FIG. 3 is an illustration of the speed signal and the preferred calculation method. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENT 
     The preferred embodiment is described as taking the form of a speed sensing device for the wheel of a vehicle. The speed of this wheel can be detected using a tachometer. The tachometer may take the form of a toothed ring located near an electromagnetic sensor which senses the passing of teeth as the toothed ring is rotated by the wheel. In a typical automotive application, the toothed ring is attached to the axle and spline assembly of the vehicle wheel. The rotational speed of the toothed ring is directly proportional to the rotational speed of the wheel, the speed of which is desired to be measured. As the toothed ring is rotated in unison with the wheel, a pseudo-sinusoidal signal, having a frequency directly proportional to the rotational frequency of the wheel, is generated by the tachometer. Given that the toothed ring has N teeth, the frequency, f, of the generated signal is f= N ω / 2 π where ω is the rotational speed of the wheel. This pseudo-sinusoidal signal is filtered through a squaring circuit 10 to produce a square wave signal whose frequency is identical to the frequency of the generated signal. This squared signal is transmitted to the I/O 12 of a digital computer. The I/O 12 has logic and threshold circuitry which allows the digital computer to detect, or respond to, either the rising edge or the falling edge or both rising and falling edges of the processed tachometer signal. In addition to the I/O 12, the digital computer has: (a) power supply device (PSD), 14 which interfaces the digital computer to the vehicle power source, (b) random-access memory (RAM) 16 used for variable recording and storage, and (c) read-only memory (ROM) 18 in which the instructions necessary to implement this invention are encoded. These instructions are retrieved and executed by (d) the CPU 19 which is the information processing and computational architecture of the digital computer. 
     Turning now to FIGS. 2, 3 and 4, the computation of rotational speed from the processed tachometer signal is detailed. It should be briefly noted that when referring to the flow chart function blocks of FIGS. 2 and 4, the general function described by block nn will be referenced as &lt;nn&gt;. This is to emphasize the fact that any one of a variety of known information processing languages could be utilized by one skilled in the art to accomplish the general function described by function block nn. Therefore, the description of process &lt;nn&gt;refers to the general task embodied in function block nn, and should in no way be considered to represent the actual information processing instructions necessary for a device, such as a digital computer, to execute the instant task. 
     FIG. 2 depicts the general operation of the digital computer. When the computer is powered-up, via the vehicle ignition system or other means, the computer will begin executing the instructions encoded in ROM 18. The computer will first perform initialization 30, which entails clearing registers, initializing RAM variables to calibrated values, stabilizing voltage levels at the I/O and other basic functions of the digital computer. Next, the computer enables the wheel speed interrupt logic 32. The wheel speed interrupt logic processes the incoming speed signal in the following manner: (a) the speed signal is interfaced to the digital computer through the I/O 12; (b) assuming the speed signal has been shaped into a square wave, as shown in FIG. 1, the speed signal is considered to be composed of a series of rising followed by falling &#34;edges&#34;; c) the I/O 12 of the computer can detect either rising or falling (called &#34;single&#34;) edges or both rising and falling (called &#34;double&#34;) edges; d) the digital computer&#39;s logic configures the I/O 12 to detect either single or double edges, as will be detailed later in this disclosure; (e) whenever an edge is detected by the I/O 12, an interrupt is generated in the digital computer; (f) the interrupt causes the digital computer to temporarily discontinue the particular ROM 18 instruction it was processing and instead &#34;jump&#34; to an interrupt handling routine; (g) once the interrupt has been &#34;handled&#34; in the interrupt handling routine, the digital computer resumes processing the particular ROM 18 instruction it was processing prior to the interruption. Utilizing an interrupt scheme such as this alleviates the need to continuously sample the speed signal for new data, as would be required if a polling scheme were used. Because the frequency of the incoming speed signal (which is proportional to the speed of the rotating member) is variable, the wheel speed interrupt is said to be received and handled on an asynchronous basis. 
     Continuing along path &lt;30&gt;-&lt;32&gt;, the next task of the digital computer, as encoded in ROM 18, is to enable and force the first control cycle interrupt &lt;34&gt;. A control cycle interrupt is generated once during each of successive fixed periods, such as once every 5 msec. The control cycle interrupt is used to (1) establish uniformity of vehicle control functions and (2) create a fixed sampling period for the calculation of wheel speed, as will be detailed later in this disclosure. The control cycle itself consists of the execution of all necessary vehicle control functions &lt;36&gt; and all background tasks &lt;38&gt;. In addition to the calculation of rotational speed, with which this invention disclosure deals exclusively, the necessary vehicle control functions &lt;36&gt; may also include: antilock brake control, wheel spin and acceleration control, engine spark and torque management or transmission shift management. Additionally, the background tasks &lt;38&gt; have been known to encompass the following application-specific functions: communication with other vehicle computers, communication with service tools or the updating of driver information clusters. All functions of the digital computer are performed within the confines of the fixed sampling period referred to as the &#34;control cycle&#34;. Every time a control cycle interrupt occurs &lt;39&gt;, the digital computer begins executing the functions embodied in the control cycle. Consequently, if the digital computer has not completed all of the necessary functions of the control cycle before a control cycle interrupt occurs, the digital computer begins a new control cycle before finishing the previous control cycle&#39;s tasks. Such a condition is highly undesirable, as there is no means for determining which functions have been properly completed and which functions were left unattended. Given this restriction, it is important that the recording of speed signal information and the calculation of rotational speed be efficient, so as to allow the digital computer enough time to complete its other necessary tasks. 
     Throughout the discussion of this invention, the following terms will be used: (1) An &#34;edge&#34; is either the rising or falling edge of the squared speed signal, as shown in FIG. 1. The edges are transmitted to and received by the I/O interface circuitry of the digital computer. (2) When an edge is received at the I/O it is said to be &#34;detected&#34;. Whether only rising or only falling (called &#34;single&#34;) edges or both rising and falling (called &#34;double&#34;) edges are detected is determined by the logic of the digital computer, which will be discussed in more detail later in this disclosure. (3) A pair of rising/falling edges indicates that a tooth on the toothed ring has approached, reached and left the vicinity of the electromagnetic sensor. The elapsed time between successive rising or successive falling edges can therefore be considered to represent the &#34;time between teeth&#34;. This &#34;time between teeth&#34; is the amount of time elapsed while successive teeth rotate past the electromagnetic sensor, and is proportional to the rotational speed of the wheel. (4) The I/O interface threshold logic generates a &#34;wheel speed interrupt&#34; whenever an edge is detected. (5) The &#34;current&#34; control cycle is the fixed sampling period currently in progress, while the &#34;prior&#34; control cycle is the fixed sampling period just completed. (6) The &#34;occurrence time&#34; of an edge is the time, in relation to the digital computer&#39;s external clock, when an edge was detected and a subsequent interrupt was generated. Thus the &#34;last&#34; and &#34;next-to-last&#34; edges are the last and next-to-last edges, respectively, detected during a given control cycle. 
     FIG. 3 is a diagram illustrating some of these terms. The fixed time segments marked by the vertical lines 80 are control cycles. As can be seen, segment 82 is the current control cycle while segment 84 is the prior control cycle. The variable time segments marked by vertical lines 90 and 92 are calculation intervals. Segment 94 is the calculation interval for the current control cycle (segment 82), and segment 96 is the calculation interval for the prior control cycle (segment 84). Edges are detected during each of successive control cycles. When an edge is detected and a wheel speed interrupt is generated, an edge is said to have occurred. In this illustration, single rising edges are being detected. For a typical edge, k, the edge is the k th  edge detected during the current control cycle, and this k th  edge occurs at time T k . The total number of edges used for the calculation of rotational speed during the current control cycle is &#34;n&#34;. Thus, the last edge detected during the current control cycle is the n th  edge, and it occurred at time T n . Noting that the calculation interval 94 is greater than the control cycle 82, the 0 th  and 1 st  edges of the calculation interval occurred during the prior control cycle 84. Edge &#34;n&#34; is the last edge detected during the current control cycle, while edge &#34;1&#34; is the last edge detected during the prior control cycle. Similarly, edge &#34;n-1&#34; is the next-to-last edge detected during the current control cycle and edge &#34; 0&#34; is the next-to-last edge detected during the prior control cycle. Thus, at the beginning of each new control cycle, occurrence time T n  and T n-1  become T 1  and T 0  respectively, as is illustrated by (T n ) prior  and (T n-1 ) prior  appearing below T 1  and T 0 . This feature allows for overlapping of speed calculation intervals and increases accuracy without increasing the sampling interval. By overlapping the calculation intervals (i.e. segment 94 overlaps segment 96) the calculation of rotational speed is less susceptible to noise associated with the detection of any given edge. These advantages are more fully discussed in U S Patent #4,799,178. Additionally, it should be realized that the subject invention disclosed in these instant materials would also be applicable to a variety of calculation schemes utilizing edge occurrence times and the quantity of edges in its calculation. 
     Utilizing an overlapping calculation interval, the rotational speed of the wheel, V w , is calculated from the speed signal in the following manner: ##EQU1## and where r w  is the rolling radius of the wheel and N is the number of teeth on the toothed ring, thus making K a conversion constant for converting units of teeth/sec into miles/hour. Given that single edge detection is being used, as illustrated in FIG. 3: ##EQU2## From the equation related above, it can be seen that the necessary speed signal data for the calculation of rotational speed is (1) the number of single edges counted during the current control cycle, (2) the occurrence time of the last edge detected during the current control cycle and (3) the occurrence time of the next-to-last edge detected during the prior control cycle. Relatedly, if double edge detection is in use: ##EQU3## and the necessary speed signal data is (1) the number of double edges counted during the current control cycle, (2) the occurrence time of the last and next-to-last edges detected during the current control cycle and (3) the occurrence time of the last and next-to-last edges detected during the prior control cycle. Conversely, it follows that the occurrence time of any other edges are unnecessary for the calculation. Restating this in ordinal fashion, the 0 th , 1 st , n-1 th  and n th  edge occurrence times are necessary, while the 2 nd , 3 rd , ... n-2 th  edge occurrence times are not necessary for the calculation of rotational speed. 
     To achieve the highest possible calculation efficiency using these equations, it is imperative that no unnecessary data be recorded. If unnecessary data is recorded, the digital computer will devote too much time to the recording of speed signal data and not enough time to the performance of the other necessary vehicle control and background functions. However, it is also imperative that the digital computer properly record all of the speed signal data necessary for the calculation of rotational speed. If necessary data is omitted, the value of rotational speed calculated will be inaccurate. Given that rotational speed is often a critical parameter in vehicle control functions, the integrity of the dependent vehicle control system may be compromised if either the speed calculation consumes too much processing time or if the speed calculation is inaccurate. 
     From the structure of the preferred rotational speed equations, it can be seen that every edge detected during the current control cycle must be counted, but that the occurrence time of only the last and next-to-last edges of the current and prior control cycles need be recorded. Any additional data is unnecessary for the calculation of rotational speed and serves only to decrease wheel speed processing efficiency. Therefore, this invention has a means for anticipating when the last and next-to-last edges will be detected and subsequently begins recording occurrence times only when it is anticipated that these necessary edges will be detected. The number of edges (k=1, 2, ... n) detected during the control cycle are still counted regardless of whether the occurrence time of a particular edge &#34;k&#34; is recorded. This timing scheme is accomplished through the following equation: 
     
         T.sub.c =T.sub.cycle -2*T.sub. av +T.sub.max +T.sub.safe 
    
     where T c  stands for the amount of time during a control cycle that only the number of edges detected should be counted (also referred to as the &#34;time to count only&#34;), T cycle  is the duration of the control cycle, T av  is the average time between teeth as calculated using either of the previously related equations, T max  is a value representing the maximum amount of change in rotational speed that is physically possible during a control cycle and T safe  is a calculation safety margin. During the first T c  milliseconds of a T cycle  millisecond control cycle, the number of edges detected are counted, but no occurrence times are recorded. During the remaining (T cycle  -T c ) milliseconds of the T cycle  millisecond control cycle, both the number of edges detected and the occurrence times of those edges are recorded. By recording the occurrence time of only those edges necessary for the accurate calculation of rotational speed, the digital computer maximizes processing efficiency. This allows adequate time for the digital computer to perform its other necessary vehicle control functions without compromising speed calculation accuracy. 
     Without this method, the digital computer would have a velocity &#34;ceiling&#34; above which the calculation of rotational speed consumed too much processing time or the digital computer to adequately service its other necessary vehicle control functions. Through the use of the instant invention, the digital computer is able to execute all of its necessary functions--the calculation of rotational speed and the processing and control of other necessary vehicle control and background tasks--when the rotating member is traveling at very high velocities which are significantly greater than the velocity achievable without the use of this invention. FIG. 4 is a detailed flow chart of the tasks that comprise the necessary vehicle control functions &lt;36&gt;, including the specific method composing this invention, which were related in brief on FIG. 2. Recall that the control cycle is a fixed sampling period of duration T cycle  that begins with the occurrence of a control cycle interrupt &lt;39&gt;. When a new control cycle has just begun, the information stored in the various RAM variables reflect values determined during the prior control cycle. Therefore, the last and next-to-last occurrence times of edges for the prior control cycle, T 1  and T 0  respectively, are updated with the values stored in T n  and T n-1 , which were determined during the prior control cycle (this process was related during the discussion of FIG. 3). The updating occurs at step &lt;42&gt;. Next, the &#34;time to count only&#34; period, T c , is calculated &lt;44&gt;. This time represents the portion of the control cycle during which only the number of edges detected during the control cycle are recorded. During the remaining (T cycle  - T c ) milliseconds of the T cycle  millisecond control cycle, both the number of edges detected and their respective occurrence times are recorded. Once the recording intervals have been established, the digital computer proceeds to execute the necessary vehicle control functions &lt;46&gt;. These function may include: antilock brake control, engine spark/torque management or other functions particular to the desired application. 
     While the digital computer is processing its various necessary vehicle control tasks &lt;46&gt;, the rotational of the wheel causes the tachometer to generate a speed signal. As was illustrated in FIG. 1 and previously related, the tachometer can take the form of a toothed ring attached to the wheel of a vehicle with an adjacently located electromagnetic sensor, thereby providing for the measurement of rotational speed for that wheel. The resulting speed signal generated by the tachometer may be shaped into a square wave before it is transmitted to the I/O 12 of the digital computer. The shaping of the speed signal into a square wave causes the signal to appear as a series of rising followed by falling edges. When an edge is detected by the I/O, a wheel speed interrupt is generated. Because the detection of an edge and the subsequent generation of a wheel speed interrupt is related solely to the frequency of the rotating member, the interrupt is said to occur on an asynchronous basis. The occurrence of a wheel speed interrupt causes the digital computer to suspend the execution of whatever instruction it was processing and instead jump to an interrupt handling routine. This phenomenon is diagrammed as path &lt;50&gt;. 
     Once a wheel speed interrupt has occurred &lt;50&gt;, the interrupt must be &#34;handled&#34;. In this embodiment, the wheel speed interrupt signifies that new rotational speed calculation data is available. Therefore, the digital computer must update the running count of edges detected during the current control cycle and update the recorded edge occurrence times as necessary for the accurate and efficient calculation of rotational speed. Recall that T c , the &#34;time to count only&#34;, was calculated at the beginning of the current control cycle at step &lt;44&gt;. This value represents the amount of time when the 2 nd , 3 rd , ... n-2 th  edges will be detected by the digital computer. Given the equations related earlier for calculating T av  and hence rotational speed, the occurrence times of these edges are unnecessary for the calculation of rotational speed. As shown by decision block &lt;52&gt;, until T c  milliseconds of the T cycle  millisecond control cycle have elapsed, only the number of edges detected is updated &lt;54&gt;. Once the number of edges detected has been updated, the interrupt has been handled. The digital computer resumes processing the vehicle control instruction that it was performing prior to the interruption. The resumption of the interrupted activity is denoted by path &lt;58&gt;. 
     Depending upon the rotational speed of the wheel and hence the frequency of the processed tachometer signal, edges continue to be detected and wheel speed interrupts are subsequently generated. Whenever a wheel speed interrupt occurs &lt;50&gt;, the vehicle control activity being processed by the digital computer is temporarily suspended while the wheel speed interrupt is handled. As long as less than T c  milliseconds have elapsed in the T cycle  millisecond control cycle, the interrupt handling will consist solely of the counting of the detected edge (path &lt;50&gt;--&lt;52&gt;--&lt;54&gt;). This is because the occurrence times of these edges--the 2 nd , 3 rd , ... n-2 th  edges--are unnecessary for the calculation of rotational speed. Once the interrupt is handled, the digital computer resumes the interrupted activity &lt;58&gt;. 
     Eventually, T c  milliseconds will elapse. When a wheel speed interrupt occurs, the digital computer again suspends processing of the vehicle control activities and jumps to the interrupt handling routine via path &lt;50&gt;. Since T c  milliseconds have elapsed, the &#34;time to count only&#34; has expired and it is now necessary to record the occurrence times of the detected edges as well as count the number of edges detected. Decision block &lt;52&gt; is therefore satisfied and the occurrence times of the edges are recorded at step &lt;56&gt;. The updating of T n-1  and T n  is accomplished through a shifting process described as follows: (a) any time value stored in T n  no longer represents the occurrence time of the last edge detected, and instead now represents the occurrence time of the next-to-last edge detected. (b) Therefore, T n-1  is set equal to T n   and T n  is updated with the current clock time. This clock time reflects the time, in relation to the external clock of the digital computer, that the interrupt associated with the detected edge was generated. Having updated the occurrence times, the digital computer proceeds to update the running count of the number of edges detected (step &lt;54&gt;) and resumes the interrupted vehicle control activity &lt;58&gt;. 
     Any wheel speed interrupts occurring after T c  milliseconds have elapsed during the T cycle  millisecond control cycle are handled in the above fashion. When the interrupt occurs &lt;50&gt;, the digital computer suspends its vehicle control activity, updates both the occurrence times (step &lt;56&gt;) and the number of edges detected (step &lt;54&gt;), and resumes the interrupted vehicle control activity (returning along path &lt;58&gt;). 
     By handling wheel speed interrupts in two different fashions--counting the number of edges detected during the first T c  milliseconds of the control cycle and later counting the number of edges and recording the occurrence times of edges during the remainder of the control cycle--the digital computer maximizes both processing efficiency and rotational speed calculation accuracy. 
     The calculation of rotational speed is only one task of the digital computer. As related earlier, performing the other vehicle control activities, referred to as step &lt;46&gt; in FIG. 4, can be considered the main task of the digital computer. At some point during the control cycle it will become necessary to calculate rotational speed from the edge data being recorded. The point at which the calculation of rotational speed occurs has been broken out in detail as steps &lt;60&gt; through &lt;76&gt;. Recalling the earlier related equations for calculating the time between teeth, T av , the digital computer must decide which equation should be used. This occurs at step &lt;60&gt;. If single edge detection was exercised during the current control cycle (path &lt;62&gt;), the the digital computer calculates ##EQU4## where T av  is the average time between teeth, T n  is the occurrence time of the last edge detected during the current control cycle, T O  is the occurrence time of the next-to-last edge detected during the prior control cycle and n is the number of edges counted during the current calculation interval, which is also equal to one greater than the number of edges counted during the current control cycle. However, if double edge detection was exercised during the current control cycle (path &lt;64&gt;), the digital computer calculates ##EQU5## where T av  is the average time between teeth, T n  and T n-1  are the occurrence times of the last and next-to-last edges detected during the current control cycle, T 1  and T 0  are the occurrence times of the next-to-last edges detected during the prior control cycle and n-1 is one less than the number of edges counted during the current calculation interval, which is also equal to the number of edges counted during the current control cycle. Regardless of which method of detection was employed and how T av  is calculated, the speed of the wheel is calculated at step &lt;70&gt; as V w  =K/T av  where V w  is the rotational speed of the wheel, T av  is the time between teeth as computed above and K is a constant which converts teeth/sec into units of miles/hour. Once the speed of the wheel has been calculated, the digital computer proceeds to determine whether single or double edge detection should be employed for the next control cycle. Double edge detection involves the recording of the number of rising and falling edges as well as their associated occurrence times, while single edge detection involves the recording of only rising or falling edges and their occurrence times. Double edge detection, because twice as many edges and hence pieces of calculation data are recorded, results in greater accuracy than single edge detection. However, employing double edge detection also means that the digital computer will be interrupted from its main vehicle control tasks twice as often as when using single edge detection. Therefore, in this embodiment, the digital computer uses single edge detection at high speeds greater than V switch when many wheel speed interrupts are generated and uses double edge detection at lower speeds less than V switch when fewer interrupts are generated. This decision process is illustrated as steps &lt;72&gt;, &lt;74&gt; and &lt;76&gt;. The digital computer then proceeds to process the background tasks as the control cycle continues to completion. 
     The control cycle tasks are executed every control cycle. With the beginning of a new control cycle, the digital computer starts the control cycle. Once again, the edge occurrence times for the prior control cycle, T 0  and T 1 , are updated using (T n-1 ) prior  and (T n ) prior  &lt;42&gt;. Next, the &#34;time to count only&#34;, T c , is calculated &lt;44&gt; and the digital computer proceeds to perform the other necessary vehicle control tasks &lt;46&gt;. If a wheel speed interrupt occurs &lt;50&gt; during the first T c  milliseconds of the T cycle  control cycle, only the number of edges detected is counted (&lt;52&gt;--&lt;54&gt;) before the interrupted task is resumed &lt;58&gt;. However, during the remainder of the control cycle (T cycle  -T c ), if a wheel speed interrupt occurs &lt;50&gt;, its occurrence time is recorded &lt;56&gt; and it is counted &lt;54&gt; before the interrupt task is resumed &lt;58&gt;. At some point during the control cycle, the speed of the rotating member is calculated (steps &lt;60&gt; through &lt;70&gt;) and the detection scheme for the next control cycle is established (steps &lt;72&gt; through &lt;76&gt;). The digital computer then proceeds to process the background tasks as the control cycle continues to completion.