Communications System Toolbox 

This example shows how to simulate multipleinput multipleoutput (MIMO) multipath fading channels based on the IEEE® 802.11n channel models for indoor wireless local area networks (WLAN). The example uses a MIMO multipath fading channel System object with two transmit antennas, two receive antennas, and a bell Doppler spectrum object.
On this page… 

IEEE 802.11n Channel Models: Overview 
IEEE 802.11n Channel Models: Overview
The IEEE 802.11n channel models [ 1 ] are designed for indoor wireless local area networks for bandwidths of up to 100 MHz, at frequencies of 2 and 5 GHz. The channel models comprise a set of 6 profiles, labeled A to F, which cover the scenarios of flat fading, residential, residential/small office, typical office, large office, and large space (indoors and outdoors). Each channel model has a path loss model including shadowing, and a MIMO multipath fading model, which describes the multipath delay profile, the spatial properties, the Kfactor distribution, and the Doppler spectrum.
Each channel model has a certain number of taps (one for model A, and 9 to 18 for models BF). Each tap is characterized by a relative delay (with respect to the first path delay). Each model further comprises a number of clusters, which correspond to overlapping subsets of the tap delays. For example, model B has two clusters: cluster 1 corresponds to tap delays 0 to 40 ns (in steps of 10 ns), while cluster 2 corresponds to tap delays 20 to 80 ns (also in steps of 10 ns). Hence, clusters 1 and 2 comprise 5 and 7 tap delays, respectively, and they overlap in 3 tap delays (20, 30 and 40 ns). Each cluster is assigned a set of spatial properties: a mean angle of arrival (AoA), a mean angle of departure (AoD), an angular spread (AS) at the receiver, and an angular spread at the transmitter. These parameters assume the same values for all tap delays pertaining to a given cluster. These parameters determine the transmit and correlation matrices associated with each tap delay.
The IEEE 802.11n channel models make the following assumptions: 1) The power azimuth spectrum (PAS) and the power delay spectrum (PDS) are separable: each tap is modeled independently. 2) The PAS and the Doppler spectrum for each tap are separable: the spatial correlation (correlation matrices) and temporal correlation (Doppler spectrum) for each tap are modeled independently. 3) Each tap is modeled using the Kronecker model for Rician channels, hence it is assumed that the transmit and receive correlation matrices are separable for each tap.
Initialization of SimulationSpecific Parameters
The simulation sampling rate is specified, and kept the same for the remainder of the example. The input to the channel simulator is oversampled by a factor of four.
S = RandStream('swb2712', 'Seed', 12345); % Set a local random number stream M = 2; % Modulation order hModem = modem.pskmod(M); % 2PSK modulator object Rsym = 10e3; % Input symbol rate Rbit = Rsym * log2(M); % Input bit rate Nos = 4; % Oversampling factor Rs = Rbit * Nos; % Input sample rate
The code below constructs a MIMO channel System object according to channel model B of [ 1 ], in nonlineofsight (NLOS) mode.
This channel model has 9 Rayleighfading paths, and each path has a bell Doppler spectrum, with a parameter as specified in the default doppler.bell object.
We use two transmit antennas and two receive antennas. For each path, the transmit and receive correlation matrices are calculated according to the procedure given in [ 1 ], [ 2 ].
tau = [0 10 20 30 40 50 60 70 80] * 1e9; % Path delays, in seconds % Average path gains of cluster 1, in dB pdb1 = [0 5.4 10.8 16.2 21.7 inf inf inf inf]; % Average path gains of cluster 2, in dB pdb2 = [inf inf 3.2 6.3 9.4 12.5 15.6 18.7 21.8]; % Total average path gains for both clusters, in dB pdb = 10*log10(10.^(pdb1/10)+10.^(pdb2/10)); fd = 3; % Maximum Doppler shift for all paths (identical) ds = doppler.bell; % Bell doppler spectrum, with default parameters Nt = 2; % Number of transmit antennas Nr = 2; % Number of receive antennas % Element spacing at the transmit and receive antennas (normalized by the % wavelength) TxSpacing = 0.5; RxSpacing = 0.5; % Spatial parameters on transmitter side: % Angular spreads  Cluster 1 AS_Tx_C1 = [14.4 14.4 14.4 14.4 14.4 inf inf inf inf]; % Angular spreads  Cluster 2 AS_Tx_C2 = [inf inf 25.4 25.4 25.4 25.4 25.4 25.4 25.4]; % Mean angles of departure  Cluster 1 AoD_C1 = [225.1 225.1 225.1 225.1 225.1 inf inf inf inf]; % Mean angles of departure  Cluster 2 AoD_C2 = [inf inf 106.5 106.5 106.5 106.5 106.5 106.5 106.5]; % Spatial parameters on receiver side: % Angular spreads  Cluster 1 AS_Rx_C1 = [14.4 14.4 14.4 14.4 14.4 inf inf inf inf]; % Angular spreads  Cluster 2 AS_Rx_C2 = [inf inf 25.2 25.2 25.2 25.2 25.2 25.2 25.2]; % Mean angles of arrival  Cluster 1 AoA_C1 = [4.3 4.3 4.3 4.3 4.3 inf inf inf inf]; % Mean angles of arrival  Cluster 2 AoA_C2 = [inf inf 118.4 118.4 118.4 118.4 118.4 118.4 118.4]; % Calculation of transmit and receive correlation arrays [TxCorrelationMatrix, RxCorrelationMatrix] = ... calculateCorrMatrix(Nt, Nr, pdb1, pdb2, TxSpacing, RxSpacing, ... AS_Tx_C1, AS_Tx_C2, AoD_C1, AoD_C2, ... AS_Rx_C1, AS_Rx_C2, AoA_C1, AoA_C2); h = comm.MIMOChannel( ... 'SampleRate', Rs, ... 'PathDelays', tau, ... 'AveragePathGains', pdb, ... 'MaximumDopplerShift', fd, ... 'DopplerSpectrum', ds, ... 'TransmitCorrelationMatrix', TxCorrelationMatrix, ... 'ReceiveCorrelationMatrix', RxCorrelationMatrix, ... 'RandomStream', 'mt19937ar with seed', ... 'Seed', 99, ... 'PathGainsOutputPort', true);
The code below simulates the effect of the MIMO channel on a random input sequence.
Nsamp = 1e6/2; % Total number of channel samples Nsamp_f = 1000; % Number of samples per frame Nframes = Nsamp/Nsamp_f; % Number of frames chanOut = zeros(Nsamp, Nr); pathGains = zeros(Nsamp, length(tau), Nt, Nr); for iFrames = 1:Nframes inputSig = modulate(hModem, randi(S, [0 M1], Nsamp_f, Nt)); idx = (1:Nsamp_f)+(iFrames1)*Nsamp_f; [chanOut(idx,:), pathGains(idx,:,:,:)] = step(h, inputSig); end
The Doppler spectrum of the Tx1Rx1 link of the first path is estimated from the complex path gains and plotted.
Hs = spectrum.welch('Hamming', Nsamp/5, 50); figure; psd(Hs, pathGains(:,1,1,1), 'Fs', Rs, 'SpectrumType', 'twosided', 'Centerdc', true); axis([0.01 0.01 80 10]); legend('Simulation');
The theoretical bell Doppler spectrum is overlaid to the estimated Doppler spectrum. We observe a good fit between both.
f = fd:0.01:fd; a = ds.CoeffBell; % Parameters of the bell Doppler spectrum Sd = sqrt(a)/(pi*fd)./(1+a*(f/fd).^2); Sd = Sd * 1/2; % Each receive antenna is assigned half the power hold on; plot(f(Sd>0)/1e3, 10*log10(Sd(Sd>0)), 'k'); legend('Simulation', 'Theory');
The Doppler spectrum for Tx1Rx2 link of the first path is also estimated and compared to the theoretical spectrum. We also observe a good fit between both.
figure; psd(Hs, pathGains(:,1,1,2), 'Fs', Rs, 'SpectrumType', 'twosided', 'Centerdc', true); axis([0.01 0.01 80 10]); legend('Simulation'); hold on; plot(f(Sd>0)/1e3, 10*log10(Sd(Sd>0)), 'k'); legend('Simulation', 'Theory');
For Path 1, we plot the fading envelope waveforms for each transmitreceive link. We can observe a correlation between the fading envelopes
figure; semilogy(abs(pathGains(:,1,1,1)),'b'); hold on; grid on; semilogy(abs(pathGains(:,1,2,1)),'r'); legend('Link Tx1Rx1', 'Link Tx2Rx1'); title('Fading envelopes for the links Tx1Rx1 and Tx2Rx1, for Path 1'); figure; semilogy(abs(pathGains(:,1,1,2)),'b'); hold on; grid on; semilogy(abs(pathGains(:,1,2,2)),'r'); legend('Link Tx1Rx2', 'Link Tx2Rx2'); title('Fading envelopes for the links Tx1Rx2 and Tx2Rx2, for Path 1'); figure; semilogy(abs(pathGains(:,1,1,1)),'b'); hold on; grid on; semilogy(abs(pathGains(:,1,1,2)),'r'); legend('Link Tx1Rx1', 'Link Tx1Rx2'); title('Fading envelopes for the links Tx1Rx1 and Tx1Rx2, for Path 1'); figure; semilogy(abs(pathGains(:,1,2,1)),'b'); hold on; grid on; semilogy(abs(pathGains(:,1,2,2)),'r'); legend('Link Tx2Rx1', 'Link Tx2Rx2'); title('Fading envelopes for the links Tx2Rx1 and Tx2Rx2, for Path 1');
We compute the transmit and receive correlation matrices for the first path. They show a good match with the theoretical values (compare with TxCorrelationMatrix(:,:,1) and RxCorrelationMatrix(:,:,1) calculated earlier).
TxCorrMatrixPath1a = corrcoef(pathGains(:,1,1,1),pathGains(:,1,2,1)).' % Rx antenna 1 TxCorrMatrixPath1b = corrcoef(pathGains(:,1,1,2),pathGains(:,1,2,2)).' % Rx antenna 2 RxCorrMatrixPath1a = corrcoef(pathGains(:,1,1,1),pathGains(:,1,1,2)).' % Tx antenna 1 RxCorrMatrixPath1b = corrcoef(pathGains(:,1,2,1),pathGains(:,1,2,2)).' % Tx antenna 2
TxCorrMatrixPath1a = 1.0000 + 0.0000i 0.5123  0.7060i 0.5123 + 0.7060i 1.0000 + 0.0000i TxCorrMatrixPath1b = 1.0000 + 0.0000i 0.5207  0.6915i 0.5207 + 0.6915i 1.0000 + 0.0000i RxCorrMatrixPath1a = 1.0000 + 0.0000i 0.7349 + 0.1814i 0.7349  0.1814i 1.0000 + 0.0000i RxCorrMatrixPath1b = 1.0000 + 0.0000i 0.7532 + 0.2475i 0.7532  0.2475i 1.0000 + 0.0000i
IEEE P802.11 Wireless LANs, "TGn Channel Models", IEEE 802.1103/940r4, 20040510.
L. Schumacher, K. I. Pedersen, and P. E. Mogensen, "From antenna spacings to theoretical capacities  Guidelines for simulating MIMO systems", Proc. PIMRC Conf., vol. 2, Sep. 2002, pp. 587592.