文档介绍:第九讲随机序列的功率谱
第1页,此课件共57页哦
随机过程的功率谱密度
定义随机过程的功率谱密度为:
第2页,此课件共57页哦
维纳-辛钦定理:
功率谱是非负的实、偶函数
第3页,此课件共57页哦
4机序列
X=weibrnd(A,B,m,n)
第36页,此课件共57页哦
由(0,1)均匀分布的随机数产生任意分布的随机数
定理:若随机变量X的分布函数为Fx(x), r是(0,1)均匀分布的随机数,则
第37页,此课件共57页哦
举例:指数分布随机数的产生
或
第38页,此课件共57页哦
% 指数分布随机数的产生
N=200;
r=rand(N,1);
l=;
x=-log(r)/l;
plot(x);
第39页,此课件共57页哦
(2) 变换法
N(m,2)的正态随机数的产生
第40页,此课件共57页哦
(2)相关正态随机序列的产生
产生N维正态随机矢量,要求服从如下概率密度
其中K为协方差矩阵
是对称正定矩阵
第41页,此课件共57页哦
产生方法:
U为标准正态随机矢量
A是下三角矩阵
可由矩阵分解函数chol( )(Cholesky分解)得到
R=Chol(K)----产生一个K的上三角矩阵
K=RTR
第42页,此课件共57页哦
产生两个零均值的正态随机矢量
R=chol(B)=
B
第43页,此课件共57页哦
第44页,此课件共57页哦
一般情况,
第45页,此课件共57页哦
给定相关函数的正态随机序列的产生
第46页,此课件共57页哦
a=;
sigma=2;
N=500;
u=randn(N,1);
x(1)=sigma*u(1)/sqrt(1-a^2);
for i=2:N
x(i)=a*x(i-1)+sigma*u(i);
end
plot(x);
第47页,此课件共57页哦
2. 随机序列的数字特征估计函数
特征名
函数名
用法
均值
mean()
m=mean(x)
方差
var()
sigma2=var(x),
sigma2=var(x,1)
互相关
xcorr()
c=xcorr(x,y)
c=xcorr(x)
c=xcorr(x,y,’option’) ‘biased’, ‘unbiased’
c=xcorr(x,’option’) ‘coeff’, ‘none’
第48页,此课件共57页哦
r=xcorr(x,’coeff’)
第49页,此课件共57页哦
3. 功率谱估计
(1)自相关法
先求自相关函数的估计,然后求傅里叶变换
第50页,此课件共57页哦
(2)周期图法
(Pxx,w)=periodogram(x)
第51页,此课件共57页哦
应用实例:
第52页,此课件共57页哦
功率谱估计
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
第53页,此课件共57页哦
(4)概率密度估计
Ksdensity( ): 估计概率密度
Hist( ): 估计直方图
第54页,此课件共57页哦
a=;
sigma=2;
N=5000;
u=randn(N,1);
x(1)=sigma*u(1)/sqrt(1-a^2);
for i=2:N
x(i)=a*x(i-1)+sigma*u(i);
end
r=xcorr(x,'coeff') ;
[f,xi]=ksdensity(x);