You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We aim to use Sionna-RT instead of MATLAB’s raytracer for generating the receiver signal. In MATLAB, the signal for a TX→RX pair is computed using [y, cir] = rtChan(x).
I am currently having trouble understanding how to generate the receiver signal using Sionna for a simple scenario involving a single TX→RX pair.
My attempt is shown in the code below. Is this the correct method to compute the convolution of the channel model h and the input signal x? If so, why doesn’t the output exhibit a time shift beyond l_min, and why is the spectral leakage (as I interpret it) so minimal?
# %%importdrjitasdrimportmitsubaasmiimportmatplotlib.pyplotaspltimportnumpyasnpimportsionna.rtfromsionna.phyimportchannelfromsionna.rtimportload_scene, PlanarArray, Transmitter, Receiver, Camera,\
PathSolver, ITURadioMaterial, SceneObject## Setup scenescene=load_scene(sionna.rt.scene.double_reflector)
epsilon=1/4# pick one longer or two shorter NLOS pathsmatch1:
case0:
offset=0case1:
offset=-20tx_pos=np.array([[-5-epsilon+offset,0,+6]])
rx_pos=np.array([[+5-epsilon,0,+6]])
scene.remove("rx")
scene.remove("tx")
scene.add(Transmitter(f"tx", position=tx_pos[0],display_radius=0.5))
scene.add(Receiver(f"rx", position=rx_pos[0],display_radius=0.5))
# Set the transmit and receive antenna arrays. All tx use the same array, all rx use the same arrayscene.tx_array=PlanarArray(num_cols=1,num_rows=1,pattern="iso",polarization="H")
scene.rx_array=PlanarArray(num_rows=1,num_cols=1,pattern="iso",polarization="H")
## Get pathsp_solver=PathSolver()
paths=p_solver(scene,
max_depth=2,
los=True,
synthetic_array=False,
specular_reflection=True,
diffuse_reflection=False,
diffraction=False,
edge_diffraction=False,
refraction=False)
scene.preview(paths=paths);
# %% Channela,tau=paths.cir()
a_np=a[0].numpy() +1j*a[1].numpy()
tau_np=np.array([tau.numpy()]) # add missing dim for batch_sizenum_tx=1; num_tx_ant=1; l_max=8; l_min=-7;
# h_time = channel.cir_to_time_channel(15e3*2**0, *cir, -7, 8) # not workingh_time=channel.cir_to_time_channel(15e3*2**6, a_np, tau_np, l_min, l_max)
num_time_samples=24;
c=channel.ApplyTimeChannel(num_time_samples, l_max-l_min+1)
batch_size=1;
x=np.zeros([batch_size, num_tx, num_tx_ant, num_time_samples],dtype=complex)
x[...,0] =1y=c(x, h_time)
y_plot=abs(y.numpy().squeeze())
t=np.arange(num_time_samples-l_min+l_max) +l_minplt.stem(t/bandwidth,y_plot)
plt.show()
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
We aim to use Sionna-RT instead of MATLAB’s raytracer for generating the receiver signal. In MATLAB, the signal for a TX→RX pair is computed using
[y, cir] = rtChan(x).I am currently having trouble understanding how to generate the receiver signal using Sionna for a simple scenario involving a single TX→RX pair.
My attempt is shown in the code below. Is this the correct method to compute the convolution of the channel model h and the input signal x? If so, why doesn’t the output exhibit a time shift beyond
l_min, and why is the spectral leakage (as I interpret it) so minimal?Beta Was this translation helpful? Give feedback.
All reactions