Channel Modeling#

The channel modeling module provides functionalities to model the wireless transmission link between devices on a physical level.

In general, the transmission of any multi-antenna signal

\[\mathbf{x}(t) \in \mathbb{C}^{N_\mathrm{Tx}}\]

considering \(N_\mathrm{Tx}\) transmitted antenna signal streams will lead to an excitation of all \(N_\mathrm{Rx}\) considered reveing antennas

\[\mathbf{y}(t) \in \mathbb{C}^{N_\mathrm{Rx}} \ \text{.}\]

Naturally, this excitation strongly depends on the physical environment and its parameters, for example the transmitted wavelengths, velocities of transmitter and receiver, distance and orientation between transmitter and receiver, environmental scatterers and their respective positions, extents and velocities, just to name a few. The environment assumptions, also referred to as channel model, can be described by a linear system

\[\mathbf{H}(t, \tau) \in \mathbb{C}^{N_\mathrm{Rx} \times N_\mathrm{Tx}} \ \text{,}\]

as a function of time \(t\) and delay \(\tau\). The received antenna signals are then the convolution

\[\mathbf{y}(t) = \int_{-\infty}^{\infty} \mathbf{H}(t, \tau) \mathbf{x}(t - \tau) \,d\tau\]

of the transmitted signals with the channel model. Neither \(\mathbf{H}(t, \tau)\) nor \(\mathbf{x}(t)\) are generally differentiable. Therefore HermesPy models the channel and signals as a discrete-time system instead, sampling the continuous-time models at a rate \(f_\mathrm{s}\). Let

\[\begin{split}\mathbf{X} &= \left[ \mathbf{x}(0), \mathbf{x}(\frac{1}{f_\mathrm{s}}), \dots, \mathbf{x}(\frac{M_\mathrm{Tx} - 1}{f_\mathrm{s}}) \right] \\ &= \left[ \mathbf{x}^{(0)}, \mathbf{x}^{(1)}, \dots, \mathbf{x}^{(M_\mathrm{Tx} - 1)} \right] \in \mathbb{C}^{N_\mathrm{Tx} \times M_\mathrm{Tx}}\end{split}\]

be the uniformly sampled transmitted signal at sampling rate \(f_\mathrm{s}\) consisting of \(M_\mathrm{Tx}\) samples and \(N_\mathrm{Tx}\) antenna signal streams. Equivalently, the received signal can be expressed as

\[\begin{split}\mathbf{Y} &= \left[ \mathbf{y}(0), \mathbf{y}(\frac{1}{f_\mathrm{s}}), \dots, \mathbf{y}(\frac{M_\mathrm{Rx} - 1}{f_\mathrm{s}}) \right] \\ &= \left[ \mathbf{y}^{(0)}, \mathbf{y}^{(1)}, \dots, \mathbf{y}^{(M_\mathrm{Rx} - 1)} \right] \in \mathbb{C}^{N_\mathrm{Rx} \times M_\mathrm{Rx}}\end{split}\]

the uniformly sampled received signal at sampling rate \(f_\mathrm{s}\) consisting of \(M_\mathrm{Rx}\) samples and \(N_\mathrm{Rx}\) antenna signal streams. Sampling the channel model at the same rate in both time and delay

\[\begin{split}\mathbf{H}^{(m, \tau)} = \mathbf{H}\left(\frac{m}{f_\mathrm{s}}, \frac{\tau}{f_\mathrm{s}} \right) \ \text{for} \ \substack{ m = 0 \dots M_\mathrm{Rx} - 1 \\ \tau = 0 \dots M_\mathrm{Rx} - 1 }\end{split}\]

enables the expression of the received signal as a time-discrete convolution of the transmitted signal and the channel model

\[\mathbf{y}^{(m)} = \sum_{\tau = 0}^{m} \mathbf{H}^{(m, \tau)} \mathbf{x}^{(m-\tau)} \ \text{.}\]

Note that many channel models that consider discrete delay taps \(\lbrace \tau_0,\,\dotsc,\,\tau_{\ast} \rbrace\) meaning that the channel is sparse in its delay domain

\[\mathbf{H}(t, \tau) = \mathbf{0} \ \text{for} \ \tau \notin \lbrace \tau_0,\,\dotsc,\,\tau_\ast \rbrace\]

and therefore zero for delays outside the set of discrete taps. Uniformly sampling such models at discrete time-instances results in zero propagation, since the sampling points will not fall directly on the discrete taps. To avoid this, HermesPy requires channel models to resample their delay dimension by either interpolating in between the delays using a sinc-kernel or rounding all delays to the closest sampling tap. This behaviour is controlled by the InterpolationMode flag exposed in several methods.

Each channel model conists of the implementation of a tandem of two abstract base classes: The Channel, which acts as the basic generator, and the Channel Realization, which represents a specific realization of the channel model. The following class diagram visualizes the general interaction:

classDiagram direction LR class Channel { <<Abstract>> realize() _realize() : ChannelRealization propagate() } class ChannelRealization { <<Abstract>> +propagate(Signal) : ChannelPropagation +state() : ChannelStateInformation } class ChannelPropagation { signal : Signal realization : DirectiveChannelRealization } class DirectiveChannelRealization { realization : ChannelRealization propagate(Signal) : Signal } Channel --o ChannelRealization : realize() Channel --o ChannelPropagation : propagate() ChannelRealization --o ChannelPropagation : propagate() ChannelPropagation --o DirectiveChannelRealization : realization ChannelPropagation --* ChannelRealization DirectiveChannelRealization --* ChannelRealization click Channel href "channel.channel.Channel.html" click ChannelRealization href "channel.channel.ChannelRealization.html" click ChannelPropagation href "channel.channel.ChannelPropagation.html" click DirectiveChannelRealization href "channel.channel.DirectiveChannelRealization.html"

