Robust Control of the Air to Fuel Ratio in Spark Ignition Engines with Delayed Measurements from a UEGO Sensor

A precise control of the normalized air to fuel ratio in spark ignition engines is an essential task. To achieve this goal, in this work we take into consideration the time delay measurement presented by the universal exhaust gas oxygen sensor along with uncertainties in the volumetric efficiency. For that purpose, observers are designed bymeans of a super-twisting slidingmode estimation scheme. Also two control schemes based on a general nonlinear model and a similar nonlinear affine representation for the dynamics of the normalized air to fuel ratio were designed in this work by using the super-twisting sliding mode methodology. Such dynamics depends on the control input, that is, the injected fuel mass flow, its time derivative, and its reciprocal. The two latter terms are estimated by means of a robust sliding mode differentiator. The observers and controllers are designed based on an isothermal mean value engine model. Numeric and hardware in the loop simulations were carried out with such model, where parameters were taken from a real engine. The obtained results show a good output tracking and rejection of disturbances when the engine is closed loop with proposed control methods.


Introduction
The air to fuel ratio (AFR) control [1,2] is one of the most important control problems for conventional gasoline engines.The performance of the AFR control can strongly impact key aspects in the SI engine, such as emissions, fuel economy, and output torque [3,4].The objective of the AFR control is to keep a stoichiometric value (14.67 for gasoline fuel) or the normalized factor () equal to 1 in the air to fuel mixture in the presence of environmental perturbations and high nonlinear dynamics involved in the combustion process.One important aspect to ensure a good AFR control performance is the determination of how much air is aspirated by the cylinders in order to inject the exact amount of fuel in each stroke.However, because of the short cycle time available and the flow restrictions due to the purity of the air, intake manifold, and intake valves, less air enters into the cylinder than the circulating air from the throttle valve.The relationship between the cylinder geometric volume and the actual volume or air aspirated into the cylinder is defined as volumetric efficiency  V .Another issue to consider is the time delay in the  factor measurement provided by the Universal Exhaust Gas Oxygen (UEGO) sensor [5,6], which is basically the time between the fuel injection and the burned gases reaching the UEGO sensor.But, in particular, this time delay is due to the transient response of the sensor, to the delay between the fuel injection and the time valve opening, to combustion and to the intake and exhaust valves opening, and to the transportation of gases.Currently, there are several works related to the control of the AFR for SI engines, where a variety of well-known established control designs are applied.In [7], an -infinity control is designed based on a linearized model of the engine where the high order controller is only valid around an operating point.

Mathematical Problems in Engineering
A classical sliding mode technique and a global linearized control strategy are compared in [8] without considering time delays measurements from  sensor; although the classical sliding mode controller showed the best results with parameter uncertainties, it is well known that it introduces the undesirable chattering phenomenon to systems in closed loop [9].An artificial neural network design is presented in [10] where the engine is initially in open loop for about 2 s while the neural network adapts its weights, thus generating large transient peaks in the rate of injected fuel each time the process is initiated.A fuzzy logic based PID controller is presented in [11] where  measurements are realized with a binary sensor, but omitting its intrinsic time delays.In [12], a super-twisting algorithm is designed where again the delayed  measurements are omitted and the complexity of the  dynamics is not revealed.Nevertheless, the super-twisting algorithm reduces the chattering phenomenon; hence, it is gaining popularity over classical sliding mode designs [13].
It is clear from the revision of mentioned works that the delay of  measurements is not taken into consideration.Also the estimation of the volumetric efficiency  V is not given its corresponding importance.Moreover, in such works, the  dynamics is not explicitly revealed and, as it will be demonstrated in this work, this dynamics is complex since it depends on the time derivative of the control input.If a more accurate regulation of the normalized air to fuel ratio () is desired, then the delays, the right knowledge of  V , and the explicit dynamics for  must be taken into consideration in the control design.
Hence, in this work, we propose the following enhancements to the regulation of : (i) To design two higher order sliding mode (HOSM) controllers, based on the super-twisting algorithm and on the explicit dynamics of .
(ii) To deal with delays in the  measurements provided by the UEGO sensor by designing a super-twisting based observer for .
(iii) To design a super-twisting observer for the nonmeasurable parameter  V .
For these purposes, the controller and the observer designs are based on an isothermal mean value engine model (MVEM) developed in the works by [14,15].This model is well accepted as still it is reported in the recent literature [16,17].It is well known that this model is control oriented and so neglects discrete cycles of the engine and assumes that all processes and effects are spread out over the engine cycle.Moreover, the time delay model for the UEGO sensor is approximated through a third order Padé approximation [18] of the frequency domain function  −  (where   is the time delay and  is the Laplace variable) and then expressed in a state space representation.Numeric and realtime hardware in the loop (HIL) simulations are carried out for the validation of proposed control methods.
The remainder of this work is organized as follows.Section 2 reviews the mean value engine model and the time delay of the UEGO sensor.Section 3 deals with the controller and observer designs for the unity tracking of the AFR ratio.
A simulation study is carried out in Section 4, and finally some comments conclude the work in Section 5.

Mean Value Engine Model for SI Engine
This section describes a MVEM for a SI engine with an electronic fuel injection system.The MVEM of the SI engine primarily consists of 3 subsystems as explained in [14,19,20]: (i) The intake manifold filling dynamics.(ii) The fuel mass flow rate.(iii) The crank shaft speed.

The Intake Manifold Filling Dynamics.
The intake manifold filling dynamics is based on an isothermal model, where the temperature exchange between the ambient temperature and the intake manifold temperature occurs slowly; therefore, both temperatures are assumed to be the same.The intake manifold filling dynamics is separated into three equations: (1) the intake manifold pressure, (2) the throttle air mass flow, and (3) the intake port air mass flow.

2.1.1.
The Intake Manifold Pressure.The intake manifold pressure  man is determined by two parts: the air mass flow to the throttle valve ṁ and the air mass flow to the intake valve ṁ .Then, the manifold intake pressure is expressed as follows [14]: where  is the ideal gas constant,   is the air temperature in the manifold, and   is the intake manifold volume.

Throttle Air Mass
Flow.This part of the model is based on the isentropic flow equation for a converging-diverging nozzle [14]: where ṁ1 and ṁ0 are constant functions,   is the ambient pressure,  is the angle of the throttle plate, and  1 () is the ratio of the throttle throat diameter to the throttle plate shaft diameter where  0 is the close angle throttle plate.Function  1 () is useful only when the throttle plate has a circular shape.In other cases, another equation that can appropriately describe it must be found.Expression  2 (  ) is the isentropic flow where   =  man /  and   is the critical pressure (turbulent flow).

Intake Port Air Mass Flow.
The air mass flow at the intake port can be obtained from a speed density equation [14]: where   is the ambient temperature,   is the engine displacement, and  V is the volumetric efficiency.The volumetric efficiency behavior can be modeled in polynomial form taken from [14]: 2.2.The Fuel Mass Flow Rate.According to the experiments reported by [20], the equations that describe the fuel mass flow rate ṁf into the cylinder are as follows: where  ff is the mass of the fuel film adhered to the manifold wall, ṁfi is the fuel flow rate from the injector,  f is the fraction of injected fuel that remains as fuel film,  f is the fuel evaporation time constant, and ṁfv is the portion of fuel that enters into the cylinder valve.The fraction in the fuel film  f is approximated by [20]: where ṁ,max is the maximum air mass flow for the engine.

The Crankshaft Speed.
The crankshaft speed is derived based on the conservation of the rotational energy on the crankshaft [20]: where  is the crankshaft speed,  is the inertial moment of the crankshaft,   ,   , and   are the power losses by friction, pumping, and load, respectively,   is the fuel burn value,   (, , ,  man ) is the thermal efficiency, and ṁf is the mass fuel rate into the cylinder with a torque time delay Δ  .The friction and pumping losses in the engine can be expressed as polynomials of the crankshaft speed and the intake manifold pressure: and   =    3 where   is the load factor.The thermal efficiency   (, , ,  man ) can be expressed as the effect of four individual factors: where with  mbt as the maximum brake torque and Θ  ( = 0, 1, 2),   ( = 0, 1, 2),   ( = 0, 1, 2), and Λ  ( = 0, . . ., 5) as constants.Figure 1 shows a block diagram of the MVEM.

