def generate_reference_frame(timeslots, subcarriers, active_subcarriers, cp_len, cs_len, alpha=.2): p_seed = utils.generate_seed('awesome preamble') f_seed = utils.generate_seed('awesome frame') subcarrier_map = mapping.get_subcarrier_map(subcarriers, active_subcarriers, dc_free=True) overlap = 2 frame_preamble, x_preamble = preamble.mapped_preamble( p_seed, 'rrc', alpha, active_subcarriers, subcarriers, subcarrier_map, overlap, cp_len, cs_len) d = utils.get_random_qpsk(timeslots * active_subcarriers, f_seed) d_frame = mod_frame = gfdm_modulation.modulate_mapped_gfdm_block( d, timeslots, subcarriers, active_subcarriers, overlap, alpha, dc_free=True) symbol = cyclic_prefix.add_cyclic_starfix(d_frame, cp_len, cs_len) window_ramp = cyclic_prefix.get_raised_cosine_ramp( cs_len, cyclic_prefix.get_window_len(cp_len, timeslots, subcarriers, cs_len)) d_frame = cyclic_prefix.pinch_block(symbol, window_ramp) H = filters.get_frequency_domain_filter('rrc', alpha, timeslots, subcarriers, overlap) return np.concatenate( (frame_preamble, d_frame)), mod_frame, x_preamble, d, H
def get_sync_symbol(pn_symbols, H, K, L, cp_len, ramp_len): M = 2 # fixed for preamble pn_symbols = np.concatenate((pn_symbols, pn_symbols)) D = get_data_matrix(pn_symbols, K, group_by_subcarrier=True) # careful here! group by subcarrier is correct! symbol = x_symbol = gfdm_modulate_block(D, H, M, K, L, compat_mode=False) symbol = add_cyclic_starfix(symbol, cp_len, ramp_len) window_ramp = get_raised_cosine_ramp(ramp_len, get_window_len(cp_len, M, K, ramp_len)) symbol = pinch_block(symbol, window_ramp) return symbol, x_symbol
def generate_reference_frame(timeslots, subcarriers, active_subcarriers, cp_len, cs_len, alpha=.2): p_seed = utils.generate_seed('awesome preamble') f_seed = utils.generate_seed('awesome frame') subcarrier_map = mapping.get_subcarrier_map(subcarriers, active_subcarriers, dc_free=True) overlap = 2 frame_preamble, x_preamble = preamble.mapped_preamble(p_seed, 'rrc', alpha, active_subcarriers, subcarriers, subcarrier_map, overlap, cp_len, cs_len) d = utils.get_random_qpsk(timeslots * active_subcarriers, f_seed) d_frame = mod_frame = gfdm_modulation.modulate_mapped_gfdm_block(d, timeslots, subcarriers, active_subcarriers, overlap, alpha, dc_free=True) symbol = cyclic_prefix.add_cyclic_starfix(d_frame, cp_len, cs_len) window_ramp = cyclic_prefix.get_raised_cosine_ramp(cs_len, cyclic_prefix.get_window_len(cp_len, timeslots, subcarriers, cs_len)) d_frame = cyclic_prefix.pinch_block(symbol, window_ramp) H = filters.get_frequency_domain_filter('rrc', alpha, timeslots, subcarriers, overlap) return np.concatenate((frame_preamble, d_frame)), mod_frame, x_preamble, d, H
def get_gfdm_frame(data, alpha, M, K, L, cp_len, ramp_len): window_len = get_window_len(cp_len, M, K) b = gfdm_modulate_fft(data, alpha, M, K, L) b = add_cyclic_prefix(b, cp_len) window_ramp = get_root_raised_cosine_ramp(ramp_len, window_len) return pinch_block(b, window_ramp)
def get_gfdm_frame(data, alpha, M, K, L, cp_len, ramp_len): window_len = get_window_len(cp_len, M, K) b = gfdm_modulate_fft(data, alpha, M, K, L) b = add_cyclic_prefix(b, cp_len) window_ramp = get_root_raised_cosine_ramp(ramp_len, window_len) return pinch_block(b, window_ramp)