Main Content

residualSimilarityModel

Residual comparison-based similarity model for estimating remaining useful life

Description

UseresidualSimilarityModelto estimate the remaining useful life (RUL) of a component using a residual comparison-based similarity model. This model is useful when you have degradation profiles for an ensemble of similar components, such as multiple machines manufactured to the same specifications, and you know the dynamics of the degradation process. The historical data for each member of the data ensemble is fitted with a model of identical structure. The degradation data of the test component is used to compute 1-step prediction errors, or residuals, for each ensemble model. The magnitudes of these errors indicate how similar the test component is to the corresponding ensemble members.

To configure aresidualSimilarityModelobject, usefit, which trains and stores the degradation model for each data ensemble member. Once you configure the parameters of your similarity model, you can then predict the remaining useful life of similar components usingpredictRUL. For similarity models, the RUL of the test component is estimated as the median statistic of the lifetime span of the most similar components minus the current lifetime value of the test component. For a basic example illustrating RUL prediction, seeUpdate RUL Prediction as Data Arrives.

For general information on predicting remaining useful life, seeModels for Predicting Remaining Useful Life.

Creation

Description

example

mdl= residualSimilarityModelcreates a residual comparison-based similarity model for estimating RUL and initializes the model with default settings.

mdl= residualSimilarityModel(initModel)creates a residual comparison-based similarity model and initializes the model parameters using an existingresidualSimilarityModelobjectinitModel.

example

mdl= residualSimilarityModel(___,Name,Value)specifies user-settable model properties using name-value pairs. For example,hashSimilarityModel('LifeTimeUnit',"days")creates a residual comparison-based similarity model that uses days as a lifetime unit. You can specify multiple name-value pairs. Enclose each property name in quotes.

Input Arguments

expand all

Residual comparison-based similarity model, specified as aresidualSimilarityModelobject.

Properties

expand all

Type of model trained using thefitfunction and used for residual generation, specified as one of the following:

  • "linear"— Line with offset term

  • "poly2"— Second-order polynomial

  • "poly3"— Third-order polynomial

  • "exp1"— Exponential with offset term

  • "exp2"— Sum of two exponentials

  • "arma2"— Second-order ARMA model

  • "arma3"— Third-order ARMA model

  • "arima2"— Second-order ARMA model with noise integration

  • "arima3"— Third-order ARMA model with noise integration

Select the model type based on your knowledge of the dynamics of the component degradation process.

You can specifyMethod:

  • Using a name-value pair when you create the model

  • Using dot notation after model creation

For more information on estimating ARMA and polynomial models, seearmaxandpolyfit, respectively.

Distance computation method, specified as one of the following:

  • "euclidian"— Use the 2-norm of the residual signal.

  • "absolute"— Use the 1-norm of the residual signal.

  • Function handle — Use a custom function of the form:

    D = distanceFunction(r)

    where,

    • ris the residual, specified as a column vector.

    • Dis the distance, returned as nonnegative scalar.

You can specifyDistance:

  • Using a name-value pair when you create the model

  • Using dot notation after model creation

This property is read-only.

Parameters of the fitted models for each member of the training data ensemble, specified as a cell array and assigned by thefitfunction. The content ofModelsdepends on the type of model used for regression, as specified inMethod.

Method Model Structure ModelsCell Content
"linear" at+b

Row vector — [ab]

"poly2" at2+bt+c

Row vector — [abc]

"poly3" at3+bt2+ct+d

Row vector — [abcd]

"exp1" aebt+c

Row vector — [abc]

"exp2" aebt+cedt

Row vector — [abcd]

"arma2"

Second-order ARMA model:

A ( q ) S ( t ) = C ( q ) e ( t )

where

  • A(q) = [1a1q-1a2q-2]

  • C(q) = [1c1q-1]

  • S(t) is the degradation feature

Structure with fields:

  • A— Row vector [1a1a2]

  • C— Row vector [1c1]

"arma3" Similar to"arma2", but withA(q) third-order andC(q) second-order

Structure with fields:

  • A— Row vector [1a1a2a2]

  • C— Row vector [1c1c2]

"arima2"

Similar to"arma2", but with an additional noise integrator:

A ( q ) S ( t ) = C ( q ) 1 q 1 e ( t )

Structure with fields:

  • A— Row vector [1a1a2]

  • C— Row vector [1c1]

"arima3" Similar to"arma3", but with an additional noise integrator

Structure with fields:

  • A— Row vector [1a1a2a2]

  • C— Row vector [1c1c2]

For more information on estimating ARMA and polynomial models, seearmaxandpolyfit, respectively.

This property is read-only.

Mean squared error of the estimation for each model inModels, specified as a vector and assigned by thefitfunction.

This property is read-only.

Ensemble member life spans, specified as a double vector ordurationobject vector and computed from the ensemble member degradation profiles by thefitfunction.

Number of nearest neighbors for RUL estimation, specified asInfor a finite positive integer. IfNumNearestNeighborsisInf, thenpredictRULuses all the ensemble members during estimation.

You can specifyNumNearestNeighbors:

  • Using a name-value pair when you create the model

  • Using dot notation after model creation

Flag to include ties, specified astrueorfalse. WhenIncludeTiesistrue, the model includes all neighbors whose distance to the test component data is less than theKth smallest distance, whereKis equal toNumNearestNeigbors.

You can specifyIncludeTies:

  • Using a name-value pair when you create the model

  • Using dot notation after model creation

r标志的标准化esiduals before computing distance, specified astrueorfalse.

WhenStandardizeistrue, the residuals are scaled by the inverse square root of the estimated mean squared errors inModelMSE.

You can specifyStandardize:

  • Using a name-value pair when you create the model

  • Using dot notation after model creation

生命周期变量, specified as a string that contains a valid MATLAB®variable name or"".

When you train the model using thefitfunction, if your training data is a:

  • table, thenLifeTimeVariablemust match one of the variable names in the table

  • timetable, thenLifeTimeVariableone of the variable names in the table or the dimension name of the time variable,data.Properties.DimensionNames{1}

You can specifyLifeTimeVariable:

  • Using a name-value pair when you create the model

  • As an argument when you call thefitfunction

  • Using dot notation after model creation

生命周期变量units, specified as a string.

The units of the lifetime variable do not need to be time-based. The life of the test component can be measured in terms of a usage variable, such as distance traveled (miles) or fuel consumed (gallons).

Degradation variable names, specified as a string or string array. The strings inDataVariablesmust be valid MATLAB variable names.

You can specifyDataVariables:

  • Using a name-value pair when you create the model

  • As an argument when you call thefitfunction

  • Using dot notation after model creation

Flag for using parallel computing for nearest-neighbor searching, specified as eithertrueorfalse.

You can specifyUseParallel:

  • Using a name-value pair when you create the model

  • Using dot notation after model creation

Additional model information for bookkeeping purposes, specified as any data type or format. The model does not use this information.

You can specifyUserData:

  • Using a name-value pair when you create the model

  • Using dot notation after model creation

Object Functions

predictRUL Estimate remaining useful life for a test component
fit Estimate parameters of remaining useful life model using historical data
compare Compare test data to historical data ensemble for similarity models

Examples

collapse all

Load training data.

load('residualTrainVectors.mat')

The training data is a cell array of column vectors. Each column vector is a degradation feature profile for a component.

Create a residual similarity model with default settings.

mdl = residualSimilarityModel;

Train the similarity model using the training data.

fit(mdl,residualTrainVectors)

Load training data.

load('residualTrainTables.mat')

The training data is a cell array of tables. Each table is a degradation feature profile for a component. Each profile consists of life time measurements in the"Time"variable and corresponding degradation feature measurements in the"Condition"variable.

Create a residual similarity model that fits the data with a third-order ARMA model and uses an absolute distance metric.

mdl = residualSimilarityModel('Method',"arma3",'Distance',"absolute");

Train the similarity model using the training data. Specify the names of the life time and data variables.

fit(mdl,residualTrainTables,"Time","Condition")

Load training data.

load('residualTrainTables.mat')

The training data is a cell array of tables. Each table is a degradation feature profile for a component. Each profile consists of life time measurements in the"Time"variable and corresponding degradation feature measurements in the"Condition"variable.

Create a residual similarity model that fits the data with a third-order ARMA model and uses hours as the life time unit.

mdl = residualSimilarityModel('Method',"arma3",'LifeTimeUnit',"hours");

Train the similarity model using the training data. Specify the names of the life time and data variables.

fit(mdl,residualTrainTables,"Time","Condition")

Load testing data. The test data contains the degradation feature measurements for a test component up to the current life time.

load('residualTestData.mat')

Predict the RUL of the test component using the trained similarity model.

estRUL = predictRUL(mdl,residualTestData)
estRUL =duration85.73 hr

The estimated RUL for the component is around 86 hours.

Extended Capabilities

Introduced in R2018a