Unless you specify a moving mean, this example requires the Signal Processing Toolbox.
Import and View Tire Measurement Data
Import tire measurement data into a tireData object, td.
Multiple Fz conditions are included in the data. Use the split function to separate the data by tire data channel Fz, resulting in four tireData objects.
Use the plot function to view the normal force versus the elapsed time using the normal force to assign colors and legend values.
Specify Moving Mean
Use a moving mean to filter the data channel Fz. Set k=10.
Plot the resulting tireData objects in tdFilter to visualize the modified data set.
Specify digitalFilter Object
Use the designfilt (Signal Processing Toolbox) function to create the digitalFilter object for a second-order IIR low-pass filter with HalfPowerFrequency=0.1.
Filter the data channel Fz using the digitalFilter object d.
Plot the resulting tireData objects in tdFilter to visualize the modified data set.
Specify Transfer Function Coefficients
Generate the b and a transfer coefficients using the butter (Signal Processing Toolbox) function.
You can use additional filter design functions can be used to generate the transfer function coefficients. For more information, see FIR Filter Design (Signal Processing Toolbox).
Use the generated transfer coefficients to filter the data channel Fz.
Plot the resulting tireData objects in tdFilter to visualize the modified data set.
Specify Cutoff Frequency
Set the cutoff frequency (Hz) to F=2 to use a low pass filter to filter the data channel Fz.
Plot the resulting tireData objects in tdFilter to visualize the modified data set.
The cutoff frequency name-value argument uses the data channel et to calculate the sampling frequency. If et is empty or invalid for calculating the sampling frequency, additionally provide the sampling frequency Fs.
Plot the resulting tireData objects in tdFilter to visualize the modified data set.