Engmodel Documentation

A program to automatically generate engine files for ADVISOR from test data.

Tutorial with Sample Files
See plotting and processing of sample files to help you get your engine data in the correct format.

Processing Engine Test Data
Engmodel takes columns of engine test data (unevenly spaced) and generates square matrices for the fuel use and emissions.  The maximum torque envelope is taken from the maximum observed torque at each given test speed.

To convert test data into an ADVISOR file, Engmodel follows three steps:

  1. Read in text file: Converts text file with headers into a Matlab mat file
  2. Set Parameters/Process: Allows the user to specify output limits/increments and processes the data
  3. Create ADVISOR File: Takes data from the workspace and writes out an m file for use in ADVISOR

'Load' loads a mat file containing the test data in column form.

Read in text file
Engine data should be put in a text file in column form with the first line containing headers.  The headers should have no spaces.  Ultimately, the variable names should be the following:
 

Variable
Required Name
Units
Engine Speed
fc_spd
rpm
Engine Torque
fc_trq
Nm
Engine Fuel Use
fc_fuel
g/s
HC emissions
fc_hc
g/s
CO emissions
fc_co
g/s
NOx emissions
fc_nox
g/s
PM emissions
fc_pm
g/s

The headers may be set as the required name either in the text file, or via the 'Read in text file' gui.

Toubleshooting


To convert the text file to a mat file, the user should follow the following steps:

  1. Select file to convert (pushbutton allows gui selection)
  2. Set header/variable names to required names (see table above)
  3. Select mat file to save to (pushbutton allows user to specify filename)
Set Parameters/Process
To process the test data, the user follows these steps:
  1. Specify mat file with test data
  2. Choose algorithm to extrapolate map points which are outside the envelope of tested data
  3. Specify the minimum, maximum, and increments for speed and torque of the desired square matrix.
  4. Specify the lower heating value of the fuel
  5. Choose to plot results
  6. Process

Algorithm for extrapolation
When test data exists surrounding a region of the speed-torque map space, the Matlab function griddata is used for interpolation (linear).  This ensures that the surface will pass through available data points.  When an evenly spaced grid point lies outside the envelope of test data, extrapolation is required.  The user can specify one of two algorithms to perform this: polynomial fit and nearest neighbor.
Polynomial Fit  A least squares fit is obtained over the data for the following equation:

where y is the output (e.g. fuel use, hc emissions), w is speed and T is torque.  Printed to the workspace is the point with maximum error, as well as an average error.
Nearest Neighbor This approach lets the data take on the tested value at it's nearest neighbor.

The maximum torque curve is taken from the maximum tested torque levels at a given speed.  The average error for each map is recorded.

Plotting the results will pull up 3-7 graphs (up to seven if data for all four emissions is present):

  1. Maps (g/s):  The contours plotted are the generated map points.  The test points are plotted with their values for comparison.
  2. Fuel use (g/kWh)
  3. Efficiency Map:  The contours plotted are the generated map points.  Again, the test points are plotted with their values for comparison.
Create ADVISOR File
Finally, the user specifies additional information used to create the ADVISOR file.
  1. Specify name of file to create (format FC_SIxx.m or FC_CIxx.m where xx is maximum power in kW)
  2. Fill in the top information (required)
  3. Choose to use default mass and thermal characteristics, or edit them as desired.
  4. Select Make ADVISOR file
For a description of the fuel converter variable names see ADVISOR documentation.

Last revised: 1/24/01, vhj