-
Hi all, # Frequency-averaging between adjacent channel estimates
# Compute number of elements across which frequency averaging should
# be done. This includes the zeroed elements.
n = 2*self._num_cdm_groups_without_data
k = int(h_hat.shape[-1]/n) # Second dimension
# Reshape last dimension to [k, n]
h_hat = split_dim(h_hat, [k, n], 5)
cond = tf.abs(h_hat)>0 # Mask for irrelevant channel estimates
h_hat = tf.reduce_sum(h_hat, axis=-1, keepdims=True) \
/ tf.cast(2,h_hat.dtype)
h_hat = tf.repeat(h_hat, n, axis=-1)
h_hat = tf.where(cond, h_hat, 0) # Mask irrelevant channel estimates
h_hat = tf.reshape(h_hat, h_ls_shape)
# The error variance gets reduced by a factor of two
err_var /= tf.cast(2, err_var.dtype)
return h_hat, err_var From what I understand, My question is: Why is the division fixed at 2? Shouldn't the result be divided by |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Hi @LiPtP0000, It is a long time that I have written this code, but I think that what you are missing is the part that comes before: # (Optional) Time-averaging across adjacent DMRS OFDM symbols
if self._dmrs_length==2:
# Reshape last dim to [num_dmrs_syms, num_pilots_per_dmrs_sym]
h_hat = split_dim(h_hat, [self._num_dmrs_syms,
self._num_pilots_per_dmrs_sym], 5)
# Average adjacent DMRS symbols in time domain
h_hat = (h_hat[...,0::2,:]+h_hat[...,1::2,:]) \
/ tf.cast(2, h_hat.dtype)
h_hat = tf.repeat(h_hat, 2, axis=-2)
h_hat = tf.reshape(h_hat, h_ls_shape)
# The error variance gets reduced by a factor of two
err_var /= tf.cast(2, err_var.dtype)
# Frequency-averaging between adjacent channel estimates
# Compute number of elements across which frequency averaging should
# be done. This includes the zeroed elements.
n = 2*self._num_cdm_groups_without_data
k = int(h_hat.shape[-1]/n) # Second dimension
# Reshape last dimension to [k, n]
h_hat = split_dim(h_hat, [k, n], 5)
cond = tf.abs(h_hat)>0 # Mask for irrelevant channel estimates
h_hat = tf.reduce_sum(h_hat, axis=-1, keepdims=True) \
/ tf.cast(2,h_hat.dtype)
h_hat = tf.repeat(h_hat, n, axis=-1)
h_hat = tf.where(cond, h_hat, 0) # Mask irrelevant channel estimates
h_hat = tf.reshape(h_hat, h_ls_shape)
# The error variance gets reduced by a factor of two
err_var /= tf.cast(2, err_var.dtype) You average over two adjacent channel estimates in frequency and (optionally) over two adjacent estimates in the time domain. |
Beta Was this translation helpful? Give feedback.
-
Thanks for your reply. However, if Consider a double-symbol type 2 DMRS scheme with I am also confused about the physical meanings of |
Beta Was this translation helpful? Give feedback.
Yes, this is almost correct. Keep in mind that there are far more pilots per port across a full OFDM symbol than two.
You either have pilots on every other subcarrier (i.e. six pilots per PRB) or two adjacent subcarriers every six subcarriers (i.e., 4 pilots per PRB).
Here is the relevant extract from the tutorial that it explains this: