fit
Class: tireModel
Optimize model parameter values to achieve model best fit to the input data
Since R2023b
Syntax
Description
This method requires Extended Tire Features for Vehicle Dynamics Blockset and Optimization Toolbox™.
[
          fits a tire model with additional options specified by one or more
            fitObj,diffTable,errorStat,optimOutput,H]=fit(obj,data,fitType,Name=Value)Name=Value arguments.
Input Arguments
Tire model to fit, specified as a tireModel object.
Example: fit(tm,td,"Limits") specifies the tire model
              tm to fit.
Tire data, specified as an array of tireData objects.
Example: fit(tm,td,"Limits") specifies the tire data
              td to use for fitting.
Fit type, specified as one of the values listed in this table.
Note
The order in which parameters are fit is important. If you fit a set of parameters that have a dependency to another parameter set, do not refit the upstream parameter set without refitting the parameter set with the dependency. Refer to the table for dependencies between parameters.
| Fit type | Description | Dependency | Recommended Data | Applicable Tire Model Type | 
|---|---|---|---|---|
  | Revises these  
 fitObj.UNLOADED_RADIUS = data.OverallDiameter / 2 
 
 fitObj.WIDTH = data.SectionWidth / 1000 
 
 fitObj.ASPECT_RATIO = data.AspectRatio / 100 
 
 fitObj.RIM_RADIUS = data.RimDiameter / 2 * 0.0254 
 
 fitObj.RIM_WIDTH = data.RimWidth * 0.0254 
 These optional input arguments are ignored when you specify
                           
  | Not applicable | Not applicable | 
 
 
  | 
  | Sets model saturation limits to the maximum and minimum values from
                        the  These optional input arguments are ignored when you
                        specify  
 
  | Not applicable | Not applicable | 
 
 
  | 
  | Fit longitudinal force response  | 
  | Longitudinal slip sweep at zero degrees slip angle  | 
 
 
  | 
  | Fit lateral force response  | 
  | Slip angle sweep at free rolling  | 
 
 
  | 
  | Fit combined longitudinal force response  | 
 
  | Longitudinal slip sweep at non zero degrees slip angle  | 
 
 
  | 
  | Fit combined lateral force response  | 
 
  | Longitudinal slip sweep at non zero degrees slip angle  | 
 
 
  | 
  | Fit aligning torque response  | 
  | Slip angle sweep at free rolling  | 
 
 
  | 
  | Fit combined aligning torque response  | 
 
 
  | Longitudinal slip sweep at non zero degrees slip angle  | 
 
 
  | 
  | Fit overturning moment response  | All applicable   | Slip angle sweep at free rolling  | 
 
 
  | 
  | Fit rolling resistance response  | All applicable   | Longitudinal slip  | 
 
 
  | 
  | Fit loaded radius response  | All applicable   | Sweep varying normal loads at a constant velocity, or sweep varying velocities at a constant normal load.  | 
 
 
  | 
  | Fit effective rolling radius response  | 
  | Sweep varying normal loads at a constant velocity, or sweep varying velocities at a constant normal load.  | 
 
 
  | 
  | Fit longitudinal relaxation length response  | None  | Calculated relaxation lengths at varying normal loads  | 
 
 
  | 
  | Fit lateral relaxation length response  | None  | Calculated relaxation lengths at varying normal loads  | 
 
 
  | 
  | Fit contact patch width response  | 
  | Contact patch width data at varying normal loads  | 
 
 
  | 
  | Fit contact patch length  | 
  | Contact patch length data at varying normal loads  | 
 
 
  | 
Example: fit(tm,td,"Limits") specifies the
              fitType as "Limits".
Data Types: char | string
Name-Value Arguments
Specify optional pairs of arguments as
      Name1=Value1,...,NameN=ValueN, where Name is
      the argument name and Value is the corresponding value.
      Name-value arguments must appear after other arguments, but the order of the
      pairs does not matter.
    
Example: fit(tm,td,"Fy
        Pure",Solver="fminunc",PlotFit=true)
Model parameters to optimize, specified as a string vector.
Note
By default, if the Parameters argument is not specified,
                  the parameters to optimize are determined by the input tire model and fit
                  type.
Example: fit(tm,td,"My",Parameters=["QSY1","QSY3","QSY4","QSY7"])
Data Types: string
Fixed parameters, specified as a string vector.
Note
By default, if the FixedParameters argument is not
                  specified, the parameters to fix are determined by the input tire model and fit
                  type.
Example: fit(tm,td,"Fx
                Pure",FixedParameters=["PPX1","PPX2","PPX3","PPX4"])
Data Types: string
Lower bounds of the parameter optimization limit, specified as a scalar or a column vector.
Note
If you specify a vector, the length must equal the length of the parameter set being fitted.
Example: fit(tm,td,"Contact Patch
                Length",LowerBounds=[0.02,0.02],UpperBounds=[0.08,0.08])
Data Types: double
Upper bounds of the parameter optimization limit, specified as a scalar or a column vector.
Note
If you specify a vector, the length must equal the length of the parameter set being fitted.
Example: fit(tm,td,"Contact Patch
                Length",LowerBounds=[0.02,0.02],UpperBounds=[0.08,0.08])
Data Types: double
Weighting scheme, specified as a 1-D cell array.
Note
The 1-D cell array length must be the same length as the tire data input
                  array. Each cell of the array must be a numeric vector that is the same length as
                  the corresponding tireData object. Elements must be
                  nonnegative.
Example
Create a weighting scheme giving more weight to near-zero slip angle values.
weight=cell(length(td),1); for i=1:length(td) weight{i}=ones(length(td(i).alpha),1); weight{i}(abs(td(i).alpha)>0.01)=1; end model.fit(tm,td,"Fy Pure", Weight=weight);
Data Types: cell
Solver, specified as one of these values:
"fmincon""fminunc""fsolve""lsqnonlin"
Example: Solver="fsolve"
Data Types: string
Optimization options, specified as the output of optimoptions.
              Use this table to find the link to the options table for each solver.
| Solver | Link to Options Table | 
|---|---|
fmincon | options (Optimization Toolbox) | 
fminunc | options (Optimization Toolbox) | 
fsolve | options (Optimization Toolbox) | 
lsqnonlin | options (Optimization Toolbox) | 
Example: optimoptions="fmincon"
Option to plot model fit, specified as false or
                true.
Note
Data that is excluded from the model fit optimization as a result of the
                  specified value for Limits is represented in the resulting
                  plot with gray 'x' markers.
Example: PlotFit=true
Data Types: logical
Output Arguments
Fitted model, returned as a tireModel object.
Note
Only parameters specified in the Parameters argument or
                parameters selected by default have revised values.
Table of revised parameters, returned as a table object, with a row for each value changed.
Error statistics of the model fit, returned as a structure. The structure contains the error algorithm, the initial error before the fit, and the final error after the fit.
Information about the optimization process, returned as a structure. The returned structure fields depend on the selected solver. This table provides links to the fields returned for each solver.
| Solver | Link to Structure Fields | 
|---|---|
fmincon | output (Optimization Toolbox) | 
fminunc | output (Optimization Toolbox) | 
fsolve | output (Optimization Toolbox) | 
lsqnonlin | output (Optimization Toolbox) | 
Handle to axes, returned as an object handle.
Version History
Introduced in R2023bStarting from R2024b, you can specify fitType using these new options:
DimensionsLimitsRLReFx Relaxation LengthFy Relaxation LengthContact Patch WidthContact Patch Length
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
- América Latina (Español)
 - Canada (English)
 - United States (English)
 
ヨーロッパ
- Belgium (English)
 - Denmark (English)
 - Deutschland (Deutsch)
 - España (Español)
 - Finland (English)
 - France (Français)
 - Ireland (English)
 - Italia (Italiano)
 - Luxembourg (English)
 
- Netherlands (English)
 - Norway (English)
 - Österreich (Deutsch)
 - Portugal (English)
 - Sweden (English)
 - Switzerland
 - United Kingdom (English)