学堂 学堂 学堂公众号手机端

【通信】基于时间重新分配的多同步压缩变换附matlab代码

lewis 6年前 (2019-06-16) 阅读数 10 #技术
1 内容介绍

时频分析方法在信号处理领域有着举足轻重的地位,是处理和分析信号的重要工具.它提供信号时频域的分布信息,清楚地描述着信号的频率随着时间变化的关系.本文对时频分析方法开展了一系列的研究.首先介绍并分析了一些常用的时频分析方法:短时傅里叶变换,连续小波变换,S变换与三参数广义S变换.紧接着引入近两年新兴的一种高精度时频分析方法-多重同压缩变换(MSST).此方法是在短时傅里叶变换的基础上提出的,其对得到的短时傅里叶时频谱进行同步压缩变换,将分布在真实频率周围的发散能量挤压到真实频率中心,得到一个精度较高的时频谱,在此基础上重复"挤压"过程,以此迭代来提高时频谱的时频精度,且减少了交叉项和模态混叠造成的影响

2 部分代码

%Figures 1-5

clear;


load('vib_data1.mat')

fs = 12000; N = 2400; % sampling frequency and points

time = (1:N)/fs; % time sequence

fre = (fs/2)/(N/2):(fs/2)/(N/2):(fs/2); % frequency sequence

fre2=fliplr(fre);

data=data(1:N);

[tfr]=STFT_Y(data,150);


%Figure 1


figure;

subplot(211)

plot(time,data);

xlabel('Time (s)');

ylabel('Amp (g)');

subplot(212)

imagesc(time,fre/1000,abs(tfr));

xlabel('Time (s)');

ylabel('Fre (kHz)');

axis xy

axis([time(1) time(end) 2.4 4]);


.................................................................


x1=0.0205; x2=0.03958;

y1=3; y2=3.8;


x11=0.1605; x22=0.1787;

y11=3; y22=3.8;


[Ts1]=TMSST_Y(data,170,1);


%[Ts1]=TMSST_Z(data,170,1);

%Ts1=Ts1(1:round(N/2),:);


%Figure 2


figure;

subplot(2,2,[1 2])

imagesc(time,fre/1000,abs(Ts1));

xlabel('Time (s)');

ylabel('Fre (kHz)');

axis xy

axis([time(1) time(end) 2.4 4]);

rectangle('Position',[x1 y1 x2-x1 y2-y1],'EdgeColor','red','Linewidth',1);

rectangle('Position',[x11 y11 x22-x11 y22-y11],'EdgeColor','red','Linewidth',1);

ha=subplot(2,2,3);

imagesc(time,fre/1000,abs(Ts1));

xlabel('Time (s)');

ylabel('Fre (kHz)');

axis xy

set(ha,'xlim',[x1 x2],'ylim',[y1 y2]);


ha=subplot(2,2,4);

imagesc(time,fre/1000,abs(Ts1));

xlabel('Time (s)');

ylabel('Fre (kHz)');

axis xy

set(ha,'xlim',[x11 x22],'ylim',[y11 y22]);

..............................................................

[Ts10]=TMSST_Y(data,170,10);

%[Ts10]=TMSST_Z(data,170,10);

%Ts10=Ts10(1:round(N/2),:);


%Figure 3


figure;

subplot(2,2,[1 2])

imagesc(time,fre/1000,abs(Ts10));

xlabel('Time (s)');

ylabel('Fre (kHz)');

axis xy

axis([time(1) time(end) 2.4 4]);

rectangle('Position',[x1 y1 x2-x1 y2-y1],'EdgeColor','red','Linewidth',1);

rectangle('Position',[x11 y11 x22-x11 y22-y11],'EdgeColor','red','Linewidth',1);

ha=subplot(2,2,3);

imagesc(time,fre/1000,abs(Ts10));

xlabel('Time (s)');

ylabel('Fre (kHz)');

axis xy

set(ha,'xlim',[x1 x2],'ylim',[y1 y2]);


ha=subplot(2,2,4);

imagesc(time,fre/1000,abs(Ts10));

xlabel('Time (s)');

ylabel('Fre (kHz)');

axis xy

set(ha,'xlim',[x11 x22],'ylim',[y11 y22]);

..................................................................

[Ts10]=TMSST_Y(data,170,10);


for i=1:round(N/2)

K11(i)=max(abs(fft(detrend(abs(Ts10(i,:))))));

end


[~,index]=max(K11);


x1=0.0205; x2=0.03958;

y1=0; y2=1.5;


x11=0.1605; x22=0.1787;

y11=0; y22=1.5;


%Figure 4


figure;

subplot(3,2,[1 2]);

plot(fre,K11);

xlabel('Fre (Hz)');

ylabel('Amp (g)');

axis([0 6000 0 30]);

subplot(3,2,[3 4]);

plot(time,abs(Ts10(index,:)));

xlabel('Time (s)');

ylabel('Amp (g)');

rectangle('Position',[x1 y1 x2-x1 y2-y1],'EdgeColor','red','Linewidth',1);

rectangle('Position',[x11 y11 x22-x11 y22-y11],'EdgeColor','red','Linewidth',1);


ha=subplot(3,2,5);

plot(time,abs(Ts10(index,:)));

xlabel('Time (s)');

ylabel('Amp (g)');

set(ha,'xlim',[x1 x2],'ylim',[y1 y2]);

ha=subplot(3,2,6);

plot(time,abs(Ts10(index,:)));

xlabel('Time (s)');

ylabel('Amp (g)');

set(ha,'xlim',[x11 x22],'ylim',[y11 y22]);


.......................................................


[Ts10]=TMSST_Z(data,170,10);

[mode, TFM] = TCD_Z(Ts10,1.18);


Ts10=Ts10(1:round(N/2),:);

TFM=squeeze(TFM(1,1:round(N/2),:));


%Figure 5


figure;

subplot(2,1,1)

imagesc(time,fre/1000,abs(TFM));

ylabel('Fre (kHz)');

axis xy

axis([time(1) time(end) 2.4 4]);

colorbar;

subplot(2,1,2)

plot(time,data,'b-','Linewidth',1);hold on;plot(time,mode,'r-','Linewidth',1);

xlabel('Time (s)');

ylabel('Amp (g)');

axis([time(1) time(end) -3 3]);

legend('Original signal','Reconstructed signal');

3 运行结果

4 参考文献

[1]钱红艳. 多重同步压缩变换的提升算法及其在地震信号处理中的应用.

部分理论引用网络文献,若有侵权联系博主删除。


版权声明

本文仅代表作者观点,不代表博信信息网立场。

热门