Description of Program Files and Functions

This is a brief description of all routines and functions included in the FTW xDSL Simulation Tool. For each of the directories src\xdslcomm (main simulation files) and src\xdsldefs (definition files) they are listed in alphabetical order. For having a look on the source code, please click on the function's name in the paragraph title.

Directory src/xdslcomm (main simulation files)

ABCDprod(x,y)

Multiply two ABCD matrices (over all f)

Example(s):

resultABCD = ABCDprod(x,y);

ABCDseries(f,R,C,L)

Generate a ABCD matrix corresponding to a serie impedance

Example(s):

[res] = ABCDseries(f,R,C,L);

ABCDshunt(f,R,C,L)

Generate a ABCD matrix corresponding to a shunt impedance

Example(s):

[res] = ABCDshunt(f,R,C,L);

addFSAN(A,B)

Adds two noise PSDs according to the FSAN model for combining noise. The input parameters A and B are the PSDs of the two noise sources as vectors (versus frequency). The function returns the total resulting noise PSD.

buildAttMtr(ex,f,no_nodes,tt_topology,Zterm)

Initialise and create the Att_mtr (insertion loss matrix between all nodes in a loop).

Example(s):

Att_mtr=buildAttMtr(ex,f,no_nodes,tt_topology,Zterm);

calcFoldedSNR(SNR,f,fsym)

Calculates the folded SNR needed for ideal DFE margin calculation in SDSL (PAM modulation) simulations. The input parameters are the SNR as a vector (versus frequency axis), the frequency axis f and the symbol frequency fsym of the SDSL transmission. The function returns the resulting folded SNR.

calcPSD(data,method,f,low)

Returns the PSD mask as a vector (versus frequency axis f) calculated from a PSDmask-template given in data. The input (string) parameter method indicates the interpolation method to be used for computing the PSDmask from the template values ('linear' or 'log-linear' are valid). The parameter low must give the value to be used as floor-PSD in frequency intervals where no signal is defined. A valid template is a vector containing pairs of frequency and PSD values where the frequencies must be given in Hz and the PSD values in dBm (e.g. template=[1e3 -140 1e5 -20 1e6 -20 1e7 -140];)

calcRate(b,f,f_start,f_stop)

Returns the resulting bitrate for a frequency band between f_start and f_stop, computed from the bitloading vector b versus frequency axis f. This function in fact approximates the integral of b over frequency f between boundaries f_start and f_stop.

calcResultTheo(tfplan,res,lc,f)

Returns the resulting theoretical bitrates and margins at NT and LT side for a Single Carrier Modulation (SCM) system. As input parameters the function needs the time /frequency plan tfplan and the line code definitions lc of the considered system, the result struct res (created by evalExperiment) and the frequency axis f. The margins returned by this function are simply calculated from the linecode definitions for signal margin, noise margin and SNR loss. This function is typically called by calcXDSLresult to calculate extended simulation results.

Example(s):

[LT_brate, NT_brate, LT_margin, NT_margin]=calcResultTheo(tfplan,res,lc,f);

calcXDSLresult(ex,result)

This function evaluates extended simulation results from the basic simulation results. The basic simulation results are computed by the routine evalExperiment which creates the result struct result. From this struct and from the simulation input parameter struct ex the function calcXDSLresult computes service specific results for bitrates and margins at both NT and LT side. Doing this, the function calcXDSLresult uses underlying service specific functions which are defined within the linecode definition for each service (string variable ex.lclist.calcRate).

Example(s):

[LT_brate, NT_brate, LT_margin, NT_margin]=calcXDSLresult(ex,result);

calcUPBO(PSD_up,PBO,Att_mtr,start_node,stop_node,Ref_Topology,Ref_Noise)

Calculates upstream power back-off (UPBO) (support routine to evalExperiment). It returns the transmit PSD after UPBO when the input parameter PSD_up is the PSD before UPBO. PBO is the PBO structure defined in the tfplan (ex.tfplist.PSD.UPBO) which consists of fields containing the name of the PBO method to be applied and values for PBO parameters). Att_mtr ist the attenuation model of the topology in matrix form containing attenuation values (dB/km) for every node-to-node connection of the topology. start_node and stop_node are the nodes between which the considered modem transmits. Ref_Att and Ref_Noise are reference values for cable attenuation and noise on which the PBO calculation is based. This function is extensively used during execution of evalExperiment.

Example(s):

PSD_upi=eval(sprintf('%s;',tfplan.PSD.upstream)); PSD_up=calcUPBO(PSD_upi,tfplan.PSD.UPBO,Att_mtr,LT_node,NT_node,... Ref_Topology,Ref_Noise./PSD_upi);

checkEx()

Checks consistency and plausibility of the global input parameter structure ex. Returns an indicator (1 if ex is OK and 0 otherwise) and an error string (empty string if ex is OK).

Example(s):

[result,errorStr]= checkEx();

Contents

Is a text file (without any computing functionality) which provides a list of the most important MATLAB files in the directory src\xdslcomm of the simulation tool.

evalExperiment

This routine is the 'heart' of the simulation tool. It controls computations of signals and noises on each node for the given scenario. It uses the global input parameter structure ex and creates a global structure result as the basic simulation result. The struct result contains signals and noises PSD at each node of interest in the given scenario. An overview of the program sequence is shown in the structure chart of evalExperiment. After executing evalExperiment typically the function calcXDSLresult should be called for computing extended simulation results as margins and bitrates.

evalNoise(f,NT,LT,start,stop,tot_len,Att_mtr,PSD_up,PSD_dn,XTl)

Returns the noise contributions to be added at LT and NT side of a disturbed modem caused by a disturbing service between node start (LT side of disturber) and node stop (NT side of disturber). f is the frequency axis on which all the frequency dependent parameters are defined, NT and LT are the node identifiers of the disturbed modem at LT and NT side respectively. tot_len is the node vector of the topology containing all lengths from the Central Office (CO) node to a given node of the topology (i.e. tot_len(n) is the loop length from CO to node n), Att_mtr is the attenuation model of the topology in matrix form containing attenuation values (dB/km) for every node-to-node connection of the topology. PSD_up and PSD_dn are the transmit PSDs of the disturbing service in upstream respectively downstream direction and XTl is the crosstalk level in dB (ex.param.XTlevel). The result is returned in two structures (add_noise_LT and add_noise_NT in the example below) each of them consisting of three fields for NEXT, FEXT, and thirdCXT. This function is extensively used during execution of evalExperiment.

