function [SumSNR]=calcFoldedSNR(SNR,f,fsym); %% =========================================================================== % calc_fold_SNR - Calculates the folded SNR for DFE-based % PAM-margin calculation also applicable for not % equally spaced f-axis % % Parameter: SNR Signal to Noise ratio as simple Rx/Noise expression % Parameter: f Frequency axis % Parameter: fsym Symbol transmission rate % % Returns: SumSNR Folded SNR in dB % % Reference: T1E1.4/2000-002R2 DRAFT ANSI T1.XXX-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-05-30 (GS) Created % 2000-06-20 (ToNo) Cleaning up % 2000-07-11 (ToNo) Made it use the new way of interpolation %% =========================================================================== % Generate a new f scale deltaf=100; fnew=[deltaf:deltaf:fsym+1-deltaf]; fnewinv=fsym-fnew; % Get the folds SNR0 = interp1(f,SNR,fnew,'linear'); SNR1 = interp1(f,SNR,fnew+fsym,'linear'); SNRm1 = conj(interp1(f,SNR,fnewinv,'linear')); SNRm2 = conj(interp1(f,SNR,fnewinv+fsym,'linear')); % Sum the folds folded_SNR=SNR0+SNR1+SNRm1+SNRm2; SumSNR=trapz(fnew,10*log10(1+folded_SNR))/fsym;