Main Content

set

Class: tireModel

Export tire model parameter values to supported Simulink or Simscape tire blocks

Since R2024a

Syntax

set(obj,path)
set(obj,path,Name=Value)

Description

This method requires Extended Tire Features for Vehicle Dynamics Blockset.

set(obj,path) exports tire model parameter values from the tireModel object specified by obj to a supported Simulink® or Simscape™ tire block located at the path specified by path.

set(obj,path,Name=Value) exports tire model parameter values from a tireModel object with additional options specified by one or more Name=Value arguments.

Note

The tireModel model type must match the block tire model type.

Input Arguments

expand all

Tire model, specified as a tireModel object.

Path to tire block, specified as a string array, character vector, or cell array of character vectors.

Supported Simscape Blocks

Data Types: char | string | cell

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: tm.set(modelPath,VariableName="tireParameters",Overwrite=true)

Variable name, specified as a string scalar. VariableName defines the name of the structure variable to store tire model parameter values, and the structure variable is created in the base workspace. This option is only valid for Simscape tire blocks. In the Block Parameters dialog box, Tire Parameters populates with the name defined by VariableName. If the variable name already exists in the workspace, you must set Overwrite to true to overwrite the existing value.

Example: VariableName="tireParameters"

Data Types: string

Option to overwrite the Tire Parameters value and workspace structure variable, specified as false or true. This option is valid only for Simscape tire blocks.

Example: Overwrite=true

Data Types: logical

Examples

expand all

Export tire model parameter values to the Combined Slip Wheel 2DOF block from a tireModel object using the set method.

Load Model

Load the model containing the Combined Slip Wheel 2DOF block. For a list of supported tire blocks, see path.

load_system("set_simulink_block.slx");

Export Tire Model Parameter Values to Simulink Block

Import the file containing the tire model parameter set.

tm = tireModel.import("example_model.tir");

Export the tire model parameter values to the Combined Slip Wheel 2DOF block, using the set method.

set(tm,"set_simulink_block/Combined Slip Wheel 2DOF");

Export Built-In Tire Model Parameter Values to Simulink Block

Instantiate a built-in tire model.

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

Export the model parameter values to the Combined Slip Wheel 2DOF block, using the set method.

set(tm,"set_simulink_block/Combined Slip Wheel 2DOF");

Export tire model parameter values to the Magic Formula Tire Force and Torque (Simscape Multibody) block from a tireModel object using the set method.

Load Model

Load the model containing the Magic Formula Tire Force and Torque block. For a list of supported tire blocks, see set.

load_system("set_simscape_block.slx");

Export Tire Model Parameter Values to Simscape Block

Import the file containing the tire model parameter set.

tm = tireModel.import("example_model.tir");

Export the model parameter values to the Magic Formula Tire Force and Torque block, using the set method.

set(tm,"set_simscape_block/Magic Formula Tire Force and Torque",...
                    "VariableName","tireParameters",...
                    "Overwrite",true);

Version History

Introduced in R2024a