%% =========================================================================== % Copyright (C): % 1998-2000 by Telia Research AB, Lulea, Sweden; % 2000 by Forschungszentrum Telekommunikation Wien, Austria; % All rights reserved. % % Description : Main simulation program, a first example % % File : Main.m % Project : FSAN duplex model % Author(s) : Tomas Nordstrom (Tomas.Nordstrom@FTW.at) % : Daniel Bengtsson (Daniel.J.Bengtsson@Telia.se) % % CVS: $Id: Main.m,v 1.1 2000/04/27 15:29:32 tono Exp $ %% =========================================================================== %% =========================================================================== % 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 %% =========================================================================== global ex; global res; % Test if we have problem reading numbers in international OS versions if 3 == 3.14, error(['Matlab thinks 3 is equal to 3.14, ' ... 'please use an US (or posix C) version of the system. ' ... 'Or add LC_NUMERIC=us into $MATLAB/bin/.matlab5rc.sh' ]); end scenario='FSAN scenario FTTEx #1'; gui.vdslDuplex = 'VDSL-FDD'; % Duplex method for VDSL % Set up default experiment structures ex.param = setupParam; % Parameters [ex.tfplist, ex.param.HAMBandName] = ... itu_tfplanHAM([]); % Need a HAM band definition ex.tfplist = fsan_tfplansMISC(ex.tfplist); % Get plans for alien noise ex.lclist = setupLClist; % Line code definition (theoretical) ex.lclist = fsan_lcdefs(ex.lclist); % Line code definitions (ADSL) ex.clist = etsi_cables([]); % Get ETSI (and ANSI) cables; ex.tfplist = etsi_tfplansVDSL(ex.tfplist); % Get plan VDSL-FDD gui.ttlist = fsan_loops([]); % Some FSAN Topologies ex.tt = getList(gui.ttlist,scenario); % Get our example scenario % Test both ADSL and VDSL ex.param.modemlist=['VDSL';'ADSL']; xDSL=getList(ex.param.xDSLlist,'VDSL'); xDSL.used=gui.vdslDuplex; ex.param.xDSLlist=setList(ex.param.xDSLlist,xDSL.name,xDSL); xDSL.name='ADSL'; xDSL.used='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]=calcFSANresult(ex,result); sprintf('LT Rates') bitrate_LT sprintf('NT Rates') bitrate_NT sprintf('Ratio') bitrate_NT./bitrate_LT % Plot the result from experiment for current=1:length(result), figure; tmp_str=sprintf('FSAN Duplex Simulation Result, Modem %d (%s-%s)',... current, ex.tt.topology{result(current).Modem.LT_Node,3}, ... ex.tt.topology{result(current).Modem.NT_Node,3}); set(gcf,'NumberTitle','off','Name',tmp_str); % Plot the LT side subplot(211) plotResult(ex,result,current,'LT'); % Plot the NT side subplot(212) plotResult(ex,result,current,'NT'); end % or do uiResults(ex,result) to get the gui interface for the results