📄 channel_estimator_.m
字号:
function [alpha,theta]=channel_estimator_(quad_train_seq, inphase_train_seq, orig_train, model, channel)
% [alpha,theta]=channel_estimator_(quad_train_seq, inphase_train_seq, orig_train, model, channel)
%
% Output:
% alpha - Alpha in channelmodel alpha = exp(j*theta)
% theta - Theta in dito
%
% Input:
% quad_train_seq - Quadrature part of training-sequence as seen in receiver.
% inphase_train_seq - Inphase dito
% orig_train - Original training-sequence. (Binary!) (on Antenna 1!)
% (not using training info from antenna 2.)
% model - If 0: No Alamouti coding (only sending on antenna 1)
% if 1: Alamouti coding is used for transmitting antennas.
% channel - 1 if referring to channel 0 (or 2) in Alamouti's paper.
% 2 if referring to channel 1 (or 3)
%
% Short Theoretical Background for the Function:
%
% Only one channel is estimated!!!
%
% Estimates the one-tap channel.
% (Referring to Appendix A in George J鰊grens master of sciense
% thesis for mathematical theories)
%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Function part of simulation for Space-Time
%%% coding project, group Grey-2001.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Author: Stefan Uppg錼d
% Date: 2001-03-22
% Version: 1.1
% Revision (Name & Date):
% SU 2001-03-24 Adding variable: model and modifying code for that
% Also: changed inputargument "sent_training_seq" be binary.
% (not BPSK:ed)
% SU 2001-03-27 Added if for calculating theta.
% SU 2001-04-08 Put the mean-expressions on 1/abs(w) and angle(w) instead of on r*conj(r).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% This is the straigt-forward channel-estimator according to the described theories.
sent_train_seq = bpsk(orig_train,model);
h_real = mean(sent_train_seq .* inphase_train_seq);
h_imag = mean(sent_train_seq .* quad_train_seq);
alpha = sqrt(h_real^2 + h_imag^2);
if h_real < 0
theta = atan(h_imag/h_real) + pi;
elseif h_real > 0
theta = atan(h_imag/h_real);
else
theta = pi/2;
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -