function noise_floor = get_noise_floor(f, L, ISDN) %% =========================================================================== %get_noise_floor - Function to provide noise floor for FDD ADSL simulations. % % Parameter: f Vector of frequencies, in Hz, % at which noise floor values are desired % L Loop length, in m, of main branch of the test loop % ISDN Flag to indicate whether to generate POTS or ISDN % noise floor; set to 1 for ISDN % % Returns: noise_floor Noise floor in dBm/Hz % Example(s): % % Algorithmic details: % % Reference: % ETSI TM6 WD?? %% =========================================================================== %% =========================================================================== % Copyright (C) 2001-2003 by Forschungszentrum Telekommunikation Wien, Austria; % All rights reserved. % Description : ADSL performance simulations % % Project : FTW's xDSLsimu % Author(s) : Krista Jacobsen (Jacobsen@ti.com) % Tomas Nordstrom (Tomas.Nordstrom@FTW.at) % % CVS: $Id: get_noise_floor.m,v 3.1 2002/12/27 15:56:06 tono Exp $ %% =========================================================================== % Change History % 2001-09-21 (KJ) Created % 2001-10-08 (ToNo) Moved it into the simulator and added comments %% =========================================================================== f=f./1e3; % Below we use kHz L=L./1e3; % and km if ISDN, indices = find (f < 500); if (L < 4), noise_floor = (-120-5*L) * ones(size(f)); % This is the flat part of the PSD noise_floor(indices) = -114 - 6*log(f(indices)/250)/log(2) - 5*L; else % L >= 4km, noise_floor = -140*ones(size(f)); noise_floor(indices) = -134 - 6*log(f(indices)/250)/log(2); end; % if (L < 4), else, indices = find(f < 250); if (L < 4), noise_floor = (-120-5*L) * ones(size(f)); % This is the flat part of the PSD noise_floor(indices) = -114 - 6*log(f(indices)/125)/log(2) - 5*L; else % L >= 4km, noise_floor = -140*ones(size(f)); noise_floor(indices) = -134 - 6*log(f(indices)/125)/log(2); end; % if (L < 4), end; % if ISDN,