Each invocation of a Channel object’s realize or propagate method results in the generation of a new ChannelRealization object representing the channel at a specific point in time. A ChannelRealization fixes the realization of all random variables, meaning calling the Realization’s propagate method with the identical Signal object will always result in the identical ChannelPropagation object. Note that this is not the case for calling the Channel’s propagate method, which internally generates a new ChannelRealization.

Channels always link at least two Simulated Devices, which transmit and receive Signals. The emitted signal is propagated over a ChannelRealization and result in a ChannelPropagation object. The ChannelPropagation contains the propagated Signal and additional information about the propagtion direction (which device transmitted and which device received).

flowchart LR device_alpha_reception[Device Reception] device_alpha[Simulated Device] device_beta_propagation[Channel Propagation] device_alpha_transmission[Device Transmission] subgraph Channel direction TB channel[Channel] --> channel_realization[Channel Realization] end device_beta_transmission[Device Transmission] device_alpha_propagation[Channel Propagation] device_beta[Simulated Device] device_beta_reception[Device Reception] device_alpha_reception --- device_alpha device_alpha --> device_alpha_transmission device_alpha_transmission --> Channel Channel --> device_alpha_propagation --> device_beta device_beta --> device_beta_reception device_alpha --- device_beta_propagation --- Channel --- device_beta_transmission --- device_beta click channel href "channel.channel.Channel.html" click channel_realization href "channel.channel.ChannelRealization.html" click device_alpha_propagation href "channel.channel.ChannelPropagation.html" click device_beta_propagation href "channel.channel.ChannelPropagation.html" click device_alpha href "simulation.simulated_device.SimulatedDevice.html" click device_beta href "simulation.simulated_device.SimulatedDevice.html" click device_alpha_reception "simulation.simulated_device.SimulatedDeviceReception.html" click device_beta_reception "simulation.simulated_device.SimulatedDeviceReception.html" click device_alpha_transmission "simulation.simulated_device.SimulatedDeviceTransmission.html" click device_beta_transmission "simulation.simulated_device.SimulatedDeviceTransmission.html"

Operating the described interface requires the import of a Channel implementation and the Simulated Devices to be linked.

1from hermespy.channel import Channel
2from hermespy.simulation import SimulatedDevice

Note that, since it is an abstract base class, the Channel used in this example cannot be instantiated directly. Instead, a concrete implementation such as the Ideal Channel must be used. Now, the Channel can be linked to the Simulated Devices.

1# Initialize two devices to be linked by a channel
2alpha_device = SimulatedDevice()
3beta_device = SimulatedDevice()
4
5# Create a channel between the two devices
6channel = Channel(alpha_device=alpha_device, beta_device=beta_device)

The basic order to simulate a reciprocal channel transmission, meaning both devices transmit and receive simulataneously, requires the generation of both transmissions, followed by a propagation over a joint channel realization and finally the reception of both propagations.

 1# Generate the device's transmissions
 2alpha_transmission = alpha_device.transmit()
 3beta_transmission = beta_device.transmit()
 4
 5# Propagate the transmissions over the channel
 6channel_realization = channel.realize()
 7alpha_propagation = channel.propagate(alpha_transmission, alpha_device, beta_device)
 8beta_propagation = channel.propagate(beta_transmission, beta_device, alpha_device)
 9
10# Receive the transmissions at both devices
11alpha_reception = alpha_device.receive(beta_propagation)
12beta_reception = beta_device.receive(alpha_propagation)

This snippet is essentially a summary of what is happening within the drop generation of Simulations. However, by default devices won’t generate any waveforms to be transmitted. For example, a SimplexLink transmitting a Root Raised Cosine from the first to the second device can be configured as follows:

1# Configure communication link between the two devices
2link = SimplexLink(alpha_device, beta_device)
3
4# Specify the waveform and postprocessing to be used by the link
5link.waveform = RootRaisedCosineWaveform(symbol_rate=1e8, oversampling_factor=2,
6                                                   num_data_symbols=1000, num_preamble_symbols=10, pilot_rate=10)
7link.waveform.channel_estimation = SingleCarrierLeastSquaresChannelEstimation()
8link.waveform.channel_equalization = SingleCarrierZeroForcingChannelEqualization()

Investigating the performance of the configured waveform over the specific Channel within a Simulation requires the instantiation of a new Simulation and adding the already existing Channel and Simulated Devices.

 1from hermespy.simulation import Simulation
 2
 3# Create a new simulation and add the two existing devices
 4simulation = Simulation()
 5
 6simulation.add_device(alpha_device)
 7simulation.add_device(beta_device)
 8
 9# Configure the simulation to use the appropriate channel
10simulation.set_channel(alpha_device, beta_device, channel)

Now, evaluators such as Bit Error Rate can be added to the simulation pipeline and the Simulation can be executed and the results can be analyzed.

1# Configure a bit error rate evaluation
2simulation.add_evaluator(BitErrorEvaluator(link, link))
3
4# Run the simulation
5simulation.new_dimension('snr', dB(0, 2, 4, 8, 12, 16, 20))
6result = simulation.run()

The channel module consists of the base classes

HermesPy provides serveral purely statistical channel models, which do not assume any spatial correlation between the devices, their antennas or the propagation environment

In addition, geometry-based stochastical and deterministic channel models are provided, which model the propagation environment as a collection of scatterers. Note that these models might require specifying the linked devices position.