Matlab 实现包络谱分析(共振解调)


% 本数据参数:Recording-10  1500r/min,外圈,径向加载1kN,轴向加载2kN  所有通道可用
% 经过计算 外圈故障特征频率:理论值(5.6Fr=5.6*1500/60=140)
clc
clear all;

load Recording_10.mat

ch1=Channel_1_Data;
ch2=Channel_2_Data;

Fs = 65536;            % Sampling frequency 
T = 1/Fs;             % Sampling period       
L = length(ch1)           % Length of signal
t = (0:L-1)*T;        % Time vector
x = (0:L-1);        

figure(1)
%subplot(2,1,1)
%plot(t,ch1)   % t轴单位是s  
plot(x,ch1)
xlabel('Time/s','fontsize',10.5)
ylabel('Amp','fontsize',10.5)

%axis([0 0.1 -30 30])
axis([0 4000 -50 50])
%subplot(2,1,2)
%plot(ch2)

axis([0 4000 -50 50])

%================FFT===================
                  


Y = fft(ch1);   %此时的Y为复数 a+bi 
%计算双侧频谱 P2。然后基于 P2 和偶数信号长度 L 计算单侧频谱 P1。


P2 = abs(Y/L);
P1 = P2(1:L/2+1);
P1(2:end-1) = 2*P1(2:end-1);
%定义频域 f 并绘制单侧幅值频谱 P1。一般情况下,较长的信号会产生更好的频率近似值。

f = Fs*(0:(L/2))/L;
figure(2)
plot(f,P1) 

title('x-axis vibration spectrogram','fontsize',10.5)

xlabel('Freq','fontsize',10.5)
ylabel('Amp','fontsize',10.5)

% set(gca, 'LineWidth',1)  
% set(gca,'FontSize',10.5);
% set(gcf,'Position',[100 100 1300 280]);

% axis([0 200 0 2])


%================Envelope===================
%  'analytic' 效果不佳
%  40,'rms   效果不错 (推荐)
%  peak 运算较慢   50,'peak 效果较好 特征峰值较高
[up,lo]=envelope(ch1,50,'rms');  
 
figure(3)
subplot(2,1,1)
plot(t,ch1)
axis([0 0.1 -30 30])

hold on;
plot(t,up,'linewidth',1.5)
subplot(2,1,2)
plot(t,up)
axis([0 0.1 -30 30])

%================envelope FFT===================

Y = fft(up);   %此时的Y为复数 a+bi 
%计算双侧频谱 P2。然后基于 P2 和偶数信号长度 L 计算单侧频谱 P1。


P2 = abs(Y/L);
P1 = P2(1:L/2+1);
P1(2:end-1) = 2*P1(2:end-1);
%定义频域 f 并绘制单侧幅值频谱 P1。一般情况下,较长的信号会产生更好的频率近似值。

f = Fs*(0:(L/2))/L;
figure(4)
plot(f,P1,'r') 

title('x-axis vibration spectrogram','fontsize',10.5)

xlabel('Freq','fontsize',10.5)
ylabel('Amp','fontsize',10.5)

% set(gca, 'LineWidth',1)  
% set(gca,'FontSize',10.5);
% set(gcf,'Position',[100 100 1300 280]);

axis([0 200 0 6])


全部评论

相关推荐

10-20 15:26
门头沟学院 Java
桥头牛油火锅:这个比例不正常,简历的话项目经历放中间,项目功能分点可以再明确点,前面加“·”或者“1 2 3”,另外简历上的照片可以去外面摄影店拍一下,以后也会用到的,hr筛人也是多少会看的,毕竟世界是一个巨大的卡颜局嘛,还有有些hr由于消息太多可能没看到,后面可能会回来找你,要简历的还会多一点,我也是普2本,比例大致是600:90:15:3,当然我实力不太够,拿的offer比较少,慢慢来吧
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务