Skip to content

Commit

Permalink
update module 04 experiential learning
Browse files Browse the repository at this point in the history
  • Loading branch information
yuanzhangxiao committed Jan 31, 2024
1 parent e473a40 commit 2200c97
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 50 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,4 @@ morea_labels: Google Colab

# Simulation on baseband and passband conversion

Using [this Google Colab notebook](https://colab.research.google.com/drive/1NyHWOKCa2XM3JUiloteoLyeSNtgX-xjg?usp=sharing), we can simulate the received signal in [the example of fixed antennas with a reflecting wall](reading-03-reflecting-wall-fixed-antenna.html).

In this notebook, you can compare the coherence distance measured from the numerical simulation and that calculated from the theory. You can also compare the coherence bandwidth from simulation and that from theory.
[This Google Colab notebook](https://colab.research.google.com/drive/1jXkbefyqqjPJ5ZKotgBuZkMOlZldH5uc?usp=sharing) illustrates [conversion between baseband and passband](reading-04-baseband-equivalent-model.html).
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,4 @@ morea_labels: Google Colab

# Simulation on the sampling theorem

Using [this Google Colab notebook](https://colab.research.google.com/drive/1NyHWOKCa2XM3JUiloteoLyeSNtgX-xjg?usp=sharing), we can simulate the received signal in [the example of fixed antennas with a reflecting wall](reading-03-reflecting-wall-fixed-antenna.html).

In this notebook, you can compare the coherence distance measured from the numerical simulation and that calculated from the theory. You can also compare the coherence bandwidth from simulation and that from theory.
[This Google Colab notebook](https://colab.research.google.com/drive/1YZ1ln8jPjzoCnXq2GBlGHDpzFz0Az_bl?usp=sharing) illustrates [conversion between discrete-time and continuous-time signals](reading-04-discrete-time-baseband-model.html).
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ morea_readings:
- reading-04-roadmap
- reading-04-linear-time-varying-system
- reading-04-baseband-equivalent-model
# - reading-04-discrete-time-baseband-model
- reading-04-discrete-time-baseband-model
morea_experiences:
# - experience-04-baseband-passband-conversion
# - experience-04-sampling-theorem
- experience-04-baseband-passband-conversion
- experience-04-sampling-theorem
morea_assessments:
# - assessment-CHANGE-ME
morea_type: module
morea_icon_url: /morea/04-wireless-channel-input-output-model/04-module-icon-multipath.png
morea_start_date: "2024-01-22"
morea_end_date: "2024-01-29"
morea_end_date: "2024-01-31"
morea_labels:
morea_sort_order: 4
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Most wireless communication systems send signals at the gigahertz (GHz) frequenc

Therefore, we *upconvert* the baseband signal to the passband before sending it from the transmitter, and *downconvert* the passband signal to the baseband after receiving it at the receiver.

## Conversion of baseband and passband signals
## Conversion between baseband and passband signals

### Review of Fourier transform

Expand Down Expand Up @@ -137,4 +137,4 @@ $$
a_i^b(t) = a_i(t) e^{-j 2 \pi f_c \tau_i(t)}.
$$

In other words, the baseband equivalent chanenl model is *also a FIR filter, but with complex-valued tap gains!* The tap gains are complex-valued because the baseband signals are complex-valued.
In other words, the baseband equivalent chanenl model is *also a FIR filter, but with complex-valued tap gains!* The tap gains are complex-valued because the baseband signals are complex-valued.
Original file line number Diff line number Diff line change
Expand Up @@ -2,60 +2,82 @@
title: "The discrete-time baseband model"
published: true
morea_id: reading-04-discrete-time-baseband-model
morea_summary: "Also in discrete time"
morea_summary: "Processing is also done in discrete time"
# morea_url: https://github.com/airbnb/javascript
morea_type: reading
morea_labels:
morea_sort_order: 43
---

# The baseband equivalent model
# The discrete-time baseband model

## Summarizing the physical models
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.

If we review the physical models in the previous module, we can find a pattern. Specifically, for the sinusoid transmit signal \\(\phi(t) = \cos 2\pi f t\\), the receive signal can always be written as
\\[
\sum_{i} a_i(f,t) \phi(t - \tau_i(f,t)).
\\]
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?

Take the most complex model, namely moving antennas with a perfectly reflecting wall, as an example. The received signal is
\\[
E_r(f,t) = \frac{\alpha \cos 2 \pi f \left[(1-v/c) t - r_0 / c\right]}{r_0+vt} - \frac{\alpha \cos 2 \pi f \left[(1+v/c)t + (r_0-2d)/c\right]}{2d-r_0-vt}.
\\]
## Conversion between discrete time and continuous time

As complicated as it seems, we can cast it in the general form by setting
\\[
a_1(t) = \frac{\alpha}{r_0+vt}, ~~ \tau_1(t) = \frac{r_0+vt}{c}
\\]
and
\\[
a_2(t) = \frac{\alpha}{2d-r_0-vt}, ~~ \tau_2(t) = \frac{2d-r_0-vt}{c} - \frac{1}{2f},
\\]
where the \\(\frac{1}{2f}\\) term in \\(\tau(t)\\) comes from the \\(180^\circ\\) phase shift in the reflected signal.
### The sampling theorem

In summary, the received signal is the weighted sum of sinusoids with different delays.
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

In practice, the transmit signal is not a sinusoid. But any practical transmit signal can be viewed as a superpositon of sinusoids of different frequencies. Therefore, for any transmit signal \\(x(t)\\)), the above linear relationship is preserved. In other words, we can write the receive signal \\(y(t)\\) as
\\[
y(t) = \sum_i a_i(t) x(t-\tau_i(t)).
\\]
\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

Hence, the wireless channel "produce" multiple delayed versions of the transmit signal from multipath and adds them all up at the receiver:
\begin{align}
\text{sinc}(t) \triangleq \frac{\sin(\pi t)}{\pi t}.
\end{align}

<figure style="text-align: center;">
<img src="04-wireless-channel-multipath.png" alt="Multipath in wireless channel" width="400">
</figure>
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.

Both the weight \\(a_i(t)\\) and the delay \\(\tau_i(t)\\) depend on the distance of the path. In addition, the weight also depends on the radiation patterns of the antennas. But this factor is assumed to be fixed. The delay \\(\tau_i(t)\\) may also depend on the phase shift when the signal is reflected from a surface.
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.

## The linear time-varying system model
Based on the above analysis, we can consider the channel as a linear time-varying filter. The input/output relationship of the filter can be written as
\\[
y(t) = \int_{-\infty}^{\infty} h(\tau, t) x(t-\tau) d\tau,
\\]
where the impulse response is
### 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(\tau,t) = \sum_{i} a_i(t) \delta(\tau - \tau_i(t)).
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].
$$

This is a very useful and commonly-used view of the wireless channel: it is a finite impulse response (FIR) filter with time-varying tap gains!
Therefore, the discrete-time baseband equivalent chanenl model is *also a complex-valued FIR filter!*

0 comments on commit 2200c97

Please sign in to comment.