{'fraction_non_alphanumeric': 0.03008215206185567, 'fraction_numerical': 0.010228737113402062, 'mean_word_length': 4.538135593220339, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 2, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A Chirp Spread Spectrum Modulation Scheme for Robust Power Line Communication

This paper proposes the use of a LoRa like chirp spread spectrum physical layer as the basis for a new Power Line Communication modulation scheme suited for low-bandwidth communication. It is shown that robust communication can be established even in channels exhibiting both extreme multipath interference and low SNR (-40dB), with synchronisation requirements significantly reduced compared to conventional LoRa. ATP-EMTP simulations using frequency dependent line and transformer models, and simulations using artificial Rayleigh channels demonstrate the effectiveness of the new scheme in providing load data from LV feeders back to the MV primary substation. We further present experimental results based on a Field Programmable Gate Array hardware implementation of the proposed scheme.


I. INTRODUCTION
D ISTRIBUTION Network Operators (DNOs) already deploy a wide range of communication technologies to support the move towards smart grids. Advances in the standardisation of narrowband Power Line Communication (PLC) solutions such as Prime and G3-PLC, and growing options in long range wireless communication (i.e. LoRa) have only added to the options in the last decade. But there remains an unmet requirement for low-cost and robust communication of, for example, load data from secondary substations. The problem is amplified by the sheer number of required monitoring points (typically tens of thousands in a large regional distribution network) and the fact that secondary substations are often located in rural areas with limited access to conventional wired or wireless communication infrastructure.
Previous attempts at providing widescale communication across large distribution networks have tended to focus on the use of conventional wired media (i.e. ethernet), wireless solutions (LoRa, GSM) or PLC.
Narrowband PLC solutions such as Prime [1] and G3-PLC [2] are now firmly established on Low-Voltage (LV) networks, and are often deployed in automatic meter reading (AMR) applications and increasingly in support of other smart grid services. Over longer distances and across voltage levels, these technologies struggle to cope with the increased attenuation and extreme multipath conditions associated with transmission through transformers and Medium Voltage (MV) networks [3]. New technologies are required in this space.
S. Robson  This paper proposes a PLC modulation scheme based on the Chirp Spread Spectrum (CSS) scheme of the recently standardised LoRa physical layer [4]. The modification is designed to combat the two major problems of extreme multipath and low SNR. The former is resolved by subdividing the LoRa symbol into a reduced set, thereby containing the multipath energy into a single symbol. The latter is resolved through the use of statistical averaging of the modified signal over consecutive symbols. This trading off of data rate for performance makes possible a communication scheme in which many LV feeder monitoring devices can communicate back to a primary substation at timescales of several seconds or minutes.

II. BACKGROUND A. Requirements for Robust Communication on the LV-MV channel
The communication channel linking the LV and MV parts of a distribution network is characterised by extreme multipath conditions (σ rms = 10's to 100's of µs). The main contributing factor to this is not the attenuation of the power line itself, rather it is a result of delayed versions of the signal reaching the receiver from many different paths. On the MV network, the typical lengths of the line become much larger than the wavelength of the narrowband PLC signal, and lines are terminated by open circuits or transformers with large reflection coefficients. Therefore, much of the signal energy remains in the power line until it dissipates. Empirical measurements of the RMS delay spread on MV distribution networks is in the tens of µs [5]. In contrast, the RMS delay spread on LV networks is less than 10 µs [6]. Therefore, a robust communication scheme suited to this environment must accommodate extremely high RMS delay spreads, far beyond what is typical in LV and conventional wireless systems.
When considering cross-network (LV-MV) transmission, for example in a system which relays load information from a secondary to a primary substation, a second major problem emerges. Though it has been demonstrated that PLC signals in the narrowband range (15-500 kHz) can indeed propagate through transformers, the attenuation is large. Empirical measurements show an average 35 dB attenuation with a high degree of frequency selectivity [7]. The SNR penalty imposed by this scale of attenuation renders existing narrowband PLC technologies unusable. The situation is further exacerbated by regulatory limits on transmit power on power lines. Therefore, reliable inter-transformer communication is only possible with communication schemes that can work at low SNRs.
The dual problem of extreme multipath and high attenuation makes the design of a communication system for this channel extremely challenging. Recently, the emerging LoRa standard was proposed for PLC communication [8], and then for time disemmination [9] [10]. LoRa has several favourable properties, including excellent receiver sensitivity and low power. However, in its raw form, it performs poorly in severe multipath. Here, we exploit the unique properties of LoRa, with a few key modifications, for robust performance in the low SNR and high multipath regime.

B. The LoRa physical layer
The mathematical basis underpinning the LoRa physical layer has been studied extensively in several recent works [11][12] [13]. LoRa transmits symbols as frequency shifted chirps. With a bandwidth of B = 1 T , the transmitted symbol, w k is defined as: The above equation describes a series of n = 0, 1, 2 . . . 2 SF −1 consecutive samples forming a LoRa symbol. SF ∈ {7, 8 . . . , 12} is the so called Spreading Factor, which determines the number of transmitted samples per LoRa symbol. k ∈ 0, 1, 2 . . . 2 SF −1 is the transmitted symbol and E s is the symbol energy. It has been shown in [11] that the 2 SF basis functions are orthogonal allowing a sufficiently synchronised receiver to demodulate using correlation. If r k is the received symbol corrupted by Additive White Gaussian Noise (AWGN), φ i , and w * i is the complex conjugate of symbol k (i.e. that corresponding to the transmitted symbol), the correlator output y will exhibit a peak at index k.
It is demonstrated in [11] how the more computationally efficient method removes the need to perform the full correlation over all 2 SF basis functions. Indeed, the method used by LoRa requires only the multiplication of r k with the complex conjugate of the base down chirp (a process known as dechirping). The dechirped signal comprises a pure frequency tone which is proportionate to k, so an FFT and find max routine completes the demodulation process. Equation 2 shows that correct demodulation will take place when √ E s + φ k exceeds the maximum value of φ across all correlations. Although there may be significant distance between the PDFs of φ and √ E s + φ k , it is actually the PDF of the maximum of φ per symbol that is of interest in Symbol Error Rate (SER) calculations.

C. Performance of LoRa in Multipath Channels
In most conventional LoRa applications, the RMS delay spread is in the ns or low µs range. This contains the majority of the multipath energy within a single sample and can be considered as frequency flat fading. However, in PLC applications, LoRa Correlator Output, y Channel Impulse Response Impulse response appears as "reversed" in the LoRa correlator output delay spreads of several tens of µs have been recorded. In this case, the multipath energy will smear across samples and will be more appropriately modelled as frequency selecting fading. A basic model of the situation can be constructed in which delayed versions of the transmitted symbol arrive at the receiver. Due to the unique way LoRa is modulatedeffectively as time-shifted versions of a base chirp -a delayed version of a transmitted symbol will be demodulated as if it belonged to an adjacent symbol, as shown in Eqn. 4, where where α is the impulse response of the channel. This is shown graphically in Fig. 1.
Therefore, the channel impulse response can be mapped out from the correlator output. In standard LoRa modulation, the presence of strong multipath interference in which the signal arrives by one or more indirect paths presents a problem for the LoRa demodulator because strong correlation peaks caused by these paths will compete against the true transmitted symbol, raising the SER.

III. DESCRIPTION OF THE PROPOSED METHOD A. Enhancement for Robustness in Extreme Multipath
It is interesting to note that the correlator output of the LoRa demodulator mimics the channel impulse response. This was noted in [14], which exploits the regularity of the channel impulse response across subsequent LoRa symbols through the use of cross-correlation. This method would be particularly interesting in PLC applications because the channel is fixed. However, the performance is similar to that of conventional LoRa systems in the AWGN channel, which is still not good enough to perform reliably on the particularly hostile LV-MV channel. We also remark that the synchronisation requirements match that of conventional LoRa, which is difficult to achieve on the power line channel.
In the proposed method, which is shown graphically in Fig. 2, the convenient grouping of multipath energy into a predictable place in the correlator output is exploited in a different way. If the correlator output is termed y(k), where each term in y represents the absolute value of one of 2 SF output bins of the FFT operation, we can group the bins into a reduced set of g 'superbins'.
Assuming that the length of the channel impulse response is significantly smaller than the symbol time, T s , the set of M possible symbols can be reduced to a smaller set of G = M P possible symbols, each encoding SF −log 2 P bits, where P 2 Z is the number of samples in each superbin. The modulator now encodes into a reduced set of g ∈ 0 . . . G − 1 possible positions. If P T e is longer than the channel impulse response, the spread of energy resulting from multipath interference will be contained to a single superbin. To implement this scheme at the transmitter, data should be encoded into one of a set of possible symbols described by m g ∈ P, 2P, . . . GP . The restricted set of symbols are separated by P samples, which, if longer than the manifestation of the channel impulse response within R m , will contain the multipath energy to within the symbol being transmitted.
At the receiver, the process is identical to standard LoRa demodulation except that a reduced set of G symbols are derived from the sum of the previous P bins: Equation 5 shows a set of S output terms, with each term representing the sum of P correlator output terms from the FFT output, y. The summation combines the multipath energy within the symbol into a single number. The receiver can commence to finding the maximum index within S in the same way as the conventional LoRa demodulation process finds the maximum y. Equation 4 shows that y is made up of the square root of the symbol energy ( √ E s ) when i = k (in the case of LoRa transmission in the AWGN channel) and a dispersed share of the symbol energy when k − x ≥ i ≤ k in the case of transmission on the multipath channel with a delay spread of x samples. Every term in y is also made up of a complex zero-mean Gaussian noise process, φ. The find max routine must now choose from a reduced set of terms. The energy in each term is now made up of the sum of P noise terms and, in the case of the correct symbol, the dispersed symbol energy. If the condition that P T e > σ rms , the majority of the symbol energy will fall within a single term. Therefore, the find max routine can still demodulate the symbol even in multipath channels, albeit at the expense of a reduced data rate.
Each superbin comprises the sum of P squared noise term samples, |φ| 2 , from the correlator output of Eqn. 4. Since |φ| is a Rayleigh distributed random variable, its square is distributed exponentially, and the sum of P of these samples follows a Gamma distribution. We have approximated this as a Gaussian distribution with µ equal to the expected value of the sum of the noise terms and σ equal to the sum of the noise variance, The superbin which corresponds to the correct symbol, E, follows a Rician distribution with shape parameter k β = E s /2σ 2 = E s /N 0 , where N 0 is the single-sided noise power spectral density.
The demodulation process performs a find max routine which can be simplified as the comparison between E and the maximum of all other g − 1 symbols. The distribution describing the maximum of g − 1 normally distributed random variables is denoted M φ . The expected value of M φ can be approximated as 2 log(g − 1) standard deviations greater than the expected value of S φ . A correct demodulation is achieved if E > M φ . Fig. 3 shows S φ , M φ and E resulting from 30,000 Monte This guarantees that most of the multipath energy will fall within a single superbin. The vertical reference lines labelled S φ andĒ represent the means of the noise and transmitted symbol, respectively. The X scale is normalised toS φ , and we retain this convention throughout the rest of the paper. In Fig 3(a) (SNR = -15dB), there is a clear separation between S φ and E. LoRa-Mod, which relies on a comparison between E and M φ , can operate successfully at this SNR. Fig 3(b) (SNR = -20dB) shows a more pronounced overlap between E and M φ , which leads to an increasing symbol error rate for LoRa-Mod. Beyond this point, LoRa-Mod cannot be used. However, it is noted that the mean of E is still larger than the mean of S φ , even at extremely low SNRs (e.g. in the case of -35dB in Fig. 3(d)). Fig. 4 shows the performance of LoRa-Mod in three separate Rayleigh channels (τ rms = 10, 20 and 40 LoRa samples) and for two different spreading factors (SF=12, 14). Firstly, the general level of performance improves with increasing spreading factor. Secondly, there is a requirement for the superbin size to be at least as large as τ rms . For example, in Fig. 4(a) and 4(b), which is the 10 sample channel, all superbin sizes perform relatively well. In the 20 sample channel (Fig. 4(b) and 4(d)), the 4, 8 and 16 sample binsize schemes exhibit a drop in performance. In the 40 sample channel, the trend continues.

B. Enhancement for Robustness in Extremely Low SNRs
Lora-Mod has the flexibility to perform well in channels with arbitrarily long RMS delay spreads and poor SNRs, but a further trade-off of data rate can improve the performance to even lower SNR regimes. This scheme, termed Lora- Mod-Enhanced henceforth, uses the principle of statistical averaging to estimate the means of E and the noise symbol S φ distributions. As shown in Fig. 2, this comes at the cost in hardware of a recursive running sum or running mean for each superbin. In extremely low SNRs, the difference between the means of E and S φ is small but non-zero. Should the same transmitted symbol be repeatedly sent, the receiver can estimate the mean of the previous Q symbols of E (the transmitted symbol) and S φ (all noise symbols). Unlike LoRa-Mod, which is a comparison between the maximum noise symbol (M φ , shown in orange in Fig. 3), and E, LoRa-Mod-Enhanced is a comparison between the mean of the previous Q E symbols with the maximum of the means of the previous Q S φ symbols.
The variance of H is narrowed compared to S φ : Although the symbol error rate is still dependent on the comparison between the transmitted symbol and the maximum of the noise symbols, both terms have distributions which are significantly narrowed by the averaging. Since it can be guaranteed that most of the transmitted symbol energy will fall within E, a high enough Q is able to detect the statistical difference between the two means, even at extremely low SNRs.
This approach requires a compromise in terms of the maximum achievable datarate since, in effect, any gains made in robustness due to an increase in Q are matched by a proportionate reduction in datarate. However, in grid applications where load data is only required on the timescale of minutes, this comprimise might be acceptable. Fig. 6, which retains the colour scheme from Fig. 5, shows the distributions (represented as horizontal lines) of normalised symbol energy for a spreading factor of 12 and for various bin sizes. It also shows the effect of varying the running mean length, Q. The same LoRa parameters deployed in Fig. 5 are used, meaning the majority of the multipath energy falls within the transmitted symbol superbin, E. It is interesting to note that increasing the bin size beyond that which is necessary to contain the multipath energy actually deteriorates performance of LoRa-mod-enhanced, as indicated by the narrowing of the gap between the purple lines (S φ and theĒ).

C. Synchronisation
The synchronisation requirements are drastically relaxed in comparison to conventional LoRa because it does not matter if energy smears across LoRa bins (the energy will remain inside the superbin). This opens up the possibility of using zerocrossing detectors to estimate the start point of each symbol, reducing the complexity of both transmitter and receiver and removing the requirement for a preamble.

A. Development of a test network
The test network, as shown in Fig. 7, has 5 LV feeders and a radial MV network. The LV feeders use underground cable models (three-phase in an enclosed pipe) and the HV network comprises an overhead line based on an 11 kV wood pole model. All models use the frequency dependent JMarti model generated by the Lines and Cables Constants (LCC) routine of the EMTP. The MV/LV transformers are modelled with the high frequency Catallioti model [15] and each LV line is terminated on the load side by a three-phase 10 Ω resistance.

B. Simulation Methodology
Two LoRa-Mod-Enhanced devices are placed within each of the 5 feeders (labelled A-E in Fig. 7). A single receiver is placed near the primary substation (labelled 'O'). The modulation code, which is executed in Matlab, automatically writes each sample to a text file. This text file is read by a 'foreign model', which is a custom piece of code executed natively within the EMTP, and provides the source signal for a TACS source. The process can be repeated for any number of TACS sources within the simulation, providing scope for a full system-wide simulation incorporating several transmitters. This methodology also resolves the challenge of writing many millions of samples into EMTP, and allows the communication signal to be read at the same ∆T as the simulation (1E-7). On completion, the EMTP simulation results are converted to a  .MAT file using the PL42MAT routine and processed by the demodulation code within Matlab. Fig. 8 shows the magnitude and impulse responses between a selection of 5 transmitters and the observation point ('O'). The shape of these responses is representative of the MV power line channel, which is characterised by extreme multipath and regions of high attenuation. The RMS delay spread is observed to vary between 100 µs and 500 µs. In the context of a network-wide implementation of the proposed scheme, the magnitude responses show the importance of bandwidth selection. For example, fluctuations of just a few kHz exhibit differences of tens of dBs. (SF=13) and the parameters shown in Table I, the results show that LoRa-Mod breaks down at an SNR of around -20 dB. However, LoRa-Mod-Enhanced continues to perform well up to -25 dB (Q=10), -35 dB (Q=100) and -39 dB (Q=500). The results are similar across all transmitter points (E2 is not shown here but shares the same trend). Further simulations confirm that additional improvements can be achieved with higher spreading factors (at the cost of a decreased data rate).

C. Simulation Results
Longer Q's reduce the effective data rate, but the ability to adjust this provides flexibility. For example, more hostile channels can increase Q, effectively trading off data rate for improved robustness. We have simulated 10 transmitters operating simultaneously on a mixed LV-MV network, however, much like LoRa, many more transmitters can operate simultaneously, sharing both time and frequency resources due to the orthogonality of the chirps at various combinations of SF and bandwidth. This is an important feature of the proposed scheme given the vast and sprawling nature of MV/LV networks, and the necessity for LV feeder load data (voltage and current) from all parts of the network.

V. HARDWARE IMPLEMENTATION AND EXPERIMENTAL RESULTS
Lora-Mod-Enhanced is implemented in Field Programmable Gate Array (FPGA) hardware using the high level architecture shown in Fig. 9. The receiver is connected via UART to a Matlab App for visualisation and logging. The main features of the transmitter and receiver architectures are described next.

A. Transmitter
The FPGA based transmitter is based on a design first utilised in [16]. The baseband complex chirp (Re and Im) is stored in a pair of 32,708 point Read Only Memory (ROM) blocks. This is equivalent to an upscaling factor of 32 for a SF=10, 1,024 point symbol. Modulation is achieved by the ROM address counter, which allows the transmitter to output phase shifted versions of the complex chirp. A Numerically Controlled Oscillator (NCO) is used to generate a carrier frequency (f c ) for quadrature mixing of the complex chirp from the baseband to the passband. A 125 MSPS Digital to Analog Converter (DAC) is used to output the passband signal and amplification is provided by the OPA564 Power Operational Amplifier, which is capable of driving 1.5A at a

B. Receiver
The receiver architecture shown in Fig. 9(b) digitises the incoming signal using a 65 MSPS, 14-bit Analog to Digital Converter (ADC), operating at a lower sampling rate of 1.6 MHz. A Gaussian Noise generator provides the option of introducing an arbitrary level of Additive White Gaussian Noise (AWGN) to the incoming signal. The core has 16bit resolution with a random distribution of ±9.1σ and a period of 2 176 . Following downconversion and decimation by an FIR decimation filter (which downsamples the 1.6 MHz input signal by a factor of 32, down to the 50 kHz baseband), the dechirping process is carried out by a complex multiplier with a 1024-point ROM-based complex chirp.    Fig. 11. Comparison of Experimental results, obtained with the FPGA prototype, and Simulation results using the same conditions. The AWGN is set to -19dB, SF=10.

ROM
An embedded processor is used to send the Lora-Mod output, S and the Lora-mod-enhanced output, H via UART (baud = 115,200bps) to a Matlab app for visualisation and logging of the demodulated data.
To emulate a frequency selective channel, we have implemented a shift register and multiplier before the AWGN is added. This arrangements realises a simple 4-tap channel response with a separation of 4 LoRa samples between taps. Fig. 11 shows a comparison between experimental results and simulation using the same parameters. Here, an SNR of -19 dB is chosen, which, for SF=10, is below the threshold in which LoRa-Mod can operator. The plots show E and the noise symbols S φ with a Q of 64. In this case, LoRa-Mod enhanced can achieve error-free communication with a time on air of 64·(2 SF )·( 1 50,000 ) ≈ 1.3 s per running average. Good agreement between experimental and simulation is observed.

VI. CONCLUSION
• A new PLC modulation scheme, based on a modification of the LoRa physical layer, has been proposed. This scheme has two versions i) LoRa-Mod, which subdivides the demodulated LoRa signal into a reduced set of 'superbins', and ii) LoRa-Mod-Enhanced, which performs statistical averaging on each superbin. • The proposed scheme performs exceptionally well in the notoriously hostile LV-MV channel, coping with both low SNRs and extreme multipath. The condition of setting the superbin size to at least as great as the RMS delay spread is emphasised. • A new simulation methodology in the ATP-EMTP was developed, allowing millions of samples and numerous transmitters to be simulated simultaneously on a mixed (LV/MV) test network. The results demonstrate robust performance in extreme multipath and SNRs as low as -40 dB, with even better performance possible at higher spreading factors and longer moving averages. • The proposed scheme is implemented in FPGA hardware and experimental results match simulation.