main content

introduction to mimo systems -凯发k8网页登录

this example shows multiple-input-multiple-output (mimo) systems, which use multiple antennas at the transmitter and receiver ends of a wireless communication system. mimo systems are increasingly being adopted in communication systems for the potential gains in capacity they realize when using multiple antennas. multiple antennas use the spatial dimension in addition to the time and frequency ones, without changing the bandwidth requirements of the system.

for a generic communications link, this example focuses on transmit diversity in lieu of traditional receive diversity. using the flat-fading rayleigh channel, it illustrates the concept of orthogonal space-time block coding, which is employable when multiple transmitter antennas are used. it is assumed here that the channel undergoes independent fading between the multiple transmit-receive antenna pairs.

for a chosen system, it also provides a measure of the performance degradation when the channel is imperfectly estimated at the receiver, compared to the case of perfect channel knowledge at the receiver.

part 1: transmit diversity vs. receive diversity

using diversity reception is a well-known technique to mitigate the effects of fading over a communications link. however, it has mostly been relegated to the receiver end. in [ 1 ], alamouti proposes a transmit diversity scheme that offers similar diversity gains, using multiple antennas at the transmitter. this was conceived to be more practical as, for example, it would only require multiple antennas at the base station in comparison to multiple antennas for every mobile in a cellular communications system.

this section highlights this comparison of transmit vs. receive diversity by simulating coherent binary phase-shift keying (bpsk) modulation over flat-fading rayleigh channels. for transmit diversity, we use two transmit antennas and one receive antenna (2x1 notationally), while for receive diversity we employ one transmit antenna and two receive antennas (1x2 notationally).

the simulation covers an end-to-end system showing the encoded and/or transmitted signal, channel model, and reception and demodulation of the received signal. it also provides the no-diversity link (single transmit- receive antenna case) and theoretical performance of second-order diversity link for comparison. it is assumed here that the channel is known perfectly at the receiver for all systems. we run the simulation over a range of eb/no points to generate ber results that allow us to compare the different systems.

we start by defining some common simulation parameters

frmlen = 100;       % frame length
numpackets = 1000;  % number of packets
ebno = 0:2:20;      % eb/no varying to 20 db
n = 2;              % maximum number of tx antennas
m = 2;              % maximum number of rx antennas

and set up the simulation.

% create comm.bpskmodulator and comm.bpskdemodulator system objects(tm)
p = 2;				% modulation order
bpskmod = comm.bpskmodulator;
bpskdemod = comm.bpskdemodulator('outputdatatype','double');
% create comm.ostbcencoder and comm.ostbccombiner system objects
ostbcenc = comm.ostbcencoder;
ostbccomb = comm.ostbccombiner;
% convert eb/no values to snr values. the output of the bpsk modulator
% generates unit power signals.
snr = convertsnr(ebno,"ebno","bitspersymbol",1);
% create comm.errorrate calculator system objects to evaluate ber.
errorcalc1 = comm.errorrate;
errorcalc2 = comm.errorrate;
errorcalc3 = comm.errorrate;
% since the awgn function as well as the randi function use the default
% random stream, the following commands are executed so that the results
% will be repeatable, i.e., same results will be obtained for every run of
% the example. the default stream will be restored at the end of the
% example.
s = rng(55408);
% pre-allocate variables for speed
h = zeros(frmlen, n, m);
ber_nodiver  = zeros(3,length(ebno));
ber_alamouti = zeros(3,length(ebno));
ber_maxratio = zeros(3,length(ebno));
ber_thy2     = zeros(1,length(ebno));
% set up a figure for visualizing ber results
fig = figure;
grid on;
ax = fig.currentaxes;
hold(ax,'on');
ax.yscale = 'log';
xlim(ax,[ebno(1), ebno(end)]);
ylim(ax,[1e-4 1]);
xlabel(ax,'eb/no (db)');
ylabel(ax,'ber');
fig.numbertitle = 'off';
fig.renderer = 'zbuffer';
fig.name = 'transmit vs. receive diversity';
title(ax,'transmit vs. receive diversity');
set(fig, 'defaultlegendautoupdate', 'off');
fig.position = figposition([15 50 25 30]);
% loop over several ebno points
for idx = 1:length(ebno)
    reset(errorcalc1);
    reset(errorcalc2);
    reset(errorcalc3);
    % loop over the number of packets
    for packetidx = 1:numpackets
        % generate data vector per frame
        data = randi([0 p-1], frmlen, 1);
        % modulate data
        moddata = bpskmod(data);
        % alamouti space-time block encoder
        encdata = ostbcenc(moddata);
        % create the rayleigh distributed channel response matrix
        %   for two transmit and two receive antennas
        h(1:n:end, :, :) = (randn(frmlen/2, n, m)   ...
                         1i*randn(frmlen/2, n, m))/sqrt(2);
        %   assume held constant for 2 symbol periods
        h(2:n:end, :, :) = h(1:n:end, :, :);
        % extract part of h to represent the 1x1, 2x1 and 1x2 channels
        h11 = h(:,1,1);
        h21 = h(:,:,1)/sqrt(2);
        h12 = squeeze(h(:,1,:));
        % pass through the channels
        chanout11 = h11 .* moddata;
        chanout21 = sum(h21.* encdata, 2);
        chanout12 = h12 .* repmat(moddata, 1, 2);
        % add awgn
        rxsig11 = awgn(chanout11,snr(idx));
        rxsig21 = awgn(chanout21,snr(idx));
        rxsig12 = awgn(chanout12,snr(idx));
        % alamouti space-time block combiner
        decdata = ostbccomb(rxsig21, h21);
        % ml detector (minimum euclidean distance)
        demod11 = bpskdemod(rxsig11.*conj(h11));
        demod21 = bpskdemod(decdata);
        demod12 = bpskdemod(sum(rxsig12.*conj(h12), 2));
        % calculate and update ber for current ebno value
        %   for uncoded 1x1 system
        ber_nodiver(:,idx)  = errorcalc1(data, demod11);
        %   for alamouti coded 2x1 system
        ber_alamouti(:,idx) = errorcalc2(data, demod21);
        %   for maximal-ratio combined 1x2 system
        ber_maxratio(:,idx) = errorcalc3(data, demod12);
    end % end of for loop for numpackets
    % calculate theoretical second-order diversity ber for current ebno
    ber_thy2(idx) = berfading(ebno(idx), 'psk', 2, 2);
    % plot results
    semilogy(ax,ebno(1:idx), ber_nodiver(1,1:idx), 'r*', ...
             ebno(1:idx), ber_alamouti(1,1:idx), 'go', ...
             ebno(1:idx), ber_maxratio(1,1:idx), 'bs', ...
             ebno(1:idx), ber_thy2(1:idx), 'm');
    legend(ax,'no diversity (1tx, 1rx)', 'alamouti (2tx, 1rx)',...
           'maximal-ratio combining (1tx, 2rx)', ...
           'theoretical 2nd-order diversity');
    drawnow;
end  % end of for loop for ebno
% perform curve fitting and replot the results
fitber11 = berfit(ebno, ber_nodiver(1,:));
fitber21 = berfit(ebno, ber_alamouti(1,:));
fitber12 = berfit(ebno, ber_maxratio(1,:));
semilogy(ax,ebno, fitber11, 'r', ebno, fitber21, 'g', ebno, fitber12, 'b');
hold(ax,'off');
% restore default stream
rng(s);

the transmit diversity system has a computation complexity very similar to that of the receive diversity system.

the resulting simulation results show that using two transmit antennas and one receive antenna provides the same diversity order as the maximal-ratio combined (mrc) system of one transmit antenna and two receive antennas.

also observe that transmit diversity has a 3 db disadvantage when compared to mrc receive diversity. this is because we modeled the total transmitted power to be the same in both cases. if we calibrate the transmitted power such that the received power for these two cases is the same, then the performance would be identical. the theoretical performance of second-order diversity link matches the transmit diversity system as it normalizes the total power across all the diversity branches.

the accompanying functional scripts, and aid further exploration for the interested users.

part 2: space-time block coding with channel estimation

building on the theory of orthogonal designs, tarokh et al. [ 2 ] generalized alamouti's transmit diversity scheme to an arbitrary number of transmitter antennas, leading to the concept of space-time block codes. for complex signal constellations, they showed that alamouti's scheme is the only full-rate scheme for two transmit antennas.

in this section, we study the performance of such a scheme with two receive antennas (i.e., a 2x2 system) with and without channel estimation. in the realistic scenario where the channel state information is not known at the receiver, this has to be extracted from the received signal. we assume that the channel estimator performs this using orthogonal pilot signals that are prepended to every packet [ 3 ]. it is assumed that the channel remains unchanged for the length of the packet (i.e., it undergoes slow fading).

a simulation similar to the one described in the previous section is employed here, which leads us to estimate the ber performance for a space-time block coded system using two transmit and two receive antennas.

again we start by defining the common simulation parameters

