xiaobosuanfa
代码说明:
采样频率 fs=10000 轴承外环故障信号 fid=fopen( bearingout.dat , r ) 故障 N=1024 xdata=fread(fid,N, int16 ) fclose(fid) xdata=(xdata-mean(xdata))/std(xdata,1) 时域波形 figure(1) plot(1:N,xdata) xlabel( 时间 t/n ) ylabel( 电压 V/v ) db10小波进行4层分解 一维小波分解 [c,l] = wavedec(xdata,4, db10 ) 重构第1~4层细节信号 d4 = wrcoef( d ,c,l, db10 ,4) d3 = wrcoef( d ,c,l, db10 ,3) d2 = wrcoef( d ,c,l, db10 ,2) d1 = wrcoef( d ,c,l, db10 ,1) ( Sampling frequency fs = 10000 bearing outer ring fault signal fid = fopen (' bearingout.dat' , ' r' ) failure N = 1024 xdata = fread (fid, N, ' int16' ) fclose (fid ) xdata = (xdata-mean (xdata))/std (xdata, 1) time-domain waveform figure (1) plot (1: N, xdata) xlabel (' Time t/n' ) ylabel ( ' voltage V/v' ) db10 wavelet decomposition 4 layer one-dimensional wavelet decomposition [c, l] = wavedec (xdata, 4, ' db10' ) 1 ~ 4 reconstructed detail signal d4 = wrcoef (' d' , c, l, ' db10' , 4) d3 = wrcoef (' d' , c, l, ' db10' , 3) d2 = wrcoef (' d' , c, l, ' db10' , 2) d1 = wrcoef (' d' , c, l, ' db10' , 1) )
下载说明:请别用迅雷下载,失败请重下,重下不扣分!