Skip to content

Commit

Permalink
first complete version of sidelink discovery mode support
Browse files Browse the repository at this point in the history
  • Loading branch information
antonisgotsis committed Mar 16, 2017
1 parent fa09bdb commit 4433ef5
Show file tree
Hide file tree
Showing 6 changed files with 116 additions and 14 deletions.
111 changes: 104 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The following 3GPP standard documents have been used and referenced through the
* 36.212 Multiplexing and channel coding (Section 5.4)
* 36.213 Physical layer procedures (Sections 5.2.2.25, 5.2.2.26, 5.10, 14)
* 36.321 Medium Access Control (MAC) protocol specification (Sections 5.14, 5.15, 5.16)
* 36.331 Radio Resource Control (RRC); Protocol specificatiοn (Section 6.5.2)
* 36.331 Radio Resource Control (RRC); Protocol specificatiοn (Sections 6.5.2, 6.3.8)

Further details for the 3GPP D2D/V2V standardization and implementation could be found in:
* 22.803 Feasibility study for Proximity Services (ProSe) [Rel.12]
Expand All @@ -36,8 +36,11 @@ Further details for the 3GPP D2D/V2V standardization and implementation could be
* Generation and recovery of MIB-SL messages
* Encoding and recovery of the SL-BCH transport channel
* Encoding and recovery of the PSBCH physical channel
* Demodulation Reference Signals (DMRS) construction and loading
* Sidelink discovery mode :new:
* Physical Signals and Channels: SL-DCH, PSDCH, PSDCH DMRS
* Subframe/PRB discovery pool formation & UE-specific resource allocation
* Synchronization preambles (PSSS, SSSS) construction & recovery
* Demodulation Reference Signals (DMRS) construction for PSBCH (other sidelink are supported but not fully tested)
* Subframe creation, loading and time-domain signal transformation
* Complete receiver processing functionality for sidelink-compliant waveforms
* time-synchronization
Expand All @@ -47,9 +50,6 @@ Further details for the 3GPP D2D/V2V standardization and implementation could be
* example script for configuring and running a full sidelink broadcast transceiver simulation scenario

#### Upcoming Features
* Sidelink discovery mode
* Physical Signals and Channels: SL-DCH, PSDCH, PSDCH DMRS
* Subframe/PRB discovery pool formation & UE-specific resource allocation
* Sidelink communication mode
* Physical Signals and Channels for L1 signaling: SCI-0 (D2D), SCI-1 (V2V), PSCCH, PSCCH DMRS
* Physical Signals and Channels for Payload: PSSCH, PSSCH DMRS
Expand All @@ -62,9 +62,10 @@ Further details for the 3GPP D2D/V2V standardization and implementation could be

#### Dependencies/Notes
* All functionalities are developed in-house except for: i) CRC encoding/detection, ii) Convolutional Encoding/Decoding. For these, the corresponding MATLAB Communication Toolbox System Objects have been used. In-house versions of these two blocks will be also provided soon.
* Convolution channel coding has been applied for sidelink discovery mode transport channel processing, instead of standard-compliant turbo coding.
* Testing of the code has been done in MATLAB R2016b.

