diff --git a/docs/source/examples/siso_dl_noma.ipynb b/docs/source/examples/siso_dl_noma.ipynb index 97e4c04..752a2ed 100644 --- a/docs/source/examples/siso_dl_noma.ipynb +++ b/docs/source/examples/siso_dl_noma.ipynb @@ -67,7 +67,7 @@ "\n", "$$\n", "\\begin{align*}\n", - "R_{f\\,\\rightarrow\\,n} &= \\log_2 \\left(1 + \\frac{\\alpha_f P_t |h_n|^2}{\\alpha_n P_t |h_n|^2 + N_0}\\right),\\\\\n", + "R_{n\\,\\rightarrow\\,f} &= \\log_2 \\left(1 + \\frac{\\alpha_f P_t |h_n|^2}{\\alpha_n P_t |h_n|^2 + N_0}\\right),\\\\\n", "R_n &= \\log_2 \\left(1 + \\frac{\\alpha_n P_t |h_n|^2}{N_0}\\right),\n", "\\end{align*}\n", "$$\n", @@ -270,7 +270,7 @@ " UEn.sinr[i, :] = (BS.allocations[\"UEn\"] * p * gain_n) / N0_lin\n", "\n", "\n", - "rate_fn = np.log2(1 + UEn.sinr_pre)\n", + "rate_nf = np.log2(1 + UEn.sinr_pre)\n", "rate_n = np.log2(1 + UEn.sinr)\n", "rate_f = np.log2(1 + UEf.sinr)\n", "\n", @@ -280,20 +280,20 @@ "\n", "# JIT compiled as mc can be very large (>> 10000)\n", "@jit(nopython=True)\n", - "def get_outage(rate_fn, rate_n, rate_f, thresh_n, thresh_f):\n", + "def get_outage(rate_nf, rate_n, rate_f, thresh_n, thresh_f):\n", " outage_n = np.zeros((len(Pt), 1))\n", " outage_f = np.zeros((len(Pt), 1))\n", "\n", " for i in range(len(Pt)):\n", " for k in range(mc):\n", - " if rate_fn[i, k] < thresh_f or rate_n[i, k] < thresh_n:\n", + " if rate_nf[i, k] < thresh_f or rate_n[i, k] < thresh_n:\n", " outage_n[i] += 1\n", " if rate_f[i, k] < thresh_f:\n", " outage_f[i] += 1\n", "\n", " return outage_n, outage_f\n", "\n", - "UEn.outage, UEf.outage = get_outage(rate_fn, rate_n, rate_f, thresh_n, thresh_f)\n", + "UEn.outage, UEf.outage = get_outage(rate_nf, rate_n, rate_f, thresh_n, thresh_f)\n", "UEn.outage /= mc\n", "UEf.outage /= mc" ] diff --git a/docs/source/quickstart.md b/docs/source/quickstart.md index 96492a6..77998fb 100644 --- a/docs/source/quickstart.md +++ b/docs/source/quickstart.md @@ -50,7 +50,7 @@ Assuming perfect SIC, the achievable rates at $\mathrm{UE}_n$ and $\mathrm{UE}_f $$ \begin{align*} -R_{f\,\rightarrow\,n} &= \log_2 \left(1 + \frac{\alpha_f P_t |h_n|^2}{\alpha_n P_t |h_n|^2 + N_0}\right),\\ +R_{n\,\rightarrow\,f} &= \log_2 \left(1 + \frac{\alpha_f P_t |h_n|^2}{\alpha_n P_t |h_n|^2 + N_0}\right),\\ R_n &= \log_2 \left(1 + \frac{\alpha_n P_t |h_n|^2}{N_0}\right), \\ \end{align*} $$ @@ -179,7 +179,7 @@ for i, p in enumerate(Pt_lin): UEn.sinr[i, :] = (BS.allocations["UEn"] * p * gain_n) / N0_lin -rate_fn = np.log2(1 + UEn.sinr_pre) +rate_nf = np.log2(1 + UEn.sinr_pre) rate_n = np.log2(1 + UEn.sinr) rate_f = np.log2(1 + UEf.sinr) @@ -189,20 +189,20 @@ thresh_f = 1 # JIT compiled as mc can be very large (>> 10000) @jit(nopython=True) -def get_outage(rate_fn, rate_n, rate_f, thresh_n, thresh_f): +def get_outage(rate_nf, rate_n, rate_f, thresh_n, thresh_f): outage_n = np.zeros((len(Pt), 1)) outage_f = np.zeros((len(Pt), 1)) for i in range(len(Pt)): for k in range(mc): - if rate_fn[i, k] < thresh_f or rate_n[i, k] < thresh_n: + if rate_nf[i, k] < thresh_f or rate_n[i, k] < thresh_n: outage_n[i] += 1 if rate_f[i, k] < thresh_f: outage_f[i] += 1 return outage_n, outage_f -UEn.outage, UEf.outage = get_outage(rate_fn, rate_n, rate_f, thresh_n, thresh_f) +UEn.outage, UEf.outage = get_outage(rate_nf, rate_n, rate_f, thresh_n, thresh_f) UEn.outage /= mc UEf.outage /= mc ``` diff --git a/examples/siso_dl_noma.ipynb b/examples/siso_dl_noma.ipynb index 1d8d62e..cc81644 100644 --- a/examples/siso_dl_noma.ipynb +++ b/examples/siso_dl_noma.ipynb @@ -60,7 +60,7 @@ "\n", "$$\n", "\\begin{align*}\n", - "R_{f\\,\\rightarrow\\,n} &= \\log_2 \\left(1 + \\frac{\\alpha_f P_t |h_n|^2}{\\alpha_n P_t |h_n|^2 + N_0}\\right),\\\\\n", + "R_{n\\,\\rightarrow\\,f} &= \\log_2 \\left(1 + \\frac{\\alpha_f P_t |h_n|^2}{\\alpha_n P_t |h_n|^2 + N_0}\\right),\\\\\n", "R_n &= \\log_2 \\left(1 + \\frac{\\alpha_n P_t |h_n|^2}{N_0}\\right),\n", "\\end{align*}\n", "$$\n", @@ -263,7 +263,7 @@ " UEn.sinr[i, :] = (BS.allocations[\"UEn\"] * p * gain_n) / N0_lin\n", "\n", "\n", - "rate_fn = np.log2(1 + UEn.sinr_pre)\n", + "rate_nf = np.log2(1 + UEn.sinr_pre)\n", "rate_n = np.log2(1 + UEn.sinr)\n", "rate_f = np.log2(1 + UEf.sinr)\n", "\n", @@ -273,20 +273,20 @@ "\n", "# JIT compiled as mc can be very large (>> 10000)\n", "@jit(nopython=True)\n", - "def get_outage(rate_fn, rate_n, rate_f, thresh_n, thresh_f):\n", + "def get_outage(rate_nf, rate_n, rate_f, thresh_n, thresh_f):\n", " outage_n = np.zeros((len(Pt), 1))\n", " outage_f = np.zeros((len(Pt), 1))\n", "\n", " for i in range(len(Pt)):\n", " for k in range(mc):\n", - " if rate_fn[i, k] < thresh_f or rate_n[i, k] < thresh_n:\n", + " if rate_nf[i, k] < thresh_f or rate_n[i, k] < thresh_n:\n", " outage_n[i] += 1\n", " if rate_f[i, k] < thresh_f:\n", " outage_f[i] += 1\n", "\n", " return outage_n, outage_f\n", "\n", - "UEn.outage, UEf.outage = get_outage(rate_fn, rate_n, rate_f, thresh_n, thresh_f)\n", + "UEn.outage, UEf.outage = get_outage(rate_nf, rate_n, rate_f, thresh_n, thresh_f)\n", "UEn.outage /= mc\n", "UEf.outage /= mc" ]