✅作者简介:热爱科研的Matlab仿真开发者,修心和技术同步精进,matlab项目合作可私信。
🍎个人主页:Matlab科研工作室
🍊个人信条:格物致知。
更多Matlab仿真内容点击👇
⛄ 内容介绍
SBM是一种非参数建模方法,其原理为由给定的历史状态向量集合中组成矩阵D,来表征系统正常运行时的状态;然后SBM评估当前状态向量与D内所有向量的相似性,来评估当前系统是否正常运行。核心理念在于把训练数据当作没有错误的数据。
1.最大最小值。把每个测点的最大最小值所在状态的数据均选入状态矩阵,剩余按照L2范数大小递减,并以t为因子进行抽取。
2.几何中值。选择矩阵的几何中值作为初始状态,将剩余的状态与当前选定元素进行比较,若差值小于阈值则选入D中。
3.K-Means聚类。从数据集中随机选择k个数据点作为质心,计算每一个点与每一个质心的距离,并划分到最近的质心所属的集合中,然后重新计算每个集合的质心得到矩阵D。
4.相似度最小填充。随机选取一个点作为初始状态,将剩余的状态与当前选定元素进行比较,每次选取相似度最小(即res值最大)的点。
⛄ 部分代码
function D = stateMatrix(data,t)
% 输入数据生成状态矩阵D
m = size(data,2);
for i=1:m
minnum(i) = find(data(:,i) == min(data(:,i)));
maxnum(i) = find(data(:,i) == max(data(:,i)));
end
snum = unique([minnum,maxnum]);
D1 = data(snum,:); % D1是包含各测点最大最小值的历史数据
remain = setdiff(1:2461,snum);
data_rem = data(remain,:);
n1 = size(data_rem,1);
% 求出每个历史数据的L2范数,并对其降序排列
for j=1:n1
datanorm2(j) = norm(data_rem(j,:),2);
end
[~,index] = sort(datanorm2,'descend');
rem_sorted = zeros(n1,m);
for j=1:n1
rem_sorted(j,:) = data_rem(index(j),:);
end
% 对剩余数据进行抽取
D2 = downsample(rem_sorted,t,round(rand(1,1)*(t-1)));
D = [D1;D2]; % D为最终状态矩阵
⛄ 运行结果
⛄ 参考文献
陈统钱, et al. "基于相似性原理的电厂设备故障预警系统研究." 电工技术 3 (2017): 22-24.
滕卫明, et al. "基于 SBM 技术的发电设备故障预警系统研究." 中国电力 1 (2015): 40-46.
Tobar, Felipe A., et al. "Anomaly detection in power generation plants using similarity-based modeling and multivariate analysis." Proceedings of the 2011 American Control Conference. IEEE, 2011.
L Quintero, Vanessa, et al. "Characterizing the degradation process of lithium-ion batteries using a similarity-based-modeling approach." Fourth European Conference of the Prognostics and Health Management Society 2018, 2018.
Rauber, Thomas W., Francisco de Assis Boldt, and Flávio Miguel Varejão. "Heterogeneous feature models and feature selection applied to bearing fault diagnosis." IEEE Transactions on Industrial Electronics 62.1 (2014): 637-646.
Marins, Matheus A., et al. "Improved similarity-based modeling for the classification of rotating-machine failures." Journal of the Franklin Institute 355.4 (2018): 1913-1930.
Rauber, Thomas W., Francisco de Assis Boldt, and Flávio Miguel Varejão. "Heterogeneous feature models and feature selection applied to bearing fault diagnosis." IEEE Transactions on Industrial Electronics 62.1 (2014): 637-646.