核心内容摘要
如何快速构建无障碍企业级后台:antd-admin焦点管理与ARIA属性终极指南
✅作者简介热爱科研的Matlab仿真开发者擅长毕业设计辅导、数学建模、数据处理、建模仿真、程序设计、完整代码获取、论文复现及科研仿真。
往期回顾关注个人主页Matlab科研工作室 关注我领取海量matlab电子书和数学建模资料个人信条格物致知,完整Matlab代码获取及仿真咨询内容私信。
内容介绍
DWVD简介DWVD即离散韦格纳分布Discrete Wigner-Ville Distribution是轴承故障诊断领域中一种先进的时频分析技术它基于信号能量分布进行计算。
通过评估信号自身的时频相干性DWVD能够生成一张能量高度集中的时频分布图。
对于轴承局部损伤例如点蚀、裂纹引发的瞬态冲击响应DWVD展现出卓越的性能它不仅能以极高的时频分辨率精确捕捉每个故障冲击的发生时刻和持续时间还能清晰展现冲击能量集中的共振频带及其调制边带结构在时频面上形成连续且尖锐的时频脊线。
这种出色的时频凝聚特性使DWVD对微弱故障极为敏感能够有效揭示被强噪声掩盖的早期故障特征。
此外由于DWVD采用无窗设计它克服了短时傅里叶变换中时间分辨率与频率分辨率之间的权衡限制提供了更为真实和精细的信号能量演化视图。
这些优势使DWVD非常适合在复杂工况下进行轴承故障的精确诊断不仅能有效识别外圈、内圈、滚动体等部件的特征故障频率还能深入揭示调制现象中的频率成分以及冲击信号的传播特性为故障类型的判定、损伤程度的评估以及故障演化趋势的预测提供丰富且可靠的时频特征依据。
本期我们将展示使用DWVD变换对凯斯西储大学CWRU轴承故障数据进行分析诊断的案例如图所示。
版本及示范数据说明本次分析使用的软件版本为matlab2024a及以上具体代码在24a版本上运行示范数据则采用了凯斯西储大学CWRU提供的10种轴承故障数据。
重磅发布我们率先提出了一种创新的轴承故障诊断方法即基于改进多尺度卷积神经网络模型DVMGRUDWVD-MCNN-KELM融合时频变换与改进多尺度卷积网络紧跟当前发文热点。
该方法结合了“离散韦格纳分布(Discrete Wigner-Ville DistributionDWVD)、多尺度卷积神经网络MCNN以及门控循环网络GRU”的各自优势。
其中多尺度卷积神经网络MCNN作为CNN的变体具备比传统CNN更强的特征提取能力。
当前网络模型介绍当前我们采用的网络模型为DVMGRUDWVD-MCNN-GRU它融合了时频变换与改进多尺度深卷积神经网络的优势。
据知网查询截图显示该模型目前尚未被他人使用具有先发优势
模型详细介绍该模型首先利用时频方法将数据序列转换为二维图像以增强故障特征的可见性随后选用“交叉熵”损失函数作为网络训练的指导标准并合理划分训练集、验证集和测试集。
在网络训练过程中通过验证集不断优化模型降低损失确保模型的泛化能力不受影响最后采用T-SNE方法对网络识别前后的效果进行可视化展示。
⛳️ 运行结果 部分代码function [Metrics]polygonareametric(ActualLabel, PredictedLabel,isPlot)%%%%% WARNING %%%%%%%%NUMERICALLY LARGER CLASS WILL BE AUTOMATICALLY ASSIGNED AS PositiveClass%THIS IS BECAUSE OF THE FUNCTION OF perfcurve. IT REQUIRES LARGER CLASS AS PositiveClass.% INTRODUCTION:% This study proposes a stable and profound knowledge criterion that allows the performance of a classifier% to be evaluated with only a single metric called as polygon area metric (PAM). This function is not only% calculates PAM value, but also gives Classification Accuracy (CA), Sensitivity (SE), Specificity (SP),% Kappa (K) and F measure metrics.%% CITATION INFORMATION:% Please cite the following paper for the usage of PAM value:% Aydemir O., A New Performance Evaluation Metric for Classifiers: Polygon Area Metric, Journal of Classification, (
. https://doi.org/
1
1007/s
%% USAGE OF THE FUNCTION:% INPUTS;% -ActualLabel: Actual label of the trials (samples), 1xN dimension binary labels% -PredictedLabel: Predicted (estimated) label of the trials (samples), 1xN dimension binary labels% -isPlot: A logical value indicating whether the resultant figure will be drawn. Default is true%% OUTPUT;% -Metrics: This struct gives 7 evaluation metrics which are Polygon Area...% (PA), Classification_Accuracy (CA), Sensitivity (SE), Specificity...% (SP), AUC (AUC), Kappa (K), F_measure (F_M), respectively.% AUC: Area under curve value, which should be obtained by Receiver operating characteristic (ROC), 0AUC1%% EXAMPLE;% -ActualLabel[1 1 1 1 1 0 0 0 0];% -PredictedLabel[1 1 1 0 0 0 0 0 1];% -[Metrics]polygonareametric(ActualLabel,PredictedLabel)%Code introductionif nargin2error(You have to supply all required input paremeters, which are ActualLabel, PredictedLabel)endif nargin 3isPlot true;end%plotting the widest polygonA11;A21;A31;A41;A51;A61;a[-A1 -A2/2 A3/2 A4 A5/2 -A6/2 -A1];b[0 -(A2*sqrt(
)/2 -(A3*sqrt(
)/2 0 (A5*sqrt(
)/2 (A6*sqrt(
)/2 0];if isPlotfigureplot(a, b, --bo,LineWidth,
1.
axis([-
5
5 -
5
5]);set(gca,FontName,Times New Roman,FontSize,
;hold on%gridend% Calculating the True positive (TP), False Negative (FN), False Positive...% (FP),True Negative (TN), Classification Accuracy (CA), Sensitivity (SE), Specificity (SP),...% Kappa (K) and F measure (F_M) metricsPositiveClassmax(ActualLabel);NegativeClassmin(ActualLabel);cpclassperf(ActualLabel,PredictedLabel,Positive,PositiveClass,Negative,NegativeClass);CMcp.DiagnosticTable;TPCM(1,
;FNCM(2,
;FPCM(1,
;TNCM(2,
;CAcp.CorrectRate;SEcp.Sensitivity; %TP/(TPFN)SPcp.Specificity; %TN/(TNFP)PrTP/(TPFP);ReTP/(TPFN);F_M2*Pr*Re/(PrRe);FPRFP/(TNFP);TPRTP/(TPFN);KTP/(TPFPFN);[X1,Y1,T1,AUC] perfcurve(ActualLabel,PredictedLabel,PositiveClass);%ActualLabel(
means that the first class is assigned as positive class%plotting the calculated CA, SE, SP, AUC, K and F_M on polygonx[-CA -SE/2 SP/2 AUC K/2 -F_M/2 -CA];y[0 -(SE*sqrt(
)/2 -(SP*sqrt(
)/2 0 (K*sqrt(
)/2 (F_M*sqrt(
)/2 0];if isPlotplot(x, y, -ko,LineWidth,
set(gca,FontName,Times New Roman,FontSize,
;% shadowFill(x,y,pi/4,
fill(x, y,[
8706
9216
9804])end%calculating the PAM value% Get the number of verticesn length(x);% Initialize the areap_area 0;% Apply the formulafor i 1 : n-1p_area p_area (x(i) x(i
) * (y(i) - y(i
);endp_area abs(p_area)/2;%Normalization of the polygon area to one.PAp_area/
59807;if isPlot%Plotting the Polygonplot(0,0,r)plot([0 -A1],[0 0] ,--ko)text(-A1-
3, 0,CA,FontWeight,bold,FontName,Times New Roman)plot([0 -A2/2],[0 -(A2*sqrt(
)/2] ,--ko)text(-
59,-
05,SE,FontWeight,bold,FontName,Times New Roman)plot([0 A3/2],[0 -(A3*sqrt(
)/2] ,--ko)text(
5, -
05,SP,FontWeight,bold,FontName,Times New Roman)plot([0 A4],[0 0] ,--ko)text(A
4