function lc = lcDefSDSL_sym;
%% ===========================================================================
% lcDefSDSL_sym - Sets up the lincode description structure for symmetric SDSL
%
% Returns:       lc	The linecode structure
%
% References:	
%    Draft ETSI TS 101524-2 V1.1.1 (2000-05)
%    Chen W., "DSL simulation techniques and standards development
%    for DSL systems"
%    Starr T., J. Cioffi, P. Silverman "Understanding DSL technology", 1999
%    The xDSL simulation tool manual, FTW 2000
%% ===========================================================================

%% ===========================================================================
% Copyright (C) 2000 by Forschungszentrum Telekommunikation Wien, Austria;
%                                                     All rights reserved. 
% Project       : FSAN duplex model
% Author(s)     : Tomas Nordstrom (Tomas.Nordstrom@FTW.at)
%               : Gernot Schmid (schmid@ftw.at
%% ===========================================================================
% Change History
%      2000-03-23 (GS)   Created
%      2000-04-12 (GS)   Receive filter extensions
%      2000-07-06 (ToNo) Modified the way we define reqSNR
%      2000-07-13 (GS)   Extensions for asymmetric SDSL
%      2000-09-27 (GS)	 Cleaning up for release
%% ===========================================================================

lc.name           	  = 'SDSL-sym';

% Default Parameter values

lc.param.Px               = [0  2048e3 1e99; 13.5 14.5 14.5;]; %dBm TX power template 
lc.param.signal_margin    = 0;
lc.param.codingGain       = 5.1;  
lc.param.xtalk_margin     = 0;
lc.param.refSNR           = 9.8;
lc.param.SNRloss          = 1.6;      % 1.6; 2.1 for loop 6 (with bridge taps
lc.param.constellation    = 4;        % 16 PAM

% Calculate the req SNR [Starr]:
% M  = 2^(lc.param.constellation-1);  % UC coding reduces the size by one
% Pe = 1e-7;
% ei = erfinv(1-Pe/(1-1/M));
% lc.param.reqSNR           = 10*log10((M*M-1)*2/3*ei^2);
lc.param.reqSNR           = 27.71; % [Chen p 524] or [ETSI 994t40a0]


% Param digital
lc.param.pam.bpsym        = lc.param.constellation-1; % bits per symbol
                                                     
lc.param.pam.brate.rate   = 512e3; % Bitrate in bit per sec. (excl. overhead)
lc.param.pam.brate.ohead  = 8e3;   % Datarate overhead
lc.param.pam.filterorder  = 6;     % Transmit filter order (butterworth)  
lc.param.pam.filterratio  = 0.5;   % f3dB/fsym ratio 
lc.param.pam.k	          = [0  2048e3 2304e3+1; 7.86 9.90 9.90;];   % scaling factor template
lc.param.pam.highpass3dBf = 5e3;   % coupling transformer cutoff frequency

% Optional receive filter (Butterworth is assumed)
lc.param.pam.recfilterorder.up = 6;
lc.param.pam.recfilterorder.dn = 6;
fsymb = ((lc.param.pam.brate.rate + lc.param.pam.brate.ohead) ...
         /lc.param.pam.bpsym); 
lc.param.pam.recfilter3dBf.up  = fsymb *lc.param.pam.filterratio; 
lc.param.pam.recfilter3dBf.dn  = lc.param.pam.recfilter3dBf.up;

lc.param.SNRMax           = 100;    % Maximum SNR usable [Chen p.524] 
lc.param.efficiencyLoss   = 0;      % General efficiency loss factor
                                   % SDSL uses SNRloss instead

lc.calcRate 		  = 'calcResultSDSL';
lc.lcPrint 		  = 'lcPrintSDSL';