The executable part of the file begins with declaring the input parameter structure ex as a global variable followed by a check regarding numerical interpretation.
After that, the important part for setting up the experiment follows. During execution of this program lines all the input parameters to the simulation are completely defined, i.e. the simulation input parameter structure ex is set up:
The name of the scenario (traffic and topology definitions for the
investigated
loop) which is considered in the experiment is defined by the command
line
scenario='FSAN
scenario
FTTEx #1';
This name must correspond to an object in the list
of scenarios which is set up a few lines below.
The command
gui.vdslDuplex =
'VDSL-FDD';
defines the name of the time/frequency plan to be used for the VDSL
service in the scenario. Similar to above this name must correspond to
an object in the list
of time/frequency plans which is set up a few lines below.
The line
ex.param
= setupParam;
allocates default values for the
general simulation parameters contained in the structure ex.param
.
In the following two lines the list of time/frequency plans is set up by inserting time/frequency plans of HAM band definitions and some miscellaneous time/frequency plans of services which are also needed for the simulation because the corresponding services are running on the considered loop and therefore they are acting there as sources of alien noise for the investigated services (Compare with traffic/topology graph of the simulation output and see also explanation of structure ex.tfplist and description of functions itu_tfplanHAM and fsan_modelsMISC)
[ex.tfplist,
ex.param.HAMBandName]
= itu_tfplanHAM([]);
ex.tfplist =
fsan_modelsMISC(ex.tfplist);
The next two lines set up a list of linecode definitions of the xDSL services to be investigated (indicated by the entries in the string matrix ex.param.modemlist, see below and also description of functions setupLClist and etsi_lcdefsADSL).
ex.lclist
= setupLClist;
ex.lclist
= etsi_lcdefsADSL(ex.lclist);
A list
of cable definitions needed for evaluating the loop characteristics
during
the simulation run is set up by the command
ex.clist
= etsi_cables([]);
(see also definition of structure
ex.clist
and description of function etsi_cables).
The command line
ex.tfplist =
etsi_tfplansVDSL(ex.tfplist);
now adds the specific time/frequency
plans of the investigated services (modems) to the list
of time/frequency plans (see above and also description of etsi_tfplansVDSL).
Further a list
of
scenarios (traffic/topology definitions) is set up by
gui.ttlist =
fsan_loopsVDSL([]);
For further details see structure
of traffic/topology definitions and description of function fsan_loopsVDSL
(within the function fsan_loopsVDSL
the considered scenario 'FSAN
scenario FTTEx #1'
must of course be specified).
The next command simply fetches
the
specific considered scenario (variable scenario,
see above) from the list of scenrios.
ex.tt
= getList(gui.ttlist,scenario);
Finally the last few lines of the 'experiment setup section' of the program file define what services (modems) should be investigated during the simulation run (should be considered as disturbed modems) and what specific time/frequency plans should be used for the services (the services are indicated in the traffic definition structure only by generic names as for example 'ADSL' and 'VDSL').
The list of the modems to be
investigated
must be allocated to the parameter ex.param.modemlist
and this is done by the command
ex.param.modemlist=['VDSL';'ADSL'];
and the lines
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);
are needed to match the generic service names to specific
time/frequency
plan definitions (see ex.param.xDSLlist)
After the program section described above the experiment is completely defined and the simulation run starts by firstly showing the traffic topology graph and secondly showing the PSDmask for the VDSL modem. This is done by the command sequences:
%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
For explanation of the function used in this sequences see Description of all Program Files and Functions
After that the experiment is now evaluated by calling the program
routine
evalExperiment
which returns all results within a structure result
containing signals and noises for each investigated modem at NT as well
as NT side:
result =
evalExperiment;
The next step is now to show the results numerically in the MATLAB
Command
Window, whereby the function calcXDSLresult
returns
the resulting bitrates (in MBit per second) for each of the
investigated
modems in upstream and downstream direction:
format compact
[bitrate_LT,
bitrate_NT]=calcXDSLresult(ex,result);
sprintf('LT Rates')
bitrate_LT
sprintf('NT Rates')
bitrate_NT
sprintf('Ratio')
bitrate_NT./bitrate_LT
Finally the simulation result is shown graphically by figures
showing
received signals and noises at LT and NT side for each of the
investigated
service (modem). This is done by the sequence:
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
Which figure belongs to which modem is indicated by the title of the figure window, also indicating the node names corresponding to the traffic/topology graph.
After setting up some parameters (identical to the main routine of the First Example, see above) regarding allocation of default values for general simulation parameters, and setting up lists of time/frequency plans (containing HAM band definitions and alien time/frequency plans), linecode definitions, and cables the routine userDefinitionsExample1.m is called by the main routine ExMain.m . This underlying routine now sets up the user defined details of the experiment:
It firstly adds another (default) time/frequency plan definition to
the list of time/frequency plans
[ex.tfplist,
ex.param.HAMBandName]
= etsi_tfplanHAM(ex.tfplist);
Then it specifies the name for the scenario, the specific name
of the service, and it initializes a list of traffic/topology
definitions:
gui.scenario = 'My own
Scenario';
gui.vdslDuplex =
'VDSL-XXX';
gui.ttlist
= [];
In the next step the parameter ex.param.xDSLlist is
set to specify that the generic name 'VDSL' will be matched to the
specific
time/frequency plan 'VDSL-XXX' :
xDSL=getList(ex.param.xDSLlist,'VDSL');
xDSL.used=gui.vdslDuplex;
ex.param.xDSLlist=setList(ex.param.xDSLlist,'VDSL',xDSL);
Now the (default) time/frequency plan added previously to the list
of time/frequency plans is fetched from the list by using the
function
getList
and afterwards it is modified in a way to create a time/frequency plan
definition according to the user demands. This is done by the following
sequence of commands :
tmp_tfplan=getList(ex.tfplist,ex.param.HAMBandName);
% initiate tmp_tfplan
tmp_tfplan.name=gui.vdslDuplex;
tmp_tfplan.PSD.downstream
='calcPSD([.3e6 -160 .3e6 -60 3.5e6 -60 3.5e6
-160],''Linear'',ex.param.frequency.f)';
tmp_tfplan.PSD.upstream
='calcPSD([3.5e6 -160 3.5e6 -60 10e6 -60 10e6
-160],''Linear'',ex.param.frequency.f)';
tmp_tfplan.timeDivision.up=1;
% Time used in up resp. down link
tmp_tfplan.timeDivision.down=1;
tmp_tfplan.timeDivision.sync=1;
tmp_tfplan.PSD.UPBO.method='None';
tmp_tfplan.PSD.UPBO.param.freq=2e6;
tmp_tfplan.PSD.UPBO.param.len=0;
tmp_tfplan.PSD.UPBO.param.maxlen=500;
)
tmp_tfplan.lcname='VDSL-theo';
tmp_tfplan.PSD.active.upstream=[0.3e6
10e6];
tmp_tfplan.PSD.active.downstream=[0.3e6
10e6];
tmp_tfplan.PSD.HAM.active=1;
ex.tfplist=insertList(ex.tfplist,tmp_tfplan);
Note that after execution of this sequence a new time/frequency
plan definition (identified by the name 'VDSL-XXX') is added to the list
of time/frequency plans (using function insertList).
In the next steps of userDefinitionsExample1.m
it can be seen how to change some linecode specific parameters.
lc=getList(ex.lclist,tmp_tfplan.lcname);
lc.param.efficiencyLoss=0.15;
ex.lclist=setList(ex.lclist,lc.name,lc);
lcPrintTheo(lc);
The linecode is fetched from the list
of
linecodes using function getList,
the new value for the parameter to be changed is allocated, and finally
the modified linecode is returned to the list using the function setList.
The last line of the sequence above prints out the linecode settings in
the MATLAB Command Window.
Following that the traffic/topology structure of the experiment is
defined
by the command lines
% Use our own scenario
tt.name=gui.scenario;
tt.topology={{0, '', 'CO', ''},...
{500, 'DTAG_40o', 'N1', '500m'},...
{500, 'DTAG_40o', 'N2', '500m'},...
{500, 'DTAG_40o', 'N3', '500m'},...
{1500, 'DTAG_40o', 'C', '1500m'},...
{500, 'DTAG_40o', 'N4', '500m'}};
% From node, to node, tfplan, no gui.modems
tt.traffic= {{1, 2, 'VDSL', 3},...
{1, 2, 'ADSL', 4},...
{1, 3, 'VDSL', 4},...
{1, 4, 'ISDN-2B1Q', 3},...
{1, 4, 'ADSL', 1},...
{1, 5, 'HDSL-1', 3},...
{5, 6, 'VDSL', 3},...
{5, 6, 'ADSL', 4}};
gui.ttlist=insertList(gui.ttlist,tt); % Insert into list (used for GUI)
ex.tt=tt; % Define the experiment tt structure
In the first line the name 'My own Scenario' is allocated to the traffic topology structure. Afterwards the topology structure and the traffic structure is specified (see format of traffic and topology definitions), and then inserted into the list of traffic topology definitions (initialized above). Finally the previously defined scenario is taken as the one to be evaluated during the simulation run (loaded into ex.tt).
The last command of userDefinitionsExample1.m
sets up the list of modems to be investigated :
ex.param.modemlist=['VDSL'];
i.e. only VDSL modems are investigated in this example.
Afterwards program execution returns to the main routine ExMain.m
and the experiment evaluation (simulation) starts and is executed
identically
to the First Example (see above).
With a menu selection one can select a scenario among a set of FSAN predefined scenarios. The topology and traffic setup for this scenario is shown as a sub-figure below the setup section. In the second menu it is possible to select if a pre defined FSAN noise model should be used or if it should be calculated from the scenario itself. The third menu makes the selection of VDSL modem/duplex method. The PSD mask for this modem is shown in a sub-figure below the setup section.
Connected to the VDSL duplex is the power back off (PBO) method. Currently there are four methods defined: reference length (RefLen), reference FEXT (RefFEXT), reference Noise (RefNoise) and reference frequency (RefFreq). If no PBO is wanted a "None" is selected in the PBO method menu. Two PBO parameters can be set: a length (for RefLen or RefFEXT) or a frequency (for RefFreq). For the RefFreq method a maximum length can be given. Also connected with a duplex method is an efficiency loss figure where efficiency losses due to cyclic prefix/suffix, guard bands etc. can be stated.
For time division duplex methods a time division can be given for up respectively down stream (for frequency division methods this is given as 1 and 1).
There are three flags that can be set.
With the button "GO" the experiment is evaluated and a result window
will appear. With "Close all" all windows will be closed (including the
setup window).
The following examples show what can be made in the user definitions file:
The middle section of the result window contains bit rate information for each of the modems under test. For the downstream and upstream rates the numbers within parentheses are the xtalk margins to the given bitrate.
In the menu at the top left corner of the plot it is possible to select plots from any of the simulated modems. With the PlotIt button the plot is redrawn in a separate window, thus allowing for further manipulation, e.g., zooming. A logarithmic frequency axis is possible by selecting 'Log' in the menu near f axis type.
For the plots in the result window: