Main Content

plot

R2026b

Class: tireModel

Plot response of tire models

Since R2023b

Description

Add-On Required: This feature requires the Extended Tire Features for Vehicle Dynamics Blockset add-on.

plot(obj) plots tire model response based on the model specified by obj.

example

plot(___,Name=Value) plots tire model response with additional options specified by one or more Name=Value arguments.

Input Arguments

expand all

Tire model, specified as a tireModel object or an array of tireModel objects.

Name-Value Arguments

expand all

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: plot(model,Direction="kappa",Magnitude=0.5,Fz=[2000;3000;4000;5000;6000],IP=220,gamma=0)

The available name-value arguments depend on whether you plot tire model response defining sweep direction or using a tireData object.

Parent container or axes in which to draw the plot, specified as an axes, figure, panel, or tab object. If you do not specify Parent, a new figure is created.

Note

If you specify Data without specifying DataVariableNames, the parent must be a valid tab container if you are generating a tabbed plot.

Data channels to plot, specified as a vector. DataVariableNames must be a data channel property of a tireData object.

  • If one variable name is passed, the variable is set as the y-axis channel, and the x-coordinate is defined as 1:length(Y).

  • If two variable names are passed, the order is [x-axis variable, y-axis variable].

  • If three variables names are passed, the order is [x-axis variable, y-axis variable, z-axis variable].

Note

If you specify the argument Direction without specifying the argument DataVariableNames, the x-axis is set to the direction you define, and the y-axis is auto set to the appropriate data channel for that sweep direction. If you specify the argument Data without specifying the argument DataVariableNames, an autoplot function executes and generates the most relevant plots.

Example: DataVariableNames=["kappa";"Fx"]

Dependencies

To specify this option, you must also specify one of these combinations of options:

Data Types: string

Color by value to differentiate how the tire model response lines are plotted.

Note

If the ColorBy value is a data channel, ColorByScheme is specified as "Legend", and Data is specified, the mean value for each tireData object is used to differentiate the color groups.

Example: ColorBy="Fz"

Dependencies

To specify this option, you must also specify one of these combinations of options:

Data Types: string

Option to plot the ColorBy argument using a legend or a gradient, specified as "Legend" or "Colorbar".

Example: ColorByScheme = "Colorbar"

Dependencies

To specify this option, you must also specify one of these combinations of options:

Data Types: string

Plot Tire Model Response Defining Sweep Direction

expand all

Sweep direction, specified as one of these values:

  • "alpha"

  • "gamma"

  • "kappa"

  • "Fz"

Example: Direction="alpha"

Dependencies

To specify this option, do not specify Data. If you specify Data, the resulting plot ignores the inputs to Direction.

Data Types: string

Sweep magnitude specified as a scalar or 2-by-1 vector.

Note

If you do not specify Magnitude with Direction, the sweep magnitude is assigned the values from the minimum and maximum sweep direction of the model.

Example: Magnitude=[-0.25;0.35]

Dependencies

To specify this option, you must also specify Direction. If you specify Data, the resulting plot ignores the inputs to Magnitude.

Normal force, specified as a scalar or column vector, in N. If you specify a scalar, the magnitude of the sweep is set to the +/- of the input value. The magnitude range cannot be zero.

Example: Fz=[2000;3000;4000;5000;6000]

Dependencies

To specify this option, you must also specify Direction. If you specify Data, the resulting plot ignores the inputs to Fz.

Data Types: double

Inflation pressure, specified as a column vector, in kPa.

Example: IP=220

Dependencies

To specify this option, you must also specify Direction. If you specify Data, the resulting plot ignores the inputs to IP.

Data Types: double

Slip angle, specified as a column vector, in rad.

Example: alpha=0.1

Dependencies

To specify this option, you must also specify Direction. If you specify Data, the resulting plot ignores the inputs to alpha.

Data Types: double

Inclination angle, specified as a column vector, in rad.

Example: gamma=0

Dependencies

To specify this option, you must also specify Direction. If you specify Data, the resulting plot ignores the inputs to gamma.

Data Types: double

Longitudinal slip, specified as a column vector, dimensionless.

Example: kappa=0

Dependencies

To specify this option, you must also specify Direction. If you specify Data, the resulting plot ignores the inputs to kappa.

Data Types: double

Turn slip velocity, specified as a column vector, in rad/s.

Example: psidot=0

Dependencies

To specify this option, you must also specify Direction. If you specify Data, the resulting plot ignores the inputs to psidot.

Data Types: double

Longitudinal velocity, specified as a column vector, in m/s.

Example: Vx=16.7

Dependencies

To specify this option, you must also specify Direction. If you specify Data, the resulting plot ignores the inputs to Vx.

Data Types: double

Plot Tire Model Response Using tireData Object

expand all

Tire measurement data used as input conditions for the tire model, specified as a tireData object or an array of tireData objects. The tireData measured data and the tireModel simulated data are overlaid on the same plot.

Example: Data=td(1:8)

Option to specify fit type, specified as one of these values:

  • "Fx Pure"

  • "Fy Pure"

  • "Fx Combined"

  • "Fy Combined"

  • "Mz Pure"

  • "Mz Combined"

  • "Mx"

  • "My"

Example: FitType="Fx Pure"

Data Types: string

Plot options

expand all

Since R2026b

Plot axis unit scaling, specified as one of these options:

  • "auto" — the software automatically determines the appropriate unit independently per-axis from data magnitude

  • "base" — no scaling

  • string array — per-axis target units; the length of the array must match the length of DataVariableNames

Example: Units=["deg","kN"]

Data Types: string

Since R2026a

Option to display or hide plot grid lines specified as one of these options:

  • "off" — hide grid lines

  • "on" — display major grid lines

  • "minor" — display minor grid lines

Example: Grid="on"

Since R2026b

Title display format, specified as one of these options:

  • "long" — displays full channel labels with units; default for single-axis plots

  • "short" — displays short channel names; default for 2 x 2 plot layouts and when DataVariableNames is not specified

  • "none" — suppresses the title

Example: TitleFormat="short"

Data Types: string

Examples

expand all

Use the tireModel class and the plot method to visually inspect tire model responses without tire data. First, create a tire model object. A tire model object can be created from imported parameters, default tire model type parameters, or built-in model parameters. This example uses the built-in "Mid-size passenger car 235/45R18" model. Then, specify arguments in the plot method to customize different plot views.

This example requires the Extended Tire Features for Vehicle Dynamics Blockset™ support package. See Install Support Package.

Note that all built-in models are Magic Formula 6.2 tire type models.

Create Tire Model from Built-In Model

Create the tireModel object tm from the built-in model, "Mid-size passenger car 235/45R18".

tm = tireModel.builtin("Mid-size passenger car 235/45R18");

Display the result using disp.

Autoplot Tire Data

To create a generic tiled plot with common sweep data, plot tire model tm with no additional input arguments. Slip conditions, except for the sweep direction, are set to zero. The normal force Fz conditions are equally spaced between the defined minimum FZMIN and maximum FZMAX wheel load of the model. All other operating conditions are set to the nominal or estimated conditions of the model.

plot(tm);

Figure contains 4 axes objects. Axes object 1 with title Fy vs alpha, xlabel Slip angle [rad], ylabel Lateral force [kN] contains 5 objects of type line. These objects represent 100, 2225, 4350, 6475, 8600. Axes object 2 with title Mz vs alpha, xlabel Slip angle [rad], ylabel Self-aligning moment [Nm] contains 5 objects of type line. These objects represent 100, 2225, 4350, 6475, 8600. Axes object 3 with title Fx vs kappa, xlabel Longitudinal slip [], ylabel Longitudinal force [kN] contains 5 objects of type line. These objects represent 100, 2225, 4350, 6475, 8600. Axes object 4 with title Fx vs Fy, xlabel Lateral force [kN], ylabel Longitudinal force [kN] contains 25 objects of type line. These objects represent 100, 2225, 4350, 6475, 8600.

Plot Tire Model Response

The optional input arguments Direction and Magnitude define the slip direction to plot. Provide additional input arguments, such as the normal force Fz, inflation pressure IP, and inclination angle gamma, to further define model operating conditions.

Define Sweep Direction

Specify the input argument Direction as alpha to plot the lateral force versus the slip angle, using the slip angle as the sweep direction.

Note that when the magnitude is not explicitly defined, the magnitude is set to the minimum and maximum values for that slip direction in the model. The varying steady-state condition sets Fz equally spaced according to the FZMIN and FZMAX values for the model. The y-axis is set to an appropriate data channel for the defined slip direction.

plot(tm,Direction="alpha");

Figure contains an axes object. The axes object with title Lateral force [kN] vs Slip angle [rad], xlabel Slip angle [rad], ylabel Lateral force [kN] contains 5 objects of type line. These objects represent 100, 2225, 4350, 6475, 8600.

Define Magnitude

Specify the input arguments Direction and Magnitude to plot the lateral force versus slip angle, with the slip angle defined as the sweep direction with a range of -0.35 to 0.35.

Note that Magnitude must be a scalar or vector of length two. If a scalar is provided, the sweep magnitude is +/- of that value.

plot(tm,Direction="alpha",Magnitude=0.35);

Figure contains an axes object. The axes object with title Lateral force [kN] vs Slip angle [rad], xlabel Slip angle [rad], ylabel Lateral force [kN] contains 5 objects of type line. These objects represent 100, 2225, 4350, 6475, 8600.

Define Operating Conditions

To plot the lateral force versus slip angle, specify the input arguments Direction and Magnitude. Specify the input arguments Fz, IP, and gamma to define operating conditions. If a data channel is an array, each value in the array is set, and the plot uses the data channel as the ColorBy value to assign colors and legend values to the plot. If the data channel is set as the direction and the data channel is also defined, the data channel value is ignored.

plot(tm,Direction="alpha",Magnitude=0.35, ...
Fz=[2000,3000,4000,5000,6000],IP=220000,gamma=0);

Figure contains an axes object. The axes object with title Lateral force [kN] vs Slip angle [rad], xlabel Slip angle [rad], ylabel Lateral force [kN] contains 5 objects of type line. These objects represent 2000, 3000, 4000, 5000, 6000.

Define Data Channels to Plot

Specifying the input argument DataVariableNames, plot the self-aligning moment versus the slip angle in the direction of the slip angle. Additionally, specify the operating conditions for Magnitude, Fz, IP, and gamma.

plot(tm,DataVariableNames=["alpha","Mz"], ...
Direction="alpha",Magnitude=0.35, ...
Fz=[2000,3000,4000,5000,6000],IP=220000,gamma=0);

Figure contains an axes object. The axes object with title Self-aligning moment [Nm] vs Slip angle [rad], xlabel Slip angle [rad], ylabel Self-aligning moment [Nm] contains 5 objects of type line. These objects represent 2000, 3000, 4000, 5000, 6000.

Version History

Introduced in R2023b

expand all

See Also