# lteSCI

## Description

example

[sciout,bitsout] = lteSCI(ue) returns a sidelink control information (SCI) message structure, sciout, and the SCI message bit vector, bitsout, for the settings specified in the user equipment structure.

This function creates and manipulates SCI format 0 messages, defined in TS 36.212 [1], Section 5.4.3. You can use lteSCI to create a default SCI message, to blindly decode SCI format types, and to determine the sizes of the bit fields.

By default, all returned fields are set to zero.

example

[sciout,bitsout] = lteSCI(ue,sciin) returns the SCI structure fields and bit vector using settings specified in SCI input structure sciin. Fields not defined in sciin are set to defaults specified by ue. You can use this syntax to initialize SCI field values, in particular the frequency hopping bit, which affects the fields that the format uses.

example

[sciout,bitsout] = lteSCI(ue,bitsin) returns the SCI structure fields and bit vector using settings specified in bit input vector bitsin. The input bit vector is returned as the SCI information bit payload, where bitsout == bitsin.

example

[sciout,bitsout] = lteSCI(___,opts) formats the returned structure using options specified by opts.

## Examples

collapse all

Create a format 0 SCI message structure.

Create a UE settings structure.

ue = struct('NSLRB','15MHz');

Generate an SCI message and view the returned SCI message structure contents.

[sci0,bits] = lteSCI(ue);
sci0
sci0 = struct with fields:
SCIFormat: 'Format0'
FreqHopping: 0
Allocation: [1x1 struct]
TimeResourcePattern: 0
ModCoding: 0
NSAID: 0

allocfields = sci0.Allocation
allocfields = struct with fields:
RIV: 0

Create a format 0 SCI message structure with the distributed VRB allocation type. The allocation message fields are contained in the Allocation substructure. To create the appropriate set of fields at the output, the FreqHopping field is initialized at the input to the function.

Create a UE settings structure and define FreqHopping using an input SCI message structure.

ue = struct('NSLRB',50);
sciin = struct('FreqHopping',1);

Generate an SCI message and view the returned SCI message structure contents.

[sci0,bits] = lteSCI(ue,sciin);
sci0
sci0 = struct with fields:
SCIFormat: 'Format0'
FreqHopping: 1
Allocation: [1x1 struct]
TimeResourcePattern: 0
ModCoding: 0
NSAID: 0

allocfields = sci0.Allocation
allocfields = struct with fields:
HoppingBits: 0
RIV: 0

Recover the contents of a format 0 SCI message bit vector.

Create a UE settings structure.

ue = struct('NSLRB',50);

Generate an SCI message structure.

[sci0,bits] = lteSCI(ue);
sci0
sci0 = struct with fields:
SCIFormat: 'Format0'
FreqHopping: 0
Allocation: [1x1 struct]
TimeResourcePattern: 0
ModCoding: 0
NSAID: 0

Change the ModCoding setting to 22 and generate an SCI bits vector.

sci0.ModCoding = 22;
[~,bits_new] = lteSCI(ue,sci0);

Use the new bits to recover the new SCI message. View the new SCI message structure and confirm that the ModCoding setting is now 22.

[sci0_new,~] = lteSCI(ue,bits_new)
sci0_new = struct with fields:
SCIFormat: 'Format0'
FreqHopping: 0
Allocation: [1x1 struct]
TimeResourcePattern: 0
ModCoding: 22
NSAID: 0

Create a format 0 SCI message structure. Use the opts input to view the message field sizes and to exclude fields with zero length.

Create a UE settings structure.

ue = struct('NSLRB','5MHz');
opts = {'fieldsizes','excludeunusedfields'}
opts = 1x2 cell
{'fieldsizes'}    {'excludeunusedfields'}

Generate an SCI message and view the field sizes of the returned SCI message structure contents.

[sci0,bits] = lteSCI(ue,opts);
sci0
sci0 = struct with fields:
SCIFormat: 'Format0'
FreqHopping: 1
Allocation: [1x1 struct]
TimeResourcePattern: 7
ModCoding: 5
NSAID: 8

allocfields = sci0.Allocation
allocfields = struct with fields:
RIV: 9

Inspect the returned structure to see the bit length of each field in the SCI message.

fieldsLength = sci0.FreqHopping + sci0.Allocation.RIV + ...
sci0.TimeResourcePattern + sci0.ModCoding + sci0.TimeAdvance + ...
sci0.NSAID
fieldsLength = uint64
41
bitsLength = size(bits,1)
bitsLength = 41
isequal(fieldsLength,bitsLength)
ans = logical
1

The sum of the field sizes matches the length of the returned bits output.

## Input Arguments

collapse all

User equipment settings, specified as a structure containing these parameter fields:

Number of sub-channels in the V2X PSSCH resource pool, specified as an integer scalar from 1 to 110. You must specify this input when you set the sciin to 'Format1'.

Data Types: double

Number of sidelink resource blocks, specified as an integer scalar from 6 to 110.

Example: 6, which corresponds to a channel bandwidth of 1.4 MHz.

Data Types: double

Formatting options for output SCI structure, specified as a character vector, cell array of character vectors, or a string array. You can specify a format for the Field content and Fields to include. For convenience, you can specify several options as a single character vector or string scalar by a space-separated list of values placed inside the quotes. Values for opts when specified as a character vector include (use double quotes for string):

Category Options Description

Field content

'fieldvalues' (default)

Set the fields to zero or to their input values.

'fieldsizes'

Sets the field values to their bit sizes and adds the Padding field to sciout. Padding indicates the number of padding bits appended.

Fields to include

'includeallfields' (default)

sciout includes all possible fields for the requested SCI format.

'excludeunusedfields'

sciout excludes zero-length fields for the given parameter set.

Example: 'fieldsizes excludeunusedfields', "fieldsizes excludeunusedfields", {'fieldsizes','excludeunusedfields'}, or ["fieldsizes","excludeunusedfields"] specify the same formatting options.

Data Types: char | string | cell

SCI message settings, specified as a structure containing any fields returned in sciout. See sciout for the specific fields output for each SCIFormat. SCI format 0 message is defined in TS 36.212 [1], Section 5.4.3.1. It can contain the following field:

SCI format type, specified as 'Format0' or 'Format1'.

Data Types: char | string

Data Types: struct

Input bits, specified as a column vector. bitsin is treated as the SCI message bit payload, that is, bitsout == bitsin. The length of bitsin must align with the number of resource blocks, ue.NSLRB. Use lteSCIInfo to determine SCI message length for the specified ue settings.

Data Types: double

## Output Arguments

collapse all

SCI message structure, returned as a structure whose fields match the associated SCI format contents.

The field names associated with sciout depend on the SCI format field in sciin. By default, all values are set to zero. However, if any of the SCI fields are already present in the input sciin, their values are carried forward into sciout. The input field values appear in the associated bit positions in bitsout. Carrying the values forward allows for easy initialization of SCI field values. sciout also carries forward the NSLRB field specified in sciin.

This table presents the fields associated with each SCI format, as defined in TS 36.212 [1], Section 5.4.3.1.

SCI Formatssciout FieldsSizeDescription
'Format0' SCIFormat-'Format0'
FreqHopping1 bit PSSCH frequency hopping flag
Allocationfrom 5 to 13 bits, $⌈{\mathrm{log}}_{2}\left(\frac{{N}_{\text{RB}}^{\text{SL}}×\left({N}_{\text{RB}}^{\text{SL}}+1\right)}{2}\right)⌉$Resource block assignment and hopping resource allocation substructure, type 0 or type 1 allocation
TimeResourcePattern7 bits Time resource pattern (ITRP)
ModCoding5 bits Modulation and coding scheme (IMCS)
NSAID8 bits Group destination ID, as defined by higher layers
Padding0 bitsAlways zero for SCI Format 0
'Format1' SCIFormat-'Format1'
Priority3 bitsPer packet priority
ResourceReservation4 bitsResource reservation
RIVfrom 0 to 13 bits, $⌈{\mathrm{log}}_{2}\left(\frac{{N}_{\text{subchannel}}^{\text{SL}}×\left({N}_{\text{subchannel}}^{\text{SL}}+1\right)}{2}\right)⌉$Resource indication value
TimeGap4 bits

Time gap between initial transmission and retransmission

ModCoding5 bitsModulation and coding scheme
RetransmissionIdx1 bitRetransmission index

SCI message in bit payload form, returned as a column vector. bitsout represents the set of message fields mapped to the information bit payload (including any zero-padding).

## References

[1] 3GPP TS 36.212. “Evolved Universal Terrestrial Radio Access (E-UTRA); Multiplexing and channel coding.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network. URL: https://www.3gpp.org.

## Version History

Introduced in R2016b