Main Content

Welch 스펙트럼 추정값

0.1초 동안 200kHz로 샘플링된, 3개의 잡음이 있는 정현파와 하나의 처프(Chirp)로 구성된 신호를 생성합니다. 정현파의 주파수는 1kHz, 10kHz, 20kHz입니다. 정현파는 각기 다른 진폭과 잡음 수준을 가집니다. 잡음이 없는 처프는 샘플링 동안 20kHz에서 시작하여 30kHz까지 선형적으로 증가하는 주파수를 가집니다.

Fs = 200e3; 
Fc = [1 10 20]'*1e3; 
Ns = 0.1*Fs;

t = (0:Ns-1)/Fs;
x = [1 1/10 10]*sin(2*pi*Fc*t)+[1/200 1/2000 1/20]*randn(3,Ns);
x = x+chirp(t,20e3,t(end),30e3);

Welch PSD 추정값과 신호에 대한 최댓값 유지 스펙트럼 및 최솟값 유지 스펙트럼을 계산합니다. 결과를 플로팅합니다.

[pxx,f] = pwelch(x,[],[],[],Fs);
pmax = pwelch(x,[],[],[],Fs,'maxhold');
pmin = pwelch(x,[],[],[],Fs,'minhold');

plot(f/1000,pow2db(pxx))
hold on
plot(f/1000,pow2db([pmax pmin]),':')
hold off
xlabel('Frequency (kHz)')
ylabel('PSD (dB/Hz)')
legend('pwelch','maxhold','minhold')
grid

Figure contains an axes object. The axes object with xlabel Frequency (kHz), ylabel PSD (dB/Hz) contains 3 objects of type line. These objects represent pwelch, maxhold, minhold.

절차를 반복하되, 이번에는 중심에 있는 파워 스펙트럼 추정값을 계산합니다.

[pxx,f] = pwelch(x,[],[],[],Fs,'centered','power');
pmax = pwelch(x,[],[],[],Fs,'maxhold','centered','power');
pmin = pwelch(x,[],[],[],Fs,'minhold','centered','power');

plot(f/1000,pow2db(pxx))
hold on
plot(f/1000,pow2db([pmax pmin]),':')
hold off
xlabel('Frequency (kHz)')
ylabel('Power (dB)')
legend('pwelch','maxhold','minhold')
title('Centered Power Spectrum Estimates')
grid

Figure contains an axes object. The axes object with title Centered Power Spectrum Estimates, xlabel Frequency (kHz), ylabel Power (dB) contains 3 objects of type line. These objects represent pwelch, maxhold, minhold.

참고 항목

| |