Main configuration d=256, L=64: all data, figures and checks re-run

Every OMA reference takes the L/16 combining gain so the comparison
stays resource matched, four hardcoded copies of the configuration are
replaced by MAIN_D or the main curve, and stage_J's K-by-L Gaussian
draw becomes its exact scalar Beta equivalent.
This commit is contained in:
KiHoLee
2026-08-18 14:40:48 +09:00
parent fef629a218
commit 8f26bf9bc9
34 changed files with 691 additions and 544 deletions
+14 -13
View File
@@ -1,11 +1,11 @@
# -*- coding: utf-8 -*-
"""Does an orthogonal unit codebook recover the shortfall?
diag_interference shows the gap to the ideal M-ary receiver is not
diag_interference shows the gap to the single-user M-ary bound is not
multi-user interference but the geometry of the trained unit codebook,
whose Gram matrix carries a root-mean-square off-diagonal of 0.45 where
an orthogonal set would carry zero. Vu = L = 16 admits an exactly
orthogonal set, so this measures what installing one buys.
whose Gram matrix carries a large root-mean-square off-diagonal where an
orthogonal set would carry zero. Vu <= L admits an exactly orthogonal
set, so this measures what installing one buys.
Two orthogonal sets are tried, because the choice is not free. The
Walsh-Hadamard set collides with the keys: the rows are closed under the
@@ -22,7 +22,7 @@ import torch
sys.path.insert(0, str(Path(__file__).resolve().parent))
import sse_lib as L
from sse_lib import DEVICE, SSE
from exp_full import hadamard, base_keys
from exp_full import hadamard, base_keys, oma_ser_keylen, MAIN_D
from diag_interference import ser
SNR = [0.0, 10.0, 20.0]
@@ -39,13 +39,13 @@ def fixed_model(B, P=4, vu=16, d=64, U=4):
return m
def hadamard_book(vu=16, Lp=16):
def hadamard_book(vu=16, Lp=MAIN_D // 4):
B = torch.zeros(vu, Lp)
B[:, :vu] = torch.tensor(hadamard(vu).copy(), dtype=torch.float32)
return B
def random_ortho_book(vu=16, Lp=16, seed=7):
def random_ortho_book(vu=16, Lp=MAIN_D // 4, seed=7):
g = torch.Generator().manual_seed(seed)
A = torch.randn(Lp, Lp, generator=g)
Q, _ = torch.linalg.qr(A)
@@ -68,13 +68,14 @@ def main():
% ("unit codebook", "max|off|", "0 dB", "10 dB", "20 dB"))
report("Walsh-Hadamard", fixed_model(hadamard_book()))
report("random orthogonal", fixed_model(random_ortho_book()))
print("%-22s %-10s %-9s %-9s %-9s"
% ("trained (paper)", "0.887", "0.8822", "0.2576", "0.0307"))
from exp_full import main_model
report("trained", main_model())
Lp = MAIN_D // 4
print("%-22s %-10s %-9s %-9s %-9s"
% ("OMA, resource matched", "-",
"%.4f" % L.oma_ser([0.0])[0],
"%.4f" % L.oma_ser([10.0])[0],
"%.4f" % L.oma_ser([20.0])[0]))
"%.4f" % oma_ser_keylen(Lp, 0.0),
"%.4f" % oma_ser_keylen(Lp, 10.0),
"%.4f" % oma_ser_keylen(Lp, 20.0)))
@@ -97,7 +98,7 @@ def solo_check():
print("%-22s %-12.4f %-12.4f"
% (name, ser(m, 10.0, FRAMES, solo=True),
ser(m, 10.0, FRAMES, solo=False)))
print("single-user ideal M-ary bound (separate MC): 0.1986")
print("(solo isolates the candidate set from the superposition)")
if __name__ == "__main__":