UEGO 𝜆 Sensor Model.
The normalized AFR also known as  factor is defined by the following equation: where  ℎ is the desire stoichiometric value.The UEGO  sensor has a linear response in a range of values which represent a lean, rich, or stoichiometric mixture of the engine.The sensor is approximated by a first order system as in [19]: where Λ  () = L{  ()} and Λ exh () = L{ exh ()}, with L as the Laplace operator.  is the  measurement given by the sensor,  exh represents the  value available at the sensor, and   is the time constant of the sensor that can depend on the temperature in the exhaust pipe.Meanwhile, the relation between  exh and  is of the following form [19]: where Λ() = L{()} and   is a time delay due to the summation of three terms: (1)  1 is the time delay due to the fuel injection and the time valve opening where Δ 1 is the crank angle between injection and intake valve opening.(2)  2 is the time delay due to combustion, to intake valve opening, and the exhaust valve opening where Δ 2 is the crank angle between the intake valve opening and the exhaust valve opening.(3)  3 is the time delay due to the transportation of the exhaust matter from the exhaust valve to the sensor Mathematical Problems in Engineering where  exh and  exh are the air density and pressure in the exhaust manifold, respectively,  exh is the cross section of the exhaust pipe,  exh is the distance between the exhaust valve and the  sensor, and  exh is the exhaust gas temperature.

Control Design
The control problem consists of forcing the output  to track a desired  factor (  = 1) in the presence of the time delay output measurements of  made by the UEGO sensor, that is,   .The controlled input variable is ṁfi .In order to tackle this problem, a high order sliding mode control technique based on the super-twisting algorithm is used, as presented by [21].Based on this algorithm, two control schemes are designed: control Type I and control Type II.Type I control design is based on a similar nonlinear affine representation of the  dynamics, while Type II control design is based on a general nonlinear representation of the  dynamics.In either case, the derivative of the control input ṁfi is required, where this term is estimated by means of a robust exact differentiation via sliding mode technique.In order to solve the time delay output measurement from the UEGO sensor, the delay is approximated by means of Padé method in the frequency domain by a transfer function and then transformed as a dynamical system in state space form without delay.In order to improve the action control response, the volumetric efficiency  V is estimated by designing a super-twisting sliding mode observer.

Type I Control Design. Let us define the output error as
where   is the reference signal for .The dynamic equation for ( 19) can be obtained by taking its time derivative and by making use of ( 5), (7), and ( 13) results in a similar nonlinear affine system: where with  = (, , ṁ , ṁff )  and  1 = ṁfi .The control input and its time derivative appear explicitly in this representation; moreover, functions ,  1 , and  2 depend on the control input.Hence, a stabilizing control design seems to be difficult to realize.However, based on the work presented in [22] where a control law that depends on powers of the control itself and its time derivative is synthesized thanks to estimations of these variables, the approach of this work is to estimate the powers of the control action and its time derivative by means of a robust sliding mode differentiator presented in [23].Therefore, the following control law is proposed: where û1 and u 1 are the estimates of  1 and u 1 , respectively, and V is super-twisting control algorithm defined as follows [21,24]: with  1 > 0 and  2 > 0 as constant design parameters [25] that will be defined in the following lines.The closed loop system results as follows: where (⋅) and  1 (⋅) are unknown bounded functions with bounds In this case, the gains for the super-twisting algorithm in (24) can be selected as follows [25]: These relations are sufficient for guaranteeing the finite-time convergence to the sliding manifold  = 0.Moreover, the last two equations in (24) define the robust sliding mode differentiator where û1 =  0 and u 1 =  1 and  1 ,  2 , and   are constant design parameters [23].With a bounded and free noise signal  1 , this differentiator ensures finite-time convergence of the following equalities: with initial accuracies where  0 > 0 and  1 > 0. This means that the solution of the robust sliding mode differentiator in (24) is Lyapunov stable satisfying (26) for  ≥  0 +   .Also one can note that, for  ≥  0 +   , the following relations hold: (,  1 , u 1 ,  0 ,  1 ) = 0 and  1 (,  1 ,  0 ) = 1. Figure 2 shows the block diagram of the engine closed loop by a Type I controller.

