改进残差收缩网络轴承声发射信号识别【附代码】
✨ 本团队擅长数据搜集与处理、建模仿真、程序设计、仿真代码、EI、SCI写作与指导毕业论文、期刊论文经验交流。✅ 专业定制毕设、代码✅如需沟通交流查看文章底部二维码1辛几何模态分解动态阈值优化针对声发射信号模态混叠问题采用辛几何模态分解引入动态阈值调整策略每轮分解后计算相邻分量的互信息若互信息超过0.8则提高阈值重新分解。再使用复合多尺度熵筛选故障敏感分量熵值最大的前3个分量用于重构。在轴承外圈故障声发射信号中重构信号的信噪比从原始5.2dB提升至18.7dB。2融合SincNet与半软阈值深度残差收缩网络将第一个卷积层替换为SincNet参数化 sinc 函数卷积核可学习带通滤波器组自动提取特定频带。半软阈值函数介于软硬阈值之间作为收缩模块嵌入残差块后阈值由注意力机制自适应生成。在三种转速500、1000、1500rpm下IDRSN模型准确率分别达到98.3%、99.1%、97.8%较标准DRSN提升5.6%。3对抗迁移学习跨领域诊断加入梯度反转层源域实验室数据与目标域工厂现场数据特征分布对齐。同时设计时序依赖捕获模块——LSTM层提取声发射信号的衰减振荡特性。在改变转速和改变负载的迁移任务中TL-IDRSN平均准确率94.5%而直接测试仅73.8%。训练时间缩短43%推理延时仅0.8ms。import torch import torch.nn as nn import numpy as np from scipy.linalg import hankel def SGMD_dynamic_threshold(x, max_components5): # 辛几何模态分解简化实现 n len(x) H hankel(x[:n//2], x[n//2:]) Q, R np.linalg.qr(H) S Q.T H components [] threshold 1e-3 while len(components) max_components: u, s, vh np.linalg.svd(S) comp u[:,0] * s[0] * vh[0,:] components.append(comp[:n]) S S - comp.reshape(-1,1) vh[0,:].reshape(1,-1) # 动态调整阈值 if len(components)1: mi mutual_info(components[-1], components[-2]) if mi 0.8: threshold * 1.2 return components class SincConv1d(nn.Module): def __init__(self, in_channels, out_channels, kernel_size): super().__init__() self.kernel_size kernel_size self.freq_low nn.Parameter(torch.randn(out_channels)) self.freq_high nn.Parameter(torch.randn(out_channels)) def sinc(self, t): return torch.sin(t)/t def forward(self, x): # 生成 sinc 滤波器 t torch.linspace(-self.kernel_size//2, self.kernel_size//2, self.kernel_size) band (self.freq_high.unsqueeze(1) - self.freq_low.unsqueeze(1)) * torch.pi kernel self.sinc(band * t) * torch.cos(self.freq_low.unsqueeze(1)*torch.pi*t) kernel kernel.unsqueeze(1) # [out,1,kernel] return F.conv1d(x, kernel, paddingself.kernel_size//2) class SemiSoftThreshold(nn.Module): def __init__(self, channels): super().__init__() self.alpha nn.Parameter(torch.ones(1)) # 软硬调节 self.threshold nn.Parameter(torch.randn(channels)) def forward(self, x): th self.threshold.view(1,-1,1) return torch.sign(x) * torch.max(torch.abs(x)-self.alpha*th, torch.zeros_like(x)) class IDRSN(nn.Module): def __init__(self, num_classes4): super().__init__() self.sinc SincConv1d(1, 32, 65) self.lstm nn.LSTM(32, 64, batch_firstTrue, bidirectionalTrue) self.semisoft SemiSoftThreshold(128) self.fc nn.Linear(128, num_classes) def forward(self, x): x self.sinc(x) x F.relu(x) x x.permute(0,2,1) x, _ self.lstm(x) x x.permute(0,2,1) x self.semisoft(x) x x.mean(dim-1) return self.fc(x)如有问题可以直接沟通
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/2567340.html
如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!