Feedback-compensated ramp-type analog to digital converter
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     This invention relates generally to a method and apparatus for controlling internal combustion engines and more particularly to a feedback-compensated ramp-type analog-to-digital converter usable in such a control system. 
     2. Statement of the Prior Art 
     Many of the patents of the prior art recognize the need for employing the enhanced accuracy of digital control systems for more accurately controlling one or more functions of an internal combustion engine. 
     U.S. Pat. No. 3,969,614 which issued to David F. Moyer, et al on July 13, 1976 is typical of such systems as are U.S. Pat. No. 3,835,819 which issued to Robert L. Anderson, Jr. on Sept. 17, 1974; U.S. Pat. No. 3,904,856 which issued to Louis Monptit on Sept. 9, 1975; and U.S. Pat. No. 3,906,207 which issued to Jean-Pierre Rivere, et al on Sept. 16, 1975. All of these Patents represent a break-away from the purely analog control systems of the past, but neither the accuracy, reliability, or number of functions controlled is sufficient to meet present day requirements. 
     Future internal combustion engines will require that emissions be tightly controlled due to ever-increasing governmental regulations, while fuel consumption is minimized and drivability improved over the entire operating range of the engine. None of the systems of the prior art provide a method and apparatus for controlling the operation of an internal combustion engine over its entire operating range while maintaining sufficient accuracy to achieve minimal emissions and minimal fuel consumption together with improved drivability. 
     The analog-to-digital converter systems used in the prior art are relatively inaccurate thereby preventing the engine control systems in which they were used from being reliable. Furthermore, the analog-to-digital control systems of the prior art in general do not teach A/D conversion systems capable of maintaining the degree of accuracy obtainable by applicant&#39;s feedback-compensated system. 
    
    
     These and other objects and advantages of the present invention are accomplished by applicant&#39;s feedback compensation scheme for insuring a highly accurate analog-to-digital conversion usable in many applications including in the microprocessor-based engine control system disclosed herein. 
     SUMMARY OF THE INVENTION 
     A method and apparatus for performing an analog-to-digital conversion wherein the capacitor ramp is reset to an initial value corresponding to a zero counter state and the counter is allowed to count clock pulses so long as the level of the analog input voltage to be converted is less than the value of the generated voltage ramp. When the values become equal, the counting means terminates the counting of clock pulses and the binary number stored therein is indicative of the value of the analog signal converted. 
     In the feedback compensation system of the present invention, a particular ramp voltage level is assigned to an associated digital number in the counting means and a voltage level comparator means detects the time at which the ramp reaches this particular level. The difference in the time of arrival of the digital count and the ramp voltage is a measure of the ramp rate error, and this difference may be used to generate a charge or discharge pulse of a duration equal to said difference for adjusting the voltage on a holding capacitor which in turn controls the current to said ramp capacitor thereby selectively increasing or decreasing the rate at which said ramp is generated so as to implement a closed loop control of the voltage ramp. 
     The closed control loop eliminates real time as a consideration in determining conversion accuracy since the ramp voltage is tied directly to predetermined counter numbers in the counter and the correction loop is used to achieve a high grade of precision with a minimum of circuitry inexpensive since it self-compensates for capacitor leakage, changes in component values with changes in temperature and age, power supply fluctuations, and the like. 
     INCORPORATION BY REFERENCE 
     This application is one of fourteen applications filed on Feb. 27, 1978, all commonly assigned and having substantially the same specification and drawings, the fourteen applications being identified below: 
     
         ______________________________________                                    
Ser-                                                                      
ial                                                                       
Num-                                                                      
ber   Title                                                               
______________________________________                                    
881,321                                                                   
      Microprocessor-Based Electronic Engine Control System               
881,322                                                                   
      Feedback-Compensated Ramp-Type Analog to Digital                    
      Converter                                                           
881,323                                                                   
      Input/Output Electronic For Microprocessor-Based                    
      Engine Control System                                               
881,324                                                                   
      Switching Control of Solenoid Current in Fuel                       
      Injection Systems                                                   
881,921                                                                   
      Dual voltage Regulator With Low Voltage Shutdown                    
881,922                                                                   
      Oxygen Sensor Qualifier                                             
881,923                                                                   
      Ratiometric Self-Correcting Single Ramp Analog To                   
      Pulse Width Modulator                                               
881,924                                                                   
      Microprocessor-Based Engine Control System                          
      Acceleration Enrichment Control                                     
881,925                                                                   
      Improvements in Microprocessor-Based Engine Control                 
      Systems                                                             
881,981                                                                   
      Oxygen Sensor Feedback Loop Digital Electronic Signal               
      Integrator for Internal Combustion Engine Control                   
881,982                                                                   
      Improvements in Electronic Engine Controls System                   
881,983                                                                   
      Electronic Fuel Injection Compensation                              
881,984                                                                   
      Ignition Limp Home Circuit For Electronic Engine                    
      Control Systems                                                     
881,985                                                                   
      Oxygen Sensor Signal Conditioner                                    
______________________________________                                    
 
    
     Application Serial Number 881,321, now U.S. Pat. No. 4,255,789 has been printed in its entirety, including FIGS. 1 to 10 34 and the specification of that application is specifically incorporated by reference. For a better understanding of the drawing figures in this application, reference is made to the same figure numbers in the above mentioned application, Ser. No. 881,321. 
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 2 is a block diagram of the microprocessor-based electronic engine control system; 
     FIG. 3F is an electrical schematic diagram of the preferred embodiment of the ramp generator circuitry; 
     FIG. 3G is a timing diagram for explaining the operation of the ramp generator circuitry of FIG. 3F; 
     FIG. 3H is a block diagram illustrating the broad concept of the ratiometric feedback-compensated ramp-type analog-to-digital converter system of the present invention; 
     FIG. 3I is an electrical timing diagram used to illustrate the operation of the circuit of FIGS. 3H and 3J; 
     FIG. 3J is an electrical schematic diagram showing, in detail, portions of the circuit of FIG. 3H and for describing an alternate embodiment to the ramp generating circuit utilized in the preferred embodiment of FIG. 3F.