BACKGROUND OF THE INVENTION 
     The present invention relates to an in-engine deposit detection apparatus for an engine control system, or more in particular to an in-engine deposit detection apparatus attached to a control system for a gasoline engine with fuel injected into intake manifold. 
     As a method of mixture gas supply to a gasoline engine, a system for injecting the fuel directly into the intake manifold, that is, what is called the intake manifold fuel injection system is well known and finds wide applications. 
     In this type of engine, however, a deposit containing carbon as a main component is often formed in the intake manifold, resulting in &#34;carbon hesitation&#34;, a phenomenon in which the engine control &#34;falters&#34; or becomes inefficient, thereby deteriorating the drivability. 
     The conventional engine control systems have paid no special attention to the detection of a deposit in the intake manifold and therefore have had a problem of the difficulty of taking satisfactory measure against the deterioration of the drivability caused by carbon hesitation. 
     SUMMARY OF THE INVENTION 
     The object of the present invention is to provide an in-engine deposit detection apparatus for an engine control system which detects that the amount of the deposit in the intake manifold has increased to such an extent as to have an adverse effect on the engine control thereby to provide against the deterioration of drivability. 
     According to the present invention, there is provided an in-engine deposit detection apparatus for an engine control system comprising means for detecting that a measurement obtained on the basis of a time lag from a time point when the supply air-fuel ratio determined by the intake air flow rate and the fuel injection amount changes to rich side to a time point when the output air-fuel ratio detected from the exhaust gas composition changes to rich side has deviated from the range of measurements based on normal time lag, thereby detecting that the deposit has increased to such an extent as to have an adverse effect on the engine control. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a configuration diagram showing an engine control system according to an embodiment of the present invention. 
     FIG. 2 is a diagram for explaining the operation of an oxygen sensor according to an embodiment of the present invention. 
     FIG. 3 is a time chart for explaining the operation of an embodiment of the present invention. 
     FIG. 4 is a decision time map for explaining the present invention. 
     FIG. 5 is a flowchart showing the operation of an embodiment of the present invention. 
     FIG. 6 is a time chart for explaining the operation of another embodiment of the present invention. 
     FIG. 7 is a flow chart showing the operation of the embodiment shown in FIG. 6. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     A well known oxygen sensor for detecting an output air-fuel ratio according to an embodiment of the present invention is shown in FIG. 1. In FIG. 1, let Q A  be the air amount introduced into the cylinder of an engine 1 through an air filter 10. The value Q A  is measured by an air flow rate sensor 2 and is supplied to an engine control system 3 controlled by a microcomputer. The engine speed N is determined by the engine control system 3 counting the pulses generated at intervals of a predetermined angle from a crank angle sensor 4 rotating in synchronism with the engine. From the intake air amount Q A  and the engine speed N, the pulse width T P  for basic fuel injection required of the engine is determined from the equation below. 
     
         T.sub.P =K X Q.sub.a /N                                    (1) 
    
     where T P  is the basic pulse width, K a constant, Q A  an intake air amount, and N the engine speed. 
     An oxygen sensor 5 mounted in the exhaust pipe, on the other hand, is for generating a signal VO 2  in response to the oxygen concentration in the exhaust gas. On the basis of this signal, the basic fuel injection pulse width T P  is compensated, and the fuel injection pulse width T i  to be actually supplied to an injector 6 is calculated, thereby effecting the feedback control of the fuel injection amount. The fuel injection pulse width T i  is determined from the equation below. The injector 6 injects fuel at intervals of the pulse width T i . 
     
         T.sub.i =T.sub.P ×α×(1+K.sub.A +K.sub.1) (2) 
    
     where T i  is the fuel injection pulse width, α a feedback compensation factor, K AC  an acceleration compensation factor, and K 1  various compensation factors. The value α in equation (2) is for proportional integration control as shown in FIG. 2 by use of the output V0 2  of the oxygen sensor 5. Specifically, if the air-fuel ratio changes from lean to rich side, the proportion P R  is subtracted from the feedback compensation factor, followed by progressive decrement of the integration I R . When the air-fuel ratio changes from rich to lean side, on the other hand, the proportion P L  is added, followed by progressive increment by the integration I L . K AC  is a factor for compensating the fuel injection time upward upon detection of an acceleration by various sensors. K 1  is a factor corrected in accordance with the various engine conditions including the start, battery voltage and water temperature. A proper fuel injection pulse width T 1  suitable to each operating condition is obtained from equation (2). The aforementioned method of calculating the fuel injection pulse width thereby to control the fuel injection is described in &#34;Automotive Engineering&#34;, 1986, Vol. 35, No. 7, pp. 152 to 161 published by Tetsudo Nihonsha. 
     If carbon or other deposits derived from secular variations or substandard gasoline attach on the wall of the intake manifold or intake valve, part of the gasoline injected to the deposits is absorbed into them or released from them, with the result there occurs a kind of lag between the supply air-fuel ratio and the output air-fuel ratio. During the acceleration when the supply air-fuel ratio shifts to rich side, in particular, the output air-fuel ratio develops a time lag. While the vehicle is accelerating, therefore, the carbon hesitation (falter) makes satisfactory engine control difficult merely with the fuel injection pulse width T 1  calculated from equation (2), thus deteriorating the drivability. 
     According to the present invention, the time lag of the output air-fuel ratio behind the supply air-fuel ratio in shifting to the rich side is determined to obtain a detection value proportional to the amount of deposits including carbon. When this detection value exceeds a predetermined value, the amount of the deposits is regarded to have increased to such an extent as to adversely affect the engine control. The user is thus warned by an alarm lamp 9 to carry out the maintenance. Further, before the maintenance work is started, the compensation factor K AC  is used to improve the drivability. 
     First, explanation will be made about a method of detecting the deposits such as carbon. In the embodiment under consideration, an idle switch 8 is used. When this switch 8 turns from ON (idle state) to OFF (partial state), that is, while the vehicle is accelerating, the carbon deposit amount is detected in the manner described below. 
     While the vehicle is accelerating, a lag in the fuel system causes the oxygen sensor output V 02  to shift to lean side once, followed by shifting to rich side. In FIG. 3, the delay time T indicated by solid line, which is normal, is delayed as shown by dotted line with time T&#39; lengthened. During the acceleration, the time is measured before the oxygen sensor output exceeds a predetermined slice level V L  from lean side. This time measured is compared with a predetermined criterion t n . If the time measurement T is smaller than or equal to t n , it is decided that the situation is normal, while if T is larger than t n , it is decided that the amount of carbon deposit has increased to such a degree as to adversely affect the engine control. The criterion t n  is prepared in the form of the eight types t 1  to t 8  as shown in FIG. 4. This is by reason of the fact that since the delay time T varies with the operating conditions (sharp acceleration, slow acceleration, etc.), the operating region is divided into eight parts according to the change rate ΔT S  /Δt per unit time Δt of the output voltage T S  of the throttle sensor 7 indicating the throttle opening degree, that is, the accelerator pedal depression rate, so that the criterion t n  is provided for each of the eight operating regions, out of which a predetermined one is selected for decision. The change rate ΔT S  /Δt is determined, as shown in FIG. 3, by measuring the increment ΔT S  of the throttle sensor output T S  within a small time Δt after the lapse of a short time ΔT W  following the turning on of the idle switch 8. The time delay T for the change rate thus determined is obtained empirically, thus designating the criterion t n  for each of the eight regions as shown in FIG. 4. 
     As a consequence, according to this embodiment, the time measurement may be compared for each operating region and a highly accurate decision is made possible. 
     In this way, when T becomes larger than t n , the alarm lamp 9 is lit to urge the user to conduct the appropriate maintenance work. In the meantime, the acceleration compensation factor K AC  is increased to prevent the deterioration in drivability. 
     The above-mentioned control procedure which is implemented by the engine control system 3 will be described more in detail with reference to the flowchart of FIG. 5. 
     This flowchart is started at intervals of 10 msec to retrieve the intake air amount Q A , engine speed N, oxygen sensor voltage VO 2 , throttle sensor voltage T S  and calculate the basic fuel injection pulse width T P , feedback compensation factor α, acceleration compensation actor K AC  and various compensation factors K 1  (step 101). 
     In the next step 102, the time of turning off of the idle switch 8 (accelerator pedal on) is decided. When the idle switch 8 is other than off, the process proceeds to step 109 to calculate T i . When the idle switch 8 is off, on the other hand, the time T required for shifting from the time of turning off of the idle switch 8 to the time of transfer from lean to rich side of the oxygen sensor output is measured. Further, the criterion time t n  (n: 1 to 8) is selected from the change rate of the throttle sensor voltage T S  by the classification of FIG. 4. The value T is compared with t n  (step 104), and if T is larger than t n , the up-down counter is incremented (step 105). Further, the value of the counter N is compared with a predetermined value M (step 106). The counter N is used for preventing a faulty decision operation on T and t n  and decides that carbon has been deposited only after the condition of T&gt;t n  is satisfied a number M of times. Normally, M is set to the value of 3 to 5. 
     If step 106 decides that N is smaller than M, the process proceeds to step 109 for calculating the pulse width T i . If N is larger than or equal to M, N is set equal to M at step 107, after which the NG flag is set to light the alarm lamp 9. At the same time, K AC  is multiplied by a predetermined value β as K AC  =βK AC  thereby to increase the value K AC . The basic injection pulse width T i  is thus calculated (step 109). The value of β is normally selected at 1.1 to 1.3. 
     Under normal conditions or after completion of maintenance, the decision at step 104 becomes &#34;yes&#34;, and the process proceeds to the routine on the right side in FIG. 5, where the counter N is decremented (step 110). When N is smaller than or equal to zero (step 111), N is fixed to zero (step 112), and the NG flag is reset, thereby setting β to 1 (step 113). 
     According to the present invention, as mentioned above, the amount of carbon deposit is detected and it is decided whether the amount of carbon deposit has increased to such an extent as to have an adverse effect on the engine control. If the measured time T is more than a predetermined value t n , the user is warned to promote the maintenance work. Further, during the period from the detection of a carbon deposit to the time of maintenance, an acceleration compensation is effected thereby to prevent carbon hesitation. After the NG flag is turned off at step 113, this NG flag may be read at the time of maintenance to inform the user of the need of removal of the deposit, thereby eliminating the warning to the user. 
     Another embodiment of the present invention will be explained below. 
     In this embodiment provided with an up-down counting function, as shown in FIG. 6, upon detection of an acceleration by an idle switch 8, the up-down counter count down clocks of predetermined period if the output V0 2  of the oxygen sensor 5 is on lean side, while the up-down counter counts up the clock if the output air-fuel ratio on the output V0 2  is on rich side. It is decided whether the carbon or other deposit has increased to such an amount as to have an adverse effect on the engine control according to whether the count N DU  of the up-down counter is larger or smaller than a predetermined value C after the lapse of a set criterion time T 0  following the detection of an acceleration. The criterion time T 0  and the value C are determined after a multiplicity of experiments conducted on several sample vehicles. Depending on the vehicle models, the criterion time T 0  is set to about 1 to 2 secs in view of the rise time of about 1 sec from lean to rich state under normal conditions. 
     Specifically, according to this embodiment, it is decided whether the deposit has reached a limit according to how the count N DU  of an up-down counter set to a count value N 0  stands against the criterion value C after the lapse of a predetermined period of time T 0 . 
     
         N.sub.DU ≧C→ No adverse effect of deposit 
    
     
         N.sub.DU &lt;C→ Adverse effect of deposit 
    
     As explained with reference to the foregoing embodiment, some engine control systems effects an upward compensation of the fuel during acceleration. In such a case, VO 2  becomes rich momentarily, and in the embodiment of FIG. 3, a delay time may be undesirably detected in response to the instantaneous rise to rich state, often resulting in a faulty operation of carbon deposit detection. 
     According to the embodiment of FIG. 6, by contrast, the decision is made by an integration of the time when the output V0 2  of the oxygen sensor 5 becomes rich and lean, and therefore is not substantially affected by the instantaneous incremental control such as acceleration compensation. A fully accurate control is thus obtained. 
     Now, the embodiment shown in FIG. 6 will be explained with reference to the flowchart of FIG. 7. 
     The routine shown in FIG. 7 is started at regular intervals of 10 msec to decide whether the idle switch 8 is off or not (step 120). If the decision is ON, an integration up-down counter N DU  and a time counter T are reset to zero (step 121) to end this routine. 
     If step 120 decides that the idle switch 8 is off, only the oxygen sensor takes the output voltage V0 2  (step 122), which is then compared with a slice level V L  (step 123). If V0 2  is larger than V L , the up-down counter N DU  is incremented (step 124), while if VO 2  is smaller than or equal to V L , the up-down counter N DU  is decremented (step 125). The time counter T is then incremented (step 126) and it is decided whether the time count T has become equal to a predetermined value T 0  (step 127). If T is not T 0 , this routine is ended, while if T is equal to T 0 , the integration value N DU  of the up-down counter is compared with a predetermined value C (step 128). If the decision is that N DU  is larger than or equal to C, the condition is normal, and therefore the NG flag is set to OFF. If N DU  is smaller than C, by contrast, it is decided that the deposit amount has exceeded a limit, and the NG flag is turned ON. 
     In place of the oxygen sensor for detecting an output air-fuel ratio in the embodiments mentioned above, other types of air-fuel ratio sensors may of course be used embody the invention. Also, instead of deciding on an acceleration when the idle switch is off, the fact that ΔT s  /Δt is a positive value or larger than a predetermined value may be detected alternatively to decide on an acceleration. In this case, step 102 of FIG. 5 or step 120 of FIG. 7 is changed to decide whether ΔT s  /Δt is larger than zero or not. 
     It will thus be understood from the foregoing description that according to the present invention, a carbon or other deposit in an engine intake system is detected with sufficient accuracy, and therefore an always proper maintenance and a proper compensation for the fuel supply amount by acceleration are possible, thus making it possible to prevent the deterioration of the drivability in satisfactory manner.
An in-engine deposit detection apparatus for an engine control system is disclosed, comprising a sensor for detecting the output air-fuel ratio of the exhaust gas, a device for controlling the fuel supply amount according to the output air-fuel ratio from the sensor, acceleration detector for detecting a time point when an acceleration command is given the engine, a device for measuring a value based on the time length from a command time point detected by the acceleration detector to a time point that the sensor detects the shift of the output air-fuel ratio to rich side, a device for giving a reference value defining a limit of a normal range of the measurement obtained on the basis of the time length from the command time point detected by the acceleration detection means to the time point when the sensor detects that the output air-fuel ratio has shifted to rich side, and a device for comparing the measurement from the measuring means with a reference and deciding that there exists a deposit having an adverse effect on the engine control when the measurement deviates from the normal range defined by the reference value.