# HCCI Intelligent Rapid Modeling by Artificial Neural Network and Genetic Algorithm

Authors: AbdoulAhad Validi; Jyh-Yuan Chen; Akbar Ghafourian
Journal: Journal of Combustion
 (2012)

---

## Abstract

A Dynamic model of Homogeneous Charge Compression Ignition (HCCI), based on chemical kinetics principles and artificial intelligence, is developed. The model can rapidly predict the combustion probability, thermochemistry properties, and exact timing of the Start of Combustion (SOC). A realization function is developed on the basis of the Sandia National Laboratory chemical kinetics model, and GRI3.0 methane chemical mechanism. The inlet conditions are optimized by Genetic Algorithm (GA), so that combustion initiates and SOC timing posits in the desired crank angle. The best SOC timing to achieve higher performance and efficiency in HCCI engines is between 5 and 15 degrees crank angle (CAD) after top dead center (TDC). To achieve this SOC timing, in the first case, the inlet temperature and equivalence ratio are optimized simultaneously and in the second case, compression ratio is optimized by GA. The model’s results are validated with previous works. The SOC timing can be predicted in less than 0.01 second and the CPU time savings are encouraging. This model can successfully be used for real engine control applications.


---

## Body

## 1. Introduction

New strategies and technologies to reduce exhaust gas emissions and increase efficiency simultaneously are the main subjects that are appreciated by engine manufacturers and laboratories. Strict international, national, and other institutional legislations increasingly emphasize on this matter [1, 2]. Homogeneous Charge Compression Ignition (HCCI) engines are being considered as a new generation of internal combustion engines. HCCI has characteristics of the two most popular forms of combustion used in IC engines: homogeneous charge Spark Ignition (SI) and stratified charge Compression Ignition (CI). As in homogeneous charge spark ignition, the fuel and oxidizer are mixed together. However, rather than using an electric discharge to ignite a portion of the mixture, the density and temperature of the mixture are raised by compression until the entire mixture reacts spontaneously. Stratified charge compression ignition also relies on temperature and density increase resulting from compression, but combustion occurs at the boundary of fuel-air mixing, caused by an injection event, to initiate combustion. The defining characteristic of HCCI is that the ignition occurs at several places at a time which makes the fuel/air mixture burn nearly simultaneously. There is no direct initiator of combustion. This makes the process inherently challenging to control. However, with advances in microprocessors and a physical understanding of the ignition process, HCCI can be controlled to achieve SI engine-like emissions along with CI engine-like efficiency. As in spark ignition engines, the charge is well mixed which minimizes particulate emissions, and as in diesel engines, it is compression ignited and has no throttling losses, which all contribute to the high fuel efficiency [3].HCCI technology is highly desirable, since it combines the high fuel efficiency of compression ignition (CI) engines with the less polluting nature of spark ignition (SI) engines and low cost. In fact, HCCI engines have been shown to achieve extremely low levels of Nitrogen oxide emissions (NOx) without an after-treatment catalytic converter. The unburned hydrocarbon and carbon monoxide emissions are still high (due to lower peak temperatures), as in SI engines and must still be treated to meet automotive emission regulations. HCCI engines have a long history, even though it has not been as widely implemented as spark ignition or diesel injection. It is essentially an Otto combustion cycle.Controlling HCCI is a major hurdle to more widespread commercialization [4]. HCCI is more difficult to control than other popular modern combustion engines, such as SI and CI engines. A real-time controlling model is needed to resolve this challenge before HCCI can be implemented in mass production. In a typical SI engine, a spark is used to ignite the premixed fuel and air. In CI engines, combustion begins when the fuel is injected into compressed air. In both cases, the timing of combustion is explicitly controlled.HCCI combustion, however, utilizes homogeneous air/fuel mixture in the combustion chamber and combustion is initiated by the mixture’s self-ignition from several points simultaneously [5]. HCCI needs no centralized combustion initiation and the entire charge gives a parallel energy release throughout the chamber. The potential advantage of such a combustion and simultaneous autoignition is that leaner air/fuel mixture can be used and the tolerance to exhaust gas recycling, EGR, is significantly extended [6].HCCI engines have been shown to operate well at low-to-medium loads, but obstacles have been encountered at high load conditions, at cold starts, and during transient operating conditions. Controlling ignition at all loads continues to be an issue, including the control of combustion phasing and limiting the Heat Release Rate (HRR) at high loads [4, 7].Artificial Neural Network (ANN) models can be used as an alternative way in engineering analysis and predictions. Recently, they have also been used in optimization of engine operating parameters and emissions [8]. ANN models somewhat mimic the learning process of a human brain. They operate like a “Black Box” model, requiring no detailed information about the system. Instead, they learn the relationship between the input parameters and the controlled and uncontrolled variables by studying the previously recorded data, similar to the way a nonlinear regression performs. Another advantage of ANN is its ability to handle large and complex systems with many interrelated parameters. They simply seem to ignore excess data that are of lower significance and concentrate instead on the more important inputs [9–12].HCCI phasing is difficult to manage since it is done by controlling the temperature, pressure, exhaust gas recirculation, composition of the fuel and air mixture, variable compression ratio, and variable valve timing so that it spontaneously ignites close to the Top Dead Center (TDC) where the maximum engine efficiency is achieved. The efficient state in each phase is achieved by combustion initiating at 5 to 15 degrees crank angle (CAD) after TDC [5]. Many engineering design problems are very complex and therefore difficult to solve by using conventional optimization techniques [13]. As an optimization technique, Genetic Algorithm (GA) is widely used in engineering applications. There have been studies in the literature on using GA for optimization of engine characteristics [13–17].A computer program is developed to calculate the Start of Combustion (SOC) CAD, in-cylinder pressure and temperature profiles, CO2 and H2O concentrations based on a chemical kinetics model (Chemkin3.7-AURORA), developed by Sandia National Laboratory [18]. The necessary samples to train the ANN are computed using our program by changing the input parameters randomly in their realistic ranges of engine operation. These input parameters are inlet pressure, inlet temperature, equivalence ratio, exhaust gas recirculation, compression ratio, ratio of the connecting rod length to the crank arm radius (R), engine speed, and clearance volume. Each run of the program takes about 2 minutes by a Dual Core CPU computer. The program was run 10,000 times to prepare training and test patterns.By using ANN to model the HCCI combustion and predict the desired parameters, the relationship between inlet and favorable exit parameters can be determined after the training process. ANN can give a quick and accurate answer to an input pattern. First, the above input variables are fed to the network and the output parameters are expressed by relevant neural networks. Finally, input conditions are optimized to predict engine SOC which itself depends upon the engine parameters. By using the current model, sensitivity analysis is possible and it can be used to predict the effect of different variables on output parameters, engine performance, and emission trends.


