On the Quasi-Orthogonality of LoRa Modulation

Long Range (LoRa), a low power and wide-area modulation scheme based on chirp spread spectrum, is the most popular and widely adopted Internet of Things (IoT) technique in industry. A notable and interesting property of LoRa modulation is the quasi-orthogonality of signals modulated under different spreading factors (SFs). Unfortunately, in the literature, there has been no analytical effort to establish the theoretical validity of such quasi-orthogonality. This article, for the first time, theoretically tackles the quasi-orthogonality of the LoRa modulation. First, we derive in both continuous- and discrete-time domains the cross-correlation between two nonsynchronized LoRa signals with different SFs, based on which we analyze the quasi-orthogonality of the LoRa modulation and draw some useful engineering insights. Particularly, we analytically show that in the continuous-time domain, the quasi-orthogonality is guaranteed if one of the SFs of the two LoRa signals is large enough; while, in the discrete-time domain, the quasi-orthogonality is ensured if the maximum of the SFs is large enough. Furthermore, for practical values of the SF, the maximum squared magnitudes of the cross-correlation in the continuous- and discrete-time domains are shown to be 1.14% and 1.08%, respectively, compared to their peak values. We demonstrate the validity and accuracy of our analysis through extensive numerical simulations.

A notable and intriguing feature of the LoRa modulation is that signals modulated under different spreading factors (SFs) are quasi-orthogonal (i.e., nearly orthogonal) [8], [9], [10]. Theoretically analyzing such quasi-orthogonality is very important in many practical/industrial applications with LoRa modulation to understand the fundamental performance limit and behavior of the system. Also, the quasi-orthogonality property is particularly useful and crucial for designs and performance analysis of LoRa networks [8], [9], [10]. However, in the literature, there has been no analytical effort to establish theoretical validity of the quasi-orthogonality of the LoRa modulation.
Recently, several efforts have been made to identify the cross-correlation of the LoRa signals modulated under the same SF [6], [11]; and the cross-correlation between up and down chirps modulated under the same SF [12]. However, the results obtained in [6], [11], and [12] are not applicable for theoretically establishing the quasi-orthogonality of the LoRa signals modulated under different SFs. Meanwhile, in [13] and [14], the impact of the quasi-orthogonality of the LoRa modulation has been investigated experimentally through numerical simulations, from which, however, it is not easy to obtain any theoretical insights. Moreover, none of the works in [13] and [14] give an (explicit) answer to the following important and fundamental question: under which conditions, the quasi-orthogonality of the LoRa modulation is established? and what is the analytical expression of the cross-correlation between the LoRa modulated signals with different SFs? To the best of our knowledge, this question still remains unanswered in the literature. This motivated our work.
In this article, we for the first time theoretically tackle the quasi-orthogonality of the LoRa modulation in both continuous-and discrete-time domains. Particularly, our thorough analysis identifies important conditions, under which two nonsynchronized LoRa signals modulated with different SFs are quasi-orthogonal. The main contributions of this article are summarized as follows.
1) We derive an analytical expression of the crosscorrelation between two nonsynchronized continuoustime LoRa signals with different SFs in terms of Fresnel functions. It is also analytically shown that the quasiorthogonality of the LoRa modulation is guaranteed in the continuous-time domain when one of the SFs of the two LoRa signals is large enough; and that for the practical values of the SF, the squared magnitude of the cross-correlation in the continuous-time domain ranges between 0.04% and 1.14% of the peak value.  2) We also derive an analytical expression of the crosscorrelation between two nonsynchronized discrete-time LoRa signals in an exponential form and show that the quasi-orthogonality of the LoRa modulation is ensured in the discrete-time domain when the maximum of the SFs of the two LoRa signals is large enough. It also turns out that for the practical values of the SF, the squared magnitude of the cross-correlation in the discrete-time domain ranges between 0.04% and 1.08% of the peak value. 3) For some important special and asymptotic scenarios in both the continuous-and discrete-time domains, we further simplify the analytical expression of the cross-correlation and gain more insights. 4) In both the continuous-and discrete-time domains, we derive an asymptotically tight and analytically tractable upper bound of the cross-correlation. Also, we present the maximum strength of the cross-correlation for various practical values of the SF. 5) We present extensive numerical results that demonstrate the validity and accuracy of our analysis. In Table I, our work and the related works in [6], [11], and [12] are compared in various aspects.
This article is organized as follows. In Section II, the LoRa signal model is described. In Sections III and IV, the quasi-orthogonality of the LoRa modulation is analyzed in the continuous-and discrete-time domains, respectively. Section V makes overall discussions and Section VI presents the numerical results. Finally, Section VII concludes this article.
Notations: The imaginary unit is denoted by j √ −1. Real and imaginary parts of a complex number z are denoted by Re{z} and Im{z}, respectively. C(z) z 0 cos(π y 2 /2)dy and S(z) z 0 sin(π y 2 /2)dy are Fresnel functions [15]. Also, O(f (z)) and o(f (z)) denote big-O and little-o notations, respectively, which mean that lim [o(f (z))/f (z)] = 0. We use (z) mod y to denote the remainder of the Euclidean division of z by y, i.e., the modulo operation.
Also, all mathematical symbols used in this article are listed in Table II. II. LORA SIGNAL MODEL Let SF denote the SF (or the number of bits) that is a positive integer (which takes one value from {7, 8, . . . , 12} in practice [10]) and M = 2 SF be the number of symbols. Then, the continuous-time LoRa signal modulated with symbol  [3], [4], [5], and [6] where B denotes the bandwidth. Also, T = (M/B) is the symbol (or chirp) duration and t f = (M − s/B) is the folding time.
The discrete-time representation of the LoRa modulated signal can be obtained by sampling the continuous-time waveform x(t) at a sampling frequency f s (or equivalently, sampling interval 1/f s ) as follows [3]: where N 1 = {0, 1, . . . , n f − 1} and N 2 = {n f , n f + 1, . . . , Tf s − 1}. Also, n f = t f f s . By setting f s = B, it follows that [3], [4], [5], [6]: III. ANALYSIS ON QUASI-ORTHOGONALITY OF LORA MODULATION IN CONTINUOUS-TIME DOMAIN Consider two continuous-time LoRa signals, namely, x 1 (t) and x 2 (t), with different SFs, but occupying the same bandwidth B. Let SF 1 and SF 2 denote the SFs of x 1 (t) and x 2 (t), respectively. Without loss of generality, suppose that SF 1 > SF 2 , and thus, M 1 = 2 SF 1 > M 2 = 2 SF 2 and Also, x 2 (t) is assumed to involve an arbitrary time delay τ satisfying 0 ≤ τ ≤ T 1 − T 2 . 1 Consequently, we have where s i is the modulation symbol of x i (t) and 1 In this article, we focus on the analysis with 0 ≤ τ ≤ T 1 − T 2 , even though our analysis and derived results can be readily extended to the case with τ > T 1 − T 2 , because we are interested in identifying the maximum strength of the cross-correlation. For the same reason, in the discrete-time domain, we focus on the analysis with a time lag m ∈ {0, 1, . . . , Note that the parameter A in (5) [resp. A in (6)] represents a phase shift involved in x 2 (t − τ ) for τ ≤ t < t 2 + τ (resp. for t 2 + τ ≤ t < T 2 + τ ), which is induced by the time delay τ . Interestingly, such as a phase shift is given in the form of a continuous-time up chirp with respect to τ .
The cross-correlation between x 1 (t) and x 2 (t − τ ) (normalized to have the peak magnitude of unity) is defined as To analyze the quasi-orthogonality of the LoRa modulation in the continuous-time domain, the cross-correlation ρ(τ ; s 1 , s 2 ) in (7) should be investigated. For this purpose, in the following, we derive a closed-form expression of ρ(τ ; s 1 , s 2 ) in terms of the Fresnel functions. Theorem 1: For 0 ≤ τ ≤ T 1 − T 2 , the cross-correlation between x 1 (t) and x 2 (t − τ ) is given by (8) In (10)- (14), μ = τ B. Proof: See Appendix A-A. From Theorem 1, it turns out that the cross-correlation between x 1 (t) and x 2 (t − τ ) is inversely proportional to the difference between the amounts of symbols of the two LoRa signals (i.e., M 1 − M 2 ). Also, the cross-correlation relies on the time delay τ as well as the symbols and SFs of the two LoRa signals (i.e., the set of parameters {τ, s 1 , s 2 , SF 1 , SF 2 }); but, it is irrelevant of the bandwidth B. 3 In the following, we further investigate some important special and asymptotic cases where the expression of the cross-correlation becomes much simplified.
1) Cross-Correlation for Special Case: First, for a special case when τ = s 1 = s 2 = 0, 4 the cross-correlation is presented in the following.
2) Cross-Correlation for Asymptotic Cases: For asymptotic analysis, we again consider the case of τ = s 1 = s 2 = 0. In what follows, we derive the cross-correlation for two asymptotic cases.
Corollary 2: For fixed (M 1 /M 2 ) < ∞, when M 2 → ∞, the cross-correlation between x 1 (t) and x 2 (t) with s 1 = s 2 = 0 approaches (17) Proof: By using the Taylor expansion, it can be shown By applying these expansions to (16), the result of (17) can be obtained.
The result of Corollary 2 implies that for the case when M 1 is asymptotically large with fixed (M 1 /M 2 ), the value of ρ(0; 0, 0) can be computed very efficiently because the integration involved in the Fresnel functions does not need to be computed.
The results of Corollaries 1 and 2 still show that the crosscorrelation is inversely proportional to M 1 − M 2 even when τ = s 1 = s 2 = 0. On the other hand, interestingly, there is an exceptional case where the cross-correlation is inversely proportional only to M 1 , which is shown in the following.
Substituting this into (16), the result of (18) can be obtained.
The remaining important question is whether the LoRa modulation is indeed quasi-orthogonal in the continuous-time domain. The answer turns out to be affirmative if one of the SFs of the two LoRa signals is large enough. For more detailed analysis and discussions, in the following, we derive a tight upper bound of the strength of the cross-correlation between x 1 (t) and x 2 (t − τ ).
Proof: See Appendix A-B. From Theorem 2, it turns out that the squared magnitude (or power) of the cross-correlation between x 1 (t) and In the following, we derive a useful expression of [m; s 1 , s 2 ] in an exponential form. where . (27) In (26) and (27), In what follows, several special and asymptotic cases are investigated, in which the expression of the cross-correlation becomes further simplified and useful insights are obtained.
Intriguingly, from Corollary 4, it turns out that when m = s 1 = s 2 = 0, the cross-correlation between the two discretetime LoRa signals is inversely proportional to the maximum number of symbols between the two LoRa signals (i.e., M 1 ), or equivalently, the maximum of the SFs of the two LoRa signals (i.e., SF 1 ), with a constant phase of (π/4).
2) Cross-Correlation for Asymptotic Cases: For asymptotic cases, we have the following results.
From Theorem 5 and Corollary 5, it turns out that even for the case of the asymptotically large M 1 with fixed M 2 , the cross-correlation is again inversely proportional to M 1 .
[m; s 1 , Authorized licensed use limited to the terms of the applicable license agreement with IEEE. Restrictions apply.
An important observation from the above results is that the LoRa modulation is quasi-orthogonal in the discrete-time domain if the maximum of the SFs of the two LoRa signals is large enough. For more detailed analysis and discussions, we present the following result.

V. OVERALL DISCUSSIONS
In this section, we make overall discussions on the quasiorthogonality of the LoRa modulation, and we provide practically useful and theoretically unified insights. For this purpose, in the following, we first present the asymptotic quasi-orthogonality of the LoRa modulation. Proof: See Appendix A-G. Based on Theorem 7 along with the theoretical results derived in the previous sections, we can make the following conclusions.
1) The quasi-orthogonality of the LoRa modulation is guaranteed in both the continuous-and discrete-time domains for large M 1 and/or M 2 (and thus, when either SF 1 or SF 2 is large). Quite surprisingly, this also means that if the SF values are small, the quasi-orthogonality may not be ensured, possibly resulting in unwanted crosstalk between the LoRa signals in practice. To address this issue, one should carefully select the SFs of the LoRa signals according to the required crosstalk levels. An intuitive way is to choose the value of SF 1 as large as possible by selecting the value of SF 2 as small as possible or keeping the value of SF 2 constant. 2) From Theorem 7, it can be also inferred that the two nonsynchronized LoRa signals are quasi-orthogonal in both the continuous-and discrete-time domains if they are quasi-orthogonal in at least one of the two domains. Next, we further investigate the unnormalized crosscorrelation (i.e., inner product) of the LoRa modulation, additionally taking the amplification gains of the LoRa signals into account. Specifically, let where √ P i denotes the amplification gain, which accounts for the amplifier effects, transmit power, fading channel gain, distortion, etc. Then the inner product betweenx 1 (t) andx 2 (t−τ ) and that betweenx 1 [n] andx 2 [n−m] are, respectively, given bỹ [m; s 1 , From (37) and (38), it turns out that in both continuousand discrete-time domains, the inner product is proportional to the amplification gains of the LoRa signals. In the continuoustime domain, it is also inversely proportional to the bandwidth. Therefore, in practice, there are several additional situations where the quasi-orthogonality may not be guaranteed. Specifically, if the amplification gain of the crosstalk signal is large and/or the bandwidth of the system is small, the quasi-orthogonality of the LoRa modulation might not be established. Thus, to achieve the quasi-orthogonality, one should maximize the bandwidth and at the same time minimize the amplification gain of the crosstalk signal as well.
Finally, we provide more discussions on how the analytical results derived in this article can be used for the practical LoRa system designs. First of all, for the cases of the LoRa system designs dealing only with the crosstalk (or interference) issue, our analysis gives us the following fundamental, yet important and valuable, insights.
1) If the LoRa systems operate in the continuous-time domain, the SF values should be maximized as much as possible to minimize the impact of the crosstalk between the continuous-time LoRa signals with different SFs. 5 2) On the other hand, if the LoRa systems operate in the discrete-time domain, the maximum SF value should be maximized as much as possible to minimize the impact of the crosstalk between the discrete-time LoRa signals with different SFs. In addition, the derived analytical results can be used for the practical LoRa system designs in terms of resource allocation (e.g., SF allocation or power allocation) by performing optimizations with various design criteria (such as bit error rate (BER), data rate, coverage, etc.) under the constraint on the crosstalk as follows.
1) For example, suppose that one is interested in the LoRa system designs for the SF allocation with BER minimization (or coverage maximization). Let where ρ th or th denotes a threshold for the maximum cross-correlation strength. Then, the SF allocation for the BER minimization can be done via 2) Similarly, for the LoRa system designs with the aim of data rate maximization, the SF allocation can be conducted by where R(SF 1 , SF 2 ) denotes a performance measure (such as sum rate, minimum rate, etc.) for the data rates of the two LoRa signals with different SFs as a function of SF 1 and SF 2 .

