%% =========================================================================== % Copyright (C): % 2000-2009 by Forschungszentrum Telekommunikation Wien, Austria; % All rights reserved. % % Description : Reach calculation for a SDSL modem in a given scenario % (only one cable type between CO and a single NT point) % This version is a much more compact/efficent % version of the ExSDSLreach.m % % Project : FTW's xDSLsimu % % Author(s) : Tomas Nordstrom (Tomas.Nordstrom@FTW.at) % %% =========================================================================== %% =========================================================================== % Change History % 2005-04-25 (ToNo) Created, rewrote ExSDSLreach for use with fzero %% =========================================================================== global ex; useoldsdsldefs = 2; % Set to 1 if you want the old SDSL definition ex.param = setupParam; % Setup of basic default simulation Parameter ex.tfplist = itu_tfplanHAM([]); % Need a HAM band definition ex.tfplist = etsi_noisesSDSL(ex.tfplist); ex.tfplist = etsi_tfplansSDSL(ex.tfplist); % Get ETSI SDSL plans ex.tfplist = etsi_tfplansADSL(ex.tfplist); % Get ETSI ADSL plans ex.tfplist = etsi_tfplansLegacy(ex.tfplist); % Get ISDN ex.lclist = setupLClist; % Line code definition (Theo.) ex.lclist = etsi_lcdefsADSL(ex.lclist); % Line code definitions (ADSL) ex.lclist = etsi_lcdefsSDSL(ex.lclist); % Line code definitions (SDSL) ex.lclist = etsi_lcdefsSDSL_SpecificRates(ex.lclist); % and specific rates ex.clist = etsi_cablesSDSL([]); % Get ETSI SDSL cables; sdslbase = 'ETSI-SDSL-'; % Default is with updated SDSL models adsltype = 'ETSI-ADSL-FDDoverPOTS'; % For ADSL we use FDDoverPOTS isdntype = 'ETSI-ISDN-2B1Q'; % For ADSL we use FDDoverPOTS if useoldsdsldefs, % Closely model the ExSDSLreach.m systems sdslbase = 'ETSI-SDSL-RC-'; % Use older SDSL models ex.tfplist = etsi_tfplansSDSL_RC(ex.tfplist); ex.lclist = etsi_lcdefsSDSL_SpecificRates_RC(ex.lclist); ex.tfplist = fsan_modelsMISC(ex.tfplist); % Get old ADSL % adsltype = 'NP-ADSL'; adsltype = 'NP-ISDN-2B1Q'; end; % Example for Reach calculation (cf.UserLoopsSDSL.m "Scenario 0") ntt= { {[sdslbase, 'sym-1024'], 20, -1} {[sdslbase, 'sym-2048'], 20, -1} {adsltype, 20, -1} {isdntype, 10, -1} }; % Do 'Calculate' instead if predefined noise models ex.param.NoiseModel = 'Calculate'; % Select what modem to evaluate, take first in ntt ex.param.modemlist=str2mat(ntt{1}{1}); % Considered modem % Set up to test the reach of a margin limited system using marginEval ex.ms.ntt = ntt; % Compact tt description ex.ms.resrow = 1; % Row for res., depends on modemlist ex.ms.cable = 'ETSI-SDSL-PE04'; % Cable to use %===================== End of Set up Parameter section ======================= % Find the reach using matlab function fzero oset=optimset('TolX',1e-3); %oset=optimset('TolX',1e-3,'disp','iter'); % See the iteration progress [reach,fval,exitflag]=fzero(@marginEval,[250,6000],oset); % Show the reach in the topology structure ex.tt.topology{2}{4}= ['<-- max. length: ' (num2str(round(reach))) ' m -->']; figure; plotTTstructure(ex.tt); drawnow; % Show it now text(1,170,['Reach for ' ex.param.modemlist ... ' on cable ' ex.tt.topology{2}{2}]); % Show the result in the command window fprintf('\n\nMaximum Reach for %14s from CO to NT\n', ex.param.modemlist); fprintf('Maximum Reach = : %.0fm\n\n',reach);