Main Content

测量均值频率、功率、带宽

生成以 1024 kHz 采样的啁啾信号的 1024 个采样点。啁啾信号的初始频率为 50 kHz,采样结束时达到 100 kHz。添加高斯白噪声,使信噪比为 40 dB。

nSamp = 1024;
Fs = 1024e3;
SNR = 40;

t = (0:nSamp-1)'/Fs;

x = chirp(t,50e3,nSamp/Fs,100e3);
x = x+randn(size(x))*std(x)/db2mag(SNR);

估计信号的 99% 占用带宽,并在功率频谱密度 (PSD) 图上进行标注。

obw(x,Fs);

Figure contains an axes object. The axes object with title 99% Occupied Bandwidth: 55.377 kHz, xlabel Frequency (kHz), ylabel Power/frequency (dB/Hz) contains 4 objects of type line, patch.

计算频带中的功率,并验证它是否占总数的 99%。

[bw,flo,fhi,powr] = obw(x,Fs);

pcent = powr/bandpower(x)*100
pcent = 
99.0000

生成另一个啁啾信号。指定其初始频率为 200 kHz、最终频率为 300 kHz,振幅为第一个信号的两倍。添加高斯白噪声。

x2 = 2*chirp(t,200e3,nSamp/Fs,300e3);
x2 = x2+randn(size(x2))*std(x2)/db2mag(SNR);

将两个啁啾信号相加以形成一个新信号。绘制信号的 PSD,并标注其中值频率。

medfreq([x+x2],Fs);

Figure contains an axes object. The axes object with title Median Frequency Estimate: 237.563 kHz, xlabel Frequency (kHz), ylabel Power/frequency (dB/Hz) contains 2 objects of type line.

绘制 PSD 并标注其均值频率。

meanfreq([x+x2],Fs);

Figure contains an axes object. The axes object with title Mean Frequency Estimate: 214.962 kHz, xlabel Frequency (kHz), ylabel Power/frequency (dB/Hz) contains 2 objects of type line.

现在假设每个啁啾信号代表一个单独的通道。估计每个通道的均值频率。在 PSD 图上标注其均值频率。

meanfreq([x x2],Fs)

Figure contains an axes object. The axes object with title Mean Frequency Estimate, xlabel Frequency (kHz), ylabel Power/frequency (dB/Hz) contains 4 objects of type line.

ans = 1×2
105 ×

    0.7503    2.4999

估计每个通道的半功率带宽。在 PSD 图上标注 3-dB 带宽。

powerbw([x x2],Fs)

Figure contains an axes object. The axes object with title 3-dB Bandwidth, xlabel Frequency (kHz), ylabel Power/frequency (dB/Hz) contains 8 objects of type line, patch.

ans = 1×2
104 ×

    4.4386    9.2208

另请参阅

| | | |