Reset remaining useful life degradation model

`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.

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:

$\theta $ prior distribution with a mean of

`2.4`

and a variance of`0.006`

$\beta $ prior distribution with a mean of

`0.07`

and a variance of`3e-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)

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 $\theta $ and $\beta $ 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

`mdl`

— Degradation RUL model`linearDegradationModel`

object | `exponentialDegradationModel`

objectDegradation 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`

, then`restart`

sets the prior parameter values of`mdl`

to their corresponding current posterior parameter values. For example,`mdl.Prior.Theta`

is set to`mdl.Theta`

.`false`

or omitted, then`restart`

does not update the prior.

Specify optional
comma-separated pairs of `Name,Value`

arguments. `Name`

is
the argument name and `Value`

is the corresponding value.
`Name`

must appear inside quotes. You can specify several name and value
pair arguments in any order as
`Name1,Value1,...,NameN,ValueN`

.

`nv1,'value'`

`'Theta'`

— Mean value of model 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 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 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 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 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 variancenonnegative 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 levelscalar 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`

.

A modified version of this example exists on your system. Do you want to open this version instead?

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.

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: .

Select web siteYou can also select a web site from the following list:

Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.

- América Latina (Español)
- Canada (English)
- United States (English)

- 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)