📄 bitrate.m
字号:
function bmap = bitrate(c,w,nu,dopt,ssx,ssn)% bmap = bitrate(c,w,nu,dopt,ssx,ssn)% c = channel% w = TEQ% nu = cyclic prefix length% dopt = starting index of window - 1% ssx = signal power% ssn = noise power%% Calculates the achievable bit rate for% a given ADSL transmission environment%% Modified from code in the DMT-TEQ toolbox,% provided by the University of Texas at Austin, ESPL%% Modifications made by Rick Martin, February 2002% Last updated 08/08/2002% Cornell University Blind Equalization Research Groupmargin = 6; % dBcodingGain = 4.2; % dB%inputPower = 23; % dBm%awgnpower = -140;snrgap = 9.8; % dB (loss)N = 512;inputSpec = ssx * ones(1,N/2+1);noiseSpec = ssn * ones(1,N/2+1);hw = c;win = zeros(length(hw),1);win(dopt+1:dopt+nu+1) = ones(1,nu+1);% signal path impulse responsehwin = hw.*win;hwin = hwin - mean(hwin);% ISI path impulse responsehwout = hw.*(1-win);hwout = hwout - mean(hwout);% TEQ frequency responseFwu = fft(w,N)*sqrt(N); Fw = Fwu(1:N/2+1).';Fhwinu = fft(hwin,N)*sqrt(N); Fhwin = Fhwinu(1:N/2+1).';Fhwoutu = fft(hwout,N)*sqrt(N); Fhwout = Fhwoutu(1:N/2+1).';% noise power spectrumcolorNoiseaft = noiseSpec.*abs(Fw).^2;% ISI power spectrumisiaft = inputSpec.*abs(Fhwout).^2;% signal power spectrumsignalaft = inputSpec.*abs(Fhwin).^2;% subband SNRs after equalizationSNRi = signalaft./( colorNoiseaft + isiaft );bmap = ba_cal(SNRi,9.8,margin,codingGain,0,100,1);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -