Contenu principal

nrGNB

R2026b

5G NR base station node

Since R2023a

    Description

    Use the nrGNB object to create and configure 5G new radio (NR) base station (gNB) nodes. This feature also requires the Wireless Network Toolbox™ product (since R2026a).

    Creation

    Description

    gnb = nrGNB creates a default gNB object.

    example

    gnb = nrGNB(PropertyName=Value) creates one or more similar gNB objects, and sets writable properties using one or more optional name-value arguments. For example, Position=[100 100 0; 5000 100 0],Name=["gNB1","gNB2"] creates two gNB objects, one with the name "gNB1" and the other named "gNB2", positioned at [100 100 0] and [5000 100 0], respectively. The number of rows in the Position argument defines the number of gNB objects created. If you create N nodes but supply M names, where M is greater than N, the nrGNB object uses only the first N names. If M is less than N, the object uses default names for the trailing (N-M) nodes.

    example

    Note

    When you configure multiple carriers for carrier aggregation using the ComponentCarrierConfig property, the DuplexMode, CarrierFrequency, ChannelBandwidth, SubcarrierSpacing, NumResourceBlocks, DLULConfigTDD, and SRSPeriodicityUE properties of the nrGNB object do not apply. These parameters are carrier-specific, and you must configure them within the nrComponentCarrierConfig object(s).

    Properties

    expand all

    Name of the gNB node, specified as a character vector, string scalar, vector of string array, or cell array of character vectors.

    If you do not set the Name property, the nrGNB object sets a default name, NodeX, where X is the ID of the node.

    To set the value of this property for multiple gNB nodes simultaneously, you must specify it at object creation.

    Note

    Starting in R2026a, you can set this property only at object creation. After creation, the property is read-only. In releases R2025b and before, after creating the object, you can set the value of this property for one node object at a time.

    Data Types: char | string

    Node position in 3-D Cartesian coordinates, specified as a three-element numeric row vector or N-by-3 matrix. N is the number of nrGNB objects to create using the creation function. Each row specifies the position of the node in Cartesian x-, y-, and z- coordinates. Units are in meters.

    To set the value of this property for multiple gNB nodes simultaneously, you must specify it at object creation. After object creation, you can set the value of this property for one gNB object at a time.

    Data Types: double

    This property is read-only after object creation.

    Noise figure, specified as a nonnegative finite scalar. Units are in dB.

    Data Types: double

    This property is read-only after object creation.

    Receiver antenna gain, specified as a nonnegative finite scalar. Units are in dB.

    Data Types: double

    This property is read-only after object creation.

    Number of transmit antennas, specified as one of these options.

    • 1

    • 2

    • 4

    • 8

    • 16

    • 32

    Data Types: double

    This property is read-only after object creation.

    Number of receive antennas, specified as one of these options.

    • 1

    • 2

    • 4

    • 8

    • 16

    • 32

    Data Types: double

    This property is read-only after object creation.

    Peak transmit power of a gNB node, specified as a finite numeric scalar. Units are in dBm. This value represents the maximum power output delivered to a load with unit impedance, measured when the transmission uses all resource blocks. It defines the maximum total output power of the gNB, as specified in section 3 of 3GPP TR 21.905. The maximum transmit power you can specify is 60 dBm.

    The gNB node calculates transmit power proportionally across carriers based on their bandwidth. To distribute the power, it performs these steps.

    • Sums the bandwidth of all carriers (Total BW)

    • Computes the normalization factor as

      normi=BWiBWtotal.

      In this equation,

      • normi — Normalization factor for the ith carrier

      • BWi — Bandwidth of ith carrier

      • BWtotal — Total aggregated bandwidth

    • Computes transmit power allocated to a carrier as Pcarrier,i=Pmax+10log10(normi)

      In this equation,

      • Pcarrier,i — Transmit power allocated to the ith carrier

      • PmaxTransmitPower property value of the gNB node (in dBm).

    Since R2026b

    This property is read-only after object creation.

    Transmit antenna array characteristics, specified as a structure or a phased.NRRectangularPanelArray (Phased Array System Toolbox) object (requires Phased Array System Toolbox™).

    When specified as a structure, this property contains the fields listed in this table.

    Parameter FieldValuesDescription
    Size

    [1 1 1 1 1] (default)

    row vector

    The configuration must match one of these:

    • For 1 antenna: [1 1 1 1 1]

    • For 2 antennas: [1 1 2 1 1]

    • For 4 antennas: [2 1 2 1 1]

    • For 8 antennas: [2 2 2 1 1] or [4 1 2 1 1]

    • For 16 antennas: [4 2 2 1 1] or [8 1 2 1 1]

    • For 32 antennas: [4 4 2 1 1] or [8 2 2 1 1] or [1 6 1 2 1 1]

    Size of antenna array, specified as [M N P Mg Ng], where:

    • M and N are the number of rows and columns in the antenna array, respectively.

    • P is the number of polarizations (1 or 2).

    • Mg and Ng are the number of row and column array panels, respectively.

    The overall antenna array consists of Mg-by- Ng antenna panels, where each antenna panel is of size M-by-N. If P = 1, all antenna array elements have the same polarization angle. If P = 2, half of the antenna array elements have one polarization angle and the other half have another polarization angle.

    ElementSpacing

    [] (default)

    row vector

    Element spacing, in wavelengths, specified as a row vector of the form [λv λh dgv dgh]. The vector elements represent the vertical and horizontal element spacing and the vertical and horizontal panel spacing, respectively. The panel spacing is measured from the center of the panels.

    PolarizationAngles

    [] (default)

    row vector

    Polarization angles in degrees, specified as a row vector of the form [θ ρ].

    Element

    "isotropic" (default)

    "38.901"

    "bessel"

    Antenna element radiation pattern as described in TR 38.901 Section 7.3 and TR 38.811. (Note that TR 38.901 supersedes TR 38.900.)

    When you set Element to "bessel", you must also set the Size field to a 5-by-1 vector of all ones. In this case, the default antenna aperture radius is 1m with left-hand circular polarization and aperture efficiency of 0.65.

    PolarizationModel

    "Model-2"(default)

    "Model-1"

    Model that determines the radiation field patterns based on a defined radiation power pattern. For more information about the defined radiation power pattern, see TR 38.901 Section 7.3.2.

    Since R2026b

    This property is read-only after object creation.

    Mechanical orientation of the transmit antenna array, specified as a three-element numeric column vector of the form [α; β; γ]. The vector elements specify the bearing, downtilt, and slant rotation angles in degrees, respectively, as specified in TR 38.901 Section 7.1.3. For more information on how the object applies these rotation angles, see Mechanical Orientation of Antenna Arrays.

    The default array orientation, corresponding to the value [0; 0; 0], depends on the TransmitAntennaArray property.

    • If you specify the TransmitAntennaArray property as a structure (default), in the default array orientation, the broadside direction points to the positive x-axis.

    • If you specify the TransmitAntennaArray property as a phased.NRRectangularPanelArray (Phased Array System Toolbox) array (requires Phased Array System Toolbox), you can configure the default array orientation by setting the relevant array properties of the specified phased array object.

    Data Types: double

    Since R2026b

    This property is read-only after object creation.

    Receive antenna array configuration, specified as a structure or a phased.NRRectangularPanelArray (Phased Array System Toolbox) object (requires Phased Array System Toolbox).

    When specified as a structure, this property contains the fields listed in this table.

    Parameter FieldValuesDescription
    Size

    [1 1 1 1 1] (default)

    row vector

    The configuration must match one of these:

    • For 1 antenna: [1 1 1 1 1]

    • For 2 antennas: [1 1 2 1 1]

    • For 4 antennas: [2 1 2 1 1]

    • For 8 antennas: [2 2 2 1 1] or [4 1 2 1 1]

    • For 16 antennas: [4 2 2 1 1] or [8 1 2 1 1]

    • For 32 antennas: [4 4 2 1 1] or [8 2 2 1 1] or [1 6 1 2 1 1]

    Size of antenna array, specified as [M N P Mg Ng], where:

    • M and N are the number of rows and columns in the antenna array, respectively.

    • P is the number of polarizations (1 or 2).

    • Mg and Ng are the number of row and column array panels, respectively.

    The overall antenna array consists of Mg-by- Ng antenna panels, where each antenna panel is of size M-by-N. If P = 1, all antenna array elements have the same polarization angle. If P = 2, half of the antenna array elements have one polarization angle and the other half have another polarization angle.

    ElementSpacing

    [] (default)

    row vector

    Element spacing, in wavelengths, specified as a row vector of the form [λv λh dgv dgh]. The vector elements represent the vertical and horizontal element spacing and the vertical and horizontal panel spacing, respectively. The panel spacing is measured from the center of the panels.

    PolarizationAngles

    [] (default)

    row vector

    Polarization angles in degrees, specified as a row vector of the form [θ ρ].

    Element

    "isotropic" (default)

    "38.901"

    "bessel"

    Antenna element radiation pattern as described in TR 38.901 Section 7.3 and TR 38.811. (Note that TR 38.901 supersedes TR 38.900.)

    When you set Element to "bessel", you must also set the Size field to a 5-by-1 vector of all ones. In this case, the default antenna aperture radius is 1m with left-hand circular polarization and aperture efficiency of 0.65.

    PolarizationModel

    "Model-2"(default)

    "Model-1"

    Model that determines the radiation field patterns based on a defined radiation power pattern. For more information about the defined radiation power pattern, see TR 38.901 Section 7.3.2.

    Since R2026b

    This property is read-only after object creation.

    Mechanical orientation of the receive antenna array, specified as a three-element numeric column vector of the form [α; β; γ]. The vector elements specify the bearing, downtilt, and slant rotation angles in degrees, respectively, as specified in TR 38.901 Section 7.1.3. For more information on how the object applies these rotation angles, see Mechanical Orientation of Antenna Arrays.

    The default array orientation, corresponding to the value [0; 0; 0], depends on the ReceiveAntennaArray property.

    • If you specify the ReceiveAntennaArray property as a structure (default), in the default array orientation, the broadside direction points to the positive x-axis.

    • If you specify the ReceiveAntennaArray property as a phased.NRRectangularPanelArray (Phased Array System Toolbox) array (requires Phased Array System Toolbox), you can configure the default array orientation by setting the relevant array properties of the specified phased array object.

    Data Types: double

    Since R2026b

    This property is read-only after object creation.

    Antenna efficiency losses, specified as a structure with these fields:

    • "Tx" — Transmit antenna efficiency loss in dB. The default value is 0.

    • "Rx" — Receive antenna efficiency loss in dB. The default value is 0.

    Data Types: double

    Since R2026b

    This property is read-only after object creation.

    receiver algorithm, specified as one of these values:

    • "mmse" — Minimum Mean square error (MMSE) receiver that minimizes mean square error between transmitted and received signals.

    • "mmse-irc" — MMSE receiver with interference rejection combining.

    Since R2026a

    This property is read-only after object creation.

    Physical (PHY) layer model, specified as one of these options. Note that all the gNB and user equipment (UE) nodes must use the same PHY model.

    • "abstract-phy" — Enable the link-to-system mapping-based abstracted PHY. The abstracted PHY models the link quality and performance to calculate the packet error rate (PER). Unlike full PHY, it does not involve waveform generation and decoding. For more information about the abstracted PHY, see Composition of NR Nodes.

    • "full-phy" — Enable full PHY processing. Full PHY processing involves waveform generation and decoding at the PHY layer.

    Data Types: char | string

    This property is read-only after object creation.

    Duplexing mode, specified as one of these options.

    • "FDD" — Frequency division duplex

    • "TDD" — Time division duplex

    Data Types: char | string

    This property is read-only after object creation.

    Carrier frequency, specified as one of these options. Units are in Hz.

    • For FDD mode, specify carrier frequency as a two-element vector in the format [DLFrequency ULFrequency], where the first element represents the downlink carrier frequency and the second element represents the uplink carrier frequency, both in Hz. For example: CarrierFrequency = [2.68e9 2.56e9]..

    • For TDD mode, you can specify carrier frequency as a real scalar. Both DL and UL use the same carrier frequency.

    Note

    • Starting in R2026b, for FDD mode, you must specify the CarrierFrequency property as a two-element vector. In R2026a and earlier releases, the value of the CarrierFrequency property can only be a scalar. When specified as a scalar, the gNB node automatically calculates separate DL and UL carrier frequencies based on the guard band and channel bandwidth.

    • To model interfering gNB nodes in your simulation, the interfering gNB nodes must have the same values for the properties CarrierFrequency and ChannelBandwidth. Additionally, SubcarrierSpacing must be same for the interfering gNB nodes.

    Data Types: double

    This property is read-only after object creation.

    Channel bandwidth, specified as one of these options. Units are in Hz.

    • 5e6

    • 10e6

    • 15e6

    • 20e6

    • 30e6

    • 35e6

    • 40e6

    • 45e6

    • 50e6

    • 60e6

    • 70e6

    • 80e6

    • 90e6

    • 100e6

    • 200e6

    • 400e6

    In FDD mode, the downlink (DL) and uplink (UL) operations occur in separate bands of the specified size. In TDD mode, both DL and UL share a single band of the specified size.

    Note

    To model interfering gNB nodes in your simulation, the interfering gNB nodes must have the same values for the properties CarrierFrequency and ChannelBandwidth. Additionally, SubcarrierSpacing must be same for the interfering gNB nodes.

    Data Types: double

    This property is read-only after object creation.

    Subcarrier spacing used across the cell, specified as one of these options. You may enter the value in Hz (such as 15e3) or in kHz (such as 15):

    • 15e3 or 15

    • 30e3 or 30

    • 60e3 or 60

    • 120e3 or 120

    Note

    To model interfering gNB nodes in your simulation, the interfering gNB nodes must have the same values for the properties CarrierFrequency and ChannelBandwidth. Additionally, SubcarrierSpacing must be same for the interfering gNB nodes.

    Data Types: double

    This property is read-only after object creation.

    Number of resource blocks in the channel bandwidth, specified as an integer in the range [4,273].

    In the FDD mode, the DL bandwidth and UL bandwidth each contain resource blocks equal to NumResourceBlocks. In the TDD mode, the DL and UL bandwidths share these resource blocks. If you do not specify this name-value argument, then the nrgNB object derives it automatically from the channel bandwidth and the subcarrier spacing. The default value, 25, corresponds to the default 5e6 Hz channel bandwidth and 15e3 Hz SCS. The minimum value, 4, is the minimum required transmission bandwidth for a sounding reference signal (SRS), as defined in TS 38.211, table 6.4.1.4.3-1 [3].

    Data Types: double

    This property is read-only after object creation.

    DL and uplink (UL) time division configuration for TDD mode, specified as a structure. The structure contains these fields.

    • DLULPeriodicity — DL-UL pattern periodicity in milliseconds. If you specify SCS as 15e3, 30e3, 60e3, or 120e3, then the default value of the DLULPeriodicity field is 5 milliseconds, 2.5 milliseconds, 1.25 milliseconds, or 0.625 milliseconds, respectively.

    • NumDLSlots — Number of full DL slots at the start of the DL-UL pattern. The default value is 2.

    • NumDLSymbols — Number of DL symbols after the full DL slots. The default value is 12.

    • NumULSymbols — Number of full UL symbols at the end of the DL-UL pattern. The default value is 1.

    • NumULSlots — Number of UL slots before the full UL slots. The default value is 2.

    The nrGNB object sets the reference SCS for the DL-UL pattern to the value of SubcarrierSpacing. The configuration supports one S slot after the full DL slots and before the full UL slots. The S slot consists of NumDLSymbols at the start and NumULSymbols at the end. The object sets the guard period between DL and UL time to 14 - (NumDLSymbols + NumULSymbols). You can set NumULSymbols to 0 or 1. If you set NumULSymbols to 1, the gNB reserves the UL symbol for sounding reference signal (SRS).

    This property corresponds to the tdd-UL-DL-ConfigurationCommon parameter, as described in Section 11.1 of TS 38.213.

    Dependencies

    To enable this property, set the DuplexMode property to "TDD".

    Since R2025a

    This property is read-only after object creation.

    Sounding reference signal (SRS) transmission periodicity of a UE node, specified as 5, 8, 10, 16, 20, 32, 40, 64, 80, 160, 320, 640, 1280, or 2560 slots. This value is identical for all connected UE nodes. This periodicity must also be an integer multiple of L, where L is the interval in slots at which the gNB reserves one symbol for the SRS resource across the entire bandwidth. The minimum value of L is 5. For FDD, the nrGNB object fixes the value of L at 5. For TDD, L is the minimum of these values: 5, 8, 10, 16, 20, 32, 40, 64, 80, 160, 320, 640, 1280, or 2560 slots; the value of L is also a multiple of the DL-UL pattern length.

    Data Types: double

    Since R2026a

    This property is read-only after object creation.

    SRS-based downlink channel measurement configuration, specified as a structure with these fields:

    • PrecoderFormat — Precoder calculation mode, specified as "wideband" or "subband". The default value for this field is "wideband".

    • MCSFormat — Modulation and coding scheme (MCS) calculation mode, specified as "wideband" or "subband". To enable "subband", set PrecoderFormat to "subband". When specified as "subband", the object calculates both subband and wideband MCS values. The default value for this field is "wideband".

    • SubbandSize — Subband size for precoder and MCS calculations, specified as 2 or 4. The default value is 4. This field is applicable when you set PrecoderFormat to "subband".

    Note

    • Enabling the SRSMeasurementConfigDL property of the nrGNB object sets the default value of the CSIMeasurementSignalDL argument of the configureScheduler function to "SRS".

    • When you enable SRSMeasurementConfigDL, the gNB node must use the same number of transmit and receive antennas.

    Dependencies

    To enable this property, set the DuplexMode property to "TDD".

    This property is read-only after object creation.

    Number of hybrid automatic repeat request (HARQ) processes used for each UE in the DL and UL directions, specified as an integer in the range [1, 32].

    Data Types: double

    Since R2026b

    This property is read-only after object creation.

    Component carrier configuration, specified as one of these options.

    • Single nrComponentCarrierConfig object — The gNB node operates with one carrier.

    • Vector of nrComponentCarrierConfig objects — The gNB node uses carrier aggregation with multiple carriers. Each element corresponds to one component carrier, where the first element is the primary carrier and subsequent elements are secondary carriers. You can configure up to 16 carriers. UE nodes initially connect to the gNB node on the primary carrier using the connectUE function. You can assign additional carriers as secondary carriers to UE nodes using the addSecondaryCarrierOnUE function.

    The nrComponentCarrierConfig constructor can return either a single object or multiple objects. For more information on how to create multiple carriers, see the CarrierFrequency and NumContiguousCarriers properties of the nrComponentCarrierConfig object.

    Note

    When you configure multiple carriers for carrier aggregation using the ComponentCarrierConfig property, the DuplexMode, CarrierFrequency, ChannelBandwidth, SubcarrierSpacing, NumResourceBlocks, DLULConfigTDD, and SRSPeriodicityUE properties of the nrGNB object do not apply. These parameters are carrier-specific, and you must configure them within the nrComponentCarrierConfig object(s).

    Since R2026a

    Node mobility model, represented as an object of a subclass of the wnet.Mobility class. The value of the Mobility property indicates the type of mobility object associated with the node, which you add using the addMobility function.

    Note

    This property value remains empty until you add a mobility model using the addMobility function.

    This property is read-only.

    Node identifier, represented as a positive integer. This value specifies a unique identifier for the node in the simulation.

    Note

    If you create and store the gNB nodes in an uninitialized matrix, the node IDs that this property allocates to the nodes can be non-sequential because of the memory allocation to the object in the matrix. For more information about memory allocation, see How MATLAB Allocates Memory.

    Data Types: double

    This property is read-only.

    Radio network temporary identifiers (RNTIs) of the UEs connected to a gNB node, represented as a vector of positive integers.

    Data Types: double

    Since R2024a

    This property is read-only.

    IDs of the UE nodes connected to the gNB node, represented as a vector of positive integers.

    Data Types: double

    Since R2024a

    This property is read-only.

    Names of the UE nodes connected to the gNB node, represented as a vector of strings.

    This property is read-only.

    MCS used for DL and UL, represented as a table. For more information about this property, see TS 38.214, table 5.1.3.1-2 [1].

    Since R2026a

    This property is read-only.

    Node velocity in 3-D Cartesian coordinates, represented as a three-element numeric row vector. The units are in meters per second. The value of the Velocity property represents the current velocity at which the node is moving.

    Data Types: double

    Since R2026b

    This property is read-only.

    Information about UE nodes per carrier, represented as a scalar structure or a vector of structures. For single carrier operation, this property value is a scalar structure. For multiple carriers (carrier aggregation), it is a vector of structures, where element i contains information about UE nodes associated with the ith carrier.

    Each structure contains these fields.

    • UERNTIs — RNTI of the UEs associated with the ith carrier, returned as vector of integers

    • UENodeIDs — ID of the UEs associated with the ith carrier, returned as vector of integers

    • UENodeNames — Name of the UEs associated with the ith carrier, returned as vector of strings

    Note

    The nrGNB object updates this property automatically when you connect the UE nodes to gNB nodes using the connectUE object function and add and activate secondary carriers on UE nodes by using the addSecondaryCarrierOnUE object function.

    Data Types: double

    Object Functions

    addSecondaryCarrierOnUEConfigure and activate secondary carriers on UE nodes
    configureSchedulerConfigure scheduler at gNB
    configureULPowerControlConfigure uplink power control parameters
    connectUEConnect one or more UEs to gNB
    addTrafficSourceAdd data traffic source to 5G NR node
    registerEventCallbackRegister callback for event from 5G node
    statisticsStatistics of gNB

    Examples

    collapse all

    Create two similar gNB nodes, one with the name "gNB1" and the other named "gNB2", positioned at [100 100 0] and [5000 100 0], respectively.

    gNBs = nrGNB(Name=["gNB1" "gNB2"],Position=[100 100 0; 5000 100 0])
    gNBs = 
      1×2 nrGNB array
    
    
    gNBs(1)
    ans = 
      nrGNB with properties:
    
                        Position: [100 100 0]
                            Name: "gNB1"
                        Mobility: []
    
       Read-only properties:
                     NoiseFigure: 6
                     ReceiveGain: 6
                   TransmitPower: 34
             NumTransmitAntennas: 1
              NumReceiveAntennas: 1
                        PHYModel: "abstract-phy"
                      DuplexMode: "FDD"
                CarrierFrequency: [2.6725e+09 2.5275e+09]
                ChannelBandwidth: 5000000
               SubcarrierSpacing: 15000
               NumResourceBlocks: 25
                         NumHARQ: 16
        ULPowerControlParameters: [1×1 struct]
                SRSPeriodicityUE: 5
          SRSMeasurementConfigDL: [1×1 struct]
          ComponentCarrierConfig: [1×1 nrComponentCarrierConfig]
            TransmitAntennaArray: [1×1 struct]
             ReceiveAntennaArray: [1×1 struct]
        TransmitArrayOrientation: [3×1 double]
         ReceiveArrayOrientation: [3×1 double]
               AntennaEfficiency: [1×1 struct]
                    ReceiverType: "mmse-irc"
                              ID: 1
                        Velocity: [0 0 0]
    
       Constant properties:
                        MCSTable: [28×4 table]
    
    
    gNBs(2)
    ans = 
      nrGNB with properties:
    
                        Position: [5000 100 0]
                            Name: "gNB2"
                        Mobility: []
    
       Read-only properties:
                     NoiseFigure: 6
                     ReceiveGain: 6
                   TransmitPower: 34
             NumTransmitAntennas: 1
              NumReceiveAntennas: 1
                        PHYModel: "abstract-phy"
                      DuplexMode: "FDD"
                CarrierFrequency: [2.6725e+09 2.5275e+09]
                ChannelBandwidth: 5000000
               SubcarrierSpacing: 15000
               NumResourceBlocks: 25
                         NumHARQ: 16
        ULPowerControlParameters: [1×1 struct]
                SRSPeriodicityUE: 5
          SRSMeasurementConfigDL: [1×1 struct]
          ComponentCarrierConfig: [1×1 nrComponentCarrierConfig]
            TransmitAntennaArray: [1×1 struct]
             ReceiveAntennaArray: [1×1 struct]
        TransmitArrayOrientation: [3×1 double]
         ReceiveArrayOrientation: [3×1 double]
               AntennaEfficiency: [1×1 struct]
                    ReceiverType: "mmse-irc"
                              ID: 2
                        Velocity: [0 0 0]
    
       Constant properties:
                        MCSTable: [28×4 table]
    
    

    Create a default gNB node.

    gnb = nrGNB
    gnb = 
      nrGNB with properties:
    
                        Position: [0 0 0]
                            Name: "Node1"
                        Mobility: []
    
       Read-only properties:
                     NoiseFigure: 6
                     ReceiveGain: 6
                   TransmitPower: 34
             NumTransmitAntennas: 1
              NumReceiveAntennas: 1
                        PHYModel: "abstract-phy"
                      DuplexMode: "FDD"
                CarrierFrequency: [2.6725e+09 2.5275e+09]
                ChannelBandwidth: 5000000
               SubcarrierSpacing: 15000
               NumResourceBlocks: 25
                         NumHARQ: 16
        ULPowerControlParameters: [1×1 struct]
                SRSPeriodicityUE: 5
          SRSMeasurementConfigDL: [1×1 struct]
          ComponentCarrierConfig: [1×1 nrComponentCarrierConfig]
            TransmitAntennaArray: [1×1 struct]
             ReceiveAntennaArray: [1×1 struct]
        TransmitArrayOrientation: [3×1 double]
         ReceiveArrayOrientation: [3×1 double]
               AntennaEfficiency: [1×1 struct]
                    ReceiverType: "mmse-irc"
                              ID: 1
                        Velocity: [0 0 0]
    
       Constant properties:
                        MCSTable: [28×4 table]
    
    

    Create a default UE node.

    ue = nrUE
    ue = 
      nrUE with properties:
    
                        Position: [0 0 0]
                            Name: "Node2"
                        Mobility: []
    
       Read-only properties:
                     NoiseFigure: 6
                     ReceiveGain: 0
                   TransmitPower: 23
             NumTransmitAntennas: 1
              NumReceiveAntennas: 1
                        PHYModel: "abstract-phy"
            NumComponentCarriers: 1
            TransmitAntennaArray: [1×1 struct]
             ReceiveAntennaArray: [1×1 struct]
        TransmitArrayOrientation: [3×1 double]
         ReceiveArrayOrientation: [3×1 double]
               AntennaEfficiency: [1×1 struct]
                    ReceiverType: "mmse-irc"
                 ConnectionState: "Idle"
                              ID: 2
                        Velocity: [0 0 0]
    
    

    Establish a connection between the UE node and the gNB node.

    connectUE(gnb,ue)

    Initialize wireless network simulator.

    networkSimulator = wirelessNetworkSimulator.init;

    Create a gNB node with these specifications.

    • Duplex mode — Time division duplex

    • Channel bandwidth — 20 MHz

    • Subcarrier spacing — 30 KHz

    gnb = nrGNB(ChannelBandwidth=20e6,DuplexMode="TDD",SubcarrierSpacing=30e3);

    Create a UE node with a transmit power of 20 dBm.

    ue = nrUE(TransmitPower=20);

    Add a random way point mobility model to the UE node.

    addMobility(ue,BoundaryShape="rectangle")

    Establish a connection between the UE and gNB nodes.

    connectUE(gnb,ue)

    Create a voice over Internet protocol (VoIP) application traffic pattern object.

    traffic = networkTrafficVoIP;

    Add the data traffic source to the gNB node. Set the destination node as the UE node.

    addTrafficSource(gnb,traffic,DestinationNode=ue)

    Add the gNB node to the wireless network simulator.

    addNodes(networkSimulator,gnb)

    Add the UE node to the wireless network simulator.

    addNodes(networkSimulator,ue)

    Specify the simulation time, in seconds.

    simulationTime = 0.3;

    Run the simulation for the specified simulation time.

    run(networkSimulator,simulationTime)

    Obtain the statistics for the gNB and UE nodes.

    gnbStats = statistics(gnb);
    ueStats = statistics(ue);

    Carrier aggregation enables the gNB and UE nodes to transmit and receive data simultaneously on multiple carriers, significantly increasing data throughput. In a 5G network, the base stations manage and allocate these carriers to the UE nodes. This example demonstrates how to configure and simulate carrier aggregation in a 5G network.

    In this example, you create:

    • One gNB node with two component carriers

    • Two UE nodes. The first UE node connects to the primary carrier only (single carrier operation), while the second UE node connects to both the primary and secondary carriers (carrier aggregation).

    To simulate the scenario, follow these steps.

    Create the network simulator.

    rng("default") % Reset the random number generator
    networkSimulator = wirelessNetworkSimulator.init
    networkSimulator = 
      wirelessNetworkSimulator with properties:
    
            CurrentTime: 0
                EndTime: 0
        ChannelFunction: "fspl"
                  Nodes: {}
    
    

    Create component carrier configurations using the nrComponentCarrierConfig object.

    % Two NR carriers in the same band
    ccConfigs = nrComponentCarrierConfig(NumContiguousCarriers=2)
    ccConfigs = 
      1×2 nrComponentCarrierConfig array
    
    

    The array contains two contiguous component carrier objects: the first corresponds to the primary carrier, and the second corresponds to the secondary carrier.

    Display the component carrier objects.

    ccConfigsPrimary = ccConfigs(1)
    ccConfigsPrimary = 
      nrComponentCarrierConfig with properties:
    
       Read-only properties:
         CarrierFrequency: [2.6725e+09 2.5275e+09]
         ChannelBandwidth: 5000000
        NumResourceBlocks: 25
        SubcarrierSpacing: 15000
               DuplexMode: "FDD"
         SRSPeriodicityUE: 5
    
    
    ccConfigsSecondary=ccConfigs(2)
    ccConfigsSecondary = 
      nrComponentCarrierConfig with properties:
    
       Read-only properties:
         CarrierFrequency: [2.6775e+09 2.5325e+09]
         ChannelBandwidth: 5000000
        NumResourceBlocks: 25
        SubcarrierSpacing: 15000
               DuplexMode: "FDD"
         SRSPeriodicityUE: 5
    
    

    Create a gNB node with multiple component carriers.

    gNB = nrGNB(ComponentCarrierConfig=ccConfigs, ...
        NumTransmitAntennas=4, ...
        NumReceiveAntennas=4);

    Configure a built-in scheduler for multiple carriers.

    configureScheduler(gNB,Scheduler="BestCQI");

    Create UE nodes with multi-carrier capability.

    ue1 = nrUE(NumTransmitAntennas=2,NumReceiveAntennas=2);
    
    ue2 = nrUE(NumComponentCarriers=2, ...  % UE can connect to two carriers
        NumTransmitAntennas=2, ...
        NumReceiveAntennas=2);
    
    ues = [ue1,ue2];

    Connect the UE nodes on the primary carrier and enable full-buffer traffic. Full-buffer traffic assumes an unlimited amount of queued data is available for transmission.

    connectUE(gNB,ues,FullBufferTraffic="on"); 

    Add the secondary carrier on the second UE node.

    addSecondaryCarrierOnUE(gNB,ue2,ccConfigs(2));

    Add the nodes to the simulator.

    addNodes(networkSimulator,gNB)
    addNodes(networkSimulator,ues)

    Run the simulation.

    simulationTime = 0.1; % Units are in seconds
    run(networkSimulator,simulationTime);

    Obtain the UE node statistics.

    ue1Stats = ue1.statistics();
    ue2Stats = ue2.statistics();

    Obtain the physical layer statistics of the first UE node.

    ue1StatsPHY = ue1Stats.PHY
    ue1StatsPHY = struct with fields:
        TransmittedPackets: 97
           ReceivedPackets: 96
            DecodeFailures: 0
    
    

    Obtain the physical layer statistics of the second UE node.

    ue2StatsPHY = ue2Stats.PHY
    ue2StatsPHY = struct with fields:
        TransmittedPackets: 194
           ReceivedPackets: 192
            DecodeFailures: 0
    
    

    The results show that the second UE node, which supports carrier aggregation, achieved twice the packet transmission and reception capacity of the first UE node, which uses only the primary carrier.

    References

    [1] 3GPP TS 38.104. “NR; Base Station (BS) radio transmission and reception.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network.

    [2] 3GPP TS 38.214. “NR; Physical layer procedures for data.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network.

    [3] 3GPP TS 38.211. “NR; Physical channels and modulation.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network.

    [4] 3GPP TS 38.321. “NR; Medium Access Control (MAC) protocol specification.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network.

    [5] 3GPP TS 38.322. “NR; Radio Link Control (RLC) protocol specification.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network.

    [6] 3GPP TS 38.213. “NR; Physical layer procedures for control.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network.

    Version History

    Introduced in R2023a

    expand all