fitTires: Main Tire Fitting Function

Description Usage Arguments Details Value Examples

View source: R/fitting.R

Description

Creates a summary of coefficients and meta data of each data file passed in the through the svRunPaths argument.

Usage

1
fitTires(svRunPaths = NULL, svRunNames = NULL, sSummaryExportFolder = NA)

Arguments

svRunPaths

optional string vector. Defaults to NULL. Complete file path of a tire raw data file. 'NULL“ opens a file dialog box for the user to select files.

svRunNames

optional string vector. Defaults to NULL. String vector the same length as svRunPaths. Run names for your future reference. Used as titles for plots. Also gets recorded in summary table. Default NULL uses the end of the file name.

sSummaryExportFolder

string. Defaults to NA. Folder to export the results summary of all of the fit data. NA opens a folder selection window. NULL does not save. Suggested to use getwd() to save to the working directory.

Details

Opens each raw data file using readTireData (or a similar function if the option tirefittingr.sfReadTireFile is defined), then applies the preprocess function defined in getOption("tirefittingr.sfPreProcess"). Using DEoptim::DEoptim(), a differential evolution optimization algorithm, the starting population of parameters evolves to find those that best represent the data. In post-processing, a comparison of the fitted curve to the data is plotted.

To use presets, run setFYPure2002(), setFYMF52(), setFXPure2002.wIA(), setFXPure2002.NoIA(), or setFXMF52() before running fitTires(). See ?setFYPure2002 etc for more info. Manually set with options("tirefittingr.exampleOption" = value). Use ?options for more info. To find out what an option is currently set as use getOption("tirefittingr.exampleOption").

tirefittingr.coldCutoffTemp

numeric. defaults to -Inf Used for removing the warmup from the start of a dataset. All data collected before the tires reach this temperature will be ignored.

tirefittingr.iDataPoints

integer. defaults to 4000. Number of data points to use. Data will randomly sampled down to this many data point to speed up solve time.

tirefittingr.iEvolIterMax

integer. defaults to 300. Maximum number of iterations of the solver.

tirefittingr.bFilterSAFromLongitudinal

logical. defaults to TRUE. When preprocessing data for an FX fit, should the data be filtered so that only datapoints with -1 < SA < 1 be left?

tirefittingr.sfFittingFunction

string. The name of the fitting function to use. Pre-installed options are 'FYPurePacejka2002', 'FYPureMF52', 'FXPureMF52', 'FXPurePacejka2002.NoIA', and 'FXPurePacejka2002.wIA'.

tirefittingr.iParallelCores

integer. defaults to 1. Number of cores to use. Assign NA to detect how many cores are available

tirefittingr.sfPlot

string of a function name. A plotting function to run after fitting to check quality of fit. Pre-installed options are 'fFYPlot', 'fFXPlot'.

tirefittingr.bPlotRunConditions

logical. defaults to TRUE. TRUE also plots the run conditions.

tirefittingr.sfPreProcess

string of a function name. A preprocessing function to apply to the data before fitting. Pre-installed options are 'FYPre', 'FXPre'.

tirefittingr.sfReadTireFile

string of a function name. Defaults to 'readTTCData'. Pre-installed options are 'readTTCData' and 'readCSVTireData'. Make your own by writing a wrapper function for readTireData. The function must have one argument that is the full path name of a raw data file, and must output a data frame. See readTTCData.

tirefittingr.sSavePlotPath

string. defaults to FALSE. Entire path of location to save the plot. FALSE displays them in the RStudio graphics window.

tirefittingr.sdfStartPop

string of the name of a data frame. A data frame of the starting population of Pacejka coefficients. Pre-installed options are 'dfStartParFY', and 'dfStartParFX'.

tirefittingr.verbose

logical. Defaults to TRUE. False suppresses most messages.

Value

data frame. Summary of each raw data file that was fit along with parameters in alphabetical order.

Examples

1
2
3
4
5
6
options("tirefittingr.iParallelCores" = 2)
setFYPure2002() # setFXPure2002.wIA()
## Not run: 
dfFitSummary = fitTires()

## End(Not run)

fsaer/tirefittingr documentation built on May 15, 2020, 9:31 a.m.