全文预览

随机信号分析编程作业

上传者:叶子黄了 |  格式:docx  |  页数:6 |  大小:360KB

文档介绍
q(t),然后由x(t)=i(t)cos(w0t)-q(t)sinw0t就可得出要求的带通信号。代码如下:РNFFT = 1024;Рfs = 1000;РTs = 1/fs;РB= 0.5 * fs;Рdf = fs/NFFT;Рf = -B:df:B-df;Р Рsigma = sqrt(2);Рbeta = 8;Рa = exp(-beta*Ts);Рb = sigma * sqrt(1 - a*a);Рf0 = 200;Р РN = 10000;Рwi = normrnd (0,1,[1,N]);Рwq = normrnd (0,1,[1,N]);Р Рxi = zeros(1,N);Рxq = zeros(1,N);Рxi(1) = sigma*wi(1);Рxq(1) = sigma * wq(1);Рfor i = 2:NР xi(i)=a*xi(i-1) + b*wi(i);Р xq(i)=a*xq(i-1) + b*wq(i);РendР Рt = 0:Ts:(N-1)*Ts;Рx0=xi.*cos(2*pi*f0*t) - xq.*sin(2*pi*f0*t);Р Рx = x0(N-1000+1:N);Рt = t(N-1000+1:N);РRxx = xcorr(x)/1000;Рt0=[-1000+1:1000-1];РRxx0=(sigma^2)*exp(-beta*abs(t0*Ts));Р Рsubplot(141);plot(t,x);title('样本x');Рsubplot(142);plot(t0,Rxx);title('实测自相关函数');Рsubplot(143);periodogram(x,[],1000,fs);Рsubplot(144);plot(t0,Rxx0,'r');title('理论自相关函数');Р以下是运行结果:

收藏

分享

举报
下载此文档