Abstract:
A method for controlling the air-fuel ratio in an internal combustion engine in which the correction of a base air-fuel ratio is carried out on the basis of the determination as to whether the base air-fuel ratio is on the richer or the leaner side of the air-fuel ratio corresponding to optimum specific fuel consumption, the determination being carried out by comparing four driving state indicating signals at different air-fuel ratios with each other, the correction being directed to bringing the base air-fuel ratio closer to the air-fuel ratio corresponding to the optimum specific fuel consumption.

Description:
This is a continuation of application Ser. No. 298,735, filed Sept. 2, 1981. 
    
    
     BACKGROUND OF THE INVENTION 
     The present invention relates to a method and an apparatus for controlling the air-fuel ratio in an internal combustion engine. 
     In general, the air-fuel ratio in an internal combustion engine of a motor car in the ordinary running state is selected to be equal to or less than the stoichiometrical air-fuel ratio, in the accelerating at wide open throttle and in the hill climbing states to be equal to the value, approximately 13, corresponding to the maximum output of the engine, and in the idling state to be equal to the value chosen from the viewpoint of the stability of the engine. 
     In the prior art, for air-fuel ratio control in the ordinary running state, an open loop control of the carburetor is used in which some increase in specific fuel consumption occurs due to variation in manufactured engines, variation in the operation characteristic of an engine over time, and manufacturing variation in carburetors. In an electronically controlled fuel injection device, in which the volume of the intake air is measured by an intake air volume sensor and the like, the required amount of fuel is calculated by a computer device and the fuel is injected into the air intake manifold by an electromagnetic valve in accordance with the calculated required amount, a closed loop control is used in practice to maintain a stoichiometrical air-fuel ratio (approximately 15) by means of an oxygen concentration sensor in the exhaust duct. Also, closed loop control of a carburetor is used in practice for some kinds of engines, in which the amount of air-bleeding is modified of the stoichiometrical air-fuel ratio by the oxygen concentration sensor. Although these closed loop control systems can reduce the variation in the air-fuel ratio, these closed loop control systems involve a problem of incurring waste in the fuel consumption because the theoretical stoichiometric air-fuel ratio is not the air-fuel ratio for the best specific fuel consumption. 
     A prior art control method has been proposed in which the above described fuel consumption increase is prevented and optimum specific fuel consumption is attained. In this method, air which by-passes the carburetor is caused to dither, i.e. the air-fuel ratio is varied with a predetermined frequency to the richer and leaner side alternately, hence the direction of the air-fuel ratio which attains an improvement of the specific fuel consumption is determined, and thereby the air-fuel ratio is corrected by a subsidiary air valve which by-passes the carburetor. In this method, the engine runs for one period at an air-fuel ratio on the relatively richer side and for one period at another air-fuel ratio on the relatively leaner side, and the rotation rate N er  while running under the richer side air-fuel ratio is compared with the rotation rate N el  while running under the leaner side air-fuel ratio. The engine is controlled in such a manner that, if N er  &gt;N el , the amount of the by-passing air is decreased, while if N er  &gt;N el , the amount of the by-passing air is increased. 
     In the above described prior art control method, however, it is impossible to determine whether the variation of the rotation rate is caused by the variation of the air-fuel ratio or is caused by external factors such as accelerator action, ascending a slope, or descending a slope, if the change of the output of the engine is measured by the change of the rotation rate. Accordingly, there is a problem in this method that the control may be carried out in the direction opposite to the correct direction to improve the specific fuel consumption and thereby the specific fuel consumption may be deteriorated. Also, there is a difficulty in obtaining a subsidiary air valve, as used by this prior art system as the means for correcting the air-fuel ratio, which is capable of changing the flow area with high precision. 
     It is the main object of the present invention to provide an improved method for controlling the air-fuel ratio in an internal combustion enging in which the control is carried out in order to ensure that the specific fuel consumption in the internal combustion engine is maintained always as close to the optimum value as possible. 
     SUMMARY OF THE INVENTION 
     In accordance with an aspect of the present invention, there is provided a method for controlling the air-fuel ratio in an internal combustion engine, which comprises the steps: obtaining the base air-fuel ratio, detecting the signals which represent the status of the engine in operation, selecting the air-fuel ratio at the richer side of the base air-fuel ratio and the air-fuel ratio at the leaner side of the base air-fuel ratio in the vicinity of the base air-fuel ratio, driving the engine using an air-fuel mixture with said selected at least two air-fuel ratios in the richer and the leaner side during predetermined periods, detecting the signals which represent the status of engine during said predetermined periods, comparing at least three said detected signals, determining, based on the result of said comparison, whether the air-fuel ratio is the value in the richer or the leaner side of the air-fuel ratio corresponding to the best fuel consumption, and; correcting, based on the result of said determination, the base air-fuel ratio so as to become closer to the air-fuel ratio corresponding to the maximum specific fuel consumption. 
     In accordance with another aspect of the present invention, there is provided an apparatus for controlling the air-fuel ratio in an internal combustion engine comprising: means for varying the air-fuel ratio by varying the amount of the fuel injection of the fuel injection valve, sensors provided in the system of the internal combustion engine for detecting the operation conditions of the internal combustion engine, a computer for receiving the signals from said sensors, determining the state of the air-fuel ratio and producing the signals which are supplied to the fuel injection valve and the electromagnetic valve in the by-pass for the main air path, and; means for regulating the air-fuel ratio of the air-fuel mixture fed to the engine, wherein the determination as to whether the base air-fuel ratio is the value in the richer side or in the leaner side of the air-fuel ratio corresponding to the best fuel consumption, and the correction, based on the result of said determination, of the base air-fuel ratio so as to become closer to the air-fuel ratio corresponding to the best fuel consumption are carried out in said computer. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1A illustrates an apparatus used for the method for controlling the air-fuel ratio in an internal combustion engine as an embodiment of the present invention, 
     FIG. 1B illustrates the structure of the computer in the apparatus of FIG. 1A, 
     FIG. 2 illustrates the relationship between the pulse width and the amount of the injected fuel, 
     FIGS. 3A-3C show the flow chart which illustrates an example of the calculation process in the computer in the apparatus of FIG. 1A, 
     FIG. 4 illustrates a map stored in the memory in the computer regarding the correction pulse width, 
     FIG. 5 illustrates a time chart of the change of signals in the process of the calculation conducted by the computer, 
     FIG. 6 illustrates a graph of the relationship between the rate of the air flow and the rotational speed using the air-fuel ratios and the rates of the fuel flow as the parameters, and; 
     FIG. 7 illustrates an apparatus as another embodiment of the present invention. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     An apparatus used for controlling the air-fuel ratio in an internal combustion engine as an embodiment of the present invention is illustrated in FIG. 1A. The apparatus of FIG. 1A comprises an internal combustion engine 1, a rotational angle sensor 14 incorporated with a distributor, an intake manifold 3, a throttle valve 4 actuated by an accelerator 10, and an air flow rate sensor 6. The air flow rate sensor 6 is of the type to determine the flow rate of the air by measuring output voltage corresponding to the angle of the obstructive plate which is located in the air flow path and which changes its angle in accordance with air flow rate. The apparatus of FIG. 1A comprises also an air-transmitting down-stream duct 5 connecting the air flow rate sensor 6 with the throttle valve 4, an air cleaner 8, an air-transmitting up-stream duct 7 connecting the air cleaner 8 with the air flow rate sensor 6, a pressure sensor 9 for sensing air pressure, a throttle sensor 10 for detecting the fully-closed state and the more than 60% open state of the throttle valve 4, an electromagnetic valve 13 for regulating air flow through a by-pass for the air flow rate sensor 6 and the throttle valve 4, a by-pass air-transmitting down-stream duct 11 connecting the electromagnetic valve 13 with the air intake manifold 3, a by-pass air transmitting up-stream duct 12 connecting the air-transmitting up-stream duct 7 with the electromagnetic valve 13 and a computer unit 2. 
     The electromagnetic valve 13 is of the ON-OFF type which acts at only either the OPEN or CLOSED position. The computer unit receives signals from the air flow rate sensor 6, the rotational angle sensor 14 and the throttle sensor 10, calculates the amount of the fuel injection at the time in question as a pulse width, and produces an output signal to be supplied to the fuel injection valve 15. 
     The structure of the computer unit 2 is illustrated in FIG. 1B. The computer unit 2 comprises a central processor unit (CPU) 200, a common bus 213, a timer 214, an interruption controlling portion 202, a rotation counter 201, a digital signal receiver 203, an analog signal receiver 204, an input port 215 receiving signals of the rotational angle sensor 14, the pressure sensor 9, the throttle sensor 10 and the air flow rate sensor 6, a random access memory 207, a read only memory 208, a counter 209 for controlling the timer for the fuel injection, a power amplifier (A) 210 for producing the signal for driving the fuel injection valve 15, an output control portion 211 for determining the signal for the electromagnetic valve 13 in the by-pass route 11 and 12 and a power amplifier (B) 212 for producing the signal for driving the electromagnetic valve 13. The power source circuits 205 and 206 receive power from the battery 16 and supply power to the random access memory 207 and other elements of the computer unit 2. The key switch 17 is provided between the battery 16 and the power source circuit 206. 
     The relationship between the pulse width T and the amount of the injected fuel J in the electromagnetic fuel injection valve 15 by which the fuel under a predetermined pressure is intermittently injected in accordance with the width of the applied pulse is illustrated in FIG. 2. As the width T of the pulse produced from the computer 2 increases, the amount of the injected fuel increases linearly. T v  is the pulse width corresponding to the delay time of the opening and the closing of the fuel injection. T e  is the effective range of the width of the pulse for controlling the fuel injection valve. 
     The flow chart of an example of the calculation process in the computer 2 is illustrated in FIG. 3. When the engine 1 is started, the calculation process is started from Step S1 in which the by-pass electromagnetic valve 13 is caused to be closed. In Step S2, the initialization of the counter Y for counting the number of injection is carried out (Y←0). The injection occurs once per each rotation at a predetermined crank angle in a four-cylinder engine. The integrated number of rotations is obtained by counting the number of injections. 
     In Step S3, the rotational speed N e , the amount of the intake air Q a  and the intake air pressure P m  are introduced by the rotational angle sensor 14, the air flow rate sensor 6 and the air pressure sensor 9. In Step S4, the calculation of the main pulse width, taking the stoichiometrical air-fuel ratio (A/F=14.7) as the base value, using the rotational speed N e  and the amount of the intake air Q a  is carried out. In Step S5, the correction pulse width ΔT(p, r) corresponding to the present rotational speed N e  and the present intake air pressure P m  is read from a map, as illustrated in FIG. 4, stored in the memory. In the map illustrated in FIG. 4, the value of the rotational speed N e  and the value of the intake air pressure P m  are divided into sections with predetermined intervals, and a value of the correction pulse width ΔT(p, r) is assigned to each of the combinations of the values N e  and P m . 
     In Step S6, the decision by the throttle sensor 10 as to whether or not the opening of the throttle valve is greater than 60%, i.e. whether or not the fully-open detection switch is ON, is carried out. When the opening of throttle valve is greater than 60%, the process proceeds to Step S36. In Step S36, the main pulse width T m  is multiplied by a correction coefficient K 1  for obtaining the running air-fuel ratio (approximately equal to 13) and to the product is added the delay time T v  of the opening action of the fuel injection valve, as indicated in FIG. 2 which illustrates the relationship between the pulse width and the amount of the fuel injection. Thus, when the opening of the throttle valve is greater than 60%, the pulse width is represented by the following equation 
     
         T.sub.w =K.sub.1 ·T.sub.m +T.sub.v 
    
     In Step S37, the signal of the pulse width T w  is supplied to the fuel injection valve 15, and the process returns to Step S2. Thus, when the opening of the throttle valve is greater than 60%, no decision and correction regarding the air-fuel ratio for best fuel consumption is carried out. 
     In Step S6, when the opening of the throttle valve is less than 60%, the decision is NO and the process proceeds to Step S7. In Step S7, the decision is made as to whether or not the angle of the throttle valve provides the fully-closed state, i.e. whether or not the idle switch is ON. When the throttle valve is in fully-closed state, the decision is YES, and the process proceeds to Step S39. In Step S39, the main pulse width T m  calculated in Step S4 is multiplied by a correction coefficient K 2  and to the product of the multiplication is added the delay time T v . Thus, in the case of when the engine is idling, the pulse width T i  is represented by the following equation. 
     
         T.sub.i =K.sub.2 ·T.sub.m +T.sub.v 
    
     In Step S40, the signal of the pulse width T i  is supplied to the fuel injection valve 15, and the process returns to Step S2. Thus, in the case of idling, no decision and correction is made regarding the air-fuel ratio for best fuel consumption, as in the case where the opening of the throttle valve is greater than 60%. 
     In Step S7, when the opening of the throttle valve is not in the idling state, the decision is NO, and the process proceeds to Step S8. In Step S8, the final pulse width T r  is obtained by summing the main pulse width T m , the correction pulse width ΔT(p, r) and T v . In Step S9, the signal of the pulse width T r  is supplied to the fuel injection valve 15. 
     In Step S10, the number Y of the fuel injections is incremented by one. In Step S11, the decision continues to be NO until the number Y is incremented up to a preselected value K while the process is proceeding in the loop consisting of the routine S3 through S11. In Step S12, the number Y of the fuel injections is made zero. In Step S13, the counted number N r  of the clock pulses for K times injections, i.e. the period of the rotations for K times injections, is stored in the memory. 
     The change of signals in the above described process of the calculation is illustrated in the time chart of FIG. 5. In FIG. 5, the changes of the rotational speed N e , the air-fuel ratio A/F, the state VLV of the by-pass electromagnetic valve, the pulse width, the clock pulses and the number of the fuel injections are illustrated. The process is in the rich period (RS) while the by-pass electromagnetic valve is in the closed state (CL), and is in the lean period (LS) while the by-pass electromagnetic valve is in the open state (OP). The number K of the fuel injection is preselected as four (K=4). The engine is operated with the by-pass electromagnetic valve closed, the number of the clock pulses being equal to N r1 . 
     The above described state of the operation of the engine corresponds to the position R 1  of the graph of FIG. 6 which illustrates the relationship between the rate Q of the air flow and the rotational speed N e  of the engine under the condition that the axial torque of the engine is constant. 
     In FIG. 6, F 1 , F 2 , F 3 , F 4 , F 5 , F 6  and F 7  represent the rates of the fuel flow, where F 1  &gt;F 2  &gt;F 3  &gt;F 4  &gt;F 5  &gt;F 6  &gt;F 7 . Each of the curves identified by F 1  through F 7  represents the change of N e  in accordance with the change of Q under one of the values F 1  through F 7 . (A/F) 1 , (A/F) 2 , (A/F) 3 , (A/F) 4  and (A/F) 5  represent the air-fuel ratios. Each of the straight lines identified by (A/F) 1  through (A/F) 5  represents the change of N e  in accordance with the change of Q under one of the values (A/F) 1  through (A/F) 5 . Usually, the rotational speed becomes the maximum value when the air-fuel ratio is approximately equal to 13 under the condition that the rate of the flow of the air-fuel mixture is constant. In FIG. 6, (A/F) 2  is equal to 13. The positions M 1 , M 2 , M 3 , M 4 , M 5 , M 6  and M 7 , at which N e  attains the maximum value in each of the curves identified by F 1  through F 7 , are on the straight line identified by (A/F) 4 . The specific fuel consumption becomes optimum at the positions M 1 , M 2 , M 3 , M 4 , M 5 , M 6  and M 7  for each of the rates of the fuel flow F 1  through F 7 . It is desired in the present invention to conduct the automatic control for operating the engine at the positions M 1  through M 7 . 
     For example, when the engine is running with the rotational speed N e1 , and the initial state is at R 1  on the curve identified by F 1 , running with the optimum specific fuel consumption is attained at the middle of M 4  and M 5  i.e. at the middle of the rates F 4  and F 5  of the fuel flow. 
     In Step S14 and S15, the four rotational periods N l-1 , N r-1 , N l  and N r  in which the present rich step rotational period N r  is included are compared with each other. N l  is the preceding lean step rotational period, N r-1  is the next preceding rich step rotational period, and N l-1  is the further next preceding lean step rotational period. 
     When the existence of the relationship N l-1  &gt;N r-1  &lt;N l  &gt;N r  is acknowledged in Step S14, the decision is YES, and the process proceeds to S18. This means that, if the rotational speed increases in the rich step and decreases in the lean step, an increase in the amount of the fuel injection will cause the rotational speed and the specific fuel consumption to increase. 
     In Steps S17 and S18, the calculation of the correction ΔT(p, r) of the pulse width is carried out. The correction pulse width ΔT(p, r) corresponding to the present rotational speed N e  and the present intake air pressure P m  is read-out from the corresponding address of the map stored in the non-volatile memory in the computer, an increment Δt is added to or subtracted from the read-out correction pulse width, and the thus added or subtracted correction pulse width is written-in to the corresponding address of the memory. 
     When the existence of the relationship N l-1  &gt;N r-1  &lt;N l  &gt;N r  is not decided in Step S14, the process proceeds to Step S15. This is the case where the engine is running at a richer air-fuel ratio than that for optimum specific fuel consumption air-fuel ratio at one of the positions M 1  through M 7 . In this case, the existence of the relationship N l-1  &lt;N r-1  &gt;N l  &lt;N r  is decided in Step S15, and the process proceeds to Step S16. In Step S16, the correction pulse width ΔT(p, r) corresponding to the state of the operation is reduced by Δt, and the resulting correction pulse width is stored in the memory. Thus, the amount of the fuel injection is decreased by the amount corresponding to the pulse width Δt so that the amount of the fuel injection is brought to be close to the optimum amount. 
     When the existence of either the relationship N l  -1 &gt;N r-1  &lt;N l  &gt;N r  or the relationship N l-1  &lt;N r-1  &gt;N&lt;N r  is not decided in Steps S14 and S15, the process proceeds to Step S17 where no amendment of ΔT(p, r) is carried out. This is the case, for example, where, when the state of the operation of the engine changes in the transient period of the engine, for example in the case of acceleration by actuating the accelerator, the change of the rotational speed due to acceleration is far greater than the change of the rotational speed due to the change of the air-fuel ratio by slightly varying the rate of air-flow in the rich and the lean steps, and the rotational speed is increased gradually. Accordingly, the relationship N l-1  &gt;N r-1  &gt;N l  &gt;N r  is established and hence the decisions in Steps S14 and S15 are NO and the process proceeds to Step 17. Also, when the air-fuel ratio is equal to the optimum specific fuel consumption air-fuel ratio, the relationship N l-1  =N r-1  =N l  =N r  is established and no amendment of the correction of the pulse width is carried out so that the best fuel consumption air-fuel ratio tends to be maintained. 
     After steps S16, S17 and S18, the process proceeds to Step S19. In Step 19, the decision as to whether the present step is the rich step (X=0) or the lean step (X=1) is carried out. If it is the rich step (X=0), the decision is NO, and the process proceeds to Step S20, while if it is the lean step (X=1), the decision is YES, and the process proceeds to Step S1. When the process has proceeded from Step S1 through Step S13 as described above, the decision is NO, and the process proceeds to Step S20. In Step S20, the number Y of the injections is made zero. In this case, the process being in the lean step, the by-pass electromagnetic valve is made OPEN. 
     In Steps S22 through S24, similar calculations as in Steps S3 through S5 are carried out. In Step S25, the decision as to whether or not the opening of the throttle valve is greater than 60% is carried out. When the opening of the throttle valve is greater than 60%, the decision is YES, and the process proceeds to Step S35 where the by-path electromagnetic valve 13 is closed. In Step S36, the calculation of the pulse width for the running air-fuel ratio is carried out, and the adjustment to the optimum specific fuel consumption air-fuel ratio is interrupted. In Step S37, the signal with the calculated pulse width is supplied to the fuel injection valve 15. The process proceeds to Step S2 so that the entire process is started again. 
     When the decision in Step S25 is NO, the process proceeds to Step S26. In Step S26, the decision as to whether or not the throttle valve is in the fully-closed state is carried out. If the fully-closed state, the decision is YES, and the process proceeds to Step S38. In Step S38, the by-pass electromagnetic valve 13 is closed as in the case of Step S35. In Step S39, the calculation of the pulse width for the idling air-fuel ratio is carried out. In Step S40, the signal with the calculated pulse width is supplied to the fuel injection valve 15. The process proceeds to Step S2 so that the entire process is started again. 
     When the decision in Step S26 is NO, the process proceeds to Step S27. In Steps S27 through S29 similar calculations as in Steps S8 through S10 are carried out. In Step S30, the decision as to whether or not the number Y of the injections reaches the preselected number K is carried out. When the preselected number K is not reached, the decision is NO, and the process proceeds in the loop consisting of Steps S22 through S30. 
     When the number Y of the injections reaches K, the decision in Step S30 is YES, and the process proceeds to Step S31. In Step S31, the value of X is made one, in order to memorize that the present step is in the lean step. In Step S32, the rotational period N l  of the lean step is stored in the memory as in the case of Step S13. 
     When the existence of the relationship N r-1  &lt;N l-1  &gt;N r  &lt;N l  is decided in Step S33, the process proceeds to S18 as in the case of S14. In Step S18, the amendment Δt is added to the correction pulse width ΔT(p, r), and the amended correction pulse width is stored in the memory. When the existence of the relationship N r-1  &lt;N l-1  &gt;N r  &lt;N l  is not decided in Step S33, the process proceeds to Step S34. The decision as to whether or not the relationship N r-1  &gt;N l-1  &lt;N r  &gt;N l  is carried out in Step S34. When the existence of this relationship is decided in Step S34, the process proceeds to Step S16 where the amendment Δt is subtracted from the correction pulse width ΔT(p, r) and the amended correction pulse width is stored in the memory. When the existence of this relationship is not decided in Step S34, the process proceeds to Step S17 and no amendment of the correction pulse width ΔT(p, r) is carried out. 
     After Steps S16, S17 and S18, the process proceeds to Step S19 where the decision as to whether or not the present step is the lean step is carried out. In this case, the Steps S20 through S32 are lean steps (X=1), the decision is YES, and the process proceeds to Step S1. 
     In accordance with the above described control of the engine, if the air-fuel is different from the air-fuel ratio corresponding to the best fuel consumption, the air-fuel ratio is corrected so that the air-fuel ratio corresponding to the best fuel consumption is attained. Also, it is possible to control the engine to realize always the optimum running condition, because the optimum correction value ΔT(p, r) corresponding to each state of the running of the engine is stored in the memory in the computer. 
     The relationship between the above described process of the calculation and the driving of the motor car in which the internal combustion engine in question is mounted will be explained with reference to FIG. 6. The movement of the operation position is started at R 1  of the rich step. The operation position moves from R 1  of the rich step to L 1  of the lean step along the curve identified by F 1 . The position corresponding to the best fuel consumption on the curve identified by F 1  is M 1 . The operation position moves from L 1  to R 2 , then from R 2  to L 2 . After the operation position has reached L 2 , the existence of the relationship N(R 1 )&gt;N(L 1 )&lt;N(R 2 )&gt;N(L 2 ) is decided in Step S34, and hence the reduction of the correction pulse width by Δt is carried out in Step S16. Accordingly, the rate of the fuel flow is decreased so that the operation position moves from the curve F 1  to the position R 3  on the curve F 2 , where the value F 2  is smaller than the value F 1 . After the operation at the position R 3 , the existence of the relationship N(L 1 )&lt;N(R 2 )&gt;N(L 2 )&lt;N(R 3 ) is decided in Step 15, and accordingly the operation position moves from the curve F 2  to the curve F 3  where the value F 3  is smaller than the value F 2 . In succession such movements of the operation position to the next curve take place until the operation position reaches L 8  where the relationship N(R 5 )&gt;N(L 6 )&lt;N(R 7 )&lt;N(L 8 ) is established so that no further movement of operation position takes place. 
     Thus, the state of the running of the engine is led to the point L 8  which is quite close to the point M 7  corresponding to the best fuel consumption with a constant rate F 7  of the fuel flow. However, since at the beginning the driver of the motor car requires the rotational speed N e1 , the driver must become aware of the fall in the rotational speed from N e1  to N e2 . When the driver becomes aware of this fall, he will actuate the accelerator to raise the rotational speed up to N e1  so that the rate of fuel flow becomes the intermediate value between F 4  and F 5 . 
     In the apparatus of FIG. 1, the rate of air flow through the by-pass electromagnetic valve 13 is selected from the viewpoint that both the drivability of the motor car in which the internal combustion engine is mounted and the ability of detection of the change of the rotational speed of the engine are satisfactory. The amendment value Δt of the correction of the amount of the fuel injection is selected to be less than a half of the change of the air-fuel ratio caused by the action of the by-pass electromagnetic valve 13. 
     Although a specific embodiment of the present invention is described hereinbefore, various modifications are possible. For example, a set of decision conditions: 
     N l-1  &gt;N r-1 , N l  &gt;N r  in Step S14, 
     N l-1  &lt;N r-1 , N l  &lt;N r  in Step S15, 
     N r-1  &lt;N l-1 , N r  &lt;N l  in Step S33, and 
     N r-1  &gt;N l-1 , N r  &gt;N l  in Step S34 
     can be adopted in the flow chart of FIG. 3. 
     Also, instead of the ON-OFF type electromagnetic valve 13, an electromagnetic valve of the variable area type having a valve lift regulated by the electric current signal can be used, whereby the rate of the air-flow through the by-pass electromagnetic valve is controlled to be equal to a predetermined proportion of the rate of the air-flow through the air flow rate sensor 6. 
     An apparatus for controlling the air-fuel ratio in an internal combustion engine as another embodiment of the present invention is illustrated in FIG. 7. In the apparatus of FIG. 7, the fuel is supplied through the main nozzle 22 in the Venturi tube portion 21 of the carburetor 20 to which the fuel flows from the float chamber 23 via an air bleeding chamber 24. The air is led to the air bleeding chamber 24 through the second electromagnetic valve 25. The by-passing air flows through the first electromagnetic valve 13 in the by-pass of the carburetor 20. In the computer 2 similar calculation as in the case of FIG. 3 is carried out. The first electromagnetic valve 13 is controlled by the signals produced in the computer 2 as the result of the calculation. The regulation of the amount of the supplied fuel is carried out by varying the duty ratio of the signals with a predetermined frequency supplied to the second electromagnetic valve 25. 
     Also, in a modified embodiment of the present invention, by using two by-pass electromagnetic valves, three levels of the air-fuel ratio are prepared, i.e. the first level: &#34;no by-passing&#34; (RICH step (RS)), the second level: &#34;one by-pass electromagnetic valves ON&#34; (BASIC step (BS)), and the third level: &#34;two by-pass electromagnetic valves ON&#34; (LEAN step (LS)). The process of running of the engine changes in the following manner B 1  →R 2  →B 3  →L 4  →B 5  →R 6  →B 7 . . . When the relationships N(B 1 ), N(B 3 )&gt;N(R 2 ) and N(B 3 ), N(B 5 )&lt;N(L 4 ) are established in five running points, the correction pulse width ΔT(p, r) is adjusted by adding the value Δt, while when the relationships N(B 1 ), N(B 3 )&lt;N(R 2 ) and N(B 3 ), N(B 5 )&gt;N(L 4 ) are established in five running points, the correction pulse width ΔT(p, r) is adjusted by subtracting the value Δt.