View | Details | Raw Unified | Return to bug 2988
Collapse All | Expand All

(-)a/src/lte/bindings/modulegen__gcc_ILP32.py (-2 / +11 lines)
 Lines 8163-8172   def register_Ns3LteSpectrumValueHelper_methods(root_module, cls): Link Here 
8163
                   'ns3::Ptr< ns3::SpectrumModel >', 
8163
                   'ns3::Ptr< ns3::SpectrumModel >', 
8164
                   [param('uint32_t', 'earfcn'), param('uint8_t', 'bandwidth')], 
8164
                   [param('uint32_t', 'earfcn'), param('uint8_t', 'bandwidth')], 
8165
                   is_static=True)
8165
                   is_static=True)
8166
    ## lte-spectrum-value-helper.h (module 'lte'): static uint16_t ns3::LteSpectrumValueHelper::GetUplinkCarrierBand(uint32_t nDl) [member function]
8166
    ## lte-spectrum-value-helper.h (module 'lte'): static uint16_t ns3::LteSpectrumValueHelper::GetUplinkCarrierBand(uint32_t nUl) [member function]
8167
    cls.add_method('GetUplinkCarrierBand', 
8167
    cls.add_method('GetUplinkCarrierBand', 
8168
                   'uint16_t', 
8168
                   'uint16_t', 
8169
                   [param('uint32_t', 'nDl')], 
8169
                   [param('uint32_t', 'nUl')], 
8170
                   is_static=True)
8170
                   is_static=True)
8171
    ## lte-spectrum-value-helper.h (module 'lte'): static double ns3::LteSpectrumValueHelper::GetUplinkCarrierFrequency(uint32_t earfcn) [member function]
8171
    ## lte-spectrum-value-helper.h (module 'lte'): static double ns3::LteSpectrumValueHelper::GetUplinkCarrierFrequency(uint32_t earfcn) [member function]
8172
    cls.add_method('GetUplinkCarrierFrequency', 
8172
    cls.add_method('GetUplinkCarrierFrequency', 
 Lines 8371-8376   def register_Ns3LteUeCphySapProvider_methods(root_module, cls): Link Here 
8371
                   'void', 
8371
                   'void', 
8372
                   [param('uint16_t', 'rnti')], 
8372
                   [param('uint16_t', 'rnti')], 
8373
                   is_pure_virtual=True, is_virtual=True)
8373
                   is_pure_virtual=True, is_virtual=True)
8374
    ## lte-ue-cphy-sap.h (module 'lte'): void ns3::LteUeCphySapProvider::SetRsrpFilterCoefficient(uint8_t rsrpFilterCoefficient) [member function]
8375
    cls.add_method('SetRsrpFilterCoefficient', 
8376
                   'void', 
8377
                   [param('uint8_t', 'rsrpFilterCoefficient')], 
8378
                   is_pure_virtual=True, is_virtual=True)
8374
    ## lte-ue-cphy-sap.h (module 'lte'): void ns3::LteUeCphySapProvider::SetSrsConfigurationIndex(uint16_t srcCi) [member function]
8379
    ## lte-ue-cphy-sap.h (module 'lte'): void ns3::LteUeCphySapProvider::SetSrsConfigurationIndex(uint16_t srcCi) [member function]
8375
    cls.add_method('SetSrsConfigurationIndex', 
8380
    cls.add_method('SetSrsConfigurationIndex', 
8376
                   'void', 
8381
                   'void', 
 Lines 20189-20194   def register_Ns3LteUePowerControl_methods(root_module, cls): Link Here 
20189
    cls.add_method('SetRsrp', 
20194
    cls.add_method('SetRsrp', 
20190
                   'void', 
20195
                   'void', 
20191
                   [param('double', 'value')])
20196
                   [param('double', 'value')])
20197
    ## lte-ue-power-control.h (module 'lte'): void ns3::LteUePowerControl::SetRsrpFilterCoefficient(uint8_t rsrpFilterCoefficient) [member function]
20198
    cls.add_method('SetRsrpFilterCoefficient', 
20199
                   'void', 
20200
                   [param('uint8_t', 'rsrpFilterCoefficient')])
20192
    ## lte-ue-power-control.h (module 'lte'): void ns3::LteUePowerControl::SetTxPower(double value) [member function]
20201
    ## lte-ue-power-control.h (module 'lte'): void ns3::LteUePowerControl::SetTxPower(double value) [member function]
20193
    cls.add_method('SetTxPower', 
20202
    cls.add_method('SetTxPower', 
20194
                   'void', 
20203
                   'void', 
(-)a/src/lte/bindings/modulegen__gcc_LP64.py (-2 / +11 lines)
 Lines 8163-8172   def register_Ns3LteSpectrumValueHelper_methods(root_module, cls): Link Here 
8163
                   'ns3::Ptr< ns3::SpectrumModel >', 
8163
                   'ns3::Ptr< ns3::SpectrumModel >', 
8164
                   [param('uint32_t', 'earfcn'), param('uint8_t', 'bandwidth')], 
8164
                   [param('uint32_t', 'earfcn'), param('uint8_t', 'bandwidth')], 
8165
                   is_static=True)
8165
                   is_static=True)
8166
    ## lte-spectrum-value-helper.h (module 'lte'): static uint16_t ns3::LteSpectrumValueHelper::GetUplinkCarrierBand(uint32_t nDl) [member function]
8166
    ## lte-spectrum-value-helper.h (module 'lte'): static uint16_t ns3::LteSpectrumValueHelper::GetUplinkCarrierBand(uint32_t nUl) [member function]
8167
    cls.add_method('GetUplinkCarrierBand', 
8167
    cls.add_method('GetUplinkCarrierBand', 
8168
                   'uint16_t', 
8168
                   'uint16_t', 
8169
                   [param('uint32_t', 'nDl')], 
8169
                   [param('uint32_t', 'nUl')], 
8170
                   is_static=True)
8170
                   is_static=True)
8171
    ## lte-spectrum-value-helper.h (module 'lte'): static double ns3::LteSpectrumValueHelper::GetUplinkCarrierFrequency(uint32_t earfcn) [member function]
8171
    ## lte-spectrum-value-helper.h (module 'lte'): static double ns3::LteSpectrumValueHelper::GetUplinkCarrierFrequency(uint32_t earfcn) [member function]
8172
    cls.add_method('GetUplinkCarrierFrequency', 
8172
    cls.add_method('GetUplinkCarrierFrequency', 
 Lines 8371-8376   def register_Ns3LteUeCphySapProvider_methods(root_module, cls): Link Here 
8371
                   'void', 
8371
                   'void', 
8372
                   [param('uint16_t', 'rnti')], 
8372
                   [param('uint16_t', 'rnti')], 
8373
                   is_pure_virtual=True, is_virtual=True)
8373
                   is_pure_virtual=True, is_virtual=True)
8374
    ## lte-ue-cphy-sap.h (module 'lte'): void ns3::LteUeCphySapProvider::SetRsrpFilterCoefficient(uint8_t rsrpFilterCoefficient) [member function]
8375
    cls.add_method('SetRsrpFilterCoefficient', 
8376
                   'void', 
8377
                   [param('uint8_t', 'rsrpFilterCoefficient')], 
8378
                   is_pure_virtual=True, is_virtual=True)
8374
    ## lte-ue-cphy-sap.h (module 'lte'): void ns3::LteUeCphySapProvider::SetSrsConfigurationIndex(uint16_t srcCi) [member function]
8379
    ## lte-ue-cphy-sap.h (module 'lte'): void ns3::LteUeCphySapProvider::SetSrsConfigurationIndex(uint16_t srcCi) [member function]
8375
    cls.add_method('SetSrsConfigurationIndex', 
8380
    cls.add_method('SetSrsConfigurationIndex', 
8376
                   'void', 
8381
                   'void', 
 Lines 20189-20194   def register_Ns3LteUePowerControl_methods(root_module, cls): Link Here 
20189
    cls.add_method('SetRsrp', 
20194
    cls.add_method('SetRsrp', 
20190
                   'void', 
20195
                   'void', 
20191
                   [param('double', 'value')])
20196
                   [param('double', 'value')])
20197
    ## lte-ue-power-control.h (module 'lte'): void ns3::LteUePowerControl::SetRsrpFilterCoefficient(uint8_t rsrpFilterCoefficient) [member function]
20198
    cls.add_method('SetRsrpFilterCoefficient', 
20199
                   'void', 
20200
                   [param('uint8_t', 'rsrpFilterCoefficient')])
20192
    ## lte-ue-power-control.h (module 'lte'): void ns3::LteUePowerControl::SetTxPower(double value) [member function]
20201
    ## lte-ue-power-control.h (module 'lte'): void ns3::LteUePowerControl::SetTxPower(double value) [member function]
20193
    cls.add_method('SetTxPower', 
20202
    cls.add_method('SetTxPower', 
20194
                   'void', 
20203
                   'void', 
(-)a/src/lte/model/lte-ue-cphy-sap.h (+16 lines)
 Lines 144-149   public: Link Here 
144
   */
144
   */
145
  virtual void SetPa (double pa) = 0;
145
  virtual void SetPa (double pa) = 0;
146
146
147
  /**
148
   * \param rsrpFilterCoefficient value. Determines the strength of
149
   * smoothing effect induced by layer 3 filtering of RSRP
150
   * used for uplink power control in all attached UE.
151
   * If equals to 0, no layer 3 filtering is applicable.
152
   */
153
  virtual void SetRsrpFilterCoefficient (uint8_t rsrpFilterCoefficient) = 0;
154
147
};
155
};
148
156
149
157
 Lines 244-249   public: Link Here 
244
  virtual void SetTransmissionMode (uint8_t txMode);
252
  virtual void SetTransmissionMode (uint8_t txMode);
245
  virtual void SetSrsConfigurationIndex (uint16_t srcCi);
253
  virtual void SetSrsConfigurationIndex (uint16_t srcCi);
246
  virtual void SetPa (double pa);
254
  virtual void SetPa (double pa);
255
  virtual void SetRsrpFilterCoefficient (uint8_t rsrpFilterCoefficient);
247
256
248
private:
257
private:
249
  MemberLteUeCphySapProvider ();
258
  MemberLteUeCphySapProvider ();
 Lines 338-343   MemberLteUeCphySapProvider<C>::SetPa (double pa) Link Here 
338
  m_owner->DoSetPa (pa);
347
  m_owner->DoSetPa (pa);
339
}
348
}
340
349
350
template <class C>
351
void
352
MemberLteUeCphySapProvider<C>::SetRsrpFilterCoefficient (uint8_t rsrpFilterCoefficient)
353
{
354
  m_owner->DoSetRsrpFilterCoefficient (rsrpFilterCoefficient);
355
}
356
341
357
342
/**
358
/**
343
 * Template for the implementation of the LteUeCphySapUser as a member
359
 * Template for the implementation of the LteUeCphySapUser as a member
(-)a/src/lte/model/lte-ue-phy.cc (+7 lines)
 Lines 1356-1361   LteUePhy::DoSetPa (double pa) Link Here 
1356
}
1356
}
1357
1357
1358
void 
1358
void 
1359
LteUePhy::DoSetRsrpFilterCoefficient (uint8_t rsrpFilterCoefficient)
1360
{
1361
  NS_LOG_FUNCTION (this << (uint16_t) (rsrpFilterCoefficient));
1362
  m_powerControl->SetRsrpFilterCoefficient (rsrpFilterCoefficient);
1363
}
1364
1365
void
1359
LteUePhy::SetTxMode1Gain (double gain)
1366
LteUePhy::SetTxMode1Gain (double gain)
1360
{
1367
{
1361
  SetTxModeGain (1, gain);
1368
  SetTxModeGain (1, gain);
(-)a/src/lte/model/lte-ue-phy.h (-1 / +8 lines)
 Lines 419-425   private: Link Here 
419
  void DoConfigureUplink (uint32_t ulEarfcn, uint8_t ulBandwidth);
419
  void DoConfigureUplink (uint32_t ulEarfcn, uint8_t ulBandwidth);
420
  /**
420
  /**
421
   * Configure reference signal power function
421
   * Configure reference signal power function
422
   * \param referenceSignalPower reference signal power
422
   * \param referenceSignalPower reference signal power in dBm
423
   */
423
   */
424
  void DoConfigureReferenceSignalPower (int8_t referenceSignalPower);
424
  void DoConfigureReferenceSignalPower (int8_t referenceSignalPower);
425
  /**
425
  /**
 Lines 442-447   private: Link Here 
442
   * \param pa the PA value
442
   * \param pa the PA value
443
   */
443
   */
444
  void DoSetPa (double pa);
444
  void DoSetPa (double pa);
445
  /**
446
   * \param rsrpFilterCoefficient value. Determines the strength of
447
   * smoothing effect induced by layer 3 filtering of RSRP
448
   * used for uplink power control in all attached UE.
449
   * If equals to 0, no layer 3 filtering is applicable.
450
   */
451
  void DoSetRsrpFilterCoefficient (uint8_t rsrpFilterCoefficient);
445
452
446
  // UE PHY SAP methods 
453
  // UE PHY SAP methods 
447
  virtual void DoSendMacPdu (Ptr<Packet> p);
454
  virtual void DoSendMacPdu (Ptr<Packet> p);
(-)a/src/lte/model/lte-ue-power-control.cc (-2 / +11 lines)
 Lines 48-53   LteUePowerControl::LteUePowerControl () Link Here 
48
48
49
  m_M_Pusch = 0;
49
  m_M_Pusch = 0;
50
  m_rsrpSet = false;
50
  m_rsrpSet = false;
51
  m_pcRsrpFilterCoefficient = 4; //Default value similar to the eNB (see lte-enb-rrc.cc)
51
}
52
}
52
53
53
LteUePowerControl::~LteUePowerControl ()
54
LteUePowerControl::~LteUePowerControl ()
 Lines 260-271   LteUePowerControl::SetRsrp (double value) Link Here 
260
      return;
261
      return;
261
    }
262
    }
262
263
263
  double coeff = 0.7;
264
  double alphaRsrp = std::pow (0.5, m_pcRsrpFilterCoefficient / 4.0);
264
  m_rsrp = coeff * m_rsrp + (1 - coeff) * value;
265
  m_rsrp = (1 - alphaRsrp) * m_rsrp + alphaRsrp * value;
266
265
  m_pathLoss = m_referenceSignalPower - m_rsrp;
267
  m_pathLoss = m_referenceSignalPower - m_rsrp;
266
}
268
}
267
269
268
void
270
void
271
LteUePowerControl::SetRsrpFilterCoefficient (uint8_t rsrpFilterCoefficient)
272
{
273
  NS_LOG_FUNCTION (this);
274
  m_pcRsrpFilterCoefficient = rsrpFilterCoefficient;
275
}
276
277
void
269
LteUePowerControl::ReportTpc (uint8_t tpc)
278
LteUePowerControl::ReportTpc (uint8_t tpc)
270
{
279
{
271
  NS_LOG_FUNCTION (this);
280
  NS_LOG_FUNCTION (this);
(-)a/src/lte/model/lte-ue-power-control.h (-5 / +20 lines)
 Lines 87-93   public: Link Here 
87
   */
87
   */
88
  void SetTxPower (double value);
88
  void SetTxPower (double value);
89
  /**
89
  /**
90
   * \brief Configure reference signal power function
90
   * \brief Configure reference signal power (dBm) function
91
   *
91
   *
92
   * \param referenceSignalPower the reference signal power
92
   * \param referenceSignalPower the reference signal power
93
   */
93
   */
 Lines 128-139   public: Link Here 
128
  /**
128
  /**
129
   * \brief Set RSRP function
129
   * \brief Set RSRP function
130
   *
130
   *
131
   * \param value the RSRP value to set
131
   * \param value the RSRP (dBm) value to set
132
   */
132
   */
133
  void SetRsrp (double value);
133
  void SetRsrp (double value);
134
  /**
134
  /**
135
   * \brief Set RSRP function
135
   * \brief Set RSRP function
136
   *
136
   *
137
   * \param rsrpFilterCoefficient value. Determines the strength of
138
   * smoothing effect induced by layer 3 filtering of RSRP
139
   * used for uplink power control in all attached UE.
140
   * If equals to 0, no layer 3 filtering is applicable.
141
   */
142
  void SetRsrpFilterCoefficient (uint8_t rsrpFilterCoefficient);
143
  /**
144
   * \brief Set RSRP function
145
   *
137
   * \param tpc the TPC to report
146
   * \param tpc the TPC to report
138
   */
147
   */
139
  void ReportTpc (uint8_t tpc);
148
  void ReportTpc (uint8_t tpc);
 Lines 193-201   private: Link Here 
193
  double m_curPucchTxPower; ///< current PUCCH transmit power
202
  double m_curPucchTxPower; ///< current PUCCH transmit power
194
  double m_curSrsTxPower; ///< current SRS transmit power
203
  double m_curSrsTxPower; ///< current SRS transmit power
195
204
196
  double m_referenceSignalPower; ///< reference signal power
205
  double m_referenceSignalPower; ///< reference signal power in dBm
197
  bool m_rsrpSet; ///< is RSRP set?
206
  bool m_rsrpSet; ///< is RSRP set?
198
  double m_rsrp; ///< RSRP value
207
  double m_rsrp; ///< RSRP value in dBm
199
208
200
  std::vector<int16_t> m_PoNominalPusch; ///< PO nominal PUSCH
209
  std::vector<int16_t> m_PoNominalPusch; ///< PO nominal PUSCH
201
  std::vector<int16_t> m_PoUePusch; ///< PO US PUSCH
210
  std::vector<int16_t> m_PoUePusch; ///< PO US PUSCH
 Lines 204-210   private: Link Here 
204
213
205
  uint16_t m_M_Pusch; ///< size of DL RB list
214
  uint16_t m_M_Pusch; ///< size of DL RB list
206
  std::vector<double> m_alpha; ///< alpha values
215
  std::vector<double> m_alpha; ///< alpha values
207
  double m_pathLoss; ///< path loss value
216
  double m_pathLoss; ///< path loss value in dB
208
  double m_deltaTF; ///< delta TF
217
  double m_deltaTF; ///< delta TF
209
218
210
  std::vector<int8_t> m_deltaPusch; ///< delta PUSCH
219
  std::vector<int8_t> m_deltaPusch; ///< delta PUSCH
 Lines 218-223   private: Link Here 
218
  uint16_t m_cellId; ///< cell ID
227
  uint16_t m_cellId; ///< cell ID
219
  uint16_t m_rnti; ///< RNTI
228
  uint16_t m_rnti; ///< RNTI
220
  /**
229
  /**
230
  * The `RsrpFilterCoefficient` attribute. Determines the strength of
231
  * smoothing effect induced by layer 3 filtering of RSRP in all attached UE.
232
  * If equals to 0, no layer 3 filtering is applicable.
233
  */
234
  uint8_t m_pcRsrpFilterCoefficient;
235
  /**
221
   * Trace information regarding Uplink TxPower
236
   * Trace information regarding Uplink TxPower
222
   * uint16_t cellId, uint16_t rnti, double txPower
237
   * uint16_t cellId, uint16_t rnti, double txPower
223
   */
238
   */
(-)a/src/lte/model/lte-ue-rrc.cc (+5 lines)
 Lines 1599-1604   LteUeRrc::ApplyMeasConfig (LteRrcSap::MeasConfig mc) Link Here 
1599
    {
1599
    {
1600
      NS_LOG_LOGIC (this << " setting quantityConfig");
1600
      NS_LOG_LOGIC (this << " setting quantityConfig");
1601
      m_varMeasConfig.quantityConfig = mc.quantityConfig;
1601
      m_varMeasConfig.quantityConfig = mc.quantityConfig;
1602
      //Convey the filter coefficient to PHY layer so it can configure the power control parameter
1603
      for (uint16_t i = 0; i < m_numberOfComponentCarriers; i++)
1604
        {
1605
          m_cphySapProvider.at (i)->SetRsrpFilterCoefficient (mc.quantityConfig.filterCoefficientRSRP);
1606
        }
1602
      // we calculate here the coefficient a used for Layer 3 filtering, see 3GPP TS 36.331 section 5.5.3.2
1607
      // we calculate here the coefficient a used for Layer 3 filtering, see 3GPP TS 36.331 section 5.5.3.2
1603
      m_varMeasConfig.aRsrp = std::pow (0.5, mc.quantityConfig.filterCoefficientRSRP / 4.0);
1608
      m_varMeasConfig.aRsrp = std::pow (0.5, mc.quantityConfig.filterCoefficientRSRP / 4.0);
1604
      m_varMeasConfig.aRsrq = std::pow (0.5, mc.quantityConfig.filterCoefficientRSRQ / 4.0);
1609
      m_varMeasConfig.aRsrq = std::pow (0.5, mc.quantityConfig.filterCoefficientRSRQ / 4.0);

Return to bug 2988