rayleighchan

Construct a Rayleigh fading channel object

Syntax

chan = rayleighchan(ts,fd)
chan = rayleighchan(ts,fd,tau,pdb)
chan = rayleighchan

Description

chan = rayleighchan(ts,fd) constructs a frequency-flat ("single path") Rayleigh fading channel object. ts is the sample time of the input signal, in seconds. fd is the maximum Doppler shift, in Hertz. You can model the effect of the channel on a signal x by using the syntax y = filter(chan,x).

chan = rayleighchan(ts,fd,tau,pdb) constructs a frequency-selective ("multiple path") fading channel object that models each discrete path as an independent Rayleigh fading process. tau is a vector of path delays, each specified in seconds. pdb is a vector of average path gains, each specified in dB.

chan = rayleighchan constructs a frequency-flat Rayleigh channel object with no Doppler shift. This is a static channel. The sample time of the input signal is irrelevant for frequency-flat static channels.

Properties

The tables below describe the properties of the channel object, chan, that you can set and that MATLAB sets automatically. To learn how to view or change the values of a channel object, see Viewing Object Properties or Changing Object Properties.

Writeable Properties

PropertyDescription
InputSamplePeriodSample period of the signal on which the channel acts, measured in seconds
MaxDopplerShiftMaximum Doppler shift of the channel, in Hz
PathDelaysVector listing the delays of the discrete paths, in seconds
AvgPathGaindBVector listing the average gain of the discrete paths, in dB
NormalizePathGainsIf 1, the Rayleigh fading process is normalized such that the expected value of the path gains' total power is 1.
StoreHistoryIf 1, channel state information is stored as the channel filter function processes the signal. The default value is 0.
ResetBeforeFilteringIf 1, each call to filter resets the state of chan before filtering. If 0, the fading process maintains continuity from one call to the next.

Read-Only Properties

PropertyDescriptionWhen MATLAB Sets or Updates Value
ChannelTypeFixed value, 'Rayleigh'When you create object
PathGainsComplex vector listing the current gains of the discrete paths. When you create or reset chan, PathGains is a random vector influenced by AvgPathGaindB and NormalizePathGains.When you create object, reset object, or use it to filter a signal
ChannelFilterDelayDelay of the channel filter, measured in samplesWhen you create object or change ratio of InputSamplePeriod to PathDelays
NumSamplesProcessedNumber of samples the channel processed since the last reset. When you create or reset chan, this property value is 0.When you create object, reset object, or use it to filter a signal

Relationships Among Properties

The PathDelays and AvgPathGaindB properties of the channel object must always have the same vector length, because this length equals the number of discrete paths of the channel. If you change the value of PathDelays, then MATLAB truncates or zero-pads the value of AvgPathGaindB if necessary to adjust its vector length. MATLAB might also change the values of read-only properties such as PathGains and ChannelFilterDelay.

Visualization of Channel

The characteristics of a channel can be plotted using the channel visualization tool. See for details.

Examples

Several examples using this function are in Fading Channels.

The example below illustrates that when you change the value of PathDelays, MATLAB automatically changes the values of other properties to make their vector lengths consistent with that of the new value of PathDelays.

c1 = rayleighchan(1e-5,130) % Create object.
c1.PathDelays = [0 1e-6] % Change the number of delays.
% MATLAB automatically changes the size of c1.AvgPathGaindB,
% c1.PathGains, and c1.ChannelFilterDelay.

The output below displays all the properties of the channel object before and after the change in the value of the PathDelays property. Notice that in the second listing of properties, the AvgPathGaindB, PathGains, and ChannelFilterDelay properties all have different values compared to the first listing of properties.

c1 =
 
             ChannelType: 'Rayleigh'
       InputSamplePeriod: 1.0000e-005
         MaxDopplerShift: 130
              PathDelays: 0
           AvgPathGaindB: 0
      NormalizePathGains: 1
            StoreHistory: 0
               PathGains: 0.2104- 0.6197i
      ChannelFilterDelay: 0
    ResetBeforeFiltering: 1
     NumSamplesProcessed: 0

 
c1 =
 
             ChannelType: 'Rayleigh'
       InputSamplePeriod: 1.0000e-005
         MaxDopplerShift: 130
              PathDelays: [0 1.0000e-006]
           AvgPathGaindB: [0 0]
      NormalizePathGains: 1
            StoreHistory: 0
               PathGains: [-0.3088+ 0.1842i 0.3008- 0.0338i]
      ChannelFilterDelay: 4
    ResetBeforeFiltering: 1
     NumSamplesProcessed: 0

Algorithm

This toolbox models a fading channel as a linear FIR filter, with tap weights given by

where

To generate a particular path gain hk, the function performs these steps:

  1. Generates white Gaussian noise

  2. Passes the noise through a filter whose power spectrum corresponds to the Jakes Doppler spectrum

  3. Interpolates values so that the sample period is consistent with that of the signal

  4. Adjusts accordingly to obtain the correct average path gain

See Also

ricianchan, filter, plot (channel), reset, Fading Channels

References

[1] Jeruchim, Michel C., Philip Balaban, and K. Sam Shanmugan, Simulation of Communication Systems, Second Edition, New York, Kluwer Academic/Plenum, 2000.


© 1994-2005 The MathWorks, Inc.