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

📄 environment.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 %              %   Choice of environment and corresponding delay profile%%   [profile,spectrum] = environment(multi,max)%%   Look-up delay profile%%   Input   multi       :   name of environment (see parameters.m, is chosen during the simulation)%           max         :   maximum loss for tap%%   Output  power       :   relative strength of all taps%           spectrum    :   Doppler spectrum%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%function [power,spectrum] = environment(multi,max)if multi < 3    spectrum = 'Flat';else    spectrum = 'Jackes';end% Delay in ns, power in dBswitch multi    case {-4,-3} % Single Rayleigh Channel        % Delay   [0]        profile = [0];            case -2 % Case 1        % Delay   [0 976]        profile = [0 -10];            case -1 % Case 2        % Delay   [0 976 20000]        profile = [0   0     0];            case 0 % Case 3        % Delay   [0 260 521 781]        profile = [0  -3  -6  -9];            case 1 % Indoor Office A        % Delay   [0 50 110 170 290 310]        profile = [0 -3 -10 -18 -26 -32];               case 2 % Indoor Office B        % Dealy [0  100  200   300  500   700]        profile = [0 -3.6 -7.2 -10.8  -18 -25.2];                case 3 % Pedestrian A        % Delay   [0  110   190   410]        profile = [0 -9.7 -19.2 -22.8];        case 4 % Pedestrian B        % Delay   [0  200  800 1200 2300  3700]        profile = [0 -0.9 -4.9 -8.0 -7.8 -23.9];        case 5 % Vehicular A        % Delay   [0 310 710 1090 1730 2510]        profile = [0  -1  -9  -10  -15  -20];         case 6 % Vehicular B        % Delay   [   0 300  8900 12900 17100 20000]        profile = [-2.5 0.0 -12.8 -10.0 -25.2 -16.0];           case 7 % Rural        % Delay   [0   42  101  129  149  245   312   410   469   528]        profile = [0 -1.2 -3.2 -4.1 -4.8 -7.9 -10.1 -13.3 -15.2 -17.2];          case 8 % Tipical Urban        % Delay   [0  217  512  514  517  674  882  1230  1287  1311  1349  1533  1535  1622  1818  1836  1884  1943  2048  2140]        profile = [0 -1.9 -4.4 -4.5 -4.5 -5.8 -7.7 -10.6 -11.2 -11.4 -11.7 -13.3 -13.3 -14.1 -15.8 -15.9 -16.4 -16.9 -17.8 -18.6];     case 9 % Hilly Terrain        % Delay   [0  356  441  528  546  609  625   842   916   941 15000 16172 16492 16876 16882 16978 17615 17827 17849 18016]        profile = [0 -5.3 -6.6 -7.9 -8.2 -9.1 -9.4 -12.6 -13.7 -14.1 -14.0 -19.1 -20.5 -22.2 -22.2 -22.6 -25.4 -26.3 -26.4 -27.1];end% exclude very weak tapsprofile = profile(profile>max); % conversion from dB to linearpower = 10.^(profile/10);    % Normalize sum of tap profiles to onepower = power/sum(power);

⌨️ 快捷键说明

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