linearDegradationModel
Linear degradation model for estimating remaining useful life
Description
UselinearDegradationModel
to model a linear degradation process for estimating the remaining useful life (RUL) of a component. Degradation models estimate the RUL by predicting when a monitored signal will cross a predefined threshold. Linear degradation models are useful when the monitored signal is a log scale signal or when the component does not experience cumulative degradation. For more information on the degradation model, seeLinear Degradation Model.
To configure alinearDegradationModel
object for a specific type of component, you can:
Estimate the model prior parameters using historical data regarding the health of an ensemble of similar components, such as multiple machines manufactured to the same specifications. To do so, use
fit
.Specify the model prior parameters when you create the model based on your knowledge of the component degradation process.
Once you configure the parameters of your degradation model, you can then predict the remaining useful life of similar components usingpredictRUL
. For a basic example illustrating RUL prediction with a degradation model, seeUpdate RUL Prediction as Data Arrives.
For general information on predicting remaining useful life, seeModels for Predicting Remaining Useful Life.
Creation
Description
创建一个线性退化模型估算RUL and initializes the model with default settings.mdl
= linearDegradationModel
specifies user-settable model properties using name-value pairs. For example,mdl
= linearDegradationModel(Name,Value
)linearDegradationModel('NoiseVariance',0.5)
creates a linear degradation model with a model noise variance of0.5
. You can specify multiple name-value pairs. Enclose each property name in quotes.
Properties
Theta
—Current mean value of slope parameter
scalar
This property is read-only.
Current mean value of slope parameterθin the degradation model, specified as a scalar. For more information on the degradation model, seeLinear Degradation Model.
You can specifyTheta
using a name-value pair argument when you:
Create the model.
Reset the model using the
restart
function.
Otherwise, the value ofTheta
changes when you use theupdate
function.
ThetaVariance
—Current variance of slope parameter
nonnegative scalar
This property is read-only.
Current variance of slope parameterθin the degradation model, specified as a nonnegative scalar. For more information on the degradation model, seeLinear Degradation Model.
You can specifyThetaVariance
using a name-value pair argument when you:
Create the model.
Reset the model using the
restart
function.
Otherwise, the value ofThetaVariance
changes when you use theupdate
function.
Phi
—Current intercept value
scalar
Current intercept valueϕfor the degradation model, specified as a scalar. For more information on the degradation model, seeLinear Degradation Model.
You can specifyPhi
using a name-value pair argument when you create the model. Otherwise, the value ofPhi
changes when you estimate the model prior using thefit
function.
Prior
—Prior information about model parameters
structure
Prior information about model parameters, specified as a structure with the following fields:
Theta
— Mean value of slope parameterThetaVariance
— Variance of slope parameter
You can specify the fields ofPrior
:
When you create the model. When you specify
Theta
orThetaVariance
在创建模型使用名称-值对,相关系数esponding field ofPrior
is also set.Using the
fit
function. In this case, the prior values are derived from the data used to fit the model.Using the
restart
function. In this case, the current values ofTheta
andThetaVariance
are copied to the corresponding fields ofPrior
.Using dot notation after model creation.
For more information on the degradation model, seeLinear Degradation Model.
NoiseVariance
—Variance of additive noise
1
(default) |nonnegative scalar
Variance of additive noiseεin the degradation model, specified as a nonnegative scalar. For more information on the degradation model, seeLinear Degradation Model.
You can specifyNoiseVariance
:
Using a name-value pair when you create the model
Using a name-value pair with the
restart
functionUsing dot notation after model creation
SlopeDetectionLevel
—Slope detection level
0.05
(default) |scalar value in the range [0,1]|[]
Slope detection level for determining the start of the degradation process, specified as a scalar in the range [0,1]. This value corresponds to the alpha value in a t-test of slope significance.
To disable the slope detection test, setSlopeDetectionLevel
to[]
.
You can specifySlopeDetectionLevel
:
Using a name-value pair when you create the model
Using a name-value pair with the
restart
functionUsing dot notation after model creation
SlopeDetectionInstant
—Slope detection time
[]
(default) |scalar
This property is read-only.
Slope detection time, which is the instant when a significant slope is detected, specified as a scalar. Theupdate
function sets this value whenSlopeDetectionLevel
is not empty.
CurrentMeasurement
—Latest degradation feature value
scalar
This property is read-only.
Latest degradation feature value supplied to theupdate
function, specified as a scalar.
InitialLifeTimeValue
—Initial lifetime variable value
scalar|duration
object
This property is read-only.
Initial lifetime variable value when theupdate
function is first called on the model, specified as a scalar.
When the model detects a slope, theInitialLifeTime
value is changed to match theSlopeDetectionInstant
value.
CurrentLifeTimeValue
—Current lifetime variable value
scalar|duration
object
This property is read-only.
Latest lifetime variable value supplied to theupdate
function, specified as a scalar.
LifeTimeVariable
—生命周期变量
""
(default) |string
生命周期变量, specified as a string that contains a valid MATLAB®variable name or""
.
When you train the model using thefit
function, if your training data is a:
table
, thenLifeTimeVariable
must match one of the variable names in the tabletimetable
, thenLifeTimeVariable
one 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 the
fit
functionUsing dot notation after model creation
LifeTimeUnit
—生命周期变量units
""
(default) |string
生命周期变量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).
DataVariables
—Degradation variable name
""
(default) |string
Degradation variable name, specified as a string that contains a valid MATLAB variable name. Degradation models have only one data variable.
You can specifyDataVariables
:
Using a name-value pair when you create the model
As an argument when you call the
fit
functionUsing dot notation after model creation
UseParallel
—Flag for using parallel computing
false
(default) |true
Flag for using parallel computing when fitting prior values from data, specified as eithertrue
orfalse
.
You can specifyUseParallel
:
Using a name-value pair when you create the model
Using a name-value pair with the
restart
functionUsing dot notation after model creation
UserData
—Additional model information
[]
(default) |any data type or format
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
fit |
Estimate parameters of remaining useful life model using historical data |
predictRUL |
Estimate remaining useful life for a test component |
update |
Update posterior parameter distribution of degradation remaining useful life model |
restart |
Reset remaining useful life degradation model |
Examples
Train Linear Degradation Model
Load training data.
load('linTrainVectors.mat')
The training data is a cell array of column vectors. Each column vector is a degradation feature profile for a component.
Create a linear degradation model with default settings.
mdl = linearDegradationModel;
Train the degradation model using the training data.
fit(mdl,linTrainVectors)
Create Linear Degradation Model with Known Priors
Create a linear degradation model and configure it with a known prior distribution.
mdl = linearDegradationModel(“θ”,0.25,'ThetaVariance',0.002);
The specified prior distribution parameters are stored in thePrior
property of the model.
mdl.Prior
ans =struct with fields:Theta: 0.2500 ThetaVariance: 0.0020
The current posterior distribution of the model is also set to match the specified prior distribution. For example, check the posterior value of the slope variance.
mdl.ThetaVariance
ans = 0.0020
Train Linear Degradation Model Using Tabular Data
Load training data.
load('linTrainTables.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 linear degradation model with default settings.
mdl = linearDegradationModel;
Train the degradation model using the training data. Specify the names of the life time and data variables.
fit(mdl,linTrainTables,"Time","Condition")
作表语用t RUL Using Linear Degradation Model
Load training data.
load('linTrainTables.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 linear degradation model, specifying the life time variable units.
mdl = linearDegradationModel('LifeTimeUnit',"hours");
Train the degradation model using the training data. Specify the names of the life time and data variables.
fit(mdl,linTrainTables,"Time","Condition")
Load testing data, which is a run-to-failure degradation profile for a test component. The test data is a table with the same life time and data variables as the training data.
load('linTestData.mat','linTestData1')
Based on knowledge of the degradation feature limits, define a threshold condition indicator value that indicates the end-of-life of a component.
threshold = 60;
Assume that you measure the component condition indicator after 48 hours. Predict the remaining useful life of the component at this time using the trained linear degradation model. The RUL is the forecasted time at which the degradation feature will pass the specified threshold.
estRUL = predictRUL(mdl,linTestData1(48,:),threshold)
estRUL =duration112.64 hr
The estimated RUL is around 113 hours, which indicates a total predicted life span of around 161 hours.
Update Linear Degradation Model and Predict RUL
Load observation data.
load('linTestData.mat','linTestData1')
For this example, assume that the training data is not historical data, but rather real-time observations of the component condition.
Based on knowledge of the degradation feature limits, define a threshold condition indicator value that indicates the end-of-life of a component.
threshold = 60;
Create a linear degradation model arbitrary prior distribution data and a specified noise variance. Also, specify the life time and data variable names for the observation data.
mdl = linearDegradationModel(“θ”,1,'ThetaVariance',1e6,'NoiseVariance',0.003,...'LifeTimeVariable',"Time",'DataVariables',"Condition",...'LifeTimeUnit',"hours");
Observe the component condition for50
hours, updating the degradation model after each observation.
fori=1:50 update(mdl,linTestData1(i,:));end
After50
hours, predict the RUL of the component using the current life time value stored in the model.
estRUL = predictRUL(mdl,threshold)
estRUL =duration50.301 hr
The estimated RUL is about 50 hours, which indicates a total predicted life span of about 100 hours.
Algorithms
Linear Degradation Model
ThelinearDegradationModel
object implements the following continuous-time linear degradation model[1]:
where:
ϕis the model intercept, which is constant. You can initializeϕas the nominal value of the degradation variable using
Phi
.θ(t) is the model slope and is modeled as a random variable with a normal distribution with mean
Theta
and varianceThetaVariance
.ε(t) is the model additive noise and is modeled as a normal distribution with zero mean and variance
NoiseVariance
.
References
[1] Chakraborty, S., N. Gebraeel, M. Lawley, and H. Wan. "Residual-Life Estimation for Components with Non-Symmetric Priors."IIE Transactions. Vol. 41, Number 4, 2009, pp. 372–387.
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Usage notes and limitations:
The
predictRUL
,update
, andrestart
commands support code generation withMATLAB Coder™for this RUL model type.Before generating code that uses this model, you must save the model using
saveRULModelForCoder
. For an example, seeGenerate Code for Predicting Remaining Useful Life.In addition to its read-only properties, the following properties cannot be changed at run time:
LifeTimeVariable
LifeTimeUnit
DataVariables
Automatic Parallel Support
Accelerate code by automatically running computation in parallel using Parallel Computing Toolbox™.
To evaluate these models in parallel, set theUseParallel
property totrue
.
See Also
Functions
Open Example
You have a modified version of this example. Do you want to open this example with your edits?
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select:.
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina(Español)
- Canada(English)
- United States(English)
Europe
- Belgium(English)
- Denmark(English)
- Deutschland(Deutsch)
- España(Español)
- Finland(English)
- France(Français)
- Ireland(English)
- Italia(Italiano)
- Luxembourg(English)
- Netherlands(English)
- Norway(English)
- Österreich(Deutsch)
- Portugal(English)
- Sweden(English)
- Switzerland
- United Kingdom(English)