add_freqdomain_reponse.m
资源名称:MIMO-OFDM.rar [点击查看]
上传用户:look542
上传日期:2009-06-04
资源大小:784k
文件大小:2k
源码类别:
传真(Fax)编程
开发平台:
Matlab
- function ofdm_sym = add_freqdomain_reponse(pilot_added,H_freq,N_subc,N_syn_preamble,...
- N_sym,N_Rx_ant,N_Tx_ant,var_noise,ofdm_sym,ChannelEffectTest,AddChFreq)
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- % 在频域加信道响应,其响应为理想信道响应
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- ofdm_sym = zeros(N_subc, N_sym - N_syn_preamble , N_Rx_ant );
- if AddChFreq
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- if (ChannelEffectTest == 0)
- % 加信道响应
- for n_r = 1:N_Rx_ant
- for n_t = 1:N_Tx_ant
- ofdm_sym(:,:,n_r) = ofdm_sym(:,:,n_r) + pilot_added(:,:,n_t).*...
- H_freq(:,N_syn_preamble+1:N_sym,(n_r-1)*N_Tx_ant + n_t);
- end
- end
- % 加高斯白噪
- ofdm_sym = ofdm_sym + sqrt(var_noise)*( randn(N_subc, N_sym - N_syn_preamble , N_Rx_ant ) + ...
- j*randn(N_subc, N_sym - N_syn_preamble , N_Rx_ant ));
- end
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- if (ChannelEffectTest == 1)
- for n_r = 1:N_Rx_ant
- for n_t = 1:N_Tx_ant
- ofdm_sym(:,:,n_r) = ofdm_sym(:,:,n_r) + pilot_added(:,:,n_t).*...
- H_freq(:,N_syn_preamble+1:N_sym,(n_r-1)*N_Tx_ant + n_t);
- end
- end
- end
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- if (ChannelEffectTest == 2)
- ofdm_sym = pilot_added + sqrt(var_noise)*( randn(N_subc, N_sym - N_syn_preamble , N_Rx_ant ) + ...
- j*randn(N_subc, N_sym - N_syn_preamble , N_Rx_ant ));
- end
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- else
- ofdm_sym = pilot_added;
- end