Main Content

sdlUtility.tirread

Import TIR file tire parameterizations

Description

example

tireParameters = sdlUtility.tirread(fileName) returns the tire parameters for the TIR file, fileName. The function saves only the information required to parameterize the Tire (Magic Formula) block.

example

sdlUtility.tirread(block,tireParameters) applies the tire parameters from tireParameters to the specified Tire (Magic Formula) block.

Examples

collapse all

This example shows how to import a TIR file called sample_tire_245_60_R16.tir and save the relevant tire parameters as a workspace variable called STire. Once you have the parameters saved to the workspace, you can apply the tire parameters to a Tire (Magic Formula) block.

Suppose you have a file named sample_tire_245_60_R16.tir. To generate the tire parameters for the file, enter:

STire = sdlUtility.tirread('sample_tire_245_60_R16.tir')
STire = 

  struct with fields:

                        UNITS: [1×1 struct]
                      INERTIA: [1×1 struct]
         ROLLING_COEFFICIENTS: [1×1 struct]
                     VERTICAL: [1×1 struct]
                    DIMENSION: [1×1 struct]
                   STRUCTURAL: [1×1 struct]
    LONGITUDINAL_COEFFICIENTS: [1×1 struct]

This example shows how to apply tire parameters in a TIR file to the left tire in the sdl_car model.

Suppose you have a file named sample_tire_245_60_R16.tir. To generate the tire parameters for the file, enter:

STire = sdlUtility.tirread('sample_tire_245_60_R16.tir')
STire = 

  struct with fields:

                        UNITS: [1×1 struct]
                      INERTIA: [1×1 struct]
         ROLLING_COEFFICIENTS: [1×1 struct]
                     VERTICAL: [1×1 struct]
                    DIMENSION: [1×1 struct]
                   STRUCTURAL: [1×1 struct]
    LONGITUDINAL_COEFFICIENTS: [1×1 struct]

Determine the path of the tire. The tires are part of the Vehicle Body subsystem. To parameterize the left tire using the workspace variable STire, enter:

sdlUtility.tirread('sdl_car/Vehicle Body/Tire Left', STire);

Open the Tire Left block. The block uses the parameters in the STire structure array.

Tire (Magic Formula) block dialog window for the Tire Left block showing workspace variable parameters.

Input Arguments

collapse all

TIR file name, specified as a character vector or string scalar.

Data Types: char | string

Tire (Magic Formula) block to parameterize, specified as a character vector or string scalar. You can specify the block path or use the block handle.

Data Types: char | string

Structure array that contains the tire parameters, specified as a string scalar. The function reduces the parameters to only what the Tire (Magic Formula) block requires.

Data Types: struct

Output Arguments

collapse all

Structure array variable that contains the tire parameters, specified as a structure. The structure contains only the parameters needed to parameterize the Tire (Magic Formula) block.

Data Types: struct

Limitations

  • The TIR file must be in the standard format.

  • The TIR file must list the units in meters, Newtons, kilograms, and seconds.

  • The TIR file must contain all the data needed to parameterize the block.

References

[1] Pacejka, Hans Bastiaan, and Igo Besselink. Tire and Vehicle Dynamics. 3rd edition. Oxford Waltham: Butterworth-Heinemann Elsevier, 2012.

Version History

Introduced in R2022b