restart
Reset remaining useful life degradation model
Description
restart(
resets the internally
stored statistics of the degradation process accumulated by the previous calls to
mdl
)update
and resets the
InitialLifeTimeValue
and
CurrentLifeTimeValue
properties of the model. If the
SlopeDetectionLevel
property of the model is not empty, then
the slope test is also restarted, ignoring any previous detections.
restart(
sets the prior parameter values in mdl
,resetPrior
)mdl
to their corresponding
posterior values when resetPrior
is
true
.
restart(___,
specifies properties of Name,Value
)mdl
using one or more name-value pair
arguments.
Examples
Reset Degradation Model
Load training data, which is a degradation feature profile for a component.
load('expRealTime.mat')
For this example, assume that the training data is not historical data. When there is no historical data, you can update your degradation model in real time using observed data.
Create an exponential degradation model with the following settings:
prior distribution with a mean of
2.4
and a variance of0.006
prior distribution with a mean of
0.07
and a variance of3e-5
Noise variance of
0.003
mdl = exponentialDegradationModel('Theta',2.4,'ThetaVariance',0.006,... 'Beta',0.07,'BetaVariance',3e-5,... 'NoiseVariance',0.003);
Since there is no life time variable in the training data, create an arbitrary life time vector for fitting.
lifeTime = [1:length(expRealTime)];
Observe the degradation feature for 100 iterations. Update the degradation model after each iteration.
for i=1:100 update(mdl,[lifeTime(i) expRealTime(i)]) end
Reset the model, which clears the accumulated statistics from the previous observations and resets the posterior distributions to the prior distributions.
restart(mdl)
Update Exponential Degradation Model in Real Time
Load training data, which is a degradation feature profile for a component.
load('expRealTime.mat')
For this example, assume that the training data is not historical data. When there is no historical data, you can update your degradation model in real time using observed data.
Create an exponential degradation model with the following settings:
Arbitrary and prior distributions with large variances so that the model relies mostly on observed data
Noise variance of
0.003
mdl = exponentialDegradationModel('Theta',1,'ThetaVariance',1e6,... 'Beta',1,'BetaVariance',1e6,... 'NoiseVariance',0.003);
Since there is no life time variable in the training data, create an arbitrary life time vector for fitting.
lifeTime = [1:length(expRealTime)];
Observe the degradation feature for 10 iterations. Update the degradation model after each iteration.
for i=1:10 update(mdl,[lifeTime(i) expRealTime(i)]) end
After observing the model for some time, for example at a steady-state operating point, you can restart the model and save the current posterior distribution as a prior distribution.
restart(mdl,true)
View the updated prior distribution parameters.
mdl.Prior
ans = struct with fields:
Theta: 2.3555
ThetaVariance: 0.0058
Beta: 0.0722
BetaVariance: 3.6362e-05
Rho: -0.8429
Input Arguments
mdl
— Degradation RUL model
linearDegradationModel
object | exponentialDegradationModel
object
Degradation RUL model, specified as a
linearDegradationModel
object or an
exponentialDegradationModel
object.
restart
clears the accumulated statistics in
mdl
and resets the
InitialLifeTimeValue
and
CurrentLifeTimeValue
properties of
mdl
.
resetPrior
— Flag for resetting prior parameter values
false
(default) | true
Flag for resetting prior parameter information, specified as a logical
value. When resetPrior
is:
true
, thenrestart
sets the prior parameter values ofmdl
to their corresponding current posterior parameter values. For example,mdl.Prior.Theta
is set tomdl.Theta
.false
or omitted, thenrestart
does not update the prior.
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN
, where Name
is
the argument name and Value
is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Before R2021a, use commas to separate each name and value, and enclose
Name
in quotes.
Example: nv1,'value'
Theta
— Mean value of model θ parameter
scalar
This property is read-only.
Mean value of model θ parameter, specified as the
comma-separated pair 'Theta'
and a scalar. Use this
argument to set the Theta
property of
mdl
and the corresponding field of the
Prior
property of
mdl
.
ThetaVariance
— Variance of model θ parameter
nonnegative scalar
This property is read-only.
Variance of the θ parameter in the degradation
model, specified as the comma-separated pair
'ThetaVariance'
and a nonnegative scalar. Use
this argument to set the ThetaVariance
property of
mdl
and the corresponding field of the
Prior
property of
mdl
.
Beta
— Mean value of model β parameter
scalar
This property is read-only.
Mean value of model β parameter, specified as the
comma-separated pair 'Beta'
and a scalar. Use this
argument to set the Beta
property of
mdl
and the corresponding field of the
Prior
property of
mdl
.
This argument applies only when mdl
is an
exponentialDegradationModel
.
BetaVariance
— Variance of model β parameter
nonnegative scalar
This property is read-only.
Variance of model β parameter, specified as the
comma-separated pair 'BetaVariance'
and a nonnegative
scalar. Use this argument to set the BetaVariance
property of mdl
and the corresponding field of the
Prior
property of
mdl
.
This argument applies only when mdl
is an
exponentialDegradationModel
.
Rho
— Correlation between θ and β
scalar value in the range [-1,1]
This property is read-only.
Correlation between θ and β,
specified as the comma-separated pair 'Rho'
and a
scalar value in the range [-1,1]. Use this argument to set the
Rho
property of mdl
and the
corresponding field of the Prior
property of
mdl
.
This argument applies only when mdl
is an
exponentialDegradationModel
.
NoiseVariance
— Model additive noise variance
nonnegative scalar
Model additive noise variance, specified as the comma-separated pair
'NoiseVariance'
and a nonnegative scalar. Use
this argument to set the NoiseVariance
property of
mdl
.
SlopeDetectionLevel
— Slope detection level
scalar value in the range [0,1] | []
Slope detection level for determining the start of the degradation
process, specified as the comma-separated pair
'SlopeDetectionLevel'
and a scalar in the range
[0,1]. Use this argument to set the
SlopeDetectionLevel
property of
mdl
.
To disable the slope detection test, set
SlopeDetectionLevel
to
[]
.
UseParallel
— Flag for using parallel computing
false
(default) | true
Flag for using parallel computing when fitting prior values from data,
specified as the comma-separated pair 'UseParallel'
and either true
or false
. Use this
argument to set the UseParallel
property of
mdl
.
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Usage notes and limitations:
This command supports code generation with MATLAB® Coder™. Before generating code that uses an RUL model, you must save the model using
saveRULModelForCoder
. For an example, see Generate Code for Predicting Remaining Useful Life.
Version History
Introduced in R2018a
See Also
Functions
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)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)