Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(571)

Issue 11670043: ns-3 GSoC 2013 (LTE) - Mid-term code review

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 9 months ago by buherman
Modified:
10 years, 8 months ago
CC:
ns-3-reviews_googlegroups.com
Visibility:
Public.

Description

This is the mid-term code review for the GSoC 2013 project for developing UE measurements in ACTIVE and IDLE mode for ns-3. The review covers all the changes from the beginning of the project until the latest revision as of July 22nd (in specific, revision 9928 was the base, and revision 9984 was the head). This includes code, test scripts, and documentation of the completed "UE Measurements" block and the partially completed "Initial Cell Selection" block. More information on the detailed features can be found in the project Wiki page [1] or in the model library (Sphinx) documentation. As a reference, below is the list of supported event-based triggering in the underlying UE measurements function. - Event A1: Serving cell becomes better than `threshold` - Event A2: Serving cell becomes worse than `threshold` - Event A3: Neighbour becomes `offset` dB better than serving cell - Event A4: Neighbour becomes better than `threshold` - Event A5: Serving becomes worse than `threshold1` *AND* neighbour becomes better than `threshold2` Several notes about the code: - The "pre-GSOC" UE measurement configuration, found in some test suites and examples, exists as a temporary workaround before it is implemented as a handover algorithm during the second term of the project. - The UE measurements implementation still contains several blocks of `#ifdef NS3_ASSERT_ENABLE`, which were intended for my own testing. They will be eventually removed. - I forget to disable `LogComponentEnable` statements in the `lte-cell-selection` test suite. They will be disabled for sure. - The documentation on Initial Cell Selection might not reflect the current code, since I haven't updated it yet. - A full-blown `./test.py` results in failure for `lte-pathloss-model` test suite and crash for `buildings-pathloss-profiler` example. The former is caused by UE not entering CONNECTED mode. While the latter can probably be fixed when I pull in some bug fixes from lena-dev. The whole set of code can be downloaded from the repository [2]. As of now, there are 5 test suites of interest, which can be run as follows: ./test.py -f EXTENSIVE -s lte-ue-measurements ./test.py -f TAKES_FOREVER -s lte-ue-measurements-piecewise-1 ./test.py -f TAKES_FOREVER -s lte-ue-measurements-piecewise-2 ./test.py -f TAKES_FOREVER -s lte-ue-measurements-handover ./test.py -s lte-cell-selection Please feel free to contact me if you have any comments or questions. Otherwise, thanks in advance for reviewing. -budi- [1] https://www.nsnam.org/wiki/index.php/GSOC2013UeMeasurementActiveIdle [2] http://code.nsnam.org/buherman/ns-3-gsoc-lte/

Patch Set 1 #

