亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? uplinksimulator.m

?? 對WCDMA的性能進行了仿真
?? M
字號:
function CorrectErrorRun = UplinkSimulator(SimConfig)
%******************************************************************************************************
%function CorrectErrorRun = UplinkSimulator(SimConfig)
%
%Copyright 2002  The Mobile and Portable Radio Research Group
%
%The uplink simulator emulates the operation of a WCDMA mobile station in a frequency selective, 
%multipath fading channel.  The simulation makes every attempt to model the behavior of a mobile 
%station as specified in the WCDMA standards, specifically ETSI TS 125 211 and ETSI TS 125.213.  
%Accordingly, the simulator emulates up to six Dedicated Physical Data Channels (DPDCHs) and the 
%Dedicated Physical Control Channel (DPCCH).  A Mutual Access Interference (MAI) environment is generated
%by generating signals from "interfering mobiles," which are assumed to operate in the same cell.  
%A form of power control is assumed in this simulation.  The average received power from each of 
%the interfering mobile is equal to the average received power from mobile of interest.  Each transmitted 
%signal (desired or interfering) passes through a specular multipath fading channel.  
%The parameters used to define this channel include number of multipath components, relative delay of 
%each multipath component, average amplitude of each multipath component, and Doppler frequency.  
%
%Parameters
%   Input
%      SimConfig      Structure with the following fileds
%         MaxInteration           The number of Radio Frames to be processed
%         PulseLength             The length of the pulse shape filter used by the 
%                                 transmitter and receiver
%         SamplesPerChip          Oversampling rate
%         EbNo_db                 Bit energy to noise density ratio in decibels
%         Velocity                Velocity of mobile in km/hr
%         NumPilot                Number of Pilot symbols per frame in the DPCCH
%         MaxOffset               Maximum frame offset for each of the interfering mobile stations
%         NumInterferer           Number of Interfering mobile stations
%         NumDPDCH                Number of DPDCHs used by the mobile station (can range from 1 to 6)
%         SF                      Spreading Factor
%         Delay   (array)         Multipath delay profile (delays expressed in units of seconds)
%         Amp     (array)         Multipath amplitude profile (amplitude expressed in decibels)
%         BetaC                   Weight gain for the DPCCH
%         BetaD                   Weight gain for the DPDCH(s)
%         MPathFlag               1:  MAI signals go through multipath fading channel
%                                 0:  MAI signals do not go through multipath fading channel 
%                                 (AWGN channel only)
%
%   Output
%      CorrectErrorRun            sequence is a collection of positive integers that denote the 
%                                 number of consecutive correct decisions made, followed by the number 
%                                 of consecutive errors made, followed by the number of consecutive 
%                                 correct decisions made, and so forth.  
%******************************************************************************************************

%Extract Values from structure
MaxIteration=SimConfig.NumIterations;
PulseLength=SimConfig.PulseLength;
SamplesPerChip=SimConfig.SamplesPerChip;
EbNo_db=SimConfig.EbNo_db;
Velocity=SimConfig.Velocity;
N_pilot=SimConfig.NumPilot;
MaxOffset=SimConfig.MaxOffset;
NumInterferers=SimConfig.NumInterferer;
NumDPDCH=SimConfig.NumDPDCH;
SF=SimConfig.SF;
MpathDelayTaps=SimConfig.Delay;
MpathDelayRelAmpdB=SimConfig.Amp;
ControlBeta=SimConfig.BetaC+1;
DataBeta=SimConfig.BetaD+1;
MAI_MPATH_FLAG=SimConfig.MPathFlag;

%Set up Status Bar
WaitBarHandle=waitbar(0,'Simulation in Progress');
waitbar(1e-4,WaitBarHandle);

%Pulse Shape Paramters
UBound = PulseLength/2;
LBound = -UBound;

rand('state',sum(100*clock));   %Initialize random number generator
clear RcvdDataBits

