An LPV Adaptive Observer for Updating a Map Applied to an MAF Sensor in a Diesel Engine

In this paper, a new method for mass air flow (MAF) sensor error compensation and an online updating error map (or lookup table) due to installation and aging in a diesel engine is developed. Since the MAF sensor error is dependent on the engine operating point, the error model is represented as a two-dimensional (2D) map with two inputs, fuel mass injection quantity and engine speed. Meanwhile, the 2D map representing the MAF sensor error is described as a piecewise bilinear interpolation model, which can be written as a dot product between the regression vector and parameter vector using a membership function. With the combination of the 2D map regression model and the diesel engine air path system, an LPV adaptive observer with low computational load is designed to estimate states and parameters jointly. The convergence of the proposed algorithm is proven under the conditions of persistent excitation and given inequalities. The observer is validated against the simulation data from engine software enDYNA provided by Tesis. The results demonstrate that the operating point-dependent error of the MAF sensor can be approximated acceptably by the 2D map from the proposed method.


Introduction
Accurate exhaust gas recirculation (EGR) rate control and air-fuel ratio (AFR) control are important technologies to satisfy the increasingly stringent emission regulations, which are dependent on the precise calculation of the EGR rate and AFR [1,2]. The accuracy of the EGR rate and AFR can be improved by a mass air flow (MAF) sensor, in which a sensor element is heated to a fixed temperature, and the difference in temperature attributed to heat transfer from the heating element to the air flow is a measure of the air mass flow [3][4][5]. However, there are many different local flow fields within the inlet piping due to the three-dimensional turbulence flow, leading to measurement biases in the MAF sensor installed between the air filter and the intake manifold. In addition, the MAF sensor is also subjected to aging phenomena owing to the accumulation of dust on the sensing element, which causes the deterioration of the measurement accuracy [6,7]. These errors will bring about an inaccurate EGR rate and AFR and have adverse impacts on the emission performance of diesel engine.
It is difficult to accurately establish an analytical model for the MAF sensor error. In view of the relatively low computational load, maps (or lookup tables) have been widely used to characterize systems where the functional relationship is unavailable or too complex to represent analytically [8]. Therefore, the relative error of the MAF sensor is described as a one-dimensional (1D) map taking compressor mass air flow as input [2]. In order to track MAF sensor aging, the extended Kalman filter (EKF) for updating maps is presented in [9][10][11], in which the 1D map is represented as a piecewise linear interpolation model and the map parameters are considered as parameter states. Due to the piecewise linear interpolation model having the characteristic of partition calculation and due to the the map input being able to enter only one input interval of the 1D map at any time, then only two parameter states participating in linear interpolation are observable and the other not. Therefore, the error covariance matrix elements of EKF corresponding to the locally unobservable parameter states will increase linearly. Although the solution is to limit this growth in [9][10][11], the convergence of EKF with a confined covariance matrix cannot be guaranteed. In addition, the measurement error of the MAF sensor depends on the engine operating point, which is usually defined as fuel mass injection quantity and engine speed. The 1D map representing MAF sensor error ignores the engine speed, reducing the accuracy when the diesel engine is run over a wide speed range.
The adaptive observer with the advantage of simple convergence conditions is an alternative method for updating maps. Recursive algorithms designed for joint estimation of states and parameters in state space systems are usually known as adaptive observers, and some early works with adaptive observers to jointly estimate states and parameters in multi-input-multi-output linear time varying systems can be found in [12,13]. In order to estimate sensor faults, adaptive observers for linear time varying systems with unknown parameters in output equations have been studied [14,15]. However, the existing adaptive observers cannot directly update maps.
In this paper, an adaptive observer is developed to update the map, in which the MAF sensor error is described as a two-dimensional (2D) map taking the operating point as the input to improve the model accuracy comparing the 1D map. Then, two problems are studied. First, in order to expediently analyze and design the parameter estimation method, the input-output relationship of the MAF sensor error 2D map is expressed as a dot product between the regression vector and the unknown parameter vector. Second, based on the linear parameter varying (LPV) system of the diesel engine with EGR and variable geometry turbocharger (VGT), a 2D map estimation method with a simple structure and low computational load is designed to facilitate the algorithm implementation. This paper is organized as follows. In Section 2, the 2D map is expressed as the dot product between the regression vector and the unknown parameter vector, and the estimation problem for a class of LPV systems with an unknown parameter vector is given. In Section 3, the LPV adaptive observer is proposed, as well as the convergence analysis. Simulation results from enDYNA are presented in Section 4, and the conclusions are summarized in Section 5. Figure 1 shows the model structure of a diesel engine with EGR and VGT, and the model can be expressed as [16]

A Diesel Engine Air Path LPV Model
where W c is the compressor mass air flow, W egr is the EGR mass flow, W ei is the cylinder mass flow, W f is the fuel rate injected to cylinder, W t is the turbine mass flow, P t is the turbine power, P c is the compressor power, η m is the turbocharger mechanical efficiency, p im is the intake manifold pressure, p em is the exhaust manifold pressure and ω t is the turbine speed. Meanwhile, W c , W egr , W ei , W t , W f , P c and P t η m in Equation (1) can be obtained as follows: However, it is difficult to estimate the measurement error of the MAF sensor based on the complicated nonlinear model Equation (1). In order to simply present the state space equation and the error estimation, define variables: According to Equation (3), the variables ρ i (i = 1, 2, 3, 4, 5) are available in real-time since p im , p em , ω t , u egr , u vgt , u δ and n e can be measured or estimated online. Therefore, the nonlinear model Equation (1) can be cast into an LPV system: where: In order to determine the bounds on the parameter vector ρ, a simulation study is performed using a 1.9 L four-cylinder common rail turbo diesel engine of enDYNA provided by Tesis [17,18]. The bounds of the parameter vector ρ are found using the simulation data from enDYNA over the European Transient Cycle (ETC), Federal Test Procedure 75 (FTP75) and New European Drive Cycle (NEDC) [19][20][21]. Then, the results are listed in Table 1. It follows that each parameter ρ i from parameter vector ρ is bounded by a minimum and maximum value ρ i and ρ i .

2D Map Description for the MAF Sensor Error
The intake manifold pressure p im , turbine speed ω t and compressor mass air flow W c are the outputs of interest to analyze the MAF sensor error, which is: Due to the existence of MAF sensor error, the output Equation (6) becomes: where y m is the measured value from sensors. ∆W c is the measurement error of the MAF sensor, which depends on the engine operating point (fuel mass injection quantity u δ and engine speed n e ), i.e., ∆W c (u δ .n e ). Since it is difficult to accurately build an analytical model for ∆W c (u δ .n e ), a 2D map is adopted in this paper to describe ∆W c (u δ , n e ). Therefore, define the partition of the 2D map input υ = (u δ , n e ) as: where a, b ∈ R are the minimum and maximum values of u δ and p 1 is the number of the grid points in [a, b]. c, d ∈ R are the minimum and maximum values of n e , and p 2 is the number of the grid points in [c, d].
Assume that the measurement error of the input grid points (u i δ , n j e ) is θ i,j , i.e., Then, for ∀υ ∈ u i δ , u i+1 δ × [n j e , n j+1 e ], ∀i ∈ [1, 2, · · · , p 1 − 1] and ∀j ∈ [1, 2, · · · , p 2 − 1], we can hold the n e value fixed and apply one dimensional (1D) linear interpolation in the u δ direction. Using the Lagrange form, the result is: Equation (10) can then be used to linearly interpolate along the n e dimension to yield the piecewise bilinear interpolation model of the measurement error ∆W c,T (θ i,j , υ) as: , we extend Equation (11) to the final result: where: and: For the purposes of estimating unknown parameter θ i,j in ∆W c,T (θ i,j , υ) expediently, Equation (12) in vector-vector form is needed. According to the input interval Equations (14) and (15), we define membership function as: and: Using membership function Equations (16) and (17), Equation (12) becomes: where: and: where: and . Now, following Equations (18)-(21), ∆W c,T (θ i,j , υ) can be written as a dot product between regression vector Ψ (υ) and unknown parameter vector θ as follows: where: and With the combination of Equations (4), (7) and (22), the diesel engine air path LPV model can be described by the following state space equation: where: Equation (24) indicates that the estimation of the MAF sensor error ∆W c (u δ , n e ) becomes joint estimation of state x and parameter θ for LPV system Equation (24).

