Rayleigh-Faded Channel
A MIMO channel with Rayleigh-faded entries.
obj/channel/channel_rayleigh.m
Superclass: Channel
On This Page
- About
- Video Tutorial
- Creating a Rayleigh-Faded Channel
- Key Properties
- Invoking a Channel Realization
- Shorthand Methods
- List of Properties
- List of Methods
- Methods Documentation
About
Rayleigh-faded channels are represented by the channel_rayleigh object, which is a subclass of the generic channel object.
A Rayleigh-faded channel is described by the fact that its entries are drawn i.i.d. from a complex Normal distribution with mean 0 and variance 1.
Video Tutorial
Creating a Rayleigh-Faded Channel
A Rayleigh-faded channel can be created via
c = channel.create('Rayleigh')
which will create a channel_rayleigh object c.
The channel_rayeligh object is a subclass of the channel object, meaning it will inherit the properties and methods of the channel object.
Key Properties
The channel_rayleigh object is a subclass of the channel object and thus inherits all of its properties and methods.
It does not contain any important properties beyond those inherited from the channel object, which are summarized below.
c.array_transmit
c.array_receive
c.num_antennas_transmit
c.num_antennas_receive
c.carrier_frequency
c.carrier_wavelength
c.propagation_velocity
c.channel_matrix
Example Setup
The setup of a Rayleigh-faded channel, by virtue of its simplicity, is practically identical to that of a generic channel object, which looks similar to
c = channel.create()
c.set_carrier_frequency(fc)
c.set_propagation_velocity(vel)
c.set_arrays(atx,arx)
where fc is the carrier frequency (in Hz), vel is the propagation velocity (in m/s), and atx and arx are array objects at the channel input and output, respectively.
Invoking a Channel Realization
Generating a realization of the Rayleigh-faded channel c is as simple as executing
H = c.realization()
where H is the realized channel matrix whose entries are drawn i.i.d. from a complex Normal distribution with mean 0 and variance 1.
The channel matrix can also be retrieved via
H = c.get_channel_matrix()
though this does not invoke a new channel realization but rather merely returns the current channel matrix.
Shorthand Methods
The channel_rayleigh object inherits the following shorthand methods from the channel object.
c.H— Returns the channel matrix.c.Nt— Returns the number of transmit antennas at the channel input.c.Nr— Returns the number of receive antennas at the channel output.
List of Properties
The channel_rayleigh object contains the following properties:
channel_rayleigh.namechannel_rayleigh.channel_matrixchannel_rayleigh.num_antennas_transmitchannel_rayleigh.num_antennas_receivechannel_rayleigh.array_transmitchannel_rayleigh.array_receivechannel_rayleigh.carrier_frequencychannel_rayleigh.carrier_wavelengthchannel_rayleigh.propagation_velocitychannel_rayleigh.normalized_channel_energychannel_rayleigh.force_channel_energy_normalization
List of Methods
The channel_rayleigh object contains the following methods:
channel_rayleigh.HReturns the channel matrix.channel_rayleigh.NrReturns the number of receive antennas out of the channel.channel_rayleigh.NtReturns the number of transmit antennas into the channel.channel_rayleigh.channel_rayleighCreates a MIMO channel object.channel_rayleigh.createCreates a channel object of a specific type.channel_rayleigh.enforce_channel_energy_normalizationNormalizes the channel matrix so that its total energy (squared Frobenius norm) is equal the current normalized channel energy property. The default normalized channel energy is the product of the number of transmit antenans and the number of receive antennas.channel_rayleigh.get_channel_matrixReturns the channel matrix.channel_rayleigh.initializeInitializes a channel.channel_rayleigh.realizationRealizes a Rayleigh channel matrix where each entry in the channel matrix is drawn i.i.d. from a complex normal distribution.channel_rayleigh.set_array_receiveSets the receive array object. Also sets the number of receive antennas accordingly.channel_rayleigh.set_array_transmitSets the transmit array object. Also sets the number of transmit antennas accordingly.channel_rayleigh.set_arraysSets the transmit and receive arrays at the input and output of the channel.channel_rayleigh.set_carrier_frequencySets the carrier frequency of the channel.channel_rayleigh.set_channel_matrixSets the channel matrix.channel_rayleigh.set_force_channel_energy_normalizationSets the enforcement of channel energy normalization. If true, the channel matrix will always be normalized such that its energy is of the desired value.channel_rayleigh.set_nameSets the name of the channel.channel_rayleigh.set_normalized_channel_energySets the normalized energy of the channel.channel_rayleigh.set_propagation_velocitySets the propagation velocity of the channel.channel_rayleigh.set_receive_arraySets the receive array object (LEGACY).channel_rayleigh.set_transmit_arraySets the transmit array object (LEGACY).
Methods Documentation
H()
Returns the channel matrix.
- Usage:
val = H()- Return Values:
val— the channel matrix
Nr()
Returns the number of receive antennas out of the channel.
- Usage:
val = Nr()- Return Values:
val— the number of receive antennas out of the channel
Nt()
Returns the number of transmit antennas into the channel.
- Usage:
val = Nt()- Return Values:
val— the number of transmit antennas into the channel
channel_rayleigh(name)
Creates a MIMO channel object.
- Usage:
obj = CHANNEL()obj = CHANNEL(name)- Input Arguments:
name— an optional name for the object- Return Values:
obj— an object representing a MIMO channel
create(type)
Creates a channel object of a specific type.
- Usage:
c = channel.create()c = channel.create(type)- Input Arguments:
type— (optional) a string specifying what type of channel to create- Return Values:
c— a channel object of the type specified
enforce_channel_energy_normalization(H)
Normalizes the channel matrix so that its total energy (squared Frobenius norm) is equal the current normalized channel energy property. The default normalized channel energy is the product of the number of transmit antenans and the number of receive antennas.
- Usage:
G = enforce_channel_energy_normalization()G = enforce_channel_energy_normalization(H)- Input Arguments:
H— (optional) a channel matrix; if not passed, the current channel matrix will be used and overwritten with the normalized version; if passed, the channel matrix property will not be set- Return Values:
G— the normalized channel matrix
get_channel_matrix()
Returns the channel matrix.
- Usage:
H = get_channel_matrix()- Return Values:
H— channel matrix
initialize()
Initializes a channel.
- Usage:
initialize()
realization()
Realizes a Rayleigh channel matrix where each entry in the channel matrix is drawn i.i.d. from a complex normal distribution.
- Usage:
H = realization()- Return Values:
H— a channel matrix whose entries are Rayleigh-faded
set_array_receive(array)
Sets the receive array object. Also sets the number of receive antennas accordingly.
- Usage:
set_array_receive(array)- Input Arguments:
array— an array object
set_array_transmit(array)
Sets the transmit array object. Also sets the number of transmit antennas accordingly.
- Usage:
set_array_transmit(array)- Input Arguments:
array— an array object
set_arrays(array_transmit,array_receive)
Sets the transmit and receive arrays at the input and output of the channel.
- Usage:
set_arrays(array_transmit,array_receive)- Input Arguments:
array_transmit— an array object at the channel inputarray_receive— an array object at the channel output
set_carrier_frequency(fc)
Sets the carrier frequency of the channel.
- Usage:
set_carrier_frequency(fc)- Input Arguments:
fc— carrier frequency (Hz)- Notes:
- Also updates carrier wavelength.
set_channel_matrix(H)
Sets the channel matrix.
- Usage:
set_channel_matrix(H)- Input Arguments:
H— channel matrix
set_force_channel_energy_normalization(force)
Sets the enforcement of channel energy normalization. If true, the channel matrix will always be normalized such that its energy is of the desired value.
- Usage:
set_force_channel_energy_normalization(force)- Input Arguments:
force— a boolean indicating if the channel matrix should be normalized or not
set_name(name)
Sets the name of the channel.
- Usage:
set_name()set_name(name)- Input Arguments:
name— (optional) a string; if not passed, ‘channel’ is the default name used
set_normalized_channel_energy(E)
Sets the normalized energy of the channel.
- Usage:
set_normalized_channel_energy()set_normalized_channel_energy(E)- Input Arguments:
E— (optional) the desired normalized channel energy; if not passed, the product of the number of transmit antennas and the number of receive antennas will be used
set_propagation_velocity(val)
Sets the propagation velocity of the channel.
- Usage:
set_propagation_velocity(val)- Input Arguments:
val— propagation velocity (meters/sec)
set_receive_array(array)
Sets the receive array object (LEGACY).
- Usage:
set_receive_array(array)- Input Arguments:
array— an array object
set_transmit_array(array)
Sets the transmit array object (LEGACY).
- Usage:
set_transmit_array(array)- Input Arguments:
array— an array object
Source
classdef channel_rayleigh < channel
% CHANNEL A Rayleigh-faded channel.
properties
% pass
end
methods
function obj = channel_rayleigh(name)
% CHANNEL Creates a MIMO channel object.
%
% Usage:
% obj = CHANNEL()
% obj = CHANNEL(name)
%
% Args:
% name: an optional name for the object
%
% Returns:
% obj: an object representing a MIMO channel
if nargin < 1 || isempty(name)
name = 'channel-rayleigh';
end
obj.name = name;
end
function H = channel_realization(obj)
% CHANNEL_REALIZATION Realizes a Rayleigh channel matrix
% where each entry in the channel matrix is drawn i.i.d. from a
% complex normal distribution.
%
% Usage:
% H = CHANNEL_REALIZATION()
%
% Returns:
% H: a channel matrix whose entries are Rayleigh-faded
H = cgauss_rv(0,1,obj.Nr,obj.Nt);
obj.set_channel_matrix(H);
end
end
end