VI. NUMERICAL RESULTS
In this section, numerical results are presented to validate our analysis in the previous sections. Since LoRa supports six different values for the SF (from 7 to 12) in practice, we set SF i ∈ {7, 8, . . . , 12}, i = 1, 2, in the simulations (unless specified otherwise).
In Fig. 1, the cross-correlation between x 1 (t) and x 2 (t − τ ) is shown versus the time delay τ when s 1 = s 2 = 0, SF 1 = 12, and SF 2 ∈ {8, 11}. It can be observed from Fig. 1 that the strength of the cross-correlation tends to decrease as τ increases, while its phase is arbitrarily and almost uniformly distributed across [−π, π). Fig. 2 depicts the cross-correlation between x 1 (t) and x 2 (t) versus the symbol s 1 of x 1 (t) when s 2 = 0, SF 1 = 12, and SF 2 = 11. From Fig. 2, it can be inferred that there exist certain fairs of the LoRa symbols that make the strength of the cross-correlation large or small. In Figs. 3 and 4, the cross-correlation between x 1 (t) and x 2 (t) is plotted versus SF 2 when SF 1 = 12 and SF 1 when SF 2 = 7, respectively, where s 1 = s 2 = 0. From Figs. 3 and 4, we can observe that the strength of the cross-correlation decreases as SF 2 decreases for fixed SF 1 or SF 1 increases for fixed SF 2 , as expected from our analysis in Section III. Also, Fig. 1. ρ(τ ; 0, 0) versus τ when SF 1 = 12 and SF 2 ∈ {8, 11}. the asymptotic analysis presented in Section III-2) agrees well for large SF 1 or SF 2 .
In Table III, the maximum value of |ρ(τ ; s 1 , s 2 )| 2 obtained based on (8) Table III, it can be observed that for the practical values of the SF, the squared magnitude of the cross-correlation ranges between 0.04% and 1.14% of the peak value (i.e., unity). It is small when SF 1 or SF 2 is large, which accords with our analysis. Also, given SF 1 (resp. SF 2 ), the strength of the crosscorrelation tends to be smaller when SF 2 becomes smaller (resp. when SF 1 becomes larger), because M 1 −M 2 gets larger.  n] is shown versus SF 2 when SF 1 = 2SF 2 and versus SF 1 when SF 2 = 7, respectively. We set m = s 1 = s 2 = 0 in Fig. 7 and m = 0, s 1 = (M 1 /M 2 ), and s 2 = M 2 − 1 in Fig. 8. From Figs. 6 and 8, one can see the results expected from Theorem 5 and Corollary 5, respectively. Also, from Fig. 7, one can see that as SF 1 increases, the cross-correlation tends to have a monotonically decreasing strength over SF 1 with the constant phase of (π/4), which accords with the result of Corollary 4.     Table IV, it can be observed that for the practical values of the SF, the squared magnitude of the cross-correlation in the discrete-time domain ranges between 0.04% and 1.08% of the peak value (i.e., unity). It is small  when SF 1 is large, which accords with our analysis. Also, given the same SF 1 , the strength of the cross-correlation tends to be smaller when SF 2 gets smaller. Thus, a large SF gap is even beneficial for ensuring the quasi-orthogonality in the discrete-time domain. Finally, from the results in Figs. 1-4 and Table III, it can be concluded that the upper bound derived in (19) is highly accurate when the magnitude of the cross-correlation is large (even otherwise, it still results in a sufficiently small error). In this sense, therefore, the upper bound in (19) can be considered to be (almost) tight. A similar conclusion can be made for the upper bound derived in (32) based on the results in Figs. 5-8 and Table III. Thus, the upper bound in (32) can be considered to be (almost) tight as well.

