예제 #1
0
from src import modules as m
import numpy as np
from src import ofdm
from scipy.linalg import dft
from simulations.common import graph
from simulations.common import settings
import matplotlib.pyplot as plt

graph.init_graph()
dirname = "../results/ofdm/test"
settings.init_output(dirname)

params = {
    "block": 1000,
    "subcarrier": 10,
    "CP": 5,
    "chanel_len": 2,
    "SNR_MIN": 0,
    "SNR_MAX": 25,
    "SNR_NUM": 6,
    "SNR_AVERAGE": 100,
    "equalizer": "ZF",
}

settings.dump_params(params, dirname)

ofdm_zero = np.hstack((np.zeros((params["subcarrier"], params["CP"])), np.eye(params["subcarrier"])))

F = dft(params['subcarrier'], "sqrtn")
FH = F.conj().T
예제 #2
0
def init_output(dirname: str = ''):
    # シミュレーション結果の保存先を作成する
    os.makedirs(dirname, exist_ok=True)

    init_log(dirname + '/log.log')
    graph.init_graph()