Example(s)

[add_noise_LT,add_noise_NT]=evalNoise(f,NT,LT,start,stop,tot_len,Att_mtr,PSD_up,PSD_dn,XTl);

findStrIndex(strarray,str)

Returns the index of the string str in the string array strarray. Returns 1 if str is not found in strarray.

getABCD(ex,start,stop,topology,f,Zterm)

Returns the ABCD matrix of a section of a loop (given in topology) between start node and stop node. The input parameter structure ex, a frequency vector f, and a terminating impedance Zterm must also be specified in the function's input parameter list. The returned 2 by 2 matrix M corresponds to the classic ABCD two port model, (i.e. M(1,1)=A; M(1,2)=B; M(2,1)=C; M(2,2)=D).

Example(s):

[M] = getABCD(ex,start,stop,topology,f,Zterm);

getBFromIL(cablemodel,f,Zterm,d)

Get the "B" parameter from insertion loss of splitter, where B is a parameter of transmisson line given by an "ABCD" or "two-port modeling" theory (A=D=1, C=0). If d is less than 1/1000 km we assume that there is no length dependence, e.g. a splitter model.

The cable model comes either from two files (cablemodel.param.ffile and cablemodel.param.ilfile) or from two vectors (cablemodel.param.ftab and cablemodel.param.iltab) which gives frequency axis and insertion loss [dB] respectively. The insertion loss is assumed to be normalized to 1 km.

Example(s):

cablemodel = getList(ex.clist,cablename);
d=1.5; % length in km
if cablemodel.model == 'IL'
    ABCDsegment={{1,getBFromIL(cablemodel,f,Zterm,d)},{0,1}};
end;

getDM(traffic,modemlist)

Finds the service(s) in the traffic definition struct traffic which matches the service(s) given in modemlist. For all services found the service number (line number of cell array vector) is returned within a vector (dm in the example below).

Given a traffic definition

traffic={{1 2 'SDSL-sym'  20},...
         {1 2 'ADSL'      20},...           
         {1 3 'VDSL'      20},...
         {1 3 'ISDN-2B1Q' 10},...
         {1 3 'ADSL'      20}};

and a modemlist:

modemlist=['ADSL'; 'VDSL'];

the function call:

dm=getDM(traffic, modemlist);

will return the vector:

dm=[2 5 3]

getIL(ex,start,stop,topology,f,Zterm)

Returns the insertion loss of a section of a loop (given in topology) between start node and stop node. The input parameter structure ex, a frequency vector f, and a terminating impedance Zterm must also be specified in the function's input parameter list. The returned insertion loss (A in example below) is a vector (versus frequency f) and is given in dB.

Example(s):

A = getIL(ex,start,stop,topology,f,Zterm);

getList(list,name)

Returns the object indicated by the string name from the list list. If the object is not found in the list a warning occurs.
See also: format of lists used in the simulation tool

Example(s):

tfplan = getList(ex.tfplist,'VDSL');

will return the time/frequency plan definitions for VDSL provided that they are contained in ex.tfplist.

getMinFreqaxis(maxf)

This function creates a frequency axis consisting of a minimum amount of frequency points to accelerate simulation speed. The new frequency axis is derived from the one specified by the values in ex.param.frequency.min, ex.param.frequency.max, and ex.param.frequency.granularity, taking into account the shapes of the PSDs of the services considered in the scenario. In the created new frequency axis density of frequency points is higher in frequency intervals where PSDs show rapid changes and the density of frequency points is les dense in intervals where PSDs show smoth behaviour. Using this time optimized frequency axis allows simulations which are slightly (1-2%) less accurate but  up to 20 times faster. A switch variable (ex.param.frequency.fastrecalc) determines if calculations should use the time optimized frequency axis or not. The function is used by evalExperiment prior to experiment evaluation. The input parameter maxf is optional and specifes the upper boundary of the new frequency axis, if not specified the value in ex.param.frequency.maxis taken. For the lower boundary the value in ex.param.frequency.minis always taken.

getNameList(list)

Gets the names of all entries of the list list and returns a them as a list of names.
See also: format of lists used in the simulation tool

Example(s):

namelist = getNameList(list);

getNoiseModels()

This function returns a cell array containing the names (as strings) of all available (defined) noise models of the simulation tool. The first entry in the cell array is 'Calculate' refering to the method of calcualting the resulting noise from the actual traffic in the scenarion instead of using a predefined noise model. This first entry is followed by the names of all available predefined noise models assuming that the first five characters of their names are 'Model' (the cell array is set up by simply searching the list of tfplans for tfplans starting with 'Model').

Example(s):

models = getNoiseModels();

getTwoPortModel(cable,f)

Computes and returns the two port parameters Z0 (characteristic impedance) and gamma (complex propagation coefficient) of a cable defined in the structure cable according to the cable's parameters and the specific cable model also specified within the cable definition structure cable. f is the frequency axis used. The computation For details of the cable definition see ex.clist.

Example(s):

[Z0,gamma] = getTwoPortModel(cable,f);

getUPBOmethods()

Simply returns the names of UPBO methods available in the simulation tool.

Example(s):

methods = getUPBOmethods();

getZin(ex,start,stop,topology,f,Zterm)

Returns the input impedances Zin and ZinNT (seen into the section from LT respectively NT side) of a section of the topology defined in the topology structure. The section is defined by its start node idetifier startand its stop node identifier stop. Furthermore the input parameter structure ex, a frequency vector f, and a terminating impedace Zterm must be specified. Uses function getABCD for calculation of input impedances.

Example(s):

