# 5G NR Measurement Gaps

## Summary


Measurement gaps are opportunities given to the UE to perform measurements on downlink signals. A UE can't perform inter-frequency or inter-RAT measurements while also transmitting or receiving. Even for intra-frequency measurements, a 5G UE may require measurement gaps if such measurements are to be performed outside the UE's currently active Bandwidth Part (BWP).  

The network configures a UE with measurement gaps via RRC signalling. The network configures these gaps such that they don't coincide with UE transmissions or receptions. It's possible to start with a few gaps and later reconfigure the UE with more gaps to gather neighbour cell measurements, for instance if a handover looks likely. 

Measurement gaps are periodic. A UE may be configured with multiple measurement gaps. UE RRC informs Layer 1 of these gaps. Layer 1 obeys these gaps for making measurements. Collected measurements are reported to the network either at Layer 1 or RRC.

## Discussion

### What are the different types of 5G NR measurement gaps?

There are three types of gap patterns: gapUE, gapFR1, and gapFR2.  More commonly, these are called **per-UE** or **per-FR** gap types. 

If the UE is capable, the network may signal separate gap configurations for FR1 and FR2. Otherwise, gapUE is used, that is, these gaps can be used for measurements in both FR1 and FR2. When either gapFR1 or gapFR2 is configured, gapUE can't be configured for the UE. 

In NGEN-DC and EN-DC, signalling is over E-UTRA, not 5G NR. Hence, gapFR1 and gapUE are set up by LTE RRC. 

In NE-DC and NR-DC, signalling is over 5G NR. Hence, gapFR1 and gapUE are set up by NR RRC. gapFR2 is always setup via NR RRC signalling. In NR-DC, the gaps must be associated with MCG. 


### What constitutes a measurement gap configuration?

A measurement gap configuration has the following elements:  

    + **Measurement Gap Repetition Period (MGRP)**: Specifies the gap period. Values include 20, 40, 80, 160ms. For example, for 40ms the gap repeats every four frames.
    + **Gap Offset**: Specifies the starting subframe when the gap starts. Being relative to period, it's range is 0 to mgrp-1.
    + **Measurement Gap Length (MGL)**: Specifies the duration of the gap in milliseconds. Values include 1.5, 3, 3.5, 4, 5.5, and 6ms. For positioning measurements, 10 and 20ms are applicable.
    + **Measurement Gap Timing Advance (MGTA)**: UE starts measurements in advance of the subframe when the gap starts. This could be 0, 0.25 or 0.5ms. For FR2, 0 and 0.25ms are applicable.
    + **Reference Serving Cell Indicator**: Applicable for NE-DC and NR-DC, this indicates which cell's SFN and subframe numbering to use for gap calculation.The 5G system has what's called a System Frame Number (SFN), a frame being 10ms long. This is divided into 10 subframes, each of 1ms duration. A measurement gap is configured by the following equations:

$$SFN\;mod\;(mgrp/10)\;=\;FLOOR(gapOffset/10)\\subframe\;=\;gapOffset\;mod\;10$$

Applying this to the figure, we get `SFN mod 4 = 2` and `subframe = 4`.


### What are measurement gap pattern configurations?

The standard specifies 26 different **gap pattern configurations**. Each pattern is a combination of MGL and MGRP. 

Not all patterns are always applicable. The standard defines applicable patterns with respect to gap type, serving cell type, and measurement purpose. A UE can indicate if it support per-FR type. Otherwise, it's expected to support all gap pattern configurations that are applicable. 


### In 5G NR, how does a measurement gap relate to SMTC?

To make neighbour cell measurements, the network informs the UE the timing of neighbour cell SSBs via what's called SSB Measurement Timing Configuration (SMTC). UE will measure all SSBs that fall within a configured SMTC window. This window is contained with a measurement gap. Network configures measurement gap length and SMTC window based on SSB burst periodicity. 

SSB burst periodicity can have values 5/10/20/40/80/160 milliseconds. However, a UE in connected mode need not measure so often, particularly under good channel conditions. In such cases, SMTC window periodicity can be longer. 

Two examples are shown in the figure. We also note that the entire measurement gap is usually not used for measurements. A UE requires some time for retuning its RF transceivers. Hence, actual measurement duration is smaller than the measurement gap length. 


### Why does a 5G UE require the Measurement Gap Timing Advance (MGTA)?

In some cases, measurement gap starts at the same time as SMTC window. Given the time needed to retune RF, this implies that UE may miss some SSBs that it's supposed to measure. This is solved by informing the UE to advance the start of the configured measurement gap. This advance is 0.5ms for FR1 and 0.25ms for FR2. 


### What is measurement gap sharing in 5G NR?

A UE may need measurement gaps for both intra-frequency and inter-frequency measurements; or in either case, the SMTC window fully overlaps with the configured measurement gap. In such cases, configured measurement gaps may need to be shared between intra-frequency and inter-frequency measurements. The gaps could be per-UE or per-FR. 

The sharing is determined by RRC signalling of \(X\) that can take four values: equal split, 25, 50, 75. It's applied as follows: 

$$K\_{intra} = 1 / X \* 100 \\ K\_{inter} = 1 / (100 – X) \* 100$$

Details of measurement gap sharing are defined in TS 38.133 for four scenarios: EN-DC, SA, NE-DC and NR-DC. 

Sharing affects the calculation of Carrier-Specific Scaling Factor (CSSF) that scales the measurement delay requirements defined in the standard. 


### What are autonomous gaps in 5G NR?

As part of reporting configuration, the network may ask the UE to report Cell Group Identity (CGI). This report is not exactly a measurement but it requires the UE to acquire system information from neighbour cells. The relevant messages to decode are MIB and SIB1. For doing this, IE `useAutonomousGaps` may be configured. 

Autonomous gaps is when the network doesn't configure measurement gaps for the UE. UE autonomously selects suitable gaps to receive system information of neighbour cells. 

## Milestones

Dec  
2017

3GPP publishes Release 15 "early drop". In this release, measurement gaps and gap patterns are partially defined. Some details are marked for further study. 

Jul  
2020

3GPP publishes Release 16 specifications. SSB-based inter-frequency measurements can be done without measurement gaps if SSB is within active DL BWP of UE. UE reports some measurements to assist the network configure measurement gaps for location-related measurements. 

Jan  
2021

For positioning measurements, MGL of 10 and 20ms are introduced.