nyuwireless-unipd / ns3-mmwave

ns-3 module for simulating mmWave-based cellular systems. See https://ieeexplore.ieee.org/document/8344116/ (open access) as a reference.
GNU General Public License v2.0
304 stars 193 forks source link

How to use setsector method from antenna array model. #35

Closed navjotsingh963 closed 6 years ago

navjotsingh963 commented 7 years ago

Hello, I am trying to use setsector method from antenna array model using the program mmwave_3gpp_channel_example.cc from scratch folder, but it never goes into that or it never show sector cases in output, I think it is because of omniTx=true, it should be false to use that. How I can use that sector method or I am doing wrong. Basically, I want to create sectors and so that I can show the directionality of the antenna in particular sector using mmwave module. #31

MengleiZhang commented 7 years ago

The Cell scan method can be enabled by setting the following attribute to true.

Config::SetDefault ("ns3::MmWave3gppChannel::CellScan", BooleanValue(false)); // Set true to use cell scanning method, false to use the default power method.

On Dec 5, 2017, at 2:15 PM, Navjot Singh notifications@github.com wrote:

Hello, I am trying to use setsector method from antenna array model using the program mmwave_3gpp_channel_example.cc from scratch folder, but it never goes into that or it never show sector cases in output, I think it is because of omniTx=true, it should be false to use that. How I can use that sector method or I am doing wrong. Basically, I want to create sectors and so that I can show the directionality of the antenna in particular sector using mmwave module.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/nyuwireless-unipd/ns3-mmwave/issues/35, or mute the thread https://github.com/notifications/unsubscribe-auth/AMHLyWJLNaBiG_FKSCwAkly27zlAfHLOks5s9ZZTgaJpZM4Q20Lh.

navjotsingh963 commented 6 years ago

I tried making cell scan method true in mmwave-3gpp-channel-example but no change in output.

I was trying with mmwave-ue-phy.cc

Ptr<AntennaArrayModel> antennaArray = DynamicCast<AntennaArrayModel> (GetDlSpectrumPhy ()->GetRxAntenna());
/* set beamforming vector;
 * for UE, you can choose 16 antenna with 0-7 sectors, or 4 antenna with 0-3 sectors
 * input is (sector, antenna number)
 *
 * */
antennaArray->SetSector (3,3);

This portion was commented when I made it uncommented it gave me these errors-

navjot@navjot-VirtualBox:~/ns3-mmwave-master$ ./waf --run scratch/diretional Waf: Entering directory `/home/navjot/ns3-mmwave-master/build' [1772/2341] Compiling src/mmwave/model/mmwave-ue-phy.cc ../src/mmwave/model/mmwave-ue-phy.cc: In member function ‘void ns3::MmWaveUePhy::SendDataChannels(ns3::Ptr, std::__cxx11::list<ns3::Ptr >, ns3::Time, uint8t)’: ../src/mmwave/model/mmwave-ue-phy.cc:640:30: **# error: invalid conversion from ‘int’ to ‘uint8t {aka unsigned char}’ [-fpermissive] antennaArray->SetSector (3,3);** ^ In file included from ./ns3/mmwave-phy.h:42:0, from ../src/mmwave/model/mmwave-ue-phy.h:32, from ../src/mmwave/model/mmwave-ue-phy.cc:35: ./ns3/antenna-array-model.h:53:7: note: initializing argument 2 of ‘void ns3::AntennaArrayModel::SetSector(uint8_t, uint8_t, double)’ void SetSector (uint8_t sector, uint8_t antennaNum, double elevation = 90); ^

As directional antenna works on sectors I want to use this part, Is it possible to use this part if yes where else I have to make changes.

Thank you

MengleiZhang commented 6 years ago

The cell scan method is implemented in BeamSearchBeamforming of the MmWave3gppChannel class, as mentioned in our paper.

A demonstration method BeamSearchBeamforming of the MmWave3gppChannel class currently implements a simplied beam search, based on a brute force approach, i.e., it tries all the possible BS-UT sector com- binations and selects the one that returns the maximum received power.

On Dec 13, 2017, at 11:37 AM, Navjot Singh notifications@github.com wrote:

I tried making cell scan method true in mmwave-3gpp-channel-example but no change in output.

I was trying with mmwave-ue-phy.cc

Ptr antennaArray = DynamicCast (GetDlSpectrumPhy ()->GetRxAntenna()); /* set beamforming vector;

  • for UE, you can choose 16 antenna with 0-7 sectors, or 4 antenna with 0-3 sectors
  • input is (sector, antenna number)
  • */ antennaArray->SetSector (3,3); This portion was commented when I made it uncommented it gave me these errors-

navjot@navjot-VirtualBox:~/ns3-mmwave-master$ ./waf --run scratch/diretional Waf: Entering directory `/home/navjot/ns3-mmwave-master/build' [1772/2341] Compiling src/mmwave/model/mmwave-ue-phy.cc ../src/mmwave/model/mmwave-ue-phy.cc: In member function ‘void ns3::MmWaveUePhy::SendDataChannels(ns3::Ptrns3::PacketBurst, std::__cxx11::list, ns3::Time, uint8_t)’: ../src/mmwave/model/mmwave-ue-phy.cc:640:30: # error: invalid conversion from ‘int’ to ‘uint8_t {aka unsigned char}’ [-fpermissive] antennaArray->SetSector (3,3);** ^ In file included from ./ns3/mmwave-phy.h:42:0, from ../src/mmwave/model/mmwave-ue-phy.h:32, from ../src/mmwave/model/mmwave-ue-phy.cc:35: ./ns3/antenna-array-model.h:53:7: note: initializing argument 2 of ‘void ns3::AntennaArrayModel::SetSector(uint8_t, uint8_t, double)’ void SetSector (uint8_t sector, uint8_t antennaNum, double elevation = 90); ^

As directional antenna works on sectors I want to use this part, Is it possible to use this part if yes where else I have to make changes.

Thank you

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/nyuwireless-unipd/ns3-mmwave/issues/35#issuecomment-351447230, or mute the thread https://github.com/notifications/unsubscribe-auth/AMHLyVgcyfHAfKbJNCkipbEilYVDHwnUks5s__1YgaJpZM4Q20Lh.

navjotsingh963 commented 6 years ago

So, there is no need to use" antennaArray->SetSector (3,3); " from mmwave-ue-phy.cc it will automatically find best possible sector?

Thanks for your quick response.

Thank you.

MengleiZhang commented 6 years ago

No

On Dec 13, 2017, at 1:14 PM, Navjot Singh notifications@github.com wrote:

So, there is no need to use" antennaArray->SetSector (3,3); " from mmwave-ue-phy.cc it will automatically find best possible sector?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/nyuwireless-unipd/ns3-mmwave/issues/35#issuecomment-351475709, or mute the thread https://github.com/notifications/unsubscribe-auth/AMHLydaX1z3Eno5q3NfUCCjD9OKWNcx6ks5tABPygaJpZM4Q20Lh.