Labfans是一个针对大学生、工程师和科研工作者的技术社区。 | 论坛首页 | 联系我们(Contact Us) |
![]() |
![]() |
#1 |
初级会员
注册日期: 2008-04-04
年龄: 40
帖子: 1
声望力: 0 ![]() |
![]()
我根據以下式子,用matlab來模擬Rayleigh 通道
![]() 此方程式出自於 http://ethesys.yuntech.edu.tw/ETD-db...105-112814.pdf 這篇paper的第50頁 問題1 如何用matlab,畫出envelope的PDF,如下 問題2 輸出的自相關函數如何畫? 我用了 auto1 = xcorr2(xc); figure; plot(auto1); 但輸出不合理論,理論圖在paper的45頁 我寫的Code如下: %假設v=110km/h fc=900MHZ ,max Doppler freq=91.6HZ clear all fmax=91.6; M=8; N=4*M+2; %c_i :同相增益 c_q:垂直相增益 fd ![]() % 實現equation(103),(104) for n=1:N-1 c_i(n)=2*sin(n.*pi./(N-1))./sqrt(N-0.5); c_q(n)=2*cos(n.*pi./(N-1))./sqrt(N-0.5); fd(n)=fmax*cos(n*pi./(2*N-1)); end c_i(N)=1/sqrt(N-0.5); c_q(N)=1/sqrt(N-0.5); fd(N)=fmax; %產生相對應之Doppler freq. cosine wave %Equation: Ci*cos(2*pi*fd*t) count=0; for t=0:2*pi./200:2*pi count=count+1; for k=1:N u1(count,k)=cos(2*pi*fd(k)*t)*c_i(k); u2(count,k)=cos(2*pi*fd(k)*t)*c_q(k); end end %xc: 同相波 xq:垂直波 for time=1:count xc(time)=sum(u1(time,1:N)); %對應於eq(101)之u1(t) xq(time)=sum(u2(time,1:N)); %對應於eq(101)之u2(t) end %模擬接收到的envelope for time=1:count envelope(time)=sqrt(xc(time).^2+xq(time).^2); end figure; histfit(envelope); %envelope統計圖 %同相波的autocorrelation auto1 = xcorr2(xc); figure; plot(auto1); |
![]() |
![]() |