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.

Aalmouti coding scheme question

Status
Not open for further replies.

shakeel006

Junior Member level 3
Joined
Oct 31, 2004
Messages
28
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Pakistan
Activity points
249
almouti code

Dear Sir
I downloaded Alamouti code from matlab central.I am unable to understand the following decoding part please explain.I have typed Q in comments for my question

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Decoding %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


dh = sqrt(2)*[1 -1]/2; %Q: why this is used where it comes from?


%Computing the distances for the first symbol%

d11=((dh(1)-real(S(1)))^2+(imag(S(1)))^2); this is not distance formula between two points
d12=((dh(2)-real(S(1)))^2+(imag(S(1)))^2);


D1=[d11 d12]; %Distances for the received symbol


%Building the decisions vector for the first symbol%

for k=1:2

X1_dec(k)=((abs(dh(k)))^2)*sum(sum((abs(H)).^2)-1)+D1(k);

end

%Computing the distances for the second symbol%

d21=((dh(1)-real(S(2)))^2+(imag(S(2)))^2);
d22=((dh(2)-real(S(2)))^2+(imag(S(2)))^2);

D2=[d21 d22];

%Building the decisions vector for the second symbol%

for x=1:2

X2_dec(x)=((abs(dh(k)))^2)*sum(sum((abs(H)).^2)-1)+D2(x);

end

%The decisions!! We chose the little one%

[scelta1, posizione1]=min(X1_dec);
[scelta2, posizione2]=min(X2_dec);

If I can write in simple words what is ML detector it is as follows


arg min ( received signal - reference symbols ) ^2

where minimization is over all reference symbols.

I saw another example for BPSK which implemented ML decoding as follows.highlighted with bigger font

clear %clear matlab workspace
clc %clear command window
tic %intialize start time of simulation
M=2; % for BPSK we need only two symbols 0 or 1.
snr_db=0:12; % Range of 0-12 Dbs over which Pe will be calculated in this simulation
% LEN=[1e+6*ones(1,5) 1e+6*ones(1,5) 1e+6*ones(1,3)]; % number of bits transmitted i.e 10^6=100,0000.
LEN=[1e+6*ones(1,13)]; % number of bits transmitted i.e 10^6=100,0000.
srf=exp(j*2*pi*[0;1]/2); % reference signal
for k=1:length(snr_db)
bit_err=0;
for kk=1:LEN(k)
snr=10^(snr_db(k)/10); %SNR in real values
varn=1/(2*snr); %noise variance
data=randint(1,1,[0 M-1]); %random data generated
s=exp(2*j*pi*data/M); %signal tobe transmitted
n=sqrt(varn)*(randn(1,1)+j*randn(1,1)); %Complex gaussian distributed random data ???????
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Another way of ML decoding in different way
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
x=s+n; % signal tobe transmitted
f=(abs(x*ones(2,1)-srf)).^2; % abs(( received signal - reference symbols )) ^2
[fmn,argd]=min(f); % for complex f=min(abs(f)),so [number index]=min(f)
dr=argd-1; %get the index
bit_err=bit_err+(dr~=data);%if the received is not equal to data then increment error count
end
poe_n(k)=bit_err/LEN(k); %no of errors/100,0000
poe_n_exact(k)=qfunc(1/sqrt(varn));

Please explain the difference between the two ML decoding implementations .

best regards

Shakeel
 

implementation + alamouti scheme

I have been seeing your topic unanswered for some time, so I wanted to write down something, may be I can help. I have found the code too long and disturbing as well, thats a strange way of coding. Why dont you try to write down your own codes in Matlab, the alamouti scheme should not be too complex to implement. If you want a document which tells how the alamouti scheme works I can post it here and you can implement it on matlab by yourself. Bye and sorry for not helping you with the code you posted here.
 

matlab code to check alamouti coding scheme

If you have a document which tells
how the alamouti scheme works so please post it here .if it is almouti IEEE paper.then i need to understand the matlab implementation .So if you simply the decoding.I shall be grateful to you.

I need to plot BER versus SNR curve for MRC and Almouti coding.

Shakeel
 

sorry but its an ieee paper that I have. If you fancy just take a look, if you dont already have it I should say that it is a good one telling how multiple antennas work. It also contains a BER plot for Alamouti, which may help you to double check your results as well.
 

shakeel006 said:
If you have a document which tells
how the alamouti scheme works so please post it here .if it is almouti IEEE paper.then i need to understand the matlab implementation .So if you simply the decoding.I shall be grateful to you.

I need to plot BER versus SNR curve for MRC and Almouti coding.

Shakeel
Have a nice day..
Please dear , if you got the answer or the right code , let me know , coz I have same problem, I'll be thankful.

Thank you.

Regards
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top