In the Autumn release of the VeSyMA-Engines library, there are some new features included with regards to the air path (intake and exhaust) , the combustion modelling and the mean value engine model.
- An engine model is created with combined Mean Value Engine Model (MVEM) for air path (intake and exhaust plenum) and Crank Angle Resolved Combustion Model (CARCM).
- A non fluids based MVEM can be created automatically from a Crank Angle Resolved Engine Model (CAREM) engine model by using a function for calibration.
- A linearized model can be created automatically for each steady state condition and the model can be used for model-based controller design such as idle speed control, AFR control, etc.
- A function is created for calibrating a non fluids based mean value model and linearized model based on a fluid-based CAREM and generating the calibrated tables automatically.
This blog post introduces the four new features and compares the performance between a full CAREM model, a MVEM air path with CARCM, a full MVEM engine model and a linearized engine model. The mean value engine model has been described in the previous blog post .
x-axes quantities are time in seconds unless otherwise stated.
- New features in Engine library
1.1 MVEM for air path with CARCM combustion model
This model consists of a table with calibrated parameters, a MVEM for air path, and a CARCM combustion model. The model can be illustrated by the following figure:
Calibrated tables take control signals and output the following quantities:
- γ0: calibrated parameter for volumetric efficiency
- λCD: calibrated parameter for discharge coefficient of throttle body
- Τm: calibrated intake manifold temperature
- pout: exhaust manifold pressure
- Tout: exhaust manifold temperature
Mean value model outputs pm, which is plenum pressure. The model can be run on separate cores; model in blue dashed box on one core and in red dashed box on another.
1.2 Full MVEM converted from full CAREM
The schematic of a full MVEM engine model is shown below:
In addition to γ0, λCD, Τm and pout, there is another calibrated parameter η0 for BMEP calculation in MVEM. The outputs of MVEM are:
- pm: plenum pressure
- ṁac: aspirated mass flow rate into cylinder
- Τm: calibrated intake manifold temperature
- Engine speed (in the speed dynamometer test, the input of calibrated tables is the dynamometer speed demand; in the inertia test the engine speed input to the calibrated tables will be the engine speed output calculated by MVEM).
1.3 Linearized model with speed and plenum pressure for control design
Linearizing the mean value model at steady state will yield a second order linear system .
The entries for matrix A̅ and B are generated automatically by using a function for each steady state condition. The model can be used for speed control design, AFR control design or other model based controller design.
1.4 Function for generating calibration parameters
A function for calibrating full CAREM to a MVEM engine model for different operating steady state condition is given in the figure below:
The function automatically puts calibration parameters into look up tables with data records as shown in the figure below:
2. Performance comparison between a full CAREM, a MVEM air path with CARCM combustion model, a full MVEM and a linearized engine model
2.1 Speed test
The following figure shows BMEP from a full CAREM, a MVEM air path with CARCM and a full MVEM, at throttle opening angle of 9 degrees, 25 CA spark advance, zero phase shift for intake and exhaust valves, stoichiometric AFR and varying dynamometer speed between 1000 rpm to 2000 rpm.
It is shown in Figure 5 that the BMEP produced between full CAREM, MVEM air path with CAREM combustion model and full MVEM, during the speed transients are very close.
2.2 Inertia test
An inertia dynamometer test was used to generate results for a full CAREM, a MVEM air path with CAREM combustion model and a full MVEM:
It is seen the BMEP and engine speed produced by the three engine models are similar.
2.3 Speed test for linearized model
The linearized model is computed automatically for each steady state condition. Figure 7 shows a dynamometer speed test at 1200 rpm, with 9 degrees throttle opening, zero shift for intake and exhaust valve, stochiometric AFR and 25 CA spark advance. It is shown that the linearized model in (3) produces the same engine speed and plenum pressure compared to the full CAREM engine model at the given steady state operation point. Values of entries for the linear matrix in (3) are k1=404732, k2=0.0142, k30.0027, k4=97.03 and ω0=125.6 rad/s, u0=0.15707 rad, i.e. 9 degrees.
It can be useful to have a full CAREM, a MVEM air path with CAREM combustion model, a full MVEM converted automatically from a given CAREM engine model and an automatically generated linearized engine model. The four types of models all have their own merit. The benefits and drawbacks of each can be summarized below:
1. Full CAREM engine model: computes 1D fluid dynamics for intake and exhaust manifold, fully physical. The drawback is that the model is highly interconnected and if split into several FMUs or cores, each part would require several feedback signals for calculating fluid dynamics between the air path (intake and exhaust manifold on one core) and the combustion (run on another core). In applications where the intake and exhaust manifold are desired to be separate from combustion model, so that they can be run on different cores in HiL rig, these highly interconnected feedback loops slow the model down considerably and minimal time delays cause the models to become inaccurate and real time performance can’t be achieved. The cause of this inaccuracy, slow-down or even instability of the model can be due to the sampling delay existing between the different cores. Higher sampling rates will improve the accuracy but will slow down the simulation speed, whereas a lower sampling rate will lose accuracy but the model could run faster.
2. MVEM air path with CAREM combustion model: calibrated MVEM air path calculates the plenum pressure and mass aspirated flow rate into cylinder. The MVEM intake model is coupled with CAREM combustion model. The model is not fully physical as intake model quantities are partially calibrated rather than physically calculated. The advantage of the model is however that no feedback loop exists between intake, exhaust and combustion, therefore the models can be run on different cores in HiL to achieve real time performance, with cylinder pressure, temperature and other thermodynamic quantities produced in high accuracy.
3. Full MVEM: the model calculates plenum pressure, intake air flow rate, BMEP and engine speed for steady state and transient operations. The model can be used for some controller tuning and driveability studies without computing crank angle resolved cylinder pressures and torques.
4. Linearized engine model: the model can be used for controller design such as speed control, AFR control. See  for an idle controller design based on this model.
Interested users can refer to  for more discussion on MVEM air path coupling to CAREM combustion model for real time applications.
 Splitting a crank angle resolved internal combustion engine model with a mean value intake model for real-time performance, X.Han, A.Picarelli, M.Dempsey and R.Gillot, American Modelica conference 2018, Boston, accepted.
Written by: Xiaoran Han – Project Engineer
Please get in touch if you have any questions or have got a topic in mind that you would like us to write about. You can submit your questions / topics via: Tech Blog Questions / Topic Suggestion.