update
Update posterior parameter distribution of degradation remaining useful life model
Syntax
Description
Examples
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.
update
updates the posterior estimates of the
degradation model parameters based on the latest degradation feature
measurements in data
.
For a linearDegradationModel
, the updated parameters
are Theta
and ThetaVariance
.
For an exponentialDegradationModel
, the updated
parameters are Theta
, ThetaVariance
,
Beta
, BetaVariance
, and
Rho
.
update
also sets the following properties of
mdl
:
InitialLifeTimeValue
— The first time you callupdate
, this property is set to the life time value in the first row ofdata
.CurrentLifeTimeValue
— Each time you callupdate
, this property is set to the life time value in the last row ofdata
.CurrentMeasurement
— Each time you callupdate
, this property is set to the feature measurement value in the last row ofdata
.
data
— Degradation feature measurements
two-column array | table
object
Degradation feature measurements, specified as one of the following:
Two-column array — The first column contains life time values and the second column contains the corresponding degradation feature measurement.
table
ortimetable
object that contains variables with names that match theLifeTimeVariable
andDataVariables
properties ofmdl
.
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
. When updating the model at run time, it is also useful to store the model state usingreadState
. For an example, see Generate Code That Preserves RUL Model State for System Restart.
Version History
Introduced in R2018a
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)