generate_opt_pilot.m

来自「用matlab对MIMO-OFDM通信系统的设计仿真的源代码」· M 代码 · 共 25 行

M
25
字号
function [mat_pilot]=generate_opt_pilot(num_tx,num_pilot,channel_length)
% Function generate_opt_pilot +++++++++++++++++++++++++++++++++++++++++++++++++
% Generate optimal pilot for LS algorithm
% Reference: Imad Barhumi, "Optimal Training Design for MIMO OFDM systems in Mobile Wireless Channels"

% Input data:  num_tx - number of transmit antennas 
%              num_pilot- number of pilots in each frame for each antenna
%              channel_length - the maximum delay of channel
% Output data: mat_pilot - output pilot matrix, in the form: mat_pilot(num_tx,num_pilot)

% Begin:  Feb, 2005
% Last edited: Feb.7, 2005
%   Feng Wan    

mat_pilot=zeros(num_tx,num_pilot);

% generate a random constant modulus sequence
rand_sequence=exp(i*pi*2*(rand(num_pilot,1)-1/2));

for n1=1:num_tx
    for n2=1:num_pilot
        n_r=(n1-1)*channel_length;
        mat_pilot(n1,n2)=exp(-i*2*pi*n_r*(n2-1)/num_pilot)*rand_sequence(n2);
    end    
end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?