資源簡介
首先根據 Harr 小波理論,給出基于 Harr 小波的信號分解與重構算法;然后根據軸承元件之間滾動接觸的速度關系建立的方程,求得滾動軸承的特征頻率。
代碼片段和文件信息
clear?all
clc
load?10k_32768_5.dat
s=X10k_32768_5‘;
fs=10000;?????????????????????????????????????????????????%采樣頻率
N=32768;??????????????????????????????????????????????????%采樣點數
[cl]=wavedec(s11‘haar‘);??%11層分解
ca1=appcoef(cl‘haar‘1);???%V10
ca2=appcoef(cl‘haar‘2);???%V9
ca3=appcoef(cl‘haar‘3);???%V8
ca4=appcoef(cl‘haar‘4);???%V7
ca5=appcoef(cl‘haar‘5);???%V6
ca6=appcoef(cl‘haar‘6);???%V5
ca7=appcoef(cl‘haar‘7);???%V4
ca8=appcoef(cl‘haar‘8);???%V3
ca9=appcoef(cl‘haar‘9);???%V2
ca10=appcoef(cl‘haar‘10);???%V1
ca11=appcoef(cl‘haar‘11);???%V0
cd1=detcoef(cl1);???%W10
cd2=detcoef(cl2);???%W9
cd3=detcoef(cl3);???%W8
cd4=detcoef(cl4);???%W7
cd5=detcoef(cl5);???%W6
cd6=detcoef(cl6);???%W5
cd7=detcoef(cl7);???%W4
cd8=detcoef(cl8);???%W3
cd9=detcoef(cl9);???%W2
cd10=detcoef(cl10);???%W1
cd11=detcoef(cl11);???%W0
%消噪,將高頻成分中小于閾值的數置零,規則自行改變
k=100;?????????????????????????????%設置一個閾值自行改變這個閾值,以達到最佳效果
d11=cd11;
d10=cd10;
d9=cd9;
d8=cd8;
d7=cd7;
d6=cd6;
d6(find(d6
d5=cd5;
d5(find(d5
d4=cd4;
d4(find(d4
d3=cd3;
d3(find(d3
d2=cd2;
d2(find(d2
d1=cd1;
d1(find(d1
d1=zeros(1length(d1));
c=[ca11?d11?d10?d9?d8?d7?d6?d5?d4?d3?d2?d1];
s_rec=waverec(cl‘haar‘);
f_rec=abs(fft(hilbert(s_rec)))*2/N;???%希爾伯特變換
figure(1)
plot(s);xlim([0?N]);title(‘外圈故障原始信號‘)
axis([01500000.5]);
figure(2);
subplot(511);plot(ca1);ylabel(‘V10‘);title(‘第一層近似系數‘)
subplot(512);plot(ca2);ylabel(‘V9‘);title(‘第二層近似系數‘)
subplot(513);plot(ca3);ylabel(‘V8‘);title(‘第三層近似系數‘)
subplot(514);plot(ca4);ylabel(‘V7‘);title(‘第四層近似系數‘)
subplot(515);plot(ca5);ylabel(‘V6‘);title(‘第五層近似系數‘)
figure(3);
subplot(611);plot(ca6);ylabel(‘V5‘);title(‘第六層近似系數‘)
subplot(612);plot(ca7);ylabel(‘V4‘);title(‘第七層近似系數‘)
subplot(613);plot(ca8);ylabel(‘V3‘);title(‘第八層近似系數‘)
subplot(614);plot(ca9);ylabel(‘V2‘);title(‘第九層近似系數‘)
subplot(615);plot(ca10);ylabel(‘V1‘);title(‘第十層近似系數‘)
subplot(616);plot(ca11);ylabel(‘V0‘);title(‘第十一層近似系數‘)
figure(4);
subplot(611);plot(cd1);ylabel(‘W10‘);title(‘第一層小波細節系數‘)%細節系數
subplot(612);plot(cd2);ylabel(‘W9‘);title(‘第二層小波細節系數‘)
subplot(613);plot(cd3);ylabel(‘W8‘);title(‘第三層小波細節系數‘)
subplot(614);plot(cd4);ylabel(‘W7‘);title(‘第四層小波細節系數‘)
subplot(615);plot(cd5);ylabel(‘W6‘);title(‘第五層小波細節系數‘)
subplot(616);plot(cd6);ylabel(‘W5‘);title(‘第六層小波細節系數‘)
figure(5);
subplot(511);plot(cd7);ylabel(‘W4‘);title(‘第七層小波細節系數‘)
subplot(512);plot(cd8);ylabel(‘W3‘);title(‘第八層小波細節系數‘)
subplot(513);plot(cd9);ylabel(‘W2‘);title(‘第九層小波細節系數‘)
subplot(514);plot(cd10);ylabel(‘W1‘);title(‘第十層小波細節系數‘)
subplot(515);plot(cd11);ylabel(‘W0‘);title(‘第十一層小波細節系數‘)
figure(6)
subplot(211);plot(s_rec);xlim([0?N]);title(‘進行小波分解后重組信號時域圖‘)
axis([01500000.22]);
subplot(212);plot(0:2*fs/N:2*(N/2-1)*fs/Nf_rec(1:N/2));titl
評論
共有 條評論