matlab手册_RUL model

1. a basic example - [exponentialDegradationModel]

– (illustrating RUL prediction with a degradation model)
Update RUL Prediction as Data Arrives.

load UpdateRULExampleData   #Data

exponentialDegradationModel
语法:
m d l = e x p o n e n t i a l D e g r a d a t i o n M o d e l \textcolor{blue}{mdl = exponentialDegradationModel } mdl=exponentialDegradationModel all properities default
m d l = e x p o n e n t i a l D e g r a d a t i o n M o d e l ( N a m e , V a l u e ) \textcolor{blue}{mdl = exponentialDegradationModel(Name,Value)} mdl=exponentialDegradationModel(Name,Value)specify properities在这里插入图片描述
共5 parameters
在这里插入图片描述

通用function command
在这里插入图片描述

语法:
u p d a t e ( m d l , d a t a ) \textcolor{blue}{update(mdl,data)} update(mdl,data)
h e a d ( d a t a x , 5 ) \textcolor{blue}{head(datax, 5)} head(datax,5) %datax是table才可

2. Similarity-Based RUL估计

workflow:

  1. preprocessing,
  2. selecting trendable features, 趋势特征
  3. constructing a health indicator by sensor fusion, 构建健康指标
  4. training similarity RUL estimators,
  5. validating prognostics performance. 验证预测性能
  1. data准备:
    训练数据包含218组从运行到故障的模拟。每一组/ensemble,有26列,为ID, 时间戳记录、3种operating conditions设置,21个传感器测量的数据。

i) 将data进行划分: 训练集 验证集

linearDegradationModel
语法:
m d l = l i n e a r D e g r a d a t i o n M o d e l \textcolor{blue}{mdl = linearDegradationModel} mdl=linearDegradationModel all properities default
m d l = l i n e a r D e g r a d a t i o n M o d e l ( N a m e , V a l u e ) \textcolor{blue}{mdl = linearDegradationModel(Name,Value)} mdl=linearDegradationModel(Name,Value) specify 在这里插入图片描述

residualSimilarityModel
语法:
m d l = r e s i d u a l S i m i l a r i t y M o d e l \textcolor{blue}{mdl = residualSimilarityModel } mdl=residualSimilarityModel all properities default
m d l = r e s i d u a l S i m i l a r i t y M o d e l ( i n i t M o d e l ) \textcolor{blue}{mdl = residualSimilarityModel(initModel) } mdl=residualSimilarityModel(initModel)
m d l = r e s i d u a l S i m i l a r i t y M o d e l ( , N a m e , V a l u e ) \textcolor{blue}{mdl = residualSimilarityModel(_,Name,Value) } mdl=residualSimilarityModel(,Name,Value)

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

%e.g:
load('residualTrainTables.mat')
mdl = residualSimilarityModel('Method',"arma3",'Distance',"absolute");
fit(mdl,residualTrainTables,"Time","Condition")

语法:
C = v e r t c a t ( A , B ) \textcolor{blue}{C = vertcat(A,B)} C=vertcat(A,B) %垂直串联
Y = s p l i t a p p l y ( f u n c , X , G ) \textcolor{blue}{Y = splitapply(func,X,G)} Y=splitapply(func,X,G) %将 X 划分为 G 指定的组,并向每个组应用函数 e.g:splitapply(@mean,Height,G)
A = c e l l f u n ( f u n c , C ) \textcolor{blue}{A = cellfun(func,C)} A=cellfun(func,C) %对元胞数组中的每个元胞应用函数
A = cellfun(___,Name,Value )

centerstats.SD.(char(v)) = splitapply(@std, trainDataUnwrap.(char(v)), clusterIndex);
C = {1:10, [2; 4; 6], []}
A = cellfun(@mean,C)

C = {'Monday','Tuesday','Wednesday','Thursday','Friday'}
A = cellfun(@(x) x(1:3),C,'UniformOutput',false)  %@(x):func作用对象  x(1:3):function/作用对象的范围圈定  C:具体对象   'UniformOutput',false:A形式为cell

A = cellfun(@mean,data)
A = cellfun(@(x),mean(x),data) %x形参,data实参

语法:
B = r o w f u n ( f u n c , A ) \textcolor{blue}{B = rowfun(func,A)} B=rowfun(func,A) %将函数应用于table或timetable行

在这里插入图片描述

B = rowfun(@hypot,A,'OutputVariableNames','z')  % function:hypot, to each row of A.

语法:
C = c e l l s t r ( A ) \textcolor{blue}{C = cellstr(A)} C=cellstr(A) A:string 转cell
M = m o v m e a n ( A , k ) \textcolor{blue}{M = movmean(A,k)} M=movmean(A,k) % k 个数据点的均值组成的数组 Moving mean
M = m o v m e a n ( A , [ k b , k f ] ) \textcolor{blue}{M = movmean(A,[kb, kf])} M=movmean(A,[kb,kf]) %当前位置的元素、后面的 kb 个元素和前面的 kf 个元素,算均值

语法:
c o m p a r e ( m d l , d a t a ) \textcolor{blue}{compare(mdl,data)} compare(mdl,data) %data: (一条不完整线)test component degradation data &(多条全退化线) fit(mdl, 训练用的数据)中’训练用的all数据’ =>重叠画
c o m p a r e ( , N a m e , V a l u e ) \textcolor{blue}{compare(_,Name,Value)} compare(,Name,Value)

语法:
h i s t o g r a m ( , N a m e , V a l u e ) \textcolor{blue}{histogram(_,Name,Value)} histogram(,Name,Value)
在这里插入图片描述
e.g: x = randn(1000,1);
h = histogram(x,‘Normalization’,‘probability’)

在这里插入图片描述

语法:
l i n k a x e s ( a x ) \textcolor{blue}{linkaxes(ax)} linkaxes(ax) 同步all图的坐标范围,以最大的为对齐

*0.

Matlab反复提及:Degradation models estimate the RUL by predicting when a monitored signal will cross a predefined threshold.

*1. 好code
rowNormalized(isnan(rowNormalized) | isinf(rowNormalized)) = 0;

tmp = cellfun(@(tbl) tbl(:, cellstr(dataVariables(ct))), trainDataNormalized, 'UniformOutput', false); %e.g: ct=1
在这里插入图片描述

*2.总指导

在这里插入图片描述

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值