平坦衰落信道建模

原文地址:平坦衰落信道建模 作者:buqifei071436
小尺度衰落根据信道的频率选择性,小尺度衰落可以分为平坦衰落信道和频率选择性衰落信道;根据信道的时间选择性,可以将信道分为块衰落信道和慢衰落信道;根据信道的空间选择特性可以将信道分为标量信道和矢量信道。 由于平坦衰落只有一个可分辨径(包括了多条不可分辨径),而频率选择性信道是由多个具有不同时延和功率衰减的可分辨径的合成(每个经是有多个不可分辨的径)叠加组成的。因此仿真多径衰落信道的基础是平坦衰落信道的建模 描述平坦衰落信道的模型主要有:Clarke模型和Suzuki模型。而所有的信道模型的仿真都是基于多个不相关的有色高斯过程,产生有色噪声的高斯过程有两种方法:正弦波叠加法(SOS:Sum-of-Sinusoid)和成型滤波器法。
仿真频率选择性信道可以非为两个步骤:

(1)先利用MED、MEA、MCM、MSEM、MEDS、JM和JM改进型方法仿真出多个可分辨径,需保证各个可分辨径之间相互独立。因此注意以上方法中有随机相位的可以认为每次产生的径是独立的,而缺少随机相位的则必须引进fade counter变量,引入时间偏移,以产生独立的径。

(2)在各可分辨径上乘以相应的系数a,加上相应的离散传播时延tau,然后将各个不同可分辨径相加即可得到多径衰落信道。

下面给出主要的几种生成平坦衰落信道模型的方法。先列出程序,等以后有时间将每种方法的原理整理出来。

 function[channel]=Rayleigh_singlePath(fc,v,input,dt)

 %---------------------------------------------------------

