⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 compcqi.m

📁 无线仿真Matlab代码
💻 M
字号:
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %   Copyright (c) __year__ Ericsson Telecommunicatie B.V. %   All rights reserved. %    %   Redistribution and use in source and binary forms, with or without %   modification, are permitted provided that the following conditions %   are met: %   1. Redistributions of source code must retain the above copyright %       notice, this list of conditions and the following disclaimer. %   2. Redistributions in binary form must reproduce the above copyright %       notice, this list of conditions and the following disclaimer in the %       documentation and/or other materials provided with the %       distribution. %   3. Neither the name of Ericsson Telecommunicatie B.V. may be used %       to endorse or promote products derived from this software without %       specific prior written permission. %    %    %   THIS SOFTWARE IS PROVIDED BY ERICSSON TELECOMMUNICATIE B.V. AND %   CONTRIBUTORS "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, %   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF %   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. %   IN NO EVENT SHALL ERICSSON TELECOMMUNICATIE B.V., THE AUTHOR OR HIS %   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, %   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, %   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR %   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY %   OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT %   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE %   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. %    %    %   Contact for feedback on EURANE: eurane@ti-wmc.nl %   EURANE = Enhanced UMTS Radio Access Network Extensions %   website: http://www.ti-wmc.nl/eurane/ %%   ***************************************************************************%%   UMTS-HSDPA channel generator%              %   [CQI,perctoolow,perctoohigh] = %                   compCQI(numTTI,P_out,CQIdelayinTTI,minCQI,maxCQI)%%   Calculates the Channel Quality Indicator (CQI) for each TTI, based on %   an associated delayed received power.%   Also percentages that quantify the amount of CQI values that are clipped %   (in order to satisfy the [minCQI,maxCQI] constraint) are computed.%%   Note that the first CQIdelayinTTI elements are not written to the tracefile.%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%function [CQI,perctoolow,perctoohigh] = compCQI(numTTI,P_out,CQIdelayinTTI,minCQI,maxCQI)% Generate the power shifted in time.% This models the delay caused by the time in between the CQI computation at % the UE and the actual use of it at the scheduler (Node B).P_shft = [zeros(CQIdelayinTTI,1);P_out(1:numTTI-CQIdelayinTTI)];       % The first CQIdelayinTTI elements of P_shft do not make sense and are not % written to the tracefile.% An analytical formula is defined that fits the CQI-dependent BLER % versus Eb/No results in an AWGN channel.% As a result, the choice of its parameters is independent of the UE environment.Offset=16.62      CQIratio=1.02CQIhlp=floor(P_shft/CQIratio+Offset);% Round down (and not up) because the error probability (BLER) must not exceed the 10 % level%Display the effect of clipping the CQI values to satisfy the [minCQI,maxCQI] constraint[value_min,index_min]=min(CQIhlp);[value_max,index_max]=max(CQIhlp);disp('CQI range (BEFORE clipping):')disp('Maximum CQI value of '),value_maxdisp('Minimum CQI value of '),value_minadaptCQI=1               % flagif adaptCQI==1  %Replace all negative CQI values by the zero.  disp('Extreme CQI values are adapted: CQI<0 and CQI>maxCQI')  toolowindex=(CQIhlp<minCQI);  perctoolow=round(100*sum(toolowindex)/numTTI)  CQIhlp(toolowindex)=0;  toohighindex=(CQIhlp>maxCQI);  perctoohigh=round(100*sum(toohighindex)/numTTI)  CQIhlp(toohighindex)=maxCQI;else  disp('Extreme CQI values are NOT adapted')end;    %end if adaptCQI[value_min,index_min]=min(CQIhlp);[value_max,index_max]=max(CQIhlp);disp('CQI range (AFTER clipped):')disp('Maximum CQI value of '),value_maxdisp('Minimum CQI value of '),value_minCQI=CQIhlp;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -