【故障诊断与隔离】动态系统稀疏故障检测与隔离研究(Matlab代码实现)

 👨‍🎓个人主页:研学社的博客 ​​​​​​​ 

💥💥💞💞欢迎来到本博客❤️❤️💥💥

🏆博主优势:🌞🌞🌞博客内容尽量做到思维缜密,逻辑清晰,为了方便读者。

⛳️座右铭:行百里者,半于九十。

📋📋📋本文目录如下:🎁🎁🎁

目录

💥1 概述

📚2 运行结果

2.2 卡尔曼滤波

2.2 塔尼迪斯滤波 

🎉3 参考文献

🌈4 Matlab代码及数学模型


💥1 概述

动态系统故障诊断经常面临大量可能的故障。为了避免棘手的组合问题,稀疏估计技术似乎是隔离故障的有力工具,假设只有少数可能的故障可以同时处于活动状态。然而,稀疏估计通常在线性代数方程的框架内进行研究,而基于模型的故障诊断通常用于使用涉及内部状态的状态方程建模的动态系统。这些Matlab文件说明了如何通过高效可靠的算法在上述两种形式之间建立联系,主要基于卡尔曼和基塔尼迪斯滤波器生成的残差的高级分析。详细数学模型讲解见第四部分。

📚2 运行结果

2.2 卡尔曼滤波

 

2.2 塔尼迪斯滤波 

 

 部分代码:

%% Call lasso.m while deterimining the value of lambda
% It is possible to choose lambda by cross-validation. 
% This code follows the approach presented in the IEEE-TSP paper.
[~,FitInfo]=lasso(CUpsilon,ytilde, 'NumLambda',2); % First call of lasso for the min and max values of lambda.
Lambda_linspaced = linspace(FitInfo.Lambda(1),FitInfo.Lambda(end),100); % 100 equally (linearly) spaced lambda values.
[thetaLasso,FitInfo]=lasso(CUpsilon,ytilde,'Lambda', Lambda_linspaced); % Call lasso with 100 lambda values.
%thetaLasso contains 100 columns, each corresponding to a value of lambda in Lambda_linspaced.

% Note: lasso.m adds an "Intercept" term, centers CUpsilon and ytilde, and normalizes the columns of CUpsilon. 

numnz = sum(thetaLasso~=0,1); % number of non zero values in each column of thetaLasso

nlam = length(numnz); % number of Lambda values
localct = zeros(1,nlam);
for k=2:nlam  % Increase localct by 1 at each k if numnz does not change
  if numnz(k)==numnz(k-1)
    localct(k) = localct(k-1)+1;
  else
    localct(k) = 0;  % Reset localct to zero if numnz changes
  end
end

% Eliminate non sparse solutions (too large values in numnz)
localct(numnz>p/2) = 0;

% Find largest localct section
[~,endind] = max(localct);
begind = find(localct(1:endind)==0,1,'last');

midind = round((begind+endind)/2); % The column thetaLasso(:,midind) will be retained.

% Replace 0 with NaN for plotting the results
thetaLassoNaN = thetaLasso;
thetaLassoNaN(thetaLassoNaN==0) = nan;

%% Least squares refinement
nzind = find(thetaLasso(:,midind)~=0); % The indexes of non-zero theta components determined by Lasso
thetaLS = CUpsilon(:,nzind)\ytilde;  % Least squares estimates of non-zero theta components
thetaLSfull = nan(p,1);
thetaLSfull(nzind) = thetaLS; % thetaLSfull contains thetaLS completed with NaNs. 
thetaTrueNaN =  thetaTrue;
thetaTrueNaN(thetaTrueNaN==0) = nan; % Replace 0 with NaN for plotting results

%% Plotting results
if ~ishandle(1)&&~ishandle(2)
  figure(1)
  figure(2)
  pos1=get(1,'pos');
  pos2=get(2,'pos');
  pos2(2)=pos1(2)-pos1(4)*1.2;
  set(2, 'pos', pos2)
end

figure(1) 
clf
plot(FitInfo.Lambda,numnz,'-d', FitInfo.Lambda(begind:endind),numnz(begind:endind),'-dr');  
xlabel('$\lambda$', 'interpreter','latex', 'FontSize',12)
text(FitInfo.Lambda(4),mean(numnz(1:2)), 'Number of non-zero \theta components found by Lasso per \lambda', 'FontSize',12)
xlim([0 FitInfo.Lambda(end)])
shg

🎉3 参考文献

部分理论来源于网络,如有侵权请联系删除。

[1] Qinghua Zhang, Dynamic System Fault Diagnosis under Sparseness Assumption. IEEE Transactions

on Signal Processing, doi: 10.1109/TSP.2021.3072004. 2021.
[2] Qinghua Zhanga and Michele Basseville, Statistical detection and isolation of additive faults in linear
time-varying systems. Automatica, 50:2527-2538.  2014.
[3]高永新,戴忠林,秦灿.GASA-PSO优化算法共振稀疏分解齿轮故障诊断研究[J].噪声与振动控制,2022,42(05):123-127.

🌈4 Matlab代码及数学模型

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

荔枝科研社

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值