Rayleigh_singlePath: 产生单径Rayleigh分布(Doppler Shift),基于Clarke模型

  输入:

     fc:载频(=2000MHz)

     v:绝对时速(=50(km/h)

 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 M=32; %为合成单径的正弦波数目,须大于8,结果证明当其大于25时,性能较佳

sigma=sqrt(1/2);%rayleigh分布pdf的参数,用于归一化

c=3*10^8;%光速(m/s)

fm=(fc*10^6)*(v*10^3/3600)/c;%最大多普雷频移

wd=2*pi*fm;%角频率

[rowcol]=size(input);

len=row*col;t=1:len;t=t*dt;

%t=time_start:1/fs:time_end;%时间向量

factor=sqrt(2/M);%归一化因子

xc=0;xs=0;

for n=1:M

   theta=2*pi*rand-pi;%[-pi,pi)均匀分

   phi1=2*pi*rand-pi;%[-pi,pi)均匀分

   phi2=2*pi*rand-pi;%[-pi,pi)均匀分

   alpha=(2*pi*n-pi+theta)/(4*M);%贝塞尔值

   xc=xc+factor*cos(wd*t*cos(alpha)+phi1); %同相分量

   xs=xs+factor*cos((wd*t*sin(alpha)+phi2));%正交分量

end

channel=sigma*(xc+i*xs);%合成信道响应并归一化

%等距离:MED方法
function[channel]=Rayleigh_singlePath1(fc,v,time_start,time_end,dt)
%---------------------------------------------------------
%   Rayleigh_singlePath:  产生单径Rayleigh分布(Doppler Shift),基于Clarke模型
%     输入:
%         fc:载频(=2000MHz)
%         v:绝对时速(=50(km/h)
%         time_start:信道仿真的开始时间(s)
%         time_end:信道仿真的终止时间(s),通常time_start=0,time_end=1s,
%         dt(ms):时间间隔,通常deltaT=1ms
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
N=32; %为合成单径的正弦波数目
c=3*10^8;%光速(m/s)fmax = (fc*10^6)*(v*10^3/3600)/c; % MaxDoppler Shift (Hz)
fm=(fc*10^6)*(v*10^3/3600)/c;%最大多普雷频移
fs=1000/dt;%抽样频率,iffs=1000-->模拟时间间隔=1/1000秒,即1ms
T=time_end-time_start;%信道仿真时间段
sigma= sqrt(1/2);%rayleigh分布pdf的参数,用于归一化
n=1:N;t=time_start:1/fs:time_end;%时间向量
factor=4*sigma^2/pi;%归一化因子
fn=fm*(2*n-1)/2/N;
cn=sqrt(factor*(asin(n/N)-asin((n-1)/N)));
len=length(t);k=0;
channel=zeros(1,len);
phase=unifrnd(0,2*pi,1,N);%相位均匀分布
% phase=2*pi*rand(1,32)-pi;
for tt=time_start:1/fs:time_end
      k=k+1;
      channel(k)=sum(cn.*exp(i*(2*pi*fn*tt+phase)));
end
channel=channel*sigma;

%等面积法:MEA方法

function[channel]=Rayleigh_singlePath2(fc,v,time_start,time_end,dt)

%---------------------------------------------------------

Rayleigh_singlePath: 产生单径Rayleigh分布(Doppler Shift),基于Clarke模型

  输入:

     fc:载频(=2000MHz)

     v:绝对时速(=50(km/h)

     time_start:信道仿真的开始时间(s)

    time_end:信道仿真的终止时间(s),通常time_start=0,time_end=1s,

     dt(ms):时间间隔,通常deltaT=1ms

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

N=32;%生成单径的正弦波数目

c=3*10^8;fs=1000/dt;sigma=sqrt(1/2);fm=(fc*10^6*v*10^3/3600)/c;

t=time_start:1/fs:time_end;

n=1:N;

fn=fm*sin(pi*n/2/N);cn=sigma*sqrt(2/N);

channel=zeros(1,length(t));phase=unifrnd(0,2*pi,1,N);k=0;

fort=time_start:1/fs:time_end

    k=k+1;

   channel(k)=sum(cn.*cos(2*pi*fn*t+phase));

end

 

%Monte Carlo法:MCM方法

function[channel]=Rayleigh_singlePath3(fc,v,time_start,time_end,dt)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
N=32;%生成单径的正弦波数目
c=3*10^8;fs=1000/dt;sigma=sqrt(1/2);fm=(fc*10^6*v*10^3/3600)/c;
t=time_start:1/fs:time_end;u=rand(1,N);
fn=fm*sin(pi*u/2);cn=sigma*sqrt(2/N);
channel=zeros(1,length(t));k=0;
phase=2*pi*rand(1,N)-pi;
for t=time_start:1/fs:time_end
    k=k+1;
    channel(k)=sum(cn.*cos(2*pi*fn*t+phase));
end

%最小均方误差法:MSEM方法
function[channel]=Rayleigh_singlePath4(fc,v,time_start,time_end,dt)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
N=32;%生成单径的正弦波数目
c=3*10^8;fs=1000/dt;sigma=sqrt(1/2);fm=(fc*10^6*v*10^3/3600)/c;
t=time_start:1/fs:time_end;n=1:N;
tau_max=N/(2*fm);%积分范围,其信道是一个周期为T=2N/fm,仿真时间Tsim<=T=2N/fm
fn=fm*(2*n-1)/(2*N);factor=2*sigma/sqrt(tau_max);%归一化因子
M=5e3;delta=linspace(0,tau_max,M);
J0=besselj(0,2*pi*fm*delta);
for n=1:N
    cn(n)=sqrt(trapz(delta,J0.*cos(2*pi*fn(n)*delta)));
end

%精确多普勒扩展法:MEDS方法,无周期性

function[channel]=Rayleigh_singlePath5(fc,v,time_start,time_end,dt)

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

N=32;%生成单径的正弦波数目

c=3*10^8;fs=1000/dt;sigma=sqrt(1/2);fm=(fc*10^6*v*10^3/3600)/c;

t=time_start:1/fs:time_end;n=1:N;

fn=fm*sin((n-0.5)*pi/(2*N));

cn=sigma*sqrt(2/N);

channel=zeros(1,length(t));k=0;

phase=unifrnd(0,2*pi,1,N);

fort=time_start:1/fs:time_end

    k=k+1; 

  channel(k)=sum(cn.*cos(2*pi*fn*t+phase));

end


%Jakes仿真法:JM方法,原始的公式

function[channel]=Rayleigh_singlePath6(fc,v,time_start,time_end,dt)

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

N=32;%生成单径的正弦波数目

c=3*10^8;fs=1000/dt;sigma=sqrt(1/2);fm=(fc*10^6*v*10^3/3600)/c;

t=time_start:1/fs:time_end;n=1:N;

fn=fm*cos(2*pi*n/N);wc=2*pi*fc;

cn=sqrt(2/N);

channel=zeros(1,length(t));k=0;

phase=2*pi*rand(1,N)-pi;

 for t=time_start:1/fs:time_end

    k=k+1;

   channel(k)=sum(cn.*cos(wc*t+2*pi*fn*t+phase));

end

channel=sigma*channel;

 

%Jakes仿真改进型法:JM改进型方法

function[channel]=Rayleigh_singlePath7(fc,v,time_start,time_end,dt)

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

N0=16;%生成单径的正弦波数目

N=4*N0+2;c=3*10^8;fs=1000/dt;fm=(fc*10^6*v*10^3/3600)/c;

t=time_start:1/fs:time_end;n=1:N0;

wc=2*pi*fc;beta=pi*n/N0;

fn=fm*cos(2*pi*n/N);factor=2/sqrt(N);

xc=zeros(1,length(t));xs=zeros(1,length(t));k=0;

%改进型引入随机相移

%phase=2*pi*rand(1,N0+1)-pi;

phase=unifrnd(0,2*pi,1,N);

fortt=time_start:1/fs:time_end

    k=k+1;

    %改进型引入随机相移

    xc(k)=sum(cos(beta).*cos(2*pi*fn*tt+phase(1:N0)))+cos(2*pi*fm*tt+phase(end));

    xs(k)=sum(sin(beta).*cos(2*pi*fn*tt+phase(1:N0)))+cos(2*pi*fm*tt+phase(end));

end

channel=xc.*cos(wc*t)+xs.*sin(wc*t);

channel=factor*channel;

  

%滤波器法:filter

function[channel]=Rayleigh_singlePath_filter(fc,v,time_start,time_end,dt)

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

dt=1;c=3*10^8;fs=1000/dt;fc=2000;v=30;fm=(fc*10^6*v*10^3/3600)/c;%参数设定

t=time_start:1/fs:time_end; %抽样时刻

N=length(t);%抽样点数

Ninv=2^nextpow2(N);%做FFT的点数

Ns=2^nextpow2(ceil(Ninv*2*fm/fs));%2*fd内的采样点数

deltaf=2*fm/(Ns-1);T=1/deltaf; %频率间隔和周期

f=deltaf:deltaf:fm; %频率点向量

Sf0=1.5/(pi*fm);Sfn=Sf0./sqrt((1-((f/fm).^2))); %多普勒功率谱(基带)

Sf=[fliplr(Sfn),Sf0,Sfn]; %频谱翻转

plot(0:deltaf:2*fm-deltaf,Sf),grid on  %做出频率响应图

I0=randn(1,Ns-1);Q0=randn(1,Ns-1); %产生高斯白噪声

I0_fft=fft(I0);Q0_fft=fft(Q0); %两路支路做FFT变换

I_freq=I0_fft.*Sf;Q_freq=Q0_fft.*Sf;  %乘以多普勒频谱形成色噪声

I_temp =[I_freq(1:(Ns+1)/2),zeros(1,Ninv-Ns+2),I_freq((Ns+1)/2+1:Ns-1)];%填充0.已进行FFT并使曲线平滑

Q_temp =[Q_freq(1:(Ns+1)/2+1),zeros(1,Ninv-Ns+2),Q_freq((Ns+1)/2+2:Ns-1)];

I_time =ifft(I_temp);Q_time = ifft(Q_temp); %两支路转化为时域

channel0=real(I_time)+i*imag(Q_time); %相加合并

channel=channel0(1:N);

rms=sqrt(norm(channel,'fro'));%归一化

channel=channel/rms;



  • 6
    点赞
  • 47
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
前面已经介绍无线信道的传播模型可分为大尺度(Large-Scale)传播模型和小尺度(Small-Scale)衰落两种[2],三、四、五章已经介绍了大尺度传播。所谓小尺度是描述短距离(几个波长)或短时间(秒级)内接收信号强度快速变化的;而移动无线信道的主要特征是多径,由于这些多径使得接收信号的幅度急剧变化,产生了衰落,因此,本章将介绍小尺度衰落信道,这对我们移动通信研究中传输技术的选择和数字接收机的设计尤为重要。 本章将先介绍小尺度的衰落和多径的物理模型和数学模型,使读者从概念上清楚地认识移动无线信道的主要特点,并建立一个统一的数学模型,为以后讨论各种模型奠定基础;接着将介绍移动多径信道的三组色散参数——时间色散参数(时延扩展,相关带宽)、频率色散参数(多普勒扩展,相关时间)、角度色散参数(角度扩展,相关距离),为之后的信道分类奠定了基础;接下来介绍衰落信道的一阶包络统计特性、二阶统计特性,大量的实测数据表明,在没有直达路径的情况下(如市区),信道的包络服从瑞利分布,在有直达路径的情况下(如郊区),信号包络服从莱斯分布,因此,一阶包络统计特性主要介绍瑞利衰落分布和莱斯衰落分布,二阶统计特性主要介绍一组对偶参数——时间电平交叉率和平均衰落持续时间,简要介绍其他两组对偶参数——频域电平交叉率和平均衰落持续带宽,空间电平交叉率和平均衰落持续距离;在已经介绍了多径信道的三组色散参数之后,将介绍小尺度衰落信道相对应的不同分类。
7.3.1 Suzuki–Kasami Algorithm This algorithm is defined for a completely connected network of processes. It assumes that initially an arbitrary process has the token. A process i that does not have the token but wants to enter its CS broadcasts a request (i, num), where num is sequence number of that request. The algorithm guarantees that eventually process i receives the token. Every process i maintains an array req[0.. n − 1] of integers, where req[j] designates the sequence number of the latest request received from process j. Note that although every process receives a request, only one process (which currently has the token) can grant the token. As a result, some pending requests become stale or outdated. An important issue in this algorithm is to identify and discard these stale requests. To accomplish this, each process uses the following two additional data structures that are passed on with the token by its current holder: • An array last[0.. n − 1] of integers, where last[k] = r implies that during its last visit to its CS, process k has completed its rth trip • A queue Q containing the identifiers of processes with pending requests When a process i receives a request with a sequence number num from process k, it updates req[k] to max(req[k], num), so that req[k] now represents the most recent request from process k. A process holding the token must guarantee (before passing it to another process) that its Q contains the most recent requests. To satisfy this requirement, when a process i receives a token from another process, it executes the following steps: • It copies its num into last[i]. • For each process k, process i retains process k’s name in its local queue Q only if 1 + last[k] = req[k] (this establishes that the request from process k is a recent one). • Process i completes the execution of its CS codes. • If Q is nonempty, then it forwards the token to the process at the head of Q after deleting its entry. To enter the CS, a process sends (n − 1) requests and receives one message containing the token. The total number of messages required to complete one visit to its CS is thus (n − 1) + 1 = n. Readers are referred to [SK85] for a proof of this algorithm理解Suzuki-Kasami算法,并回答如下问题: 算法是如何辨别和丢弃过时的请求的,或者说为什么要求1 + last[k] = req[k]?
06-06

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值