function tfplist = ansi_noise(tfplist);
%% ===========================================================================
%ansi_noise(tfplist) - Sets up the tfplan for FSAN noise models
%
% Parameter:    tfplist	        Structure describing the time and freq plan
% Returns:      tfplist		Structure describing the time and freq plan
%
% Example(s):
%   ex.tfplist = ansi_noise(ex.tfplist);                 Add to existing tfplist
%   tfplan=getList(ex.tfplist,''Model A (ANSI-VDSL)') ;  Get this VDSL noise
%
%   ex.tfplist = ansi_noise([]);                         Create a new tfplist
%   tfplan=getList(ex.tfplist,'Model F (ANSI-VDSL)');    Get this VDSL noise
%
% Reference:
%    FSAN simulation tool documentation
% Mask definitions:
%    Reference T1E1.4/99 -438R2
%% ===========================================================================
% Copyright (C) 2000 by FTW, Wien, Austria;               All rights reserved. 
% Project       : FSAN duplex model
% Author(s)     : Tomas Nordstrom (Tomas.Nordstrom@ftw.at)
%               : Daniel Bengtsson (Daniel.J.Bengtsson@Telia.se)
%
% CVS:       $Id: ansi_noise.m,v 1.3 2000/05/26 13:17:46 uvan Exp $
%% ===========================================================================
% Change History
%      2000-02-09 (ToNo) Created
%      2000-04-05 (UvAn) Added frequency axis for the call to calcPSD
%      2000-05-26 (UvAn) Added possibillities to fix the bitrate 
%% ===========================================================================

%% ===========================================================================
% Template, order important!

% Default values
def_tfplan.name                  = 'N/A';
def_tfplan.PSD.downstream        = 'N/A';
def_tfplan.PSD.upstream          = 'N/A';
def_tfplan.PSD.active.upstream   = [1 30e6];
def_tfplan.PSD.active.downstream = [1 30e6];
def_tfplan.PSD.PBO.method        = 'None';	
def_tfplan.PSD.PBO.param.len     = 500;	
def_tfplan.PSD.PBO.param.freq    = 1e6;	
def_tfplan.PSD.PBO.param.maxlen  = 1500;
def_tfplan.PSD.HAM.active        = 0;
def_tfplan.timeDivision.up       = 1; % Time used in up resp. down link
def_tfplan.timeDivision.down     = 1;
def_tfplan.fixBitrate.name       = 'None';  % Fixed bitrate method
def_tfplan.fixBitrate.active     = 0;       % 0=inactive, 1=active
def_tfplan.fixBitrate.param      = 'N/A';   
def_tfplan.lcname                = 'N/A';

%% ===========================================================================
% FSAN noise models for ANSI
%-------------------

% models Alien crosstalk from a disturber that shall be coupled with and NEXT
% and FEXT functions 
% Reference T1E1.4/99 -438R2

% Alien noise spectra at: NT = upstream, LT = downstream
%% ===========================================================================
% VDSL

tmp_tfplan=def_tfplan;
tmp_tfplan.name='Model A (ANSI-VDSL)';
tmp_tfplan.PSD.downstream='calcPSD([1 -26.0 30e3 -34.0 50e3 -39.0 65e3 -42.0 100e3 -43.0 400e3 -49.5 550e3 -52.5 1104e3 -60.0 1500e3 -79.0 2500e3 -115.0 3550e3 -139.0 10000e3 -140.0 30000e3 -140.0],''Log-Linear'',ex.param.frequency.f)';
tmp_tfplan.PSD.upstream='calcPSD([1 -24.5 30e3 -25.0 65e3 -31.0 130e3 -31.0 250e3 -49.0 400e3 -78.0 650e3 -81.5 1104e3 -81.5 1400e3 -83.0 2750e3 -103.5 4000e3 -104.0 30000e3 -104.0],''Log-Linear'',ex.param.frequency.f)';
tfplist=insertList(tfplist,tmp_tfplan);


tmp_tfplan=def_tfplan;
tmp_tfplan.name='Model F (ANSI-VDSL)';
tmp_tfplan.PSD.downstream='calcPSD([1 -24.5 30e3 -25.5 65e3 -32.0 130e3 -33.0 250e3 -33.5 1104e3 -33.5 1600e3 -52.0 2250e3 -52.0 2650e3 -60.0 3000e3 -84.5 3200e3 -84.5 3500e3 -67.0 4000e3 -64.5 4500e3 -77.5 11500e3 -103.0 30000e3 -103.5],''Log-Linear'',ex.param.frequency.f)';
tmp_tfplan.PSD.upstream='calcPSD([1 -24.5 30e3 -25.5 65e3 -31.0 130e3 -31.0 250e3 -47.5 300e3 -47.0 550e3 -43.5 900e3 -43.5 1104e3 -45.5 1500e3 -60.0 1600e3 -60.0 1900e3 -52.0 2250e3 -52.0 2650e3 -60.0 3000e3 -84.5 3200e3 -84.5 3500e3 -67.0 4000e3 -64.5 4500e3 -77.5 11500e3 -103.0 30000e3 -103.5],''Log-Linear'',ex.param.frequency.f)';
tfplist=insertList(tfplist,tmp_tfplan);


%=== oldplan A
tmp_tfplan=def_tfplan;
tmp_tfplan.name='Model X (ANSI-VDSL)';
tmp_tfplan.PSD.downstream='calcPSD([1 -24.5 50e3 -32.0 100e3 -40.0 200e3 -46.0 400e3 -49.5 550e3 -52.5 1104e3 -60.5 1500e3 -75.0 2500e3 -109.5 3200e3 -132.5 4000e3 -140.0 10000e3 -140.0 30000e3 -140.0],''Log-Linear'',ex.param.frequency.f)';
tmp_tfplan.PSD.upstream='calcPSD([1 -23.0 50e3 -23.0 100e3 -29.0 200e3 -40.5 400e3 -78.0 550e3 -80.0 1104e3 -82.0 1500e3 -84.0 2500e3 -97.5 3200e3 -103.5 4500e3 -104.0 10000e3 -104.0 30000e3 -104.0],''Log-Linear'',ex.param.frequency.f)';
tfplist=insertList(tfplist,tmp_tfplan);