📄 get_compound_channel.m
字号:
function [compound_channel, ch_len] = get_compound_channel(TC,FS_CONT,channel_p,PLOT_DEBUG)%channel_p.seed depends on RUN, we have to add some more randomness so that it%is also unique inside this runchannel_p.seed = channel_p.seed + round(100000*rand);samples_per_chip = TC * FS_CONT;fs_cont_GHz = FS_CONT / 1e9;alpha = channel_p.pulse_width; %determines pulse width[monopulse,t] = get_monopulse(1,channel_p.chip_span,alpha,TC,samples_per_chip);%monopulse = monopulse./norm(monopulse); %normalize it% if(PLOT_DEBUG)% figure% plot(t,monopulse)% end% determine pulse -10dB bandwidth% threshold_dB = -10;% [Ess,f_high,f_low,BW] = ...% cp0702_bandwidth(monopulse,1/FS_CONT,threshold_dB);%fprintf('-10dB BW = %d [Hz]\n',BW);%multipath channel[channel_cont, channel_discr] = ... mex_channel(channel_p.model,fs_cont_GHz,channel_p.thld,channel_p.seed);uoi_channel_discr = channel_discr(:,4)';%uoi_channel_discr = rand(1,120*fs_cont_GHz);%uoi_channel_discr = uoi_channel_discr./norm(uoi_channel_discr); %normalize%apply channel%calculate the compound channel of pulse shape and channel imp responsecompound_channel = conv(uoi_channel_discr,monopulse);compound_channel = compound_channel ./ norm(compound_channel);% if(PLOT_DEBUG)% figure% plot(compound_channel)% %also plot its accumulated version% % squared_channel = compound_channel.^2;% % %integrate pieces of T ns% samples_per_tint = 8e-9 * FS_CONT;% %pad the end with zeros so that we can do the reshape% squared_channel = zero_pad_reshape(squared_channel,samples_per_tint * 8);% channel_int = sum(reshape(squared_channel, samples_per_tint, length(squared_channel) / ...% samples_per_tint),1);% channel_int = reshape(repmat(channel_int,samples_per_tint,1),1,length(channel_int)*samples_per_tint);% hold on% plot(channel_int,'r')% % end%check whether we have ISIch_len = length(compound_channel);return;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -