关于 Lora中 Chirp Spread Spectrum(CSS)调制解调、发射接收以及同步估计的分析

本文结合相关论文对CSS信号的数学形式、调制解调、发射接收以及同步估计做了全面分析,希望有助于更好地理解lora信号

long-range (LoRa) modulation, also known as chirp spread spectrum (CSS) modulation, in LoRaWAN to ensure robust transmission over long distances by tolerating interference and noise.

参考:On the LoRa Chirp Spread Spectrum Modulation: Signal Properties and Their Impact on Transmitter and Receiver Architectures

正弦波线性调频信号由短时频率扫描组成,下图为其数学表示形式

a sine-wave chirp signal, concisely denoted as chirp in the following, consists of a short-time frequency sweep mathematically expressed as

fbd1c446ca9b443e9146235aef6ebe04.png

使用M个chirp信号进行调制,Δf (s, t)表示调制符号s在t时刻的瞬时频率偏移

LoRa modulation uses M differently shaped chirps, each of which is in one-to-one correspondence with the M symbols of the modulation alphabet S = {0, ··· ,M − 1}. In particular, given a modulation symbol s ∈S, the instantaneous frequency-offset Δf (s, t) of the corresponding modulated chirp linearly increases starting from − B/2+B/M*s. Then, when the maximum frequency-offset B/2 is reached, Δf (s, t) wraps around to −B/2 and keeps on increasing linearly. Assuming t0 =0 as the symbol starting instant, the chirp stops when Δf (s, t = Ts)=Δf (s, 0). Its duration Ts is usually referred to as symbol time. 

chirp调制是一个wrap-around式的操作,频偏到达最大会返回至最低再开始

e91ab660ac614bd9b80faabcfc1b3e6d.png

13c2859b907d42afb09f6ab22a8bd161.png

调制信号的产生

72d93977d19a4b8fa7636b49e28a08ac.png

随后是正常的基带信号调制的过程

207db0a9f5a94d6694c889db76aef646.png

 基带信号的同相和正交信号的表示:in-phase and quadrature baseband signalsf3ed419debf942aca54534da23e54048.png

连续时间相位推导离散时间的相位

e7b71d4c6ce4442a8fed57042e627250.png

 此处的采样时间:符号时间/扩频系数,也就是采样频率为符号带宽BW,而无需奈奎斯特带宽

c88737beb75c424d9458810aa3dc72ac.png

基带信号上采样之后发射

9422c198bed0416ba9883c755b083413.png

调制信号的接收和解调

h表示信道参数

67fba89b540a490c92c4f38e8bdc2231.png

相干解调

f9c4fba01c4544df898e2a8fc946ab70.png

 针对接收信号使用极大似然方法进行符号估计

在信道参数和接收信号的条件下估计symbol属于s的概率,实质上就是找到接收信号在各个传输符号上的投影最大值

3d7032753a574b8b83f75a8e3b30e889.png

 实际的FFT Detector实现

 但是这种方法需要遍历各个符号,并不实用,实际上采用的是将接收信号的各个采样数值和basic up-chirp相关后进行FFT,找出最大值,就是估计出来的符号

cf375ce0d0f846d0ac97fcfd79b41c54.png

实际的结构

19785b0e2e0d485eb00b361773bd0b05.png

解调前需要的同步:需要补偿CFO、STO、SFO

参考:Low Complexity LoRa Frame Synchronization for Ultra-Low Power Software-Defined Radios

 为何会有频偏:Low-cost crystal oscillators have an inherent mismatch with their nominal frequency value and therefore the down-conversion is performed with a different frequency than the up-conversion.

Before being able to demodulate the received symbols and recover the data, a LoRa receiver must also compensate for sampling, carrier frequency and symbol timing offsets that are due to unsynchronized timing references between the transmitter and the receiver.

bb942f15b9e54562b2fe0013b433d5d1.png

a9041fe68c9d40b590d468898a1194ea.png

 直观展示

CFO会使接收到的信号的频率整体搬移,超出频带,再经过采样,使采样后的在频带之内的信号与原信号不一致

CFO will shift the signal out of the receiver’s reception bandwidth, defined by in the interval [−N/2, .., N/2]. Sampling at a normalized minimum rate of 1/N folds the signal back into the receiver’s input bandwidth which, in Figure 3, has the effect of reconstructing complete up-chirps.

 STO影响了接收信号的起始时刻

Next, in the absence of synchronization, after sampling, the receiver has no way of identifying the start of the received sequence, resulting in an STO consisting of an integer number of samples, STOint (with STOint <N) plus a fraction of a sample, STOfrac. In the example of Figure 3, the signal is received with an STO (horizontal time shift) equal to 7.2 samples. Recovering STOint is mandatory for correct alignment to the modulated symbols and compensating for STOfrac is necessary for concentrating the symbol energy within a single FFT bin.

