Sie sind auf Seite 1von 11

EX.

NO: 6
DESIGN AND ANALYSIS OF DIGITAL COMMUNICATION
TECHNIQUES ON SDR PLATFORM
6a) MIMO channel model with beamforming
AIM
To design and analyze the MIMO channel model with beamforming on SDR
platform

SOFTWARE TOOL REQUIRED


MATLAB 7.1

THEORY
INTRODUCTION
Software-defined radio (SDR) is a radio communication system where
components that have been typically implemented in hardware (e.g. mixers, filters,
amplifiers, modulators/demodulators, detectors, etc.) are instead implemented by means
of software on a personal computer or embedded system. A basic SDR system may
consist of a personal computer equipped with a sound card, or other analog-to-digital
converter, preceded by some form of RF front end. Significant amounts of signal
processing are handed over to the general-purpose processor, rather than being done in
special-purpose hardware. Such a design produces a radio which can receive and transmit
widely different radio protocols (sometimes referred to as waveforms) based solely on the
software used.
Software radios have significant utility for the military and cell phone services,
both of which must serve a wide variety of changing radio protocols in real time.In the
long term, software-defined radios are expected by proponents like the SDRForum (now
The Wireless Innovation Forum) to become the dominant technology in radio
communications. SDRs, along with software defined antennas are the enablers of the
cognitive radio.

MIMO WITH BEAMFORMING


In radio, multiple-input and multiple-output, or MIMO (pronounced my-moh
by some and me-moh by others), is the use of multiple antennas at both the transmitter
and receiver to improve communication performance. It is one of several forms of smart
antenna technology. Note that the terms input and output refer to the radio channel
carrying the signal, not to the devices having antennas.
MIMO technology has attracted attention in wireless communications, because it
offers significant increases in data throughput and link range without additional
bandwidth or increased transmit power. It achieves this goal by spreading the same total
transmit power over the antennas to achieve an array gain that improves the spectral
efficiency (more bits per second per hertz of bandwidth) and/or to achieve a diversity
gain that improves the link reliability (reduced fading). Because of these properties,
MIMO is an important part of modern wireless communication standards such as IEEE
802.11n (Wi-Fi), 4G, 3GPP Long Term Evolution, WiMAX and HSPA+.

ADVANTAGES

Software to be reused across radio "products", reducing development costs


dramatically.
Over-the-air or other remote reprogramming, allowing "bug fixes" to occur while
a radio is in service, thus reducing the time and costs associated with operation
and maintenance.
Allows for multiple types of radio modulation schemes internal to single system.

DISADVANTAGES

Longer Development Time


Ideal SDR design employs non-existent technology.
Expensive power requirements

APPLICATIONS
Mobile radio telephone
High-Speed Packet Access plus (HSPA+)

CODING
% MATLAB source code for computing the snr for 2*2 MIMO channel model with
beamforming
clc;
clear all;
close all;
N = 10^6; % number of bits or symbols
Eb_N0_dB = [0:25]; % multiple Eb/N0 values
nTx = 2;
nRx = 2;
for ii = 1:length(Eb_N0_dB)
% Transmitter
ip = rand(1,N)>0.5; % generating 0,1 with equal probability
s = 2*ip-1; % BPSK modulation 0 -> -1; 1 -> 1
sMod = kron(s,ones(nRx,1)); %
sModt = reshape(sMod,[nRx,nTx,N/nTx]); % grouping in [nRx,nTx,N/NTx ] matrix
h = 1/sqrt(2)*[randn(nRx,nTx,N/nTx) + j*randn(nRx,nTx,N/nTx)]; % Rayleigh channel
n = 1/sqrt(2)*[randn(nRx,N/nTx) + j*randn(nRx,N/nTx)]; % white gaussian noise, 0dB
variance

% Channel and noise Noise addition


y = squeeze(sum(h.*sModt,2)) + 10^(-Eb_N0_dB(ii)/20)*n;
winsize = [1 29 1280 928] ;
%winsize = [199 201 874 649] ;
f = 850000000.0 ;
omega = 2.0*pi*f ;
c = 300000000.0 ;
delta_t = 0.25*1/f ;
%delta_t = 0.0000000001;
lambda = c/f ;
wave_number = 2.0*pi/lambda ;
numframes= 12 ;
no_of_phases = 8 ;
%axis equal % fix the axes
array_center = 0.0 + 0.0*j ;
array_offset = lambda/2.0 ;
no_of_sources = 4 ; % Keep as an even amount
for( k = 1:no_of_phases)
phase_offset(k) = 1.0*(pi/2.0 - 2.0*pi*(k-1)/(numframes) ) ;

end
for count = 1 : no_of_sources
source(count) = array_center - ((no_of_sources-1)/2)*array_offset + (count - 1)
*array_offset ;
for( k = 1:no_of_phases)
phase(count,k) = (count-1)*phase_offset(k) ;
end
end
x_upper = -6.0 ;
x_lower = 6.0 ;
x_count = 150 ;
delta_x = (x_upper - x_lower) / ( x_count) ;
y_lower = 3*lambda ;
y_upper = 3*lambda + 12.0 ;
y_count = 150 ;
delta_y = (y_upper - y_lower) / ( y_count) ;
for( k = 1:no_of_phases)
for( count1 = 1:x_count)
for( count2 = 1:y_count)
field(count1,count2,k) = 0.0 ;
pos = x_lower + (count1 - 1)*delta_x + j*( y_lower + (count2 - 1)*delta_y ) ;
for( count3 = 1:no_of_sources)
dist = abs( source(count3) - pos ) ;
field(count1,count2,k) = field(count1,count2,k) + sqrt(2*j/(pi*wave_number*dist))*exp(j*(wave_number*dist + phase(count3,k)) ) ;
end
end
end
end
% Maximum Likelihood Receiver
% if [s1 s2 ] = [+1,+1 ]
sHat1 = [1 1];
sHat1 = repmat(sHat1,[1 ,N/2]);
sHat1Mod = kron(sHat1,ones(nRx,1));
sHat1Mod = reshape(sHat1Mod,[nRx,nTx,N/nTx]);
zHat1 = squeeze(sum(h.*sHat1Mod,2)) ;
J11 = sum(abs(y - zHat1),1);
% if [s1 s2 ] = [+1,-1 ]
sHat2 = [1 -1];
sHat2 = repmat(sHat2,[1 ,N/2]);
sHat2Mod = kron(sHat2,ones(nRx,1));
sHat2Mod = reshape(sHat2Mod,[nRx,nTx,N/nTx]);
zHat2 = squeeze(sum(h.*sHat2Mod,2)) ;
J10 = sum(abs(y - zHat2),1);
% if [s1 s2 ] = [-1,+1 ]
sHat3 = [-1 1];

sHat3 = repmat(sHat3,[1 ,N/2]);


sHat3Mod = kron(sHat3,ones(nRx,1));
sHat3Mod = reshape(sHat3Mod,[nRx,nTx,N/nTx]);
zHat3 = squeeze(sum(h.*sHat3Mod,2)) ;
J01 = sum(abs(y - zHat3),1);
% if [s1 s2 ] = [-1,-1 ]
sHat4 = [-1 -1];
sHat4 = repmat(sHat4,[1 ,N/2]);
sHat4Mod = kron(sHat4,ones(nRx,1));
sHat4Mod = reshape(sHat4Mod,[nRx,nTx,N/nTx]);
zHat4 = squeeze(sum(h.*sHat4Mod,2)) ;
J00 = sum(abs(y - zHat4),1);
% finding the minimum from the four alphabet combinations
rVec = [J11;J10;J01;J00];
[jj dd] = min(rVec,[],1);
% mapping the minima to bits
ref = [1 1; 1 0; 0 1; 0 0 ];
ipHat = zeros(1,N);
ipHat(1:2:end) = ref(dd,1);
ipHat(2:2:end) = ref(dd,2);
% counting the errors
nErr(ii) = size(find([ip- ipHat]),2);
end
simBer = nErr/N; % simulated ber
EbN0Lin = 10.^(Eb_N0_dB/10);
theoryBer_nRx1 = 0.5.*(1-1*(1+1./EbN0Lin).^(-0.5));
p = 1/2 - 1/2*(1+1./EbN0Lin).^(-1/2);
theoryBerMRC_nRx2 = p.^2.*(1+2*(1-p));
close all;
figure(1);
semilogy(Eb_N0_dB,theoryBer_nRx1,'bp-','LineWidth',2);
hold on;
semilogy(Eb_N0_dB,theoryBerMRC_nRx2,'kd-','LineWidth',2);
semilogy(Eb_N0_dB,simBer,'mo-','LineWidth',2);
axis([0 25 10^-5 0.5])
grid on
legend('theory (nTx=1,nRx=1)', 'theory (nTx=2,nRx=2)', 'sim (nTx=2, nRx=2, ML)');
xlabel('Average SNR,dB');
ylabel('Bit Error Rate');
title('BER and SNR for BPSK modulation with 2x2 MIMO and ML equalizer (Rayleigh
channel)');

