基于MATLAB的随机信号分析方法.pptVIP

  • 21
  • 0
  • 约8.48千字
  • 约 61页
  • 2017-07-04 发布于四川
  • 举报
正态分布白噪声序列randn() 韦伯分布白噪声序列weibrnd() 随机信号分析的MATLAB函数 一、特征估计 对于各态历经过程,我们可以通过对随机序列的一条样本函数来获得该过程的统计特性,利用MATLAB的统计分析函数我们可以分析随机序列的统计特性。在以下的介绍中,我们假定随机序列X(n)和Y(n)是各态历经过程,他们的样本分别为x(n)和y(n),其中n=0,1,2,…N-1。 1 均值函数mean() 用法:m=mean(x) 功能:返回X(n)按 估计的均值,其中x为样本序列x(n)(n=1,2,…,N-1)构成的数据矢量。 2 方差函数var() 用法:sigma2=var(x) 功能:返回X(n)按 估计的方差,这一估计是无偏估计。在实际中也经常采用下式估计方差, 互相关函数的估计 3 互相关函数估计xcorr c = xcorr(x,y) c = xcorr(x) c = xcorr(x,y,option) c = xcorr(x,option) xcorr(x,y)计算X与Y的互相关,矢量X表示序列x(n),矢量Y表示序列y(n)。xcorr(x)计算X的自相关。option选项是: biased unbiased coeff none Normalizes the sequence so the autocorrelations at zero lag are identically 1.0 to use the raw, unscaled cross-correlations (default) 0 0.5 1 1.5 2 -4 -2 0 2 4 t x(t) Original Signal x -0.2 -0.1 0 0.1 0.2 -1 -0.5 0 0.5 1 t Rx(t) Autocorrelation 0 0.5 1 1.5 2 -4 -2 0 2 4 t x1(t) Original Signal x1 -0.2 -0.1 0 0.1 0.2 -0.5 0 0.5 1 t Rx1(t) Autocorrelation 白噪声干扰的正弦信号与白噪声信号的自相关函数 3、功率谱估计 Periodogram 周期图法 periodogram Welch Averaged periodograms of overlapped, windowed signal sections pwelch Yule-Walker AR Autoregressive (AR) spectral estimate of a time-series from its estimated autocorrelation function pyulear pburg Autoregressive (AR) spectral estimation of a time-series by minimization of linear prediction errors pburg Covariance Autoregressive (AR) spectral estimation of a time-series by minimization of the forward prediction errors pcov 例2.27 估计两个正弦信号加正态白噪声的功率谱,信号为 , 其中 =300Hz, =310Hz。 MATLAB程序如下: %功率谱估计 %301个数据点 t = 0:0.001:0.3; %两个频点加随机噪声 x =cos(2*pi*t*300)+cos(2*pi*t*310)+randn(size(t)); %没有加窗的周期图谱估计 subplot(2,2,1); periodogram(x,[],512,1000);%周期图谱估计并画图,512点FFT axis([0 500 -50 0]); %加窗的周期图谱估计 subplot(2,2,2); window = hann(301); periodogram(x,window,512,1000); title(汉宁周期图功率谱估计); axis([0 500 -50 0]); %相关函数法 R = xcorr(x)/15000;%15000为数据点数乘频点宽度,因纵轴为dB/Hz Pw = fft(R); subplot(2,2,3); f = (0:length(Pw)-1)*1000/length(Pw);%不太明白 plot(f,10*log10

文档评论(0)

1亿VIP精品文档

相关文档