Main Content

힐베르트 변환과 순시 주파수

힐베르트 변환은 단일 성분 신호에 대해서만 신호의 순시 주파수를 추정합니다. 단일 성분 신호는 시간-주파수 평면에서 단일 "리지"로 설명됩니다. 단일 성분 신호 세트는 단일 정현파를 포함하며, 처프(Chirp)와 같은 신호도 포함합니다.

2초 동안 1kHz로 샘플링된 처프를 생성합니다. 주파수가 처음에는 100Hz이고 1초 후 200Hz로 증가하도록 처프를 지정합니다.

fs = 1000;
t = 0:1/fs:2-1/fs;
y = chirp(t,100,1,200);

pspectrum 함수에 구현된 단시간 푸리에 변환을 사용하여 처프의 스펙트로그램을 추정합니다. 각 시점에서의 단일 피크 주파수로 신호가 잘 설명됩니다.

pspectrum(y,fs,'spectrogram')

Figure contains an axes object. The axes object with title Fres = 10.267 Hz, Tres = 250 ms, xlabel Time (s), ylabel Frequency (Hz) contains an object of type image.

해석적 신호를 계산하고 해당 위상을 미분하여 순시 주파수를 측정합니다. 스케일링된 도함수는 유의미한 추정값을 생성합니다.

z = hilbert(y);
instfrq = fs/(2*pi)*diff(unwrap(angle(z)));

clf
plot(t(2:end),instfrq)
ylim([0 fs/2])

Figure contains an axes object. The axes object contains an object of type line.

instfreq 함수는 순시 주파수를 계산하고 표시하는 작업을 한 번에 처리합니다.

instfreq(y,fs,'Method','hilbert')

Figure contains an axes object. The axes object with title Instantaneous Frequency Estimate, xlabel Time (s), ylabel Frequency (Hz) contains an object of type line.

신호가 단일 성분이 아닌 경우에 이 방법은 실패합니다.

2초 동안 1023Hz로 샘플링된, 주파수가 60Hz와 90Hz인 두 정현파가 결합된 신호를 생성합니다. 스펙트로그램을 계산하고 플로팅합니다. 각 시점마다 두 성분이 존재하는 것을 알 수 있습니다.

fs = 1023;
t = 0:1/fs:2-1/fs;
x = sin(2*pi*60*t)+sin(2*pi*90*t);

pspectrum(x,fs,'spectrogram')
yticks([60 90])

Figure contains an axes object. The axes object with title Fres = 10.257 Hz, Tres = 250.2444 ms, xlabel Time (s), ylabel Frequency (Hz) contains an object of type image.

해석적 신호를 계산하고 해당 위상을 미분합니다. 정현파의 주파수를 포함하는 영역을 확대합니다. 해석적 신호는 정현파 주파수의 평균에 해당하는 순시 주파수를 예측합니다.

z = hilbert(x);
instfrq = fs/(2*pi)*diff(unwrap(angle(z)));

plot(t(2:end),instfrq)
ylim([60 90])
xlabel('Time (s)')
ylabel('Frequency (Hz)')

Figure contains an axes object. The axes object with xlabel Time (s), ylabel Frequency (Hz) contains an object of type line.

instfreq 함수는 평균도 추정합니다.

instfreq(x,fs,'Method','hilbert')

Figure contains an axes object. The axes object with title Instantaneous Frequency Estimate, xlabel Time (s), ylabel Frequency (Hz) contains an object of type line.

시간 함수로 두 주파수를 모두 추정하려면 spectrogram을 사용하여 파워 스펙트럼 밀도를 구하고 tfridge를 사용하여 두 리지를 추적하십시오. tfridge에서 주파수 변경 벌점을 0.1로 지정하십시오.

[s,f,tt] = pspectrum(x,fs,'spectrogram');

numcomp = 2;
[fridge,~,lr] = tfridge(s,f,0.1,'NumRidges',numcomp);

pspectrum(x,fs,'spectrogram')
hold on
plot3(tt,fridge,abs(s(lr)),'LineWidth',4)
hold off
yticks([60 90])

Figure contains an axes object. The axes object with title Fres = 10.257 Hz, Tres = 250.2444 ms, xlabel Time (s), ylabel Frequency (Hz) contains 3 objects of type image, line.

참고 항목

|

관련 항목