Contents

comm.RayleighChannel System object

Package: comm

Filter input signal through a Rayleigh multipath fading channel

Description

The RayleighChannel System object™ filters an input signal through a Rayleigh fading channel. The fading processing per link is per the Methodology for Simulating Multipath Fading Channels

To filter an input signal using a Rayleigh multipath fading channel:

  1. Define and set up your Rayleigh channel object. See Construction.

  2. Call step to filter the input signal through a Rayleigh multipath fading channel according to the properties of comm.Rayleighhannel. The behavior of step is specific to each object in the toolbox.

Construction

H = comm.RayleighChannel creates a frequency-selective or frequency-flat multipath Rayleigh fading channel System object, H. This object filters a real or complex input signal through the multipath channel to obtain the channel impaired signal.

H = comm.RayleighChannel(Name,Value) creates a multipath Rayleigh fading channel object, H, with the specified property Name set to the specified Value. You can specify additional name-value pair arguments in any order as (Name1,Value1,...,NameN,ValueN).

Properties

SampleRate

Input signal sample rate (hertz)

Specify the sample rate of the input signal in hertz as a double-precision, real, positive scalar. The default value of this property is 1 Hz.

PathDelays

Discrete path delay vector (seconds)

Specify the delays of the discrete paths in seconds as a double-precision, real, scalar or row vector. The default value of this property is 0.

When you set PathDelays to a scalar, the channel is frequency flat.

When you set PathDelays to a vector, the channel is frequency selective.

AveragePathGains

Average path gain vector (decibels)

Specify the average gains of the discrete paths in decibels as a double-precision, real, scalar or row vector. The default value of this property is 0.

AveragePathGains must have the same size as PathDelays.

NormalizePathGains

Normalize average path gains to 0 dB

Set this property to true to normalize the fading processes such that the total power of the path gains, averaged over time, is 0 dB. The default value of this property is true.

MaximumDopplerShift

Maximum Doppler shift (hertz)

Specify the maximum Doppler shift for all channel paths in hertz as a double-precision, real, nonnegative scalar. The default value of this property is 0.001 Hz.

The Doppler shift applies to all the paths of the channel. When you set the MaximumDopplerShift to 0, the channel remains static for the entire input. You can use the reset method to generate a new channel realization.

The MaximumDopplerShift must be smaller than SampleRate/10/fc for each path, where fc represents the cutoff frequency factor of the path. For most Doppler spectrum types, the value of fc is 1. For Gaussian and BiGaussian Doppler spectrum types, fc is dependent on the Doppler spectrum structure fields. Refer to the Algorithms section for the comm.MIMOChannel System object for more details about how fc is defined.

DopplerSpectrum

Doppler spectrum object(s)

Specify the Doppler spectrum shape for the path(s) of the channel. This property accepts a single Doppler spectrum structure returned from the doppler function or a row cell array of such structures. The maximum Doppler shift value necessary to specify the Doppler spectrum/spectra is given by the MaximumDopplerShift property. This property applies when the MaximumDopplerShift property value is greater than 0. The default value of this property is doppler('Jakes').

If you assign a single Doppler spectrum structure to DopplerSpectrum, all paths have the same specified Doppler spectrum. If the FadingTechnique property is Sum of sinusoids, DopplerSpectrum must be doppler('Jakes'); otherwise, select from the following:

  • doppler('Jakes')

  • doppler('Flat')

  • doppler('Rounded', ...)

  • doppler('Bell', ...)

  • doppler('Asymmetric Jakes', ...)

  • doppler('Restricted Jakes', ...)

  • doppler('Gaussian', ...)

  • doppler('BiGaussian', ...)

If you assign a row cell array of different Doppler spectrum structures (which can be chosen from any of those on the previous list) to DopplerSpectrum, each path has the Doppler spectrum specified by the corresponding structure in the cell array. In this case, the length of DopplerSpectrum must be equal to the length of PathDelays.

To generate C code, specify this property to a single Doppler spectrum structure. The default value of this property is doppler('Jakes').

FadingTechnique

Fading technique used to model the channel

Select between Filtered Gaussian noise and Sum of sinusoids to specify the way in which the channel is modeled. The default value is Filtered Gaussian noise.

NumSinusoids

Number of sinusoids used to model the fading process

The NumSinuoids property is a positive integer scalar that specified the number of sinusoids used in modeling the channel and is available only when the FadingTechnique property is set to Sum of sinusoids. The default value is 48.

InitialTimeSource

Source to control the start time of the fading process

Specify the initial time source as either Property or Input port. This property is available when the FadingTechnique property is set to Sum of sinusoids. When InitialTimeSource is set to Input port, the start time of the fading process is specified using the INITIALTIME input to the step function. The input value can change in consecutive calls to the step function. The default value is Property.

InitialTime

Start time of the fading process

Specify the time offset of the fading process. The InitialTime property is specified in seconds and is a real nonnegative scalar. This property is available when the FadingTechnique property is set to Sum of sinusoids and the InitialTimeSource property is set to Property. The default value is 0.

RandomStream

Source of random number stream

Specify the source of random number stream as one of Global stream | mt19937ar with seed. The default value of this property is Global stream.

If you set RandomStream to Global stream, the current global random number stream is used for normally distributed random number generation. In this case, the reset method only resets the filters.

If you set RandomStream to mt19937ar with seed, the mt19937ar algorithm is used for normally distributed random number generation. In this case, the reset method not only resets the filters but also reinitializes the random number stream to the value of the Seed property.

Seed

Initial seed of mt19937ar random number stream

Specify the initial seed of a mt19937ar random number generator algorithm as a double-precision, real, nonnegative integer scalar. The default value of this property is 73. This property applies when you set the RandomStream property to mt19937ar with seed. The Seed reinitializes the mt19937ar random number stream in the reset method.

PathGainsOutputPort

Enable path gain output (logical)

Set this property to true to output the channel path gains of the underlying fading process. The default value of this property is false.

Visualization

Enable channel visualization

Specify the type of channel visualization to display as one of Off | Impulse response | Frequency response | Impulse and frequency responses | Doppler spectrum. The default value of this property is Off.

SamplesToDisplay

Specify percentage of samples to display

You can specify the percentage of samples to display, since displaying fewer samples will result in better performance at the expense of lower accuracy. Specify the property as one of 10% | 25% | 50% | 100%. This applies when Visualization is set to Impulse response, Frequency response, or Impulse and frequency responses. The default value is 25%.

PathsForDopplerDisplay

Specify path for Doppler display

You can specify an integer scalar which selects the discrete path used in constructing a Doppler spectrum plot. The specified path must be an element of {1, 2, ..., Np}, where Np is the number of discrete paths per link specified in the object. This property applies when Visualization is set to Doppler spectrum. The default value is 1.

Methods

cloneCreate RayleighChannel object with same property values
infoDisplay information about the RayleighChannel object
isLockedLocked status for input attributes and nontunable properties
releaseAllow property value and input characteristics changes
resetReset states of the RayleighChannel object
stepFilter input signal through multipath Rayleigh fading channel

Visualization

 Impulse Response

 Frequency Response

 Doppler Spectrum

Examples

expand all

Produce the Same Outputs Using Two Different Random Number Generation Methods

The Rayleigh Channel System object™ has two methods for random number generation. You can use the current global stream or the mt19937ar algorithm with a specified seed. By interacting with the global stream, the object can produce the same outputs from the two methods.

Create a PSK Modulator System object to modulate randomly generated data.

hMod = comm.PSKModulator;
channelInput = step(hMod,randi([0 hMod.ModulationOrder-1],1024,1));

Create a Rayleigh channel System object.

hRayleighChan = comm.RayleighChannel(...
    'SampleRate',10e3, ...
    'PathDelays',[0 1.5e-4], ...
    'AveragePathGains',[2 3], ...
    'NormalizePathGains',true, ...
    'MaximumDopplerShift',30, ...
    'DopplerSpectrum',{doppler('Gaussian',0.6),doppler('Flat')}, ...
    'RandomStream','mt19937ar with seed', ...
    'Seed',22, ...
    'PathGainsOutputPort',true);

Filter the modulated data using the Rayleigh channel System object, hRayleighChan.

[chanOut1,pathGains1] = step(hRayleighChan, channelInput);

Use global stream for random number generation.

release(hRayleighChan);
hRayleighChan.RandomStream = 'Global stream';

Set the global stream to have the same seed that was specified above.

rng(22)

Filter the modulated data using hRayleighChan for the second time.

[chanOut2,pathGains2] = step(hRayleighChan,channelInput);

Verify that the channel and path gain outputs are the same for two step calls.

display(isequal(chanOut1,chanOut2));
display(isequal(pathGains1,pathGains2));
ans =

     1


ans =

     1

Display Impulse and Frequency Responses of a Rayleigh Channel

This example shows how to create a frequency selective Rayleigh channel and display its impulse and frequency responses.

Set the sample rate to 3.84 MHz and specify path delays and gains using ITU pedestrian B channel parameters. Set the maximum Doppler shift to 50 Hz.

fs = 3.84e6;                                     % Hz
pathDelays = [0 200 800 1200 2300 3700]*1e-9;    % sec
avgPathGains = [0 -0.9 -4.9 -8 -7.8 -23.9];      % dB
fD = 50;                                         % Hz

Create a Rayleigh channel System object with the previously defined parameters and set the Visualization property to Impulse and frequency responses using name-value pairs.

h = comm.RayleighChannel('SampleRate',fs, ...
    'PathDelays',pathDelays, ...
    'AveragePathGains',avgPathGains, ...
    'MaximumDopplerShift',fD, ...
    'Visualization','Impulse and frequency responses');

Generate random binary data and pass it through the Rayleigh channel using the step function. The impulse response plot allows you to easily identify the individual paths and their corresponding filter coefficients. The frequency selective nature of the pedestrian B channel is shown by the frequency response plot.

x = randi([0 1],1000,1);
y = step(h,x);

Generate a Rayleigh Channel Using Sum-of-Sinusoids Technique

This example shows how to generate a Rayleigh channel using the sum-of-sinusoids technique.

Set the channel parameters.

fs = 1000;                % Sample rate (Hz)
pathDelays = [0 2.5e-3];  % Path delays (s)
pathPower = [0 -6];       % Path power (dB)
fD = 5;                   % Maximum Doppler shift (Hz)
numSamples = 1000;        % Number of samples

Create a Rayleigh channel object using a name-value pair to set the FadingTechnique property to Sum of sinusoids.

hChan = comm.RayleighChannel('SampleRate',fs, ...
'PathDelays',pathDelays,'AveragePathGains',pathPower, ...
'MaximumDopplerShift',fD,'FadingTechnique','Sum of sinusoids')
hChan = 

  System: comm.RayleighChannel 

  Properties:
             SampleRate: 1000              
             PathDelays: [0 0.0025]        
       AveragePathGains: [0 -6]            
     NormalizePathGains: true              
    MaximumDopplerShift: 5                 
        DopplerSpectrum: [1x1 struct]      
        FadingTechnique: 'Sum of sinusoids'
           NumSinusoids: 48                
      InitialTimeSource: 'Property'        
            InitialTime: 0                 
           RandomStream: 'Global stream'   
    PathGainsOutputPort: false             
          Visualization: 'Off'             
                                           

Pass data through the Rayleigh channel using the step function.

y = step(hChan,ones(numSamples,1));

Plot the magnitude of the Rayleigh channel output.

t = (0:numSamples-1)'/fs;
plot(t,20*log10(abs(y)))
xlabel('Time (s)')
ylabel('Amplitude')

Selected Bibliography

[1] Oestges, C., and B. Clerckx. MIMO Wireless Communications: From Real-World Propagation to Space-Time Code Design, Academic Press, 2007.

[2] Correira, L. M. Mobile Broadband Multimedia Networks: Techniques, Models and Tools for 4G, Academic Press, 2006.

[3] Kermoal, J. P., L. Schumacher, K. I. Pedersen, P. E. Mogensen, and F. Frederiksen. "A stochastic MIMO radio channel model with experimental validation." IEEE Journal on Selected Areas of Communications. Vol. 20, Number 6, 2002, pp. 1211–1226.

[4] Jeruchim, M., P. Balaban, and K. S. Shanmugan. Simulation of Communication Systems, Second Edition, New York, Kluwer Academic/Plenum, 2000.

[5] Pätzold, Matthias, Cheng-Xiang Wang, and Bjorn Olav Hogstand. "Two New Sum-of-Sinusoids-Based Methods for the Efficient Generation of Multiple Uncorrelated Rayleigh Fading Waveforms." IEEE Transactions on Wireless Communications. Vol. 8, Number 6, 2009, pp. 3122–3131.

Was this topic helpful?