% function AdjustForPBO() %% =========================================================================== % Copyright (C) 2002-2003 by Forschungszentrum Telekommunikation Wien, Austria; % All rights reserved. % Description : ADSL performance simulations, % Adjusting for ADSL power cut back % % Project : FTW's xDSLsimu % Author(s) : Tomas Nordstrom (Tomas.Nordstrom@FTW.at) % % Reference: % ETSI STC TM6 Draft RTS/TM-06006 rev 10a (ADSL), 2001-05 % % CVS: $Id: AdjustForPOB.m,v 3.3 2003/11/03 12:33:22 tono Exp $ %% =========================================================================== %% =========================================================================== % Change History % 2002-01-31 (ToNo) Created % 2003-11-03 (ToNo) Lists now use cell arrays for both Octave and Matlab %% =========================================================================== global ex; global result; %% =========================================================================== % Adjust the results df = 4.3125e3; % Carrier spacing in Hz dmttones = [df:df:256*df]; if overPOTS, POBtones=7:18; POBlimits=[ 3 4 5 6 7 8 9]; POBreductions=[ 0 2 4 6 8 10 12]; else POBtones=40:51; POBlimits=[ 0 1.5 3 4.5 6 7.5 9]; POBreductions=[ 0 2 4 6 8 10 12]; end rlen = length(result); for pos = 1:rlen, rr=result{pos}; % Get the recieved energy on the US tones RxLTtones=interp1(ex.param.frequency.f,rr.LT.Rx_signal,dmttones(POBtones)); POBpower=10*log10(sum(RxLTtones*df)); pix = find(POBpower>POBlimits); if length(pix)>0, powerred = POBreductions(pix(length(pix))); pred = 10^(powerred/10); rr.LT.Tx_signal = rr.LT.Tx_signal/pred; rr.NT.Rx_signal = rr.NT.Rx_signal/pred; result{pos}=rr; end; end;