Preprocess Data
Ways to Preprocess Data
In the Parameter Estimator and Sensitivity Analyzer, you can preprocess imported data before you use it for estimation or evaluation. After plotting the measured data, you have access to the Experiment Plot tab where you can preprocess the data.
For information about how to plot the imported data in the Parameter Estimator, see Plot and Analyze Data. For information about how to import and plot the data in the Sensitivity Analyzer, see Match Model Outputs to Measured Signals.
You can perform the following preprocessing operations:
Remove Offset — Remove mean values, a constant value, or an initial value from the data.
Scale Data — Scale data by a constant value, signal maximum value, or signal initial value.
Extract Data — Select a subset of the data to use in the estimation or evaluation. You can graphically select the data to extract, or enter start and end times in the text boxes.
Filter Data — Process data using a low-pass, high-pass, or band-pass filter.
Resample Data –– Resample data using zero-order hold or linear interpolation.
Replace Data –– Replace data with a constant value, region initial value, region final value, or a line. You can use this functionality to replace outliers.
You can perform as many preprocessing operations on your data as are required for your application. For instance, you can both filter the data and remove an offset.
Remove Offset
On the Experiment Plot tab, click Remove Offset.
It is important for good estimation results to remove data offsets. In the Remove Offset tab, you can remove offset from all signals at once or select a particular signal using the Remove offset from signal drop down list. Specify the value to remove using the Offset to remove drop down list. The options are:
A constant value. Enter the value in the box. (Default: 0)
Mean of the data, to create zero-mean data.
Signal initial value.
As you change the offset value, the modified data is shown in preview in the plot.
After making choices, update the existing data with the preprocessed data by clicking .
Or, to save the modified data values in a new experiment (in the Parameter Estimator) or requirement (in the Sensitivity Analyzer), click and select Save As: Create a new experiment from the modified data.
Scale Data
On the Experiment Plot tab, click Scale Data.
In the Scale Data tab, you can choose to scale all signals or specify a signal to scale. Select the scaling value from the Scale to use drop-down list. The options are:
A constant value. Enter the value in the box. (Default: 1)
Signal maximum value.
Signal initial value.
As you change the scaling, the modified data is shown in preview in the plot.
After making choices, update the existing data with the preprocessed data by clicking .
Or, to save the modified data values in a new experiment (in the Parameter Estimator) or requirement (in the Sensitivity Analyzer), click and select Save As: Create a new experiment from the modified data.
Extract Data
To extract a portion of your data to use in the estimation or evaluation process, on the Experiment Plot tab, click Extract Data.
Select a subset of data to use in Extract Data tab. You can extract data graphically or by specifying start time and end time. To extract data graphically, click and drag the vertical bars to select a region of the data to use.
After you choose the data to extract, you can save it in a new experiment (in the Parameter Estimator) or requirement (in the Sensitivity Analyzer) by clicking Save As.
Filter Data
You can filter your data using a low-pass, high-pass, or band-pass filter. A low-pass filter blocks high frequency signals, a high-pass filter blocks low frequency signals, and a band-pass filter combines the properties of both low- and high-pass filters. On the Experiment Plot tab click one of the Low-Pass Filter, High-Pass Filter, or Band-Pass Filter to open a new tab. For example, the low-pass filter tab appears as shown:
On the Low-Pass Filter, High-Pass
Filter, or Band-Pass Filter tab, you can choose to
filter all signals or specify a particular signal. For the low-pass and high-pass
filtering, you can specify the normalized cutoff frequency of the signal. Where, a
normalized frequency of 1
corresponds to half the sampling rate. For
the band-pass filter, you can specify the normalized start and end frequencies. Specify
the frequencies by either entering the value in the associated field on the tab.
Alternatively, you can specify filter frequencies graphically, by dragging the vertical
bars in the frequency-domain plot of your data.
Click Options to specify the filter order, and select zero-phase shift filter.
After making choices, update the existing data with the preprocessed data by clicking .
Or, to save the modified data values in a new experiment (in the Parameter Estimator) or requirement (in the Sensitivity Analyzer), click and select Save As: Create a new experiment from the modified data.
Resample Data
On the Experiment Plot tab, click the Resample Data button.
In the Resample Data tab, specify the sampling period using the Resample with sample period: field. You can resample your data using one of the following interpolation methods:
Zero-order hold
— Fill the missing data sample with the data value immediately preceding it.Linear interpolation
— Fill the missing data using a line that connects the two data points.
By default, the resampling method is set to zero-order
hold
. You can select the linear
interpolation
method from the Resample Using
drop-down list.
The modified data is shown in preview in the plot.
After making choices, update the existing data with the preprocessed data by clicking .
Or, to save the modified data values in a new experiment (in the Parameter Estimator) or requirement (in the Sensitivity Analyzer), click and select Save As: Create a new experiment from the modified data.
Replace Data
On the Experiment Plot tab click the Replace Data button.
In the Replace Data tab, select data to replace by dragging across a region in the plot. Once you select data, choose how to replace it using the Replace selected data drop-down list. You can replace the data you select with one of these options:
A constant value
Region initial value
Region final value
A line
The replaced preview data changes color and the replacement data appears on the plot. At any time before updating, click Clear preview to clear the data you replaced and start over.
After making choices, update the existing data with the preprocessed data by clicking .
Or, to save the modified data values in a new experiment (in the Parameter Estimator) or requirement (in the Sensitivity Analyzer), click and select Save As: Create a new experiment from the modified data.
Replace Data can be useful, for example, to replace outliers. Outliers can be defined as data values that deviate from the mean by more than three standard deviations. When estimating parameters from data containing outliers, the results may not be accurate. Hence, you might choose to replace the outliers in the data before you estimate the parameters.