### A simple walkthrough example: Sidelink broadcast/synchronization transceiver simulation
### Walkthrough Example 1: Sidelink broadcast/synchronization transceiver simulation
The example provides a high-level walkthrough for setting up, configuring, and running a complete transceiver simulation scenario for the sidelink broadcast channel. The example includes (refer to file [sidelink_broadcast_tester.m](sidelink_broadcast_tester.m)):
* The generation of sidelink-compliant broadcast subframes in frequency and time domains.
* The generation and application of noise, delay, and frequency-offset impairments to the ideal waveform.
Expand Down Expand Up @@ -183,8 +184,104 @@ Again, for the default configuration you may simply call the recovery function a
broadcast_rx(struct(), struct(), struct(), rx_input);
```

### Walkthrough Example 2: Sidelink discovery transceiver simulation :new:
#### A short introduction to D2D Discovery
The sidelink discovery mode is used for sending (in a broadcast way) short messages to neighbor UEs. Protocol processing is extremely light; in essence each message corresponds to a single PHY transport block, containing no higher-ligher additional overhead. How to fill the transport block is left open, and depends on the underlying D2D application. To support timing reference recovery at the monitoring D2D UEs, the announcing D2D UE(s) trigger the transmission of broadcast/synchronization subframes as described in the previous example. The sidelink discovery transmission/reception procedure involves two key functionalities:
* Selection of time (subframes) and frequency (PRBs) resources for announcing/monitoring discovery messages. Sidelink resource allocation is realized in two levels:
* *inter sidelink-uplink level*, responsible for the determination of sidelink resource pools to avoid conflict with resources used for regular uplink transmissions.
* *intra-sidelink level*, responsible for the determination of UE-specific resources, based on the configured sidelink resource pool(s). For receiving D2D UEs, multiple resources may be monitored in order to "listen" for simultaneous discovery announcements.
* L1 processing, i.e. signal generation (for tx) and transport block recovery operations (for rx). The processing includes:
* Transport channel processing (SL-DCH);
* Physical channel processing (PSDCH) assisted by PSDCH DMRS;
* Triggering of broadcast/synchronization transmissions to assist time-synchronization and frequency offset compensation at the receiving side.

Next, we provide a high-level walkthrough for setting up, configuring, and running a complete transceiver simulation scenario for the sidelink discovery mode (refer to file [sidelink_discovery_tester.m](sidelink_discovery_tester.m)):

#### Configuration
The available parameters may be organized in three groups:
* **Basic** configuration group, providing the key operational system parametrization. It includes the cyclic prefix length (``cp_Len_r12``), sidelink bandwidth mode (``NSLRB``), sidelink physical layer id (``NSLID``), sidelink mode (``slMode``), synchronization offset with respect to SFN/DFN #0 (``syncOffsetIndicator``), and synchronization period (``syncPeriod``), for both discovery and triggered broadcast/synchronization subframes. The detailing of the specific parameters has been provided in the Broadcast example description.
* **Discovery Resources Pool** configuration, providing the sidelink resources allocation parametrization. The available parameters are briefly described in the following bullet points. For more details, please refer to the 3GPP standard, 36.331 - 6.3.8, and particularly at the sidelink-related IEs included in the standard from Rel.12 and on.
* ``discPeriod_r12``: the period (in # frames) for which the resource allocation configuration is valid (available configurations: 32,64,128,256,512,1024 frames)
* ``offsetIndicator_r12``: the subframe offset (with respect to SFN/DFN #0) determining the start of the discovery period.
* ``subframeBitmap_r12`` : a length-40 bitmap determining the time (subframe) pattern used for sidelink transmissions (unit-elements determine the subframes available for sidelink transmissions)
* ``numRepetition_r12``: the repeating pattern of the subframe bitmap (available configurations: 1-5)
* ``prb_Start_r12``: the first PRB index of the bottom PRB pool available for discovery transmissions
* ``prb_End_r12``: the last PRB index of the top PRB pool available for discovery transmissions
* ``prb_Num_r12`` : the number of PRBs assigned to top/bottom PRB pools for discovery transmissions
* ``numRetx_r12`` : the number each discovery message is re-transmitted (available configurations: 0-3)
* ``networkControlledSyncTx`` : determines if broadcast/sync subframes should be triggered (1 for triggering, 0 for no-triggering)
* ``syncTxPeriodic`` : determines if the triggered broadcast/sync subframes are transmitted at once ("single-shot") or periodically
* ``discType``: determines how sidelink resources are allocated to the different discovery transmissions, i.e. selected by each UE in an autonomous manner (``Type-1``) or configured by the eNB in a centralized manner (``Type-2``).
* **UE-specific resources allocation** configuration, providing the specific subframes and PRBs allocated to each discovery message and the (potential) retrasmissions. In particular:
* For ``Type-1`` resource allocation, a single parameter, ``nPSDCH``, determines the exact resources subset. In particular, each``nPSDCH`` value corresponds to a distinct combination of a single subframe and a PRB set used for carrying a single discovery message. Using different ``nPSDCH`` settings for distinct messages announcement allows to avoid intra-sidelink interference.
* For ``Type-2`` resource allocation, PRB and subframe resources are determined explicitly using a set of two parameters, ``discPRB_Index`` and ``discSF_Index``. Lastly, for hopping-based resource allocation, the applied hopping patterns are determined based on set of three parameters, ``a_r12``,``b_r12``, and ``c_r12``.

#### Running the example
An example ``Type-1`` configuration is shown below. Notice that in addition to the aforementioned parameters we have included: i) a parameter determing which resources the receiving UE will monitor for identifying potential discovery announcements (```n_PSDCHs_monitored```), ii) a set of three parameters (```decodingType```, ```chanEstMethod```, ```timeVarFactor```), used for tuning channel estimation and channel decoding operations at the receiver side.
```
cp_Len_r12 = 'Normal';
NSLRB = 25;
NSLID = 301;
slMode = 1;
syncOffsetIndicator = 0;
syncPeriod = 40;
discPeriod_r12 = 32;
offsetIndicator_r12 = 0;
subframeBitmap_r12 = repmat([0;1;1;1;0],8,1);
numRepetition_r12 = 5;
prb_Start_r12 = 2;
prb_End_r12 = 22;
prb_Num_r12 = 5;
numRetx_r12 = 2;
networkControlledSyncTx = 1;
syncTxPeriodic = 1;
discType = 'Type1';
n_PSDCHs = [0; 6];
n_PSDCHs_monitored = n_PSDCHs;
decodingType = 'Soft';
chanEstMethod = 'LS';
timeVarFactor = 0;
```
As in the broadcast example, transmission/reception operations are captured in corresponding function blocks, ```discovery_tx()``` and ```discovery_rx()```, respectively.

By default,```discovery_tx()``` creates a standard-compliant discovery waveform for a period determined by the ``discPeriod_r12`` parameter. The waveform (stored in the ``tx_output`` variable) contains not only the discovery signal samples but also the triggered broadcast/synchronization signal samples for the specific period. An example call of the discovery tx waveform generation function block is as follows:
```
slBaseConfig = struct('NSLRB',NSLRB,'NSLID',NSLID,'cp_Len_r12',cp_Len_r12, 'slMode',slMode);
slSyncConfig = struct('syncOffsetIndicator', syncOffsetIndicator,'syncPeriod',syncPeriod);
slDiscConfig = struct('offsetIndicator_r12', offsetIndicator_r12, 'discPeriod_r12',discPeriod_r12, 'subframeBitmap_r12', subframeBitmap_r12, 'numRepetition_r12', numRepetition_r12, ...
'prb_Start_r12',prb_Start_r12, 'prb_End_r12', prb_End_r12, 'prb_Num_r12', prb_Num_r12, 'numRetx_r12', numRetx_r12, ...
'networkControlledSyncTx',networkControlledSyncTx, 'syncTxPeriodic',syncTxPeriodic, 'discType', discType);
slUEconfig = struct('n_PSDCHs',n_PSDCHs);
tx_output = discovery_tx( slBaseConfig, slSyncConfig, slDiscConfig, slUEconfig );
```
The generated time-domain waveform for a period of 50 subframes is illustrated in the following figure. The subframe locations of the discovery message transmissions (and potentially re-transmissions) depend on the selected ``nPSDCH`` configuration. In addition, the triggered broadcast/sync subframes repeated every 40 subframes are also shown.
<img src="./discovery_waveform_example_time.jpg" width="80%" height="80%" align="middle"/>

The frequency-domain resource allocation for the discovery message configured with ```nPSDCH = 0``` is also shown below. Three transmissions for the particular message have been configured (since ``numRetx_r12=2``).

<img src="./discovery_waveform_example_freq.jpg" width="60%" height="60%" align="middle"/>

Next, the tx waveform passes through a typical channel, and the resulted waveform (stored in the ``rx_input`` variable) is fed to the discovery monitoring/receiving function block. This is called as follows:
```
discovery_rx(slBaseConfig, slSyncConfig, slDiscConfig, ...
struct('n_PSDCHs',n_PSDCHs_monitored), ...
struct('decodingType',decodingType, 'chanEstMethod',chanEstMethod, 'timeVarFactor',timeVarFactor),...
rx_input );
```
Notice that in addition to sidelink basic configuration (``slBaseConfig`` and ``slSyncConfig``) and discovery resources pool configuration (``slDiscConfig``), we provide as input the discovery messages monitoring search space and the channel estimation/decoding parameters. The discovery monitoring function returns the recovered (if any) discovery messages. For the specific configuration example the following output is printed at the end of the execution (intermeddiate log/debug messages print-out is also supported):
```
Recovered Discovery Messages
[At Subframe 1: Found nPSDCH = 0]
[At Subframe 2: Found nPSDCH = 0]
[At Subframe 3: Found nPSDCH = 0]
[At Subframe 31: Found nPSDCH = 6]
[At Subframe 32: Found nPSDCH = 6]
[At Subframe 33: Found nPSDCH = 6]
```
It is clear that both discovery messages contained in the tx waveform have been recovered successfully at the receiver side.

### Acknowledgement
Part of the activities leading to this library received funding from the European Union’s Seventh Framework Programme under grant agreement no 612050, ["FLEX Project"](http://www.flex-project.eu/), and in particular FLEX Open Call 2 Project [“FLEX-D: Experimenting with Flexible D2D communications Over LTE”](http://www.flex-project.eu/open-calls/2nd-open-call/results).
Part of the activities leading to this library received funding from the European Union’s Seventh Framework Programme under grant agreement no 612050, ["FLEX Project"](http://www.flex-project.eu/), and in particular FLEX Open Call 2 Project [“FLEX-D: Experimenting with Flexible D2D communications Over LTE”](http://www.flex-project.eu/open-calls/2nd-open-call/results). FLEX-D is carried out by Feron Technologies and University of Piraeus Research Centre, Greece.

### Support

Expand Down
12 changes: 8 additions & 4 deletions core/SL_Discovery.m
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,11 @@
function [output_seq] = CreateSubframe (h, subframe_counter)
%Create a discovery subframe for given subframe index

persistent x;
if isempty(x)
x = 0;
end

h.subframe_index = subframe_counter; % timing

fprintf('\nCreating discovery subframe for subframe %i...\n',subframe_counter);
Expand All @@ -607,8 +612,7 @@
% assigned prbs for current msg/tx opportunity
current_prbs = h.m_PSDCH_selected{ix,txIndices(ix)};
fprintf('\tLoading Message for n_PSDCH = %3i, transmission %i/%i ',h.n_PSDCHs(msgIndices(ix)),txIndices(ix),size(h.l_PSDCH_selected,2));
fprintf('( PRBs: '); fprintf('%i ', current_prbs(:)); fprintf(')\n');

fprintf('( PRBs: '); fprintf('%i ', current_prbs(:)); fprintf(')\n');
% Ggenerate a random discovery TB (the 2nd argument is optional. it used for setting a fixed seed)
discTB = GenerateDiscoveryTB(h, subframe_counter);
% transport and physical channel processing --> psdch sequence
Expand All @@ -623,8 +627,8 @@
tx_output_grid = tx_output_grid + tx_output_grid_current;
% time-domain transformation: in standard-compliant sidelink waveforms the last symbol shoul be zeroed. This is not done here.
tx_output = phy_ofdm_modulate_per_subframe(struct(h), tx_output_grid);
% visually illustrate resource mapping
% visual_subframeGridGraphic(tx_output_grid);
% visually illustrate resource mapping
% visual_subframeGridGraphic(tx_output_grid);
end % all messages

% return sequence
Expand Down
1 change: 1 addition & 0 deletions discovery_tx.m
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
elseif ismember(tested_subframe, h_slDisc_tx.l_PSDCH_selected)
fprintf('In DISCOVERY subframe %3i\n', tested_subframe);
tx_output_sf = CreateSubframe (h_slDisc_tx, tested_subframe);

end

% total tx waveform loading: broadcast or discovery or nothing
Expand Down
Binary file added discovery_waveform_example_freq.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added discovery_waveform_example_time.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions sidelink_discovery_tester.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,23 @@
NSLID = 301; % SLSSID: Physical layer sidelink synchronization identity: 0..335 (default 0)
slMode = 1; % Sidelink Mode: 1, 2, 3 or 4. For SL-DCH there is no difference. For SL-BCH 1 is equivalent with 2 and 3 is equivalent with 4. Set 1 or 2 for D2D, 3 or 4 for V2V (default : 1)
syncOffsetIndicator = 0; % SL-SyncConfig: Offset indicator for sync subframe with respect to subframe #0: 0..39 (default : 0)
syncPeriod = 10; % sync subframe period # subframes. Although this is fixed to 40 in the standard, it is allowed to be flexibly configured (default : 40).
syncPeriod = 40; % sync subframe period # subframes. Although this is fixed to 40 in the standard, it is allowed to be flexibly configured (default : 40).
% SL DISCOVERY Configuration
discPeriod_r12 = 32; % SL-DiscResourcePoool: 32,64,128,256,512,1024 radio frames
offsetIndicator_r12 = 0; % SL-OffsetIndicator : 0..10239 (time offset)
subframeBitmap_r12 = repmat([0;1;1;1;0],8,1); % SL-TF-ResourceConfig: size 40 (subframe resources)
numRepetition_r12 = 5; % SL-DiscResourcePoool: 1..5 (subframeBitmap_r12 repetitions)
prb_Start_r12 = 2; % SL-TF-ResourceConfig: 0.99
prb_End_r12 = 22; % SL-TF-ResourceConfig: 0.99
prb_Num_r12 = 10; % SL-TF-ResourceConfig: 1..100
prb_Num_r12 = 8; % SL-TF-ResourceConfig: 1..100
numRetx_r12 = 2; % SL-DiscResourcePool: 0..3 (msg retransmissions)
networkControlledSyncTx = 1; % RRCConnectionReconfiguration: on-off sync signals
syncTxPeriodic = 1; % SL-SyncConfig: single-shot or periodic sync
discType = 'Type1'; % 'Type1','Type2B': resource allocation method
% Tx-Only. For Rx we will define a search space for monitoring messages
if isequal(discType,'Type1')
% determine dummy UEs resource indices
n_PSDCHs = [0; 120]; % Scheduling-Based: resource allocation index, determining Time and Freq Resources per Msg
n_PSDCHs = [0; 6]; % Scheduling-Based: resource allocation index, determining Time and Freq Resources per Msg
elseif isequal(discType,'Type2B')
discPRB_Index = [1; 1]; % SL-DiscConfig (discTF_IndexList): 1..50
discSF_Index = [1; 2]; % SL-DiscConfig (discTF_IndexList): 1..200
Expand Down

0 comments on commit 4433ef5

Please sign in to comment.