blind.m ( File view )

  • By johnvarma 2016-06-09
  • View(s):0
  • Download(s):0
  • Point(s): 1
			clear all;
clc;
mu=0.0005;
N=31;
K=2;%%%%no of users
No=0.1;
Nodb=10*log10(1/No)
%No=N*No;
no_of_bits=50000;
%%%%get signature sequences
load '/home/users/arun/sscdma/project/mseq31primpoly45.mat'
s1=charphase;
load '/home/users/arun/sscdma/project/mseq31primpoly75.mat'
s2=charphase;
%%%%%%%generate the anitpodal sequence
s1=2*s1-1;
s2=2*s2-1;
%%%%%%%normalize energy of signature waveforms
s1=s1/sqrt(sum(s1.*s1));
s2=s2/sqrt(sum(s2.*s2));

A=[1 0;0 1];
rho=sum(s1.*s2);
R=[1 rho;rho,1];
%novector(1:K)=No;
%sigma2Aminus2=diag(novector);
bits=round(rand(K,no_of_bits));
b=2*bits-1;

n=sqrt(No)*randn(K,no_of_bits);
x1(1,1:N)=0;
for i=1:no_of_bits
   transmitted_bits=b(1,i)*s1+b(2,i)*s2;
   y=transmitted_bits+sqrt(No)*randn(1,N);%%received statistic
   zmf=sum(y.*s1);
   z=sum(y.*(s1+x1(i,:)));
   x1(i+1,:)=x1(i,:)-mu*z*(y-zmf*s1);
   x1(i+1,:)=x1(i+1,:)-sum(s1.*x1(i+1,:))*s1;%replace by the orthogonal projection
   %orth(i)=sum(s1.*x1(i+1,:));
   b_hat(i)=sign(z);
   %sir(i)=1/(No*(1+sum(x1(i+1,:).*x1(i+1,:)))+(sum((s1+x1(i+1,:)).*s2))^2);
end
b_hat=(b_hat+ones(1,no_of_bits))/2;
ber1=sum(xor(bits(1,:),b_hat(1,:)))/no_of_bits


%y=(R*A*b + n);
%%%%%%%%%%%theoretical optimum weights
%Wopt=inv(R*A*A*R+No*R)*[1;rho];

%c1=[1,1]';
%mean_squared_error(1)=sum((Wopt-c1).^2)/K;
%c1=c1-mu*(c1'*y(:,1)-
...
...
(Please download the complete source code to view)
			
...
Expand> <Close

Want complete source code? Download it here

Point(s): 1

Download
0 lines left, continue to read
Sponsored links

File list

Tips: You can preview the content of files by clicking file names^_^
Name Size Date
decor_det10users.m791.00 B03-12-01|04:11
blind.m1.91 kB03-12-01|04:11
blind10.m1.68 kB03-12-01|04:11
Decor_det.m764.00 B03-12-01|04:11
...
Sponsored links

blind.m (2.77 kB)

Need 1 point
Your Point(s)

Your Point isn't enough.

Get point immediately by PayPal

More(Debit card / Credit card / PayPal Credit / Online Banking)

Submit your source codes. Get more point

LOGIN

Don't have an account? Register now
Need any help?
Mail to: support@codeforge.com

切换到中文版?

CodeForge Chinese Version
CodeForge English Version

Where are you going?

^_^"Oops ...

Sorry!This guy is mysterious, its blog hasn't been opened, try another, please!
OK

Warm tip!

CodeForge to FavoriteFavorite by Ctrl+D