Device
A device with transmit and/or receive capability.
obj/device/device.m
On This Page
- About
- Creating a Device
- Key Properties
- Setting the Transmitter
- Setting the Receiver
- Setting the Device Location
- Example Setup
- Checking Device Type
- Passthrough Methods
- Shorthand Methods
- List of Properties
- List of Methods
- Methods Documentation
About
The device
object is used to represent a wireless terminal with transmit and/or receive capability.
device
objects having transmit capability are fittingly referred to as “transmitters”. Those with receive capability are referred to as “receivers”. Those with both transmit and receive capability are termed “transceivers”.
The device
object can be thought of as “one layer above” the transmitter
and receiver
objects within the architecture of MFM.
Creating a Device
To create a device
object, use
d = device.create(type)
where type
is either 'transmitter'
, 'receiver'
, or 'transceiver'
.
By default, this will create a device
object having a fully-digital transmitter
and fully-digital receiver
.
To create a device
with a hybrid digital/analog transmitter (transmitter_hybrid
) and hybrid digital/analog receiver (receiver_hybrid
), use
d = device.create(type,'hybrid')
Key Properties
A device
object d
contains a few important properties.
The transmitter
and receiver
at d
exist (as applicable) in its properties
d.transmitter
d.receiver
The type
property is a string describing the transmit/receive capability of the device
d.type
which can be either 'transmitter'
, 'receiver'
, or 'transceiver'
.
The location of d
is specified by its coordinate
property
d.coordinate
which is a vector representing the coordinate of the device in 3-D space (in meters).
Setting the Transmitter
To set the transmitter at a device
object d
, use
d.set_transmitter(tx)
where tx
is a transmitter
object.
Setting the Receiver
To set the receiver at a device
object d
, use
d.set_receiver(rx)
where rx
is a receiver
object.
Setting the Device Location
The location of a device
object d
can be set using
d.set_coordinate([x,y,z])
where [x,y,z]
is a vector of x, y, and z coordinates (in meters).
Example Setup
The typical setup for a device
object is of the form
d = device.create('transceiver')
d.set_transmitter(tx)
d.set_receiver(rx)
d.set_coordinate([x,y,z])
Checking Device Type
To see if a device
object d
has transmit capability, use
val = d.istransmitter()
To see if it has receive capability, use
val = d.isreceiver()
To see if it has both transmit and receive capability, use
val = d.istransceiver()
where, in all three cases, val
is a boolean if d
has the capability (true
) or not (false
).
Passthrough Methods
Since the device
object contains a transmitter
and/or receiver
, we have supplied so-called passthrough methods that allow the user to set parameters of a device
’s transmitter
and/or receiver
from the device
itself—rather than having to set them at the transmitter
or receiver
.
For example, to set the transmit power of a device
object d
’s transmitter
to 30 dBm, one could use
d.transmitter.set_transmit_power(30,'dBm')
Using the device
’s passthrough methods, this can also be achieved via
d.set_transmit_power(30,'dBm')
For the Transmitter
The following passthrough methods exist pertaining to the transmitter
of device
object d
:
d.set_transmit_symbol_bandwidth(B)
d.set_transmit_num_streams(Ns)
d.set_transmit_symbol(s)
d.set_transmit_array(a)
d.set_transmit_num_rf_chains(Lt)
d.set_transmit_power(P,unit)
d.set_transmit_symbol_covariance(Rs)
d.set_transmit_channel_state_information(csi)
d.set_transmit_strategy(strategy)
d.configure_transmitter(strategy)
For the Receiver
The following passthrough methods exist pertaining to the receiver
of device
object d
:
d.set_receive_symbol_bandwidth(B)
d.set_receive_num_streams(Ns)
d.set_receive_symbol(s)
d.set_received_signal(y)
d.set_receive_array(a)
d.set_receive_num_rf_chains(Lr)
d.set_noise(n)
d.set_noise_power_per_Hz(noise_psd,unit)
d.set_receive_channel_state_information(csi)
d.set_receive_strategy(strategy)
d.configure_receiver(strategy)
For the Transmitter and Receiver
The following passthrough methods can be used to set values at the transmitter
and receiver
of the device
object d
simultaneously:
d.set_symbol_bandwidth(B)
d.set_num_streams(Ns)
d.set_arrays(transmit_array,receive_array)
d.set_num_rf_chains(Lt,Lr)
Shorthand Methods
To provide convenient ways to retrieve common MIMO-related quantities from a device
’s transmitter
and receiver
, there exist the following so-called shorthand methods.
d.F
— Returns the precoding matrix.d.W
— Returns the combining matrix.d.Ns_tx
— Returns the number of streams at the transmitter.d.Ns_rx
— Returns the number of streams at the receiver.d.Nt
— Returns the number of transmit antennas.d.Nr
— Returns the number of receive antennas.d.Ptx
— Returns the transmit energy per symbol (joules per symbol).d.Rs
— Returns the transmit symbol covariance matrix at the transmitter.d.Rn
— Returns the noise covariance matrix at the receiver.d.N0
— Returns the noise energy per symbol at the receiver.d.s_tx
— Returns the transmit symbol.d.s_rx
— Returns the receive symbol.d.x
— Returns the signal vector transmitted from the transmitter.d.y
— Returns the signal vector arriving at the receiver.
List of Properties
The device
object contains the following properties:
device.name
device.type
device.coordinate
device.transmitter
device.receiver
device.marker
device.duplexing
device.source
device.destination
device.carrier_frequency
device.carrier_wavelength
device.propagation_velocity
List of Methods
The device
object contains the following methods:
device.F
Returns the precoding matrix.device.N0
Returns the noise energy per symbol of the receiver.device.Nr
Returns the number of receive antennas.device.Ns_rx
Returns the number of streams at the receiver.device.Ns_tx
Returns the number of streams at the transmitter.device.Nt
Returns the number of transmit antennas.device.Rn
Returns the noise covariance matrix at the receiver.device.Rs
Returns the transmit symbol covariance matrix at the transmitter.device.W
Returns the combining matrix.device.configure_receiver
Configures the device’s receiver according to the current/specified receive strategy, incorporating channel state information as applicable.device.configure_transmitter
Configures the device’s transmitter according to the current/specified transmit strategy, incorporating channel state information as applicable.device.create
Creates a device of specific type.device.device
Creates a device object.device.isreceiver
Returns a boolean indicating if the device has receive capability (i.e., is either a receiver or transceiver type).device.istransceiver
Returns a boolean indicating if the device has transmit and receive capability (i.e., is a transceiver).device.istransmitter
Returns a boolean indicating if the device has transmit capability (i.e., is either a transmitter or transceiver type).device.n
Returns the noise vector (per-antenna).device.s_rx
Returns the receive symbol vector.device.s_tx
Returns the transmit symbol vector.device.set_arrays
Sets the transmit and receive arrays.device.set_carrier_frequency
Sets the carrier frequency of the device.device.set_combiner
Sets the combining matrix used at the receiver.device.set_coordinate
Sets the device’s position in 3-D space.device.set_destination
Sets the destination (the receive device the device aims to serve).device.set_duplexing
Sets the device as either a half-duplex or full-duplex device.device.set_marker
Sets the device marker.device.set_name
Sets the device’s name.device.set_noise
Sets the noise vector at the receive array.device.set_noise_power_per_Hz
Sets the noise power per Hz at the receiver.device.set_num_rf_chains
Sets the number of transmit and receive RF chains at the device.device.set_num_streams
Sets the number of streams at the transmitter and receiver.device.set_precoder
Sets the precoding matrix used at the transmitter.device.set_propagation_velocity
Sets the propagation velocity of the signals the device.device.set_receive_array
Sets the receive array.device.set_receive_channel_state_information
Sets the channel state information at the receiver.device.set_receive_num_rf_chains
Sets the number of receive RF chains at the device.device.set_receive_num_streams
Sets the number of streams at the receiver.device.set_receive_strategy
Sets the receive strategy.device.set_receive_symbol
Sets the receive symbol vector.device.set_receive_symbol_bandwidth
Sets the symbol bandwidth at the receiver.device.set_received_signal
Sets the received vector.device.set_receiver
Sets the receiver for the device.device.set_source
Sets the source (the transmit device the device aims to serve).device.set_symbol_bandwidth
Sets the symbol bandwidth at the transmitter and receiver.device.set_transmit_array
Sets the transmit array.device.set_transmit_channel_state_information
Sets the channel state information at the transmitter.device.set_transmit_num_rf_chains
Sets the number of transmit RF chains at the device.device.set_transmit_num_streams
Sets the number of streams at the transmitter.device.set_transmit_power
Sets the transmit power of the device.device.set_transmit_strategy
Sets the transmit strategy.device.set_transmit_symbol
Sets the transmit symbol vector.device.set_transmit_symbol_bandwidth
Sets the symbol bandwidth at the transmitter.device.set_transmit_symbol_covariance
Sets the transmit covariance of the device.device.set_transmitter
Sets the transmitter for the device.device.set_type
Sets the device as either a fully-digital or hybrid digital/analog transmitter, receiver, or transceiver.device.show_transmit_receive_arrays_3d
Plots the transmit array and receive array in 3-D space.device.turn_off_receive
Turns off the device’s receiver.device.turn_off_transmit
Turns off the device’s transmitter.device.x
Returns the transmitted signal vector.device.y
Returns the received signal vector.
F()
Returns the precoding matrix.
- Usage:
val = F()
- Return Values:
val
— the precoding matrix
N0()
Returns the noise energy per symbol of the receiver.
- Usage:
val = N0()
- Return Values:
val
— the noise energy per symbol
Nr()
Returns the number of receive antennas.
- Usage:
val = Nr()
- Return Values:
val
— the number of receive antennas
Ns_rx()
Returns the number of streams at the receiver.
- Usage:
val = Ns_rx()
- Return Values:
val
— the number of streams at the receiver
Ns_tx()
Returns the number of streams at the transmitter.
- Usage:
val = Ns_tx()
- Return Values:
val
— the number of streams at the transmitter
Nt()
Returns the number of transmit antennas.
- Usage:
val = Nt()
- Return Values:
val
— the number of transmit antennas
Rn()
Returns the noise covariance matrix at the receiver.
- Usage:
val = Rn()
- Return Values:
val
— the noise covariance matrix
Rs()
Returns the transmit symbol covariance matrix at the transmitter.
- Usage:
val = Rs()
- Return Values:
val
— the transmit symbol covariance matrix at the transmitter
W()
Returns the combining matrix.
- Usage:
val = W()
- Return Values:
val
— the combining matrix
configure_receiver(strategy)
Configures the device’s receiver according to the current/specified receive strategy, incorporating channel state information as applicable.
- Usage:
configure_receiver()
configure_receiver(strategy)
- Input Arguments:
strategy
— (optional) receive strategy to use; if not passed, the current receive strategy will be used
configure_transmitter(strategy)
Configures the device’s transmitter according to the current/specified transmit strategy, incorporating channel state information as applicable.
- Usage:
configure_transmitter()
configure_transmitter(strategy)
- Input Arguments:
strategy
— (optional) transmit strategy to use; if not passed, the current transmit strategy will be used
create(type,digital_hybrid)
Creates a device of specific type.
- Usage:
obj = create()
obj = create(type)
obj = create(type,digital_hybrid)
obj = create([],digital_hybrid)
- Input Arguments:
type
— (optional) ‘transmitter’, ‘receiver’, or ‘transceiver’digital_hybrid
— (optional) ‘digital’ or ‘hybrid’- Return Values:
obj
— a device object of the desired type
device(name)
Creates a device object.
- Usage:
obj = device()
obj = device(name)
- Input Arguments:
name
— an optional name for the device- Return Values:
obj
— an object representing a device
isreceiver()
Returns a boolean indicating if the device has receive capability (i.e., is either a receiver or transceiver type).
- Usage:
out = isreceiver()
- Return Values:
out
— a boolean
istransceiver()
Returns a boolean indicating if the device has transmit and receive capability (i.e., is a transceiver).
- Usage:
out = istransceiver()
- Return Values:
out
— a boolean
istransmitter()
Returns a boolean indicating if the device has transmit capability (i.e., is either a transmitter or transceiver type).
- Usage:
out = istransmitter()
- Return Values:
out
— a boolean
n()
Returns the noise vector (per-antenna).
- Usage:
val = n()
- Return Values:
val
— the noise vector (per-antenna)
s_rx()
Returns the receive symbol vector.
- Usage:
val = s_rx()
- Return Values:
val
— the receive symbol vector
s_tx()
Returns the transmit symbol vector.
- Usage:
val = s_tx()
- Return Values:
val
— the transmit symbol vector
set_arrays(transmit_array,receive_array)
Sets the transmit and receive arrays.
- Usage:
set_arrays(transmit_array)
set_arrays(transmit_array,receive_array)
- Input Arguments:
transmit_array
— array object to use at the transmitterreceive_array
— array object to use at the receiver; if not passed, the transmit array is used
set_carrier_frequency(fc)
Sets the carrier frequency of the device.
- Usage:
set_carrier_frequency(fc)
- Input Arguments:
fc
— carrier frequency (Hz)- Notes:
- Also updates carrier wavelength.
set_combiner(W)
Sets the combining matrix used at the receiver.
- Usage:
set_combiner(W)
- Input Arguments:
W
— a combining matrix
set_coordinate(x,y,z,move_arrays)
Sets the device’s position in 3-D space.
- Usage:
set_coordinate()
set_coordinate(x)
set_coordinate(x,y)
set_coordinate(x,y,z)
set_coordinate(x,y,z,move_arrays)
- Input Arguments:
x
— x-coordinate of the device’s positiony
— y-coordinate of the device’s positionz
— z-coordinate of the device’s positionmove_arrays
— (optional) a boolean indicating if the array(s) should be moved (relatively) to the new coordinate; if not passed, true is used- Notes:
- If no arguments are passed, the device’s current coordinate will be used.
- If only x and y are given, z is taken to be 0. Both x and y need to be singletons.
- If only x is given and is a singleton, y and z are taken to be 0. If only x is given and has two elements, y = x(2), x = x(1), and z = 0. If only x is given and has three elements, z = x(3), y = x(2), and x = x(1).
- All other options are invalid.
- When the arrays are shifted according to the device coordinate, they are shifted relative to the device’s previous location. This maintains any relative geometry between the transmit and receive arrays, assuming they have already been added to the device before its coordinate is set.
set_destination(device_destination)
Sets the destination (the receive device the device aims to serve).
- Usage:
set_destination(device_destination)
- Input Arguments:
device_destination
— a device object
set_duplexing(duplex)
Sets the device as either a half-duplex or full-duplex device.
- Usage:
set_duplexing(duplex)
- Input Arguments:
duplex
— either ‘half’ or ‘full’, specifying the duplexing nature of the device- Notes:
- Setting the device to be full-duplex does not bestow it the ability to transmit and receive simultaneously and in-band losslessly, but rather sets it to attempt to. Its performance when doing so will depend on the design of the transmitter and receiver.
set_marker(marker)
Sets the device marker.
- Usage:
set_marker(marker)
- Input Arguments:
marker
— a MATLAB-compliant plot marker
set_name()
Sets the device’s name.
- Usage:
set_name()
set_name(name)
set_noise(n)
Sets the noise vector at the receive array.
- Usage:
set_noise()
set_noise(n)
- Input Arguments:
n
— (optional) a noise vector; if not passed, noise will be generated according to the noise power
set_noise_power_per_Hz(noise_psd,unit)
Sets the noise power per Hz at the receiver.
- Usage:
set_noise_power_per_Hz(noise_psd)
set_noise_power_per_Hz(noise_psd,unit)
- Input Arguments:
noise_psd
— the noise power spectral densityunit
— (optional) a string specifying the units of noise_psd (e.g., ‘dBm_Hz’ or ‘watts_Hz’); if not passed, the default will be used
set_num_rf_chains(Lt,Lr)
Sets the number of transmit and receive RF chains at the device.
- Usage:
set_num_rf_chains(Lt,Lr)
- Input Arguments:
Lt
— number of transmit RF chainsLr
— (optional) number of receive RF chains; if not passed, the number of transmit RF chains is used
set_num_streams(num_streams)
Sets the number of streams at the transmitter and receiver.
- Usage:
set_num_streams(num_streams)
- Input Arguments:
num_streams
— number of streams to multiplex at the transmitter and receiver
set_precoder(F)
Sets the precoding matrix used at the transmitter.
- Usage:
set_precoder(F)
- Input Arguments:
F
— a precoding matrix
set_propagation_velocity(val)
Sets the propagation velocity of the signals the device.
- Usage:
set_propagation_velocity(val)
- Input Arguments:
val
— propagation velocity (meters/sec)
set_receive_array(array)
Sets the receive array.
- Usage:
set_receive_array(array)
- Input Arguments:
array
— array object to use at the receiver
set_receive_channel_state_information(csi)
Sets the channel state information at the receiver.
- Usage:
set_receive_channel_state_information(csi)
- Input Arguments:
csi
— a struct of channel state information
set_receive_num_rf_chains(Lr)
Sets the number of receive RF chains at the device.
- Usage:
set_receive_num_rf_chains(Lr)
- Input Arguments:
Lr
— number of receive RF chains
set_receive_num_streams(Ns)
Sets the number of streams at the receiver.
- Usage:
SET_NUM_STREAMS(Ns)
- Input Arguments:
Ns
— number of streams to multiplex at the receiver
set_receive_strategy(strategy)
Sets the receive strategy.
- Usage:
set_receive_strategy(strategy)
- Input Arguments:
strategy
— a string specifying the receive strategy
set_receive_symbol(s)
Sets the receive symbol vector.
- Usage:
set_receive_symbol(s)
- Input Arguments:
s
— receive symbol vector
set_receive_symbol_bandwidth(B)
Sets the symbol bandwidth at the receiver.
- Usage:
set_receive_symbol_bandwidth(B)
- Input Arguments:
B
— the symbol bandwidth (in Hertz)
set_received_signal(y)
Sets the received vector.
- Usage:
set_received_signal(y)
- Input Arguments:
y
— received signal vector
set_receiver(rx)
Sets the receiver for the device.
- Usage:
set_receiver(rx)
- Input Arguments:
rx
— a receiver object
set_source(device_source)
Sets the source (the transmit device the device aims to serve).
- Usage:
set_source(device_source)
- Input Arguments:
device_source
— a device object
set_symbol_bandwidth(B)
Sets the symbol bandwidth at the transmitter and receiver.
- Usage:
set_symbol_bandwidth(B)
- Input Arguments:
B
— the symbol bandwidth (in Hertz)
set_transmit_array(array)
Sets the transmit array.
- Usage:
set_transmit_array(array)
- Input Arguments:
array
— array object to use at the transmitter
set_transmit_channel_state_information(csi)
Sets the channel state information at the transmitter.
- Usage:
set_transmit_channel_state_information(csi)
- Input Arguments:
csi
— a struct of channel state information
set_transmit_num_rf_chains(Lt)
Sets the number of transmit RF chains at the device.
- Usage:
set_transmit_num_rf_chains(Lt)
- Input Arguments:
Lt
— number of transmit RF chains
set_transmit_num_streams(Ns)
Sets the number of streams at the transmitter.
- Usage:
SET_NUM_STREAMS(Ns)
- Input Arguments:
Ns
— number of streams to multiplex at the transmitter
set_transmit_power(P,unit)
Sets the transmit power of the device.
- Usage:
set_transmit_power(P)
set_transmit_power(P,unit)
- Input Arguments:
P
— transmit power (e.g., in watts or dBm)unit
— (optional) a string specifying the units of P (e.g., ‘dBm’); if not passed, the default is used.
set_transmit_strategy(strategy)
Sets the transmit strategy.
- Usage:
set_transmit_strategy(strategy)
- Input Arguments:
strategy
— a string specifying the transmit strategy
set_transmit_symbol(s)
Sets the transmit symbol vector.
- Usage:
set_transmit_symbol(s)
- Input Arguments:
s
— transmit symbol vector
set_transmit_symbol_bandwidth(B)
Sets the symbol bandwidth at the transmitter.
- Usage:
set_transmit_symbol_bandwidth(B)
- Input Arguments:
B
— the symbol bandwidth (in Hertz)
set_transmit_symbol_covariance(Rs)
Sets the transmit covariance of the device.
- Usage:
set_transmit_symbol_covariance(Rs)
- Input Arguments:
Rs
— a covariance matrix
set_transmitter(tx)
Sets the transmitter for the device.
- Usage:
set_transmitter(tx)
- Input Arguments:
tx
— a transmitter object
set_type(type,dh)
Sets the device as either a fully-digital or hybrid digital/analog transmitter, receiver, or transceiver.
- Usage:
set_type(type)
set_type(type,dh)
- Input Arguments:
type
— a string specifying the type of device; either ‘transmitter’, ‘receiver’, or ‘transceiver’dh
— a string specifying the digital or hybrid digital/analog beamforming nature of the device; either ‘digital’ or ‘hybrid’- Notes:
- Overwrites any existing transmitter or receiver that is present in the device.
show_transmit_receive_arrays_3d(fignum)
Plots the transmit array and receive array in 3-D space.
- Usage:
[fig,ax] = show_transmit_receive_arrays_3d()
[fig,ax] = show_transmit_receive_arrays_3d(fignum)
- Input Arguments:
fignum
— optional figure number to use when creating plotting- Return Values:
fig
— a figure handle of the plotax
— an axis handle of the plot
turn_off_receive()
Turns off the device’s receiver.
- Usage:
turn_off_receive()
turn_off_transmit()
Turns off the device’s transmitter.
- Usage:
turn_off_transmit()
x()
Returns the transmitted signal vector.
- Usage:
val = x()
- Return Values:
val
— the transmitted signal vector
y()
Returns the received signal vector.
- Usage:
val = y()
- Return Values:
val
— the received signal vector