# Patent

## Title
Method for real time capability simulation of an air system model of an internal combustion engine

## Abstract

A method for determining at least one air system variable in an air supply system of an internal combustion engine in successive, discrete calculation steps, a differential equation being provided with respect to the air system variable based on measured and/or modeled variables, which describe conditions in the air supply system, a difference equation being formed for the quantization of the differential equation according to an implicit method, and the difference equation being solved in each discrete calculation step, in order to obtain the air system variable.

## Background
RELATED APPLICATION INFORMATION
The present application claims priority to and the benefit of German patent application no. 102008043965.7, which was filed in Germany on Nov. 21, 2008, the disclosure of which is incorporated herein by reference.
FIELD OF THE INVENTION
The present invention relates to a method for the real time capability simulation of an air system model of an internal combustion engine, particularly for determining one or more air system variables, particularly the boost pressure and the air mass flow at a position in the air system downstream from the control flap.
BACKGROUND INFORMATION
The correct determination of the boost pressure and the air mass flow in the intake manifold of an internal combustion engine at the position in the air system upstream of a control flap is of central importance in maintaining exhaust gas regulations. As a rule, an engine control for controlling the internal combustion engine uses these variables, so as to maintain the appropriate exhaust gas norms.
The boost pressure and the air mass flow are usually not measured by a sensor, but have to be calculated by a dynamic model in the engine control unit in real time. These calculations are based on the sensor variables or model variables for the pressure in the intake manifold p22 (downstream from the control flap), that is, between the control flap and the inlet valves of the engine), the temperature of the aspirated air T21 (upstream of the control flap), the air mass flow {dot over (m)}1 upstream of a compressor (such as a turbocharger), the setting of the control flap POS and the stored air mass m21 in the section of the air supply system upstream of control flap 7. The relationship is described by the following equations:



  
    
      
        p
        21
      
      ⁡
      
        (
        t
        )
      
    
    =
    
      g
      ⁡
      
        (
        
          
            V
            21
          
          ,
          
            
              m
              21
            
            ⁡
            
              (
              t
              )
            
          
          ,
          
            
              T
              21
            
            ⁡
            
              (
              t
              )
            
          
        
        )
      
    
  




  
    
      
        
          m
          .
        
        2
      
      ⁡
      
        (
        t
        )
      
    
    =
    
      f
      ⁡
      
        (
        
          
            
              p
              21
            
            ⁡
            
              (
              t
              )
            
          
          ,
          
            
              p
              22
            
            ⁡
            
              (
              t
              )
            
          
          ,
          
            POS
            ⁡
            
              (
              t
              )
            
          
          ,
          
            
              T
              21
            
            ⁡
            
              (
              t
              )
            
          
        
        )
      
    
  




  
    
      
        d
        
          
            m
            21
          
          ⁡
          
            (
            t
            )
          
        
      
      
        d
        t
      
    
    =
    
      
        
          
            m
            .
          
          1
        
        ⁡
        
          (
          t
          )
        
      
      -
      
        
          
            m
            .
          
          2
        
        ⁡
        
          (
          t
          )
        
      
    
  



The functions f( ) and g( ) are model functions which describe the relationship between the physical variables. This differential equation has to be quantized by the working method of the engine control unit. This gives a difference equation of the following structure:

p21(tκ)=g(V21,m21)(tκ-1),T21)(tκ))

{dot over (m)}2(tκ)=f(p21(tκ),p22(tκ),POS(tκ),T21(tκ))

m21(tκ)=m21(tκ-1)+Δt·({dot over (m)}1(tκ)−{dot over (m)}2(tκ))

tκ=κ·Δt 

This difference equation as algorithm for the solution of the above differential equation is obtained using the so-called explicit Euler method. The use of an explicit method has the following disadvantages particularly for the quantization of air system variables:

    
    
        In certain operating ranges, this algorithm has a dynamic inaccuracy which could, under certain circumstances, also lead to instability. These dynamic inaccuracies or instabilities depend on the control flap setting and on the volume of the air system section upstream of the control flap.
        The calculation has to be carried out, for this reason, using very small time steps, in order to achieve a meaningful stability range. This considerably increases the computational time requirements and ties down considerable computing capacity of the engine control unit.
        The above model of the difference equations calculates a stationary pressure drop even at a fully opened control flap, which does not correspond to reality, as a rule. This leads to calculating inaccuracies, and thereby to an inaccurate determination of the boost pressure.
        The temperature of the aspirated outside air is recorded digitally. If its value quantization has no sufficient solution, the inverting of the least significant bit of the digital temperature signal may lead to a noise-infested air mass signal {dot over (m)}2. Consequently, an additional filtering of air mass signal {dot over (m)}2 is required. This filtering impairs the achievable dynamics, so that the latter cannot be completely utilized.
    
    


It is therefore an object of the present invention to provide a method and a device for the improved real time capability determination of an air system variable, particularly of the boost pressure and/or of the air mass flow in the air supply system, which avoid the abovementioned problems.
SUMMARY OF THE INVENTION
This object may be attained by the method for real time capability simulation of an air system variable, particularly of the boost pressure and/or of the air mass flow in an air system downstream of the control flap in an internal combustion engine according to the description herein, and a computer program according to the further descriptions herein.
Further advantageous embodiments of the present invention are delineated and further described herein.
According to one aspect, a method is provided for determining at least one air system variable in an air supply system of an internal combustion engine in consecutive discrete calculation steps. In the method, a differential equation is provided with respect to the air system variable based on measured and/or modeled variables, which describe conditions in the air supply system, a difference equation being formed for the quantization of the differential equation according to an implicit method; and the difference equation being solved in each discrete calculation step, in order to obtain the air system variable.
One idea of the above method is to quantize the differential equation, given at the outset, according to an implicit method (backward method), in place of the explicit method (forward method) given at the outset. Methods for calculating a differential equation are designated as being explicit methods, which approximate the solution by time steps. That is, from variables known at one time step, the value to be calculated, that is present after the subsequent time step, is ascertained. In this connection, an explicit method means that only values of system variables are drawn upon, for the calculation of approximating values, which occur time-wise before the value to be calculated. In the implicit method of calculating, on the other hand, the value that is to be calculated is also used.
By the use of the implicit method, a different calculation sequence may thus come about, whereby it is ensured that the time-discrete implementation, or rather, calculation of the model equation is always stable, independent of the application or the operating range. In addition, the calculation carried out in the calculation steps is able to take place in larger time steps, in comparison with the related art, whereby the required calculating time in the engine control unit is reduced. Furthermore, the static and the dynamic accuracy of the calculated boost pressure and air mass upstream of the control flap has been able to be improved.
Moreover, when the difference equation is not linear, and when it is not solvable analytically, the difference equation may be approximated by an approximation model function, the approximation model function being selected so that an analytical solution of the difference equation exists.
The difference equation may include a root function whose operand is replaced by the approximation model function, the approximation model function containing a polynomial. In particular, the root function may be equivalent to a square root function whose operand has a polynomial of the second order as approximation model function. Coefficients of the polynomial may be determined by the method of least error squares or by selecting a plurality of interpolation points, in this context.
According to one specific embodiment, the differential equation is able to describe an air supply system having at least one volume (cubic content) and having at least one throttle valve.
In particular, the at least one air system variable may correspond to the boost pressure upstream of the throttle valve and/or the air mass flow into the air supply system.
According to an additional aspect, a device is provided for determining at least one air system variable in an air supply system of an internal combustion engine in successive, discrete calculation steps, which is developed to solve a difference equation in each discrete calculation step, so as to obtain the air system variable, the difference equation being formed for the quantization of a differential equation according to an implicit method; the differential equation being provided with respect to the air system variable based on measured and/or modeled variables, which describe conditions in the air supply system.
According to a further aspect, a computer program is provided which includes a program code that executes the above method when it is run on a data processing unit.
In the following, specific embodiments of the present invention are explained in greater detail with reference to the attached drawings.



BRIEF DESCRIPTION OF THE DRAWINGS
FIG. 1 shows a schematic representation of an engine system having an internal combustion engine.
FIG. 2 shows a curve of the calculated air mass flow μZ downstream from the control flap in the case of various algorithms.
FIG. 3 shows the curves of the simulated and measured boost pressures of the explicit method and the implicit method.
FIG. 4 shows a diagram comparing the solutions ascertained using the explicit methods as well as the implicit methods.



DETAILED DESCRIPTION
FIG. 1 shows a schematic representation of an engine system 1 having an internal combustion engine 2, to which air is supplied via an air supply system 3, and from which exhaust gas is carried off via an exhaust gas removal section 4.
Air supply system 3 has a compressor 6, for instance, in the form of a supercharger driven by outflowing exhaust gas, for aspirating external air, and for applying it to a first air system section of air supply system 3. In a second air system section, which is situated upstream of compressor 6, a throttle is situated in the form of an adjustable control flap, for setting the air mass supplied to internal combustion engine 2.
Upstream of compressor 6 an air mass sensor 8 is also provided for determining the aspirated air mass flow {dot over (m)}1. A pressure sensor 9 is provided downstream from compressor 6 in the second air system section, in order to provide a pressure of the air provided via air supply system 3 shortly before the inlet into a corresponding cylinder (not shown) of internal combustion engine 2 as measured variables.
Furthermore, a temperature sensor 11 measures temperature T21 of the air upstream of control flap 7.
An engine control unit 20 is provided for receiving the measured variables, temperature T21 upstream of control flap 7, air mass flow {dot over (m)}1 upstream of compressor 6, pressure p22 downstream from control flap 7, as measured variables, and to determine from them the corresponding boost pressure p21 and air mass flow {dot over (m)}2 downstream from control flap 7. These variables are required for operating internal combustion engine 2, in particular, engine control unit 20 determines the setting of control flap 7, and the injection quantity of the fuel to be injected. Here we shall not go into the exact function of the control of internal combustion engine 2 as a function of the determined boost pressure p21 and of air mass flow {dot over (m)}2 downstream from control flap 7.
In engine control unit 20, the differential equation given at the outset is solved for the determination of these variables, and in order to avoid the problems mentioned there, it is proposed here to quantize the differential equation with the aid of an implicit method:

p21(tκ)=g(V21,m21(tκ-i),T21(tκ-i))

{dot over (m)}2(tk)=f(p21(tκ-i),p22(tκ-i),POS(tκ-i),T21(tκ-i))

m21)(tκ)=h(m21(tκ-i),{dot over (m)}1(tκ-i),{dot over (m)}2(tκ-i),Δt)

tκ=κ·Δt i+0 . . . k 

where

f( ), g( ), h( ) give model functions for describing the relationships between the variables,

P21 is the pressure upstream of control flap 7,

V21 is the volume upstream of control flap 7,

m21 is the air quantity or air mass of the air in volume V21,

T21 is the temperature of the air located in volume V21,

p22 is the pressure directly upstream of the inlet into the cylinders of the internal combustion engine,

POS is the position of control flap 7,

{dot over (m)}1 is the air mass flow upstream of compressor 6,

{dot over (m)}2 is the air mass flow downstream from control flap 7 (before a possible introduction location of recirculated exhaust gas),

tk is the elapsed time and

Δt is the cycle time of the calculations.

In this quantization, in contrast to the quantization mentioned in the introduction, using the implicit method for calculating current pressure p21(tk), the currently stored mass in the container, m21(tk) is used.
If the nonlinear equation system of the implicit method is reformed in a suitable manner, one obtains the nonlinear equation:

m21(tκ)=h(m21(tκ-i),m1(tκ-i),f(g(V21,m21(tκ-i),T21(tκ-i)),p22(tκ-i)POS(tκ-i),T21(tκ-i),Δt)

tκ=κ·Δt i+0 . . . k 

Usually this nonlinear equation system is solved in each time step tk. In special cases, this equation may, however, also be solved analytically. In general, iterative methods, such as the Newton method, are used to determine a solution.

FIG. 2 shows a comparison of air mass flows μ2 downstream from the control flap, according to various algorithms. Curve K1 shows the measured mass flow upstream of compressor 6. From this, using various algorithms, air mass flow {dot over (m)}2 is calculated in the first air system section downstream from control flap 7. For stability reasons, the algorithm up to now has to be calculated using a very small scanning time ΔT. In addition, calculated mass flow {dot over (m)}2 is strongly noise-infested. The noise may be reduced by low-pass filtering. Unfortunately, the dynamics suffer from this, whereby a clear delay comes about (see curve K4). The new algorithm is calculated using a very much greater scanning time, such as a ten times greater scanning time, whereby a clear reduction in the required running time comes about (see curve K3). Low-pass filtering is not required, whereby clearly better dynamics of the signal are obtained.
In FIGS. 3a, 3b, 3c a comparison is shown of the calculated and the measured boost pressures p21. It is clearly seen that the usual algorithm according to the explicit method is unstable in response to a large scanning time of 10*ΔT (FIG. 3a). Using the same explicit method, if the scanning time is reduced to ΔT by a factor of 10, one obtains a stable curve, which may, however, have static deviations (FIG. 3a). If the explicit method is replaced by the implicit method, one obtains a stable curve, in spite of the use of a large scanning time 10*ΔT which, in addition, is statically more accurate (FIG. 3c).
A specific example of the comparison of the solution of the differential equation is described below, when it is solved according to explicit Euler or implicit Euler. A system is given, of the form

T·{dot over (χ)}(t)+√{square root over (χ(t))}=K·u(tκ),

which corresponds to the class of model equation given at the outset; T and K are constants and do not include any time-dependent parameters. By quantizing analogously to the algorithm according to the implicit Euler method, this yields the difference equation




  
    
      
        T
        ·
        
          
            
              χ
              ⁡
              
                (
                
                  t
                  κ
                
                )
              
            
            -
            
              χ
              ⁡
              
                (
                
                  t
                  
                    κ
                    -
                    1
                  
                
                )
              
            
          
          
            Δ
            ⁢
            
              
            
            ⁢
            t
          
        
      
      +
      
        
          χ
          ⁡
          
            (
            
              t
              κ
            
            )
          
        
      
    
    =
    
      K
      ·
      
        u
        ⁡
        
          (
          
            t
            κ
          
          )
        
      
    
  




  
    
      
        T
        ·
        
          χ
          ⁡
          
            (
            
              t
              κ
            
            )
          
        
      
      +
      
        Δ
        ⁢
        
          
        
        ⁢
        t
        ⁢
        
          
            χ
            ⁡
            
              (
              
                t
                κ
              
              )
            
          
        
      
    
    =
    
      
        K
        ·
        
          u
          ⁡
          
            (
            
              t
              κ
            
            )
          
        
      
      +
      
        T
        ·
        
          χ
          ⁡
          
            (
            
              t
              
                κ
                -
                1
              
            
            )
          
        
      
    
  




  
    
      t
      κ
    
    =
    
      
        κ
        ·
        Δ
      
      ⁢
      
        
      
      ⁢
      t
    
  



It is seen that this quantizing according to the implicit Euler method leads to an implicit, nonlinear equation. This nonlinear equation may be solved by suitable methods in each time step tk.
However, in special cases this equation can be solved analytically, which is the case in the example selected in this case. One obtains:




  
    χ
    ⁡
    
      (
      
        t
        κ
      
      )
    
  
  =
  
    
      (
      
        
          (
          
            -
            
              
                Δ
                ⁢
                
                  
                
                ⁢
                t
              
              
                2
                ·
                T
              
            
          
          )
        
        +
        
          
            
              
                
                  (
                  
                    
                      Δ
                      ⁢
                      
                        
                      
                      ⁢
                      t
                    
                    
                      2
                      ·
                      T
                    
                  
                  )
                
                2
              
              +
              
                K
                ·
                
                  
                    Δ
                    ⁢
                    
                      
                    
                    ⁢
                    t
                  
                  T
                
              
            
          
          ·
          
            u
            ⁡
            
              (
              
                t
                κ
              
              )
            
          
        
        +
        
          χ
          ⁡
          
            (
            
              t
              
                κ
                -
                1
              
            
            )
          
        
      
      )
    
    2
  




This analytical solution is desirable, since it substantially reduces the calculating effort in the engine control unit.
A specific example of ascertaining boost pressure p21 (pressure upstream of the throttle valve) in an air system is described below. In this context, the nonlinear equation that is yielded by the quantization of the differential equation is made analytically soluble by an approximation function of the throttle equation.
Starting from the general form of the throttle equation

{dot over (m)}2(t)=f(p21(t),p22(t),POS(t),T21(t))

where the function f is assumed to be




  
    
      
        
          m
          .
        
        2
      
      ⁡
      
        (
        t
        )
      
    
    =
    
      
        POS
        ⁡
        
          (
          t
          )
        
      
      ·
      
        
          p
          21
        
        ⁡
        
          (
          t
          )
        
      
      ·
      
        
          
            2
            
              R
              ·
              
                
                  T
                  21
                
                ⁡
                
                  (
                  t
                  )
                
              
            
          
          ·
          
            ψ
            ⁡
            
              (
              Π
              )
            
          
        
      
    
  




  
    
      ψ
      ⁡
      
        (
        Π
        )
      
    
    =
    
      {
      
        
          
            
              
                
                  ψ
                  Krit
                
              
              
                
                  0
                  ≤
                  Π
                  <
                  
                    Π
                    Krit
                  
                
              
            
            
              
                
                  
                    
                      
                        i
                        1
                      
                      ⁡
                      
                        (
                        κ
                        )
                      
                    
                    ⁢
                    
                      (
                      
                        
                          Π
                          
                            
                              i
                              2
                            
                            ⁡
                            
                              (
                              κ
                              )
                            
                          
                        
                        -
                        
                          Π
                          
                            
                              i
                              s
                            
                            ⁢
                            κ
                          
                        
                      
                      )
                    
                  
                
              
              
                
                  
                    Π
                    Krit
                  
                  ≤
                  Π
                  ≤
                  1
                
              
            
          
          ⁢
          
            

          
          ⁢
          with
          ⁢
          
            
          
          ⁢
          Π
        
        =
        
          
            
              
                
                  p
                  22
                
                ⁡
                
                  (
                  t
                  )
                
              
              
                
                  p
                  21
                
                ⁡
                
                  (
                  t
                  )
                
              
            
            ⁢
            
              

            
            ⁢
            and
            ⁢
            
              
            
            ⁢
            with
            ⁢
            
              
            
            ⁢
            
              ψ
              Krit
            
          
          =
          
            
              
                i
                1
              
              (
              
                
                  Π
                  Krit
                  
                    i
                    2
                  
                
                -
                
                  Π
                  Krit
                  
                    i
                    2
                  
                
              
            
          
        
      
    
  



This corresponds to the general throttle equation, where p22 is the pressure downstream from the throttle valve, p21 is the boost pressure upstream of the throttle valve and K is the adiabatic exponent with K=cp/cv (cp: specific heat capacity at constant pressure, cv: specific heat capacity at constant volume) and ΠKrit is a critical pressure relationship over throttle valve 7. The values i1, i2, i3 correspond to various rational numbers which only depend on the constant K. The equation cannot be solved in an analytical manner because of the various rational exponents i2(κ), i3(κ) under the above root function.
An analytical solution for the boost pressure p21 of the above nonlinear equation may be attained at any point in time (calculation step) by suitable approximation to the above root function, with the aid of a polynomial function in a root function. In particular, the approximation using a root function having a polynomial of the second degree, as in

√{square root over (i1(κ)(Πi2(κ)−Πi2(κ)))}{square root over (i1(κ)(Πi2(κ)−Πi2(κ)))}{square root over (i1(κ)(Πi2(κ)−Πi2(κ)))}≈√{square root over ((a·Π2+b·Π=c)}

leads to tolerable errors.

The coefficients a, b, c may be determined in a known manner by the method of least squares, by the selection of suitable interpolation points or by other approximation methods. If one substitutes the approximation function into the above throttle equation, this yields an analytical solution.
FIG. 4 shows a comparison of the solutions of the exemplary system, using the various methods. Curve J1 shows the curve of the solution of the nonlinear equation when solved using an explicit Euler method, J2 shows the curve of the solution of the nonlinear equation when solved using an implicit Euler method and J3 shows the curve of the genuine solution. It will be seen that the approximation according to the implicit Euler method has no oscillation and lies close to the genuine solution of the nonlinear differential equation. If the time step is increased, the solution according to the explicit Euler method even becomes unstable, whereas the solution according to the implicit Euler method remains stable. This is a great advantage when implemented in an engine control unit.

## Claims

1. A method for determining at least one air system variable in an air supply system of an internal combustion engine in successive, discrete calculation steps, the method comprising:
providing a differential equation with respect to the air system variable based on at least one of a measured variable and a modeled variable, which describe conditions in the air supply system;
forming a difference equation for a quantization of the differential equation; and
solving the difference equation in each discrete calculation step, so as to obtain the air system variable, wherein the difference equation is formed for the quantization of the differential equation according to an implicit method.

2. The method of claim 1, wherein the implicit method corresponds to an implicit Euler method.

3. The method of claim 1, wherein the difference equation is approximated by an approximation model function if the difference equation is nonlinear and is not solvable analytically, the approximation model function being selected so that an analytical solution of the differential equation exists.

4. The method of claim 3, wherein the difference equation includes a root function whose operand is replaced by the approximation model function, the approximation model function including a polynomial.

5. The method of claim 4, wherein the root function is equivalent to a square root function whose operand has a polynomial of the second order as an approximation model function.

6. The method of claim 4, wherein coefficients of the polynomial are determined by one of the method of least error squares and by selecting a plurality of interpolation points.

7. The method of claim 1, wherein the differential equation describes an air supply system having at least one volume and having at least one throttle valve.

8. The method of claim 7, wherein the at least one air system variable corresponds to at least one of a boost pressure upstream of the throttle valve and an air mass flow into the air supply system.

9. A device for determining at least one air system variable in an air supply system of an internal combustion engine in successive, discrete calculation steps, comprising:
a control unit configured to solve a difference equation in each discrete calculation step, so as to obtain the air system variable, wherein the difference equation is formed for a quantization of a differential equation according to an implicit method, providing the differential equation with respect to the air system variable based on at least one of a measured variable and a modeled variable, which describe conditions in the air supply system.

10. A non-transitory computer readable medium having a computer program, which is executable on a data-processing unit, comprising:
a program code arrangement having program code for determining at least one air system variable in an air supply system of an internal combustion engine in successive, discrete calculation steps, by performing the following:
providing a differential equation with respect to the air system variable based on at least one of a measured variable and a modeled variable, which describe conditions in the air supply system;
forming a difference equation for a quantization of the differential equation; and
solving the difference equation in each discrete calculation step, so as to obtain the air system variable, wherein the difference equation is formed for the quantization of the differential equation according to an implicit method.