zf_mmse.m ( File view )

  • By 小野人irene 2015-05-03
  • View(s):6
  • Download(s):2
  • Point(s): 1
			%基于ZF准则和MMSE准则的预编码性能比较
function zf_mmse()
clear all
close all
format long; %将数据显示为长整型科学计数 
Nt=4;%天线个数
Nr=4;
SNR=[0:2:20];%设置不同信噪比
channel_n=100*ones(1,length(SNR));
error_mmselinp=zeros(1,length(SNR));%初始化误码率
error_zflinp=zeros(1,length(SNR));
for loop_ebno=1:length(SNR)%不同信噪比的循环
    snr=10.^(SNR(loop_ebno)/10);%将信噪比从分贝形式转化成比例表示
    ea=1;%每个天线发射的功率,也即信号向量中每个元素的功率
    es=ea*Nt;%总共的发射功率
    sigma_n2=es/snr;%噪声功率
    num=200;%发送数据个数
    tic,
    for loop_channel=1:channel_n(loop_ebno)%信道的实现次数的循环
        H=sqrt(1/2)*(randn(Nr,Nt)+j*randn(Nr,Nt));%信道增益矩阵
        mmse_F=H'*inv(H*H'+sigma_n2/ea*eye(Nt));
        zf_F=H'*inv(H*H'); %求出F^,文献MIMO信道预编码技术研究  重要文献p27
        beta_mmse=sqrt(es/norm(mmse_F,'fro').^2);
        beta_zf=sqrt(es/norm(zf_F,'fro').^2);%计算zf_F的Frobenius范数%%求出缩放因子beta
        F_mmse=beta_mmse*mmse_F; 
        F_zf=beta_zf*zf_F;%求出预编码矩阵F=F^×beta
        for loop_num=1:num%在一帧数据符号中,信道保持不变。一帧总共有num个数据发送
            gen_u=(sign(randn(Nt,1))+j*sign(randn(Nt,1)));%产生信号
            u=sqrt(1/2)*gen_u;%归一化信号功率
            x_mmse=F_mmse*u;
            x_zf=F_zf*u;%发送信号
            noise=sqrt(sigma_n2/2)*(randn(Nr,1)+j*randn(Nr,1));%生成噪声功率为sigma_n2的噪声
            noise1=sqrt(sigma_n2/2)*(randn(Nr,1)+j*randn(Nr,1));
            y_mmse=H*x_mmse+noise;
            y_zf=H*x_zf+noise1;
            r_mmse=1/beta_mmse*y_mmse;
            r_zf=1/beta_zf*y_zf;%接收信号
            rev_data_mmse=sign(real(r_mmse))+j*sign(imag(r_mmse));%对接收信号进行判决
            rev_data_zf=sign(real(r_zf))+j*sign(imag(r_zf));
            error_mmselinp(1,loop_ebno)=error_mmselinp(1,loop_eb
...
...
(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
zf_mmse.m2.67 kB04-05-10|09:19
...
Sponsored links

zf_mmse.m (1.35 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