Example #1
0
def sync_symbol2(filtertype, alpha, K, L, n_mod):
    pn_order = 14
    pn_seed = '01001000111011'
    pn_mask = '01001101001110'
    seq_length = K * n_mod
    pn_sequence = cp.pnsequence(pn_order, pn_seed, pn_mask, seq_length)
    qam_mod = cp.modulation.QAMModem(2 ** n_mod)
    qam_sequence = qam_mod.modulate(pn_sequence)
    output = gfdm_tx_fft2(np.tile(qam_sequence, 2), filtertype, alpha, 2, K, 2, 1)
    return output
def gr_conformity_validation():
    M = 32
    K = 8
    alpha = .5
    oversampling_factor = 1
    overlap = 2

    tests = 100
    for t in range(tests):
        # d = np.random.standard_normal(2 * M * K)
        # d = np.reshape(d, (2, -1))
        # d = d[0] + 1j * d[1]
        d = get_random_samples(M * K)

        xo = gfdm_tx_fft2(d, 'rrc', alpha, M, K, overlap, oversampling_factor)
        xn = gfdm_gr_modulator(d, 'rrc', alpha, M, K, overlap)

        assert np.all(np.abs(xo - xn) < 1e-4)
Example #3
0
def gr_conformity_validation():
    M = 32
    K = 8
    alpha = .5
    oversampling_factor = 1
    overlap = 2

    tests = 100
    for t in range(tests):
        # d = np.random.standard_normal(2 * M * K)
        # d = np.reshape(d, (2, -1))
        # d = d[0] + 1j * d[1]
        d = get_random_samples(M * K)

        xo = gfdm_tx_fft2(d, 'rrc', alpha, M, K, overlap, oversampling_factor)
        xn = gfdm_gr_modulator(d, 'rrc', alpha, M, K, overlap)

        if not np.all(xo == xn):
            raise RuntimeError('Function results deviate')
Example #4
0
def gr_conformity_validation():
    M = 32
    K = 8
    alpha = .5
    oversampling_factor = 1
    overlap = 2

    tests = 100
    for t in range(tests):
        # d = np.random.standard_normal(2 * M * K)
        # d = np.reshape(d, (2, -1))
        # d = d[0] + 1j * d[1]
        d = get_random_samples(M * K)

        xo = gfdm_tx_fft2(d, 'rrc', alpha, M, K, overlap, oversampling_factor)
        xn = gfdm_gr_modulator(d, 'rrc', alpha, M, K, overlap)

        if not np.all(xo == xn):
            raise RuntimeError('Function results deviate')