anomaly-detection-material-parameters-calibration

Sionna param calibration (research proj)
git clone https://git.ea.contact/anomaly-detection-material-parameters-calibration
Log | Files | Refs | README

umi.py (5201B)


      1 #
      2 # SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
      3 # SPDX-License-Identifier: Apache-2.0
      4 #
      5 """Urban microcell (UMi) channel model from 3GPP TR38.901 specification"""
      6 
      7 import tensorflow as tf
      8 
      9 from . import SystemLevelChannel
     10 from . import UMiScenario
     11 
     12 
     13 class UMi(SystemLevelChannel):
     14     # pylint: disable=line-too-long
     15     r"""UMi(carrier_frequency, o2i_model, ut_array, bs_array, direction, enable_pathloss=True, enable_shadow_fading=True, always_generate_lsp=False, dtype=tf.complex64)
     16 
     17     Urban microcell (UMi) channel model from 3GPP [TR38901]_ specification.
     18 
     19     Setting up a UMi model requires configuring the network topology, i.e., the
     20     UTs and BSs locations, UTs velocities, etc. This is achieved using the
     21     :meth:`~sionna.channel.tr38901.UMi.set_topology` method. Setting a different
     22     topology for each batch example is possible. The batch size used when setting up the network topology
     23     is used for the link simulations.
     24 
     25     The following code snippet shows how to setup a UMi channel model operating
     26     in the frequency domain:
     27 
     28     >>> # UT and BS panel arrays
     29     >>> bs_array = PanelArray(num_rows_per_panel = 4,
     30     ...                       num_cols_per_panel = 4,
     31     ...                       polarization = 'dual',
     32     ...                       polarization_type  = 'cross',
     33     ...                       antenna_pattern = '38.901',
     34     ...                       carrier_frequency = 3.5e9)
     35     >>> ut_array = PanelArray(num_rows_per_panel = 1,
     36     ...                       num_cols_per_panel = 1,
     37     ...                       polarization = 'single',
     38     ...                       polarization_type = 'V',
     39     ...                       antenna_pattern = 'omni',
     40     ...                       carrier_frequency = 3.5e9)
     41     >>> # Instantiating UMi channel model
     42     >>> channel_model = UMi(carrier_frequency = 3.5e9,
     43     ...                     o2i_model = 'low',
     44     ...                     ut_array = ut_array,
     45     ...                     bs_array = bs_array,
     46     ...                     direction = 'uplink')
     47     >>> # Setting up network topology
     48     >>> # ut_loc: UTs locations
     49     >>> # bs_loc: BSs locations
     50     >>> # ut_orientations: UTs array orientations
     51     >>> # bs_orientations: BSs array orientations
     52     >>> # in_state: Indoor/outdoor states of UTs
     53     >>> channel_model.set_topology(ut_loc,
     54     ...                            bs_loc,
     55     ...                            ut_orientations,
     56     ...                            bs_orientations,
     57     ...                            ut_velocities,
     58     ...                            in_state)
     59     >>> # Instanting the frequency domain channel
     60     >>> channel = OFDMChannel(channel_model = channel_model,
     61     ...                       resource_grid = rg)
     62 
     63     where ``rg`` is an instance of :class:`~sionna.ofdm.ResourceGrid`.
     64 
     65     Parameters
     66     -----------
     67 
     68         carrier_frequency : float
     69             Carrier frequency in Hertz
     70 
     71         o2i_model : str
     72             Outdoor-to-indoor loss model for UTs located indoor.
     73             Set this parameter to "low" to use the low-loss model, or to "high"
     74             to use the high-loss model.
     75             See section 7.4.3 of [TR38901]_ for details.
     76 
     77         rx_array : PanelArray
     78             Panel array used by the receivers. All receivers share the same
     79             antenna array configuration.
     80 
     81         tx_array : PanelArray
     82             Panel array used by the transmitters. All transmitters share the
     83             same antenna array configuration.
     84 
     85         direction : str
     86             Link direction. Either "uplink" or "downlink".
     87 
     88         enable_pathloss : bool
     89             If `True`, apply pathloss. Otherwise doesn't. Defaults to `True`.
     90 
     91         enable_shadow_fading : bool
     92             If `True`, apply shadow fading. Otherwise doesn't.
     93             Defaults to `True`.
     94 
     95         always_generate_lsp : bool
     96             If `True`, new large scale parameters (LSPs) are generated for every
     97             new generation of channel impulse responses. Otherwise, always reuse
     98             the same LSPs, except if the topology is changed. Defaults to
     99             `False`.
    100 
    101         dtype : Complex tf.DType
    102             Defines the datatype for internal calculations and the output
    103             dtype. Defaults to `tf.complex64`.
    104 
    105     Input
    106     -----
    107 
    108     num_time_steps : int
    109         Number of time steps
    110 
    111     sampling_frequency : float
    112         Sampling frequency [Hz]
    113 
    114     Output
    115     -------
    116         a : [batch size, num_rx, num_rx_ant, num_tx, num_tx_ant, num_paths, num_time_steps], tf.complex
    117             Path coefficients
    118 
    119         tau : [batch size, num_rx, num_tx, num_paths], tf.float
    120             Path delays [s]
    121     """
    122 
    123     def __init__(self, carrier_frequency, o2i_model, ut_array, bs_array,
    124         direction, enable_pathloss=True, enable_shadow_fading=True,
    125         always_generate_lsp=False, dtype=tf.complex64):
    126 
    127         # RMa scenario
    128         scenario = UMiScenario(carrier_frequency, o2i_model, ut_array, bs_array,
    129                                direction, enable_pathloss, enable_shadow_fading,
    130                                dtype)
    131 
    132         super().__init__(scenario, always_generate_lsp)