Projects STRLCPY wirelesscomm Commits 345ac178
🤬
  • lectures/Unit05_AMC.pptx
    Binary file.
  • ■ ■ ■ ■ ■
    readme.md
    skipped 64 lines
    65 65   * Demo: 802.11 MCS selection [[PDF]](./unit05_amc/demo_mcs.pdf) [[Matlab Live]](./unit05_amc/demo_mcs.mlx)
    66 66   * Demo: Channel Tracking with 5G NR CSI-RS [[PDF]](./unit05_amc/demo_csirs.pdf) [[Matlab Live]](./unit05_amc/demo_csirs.mlx)
    67 67   * Lab: 5G NR DL Throughput with Multi-Process HARQ [[PDF]](./unit05_amc/lab_partial/labHarq.pdf) [[Matlab Live]](./unit05_amc/lab_partial/labHarq.mlx)
     68 + * Problems: [[PDF]](./unit05_amc/prob/prob_amc.pdf) [[Latex]](./unit05_amc/prob/prob_amc.tex)
    68 69  * Unit 6. Channel Estimation and Equalization
    69 70  * Unit 7. Multiple Antennas and Beamforming
    70 71   * Lecture: [[PDF]](./lectures/Unit06_Beamforming.pdf) [[PPT]](./lectures/Unit06_Beamforming.pptx)
    skipped 8 lines
  • ■ ■ ■ ■ ■ ■
    unit05_amc/prob/mcode.sty
     1 +%%
     2 +%% This is file `mcode.sty'
     3 +%%
     4 +%% It is supposed to help you easily include MATLAB source code
     5 +%% into LaTeX document, but have it nicely highlighted, using
     6 +%% the great listings package.
     7 +%%
     8 +%% PLEASE NOTE that this package does nothing but save you from
     9 +%% figuring out some configurations in setting up the LISTINGS
     10 +%% package. ALL the work is done by that package! Thus, please
     11 +%% refer your questions to the listings package documentation.
     12 +%%
     13 +%% Usage: You have three ways of including your MATLAB code. As
     14 +%% environment, as inline object and directly from an external
     15 +%% file.
     16 +%%
     17 +%% 1) Environment:
     18 +%%
     19 +%% \begin{lstlisting}
     20 +%% YOUR CODE HERE
     21 +%% \end{lstlisting}
     22 +%%
     23 +%%
     24 +%% 2) Inline object:
     25 +%%
     26 +%% Bla bla \mcode{CODEFRAGMENT} bla bla.
     27 +%%
     28 +%%
     29 +%% 3) Include external file (in environment form)
     30 +%%
     31 +%% \lstinputlisting{YOUR-FILE.m}
     32 +%%
     33 +%%
     34 +%% For your convenience this package has the following options:
     35 +%%
     36 +%% - bw if you intend to print the document (highlighting done
     37 +%% via text formatting (bold, italic) and shades of gray)
     38 +%%
     39 +%% - numbered if you want line numbers
     40 +%%
     41 +%% - autolinebreaks if you want the package to automatically
     42 +%% wrap your code. This is buggy as it may well break
     43 +%% break syntax and it doesn't work well with comments.
     44 +%% You REALLY should wrap your code manually.
     45 +%%
     46 +%% - useliterate if you want some characters / relations in
     47 +%% your code to be replace with something more readable.
     48 +%% Example: ~= becomes $\neq$, >= becomes $\geq$, delta
     49 +%% becomes $\delta$ and so on.
     50 +%%
     51 +%% - framed if you want a frame around the source code blocks
     52 +%%
     53 +%% - final if you have ``gloablly'' set the draft option, the
     54 +%% listings package will not output the code at all. to
     55 +%% force it to do so anyway, load this package with the
     56 +%% final option (passes the ``final'' on to listings).
     57 +%%
     58 +%% For example, you may use \usepackage[numbered,framed]{mcode}
     59 +%% in your document preamble.
     60 +%%
     61 +%% Note: Inside code blocks you can escape to LaTeX text mode
     62 +%% using §...§. For ex. §text and some math: $x^2$§, which is
     63 +%% especially useful in comments for putting nicely typeset
     64 +%% equations etc. To get the same colour/style as in the rest
     65 +%% of the comment use \mcommentfont, i.e. §\mcommentfont $x^2$§
     66 +%%
     67 +%% To change the font used, edit the first line in the "custo-
     68 +%% mise below" section. And feel free to edit other things as
     69 +%% well. Refer to the documentation of the listings package to
     70 +%% see what else you could do. If an extra small font is re-
     71 +%% quired, use {\fontfamily{pcr}\fontsize{3}{4.6}\selectfont}
     72 +%% in the definition of \lstbasicfont.
     73 +%%
     74 +%% Author:
     75 +%% Florian Knorn | [email protected] | www.florian-knorn.com
     76 +%%
     77 +%% Version history:
     78 +%% 2.3 -- More keywords (thanks Dominik Wild!)
     79 +%% 2.2 -- Bugfix (thanks Willi Gerbig!)
     80 +%% 2.1 -- Finally automatic detection between end and end
     81 +%% 2.0 -- New options for line breaking and literate prog.
     82 +%% 1.8 -- Fixed typo in documentation regarding §...§
     83 +%% 1.7 -- Added MATLAB block comment syntax %{ ...... %}
     84 +%% 1.6 -- Added some infos, dealing with keyword ``end''
     85 +%% 1.5 -- Tweaked check to see wether textcomp is loaded
     86 +%% 1.4 -- Fixed misconfig (mathescape now set to false)
     87 +%% 1.3 -- Purely cosmetic (tabs replaced by spaces)
     88 +%% 1.2 -- Added \lstset{showstringspaces=false}
     89 +%% 1.1 -- Added \mcode command and [final] option
     90 +%% 1.0 -- Release
     91 + 
     92 + 
     93 +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     94 +% D O N ' T T O U C H T H I S %
     95 +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     96 +\def\fileversion{2.3}
     97 +\def\filedate{2012/08/31}
     98 + 
     99 +\typeout{-- Package: `mcode' \fileversion\space <\filedate> --}
     100 +\NeedsTeXFormat{LaTeX2e}
     101 +\ProvidesPackage{mcode}[\filedate\space\fileversion]
     102 + 
     103 +% for bw-option
     104 +\newif\ifbw
     105 +\DeclareOption{bw}{\bwtrue}
     106 + 
     107 +% numbered option
     108 +\newif\ifnumbered
     109 +\DeclareOption{numbered}{\numberedtrue}
     110 + 
     111 +% final option
     112 +\newif\iffinal
     113 +\DeclareOption{final}{\finaltrue}
     114 + 
     115 +% autolinebreaks option
     116 +\newif\ifautolinebreaks
     117 +\DeclareOption{autolinebreaks}{\autolinebreakstrue}
     118 + 
     119 +% literate programming (replace certain characters/relations
     120 +\newif\ifuseliterate
     121 +\DeclareOption{useliterate}{\useliteratetrue}
     122 + 
     123 +% framed option
     124 +\newif\ifframed
     125 +\DeclareOption{framed}{\framedtrue}
     126 + 
     127 +\DeclareOption*{% default
     128 + \PackageWarning{mcode}{Unknown option `\CurrentOption' !}%
     129 +}
     130 +\ProcessOptions
     131 + 
     132 +\ifbw\typeout{ - settings optimized for printing (bw formating)}
     133 +\else\typeout{ - settings optimized for display (colour formating)}\fi
     134 +\ifnumbered\typeout{ - line numbering enabled}\else\fi
     135 +\ifuseliterate\typeout{ - literate programming (character replacements) enabled}\else\fi
     136 +\ifautolinebreaks\typeout{ - automatic line breaking enabled (careful, buggy!)}\else\fi
     137 +\ifframed\typeout{ - framed listings}\else\fi
     138 + 
     139 +% This command allows you to typeset syntax highlighted Matlab
     140 +% code ``inline''. The font size \small seems to look best...
     141 +\newcommand{\mcode}[1]{\lstinline[basicstyle=\lstbasicfont\small]|#1|}
     142 + 
     143 +% check if color command exists
     144 +\ifx\color\undefined%
     145 + \RequirePackage{xcolor}%
     146 +\fi
     147 + 
     148 +% check if listings has been loaded
     149 +\ifx\lstset\undefined%
     150 + \iffinal
     151 + \RequirePackage[final]{listings}
     152 + \else
     153 + \RequirePackage{listings}
     154 + \fi
     155 +\fi
     156 + 
     157 +% Check if textcomp has been loaded (this package is needed for
     158 +% upright quotes '' (instead of typographic ones `´)...
     159 +\ifx\textquotesingle\undefined%
     160 + \RequirePackage{textcomp}%
     161 +\fi
     162 + 
     163 +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     164 +% C U S T O M I S E B E L O W %
     165 +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     166 + 
     167 +% ---------------------------------------------------------------------------------
     168 +% default font
     169 +\def\lstbasicfont{\fontfamily{pcr}\selectfont\footnotesize}
     170 + 
     171 +% ---------------------------------------------------------------------------------
     172 +% matlat languate definition
     173 +\lstdefinelanguage{matlabfloz}{%
     174 + alsoletter={...},%
     175 + morekeywords={% % keywords
     176 + break,case,catch,continue,elseif,else,end,%
     177 + for,function,global,if,otherwise,persistent,%
     178 + return,switch,try,while,methods,properties,%
     179 + events,classdef,...},%
     180 + comment=[l]\%, % comments
     181 + morecomment=[l]..., % comments
     182 + morecomment=[s]{\%\{}{\%\}}, % block comments
     183 + morestring=[m]' % strings
     184 +}[keywords,comments,strings]%
     185 + 
     186 +% ---------------------------------------------------------------------------------
     187 +% general definitions
     188 +\lstset{%
     189 + basicstyle={\lstbasicfont}, % set font
     190 + showstringspaces=false, % do not emphasize spaces in strings
     191 + tabsize=4, % number of spaces of a TAB
     192 + mathescape=false,escapechar=§, % escape to latex with §...§
     193 + upquote=true, % upright quotes
     194 + aboveskip={1.5\baselineskip}, % a bit of space above listings
     195 + columns=fixed % nice spacing
     196 +}
     197 + 
     198 +% ---------------------------------------------------------------------------------
     199 +% define colours and styles
     200 +\ifbw % use font formating and gray 'colors'
     201 + \def\mcommentfont{\color[gray]{.75}\itshape} %comments light gray and italic
     202 + \lstset{language=matlabfloz, % use our version of highlighting
     203 + keywordstyle=\bfseries, % keywords in bold
     204 + commentstyle=\mcommentfont, % comments
     205 + stringstyle=\color[gray]{0.5} % strings darker gray
     206 + }
     207 +\else% notbw => use colors : )
     208 + \def\mcommentfont{\color[rgb]{.133,.545,.133}} %comments in green
     209 + \lstset{language=matlabfloz, % use our version of highlighting
     210 + keywordstyle=\color[rgb]{0,0,1}, % keywords in blue
     211 + commentstyle=\mcommentfont, % comments
     212 + stringstyle=\color[rgb]{.627,.126,.941} % strings in purple
     213 + }
     214 +\fi%bw
     215 + 
     216 +% ---------------------------------------------------------------------------------
     217 +% automatic line breaking --- warning, this is buggy and
     218 +% doesn't break comments correctly!
     219 +\ifautolinebreaks
     220 + \newsavebox{\lbreakdots}\sbox{\lbreakdots}{\lstbasicfont\mcommentfont...}
     221 + \lstset{breaklines=true,breakatwhitespace=true,prebreak=\usebox{\lbreakdots}}
     222 +\fi
     223 + 
     224 +% ---------------------------------------------------------------------------------
     225 +% literate replacements
     226 +% the following is for replacing some matlab relations like >= or ~=
     227 +% by the corresponding LaTeX symbols, which are much easier to read ...
     228 +\ifuseliterate
     229 + \lstset{%
     230 + literate=%
     231 + {~}{{$\neg$}}1 % \neg
     232 + {<=}{{\tiny$\leq$}}1 % \leq
     233 + {>=}{{\tiny$\geq$}}1 % \geq
     234 + {~=}{{\tiny$\neq$}}1 % \neq
     235 + {delta}{{\tiny$\Delta$}}1 % \Delta
     236 + {(end)}{\lstbasicfont (end)}{5} % black ``end'' when indexing last vector element
     237 + {({ }end)}{\lstbasicfont ({ }end)}{6}
     238 + {(end{ })}{\lstbasicfont (end{ })}{6}
     239 + {({ }end{ })}{\lstbasicfont ({ }end{ })}{7}
     240 + {:end}{\lstbasicfont :end}{4}
     241 + {:{ }end}{\lstbasicfont :{ }end}{5}
     242 + {end:}{\lstbasicfont end:}{4}
     243 + {end{ }:}{\lstbasicfont end{ }:}{5}
     244 + {,end}{\lstbasicfont ,end}{4}
     245 + {,{ }end}{\lstbasicfont ,{ }end}{5}
     246 + }
     247 +\else
     248 + \lstset{%
     249 + literate=%
     250 + {(end)}{\lstbasicfont (end)}{5} % black ``end'' when indexing last vector element
     251 + {({ }end)}{\lstbasicfont ({ }end)}{6}
     252 + {(end{ })}{\lstbasicfont (end{ })}{6}
     253 + {({ }end{ })}{\lstbasicfont ({ }end{ })}{7}
     254 + {:end}{\lstbasicfont :end}{4}
     255 + {:{ }end}{\lstbasicfont :{ }end}{5}
     256 + {end:}{\lstbasicfont end:}{4}
     257 + {end{ }:}{\lstbasicfont end{ }:}{5}
     258 + {,end}{\lstbasicfont ,end}{4}
     259 + {,{ }end}{\lstbasicfont ,{ }end}{5}
     260 + }
     261 +\fi%literates
     262 + 
     263 +% ---------------------------------------------------------------------------------
     264 +% line numbering
     265 +\ifnumbered% numbered option
     266 + \lstset{%
     267 + numbersep=3mm, numbers=left, numberstyle=\tiny, % number style
     268 + }
     269 +\fi
     270 + 
     271 +\ifframed% framed option
     272 + \lstset{%
     273 + frame=single, % frame
     274 + }
     275 + \ifnumbered%
     276 + \lstset{%
     277 + framexleftmargin=6mm, xleftmargin=6mm % tweak margins
     278 + }
     279 + \fi
     280 +\fi
     281 + 
     282 +\endinput
     283 +%% End of file `mcode.sty'.
  • unit05_amc/prob/prob_amc.pdf
    Binary file.
  • ■ ■ ■ ■ ■ ■
    unit05_amc/prob/prob_amc.tex
     1 +\documentclass[11pt]{article}
     2 + 
     3 +\usepackage{fullpage}
     4 +\usepackage{amsmath, amssymb, bm, cite, epsfig, psfrag}
     5 +\usepackage{graphicx}
     6 +\usepackage{float}
     7 +\usepackage{amsthm}
     8 +\usepackage{amsfonts}
     9 +\usepackage{listings}
     10 +\usepackage{cite}
     11 +\usepackage{hyperref}
     12 +\usepackage{tikz}
     13 +\usepackage{enumitem}
     14 +\usetikzlibrary{shapes,arrows}
     15 +\usepackage{mdframed}
     16 +\usepackage{mcode}
     17 +\usepackage{siunitx}
     18 +%\usetikzlibrary{dsp,chains}
     19 + 
     20 +%\restylefloat{figure}
     21 +%\theoremstyle{plain} \newtheorem{theorem}{Theorem}
     22 +%\theoremstyle{definition} \newtheorem{definition}{Definition}
     23 + 
     24 +\def\del{\partial}
     25 +\def\ds{\displaystyle}
     26 +\def\ts{\textstyle}
     27 +\def\beq{\begin{equation}}
     28 +\def\eeq{\end{equation}}
     29 +\def\beqa{\begin{eqnarray}}
     30 +\def\eeqa{\end{eqnarray}}
     31 +\def\beqan{\begin{eqnarray*}}
     32 +\def\eeqan{\end{eqnarray*}}
     33 +\def\nn{\nonumber}
     34 +\def\binomial{\mathop{\mathrm{binomial}}}
     35 +\def\half{{\ts\frac{1}{2}}}
     36 +\def\Half{{\frac{1}{2}}}
     37 +\def\N{{\mathbb{N}}}
     38 +\def\Z{{\mathbb{Z}}}
     39 +\def\Q{{\mathbb{Q}}}
     40 +\def\R{{\mathbb{R}}}
     41 +\def\C{{\mathbb{C}}}
     42 +\def\argmin{\mathop{\mathrm{arg\,min}}}
     43 +\def\argmax{\mathop{\mathrm{arg\,max}}}
     44 +%\def\span{\mathop{\mathrm{span}}}
     45 +\def\diag{\mathop{\mathrm{diag}}}
     46 +\def\x{\times}
     47 +\def\limn{\lim_{n \rightarrow \infty}}
     48 +\def\liminfn{\liminf_{n \rightarrow \infty}}
     49 +\def\limsupn{\limsup_{n \rightarrow \infty}}
     50 +\def\MID{\,|\,}
     51 +\def\MIDD{\,;\,}
     52 + 
     53 +\newtheorem{proposition}{Proposition}
     54 +\newtheorem{definition}{Definition}
     55 +\newtheorem{theorem}{Theorem}
     56 +\newtheorem{lemma}{Lemma}
     57 +\newtheorem{corollary}{Corollary}
     58 +\newtheorem{assumption}{Assumption}
     59 +\newtheorem{claim}{Claim}
     60 +\def\qed{\mbox{} \hfill $\Box$}
     61 +\setlength{\unitlength}{1mm}
     62 + 
     63 +\def\bhat{\widehat{b}}
     64 +\def\ehat{\widehat{e}}
     65 +\def\phat{\widehat{p}}
     66 +\def\qhat{\widehat{q}}
     67 +\def\rhat{\widehat{r}}
     68 +\def\shat{\widehat{s}}
     69 +\def\uhat{\widehat{u}}
     70 +\def\ubar{\overline{u}}
     71 +\def\vhat{\widehat{v}}
     72 +\def\xhat{\widehat{x}}
     73 +\def\xbar{\overline{x}}
     74 +\def\zhat{\widehat{z}}
     75 +\def\zbar{\overline{z}}
     76 +\def\la{\leftarrow}
     77 +\def\ra{\rightarrow}
     78 +\def\MSE{\mbox{\small \sffamily MSE}}
     79 +\def\SNR{\mbox{\small \sffamily SNR}}
     80 +\def\SINR{\mbox{\small \sffamily SINR}}
     81 +\def\arr{\rightarrow}
     82 +\def\Exp{\mathbb{E}}
     83 +\def\var{\mbox{var}}
     84 +\def\Tr{\mbox{Tr}}
     85 +\def\tm1{t\! - \! 1}
     86 +\def\tp1{t\! + \! 1}
     87 + 
     88 +\def\Xset{{\cal X}}
     89 + 
     90 +\newcommand{\one}{\mathbf{1}}
     91 +\newcommand{\abf}{\mathbf{a}}
     92 +\newcommand{\bbf}{\mathbf{b}}
     93 +\newcommand{\dbf}{\mathbf{d}}
     94 +\newcommand{\ebf}{\mathbf{e}}
     95 +\newcommand{\gbf}{\mathbf{g}}
     96 +\newcommand{\hbf}{\mathbf{h}}
     97 +\newcommand{\pbf}{\mathbf{p}}
     98 +\newcommand{\pbfhat}{\widehat{\mathbf{p}}}
     99 +\newcommand{\qbf}{\mathbf{q}}
     100 +\newcommand{\qbfhat}{\widehat{\mathbf{q}}}
     101 +\newcommand{\rbf}{\mathbf{r}}
     102 +\newcommand{\rbfhat}{\widehat{\mathbf{r}}}
     103 +\newcommand{\sbf}{\mathbf{s}}
     104 +\newcommand{\sbfhat}{\widehat{\mathbf{s}}}
     105 +\newcommand{\ubf}{\mathbf{u}}
     106 +\newcommand{\ubfhat}{\widehat{\mathbf{u}}}
     107 +\newcommand{\utildebf}{\tilde{\mathbf{u}}}
     108 +\newcommand{\vbf}{\mathbf{v}}
     109 +\newcommand{\vbfhat}{\widehat{\mathbf{v}}}
     110 +\newcommand{\wbf}{\mathbf{w}}
     111 +\newcommand{\wbfhat}{\widehat{\mathbf{w}}}
     112 +\newcommand{\xbf}{\mathbf{x}}
     113 +\newcommand{\xbfhat}{\widehat{\mathbf{x}}}
     114 +\newcommand{\xbfbar}{\overline{\mathbf{x}}}
     115 +\newcommand{\ybf}{\mathbf{y}}
     116 +\newcommand{\zbf}{\mathbf{z}}
     117 +\newcommand{\zbfbar}{\overline{\mathbf{z}}}
     118 +\newcommand{\zbfhat}{\widehat{\mathbf{z}}}
     119 +\newcommand{\Ahat}{\widehat{A}}
     120 +\newcommand{\Abf}{\mathbf{A}}
     121 +\newcommand{\Bbf}{\mathbf{B}}
     122 +\newcommand{\Cbf}{\mathbf{C}}
     123 +\newcommand{\Bbfhat}{\widehat{\mathbf{B}}}
     124 +\newcommand{\Dbf}{\mathbf{D}}
     125 +\newcommand{\Ebf}{\mathbf{E}}
     126 +\newcommand{\Gbf}{\mathbf{G}}
     127 +\newcommand{\Hbf}{\mathbf{H}}
     128 +\newcommand{\Kbf}{\mathbf{K}}
     129 +\newcommand{\Pbf}{\mathbf{P}}
     130 +\newcommand{\Phat}{\widehat{P}}
     131 +\newcommand{\Qbf}{\mathbf{Q}}
     132 +\newcommand{\Rbf}{\mathbf{R}}
     133 +\newcommand{\Rhat}{\widehat{R}}
     134 +\newcommand{\Sbf}{\mathbf{S}}
     135 +\newcommand{\Ubf}{\mathbf{U}}
     136 +\newcommand{\Vbf}{\mathbf{V}}
     137 +\newcommand{\Wbf}{\mathbf{W}}
     138 +\newcommand{\Xhat}{\widehat{X}}
     139 +\newcommand{\Xbf}{\mathbf{X}}
     140 +\newcommand{\Ybf}{\mathbf{Y}}
     141 +\newcommand{\Zbf}{\mathbf{Z}}
     142 +\newcommand{\Zhat}{\widehat{Z}}
     143 +\newcommand{\Zbfhat}{\widehat{\mathbf{Z}}}
     144 +\def\alphabf{{\boldsymbol \alpha}}
     145 +\def\betabf{{\boldsymbol \beta}}
     146 +\def\mubf{{\boldsymbol \mu}}
     147 +\def\lambdabf{{\boldsymbol \lambda}}
     148 +\def\etabf{{\boldsymbol \eta}}
     149 +\def\xibf{{\boldsymbol \xi}}
     150 +\def\taubf{{\boldsymbol \tau}}
     151 +\def\sigmahat{{\widehat{\sigma}}}
     152 +\def\thetabf{{\bm{\theta}}}
     153 +\def\thetabfhat{{\widehat{\bm{\theta}}}}
     154 +\def\thetahat{{\widehat{\theta}}}
     155 +\def\mubar{\overline{\mu}}
     156 +\def\muavg{\mu}
     157 +\def\sigbf{\bm{\sigma}}
     158 +\def\etal{\emph{et al.}}
     159 +\def\Ggothic{\mathfrak{G}}
     160 +\def\Pset{{\mathcal P}}
     161 +\newcommand{\bigCond}[2]{\bigl({#1} \!\bigm\vert\! {#2} \bigr)}
     162 +\newcommand{\BigCond}[2]{\Bigl({#1} \!\Bigm\vert\! {#2} \Bigr)}
     163 + 
     164 +\def\Rect{\mathop{Rect}}
     165 +\def\sinc{\mathop{sinc}}
     166 +\def\NF{\mathrm{NF}}
     167 +\def\Real{\mathrm{Re}}
     168 +\def\Imag{\mathrm{Im}}
     169 +\newcommand{\tran}{^{\text{\sf T}}}
     170 +\newcommand{\herm}{^{\text{\sf H}}}
     171 + 
     172 + 
     173 +% Solution environment
     174 +\definecolor{lightgray}{gray}{0.95}
     175 +\newmdenv[linecolor=white,backgroundcolor=lightgray,frametitle=Solution:]{solution}
     176 + 
     177 + 
     178 + 
     179 +\begin{document}
     180 + 
     181 +\title{Problems: Adaptive Modulation and Coding\\
     182 +ECE-GY 6023. Wireless Communications}
     183 +\author{Prof.\ Sundeep Rangan}
     184 +\date{}
     185 + 
     186 +\maketitle
     187 + 
     188 + 
     189 +\begin{enumerate}
     190 +\item \emph{MCS selection:} A system has four MCS selections with minimum required SNRs
     191 +as shown:
     192 +\begin{table}[h]
     193 +\centering
     194 +\begin{tabular}{|c|c|c|c|c|}
     195 +\hline
     196 +\textbf{MCS} & 1 & 2 & 3 & 4 \\ \hline
     197 +\textbf{Min SNR [dB]} & 0 & 4 & 8 & 12 \\ \hline
     198 +\end{tabular}
     199 +\end{table}
     200 +\begin{enumerate}[label=(\alph*)]
     201 +\item Suppose that the SNR in \si{dB}, $\gamma$, is unknown and can be modeled as Gaussian
     202 +variable with mean \SI{6}{dB} and standard deviation of \SI{2}{dB}.
     203 +What is the probability that $\gamma > 8$\, \si{dB}, the required SNR for MCS 3.
     204 + 
     205 +\item The TX attempts MCS 3 and it fails, meaning $\gamma \leq 8$\, \si{dB}.
     206 +If it now attempts MCS 2, what is the probability that it will pass assuming the channel has not changed.
     207 +\end{enumerate}
     208 + 
     209 + 
     210 +\item \emph{Markovian errors:}
     211 +In this problem, we will show how to use Markov processes
     212 +to model error probabilities on correlated channels.
     213 +As a simple example, suppose that a channel in time slot $k$
     214 +can be modeled as being in one of two states: a good state ($X_k=1$),
     215 +and a bad state ($X_k = 0$).
     216 +Assume $X_k$ is Markov with transition probability matrix
     217 +\[
     218 + P = \begin{bmatrix}
     219 + 0.8 & 0.2 \\
     220 + 0.3 & 0.7
     221 + \end{bmatrix}.
     222 +\]
     223 +A transmitter sends packets in each time slot.
     224 +Let $Y_k=0$ or $1$ be the indicator that a packet fails or
     225 +passes in time slot $k$. Assume,
     226 +\[
     227 + P(Y_k=1|X_k=1) = 0.8, \quad P(Y_k=1|X_k=0) = 0.4.
     228 +\]
     229 +Assume that, given the $X_k$'s, the $Y_k$'s are independent.
     230 +\begin{enumerate}[label=(\alph*)]
     231 +\item Let $\alpha_k(i) = P(X_k=i)$. Find the recursion
     232 +for the values $\alpha_{k+1}(i)$ in terms of
     233 +the values $\alpha_k(j)$.
     234 + 
     235 +\item Let
     236 +\[
     237 + \alpha^0_k(i) = P(X_k=i|Y_0=0,\ldots,Y_{k-1}=0).
     238 +\]
     239 +That is, $\alpha^0_k(i)$ is the probability that
     240 +$X_k=i$ given that the previous $k-1$ transmissions have failed. Find the recursion for $\alpha^0_{k+1}(i)$ in
     241 +terms of the values $\alpha^0_k(i)$.
     242 + 
     243 +\item Let $T$ be the time,
     244 +\[
     245 + T = \min \left\{~k~|Y_k = 1~\right\},
     246 +\]
     247 +which is the index of the first slot that the packet passes.
     248 +Suppose that $X_0=0$.
     249 +Write a simple MATLAB program to compute $P(T=k)$ for
     250 +$k=0,1,\ldots,9$ using the above recursions.
     251 +\end{enumerate}
     252 + 
     253 + 
     254 + 
     255 +\item \emph{Multi-Process ARQ timeline:} Suppose that a gNB wants to send $N=10$ packet data units
     256 +(PDUs).
     257 +The PDUs are indexed $n=0,1,\ldots,N-1$.
     258 +In each slot, it attempts to send one PDU beginning in slot $k=0$ starting with PDU 0.
     259 +There are $K=4$ parallel HARQ processes.
     260 +Suppose that the transmissions fails in slots $k=5, 6$ and 7 and passes in all other slots.
     261 +\begin{enumerate}[label=(\alph*)]
     262 + 
     263 +\item For each PDU, indicate the fist slot it is correctly decoded at the receiver.
     264 + 
     265 +\item Suppose the receiver only releases decoded the PDUs in order to the higher layer.
     266 +So, for example, it holds PDU 3 back until it receives PDU 2. Also, there is a fixed delay
     267 +of 3 slots from the time of transmission to the PDU being available at the receiver for higher layers.
     268 +When do the PDUs arrive at the higher layer?
     269 +\end{enumerate}
     270 + 
     271 + 
     272 + 
     273 +\item \emph{TB size:} Suppose that a \SI{64}{kbps} voice over IP (VoIP)
     274 +system transmits frames once every
     275 +\SI{20}{ms}. Each voice frame also requires a \SI{20}{B} IP header, \SI{20}{B} UDP header,
     276 +and 24 bits CRC.
     277 +\begin{enumerate}[label=(\alph*)]
     278 +\item How many bits are in each voice frame?
     279 + 
     280 +\item Suppose the data is transmitted in an NR-like system with 14 OFDM symbols and 12 sub-carriers
     281 +per RB. In each RB, 14 REs are used for overhead. At a spectral efficiency of 2 bits / RE,
     282 +how many RBs are needed to transmit the voice packet.
     283 + 
     284 +\item If the system has 51 RBs in bandwidth with one slot every \SI{0.5}{ms}, what is the fraction
     285 +of RBs used by the VoIP application?
     286 +\end{enumerate}
     287 + 
     288 + 
     289 +\item \emph{HARQ Errors:} For each of the following events, state what will occur:
     290 +\begin{itemize}
     291 +\item The PDU can eventually recovered through HARQ, or
     292 +\item The PDU cannot be recovered through HARQ and will need to be recovered from
     293 +a high-layer ARQ protocol (e.g.\ at the RLC or TCP layer).
     294 +\end{itemize}
     295 +\begin{enumerate}[label=(\alph*)]
     296 +\item A DL PDCCH for an initial transmission is not seen by the UE, so it does not even
     297 +know that there is a DL data transmission.
     298 + 
     299 +\item The UE decodes the DL data and sends an ACK to the gNB. But, the gNB mistakes the
     300 +ACK for a NACK.
     301 + 
     302 +\item The UE fails to decode the DL data and sends a NACK to the gNB. But, the gNB mistakes the
     303 +NACK for an ACK.
     304 + 
     305 +\end{enumerate}
     306 + 
     307 + 
     308 +\item \emph{Power and SNR estimation:} Suppose that
     309 +we have two groups of reference symbols:
     310 +\begin{itemize}
     311 +\item Zero-power RS that contain noise only,
     312 +\[
     313 + r_k = w_k, \quad w_k \sim C{\mathcal N}(0,N).
     314 +\]
     315 +On these symbols, we compute a noise estimate,
     316 +\[
     317 + \widehat{N} = \frac{1}{K} \sum_{k=1}^K |r_k|^2,
     318 +\]
     319 +where $K$ is the number of symbols over which we average.
     320 + 
     321 + 
     322 +\item Non zero-power RS with signal and noise,
     323 +\[
     324 + r_k = h_kx_k + w_k, \quad
     325 + h_k \sim C{\mathcal N}(0,E_s), \quad
     326 + w_k \sim C{\mathcal N}(0,N),
     327 +\]
     328 +and $|x_k|=1$ is known to the receiver.
     329 +On these symbols, we compute a signal power estimate
     330 +\[
     331 + \widehat{S} = \frac{1}{M} \sum_{k=1}^K |r_k|^2,
     332 +\]
     333 +where $M$ is the number of symbols over which we average.
     334 +\end{itemize}
     335 + 
     336 +\begin{enumerate}[label=(\alph*)]
     337 +\item Show that $\widehat{N}$ and $\widehat{S}$
     338 +can be written as a scaled chi-squared
     339 +distributions with a certain number of degrees of freedom.
     340 +You can look up this distribution in any source.
     341 + 
     342 +\item Show that the ratio $\widehat{S}/\widehat{N}$ can be written as a scaled $F$-distribution
     343 +distribution with a certain number of degrees of freedom.
     344 +You can look up this distribution in any source.
     345 + 
     346 +\item Suppose we use
     347 +\[
     348 + \widehat{\gamma} = \max\left\{ 0, \frac{\widehat{S}}{\widehat{N}} - 1\right\}
     349 +\]
     350 +as the estimate of the true SNR $\gamma = E_s/N$.
     351 +Plot the probability that the SNR is accurate within \SI{0.5}{dB} as a function of $K$ with $K=M$.
     352 +You can use the MATLAB function \mcode{fcdf}.
     353 +Assume the true SNR is, $\gamma = $\, \SI{3}{dB}.
     354 +\end{enumerate}
     355 + 
     356 +\item \emph{CSI estimation bias:} Suppose that in a group of $K$ symbols,
     357 +reference symbols $x_k$ are received as
     358 +\[
     359 + r_k = hx_k + w_k, \quad w_k \sim {\mathcal CN}(0,N),
     360 + \quad |hx_k|^2 = E_s,
     361 +\]
     362 +where $h$ is an unknown channel, $N$ is the noise power, and $E_s$ is the received signal energy.
     363 +We channel and noise estimates via
     364 +\[
     365 + \widehat{h} = \frac{ \sum_{k=1}^K x_k^*r_k } {\sum_{k=1}^K |x_k|^2 },
     366 + \quad
     367 + \widehat{N} = \frac{\alpha }{K} \sum_{k=1}^K |r_k - \widehat{h}x_k|^2.
     368 +\]
     369 +\begin{enumerate}[label=(\alph*)]
     370 +\item Find the constant $\alpha$ such that the noise estimate is unbiased. That is,
     371 +\[
     372 + \Exp\left[ \widehat{N} \right] = N.
     373 +\]
     374 +\item Suppose that you obtain an accurate estimate of the noise $\widehat{N}=N$
     375 +(for example, by averaging over large numbers of groups). How would you get an unbiased
     376 +estimate of $E_s$?
     377 +\end{enumerate}
     378 + 
     379 + 
     380 + 
     381 + 
     382 +\item \emph{Rate matching:} Suppose you send 200 bits with a rate $1/2$ convolutional code
     383 +with constraint length $K=7$.
     384 +\begin{enumerate}[label=(\alph*)]
     385 +\item How many coded bits are output from the convolutional encoder? Remember to include
     386 +the tail bits.
     387 + 
     388 +\item Suppose you want to send the data on 150 QPSK symbols. How many bits should be punctured or
     389 +repeated?
     390 +\end{enumerate}
     391 + 
     392 +\item \emph{Comparing Chase and IR:}
     393 +Suppose that a TX can create mother codes
     394 +that, on an AWGN channel, require an SNR $\gamma$
     395 +and provide a rate per symbol of
     396 +\[
     397 + R(\gamma)
     398 + = \min\{ \rho_{\rm max}, \alpha \log_2(1+\gamma) \},
     399 +\]
     400 +where $\rho_{\rm max}$ is the maximum spectral efficiency
     401 +and $\alpha$ is the fraction that the code achieves within
     402 +the Shannon rate.
     403 +Now suppose we use this code for HARQ with $K$ transmissions.
     404 +Suppose that all the symbols in transmission $k$ experience
     405 +some SNR $\gamma_k$, $k=1,\ldots,K$.
     406 +\begin{enumerate}[label=(\alph*)]
     407 +\item Suppose, we use Chase combining where we
     408 +create a packet from the mother code and retransmit it
     409 +in each of the $K$ transmissions. For each target $\gamma$,
     410 +find the condition on $\gamma_1,\ldots,\gamma_K$ that the
     411 +packet will pass. Also, find the rate, $R_{\rm chase}(\gamma)$ that will be achieved if
     412 +the packet passes after $K$ transmissions.
     413 + 
     414 +\item Next, suppose we use IR where we create a longer packet
     415 +and transmit a fraction $1/K$ symbols in each transmission.
     416 +For each target $\gamma$,
     417 +find the condition on $\gamma_1,\ldots,\gamma_K$ that the
     418 +packet will pass. Also, find the rate, $R_{\rm IR}(\gamma)$ that will be achieved if
     419 +the packet passes after $K$ transmissions.
     420 + 
     421 +\item Set $K=3$ and generate random i.i.d.\ $\gamma_k$
     422 +that are exponentially distributed with an average of \SI{3}{dB} (i.e.\ independent Rayleigh fading).
     423 +Generate $n=1000$ instances of this channel
     424 +using MATLAB.
     425 +By varying the target SNR $\gamma$,
     426 +plot the probability that the packet the packet passes
     427 +after $K$ transmissions,
     428 +vs.\ the rates $R_{\rm chase}(\gamma)$ and
     429 +$R_{\rm IR}(\gamma)$, for both Chase and IR combining.
     430 + 
     431 +\end{enumerate}
     432 + 
     433 + 
     434 + 
     435 +\end{enumerate}
     436 + 
     437 + 
     438 + 
     439 +\end{document}
     440 + 
     441 + 
Please wait...
Page is in error, reload to recover