Main Content

このページの内容は最新ではありません。最新版の英語を参照するには、ここをクリックします。

時間局在型の周波数成分の削除

指数的に重み付けされた正弦波で構成される信号を作成します。信号には 2 つの 25 Hz 成分があります。1 つは 0.2 秒を中心とし、もう 1 つは 0.5 秒を中心とします。70 Hz 成分も 2 つあります。1 つは 0.2 秒を中心とし、もう 1 つは 0.8 秒を中心とします。最初の 25 Hz 成分と 70 Hz 成分は同時に発生します。

t = 0:1/2000:1-1/2000;
dt = 1/2000;
x1 = sin(50*pi*t).*exp(-50*pi*(t-0.2).^2);
x2 = sin(50*pi*t).*exp(-100*pi*(t-0.5).^2);
x3 = 2*cos(140*pi*t).*exp(-50*pi*(t-0.2).^2);
x4 = 2*sin(140*pi*t).*exp(-80*pi*(t-0.8).^2);
x = x1+x2+x3+x4;
plot(t,x)
grid on;
title('Superimposed Signal')

Figure contains an axes object. The axes object with title Superimposed Signal contains an object of type line.

CWT を求めて表示します。

cwt(x,2000);
title('Analytic CWT using Default Morse Wavelet');

Figure contains an axes object. The axes object with title Analytic CWT using Default Morse Wavelet, xlabel Time (ms), ylabel Frequency (Hz) contains 3 objects of type image, line, area.

CWT 係数をゼロにして、約 0.07 ~ 0.3 秒の間に発生する 25 Hz 成分を削除します。逆 CWT (icwt) を使用し、信号の Approximation を再構成します。

[cfs,f] = cwt(x,2000);
T1 = .07;  T2 = .33;
F1 = 19;   F2 = 34;
cfs(f > F1 & f < F2, t> T1 & t < T2) = 0;
xrec = icwt(cfs);

再構成された信号の CWT を表示します。初期の 25 Hz 成分が削除されています。

cwt(xrec,2000)

Figure contains an axes object. The axes object with title Magnitude Scalogram, xlabel Time (ms), ylabel Frequency (Hz) contains 3 objects of type image, line, area.

元の信号と再構成したものをプロットします。

subplot(2,1,1);
plot(t,x);
grid on;
title('Original Signal');
subplot(2,1,2);
plot(t,xrec)
grid on;
title('Signal with first 25-Hz component removed');

Figure contains 2 axes objects. Axes object 1 with title Original Signal contains an object of type line. Axes object 2 with title Signal with first 25-Hz component removed contains an object of type line.

0.2 秒を中心とした 25 Hz 成分を含めずに、再構成された信号を元の信号と比較します。

y = x2+x3+x4;
figure;
plot(t,xrec)
hold on
plot(t,y,'r--')
grid on;
legend('Inverse CWT approximation','Original Signal Without 25-Hz');
hold off

Figure contains an axes object. The axes object contains 2 objects of type line. These objects represent Inverse CWT approximation, Original Signal Without 25-Hz.