1b5aa540c02b4253b0f93acca6f6ffcc.png

 SFO影响采样频率,导致累计采样误差

序列越长,累计误差的影响越大,导致一个符号里面的各个采样点被混淆,在使用FFT解调的时候被错认为其他的frequency bin

Finally, Figure 4 shows the impact of SFO on an otherwise perfectly synchronized signal. In the figure, we observe the effect of a receiver with a slightly higher sampling frequency to that of the emitter. We observe a cumulative sampling offset which has the effect of slowly moving the samples off of the desired integer frequency bins. If this offset is not corrected, the demodulator will start confusing a symbol (identified by its frequency bin) with its next neighbor. This is an important problem for high order modulations. For example, the highest order modulation in LoRa has N = 4096. Assuming low cost quartz crystals with a ±20 ppm precision are used in both emitter and receiver, a potential worst case offset of 40 ppm can lead to a drift of 0.16 sample after a single symbol. While this effect can sometimes be ignored during preamble acquisition, for example if the preamble is relatively short, this effect must imperatively be corrected during the demodulation phase of frame detection. An estimation of SFO can be extracted from CFO if the source of both offsets, the quartz crystal reference, is identical.

1d101e8d8e3441709c3676031629fe34.png

 核心方法:the presence of both up-chirps and down-chirps in a synchronization preamble leads to an elegant solution for extracting the integer part of both values.

CFO和STO的处理

补充提到time offset (TO) and carrier frequency offset (CFO) of the excitation signal的文章:
Long-Range Ambient LoRa Backscatter with Parallel Decoding

Long-Range Ambient LoRa Backscatter with Parallel Decoding (tsinghua.edu.cn)

 理想的信号

36b993faded04be19a48c900b8733575.png

 收到CFO/STO影响下的接收信号

322d807421e548b5b290763fff7fd0b5.png

小数部分的提取:使用到两个完全相同的连续符号进行估计

0b44b15aca56457daef509fe46b4913b.png

b350482abc774427a48ac3939cc831cc.png

SFO的估计 

The mismatch between the transmitter and receiver oscillators also results in different sampling frequencies, and therefore, the sampled LoRa signal at the receiver experiences a sampling frequency offset.

参考:LORA DIGITAL RECEIVER ANALYSIS AND IMPLEMENTATION

第d个symbol的第n个采样时刻的表示形式

2e55f292eb2b47beae25cb0a76103a95.png

然后对实际采样信号和实际参考信号进行同样的dechirp处理

8aa0dc9401114b20afd79f8f1f76a4b2.png

 然后计算FFT,得到在SFO下的实际采样的计算值

9073b30229ae416a98d2e275f2cadaa3.png

 offset逐符号累计,会导致持续性解调错误

0207e66130674b53a5e9459cdd61a03b.png

 Lora的前导preamble用于同步

c89ff305300c434a8750b246b6f4164e.png

 接收机检查输入信号功率并进行FFT,如果至少一个频率分档的幅度超过给定阈值,则将幅度最大的分档的指数标记为 ˆ Spre,并继续该过程。

重复识别到frequency bin之后,跳过一定的采样点,进入header部分

c48a01c48d5946218b01d2ce890ead94.png

LoRa调制解调的Matlab性能分析有很多方面可以考虑。首先,可以分析LoRa信号的频谱特性。这可以通过使用Matlab的FFT函数对LoRa信号进行频谱分析来实现。通过查看频谱图,可以检查信号的带宽和频率分布。此外,还可以使用Matlabchirp函数生成具有不同扫描方式的扫频信号,以研究LoRa信号的调制特性。 另外,还可以对LoRa信号的调制过程进行分析。这可以通过Matlab的cumtrapz函数来实现,该函数可以对频率点进行积分,从而得到调制后的信号。还可以使用Matlab的相位积分公式进行采样,以验证不同方法的准确性。 此外,还可以对LoRa信号的解调过程进行性能分析。可以使用Matlab的FFT函数对接收到的信号进行频谱分析,并使用类似fftshift函数来处理负频率信号信息。通过分析接收到的信号的频谱特性,可以评估解调的效果。 总之,通过在Matlab进行频谱分析、调制和解调的过程,可以对LoRa信号的性能进行全面的分析。这些分析可以帮助评估LoRa系统在不同条件下的性能表现。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* [LoRa PHY CSS调制分析及Matlab实现](https://blog.csdn.net/weixin_43270276/article/details/121619160)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"] - *3* [LoRa PHY CSS解调](https://blog.csdn.net/weixin_43270276/article/details/122275999)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值