## 2. Simulation Model

A zero-dimensional detailed kinetics model is used to model HCCI combustion. A premixed charge at uniform temperature and pressure is compressed and expanded at a rate that depends on engine speed and geometry. This kind of model cannot capture the multidimensional processes that occur in a real engine cylinder; however, since heat release is a global nonpropagating autoignition process, a zero-dimensional model can reasonably capture the start of combustion and heat release of the core mixture. Since the SOC of the central core dictates the overall process, control of this combustion timing will favorably affect performance.The kinetics computations used to prepare the database were carried out based on the Perfect Stirred Reactor (PSR) assumption. The contents of a PSR are assumed to be approximately uniform spatially due to high diffusion rates or forced turbulent mixing. Thus, the rate of conversion of reactants to products is in fact controlled by chemical reaction rates and not by mixing processes. An essential element of the PSR model is the assumption that the mixture in the reactor has spatially uniform properties which is valid for HCCI modeling. The major advantage of the PSR model lies in the relatively small computational demand. For faster mixing, the flow through the reactor must be characterized by a nominal residence time, which is deduced from the flow rate and the reactor volume. It is assumed that the chemical reaction rate coefficients are independent of reactor conditions. This assumption may not hold when the electron energy distribution function deviates significantly from Maxwellian conditions.


### 2.1. Governing Equations

The absolute form of the elementary reactions is considered:(1)∑k=1Kvki′χk⟺∑k=1Kvki′′χk(i=1,…,I),
where vki′ and vki′′ are stoichiometric coefficients and χk refers to mole fraction of the kth species. In matrix format, (1) is a spare system. The kth species production rate is the sum of all the kth species production rates in the system as in:(2)ωk̇=∑i=1Iυkiqi(k=1,…,I)
in which υki=υki′′-υki′, and qi is advanced rates of the ith reaction as defined by(3)qi=kfi∏k=1K[χk]υki′-kri∏k=1K[χk]υki′′,
where χk is the mole fraction of the kth species, kfi and kri are rate constants of forward and return reactions for the ith reaction, respectively. For constant pressure reactions, kfi is assumed as a function of temperature and is determined by Arrhenius relation:
(4)kfi=AiTβiexp⁡⁡(-EiRcT)
in which Ei is the activation energy for the ith reaction. In thermal systems, kri is related to the forward constant reaction and equilibrium constant:
(5)kri=kfiKci.
Finally, governing equations of the problem include mass, energy and state equations for a homogenous, adiabatic and transient combustion chamber that are solved simultaneously.


### 2.2. Methodology and Assumptions

AURORA computes the evolution time for a homogeneous reacting gas mixture in a closed system. The model accounts for finite-rate elementary gas-phase chemical reactions and performs kinetic sensitivity analysis with respect to the reaction rates. The main assumptions used in the current study for modeling the combustion chamber are as follows.