MpathDelayRelAmp=10.^(MpathDelayRelAmpdB/20);
SpeedOfLight=3e8;
ROLLOFF=0.22;
%Weights associated with channel gain codes
beta_code=[0 0.0667 0.1333 0.2 0.2667 0.333 0.4 0.4667 0.5333 0.6 0.6667 0.7333 0.8 0.8666 0.9333 1.0];
beta_c=beta_code(ControlBeta);
beta_d=beta_code(DataBeta);


%Radio Frame Parameters
ChipsPerFrame= 38400;
ChipPeriod=1;
FrameDuration=10e-3;
fSample=SamplesPerChip*ChipsPerFrame/FrameDuration;	%Sample Rate

%EbNo and noise variaince parameters
EbNo=10^(EbNo_db/10);
variance=SF/(EbNo);
STDV=sqrt(variance);

%Fading and multipath parameters
ChipsPerFadeSample=400; %Each fade sample corresponds to 400 chips
frequency=1980; %Carrier Frequency in MHz--Assumed frequency of operation for this simulation
fadeCoefficients=[];
fDoppler=(Velocity*5/18)/(SpeedOfLight/(frequency*1e6));
MpathDelaySamples=round(MpathDelayTaps*fSample);

%Generate Pulse Shape
[PulseShape,t]=GenRootRaisedCosine(LBound,UBound,SamplesPerChip,ROLLOFF,ChipPeriod);
PulseShape=PulseShape/(PulseShape.'*PulseShape);

%generate scramble code
code_number=round((2^24-1)*rand(1));
scramble_code=scramble_long(code_number);

%generate channel code
chan_code=ovsf_code(SF);

%******************************************************
%Generate initial Signals for MAI
for k=1:NumInterferers
   %Random Generation of Control Bits 
   %The specific sequence should not be that important
   ControlBits=sign(rand(1,150)-0.5);
   %Generate Scramble Sequence
   ScrambleCode=scramble_long(round((2^24-1)*rand(1)));
   %Generate uplink Frame for interferer
   UplinkFrame=gen_uplink_wcdma_frame(1,ScrambleCode.',chan_code,ControlBits,1,1);
   CurrentMAISignals(k,:)=GenWCDMAUplinkSignal(UplinkFrame,UplinkFrame,UplinkFrame,PulseShape,SamplesPerChip);
   
   %Random Generation of Control Bits 
   %The specific sequence should not be that important
   ControlBits=sign(rand(1,150)-0.5);
   %Generate Scramble Sequence
   ScrambleCode=scramble_long(round((2^24-1)*rand(1)));
   %Generate uplink Frame for interferer
   UplinkFrame=gen_uplink_wcdma_frame(1,ScrambleCode.',chan_code,ControlBits,1,1);
   PriorMAISignals(k,:)=GenWCDMAUplinkSignal(UplinkFrame,UplinkFrame,UplinkFrame,PulseShape,SamplesPerChip);
end
%******************************************************

%generage control channel data
DPCCH_code=gen_DPCCH_code(N_pilot);
 
%generage complex symbols for uplink frame
[uplink_frame0,DataBits0]=gen_uplink_WCDMA_frame(NumDPDCH,scramble_code.',chan_code,DPCCH_code,beta_c,beta_d);
[uplink_frame1,DataBits1]=gen_uplink_WCDMA_frame(NumDPDCH,scramble_code.',chan_code,DPCCH_code,beta_c,beta_d);
[uplink_frame2,DataBits2]=gen_uplink_WCDMA_frame(NumDPDCH,scramble_code.',chan_code,DPCCH_code,beta_c,beta_d);

%generate uplink signals
uplink_signal0=GenWCDMAUplinkSignal(uplink_frame0,uplink_frame2,uplink_frame1,PulseShape,SamplesPerChip);
uplink_signal1=GenWCDMAUplinkSignal(uplink_frame1,uplink_frame0,uplink_frame2,PulseShape,SamplesPerChip);

CurrentErrorState='c';
counter=1;
CorrectErrorRun=[];
for iterate=1:MaxIteration
   [uplink_frame3,DataBits3]=gen_uplink_WCDMA_frame(NumDPDCH,scramble_code.',chan_code,DPCCH_code,beta_c,beta_d);
   uplink_signal2=GenWCDMAUplinkSignal(uplink_frame2,uplink_frame1,uplink_frame3,PulseShape,SamplesPerChip);
  
   %We will also assume that the channel is a specular multipath fading channel 
   %***************************************************************************
   %We need to see if computing fading coefficients are necessary
   %The computation of fading coefficients is determined by the Doppler frequency,
   %fDoppler.  If the fDoppler is less than 25, then we generate one fading 
   %coefficient per WCDMA frame.  Otherwise, we generate one fading coeffcient 
   %per time slot (i.e., 15 coeffcients per frame).
   %
   %We generate a series of fading coefficients.  We then run the simulation,
   %incorporating those coefficients as the simulation progresses.  When, we have 
   %exhausted the current set of coefficients, we then generate another set of 
   %fading coefficients.  This approach (1) ensures that the fading coefficients
   %have the correct spectrum and (2) maximizes simulation speed.  With the exception 
   %of some very long simulations, only one set should be sufficient.
   %***************************************************************************
   if (length(MpathDelaySamples)==1)&(fDoppler==0)
      RvcVectorSignal=uplink_signal1;
   else
      
      FadeBufferLength=2^12;
      fDopplerSampleRate = ChipsPerFrame/(FrameDuration*ChipsPerFadeSample);
      if isempty(fadeCoefficients)
         for k=1:length(MpathDelaySamples)
            fadeCoefficients(:,k)=MpathDelayRelAmp(k)*Rayleigh(fDoppler,fDopplerSampleRate,FadeBufferLength);
         end
      elseif length(fadeCoefficients(:,1))<(3*ChipsPerFrame/ChipsPerFadeSample)
         fadeCoefficients=[];
         for k=1:length(MpathDelaySamples)
            fadeCoefficients(:,k)= MpathDelayRelAmp(k)*Rayleigh(fDoppler,fDopplerSampleRate,FadeBufferLength);
         end
      end
      
      %Process the signal through the specular multipath channel. 
      RvcVectorSignal=WCDMAMPathChannel(uplink_signal0,...
         uplink_signal1,...
         uplink_signal2,...
         MpathDelaySamples,...
         fadeCoefficients(1:3*ChipsPerFrame/ChipsPerFadeSample,:),...
         length(PulseShape),...
         SamplesPerChip);
      fadeCoefficients(1:ChipsPerFrame/ChipsPerFadeSample,:)=[];  %Deystroy Matrix Just Used
   end
   
  if NumInterferers >0
     if MAI_MPATH_FLAG == 1 %Incorporate multipath in MAI
        [y,NextMAISignals]=MAI_Processor(CurrentMAISignals,PriorMAISignals,chan_code,SamplesPerChip,PulseShape,MaxOffset,MpathDelaySamples,MpathDelayRelAmp,fDoppler);
     else %Do not incorporate multipath in MAI
        [y,NextMAISignals]=MAI_Processor(CurrentMAISignals,PriorMAISignals,chan_code,SamplesPerChip,PulseShape,MaxOffset,MpathDelaySamples);
     end
  else
     y=zeros(size(RvcVectorSignal));
  end
   
   %Generate Noise
   NoiseVectorSignal=STDV*(randn(size(RvcVectorSignal))+j*randn(size(RvcVectorSignal)));
   RvcVectorSignal=RvcVectorSignal+NoiseVectorSignal+y;
   
   %CurrentMAISignals already used.  Shift Signals over
   if NumInterferers >0
      PriorMAISignals=CurrentMAISignals;
      CurrentMAISignals=NextMAISignals;
   end
   
   %RAKE receiver goes here
   %This is intended for scalar channels
   [RcvdDataBits,RcvdControlBits]=ThePerfectRake(RvcVectorSignal,MpathDelaySamples,length(uplink_signal1),PulseShape,SamplesPerChip,chan_code,NumDPDCH,DPCCH_code,N_pilot,scramble_code);
   %Prepare for error count
   [nrow,ncol]=size(RcvdDataBits);
   for k=1:NumDPDCH
      for m=1:ncol
         if (CurrentErrorState == 'c') & (RcvdDataBits(k,m) == DataBits1(k,m))
            counter=counter+1;
         elseif (CurrentErrorState == 'c') & (RcvdDataBits(k,m) ~= DataBits1(k,m))
            CorrectErrorRun=[CorrectErrorRun counter];
            counter=1;
            CurrentErrorState = 'e';
         elseif (CurrentErrorState == 'e') & (RcvdDataBits(k,m) ~= DataBits1(k,m))
            counter=counter+1;
         elseif (CurrentErrorState == 'e') & (RcvdDataBits(k,m) == DataBits1(k,m))
            CorrectErrorRun=[CorrectErrorRun counter];
            counter=1;
            CurrentErrorState = 'c';
         end
      end
   end
   
   %Prepare for next iteration
   uplink_signal0=uplink_signal1;
   uplink_signal1=uplink_signal2;
   uplink_frame0=uplink_frame1; DataBits0=DataBits1;
   uplink_frame1=uplink_frame2; DataBits1=DataBits2;
   uplink_frame2=uplink_frame3; DataBits2=DataBits3;
   
%   disp(iterate)
   waitbar(iterate/MaxIteration,WaitBarHandle);
end
CorrectErrorRun=[CorrectErrorRun counter];
close(WaitBarHandle);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
狠狠色综合日日| 青青草原综合久久大伊人精品| 欧美电影在哪看比较好| 91国产免费看| 欧美日韩黄色一区二区| 欧美日韩在线综合| 91精品国产麻豆国产自产在线| 欧美日韩精品专区| 日韩三级视频中文字幕| 精品成人免费观看| 国产精品亲子伦对白| 亚洲三级理论片| 亚洲电影在线播放| 日韩中文字幕91| 美洲天堂一区二卡三卡四卡视频 | 久久一区二区三区四区| 精品日韩成人av| 国产日本欧美一区二区| 一区在线观看视频| 亚洲夂夂婷婷色拍ww47 | 欧美日本一道本| 日韩午夜激情av| 国产日本欧洲亚洲| 亚洲欧美日韩一区| 日韩极品在线观看| 国产精品自拍av| 色婷婷久久一区二区三区麻豆| 欧美日韩五月天| 久久精品欧美日韩精品| 亚洲人吸女人奶水| 日本aⅴ亚洲精品中文乱码| 国产一区二区在线观看视频| 成人ar影院免费观看视频| 欧美日韩一区精品| 久久久国产午夜精品| 一区二区三区美女视频| 久久99这里只有精品| 97精品国产露脸对白| 欧美mv和日韩mv国产网站| 亚洲视频每日更新| 蜜桃av一区二区| 在线观看区一区二| 亚洲国产精品二十页| 日日噜噜夜夜狠狠视频欧美人| 国产91在线看| 欧美一区二区三区白人| 亚洲人精品一区| 国产精品一区二区三区乱码| 欧美日韩国产色站一区二区三区| 欧美国产日韩一二三区| 麻豆一区二区99久久久久| 91免费版在线看| 国产日韩视频一区二区三区| 日韩精品电影一区亚洲| 色综合天天综合色综合av| 久久久国产综合精品女国产盗摄| 日韩综合在线视频| 欧美午夜精品一区| 亚洲精品国产视频| 顶级嫩模精品视频在线看| 精品国产伦一区二区三区免费| 亚洲成人手机在线| 欧美性欧美巨大黑白大战| 国产精品白丝在线| 成人教育av在线| 国产人久久人人人人爽| 国产在线一区观看| 精品粉嫩超白一线天av| 久久精品国产一区二区三| 欧美一区二区三区色| 亚洲一二三级电影| 在线观看日产精品| 亚洲一区国产视频| 精品视频全国免费看| 亚洲v精品v日韩v欧美v专区| 91久久线看在观草草青青| 有码一区二区三区| 91福利视频久久久久| 亚洲精品中文在线观看| 91电影在线观看| 亚洲综合一区二区精品导航| 欧美系列日韩一区| 日韩国产欧美三级| 欧美成人一区二区三区在线观看| 久久精品久久久精品美女| 欧美精品一区二区三区四区 | 色综合欧美在线视频区| 亚洲免费成人av| 欧美人成免费网站| 蜜臀精品久久久久久蜜臀| 久久伊人蜜桃av一区二区| 成人一区二区三区视频在线观看| 亚洲图片另类小说| 欧美丰满高潮xxxx喷水动漫| 黑人巨大精品欧美一区| 亚洲国产激情av| 欧美在线观看你懂的| 日韩福利电影在线观看| 久久久噜噜噜久久中文字幕色伊伊| 久久99国产精品久久99果冻传媒 | 国产成人免费高清| 国产精品国产三级国产普通话三级| 99国产精品99久久久久久| 亚洲动漫第一页| 国产午夜精品一区二区三区嫩草 | 一区二区三区日韩精品视频| 欧美日韩美女一区二区| 国产精品一卡二| 亚洲午夜激情网站| 久久久国产一区二区三区四区小说| 94-欧美-setu| 麻豆国产精品777777在线| 亚洲精品亚洲人成人网在线播放| 喷白浆一区二区| 精品国产露脸精彩对白| 成人禁用看黄a在线| 日日夜夜免费精品视频| 久久国产精品99久久人人澡| 中文一区二区完整视频在线观看 | 一区二区三区视频在线看| 亚洲伦在线观看| 亚洲国产另类精品专区| 亚洲国产cao| 免费观看在线色综合| 久久aⅴ国产欧美74aaa| 国产精品一区二区黑丝| 成人精品一区二区三区四区| 成人免费观看视频| 色综合久久久久| 欧美浪妇xxxx高跟鞋交| 日韩欧美在线影院| 精品国产免费人成在线观看| 2023国产一二三区日本精品2022| 国产清纯美女被跳蛋高潮一区二区久久w | 国产精品久久久久久亚洲伦| 日韩美女视频19| 午夜精品久久久久久久久| 日韩极品在线观看| 国产不卡视频一区| 91高清视频在线| 日韩一级二级三级精品视频| 久久精品欧美日韩精品| 自拍偷拍欧美激情| 日本aⅴ免费视频一区二区三区 | 日韩国产欧美在线观看| 国产一区亚洲一区| 在线观看免费亚洲| 欧美成人r级一区二区三区| 国产欧美1区2区3区| 亚洲妇女屁股眼交7| 国产中文一区二区三区| 91视频91自| 欧美大片在线观看| 中文字幕中文在线不卡住| 视频在线观看一区| 99久久精品免费看| 日韩一区二区三区电影在线观看 | 日韩免费在线观看| 中文字幕佐山爱一区二区免费| 日本欧美大码aⅴ在线播放| www.在线成人| 日韩免费在线观看| 亚洲综合色婷婷| 国产乱色国产精品免费视频| 91久久精品一区二区二区| 久久精品一二三| 日韩精品1区2区3区| 色婷婷激情综合| 久久精品亚洲国产奇米99| 日韩电影一二三区| 色狠狠色噜噜噜综合网| 中文字幕av在线一区二区三区| 青草国产精品久久久久久| 欧美亚洲日本国产| 国产精品乱码妇女bbbb| 精品中文字幕一区二区小辣椒| 欧美视频在线观看一区二区| 一区视频在线播放| 国产精品综合视频| 精品久久免费看| 日韩电影在线观看一区| 欧美中文字幕久久| 亚洲精品一卡二卡| 99精品久久只有精品| 欧美国产成人精品| 国产麻豆午夜三级精品| 日韩欧美一区二区免费| 天天综合天天综合色| 在线观看国产日韩| 亚洲精品一二三| 色婷婷久久一区二区三区麻豆| 中文字幕日本乱码精品影院| 成人av在线看| 中文字幕第一区二区| 国产精品一线二线三线精华| 久久久精品日韩欧美| 久久99国产精品久久99果冻传媒| 欧美一区二区三区在线看| 蜜桃传媒麻豆第一区在线观看| 欧美精品 国产精品|