Created
February 22, 2024 11:26
-
-
Save kumanna/269e42b8e281b8c75b22ad3b316e4aff to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
M = 4; | |
N = 4; | |
W = np.exp(1j * 2 * np.pi * np.outer(np.arange(M*N), np.arange(M*N)) / N / M) / np.sqrt(N * M); | |
Nt = 3; | |
Nr = 2; | |
## In the slide 39 of this: | |
## https://ecse.monash.edu/staff/eviterbo/OTFS-VTC18/Tutorial_ICC2019___OTFS_modulation.pdf | |
## Assume that s is MNN_t cross 1 | |
## H = [. -> each entry becomes Nr x Nt matrix] | |
## -> H size is MNN_r x MNN_t | |
L = 1 | |
H_1 = np.array([[1, 2, 3], [-3, 4, 2]]); | |
P = np.zeros((M*N, M*N), dtype='complex'); | |
P[0,-1] = 1; | |
P[1:,:(M*N-1)] = np.eye(15); | |
D = np.diag(np.exp(1j * 2 * np.pi * 1 * np.arange(M*N)/(M*N))); | |
## We will construct P_mimo which is a MNNr x MNNr matrix | |
P_mimo = np.kron(P, np.eye(Nr)); | |
H_1_mimo = np.kron(np.eye(M*N), H_1); | |
D_mimo = np.kron(D, np.eye(Nt)); | |
## Sanity check: | |
print(np.max(np.max(np.abs(H_1_mimo - np.kron(W.conj().T, np.eye(Nr)) @ H_1_mimo @ np.kron(W, np.eye(Nt)))))) | |
H_1_rect_eff = np.kron(W, np.eye(Nr)) @ P_mimo @ np.kron(W.conj().T, np.eye(Nr)) @ H_1_mimo @ np.kron(W, np.eye(Nt)) @ D_mimo @ np.kron(W.conj().T, np.eye(Nt)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment