%% =========================================================================== % Copyright (C): % 1998-2000 by Telia Research AB, Lulea, Sweden; % 2000-2009 by Forschungszentrum Telekommunikation Wien, Austria; % All rights reserved. % % Description : Main simulation program, a first example % % File : Main.m % Project : FTW's xDSLsimu % Author(s) : Tomas Nordstrom (Tomas.Nordstrom@FTW.at) % : Daniel Bengtsson (Daniel.J.Bengtsson@Telia.se) % : Bo Engstrom (bosse@upzide.com) % % CVS: $Id: Main.m 752 2009-01-02 13:03:52Z tono $ %% =========================================================================== %% =========================================================================== % Change History % 1998-11-12 (ToNo) Created % 1998-11-13 (ToNo) Modified to the split of experiment setup % 1998-12-08 (DaB) Updated % 1998-12-21 (ToNo) Updated to get in sync with uiMain % 1998-01-07 (ToNo) Removed modem under test % 1998-01-14 (ToNo) Fixed spelling of FTTEx (Thanks Gye Tae Kihl) % 1998-01-14 (ToNo) Updated to get in sync with uiMain % 1999-02-05 (DaB) Changed to fit new param structure % 1999-02-25 (ToNo) Generlized list (tfplist) handling % 1999-03-25 (ToNo) Restructured the source (moved into subdir xdslcomm) % 2000-04-05 (UvAn) New return value from itu_tfplanHAM % 2001-06-15 (Bosse) Octave port % 2003-11-03 (ToNo) Lists now use cell arrays for both Octave and Matlab % 2005-01-12 (ToDo) Updated with new masks and VDSL definitions % 2006-04-12 (ToDo) Updated name to NC-ADSL for modemlist %% =========================================================================== global ex; scenario='FSAN scenario FTTEx #1'; gui.vdslDuplex = 'ETSI-VDSL-E1U0-Pex-P2-M1'; % ETSI VDSL using 997 % Set up default experiment structures ex.param = setupParam; % Parameters [ex.tfplist, ex.param.HAMBandName] = ... itu_tfplanHAM([]); % Need a HAM band definition ex.tfplist = fsan_modelsMISC(ex.tfplist); % Get plans for alien noise ex.clist = etsi_cablesVDSL([]); % Get ETSI (and ANSI) cables; ex.lclist = setupLClist; % Line code definition (theoretical) ex.lclist = etsi_lcdefsADSL(ex.lclist); % Line code definitions (ADSL) ex.lclist = etsi_lcdefsVDSL(ex.lclist); % Line code definitions (VDSL) ex.tfplist = etsi_masksVDSL(ex.tfplist); % Get ETSI VDSL masks ex.tfplist = etsi_tfplansVDSL(ex.tfplist); % Get plan ETSI E1 (997) gui.ttlist = fsan_loopsVDSL([]); % Some FSAN Topologies ex.tt = getList(gui.ttlist,scenario); % Get our example scenario % Test both ADSL and VDSL ex.param.modemlist=str2mat('VDSL','NP-ADSL'); xDSL=getList(ex.param.xDSLlist,'VDSL'); xDSL.used=gui.vdslDuplex; ex.param.xDSLlist=setList(ex.param.xDSLlist,xDSL.name,xDSL); xDSL.name='NP-ADSL'; xDSL.used='NP-ADSL'; ex.param.xDSLlist=insertList(ex.param.xDSLlist,xDSL); % Show traffic and topology structure figure(1); plotTTstructure(ex.tt); % Show PSD masks for VDSL modem tfplan = getList(ex.tfplist,gui.vdslDuplex); figure(2); gui.fax.min=1e3; gui.fax.max=12e6; plotTFplan(tfplan,'Lin',gui.fax); drawnow; % Show it now % Evaluate this experiment result = evalExperiment; % Show the result from the experiment format compact [bitrate_LT, bitrate_NT]=calcXDSLresult(ex,result); disp('LT Rates') disp(bitrate_LT) disp('NT Rates') disp(bitrate_NT) disp('Ratio') disp(bitrate_NT./bitrate_LT) % Plot the result from experiment for current=1:length(result), figure; % Plot the LT side subplot(211) x=result{current}; tmp_str=sprintf('Simulation Result, Modem %d (%s-%s)\n',... current,... ex.tt.topology{x.Modem.LT_Node}{3},... ex.tt.topology{x.Modem.NT_Node}{3}); plotResult(ex,result,current,'LT',[],[],tmp_str); % Plot the NT side subplot(212) tmp_str=sprintf('%s-%s\n',... ex.tt.topology{x.Modem.LT_Node}{3},... ex.tt.topology{x.Modem.NT_Node}{3}); plotResult(ex,result,current,'NT',[],[],tmp_str); end