%% =========================================================================== % Copyright (C): % 2003-2009 by Forschungszentrum Telekommunikation Wien, Austria; % All rights reserved. % Description : Generate tabular output for ETSI VDSL % performance simulations % % Project : FTW's xDSLsimu % Author(s) : Tomas Nordstrom (Tomas.Nordstrom@FTW.at) % % Reference: % Tomas Nordstrom, The reach simulation results for VDSL Part 1, % ETSI TM6 032t24, Reykjavik, Iceland, Jun., 2002. % ETSI TS 101 270-1 v2.0.10 May., 2003 % % CVS: $Id: TableOutput.m 752 2009-01-02 13:03:52Z tono $ %% =========================================================================== %% =========================================================================== % Change History % 2003-04-11 (ToNo) Created % 2003-04-22 (ToNo) Cleaned up and made some fancy mangement of files %% =========================================================================== global ex; doRounding = 1; % 1 of we want to "floorit" to nearest 10m mindist = 100; % minimum distance to allow useprecalcval = 1; % 1 if we want to use the precalc values noises=['A','B','C','D','E','F']; % Noise models to use (A-F) loops=2; % Loops to test (1-8) services = [1:4 8:9]; % Sym 1..5 Asym 6..9 maskset=[ 1:3]; % Test PSD set 1 or 2 (mask M1 or M2), % while set 3 is M1 without Notches frequencyplans = [997 998]; % Frequency plan to use PBO = [ 0 1]; % Use of UPBO (1 is using and 0 in not) CabVariant = ['B','A']; % Cabinet PSD variant ('A' or 'B') % Get current date if useprecalcval, isodate = '20030811'; % Date when I made the examples else dvec = datevec(now); isodate = sprintf('%4d%02d%02d',dvec(1),dvec(2),dvec(3)); end; %% =========================================================================== % The outer loops are over files for PSDcabVariant = CabVariant for withUPBO = PBO; if withUPBO UPBOflag = '_UPBO'; else UPBOflag = ''; end; if useprecalcval, DirName = 'ExampleResults'; else DirName = '.'; end; MatFileName= sprintf('%s/matlab%s_perf%s%d.mat',... DirName,isodate,PSDcabVariant,withUPBO); dirval = dir(MatFileName); if length(dirval)>0 load(MatFileName); %% =========================================================================== ex.param = setupParam; % Parameters etsi_goalsVDSL; % Get ETSI rate and reach goals % (ETSI) PSD template to use Emask.base = 'ETSI-VDSL-Template'; Emask.ext.cab = ['Pcab' PSDcabVariant]; Emask.ext.ex = 'Pex-P2'; fprintf('\n===============================================================\n'); fprintf('\nReaches for FTTCab Variant %s', PSDcabVariant); if withUPBO fprintf(', With UPBO'); else fprintf(', Without UPBO'); end; fprintf('\n(Data file: %s)\n',MatFileName); %% =========================================================================== % Now its time for the inner-loops for fplan=frequencyplans fprintf('\n\nFrequency plan: %d\n\n',fplan); fprintf('%26s ','PSD and Noise'); for sno = services, snoname = ex.goal.names(sno,:); fprintf(' %s ',snoname); end; fprintf('\n\n'); switch fplan case 997 Mname='E1'; case 998 Mname='E2'; otherwise estr = sprintf('Fplan %d is not implemented',fplan); error(estr); end; %% ======== for noise=1:length(noises) for loopno=loops for mask=maskset %% ======== Get the data switch noises(noise) case {'0'}, ETSImask = sprintf('%s-%s-%s-M%d', ... Emask.base, Mname, Emask.ext.ex, mod(mask+1,2)+1); case {'A','B','C'}, ETSImask = sprintf('%s-%s-%s-M%d', ... Emask.base, Mname, Emask.ext.cab, mod(mask+1,2)+1); case {'D','E','F'}, ETSImask = sprintf('%s-%s-%s-M%d', ... Emask.base, Mname, Emask.ext.ex, mod(mask+1,2)+1); otherwise error('Unknown noise model'); end; tabname = strrep(sprintf('ETSI_%s%d_N%s%s',... ETSImask(length(Emask.base)+2:end-1),... mask,noises(noise),UPBOflag),'-','_'); eval(sprintf('tabval = %s;',tabname)); %% ======== Print the data fprintf('%26s =',tabname); values = tabval(services); if doRounding, values = 10*(floor(values/10)); end; for six = 1:length(values) if values(six) >= mindist, fprintf(' %4.0f',values(six)); else fprintf(' - '); end; end; fprintf('\n'); end % mask end % loopno end % noise end % fplan end % length(dirval)>0 end % withUPBO end % PSDcabVariant