Channel
A generic MIMO channel.
obj/channel/channel.m
Subclasses: Ray/Cluster Channel Rayleigh-Faded Channel
On This Page
- About
- Video Tutorial
- Creating a Channel
- Key Properties
- Setting the Transmit and Receive Arrays
- Setting the Carrier Frequency
- Setting the Propagation Velocity
- Forcing Channel Energy Normalization
- Shorthand Methods
- List of Properties
- List of Methods
- Methods Documentation
About
The channel
object represents a generic MIMO channel. It does not hold any value in representing a particular channel model but rather acts as the foundation for all other channel models within MFM.
MFM currently only supports frequency-flat channels, meaning the channel can be largely characterized by a single matrix . Support for frequency-selectivity may exist in future releases of MFM.
Video Tutorial
Creating a Generic Channel
While the channel
object on its own isn’t all that useful, it can be created via
c = channel.create()
As mentioned, more useful channel models are subclasses of the channel
object, meaning they will inherit the properties and methods of the channel
object. Moreover, the channel
object includes some of the key setup functions that most—if not all—other channel objects will use.
Key Properties
The channel
object (and its subclasses) contain the following important properties.
Each channel
requires knowledge of the transmit array at the channel input, which is captured in
c.array_transmit
Similarly, the receive array at the channel output is captured in
c.array_receive
The number of antennas at the transmit array and receive array, respectively, are captured by the properties
c.num_antennas_transmit
c.num_antennas_receive
The carrier frequency (in Hertz), carrier wavelength (in wavelengths), and propagation velocity (in meters per second) of the channel—more accurately, of the signals we are interested in—are captured by
c.carrier_frequency
c.carrier_wavelength
c.propagation_velocity
While not all channel models require knowledge of these three properties (e.g., a Rayleigh-faded channel), several channels do and thus, for simplicity, MFM includes them in the generic channel
object.
Finally, the channel matrix is stored in
c.channel_matrix
Setting the Transmit and Receive Arrays
To set the transmit and receive arrays of a channel
object c
, simply use
c.set_arrays(atx,arx)
where atx
and arx
are array
objects corresponding to the antenna arrays at the channel input and output, respectively.
To set the transmit and receive arrays individually, one can use
c.set_array_transmit(atx)
c.set_array_receive(arx)
Upon setting the transmit array and receive array, the number of transmit antennas (c.num_antennas_transmit
) and the number of receive antennas (c.num_antennas_receive
) are automatically updated based on the number of elements in the array
objects.
While the channel is aware of the transmit and receive arrays, it is important to note that the channel represents solely the over-the-air propagation and does not account for any phase profiles inherent to the arrays themselves. At the very least, the channel
object will merely take note of the number of antennas at the transmit array and receive array. Some channel models (e.g., the ray/cluster channel model) use the transmit and receive array
objects to obtain array response vectors.
Setting the Carrier Frequency
To set the carrier frequency of the channel, use
c.set_carrier_frequency(fc)
where fc
is the carrier frequency (in Hz) of the signals into the channel. This will automatically update the carrier wavelength based on the current propagation velocity.
Setting the Propagation Velocity
To set the propagation velocity of the channel, use
c.set_propagation_velocity(vel)
where vel
is the propagation velocity (in m/s) of the signals into the channel.
It is common to use vel = 3e8
for electromagnetic signals, for example.
Since this parameter can be set by the user, MFM may support other communication systems and/or other propagation media, such as underwater acoustics where the propagation velocity is commonly approximated to vel = 1.5e3
for oceanic environments.
Example Setup
A typical channel
object setup looks something similar to
c = channel.create()
c.set_carrier_frequency(fc)
c.set_propagation_velocity(vel)
c.set_arrays(atx,arx)
Forcing Channel Energy Normalization
Sometimes, channel matrices are normalized to a specific energy (Frobenius norm squared). To force MFM to normalize channel matrices to a fixed value, use
c.set_force_channel_energy_normalization(true)
and use
c.set_normalized_channel_energy(val)
where val
is the desired Frobenius norm squared the channel matrices. If not set, the normalized channel energy is equal to the number of elements in the channel matrix (i.e., the product of the number of transmit antennas and the number of receive antennas).
With this, all realized channel matrices will satisfy val
.
By default channels do not normalize the channel matrices.
Shorthand Methods
To provide convenient ways to retrieve common MIMO-related quantities from a channel
object c
, there exist the following so-called shorthand methods.
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
object contains the following properties:
channel.name
channel.channel_matrix
channel.num_antennas_transmit
channel.num_antennas_receive
channel.array_transmit
channel.array_receive
channel.carrier_frequency
channel.carrier_wavelength
channel.propagation_velocity
channel.normalized_channel_energy
channel.force_channel_energy_normalization
List of Methods
The channel
object contains the following methods:
channel.H
Returns the channel matrix.channel.Nr
Returns the number of receive antennas out of the channel.channel.Nt
Returns the number of transmit antennas into the channel.channel.channel
Creates a MIMO channel object.channel.create
Creates a channel object of a specific type.channel.enforce_channel_energy_normalization
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.channel.get_channel_matrix
Returns the channel matrix.channel.initialize
Initializes a channel.channel.set_array_receive
Sets the receive array object. Also sets the number of receive antennas accordingly.channel.set_array_transmit
Sets the transmit array object. Also sets the number of transmit antennas accordingly.channel.set_arrays
Sets the transmit and receive arrays at the input and output of the channel.channel.set_carrier_frequency
Sets the carrier frequency of the channel.channel.set_channel_matrix
Sets the channel matrix.channel.set_force_channel_energy_normalization
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.channel.set_name
Sets the name of the channel.channel.set_normalized_channel_energy
Sets the normalized energy of the channel.channel.set_propagation_velocity
Sets the propagation velocity of the channel.channel.set_receive_array
Sets the receive array object (LEGACY).channel.set_transmit_array
Sets 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(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()
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