Main Content

Preprocess Data

Remove means, offsets, and linear trends; reconstruct missing data, change data sampling rate

The System Identification Toolbox™ app and command-line functions allow you to preprocess the estimation (and validation) data before using it for model estimation. Preprocessing helps refine the data and correct or remove inaccuracies. It ensures that the data is in a suitable form for model estimation.

After selecting the data for estimation, check your data for any undesired traits such as:

  • Missing or faulty values (also known as outliers). For example, you might see gaps that indicate missing data, values that do not fit with the rest of the data, or noninformative values.

  • Offsets and drifts in signal levels (low-frequency disturbances).

  • High-frequency disturbances above the frequency interval of interest for the system dynamics.

Depending on the data characteristics, you can reconstruct missing data, change the data sampling rate, remove the means, constant offsets, or linear trends from the data.

For a method to analyze time-domain or frequency-domain data, see How to Analyze Data Using the advice Command.

Functions

detrendSubtract offset or trend from time-domain signals contained in iddata objects
retrendAdd offsets or trends to time-domain data signals stored in iddata objects
diffDifference signals in iddata objects
idfiltFilter data using user-defined passbands, general filters, or Butterworth filters
misdataReconstruct missing input and output data
nkshiftShift data sequences
idresampResample time-domain data by decimation or interpolation
idresampOptionsOption set for idresamp (Since R2023a)
resample(Not recommended) Resample time-domain data that is stored in an iddata object by decimation or interpolation (requires Signal Processing Toolbox software)
getTrendCreate trend information object to store offset, mean, and trend information for time-domain signals stored in iddata object
chgFreqUnitChange frequency units of frequency-response data model
fdelDelete specified data from frequency response data (FRD) models
TrendInfoOffset and linear trend slope values for detrending data

Topics

Handling, Resampling, and Filtering Data

Preprocessing Data Using the App

Preprocessing Data Using the Command Line