Patent Publication Number: US-2017363028-A1

Title: Controller for internal combustion engine and control method for internal combustion engine

Description:
CROSS-REFERENCE TO RELATED APPLICATIONS 
     The present application claims priority under 35 U.S.C. §119 to Japanese Patent Application No. 2016-123003, filed Jun. 21, 2016, entitled “Controller for Internal Combustion Engine.” The contents of this application are incorporated herein by reference in their entirety. 
     BACKGROUND 
     1. Field 
     The present disclosure relates to a controller for an internal combustion engine and a control method for an internal combustion engine. 
     2. Description of the Related Art 
     As a conventional controller of this type for an internal combustion engine, a controller described, for example, in Japanese Unexamined Patent Application Publication No. 2004-20205 is known. As a parameter representing a combustion condition during a lean combustion operation, the controller uses a crank angle at which a mass fraction of burned fuel (MFB) is 50% (hereinafter referred to as “MFB50”). The controller thus controls the combustion condition such that an actual MFB50, which is an actual value of the MFB50, becomes equal to a target MFB50, which is a target value of the MFB50. Furthermore, the controller divides factors causing a deviation of the actual MFB50 from the target MFB50 into: a shift in the combustion condition due to a deviation of an air-fuel ratio; and a shift in the combustion condition due to a variation in an in-cylinder flow such as a tumble flow. Thereby, the controller corrects the former shift in the combustion condition by adjusting an amount of fuel to be injected (hereinafter referred to as a “fuel injection amount”), and the latter shift in the combustion condition by adjusting ignition timing. 
     To put it specifically, the controller controls the fuel injection amount such that the actual MFB50 becomes equal to the target MFB50 while the internal combustion engine is in an operating range where an influence of the variation in an in-cylinder flow is estimated to be small. The controller calculates and stores an amount of the fuel injection amount increased or decreased by the control as a correction value for correcting the shift in the combustion condition due to the deviation of the air-fuel ratio. Thereafter, using the correction value, the controller uniformly corrects the fuel injection amount in the overall operating range of the internal combustion engine. With the fuel injection amount thus corrected, the controller controls the ignition timing such that the actual MFB50 becomes equal to the target MFB50, and calculates a change in the ignition timing made by the control as a correction value for correcting the shift in the combustion condition due to the variation in the in-cylinder flow, and stores it for each operating range of the internal combustion engine. Then, for each operating range of the internal combustion engine, the controller uniformly corrects the ignition timing using the correction value. 
     SUMMARY 
     According to a first aspect of the present invention, a controller for an internal combustion engine that performs a lean combustion operation in which a lean in-cylinder gas is injected and combusted in a cylinder, the controller includes a combustion condition parameter obtaining unit, a target value setting unit, an ignition timing calculator, a fuel ratio parameter obtaining unit, and a gain setting unit. The combustion condition parameter obtaining unit obtains a combustion condition parameter representing a combustion condition of the in-cylinder gas. The target value setting unit sets a target value for the combustion condition parameter. The ignition timing calculator calculates ignition timing using a feedback control including a predetermined gain such that the obtained combustion condition parameter becomes equal to the set target value. The fuel ratio parameter obtaining unit obtains a fuel ratio parameter representing a fuel ratio of the in-cylinder gas. The gain setting unit sets the gain for the feedback control at a larger value as the fuel ratio represented by the obtained fuel ratio parameter becomes lower. 
     According to a second aspect of the present invention, a controller for an internal combustion engine that performs a lean combustion operation in which a lean in-cylinder gas is injected and combusted in a cylinder, the controller includes an in-cylinder flow controller, a combustion condition parameter obtaining unit, a target value setting unit, a flow control parameter calculator, a fuel ratio parameter obtaining unit, and a gain setting unit. The in-cylinder flow controller controls strength of a flow of the in-cylinder gas by changing a flow control parameter. The combustion condition parameter obtaining unit obtains a combustion condition parameter representing a combustion condition of the in-cylinder gas. The target value setting unit sets a target value for the combustion condition parameter. The flow control parameter calculator calculates the flow control parameter for the in-cylinder flow controller using a feedback control including a predetermined gain such that the obtained combustion condition parameter becomes equal to the set target value. The fuel ratio parameter obtaining unit obtains a fuel ratio parameter representing a fuel ratio of the in-cylinder gas. The gain setting unit sets the gain for the feedback control at a larger value as the fuel ratio represented by the obtained fuel ratio parameter becomes lower. 
     According to a third aspect of the present invention, a controller for an internal combustion engine includes a detector and a processor. The detector detects a combustion condition of a gas in a cylinder of the internal combustion engine. The processor is configured to calculate a target combustion condition. The processor is configured to calculate an ignition timing such that the combustion condition detected by the detector becomes equal to the target combustion condition via a feedback control with a gain. The processor is configured to calculate a fuel ratio in the gas in the cylinder. The processor is configured to determine the gain so as to increase as the fuel ratio decreases. 
     According to a fourth aspect of the present invention, a controller for an internal combustion engine includes a detector and a processor. The detector detects a combustion condition of a gas in a cylinder of the internal combustion engine. The processor is configured to calculate a target combustion condition. The processor is configured to calculate a flow control parameter such that the combustion condition detected by the detector becomes equal to the target combustion condition via a feedback control with a gain. The processor is configured to calculate a fuel ratio in the gas in the cylinder The processor is configured to determine the gain so as to increase as the fuel ratio decreases. The processor is configured to control strength of a flow of the gas in the cylinder by changing the flow control parameter. 
     According to a fifth aspect of the present invention, a control method for an internal combustion engine includes calculating a target combustion condition. An ignition timing is calculated such that a combustion condition of a gas in a cylinder of the internal combustion engine becomes equal to the target combustion condition via a feedback control with a gain. A fuel ratio in the gas in the cylinder is calculated. The gain is determined so as to increase as the fuel ratio decreases. 
     According to a sixth aspect of the present invention, a control method for an internal combustion engine includes calculating a target combustion condition. A flow control parameter is calculated such that the combustion condition of a gas in a cylinder of the internal combustion engine becomes equal to the target combustion condition via a feedback control with a gain. A fuel ratio in the gas in the cylinder is calculated. The gain is determined so as to increase as the fuel ratio decreases. Strength of a flow of the gas in the cylinder is controlled by changing the flow control parameter. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
       A more complete appreciation of the invention and many of the attendant advantages thereof will be readily obtained as the same becomes better understood by reference to the following detailed description when considered in connection with the accompanying drawings. 
         FIG. 1  is a diagram schematically illustrating an internal combustion engine to which a controller related to the present disclosure is applied. 
         FIG. 2  is a block diagram illustrating the controller. 
         FIG. 3  is a flowchart illustrating a main flow of a process of calculating ignition timing in a first embodiment. 
         FIG. 4  is a flowchart illustrating a process of calculating a dilution ratio. 
         FIG. 5  is a flowchart illustrating a process of calculating a base value of the ignition timing. 
         FIG. 6  is a basic map for calculating a basic map value for the base value of the ignition timing. 
         FIG. 7  is a dilution correction map for calculating a dilution correction term for the base value of the ignition timing. 
         FIG. 8  is a flowchart illustrating a process of calculating a feedback correction term for the ignition timing. 
         FIG. 9  is a base map for calculating a base map value for a target. 
         FIG. 10  is a table for calculating a dilution correction term for the target. 
         FIG. 11  is a table for calculating a P term gain in a feedback control for calculating the ignition timing. 
         FIG. 12  is a flowchart illustrating a map learning process. 
         FIG. 13  is a diagram schematically illustrating a tumble flow controlling mechanism. 
         FIG. 14  is a flowchart illustrating a main flow of a process of calculating a tumble open angle in a second embodiment. 
         FIG. 15  is a flowchart illustrating a process of calculating a base value of the tumble open angle. 
         FIG. 16  is a flowchart illustrating a process of calculating a feedback correction term for the tumble open angle. 
         FIG. 17  is a table for calculating a P term gain in a feedback control for calculating the tumble open angle. 
         FIG. 18  is a diagram for explaining a relationship among an air-fuel ratio, MFB50 and ignition timing. 
         FIG. 19  is a diagram illustrating a part of  FIG. 18  in a magnified way. 
         FIG. 20  is a diagram for explaining a relationship among the air-fuel ratio, the MFB50 and the tumble open angle. 
     
    
    
     DESCRIPTION OF THE EMBODIMENTS 
     The embodiments will now be described with reference to the accompanying drawings, wherein like reference numerals designate corresponding or identical elements throughout the various drawings. 
     Referring to the drawings, detailed descriptions will be hereinbelow provided for preferred embodiments.  FIG. 1  illustrates an internal combustion engine (hereinafter referred to as an “engine”)  3  to which the present disclosure is applied. The engine  3  is, for example, a four-cylinder gasoline engine installed in a vehicle (not illustrated). The engine  3  is configured to perform a stoichiometric combustion operation in which the air-fuel ratio is a theoretical air-fuel ratio, and a lean combustion operation in which the air-fuel ratio is variable up to a very lean ratio (air-fuel ratio=32, for example). 
     In each cylinder  3   a  (only one cylinder is illustrated), a combustion chamber  3   d  is formed between a piston  3   b  and a cylinder head  3   c.  In each cylinder  3   a,  the cylinder head  3   c  is provided with a fuel injection valve  4  and an ignition plug  5 . The fuel injection valve  4  is of a type which directly injects fuel into the combustion chamber  3   d . An electronic control unit (ECU)  2  (see  FIG. 2 ) controls a valve open time of the fuel injection valve  4 , and thereby controls a fuel injection quantity GFUEL. The ignition plug  5  generates sparks by electrical discharge to ignite an in-cylinder gas inside the combustion chamber  3   d.  The ignition timing IG of the ignition plug  5  (timing at which sparks are generated) is controlled by the ECU  2 . 
     It should be noted that the “in-cylinder gas” means a gas to be injected into the cylinder  3   a  and supplied for the combustion. In a case where EGR, which will be discussed later, is performed, the in-cylinder gas is a mixture of air (fresh air), an EGR gas and the fuel. In a case where no EGR is performed, the in-cylinder gas is a mixture of air and the fuel. 
     The fuel injection valve  4  is integrally provided with an in-cylinder pressure sensor  21  (see  FIG. 2 ). The in-cylinder pressure sensor  21  is formed from a ring-shaped piezoelectric element, and is disposed surrounding an injection hole (not illustrated) of the fuel injection valve  4 . The in-cylinder pressure sensor  21  outputs to the ECU  2  a detection signal representing an amount DPV of change in the pressure inside the cylinder  3   a  (hereinafter referred to as a “pressure change amount DPV”). Based on the pressure change amount DPV, the ECU  2  calculates a pressure PCYL inside the cylinder  3   a  (hereinafter referred to as an “in-cylinder pressure PCYL”). 
     An intake pipe  6  and an exhaust pipe  7  are connected to the cylinder head  3   c,  and provided with an intake valve  8  for opening and closing an intake port  6   a  and an exhaust valve  9  for opening and closing an exhaust port  7   a.  In addition, an intake camshaft (not illustrated) for driving the intake valve  8  is provided with an intake phase varying mechanism  10 . 
     The intake phase varying mechanism  10  continuously varies (shifts) the opening/closing timing of the intake valve  8  by continuously changing a phase CAIN of the intake camshaft relative to a crankshaft  3   e  (hereinafter referred to as an “intake phase CAIN”). The intake phase CAIN is controlled by the driving of a control shaft (not illustrated) of the intake phase varying mechanism  10  by a VTC actuator  10   a  (see  FIG. 2 ). The operation of the VTC actuator  10   a  is controlled by the ECU  2 . 
     A throttle valve  11  is provided upstream of an intake collector  6   b  of the intake pipe  6 . The throttle valve  11  is rotatably provided inside the intake pipe  6 , and is connected to a TH actuator  11   a . An open angle of the throttle valve  11  is controlled by the controlling of the operation of the TH actuator  11   a  by the ECU  2 . Thereby, an amount GAIR of intake air (fresh air) to be taken into the combustion chamber  3   d  (hereinafter referred to as an “intake air amount GAIR”) is controlled. 
     Furthermore, the engine  3  is provided with an EGR system  13  for recirculating part of an exhaust gas, exhausted from the combustion chamber  3   d  to the exhaust pipe  7 , to the intake pipe  6  to use the part of the exhaust gas as the EGR gas. The EGR system  13  is formed from components such as an EGR passage  13   a,  an EGR valve  13   b  provided in a middle of the EGR passage  13   a,  and an EGR cooler  13   c  for cooling the EGR gas. The EGR passage  13   a  is connected to the exhaust pipe  7  and the intake collector  6   b  of the intake pipe  6 . 
     The EGR valve  13   b  is provided inside the EGR passage  13   a  in a way that makes EGR valve  13   b  movable backward and forward, and is linked to an EGR actuator  13   d.  An amount of lift of the EGR valve  13   b  is controlled by the controlling of the operation of the EGR actuator  13   d  by the ECU  2 . Thereby, an amount GEGR of EGR gas to be recirculated to the intake pipe  6  (hereinafter referred to as an “EGR amount GEGR”) is controlled. 
     Upstream of the throttle valve  11 , the intake pipe  6  is provided with an air flow sensor  22 . The intake collector  6   b  downstream of the throttle valve  11  is provided with an intake air pressure sensor  23 . The air flow sensor  22  detects the intake air amount GAIR, while the intake air pressure sensor  23  detects a pressure PBA inside the intake pipe  6  (hereinafter referred to as an “intake air pressure PBA”). The air flow sensor  22  and the intake air pressure sensor  23  output signals representing their detections to the ECU  2 . 
     The crankshaft  3   e  of the engine  3  is provided with a crank angle sensor  24 . In response to rotations of the crankshaft  3   e,  the crank angle sensor  24  outputs a CRK signal and a TDC signal, which are pulse signals, to the ECU  2 . 
     Each time the crank angle changes by a predetermined number of degrees (for example, by 1 degree), the crank angle sensor  24  outputs the CRK signal. Based on the CRK signal, the ECU  2  calculates the number NE of revolutions of the engine  3  (hereinafter referred to as an “engine speed NE”). The TDC signal indicates that in one of the cylinders  3   a,  the piston  3   b  is at the top death center (TDC) where the piston  3   b  starts an intake stroke. In the case where like in the embodiment, the engine  3  has four cylinders, the TDC signal is outputted each time the crank angle changes by 180 degrees. Based on the TDC signal and the CRK signal, the ECU  2  calculates the crank angle CA (BTDC) by using each signal generation timing as a reference (=0); and defining a positive angle as an angle in an advance angle direction. 
     Meanwhile, the intake camshaft is provided with a cam angle sensor  25 . In response to rotations of the intake cam shaft, each time the cam angle changes by a predetermined number of degrees (for example, 1 degree), the cam angle sensor  25  outputs a CAM signal, which is a pulse signal, to the ECU  2 . Based on the CAM signal and the CRK signal, the ECU  2  calculates the intake phase CAIN. 
     Furthermore, from an accelerator open angle sensor  26 , the ECU  2  receives a detection signal representing an accelerator open angle AP which is associated with how much an accelerator pedal (not illustrated) is depressed. From an atmospheric pressure sensor  27 , the ECU  2  receives a detection signal representing an atmospheric pressure PA. 
     The ECU  2  is implemented using a microcomputer including an I/O interface, a CPU, a RAM and a ROM. Depending on the detection signals from the respective sensors  21  to  27 , the ECU  2  recognizes the operating condition and combustion condition of the engine  3 , and in the first embodiment, further performs a process of calculating the ignition timing in order to control the combustion condition. 
     In the embodiment, the ECU  2  functions as a combustion condition parameter obtaining unit, a target value setting unit, an ignition timing calculator, a fuel ratio parameter obtaining unit, a gain setting unit. 
       FIG. 3  illustrates the process of calculating the ignition timing. The process calculates the ignition timing IG by using MFB50 (referring to a crank angle at which the mass fraction of burned fuel (MFB) is 50%) as a combustion condition parameter representing the combustion condition; and performing feedback control such that an actual MFB50, which is an actual value of MFB50, becomes equal to a target MFB50. This process is carried out for each cylinder  3   a  in synchronism with the generation of the TDC signal. 
     This process begins with step S 1  (denoted by S 1  in  FIG. 3 , where the same is the case with the other steps), where a dilution ratio R_DL of the in-cylinder gas is calculated.  FIG. 4  illustrates a subroutine for the calculation process. The calculation process begins with step S 11 , where it is determined whether an EGR flag F_EGR is 1 (one). The EGR flag F_EGR is set at 1 while the EGR system  13  is performing the EGR. If an answer in step S 11  is NO, that is to say, if the EGR system  13  is not performing the EGR, the EGR amount GEGR is set at 0 (zero) (in step S 12 ). 
     If the answer in step S 11  is YES, that is to say, if the EGR system  13  is performing the EGR, the EGR amount GEGR is calculated (in step S 13 ). The calculation of the EGR amount GEGR is performed by: using the detected atmospheric pressure PA and the detected intake air pressure PBA, respectively, as pressures upstream and downstream of the EGR valve  13   b;  and applying the orifice equation to the EGR valve  13   b.    
     Thereafter, using the EGR amount GEGR, the intake air amount GAIR and the fuel injection quantity GFUEL, the dilution ratio R_DL is calculated using an equation expressed with 
         R _ DL =( GAIR+GEGR )/ GRUEL    (1)
 
     (in step S 14 ), and the process is terminated. 
     As expressed above, the dilution ratio R_DL is defined as a ratio of a sum of the amount of the air and the EGR amount to the quantity of the fuel in the in-cylinder gas. A larger value of the dilution ratio R_DL means a lower fuel ratio of the in-cylinder gas. In addition, while the EGR is not performed (GEGR=0), the dilution ratio R_DL is equal to the air-fuel ratio AF. 
     Returning to  FIG. 3 , in step S 2  following step S 1 , a base value IG_BASE of the ignition timing IG is calculated. The base value IG_BASE is a feedforward term against a feedback correction term IG_FB, which will be discussed later.  FIG. 5  illustrates a subroutine for the calculation process. This process begins with step S 21 , where a base map value IG_BCAIN is calculated by searching a base map, illustrated in  FIG. 6 , depending on the engine speed NE and the intake phase CAIN. This base map value IG_BCAIN is set under the condition that: the air-fuel ratio is equal to the theoretical air-fuel ratio; and no EGR is performed, and the in-cylinder gas is not diluted with the EGR gas (EGR amount GEGR=0). 
     Thereafter, a dilution correction term IG_BDL is calculated by searching a dilution correction map, illustrated in  FIG. 7 , depending on the engine speed NE and the dilution ratio R_DL calculated in step S 1  (in step S 22 ). In this dilution correction map, the dilution correction term IG_BDL is set at a larger value (in the advance angle direction) as the dilution ratio R_DL becomes higher. This is because: a higher dilution ratio R_DL makes the in-cylinder gas harder to ignite, and the ignition delay longer; and accordingly, the ignition operation is started earlier by correcting the ignition timing IG in the advance angle direction. 
     Subsequently, the base value IG_BASE of the ignition timing IG is calculated by adding the dilution correction term IG_BDL to the base map value IG_BLAIN (in step S 23 ), and the process is terminated. 
     Returning to  FIG. 3 , in step S 3  following step S 2 , the feedback correction term IG_FB for the ignition timing IG is calculated.  FIG. 8  illustrates a subroutine for the calculation process. This process begins with step S 31 , where a base map value MFB50_BS of the target MFB50 is calculated by searching a base map, illustrated in  FIG. 9 , depending on the engine speed NE and the intake phase CAIN. The base map value MFB50_BS is set under the condition that: the air-fuel ratio is equal to the theoretical air-fuel ratio; and no EGR is performed, and the in-cylinder gas is not diluted with the EGR gas. 
     Thereafter, a dilution correction term MFB50_DL for the target MFB50 is calculated by searching a dilution correction table, illustrated in  FIG. 10 , depending on the dilution ratio R_DL (in step S 32 ). In the dilution correction table, the dilution correction term MFB50_DL is set at a larger value (in the advance angle direction) as the dilution ratio R_DL becomes higher. This is because the target MFB50 is corrected to a larger value in the advance angle direction since the burning velocity tends to become lower as the dilution ratio R_DL becomes higher. 
     Subsequently, the target MFB50 is calculated by adding the dilution correction term MFB50_DL to the base map value MFB50_BS (in step S 33 ). 
     After that, in step S 34 , the actual MFB50 is calculated. Based on a result of the detection by the in-cylinder pressure sensor  21 , the calculation of the actual MFB50 is achieved as follows. To begin with, the in-cylinder pressure PCYL is calculated by integrating the pressure change amount DPV detected by the in-cylinder pressure sensor  21 . Furthermore, a rate of change in the in-cylinder volume, the in-cylinder volume, and a rate of change in the in-cylinder pressure are calculated using the CRK signal and the TDC signal. These four parameters are calculated each time the crank angle changes by a predetermined unit number of degrees associated with the generation cycle of the CRK signal. Thereafter, using the four thus-calculated parameters and a specific heat ratio, a heat generation rate dQθ is calculated using a predetermined equation each time the crank angle changes by the predetermined unit number of degrees. After that, by integrating the thus-calculated heat generation rate dQθ, a generated heat quantity is calculated each time the crank angle changes by the predetermined unit number of degrees. Hence, for each combustion cycle, the crank angle CA at which the thus-calculated generated heat quantity becomes equal to 50% of the total generated heat quantity is calculated as the actual MFB50. 
     In step S 35  following step S 34 , a deviation e(n) of the actual MFB50 from the target MFB50 is calculated. Furthermore, a sum value Σe(n) of the deviation e(n) is calculated by adding the current deviation e(n) to the previous sum value Σe(n−1) (in step S 36 ), while a difference between the current deviation e(n) and the previous deviation e(n−1) is calculated as an amount Δe(n) of change in the deviation (hereinafter referred to as a “deviation change amount Δe(n)”) (in step S 37 ). 
     Thereafter, a P term gain Kigp, an I term gain Kigi and a D term gain Kigd for calculating the ignition timing IG are calculated by searching the respective predetermined tables depending on the dilution ratio R_DL (in step S 38 ). In a table shown as an example in  FIG. 11 , for the purpose of enhancing the responsiveness of the feedback control, the P term gain Kigp is set at a larger value as the dilution ratio R_DL becomes larger. For the same reason, each of the I term gain Kigi and the D term gain Kigd, albeit not illustrated, is also set at a larger value as the dilution ratio R_DL becomes larger. 
     Subsequently, using the thus-calculated gains Kigp, Kigi, Kigd, the feedback correction term IG_FB for the ignition timing IG is calculated using an equation expressed with 
         IG _ FB=Kigp·e ( n )+ Kigi·Σe ( n )+ Kigd·Δe ( n )   (2)
 
     (in step S 39 ), and the process is terminated. 
     Returning to  FIG. 3 , in step S 4  following step S 3  discussed above, the ignition timing IG is calculated by adding the feedback correction term IG_FB to the base value IG_BASE. 
     Eventually, map learning is carried out (in step S 5 ), and the process is terminated. The purpose of the learning process is to update one of the base map illustrated in  FIG. 6  and the dilution correction map illustrated in  FIG. 7 , which are used to calculate the base value IG_BASE of the ignition timing IG.  FIG. 12  illustrates a subroutine for the learning process. 
     This process begins with step S 41 , where it is determined whether the EGR flag F_EGR is 1 (one). If an answer in step  41  is NO, that is to say, if the in-cylinder gas is not diluted with the EGR gas, the base map is updated (in step S 42 ), and the process is terminated. The updating of the base map is achieved, for example, by: multiplying the currently-calculated feedback correction term IG_FB by a predetermined coefficient KL1 (0&lt;KL1&lt;1); and adding the multiplication value IG_FB·KL1 to a map value IG_BCAINij associated with the current engine speed NE and intake phase CAIN in the base map. 
     On the other hand, if the answer in step S 41  is YES, that is to say, if the in-cylinder gas is diluted with the EGR gas, the dilution correction map is updated (in step S 43 ), and the process is terminated. The updating of the dilution correction map is achieved, for example, by adding the multiplication value IG_FB·KL1 to a map value IG_BDLij associated with the current engine speed NE and dilution ratio R_DL in the dilution correction map. The thus-updated base map or dilution correction map is used in the subsequent process cycle(s). 
     As discussed above, in the embodiment, using the MFB50 as the combustion condition parameter, the actual MFB50, which is the actual value of the MFB50, is calculated based on the result of the detection by the in-cylinder pressure sensor  21  and the like, as well as the target MFB50, which is the target value for the MFB50, is set. Thereafter, the ignition timing IG is calculated using the feedback control such that the actual MFB50 becomes equal to the target MFB50. Accordingly, the actual MFB50 can be accurately controlled such that the actual MFB50 becomes equal to the target MFB50. 
     Furthermore, the dilution ratio R_DL of the in-cylinder gas is calculated. As the calculated dilution ratio R_DL becomes higher, the P term gain Kigp, the I term gain Kigi and the D term gain Kigd to be used for the feedback control are set at the respective larger values. Thereby, in the case where the fuel ratio of the in-cylinder gas varies, the ignition timing IG is more quickly changed as the fuel ratio becomes lower. Thus, the actual MFB50 can be accurately controlled with high responsiveness to meet the target MFB50. Accordingly, the fuel mileage and the exhaust gas characteristics can be enhanced. Meanwhile, in a fairly lean case where the fuel ratio of the in-cylinder gas is higher, the ignition timing IG is more gradually changed depending on a change in the fuel ratio. Thereby, the accuracy with which the actual MFB50 meets the target MFB50 can be enhanced. 
     Next, descriptions will be provided for a second embodiment related to the present disclosure. The second embodiment aims at controlling the strength of a tumble flow of the in-cylinder gas, instead of controlling the ignition timing IG in the first embodiment, to make the actual MFB50 equal to the target MFB50. 
       FIG. 13  illustrates a tumble flow controlling mechanism  15  that controls the strength of the tumble flow. The tumble flow controlling mechanism  15  includes: a turnable tumble control valve  15   a  disposed in each intake port  6   a;  and a tumble actuator  15   b  connected to the tumble control valve  15   a.  The tumble control valve  15   a  turns between a minimum open angle indicated with solid lines and a maximum open angle indicated with broken lines. 
     When the open angle ATC of the tumble control valve  15   a  (hereinafter referred to as a “tumble open angle ATC”) is smallest, the tumble flow is increased to its maximum by reducing the passage area of the intake port  6   a  to its minimum. As the tumble open angle ATC becomes larger, the tumble flow becomes weaker. The operation of the tumble actuator  15   b  is controlled by the ECU  2 . Furthermore, the tumble open angle ATC is detected by a tumble open angle sensor  28 , and a signal representing the detection is inputted into the ECU  2  (see  FIG. 2 ). 
     Depending on the detection signals from the sensors  21  to  27  and the tumble open angle sensor  28 , the ECU  2  performs a process of calculating the tumble open angle ATC for controlling the actual MFB50 such that the actual MFB50 becomes equal to the target MFB50. In this embodiment, an in-cylinder flow controller is implemented using the tumble flow controlling mechanism  15  and the ECU  2 . Furthermore, the ECU  2  functions as a combustion condition parameter obtaining unit, a target value setting unit, a flow control parameter calculator, a fuel ratio parameter obtaining unit, a gain setting unit. 
       FIG. 14  illustrates a process of calculating the tumble open angle ATC. In each cylinder  3   a,  this process is performed in synchronization with the generation of the TDC signal. This process is basically the same as the process of calculating the ignition timing IG in the first embodiment illustrated in  FIG. 3 , except that the tumble open angle ATC is calculated instead of the ignition timing IG. For this reason, the process will be discussed by referring to the descriptions provided for the calculation process in the first embodiment depending on the necessity whenever discussing what is common to the calculation process in the first embodiment. 
     This process begins with step S 51 , where like in step S 1  in  FIG. 3 , the dilution ratio R_DL of the in-cylinder gas is calculated according to the calculation process illustrated in  FIG. 4 . 
     In step S 52 , a base value ATC_BASE (a feedforward term) of the tumble open angle ATC is calculated according to a calculation process illustrated in  FIG. 15 . What is performed in the calculation process is basically the same as what is performed in the calculation process illustrated in  FIG. 5 . To put it specifically, in this process, in step S 61 , a base map value ATC_BLAIN is calculated by searching a base map (not illustrated), similar to that illustrated in  FIG. 6 , depending on the engine speed NE and the intake phase CAIN. The base map value ATC_BCAIN is set under the condition that: the air-fuel ratio is equal to the theoretical air-fuel ratio; and the in-cylinder gas is not diluted with the EGR gas. 
     Subsequently, depending on the engine speed NE and the dilution ratio R_DL, a dilution correction term ATC_BDL is calculated by searching a dilution correction map (not illustrated) similar to that illustrated in  FIG. 7  (in step S 62 ). In the dilution correction map, the dilution correction term ATC_BDL is set at a smaller value (in the angle reduction direction) as the dilution ratio R_DL becomes higher. This is because a higher dilution ratio R_DL makes the in-cylinder gas harder to ignite and the ignition delay longer; and accordingly, the open angle of the tumble control value  15   a  is reduced to a larger extent. 
     Subsequently, the base value ATC_BASE of the tumble open angle ATC is calculated by adding the dilution correction term ATC_BDL to the base map value ATC_BCAIN (in step S 63 ), and this process is terminated. 
     Returning to  FIG. 14 , in step S 53  following step S 52 , a feedback correction term ATC FB for the tumble open angle ATC is calculated according to a calculation process illustrated in  FIG. 16 . Steps S 71  to S 77  in this calculation process are basically the same as steps S 31  to S 37  illustrated in  FIG. 8 . To begin with, in steps S 71  to S 73 , the base map value MFB50_BS, the dilution correction term MFB50_DL and the target MFB50 are calculated, like in step S 31  to S 33 . Furthermore, in step S 74 , the actual MFB50 is calculated. The calculation of the actual MFB50 is achieved based on a result of the detection by the in-cylinder pressure sensor  21  in the same way as described above. 
     After that, in step S 75  to S 77 , the deviation e(n) of the actual MFB50 from the target MFB50, the sum value Σe(n) of the deviation e(n), and the deviation change amount Δe(n) are calculated, like in steps S 35  to S 37 . 
     Subsequently, a P term gain Ktcp, an I term gain Ktca and a D term gain Ktcd for calculating the tumble open angle ATC are calculated by searching their respective predetermined tables depending on the dilution ratio R_DL (in step S 78 ). In a table shown as an example in  FIG. 17 , for the purpose of enhancing the responsiveness of the feedback control, the P term gain Ktcp is set at a larger value as the dilution ratio R_DL becomes larger. For the same reason, each of the I term gain Ktci and the D term gain Ktcd, albeit not illustrated, is also set at a larger value as the dilution ratio R_DL becomes larger. 
     Subsequently, using the thus-calculated gains Ktcp, Ktci, Ktcd, the feedback correction term ATC_FB for the tumble open angle ATC is calculated using an equation expressed with 
         ATC _ FB=Ktcp·e ( n )+ Ktci·Σe ( n )+ Ktcd·Δe ( n )   (3)
 
     (in step S 79 ), and the process is terminated. 
     Returning to  FIG. 14 , in step S 54  following step S 53  discussed above, the tumble open angle ATC is calculated by adding the feedback correction term ATC_FB to the base value ATC_BASE. 
     Eventually, map learning is carried out in step S 55 , and the process is terminated. The purpose of the learning process is to update one of the base map defining the base map value ATC_BCAIN and the dilution correction map defining the dilution correction term ATC_BDL, which are used to calculate the base value ATC_BASE for the tumble open angle ATC. This map learning, albeit not illustrated, is performed in the same way as the learning process illustrated in  FIG. 12 . 
     To put it specifically, when the EGR flag F_EGR is 0 (zero), that is to say, when the in-cylinder gas is not diluted with the EGR gas, the base map is updated. The updating of the base map is achieved, for example, by: multiplying the currently-calculated feedback correction term ATC_FB by a predetermined coefficient KL2 (0&lt;KL2&lt;1); and adding the obtained multiplication value ATC_FB·KL2 to a map value ATC_BCAINij associated with the current engine speed NE and intake phase CAIN in the base map. 
     On the other hand, when the EGR flag F_EGR is 1 (one), that is to say, when the in-cylinder gas is diluted with the EGR gas, the dilution correction map is updated. The updating of the dilution correction map is achieved, for example, by: adding the multiplication value ATC_FB·KL2 to a map value ATC_BDLij associated with the current engine speed NE and dilution ratio R_DL in the dilution correction map. 
     As discussed above, in the embodiment, the actual MFB50 is calculated using the MFB50 as the combustion condition parameter, as well as the target MFB50 is set. Thereafter, the tumble open angle ATC of the tumble control valve  15   a  that controls the strength of the flow of the in-cylinder gas is calculated using the feedback control such that the actual MFB50 becomes equal to the target MFB50. Accordingly, the actual MFB50 can be accurately controlled such that the actual MFB50 becomes equal to the target MFB50. 
     Furthermore, as the calculated dilution ratio R_DL of the in-cylinder gas becomes higher, the P term gain Ktcp, the I term gain Ktci and the D term gain Ktcd to be used for the feedback control are set at the respective larger values. Thereby, in the case where the fuel ratio of the in-cylinder gas varies, the tumble open angle ATC is more quickly changed as the fuel ratio becomes lower. Thus, the actual MFB50 can be accurately controlled with high responsiveness to meet the target MFB50. Accordingly, the fuel mileage and the exhaust gas characteristics can be enhanced. Meanwhile, in a fairly lean case where the fuel ratio of the in-cylinder gas is higher, the tumble open angle ATC is more gradually changed depending on a change in the fuel ratio. Thereby, the accuracy with which the actual MFB50 meets the target MFB50 can be enhanced. 
     It should be noted that present disclosure is not necessarily limited to the above-discussed first and second embodiments, and may include various modes. For example, in the two embodiments, the MFB50 (referring to the crank angle at which the mass fraction of burned fuel is 50%) is used as the combustion condition parameter representing the combustion condition. However, the combustion condition parameter is not limited to the MFB50, and instead a different parameter may be used as the combustion condition parameter. For example, a crank angle at which the mass fraction of burned fuel is a predetermined ratio other than 50% (for example, MFB10 representing a crank angle at which the mass fraction of burned fuel is 10%) may be used as the combustion condition parameter. Otherwise, a mass fraction of burned fuel to occur until the crank angle reaches a predetermined number of degrees may be used as the combustion condition parameter. A maximum in-cylinder pressure PCYLMAX presenting a maximum value of the in-cylinder pressure PCYL, a maximum in-cylinder pressure angle representing a crank angle at which the in-cylinder pressure PCYL is a maximum, or the like may be also used as the combustion condition parameter. 
     Furthermore, in the second embodiment, the tumble flow controlling mechanism  15  that controls the strength of the tumble flow of the in-cylinder gas is used as the in-cylinder flow controller that controls the strength of the flow of the in-cylinder gas. Instead, however, a swirl flow controller that controls the strength of a swirl flow of the in-cylinder gas, an injection pressure controller that controls the pressure at which the fuel is injected into the cylinder  3   a,  an injection timing controller that controls the timing at which the fuel is injected into the cylinder  3   a,  or the like may be used as the in-cylinder flow controller. These controllers are capable of controlling the strength of the flow of the in-cylinder gas by changing their respective flow control parameters (for example, the open angle of a swirl control valve, the injection pressure and the injection timing). For this reason, the effect brought about by the second embodiment can be obtained from such controllers as well. From the same viewpoint, the strength of the flow of the in-cylinder gas may be controlled by: using the intake phase varying mechanism  10  of this embodiment as the in-cylinder flow controller; and changing the intake phase CAIN. 
     Moreover, although in the first and second embodiments, all of the P term gain (Kigp, Ktcp), the I term gain (Kigi, Ktci) and the D term (Kigd, Ktcd) are changed depending on the dilution ratio R_DL, only one or two of them may be changed instead. Furthermore, an amount of change may be made different among the three gains. Furthermore, although in the embodiments, the proportional integral and derivative (PID) control is used as the feedback control, it is a matter of course that a sliding mode control or the like may be instead used as the feedback control. 
     Moreover, the embodiments are the examples where the present disclosure is applied to the vehicle gasoline engine. However, the present disclosure is not necessarily limited to the vehicle gasoline engine. The present disclosure is applicable to an engine of a different type, for example a diesel engine, and to an engine for a different use purpose, for example an engine for a ship propeller, such as an outboard motor with a crankshaft oriented in the vertical direction. The second embodiment in the present disclosure is useful for the diesel engine in particular, since the second embodiment controls the combustion condition regardless of the ignition timing. Changes may be made to the detailed configuration depending on the necessity within the scope of the gist of the present disclosure. 
     A first aspect of the present disclosure describes a controller for an internal combustion engine that performs a lean combustion operation in which a lean in-cylinder gas is injected and combusted in a cylinder, the controller including, a combustion condition parameter obtaining unit that obtains a combustion condition parameter representing a combustion condition of the in-cylinder gas, a target value setting unit that sets a target value for the combustion condition parameter, an ignition timing calculator that calculates ignition timing using a feedback control including a predetermined gain such that the obtained combustion condition parameter becomes equal to the set target value, a fuel ratio parameter obtaining unit that obtains a fuel ratio parameter representing a fuel ratio of the in-cylinder gas, and a gain setting unit that sets the gain for the feedback control at a larger value as the fuel ratio represented by the obtained fuel ratio parameter becomes lower. 
     According to the first aspect of the present disclosure, the combustion condition parameter representing the combustion condition of the lean in-cylinder gas is obtained, and the target value for the combustion condition parameter is set. Thus, the ignition timing is calculated using the feedback control such that the obtained combustion condition parameter becomes equal to the target value. Accordingly, the actual combustion condition can be accurately controlled to meet the target combustion condition. 
     In addition, according to the first aspect of the present disclosure, the fuel ratio parameter representing the fuel ratio of the in-cylinder gas is obtained, and the feedback control gains to be used to calculate the ignition timing are respectively set at the larger values as the fuel ratio represented by the obtained fuel ratio parameter becomes lower. This configuration is designed by paying attention to the following relations among the fuel ratio of the in-cylinder gas, the combustion condition of the in-cylinder gas, and the ignition timing. 
     For example,  FIG. 18  illustrates how the ignition timing IG (MBT) and the MFB50 as the combustion condition parameter for maximizing the output from the internal combustion engine change depending on an air-fuel ratio AF leaner than the theoretical air-fuel ratio. As demonstrated in  FIG. 18 , as the air-fuel ratio AF becomes higher (the fuel ratio of the in-cylinder gas becomes lower), the ignition timing IG greatly shifts in an advance angle direction in a non-linear way whereas the MFB50 as a whole shifts gradually in the advance angle direction in a substantially linear way. The reason for this is as follows. As the fuel ratio of the in-cylinder gas becomes lower, the burning velocity becomes gradually lower. Accordingly, the optimal MFB50 for compensating for the decrease in the burning velocity gradually shifts in the advance angle direction. Meanwhile, as the fuel ratio of the in-cylinder gas becomes lower, the delay in the actual ignition after the ignition operation becomes longer. Accordingly, the optimal ignition timing for compensating for the delay in the actual ignition greatly shifts in the advance angle direction. 
       FIG. 19  illustrates a very lean region in  FIG. 18  where the air-fuel ratio AF is very large in case where: a target air-fuel ratio AF0 is set at 30, for example; and depending on the target air-fuel ratio AF0, the target MFB50 and the corresponding ignition timing IG are respectively set at MFB0 and IG0. When an actual air-fuel ratio AF shifts from the target air-fuel ratio AF0 by 1 (one) in the lean or rich direction, the above-discussed characteristics make the target MFB50 change by a smaller amount in the advance or retard angle direction (to MFBL or MFBR) while making the ignition timing IG for achieving the target MFB50 change by a larger amount in the advance or retard angle direction (to IGL or IGR). 
     To put it specifically, when the actual air-fuel ratio AF shifts from the target air-fuel ratio AF0, an amount of manipulation of the ignition timing IG (ΔIGL or ΔIGR) which is needed to make the actual MFB50 equal to the target MFB50 becomes larger as the air-fuel ratio becomes leaner. A similar relationship is observed as being established between the amount of manipulation of the ignition timing IG and the fuel ratio of the in-cylinder gas which is diluted with an EGR gas while EGR is being carried out. As the fuel ratio of the in-cylinder gas becomes lower, the mount of manipulation of the ignition timing IG becomes larger. 
     The foregoing configuration in the first aspect of the present disclosure is designed with the foregoing relationships taken into consideration. As the fuel ratio represented by the obtained fuel ratio parameter becomes lower, the configuration sets the feedback control gains to be used to calculate the ignition timing at the respective larger values. Thereby, even in a case where the fuel ratio of the in-cylinder gas is lower, the configuration quickly changes the ignition timing depending on the fuel ratio when the fuel ratio changes. Thus, the configuration is capable of: with high responsiveness, accurately controlling the actual combustion condition to meet the target combustion condition; and thereby enhancing the fuel mileage and the exhaust gas characteristics. Meanwhile, in a case where the fuel ratio of the in-cylinder gas is higher, the configuration sets the feedback control gains at the respective smaller values. Thereby, the configuration is capable of enhancing the accuracy with which the actual combustion condition meets the target combustion condition. 
     A second aspect of the present disclosure describes a controller for an internal combustion engine that performs a lean combustion operation in which a lean in-cylinder gas is injected and combusted in a cylinder, the controller including, an in-cylinder flow controller that controls strength of a flow of the in-cylinder gas by changing a flow control parameter, a combustion condition parameter obtaining unit that obtains a combustion condition parameter representing a combustion condition of the in-cylinder gas, a target value setting unit that sets a target value for the combustion condition parameter, a flow control parameter calculator that calculates the flow control parameter for the in-cylinder flow controller using a feedback control including a predetermined gain such that the obtained combustion condition parameter becomes equal to the set target value, a fuel ratio parameter obtaining unit that obtains a fuel ratio parameter representing a fuel ratio of the in-cylinder gas, and a gain setting unit that sets the gain for the feedback control at a larger value as the fuel ratio represented by the obtained fuel ratio parameter becomes lower. 
     The controller for an internal combustion engine according to the second aspect of the present disclosure includes an in-cylinder flow controller, and controls the combustion condition by: changing the flow control parameter; and thereby controlling the strength of the flow of the in-cylinder gas. According to the second aspect of the present disclosure, the combustion condition parameter representing the combustion condition of the lean in-cylinder gas is obtained, and the target value for the combustion condition parameter is set, like in the first aspect of the present disclosure. Furthermore, the flow control parameter is calculated using the feedback control such that the obtained combustion condition parameter becomes equal to the target value. Thereby, the actual combustion condition is accurately controlled to meet the target combustion condition. 
       FIG. 20  illustrates how the MFB50 as the combustion condition parameter and an open angle ATC of a tumble control valve (hereinafter referred to as a “tumble open angle ATC”) as the flow control parameter, which maximize the output from the internal combustion engine, change relative to an air-fuel ratio AF than the theoretical air-fuel ratio. As illustrated in  FIG. 20 , as the air-fuel ratio AF becomes higher, the MFB50 as a whole shows a gradual and substantially linear change to a value corresponding to an advance angle while the tumble open angle ATC shows a progressive and non-linear change to a value corresponding to the angle reduction. The reasons for this are as follows. As the air-fuel ratio AF becomes higher (the fuel ratio of the in-cylinder gas becomes lower), the burning velocity becomes gradually lower, and an optimal MFB50 for compensating for the gradual decrease in the burning velocity gradually shifts to a value corresponding to the advance angle. In contrast, as the air-fuel ratio AF becomes higher (the fuel ratio of the in-cylinder gas becomes lower), an amount of change in the flow strength needed to secure the optimal MFB50 increases, and the tumble open angle ATC needs to be reduce to a large extent in response to the increased amount of change in the flow strength. 
     As a result, an amount of manipulation of the tumble open angle ATC needed to make the actual MFB50 equal to the target MFB50 when the actual air-fuel ratio AF shifts from the target air-fuel ratio becomes larger as the air-fuel ratio becomes leaner. A similar relationship is observed as being established between the amount of manipulation of the tumble open angle ATC and the fuel ratio of the in-cylinder gas which is diluted with a large amount of EGR gas while EGR is being carried out. As the fuel ratio of the in-cylinder gas becomes lower, the amount of manipulation of the tumble open angle ATC becomes larger. 
     The above-discussed configuration disclosed in this application is designed with the foregoing relationships taken into consideration. As the fuel ratio represented by the obtained fuel ratio parameter becomes lower, the configuration sets the feedback control gains to be used to calculate the flow control parameter for the in-cylinder flow controller at the respective larger values. Thereby, even in a case where the fuel ratio of the in-cylinder gas is lower, the configuration quickly changes the flow control parameter depending on the fuel ratio when the fuel ratio changes. Thus, the configuration is capable of: with high responsiveness, accurately controlling the actual combustion condition to meet the target combustion condition; and thereby enhancing the fuel mileage and the exhaust gas characteristics. Meanwhile, in a case where the fuel ratio of the in-cylinder gas is higher, the configuration sets the feedback control gains at the respective smaller values. Thereby, the configuration is capable of enhancing the accuracy with which the actual combustion condition meets the target combustion condition. 
     In the controller for an internal combustion engine according to the second aspect of the present disclosure, a third aspect of the present disclosure describes the in-cylinder flow controller be any one of a tumble flow controller that controls strength of a tumble flow of the in-cylinder gas, a swirl flow controller that controls strength of a swirl flow of the in-cylinder gas, an injection pressure controller that controls a pressure of injecting fuel into the cylinder, and an injection timing controller that controls timing of injecting the fuel into the cylinder. 
     The four foregoing controllers (the tumble flow controller, the swirl flow controller, the injection pressure controller and the injection timing controller) all are capable of controlling the strength of the flow of the in-cylinder gas by changing their respective flow control parameters. For this reason, use of one of these controllers as the in-cylinder flow controller makes it possible to obtain the same effects as discussed with respect of the second aspect of the present disclosure. 
     Obviously, numerous modifications and variations of the present invention are possible in light of the above teachings. It is therefore to be understood that within the scope of the appended claims, the invention may be practiced otherwise than as specifically described herein.