Update Tire Block Parameter Values
This example demonstrates updating tire block parameter values with data from a fitted tire model. To update the parameters in supported tire blocks, use one of these methods:
Use the
setfunction to export the fitted tire model parameter values to a supported tire block. For a list of supported tire blocks, seeset.Use the
exportfunction to save the tire model parameter values to a tire property file (TIR) or MATLAB file (MAT). Then, through the block mask, select this exported file to update the parameter values in the block mask of a supported tire block.
This example provides the Simulink model combinedSlipWheel2DOFBlock.slx that includes a Combined Slip Wheel 2DOF block and the tire data file, tm.mat which contains the tire model parameter values.
This example requires the Extended Tire Features for Vehicle Dynamics Blockset™ support package. See Install Support Package.
Update Tire Block Parameter Values using Set Function
Load the tire model parameter values from the tm.mat file to the workspace.
load("tm.mat");Open the Simulink model combinedSlipWheel2DOFBlock.slx.
open_system("combinedSlipWheel2DOFBlock.slx");Use the set function to export tire model parameter values to the Combined Slip Wheel 2DOF block.
set(tm,"combinedSlipWheel2DOFBlock/Combined Slip Wheel 2DOF");Update Tire Block Parameter Values from File
Load the tire model parameter values from the tm.mat file to the workspace.
load("tm.mat");Use the export method to write the tire model parameters from the tireModel object tm to a TIR file.
export(tm,"example.tir", overwrite=true);Double-click the Combined Slip Wheel 2DOF block.

For Tire type, select External file.

On the Wheel and Tire Parameters tab, select the exported file example.tir and click Update mask values from file.
