Compare commits

..

No commits in common. "5dcad9ebc4f9d54016ad5293be03f3b9f32bbe78" and "dbb68ed60a0983ff8dde3269033ad8a08e544fa6" have entirely different histories.

5 changed files with 163 additions and 280 deletions

1
.gitignore vendored
View File

@ -1,2 +1 @@
copyrighted_images
README-copyright.pdf

36
.vscode/settings.json vendored
View File

@ -1,36 +0,0 @@
{
"cSpell.enabled": true,
"cSpell.words": [
"AWGN",
"bandpass",
"Bitstream",
"BPSK",
"braket",
"DBPSK",
"DPSK",
"ELEC",
"ENGT",
"Ergodicity",
"formualas",
"infty",
"mathbb",
"mathbf",
"mathfrak",
"Mesiya",
"Mpolar",
"Munipolar",
"Narrowband",
"Nyquist",
"OQPSK",
"Overmodulation",
"Parseval's",
"QPSK",
"Quantizer",
"Signum",
"sinc",
"SQNR",
"Sunde's",
"textbf",
"Wideband"
]
}

File diff suppressed because one or more lines are too long

215
README.md
View File

@ -1,13 +1,5 @@
# Idiot's guide to ELEC4402 communication systems
<style>
@media print{
.copyrighted{
display: none !important;
}
}
</style>
<!-- PRINT NOTE: Use 0.20 margins all around, scale: fit to page width, and no headers or backgrounds -->
This unit allows you to bring infinite physical notes (except books borrowed from the UWA library) to all tests and the final exam. You can't rely on what material they provide in the test/exam, it is very _minimal_ to say the least. Hope this helps.
@ -78,7 +70,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<div style="page-break-after: always;"></div>
## Fourier transform identities and properties
## Fourier transform identities
| Time domain $x(t)$ | Frequency domain $X(f)$ |
| --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
@ -93,30 +85,25 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
| $\delta(t - t_0)$ | $\exp(-j2\pi f t_0)$ |
| $\exp(j2\pi f_c t)$ | $\delta(f - f_c)$ |
| $\cos(2\pi f_c t)$ | $\frac{1}{2}[\delta(f - f_c) + \delta(f + f_c)]$ |
| $\cos(2\pi f_c t+\theta)$ | $\frac{1}{2}[\delta(f - f_c)\exp(j\theta) + \delta(f + f_c)\exp(-j\theta)]\quad\text{Use for coherent recv.}$ |
| $\sin(2\pi f_c t)$ | $\frac{1}{2j} [\delta(f - f_c) - \delta(f + f_c)]$ |
| $\sin(2\pi f_c t+\theta)$ | $\frac{1}{2j} [\delta(f - f_c)\exp(j\theta) - \delta(f + f_c)\exp(-j\theta)]$ |
| $\text{sgn}(t)$ | $\frac{1}{j\pi f}$ |
| $\frac{1}{\pi t}$ | $-j \text{sgn}(f)$ |
| $u(t)$ | $\frac{1}{2} \delta(f) + \frac{1}{j2\pi f}$ |
| $\sum_{n=-\infty}^{\infty} \delta(t - nT_0)$ | $\frac{1}{T_0} \sum_{n=-\infty}^{\infty} \delta\left(f - \frac{n}{T_0}\right)=f_0 \sum_{n=-\infty}^{\infty} \delta\left(f - n f_0\right)$ |
| Time domain $x(t)$ | Frequency domain $X(f)$ | Property |
| ---------------------------------------- | ------------------------------------------------ | ----------------------------- |
| $g(t-a)$ | $\exp(-j2\pi fa)G(f)$ | Time shifting |
| $\exp(-j2\pi f_c t)g(t)$ | $G(f-f_c)$ | Frequency shifting |
| $g(bt)$ | $\frac{G(f/b)}{\|b\|}$ | Time scaling |
| $g(bt-a)$ | $\frac{1}{\|b\|}\exp(-j2\pi a(f/b))\cdot G(f/b)$ | Time scaling and shifting |
| $\frac{d}{dt}g(t)$ | $j2\pi fG(f)\quad$ | Differentiation wrt time |
| $tg(t)$ | $\frac{1}{2\pi}\frac{d}{df}G(f)\quad$ | Differentiation wrt frequency |
| $g^*(t)$ | $G^*(-f)$ | Conjugate functions |
| $G(t)$ | $g(-f)$ | Duality |
| $\int_{-\infty}^t g(\tau)d\tau$ | $\frac{1}{j2\pi f}G(f)+\frac{G(0)}{2}\delta(f)$ | Integration wrt time |
| $g(t)h(t)$ | $G(f)*H(f)$ | Time multiplication |
| $g(t)*h(t)$ | $G(f)H(f)$ | Time convolution |
| $ag(t)+bh(t)$ | $aG(f)+bH(f)$ | Linearity $a,b$ constants |
| $\int_{-\infty}^\infty x(t)y^*(t)dt$ | $\int_{-\infty}^\infty X(f)Y^*(f)df$ | Parseval's theorem |
| $E_x=\int_{-\infty}^\infty \|x(t)\|^2dt$ | $E_x=\int_{-\infty}^\infty \|X(f)\|^2df$ | Parseval's theorem |
| Time domain $x(t)$ | Frequency domain $X(f)$ | Property |
| ------------------------------- | ------------------------------------------------ | ------------------------- |
| $g(t-a)$ | $\exp(-j2\pi fa)G(f)$ | Time shifting |
| $\exp(-j2\pi f_c t)g(t)$ | $G(f-f_c)$ | Frequency shifting |
| $g(bt)$ | $\frac{G(f/b)}{\|b\|}$ | Time scaling |
| $g(bt-a)$ | $\frac{1}{\|b\|}\exp(-j2\pi a(f/b))\cdot G(f/b)$ | Time scaling and shifting |
| $\frac{d}{dt}g(t)$ | $j2\pi fG(f)\quad$ | Differentiation wrt time |
| $g^*(t)$ | $G^*(-f)$ | Conjugate functions |
| $G(t)$ | $g(-f)$ | Duality |
| $\int_{-\infty}^t g(\tau)d\tau$ | $\frac{1}{j2\pi f}G(f)+\frac{G(0)}{2}\delta(f)$ | Integration wrt time |
| $g(t)h(t)$ | $G(f)*H(f)$ | Time multiplication |
| $g(t)*h(t)$ | $G(f)H(f)$ | Time convolution |
| $ag(t)+bh(t)$ | $aG(f)+bH(f)$ | Linearity $a,b$ constants |
| Description | Property |
| ----------------------------------- | ----------------- |
@ -351,13 +338,11 @@ Overmodulation (resulting in phase reversals at crossing points): $m_a>1$
```math
\begin{align*}
s(t) &= A_c\cos\left[2\pi f_c t + k_p m(t)\right]\quad\text{Phase modulated (PM)}\\
s(t) &= A_c\cos(\theta_i(t))=A_c\cos\left[2\pi f_c t + 2 \pi k_f \int_{-\infty}^t m(\tau) d\tau\right]\quad\text{Frequency modulated (FM)}\\
s(t) &= A_c\cos\left[2\pi f_c t + 2 \pi k_f \int_0^t m(\tau) d\tau\right]\quad\text{Frequency modulated (FM)}\\
s(t) &= A_c\cos\left[2\pi f_c t + \beta \sin(2\pi f_m t)\right]\quad\text{FM single tone}\\
f_i(t) &= \frac{1}{2\pi}\frac{d}{dt}\theta_i(t)\quad\text{Instantaneous frequency from instantaneous phase}\\
\Delta f&=\beta f_m=k_f A_m f_m = \max_t(k_f m(t))- \min_t(k_f m(t))\quad\text{Maximum frequency deviation}\\
\Delta f&=\max_t(f_i(t))- \min_t(f_i(t))\quad\text{Maximum frequency deviation}\\
\beta&=\frac{\Delta f}{f_m}=k_f A_m\quad\text{Modulation index}\\
D&=\frac{\Delta f}{W_m}\quad\text{Deviation ratio, where $W_m$ is bandwidth of $m(t)$ (Use FT)}\\
\Delta f&=\beta f_m=k_f A_m f_m = \max_t(k_f m(t))- \min_t(k_f m(t))\quad\text{Maximum frequency deviation}\\
D&=\frac{\Delta f}{W_m}\quad\text{Deviation ratio, where $W_m$ is bandwidth of $m(t)$ (Use FT)}
\end{align*}
```
@ -403,6 +388,27 @@ B &= \begin{cases}
<!-- MATH END -->
#### $\Delta f$ of arbitrary modulating signal
Find instantaneous frequency $f_\text{FM}$.
$M$: Number of **pairs** of significant sidebands
```math
\begin{align*}
s(t)&=A_c\cos(\theta_\text{FM}(t))\\
f_\text{FM}(t) &= \frac{1}{2\pi}\frac{d\theta_\text{FM}(t)}{dt}\\
A_m &= \max_t|m(t)|\\
\Delta f &= \max_t(f_\text{FM}(t)) - f_c\\
W_m &= \text{max}(\text{frequencies in $\theta_\text{FM}(t)$...}) \\
\text{Example: }&\text{sinc}(At+t)+2\cos(2\pi t)=\frac{\sin(2\pi((At+t)/2))}{\pi(At+t)}+2\cos(2\pi t)\to W_m=\max\left(\frac{A+1}{2},1\right)\\
D &= \frac{\Delta f}{W_m}\\
B_T &= 2(D+1)W_m
\end{align*}
```
<!-- MATH END -->
### Complex envelope
```math
@ -430,44 +436,20 @@ B &= \begin{cases}
G_x(f)&=G(f)G_w(f)\text{ (PSD)}\\
G_x(f)&=\lim_{T\to\infty}\frac{|X_T(f)|^2}{T}\text{ (PSD)}\\
G_x(f)&=\mathfrak{F}[R_x(\tau)]\text{ (WSS)}\\
P_x&={\sigma_x}^2=\int_\mathbb{R}G_x(f)df\quad\text{For zero mean}\\
P_x&={\sigma_x}^2=\lim_{t\to\infty}\frac{1}{T}\int_{-T/2}^{T/2}|x(t)|^2dt\quad\text{For zero mean}\\
P&=\sigma^2=\int_\mathbb{R}G_x(f)df\\
P&=\sigma^2=\lim_{t\to\infty}\frac{1}{T}\int_{-T/2}^{T/2}|x(t)|^2dt\\
P[A\cos(2\pi f t+\phi)]&=\frac{A^2}{2}\quad\text{Power of sinusoid }\\
E_x&=\int_{-\infty}^{\infty}|x(t)|^2dt=\int_{-\infty}^{\infty}|X(f)|^2df\quad\text{Parseval's theorem}\\
E&=\int_{-\infty}^{\infty}|x(t)|^2dt=|X(f)|^2\\
R_x(\tau) &= \mathfrak{F}(G_x(f))\quad\text{PSD to Autocorrelation}
\end{align*}
```
<!-- MATH END -->
##
## Noise performance
Coherent detection system.
```math
\begin{align*}
y(t) &= m(t)\cos(2\pi f_c t+\theta) = m(t)\cos^2(2\pi f_c t+\theta)\text{ After IF mixing.}\\
&= m(t)\frac{1}{2}(1+\cos(4 f_c t+2\theta))\\
&= \frac{1}{2}m(t)+\frac{1}{2}\cos(4 f_c t+2\theta)\\
\implies S_u(f) &= \left(\frac{1}{2}\right)^2S_u(f)\quad\text{After LPF.}
\end{align*}
```
<!-- MATH END -->
Use formualas from previous section, [Power, energy and autocorrelation](#power-energy-and-autocorrelation).\
Use these formulas in particular:
```math
\begin{align*}
G_\text{WGN}(f)&=\frac{N_0}{2}\\
G_x(f)&=|H(f)|^2G_w(f)&\text{Note the square in $|H(f)|^2$}\\
P_x&={\sigma_x}^2=\int_\mathbb{R}G_x(f)df&\text{Often perform graphical integration}\\
\end{align*}
```
<!-- MATH END -->
```math
\begin{align*}
\text{CNR}_\text{in} &= \frac{P_\text{in}}{P_\text{noise}}\\
@ -544,8 +526,7 @@ Do not transmit more than $2B$ samples per second over a channel of $B$ bandwidt
Cannot add directly due to copyright!
<img src="copyrighted_images/sampling.png" alt="sampling" class="copyrighted">
![sampling](copyrighted_images/sampling.png)
![sampling](images/sampling.png)
## Quantizer
@ -576,8 +557,7 @@ Cannot add directly due to copyright!
Cannot add directly due to copyright!
<img src="copyrighted_images/quantizer.png" alt="quantizer" class="copyrighted">
![quantizer](copyrighted_images/quantizer.png)
![quantizer](images/quantizer.png)
## Line codes
@ -768,8 +748,7 @@ Remember that $T=2T_b$
### 1. Filter function
Find transfer function $h(t)$ of matched filter and apply to an input:\
Note that $x(T-t)$ is equivalent to horizontally flipping $x(t)$ around $x=T/2$.
Find transfer function $h(t)$ of matched filter and apply to an input:
```math
\begin{align*}
@ -782,7 +761,7 @@ Note that $x(T-t)$ is equivalent to horizontally flipping $x(t)$ around $x=T/2$.
<!-- MATH END -->
### 2. Bit error rate of matched filter
### 2. Bit error rate
Bit error rate (BER) from matched filter outputs and filter output noise
@ -907,34 +886,9 @@ Adapted from table 6.1 M F Mesiya - Contemporary Communication Systems
## ISI, channel model
### Raised cosine (RC) pulse
![Raised cosine pulse](images/RC.drawio.svg)
```math
0\leq\alpha\leq1
```
<!-- MATH END -->
⚠ NOTE might not be safe to assume $T'=T$, if you can solve the question without $T$ then use that method.
### Nyquist criterion for zero ISI
<!-- P_r(kT)=\begin{cases}
1 & k=0\\
0 & k\neq0
\end{cases} -->
```math
\begin{align*}
D &> 2W\quad\text{Use $W$ from table below depending on modulation scheme.}\\
B_\text{Nyquist} &= \frac{W}{1+\alpha}\\
\alpha&=\frac{\text{Excess BW}}{B_\text{Nyquist}}=\frac{B_\text{abs}-B_\text{Nyquist}}{B_\text{Nyquist}}\\
\end{align*}
```
<!-- MATH END -->
TODO:
### Nomenclature
@ -949,17 +903,25 @@ Adapted from table 6.1 M F Mesiya - Contemporary Communication Systems
<!-- MATH END -->
### Bandwidth $W$ and bit error rate of modulation schemes
### Raised cosine (RC) pulse
![Raised cosine pulse](images/RC.drawio.svg)
```math
0\leq\alpha\leq1
```
<!-- MATH END -->
⚠ NOTE might not be safe to assume $T'=T$, if you can solve the question without $T$ then use that method.
To solve this type of question:
1. Use the formula for $D$ below
2. Consult the BER table below to get the BER which relates the noise of the channel $N_0$ to $E_b$ and to $R_b$.
| Linear modulation | Half |
| Linear modulation ($M$-PSK, BPSK, $M$-QAM) | NRZ unipolar encoding, BASK |
| --------------------------------------------------- | -------------------------------------------------- |
| BPSK, QPSK, $M$-PSK, $M$-QAM, ASK, FSK | $M$-PAM, PAM |
| RZ unipolar, Manchester | NRZ Unipolar, NRZ Polar, Bipolar RZ |
| $W=B_\text{\color{green}abs-abs}$ | $W=B_\text{\color{green}abs}$ |
| $W=B_\text{abs-abs}=\frac{1+\alpha}{T}=(1+\alpha)D$ | $W=B_\text{abs}=\frac{1+\alpha}{2T}=(1+\alpha)D/2$ |
| $D=\frac{W\text{ symbol/s}}{1+\alpha}$ | $D=\frac{2W\text{ symbol/s}}{1+\alpha}$ |
@ -968,13 +930,37 @@ To solve this type of question:
\begin{align*}
R_b\text{ bit/s}&=(D\text{ symbol/s})\times(k\text{ bit/symbol})\\
M\text{ symbol/set}&=2^k\\
T\text{ s/symbol}&=1/(D\text{ symbol/s})\\
E_b&=PT=P_\text{av}/R_b\quad\text{Energy per bit}\\
\end{align*}
```
<!-- MATH END -->
### Nyquist stuff
#### TODO: Condition for 0 ISI
```math
P_r(kT)=\begin{cases}
1 & k=0\\
0 & k\neq0
\end{cases}
```
<!-- MATH END -->
#### Other
```math
\begin{align*}
\text{Excess BW}&=B_\text{abs}-B_\text{Nyquist}=\frac{1+\alpha}{2T}-\frac{1}{2T}=\frac{\alpha}{2T}\quad\text{FOR NRZ (Use correct $B_\text{abs}$)}\\
\alpha&=\frac{\text{Excess BW}}{B_\text{Nyquist}}=\frac{B_\text{abs}-B_\text{Nyquist}}{B_\text{Nyquist}}\\
T&=1/D
\end{align*}
```
<!-- MATH END -->
### Table of bandpass signalling and BER
| **Binary Bandpass Signaling** | **$B_\text{null-null}$ (Hz)** | **$B_\text{abs-abs}\color{red}=2B_\text{abs}$ (Hz)** | **BER with Coherent Detection** | **BER with Noncoherent Detection** |
@ -1085,7 +1071,7 @@ Input has probability distribution $p_X(a_i)=P(X=a_i)$
Channel maps alphabet $`\{a_1,\dots,a_M\} \to \{b_1,\dots,b_N\}`$
Output has probability distribution $p_Y(b_j)=P(y=b_j)$
Output has probabiltiy distribution $p_Y(b_j)=P(y=b_j)$
```math
\begin{align*}
@ -1127,7 +1113,7 @@ Output has probability distribution $p_Y(b_j)=P(y=b_j)$
N &\to\text{Output alphabet size}\\
\mathbf{p} &\to\text{Probability vector, any row of the transition matrix}\\
C &= \log_2(N)-H(\mathbf{p})\quad\text{Capacity for weakly symmetric and symmetric channels}\\
R_b &< C \text{ for error-free transmission}
R &< C \text{ for error-free transmission}
\end{align*}
```
@ -1147,30 +1133,16 @@ C=\frac{1}{2}\log_2\left(1+\frac{P_\text{av}}{N_0/2}\right)
<!-- MATH END -->
#### Channel capacity of a bandwidth limited AWGN channel
#### Channel capacity of a bandwidth AWGN channel
Note: Define XOR ($\oplus$) as exclusive OR, or modulo-2 addition.
```math
\begin{align*}
P_s&\to\text{Bandwidth limited average power}\\
y_i&=\text{bandpass}_W(x_i)+n_i\quad n_i\thicksim N(0,N_0/2)\\
C&=W\log_2\left(1+\frac{P_s}{N_0 W}\right)\\
C&=W\log_2(1+\text{SNR})\\
\text{SNR}&=P_s/(N_0 W)
\end{align*}
```
<!-- MATH END -->
#### Shannon limit
```math
\begin{align*}
R_b &< C\\
\implies R_b &< W\log_2\left(1+\frac{P_s}{N_0 W}\right)\quad\text{For bandwidth limited AWGN channel}\\
\frac{E_b}{N_0} &> \frac{2^\eta-1}{\eta}\quad\text{SNR per bit required for error-free transmission}\\
\eta &= \frac{R_b}{W}\quad\text{Spectral efficiency (bit/(s-Hz))}\\
\eta &\gg 1\quad\text{Bandwidth limited}\\
\eta &\ll 1\quad\text{Power limited}
C&=W\log_2(1+\text{SNR})\quad\text{SNR}=P_s/(N_0 W)
\end{align*}
```
@ -1178,8 +1150,6 @@ C=\frac{1}{2}\log_2\left(1+\frac{P_\text{av}}{N_0/2}\right)
## Channel code
Note: Define XOR ($\oplus$) as exclusive OR, or modulo-2 addition.
| | | |
| ---------------- | --------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| Hamming weight | $w_H(x)$ | Number of `'1'` in codeword $x$ |
@ -1198,7 +1168,8 @@ A linear block code must be a subspace and satisfy both:
1. Zero vector must be present at least once
2. The XOR of any codeword pair in the code must result in a codeword that is already present in the code table.
3. $d_\text{min}=w_\text{min}$ (Implied by (1) and (2).)
For a linear block code, $d_\text{min}=w_\text{min}$
### Code generation

Binary file not shown.