addSecondaryCarrierOnUE
R2026bSyntax
Description
addSecondaryCarrierOnUE(
configures and activates secondary carriers for carrier aggregation on one or more user
equipment (UE) nodes connected to a next-generation Node B (gNB). Activating secondary
carriers enables a UE node to use multiple frequency bands simultaneously. gnb,ue,componentCarrierConfig)
addSecondaryCarrierOnUE(
configures secondary carriers using one or more optional name-value arguments that specify
connection parameters.gnb,ue,componentCarrierConfig,Name=Value)
You can add secondary carriers to multiple UE nodes in a single
addSecondaryCarrierOnUE function call, but these UE nodes must use
the same connection parameter values specified in the name-value arguments.
Examples
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.
Input Arguments
gNB node, specified as an nrGNB object.
UE nodes for secondary carrier assignment, specified as an nrUE
object or a vector of nrUE objects.
Secondary carrier configuration, specified as a
nrComponentCarrierConfig object or a vector of
nrComponentCarrierConfig objects.
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN, where Name is
the argument name and Value is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Example: addSecondaryCarrierOnUE(gNB,ue,ccConfigs(2),CSIReportConfig=nrCSIReportConfig(CQITable="table2"));
adds a secondary carrier to the UE node with a CSI report configuration using CQI table
2.
Channel state information reference signal (CSI-RS) reporting periodicity, in
slots, specified as a positive integer. If you do not specify
CSIReportPeriodicity, the function uses the value of CSI-RS
transmission periodicity determined by the gNB object. The UE nodes report the rank
indicator (RI), the precoding matrix indicator (PMI), and the channel quality
indicator (CQI) based on measurements taken from the CSI-RS. For more information
about the CSI-RS transmission periodicity, see the Algorithms section.
For FDD, the CSI-RS reporting periodicity must be greater than or equal to the CSI-RS transmission periodicity.
For TDD, the CSI-RS reporting periodicity must also be a multiple of the length of the DL-UL pattern.
Data Types: double
CSI report configuration, specified as an nrCSIReportConfig object.
Use this name-value argument to configure CSI report configuration for the UE. You can
configure the same CSI report configuration for multiple UEs, but configuring multiple
CSI report configurations for a single UE is not supported.
You can configure only these properties of the nrCSIReportConfig object
for the UE node.
| Property | Supported Property Value |
|---|---|
CQITable |
|
CodebookType |
|
CQIFormatIndicator |
Note Built-in schedulers, such as |
PMIFormatIndicator |
|
SubbandSize |
Note The allowed values for The system does not support sub-band measurements with multi-user (MU) multiple-input multiple-output (MIMO). |
CodebookMode |
|
CodebookSubsetRestriction |
|
I2Restriction |
|
RIRestriction |
|
NumberOfBeams |
|
PhaseAlphabetSize |
|
ParameterCombination |
|
Version History
Introduced in R2026b
See Also
Objects
nrGNB|nrUE|nrComponentCarrierConfig|wirelessNetworkSimulator(Wireless Network Toolbox)
Functions
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Sélectionner un site web
Choisissez un site web pour accéder au contenu traduit dans votre langue (lorsqu'il est disponible) et voir les événements et les offres locales. D’après votre position, nous vous recommandons de sélectionner la région suivante : .
Vous pouvez également sélectionner un site web dans la liste suivante :
Comment optimiser les performances du site
Pour optimiser les performances du site, sélectionnez la région Chine (en chinois ou en anglais). Les sites de MathWorks pour les autres pays ne sont pas optimisés pour les visites provenant de votre région.
Amériques
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)