-
Dear Sionna Team, I follow this example and want to create the downlink MISO transmission. This will cause the transmitter to transmit with only one antenna in my simulation. # Configuration
NUM_UT = 1
NUM_BS = 1
NUM_UT_ANT = 1
NUM_BS_ANT = 32
batch_size = 16
num_bits_per_symbol = 6
coderate = 0.5
# The number of transmitted streams is equal to the number of UT antennas in both uplink and downlink
num_streams_per_tx = NUM_UT_ANT
rx_tx_association=np.array([[1]])
stream_manager = StreamManagement(rx_tx_association, num_streams_per_tx)
# Resource Grid
resource_grid = ResourceGrid(num_ofdm_symbols=14,
fft_size=128,
subcarrier_spacing=30e3,
num_tx=NUM_BS,
num_streams_per_tx=num_streams_per_tx,
cyclic_prefix_length=10,
pilot_pattern="kronecker",
pilot_ofdm_symbol_indices=[2, 11])
# Setup antenna arrays
ut_array = AntennaArray(num_rows=1,
num_cols=int(NUM_UT_ANT/2),
polarization="dual",
polarization_type="VH",
antenna_pattern="38.901",
carrier_frequency=carrier_frequency)
bs_array = AntennaArray(num_rows=4,
num_cols=4,
polarization="dual",
polarization_type="VH",
antenna_pattern="38.901",
carrier_frequency=carrier_frequency)
# Configure the channel model
cdl = CDL(cdl_model="C",
delay_spread=100e-9,
carrier_frequency=3.5e9,
ut_array,
bs_array,
direction="downlink",
min_speed=0.0,
max_speed=25.0)
ofdm_channel = OFDMChannel(channel_model=cdl,
resource_grid=resource_grid,
add_awgn=True,
normalize_channel=True,
return_channel=True)
######################################
## Transmitter
_binary_source = BinarySource()
_n = int(resource_grid.num_data_symbols * num_bits_per_symbol)
_k = int(_n * coderate)
_encoder = LDPC5GEncoder(_k, _n)
_mapper = Mapper("qam", num_bits_per_symbol)
_rg_mapper = ResourceGridMapper(resource_grid)
b = _binary_source([batch_size, NUM_BS, num_streams_per_tx, _k])
print("b = ", b.shape) # (16, 1, 1, 4608)
c = _encoder(b)
print("c = ", c.shape) # (16, 1, 1, 9216)
x = _mapper(c)
print("x = ", x.shape) # (16, 1, 1, 1536)
x_rg = _rg_mapper(x)
print("x_rg = ", x_rg.shape) # (16, 1, 1, 14, 128) The dimension of "x_rg" is (16, 1, 1, 14, 128) but not (16, 1, 32, 14, 128). |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
I even printed out the receiver side and found that there are also issues with the dimensions. # Channel
ebno_db = 5
ebno_db_tf = np.array([ebno_db])
ebno_db_tf = tf.convert_to_tensor(ebno_db_tf, dtype=tf.float32)
no = ebnodb2no(ebno_db_tf, num_bits_per_symbol, coderate)
no_ = expand_to_rank(no, tf.rank(x_rg))
# Receiver
y, h = ofdm_channel([x_rg, no_])
print("y = ", y.shape) # (16, 1, 0, 14, 128)
print("h = ", h.shape) # (16, 1, 0, 1, 32, 14, 128) |
Beta Was this translation helpful? Give feedback.
-
Hi, By having a quick look at your code, I noticed that Could that be the issue? |
Beta Was this translation helpful? Give feedback.
Hi @Mio-TW,
You need to understand that the number of streams is different from the number of antennas a device has. In your code, the user terminal has a single antenna. Therefore, it can only send or receive a single stream. The base station has 32 antennas which means that it could send and receive up to 32 streams. However, as there is only a single user terminal with a single antenna, the base station can also send only a single stream to this terminal.
In the downlink,
x_rg
is the resource grid before precoding by the base station. After precoding, it would have the dimensions that you expect.