Comments (5)
Hi @DerBambus,
Could you provide a minimal code snippet that reproduces the issue you are observing? Screenshots of your code are not really helpful.
The order of the CIRs is given by their shape [...,num_rx, num_rx_ant, num_tx, num_tx_ant....].
The receivers and transmitters are numbered in the order by which they are added to the scene.
For example, the channel from alicetx to bobrx would have the index [...,1,0,0,0,....].
from sionna.
The following would be the minimal code to reproduce said issue:
simulation_scene = load_scene(<scene_file_name>)
simulation_scene.tx_array = PlanarArray(num_rows=1,
num_cols=1,
vertical_spacing=0.5,
horizontal_spacing=0.5,
pattern="tr38901",
polarization="V")
# Configure antenna array for all receivers
simulation_scene.rx_array = PlanarArray(num_rows=1,
num_cols=1,
vertical_spacing=0.5,
horizontal_spacing=0.5,
pattern="tr38901",
polarization="V")
# Create transmitter
alicetx = Transmitter(name="aliceTX",
position=sender_position,
orientation=[0, 0, 0])
simulation_scene.add(alicetx)
#TODO: rebuild simulation with two transmitters?
bobtx = Transmitter(name="bobTX",
position=receiver_position,
orientation=[0, 0, 0])
simulation_scene.add(bobtx)
# Create a receiver
alicerx = Receiver(name="aliceRX",
position=sender_position,
orientation=[0, 0, 0])
simulation_scene.add(alicerx)
bobrx = Receiver(name="bobRX",
position=receiver_position,
orientation=[0, 0, 0])
simulation_scene.add(bobrx)
## RX points towards TX
bobrx.look_at(alicetx)
alicerx.look_at(bobtx)
simulation_scene.frequency = frequency
simulation_scene.synthetic_array = True
current_paths = simulation_scene.compute_paths()
a, tau = current_paths.cir()
frequencies = subcarrier_frequencies(config.fft_size, config.subcarrier_spacing)
current_cir = cir_to_ofdm_channel(frequencies, a, tau)
current_cir = tf.reshape(current_cir, ((2, 1000))
where <scene_file_name> is the relative path to my scene xml file:
<scene version="2.1.0">
<!-- Defaults, these can be set via the command line: -Darg=value -->
<default name="spp" value="4096"/>
<default name="resx" value="1920"/>
<default name="resy" value="1080"/>
<!-- Camera and Rendering Parameters -->
<integrator type="path">
<integer name="max_depth" value="12"/>
</integrator>
<sensor type="perspective">
<string name="fov_axis" value="x"/>
<float name="fov" value="39.597755"/>
<float name="principal_point_offset_x" value="0.000000"/>
<float name="principal_point_offset_y" value="-0.000000"/>
<float name="near_clip" value="0.100000"/>
<float name="far_clip" value="100.000000"/>
<transform name="to_world">
<rotate x="1" angle="-153.5592908827048"/>
<rotate y="1" angle="-46.691938147394204"/>
<rotate z="1" angle="-179.999991348578"/>
<translate value="7.358891 4.958309 6.925791"/>
</transform>
<sampler type="independent">
<integer name="sample_count" value="$spp"/>
</sampler>
<film type="hdrfilm">
<integer name="width" value="$resx"/>
<integer name="height" value="$resy"/>
</film>
</sensor>
<!-- Materials -->
<bsdf type="twosided" id="mat-itu_concrete">
<bsdf type="principled">
<rgb value="0.800000 0.800000 0.800000" name="base_color"/>
<float name="spec_tint" value="0.000000"/>
<float name="spec_trans" value="0.000000"/>
<float name="metallic" value="0.000000"/>
<float name="anisotropic" value="0.000000"/>
<float name="roughness" value="0.500000"/>
<float name="sheen" value="0.000000"/>
<float name="sheen_tint" value="0.500000"/>
<float name="clearcoat" value="0.000000"/>
<float name="clearcoat_gloss" value="0.173205"/>
<float name="specular" value="0.500000"/>
</bsdf>
</bsdf>
<!-- Emitters -->
<emitter type="point">
<point name="position" x="4.076245307922363" y="5.903861999511719" z="-1.0054539442062378"/>
<rgb value="79.577469 79.577469 79.577469" name="intensity"/>
</emitter>
<!-- Shapes -->
<shape type="ply">
<string name="filename" value="meshes/Plane.ply"/>
<boolean name="face_normals" value="true"/>
<ref id="mat-itu_concrete" name="bsdf"/>
</shape>
</scene> ```
from sionna.
Hi,
I cannot execute this code as there are undefined variables. Could you also please use a scene that is provided with Sionna?
In your updated example, could you please explain clearly which outputs are unexpected?
from sionna.
Sorry my bad, the following code should run normally:
from sionna.rt import load_scene, Transmitter, Receiver, PlanarArray, Camera
from sionna.channel.utils import subcarrier_frequencies
from sionna.channel.utils import cir_to_ofdm_channel
import sionna
import tensorflow as tf
simulation_scene = load_scene(sionna.rt.scene.simple_reflector)
simulation_scene.tx_array = PlanarArray(num_rows=1,
num_cols=1,
vertical_spacing=0.5,
horizontal_spacing=0.5,
pattern="tr38901",
polarization="V")
# Configure antenna array for all receivers
simulation_scene.rx_array = PlanarArray(num_rows=1,
num_cols=1,
vertical_spacing=0.5,
horizontal_spacing=0.5,
pattern="tr38901",
polarization="V")
# Create transmitter
alicetx = Transmitter(name="aliceTX",
position=[0, 0, 1.5],
orientation=[0, 0, 0])
simulation_scene.add(alicetx)
#TODO: rebuild simulation with two transmitters?
bobtx = Transmitter(name="bobTX",
position=[10, 0, 1.5],
orientation=[0, 0, 0])
simulation_scene.add(bobtx)
# Create a receiver
alicerx = Receiver(name="aliceRX",
position=[0, 0, 1.5],
orientation=[0, 0, 0])
simulation_scene.add(alicerx)
bobrx = Receiver(name="bobRX",
position=[10, 0, 1.5],
orientation=[0, 0, 0])
simulation_scene.add(bobrx)
## RX points towards TX
bobrx.look_at(alicetx)
alicerx.look_at(bobtx)
simulation_scene.frequency = 2e9
simulation_scene.synthetic_array = True
current_paths = simulation_scene.compute_paths()
a, tau = current_paths.cir()
frequencies = subcarrier_frequencies(1000, 15e3)
current_cir = cir_to_ofdm_channel(frequencies, a, tau)
current_cir = tf.reshape(current_cir, (4, 1000))
print(current_cir)
When running this code, the tensor with the current cir values looks as follows:
So am I correct in assuming the four values here are in this order?
alice -> alice
bob -> alice
alice -> bob
bob -> bob
If this is the case, I would expect the CIRs of bob -> alice and alice -> bob to be the same, however these values never seem to match (except for channel noise, which currently isn't part of the simulation I believe).
I've tried using different frequencies, different scenes, etc., but the problem seems to persist.
Thank you for your troubles^^
from sionna.
Hi,
The issue in your example is that you are using directive antenna patterns. AliceTX is oriented towards BobRX because the default orientation points toward the positive x-axis. However, BobTX points away from AliceRX which is located in the opposite direction..
If you change the antenna patterns to "iso"
, you get the results you expect. Alternatively, you can make the transmitters to look at the receivers. You would need to add these two lines to your code to achieve this:
## TX points towards RX
bobtx.look_at(alicerx)
alicetx.look_at(bobrx)
from sionna.
Related Issues (20)
- Only import sionna and mitsuba work on Mac and on Arm N1, mitsuba is not even compiling. HOT 2
- In NR PUSCH the longer CP is applied to the first slot in frame instead of first symbol in slot HOT 1
- Error when using @tf.function in release 0.17.0 HOT 1
- Question about channel estimation HOT 1
- How to optimize antenna position using sionna RT HOT 1
- Review required for my pull request #430 HOT 1
- Problem with baseline LS estimator in Neural_Receiver.ipynb HOT 1
- The "No gradients provided for any variable" error occurs when optimizing the position of the antenna with Sionna RT HOT 5
- Paths with zero amplitude and zero phase. HOT 3
- Deprecated Matplotlib Function "matplotlib.cm.get_cmap()" Used in "rederer.py" HOT 2
- SceneObject.postion makes jupyter kernel crashes HOT 3
- Using Sionna for synthetic aperture radar simulation: variance in path propagation delays HOT 1
- Error accessing position of SceneObject HOT 5
- Coverage map power/amplitude path summation and paths phases - question HOT 4
- Jupyter kernel crashes when loading Sionna RT scene on GPU HOT 1
- How to get the phase of each path received by TX? HOT 1
- Support of non-CUDA GPU HOT 2
- How to setup a LLVM environment in Windows... HOT 1
- AttributeError: module 'sionna' has no attribute 'config' HOT 3
- adjust planar array spacing with frequency HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sionna.