5G/NR  -  Power Control Power Control   In a big picture, the power control of 3G(WCDMA/HSPA) , 4G(LTE) and 5G(NR) are almost same. If you have a good understandings on power control concept and mechnisnm of 3G or 4G, you will not have much difficulties in understanding 5G power control. If you are not familiar with the power control concept and mechanism, I would suggest you to read LTE Power control page since I write a lot of basic concept in the page and then read this page. (It is not required, but it will be good to read 3G power control page as well).   As in 3G and 4G, in 5G as well Power Control happens in two different mode. One is Open Loop Control and the other is Closed Loop Control.   Simply put, Open Loop Control is a mechnism to determin PRACH transmission power and Closed Loop Control is a mechanism of PUCCH or PUSCH channel power while a UE is in communication (connection) stage.   In reality, it would be almost impossible for you to manually calculate the exact power as described in the specification unless you are the baseband and RF firmware engineer who need to implement the power control algorithm. There are so many parameters involved in this process.  What we can do is just to get some big picture of the algorithm and understand what kind of factors are involved.         Main part of PRACH power is defined in 38.213-7.4 as follows and you need to refer to several other specification for complete understanding of the equation.   This equation simply says i) Calculate P_PRACH,target,f,c + PL_b,f,c ii) Compare the calculated power(P_PRACH,target,f,c + PL_b,f,c) with P_CMAX,f,c iii) If the calculated power(P_PRACH,target,f,c + PL_b,f,c) is greater than P_CMAX,f,c, use P_CMAX,f,c. If the calculated poewr is lower than P_CMAX,f,c, then use the calculated power.   Sound simple ? Yes, it only SOUND Simple.. not really simple because the calculation of P_PRACH,target,f,c is pretty complicated as explained in this page and it involves many lower layer parameters which is not readily open to you.         P-EMAX,c : determined by p-Max in RRC message P_PowerClass : specified in the following table.   < 38.101-1 : Table 6.2.1-1: UE Power Class >   < 38.101-2 v15.3 Table 6.2.1.1-2: UE maximum output power limits for power class 1 >   < 38.101-2 v15.3 Table 6.2.1.2-2: UE maximum output power limits for power class 2 >   < 38.101-2 v15.3 Table 6.2.1.2-2: UE maximum output power limits for power class 2 >       The description in this section is largely based on 38.213 - 7.4     Case 1 : In one of the following condition PRACH transmission from a UE is not in response to a detection of a PDCCH order by the UE PRACH transmission from a UE is in response to a detection of a PDCCH order by the UE that triggers a contention based random access procedure PRACH transmission from a UE is associated with a link recovery procedure where a corresponding index q_new is associated with a SS/PBCH block   Then, referenceSignalPower is determined by ss-PBCH-BlockPower     Case 2 : In one of the following condition PRACH transmission from a UE is in response to a detection of a PDCCH order by the UE that triggers a noncontention based random access procedure and depends the DL RS that the DM-RS of the PDCCH order is quasicollocated.   Then, referenceSignalPower is determined by ss-PBCH-BlockPower     Case 3 : In one of the following condition PRACH transmission from a UE is in response to a detection of a PDCCH order by the UE that triggers a noncontention based random access procedure and the UE is configured resources for a periodic CSI-RS reception or the PRACH transmission is associated with a link recovery procedure where a corresponding index q_new is associated with a periodic CSI-RS configuration.   Then, referenceSignalPower is determined by ss-PBCH-BlockPower and powerControlOffsetSS , where powerControlOffsetSS (in RRC) is an offset of CSI-RS transmission power relative to SS/PBCH block transmission power.         if powerControlOffsetSS is not provided by RRC, UE assumes that this value is 0 dB     < Determination of PREAMBLE_RECEIVED_TARGET_POWER >   PREAMBLE_RECEIVED_TARGET_POWER is determined by following equation (38.321 - 5.1.3) PREAMBLE_RECEIVED_TARGET_POWER = preambleReceivedTargetPower (in RRC)    + DELTA_PREAMBLE    + (PREAMBLE_POWER_RAMPING_COUNTER – 1) × PREAMBLE_POWER_RAMPING_STEP preambleReceivedTargetPower is a RRC parameter in RACH-ConfigGeneric, PREAMBLE_POWER_RAMPING_STEP is specified by the RRC Parameter powerRampingStep  and DELTA_PREAMBLE is determined by pre-defined tables as shown below. PREAMBLE_POWER_RAMPING_COUNTER starts from 1 and gets incremented by 1 everytime PRACH is retransmited until it reaches the RRC parameter preambleTransMax.      < 38.321 V15.3.0 - Table 7.3-1: DELTA_PREAMBLE values for long preamble formats. >     < 38.321 V15.3.0 - Table 7.3-2: DELTA_PREAMBLE values for short preamble formats. >         msg3 Power is determined by following equation. msg3 Power = PRACH Power + (2 x msg3-DeltaPreamble)       How PUSCH Power is determined ?       < 38.213 - Table 7.1.1-1: Mapping of TPC Command Field in a DCI format scheduling a PUSCH transmission, or in DCI format 2_2 with CRC scrambled by TPC-PUSCH-RNTI, or in DCI format 2_3, to absolute and accumulated δ_PUSCH,b,f,c values or δ_SRS,b,f,c values >     < 38.213 - Table 7.2.1-1: Mapping of TPC Command Field in a DCI format to accumulated δ_PUCCH,b,f,c values >       RRC Parameters involved in Power Control   38.331 v15.3.0   FrequencyInfoUL-SIB ::=           SEQUENCE {     frequencyBandList               MultiFrequencyBandListNR-SIB     OPTIONAL,   -- Cond FDD-OrSUL     absoluteFrequencyPointA         ARFCN-ValueNR             OPTIONAL,   -- Cond FDD-OrSUL     scs-SpecificCarrierList         SEQUENCE (SIZE (1..maxSCSs)) OF SCS-SpecificCarrier,     p-Max                           P-Max         OPTIONAL,   -- Need S     frequencyShift7p5khz            ENUMERATED {true}  OPTIONAL,   -- Cond FDD-OrSUL-Optional     ... }   ServingCellConfigCommonSIB ::=      SEQUENCE {     downlinkConfigCommon                DownlinkConfigCommonSIB,     uplinkConfigCommon                  UplinkConfigCommonSIB   OPTIONAL,   -- Need R     supplementaryUplink                 UplinkConfigCommonSIB   OPTIONAL,   -- Need R     n-TimingAdvanceOffset               ENUMERATED { n0, n25560, n39936 }   OPTIONAL, -- Need S     ssb-PositionsInBurst                    SEQUENCE {         inOneGroup                          BIT STRING (SIZE (8)),         groupPresence                       BIT STRING (SIZE (8))                                       OPTIONAL -- Cond Above6GHzOnly     },     ssb-PeriodicityServingCell          ENUMERATED {ms5, ms10, ms20, ms40, ms80, ms160},     tdd-UL-DL-ConfigurationCommon       TDD-UL-DL-ConfigCommon    OPTIONAL, -- Cond TDD     ss-PBCH-BlockPower                  INTEGER (-60..50),     ... }   RACH-ConfigGeneric ::=          SEQUENCE {     prach-ConfigurationIndex         INTEGER (0..255),     msg1-FDM                         ENUMERATED {one, two, four, eight},     msg1-FrequencyStart              INTEGER (0..maxNrofPhysicalResourceBlocks-1),     zeroCorrelationZoneConfig        INTEGER(0..15),     preambleReceivedTargetPower      INTEGER (-200..-74),     preambleTransMax                 ENUMERATED {n3,n4,n5,n6,n7,n8,n10,n20,n50,n100,n200},     powerRampingStep                 ENUMERATED {dB0, dB2, dB4, dB6},     ra-ResponseWindow                ENUMERATED {sl1, sl2, sl4, sl8, sl10, sl20, sl40, sl80} }   NZP-CSI-RS-Resource ::= SEQUENCE {     nzp-CSI-RS-ResourceId                 NZP-CSI-RS-ResourceId,     resourceMapping                       CSI-RS-ResourceMapping,     powerControlOffset                    INTEGER (-8..15),     powerControlOffsetSS                  ENUMERATED{db-3, db0, db3, db6},     scramblingID ScramblingId,     periodicityAndOffset                  CSI-ResourcePeriodicityAndOffset     qcl-InfoPeriodicCSI-RS                TCI-StateId OPTIONAL, -- Cond Periodic     ... }     PUSCH-ConfigCommon ::= SEQUENCE {     groupHoppingEnabledTransformPrecoding       ENUMERATED {enabled} OPTIONAL,     pusch-TimeDomainAllocationList              PUSCH-TimeDomainResourceAllocationList     msg3-DeltaPreamble                          INTEGER (-1..6)     p0-NominalWithGrant                         INTEGER (-202..24)     ... }     PUSCH-Config ::= SEQUENCE {     dataScramblingIdentityPUSCH                 INTEGER (0..1023) OPTIONAL,     txConfig                                    ENUMERATED {codebook, nonCodebook}     dmrs-UplinkForPUSCH-MappingTypeA            SetupRelease { DMRS-UplinkConfig }     dmrs-UplinkForPUSCH-MappingTypeB            SetupRelease { DMRS-UplinkConfig }     pusch-PowerControl                          PUSCH-PowerControl     frequencyHopping                            ENUMERATED {intraSlot, interSlot}     frequencyHoppingOffsetLists                 SEQUENCE (SIZE (1..4)) OF                                                      INTEGER (1.. maxNrofPhysicalResourceBlocks-1)     resourceAllocation                          ENUMERATED { resourceAllocationType0,                                                              resourceAllocationType1,                                                              dynamicSwitch},     pusch-TimeDomainAllocationList              SetupRelease {                                                          PUSCH-TimeDomainResourceAllocationList                                                 }     pusch-AggregationFactor                     ENUMERATED { n2, n4, n8 }     mcs-Table                                   ENUMERATED {qam256, qam64LowSE}     mcs-TableTransformPrecoder                  ENUMERATED {qam256, qam64LowSE}     transformPrecoder                         ENUMERATED {enabled, disabled}     codebookSubset                              ENUMERATED {fullyAndPartialAndNonCoherent,                                                             partialAndNonCoherent,                                                             nonCoherent}     maxRank                                     INTEGER (1..4)     rbg-Size                                    ENUMERATED { config2}     uci-OnPUSCH                                 SetupRelease { UCI-OnPUSCH }     tp-pi2BPSK                                  ENUMERATED {enabled}     ... }     PUSCH-PowerControl ::= SEQUENCE {    tpc-Accumulation                   ENUMERATED { disabled } OPTIONAL, -- Need S    msg3-Alpha                         Alpha   OPTIONAL, -- Need S    p0-NominalWithoutGrant             INTEGER (-202..24) OPTIONAL, -- Need M    p0-AlphaSets                       SEQUENCE (SIZE (1..maxNrofP0-PUSCH-AlphaSets))                                                OF P0-PUSCH-AlphaSet OPTIONAL, -- Need M    pathlossReferenceRSToAddModList    SEQUENCE (SIZE (1..maxNrofPUSCH-PathlossReferenceRSs))                                                OF PUSCH-PathlossReferenceRS    OPTIONAL,    pathlossReferenceRSToReleaseList   SEQUENCE (SIZE (1..maxNrofPUSCH-PathlossReferenceRSs))                                                OF    PUSCH-PathlossReferenceRS-Id OPTIONAL,    twoPUSCH-PC-AdjustmentStates       ENUMERATED {twoStates}    OPTIONAL, -- Need S    deltaMCS                           ENUMERATED {enabled}       OPTIONAL, -- Need S    sri-PUSCH-MappingToAddModList      SEQUENCE (SIZE (1..maxNrofSRI-PUSCH-Mappings))                                                OF SRI-PUSCH-PowerControl OPTIONAL, -- Need N    sri-PUSCH-MappingToReleaseList     SEQUENCE (SIZE (1..maxNrofSRI-PUSCH-Mappings))                                                OF SRI-PUSCH-PowerControlId OPTIONAL -- Need N }     P0-PUSCH-AlphaSet ::= SEQUENCE {    p0-PUSCH-AlphaSetId                P0-PUSCH-AlphaSetId,    p0                                 INTEGER (-16..15) OPTIONAL, -- Need S    alpha                              Alpha OPTIONAL -- Need S }   Alpha ::= ENUMERATED {alpha0, alpha04, alpha05, alpha06, alpha07, alpha08, alpha09, alpha1}   P0-PUSCH-AlphaSetId ::= INTEGER (0..maxNrofP0-PUSCH-AlphaSets-1)   PUSCH-PathlossReferenceRS ::= SEQUENCE {    pusch-PathlossReferenceRS-Id       PUSCH-PathlossReferenceRS-Id,    referenceSignal CHOICE {       ssb-Index                       SSB-Index,       csi-RS-Index                    NZP-CSI-RS-ResourceId    } }     PUSCH-PathlossReferenceRS-Id ::= INTEGER (0..maxNrofPUSCH-PathlossReferenceRSs-1)   SRI-PUSCH-PowerControl ::= SEQUENCE {    sri-PUSCH-PowerControlId           SRI-PUSCH-PowerControlId,    sri-PUSCH-PathlossReferenceRS-Id   PUSCH-PathlossReferenceRS-Id,    sri-P0-PUSCH-AlphaSetId            P0-PUSCH-AlphaSetId,    sri-PUSCH-ClosedLoopIndex          ENUMERATED { i0, i1 } }   SRI-PUSCH-PowerControlId ::= INTEGER (0..maxNrofSRI-PUSCH-Mappings-1)   BetaOffsets ::= SEQUENCE {    betaOffsetACK-Index1           INTEGER(0..31) OPTIONAL, -- Need S    betaOffsetACK-Index2           INTEGER(0..31) OPTIONAL, -- Need S    betaOffsetACK-Index3           INTEGER(0..31) OPTIONAL, -- Need S    betaOffsetCSI-Part1-Index1     INTEGER(0..31) OPTIONAL, -- Need S    betaOffsetCSI-Part1-Index2     INTEGER(0..31) OPTIONAL, -- Need S    betaOffsetCSI-Part2-Index1     INTEGER(0..31) OPTIONAL, -- Need S    betaOffsetCSI-Part2-Index2     INTEGER(0..31) OPTIONAL -- Need S }     PUCCH-Config ::=        SEQUENCE {     resourceSetToAddModList         SEQUENCE (SIZE (1..maxNrofPUCCH-ResourceSets)) OF                                              PUCCH-ResourceSet             OPTIONAL,   -- Need N     resourceSetToReleaseList        SEQUENCE (SIZE (1..maxNrofPUCCH-ResourceSets)) OF                                              PUCCH-ResourceSetId           OPTIONAL,   -- Need N     resourceToAddModList            SEQUENCE (SIZE (1..maxNrofPUCCH-Resources)) OF                                              PUCCH-Resource               OPTIONAL,   -- Need N     resourceToReleaseList           SEQUENCE (SIZE (1..maxNrofPUCCH-Resources)) OF                                              PUCCH-ResourceId             OPTIONAL,   -- Need N     format1                         SetupRelease { PUCCH-FormatConfig }  OPTIONAL,   -- Need M     format2                         SetupRelease { PUCCH-FormatConfig }  OPTIONAL,   -- Need M     format3                         SetupRelease { PUCCH-FormatConfig }  OPTIONAL,   -- Need M     format4                         SetupRelease { PUCCH-FormatConfig }  OPTIONAL,   -- Need M       schedulingRequestResourceToAddModList   SEQUENCE (SIZE (1..maxNrofSR-Resources)) OF                                    SchedulingRequestResourceConfig     OPTIONAL, -- Need M     schedulingRequestResourceToReleaseList  SEQUENCE (SIZE (1..maxNrofSR-Resources)) OF                                    SchedulingRequestResourceId         OPTIONAL, -- Need M       multi-CSI-PUCCH-ResourceList   SEQUENCE (SIZE (1..2)) OF PUCCH-ResourceId  OPTIONAL,-- Need M     dl-DataToUL-ACK                SEQUENCE (SIZE (8)) OF INTEGER (0..15)   OPTIONAL,   -- Need M     spatialRelationInfoToAddModList    SEQUENCE (SIZE (1..maxNrofSpatialRelationInfos)) OF                                        PUCCH-SpatialRelationInfo   OPTIONAL,   -- Need N     spatialRelationInfoToReleaseList   SEQUENCE (SIZE (1..maxNrofSpatialRelationInfos)) OF                                        PUCCH-SpatialRelationInfoId OPTIONAL,   -- Need N       pucch-PowerControl                 PUCCH-PowerControl   OPTIONAL,   -- Need M     ... }     PUCCH-PowerControl ::= SEQUENCE {    deltaF-PUCCH-f0                INTEGER (-16..15) OPTIONAL, -- Need R    deltaF-PUCCH-f1                INTEGER (-16..15) OPTIONAL, -- Need R    deltaF-PUCCH-f2                INTEGER (-16..15) OPTIONAL, -- Need R    deltaF-PUCCH-f3                INTEGER (-16..15) OPTIONAL, -- Need R    deltaF-PUCCH-f4                INTEGER (-16..15) OPTIONAL, -- Need R    p0-Set                         SEQUENCE (SIZE (1..maxNrofPUCCH-P0-PerSet))                                             OF P0-PUCCH OPTIONAL, -- Need M    pathlossReferenceRSs           SEQUENCE (SIZE (1..maxNrofPUCCH-PathlossReferenceRSs))                                             OF PUCCH-PathlossReferenceRS OPTIONAL, -- Need M    twoPUCCH-PC-AdjustmentStates   ENUMERATED {twoStates} OPTIONAL, -- Need S    ... }   P0-PUCCH ::= SEQUENCE {    p0-PUCCH-Id                    P0-PUCCH-Id,    p0-PUCCH-Value                 INTEGER (-16..15) }   P0-PUCCH-Id ::= INTEGER (1..8)   PUCCH-PathlossReferenceRS ::= SEQUENCE {    pucch-PathlossReferenceRS-Id    PUCCH-PathlossReferenceRS-Id,    referenceSignal CHOICE {       ssb-Index                    SSB-Index,       csi-RS-Index                 NZP-CSI-RS-ResourceId    } }       Reference   [1]