%% Function discription:
%%-------------------------------------------------------------------------
%% generate wireless channel for transmission, the supported channel here is PedA,PedB etc.
%% you can reference to 3GPP TR 25.890 & 3GPP TS 36.101 for more details about such channel modes
%%-------------------------------------------------------------------------
% Author: Qinzhiyong
% E-mail: braveching@gmail.com
% Date: 27th October 2011
% @@input: channel_type -- type of wireless channel,
% NTxSymbol -- the total number of Symbols to be transmited(including all subcarriers)
% @@output: channel -- a struct which contains the multipath channel impulse response channel.h
% & his FFT form channel.h_FFT
function channel = LTE_channel(channel_type,NTxSymbol)
global LTE_params
% initial the parameters
switch channel_type
case {'PedA'} % ITU Pedestrian A channel
channel.PDP_dB = [0 -9.7 -19.2 -22.8]; % Average power of multipaths [dB]
channel.delays = [0 110*10^-9 190*10^-9 410*10^-9]; % delay of multipaths [s]
figure;
plot(channel.delays,channel.PDP_dB)
xlabel('s')
ylabel('dB')
title('PDP for QPSK using OFDM in a PedA channel')
case {'PedB'}
% you can add channel data here after you refer to some 3GPP specifications metioned above
channel.PDP_dB = [0 -0.9 -4.9 -8.0 -7.8 -23.9]; % Average power of multipaths [dB]
channel.delays = [0 200*10^-9 800*10^-9 1200*10^-9 2300*10^-9 3700*10^-9]; % delay of multipaths [s]
figure;
plot(channel.delays,channel.PDP_dB)
xlabel('s')
ylabel('dB')
title('PDP for QPSK using OFDM in a PedB channel')
case {'VehA'}
channel.PDP_dB = [0 -1 -9 -10 -15 -20]; % Average power of multipaths [dB]
channel.delays = [0 310*10^-9 710*10^-9 1090*10^-9 1730*10^-9 2510*10^-9]; % delay of multipaths [s]
figure;
plot(channel.delays,channel.PDP_dB)
xlabel('s')
ylabel('dB')
title('PDP for QPSK using OFDM in a VehA channel')
case {'VehB'}
channel.PDP_dB = [-2.5 0 -12.8 -10.0 -25.2 -16.0]; % Average power of multipaths [dB]
channel.delays = [0 300*10^-9 8900*10^-9 12900*10^-9 17100*10^-9 20000*10^-9]; % delay of multipaths [s]
figure;
plot(channel.delays,channel.PDP_dB)
xlabel('s')
ylabel('dB')
title('PDP for QPSK using OFDM in a VehB channel')
case {'TU'}
channel.PDP_dB = [-3.0 0.0 -2.0 -6.0 -8.0 -10.0]; % Average power of multipaths [dB]
channel.delays = [0.0 0.2 0.6 1.6 2.4 5.0]*10^-6; % delay of multipaths [s]
figure;
plot(channel.delays,channel.PDP_dB)
xlabel('s')
ylabel('dB')
title('PDP for QPSK using OFDM in a TU channel')
case {'RA'}
case {'HT'}
channel.PDP_dB = [0.0 -2.0 -4.0 -7.0 -6.0 -12.0]; % Average power of multipaths [dB]
channel.delays = [0.0 0.2 0.4 0.6 15.0 17.2]*10^-6; % delay of multipaths [s]
figure;
plot(channel.delays,channel.PDP_dB)
xlabel('s')
ylabel('dB')
title('PDP for QPSK using OFDM in a HT channel')
case {'EVehA'} % extended multipath channel model in 3GPP TS 36.101 added
case {'ETU'} % extended multipath channel model in 3GPP TS 36.101 added
case {'AWGN','flat_Rayleigh'}
channel.Num_path = 1;% the number of Rayleigh paths,default is 1,if you want to
% simulate multi-paths channel, you can use other channel model above
otherwise
error('Channel not supported');
end
% generate channel matrix, assuming that the channel time corelation is independent
switch channel_type
case {'flat_Rayleigh'}
channel.h = 1/sqrt(2)*(randn(NTxSymbol,channel.Num_path) + j*randn(NTxSymbol,channel.Num_path));
otherwise
LTE_params.Fs = LTE_params.SubcarrierSpacing*LTE_params.Nfft; % sampling frequency
channel.path_delays_samples = round(channel.delays*LTE_params.Fs);
channel.num_faders = length(unique(channel.path_delays_samples)); % some taps merged by a specific sampling freq
%because of the resolution, and can not distinguish every path
channel.h_temp = 1/sqrt(2)*(randn(NTxSymbol,channel.num_faders) + 1i*randn(NTxSymbol,channel.num_faders));
distinct_path_delays_samples = unique(channel.path_delays_samples);
channel.h = zeros(NTxSymbol,length(channel.delays));
for path_i = 1:channel.num_faders
index = find(distinct_path_delays_samples(path_i)==channel.path_delays_samples);
channel.h(:,index(1)) = sqrt(sum(10.^(channel.PDP_dB(index)./10))).* channel.h_temp(:,path_i);
end
end
% computing and storing the frequency response of the channel, for equalization at recevier
channel.h_FFT = fftshift(fft(channel.h,LTE_params.Nfft,2),2);
LTE_channel.rar_LTE MATLAB 代码_LTE 信道_LTE 信道_LTE信道
版权申诉
16 浏览量
2022-09-20
19:00:41
上传
评论
收藏 2KB RAR 举报
Kinonoyomeo
- 粉丝: 74
- 资源: 1万+
最新资源
- 2%EF%BC%9A%E9%99%95%E8%A5%BF%E
- yyspdz62_944.apk
- SAP公司间采购EDI配置-如何触发自动MIRO.docx
- python197基于图像识别的仪表实时监控系统.rar
- python196基于循环神经网络的情感分类系统.rar
- I2C驱动SHT30温湿度传感器和LCD12864使用例程(RSCG12864B)
- python193中学地理-中国的江河湖泊教学网(django).rar
- python191基于时间序列分析的大气污染预测软件(django).rar
- python190基于人脸识别智能化小区门禁管理系统.rar
- python189某医院体检挂号系统.rar
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
评论0