FIELD OF THE INVENTION 
       [0001]    The present invention relates to the operation of internal combustion engines based on a state variable of the air system acquired in an engine system having an internal combustion engine, and in particular to actions to filter or smooth the state variable for further processing in an engine control unit. 
       BACKGROUND INFORMATION 
       [0002]    Acquisition of one or more state variables relating to an air flow in an air system, for example a mass flow or a pressure, is necessary for the operation of an internal combustion engine. This variable is furnished to an engine control unit as a corresponding sensor signal. 
         [0003]    Because of the regular opening and closing of the intake valves, however, pulsations occur in the flow of delivered fresh air in the air system of the internal combustion engine. Because of the offset interaction of the intake valves, the pulsations produced by the individual cylinders become superimposed, and form in the air system a pressure wave whose amplitude depends on the position of the throttle valve, the position of any exhaust gas recirculation valve, the geometry of conduits of the air system, and the engine speed. 
         [0004]    The pulsation represents an interference variable in the state variable that is to be acquired, which is measured by sensors, for example the air mass sensor or pressure sensors, and is used in the engine control unit to control the internal combustion engine with the aid of actuators, for example the throttle valve of the exhaust gas recirculation valve, the wastegate valve, and the like. 
         [0005]    Upon further processing of the state variable, as a rule the pulsation produced by engine operation is intended to remain out of consideration. State variables describing the air flow in the air system are therefore pre-processed by way of a digital filter concept in the engine control unit. 
       SUMMARY 
       [0006]    A method for identifying an averaged sensor value of a state variable of an air system for an internal combustion engine, and the apparatus in accordance with the coordinated claim, are provided according to the present invention. 
         [0007]    According to a first aspect, a method for identifying an averaged sensor value of a state variable of an air system for an internal combustion engine in a motor vehicle is provided, having the following steps:
       acquiring and temporarily storing sensor values at a predefined sampling interval during a segment duration of the state variable, the segment duration corresponding to one or more periods of a pulsation of the state variable;   determining an average of the sensor values acquired within the segment duration; and   correcting the average of the sensor values that has been determined, using a correction variable that depends on the time difference between the segment duration and a multiple of the sampling interval.       
 
         [0011]    State variables of an air system of an internal combustion engine which relate, for example, to a pressure or a mass flow of a gas stream, in particular of an air stream, are usually suitably computationally filtered in the engine control unit of the internal combustion engine, in particular by being averaged. The averaging occurs over one segment duration or several segment durations. “Segment duration” refers to the time duration that corresponds to one oscillation period of the pulsations (pulsation period) of the gas in the air system of the internal combustion engine. The engine control unit receives the sensor values of the relevant sensor for the state variable at regular query times corresponding to the sampling intervals, and averages them over the one or more segment durations. 
         [0012]    Because the engine speed represents a continuous variable, the segment durations can also vary continuously. Because the state variable is sampled at specified points in time, a discrepancy can occur between the segment duration and the evaluation period, which corresponds to the time duration during which the sensor values of the sensor for the state variable are taken into consideration within the segment duration. This discrepancy causes a so-called “residual area error” in the calculation of the average, since the discrete sensor values at the beginning and end of the sampling period are not weighted appropriately. A jitter thus occurs because of the discrepancy between the evaluation period and the segment duration, so that the transfer function of the averaging filter is also affected by a jitter. The damping of the pulsation frequency by the averaging function thus ends up being less than would be desirable. 
         [0013]    The resulting residual area error depends on the pulsation amplitude of the pulsation frequency and on the deviation in time between the beginning and end of the segment duration, and on the points in time of the first and last sensor value to be considered in the segment duration. Because of the time correlation, the error cannot be corrected by a pulsation correction; it therefore leads to additional signal tolerances and degrades the signal to noise ratio of the processed sensor signal. 
         [0014]    One idea of the above method is to correct, by way of the differences that occur between the one or more segment durations and the evaluation period, the error in the averaging of a sensor variable that pulses because of the cyclical operation of the internal combustion engine. For this, in the averaging operation a residual time, constituting a difference between the segment duration and the evaluation period, is correspondingly taken into consideration upon averaging. As a result, the additional signal tolerance due to the difference between the average over the evaluation period and the (as a rule, longer) segment duration can be reduced, and the signal to noise ratio can be improved. 
         [0015]    In addition, the segment duration of the current segment can be identified as a function of a current rotation speed of the internal combustion engine. 
         [0016]    According to an embodiment, the correction value can be identified as a function of that measured value which is found immediately before a starting point in time that is obtained from an ending point in time, at which, after an end of the segment duration, a sensor value is to be acquired, minus the segment duration. 
         [0017]    Provision can be made that the correction value is identified as a function of a correction time duration that is obtained from the time difference between the segment time duration and a time duration that is determined by the product of the sampling interval and the number of sensor values acquired between the starting point in time and the ending point in time. 
         [0018]    In particular, the state variable can correspond to a gas mass flow or a pressure in the air system of the internal combustion engine. 
         [0019]    Provision can be made that the determination of the average, and the correction of the average that has been determined, are carried out when an end of the segment duration is reached, that duration being predefined by a predetermined crankshaft angle of a crankshaft of the internal combustion engine. 
         [0020]    According to a further aspect an apparatus, in particular an engine control unit, is provided for identifying an averaged sensor value of a state variable of an air system for an internal combustion engine in a motor vehicle, the apparatus being embodied:
       to acquire and temporarily store sensor values at a predefined sampling interval during one or more segment durations of the state variable, the segment duration corresponding to one period of a pulsation of the state variable;   to determine an average of the sensor values acquired within the one or more segment durations;   to correct the average of the sensor values that has been determined, using a correction variable that depends on the time difference between the one or more segment durations and a multiple of the sampling interval.       
 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0024]      FIG. 1  schematically depicts an engine system having flow sensors and pressure sensors whose sensor values pulsate because of the four-cycle operation of the internal combustion engine. 
           [0025]      FIG. 2  is a flow chart to illustrate a method for determining a filtered sensor signal. 
           [0026]      FIG. 3  is a diagram of sensor signal over time, indicating the evaluation period and the segment duration. 
       
    
    
     DETAILED DESCRIPTION 
       [0027]      FIG. 1  schematically shows an engine system  1  having an internal combustion engine  2 . Internal combustion engine  2  has cylinders  3  to which air is delivered via an air system  4  and from which combustion exhaust gas is discharged via an exhaust gas discharge section  5 . 
         [0028]    A boost device  6 , which has a turbine  61  in exhaust gas discharge section  5  in order to convert exhaust gas enthalpy into mechanical energy and use that to drive a compressor  62 , can be provided. Compressor  62  is disposed in air system  4  and serves to draw in fresh air from the environment via an air filter  41  and make it available via a boost air cooler  7  in a boost pressure portion  42  of air delivery system  4 . Boost pressure portion  42  is delimited downstream by a throttle valve  8 . An intake manifold portion  43  is provided between throttle valve  8  and the intake valves of cylinders  3  of internal combustion engine  2 . 
         [0029]    An exhaust gas recirculation conduit  9 , which connects exhaust gas discharge section  5  to intake manifold portion  43  of air delivery system  4  in a region between the exhaust valves of internal combustion engine  2  and turbine  61  of the exhaust-gas-driven boost device  6 , can furthermore be alternatively or additionally provided. An exhaust gas recirculation valve  91 , which is variably controllable in order to adjust an exhaust gas mass flow into intake manifold portion  43 , is provided in exhaust gas recirculation conduit  9 . 
         [0030]    The above engine system  1  furthermore encompasses an engine control unit  15  that, as a function of state variables acquired via sensors and in accordance with a specified target torque, performs an application of control to internal combustion engine  2 , in particular by specifying control variables to actuators, for example to throttle valve  8  and to exhaust gas recirculation valve  91 , by specifying opening and closing times of the intake and exhaust valves on cylinders  3 , and the like. 
         [0031]    The above-described configuration of an engine system  1  having an internal combustion engine is merely exemplifying, and what is described below can also be used in engine systems having internal combustion engines with no boost device and/or with no exhaust gas recirculation. 
         [0032]    In order to operate internal combustion engine  2 , engine control unit  15  receives sensor variables from sensors disposed in engine system  1 , for example a mass flow sensor  10 , an intake manifold pressure sensor  11 , an exhaust gas pressure sensor  12 , and the like. Based on the sensor values and on state variables modeled therefrom, engine control unit  15  applies control in known fashion to internal combustion engine  2  in order to furnish a desired torque. 
         [0033]    Because of the four-stroke operation of internal combustion engine  2 , all sensor values of sensor variables which relate to gas mass flows or gas pressures are impinged upon by pulsations that result from the valve interactions of intake and exhaust gas valves of cylinders  3  of internal combustion engine  2 . 
         [0034]    A method for furnishing a filtered sensor variable will be described below in the flow chart of  FIG. 2 . For this, the sensor variable is to be filtered in such a way that the periodic fluctuations of the sensor values, produced by the pulsations of the measured state variable, are eliminated. 
         [0035]    In step S 1 , a sensor value of the sensor variable to be evaluated is acquired and is stored in engine control unit  15 . A representation of a profile of the air mass flow is depicted in  FIG. 3  on the basis of successively acquired sensor values m. In conjunction with step S 3  (explained below), the sensor values are cyclically sampled, acquired, and stored at predefined points in time, i.e. at regular sampling intervals At, for example every millisecond. Because no further information about the sensor variable is available until a respective next sensor value is acquired, there is assumed to be a constant progression until acquisition of the next sensor value. This produces the step-shaped sensor variable profile that is depicted. 
         [0036]    In addition, in step S 2  a current segment duration T segment  is furnished, obtained as follows from the engine speed D as a result of the four-stroke operation of internal combustion engine  2 : 
         [0000]        T   segment =(60·2)/( D ·cyl)
 
         [0000]    where cyl corresponds to the number of cylinders of internal combustion engine  2 . 
         [0037]    Step S 3  checks whether an ending point in time of the current segment has been reached. This can be done by way of a query of the crankshaft angle, usually furnished accurately in the engine control unit. The segment duration is obtained in particular from the number of combustion cycles in cylinders  3  during two rotations of the crankshaft. A specific ending point in time of the segment can thus be associated with specific crankshaft angles. The ending points in time correspond to the points in time at which the crankshaft angles reach one of the angles 720°/k, where k=1 . . . cyl. 
         [0038]    If it is found in step S 3  that a specific crankshaft angle has been reached or exceeded (“Yes” alternative), the method continues with step S 4 ; if not (“No” alternative), execution branches back to step S 1 . 
         [0039]    An average is then identified from the sensor values acquired during the previous segment, in order to furnish a filtered sensor variable. The sensor values acquired at this point in time correspond to m(t n ), m(t n+1 ), m(t p ), where n, n+1, . . . , p corresponds to a counter of the sensor values acquired successively at each sampling point in time within the segment. 
         [0040]    If the end of the segment duration does not coincide with a stipulated sampling point in time for the sensor variable, then in step S 4  the segment change is shifted virtually to the point in time t p+1  of the next sensor value to be acquired, so that the validity of the discrete sensor value m(t p ) most recently acquired belongs entirely to the new virtual segment. In principle, the end of the segment in which an average of the acquired sensor values is to be identified is shifted to an ending point in time t e  of a virtual segment, which is obtained as a point in time t p +Δt, where the point in time t p  corresponds to the point in time of the sensor value m(t p ) most recently acquired within the segment, and Δt corresponds to the sampling interval of the sensor, or (1/Δt) of the sampling frequency. 
         [0041]    In a further step S 5 , firstly the starting point in time t a  of the virtual segment is identified from the ending point in time t e  of the virtual (i.e. shifted) segment, with the aid of the segment duration T segment . The sensor value that was acquired immediately before the virtual starting point in time t a  of the segment is then identified. This can be the sensor value m(t n−1 ) or m(t n ), depending on the current segment duration T segment  and sampling interval Δt. 
         [0042]    In step S 6  a correction time duration Δt n , Δt n− , between the virtual starting point in time t a =t e −T segment  of the shifted virtual segment and the measurement point in time of a measurement point in time next following it, at which a sensor value was acquired, is then determined, as follows: 
         [0043]    Case 1: 
         [0044]    Δt n =T segment −(p−n)Δt, if the first measured value m(t n ) acquired in the segment after the shifting of the segment is located outside the virtual segment; and 
         [0045]    Case 2: 
         [0046]    Δt n−1 =T segment −(p+1−n)Δt, if the first measured value m(t n ) acquired in the segment after the shifting of the segment is located inside the virtual segment. 
         [0047]    In the above equations, p corresponds to a counter of the first sensor value m(t p ) acquired inside the segment, and n corresponds to a counter of the sensor value m(t n ) most recently acquired within the segment. 
         [0048]    In step S 7 , the average of the sensor variables over all relevant sensor values is determined as follows: 
         [0049]    for case 1: 
         [0000]    
       
         
           
             
               
                 m 
                 _ 
               
               = 
               
                 
                   
                     Δ 
                      
                     
                         
                     
                      
                     
                       
                         t 
                         n 
                       
                       · 
                       
                         m 
                          
                         
                           ( 
                           
                             t 
                             n 
                           
                           ) 
                         
                       
                     
                   
                   + 
                   
                     Δ 
                      
                     
                         
                     
                      
                     t 
                      
                     
                       
                         ∑ 
                         
                           i 
                           = 
                           
                             n 
                             + 
                             1 
                           
                         
                         p 
                       
                        
                       
                           
                       
                        
                       
                         m 
                         i 
                       
                     
                   
                 
                 
                   T 
                   segment 
                 
               
             
             ; 
           
         
       
     
         [0050]    for case 2: 
         [0000]    
       
         
           
             
               m 
               _ 
             
             = 
             
               
                 
                   
                     Δ 
                      
                     
                         
                     
                      
                     
                       
                         t 
                         
                           n 
                           - 
                           1 
                         
                       
                       · 
                       
                         m 
                          
                         
                           ( 
                           
                             t 
                             
                               n 
                               - 
                               1 
                             
                           
                           ) 
                         
                       
                     
                   
                   + 
                   
                     Δ 
                      
                     
                         
                     
                      
                     t 
                      
                     
                       
                         ∑ 
                         
                           i 
                           = 
                           n 
                         
                         p 
                       
                        
                       
                           
                       
                        
                       
                         m 
                         i 
                       
                     
                   
                 
                 
                   T 
                   segment 
                 
               
               . 
             
           
         
       
     
         [0051]    Thanks to the above formulas, all sensor values that are located entirely inside the virtual segment are weighted with the sampling interval Δt, while the sensor value that was acquired before the virtual starting point in time t a  of the segment is weighted with the time difference previously calculated in step S 6 . The sum is correspondingly divided by the segment duration T segment , yielding an average value of the sensor values which contains an additive correction variable 
         [0000]    
       
         
           
             
               Δ 
                
               
                   
               
                
               
                 
                   t 
                   n 
                 
                 · 
                 
                   m 
                    
                   
                     ( 
                     
                       t 
                       n 
                     
                     ) 
                   
                 
               
             
             
               T 
               segment 
             
           
         
       
       
         
           or 
         
       
       
         
           
             
               
                 Δ 
                  
                 
                     
                 
                  
                 
                   
                     t 
                     
                       n 
                       - 
                       1 
                     
                   
                   · 
                   
                     m 
                      
                     
                       ( 
                       
                         t 
                         
                           n 
                           - 
                           1 
                         
                       
                       ) 
                     
                   
                 
               
               
                 T 
                 segment 
               
             
             . 
           
         
       
     
         [0052]    Further calculations can then be performed in the engine control unit using the sensor variable  m  averaged in this fashion. 
         [0053]    Determination of the correction variable by virtual shifting of the segment enables simplified calculation, since otherwise the time-related discretization errors both at the starting point in time of the segment and at the ending point in time of the segment must be taken into consideration. With the method described above it is not necessary to obtain the exact starting and ending points in time of the segment, and it is sufficient merely to identify the segment duration T segment  by way of the engine speed n.
A method is provided for identifying an averaged sensor value of a state variable of an air system for an internal combustion engine in a motor vehicle, comprising the following steps: acquiring and temporarily storing sensor values at a predefined sampling interval during a segment duration of the state variable, the segment duration corresponding to one period of a pulsation of the state variable; determining an average of the sensor values acquired within the segment duration; correcting the average of the sensor values that has been determined, using a correction variable that depends on the time difference between the segment duration and a multiple of the sampling interval.