Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
EFontesP90 committed Oct 31, 2024
1 parent a81e57d commit 5d7503f
Show file tree
Hide file tree
Showing 11 changed files with 147 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/LLS_from_git.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

49 changes: 47 additions & 2 deletions channel_models/channel_model_tr_38_811.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
"""
File: channel_model_tr_38_811.py
Purpose:
This file comprises the non-terrestrial network (NTN) Channel model fully implementation according to 3gpp tr-38-811.
For a pair tx (a Satellite) and rx (e.g., user equipment), our implementation computes the o2i probability,
o2i losses, los probability, shadowing fading, the angular attenuation, the atmospheric absorption, the path loss,
the fast-fading attenuation and finally the resulting SINR.
Author: Ernesto Fontes Pupo / Claudia Carballo González
Date: 2024-10-30
Version: 1.0.0
SPDX-License-Identifier: Apache-2.0
"""


import math as ma

import numpy as np
Expand All @@ -15,10 +32,38 @@
class Ch_tr_38_811(object):
"""
14/05/2024
Channel implementation according to 3gpp tr-38-811.
Non-terrestrial network (NTN) Channel model fully implementation according to 3gpp tr-38-811.
For a pair tx (a Satellite) and rx (e.g., user equipment), our implementation computes the o2i probability,
o2i losses, los probability, shadowing fading, the angular attenuation, the atmospheric absorption, the path loss,
the fast-fading attenuation and finally the resulting SINR.
Required attributes:
():
(t_now, t_old, speed_rx, speed_tx, ds_angle, rx_coord, tx_coord, channel_model, rx_scenario, tx_antenna_mode, dynamic_los,
elevation_angle, d_sat, h_sat, fc, f_band_rx, outdoor_to_indoor, inside_what, penetration_loss_model,
d_correlation_map_rx, shadowing, n_rb, jakes_map, fast_fading_model,
cable_loss_tx, thermal_noise, bw_rb, rx_noise_figure, fast_fading, tx_power, antenna_gain_tx,
antenna_gain_rx, atmospheric_absorption, desired_delay_spread, fast_fading_los_type, fast_fading_nlos_type, num_rx_ax, num_tx_ax,
rng, rx_antenna_mode, ax_panel_polarization):
Outputs (get_ch_tr_38_811):
ch_outcomes_rx: Dictionary with the main channel outputs: {"t": d_correlation_map_rx["t"],
"x": d_correlation_map_rx["x"],
"y": d_correlation_map_rx["y"],
"elevation_angle": elevation_angle,
"d_3d": d_sat,
"o2i": d_correlation_map_rx["o2i"],
"los": d_correlation_map_rx["los"],
"o2i_loss": d_correlation_map_rx["o2i_loss"],
"shadowing": d_correlation_map_rx["shadowing"],
"path_loss": path_loss,
"angle_att": angle_att,
"atmos_att": atmos_att,
"fast_fading_att": round(np.mean(fast_fading_att), 2),
"sinr": sinr
}
d_correlation_map_rx: Matrix for tracking the movement of each rx and checking the correlation distance over time.
jakes_map: Matrix for storing the multipath components from t-1 (t_old) to t (t_now) avoiding abrupt changes in the
resulting fast-fading attenuation.
"""

Expand Down
42 changes: 38 additions & 4 deletions channel_models/channel_model_tr_38_901.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,27 @@
import math as ma
"""
File: channel_model_tr_38_901.py
Purpose:
This file comprises a terrestrial network (TN) Channel model fully implementation according to 3gpp tr-38-901. For a pair tx (e.g., tbs, abs, or
d2d possible forwarding user) and rx (e.g., user equipment), our implementation computes the o2i probability,
o2i losses, los probability, hb probability and losses, shadowing fading, the angular attenuation, the path loss,
the fast fading attenuation and finally the resulting SINR.
Author: Ernesto Fontes Pupo / Claudia Carballo González
Date: 2024-10-30
Version: 1.0.0
SPDX-License-Identifier: Apache-2.0
"""

# Third-party imports
import math as ma
import numpy as np
from numpy import random
from numpy.random import normal
from scipy.stats import lognorm