Total comments: 56
Unified diffs Side-by-side diffs Delta from patch set Stats (+7026 lines, -1074 lines) Patch
M doc/models/Makefile View 4 chunks +8 lines, -0 lines 0 comments Download
M src/lte/doc/Makefile View 3 chunks +7 lines, -3 lines 0 comments Download
A src/lte/doc/source/figures/ue-meas-consumer.eps View 1 chunk +1212 lines, -0 lines 0 comments Download
A src/lte/doc/source/figures/ue-meas-piecewise-a1.dia View Binary file 0 comments Download
A src/lte/doc/source/figures/ue-meas-piecewise-a1-hys.dia View Binary file 0 comments Download
A src/lte/doc/source/figures/ue-meas-piecewise-motion.dia View Binary file 0 comments Download
M src/lte/doc/source/lte-design.rst View 20 chunks +329 lines, -109 lines 10 comments Download
M src/lte/doc/source/lte-testing.rst View 3 chunks +236 lines, -11 lines 1 comment Download
M src/lte/doc/source/lte-user.rst View 5 chunks +204 lines, -6 lines 8 comments Download
M src/lte/examples/lena-x2-handover.cc View 8 chunks +88 lines, -91 lines 0 comments Download
M src/lte/examples/lena-x2-handover-measures.cc View 9 chunks +167 lines, -30 lines 0 comments Download
M src/lte/helper/lte-helper.h View 3 chunks +41 lines, -1 line 4 comments Download
M src/lte/helper/lte-helper.cc View 3 chunks +62 lines, -1 line 4 comments Download
M src/lte/model/epc-ue-nas.h View 3 chunks +17 lines, -5 lines 2 comments Download
M src/lte/model/epc-ue-nas.cc View 3 chunks +13 lines, -4 lines 2 comments Download
M src/lte/model/lte-common.h View 4 chunks +22 lines, -4 lines 4 comments Download
M src/lte/model/lte-common.cc View 2 chunks +24 lines, -1 line 0 comments Download
M src/lte/model/lte-control-messages.h View 2 chunks +34 lines, -0 lines 0 comments Download
M src/lte/model/lte-control-messages.cc View 1 chunk +22 lines, -0 lines 0 comments Download
M src/lte/model/lte-enb-cphy-sap.h View 3 chunks +14 lines, -0 lines 0 comments Download
M src/lte/model/lte-enb-phy.h View 2 chunks +2 lines, -0 lines 0 comments Download
M src/lte/model/lte-enb-phy.cc View 2 chunks +23 lines, -0 lines 0 comments Download
M src/lte/model/lte-enb-rrc.h View 5 chunks +51 lines, -18 lines 4 comments Download
M src/lte/model/lte-enb-rrc.cc View 10 chunks +135 lines, -103 lines 0 comments Download
M src/lte/model/lte-rrc-protocol-ideal.h View 1 chunk +0 lines, -2 lines 0 comments Download
M src/lte/model/lte-rrc-protocol-ideal.cc View 1 chunk +0 lines, -44 lines 0 comments Download
M src/lte/model/lte-rrc-protocol-real.h View 1 chunk +0 lines, -2 lines 0 comments Download
M src/lte/model/lte-rrc-protocol-real.cc View 1 chunk +0 lines, -44 lines 0 comments Download
M src/lte/model/lte-rrc-sap.h View 12 chunks +66 lines, -59 lines 0 comments Download
M src/lte/model/lte-rrc-sap.cc View 2 chunks +22 lines, -1 line 0 comments Download
M src/lte/model/lte-spectrum-phy.cc View 1 chunk +1 line, -0 lines 0 comments Download
M src/lte/model/lte-ue-cphy-sap.h View 7 chunks +36 lines, -13 lines 0 comments Download
M src/lte/model/lte-ue-net-device.h View 2 chunks +23 lines, -6 lines 0 comments Download
M src/lte/model/lte-ue-net-device.cc View 5 chunks +24 lines, -3 lines 2 comments Download
M src/lte/model/lte-ue-phy.h View 9 chunks +46 lines, -14 lines 4 comments Download
M src/lte/model/lte-ue-phy.cc View 19 chunks +185 lines, -78 lines 9 comments Download
M src/lte/model/lte-ue-rrc.h View 9 chunks +107 lines, -25 lines 0 comments Download
M src/lte/model/lte-ue-rrc.cc View 38 chunks +1302 lines, -343 lines 2 comments Download
A src/lte/test/lte-test-cell-selection.h View 1 chunk +133 lines, -0 lines 0 comments Download
A src/lte/test/lte-test-cell-selection.cc View 1 chunk +348 lines, -0 lines 0 comments Download
M src/lte/test/lte-test-ue-measurements.h View 3 chunks +305 lines, -4 lines 0 comments Download
M src/lte/test/lte-test-ue-measurements.cc View 10 chunks +1674 lines, -43 lines 0 comments Download
M src/lte/test/test-lte-x2-handover-measures.cc View 3 chunks +42 lines, -6 lines 0 comments Download
M src/lte/wscript View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 4
Nicola Baldo
Hi Budiarto, I reviewed the model code only, I still have to take a look ...
10 years, 9 months ago (2013-07-25 16:56:11 UTC) #1
Marco Miozzo
I have two comments on the modification in LteUePhy. https://codereview.appspot.com/11670043/diff/1/src/lte/model/lte-ue-phy.cc File src/lte/model/lte-ue-phy.cc (right): https://codereview.appspot.com/11670043/diff/1/src/lte/model/lte-ue-phy.cc#newcode428 src/lte/model/lte-ue-phy.cc:428: ...
10 years, 8 months ago (2013-07-26 10:57:21 UTC) #2
Nicola Baldo
Hi Budi, please find below some comments on the .rst documentation. https://codereview.appspot.com/11670043/diff/1/src/lte/doc/source/lte-design.rst File src/lte/doc/source/lte-design.rst (right): ...
10 years, 8 months ago (2013-07-29 11:11:38 UTC) #3
buherman
10 years, 8 months ago (2013-08-02 15:51:17 UTC) #4
Hi Nicola and Marco,

Thanks a lot for your feedback. It took a while for me to go through all of
them, but finally made the fix to the code. More details are in my comments
below.

Regards,
-budi-

https://codereview.appspot.com/11670043/diff/1/src/lte/doc/source/lte-design.rst
File src/lte/doc/source/lte-design.rst (right):

https://codereview.appspot.com/11670043/diff/1/src/lte/doc/source/lte-design....
src/lte/doc/source/lte-design.rst:1969: Reception of system information is
detrimental to the transition of UE RRC
On 2013/07/29 11:11:39, Nicola Baldo wrote:
> I think "detrimental" is incorrect here. Maybe fundamental? 

Done.

https://codereview.appspot.com/11670043/diff/1/src/lte/doc/source/lte-design....
src/lte/doc/source/lte-design.rst:1980: UE in `IDLE_CELL_SELECTION` state, e.g.
in the beginning of simulation, will
On 2013/07/29 11:11:39, Nicola Baldo wrote:
> at the beginning

Done.

https://codereview.appspot.com/11670043/diff/1/src/lte/doc/source/lte-design....
src/lte/doc/source/lte-design.rst:2022: (based on RSRP) and connect to it. This
is done by issuing a contention-based
On 2013/07/29 11:11:39, Nicola Baldo wrote:
> I'd say no, connection will be done only if explicitly requested. Otherwise
the
> UE will stay IDLE_CAMPED_NORMALLY

Done.

https://codereview.appspot.com/11670043/diff/1/src/lte/doc/source/lte-design....
src/lte/doc/source/lte-design.rst:2100: - since carrier aggregation is not
supported in general, the following
On 2013/07/29 11:11:39, Nicola Baldo wrote:
> "not supported by the LTE module"

Done.

https://codereview.appspot.com/11670043/diff/1/src/lte/doc/source/lte-user.rst
File src/lte/doc/source/lte-user.rst (right):

https://codereview.appspot.com/11670043/diff/1/src/lte/doc/source/lte-user.rs...
src/lte/doc/source/lte-user.rst:948: the eNodeB antenna direction should be
considered as well. Besides that, we
On 2013/07/29 11:11:39, Nicola Baldo wrote:
> direction -> directivity

Done.

https://codereview.appspot.com/11670043/diff/1/src/lte/doc/source/lte-user.rs...
src/lte/doc/source/lte-user.rst:959: Attachment based on received signal
On 2013/07/29 11:11:39, Nicola Baldo wrote:
> I would suggest to use this title:
> "Automatic attachment with the Idle Mode Cell Selection procedure"

Done.

https://codereview.appspot.com/11670043/diff/1/src/lte/doc/source/lte-user.rs...
src/lte/doc/source/lte-user.rst:973: After the method is called, the UE will
spend 200 ms (by default) to measure the
On 2013/07/29 11:11:39, Nicola Baldo wrote:
> I'd just say "will spend some time", the actual time depends on many factors
> (not only measurements but also System Information reception).

Done.

https://codereview.appspot.com/11670043/diff/1/src/lte/doc/source/lte-user.rs...
src/lte/doc/source/lte-user.rst:981: An interesting use case of the initial cell
selection process is to setup a
On 2013/07/29 11:11:39, Nicola Baldo wrote:
> This needs to be revisited after our recent discussion on the use of PLMN for
> cell selection.

Done.

https://codereview.appspot.com/11670043/diff/1/src/lte/helper/lte-helper.cc
File src/lte/helper/lte-helper.cc (right):

https://codereview.appspot.com/11670043/diff/1/src/lte/helper/lte-helper.cc#n...
src/lte/helper/lte-helper.cc:593: uePhy->CellSearch ();
On 2013/07/25 16:56:11, Nicola Baldo wrote:
> instead of this, please have the RRC put the UePhy in CELL_SEARCH whenever
> needed, using a new LteUeCphySap::StartCellSearch () method

Done.

https://codereview.appspot.com/11670043/diff/1/src/lte/helper/lte-helper.cc#n...
src/lte/helper/lte-helper.cc:686: ueNas->Connect ();
On 2013/07/25 16:56:11, Nicola Baldo wrote:
> Why do you need a new LteHelper::Connect(ueDev) method? ...can't you move
> everything into the LteHelper::Attach() method?

Sure, I'll combine them together.

In the future when we have Idle mode ready, I think we should have them
separated. And that's why I decided to separate them. But now when I think about
it again, it may cause unnecessary confusion to users.

