No project description provided
Project description
OTFS modulation
This repositiory is a foundamental toolbox of OTFS modulation crossing matlab
and python
.
How to use
All OTFS codes are uniform in matlab and python as a class of OTFS
. This class is the whole process of OTFS. This section will illustrate the methods of this class following the process from Tx to Rx.
- OTFS
@nSubcarNum
: the subcarrier number
@nTimeslotNum
: the timeslot number
@batch_size
(optional) : the batch size (only used in python).
% matlab nSubcarNum = 16; nTimeslotNum = 7; otfs = OTFS(nSubcarNum, nTimeslotNum);
# python nSubcarNum = 16; nTimeslotNum = 7; otfs = OTFS(nSubcarNum, nTimeslotNum); otfs = OTFS(nSubcarNum, nTimeslotNum, batch_size=4); # using batch
- modulate
@symbols
: a vector of [(batch_size), nSubcarNum*nTimeslotNum], or a matrix in delay Doppler domain [(batch_size), Doppler, delay] or [(batch_size), nTimeslotNum ,nSubcarNum]
% matlab otfs.modulate(x_origin);
# python otfs.modulate(x_origin);
- setChannel
This methods has 2 kinds of inputs.- generate random channel
If we usebatch
, the channel will be different for each sample in the batch.@p
: the path number (scalar)
@lmax
: the maximal integer delay index (scalar)
@kmax
: the maximal integer Doppler index (scalar). If set to a float number, we use fractional Doppler
% matlab otfs.setChannel("p", 6, "lmax", 11, "kmax", 3);
# python otfs.setChannel(p=6, lmax=11, kmax=3);
- generate fixed channel
@gains:
the channel gains of [(batch_size), p]
@delays:
the channel delays of [(batch_size), p]
@dopplers
: the channel Doppler shift of [(batch_size), p]
% matlab otfs.setChannel("delays", [0, 1], "Dopplers", [2, 3], "gains", [0.5, 0.5]);
# python # no batch otfs.setChannel(delays=[0, 1], dopplers=[2, 3], gains=[0.5, 0.5]); # using batch otfs.setChannel(delays=np.tile([0, 1], (batch_size, 1)), dopplers=np.tile([2, 3], (batch_size, 1)), gains=np.tile([0.5, 0.5], (batch_size, 1)));
- generate random channel
- getChannel
return the Delay-Doppler domain channel matrix of [(batch_size), nSubcarNumnTimeslotNum, nSubcarNumnTimeslotNum]H_DD = otfs.getChannel();
- passChannel
@No
: a scalar of the linear noise power# matlab & python otfs.passChannel(No);
- demodulate
- return value: the vectorized received signal in the delay Doppler domain, a vector of [(batch_size), nSubcarNum*nTimeslotNum]
# matlab & python yDD = otfs.demodulate();
Samples
Before running any sample code, please make sure you are at the root path of this repository. Also, Matlab codes require running init
in the command window first to load directories.
TestDetect
: test all kinds of OTFS detectors- TestFractionalDoppler
- TestOTFSAllFunctions: test all functions using random channels and fixed channels
- TestWaveForms
Viterbo_MP_2018
: this code is fromEmanuele Viterbo
. You can download his original code in this page.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for whatshow_phy_mod_otfs-1.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c441da9ac547e7d50656e0a77483ebc4d2cde0019358d7548b4277700cdbce8 |
|
MD5 | c5aa0c445125b04b299ebe4bef610ed4 |
|
BLAKE2b-256 | 712bec4e3f44ea3f43ec6c3487e8cd9b49adcb17b3c6e61e3a2826b94a767ba3 |
Close
Hashes for whatshow_phy_mod_otfs-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf4f16ad9daf43b112de349c631f8d18d453e1d0b36d73ccb72a8b4f47048cd8 |
|
MD5 | 0ed55c0d8dbc47e63feb8566db3acc45 |
|
BLAKE2b-256 | 3d9d2a4cac380c988bef112e6752056a4623b5bb2390a2be87c5b2267111a0d7 |