diff --git a/src/lte/model/lte-spectrum-value-helper.cc b/src/lte/model/lte-spectrum-value-helper.cc index 8d834c3bb..7e2b3b8da 100644 --- a/src/lte/model/lte-spectrum-value-helper.cc +++ b/src/lte/model/lte-spectrum-value-helper.cc @@ -237,7 +237,7 @@ LteSpectrumValueHelper::CreateTxPowerSpectralDensity (uint16_t earfcn, uint8_t t // powerTx is expressed in dBm. We must convert it into natural unit. double powerTxW = pow (10., (powerTx - 30) / 10); - double txPowerDensity = (powerTxW / GetChannelBandwidth (txBandwidthConfiguration)); + double txPowerDensity = (powerTxW / (txBandwidthConfiguration * 180000)); for (std::vector ::iterator it = activeRbs.begin (); it != activeRbs.end (); it++) { @@ -263,10 +263,14 @@ Ptr LteSpectrumValueHelper::CreateNoisePowerSpectralDensity (double noiseFigureDb, Ptr spectrumModel) { NS_LOG_FUNCTION (noiseFigureDb << spectrumModel); - double noiseFigureLinear = pow (10.0, noiseFigureDb / 10.0); - static const double BOLTZMANN = 1.3803e-23; - static const double ROOM_TEMPERATURE = 290.0; - double noisePowerSpectralDensity = noiseFigureLinear * BOLTZMANN * ROOM_TEMPERATURE; // W/Hz + + + // see "LTE - From theory to practice" + // Section 22.4.4.2 Thermal Noise and Receiver Noise Figure + const double kT_dBm_Hz = -174.0; // dBm/Hz + double kT_W_Hz = pow (10.0, (kT_dBm_Hz - 30)/10.0); + double noiseFigureLinear = pow (10.0, noiseFigureDb / 10.0); + double noisePowerSpectralDensity = kT_W_Hz * noiseFigureLinear; Ptr noisePsd = Create (spectrumModel); (*noisePsd) = noisePowerSpectralDensity;