#### 2.2.1. Single-Zone Combustion Chamber

HCCI combustion is initiated by autoignition of the air/fuel mixture. The gas displacement inside the combustion chamber and the chamber geometry design has little effect on combustion performance [19]. Assuming that the spatial variations of the gas inside the chamber are negligible, the entire chamber can be divided into many small zones or fragments. A single-zone engine combustion chamber model is assumed in the simulations.


#### 2.2.2. Uniform Mixture Composition and Thermodynamic Properties

The gaseous mixture is assumed to be an ideal homogeneous mixture with uniform composition and thermodynamic properties. The mixture consists of air and fuel charge with an equivalence ratio ofφ, and EGR (or added gases) with certain mole percentages, defined by
(6)YEGR=nEGR(nair,fuel+nEGR),nEGR=YEGR*ntotal,nair,fuel=(1-YEGR)*ntotal,
where nEGR and nair,fuel are moles of EGR and total moles of air and fuel charge, respectively.


#### 2.2.3. Adiabatic Compression and Expansion

The engine combustion chamber volume considered in AURORA simulation is time dependent and engine parameter based. In order to simplify the model and center the calculations only on the chemical kinetics, both compression and expansion strokes are considered to be adiabatic processes. Losses such as heat transfer from the hot gases to the chamber walls, heat losses in blow-by, and fuel trapping in crevices are neglected.


### 2.3. Fuel

In order to investigate the extreme conditions of fuel autoignition in HCCI combustion, methane has been selected as the fuel. Methane exhibits certain oxidation characteristics that are different from all other hydrocarbons. This is because the activation energy required to break the C–H bonds in methane is more than other hydrocarbons [16]. It has a very high Octane number, up to 120, and therefore it is difficult to ignite Methane. However, it is a simple fuel and its chemical kinetics is relatively well developed.Gas Research Institute, GRI 3.0 [20] for methane chemical kinetics mechanism is used to elucidate the mechanism of autoignition in natural gas burning engines. This mechanism is made up of 325 reversible elementary reactions among 53 species. The computational time for this mechanism in the developed model is between 1 to 2 minutes with core 2 Duo CPU.


### 2.4. Simulation Software

A Sandia National Laboratory’s chemical kinetics simulation package, AURORA, is employed in this investigation. This software predicts the time-dependent and steady-state properties of a PSR or reactor network. It can be applied to open or closed systems. It uses TWOPNT software to solve the nonlinear ordinary differential equations that describe the temperature and species mass fractions and employs the CHEMKIN 3.7 utility software package, which handles the chemical reaction mechanism and species thermodynamic data.A special model is included in AURORA for simulation of combustion cylinders as in IC engines. Bowman et al. [20] provides equations that describe the volume (to the first order) as a function of time, based on engine parameters, including compression ratio, crank radius, connecting rod length, speed of revolution of the crank arm, and the clearance volume. As shown in Figure 1, the connecting rod length is designated by LC, while the crank arm radius is denoted by LA. The volume swept by the piston is represented by the dashed rectangle above the piston. The clearance volume Vc is represented by the open areas above and below the swept volume. Clearance volume is used to scale the engine volume.Figure 1
Parameters used in the IC engine model to determine the cylinder volume as a function of time.For a Caterpillar engine with specification given in Table1, the clearance volume is 160.04 cm3. The ratio of connecting rod length to crank radius (R) used is 3.169 [5].Table 1
A Caterpillar engine specification.
Caterpillar engineValueDisplacement (liter)2.44Bore (mm)137.19Stroke (mm)165.11Connecting rod length (mm)261.62Compression ratio16.25The maximum swept volume is given by:(7)Vs,max⁡=π2D2LA,
where D is the cylinder bore diameter as shown in Figure 1. The engine compression ratio C is defined as the ratio of the maximum total volume to the clearance volume,(8)C=Vs,max⁡+VCVC.
In some cases it is only necessary to define the compression ratio and not the clearance volume, since the latter is only used to scale the calculated volume. If the user is interested in performing postanalyses for engine efficiency or in the case of the IC Engine heat transfer coefficient correlation being used, the clearance volume should be specified with a physical value. By default, AURORA assumes a value of 1.0. The other parameter required by AURORA for the IC engine model is R, the ratio of the connecting rod length LC to the crank arm radius LA:
(9)R=LCLA.
Finally, the user must specify the rotation rate of the crank arm, where
(10)Ω≅dθdt.
The total volume available for combustion in the cylinder as a function of time, scaled by the clearance volume is calculated by [20]:
(11)VtVC=1+C-12(R+1-cos⁡⁡θ+(R2-sin⁡2θ)1/2)
while the time derivative of the volume is
(12)d(V/VC)dt=Ω(C-12)sin⁡θ[1+cos⁡θR2-sin⁡2θ].
Equations (7) through (12) provide the volume and volume derivative as functions of time which AURORA uses to solve the equations for species and energy conservation.


