Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maybe a bug? #4

Open
StupidI opened this issue Feb 21, 2023 · 12 comments
Open

Maybe a bug? #4

StupidI opened this issue Feb 21, 2023 · 12 comments

Comments

@StupidI
Copy link

StupidI commented Feb 21, 2023

No description provided.

@StupidI StupidI changed the title Maybe 啊 Maybe a bug? Feb 21, 2023
@StupidI
Copy link
Author

StupidI commented Feb 21, 2023

In function "location", it implies that the location of the base is (1/3, 0), which conflicts with "radius = 1/2", whether "distance = np.sqrt((x - 1/3)^2 + y^2)" should be changed to " distance = np.sqrt((x - 1/4)^2+ y^2)"

@jjalcaraz-upct
Copy link
Owner

jjalcaraz-upct commented Feb 21, 2023 via email

@StupidI
Copy link
Author

StupidI commented Feb 21, 2023

Thanks for your answer! Also, Can you explain the equation "FSPL = 20np.log10(R) + 20np.log10(2) + 93.45 + gamma10np.log10(R) " for me? I have looked up TS 36.942 and other things but still can't figure it out, especially the "93.45" and gamma=2.6 which are really unclear meaning.

@StupidI
Copy link
Author

StupidI commented Feb 21, 2023

You are right. Also, I have found another bug in the computation of theta. I have fixed them. Thanks. From: StupidI @.> Reply-To: jjalcaraz-upct/network-slicing @.> Date: Tuesday, February 21, 2023 at 3:32 AM To: jjalcaraz-upct/network-slicing @.> Cc: Subscribed @.> Subject: Re: [jjalcaraz-upct/network-slicing] Maybe a bug? (Issue #4) In function "location", it implies that the location of the base is (1/3, 0), which conflicts with "radius = 1/2", whether "distance = np.sqrt((x - 1/3)^2 + y^2)" should be changed to " distance = np.sqrt((x - 1/4)^2+ y^2)" — Reply to this email directly, view it on GitHub<#4 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AN3EW2CEVETA2OU7D4BSVKTWYQSNDANCNFSM6AAAAAAVCPES4Q. You are receiving this because you are subscribed to this thread.Message ID: @.***>

Maybe another bug, in "self.list_of_parameters", it seems that the parameters of 2GHz and 900MHz are placed wrong?

@jjalcaraz-upct
Copy link
Owner

The A,B parameters are now correctly placed.
The FSPL (Free Space Path Loss) formula comes from the log-distance path-loss model (https://en.wikipedia.org/wiki/Log-distance_path_loss_model) where gamma is the pathless exponent. The 93.45 (in fact should be 92.45, now corrected) is the 20log10(2pi/c) constant of the free-space path loss formula (https://en.wikipedia.org/wiki/Free-space_path_loss) for distance in Km and frequency in GHz. Thank you for pointing out these bugs.

@StupidI
Copy link
Author

StupidI commented Mar 7, 2023

The A,B parameters are now correctly placed. The FSPL (Free Space Path Loss) formula comes from the log-distance path-loss model (https://en.wikipedia.org/wiki/Log-distance_path_loss_model) where gamma is the pathless exponent. The 93.45 (in fact should be 92.45, now corrected) is the 20_log10(2_pi/c) constant of the free-space path loss formula (https://en.wikipedia.org/wiki/Free-space_path_loss) for distance in Km and frequency in GHz. Thank you for pointing out these bugs.

Got it, thanks for your explanation! Another question I'm curious about is "MCSCodeset compute_factors" part. Does the equation "rx_prob(x) = A *(snr - snr_ref) + B" haved referred anything, sorry I can't find the theory related to it or it's created by yourself? Also, why the default value of "sym_per_prb" in "ProportionalFair" should be 158 rather than 168?

@StupidI
Copy link
Author

StupidI commented Mar 7, 2023

emmmm, it seems "sym_per_prb" should be 7*12 if the bandwidth is 20MHz in LTE? I'm confused about it, could you please explain it more? Thanks in advance!

@jjalcaraz-upct
Copy link
Owner

  1. Regarding the rx probability calculation, it is based on [1]. The MCSCodeset factors are computed to approximate the snr-MI curves shown in Figure 7 of [1]. The model to generate rx probability from snr is based on Annex A of 3GPP TR 36.942. Figure A.4 shows the rate for each MCS vs the SNR. For each MCS, the model maps the rate to rx probability so that the rx prob is 0 for 0 rate and 1 for the max achievable rate of the MCS.
  2. Regarding the sym_per_prb, note that the resource allocation is done in a subframe basis. A subframe contains two slots, each one with an RB of 7x12 symbols. Thus, what is called a PRB contains 2x7x12 = 168 symbols, and 10 are subtracted to account for overhead (PDCCH, reference signals...).

[1] Mezzavilla, Marco, et al. "A lightweight and accurate link abstraction model for the simulation of LTE networks in ns-3." Proceedings of the 15th ACM international conference on Modeling, analysis and simulation of wireless and mobile systems. 2012.

@jjalcaraz-upct
Copy link
Owner

jjalcaraz-upct commented Mar 10, 2023 via email

@StupidI
Copy link
Author

StupidI commented Mar 16, 2023

  1. Regarding the rx probability calculation, it is based on [1]. The MCSCodeset factors are computed to approximate the snr-MI curves shown in Figure 7 of [1]. The model to generate rx probability from snr is based on Annex A of 3GPP TR 36.942. Figure A.4 shows the rate for each MCS vs the SNR. For each MCS, the model maps the rate to rx probability so that the rx prob is 0 for 0 rate and 1 for the max achievable rate of the MCS.
  2. Regarding the sym_per_prb, note that the resource allocation is done in a subframe basis. A subframe contains two slots, each one with an RB of 7x12 symbols. Thus, what is called a PRB contains 2x7x12 = 168 symbols, and 10 are subtracted to account for overhead (PDCCH, reference signals...).

[1] Mezzavilla, Marco, et al. "A lightweight and accurate link abstraction model for the simulation of LTE networks in ns-3." Proceedings of the 15th ACM international conference on Modeling, analysis and simulation of wireless and mobile systems. 2012.

Thank you, that helps me a lot! Also, the "allocate()" in "schedulers.py" may exist a bug. "ue_th[index] = self.a * max(ue.th, 1) + self.b * ue_bits[index] / self.slot_length" seems to be corrected to "ue_th[index] = self.a * max(ue_th[index], 1) + self.b * ue_bits[index] / self.slot_length"

@jjalcaraz-upct
Copy link
Owner

jjalcaraz-upct commented Mar 16, 2023 via email

@StupidI
Copy link
Author

StupidI commented Mar 23, 2023

  1. Regarding the rx probability calculation, it is based on [1]. The MCSCodeset factors are computed to approximate the snr-MI curves shown in Figure 7 of [1]. The model to generate rx probability from snr is based on Annex A of 3GPP TR 36.942. Figure A.4 shows the rate for each MCS vs the SNR. For each MCS, the model maps the rate to rx probability so that the rx prob is 0 for 0 rate and 1 for the max achievable rate of the MCS.
  2. Regarding the sym_per_prb, note that the resource allocation is done in a subframe basis. A subframe contains two slots, each one with an RB of 7x12 symbols. Thus, what is called a PRB contains 2x7x12 = 168 symbols, and 10 are subtracted to account for overhead (PDCCH, reference signals...).

[1] Mezzavilla, Marco, et al. "A lightweight and accurate link abstraction model for the simulation of LTE networks in ns-3." Proceedings of the 15th ACM international conference on Modeling, analysis and simulation of wireless and mobile systems. 2012.

Sorry to bother you again. I've looked through the reference [1], but I can't find the Figure 7. Actually I can't figure out the why can you use the SNR and the MCS to get the rx_prob, because the Figure A.4 in Annex A of 3GPP TR 36.942 only shows the SNR, MCS and throughput, how can these get the rx probability? Can you explain it more, thank you! (plus: I want to know how you get the value of snr in mcs_codeset.csv?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants