# How is multiplexing achieved in spread-spectrum modulations like CSS?

I understand why it doesn't interfere with narrowband communication systems but how do different clients communicate in a system like LoRa. Is it time orthogonality like TDM?

## disclaimer

Because of the lack of document about LoRa CSS in Internet, the analysis below may be wrong with respect to LoRa system, not to the (linear) CSS principle. Any comment or update are appriciated. Thanks.

## LoRa CSS modulation

LoRa CSS uses linear chirp spread spectrum. To transmit $\log_2 M$ bits, LoRa CSS modulation divides bandwidth $[-\frac{B}{2} \dots \frac{B}{2}]$ to $M$ portions. In the figure, to transmit symbol $-k$ with $-M/2 < k < M/2$, LoRa use the waveform having the instantaneous frequency: $$f(t)=\begin{cases} \mu\frac{B}{T}t - k\frac{B}{M} + B \qquad -\frac{T}{2} \leq t \leq -\frac{T}{2} + k\frac{T}{M}\\ \mu\frac{B}{T}t - k\frac{B}{M} \quad\qquad -\frac{T}{2} + k\frac{T}{M} < t \leq \frac{T}{2}\\ 0 \qquad\qquad \textrm{otherwise} \end{cases}$$

with $\mu = +1$ or $\mu = -1$. The spreading factor is $M = BT$.

By sampling at exactly $B$ Hz, $f(t)$ becomes continuous, we can works directly with $f(t) = \mu\frac{B}{T}t - k\frac{B}{M}$ with $-\frac{T}{2} \leq t \leq \frac{T}{2}$ in linear CSS decoding framework. (In fact it is not simple like that because of the transition phase at the discontinuos point in the figure. However, it does not change the insight of the answer. I will update my answer "later" :). I appreciate the fact that someone interested in math can do it properly)

\begin{eqnarray} f(t) = \mu\frac{B}{T}t - k\frac{B}{M} = \frac{1}{2\pi}\frac{d\phi(t)}{dt}\\ \phi(t) = 2\pi\left(\mu \frac{B}{2T}t - k\frac{B}{M}\right)t \end{eqnarray}

To decode chirp, we use inverse chirp at receiver: \begin{equation} c_d(t) = e^{j2\pi\left(-\mu \frac{B}{2T}t^2\right)} \end{equation}

Decoding by multiplication in $-T/2 \leq t \leq T/2$: \begin{equation} z(t) = c(t)c_d(t) = e^{j\phi(t)} \times ^{j2\pi\left(-\mu \frac{B}{2T}t^2\right)} = e^{j2\pi\left(\mu \frac{B}{2T}t - k\frac{B}{M}\right)t} \times e^{j2\pi\left(-\mu \frac{B}{2T}t^2\right)} = e^{j2\pi(-kB/M)t} \end{equation}

Remember that we have assumed working on the signal sampled at $B$ Hz ? Thus instead of having $z(t)$ what we got is a sequence of sample $z[m] = z(t=m/B)$ with $-M/2 \leq m \leq M/2$. Note that $M=BT$ if you feel lost.

Now DFT of M samples $z[m]$ to have $Z[u]$ with $-M/2 \leq u \leq M/2$, you will have exactly only one peak at the bin $u = -k$ (if no synchronization error, no Doppler, no multipath). Bingo.

## Multiplexing

It depends how we define "multiplexing". If we use the term in multiple access level (MAC layer), we can have TDMA and FDMA-like. If we are talking about user communicating simultaneously, the only thing that (I think) we can use is the factor $B/T$, or the spreading factor $M = BT$ if $B$ is fixed.

Let's fix the spreading bandwidth $B$. The chirp duration $T = M/B$ changes if $M$ changes and so do the chirp wavefor that depends on $B/T$ : $c_1(t) = e^{j2\pi\left(\mu \frac{B}{2T_1}t - k_1\frac{B}{M_1}\right)t}$

Thus \begin{equation} z(t) = c(t)c_d(t) = e^{j2\pi\left(\mu \frac{B}{2T_1}t - k_1\frac{B}{M_1}\right)t} \times e^{j2\pi\left(-\mu \frac{B}{2T}t^2\right)} = e^{j2\pi(\mu \frac{B}{2}(\frac{1}{T_1} - \frac{1}{T})t - k_1B/M_1)t} = e^{j2\pi(\mu \frac{B^2}{2}(\frac{1}{M_1} - \frac{1}{M})t - k_1B/M_1)t} \end{equation}

$M_1 \neq M$, $z(t)$ has instateneous frequency varying in time. The DFT result should be something like that, i.e. containing no relevant peak. LoRa defines 6 spreading factor $2^7$ to $2^{12}$ (7 if we take the special SF $2^6$). Thus, for a fixed bandwidth, LoRa system can have simulatenously 6 (or 7) users.

I don't have too much familiarity with LoRa which is a particular form of chirp spread spectrum. However, in general, spread spectrum systems use code division for multiplexing. Code division is the CD in CDMA. For example, a frequency hopping spread spectrum signal like Bluetooth will have different frequency hopping patterns for each user/channel in the system. The only cross interference occurs when a channel is used by both sequences in a given interval. The frequency hopping pattern is designed to either eliminate or mitigate this event to an acceptable threshold. A direct sequence spread spectrum system will use a different chipping sequence for each user/channel in the system. For best performance, these codes are orthogonal or nearly orthogonal to each other (nearly orthogonal means the cross correlation is bounded by some small number, for an example see Gold Codes).

On researching LoRa, I found this white paper by Semtech: http://www.semtech.com/images/datasheet/an1200.22.pdf

• In the white paper of Semtech, DSSS and FHSS are cited just to show the concept of spread spectrum. It is clearly said that In LoRa modulation the spreading of the spectrum is achieved by generating a chirp signal that continuously varies in frequency. Apr 22, 2017 at 16:48
• Okay, as I stated "I don't have too much familiarity with LoRa" so I was responding to the general "How is multiplexing achieved in spread spectrum modulations" part of the question. Section 4.1.1 states clearly that "LoRa modulation is both bandwidth and frequency scalable. It can be used for both narrowband frequency hopping and wideband direct sequence applications." This at the time of my reading seemed to imply the last paragraph, but you are right, it is probably intended to be a replacement for these instead. I'll amend the response accordingly.
– hops
Apr 23, 2017 at 6:04