%% =========================================================================== % Copyright (C): % 2002-2003 by Forschungszentrum Telekommunikation Wien, Austria; % All rights reserved. % Description : ETSI VDSL performance simulations % % Project : B1, FTW % 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: VDSLperf.m,v 1.7 2003/12/23 11:02:09 tono Exp $ %% =========================================================================== %% =========================================================================== % Change History % 2002-04-17 (ToNo) Created % 2002-06-19 (ToNo) Made the optimization search as seperate functions % 2002-03-10 (ToNo) Made number for ETSI TM6 VDSL part 1 % 2002-03-12 (ToNo) Fixed: Out-of band power gave positve SNR % in HAM bands % 2002-04-11 (ToNo) However, didn't use the out-of-band power as noise % any longer, now fixed. % 2002-04-11 (ToNo) Fixed: Power calculation for cases with HAM-bands % 2002-04-12 (ToNo) Now we save simulation results into a file % for later post-processing % 2002-04-22 (ToNo) Fixed: Interpolation problem outside 14MHz % 2003-11-03 (ToNo) Lists now use cell arrays for both Octave and Matlab % 2003-12-18 (DrSt) Changed names concerning down- and upstream parameters %% =========================================================================== global ex; global result; PSDcabVariant = 'B'; % Cabinet PSD variant ('A' or 'B') withUPBO = 0; % Flag for use of UPBO (1 is using and 0 in not) %% =========================================================================== % Logging, print, saving and plot options format compact; plotit = 0; % Set to one if you want to see some plots maxplotf = 12.5e6; % Max frequency to plot dosingle = 0; % Set to 1 if we want a single/smaller set of tests % Get current date dvec = datevec(now); isodate = sprintf('%4d%02d%02d',dvec(1),dvec(2),dvec(3)); % Start logging savefile = sprintf('matlabVDSL%s_perf%s%d',isodate,PSDcabVariant,withUPBO); logfile = sprintf('diaryVDSL%s_perf%s%d', isodate,PSDcabVariant,withUPBO); noruns = noFiles([logfile '*']); % Find a unique name for logs logfile = sprintf('%s_r%d',logfile,noruns+1); diary(logfile); %% =========================================================================== % ETSI default inclusions ex.param = setupParam; % Parameters [ex.tfplist, ex.param.HAMBandName] = ... etsi_tfplanHAM([]); % Need a HAM band definition ex.tfplist = etsi_noisesVDSL(ex.tfplist); % Get ETSI VDSL noise models ex.tfplist = etsi_masksVDSL(ex.tfplist); % Get ETSI VDSL PSD masks ex.tfplist = etsi_tfplansVDSL(ex.tfplist); % Get ETSI VDSL plans ex.lclist = setupLClist; % Line code definition (theoretical) ex.lclist = etsi_lcdefsADSL(ex.lclist); % Line code definitions (ADSL) ex.lclist = etsi_lcdefsVDSL(ex.lclist); % ETSI Line code definitions (VDSL) ex.clist = etsi_cablesVDSL([]); % Get ETSI cables etsi_goalsVDSL; % Get ETSI rate and reach goals % Fix deeper HAM band notches hb = getList(ex.tfplist, ex.param.HAMBandName); hb.PSD.downstream = strrep(hb.PSD.downstream,'-80','-140'); hb.PSD.upstream = strrep(hb.PSD.upstream, '-80','-140'); ex.tfplist = setList(ex.tfplist,hb.name,hb); %% =========================================================================== % Select line code lcname = 'VDSL-theo'; %lcname = 'VDSL-DMT'; % This is not fully tested % Select DMT waterfilling method DMT_WFmethod = 'RBL'; % 'RBL' or 'GABL_RA' % Select experiment(s) to run if dosingle, loops=2; % Loops to test (1-8) noises=['E']; % Noise models to use (A-F) services = [3]; % Sym 1..5 Asym 6..9 maskset=[2]; % Test PSD set 1 or 2 (mask M1 or M2), % while set 3 is M1 without Notches frequencyplans = [997]; % Can use 997 and 998 else % All experiments, we have 6*1*6*3*2=216 reaches to calculate % (But with two mask variants and with/without UPBO it becomes 864) 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]; % Can use 997 and 998 end resAdjust.DoAdjustForNID = 0; % Adjust for noise injection dev resAdjust.DoAdjustForMN = 0; % Adjust for modem noise resAdjust.useDynamicMN = 0; % Use the dynamic modem noise % (loop length and frequency dependent) ex.goal.rates=[Srates,Arates]'; ex.goal.names=[Snames; Anames]; % (ETSI) PSD template to use Emask.base = 'ETSI-VDSL-Template'; Emask.ext.cab = ['Pcab' PSDcabVariant]; Emask.ext.ex = 'Pex-P2'; %% ======================================================================== % Change default parameter values % General parameters ex.param.frequency.fastcalc = 1; % Use the fast frequency plan ex.param.modemlist = str2mat('VDSL'); % Modem(s) to be investigated resposition = 1; % VDSL result position in result struct ex.param.frequency.max = 30e6; % Max frequency in use (for masks etc.) ex.param.XTlevel.NEXTx4 = 1; % Flag to use forth order next modeling % NOTE: It would be more appropriate to use bgNoise at -160 and % modemNoise at -140, but they are swapped here for compatibility with % old simulations. ex.param.bgNoise.LT = '-140'; % Backgound noise at LT (dBm/Hz) ex.param.bgNoise.NT = '-140'; % Backgound noise at NT (dBm/Hz) ex.param.Zterm = 135; % VDSL is using 100 Ohm but not for s21! % Line code parameters (generic) tmp_lc=getList(ex.lclist,lcname); tmp_lc.param.SNRMax = 57; % Maximum SNR available (dB) tmp_lc.param.codingGain = 3.8; % To give 12dB Shannon gap tmp_lc.param.SNRloss = 2; tmp_lc.param.alpha = 0.2; tmp_lc.param.guardBand = 0; % Defined by the PSD mask instead tmp_lc.param.xtalk_margin = 6; % We use a cross-talk margin of 6dB tmp_lc.param.signal_margin = 0; % (and therefore no signal margin) tmp_lc.param.efficiencyLoss = 0.12; tmp_lc.param.PxDown = 14.51; tmp_lc.param.PxUp = 11.5; tmp_lc.param.modemNoise.LT = '-160'; % Modem noise at LT (dBm/Hz) tmp_lc.param.modemNoise.NT = '-160'; % Modem noise at NT (dBm/Hz) ex.lclist = setList(ex.lclist,lcname,tmp_lc); % Set up a default PSD mask for VDSL (and the change only PSD def later) % Default values tfpname = lcname; % name tfplan after lcname tmp_tfplan = templateTFP; tmp_tfplan.name = tfpname; tmp_tfplan.PSD.active.upstream = [138e3 12e6]; tmp_tfplan.PSD.active.downstream = [138e3 12e6]; % select upstream power back-off method if withUPBO tmp_tfplan.PSD.PBO.method = 'RefRef'; else tmp_tfplan.PSD.PBO.method = 'None'; end; tmp_tfplan.PSD.PBO.param.refa = [-47.3 -54]; % RefRef noise A&B tmp_tfplan.PSD.PBO.param.refb = [-28.01 -19.22]; % (changed later) tmp_tfplan.PSD.HAM.active = 0; tmp_tfplan.timeDivision.up = 1; tmp_tfplan.timeDivision.down = 1; tmp_tfplan.timeDivision.sync = 1; tmp_tfplan.fixBitrate.name = 'None'; tmp_tfplan.fixBitrate.active = 0; tmp_tfplan.fixBitrate.param = 'N/A'; tmp_tfplan.lcname = lcname; ex.tfplist=insertList(ex.tfplist,tmp_tfplan); gbsize = 250e3; gbtype=1; % Define guardband size and type %% =========================================================================== % Print general experiment setup fprintf('\nSimulating with:\n'); eval([tmp_lc.lcPrint,'(tmp_lc)']); % Print line code setup fprintf('UPBO method: %s\n',tmp_tfplan.PSD.PBO.method) fprintf('Service rate DS, US\n'); for sno = services, ds_target = ex.goal.rates(sno,2)/1e6; us_target = ex.goal.rates(sno,1)/1e6; snoname = ex.goal.names(sno,:); fprintf(' %s : %.1f, %.1f [Mbit/s]\n',... snoname,ds_target,us_target); end; if resAdjust.DoAdjustForNID, fprintf('With adjustment for noise injection normalization\n') end; if resAdjust.DoAdjustForMN, fprintf('With a modem noise floor\n') end; %% =========================================================================== % Set up experiment parameters and loops % Loop definition contain an offset and a position of the variable segment offsetlen=[0 0 70 70]; ypos=[ 1 1 2 1 ]+1; % position of the variable tt.topology segment noiters=0; totalcnt=0; nonoreach=0; % Start timer tic; %% ======================================================================== % Decide what frequency axis to use (after setting up ex.tfplist df = 4.3125e3; % Carrier spacing in Hz if ex.param.frequency.fastrecalc, % Add VDSL band transition frequencies bandtrans = [3e6 3.75e6 5.1e6 5.2e6 7.05e6 8.5e6 ] ; tmp=[bandtrans-gbsize/2 bandtrans+gbsize/2 ]; tmp = [tmp+1 tmp tmp-1]; tmp = [tmp 1e6:100e3:18e6 19e6:1e6:30e6]; % Add some high freq. points else tmp=[df:df:1024*4*df]; end; % f is set once and do not change for each experiment ex.param.frequency.f = union(getMinFreqaxis(ex.param.frequency.max),tmp); ex.param.frequency.set = 1; f=ex.param.frequency.f; hamPSD = eval([hb.PSD.downstream ';']); %% =========================================================================== % Begin the nested loops (noise, loop, freqplan, mask, service) for noise=1:length(noises) switch noises(noise) case {'0'}, noisetype='Calculate'; case {'A','B','C'}, noisetype=sprintf('ETSI-VDSL-Noise%s',noises(noise)); case {'D','E','F'}, noisetype=sprintf('ETSI-VDSL-Noise%s',noises(noise)); otherwise error(['Unknown noise model: ',noises(noise)]); end; ex.param.NoiseModel = noisetype; % Reference PSD for UPBO switch noises(noise) case {'0'}, case {'A','B'}, tmp_tfplan.PSD.PBO.param.refa = [-47.3 -54]; tmp_tfplan.PSD.PBO.param.refb = [-28.01 -19.22]; case {'C'}, tmp_tfplan.PSD.PBO.param.refa = [-47.3 -54]; tmp_tfplan.PSD.PBO.param.refb = [-21.14 -16.29]; case {'D'}, tmp_tfplan.PSD.PBO.param.refa = [-47.3 -54]; tmp_tfplan.PSD.PBO.param.refb = [-26.21 -17.36]; case {'E'}, tmp_tfplan.PSD.PBO.param.refa = [-47.3 -54]; tmp_tfplan.PSD.PBO.param.refb = [-27.27 -18.1]; case {'F'}, tmp_tfplan.PSD.PBO.param.refa = [-47.3 -54]; tmp_tfplan.PSD.PBO.param.refb = [-19.77 -15.77]; otherwise error('Unknown noise model'); end; for loopno=loops nomodems = 21; dist = 1000; % To be changed tt.name=sprintf('ETSI VDSL Loop %d len %.0fm',loopno,dist); switch loopno case 1, cable='BT_dwug'; % TP100 tt.topology={{0, '', 'CO', ''},... {dist, cable, 'N1', sprintf('%.0f m TP100',dist)}}; tt.traffic={{1, 2, 'VDSL', nomodems}}; case 2, cable='KPN_L1'; % TP150 tt.topology={{0, '', 'CO', ''},... {dist, cable, 'N1', sprintf('%.0f m TP150',dist)}}; tt.traffic={{1, 2, 'VDSL', nomodems}}; case 3, tt.topology={{0, '', 'CO', ''},... {70, 'KPN_R2', 'E', sprintf('%.0f m TP100x',70)},... {dist-70, 'KPN_L1', 'N1', sprintf('%.0f m TP150',dist-70)}}; tt.traffic={{1, 3, 'VDSL', nomodems}}; otherwise estr=sprintf('Loop #d not implemented\n',loopno); error(estr); end; ex.tt=tt; % Define the experiment tt structure for fplan=frequencyplans for mask=maskset switch fplan case 997 us.tones = [699:1178 1638:2782]; ds.tones = [32:691 1186:1630]; pix = 'M'; Mname = 'E1'; bandplan = [138 3000 5100 7050 12000]*1e3; upf_start = [3000 7050]*1e3; upf_stop = [5100 12000]*1e3; case 998 us.tones = [874:1200 1976:2782]; ds.tones = [32:865 1210:1966]; pix = 'R1'; Mname = 'E2'; bandplan = [138 3750 5200 8500 12000]*1e3; upf_start = [3750 8500]*1e3; upf_stop = [5200 12000]*1e3; otherwise estr = sprintf('Fplan %d is not implemented',fplan); error(estr); end; tmp_tfplan.PSD.PBO.param.upf_start = upf_start; tmp_tfplan.PSD.PBO.param.upf_stop = upf_stop; % Determine active frequencies (i.e. where we calculate capacity) nopoints=length(bandplan); bplow = bandplan; bplow(2:nopoints-1)=bplow(2:nopoints-1)-gbsize/2; bphigh = bandplan; bphigh(2:nopoints-1)=bphigh(2:nopoints-1)+gbsize/2; active_ds = zeros(size(f)); active_us = zeros(size(f)); for bandp = 1:2:nopoints; fix=find(f>=bphigh(1) & f<=bplow(2)); %DS1 active_ds(fix)=1; fix=find(f>=bphigh(2) & f<=bplow(3)); %US1 active_us(fix)=1; fix=find(f>=bphigh(3) & f<=bplow(4)); %DS2 active_ds(fix)=1; fix=find(f>=bphigh(4) & f<=bplow(5)); %US2 active_us(fix)=1; if mask<2 fixham = hamPSD<10^-6; % HAM band active_us(fixham)=0; active_ds(fixham)=0; end; end; tmp_tfplan.PSD.active.actmaskds = active_ds; tmp_tfplan.PSD.active.actmaskus = active_us; 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; masktf = getList(ex.tfplist,ETSImask); tmp_tfplan.PSD.downstream=masktf.PSD.downstream; tmp_tfplan.PSD.upstream=masktf.PSD.upstream; % Set up transmit PSD switch lcname case {'VDSL-theo','VDSL-DMT'} %DMT tmp_lc.param.dmt.us.tones = us.tones; tmp_lc.param.dmt.ds.tones = ds.tones; otherwise error(['Unknown lcname: ',lcname]); end; % lcname if mask>=2, tmp_tfplan.PSD.HAM.active=0; notched='UnNotched'; else tmp_tfplan.PSD.HAM.active=1; notched='Notched'; end; %% ======================================================================== % Print experiment setup fprintf('\n=========================\n'); fprintf('Loop %d Noise "%s", mask %s %s (%d)\n',... loopno, noises(noise),ETSImask,notched,fplan); % Check if Total power is OK tfplan=getList(ex.tfplist,ETSImask); % Set up the data upPSD = eval(sprintf('%s;',tfplan.PSD.upstream)); downPSD = eval(sprintf('%s;',tfplan.PSD.downstream)); % If notching is active remove HAM-band if(tmp_tfplan.PSD.HAM.active == 1) hamband = getList(ex.tfplist,ex.param.HAMBandName); hamPSD = eval(sprintf('%s;',hamband.PSD.downstream)); upPSD = min(upPSD,hamPSD); downPSD = min(downPSD,hamPSD); end Px_Up=10*log10(trapz(f,upPSD)); Px_Down=10*log10(trapz(f,downPSD)); fprintf('Actual power DOWN = %.2f dBm, UP = %.2f dBm\n',Px_Down,Px_Up); fprintf('\n'); %% ======================================================================== tabdata = zeros(9,1); for service=services % Set up correct frequency for the IL values f_T = ex.goal.ft(service); % Target rate for service ds_target = ex.goal.rates(service,2)/1e6; us_target = ex.goal.rates(service,1)/1e6; servicename = ex.goal.names(service,:); target.ds=ds_target; target.us=us_target; tmp_tfplan.fixBitrate.param.target_us = us_target; tmp_tfplan.fixBitrate.param.target_ds = ds_target; switch lcname case {'VDSL-theo'} tmp_tfplan.fixBitrate.name = 'None'; tmp_tfplan.fixBitrate.active = 0; case {'VDSL-theo','VDSL-DMT'} tmp_tfplan.fixBitrate.name = DMT_WFmethod; tmp_tfplan.fixBitrate.active = 0; otherwise error(['Unknown lcname: ',lcname]); end; % lcname xDSL.name='VDSL'; xDSL.used=tfpname; ex.param.xDSLlist=setList(ex.param.xDSLlist,xDSL.name,xDSL); ex.lclist = setList(ex.lclist,lcname,tmp_lc); ex.tfplist = setList(ex.tfplist,tfpname,tmp_tfplan); %% ======================================================================== % Print experiment setup fprintf('Service %s => ', servicename) % Show traffic and topology structure as plots (if wanted) if plotit & (service==services(1)), % figure; plotTTstructure(ex.tt); tfplan=getList(ex.tfplist,tfpname); fax.min=1e3;fax.max=maxplotf; figure; plotTFplan(tfplan,'Linear',fax,sprintf('%s',ETSImask)); drawnow; % Show it now end; % Search for reach switch lcname case {'VDSL-theo','VDSL-DMT'} [reach,cnt]=rateSearch(resposition,target,ypos(loopno),resAdjust); otherwise error(['Unknown lcname: ',lcname]); end; % lcname if plotit result=evalExperiment; figure; plotResult(ex,result,1,'LT') end; %% ======================================================================== % Print result fprintf('Len = %4.0fm, IL = %4.1fdB (at %4.1f MHz)\n',... reach+offsetlen(loopno),... VDSLIL(loopno,f_T,reach+offsetlen(loopno)),f_T/1e6); if ~onMatlab fflush(stdout); end % Save the data in a structure for later processing tabdata(service)=reach; %% ======================================================================== % Loop around noiters=noiters+1; totalcnt=totalcnt+cnt; end % service % Save the table of data in a variable for later processing % loopno is always 2 here ... skip it if withUPBO UPBOflag = '_UPBO'; else UPBOflag = ''; end; tabname = strrep(sprintf('ETSI_%s%d_N%s%s',... ETSImask(length(Emask.base)+2:end-1),... mask,noises(noise),UPBOflag),'-','_'); eval(sprintf('%s = tabdata;',tabname)); end % mask end % fplan end % loopno end % noise %% ======================================================================== % Print elapsed time usedtime=toc; fprintf('\n'); fprintf('Used time = %.2fs (%.2fs per reach)\n',usedtime,usedtime/noiters); fprintf('Calculated %d experiments ',totalcnt); fprintf('(in avg. %.1f experiments per nonzero reach)\n',... totalcnt/(noiters-nonoreach)); %% ======================================================================== % Save and stop logging eval(['save ' savefile ' ETSI*']); diary off;