Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Beamforming simulations

Subject: Beamforming simulations

From: jonny.d.w@gmail.com

Date: 18 Sep, 2008 07:55:49

Message: 1 of 7

Dear all,

Unfortunately my maths is not very strong at the moment but I'm not
completely useless. I have been trying to compare some simple wireless
beamformer simulations.

I have successfully recreated a Signal to leakage ratio (SLR)
beamformer simulation as discussed in the paper - A. Tarighat, M.
Sadek and A.H. Sayed, =93A Multi User Beamforming Scheme For Downlink
MIMO Channels Based On Maximizing Signal-To-Leakage Ratios=94, IEEE
ICASP, 2005

the code below produces the same results found in the paper using
matlab:

clear all
clc

N=3D5;
K=3D3;
M=3D3;


imax=3D1000;
SNRmin=3D-10;
SNRmax=3D10;


for SNR=3DSNRmin:SNRmax
    scf=3D1/sqrt(10^(SNR*0.1));
    error=3D0;
    for count=3D1:imax;

        %symbols
        s=3Dsign(randn(K,1))+j*sign(randn(K,1));
        s=3Ds*sqrt(1/2);

        %channel
        H1=3Drandn(M,N)+j*randn(M,N); %user 1 channel
        H2=3Drandn(M,N)+j*randn(M,N); %user 2 channel
        H3=3Drandn(M,N)+j*randn(M,N); %user 3 channel

        %------- extended matrices
        Hi1=3D[H2',H3']'; %for user 1
        Hi2=3D[H1',H3']'; %user 2
        Hi3=3D[H1',H2']'; %user 3
        %--------------------------------------

        [V,D]=3Deig(H1'*H1,Hi1'*Hi1);
        w1=3DV(:,N)/sqrt(V(:,N)'*V(:,N));
        [V,D]=3Deig(H2'*H2,Hi2'*Hi2);
        w2=3DV(:,N)/sqrt(V(:,N)'*V(:,N));
        [V,D]=3Deig(H3'*H3,Hi3'*Hi3);
        w3=3DV(:,N)/sqrt(V(:,N)'*V(:,N));

        w=3D[w1,w2,w3];

        %transmit vector x
        x=3Dw*s;

        %noise vector
        noise=3D(randn(M,1)+j*randn(M,1));

        %receive vector y
        y=3DH1*x+noise*scf;

        %detection of user 1
        num=3D(w1'*H1'*y);
        den=3D(w1'*H1'*H1*w1);
        if den=3D=3D0
        %den=3D1;
        else
            r=3D(sign(real((num/den)))+j*sign(imag((num/
den))))*sqrt(1/2);
        end

        %error of user 1
        if r~=3Ds(1)
            if real(r)~=3Dreal(s(1))
                error=3Derror+1;
            end
            if imag(r)~=3Dimag(s(1))
                error=3Derror+1;
            end
        end

    end
    BER(SNR+(1-SNRmin))=3Derror/(2*imax);
    Xaxis(SNR+(1-SNRmin))=3DSNR
end
figure
semilogy(Xaxis,BER)
hold on
xlabel('SNR per recieve antenna (dB)')
ylabel('Uncoded BER')
title([' N=3D',num2str(N),'M=3D',num2str(M),'K=3D',num2str(K)]);


% the end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



Now i'm really struggling to recreate an MMSE beamformer (MMSE to find
the beamforming vector) to compare directly to the above simulation. 3
types of beamforming equations: Max-SINR, MOE and MMSE. Can be found
at http://www.comm.utoronto.ca/~rsadve/Notes/BeamForming.pdf
I'm trying to simulate all but am mainly interested in MMSE.

if anyone can help please contact me, I'm getting desperate...........
and willing to compensate someone for their time to help me.

below is the matlab code I tried to use to get MOE and max SINR
beamformers but failed miserably:

clear all
clc
%-------- lots of RCOND errors probably due to DMI so added the line
below to speed things up
warning off all

N=3D5;
K=3D3;
M=3D3;

imax=3D1000;
SNRmin=3D-10;
SNRmax=3D10;


for SNR=3DSNRmin:SNRmax
    scf=3D1/sqrt(10^(SNR*0.1));
    error=3D0;
    for count=3D1:imax;

        %QPSK symbols
        s=3Dsign(randn(K,1))+j*sign(randn(K,1));
        s=3Ds*sqrt(1/2);

        %channel
        H1=3Drandn(M,N)+j*randn(M,N); %user 1 channel
        H2=3Drandn(M,N)+j*randn(M,N); %user 2 channel
        H3=3Drandn(M,N)+j*randn(M,N); %user 3 channel

        %noise vector for user 1 --> 3
        noise1=3D((randn(M,N)+j*randn(M,N))/N)*scf;
        noise2=3D((randn(M,N)+j*randn(M,N))/N)*scf;
        noise3=3D((randn(M,N)+j*randn(M,N))/N)*scf;
        %dividing through by N to make the noise scaleable per receive
antenna to match other simulations

        desired1=3Ds(1,1)*H1;
        interference1=3Ds(2,1)*H2+s(3,1)*H3+noise1;

        desired2=3Ds(2,1)*H2;
        interference2=3Ds(1,1)*H1+s(3,1)*H3+noise2;

        desired3=3Ds(3,1)*H3;
        interference3=3Ds(2,1)*H2+s(1,1)*H1+noise3;

        %correlation matrices for users 1 --> 3
        R1=3Ddesired1*desired1';
        Rn1=3Dinterference1*interference1';

        R2=3Ddesired2*desired2';
        Rn2=3Dinterference2*interference2';

        R3=3Ddesired3*desired3';
        Rn3=3Dinterference3*interference3';
        %-------------------------------------------------
        %beamforming weights
        wmoe1=3D(inv(R1)*H1)/(H1'*inv(R1)*H1); %moe=3D minimum output
energy beamformer
        wsinr1=3D(inv(Rn1)*H1)/(H1'*inv(Rn1)*H1); %sinr =3D max sinr
beamformer

        wmoe2=3D(inv(R2)*H2)/(H2'*inv(R2)*H2);
        wsinr2=3D(inv(Rn2)*H2)/(H2'*inv(Rn2)*H2);

        wmoe3=3D(inv(R3)*H3)/(H3'*inv(R3)*H3);
        wsinr3=3D(inv(Rn3)*H3)/(H3'*inv(Rn3)*H3);
        %---------------------------------------------------
        %not sure which line of the weight matrix to use here
        %it should be a 3x5 matrix by looking at the maths but I only
need
        %1x5 weights, so just using the last line of weights for the
hell
        %of it.... maybe you know which to use ?

        w1=3Dwmoe1(3,:).';
        w2=3Dwmoe2(3,:).';
        w3=3Dwmoe3(3,:).';
        %---------------------------------------------------

        %now calculating BER for just user 1, other users not needed
except for interference purposes
        w=3D[w1,w2,w3];
        %transmit vector x
        tx=3Dw*s;

        %receive vector y at user 1
        y=3DH1*tx;

        %detection of user 1
        num=3D(w1'*H1'*y);
        den=3D(w1'*H1'*H1*w1);
        if den=3D=3D0
        %den=3D1;
        else
            r=3D(sign(real((num/den)))+j*sign(imag((num/
den))))*sqrt(1/2);
        end

        %error of user 1
        if r~=3Ds(1)
            if real(r)~=3Dreal(s(1))
                error=3Derror+1;
            end
            if imag(r)~=3Dimag(s(1))
                error=3Derror+1;
            end
        end

    end
    BER(SNR+(1-SNRmin))=3Derror/(2*imax);
    Xaxis(SNR+(1-SNRmin))=3DSNR
end
figure
semilogy(Xaxis,BER)
hold on
xlabel('SNR per recieve antenna (dB)')
ylabel('Uncoded BER')
title([' N=3D',num2str(N),'M=3D',num2str(M),'K=3D',num2str(K)]);


If anyone can help or point me in the right direction I'll be indebted
to you for a long long time

kindest regards,

J.D.W

Subject: Beamforming simulations

From: Aaron Callard

Date: 18 Sep, 2008 14:39:03

Message: 2 of 7

I wouldn't really call this MMSE beamforming as you're not doing any phased array things here, and you're considering a rayleigh channel.

What you're realling doing is some type of channel inversion to transmit to multiple users simultaniously. It's sometimes called Multi-User MIMO, or SDMA.

for a general channel H, where users have more than recieve antenans than streams transmitted towards them, the MMSE solution is not known closed form. Which is probably why you're having difficulty.

for a single recieve antenna
H=[H1;H2;H3]
the solution is just the standard MMSE matrix of
P=H'*inv(H*H'+noise*eye(K))

written like this for explanation knowing that you're not really going to do the matrix inversion like this.

each column of P represents the beam weights towards a specific user.

The zero forcing weights are not suprisingly
P=inv(H)

Subject: Beamforming simulations

From: jonny.d.w@gmail.com

Date: 19 Sep, 2008 02:50:10

Message: 3 of 7

Hi Aaron,

Yes you are 100% correct, I am looking at a multi user scenario and
attempting to beamform to each user. So as a result I'm doing SDMA.

Would I be correct in assuming that if I perform the MMSE for a single
receive antenna on each receive element individually I'd obtain a
working multiple element solution ?

With my simulations I'm trying to show that the multiuser beamformer
which I have successfully simulated already, exceeds the results on a
non multi user MMSE, MOE and MAX-SINR beamformer in the same multi
user scenario.

kind of a no brainer but anyway....... the documentation I've been
given as a starting platform was http://www.comm.utoronto.ca/~rsadve/Notes/=
BeamForming.pdf
and told to just use DMI with no estimation required(perfect
beamforming). The appear to give a multiple receive antenna solution
for MMSE.

Thank you for your time reviewing my blab,

J.D.W






On Sep 19, 12:39=A0am, "Aaron Callard" <no.tha...@hotmail.com> wrote:
> I wouldn't really call this MMSE beamforming as you're not doing any phas=
ed array things here, and you're considering a rayleigh channel.
>
> What you're realling doing is some type of channel inversion to transmit =
to multiple users simultaniously. =A0It's sometimes called Multi-User MIMO,=
 or SDMA. =A0
>
> for a general channel H, where users have more than recieve antenans than=
 streams transmitted towards them, the MMSE solution is not known closed fo=
rm. =A0Which is probably why you're having difficulty. =A0
>
> for a single recieve antenna
> H=3D[H1;H2;H3]
> the solution is just the standard MMSE matrix of
> P=3DH'*inv(H*H'+noise*eye(K))
>
> written like this for explanation knowing that you're not really going to=
 do the matrix inversion like this. =A0
>
> each column of P represents the beam weights towards a specific user. =A0
>
> The zero forcing weights are not suprisingly
> P=3Dinv(H)

Subject: Beamforming simulations

From: Aaron Callard

Date: 19 Sep, 2008 16:30:04

Message: 4 of 7

As I said this is an open problem (if you solve it please write a paper on it as I'd like to know the solution myself).

As for the algorithm you propose, it would probably give decent results. It's a question of how good do you want things to be. Then again that's the wonderful thing about simulation, try it out, maybe it works maybe it doesn't at worst you're out a few hours of coding. Of course the problem with working on things without tight upper bounds you never know if you're close to the limit or not.

On a side note, don't forget about fairness when considering the performance. Too much academic work focuses on sum throughput, when real world applications almost always involve some type of fairness criterion, as humans notice when their service is 50% slower much more than when their service is 100% faster.

Aaron

jonny.d.w@gmail.com wrote in message <2d1d4714-00c2-4a4d-be65-7f3c3c1e3328@s9g2000prg.googlegroups.com>...
> Hi Aaron,
>
> Yes you are 100% correct, I am looking at a multi user scenario and
> attempting to beamform to each user. So as a result I'm doing SDMA.
>
> Would I be correct in assuming that if I perform the MMSE for a single
> receive antenna on each receive element individually I'd obtain a
> working multiple element solution ?
>
> With my simulations I'm trying to show that the multiuser beamformer
> which I have successfully simulated already, exceeds the results on a
> non multi user MMSE, MOE and MAX-SINR beamformer in the same multi
> user scenario.
>
> kind of a no brainer but anyway....... the documentation I've been
> given as a starting platform was http://www.comm.utoronto.ca/~rsadve/Notes/=
> BeamForming.pdf
> and told to just use DMI with no estimation required(perfect
> beamforming). The appear to give a multiple receive antenna solution
> for MMSE.
>
> Thank you for your time reviewing my blab,
>
> J.D.W
>
>
>
>
>
>
> On Sep 19, 12:39=A0am, "Aaron Callard" <no.tha...@hotmail.com> wrote:
> > I wouldn't really call this MMSE beamforming as you're not doing any phas=
> ed array things here, and you're considering a rayleigh channel.
> >
> > What you're realling doing is some type of channel inversion to transmit =
> to multiple users simultaniously. =A0It's sometimes called Multi-User MIMO,=
> or SDMA. =A0
> >
> > for a general channel H, where users have more than recieve antenans than=
> streams transmitted towards them, the MMSE solution is not known closed fo=
> rm. =A0Which is probably why you're having difficulty. =A0
> >
> > for a single recieve antenna
> > H=3D[H1;H2;H3]
> > the solution is just the standard MMSE matrix of
> > P=3DH'*inv(H*H'+noise*eye(K))
> >
> > written like this for explanation knowing that you're not really going to=
> do the matrix inversion like this. =A0
> >
> > each column of P represents the beam weights towards a specific user. =A0
> >
> > The zero forcing weights are not suprisingly
> > P=3Dinv(H)

Subject: Beamforming simulations

From: mahmud_dbm

Date: 24 Apr, 2010 18:47:03

Message: 5 of 7

Hello J.D.W ..


I think i might help you.. as i was doing something on this same field..!! have you got the solution for that MMSE Beamforming problem..! if you still have problems.. let me know..

Best Regards

Mahmud

Subject: Beamforming simulations

From: srinivas3120@gmail.com

Date: 15 May, 2014 00:22:16

Message: 6 of 7

Dear J.D.W,
I am Srinivas.
I am doing a project on MIMO-OFDM Beamforming. It will be a great help if i could get related matlab code or any kind of information is very appreciated.

Thanks in advance.

Regards,
Srinivas

Subject: Beamforming simulations

From: shankar62099@gmail.com

Date: 15 May, 2014 16:47:52

Message: 7 of 7

Dear J.D.W,
I am shankar gangaju
I am doing a project on MIMO-OFDM Beamforming. It will be a great help if i could get related matlab code or any kind of information is very appreciated.

Thanks in advance

On Thursday, September 18, 2008 1:40:49 PM UTC+5:45, jonn...@gmail.com wrote:
> Dear all,
>
> Unfortunately my maths is not very strong at the moment but I'm not
> completely useless. I have been trying to compare some simple wireless
> beamformer simulations.
>
> I have successfully recreated a Signal to leakage ratio (SLR)
> beamformer simulation as discussed in the paper - A. Tarighat, M.
> Sadek and A.H. Sayed, "A Multi User Beamforming Scheme For Downlink
> MIMO Channels Based On Maximizing Signal-To-Leakage Ratios", IEEE
> ICASP, 2005
>
> the code below produces the same results found in the paper using
> matlab:
>
> clear all
> clc
>
> N=5;
> K=3;
> M=3;
>
>
> imax=1000;
> SNRmin=-10;
> SNRmax=10;
>
>
> for SNR=SNRmin:SNRmax
> scf=1/sqrt(10^(SNR*0.1));
> error=0;
> for count=1:imax;
>
> %symbols
> s=sign(randn(K,1))+j*sign(randn(K,1));
> s=s*sqrt(1/2);
>
> %channel
> H1=randn(M,N)+j*randn(M,N); %user 1 channel
> H2=randn(M,N)+j*randn(M,N); %user 2 channel
> H3=randn(M,N)+j*randn(M,N); %user 3 channel
>
> %------- extended matrices
> Hi1=[H2',H3']'; %for user 1
> Hi2=[H1',H3']'; %user 2
> Hi3=[H1',H2']'; %user 3
> %--------------------------------------
>
> [V,D]=eig(H1'*H1,Hi1'*Hi1);
> w1=V(:,N)/sqrt(V(:,N)'*V(:,N));
> [V,D]=eig(H2'*H2,Hi2'*Hi2);
> w2=V(:,N)/sqrt(V(:,N)'*V(:,N));
> [V,D]=eig(H3'*H3,Hi3'*Hi3);
> w3=V(:,N)/sqrt(V(:,N)'*V(:,N));
>
> w=[w1,w2,w3];
>
> %transmit vector x
> x=w*s;
>
> %noise vector
> noise=(randn(M,1)+j*randn(M,1));
>
> %receive vector y
> y=H1*x+noise*scf;
>
> %detection of user 1
> num=(w1'*H1'*y);
> den=(w1'*H1'*H1*w1);
> if den==0
> %den=1;
> else
> r=(sign(real((num/den)))+j*sign(imag((num/
> den))))*sqrt(1/2);
> end
>
> %error of user 1
> if r~=s(1)
> if real(r)~=real(s(1))
> error=error+1;
> end
> if imag(r)~=imag(s(1))
> error=error+1;
> end
> end
>
> end
> BER(SNR+(1-SNRmin))=error/(2*imax);
> Xaxis(SNR+(1-SNRmin))=SNR
> end
> figure
> semilogy(Xaxis,BER)
> hold on
> xlabel('SNR per recieve antenna (dB)')
> ylabel('Uncoded BER')
> title([' N=',num2str(N),'M=',num2str(M),'K=',num2str(K)]);
>
>
> % the end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>
>
>
> Now i'm really struggling to recreate an MMSE beamformer (MMSE to find
> the beamforming vector) to compare directly to the above simulation. 3
> types of beamforming equations: Max-SINR, MOE and MMSE. Can be found
> at http://www.comm.utoronto.ca/~rsadve/Notes/BeamForming.pdf
> I'm trying to simulate all but am mainly interested in MMSE.
>
> if anyone can help please contact me, I'm getting desperate...........
> and willing to compensate someone for their time to help me.
>
> below is the matlab code I tried to use to get MOE and max SINR
> beamformers but failed miserably:
>
> clear all
> clc
> %-------- lots of RCOND errors probably due to DMI so added the line
> below to speed things up
> warning off all
>
> N=5;
> K=3;
> M=3;
>
> imax=1000;
> SNRmin=-10;
> SNRmax=10;
>
>
> for SNR=SNRmin:SNRmax
> scf=1/sqrt(10^(SNR*0.1));
> error=0;
> for count=1:imax;
>
> %QPSK symbols
> s=sign(randn(K,1))+j*sign(randn(K,1));
> s=s*sqrt(1/2);
>
> %channel
> H1=randn(M,N)+j*randn(M,N); %user 1 channel
> H2=randn(M,N)+j*randn(M,N); %user 2 channel
> H3=randn(M,N)+j*randn(M,N); %user 3 channel
>
> %noise vector for user 1 --> 3
> noise1=((randn(M,N)+j*randn(M,N))/N)*scf;
> noise2=((randn(M,N)+j*randn(M,N))/N)*scf;
> noise3=((randn(M,N)+j*randn(M,N))/N)*scf;
> %dividing through by N to make the noise scaleable per receive
> antenna to match other simulations
>
> desired1=s(1,1)*H1;
> interference1=s(2,1)*H2+s(3,1)*H3+noise1;
>
> desired2=s(2,1)*H2;
> interference2=s(1,1)*H1+s(3,1)*H3+noise2;
>
> desired3=s(3,1)*H3;
> interference3=s(2,1)*H2+s(1,1)*H1+noise3;
>
> %correlation matrices for users 1 --> 3
> R1=desired1*desired1';
> Rn1=interference1*interference1';
>
> R2=desired2*desired2';
> Rn2=interference2*interference2';
>
> R3=desired3*desired3';
> Rn3=interference3*interference3';
> %-------------------------------------------------
> %beamforming weights
> wmoe1=(inv(R1)*H1)/(H1'*inv(R1)*H1); %moe= minimum output
> energy beamformer
> wsinr1=(inv(Rn1)*H1)/(H1'*inv(Rn1)*H1); %sinr = max sinr
> beamformer
>
> wmoe2=(inv(R2)*H2)/(H2'*inv(R2)*H2);
> wsinr2=(inv(Rn2)*H2)/(H2'*inv(Rn2)*H2);
>
> wmoe3=(inv(R3)*H3)/(H3'*inv(R3)*H3);
> wsinr3=(inv(Rn3)*H3)/(H3'*inv(Rn3)*H3);
> %---------------------------------------------------
> %not sure which line of the weight matrix to use here
> %it should be a 3x5 matrix by looking at the maths but I only
> need
> %1x5 weights, so just using the last line of weights for the
> hell
> %of it.... maybe you know which to use ?
>
> w1=wmoe1(3,:).';
> w2=wmoe2(3,:).';
> w3=wmoe3(3,:).';
> %---------------------------------------------------
>
> %now calculating BER for just user 1, other users not needed
> except for interference purposes
> w=[w1,w2,w3];
> %transmit vector x
> tx=w*s;
>
> %receive vector y at user 1
> y=H1*tx;
>
> %detection of user 1
> num=(w1'*H1'*y);
> den=(w1'*H1'*H1*w1);
> if den==0
> %den=1;
> else
> r=(sign(real((num/den)))+j*sign(imag((num/
> den))))*sqrt(1/2);
> end
>
> %error of user 1
> if r~=s(1)
> if real(r)~=real(s(1))
> error=error+1;
> end
> if imag(r)~=imag(s(1))
> error=error+1;
> end
> end
>
> end
> BER(SNR+(1-SNRmin))=error/(2*imax);
> Xaxis(SNR+(1-SNRmin))=SNR
> end
> figure
> semilogy(Xaxis,BER)
> hold on
> xlabel('SNR per recieve antenna (dB)')
> ylabel('Uncoded BER')
> title([' N=',num2str(N),'M=',num2str(M),'K=',num2str(K)]);
>
>
> If anyone can help or point me in the right direction I'll be indebted
> to you for a long long time
>
> kindest regards,
>
> J.D.W

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us