https://codereview.appspot.com/11670043/diff/1/src/lte/helper/lte-helper.h
File src/lte/helper/lte-helper.h (right):

https://codereview.appspot.com/11670043/diff/1/src/lte/helper/lte-helper.h#ne...
src/lte/helper/lte-helper.h:195: * Attach a set of UE devices to a single eNB
device
On 2013/07/25 16:56:11, Nicola Baldo wrote:
> please add a comment here saying that the use of this method will disable the
> cell selection procedure

Done.

https://codereview.appspot.com/11670043/diff/1/src/lte/helper/lte-helper.h#ne...
src/lte/helper/lte-helper.h:199: */
On 2013/07/25 16:56:11, Nicola Baldo wrote:
> also here

Done.

https://codereview.appspot.com/11670043/diff/1/src/lte/model/epc-ue-nas.cc
File src/lte/model/epc-ue-nas.cc (right):

https://codereview.appspot.com/11670043/diff/1/src/lte/model/epc-ue-nas.cc#ne...
src/lte/model/epc-ue-nas.cc:136: // since RRC Idle Mode cell selection is not
supported yet, we
On 2013/07/25 16:56:11, Nicola Baldo wrote:
> please update this comment

Done.

https://codereview.appspot.com/11670043/diff/1/src/lte/model/epc-ue-nas.h
File src/lte/model/epc-ue-nas.h (right):