[Zin, ZinNT] = getZin(ex,start,stop,topology,f,Zterm);

greetings

Greet the user of the simulator.

insertList(list,object)

Inserts an object into a list of objects and returns the extended (modified) list.
See also: format of lists used in the simulation tool.

Example(s):

list = insertList(list,object);

interpolate(x,y,xi)

Abstraction of a (linear) interpolation routine.

makeUFplan(grid,plan)

Sets up and returns a frequency plan template derived from separated frequency-vector grid plan-vector plan. For a given frequency-vector grid=[f1 f2 f3 f4 .... fn] and a plan-vector plan=[p1 p2 p3 p4 .... p(n-1)] the function creates the frequency plan fplan=[f1 p1 f2 p2 f3 p3 f4 p4 ..... f(n-1) p(n-1) fn].

Example(s)

for a frequency vector grid=[1 2e4 4e4 6e4 8e4 1e5];
and a plan vector
plan=[-120 -20 -120 -30 -120];
the command fplan=makeUFplan(grid,plan);
creates fplan=[1 -120 2e4 -20 4e4 -120 6e4 -30 8e4-120 1e5];

lcPrintTheo(lc)

Shows the settings of a theoretical linecode definition structure lc in the MATLAB Command Window.

Example(s):

lcPrintTheo(lc);

noFiles(pattern)

Count the number of files in the current directory that contains the pattern. (Might not work under Windows)

onMatlab

Checks if we run on Matlab (or Octave).

planConvertion(frequencies,directions,guardband)

Converts a frequency plan defined by a vector frequencies (switch frequencies), a vector directions (as vector of strings 'u' for upstream, 'd' for downstream, or 'n' for none), and a switch variable guardband (0 or 1) into corresponding sets of center frequencies and bandwidths for both upstream and downstream. The result is returned as a structure.

For example: fqstruct=planConvertion(frequencies,directions,guardband);
where fqstruct has the format:

fqstruct.up.fc
fqstruct.up.bw
fqstruct.down.fc
fqstruct.down.bw

planConvertion2Band(frequencies,directions,guardband)

Converts a frequency plan defined by a vector frequencies (switch frequencies), a vector directions (as vector of strings 'u' for upstream, 'd' for downstream, or 'n' for none), and a switch variable guardband (0 or 1) into two sets of active bands.

For example:

[upb,downb]=planConvertion2Band([.138e6 2.6e6 5.4e6 10.25e6 20e6],'dudu')
low=1;high=2;
upb(2,low) % Returns 10.25e6
downb(1,high) % Returns 2.6e6

plotResult(ex,result,modemno,side,ftype,fax)

Plots the simulation result as a diagram showing signal and noises versus frequency for the modem indicated by the input parameter modemno (position in ex.param.modemlist). side (as string 'LT' or 'NT') indicates if NT side or LT side is considered, ftype specifiies the type of frequency axis to be used for plotting ('Log' or 'Linear'), and fax (as structure containing fields fax.min and fax.max) specifies the lower and upper boundary of the frequency range to be shown. Furthermore the input parameter structure ex and, of course the simulation result structure result are needed as input parameters for the function.

plotTFplan(tfplan,ftype,fax)

Plots the time/frequency plan defined in structure tfplan versus frequency (defined in ex.param.frequency.f). ftype specifiies the type of frequency axis to be used for plotting ('Log' or 'Linear'), and fax (as structure containing fields fax.min and fax.max) specifies the lower and upper boundary of the frequency range to be shown.

plotTTstructure(tt,inScale)

Plots the traffic/topology structure defined in structure tt as a graph. The switch varaible inScale specifies if the graph should be drawn in scale or not (1 for in scale).

printTree(obj,objn)

Print all definition for a structured object in a form that later can be read back into matlab as a m-file. Was created to debug/dump the ex structure.

Example(s):

printTree(ex,'ex')

setList(list,name,object)

Sets an object in a list to a new value and returns the modified list. list is the name of the list, name is the name of the object to be modified and object is the new value of the object indicated by name.
See also: format of lists used in the simulation tool

Example(s):

list=setList(list,name,object);

setTT(tt,xDSLlist)

Replaces the generic xDSL names of the services in a traffic/topology definition structure tt by the specific implementation names defined in xDSLlist (ex.param.xDSLlist) and returns the new (modified) traffic/topology structure

Example(s):

newtt=setTT(tt,xDSLlist);

setupLClist()

Sets up default definitions for the linecode struture. This function should be used for intialising a linecode list.

Example(s):

ex.lclist = setupLClist;

setupParam()

Sets up default definitions for the general simulation parameters in the structure ex.param. This file is the place where general simulation parameters can be conveniently modified for the specific simulation task.

Example(s):

ex.param = setupParam;

setupPSDplan(plan, psd_up, psd_down, method, nosignal,capval)

Generates resulting PSDs for upstream and downstream according to a PSD mask-description and PSD masks. plan (the PSD mask-description) is a cell array which contains switch frequencies and string indicators ('u' for upstream, 'd' for downstream, and 'n' for none) which indicates if the frequency interval between two switch frequencies is used for upstream or downstream or unused (i.e. switch frequencies and string indicators must appear alternating in plan, beginning and ending with a switch frequency). psd_up and psd_down are PSD masks according to which the PSD is calculated for each interval between switch frequencies. method gives the interpolation method ('Linear' or 'Log-linear') used for PSD calculation from the mask. nosignal specifies the floor value of the PSD in frequnecy intervals where no signal is transmitted, and capval is the maximum possible level in the PSD. The function's result is returned as two PSD vectors (versus frequency) for upstream respectively downstream (plan_up and plan_down in the example below).

Example(s):

[plan_up,plan_down]=setupPSDplan(plan, psd_up, psd_down, method, nosignal,capval);

sinc(x)

sinc(X) returns the sin(π*x)/(π*x) function which is defined as
1 if x = 0
sin(π*x)/(π*x) if 0 < |x| < infinity
0 if x = infinity

sqrcPSD(f,alpha,fs,fc,level,expCutoflevel)

Generates and returns a PSD vector (versus frequency axis f) that is square-root-raised-cosine shaped around each element in the carrier frequency vector fc. fs is a corresponding vector of sampling frequencies, and alpha is the access bandwith (0 <= alpha <= 1). The parameters level and expCutoflevel are optional and give a vector of PSD levels (at the carrier frequencies, in dBm) and an exponent for the cutoff level (floor PSD level) respectively. If level and expCutoflevel are not specified at the function call a vector containing ones for each carrier frequency is assumed for level and a cutoff exponent -12 is assumed.

Example(s):

G=sqrcPSD((1:10000).*1e3,0.2,[2e6 4e6],[1.3e6 5e6]);

sumLen(startno,stopno)

Local function moved from calcUPBO (no local functions in Octave).

TTsetup(tdlist,deflen,cable)

Sets up an ex.tt traffic and topology structure from a list of modem locations like {'VDSL', 12, 750}; where the first field is a modem/system name; where the second field is the number of modems; and where the third field is the distance from the CO. deflen is the default length to use when negative distance is indicated in the tdlist (0 is the current default). The cable field can change the default cable ('TP100') to be used. The function returns an ex.tt structure.

xDSLsimuVersion()

Returns the current version number of the simulation tool.

Directory src/xdsldefs (definition files)

activeVDSLf(f,afset,hamPSD)

Generates a vector with active frequencies from a set of start and stop frequencies.

ansi_loopsVDSL(ttlist)

This function adds predefined ANSI loops to the traffic/topology list ttlist and returns the extended list. If a completely new list (containing the ANSI loop definitions as first entries) should be created, an empty matrix must be entered as input parameter ttlist.

Example(s):

ext_ttlist = ansi_loopsVDSL(ttlist);
new_ttlist = ansi_loopsVDSL([]);

ansi_noisesVDSL(tfplist)

Adds predefined VDSL noise models according to ANSI to an existing list tfplist of time/frequency plans or creates a new list (containing the ANSI noise definitions as first entries) if tfplist is an empty matrix. The extended list respectively the new list will be returned.

Example(s):

ext_tfplist = ansi_noisesVDSL(tfplist);
new_tfplist = ansi_noisesVDSL([]);

ansi_tfplanHAM(tfplist)

Adds the time/frequency plan for ANSI HAM band to an existing list tfplist of time/frequency plans or creates a new list (containing the ANSI HAM band tfplan as first entry) if tfplist is an empty matrix. The extended list respectively the new list and the name of the HAM band will be returned.

Example(s):

[ext_tfplist,hamBandName] = ansi_tfplanHAM(tfplist);
[new_tfplist,hamBandname] = ansi_tfplanHAM([]);

ANSI_VDSL_defs

This routine sets up some default parameters (in the global input parameter structureex) for VDSL according to ANSI.

bitloadingGA(Hds,Nds,E_total,Gap,PSDmask,const,usedtones,GA_type,bitrate,framerate,Modem)

Computes bit loading, and energy distribution for a dmt system. Based on the Levin-Campello algorithm [Campello J. 'Practical Bit Loading for DMT' IEEE Inter. Conf. on Comm. (ICC), 1999, p.801-805]. We have modified this algorithm for these constraints: max. allowed power, max. power for sub-channels (PSDmask); max. and min. number of bits for subchannels.

bitloadingRounded(Hds,Nds,E_total,Gap,PSDmask,const,usedtones)

Computes bit loading, and energy distribution for a dmt system. This code is based on code from Atul Salvekar @ Stanford University, which implements water-filling based on Chow's method.

Contents

Is a text file (without any computing funcionality) which provides a list of the most important MATLAB definition files in the directory src\xdsldefs of the simulation tool.

calcResultDMT(tfplan,res,lc,f)

Returns resulting bitrates and margins at NT and LT side for a Discrete Multitone (DMT) system. As input parameters the function needs the time /frequency plan tfplan and the line code definitions lc of the considered system, the result struct res (created by evalExperiment) and the frequency axis f. Uses underlying function waterfillRA. This function is typically called by calcXDSLresult to calculate extended simulation results for DMT systems.

Example(s):

[LT_brate, NT_brate, LT_margin, NT_margin]=calcResultDMT(tfplan,res,lc,f);

calcResultSCM(tfplan,res,lc,f)

Returns resulting bitrates and margins at NT and LT side for a Single Carrier Modulation (SCM) system. As input parameters the function needs the time /frequency plan tfplan and the line code definitions lc of the considered system, the result struct res (created by evalExperiment) and the frequency axis f. This function is typically called by calcXDSLresult to calculate extended simulation results for SCM systems.

Example(s):

[LT_brate, NT_brate, LT_margin, NT_margin]=calcResultSCM(tfplan,res,lc,f);

calcResultSDSL(tfplan,res,lc,f)

Computes the resulting margin at NT and LT side for a given SDSL service from the signal- and noise-PSDs. The function is called via the calcXDSLresult function after the experiment is evaluated by evalExperiment. Returns also the bitrates at NT and LT side as output arguments (just passed through the function from the linecode definition). The input arguments are the time/frequency plan tfplan used by the considered service, the result struct recreated by evalExperiment, the linecode definitions lc of the considered service, and the frequency vector f.

Example(s):

[LT_brate, NT_brate, LT_margin, NT_margin]=calcResultSDSL(tfplan,res,lc,f)

etsi_cablesADSL(clist)

Adds the cable parameters of standard ETSI ADSL cables to an existing list of cables clist or creates a new list (containing the ETSI cables as first entry) if clist is an empty matrix. The extended list respectively the new list will be returned.

Example(s):

[ext_clist] = etsi_cablesADSL(clist);
[new_clist] = etsi_cablesADSL([]);

etsi_cablesADSL_extra(clist)

Adds the cable parameters of some extra ETSI ADSL cables to an existing list of cables clist or creates a new list (containing the ETSI cables as first entry) if clist is an empty matrix. The extended list respectively the new list will be returned.

Example(s):