OUTPUT

RESULT
Thus the MIMO channel model with beamforming on SDR platform was
designed and analyzed.

6b) TRANSMIT BEAMFORMING


AIM
To design and analyze the transmit beamforming on SDR platform

SOFTWARE TOOL REQUIRED


MATLAB 7.1

THEORY
BEAMFORMING
Beamforming has the advantage of limiting interference. Beamforming is a wellknown spatial filtering technique which can be used to direct the communication
transmission or reception energy in the presence of noise and interference. Beamforming
allows the establishment of a communication link between the secondary users by
exploiting the absence of a licensed users communication link in a certain geographical
location, also known as the spatial spectrum holes. The definition of spectrum holes is the
frequency bands which are assigned to primary users, which at a particular time and
specific geographical location are not used by them. The basic idea of beamforming in
cognitive radio is to direct the radio signal to the direction of the destination, and to
minimize the transmission energy towards the primary users. This way we can suppress
the interference caused by the secondary users to the primary users. In a multiple-antenna
system, beamforming exploits channel knowledge in the transmitter to maximize the
signal-to-noise ratio (SNR) at the receiver.

CODING
clear all;
close all;
clc;
N = 10^6 % number of bits or symbols
% Transmitter
ip = rand(1,N)>0.5; % generating 0,1 with equal probability
s = 2*ip-1; % BPSK modulation 0 -> -1; 1 -> 0
nTx = 2;
Eb_N0_dB = [0:35]; % multiple Eb/N0 values
for ii = 1:length(Eb_N0_dB)
n = 1/sqrt(2)*[randn(1,N) + j*randn(1,N)]; % white gaussian noise, 0dB variance

h = 1/sqrt(2)*[randn(nTx,N) + j*randn(nTx,N)]; % Rayleigh channel


sr = (1/sqrt(nTx))*kron(ones(nTx,1),s);

% Channel noise and Noise addition


hEff = h.*exp(-j*angle(h));
y1 = sum(h.*sr,1) + 10^(-Eb_N0_dB(ii)/20)*n;
y2 = sum(hEff.*sr,1) + 10^(-Eb_N0_dB(ii)/20)*n;
% equalization
y1Hat = y1./sum(h,1);
y2Hat = y2./sum(hEff,1);
% receiver - hard decision decoding
ip1Hat = real(y1Hat)>0;
ip2Hat = real(y2Hat)>0;
% counting the errors
nErr1(ii) = size(find([ip- ip1Hat]),2);
nErr2(ii) = size(find([ip- ip2Hat]),2);
end
simBer1 = nErr1/N; % simulated ber (no beam forming)
simBer2 = nErr2/N; % simulated ber (with beam forming)
theoryBerAWGN = 0.5*erfc(sqrt(10.^(Eb_N0_dB/10))); % theoretical ber
EbN0Lin = 10.^(Eb_N0_dB/10);
theoryBer = 0.5.*(1-sqrt(EbN0Lin./(EbN0Lin+1)));
p = 1/2 - 1/2*(1+1./EbN0Lin).^(-1/2);
theoryBer_nRx2 = p.^2.*(1+2*(1-p));
close all;
figure;
semilogy(Eb_N0_dB,theoryBer,'bp-','LineWidth',2);
hold on
semilogy(Eb_N0_dB,simBer1,'ys-','LineWidth',2);
semilogy(Eb_N0_dB,theoryBer_nRx2,'gp-','LineWidth',2);
semilogy(Eb_N0_dB,simBer2,'mx-','LineWidth',2);
axis([0 35 10^-5 0.5])
grid on
legend('1tx-1rx (theory)','2tx-1rx (no beamforming-sim)','1tx-2rx (mrc-theory)','2tx-1rx
(beamforming-sim)');
xlabel('Eb/No, dB');
ylabel('Bit Error Rate');
title('BER for BPSK modulation in Rayleigh channel');

OUTPUT
N=1000000

RESULT
Thus the transmit beam forming on SDR platform was designed and analyzed.

Das könnte Ihnen auch gefallen