Re: HELP WITH SIMULINK
Hi,
as for as I know there is no Alamouti Block code in Simulink as by default, but u can create one for yourself in Simulink for sure. I am sending you the MATLAB code here for Alamouti scheme here for 2 transmit and 1 receive antenna with QPSK modulation. You can find this example and code in the book "MIMO Signal and Systems" by H. Bessai.
Further, your first question of estimating h1 and h2 is also covered in this example as well.
************************************************
% Ideal constellation points
d1 = 0.5*sqrt(2)*(-1-j);
d2 = 0.5*sqrt(2)*(1-j);
d3 = 0.5*sqrt(2)*(1+j);
d4 = 0.5*sqrt(2)*(-1+j);
%Number of symbols in data set
NS = 10000;
%Set of possible symbols
XP = [d1 d2 d3 d4];
% Error counter
errcount = 0;
%Noise variance
sig = 0.08;
for k = 1:NS
n1 = gnoise(sig, 1)+j*gnoise(sig,1);
n2 = gnoise(sig, 1)+j*gnoise(sig,1);
m1 = floor(rand(1)*3.999)+1;
x1 = XP(m1);
m2 = floor(rand(1)*3.999)+1;
x2 = XP(m2);
% Complex channel coefficients
h1 = 0.0707 + j*0.0707;
h2 = 0.1500 + j*0.2598;
% Complex AWGN samples
%n1 = 0.0100 + j*0.0020;
%n2 = -0.0030 + j*0.0030;
alpha = abs(h1)^2 + abs(h2)^2;
% Received signals
y1 = h1*x1 + h2*x2 + n1;
y2 = -h1*conj(x2) + h2*conj(x1) + n2;
% Statistics
x1t = conj(h1)*y1 + h2*conj(y2);
x2t = conj(h2)*y1 - h1*conj(y2);
for p = 1:4
G1(p) = abs(x1t - alpha*XP(p))^2;
G2(p) = abs(x2t - alpha*XP(p))^2;
end
[dummy, p1] = min(G1);
[dummy, p2] = min(G2);
first_sample = XP(m1);
x1h = XP(p1);
second_sample = XP(m2);
x2h = XP(p2);
if abs(x1h - first_sample)> 0.001
errcount = errcount + 1;
end
if abs(x2h - second_sample)> 0.001
errcount = errcount + 1;
end
end
Number_of_Symbols = NS
Noise_Variance = sig
Number_of_Symbol_Errors = errcount
Symbol_Error_Rate = errcount/NS
************************************************************
BR,
MAK
Please dont forget to press helped me!!!