Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Alamaouti space time block in Simulink

Status
Not open for further replies.

MANIAK_44

Newbie level 6
Newbie level 6
Joined
Nov 26, 2006
Messages
13
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,365
Hi

can anyone help me out with simulink ?

i need an ALAMOUTI SPACE TIME CODE BLOCK in SIMULINK

or

can any one tell me how to make a user defined code block in simulink ..... ie i want to put my own code in a simulink block ?

thanx i need help urgently

tc
 

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!!!
 

    MANIAK_44

    Points: 2
    Helpful Answer Positive Rating
Re: HELP WITH SIMULINK

HI

thank you

il be most obliged if some one can help me regarding how to make a block of my own code in SIMULINK.

i havnt had much luck in that regard

MANSOOR
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top