Engineering Applications of Artificial Intelligence 45 (2015) 313–324
Contents lists available at ScienceDirect
Engineering Applications of Artificial Intelligence journal homepage: www.elsevier.com/locate/engappai
Air–fuel ratio prediction and NMPC for SI engines with modified Volterra model and RBF network Yiran Shi a, Ding-Li Yu b,n, Yantao Tian a, Yaowu Shi a a b
National key Laboratory of Automobile Dynamic Simulation, Jilin University, China School of Engineering, Liverpool John Moores University, Liverpool, U.K.
art ic l e i nf o
a b s t r a c t
Article history: Received 12 March 2014 Received in revised form 7 July 2015 Accepted 8 July 2015
The dynamics of air manifold and fuel injection in spark ignition (SI) engines are modelled with both a modified Volterra series and a radial basis function (RBF) network. In a Volterra model-based model predictive control (MPC) the global optimal control can always be solved by a linear optimization, but the model accuracy is low. On contrast, the RBF model provides more accurate prediction but its nonlinearity makes optimization nonlinear and non-convex, and therefore not always solvable. In this paper, the two models are combined so that linear optimization is enabled and the prediction accuracy is compensated, and therefore, both reliability and accuracy are achieved in a relative low computing cost. Using the developed method, the nonlinear MPC (NMPC) of the air/fuel ratio is implemented and evaluated by computer simulation. A real-time simulation using d-SPACE is also conducted to assess the real-time execution of the software. The simulation results show that the RBF compensated MPC outperformed over the Volterra model or RBF model based control. & 2015 Elsevier Ltd. All rights reserved.
Keywords: Air/fuel ratio control SI engines Volterra model RBF model Nonlinear model predictive control
1. Introduction In recent years, with the increasingly serious energy deficit and the air pollution problems, governments accordingly made a series of stringent vehicle emission standards. These severe situations have greatly promoted the development of the modern automotive technologies and the engine control technologies. Several ways of improving the engine fuel efficiency and reducing the vehicle emissions are emerging (Balluchi et al., 2000; De Nicolao et al., 1996). Among these, the most effective and widely used technology for automobile exhaust purification is the electronic fuel injection (EFI) system combining with the three-way catalyst (TWC) (Manzie et al., 2001, 2000). Theory and practice have proved that only when the air/fuel ratio (AFR) strictly controlled in an extremely narrow range of 14.771% will TWC achieve the highest conversion efficiency on the exhaust emissions, while the engine torque output and fuel consumption achieve the best balance point (Manzie et al., 2001, 2000). The highly nonlinear dynamics of engines make the AFR control problem more challenging, and its enormous economic benefits drive the scholars ongoing efforts (Manzie et al., 2001, 2000; Choi and Hedrick. 1998). Currently, how to improve the AFR control performance has become one of the most compelling problems in the engine control field.
n
Corresponding author. E-mail address:
[email protected] (D.-L. Yu).
http://dx.doi.org/10.1016/j.engappai.2015.07.008 0952-1976/& 2015 Elsevier Ltd. All rights reserved.
The key problem of AFR control is to solve the highly nonlinear problem of SI engines (Manzie et al., 2001, 2000; Choi and Hedrick, 1998). Nowadays, the widely used AFR control method is the look-up tables combining with the proportional and integral (PI) feedback controller because of its simple structure and robustness, etc. (Manzie et al., 2001, 2000). However, producing tables for the different types of engine will cost too much money and manpower. Some reasons have been identified for engine dynamics change, such as the difference between production batches and mechanical wear of engine parts. The dynamics change consequently causes the performance of the above mentioned method degraded (Manzie et al., 2001, 2000; Choi and Hedrick 1998), and the proposed method aims to improve the control performance against the engine dynamics change. Recently, with the development of nonlinear control theory, NMPC has been attempted for SI engines to tackle AFR (Hsieh et al., 2009; Wojnar et al., 2013; Wang et al., 2006a, 2006b; Wang and Yu, 2005). Among them, Manzie et al. (2001) proposed an adaptive RBF network model based NMPC method for the AFR control problem. In this method, the adaptive RBF model was used to predict the AFR output sequence, and used a linear predictive control algorithm with the active set method to realize the AFR control. Base on this paper, Wang et al. (2006a) developed an adaptive RBF model based NMPC method for AFR control, where a reduced Hessian method was developed to optimize the control sequence and achieved good control performance. In a followed paper, Wang et al. used the multi-layer Perceptron (MLP) neural network model to identify the AFR system, and proposed a MLP
314
Y. Shi et al. / Engineering Applications of Artificial Intelligence 45 (2015) 313–324
neural network model based NMPC method for AFR control problem (Wang and Yu, 2005). However, due to the nonlinearity of RBF model and the nonconvexity of RBF based NMPC, the sequential quadratic programming algorithm is not guaranteed to find the optimal control, and sometimes fail within the allowed time period. These pre-matured searching leads to non-optimal control after the optimization is terminated. Volterra model-based NMPC method can solve this problem effectively. In this method, as the higher-order nonlinear part of the model is supposed to be constant in the optimization, the optimal control sequence can be calculated directly by using the Least Squares method. Thus, the large amount of calculation is avoided. Maner et al. (1996) proposed a NMPC method based on the second-order Volterra model, and used this method in the multivariable polymerization reactor control. As the reactor dynamics are relatively slow and have long enough time to allow a big number terms to be used, a satisfactory control performance was achieved. Gruber et al. (2011) improved the form of the traditional Volterra model, and extended the application of the method (Maner et al., 1996) in greenhouse temperature control. Glass and Franchek (2000) and Gruber et al. (2012) studied nonlinear MPC based on the Volterra model and the system stability. Boland and Zoubir (1997) used the Volterra model to detect the engine knock, and achieved the higher identification accuracy. However, the problem of the Volterra model-based NMPC is a trade-off between the model order and the model prediction accuracy. The higher order will make the Volterra model into the “dimension disaster” which causes the computing load increased sharply, while the lower order will make the prediction accuracy of the Volterra model reduced due to the lack of the high order terms. To tackle the above problem, a modified Volterra model with different sampling times for different dynamics was proposed to reduce the computing load (Shi 2013). In this paper, it is proposed in the MPC strategy, using a RBF model to compensate for the modelling error of the modified Volterra model. In this way, the linear optimization feature of the Volterra model-based NMPC has been preserved with the guaranteed global optimal solution, whilst the model prediction error is reduced by RBF compensation. This is the novelty of the paper. The contribution of the paper lies in the modified Volterra model that reduces the modelling error with much less terms to reduce the computing load when the model applied to processes with different time constants. In addition, the RBF network is used here in a novel way to compensate the modelling error for the Volterra model, so that the model prediction error is further reduced. The key features of the model-based predictive control are two: one is that the model can precisely predict process output; the other is that the computing load for model prediction should be low. When a Volterra model is used as the prediction model, a compromise must be made between prediction accuracy and the calculation mode. The proposed method in this paper reduces the computing load by introducing a novel method to cope with different dynamics. On the other hand, this action also causes a slight reduction of the prediction accuracy, which is compensated for by the RBF network. This method is evaluated with a widely used SI engine benchmark, the mean value engine model (MVEM) (Hendricks 2000), and a real-time simulation is conducted on the dSPACE experimental platform. The simulation results show that the AFR control performance of the method proposed in this paper is outperformed over the NMPC based on the modified Volterra model or RBF network model only.
paper, the mean value engine model (MVEM) was used, instead of the real engine test bed in this paper. The MVEM was developed by Hendricks (2000), and it is a widely used and well-known benchmark for engine modelling and control. The configuration of the MVEM is shown in Fig. 1 (Wang et al., 2006a). It is composed of three sub-models which describe the air intake manifold dynamics including manifold pressure and temperature, the crankshaft speed dynamics, and the fuel injection dynamics, respectively. The two inputs of this simulation model are the _ f i respecthrottle angle v and the injected fuel mass flow rate m tively, and AFR is the output of the model. The manifold temperature T i , the manifold pressure P i and the crankshaft speed n are the measurable intermediate variables of the AFR system. All the variables and physical parameters are defined in Appendix. The three sub-systems are briefly introduced below to make the paper self-completion. For details about the three sub-systems readers can refer to Ref. Wang et al. (2006a). The MVEM developed by Hendricks was composed of three sub-systems: air intake subsystem, crankshaft speed sub-system and fuel injection subsystem. The air intake sub-system includes air manifold pressure and air manifold temperature with the two blocks. The rest two blocks – AFR block and time delay block are added to the MVEM model by the authors in this work to form AFR generation. 2.1. Intake manifold filling dynamics The intake manifold filling dynamics are analysed based on the air mass conservation inside the intake manifold. It consists of two nonlinear differential equations which describe the manifold pressure and the manifold temperature respectively. The manifold pressure is used to describe the relationship of the air mass flow _ ap , the air mass flow past throttle plate m _ at , into the intake portm _ EGR , the EGR temperature T EGR , the intake the EGR mass flow m manifold temperature T i and the ambient temperature T a . It can be written as, kR _ ap T i þ m _ at T a þ m _ EGR T EGR Þ P_ i ¼ ð m Vi
For the manifold temperature dynamics, the differential equation is as follows. RT i _ ap ðκ 1ÞT i þ m _ at ðκ T a T i Þ þ m _ EGR ðκ T EGR T i Þ ½m T_ i ¼ PiV i
ð2Þ
_ EGR is set to zero, as the EGR flow is not considered in this where m research. The air mass flow dynamics in the intake manifold consist of two parts: one is the air mass flow past throttle plate _ at , which is related to the throttle position v and the manifold m pressure P i , and the other part is the air mass flow into the intake _ ap , which can be represented by a well-known speed– port m density equation. Therefore, the air mass flow dynamics are
2. SI engine dynamics In order to facilitate the AFR system modelling in SI engines and investigate the feasibility of the method proposed in this
ð1Þ
Fig. 1. The MVEM model in Simulink.
Y. Shi et al. / Engineering Applications of Artificial Intelligence 45 (2015) 313–324
315
2.4. Air–fuel ratio measurement
described as follows. Pa _ at ðv; P i Þ ¼ mat1 pffiffiffiffiffi β ðvÞβ2 ðP r Þ þ mat0 m Ta 1
ð3Þ
The AFR is calculated by the ratio of the air mass flow into _ ap and the engine port fuel mass flow m _ f as follows. intake port m
Vd ðη U P Þn 120RT i i i
ð4Þ
λ ¼ _ ap mf
_ ap ðn; P i Þ ¼ m where
β1 ðvÞ ¼ 1 cos ðvÞ Pr ¼
v20
ð5Þ
2!
Pi Pa
8 rffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi 2 > < 1 P1r PPcc ; β2 ðP r Þ ¼ > : 1;
if P r Z P c
ð15Þ
However, it takes two engine cycle delay from the injection of fuel to the expulsion from the exhaust valves. Considering the engine speed impact on the delays, the delay of injection system can be approximated by, 10π n
ð16Þ
ð6Þ
t d ¼ 0:045 þ
ð7Þ
3. Engine modelling with RBF neural network
if P r o P c
where, mat0 ,mat1 ,v0 ,P c are constants, ηi is volumetric efficiency, the termηi UP i is the normalized air charge that can be obtained by the steady state engine test. The normalized air charge can be approximated by the following polynomial equation.
ηi U pi ¼ si ðnÞP i þ yi ðnÞ
ð8Þ
where si ðnÞ and yi ðnÞare positive, weak functions of the crankshaft speed and yi {si .
Based on the conservation of rotational energy, the crankshaft speed can be represented as, 1 1 _ f t Δτd P ðP ; nÞ þ P p ðP i ; nÞ þ P b ðnÞ þ H u ηi P i ; n; λ m In f i In ð9Þ where P f is friction power, P p is the pumping power that is related to the manifold pressure and the crankshaft speed, P b is the load power that is a function of the crankshaft speed n. The volumetric efficiency ηi is related with the manifold pressure P i , crankshaft speed n and air fuel ratio λ. 2.3. Fuel injection dynamics By considering the fuel evaporation in the intake manifold, the _ f can be stated as follows. engine port fuel mass flow m _ f ¼m _ fv þm _ ff m
ð10Þ
with _ f v ¼ ð1 X f Þm _ fi m
In model predictive control systems, the optimal control is calculated to minimize the cost function under open-loop condition. The NMPC is essentially to solve the optimal control problem of an open-loop system which strongly relies on the output sequence predicted by the nonlinear model. Thus, the prediction accuracy of the nonlinear model is particularly important for NMPC control performance. In order to provide the higher accurate prediction, in this paper RBF model is used for predicting the future AFR output sequence. 3.1. Adaptive RBF neural network model
2.2. Crankshaft speed dynamics
n_ ¼
_ m
RBF model is a classical feed forward neural network model, the structure as shown in Fig. 2. It is composed of the input layer, the hidden layer and the output layer. The hidden layer consists of a series of hidden nodes. For the output of each hidden node, the nonlinear activation function used in this work is the Gaussian basis function: ! ‖xðtÞ cj ‖2 ϕj ðtÞ ¼ exp ð17Þ ; j ¼ 1; …; nh 2
σj
where, nh is the number of hidden nodes, ‖xðtÞ cj ‖ is the Euclidean distance between the network input vector x and the jth centre cj , σ 4 0 is used for describing the width of each hidden node. The output of the network is a linear combination of the hidden layer outputs with the weighting matrix W. At time t, the ith output of the network is written as: y^ i ðtÞ ¼
nh X
ϕj ðtÞwj;i ¼ ΦðtÞw; i ¼ 1; …; q
ð18Þ
j¼1
where, wj;i is the weight connecting the ith hidden node with the jth output, q is the number of outputs.
ð11Þ w1,1
x1
yˆ 1
_ f f is _ f v is the fuel vapour mass flow, m In the equations above, m the fuel film mass flow. The fuel evaporation τf and the proportion of the fuel film generated X f depend on the operating point, and can be defined as:
x2
yˆ2
τf ðP i ; nÞ ¼ 1:35 ð 0:672n þ 1:68Þ
xd
€ ff ¼ m
1
τf
€ f f þ Xf m _ f iÞ ðm
2
ðP i 0:825Þ þ ð 0:06 n þ 0:15Þ þ0:56 X f ðP i ; nÞ ¼ 0:277P i 0:055n þ 0:68
ð12Þ
yˆ q wnh,q
ð13Þ ð14Þ
Input layer
Hidden layer
Output layer
Fig. 2. RBF network structure.
316
Y. Shi et al. / Engineering Applications of Artificial Intelligence 45 (2015) 313–324
3.2. The training algorithms In order to train RBFNN model, in this paper recursive K-means algorithm (Chen et al., 1992) and P-nearest algorithm (Leonard and Kramer 1991) are used for determining the centre c and the width σ of the network respectively. The recursive Least Squares (RLS) (Ljung, 1987) algorithm is used for training the weights wj;i . In order for RBF model to be adapted with the dynamics changes of the SI engine, the RLS is used for updating wj;i online during the AFR control process. 3.2.1. Recursive k-means algorithm In the hidden layer, the centre c of every hidden node is calculated by the recursive k-means algorithm. The objective of this algorithm is to minimize the sum squared distance from each input data to its closet centre c, so all input data can be completely covered by the activation functions. The recursive steps of K-means clustering algorithm are as follows (Chen et al., 1992): Step 1: randomly selected nh input data as the initial centres. Step 2: let kðxÞ be the index of best-matching for the input data vector x. At iteration t, calculate kðxÞ by the following equation: " # nh 1X 2 kðxÞ ¼ arg min ðxðtÞ ck ðtÞÞ ð19Þ 2k¼1 where ck ðtÞ is the centre of kth hidden node at iteration t. Step 3: update the centres of the hidden nodes with the following rule: ( ck ðtÞ þ αc ½xðtÞ ck ðtÞ if k ¼ kðxÞ ck ðt þ 1Þ ¼ ð20Þ otherwise ck ðtÞ where αc A ð0; 1Þ is the learning rate of the centres. Step 4: if ‖ck ðt þ1Þ ck ðtÞ‖ o δ, then out of the k-means clustering algorithm. If not, t increased by 1 and return to step 2 continue the recursive algorithm. 3.2.2. P-nearest neighbours algorithm The widths of the hidden nodes σ j are calculated by P-nearest neighbour algorithm. In order to make a smooth interpolation between the hidden nodes, the excitation of each hidden nodes should overlap with others. In the P-nearest neighbour algorithm, the width of each hidden node is calculated by the average distance between the ith centre ci and the p nearest centres. The algorithm is as follows (Leonard and Kramer, 1991):
σi ¼
p 1X ‖c cd ‖; pd¼1 i
i ¼ 1; …; nh
ð21Þ
where σ i is the width of ith hidden node, the value of p can be selected according to the actual situation.
^ where, wðtÞis the weights vector of the RBFNN model, at timet. ΦðtÞis the activation function output vector. PðtÞand LðtÞare the intermediate variables vector of the algorithm. λðtÞ A ð0; 1Þis the ^ forgetting factor. After set the initial values ofλðtÞ, wðtÞand PðtÞ, at ^ every sampling time the parameters vector LðtÞ, wðtÞ and PðtÞwill be updated according to the output of the activation function ΦðtÞ. 3.3. AFR modelling with RBF model The AFR dynamics of SI engines are highly nonlinear and multivariable (Manzie et al., 2000, 2001). As in the mentioned SI engine dynamics described in (1)–(16), the air/fuel ratio is related _ f i , the with the throttle angle v, the injected fuel mass flow m manifold pressure P i , the intake manifold temperature T i and the _ f i are the input variables of the crankshaft speed n. Here, v and m AFR system, andP i , T i and n are the measurable intermediate variables. Through the above analysis and by the trial and error method (by comparing the mean absolute errors (MAE) of model prediction for different choices of the model inputs), the input variables and their orders shown in Fig. 3 have been selected. To allow the model prediction recursively for many steps ahead (or to make an independent model that does not rely on the plant) the three intermediate variables are also predicted by the model. The system model (RBF network or Volterra model) uses plant inputs: throttle angle and fuel injection rate, and the model outputs (rather than the plant outputs): manifold pressure, manifold temperature, crankshaft speed and AFR. The predicted outputs of the model are used as part of the input for next sample prediction. This forms recursive prediction for multi-step-ahead. So, the model has 15 inputs and 4 outputs, and the hidden layer nodes are chosen as 22. To excite the engine system throughout all frequency spectrum and amplitude distributions of the nonlinear dynamics, the random amplitude sequences (RAS), the variable amplitude pseudorandom binary sequence (PRBS), the variable amplitude M-sequence, and the Gaussian white noise sequence were selected as the excitation sequences. Collecting engine data with each of the above excitation signal sequence and training the RBF model with these sets of data, the trained models are tested and the mean absolute error (MAE) is used to measure model accuracy. It was found that the model trained with the data excited by RAS has the highest accuracy. So, the RAS was selected as the excitation signal for all training and testing data acquisition. In this research a set of 20,000 data samples is collected in the MEVM engine model with the sampling time Ts ¼0.02 s. The chosen sample period Ts ¼0.02 s is consistent with that used in the typical applications, for example (Hendricks et al., 1996) and (Wang et al., 2006a). The first 10,000 samples were used for training and the remaining 10,000 samples were used for testing. The corresponding parameters in the training are set as follows: ^ p ¼ 3; λ ¼ 0:999; pð0Þ ¼ 1 108 I nh nh ; wð0Þ ¼ 1 10 8 U nh q
3.2.3. The RLS algorithm RLS algorithm is used for training the weights w of the output layer. Moreover, this algorithm is also used for the RBFNN model adaptive online during the control process. The algorithm is as follows (Ljung, 1987): LðtÞ ¼
Pðt 1ÞΦðtÞ λðtÞ þ ΦT ðtÞPðt 1ÞΦðtÞ
^ 1Þ ^ ^ 1Þ þ LðtÞ½yðtÞ PT ðtÞwðt wðtÞ ¼ wðt PðtÞ ¼
" # T 1 Pðt 1ÞΦðtÞΦ ðtÞPðt 1Þ Pðt 1Þ λðtÞ λðtÞ þ ΦT ðtÞPðt 1ÞΦðtÞ
ð22Þ ð23Þ ð24Þ Fig. 3. RBF model structure in this paper.
Y. Shi et al. / Engineering Applications of Artificial Intelligence 45 (2015) 313–324
317
Fig. 4. Process output compared with model output (MAE ¼ 0.1435).
where I is an identity matrix and U is a random matrix. The prediction result of the RBF model is shown in Fig. 4 together with the engine output for comparison. The data in Fig. 4 are scaled data to [0 1] and displayed in percentage. To have a clear view of the modelling performance, only the samples 15,000–17,000 among the test data is displayed in Fig. 4. It can be seen in Fig. 4 that most dynamics are modelled to a high accuracy and the MAE of the prediction error is very small.
4. Engine modelling with modified Volterra model As the internal model of the MPC strategy, the Volterra model was adopted in this work. Volterra model is actually an impulse response model, which is just related to the system inputs and the controlled outputs (Leonard and Kramer, 1991). The intermediate variables which impact the system controlled output have been included in the internal parameters of the Volterra model. Many research have shown that the second order Volterra model can be used for identifying the vast majority of nonlinear systems with the high accuracy (Maner et al., 1996; Gruber et al., 2011; Chen et al., 1992). In order to reduce the complexity of Volterra model, in this paper the second order Volterra model is selected, in which the inputs are the throttle angle v and the injected fuel mass flow _ f i , and the output is the AFR. At the sampling time k, the second m order Volterra model with two inputs and one output is given in (Maner et al., 1996), yðkÞ ¼ h0 þ
Nt 2 X X l¼1j¼1
al;j ul ðk jÞ þ
Nt X Nt 2 X X
bl;j;l;n ul ðk jÞul ðk nÞ
l¼1j¼1n¼j
ð25Þ where ul ðkÞ is the lth input variable, yðkÞ is the output variable, N t denotes the corresponding truncation order, h0 is a bias term which can be fitted using input–output data. al;j and bl;i;l;j are the parameters of the linear and the nonlinear terms for ul respectively. _ f i to It is noteworthy that the dynamics from the fuel injection m the AFR has a significant speed difference from that of the throttle _ fi angle v to the AFR. Measured by the transition time tests, when m
had a step change from 0.0005 kg/s to 0.003 kg/s, and v was kept at 401, the transition time of AFR is 8 s. Analogously, when v had a _ f i was maintained at 0.0015 kg/s, step change from 20 to 601, and m the transition time of AFR is 0.8 s. Therefore, when the sampling period was chosen as T s ¼ 0:02s, the truncation order should be Nt ¼ ⌈8 s=0:02 s⌉ ¼ 400. This will lead to the computation of Volterra model increase sharply. Thus, in this work, a modified Volterra model with different sampling periods is developed to model the dynamics with significant speed difference. The two inputs and one output Modified Volterra model can be denoted as follow: yðkÞ ¼ h0 þ
NX t 1
au ðiÞuðk i T u 1Þ þ
i¼0
NX t 1 N t 1 X
bu ði; jÞuðk i
i¼0 j¼i
T u 1Þuðk j T u 1Þ þ
Nt X i¼1
av ðiÞvðk iÞ þ
Nt X Nt X
bv ði; jÞvðk iÞvðk jÞ
ð26Þ
i¼1j¼i
_ f i , vðkÞ is the throttle where uðkÞ is the injected fuel mass flow m _ fi angle v,yðkÞ is AFR output. For t u is the transition time when m step input, t v is the transition time when v step input, T u ¼ ⌈t u =t v ⌉ ¼ 10, and accordingly truncation order N t ¼ 400=T u ¼ 40. At the sample period k, uðk 1Þ; uðk 11Þ; …; u½k ðNt 1Þ T u 1 _ f i will be selected. Analogously, at the sample period k þ 1, of m _ f i will be selected, and so uðkÞ; uðk 10Þ; …; u½k ðNt 1Þ T u of m on. As the time goes on all the fuel injection samples will be used. This proves that the proposed modified Volterra model effectively reduce the truncation order and the calculation while not losing the necessary dynamic information. 4.1. The modelling result with modified Volterra model By using the same training data for the RBF model, the first 10,000 data samples are used for identifying the parameters of modified Volterra model, and the remaining 10,000 samples are used for testing the identified model. By using RLS method, the recursive initial values are set as: ^ Pð0Þ ¼ 108 I nn ; wð0Þ ¼ 10 8 U n1 ; λ ¼ 0:999
318
Y. Shi et al. / Engineering Applications of Artificial Intelligence 45 (2015) 313–324
where I is an identity matrix, U is a random matrix. The identification result of the modified Volterra model is as shown in Fig. 5. Comparing with Fig. 4, the prediction error of the modified Volterra model is obviously bigger than that of the RBF model. This is caused by the omitted higher order terms of Volterra model. This is the motivation behind this research that using the RBF model to compensate for the prediction error by the modified Volterra model in this work.
5. Proposed modified Volterra model based NMPC with RBF model compensation The control strategy of the NMPC for SI engine AFR is shown in Fig. 6. In Fig. 6, y^ 1 and y^ 2 are the predicted AFR output of the modified Volterra model and the RBF model respectively; vðtÞ is the current
value of the throttle angle; ef is the error between sp (set point) and the real AFR output yðtÞ of engine, which is used for eliminating the AFR control error and ensure the stability of the control system. The RBF model is used for providing the predicted future AFR output sequence for the NMPC controller. Meanwhile, the modified Volterra model provides the necessary parameters for the NMPC controller. Furthermore, in every control period, the parameters of the RBF model and the modified Volterra model will be updated by the real inputs and outputs values of SI engine, to realize the model adaptation online. Let N y denote the prediction horizon and N u the control horizon. For the future N y steps, the predicted output sequence of RBF model and the modified Volterra model can be written as (Maner et al., 1996): h y^ 2 ðk þ 1Þ ¼ y^ 2 ðk þ 1Þ
y^ 2 ðk þ 2Þ
Fig. 5. Modelling result of modified Volterra model (MAE ¼ 0.5267).
Fig. 6. Modified Volterra model based NMPC with RBF model compensation.
; …;
y^ 2 ðk þ N y Þ
iT
ð27Þ
Y. Shi et al. / Engineering Applications of Artificial Intelligence 45 (2015) 313–324
319
depending on the modified Volterra model or the RBF model. Where, e1 ðk þ 1Þ A ℜNy and e2 ðk þ1Þ A ℜNy are the prediction error vectors of the modified Volterra model and the RBF model respectively, and e2 ðkÞ o oe1 ðkÞ. From Eq. (29), the real AFR output sequence yðk þ 1Þ of SI engine should consist of two parts: one part is the linear term Gu uðkÞ that corresponds to the control variable sequence uðkÞ, the other part can be expressed as dðk þ1Þ ¼ f u ðk þ 1Þ þ cðk þ 1Þ þ e1 ðk þ 1Þ
ð31Þ
N y 1
Then, dðk þ 1Þ A ℜ consists of the nonlinear terms and the prediction error of the modified Volterra model. On the other hand, by the RBF model and from Eqs. (29) and (30), dðk þ1Þ ¼ y^ 2 ðk þ 1Þ Gu uðkÞ þ e2 ðk þ 1Þ
ð32Þ
For the RBF model, the prediction error e2 ðkÞ ¼ yðkÞ y2 ðkÞ is measured. The prediction error vector from sample time k þ1 to kþ Ny, e2 ðk þ 1Þ can be approximated by assuming that the prediction error is constant for the next Ny samples as given below. e2 ðk þ 1Þ ¼ e2 ðkÞ U U ¼ ½yðkÞ y^ 2 ðkÞ UU
ð33Þ
Ny 1
where U A ℜ is a column vector with unit entries. For the NMPC the cost function is typically set as, ( T J ¼ sp yðk þ 1Þ Λ1 sp yðk þ 1Þ þ ΔuðkÞT Λ2 ΔuðkÞ
Fig. 7. Simulation platform for real-time AFR control of SI engines.
2
au ð1Þ
6 3 6 au ð2Þ 6 y^ 1 ðk þ 1Þ 6 6 ^ 7 6 ⋮ 6 y1 ðk þ 2Þ 7 6 ⋮ 6 6 7 y^ 1 ðk þ 1Þ ¼ 6 7¼6 ⋮ 4 5 6 ⋮ 6 y^ 1 ðk þ Ny Þ 6 6 4 au ðN y Þ 2
0
⋯
au ð1Þ
⋱
⋮
⋱
⋮ ⋮
⋱ ⋱
au ðN y 1Þ
⋯
0
3
7 7 7 7 am ð1Þ 7 au ð1Þ þ au ð2Þ 7 7 7 7 ⋮ 7 7 Ny N þ 1 Xu 7 au ðiÞ 5 0
i¼1
|fflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflffl{zfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflffl}
s:t:
umin r uðkÞ rumax
where ΔuðkÞ ¼ uðkÞ uðk 1Þ, Λ1 and Λ2 are the weight matrices which are positive definite. By Eqs. (30) and (32) yðk þ 1Þ ¼ Gu uðkÞ þ dðk þ 1Þ
6 6 6 6 4
uðkÞ
3
2
f ðk þ 1Þ
3
2
cðk þ 1Þ
(
T J ¼ sp Gu uðkÞ dðk þ 1Þ Λ1 sp Gu uðkÞ dðk þ 1Þ þ ΔuðkÞT Λ2 ΔuðkÞ s:t: umin r uðkÞ r umax
u
fu
ð36Þ
3
7 6 7 6 7 7 6 f ðk þ 2Þ 7 6 cðk þ 2Þ 7 7 þ6 7 þ6 7 7 6 7 6 7 ⋮ ⋮ ⋮ 5 4 5 4 5 f ðk þ N y Þ cðk þ Ny Þ uðk þ Nu 1Þ |fflfflfflfflfflfflfflfflfflfflfflfflfflfflffl{zfflfflfflfflfflfflfflfflfflfflfflfflfflfflffl} |fflfflfflfflfflfflfflfflffl{zfflfflfflfflfflfflfflfflffl} |fflfflfflfflfflfflfflfflffl{zfflfflfflfflfflfflfflfflffl} uðk þ 1Þ
ð28Þ
c
In Eq. (28), Gu A ℜNy Nu is the parameter matrix of the linear terms _ f i in the input that correspond to the current and future m sequence uðkÞ A ℜNu 1 of the modified Volterra model. f u ðk þ 1Þ A ℜNy 1 is the nonlinear terms depending on the input sequence uðkÞ A ℜNu 1 . The term cðk þ1Þ A ℜNy 1 contains the _ f i , such terms that do not depend on the current or the future m _ f i input as the linear and the nonlinear terms related to the past m sequence upast A ℜNt 1 , the linear and the nonlinear terms related to the past time and the future time of the throttle angle v input sequence (vpast A ℜNy 1 ,vðkÞ A ℜNu 1 ), as well as the bias term h0 A ℜNy 1 . Because in the future time the changes of throttle angle are unpredictable, the values of the future throttle angle input sequence vðkÞ A ℜNu 1 are assumed to be the current input value, vðkÞ ¼ ½vðkÞ; vðkÞ; …; vðkÞT . As upast A ℜNt 1 , vpast A ℜNy 1 and vðkÞ A ℜNu 1 are known in each control period, cðk þ 1Þ is not related to the change of uðkÞ. The real AFR output sequence yðk þ 1Þ of the SI engine is written as either yðk þ 1Þ ¼ y^ 1 ðk þ 1Þ þ e1 ðk þ 1Þ ¼ Gu uðkÞ þ f u ðk þ 1Þ þ cðk þ 1Þ þ e1 ðk þ1Þ ð29Þ or yðk þ 1Þ ¼ y^ 2 ðk þ 1Þ þ e2 ðk þ 1Þ;
ð35Þ
Then, the cost function (34) is further written as,
Gu
2
ð34Þ
To solve the optimal control u*(k), Let ∂J=∂uðkÞ ¼ 0 in (36), then the following is obtained. h i 1 nh o i Gu T Λ1 sp dðk þ 1Þ þ Λ2 uðk 1Þ un ðkÞ ¼ Λ2 þ Gu T Λ1 Gu ð37Þ h i 2 where, ∂2 J= ∂uðkÞ ¼ 2 Λ2 þ Gu T Λ1 Gu is positive definite, so that the cost function J is a convex function. Moreover, un ðkÞ is the global minimum. It can be seen in (37) that the optimal control sequence can be calculated when the d(k þ1) is calculated using the RBF model with (32) rather than using the modified Volterra model. In (32) the model prediction error e2(k þ1) is replaced by the approximated e2 ðk þ 1Þ, the approximated error that is still much smaller than e1(k þ1). Thus, the model prediction error in the NMPC is greatly reduced and consequently the NMPC performance is marginally improved. For the constrained case, the optimal control sequence un ðkÞ is computed at control period k by the following algorithm: Step 1: seti ¼ 1. Step 2: set the the optimal control sequence un ðk 1Þ which calculated at control period k 1 as the initial sequence. And use the RBF model to predict the AFR output sequence i y^ 2 ðk þ 1Þ. i i Step 3: by using y^ 2 ðk þ1Þ and Gu calculate d ðk þ 1Þ, where, Gu is the parameter matrix provided by the modified Volterra model. i
d ðk þ 1Þ ¼ y^ 2 ðk þ 1Þ Gu ui ðkÞ þ e2 ðk þ1Þ i
ð30Þ
ð39Þ
320
Y. Shi et al. / Engineering Applications of Artificial Intelligence 45 (2015) 313–324
Step 4: calculate un ðkÞ by the following algorithm. 8 h ii o h i 1 nh > i T > Gu T Λ1 sp d ðk þ 1Þ þ Λ2 ui ðk 1Þ > un ðkÞ ¼ Λ2 þ Gu Λ1 Gu < un ðjÞ ¼ umax if > > > : un ðjÞ ¼ u if min
un ðjÞ Z umax ; j ¼ 1; 2; …; N u un ðjÞ r umin ; j ¼ 1; 2; …; N u
ð40Þ Step 5: set δ is the desired tolerance. If un ðkÞ satisfies‖ui ðkÞ ui 1 ðk þ 1Þ‖ r δ jump out of the optimal algorithm, _ f i input. If not, and set the first value ui ðkÞ of un ðkÞ as the current m set i ¼ i þ 1, by using the RBFNN model predict the AFR output i sequence y^ 2 ðk þ 1Þ with ui ðkÞ. And return to step 3, recalculate dðk þ1Þ.
6. Evaluation by real-time simulations The developed Volterra model based NMPC with RBF model compensation is evaluated by computer simulations. Firstly, Matlab/ Simulink software is used to implement the control system with the nonlinear MVEM in Simulink as the plant. Then, a real-time SI engine AFR control simulation platform is established based on dSPACE components, dSPACE MicroAutoBox and Matlab/Simulink. While the Matlab/Simulink based simulation showing success, the latter is mainly to test the execution of the developed control algorithm and the used computing methods, and also check the execution time with the S-function in the Matlab. But checking execution time is not well defined in this simulation as the plant used is not the real engine, and this part of work relating to the realtime application needs further investigation. As the simulation results obtained using Matlab/Simulink are very similar to that using dSPACE, the former simulation will not be presented here to avoid repetition. The simulation platform is shown in Fig. 7. Using the RTI software provided by dSPACE downloads the MEVM Simulink model to the DS1005PPC processor board as the plant to be controlled, and the NMPC algorithm is downloaded to the dSPACE MicroAutoBox (DS1401) to simulate the ECU controller. Use RS232 to communicate between the DS1005PPC processor board and the dSPACE MicroAutoBox. In the observer computer, the ControlDesk software is used for displaying and recording the simulation results.
In order to test the control performance of the different NMPC methods, the throttle angle v is selected as shown in Fig. 8. In Fig. 8, the throttle angle input changes from 25 to 501 att ¼ 5 s with 0.5 s duration, and changes back from 50 to 251 with also 0.5 s at t ¼ 10 s. Then, the throttle angle input changes from 25 to 501 as the step change at t ¼ 15 s, and change back from 50 to 251 as a step change at t ¼ 20 s. The two step changes are used to simulate the worst case of driving in practice. 6.1. Simulation 1 In the first simulation the proposed NMPC based on the modified Volterra model with RBFNN model compensation was used to control the AFR on the MVEM, the industrial benchmark of internal combustion engines. In the control process, the throttle angle as the disturbance as shown in Fig. 8 is applied. Here, the sample period Ts ¼0.02 s is used, which is the same as that used in data acquisition for training the RBF model and the modified Volterra model. The control parameters are tuned to achieve the best performance, and the final tuned values are: the prediction horizon Ny ¼ 20, the control horizon N u ¼ 10, the weight matrixes Λ1 ¼ 0:4 I Ny Ny , Λ2 ¼ 0:6 INu Nu , where I is the diagonal matrix with unit entries. The control result of AFR and the corresponding _ f i are displayed in Figs. 9 and 10 injected fuel mass flow m respectively. As shown in Fig. 9, at t ¼ 5 s and t ¼ 10 s, when the throttle angle v changes not so sharply, the AFR control result shows a small amplitude fluctuations, and remains within the boundary of 14:7 7 1%. Att ¼ 15s, when the throttle angle increases sharply, AFR has an overshoot to 16.75. It is then adjusted back to within the boundary of 14:7 7 1% after 0.14 s, and is stabilized at the setpoint 14.7 after 0.5 s. Analogously, at t ¼ 15 s, the throttle angle decreases sharply, the AFR generates an overshoot to 12.83, then it returns to the range of 14:7 7 1% after 0.04 s and is stabilized at 14.7 in 0.5 s. 6.2. Simulation 2 The NMPC based on the modified Volterra model only was used to control the AFR for comparison with the proposed method. The simulation was performed with the same set-point, AFR ¼14.7, and the same disturbance, the throttle angle as shown in Fig. 8. In this
Fig. 8. Throttle angle change during control.
Y. Shi et al. / Engineering Applications of Artificial Intelligence 45 (2015) 313–324
Fig. 9. Control performance with the proposed method, MAE¼ 0.0199.
Fig. 10. Injected fuel mass flow rate for control in Fig. 9 9.
Fig. 11. Control performance of the modified Volterra model based NMPC, MAE¼ 0.0873.
321
322
Y. Shi et al. / Engineering Applications of Artificial Intelligence 45 (2015) 313–324
Fig. 12. Injected fuel mass flow rate for the control in Fig. 11.
Fig. 13. Control performance of RBF model based NMPC, MAE¼ 0.0542.
NMPC method, the cost function (34) rather than (36) was used. The optimal control sequence for the modified Volterra model based NMPC method is solved from (34): 8 o h i 1 nh i > T n > Gu T Λ1 sp f u ðk þ 1Þ cðk þ 1Þ þ Λ2 uðk 1Þ > < u ðkÞ ¼ Λ1 þ Gu Λ1 Gu un ðjÞ ¼ umax if > > > : un ðjÞ ¼ u if min
un ðjÞ Z umax ; j ¼ 1; 2; …; N u un ðjÞ r umin ; j ¼ 1; 2; …; N u
ð41Þ And the values of Ny ,N u ,Λ1 ,Λ2 are selected as same as in simulation 1. With the same experimental conditions of the simulation 1, the control result of AFR and the corresponding _ f i are displayed in Figs. 11 and 12. injected fuel mass flow m Comparing with the control result of simulation 1, the control performance of the modified Volterra model based NMPC is not as good as that of the proposed NMPC method. This is mainly because that the higher order terms of the modified Volterra model was omitted and caused deteriorated prediction accuracy.
6.3. Simulation 3 In the performance assessment, the NMPC based on the RBF model only (Wang et al., 2006a) has also been simulated. As the cost function in this case is nonlinear and with constraints, the sequential quadratic programming (SQP) method was used to solve the optimal control sequence. Using the same values of the control parameters as in simulation 1 and 2, the control result of _ f i are AFR and the corresponding injected fuel mass flow m displayed in Figs. 13 and 14. As shown in Fig. 13, the AFR regulation performance with this method is much worse than that with the proposed method, in terms of much bigger overshoot and longer period before the AFR was tuned back to within the allowable range.
7. Conclusions In the application of NMPC method to regulate AFR against disturbance of throttle angle change, a RBF model is used to
Y. Shi et al. / Engineering Applications of Artificial Intelligence 45 (2015) 313–324
323
Fig. 14. Injected fuel mass flow rate for control in Fig. 13
compensate for the prediction error of the modified Volterra model. The proposed approach has two major advantages. One is that the plant output prediction has a much higher accuracy compared with the modified Volterra model only based NMPC. The other is that the linear optimization for the quadratic cost function is preserved, so that the optimal control is guaranteed to be solved with a much lighter computing load compared with the RBF model based NMPC. The real-time simulation with the MVEM benchmark on the platform of dSPACE has proved the effectiveness of the proposed method. Comparing with the simulation results of the Voterra model based and RBF model based MPC methods, a much better control performance is achieved in terms of smaller overshoot and faster response. The two superior features stated above are also proved. The real-time simulation also validates the execution of the control software in the limited time, so that make it possible for the model predictive control strategy to be used in the systems with fast dynamics. Further investigation on both improving control performance and shortening the execution time using real engine and hardware-in-the-loop simulation will provide more convinced evidence for practical applications of the proposed method. The real data experiment is in preparation and the experiments will be reported elsewhere when they are available.
_ ff m _ fi m _ fv m n Pa Pb Pf Pi Pp R Ta T EGR Ti td v Vd Vi
ηi λ Δτd κ
fuel film mass flow (kg=s) injected fuel mass flow (kg=s) fuel vapour mass flow (kg=s) crankshaft speed (krpm) ambient pressure (bar) load power (kW) friction power (kW) manifold pressure (bar) pumping power (kW) gas constant (here287 10 5 ) ambient temperature (K) EGR temperature (K) intake manifold temperature (K) time delay of fuel injection systems throttle position (degrees) engine displacement Manifold þ port passage volume (m3 ) indicated efficiency air/fuel ratio injection torque delay time (s) Ratio of the specific heats¼ 1.4 for air
References Acknowledgement This work is supported partially by the National Natural Science Foundation of China under the Grant 51075175 and the Research Fund from State Key Laboratory of Automobile Dynamic Simulations.
Appendix Notations Hu I Lth _ ap m _ at m _ EGR m _f m
fuel lower heating value (kJ=kg) 2 crank shaft load inertia (kJm ) stoichiometeric air/fuel ratio (14.7) air mass flow into intake port (kg=s) air mass flow past throttle plate (kg=s) EGR mass flow (kg=s) engine port fuel mass flow (kg=s)
Balluchi, A., et al., 2000. Automotive engine control and hybrid systems: challenges and opportunities. Proc. IEEE 88 (7), 888–912. Boland, M. Zoubir A., 1997. Identification of time-varying non-linear systems with application to knock detection in combustion engines. In: Proceedings of IEEE Region 10 Annual Conference on Speech and Image Technologies for Computing and Telecommunications. TENCON'97. Chen, S., Billings, A., Grant, P.M., 1992. Recursive Hybrid algorithm for non-linear system identification using radial basis function networks. Int. J. Control 55 (5), 1051–1070. Choi, S.B., Hedrick, J.K., 1998. An observer-based controller design method for improving air/fuel characteristics of spark ignition engines. Control Syst. Technol. IEEE Trans. 6 (3), 325–334. De Nicolao, G., Scattolini, R., Siviero, C., 1996. Modelling the volumetric efficiency of IC engines: parametric, non-parametric and neural techniques. Control Eng. Pract. 4 (10), 1405–1415. Glass, J.W., Franchek, M.A., 2000. Stability of nonlinear feedback systems in a Volterra representation. Int. J. Robust Nonlinear Control 10 (10), 799–819. Gruber, J., et al., 2011. Nonlinear MPC based on a Volterra series model for greenhouse temperature control using natural ventilation. Control Eng. Pract. 19 (4), 354–366. Gruber, J., Bordons, C., Oliva, A., 2012. Nonlinear MPC for the airflow in a PEM fuel cell using a Volterra series model. Control Eng. Pract. 20 (2), 205–217. Hendricks, E., 2000. A generic mean value engine model for spark ignition engines.
324
Y. Shi et al. / Engineering Applications of Artificial Intelligence 45 (2015) 313–324
Hendricks, E., et al., 1996. Modeling of the intake manifold filling dynamics. SAE Trans. 105 (3), 960037. Hsieh, M.F., Canova, M., Wang, J., 2009. Model predictive control approach for AFR control during lean NOx trap regenerations. SAE Int. J. Fuels Lubr. 2 (1), 149–157. Leonard, J.A., Kramer, M.A., 1991. Radial basis functions for classifying process faults,. IEEE Control Syst. Mag. 11 (3), 31–38. Ljung, L., 1987. System Identification: Theory for the User. Preniice Hall Inf and System Sciencess Series, New Jersey p. 7632. Maner, B.R., et al., 1996. Nonlinear model predictive control of a simulated multivariable polymerization reactor using second-order Volterra models. Automatica 32 (9), 1285–1301. Manzie, C., Palaniswami W., Watson H., 2000. Model predictive control of a fuel injection system with a radial basis function network observer. In: Proceedings of the IEEE-INNS-ENNS International Joint Conference on Neural Networks. IJCNN 2000.
Manzie, C., Palaniswami, M., Watson, H., 2001. Gaussian networks for fuel injection control. Proc. Inst. Mech. Eng. D: J. Automob. Eng. 215 (10), 1053–1068. Shi, Yiran, 2013. Dynamic Modelling of IS Engine with Manified Volterra Model Research report. School of Engineering, Liverpool John Moores University, UK. Wang, S., Ding-Li, Yu, Gomm, J.B., Page, G.W., Douglas, S.S., 2006a. Adaptive neural network model based predictive control for air–fuel ratio of SI engines. Eng. Appl. Artif. Intell. 19 (2), 189–200. Wang, S., Yu, Ding-Li, Gomm, J.B., Page, G.W., Douglas, S.S., 2006b. Adaptive neural network model based predictive control of an internal combustion engine with a new optimization algorithm. Proc. Inst. Mech. Eng. D: J. Automob. Eng. 220 (2), 195–208. Wang, S.-W., Yu, D.-L., 2005. Adaptive air–fuel ratio control with MLP network. Int. J. Autom. Comput. 2 (2), 125–133. Wojnar, S., Honek M., Rohal’-Ilkiv B., 2013. Nonlinear air–fuel ratio predictive control of spark ignited engines. In: Proceedings of the 2013 International Conference on Process Control. PC. IEEE.