Abstract:
An calibration optimization method for a direct injection spark ignition (DISI) engine with a lean NO x  trap is disclosed. The method relies on a fixed structure optimization whereby reasonable powertrain operating policies are assumed and parametrized with a small number of variables with some of the variables playing the role of parameters for an inner loop optimization of an outer loop/inner loop two-stage optimization formulation. The values of the parameters are determined via a numerical solution of the resulting (outer loop) optimization to minimize the fuel consumption over the drive cycle subject to emission constraints.

Description:
TECHNICAL FIELD 
     This invention relates to a method of optimizing powertrain operation and, more particularly, to a static calibration optimization method to improve fuel economy and emissions in a direct injection spark ignition (DISI) that is based on both the present operating conditions of the powertrain as well as the past operating history. 
     BACKGROUND ART 
     Stringent emission regulations and improved fuel economy and performance dictate more advanced powertrain configurations than standard port-fuel injected gasoline engines. Modern state-of-the-art powertrain systems may combine several power sources (internal combustion engines, electric motors, fuel cells, etc.) and various exhaust after-treatment devices (catalytic converters including lean NOx traps, particulate filters, etc.) in addition to conventional engine subsystems such as turbochargers and exhaust gas recirculation. The determination of the way in which these systems need be operated to meet driver&#39;s torque demand, performance and fuel economy expectations while satisfying federal emission regulations is a complex and a multi-objective optimal control problem. 
     The advanced powertrains are characterized by an increased number of control inputs as compared to the conventional powertrains and by significant subsystem interactions. As a result, optimizing the operation of these powertrains is significantly more difficult than optimizing a conventional powertrain. Additional complications arise due to the need to treat engine subsystems with energy or emission storage mechanisms, e.g., a battery or an emission trap. These storage mechanisms change the nature of the optimization task in a fundamental way. 
     Optimization procedures for the conventional gasoline or diesel powertrains are well known (e.g., Rao, H. S., Cohen, A. I., Tennant, J. A., and Voorhies, K. L., “Engine Control Optimization Via Nonlinear Programming”, SAE Paper No. 790177; Rishavy, E. A., Hamilton, S. C., Ayers, J. A., Keane, M. A., “Engine Control Optimization for Best Fuel Economy with Emission Constraints”, SAE Paper No. 770075; and Scmitz, G., Oligschlager, U., and Eifler, G., “Automated System for Optimized Calibration of Engine Management Systems”, SAE Paper No. 940151). These references make extensive use of the “quasi-static” assumption that substantially simplifies the optimization problem. This “quasi-static” assumption is that the internal combustion engine fuel consumption and feedgas emission values at any given time instant are static functions of engine speed, engine torque and control variables (such as fueling rate, spark timing, EGR valve position, etc.) at the same time instant. Steady-state engine mapping data generated experimentally or from a high fidelity simulation model are typically used to develop these static functions. This “quasi-static” assumption is appropriate for establishing trends and relative effects for the warmed-up operation. Once the optimized strategies have been generated under the “quasi-static” assumption, the actual numbers for emissions and fuel economy are typically validated, either experimentally or on a more detailed powertrain simulation model that incorporates transient effects. This “quasi-static” assumption is also used as a basis for several simulation and modeling packages. 
     To illustrate the use of the “quasi-static” assumption, consider, for example, the optimization procedure for a conventional port-fuel injected (PFI) spark ignition engine equipped with a Three-Way-Catalyst (TWC). First the engine speed and engine torque trajectories are derived from a vehicle speed profile (FIG. 1) using the estimates of the vehicle mass, tire radius, aerodynamic drag coefficient, frontal area, rolling resistance coefficient, gear ratios, shift schedule, idle speed value and power losses in the drivetrain. The time trajectory of the engine speed (N e ) and the engine torque (τ e ) is then a prescribed two dimensional vector w(t)=[N e (t)τ e (t)] T . Next, a discrete grid on the engine speed and engine torque values is introduced which divides the engine speed/engine torque plane into M rectangular cells, C i , i=1, . . . , M. Let T(i) be the total time the engine operates in the cell C i  over the specified drive cycle while w i  is the speed/torque vector corresponding to the center of the cell C i . For each of the cells C i , the values of the control inputs u i  (fueling rate, spark timing, EGR rate, etc.) must be prescribed so that the fuel consumption over the drive-cycle is minimized while the emission constraints are met:                  ∑     i   =   1     M              W   f          (       u   i     ,     w   i       )            T        (   i   )           →   min           (   1   )                                
     subject to                  ∑     i   =   1     M              W     s   j            (       u   i     ,     w   i       )            T        (   i   )           ≤       g   j     .             (   2   )                                
     Here W f (u,w) denotes the fueling rate in gram per second, W s     j    (u,w) is the mass flow rate of the jth regulated emission species (oxides of nitrogen (NO x ), carbon monoxide (CO) and hydrocarbons (HC)) out of the tailpipe in gram per second and g j  is the emission limit for the jth species, j=1,2,3. The representation of the objective function and constraints as a sum of independent terms (separability property) has been made possible by the “quasi-static” assumption on the engine operation and a similar assumption on “quasi-static” behavior of the TWC conversion efficiencies (valid for engine operation around stoichiometry). The application of the Lagrange Duality reduces the problem to a two-stage (inner loop/outer loop) optimization problem. In the first stage (inner loop), for each cell C i  the cost function of the form              F   i          (       u   i     ,     w   i     ,   λ     )       =         W   f          (       u   i     ,     w   i       )       +       ∑     j   =   1     3            λ   j          (         W     s   j            (       u   i     ,     w   i       )       -       g   j       T        (   i   )           )             ,                          
     is minimized with respect to u i , where λ j  are the Lagrange multipliers. The same values of λ j  are used for every cell. The optimization searches for a minimum either using regressions for W f  and W s     j    or directly on a finite set of experimental data points. Hence, a calibration is generated that prescribes the values of the control inputs u i =u i *(λ) as functions of the Lagrange multipliers λ j , j=1,2,3, and the value of the dual function 
     
       
         θ(λ)=Σ i=1   M   T ( i ) F   i ( u   i *(λ), w   i ,λ) 
       
     
     can be calculated. The outer loop of the optimization adjusts the Lagrange multipliers to achieve the desired objectives via the maximization of θ(λ). The feasibility of the powertrain is established if the maximum of θ exists at some value of λ=λ*. Under appropriate additional assumptions the static calibration corresponding to λ*, u i *(λ*), provides the best emission constrained fuel economy over the specified drive cycle. 
     SUMMARY OF THE INVENTION 
     The present invention is directed to an optimization method for direct injection spark ignition (DISI) engine with a lean NOx trap wherein fuel consumption and tailpipe emissions are determined not just by the present operating conditions of the powertrain but also by the past operating history. This is because emission storage mechanism is critical to operation of this powertrain. Hence, the separability property that was crucial for efficient generation of the calibration for the conventional PFI engines is lost and the problem has to be treated as a dynamic optimal control problem. In a gasoline direct injected engine equipped with a lean NO x  trap (LNT), there is an emission storage mechanism due to NO x  storage in the trap under some operating conditions and NO x  release from the trap under some other operating conditions. 
     The present invention relies on a fixed structure optimization whereby reasonable powertrain operating policies are assumed and parametrized with a small number of parameters. The general outer-loop/inner-loop, two-stage optimization formulation is preserved with some of the parameters playing the role of the weights for the inner loop optimization. The values of the parameters are determined via a numerical solution of the resulting (outer loop) optimization to minimize the fuel consumption over the drive cycle subject to emission constraints. The inner loop optimization refers to the process of generating normal mode and purge mode calibrations. This inner loop optimization is performed over the values of the air-to-fuel ratio, EGR rate, and spark timing at each speed/torque operating point using engine and aftertreatment models. The normal mode calibrations have to meet a NO x  emission index bound which is adjusted by the outer loop optimization process. Specifically, the outer loop optimization is a process of adjusting the NOx emission index bound and purge activation threshold as needed to achieve best NO x  emission constrained fuel economy over a simulated drive cycle. This fixed structure approach is adopted to make the problem computationally tractable and also to generate policies that do not explicitly depend on time. In addition, optimized fixed structure policies may often be less sensitive to parameter variations and uncertainties than the actual optimal policies. 
    
    
     BRIEF DESCRIPTION OF DRAWINGS 
     A more complete understanding of the present invention may be had from the following detailed description which should be read in conjunction with the drawings in which: 
     FIG. 1 shows a typical vehicle speed profile; 
     FIG. 2 is a schematic representation of a DISI engine; 
     FIG. 3 is an overall flowchart of the method of the present invention; and 
     FIG. 4 is a more detailed flowchart of the steps performed during the drive cycle evaluation. 
    
    
     DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS 
     Referring again to the drawings and in particular FIG. 2, a schematic of a gasoline direct injection spark ignition (DISI) engine is shown. Each cylinder of the engine  10  is provided with a fuel injector and a spark plug of conventional design. Air is provided to the engine through an intake manifold  12  under the control of a throttle  14 . Control of the precise quantity of fuel to be injected in order to maintain a desired air/fuel ratio is determined by a controller (not shown). An exhaust system, comprising one or more exhaust runners, transports exhaust gas produced from combustion of an air/fuel mixture in the engine through an exhaust manifold  16  to a conventional close-coupled, three-way catalytic converter (TWC)  18 . The converter  18 , contains a catalyst material that chemically alters exhaust gas that is produced by the engine to generate a catalyzed exhaust gas. The catalyzed exhaust gas is fed through an exhaust pipe to a downstream lean NOx trap (LNT)  20  and thence to the atmosphere through a tailpipe. A portion of the exhaust gas is fed from the exhaust manifold  16  to the intake manifold  12  through an exhaust gas recirculation (EGR) valve  22  that is controlled by the controller. 
     The DISI engine can operate at extremely lean overall air-to-fuel ratios (up to 40:1 as compared to 14.64:1 for stoichiometric operation) due to its stratified combustion ability. This reduces pumping losses and increases thermodynamic efficiency of the cycle thereby improving fuel economy. The transition between homogeneous combustion and stratified combustion is accomplished by changing the fuel injection timing from early injection to late injection. At the same time, the lean operation renders the conventional three-way catalyst ineffective in reducing NO x  emissions. Consequently, increased exhaust gas recirculation rates and additional exhaust after treatment devices such as a lean NO x  trap are required. The LNT is only capable of trapping NO x ; and as it becomes filled with NO x , its trapping efficiency decreases. Hence, the LNT has to be periodically purged of the stored NO x  in a manner that the stored NO x  (pollutant) is converted to nitrogen and carbon dioxide. The purge is accomplished by operating the engine with homogeneous combustion and air-to-fuel ratio richer than stoichiometry for several seconds. Although under the lean conditions the TWC is not very effective for NO x  reduction, it does remain very effective for HC and CO reduction. 
     Engine and After-treatment Modeling 
     The model that is used for the optimization is based on the “quasi-static” assumption for the engine fuel consumption and feedgas properties while the dynamics are due to the exhaust after treatment (TWC and LNT) storage mechanisms. To simplify the exposition, it is assumed that the engine is fully warmed up and treatment is restricted to NO x  emissions. This is done to simplify the exposition and also because NO x  emissions represent a more difficult control problem for the lean burn operation, whilst the CO and HC emissions can be effectively handled by the TWC during the warmed-up operation. The model has the form: 
     
       
           {dot over (x)}=f ( x,v ), 
       
     
     
       
           y=H ( x,v,w ),  (3) 
       
     
     where          x   =     [           x   twc               x   lnt           ]       ,                v   =     [           W   tot             λ           T             W   NOx               W   CO               W   HC           ]       ,                Y   =     [           W   f                 W   ^     NOx           ]       ,                          
     and where w=[N e  τ e ] T , x twc  is the mass of oxygen stored in the TWC, x lnt  is the mass of NO x  stored in the LNT, W tot  is the mass flow rate of the exhaust gas out of the engine (feedgas), λ is the feedgas air-to-fuel ratio, T is the feedgas temperature, W NOx , W CO , W HC  are the mass flow rates of feedgas NO x , CO and HC out of the engine, respectively, N e  is the engine speed, τ e  is the engine torque, W f  is the engine fueling rate and Ŵ ; NOx  is the mass flow rate of NO x  out of the tailpipe. The vector v represents engine exhaust feedgas properties and, under the “quasi-static” assumption, can be related to the engine operating variables by a static nonlinear model of the form: 
     
       
           v=r ( u,w ),  (4) 
       
     
     where the vector u is defined as u=[λ E θ t ing ] T , E is the exhaust gas recirculation (EGR) rate, θ is the spark timing and t inj  is the injection timing. In the static model, the fueling rate W f  is treated as a dependent variable, i.e., it is always calculated so that the torque generated by the engine is equal to τ e . The injection timing t inj  can take one of two discrete values that correspond to early injection for the homogeneous mode or late injection for the stratified mode. The range of variables u is constrained due to limits on the intake manifold pressure to be less than the atmospheric pressure, knock and misfire limits and constraints on the feasible flow quantities through the electronic throttle and EGR valve. These restrictions can be represented by inequality constraints of the form, 
     
       
           h ( u,w )≦0.  (5) 
       
     
     The objective is to minimize total fuel consumption over the drive cycle subject to a constraint on the cumulative tailpipe NO x  emissions to be less than a specified bound. 
     Operating Policies 
     The operating policies are defined in terms of two parameters: (i) the bound on the post-TWC NO x  emission index EI NOx,lim (k 1 ), to be precisely defined hereinafter; and (ii) the purge activation threshold (PAT). The parameters EI NOx,lim (k 1 ) and (PAT) are optimized over the drive cycle and the policy that yields the least fuel consumption under the specified constraint on NO x  emissions is selected. 
     The parameter EI NOx,lim (k 1 ) is used to generate a calibration that governs the engine operation in the normal mode. 
     Specifically, for each engine speed/engine torque operating point on a selected grid (w i , i=1, . . . , M) this normal mode calibration minimizes the fuel consumption subject to (i) a constraint on the NO x  emission index of the form                E                 I     =           W   ~     NOx       W   f       ≤     E                   I     NOx   ,     lim        (   k1   )       ,                                                    
     (ii) constraints (5), and (iii) constraints on the engine feedgas properties such as temperature and mass flow rate needed to sustain the effective trapping capacity of the LNT above a prescribed threshold. Here {tilde over (W)} NOx  is the estimated mass flow rate of NOx out of the TWC assuming “steady-state” conversion efficiencies of the TWC, i.e., that the oxygen storage dynamics of the TWC are at an equilibrium. In practice, the need to interpolate smoothly between calibration values at the grid points requires that three separate calibrations (stoichiometric, lean homogeneous and lean stratified) for the normal mode be generated. The difference in these three calibrations is due to assumed ranges of the air-to-fuel ratio and injection timing. For example, the stoichiometric calibration corresponds to the air-to-fuel ratio near stoichiometry and early injection, the homogeneous lean calibration corresponds to lean air-to-fuel ratio and early injection while the stratified lean calibration corresponds to lean air-to-fuel ratio and late injection. For a given w i , not all of these calibrations may exist. For example, stratified operation is only possible at low engine and torque values. The values for each of the three calibrations 
     
       
           u   st ( w,EI   NOx,lim ( k   1 )), 
       
     
     
       
           u   hl ( w,EI   NOx,lim ( k   1 )) 
       
     
     and 
     
       
           u   sl ( w,EI   NOx,lim ( k   1 ) 
       
     
     obtained on a grid of points w i , i=1, . . . , M, are interpolated to generate the values of the calibrations for arbitrary w. During the normal mode operation, if w and EI NOx,lim (k 1 ) are given, then out of the three vectors 
     
       
           u   sl ( w,EI   NOx,lim ( k   1 )), 
       
     
     
       
           u   hl ( w,EI   NOx,lim ( k   1 )) 
       
     
     and 
     
       
           u   st ( w,EI   NOx,lim ( k   1 )) 
       
     
     the one is selected that provides the least fuel consumption. If w falls outside the existence range for one of the calibrations, then this calibration is not taken into consideration during the selection process. 
     During the LNT purge mode, a different purge calibration is employed. This purge calibration maximizes the estimated mass flow rate of CO out of the TWC, {tilde over (W)} CO , assuming the “steady-state” conversion efficiencies of the TWC. Since the LNT purge involves reactions of CO with NOx stored in the trap, maximizing {tilde over (W)} CO , ensures that the LNT purge is accomplished as rapidly as possible. Additional constraints are introduced to reflect the fact that the LNT purge can only take place when the engine is operated under homogeneous combustion and with rich of stoichiometry air-to-fuel ratio. 
     The parameter PAT is used to define the transition policy between the normal mode and the purge mode. Whenever x lnt  exceeds PAT during the normal mode operation the transition to the purge mode is activated. The normal operation resumes when x lnt  falls below a specified threshold that in this embodiment is considered fixed. 
     The following regressions are pre-generated prior to execution of the routine for generating the calibrations discussed below in connection with FIG.  3 . From steady-state engine dynamometer mapping, data regressions are generated for feedgas mass flow rates of NO x  (W NOx,fdgs ), CO (W CO,fdgs ), HC (W HC,fdgs ), covariance of IMEP COV, fueling rate (W f ), LNT temperature (T lnt ) as a function of air-to-fuel ratio (afr), spark timing (spark), EGR rate (egr-rate), engine speed (rpm), engine torque (trq) and combustion mode (stratified or homogeneous). In addition, the steady-state efficiencies of Three-Way-Catalyst, η NOx , η CO , η HC  are regressed as functions of the air-to-fuel ratio. These efficiencies relate feedgas mass flow rates and post-TWC mass flow rates as: 
     
       
           W   i,post-TWC =η i ( afr ) W   i,fdgs   , iε{NOx, CO, HC}.   
       
     
     Finally, a regression is generated for LNT fraction of total available capacity (FTAC) as a function of LNT temperature, T LNT . The “regression” mentioned above refers to a function whose coefficients are calculated to best match the experimental data. For example, the regression for FTAC as a function of T LNT  has the form: 
       FTAC ( T   LNT )=1/( c   0   +c   1   T   LNT   +c   2   T   LNT   2   +c   3   T   LNT   3   +c   4   T   LNT   4 ), 
     where c 0 , c 1 , c 2 , c 3 , c 4  are coefficients obtained to best match the experimental data. 
     Referring now to FIG. 3, a flowchart of the calibration optimization method is shown. At block  30  an initialization step is performed where integer indices k 1  and k 2  are reset to k 1 =0 and k 2 =0. The emission index bound i.e. EI NOxlim (k 1 ) and purge activation threshold PAT(k 2 ) are adjusted as in block  34  as k 1  and k 2  are adjusted by the optimization method. At block  32 , a purge mode calibration is generated based on the engine model. For each engine speed and torque grid point rpm(i), trq(j), i=1, . . . , N i , j=1, . . . , N 2  a calibration for purge mode (l=0) is determined. 
     Generating Purge Mode Calibration 
     The EGR rate is zero during purge while the rest of the calibration settings (air-to-fuel ratio (afr), spark timing (spark)) are generated via the solution of the following optimization problem: 
     
       
           W   CO,post-TWC →max 
       
     
     subject to 
       COV≦COV   max , 
     
       
           afr   min ( l )≦ afr≦afr   max ( l ), 
       
     
     where l=0 for purge calibration. Thus, the flow of CO past the TWC is maximized subject to constraints of acceptable engine roughness and air-to-fuel ratio to accomplish purge as fast as possible. The air-to-fuel ratio limit afr max ( 0 ) is slightly less than stoichiometric as it corresponds to rich operation. 
     Regressions are used for the homogeneous mode. As before a search is made for the air-to-fuel ratio and spark timing settings over a grid. The purge calibration does not depend on EI NOx,lim (k 1 ) and, hence, it can be pre-generated once and then stored. Evaluating the regressions at the optimal normal mode calibration the values of optimal feedgas emissions 
     
       
           W   NOx,fdgs *( i,j, 0 ,k   1 ),W CO,fdgs *( i,j, 0 ,k   1 ), W   HC,fdgs *( i,j, 0, k   1 ); 
       
     
     total feedgas flow rate W tot *(i,j,0,k 1 ); and 
     LNT temperature T LNT *(i,j,0,k 1 ) are obtained. 
     At block  34 , the emission index bound EI NOx,lim (k 1 ) is set to the upper limit and PAT is set to the lower limit. At block  36 , three calibrations for normal mode: stratified (l=1), homogeneous lean (l=2), stoichiometric (l=3) are generated corresponding to EI NOx,lim (k 1 ) which initially is the upper limit. At block  38 , an evaluation over the drive cycle is performed where the tailpipe NO x  emission and fuel economy are calculated for the specified drive cycle. An inner loop optimization routine, forces the calibrations for normal mode to yield a post-TWC NO x  emission index of no more than EI NOx,lim (k 1 ). 
     Generation of Normal Mode Calibrations 
     Given EI NOx,lim (k 1 ), three calibrations are generated at block  36 , for the normal mode: stratified lean, homogeneous lean and homogeneous stoichiometric. As used here, “calibration” refers to the settings of air-to-fuel ratio, EGR rate, and spark timing for each speed-torque pair rpm(i), trq(j) from the grid. The calibration settings are generated to solve the following optimization problem wherein fuel consumption is minimized subject to constraints on post TWC NO x  emission index to be less than EI NOx,lim (k 1 ), constraints on engine roughness, fraction of total available capacity of LNT and air-to-fuel ratio: 
     
       
           W   f →min 
       
     
     subject to            E                   I     NOx   ,     post   -   TWC           =         W     NOx   ,     post   -   TWC           W   f       ≤     E                     I     NOx   ,   lim            (     k   1     )             ,                          COV≦COV   max , 
     
       
           FTAC≧FTAC   min , 
       
     
     
       
           afr   min ( l )≦ afr≦afr   max ( l ), 
       
     
     where l=1 for stratified lean calibration, l=2 for homogeneous lean calibration and l=3 for homogeneous stoichiometric calibration. Thus, the only difference in the process of generating the three calibrations is in the air-to-fuel ratio limits, i.e., afr min (l), afr max (l), and the fact that regressions depend on the combustion mode. As described previously, regressions are used in solving this optimization problem. The inequality on the IMEP covariance COV is meant to limit the engine roughness. The inequality on the FTAC is meant to always allow a minimum capacity of LNT which is equal to FTAC min . 
     The optimization can be performed through a search over the values of air-to-fuel ratio, EGR rate and spark timing over a grid. The optimal values of the (feedgas) air-to-fuel ratio, EGR rate and spark timing are denoted by afr* (i, j, l, k 1 ), spark* (i, j, l, k 1 ), egr-rate* (i,j,l,k 1 ). Evaluating the regressions at the optimal normal mode calibration we obtain the values of optimal feedgas emissions 
     
       
           W   NOx,fdgs *( i,j,l,k   1 ), W   CO,fdgs *( i,j,l,k   1 ), W   HC,fdgs *( i,j,l,k   1 ); 
       
     
     total feedgas flow rate W tot *(i,j,l,k 1 ); and 
     LNT temperature T LNT *(i,j,l,k 1 ). These multidimensional tables are needed in the drive cycle evaluation indicated at block  38 . 
     As stated, three different calibrations for the normal mode, corresponding to different values of l are developed instead of merging them together based on the best fuel economy. The reason is rather subtle and has to do with the need to interpolate between the values stored in these tables during drive cycle evaluation in block 38. The interpolation in a single, merged table may result in physically impossible values which is avoided by interpolating within each of the individual tables and then selecting one of the three resulting values that corresponds to the best fuel economy. 
     Note that the normal mode calibrations generated in the process of the inner loop optimization depend on the emission index limit EI NOx,lim (k 1 ) which is adjusted in the process of the outer loop optimization. A parameter other than EI NOx,lim  can be used if desired. The only requirement is that decreasing the parameter results in a decrease of steady-state post-TWC NO x  emissions. For example, suppose we first optimize the engine for best fuel economy and suppose that post-TWC NO x  emissions for each rpm-torque cell rpm(i), torque(j) are W NOx,post-TWC   bfc (i,j). Then, in the process of generating the normal mode calibrations, instead of the constraint            E                   I     NOx   ,     post   -   TWC           =         W     NOx   ,     post   -   TWC           W   f       ≤     E                     I     NOx   ,   lim            (     k   1     )             ,                          
     we can impose a constraint 
       W   NOx,post-TWC ≦θ( k   1 )· W   NOx,post-TWC   bfc ( i,j ), 
     where θ(k 1 ) is the parameter that is used in place of EI NOx,post-TWC . Or we can even minimize the cost of the form 
     
       
         θ( k   1 ) W   f   +W   NOx,post-TWC   
       
     
     instead of minimizing just W f  and remove an inequality constraint on W NOx,post-TWC  altogether. 
     Evaluation Over the Drive Cycle 
     In block  38 , the tailpipe NO x  emissions and fuel consumption are evaluated over specified second-by-second trajectories of the engine speed rpm(t) and engine torque trq(t) t=1, . . . , T f  that correspond to a particular drive cycle. The total tailpipe NO x  emissions over the cycle M NOx (T f ) (gram) and fuel consumption M f (T f ) (gram) are converted to an average of tailpipe emissions of NO x , n nox (k 1 ,k 2 ) (g/km) and an average fuel consumption number, fuel (k 1 ,k 2 ) (g/km). 
     Referring now to FIG. 4, the drive cycle evaluation of block  38  is shown in greater detail. In the following discussion let m NOx  denote the mass of NOx stored in the LNT and m O2  denote the mass of oxygen stored in the TWC at a time t. Initialize m NOx ( 0 )=0, m O2 ( 0 )=0, M f ( 0 )=0, M NOx ( 0 )=0, t=1. Set LNT storage mode as sm( 0 )=0 (normal mode). The feedgas properties and LNT temperature at time t of the drive cycle are determined as indicated in block  42 . Given rpm(t) and trq(t), the following are calculated in block  42 ; 
     a) the fuel consumption (in gram-per-sec), 
     b) feedgas NO x , CO and HC emissions (in gram-per-sec), 
     c) total exhaust gas flow rate (in gram-per-sec), 
     d) feedgas air-to-fuel ratio and LNT temperature for all three normal modes (stratified lean, homogeneous lean and stoichiometric) and the purge mode (i.e. for all l=0,1,2,3). This is accomplished by interpolating within the lookup tables W f *(i,j,l,k 1 ), W NOx,fdgs *(i,j,l,k 1 ), W CO,fdgs *(i,j,l,k 1 ), W HC,fdgs *(i,j,l,k 1 ), afr*(i,j,l,k 1 ), T* LNT* (i,j,l,k 1 )) generated in the inner loop optimization for the emission index EI NOx,lim (k 1 ). Let the corresponding variables be denoted by W f,l (t), W NOx,fdgs,l (t), W CO,fdgs,l (t), W HC,fdgs,l (t), W tot,fdgs,l (t), afr fdgs,l (t) and T LNT,l (t). 
     At a given time instant t, it may not be feasible to operate in certain ones of the normal modes l=1, 2, 3. The mode l is deemed infeasible at time t if rpm(t), trq(t) do not fall within a rectangle, all corners of which are feasible grid points for the mode l. The corners of the rectangle are included in the grid points from rpm(i), trq(j), i=1, . . . , N 1 , j=1, . . . , N 2 ,). Some of the grid points can be infeasible for a given mode  1  because the emission index constraint determined by EI NOx,lim (k 1 ) is not met or the minimum LNT fraction of total available capacity FTAC is less than FTAC min  or other constraints are violated. Let feas l (t)=0 if normal mode l is not feasible and feas l (t)=1 if normal mode l is feasible. 
     At block  44 , the LNT storage mode at time t, sm(t), is determined. If the estimated mass of NO x  stored in the trap at time t exceeds PAT(k 2 ), i.e, m NOx (t)&gt;PAT(k 2 ), and sm(t−1)=0, start purging, i.e., set sm(t)=1. If estimated mass of NO x  stored in the trap at time t is below the purge deactivation threshold, i.e., m NOx (t)&lt;PDT and sm(t−1)=1, stop purging, i.e., set sm(t)=0. 
     At block  46 , the calibration type to be used at time t, l*(t),—stratified lean, homogeneous lean, stoichiometric or purge is determined. If the system is in purge mode (sm(t)=1), then the purge calibration is used (l*(t) is set to 0). If the system is in a normal mode (sm(t)=0), then a normal mode calibration is selected (l*(t) is set to a value of l=1, 2 or 3) at time t which corresponds to a feasible calibration and the smallest fuel consumption (W f,l (t) is smallest among all l such that feas l (t)=1). 
     At block  48 , the mass of oxygen stored in TWC is updated in accordance with the following equation.              m   02          (   t   )       =     min                   {       max        {           m   02          (     t   -   1     )       +     0.21   ×       W     tot   ,   fdgs   ,     l   *     (   t   )                (   t   )                  ×       (         afr     fdgs   ,       l   *          (   t   )                (   t   )       -   14.64     )       (     1   +       afr     fdgs   ,       l   *          (   t   )                (   t   )         )           ,              0     }       ,                C   TWC       }         ,                          
     where C TWC  is the maximum oxygen storage capacity of TWC. 
     At block  50 , the post-TWC air-to-fuel ratio at time t, afr post-TWC (t), is determined. If m O2 (t)=0 or m O2 (t)=1, then afr post-TWC (t)=afr fdgs,l*(t) (t); otherwise if m O2  is in-between 0 and 1, afr post-TWC (t)=14.64 (stoichiometric value). 
     At block  52 , the TWC efficiencies at time t, η NOx (t), η CO (t), η HC (t) as functions of the post-TWC air-to-fuel ratio afr post-TWC(t) , is calculated. 
     At block  54 , the post-TWC emissions at time t is calculated in accordance with the following equation. 
     
       
           W   NOx,post-TWC ( t )=η NOx ( t )× W   NOx,fdgs,l*(t) ( t ), 
       
     
     
       
           W   CO,post-TWC ( t )=η CO ( t )× W   CO,fdgs,l*(t) ( t ), 
       
     
     
       
           W   HC,post-TWC ( t )=η HC ( t )× W   HC,fdgs,l*(t) ( t ), 
       
     
     At block  56 , the mass of NO x  stored in the trap is updated. If sm(t)=1 (purge mode), the mass of NO x  stored in the trap is updated according to 
     
       
           m   NOx ( t )=max{0, m   NOx ( t− 1)− k   3   W   CO,post-TWC ( t )− k   4   W   HC,post-TWC ( t )}, 
       
     
     where k 3 , k 4  are the reductant utilization fractions. If sm(t)=0 (normal mode), the fill rate constant for the LNT is calculated according to 
     
       
           r   fill ( t )=(1−η cceT )×α T   /FTAC ( T   LNT,l*(t) ( t )), 
       
     
     where η cceT  is the catalytic conversion efficiency of LNT, α T  is the trapping rate constant of the LNT and the mass of NO x  stored in the trap is updated according to: 
     
       
           m   NOx ( t )= FTAC ( T   LNTl*(t) ( t ))+( m   NOx ( t− 1)− FTAC ( T   LNT,l*(t) ( t ))) e   −r   fill ( t ). 
       
     
     At block  58 , the cumulative fuel consumption and NO x  emissions M f ,M NOx  are updated according to the following equations: 
     
       
           M   f ( t )= M   f ( t− 1)+ W   f,l*(t) ( t ) 
       
     
     
       
           M   NOx ( t )= M   NOx ( t− 1) if  sm ( t )=1, 
       
     
     
       
           M   NOx ( t )= M   NOx ( t− 1)+(η cceT   ×W   NOx,post-TWC ( t )−( m   NOx ( t )− m   NOx ( t− 1)) if  sm ( t )=0. 
       
     
     As indicated in decision block  60 , if t&lt;T f , then t is incremented at block  62  to t=t+1. The drive cycle evaluation is a predetermined interval and is completed at t=T f . At block  63  the fuel value fuel(k 1 ,k 2 ) is set to M f /dc and the emissions value n nox (k 1 ,k 2 ) is set to M nox /dc where dc is the drive cycle distance(approximately 11 km). 
     The drive cycle optimization just described may be repeated for several different variants of the initialization of m nox ( 0 ), m CO ( 0 ), sm( 0 ) (to zero and not-zero values) and the fuel economy and NO x  emission results may be averaged over several runs. Also, in block  56  the thermal inertia of the LNT may be included by filtering FTAC through a first order filter, i.e., 
       z ( t )=λ z ( t− 1)+(1=λ) FTAC ( T   LNT   ,l *( t )) 
     and using z(t) in place of FTAC(T LNT,l*(t) (t)) in the updates. 
     Referring again to FIG. 3 a decision block  64  checks whether the average tailpipe emissions of NO x , i.e., n nox (k 1 ;k 2 ), calculated during drive cycle evaluation is less than or equal to an allowed limit n* nox . If so, the fuel consumption over this drive cycle (fuel (k 1 ;k 2 )) is compared to a minimum fuel consumption value (fuel*) at block  66 . If less than or equal to fuel* then at block  68  fuel* is set to the fuel consumption value calculated during the previous drive cycle at block  58  and PAT* and EI* NOx,lim (k 1 ) are set to the existing values calculated in block  34 . The values for fuel*, PAT* and EI* NOx,lim  will be output along with the normal mode calibration generated at block  36  when the optimization routine is completed. Regardless of the path taken at decision block  66 , the value of k 2  is compared with k 2 , max  value at block  70 . Until the maximum value of k 2 , a predetermined value at which further optimization attempts are not justified, is reached, k 2  is incremented at block  72  and the purge activation threshold is increased at block  74 . The fuel economy and NO x  emissions over the drive cycle are then determined at block  38 . When n nox (k 1 ,k 2 ) is greater than n* nox  or k 2  is equal to k 2 , max , then if k 1  is not equal to k 1max , as determined at block  76 , then k 2  is reset and and k 1  is incremented and flow returns to block  34  where the emission index is decremented and new normal mode calibrations are generated at block  36  for use in evaluating fuel economy and emission over the drive cycle at block  38 . When k 1 =k 1,max , then the values of fuel*, EI* NOx,lim , and PAT* are output at block  80 . The normal mode calibration data at the value of EI* NOx,lim  is also output for use in populating lookup calibration tables. 
     Thus, the program initially sets the purge activation threshold to a small value and admissible emission index of NO x  to a large value. The value of the emission index and k 1  are maintained while the value of purge activation threshold is gradually increased (k 2  is incremented) until the NO x  emissions are at the limit, i.e, n nox (k 1 ,k 2 ) is approximately equal to n* nox . After that, the value of the emission index is gradually reduced (k 1  is incremented) and the procedure of increasing purge activation threshold from a small value is repeated. 
     While the best mode for carrying out the present invention has been described in detail, those familiar with the art to which this invention relates will recognize various alternative designs and embodiments for practicing the invention as defined by the following claims.