# Local application/library-specific imports
import channel_models.ff_model_jakes as jakes
from channel_models import path_loss_models_a2g as pl_a2g
from channel_models import path_loss_models_tr_38_901 as pl_tn
Expand All @@ -18,13 +35,30 @@
class Ch_tr_138_901(object):
"""
14/05/2024
Channel implementation according to 3gpp tr-38-901.
Channel model fully implementation according to 3gpp tr-38-901. For a pair tx (e.g., tbs, abs, or d2d possible
forwarding user) and rx (e.g., user equipment), our implementation computes the o2i probability,
o2i losses, los probability, hb probability and losses, shadowing fading, the angular attenuation, the path loss,
the fast fading attenuation and finally the resulting SINR.
Required attributes:
(channel_model, tx_antenna_mode, shadowing, dynamic_los, dynamic_hb, outdoor_to_indoor, inside_what_o2i, penetration_loss_model,
d_2d, d_3d, h_rx, h_tx, h_ceiling, block_density, fc, d_correlation_map_rx, t_now, t_old,
speed_rx, rx_coord, h_angle, v_angle, v_tilt, n_rb, jakes_map, fast_fading_model, hb_map_rx,
cable_loss_tx, thermal_noise, bw_rb, rx_noise_figure, fast_fading, tx_power, antenna_gain_tx, antenna_gain_rx):
speed_rx, speed_tx, rx_coord, tx_coord, h_angle, v_angle, ds_angle, v_tilt, n_rb, jakes_map, fast_fading_model, hb_map_rx,
cable_loss_tx, thermal_noise, bw_rb, rx_noise_figure, fast_fading, tx_power, antenna_gain_tx, antenna_gain_rx,
atmospheric_absorption, desired_delay_spread, fast_fading_los_type, fast_fading_nlos_type, num_rx_ax, num_tx_ax,
rng, rx_antenna_mode, ax_panel_polarization):
Outputs (get_ch_tr_38_901):
ch_outcomes_rx: Dictionary with the main channel outputs: {"t": d_correlation_map_rx["t"], "x": d_correlation_map_rx["x"],
"y": d_correlation_map_rx["y"], "o2i": d_correlation_map_rx["o2i"], "los": d_correlation_map_rx["los"],
"o2i_loss": d_correlation_map_rx["o2i_loss"], "shadowing": d_correlation_map_rx["shadowing"], "path_loss": path_loss,
"angle_att": angle_att, "hb_attenuation": hb_attenuation, "fast_fading_att": round(np.mean(fast_fading_att), 2),
"sinr": sinr}
d_correlation_map_rx: Matrix for tracking the muvement of each rx and cheking the correlation distance over time.
hb_map_rx: Mapping for tracking if a user is in hb conditions from t-1 (t_old) to t (t_now).
jakes_map: Matrix for storing the multipath components from t-1 (t_old) to t (t_now) avoiding abrupt changes in the
resulting fast-fading attenuation.
"""

Expand Down
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
general_parameters = pd.DataFrame(
[[
-174, # "thermal_noise". The value -174 dBm/Hz is commonly used to represent the thermal noise power spectral density at room temperature (approximately 290K).
10, # "h_ceiling". Considered height of the buildings (in m) for O2I penetration losses computation. Default value: 10 m. TODO make an internal variable
10, # "h_ceiling". Considered height of the buildings (in m). This is only used for InF link modes, and must be equal or lower than 10 meters.
0.2, # "block_density". Human block density, valid when "dynamic_hb" is True. block_density = 1, means that if "dynamic_hb" is True always will be considered hb prenetration attenuation. block_density = 0, means =mpropbability of HB.
"real", # "channel_type": ("real", "awgn"). Used for the link to sstem adaptation proccess and computing the users CQI feedback or using the real BLER (Block Error Rate) curves or the AWGN curves. When FF and Shadowing is considered the chanel type must be always real.
0.1 # "target_bler": typical values (0.1, 0.01). Is the target bler for selecting the CQI of the user.
Expand Down
Binary file added requirements.txt
Binary file not shown.

0 comments on commit 5d7503f

Please sign in to comment.