[ext_clist] = etsi_cablesADSL_extra(clist);
[new_clist] = etsi_cablesADSL_extra([]);

etsi_cablesSDSL(clist)

Adds the cable parameters of standard ETSI SDSL cables to an existing list of cables clist or creates a new list (containing the ETSI cables as first entry) if clist is an empty matrix. The extended list respectively the new list will be returned.

Example(s):

[ext_clist] = etsi_cablesSDSL(clist);
[new_clist] = etsi_cablesSDSL([]);

etsi_cablesVDSL(clist)

Adds the cable parameters of standard ETSI VDSL cables to an existing list of cables clist or creates a new list (containing the ETSI cables as first entry) if clist is an empty matrix. The extended list respectively the new list will be returned.

Example(s):

[ext_clist] = etsi_cablesVDSL(clist);
[new_clist] = etsi_cablesVDSL([]);

etsi_goalsVDSL

Sets up globally (in the input parameter structure ex) goals for rate and reach according to ETSI VDSL part 1.

etsi_lcdefsADSL(lclist)

Adds the linecode definitions for ADSL-DMT to an existing list of linecodes lclist or creates a new list (containing these definitions as first entries) if lclist is an empty matrix. The extended list respectively the new list will be returned. This function just calls the function lcDefADSLDMT and inserts the linecode definitions returned by it to the linecode list (using function insertList).

Example(s):

ext_lclist= etsi_lcdefsADSL(lclist);
new_lclist = etsi_lcdefsADSL([]);

etsi_lcdefsESDSL(lclist)

Adds ETSI SpM linecode definitions for symmetric enhanced SDSL (ESDSL) to an existing list of linecodes lclist or creates a new list (containing these definitions as first entries) if lclist is an empty matrix. The extended list respectively the new list will be returned.

etsi_lcdefsHDSL(lclist)

Adds ETSI SpM linecode definitions for high-speed DSL (HDSL) to an existing list of linecodes lclist or creates a new list (containing these definitions as first entries) if lclist is an empty matrix. The extended list respectively the new list will be returned.

etsi_lcdefsISDN(lclist)

Adds ETSI SpM linecode definitions for ISDN to an existing list of linecodes lclist or creates a new list (containing these definitions as first entries) if lclist is an empty matrix. The extended list respectively the new list will be returned.

etsi_lcdefsSDSL(lclist)

Adds default ETSI linecode definitions for symmetric and asymmetric SDSL to an existing list of linecodes lclist or creates a new list (containing these definitions as first entries) if lclist is an empty matrix. The extended list respectively the new list will be returned.

etsi_lcdefsSDSL_SpecificRates(lclist)

Adds default ETSI linecode definitions for symmetric SDSL to an existing list of linecodes lclist or creates a new list (containing these definitions as first entries) if lclist is an empty matrix. The rates defined are: 256, 512, 1024, 2048, and 2304 kBit/s.

etsi_lcdefsVDSL(lclist)

Adds the ETSI linecode definitions for VDSL-DMT and VDSL-SCM to an existing list of linecodes lclist or creates a new list (containing these definitions as first entries) if lclist is an empty matrix. The extended list respectively the new list will be returned.

Example(s):

ext_lclist= etsi_lcdefsVDSL(lclist);
new_lclist = etsi_lcdefsVDSL([]);

etsi_loopsADSL(ttlist,len,selfdisturbers,namestr)

Adds ETSI ADSL testloops to an existing list of traffic/topology definitions or creates a new list (containing these definitions as first entries) if the input parameter ttlist is an empty matrix.

Example(s):

ext_ttlist = etsi_loopsADSL(ttlist,len,20);
new_ttlist = etsi_loopsADSL([],len);

etsi_loopsSDSL(ttlist,len,selfdisturbers,namestr)

Adds SDSL testloops according to ETSI to an existing list of traffic/topology definitions ttlist or creates a new list (containing these definitions as first entries) if the input parameter ttlist is an empty matrix. The input parameter len specifies the total testloop length in meters for each testloop. len typically must be a vector containing 8 elements (one length value for each of the 8 testloops). If len contains only 7 elements, the loop length of testloop #8 is considered the same as length of testloop #4. If len is a scalar (i.e. len is of length one), the same length len is assumed for all testloops. The optional input parameter selfdisturbers specifies the number of disturbing SDSL modems on each of the loops (if not specified a default value of 89 is assumed). namestr is an optional extension of the name-string of the testloops. The extended list of traffic/topology definitions respectively the new list will be returned.

Example(s):

ext_ttlist= etsi_loopsSDSL(ttlist,len,15);
new_ttlist = etsi_loopsSDSL([],len);

etsi_loopsSDSLdeflen(modelstring,brate,lcname,loopno)