Type II Control Design. Define again the output error as
where   is the reference signal for .The dynamic error equation for (28) can be represented as a general nonlinear system: with  = (, , ṁ , ṁff )  ,  2 = ṁfi , and (,  2 , u 2 ) as Now a new control input ] is introduced as ] = (,  2 , u 2 ), which simplifies (29) as follows: by choosing the sliding function as , and then ] is selected as a super-twisting algorithm [21] with properly chosen constants  3 > 0 and  4 > 0 [25].
From the relation ] = (,  2 , u 2 ) and by making use of the implicit function theorem [26], the following control law is determined: It is worth noting that control (33) depends on the time derivative of the control itself; in this case, an estimate of this variable is used.By differentiating (33), one retrieves such estimation, and then this signal is fed back to reconstruct control law (33) as in [22].
System (29) when closed loop by control (33) results as follows: x Eq. (22) Eq. ( 24) where (⋅) and (⋅) are unknown bounded functions with bounds In this case, the gains for the super-twisting algorithm in (24) can be selected as follows [25]: These relations are sufficient for guaranteeing the finitetime convergence to the sliding manifold  = 0.The last two equations in (34) represent the robust sliding mode differentiator where û2 =  0 and u 2 =  1 , and  3 ,  4 , and   are positive constant design parameters [23].With a bounded and free noise signal , this differentiator ensures finite-time convergence of the following equalities: with initial accuracies where  0 > 0 and  1 > 0. This means that the solution of system (34) is Lyapunov stable satisfying (36) for  ≥  0 +   .
It can be noted that, for  ≥  0 +   , the following relations hold: (, u 2 ,  1 ) = 0 and (, u 2 ,  1 ) = 1.Finally, Figure 3 illustrates a block diagram of the engine closed loop by the Type II controller.

Observer Design for Normalized AFR (𝜆).
It is clear that  measurements provided by the UEGO sensor are delayed by engine processes and the sensor itself as previously stated in the presentation of the MVEM section.A common solution for dealing with time delay systems is the design of state predictors as in the work by [27].The knowledge of the perturbation affecting the delayed system is the main drawback of state predictors.Therefore, we propose designing an observer for  based on the measurement   provided by the sensor.
The exponential term in (15) will be approximated by means of a Padé approximation method [18] of order three: The model of the time response of the UEGO sensor is given by the following equations: Based on the dynamics of the time delay obtained by Padé method, the observer is proposed of the following form: where ] is the injected signal to the observer that will be defined in the following lines.Now the estimation errors are introduced as λ1 =  1 − λ1 , λ2 =  2 − λ2 , λ3 =  3 − λ3 , and λ =   − λ .The dynamics of the estimation errors result as follows: The sliding function is chosen as λ and the observer injected signal according to a super-twisting sliding mode algorithm in [25] ] = − 1      λ With a proper choice of the positive observer gains  1 and  2 , the finite-time convergence of λ to 0 is feasible.Then, by applying the equivalent control method by [9], the equivalent injected signal from λ  = 0 is of the following form: If  1 is chosen equal to −120  / 3  and  2 to −12  /  , then the sliding mode dynamics for the estimation errors result as follows: By assuming that  is constant, the steady-state solution for (45) is given by thus, according to (44), lim  → ∞ ] eq () = −/(2  ).Therefore,  is estimated as 3.4.Observer Design for the  V .The volumetric efficiency  V is required for the calculation of the air mass flow to the intake valve ṁ .The volumetric efficiency is difficult to determine, but in this work it is estimated through a super-twisting sliding mode observer designed from ( 1) and ( 5), assuming that ṁ and  man are measurable.The observer is proposed as follows: where  is the injected signal to the observer and is proposed as a super-twisting algorithm where  1 > 0 and  2 > 0 are constant design parameters; meanwhile, pman is the estimation error defined as pman =  man − pman , whose dynamics is defined as and then, with the proper choice of positive observer gains, the sliding mode occurs on pman = 0, where it is clear that  is equal to  V .Finally, Figure 4 shows the block diagram of the proposed control scheme.