https://codereview.appspot.com/11670043/diff/1/src/lte/model/epc-ue-nas.h#new...
src/lte/model/epc-ue-nas.h:94: * attempt to connect at the earliest possible
time (e.g. after it camps to a
On 2013/07/25 16:56:11, Nicola Baldo wrote:
> It's good to have this paragraph "If this function..." in the documentation,
but
> I think the appropriate place for it is LteAsSapProvider::Connect. Please move
> it there. 
> 
> For EpcUeNas::Connect(), it might suffice to say that (among other things) it
> causes the NAS to tell the Access Stratum (AS) to get connected.

Done.

https://codereview.appspot.com/11670043/diff/1/src/lte/model/lte-common.h
File src/lte/model/lte-common.h (right):

https://codereview.appspot.com/11670043/diff/1/src/lte/model/lte-common.h#new...
src/lte/model/lte-common.h:224: static double GetActualHysteresis (uint8_t
hysteresis);
On 2013/07/25 16:56:11, Nicola Baldo wrote:
> For consistency with the other methods in this file, I would suggest to rename
> this to IeValue2ActualHysteresis or something similar.
> 
> Not that I like very much the naming of the pre-existing methods here... feel
> free to propose a renaming for all of them if you have a better idea.

Done.

I found that X2Y and XToY patterns are the most common across ns-3. Well, for
now I'll stick with X2Y.

https://codereview.appspot.com/11670043/diff/1/src/lte/model/lte-common.h#new...
src/lte/model/lte-common.h:233: static double GetActualA3Offset (int8_t
a3Offset);
On 2013/07/25 16:56:11, Nicola Baldo wrote:
> same as previous comment

Done.

https://codereview.appspot.com/11670043/diff/1/src/lte/model/lte-enb-rrc.h
File src/lte/model/lte-enb-rrc.h (right):

https://codereview.appspot.com/11670043/diff/1/src/lte/model/lte-enb-rrc.h#ne...
src/lte/model/lte-enb-rrc.h:852: LteRrcSap::MeasConfig m_ueMeasConfigList;
On 2013/07/25 16:56:11, Nicola Baldo wrote:
> "List" in the name is a bit misleading, what about calling it just
> "m_ueMeasConfig"? 
> 
> I mean, the name would be ok if the type were std::list<MeasConfig>, but
that's
> not the case.
> 

Done.

https://codereview.appspot.com/11670043/diff/1/src/lte/model/lte-enb-rrc.h#ne...
src/lte/model/lte-enb-rrc.h:857: uint8_t m_numOfUeMeasConfig;
On 2013/07/25 16:56:11, Nicola Baldo wrote:
> The naming is misleading - if it were number of identities, it would be called
> m_numOfUeMeasId, and actually you use to count the number of MeasReportConfig,
> which in general is not the same as the number of MeasId.

Done.

https://codereview.appspot.com/11670043/diff/1/src/lte/model/lte-ue-net-devic...
File src/lte/model/lte-ue-net-device.cc (right):

https://codereview.appspot.com/11670043/diff/1/src/lte/model/lte-ue-net-devic...
src/lte/model/lte-ue-net-device.cc:191: m_phy->SetDlEarfcn (earfcn);
On 2013/07/25 16:56:11, Nicola Baldo wrote:
> The LteUeNetDevice shall not configure the PHY directly. Instead, the
> configuration of the PHY should be done by the RRC using the LteUeCphySap
> interface. 

Done.

https://codereview.appspot.com/11670043/diff/1/src/lte/model/lte-ue-phy.cc
File src/lte/model/lte-ue-phy.cc (right):

https://codereview.appspot.com/11670043/diff/1/src/lte/model/lte-ue-phy.cc#ne...
src/lte/model/lte-ue-phy.cc:428: LteUePhy::GenerateCtrlCqiReport (const
SpectrumValue& sinr)
On 2013/07/26 10:57:21, marco.miozzo wrote:
> GenerateCtrlCqiReport is called each time a PDCCH is received, how do you
manage
> with this change that the UE is not generating sporious CQIs (i.e., CQIs with
> m_rnti equal to 0 when the UE is not yet attached or even with different
> bandwidth respect to the eNB).

You're right, I didn't realize this. I added back ``if (m_dlConfigured &&
m_ulConfigured && (m_rnti > 0))`` before P10 and A30 CQI calculation.

https://codereview.appspot.com/11670043/diff/1/src/lte/model/lte-ue-phy.cc#ne...
src/lte/model/lte-ue-phy.cc:902: if (m_cellId == 0)
On 2013/07/25 16:56:11, Nicola Baldo wrote:
> If you need this, I'd use "switch (m_state)" instead

Done.

https://codereview.appspot.com/11670043/diff/1/src/lte/model/lte-ue-phy.cc#ne...
src/lte/model/lte-ue-phy.cc:906: * value is not available and
GenerateCtrlCqiReport will not be called.
On 2013/07/26 10:57:21, marco.miozzo wrote:
> I agree with Nicola, let's try to limit code duplication. The split proposed
by
> Nicola seems to be reasonable. 
> Moreover, RSRQ spans from -19.5 to -3 dB, by putting 0 you are using a not
valid
> value, which anyway will be truncated by UE RRC to -3. Thus, it will be
possibly
> used by the eNB RRC as a valid (good) values for its estimation in attaching
the
> UE and therefore compared with real RSRQ values.

Done as suggested.

https://codereview.appspot.com/11670043/diff/1/src/lte/model/lte-ue-phy.cc#ne...
src/lte/model/lte-ue-phy.cc:932: (*itMeasMap).second.rsrqNum++;
On 2013/07/25 16:56:11, Nicola Baldo wrote:
> if RSRQ is not available, you should not increment this. Otherwise if RSRQ
> suddenly becomes available, the average will be incorrect.

Done.

https://codereview.appspot.com/11670043/diff/1/src/lte/model/lte-ue-phy.h
File src/lte/model/lte-ue-phy.h (right):

https://codereview.appspot.com/11670043/diff/1/src/lte/model/lte-ue-phy.h#new...
src/lte/model/lte-ue-phy.h:148: void SetDlEarfcn (uint16_t earfcn);
On 2013/07/25 16:56:11, Nicola Baldo wrote:
> please make this an LteUeCphySap method

Done.

https://codereview.appspot.com/11670043/diff/1/src/lte/model/lte-ue-phy.h#new...
src/lte/model/lte-ue-phy.h:186: void CellSearch ();
On 2013/07/25 16:56:11, Nicola Baldo wrote:
> please make this an LteUeCphySap method

Done.

https://codereview.appspot.com/11670043/diff/1/src/lte/model/lte-ue-rrc.cc
File src/lte/model/lte-ue-rrc.cc (right):

https://codereview.appspot.com/11670043/diff/1/src/lte/model/lte-ue-rrc.cc#ne...
src/lte/model/lte-ue-rrc.cc:871: m_acceptableCell.insert (cellId);
On 2013/07/25 16:56:11, Nicola Baldo wrote:
> Frankly, I would not model the selection of acceptable cells at all - are you
> really interested in simulating emergency calls?

As I've explained in another review session, this variable is used in
SynchronizeToStrongestCell() to prevent UE from blindly retrying the same cell
again. The approach is to avoid retrying to cells which have been found to have
different CSG ID. This definition matches with 3GPP's definition of "acceptable
cell", hence the name of the variable. But by choosing this name I don't mean to
introduce functionality related to acceptable cell (i.e. no emergency call). I
updated the documentation to state this.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b