Adaptive Observer Design
The observer to estimate state x and parameter θ jointly for the LPV system Equation (24) is given: where C 2 (ρ) = 0 0 ρ 1 ,x ∈ R 3×1 is the state estimate,θ ∈ R p×1 is the parameter estimate, gain Γ ∈ R p×p is the positive definite diagonal matrix and L ∈ R 3×3 is the feedback gain matrix. The asymptotical stability of the proposed algorithm Equation (26) is analyzed in the following theorem. Theorem 1. If the following Conditions (1) and (2) hold, then LPV adaptive observer Equation (26) is asymptotically stable, i.e., for any initial conditions x (0) ,x (0) ,θ (0) and parameter vector θ, the errorŝ x − x andθ − θ tend to zero asymptotically when t → ∞.

Remark 1.
With the concept of multi-convexity [23], the solution of the infinite LMI Equation (27) can be reduced to be a solution of the finite LMIs for the vertex set, that is: Therefore, feedback gain L can be obtained by the solution of inequality Equations (28) and (33).
According to the partition of the map input υ = (u δ , n e ) defined in Equation (8) and the piecewise bilinear interpolation model Equation (12), the input υ (engine operating point) moves in only one region R k u δ × R l ne at any time, and only the parametersθ i,j corresponding to the region R k u δ × R l ne can participate in the interpolation. That is, for ∀υ ∈ R k u δ × R l ne : Case 4: (k, l) ∈ {1, 2, · · · p 1 − 1} × {1, 2, · · · p 2 − 1}. Four parametersθ i,j ,θ i+1,j ,θ i,j+1 ,θ i+1,j+1 , (i, j) ∈ {1, 2, · · · p 1 − 1} × {1, 2, · · · p 2 − 1} take part in the interpolation, i.e., In order to expediently discuss the convergence of the parameter estimateθ i,j corresponding to different regions R k u δ × R l ne , a local regression vector Ψ l (υ) is defined based on the above four classifications of the region partition as follow: where: When υ ∈ R k u δ × R l ne , regression vector Ψ (υ) in Equation (26) can be replaced by local regression vector Ψ l (υ); then, observer Equation (26) can be replaced by: whereθ i,j l is the local parameter estimate of appropriate size and Γ l is a local positive definite diagonal matrix of appropriate size.
According to Theorem 1, the local parameter estimateθ i,j l is convergent if local regression vector Ψ l (υ) is persistently exciting. Meanwhile, the parameter estimateθ is also convergent if the trajectory of the map input υ passes through all of the interpolation regions R k u δ × R l u 2 . There are heavy matrices calculated in real time for the covariance matrix equation of EKF in [9][10][11], preventing it from being implemented in commercial electronic control units (ECUs) for map adaptation. Nevertheless, the computational burden of the proposed observer Equation (26) without the additional matrix equation is lower. Moreover, the number of parameter estimatesθ updated in Equation (26) is no more than four at any time; then, the computational load can be further reduced by stopping estimatinĝ θ i,j corresponding to υ / ∈ R k u δ × R l ne .
Remark 3. For the area S where the trajectory of the map input υ does not move, the parametersθ i,j corresponding to the interpolation region belonging to S cannot be estimated by observer Equation (26). In order to get the map parameters corresponding to S, an extrapolation model can be taken as follows: ∆W c,e (u δ , n e ) = a 2 u 2 δ + a 1 u δ + b 2 n 2 e + b 1 n e + c 2 u δ n e + c 1 (37) where a 2 , a 1 , b 2 , b 1 , c 2 , c 1 are polynomial parameters. Based on the data from the estimated map parameters, extrapolation model Equation (37) can be fitted by polynomial fitting approach, and then map parameters corresponding to S can be obtained.

Simulation Results
In this section, the simulation study of 2D map estimation is presented in the environment of a 1.9 L four-cylinder common rail turbo diesel engine of enDYNA, in which the ETC and FTP75 are used as test conditions, respectively. The observer architecture is illustrated in Figure 2, where ∆W c (u δ , n e ) is the additive reference error as the true measurement error from enDYNA. Bounds on the parameter vector ρ are presented in Table 1. When the inequality Equations (28) and (33) are solved with ε 1 = 0.25 and ε 2 = 0.11, the gain matrix L can be given by: The initial values of observer Equation (26) used in the simulation arê x (0) = 9.8 × 10 5 9.8 × 10 5 0 T ,θ (0) = 0, and the parameter gain is Γ = 200I. Here, the reference error ∆W c (u δ , n e ) assumed as MAF sensor measurement error is depicted in Figure 3, which is superimposed on the signal W c in enDYNA as the measured value y m2 in the simulation.

2D Map Estimation under ETC
There are three parts of the ETC representing three different driving conditions, including urban, rural and motorway driving. Due to the engine speed range from ETC Part 1 covering the other two parts, ETC Part 1 is employed as the test condition in this section. Accordingly, the fuel mass injection quantity u δ and engine speed n e from ETC Part 1 are plotted in Figure 4a, and the trajectory of the operating point υ = (u δ , n e ) is depicted in Figure 4b  The parameters corresponding to area S obtained from Equation (37) are presented in Figure 5b, which can roughly reflect the trend of the map.
In order to evaluate the accuracy of the estimated 2D map shown in Figure 5a, the comparison between the reference error ∆W c (u δ , n e ) and the estimated 2D map during the ETC segment is presented in Figure 6a. Accordingly, the true mass air flow y 2 , measured mass air flow y m2 and map compensation are shown in Figure 6b. The mean relative error between reference error ∆W c (u δ , n e ) and estimated 2D map is 10.41%, which demonstrates that the measured output y m2 of the MAF sensor after map correction can approximate the true value of W c acceptably.

2D Map Estimation under FTP75
In order to verify the effectiveness of the proposed method under different conditions, the cold start transient phase of the FTP75 is used in this section. Accordingly, u δ and n e are plotted in Figure 7a, and the trajectory of υ is depicted in Figure 7b The map added the parameters corresponding to area S are shown in Figure 8b, which can also roughly reflect the trend of the map. Under the FTP75 segment, the comparison between the reference error ∆W c (u δ , n e ) and the estimated 2D map from Figure 8a is shown in Figure 9a. Accordingly, the MAF sensor measured value y m2 using map compensation is presented in Figure 9b. The mean relative error between reference error ∆W c (u δ , n e ) and the estimated 2D map is 5.28%, demonstrating that the measured output y m2 after map correction can approximate the true value of W c acceptably.

Conclusions
A method for updating and storing sensor bias from different operating points is developed and investigated. This method achieves simultaneous estimation of model states and map parameters and applies to updating the MAF sensor error 2D map in the engine. The map in the form of a vector-vector dot product is given to conveniently analyze and design the parameter estimation method. An LPV adaptive observer to estimate map parameters is designed, which has the advantage of a simple structure and low computational load. Under ETC Part 1 and the cold start transient phase of the FTP75, the effectiveness of the presented algorithm is verified and validated in the engine software enDYNA. The results demonstrate that the proposed method can estimate the MAF sensor error acceptably.
Nomenclature p amb ambient pressure (Pa) p im intake manifold pressure (Pa) p em exhaust manifold pressure (Pa) ω t turbine speed (rad/s) n e engine speed (rpm) W c compressor mass air flow (kg/s) W egr EGR mass flow (kg/s) W ei cylinder mass flow (kg/s) W f fuel rate injected to cylinder (kg/s) W t turbine mass flow (kg/s) P c compressor power (W) P t turbine power (W) Φ c volumetric flow coefficient Ψ egr energy transfer coefficient η vol volumetric efficiency η tm turbine efficiency η m turbocharger mechanical efficiency η c compressor efficiency T amb ambient temperature (K) T im intake manifold temperature (K) T em exhaust manifold temperature (K) V im intake manifold volume (m 3 ) V em exhaust manifold volume (m 3 ) V d displaced volume (m 3 ) R a air gas constant (J/(kg·K)) R e exhaust gas constant (J/(kg·K)) R c compressor blade radius (m) γ a air specific heat capacity ratio γ e exhaust specific heat capacity ratio Π c compressor pressure quotient Π t turbine pressure quotient J t turbine inertia (kg·m 2 ) n cyl number of cylinders A egr EGR valve effective area (m 2 ) A vgtmax VGT nozzle maximum effective area (m 2 ) f Πt choking function f vgt effective area ratio function u egr EGR valve opening percentage (%) u vgt VGT vane opening percentage (%) u δ injected amount of fuel (mg/cycle) c pa air specific heat capacity at constant pressure (J/(kg·K)) c pe exhaust specific heat capacity at constant pressure (J/(kg·K))