function [E_up,E_down] = evalPBO(PBOmethod,PBOparam,tot_Att,start_node,stop_node,Ref_Att,Ref_Noise,dmax); %% =========================================================================== % evalPBO - Calculates PBO for up and downstream % % INPUT % ----- % PBOmethod : PBO method % PBOparam : Parameters for the choose method % tot_Att : matrix with Attenuation in dB/km % start_node: Start node for PBO modem % stop_node : Stop node for PBO modem % Ref_Att : Reference Attenuation for PBO calculation % Ref_Noise : Reference Noise for PBO method % dmax : Maximum length VDSL modem % % OUTPUT % ------ % E_up : Scaling of transmit upstream PSD % E_down : Scaling of transmit downstream PSD % % Example(s): % % Algorithmic details: % % Reference: % FSAN duplex simulation memo, Telia 1998 %% =========================================================================== %% =========================================================================== % Copyright (C) 1998 by Telia Research AB, Lulea, Sweden; All rights reserved. % Project : FSAN duplex model % Author(s) : Tomas Nordstrom (Tomas.B.Nordstrom@Telia.se) % : Daniel Bengtsson (Daniel.J.Bengtsson@Telia.se) % % CVS: $Id: evalPBO.m,v 1.2 1999/03/31 13:15:56 tono Exp $ %% =========================================================================== % Change History % 1998-12-16 (DaB) Created % 1998-12-22 (ToNo) Added and updated comments % 1999-02-04 (DaB) Modified to allowmultiple cables % 1999-03-10 (DaB) Added new PBO methods % 1999-03-11 (DaB) New input arguments %% =========================================================================== global ex; f=ex.param.f; % Frequency axis switch PBOmethod case 'None', % No PBO method E_up=ones(1,length(f)); case 'RefLen', % Reference length method att=tot_Att(stop_node,:)-tot_Att(start_node,:); tmp=Ref_Att.*(PBOparam./1000)-att; tmp=min(tmp,zeros(size(f))); E_up=ones(1,length(f)).*10.^(tmp/10); case 'RefFEXT', % Reference FEXT method att=tot_Att(stop_node,:)-tot_Att(start_node,:); len_att=ex.tt.topology{stop_node,1}-ex.tt.topology{start_node,1}; tmp=Ref_Att.*(PBOparam./1000)+10*log10(PBOparam)-att-10*log10(len_att); tmp=min(tmp,zeros(size(f))); E_up=ones(1,length(f)).*10.^(tmp/10); case 'RefFreq' % Reference frequency method f_ref=PBOparam; f_index=max(find(f<=f_ref)); att=tot_Att(stop_node,f_index)-tot_Att(start_node,f_index); tmp=Ref_Att(f_index).*dmax-att; tmp=min(tmp,zeros(size(f))); E_up=ones(1,length(f)).*(10.^(tmp/10)); case 'RefNoise' % Reference Noise method att=tot_Att(stop_node,:)-tot_Att(start_node,:); len_att=(ex.tt.topology{stop_node,1}-ex.tt.topology{start_node,1})./1000; tmp=10*log10(Ref_Noise)-att-20*log10(f./1e6)-10*log10(len_att)-ex.param.XTlevel.FEXT+60; tmp=min(tmp,zeros(size(f))); E_up=ones(1,length(f)).*(10.^(tmp/10)); otherwise sprintf('Unknown PBO mthods: %s',PBOmethod) end; %switch E_down=ones(1,length(f)); % Downstream PBO not implemened !!!!!!!