Plot Tire Data for Visual Inspection
Use the plot
function to visually inspect data stored in tireData
objects. First, import the tire data from Tyre Data Exchange Format (TYDEX) v1.3 files. Then, specify arguments in the plot
function to customize different plot views.
This example requires the Extended Tire Features for Vehicle Dynamics Blockset™ support package. See Install Support Package.
Import Tire Data
Build a string array from the TYDEX filenames that contain the tire data.
tirepath = fullfile(pwd); tydexdir = dir(fullfile(tirepath,"data_tydex_files","*.tdx")); tydexstr = join([{tydexdir.folder}',{tydexdir.name}'],filesep);
Import the data and create an array of tireData
objects, td
.
td = tireData(tydexstr);
Autoplot Tire Data
Plot the array of tireData
objects without specifying input arguments. If you do not specify the input argument DataVariableNames, the plot
function automatically generates plots common for the test procedure associated with the data.
Note that not all tire test types are supported.
plot(td)
Plot Tire Data Channels
You can plot a single or multiple tireData
objects, assign colors, and legend values to plots and plot filtered tire data.
Plot a Single tireData
Object
Specifying the input argument DataVariableNames
, plot the longitudinal force versus the longitudinal slip of a single tireData
object.
plot(td(1),"DataVariableNames",["kappa","Fx"]);
Plot Multiple tireData
Objects
Specifying the input argument DataVariableNames
, plot the longitudinal force versus the longitudinal slip of multiple tireData
objects.
plot(td(1:2),"DataVariableNames",["kappa","Fx"]);
Assign Colors and Legend Values to Plot
Specifying the input arguments DataVariableNames
and ColorBy, plot the longitudinal force versus the longitudinal slip of multiple tireData
objects using the normal force to assign colors and legend values to the plot.
Note that the mean value of Fz
is used to assign the legend values, which are rounded with the mean values of other tireData
objects.
plot(td(1:8),"DataVariableNames",["kappa","Fx"],"ColorBy","Fz");
Plot a Subset of Tire Data
Specifying the input arguments DataVariableNames
, ColorBy
, FilterBy, and
FilterByValues, plot the longitudinal force versus the longitudinal slip of multiple tireData
objects. Use the inclination angle to assign colors and legend values to the plot. Filter by the normal force values of 4000
and 5000
.
plot(td(1:24),"DataVariableNames",["kappa","Fx"],"ColorBy","gamma", ... "FilterBy","Fz","FilterByValues",{[4000,5000]});
Specifying the input arguments DataVariableNames
, ColorBy
, FilterBy
, and
FilterByValues
, plot the longitudinal force versus the lateral force of the tireData
object array. Use the slip angle to assign colors and legend values to the plot. Filter by the inclination angle values of -0.2
and 0.2
and the test method value of Combined
.
plot(td,"DataVariableNames",["Fy","Fx"],"ColorBy","alpha", ... "FilterBy",["TestMethod","gamma"], ... "FilterByValues",{"Combined",[-0.02 0.02]});