本文结合相关论文对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
使用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式的操作,频偏到达最大会返回至最低再开始
调制信号的产生
随后是正常的基带信号调制的过程
基带信号的同相和正交信号的表示:in-phase and quadrature baseband signals
连续时间相位推导离散时间的相位
此处的采样时间:符号时间/扩频系数,也就是采样频率为符号带宽BW,而无需奈奎斯特带宽
基带信号上采样之后发射
调制信号的接收和解调
h表示信道参数
相干解调
针对接收信号使用极大似然方法进行符号估计
在信道参数和接收信号的条件下估计symbol属于s的概率,实质上就是找到接收信号在各个传输符号上的投影最大值
实际的FFT Detector实现
但是这种方法需要遍历各个符号,并不实用,实际上采用的是将接收信号的各个采样数值和basic up-chirp相关后进行FFT,找出最大值,就是估计出来的符号
实际的结构
解调前需要的同步:需要补偿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.
直观展示
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.
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.
核心方法: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的处理
理想的信号
收到CFO/STO影响下的接收信号
小数部分的提取:使用到两个完全相同的连续符号进行估计
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个采样时刻的表示形式
然后对实际采样信号和实际参考信号进行同样的dechirp处理
然后计算FFT,得到在SFO下的实际采样的计算值
offset逐符号累计,会导致持续性解调错误
Lora的前导preamble用于同步
接收机检查输入信号功率并进行FFT,如果至少一个频率分档的幅度超过给定阈值,则将幅度最大的分档的指数标记为 ˆ Spre,并继续该过程。
重复识别到frequency bin之后,跳过一定的采样点,进入header部分