資源簡介
軸承故障分解程序,給予小波變換,小波去噪,小波重構與EMD相結合,有時頻譜,邊際譜,功率譜
代碼片段和文件信息
clear;
close?all;%關閉所有
clc;%清除命令窗口?
figure(1);
set(gcf‘Color‘‘W‘);
fidu=fopen(‘c:\MATLAB7\work\xsj\Omega8=5\u1.dat‘);
fidv=fopen(‘c:\MATLAB7\work\xsj\Omega8=5\u3.dat‘);
fidt=fopen(‘c:\MATLAB7\work\xsj\Omega8=5\tol.dat‘);
U=fscanf(fidu‘%g‘);?
V=fscanf(fidv‘%g‘);
C=fscanf(fidt‘%g‘);
status=fclose(fidu);
status=fclose(fidv);
status=fclose(fidt);
A=U*1000;
B=V*1000;?
E=C/2/5/pi/18;
subplot(221);%?x?方向波形
plot(EA‘b‘);
title(‘X軸信號圖‘);
xlabel(‘時間t/s‘);
ylabel(‘位移x/mm‘);?
axis([20?20.4?-Inf?Inf]);
%set(gca‘ytickLabel‘[-2?-1?0?1?2?]);
%set(gca‘xtickLabel‘[0?0.001?0.002?0.003?0.004]);
subplot(222);
plot(A(1:50000)B(1:50000)‘b‘);
title(‘軸心軌跡圖‘);
xlabel(‘位移x/mm‘);?
ylabel(‘位移y/mm‘);?
%axis([-4?4?-4?4]);
Y=fft(A131072);
N=length(Y);
M1=abs(Y(1:N/2));
M=M1*2.5/N;
f=(0:(N-1)/2)/N*4096;
?
subplot(223);%?x方向頻譜
plot(fM‘b‘);
title(‘X軸頻譜圖‘);
xlabel(‘頻率比f/\omega‘);
ylabel(‘幅值x/mm‘);
set(gca‘xtick‘[0?0.5?1.0?1.5?2?2.5?3]);
axis([0?2.5?0?Inf]);
Y=fft(B131072);
N=length(Y);
M1=abs(Y(1:N/2));
M=M1*2.0/N;
f=(0:(N-1)/2)/N*4096;
subplot(224);?%?y?方向頻譜
plot(fM‘b‘);
title(‘Y軸頻譜圖‘);
xlabel(‘頻率比f/\omega‘);
ylabel(‘幅值y/mm‘);
axis([0?2.5?0?Inf]);
set(gca‘xtick‘[0?0.5?1.0?1.5?2?2.5?3]);
figure(2);
fidu=fopen(‘c:\MATLAB7\work\xsj\Omega8=5\u1.dat‘);
fidv=fopen(‘c:\MATLAB7\work\xsj\Omega8=5\u3.dat‘);
fidt=fopen(‘c:\MATLAB7\work\xsj\Omega8=5\tol.dat‘);?
U=fscanf(fidu‘%g‘);
V=fscanf(fidv‘%g‘);
C=fscanf(fidt‘%g‘);
status=fclose(fidu);
status=fclose(fidv);
status=fclose(fidt);
A=U*10000000;
B=V*10000000;
E=C/2/5/pi/18;
?%信號的n次分解
n=4;
[CL]=wavedec(An‘db4‘);%多尺度一維小波分解
[EaEd]?=?wenergy(CL);
cA4=appcoef(CL‘db4‘n);%提取一維小波變換低頻系數
%cD5=detcoef(CL5);%提取一維小波變換高頻系數
cD4=detcoef(CL4);
cD3=detcoef(CL3);
cD2=detcoef(CL2);
cD1=detcoef(CL1);
A4=wrcoef(‘a‘CL‘db4‘4);%由一維小波系數進行單支重構
%D5=wrcoef(‘d‘CL‘db4‘5);
D4=wrcoef(‘d‘CL‘db4‘4);
D3=wrcoef(‘d‘CL‘db4‘3);
D2=wrcoef(‘d‘CL‘db4‘2);
D1=wrcoef(‘d‘CL‘db4‘1);
subplot(511);plot(A4);title(‘近似部分A4db4‘);axis([0?8192?-Inf?Inf]);
%subplot(612);plot(D5);title(‘細節部分D5db4‘);axis([0?2048?-0.7?0.7]);
subplot(512);plot(D4);title(‘細節部分D4db4‘);axis([0?8192?-0.05?0.05]);
subplot(513);plot(D3);title(‘細節部分D3db4‘);axis([0?8192?-0.1?0.1]);
subplot(514);plot(D2);title(‘細節部分D2db4‘);axis([0?8192?-0.1?0.1]);
subplot(515);plot(D1);title(‘細節部分D1db4‘);axis([0?8192?-0.1?0.1]);
set(gcf‘Color‘‘W‘);
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????2623??2010-06-09?10:00??xsj\five.m
?????文件???????2637??2010-06-13?16:14??xsj\fivepfive.m
?????文件????????692??2010-06-03?13:50??xsj\MaxMode.m
?????文件????9026193??2004-07-22?14:46??xsj\Omega8=7\tol.dat
?????文件???13639093??2004-07-22?14:46??xsj\Omega8=7\u1.dat
?????文件???13197378??2004-07-22?14:46??xsj\Omega8=7\u3.dat
?????文件????????189??2004-07-22?13:53??xsj\Omega8=7\新建?文本文檔.txt
?????文件???????2644??2010-06-13?16:03??xsj\onepeight.m
?????文件???????2635??2010-06-09?09:38??xsj\onepfive.m
?????文件???????2518??2010-06-10?19:02??xsj\oneptwo.asv
?????文件???????2947??2010-06-13?15:58??xsj\oneptwo.m
?????文件????????418??2010-06-10?17:58??xsj\r1.asv
?????文件????????192??2010-06-10?17:58??xsj\r1.m
?????文件???????2637??2010-06-13?16:11??xsj\three.m
?????文件???????2637??2010-06-13?16:12??xsj\threepfive.m
?????文件???????2635??2010-06-13?16:05??xsj\two.m
?????文件???????2635??2010-06-13?16:09??xsj\twopeight.m
?????文件???????2596??2010-06-09?09:16??xsj\twopfive.m
?????文件???????2635??2010-06-13?16:07??xsj\twopone.m
?????文件???????2635??2010-06-09?09:53??xsj\twopseven.m
?????文件???????2619??2010-06-09?09:51??xsj\twopthree.m
?????文件???????2707??2010-06-09?10:08??xsj\twoptwo.m
?????文件????????187??2010-06-07?22:47??xsj\新建?文本文檔.txt
?????目錄??????????0??2012-11-26?14:57??xsj\Omega8=5.5
?????目錄??????????0??2010-06-01?08:41??xsj\Omega8=7
?????目錄??????????0??2010-06-10?19:02??xsj
-----------?---------??----------?-----??----
?????????????35904082????????????????????26
- 上一篇:wind coefficient
- 下一篇:夜間圖像增強
評論
共有 條評論