VII. CONCLUSION
In this article, we investigated and analyzed the quasiorthogonality of the LoRa modulation by deriving the crosscorrelation between the two nonsynchronized LoRa signals with different SFs in both continuous-and discrete-time domains. It was analytically shown that in the continuoustime domain, the quasi-orthogonality is guaranteed when one of SFs of the two LoRa signals is large enough; while, in the discrete-time domain, the quasi-orthogonality is ensured when the maximum of the SFs is large enough. From the derived results, we also provided the useful engineering insights and further discussed on the quasi-orthogonality of the LoRa modulation in depth. The validity and accuracy of our analysis were demonstrated via the numerical results.
As an intriguing and important focus of future research, it is deserved to study performance analysis, SF allocation, superposition coding, frequency/time synchronization, and so on when multiple LoRa users employing different SFs coexist and interfere with each other, based on the results presented in this article.

APPENDIX A PROOF OF THEOREMS
In this section, we provide mathematical proofs of the theorems. Then x 1 (t) and x 2 (t − τ ) can be written as From (42) and (43), the cross-correlation between x 1 (t) and x 2 (t − τ ) can be calculated case by case for the following four cases (an illustrative example for these four cases is shown in Fig. 9). 1) When 0 ≤ τ ≤ t 1 − T 2 : In this case, x 1 (t) for 0 ≤ t < t 1 is first cross-correlated with x 2 (t − τ ) for τ ≤ t < t 2 + τ over the range τ ≤ t < t 2 + τ , and then, is cross-correlated with x 2 (t − τ ) for t 2 + τ ≤ t < T 2 + τ over the range t 2 + τ ≤ t < T 2 + τ . Thus, it follows that: Authorized licensed use limited to the terms of the applicable license agreement with IEEE. Restrictions apply.
From Lemma 1 in Appendix B, it can be shown that the above integration is equivalent to the result of (8) for 0 ≤ τ ≤ t 1 −T 2 .
2) When t 1 − T 2 < τ ≤ t 1 − t 2 : In this case, x 1 (t) for 0 ≤ t < t 1 is first cross-correlated with x 2 (t − τ ) for τ ≤ t < t 2 + τ over the range τ ≤ t < t 2 + τ , and then, is crosscorrelated with x 2 (t − τ ) for t 2 + τ ≤ t < T 2 + τ over the range t 2 + τ ≤ t < t 1 . Thereafter, x 1 (t) for t 1 ≤ t < T 1 is cross-correlated with x 2 (t − τ ) for t 2 + τ ≤ t < T 2 + τ over the range t 1 ≤ t < T 2 + τ . Thus, it follows that: From Lemma 1 in Appendix B, it can be shown that the above integration is equivalent to the result of (8) for Thus, it follows that: From Lemma 1 in Appendix B, it can be shown that the above integration is equivalent to the result of (8) for t 1 −t 2 < τ ≤ t 1 . 4) When t 1 < τ ≤ T 1 − T 2 : In this case, x 1 (t) for t 1 ≤ t < T 1 is first cross-correlated with x 2 (t − τ ) for τ ≤ t < t 2 + τ over the range τ ≤ t < t 2 + τ , and then, is cross-correlated with x 2 (t − τ ) for t 2 + τ ≤ t < T 2 + τ over the range t 2 + τ ≤ t < T 2 + τ . Thus, it follows that: From Lemma 1 in Appendix B, it can be shown that the above integration is equivalent to the result of (8) for t 1 < τ ≤ T 1 − T 2 .
v u e j ηt+ ν where Proof: By completing the square of the bracketed term, we have v u e j ηt+ ν where in (54), we have changed the integration variable by letting √ ν(t + [η/ν]) = √ π z.
Lemma 2 (Sum of N Complex Exponentials): Suppose that there are N complex exponentials with magnitudes r n , n = 0, . . . , N −1, and phases φ n , n = 0, . . . , N −1. Then, it follows that: On the other hand, when N ≥ 8, we have the following relationship: