Upload
vuthien
View
221
Download
0
Embed Size (px)
Citation preview
ETAS ASCMO MOCA V5.1User's Guide
Copyright
The data in this document may not be altered or amended without special notification fromETAS GmbH. ETAS GmbH undertakes no further obligation in relation to this document. Thesoftware described in it can only be used if the customer is in possession of a general licenseagreement or single license. Using and copying is only allowed in concurrence with the spe-cifications stipulated in the contract.
Under no circumstances may any part of this document be copied, reproduced, transmitted,stored in a retrieval system or translated into another language without the express writtenpermission of ETAS GmbH.
© Copyright 2018 ETAS GmbH, Stuttgart
The names and designations used in this document are trademarks or brands belonging tothe respective owners.
MATLAB and Simulink are registered trademarks of The MathWorks, Inc.
Document AM012301 V5.1 R01 EN - 06.2018
2
Table of Content
1 ETAS ASCMO MOCA - Introduction 6
1.1 Safety Advice 6
1.1.1 Labeling of Safety Instructions 6
1.1.2 Demands on Technical State of the Product 7
1.2 Target Group 7
1.3 About this Document 7
1.3.1 Document Content 7
1.3.2 Conventions 8
1.4 Additional Source of Information 9
2 Installation 10
2.1 Preparation 10
2.1.1 System Requirements 10
2.1.2 Additional Software Requirements 10
2.1.3 User Privileges 11
2.2 Program Installation 11
2.2.1 Start Menu 14
2.2.2 Files and Directories 15
2.3 Licensing the Software 15
2.4 Uninstallation 16
3 Concepts of ETAS ASCMO MOCA 17
3.1 Fields of Application 17
3.1.1 Fields of Application of ETAS ASCMO MOCA 18
Table of Content ETAS
User's Guide 3
3.1.2 Fields of Application of ETAS ASCMO MOCA Runtime 18
3.2 The Main Elements of the User Interface 20
3.2.1 The Main Menu of ETAS ASCMO MOCA V5.1 20
3.2.2 Toolbar 20
3.2.3 Navigation Pane of ETAS ASCMO MOCA 21
3.2.4 Log Window 23
3.3 Data 23
3.3.1 Assessment of the Input Data 23
3.3.2 The Variables RMSE and R2 29
3.3.3 Function Evaluation Using RMSE and R2 30
3.4 Models 31
3.5 Functions 31
3.5.1 Mathematical Operators for Function Nodes 32
3.6 Parameters 33
3.6.1 Example 34
3.6.2 Available Types of Parameters 34
3.6.3 System Constants 38
3.7 Optimization 38
3.7.1 Description of the Optimization Method 38
3.7.2 Consideration of the Roughness 39
3.7.3 Optimization Criterion 39
3.7.4 Optimization Without Sequence 40
3.7.5 Optimization With a Sequence 41
4 Tutorial: Working with ETAS ASCMO MOCA 42
4.1 About this Tutorial 42
4.1.1 Challenge in this Tutorial 42
4.1.2 Structure of the Tutorial 42
4.1.3 Requirements on Measurement Data 43
4.1.4 The Data for Modeling 43
4.2 Start ETAS ASCMO MOCA 44
4.3 Step 1: Data Import 45
4.3.1 Checking the Plausibility of the Measurement Data 47
4.3.2 Saving and Loading a Configuration 51
4.3.3 Importing Measurement Data 51
4.3.4 Mapping Measurement Channels to Variables 52
4.3.5 Working in the Data Pane of ETAS ASCMO MOCA 53
4.4 Step 2: Data Analysis 60
4.5 Step 3: Models 64
4.5.1 Adding A Simulink Model and Scripts 65
ETAS Table of Content
4 User's Guide
4.5.2 Parameter Mapping 66
4.5.3 Mapping Simulink Inputs 69
4.5.4 Mapping Simulink Outputs 71
4.5.5 Validating and Using the Simulink Model 72
4.6 Step 4: Build Up the Function 76
4.6.1 Modeling the Function 76
4.7 Step 5: Parameters 85
4.8 Step 6: Optimization 86
4.9 Step 7: Export 88
5 ETAS Contact Addresses 90
Figures 91
Formulas 93
Index I
Table of Content ETAS
User's Guide 5
1 ETAS ASCMO MOCA - Introduction ETAS
User's Guide 6
1 ETAS ASCMO MOCA - IntroductionETAS ASCMO MOCA is a tool for modeling and calibration of functions with givendata. These functions consist of mathematical operations on changeable para-meters like lookup tables. The goal is to minimize the deviation of the output ofthe function to given data. The parameters of the function are adapted (calibrated)with an optimizer to minimize this deviation. Additional constraints like smooth-ness and gradients of curves/maps can be considered.
The results can be visualized in different views like scopes and scatter plots. A resid-uals analysis allows to detect problems, e.g. outliers.
MOCA comes in two versions, the full version and the runtime version. The full ver-sion allows modeling of the function, definition of an optimization sequence andthe optimization itself. The runtime version opens existing projects from the full ver-sion and allows to import data and start of the optimization, but not the definitionof the function or the optimization sequence.
Building blocks of the function in MOCA are scalars, lookup tables, RBF (RadialBasis Function)-Nets and models from other sources like Simulink.
A time- independent function without inner states and loops can directly bemodeled in MOCA. More complex, time-dependent functions are to be modeledin other tools like Simulink®. MOCA then uses the external tool during the optim-ization.
1.1 Safety AdvicePlease adhere to the ETAS Safety Advice for ETAS ASCMO MOCA and to thesafety instructions given in the user documentation.
ETAS GmbH cannot be made liable for damage which is caused by incorrect useand not adhering to the safety instructions.
1.1.1 Labeling of Safety Instructions
The safety instructions contained in this manual are shown with the standarddanger symbol:
The following safety instructions are used. They provide extremely importantinformation. Read this information carefully.
WarningIndicates a possible medium-risk danger which could lead to serious or even fatalinjuries if not avoided.
ETAS 1 ETAS ASCMO MOCA - Introduction
7 User's Guide
CAUTIONIndicates a low-risk danger which could result in minor or less serious injury ordamage if not avoided.
NOTICE
Indicates behavior which could result in damage to property.
1.1.2 Demands on Technical State of the Product
The following special requirements are made to ensure safe operation:
l Take all information on environmental conditions into consideration beforesetup and operation (see the documentation of your computer, hardware,etc.).
Further safety advice is given in the ETAS ASCMO MOCA safety manual availableat ETAS upon request.
1.2 Target GroupThis manual is directed at trained qualified personnel in the development and cal-ibration sector of motor vehicle ECUs. Technical knowledge in measuring and con-trol unit engineering is a prerequisite.
1.3 About this Document
1.3.1 Document Content
This user´s guide consist of the following main chapters:
l "ETAS ASCMO MOCA - Introduction" on page 6
This chapter provides basic information about ETAS ASCMO MOCA andthis user´s guide. Be sure to read this chapter before starting the tutorial"Tutorial: Working with ETAS ASCMO MOCA" on page 42.
l "Installation" on page 10
This chapter provides information for preparing and performing the install-ation of ETAS ASCMO MOCA/ETAS ASCMO MOCA Runtime.
l "Concepts of ETAS ASCMO MOCA" on page 17
In this chapter, you can find a description of the basic concepts ofETAS ASCMO MOCA.
l "Tutorial: Working with ETAS ASCMO MOCA" on page 42
This chapter will help you with an example to familiarize yourself with thebasic functions of ETAS ASCMO MOCA.
1 ETAS ASCMO MOCA - Introduction ETAS
User's Guide 8
1.3.2 Conventions
Documentation Conventions
All actions to be performed by the user are presented in a so-called Use Caseformat. This means that the objective to be reached is first briefly defined in thetitle, and the steps required to reach the objective are then provided in a list. Thispresentation appears as follows:
Definition of Objective:
Any preliminary information...
1. Step 1.
Any explanation for step 1...
2. Step 2.
Any explanation of step 2...
3. Step 3.
Any explanation of step 3...
Any concluding remarks...
Typographic Conventions
The following typographic conventions are used:
Select File→ Open.
Click OK.
Menu options and button names areshown in boldface/blue.
Press <ENTER>. Keyboard commands are shown in angledbrackets, in BLOCK CAPITALS.
The "Open File" dialog windowopens.
Names of program windows, dialog win-dows, fields etc. are shown in quotationmarks.
Select the file setup.exe. Text in drop-down lists on the screen, pro-gram code, as well as path and file namesare shown in the Courier font.
A distribution is a one-dimensionaltable of sample points.
Content markings and newly introducedterms are shown in italics.
The OSEK group (seehttp://www.osek-vdx.org/) hasdeveloped certain standards.
Links to internet documents are set inblue, underlined font.
Tab. 1: Typographic Conventions
ETAS 1 ETAS ASCMO MOCA - Introduction
9 User's Guide
1.4 Additional Source of InformationBesides this manual, the online help is recommended – particularly when workingwith ETAS ASCMO MOCA V5.1 and/or ETAS ASCMO MOCA Runtime V5.1. Itcan be called up via Help → Online Help or context-sensitive (with <F1>) in therespective open operating window.
2 Installation ETAS
User's Guide 10
2 InstallationThis chapter provides information for preparing and performing the installation andfor licensing ETAS ASCMO MOCA V5.1.
l "Preparation" on page 10
"System Requirements" on page 10
"Additional Software Requirements" on page 10
"User Privileges" on page 11
l "Program Installation" on page 11
"Start Menu" on page 14
"Files and Directories" on page 15
l "Licensing the Software" on page 15
2.1 PreparationPrior to the installation, check that your computer meets the system requirements.Depending on the operating system used and network connection, you mustensure that you have the required user rights.
Tip
Ensure that you have the necessary access privileges to the Windows registry data-base for the installation and operation of the software. If in doubt, contact yoursystem administrator.
2.1.1 System Requirements
The following system prerequisites are required:
Component Requirement
Processor 1 GHz; 2 GHz Dual-Core or higher recom-mended
OS Windows® 7 (64 bit) or Windows® 8 (64 bit) orWindows® 10 (64 bit)
RAM 1 GB RAM; 8 GB RAM recommended
Hard disk with at least 2 GB of available storage
Tab. 2: System requirements
2.1.2 Additional Software Requirements
All required software components that may be missing are installed during theinstallation of ETAS ASCMO MOCA V5.1 and ETAS ASCMO MOCA RuntimeV5.1.
ETAS 2 Installation
11 User's Guide
2.1.3 User Privileges
Please observe the following notes concerning the user privileges for the install-ation and operation of ETAS ASCMO MOCA V5.1 andETAS ASCMO MOCA Runtime V5.1.
Required User Privileges for the Installation
To install ETAS ASCMO MOCA V5.1 and ETAS ASCMO MOCA Runtime V5.1 onthe PC, you require the user privileges of an administrator. If necessary, contactyour system administrator.
Required User Privileges for the Operation
To operate ETAS ASCMO MOCA V5.1 and ETAS ASCMO MOCA Runtime V5.1,privileges of a standard user are sufficient.
2.2 Program Installation
Starting the installation
1. Go to the directory where the installation file is loc-ated and double-click on the Setup_ASCMO_x64.exe file.
The Setup Wizard opens.
2. Click onNext.
The "License Agreement" window opens.
2 Installation ETAS
User's Guide 12
3. Read the license agreement carefully, then activateI accept the agreement.
If you do not accept the license agreement, you can-not continue the installation.
4. Click onNext.
The "Set Destination Location" window opens.
5. Do one of the following:
a. Accept the suggested installation directory.
b. Use Browse to select a new directory.
6. Click onNext.
The "Select Start Menu Folder" window opens.
ETAS 2 Installation
13 User's Guide
7. Accept the default directory or click on Browse toselect a new directory.
8. Click onNext.
The "Additional Tasks" window opens.
9. Activate the Create a desktop icon option if youwant to create an icon on the desktop.
10. Activate one of the options regarding MATLAB Com-piler Runtime installation.
11. Click onNext.
The "Ready to Install" window opens. You cancheck the information you entered in the previouswindows.
2 Installation ETAS
User's Guide 14
12. If you want to change settings, click on Back.
Tip
With the next step, you start the installation.
13. Click Install if you want to start the installation.
The installation is performed. A progress indicatorshows how the installation is progressing.
When the installation is complete, the "Completingthe ETAS ASCMO Setup Wizard" window opens.
14. Click on Finish.
The installation is complete. ETAS ASCMO MOCAand ETAS ASCMO MOCA Runtime can be started.
2.2.1 Start Menu
After successful installation, the folder you specified in the "Select Start MenuFolder" window (see page 12) with the following entries is added to the Windowsstart menu.
ETAS 2 Installation
15 User's Guide
l ASCMO Desk V5.1
Starts the ASCMO Desk window, where you can start your ETAS ASCMOcomponents.
l ASCMO Dynamic V5.1
Starts ASCMO Dynamic.
l ASCMO ExpeDes Dynamic V5.1
Starts ASCMO ExpeDes Dynamic.
l ASCMO ExpeDes V5.1
Starts ASCMO ExpeDes.
l ASCMO MOCA Runtime V5.1
Starts the ETAS ASCMO MOCA Runtime environment with limited func-tionality.
l ASCMO MOCA V5.1
Starts ETAS ASCMO MOCA.
l ASCMO Static V5.1
Starts ASCMO Static.
l Manuals and Tutorials
Opens the ASCMO documentation directory (<installation>\Manu-als), which contains the following information and documents.
online help (available via <F1>) as CHM files
the user's guide (this document) with a tutorial for the basicfunctions of ASCMO MOCA
user's guides for ASCMO Static and ASCMO Dynamic
ETAS ASCMO MOCA interface documentation (in theAscmoInterfaceDoc folder)
2.2.2 Files and Directories
All files belonging to the program are located in the directory selected during theinstallation, generally
l C:\Program files\ETAS\ASCMO 5.1
and in additional subfolders of this directory.
2.3 Licensing the SoftwareA valid license is required for using ETAS ASCMO MOCA. You can obtain thelicense file required for licensing either from your tool coordinator or through a selfservice portal on the ETAS Internet Site under http://www.etas.-com/support/licensing. To request the license file you have to enter the activationnumber which you received from ETAS during the ordering process.
In the Windows Start menu, select Programs → ETAS → License Man-agement→ ETAS License Manager.
2 Installation ETAS
User's Guide 16
Follow the instructions given in the dialog. For further information about, forexample, the ETAS license models and borrowing a license, press <F1> in theETAS License Manager.
2.4 Uninstallation
Tip
You cannot uninstall only ETAS ASCMO MOCA. The procedure uninstalls allETAS ASCMO components.
Use one of the following ways to start the ETAS ASCMO uninstall process:
l Programs and Features from the Windows control panel
Uninstalling ETAS ASCMO
1. Start the uninstall procedure.
A safety inquiry opens.
2. Click onYes to continue.
ETAS ASCMO is uninstalled. A progress indicatorshows how the uninstallation is progressing.
When the uninstallation is complete, a success win-dow opens.
3. Click onOK to end the uninstallation.
ETAS 3 Concepts of ETAS ASCMO MOCA
17 User's Guide
3 Concepts of ETAS ASCMO MOCAETAS ASCMO MOCA enables optimization of model parameters and minimizesthe deviation of model prediction and desired output values.
E.g. modern vehicle ECUs contain physically based models to replace or monitorreal sensors. Such a physically based model is generic, but must be adapted to anactual engine. Parameters (maps/curves/scalars) are optimized using real meas-urements, e.g., from test bench or vehicle.
The model can be represented in ETAS ASCMO MOCA as a set of formulasentered by the user. Alternatively, existing models, e.g. from Simulink®, can beused.
In this chapter, you can find a description of the basic concepts ofETAS ASCMO MOCA.
These are the following:
l "Parameters " on page 33
This section contains general information about the optimization of para-meters within ETAS ASCMO MOCA.
l "The Main Elements of the User Interface" on page 20
This section provides an brief overview of the user interface key elementsof ETAS ASCMO MOCA.
l "Assessment of the Input Data" on page 23
In this section you will find information on how you can assess the quality ofthe input data used by ETAS ASCMO MOCA for the parameter optim-ization.
l "Available Types of Parameters" on page 34
This section provides a brief overview of the various types of parametersthat can be used in the function (see "Step 4: Build Up the Function"on page 76) for optimization (see "Step 6: Optimization" on page86).
l "Optimization" on page 38
This section contains a description of the different optimization methodsand the optimization criteria that can be used for the parameter optim-ization.
l "Fields of Application" on page 17
This section provides a general overview of the wide range of applicationfields in ETAS ASCMO MOCA.
3.1 Fields of ApplicationThis chapter provides a general overview of the wide range of application fields ofETAS ASCMO MOCA.
3 Concepts of ETAS ASCMO MOCA ETAS
User's Guide 18
3.1.1 Fields of Application of ETAS ASCMO MOCA
Calibration of ECU Sensor Data
l Optimization of parameters
l Optimization of time-dependent (dynamic) functions
l Parameterization of ECU models (cylinder fill, torque, ...)
The use of ETAS ASCMO MOCA in the area of calibration offers a series of advant-ages:
l Significant increase in efficiency through reduced measuring and analysisefforts
l Improved complexity handling
l Improved data quality
l Multiple use of models
Research, Function and System Development
l Quick calibration and evaluation of experimental engines
l Use of models of real engines for test and development of new functions(e.g., controller strategies)
l Analysis and optimization of unknown systems.
The advantages in the area of research and development lie primarily in a quickerand more improved system understanding, coupled with a variety of possibilitiesfor impact analysis.
3.1.2 Fields of Application of ETAS ASCMO MOCA Runtime
The Runtime version of ETAS ASCMO MOCA is designed to fulfill the specialrequirements of using the software with limited access to special functionalities.Reasons for doing this are to hide away special IP or to avoid that an user changessomething critical.
This version can be either installed and used in parallel to the main (Developer) ver-sion or as standalone.
Tip
The Runtime version does not allow to create or modify functions.
The following activities can be carried out with ETAS ASCMO MOCA Runtime:
l Import of stationary or transient data followed by name-mapping.
l Definition of conversion rules (Conversion Parameters / formulas).
l Import, export, creation, deletion and editing of parameters and systemconstants.
l Iterative optimization and calibration of parameters.
The installation of ETAS ASCMO MOCA Runtime is particularly recommended ifthe one who has created the project with the optimization task is not the same asthe one who executes the optimization.
This supports intellectual property protection and safety:
ETAS 3 Concepts of ETAS ASCMO MOCA
19 User's Guide
l You do not have to share special know-how about the function or the optim-ization logic with others.
l No critical parameters and settings are changed by the user who performsthe optimization. Such changes could result in unexpected behavior.
3 Concepts of ETAS ASCMO MOCA ETAS
User's Guide 20
3.2 The Main Elements of the User InterfaceThis chapter provides a brief overview of the user interface key elements ofETAS ASCMO MOCA.
The following figure shows the main user interface of ETAS ASCMO MOCA.
Fig. 1: The main user interface elements of ETAS ASCMO MOCA
Most of the user activity will take place in the main working window. Moreover,there is a number of interactive options in the navigation and the main menu barthat are described below.
l ➀ The main working window
l ➁The navigation pane (see "Navigation Pane of ETAS ASCMO MOCA"on page 21)
l ➂ The main menu
l ➃ The toolbar (see "Toolbar" on page 20)
l ➄ The Log window (see "Log Window" on page 23)
3.2.1 The Main Menu of ETAS ASCMO MOCA V5.1
For details of the functions of the main menu, refer to the online help (<F1> orHelp→ Online Help).
3.2.2 Toolbar
The toolbar contains a number of buttons that will run the following functions.
ETAS 3 Concepts of ETAS ASCMO MOCA
21 User's Guide
New Project Opens a new instance of ETAS ASCMO MOCA.
Open Project Opens a data selection dialog where you can openavailable projects (*.moca).
Save Saves the current project.
Scatter Plot forTraining Data
Opens the "Data and Nodes - Training Data" win-dow.
See also "Graphical Analysis of Data and FunctionNodes" on page 25.
Scope View forTraining Data
Opens the "MOCA Scope View - Training Data"window.
Zoom In By clicking in the plot, the visualization becomes lar-ger.
Zoom Out By clicking in the plot, the visualization becomessmaller.
Pan This button allows you to move the plot within thewindow.
Rotate 3D This button allows you to rotate a plot in all dimen-sions.
3.2.3 Navigation Pane of ETAS ASCMO MOCA
The navigation pane at the left side of the window leads you from the import ofthe measuring data up to the export of the optimized parameters.
1. Data
3 Concepts of ETAS ASCMO MOCA ETAS
User's Guide 22
Opens the data pane in the main working window. Here, you can import ameasurement file, edit the measurement data and export the data to ameasurement file. In addition, the data channel from the measurement filecan be mapped to the respective function variable (Data Name Mapping).
Further information can be found in "Data" on page 23,in the tutorial (see"Step 1: Data Import" on page 45), and in the online help.
2. Models
Opens the models pane in the main working window. In this pane, it is pos-sible to import an ASCET, Simulink, or ASCMO Static/ASCMO Dynamicmodel and also to link the parameters, inputs and outputs with the avail-able parameters in ASCMO MOCA.
Tip
To use a Simulink model in ASCMO MOCA, Simulink installation with avalid license is required.
Further information can be found in section "Models" on page 31, in thetutorial (see "Step 3: Models" on page 64), and in the online help.
3. Function
Opens the function pane in the main working window. In this pane, thefunction will be constructed from the stepwise creation of the nodes. Themain point here is the linkage of the parameters and the data.
Further information can be found in "Functions" on page 31, in the tutorial(see "Step 4: Build Up the Function" on page 76), and in the online help.
4. Parameters
Opens the parameters pane in the main working window. Here, you canmanage and change the maps, curves and scalars for the usage in the func-tions.
Further information can be found in "Parameters " on page 33, in thetutorial (see "Step 5: Parameters" on page 85), and in the online help.
5. Optimization
Opens the optimization pane in the main working window. The parameteroptimization takes place in the main working area of the optimizationpane. Within this pane, the following major tasks can be performed:
l Definition of the parameter-related optimization criterion (e.g.,smoothness, gradient constraints).
l Determination of parameters as reference for the comparison withfollowing optimization results.
l Export of optimized parameters.
After performing these tasks, you can start the optimization.
Further information can be found in "Optimization" on page 38, in thetutorial (see "Step 6: Optimization" on page 86), and in the online help.
ETAS 3 Concepts of ETAS ASCMO MOCA
23 User's Guide
3.2.4 Log Window
The bottom part of the main window displays information about the current pro-gram sequence, e.g. information about the optimization.
Blue underlined words in the log window are links that open, e.g., the online helpor the user's guide (a and b in the figure) or give access to sample projects (c - e inthe figure). In addition, the log files can be saved for analysis and error handlingreasons.
Fig. 2: Information in the log window (example; a: link to the online help, b: linkto the PDF manual)
Saving the logfile
1. Right-click in the log window and select Save Logto File from the context menu.
The "Save Log file As" window opens.
2. Insert a file name and click Save.
The log file is saved.
3.3 DataThe first steps in ASCMO MOCA are import, analysis and preprocessing of meas-ured data. These steps are performed in the Data pane.
For more information, see the following subsections and the online help.
l "Assessment of the Input Data" on page 23
l "Step 1: Data Import" on page 45 (tutorial)
3.3.1 Assessment of the Input Data
This section provides information on how you can assess the quality of the inputdata used by ETAS ASCMO MOCA for the parameter optimization.
l "Tabular Representation of All Model-Related Data" on page 24
l "Function Assessment and Improvement" on page 24
"Graphical Analysis of Data and Function Nodes" on page 25
"Residual Analysis" on page 25
"Improving the Model Quality" on page 29
l "The Variables RMSE and R2" on page 29
l "Function Evaluation Using RMSE and R2" on page 30
3 Concepts of ETAS ASCMO MOCA ETAS
User's Guide 24
Tabular Representation of All Model-Related Data
The Analysis → Data Table → *1. menu options open a table that displays theimported data columns, converted data columns from conversion formulas andadditionally calculated nodes from the function. If optimization criteria aredefined, also the residuals are displayed.
Tip
The data in the "All Data" window cannot be modified.
The following values are shown in the table in detail:
l imported data
l converted data (conversion rules)
l nodes (from functions)
l residuals (from optimization criteria)
Fig. 3: The "All Data" window
Function Assessment and Improvement
The Analysismenu offers a number of functions to compare the model output pre-diction with the measured data of the function output. Specifically, these are:
l Graphical analysis of the measured data and the function nodes
See "Graphical Analysis of Data and Function Nodes" on page 25 fordetails.
l Residual analysis
See "Residual Analysis" on page 25 for details.
1. * = Training Data or Test Data or Training and Test Data
ETAS 3 Concepts of ETAS ASCMO MOCA
25 User's Guide
Graphical Analysis of Data and Function Nodes
The scatter plots in the "Data - *1. " and "Function Node - *1." or "Data andNodes - *1." windows provide a graphical control of the measurement data andthe function evaluation.
When analyzing the measurement data, the following points should be consideredparticularly:
l Have all data been varied in accordance to the Design of Experiment (DoE)and has the measured system remained in the intended operating mode?
l Are the output values in a physically reasonable range?
l Are there outliers included which must be removed if appropriate?
Fig. 4: The "Data and Nodes" window
Residual Analysis
Residuals are the deviation of the data calculated according to the optimization cri-teria to the measured data.
Three types of residual analysis are available:
1. * = "Training Data" or "Test Data" or "Training and Test Data"
3 Concepts of ETAS ASCMO MOCA ETAS
User's Guide 26
l Absolute Error Analysis
For the Absolute Error Analysis, all residuals are displayed:
l Relative Error Analysis
For the Relative Error Analysis the quotient from the residue and the meas-ured value is displayed:
Therefore, a percentage deviation is displayed.
l Studentized Error Analysis
When performing a Studentized error analysis, the quotient from the resid-ual and the RMSE (see "RMSE (Root Mean Squared Error)" on page 29) isdisplayed:
Thus, the error based on the RMSE is shown.
Residual analysis is performed via the Analysis → Residual Analysis → *menuoptions. These menu options open four plot windows:
The "Histogram" Window
The "Histogram" window displays the current error distribution (blue bars) on thetotal number of values for the predicted function output. The normal distribution fit(red line) is drawn additionally. This function enables you to validate whether thecurrent error distribution fits to the normal distribution or not.
ETAS 3 Concepts of ETAS ASCMO MOCA
27 User's Guide
Fig. 5: The "Histogram" window
The "Residuals over Inputs" Window
This window shows several scatter plots: data set number, Active flag and weightagainst measurement number, as well as the errors (absolute, relative, or stu-dentized) of the computed data against the measured data. For a detailed descrip-tion, see "Improving the Model Quality" on page 29.
3 Concepts of ETAS ASCMO MOCA ETAS
User's Guide 28
Fig. 6: The "Residuals over Inputs" window
The "Residuals over Outputs" Window
This window shows scatter plots of the errors (absolute, relative, or studentized) ofthe computed data against the function nodes.
The "Measured vs. Predicted" Window
In this window, the model output is displayed on the X axis and the measuringpoints are displayed on the Y axis. A perfect match between the two would resultin a "pearl necklace" (y = x). The further the points are removed from the y =x line, the greater the difference between measurement and model output.
ETAS 3 Concepts of ETAS ASCMO MOCA
29 User's Guide
Fig. 7: The "Measured vs. Predicted" window
The "Residuals over *" and "Measured vs. Predicted" windows are described indetail in the online help.
Improving the Model Quality
Outliers can be caused by measurement errors or by insufficient function quality.The scatter plots mentioned in sections "Graphical Analysis of Data and FunctionNodes" on page 25 and "Residual Analysis" on page 25 allow visually determiningand improving the model quality. You can search for outliers, draw a rectangle tomark them, delete them, deactivate them or reduce their weight manually, or youcan set an outlier threshold and detect outliers automatically.
3.3.2 The Variables RMSE and R2
A series of variables is used for quantifying the function quality. These variables aredescribed in this section.
RMSE (Root Mean Squared Error)
The RMSE describes the variance to be expected (standard deviation) about themodel: A second measurement falls less than 1 RMSE from the model predictionwith a probability of 68% (with 95.5% < 2 RMSE, 99.7% < 3 RMSE, etc.).
The RMSE is defined as follows:
Equ. 1: Root Mean Squared Error (RMSE)
whereby N = the number of measuring data and
3 Concepts of ETAS ASCMO MOCA ETAS
User's Guide 30
Equ. 2: Sum of Squared Residuals (SSR)
Therefore, SSR is the sum of squared residuals (SSR = Sum of Squared Residuals).
Coefficient of Determination R2
The coefficient of determination R2 is derived from the comparison of the variancethat remains after the model training (SSR) with the variance concerning the meanvalue of all measuring data (SST)
Equ. 3: Coefficient of determination R2
whereby
Equ. 4: Total Sum of Squares (SST)
R2 is a relative measure for evaluating the function output error – it indicates whichportion of the total variance of the measuring data is described by the function.
3.3.3 Function Evaluation Using RMSE and R2
Evaluation of R2
The most important variable is the coefficient of determination R2 ("Coefficient ofDetermination R2" on page 30) . This measure results in the following evaluations:
l The coefficient of determination, R2, can be maximal 1. In this case, thefunction prediction fits exactly to each measured value.
l If the function would simply predict the mean of the measured output forany input data, an R2 of 0 would be the result. A negative R2 would meanthat the prediction is worse than that simple prediction.
l An R2 of 1 means a perfect fit, every prediction of the function is the sameas the measured data. Typically, the measured data has added noise. Inthis case, an R2 of 1 means overfitting. You should be interested in a highR2 with consideration of the noise.
l Keep in mind that different signals can be measured with different quality.There might be signals where an R2 of 0.6 might already be a good value.In contrast, a model for a different signal can be seen as good only if the R2
is above 0.99.
ETAS 3 Concepts of ETAS ASCMO MOCA
31 User's Guide
Evaluation of RMSE
The absolute error RMSE (see section "RMSE (Root Mean Squared Error)" on page29) must be evaluated individually:
l At best, the RMSE can be as good as the experimental repeatability.
l Despite a good R2, the RMSE can be too low, e. g. in case of a very largevariation range of the modeled variable.
l Despite a small R2, the RMSE can be good enough, e. g. if the modeledvariable features only a minor variance over the input parameters of thefunction.
3.4 ModelsIn ASCMO MOCA, you can work with models provided as a set of formulas, oryou can import models created with ASCET, Simulink, ASCMO Static or ASCMODynamic. These models can then be used as function nodes in the ASCMOMOCA project.
Importing and connecting external models is done in the Models pane.
l ASCET models
If you want to use an ASCET model in ASCMO MOCA, you have to createa *.dll file with ASCET and ASCET-PSL first. This *.dll file is thenadded to the ASCMO MOCA project; see the online help for details.
ASCET models are used as black boxes by MOCA. You cannot change themodels, and no link to the ASCET model or to ASCET is created duringimport.
l Simulink models
Using Simulink models in ASCMO MOCA is described in detail in thetutorial, see "Step 3: Models" on page 64.
l ASCMO Static and ASCMO Dynamic models
These models are used as black boxes. You cannot change the models,and no link to the ASCMO Static/ASCMO Dynamic models or to theASCMO tools is created during import.
During import, you can select one, several or all outputs for import. Eachoutput is added as a separate model. See also section "Importing ASCMOStatic/ASCMO Dynamic Models" in the online help.
For more information, see the online help.
3.5 FunctionsIn ASCMO MOCA, you can work with models provided as a set of formulas, oryou can import models created with Simulink, ASCET, ASCMO Static or ASCMODynamic and connect them to the ASCMO MOCA project.
Specifying a function formed by a set of formulas is done in the Function pane.
3 Concepts of ETAS ASCMO MOCA ETAS
User's Guide 32
Data channels, parameters, other function nodes and imported models can beused to define the expression of a function node. Several operators are available;see "Mathematical Operators for Function Nodes" on page 32.
For more information, see the following subsections and the online help.
l "Mathematical Operators for Function Nodes" on page 32
l "Step 4: Build Up the Function" on page 76 (tutorial)
3.5.1 Mathematical Operators for Function Nodes
Function nodes can be added and edited in the "Edit Node" window. At the rightside of that window, you can see buttons for common mathematical operators.
The button, for example, adds the operation .*to the formula expression. This operator results in aline-wise multiplication.
With the warnif button, you can define checks that are automatically executedafter each optimization run. If the defined condition is met, the chosen warningtext is shown in the log window.
After clicking on the warnif button, you have to insert a condition in the expres-sion field. An example is given here.
The condition in this example is:
If at least one of the values of the map parameter MapDragTorque is lar-ger than zero after the optimization, the text Warning will appear in thelog window.
The following operators are supported, even though there are no separate buttonsavailable for several of them. These operators must be entered manually.
z = atan(x) inverse tangent, result is in radians
also allowed: cos, sin, asin, acos, tan, tanh
z = x & y logical line-by-line and
z = x | y logical line-by-line or
z = x < y logical line-by-line less than
also allowed: x ≤ y
Tab. 3: Supported operators for function nodes
ETAS 3 Concepts of ETAS ASCMO MOCA
33 User's Guide
z = x > y logical line-by-line greater than
also allowed: x ≥ y
z = max(x, y) line-by-line maximum
z = min(x, y) line-by-line minimum
z = x == y logical line-by-line equal
z = x ~= y logical line-by-line unequal
z = x + y line-by-line plus
z = x - y line-by-line minus
z = x ./ y line-by-line division
z = x .* y line-by-line multiplication
z = abs(x) absolute value
z = x.^y line-by-line x to the power of y
z = sqrt(x) square root of x
z = log(x) logarithm to the radix e1.
z = exp(x) e to the power of x
z = bswitch(x, y1,y2)
line-by-line "if"
x ≤ 0 results in y1; for x > 0, the result is y2
E.g.: limit x to positive values via bswitch(%x%,0, %x%)
Tab. 3: Supported operators for function nodes
3.6 ParametersModern ECUs contain many map-based physical models2. to replace or monitorreal sensors, e. g.:
l Engine torque
l Air charge/Air mass
l Exhaust gas temperature
l Fuel system corrections
To provide an optimal prediction quality, these models contain parameters such asmaps (see "Maps" on page 35) and curves (see "Curves" on page 36) that needto be calibrated using real measurement data (e. g., from test bench or vehicle).
The high number of actuators in modern engines leads to a continuous increase inthe complexity and the number of parameters of these functions.
A manual calibration is either very time consuming or even impossible.
ETAS ASCMO MOCA supports the calibration and optimization tasks in an effi-cient and user-friendly way.
1. Euler's number, i.e. 2.71828 18284...2. Similar models are used in other environments such as HiL systems.
3 Concepts of ETAS ASCMO MOCA ETAS
User's Guide 34
3.6.1 Example
You can find an example of parameter optimization for a sensor in the chapter"Tutorial: Working with ETAS ASCMO MOCA" on page 42. In this tutorial, dif-ferent maps and curves will be optimized in order to reduce the deviation betweenthe measured values and the model prediction.
3.6.2 Available Types of Parameters
This chapter provides a brief overview of the various types of parameters that canbe used in the function (see "Step 4: Build Up the Function" on page 76) for optim-ization (see "Step 6: Optimization" on page 86).
The parameters are divided in to the following classes:
l "Maps" on page 35
l "Curves" on page 36
l "Scalar" on page 37
l "3D- and 4D-Cubes" on page 37
l "Compressed Model" on page 37
l "Matrix " on page 37
Scalar, Cube-3D and Cube-4D parameters are similar to curves and maps, exceptthat they have no, three (X, Y, Z1), or four (X, Y, Z1, Z2) axes. See the online helpfor an instruction how to create such a parameter.
ETAS 3 Concepts of ETAS ASCMO MOCA
35 User's Guide
Fig. 8: "Create Parameter" or "Edit Parameter" window for scalar, curve, map,Cube-3D and Cube-4D parameters(a: available for curve, map, Cube-3D and Cube-4D parameters, b: available formap, Cube-3D and Cube-4D parameters, c: available for Cube-3D and Cube-4Dparameters, d: available for Cube-4D parameters)
Maps
A map is represented by a set of Z values that are defined over a two-dimensionalgrid that represents the X and Y axes.
In between grid points, the corresponding Z values are calculated by bilinear inter-polation. Therefore, the functional dependency is given by z = z(x, y) and amap is stored in the form of a two-dimensional lookup table.
Outside the grid, either clip- or linear interpolation is applied.
3 Concepts of ETAS ASCMO MOCA ETAS
User's Guide 36
Curves
A curve is represented by a set of Y values that are defined over a one dimensionalgrid, that represents the X axis.
In between grid points, the corresponding Y values are calculated by linear inter-polation. Therefore, the functional dependency is given by y = y(x) and a curveis stored in the form of a one-dimensional lookup table.
Outside the grid, either clip- or linear interpolation is applied (cf. figure below).
ETAS 3 Concepts of ETAS ASCMO MOCA
37 User's Guide
Scalar
A scalar is a one-dimensional calibration parameter.
3D- and 4D-Cubes
In addition to curves (one input) and maps (two inputs), ETAS ASCMO MOCA sup-ports also lookup tables with three and four inputs: Cube-3D and Cube-4D.
Compressed Model
In addition to lookup tables (Curve, Map, Cube), ETAS ASCMO MOCA also sup-ports networks of radial basis functions with a squared exponential kernel (RBFNet-SE) as a parameter.
The number of inputs for such a parameter can be chosen by the user. Also thenumber of basis functions (kernels) must be chosen by the user. A higher numberof inputs and kernels increases the computational complexity of the optimizationand evaluation of such a parameter.
The evaluation function for the parameter is a superposition of Gaussian functions.A rough estimate of the computational complexity for the function is "Number ofinputs" multiplied with "Number of basis functions" evaluations of the e-function.
It can be seen as a black-box data based model and is also available in ASCMO as"Compressed Model". It can replace a whole function consisting of multiplelookup tables and connections between them.
A higher number of kernels increases the fidelity of the model, but it can result inoverfitting and should be tested with test data.
See the online help for an instruction how to create such a parameter.
Matrix
ETAS ASCMO MOCA supports matrix parameters. A matrix is a two-dimensional,indexed set of elements. The position of a scalar value within a matrix is determ-ined by its associated index values (non-negative integer values).
See the online help for an instruction how to create such a parameter.
3 Concepts of ETAS ASCMO MOCA ETAS
User's Guide 38
3.6.3 System Constants
System constants can be used to provide default values for parameters. One ormore parameters of any type can be assigned to a system constant, and a defaultvalue can be provided for each parameter. For non-scalar parameters, the sameconstant value is returned for each point.
By activating a system constant, you define that the default values of the assignedparameters are used.
System constants are created and managed in the "System Constant" tab of theParameters pane.
See the online help for an instruction how to create a system constant.
3.7 OptimizationThis section contains a description of the different optimization methods and theoptimization criteria that can be used for the parameter optimization.
This section contains the following subsections:
l "Description of the Optimization Method" on page 38
l "Consideration of the Roughness" on page 39
l "Optimization Criterion" on page 39
l "Optimization With a Sequence" on page 41
3.7.1 Description of the Optimization Method
The optimizer calibrates the p calibration values of the maps/curves with the goalto minimize the deviation between the measured, predetermined values and thepredictedN values.
Equ. 5: Optimization method
where
p calibration values
N number of measurement points
Ypredicted prediction of the function inETAS ASCMO MOCA/ETAS ASCMO MOCA Runtime
Ymeasured the imported data
The squared deviation is minimized, where the square has the effect that largerdeviations are penalized even stronger.
ETAS 3 Concepts of ETAS ASCMO MOCA
39 User's Guide
3.7.2 Consideration of the Roughness
Roughness of a Curve
The roughness r describes the change in the slope at the support points of thecurve c. If the curve is given by an expression c(x), the roughness is given as thesum of the second derivatives at the support points xi, i=1..k.
For a curve, this means:
Equ. 6: Roughness r of a curve
Roughness of a Map
The Roughness of a map m = m(x1, x2) has to consider the second input variableand therefore is defined as:
Equ. 7: Roughness of a map
where K is the number of the support points (x11, x21), ... , (x1K, x2K) of the map.
3.7.3 Optimization Criterion
To optimize one or more outputs, there is the target criterion Smoothness that lim-its the variation of the stiffness (see "Consideration of the Roughness" on page 39)of a map or a curve. This factor is a weighted penalty term,
Equ. 8: Smoothness factor Si
where S is the Smoothness factor andM the number of support points of the mapor curve.
Different Smoothing Factors in X/Y Direction
For maps, Cube-3D and Cube-4D, the smoothing factor S is used per input dir-ection. If only one value is given, the factor works for all directions. If a vector is
3 Concepts of ETAS ASCMO MOCA ETAS
User's Guide 40
given, each element corresponds to one input direction. In case of a map, e.g.,one may set smoothness in X direction to 0.1 and in Y direction to 0.001 by spe-cifying a vector [0.1 0.001].
The smoothing factor has to be a real number ≥ 0 and can be defined in theOptimization pane either via the Optimization Criteria button or by directly edit-ing the column "Smoothness" in the parameter table.
Optimization Criteria Selection
For curves, maps, Cube-3D and Cube-4D, the gradients in each respective inputdirection can be constrained by defining a limit for the maximal positive and/or themaximal negative gradient. The gradient constraints can be defined in the Optim-ization pane via the Optimization Criteria button. All gradient constraints arehandled as weak constraint by the optimizer.
You can also assign a weight to each set of gradient limits. This weight sets the pri-ority of the gradient limits in relation to the primary optimization criteria. A higherweight makes the gradient limits more important.
Fig. 9: "Parameter optimization properties" window
A step-by-step instruction how to set an optimization criterion is given in the onlinehelp.
3.7.4 Optimization Without Sequence
Unless your project must fulfill special requirements, all steps for optimization areperformed in the "Optimize" tab of the Optimization pane (see Fig. 27 on page86):
l preparing the optimization
l specifying optimization options
l specifying optimization criteria
l specifying local hard constraints
l running the optimization
l performing optional activities
l showing data
l dealing with reference parameters
See the online help for instructions how to do these steps.
ETAS 3 Concepts of ETAS ASCMO MOCA
41 User's Guide
3.7.5 Optimization With a Sequence
If your project must fulfill special requirements, you can define a sequence ofoptimization steps in the "Sequence" tab of the Optimization pane .
Special requirements can be, e.g., the following:
l First, one map shall be calibrated with a part of the data.
l Then the result of the first map is kept and the other parameters are cal-ibrated.
Once your sequence is complete, you can run the optimization.
See the online help for instructions how to create and run an optimizationsequence.
4 Tutorial: Working with ETAS ASCMO MOCA ETAS
User's Guide 42
4 Tutorial: Working with ETAS ASCMO MOCAThis chapter will help you with an example to familiarize yourself with the basicfunctions of ETAS ASCMO MOCA.
4.1 About this TutorialIn this section you can find information about the structure of the tutorial and aboutthe requirements on the measurement data that are used for the parameter optim-ization.
4.1.1 Challenge in this Tutorial
An ECU often contains models for the calculation of signals, as the sensor-baseddata logging is either too difficult or too expensive. A common use case is, forexample, the calculation of the engine torque. With ETAS ASCMO MOCA youcan set up and calibrate a function and optimize the function's parameters basedon the measured sensor data. The goal of the optimizer is to minimize the rootmean square error (see "RMSE (Root Mean Squared Error)" on page 29) of thefunction's parameter. That means that the deviation between the function pre-diction and the measured sensor data will be minimized.
The structure of the torque related function, that will be modeled step by step dur-ing the tutorial, is displayed in chapter "Step 4: Build Up the Function" on page 76.
4.1.2 Structure of the Tutorial
The subsequent tutorial is structured with the following working steps:
l "Start ETAS ASCMO MOCA" on page 44
This part of the tutorial describes how to start ETAS ASCMO MOCA onyour system.
l "Step 1: Data Import" on page 45
In this first step, the measurement data will first of all be loaded and thechannels will be associated with a function node.
l "Step 2: Data Analysis" on page 60
For clearing up and evaluating the measuring data, at any time, you havethe possibility to visualize it after the import graphically for anytime.
l "Step 3: Models" on page 64
In this step, you are able to link an existing Simulink model with and pre-pare the mapping of the parameters, the inputs and outputs.
l "Step 4: Build Up the Function" on page 76
After reading the measuring data and check the plausibility, you can startto set up the function for the torque sensor that will be modeled during thetutorial.
ETAS 4 Tutorial: Working with ETAS ASCMO MOCA
43 User's Guide
l "Step 5: Parameters" on page 85
This step allows you to check and possibly adapt the parameters. Only theparameters will be visualized, which you have defined as reference after anoptimization (see "Step 6: Optimization" on page 86).
l "Step 6: Optimization" on page 86
Before starting with the optimization you have to insert different settings,which influence the optimization. After you have inserted these settings,you can finally start the optimization.
l "Step 7: Export " on page 88
In this step you will export the created and optimized parameters. The para-meters can be exported as DCM file (*.dcm) and the project can be savedfor the runtime environment with limited functionality.
4.1.3 Requirements on Measurement Data
Basically, a simple rule needs to be considered for a successful parameter optim-ization in ETAS ASCMO MOCA: The quality of the function's parameter optim-ization result always depends on the quality of the measurement data. Or in otherwords: If the parameters have been calibrated based on non space-filling or evenwrong data, the function prediction is of little use.
Importing the measurement file in ETAS ASCMO MOCA requires a file with thefollowing properties:
l Data format:
Microsoft Excel (*.xls / *.xlsx)
MDA Export (*.ascii)
Comma Separated Values (*.csv / *.txt)
Measurement Data Format (*.dat / *.mf4 / *.mdf / *.mdf3)
l Outputs in columns
l Names (and perhaps the units) have to be inserted in the first row ( or in thefirst and second row).
Tip
The data used for parameterization do not necessarily have to be derived from aphysical experiment (e.g. test bench). They can also be for example a result of acomputer simulation.
4.1.4 The Data for Modeling
The data used for the parameter optimization in this tutorial can be found in theTorque_Data.xlsx Excel sheet in the <installation>\Example dir-ectory.
<installation> is the installation directory. By default, <installation>= C:\Programs\ETAS\MOCA 5.1.
The measurement data from this file meets the already mentioned requirementsfor a successful parameter optimization in ETAS ASCMO MOCA:
4 Tutorial: Working with ETAS ASCMO MOCA ETAS
User's Guide 44
l The experimental design for logging the sensor data (e.g. at a test bench)corresponds to the DoE method, i. e. the measurements have been variedindependently and are space-filling.
l The measured sensor data from the measurement file does not include anyabsurd values (e.g. values ≤ 0 for torque).
4.2 Start ETAS ASCMO MOCAThis part of the tutorial describes how to start ETAS ASCMO MOCA on your sys-tem. To do so, proceed as follows.
Starting ASCMO MOCA
1. Do one of the following:
In the ASCMO Desk window, click on theModel Calibration tile.
In the Windows start menu, go to theETAS ASCMO V5.1 program group andselectASCMO MOCA V5.1.
In the Windows start menu, go to theETAS ASCMO V5.1 program group and selectASCMO MOCA V5.1.
The start window of ASCMO MOCA opens.
Fig. 10: ETAS ASCMO MOCA start window
ETAS 4 Tutorial: Working with ETAS ASCMO MOCA
45 User's Guide
2. Click on Start MOCA.
The empty main window of ASCMO MOCA opens.Now you can start with the measurement dataimport; see section "Step 1: Data Import" on page45.
Fig. 11: View after the start of ETAS ASCMO MOCA
4.3 Step 1: Data ImportIn this first step, you will load the measurement data and associate the channelswith a function node.
4 Tutorial: Working with ETAS ASCMO MOCA ETAS
User's Guide 46
Fig. 12: Main working window for Step 1: Data pane
Loading the measurement file
If you want to start a new project, you first of all have to load the required meas-urement file for parametrization and optimization.
1. In the main working area, click on the buttonImport Static Data.
2. In the file selection window, select the fileTorque_Data.xlsx from the <install-ation>\Example\Moca directory.
By default, <installation> is C:\ProgramFiles\ETAS\ASCMO 5.1.
3. Click onOpen.
If the import file contains several worksheets, the"Sheets" window opens.
4. In the "Sheets" window, select the worksheet youwant to import (for this tutorial: Torque_Data),then click onOK.
The "MOCA Data Import" window (see Fig. 13 onpage 47) opens.
The "Data Preview" table shows all data in thetable. In the "Available Data" field, you can determ-ine which channel(s) you want to import.
5. Select all channels in the "Available Data" field.
ETAS 4 Tutorial: Working with ETAS ASCMO MOCA
47 User's Guide
6. Click on Import.
The channels are added to the "Import" list.
Fig. 13: "MOCA Data Import" window
4.3.1 Checking the Plausibility of the Measurement Data
To check the measurement data again prior to the data import, it is possible tographically display the measurement data.
Displaying measurement data prior to the import
1. In the "Available Data" field, select one or moremeasuring data channels.
2. Do one of the following:
Click on Plot Selected.
Select Extras → Plot Selected.
4 Tutorial: Working with ETAS ASCMO MOCA ETAS
User's Guide 48
A window opens that displays one of the plots listedbelow, depending on the number of selected chan-nels.
3. Check the plot(s) for outliers or other unusu-al/implausible data.
1 channel:measured data against number of measurement - e.g., Speed againstmeasurement number.
ETAS 4 Tutorial: Working with ETAS ASCMO MOCA
49 User's Guide
2 channels: data of one column against data of the other - e.g., Rel_airmassagainst Speed.
4 Tutorial: Working with ETAS ASCMO MOCA ETAS
User's Guide 50
3 channels: data of the third column against the plane set up by the other two -e.g., Torque_Meas against the Speed-Rel_airmass plane.
ETAS 4 Tutorial: Working with ETAS ASCMO MOCA
51 User's Guide
4 or more channels: a series of scatter plots.
4.3.2 Saving and Loading a Configuration
A configuration file (*.ini) may contain a special assignment of individual meas-urement data columns to the function variables.
Saving and loading a configuration
1. In the "MOCA Data Import" window, select File →Save Channel Config (*.ini).
2. In the file selection window, enter the name of thefile under which the current configuration should besaved.
3. To load a previously saved configuration file, selectFile → Load Channel Config (*.ini).
4.3.3 Importing Measurement Data
Now the data can be imported.
4 Tutorial: Working with ETAS ASCMO MOCA ETAS
User's Guide 52
Importing the measurement data
1. In the "MOCA Data Import" window, click onOK.
The data are imported in the currentETAS ASCMO MOCA project. The content of theimported file is displayed in the "Data" tab.
4.3.4 Mapping Measurement Channels to Variables
In the next step, the channels of the imported measurement file have to beassigned to a variable (node), which will be used in the functions later.
Tip
If the measurement file's structure meets the requirements (see "RequirementsonMeasurement Data" on page 43) for the data import , every channel is auto-matically assigned to the corresponding variable.
Because ETAS ASCMO MOCA automatically performs the assignment, you canproceed with the analysis of the imported measurement data (see "Step 2: DataAnalysis" on page 60).
Changing the variable name
If you want to use a different variable name ("Name in Project" column) in yourfunctions, you can change the name in the data pane, "Data Name Mapping"table. To do so, proceed as follows:
1. In the "Name in Project" column, click on the vari-able whose name you want to change.
The name is highlighted and the cursor is shown.
ETAS 4 Tutorial: Working with ETAS ASCMO MOCA
53 User's Guide
2. Enter the new variable name.
3. Click on a random position in the main working win-dow.
The new variable name is accepted.
Deleting a mapping
If you do not require certain channels in your measuring data for the parameter,you can delete the mapping in the Data pane, "Data Name Mapping" table.
1. In the "Name in Function" column, select thedesired variable.
2. Click onDelete Mapping.
The variable is deleted from the "Data Name Map-ping" table.
4.3.5 Working in the Data Pane of ETAS ASCMO MOCA
ETAS ASCMO MOCA supports multiple data sets for training and test data, shownas multiple tabs in the data pane. All training data sets together are used for theoptimization, while the test data sets are used for evaluation and prediction pur-poses.
A weight per data set can be given, which controls the impact of this data set onthe optimization.
Different data sets can have different column names; name mapping is then usedto correctly attach the different data sets.
4 Tutorial: Working with ETAS ASCMO MOCA ETAS
User's Guide 54
The first import is always used as the first training data set. When you importanother file, you can choose to use this data set as an additional training data setor as test data set or as a replacement. To get the RMSE for a test data set, Ana-lysis → Residual Analysis → Test Data→ * can be used.
Loading multiple data sets
If you want to load multiple data sets, proceed as follows:
1. Click on Import Data.
2. In the file selection window, enter or select pathand name of the file you want to import.
Allowed file formats are *.xls, *.xlsx, *.csvand *.txt.
3. Click onOpen.
The "MOCA Data Import - <file name>" windowopens.
4. In that window, select the input channels asdescribed in "Loading the measurement file" onpage 46.
5. Click onOK.
The "Import MOCA Data" window opens.
6. In the "Import MOCA Data" window, do the fol-lowing:
a. In the "Data" combo box, select the dataset type for the imported data.
Available selections are Add New Train-ing Dataset, Add New Test Data-set and Replace SelectedDataset.
b. In the "Data Set Name" field, enter a namefor the data set.
c. If desired, click on Show to open the data ina separate window.
d. Click onOK to continue.
The selected file is imported.
ETAS 4 Tutorial: Working with ETAS ASCMO MOCA
55 User's Guide
Deleting a data set
1. Go to the tab of the data set you want to delete.
2. Click onDelete Dataset.
A confirmation window opens.
3. In the confirmation window, click onDelete.
The selected data set is deleted from the project.
Data Point Activation
With the "Active" column, rows of data can be set inactive by setting the value tozero. Inactive rows are ignored for the RMSE calculation and optimization.
Multiple rows can be selected with the <SHIFT> key and left mouse button clicking.Then, the selected rows can be set inactive with the Set Active/Inactive button .
Another possibility to activate/deactivate data points is available in the scatter plotwindow, opened with Analysis → Scatter Plot → *. After marking some datapoints in a scatter plot, you can use the Extras → Set Marked Points Active andInactivemenu options to activate/deactivate the marked data points.
Activating/deactivating data points
1. To activate/deactivate data points via the Set Act-ive/Inactive button, proceed as follows:
a. In the "Active" column, select one or morerows.
b. Click on Set Active/Inactive.
If the value in the "Active" column was 1, itchanges to 0 (inactive).
If the value in the "Active" column was 0, itchanges to 1 (active).
2. To activate/deactivate an individual data point, pro-ceed as follows:
a. In the "Active" column, click in the row youwant to edit.
b. To deactivate the row, enter 0.
c. To activate the row, enter 1.
Tip
Any value≠ 0 (including negative numbers andarbitrary characters) is interpreted as active.
Data Point Weights
With the "Weight" column, the optimization weight for a data point can be set.The default is one and higher values show the optimizer that the respective pointsare more important, i.e. a stronger emphasis to meet the optimization criterion for
4 Tutorial: Working with ETAS ASCMO MOCA ETAS
User's Guide 56
this data point. The weight influences the optimization but is not reflected in thedisplayed RMSE.
Multiple rows can be selected with the <SHIFT> and <CTRL> key and left mouse but-ton clicking. Then the weight for multiple rows can be set with the Set Weight but-ton.
Another possibility to set the weight of data points is available in the scatter plotwindow, opened with Analysis → Scatter Plot → *. After marking some datapoints in a scatter plot, you can use the Extras → Set Marked Points Weightmenu option to set the weight for the marked data.
Setting the weights of selected data points
1. To set the weights of data points via the SetWeight button, proceed as follows:
a. Select one or more rows.
b. Click on Set Weight.
c. In the "Data Weights" window, enter theweight for the selected rows.
d. Click onOK.
The weight is assigned to all selected rows.
2. To set the weight of an individual row, proceed asfollows:
a. In the "Weight" column, click in the rowyou want to edit.
b. Enter the number you want to assign.
Adjusting the weights of the entire data set
To adjust the weights of the entire data set, proceed as follows:
Tip
The data set weight has no effect if there is just one data set.
1. In the "Weight of <Dataset name>" field, enter avalue.
For this tutorial, enter the value 8.
ETAS 4 Tutorial: Working with ETAS ASCMO MOCA
57 User's Guide
2. To see the effect of the data set weight, selectAna-lysis → Data Table → Training Data or TestData or Training and Test Data.
The following window opens.
All values in the "Weight" column have been mul-tiplied with the entered value in the "Weight of<Dataset_name>" field. A row weight of 5 and adata set weight of 8 mean that this row has an abso-lute weight 40.
Managing Data in a Data Set
ETAS ASCMO MOCA offers various possibilities to edit, filter and sort the data in adata set:
l "Editing data points"
l "Removing NaN values"
l "Filtering the data"
l "Sorting the data"
l "Deleting a data point"
l "Deleting an input column"
Editing data points
To set a value in a particular column and row, proceed as follows:
1. In the column you want to edit, click in the row youwant to edit.
2. Enter the number you want to assign.
Removing NaN values
If your imported data contains non-numeric values, you can automatically deletethe affected rows in all data sets. Proceed as follows:
4 Tutorial: Working with ETAS ASCMO MOCA ETAS
User's Guide 58
1. Click on Remove NaN.
The "NaN values" window opens.
2. To delete the rows with NaN values, click onDelete.
Filtering the data
Tip
The filter affects all data sets and all views/windows.
1. SelectView → Filter Data.
The "Filter Data" window opens. The "Standard Fil-ter" area allows to filter single columns, the "For-mula Filter" area allows a more complicated filter.
2. In the "Standard Filter" area, proceed as follows:
a. In the empty combo box, enter or select acolumn name.
A filter for the selected column is created.
b. In the input fields at both ends of the filterline, enter lower and upper limit.
A lower (upper) value of -Inf (Inf) meansno lower (upper) limit.
ETAS 4 Tutorial: Working with ETAS ASCMO MOCA
59 User's Guide
c. In the combo boxes, select the operators (<or ≤).
d. Click on the Remove this filter but-ton to delete the filter.
3. In the "Formula Filter" area, proceed as follows:
a. In the combo box, select the operator (OR orAND) that will connect standard filters andformula filters.
The input field for formula filters becomesactive.
b. In the input field, enter the formula con-dition you want to use.
The formula must follow the MATLAB syntax.Names of inputs and nodes must beincluded in %. You can drag names of inputsand nodes from the "Input and NodeNames" area to the input field.
Example formula condition: %Speed% >2000 & (%Ignition% < 5 | %Rel_Airmass% == 2)
Tip
For further information about formula conditions,see "Step 4: Build Up the Function" on page 76.
4. Click onOK orApply.
All rows that do not match the filter criteria are hid-den.
Sorting the data
Tip
Sorting affects all data sets, but only the view in step 1.
1. Click on Sort Data.
The "Sort Data" window opens.
2. In the "Column Name" combo box, select acolumn.
3. Click onOK.
4 Tutorial: Working with ETAS ASCMO MOCA ETAS
User's Guide 60
The tables are sorted by the selected column, inascending order.
Deleting a data point
1. Select a value in one or more rows.
2. Click onDelete Row.
A confirmation window opens.
3. In the confirmation window, click onDelete.
The selected rows are deleted.
Deleting an input column
1. Select a value in one or more columns.
2. Click onDelete Column.
A confirmation window opens.
3. In the confirmation window, click onDelete.
The selected columns are deleted.
4.4 Step 2: Data AnalysisFor clearing up and evaluating the measuring data, you have the possibility to visu-alize it after the import graphically for anytime.
During the analysis, particular the following points should be considered.
l Have all parameters been varied according to the experiment plan and didthe measured system remain in the operating mode intended for this pur-pose?
l Do the output variables fall in physically meaningful ranges?
l Are there any outliers included, which have to be removed, if appropriate?
Visualizing measurement data in a scatter plot
1. SelectAnalysis → Scatter Plot → *1. →Data/Function Nodes.
The "Data" and - if your project contains functionnodes - "Function Nodes" windows open. Only the"Data" window is used for the current task.
1. * = Training Data or Test Data or Training and Test Data
ETAS 4 Tutorial: Working with ETAS ASCMO MOCA
61 User's Guide
The bottom-left plot (Speed over Rel_Airmass) shows the space-filling vari-ation of the data in the experimental plan.
Changing the axis pairs
Since the current view does not show the dependence of the relevant meas-urement data, you must adjust the axis pairs. The selection of the displayed axestakes place directly in the plot window.
1. In the "Data" window, selectView → SelectAxes.
The "Choose Axes" window opens.
2. Go to the "Matrix" tab.
3. In the "Matrix" tab, select the axis pairs shown inthe following figure.
4 Tutorial: Working with ETAS ASCMO MOCA ETAS
User's Guide 62
In the "List" tab, you have an alternate rep-resentation of the selection of the axes pairs thatare to be visualized.
4. Do one of the following:
Click onApply.
The visualized axes in the scatter plot will beadjusted. The "Choose Axes" windowremains open.
Click onOK.
The visualized axes in the scatter plot will beadjusted. The "Choose Axes" window closes.
ETAS 4 Tutorial: Working with ETAS ASCMO MOCA
63 User's Guide
Deleting an outlier
You can now use the scatter plots to remove outliers.
1. Search the plots for outliers.
In this tutorial, use the top-left point in the "Torque_Meas over Speed" plot, with Torque_Meas >300.
2. Click in the plot and draw a rectangle around theoutlier.
The selected points are colored in all scatter plots.
3. Right-click the frame of the rectangle and selectMark Points Inside Rect from the context menu.
The marked points are highlighted with a red circle.
4. Select Extras → Delete Marked Points.
The outlier is deleted from the measurement data.
Displaying the measurement data range
After deleting the outlier from the measurement data, you can check whether thevalues of the measurement file are within a plausible range.
1. In the main window, selectAnalysis → ShowMin/Max.
4 Tutorial: Working with ETAS ASCMO MOCA ETAS
User's Guide 64
The "Min/Max Data & Nodes" window opens.
After importing and reviewing the measurement data, you can start to add nodesto the function. To do so, select the Function working step in the navigation (see"The Main Elements of the User Interface" on page 20). The respective elementsin the main working window will appear, where you can save, delete and edit thefunction "Step 4: Build Up the Function" on page 76).
4.5 Step 3: Models
Fig. 14: Main working window for Step 3: Models pane
In this step, you can link an existing Simulink model with ETAS ASCMO MOCAand prepare the mapping of the parameters, the inputs and outputs.
Tip
You do not have to embed a model to ETAS ASCMO MOCA as a part of thistutorial. Therefore, you can skip this step in the navigation and start to build thefunction (see "Step 4: Build Up the Function" on page 76).
ETAS 4 Tutorial: Working with ETAS ASCMO MOCA
65 User's Guide
This step requires a Simulink installation. By default, ETAS ASCMO MOCA willuse the MATLAB/Simulink version most recently installed on your system.
Selecting a MATLAB/Simulink version
1. In the main window, select File → Options.
The "Options" window opens.
2. In the "Simulink Version" combo box, select the ver-sion you want to use.
3. Click OK orApply to apply your settings.
4.5.1 Adding A Simulink Model and Scripts
You can add a Simulink model, which can be selected as node in "Step 4: Build Upthe Function" on page 76. To add a Simulink model, proceed as follows:
Adding a Simulink model and scripts
1. In the main working area, click onAdd SimulinkModel.
A new line is added to the model list; additionaloptions are displayed in the lower part of the modelpane.
Fig. 15: Main working area with additional options
4 Tutorial: Working with ETAS ASCMO MOCA ETAS
User's Guide 66
2. In the "Model" field, enter or select (via thebutton) path and name of the Simulink model to beoptimized.
This can be an *.mdl (before R2012a) or *.slx(from R2012a) Simulink model.
3. Press <ENTER> or click in another field.
A warning opens if the Simulink model does notexist. Proceed as follows.
a. Confirm the warning withOK.
b. Correct path and/or file name of the Sim-ulink model.
4. If desired, enter or select (via the button) pathand name of an executable m-script in the "PreLoad Script" field.
This Init script is optional and may contain a pre-cal-ibration for the Simulink model. The pre-calibrationis expected as a MATLAB workspace variable thatwill be assigned in the "Parameters Mapping"table.
5. If desired, enter or select (via the button) pathand name of another executable m-script in the"Post Load Script" field.
This script is optional.
Tip
You can use %ProjectPath% as the location. This is then automaticallyreplaced by the current location of the ETAS ASCMO MOCA project.
4.5.2 Parameter Mapping
In the "Parameters Mapping" area, project-related maps/curves and scalars canbe mapped to the parameters from the Simulink model.
ETAS ASCMO MOCA expects the parameters to be calibrated as MATLAB work-space variables. This could for example be the following Simulink map:
ETAS 4 Tutorial: Working with ETAS ASCMO MOCA
67 User's Guide
Fig. 16: Table data and breakpoints from Simulink map
You can map project-related parameters and Simulink parameters either auto-matically (see "Scanning the Simulink model and mapping parameters" on page67) or manually (see "Mapping parameters manually" on page 68).
Scanning the Simulink model and mapping parameters
To automatically scan the Simulink model for possible parameters, proceed as fol-lows.
1. In the main window, "Parameters Mapping" area,click on Scan Model.
The block masks of lookup tables and other blocksare scanned for variable names. The results arethen presented in the "Scan Model <model_name> for Parameter Mapping" window.
Fig. 17: "Scan Model <model_name> for Parameter Mapping" window
2. Activate/deactivate the Constants, Curves and/orMaps options to show/hide parameters of therespective types.
3. In the "Filter" field, enter the string by which youwant to filter the list, then press <ENTER>.
4 Tutorial: Working with ETAS ASCMO MOCA ETAS
User's Guide 68
Tip
The filter is not caps-sensitive. You cannot use wild-cards.
Only parameters whose Simulink names or pathscontain the search string are displayed. If you enterthe search term Ignition, for example, all rowsfrom Fig. 17 except the third will be hidden.
4. In the "Create Mapping" column, activate theoptions in all rows you want to map.
5. Click onAdd Mappings to add the selected map-pings to the "Parameters Mapping" list.
WithAdd Mappings, existing content in the "Para-meters Mapping" list is kept. Replace Mappingsremoves existing content in the "Parameters Map-ping" list.
Mapping parameters manually
To map the parameters manually, proceed as follows:
1. In the "Parameters Mapping" area, "MOCA Para-meter" column, select a parameter from the combobox.
You can also create a new parameter with theCreate Parameter button or import a DCM filewith the Import Parameter button.
2. In the "Table Data Simulink" and "Breakpoints <n>Simulink" columns, enter the variable names fromthe block mask (see Fig. 16 on page 67).
Or - as an alternative -
3. Proceed as follows.
a. Click on Edit Mapping.
The "Mapping of <parameter>" windowopens. The init script is executed first andthe model is loaded. The existing MATLAB
workspace variables are displayed.ETAS ASCMO MOCA automatically per-forms a name search.
ETAS 4 Tutorial: Working with ETAS ASCMO MOCA
69 User's Guide
b. In the "Field" column, select the MATLAB
workspace variable that describes the para-meter value or table data.
c. In the "Breakpoint <n>" columns, selectMATLAB workspace variables used for thetable axes.
d. Click onOK to accept your settings andclose the "Mapping of <parameter>" win-dow.
The "Table Data Simulink" and "Breakpoint<n> Simulink" columns in the "ParametersMapping" area are updated according toyour selections.
4.5.3 Mapping Simulink Inputs
In the "Simulink Inputs Mapping" area, imported data columns or nodes from theETAS ASCMO MOCA project can be mapped to the Simulink model inputs.
Scanning the Simulink model and mapping inputs
To automatically scan the Simulink model for inputs, proceed as follows:
1. In the "Simulink Inputs Mapping" area, click onScan Model.
The model is scanned for Inport and From Work-space blocks. The results are then presented in the"Scan Model <model_name> for Inputs" window.
Fig. 18: "Scan Model <model_name> for Inputs" window
4 Tutorial: Working with ETAS ASCMO MOCA ETAS
User's Guide 70
2. If necessary, enter the dimension and qualifier(s)manually.
Consider, for example, the following input ports,which expect a bus and a vector.
MOCA automatically tries to identify such a bus orvector signal, by following the signal flow in Sim-ulink. If this fails, you have to manually enter thetype, dimension and qualifier.
3. In the "Create Mapping" column, activate theoptions in all rows you want to map.
4. Click onAdd Mappings to add the selected map-pings to the "Simulink Inputs Mapping" list.
WithAdd Mappings, existing content in the "Sim-ulink Inputs Mapping" list is kept. Replace Map-pings removes existing content in the "SimulinkInputs Mapping" list.
After clicking on Add/Replace Mappings, the "Simulink Inputs Mapping" tableis filled.
Fig. 19: Mapping of the Simulink inputs
The notation Speed | In(1) means that the third "Simulink Inport data"column is passed as Speed.
A list of possible notations is given in the online help.
ETAS 4 Tutorial: Working with ETAS ASCMO MOCA
71 User's Guide
4.5.4 Mapping Simulink Outputs
In the "Simulink Outputs Mapping" area, the simulation outputs are made avail-able to ETAS ASCMO MOCA. Outport and ToWorkspace blocks are supported.
Scanning the Simulink model and mapping outputs
1. In the "Simulink Outputs Mapping" area, click onScan Model.
The model is scanned for Outport and ToWork-space blocks. The results are then presented in the"Scan Model <model_name> for Outputs" win-dow.
Fig. 20: "Scan Model <model_name> for Outputs" window
2. If necessary, enter the dimension and qualifier(s)manually.
3. In the "Create Mapping" column, activate theoptions in all rows you want to map.
4. Click onAdd Mappings to add the selected map-pings to the "Simulink Outputs Mapping" list.
WithAdd Mappings, existing content in the "Sim-ulink Outputs Mapping" list is kept. Replace Map-pings removes existing content in the "SimulinkOutputs Mapping" list.
Example
Torque_PredictSL | Out(1) makes the Simulink output available foroptimization under the name Torque_PredictSL.
Fig. 21: Mapping of the Simulink outputs
A list of possible notations is given in the online help.
4 Tutorial: Working with ETAS ASCMO MOCA ETAS
User's Guide 72
4.5.5 Validating and Using the Simulink Model
Tip
Running a Simulink model is only possible if a suitable Simulink version with cor-responding license is available on your system.
After mapping parameters, inputs and outputs, perform the following steps:
l validate the Simulink model
l use the Simulink model in the function
l perform the optimization
Validating a Simulink Model
To validate a Simulink model, proceed as follows:
1. In the lower section of the main working area, clickonValidate.
The validation is performed.
During validation, the following steps are executed:
l Start the (optional) init script.
l Add the model path to the MATLAB search path.
l Open the Simulink model.
l Start the (optional) post-load script.
l Check if all parameters are available as workspace variables.
l Replace the in/out ports in accordance to the In/Out mapping.
l Start a simulation with a subset size of the data.
l Read the output values.
Possible errors are reported. If the test is successful, a success message is dis-played. The Simulink model is now ready for optimization.
Before you can use a model for the optimization, you need to make it available inthe function.
Using a Simulink model
Before you can use a model for the optimization, you need to make it available inthe function. Proceed as follows:
1. In the navigation, click on Function.
The Function pane opens.
2. Add a new node (see the online help for details).
The Simulink models are available in the "Nodes"area of the "Edit Node" window.
ETAS 4 Tutorial: Working with ETAS ASCMO MOCA
73 User's Guide
3. Insert the model in the expression.
The expression is set to %Torque%(Speed,Rel_Airmass, Ignition). In addition, thename Torque_mdl is entered in the "NodeName" field.
4. If desired, validate the node.
5. Click onOK.
The node for the model is added to the "Main Func-tion Nodes" table.
For the model output, another node namedTorque_mdl.torque_Simulink_Model iscreated.
6. If desired, create more function nodes.
See "Step 4: Build Up the Function" on page 76 formore information.
If you are using a Simulink model with multiple outputs, one function node is cre-ated for each model output. These nodes can be used in optimization criteria andexpressions.
4 Tutorial: Working with ETAS ASCMO MOCA ETAS
User's Guide 74
The default notation used in the "Main Function Nodes" table is marked in Fig. 22.The notation used in previous versions of ASCMO MOCA (nodes Torque*_5.0in Fig. 22) remains valid.
Fig. 22: Notation for a Simulink model with multiple outputs
Tip
An implementation of ASCMO MOCA using a Simulink model with several out-puts can be found in the example project Torque_Exten-dedSimulinkExample.moca in the <installation>1.
\Example\Moca directory.
Optimizing a Simulink model
1. In the navigation pane, click onOptimization.
2. UnderOptimization Criteria, select the
1. <installation> is the installation directory. By default, <installation>= C:\Program Files\ETAS\ASCMO 5.1.
ETAS 4 Tutorial: Working with ETAS ASCMO MOCA
75 User's Guide
optimization criteria that are based on the outputs.
3. Click on the Optimize button.
The optimization of the Simulink model is started.Information about the optimization can be found inthe Log window (for example on iterations, RMSE).The resulting RSME is shown below each optim-ization criterion.
4 Tutorial: Working with ETAS ASCMO MOCA ETAS
User's Guide 76
4.6 Step 4: Build Up the Function
Fig. 23: Main working window of step 4: Function pane
After reading the measuring data and checking the plausibility, you can start to setup the function for the torque sensor that will be modeled during the tutorial. Theavailable operators are described in section "Mathematical Operators for FunctionNodes" on page 32.
NOTICE
If you extend the data range and limits of the function parameters beyond thevalid range of your system (e.g., a test bench), the system can become over-loaded and damaged, when using the exported parameters in the system.
Always ensure that the limits and ranges in MOCA match the limits and rangesof your system before exporting the parameters.
If you want to perform a specific calibration and optimization task, these valuesare required knowledge.
4.6.1 Modeling the Function
In the tutorial you will build the following function of the physical "engine torque"model.
ETAS 4 Tutorial: Working with ETAS ASCMO MOCA
77 User's Guide
Fig. 24: Structure of the function to be modeled
Tip
Functions are always set up from left to right.
The model function shown in Fig. 24 on page 77 contains the following inputs:
l 1 - Speed
l 2 - Rel_Airmass
l 3 - Ignition
In addition to the inputs, you have imported the measured model output Torque_Meas in step 1 (see "Step 1: Data Import" on page 45). These values will be usedas reference for the optimization, for minimizing the deviation between the meas-ured values and the function prediction TorquePredict.
Adding the first node
To insert the first node trqOpt, proceed as follows.
1. Do one of the following:
In the "Main Function Nodes" table, click onthe New entry.
Click on Insert Node.
The "Edit Node" window opens. All data channelsyou imported are listed in the "Data" area.
4 Tutorial: Working with ETAS ASCMO MOCA ETAS
User's Guide 78
Fig. 25: "Edit Node" window
2. In the "Node Name" field, enter the nametrqOpt.
3. If desired, enter a unit.
The unit has no influence on the calibration of theparameter and is only visualized for support.
4. Create a parameter Map_Opt_Torque asdescribed in "Creating a new parameter" on page79.
5. Specify the expression for the function node.
a. In the "Parameter" area, select the para-meter Map_Opt_Torque.
b. Click on the button.
The parameter is added to the "Expression"field.
c. Click onValidate to check the validity ofthe new node.
6. Click onOK to add the node and close the "EditNode" window.
The node is displayed in the first row of the "Func-tion Nodes" table.
ETAS 4 Tutorial: Working with ETAS ASCMO MOCA
79 User's Guide
Creating a new parameter
To create the MapOptTorque parameter, proceed as follows.
1. In the "Edit Node" window, click on the Create but-ton below the "Parameter" area.
The "Create Parameter" window opens.
2. Enter the parameter information.
For MapOptTorque, use the following values:
Parameter Name: MapOptTorque
Parameter Type: Map
Z-Value Bounds: 0 - 500
X-Input: Speed
Y-Input: Rel_Airmass
Breakpoints X: Begin/End; Begin = 500;End = 6000; Count = 6
Breakpoints Y: Begin/End; Begin = 10;End = 90; Count = 6
Extrapolation: Clip
Tip
If you click onUse Range, the values range of theX and Y axes are automatically set to the minimalandmaximal value of the channel.
3. Click onOK.
The parameter is created. It appears in the "Para-meter" area.
Next, you create and set up the node ignOpt.
4 Tutorial: Working with ETAS ASCMO MOCA ETAS
User's Guide 80
Adding and editing the node ignOpt
To add and edit the second node ignOpt, proceed as follows:
1. Open the "Edit Node" window.
2. Enter the node name ignOpt.
For this node you need a parameter MapOptIg-nition.
3. Create the parameter MapOptIgnition (see"Creating a new parameter" on page 79) with thefollowing values:
Parameter Name: MapOptIgnition
Parameter Type: Map
Z-Value Bounds: 0 - 60
X-Input: Speed
Y-Input: Rel_Airmass
Breakpoints X: Begin/End; Begin = 500;End = 6000; Count = 6
Breakpoints Y: Begin/End; Begin = 10;End = 90; Count = 6
Extrapolation: Clip
4. Specify the following expression for the functionnode:
5. Check the validity of the new node.
6. Click onOK to add the node and close the "EditNode" window.
Next, you create and set up the node deltaSpark.
Adding and editing the node deltaSpark
To add and edit the third node deltaSpark, proceed as follows:
1. Open the "Edit Node" window.
2. Enter the node name deltaSpark.
For this node you need the node ignOpt and theinput Ignition.
3. In the "Node" area, select ignOpt and click on
.
ETAS 4 Tutorial: Working with ETAS ASCMO MOCA
81 User's Guide
The ignOpt node is added to the "Expression"field.
4. Click on to add a subtraction operator.
5. In the "Data" area, select Ignition and click on
.
The Ignition channel is added to the "Expres-sion" field.
6. Make sure that the expression looks as follows:
7. Check the validity of the new node.
8. Click onOK to add the node and close the "EditNode" window.
Next, you create and set up the node etaSpark.
Adding and editing the node etaSpark
To add and edit the fourth node etaSpark, proceed as follows:
1. Open the "Edit Node" window.
2. Enter the node name etaSpark.
For this node you need a parameterCurveEtaDeltaSpark.
3. Create the parameter CurveEtaDeltaSpark(see "Creating a new parameter" on page 79) withthe following values:
Parameter Name: CurveEtaDeltaSpark
Parameter Type: Curve
Z-Value Bounds: 0 - 1
X-Input: deltaSpark
Breakpoints X: Begin/End; Begin = -10;End = 55; Count = 10
Extrapolation: Clip
4. Specify the following expression for the functionnode:
5. Check the validity of the new node.
4 Tutorial: Working with ETAS ASCMO MOCA ETAS
User's Guide 82
6. Click onOK to add the node and close the "EditNode" window.
Next, you create and set up the node product.
Adding and editing the node product
To add and edit the fifth node product, proceed as follows:
1. Open the "Edit Node" window.
2. Enter the node name product.
For this node you need the nodes trqOpt andetaSpark.
3. In the "Node" area, select trqOpt and click on
.
The trqOpt node is added to the "Expression"field.
4. Click on to add a multiplication operator.
5. Add the etaSpark node to the expression.
6. Make sure that the expression looks as follows:
7. Check the validity of the new node.
8. Click onOK to add the node and close the "EditNode" window.
Next, you create and set up the node dragTorque.
Adding and editing the node dragTorque
To add and edit the sixth node dragTorque, proceed as follows:
1. Open the "Edit Node" window.
2. Enter the node name dragTorque.
For this node you need a parameterMapDragTorque.
3. Create the parameter MapDragTorque (see"Creating a new parameter" on page 79) with thefollowing values:
ETAS 4 Tutorial: Working with ETAS ASCMO MOCA
83 User's Guide
Parameter Name: MapDragTorque
Parameter Type: Map
Z-Value Bounds: 0 - 100
X-Input: Speed
Y-Input: Rel_Airmass
Breakpoints X: Begin/End; Begin = 500;End = 6000; Count = 6
Breakpoints X: Begin/End; Begin = 10;End = 90; Count = 6
Extrapolation: Clip
4. Specify the following expression for the functionnode:
5. Check the validity of the new node.
6. Click onOK to add the node and close the "EditNode" window.
Next, you create and set up the node TorquePredict.
Adding and editing the node TorquePredict
To add and edit the last node TorquePredict, proceed as follows:
1. Open the "Edit Node" window.
2. Enter the node name TorquePredict.
For this node you need the nodes product anddragTorque.
3. In the "Node" area, select product and click on
.
The product node is added to the "Expression"field.
4. Add a subtraction operator.
5. Add the etaSpark node to the expression.
6. Make sure that the expression looks as follows:
7. Check the validity of the new node.
4 Tutorial: Working with ETAS ASCMO MOCA ETAS
User's Guide 84
8. Click onOK to add the node and close the "EditNode" window.
After adding the node TorquePredict, the creation of the function to be optim-ized as a representation of the physical torque model is finished. The "FunctionNodes" table should look like this:
Tip
If you activate the Edit Mode option in the main working window (Fig. 23 onpage 76), you can change the elements of the function directly in the "FunctionNodes" table. The names of data, parameters and nodes are markedwith%.
In the next step (see "Step 5: Parameters" on page 85) you have the possibility tocheck and edit the created parameters, if appropriate.
ETAS 4 Tutorial: Working with ETAS ASCMO MOCA
85 User's Guide
4.7 Step 5: Parameters
Fig. 26: Main working window for Step 5: Parameters pane
This step allows you to check and possibly adapt the parameters. Only the ref-erence parameters will be visualized, but not the optimized parameters. You canset the optimized parameters as (new) reference in the Optimization step.
In addition, you can display the reference and the current map during the optim-ization and visualize the data points in maps and curves.
Also you have the possibility to fix individual grid points and to lock them for theoptimization.
Further information about how to create and edit a parameter is given in "Step 4:Build Up the Function" on page 76.
Tip
In this tutorial, the parameters are already defined, so you can skip this step andcontinue with the optimization (see "Step 6: Optimization" on page 86).
4 Tutorial: Working with ETAS ASCMO MOCA ETAS
User's Guide 86
4.8 Step 6: Optimization
Fig. 27: Main working window for Step 6: Optimization pane
Before starting with the optimization, you have to make different settings that influ-ence the optimization. After that, you can finally start the optimization.
These settings are:
OptimizationAlgorithm
See "Description of the Optimization Method" on page38.
Number of Iter-ations
The number <i> of optimization steps. A higher numberresults in better optimization results, but requires moretime. Should the optimizer converge before reaching thetotal number of <i> iterations, the optimizer stops earlier.
Tolerance/Accuracy Defines the limit of the accuracy at which the optimizerends up before reaching the maximum number of iter-ations.
Multistart Defines the number <n> of optimization runs. A highernumber results in better optimization results, but requiresmore time. Should the optimizer converge before the endof the <n>th optimization run, the optimizer stops earlier.
If, e.g., you set the number of iterations to 10 and theMultistart value to 5, the total max. number of iterationsis 50.
Tab. 4: Optimization options
Tip
The above listed criteria and limits have to be adapted for the specific problem,such that a satisfactory minimal deviation ( see "The Variables RMSE and R2" onpage 29) between the measured data and the function prediction can be reachedby optimization.
ETAS 4 Tutorial: Working with ETAS ASCMO MOCA
87 User's Guide
Preparing the optimization
In the "Optimization Options" area, you specify several parameters; see Tab. 4 onpage 86.
In the "Optimization Criteria" area, you specify the optimization target. You selecta function node in the first combo box and a data channel (or '0') in the secondcombo box. The optimizer will then try to find a set of parameter values that min-imizes the quadratic deviation of those two quantities.
The "Local Hard Constraints" area is not used in this tutorial.
1. In the "Optimization Options" area, do the fol-lowing:
a. In the "Number of Iterations" field (cf. Fig.27 on page 86), enter a number of 40 iter-ations.
b. If desired, increase the number in the"Multistart" field.
2. In the "Optimization Criteria" area, do the fol-lowing:
a. In the first combo box, select the functionoutput TorquePredict.
b. In the second combo box, select the impor-ted data channel Torque_Meas.
The flat parameters results in a high RMSE(see "The Variables RMSE and R2" on page29). After the first optimization, the RMSEwill be significantly reduced.
Note that you have the possibility to define a sum of
such optimization criteria using the Add a newOptimization criterium button.
Performing the optimization
Once you have finished the preparations, start the optimization.
1. Click onOptimize.
The optimizer starts with the optimization of theparameters. Information about the optimization canbe found in the Log window (for example on iter-
4 Tutorial: Working with ETAS ASCMO MOCA ETAS
User's Guide 88
ations, RMSE). The resulting RSME is shown belowthe optimization criterion. The visualization of themaps is adjusted accordingly.
The optimization in this tutorial is now finished. Some optional activities in the"Optimization" step are described in the online help, section "Instructions (Optim-ization Step)".
In the following step (see "Step 7: Export " on page 88), the optimized parameterswill be exported for further processing.
4.9 Step 7: ExportIn this step, you will export the created and optimized parameters. The parameterscan be exported in several file formats, and the project can be saved for theruntime environment ETAS ASCMO MOCA Runtime with limited functionality.
Exporting the parameters
1. In the "Optimization" window, click on the Exportbutton.
The "Export Parameters" window opens.
2. In that window, enter or select path and name ofthe export file.
3. In the "Save as type" combo box, select the exportformat.
Available formats
l DCM files (*.dcm)
l INCA comma-separated Values (*.csv)
l Calibration data files (*.cdfx)
ETAS 4 Tutorial: Working with ETAS ASCMO MOCA
89 User's Guide
l M-script (*.m)
4. Click on Save.
The parameters will be exported to a file in theselected format.
Exporting the project for ETAS ASCMO MOCA Runtime
1. In the main menu, select File → Export toMOCA-Runtime.
You are asked if you want to show or hide theoptimization sequence in the exported project. Seealso "Optimization With a Sequence" on page 41.
If you decide to show the sequence, you can seeand edit it in ASCMO MOCA Runtime.
2. Click onHide or Show to continue.
The "Export MOCA project to MOCA-Runtime"window opens.
3. Enter the file name and the file directory.
4. Click on Save.
The project is saved forETAS ASCMO MOCA Runtime.
Tip
For the runtime environment export, the *.moca_runtime format is used.
5 ETAS Contact Addresses ETAS
User's Guide 90
5 ETAS Contact Addresses
ETAS HQ
ETAS GmbH
Borsigstraße 24 Phone: +49 711 3423-0
70469 Stuttgart Fax: +49 711 3423-2106
Germany WWW: www.etas.com
ETAS Subsidiaries and Technical Support
For details of your local sales office as well as your local technical support teamand product hotlines, take a look at the ETAS website:
ETAS subsidiaries: WWW: www.etas.com/en/contact.php
ETAS technical support: WWW: www.etas.com/en/hotlines.php
Figures
Fig. 1: The main user interface elements of ETAS ASCMO MOCA 20
Fig. 2: Information in the log window (example; a: link to the online help, b: link to thePDF manual) 23
Fig. 3: The "All Data" window 24
Fig. 4: The "Data and Nodes" window 25
Fig. 5: The "Histogram" window 27
Fig. 6: The "Residuals over Inputs" window 28
Fig. 7: The "Measured vs. Predicted" window 29
Fig. 8: "Create Parameter" or "Edit Parameter" window for scalar, curve, map, Cube-3Dand Cube-4D parameters (a: available for curve, map, Cube-3D and Cube-4D para-meters, b: available for map, Cube-3D and Cube-4D parameters, c: available for Cube-3Dand Cube-4D parameters, d: available for Cube-4D parameters) 35
Fig. 9: "Parameter optimization properties" window 40
Fig. 10: ETAS ASCMO MOCA start window 44
Fig. 11: View after the start of ETAS ASCMO MOCA 45
Fig. 12: Main working window for Step 1: Data pane 46
Fig. 13: "MOCA Data Import" window 47
Fig. 14: Main working window for Step 3: Models pane 64
Fig. 15: Main working area with additional options 65
Fig. 16: Table data and breakpoints from Simulink map 67
Fig. 17: "Scan Model <model_name> for Parameter Mapping" window 67
Fig. 18: "Scan Model <model_name> for Inputs" window 69
Fig. 19: Mapping of the Simulink inputs 70
Figures ETAS
User's Guide 91
Fig. 20: "Scan Model <model_name> for Outputs" window 71
Fig. 21: Mapping of the Simulink outputs 71
Fig. 22: Notation for a Simulink model with multiple outputs 74
Fig. 23: Main working window of step 4: Function pane 76
Fig. 24: Structure of the function to be modeled 77
Fig. 25: "Edit Node" window 78
Fig. 26: Main working window for Step 5: Parameters pane 85
Fig. 27: Main working window for Step 6: Optimization pane 86
ETAS Glossary
92 User's Guide
Formulas
Equ. 1: Root Mean Squared Error (RMSE) 29
Equ. 2: Sum of Squared Residuals (SSR) 30
Equ. 3: Coefficient of determination R2 30
Equ. 4: Total Sum of Squares (SST) 30
Equ. 5: Optimization method 38
Equ. 6: Roughness r of a curve 39
Equ. 7: Roughness of a map 39
Equ. 8: Smoothness factor Si 39
Formulas ETAS
User's Guide 93
Index ETAS
User's Guide I
Index
C
CharacteristicRMSE 29
Compressed model 37Concept 17
assessment of input data 23parameter optimization 33
Configuration fileload 51save 51
D
Datafilter 58remove NaN 57sort 59
Data analysis 60Data point
activate/deactivate 55delete 60edit 57set weight 56weight 55
Data qualityassessment 24improvement 24
Data set See also Measurementdatadelete 55load multiple 54multiple 53weight 56
E
Error Analysisabsolute 25data 25function node 25relative 25Residual Analysis 25studentized 25
ETAS Contact Addresses 90
F
Fields of application 17ASCMO MOCA 18
ASCMO MOCA Runtime 18Filter data 58Formulas 93Function
add node 77create 76mathematical operators 32structure 76
Function evaluationR^2 30RMSE 31
Function variablechange name 52delete mapping 53map measurement
channel 52
I
Import 45display data 47load configuration 51measurement data 45save configuration 51start 51
Input dataassessment 23improvement 23
Installation 10directories 15files 15license agreement 11path specification 12preparation 10start 11system requirements 10uninstall MOCA 16user privileges 11
L
Licensing 15Log file
save 23
M
Matlab/Simulinkselect version 65
ETAS Index
II User's Guide
Measurement data See also Datasetdelete channel 60delete mapping to
variable 53import 51map channel to variable 52plausibility check 47requirements 43
Measurement fileformat 43load 46
Methods 17MOCA
start 44uninstall 16
MOCA RuntimeExport to 89
Models 31add Simulink model 65ASCET 31ASCMO Dynamic 31ASCMO Static 31map parameters 66-67map Simulink inputs 69map Simulink outputs 71Simulink 64
N
Nodesadd 77Mathematical operators 32
O
Optimization 38, 40, 86Parameter 33Simulink model 74with sequence 41
Optimization criterion 39Optimization method
Description 38Outlier
delete 63
P
Parameter optimization 33
Parameters 333D cube 374D cube 37check 85compressed model 37create 79curve 36edit 85export 88lookup-table 35map 35map to Simulink
parameters 67matrix 37scalar 37types 34
Plausibility check 47
Q
QualityEvaluation 30
R
R^2 29-30RMSE 29Root Mean Square Error 29Roughness 39
of a curve 39of a map 39
S
Safety Advice 6Scatter plot
select axes 61Sequence
for optimization 41, 89Simulink model
add 65optimize 74
Sort data 59Start MOCA 44System constant 38
T
Toolbar 20Tutorial 42
create function 76
Index ETAS
User's Guide III
data analysis 60data import 45measurement data 43models 64
U
User interfaceLog window 23main elements 20navigation pane 21toolbar 20
V
Variable See Function variable
W
Weightdata point 55data set 56
Working stepscreate function 76data analysis 60data import 45Exporting parameters 88models 64Parameter optimization 86
ETAS Index
IV User's Guide