Defines and returns default length values of ETSI SDSL testloops. The default values are taken from ETSi documents ETSI STC TM6 Helsinki 2000: WD22R3, WD19R3, and 002t22a0 where SDSL testcases were evaluated. modelstring specifies the predefined noise model to be applied (see etsi_noisesSDSL noise model definitions) for the test, brate specifies the considered bitrate, and lcnamemust be either 'SDSL-sym' or 'SDSL-asym' to specify if symmetric or asymmetric SDSL is considered. loopno is optional and indicates which testloop (#1 to #8) is considered (if loopno is not specified the default lengths of all eight testloops are returned within an 8 element length-vector).

Example(s):

lens = etsi_loopsSDSLdeflen(modelstring,brate,lcname,loopno);

etsi_loopsVDSL(ttlist, goal)

Adds VDSL loops according to ETSI to an existing list of traffic/topology definitions ttlist or creates a new list (containing these definitions as first entries) if the input parameter ttlist is an empty matrix. goal must be a structure describing the transmission goals (ETSI VDSL Part 1 TS 101-270-1 V1.1.6 (1999-08)). The extended list of traffic/topology definitions respectively the new list will be returned.

Example(s):

ext_ttlist= etsi_loopsVDSL(ttlist,goal);
new_ttlist = etsi_loopsVDSL([],goal);

etsi_masksVDSL(tfplist)

Adds predefined VDSL PSD masks according to ETSI to an existing list tfplist of time/frequency plans or creates a new list (containing the VDSL PSD mask definitions as first entries) if tfplist is an empty matrix. The extended list respectively the new list will be returned.

Example(s):

ext_tfplist= etsi_masksVDSL(tfplist);
new_tfplist = etsi_masksVDSL([]);

etsi_modelsVDSL_SCM(name)

Returns the VDSL-SCM PSD mask defnition specified by the string name according to ETSI. The PSD mask definition is returned as structure of 4 fields containing values of carrier frequency and symbolrate for upstraem and downstream.

Example(s):

PSD_def= etsi_modelsVDSL_SCM('A1M');

returns PSD_def as:

PSD_def.fs.down
PSD_def.fs.up
PSD_def.fc.down
PSD-def.Fc.up

etsi_noisesADSL(tfplist)

Adds predefined models for ADSL scenarios to an existing list tfplist of time/frequency plans or creates a new list (containing these noise definitions as first entries) if tfplist is an empty matrix. The extended list respectively the new list will be returned.

Example(s):

ext_tfplist = etsi_noisesADSL(tfplist);
new_tfplist = etsi_noisesADSL([]);

etsi_noisesSDSL(tfplist)

Adds predefined models for SDSL scenarios to an existing list tfplist of time/frequency plans or creates a new list (containing these noise definitions as first entries) if tfplist is an empty matrix. The extended list respectively the new list will be returned.

Example(s):

ext_tfplist = etsi_noisesSDSL(tfplist);
new_tfplist = etsi_noisesSDSL([]);

etsi_noisesVDSL(tfplist)

Adds predefined models for VDSL scenarios to an existing list tfplist of time/frequency plans or creates a new list (containing these noise definitions as first entries) if tfplist is an empty matrix. The extended list respectively the new list will be returned.

Example(s):

ext_tfplist = etsi_noisesVDSL(tfplist);
new_tfplist = etsi_noisesVDSL([]);

etsi_SDSLmodelParameters(sym,brate,down)

Generates a vector with SDSL Tx signal model parameters. The returned parameters will depend on if it is a symmetrical PSD (sym=1), the bitrate (in kbit/s), and if we look at the downstream (down=1) direction. This routine is used by modelPSD_SDSL to generalize the SDSL transmission parameter handling.

Example(s):

[fxparam,fhparam,N,K]=etsi_SDSLmodelParameters(1,256)

ETSI_SDSL_traffic2lctf

This routine adds all linecode and time/frequency parameters of all SDSL services contained in a given scenario to the linecode list and the list of time/frequency plans of an experiment. This is needed because linecode and time/frequency parameters of SDSL services partly depend on bitrate. Therefore the traffic definition struct has to be analysed (the bitrates of the SDSL services are contained in the service name strings) before the parameters can be set and added to the linecode list and the list of time/frequency plans. This is done by this routine (used by SDSL example simulation routines ExSDSLmargin, ExSDSLreach, and ExSDSLtestloop).

etsi_tfplanHAM(tfplist)

Adds the time/frequency plan for ETSI HAM band to an existing list tfplist of time/frequency plans or creates a new list (containing the ETSI HAM band tfplan as first entry) if tfplist is an empty matrix. The extended list respectively the new list and the name of the HAM band will be returned.

Example(s):

[ext_tfplist,hamBandName]= etsi_tfplanHAM(tfplist);
[new_tfplist, hamBandname] = etsi_tfplanHAM([]);

etsi_tfplansADSL(tfplist)

Adds the time/frequency plans for ADSL (according to ETSI) to an existing list tfplist of time/frequency plans or creates a new list (containing these definitions as first entries) if tfplist is an empty matrix. The extended list respectively the new list will be returned.

Example(s):

ext_tfplist = etsi_tfplansADSL(tfplist);
new_tfplist = etsi_tfplansADSL([]);

etsi_tfplansSDSL(tfplist)

Adds the time/frequency plans for symmetric and asymmetric SDSL (according to ETSI) to an existing list tfplist of time/frequency plans or creates a new list (containing these definitions as first entries) if tfplist is an empty matrix. The extended list respectively the new list will be returned.

Example(s):

ext_tfplist = etsi_tfplansSDSL(tfplist);
new_tfplist = etsi_tfplansSDSL([]);

etsi_tfplansESDSL(tfplist)

Adds the time/frequency plans for symmetric enhanced SDSL (ESDSL), as defined by ETSI SpM, to an existing list tfplist of time/frequency plans or creates a new list (containing these definitions as first entries) if tfplist is an empty matrix. The extended list respectively the new list will be returned.

Example(s):

ext_tfplist = etsi_tfplansESDSL(tfplist);
new_tfplist = etsi_tfplansESDSL([]);

etsi_tfplansSDSL_RC(tfplist)

Adds the time/frequency plans for symmetric and asymmetric SDSL, according to ETSI, as it was used when the performance (bit-rates) were computes.

etsi_tfplansLegacy(tfplist)

Adds the time/frequency plans for some legacy systems (HDSL-2B1Q-1p,HDSL-2B1Q-2p, HDSL-2B1Q-3p, ISDN-4B3T, ISDN-2B1Q), as defined by ETSI SpM, to an existing list tfplist of time/frequency plans or creates a new list (containing these definitions as first entries) if tfplist is an empty matrix. The extended list respectively the new list will be returned.

Example(s):

ext_tfplist = etsi_tfplansLegacy(tfplist);
new_tfplist = etsi_tfplansLegacy([]);

etsi_tfplansVDSL(tfplist)

Sets up and adds the time/frequency plans for VDSL services (according to ETSI) to an existing list tfplist of time/frequency plans or creates a new list (containing these definitions as first entries) if tfplist is an empty matrix. The extended list respectively the new list will be returned.

Example(s):

ext_tfplist = etsi_tfplansVDSL(tfplist);
new_tfplist = etsi_tfplansVDSL([]);

etsi_tfplansVDSLDMT(tfplist)

Sets up and adds the time/frequency plans for VDSL services using DMT transmission.

ETSI_VDSL_defs

This routine sets up some default parameters (in the global input parameter structureex) for VDSL according to ETSI.

fsan_loopsVDSL(ttlist)

Adds some predefined scenarios to an existing list of traffic/topology definitions ttlist or creates a new list (containing these definitions as first entries) if the input parameter ttlist is an empty matrix. The extended list of traffic/topology definitions respectively the new list will be returned.

Example(s):

ext_ttlist= fsan_loopsVDSL(ttlist);
new_ttlist = fsan_loopsVDSL([]);

fsan_modelsMISC(tfplist)

Sets up and adds the time/frequency plans for some standard alien systems (alien = others that VDSL) to an existing list tfplist of time/frequency plans or creates a new list (containing these definitions as first entries) if tfplist is an empty matrix. The extended list respectively the new list will be returned. Tfplans of some versions of ADSL, HDSL, and ISDN are included as well as models for SDSL and T1.

Example(s):

ext_tfplist = fsan_modelsMISC(tfplist);
new_tfplist = fsan_modelsMISC([]);

itu_cablesADSL(clist)

Adds the cable parameters of standard ITU cables to an existing list of cables clist or creates a new list (containing the ITU cables as first entry) if clist is an empty matrix. The extended list respectively the new list will be returned.

Example(s):

[ext_clist]= itu_cablesADSL(clist);
[new_clist] = itu_cablesADSL([]);

itu_cablesADSL_extra(clist)

Adds the cable parameters of standard ITU cables defined with tables instead of parametric models.

itu_lcdefsADSL2(lclist)

Adds the linecode definitions for ADSL2 (as defined by ITU) to an existing list of linecodes lclist or creates a new list (containing these definitions as first entries) if lclist is an empty matrix. The extended list respectively the new list will be returned. This function is based on lcDefADSLDMT but modifies the ADSL definitions according to the updated ADSL2 parameters.

Example(s):

ext_lclist= itu_lcdefsADSL2(lclist);
new_lclist = itu_lcdefsADSL2([]);

itu_modelsPNT(tfplist)

Sets up and adds the time/frequency plans for ITU alien systems (alien = others that VDSL) to an existing list tfplist of time/frequency plans or creates a new list (containing these definitions as first entries) if tfplist is an empty matrix. The extended list respectively the new list will be returned.

Example(s):

ext_tfplist = itu_modelsPNT(tfplist);
new_tfplist = itu_modelsPNT([]);

itu_tfplanHAM(tfplist)

Adds the time/frequency plan for ITU HAM band to an existing list tfplist of time/frequency plans or creates a new list (containing the ITU HAM band tfplan as first entry) if tfplist is an empty matrix. The extended list respectively the new list and the name of the HAM band will be returned.

Example(s):

[ext_tfplist,hamBandName] = itu_tfplanHAM(tfplist);
[new_tfplist,hamBandname] = itu_tfplanHAM([]);

lcDefADSLDMT()

Sets up and returns the default linecode definition structure lc for ADSL-DMT systems. See also structure ex.lc for example.

Example(s):

lc = lcDefADSLDMT;

lcDefHDSL2B1Q()

Sets up and returns the default linecode definition structure lc for HDSL 2B1Q.

lcDefHDSLCAP()

Sets up and returns the default linecode definition structure lc for HDSL CAP.

lcDefISDN2B1Q()

Sets up and returns the default linecode definition structure lc for ISDN 2B1Q.

lcDefSDSL_asym()

Sets up and returns the default linecode definition structure lc for asymmetric SDSL systems according to ETSI TS 101524-2 V1.1.1 (2000-05).

lcDefSDSL_sym()

Sets up and returns the default linecode definition structure lc for symmetric SDSL systems according to ETSI TS 101524-2 V1.1.1 (2000-05).

lcDefVDSLDMT()

Sets up and returns the default linecode definition structure lc for VDSL-DMT systems. See also structure ex.lc for example.

lcDefVDSLSCM()

Sets up and returns the default linecode definition structure lc for VDSL-SCM systems. See also structure ex.lc for example.

lcPrintDMT(lc)

Shows the settings of the DMT linecode definition structure lc in the MATLAB Command Window.

Example(s):

lcPrintDMT(lc);

lcPrintHDSL(lc)

Shows the settings of the HDSL linecode definition structure lc in the MATLAB Command Window.

Example(s):

lcPrintHDSL(lc);

lcPrintSCM(lc)

Shows the settings of the SCM linecode definition structure lc in the MATLAB Command Window.

Example(s):

lcPrintSCM(lc);

lcPrintSDSL(lc)

Shows the settings of the SDSL linecode definition structure lc in the MATLAB Command Window.

Example(s):

lcPrintSDSL(lc);

modelPSD_HDSL(f)

Computes and returns the PSD of HDSL in mW/Hz (as a vector versus frequency vector f ) according to T1E1.4/99 -438R2.

Example(s):

modelPSD_HDSL(f);

modelPSD_HDSL2B1Q(f,pairs)

Computes and returns the PSD of HDSL 2B1Q with {1,2,3} pairs in mW/Hz (as a vector versus frequency vector f) according to ETSI TM6 SpM part 2 LL

Example(s):

modelPSD_HDSL2B1Q(f,2);

modelPSD_ISDN2B1Q(f)

Computes and returns the PSD of ISDN 2B1Q in mW/Hz (as a vector versus frequency vector f) according to contribution of ETSI TM6 SpM part 2.

Example(s):

modelPSD_ISDN2B1Q(f);

modelPSD_ISDN_PRA(f)

Computes and returns the PSD of ISDN_PRA (HDB3 model) in mW/Hz (as a vector versus frequency vector f) according to contribution of DTAG, TD22 Edinburgh 1999.

Example(s):

modelPSD_ISDN_PRA(f);

modelPSD_SDSL(lcname,f)

Computes and returns the PSD of SDSL in mW/Hz according to ETSI TR 101 830-2, Spectral management on metallic access networks; Part 2: Technical methods and performance evaluations, m01p20a5. lcname (string) specifies the linecode to be used for modelling the PSD, f is the frequency vector, and dir=1 if the direction is downstream (LTU). The PSD is returned as a vector versus frequency vector f.

Examples (from etsi_tfplansSDSL):

tmp_tfplan.PSD.downstream =...
'modelPSD_SDSL(tfplan.lcname,ex.param.frequency.f,1)';
tmp_tfplan.PSD.upstream =...
'modelPSD_SDSL(tfplan.lcname,ex.param.frequency.f,0)';

modelPSD_SDSL_asym(lcname,f,upordown)

Computes and returns the PSD of asymmetric SDSL in mW/Hz according to ETSI TS 101524-2 V1.1.1 (2000-05). lcname (string) specifies the linecode to be used for modelling the PSD, f is the frequency vector, and upordown is a switch variable which indicates if the PSD for upstream or for downstream should be calculated (1=downstream, 2=upstream). The PSD is returned as a vector versus frequency vector f.

Example(s):

PSD = modelPSD_SDSL_asym('SDSL-asym-2048',f,1);

modelPSD_SDSL_sym_ver1(lcname,f)

Computes and returns the PSD of symmetric SDSL in mW/Hz according to ETSI TS 101524-2 V1.1.1 (2000-05). lcname (string) specifies the linecode to be used for modelling the PSD, f is the frequency vector. The PSD is returned as a vector versus frequency vector f.

Example(s):

PSD = modelPSD_SDSL_sym_ver1('SDSL-asym-2048',f);

modelPSD_SDSL_sym_ver2(lcname,f)

Computes and returns the PSD of symmetric SDSL in mW/Hz according to ETSI TR 101 830-2, Spectral management on metallic access networks; Part 2: Technical methods and performance evaluations, m01p20a5. lcname (string) specifies the linecode to be used for modelling the PSD, f is the frequency vector. The PSD is returned as a vector versus frequency vector f.

Example(s):

PSD = modelPSD_SDSL_sym_ver2('SDSL-asym-2048',f);

modelPSD_T1(f)

Computes and returns the PSD of T1 in mW/Hz (as a vector versus frequency vector f) according to T1E1.4/99 -438R2.

Example(s):

modelPSD_T1(f);

special_modelsVDSL(tfplist)

Sets up and adds VDSL-time/frequency plans for FSAN VDSL tests to an existing list tfplist of time/frequency plans or creates a new list (containing these definitions as first entries) if tfplist is an empty matrix. The extended list respectively the new list will be returned.

Example(s):

ext_tfplist = special_modelsVDSL(tfplist);
new_tfplist = special_modelsVDSL([]);

templateTFP

Sets up a template for a tfplan. Used by many tfplist setup routines to get a consistent set of structure elements in the tfplans.

Example(s):

new_tfplan = templateTFP;

waterfill(Hds,Nds,E_total,Gap,PSDmask,const,usedtones,LC_type,bitrate,framerate,Modem)

Computes bit loading, and energy distribution for a dmt system. Based on the Levin-Campello algorithm.

Example(s):

[bdist,Edist,subSNR, Marg] = waterfill(Hds,Nds,E_total,Gap,PSDmask,const,usedtones, LC_type,bitrate, framerate, Modem);

waterfillRA(Hds,Nds,E_total,Gap,PSDmask,const)

Underlying function used by function calcResultDMT for calculating bitrates and margins of DMT systems. It returns the bit distribution bdist, the energy distribution Edist, the subchannel SNRs subSNR, and the subchannel margins Marg. The input parameters are the channel magnitude Hds, the noise PSD Nds, the total transmission energy E_total, the effective gap Gap (derived from the line code definitions for refSNR, SNRloss and coding gain) the transmit power spectrum density PSDmask, and the constellation vector const.

Example(s):

[bdist,Edist,subSNR, Marg] = waterfillRA(Hds,Nds,E_total,Gap,PSDmask,const);

The format of Lists used in the simulation tool

Many of the input parameters needed for a simulation run (e.g. cable definitions, linecode definitions, definition of traffic, etc.) are organized in lists. This is useful because a given topology typically consists of multiple cable types and multiple services (linecodes, time/frequency plans) running on the loop. During the evaluation of an experiment the simulation tool must have access to all these parameters (picking out the parameters needed). That means that the characteristics (parameters) which describe a certain cable, linecode, etc. are stored in a corresponding list. This lists must be completely set up during the initiation phase of a simulation run (that means for example all cables which are deployed in the topology must be in the cable list). Each list-entry corresponds to a certain object (cable, linecode, etc.) and consists of multiple parameters, whereby each object is uniquely identified by its name. Internally the list is organized as a structure array with different fields. For example a list of linecodes is called ex.lclist and contains (in this example) the 3 linecode definitions (objects) 'VDSL-theo', 'ADSL-lite', and 'SDSL-sym-1024'. This list would be a structure array containing 4 fields:

ex.lclist.name
ex.lclist.param
ex.lclist.calcRate
ex.lclist.lcPrint

The name-field in this case would contain the names (as strings) of the linecodes in the list, in this example:

ex.lclist(1).name='VDSL-theo'
ex.lclist(2).name='ADSL-lite'
ex.lclist(3).name='SDSL-sym-1024'

Similar to that also the other fields contain the corresponding parameters of the linecodes, whereas the fields can also be organized further as structures (as for example in case of ex.lclist.param,see also definition of input parameters for linecodes).

For setting up such lists, picking out certain elements of such lists, modifying certain objects in such lists the simulation tool provides some useful functions such as getList,setList,insertList,getNameList.

Routines that are tool specific but both tools implement

That is, these can be found both under src/matlab and src/octave.

Directory src/matlab (Matlab specific files)

fflush

No op (Implements Octave's fflush function in matlab)

graw

No op (Send string directly to gnuplot subprocess)

Directory src/octave (Octave specific files)

drawnow

No op (forces drawing in matlab)

Valid XHTML 1.0 Transitional