Skip to content

Commit

Permalink
add module 05
Browse files Browse the repository at this point in the history
  • Loading branch information
yuanzhangxiao committed Feb 7, 2024
1 parent 2200c97 commit b38543e
Show file tree
Hide file tree
Showing 19 changed files with 309 additions and 93 deletions.
2 changes: 1 addition & 1 deletion css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ small {
/* Add top and bottom paddings to the footer on larger devices */
@media (min-width: 768px) {
footer {
padding-top: 2rem;
padding-top: 1rem;
padding-bottom: 2rem;
margin-top: 2em;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ From the expression, we know that the received signal is a superposition of two

Let us formulate this idea mathematically. The phase difference between the two sinusoids is
\\[
\Delta \theta = \left( \frac{2 \pi f (2d-r)}{c} + \pi \right) - \left( \frac{2 \pi f r}{c} + \pi \right) = \frac{4 \pi f}{c} (d-r) + \pi.
\Delta \theta = \left( \frac{2 \pi f (2d-r)}{c} + \pi \right) - \left( \frac{2 \pi f r}{c} \right) = \frac{4 \pi f}{c} (d-r) + \pi.
\\]

The two sinusoids go from adding up constructively to canceling each other when the phase difference changes by \\(\pi\\), namely when
Expand All @@ -55,10 +55,8 @@ In terms of the frequency, the signal strength changes from a peak to a valley w
\frac{1}{2} \left( \frac{2d-r}{c} - \frac{r}{c} \right)^{-1}.
\\]
Notice that the following quantity
\\[
T_d = \frac{2d-r}{c} - \frac{r}{c},
\\]
is actually the propagation delay of the two paths. This is called **delay spread**.
the difference between the propagation delay of the two paths
is actually the difference between the propagation delay of the two paths. This is called **delay spread**.

From the two equations above, we define \\(1/(2T_d)\\) as the **coherence bandwidth**. We can see that the coherence bandwidth is of the order of $1/T_d$.

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
title: "Input/output models"
published: true
morea_id: assessment-04-input-output-model
morea_summary: "Physical models of wireless channels"
# morea_outcomes_assessed:
# - outcome-CHANGE-ME
morea_type: assessment
morea_start_date: "2024-02-06T00:00"
morea_end_date: "2024-02-12T23:55"
morea_labels:
---

# Input/output models of wireless channels

*Please submit your solutions in Laulima.*

In this assessment, we look at a realistic channel model with its parameters determined by field measurements. Then we will implement a simplified version of this channel model.

One feature of the 5th-generation (5G) wireless communication systems is the usage of the millimeter-wave (mmWave) band at 60 GHz. Therefore, it is crucial to understand the mmWave channels. The Millimetre-Wave Evolution for Backhaul and Access (MiWEBA) project is one of the efforts toward this goal. If you are interested, you might want to take a look at [the complete project report](https://citeseerx.ist.psu.edu/document?repid=rep1&type=pdf&doi=e41ca51b3a590d267f5d09661b790c9002d3abbc).

For this assessment, we will only need to refer to [this paper](https://jwcn-eurasipjournals.springeropen.com/articles/10.1186/s13638-016-0568-6), which summarizes the main findings in channel modeling. You can read through the first two sections to get the background of the study.

We will implement a quasi-deterministic (Q-D) channel model, as illustrated in Fig. 8 of [the paper](https://jwcn-eurasipjournals.springeropen.com/articles/10.1186/s13638-016-0568-6). The Q-D channel consists of a few strong deterministic rays (D-rays) and some random rays (R-rays). Each ray or multipath is a cluster of rays with similar delays. You can look at Fig. 9 of [the paper](https://jwcn-eurasipjournals.springeropen.com/articles/10.1186/s13638-016-0568-6) for an example with two D-rays (i.e., the line-of-sight (LoS) path and the ground reflection path) and two R-rays (i.e., one path due to reflection from a car and the other due to reflection from a building).

Below are the list of tasks to do.
* Please look at Fig. 3 and Fig. 4, and identify four major multipaths in terms of delay (in ns) and power (in dB).
- Note that a major multipath should have a relatively high power (i.e., less attenuation). In addition, peaks that are very close to each other can be clustered into one multipath.
* Identify two D-rays and three R-rays. Specify the delay and the power.
* Direct ray
* Ground ray
* Random ray that is reflected from a random reflector (e.g., a car)
* a far wall ray that is reflected from a far reflector (e.g., a building far away from the receiver)

<figure style="text-align: center;">
<img src="04-baseband-spectrum.png" alt="Moving antennas with a reflecting wall at the transmitter" width="600">
</figure>

* (1 point) Derive the analytical expression of the received signal using the ray tracing method.
* (2 points) Following [the procedure here](reading-03-reflecting-wall-fixed-antenna.html), derive the coherence distance, the delay spread, and the coherence bandwidth. Compare them with the example when the wall is at the receiver.
* (2 points) Following [the procedure here](reading-03-reflecting-wall-moving-antenna.html), derive the Doppler spread and the coherence time. Compare them with the example when the wall is at the receiver.

Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ morea_experiences:
- experience-04-baseband-passband-conversion
- experience-04-sampling-theorem
morea_assessments:
# - assessment-CHANGE-ME
# - assessment-04-input-output-model
morea_type: module
morea_icon_url: /morea/04-wireless-channel-input-output-model/04-module-icon-multipath.png
morea_start_date: "2024-01-22"
Expand Down
11 changes: 0 additions & 11 deletions morea/04-wireless-channel-input-output-model/reading-CHANGE-ME.md

This file was deleted.

Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: "BER vs SNR curves"
published: true
morea_id: experience-05-ber-vs-snr-curve
morea_type: experience
morea_summary: "BER versus SNR curves"
morea_url: https://colab.research.google.com/drive/1eUt82xKu4llHabRWEYteLY6ZWdpKDXDO?usp=sharing
morea_start_date: "2024-02-07"
morea_labels:
---

Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
title: "Detection in a Fading Channel"
published: true
morea_coming_soon: false
morea_id: module-in-detection-fading-channel
morea_prerequisites:
morea_outcomes:
- outcome-05-detection-in-fading-channel
morea_readings:
- reading-05-roadmap
# - reading-05-awgn-vs-fading
morea_experiences:
- experience-05-ber-vs-snr-curve
morea_assessments:
# - assessment-CHANGE-ME
morea_type: module
morea_icon_url: /morea/05-detection-in-fading-channel/05-module-icon-detection-2.webp
morea_start_date: "2024-02-05"
morea_end_date: "2024-02-07"
morea_labels:
morea_sort_order: 5
---

We analyze the performance degradation under a wireless fading channel.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: "Detection in a fading channel"
published: true
morea_id: outcome-05-detection-in-fading-channel
morea_type: outcome
morea_sort_order: 50
---

* You understand intuitively why fading degrades the performance.
* You know the differences between the error rate versus SNR curve under fading channels and that under AWGN channels.
* You understand how to derive the error rate.
111 changes: 111 additions & 0 deletions morea/05-detection-in-fading-channel/reading-05-awgn-vs-fading.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
---
title: "AWGN vs fading channels"
published: true
morea_id: reading-05-awgn-vs-fading
morea_summary: "A failed attempt in the fading channel"
# morea_url: https://github.com/airbnb/javascript
morea_type: reading
morea_labels:
morea_sort_order: 51
---

# AWGN channel versus fading channel

The input/output model of a wired channel is usualy modeled as an additive white Gaussian noise (AWGN) channel, namely

\begin{align}
y[m] = x[m] + w[m],
\end{align}
where $w[m] \sim \mathcal{CN}(0, N_0)$ is a circularly symmetric Gaussian random variable. It is reasonable to assume that the noises over different time slots are independent (i.e., "white").

In contrast, the input/output model of a wireless Rayleigh fading channel with only one path is

\begin{align}
y[m] = h[m] x[m] + w[m],
\end{align}
where $h[m]$ is a circularly symmetric Gaussian random variable. Therefore, the channel has a magnitude following the Rayleigh distribution, and a phase following a uniform distribution in $[0, 2\pi]$.

Next, we use a simple signaling scheme, Binary Phase-shift keying (BPSK), to illustrate the key differences of the AWGN channel and the Rayleigh fading channel.


## Performance in the AWGN channel

In BPSK, we assign the binary bits of 0 and 1 to $x[m]=-a$ and $x[m]=+a$, respectively. Our goal is to determine which signal was sent base on the received signal $y[m]$. Therefore, we need to derive the optimal detection rule.

### Maximum likelihood detector

A commonly-used principle of a detector is to maximize the likelihood, namely the conditional probability $\mathbf{P}(y[m] \vert x[m])$ of the received signal $y[m]$. Specifically, denoting the estimate of the transmit signal by $\hat{x}[m]$, the maximum likelihood detector is

$$
\hat{x}[m] = \left\{
\begin{aligned}
&+a, && \text{if } \mathbf{P}(y[m] \vert x[m]=+a) \ge \mathbf{P}(y[m] \vert x[m]=-a), \\
&-a, && \text{if } \mathbf{P}(y[m] \vert x[m]=+a) < \mathbf{P}(y[m] \vert x[m]=-a).
\end{aligned}
\right.
$$

Since

For any signal $s(t)$ with a bandwidth limited in $[-W/2, W/2]$, the sampling theorem asserts that we can sample it at a sampling frequency equal to its bandwidth $W$, namely at a sampling interval of $1/W$, and perfectly reconstruct it by

\begin{align}
s(t) = \sum_{n} s[n] \text{sinc}(Wt-n),
\end{align}
where $s[n] = s(n/W)$ is the $n$-th sample, and $\text{sinc}(t)$ is defined as

\begin{align}
\text{sinc}(t) \triangleq \frac{\sin(\pi t)}{\pi t}.
\end{align}

We can see that to perfectly reconstruct the continuous-time signal from its samples, we must sample it at a frequency at least as large as its bandwidth. This is intuitive. A signal with a larger bandwidth contains components at higher frequencies, which translate to faster variations in the time domain. Therefore, we need to sample it at smaller intervals to avoid missing any information.

This is also part of the reason why we want to do signal processing in the baseband. The passband signal has the highest frequency up to $f_c+W/2$, requiring us to sample it at a sampling frequency of $2 f_c + W$, which is much higher than the sampling frequency of $W$ required for a baseband signal.

### Modulation

The sampling theorem also suggests how we should convert the discrete-time data stream $x[n]$ to the continuous-time baseband signal $x_b(t)$:

\begin{align}
x_b(t) = \sum_{n} x[n] \text{sinc}(Wt-n)
\end{align}

In other words, we pass the data stream $x[n]$ through a filter whose impulse response is the sinc function. We can also say that we "modulate" the data stream by the sinc function.

In practice, we usually use other functions (e.g., raised cosine) to modulate the discrete-time signals.

## Discrete-time baseband channel model
Now that we know how to convert between the discrete-time signal and the continuous-time signal, we can derive an equivalent input/output model of the channel in the baseband and also in discrete time. As you may have guessed, the equivalent channel model is also a FIR filter, but in discrete time.

Using the [equivalent channel model in the baseband](reading-04-baseband-equivalent-model.html), we can write the baseband receive signal as

$$
\begin{align}
y_b(t) & = \sum_i a_i^b(t) x_b(t - \tau_i(t)) \notag\\
& = \sum_i a_i^b(t) \sum_{n} x[n] \text{sinc}\left[W(t-\tau_i(t))-n\right] \notag\\
& = \sum_{n} x[n] \sum_i a_i^b(t) \text{sinc}\left(Wt-W\tau_i(t)-n\right). \notag
\end{align}
$$

The $m$-th sample of the baseband receive signal $y_b(t)$ is then

\begin{align}
y[m] = y_b(m/W) = \sum_{n} x[n] \sum_i a_i^b(m/W) \text{sinc}\left[m-W\tau_i(m/W)-n\right] \notag
\end{align}

Defining the delay $\ell \triangleq m-n$, we have

\begin{align}
y[m] = \sum_{\ell} x[m-\ell] \sum_i a_i^b(m/W) \text{sinc}\left[\ell-\tau_i(m/W) W\right] \notag
\end{align}

In conclusion, we can define the **discrete-time baseband equivalent channel model** as
\\[
h_\ell[m] = \sum_i a_i^b(m/W) \text{sinc}\left[\ell-W\tau_i(m/W)\right],
\\]
so that the discrete-time baseband receive signal can be written as
$$
y[m] = \sum_{\ell} h_\ell[m] x[m-\ell].
$$

Therefore, the discrete-time baseband equivalent chanenl model is *also a complex-valued FIR filter!*
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
---
title: "Roadmap of this module"
published: true
morea_id: reading-05-noncoherent-detection
morea_summary: "Overview"
# morea_url: https://github.com/airbnb/javascript
morea_type: reading
morea_labels:
morea_sort_order: 50
---

# The discrete-time baseband model

The signal processing is not only done in the baseband, but also in discrete time. This is because the digital chips ultimately work in the discrete time. However, the signal transmitted in the air is continuous-time.

How do we convert the discrete-time signal in devices to a continuous-time signal ready for transmission, and how we convert the continuous-time signal received to a discrete-time signal for processing in the receiver?

## Conversion between discrete time and continuous time

### The sampling theorem

For any signal $s(t)$ with a bandwidth limited in $[-W/2, W/2]$, the sampling theorem asserts that we can sample it at a sampling frequency equal to its bandwidth $W$, namely at a sampling interval of $1/W$, and perfectly reconstruct it by

\begin{align}
s(t) = \sum_{n} s[n] \text{sinc}(Wt-n),
\end{align}
where $s[n] = s(n/W)$ is the $n$-th sample, and $\text{sinc}(t)$ is defined as

\begin{align}
\text{sinc}(t) \triangleq \frac{\sin(\pi t)}{\pi t}.
\end{align}

We can see that to perfectly reconstruct the continuous-time signal from its samples, we must sample it at a frequency at least as large as its bandwidth. This is intuitive. A signal with a larger bandwidth contains components at higher frequencies, which translate to faster variations in the time domain. Therefore, we need to sample it at smaller intervals to avoid missing any information.

This is also part of the reason why we want to do signal processing in the baseband. The passband signal has the highest frequency up to $f_c+W/2$, requiring us to sample it at a sampling frequency of $2 f_c + W$, which is much higher than the sampling frequency of $W$ required for a baseband signal.

### Modulation

The sampling theorem also suggests how we should convert the discrete-time data stream $x[n]$ to the continuous-time baseband signal $x_b(t)$:

\begin{align}
x_b(t) = \sum_{n} x[n] \text{sinc}(Wt-n)
\end{align}

In other words, we pass the data stream $x[n]$ through a filter whose impulse response is the sinc function. We can also say that we "modulate" the data stream by the sinc function.

In practice, we usually use other functions (e.g., raised cosine) to modulate the discrete-time signals.

## Discrete-time baseband channel model
Now that we know how to convert between the discrete-time signal and the continuous-time signal, we can derive an equivalent input/output model of the channel in the baseband and also in discrete time. As you may have guessed, the equivalent channel model is also a FIR filter, but in discrete time.

Using the [equivalent channel model in the baseband](reading-04-baseband-equivalent-model.html), we can write the baseband receive signal as

$$
\begin{align}
y_b(t) & = \sum_i a_i^b(t) x_b(t - \tau_i(t)) \notag\\
& = \sum_i a_i^b(t) \sum_{n} x[n] \text{sinc}\left[W(t-\tau_i(t))-n\right] \notag\\
& = \sum_{n} x[n] \sum_i a_i^b(t) \text{sinc}\left(Wt-W\tau_i(t)-n\right). \notag
\end{align}
$$

The $m$-th sample of the baseband receive signal $y_b(t)$ is then

\begin{align}
y[m] = y_b(m/W) = \sum_{n} x[n] \sum_i a_i^b(m/W) \text{sinc}\left[m-W\tau_i(m/W)-n\right] \notag
\end{align}

Defining the delay $\ell \triangleq m-n$, we have

\begin{align}
y[m] = \sum_{\ell} x[m-\ell] \sum_i a_i^b(m/W) \text{sinc}\left[\ell-\tau_i(m/W) W\right] \notag
\end{align}

In conclusion, we can define the **discrete-time baseband equivalent channel model** as
\\[
h_\ell[m] = \sum_i a_i^b(m/W) \text{sinc}\left[\ell-W\tau_i(m/W)\right],
\\]
so that the discrete-time baseband receive signal can be written as
$$
y[m] = \sum_{\ell} h_\ell[m] x[m-\ell].
$$

Therefore, the discrete-time baseband equivalent chanenl model is *also a complex-valued FIR filter!*
22 changes: 22 additions & 0 deletions morea/05-detection-in-fading-channel/reading-05-roadmap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
title: "Roadmap of this module"
published: true
morea_id: reading-05-roadmap
morea_summary: "Overview"
# morea_url: https://github.com/airbnb/javascript
morea_type: reading
morea_labels:
morea_sort_order: 50
---

<div class="alert alert-success" role="alert" markdown="1">
<i class="fa-solid fa-book fa-xl"></i> **Reading in the textbook**
<hr/>

This module covers Section 3.1 of [the textbook](https://web.stanford.edu/~dntse/papers/book121004.pdf).
</div>


In this module, we analyze the performance of communications systems in wireless fading channels.

Through the performance analysis, we will see how fading significantly degrades the performance (in terms of the error rate). This challenges call for special techniques to combat fading in wireless channels.

This file was deleted.

This file was deleted.

Loading

0 comments on commit b38543e

Please sign in to comment.