IEEE INTERNET OF THINGS JOURNAL, VOL. 6, NO. 6, DECEMBER 2019 9503 Efficient Design of Chirp Spread Spectrum Modulation for Low-Power Wide-Area Networks Tung T. Nguyen , Ha H. Nguyen , Senior Member, IEEE, Robert Barton, and Patrick Grossetete
Abstract—LoRa is an abbreviation for low power and long monitoring, etc.), as well as in industrial applications [1], [2]. range and it refers to a communication technology developed for References [1] and [2] review prominent systems and indus- low-power wide-area networks (LPWANs). Based on the prin- try standards for LPWANs, including Sigfox [3], Ingenu [4], ciple of chirp spread spectrum (CSS), LoRa technology is very attractive to provide low bit-rate wireless connections over an DASH [5], and LoRa [6]. This paper is specifically concerned extended communication range and under very low power con- with the physical layer of LoRa because this technology is sumption. While the medium access control (MAC) layer of LoRa gaining tremendous commercial growth in more than 100 specifications is open for developers, the physical layer is not. In countries around the world.1 particular, LoRa modulation and demodulation techniques are Examining the LoRaWAN standard reveals that the standard patented by Semtech and have not been mathematically described in detail. This paper presents novel approaches to modulate mainly describes medium access control (MAC) layer proto- and demodulate LoRa signals with very high implementation cols with a set of network architectures [7], while the rest efficiency, great flexibility, and excellent performance. In partic- of the standard, especially the physical layer (PHY) archi- ular, compared to the commercially available receiver made by tecture, is left for open development. The only requirement Semtech, the proposed design is shown to yield a saving of trans- imposed on LoRa PHY is the use of chirp spread spectrum mitted power from 0.9 to 2.5 dB over the spreading factor (SF) range of 6–12. Moreover, this paper suggests a method to exploit (CSS) as the modulation technique. CSS is known for its the phase information of CSS signals to encode extra information flexibility in providing tradeoffs between reception sensitivity bits, leading to throughput improvement over the conventional and throughput. Spreading factor (SF) is the most important CSS system, for example, by 33%, 25%, 20%, and 17% for SFs parameter in CSS modulation. Increasing SF can significantly of 6, 8, 10, and 12, respectively. extend the communication range, but it comes at the cost of Index Terms—Chirp spread spectrum (CSS), digitally con- a lower transmission rate. BW is another adjustable parame- trolled oscillator (DCO), Internet of Things (IoT), LoRa, orthog- ter. Using a larger BW enhances the communication speed (as onal chirp generator (OCG). expected) and, at the same time, provides better immunity to narrow-band noise and ingress. The LoRa network is expected to exploit the modulation flexibility of CSS to optimize the I. INTRODUCTION network capacity. The evaluation of link performance as well OW-POWER wide-area networks (LPWANs) have as system-level performance of LoRaWAN can be found in [8]. L recently emerged as a promising communication solu- The currently commercialized LoRa PHY solution [9] is tion for many Internet of Things (IoT) applications. LPWANs patented by Semtech [10]. While the design promises reliable are designed to achieve large coverage ranges, extend bat- low-power communication over a long distance, it has poor tery lifetime of end-devices, and reduce the operational spectral efficiency because of two main reasons. cost of traditional cellular networks. By exploiting the sub- 1) The LoRa CSS signal occupies a much larger BW than 1 GHz unlicensed, industrial, scientific and medical (ISM) required for a CSS signal. Shown in [11] as an example, frequency band and sporadically transmitting small packets the 500-kHz CSS signal occupies more than 700 kHz at low data rates, these networks can be operated with very of the configured BW due to the large roll-off regions low reception sensitivities. The long-range and low-power on both sides of the spectrum, i.e., 100 kHz on each properties of LPWANs make these networks an interesting side. The roll-off region creates a gap between channels, candidate for smart sensing technology in civil infrastruc- preventing them from being placed close together. As a tures (such as health monitoring, smart metering, environment result, there is a smaller number of channels that can be used for a given spectrum resource unless the roll-off is Manuscript received April 11, 2019; revised May 23, 2019, June 4, reduced. 2019, and June 30, 2019; accepted July 6, 2019. Date of publication July 17, 2019; date of current version December 11, 2019. This work was 2) The generated chirps in LoRa CSS appear to be supported by the Natural Sciences and Engineering Research Council of nonorthogonal [12], which causes performance degra- Canada/Cisco Industrial Research Chair in Low-Power Wireless Access for dation when compared to the conventional orthogonal Sensor Networks. (Corresponding author: Ha H. Nguyen.) T. T. Nguyen and H. H. Nguyen are with the Department of Electrical and frequency-shift keying (FSK) system [13]. Computer Engineering, University of Saskatchewan, Saskatoon, SK S7J 4E3, To guarantee orthogonality among the chirps, there are Canada (e-mail: [email protected]; [email protected]). proposals that employ the discrete Fresnel transform, i.e., R. Barton is with Cisco Systems Canada, Vancouver, BC, Canada. P. Grossetete is with Cisco Internet of Things Business Unit, Paris, France. Digital Object Identifier 10.1109/JIOT.2019.2929496 1https://lora-alliance.org/ 2327-4662 c 2019 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information. 9504 IEEE INTERNET OF THINGS JOURNAL, VOL. 6, NO. 6, DECEMBER 2019 orthogonal chirp-division multiplexing [14], or a hybrid com- II. CHIRP SPREAD SPECTRUM SYSTEM bination of FSK and CSS [13]. Unfortunately, hardware A. CSS Modulation resource to implement the discrete Fresnel transform is costly The CSS modulation used in LoRa converts each data sym- and thus is not suitable for low-cost, low-power applica- bol into a chirp, which is a signal whose frequency linearly tions expected for LoRa technology. The hybrid FSK and increases or decreases over time. A chirp is also called a sweep CSS solution significantly increases the occupied BW in signal and one CSS symbol sweeps through the BW once. exchange for orthogonal signaling, thus the spectral effi- When the instantaneous frequency of a CSS signal reaches the ciency is not improved. Although Semtech claims to have a highest, it will wrap over and start from the lowest frequency. design that produces orthogonal CSS chirps [15], [16], the SF is the most important parameter of the CSS system. The underlying method is not publicly known since the trans- CSS modulation order is defined as M = 2SF, which means mitter employs a look-up table (LUT) to store samples of that each CSS symbol carries SF bits. At baseband, each CSS the chirp. symbol contains M complex samples, which are sent out at Although the LUT design appears to be simple, the flexibil- a rate equal to the BW of the signal. Thus the CSS sym- ity requirement of CSS modulation would lead to more expen- bol duration is given as T = (M/BW) (seconds). Then the sive transceivers, since extra hardware resource is required to sym chirp rate, i.e., the rate at which the frequency of a CSS signal support multiple SF and BW settings. Generally, the size of changes over time, can be defined as an LUT increases exponentially with SF. While this might not pose a serious problem for SF values from 6 to 12 as sup- BW BW2 μ = = (Hz/s). (1) ported by available commercial LoRa transceivers, the LUT T M design will become exceedingly costly when higher SF values sym are desired. CSS modulation produces different chirps based on the Against the above background, the first part of this paper basic chirp. The basic chirp is a chirp that starts at the low- (Section II) presents an overview of CSS modulation and est frequency, i.e., −BW/2, sweeps through the entire BW, discusses important aspects such as orthogonality of CSS and then stops at the highest frequency, i.e., BW/2. As such, signaling, theoretical bit-error-rate (BER) evaluation for both the basic chirp at baseband is centered at zero frequency and coherent and noncoherent detection, continuous phase criterion defined by the following continuous-time waveform: and spectra of CSS signals. The property of phase continuity ⎧ ⎫ ⎪ ⎪ is discussed in Section III. Section IV presents an efficient ⎨⎪ ⎬⎪ design that allows supporting multiple SFs and BWs at very μt BW x0(t) = exp j 2π − t , 0 ≤ t ≤ Tsym (2) low cost. In particular, for a digital communication system, ⎪ 2 2 ⎪ ⎩⎪ ⎭⎪ data symbol modulation is generally done at baseband in a φ (t) complex plane consisting of in-phase and quadrature signals. 0 In fact, this is a must for the LUT design since it is most where φ0(t) is the phase function of the basic chirp. The efficient to store samples at the lowest rate. Then the up- instantaneous frequency of the signal at time t is the phase conversion process is applied to both in-phase and quadrature slope of the signal at that moment. That slope can be obtained signals individually using pairs of filters and digital-to-analog by taking the derivative of the phase function over time, i.e., converters (DACs), i.e., quadrature up-converters. The up- ∂φ (t) BW converter could be sophisticated since it must be able to 0 = 2π μt − (radians/s) (3) support all LoRa BW options, typically from 7.8 to 500 kHz. ∂t 2 To reduce the cost of transmitter implementation, Section V which corresponds to a frequency of proposes an option to modulate the CSS signals directly to pass band. This section also discusses how the orthogonal BW f (t) = μt − (Hz). (4) chirp generator (OCG) can also be used in the receiver for 2 de-chirping. The last part of this paper (Section VI) examines how From (1) and (4), it is obvious that: 1) the frequency of the sig- the spectral efficiency of conventional CSS signals can be nal sweeps through the entire BW over the period of Tsym and enhanced. By employing pulse shaping filters, the spectral 2) the center frequency is 0 Hz, i.e., the signal is at baseband. roll-off can be controlled and made to be very small, while Denote the basic chirp as symbol 0. Then the next sym- the orthogonality among chirps is still achieved. This fea- bol, i.e., symbol 1, can be obtained by cyclically time-shifting / ture gives the opportunity to enhance the transmission rate or symbol 0 by an amount of 1 BW, and so on. Overall, there detection performance of the existing CSS signaling scheme. are M different symbols which are collectively defined as In particular, the pulse shaping filters allow relaxing con- Tsym tinuous phase criterion so that additional data information xm(t) = x0 t − m mod Tsym , t ∈ 0, Tsym . (5) M can be encoded into the starting phase of each CSS sym- bol. The phase can then be recovered using a coherent Since each baseband chirp is bandlimited to BW/2, it can receiver. Such simple modification does not increase the be sampled at sampling rate Fsamp = BW without any loss occupied BW nor does it change the orthogonality among of information. As such, each continuous-time baseband sym- the chirps. bol xm(t) can be completely represented by M values that are NGUYEN et al.: EFFICIENT DESIGN OF CSS MODULATION FOR LPWANs 9505
are not phase-locked, and w[n] is AWGN noise sample with zero mean and variance N0. For such an input/output model, it is simple to see that the signal-to-noise ratio (SNR) is SNR = (1/N0). De-chirping is performed on every received symbol by mul- tiplying with the complex conjugate of the basic chirp. If the basic chirp is an up-chirp, its conjugation is a down-chirp with Fig. 1. Block diagram of an LUT-based CSS transmitter. the same chirp rate, and vice versa. In essence, de-chirping unwinds the second-order phase function applied on the trans- samples of xm(t) taken at rate Fsamp = BW over the sym- mitted signal, leaving only the constant and linear phase terms. bol duration. In particular, the baseband discrete-time (digital) This is shown as follows: samples of the basic chirp are given as = ∗ x0[n] = x0(t) vm[n] ym[n]x0[n] t=nTsamp 2 μnT (n + m) n + m = π samp − BW = exp(jψ) exp j2π − + w[n] exp j2 nTsamp 2M 2 2 2 n2 n n2 n = exp j2π − ; n = 0, 1,...,M − 1. (6) × exp −j2π − M M 2 2 2 2 On the other hand, it is simple to show that digital samples 2nm + m2 m = exp(jψ) exp j2π − +ˆw[n] of the mth chirp can be obtained by cyclically shifting the M 2 2 digital basic chirp by m samples. Furthermore, the digital basic m2 m j2πnm chirp repeats itself after every M samples, i.e., x [n + M] = = exp jψ + j2π − exp +ˆw[n] 0 2M 2 M x0[n], ∀n. Therefore the mth digital chirp at baseband can also be mathematically written as xm[n] = x0[n + m]. constant phase linear phase The above properties of the digital chirps are useful for (8) implementing modulation and demodulation of CSS sig- nals. In particular, a conventional LUT-based CSS transmitter ˆ = ∗ where w[n] w[n]x0[n]isalsoanAWGNnoisesample design [16], [17] is shown in Fig. 1. The most important com- with zero mean and variance N0. Thus, in the absence of ponent of the transmitter is a ROM that stores M samples of noise, the CSS signal after de-chirping is a pure sinusoid the basic chirp as described in (6). CSS modulator starts with a with a frequency of m/M (cycles/sample). Denote the constant 2 channel encoding block that converts binary data into a stream phase term as ψm = ψ + 2π([m /2M] − [m/2]), then symbol of SF-bit symbols. Symbol mapping is then performed by demodulation can be done by performing M-point DFT on the cyclically shifting the basic chirp by an amount equivalent to de-chirped signal to obtain the symbol value, producing a corresponding digital baseband CSS symbol. Each digital baseband symbol is then up-sampled M− 1 1 −j2πnk before being converted to an analog baseband signal. There is V [k] = √ v [n] exp m m M a pair of low-pass filters (LPFs) to remove spectral aliases M n=0 caused by up-sampling. Conversion of the signal from analog M− 1 1 j2πnm −j2πnk baseband to a desired carrier frequency, e.g., 902Ð928 MHz = √ exp{jψ } exp exp m M M for LoRa in North America, is done by mixing the signal with M n=0 a digitally controlled oscillator (DCO) that provides in-phase M− 1 1 −j2πnk and quadrature components of the carrier frequency. Note that + √ wˆ [n] exp it is possible to store the preupconverted basic chirp to elimi- M M n=0 nate the need for the up-conversion filters, but it comes at the W[k] cost of increasing the ROM size. M− exp{jψ } 1 j2πn(m − k) = √ m exp + W[k] B. CSS Demodulation M M n=0 Demodulation of CSS signals requires a ROM that stores √ M exp{jψ } + W[m], if k = m the complex conjugate of the digital basic chirp. Since LoRa = m (9) , . signals have a narrow BW (500 kHz or less), the channel W[k] otherwise can be considered as having a constant power gain across the BW (i.e., a flat channel) and the received signal after being down-converted to digital baseband can be expressed as C. BER Performance Analysis The above analysis shows that all the power of a CSS sym- y [n] = exp(jψ)x [n] + w[n], n = 0, 1,...,M − 1. (7) m m bol is concentrated at a single frequency bin, namely the mth In the above expression, ψ is a random phase rotation caused bin if the transmitted CSS symbol is m, whereas all the other by the fact that the oscillators at the transmitter and receiver M − 1 bins contain only noise. At this point, it is useful to 9506 IEEE INTERNET OF THINGS JOURNAL, VOL. 6, NO. 6, DECEMBER 2019 define a peak SNR (PSNR) as √ 2 E M exp{jψm} = = M PSNR 2 (10) |W[k]| N0 which indicates the difference in terms of power between the “power” bin versus the rest (“noise” bins). It is obvious that a higher PSNR would lead to a better chance of detecting the transmitted symbol correctly. The ratio between PSNR and SNR, which is M in linear scale, is called the processing gain. Using a higher SF would lead to a higher processing gain and thus improve the performance of the transmission, but at the cost of a lower transmission rate. The transmitted symbol can be detected coherently or non- coherently. Coherent detection requires the receiver to be Fig. 2. BER performance of 64-ary CSS (i.e., SF = 6) with coherent and phase-locked to the transmitter in order to demodulate the noncoherent detection over an AWGN channel. signal. The coherent receiver has a phase detector that works together with a phase-locked loop (PLL) to synchronize the phases between the receiver and the transmitter. As such, On the other hand, for noncoherent detection, the BER is [19] M− coherent detection is often referred to as synchronous detec- M 1 M − 1 (−1)m+1 tion. Noncoherent detection, on the other hand, does not Pb, = non-coh 2(M − 1) m m + 1 exploit the phase information and the decision is made solely m−1 based on the signal envelope. While it is less complex than m log ME exp − 2 b . (15) coherent detection, the performance is not as good. m + 1 N0 In particular, if the transmitter and the receiver are fully Fig. 2 plots the BER performance of a CSS system with synchronized, i.e., the phase term ψ is known at the receiver, m SF = 6 (i.e., M = 64) obtained with both coherent and non- coherent detection can be carried out as coherent detection. As can be seen, simulation results match exactly with the theoretical results in (13) and (15). Observe = {− ψ }. dcoh argmax Vm[k] exp j m (11) that, for this particular case of M = 64, coherent detection k=0,...,M−1 yields a performance gain of approximately 0.6 dB over the Otherwise, a simpler noncoherent detection is simpler noncoherent detection. Before closing this section, we point out that a similar description of LoRa modulation and noncoherent detection dnon-coh = argmax Vm[k] . (12) k=0,...,M−1 is presented in [20]. Reference [20], however, does not dis- cuss coherent detection nor does it provide theoretical BER The above description and analysis clearly shows that expressions of the two detection methods. CSS is an M-ary orthogonal modulation. As such, its error performance in an AWGN channel is exactly the same as that III. PHASE CONTINUITY OF CSS SIGNALS of M-ary FSK (M-FSK). In particular, BER of the coherent As explained in the previous section, data is encoded into detection can be expressed as [18] the phase function of a CSS symbol, which is a quadratic function of time. Since the phase determines the instantaneous M signal amplitude, phase discontinuity would lead to amplitude P , = b coh ( − ) 2 M 1 discontinuity. Since the phase of a particular CSS symbol is M−1 1 ∞ 1 y −x2 also a cyclically shifted version of the basic chirp’s phase, 1 − √ √ exp dx there are inherent phase jumps occurring at symbols bound- 2π −∞ 2π −∞ 2 ⎧ ⎫ ⎤ aries. The amount of phase jump depends on the modulated ⎨ 2⎬ data, i.e., randomly. The discontinuities at symbol boundaries 1 2log MEb × exp − y − 2 dy⎦ (13) spread the signal power outside its BW. As an example, Fig. 3 ⎩ 2 N ⎭ 0 plots (in dashed lines) both phase function (top panel) and real part of the amplitude (bottom panel) of three CSS symbols where the SNR per bit, (Eb/N0), is related to the SNR as (note created by the cyclically shifting method with SF = 4. The that each orthogonal symbol has M samples while carrying SF first symbol is the basic chirp, i.e., m = 0, followed by two data bits) symbols corresponding to m = 2 and 4, respectively. Note that each CSS symbol starts and ends at the same phase. As Eb M can be seen, there are phase jumps at symbol boundaries and = SNR . (14) N0 SF discontinuities occur in the signal amplitude. NGUYEN et al.: EFFICIENT DESIGN OF CSS MODULATION FOR LPWANs 9507
Fig. 3. Illustration of the phase property of CSS signals. Fig. 4. Power spectra of CSS signals with an without phase correction.
We point out that the CSS symbols shown in Fig. 3 are up-sampled to show the smooth phase function over time. In its samples do not add to zero, the basic chirp contains a dc component. As a consequence, modulation by cyclic-shifting particular, the basic chirp is taken by sampling (2) at Fsamp = L × BW, which gives the up-converted basic chirp as aligns the dc component of all the transmitted symbols in phase, causing spectrum spikes at Nyquist frequencies. On 2 ( ) n n x L [n] = exp j2π − , n = 0,...,ML − 1 the other hand, the phase correction not only produces smooth 0 2ML2 2L phase transition between symbols but also randomly rotates the (16) dc component of each symbol based on the data it modulates, thus effectively eliminating the spectrum spikes. where L is the up-sampling factor. The signals in Fig. 3 are plotted with L = 32. The symbols produced by the cyclic shift method can be expressed as IV. EFFICIENT CHIRP TRANSMITTER DESIGN ( ) ( ) x L [n] = x L [mod(n + mL, ML)] (17) While there are many papers investigating different aspects m 0 of CSS modulation [13], [14], [21], [22], research work on which has the initial phase of efficient implementation of a CSS system at the physical layer 2 is missing. This is quite surprising given the fact that the (L) ( ) (mL) mL φ [0] = ∠x L [0] = − implementation aspect of CSS is particularly important due 0 m 2ML2 2L to low-cost and low-power requirements in the majority of m2 m = − (×2π rads). (18) IoT applications. It appears that the common method to gen- 2M 2 erate a CSS signal is LUT-based (as shown in Fig. 1), which It is not hard to see that the noncontinuous phase can be is the method patented and commercialized by Semtech [15]. turned into continuous by forcing all CSS symbols to start at The LUT-based design is fairly simple and effective, present- the zero phase. In particular, the modulated CSS symbol with ing a challenge for Semtech’s competitors to come up with a zero-starting phase can be expressed as different design that is as simple and yet effective for LoRa’s 2 ( ) m m ( ) physical layer. xˆ L [n] = exp −j2π − x L [n]. (19) m 2M 2 m One of the disadvantages of the LUT-based design, as shown in Fig. 1, is scalability. In particular, in order to support The continuous-phase CSS signal is plotted in Fig. 3 in solid multiple SFs, the LUT size must be large enough to hold all lines. It is obvious that there are no more phase jumps nor possible basic chirps, each of which corresponds to one par- amplitude discontinuities at the symbol boundaries. ticular SF. Of particular interest is the LoRa gateway design, Fig. 4 compares the power spectrum density (PSD) of two which should be able to handle multiple nodes at various BW CSS signals, with and without phase correction. Aside from and SF simultaneously. The gateway typically employs DACs the phase offset correction, the two signals are generated with and ADCs running at a fixed rate of about 2 Msps.2 Therefore, = = the same parameters, i.e., SF 10, BW 125 kHz, and in order to support multiple BWs, the gateway’s transceiver = L 8, and using the same set of random data symbols. As would need to employ variable-rate up/down conversion mod- expected, the phase-corrected signal has much better out-of- ules or storing chirp samples at a higher rate, either of which band suppression. The difference is about 10 dB measured at would increase the cost of the transceiver considerably. For 500 kHz away from the carrier frequency. It is also noted that there are spectrum spikes occurred with 2The spec is taken from Semtech SX1257, which is the RF front-end the CSS signal without phase correction. This is because, since transceiver employed in most of the LoRa gateways [23]. 9508 IEEE INTERNET OF THINGS JOURNAL, VOL. 6, NO. 6, DECEMBER 2019
Fig. 5. OCG.