## 2.1. Governing Equations

The absolute form of the elementary reactions is considered:(1)∑k=1Kvki′χk⟺∑k=1Kvki′′χk(i=1,…,I),
where vki′ and vki′′ are stoichiometric coefficients and χk refers to mole fraction of the kth species. In matrix format, (1) is a spare system. The kth species production rate is the sum of all the kth species production rates in the system as in:(2)ωk̇=∑i=1Iυkiqi(k=1,…,I)
in which υki=υki′′-υki′, and qi is advanced rates of the ith reaction as defined by(3)qi=kfi∏k=1K[χk]υki′-kri∏k=1K[χk]υki′′,
where χk is the mole fraction of the kth species, kfi and kri are rate constants of forward and return reactions for the ith reaction, respectively. For constant pressure reactions, kfi is assumed as a function of temperature and is determined by Arrhenius relation:
(4)kfi=AiTβiexp⁡⁡(-EiRcT)
in which Ei is the activation energy for the ith reaction. In thermal systems, kri is related to the forward constant reaction and equilibrium constant:
(5)kri=kfiKci.
Finally, governing equations of the problem include mass, energy and state equations for a homogenous, adiabatic and transient combustion chamber that are solved simultaneously.


## 2.2. Methodology and Assumptions

AURORA computes the evolution time for a homogeneous reacting gas mixture in a closed system. The model accounts for finite-rate elementary gas-phase chemical reactions and performs kinetic sensitivity analysis with respect to the reaction rates. The main assumptions used in the current study for modeling the combustion chamber are as follows.


### 2.2.1. Single-Zone Combustion Chamber

HCCI combustion is initiated by autoignition of the air/fuel mixture. The gas displacement inside the combustion chamber and the chamber geometry design has little effect on combustion performance [19]. Assuming that the spatial variations of the gas inside the chamber are negligible, the entire chamber can be divided into many small zones or fragments. A single-zone engine combustion chamber model is assumed in the simulations.


### 2.2.2. Uniform Mixture Composition and Thermodynamic Properties

The gaseous mixture is assumed to be an ideal homogeneous mixture with uniform composition and thermodynamic properties. The mixture consists of air and fuel charge with an equivalence ratio ofφ, and EGR (or added gases) with certain mole percentages, defined by
(6)YEGR=nEGR(nair,fuel+nEGR),nEGR=YEGR*ntotal,nair,fuel=(1-YEGR)*ntotal,
where nEGR and nair,fuel are moles of EGR and total moles of air and fuel charge, respectively.


### 2.2.3. Adiabatic Compression and Expansion

The engine combustion chamber volume considered in AURORA simulation is time dependent and engine parameter based. In order to simplify the model and center the calculations only on the chemical kinetics, both compression and expansion strokes are considered to be adiabatic processes. Losses such as heat transfer from the hot gases to the chamber walls, heat losses in blow-by, and fuel trapping in crevices are neglected.


## 2.2.1. Single-Zone Combustion Chamber

HCCI combustion is initiated by autoignition of the air/fuel mixture. The gas displacement inside the combustion chamber and the chamber geometry design has little effect on combustion performance [19]. Assuming that the spatial variations of the gas inside the chamber are negligible, the entire chamber can be divided into many small zones or fragments. A single-zone engine combustion chamber model is assumed in the simulations.


## 2.2.2. Uniform Mixture Composition and Thermodynamic Properties

The gaseous mixture is assumed to be an ideal homogeneous mixture with uniform composition and thermodynamic properties. The mixture consists of air and fuel charge with an equivalence ratio ofφ, and EGR (or added gases) with certain mole percentages, defined by
(6)YEGR=nEGR(nair,fuel+nEGR),nEGR=YEGR*ntotal,nair,fuel=(1-YEGR)*ntotal,
where nEGR and nair,fuel are moles of EGR and total moles of air and fuel charge, respectively.


## 2.2.3. Adiabatic Compression and Expansion

The engine combustion chamber volume considered in AURORA simulation is time dependent and engine parameter based. In order to simplify the model and center the calculations only on the chemical kinetics, both compression and expansion strokes are considered to be adiabatic processes. Losses such as heat transfer from the hot gases to the chamber walls, heat losses in blow-by, and fuel trapping in crevices are neglected.


## 2.3. Fuel

In order to investigate the extreme conditions of fuel autoignition in HCCI combustion, methane has been selected as the fuel. Methane exhibits certain oxidation characteristics that are different from all other hydrocarbons. This is because the activation energy required to break the C–H bonds in methane is more than other hydrocarbons [16]. It has a very high Octane number, up to 120, and therefore it is difficult to ignite Methane. However, it is a simple fuel and its chemical kinetics is relatively well developed.Gas Research Institute, GRI 3.0 [20] for methane chemical kinetics mechanism is used to elucidate the mechanism of autoignition in natural gas burning engines. This mechanism is made up of 325 reversible elementary reactions among 53 species. The computational time for this mechanism in the developed model is between 1 to 2 minutes with core 2 Duo CPU.


## 2.4. Simulation Software

A Sandia National Laboratory’s chemical kinetics simulation package, AURORA, is employed in this investigation. This software predicts the time-dependent and steady-state properties of a PSR or reactor network. It can be applied to open or closed systems. It uses TWOPNT software to solve the nonlinear ordinary differential equations that describe the temperature and species mass fractions and employs the CHEMKIN 3.7 utility software package, which handles the chemical reaction mechanism and species thermodynamic data.A special model is included in AURORA for simulation of combustion cylinders as in IC engines. Bowman et al. [20] provides equations that describe the volume (to the first order) as a function of time, based on engine parameters, including compression ratio, crank radius, connecting rod length, speed of revolution of the crank arm, and the clearance volume. As shown in Figure 1, the connecting rod length is designated by LC, while the crank arm radius is denoted by LA. The volume swept by the piston is represented by the dashed rectangle above the piston. The clearance volume Vc is represented by the open areas above and below the swept volume. Clearance volume is used to scale the engine volume.Figure 1
Parameters used in the IC engine model to determine the cylinder volume as a function of time.For a Caterpillar engine with specification given in Table1, the clearance volume is 160.04 cm3. The ratio of connecting rod length to crank radius (R) used is 3.169 [5].Table 1
A Caterpillar engine specification.
Caterpillar engineValueDisplacement (liter)2.44Bore (mm)137.19Stroke (mm)165.11Connecting rod length (mm)261.62Compression ratio16.25The maximum swept volume is given by:(7)Vs,max⁡=π2D2LA,
where D is the cylinder bore diameter as shown in Figure 1. The engine compression ratio C is defined as the ratio of the maximum total volume to the clearance volume,(8)C=Vs,max⁡+VCVC.
In some cases it is only necessary to define the compression ratio and not the clearance volume, since the latter is only used to scale the calculated volume. If the user is interested in performing postanalyses for engine efficiency or in the case of the IC Engine heat transfer coefficient correlation being used, the clearance volume should be specified with a physical value. By default, AURORA assumes a value of 1.0. The other parameter required by AURORA for the IC engine model is R, the ratio of the connecting rod length LC to the crank arm radius LA:
(9)R=LCLA.
Finally, the user must specify the rotation rate of the crank arm, where
(10)Ω≅dθdt.
The total volume available for combustion in the cylinder as a function of time, scaled by the clearance volume is calculated by [20]:
(11)VtVC=1+C-12(R+1-cos⁡⁡θ+(R2-sin⁡2θ)1/2)
while the time derivative of the volume is
(12)d(V/VC)dt=Ω(C-12)sin⁡θ[1+cos⁡θR2-sin⁡2θ].
Equations (7) through (12) provide the volume and volume derivative as functions of time which AURORA uses to solve the equations for species and energy conservation.


## 3. Start of Combustion

A typical cylinder pressure trace is shown in Figure2. The first and second stage pressure rises PR1, PR2, the location of the start of the first and second stages, X1, X2 and the point where combustion initiates are marked. In this work, SOC is defined to be at the point where the main heat release occurs, X2. The ignition delay is defined usually for a homogeneous system at either fixed volume or pressure with initial temperature and composition. Second ignition delay time is the time it takes for the main combustion to occur after the first stage ignition, X2-X1. For fuels that exhibited single-stage ignition, second ignition delay is not defined.Figure 2
A typical pressure trace showing two-stage combustion.HCCI engine has no direct initiation of combustion. Thus, it was crucial to determine where SOC is located, in terms of the crank angle. In this research, SOC was taken to be at the start of the main combustion. Start of combustion is defined conventionally as the point where 50% of heat release (accumulated) occurs releasing heat release information from the chemical kinetics model is not available. Alternatively it is crucial to estimate heat release rate based on pressure history [19]. For two-stage ignition fuels the exact location is defined by the intersection of a tangent line to the first stage pressure rise with a horizontal line passing through the maximum pressure point. For single-stage ignition fuels like methane, the turning point of pressure-crank angle plot is assumed to be equivalent to the first stage pressure rise in two-stage ignition fuels. Based on the assumption the methodology of predicting the SOC timing for single-stage fuels is shown in Figure 3.Figure 3
Methodology for finding the main heat release for Methane as a single-stage ignition fuel.


## 4. Neural Network Modeling

Applications of ANN to model combustion chemistry have been reported in many previous works [21–24]. The accuracy of the ANN estimation can be improved by choosing the proper number of hidden neurons and the activation (transfer) function. In ANN modeling, typically the activation function is chosen by the designer and then the weighting factors and biases are adjusted by some learning rule so that the neuron input/output relationship meets some specific goal. There are a variety of activation functions. The logarithmic and hyperbolic tangent sigmoid are the most commonly used functions in multilayer networks that are trained by using back propagation algorithm [22].In order to obtain the ANN models investigated in this study, two sets of training and test patterns were generated for the values of input parameters, using the developed program. This program can calculate the desired parameters based on a chemical kinetics model relative to inlet conditions. The input variables were inlet pressure, inlet temperature, equivalence ratio, exhaust gas recirculation, compression ratio, ratio of the connecting rod length to the crank-arm radius (R), engine speed, and clearance volume, as listed in Table 2. Thus, the ANN model has 8 neurons in the input layer. The ranges in Table 2 are realistic values in the engine operation. They specify the quality of the training data, which is essential for ANN modeling. An ANN model trained in a small range of the input data may not give accurate results for the inputs outside the range. On the other hand, an ANN model trained over a vast range may lose the concentration on realistic conditions and therefore the accuracy of the ANN model may also be degraded [25].Table 2
Inlet parameters ranges.
Input ParametersValuePressure (bar)0.95–1.05Temperature (k)298–700Equivalence ratio0.2–1EGR (%mass)0.0–0.6Compression ratio14–24R2.5–4Speed (rpm)1000–3500Clearance Volume (cm3)100–200The neural network has two main roles, classification and acting as a mapping function. Five networks with different missions were applied here. The first network, namely, Combustion Happening Neural Network (CHNN), recognizes the probability of the combustion initiation. TDC pressure depends on BDC pressure by isentropic relations. If the calculated TDC pressure exceeds the value of isentropic TDC pressure multiplied by a coefficient like 1.05, combustion may occur. For training CHNN 10,000 patterns are produced by the developed program. Two-thirds of the data were used as the training set, and the rest were used as the test set. In classification neural networks, such as the Radial Base Function (RBF) network, all data must be reported to the network for training which needs a lot of memory when input parameters are inordinate. Input parameters for this process are inordinate and available computer memory is scarce. Feed Forward Back propagation networks are used commonly as mapping functions; nevertheless, it was applied for classification, based on an innovative trick by using a linear filter attached to each output neurons. Typical structure of the networks is shown in Figure4. All networks have the same structure which is Feed Forward Back propagation networks with 8 input nodes, hidden layer(s), and one output node. The differences include the number of hidden layers, the nodes in each hidden layer, the learning process, activation functions, and learning rates.Figure 4
Typical structure of the applied neural networks.The trained CHNN’s mean errors in training and test patterns are less than or equal to 0.2% and 0.7%, respectively. Then, two approaches are tracked depending on the probability of combustion occurrence as shown in Figure5. If combustion does not occur, the approach described in the next section will be pursued in which inlet engine parameters such as temperature, equivalence ratio, and compression ratio are optimized by GA to have optimum HCCI combustion.Figure 5
First approach of modeling (when combustion occurs for a set of inlet conditions).Here, it is assumed that combustion occurs for the specified inlet conditions. The Start of Combustion Neural Network (SCNN) predicts SOC timing with good accuracy (Figure6).Figure 6
SOC versus equivalence ratio (all other thermodynamic conditions and engine geometry are the same).The difference between results of Choi and Chen [5] and the present study as shown in Figures 6 and 7 is due to the different ways in defining SOC [5]. In the Well-Mixed Reactor (WMR) code, used in reference [5], low-temperature chemistry reactions are neglected in predicting the temperature and pressure during motoring [26]. Also there is no low-temperature combustion under our current methane-air HCCI. Neglecting low-temperature chemistry reactions in calculations result in delay of methane combustion. Effects of low-temperature chemistry reactions are higher at high equivalence ratios. Existence of more reactions at high equivalence ratio values causes this demeanor. Effects of low-temperature chemistry reactions in HCCI combustion are higher at lower inlet temperatures. Furthermore, greater inlet temperatures can also accelerate the occurrence of low-temperature chemistry reactions [27].Figure 7
SOC versus temperature (all other thermodynamic conditions and engine geometry are the same).In the remaining four neural networks, the models predict the in-cylinder pressure (PNN) and temperature (TNN) profiles, and the concentration of exhaust CO2 (CNN), and H2O (HNN). In Table 3 errors of each network in training and testing patterns are presented. As can be seen in this table, errors related to the testing patterns are greater than those corresponding to the training patterns. All networks in the training process encounter a training pattern at least once, and it is obvious that they can predict better results when the training patterns are fed to them. In general, all networks predict the desired parameters at an acceptable level of accuracy.Table 3
Neural Networks’ errors in training and testing patterns.
Neural networksTraining errorTest errorCHNN0.31%0.67%SCNN0.28%0.76%PNN0.42%3.1%TNN0.27%1.65%CNN1.06%8.6%HNN0.86%5.6%As an example, in Figures8 and 9, the outputs of TNN corresponding to training and test data are compared to the target. The outputs are in the range of 150–210 CAD with 0.1 degree step variations. Training and test patterns consisted of 3 and 1.5 million points, respectively.Figure 8
Comparison between TNN output and target in-cylinder temperature (training data).Figure 9
Comparison between TNN output and target in-cylinder temperature (test data).HCCI engines are highly sensitive to the inlet temperature, as this parameter plays an important role in determining the range in which combustion occurs. Increasing inlet temperature increases the occurrence of low-temperature chemical reactions which results in gradual energy release. Therefore, increasing the temperature reduces the rate of pressure build-up and maximum in-cylinder pressure (Figure10). To plot the figures, sets of inlet conditions which have been approved by SCNN were chosen to ensure combustion occurs.Figure 10
Effect of temperature variations on in-cylinder pressure.Increasing the inlet temperature increases the in-cylinder maximum temperature (Figure11). In addition, the CO2 and H2O production reactions initiate earlier due to the presence of low-temperature chemical reactions. The related graphs can be drawn by the presented model.Figure 11
Effect of temperature variations on in-cylinder temperature.Equivalence ratio has the same effect on in-cylinder pressure as inlet temperature. Increasing this parameter leads to have a mixture with higher heat capacity and input energy and consequently maximum in-cylinder temperature (Figure12). However, low-temperature chemical reactions retard SOC timing.Figure 12
Effect of equivalence ratio variations on in-cylinder temperature.In addition, increasing the equivalence ratio from 0.2 to 0.5 leads to have better combustion closer to complete combustion. Therefore the maximum quantity of the in-cylinder CO2 and H2O concentrations decreases. In Figure 13 this effect can be seen for CO2 concentration and it is similar for H2O.Figure 13
Effect of equivalence ratio variations on in-cylinder CO2 concentration.


