Preprocess Data
Ways to Preprocess Data
In PID Tuner, you can preprocess plant data before you use it for estimation. After you import I/O data, on the Plant Identification tab, use the Preprocess menu to select a preprocessing operation.
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 identification. 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
It is important for good identification 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 .
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 .
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.
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 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 .
Resample Data
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 .
Replace Data
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 .
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.