联系QQ:

2181264433

新闻资讯
联系我们
联系:张女士
微信:扫一扫右侧二维码
QQ :2181264433
邮箱:2181264433@qq.com
地址:浙江省-嘉兴市-南湖区
网址:www.mhslogic.com
您当前位置:首页 > 国内资讯 > 正文国内资讯
MATLAB代做|FPGA代做|simulink代做——MIMO
添加时间:2020-8-12 来源:本站整理
%
%  EE359 Wireless Communications Term Project
%  
%  MIMO_rate.m
%
%  In this file, rate vs SNR plots are created for various rate quantization schemes
%


M=2; N=2; % Number of transmitter and receiver antennas
snr = [0 : 5 : 20]; % Signal to noise ratio
PT = 10.^(snr/10); % Total power according to snr
rate = [ 0 1 2 4 6 ];
penalty = [ 1 0.283 ];

Ns = 500; % Number of simulation
Np = length(snr);
Ng = length(penalty);

% Generation of random channel matrices
H = 1/2^0.5*(randn(N,M,Ns)+i*randn(N,M,Ns));


ST_TR = zeros(Np,Ng);
SPACE_TR = zeros(Ns,Np,Ng);

SR_TR = zeros(Ns,Np,Ng);
ERQ_TR = zeros(Ns,Np,Ng);

Prem = zeros(2,1);


% Compute the rate of MIMO systems doing power water-filling on both space
% and time domains with continuous rate adaptation

for m = 1: Ng
      lambda = [];
for n=1:Ns,
   [U S V] = svd(H(:,:,n)*H(:,:,n)');
   lambda = [ lambda; diag(S) ];
end
for k=1:Np;
   ST_TR(k,m) = st_wf(PT(k), lambda, penalty(m), Ns);
end
end


% Compute rates for various rate quantazation schemes

for m=1:Ng
for k=1:Np
    Prem = zeros(2,1);
avg_pw = 0;
   
    for n=1:Ns
            lambda = [];
      [U S V] = svd(H(:,:,n)*H(:,:,n)');
      lambda = diag(S);
            
            [R, Pw_vec, mu]=space_wf(PT(k), lambda, penalty(m)); SPACE_TR(n,k,m) = sum(R);  % Continuous rate
               
                  [R, I] = rate_roundoff(R, rate); SR_TR(n,k,m) = sum(R);  % SR Algorithm

              [R, Pw_vec, mu]=space_wf(PT(k)+Prem(2), lambda, penalty(m)); 
                   
            [P, R] = erq(Pw_vec, lambda, penalty(m), rate, mu); ERQ_TR(n,k,m) = sum(R);  % ERQ Algorithm
                  Prem(2) = sum(Pw_vec) - sum(P);
     
      avg_pw = avg_pw + sum(P);
end
  
    avg_pw = 10*log10(avg_pw / Ns)
end
end

figure;
plot(snr, ST_TR(:,1), '+-',  snr, ST_TR(:,2), '+:',  snr, mean(SR_TR(:,:,1),1), '^-',   snr, mean(SR_TR(:,:,2),1), '^:', snr, mean(ERQ_TR(:,:,1),1),'*-',   snr, mean(ERQ_TR(:,:,2),1),'*:' );

xlabel('average SNR (dB)'), ylabel('spectral efficiency (bps/Hz)'); grid on;
legend('Continuous rate (K=1)',   'Continuous rate (K=0.283)', 'SR (K=1)', 'SR (K=0.283)',  'ERQ (K=1)', 'ERQ (K=0.283)');

联系:张女士

QQ :2181264433

微信:lovemike121

邮箱:2181264433@qq.com

网站:http://www.mhslogic.com/

------------------------------------------------------------------------------------------------

交易可直接通过淘宝店铺


(可直接通过旺旺与技术员联系)




https://shop185632181.taobao.com/?spm=2013.1.w5001-22653403434.6.27f92e0a6xR1sB&scene=taobao_shop

扫一扫,关注我们