While MFM comes with higher-level objects like the
network_mfm objects, it can also be used in a pretty low-level sense as a channel generator.
In this guide, we outline how to use MFM’s
channel objects to easily realize channels, which can be particularly useful in simulations.
Creating the Channel
Suppose we wish to create a channel for simulation.
c = channel.create(type)
type is the string identifier for the channel we wish to create.
Setting up the Channel
Once created, we need to perform an initial setup of the channel before beginning to use it.
Let us begin by setting the carrier frequency to
fc Hz and the propagation velocity to
Then, suppose we have transmit antennas and receive antennas. Then we can create two arrays via
atx = array(Nt) arx = array(Nr)
Note that in cases where the actual array geometry is immaterial, creating uniform linear arrays can be used without loss of generality.
Then, to set the arrays of
c, we can use
Any remaining setup can be executed before proceeding.
Now that the channel
c has been created, we can use it to generate channel realizations.
To create a single channel realization, we can execute
H = c.realization()
H is a channel matrix.
Executing this in a
for-loop exemplifies the conveience of MFM’s channel objects. Generating a channel realization is a single line.
... atx = array(Nt); arx = array(Nr); ... c = channel.create(type); c.set_carrier_frequency(fc); c.set_propagation_velocity(vel); c.set_transmit_array(atx); c.set_receive_array(arx); ... for i = 1:N ... H = c.realization(); ... end