Documentation Center

  • Trials
  • Product Updates

TrendInfo

Offset and linear trend slope values for detrending data

Description

TrendInfo class represents offset and linear trend information of input and output data. Constructing the corresponding object lets you:

  • Compute and store mean values or best-fit linear trends of input and output data signals.

  • Define specific offsets and trends to be removed from input-output data.

By storing offset and trend information, you can apply it to multiple data sets.

After estimating a linear model from detrended data, you can simulate the model at original operation conditions by adding the saved trend to the simulated output using retrend.

Construction

For transient data, if you want to define a specific offset or trend to be removed from this data, create the TrendInfo object using getTrend. For example:

T=getTrend(data)

where data is the iddata object from which you will be removing the offset or linear trend, and T is the TrendInfo object. You must then assign specific offset and slope values as properties of this object before passing the object as an argument to detrend.

For steady-state data, if you want to detrend the data and store the trend information, use the detrend command with the output argument for storing trend information.

Properties

After creating the object, you can use get or dot notation to access the object property values.

Property NameDefaultDescription
DataNameEmpty stringName of the iddata object from which trend information is derived (if any)
InputOffsetzeros(1,nu), where nu is the number of inputs
  • For transient data, the physical equilibrium offset you specify for each input signal.

  • For steady-state data, the mean of input values. Computed automatically when detrending the data.

  • If removing a linear trend from the input-output data, the value of the line at t0, where t0 is the start time.

For multiple experiment data, this is a cell array of size equal to the number of experiments in the data set.

InputSlopezeros(1,nu), where nu is the number of inputs

Slope of linear trend in input data, computed automatically when using the detrend command to remove the linear trend in the data.

For multiple experiment data, this is a cell array of size equal to the number of experiments in the data set.

OutputOffsetzeros(1,ny), where ny is the number of outputs
  • For transient data, the physical equilibrium offset you specify for each output signal

  • For steady-state data, the mean of output values. Computed automatically when detrending the data.

  • If removing a linear trend from the intput-output data, the value of the line at t0, where t0 is the start time.

For multiple experiment data, this is a cell array of size equal to the number of experiments in the data set.

OutputSlopezeros(1,ny), where ny is the number of outputs

Slope of linear trend in output data, computed automatically when using the detrend command to remove the linear trend in the data.

For multiple experiment data, this is a cell array of size equal to the number of experiments in the data set.

Examples

Construct the object that stores trend information as part of data detrending:

% Load SISO data containing vectors u2 and y2
load dryer2
% Create data object with sampling time of 0.08 sec
data=iddata(y2,u2,0.08)
% Plot data on a time plot - it has a nonzero mean
plot(data)
% Detrend the mean from the data
% Store the mean as TrendInfo object T
[data_d,T] = detrend(data,0)
% View mean value removed from the data
get(T)

Construct the object that stores input and output offsets to be removed from transient data:

% Load SISO data containing vectors u2 and y2
load dryer2
% Create data object with sampling time of 0.08 sec
data=iddata(y2,u2,0.08)
% Plot data on a time plot - it has a nonzero mean
plot(data)
% Create a TrendInfo object for storing offsets and trends
T = getTrend(data)
% Assign offset values to the TrendInfo object
T.InputOffset=5;
T.OutputOffset=5;
% Subtract specific offset from the data
data_d = detrend(data,T)
% View mean value removed from the data
get(T)

See Also

| |

Was this topic helpful?