Subclasses:  Ray/Cluster Channel    Rayleigh-Faded Channel   

On This Page

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:

Methods Documentation

H()

Returns the channel matrix.

Usage:
val = H()
Return Values:
val — the channel matrix

Back to methods

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

Back to methods

Nt()

Returns the number of transmit antennas into the channel.

Usage:
val = Nt()
Return Values:
val — the number of transmit antennas into the channel

Back to methods

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

Back to methods

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

Back to methods

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

Back to methods

get_channel_matrix()

Returns the channel matrix.

Usage:
H = get_channel_matrix()
Return Values:
H — channel matrix

Back to methods

initialize()

Initializes a channel.

Usage:
initialize()

Back to methods

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

Back to methods

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

Back to methods

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 input
array_receive — an array object at the channel output

Back to methods

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.

Back to methods

set_channel_matrix(H)

Sets the channel matrix.

Usage:
set_channel_matrix(H)
Input Arguments:
H — channel matrix

Back to methods

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

Back to methods

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

Back to methods

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

Back to methods

set_propagation_velocity(val)

Sets the propagation velocity of the channel.

Usage:
set_propagation_velocity(val)
Input Arguments:
val — propagation velocity (meters/sec)

Back to methods

set_receive_array(array)

Sets the receive array object (LEGACY).

Usage:
set_receive_array(array)
Input Arguments:
array — an array object

Back to methods

set_transmit_array(array)

Sets the transmit array object (LEGACY).

Usage:
set_transmit_array(array)
Input Arguments:
array — an array object

Back to methods

Source

classdef channel < handle
    % CHANNEL A MIMO channel.
    properties
        name; % human-readable identifier
        H; % Nr-by-Nt channel matrix
        Nt; % number of transmit antennas
        Nr; % number of receive antennas
        atx; % transmit array object
        arx; % receive array object
        carrier_frequency; % carrier frequency (Hz)
        carrier_wavelength; % carrier wavelength (m)
        propagation_velocity; % propagation velocity (m/s)
    end
    methods
        function obj = channel(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';
            end
            obj.Nt = 1;
            obj.Nr = 1;
            obj.carrier_frequency = 1;
            obj.carrier_wavelength = 1;
            obj.propagation_velocity = 1;
            obj.name = name;
        end
        
        function set_propagation_velocity(obj,val)
            % SET_PROPAGATION_VELOCITY Sets the propagation velocity of the
            % channel.
            %
            % Usage:
            %  SET_PROPAGATION_VELOCITY(val)
            %
            % Args:
            %  val: propagation velocity (meters/sec)
            obj.propagation_velocity = val;
            obj.carrier_wavelength = val / obj.carrier_frequency;
        end
        
        function set_carrier_frequency(obj,fc)
            % SET_CARRIER_FREQUENCY Sets the carrier frequency of the
            % channel.
            %
            % Usage:
            %  SET_CARRIER_FREQUENCY(fc)
            %
            % Args:
            %  fc: carrier frequency (Hz)
            obj.carrier_frequency = fc;
            obj.carrier_wavelength = obj.propagation_velocity / fc;
        end
        
        function set_transmit_array(obj,array)
            % SET_TRANSMIT_ARRAY Sets the transmit array object. Also sets
            % the number of transmit antennas accordingly.
            % 
            % Usage:
            %  SET_TRANSMIT_ARRAY(array)
            % 
            % Args:
            %  array: an array object
            obj.atx = array;
            obj.Nt = array.Na;
        end
        
        function set_receive_array(obj,array)
            % SET_RECEIVE_ARRAY Sets the receive array object. Also sets
            % the number of receive antennas accordingly.
            % 
            % Usage:
            %  SET_RECEIVE_ARRAY(array)
            % 
            % Args:
            %  array: an array object
            obj.arx = array;
            obj.Nr = array.Na;
        end
        
        function set_channel_matrix(obj,H)
            % SET_CHANNEL_MATRIX Sets the channel matrix.
            %
            % Usage:
            %  SET_CHANNEL_MATRIX(H)
            % 
            % Args:
            %  H: channel matrix
            obj.H = H;
        end
        
        function H = get_channel_matrix(obj)
            % GET_CHANNEL_MATRIX Returns the channel matrix.
            %
            % Usage:
            %  H = GET_CHANNEL_MATRIX()
            % 
            % Returns:
            %  H: channel matrix
            if ~isempty(obj.H)
                H = obj.H;
            else
                H = zeros(obj.Nr,obj.Nt); % so that default is there being no channel
            end
        end
    end
end