Simulations
Simulations are performed considering the parameters reported by [14] for a 1.27-liter British Leyland engine.The nominal values for the engine are shown in Table 1.
By assuming an optimal spark timing for the considered engine, the difference in the inertia  is described as  =   (/30) 2 1000, where   = 0.49 kg/m 2 is the load moment inertia and the time delays for ṁ (  ) and  (  ) are 60/8 and 0.187/, respectively.The values for the controller and observer gains are shown in Table 2.The simulation was carried out with several acceleration step commands that were passed by a first order filter with a time constant of 0.3 s before entering the engine, in order to more accurately reproduce the drive of the throttle valve.The angle of the throttle valve starts at 25 ∘ and remains constant for  ∈ [0, 10) s, and then the angle is increased to 35 ∘ , to 55 ∘ , and to 65 ∘ remaining constant in each interval at the time instants of 10 s, 15 s, and 20 s, respectively.Then, the angle is decreased to 55 ∘ , 35 ∘ , and 25 ∘ remaining constant in each interval at the time instants of 30 s, 35 s, and 40 s, respectively.Figure 5 shows this signal.

Comparison between Type I and Type II Controllers.
A high frequency noise with a bandwidth of ±0.1 was added to the measurement output of  man in the observer for  V and an output error measurement of ±0.05 for   was added to the measurements in the MAP (Manifold Air Pressure) sensor and in the UEGO sensor, respectively, in order to simulate malfunctioning of 10% in these sensors.The  factor responses from the engine for control Type I and control Type II are shown in Figures 6 and 7, respectively.It can be appreciated that the closed loop engine shows a good performance in steady state for both controllers, but the control Type II shows a better tracking performance when the throttle steps are introduced.The observers behave as low pass filters, improving the tracking performance of the  factor when measurement noise is added to the sensors.In order to quantify the graphical results, we introduce the precision error   and the chattering effect Ch with the following relations: with   as the imposed reference signal,  mc as the average of the output signal, and  mc as the maximum amplitude of the deviations of controlled signals with respect to its average value  mc [28].Table 3 shows the evaluation of these performance indices in the case of noise measurements.It can be appreciated that controller Type II yields to best results.This can be attributable to the fact that the control input is totally determined, depending only on its time derivative.The control input signal ( ṁfi ) is presented in Figure 8 for control Type I and for control Type II in Figure 9.The engine under any control scheme with observers shows a smoother management of the fuel, resulting in a better operation of the fuel injectors, but control Type II shows a reduction in fuel consumption of 5.13% with respect to control Type I.
Figures 10 and 11 show the engine speed for controllers Type I and Type II, respectively.Despite undergoing perturbations to the engine, the output speed behavior is smoothly maintained by the engine.Figure 12 illustrates the evaluation of the volumetric efficiency ( V ) observer in the case of no noise added to the  man measurement and Figure 13 in the case that noise is added.In general, a good estimation is retrieved by the volumetric efficiency observer.
Since control Type II is the one that yields to better results, in the following subsection it will be compared with an existing method.

Comparison between Control Type II and an Existing Controller.
Type II controller is now compared against a supertwisting controller that does not take into consideration the time delay in measuring  and its complex dynamics [12].Figure 14 shows undesirable large transient peaks and a steady state with a chattering of 7.3% for the tracking of a reference signal for , provided by controller presented in [12].The chattering can be attributable to the unmodeled dynamics in the measurement of .On the other hand, Type II controller performs well as already shown.The control input signal is shown in Figure 15 where it can be noted that the one provided by controller in [12] can yield to an unsuitable operation of the fuel injectors due to severe oscillations in the fuel rate signal ṁfi .Finally Figure 16 shows the engine speed profile where it can be determined that controller presented in [12] yields to a 0.5% lower speed with respect to the one obtained with control Type II.Hence, one can summarize that control Type II yields to a better operation of the engine.

Hardware in the Loop Simulation.
A real-time HIL simulation platform [29] is designed for validating the implementation of the Type II control algorithm in an electronic control unit (ECU).For that, the plant under control (SI engine) is embedded in a dSPACE DS1104 board, which is  to the delay provided by the DS1104 board in capturing and saving the signals to a file, the transient time instants are shifted in time with respect to the throttle steps of Figure 5. Figure 19 shows the time response of the output  factor.The performance indices for this signal are   = 1.35% and Ch = 0.2%, which are quite similar to those reported in Table 3 for control Type II in the case of using the observers.The demanded fuel rate ṁfi and the engine speed  are shown in Figures 20 and 21, respectively, where smooth signal profiles with similar step values can be appreciated as the ones reported in simulations.

Conclusions
The AFR control is an important problem for the regulation of emissions, fuel economy, and output torque.This problem is exacerbated by the presence of environmental perturbations, nonlinear dynamics, and time delays involved in the combustion process.Although several control techniques have been proposed for solving the AFR control problem, it is necessary to rely on a good mathematical model for the engine that allows the use of advanced and robust control techniques.Therefore, in this work, based on the MVEM, two super-twisting sliding mode controllers were designed for a SI engine in order to track the desired amount of fuel under variations of the throttle valve angle , that is, to maintain a stoichiometric value in the engine.The Type I  controller is based on a nonlinear representation of the  dynamics that is set similar to an affine system and the Type II controller is based on a general nonlinear representation of the  dynamics.The complexity of this dynamics makes the designed control law to depend on the control itself in a reciprocal fashion and on its time derivative.This problem was solved by means of robust sliding mode differentiator.This differentiator estimates the control signal and its time derivative; then, these signals are fed back to the controller.The delayed measurements provided by the UEGO sensor were used for estimating the real  factor, where the Padé approximation method was used for modeling the time delay in .Then, based on this model, a super-twisting observer was designed.Also an observer was designed for the volumetric efficiency  V .Based on 1.27-liter British Leyland engine, simulations were carried out where the good performance of the engine when closed loop by Type II controller was put in evidence over Type I controller.This can be attributable to the    fact that control Type II is completely solved for the control input depending only on its time derivative.Type II controller was compared against an existing sliding mode controller that does not take into consideration the delay in  and its complex dynamics, where the proposed controller is superior to the existing one.Finally, a real-time HIL simulation environment is designed for the validation of proposed Type II controller, where obtained results were quite similar to the ones obtained by means of numeric simulations.Other problems still remain for the super-twisting control of the AFR as the adaptation of control gains for the reduction of fuel consumption.

Figure 2 :
Figure 2: Block diagram of control Type I.

Figure 3 :
Figure 3: Block diagram of control Type II.

Figure 4 :
Figure 4: Block diagram of the proposed control scheme.

Figure 12 :
Figure 12: Volumetric efficiency from the engine  V without noise measurement (dotted black) and estimated value (solid gray) [ V versus s].

Figure 13 :Figure 14 :
Figure 13: Volumetric efficiency from the engine  V with noise measurement (dotted black) and estimated value (solid gray) [ V versus s].

Figure 19 :
Figure 19:  factor response in real-time HIL simulation [ versus s].

Figure 20 :Figure 21 :
Figure 20: Control input signal  fi in real-time HIL simulation [kg/s versus s].

Table 1 :
Nominal values for the engine.

Table 2 :
Controller and observer gains.

Table 3 :
Precision error and chattering evaluation for Type I and Type II controllers.