frmlen = 100;           % frame length
maxnumerrs = 300;       % maximum number of errors
maxnumpackets = 3000;   % maximum number of packets
ebno = 0:2:12;          % eb/no varying to 12 db
n = 2;                  % number of tx antennas
m = 2;                  % number of rx antennas
plen = 8;               % number of pilot symbols per frame
w = hadamard(plen);
pilots = w(:, 1:n);     % orthogonal set per transmit antenna

and set up the simulation.

% create a comm.mimochannel system object to simulate the 2x2 spatially
% independent flat-fading rayleigh channel
chan = comm.mimochannel( ...
    'maximumdopplershift', 0, ...
    'spatialcorrelationspecification', 'none', ...
    'numtransmitantennas', n, ...
    'numreceiveantennas', m, ...
    'pathgainsoutputport', true);
% change the numreceiveantennas property value of the halamoutidec system
% object to m that is 2
release(ostbccomb);
ostbccomb.numreceiveantennas = m;
% set the global random stream for repeatability
s = rng(55408);
% pre-allocate variables for speed
hest = zeros(frmlen, n, m);
ber_estimate = zeros(3,length(ebno));
ber_known    = zeros(3,length(ebno));
% set up a figure for visualizing ber results
fig = figure;
grid on;
ax = fig.currentaxes;
hold(ax,'on');
ax.yscale = 'log';
xlim(ax,[ebno(1), ebno(end)]);
ylim(ax,[1e-4 1]);
xlabel(ax,'eb/no (db)');
ylabel(ax,'ber');
fig.numbertitle = 'off';
fig.name = 'orthogonal space-time block coding';
fig.renderer = 'zbuffer';
title(ax,'alamouti-coded 2x2 system');
set(fig,'defaultlegendautoupdate','off');
fig.position = figposition([41 50 25 30]);
% loop over several ebno points
for idx = 1:length(ebno)
    reset(errorcalc1);
    reset(errorcalc2);
    % loop till the number of errors exceed 'maxnumerrs'
    % or the maximum number of packets have been simulated
    while (ber_estimate(2,idx) < maxnumerrs) && ...
          (ber_known(2,idx) < maxnumerrs) && ...
          (ber_estimate(3,idx)/frmlen < maxnumpackets)
        % generate data vector per frame
        data = randi([0 p-1], frmlen, 1);
        % modulate data
        moddata = bpskmod(data);
        % alamouti space-time block encoder
        encdata = ostbcenc(moddata);
        % prepend pilot symbols for each frame
        txsig = [pilots; encdata];
        % pass through the 2x2 channel
        reset(chan);
        [chanout, h] = chan(txsig);
        % add awgn
        rxsig = awgn(chanout,snr(idx));
        % channel estimation
        %   for each link => n*m estimates
        hest(1,:,:) = pilots(:,:).' * rxsig(1:plen, :) / plen;
        %   assume held constant for the whole frame
        hest = hest(ones(frmlen, 1), :, :);
        % combiner using estimated channel
        decdataest = ostbccomb(rxsig(plen 1:end,:), hest);
        % combiner using known channel
        decdataknown = ostbccomb(rxsig(plen 1:end,:), ...
                            squeeze(h(plen 1:end,:,:,:)));
        % ml detector (minimum euclidean distance)
        demodest   = bpskdemod(decdataest);      % estimated
        demodknown = bpskdemod(decdataknown);    % known
        % calculate and update ber for current ebno value
        %   for estimated channel
        ber_estimate(:,idx) = errorcalc1(data, demodest);
        %   for known channel
        ber_known(:,idx)    = errorcalc2(data, demodknown);
    end % end of for loop for numpackets
    % plot results
    semilogy(ax,ebno(1:idx), ber_estimate(1,1:idx), 'ro');
    semilogy(ax,ebno(1:idx), ber_known(1,1:idx), 'g*');
    legend(ax,['channel estimated with ' num2str(plen) ' pilot symbols/frame'],...
           'known channel');
    drawnow;
end  % end of for loop for ebno
% perform curve fitting and replot the results
fitberest   = berfit(ebno, ber_estimate(1,:));
fitberknown = berfit(ebno, ber_known(1,:));
semilogy(ax,ebno, fitberest, 'r', ebno, fitberknown, 'g');
hold(ax,'off');
% restore default stream
rng(s)

for the 2x2 simulated system, the diversity order is different than that seen for either 1x2 or 2x1 systems in the previous section.

note that with 8 pilot symbols for each 100 symbols of data, channel estimation causes about a 1 db degradation in performance for the selected eb/no range. this improves with an increase in the number of pilot symbols per frame but adds to the overhead of the link. in this comparison, we keep the transmitted snr per symbol to be the same in both cases.

the accompanying functional script, aids further experimentation for the interested users.

part 3: orthogonal space-time block coding and further explorations

in this final section, we present some performance results for orthogonal space-time block coding using four transmit antennas (4x1 system) using a half-rate code, g4, as per [ 4 ].

we expect the system to offer a diversity order of 4 and will compare it with 1x4 and 2x2 systems, which have the same diversity order also. to allow for a fair comparison, we use quaternary psk with the half-rate g4 code to achieve the same transmission rate of 1 bit/sec/hz.

these results take some time to generate on a single core. if you do not have parallel computing toolbox™ (pct) installed, we load the results from a prior simulation. the functional script is included, which, along with and , was used to generate these results. if pct is installed, these simulations are performed in parallel. in this case the functional scripts , and are used. the user is urged to use these scripts as a starting point to study other codes and systems.

[licensepct,~] = license( 'checkout' , 'distrib_computing_toolbox');
if (licensepct && ~isempty(ver('parallel')))
    ebno = 0:2:20;
    [ber11, ber14, ber22, ber41] = mimoostbcwithpct(100,4e3,ebno);
else
    load ostbcres.mat;
end
% set up a figure for visualizing ber results
fig = figure;
grid on;
ax = fig.currentaxes;
hold(ax,'on');
fig.renderer  = 'zbuffer';
ax.yscale = 'log';
xlim(ax,[ebno(1), ebno(end)]);
ylim(ax,[1e-5 1]);
xlabel(ax,'eb/no (db)');
ylabel(ax,'ber');
fig.numbertitle = 'off';
fig.name = 'orthogonal space-time block coding(2)';
title(ax,'g4-coded 4x1 system and other comparisons');
set(fig,'defaultlegendautoupdate','off');
fig.position = figposition([30 15 25 30]);
% theoretical performance of fourth-order diversity for qpsk
berthy4 = berfading(ebno, 'psk', 4, 4);
% plot results
semilogy(ax,ebno, ber11, 'r*', ebno, ber41, 'ms', ebno, ber22, 'c^', ...
         ebno, ber14, 'ko', ebno, berthy4, 'g');
legend(ax,'no diversity (1tx, 1rx), bpsk', 'ostbc (4tx, 1rx), qpsk', ...
       'alamouti (2tx, 2rx), bpsk', 'maximal-ratio combining (1tx, 4rx), bpsk', ...
       'theoretical 4th-order diversity, qpsk');
% perform curve fitting
fitber11 = berfit(ebno, ber11);
fitber41 = berfit(ebno(1:9), ber41(1:9));
fitber22 = berfit(ebno(1:8), ber22(1:8));
fitber14 = berfit(ebno(1:7), ber14(1:7));
semilogy(ax,ebno, fitber11, 'r', ebno(1:9), fitber41, 'm', ...
         ebno(1:8), fitber22, 'c', ebno(1:7), fitber14, 'k');
hold(ax,'off');
starting parallel pool (parpool) using the 'local' profile ...
connected to the parallel pool (number of workers: 6).

as expected, the similar slopes of the ber curves for the 4x1, 2x2 and 1x4 systems indicate an identical diversity order for each system.

also observe the 3 db penalty for the 4x1 system that can be attributed to the same total transmitted power assumption made for each of the three systems. if we calibrate the transmitted power such that the received power for each of these systems is the same, then the three systems would perform identically. again, the theoretical performance matches the simulation performance of the 4x1 system as the total power is normalized across the diversity branches.

appendix

this example uses the following helper functions:

references

  1. s. m. alamouti, "a simple transmit diversity technique for wireless communications", ieee® journal on selected areas in communications, vol. 16, no. 8, oct. 1998, pp. 1451-1458.

  2. v. tarokh, h. jafarkhami, and a.r. calderbank, "space-time block codes from orthogonal designs", ieee transactions on information theory, vol. 45, no. 5, jul. 1999, pp. 1456-1467.

  3. a.f. naguib, v. tarokh, n. seshadri, and a.r. calderbank, "space-time codes for high data rate wireless communication: mismatch analysis", proceedings of ieee international conf. on communications, pp. 309-313, june 1997.

  4. v. tarokh, h. jafarkhami, and a.r. calderbank, "space-time block codes for wireless communications: performance results", ieee journal on selected areas in communications, vol. 17, no. 3, mar. 1999, pp. 451-460.

网站地图