## 5. Genetic Algorithm (GA) for Engine Optimization

As HCCI engines are sensitive to inlet parameters, combustion in these engines does not occur easily in all condition. Inlet parameters must be adjusted for combustion to initiate and consequently control it to occur in an optimum SOC timing. Controlling the combustion location is the second phase of modeling (Figure14).Figure 14
Second phase in modeling: optimization of inlet conditions to ensure combustion in the desired SOC timing.In previous studies [5, 28], results of parametric investigations are presented from which the optimum engine operation point can be obtained through inspection. It can be easily understood that a parametric analysis of a large number of parameters to find the optimum conditions, even with a systematic approach takes a lot of time for a full investigation of the design space. However, the problem can be set up in the form of an optimization analysis. Then, the search space can be defined in terms of the input parameters under investigation and an optimization function can be utilized which is subject to one or more constraints. In this case, the constraints consist of the timing of the SOC inequality where SOC crank angle should be between 5 and 15 degrees after TDC. The function to be optimized is the SOC, subject to the inequality constraints. In addition, engine parameters must be maintained within a range of values. The other engine parameters such as the engine geometry are kept fixed. Once the optimization problem is defined which in this case consists of a suitable Neural Network, the solution of the problem can be undertaken. A general optimization routine is required, since the constraint form is program dependent and is not easily calculated. Therefore, a gradient type method may not converge to a global solution.Application of GA is quite similar to other optimization problem formulations. The choice of using a GA approach to the problem is due to the special characteristics of GAs. Most optimization techniques deal with the solution in a deterministic manner. Brute force type approaches may result in solution becoming quickly trapped in the local minima while techniques exist for testing whether the solution is a local or global minimum. An interesting alternative uses a stochastic approach in which a population of solutions is examined. Among the solutions, the more promising ones are recombined to determine the next generation of input parameters, and surprisingly, often this leads to even better solutions. Normally over a period of many generations, a global optimal or near optimal set of input values can be determined. There is no guarantee that a GA will give an optimal solution or arrangement. It is only certain that the solution will be nearly optimal in the light of the specific fitness function used in the evaluation of the many possible solutions generated. It is implied that a more optimal solution may exist.The stochastic approach is nondeterministic by nature and therefore a global optimum cannot be guaranteed. Some hybrid techniques exist to combine the “hill-climbing” deterministic approaches with stochastic GA approaches to determine the best solution to the level of accuracy required. The GA method determines the best region of space to investigate. This refinement is not needed in this study though.The GA approach can be described simply in the following pseudocode algorithm.Step 1.
Initialize population with a random set of input parameters within the range limits per parameter (see Table3).Step 2.
Predict SOC probability by CHNN and in case true, SCNN computes SOC crank angle for each set of parameters in the population.Step 3.
Calculate the fitness level of each population member according to the SOC crank angle.Step 4.
For those values for which CHNN is not true or SOC crank angle exceeds the required value, set fitness to zero.Step 5.
From the remaining population, select members according to the probabilistic selection for crossover.Step 6.
Generate new members for the next generation of population.Step 7.
Return to Step2, continue for a given number of generations until another stopping criteria is reached.The problem with this algorithm is that no member of the population is guaranteed to satisfy the SOC condition. Hence, penalty methods are often used to accommodate the condition rather than strictly excluding those population members that do not satisfy the condition. In other words, a penalty is added or factored in the fitness function and the member is used in the selection process of the next generation. However, the fitness is notably affected. This is required in this study, as the condition is satisfied with a known set of parameter ranges. It should again be noted; the definition of optimization is that SOC occurs between 5 and 15 CAD after TDC [5]. To achieve this, the optimum amount of the parameter or parameters considered is calculated by GA in the appropriate engine operating conditions.To prepare GA, 25 generations with 20 chromosomes each are applied. Each new generation is born with linked surgery by 14 chromosome combinations and 2 genetic mutations relative to previous generations. The SOC crank angle can be optimized. One or more of the geometric and/or thermodynamic parameters can be chosen as a free variable for optimization. Selection of the parameters depends on engine design characteristics and the ability to change the actual variables in real cases. Some thermodynamic changes are possible in engines such as temperature and equivalence ratio variations. In other instances, geometric parameters such as the compression ratio are changeable. With the occurrence possibility of different cases, two main cases are considered for optimization in this study.Case 1 (Simultaneous Optimization of Inlet Temperature and Equivalence Ratio).
The GA results are shown in Figure15. As it can be seen in this figure, after the 15th generation, a plateau of the SOC crank angle is achieved while the amount of inlet temperature is between 440 and 460 K and equivalence ratio is between 0.4 and 0.6. The optimum parameter values achieved for an engine with an SOC crank angle of 6 degrees are at temperature of 450 K and equivalence ratio of 0.5. Sensitivity of HCCI engines to temperature is higher compared to equivalence ratio [29].Figure 15
Optimization process (SOC timing versus Generation, calculated by changing the inlet temperature and equivalence ratio).When GA does simultaneous optimization, temperature changes are greater than the changes in equivalence ratio which can be observed in Figure16.Figure 16
SOC versus inlet temperature and equivalence ratio calculated by GA.Case 2 (Optimizing Compression Ratio).
The optimization process is very similar to the previous case. The variable to be optimized is the compression ratio. The results are shown in Figure17. After the 10th generation, a plateau of SOC crank angle is achieved while the compression pressure value is between 18 and 20.Figure 17
SOC versus compression ratio calculated by GA.


## 6. Conclusion

The main purpose of this study is to provide a rapid, optimum, and accurate model for simulating combustion in Homogeneous Charged Compression Ignition engines. This objective is achieved by constructing and training Artificial Neural Networks and applying Genetic Algorithm. To simulate the chemical kinetics and prepare a database for training ANNs, a computer program has been developed using FORTRAN in which the Perfectly Stirred Reactor is used. Methane was used as the fuel and GRI 3.0 is used for describing its combustion kinetics. In this program, the Chemkin 3.7 and AURORA package is called 10,000 times as a solver.By using the available information in the database, all the desired ANNs are prepared. They can predict the probability of combustion initiation and calculate the SOC timing, in-cylinder pressure, temperature, plus CO2 and H2O concentrations. The input parameters are inlet pressure, inlet temperature, equivalence ratio, exhaust gas recirculation, compression ratio, ratio of the connecting rod length to the crank-arm radius, engine speed, and clearance volume.The validity of the program presented was verified by [5]. As low-temperature chemical reactions are considered in the developed program, the present model is more accurate than other similar studies in predicting the Start of Combustion (SOC). The model can predict the combustion probability and the SOC timing in less than 0.01 second with favorably high accuracy.To obtain the best performance and the highest efficiency of HCCI, Genetic Algorithm is used to optimize the inlet parameters. Therefore, in various operating conditions, the engine can achieve the best possible performance and efficiency using the optimized parameters. In practice, more attention is given to the inlet temperature, equivalence ratio, and compression ratio. In the first optimization case, inlet temperature and equivalence ratio are optimized simultaneously. In the second optimization case, the compression ratio is optimized.The presented model is capable of positing on the electrical boards in real engine control applications. The proposed approach can be pursued for leaner mixtures and multizone models with various fuels like normal-heptane and isooctane.



---

*Source: 854393-2012-05-15.xml*